diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7df85d008..85384a05b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,30 +7,375 @@ permissions: contents: read jobs: verify: - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-26] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 with: fetch-depth: 0 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' - name: Keep game artifacts out of Git run: | - python3 tools/check_public_tree.py - python3 tools/check_public_tree.py --history + python tools/check_public_tree.py + python tools/check_public_tree.py --history - name: Test offline research tooling - run: python3 -m unittest discover -s tests -v + run: python -m unittest discover -s tests -v - name: Install Rust toolchain run: rustup toolchain install stable --profile minimal --component rustfmt --component clippy - name: Check formatting and lint run: | cargo +stable fmt --all -- --check cargo +stable clippy --workspace --all-targets -- -D warnings - - name: Test voxel kernel correctness + - name: Test Rust core and voxel kernel correctness run: cargo +stable test --workspace + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '25' + - name: Compare Rust foundations with pinned vanilla client and server bytecode + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_rust_parity.py --prepare + - name: Check Rust world-data interoperability with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_world_parity.py + - name: Compare scheduled ticks and saved tick data with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_tick_parity.py + - name: Compare simulation geometry and cached block collision shapes + env: + RUSTUP_TOOLCHAIN: stable + run: | + python tools/test_geometry_parity.py + python tools/test_collision_parity.py + - name: Compare noise samplers and density kernels with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_noise_parity.py + - name: Compare compiled density samplers with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_density_parity.py + - name: Compare world-generation JSON codecs with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_worldgen_parity.py + - name: Compare heightmap predicates and chunk mutations with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_heightmap_parity.py + - name: Compare pre-light chunk status transitions and block writes + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_chunk_stage_parity.py + - name: Compare feature placement into resident neighboring chunks + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_feature_region_parity.py + - name: Compare nested feature selectors and sequences + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_feature_graph_parity.py + - name: Compare named feature holders and placed-feature tags + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_feature_catalog_parity.py + - name: Compare configured fill-layer block placement + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_fill_layer_parity.py + - name: Compare replacement-rule codecs and evaluation + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_rule_test_parity.py + - name: Compare simple-block placement and feature composition + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_simple_block_parity.py + - name: Compare block-column sampling and obstruction + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_block_column_parity.py + - name: Compare vertical pillars and cap feature placement + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_pillar_parity.py + - name: Compare exactly-one-neighbor feature spreading + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_neighbor_spread_parity.py + - name: Compare block-pile support and placement + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_block_pile_parity.py + - name: Compare disk replacement and postprocessing + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_disk_parity.py + - name: Compare block-blob support search and geometry + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_block_blob_parity.py + - name: Compare spring placement and fluid tick scheduling + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_spring_parity.py + - name: Compare vine attachment priority and placement + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_vines_parity.py + - name: Compare underwater magma floor scans and occlusion + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_underwater_magma_parity.py + - name: Compare blue-ice seeding and growth attempts + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_blue_ice_parity.py + - name: Compare spike geometry and discontinuous roots + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_spike_parity.py + - name: Compare End podium construction and destruction requests + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_end_podium_parity.py + - name: Rust End gateway parity + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_end_gateway_parity.py + - name: Compare bonus chest placement and conditional loot seeding + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_bonus_chest_parity.py + - name: Compare recursive chorus generation and connection refreshes + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_chorus_plant_parity.py + - name: Compare small speleothem patches and waterlogged points + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_speleothem_parity.py + - name: Compare replacement blob search and Manhattan shells + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_replace_blobs_parity.py + - name: Compare bamboo stalks, podzol patches and leafy caps + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_bamboo_parity.py + - name: Compare Nether delta rims and shifted contents + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_delta_parity.py + - name: Compare biome freezing and snow eligibility + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_biome_weather_parity.py + - name: Compare frozen top layers and snowy ground updates + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_snow_freeze_parity.py + - name: Compare generation-stage tick storage and routing + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_generation_tick_parity.py + - name: Compare below-zero upgrade metadata codecs + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_retrogen_data_parity.py + - name: Compare below-zero upgrade lifecycle and block transformations + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_retrogen_chunk_parity.py + - name: Compare chunk-status metadata, ordering and codecs + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_chunk_status_parity.py + - name: Compare proto-chunk block-entity storage and coordinates + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_block_entity_storage_parity.py + - name: Compare ordered single-block replacement features + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_replace_block_parity.py + - name: Compare scattered ore placement and air-exposure checks + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_scattered_ore_parity.py + - name: Compare resident bulk-section access and raw writes + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_bulk_section_parity.py + - name: Compare biome feature ordering and cycle detection + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_feature_sort_parity.py + - name: Compare world-generation random wrappers and seeding + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_worldgen_random_parity.py + - name: Compare biome filtering and top-level feature context + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_biome_placement_parity.py + - name: Compare biome decoration feature scheduling and seeding + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_decoration_parity.py + - name: Compare decoration against resident biome and terrain sections + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_decoration_region_parity.py + - name: Compare block-state provider choices and rotation + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_state_provider_parity.py + - name: Compare contained fluids and height queries with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_fluid_parity.py + - name: Compare entity obstruction with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_entity_obstruction_parity.py + - name: Compare block solidity and replaceability with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_block_properties_parity.py + - name: Compare face slicing and block support with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_face_support_parity.py + - name: Compare cached block support with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_block_support_parity.py + - name: Compare dynamic block support with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_dynamic_support_parity.py + - name: Compare moving-piston collision and interpolation with pinned vanilla + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_piston_shape_parity.py + - name: Compare supported block survival rules with pinned vanilla + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_block_survival_parity.py + - name: Compare noise-stage chunk filling with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_terrain_parity.py + - name: Compare structure terrain-adaptation density with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_structure_density_parity.py + - name: Compare seeded material bands and surface queries with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_material_surface_parity.py + - name: Compare material condition codecs and rule evaluation with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_material_condition_parity.py + - name: Compare biome temperatures and cache behavior with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_biome_temperature_parity.py + - name: Compare badlands and frozen-ocean extensions with pinned vanilla + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_material_extension_parity.py + - name: Compare bundled material-rule libraries with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_material_rule_library_parity.py + - name: Compare fixed, checkerboard and End biome sources with pinned vanilla + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_biome_source_parity.py + - name: Compare seeded cave paths and failure state with pinned vanilla + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_cave_carver_parity.py + - name: Compare seeded canyon paths and width factors with pinned vanilla + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_canyon_carver_parity.py + - name: Compare initial block-writing feature algorithms with pinned vanilla + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_basic_feature_parity.py + - name: Compare feature placement chains with pinned vanilla + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_feature_placement_parity.py + - name: Compare feature placement primitives with pinned vanilla + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_placement_parity.py + - name: Compare anchored height providers with pinned vanilla + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_height_provider_parity.py + - name: Compare scalar value providers with pinned vanilla + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_value_provider_parity.py + - name: Compare cave and canyon geometric primitives with pinned vanilla + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_carving_geometry_parity.py + - name: Compare carving-mask traversal and callback mutations with pinned vanilla + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_carving_mask_parity.py + - name: Compare registry-bound biome-source codecs with pinned vanilla + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_biome_source_codec_parity.py + - name: Compare all four biome-source kinds in chunk generation with pinned vanilla + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_biome_generation_parity.py + - name: Compare chunk biome filling and failure state with pinned vanilla + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_biome_chunk_parity.py + - name: Compare biome zoom and seed obfuscation with pinned vanilla + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_biome_zoom_parity.py + - name: Compare surface-stage chunks with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_material_stage_parity.py + - name: Compare block-state JSON codecs with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_block_state_codec_parity.py + - name: Compare vertical anchors with pinned vanilla client and server + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_anchor_parity.py + - name: Compare float logarithms at domain and rounding boundaries + env: + RUSTUP_TOOLCHAIN: stable + run: python tools/test_float_log_parity.py portable-mod: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-26, windows-latest] + os: [ubuntu-latest, macos-26] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -90,7 +435,6 @@ jobs: if: runner.os == 'Linux' run: sudo apt-get update && sudo apt-get install -y xvfb libgl1 libegl1 libvulkan1 mesa-vulkan-drivers libasound2t64 libxkbcommon0 - name: Verify integrated-server graphics report against the actual device - if: runner.os == 'Linux' || runner.os == 'macOS' run: python tools/test_server_graphics.py ${{ runner.os == 'macOS' && '--native-display' || '' }} - name: Exercise the applied dispatcher hooks and upstream rejection path if: runner.os == 'Linux' @@ -122,7 +466,7 @@ jobs: name: horizon-${{ matrix.os }} path: | dist/*.mrpack - dist/horizon-lab-*.jar + dist/horizon-*.jar dist/worker-pacing-benchmark.txt dist/debounce-queue-benchmark.txt dist/idle-queue-benchmark.txt diff --git a/.gitignore b/.gitignore index d50bc8051..69f56bf18 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ /run/ /logs/ /dist/ -/mods/horizon-lab/build/ +/mods/horizon/build/ +/saves/ diff --git a/Cargo.lock b/Cargo.lock index c676f4e42..8eadbf02a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,2932 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "ab_glyph" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01c0457472c38ea5bd1c3b5ada5e368271cb550be7a4ca4a0b4634e9913f6cc2" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.4", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "alsa" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed7572b7ba83a31e20d1b48970ee402d2e3e0537dcfe0a3ff4d6eb7508617d43" +dependencies = [ + "alsa-sys", + "bitflags 2.13.2", + "cfg-if", + "libc", +] + +[[package]] +name = "alsa-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db8fee663d06c4e303404ef5f40488a53e062f89ba8bfed81f42325aafad1527" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "android-activity" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f2a1bb052857d5dd49572219344a7332b31b76405648eabac5bc68978251bcd" +dependencies = [ + "android-properties", + "bitflags 2.13.2", + "cc", + "jni 0.22.4", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum", + "thiserror 2.0.21", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" + +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + +[[package]] +name = "ash" +version = "0.38.0+1.3.281" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" +dependencies = [ + "libloading", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "bit-set" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2f926cc3060f09db9ebc5b52823d85268d24bb917e472c0c4bea35780a7d" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" + +[[package]] +name = "block2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2 0.5.3", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2 0.6.5", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" + +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +dependencies = [ + "bitflags 2.13.2", + "log", + "polling", + "rustix 0.38.44", + "slab", + "thiserror 1.0.69", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" +dependencies = [ + "calloop", + "rustix 0.38.44", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "cc" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f74872d07caf508b30a21f6836e7d7016a2eaf7d9ff4f48deaa58cd8a0407630" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "codespan-reporting" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "combine" +version = "4.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfc320937d09e6de266b31b9afb480f197d7a861be86be7cb2ea7e5d1bfffc5e" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + +[[package]] +name = "core_detect" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" + +[[package]] +name = "coreaudio-rs" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aae284fbaf7d27aa0e292f7677dfbe26503b0d555026f702940805a630eac17" +dependencies = [ + "bitflags 1.3.2", + "libc", + "objc2-audio-toolbox", + "objc2-core-audio", + "objc2-core-audio-types", + "objc2-core-foundation", +] + +[[package]] +name = "cpal" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbd307f43cc2a697e2d1f8bc7a1d824b5269e052209e28883e5bc04d095aaa3f" +dependencies = [ + "alsa", + "coreaudio-rs", + "dasp_sample", + "jni 0.21.1", + "js-sys", + "libc", + "mach2", + "ndk", + "ndk-context", + "num-derive", + "num-traits", + "objc2-audio-toolbox", + "objc2-core-audio", + "objc2-core-audio-types", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows 0.54.0", +] + +[[package]] +name = "crc32fast" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01a7799fd6b852db0e61728dde9a204c423b44d689dbd432522543614b490e78" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "cursor-icon" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" + +[[package]] +name = "dasp_sample" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c87e182de0887fd5361989c677c4e8f5000cd9491d6d563161a8f3a5519fc7f" + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", +] + +[[package]] +name = "dlib" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab8ecd87370524b461f8557c119c405552c396ed91fc0a8eec68679eab26f94a" +dependencies = [ + "libloading", +] + +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" + +[[package]] +name = "encoding_rs" +version = "0.8.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e985e0451871ad22fb8d2b6b076e2028a502a0d3950998c2c5c0a4f9b5d9679" +dependencies = [ + "cfg-if", + "core_detect", + "multiversion_no_op", + "rustversion", + "scopeguard", + "simdutf8", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484" + +[[package]] +name = "flate2" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb" +dependencies = [ + "crc32fast", + "miniz_oxide 0.9.1", + "zlib-rs", +] + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "slab", +] + +[[package]] +name = "gethostname" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" +dependencies = [ + "rustix 1.1.5", + "windows-link", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", +] + +[[package]] +name = "glam" +version = "0.30.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19fc433e8437a212d1b6f1e68c7824af3aed907da60afa994e7f542d18d12aa9" + +[[package]] +name = "gpu-allocator" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51255ea7cfaadb6c5f1528d43e92a82acb2b96c43365989a28b2d44ee38f8795" +dependencies = [ + "ash", + "hashbrown 0.16.1", + "log", + "presser", + "thiserror 2.0.21", +] + +[[package]] +name = "half" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "cfg-if", + "crunchy", + "num-traits", + "zerocopy", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hermit-abi" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284" + +[[package]] +name = "horizon-assets" +version = "0.1.0" +dependencies = [ + "horizon-core", + "serde", + "serde_json", +] + +[[package]] +name = "horizon-client" +version = "0.1.0" +dependencies = [ + "bytemuck", + "cpal", + "glam", + "horizon-assets", + "horizon-core", + "horizon-world", + "png", + "pollster", + "serde_json", + "symphonia", + "wgpu", + "winit", +] + +[[package]] +name = "horizon-core" +version = "0.1.0" + +[[package]] +name = "horizon-world" +version = "0.1.0" +dependencies = [ + "flate2", + "horizon-core", + "libm", + "lz4_flex", + "serde_json", + "xxhash-rust", +] + +[[package]] +name = "indexmap" +version = "2.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys 0.3.1", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys 0.4.1", + "log", + "simd_cesu8", + "thiserror 2.0.21", + "walkdir", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" + +[[package]] +name = "libc" +version = "0.2.190" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78" + +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link", +] + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "libredox" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" +dependencies = [ + "bitflags 2.13.2", + "libc", + "plain", + "redox_syscall 0.9.4", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litrs" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" + +[[package]] +name = "lz4_flex" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecbdfe44b1bd960b68170b417450a628c43f7cf56bb3c5317e61cb230ee7f226" + +[[package]] +name = "mach2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d640282b302c0bb0a2a8e0233ead9035e3bed871f0b7e81fe4a1ec829765db44" +dependencies = [ + "libc", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "memmap2" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0" +dependencies = [ + "libc", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "miniz_oxide" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "multiversion_no_op" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" + +[[package]] +name = "naga" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a616d2fb8c89516ac2723a581f69d6c18576046bed761bd6b305e5618e6ae130" +dependencies = [ + "arrayvec", + "bit-set", + "bitflags 2.13.2", + "cfg-if", + "cfg_aliases", + "codespan-reporting", + "half", + "hashbrown 0.17.1", + "indexmap", + "libm", + "log", + "naga-types", + "num-traits", + "once_cell", + "rustc-hash", + "spirv", + "thiserror 2.0.21", + "unicode-ident", +] + +[[package]] +name = "naga-types" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "590afbf58a6f4f62873cd5cff4468061844bafa1cdf399cc954537c22d768d49" +dependencies = [ + "hashbrown 0.17.1", + "indexmap", + "rustc-hash", + "thiserror 2.0.21", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.13.2", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d5490aaf8f1d7cf7688dfa9b0ce07900e168852c45cd2c03f534dfd27cfd0b" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8" +dependencies = [ + "objc2-encode", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "libc", + "objc2 0.5.3", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation 0.2.2", + "objc2-quartz-core 0.2.2", +] + +[[package]] +name = "objc2-audio-toolbox" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6948501a91121d6399b79abaa33a8aa4ea7857fe019f341b8c23ad6e81b79b08" +dependencies = [ + "bitflags 2.13.2", + "libc", + "objc2 0.6.5", + "objc2-core-audio", + "objc2-core-audio-types", + "objc2-core-foundation", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-audio" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1eebcea8b0dbff5f7c8504f3107c68fc061a3eb44932051c8cf8a68d969c3b2" +dependencies = [ + "dispatch2", + "objc2 0.6.5", + "objc2-core-audio-types", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-core-audio-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a89f2ec274a0cf4a32642b2991e8b351a404d290da87bb6a9a9d8632490bd1c" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2 0.6.5", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "dispatch2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-metal 0.2.2", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-contacts", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "dispatch", + "libc", + "objc2 0.5.3", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-app-kit", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-metal" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "objc2 0.6.5", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-metal 0.2.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "objc2-metal 0.3.2", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation 0.2.2", + "objc2-link-presentation", + "objc2-quartz-core 0.2.2", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "orbclient" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5df339f526ea9a60e371768d50efc2f2508c7203290731565d1f7a6f71d21747" +dependencies = [ + "libc", + "libredox", +] + +[[package]] +name = "ordered-float" +version = "5.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7c9e0d9b23589f26070720bac724174bfec1083e82f7854cdd0267518343c0" +dependencies = [ + "num-traits", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" +dependencies = [ + "ttf-parser", +] + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.18", + "smallvec", + "windows-link", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.8.9", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix 1.1.5", + "windows-sys 0.61.2", +] + +[[package]] +name = "pollster" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" + +[[package]] +name = "portable-atomic" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" + +[[package]] +name = "portable-atomic-util" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "presser" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "profiling" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" + +[[package]] +name = "quick-xml" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "raw-window-metal" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40d213455a5f1dc59214213c7330e074ddf8114c9a42411eb890c767357ce135" +dependencies = [ + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "redox_syscall" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "737970939a87c6fa31e7acad13307bccbb017a073b695b6089a2c484f929e20e" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "renderdoc-sys" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys 0.12.1", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sctk-adwaita" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" +dependencies = [ + "ab_glyph", + "log", + "memmap2", + "smithay-client-toolkit", + "tiny-skia", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "serde_json" +version = "1.0.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "simd-adler32" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9395f0f0eee849a9b707b2f06bb92a6a422090e2123bb2ef8e87a0e61892a8e" + +[[package]] +name = "smithay-client-toolkit" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" +dependencies = [ + "bitflags 2.13.2", + "calloop", + "calloop-wayland-source", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 0.38.44", + "thiserror 1.0.69", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] + +[[package]] +name = "spirv" +version = "0.4.0+sdk-1.4.341.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9571ea910ebd84c86af4b3ed27f9dbdc6ad06f17c5f96146b2b671e2976744f" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" + +[[package]] +name = "symphonia" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5773a4c030a19d9bfaa090f49746ff35c75dfddfa700df7a5939d5e076a57039" +dependencies = [ + "lazy_static", + "symphonia-codec-vorbis", + "symphonia-core", + "symphonia-format-ogg", + "symphonia-metadata", +] + +[[package]] +name = "symphonia-codec-vorbis" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f025837c309cd69ffef572750b4a2257b59552c5399a5e49707cc5b1b85d1c73" +dependencies = [ + "log", + "symphonia-core", + "symphonia-utils-xiph", +] + +[[package]] +name = "symphonia-core" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea00cc4f79b7f6bb7ff87eddc065a1066f3a43fe1875979056672c9ef948c2af" +dependencies = [ + "arrayvec", + "bitflags 1.3.2", + "bytemuck", + "lazy_static", + "log", +] + +[[package]] +name = "symphonia-format-ogg" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b4955c67c1ed3aa8ae8428d04ca8397fbef6a19b2b051e73b5da8b1435639cb" +dependencies = [ + "log", + "symphonia-core", + "symphonia-metadata", + "symphonia-utils-xiph", +] + +[[package]] +name = "symphonia-metadata" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36306ff42b9ffe6e5afc99d49e121e0bd62fe79b9db7b9681d48e29fa19e6b16" +dependencies = [ + "encoding_rs", + "lazy_static", + "log", + "symphonia-core", +] + +[[package]] +name = "symphonia-utils-xiph" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27c85ab799a338446b68eec77abf42e1a6f1bb490656e121c6e27bfbab9f16" +dependencies = [ + "symphonia-core", + "symphonia-metadata", +] + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" +dependencies = [ + "thiserror-impl 2.0.21", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + +[[package]] +name = "tiny-skia" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + +[[package]] +name = "tokio" +version = "1.53.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e95f91fcc7a621e8b030f6aa23c71fe9838ae2fb4d8118b75602a328f5144044" +dependencies = [ + "pin-project-lite", +] + +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.25.15+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1340ea94a5856333492c9064b02c778b191dd2c853778d9609debdcdfea3a614" +dependencies = [ + "indexmap", + "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" +dependencies = [ + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" + +[[package]] +name = "ttf-parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" + +[[package]] +name = "unicode-ident" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + [[package]] name = "voxel-kernels" version = "0.1.0" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cbab34de2d982e9b48e18d216d04c4a6f641066ff19ffb699980f591ee3610e" +dependencies = [ + "js-sys", + "tokio", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.6", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wayland-backend" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38a91b4eaddff87b1cd1074985e3713da4af2c49742d1b356b2c01670a67a078" +dependencies = [ + "cc", + "downcast-rs", + "rustix 1.1.5", + "scoped-tls", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073" +dependencies = [ + "bitflags 2.13.2", + "rustix 1.1.5", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.13.2", + "cursor-icon", + "wayland-backend", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a52d18780be9b1314328a3de5f930b73d2200112e3849ca6cb11822793fb34d" +dependencies = [ + "rustix 1.1.5", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.32.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb04e52f7836d7c7976c78ca0250d61e33873c34156a2a1fc9474828ec268234" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "338e30461b3a2b67d70eb30a6d89f8e0c93a833e07d2ae89085cd070c4a00ac0" +dependencies = [ + "proc-macro2", + "quick-xml", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8eab23fefc9e41f8e841df4a9c707e8a8c4ed26e944ef69297184de2785e3be" +dependencies = [ + "dlib", + "log", + "once_cell", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88261b9deccee56594c11a3460c462c41f58d148598fe70ad77070126a68aba4" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wgpu" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527ccdf43dd5b2e8676eed9984ce00e2bbb0a1b85b70c1969dcb6cd2eb55ab9e" +dependencies = [ + "arrayvec", + "bitflags 2.13.2", + "bytemuck", + "cfg-if", + "cfg_aliases", + "document-features", + "hashbrown 0.17.1", + "js-sys", + "log", + "parking_lot", + "portable-atomic", + "profiling", + "raw-window-handle", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-core" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c018fce9b6270aa203c2fdd56f3cce996713534bd757e4ea58c8560b121f14" +dependencies = [ + "arrayvec", + "bit-set", + "bit-vec", + "bitflags 2.13.2", + "bytemuck", + "cfg_aliases", + "document-features", + "hashbrown 0.17.1", + "indexmap", + "log", + "naga", + "naga-types", + "once_cell", + "parking_lot", + "portable-atomic", + "profiling", + "raw-window-handle", + "rustc-hash", + "smallvec", + "thiserror 2.0.21", + "wgpu-core-deps-apple", + "wgpu-core-deps-windows-linux-android", + "wgpu-hal", + "wgpu-naga-bridge", + "wgpu-types", +] + +[[package]] +name = "wgpu-core-deps-apple" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "061f3d319a40d39d00b1ecc2c33b89fe21d4e6fe01859df3500a3a8ecccd6b68" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-windows-linux-android" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7586165fd5f6d881cb9ce4bb71f40d6caab2c0f1837e3fc1d9788a197fb6004f" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-hal" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b7fb58561a792bc237628ba0792e332de418fefe145f13b5ed8201e6d52f58" +dependencies = [ + "android_system_properties", + "arrayvec", + "ash", + "bitflags 2.13.2", + "block2 0.6.2", + "bytemuck", + "cfg-if", + "cfg_aliases", + "gpu-allocator", + "hashbrown 0.17.1", + "libc", + "libloading", + "log", + "naga", + "naga-types", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "objc2-metal 0.3.2", + "objc2-quartz-core 0.3.2", + "ordered-float", + "parking_lot", + "portable-atomic", + "portable-atomic-util", + "profiling", + "raw-window-handle", + "raw-window-metal", + "renderdoc-sys", + "smallvec", + "static_assertions", + "thiserror 2.0.21", + "wgpu-naga-bridge", + "wgpu-types", + "windows 0.62.2", +] + +[[package]] +name = "wgpu-naga-bridge" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f62e73117bb7a62bfd9c5a5841438a823f6566c6442a808ee269d2d055c081" +dependencies = [ + "naga", + "wgpu-types", +] + +[[package]] +name = "wgpu-types" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99dad6f1fbdbbdb4c278a6508b059d44688f5cebddf78d005a46a31340269286" +dependencies = [ + "bitflags 2.13.2", + "bytemuck", + "js-sys", + "log", + "naga-types", + "raw-window-handle", + "static_assertions", + "web-sys", +] + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "windows" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" +dependencies = [ + "windows-core 0.54.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" +dependencies = [ + "windows-collections", + "windows-core 0.62.2", + "windows-future", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" +dependencies = [ + "windows-core 0.62.2", +] + +[[package]] +name = "windows-core" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" +dependencies = [ + "windows-result 0.1.2", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result 0.4.1", + "windows-strings", +] + +[[package]] +name = "windows-future" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" +dependencies = [ + "windows-core 0.62.2", + "windows-link", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" +dependencies = [ + "windows-core 0.62.2", + "windows-link", +] + +[[package]] +name = "windows-result" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winit" +version = "0.30.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6755fa58a9f8350bd1e472d4c3fcc25f824ec358933bba33306d0b63df5978d" +dependencies = [ + "ahash", + "android-activity", + "atomic-waker", + "bitflags 2.13.2", + "block2 0.5.1", + "bytemuck", + "calloop", + "cfg_aliases", + "concurrent-queue", + "core-foundation", + "core-graphics", + "cursor-icon", + "dpi", + "js-sys", + "libc", + "memmap2", + "ndk", + "objc2 0.5.3", + "objc2-app-kit", + "objc2-foundation 0.2.2", + "objc2-ui-kit", + "orbclient", + "percent-encoding", + "pin-project", + "raw-window-handle", + "redox_syscall 0.4.1", + "rustix 0.38.44", + "sctk-adwaita", + "smithay-client-toolkit", + "smol_str", + "tracing", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.52.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + +[[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "x11rb" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading", + "once_cell", + "rustix 1.1.5", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" + +[[package]] +name = "xcursor" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "163b33ed8786455e2fa5d72f554057ce3f3182425434f756cd39c99839d88e23" + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.13.2", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + +[[package]] +name = "xxhash-rust" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "550a2b930b62486a393c52d5c3b84bff264b28aa437ed64694d31e93b1757af7" + +[[package]] +name = "zerocopy" +version = "0.8.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6400fc4bb7426f6faac3fb07566122bb18622e3022bd2c36426a92ed489b1dbe" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99c27cc7525bad4df59a45e073c45b2c2aa820efb588234cc23a547ec69a34db" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zlib-rs" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112" + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/Cargo.toml b/Cargo.toml index 26510443b..aca7bb21d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["crates/voxel-kernels"] +members = ["crates/horizon-core", "crates/horizon-world", "crates/voxel-kernels", "crates/horizon-client", "crates/horizon-assets"] resolver = "2" [workspace.package] @@ -10,3 +10,10 @@ rust-version = "1.85" [profile.release] lto = "thin" codegen-units = 1 + +# Optimized but quick-to-link builds for iteration: cargo build --profile fast +[profile.fast] +inherits = "release" +lto = false +codegen-units = 16 +incremental = true diff --git a/README.md b/README.md index ff1eb8ebc..e5067393a 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,54 @@ # Horizon -Client-first performance research for Minecraft Java **26.3**, preserving vanilla gameplay rules. Any language or renderer may be used when measured gains justify it. Not affiliated with Mojang or Microsoft. +Horizon is a Rust rewrite of Minecraft Java **26.3** targeting one-to-one vanilla gameplay parity, alongside client performance research. Not affiliated with Mojang or Microsoft. -**First playable release:** pinned Java performance packs, distant terrain, an original frame/tick recorder, and Mac/client/server starter downloads. The M2 Pro/16 GB Mac is the first testing target. A Rust rewrite or custom renderer has not been completed; no M2 FPS improvement has been measured yet. +**The Rust game is now playable.** The [native client](docs/native-client.md) opens on a vanilla-style title screen with world creation and selection, and generates worlds with the Rust port of the vanilla overworld generator: noise terrain, aquifers, surface rules, carvers, and the placed features ported so far, all checked against vanilla. It streams and lights chunks on worker threads and renders every vanilla block model with smooth lighting, biome tints, the vanilla sky, sun, moon, stars and clouds. Gameplay so far: +- validated player physics, health and hunger; +- mining with vanilla tool rules and loot tables; +- placing, crafting, chests and furnaces; +- dropped items and particles; +- sounds; +- passive and hostile mobs with combat; +- Anvil saves. -## Play on your Mac +Parity is **not** complete. Still missing: multiplayer, the End, most structures (jigsaw starts and five piece-based structures exist), about half the placed features (127 of 273 are skipped), most mob types, chat and commands, enchanting, anvils, brewing, smithing and trading, and sapling growth. Fluids, redstone, pistons, crop growth, random and scheduled ticks and the Nether run in the client. See [Rust rewrite status](docs/rust-parity.md). + +### Java parity: 55% + +Each subsystem scores 0 (absent), 0.25 (started, not playable), 0.5 (playable, +major vanilla features missing), 0.75 (playable, mostly complete) or 1 (complete +and verified against vanilla by differential tests). The percentage is the +average; `tests/test_parity.py` keeps it in sync with this table. Last audited +2026-10-08 against the code, not the docs. + +| Subsystem | Score | Main gaps | +| --- | ---: | --- | +| Window, input and game loop | 0.75 | No controls screen or fullscreen toggle | +| Assets and resources | 0.75 | Heuristic item icons; no language files or resource packs | +| Network protocol and multiplayer | 0 | No networking at all | +| Chunk storage and palettes | 0.75 | Client uses plain arrays; palettes only on save | +| Section meshing | 0.75 | Whole-mesh output not compared with vanilla | +| Rendering | 0.5 | Few particles; chest is the only block-entity model; 9 mob models | +| Lighting | 0.75 | Slabs/stairs light wrong; light not saved or tested against vanilla | +| World generation | 0.5 | No End; 127 of 273 placed features skipped; few structures | +| Region files and saves | 0.5 | Mobs, dropped items, scheduled ticks and light not saved | +| Entities and physics | 0.5 | 9 mob types with simple AI | +| Interaction and inventory | 0.5 | No enchanting, anvil, brewing, smithing or trading | +| Menus, HUD and chat | 0.5 | No chat, commands, controls screen or recipe book | +| Audio | 0.5 | No music or ambient sounds | +| Block behaviours and ticking | 0.5 | Saplings never grow; TNT has no fuse; hoppers/dispensers don't move items | + +```sh +python3 tools/prepare_native_client.py --prepare # needs JDK 25; extracts private vanilla resources +python3 tools/fetch_sounds.py # optional: vanilla sounds +cargo run --release -p horizon-client +``` + +**Target machine:** the Rust rewrite targets one machine, **ludodesktop**: Ubuntu 26.04, Intel i7-13700KF, NVIDIA RTX 4080, GNOME on Wayland. The final deliverable is a playable native Linux build validated there. macOS (including the M2 Pro Mac) and Windows are out of scope. Track implementation and acceptance criteria in [Rust rewrite status](docs/rust-parity.md). + +**Java performance packs (no longer developed):** the earlier track of pinned Java performance packs, distant terrain, an original frame/tick recorder and client/server starter downloads. Its releases, including the Mac starter below, stay available, but they are no longer a development target. + +## Java packs: Mac starter (out of scope) Download **horizon-mac-starter-0.21.0.zip** from [Releases](https://github.com/ludovic111/horizon/releases), extract it and open `Mac-Start.command`. It verifies and installs official universal Prism Launcher in `~/Applications` if needed, then opens the balanced pack import. Sign into Microsoft **inside Prism yourself**. This project needs no credentials. @@ -195,6 +239,58 @@ Class-file SourceFile metadata covers inner classes, which often share a source ## Original Rust research +The dependency-free `horizon-core` crate starts the Rust simulation foundation: +integer block/chunk/section positions, legacy and xoroshiro seeded random streams and positional factories, +padded palette-index storage, scheduled block/fluid tick queues, and double-precision +bounding-box and voxel-grid collision geometry. Noise samplers, octave stacks and +bulk density kernels provide the next world-generation foundation. Compiled +density samplers add gradients, shifted and blended terrain noise, distance +metrics and arithmetic evaluation. +Differential runners compare selected +operations with the checksum-pinned vanilla client and server bytecode. +[Implemented scope, validation, and remaining rewrite work](docs/rust-parity.md). + +```sh +python3 tools/test_rust_parity.py --prepare +python3 tools/test_world_parity.py +python3 tools/test_tick_parity.py +python3 tools/test_geometry_parity.py +python3 tools/test_collision_parity.py +python3 tools/test_noise_parity.py +python3 tools/test_density_parity.py +``` + +The core corpus checks 1,634,520 output lines per reference JAR, including +signed boundaries, RNG rejection/state consumption and raw storage words. +Passing it does not establish full gameplay parity or an FPS improvement. +The separate [noise suite](docs/noise-generation.md) checks 26.3 Perlin/simplex, +derivatives, density-volume accumulation, stack composition, normal-noise +normalization and modern/legacy initialization against both reference JARs. +The [density suite](docs/density-functions.md) checks compiled scalar and bulk +evaluation, including nested samplers, their different arithmetic paths, and +selected interval operations used for graph range analysis. + +`horizon-world` adds NBT, four region compression codecs, `.mca`/`.mcc` +reading and export, saved palettes, a version-checked block-state registry, +and packed resident block sections. The world-data suite checks Rust output +with the actual vanilla NBT, region and block-state decoders on both JARs. +It covers all 35,723 exported state IDs and a 100,000-edit section trace. +[World-data commands and validation limits](docs/world-data.md). + +Scheduled ticks now support vanilla ordering, duplicate suppression, save/reload, +chunk eligibility and callback mutations. The tick suite compares 97,776 output +lines per reference JAR and checks saved block/fluid lists through vanilla codecs +and region files. [Scheduler behavior and remaining integration](docs/scheduled-ticks.md). + +Voxel shapes preserve vanilla collision tolerances, greedy box ordering, ray faces, +inside hits, and cube-versus-array cell lookup. A cached collision registry connects +imported shapes to resident block sections while checking exact state identities. +Movement helpers resolve supplied colliders and step-up candidates, including +landing adjustment and the second collider query. Movement-path block visits +preserve vanilla ordering, step indices and packed-position deduplication. +Uncached states require block behavior; the entity-context overload also needs +separate implementation. [Geometry and collision scope](docs/collision-geometry.md). + ```sh cargo test --workspace cargo run --release --bin voxel-bench -- 100 > .local/voxel-benchmark.csv @@ -202,6 +298,11 @@ cargo run --release --bin voxel-bench -- 100 > .local/voxel-benchmark.csv The dependency-free occupancy experiment compares scalar and bitset exposed-face counting for synthetic 16³ sections. It has no real mesh, material/AO/light work, neighboring-section context, JNI bridge or game integration. Speedups are kernel-only, not Minecraft FPS. [Research plan](docs/optimization-plan.md) describes profiling, improved Java baselines, native integration and behavior checks before expanding scope. +Public branding and new mod downloads use **Horizon**. The existing Fabric mod +ID and `dev.horizonlab` namespace remain stable for installed instances and +measurement compatibility. The installer backs up both old `horizon-lab-*.jar` +and new `horizon-*.jar` versions before installing an update. + ## Validation and ownership ```sh @@ -214,7 +315,7 @@ python3 tools/check_public_tree.py python3 tools/check_public_tree.py --history ``` -CI checks offline tools/Rust and compiles the original mod/builds packs on Linux, Windows and Apple Silicon macOS. Game dependencies download to ephemeral `.local/`; CI uploads only our original JAR and packs. Compilation is not Mac GPU gameplay testing. Publication checks allow Java only under our original `dev/horizonlab` namespace; review diffs as well. +CI checks offline tools/Rust and compiles the original mod/builds packs on Linux and Apple Silicon macOS. Game dependencies download to ephemeral `.local/`; CI uploads only our original JAR and packs. Compilation is not Mac GPU gameplay testing. Publication checks allow Java only under our original `dev/horizonlab` namespace; review diffs as well. [MIT](LICENSE) covers only our original tracked work. Dependencies retain their licenses. Mojang [removed obfuscation](https://www.minecraft.net/en-us/article/removing-obfuscation-in-java-edition) without changing [Minecraft's EULA](https://www.minecraft.net/en-us/eula). Decompiled game source remains local; published code implements independent tooling and instrumentation. diff --git a/benchmarks/rust-active-effect-tick-2026-10-07/scoped-parity.json b/benchmarks/rust-active-effect-tick-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..95b71795f --- /dev/null +++ b/benchmarks/rust-active-effect-tick-2026-10-07/scoped-parity.json @@ -0,0 +1,299 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 4036, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaActiveEffectTickOracle.java": "34db99bcb0190ad7aebdc2c2b4e26c4853343e43de23febf26f30248f2aceaac", + "tools/test_active_effect_tick_parity.py": "e0871a217b7af371d1eb104d10c0e2e04864890c568d0ebc3f852ea7d09b7c0f", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "1788f48f7f88463ced734af0bb02610cd7a991d5a6bdeaa2f9f198a4b7312c2a", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "60e2a3cb655c5e6dacafb0f6355ec8d7c8580b3b0e322615acbf4b5b9c06b657", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/active_effect_tick_fixture.rs": "243811dae9d40ce062afd26564125ad06c431a799d19b618e0d0db5340ce9153" + }, + "fixtures_sha256": { + ".local/rust-active-effect-tick-parity/inputs.txt": "9856f0340d403d38a530563f6195ac2a71440564b383238e185fa864985282dd", + ".local/rust-active-effect-tick-parity/inputs-client.txt": "92124cc0ae75c2a886acdca055350827bbd539a19c656d6bca5eeae516039ce0", + ".local/rust-active-effect-tick-parity/inputs-server.txt": "9d09603803169cafe1985dff5f07494059ba9be7a2ef3ed51bc02d421e7d0532" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "8a5c57f03b84499e636e13502e88e205b2f88a64052a484ce81ce85b173b78cf", + "rust_output_sha256": "8a5c57f03b84499e636e13502e88e205b2f88a64052a484ce81ce85b173b78cf", + "matched_output_lines": 1732406 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "1b57c55f0645d4d3c74386c06319da11f391ccc8cf549fdd7e7134eb7b013de4", + "rust_output_sha256": "1b57c55f0645d4d3c74386c06319da11f391ccc8cf549fdd7e7134eb7b013de4", + "matched_output_lines": 1732849 + } + ], + "scope": "Inherited LivingEntity.tickEffects composed with actual MobEffectInstance ticks, active-effect HashMaps, native synced particle/ambience data and both RNG kinds. Includes removal/refresh ordering, shared hidden restoration, nonstructural replacements, structural mutations, concurrent-modification catch boundaries, client blending, particle selection and RNG tails. Selected raw instance fields and callbacks can mutate during execution. Level classes are controlled ServerLevel and non-ServerLevel implementations; random particle positions, registered effect behavior and notification side effects remain controlled. Holder identity hashes are exported per reference run. Complete entity/player lifecycle and gameplay remain pending." +} diff --git a/benchmarks/rust-active-effects-2026-10-07/scoped-parity.json b/benchmarks/rust-active-effects-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..1fabbddc3 --- /dev/null +++ b/benchmarks/rust-active-effects-2026-10-07/scoped-parity.json @@ -0,0 +1,297 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 1266, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaActiveEffectsOracle.java": "bcc25f5a4f0b55baace3ad6770cb31d8933fc26b88adac38e877f6c4e9d8ce22", + "tools/test_active_effects_parity.py": "e5f922e255e0d81fc300293e77b5c7d1f415add455e010293d450e4a45038e5c", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effects.rs": "1788f48f7f88463ced734af0bb02610cd7a991d5a6bdeaa2f9f198a4b7312c2a", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "df390bb99d2d4fd3c8b0c3b5b7c973e72b1bb9db4af22daec20e4c60af9ffcf8", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/active_effects_fixture.rs": "24f75a9a950bad0dcf73689ffc6f64d4d2731da0927afa3ee3cd5505a357b0db" + }, + "fixtures_sha256": { + ".local/rust-active-effects-parity/inputs.txt": "dd5a92bc343172e9462af55cbc4d12268bce4b23798a28395dd1e9a92accb140", + ".local/rust-active-effects-parity/inputs-client.txt": "2867a9566bbddb74725e08cd247f3672e7179ba534d8eec534aa89d11aeaf128", + ".local/rust-active-effects-parity/inputs-server.txt": "2a0a8f7334139a9213647fd529a70dcbd3d087ab7663d65d356199047058f62a" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "f9797d33e8f6ad17a3948d38a26e314825f8627cc5ba0ebc610c2fe05caeaf9f", + "rust_output_sha256": "f9797d33e8f6ad17a3948d38a26e314825f8627cc5ba0ebc610c2fe05caeaf9f", + "matched_output_lines": 535063 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "cb4348bb05a885c26506c1a6030cb2c64f0ff3cfccbb095ffe8d24ec1a7b2677", + "rust_output_sha256": "cb4348bb05a885c26506c1a6030cb2c64f0ff3cfccbb095ffe8d24ec1a7b2677", + "matched_output_lines": 535063 + } + ], + "scope": "Inherited LivingEntity addEffect, forceAddEffect, removeEffect/NoUpdate, removeAllEffects, queries and blend lookup with actual status instances and JDK maps. Native holder hash and identity-hash values are captured for Rust per run. Compares callback ordering, fresh versus existing instances, hidden updates, blend transfer, source identity, incoming effect lifecycle hooks, map-copy removal order and mutation/failure prefixes. Eligibility, attribute/packet side effects and registered effect behavior remain controlled; complete entity lifecycle and gameplay remain pending." +} diff --git a/benchmarks/rust-anchor-2026-10-06/scoped-parity.json b/benchmarks/rust-anchor-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..344423502 --- /dev/null +++ b/benchmarks/rust-anchor-2026-10-06/scoped-parity.json @@ -0,0 +1,118 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 192, + "codec_inputs": 74112, + "runtime_anchors": 107328, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAnchorOracle.java": "226628d98b89aadbdd374936575d033945e7064a900dbb050c662204dbc7e119", + "tools/test_anchor_parity.py": "6f394f5cc236fc6ca96bfa526b09ac3009fd90b1db997ff1aed059b51170437a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "3968e2a337a6a23226c485057c79359e66df16683f00fb4ebc9fabb03910a015", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry.rs": "f46065659e60eb5e84ad69b9f3b5e94dc87ee19de16408817e26f23d16b6c7e7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "134cf93b53a40fb1ed0e0170c90316c80e270773b2968c63dc3f9cef2c941bff", + "crates/horizon-world/src/worldgen.rs": "e1e815997cfef573c36d7814582fe28086456488be3d87708dbfd94740cf04fd", + "crates/horizon-world/examples/anchor_fixture.rs": "ff824b3b85d09881217c8bdb5219d602099cad21b6efdd180e6c8e3149337b31" + }, + "fixtures_sha256": { + ".local/rust-anchor-parity/inputs.txt": "cc495eb8aca212c1768c882a309052cf4612664570a208082d08ea83f7e8ee60" + }, + "rust_output_sha256": "e48ad3177f302e687ece755cc8933f76ca610ac1e9cba00c0e919431f75cd19b", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "e48ad3177f302e687ece755cc8933f76ca610ac1e9cba00c0e919431f75cd19b", + "matched_output_lines": 181632 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e48ad3177f302e687ece755cc8933f76ca610ac1e9cba00c0e919431f75cd19b", + "matched_output_lines": 181632 + } + ], + "scope": "Actual VerticalAnchor.CODEC parsing and encoding, all four anchor kinds, constant helpers, runtime integer overflow and unrestricted constructor values. WorldGenerationContext.of uses a LevelAccessor proxy with verified method calls; the generator constructor uses a native NoiseBasedChunkGenerator with supplied minimum, height and sea level. Strict JSON transport covers range limits, numeric truncation/wrapping, null/wrong field types, duplicate fields and nested exclusive alternatives. Level access outside the three queried values, JSON syntax diagnostics and complete material conditions remain pending." +} diff --git a/benchmarks/rust-attribute-health-2026-10-07/scoped-parity.json b/benchmarks/rust-attribute-health-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..5de4a377d --- /dev/null +++ b/benchmarks/rust-attribute-health-2026-10-07/scoped-parity.json @@ -0,0 +1,248 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 3918, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeHealthOracle.java": "0ee2907d85c91895cfd6460de225326e77e30658785be4b3f2737ac4b8edb38e", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "tools/test_attribute_health_parity.py": "4429f469afccc812ce9ab1556366266ec9920f7595fd60b52e0f66933754afcd", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "d165e952e0ff2d1a1b037c03df5fbc778b7e263b8f9e402cf9b0fa27c933e0c6", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "2702d60f7bf8f8d5f9421d5d4c645d7d748271f8dea12e5ec0e457b3a3f1becf", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/attribute_health_fixture.rs": "53168e1135a337fa29eade20892f84ffd4458ad38fc90df2e8382169fe4db020" + }, + "fixtures_sha256": { + ".local/rust-attribute-health-parity/inputs.txt": "36ab827ee17f1452f7e88cfe26dbe368e5348da25ab6b6905f7a1b62fcfa5b7c", + ".local/rust-attribute-health-parity/catalog.json": "d1e488e4f432888beb9f643904c8bca242d1e2093f53e23e07da305d70cf7106" + }, + "rust_output_sha256": "4f7248d8f06aac71b0de827b26a3e3cfa0920a1181cc92dc9e06257d1c6e783e", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "4f7248d8f06aac71b0de827b26a3e3cfa0920a1181cc92dc9e06257d1c6e783e", + "matched_output_lines": 666082 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "4f7248d8f06aac71b0de827b26a3e3cfa0920a1181cc92dc9e06257d1c6e783e", + "matched_output_lines": 666082 + } + ], + "scope": "Registered entity AttributeMap defaults/modifiers composed with actual LivingEntity/Player health methods, SynchedEntityData float health and FoodData regeneration. All 93 default suppliers; attribute mutations, health limits, actual healing and dirty state, hunger/exhaustion/timers, observer failures and starvation requests. Internal absorption storage and starvation damage delivery are controlled; Player absorption synchronization, attribute-change refresh, full damage and live gameplay remain pending." +} diff --git a/benchmarks/rust-attribute-map-queries-2026-10-07/scoped-parity.json b/benchmarks/rust-attribute-map-queries-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..096656bdc --- /dev/null +++ b/benchmarks/rust-attribute-map-queries-2026-10-07/scoped-parity.json @@ -0,0 +1,313 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 3261, + "fastutil_sha256": { + ".local/minecraft/26.3/libraries/server/it/unimi/dsi/fastutil/8.5.18/fastutil-8.5.18.jar": "9094ae67d01d0ad246f886f11ad557fc2e79c72cbf3feed83e1512a8ae90a74a" + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeMapQueriesOracle.java": "e81e83a49b136056f5c922432e20e3675d017b8bb726f73fc1a8598c7e8d383a", + "tools/test_attribute_map_queries_parity.py": "630685894582c1e009e6eeb865d74e3d32f6311e2f396cb4d36e4b3c4c03b6d5", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "1c4256a2c6858b9e9e34466b684839b7cc8b4d18c3ee4a6edd20b413349ffa32", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/attribute_map_queries_fixture.rs": "573975c0992d97359c2e74cf5f4cb7cfb199d48eebf3a68eec6d16ca67c9e6e6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredEffectAttributesOracle.java": "be47915cf63cbbac82b9506d9bd59636714a550a58ef3924b0be3d48999f432a", + "crates/horizon-world/examples/stored_effect_attributes_fixture.rs": "25d03a5c31d7e1679456d852244c3b40a186b9d5140a2bac3944eba9f37b1d35", + "tools/test_stored_effect_attributes_parity.py": "1e2841cc9eba5421d9abfd04b462c0df43496de61a9877591daddf05ec0fe29e", + "tools/test_stored_effect_notifications_parity.py": "6f1e9fc7f7a6e722e20349ba0e04562608e6027d73a92cf34e21e9786f698a0e" + }, + "fixtures_sha256": { + ".local/rust-attribute-map-queries-parity/inputs.txt": "08e308d3dd09d0f734417d6a8abf0135a60bba339506c51dfea4266773d44edb", + ".local/rust-attribute-map-queries-parity/inputs-client.txt": "6ed46e9636bc9351ba0857e9e4b95a358580eccc2dfaacbe0382819028c032b1", + ".local/rust-attribute-map-queries-parity/inputs-server.txt": "6ed46e9636bc9351ba0857e9e4b95a358580eccc2dfaacbe0382819028c032b1" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "ed5ae51485e40d992db178460f6993652e2d3a57c028199d10fd2aea3c41afb8", + "matched_output_lines": 34531715, + "rust_output_sha256": "ed5ae51485e40d992db178460f6993652e2d3a57c028199d10fd2aea3c41afb8" + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "ed5ae51485e40d992db178460f6993652e2d3a57c028199d10fd2aea3c41afb8", + "matched_output_lines": 34531715, + "rust_output_sha256": "ed5ae51485e40d992db178460f6993652e2d3a57c028199d10fd2aea3c41afb8" + } + ], + "scope": "Actual AttributeMap hasAttribute/hasModifier/getValue/getBaseValue/getModifierValue/resetBaseValue using real cached AttributeInstances and mutable AttributeSupplier prototypes. Includes entire stored-notification corpus and checks no lazy creation on query/reset, supplier versus instance cache updates, modifier identity and missing-value exception categories, lookup aliasing/null mappings, captured reset instance, supplier base/modifier changes and dirty callback failure. Basic attribute default/syncability and entity onAttributeUpdated bodies remain controlled; registered ranged definitions, combined health/dimension consequences, full gameplay and platform builds remain pending." +} diff --git a/benchmarks/rust-attribute-memory-2026-10-07/after.json b/benchmarks/rust-attribute-memory-2026-10-07/after.json new file mode 100644 index 000000000..16672b1d9 --- /dev/null +++ b/benchmarks/rust-attribute-memory-2026-10-07/after.json @@ -0,0 +1,76 @@ +{ + "schema": 1, + "phase": "after", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "catalog_sha256": "d1e488e4f432888beb9f643904c8bca242d1e2093f53e23e07da305d70cf7106", + "sources_sha256": { + "tools/measure_attribute_memory.py": "30920696fdc0868f109b8c6863132810e56297ce9d9af8b917d8d45506fb9620", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/examples/attribute_memory.rs": "29c0944f0a687369eb012f441c7b7f69eac95658be062bf742470f94b2ef6cd8" + }, + "results": [ + { + "mode": "defaults", + "entities": 20000, + "active_per_entity": 0, + "samples_kib": [ + { + "VmRSS": 12852, + "VmHWM": 12852 + }, + { + "VmRSS": 12852, + "VmHWM": 12852 + }, + { + "VmRSS": 12848, + "VmHWM": 12848 + }, + { + "VmRSS": 12840, + "VmHWM": 12840 + }, + { + "VmRSS": 12804, + "VmHWM": 12804 + } + ], + "median_rss_kib": 12848, + "median_peak_kib": 12848 + }, + { + "mode": "active", + "entities": 20000, + "active_per_entity": 4, + "samples_kib": [ + { + "VmRSS": 29076, + "VmHWM": 29076 + }, + { + "VmRSS": 29068, + "VmHWM": 29068 + }, + { + "VmRSS": 29096, + "VmHWM": 29096 + }, + { + "VmRSS": 29092, + "VmHWM": 29092 + }, + { + "VmRSS": 29028, + "VmHWM": 29028 + } + ], + "median_rss_kib": 29076, + "median_peak_kib": 29076 + } + ], + "scope": "Five fresh release-process samples per case, 20,000 held-live zombie attribute maps, no instances or four instantiated attributes. RSS/peak includes allocator/runtime/catalog. Identical health-read checksum. Excludes the rest of entity/world state; no timing, rendering or FPS conclusion." +} diff --git a/benchmarks/rust-attribute-memory-2026-10-07/before.json b/benchmarks/rust-attribute-memory-2026-10-07/before.json new file mode 100644 index 000000000..6f4ea2019 --- /dev/null +++ b/benchmarks/rust-attribute-memory-2026-10-07/before.json @@ -0,0 +1,76 @@ +{ + "schema": 1, + "phase": "before", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "catalog_sha256": "d1e488e4f432888beb9f643904c8bca242d1e2093f53e23e07da305d70cf7106", + "sources_sha256": { + "tools/measure_attribute_memory.py": "30920696fdc0868f109b8c6863132810e56297ce9d9af8b917d8d45506fb9620", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/src/attributes/entity.rs": "d165e952e0ff2d1a1b037c03df5fbc778b7e263b8f9e402cf9b0fa27c933e0c6", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/examples/attribute_memory.rs": "29c0944f0a687369eb012f441c7b7f69eac95658be062bf742470f94b2ef6cd8" + }, + "results": [ + { + "mode": "defaults", + "entities": 20000, + "active_per_entity": 0, + "samples_kib": [ + { + "VmRSS": 175824, + "VmHWM": 175824 + }, + { + "VmRSS": 175820, + "VmHWM": 175820 + }, + { + "VmRSS": 175816, + "VmHWM": 175816 + }, + { + "VmRSS": 175812, + "VmHWM": 175812 + }, + { + "VmRSS": 175820, + "VmHWM": 175820 + } + ], + "median_rss_kib": 175820, + "median_peak_kib": 175820 + }, + { + "mode": "active", + "entities": 20000, + "active_per_entity": 4, + "samples_kib": [ + { + "VmRSS": 175788, + "VmHWM": 175788 + }, + { + "VmRSS": 175824, + "VmHWM": 175824 + }, + { + "VmRSS": 175816, + "VmHWM": 175816 + }, + { + "VmRSS": 175800, + "VmHWM": 175800 + }, + { + "VmRSS": 175780, + "VmHWM": 175780 + } + ], + "median_rss_kib": 175800, + "median_peak_kib": 175800 + } + ], + "scope": "Five fresh release-process samples per case, 20,000 held-live zombie attribute maps, no instances or four instantiated attributes. RSS/peak includes allocator/runtime/catalog. Identical health-read checksum. Excludes the rest of entity/world state; no timing, rendering or FPS conclusion." +} diff --git a/benchmarks/rust-attribute-memory-2026-10-07/entity-regression.json b/benchmarks/rust-attribute-memory-2026-10-07/entity-regression.json new file mode 100644 index 000000000..b6d36fa41 --- /dev/null +++ b/benchmarks/rust-attribute-memory-2026-10-07/entity-regression.json @@ -0,0 +1,247 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 4720, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "tools/test_entity_attribute_parity.py": "cdd15835061eb2ed8d1fbbbf77cf515ec7515b7ff129a3deaf403142ce9caead", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "2702d60f7bf8f8d5f9421d5d4c645d7d748271f8dea12e5ec0e457b3a3f1becf", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/entity_attribute_fixture.rs": "f6512186478dc1de5e5b983d81aa23f3834e85875f9fa9bec0b9967117deff95" + }, + "fixtures_sha256": { + ".local/rust-entity-attribute-parity/inputs.txt": "9a45638fedc1b8a70d247acc64dc5b06fa3e2ec550fc4a65d89173fabdd0e886", + ".local/rust-entity-attribute-parity/catalog.json": "d1e488e4f432888beb9f643904c8bca242d1e2093f53e23e07da305d70cf7106" + }, + "rust_output_sha256": "dafe9dce265957c9cafe59a6b830a68fd23a2c2e2d8de3df215ce38252ae0100", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "dafe9dce265957c9cafe59a6b830a68fd23a2c2e2d8de3df215ce38252ae0100", + "matched_output_lines": 1771555 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "dafe9dce265957c9cafe59a6b830a68fd23a2c2e2d8de3df215ce38252ae0100", + "matched_output_lines": 1771555 + } + ], + "scope": "Every registered attribute and entity DefaultAttributes supplier, actual AttributeMap per-attribute queries, lazy creation, mutation, base reset, update/sync membership and independent acknowledgements. Composes the verified attribute arithmetic/cache/modifier engine. Cross-attribute collection order is normalized to registry order; bulk assignment, custom suppliers with modifiers, save/network codecs, live entities and full gameplay remain pending." +} diff --git a/benchmarks/rust-attribute-memory-2026-10-07/health-regression.json b/benchmarks/rust-attribute-memory-2026-10-07/health-regression.json new file mode 100644 index 000000000..9e06a4a0f --- /dev/null +++ b/benchmarks/rust-attribute-memory-2026-10-07/health-regression.json @@ -0,0 +1,248 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 3918, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeHealthOracle.java": "0ee2907d85c91895cfd6460de225326e77e30658785be4b3f2737ac4b8edb38e", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "tools/test_attribute_health_parity.py": "4429f469afccc812ce9ab1556366266ec9920f7595fd60b52e0f66933754afcd", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "2702d60f7bf8f8d5f9421d5d4c645d7d748271f8dea12e5ec0e457b3a3f1becf", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/attribute_health_fixture.rs": "53168e1135a337fa29eade20892f84ffd4458ad38fc90df2e8382169fe4db020" + }, + "fixtures_sha256": { + ".local/rust-attribute-health-parity/inputs.txt": "36ab827ee17f1452f7e88cfe26dbe368e5348da25ab6b6905f7a1b62fcfa5b7c", + ".local/rust-attribute-health-parity/catalog.json": "d1e488e4f432888beb9f643904c8bca242d1e2093f53e23e07da305d70cf7106" + }, + "rust_output_sha256": "4f7248d8f06aac71b0de827b26a3e3cfa0920a1181cc92dc9e06257d1c6e783e", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "4f7248d8f06aac71b0de827b26a3e3cfa0920a1181cc92dc9e06257d1c6e783e", + "matched_output_lines": 666082 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "4f7248d8f06aac71b0de827b26a3e3cfa0920a1181cc92dc9e06257d1c6e783e", + "matched_output_lines": 666082 + } + ], + "scope": "Registered entity AttributeMap defaults/modifiers composed with actual LivingEntity/Player health methods, SynchedEntityData float health and FoodData regeneration. All 93 default suppliers; attribute mutations, health limits, actual healing and dirty state, hunger/exhaustion/timers, observer failures and starvation requests. Internal absorption storage and starvation damage delivery are controlled; Player absorption synchronization, attribute-change refresh, full damage and live gameplay remain pending." +} diff --git a/benchmarks/rust-attribute-updates-2026-10-07/scoped-parity.json b/benchmarks/rust-attribute-updates-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..9ba2f7a82 --- /dev/null +++ b/benchmarks/rust-attribute-updates-2026-10-07/scoped-parity.json @@ -0,0 +1,303 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 6836, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeUpdatesOracle.java": "7f03516b12b47ae7d65898c01565323dd7085791d8b4ecd1ac746e03435e4538", + "tools/test_attribute_updates_parity.py": "837d8a8bd0b373bae9bfd5bc78cbb27f7100f6cacce749d2c5d79b36fe492aa4", + "tools/test_effect_notifications_parity.py": "ceea3baa62e5e4a5a73e932cb33d9062467d8ddd57558c989a93aa283530bb58", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "ba65ff859b662dbbfa6f3243dd0f31c5f8e0ec2e2677bfead6f17eb50b06d69f", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/attribute_updates_fixture.rs": "51fee5271a77066f3e9a0dc7afc7f3b1b01210deeecc6a28680b991bc20d8543" + }, + "fixtures_sha256": { + ".local/rust-attribute-updates-parity/inputs.txt": "d58c62334e14f9e8770d551bd1d5fd3ae7583ce20bf4da3844ba475b4ffb56fa", + ".local/rust-attribute-updates-parity/inputs-client.txt": "846fcc9ff4a84ddf6d2d0ebf5200771032caa0719e64c26adbd812e8735ef63d", + ".local/rust-attribute-updates-parity/inputs-server.txt": "846fcc9ff4a84ddf6d2d0ebf5200771032caa0719e64c26adbd812e8735ef63d" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "22d74ec64fa146cd806175f8e1c97247e2c053ac64f7c2efc04a74b042882b36", + "rust_output_sha256": "22d74ec64fa146cd806175f8e1c97247e2c053ac64f7c2efc04a74b042882b36", + "matched_output_lines": 3111429 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "22d74ec64fa146cd806175f8e1c97247e2c053ac64f7c2efc04a74b042882b36", + "rust_output_sha256": "22d74ec64fa146cd806175f8e1c97247e2c053ac64f7c2efc04a74b042882b36", + "matched_output_lines": 3111429 + } + ], + "scope": "Inherited LivingEntity.onAttributeUpdated composed with native effect notifications, pending sets and synchronized health storage. Includes max-health and max-absorption lowering, repeated maximum reads, Float dirty callbacks, dimension refresh dispatch, server waypoint manager selection, direct attribute-map field capture and positive-range tracking. Tests finite/nonfinite numeric values, callback mutation/failure prefixes and packet notifications. Actual attribute values, dimension rebuild and waypoint-manager internals remain controlled; registered modifier bodies and complete player/entity gameplay remain pending." +} diff --git a/benchmarks/rust-attributes-2026-10-07/scoped-parity.json b/benchmarks/rust-attributes-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..3d0c8d795 --- /dev/null +++ b/benchmarks/rust-attributes-2026-10-07/scoped-parity.json @@ -0,0 +1,242 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 2391, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeOracle.java": "90bd04bb58742b9da097bca9cb8bffe164222d18e07adf900755404ce4742c30", + "tools/test_attribute_parity.py": "96433819ea8f1de3344e79bc0521315b1657508ebedb21678918d40f1bbc2fb0", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attributes/mod.rs": "42f1dd4c96d288ad2067fd4024d16f045284a7fe1c66351a8ee6322e5e236a12", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "172ecf965d8ccbe16ed89e8ad1471cf384e2609ab3ca25f309456e726a4d6857", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/attribute_fixture.rs": "b3d25fe70798226cd1dae3efffacb128e019baf505b062de5f01a05a97ed60d0" + }, + "fixtures_sha256": { + ".local/rust-attribute-parity/inputs.txt": "95140374036edd0921d62f633742fed7824b81a6d86cb3a9236a9821e6b7865f", + ".local/rust-attribute-parity/attributes.json": "f65511fdc672dc291a412f7bed816bf1d8dc597fde8466efd95622e028bf8783" + }, + "rust_output_sha256": "223dc3b3155ba637b05757f07fac51cf30138caf66321a056c31ef4fc1da167c", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "223dc3b3155ba637b05757f07fac51cf30138caf66321a056c31ef4fc1da167c", + "matched_output_lines": 1404798 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "223dc3b3155ba637b05757f07fac51cf30138caf66321a056c31ef4fc1da167c", + "matched_output_lines": 1404798 + } + ], + "scope": "Actual AttributeInstance and basic/ranged attributes, with every registered attribute definition. Native modifier identity, global/permanent insertion order, per-operation fastutil hash iteration/rehashing, cache/dirty callbacks, partial writes on observer failure, transient operation changes, duplicate rejection, bulk removal, replacement (including self), pack and merging apply. Includes nonfinite/signed-zero arithmetic, collision clusters and seeded operation sequences. Attribute registry/entity/equipment integration and packed data/network codecs remain pending." +} diff --git a/benchmarks/rust-bamboo-2026-10-06/scoped-parity.json b/benchmarks/rust-bamboo-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..1f337d87d --- /dev/null +++ b/benchmarks/rust-bamboo-2026-10-06/scoped-parity.json @@ -0,0 +1,214 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 144452, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "311c073113f67aaa85e492ea0ec61cd57e40e5f035ec45331759318ada35892e", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "e871d3a01f15616a98ca9227c27a81e4d17e2d57ac4e68a5650a70fa29811497", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_bamboo_parity.py": "9fb99189bb3264cbd28c94f3a7dd5430acbccafb9b49e9ecf1d712d86b82d005", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "5ce5c6eaa5f8a2557a620e533788217b1eb430654801dcf6135d6c92d7a012ac", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "bfd3c21cddf130ebafc7041cadb8a6db3180cf9cd9c74457def8cdb8931ac484", + "crates/horizon-world/src/worldgen/feature_region.rs": "79e8ce343b0dc80dceb8b214c818b383d9b110540bb8c3b0ac32863a7800e288", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "dc3f07719dac53c5ceab6635598c010ccc93db0b149970894407bf9b713946e7", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "6e1d10aeee1776013db06e0768b51591064484decefeabf8f4721a7512cb1808", + "crates/horizon-world/examples/simple_block_fixture.rs": "2943f7a5b9af96eb2a63b7dfd857051faeffd7cea15df30711094cb281a32a67" + }, + "fixtures_sha256": { + ".local/rust-bamboo-parity/inputs.txt": "70a4b16ad5f5c2c9a59e940e43ffd90d799e38c620c0da3a91b1b94018d905c3", + ".local/rust-bamboo-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-bamboo-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-bamboo-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-bamboo-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-bamboo-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-bamboo-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-bamboo-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-bamboo-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-bamboo-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-bamboo-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-bamboo-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-bamboo-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-bamboo-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-bamboo-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-bamboo-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-bamboo-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "34664ee037a753f00002f68ac8fa6199d5e9540806a34614be11973de4c0fb13", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "34664ee037a753f00002f68ac8fa6199d5e9540806a34614be11973de4c0fb13", + "matched_output_lines": 3485027 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "34664ee037a753f00002f68ac8fa6199d5e9540806a34614be11973de4c0fb13", + "matched_output_lines": 3485027 + } + ], + "scope": "Native BambooFeature bounded float codec, air-origin gate, actual bamboo survival, attempted-success semantics, height and optional radius draws, circular podzol patch with ordered WORLD_SURFACE requests, replacement tag, stalk air checks and three leafy caps including the stopping-position overwrite. All origin/support/podzol states have failure-terminated prefixes; all obstacle states have full no-podzol runs. Both RNGs, many seeds, signed zero and float rounding, obstruction heights, rejected writes, repeated mutation, partial failures, wrapped coordinates and composition are covered. Fixture height values are controlled and do not update after writes. Growth, world updates and complete generation remain pending; pathological wrapped patch loops are bounded to 2^20 visits." +} diff --git a/benchmarks/rust-basic-feature-2026-10-06/scoped-parity.json b/benchmarks/rust-basic-feature-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..e1f455b12 --- /dev/null +++ b/benchmarks/rust-basic-feature-2026-10-06/scoped-parity.json @@ -0,0 +1,153 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 3608, + "basic_features": 3, + "block_states": 5, + "composed_fixtures": 1584, + "requested_placements": 7208, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBasicFeatureOracle.java": "5a0de14f47f344f3d1b7eda7e1204156545358f6b5770b72120f805a85773938", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "ac727111418c4263d302a9fea4050bd4e050cf4d94674bb0b532ea4b36557eb7", + "tools/test_basic_feature_parity.py": "19e8b87b83ba5f8698e648a6946b6998f83dee29ffa0627836177baf53a49844", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/placement/chain.rs": "76832dd4f76b44edfcc8bd52d8115f6e30684bfaea0e0b959ba060f07cc3483d", + "crates/horizon-world/src/worldgen/placement/context.rs": "cb57bbdadc2b933528278a0ec13b545e453021765ee59fa3b638fb79199dd110", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "bed9b24771fde57b4845b721f539f558af59d804b8a1ecdbb41f4614c8a6b5a0", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "42823918deec5e149dc729a95bfe54aa32d91604098d5eb8452da0162d557d22", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "1ae40b843721d0f1e1c849b984e0a065aacda6e1384e21fc599cda261f996945", + "crates/horizon-world/src/worldgen.rs": "3fd53d507b2749a9fe5461c77a516fd673de40eb6b51f0b625cd637ade4dcfb5", + "crates/horizon-world/examples/basic_feature_fixture.rs": "40636fe2de41279f1a5633b3150e86d73b7f76dd7f447ecba2d39186abaa2957" + }, + "fixtures_sha256": { + ".local/rust-basic-feature-parity/inputs.txt": "e8b48d25591a8902972fdf8ac9bdaa7f16c0890b3f2076f1161f2c2b87bd5a20", + ".local/rust-basic-feature-parity/facts-client.json": "6c8d9aeb824f4150293f5d6a580d3347d866589b3eeee185a2c18479f5c64b0a", + ".local/rust-basic-feature-parity/facts-server.json": "6c8d9aeb824f4150293f5d6a580d3347d866589b3eeee185a2c18479f5c64b0a" + }, + "rust_output_sha256": "1e7df8d3ee5bfa2f750b94c95b03f426b50608e1a37991ebc3bc3c5c656ee811", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "1e7df8d3ee5bfa2f750b94c95b03f426b50608e1a37991ebc3bc3c5c656ee811", + "matched_output_lines": 1820614 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "1e7df8d3ee5bfa2f750b94c95b03f426b50608e1a37991ebc3bc3c5c656ee811", + "matched_output_lines": 1820614 + } + ], + "scope": "Actual Feature.DIRECT_CODEC and native void-start-platform, End-island and End-platform feature algorithms. A mutable WorldGenLevel proxy logs ordered block reads, writes, update flags, rejected writes, thrown failures and accumulated stored states after repeated placements. Native LevelWriter.setBlockAndUpdate executes through its actual default method. Required default block-state IDs are independently exported and checked across both authenticated JARs. Direct calls and native FeaturePlacer modifier chains share the mutable world and random stream, including reused placer buffers after failures. Both random modes, multiple seeds, nearby/far chunks and extreme wrapped coordinates are compared, with nextLong values after every placement and at fixture end. The End-platform feature invokes its ordinary generation path without block destruction/drops. Actual chunk mutation, neighbor updates, lighting, entity/block drops, full feature registry behavior and complete generated worlds remain outside this comparison." +} diff --git a/benchmarks/rust-biome-chunk-2026-10-06/scoped-parity.json b/benchmarks/rust-biome-chunk-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..8add1e527 --- /dev/null +++ b/benchmarks/rust-biome-chunk-2026-10-06/scoped-parity.json @@ -0,0 +1,131 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 20, + "fills": 160, + "block_queries": 21120, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeChunkOracle.java": "5d1a7f967d2b35af4e0ff4783278d40077df61383c1d6dbf27b7ed52974bdae8", + "tools/test_biome_chunk_parity.py": "f469958617099939c6ae9e6f149e8d6458e75ad9ea5da3710572c5f6017718d2", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "055caaeaa507f45dd6df4c219da874831c88db05f7cfa15c8a11cbfd98ae4332", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "476f1542d335eb02fb627b7480d708f4aa6b7f9929f4dbc2c646e15b063cf083", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "04ac9130138ea4ce67fc43f7701f5036972984724ffcd49bfe857d0693361d87", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "4ab2681a45108e5d2ea6fb761ea1cb7fa40b72833fa6190d2efe34ce29845c21", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "42823918deec5e149dc729a95bfe54aa32d91604098d5eb8452da0162d557d22", + "crates/horizon-world/src/worldgen.rs": "c2cfc116613456f98901732c24fedaba6532e58b3342833674b88b2e17f9f13c", + "crates/horizon-world/examples/biome_chunk_fixture.rs": "b16fdee8abcaac7d714ae71efb0c327deb2bb85a2e9a2419829441cc59e1bd02" + }, + "fixtures_sha256": { + ".local/rust-biome-chunk-parity/inputs.txt": "b2be08e1b743547c1e2880c01a3473c42cc10191d1de32eb2cad2e364c463094" + }, + "rust_output_sha256": "00ae2e07b4ccaa18f6ce6f35258833801e9f4f9335089fbb0bf7f7661988bca6", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "00ae2e07b4ccaa18f6ce6f35258833801e9f4f9335089fbb0bf7f7661988bca6", + "matched_output_lines": 478340 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "00ae2e07b4ccaa18f6ce6f35258833801e9f4f9335089fbb0bf7f7661988bca6", + "matched_output_lines": 478340 + } + ], + "scope": "Actual ChunkAccess.fillBiomesFromNoise, LevelChunkSection.fillBiomesFromNoise and chunk/section biome reads using synthetic registered holder identities. Ordered resolver queries, section contents and clamped/wrapped chunk lookups are compared after repeated fills and failures at section boundaries. Covers full supported aligned vertical bounds, generation bounds cutting through sections, negative/extreme chunk coordinates and 1..512 possible biome identities. Completed earlier sections survive failure while the failing section retains its previous values. This compares stored biome values, not native in-memory palette layout, wire encoding, biome-source generation, blending, retrogen or complete generated worlds." +} diff --git a/benchmarks/rust-biome-generation-2026-10-06/scoped-parity.json b/benchmarks/rust-biome-generation-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..895d7196b --- /dev/null +++ b/benchmarks/rust-biome-generation-2026-10-06/scoped-parity.json @@ -0,0 +1,149 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 252, + "fills": 322, + "biome_values": 341504, + "block_queries": 35910, + "preset_entries": { + "minecraft:nether": 5, + "minecraft:overworld": 7594 + }, + "source_fixtures": { + "multi": 84, + "fixed": 56, + "checkerboard": 56, + "end": 56 + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeGenerationOracle.java": "7285f7d0e358cae2857e0704bcc5fcdb73deb895653b16490eb44323c2789f7d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeExport.java": "f9a773713cf21b69bfa10018b76f27b953bda140ede9934f43d3aa3091101cf5", + "tools/test_biome_generation_parity.py": "919af38c6c5903cb692b33d39d20c0d6cc6daf8351694f7683f7ab20cf322d93", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "055caaeaa507f45dd6df4c219da874831c88db05f7cfa15c8a11cbfd98ae4332", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "476f1542d335eb02fb627b7480d708f4aa6b7f9929f4dbc2c646e15b063cf083", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "04ac9130138ea4ce67fc43f7701f5036972984724ffcd49bfe857d0693361d87", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "4ab2681a45108e5d2ea6fb761ea1cb7fa40b72833fa6190d2efe34ce29845c21", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "42823918deec5e149dc729a95bfe54aa32d91604098d5eb8452da0162d557d22", + "crates/horizon-world/src/worldgen.rs": "3ea3386996321113027dcf51d918d29d363ac1944b7c146a7f1383d17a50967b", + "crates/horizon-world/examples/biome_generation_fixture.rs": "161b985f41123dc97451f4fe0060070276466ca9aa652141aa82e62284442c7e" + }, + "fixtures_sha256": { + ".local/rust-biome-generation-parity/inputs.txt": "10cf6ac3eaeaacafecf786eaa902d5c0b8700dcad9f045d4b6032ba78b4e30f9", + ".local/rust-biome-generation-parity/registries.json": "c6868228cc1002755dab31d947e953cc4be785a1b6ae82697755817a238b7de9", + ".local/rust-biome-generation-parity/presets-client.json": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9", + ".local/rust-biome-generation-parity/presets-server.json": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9" + }, + "rust_output_sha256": "b84a1734641fbec028768da94208f583546f564eb45939c75da13efe85f3f0b9", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "b84a1734641fbec028768da94208f583546f564eb45939c75da13efe85f3f0b9", + "matched_output_lines": 383072 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "b84a1734641fbec028768da94208f583546f564eb45939c75da13efe85f3f0b9", + "matched_output_lines": 383072 + } + ], + "scope": "Actual ChunkGenerator.doCreateBiomes through NoiseBasedChunkGenerator with empty Blender and no retrogen. Both bundled Overworld/Nether multi-noise preset tables are independently exported from authenticated JARs; Rust imports quantized tables and compiles climate routers itself. All seven bundled routers, both random modes, multiple seeds and distant positive/negative chunks are tested. Complete section biome values and subsequent BiomeManager block lookups are compared, including repeated generation with fresh density contexts and persistent previous-leaf search state, and generation bounds excluding top/bottom sections. Holders are identity placeholders; no biome properties are evaluated. Fixed, checkerboard and End source fixtures also run actual chunk generation through every bundled router, including real seeded End erosion, the central-island shortcut, distant coordinates and wrapped checkerboard shifts. Preset builders, complete biome-source codecs, blending, retrogen, terrain-stage linkage and complete generated worlds remain pending." +} diff --git a/benchmarks/rust-biome-placement-2026-10-06/scoped-parity.json b/benchmarks/rust-biome-placement-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..0f1630313 --- /dev/null +++ b/benchmarks/rust-biome-placement-2026-10-06/scoped-parity.json @@ -0,0 +1,158 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 9152, + "random_modes": 2, + "requested_placements": 27456, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomePlacementOracle.java": "e8fd44142ad1448a32758036705ce2be41b0ecbf411c4562f2caed2eea9b50b9", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "tools/test_biome_placement_parity.py": "bac6b4857b1d4e84b23e6736398f5fce5ea1a4297b05d77235d9d242a2219b80", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "c215156f2ecf7faf214b3d89e0829b65d54f4ff6d134d778ec941f18a606a327", + "crates/horizon-world/src/worldgen/block_predicate.rs": "dd8cbda2ec110444950f0b31bf4e088897eab0994674a91568c7b063f8f16210", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "2297b194514925688dba25016a69d5ba5eb8b869bdfff28f2e611a6742ac5954", + "crates/horizon-world/src/worldgen/feature_region.rs": "4a95a30c0987d97e671f84380e13ddea070ad81f996baa65b2a06c4d892971c7", + "crates/horizon-world/src/worldgen/feature_sort.rs": "0b9d1e1c15d8449125d39e400776b8f28eec7b7cbd047660a94f8cb90160adfe", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9bce6b17b60fec575d810713d9fb2714780aadbbc973db969c07cf4455201847", + "crates/horizon-world/src/worldgen/placement/context.rs": "f8fa467d3b931d0f98d3572fbc80c659d452a7fc5755d5c98123dc477c2b541c", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "c39c0b5f761fd573ff2f2a1d9d42901305995cc88f5c4ca3a49aaa4ef5dd933b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "55c4317bd9c782378de7c2a7d58be5aa08febc5b8f2f4b86379a39e0ba500b3c", + "crates/horizon-world/examples/biome_placement_fixture.rs": "93b4668e04daf52aed34def93aeed9af4f5bf55a8e1c60b616428aadd454648c" + }, + "fixtures_sha256": { + ".local/rust-biome-placement-parity/inputs.txt": "f823d452b40ad5c4448e5c6b6e59d7f1b0db8f40f8fdb4c36b2bc23cc99ffd09" + }, + "rust_output_sha256": "84aceee3d6197790495a2b877b04c037340258cf3d36bc440af78f82be15010b", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "84aceee3d6197790495a2b877b04c037340258cf3d36bc440af78f82be15010b", + "matched_output_lines": 121423 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "84aceee3d6197790495a2b877b04c037340258cf3d36bc440af78f82be15010b", + "matched_output_lines": 121423 + } + ], + "scope": "Actual BiomeFilter.modify and FeaturePlacer.place/placeWithBiomeCheck with native biome generation settings. Missing top features fail before biome lookup. Direct, absent, structurally equal and different placed-feature membership, query order, callback random draws/results/errors, dirty buffers across repeats and nested plain placers are compared. Direct and WorldgenRandom-wrapped legacy/xoroshiro streams execute modifier chains. Rust delegates biome resolution and generation-settings membership to the caller while isolating each placer invocation context. Full biome sampling/registry equality, complete decoration, crash-report text and gameplay remain pending." +} diff --git a/benchmarks/rust-biome-source-2026-10-06/scoped-parity.json b/benchmarks/rust-biome-source-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..47138c9a6 --- /dev/null +++ b/benchmarks/rust-biome-source-2026-10-06/scoped-parity.json @@ -0,0 +1,136 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 457, + "queries": 1147984, + "sources": { + "fixed": 1, + "checkerboard": 375, + "end": 81 + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeSourceOracle.java": "8a3807e4bcb871ad3cd5eb281c803df55daf1ffb654a91d0cdb7b927643b2601", + "tools/test_biome_source_parity.py": "38a1bd39ab15d87538316541424e09a91a621f539c2202543d9c859297c0b8e4", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "055caaeaa507f45dd6df4c219da874831c88db05f7cfa15c8a11cbfd98ae4332", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source.rs": "bd1efc819d45df54a99744a90918e5e98c76759e92e7436c11933b1ce6e96c53", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "476f1542d335eb02fb627b7480d708f4aa6b7f9929f4dbc2c646e15b063cf083", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "04ac9130138ea4ce67fc43f7701f5036972984724ffcd49bfe857d0693361d87", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "4ab2681a45108e5d2ea6fb761ea1cb7fa40b72833fa6190d2efe34ce29845c21", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "42823918deec5e149dc729a95bfe54aa32d91604098d5eb8452da0162d557d22", + "crates/horizon-world/src/worldgen.rs": "3ea3386996321113027dcf51d918d29d363ac1944b7c146a7f1383d17a50967b", + "crates/horizon-world/examples/biome_source_fixture.rs": "dd485dba7cef8fd924b7a8ba4357766fb874d144120c16ad3f8f6c41a863c074" + }, + "fixtures_sha256": { + ".local/rust-biome-source-parity/inputs.txt": "165d02b6bcac5cb70e7129368b4c5b2220c5cdcaba2314d94f86b687886beffa" + }, + "rust_output_sha256": "a57198fab8b45fe8db011b7153ffdc6781d6c0862c95eb9b8c0ebc6318be526d", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a57198fab8b45fe8db011b7153ffdc6781d6c0862c95eb9b8c0ebc6318be526d", + "matched_output_lines": 1306096 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "a57198fab8b45fe8db011b7153ffdc6781d6c0862c95eb9b8c0ebc6318be526d", + "matched_output_lines": 1306096 + } + ], + "scope": "Actual FixedBiomeSource, CheckerboardColumnBiomeSource and TheEndBiomeSource runtime queries using synthetic holder identities. Fixed results, checkerboard empty/duplicate/large lists, all codec-valid scales plus unrestricted runtime scales, Java masked shifts and wrapping sums are compared. End central-circle shortcuts, erosion sampler coordinates, exact threshold boundaries, nonfinite float samples, sampler failures and integer coordinate wrapping are compared through actual Climate.Sampler bindings. End density inputs in this suite are supplied constants; real seeded End density, biome-source codecs, registry/preset loading, possible-biome metadata and generated-world integration remain separate work." +} diff --git a/benchmarks/rust-biome-source-codec-2026-10-06/scoped-parity.json b/benchmarks/rust-biome-source-codec-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..b2998f65d --- /dev/null +++ b/benchmarks/rust-biome-source-codec-2026-10-06/scoped-parity.json @@ -0,0 +1,148 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 40481, + "query_positions": 7, + "climate_grid_cases": 40001, + "biomes": 67, + "biome_tags": 86, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeSourceCodecOracle.java": "a6f231ee68fe0aa94159c63d55f589b86c668b9f2052e215f832e10763a818e2", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeExport.java": "f9a773713cf21b69bfa10018b76f27b953bda140ede9934f43d3aa3091101cf5", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialConditionOracle.java": "04a87405fd2a1c79baf4eb3a8895aa66dc96b8f6baffb9b486ef207f8b91b5ee", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAnchorOracle.java": "226628d98b89aadbdd374936575d033945e7064a900dbb050c662204dbc7e119", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeTemperatureOracle.java": "243bbc525c6aec24674e7f172c5fb4f7b50f9a679d8b9dfba40ea278219a2d28", + "tools/test_biome_temperature_parity.py": "68f84d02e7802349e491b8cb66e18d9b08c9e72ab2306b663667259e852cc2b1", + "tools/test_material_condition_parity.py": "01c82e1a768d9131f8f7e6d59d01ddb06272074469dbdcd8547f44f0a8fa152d", + "tools/test_biome_source_codec_parity.py": "e7d19478429b0c6c550f45d804d4771194b2f5cecb094ebd21007a3afdbe8ca2", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "055caaeaa507f45dd6df4c219da874831c88db05f7cfa15c8a11cbfd98ae4332", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "476f1542d335eb02fb627b7480d708f4aa6b7f9929f4dbc2c646e15b063cf083", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "04ac9130138ea4ce67fc43f7701f5036972984724ffcd49bfe857d0693361d87", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "4ab2681a45108e5d2ea6fb761ea1cb7fa40b72833fa6190d2efe34ce29845c21", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "42823918deec5e149dc729a95bfe54aa32d91604098d5eb8452da0162d557d22", + "crates/horizon-world/src/worldgen.rs": "3ea3386996321113027dcf51d918d29d363ac1944b7c146a7f1383d17a50967b", + "crates/horizon-world/examples/biome_source_codec_fixture.rs": "654094b2846692c34233ee2016fd3a4f9a44df0281e5bb2552ed6c35ffb17bc1" + }, + "fixtures_sha256": { + ".local/rust-biome-source-codec-parity/inputs.txt": "c9e3cbc7af471f04bbd4d8cc79a2399e2f61c00f2d2ebcc9343a254798095fbb", + ".local/rust-biome-source-codec-parity/presets-client.json": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9", + ".local/rust-biome-source-codec-parity/presets-server.json": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9", + ".local/rust-biome-source-codec-parity/positions.json": "35e94adf55d9bc0326133967abf93d50b896c39489f77f81d2bfa4f278364430", + ".local/rust-biome-source-codec-parity/biomes.json": "9b26dc3b662627dc3bbbf8da209f287882ce79ff4daf8f454b994ddc7510df99", + ".local/rust-biome-source-codec-parity/biome_tags.json": "4006b76c24f616cb457a6fdad816db9b27f4528fe6daaed5747f1f79cf6225cf", + ".local/rust-biome-source-codec-parity/presets.json": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9" + }, + "rust_output_sha256": "568792acae9f5b0df02bb5cf7cd6b4f7edb017a0223236c57c6fef4b0dfbb1a8", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "568792acae9f5b0df02bb5cf7cd6b4f7edb017a0223236c57c6fef4b0dfbb1a8", + "matched_output_lines": 363121 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "568792acae9f5b0df02bb5cf7cd6b4f7edb017a0223236c57c6fef4b0dfbb1a8", + "matched_output_lines": 363121 + } + ], + "scope": "Actual BiomeSource.CODEC parsing and encoding for fixed, checkerboard, End and multi-noise sources bound to pinned biome/tag registries and preset holders. Named biome holders, direct/tag holder sets, canonical identifiers, scale defaults/bounds/numeric narrowing, inline climate parameter lists, named/inline preset holders, inline-list preference/fallback, malformed fields and duplicate keys are compared. Canonical serialized JSON is compared as sorted structures with numeric double-bit values; possible-biome sets are sorted and compared, followed by source queries against zero climate/erosion. Rust imports independently authenticated preset tables. Full inline biome definitions, live registry ownership/reloads and complete source/world generation remain outside this scoped codec comparison." +} diff --git a/benchmarks/rust-biome-temperature-2026-10-06/scoped-parity.json b/benchmarks/rust-biome-temperature-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..1306b9bd0 --- /dev/null +++ b/benchmarks/rust-biome-temperature-2026-10-06/scoped-parity.json @@ -0,0 +1,126 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 387, + "biome_resources": 67, + "codec_inputs": 183, + "operations": 53790, + "thread_isolation_fixtures": 12, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeTemperatureOracle.java": "243bbc525c6aec24674e7f172c5fb4f7b50f9a679d8b9dfba40ea278219a2d28", + "tools/test_biome_temperature_parity.py": "68f84d02e7802349e491b8cb66e18d9b08c9e72ab2306b663667259e852cc2b1", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "3968e2a337a6a23226c485057c79359e66df16683f00fb4ebc9fabb03910a015", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry.rs": "f46065659e60eb5e84ad69b9f3b5e94dc87ee19de16408817e26f23d16b6c7e7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "476f1542d335eb02fb627b7480d708f4aa6b7f9929f4dbc2c646e15b063cf083", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "3094bb2c4abe911720a7143953f43fda3db97dcb80405b4a62f35204a06920dc", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "a6d613eed1876d7c6ef4a491ffbda36d673f27a62a9db3c4d50006ed9fc0e0b8", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "8cb30bcf221def3b2ea14aa5bd9c719aa9655432149a177180f716ba218457b8", + "crates/horizon-world/src/worldgen/material_condition.rs": "e577927593cdbc7b8aa01b7e8d641df0374f36cc8b5b4cc1eb797f526fa8e636", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "134cf93b53a40fb1ed0e0170c90316c80e270773b2968c63dc3f9cef2c941bff", + "crates/horizon-world/src/worldgen.rs": "e5123e2249017e2cef7067cd7ddd85316a075c418bf9d1b452db601eea3483a0", + "crates/horizon-world/examples/biome_temperature_fixture.rs": "192fb207c28c2a040c6264d2c3573bd71d389ce04f66408eed47b9bfa6aa6df0" + }, + "fixtures_sha256": { + ".local/rust-biome-temperature-parity/inputs.txt": "f882dff81e4b3be8b37e2a5130198a6bd0eb437ebd903f68b15899bd1509e681", + ".local/rust-biome-temperature-parity/biomes.json": "9b26dc3b662627dc3bbbf8da209f287882ce79ff4daf8f454b994ddc7510df99" + }, + "rust_output_sha256": "2c40a4156ce3edd9dbbecc80aeea0cd1606fd462e79abb377d778c02a973d38e", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "2c40a4156ce3edd9dbbecc80aeea0cd1606fd462e79abb377d778c02a973d38e", + "matched_output_lines": 836659 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "2c40a4156ce3edd9dbbecc80aeea0cd1606fd462e79abb377d778c02a973d38e", + "matched_output_lines": 836659 + } + ], + "scope": "Actual Biome temperature methods, warm/cold/iceberg-melt predicates and precipitation selection, with both temperature modifiers and arbitrary base float bits. Native private climate/biome constructors provide explicit temperature inputs; unrelated biome fields are null and never queried. Fixed seeded simplex/stack sources, float/double conversion and arithmetic order, height adjustment and sea-level overflow, packed-position aliases, repeated queries with changed sea levels, cache capacity/order/content, NaN recomputation and eviction, and actual native thread-local isolation versus independently owned Rust workers. ClimateSettings map-codec parsing additionally covers all independently authenticated bundled biome definitions, direct float conversion, nonfinite overflow, modifier defaults/null handling, field types, duplicates and missing fields. Full biome data codecs, climate encoding, complete weather placement/freezing, material condition integration and automatic migration of shared biome instances between threads remain outside this scope." +} diff --git a/benchmarks/rust-biome-weather-2026-10-06/scoped-parity.json b/benchmarks/rust-biome-weather-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..ca5619a92 --- /dev/null +++ b/benchmarks/rust-biome-weather-2026-10-06/scoped-parity.json @@ -0,0 +1,216 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 326057, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "242a90773326a0059c93514b050ccd5d0d5104bd1b84a55982f0918ce639bd18", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "e871d3a01f15616a98ca9227c27a81e4d17e2d57ac4e68a5650a70fa29811497", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_biome_weather_parity.py": "b823d7e9a7afa1c1cc1ca454dd49b01c440a931de05b180e7557c142304c4d6e", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "5ce5c6eaa5f8a2557a620e533788217b1eb430654801dcf6135d6c92d7a012ac", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "cd5ca4bc73b1abc8bc1aef98cba995a3a4105532c004ba82f3f8e118cd046621", + "crates/horizon-world/src/worldgen/feature_region.rs": "79e8ce343b0dc80dceb8b214c818b383d9b110540bb8c3b0ac32863a7800e288", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "0dd7f8cddd8473a9d2f38306afe4fc88feedfcf28fe522f34d7029d1ca01a935", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "8e3f2a47c5702ef6b7340259e299093f2ac21ccbd5b13c45c5bca899c1061df5", + "crates/horizon-world/examples/simple_block_fixture.rs": "9f8486c812562f4b9fb9745cc0a3f2057d77913e8df2610e98f2a73e391680af" + }, + "fixtures_sha256": { + ".local/rust-biome-weather-parity/inputs.txt": "01d4eb76ac3453640ee0234667b4a3dccdc17696f8fd25eca9abc2686b717891", + ".local/rust-biome-weather-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-biome-weather-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-biome-weather-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-biome-weather-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-biome-weather-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-biome-weather-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-biome-weather-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-biome-weather-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-biome-weather-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-biome-weather-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-biome-weather-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-biome-weather-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-biome-weather-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-biome-weather-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-biome-weather-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-biome-weather-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "b8558ed7398aa42c9ff464ee50630e24ad6cdef5ce6f9c4e4009f51b7bd3d537", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "b8558ed7398aa42c9ff464ee50630e24ad6cdef5ce6f9c4e4009f51b7bd3d537", + "matched_output_lines": 4071594 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "b8558ed7398aa42c9ff464ee50630e24ad6cdef5ce6f9c4e4009f51b7bd3d537", + "matched_output_lines": 4071594 + } + ], + "scope": "Actual native Biome.shouldFreeze and Biome.shouldSnow using private climate construction for explicit float bits, native temperature modifiers/cache, real fluid identities, real snow survival/support and light/build-height gates. All states are compared as freezing blocks, forced fluid carriers, contained fluids, snow candidates, snow supports and each water-edge neighbor. All neighbor masks, both RNG tails, repeated queries, raw float thresholds/nonfinite values, both temperature modifiers, precipitation flags, light boundaries, sea-level extremes, partial failures and wrapped coordinates are included. Dynamic block entities are absent; lighting propagation, mutation, snow/ice updates and complete weather simulation remain pending. Native per-biome thread-local caches are released only after each independent fixture, retaining repeated-query semantics within it. The fixture mode directly calls biome methods and does not represent a vanilla feature codec." +} diff --git a/benchmarks/rust-biome-zoom-2026-10-06/scoped-parity.json b/benchmarks/rust-biome-zoom-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..4f607d3ae --- /dev/null +++ b/benchmarks/rust-biome-zoom-2026-10-06/scoped-parity.json @@ -0,0 +1,131 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 256933, + "seed_hashes": 4104, + "block_queries": 169408, + "position_queries": 83421, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeZoomOracle.java": "89962784c285822d11ff72cbff0c22d41a3a27993793a61e35869c50a72ed614", + "tools/test_biome_zoom_parity.py": "0b5f02ed01306a2acb0143da1019562a8413602afa05fef16bdc485e0e6ae716", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "055caaeaa507f45dd6df4c219da874831c88db05f7cfa15c8a11cbfd98ae4332", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "476f1542d335eb02fb627b7480d708f4aa6b7f9929f4dbc2c646e15b063cf083", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "04ac9130138ea4ce67fc43f7701f5036972984724ffcd49bfe857d0693361d87", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "4ab2681a45108e5d2ea6fb761ea1cb7fa40b72833fa6190d2efe34ce29845c21", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "42823918deec5e149dc729a95bfe54aa32d91604098d5eb8452da0162d557d22", + "crates/horizon-world/src/worldgen.rs": "cffb5e72b59222dad13e57fa74ed4f553570a61a8773f27b5199444111ced2e0", + "crates/horizon-core/examples/biome_zoom_fixture.rs": "8bdb7a4f15ac94cd4807ea1e1211c53f0ea050fda5ddfea65b2dc345e13b2e27" + }, + "fixtures_sha256": { + ".local/rust-biome-zoom-parity/inputs.txt": "61abb5e562325847d5c7f7849dac79aa9392b9ae2dab9f42dab6485dd89c5ea7" + }, + "rust_output_sha256": "7b5d1c89f31ce1a803bafe9a675677d035cbce49ecede300d6beab7240501c95", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "7b5d1c89f31ce1a803bafe9a675677d035cbce49ecede300d6beab7240501c95", + "matched_output_lines": 256933 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "7b5d1c89f31ce1a803bafe9a675677d035cbce49ecede300d6beab7240501c95", + "matched_output_lines": 256933 + } + ], + "scope": "Actual BiomeManager seed obfuscation, block-position eight-corner jitter selection, direct block/double-to-quart queries, and source replacement preserving the zoom seed. Captured resolver coordinates are compared, including dense local grids, signed coordinate overflow, negative boundaries, distant blocks, long-seed boundaries, random seeds/positions, double infinities/NaNs/subnormals and saturating conversion. SHA-256 seed transforms are also compared against Python hashlib independently. Biome storage/source generation, blending, chunk integration and gameplay remain separate work." +} diff --git a/benchmarks/rust-block-blob-2026-10-06/scoped-parity.json b/benchmarks/rust-block-blob-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..5eb47c2d6 --- /dev/null +++ b/benchmarks/rust-block-blob-2026-10-06/scoped-parity.json @@ -0,0 +1,206 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 77686, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "bd07d67d22b7c851901a9dbf4bc814947162196e5f8011987dbc6f43b1720215", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "99a396b9b983f6ca9149133251f3ece9aaf76d3d16dafa1f322378212a19490c", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_block_blob_parity.py": "04a8dc9048db38ac3c149a7ae3d6ad828d24b4b884c7da0613e780338d687dc3", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b3caf26bd3afc9d10cdcca3f7e794c30abf5ba09afa1fe80ba8f44713acdb274", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "8a2834a9347ee2c2db7cf1c86a064907ec06e9ac16ba9cc3936e315fc4ad49ca", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "2ea6d26fe88c633ad3efe7bdb6fc49f54961cbdf93b82919d79cf7d37a5c3c7d", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "b78927059c43b0860f5e29640720b85ab4099e2e620993baa70feaf8e61b79bf", + "crates/horizon-world/src/worldgen/feature_region.rs": "3b893ceafbdd1d7b4264f4022dbdb6a7142dfc7001a5cf5c304f5ca7695dfaa0", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "b967b71867dac7f83f6dba0eb063ad9c581aa2f29087c2128052a4eb02f199c2", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "97dcb2d79f285daab0bbbe2d2ca673edc0376b23c5cd4519e0f8818593e0a4ee", + "crates/horizon-world/examples/simple_block_fixture.rs": "ca50d73773266d3cfcc3c06947a2197bfd0882a8d604f8daa58229a732e1ba11" + }, + "fixtures_sha256": { + ".local/rust-block-blob-parity/inputs.txt": "28f9a79b0a5de2343e5119a2c0f05909cd61f10ea8df12c73891a5a134127147", + ".local/rust-block-blob-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-block-blob-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-block-blob-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-block-blob-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-block-blob-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-block-blob-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-block-blob-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-block-blob-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-block-blob-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-block-blob-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-block-blob-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-block-blob-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-block-blob-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-block-blob-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-block-blob-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-block-blob-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "6ed1f061cc2b073147acc2bc3523e47901b95b066bef3aa1dab3627b8c122e85", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "6ed1f061cc2b073147acc2bc3523e47901b95b066bef3aa1dab3627b8c122e85", + "matched_output_lines": 2387914 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "6ed1f061cc2b073147acc2bc3523e47901b95b066bef3aa1dab3627b8c122e85", + "matched_output_lines": 2387914 + } + ], + "scope": "Native BlockBlobFeature codec, state decoding, support-predicate descent and three randomized overlapping shapes. Every candidate and supporting registry state, minimum-height returns, query failures, float radius versus double distance, inclusive box order, all three final origin-offset draws, flags 3, rejected writes, repeated mutations and both random modes are compared. Named tags, survival/support predicates and overlay/modifier composition use the same mutable world. Positions near signed integer limits avoid pathological native overflow boxes; Rust bounds descent and box work to 2^20 visits. Resident-world update callbacks and complete gameplay remain pending." +} diff --git a/benchmarks/rust-block-collision-scan-2026-10-06/scoped-parity.json b/benchmarks/rust-block-collision-scan-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..8c914b16e --- /dev/null +++ b/benchmarks/rust-block-collision-scan-2026-10-06/scoped-parity.json @@ -0,0 +1,204 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 4176, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockCollisionScanOracle.java": "ee34da34195df5a0cdd4a24a4faf7154200b674d6523eba4700381439d556b2d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_block_collision_scan_parity.py": "5289ba6c555367d4dbfe7cbf8e577705c16a8426dfcc431c787aeed3e513970d", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "5d0f5ded49d34bb999d73a4e1b89a318fa66c0246e9904d3cbf810d3aa370312", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "3f574287b721b86f39d976d98a69b632b87658cd38f4a7dc0e6c1b6623d5a6a3", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/block_collision_scan_fixture.rs": "509420fc9601ece4ad17d4eec67a2d2ad4de0c653c55cbf01ba746a354575f17" + }, + "fixtures_sha256": { + ".local/rust-block-collision-scan-parity/inputs.txt": "d87e1a985430aab7a9fd77e6f3a70e4810d19241c74a9fe8c324348d5c0737dc" + }, + "rust_output_sha256": "f975369ad065b5417dbeacbfa554fc3f27ddaa4f2e634e57f5380e070b355d72", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "f975369ad065b5417dbeacbfa554fc3f27ddaa4f2e634e57f5380e070b355d72", + "matched_output_lines": 517820 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "f975369ad065b5417dbeacbfa554fc3f27ddaa4f2e634e57f5380e070b355d72", + "matched_output_lines": 517820 + } + ], + "scope": "Actual BlockCollisions cursor and selection algorithm over controlled block metadata, chunk providers and context shapes. Compares ordered chunk/state/suffocation/shape calls, missing-chunk retries, cached chunk reuse, face/edge/corner filtering, canonical full-block versus equal noncanonical shape behavior, exact emitted shape data, early consumer termination and injected provider failures. Finite bounded scans include thin/zero-size boxes, chunk crossings and wrapped integer positions. Registry-specific metadata/shape dispatch, live chunk loading and entity movement are separate integration work; unsupported cursor volumes and caller budgets use typed Rust errors." +} diff --git a/benchmarks/rust-block-column-2026-10-06/scoped-parity.json b/benchmarks/rust-block-column-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..a6dd70b4d --- /dev/null +++ b/benchmarks/rust-block-column-2026-10-06/scoped-parity.json @@ -0,0 +1,203 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 64120, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "82204d06e279275c5967f6d5fd80afe7416ba6c5f5ec19c682a30942f2fb6d7a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "99a396b9b983f6ca9149133251f3ece9aaf76d3d16dafa1f322378212a19490c", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "8d789c02b88cfd019064b7407f886a2054d26554390a25f804773bb2197c6c35", + "tools/test_block_column_parity.py": "48c542356bdcf0f27d5ef2cee8c61b8e6274d2c84b17dffee5bcbb5ff5439e8a", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b3caf26bd3afc9d10cdcca3f7e794c30abf5ba09afa1fe80ba8f44713acdb274", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "8a2834a9347ee2c2db7cf1c86a064907ec06e9ac16ba9cc3936e315fc4ad49ca", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "2ea6d26fe88c633ad3efe7bdb6fc49f54961cbdf93b82919d79cf7d37a5c3c7d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "26dc6ade715d6d571a18143ba6c95f59d80c212ec8e38d3827ae3e72f4bc89ca", + "crates/horizon-world/src/worldgen/feature_region.rs": "2c78e5f1bdb08307f8d982f231f1abbc3306cd54348d9023b86ee6ed3516fd33", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "2fc100f8861fe0e0519a53dc4ae4a1eaa8a96aff2f6bf546ce613bdf665df237", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "2757f22706803afb3624afd65f4f5d05540acbc2bcb01f61e95fa40535575f0f", + "crates/horizon-world/examples/simple_block_fixture.rs": "d839de7fa2827189f8625903cedad84ab47c3e7384bed42e250f660f41d961dc" + }, + "fixtures_sha256": { + ".local/rust-block-column-parity/inputs.txt": "afc1201a78dba6ef140a7588d105a9e78931cfc837ea200baa8777ce02ae3f4f", + ".local/rust-block-column-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-block-column-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-block-column-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-block-column-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-block-column-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-block-column-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-block-column-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-block-column-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-block-column-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-block-column-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-block-column-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-block-column-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-block-column-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-block-column-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-block-column-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-block-column-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "6fc5753669a2770ba3b7fdc57cc1c42f191b5b1877cdecb35e43dc19054f2f70", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "6fc5753669a2770ba3b7fdc57cc1c42f191b5b1877cdecb35e43dc19054f2f70", + "matched_output_lines": 1204081 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "6fc5753669a2770ba3b7fdc57cc1c42f191b5b1877cdecb35e43dc19054f2f70", + "matched_output_lines": 1204081 + } + ], + "scope": "Native block-column feature codec and algorithms, with nonnegative height-provider validation, all candidate state descriptors, all six directions, both base/tip truncation orders, first obstruction beyond the origin, ordered predicate queries before writes, optional-provider fallback reads, rejected writes, partial failures, coordinate wrapping, named providers and nested feature/modifier composition. Both independent random streams and stored states are checked after repeated calls. A bounded runtime work budget rejects pathological million-operation traversals; actual chunks, neighbor updates and complete gameplay remain pending." +} diff --git a/benchmarks/rust-block-entity-storage-2026-10-06/scoped-parity.json b/benchmarks/rust-block-entity-storage-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..b7d454d6e --- /dev/null +++ b/benchmarks/rust-block-entity-storage-2026-10-06/scoped-parity.json @@ -0,0 +1,205 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "commands": { + "reset": 23, + "resolve": 20825, + "pending": 2533, + "dump": 773, + "get": 864, + "save": 914, + "mutate": 869, + "active": 889, + "remove": 821 + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockEntityStorageOracle.java": "7d9c7b9f9b82e3b543a062424d4b59374fccc2068010d5523c6c0020c22c2e69", + "tools/test_block_entity_storage_parity.py": "0a772a8db25e46db18d9a1962209c3199e6daea34140452e64cd73747805f198", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "4e556a5896b893fbb73bf2e2b8e70601a8374f58b9f4f5f3730e99916a846e3a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "7677027594ed3df5e538402d5a3ba9276b67b56490463ca2686bfa418d02bd24", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "b8fb9fb80a66a851d916f07f15df1a40b6cc95b49e71aaec4d4b4107f13d9f9f", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "1d79a7fdb5dd18b0b59079cb2dc74682ba7af2a650c8efff027cfa530eee7bf9", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/block_entity_storage_fixture.rs": "feefacc51bcf2b5af62869130512ac150664470c07cc2c2746d9258a6709b181" + }, + "fixtures_sha256": { + ".local/rust-block-entity-storage-parity/inputs.txt": "9b9242240b36a6b65fbc0a3c707685946cbbbe16cfcafa59c5b16bd5aa33718f" + }, + "rust_output_sha256": "81304a08cb574ec6b4c46ea76ffd4bdd8bfc331d5b07bd4bc4de3d7564340dc9", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "81304a08cb574ec6b4c46ea76ffd4bdd8bfc331d5b07bd4bc4de3d7564340dc9", + "matched_output_lines": 78251 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "81304a08cb574ec6b4c46ea76ffd4bdd8bfc331d5b07bd4bc4de3d7564340dc9", + "matched_output_lines": 78251 + } + ], + "scope": "Native BlockEntity.getPosFromTag and actual ProtoChunk pending/active insertion, lookup, removal, position union and pending-save fallback. NumericTag coordinate reads cover integer narrowing, float/double floor overflow, infinities/NaNs, missing/nonnumeric fields, wrong-chunk relocation and wrapped chunk coordinates. Active entries replace pending data; later pending records cannot overwrite active entries. In-place pending coordinate mutation retains the original map key. Native chest entities carry loot seeds for active identity and basic saving-metadata comparisons; Rust supplies caller-owned payload serialization. Iteration order is normalized, and pending reads are borrowed/owned values rather than unrestricted Java aliases. Entity creation from NBT, complete entity serializers, active behavior and integration with chunk lifecycle remain pending." +} diff --git a/benchmarks/rust-block-landing-2026-10-07/scoped-parity.json b/benchmarks/rust-block-landing-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..58f9211de --- /dev/null +++ b/benchmarks/rust-block-landing-2026-10-07/scoped-parity.json @@ -0,0 +1,228 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "registry_states": 35723, + "registry_blocks": 1286, + "fixtures": 712544, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockLandingOracle.java": "e397acdbaf2702f358c90ba53a804afa26d7f29a278884c0e779b18f1ae40e63", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementRegistryOracle.java": "49fcc1f4348a8e279dcb916ae149de8c97f15df54ff1a675826b7c6c3dda06d9", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "tools/test_block_landing_parity.py": "6785ecf77217ec5698db4ee532624401955eabeaa8b545175b4ccca7250f1f52", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/examples/block_landing_fixture.rs": "7bbcacc9b67321d1d12684c488c73f4935e3a22f4c8e5141f93673d5918b4efb", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "525f4245d9125f7007a3c1d63ab1ac327aac6e6e4134fb25f56a996bf8859c41", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "fixtures_sha256": { + ".local/rust-block-landing-parity/inputs.txt": "44b0aec7dc5b05175f1562b0afa6b64c67cf0fc5370c8006341cb9f45da54119", + ".local/rust-block-landing-parity/landing-states.json": "f4a8503a3d5a141b158971fb9bc37bcc90086401b3f5b6b37f2352fa9beb41a4", + ".local/rust-block-landing-parity/landing-definitions.json": "03f7a3aaa6e52c0fabb845fb7a43054538771d14e47e5d8f9a88bb907b7780a9", + ".local/rust-block-landing-parity/movement-properties.nbt": "4b5646cbb675025efc9ac6e24b024ac2edddfa6725eb8e158357beda622a3888", + ".local/rust-block-landing-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-block-landing-parity/cached-collision.nbt": "4a274cd720a1bda585b02f50f16e90246576679e1e173c214548c5cbf607ab2d" + }, + "rust_output_sha256": "dca0477ebdf14f4da98f71d1c77a0df01db9c04dd8a381d9b2426de6a4659feb", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "dca0477ebdf14f4da98f71d1c77a0df01db9c04dd8a381d9b2426de6a4659feb", + "matched_output_lines": 3524267 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "dca0477ebdf14f4da98f71d1c77a0df01db9c04dd8a381d9b2426de6a4659feb", + "matched_output_lines": 3524267 + } + ], + "scope": "Actual registered Block.fallOn and bounceOn across all states and eight entity class families, plus client/server distinctions, damage return, bounce suppression, protection/rules, random boundaries, NaN/infinity and failures at each observable callback. Farmland replacement uses native registered collision shapes and ordered occupant pushes; turtle egg changes preserve hatch and compare write flags, event order and effects after failed writes. Entity damage, randomness, selected entities, sounds, world writes and events are controlled providers. Live health, entity storage, network, audio and full movement lifecycle integration remain separate work." +} diff --git a/benchmarks/rust-block-pile-2026-10-06/scoped-parity.json b/benchmarks/rust-block-pile-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..a0c3e8ce4 --- /dev/null +++ b/benchmarks/rust-block-pile-2026-10-06/scoped-parity.json @@ -0,0 +1,204 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 75667, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "82204d06e279275c5967f6d5fd80afe7416ba6c5f5ec19c682a30942f2fb6d7a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "99a396b9b983f6ca9149133251f3ece9aaf76d3d16dafa1f322378212a19490c", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "8d789c02b88cfd019064b7407f886a2054d26554390a25f804773bb2197c6c35", + "tools/test_block_pile_parity.py": "012a15ef52a918ab635189aa3c763fce83a37e4a5b00381ba846238d702022d4", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b3caf26bd3afc9d10cdcca3f7e794c30abf5ba09afa1fe80ba8f44713acdb274", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "8a2834a9347ee2c2db7cf1c86a064907ec06e9ac16ba9cc3936e315fc4ad49ca", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "2ea6d26fe88c633ad3efe7bdb6fc49f54961cbdf93b82919d79cf7d37a5c3c7d", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "5aa693cba6ad8e7ca79d0aaeb8e4d546f0ac4ec0f3f3eb96d002958610e61dfb", + "crates/horizon-world/src/worldgen/feature_region.rs": "2c78e5f1bdb08307f8d982f231f1abbc3306cd54348d9023b86ee6ed3516fd33", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a1fa59d0e035654c5ee8bb4d84822ea9df5a5b86c7e7fa46080af8e87aa58e03", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "efc6f6960422ab281c1636d12080f27062d72955964e7d932863c077a2365531", + "crates/horizon-world/examples/simple_block_fixture.rs": "9eae8e6ed390a49460496a7a6e7f6d631f1ad1fe21e6ffdbeeb1e79b7f92c0f9" + }, + "fixtures_sha256": { + ".local/rust-block-pile-parity/inputs.txt": "754699b4804baf4a9be28d665b053e6ae8b93a4b418b0d8eaa8004159a853851", + ".local/rust-block-pile-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-block-pile-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-block-pile-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-block-pile-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-block-pile-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-block-pile-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-block-pile-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-block-pile-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-block-pile-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-block-pile-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-block-pile-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-block-pile-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-block-pile-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-block-pile-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-block-pile-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-block-pile-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "639bf7fa3f07d6b293eef1ed6422ac1a465944cd5369fe82d804f499f176c69e", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "639bf7fa3f07d6b293eef1ed6422ac1a465944cd5369fe82d804f499f176c69e", + "matched_output_lines": 11995254 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "639bf7fa3f07d6b293eef1ed6422ac1a465944cd5369fe82d804f499f176c69e", + "matched_output_lines": 11995254 + } + ], + "scope": "Native BlockPileFeature codec and placement with every candidate and supporting block state. Minimum-height early return, radius sampling, native inclusive-box visit order, squared-distance float arithmetic, sparse outer draws, air variants, dirt-path random acceptance, cached/dynamic FULL upper support, provider selection and fallback reads, flags 260, rejected writes, partial failures, repeated calls and both random streams are compared. Named providers and overlay/modifier composition use the same world. Wrapped boxes with finite native counts and failure-terminated prefixes of negative-count boxes are included; Rust bounds pathological iteration to 2^20 visits. Block entities are absent in this fixture. Resident chunks, block updates and complete gameplay remain pending." +} diff --git a/benchmarks/rust-block-properties-2026-10-06/scoped-parity.json b/benchmarks/rust-block-properties-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..0b9c3c291 --- /dev/null +++ b/benchmarks/rust-block-properties-2026-10-06/scoped-parity.json @@ -0,0 +1,184 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "registry_states": 35723, + "fixtures": 18096, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "e871d3a01f15616a98ca9227c27a81e4d17e2d57ac4e68a5650a70fa29811497", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "tools/test_block_properties_parity.py": "01cc525e4c02a254a6f7495ec6d04cc09513051ec318144036a776103ca549d6", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "5ce5c6eaa5f8a2557a620e533788217b1eb430654801dcf6135d6c92d7a012ac", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "b7cbb8f464098f22aedbe4d954afd51cbb24d4f3be3f53f3c764015cf9d72d80", + "crates/horizon-world/src/worldgen/feature_region.rs": "3b893ceafbdd1d7b4264f4022dbdb6a7142dfc7001a5cf5c304f5ca7695dfaa0", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "c04a1f7e9409b0cea0ed9b90fd033fc5a398b66f2688b7f6c0583facc473c457", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "16efd52eec5e625a5fdd6d4c0591e2d5b02ab4b641f1a1c193737056842ed7c1", + "crates/horizon-world/examples/block_properties_fixture.rs": "c997c376a79a48e524524d2afff8c4103bfef8fcc75c7424b332faacc17b6097" + }, + "fixtures_sha256": { + ".local/rust-block-properties-parity/inputs.txt": "b4d336ea8fc168df652a71651bb48e41e5f23fc22bb451b6969c8021140cfe53", + ".local/rust-block-properties-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-block-properties-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-block-properties-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99" + }, + "rust_output_sha256": "57375d2d438beec6df6cd4ba199c34c52d102abcca5f624ff62f5024bcf74a96", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "57375d2d438beec6df6cd4ba199c34c52d102abcca5f624ff62f5024bcf74a96", + "matched_output_lines": 197180 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "57375d2d438beec6df6cd4ba199c34c52d102abcca5f624ff62f5024bcf74a96", + "matched_output_lines": 197180 + } + ], + "scope": "All pinned block-definition force-solid, replaceability, liquid and occlusion flags and raw occlusion geometry are imported privately; Rust computes legacy solidity from cached collision shapes and solid rendering from occlusion geometry. All six native face-occlusion full-shape tests are compared for every state and every synthetic shape/occlusion-flag case; Rust caches shared shape masks and retains typed errors for unknown state IDs. Actual native BlockState isSolid, liquid, canOcclude, isSolidRender and no-context canBeReplaced are compared for every state, together with raw cached bounds and synthetic force-flag/cache/shape threshold combinations using the private native solidity calculator and native full-shape test. Item/fluid replacement, block support, survival, dynamic collision and full gameplay remain pending." +} diff --git a/benchmarks/rust-block-push-2026-10-07/scoped-parity.json b/benchmarks/rust-block-push-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..b671b862d --- /dev/null +++ b/benchmarks/rust-block-push-2026-10-07/scoped-parity.json @@ -0,0 +1,217 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 10082, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPushOracle.java": "4c32767ff21d84bda040384671a51704cf669f4d60dee774ca9d4304a40e30b8", + "tools/test_block_push_parity.py": "383488606ac26dd01719e2daccffa2afe704fd5bce07d067f67345f061ac034e", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "9dbc40b69e90a4938cd5a4c9efdf45d22d2115e7255e8c0898d3a9eb2155a7ce", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_properties.rs": "9c78bed0d30c8b9cfaa413b9b81b0bf94861605c13b26754e09b24e83d75a227", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/block_push_fixture.rs": "2fb7fd276f09c2cb691a6f90faa1e8163c6c8bd46024141b7152039f1c5803d7" + }, + "fixtures_sha256": { + ".local/rust-block-push-parity/inputs.txt": "9b2aaef7924c303135e638199a314bd6af20a2b0460220cc036c7803b4ef8206" + }, + "rust_output_sha256": "3ff6d08b527186665c2287304d735c8939a90e8359e8a5b1eae48ab5fc7ff612", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "3ff6d08b527186665c2287304d735c8939a90e8359e8a5b1eae48ab5fc7ff612", + "matched_output_lines": 101006 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "3ff6d08b527186665c2287304d735c8939a90e8359e8a5b1eae48ab5fc7ff612", + "matched_output_lines": 101006 + } + ], + "scope": "Actual Block.pushEntitiesUp with old/new collision shape queries and ordered selected entity lists. Compares unoptimized added-space geometry, world translation, entity query bounds, upward collision displacement, zero-distance teleports, current bounds after previous callbacks and partial state after provider failures. Empty/redundant shapes, partial shapes, large coordinates, degenerate/nonfinite entity boxes and callbacks moving later entities are covered. Collision shapes and entity selections are controlled snapshots; registered replacement dispatch, live entity indexing and actual teleport/network behavior remain separate integration work." +} diff --git a/benchmarks/rust-block-state-codec-2026-10-06/scoped-parity.json b/benchmarks/rust-block-state-codec-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..2c5e1f897 --- /dev/null +++ b/benchmarks/rust-block-state-codec-2026-10-06/scoped-parity.json @@ -0,0 +1,127 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "blocks": 1286, + "integer_properties": 146, + "codec_inputs": 185538, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "tools/test_block_state_codec_parity.py": "51b8174d92fbf2326362141eb66e3c1d4c302bffc3914ce9405b1eb66d8856bb", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "3968e2a337a6a23226c485057c79359e66df16683f00fb4ebc9fabb03910a015", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "476f1542d335eb02fb627b7480d708f4aa6b7f9929f4dbc2c646e15b063cf083", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "92638c9461715244f9fb9aa4c1830e97f0708cd4195ab0b3ce6bcac19d969f63", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "eba4d1fff21be6748ba93fd917b990dc0928673848ff5251fa9f41c3b42a93d9", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "b8afa733ba6289920d8563dea480bcc7efba04f53a3948d514d2a72ed4177348", + "crates/horizon-world/src/worldgen/material_condition.rs": "dca4498ce95e952334f80b67e6518e1a6ad83b3c7100de532d5a38ea63f75b9e", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "134cf93b53a40fb1ed0e0170c90316c80e270773b2968c63dc3f9cef2c941bff", + "crates/horizon-world/src/worldgen.rs": "a5abb8b8b186c90b12eaa1552c0304c952cf40e4cb0f60d2665b34202154893d", + "crates/horizon-world/examples/block_state_codec_fixture.rs": "c053e44f17b3641bf5c45ed05c2fd0c88c3ac2a20cdf385737502d5a865e7a2b" + }, + "fixtures_sha256": { + ".local/rust-block-state-codec-parity/inputs.txt": "3266a7d8ac5b6afbbcb786f6bd85ba98d876eab589e0d4ed4af9d2212235af5e", + ".local/rust-block-state-codec-parity/facts-client.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-block-state-codec-parity/facts-server.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b" + }, + "rust_output_sha256": "fb4b7c50dcfb93170898f0c378aa3893a6ff8a211c1b8a25725dd898cb45ce5b", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "fb4b7c50dcfb93170898f0c378aa3893a6ff8a211c1b8a25725dd898cb45ce5b", + "matched_output_lines": 221261 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "fb4b7c50dcfb93170898f0c378aa3893a6ff8a211c1b8a25725dd898cb45ce5b", + "matched_output_lines": 221261 + } + ], + "scope": "Actual BlockState.CODEC and FULL_CODEC, every pinned runtime block state, compact/default versus full encoding, canonical object keys, namespaces, property omission/invalid fallback, unknown fields, malformed property containers, Java integer-property parsing including signs/leading zeroes/BMP decimal digits and overflow, invalid identifiers/types, duplicate fields. Registry identities, defaults and integer property kinds are imported from both authenticated JARs and must agree. This ports codec behavior over that metadata, not block gameplay. Native warning text, arbitrary malformed JSON/unpaired surrogate text, registry lifecycle/ownership and full material-rule codecs remain pending." +} diff --git a/benchmarks/rust-block-support-2026-10-06/scoped-parity.json b/benchmarks/rust-block-support-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..9d1e28341 --- /dev/null +++ b/benchmarks/rust-block-support-2026-10-06/scoped-parity.json @@ -0,0 +1,172 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "registry_states": 35723, + "cached_states": 35524, + "uncached_states": 199, + "support_queries": 639432, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "7ffafa1a5769872b32652d2f29ed94a9a514a18d7dabc96f46d8776e27cc8fdb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "02acfbae94aee306c5a4e1db7c86c68f7d6156ddd3dd477dc9e9d06e5ca98118", + "tools/test_block_support_parity.py": "48bc64c5a75e1b0a8821412e0318401aacc711700c6032c49effd56a7e2d444e", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_properties.rs": "e74b368012d4d440dcdbd4d9bcaf80495220b90557f0e0c733b0aa21ad03c53c", + "crates/horizon-world/src/block_support.rs": "1c8676c3e85743bc8f64ba30bea52842703e4acce312da8389a5761d0cd112e3", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "8a2834a9347ee2c2db7cf1c86a064907ec06e9ac16ba9cc3936e315fc4ad49ca", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "9f1c2f81745412ccdac0ddf7b5edd33077059e14d498ff8e6b6b385b0a8c9f6a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "7c8f628601a6d835d913c034b0d421a8f83bee6c569033448aac99123ed84a2c", + "crates/horizon-world/src/worldgen/block_predicate.rs": "b5c02b44e759a121d8b4a977e2c52874ab2eaf3aa787a15bae7f5c7eaa2ce503", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "fe61a5e43179a7588737a71782ea246811fe2c8721e74793e1ac018c8eb93c34", + "crates/horizon-world/src/worldgen/feature_region.rs": "2c78e5f1bdb08307f8d982f231f1abbc3306cd54348d9023b86ee6ed3516fd33", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "2f9849fcd492d0b987a15857607004a95380deff4217c48cbbf02a27339b3aa3", + "crates/horizon-world/src/worldgen/placement/context.rs": "bc0ad613ba599b825bdc3e746b6618e5d427d01e0729287269d452e4c7018143", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "fa0616353f07460975ab323357ab280b7f35e7bfe2de6edc08d304316766ed26", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "647f253a7d14d724086b4d146f26295e0da825df86f4adbd6a0e367d5198f3d5", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "821981c893fc84312351503f2be0c06c681d8bc768dade14576697cf047a9f8f", + "crates/horizon-world/examples/block_support_fixture.rs": "a459611c5f0ba22d7f9d3b964ff877dbfa513e5db1cf6e9f5114a73e746fa8ce" + }, + "fixtures_sha256": { + ".local/rust-block-support-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-block-support-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c" + }, + "rust_output_sha256": "6489ad4b567eefca4a3b1c1253b80f19b039a6cec8c5fa56e1d82c569be4d9f8", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "6489ad4b567eefca4a3b1c1253b80f19b039a6cec8c5fa56e1d82c569be4d9f8", + "matched_output_lines": 248867 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "6489ad4b567eefca4a3b1c1253b80f19b039a6cec8c5fa56e1d82c569be4d9f8", + "matched_output_lines": 248867 + } + ], + "scope": "All 35,524 cached block-state support shapes are imported privately and Rust derives FULL/CENTER/RIGID face-support masks. These are compared with actual BlockState.isFaceSturdy cache results across all six directions; all 199 uncached states remain explicitly unsupported. Registry/DataVersion/kind validation, shared shape identities, exact face geometry and full-state queries are covered. Dynamic support selection, block survival and full gameplay remain pending." +} diff --git a/benchmarks/rust-block-survival-2026-10-06/scoped-parity.json b/benchmarks/rust-block-survival-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..5e6e99074 --- /dev/null +++ b/benchmarks/rust-block-survival-2026-10-06/scoped-parity.json @@ -0,0 +1,194 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "supported_blocks": 1286, + "supported_states": 35723, + "survival_rules": 63, + "survival_rule_kinds": 51, + "fluid_tag_files": 10, + "fixtures": 9229463, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "99a396b9b983f6ca9149133251f3ece9aaf76d3d16dafa1f322378212a19490c", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_properties.rs": "b3caf26bd3afc9d10cdcca3f7e794c30abf5ba09afa1fe80ba8f44713acdb274", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "2c882aeb095c27a8edfda1e934ac829102e4be136d53fd83110132150b7293b1", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "8a2834a9347ee2c2db7cf1c86a064907ec06e9ac16ba9cc3936e315fc4ad49ca", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "09f697d8d4e709acacc8e9f7c35c5fd307bab6ab0df4a1339fe760afc655cdab", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "82a424d3b20837dc401005f5fe038616659eb17b5bbd78d0c8c29f8bdeb1104a", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "fe61a5e43179a7588737a71782ea246811fe2c8721e74793e1ac018c8eb93c34", + "crates/horizon-world/src/worldgen/feature_region.rs": "2c78e5f1bdb08307f8d982f231f1abbc3306cd54348d9023b86ee6ed3516fd33", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "cd1d2fe305ad4e205e7e01b32128ff895fa8aacc76fa11f200ad6c7c9fba1f49", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "fa0616353f07460975ab323357ab280b7f35e7bfe2de6edc08d304316766ed26", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "9cc353d474184f4db880c4305137ec6e35a564a983f602c76af39349ecb58541", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "821981c893fc84312351503f2be0c06c681d8bc768dade14576697cf047a9f8f", + "crates/horizon-world/examples/block_survival_fixture.rs": "423254da2830e09eae2682784479ff15ac4617002aa21a1c405ecaa848723bff" + }, + "fixtures_sha256": { + ".local/rust-block-survival-parity/inputs.txt": "2608b945a6aec113a8816f2e097e5ba939a912d2c8cba1569d53e90dde93c0c1", + ".local/rust-block-survival-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-block-survival-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-block-survival-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-block-survival-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-block-survival-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-block-survival-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-block-survival-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-block-survival-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-block-survival-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-block-survival-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-block-survival-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-block-survival-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c" + }, + "rust_output_sha256": "ce804d8fddb7d1b4ae82621b062863be7c568967da1a656db61dd714989dfc93", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "ce804d8fddb7d1b4ae82621b062863be7c568967da1a656db61dd714989dfc93", + "matched_output_lines": 35998488 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "ce804d8fddb7d1b4ae82621b062863be7c568967da1a656db61dd714989dfc93", + "matched_output_lines": 35998488 + } + ], + "scope": "Version-pinned block survival rules are assigned from privately inspected native definition classes and executed in Rust against solid/air/tag tests and unified support geometry. Actual native canSurvive evaluates every supported candidate state, each neighbor state against behavior representatives, changing repeated reads, world-coordinate wrapping, absent/closed/open shulker snapshots, brightness thresholds, independent fluid state sequences and block/entity/light/fluid query failures. All pinned survival families are included; full block placement/update behavior, world/entity lifecycle and full gameplay remain pending." +} diff --git a/benchmarks/rust-blocking-item-damage-2026-10-07/scoped-parity.json b/benchmarks/rust-blocking-item-damage-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..8be7941a5 --- /dev/null +++ b/benchmarks/rust-blocking-item-damage-2026-10-07/scoped-parity.json @@ -0,0 +1,264 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 20895, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockingItemDamageOracle.java": "adeccd0b712a9b5987f663871a86d7d40fbd1b1f9b68c585dc3f7c6fea567c43", + "tools/test_blocking_item_damage_parity.py": "69cb5aa34d08fc19d0fab38da776de27e22290c10020f2444e2c9fa3f9c70f2f", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "9b1ae81c5bd0aea5982e03da1973f15fd46757354b8dd539bbd27449cff45e6a", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "6a67fd660d771c59ffa9f4aa3225a25b56da31ea1079ca2efa4a915be6464179", + "crates/horizon-world/src/item_use.rs": "1d0a3afa61b60d356e81a063da79ec6cd38730315976640a591325fc4c8ab98c", + "crates/horizon-world/src/lib.rs": "902fb8a41e1c805f15c699b66737a274eb8fd21b4a16ff63347f10a5499b34b7", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/blocking_item_damage_fixture.rs": "9dad7235e6fa50ca00723d6d6c1f0838443443fae1d2a90a141e1cf012f7cf64" + }, + "fixtures_sha256": { + ".local/rust-blocking-item-damage-parity/inputs.txt": "0cb79d37f95adc2a95ddd2c18aa8b1e24142fafe12fffe4f9a56e95b64278b0f" + }, + "rust_output_sha256": "c78041fca237ef15364ce2a42dba44d3acd41b852d2c84daadcc52117ab905cc", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "c78041fca237ef15364ce2a42dba44d3acd41b852d2c84daadcc52117ab905cc", + "matched_output_lines": 71800 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "c78041fca237ef15364ce2a42dba44d3acd41b852d2c84daadcc52117ab905cc", + "matched_output_lines": 71800 + } + ], + "scope": "Actual BlocksAttacks hurtBlockingItem into native unenchanted ItemStack durability storage, on non-player, Player and ServerPlayer receivers. Native statistic item capture, client/level guards, scalar item-damage rules, creative immunity, empty-listener advancement ordering, stack mutation/shrink and equipment-break callback copy/slot are compared with Rust composition. Covers scalar float boundaries, absent/invalid durability components, callback storage mutations and failures. Complete components/codecs, enchantment effects, inventory/equipment lifecycle and full combat/world integration remain pending." +} diff --git a/benchmarks/rust-blocking-rules-2026-10-07/scoped-parity.json b/benchmarks/rust-blocking-rules-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..cf2007849 --- /dev/null +++ b/benchmarks/rust-blocking-rules-2026-10-07/scoped-parity.json @@ -0,0 +1,259 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 14360, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockingRulesOracle.java": "ff8cf707d14d3fcb9af6b93b3a9cdc0290094c8bdbeb8c4764d038bc4d47d983", + "tools/test_blocking_rules_parity.py": "0a6e1c943e624ef04895dfdc7f94b24625c5aa511a02e5b96dc2862d4931d48d", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "4ce6bfa959b22b32d3b461614ad65cb22d0d74971e83ca96cc7e22bae9954391", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/blocking_rules_fixture.rs": "af2f202ca110684dbc4f0a03c064c0c07f48939434aeef1f9c562856c7ce586f" + }, + "fixtures_sha256": { + ".local/rust-blocking-rules-parity/inputs.txt": "44c056afe8e3d461155e1a0799b8049b62e2f3945dc2a370f6d444bc05910dca" + }, + "rust_output_sha256": "723e42fa1d78554388b17e82b305aa9fe635e869da646112f7d3c573dde59760", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "723e42fa1d78554388b17e82b305aa9fe635e869da646112f7d3c573dde59760", + "matched_output_lines": 105068 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "723e42fa1d78554388b17e82b305aa9fe635e869da646112f7d3c573dde59760", + "matched_output_lines": 105068 + } + ], + "scope": "Actual BlocksAttacks damage reduction records and ordered sums, native direct HolderSet membership through virtual source typeHolder queries, delay/disable tick rounding and ItemDamageFunction thresholds/flooring. Covers NaN/infinity/signed zero, exact angle boundaries, randomized float bits, membership mutations and query failures. Direction/acos calculation, component codecs, item durability, sounds and full blocking dispatch remain pending." +} diff --git a/benchmarks/rust-blockstate-model-binding-2026-10-06/scoped-parity.json b/benchmarks/rust-blockstate-model-binding-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..8689367b6 --- /dev/null +++ b/benchmarks/rust-blockstate-model-binding-2026-10-06/scoped-parity.json @@ -0,0 +1,114 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "resource_blockstates": 1288, + "unbound_resource_names": [], + "state_definitions": 1288, + "definition_states": 35727, + "definitions": 3802, + "selected_state_results": 687466, + "rejected": 220, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateBindingOracle.java": "d1390b829759dcf4b1e2261eda0e1d80dcb39fb9f4027cc5c20dd7373926b507", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "tools/test_blockstate_binding_parity.py": "d727e749d7e6e76c9855700678c107aabda6b8042d3a986febe9c346b3ece44e", + "tools/test_cuboid_model_parity.py": "4a8b1cdcac335751c23413341ae939eea1c49c38d33d70d0708b8904ab8d0461", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-assets/examples/blockstate_binding_fixture.rs": "e58fdb432f6bfc1e400729baa9b48d4f00955b3143b98b52506b47dd8b065cf8", + "crates/horizon-assets/examples/blockstate_model_fixture.rs": "8f063322e57abdf9361a5a3a3badce2a7e727ee6d5e3947071cb448dfb38e8fd", + "crates/horizon-assets/examples/cuboid_model_fixture.rs": "97609d90e3f6ce340f3590296db2dc778113bb2b33c7d1b54080a1d6f3023f40", + "crates/horizon-assets/examples/model_baking_fixture.rs": "59caca09dd5afd0b70a2e8fdb8e949deb9322f00adc617918b33d1e7e5b0b522", + "crates/horizon-assets/examples/model_resolution_fixture.rs": "c071067140299e49345a6ebd94e15b3b6d853cb9ae11d8de46e3cbdfb8b01f0e", + "crates/horizon-assets/examples/sprite_animation_fixture.rs": "254314d52deda129ab461221d3d8b95323a60730d374e566c1cd599fba85f072", + "crates/horizon-assets/examples/support/mod.rs": "bcf5a6d8a54845982191e037911c24139237771d6afa4b01b1e83c011489c3f5", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake.rs": "0bc519e93ad8200d89543ceb5c811dd82bbeb0e9003b143385c8a03e758dfe65", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate.rs": "1cf26e437744a5c17c909e58335857427910afd10b29e8c518280fee598cfbd3", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb" + }, + "fixtures_sha256": { + ".local/rust-blockstate-binding-parity/inputs.jsonl": "460edd8de45975d342b1587693c76d94782c99f6e61bb7212c1b5655eebb4426", + ".local/rust-blockstate-binding-parity/registry.json": "c400e5438c957d554324afbad198b4baa8ff21d86a59da53d04943a08fb320a5" + }, + "rust_output_sha256": "be66aeb2128b78a5f61f7ee2c48add80e5b31a89eee5a1b5dfa308f16df9f490", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "be66aeb2128b78a5f61f7ee2c48add80e5b31a89eee5a1b5dfa308f16df9f490", + "matched_output_lines": 3802 + } + ], + "scope": "Actual BlockStateModelDispatcher.instantiate and MultiPartModel visual-equality selection on every bundled blockstate definition, including the native fake item-frame definitions, and its native ordered possible states. Synthetic malformed selectors, overlapping recovery, eager multipart errors, per-term negation, combined predicates, integer-property conversion and partial coverage. Property schema and state order are exported from the authenticated client. No weighted random selection, transformed baking, renderer integration or gameplay parity claim." +} diff --git a/benchmarks/rust-blockstate-model-binding-2026-10-06/shared-integer-codec.json b/benchmarks/rust-blockstate-model-binding-2026-10-06/shared-integer-codec.json new file mode 100644 index 000000000..6e14c4cff --- /dev/null +++ b/benchmarks/rust-blockstate-model-binding-2026-10-06/shared-integer-codec.json @@ -0,0 +1,203 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "blocks": 1286, + "integer_properties": 146, + "codec_inputs": 185538, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "tools/test_block_state_codec_parity.py": "51b8174d92fbf2326362141eb66e3c1d4c302bffc3914ce9405b1eb66d8856bb", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "2995b209aa3dc24cfcbba405cf8b97a398efbc0de97bb04ef2f51abb4cd2b84c", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/block_state_codec_fixture.rs": "c053e44f17b3641bf5c45ed05c2fd0c88c3ac2a20cdf385737502d5a865e7a2b" + }, + "fixtures_sha256": { + ".local/rust-block-state-codec-parity/inputs.txt": "3266a7d8ac5b6afbbcb786f6bd85ba98d876eab589e0d4ed4af9d2212235af5e", + ".local/rust-block-state-codec-parity/facts-client.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-block-state-codec-parity/facts-server.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b" + }, + "rust_output_sha256": "fb4b7c50dcfb93170898f0c378aa3893a6ff8a211c1b8a25725dd898cb45ce5b", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "fb4b7c50dcfb93170898f0c378aa3893a6ff8a211c1b8a25725dd898cb45ce5b", + "matched_output_lines": 221261 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "fb4b7c50dcfb93170898f0c378aa3893a6ff8a211c1b8a25725dd898cb45ce5b", + "matched_output_lines": 221261 + } + ], + "scope": "Actual BlockState.CODEC and FULL_CODEC, every pinned runtime block state, compact/default versus full encoding, canonical object keys, namespaces, property omission/invalid fallback, unknown fields, malformed property containers, Java integer-property parsing including signs/leading zeroes/BMP decimal digits and overflow, invalid identifiers/types, duplicate fields. Registry identities, defaults and integer property kinds are imported from both authenticated JARs and must agree. This ports codec behavior over that metadata, not block gameplay. Native warning text, arbitrary malformed JSON/unpaired surrogate text, registry lifecycle/ownership and full material-rule codecs remain pending." +} diff --git a/benchmarks/rust-blockstate-model-choice-2026-10-06/scoped-parity.json b/benchmarks/rust-blockstate-model-choice-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..c54cba2a8 --- /dev/null +++ b/benchmarks/rust-blockstate-model-choice-2026-10-06/scoped-parity.json @@ -0,0 +1,112 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "bundled_weight_vectors": 7, + "fixtures": 6960, + "collections": 111360, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaModelChoiceOracle.java": "2fa964aab1b822e1d61a856cdbe89075c390c68e0ededdd5f1dd65cf9759f27b", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "tools/test_model_choice_parity.py": "ea7d35684dc62fad4a6a3990e116d224059172021f62723b1e73b18e0232d966", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_cuboid_model_parity.py": "4a8b1cdcac335751c23413341ae939eea1c49c38d33d70d0708b8904ab8d0461", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-assets/examples/blockstate_binding_fixture.rs": "e58fdb432f6bfc1e400729baa9b48d4f00955b3143b98b52506b47dd8b065cf8", + "crates/horizon-assets/examples/blockstate_model_fixture.rs": "8f063322e57abdf9361a5a3a3badce2a7e727ee6d5e3947071cb448dfb38e8fd", + "crates/horizon-assets/examples/cuboid_model_fixture.rs": "97609d90e3f6ce340f3590296db2dc778113bb2b33c7d1b54080a1d6f3023f40", + "crates/horizon-assets/examples/model_baking_fixture.rs": "59caca09dd5afd0b70a2e8fdb8e949deb9322f00adc617918b33d1e7e5b0b522", + "crates/horizon-assets/examples/model_choice_fixture.rs": "a4c8a46501d2b5ae7051f10f2307ade048e96c2d330af51cd2431bb44977a99a", + "crates/horizon-assets/examples/model_resolution_fixture.rs": "c071067140299e49345a6ebd94e15b3b6d853cb9ae11d8de46e3cbdfb8b01f0e", + "crates/horizon-assets/examples/sprite_animation_fixture.rs": "254314d52deda129ab461221d3d8b95323a60730d374e566c1cd599fba85f072", + "crates/horizon-assets/examples/support/mod.rs": "bcf5a6d8a54845982191e037911c24139237771d6afa4b01b1e83c011489c3f5", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake.rs": "0bc519e93ad8200d89543ceb5c811dd82bbeb0e9003b143385c8a03e758dfe65", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb" + }, + "fixtures_sha256": { + ".local/rust-model-choice-parity/inputs.jsonl": "493a8bbd1f9b837401d4ed89df530af253163ed4fc90270fefa3b7d1c9f25c10" + }, + "rust_output_sha256": "d5bb4226fa3f927e4d3dfda4b6cb6746018d7443d2965e3c921693dbdfd31262", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "d5bb4226fa3f927e4d3dfda4b6cb6746018d7443d2965e3c921693dbdfd31262", + "matched_output_lines": 6960 + } + ], + "scope": "Actual WeightedVariants.collectParts and MultiPartModel.collectParts with inert observable leaf models and preselected boolean conditions. Every distinct bundled blockstate weight vector plus synthetic singletons, large totals, empty/partial multipart subsets and random graphs. Legacy and xoroshiro streams, six seeds per graph, repeated collection and subsequent nextLong/nextInt verify model choice and draw consumption. No actual model baking, material evaluation, transformed quads, renderer integration or gameplay parity claim." +} diff --git a/benchmarks/rust-blockstate-model-decoding-2026-10-06/scoped-parity.json b/benchmarks/rust-blockstate-model-decoding-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..2a746dff6 --- /dev/null +++ b/benchmarks/rust-blockstate-model-decoding-2026-10-06/scoped-parity.json @@ -0,0 +1,48 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "resource_blockstates": 1288, + "synthetic_definitions": 1351, + "rejected": 468, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateModelOracle.java": "f6e3bacca9dcd04f4dde093c588f4cda435bb0237f57d27521af2dfe409358d2", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "tools/test_blockstate_model_parity.py": "adf720719432c677f37bd10ed6e02089195c1fc4dcf227bb01187c3fd5a1747a", + "tools/test_cuboid_model_parity.py": "4a8b1cdcac335751c23413341ae939eea1c49c38d33d70d0708b8904ab8d0461", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "3b8e27b28da541475b05111f24f2ab96d2e5db88e62d34ab848ac057c09d33e7", + "crates/horizon-assets/Cargo.toml": "d09f70e42198d36c97e6f0be9d3c251f649690824f78ac241158e01171d1f81c", + "crates/horizon-assets/examples/blockstate_model_fixture.rs": "8f063322e57abdf9361a5a3a3badce2a7e727ee6d5e3947071cb448dfb38e8fd", + "crates/horizon-assets/examples/cuboid_model_fixture.rs": "97609d90e3f6ce340f3590296db2dc778113bb2b33c7d1b54080a1d6f3023f40", + "crates/horizon-assets/examples/model_baking_fixture.rs": "59caca09dd5afd0b70a2e8fdb8e949deb9322f00adc617918b33d1e7e5b0b522", + "crates/horizon-assets/examples/model_resolution_fixture.rs": "c071067140299e49345a6ebd94e15b3b6d853cb9ae11d8de46e3cbdfb8b01f0e", + "crates/horizon-assets/examples/sprite_animation_fixture.rs": "254314d52deda129ab461221d3d8b95323a60730d374e566c1cd599fba85f072", + "crates/horizon-assets/examples/support/mod.rs": "bcf5a6d8a54845982191e037911c24139237771d6afa4b01b1e83c011489c3f5", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake.rs": "0bc519e93ad8200d89543ceb5c811dd82bbeb0e9003b143385c8a03e758dfe65", + "crates/horizon-assets/src/blockstate.rs": "ec5fef8eb7cf4c5e367c76d394554e97c598371e4d4dc6029b15c6483a75616c", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541" + }, + "fixtures_sha256": { + ".local/rust-blockstate-model-parity/inputs.jsonl": "9ac61d1c85d00d1c4ca1246a832359459a055077d04401599534885cd6f341b9" + }, + "rust_output_sha256": "53300626594228aeb6fb75923b49430a26a230f729aa0ead7f05080d039c34b0", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "53300626594228aeb6fb75923b49430a26a230f729aa0ead7f05080d039c34b0", + "matched_output_lines": 2639 + } + ], + "scope": "Actual StrictJsonParser and BlockStateModelDispatcher codec used by the pinned resource loader. Every bundled blockstate JSON plus variants, XYZ quarter turns, UV-lock flags, weighted entries, source order, multipart conditions and malformed synthetic cases. No registry binding, property selection, random draw selection, transformed baking, rendered pixels or gameplay parity claim." +} diff --git a/benchmarks/rust-blockstate-transforms-2026-10-06/identity-regression.json b/benchmarks/rust-blockstate-transforms-2026-10-06/identity-regression.json new file mode 100644 index 000000000..e68f4cdb2 --- /dev/null +++ b/benchmarks/rust-blockstate-transforms-2026-10-06/identity-regression.json @@ -0,0 +1,54 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "resource_models": 2883, + "graph_fixtures": 440, + "rejected_roots": 1039, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaModelBakingOracle.java": "d05e04d25ed5e5aef260ce21cac627a79bdc5376326a5cb34ffb98462b79c79b", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_cuboid_model_parity.py": "4a8b1cdcac335751c23413341ae939eea1c49c38d33d70d0708b8904ab8d0461", + "tools/test_model_resolution_parity.py": "d9595f2f1442f1f590b72d2a46600657e79ae103bec3d4c45db98242b964bde0", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/examples/blockstate_binding_fixture.rs": "e58fdb432f6bfc1e400729baa9b48d4f00955b3143b98b52506b47dd8b065cf8", + "crates/horizon-assets/examples/blockstate_model_fixture.rs": "8f063322e57abdf9361a5a3a3badce2a7e727ee6d5e3947071cb448dfb38e8fd", + "crates/horizon-assets/examples/cuboid_model_fixture.rs": "97609d90e3f6ce340f3590296db2dc778113bb2b33c7d1b54080a1d6f3023f40", + "crates/horizon-assets/examples/model_baking_fixture.rs": "a762a8b48f09b5ac5e9c48d4a578b18b700810807fe5d3fc50798365cce1c314", + "crates/horizon-assets/examples/model_choice_fixture.rs": "a4c8a46501d2b5ae7051f10f2307ade048e96c2d330af51cd2431bb44977a99a", + "crates/horizon-assets/examples/model_resolution_fixture.rs": "c071067140299e49345a6ebd94e15b3b6d853cb9ae11d8de46e3cbdfb8b01f0e", + "crates/horizon-assets/examples/sprite_animation_fixture.rs": "254314d52deda129ab461221d3d8b95323a60730d374e566c1cd599fba85f072", + "crates/horizon-assets/examples/support/mod.rs": "bcf5a6d8a54845982191e037911c24139237771d6afa4b01b1e83c011489c3f5", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541" + }, + "fixtures_sha256": { + ".local/rust-model-baking-parity/inputs.jsonl": "aba24d38f4fc1af060502f983923c2f279c016d0fd412d40f6d50093fac1d811" + }, + "rust_output_sha256": "9216be3bbae9e59bb89b6ed780ccedc5608cd4583c8e7527e50b165a0d8d30da", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "9216be3bbae9e59bb89b6ed780ccedc5608cd4583c8e7527e50b165a0d8d30da", + "matched_output_lines": 7100 + } + ], + "scope": "Actual client FaceBakery geometry overload with a real unit-atlas sprite and default JOML math options. Identity blockstate transform, all bundled cuboid geometry and synthetic rotations, rescaling, default/explicit UVs, winding, degenerate and reversed bounds, inherited models and missing materials. Positions, UVs and element matrix coefficients compare by float bits. This does not cover blockstate transforms/UV lock, atlas packing, transparency classification, lighting, GPU rendering or gameplay." +} diff --git a/benchmarks/rust-blockstate-transforms-2026-10-06/scoped-parity.json b/benchmarks/rust-blockstate-transforms-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..8870670e8 --- /dev/null +++ b/benchmarks/rust-blockstate-transforms-2026-10-06/scoped-parity.json @@ -0,0 +1,58 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "resource_definitions": 1288, + "resource_model_transform_pairs": 7884, + "synthetic_models_per_all_128_transforms": 81, + "graph_fixtures": 189, + "rejected_roots": 0, + "baked_quads": 148439, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaModelBakingOracle.java": "d05e04d25ed5e5aef260ce21cac627a79bdc5376326a5cb34ffb98462b79c79b", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "tools/test_blockstate_transform_parity.py": "5236987f561763571fd4d7b07c6ff72e5a34a065f8fc936d38189763de38a789", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_cuboid_model_parity.py": "4a8b1cdcac335751c23413341ae939eea1c49c38d33d70d0708b8904ab8d0461", + "tools/test_model_resolution_parity.py": "d9595f2f1442f1f590b72d2a46600657e79ae103bec3d4c45db98242b964bde0", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/examples/blockstate_binding_fixture.rs": "e58fdb432f6bfc1e400729baa9b48d4f00955b3143b98b52506b47dd8b065cf8", + "crates/horizon-assets/examples/blockstate_model_fixture.rs": "8f063322e57abdf9361a5a3a3badce2a7e727ee6d5e3947071cb448dfb38e8fd", + "crates/horizon-assets/examples/cuboid_model_fixture.rs": "97609d90e3f6ce340f3590296db2dc778113bb2b33c7d1b54080a1d6f3023f40", + "crates/horizon-assets/examples/model_baking_fixture.rs": "a762a8b48f09b5ac5e9c48d4a578b18b700810807fe5d3fc50798365cce1c314", + "crates/horizon-assets/examples/model_choice_fixture.rs": "a4c8a46501d2b5ae7051f10f2307ade048e96c2d330af51cd2431bb44977a99a", + "crates/horizon-assets/examples/model_resolution_fixture.rs": "c071067140299e49345a6ebd94e15b3b6d853cb9ae11d8de46e3cbdfb8b01f0e", + "crates/horizon-assets/examples/sprite_animation_fixture.rs": "254314d52deda129ab461221d3d8b95323a60730d374e566c1cd599fba85f072", + "crates/horizon-assets/examples/support/mod.rs": "bcf5a6d8a54845982191e037911c24139237771d6afa4b01b1e83c011489c3f5", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541" + }, + "fixtures_sha256": { + ".local/rust-blockstate-transform-parity/inputs.jsonl": "4a858b546c52f20ac82911e5f1bbe6f1ce4273a345f4fedb19dfbcfc50782c1d" + }, + "rust_output_sha256": "a0d2017780ea594714a3e623333468d8485b2443f5e7547f8646470754edec4b", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a0d2017780ea594714a3e623333468d8485b2443f5e7547f8646470754edec4b", + "matched_output_lines": 19704 + } + ], + "scope": "Actual FaceBakery with Variant.SimpleModelState and unit-atlas sprite, default JOML math. Every distinct model/XYZ-rotation/UV-lock tuple in bundled blockstates; all 64 quarter-turn combinations with and without UV lock on synthetic geometry. Exact float bits for positions, UVs, element matrices, orientation and all six inverse UV matrices; native Direction.rotate for culling. Includes identity UV lock, degenerate/reversed geometry, element rotations, signed zero and float overflow. Does not establish atlas packing, shader pixels, lighting, render classification, renderer integration or gameplay parity." +} diff --git a/benchmarks/rust-blue-ice-2026-10-06/scoped-parity.json b/benchmarks/rust-blue-ice-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..e2c9f242a --- /dev/null +++ b/benchmarks/rust-blue-ice-2026-10-06/scoped-parity.json @@ -0,0 +1,210 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 79944, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "8166679666563fbe0fe6e1778f1d88a29c939bbc06f57f723ebf2f81731aea9b", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "e871d3a01f15616a98ca9227c27a81e4d17e2d57ac4e68a5650a70fa29811497", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_blue_ice_parity.py": "9d740e5c5e23fa7b63db6755b20e4aefde9fdd43913326f28e54ca0cc19ded45", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "5ce5c6eaa5f8a2557a620e533788217b1eb430654801dcf6135d6c92d7a012ac", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "4fbe5954db1bc333bf3bc627e05b446bbed4bc072ce03c8e1d85137c965db8c4", + "crates/horizon-world/src/worldgen/feature_region.rs": "79e8ce343b0dc80dceb8b214c818b383d9b110540bb8c3b0ac32863a7800e288", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "33f8a02039131338cc0f50c53bc53df9d069f0d787c84699f07bf6e949a0e6f9", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "ae4ac2d751fa8c1de83074a635f0bbd4da75a621aa3f28e6f973597685fe389e", + "crates/horizon-world/examples/simple_block_fixture.rs": "2fd31ed9b7405cf59df24bb0eff4c7eb9bae4cd211e949c3b53cc3626febc9fa" + }, + "fixtures_sha256": { + ".local/rust-blue-ice-parity/inputs.txt": "2e151bccbe1019892ab2321ee658b9d046f33925b4edda5dbc19ceaaba9a3225", + ".local/rust-blue-ice-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-blue-ice-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-blue-ice-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-blue-ice-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-blue-ice-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-blue-ice-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-blue-ice-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-blue-ice-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-blue-ice-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-blue-ice-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-blue-ice-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-blue-ice-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-blue-ice-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-blue-ice-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-blue-ice-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-blue-ice-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "ea6121849b6235043d256ebc9056cc8f93b3a1f8ad13ca76d5997edc9da3f30f", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "ea6121849b6235043d256ebc9056cc8f93b3a1f8ad13ca76d5997edc9da3f30f", + "matched_output_lines": 8954666 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "ea6121849b6235043d256ebc9056cc8f93b3a1f8ad13ca76d5997edc9da3f30f", + "matched_output_lines": 8954666 + } + ], + "scope": "Native BlueIceFeature unit codec, world sea-level gate, origin/below water checks, first non-down packed-ice neighbor and seeding. Every origin and candidate-state classification is compared through failure-terminated prefixes; complete 200-attempt runs cover all packed-ice neighbor masks, ten representative fill states, both random streams and many seeds. Vertical bound draws, signed division, X/Z draw order, six-direction blue-ice adjacency, mutable spreading, flags 2, rejected writes, partial failures, extreme sea levels, wrapped positions and overlay/modifier composition are included. Chunk updates, ice gameplay and full world generation remain pending." +} diff --git a/benchmarks/rust-bonus-chest-2026-10-06/scoped-parity.json b/benchmarks/rust-bonus-chest-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..3349621a4 --- /dev/null +++ b/benchmarks/rust-bonus-chest-2026-10-06/scoped-parity.json @@ -0,0 +1,220 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 42396, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "d2f9843f8fb20d392cf19d14d1cdd99f0422cead8ef12487ff5b3b0e18576726", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "e871d3a01f15616a98ca9227c27a81e4d17e2d57ac4e68a5650a70fa29811497", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_bonus_chest_parity.py": "c882c5a11b12d71b882c0653e48dbb3d9fac1319a366ca003b915a6e80f32c97", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "dcc811a313ff93c477bb9e19325420b3cd0e64c8173d7bac68825cd5e19019a8", + "crates/horizon-world/src/worldgen/feature_region.rs": "ae7552027b2efc0db6299dc14ab04c28615e43b876b5d67644855fd7a047e33e", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "b8fb9fb80a66a851d916f07f15df1a40b6cc95b49e71aaec4d4b4107f13d9f9f", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "6fc51d32f71db3d802354456bfef35133a05fa4cd11ed3ab9ea7287cc9bfcebe", + "crates/horizon-world/examples/simple_block_fixture.rs": "c2827b81f21886027d2a53ff41457586a4c6ed7eafe451906320922b11756ca0" + }, + "fixtures_sha256": { + ".local/rust-bonus-chest-parity/inputs.txt": "df73f89f50423ab3ef6b9615ee795eb2d95be8c5ae6e90ffe1a5a361789c7254", + ".local/rust-bonus-chest-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-bonus-chest-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-bonus-chest-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-bonus-chest-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-bonus-chest-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-bonus-chest-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-bonus-chest-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-bonus-chest-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-bonus-chest-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-bonus-chest-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-bonus-chest-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-bonus-chest-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-bonus-chest-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-bonus-chest-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-bonus-chest-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-bonus-chest-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "e0397cb071d5b1503138824af16d4f2c4c66c1f972825ed9e8d9d5e1cb3f8633", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "e0397cb071d5b1503138824af16d4f2c4c66c1f972825ed9e8d9d5e1cb3f8633", + "matched_output_lines": 1505542 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e0397cb071d5b1503138824af16d4f2c4c66c1f972825ed9e8d9d5e1cb3f8633", + "matched_output_lines": 1505542 + } + ], + "scope": "Native BonusChestFeature unit codec, independently shuffled chunk X/Z coordinates, ordered heightmap candidate search, air short-circuit and second-read empty-context collision, chest writes, conditional randomizable-container loot seeding, north/east/south/west torch survival and writes. Every state participates in collision prefixes; complete searches cover absent/unrelated/actual native chest entities, repeated mutation, rejected writes, injected failures, both random modes, shuffled search exhaustion, sole viable columns, extreme coordinates/heights and placement composition. Actual ChestBlockEntity loot table and seed are compared; fixtures control heights and entity existence independently of writes. Loot generation, inventory behavior, automatic block-entity lifecycle, world updates and complete spawn generation remain pending." +} diff --git a/benchmarks/rust-bulk-section-2026-10-06/scoped-parity.json b/benchmarks/rust-bulk-section-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..a0278a0df --- /dev/null +++ b/benchmarks/rust-bulk-section-2026-10-06/scoped-parity.json @@ -0,0 +1,169 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "block_tag_files": 300, + "fixtures": 8, + "resident_chunks_per_fixture": 4, + "operations": { + "has": 56, + "get": 72022, + "set": 71966, + "world": 71966, + "height": 32, + "reset": 8 + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBulkSectionOracle.java": "aa235a47cfa64e4daf3c38901f80534957e4418e4cba1b726deaedd83ce5289f", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_bulk_section_parity.py": "f3e1415ec54a42e04406f278375eec0a0d7b4dff7e4e550e630a3b4453b90f55", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "c215156f2ecf7faf214b3d89e0829b65d54f4ff6d134d778ec941f18a606a327", + "crates/horizon-world/src/worldgen/block_predicate.rs": "dd8cbda2ec110444950f0b31bf4e088897eab0994674a91568c7b063f8f16210", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "2297b194514925688dba25016a69d5ba5eb8b869bdfff28f2e611a6742ac5954", + "crates/horizon-world/src/worldgen/feature_region.rs": "4a95a30c0987d97e671f84380e13ddea070ad81f996baa65b2a06c4d892971c7", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "1b976aa4dd2516468196d0af3451e3fdd037493a14d269f54ebdd7254055e05e", + "crates/horizon-world/src/worldgen/placement/context.rs": "b36dfd9297896e62770f2085cf934fc08ebd4c030ecc7ae17d864e819a113201", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "68ecf36954fea5705436d486e9be93836933fd56779022afeb881a0399d6a674", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "828ef13e9d498037598d2ea86e3b46fa2713a35818ddac1d883b04ecceefd5ce", + "crates/horizon-world/examples/bulk_section_fixture.rs": "543dcae1cda92b0a14fd00c853f55c1af516240def6bdcd2612539b0ed955157" + }, + "fixtures_sha256": { + ".local/rust-bulk-section-parity/inputs.txt": "44b1c8c133d9c868bbdbe5fd577c01e6a5e1fa6382731211dcb35919975eff60", + ".local/rust-bulk-section-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-bulk-section-parity/facts-client.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0", + ".local/rust-bulk-section-parity/facts-server.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0" + }, + "rust_output_sha256": "2628afc7a43f0eda9513298cb5a05dd1e0a225e7ae4e643b2dec03f21beb068f", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "2628afc7a43f0eda9513298cb5a05dd1e0a225e7ae4e643b2dec03f21beb068f", + "matched_output_lines": 959640 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "2628afc7a43f0eda9513298cb5a05dd1e0a225e7ae4e643b2dec03f21beb068f", + "matched_output_lines": 959640 + } + ], + "scope": "Actual BulkSectionAccess over resident ProtoChunks: raw reads/writes, all-air chunk-read collapse, outside-height AIR, absent sections, missing neighbors, packed-key caching and aliasing, cache reset and complete final raw sections/heightmap words. Every pinned block state is inserted and read with both preprimed and lazy heightmaps. Rust holds an exclusive region borrow instead of Java section acquire/release locks. Concurrent ownership, ordinary ore geometry, region side effects and complete gameplay remain pending." +} diff --git a/benchmarks/rust-bundle-weight-2026-10-07/scoped-parity.json b/benchmarks/rust-bundle-weight-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..d6c1a90df --- /dev/null +++ b/benchmarks/rust-bundle-weight-2026-10-07/scoped-parity.json @@ -0,0 +1,282 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 12796, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBundleWeightOracle.java": "e4631044205d24458f6f2c14b6a62287a6835882ee6d090fc0d96bf3a8615986", + "tools/test_bundle_weight_parity.py": "a3aa08a557e58edbb4d424f9acc7ff5f15915cd6814100ef0427a1417ad00a2d", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "d9ab7958a55c695142403195244b14946caa2bf527bcbb4193b1372cd748e9a8", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/lib.rs": "f5b9d25492179c0970da9f3603bf5efffdd60e8e4800f6f89d37b23d61874afa", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "50f0ac128bfcc5c9b2a43bfbb4f0d46f63693bea3bdcb64b15318a3dec28b9d5", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/bundle_weight_fixture.rs": "2f9ee00a49604d0a53e09422b8ef56b27101a45233a9e681b427e7dd30ed11bc" + }, + "fixtures_sha256": { + ".local/rust-bundle-weight-parity/inputs.txt": "f9a0139f213cae06745400b7df4adcbf81f6413fd1bfb3e884a1c7fa826a2823" + }, + "rust_output_sha256": "7756159168b93831c0a022c777887e25bd3fc8f3598fde6c9f63e0dc3b1ce32a", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "7756159168b93831c0a022c777887e25bd3fc8f3598fde6c9f63e0dc3b1ce32a", + "matched_output_lines": 137332 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "7756159168b93831c0a022c777887e25bd3fc8f3598fde6c9f63e0dc3b1ce32a", + "matched_output_lines": 137332 + } + ], + "scope": "Actual BundleContents.weight with ItemStackTemplate contents, nested bundles, bee presence, changed holder prototypes and memoized success/error results. Direct pinned Apache Fraction construction/add/multiply probes verify intermediate checked arithmetic, signs, reduction and overflow. Native ItemStack.validateStrict additionally checks container sizes, bundle sizes and weight, charged projectile sizes, empty visibility and top-level scalar constraints; follow-up weight probes expose lazy validation order. Rust typed component/schema adapters remain fixture-local; full bundle inventory operations, codecs, item-use integration and complete gameplay integration remain pending." +} diff --git a/benchmarks/rust-canonical-collision-2026-10-06/contextual-regression.json b/benchmarks/rust-canonical-collision-2026-10-06/contextual-regression.json new file mode 100644 index 000000000..2f1e5a243 --- /dev/null +++ b/benchmarks/rust-canonical-collision-2026-10-06/contextual-regression.json @@ -0,0 +1,218 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 785906, + "block_states": 35723, + "independent_cached_states": 35492, + "context_sensitive_cached_states": 32, + "uncached_states": 199, + "audit_positions_per_cached_state": 7, + "audit_context_types": 2, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java": "bcc421fd7948ae7385e346e3de19c58222a2cad6b39122cac241cf70f9cc6071", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaContextualCollisionAudit.java": "f53402c8830a82defe82538ec4c894df769aafdc644b43c824240adc4af7745d", + "tools/test_collision_context_parity.py": "75d6f01e072867d2bd286d2e518e123fcfe055a11ac1705ec99ecec3975cb8d2", + "tools/test_contextual_collision_parity.py": "6108a0d9e0c4e1592a336c35d096fb623eccff8ed136e31d8984c2365f66d6e9", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "5d0f5ded49d34bb999d73a4e1b89a318fa66c0246e9904d3cbf810d3aa370312", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "f0997b21c8083de75f4f8883e8855e1d2d9f1876a2053a8a97b081deed5b0bcd", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/collision_context_fixture.rs": "cf777882b8999174682c1c29fa8df7202b67acf2ca6dc063f674a52996341d4b" + }, + "fixtures_sha256": { + ".local/rust-contextual-collision-parity/inputs.txt": "394a00fda537f7af0840ed7dd6664581c04f4af9b383107db81df21ca9d0915f", + ".local/rust-contextual-collision-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-contextual-collision-parity/cached-collision.nbt": "4a274cd720a1bda585b02f50f16e90246576679e1e173c214548c5cbf607ab2d" + }, + "rust_output_sha256": "9b328cde8c73c2e54870991bf847c966093f067b41980e1e7daa1a26558e424d", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "9b328cde8c73c2e54870991bf847c966093f067b41980e1e7daa1a26558e424d", + "matched_output_lines": 2391334, + "audited_states": 35723, + "audit_sha256": "c109c808ca5b2314fc5fdfce744296e7ae0de45c00d31d38bd701a493ae6c4c5" + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "9b328cde8c73c2e54870991bf847c966093f067b41980e1e7daa1a26558e424d", + "matched_output_lines": 2391334, + "audited_states": 35723, + "audit_sha256": "c109c808ca5b2314fc5fdfce744296e7ae0de45c00d31d38bd701a493ae6c4c5" + } + ], + "scope": "Integrated contextual dispatcher across every pinned block state, eleven context variants and both always-fluid flag inputs. The native audit verifies 35,492 cached states return the identical cached shape without world/context queries at seven positions with interface and entity context providers that reject queries; liquid states query context instead. Integrated outputs compare cache-relative shape equality or full uncached geometry and ordered entity/world callbacks. Missing block entities are used here; active shulker/piston states retain separate coverage. Experimental minecart contexts, entity lifecycle and live movement remain pending." +} diff --git a/benchmarks/rust-canonical-collision-2026-10-06/scoped-parity.json b/benchmarks/rust-canonical-collision-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..a04d1a01f --- /dev/null +++ b/benchmarks/rust-canonical-collision-2026-10-06/scoped-parity.json @@ -0,0 +1,215 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "inputs_sha256": "ec4d8458f10935a5e68dd27e69af493bd38463eb0a59747741cc7a5bd49957c7", + "rust_output_sha256": "834038ea44d19d97fd11c165cfab2f2fea84b434fea57dc1aa94182548bd3a98", + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "tools/test_collision_parity.py": "d030af509ae46aeb10c6257ac03bb324821ca09d2eeb10787a2eb17e9f7727c5", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "5d0f5ded49d34bb999d73a4e1b89a318fa66c0246e9904d3cbf810d3aa370312", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "f0997b21c8083de75f4f8883e8855e1d2d9f1876a2053a8a97b081deed5b0bcd", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/collision_fixture.rs": "2cc76249dc8bdb57b9ff490e582ebf9924c592c43eab20f1f6a0770763985e86" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "834038ea44d19d97fd11c165cfab2f2fea84b434fea57dc1aa94182548bd3a98", + "matched_output_lines": 1132980, + "registry_states": 35723, + "cached_states": 35524, + "uncached_states": 199, + "unique_shapes": 6093, + "unique_grids": 330, + "queries": 213144 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "834038ea44d19d97fd11c165cfab2f2fea84b434fea57dc1aa94182548bd3a98", + "matched_output_lines": 1132980, + "registry_states": 35723, + "cached_states": 35524, + "uncached_states": 199, + "unique_shapes": 6093, + "unique_grids": 330, + "queries": 213144 + } + ], + "canonical_identities": { + "empty_states": 5566, + "block_states": 3348, + "other_cached_states": 26610 + }, + "scope": "Pinned no-context cached collision branch only. Registry identity validation, resident section lookup, grids, native canonical empty/block identities distinct from equal geometry, discrete extrema including empty shapes, greedy boxes, bounds, translated collide, ray hits, closest points and moved cell lookup. Uncached and entity-context behavior have separate comparison suites." +} diff --git a/benchmarks/rust-canyon-carver-2026-10-06/scoped-parity.json b/benchmarks/rust-canyon-carver-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..c548896a0 --- /dev/null +++ b/benchmarks/rust-canyon-carver-2026-10-06/scoped-parity.json @@ -0,0 +1,146 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 508, + "carve_attempts": 924, + "bundled_canyon_definitions": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCanyonCarverOracle.java": "d8456c8f79a1d9094ddfd2b83a73c2e6593c5bb2eeca69227326b1cb47c817b7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAnchorOracle.java": "226628d98b89aadbdd374936575d033945e7064a900dbb050c662204dbc7e119", + "tools/test_canyon_carver_parity.py": "0a69288d2acb4f7b467ce7104bf6f11a432db71e214c61282c5987ffa8243204", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "476f1542d335eb02fb627b7480d708f4aa6b7f9929f4dbc2c646e15b063cf083", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/placement.rs": "54131e84ee04b6605d13584c1fbfd5f8c19e746455577febf6aaeebe5a51c2b1", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "42823918deec5e149dc729a95bfe54aa32d91604098d5eb8452da0162d557d22", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "1ae40b843721d0f1e1c849b984e0a065aacda6e1384e21fc599cda261f996945", + "crates/horizon-world/src/worldgen.rs": "810bac2405b8370d2851df54eca5dcbb7a762492eafaedfce333670707408da5", + "crates/horizon-world/examples/canyon_carver_fixture.rs": "351a20f891b7f87251341336089138200facc660bbe924ac378f25829b4bba2d" + }, + "fixtures_sha256": { + ".local/rust-canyon-carver-parity/inputs.txt": "4b8d8d6d7d309ee3f5b7537848eca0279673d364aca55caaff3072e7288b8bd1", + ".local/rust-canyon-carver-parity/carvers.json": "cff93e18a087786ad09d04c329293a0d7f4c4944cabecb4d618cee2dbc519096" + }, + "rust_output_sha256": "b02ebaf90c2638965b1b890b75ec5b953b5ede9790250a42bb5886eb85035351", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "b02ebaf90c2638965b1b890b75ec5b953b5ede9790250a42bb5886eb85035351", + "matched_output_lines": 1094517 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "b02ebaf90c2638965b1b890b75ec5b953b5ede9790250a42bb5886eb85035351", + "matched_output_lines": 1094517 + } + ], + "scope": "Actual WorldCarver.DIRECT_CODEC, CanyonWorldCarver.isStartChunk and CanyonWorldCarver.carve using the independently authenticated bundled canyon definition. Compares ordered output cells including duplicates, partial output failures, resulting mask intervals and subsequent random longs across repeated invocations. Covers both outer random modes, local legacy streams, height-dependent width factors, horizontal/vertical radius variation, four generation heights, negative/distant/extreme coordinates and adjacent/far origin chunks. Custom shapes exercise width smoothness, path length, degenerate radii and failure branches; malformed selected codec fields are tested. Gaussian/weighted provider codecs, neighbor-carver seeding/biome selection, blending and complete worlds remain outside this scope. Rust bounds paths to 4096 steps, height to 4064 and total candidates to 2^24 per invocation." +} diff --git a/benchmarks/rust-carving-geometry-2026-10-06/scoped-parity.json b/benchmarks/rust-carving-geometry-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..b579052ea --- /dev/null +++ b/benchmarks/rust-carving-geometry-2026-10-06/scoped-parity.json @@ -0,0 +1,141 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 15, + "ellipsoids": 690, + "reach_queries": 5536, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCarvingGeometryOracle.java": "558ac2108421822d7def914969e99ff10a44ca9ff63932e747f5d0a1d8946ef2", + "tools/test_carving_geometry_parity.py": "5c6548495da71606ab5e47d12acf8633c6713e79662193d48a1fc7f030bee208", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "476f1542d335eb02fb627b7480d708f4aa6b7f9929f4dbc2c646e15b063cf083", + "crates/horizon-world/src/worldgen/carver.rs": "0a75ec71570f80f8800c349c3b612e0d0bc35b6009d1b66a0ae1056be1eb8e3a", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/height_provider.rs": "c9a148cdbd392b4ae998e466120c0870eb121736366a160347e1a697bdad914f", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "42823918deec5e149dc729a95bfe54aa32d91604098d5eb8452da0162d557d22", + "crates/horizon-world/src/worldgen/value_provider.rs": "7083e7a494894e080c252e7fb485651eb9f54e72043122e4f2b5bee5749e6184", + "crates/horizon-world/src/worldgen.rs": "58527080379e82d834763d661ebf51fb8f9a83f6d530c85ddf26bf0ea2d53f7d", + "crates/horizon-world/examples/carving_geometry_fixture.rs": "acf2c1b2c0c55726a6adbe185adb81505e163100e11ef739d8dcec60bda9f25b" + }, + "fixtures_sha256": { + ".local/rust-carving-geometry-parity/inputs.txt": "a3ccf40f7eec666483d901d3de637ba37badb306652f43fc60159fdaa8a702b2", + ".local/rust-carving-geometry-parity/reach.txt": "fb9945ca459d53d1c07c39b53d3a98628f65a3caa90954255c66e0d010aa9647" + }, + "rust_output_sha256": "4b40510463e96accae26cfd7cbf617b15b8fc6a53d704040674ea444a25dae6a", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "4b40510463e96accae26cfd7cbf617b15b8fc6a53d704040674ea444a25dae6a", + "matched_output_lines": 106699 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "4b40510463e96accae26cfd7cbf617b15b8fc6a53d704040674ea444a25dae6a", + "matched_output_lines": 106699 + } + ], + "scope": "Actual WorldCarver.carveEllipsoid and canReach methods. Compares ordered normalized-coordinate skip queries, output cells, partial output on callback failure and resulting mask column runs; canReach includes Java float thickness arithmetic and signed step overflow. Corpus covers negative/extreme/distant chunk coordinates, output-height clipping, small/large/zero/negative radii, boundaries and IEEE NaNs/infinities/subnormals. NaN trace values are canonicalized. This validates shared geometric primitives, not randomized cave/canyon paths, codecs, provider sampling, biome carver selection or complete worlds." +} diff --git a/benchmarks/rust-carving-mask-2026-10-06/scoped-parity.json b/benchmarks/rust-carving-mask-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..cc7b8b436 --- /dev/null +++ b/benchmarks/rust-carving-mask-2026-10-06/scoped-parity.json @@ -0,0 +1,134 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 28, + "operations": 6988, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCarvingMaskOracle.java": "7d6d395e9e8659cb00e6ec7c24f9f0e7f59477198533137f9428eabfb592c7e6", + "tools/test_carving_mask_parity.py": "1f0b8f800ee42a84c69cb3c23a83e1463eb4941f9a996499d0eb665c3ffdc779", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving.rs": "f6042ae85ec6dda6803ff353de035bf00c499f383b6933994a424e0dfe196b93", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "476f1542d335eb02fb627b7480d708f4aa6b7f9929f4dbc2c646e15b063cf083", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "04ac9130138ea4ce67fc43f7701f5036972984724ffcd49bfe857d0693361d87", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "4ab2681a45108e5d2ea6fb761ea1cb7fa40b72833fa6190d2efe34ce29845c21", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "42823918deec5e149dc729a95bfe54aa32d91604098d5eb8452da0162d557d22", + "crates/horizon-world/src/worldgen.rs": "3ea3386996321113027dcf51d918d29d363ac1944b7c146a7f1383d17a50967b", + "crates/horizon-world/examples/carving_mask_fixture.rs": "0e3069cf0b4cabae8b4016e034727465e123cce2fd389acf448bc053106677d0" + }, + "fixtures_sha256": { + ".local/rust-carving-mask-parity/inputs.txt": "07a5dceb375ea41d9d2acd80b5d6951bf16f7829c3c656a785f486d373e6a4cc" + }, + "rust_output_sha256": "854a0f1074132dacec5989aa92fcf38258c84cbc800aabc6d7e580256bf06175", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "854a0f1074132dacec5989aa92fcf38258c84cbc800aabc6d7e580256bf06175", + "matched_output_lines": 45742 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "854a0f1074132dacec5989aa92fcf38258c84cbc800aabc6d7e580256bf06175", + "matched_output_lines": 45742 + } + ], + "scope": "Actual CarvingMask construction, carve, isEmpty and visit methods. Compares packed vertical-run traversal, splitting across columns, dense/sparse masks, duplicate writes, word boundaries, coordinate overflow and positive aliases, negative index failures, callback additions during traversal and mutations retained after visitor failures. Rust bounds height to 1..4064 and positive index growth to 2^24 bits; corpus indices remain below 2^20. This validates masks, not cave/canyon generation, mask application, aquifers, blending or complete terrain generation." +} diff --git a/benchmarks/rust-cave-carver-2026-10-06/scoped-parity.json b/benchmarks/rust-cave-carver-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..27f95ecc1 --- /dev/null +++ b/benchmarks/rust-cave-carver-2026-10-06/scoped-parity.json @@ -0,0 +1,146 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 415, + "carve_attempts": 739, + "bundled_cave_definitions": 3, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCaveCarverOracle.java": "28e029f0d535f8529291124337855c2d7c1b123ec77b7728938e5afeb9be4c3b", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAnchorOracle.java": "226628d98b89aadbdd374936575d033945e7064a900dbb050c662204dbc7e119", + "tools/test_cave_carver_parity.py": "11ec1ceb25fb0d8ec193d619c8bcc744b2c5a9105c2d3ac769a802f59a5b63d7", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "476f1542d335eb02fb627b7480d708f4aa6b7f9929f4dbc2c646e15b063cf083", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/placement.rs": "54131e84ee04b6605d13584c1fbfd5f8c19e746455577febf6aaeebe5a51c2b1", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "42823918deec5e149dc729a95bfe54aa32d91604098d5eb8452da0162d557d22", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "1ae40b843721d0f1e1c849b984e0a065aacda6e1384e21fc599cda261f996945", + "crates/horizon-world/src/worldgen.rs": "810bac2405b8370d2851df54eca5dcbb7a762492eafaedfce333670707408da5", + "crates/horizon-world/examples/cave_carver_fixture.rs": "2aae82674be65a4fc0e13975b2f4185b66fd73a553784d2fa5be3875c3d65c91" + }, + "fixtures_sha256": { + ".local/rust-cave-carver-parity/inputs.txt": "44cc4a5532fe65dcc38d70f708b8f72dcac4df1b04cafc131c5ffecc5a8588bd", + ".local/rust-cave-carver-parity/carvers.json": "cff93e18a087786ad09d04c329293a0d7f4c4944cabecb4d618cee2dbc519096" + }, + "rust_output_sha256": "bed22be613f5b1d8caa0d75546afb4e6cee33222d8d9b51004acff70e1a03d7d", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "bed22be613f5b1d8caa0d75546afb4e6cee33222d8d9b51004acff70e1a03d7d", + "matched_output_lines": 882005 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "bed22be613f5b1d8caa0d75546afb4e6cee33222d8d9b51004acff70e1a03d7d", + "matched_output_lines": 882005 + } + ], + "scope": "Actual WorldCarver.DIRECT_CODEC, CaveWorldCarver.isStartChunk and CaveWorldCarver.carve using all three independently authenticated bundled cave definitions. Compares ordered output cells including duplicates, partial output failures, resulting mask intervals and subsequent random longs across repeated invocations. Covers both outer random modes, local legacy tunnel streams, rooms, branching, thickness bias, floor thresholds, negative/distant/extreme target coordinates and adjacent/far origin chunks. Explicit custom distributions force path and failure branches; malformed selected codec fields are tested. Gaussian/weighted provider codecs, canyon paths, neighbor-carver seeding/biome selection, blending and complete generated worlds remain outside this scope. Rust bounds count to 4096 and total candidates to 2^24 per invocation." +} diff --git a/benchmarks/rust-chorus-plant-2026-10-06/scoped-parity.json b/benchmarks/rust-chorus-plant-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..017a04167 --- /dev/null +++ b/benchmarks/rust-chorus-plant-2026-10-06/scoped-parity.json @@ -0,0 +1,221 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 254296, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "d2f9843f8fb20d392cf19d14d1cdd99f0422cead8ef12487ff5b3b0e18576726", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "e871d3a01f15616a98ca9227c27a81e4d17e2d57ac4e68a5650a70fa29811497", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_chorus_plant_parity.py": "e28dd04628cf781ddfe5f90d17626253859aab1bc9be699790912ec8008340ae", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "adcf1af2df04cd2c2de1c3726cb9023ef03a504b0c6ec2f12b7f47d39b4d50d0", + "crates/horizon-world/src/worldgen/feature_region.rs": "ae7552027b2efc0db6299dc14ab04c28615e43b876b5d67644855fd7a047e33e", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "b8fb9fb80a66a851d916f07f15df1a40b6cc95b49e71aaec4d4b4107f13d9f9f", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "0ccfe9532f08efe4f841d779b86239e9c55b36670b50b4aaafb15c3177026d44", + "crates/horizon-world/examples/simple_block_fixture.rs": "c2827b81f21886027d2a53ff41457586a4c6ed7eafe451906320922b11756ca0" + }, + "fixtures_sha256": { + ".local/rust-chorus-plant-parity/inputs.txt": "69f0f10494984b73e855c2609931bb1df1d71edcfe22b52c8cb72168a549cf4a", + ".local/rust-chorus-plant-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-chorus-plant-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-chorus-plant-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-chorus-plant-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-chorus-plant-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-chorus-plant-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-chorus-plant-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-chorus-plant-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-chorus-plant-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-chorus-plant-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-chorus-plant-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-chorus-plant-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-chorus-plant-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-chorus-plant-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-chorus-plant-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-chorus-plant-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "ca7419b58f7a11619335892948ff291d1d48a0c890bffa2fffc812c8f5ff1ab7", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "ca7419b58f7a11619335892948ff291d1d48a0c890bffa2fffc812c8f5ff1ab7", + "matched_output_lines": 8083367 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "ca7419b58f7a11619335892948ff291d1d48a0c890bffa2fffc812c8f5ff1ab7", + "matched_output_lines": 8083367 + } + ], + "scope": "Native ChorusPlantFeature unit codec, origin air/support gates, ChorusFlowerBlock.generatePlant and depth-bounded recursive growth, horizontal clearance with parent exclusion, branch-distance bounds, connection refreshes in below/above/north/east/south/west read order and age-five terminal flowers. Every state exercises root/support gates and five neighbor connection prefixes. Full runs cover 1024 seeds per RNG, every early world-call failure, rejected writes, repeated mutation, random obstacles, wrapped coordinates and feature composition. Ordered reads/writes, final state maps and subsequent RNG draws are compared. Neighbor-update execution, random tick growth, drops, rendering and complete End generation remain pending." +} diff --git a/benchmarks/rust-chunk-stage-2026-10-06/scoped-parity.json b/benchmarks/rust-chunk-stage-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..66324076a --- /dev/null +++ b/benchmarks/rust-chunk-stage-2026-10-06/scoped-parity.json @@ -0,0 +1,161 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "block_tag_files": 300, + "fixtures": 32, + "operation_counts": { + "stage": 392, + "set": 151562, + "get": 80086, + "query": 151922, + "dump": 32, + "prime": 120 + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkStageOracle.java": "dea4639bd8b0196b0044d30a046d9971200f1fcc32c29b5d2202a996f7dc0161", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_chunk_stage_parity.py": "655f1fd5e79bddad3a1d2a1b7b51bb61d6e7fce6aece086c32bc0cbacac5acc3", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_predicate.rs": "dd8cbda2ec110444950f0b31bf4e088897eab0994674a91568c7b063f8f16210", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/placement/chain.rs": "76832dd4f76b44edfcc8bd52d8115f6e30684bfaea0e0b959ba060f07cc3483d", + "crates/horizon-world/src/worldgen/placement/context.rs": "b36dfd9297896e62770f2085cf934fc08ebd4c030ecc7ae17d864e819a113201", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "f9d264985d0ce6a7eb91a4f559661efbecc5a3fe097ce559f6acbcf0132c8c87", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "fa7ef419e62e67c8ff226f45ced1f7cc4e6f1cc583684476cced17be49b8ab46", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "1ae40b843721d0f1e1c849b984e0a065aacda6e1384e21fc599cda261f996945", + "crates/horizon-world/src/worldgen.rs": "edc1d675acc52d264486a3c8c56e93a21ebf2c6a73da912f35b8fa2a7233cdde", + "crates/horizon-world/examples/chunk_stage_fixture.rs": "ea09c70cf987fc5d332ed993de11a553f30a70d40852f22b80b26c555ffcab06" + }, + "fixtures_sha256": { + ".local/rust-chunk-stage-parity/inputs.txt": "401e093fd21a566637a9ee3d28afec5c2f0be6b538eda69ec0a7d184af545c5c", + ".local/rust-chunk-stage-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-chunk-stage-parity/facts-client.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0", + ".local/rust-chunk-stage-parity/facts-server.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0" + }, + "rust_output_sha256": "95dbf7a1cade1004b7055dc131e45af8f3cecc1ffe2f194ad816a831bc2d9975", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "95dbf7a1cade1004b7055dc131e45af8f3cecc1ffe2f194ad816a831bc2d9975", + "matched_output_lines": 8090090 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "95dbf7a1cade1004b7055dc131e45af8f3cecc1ffe2f194ad816a831bc2d9975", + "matched_output_lines": 8090090 + } + ], + "scope": "Actual ProtoChunk.setBlockState, direct section reads, heightmap presence/packed data and pre-light persisted-status assignments for empty, structure starts, structure references, biomes, terrain and features. Every pinned block state is inserted/removed under both heightmap groups. Forward/backward status assignments, untouched stale maps, missing-map priming, explicit priming, empty-section AIR writes, cave/void-air collapse, outside-height writes and wrapped X/Z coordinates are compared. Facts are independently exported from both authenticated JARs; block tags are resolved in Rust. This covers stage-dependent mutation and map selection, not the scheduler, persisted metadata, retro-generation, block entities, lighting, whole region behavior or a complete generated world." +} diff --git a/benchmarks/rust-chunk-status-2026-10-06/scoped-parity.json b/benchmarks/rust-chunk-status-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..56cf1e66d --- /dev/null +++ b/benchmarks/rust-chunk-status-2026-10-06/scoped-parity.json @@ -0,0 +1,198 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "statuses": 10, + "ordered_pairs": 100, + "codec_cases": 2065, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkStatusOracle.java": "50b287c20853c398257cfe32d59d30bdae602eb815a2b909dfb65dc776ccc835", + "tools/test_chunk_status_parity.py": "635d424d4d8d4feda9f43b4bb1d42bb2718d234281376ef57eabc7dd2ab43866", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "cee5dbc01ee20ed1ae7cd29315af9916a702e078815dd0e9bf8da83cba3aa70c", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "18d51343c00ad3a551d02f6ddfa37d1be23d481e1861ce6299d0a66991bc7074", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "ee5a4efcd63536fce4fc3638bb014d4f0943c1126c6966d9d379484d4b8efec1", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/chunk_status_fixture.rs": "60e933cb1f237c10de36af19474e430271e0d44370ffe137cef24bf79fb2bb73" + }, + "fixtures_sha256": { + ".local/rust-chunk-status-parity/inputs.txt": "45bd4c854962b045a617bcc453ef847d16d33629104f227543a35b1c2c628c47" + }, + "rust_output_sha256": "704de8d98e7c7d93b6bd02dd87be27cfbeb6960acfa3d7043b69ce3a1a9d385c", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "704de8d98e7c7d93b6bd02dd87be27cfbeb6960acfa3d7043b69ce3a1a9d385c", + "matched_output_lines": 4232 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "704de8d98e7c7d93b6bd02dd87be27cfbeb6960acfa3d7043b69ce3a1a9d385c", + "matched_output_lines": 4232 + } + ], + "scope": "Actual pinned ChunkStatus status list, ordering and maximum for all pairs, parent identity, chunk kind, selected heightmaps, direct byName fallback and NBT codec acceptance/encoding. All registered names cover qualified, unqualified and empty-namespace forms; unknown, legacy, malformed, random and nonstring inputs are checked. Codec error text is normalized rather than compared. Rust pre-light chunk metadata uses these same status definitions; this does not execute generation steps, implement lighting, or establish full chunk lifecycle parity." +} diff --git a/benchmarks/rust-climbing-2026-10-07/scoped-parity.json b/benchmarks/rust-climbing-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..7a582732a --- /dev/null +++ b/benchmarks/rust-climbing-2026-10-07/scoped-parity.json @@ -0,0 +1,236 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 236234, + "registry_states": 35723, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaClimbingOracle.java": "ef4e58f3a1688e247998f2bc7126a73f6ec78c6fbf0682defecd7f063203d3cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_climbing_parity.py": "d9c8c3b7e55db977ff346bd10aea14493de594a953696e84de65e422f96be54d", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/examples/climbing_fixture.rs": "e46c1bd290d579bb66491b353be0530b9d4779fbbd728ccff50fd8d843e6c178", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "790e073b2407ee80bd53556d780eaf8ba83da5c58fcef191cacf59eefd772b26", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "fixtures_sha256": { + ".local/rust-climbing-parity/inputs.txt": "d0e60c8dee10288a70cc74745c3dc007e117c3523bdcc7f0d73717d540382b90", + ".local/rust-climbing-parity/info.json": "4b05610806620583f70f14cb7c049903e05f18cb5811b3de24418a1b95c00f9d", + ".local/rust-climbing-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-climbing-parity/tags.json": "5e1301e5a9abf7e4de93af5dae3a157e852dbdb4ea345c2eb626305a605d4f98" + }, + "rust_output_sha256": "a2413388f3d87ff48369f8252d0b91fc6ce79c0b60db5fce0b3489f2a84c8290", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a2413388f3d87ff48369f8252d0b91fc6ce79c0b60db5fce0b3489f2a84c8290", + "matched_output_lines": 3820054 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "a2413388f3d87ff48369f8252d0b91fc6ce79c0b60db5fce0b3489f2a84c8290", + "matched_output_lines": 3820054 + } + ], + "scope": "Actual registered LivingEntity.onClimbable and trapdoorUsableAsLadder with native CLIMBABLE/CAN_GLIDE_THROUGH tags. Every registered state, natural/empty/universal tag snapshots, all trapdoor states against every ladder facing, gliding and spectator guards, captured positions, retained climb history, integer-coordinate wrapping, mutations and failures. Rust binding validates members/properties/state IDs. Entity/world queries are controlled; live movement binding, equipment-based glide eligibility and complete gameplay remain pending." +} diff --git a/benchmarks/rust-collision-2026-10-05/scoped-parity.json b/benchmarks/rust-collision-2026-10-05/scoped-parity.json new file mode 100644 index 000000000..a0ccf862a --- /dev/null +++ b/benchmarks/rust-collision-2026-10-05/scoped-parity.json @@ -0,0 +1,75 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "inputs_sha256": "ec4d8458f10935a5e68dd27e69af493bd38463eb0a59747741cc7a5bd49957c7", + "rust_output_sha256": "2bc52fdaef3bc6b404642565139555ddb9568d4d669d7c2cb15a21d475f0b796", + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "02acfbae94aee306c5a4e1db7c86c68f7d6156ddd3dd477dc9e9d06e5ca98118", + "tools/test_collision_parity.py": "2ca10b21bf94146ef62cb79ce2e38b753d1565c4f34da7c9f6a887805253d853", + "tools/test_rust_parity.py": "500652427164c7e067a5eb69310ec81f843d5fe37a7c9d88edd2b1ca6606020a", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "faae2edce8b573fd32fcb4bd1f898be7d700a5b38479439f5bec96df764688fd", + "crates/horizon-core/Cargo.toml": "09243cac4d45e8b4aaed3a6169bf3ee0e1272fdff4298c43c80d5fff0116d01c", + "crates/horizon-world/Cargo.toml": "e3250c38fb21b149b5ccaf3c90b5c87ff15b2902f5204b7159207ef7fbf229f2", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/parity.rs": "7b455f2181862e1430e7387633c146877c2d317c2ea682c1e6fa64345dbc5885", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "acaa0a51a759e1a08d417538e567847a66b8c9ae6a7434872e1621ed210364b1", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random.rs": "2f304dfb580a6bc1b5c51b048a2fa2a57f73c5f28f5eb2447f925bf138513389", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/lib.rs": "521ed8987f9fc21e9df75206795414871611e5b6acbf3906c26f44a4c6e6115e", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry.rs": "f46065659e60eb5e84ad69b9f3b5e94dc87ee19de16408817e26f23d16b6c7e7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/examples/collision_fixture.rs": "ee754b5b42e0a51fe0a305b3f4bb56522ff3fffae564180aab8087b1b9e44afc" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "2bc52fdaef3bc6b404642565139555ddb9568d4d669d7c2cb15a21d475f0b796", + "matched_output_lines": 1097456, + "registry_states": 35723, + "cached_states": 35524, + "uncached_states": 199, + "unique_shapes": 6093, + "unique_grids": 330, + "queries": 213144 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "2bc52fdaef3bc6b404642565139555ddb9568d4d669d7c2cb15a21d475f0b796", + "matched_output_lines": 1097456, + "registry_states": 35723, + "cached_states": 35524, + "uncached_states": 199, + "unique_shapes": 6093, + "unique_grids": 330, + "queries": 213144 + } + ], + "scope": "Pinned no-context cached collision branch only. Registry identity validation, resident section lookup, grids, discrete extrema including empty shapes, greedy boxes, bounds, translated collide, ray hits, closest points and moved cell lookup. Uncached states and entity-context behavior remain unsupported." +} diff --git a/benchmarks/rust-collision-context-2026-10-06/scoped-parity.json b/benchmarks/rust-collision-context-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..ca770cfbd --- /dev/null +++ b/benchmarks/rust-collision-context-2026-10-06/scoped-parity.json @@ -0,0 +1,200 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 8338, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java": "54b2963408f81f6997e6830b2f04a873043e02659a3c14404f71b42285331ebc", + "tools/test_collision_context_parity.py": "82503f4141885200a7593a5e5b6d6f5890b42d471507043816fd4339be5edf2e", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/collision_context.rs": "3053db15dff5776571a2c919634362fe43100978867f9e3ac46b2299563a6d4d", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "8f77b4a1c5e25ecf9336477c12e3141fafc0cd8884f3b198f2ec93b0eb47ae49", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/collision_context_fixture.rs": "edca46a99ddcb267422d5f2f248346fc6f227bd6cd23727ba5a12cc6c63d68b8" + }, + "fixtures_sha256": { + ".local/rust-collision-context-parity/inputs.txt": "60b49e91a7a4999cfb8eb6ac3fbc6ec0a931d68cd53f9737959a2bd2b42be7a5" + }, + "rust_output_sha256": "7b23eb34c86c3db5a9e90bdd8ef772b79b2a06c8460542e032589f7962fd8f64", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "7b23eb34c86c3db5a9e90bdd8ef772b79b2a06c8460542e032589f7962fd8f64", + "matched_output_lines": 225126 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "7b23eb34c86c3db5a9e90bdd8ef772b79b2a06c8460542e032589f7962fd8f64", + "matched_output_lines": 225126 + } + ], + "scope": "Actual CollisionContext factories and EntityCollisionContext/Empty/PositionCollisionContext queries on controlled player and marker snapshots. Checks entity identity, captured descending and placement flags, fluid collision flags, empty-stack AIR identity, height thresholds including f32 epsilon, null factories, callback arguments/order/failures and all five fluid type pairs. Entity lifecycle, inventory mutations after capture, experimental minecart contexts, contextual block shape dispatch and live movement integration remain pending." +} diff --git a/benchmarks/rust-combat-rules-2026-10-07/scoped-parity.json b/benchmarks/rust-combat-rules-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..44e6395b0 --- /dev/null +++ b/benchmarks/rust-combat-rules-2026-10-07/scoped-parity.json @@ -0,0 +1,247 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 40656, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCombatRulesOracle.java": "c42f58905c750328b967a631e8a8e7077e974af9223e1bdb8d0b10f7abeb8d4b", + "tools/test_combat_rules_parity.py": "1e50f61d136fc52df588224802cf0cc2a96a9d8d9e455eb4f76cd58420e0fda4", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "bd8c8f81570b7fdb4961954f039bc5d063fff06a4357ebac009771cac359ded7", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/combat_rules_fixture.rs": "8b1467cff4323625f9f176e826399799fd1fbbbce65b4728d4a6b474d52c5798" + }, + "fixtures_sha256": { + ".local/rust-combat-rules-parity/inputs.txt": "25f1cf8b2613906d7188a88703921c24e31a33b69d825535dc0787463511128d" + }, + "rust_output_sha256": "d4fb8f05b3c687c4e113c736c746c422e60e39e5f567a46aa1d1ee764d4d46d2", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "d4fb8f05b3c687c4e113c736c746c422e60e39e5f567a46aa1d1ee764d4d46d2", + "matched_output_lines": 184248 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "d4fb8f05b3c687c4e113c736c746c422e60e39e5f567a46aa1d1ee764d4d46d2", + "matched_output_lines": 184248 + } + ], + "scope": "Actual CombatRules armor/toughness and magic protection arithmetic; null/empty/unenchanted weapons, nonserver/server branches, native no-enchantment helper with explicitly empty stack components, query order/mutations/failures, nonfinite/signed-zero and random float bit patterns. The armor-effectiveness enchantment hook is exposed but enchanted components, damage tags/equipment and the full damage pipeline remain pending." +} diff --git a/benchmarks/rust-component-durability-2026-10-07/blocking-regression.json b/benchmarks/rust-component-durability-2026-10-07/blocking-regression.json new file mode 100644 index 000000000..dddc1dd84 --- /dev/null +++ b/benchmarks/rust-component-durability-2026-10-07/blocking-regression.json @@ -0,0 +1,269 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 20895, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockingItemDamageOracle.java": "adeccd0b712a9b5987f663871a86d7d40fbd1b1f9b68c585dc3f7c6fea567c43", + "tools/test_blocking_item_damage_parity.py": "69cb5aa34d08fc19d0fab38da776de27e22290c10020f2444e2c9fa3f9c70f2f", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_use.rs": "1d0a3afa61b60d356e81a063da79ec6cd38730315976640a591325fc4c8ab98c", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "f9b29f42a528493d0d2521110d4f6e0bc89af8f579d539648cb7c3a9e68e31cd", + "crates/horizon-world/src/item_use_start.rs": "9996a9b90c313925cd90e78c02880f2a1d2ae65aef53f4ce081578a9dcd10c62", + "crates/horizon-world/src/lib.rs": "8ac28b12b1c40b73a24d37aca33eee26c7894d38cd56aaf8d60c9530b4874069", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/blocking_item_damage_fixture.rs": "fc6d76c0421b39a9bd5c186f597110130deb35c1c47f0ac3036fe12b69c3bd1a" + }, + "fixtures_sha256": { + ".local/rust-blocking-item-damage-parity/inputs.txt": "0cb79d37f95adc2a95ddd2c18aa8b1e24142fafe12fffe4f9a56e95b64278b0f" + }, + "rust_output_sha256": "c78041fca237ef15364ce2a42dba44d3acd41b852d2c84daadcc52117ab905cc", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "c78041fca237ef15364ce2a42dba44d3acd41b852d2c84daadcc52117ab905cc", + "matched_output_lines": 71800 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "c78041fca237ef15364ce2a42dba44d3acd41b852d2c84daadcc52117ab905cc", + "matched_output_lines": 71800 + } + ], + "scope": "Actual BlocksAttacks hurtBlockingItem into native unenchanted ItemStack durability storage, on non-player, Player and ServerPlayer receivers. Native statistic item capture, client/level guards, scalar item-damage rules, creative immunity, empty-listener advancement ordering, stack mutation/shrink and equipment-break callback copy/slot are compared with Rust composition. Covers scalar float boundaries, absent/invalid durability components, callback storage mutations and failures. Complete components/codecs, enchantment effects, inventory/equipment lifecycle and full combat/world integration remain pending." +} diff --git a/benchmarks/rust-component-durability-2026-10-07/scalar-regression.json b/benchmarks/rust-component-durability-2026-10-07/scalar-regression.json new file mode 100644 index 000000000..8bd2d40fc --- /dev/null +++ b/benchmarks/rust-component-durability-2026-10-07/scalar-regression.json @@ -0,0 +1,269 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 30052, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemDurabilityOracle.java": "0e548d6b362588f73cbc1c2f24bdd5408d36e82db716af4a95f82aad265ae0ea", + "tools/test_item_durability_parity.py": "4f00e1eb1b72bca43eeffff842d98d7008279c6a9613d1dcc771bfe62d6c26fe", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_use.rs": "1d0a3afa61b60d356e81a063da79ec6cd38730315976640a591325fc4c8ab98c", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "f9b29f42a528493d0d2521110d4f6e0bc89af8f579d539648cb7c3a9e68e31cd", + "crates/horizon-world/src/item_use_start.rs": "9996a9b90c313925cd90e78c02880f2a1d2ae65aef53f4ce081578a9dcd10c62", + "crates/horizon-world/src/lib.rs": "8ac28b12b1c40b73a24d37aca33eee26c7894d38cd56aaf8d60c9530b4874069", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/item_durability_fixture.rs": "7ed7b96860d60a5629a59e16f2c416ad8b28d79e795276c11b7d1abcf64e974b" + }, + "fixtures_sha256": { + ".local/rust-item-durability-parity/inputs.txt": "9d9f7f0a6f05230baf2538b26ee3f02b39f018b31d35801e2af8ccbfc1503eca" + }, + "rust_output_sha256": "0ed852826d375dd35268608045756abcb6e152cef9840ef464b3f00254da4675", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "0ed852826d375dd35268608045756abcb6e152cef9840ef464b3f00254da4675", + "matched_output_lines": 81762 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "0ed852826d375dd35268608045756abcb6e152cef9840ef464b3f00254da4675", + "matched_output_lines": 81762 + } + ], + "scope": "Actual unenchanted ItemStack damage predicates, clamped reads/writes, integer-wrapping count changes, server-level hurtAndBreak and ServerPlayer hurtWithoutBreaking. Real component maps cover absent fields, empty/air stacks, unbreakable and invalid numeric values; callbacks mutate storage and inject failures at infinite-material, empty-listener advancement and break dispatch boundaries. Covers the positive integer-to-float enchantment pipeline with no enchantments. Complete component storage/codecs, enchantment effects, entity equipment break handling and combat/world integration remain pending." +} diff --git a/benchmarks/rust-component-durability-2026-10-07/scoped-parity.json b/benchmarks/rust-component-durability-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..5cf2427e6 --- /dev/null +++ b/benchmarks/rust-component-durability-2026-10-07/scoped-parity.json @@ -0,0 +1,269 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 30142, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaComponentDurabilityOracle.java": "9cb21d37cf2ee4707bd3850765cd519bd0fa6ef15e6acda80329bdf24523d678", + "tools/test_component_durability_parity.py": "6e7eb212266e3616f5d2940b5cf3a4de7a8319ecbd2e914e3072c8e9cb49776e", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_use.rs": "1d0a3afa61b60d356e81a063da79ec6cd38730315976640a591325fc4c8ab98c", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "f9b29f42a528493d0d2521110d4f6e0bc89af8f579d539648cb7c3a9e68e31cd", + "crates/horizon-world/src/item_use_start.rs": "9996a9b90c313925cd90e78c02880f2a1d2ae65aef53f4ce081578a9dcd10c62", + "crates/horizon-world/src/lib.rs": "8ac28b12b1c40b73a24d37aca33eee26c7894d38cd56aaf8d60c9530b4874069", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/component_durability_fixture.rs": "0742bc08fdb8df34fea31ce3106b068b20657b9ee91715077de67af5361faff2" + }, + "fixtures_sha256": { + ".local/rust-component-durability-parity/inputs.txt": "2fda29555c2f6a6ff6524352105a0ac3c0557f17e894c493e0ecc9b72fed43a2" + }, + "rust_output_sha256": "1b6178df52a47a16066177ea127e9b036e27ecd3c1d68a1ddb7b81617bbe0a27", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "1b6178df52a47a16066177ea127e9b036e27ecd3c1d68a1ddb7b81617bbe0a27", + "matched_output_lines": 83727 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "1b6178df52a47a16066177ea127e9b036e27ecd3c1d68a1ddb7b81617bbe0a27", + "matched_output_lines": 83727 + } + ], + "scope": "Actual unenchanted ItemStack durability operations with nonempty prototypes, visible component patches at callbacks, stack copies before/after original mutation and unsanitized restored removals. Rust durability algorithms operate directly on copy-on-write component storage through DurabilityStorage. Includes creative/stat callback ordering, clamped writes, shrink/break state, empty stacks and storage mutation-before-error. Full item-component storage/codecs, enchantments, equipment lifecycle and complete gameplay integration remain pending." +} diff --git a/benchmarks/rust-component-patch-2026-10-07/scoped-parity.json b/benchmarks/rust-component-patch-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..66c4468c6 --- /dev/null +++ b/benchmarks/rust-component-patch-2026-10-07/scoped-parity.json @@ -0,0 +1,268 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 4585, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaComponentPatchOracle.java": "c9a78740021f3529f30b9b127672f6b3f9f4ee8139b864edc08b32dfd18732ef", + "tools/test_component_patch_parity.py": "02c893ec443258f44ecc6a57f73a72419b0d08e45c0b8061e7e9417feb859216", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "9b1ae81c5bd0aea5982e03da1973f15fd46757354b8dd539bbd27449cff45e6a", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "6a67fd660d771c59ffa9f4aa3225a25b56da31ea1079ca2efa4a915be6464179", + "crates/horizon-world/src/item_use.rs": "1d0a3afa61b60d356e81a063da79ec6cd38730315976640a591325fc4c8ab98c", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "f9b29f42a528493d0d2521110d4f6e0bc89af8f579d539648cb7c3a9e68e31cd", + "crates/horizon-world/src/item_use_start.rs": "9996a9b90c313925cd90e78c02880f2a1d2ae65aef53f4ce081578a9dcd10c62", + "crates/horizon-world/src/lib.rs": "7b3c6671ac24942730e1c70cab097b7fcde8b63e556074557c499b9e824346a4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/component_patch_fixture.rs": "cb84b45649fda6c0cca3fe6bc798d7e41a6e3a8ed6edfc1ef6e5f01db1250948" + }, + "fixtures_sha256": { + ".local/rust-component-patch-parity/inputs.txt": "bb70bc0eca0351ea7bf3bee91ff2d1dbb03753ce42910bc8181501846659172e" + }, + "rust_output_sha256": "03bed8f8da5e4965999e42081eae378ba343562ffa80b5415168b3a1963b03f0", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "03bed8f8da5e4965999e42081eae378ba343562ffa80b5415168b3a1963b03f0", + "matched_output_lines": 622680 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "03bed8f8da5e4965999e42081eae378ba343562ffa80b5415168b3a1963b03f0", + "matched_output_lines": 622680 + } + ], + "scope": "Actual PatchedDataComponentMap reads, set/remove return values, ordered patch iteration/key sets, apply versus unsanitized restore, fromPatch sanitation, saved patches and independent map copies. Immutable prototypes have at most seven keys so native builder order is defined without identity-hash tables. Integer and boxed-float values cover NaN/signed zero; generic Rust callers must supply native value equality and prototype order. Includes mutation-before-error for removal markers without prototype defaults. Component codecs, prototype hash-table construction, object identity hashes, mutable payload aliases and full item/inventory integration remain pending." +} diff --git a/benchmarks/rust-consumable-2026-10-07/scoped-parity.json b/benchmarks/rust-consumable-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..c62cee861 --- /dev/null +++ b/benchmarks/rust-consumable-2026-10-07/scoped-parity.json @@ -0,0 +1,290 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 6123, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaConsumableOracle.java": "7f297363b837ad0820976f7377ff1fbd9553f05e91ecaa1bd1fe2a8d5e5ceb37", + "tools/test_consumable_parity.py": "ebaf8dd87d18740fe057a0d06b69de0f5dc90efe070bcbf2535c9e6aee058a1b", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "a3ad79b1a4ea171726f07b1fc6e2b78f224157e8f0d53dd2ce96e93ccd2d38dd", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "6bd97d87f0e3eaad440162145a1515b9a0b7cfb85cb0ea337874ed9745f8dd45", + "crates/horizon-world/src/lib.rs": "60efbce26b1d4ffeed8dd76dfd29db953602d505f0f8ffec7d87f9136bfd7689", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/consumable_fixture.rs": "148936d59ccf2dacfe286be4999ebaf3f0d13f2231aae6a2dc3544cd7406caae" + }, + "fixtures_sha256": { + ".local/rust-consumable-parity/inputs.txt": "7691757d51a10489e13ed680dc79a1892bac234721d5b9692856ef2dda02a84f" + }, + "rust_output_sha256": "81ea398858ec679a9005547562424c3b24850a9b57267363d667e3e335fe5f8a", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "81ea398858ec679a9005547562424c3b24850a9b57267363d667e3e335fe5f8a", + "matched_output_lines": 246033 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "81ea398858ec679a9005547562424c3b24850a9b57267363d667e3e335fe5f8a", + "matched_output_lines": 246033 + } + ], + "scope": "Actual Consumable.canConsume/startConsuming/onConsume composed with inherited eating particles, real FoodProperties/FoodData, stack components and both native RNGs. Covers player/non-player/server-player branches, stat item selection, empty advancement trigger storage, food listener dispatch, client/server effect guards, event and finite/infinite stack consumption, captured component values and callback mutation/failure prefixes. Food eligibility/start-use, stats, effect bodies and event delivery are controlled services; only the ordinary food listener schema is bound here. Full advancement evaluation, potion effects, lifecycle integration and playable gameplay remain pending." +} diff --git a/benchmarks/rust-consumable-emission-2026-10-07/scoped-parity.json b/benchmarks/rust-consumable-emission-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..352b98ba9 --- /dev/null +++ b/benchmarks/rust-consumable-emission-2026-10-07/scoped-parity.json @@ -0,0 +1,290 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 6792, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaConsumableEmissionOracle.java": "b2062b2996ed9436a02e320346a088a0a975863f9bf4a219a78432af3fedc6b3", + "tools/test_consumable_emission_parity.py": "52437b37cf4ca6736c9b8960ef5ee00b09074e8a6161639a90bf0c9a366ae61b", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "11eade3c3a9d8a2cc4549511dbf8d7697b105d221c83827d7ba5cc51d8f702c7", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "a3ad79b1a4ea171726f07b1fc6e2b78f224157e8f0d53dd2ce96e93ccd2d38dd", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "6bd97d87f0e3eaad440162145a1515b9a0b7cfb85cb0ea337874ed9745f8dd45", + "crates/horizon-world/src/lib.rs": "60efbce26b1d4ffeed8dd76dfd29db953602d505f0f8ffec7d87f9136bfd7689", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/consumable_emission_fixture.rs": "e2ff60d3000e223146d5627d1f597dc51e94063ad5c2cd3fe56bd6dd534d61f1" + }, + "fixtures_sha256": { + ".local/rust-consumable-emission-parity/inputs.txt": "878816271f14f745794e99d1e770b3a12ab4fe8eab342ff576c6485f06918d78" + }, + "rust_output_sha256": "223552ebdae6a7d52fc00511b65857bc31672c841c4dbf61a9061077a770a435", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "223552ebdae6a7d52fc00511b65857bc31672c841c4dbf61a9061077a770a435", + "matched_output_lines": 124732 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "223552ebdae6a7d52fc00511b65857bc31672c841c4dbf61a9061077a770a435", + "matched_output_lines": 124732 + } + ], + "scope": "Actual Consumable timing and emitParticlesAndSounds composed with inherited LivingEntity.spawnItemParticles, real templates and both native RNGs. Compares all animations, unconditional random draws, supplied versus direct random sources, sound overrides after particle callbacks, retained sound parameters, float timing edges and mutation/failure prefixes. Audio playback, rendering, consumable completion/effects and full gameplay remain pending." +} diff --git a/benchmarks/rust-consume-effect-2026-10-07/scoped-parity.json b/benchmarks/rust-consume-effect-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..d8843a429 --- /dev/null +++ b/benchmarks/rust-consume-effect-2026-10-07/scoped-parity.json @@ -0,0 +1,292 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 2512, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaConsumeEffectOracle.java": "5636c1dc4a26bfcd4595dac539028073dade93700f90c4023bd474ea6fc44ebe", + "tools/test_consume_effect_parity.py": "0f491208d5706cac6e48aa0a045617508f98fd9eab95ec589cad3009fdef2062", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "a3ad79b1a4ea171726f07b1fc6e2b78f224157e8f0d53dd2ce96e93ccd2d38dd", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "6bd97d87f0e3eaad440162145a1515b9a0b7cfb85cb0ea337874ed9745f8dd45", + "crates/horizon-world/src/lib.rs": "5d494e3e887092dbd1fcc86a26291b2ee37a82a8764f4a4b9473db3d7f9c5094", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "c9efdbed61340bbbce0708311240b5d69bc313401c7caf3cc67ff855476967bc", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/consume_effect_fixture.rs": "04ea96dde46474b7f8f965cad07879fb5b6db65b85827cec7ba3fc41f4d96c41" + }, + "fixtures_sha256": { + ".local/rust-consume-effect-parity/inputs.txt": "aa24b1811c440d3b0af40aa1c519c9e2290961cbcb0870f2692d7aeeb93924a5" + }, + "rust_output_sha256": "863bfc0491bdc33da38f3cd0ff95b362471cff17207d15e0a124900414affe66", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "863bfc0491bdc33da38f3cd0ff95b362471cff17207d15e0a124900414affe66", + "matched_output_lines": 184437 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "863bfc0491bdc33da38f3cd0ff95b362471cff17207d15e0a124900414affe66", + "matched_output_lines": 184437 + } + ], + "scope": "Actual ApplyStatusEffects, RemoveStatusEffects, ClearAllStatusEffects and PlaySound consume effects. Uses real native effect instances and RNGs; compares probability edges, unconditional probability draws, fresh copy identity/details/hidden/blend state, ordered non-short-circuit add/remove calls, repeated holders, captured block positions, sound arguments and mutation/failure prefixes. Actor add/remove/clear storage and sound delivery remain controlled; named holder-set binding, teleport consumption and full gameplay integration remain pending." +} diff --git a/benchmarks/rust-contextual-collision-2026-10-06/scoped-parity.json b/benchmarks/rust-contextual-collision-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..3cd22dd0a --- /dev/null +++ b/benchmarks/rust-contextual-collision-2026-10-06/scoped-parity.json @@ -0,0 +1,218 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 785906, + "block_states": 35723, + "independent_cached_states": 35492, + "context_sensitive_cached_states": 32, + "uncached_states": 199, + "audit_positions_per_cached_state": 7, + "audit_context_types": 2, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java": "bcc421fd7948ae7385e346e3de19c58222a2cad6b39122cac241cf70f9cc6071", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaContextualCollisionAudit.java": "f53402c8830a82defe82538ec4c894df769aafdc644b43c824240adc4af7745d", + "tools/test_collision_context_parity.py": "75d6f01e072867d2bd286d2e518e123fcfe055a11ac1705ec99ecec3975cb8d2", + "tools/test_contextual_collision_parity.py": "6108a0d9e0c4e1592a336c35d096fb623eccff8ed136e31d8984c2365f66d6e9", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "5d0f5ded49d34bb999d73a4e1b89a318fa66c0246e9904d3cbf810d3aa370312", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "f0997b21c8083de75f4f8883e8855e1d2d9f1876a2053a8a97b081deed5b0bcd", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/collision_context_fixture.rs": "cf777882b8999174682c1c29fa8df7202b67acf2ca6dc063f674a52996341d4b" + }, + "fixtures_sha256": { + ".local/rust-contextual-collision-parity/inputs.txt": "394a00fda537f7af0840ed7dd6664581c04f4af9b383107db81df21ca9d0915f", + ".local/rust-contextual-collision-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-contextual-collision-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078" + }, + "rust_output_sha256": "9b328cde8c73c2e54870991bf847c966093f067b41980e1e7daa1a26558e424d", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "9b328cde8c73c2e54870991bf847c966093f067b41980e1e7daa1a26558e424d", + "matched_output_lines": 2391334, + "audited_states": 35723, + "audit_sha256": "c109c808ca5b2314fc5fdfce744296e7ae0de45c00d31d38bd701a493ae6c4c5" + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "9b328cde8c73c2e54870991bf847c966093f067b41980e1e7daa1a26558e424d", + "matched_output_lines": 2391334, + "audited_states": 35723, + "audit_sha256": "c109c808ca5b2314fc5fdfce744296e7ae0de45c00d31d38bd701a493ae6c4c5" + } + ], + "scope": "Integrated contextual dispatcher across every pinned block state, eleven context variants and both always-fluid flag inputs. The native audit verifies 35,492 cached states return the identical cached shape without world/context queries at seven positions with interface and entity context providers that reject queries; liquid states query context instead. Integrated outputs compare cache-relative shape equality or full uncached geometry and ordered entity/world callbacks. Missing block entities are used here; active shulker/piston states retain separate coverage. Experimental minecart contexts, entity lifecycle and live movement remain pending." +} diff --git a/benchmarks/rust-core-2026-10-04/scoped-parity.json b/benchmarks/rust-core-2026-10-04/scoped-parity.json new file mode 100644 index 000000000..94680d453 --- /dev/null +++ b/benchmarks/rust-core-2026-10-04/scoped-parity.json @@ -0,0 +1,44 @@ +{ + "schema": 1, + "minecraft": "26.3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "commands": { + "position": 12375, + "legacy": 23, + "xoroshiro": 23, + "xoroshiro_state": 5, + "storage": 274 + }, + "inputs_sha256": "dbdebadd4b14ec57d198d22f15e196e0cc9a6b88bac6691db702348a769459c1", + "rust_output_sha256": "7801e3274307aab1852d96d996d7f29b1ca1567750d231c5f74c9e3263f84f87", + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCoreOracle.java": "649b8353fcc3c45a3baf8e2d78dc76cfedfd96de36030b0dddfb2305829cd844", + "tools/test_rust_parity.py": "d2d06842abb80d9c718a5bf0e71ab0c098ad4c519b8ef35711e30cf58af140d7", + "crates/horizon-core/src/bin/parity.rs": "7b455f2181862e1430e7387633c146877c2d317c2ea682c1e6fa64345dbc5885", + "crates/horizon-core/src/lib.rs": "deb2e339f78c9f5bd55a1c8a8428f3e37fae93a02268f9a2fc782dc3e27c2869", + "crates/horizon-core/src/position.rs": "8c2a54e912f8c31a774682b3377ca5f2138910350fbf605e760b24e2cbcacfba", + "crates/horizon-core/src/random.rs": "2f304dfb580a6bc1b5c51b048a2fa2a57f73c5f28f5eb2447f925bf138513389", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/Cargo.toml": "1928b71e389c24c506804f0d8e3104976da6feb27d9bfdbb3b55fb7af0c62664", + "Cargo.toml": "9ca59fba126895de9e58952eb5e9421bee0ffdfb5f6d2fcb03d7726e394e7c3f", + "Cargo.lock": "f2b104dbb3f64512b6c72e8d8732b7adda849212689e8c816f9a6abf564f4660" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "7801e3274307aab1852d96d996d7f29b1ca1567750d231c5f74c9e3263f84f87", + "matched_output_lines": 1017920 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "7801e3274307aab1852d96d996d7f29b1ca1567750d231c5f74c9e3263f84f87", + "matched_output_lines": 1017920 + } + ], + "scope": "Selected integer position, seeded RNG and packed-storage operations only. No gameplay, rendering or performance claim." +} diff --git a/benchmarks/rust-core-2026-10-05/scoped-parity.json b/benchmarks/rust-core-2026-10-05/scoped-parity.json new file mode 100644 index 000000000..67cc61e06 --- /dev/null +++ b/benchmarks/rust-core-2026-10-05/scoped-parity.json @@ -0,0 +1,69 @@ +{ + "schema": 1, + "minecraft": "26.3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "commands": { + "position": 12375, + "legacy": 23, + "xoroshiro": 23, + "xoroshiro_state": 5, + "storage": 274, + "factory": 4400, + "helpers": 5000 + }, + "inputs_sha256": "fa3dce6416a2d2a6e4af89b29715bab9575bb99b18be9c188f777af415383c03", + "rust_output_sha256": "799ae9305fe380b8bc63fc280d9f0222e62d093bfdb8d286305e7414448bb0e7", + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCoreOracle.java": "69d9d3ff45e56122136d6a6f6b8fde0972985c4ced1a052fcb9c44a9df6b3c14", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "86e7a87439acf5458be3c9b6ed5dfc3705170f39483ec0f1c2b723b4f5e3ff28", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "f00ebba7484168ae0064fa993ace9afafb323c3222ab80cfee3792bd98562e8d", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-core/Cargo.toml": "f9aff52d34439ed6511b026beee5cbd9918f34cc0a67e90e441df12c905a6dc0", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "faae2edce8b573fd32fcb4bd1f898be7d700a5b38479439f5bec96df764688fd" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "799ae9305fe380b8bc63fc280d9f0222e62d093bfdb8d286305e7414448bb0e7", + "matched_output_lines": 1634520 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "799ae9305fe380b8bc63fc280d9f0222e62d093bfdb8d286305e7414448bb0e7", + "matched_output_lines": 1634520 + } + ], + "scope": "Selected integer positions, seeded RNG operations including inclusive/exclusive integer intervals and float/double triangular draws, positional factories, UTF-16 Java string hashing, MD5-derived seeds and packed-storage operations. Floating-point helper NaNs canonicalized; finite results and signed zeros compared by bits. No gameplay, rendering or performance claim." +} diff --git a/benchmarks/rust-cuboid-model-decoding-2026-10-06/scoped-parity.json b/benchmarks/rust-cuboid-model-decoding-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..6f606fd7b --- /dev/null +++ b/benchmarks/rust-cuboid-model-decoding-2026-10-06/scoped-parity.json @@ -0,0 +1,40 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "resource_models": 2883, + "synthetic_models": 2337, + "rejected_models": 1034, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "tools/test_cuboid_model_parity.py": "3b7c018570b0f609aae43cef60ff3139c543d5d629be804a5aa257e3ab2dd67c", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "7b4ab0ffa35af7ea8b6e38525f18ff6c3e94768198915f5ffe560d84263423f8", + "crates/horizon-assets/Cargo.toml": "fadb78cf819e026500606c45d27138ed67fcbbc967ae8cee6c1e7c82c9046b36", + "crates/horizon-assets/examples/cuboid_model_fixture.rs": "97609d90e3f6ce340f3590296db2dc778113bb2b33c7d1b54080a1d6f3023f40", + "crates/horizon-assets/examples/model_resolution_fixture.rs": "c071067140299e49345a6ebd94e15b3b6d853cb9ae11d8de46e3cbdfb8b01f0e", + "crates/horizon-assets/examples/support/mod.rs": "bcf5a6d8a54845982191e037911c24139237771d6afa4b01b1e83c011489c3f5", + "crates/horizon-assets/src/json.rs": "e7b89bf4852f561a0e5bf1a984857c61e755961dfd86fcc326b6d55558615f39", + "crates/horizon-assets/src/lib.rs": "0d31dd0fa84d7b4467a78a1a2b8a8e179533ef5e64a7cbae88e5358e59160a40", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541" + }, + "fixtures_sha256": { + ".local/rust-cuboid-model-parity/inputs.jsonl": "9c1822180e1d6869e65eea81a38cbcf3786b9286d4c839e31ba686501694d171" + }, + "rust_output_sha256": "80c4b305084658ab968ed466fb1609bfa78d60738d09790c6243b4de27dfb8fc", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "80c4b305084658ab968ed466fb1609bfa78d60738d09790c6243b4de27dfb8fc", + "matched_output_lines": 5220 + } + ], + "scope": "Actual pinned CuboidModel.fromStream parser compared over every bundled block model and synthetic JSON/numeric/syntax cases. Decoded geometry, texture materials/references, nullable children, inheritance markers, face quadrants, light emission and display transforms; floats compare by IEEE-754 bits. Rejections normalize exception text. This client-only API is absent from the server. Does not yet validate parent resolution, rotation matrices, quad baking, blockstate dispatch, rendered pixels or gameplay." +} diff --git a/benchmarks/rust-damage-immunity-2026-10-07/scoped-parity.json b/benchmarks/rust-damage-immunity-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..7724dca87 --- /dev/null +++ b/benchmarks/rust-damage-immunity-2026-10-07/scoped-parity.json @@ -0,0 +1,257 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 17988, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageImmunityOracle.java": "cd682badfda7a54fcb983b14ff1c86cec5c02f84f2106b802bd0911414ff651b", + "tools/test_damage_immunity_parity.py": "5ea56eef2595014881a9117370bed5ecad24a72eead1d8bfdf34eb23b896e414", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "cfe2f36e811e8e4c7a4868226e5aa341f07568be1e7879d59dbe2c225d146932", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "711e78438ece3e94eb156c0e64cfea06a63f79640a7a81e396ae2c1b277cdce6", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_damage.rs": "c4fc29eecf2bf401680d1754bef06797a5e4608ab53c5b52e0dd4996f859dbfe", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/damage_immunity_fixture.rs": "991af9c1e73bf4d6341ef0e4f7af5d4a10001781e625d9ef929e7112d6139288" + }, + "fixtures_sha256": { + ".local/rust-damage-immunity-parity/inputs.txt": "e7eb796384e9ffc2e675757e5f7c7a61f494999625db7a03a4b0defd76897089", + ".local/rust-damage-immunity-parity/slots.json": "29101ebf1ead685029508789eee51c4d4fff65524064d8e32a48efded7036982" + }, + "rust_output_sha256": "74fb7a0069c40808a43fbefd9ebdf6a48ffbda144facb6fbdab36fcb5ee3a009", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "74fb7a0069c40808a43fbefd9ebdf6a48ffbda144facb6fbdab36fcb5ee3a009", + "matched_output_lines": 170314 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "74fb7a0069c40808a43fbefd9ebdf6a48ffbda144facb6fbdab36fcb5ee3a009", + "matched_output_lines": 170314 + } + ], + "scope": "Actual Entity invulnerability/base immunity, LivingEntity enchantment dispatch, Player gamerule immunity and ServerPlayer dimension/client-loading predicates. Controlled virtual flags, source tags and rules; real empty-equipment enchantment iteration. Compares short-circuit ordering, mixed tags, virtual state changes and callback failures. Registered source/rule bindings, nonempty enchantment immunity and full damage-pipeline integration remain pending." +} diff --git a/benchmarks/rust-damage-reduction-2026-10-07/scoped-parity.json b/benchmarks/rust-damage-reduction-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..88c6a10ce --- /dev/null +++ b/benchmarks/rust-damage-reduction-2026-10-07/scoped-parity.json @@ -0,0 +1,251 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 11974, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageReductionOracle.java": "8bfafac378ae9e2d772b23d43f249f606f36c36ab564c3886ba6e6acf08a305c", + "tools/test_damage_reduction_parity.py": "04d9c5fb3f53652354726a73bca76b4465a740d0d8cb5410187ab477c579470d", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "39ced7b0b9cdb284f03e31869d3678dccbad58eefa87dd535245625202eccb9b", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "711e78438ece3e94eb156c0e64cfea06a63f79640a7a81e396ae2c1b277cdce6", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/damage_reduction_fixture.rs": "b4a539d11f4d612e971091bab784a29c1d47e98d2a507e8e0cd590d0dbab39b8" + }, + "fixtures_sha256": { + ".local/rust-damage-reduction-parity/inputs.txt": "4a6c0e106ab47d7bc9caf600614c161fed4369ba314c8cc127106ad0198c5735", + ".local/rust-damage-reduction-parity/slots.json": "29101ebf1ead685029508789eee51c4d4fff65524064d8e32a48efded7036982" + }, + "rust_output_sha256": "e8bdb302517f54a71ee02aa8cfceb68c37dd46af79b620231ecaffe9e8b6cb4f", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "e8bdb302517f54a71ee02aa8cfceb68c37dd46af79b620231ecaffe9e8b6cb4f", + "matched_output_lines": 78069 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e8bdb302517f54a71ee02aa8cfceb68c37dd46af79b620231ecaffe9e8b6cb4f", + "matched_output_lines": 78069 + } + ], + "scope": "Actual LivingEntity armor-value and armor/magic reduction methods for base living and ServerPlayer receivers. Damage bypass tags, hurtArmor dispatch, floor/narrow attribute arithmetic, native CombatRules, resistance amplifier overflow and resisted statistics, repeated attacker lookup, native empty-equipment protection lookup, mutations/failures and numeric edges. Item enchantments, actual durability/effects/tag registries and full damage integration remain pending." +} diff --git a/benchmarks/rust-damage-source-2026-10-07/scoped-parity.json b/benchmarks/rust-damage-source-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..9b515214c --- /dev/null +++ b/benchmarks/rust-damage-source-2026-10-07/scoped-parity.json @@ -0,0 +1,261 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 15100, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageSourceOracle.java": "0cf0126d69d1052dea74a6bfb5a97250ab69d8f7a95360d9c6399fe03376dcd2", + "tools/test_damage_source_parity.py": "3598b5401983e7c904a5674b38a8b64fb948c64af16355aa9c474fcb2e937532", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "0225398b1e9b1c3901fab0bead65ff022b34a809a51805f6cce293c20dbb7d78", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "d659328576264bc7a454d4520dfba50664cdc86a617707b7caba0396965c1d97", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/damage_source_fixture.rs": "a0e3941fec8bd009a48f3e42782d505774f903538f843b07e307a24500b86b23" + }, + "fixtures_sha256": { + ".local/rust-damage-source-parity/inputs.txt": "80f28c50242eafe34c168a4f457eedd0bfc60b5c4943ab53e4ceb06b75f2a1df", + ".local/rust-damage-source-parity/catalog.json": "1c40ea4dc7430aa7ad737258a320ef35e72df977370d1a228bc2876d69289598", + ".local/rust-damage-source-parity/types.json": "ec99090df073d7fdad34de5c8930f9e09e25a04b432bb890120fedefb7bea30f", + ".local/rust-damage-source-parity/tags.json": "df5da1c56b40691bac096e0e8c98a77063b6f056a5f53e75068e5fef89595af8" + }, + "rust_output_sha256": "a2e2595df33133fe0bf98e270bb93ed68b06fbc1e2085328c8611e59d68056e8", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a2e2595df33133fe0bf98e270bb93ed68b06fbc1e2085328c8611e59d68056e8", + "matched_output_lines": 152175 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "a2e2595df33133fe0bf98e270bb93ed68b06fbc1e2085328c8611e59d68056e8", + "matched_output_lines": 152175 + } + ], + "scope": "Native DamageType codec export and TagLoader resolution for all bundled vanilla damage definitions/tags; ordinary DamageSource constructor identity, difficulty scaling, exhaustion, type/tag membership, weapon/direct-position access and virtual creative-source dispatch. Entity position/weapon/ability queries are controlled, including mutation and failures. Catalog indices are local, not network IDs; live registry reload, damage definition codecs in Rust, death-message generation and combat registry binding remain pending." +} diff --git a/benchmarks/rust-decoration-2026-10-06/scoped-parity.json b/benchmarks/rust-decoration-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..649dad3b8 --- /dev/null +++ b/benchmarks/rust-decoration-2026-10-06/scoped-parity.json @@ -0,0 +1,161 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 2188, + "biomes": 67, + "requested_decorations": 4376, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDecorationOracle.java": "ddec65c7fbc798fb40eca1e4b0301c201d8ae90e771e989fdbc8915553973543", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "tools/test_decoration_parity.py": "6309a586685b3795610b04659b721b8a94e120841d4509112494a81c08733f07", + "tools/test_feature_sort_parity.py": "ba745b738c3181c432c77c939126ed8f41fa7bc0430c1900d909f2ed50e5fdd6", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "c215156f2ecf7faf214b3d89e0829b65d54f4ff6d134d778ec941f18a606a327", + "crates/horizon-world/src/worldgen/block_predicate.rs": "dd8cbda2ec110444950f0b31bf4e088897eab0994674a91568c7b063f8f16210", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "8e29ca35bf432232b47087b162a513e18a5b0ac470461b73ca8444bef7cd9960", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "2297b194514925688dba25016a69d5ba5eb8b869bdfff28f2e611a6742ac5954", + "crates/horizon-world/src/worldgen/feature_region.rs": "4a95a30c0987d97e671f84380e13ddea070ad81f996baa65b2a06c4d892971c7", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9bce6b17b60fec575d810713d9fb2714780aadbbc973db969c07cf4455201847", + "crates/horizon-world/src/worldgen/placement/context.rs": "f8fa467d3b931d0f98d3572fbc80c659d452a7fc5755d5c98123dc477c2b541c", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "c39c0b5f761fd573ff2f2a1d9d42901305995cc88f5c4ca3a49aaa4ef5dd933b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "d69e6a02e628df1238a253c99b7ee6d1597b8fcd6703795525e0f77fdf1cf47b", + "crates/horizon-world/examples/decoration_fixture.rs": "d195a9edbe2b82694fba45ada3a619340506d441d4063aedf8111c1ccfde6df7" + }, + "fixtures_sha256": { + ".local/rust-decoration-parity/inputs.txt": "3ead79dc3276a770c3c2a70fe080e355ca9e45af763f927cd82e9eb5475fbad0", + ".local/rust-decoration-parity/biome-features.json": "cc3846a9d2eae7e45ba9fd69f07e37a715ce5cb946c9cdbe8a86a471c8a8a975" + }, + "rust_output_sha256": "7c34f5bf7b39df3d175c5a4e2da4917ce538ed5fa125a88c4b44a43805a964de", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "7c34f5bf7b39df3d175c5a4e2da4917ce538ed5fa125a88c4b44a43805a964de", + "matched_output_lines": 337398 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "7c34f5bf7b39df3d175c5a4e2da4917ce538ed5fa125a88c4b44a43805a964de", + "matched_output_lines": 337398 + } + ], + "scope": "Actual ChunkGenerator.applyBiomeDecoration with structure generation disabled, native ProtoChunk biome palettes, native FeatureSorter and WorldgenRandom, and traced feature sinks. Nine-chunk query order, possible-biome intersection, sorted global feature indices, decoration/feature seeds, biome-check placement, repeated calls, ignored false results, progress markers and partial failures are compared. All 67 bundled biome feature lists participate with synthetic payloads. Rust owns immutable generation settings and delegates resident palette transport and feature callbacks. Structure decoration, complete registry/world region integration, all feature algorithms, crash-report formatting and full gameplay remain pending." +} diff --git a/benchmarks/rust-decoration-region-2026-10-06/scoped-parity.json b/benchmarks/rust-decoration-region-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..c6915af64 --- /dev/null +++ b/benchmarks/rust-decoration-region-2026-10-06/scoped-parity.json @@ -0,0 +1,178 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "block_tag_files": 300, + "fixtures": 240, + "biome_zoom": true, + "resident_chunks_per_fixture": 9, + "requested_decorations": 480, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDecorationRegionOracle.java": "9c67be65ec6b7c86850fce4277a930fba9b613e416cd749b33989b75d34ee971", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "tools/test_decoration_region_parity.py": "d85b316b4fca4f71239b8e6edf7fad4be4e7be972b108450d62ec96bea8a3196", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_feature_region_parity.py": "fceba45d5aa9bb2c137350f1df70f4ba64ea65c4179a50920e713a2669bf4e28", + "tools/test_decoration_parity.py": "6309a586685b3795610b04659b721b8a94e120841d4509112494a81c08733f07", + "tools/test_feature_sort_parity.py": "ba745b738c3181c432c77c939126ed8f41fa7bc0430c1900d909f2ed50e5fdd6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/fluid.rs": "8a2834a9347ee2c2db7cf1c86a064907ec06e9ac16ba9cc3936e315fc4ad49ca", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5e93b751c43417dc0a5eac05f4389c8097959e1df3b307e499a7b3e4403c6584", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "d8b2d3f19f49a0a60c913596f5a8f5fcb5be2e8633c9910e4e583e5d85916bde", + "crates/horizon-world/src/worldgen/block_predicate.rs": "95997ad124f4ee85abf02c8a1058cf9fb5e6d0289f4ef6721e532ae39c886640", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "fe61a5e43179a7588737a71782ea246811fe2c8721e74793e1ac018c8eb93c34", + "crates/horizon-world/src/worldgen/feature_region.rs": "2c78e5f1bdb08307f8d982f231f1abbc3306cd54348d9023b86ee6ed3516fd33", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "4b5a908d6572ba166b82e232927ad884f0d6cf1ca997c8a4c89f41fd15370041", + "crates/horizon-world/src/worldgen/placement/context.rs": "6d450931cdeab1427253a19baa5184c1b70cfaecb1ee3f60d5400f083b96e682", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "fa0616353f07460975ab323357ab280b7f35e7bfe2de6edc08d304316766ed26", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "64a9ecb17f3567d5928de9959702a8f45e75b36a3227342ef392a8f840d18d18", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "821981c893fc84312351503f2be0c06c681d8bc768dade14576697cf047a9f8f", + "crates/horizon-world/examples/decoration_region_fixture.rs": "f22941c968628c13326890abb627223092ded53565db234be0867b56bc126749", + "crates/horizon-world/examples/support/decoration_storage.rs": "feb724e80bbcc1f66b671881ce58875f9bb419434dbd83b90475488e6e0bda99" + }, + "fixtures_sha256": { + ".local/rust-decoration-region-parity/inputs.txt": "cd00683424d45ef1edbd39dc5be3001554e182b3b9fca220f4feb18fef339cbf", + ".local/rust-decoration-region-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-decoration-region-parity/facts-client.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0", + ".local/rust-decoration-region-parity/facts-server.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0" + }, + "rust_output_sha256": "5065d7e427a570e65b844e13d2a98f2127b62d87ab501cd68b9b5ea47b41638b", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "5065d7e427a570e65b844e13d2a98f2127b62d87ab501cd68b9b5ea47b41638b", + "matched_output_lines": 36173951 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "5065d7e427a570e65b844e13d2a98f2127b62d87ab501cd68b9b5ea47b41638b", + "matched_output_lines": 36173951 + } + ], + "scope": "Actual ChunkGenerator.applyBiomeDecoration with structures disabled executes three native basic features, configured fill-layer sequences, replacements and scattered ore into nine ProtoChunks. Biome palettes, native BiomeManager zoom, possible-biome selection, FeatureSorter order, WorldgenRandom seeding, biome filters, registry-bound matching-biome predicates, ordered volume predicates and graph composition share resident terrain. Both pre-light heightmap groups, mixed/uniform biome neighborhoods, count/square/heightmap/layered chains, repeated decoration, rejected writes and partial failures are compared. Ordered writes, current-feature markers, complete final raw sections and all heightmap presence/data are checked. Rust uses resident BiomeRegion and TerrainRegion with caller-owned biome membership/write effects. Actual WorldGenRegion write-zone policy, POIs, block entities, postprocessing, lighting, structures, remaining feature algorithms, complete noise-to-decoration lifecycle and gameplay remain pending." +} diff --git a/benchmarks/rust-delta-2026-10-06/scoped-parity.json b/benchmarks/rust-delta-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..59f90dc67 --- /dev/null +++ b/benchmarks/rust-delta-2026-10-06/scoped-parity.json @@ -0,0 +1,215 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 324269, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "10b73ee4c06d9e0b5d6863b009189e6c1a291f82bb3f0d1b9c18d92bfc86c10c", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "e871d3a01f15616a98ca9227c27a81e4d17e2d57ac4e68a5650a70fa29811497", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_delta_parity.py": "3edbfd93114c88909cb3dfedbc577a90f351d2104462bd7a75e122becfa55f2f", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "5ce5c6eaa5f8a2557a620e533788217b1eb430654801dcf6135d6c92d7a012ac", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "cd5ca4bc73b1abc8bc1aef98cba995a3a4105532c004ba82f3f8e118cd046621", + "crates/horizon-world/src/worldgen/feature_region.rs": "79e8ce343b0dc80dceb8b214c818b383d9b110540bb8c3b0ac32863a7800e288", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "dc3f07719dac53c5ceab6635598c010ccc93db0b149970894407bf9b713946e7", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "fc9a6872e85d38ce92db0ef4fe806ce4688b3ac90c5ab0aade9b65ef7197f5ef", + "crates/horizon-world/examples/simple_block_fixture.rs": "03772ae73202fd6b92617a76d08fa01487acf4c2e65568a35beb4a783d557919" + }, + "fixtures_sha256": { + ".local/rust-delta-parity/inputs.txt": "1dcb3e0f75417acd8ba2ea42e6c3088ce709f4c3a3ea7d2765ee91a1796abf7f", + ".local/rust-delta-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-delta-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-delta-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-delta-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-delta-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-delta-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-delta-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-delta-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-delta-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-delta-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-delta-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-delta-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-delta-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-delta-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-delta-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-delta-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "58e5fb6d071c86400e0ea44685464cd717e59bb554399e8060210ab48f795b18", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "58e5fb6d071c86400e0ea44685464cd717e59bb554399e8060210ab48f795b18", + "matched_output_lines": 13418994 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "58e5fb6d071c86400e0ea44685464cd717e59bb554399e8060210ab48f795b18", + "matched_output_lines": 13418994 + } + ], + "scope": "Native DeltaFeature required state and bounded size-provider codecs, 0.9 double rim draw, conditional rim X/Z sampling, independent patch X/Z sampling, Manhattan traversal and immediate rim/shifted-content mutations. Every state is tested as origin, contents, rim and all six neighbors; all air-neighbor masks, size/rim limits, six provider families, zero-component rim offsets, both RNGs, seeds, repeated mutations, rejected writes, partial failures, wrapped coordinates and composition are covered. The world fixture has a controlled flat air/ground boundary with mutable overrides. World updates, fluid behavior and full generation remain pending." +} diff --git a/benchmarks/rust-density-2026-10-05/scoped-parity.json b/benchmarks/rust-density-2026-10-05/scoped-parity.json new file mode 100644 index 000000000..98ad5e490 --- /dev/null +++ b/benchmarks/rust-density-2026-10-05/scoped-parity.json @@ -0,0 +1,159 @@ +{ + "schema": 1, + "minecraft": "26.3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "commands": { + "constant": 336, + "query": 931724, + "volume": 225642, + "gradient": 2041, + "noise": 272, + "shift": 1200, + "unary": 3168, + "binary": 2408, + "choice": 1250, + "lerp": 1216, + "interval": 1000, + "bounds": 41176, + "offset": 816, + "blended": 192, + "distance": 320, + "metric": 12000, + "blendfail": 10, + "blendfbm": 256, + "counted": 3120, + "cache": 532, + "context": 34805, + "counts": 532632, + "lookup": 10000, + "slice": 384, + "interpolate": 384, + "surface": 384, + "spconstant": 78, + "spsampler": 330, + "spfail": 4, + "sppoints": 768, + "sprange": 13536, + "greset": 368, + "gconst": 3414, + "ggradient": 672, + "gbind": 768, + "gcache": 2870, + "gsame": 1808, + "gslice": 272, + "gunary": 832, + "gbinary": 960, + "gclamp": 384, + "gchoice": 128, + "glerp": 128, + "ginterp": 368, + "gsurface": 256, + "ginfo": 17906, + "gtry": 3900, + "gcompile": 18282, + "gdistance": 128, + "ginterval": 1024, + "gsconstant": 1120, + "gspline": 2160, + "gspoints": 1456, + "gseed": 70, + "gregister": 326, + "gready": 70, + "ginstance": 640, + "goffset": 262, + "gnoise": 838, + "gblended": 64, + "gend": 128, + "round": 1576, + "ground": 880, + "power": 1456, + "gpow": 1552, + "wfield": 96, + "blenddensity": 96, + "wcontext": 20416, + "gwfield": 96, + "gblenddensity": 176, + "gref": 288, + "gnamed": 224, + "glookup": 64 + }, + "inputs_sha256": "3bb59de57994936c7347c504b212900f9ec7c3c3eff1f0e49c051b46d23bed97", + "rust_output_sha256": "e1fcf55d697acd4d0f6470079416c5cae2cbc75d524f8f7aee50b5555f2c330d", + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDensityOracle.java": "0be907c58f2bb35f924b1c42919397cdfc0c38f7be500e26c5d462f46aaf1f08", + "tools/test_density_parity.py": "ab052eb065a0ae0c0469e95335b952153adbb01f46b5d12ad075fc1a5a8ec0d0", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "69f89566a78456c29caaa39dacedfe711ca59e49b78f64e68b0414fb6a73d8fc", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "3968e2a337a6a23226c485057c79359e66df16683f00fb4ebc9fabb03910a015", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-core/tests/density_world_fields.rs": "e193e45080817ef92547828a8d106482a376b9f788e39d4d3831f44e9d693148", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "faae2edce8b573fd32fcb4bd1f898be7d700a5b38479439f5bec96df764688fd" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "e1fcf55d697acd4d0f6470079416c5cae2cbc75d524f8f7aee50b5555f2c330d", + "matched_output_lines": 15524627 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e1fcf55d697acd4d0f6470079416c5cae2cbc75d524f8f7aee50b5555f2c330d", + "matched_output_lines": 15524627 + } + ], + "scope": "Compiled constant, clamped/repeated/mirrored gradient, unshifted and XZ/XYZ shifted noise, all eleven vanilla unary operators and constant-operand specializations, binary arithmetic/min/max, power with constant base/exponent samplers, floor/nearest/ceil/truncate rounding to integer or sampled multiples, range choice and linear interpolation with constant-branch/endpoint specializations; multi-threshold and single-threshold selection; shift/shift-A/shift-B offset samplers; old blended terrain noise definition ranges, ordered smeared FBM construction, scalar/bulk composition and failure RNG state; distance metrics and distance-to-point samplers with wrapped differences; cached and uncached density contexts, nested cache nodes, scalar/volume hits, packed-coordinate key collisions, NaN misses and zero-initialized failure buffers, exact lattice lookup; X/Y/Z and combined XZ slices, reduced-volume bulk evaluation, unchanged-volume delegation, nested and cached children; positive-cell grid interpolation with aligned delegation, eight-corner scalar sampling, repeated-addition bulk columns and dense-then-strided selection; raw and Y=0-sliced surface-height search with scalar density probes, bulk upper bounds, strict positive crossing, saturating floor conversion and wrapped cell alignment, early lower-bound return and single-layer validation; nested cubic splines with endpoint extrapolation, binary interval selection, compact coordinate IDs, lazy scalar/volume coordinate caches, repeated NaN scalar misses and partial output failures, constant-NaN compile rejection and conservative spline range propagation; interval construction, hulls, arithmetic/min/max, reciprocal, abs/square/sign, powers and logarithms, clamp, monotonic endpoint mapping, finite/infinite interpolation, predicates, equality and Java hashes; scalar and strided bulk paths, signed/wrapped integer coordinates, nested child bulk evaluation, unary/leaf buffer tails, exact-volume multi-input buffers, scalar short circuits, NaN/signed-zero differences between scalar and bulk min/max, arithmetic failures and partial writes. Finite outputs and signed zeros compared by bits; NaNs canonicalized. Initial integrated density graph compiler for constants, gradients, all eleven unary and six binary operations, power, rounding, clamp, range choice, lerp, interval selection, distance-to-point, slices, caches, interpolation, surface search, nested cubic splines, registered normal and shifted noise, offset noise, old blended noise and outer End island density: structural interning, range/axis metadata, constant and disjoint-range specialization, uniform-axis slicing, cache-ID allocation/deduplication, memoized roots and failed preparation state are compared with vanilla. Seeded normal-noise lookup, modern/legacy positional factories, named instance reuse, dedicated Nether legacy branches and old blended terrain seed selection are checked against vanilla RandomState's actual compile context. Power samplers retain base/exponent evaluation order, literal-base precedence, sqrt/identity/square/cube exponent specialization, negative-exponent reciprocal composition for sqrt/identity/square/cube and the direct signed-exponent fallback, f64 constant operands, buffer tails and partial writes. Power ranges check exact and interval exponents, signed-zero bases, negative bases with integer exponent bounds, infinite exponents and NaI hulls. Log and square-root graphs check partially invalid domains, range clipping, cache preparation, scalar/bulk composition and trusted bound metadata. Rounding checks positive-infinity ties, int saturation, signed zeros, NaNs, infinite and zero multiples, literal-one specialization, dynamic-multiple child order, declared range propagation, cache preparation and partial input writes on multiple failure. End islands use the dedicated legacy world-seed stream, 17,292 discarded draws, simplex island threshold, truncated negative coordinates, wrapped integer edges, vertical bulk columns and nested/cache/spline/interpolation graphs. Context-bound alpha, offset and structure-density samplers compare fallback/custom fallback, missing/bound fields, declared metadata independent of bindings, same-context delegation, scalar/bulk child calls, failure writes, constant tails, cache namespaces, uniform-axis slicing and nested spline/arithmetic/interpolation graphs. Blend-density wrappers compare absent and actual EMPTY vanilla Blender contexts, input-first evaluation and input metadata propagation; nonempty old-world Blender math remains pending. Direct and registered density holders compare structural value versus holder identity, named lookup, raw delegation and metadata, one-level reference inlining before cache detection, nested holder rewrite replacement, constant specialization, cache allocation/deduplication and memoized roots. Remaining graph definitions, remaining range integration, codecs, world-dependent samplers and terrain integration remain pending; no complete terrain, gameplay, rendering or performance claim." +} diff --git a/benchmarks/rust-disk-2026-10-06/scoped-parity.json b/benchmarks/rust-disk-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..ca6034e06 --- /dev/null +++ b/benchmarks/rust-disk-2026-10-06/scoped-parity.json @@ -0,0 +1,205 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 76409, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "bd07d67d22b7c851901a9dbf4bc814947162196e5f8011987dbc6f43b1720215", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "99a396b9b983f6ca9149133251f3ece9aaf76d3d16dafa1f322378212a19490c", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_disk_parity.py": "e6a149b8d51e83f620106e489423612a13c994ee480721111e2171aa4ee40d8a", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b3caf26bd3afc9d10cdcca3f7e794c30abf5ba09afa1fe80ba8f44713acdb274", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "8a2834a9347ee2c2db7cf1c86a064907ec06e9ac16ba9cc3936e315fc4ad49ca", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "2ea6d26fe88c633ad3efe7bdb6fc49f54961cbdf93b82919d79cf7d37a5c3c7d", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "3433fae1737cc1656029f4e5bf7d2fee070c0013c7cfd6f20fbd8db0b5bcc0ed", + "crates/horizon-world/src/worldgen/feature_region.rs": "3b893ceafbdd1d7b4264f4022dbdb6a7142dfc7001a5cf5c304f5ca7695dfaa0", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "b967b71867dac7f83f6dba0eb063ad9c581aa2f29087c2128052a4eb02f199c2", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "e128b958ff24552468f4ef717847eddc7061ebcfc3db8aedc12c68d2ca6cf775", + "crates/horizon-world/examples/simple_block_fixture.rs": "ca50d73773266d3cfcc3c06947a2197bfd0882a8d604f8daa58229a732e1ba11" + }, + "fixtures_sha256": { + ".local/rust-disk-parity/inputs.txt": "e42fc82823e9d31d547df9e2b8650bbf1087d26d9b3ea5bdae24b12c2cc79f66", + ".local/rust-disk-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-disk-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-disk-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-disk-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-disk-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-disk-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-disk-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-disk-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-disk-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-disk-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-disk-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-disk-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-disk-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-disk-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-disk-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-disk-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "5af9b8533812d5169402c8e1adff112d612409bc04badeafcc8e7293a38509f0", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "5af9b8533812d5169402c8e1adff112d612409bc04badeafcc8e7293a38509f0", + "matched_output_lines": 2816586 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "5af9b8533812d5169402c8e1adff112d612409bc04badeafcc8e7293a38509f0", + "matched_output_lines": 2816586 + } + ], + "scope": "Native DiskFeature codec and descending replacement columns, circular inclusive-box traversal, every candidate state, every state above a replacement, all valid radius/half-height constants and bounded integer provider decoding. Optional-provider gaps retain prior placement while rejected targets reset it. Two-block markAboveForPostProcessing reads stop on any air variant; chunk resolution and native ProtoChunk mark calls are traced with ordered failures. Provider draws, repeated mutations, rejected writes, both random modes and overlay/modifier composition are compared. Wrapped finite boxes and failure-terminated pathological prefixes are covered; Rust bounds visits to 2^20. This fixture checks postprocessing call order, not subsequent chunk postprocessing execution. Complete chunk generation and gameplay remain pending." +} diff --git a/benchmarks/rust-dynamic-support-2026-10-06/scoped-parity.json b/benchmarks/rust-dynamic-support-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..2b1faf4b7 --- /dev/null +++ b/benchmarks/rust-dynamic-support-2026-10-06/scoped-parity.json @@ -0,0 +1,182 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "uncached_states": 199, + "collision_fixtures": 60161, + "shulker_progress_fixtures": 13014, + "active_piston_fixtures": 9216, + "fixtures": 107308, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDynamicSupportOracle.java": "d608e197b5b48d3a3ed522e72427610343dede1146e24bf5d17c6f046b480b57", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "02acfbae94aee306c5a4e1db7c86c68f7d6156ddd3dd477dc9e9d06e5ca98118", + "tools/test_dynamic_support_parity.py": "6652e6284f7da62787a5fc03332950dba0b2c4b81348d22421617b658d3d7ce1", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_properties.rs": "e74b368012d4d440dcdbd4d9bcaf80495220b90557f0e0c733b0aa21ad03c53c", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "cf97e26f839a393687922e4b74ecbe140a048ee6eeab98b4d19818e6dc3bea3e", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "8a2834a9347ee2c2db7cf1c86a064907ec06e9ac16ba9cc3936e315fc4ad49ca", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "09f697d8d4e709acacc8e9f7c35c5fd307bab6ab0df4a1339fe760afc655cdab", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "6be7c0161cecf1362c196e91ecbeb166e16c8da3731d988ce8f2308f06209265", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "fe61a5e43179a7588737a71782ea246811fe2c8721e74793e1ac018c8eb93c34", + "crates/horizon-world/src/worldgen/feature_region.rs": "2c78e5f1bdb08307f8d982f231f1abbc3306cd54348d9023b86ee6ed3516fd33", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "cd1d2fe305ad4e205e7e01b32128ff895fa8aacc76fa11f200ad6c7c9fba1f49", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "fa0616353f07460975ab323357ab280b7f35e7bfe2de6edc08d304316766ed26", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "89cb0410899608545aa1ba3b1b4c1babf533fb25efd341feab1c87661f44f7b9", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "821981c893fc84312351503f2be0c06c681d8bc768dade14576697cf047a9f8f", + "crates/horizon-world/examples/dynamic_support_fixture.rs": "5ab94e91a419b43d5644f13f7d7e39b3bc60b95f625ae78b43d50543b84997a7" + }, + "fixtures_sha256": { + ".local/rust-dynamic-support-parity/inputs.txt": "2d24447d3bbcd56ab60a6d485fcae13f6e723d57090280a9597ac073763903fe", + ".local/rust-dynamic-support-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-dynamic-support-parity/uncached-states.json": "0e4a57a4ac3e1cde7463b2245d2d76f776d572628eb3ad4a0bbc11184ef7afc3", + ".local/rust-dynamic-support-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-dynamic-support-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078" + }, + "rust_output_sha256": "9eee435b8d88db41ae17ff424f122f63e6cda51bdab5f6069160d781b6a038a7", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "9eee435b8d88db41ae17ff424f122f63e6cda51bdab5f6069160d781b6a038a7", + "matched_output_lines": 4867780 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "9eee435b8d88db41ae17ff424f122f63e6cda51bdab5f6069160d781b6a038a7", + "matched_output_lines": 4867780 + } + ], + "scope": "Actual native support-shape and no-entity-context collision selection, block offsets and all support directions/types for the 199 uncached states. Bamboo, speleothem thickness/direction, scaffolding, powder snow and shulker support are compared over coordinate boundaries and privately allocated block-entity snapshots, including animation state, absent/wrong entity types and failures. Collision checks additionally cover exact shulker bounds and shape representation over progress interpolation boundaries and deterministic finite progress pairs. Moving-piston selection also delegates to actual native entity collision generation for active snapshots; Rust composes the independently tested piston algorithm with registry collision shapes across extension/retraction, source heads, progress boundaries, noclip directions and world-query failures. Entity lifecycle, ticking/pushing and full gameplay remain pending." +} diff --git a/benchmarks/rust-edge-backoff-2026-10-07/scoped-parity.json b/benchmarks/rust-edge-backoff-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..b6f01a985 --- /dev/null +++ b/benchmarks/rust-edge-backoff-2026-10-07/scoped-parity.json @@ -0,0 +1,214 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 11168, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEdgeBackoffOracle.java": "43b1c6d4f812b64a9173ec9ad4418181195809f13bdd9b40dc51d422e178ca72", + "tools/test_edge_backoff_parity.py": "c1e53b422dac7df5b52de1367c0896f629a81cb377ff4ea678afdbf71f7fddcf", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "60097645dd2641eb53cde248b7d833bbe8e44ca53a3de4278aed6ccccc14e733", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_properties.rs": "9c78bed0d30c8b9cfaa413b9b81b0bf94861605c13b26754e09b24e83d75a227", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/edge_backoff_fixture.rs": "6f8d84bd0690cebca4f9b2b21e75fda68682a2b16b4d6b47006bac8bfba8f7ff" + }, + "fixtures_sha256": { + ".local/rust-edge-backoff-parity/inputs.txt": "a6175306f75e66a432d74d13a3e489a0a1c046441f66a572ed6880a41a42082b" + }, + "rust_output_sha256": "e116ab9948901cc27a78a82a3a8b5ce171b5f10587e01022d91d8467af656276", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "e116ab9948901cc27a78a82a3a8b5ce171b5f10587e01022d91d8467af656276", + "matched_output_lines": 46578 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e116ab9948901cc27a78a82a3a8b5ce171b5f10587e01022d91d8467af656276", + "matched_output_lines": 46578 + } + ], + "scope": "Actual Player.maybeBackOffFromEdge, isAboveGround and canFallAtLeast with controlled step/staying/ground getters and ordered collision-free query results. Compares mover and flight guards, fall-distance boundaries, float step widening, exact thin probe bounds, X/Z/diagonal reductions, signed zero/nonfinite inputs and injected query errors. This does not establish live player crouching state, attribute provisioning or integrated registered-world ledge behavior; those need separate integration checks." +} diff --git a/benchmarks/rust-effect-attribute-modifiers-2026-10-07/scoped-parity.json b/benchmarks/rust-effect-attribute-modifiers-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..fe86b1eb8 --- /dev/null +++ b/benchmarks/rust-effect-attribute-modifiers-2026-10-07/scoped-parity.json @@ -0,0 +1,304 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 3317, + "fastutil_sha256": { + ".local/minecraft/26.3/libraries/server/it/unimi/dsi/fastutil/8.5.18/fastutil-8.5.18.jar": "9094ae67d01d0ad246f886f11ad557fc2e79c72cbf3feed83e1512a8ae90a74a" + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEffectAttributeModifiersOracle.java": "a62ebf408d4a0b2f38a561d39f2c325b226b86516cae3ae4605e1f9a050b3747", + "tools/test_effect_attribute_modifiers_parity.py": "e4bc6d1eee3b3a240a447836e8cdaa18c6777160a7b4e9cc163443057dbee787", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "0c0f3338bcabc7fb568c4588736c02dd6d3c61fe7f871a427986830b625a3c90", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/effect_attribute_modifiers_fixture.rs": "b5dd3fa298ee8241415ae08ef3068decf448101d8e02672c67d1e61fbc73a2c5" + }, + "fixtures_sha256": { + ".local/rust-effect-attribute-modifiers-parity/inputs.txt": "af718dd8e32c708bfe4c8ccdba882f174b0f30a90a9074fd715253ab73a28f06" + }, + "rust_output_sha256": "ae77cf7c813f7be5e9e7d544b0cb4b34eb39bfa79bb185e9b2473ab9fcbb4a82", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "ae77cf7c813f7be5e9e7d544b0cb4b34eb39bfa79bb185e9b2473ab9fcbb4a82", + "matched_output_lines": 1421730 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "ae77cf7c813f7be5e9e7d544b0cb4b34eb39bfa79bb185e9b2473ab9fcbb4a82", + "matched_output_lines": 1421730 + } + ], + "scope": "Actual MobEffect addAttributeModifier/createModifiers/addAttributeModifiers/removeAttributeModifiers with native fastutil definition map and AttributeInstance permanent modifier storage, cached values and dirty observers. Tests wrapping amplifier addition, double scaling, fresh modifier identity, map entry rereads after virtual getInstance/remove callbacks, null/missing instance skipping, map growth/shrink/replacement and partial failures. AttributeMap instance lookup and dirty receiver are controlled; callback mutation touches only definitions/routes. Registry effect definitions, pending attribute set ownership, entity notifications, full gameplay and playable platforms remain pending." +} diff --git a/benchmarks/rust-effect-notifications-2026-10-07/scoped-parity.json b/benchmarks/rust-effect-notifications-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..12c3a466f --- /dev/null +++ b/benchmarks/rust-effect-notifications-2026-10-07/scoped-parity.json @@ -0,0 +1,301 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 4476, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEffectNotificationsOracle.java": "44e9c1e4250a49a7b48c836caea5f9d3b863edf3238420272ee0d8671e1e1673", + "tools/test_effect_notifications_parity.py": "ceea3baa62e5e4a5a73e932cb33d9062467d8ddd57558c989a93aa283530bb58", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "f7a851566dbabb96c138c3a364617f3ba84070908772fa44970d8079c2a4e47a", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/effect_notifications_fixture.rs": "7fe3750a96c45e6023d931d5615fff35f011b6eb5eae0a0075d58393a48f449e" + }, + "fixtures_sha256": { + ".local/rust-effect-notifications-parity/inputs.txt": "e7e3cbd8c5d6adafd87afa28919060f429bdf9ef7bd818a0e1dc7ddeb1c4ee4d", + ".local/rust-effect-notifications-parity/inputs-client.txt": "b655c7578f2f1acc55188de35f00f997d44437d7fd309dd692c7d8a68d03f177", + ".local/rust-effect-notifications-parity/inputs-server.txt": "b655c7578f2f1acc55188de35f00f997d44437d7fd309dd692c7d8a68d03f177" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "399be32217b9df00f188f9692bc9b5b467e225eefce857a88554cd1b0fe1a9ed", + "rust_output_sha256": "399be32217b9df00f188f9692bc9b5b467e225eefce857a88554cd1b0fe1a9ed", + "matched_output_lines": 1667616 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "399be32217b9df00f188f9692bc9b5b467e225eefce857a88554cd1b0fe1a9ed", + "rust_output_sha256": "399be32217b9df00f188f9692bc9b5b467e225eefce857a88554cd1b0fe1a9ed", + "matched_output_lines": 1667616 + } + ], + "scope": "Inherited LivingEntity eligibility and add/update/remove notification bodies, private refreshDirtyAttributes and sendEffectToPassengers, composed with native active-effect storage. Actual effect instances, fastutil pending sets, immutable passenger lists and update/remove packet constructors are used. Covers eligibility tag precedence, dirty writes, captured maps/sets/connections, callback mutation, pending iteration/clear prefixes, packet fields and failures. Registered modifier bodies, onAttributeUpdated consequences and packet transport remain controlled; full entity/player lifecycle and gameplay remain pending." +} diff --git a/benchmarks/rust-effect-sync-2026-10-07/scoped-parity.json b/benchmarks/rust-effect-sync-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..13abd78c4 --- /dev/null +++ b/benchmarks/rust-effect-sync-2026-10-07/scoped-parity.json @@ -0,0 +1,319 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 16004, + "registered_effects": 40, + "constant_factories": 6, + "fastutil_sha256": { + ".local/minecraft/26.3/libraries/server/it/unimi/dsi/fastutil/8.5.18/fastutil-8.5.18.jar": "9094ae67d01d0ad246f886f11ad557fc2e79c72cbf3feed83e1512a8ae90a74a" + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEffectSyncOracle.java": "902874b424adb4e7d6513e7ef155118f1e5cfe79714cadb57780c20c6c27fc8b", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEffectParticlesOracle.java": "1905f08ef1419e5216ef606bfb4ec54315cd51b5b57f63017df675911ecc2159", + "tools/test_effect_sync_parity.py": "c6f2287a192e26e222e8d283e17e1f7e19a4b49e4a91e4859057e7eab723b4c2", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "2beafc1d0c8c1097ab2d8088c5cc2558b2664e43f5a57c563e19a5227dab9509", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/effect_sync_fixture.rs": "136ab405a6c6c48917d7c64a99c355fdef20bd4ef5a30ed189c9e893a9202b57" + }, + "fixtures_sha256": { + ".local/rust-effect-sync-parity/inputs.txt": "6eed505f2525c3d4caeffa6c76c3bd9a24345ef943887fe53fb55542341896f4", + ".local/rust-effect-sync-parity/catalog.json": "2b730e565607d129893554ca3eeeacbf0e62642f10b5d8c63fa9006d0a32325e", + ".local/rust-effect-sync-parity/catalog-client.json": "aea19525e4604710fad3b0a9c7ce60deb625f76cd89f63106377bf454fc82d30", + ".local/rust-effect-sync-parity/catalog-server.json": "aea19525e4604710fad3b0a9c7ce60deb625f76cd89f63106377bf454fc82d30", + ".local/rust-effect-sync-parity/inputs-client.txt": "7e8f8c784b7311546044ab1bd630d1f6e3c597291879f82c23b36f0b02020a01", + ".local/rust-effect-sync-parity/inputs-server.txt": "7e8f8c784b7311546044ab1bd630d1f6e3c597291879f82c23b36f0b02020a01" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "77a362132ddd1e1ceed64a60cca065011295f8eeadad128e2b68a0fd71b7862b", + "matched_output_lines": 2754744, + "rust_output_sha256": "77a362132ddd1e1ceed64a60cca065011295f8eeadad128e2b68a0fd71b7862b" + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "77a362132ddd1e1ceed64a60cca065011295f8eeadad128e2b68a0fd71b7862b", + "matched_output_lines": 2754744, + "rust_output_sha256": "77a362132ddd1e1ceed64a60cca065011295f8eeadad128e2b68a0fd71b7862b" + } + ], + "scope": "Inherited native LivingEntity effect particle/invisibility/glowing synchronization, dirty clearing, Entity shared byte flags and actual SynchedEntityData mixed byte/boolean/particle-list storage. All 40 registered effects use exporter-checked inherited pure factories: fresh identity-bearing colored options or registry-constant simple options. Tests active-map order, particle option identities/list equality, ambient/visible flags, server/client glowing branches, repeated virtual lookups, captured data objects, reentrant data packing/writes, callback map mutations and failure prefixes. Replays each JVM holder hashes/identities. Custom impure particle factories, particle rendering/transport, full effect tick integration and complete gameplay/platform builds remain outside this gate." +} diff --git a/benchmarks/rust-effect-sync-2026-10-07/synced-bytes-regression.json b/benchmarks/rust-effect-sync-2026-10-07/synced-bytes-regression.json new file mode 100644 index 000000000..bdaba1997 --- /dev/null +++ b/benchmarks/rust-effect-sync-2026-10-07/synced-bytes-regression.json @@ -0,0 +1,307 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 7842, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSyncedBytesOracle.java": "db5fd583900168ee962dec3d1712d1bd4c2e300b10fda0e880427805345e039b", + "tools/test_synced_bytes_parity.py": "506e437e8a3d2fe1993acb68d52765cf599d793e41be177692e5669f92e3ae52", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "2beafc1d0c8c1097ab2d8088c5cc2558b2664e43f5a57c563e19a5227dab9509", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/synced_bytes_fixture.rs": "3f422e3a1dcb6815cf90a765ad3d42a2126352523a8b5d369249e8809c688b2d" + }, + "fixtures_sha256": { + ".local/rust-synced-bytes-parity/inputs.txt": "114892687b60fa881c44ef391250db430852e4f221bc28406983c204dbf00364" + }, + "rust_output_sha256": "0faa1e20a530ac978ebb54b68731242ce7212aee21bb4c5c3782e79a11dcbdf4", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "0faa1e20a530ac978ebb54b68731242ce7212aee21bb4c5c3782e79a11dcbdf4", + "matched_output_lines": 572100 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "0faa1e20a530ac978ebb54b68731242ce7212aee21bb4c5c3782e79a11dcbdf4", + "matched_output_lines": 572100 + } + ], + "scope": "Actual byte SynchedEntityData values and inherited LivingEntity using-item/offhand queries plus protected flag writes. Covers every initial byte, signed masks, ordered dirty/default output, assignment, reentrant flag/data writes, callback packing and failures before dirty marking. Rust shares a typed scalar implementation with existing synchronized floats. Heterogeneous serializer maps, entity schema/network codecs and full item-use/gameplay integration remain pending." +} diff --git a/benchmarks/rust-effect-sync-2026-10-07/synced-floats-regression.json b/benchmarks/rust-effect-sync-2026-10-07/synced-floats-regression.json new file mode 100644 index 000000000..b8a0e1b61 --- /dev/null +++ b/benchmarks/rust-effect-sync-2026-10-07/synced-floats-regression.json @@ -0,0 +1,307 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 3019, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSyncedFloatsOracle.java": "567a871ed82ad0c0d1fef6f84cc2a68732ddae9110a9926c659af77933c6f61d", + "tools/test_synced_floats_parity.py": "64a2a3ef6c4ab63fcfd18fb3cd0442e2bbe2249481cbf7899aeadb3b6b61256f", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "2beafc1d0c8c1097ab2d8088c5cc2558b2664e43f5a57c563e19a5227dab9509", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/synced_floats_fixture.rs": "71858a47a15cb62eb8b53dfb507d6e2e96d23dda04b84bdd660b49301eeb9757" + }, + "fixtures_sha256": { + ".local/rust-synced-floats-parity/inputs.txt": "22904cc4d2748db510a0a5935c1024fb2d8d5bc9ce994b414cf6d265d6ca60c9" + }, + "rust_output_sha256": "80bb47d39c2d89981b03a0dd25715fcf9ab6d3f41671e9074f3a143b0bc78c2b", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "80bb47d39c2d89981b03a0dd25715fcf9ab6d3f41671e9074f3a143b0bc78c2b", + "matched_output_lines": 554909 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "80bb47d39c2d89981b03a0dd25715fcf9ab6d3f41671e9074f3a143b0bc78c2b", + "matched_output_lines": 554909 + } + ], + "scope": "Actual SynchedEntityData Float fields: boxed equality, forced updates, callback-before-dirty flags, ordered dirty/default extraction, received assignment including duplicates, partial unknown-ID/observer failures, batch callbacks and reentrant set/assign/pack. Native table gaps are untouched default dummy Float items; tested keys are explicit configured IDs. Other serializers, type-mismatch errors, wire codecs and player absorption integration remain pending." +} diff --git a/benchmarks/rust-end-gateway-2026-10-06/scoped-parity.json b/benchmarks/rust-end-gateway-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..a7f1d5fa9 --- /dev/null +++ b/benchmarks/rust-end-gateway-2026-10-06/scoped-parity.json @@ -0,0 +1,219 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 5820, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "eba60b2b071c200ad46748b2a0a234ad8f77e09c5605a4871d3e669b961944e6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "e871d3a01f15616a98ca9227c27a81e4d17e2d57ac4e68a5650a70fa29811497", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_end_gateway_parity.py": "20eeba6b78c5e61e33f67fa86446ee5fb2436859879523edb29b922a1e6a3eda", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "cd0564340c792582108916fc1f6cea84f6cb7c34b70bff443bab878548eced9a", + "crates/horizon-world/src/worldgen/feature_region.rs": "ae7552027b2efc0db6299dc14ab04c28615e43b876b5d67644855fd7a047e33e", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "e05c5ad1e9eb9ae398fdff538e42852a08a328bac1b400d359ffca5a16d678a7", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "b8fb9fb80a66a851d916f07f15df1a40b6cc95b49e71aaec4d4b4107f13d9f9f", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "c3396e5316f4bf890571eb233c20ccedd56324810aad458a52b7a282da0fa6f8", + "crates/horizon-world/examples/simple_block_fixture.rs": "c6d850e1192a11af73996835c251caf639d6fc246d2a39d4e2eba8b25ed45cb2" + }, + "fixtures_sha256": { + ".local/rust-end-gateway-parity/inputs.txt": "00559202fa5a17190a0c0a0810e142f95c8e5bd92a4bc5c46648118ef2511f44", + ".local/rust-end-gateway-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-end-gateway-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-end-gateway-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-end-gateway-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-end-gateway-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-end-gateway-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-end-gateway-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-end-gateway-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-end-gateway-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-end-gateway-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-end-gateway-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-end-gateway-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-end-gateway-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-end-gateway-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-end-gateway-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-end-gateway-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "56b1b5c93f6a73ffd594ea6d9c38e96680bc42893ecf7fc05d0cd9cb29a8cb2a", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "56b1b5c93f6a73ffd594ea6d9c38e96680bc42893ecf7fc05d0cd9cb29a8cb2a", + "matched_output_lines": 754877 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "56b1b5c93f6a73ffd594ea6d9c38e96680bc42893ecf7fc05d0cd9cb29a8cb2a", + "matched_output_lines": 754877 + } + ], + "scope": "Native EndGatewayFeature required exact and optional exit codecs, 3x5x3 inclusive box traversal, air/bedrock/gateway geometry, update flags and conditional gateway block-entity exit updates. Native actual TheEndGatewayBlockEntity.setExitPosition mutates exit/exact fields before a traced dirty notification; missing/other entities are no-ops. All world-call failure boundaries, rejected writes, repeated updates, both random modes, placement composition, extreme coordinates, bounded overflow prefixes and malformed/numeric codecs are compared. Fixture block entities are controlled independently of writes and their fields are compared after success or partial failure; automatic entity lifecycle, world dirty propagation, gateway teleportation/search and full End generation are not simulated. Rust bounds pathological box work to 2^20 visits." +} diff --git a/benchmarks/rust-end-podium-2026-10-06/scoped-parity.json b/benchmarks/rust-end-podium-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..d1fe43b06 --- /dev/null +++ b/benchmarks/rust-end-podium-2026-10-06/scoped-parity.json @@ -0,0 +1,212 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 38207, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "1d4616f80e625ad1266aaa94d7c72770944d838cc06a085d6726e1ee812133cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "e871d3a01f15616a98ca9227c27a81e4d17e2d57ac4e68a5650a70fa29811497", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_end_podium_parity.py": "41e4a9b6f671c91bafa66141df82aede8cb19932b90d2833c8dd1194f8e53f2c", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "5ce5c6eaa5f8a2557a620e533788217b1eb430654801dcf6135d6c92d7a012ac", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "9911f293fe752178972737b745db27389ac05834e3f39b018e00d53c2bd0bb20", + "crates/horizon-world/src/worldgen/feature_region.rs": "79e8ce343b0dc80dceb8b214c818b383d9b110540bb8c3b0ac32863a7800e288", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "dc3f07719dac53c5ceab6635598c010ccc93db0b149970894407bf9b713946e7", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "18eaf31bd62bb4ecb29539e274dff6fc15cccf19d27032b80bc019ce3de179fb", + "crates/horizon-world/examples/simple_block_fixture.rs": "517b0fb43755555e276b2cdb976cf0b7ae1adc6499bce84f3c9c7f51a0456949" + }, + "fixtures_sha256": { + ".local/rust-end-podium-parity/inputs.txt": "e8b36b1b28d3a7df6a8ccea01f55ceb0c3bbdd87ad02bf91eecb0cb70c09eaaa", + ".local/rust-end-podium-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-end-podium-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-end-podium-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-end-podium-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-end-podium-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-end-podium-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-end-podium-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-end-podium-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-end-podium-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-end-podium-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-end-podium-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-end-podium-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-end-podium-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-end-podium-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-end-podium-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-end-podium-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "a050dffc6e0a901bf5e12df66e318ba82e5b0f5fa1ab634c4b2f71632961565a", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a050dffc6e0a901bf5e12df66e318ba82e5b0f5fa1ab634c4b2f71632961565a", + "matched_output_lines": 3309219 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "a050dffc6e0a901bf5e12df66e318ba82e5b0f5fa1ab634c4b2f71632961565a", + "matched_output_lines": 3309219 + } + ], + "scope": "Native EndPodiumFeature optional active codec, inclusive box order and distance cutoffs, bedrock/end-stone/air/portal selection, central pillar and north/east/south/west wall torches. All states pass active replacement prefixes; complete representative runs cover both modes, repeated mutation, exact block identity, partial failures, rejected writes and composition. Destruction is a controlled world request with independently selected success and synthetic air replacement; drops, block entities, updates and dragon/portal gameplay are not simulated. Rust bounds pathological overflow-box work to 2^20 visits; nonoverflow extreme coordinates are tested." +} diff --git a/benchmarks/rust-entity-attributes-2026-10-07/scoped-parity.json b/benchmarks/rust-entity-attributes-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..1778d89c7 --- /dev/null +++ b/benchmarks/rust-entity-attributes-2026-10-07/scoped-parity.json @@ -0,0 +1,243 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 4720, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "tools/test_entity_attribute_parity.py": "cdd15835061eb2ed8d1fbbbf77cf515ec7515b7ff129a3deaf403142ce9caead", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attributes/entity.rs": "d165e952e0ff2d1a1b037c03df5fbc778b7e263b8f9e402cf9b0fa27c933e0c6", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "172ecf965d8ccbe16ed89e8ad1471cf384e2609ab3ca25f309456e726a4d6857", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/entity_attribute_fixture.rs": "f6512186478dc1de5e5b983d81aa23f3834e85875f9fa9bec0b9967117deff95" + }, + "fixtures_sha256": { + ".local/rust-entity-attribute-parity/inputs.txt": "9a45638fedc1b8a70d247acc64dc5b06fa3e2ec550fc4a65d89173fabdd0e886", + ".local/rust-entity-attribute-parity/catalog.json": "d1e488e4f432888beb9f643904c8bca242d1e2093f53e23e07da305d70cf7106" + }, + "rust_output_sha256": "dafe9dce265957c9cafe59a6b830a68fd23a2c2e2d8de3df215ce38252ae0100", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "dafe9dce265957c9cafe59a6b830a68fd23a2c2e2d8de3df215ce38252ae0100", + "matched_output_lines": 1771555 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "dafe9dce265957c9cafe59a6b830a68fd23a2c2e2d8de3df215ce38252ae0100", + "matched_output_lines": 1771555 + } + ], + "scope": "Every registered attribute and entity DefaultAttributes supplier, actual AttributeMap per-attribute queries, lazy creation, mutation, base reset, update/sync membership and independent acknowledgements. Composes the verified attribute arithmetic/cache/modifier engine. Cross-attribute collection order is normalized to registry order; bulk assignment, custom suppliers with modifiers, save/network codecs, live entities and full gameplay remain pending." +} diff --git a/benchmarks/rust-entity-collision-2026-10-07/scoped-parity.json b/benchmarks/rust-entity-collision-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..dc3c48b46 --- /dev/null +++ b/benchmarks/rust-entity-collision-2026-10-07/scoped-parity.json @@ -0,0 +1,208 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 30648, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityCollisionOracle.java": "413f1dcf0702e8096e388ad1334121421f8293bc0e305271102d24dc38d3ab38", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_entity_collision_parity.py": "11718ec84b9d6dc15b08c74e00246f3cbba6de2f9e8b028fa1e1c3cf596d9b3b", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "b00bfa09225e5de0a9199a405fe0a4bec5017da833432e5915dbf1941b8fb098", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "434f48e310beb66490f6d861d326a5382a04dfb30b253676710b3f9fed6ca0c8", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "8ac9e90fe899855036658afd862ff20c4dcd15d1bd3f92a763c4795fecf0549f", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/entity_collision_fixture.rs": "f3c59abaedbb151b35aa9681ffca9a75c45224fb197250e849b6621fbf703944" + }, + "fixtures_sha256": { + ".local/rust-entity-collision-parity/inputs.txt": "42236d8e4ac40fed731a339502d724d19a2d1d371998f4992b7582d2a1f77815" + }, + "rust_output_sha256": "c7a1f9e35271672cb8e5b0800d5c228e0564ca00f0efb49e95c1890c9be52dab", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "c7a1f9e35271672cb8e5b0800d5c228e0564ca00f0efb49e95c1890c9be52dab", + "matched_output_lines": 158558 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "c7a1f9e35271672cb8e5b0800d5c228e0564ca00f0efb49e95c1890c9be52dab", + "matched_output_lines": 158558 + } + ], + "scope": "Actual EntityGetter.getEntityCollisions over privately allocated ordered entity snapshots. Compares average-size short circuits, epsilon-inflated query bounds, exact intersection/exclusion and spectator filtering, default canCollideWith including shared vehicle roots, overridden source policies, null-source canBeCollidedWith and emitted shape geometry. Policy callbacks are traced and can fail after each query; candidate lists and vehicle relationships are supplied snapshots. This does not establish live entity storage, broad-phase indexing, entity-type-specific collision policies, lifecycle or gameplay parity." +} diff --git a/benchmarks/rust-entity-fluid-2026-10-07/scoped-parity.json b/benchmarks/rust-entity-fluid-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..d597b4aa6 --- /dev/null +++ b/benchmarks/rust-entity-fluid-2026-10-07/scoped-parity.json @@ -0,0 +1,233 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 7646, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityFluidOracle.java": "79f5da09aa75a833627419619276e275fa2ad79d85eeb7e8e26861d33659c69a", + "tools/test_entity_fluid_parity.py": "34d563a48f30434258cc8f836457f396ee4f1b2973a80b112bda22be1dc90bb8", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "6fdb5605a0c4378587ab29734393a465b4fab0a0ce260731033f44b948f2e889", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/entity_fluid_fixture.rs": "a22f84b7a053d220c7a7fb260ac29f3e12ea1134530d9873c5d64eeaeb3e2b89" + }, + "fixtures_sha256": { + ".local/rust-entity-fluid-parity/inputs.txt": "e9eb2297d21b93c9c25046f240984508fa3593d14833e4f5592a623b8ed85838" + }, + "rust_output_sha256": "a675c1a446e77894680508b5160f2b8ce656ace279ad80352a122fd517efa699", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a675c1a446e77894680508b5160f2b8ce656ace279ad80352a122fd517efa699", + "matched_output_lines": 607338 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "a675c1a446e77894680508b5160f2b8ce656ace279ad80352a122fd517efa699", + "matched_output_lines": 607338 + } + ], + "scope": "Actual EntityFluidInteraction update, tracker pruning, body/eye depth, loaded-chunk preflight, overlapping/reloaded tags, ordered current accumulation and native Entity.addDeltaMovement. Controlled fluid height/flow and camera-support cells, real ProtoChunk section fluid flags, player versus nonplayer classes, callback mutations and injected failures. Live fluid flow/propagation and full entity/world integration remain pending." +} diff --git a/benchmarks/rust-entity-fluid-tick-2026-10-07/immersion-regression.json b/benchmarks/rust-entity-fluid-tick-2026-10-07/immersion-regression.json new file mode 100644 index 000000000..b7cdd18e5 --- /dev/null +++ b/benchmarks/rust-entity-fluid-tick-2026-10-07/immersion-regression.json @@ -0,0 +1,236 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 7646, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityFluidOracle.java": "fc40082864b90f4a7f71fcfcdc400b56e91ab53623876e31736d412d7154b9c5", + "tools/test_entity_fluid_parity.py": "34d563a48f30434258cc8f836457f396ee4f1b2973a80b112bda22be1dc90bb8", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "fd004f993c35707caf1e0f7cdba87f7b615a7c16d2e0bf4b59f952d07488caa7", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "2d88983b56513e9b70bc79ef0b9743f5d2250c6e1dd954cc6fb7ea89c601e023", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/entity_fluid_fixture.rs": "8c7f32671e4eee572d42ad19e29323b7b70670ec8902a0424631857653281bad" + }, + "fixtures_sha256": { + ".local/rust-entity-fluid-parity/inputs.txt": "e9eb2297d21b93c9c25046f240984508fa3593d14833e4f5592a623b8ed85838" + }, + "rust_output_sha256": "a675c1a446e77894680508b5160f2b8ce656ace279ad80352a122fd517efa699", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a675c1a446e77894680508b5160f2b8ce656ace279ad80352a122fd517efa699", + "matched_output_lines": 607338 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "a675c1a446e77894680508b5160f2b8ce656ace279ad80352a122fd517efa699", + "matched_output_lines": 607338 + } + ], + "scope": "Actual EntityFluidInteraction update, tracker pruning, body/eye depth, loaded-chunk preflight, overlapping/reloaded tags, ordered current accumulation and native Entity.addDeltaMovement. Controlled fluid height/flow and camera-support cells, real ProtoChunk section fluid flags, player versus nonplayer classes, callback mutations and injected failures. Live fluid flow/propagation and full entity/world integration remain pending." +} diff --git a/benchmarks/rust-entity-fluid-tick-2026-10-07/scoped-parity.json b/benchmarks/rust-entity-fluid-tick-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..749f5f581 --- /dev/null +++ b/benchmarks/rust-entity-fluid-tick-2026-10-07/scoped-parity.json @@ -0,0 +1,237 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 17346, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityFluidOracle.java": "fc40082864b90f4a7f71fcfcdc400b56e91ab53623876e31736d412d7154b9c5", + "tools/test_entity_fluid_tick_parity.py": "1417d2fabe648d97ae79f0682d2be26701039fcdc888e36a3c31af139643c142", + "tools/test_entity_fluid_parity.py": "34d563a48f30434258cc8f836457f396ee4f1b2973a80b112bda22be1dc90bb8", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "fd004f993c35707caf1e0f7cdba87f7b615a7c16d2e0bf4b59f952d07488caa7", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "2d88983b56513e9b70bc79ef0b9743f5d2250c6e1dd954cc6fb7ea89c601e023", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/entity_fluid_fixture.rs": "8c7f32671e4eee572d42ad19e29323b7b70670ec8902a0424631857653281bad" + }, + "fixtures_sha256": { + ".local/rust-entity-fluid-tick-parity/inputs.txt": "0d587117237b039d0606d563a75ee23be3099612345dc893b398275d911c0349" + }, + "rust_output_sha256": "f38ab02725a0187c58fceeddb51751b0c2a91f678def80e8b4384aabe91e1ee9", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "f38ab02725a0187c58fceeddb51751b0c2a91f678def80e8b4384aabe91e1ee9", + "matched_output_lines": 953830 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "f38ab02725a0187c58fceeddb51751b0c2a91f678def80e8b4384aabe91e1ee9", + "matched_output_lines": 953830 + } + ], + "scope": "Actual Entity.updateFluidInteraction composing EntityFluidInteraction update and current application. Compares both push predicate calls, water-entry fall reset and splash dispatch, retained touching-water state, first tick, water/lava current coefficients and FAST_LAVA dimension attribute selection. Includes ordered/reloaded tags, controlled cell heights/flows, player/nonplayer classes, mutations and failures before/after partial writes. Splash audio/particles and full live world/entity gameplay binding remain pending." +} diff --git a/benchmarks/rust-entity-move-2026-10-07/scoped-parity.json b/benchmarks/rust-entity-move-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..fcef52f24 --- /dev/null +++ b/benchmarks/rust-entity-move-2026-10-07/scoped-parity.json @@ -0,0 +1,220 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 21656, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityMoveOracle.java": "8e7abd89ab8fe5c64d5608f1e9218127c546a1cfcbe08d784492c9b021cd8e70", + "tools/test_entity_move_parity.py": "3fc4497b90559a59ec8d74f0ebb413585499516dd698d534c2e7db0ad6109cb8", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "c27984bbc003c31f60ff60f7bf01d928f3eaf8ba977c3bf0b3102b2cb0faeced", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/entity_move_fixture.rs": "dc26dffa594a9c6d7fcc39ae03b254a2a45398db513b34f6b30867818539ff53" + }, + "fixtures_sha256": { + ".local/rust-entity-move-parity/inputs.txt": "b7dd8870db34cf8a5c178ee0fa709e8a6eff7196b25cc95f931072283bdc69a7" + }, + "rust_output_sha256": "23db36cb04444bef7e7bcab15c976a698b247a6de7a0192acf43a592b095b70c", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "23db36cb04444bef7e7bcab15c976a698b247a6de7a0192acf43a592b095b70c", + "matched_output_lines": 543653 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "23db36cb04444bef7e7bcab15c976a698b247a6de7a0192acf43a592b095b70c", + "matched_output_lines": 543653 + } + ], + "scope": "Actual Entity.move with native shape collision resolution (zero step height), native zero-restitution handling and final authority checks. Compares no-physics and piston early exits including signed zero, stuck multiplier reset, edge callback, fall-reset clip endpoints, movement recording cap, collision flag writes, ground/fall callback ordering, removal, passenger emission guard, speed multiplication and failures after partial state changes. Providers control piston/edge decisions, ground support, ray hits, landing effects and sound policy; live world integration and non-passenger movement emission remain separate work." +} diff --git a/benchmarks/rust-entity-obstruction-2026-10-06/scoped-parity.json b/benchmarks/rust-entity-obstruction-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..64dcf886b --- /dev/null +++ b/benchmarks/rust-entity-obstruction-2026-10-06/scoped-parity.json @@ -0,0 +1,164 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 5254, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityObstructionOracle.java": "90fbb4438ac9dbfb0705138ece57bc418ca97e73bddb2fbdfc10609b2aefc42f", + "tools/test_entity_obstruction_parity.py": "769d478003e91902e103503a128f88e7be595462213b78dd1c1ef8b76d96a105", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "8a2834a9347ee2c2db7cf1c86a064907ec06e9ac16ba9cc3936e315fc4ad49ca", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "2cfc358d87afa4b6e45247ef799114d33c2e0930f7aa7b2106cd4756ca007f5e", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "d8b2d3f19f49a0a60c913596f5a8f5fcb5be2e8633c9910e4e583e5d85916bde", + "crates/horizon-world/src/worldgen/block_predicate.rs": "4f8e0782db36423b4968dfc35633ff5ae4394b3eb6b97fd94c18b8df92a61929", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "fe61a5e43179a7588737a71782ea246811fe2c8721e74793e1ac018c8eb93c34", + "crates/horizon-world/src/worldgen/feature_region.rs": "2c78e5f1bdb08307f8d982f231f1abbc3306cd54348d9023b86ee6ed3516fd33", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "2f9849fcd492d0b987a15857607004a95380deff4217c48cbbf02a27339b3aa3", + "crates/horizon-world/src/worldgen/placement/context.rs": "bc0ad613ba599b825bdc3e746b6618e5d427d01e0729287269d452e4c7018143", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "fa0616353f07460975ab323357ab280b7f35e7bfe2de6edc08d304316766ed26", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "64a9ecb17f3567d5928de9959702a8f45e75b36a3227342ef392a8f840d18d18", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "821981c893fc84312351503f2be0c06c681d8bc768dade14576697cf047a9f8f", + "crates/horizon-world/examples/entity_obstruction_fixture.rs": "1fdb7c690d59fbc8431bb846121f2935c79b69eafc2afbe4250668c0a984302f" + }, + "fixtures_sha256": { + ".local/rust-entity-obstruction-parity/inputs.txt": "dc4094ffbb54a57a36df53927c6b07fbd46338b11c5ce356b4a10544d848afeb" + }, + "rust_output_sha256": "e7f66070f9980b005a79012c408cd32ba0df4bcdee8b7409e4225e48de2f6eb1", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "e7f66070f9980b005a79012c408cd32ba0df4bcdee8b7409e4225e48de2f6eb1", + "matched_output_lines": 15121 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e7f66070f9980b005a79012c408cd32ba0df4bcdee8b7409e4225e48de2f6eb1", + "matched_output_lines": 15121 + } + ], + "scope": "Actual EntityGetter.isUnobstructed, its default non-spectator query, Entity removal/root-vehicle methods and voxel intersection execute over privately allocated entity snapshots. Empty shapes, excluded identities, spectators, removed/non-building entities, same-root vehicle exclusions, ordered broad-phase queries and selected candidates, thin boxes, boundary contacts, composite shapes and query failures are compared. Entity construction, lifecycle, spatial indexing, vehicle maintenance and full gameplay remain pending." +} diff --git a/benchmarks/rust-extra-items-2026-10-07/scoped-parity.json b/benchmarks/rust-extra-items-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..5955ee6ae --- /dev/null +++ b/benchmarks/rust-extra-items-2026-10-07/scoped-parity.json @@ -0,0 +1,287 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 6708, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaExtraItemsOracle.java": "aa0c08b1f0228255ef93f9162bb18cc8f42c76f42b2dc9a59aef712b738df77f", + "tools/test_extra_items_parity.py": "e955aabafd54130ff0bcd8633fc507e3e1fa9dc40416f53d097fc9392ecc3a90", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "a3ad79b1a4ea171726f07b1fc6e2b78f224157e8f0d53dd2ce96e93ccd2d38dd", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "6bd97d87f0e3eaad440162145a1515b9a0b7cfb85cb0ea337874ed9745f8dd45", + "crates/horizon-world/src/lib.rs": "f00ba292455970b272680f073a878e29e1cbe1996ad0dcef17596b3ee99f5e5d", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/extra_items_fixture.rs": "84c269be3c83bc93e72f9c3c9da01474e80d20a8f383ebf426111630701d6fd7" + }, + "fixtures_sha256": { + ".local/rust-extra-items-parity/inputs.txt": "29dc3f0f6006102f75008b1c73b62d5dffd8c07e40608580619438f215d3fa72" + }, + "rust_output_sha256": "16470d61d827eda49a1d589908582e8431ed026f89faa4b57eeac9766c211c13", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "16470d61d827eda49a1d589908582e8431ed026f89faa4b57eeac9766c211c13", + "matched_output_lines": 272124 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "16470d61d827eda49a1d589908582e8431ed026f89faa4b57eeac9766c211c13", + "matched_output_lines": 272124 + } + ], + "scope": "Actual ItemStack.finishUsingItem with validated remainders and cooldowns now invokes inherited ServerPlayer.handleExtraItemsCreatedOnUse and real Inventory/PlayerEquipment insertion. Shared item/component references, occupied/aliased slots, offhand merging, creative material queries, partial insertion and the drop fallback are compared through mutation/failure prefixes. The drop call verifies throwRandomly=false and predicted semantics; its entity-spawn body is controlled. Rust composes item-after-use and inventory pickup. Item handlers, full contained schemas, dropped-entity creation, complete use lifecycle and full gameplay remain pending." +} diff --git a/benchmarks/rust-face-support-2026-10-06/scoped-parity.json b/benchmarks/rust-face-support-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..5fc447943 --- /dev/null +++ b/benchmarks/rust-face-support-2026-10-06/scoped-parity.json @@ -0,0 +1,167 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 1615, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_face_support_parity.py": "a8d09fd0f2e7d9e5bf651dd86e4fe08ff025c596e0c5e15bea42ec8aadcf1fd9", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_properties.rs": "e74b368012d4d440dcdbd4d9bcaf80495220b90557f0e0c733b0aa21ad03c53c", + "crates/horizon-world/src/block_support.rs": "1c8676c3e85743bc8f64ba30bea52842703e4acce312da8389a5761d0cd112e3", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "8a2834a9347ee2c2db7cf1c86a064907ec06e9ac16ba9cc3936e315fc4ad49ca", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "9f1c2f81745412ccdac0ddf7b5edd33077059e14d498ff8e6b6b385b0a8c9f6a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "7c8f628601a6d835d913c034b0d421a8f83bee6c569033448aac99123ed84a2c", + "crates/horizon-world/src/worldgen/block_predicate.rs": "b5c02b44e759a121d8b4a977e2c52874ab2eaf3aa787a15bae7f5c7eaa2ce503", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "fe61a5e43179a7588737a71782ea246811fe2c8721e74793e1ac018c8eb93c34", + "crates/horizon-world/src/worldgen/feature_region.rs": "2c78e5f1bdb08307f8d982f231f1abbc3306cd54348d9023b86ee6ed3516fd33", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "2f9849fcd492d0b987a15857607004a95380deff4217c48cbbf02a27339b3aa3", + "crates/horizon-world/src/worldgen/placement/context.rs": "bc0ad613ba599b825bdc3e746b6618e5d427d01e0729287269d452e4c7018143", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "fa0616353f07460975ab323357ab280b7f35e7bfe2de6edc08d304316766ed26", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "647f253a7d14d724086b4d146f26295e0da825df86f4adbd6a0e367d5198f3d5", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "821981c893fc84312351503f2be0c06c681d8bc768dade14576697cf047a9f8f", + "crates/horizon-world/examples/face_support_fixture.rs": "25c2a1505ff3ff323228390d0b059985927bed82173a3ff1a9985ad382e7a563" + }, + "fixtures_sha256": { + ".local/rust-face-support-parity/inputs.txt": "317b3e7d2b9df64adb1ec4e034f7c6951eb6363b627e890794589220a17021d1" + }, + "rust_output_sha256": "7d4af4acb31cf95e8f512fda8a623d047fa4651b3845354cac36f6d7cd2c3a4a", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "7d4af4acb31cf95e8f512fda8a623d047fa4651b3845354cac36f6d7cd2c3a4a", + "matched_output_lines": 595686 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "7d4af4acb31cf95e8f512fda8a623d047fa4651b3845354cac36f6d7cd2c3a4a", + "matched_output_lines": 595686 + } + ], + "scope": "Actual VoxelShape.getFaceShape and nested face slicing, shape identity/cache reuse, exact coordinate metadata, extrema, bounds and decomposition, plus FULL/CENTER/RIGID SupportType algorithms over caller-supplied support shapes. Sparse grids, phantom slice bounds, cube/array lookup, epsilon boundaries and translations are included. Per-block support-shape selection, world/entity context, survival and full gameplay remain pending." +} diff --git a/benchmarks/rust-face-visibility-2026-10-06/scoped-parity.json b/benchmarks/rust-face-visibility-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..bedf33f29 --- /dev/null +++ b/benchmarks/rust-face-visibility-2026-10-06/scoped-parity.json @@ -0,0 +1,217 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "registry_states": 35723, + "block_definitions": 1286, + "behavior_kinds": [ + "bars", + "leaves", + "liquid", + "mangrove_roots", + "never", + "same_block" + ], + "pairs": 1441816, + "direction_and_leaf_setting_cases": 17301792, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceVisibilityOracle.java": "00f5337317bba7a491bb62bbf07b32637657055c6f3076066bb01edf134169a1", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_face_visibility_parity.py": "3f9bc4ebd8af5e5c600a0bd507210aa757c1e5faca8536f43fffead45fc1e02d", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/examples/face_visibility_fixture.rs": "e3e58c9d092fcf11c1e50d971e20f8be3bd3d9d462d48e26f9a550fdb2937218", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "9f254668a237fc2d28a599b0ee6f1eac57cdafa2fd1af67e6a2303ee98fdd5ed", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "fixtures_sha256": { + ".local/rust-face-visibility-parity/pairs.txt": "555ad20f071cfbe3cdcb9533a6ffedd3e44ede8f29e91f6566e8f7256b1ea01c", + ".local/rust-face-visibility-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-face-visibility-parity/occlusion.nbt": "a3ae54c4316613140fb93fabec61e32a11d46185da7abc4e6f453bb900f260a8", + ".local/rust-face-visibility-parity/definitions.json": "7084a7304cb44fdfeea3eb9f8a228d5a4af8a4029ad58f0831a044720eea27f7", + ".local/rust-face-visibility-parity/tags.json": "5e1301e5a9abf7e4de93af5dae3a157e852dbdb4ea345c2eb626305a605d4f98" + }, + "rust_output_sha256": "e537bccb19f4e91569e5389c9578ced9f41fe3f258b8e1881a38f9f69a04e2a6", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "e537bccb19f4e91569e5389c9578ced9f41fe3f258b8e1881a38f9f69a04e2a6", + "matched_output_lines": 2883632 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e537bccb19f4e91569e5389c9578ced9f41fe3f258b8e1881a38f9f69a04e2a6", + "matched_output_lines": 2883632 + } + ], + "scope": "Actual BlockState.skipRendering and Block.shouldRenderFace for all registered states against representative and seeded random neighbors, exhaustive same-block pairs for override families and every cross-material bars/panes connection state pair. All six directions and both cutout-leaf settings; pinned block tags bound on both Java sides. Rust imports raw occlusion grids, class-rule assignments, definition canOcclude flags and tag membership, then computes face geometry, canonical shortcuts, skip rules and ONLY_FIRST subtraction. Includes waterlogged fluid neighbors, glass identity, vertical roots, bars tag/property checks and partial occlusion. Does not establish chunk mesh integration, lighting, translucent sorting, fluid surfaces, GPU pixels or gameplay parity." +} diff --git a/benchmarks/rust-fall-damage-2026-10-07/scoped-parity.json b/benchmarks/rust-fall-damage-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..5252c4586 --- /dev/null +++ b/benchmarks/rust-fall-damage-2026-10-07/scoped-parity.json @@ -0,0 +1,215 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 7248, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFallDamageOracle.java": "b6e64a1f319cbddbc2037a9cdd966b996fc806ba22e2240ab5c50482d2da7321", + "tools/test_fall_damage_parity.py": "b390a613e0e930ec8d26439833b81fa0f4a7d4a009845ec020d4114f595b2f7d", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "10b940e19011465eb9beb1cf87248b3c2bc6842c326974f365be753d0ba97822", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_properties.rs": "9c78bed0d30c8b9cfaa413b9b81b0bf94861605c13b26754e09b24e83d75a227", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/fall_damage_fixture.rs": "98a4dcdf23b2666bf46bac38513c84a83fdc4de1c014b01b59f678fe3f82a560" + }, + "fixtures_sha256": { + ".local/rust-fall-damage-parity/inputs.txt": "4981d3a5a00c29308102c51f8dd093a9f37900501ff13fe4c61abfad1374ad2b" + }, + "rust_output_sha256": "3d272db7c9407a6984e855b9126bf877188624edeb00f123b9ba145707db89de", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "3d272db7c9407a6984e855b9126bf877188624edeb00f123b9ba145707db89de", + "matched_output_lines": 44566 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "3d272db7c9407a6984e855b9126bf877188624edeb00f123b9ba145707db89de", + "matched_output_lines": 44566 + } + ], + "scope": "Actual base Entity.checkFallDamage with controlled water state, block landing callback, supporting-block lookup, HIT_GROUND emission and reset. Compares float-narrowed downward displacement accumulation, grounded branches, state/position/support mutations during landing, callback order, nonfinite arithmetic and partial state after failures. LivingEntity fluid updates/particles, registered Block.fallOn behavior, health/damage/attributes and the full movement lifecycle are not established by this scoped check." +} diff --git a/benchmarks/rust-feature-catalog-2026-10-06/scoped-parity.json b/benchmarks/rust-feature-catalog-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..e4c6b60df --- /dev/null +++ b/benchmarks/rust-feature-catalog-2026-10-06/scoped-parity.json @@ -0,0 +1,193 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 7488, + "worldgen_random_modes": [ + false, + true + ], + "basic_features": 3, + "composition_features": 7, + "definitions": 104, + "block_states": 35723, + "configured_block_features": 3, + "named_features": 10, + "named_placed_features": 15, + "tag_files": 5, + "requested_placements": 14976, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureCatalogOracle.java": "28adc261de263896b32dc7e196bc0091060677b73823d2babbe829a35f1f9f0d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "tools/test_feature_catalog_parity.py": "9d4ecda27019112fc93b6ede9063e84fc8b916cfd196f60d32f0732adf5a5469", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b3caf26bd3afc9d10cdcca3f7e794c30abf5ba09afa1fe80ba8f44713acdb274", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "8a2834a9347ee2c2db7cf1c86a064907ec06e9ac16ba9cc3936e315fc4ad49ca", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "2ea6d26fe88c633ad3efe7bdb6fc49f54961cbdf93b82919d79cf7d37a5c3c7d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "adca25c42008302f8e10571b448535ff5cf85984d3a37c5b5b3418eb276f0e47", + "crates/horizon-world/src/worldgen/feature_region.rs": "2c78e5f1bdb08307f8d982f231f1abbc3306cd54348d9023b86ee6ed3516fd33", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "2fc100f8861fe0e0519a53dc4ae4a1eaa8a96aff2f6bf546ce613bdf665df237", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "2757f22706803afb3624afd65f4f5d05540acbc2bcb01f61e95fa40535575f0f", + "crates/horizon-world/examples/feature_catalog_fixture.rs": "fe03581cad3593d7fae403251ec2a1cde0fc87f958cd42a70ec5f3d0c6840715" + }, + "fixtures_sha256": { + ".local/rust-feature-catalog-parity/inputs.txt": "c91a004484a7ef75f84cf2376c0cfc90b50f5da49ead21c7dbc3948959af15f5", + ".local/rust-feature-catalog-parity/catalog.json": "bea3cd754cda700a74bdd9aef28ef06228bf969e72409a340ab243032fc659db", + ".local/rust-feature-catalog-parity/facts-client.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-feature-catalog-parity/facts-server.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b" + }, + "rust_output_sha256": "040fcab500bb381ef92810e7b5c3cc0772f9a959c17f048c2bb0d2f5cf5de267", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "040fcab500bb381ef92810e7b5c3cc0772f9a959c17f048c2bb0d2f5cf5de267", + "matched_output_lines": 2528704 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "040fcab500bb381ef92810e7b5c3cc0772f9a959c17f048c2bb0d2f5cf5de267", + "matched_output_lines": 2528704 + } + ], + "scope": "Actual Feature.CODEC and PlacedFeature.CODEC bind named and inline holders through RegistryOps and registered feature/placed-feature snapshots. Native TagLoader resolves ordered nested, duplicate, empty, optional-missing and required-missing placed-feature tags. Overlay accumulated success and non-short-circuit execution, including empty named tags, are compared. Root holders, named children, tag lists, mixed inline/named lists, namespace shorthand, unknown names and unselected malformed children are compared. Registry-bound fill-layer, single-block replacement and scattered-ore states execute through named roots, nested tags and composed placement. Registry-bound matching-block/fluid predicates also execute through filters, ordered volumes, environment scans and composed named features against the mutable world, including a flowing-water fill followed by repeated fluid-filtered replacement. Actual feature algorithms, nested placement, ordered world mutations, rejected writes, partial failures and direct and WorldgenRandom-wrapped legacy/xoroshiro streams execute through the same mutable world transport. Rust expands requested immutable resource roots with bounded dependency/node traversal; unused resources, cyclic references, registry reload/lifecycle, encoding, all feature algorithms and complete world generation remain outside this comparison." +} diff --git a/benchmarks/rust-feature-graph-2026-10-06/scoped-parity.json b/benchmarks/rust-feature-graph-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..4f6ee1181 --- /dev/null +++ b/benchmarks/rust-feature-graph-2026-10-06/scoped-parity.json @@ -0,0 +1,184 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 4736, + "basic_features": 3, + "composition_features": 7, + "definitions": 128, + "block_states": 5, + "composed_fixtures": 128, + "requested_placements": 9472, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureGraphOracle.java": "27d25432c07f6d9af7b3d5de5f7ea231ae59b9e3439fa83195e9fa05f95ce8ea", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "tools/test_feature_graph_parity.py": "52b49066b02c915fe1bbc36c2a587a916086de2c9b072be407fe06ca78aec92b", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b3caf26bd3afc9d10cdcca3f7e794c30abf5ba09afa1fe80ba8f44713acdb274", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "8a2834a9347ee2c2db7cf1c86a064907ec06e9ac16ba9cc3936e315fc4ad49ca", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "2ea6d26fe88c633ad3efe7bdb6fc49f54961cbdf93b82919d79cf7d37a5c3c7d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "adca25c42008302f8e10571b448535ff5cf85984d3a37c5b5b3418eb276f0e47", + "crates/horizon-world/src/worldgen/feature_region.rs": "2c78e5f1bdb08307f8d982f231f1abbc3306cd54348d9023b86ee6ed3516fd33", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "2fc100f8861fe0e0519a53dc4ae4a1eaa8a96aff2f6bf546ce613bdf665df237", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "2757f22706803afb3624afd65f4f5d05540acbc2bcb01f61e95fa40535575f0f", + "crates/horizon-world/examples/feature_graph_fixture.rs": "5999d3902d8980dd46cfe172ab026adba012e33237b0184f7995318c60c6c499" + }, + "fixtures_sha256": { + ".local/rust-feature-graph-parity/inputs.txt": "4ef4923e50f3d390711da45372a4b142d8f6ea4fdd958acdc892966a5508f419", + ".local/rust-feature-graph-parity/facts-client.json": "6c8d9aeb824f4150293f5d6a580d3347d866589b3eeee185a2c18479f5c64b0a", + ".local/rust-feature-graph-parity/facts-server.json": "6c8d9aeb824f4150293f5d6a580d3347d866589b3eeee185a2c18479f5c64b0a" + }, + "rust_output_sha256": "9fd2ace9bcbd1c0e0c4503d0ad12b6902f730790838125464f16e280ee00e08a", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "9fd2ace9bcbd1c0e0c4503d0ad12b6902f730790838125464f16e280ee00e08a", + "matched_output_lines": 1146057 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "9fd2ace9bcbd1c0e0c4503d0ad12b6902f730790838125464f16e280ee00e08a", + "matched_output_lines": 1146057 + } + ], + "scope": "Actual Feature.DIRECT_CODEC and native no-op, sequence, overlay, random-boolean-selector, simple-random-selector and chance-based random-selector and weighted-random-selector features compose three native block-writing features through inline PlacedFeature holders and actual nested FeaturePlacer calls. Ordered writes, reads, flags, accumulated states, boolean results, rejected writes, partial failures, shared randomness and top-level modifier chains are compared. Overlay exhaustive ordered execution with accumulated success, sequence short-circuiting, selector return propagation and empty/all-zero weighted choices without random draws are included. Named registry holders/tags, encoders, full feature registries and complete generated worlds remain pending. Rust bounds decode depth/nodes/lists, nested execution depth and feature/placed-feature visits; nested modifier-chain execution shares the feature work budget." +} diff --git a/benchmarks/rust-feature-placement-2026-10-06/scoped-parity.json b/benchmarks/rust-feature-placement-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..b0c66f7ae --- /dev/null +++ b/benchmarks/rust-feature-placement-2026-10-06/scoped-parity.json @@ -0,0 +1,160 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 5544, + "modifier_chains": 80, + "requested_placements": 22176, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeaturePlacementOracle.java": "537f5926111131960e2fdf3e5a0c2f21b46fda629286831f9d9528fe1390afe0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "tools/test_feature_placement_parity.py": "6b158d8f63296660ecb362310ffd9f1cdadebfe213352bc9acb147ff5c129345", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "c215156f2ecf7faf214b3d89e0829b65d54f4ff6d134d778ec941f18a606a327", + "crates/horizon-world/src/worldgen/block_predicate.rs": "dd8cbda2ec110444950f0b31bf4e088897eab0994674a91568c7b063f8f16210", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "2297b194514925688dba25016a69d5ba5eb8b869bdfff28f2e611a6742ac5954", + "crates/horizon-world/src/worldgen/feature_region.rs": "4a95a30c0987d97e671f84380e13ddea070ad81f996baa65b2a06c4d892971c7", + "crates/horizon-world/src/worldgen/feature_sort.rs": "0b9d1e1c15d8449125d39e400776b8f28eec7b7cbd047660a94f8cb90160adfe", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9bce6b17b60fec575d810713d9fb2714780aadbbc973db969c07cf4455201847", + "crates/horizon-world/src/worldgen/placement/context.rs": "f8fa467d3b931d0f98d3572fbc80c659d452a7fc5755d5c98123dc477c2b541c", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "c39c0b5f761fd573ff2f2a1d9d42901305995cc88f5c4ca3a49aaa4ef5dd933b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "55c4317bd9c782378de7c2a7d58be5aa08febc5b8f2f4b86379a39e0ba500b3c", + "crates/horizon-world/examples/feature_placement_fixture.rs": "0c46c49a53cb962ef86c2af81842a969e9fbc5266f84f7710870af0b781d48e2", + "crates/horizon-world/examples/support/placement_queries.rs": "623b98c33245cb584d666a06bd5a3ddf7f19bf77e0ea9dc67be9a242086c063c" + }, + "fixtures_sha256": { + ".local/rust-feature-placement-parity/inputs.txt": "193b18bbac342a2dbcd70a3bc1c88a694ac042ae30fd76f8015d87a6d57d7f34" + }, + "rust_output_sha256": "52ccd98ab6617d3b21694d1033851a1782d2eee5595f027113bd6d635b0e9190", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "52ccd98ab6617d3b21694d1033851a1782d2eee5595f027113bd6d635b0e9190", + "matched_output_lines": 548461 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "52ccd98ab6617d3b21694d1033851a1782d2eee5595f027113bd6d635b0e9190", + "matched_output_lines": 548461 + } + ], + "scope": "Actual native FeaturePlacer executing decoded placement-modifier chains with a synthetic Feature sink. Empty chains, repeated modifiers, nested random choices, count expansion, filtering, fixed positions, offsets, anchored heights heightmap filters and layered scans are compared. Sink callbacks emit positions, optionally consume the shared random stream, return true/false/mixed results or fail after partial placement. The same native placer is reused across calls, including after errors, exposing retained pending and modified-position buffers. Both random modes, repeated calls, ordinary and overflowing generation contexts and subsequent nextLong values are compared. Predicate filtering and vertical environment scans compare bounds-query order, short-circuiting and failures. Traced heightmap queries include synthetic extreme heights, distinct world/generation minima and injected failures. Configured feature algorithms, block queries, biome checks, registry lifecycle, nested feature placement, Gaussian providers, encoding and complete world generation remain pending. Rust bounds chain length to 1024 and pending/output work to 2^20." +} diff --git a/benchmarks/rust-feature-region-2026-10-06/scoped-parity.json b/benchmarks/rust-feature-region-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..dbb26ff03 --- /dev/null +++ b/benchmarks/rust-feature-region-2026-10-06/scoped-parity.json @@ -0,0 +1,169 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "block_tag_files": 300, + "fixtures": 192, + "worldgen_random_modes": [ + false, + true + ], + "resident_chunks_per_fixture": 9, + "requested_placements": 2304, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureRegionOracle.java": "5a4cabc6e5c79a0af42b4b840d4fb48e206d146c336af89b919fd47e922bda20", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "tools/test_feature_region_parity.py": "fceba45d5aa9bb2c137350f1df70f4ba64ea65c4179a50920e713a2669bf4e28", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "c215156f2ecf7faf214b3d89e0829b65d54f4ff6d134d778ec941f18a606a327", + "crates/horizon-world/src/worldgen/block_predicate.rs": "dd8cbda2ec110444950f0b31bf4e088897eab0994674a91568c7b063f8f16210", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "2297b194514925688dba25016a69d5ba5eb8b869bdfff28f2e611a6742ac5954", + "crates/horizon-world/src/worldgen/feature_region.rs": "4a95a30c0987d97e671f84380e13ddea070ad81f996baa65b2a06c4d892971c7", + "crates/horizon-world/src/worldgen/feature_sort.rs": "0b9d1e1c15d8449125d39e400776b8f28eec7b7cbd047660a94f8cb90160adfe", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "1b976aa4dd2516468196d0af3451e3fdd037493a14d269f54ebdd7254055e05e", + "crates/horizon-world/src/worldgen/placement/context.rs": "b36dfd9297896e62770f2085cf934fc08ebd4c030ecc7ae17d864e819a113201", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "68ecf36954fea5705436d486e9be93836933fd56779022afeb881a0399d6a674", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "55c4317bd9c782378de7c2a7d58be5aa08febc5b8f2f4b86379a39e0ba500b3c", + "crates/horizon-world/examples/feature_region_fixture.rs": "7f915c3795e16bc8e2b156c6b3a5d4f2b24f786fdd2ee64eb5159adef7170255" + }, + "fixtures_sha256": { + ".local/rust-feature-region-parity/inputs.txt": "c6ac6ff43c8da61a74dec0e7e72b80da5d2abed0c5a2277f921247cf8dcb04db", + ".local/rust-feature-region-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-feature-region-parity/facts-client.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0", + ".local/rust-feature-region-parity/facts-server.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0" + }, + "rust_output_sha256": "93b8b0b9900d2cab972f4d50d4ba9a580db725a20dbc2ebb7fee723af414fc31", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "93b8b0b9900d2cab972f4d50d4ba9a580db725a20dbc2ebb7fee723af414fc31", + "matched_output_lines": 28922634 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "93b8b0b9900d2cab972f4d50d4ba9a580db725a20dbc2ebb7fee723af414fc31", + "matched_output_lines": 28922634 + } + ], + "scope": "Native FeaturePlacer and three basic block-writing features, a composed sequence of four configured fill layers, single-block replacements and scattered ore share a world proxy backed by nine actual ProtoChunks. Configured water, horizontal logs, air, out-of-height fills and ore/replacement rules test graph-to-region binding. Initial two-layer stone/dirt terrain, both pre-light heightmap groups, count/square/heightmap/layered modifier chains, repeated placements, direct and WorldgenRandom-wrapped random streams, missing-neighbor errors, rejected writes and injected partial failures are compared. Final complete raw sections, heightmap presence and packed words are compared alongside ordered feature writes, update flags, explicit height queries and subsequent random draws. Rust uses resident registry-backed chunks, lazy heightmap priming and a caller-supplied write callback; imported air/fluid facts and bundled block tags bind independently across authenticated JARs. The proxy supplies storage mutation only. Actual WorldGenRegion construction, write-zone policy, POIs, block entities, postprocessing effects, lighting, complete feature registries and complete world generation remain outside this comparison." +} diff --git a/benchmarks/rust-feature-region-destroy-2026-10-06/scoped-parity.json b/benchmarks/rust-feature-region-destroy-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..bf0c8d12c --- /dev/null +++ b/benchmarks/rust-feature-region-destroy-2026-10-06/scoped-parity.json @@ -0,0 +1,210 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "direct_state_probes": 35723, + "block_tag_files": 300, + "fixtures": 192, + "worldgen_random_modes": [ + false, + true + ], + "resident_chunks_per_fixture": 9, + "requested_placements": 3456, + "direct_tick_requests": 14784, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureRegionOracle.java": "e808ce25113543b7f813ca69820dc6118e7d6726f08ff1fef6a70c11baf8a6f8", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "tools/test_feature_region_parity.py": "502a1496db34a159ac43dfddccdc86f2893aec4aed52e8e2d6a3bd4c544f98c6", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "2ec6aa6231597388a16ccde4812ef69fa26a149e46b976c21a12dcfd7e981a96", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "b8fb9fb80a66a851d916f07f15df1a40b6cc95b49e71aaec4d4b4107f13d9f9f", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "1dd9ccc9c555e29b52eb5eec591da98bbd9e68921196106d18793d993647592b", + "crates/horizon-world/examples/feature_region_fixture.rs": "b1272565bf7056b7976797e79167f1f4f43c8c7a03a594cc7b93936a4df804d8" + }, + "fixtures_sha256": { + ".local/rust-feature-region-parity/inputs.txt": "8660737853afa958450f3ec15679136379bd8f0b21b1198454982d6ea5424f7d", + ".local/rust-feature-region-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-feature-region-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-feature-region-parity/facts-client.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0", + ".local/rust-feature-region-parity/facts-server.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0" + }, + "rust_output_sha256": "b63e8f2fc86c4d3d8d9d9c1a900dcb164444d93fb4ff71bebd902f92c1eb8d3f", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "b63e8f2fc86c4d3d8d9d9c1a900dcb164444d93fb4ff71bebd902f92c1eb8d3f", + "matched_output_lines": 29502523 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "b63e8f2fc86c4d3d8d9d9c1a900dcb164444d93fb4ff71bebd902f92c1eb8d3f", + "matched_output_lines": 29502523 + } + ], + "scope": "Native FeaturePlacer and three basic block-writing features, a composed sequence of four configured fill layers, single-block replacements, scattered ore and water springs share a world proxy backed by nine actual ProtoChunks. Configured water, horizontal logs, air, out-of-height fills and ore/replacement rules test graph-to-region binding. Initial two-layer stone/dirt terrain, both pre-light heightmap groups, count/square/heightmap/layered modifier chains, repeated placements, direct and WorldgenRandom-wrapped random streams, missing-neighbor errors, rejected writes and injected partial failures are compared. Final complete raw sections, heightmap presence and packed words are compared alongside ordered feature writes, update flags, explicit height queries and subsequent random draws. Rust uses resident registry-backed chunks, lazy heightmap priming and a caller-supplied write callback; imported air/fluid facts and bundled block tags bind independently across authenticated JARs. The proxy supplies storage mutation and actual native default scheduleTick/createTick methods routed through WorldGenTickAccess into each ProtoChunk. Separate block/fluid queues, first-request deduplication, nondefault-state block identity, shared tick-order advancement on duplicates and missing-chunk errors, out-of-height requests and wrapped clock values are compared, including saved queue order and priorities. Active and inactive End podiums additionally exercise native WorldGenRegion.destroyBlock through a subclass transport overriding only block reads and writes; air short-circuit, rejected replacements and write failures retain the generation-time semantics. All block states are also written into resident chunks, queried through feature access, cleared and queried again; contained fluid identity/amount/falling/source/full flags, water-tag membership and every bundled block tag plus an absent tag are compared. Negative coordinates, chunk edges, outside-height and absent chunks are covered. Block/fluid query bindings are an immutable registry-checked shared snapshot. Actual WorldGenRegion construction, write-zone policy, POIs, block entities, postprocessing execution, lighting, block/fluid tick execution, complete feature registries and complete world generation remain outside this comparison." +} diff --git a/benchmarks/rust-feature-region-queries-2026-10-06/scoped-parity.json b/benchmarks/rust-feature-region-queries-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..0500ddb6b --- /dev/null +++ b/benchmarks/rust-feature-region-queries-2026-10-06/scoped-parity.json @@ -0,0 +1,206 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "direct_state_probes": 35723, + "block_tag_files": 300, + "fixtures": 192, + "worldgen_random_modes": [ + false, + true + ], + "resident_chunks_per_fixture": 9, + "requested_placements": 2688, + "direct_tick_requests": 14784, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureRegionOracle.java": "a18a9d6184528b40b5fa853fd30208a400d7b749b3138659fdf209c33649d247", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "tools/test_feature_region_parity.py": "9a1d8da1ceaa657d6d70a7697c2761a881b63e1ddf3ba6134d840ed3165d6ec6", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "98bc93dff1373e3b6f4dcf8c4c2b05b56814acd4f66302834aa5877fe90ec7b9", + "crates/horizon-world/src/worldgen/feature_region.rs": "ae7552027b2efc0db6299dc14ab04c28615e43b876b5d67644855fd7a047e33e", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "b7a59a712d2e376e8f32ec1e1fd901df452c8019e06910c39d469816be63a14f", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "b8fb9fb80a66a851d916f07f15df1a40b6cc95b49e71aaec4d4b4107f13d9f9f", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "072d31a3b814eda9cc9bdc1da06a7dab43c38f133824bfd00f55ebb8452d8b88", + "crates/horizon-world/examples/feature_region_fixture.rs": "d29cb51653d7b6f249c2748d4f9df2c4e2358acf4d8fc57a21c8d69cb17be19c" + }, + "fixtures_sha256": { + ".local/rust-feature-region-parity/inputs.txt": "14e3cc52de74d24351a010e4c7b7ad7aae961a358dff754a3161dd58d050acad", + ".local/rust-feature-region-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-feature-region-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-feature-region-parity/facts-client.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0", + ".local/rust-feature-region-parity/facts-server.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0" + }, + "rust_output_sha256": "33c6e7d07bd985f468d3fd7d8d8040001664316e6551fa753d00e1ec90c9ea90", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "33c6e7d07bd985f468d3fd7d8d8040001664316e6551fa753d00e1ec90c9ea90", + "matched_output_lines": 29312766 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "33c6e7d07bd985f468d3fd7d8d8040001664316e6551fa753d00e1ec90c9ea90", + "matched_output_lines": 29312766 + } + ], + "scope": "Native FeaturePlacer and three basic block-writing features, a composed sequence of four configured fill layers, single-block replacements, scattered ore and water springs share a world proxy backed by nine actual ProtoChunks. Configured water, horizontal logs, air, out-of-height fills and ore/replacement rules test graph-to-region binding. Initial two-layer stone/dirt terrain, both pre-light heightmap groups, count/square/heightmap/layered modifier chains, repeated placements, direct and WorldgenRandom-wrapped random streams, missing-neighbor errors, rejected writes and injected partial failures are compared. Final complete raw sections, heightmap presence and packed words are compared alongside ordered feature writes, update flags, explicit height queries and subsequent random draws. Rust uses resident registry-backed chunks, lazy heightmap priming and a caller-supplied write callback; imported air/fluid facts and bundled block tags bind independently across authenticated JARs. The proxy supplies storage mutation and actual native default scheduleTick/createTick methods routed through WorldGenTickAccess into each ProtoChunk. Separate block/fluid queues, first-request deduplication, nondefault-state block identity, shared tick-order advancement on duplicates and missing-chunk errors, out-of-height requests and wrapped clock values are compared, including saved queue order and priorities. All block states are also written into resident chunks, queried through feature access, cleared and queried again; contained fluid identity/amount/falling/source/full flags, water-tag membership and every bundled block tag plus an absent tag are compared. Negative coordinates, chunk edges, outside-height and absent chunks are covered. Block/fluid query bindings are an immutable registry-checked shared snapshot. Actual WorldGenRegion construction, write-zone policy, POIs, block entities, postprocessing execution, lighting, block/fluid tick execution, complete feature registries and complete world generation remain outside this comparison." +} diff --git a/benchmarks/rust-feature-region-ticks-2026-10-06/scoped-parity.json b/benchmarks/rust-feature-region-ticks-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..87ab83c24 --- /dev/null +++ b/benchmarks/rust-feature-region-ticks-2026-10-06/scoped-parity.json @@ -0,0 +1,204 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "block_tag_files": 300, + "fixtures": 192, + "worldgen_random_modes": [ + false, + true + ], + "resident_chunks_per_fixture": 9, + "requested_placements": 2688, + "direct_tick_requests": 14784, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureRegionOracle.java": "f1d53f2378d4db192ae2d3a0a21027da121dbc16567fe83dbd3e2219d76c81f6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "tools/test_feature_region_parity.py": "d4188a05763c7540a3d997e22c9ef7b87c2c5bc571dc4867a36758124cc59eb7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "5ce5c6eaa5f8a2557a620e533788217b1eb430654801dcf6135d6c92d7a012ac", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "98bc93dff1373e3b6f4dcf8c4c2b05b56814acd4f66302834aa5877fe90ec7b9", + "crates/horizon-world/src/worldgen/feature_region.rs": "39c29f24c3f08081533cb2ec4f5ef5a4cd891b112055234fe1ed8dafc2ea4cf7", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "b7a59a712d2e376e8f32ec1e1fd901df452c8019e06910c39d469816be63a14f", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "b8fb9fb80a66a851d916f07f15df1a40b6cc95b49e71aaec4d4b4107f13d9f9f", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "072d31a3b814eda9cc9bdc1da06a7dab43c38f133824bfd00f55ebb8452d8b88", + "crates/horizon-world/examples/feature_region_fixture.rs": "5650465d2c4274b68b09521725a237b8ecf54e853c9fb76c09364d81ced233d7" + }, + "fixtures_sha256": { + ".local/rust-feature-region-parity/inputs.txt": "b9291d2acd0a9734a6c6facf40602a6464e03643b485e5e3024fffdad32edc3a", + ".local/rust-feature-region-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-feature-region-parity/facts-client.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0", + ".local/rust-feature-region-parity/facts-server.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0" + }, + "rust_output_sha256": "7063716bad44d41187315daa2ce66abc7af187efe8c1b28eb13fbf58e3c5f1f4", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "7063716bad44d41187315daa2ce66abc7af187efe8c1b28eb13fbf58e3c5f1f4", + "matched_output_lines": 28985883 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "7063716bad44d41187315daa2ce66abc7af187efe8c1b28eb13fbf58e3c5f1f4", + "matched_output_lines": 28985883 + } + ], + "scope": "Native FeaturePlacer and three basic block-writing features, a composed sequence of four configured fill layers, single-block replacements, scattered ore and water springs share a world proxy backed by nine actual ProtoChunks. Configured water, horizontal logs, air, out-of-height fills and ore/replacement rules test graph-to-region binding. Initial two-layer stone/dirt terrain, both pre-light heightmap groups, count/square/heightmap/layered modifier chains, repeated placements, direct and WorldgenRandom-wrapped random streams, missing-neighbor errors, rejected writes and injected partial failures are compared. Final complete raw sections, heightmap presence and packed words are compared alongside ordered feature writes, update flags, explicit height queries and subsequent random draws. Rust uses resident registry-backed chunks, lazy heightmap priming and a caller-supplied write callback; imported air/fluid facts and bundled block tags bind independently across authenticated JARs. The proxy supplies storage mutation and actual native default scheduleTick/createTick methods routed through WorldGenTickAccess into each ProtoChunk. Separate block/fluid queues, first-request deduplication, nondefault-state block identity, shared tick-order advancement on duplicates and missing-chunk errors, out-of-height requests and wrapped clock values are compared, including saved queue order and priorities. Actual WorldGenRegion construction, write-zone policy, POIs, block entities, postprocessing execution, lighting, block/fluid tick execution, complete feature registries and complete world generation remain outside this comparison." +} diff --git a/benchmarks/rust-feature-region-upgrade-height-2026-10-06/scoped-parity.json b/benchmarks/rust-feature-region-upgrade-height-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..df95798df --- /dev/null +++ b/benchmarks/rust-feature-region-upgrade-height-2026-10-06/scoped-parity.json @@ -0,0 +1,216 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "direct_state_probes": 35723, + "write_zone_cases": 20125, + "upgrade_height_cases": 10098, + "block_tag_files": 300, + "fixtures": 192, + "worldgen_random_modes": [ + false, + true + ], + "resident_chunks_per_fixture": 9, + "requested_placements": 3456, + "direct_tick_requests": 14784, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureRegionOracle.java": "4ee4d485771cfaf8313aa57032ca38727d8e7c97a109a24319bfc4f63d599a23", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "tools/test_feature_region_parity.py": "16c308731788d69676669afc9289a235b44f3c5e1c62b04deba799c4a6d1f745", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "4e556a5896b893fbb73bf2e2b8e70601a8374f58b9f4f5f3730e99916a846e3a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "18d51343c00ad3a551d02f6ddfa37d1be23d481e1861ce6299d0a66991bc7074", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "b8fb9fb80a66a851d916f07f15df1a40b6cc95b49e71aaec4d4b4107f13d9f9f", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/feature_region_fixture.rs": "e45a2b5ddb147b8783fe3ba71ea533d50c86609b03e610ad25b4a215ca1ef371" + }, + "fixtures_sha256": { + ".local/rust-feature-region-parity/heights.json": "5a9a24cd8dcd081955f856df741a8e0eb34c84649d636947f474139d3ed30698", + ".local/rust-feature-region-parity/zones.json": "1864a9cdc17816c12fc5e92cd6abd32e45d67615075c52e928872e041d84244c", + ".local/rust-feature-region-parity/inputs.txt": "597236d7f85cfad764729c389bd71a1063d40587903ba3bd3ef86e4e3f9a481f", + ".local/rust-feature-region-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-feature-region-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-feature-region-parity/facts-client.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0", + ".local/rust-feature-region-parity/facts-server.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0" + }, + "rust_output_sha256": "91ae8c67dae0e0de2d6ada1c36f154a5df73feb07e4bc3af8a09d2062a04e859", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "91ae8c67dae0e0de2d6ada1c36f154a5df73feb07e4bc3af8a09d2062a04e859", + "matched_output_lines": 29247433 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "91ae8c67dae0e0de2d6ada1c36f154a5df73feb07e4bc3af8a09d2062a04e859", + "matched_output_lines": 29247433 + } + ], + "scope": "Native FeaturePlacer and three basic block-writing features, a composed sequence of four configured fill layers, single-block replacements, scattered ore and water springs share a world proxy backed by nine actual ProtoChunks. Configured water, horizontal logs, air, out-of-height fills and ore/replacement rules test graph-to-region binding. Initial two-layer stone/dirt terrain, both pre-light heightmap groups, count/square/heightmap/layered modifier chains, repeated placements, direct and WorldgenRandom-wrapped random streams, missing-neighbor errors, rejected writes and injected partial failures are compared. Final complete raw sections, heightmap presence and packed words are compared alongside ordered feature writes, update flags, explicit height queries and subsequent random draws. Rust uses resident registry-backed chunks, lazy heightmap priming and a caller-supplied write callback; imported air/fluid facts and bundled block tags bind independently across authenticated JARs. The proxy supplies storage mutation and actual native default scheduleTick/createTick methods routed through WorldGenTickAccess into each ProtoChunk. Separate block/fluid queues, first-request deduplication, nondefault-state block identity, shared tick-order advancement on duplicates and missing-chunk errors, out-of-height requests and wrapped clock values are compared, including saved queue order and priorities. Active and inactive End podiums additionally exercise native WorldGenRegion.destroyBlock through a subclass transport overriding only block reads and writes; air short-circuit, rejected replacements and write failures retain the generation-time semantics. All block states are also written into resident chunks, queried through feature access, cleared and queried again; contained fluid identity/amount/falling/source/full flags, water-tag membership and every bundled block tag plus an absent tag are compared. Negative coordinates, chunk edges, outside-height and absent chunks are covered. Block/fluid query bindings are an immutable registry-checked shared snapshot. The native horizontal write-zone predicate is compared separately across chunk/block coordinates, negative radii and wrapped subtraction/absolute-value extremes, and gates feature callbacks in selected fixtures. Actual WorldGenRegion.ensureCanWrite also checks the center proto-chunk before/after installing native below-zero retrogen data, with extreme and boundary heights; the generic height interval is independently compared against LevelHeightAccessor. Region feature callbacks and direct accepted/rejected write probes apply the upgrade height before mutation. Retrogen activation remains caller-owned. Actual WorldGenRegion construction, full retrogen replacement/masking and biome behavior, POIs, block entities, postprocessing execution, lighting, block/fluid tick execution, complete feature registries and complete world generation remain outside this comparison." +} diff --git a/benchmarks/rust-feature-region-write-zone-2026-10-06/scoped-parity.json b/benchmarks/rust-feature-region-write-zone-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..add2dbfed --- /dev/null +++ b/benchmarks/rust-feature-region-write-zone-2026-10-06/scoped-parity.json @@ -0,0 +1,213 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "direct_state_probes": 35723, + "write_zone_cases": 20125, + "block_tag_files": 300, + "fixtures": 192, + "worldgen_random_modes": [ + false, + true + ], + "resident_chunks_per_fixture": 9, + "requested_placements": 3456, + "direct_tick_requests": 14784, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureRegionOracle.java": "9892689b472e926c38f7ed4a613f761fe8117120f084c1d3195c45d8e223d3b4", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "tools/test_feature_region_parity.py": "36063564d3437a607af91ea74aa177a1f51318a4d08b32ef857a165c10d1e291", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "7677027594ed3df5e538402d5a3ba9276b67b56490463ca2686bfa418d02bd24", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "b8fb9fb80a66a851d916f07f15df1a40b6cc95b49e71aaec4d4b4107f13d9f9f", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "1d79a7fdb5dd18b0b59079cb2dc74682ba7af2a650c8efff027cfa530eee7bf9", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/feature_region_fixture.rs": "969ea5c21d7a2be24e0804185fa5557196c809dad961602f23cecdbfea635eba" + }, + "fixtures_sha256": { + ".local/rust-feature-region-parity/zones.json": "1864a9cdc17816c12fc5e92cd6abd32e45d67615075c52e928872e041d84244c", + ".local/rust-feature-region-parity/inputs.txt": "eb98b59c22ea7c90d657a91698b8f73dcbe4b510a72f3eefae3e982bb9c2086f", + ".local/rust-feature-region-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-feature-region-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-feature-region-parity/facts-client.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0", + ".local/rust-feature-region-parity/facts-server.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0" + }, + "rust_output_sha256": "522b3abf0ac74366c9739d0d0977707b61e25ac73a98a620d5e2fb71bd8e32b9", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "522b3abf0ac74366c9739d0d0977707b61e25ac73a98a620d5e2fb71bd8e32b9", + "matched_output_lines": 29231123 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "522b3abf0ac74366c9739d0d0977707b61e25ac73a98a620d5e2fb71bd8e32b9", + "matched_output_lines": 29231123 + } + ], + "scope": "Native FeaturePlacer and three basic block-writing features, a composed sequence of four configured fill layers, single-block replacements, scattered ore and water springs share a world proxy backed by nine actual ProtoChunks. Configured water, horizontal logs, air, out-of-height fills and ore/replacement rules test graph-to-region binding. Initial two-layer stone/dirt terrain, both pre-light heightmap groups, count/square/heightmap/layered modifier chains, repeated placements, direct and WorldgenRandom-wrapped random streams, missing-neighbor errors, rejected writes and injected partial failures are compared. Final complete raw sections, heightmap presence and packed words are compared alongside ordered feature writes, update flags, explicit height queries and subsequent random draws. Rust uses resident registry-backed chunks, lazy heightmap priming and a caller-supplied write callback; imported air/fluid facts and bundled block tags bind independently across authenticated JARs. The proxy supplies storage mutation and actual native default scheduleTick/createTick methods routed through WorldGenTickAccess into each ProtoChunk. Separate block/fluid queues, first-request deduplication, nondefault-state block identity, shared tick-order advancement on duplicates and missing-chunk errors, out-of-height requests and wrapped clock values are compared, including saved queue order and priorities. Active and inactive End podiums additionally exercise native WorldGenRegion.destroyBlock through a subclass transport overriding only block reads and writes; air short-circuit, rejected replacements and write failures retain the generation-time semantics. All block states are also written into resident chunks, queried through feature access, cleared and queried again; contained fluid identity/amount/falling/source/full flags, water-tag membership and every bundled block tag plus an absent tag are compared. Negative coordinates, chunk edges, outside-height and absent chunks are covered. Block/fluid query bindings are an immutable registry-checked shared snapshot. The native horizontal write-zone predicate is compared separately across chunk/block coordinates, negative radii and wrapped subtraction/absolute-value extremes, and gates feature callbacks in selected fixtures. Actual WorldGenRegion construction, upgrading-world vertical write restrictions, POIs, block entities, postprocessing execution, lighting, block/fluid tick execution, complete feature registries and complete world generation remain outside this comparison." +} diff --git a/benchmarks/rust-feature-sort-2026-10-06/scoped-parity.json b/benchmarks/rust-feature-sort-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..9ace2a9c1 --- /dev/null +++ b/benchmarks/rust-feature-sort-2026-10-06/scoped-parity.json @@ -0,0 +1,156 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 3871, + "biomes": 67, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureSortOracle.java": "cbb527d2a204197bf344597487164e6948f9894641971899e8d023d0b3603abe", + "tools/test_feature_sort_parity.py": "ba745b738c3181c432c77c939126ed8f41fa7bc0430c1900d909f2ed50e5fdd6", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "c215156f2ecf7faf214b3d89e0829b65d54f4ff6d134d778ec941f18a606a327", + "crates/horizon-world/src/worldgen/block_predicate.rs": "dd8cbda2ec110444950f0b31bf4e088897eab0994674a91568c7b063f8f16210", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "2297b194514925688dba25016a69d5ba5eb8b869bdfff28f2e611a6742ac5954", + "crates/horizon-world/src/worldgen/feature_region.rs": "4a95a30c0987d97e671f84380e13ddea070ad81f996baa65b2a06c4d892971c7", + "crates/horizon-world/src/worldgen/feature_sort.rs": "0b9d1e1c15d8449125d39e400776b8f28eec7b7cbd047660a94f8cb90160adfe", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "1b976aa4dd2516468196d0af3451e3fdd037493a14d269f54ebdd7254055e05e", + "crates/horizon-world/src/worldgen/placement/context.rs": "b36dfd9297896e62770f2085cf934fc08ebd4c030ecc7ae17d864e819a113201", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "68ecf36954fea5705436d486e9be93836933fd56779022afeb881a0399d6a674", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "55c4317bd9c782378de7c2a7d58be5aa08febc5b8f2f4b86379a39e0ba500b3c", + "crates/horizon-world/examples/feature_sort_fixture.rs": "36dc9257be8b823a8dfb632934c56a5bdb733911d470fa8015506b1febc4225c" + }, + "fixtures_sha256": { + ".local/rust-feature-sort-parity/inputs.txt": "ab3aa064287cc2d3c39f1caf3c3f497270e6b91a7af6581cf0e19a01aeb2b720", + ".local/rust-feature-sort-parity/biome-features.json": "cc3846a9d2eae7e45ba9fd69f07e37a715ce5cb946c9cdbe8a86a471c8a8a975" + }, + "rust_output_sha256": "a20952d4dac7add773c676543ec414dfb0bd498737a293a3c18341951e7ddea8", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a20952d4dac7add773c676543ec414dfb0bd498737a293a3c18341951e7ddea8", + "matched_output_lines": 411751 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "a20952d4dac7add773c676543ec414dfb0bd498737a293a3c18341951e7ddea8", + "matched_output_lines": 411751 + } + ], + "scope": "Actual FeatureSorter.buildFeaturesPerStep with structurally equal but identity-distinct placed-feature payloads. Ordered per-biome step lists, repeated references, cycles, cross-step reuse, disconnected nodes, empty steps and identity index lookups are compared. Every bundled biome feature list and deterministic shuffled/subset combinations bind named references to stable object identities without executing unported feature algorithms. Rust uses bounded iterative DFS. Cycle diagnostic minimization/text, full registry ownership, decoration seeding and feature execution remain pending." +} diff --git a/benchmarks/rust-fill-layer-2026-10-06/scoped-parity.json b/benchmarks/rust-fill-layer-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..8488d5e86 --- /dev/null +++ b/benchmarks/rust-fill-layer-2026-10-06/scoped-parity.json @@ -0,0 +1,157 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 39541, + "block_states": 35723, + "integer_properties": 146, + "requested_placements": 7636, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFillLayerOracle.java": "17730a2248b4b4c808ef6455a09eb80aaad6cf5d7f6b089f8f617993965da7ea", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "tools/test_fill_layer_parity.py": "4b534276e6d9feb291d1ba965e596efcbef1be97c186dc6cb3bcdc376a57a7b8", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "22f571a0e4a0ca4e97413b34edabfb1dec9eaccbb8efcefd3ae140b5cee10200", + "crates/horizon-world/src/worldgen/block_predicate.rs": "dd8cbda2ec110444950f0b31bf4e088897eab0994674a91568c7b063f8f16210", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "80f55c85f5e719aa2df293e6f3afa576ee0783eb0aeccd088e4a4866fa426d7c", + "crates/horizon-world/src/worldgen/feature_region.rs": "4a95a30c0987d97e671f84380e13ddea070ad81f996baa65b2a06c4d892971c7", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/placement/chain.rs": "1b976aa4dd2516468196d0af3451e3fdd037493a14d269f54ebdd7254055e05e", + "crates/horizon-world/src/worldgen/placement/context.rs": "b36dfd9297896e62770f2085cf934fc08ebd4c030ecc7ae17d864e819a113201", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "68ecf36954fea5705436d486e9be93836933fd56779022afeb881a0399d6a674", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "bbb07d92a4ba00513c68e437309a7cb80cd0dd676e6e71aa816168e5676dd96d", + "crates/horizon-world/examples/fill_layer_fixture.rs": "af96e1b2659ea5882a0bc5826c5374baf7cf062463846b481d3682d70cfc673b" + }, + "fixtures_sha256": { + ".local/rust-fill-layer-parity/facts-client.json": "5c785e645fd0bfb583e48c30eaf8bbffc185ee5515b158a8cd32a8bc3c508ba6", + ".local/rust-fill-layer-parity/facts-server.json": "5c785e645fd0bfb583e48c30eaf8bbffc185ee5515b158a8cd32a8bc3c508ba6", + ".local/rust-fill-layer-parity/inputs.txt": "afcceccc92af42fa419325a44bf4d0264c345ada72390c168cf53bbd99cb1a64" + }, + "rust_output_sha256": "75cc33fedb778e95c292c3fd9a6c6b1ef5c567b4b904b970f43e9a28fb5e205f", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "75cc33fedb778e95c292c3fd9a6c6b1ef5c567b4b904b970f43e9a28fb5e205f", + "matched_output_lines": 1305274 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "75cc33fedb778e95c292c3fd9a6c6b1ef5c567b4b904b970f43e9a28fb5e205f", + "matched_output_lines": 1305274 + } + ], + "scope": "Actual Feature.DIRECT_CODEC decoding of fill-layer features binds every pinned block state through BlockState.CODEC; selected compact/full states exercise integer properties and invalid-property defaults. Native FillLayerFeature.place traces each world-minimum query, ordered X/Z block reads and conditional writes, flags, rejected writes, thrown minimum/read/write failures and accumulated stored states after repeated calls. Air-state identity and height-limit metadata are independently exported from both authenticated JARs and checked. Extreme wrapping coordinates and world minima, both random modes and untouched subsequent random state are compared. Full world effects, region integration of fill-layer features, other configured block features and complete generated worlds remain pending." +} diff --git a/benchmarks/rust-float-log-2026-10-05/boundary-parity.json b/benchmarks/rust-float-log-2026-10-05/boundary-parity.json new file mode 100644 index 000000000..3cca81044 --- /dev/null +++ b/benchmarks/rust-float-log-2026-10-05/boundary-parity.json @@ -0,0 +1,373 @@ +{ + "schema": 1, + "minecraft": "26.3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "exhaustive": false, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFloatLogOracle.java": "1794510183faa07892761e93094301b69665d4b6a5300ef7117b5482832165f2", + "tools/test_float_log_parity.py": "1ba733163133ea6232a9021fcee5b38255887d62ebab8d1b42e4ccad259b21f3", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "crates/horizon-core/src/bin/density_parity.rs": "ca79feb1ff690557a54dcb3a504967453dd0190ac65d7322512c778048127c5e", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/density/arithmetic.rs": "e42a19893a8d75f8f62b564bd9e527131d87fb469c808422fb8d3b14eb9edac0", + "crates/horizon-core/src/density/cache.rs": "3ccc1268dca96259890279e9f91cb7a099c74b12e6ca2973880d4fa246f7a619", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ede1da60dec40f6df846e44a663bff03c21631c21f2b6e25a58c358115f122a1", + "crates/horizon-core/src/density/graph/mod.rs": "47f1716a8b5fffc1012b9e4654e223b0ff818f00f6a059818ab3dfe8c37e3056", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "3034eccba649851d7a95e276a48472efd70cdf747b54526b565fb0feb88ce43a", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "3e56cc0f6b51c6faa4bd8d9fc259bf01a0c3bf647f36be8be7640971cfe3b334", + "crates/horizon-core/src/density/power.rs": "b18a5b0d524de52a3d1e6028adcddd183424be2913f24d3f098ff56c5e1c6942", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "3968e2a337a6a23226c485057c79359e66df16683f00fb4ebc9fabb03910a015", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "faae2edce8b573fd32fcb4bd1f898be7d700a5b38479439f5bec96df764688fd" + }, + "comparisons": [ + { + "start_bits": 0, + "count": 65536, + "rust_output_sha256": "1e684e3e6b93407fb3f37762a4de01f8706c047cf5294cf9d2a1ac173fc02075", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "1e684e3e6b93407fb3f37762a4de01f8706c047cf5294cf9d2a1ac173fc02075", + "matched_float_values": 65536 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "1e684e3e6b93407fb3f37762a4de01f8706c047cf5294cf9d2a1ac173fc02075", + "matched_float_values": 65536 + } + ] + }, + { + "start_bits": 8388608, + "count": 65536, + "rust_output_sha256": "4200cba9cf0053911e1d672fabbee94f5267d5b7aa109fbe57ddc5a4f7b70393", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "4200cba9cf0053911e1d672fabbee94f5267d5b7aa109fbe57ddc5a4f7b70393", + "matched_float_values": 65536 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "4200cba9cf0053911e1d672fabbee94f5267d5b7aa109fbe57ddc5a4f7b70393", + "matched_float_values": 65536 + } + ] + }, + { + "start_bits": 1056899072, + "count": 65536, + "rust_output_sha256": "cae10428767d3e776f5183caba1780897d2e1831913c05ae6dd8d843a6e25a76", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "cae10428767d3e776f5183caba1780897d2e1831913c05ae6dd8d843a6e25a76", + "matched_float_values": 65536 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "cae10428767d3e776f5183caba1780897d2e1831913c05ae6dd8d843a6e25a76", + "matched_float_values": 65536 + } + ] + }, + { + "start_bits": 1065287680, + "count": 65536, + "rust_output_sha256": "59024062288c0bc65906a38484eff0fb73aaba11cb8110aaebc6dde8891ed10c", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "59024062288c0bc65906a38484eff0fb73aaba11cb8110aaebc6dde8891ed10c", + "matched_float_values": 65536 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "59024062288c0bc65906a38484eff0fb73aaba11cb8110aaebc6dde8891ed10c", + "matched_float_values": 65536 + } + ] + }, + { + "start_bits": 1065353216, + "count": 65536, + "rust_output_sha256": "01849695d0e9a30ccd132270cb79ecaaf1065411d66b323a36f1b87f5d0e4596", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "01849695d0e9a30ccd132270cb79ecaaf1065411d66b323a36f1b87f5d0e4596", + "matched_float_values": 65536 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "01849695d0e9a30ccd132270cb79ecaaf1065411d66b323a36f1b87f5d0e4596", + "matched_float_values": 65536 + } + ] + }, + { + "start_bits": 1073741824, + "count": 65536, + "rust_output_sha256": "0df001f091df446399cccd24b0fa1e4114894c263d5cdc707b8c4a2ded269936", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "0df001f091df446399cccd24b0fa1e4114894c263d5cdc707b8c4a2ded269936", + "matched_float_values": 65536 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "0df001f091df446399cccd24b0fa1e4114894c263d5cdc707b8c4a2ded269936", + "matched_float_values": 65536 + } + ] + }, + { + "start_bits": 2139029504, + "count": 65536, + "rust_output_sha256": "c39faee80d047d450472ae5eb25f2811e4010b5aad1ccad80ff4d8f7638bd3d5", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "c39faee80d047d450472ae5eb25f2811e4010b5aad1ccad80ff4d8f7638bd3d5", + "matched_float_values": 65536 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "c39faee80d047d450472ae5eb25f2811e4010b5aad1ccad80ff4d8f7638bd3d5", + "matched_float_values": 65536 + } + ] + }, + { + "start_bits": 2139095040, + "count": 65536, + "rust_output_sha256": "1c60d380d4dc55a05bed3452e32f4d5c813c9beb4459ba890338c27f0b047345", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "1c60d380d4dc55a05bed3452e32f4d5c813c9beb4459ba890338c27f0b047345", + "matched_float_values": 65536 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "1c60d380d4dc55a05bed3452e32f4d5c813c9beb4459ba890338c27f0b047345", + "matched_float_values": 65536 + } + ] + }, + { + "start_bits": 2147418112, + "count": 65536, + "rust_output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "matched_float_values": 65536 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "matched_float_values": 65536 + } + ] + }, + { + "start_bits": 2147483648, + "count": 65536, + "rust_output_sha256": "b365699b17956be9409c58c88b48da5f7edf7e4783fcca72efa00b0dae84455f", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "b365699b17956be9409c58c88b48da5f7edf7e4783fcca72efa00b0dae84455f", + "matched_float_values": 65536 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "b365699b17956be9409c58c88b48da5f7edf7e4783fcca72efa00b0dae84455f", + "matched_float_values": 65536 + } + ] + }, + { + "start_bits": 2155872256, + "count": 65536, + "rust_output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "matched_float_values": 65536 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "matched_float_values": 65536 + } + ] + }, + { + "start_bits": 3212771328, + "count": 65536, + "rust_output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "matched_float_values": 65536 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "matched_float_values": 65536 + } + ] + }, + { + "start_bits": 3212836864, + "count": 65536, + "rust_output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "matched_float_values": 65536 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "matched_float_values": 65536 + } + ] + }, + { + "start_bits": 4286513152, + "count": 65536, + "rust_output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "matched_float_values": 65536 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "matched_float_values": 65536 + } + ] + }, + { + "start_bits": 4286578688, + "count": 65536, + "rust_output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "matched_float_values": 65536 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "matched_float_values": 65536 + } + ] + }, + { + "start_bits": 4294901760, + "count": 65536, + "rust_output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "matched_float_values": 65536 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "f3b37b44be6c4c25b1d85b2bce7844c67cc9f3e5a3270d4a53101d99049b966e", + "matched_float_values": 65536 + } + ] + } + ], + "scope": "Compiled scalar UnaryFunction.LogSampler compared by float result bits across the recorded input bit ranges, including signed zeros, subnormals, finite values, infinities and NaNs. NaN results are canonicalized as Float.floatToIntBits. Exhaustive mode checks all 2^32 float input bit patterns against both checksum-pinned JARs on this machine's JDK. Bulk composition, range propagation, compiler rewriting and other operations belong to the separate density suite. This does not establish double-precision Math.log parity, other-platform math parity, complete terrain, gameplay or performance." +} diff --git a/benchmarks/rust-float-log-2026-10-05/scoped-parity.json b/benchmarks/rust-float-log-2026-10-05/scoped-parity.json new file mode 100644 index 000000000..df0091792 --- /dev/null +++ b/benchmarks/rust-float-log-2026-10-05/scoped-parity.json @@ -0,0 +1,87 @@ +{ + "schema": 1, + "minecraft": "26.3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "exhaustive": true, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFloatLogOracle.java": "1794510183faa07892761e93094301b69665d4b6a5300ef7117b5482832165f2", + "tools/test_float_log_parity.py": "c7f9aa59351309cba8a1e8c118e304c58dee0ddd31dcd98d3f0d41a86b5d77a9", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "crates/horizon-core/src/bin/density_parity.rs": "9a1b2d7033682f23e413d1e8764365052c673a05306ee254a4f6f5d6c5a728f6", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/density/arithmetic.rs": "e23a963bfbc75ba7c3e7bdefd0e300907dcc4f8c8336826c27ddf479d320f075", + "crates/horizon-core/src/density/cache.rs": "3ccc1268dca96259890279e9f91cb7a099c74b12e6ca2973880d4fa246f7a619", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "89993bf84b2bb5ca8d28b8c1c944db87078a43890a904a8d2bd1989e6cd3864f", + "crates/horizon-core/src/density/graph/mod.rs": "7a05a8b2b99fa41b69fd85d38228b8c0cc95b11761039643abb9af5f6a0d07d7", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "91da8b08b1567640e82daab5440fb767c74ff14e63bcc555cbd2e6b4f5ff3cd6", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "e5cd03f4c1b15caf5d6680f2a6d6271f324af9d9f6cad7068ddf942509b3fe62", + "crates/horizon-core/src/density/mod.rs": "6a3eec3feb37bdeb574b9070036c207544f2375a41ef25ab93315cccaba6ebc2", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "3968e2a337a6a23226c485057c79359e66df16683f00fb4ebc9fabb03910a015", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "faae2edce8b573fd32fcb4bd1f898be7d700a5b38479439f5bec96df764688fd" + }, + "comparisons": [ + { + "start_bits": 0, + "count": 4294967296, + "rust_output_sha256": "3a67757c8e4e4c70d597613ea11b7ace2ea45d8f02effaa23e70233e4ee327d7", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "3a67757c8e4e4c70d597613ea11b7ace2ea45d8f02effaa23e70233e4ee327d7", + "matched_float_values": 4294967296 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "3a67757c8e4e4c70d597613ea11b7ace2ea45d8f02effaa23e70233e4ee327d7", + "matched_float_values": 4294967296 + } + ] + } + ], + "scope": "Compiled scalar UnaryFunction.LogSampler compared by float result bits across the recorded input bit ranges, including signed zeros, subnormals, finite values, infinities and NaNs. NaN results are canonicalized as Float.floatToIntBits. Exhaustive mode checks all 2^32 float input bit patterns against both checksum-pinned JARs on this machine's JDK. Bulk composition, range propagation, compiler rewriting and other operations belong to the separate density suite. This does not establish double-precision Math.log parity, other-platform math parity, complete terrain, gameplay or performance." +} diff --git a/benchmarks/rust-fluid-2026-10-06/scoped-parity.json b/benchmarks/rust-fluid-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..534f7a6f4 --- /dev/null +++ b/benchmarks/rust-fluid-2026-10-06/scoped-parity.json @@ -0,0 +1,185 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "fluid_kinds": 5, + "codec_fixtures": 2432, + "fixtures": 40344, + "requested_height_queries": 80688, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidOracle.java": "bae87f5d7626cbb09132dc8c4e5b221a307cc377cc25b1141819d55220806e0d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "tools/test_fluid_parity.py": "d5fffccdc93b58a7775ea9504f1529820d984de052a4ad536d05cb0ed32cbe29", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b3caf26bd3afc9d10cdcca3f7e794c30abf5ba09afa1fe80ba8f44713acdb274", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "2ea6d26fe88c633ad3efe7bdb6fc49f54961cbdf93b82919d79cf7d37a5c3c7d", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "b78927059c43b0860f5e29640720b85ab4099e2e620993baa70feaf8e61b79bf", + "crates/horizon-world/src/worldgen/feature_region.rs": "3b893ceafbdd1d7b4264f4022dbdb6a7142dfc7001a5cf5c304f5ca7695dfaa0", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "b967b71867dac7f83f6dba0eb063ad9c581aa2f29087c2128052a4eb02f199c2", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "97dcb2d79f285daab0bbbe2d2ca673edc0376b23c5cd4519e0f8818593e0a4ee", + "crates/horizon-world/examples/fluid_fixture.rs": "dfd419b3a62d371f3068441590fe5b045cc135b0a2cd435bd30d36a47d845e0e" + }, + "fixtures_sha256": { + ".local/rust-fluid-parity/inputs.txt": "532b6e5965ce43b01989e7ee11c104d6bb498e52bcad0a79b14c5865068d287d", + ".local/rust-fluid-parity/codec-inputs.txt": "c279696131c2f644413b5e68eb340ef69ed085d8b3af3beb88523b14522704a5", + ".local/rust-fluid-parity/facts-client.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-fluid-parity/facts-server.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b" + }, + "rust_output_sha256": "4f575eff3ad878286ef466b8a8b809e0e4e9a0bccc9d301f8639273bc9838b54", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "4f575eff3ad878286ef466b8a8b809e0e4e9a0bccc9d301f8639273bc9838b54", + "matched_output_lines": 243331 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "4f575eff3ad878286ef466b8a8b809e0e4e9a0bccc9d301f8639273bc9838b54", + "matched_output_lines": 243331 + } + ], + "scope": "FluidState.CODEC decoding and encoding include all 37 states, object-only identifiers, lenient missing/invalid properties, Unicode integer levels and native defaults. Legacy conversion is checked for codec-derived fluid states as well. Native fluid identity, amount, falling/source/full flags, own-height bits and legacy block conversion for every pinned block state; all fluid-family identity pairs. Surface and camera height query order, above-fluid family checks, source-only downward-face support checks, coordinate wrapping and injected query failures are compared. The fixture supplies stone/air support states; general block support shapes, fluid spreading/ticks, entities and rendering remain outside this comparison." +} diff --git a/benchmarks/rust-fluid-box-2026-10-07/scoped-parity.json b/benchmarks/rust-fluid-box-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..5ea4774dc --- /dev/null +++ b/benchmarks/rust-fluid-box-2026-10-07/scoped-parity.json @@ -0,0 +1,238 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 17340, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidBoxOracle.java": "4382758ae626c107e1c4394ca066ca002d49a30c1a5a6e2df16cb44117878ebf", + "tools/test_fluid_box_parity.py": "0d3ae41c39831cfc2952643f805f672318c15acbee5aa40a4e8ea03c97058a48", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "a092826d9cbb6ea50e5e1635a9bc687cec2e43bb791e3ecbf9e76a16fd1d926f", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/fluid_box_fixture.rs": "c2516d00dc62c998744787f75e7d1dd1808a03eb90ea62ad4b73600f4f0e26ad" + }, + "fixtures_sha256": { + ".local/rust-fluid-box-parity/inputs.txt": "41908a6c6991996db65a814d870885aa40a015eb9259b5f68998d2bf9b1d8741" + }, + "rust_output_sha256": "f9569d67701d680554ab3702c1da5cdb9da37915c29fb6d19c17075b91d54afb", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "f9569d67701d680554ab3702c1da5cdb9da37915c29fb6d19c17075b91d54afb", + "matched_output_lines": 92822 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "f9569d67701d680554ab3702c1da5cdb9da37915c29fb6d19c17075b91d54afb", + "matched_output_lines": 92822 + } + ], + "scope": "Actual Entity.getFluidInteractionBox and AbstractBoat.modifyPassengerFluidInteractionBox. Captured deflated entity bounds, virtual vehicle lookup/modifier dispatch, actual boat status predicate, clipping/null results at the boat waterline, AABB endpoint normalization, nonfinite/signed-zero arithmetic, callback mutations and failures. Entity/vehicle snapshots are controlled; live passenger lifecycle and full gameplay remain pending." +} diff --git a/benchmarks/rust-fluid-flow-2026-10-07/scoped-parity.json b/benchmarks/rust-fluid-flow-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..90ab6bf07 --- /dev/null +++ b/benchmarks/rust-fluid-flow-2026-10-07/scoped-parity.json @@ -0,0 +1,235 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 51846, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidFlowOracle.java": "3a5f524c5d1fd47d22bf45d3c293cccb08ba8abb566cd7be729e816a5d1d3b46", + "tools/test_fluid_flow_parity.py": "7485606cb348c193ada6825cf68238f98e46fb3292f2b9723246cf167ebfb453", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "36ff6f09e8d215eef955262c185853c9e901aa33e0368130c3a4971a30edfcab", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/fluid_flow_fixture.rs": "33ab669c92eddfd0ca3fa074543bada350b8b94d51b0e75a844db4dadc25f8be" + }, + "fixtures_sha256": { + ".local/rust-fluid-flow-parity/inputs.txt": "89be628a59fb7bbe46ab265bcbce7f02e749495ba24ff58aaeea69636adbc5c1", + ".local/rust-fluid-flow-parity/fluid-states.json": "f888b2d7adf0ee194a08900e6df9909933734b5d8dab648dc3e866d70ef3b659" + }, + "rust_output_sha256": "55761f29153f1d25d6ef7ad0bd431a30f8c4e7ed2a12ad7f4bca215404ad5e7b", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "55761f29153f1d25d6ef7ad0bd431a30f8c4e7ed2a12ad7f4bca215404ad5e7b", + "matched_output_lines": 1051071 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "55761f29153f1d25d6ef7ad0bd431a30f8c4e7ed2a12ad7f4bca215404ad5e7b", + "matched_output_lines": 1051071 + } + ], + "scope": "Actual registered FluidState.getFlow / FlowingFluid.getFlow and solid-face helper over every registered fluid state. Ordered horizontal and downward neighbor reads, fluid families, BLOCKS_FLUID_FLOW tag, IceBlock guard, falling-wall deflection, f32 height differences, vector normalization, wrapping coordinates and injected failures. Block flags and face support are controlled; registry/world support binding, spreading and full gameplay remain pending." +} diff --git a/benchmarks/rust-fluid-occupancy-2026-10-07/scoped-parity.json b/benchmarks/rust-fluid-occupancy-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..21b646324 --- /dev/null +++ b/benchmarks/rust-fluid-occupancy-2026-10-07/scoped-parity.json @@ -0,0 +1,235 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 4349, + "registry_states": 35723, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidOccupancyOracle.java": "3c0d14ae24b5bed27e1798003f6a5579f06ba651a9fc04e29895d30d22982809", + "tools/test_fluid_occupancy_parity.py": "e80c63373ee20954380bfb2e242b721ad6219989e1d8b7dc70e0bfb6faa5b47a", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/examples/fluid_occupancy_fixture.rs": "40147a8197d4ebd87210482e4b0c4a7bc993e611cd5086e55a5501503f335b24", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "d82c07d89e7aa4236de955134008cefd85532d96b0b0354bc37266bd832b489e", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "fixtures_sha256": { + ".local/rust-fluid-occupancy-parity/inputs.txt": "a39fbf688b0df119b1571db03bf3d7920211f50b43446950f49755c4c41ebbfd", + ".local/rust-fluid-occupancy-parity/info.json": "58c9ad06a3b4af632e45a65d7fe2b930d0b05a5a17a490267dc3c7e98d9e23f7", + ".local/rust-fluid-occupancy-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb" + }, + "rust_output_sha256": "a34d7cd8e5e5946c064656f097dff1405bf52bf0f2485b7af4d8d713fcceb306", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a34d7cd8e5e5946c064656f097dff1405bf52bf0f2485b7af4d8d713fcceb306", + "matched_output_lines": 116664 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "a34d7cd8e5e5946c064656f097dff1405bf52bf0f2485b7af4d8d713fcceb306", + "matched_output_lines": 116664 + } + ], + "scope": "Actual LevelReader.containsAnyLiquid and native BoxBlockMatcher/BlockScanUtils over real ProtoChunk sections and palettes. All registered block fluid-presence values, inclusive AABB floors, chunk/section scan order, height limits, palette changes/compaction, nonfinite rejection and explicit Rust query budgets. Public query traces and results match; Rust skips dry active palettes without unpacking cells. Controlled repeating resident chunk snapshots; Entity.isFree collision composition and live world integration remain pending." +} diff --git a/benchmarks/rust-fluid-shape-2026-10-07/scoped-parity.json b/benchmarks/rust-fluid-shape-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..75d8b18c9 --- /dev/null +++ b/benchmarks/rust-fluid-shape-2026-10-07/scoped-parity.json @@ -0,0 +1,223 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 5181, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidShapeOracle.java": "8786e6c36ea74e816a2d8b7b1ed6796f839ed0e047c35006d5f04d6f9f9bca65", + "tools/test_fluid_shape_parity.py": "a4a8c64bb5d5e62675fdad889fa7a2729946a5e5dc07bff9acc70cba99b9c4bd", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "48b091add554656ccbcb94ba3822f140f4669719013a411b4875404db43f36aa", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/fluid_shape_fixture.rs": "7187c803bfbc53bc9694c6f3dedacb8fcf9e43129b505ad6d6847273ecdbc400" + }, + "fixtures_sha256": { + ".local/rust-fluid-shape-parity/inputs.txt": "9585317fda212bee3f6acc7129447e1a7fd190be10584691bcc72f04351d8fb2", + ".local/rust-fluid-shape-parity/fluid-states.json": "f888b2d7adf0ee194a08900e6df9909933734b5d8dab648dc3e866d70ef3b659" + }, + "rust_output_sha256": "82e11af0b7abd2dd60e288e4af1d2c1becf910476600c199f4f0bb7eadb292d1", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "82e11af0b7abd2dd60e288e4af1d2c1becf910476600c199f4f0bb7eadb292d1", + "matched_output_lines": 387950 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "82e11af0b7abd2dd60e288e4af1d2c1becf910476600c199f4f0bb7eadb292d1", + "matched_output_lines": 387950 + } + ], + "scope": "Actual registered FluidState.getShape and FlowingFluid first-query shape caches over every native fluid state. Compares ordered above-fluid queries, cached-state counts, shape geometry, canonical empty/full identities and aliases across repeated states. Sequences change above fluids, positions, failure points and query order; failed height reads do not populate a cache. Caches are reset between sequences and shared across world views within each sequence. Fluid propagation, entity immersion, registered world ray binding and full gameplay remain separate work." +} diff --git a/benchmarks/rust-food-2026-10-07/scoped-parity.json b/benchmarks/rust-food-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..5226956f0 --- /dev/null +++ b/benchmarks/rust-food-2026-10-07/scoped-parity.json @@ -0,0 +1,243 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 15211, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFoodOracle.java": "9219213c9ff960d0eee7ec250ea920aa4db5d0ef508325553c3e4203d32356a1", + "tools/test_food_parity.py": "c81fcc4430787416da5f0747eb657cee83269eb4ec7a5d35330691303c0e96fe", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attributes/entity.rs": "d165e952e0ff2d1a1b037c03df5fbc778b7e263b8f9e402cf9b0fa27c933e0c6", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "9cec72b2510d3ce46cf7ff844fbbea55e0fc8dbb1995187ee3a964b621fbcbf5", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/food_fixture.rs": "af283fa5c04667da40a283c3c5eafce781d110abdfe274b6f9b18d5a6783ebf0" + }, + "fixtures_sha256": { + ".local/rust-food-parity/inputs.txt": "50837fa91cc6a8354a10cd6a02584ca6e41656eea5e0ecbebe407b04fa6dbe48" + }, + "rust_output_sha256": "5f63f3351ef5c24dc26b3a499eaba730bc4996311cf24d34dd2707632665d464", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "5f63f3351ef5c24dc26b3a499eaba730bc4996311cf24d34dd2707632665d464", + "matched_output_lines": 180878 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "5f63f3351ef5c24dc26b3a499eaba730bc4996311cf24d34dd2707632665d464", + "matched_output_lines": 180878 + } + ], + "scope": "Actual FoodData eating/properties, exhaustion, hunger predicates and server tick, including query order, mutations/failures, regeneration thresholds, starvation difficulty/health guards, signed-zero/nonfinite values and integer overflow. Player healing/damage and world queries are controlled; full damage/health, consumables, persistence and playable integration remain pending." +} diff --git a/benchmarks/rust-food-properties-2026-10-07/scoped-parity.json b/benchmarks/rust-food-properties-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..e533393d1 --- /dev/null +++ b/benchmarks/rust-food-properties-2026-10-07/scoped-parity.json @@ -0,0 +1,288 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 3640, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFoodPropertiesOracle.java": "b0cc09c36ec6f74f6b9e00bd87cb9f1c6b0f4f40f386b3dd56ba8f6aafd4a2b3", + "tools/test_food_properties_parity.py": "a14ca81c08226fd82aa16745e7c8b407d013d32c513d9d8b869979a3bd921cc1", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "a3ad79b1a4ea171726f07b1fc6e2b78f224157e8f0d53dd2ce96e93ccd2d38dd", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "6bd97d87f0e3eaad440162145a1515b9a0b7cfb85cb0ea337874ed9745f8dd45", + "crates/horizon-world/src/lib.rs": "4c5e7910f6c4648425c05dfd9ddfc216f45bcd4dc816b7dbcc6675d2afacd18f", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/food_properties_fixture.rs": "e45ecd4d7c64718767d3dbdaadfa8f7b6601243bc60d8f9235bc023dc6a154b0" + }, + "fixtures_sha256": { + ".local/rust-food-properties-parity/inputs.txt": "cf92c84497fe2e6ed3fb2c54323cf968e31d0e3e52ebfb27af1de2c7ec7e2e40" + }, + "rust_output_sha256": "592ee04ef5f3487c651886cf0c883bc1f1fac6c16378701912badc6e774bd8e6", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "592ee04ef5f3487c651886cf0c883bc1f1fac6c16378701912badc6e774bd8e6", + "matched_output_lines": 70632 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "592ee04ef5f3487c651886cf0c883bc1f1fac6c16378701912badc6e774bd8e6", + "matched_output_lines": 70632 + } + ], + "scope": "Actual FoodProperties.onConsume with real stored FoodData, native LegacyRandomSource and XoroshiroRandomSource, player/non-player class selection, and controlled random/food getter and level sound callbacks. Compares sound arguments, stored hunger/saturation, captured random-source selection, subsequent RNG state, position reads and mutation/failure prefixes. Rust uses the existing FoodData and random stream implementations. Sound mixing/playback, concrete consumable dispatch, particles/effects and full gameplay integration remain pending." +} diff --git a/benchmarks/rust-food-storage-2026-10-07/scoped-parity.json b/benchmarks/rust-food-storage-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..be5db181a --- /dev/null +++ b/benchmarks/rust-food-storage-2026-10-07/scoped-parity.json @@ -0,0 +1,244 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 6565, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFoodStorageOracle.java": "3b1db195691b3b9066380e71e690434ed00798278bd67bbdc7461459e7530fee", + "tools/test_food_storage_parity.py": "bd59d6b825926f5d34fb0e2cd19cbd6ae3cdd889a6d929ca68f122296109dc4a", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attributes/entity.rs": "d165e952e0ff2d1a1b037c03df5fbc778b7e263b8f9e402cf9b0fa27c933e0c6", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "70c198f1bd000d46bff40b05aed9fa2aab99972ccfb2fe94f2002044e4c0df9c", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/food_storage_fixture.rs": "fbd3f05d9720a83d2e9de31d67440054189f1ed9e9faeaf4383188cfd43a2cc8" + }, + "fixtures_sha256": { + ".local/rust-food-storage-parity/inputs.txt": "df6067c6a781554ed5a57e92543bf7acea9e55fc25e5435ddc10fcd58e46436d" + }, + "rust_output_sha256": "df9e3d7ca5293c11fcddb814bd84683135a168b4efb789ec6496e1158dfb3db4", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "df9e3d7ca5293c11fcddb814bd84683135a168b4efb789ec6496e1158dfb3db4", + "matched_output_lines": 45955 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "df9e3d7ca5293c11fcddb814bd84683135a168b4efb789ec6496e1158dfb3db4", + "matched_output_lines": 45955 + } + ], + "scope": "Actual FoodData readAdditionalSaveData/addAdditionalSaveData through native TagValueInput/TagValueOutput; all NBT numeric types, missing/wrong-type defaults, numeric coercion, overflow, nonfinite values, signed-zero normalization, output types and round trips. Other player fields retained. ProblemReporter diagnostics, complete player save lifecycle and playable integration remain pending." +} diff --git a/benchmarks/rust-free-space-2026-10-07/collision-regression.json b/benchmarks/rust-free-space-2026-10-07/collision-regression.json new file mode 100644 index 000000000..74cdc1534 --- /dev/null +++ b/benchmarks/rust-free-space-2026-10-07/collision-regression.json @@ -0,0 +1,254 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "registry_states": 35723, + "block_definitions": 1286, + "definition_counts": { + "tagged_full": 1221, + "never": 42, + "closed_shulker": 17, + "always": 4, + "not_extended": 2 + }, + "native_chunk_storage": "ProtoChunk", + "rust_chunk_storage": "TerrainChunk", + "fixtures": 80270, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_world_collision_check_parity.py": "3b8a82f72220e20f96e33e2ac09030fd82cb6c3a7511e7b11387de413be6452e", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/examples/registry_collision_scan_fixture.rs": "e35aed3ae18c08c31f35ec0e9f8cfe6691dea587b587c95725610d9aa48b7daa", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "302223c3742241915db90aa99a8c0c440871907dbcf9a40166b72dac33a37554", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "fixtures_sha256": { + ".local/rust-world-collision-check-parity/inputs.txt": "210f1473983831ae93949eae6f5eae01ace1c729c46125e44f76143d23fa49ff", + ".local/rust-world-collision-check-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-world-collision-check-parity/definitions.json": "9cac3c650353104db1648050621057bfe104dec1f44b53d0b7875f7bc20e6eec", + ".local/rust-world-collision-check-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-world-collision-check-parity/cached-collision.nbt": "4a274cd720a1bda585b02f50f16e90246576679e1e173c214548c5cbf607ab2d", + ".local/rust-world-collision-check-parity/tags.json": "5e1301e5a9abf7e4de93af5dae3a157e852dbdb4ea345c2eb626305a605d4f98" + }, + "rust_output_sha256": "fadc86b51a80004c49117311fbe87d2d44405681ceb26bf71593784261ff214c", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "fadc86b51a80004c49117311fbe87d2d44405681ceb26bf71593784261ff214c", + "matched_output_lines": 4793095 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "fadc86b51a80004c49117311fbe87d2d44405681ceb26bf71593784261ff214c", + "matched_output_lines": 4793095 + } + ], + "scope": "Actual native CollisionGetter.noCollision for an entity executes lazy BlockCollisions over registered blocks and resident ProtoChunk sections, then entity list and applicable border shape checks. Rust uses the registry-bound TerrainChunk scan in the same short-circuit order. All registered states, controlled context variants, degenerate entity shapes, empty/disjoint borders, missing chunks, chunk/height boundaries and failures are compared. Entity list contents and border applicability/shapes are controlled; null-entity overloads, live entity indexing, experimental minecarts and player ledge behavior remain separate work." +} diff --git a/benchmarks/rust-free-space-2026-10-07/scoped-parity.json b/benchmarks/rust-free-space-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..2d901545f --- /dev/null +++ b/benchmarks/rust-free-space-2026-10-07/scoped-parity.json @@ -0,0 +1,254 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "registry_states": 35723, + "block_definitions": 1286, + "definition_counts": { + "tagged_full": 1221, + "never": 42, + "closed_shulker": 17, + "always": 4, + "not_extended": 2 + }, + "native_chunk_storage": "ProtoChunk", + "rust_chunk_storage": "TerrainChunk", + "fixtures": 83630, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_free_space_parity.py": "76ae9d58af21ff174c04d9c893c24a2389d3432cf420c207870043052fb83311", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/examples/registry_collision_scan_fixture.rs": "e35aed3ae18c08c31f35ec0e9f8cfe6691dea587b587c95725610d9aa48b7daa", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "302223c3742241915db90aa99a8c0c440871907dbcf9a40166b72dac33a37554", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "fixtures_sha256": { + ".local/rust-free-space-parity/inputs.txt": "4481c0be8f29cc72059c31d803e99ec294c6e40fda20d048feb40ae50b596e5e", + ".local/rust-free-space-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-free-space-parity/definitions.json": "9cac3c650353104db1648050621057bfe104dec1f44b53d0b7875f7bc20e6eec", + ".local/rust-free-space-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-free-space-parity/cached-collision.nbt": "4a274cd720a1bda585b02f50f16e90246576679e1e173c214548c5cbf607ab2d", + ".local/rust-free-space-parity/tags.json": "5e1301e5a9abf7e4de93af5dae3a157e852dbdb4ea345c2eb626305a605d4f98" + }, + "rust_output_sha256": "dd887986afcfa9211283cee730efa39cbb0cee844dff4a9f07dfb763ca724334", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "dd887986afcfa9211283cee730efa39cbb0cee844dff4a9f07dfb763ca724334", + "matched_output_lines": 5764046 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "dd887986afcfa9211283cee730efa39cbb0cee844dff4a9f07dfb763ca724334", + "matched_output_lines": 5764046 + } + ], + "scope": "Actual Entity.isFree offsets its AABB, invokes native block/entity/border noCollision and only then section-based containsAnyLiquid over resident ProtoChunk storage. Rust composes registry-bound collision resolution and FluidPresence over the same TerrainChunk storage. Covers all registered states, offsets, context variants, height/chunk boundaries, fluids, missing required chunks and partial query failures. Entity collision lists, border applicability and contexts are controlled; chunk generation, live entity indexing and full playable integration remain pending." +} diff --git a/benchmarks/rust-generation-ticks-2026-10-06/scoped-parity.json b/benchmarks/rust-generation-ticks-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..7cce5eb4e --- /dev/null +++ b/benchmarks/rust-generation-ticks-2026-10-06/scoped-parity.json @@ -0,0 +1,110 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "commands": { + "reset": 32, + "load": 38, + "query": 8610, + "snapshot": 115, + "schedule": 8577, + "dump": 536, + "snapshot_dump": 122, + "promote": 115, + "fail": 244, + "will": 199, + "count": 122, + "unpack": 2, + "level": 31, + "remove": 84 + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGenerationTickOracle.java": "c0b95e75e007c2ff53fde575104bf2e25b6fb65e46d11ad2a2dcae760004fe38", + "tools/test_generation_tick_parity.py": "e200240c24d12ed546e2254e0dea947ea3cf8db8a703e4908a90567250d2fdf1", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-core/examples/generation_tick_fixture.rs": "67a6aca02386a9bddd0198c559d66bbb54b1a8f44bad0e916028cfbc4d3cde97" + }, + "fixtures_sha256": { + ".local/rust-generation-tick-parity/inputs.txt": "bc9332ec147bfde2fe6d5a866deb4f985079c77c206fbbece33d4128ff01146e" + }, + "rust_output_sha256": "9ae4ecba3b9b417ee46f8c152c5c2c23d464064e5cdd537da8892c6728860fd7", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "9ae4ecba3b9b417ee46f8c152c5c2c23d464064e5cdd537da8892c6728860fd7", + "matched_output_lines": 101784 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "9ae4ecba3b9b417ee46f8c152c5c2c23d464064e5cdd537da8892c6728860fd7", + "matched_output_lines": 101784 + } + ], + "scope": "Native ProtoChunkTicks load/schedule deduplication, insertion order, zero delay for scheduled requests, preserved saved delays/priorities, time-independent packing and independent scheduledTicks snapshots. Native WorldGenTickAccess lookup ordering, routing to mixed proto/level containers, lookup failures, false willTickThisTick and zero count without lookups. Proto-to-level promotion and unpacked save behavior, position/type identities, priorities, duplicates, unloaded containers and integer/time extremes are compared. Rust exposes pack as a borrowed immutable slice; mutation of the native returned list is outside the API. Actual block/fluid execution and feature-world scheduling integration remain pending." +} diff --git a/benchmarks/rust-geometry-2026-10-05/scoped-parity.json b/benchmarks/rust-geometry-2026-10-05/scoped-parity.json new file mode 100644 index 000000000..9efcea4a4 --- /dev/null +++ b/benchmarks/rust-geometry-2026-10-05/scoped-parity.json @@ -0,0 +1,73 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "commands": { + "traverse": 8448, + "trig-table": 1, + "rotation": 16000, + "vec": 7256, + "box": 7006, + "block-box": 100, + "grid": 201, + "query": 52500, + "many": 2500, + "motion": 12000, + "join": 5652, + "make-box": 600, + "optimize": 500, + "join-optimized": 500, + "step-motion": 17680, + "block-iterate": 2400, + "box-iterate": 2400, + "sweep": 9022, + "floor-height": 12000 + }, + "inputs_sha256": "95abe82bf9f328e8b51aafb84a3e97954073f743b963a3d2fa4892cc120f49f1", + "rust_output_sha256": "ebb938b5288e05a291b6e1039f286aa7565821f8de46afb1d853d8112c079dd5", + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGeometryOracle.java": "48c233ec1a5684cbd5a9edb5d7972aa4647465045ef298dce14a91de45cc4809", + "tools/test_geometry_parity.py": "38ce169dc520535c217a01705510b71ef3ee81128376640e849f47bc999ef64d", + "tools/test_rust_parity.py": "500652427164c7e067a5eb69310ec81f843d5fe37a7c9d88edd2b1ca6606020a", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "faae2edce8b573fd32fcb4bd1f898be7d700a5b38479439f5bec96df764688fd", + "crates/horizon-core/Cargo.toml": "09243cac4d45e8b4aaed3a6169bf3ee0e1272fdff4298c43c80d5fff0116d01c", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/parity.rs": "7b455f2181862e1430e7387633c146877c2d317c2ea682c1e6fa64345dbc5885", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "acaa0a51a759e1a08d417538e567847a66b8c9ae6a7434872e1621ed210364b1", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random.rs": "2f304dfb580a6bc1b5c51b048a2fa2a57f73c5f28f5eb2447f925bf138513389", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "ebb938b5288e05a291b6e1039f286aa7565821f8de46afb1d853d8112c079dd5", + "matched_output_lines": 1320187 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "ebb938b5288e05a291b6e1039f286aa7565821f8de46afb1d853d8112c079dd5", + "matched_output_lines": 1320187 + } + ], + "scope": "Selected Vec3/AABB operations, sine table entries, quantized trig, rotations and look directions; finite block-ray traversal; bounded inclusive/directional block iteration and finite swept-block visits with step indices; immutable cube/array voxel-grid bounds, column minima/maxima, greedy boxes, collide, ray hits, closest points and cell lookup; lazy floor-height selection; box quantization, optimized/unoptimized Boolean joins, alias identity and joinIsNotEmpty; Entity.collideWithShapes, candidate step heights and Entity.collide step-up decisions/query bounds with caller-controlled block/entity/border shape lists. No live entities, actual world shape selection, grounding/velocity side effects, fluids or block behavior." +} diff --git a/benchmarks/rust-geometry-2026-10-06/scoped-parity.json b/benchmarks/rust-geometry-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..1dbed368b --- /dev/null +++ b/benchmarks/rust-geometry-2026-10-06/scoped-parity.json @@ -0,0 +1,110 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "commands": { + "traverse": 8448, + "trig-table": 1, + "rotation": 16000, + "vec": 7256, + "box": 7006, + "block-box": 100, + "grid": 201, + "query": 52500, + "many": 2500, + "motion": 12000, + "join": 5652, + "make-box": 600, + "optimize": 500, + "join-optimized": 500, + "step-motion": 17680, + "block-iterate": 2400, + "box-iterate": 2400, + "sweep": 9022, + "floor-height": 12000 + }, + "inputs_sha256": "95abe82bf9f328e8b51aafb84a3e97954073f743b963a3d2fa4892cc120f49f1", + "rust_output_sha256": "ebb938b5288e05a291b6e1039f286aa7565821f8de46afb1d853d8112c079dd5", + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGeometryOracle.java": "48c233ec1a5684cbd5a9edb5d7972aa4647465045ef298dce14a91de45cc4809", + "tools/test_geometry_parity.py": "38ce169dc520535c217a01705510b71ef3ee81128376640e849f47bc999ef64d", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "ebb938b5288e05a291b6e1039f286aa7565821f8de46afb1d853d8112c079dd5", + "matched_output_lines": 1320187 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "ebb938b5288e05a291b6e1039f286aa7565821f8de46afb1d853d8112c079dd5", + "matched_output_lines": 1320187 + } + ], + "scope": "Selected Vec3/AABB operations, sine table entries, quantized trig, rotations and look directions; finite block-ray traversal; bounded inclusive/directional block iteration and finite swept-block visits with step indices; immutable cube/array voxel-grid bounds, column minima/maxima, greedy boxes, collide, ray hits, closest points and cell lookup; lazy floor-height selection; box quantization, optimized/unoptimized Boolean joins, alias identity and joinIsNotEmpty; Entity.collideWithShapes, candidate step heights and Entity.collide step-up decisions/query bounds with caller-controlled block/entity/border shape lists. No live entities, actual world shape selection, grounding/velocity side effects, fluids or block behavior." +} diff --git a/benchmarks/rust-ground-support-2026-10-07/scan-regression.json b/benchmarks/rust-ground-support-2026-10-07/scan-regression.json new file mode 100644 index 000000000..42bde44e1 --- /dev/null +++ b/benchmarks/rust-ground-support-2026-10-07/scan-regression.json @@ -0,0 +1,211 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 4176, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockCollisionScanOracle.java": "7334a1f96bcf04cdf24e52424d2d805af2303da681705c2ee3235f74c3850b02", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_block_collision_scan_parity.py": "5289ba6c555367d4dbfe7cbf8e577705c16a8426dfcc431c787aeed3e513970d", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "31abb34c77ebe15f1a00c4480178f6eefea861fc4f395cbeeeea15d9861af7b6", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "8ac9e90fe899855036658afd862ff20c4dcd15d1bd3f92a763c4795fecf0549f", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/block_collision_scan_fixture.rs": "5dfc5b7e156481ac92c3daf8093272171e8fc6cb1970ca7879cd22f7c7b4aaef" + }, + "fixtures_sha256": { + ".local/rust-block-collision-scan-parity/inputs.txt": "d87e1a985430aab7a9fd77e6f3a70e4810d19241c74a9fe8c324348d5c0737dc" + }, + "rust_output_sha256": "f975369ad065b5417dbeacbfa554fc3f27ddaa4f2e634e57f5380e070b355d72", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "f975369ad065b5417dbeacbfa554fc3f27ddaa4f2e634e57f5380e070b355d72", + "matched_output_lines": 517820 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "f975369ad065b5417dbeacbfa554fc3f27ddaa4f2e634e57f5380e070b355d72", + "matched_output_lines": 517820 + } + ], + "scope": "Actual BlockCollisions cursor and selection algorithm over controlled block metadata, chunk providers and context shapes. Compares ordered chunk/state/suffocation/shape calls, missing-chunk retries, cached chunk reuse, face/edge/corner filtering, canonical full-block versus equal noncanonical shape behavior, exact emitted shape data, early consumer termination and injected provider failures. Finite bounded scans include thin/zero-size boxes, chunk crossings and wrapped integer positions. Registry-specific metadata/shape dispatch, live chunk loading and entity movement are separate integration work; unsupported cursor volumes and caller budgets use typed Rust errors." +} diff --git a/benchmarks/rust-ground-support-2026-10-07/scoped-parity.json b/benchmarks/rust-ground-support-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..2bc36cba6 --- /dev/null +++ b/benchmarks/rust-ground-support-2026-10-07/scoped-parity.json @@ -0,0 +1,241 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": { + "selection": 2799, + "state": 11216 + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockCollisionScanOracle.java": "7334a1f96bcf04cdf24e52424d2d805af2303da681705c2ee3235f74c3850b02", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGroundStateOracle.java": "b66f4ea0c2a8f4fea73499841a4de41d3fa42de45ad699c6cef47be472d0e558", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_ground_support_parity.py": "dc61b7e0a187bdce428d4105dcc30b2c9d5a2c4cba07929130ec79644dc825fd", + "tools/test_block_collision_scan_parity.py": "5289ba6c555367d4dbfe7cbf8e577705c16a8426dfcc431c787aeed3e513970d", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "31abb34c77ebe15f1a00c4480178f6eefea861fc4f395cbeeeea15d9861af7b6", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "8ac9e90fe899855036658afd862ff20c4dcd15d1bd3f92a763c4795fecf0549f", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/block_collision_scan_fixture.rs": "5dfc5b7e156481ac92c3daf8093272171e8fc6cb1970ca7879cd22f7c7b4aaef", + "crates/horizon-world/examples/ground_state_fixture.rs": "74d55848842ea561a54226e302334c71598b61037877a729698c0f1fab1a72a9" + }, + "fixtures_sha256": { + ".local/rust-ground-support-parity/selection/inputs.txt": "75d3cfe0b18dcd520fd304e4c98f626d0c60eb2159300d13480f7f0efbec3ebd", + ".local/rust-ground-support-parity/state/inputs.txt": "e1c76cc6ad45610b1f7b1e2e22036a2d47783f6da58b85f80361bc34256aa434" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "results": [ + { + "group": "selection", + "matched_output_lines": 342709, + "output_sha256": "5b9cd5243a8284273de5f564284c7ce4669cd01d74eb5d58737afa77b8e4b283", + "rust_output_sha256": "5b9cd5243a8284273de5f564284c7ce4669cd01d74eb5d58737afa77b8e4b283" + }, + { + "group": "state", + "matched_output_lines": 151444, + "output_sha256": "fedac9d5408449d6a8fc400ed2625ad9a800f715ddcdb93ead13243297e3b497", + "rust_output_sha256": "fedac9d5408449d6a8fc400ed2625ad9a800f715ddcdb93ead13243297e3b497" + } + ] + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "results": [ + { + "group": "selection", + "matched_output_lines": 342709, + "output_sha256": "5b9cd5243a8284273de5f564284c7ce4669cd01d74eb5d58737afa77b8e4b283", + "rust_output_sha256": "5b9cd5243a8284273de5f564284c7ce4669cd01d74eb5d58737afa77b8e4b283" + }, + { + "group": "state", + "matched_output_lines": 151444, + "output_sha256": "fedac9d5408449d6a8fc400ed2625ad9a800f715ddcdb93ead13243297e3b497", + "rust_output_sha256": "fedac9d5408449d6a8fc400ed2625ad9a800f715ddcdb93ead13243297e3b497" + } + ] + } + ], + "scope": "Actual CollisionGetter.findSupportingBlock over controlled collision metadata/shapes/providers, plus Entity.checkSupportingBlock and both setOnGroundWithMovement overloads over sequential support-query snapshots. Selection compares nearest block-center distance, ties, full scan order and failures. Ground-state checks compare thin foot bounds, previous-horizontal-footprint fallback, null movement, retained/cleared support, flags and partial state on errors across mutation sequences. Registry/context scanning has separate integration coverage; live player grounding, movement lifecycle and gameplay remain pending." +} diff --git a/benchmarks/rust-height-provider-2026-10-06/scoped-parity.json b/benchmarks/rust-height-provider-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..5419d587f --- /dev/null +++ b/benchmarks/rust-height-provider-2026-10-06/scoped-parity.json @@ -0,0 +1,152 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 9030, + "definitions": 301, + "samples_per_valid_fixture": 32, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightProviderOracle.java": "fa366ca1ed396353f8ec4a79c553f23aa9d0fc9bc85275427552e98cd27a777e", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAnchorOracle.java": "226628d98b89aadbdd374936575d033945e7064a900dbb050c662204dbc7e119", + "tools/test_height_provider_parity.py": "06685252f1e2ffbe6988759655f96b95f5895353dd43b774db9908bc59365fe2", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_predicate.rs": "dd8cbda2ec110444950f0b31bf4e088897eab0994674a91568c7b063f8f16210", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_graph.rs": "5dfb83b9f97eb24b386e3514aaac957b314461b32d59e1fdb6dcac7ca0a32e1b", + "crates/horizon-world/src/worldgen/feature_region.rs": "4a95a30c0987d97e671f84380e13ddea070ad81f996baa65b2a06c4d892971c7", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/placement/chain.rs": "1b976aa4dd2516468196d0af3451e3fdd037493a14d269f54ebdd7254055e05e", + "crates/horizon-world/src/worldgen/placement/context.rs": "b36dfd9297896e62770f2085cf934fc08ebd4c030ecc7ae17d864e819a113201", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "68ecf36954fea5705436d486e9be93836933fd56779022afeb881a0399d6a674", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "f18a6c0e66cadec431d2e3154ad70d96b3be623e675f939d4419858f2cce92ab", + "crates/horizon-world/examples/height_provider_fixture.rs": "d8a314edf7c3c90483f86aaa3786f41192c957480a751353fbbf6e9dbc8cad3f" + }, + "fixtures_sha256": { + ".local/rust-height-provider-parity/inputs.txt": "03bcc47709132ca5afe9b4fd1b6c9b1ba2bd238270ddfed90fd284f39817e143" + }, + "rust_output_sha256": "bb3677402722cf44c4d4572e8b0a915774e15a2d04928171ea69b194603c44fb", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "bb3677402722cf44c4d4572e8b0a915774e15a2d04928171ea69b194603c44fb", + "matched_output_lines": 507660 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "bb3677402722cf44c4d4572e8b0a915774e15a2d04928171ea69b194603c44fb", + "matched_output_lines": 507660 + } + ], + "scope": "Actual HeightProvider.CODEC decoding and sampled heights with interleaved nextLong values, using actual WorldGenerationContext and all four vertical-anchor kinds. Covers constant, uniform, biased-to-bottom, very-biased-to-bottom trapezoid and weighted-list providers, both random modes, empty/equal ranges, inner/plateau defaults and bounds, numeric narrowing, relative coordinate overflow, malformed fields and anchor-versus-dispatch preference. Warning logs are excluded. Weighted lists include zero weights, singleton draws, nested providers, 63/64/65 weight totals, maximum/overflow totals and malformed entries; native constructor rejections count as decode errors. Encoding, cave/canyon paths and complete generation remain outside this scope." +} diff --git a/benchmarks/rust-heightmap-2026-10-06/scoped-parity.json b/benchmarks/rust-heightmap-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..83cda8c9d --- /dev/null +++ b/benchmarks/rust-heightmap-2026-10-06/scoped-parity.json @@ -0,0 +1,126 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "block_tag_files": 300, + "fixtures": 100, + "operation_counts": { + "set": 86806, + "query": 54306, + "dump": 474, + "prime": 516, + "raw": 378, + "update": 42 + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_heightmap_parity.py": "d8c0e68d51fa102c518030c816ce9f41d05c7d6d65e2d484b2e57c253b407510", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/test_worldgen_parity.py": "3574ac73f81e3a6606ac9d3c16fa2c50b57a37b89be52e7d5448e7045c41a9ee", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "69f89566a78456c29caaa39dacedfe711ca59e49b78f64e68b0414fb6a73d8fc", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "3968e2a337a6a23226c485057c79359e66df16683f00fb4ebc9fabb03910a015", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry.rs": "f46065659e60eb5e84ad69b9f3b5e94dc87ee19de16408817e26f23d16b6c7e7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "134cf93b53a40fb1ed0e0170c90316c80e270773b2968c63dc3f9cef2c941bff", + "crates/horizon-world/src/worldgen.rs": "b89dd4a9de02caf6bce457304a105ffbc0f0f220f8647c095852a45a1bf292bb", + "crates/horizon-world/examples/heightmap_fixture.rs": "eddd4c15620eebfc5bd919d3b19b0b2fd69d6fd31a19d8c512121aa297efa848" + }, + "fixtures_sha256": { + ".local/rust-heightmap-parity/inputs.txt": "bf53719ac137e1ebbf7b874bd887e3208516e9938372c00d8f3d2c969297ec22", + ".local/rust-heightmap-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-heightmap-parity/facts-client.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0", + ".local/rust-heightmap-parity/facts-server.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0" + }, + "rust_output_sha256": "1268526add13ad33c0db95dc70df1e37fb12d35d5c95ce82fbb2bcef2d830a9d", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "1268526add13ad33c0db95dc70df1e37fb12d35d5c95ce82fbb2bcef2d830a9d", + "matched_output_lines": 1671668 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "1268526add13ad33c0db95dc70df1e37fb12d35d5c95ce82fbb2bcef2d830a9d", + "matched_output_lines": 1671668 + } + ], + "scope": "Six heightmap types, client/persistence flags and predicates for every pinned block state. Air/fluid facts are imported independently from both authenticated JARs and required to agree; block-tag membership is resolved in Rust from bundled resources. State behavioral methods are not ported by that import. Actual vanilla ProtoChunk and Heightmap APIs compare insertion/removal, downward rescans, repeated priming, empty-column retention, raw packed words including padding/unused slots, invalid-length fallback, wrapped column indexing, height queries, errors and selected exact block-read traces. Positive aligned vertical ranges are bounded to the NoiseSettings codec domain; arbitrary height accessors, chunk lifecycle integration, complete terrain/gameplay and rendering remain pending." +} diff --git a/benchmarks/rust-interaction-shape-2026-10-07/scoped-parity.json b/benchmarks/rust-interaction-shape-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..c665ad183 --- /dev/null +++ b/benchmarks/rust-interaction-shape-2026-10-07/scoped-parity.json @@ -0,0 +1,227 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 152892, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInteractionShapeOracle.java": "8f55d6fb9152decf0c76dc417ce6b5b10ac4bdfc3d00aeee514c7b8f967fb1f1", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "tools/test_interaction_shape_parity.py": "f8939b6a9405724d75c799f4e35efc3746d4067300ffc9215f61230219c2d507", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "d7cc985e4c6d4e6319c69790f1f3b21cb139eaf08ddffc088326f75b4b87345e", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/interaction_shape_fixture.rs": "88a27887eab518cba1ce24eebef7d72b3723cd066a798e88ff1a05e3ebbd64ca" + }, + "fixtures_sha256": { + ".local/rust-interaction-shape-parity/inputs.txt": "b9d64891c8f3acd08fa9d8e15748c47a303f839775a9380f6894934b0b0fb95a", + ".local/rust-interaction-shape-parity/info.json": "3866ea4f5e10ed265bc86f883169c7f1100fefd915433047e0d5d17d9b7f6030", + ".local/rust-interaction-shape-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-interaction-shape-parity/interaction-shapes.nbt": "2cd47ffc580026355ee763ab6fca6bda8dc131cdabeab763113aeb33c61f161e" + }, + "rust_output_sha256": "be473875e8dff8167fce4f5c5a8737e70d4d81360172492b0e7762ae76aa4b99", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "be473875e8dff8167fce4f5c5a8737e70d4d81360172492b0e7762ae76aa4b99", + "matched_output_lines": 188682 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "be473875e8dff8167fce4f5c5a8737e70d4d81360172492b0e7762ae76aa4b99", + "matched_output_lines": 188682 + } + ], + "scope": "Complete registered interaction shape table with audited native implementation owners: default empty, cauldron, composter, hopper and scaffolding. Compares every state geometry, canonical/alias identity and actual BlockGetter.clipWithInteractionOverride with supplied collision shapes at multiple positions. World queries are rejected during native interaction-shape lookup. Imports reject wrong table kind, incomplete mapping, missing canonical identities, foreign state ordering and invalid state IDs. Outline/visual shape binding, complete ray-world binding and gameplay remain separate work." +} diff --git a/benchmarks/rust-inventory-pickup-2026-10-07/scoped-parity.json b/benchmarks/rust-inventory-pickup-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..3e7502659 --- /dev/null +++ b/benchmarks/rust-inventory-pickup-2026-10-07/scoped-parity.json @@ -0,0 +1,274 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 2060, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryPickupOracle.java": "13a12385c05ccc177f66534e0194b0d5ccd9a58dcc19c002257754b715eb0e91", + "tools/test_inventory_pickup_parity.py": "b8153c3dc4c6ef7cc7f14782ace862356b3a33dd6a9bb8eb07790df3f08e0772", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "1a83604c256a51898b59b0087c2378282bcebe7883add2c4634dc7f9183d6e49", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_use.rs": "1d0a3afa61b60d356e81a063da79ec6cd38730315976640a591325fc4c8ab98c", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "f9b29f42a528493d0d2521110d4f6e0bc89af8f579d539648cb7c3a9e68e31cd", + "crates/horizon-world/src/item_use_start.rs": "9996a9b90c313925cd90e78c02880f2a1d2ae65aef53f4ce081578a9dcd10c62", + "crates/horizon-world/src/lib.rs": "abba94d6a397e0a4055d7b238edc042494836247e0bd1e355f42dbda61f825ac", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/inventory_pickup_fixture.rs": "ba554d971a0096e542b1065f7a6de3f0899702ea711344f68d504838e0e1b1d0" + }, + "fixtures_sha256": { + ".local/rust-inventory-pickup-parity/inputs.txt": "3f431461bca23ec28749376f53f509fbc78d74eeca0ceb3b64332085aac4d718" + }, + "rust_output_sha256": "4f48394f182e327ac19a7b69d32a97048d7eb9f6c7d2cfaab492ddd1aba64116", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "4f48394f182e327ac19a7b69d32a97048d7eb9f6c7d2cfaab492ddd1aba64116", + "matched_output_lines": 424282 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "4f48394f182e327ac19a7b69d32a97048d7eb9f6c7d2cfaab492ddd1aba64116", + "matched_output_lines": 424282 + } + ], + "scope": "Actual Inventory.add and getSlotWithRemainingSpace over stored ItemStack and shared equipment. Traces cover selected/offhand/ordinary slot search, component-sensitive stacking, damaged copy-and-clear, source aliases, pop time, creative fallback and virtual size/material callbacks with mutations/failures. Native crash-report wrapping is represented as an error without rendering its diagnostic text. Item entity pickup events, networking, menus, arbitrary method overrides, full item components and complete gameplay integration remain pending." +} diff --git a/benchmarks/rust-inventory-tick-2026-10-07/scoped-parity.json b/benchmarks/rust-inventory-tick-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..bdfa02202 --- /dev/null +++ b/benchmarks/rust-inventory-tick-2026-10-07/scoped-parity.json @@ -0,0 +1,275 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 4464, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryTickOracle.java": "d816bbd310ab1e28c09e8a3952aed7b16363e02a15c46f429591fcb78fd59dad", + "tools/test_inventory_tick_parity.py": "2297ac921c8167255d9b700f246e02ba1a030571d42600e2b78aaa0c7b3d35e3", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "1a83604c256a51898b59b0087c2378282bcebe7883add2c4634dc7f9183d6e49", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_use.rs": "1d0a3afa61b60d356e81a063da79ec6cd38730315976640a591325fc4c8ab98c", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "f9b29f42a528493d0d2521110d4f6e0bc89af8f579d539648cb7c3a9e68e31cd", + "crates/horizon-world/src/item_use_start.rs": "9996a9b90c313925cd90e78c02880f2a1d2ae65aef53f4ce081578a9dcd10c62", + "crates/horizon-world/src/lib.rs": "e211ca0595ae93b335b19f621b6db600f622191fd92d09c1e7b8588124a973fa", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/inventory_tick_fixture.rs": "0011f15f2015e391feb3c8d027f1a629005d467d4c2a6555618fc343532d6e3b" + }, + "fixtures_sha256": { + ".local/rust-inventory-tick-parity/inputs.txt": "81d8c628cb7854f5aa206937b5ddc789fb11b0eb8e8d8e8362b21987b4301b2a" + }, + "rust_output_sha256": "2f11b5e52df3fb3ef4952e75a3ad3961dbbc3c9c07472c4bd92cbac30a10382f", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "2f11b5e52df3fb3ef4952e75a3ad3961dbbc3c9c07472c4bd92cbac30a10382f", + "matched_output_lines": 195957 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "2f11b5e52df3fb3ef4952e75a3ad3961dbbc3c9c07472c4bd92cbac30a10382f", + "matched_output_lines": 195957 + } + ], + "scope": "Actual Inventory.tick, EntityEquipment.tick and ItemStack.inventoryTick composed over shared stacks. Custom item handlers trace server dispatch; level/item callbacks mutate counts, pop time, selection and future slot/enum-map entries or fail. Client JAR uses an actual allocated ClientLevel for the non-server branch; dedicated server uses null because ClientLevel is absent. Concrete registered item tick effects, arbitrary getItem overrides, whole entity/world ticks and complete gameplay integration remain pending." +} diff --git a/benchmarks/rust-inventory-use-2026-10-07/scoped-parity.json b/benchmarks/rust-inventory-use-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..3805afb96 --- /dev/null +++ b/benchmarks/rust-inventory-use-2026-10-07/scoped-parity.json @@ -0,0 +1,279 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 10920, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryUseOracle.java": "7f13ce494c879e66b97d094f53b17c401cc9aca50e6b6c6facce8c52a853974f", + "tools/test_inventory_use_parity.py": "72102046260fae6b079b170a7ff14b481ec2b45edc604b3e32c295bc3ec4f562", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "c7aa789fab78147b45119eff5265dd67828b927edb6673a498f861d2408a6a48", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/lib.rs": "f0328adcaf4f61835ab48344be73941c65927c3f08c0adb0012a8abef7cb730b", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/inventory_use_fixture.rs": "454729db9a51afa8c9fd6811fd86bbd725a1fb8dbd76466d4986c90cad8abb78" + }, + "fixtures_sha256": { + ".local/rust-inventory-use-parity/inputs.txt": "35b22bede9b7fd6c5d755da374452f8aa419a24fecbf43ae45839ba057792cf7" + }, + "rust_output_sha256": "5ca5dc4d199c0dec5901b7d5c48bba4d6f1654781a0a3324c3ea2435ac61abd2", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "5ca5dc4d199c0dec5901b7d5c48bba4d6f1654781a0a3324c3ea2435ac61abd2", + "matched_output_lines": 349310 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "5ca5dc4d199c0dec5901b7d5c48bba4d6f1654781a0a3324c3ea2435ac61abd2", + "matched_output_lines": 349310 + } + ], + "scope": "Actual inherited LivingEntity use tick/update/completion/release/stop composed with real Player Inventory, PlayerEquipment hand access and byte SynchedEntityData flags. Traces compare held/active reference identity, live count mutations, selected/offhand writes, onEquipItem callbacks, synchronized value/dirty prefixes, finish vibration and kinetic-map presence. Custom item/level effects remain controlled; starting use, complete onEquipItem effects, consumables, kinetic combat, remainders/cooldowns and complete gameplay integration remain pending." +} diff --git a/benchmarks/rust-inventory-use-start-2026-10-07/scoped-parity.json b/benchmarks/rust-inventory-use-start-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..16e35f18c --- /dev/null +++ b/benchmarks/rust-inventory-use-start-2026-10-07/scoped-parity.json @@ -0,0 +1,279 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 9506, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryUseStartOracle.java": "e88d7949b4a6c67dc5a9ad3ad7ff3f59e5de418867339186f3f711ea33002e08", + "tools/test_inventory_use_start_parity.py": "64537b0a44f6fe390a19313d08e59314a3565fa2f01187cfa6ce722adb278538", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/lib.rs": "f0328adcaf4f61835ab48344be73941c65927c3f08c0adb0012a8abef7cb730b", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/inventory_use_start_fixture.rs": "68b5bdf071b7238999cd58981f2789e84e05bb67cbdb2fba8cfc8eba2fa60721" + }, + "fixtures_sha256": { + ".local/rust-inventory-use-start-parity/inputs.txt": "30dcb1de98fa473de4f6be5652dd7b63d29159606351fb209cb1b91bb6e4d6e8" + }, + "rust_output_sha256": "d0ac036e8f86d181e67f6202ec6eb906e685fe4a879dea78e84a5e73dab2b4fb", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "d0ac036e8f86d181e67f6202ec6eb906e685fe4a879dea78e84a5e73dab2b4fb", + "matched_output_lines": 223004 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "d0ac036e8f86d181e67f6202ec6eb906e685fe4a879dea78e84a5e73dab2b4fb", + "matched_output_lines": 223004 + } + ], + "scope": "Actual LivingEntity.startUsingItem composed with real Inventory/PlayerEquipment, synchronized flag storage and inherited observer reactions. Native ClientboundSetEquipmentPacket construction reaches a controlled ServerChunkCache sender; item/level/ID callbacks expose captured arguments and mutation/failure prefixes. Includes start vibration and clearing a populated kinetic-enemy map. Rust binds the existing start algorithm to inventory use services and shared stack references. Packet encoding/delivery, complete enemy-map/kinetic combat, full item/equip effects and complete gameplay integration remain pending." +} diff --git a/benchmarks/rust-item-after-use-2026-10-07/remainder-regression.json b/benchmarks/rust-item-after-use-2026-10-07/remainder-regression.json new file mode 100644 index 000000000..74a67f0f4 --- /dev/null +++ b/benchmarks/rust-item-after-use-2026-10-07/remainder-regression.json @@ -0,0 +1,286 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 5216, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaUseRemainderOracle.java": "84482b5c48c6c2404f8f43df073bd26e54de70fd12be623399cbc8d223026278", + "tools/test_use_remainder_parity.py": "5d0bd33d604a841ab880cc301c3b9496da667b3d5fdca89c38ab45dc0d7cab22", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "a3ad79b1a4ea171726f07b1fc6e2b78f224157e8f0d53dd2ce96e93ccd2d38dd", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "6bd97d87f0e3eaad440162145a1515b9a0b7cfb85cb0ea337874ed9745f8dd45", + "crates/horizon-world/src/lib.rs": "a818abc673c7f03fdf37fa677c513f70e3fa0ea740787194a0fb1ba5e6ad9540", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/use_remainder_fixture.rs": "cc13520801fa1c3bb2525d57907e30ee492263b2bc156308b92ffc3bfd496630" + }, + "fixtures_sha256": { + ".local/rust-use-remainder-parity/inputs.txt": "f3be368b63f3d035783da8cfc6a22a9ff02188da5ac68f109460d2188477f095" + }, + "rust_output_sha256": "8639a449feb82e464bc3f42dad86bf372263976ad5e133bf009ce624700fc2d4", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "8639a449feb82e464bc3f42dad86bf372263976ad5e133bf009ce624700fc2d4", + "matched_output_lines": 353264 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "8639a449feb82e464bc3f42dad86bf372263976ad5e133bf009ce624700fc2d4", + "matched_output_lines": 353264 + } + ], + "scope": "Actual UseRemainder.convertIntoRemainder composed with native ItemStackTemplate creation/validation and shared ItemStack references. Covers finite/infinite materials, visible count comparisons, exhausted and empty-but-distinct inputs, invalid templates returning canonical EMPTY, extra-item callbacks with mutations/failures, and captured-reference identity. Rust uses its item-template factory with scalar validation; contained component validation, concrete actor inventory insertion/drop, item finish side effects and complete gameplay integration remain pending." +} diff --git a/benchmarks/rust-item-after-use-2026-10-07/scoped-parity.json b/benchmarks/rust-item-after-use-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..9558230af --- /dev/null +++ b/benchmarks/rust-item-after-use-2026-10-07/scoped-parity.json @@ -0,0 +1,286 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 6516, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemAfterUseOracle.java": "dc769dbd93422a059e5900dfbd40834916559605b2d5bcc84c7e8b76944b2659", + "tools/test_item_after_use_parity.py": "456ee92c86df61d31105150f1ebb88ec5b485404a342dcbd900dc3e967c5d022", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "a3ad79b1a4ea171726f07b1fc6e2b78f224157e8f0d53dd2ce96e93ccd2d38dd", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "6bd97d87f0e3eaad440162145a1515b9a0b7cfb85cb0ea337874ed9745f8dd45", + "crates/horizon-world/src/lib.rs": "a818abc673c7f03fdf37fa677c513f70e3fa0ea740787194a0fb1ba5e6ad9540", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/item_after_use_fixture.rs": "9235672b9233a6db468dd6416257cad309d9306be2b1351e46c646ace266844c" + }, + "fixtures_sha256": { + ".local/rust-item-after-use-parity/inputs.txt": "928d97004ef22322eb75eceee90d74331b59c19b39ca9a63513d14a8b3c0a053" + }, + "rust_output_sha256": "cdfc2475c464d09c3e678ccd0c5558d33544db985dc623231d3d4a9701d0e853", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "cdfc2475c464d09c3e678ccd0c5558d33544db985dc623231d3d4a9701d0e853", + "matched_output_lines": 211804 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "cdfc2475c464d09c3e678ccd0c5558d33544db985dc623231d3d4a9701d0e853", + "matched_output_lines": 211804 + } + ], + "scope": "Actual ItemStack.finishUsingItem composes a controlled item handler with real before-use copying, UseRemainder conversion, ItemStackTemplate validation and UseCooldown/ItemCooldowns. Captured component/count values and shared references are compared through finite-material, extra-item, cooldown-manager, add and start callbacks with mutations/failures. Includes ordinary registered result items, empty visibility, current template prototypes and copied original stacks reaching cooldown grouping. Rust composes its stack, template, remainder and cooldown modules. Item handlers and actor extra-item delivery are controlled; contained schemas, concrete consumable behavior, full inventory-use integration and complete gameplay remain pending." +} diff --git a/benchmarks/rust-item-blocking-2026-10-07/scoped-parity.json b/benchmarks/rust-item-blocking-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..d833adda9 --- /dev/null +++ b/benchmarks/rust-item-blocking-2026-10-07/scoped-parity.json @@ -0,0 +1,261 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 12058, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemBlockingOracle.java": "fbac19e0b43c505b92ed0ea3a9e05345e946db1013a1349104a1dc1584e15658", + "tools/test_item_blocking_parity.py": "bf08f663ddef4d75aaa4d5747721cab0105344f2bc659cd94c3c1c436a8b5037", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/lib.rs": "7e35fc2dd1a25f6c1cc49e7acad4c3e7b3cbd02086f7a8590cc2c171009b3c7c", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/item_blocking_fixture.rs": "13b8197d2ad51b495b487d3903bc1d0cec1d6c0809b1e0d5ba5731e3d366b4c1" + }, + "fixtures_sha256": { + ".local/rust-item-blocking-parity/inputs.txt": "80405b85b3b9d47bda0c03e7c2fb68ed218ce0aeb081b68bebe4324b72719444" + }, + "rust_output_sha256": "91d6b2dccc5bcd2606d3daef5bda4a219830ae06448e1d7fcf1b20af64ca8b73", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "91d6b2dccc5bcd2606d3daef5bda4a219830ae06448e1d7fcf1b20af64ca8b73", + "matched_output_lines": 87930 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "91d6b2dccc5bcd2606d3daef5bda4a219830ae06448e1d7fcf1b20af64ca8b73", + "matched_output_lines": 87930 + } + ], + "scope": "Actual LivingEntity.applyItemBlocking on base and ServerPlayer receivers, using native BlocksAttacks reductions/holder sets and actual stat/durability dispatch on undamageable stacks. Tests bypass/piercing, source direction, component/item capture across mutations, client/stat guards, repeated direct-entity lookup, melee response and callback failures. Actual damageable-item mutation, blocking-item eligibility/timing, component codecs and full combat/world integration remain pending." +} diff --git a/benchmarks/rust-item-cooldowns-2026-10-07/scoped-parity.json b/benchmarks/rust-item-cooldowns-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..dcd0027e3 --- /dev/null +++ b/benchmarks/rust-item-cooldowns-2026-10-07/scoped-parity.json @@ -0,0 +1,285 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 4473, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemCooldownsOracle.java": "3aa94c31fd3019868e66c8139a500c0cd44ad889066da2780daa9ebcb2ccabbf", + "tools/test_item_cooldowns_parity.py": "f29d8153125f3052188c96644a49303a2641d66c02c80c34b82109340a13453b", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "a3ad79b1a4ea171726f07b1fc6e2b78f224157e8f0d53dd2ce96e93ccd2d38dd", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "d9ab7958a55c695142403195244b14946caa2bf527bcbb4193b1372cd748e9a8", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "6bd97d87f0e3eaad440162145a1515b9a0b7cfb85cb0ea337874ed9745f8dd45", + "crates/horizon-world/src/lib.rs": "7854d1e0b59dbc7228d85091e75978d68554ea18f9814976ca46bdb0c46c4419", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "50f0ac128bfcc5c9b2a43bfbb4f0d46f63693bea3bdcb64b15318a3dec28b9d5", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/item_cooldowns_fixture.rs": "e70b27fcf61338a8aec74cf9dc3705bb317f61ba195bd00e11e149dc1e091c64" + }, + "fixtures_sha256": { + ".local/rust-item-cooldowns-parity/inputs.txt": "01db9dd45322a3a6b57a29c71767c3d3b7eda81452eeac9012fa78af39294178" + }, + "rust_output_sha256": "b3afab5c667de5c8f06a810f5b1d1bc8cd4218ee05b0e74f1b46ed1ec0770561", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "b3afab5c667de5c8f06a810f5b1d1bc8cd4218ee05b0e74f1b46ed1ec0770561", + "matched_output_lines": 167906 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "b3afab5c667de5c8f06a810f5b1d1bc8cd4218ee05b0e74f1b46ed1ec0770561", + "matched_output_lines": 167906 + } + ], + "scope": "Actual ItemCooldowns storage/add/remove/tick/percentage and default stack group resolution, plus UseCooldown ticks/apply through real Player class selection and controlled getCooldowns/start/end callbacks. Includes Identifier hashing/path-first collision ordering, tree-bin expiry, wrapping times, float bits, empty component visibility, callback mutation/failure and nested ticks. Rust composes checked collection iteration with shared stack components. Complete finish-use integration, server cooldown packets and full gameplay remain pending." +} diff --git a/benchmarks/rust-item-durability-2026-10-07/scoped-parity.json b/benchmarks/rust-item-durability-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..8d22d3349 --- /dev/null +++ b/benchmarks/rust-item-durability-2026-10-07/scoped-parity.json @@ -0,0 +1,263 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 30052, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemDurabilityOracle.java": "0e548d6b362588f73cbc1c2f24bdd5408d36e82db716af4a95f82aad265ae0ea", + "tools/test_item_durability_parity.py": "4f00e1eb1b72bca43eeffff842d98d7008279c6a9613d1dcc771bfe62d6c26fe", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "6a67fd660d771c59ffa9f4aa3225a25b56da31ea1079ca2efa4a915be6464179", + "crates/horizon-world/src/item_use.rs": "1d0a3afa61b60d356e81a063da79ec6cd38730315976640a591325fc4c8ab98c", + "crates/horizon-world/src/lib.rs": "f985d2e8f6f8710ebd815a6b6120d5a2286eb7cd4fb165b777d1df264c9f9829", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/item_durability_fixture.rs": "a077112aae50746212280ced771735a90f7d68b2a04d25db1b993a4737239d61" + }, + "fixtures_sha256": { + ".local/rust-item-durability-parity/inputs.txt": "9d9f7f0a6f05230baf2538b26ee3f02b39f018b31d35801e2af8ccbfc1503eca" + }, + "rust_output_sha256": "0ed852826d375dd35268608045756abcb6e152cef9840ef464b3f00254da4675", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "0ed852826d375dd35268608045756abcb6e152cef9840ef464b3f00254da4675", + "matched_output_lines": 81762 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "0ed852826d375dd35268608045756abcb6e152cef9840ef464b3f00254da4675", + "matched_output_lines": 81762 + } + ], + "scope": "Actual unenchanted ItemStack damage predicates, clamped reads/writes, integer-wrapping count changes, server-level hurtAndBreak and ServerPlayer hurtWithoutBreaking. Real component maps cover absent fields, empty/air stacks, unbreakable and invalid numeric values; callbacks mutate storage and inject failures at infinite-material, empty-listener advancement and break dispatch boundaries. Covers the positive integer-to-float enchantment pipeline with no enchantments. Complete component storage/codecs, enchantment effects, entity equipment break handling and combat/world integration remain pending." +} diff --git a/benchmarks/rust-item-particles-2026-10-07/scoped-parity.json b/benchmarks/rust-item-particles-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..a988a4014 --- /dev/null +++ b/benchmarks/rust-item-particles-2026-10-07/scoped-parity.json @@ -0,0 +1,289 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 5749, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemParticlesOracle.java": "3384023efa858c3740a00f7fa66bf9033f5911e82ee194b53b76dc1c3ed83a2b", + "tools/test_item_particles_parity.py": "3db3c1cab165776e6990ba6de4458fdb6af28a18c2dcb9a466e97183b2115ec2", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "a3ad79b1a4ea171726f07b1fc6e2b78f224157e8f0d53dd2ce96e93ccd2d38dd", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "6bd97d87f0e3eaad440162145a1515b9a0b7cfb85cb0ea337874ed9745f8dd45", + "crates/horizon-world/src/lib.rs": "d71db59890e861c6acc6107249b529b6ef8ec1af63df30c8ce1d008f7fad456c", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/item_particles_fixture.rs": "adc45444594e306115c89e83000a4faec1345dd5ccaf1107dbcbfa0321072be3" + }, + "fixtures_sha256": { + ".local/rust-item-particles-parity/inputs.txt": "1f73bd4368080e00069a423cf1ce614a27c9321b2c76a1dec977d57375f98fd9" + }, + "rust_output_sha256": "3a7282878880e2806fe56b3cac43837f087320ed657852f3f377946e3d2cdfbb", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "3a7282878880e2806fe56b3cac43837f087320ed657852f3f377946e3d2cdfbb", + "matched_output_lines": 143167 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "3a7282878880e2806fe56b3cac43837f087320ed657852f3f377946e3d2cdfbb", + "matched_output_lines": 143167 + } + ], + "scope": "Inherited LivingEntity.spawnItemParticles with real ItemStackTemplate snapshots, LegacyRandomSource and XoroshiroRandomSource. Controlled rotation, eye position, level and particle callbacks compare exact positions/velocities, snapshot identity and values, direct random-field selection, subsequent RNG state and mutation/failure prefixes. Renderer enqueue and full consumable/gameplay integration remain pending." +} diff --git a/benchmarks/rust-item-stack-storage-2026-10-07/scoped-parity.json b/benchmarks/rust-item-stack-storage-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..c663d8efd --- /dev/null +++ b/benchmarks/rust-item-stack-storage-2026-10-07/scoped-parity.json @@ -0,0 +1,270 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 7856, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemStackStorageOracle.java": "c0d3bc4258af40bd30cd7050c9924214cf47fbbfffb86b2a78391a04a07e349f", + "tools/test_item_stack_storage_parity.py": "a59129e0acdf6d97ba8f29440b26a77b58940ba28e58b5b1b515b1c48380f37a", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_use.rs": "1d0a3afa61b60d356e81a063da79ec6cd38730315976640a591325fc4c8ab98c", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "f9b29f42a528493d0d2521110d4f6e0bc89af8f579d539648cb7c3a9e68e31cd", + "crates/horizon-world/src/item_use_start.rs": "9996a9b90c313925cd90e78c02880f2a1d2ae65aef53f4ce081578a9dcd10c62", + "crates/horizon-world/src/lib.rs": "30f06d90b851c51290d33731f12e9ca6b5c8f7ddb1490556fe8e525e0225f439", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/item_stack_storage_fixture.rs": "879e8d9b020d0e26509c5f956422cfe8b18f3660af28a7288223ac5cd007a3e3" + }, + "fixtures_sha256": { + ".local/rust-item-stack-storage-parity/inputs.txt": "223f3aaf0ce510f847d985a2b07bd308b3390f928ac629fa70e34f08f406bfac" + }, + "rust_output_sha256": "e3a8ddede3cc75d9a148e2d619d083c9a9764594e99a87629a4bafc4fb4c80e2", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "e3a8ddede3cc75d9a148e2d619d083c9a9764594e99a87629a4bafc4fb4c80e2", + "matched_output_lines": 568580 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e3a8ddede3cc75d9a148e2d619d083c9a9764594e99a87629a4bafc4fb4c80e2", + "matched_output_lines": 568580 + } + ], + "scope": "Actual ItemStack count/pop-time storage, component visibility, copy/copyWithCount/copyAndClear, split, grow/shrink/limit, transmuteCopy, consume and consumeAndReturn. Bound small native prototypes and integer components expose patch sanitation, copies and iterator order. Fixture item-store handles preserve canonical EMPTY aliases, including mutations; callbacks cover creative material queries, original mutation and failures after the returned copy is captured. Count/type/component comparison predicates are compared throughout. Full component codecs, inventory transactions, use/equipment lifecycle and complete gameplay integration remain pending." +} diff --git a/benchmarks/rust-item-template-2026-10-07/scoped-parity.json b/benchmarks/rust-item-template-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..836a56231 --- /dev/null +++ b/benchmarks/rust-item-template-2026-10-07/scoped-parity.json @@ -0,0 +1,280 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 3744, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemTemplateOracle.java": "1d40c19f17ee8d666d40737af2301a5e57945626e93bf464682e7218767d34fa", + "tools/test_item_template_parity.py": "945e94f9562e63fdd7d560acf74bf6ada7f6a8ecf35dddb6b12f1bcc39f4e6a5", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "d9ab7958a55c695142403195244b14946caa2bf527bcbb4193b1372cd748e9a8", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/lib.rs": "32e4ab1773ffacd063ffacf10bd148d43e69fefaed7109b39bbff475417528e6", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/item_template_fixture.rs": "75350137e055a30ebc10c6fd09e9c53dfbbddb3acf7c440baeac752f1d3bb6af" + }, + "fixtures_sha256": { + ".local/rust-item-template-parity/inputs.txt": "0b58f234b8f8e705797d678c6b481b411064b9207af9b3b14bfeded8c28444b2" + }, + "rust_output_sha256": "cd281b5adda0e521e767773b365f46c4a79a590c315c03629cee85a8ca94cb7b", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "cd281b5adda0e521e767773b365f46c4a79a590c315c03629cee85a8ca94cb7b", + "matched_output_lines": 518556 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "cd281b5adda0e521e767773b365f46c4a79a590c315c03629cee85a8ca94cb7b", + "matched_output_lines": 518556 + } + ], + "scope": "Actual ItemStackTemplate constructors, fromStack/fromNonEmptyStack, withCount identity, current-prototype component queries, create/apply patch precedence, canonical EMPTY on failed strict validation, and ItemStack.applyComponentsAndValidate rollback. Real max-stack-size/max-damage/damage scalar components include redundant and removed patches and invalid counts. Contained component validation is a required Rust schema service and is not exercised by this scalar corpus. Component codecs, containers/bundle weight, use-remainder integration and complete gameplay integration remain pending." +} diff --git a/benchmarks/rust-item-use-2026-10-07/scoped-parity.json b/benchmarks/rust-item-use-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..a89b5038f --- /dev/null +++ b/benchmarks/rust-item-use-2026-10-07/scoped-parity.json @@ -0,0 +1,262 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 22296, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseOracle.java": "b6d102e72dc166cdd2ae35dc13c4bf08c36265dcb42369ec9e15da16f8b6284f", + "tools/test_item_use_parity.py": "2e3c5ff8250e8d1d9d8a564d6d65b049b0d80fc9630bd12d907cccb55b00ab0a", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_use.rs": "1d0a3afa61b60d356e81a063da79ec6cd38730315976640a591325fc4c8ab98c", + "crates/horizon-world/src/lib.rs": "6b9962670f09d1223c251bdf3ebc021917ea7a527a82b465db60c8cab0df9deb", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/item_use_fixture.rs": "ae94d70ce98734d9b4025137962de43cdfef89963bad3800f0d9a54385366421" + }, + "fixtures_sha256": { + ".local/rust-item-use-parity/inputs.txt": "37dc2ae8be576a3f3d933b752baf4edfefb1c61a77af521e7e5580fc36fd7ffd" + }, + "rust_output_sha256": "47c017ea6a6010c6a136fbdc5f7f1521490c8e418e4e9b5f95c77d08ed716425", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "47c017ea6a6010c6a136fbdc5f7f1521490c8e418e4e9b5f95c77d08ed716425", + "matched_output_lines": 108690 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "47c017ea6a6010c6a136fbdc5f7f1521490c8e418e4e9b5f95c77d08ed716425", + "matched_output_lines": 108690 + } + ], + "scope": "Actual LivingEntity blocking-item eligibility, isBlocking and both use-timer overloads. Controlled item types supply virtual duration queries; actual use-item/remaining fields and BlocksAttacks components provide captured and reread state. Covers wrapping tick arithmetic, delay boundaries, absent components, empty stacks, shared item types, partial-tick float bits, callback mutations and failures. Item-use lifecycle, durability, codecs and complete combat/world integration remain pending." +} diff --git a/benchmarks/rust-item-use-catalog-2026-10-07/scoped-parity.json b/benchmarks/rust-item-use-catalog-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..597c4d1bd --- /dev/null +++ b/benchmarks/rust-item-use-catalog-2026-10-07/scoped-parity.json @@ -0,0 +1,269 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 18836, + "registered_items": 1658, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseCatalogOracle.java": "f54a19d9544d53484d103722fa3f4b24462eb77650499f1b2323d152902c821b", + "tools/test_item_use_catalog_parity.py": "b33aa8f2480ca9d7ddfc946a2e43a245239930704ba1167d2f451f1a7c7f1691", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "9b1ae81c5bd0aea5982e03da1973f15fd46757354b8dd539bbd27449cff45e6a", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "6a67fd660d771c59ffa9f4aa3225a25b56da31ea1079ca2efa4a915be6464179", + "crates/horizon-world/src/item_use.rs": "1d0a3afa61b60d356e81a063da79ec6cd38730315976640a591325fc4c8ab98c", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "f9b29f42a528493d0d2521110d4f6e0bc89af8f579d539648cb7c3a9e68e31cd", + "crates/horizon-world/src/item_use_start.rs": "9996a9b90c313925cd90e78c02880f2a1d2ae65aef53f4ce081578a9dcd10c62", + "crates/horizon-world/src/lib.rs": "261efcad4395e057c632d9b3041081f8dc7633b748e5ef4229d3a8677461aaec", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/item_use_catalog_fixture.rs": "630427d080ebcdbb14528ebba3176e70e52b0dc58057d1dd6539cc4c5907b0d7" + }, + "fixtures_sha256": { + ".local/rust-item-use-catalog-parity/inputs.txt": "e2554974193c9ca6eaf6d0dca1d18a795c6bcb687f73c4c3fb6c293d4c47404a", + ".local/rust-item-use-catalog-parity/catalog.json": "0eda211435c02f7bc2dc248f86ebd0e6a9a941e906663ddf712a981b42d6efa9" + }, + "rust_output_sha256": "8bde2160d339d0828fa4456022aa43f4b95aa2ffe30e3846f2644e662ce9af6a", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "8bde2160d339d0828fa4456022aa43f4b95aa2ffe30e3846f2644e662ce9af6a", + "matched_output_lines": 246715 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "8bde2160d339d0828fa4456022aa43f4b95aa2ffe30e3846f2644e662ce9af6a", + "matched_output_lines": 246715 + } + ], + "scope": "All 1658 built-in item identities with bound native default component maps. Parsed exports from both JARs agree; Rust imports the component projection for stack size, durability and item-use duration/release behavior. Native ItemStack queries cover every default plus component/count mutations, empty/air behavior, registered method overrides, consumable truncation versus instrument flooring, integer and float boundaries. Other item components, arbitrary component codecs, full inventory/equipment, enchantment effects and gameplay integration remain pending." +} diff --git a/benchmarks/rust-item-use-lifecycle-2026-10-07/scoped-parity.json b/benchmarks/rust-item-use-lifecycle-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..6e5d81565 --- /dev/null +++ b/benchmarks/rust-item-use-lifecycle-2026-10-07/scoped-parity.json @@ -0,0 +1,265 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 19900, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseLifecycleOracle.java": "7a024212a18eff1891996fe5979c2d35aea36a4cef80c70638bb5ead4fbcaf57", + "tools/test_item_use_lifecycle_parity.py": "0856dc5003cc3eee7e6673601db53b80f3ef8c650c37cbb17eebcfae63b5de91", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "9b1ae81c5bd0aea5982e03da1973f15fd46757354b8dd539bbd27449cff45e6a", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "6a67fd660d771c59ffa9f4aa3225a25b56da31ea1079ca2efa4a915be6464179", + "crates/horizon-world/src/item_use.rs": "1d0a3afa61b60d356e81a063da79ec6cd38730315976640a591325fc4c8ab98c", + "crates/horizon-world/src/item_use_lifecycle.rs": "f9b29f42a528493d0d2521110d4f6e0bc89af8f579d539648cb7c3a9e68e31cd", + "crates/horizon-world/src/lib.rs": "9b549992c2c8e118013f64c15cbc79ca9c66c681d0692bef655fd939812dd19c", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/item_use_lifecycle_fixture.rs": "bad2f2236179b953dd4cbeac7a7c27ded23cfff11b474b4e5284bedf54c4fcaa" + }, + "fixtures_sha256": { + ".local/rust-item-use-lifecycle-parity/inputs.txt": "32379ce9a26546173d4a88d55665609aad15f6e6a38c6b6e3cc00d2e7a6c76a4" + }, + "rust_output_sha256": "79addc5b3f5d14a54965ff68a71ed18989490e00a103368c75a1825236166f95", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "79addc5b3f5d14a54965ff68a71ed18989490e00a103368c75a1825236166f95", + "matched_output_lines": 144736 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "79addc5b3f5d14a54965ff68a71ed18989490e00a103368c75a1825236166f95", + "matched_output_lines": 144736 + } + ], + "scope": "Actual LivingEntity private using-item tick, updateUsingItem, completeUsingItem, releaseUsingItem and stopUsingItem. Real ItemStack/UseEffects components call controlled custom item handlers; virtual level/hand queries and using flag updates are observed. Covers captured stack/level references, same-type versus stack-identity checks, callback mutations/failures, empty stacks, wrapping countdowns, returned item placement, finish vibration and kinetic-enemy-map presence. Starting use, actual synchronized flags, consumables/kinetic item effects, use remainders/cooldowns, full inventory/equipment and game tick integration remain pending." +} diff --git a/benchmarks/rust-item-use-start-2026-10-07/scoped-parity.json b/benchmarks/rust-item-use-start-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..5f6b29136 --- /dev/null +++ b/benchmarks/rust-item-use-start-2026-10-07/scoped-parity.json @@ -0,0 +1,266 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 14886, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseStartOracle.java": "630ce7f2bea3915d3de64263c6a78c8f93caee71d72c519b788956eab46ce00a", + "tools/test_item_use_start_parity.py": "fdbd4054287457d60b862a307555d59d6ec43f0be86bf6b8a65eb9e88b3905a0", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "9b1ae81c5bd0aea5982e03da1973f15fd46757354b8dd539bbd27449cff45e6a", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "6a67fd660d771c59ffa9f4aa3225a25b56da31ea1079ca2efa4a915be6464179", + "crates/horizon-world/src/item_use.rs": "1d0a3afa61b60d356e81a063da79ec6cd38730315976640a591325fc4c8ab98c", + "crates/horizon-world/src/item_use_lifecycle.rs": "f9b29f42a528493d0d2521110d4f6e0bc89af8f579d539648cb7c3a9e68e31cd", + "crates/horizon-world/src/item_use_start.rs": "9996a9b90c313925cd90e78c02880f2a1d2ae65aef53f4ce081578a9dcd10c62", + "crates/horizon-world/src/lib.rs": "bcafb706cd8e2f905071828e1c9bfb536da348857f8c955599907bd7b85bd3f3", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/item_use_start_fixture.rs": "80d62405d6cb626f86e23f9c6d6bc38441578674a8885e6e329ab85eb9993776" + }, + "fixtures_sha256": { + ".local/rust-item-use-start-parity/inputs.txt": "494e8b41f2336559f73fa4e6dad133614d9e240d8f44a51c416a348098c62701" + }, + "rust_output_sha256": "8268f65a5a4ac92739d7e8f6d3d8e287a48684e69ad4abbec18fa978d9606bff", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "8268f65a5a4ac92739d7e8f6d3d8e287a48684e69ad4abbec18fa978d9606bff", + "matched_output_lines": 84873 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "8268f65a5a4ac92739d7e8f6d3d8e287a48684e69ad4abbec18fa978d9606bff", + "matched_output_lines": 84873 + } + ], + "scope": "Actual inherited LivingEntity startUsingItem, native private equipment synchronization and ClientboundSetEquipmentPacket construction, item duration dispatch, using/offhand flag ordering, native UseEffects vibration and KineticWeapon presence. Covers captured held-stack/level/hand arguments, callback mutations/failures, empty stacks, client/server queries and recent-kinetic-map reset. Flag writes and delivery services are controlled; synchronized-data storage, wire encoding, kinetic combat, full inventory/equipment and game tick integration remain pending." +} diff --git a/benchmarks/rust-java-hash-map-2026-10-07/scoped-parity.json b/benchmarks/rust-java-hash-map-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..1febffe0d --- /dev/null +++ b/benchmarks/rust-java-hash-map-2026-10-07/scoped-parity.json @@ -0,0 +1,283 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 1000, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaJavaHashMapOracle.java": "d76ec7bc7ceb9a646f79cd4c81b9b35a7a0a83eb2a9d9289ef7b57591f946c9c", + "tools/test_java_hash_map_parity.py": "54d784f085e16d768f55bbdea8e5e7c1b0945261db67f78163516d7cd2208b16", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "d9ab7958a55c695142403195244b14946caa2bf527bcbb4193b1372cd748e9a8", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "6bd97d87f0e3eaad440162145a1515b9a0b7cfb85cb0ea337874ed9745f8dd45", + "crates/horizon-world/src/lib.rs": "f4c5eae5d75b431d7d5fc1edc83a804d7405bf8fff0be4a3ad5dfa6bcfac7013", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "50f0ac128bfcc5c9b2a43bfbb4f0d46f63693bea3bdcb64b15318a3dec28b9d5", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/java_hash_map_fixture.rs": "ae5752e4556dcec72e1c83cce8342b638584ae33a102d31d48269db4e12e5778" + }, + "fixtures_sha256": { + ".local/rust-java-hash-map-parity/inputs.txt": "8b434acb30d982e9b5a92b71f5567685523aaf7212725d8978caf6ff32d423f2" + }, + "rust_output_sha256": "6590c67cbf4e779bec60f612bad48431537fc5854483fc3ee6b25dbe03c67d5a", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "6590c67cbf4e779bec60f612bad48431537fc5854483fc3ee6b25dbe03c67d5a", + "matched_output_lines": 601084 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "6590c67cbf4e779bec60f612bad48431537fc5854483fc3ee6b25dbe03c67d5a", + "matched_output_lines": 601084 + } + ], + "scope": "JDK 25 java.util.HashMap default-constructor storage used by vanilla ItemCooldowns, with non-null Comparable keys whose ordering agrees with equality. Direct put/get/remove/clear, linked bucket iteration, collision tree creation/insertion/deletion/splitting, iterator removal and concurrent modification prefixes are compared. Both pinned game classpaths use the same installed JDK implementation; this is a JDK collection comparison, not a gameplay parity test. Null/non-comparable keys, alternate constructors and other Map methods are outside this storage API. Concrete cooldowns, packets and gameplay integration remain pending." +} diff --git a/benchmarks/rust-java-identity-map-2026-10-07/cooldown-regression.json b/benchmarks/rust-java-identity-map-2026-10-07/cooldown-regression.json new file mode 100644 index 000000000..a366c8128 --- /dev/null +++ b/benchmarks/rust-java-identity-map-2026-10-07/cooldown-regression.json @@ -0,0 +1,293 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 4473, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemCooldownsOracle.java": "3aa94c31fd3019868e66c8139a500c0cd44ad889066da2780daa9ebcb2ccabbf", + "tools/test_item_cooldowns_parity.py": "f29d8153125f3052188c96644a49303a2641d66c02c80c34b82109340a13453b", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "b4184f71a8d817197b8730c8f002b96bdeb248028b2330fbc7bdd7fe11ea7049", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/item_cooldowns_fixture.rs": "e70b27fcf61338a8aec74cf9dc3705bb317f61ba195bd00e11e149dc1e091c64" + }, + "fixtures_sha256": { + ".local/rust-item-cooldowns-parity/inputs.txt": "01db9dd45322a3a6b57a29c71767c3d3b7eda81452eeac9012fa78af39294178" + }, + "rust_output_sha256": "b3afab5c667de5c8f06a810f5b1d1bc8cd4218ee05b0e74f1b46ed1ec0770561", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "b3afab5c667de5c8f06a810f5b1d1bc8cd4218ee05b0e74f1b46ed1ec0770561", + "matched_output_lines": 167906 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "b3afab5c667de5c8f06a810f5b1d1bc8cd4218ee05b0e74f1b46ed1ec0770561", + "matched_output_lines": 167906 + } + ], + "scope": "Actual ItemCooldowns storage/add/remove/tick/percentage and default stack group resolution, plus UseCooldown ticks/apply through real Player class selection and controlled getCooldowns/start/end callbacks. Includes Identifier hashing/path-first collision ordering, tree-bin expiry, wrapping times, float bits, empty component visibility, callback mutation/failure and nested ticks. Rust composes checked collection iteration with shared stack components. Complete finish-use integration, server cooldown packets and full gameplay remain pending." +} diff --git a/benchmarks/rust-java-identity-map-2026-10-07/ordered-map-regression.json b/benchmarks/rust-java-identity-map-2026-10-07/ordered-map-regression.json new file mode 100644 index 000000000..9afee5bd6 --- /dev/null +++ b/benchmarks/rust-java-identity-map-2026-10-07/ordered-map-regression.json @@ -0,0 +1,293 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 1000, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaJavaHashMapOracle.java": "d76ec7bc7ceb9a646f79cd4c81b9b35a7a0a83eb2a9d9289ef7b57591f946c9c", + "tools/test_java_hash_map_parity.py": "54d784f085e16d768f55bbdea8e5e7c1b0945261db67f78163516d7cd2208b16", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "b4184f71a8d817197b8730c8f002b96bdeb248028b2330fbc7bdd7fe11ea7049", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/java_hash_map_fixture.rs": "9a96f0a5c0710abb51cd74d2d7e09fa9c47309c97c1944576480f2743982ffcd" + }, + "fixtures_sha256": { + ".local/rust-java-hash-map-parity/inputs.txt": "8b434acb30d982e9b5a92b71f5567685523aaf7212725d8978caf6ff32d423f2" + }, + "rust_output_sha256": "6590c67cbf4e779bec60f612bad48431537fc5854483fc3ee6b25dbe03c67d5a", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "6590c67cbf4e779bec60f612bad48431537fc5854483fc3ee6b25dbe03c67d5a", + "matched_output_lines": 601084 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "6590c67cbf4e779bec60f612bad48431537fc5854483fc3ee6b25dbe03c67d5a", + "matched_output_lines": 601084 + } + ], + "scope": "JDK 25 java.util.HashMap default-constructor storage used by vanilla ItemCooldowns, with non-null Comparable keys whose ordering agrees with equality. Direct put/get/remove/clear, linked bucket iteration, collision tree creation/insertion/deletion/splitting, iterator removal and concurrent modification prefixes are compared. Both pinned game classpaths use the same installed JDK implementation; this is a JDK collection comparison, not a gameplay parity test. Null/non-comparable keys, alternate constructors and other Map methods are outside this storage API. Concrete cooldowns, packets and gameplay integration remain pending." +} diff --git a/benchmarks/rust-java-identity-map-2026-10-07/scoped-parity.json b/benchmarks/rust-java-identity-map-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..88cc3b000 --- /dev/null +++ b/benchmarks/rust-java-identity-map-2026-10-07/scoped-parity.json @@ -0,0 +1,296 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 872, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaJavaIdentityMapOracle.java": "0c5a81f25aedb0ecf523c73909997dcf8e188a2da5f3067c3187e5125210e7be", + "tools/test_java_identity_map_parity.py": "4021853b0534f4e3e39c83cc6f1156d07bbb64d3c521e7d4ddeaa57bc9aa4a20", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "b4184f71a8d817197b8730c8f002b96bdeb248028b2330fbc7bdd7fe11ea7049", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/java_identity_map_fixture.rs": "eb42a6493c4695e89b8eb3a6ab0d6758e1d8bf9cb3092b4c0e46c857bf8915a6" + }, + "fixtures_sha256": { + ".local/rust-java-identity-map-parity/inputs.txt": "5f7a4cbc69deb7a2d26ec0e6f6b6657d7994bedced57661e97402fbc6bf5b2db", + ".local/rust-java-identity-map-parity/inputs-client.txt": "d448416d09f155200ad26394e13694e914576b6957887f55640280a6d63adf71", + ".local/rust-java-identity-map-parity/inputs-server.txt": "d448416d09f155200ad26394e13694e914576b6957887f55640280a6d63adf71" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "eaa8f9afc764ca015673327a7389ab771d459499f019256753e99f0ab5a55dd4", + "rust_output_sha256": "eaa8f9afc764ca015673327a7389ab771d459499f019256753e99f0ab5a55dd4", + "matched_output_lines": 577200 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "eaa8f9afc764ca015673327a7389ab771d459499f019256753e99f0ab5a55dd4", + "rust_output_sha256": "eaa8f9afc764ca015673327a7389ab771d459499f019256753e99f0ab5a55dd4", + "matched_output_lines": 577200 + } + ], + "scope": "Actual JDK 25 HashMap with map-copy construction, non-comparable classes, consistently ordered comparable classes and unequal comparable keys that compare as zero. Captures System.identityHashCode in each Java process and supplies those hashes to Rust for the same scenario, then compares linked iteration, copy sizing/reordering, equal-key replacement, tree/list transitions and cursor invalidation. Both game classpath runs use the same installed JDK; this is a collection comparison, not a gameplay or cross-process identity-hash equivalence claim. Key operations are pure and null keys remain outside the API." +} diff --git a/benchmarks/rust-liquid-collision-2026-10-06/context-regression.json b/benchmarks/rust-liquid-collision-2026-10-06/context-regression.json new file mode 100644 index 000000000..0c1a8af9f --- /dev/null +++ b/benchmarks/rust-liquid-collision-2026-10-06/context-regression.json @@ -0,0 +1,202 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 8338, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java": "d2f5b022be1ee2111c38acf6710c21b59da09506e246fb22b8c7c8eeb253a7d9", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_collision_context_parity.py": "75d6f01e072867d2bd286d2e518e123fcfe055a11ac1705ec99ecec3975cb8d2", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "a40c9d7a4e0a734c124dc856e31359fd4d8de3d1bfc79c86787afa8e8e05e480", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "e321bed47d34ef1fdcdd99dad07cc537d34ed3cfbc07f10f10ec8b6848daf208", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/collision_context_fixture.rs": "22701112922a2f806a1d6906f0e56bfbff309093bbbc7c140bf077d9686e854f" + }, + "fixtures_sha256": { + ".local/rust-collision-context-parity/inputs.txt": "60b49e91a7a4999cfb8eb6ac3fbc6ec0a931d68cd53f9737959a2bd2b42be7a5" + }, + "rust_output_sha256": "7b23eb34c86c3db5a9e90bdd8ef772b79b2a06c8460542e032589f7962fd8f64", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "7b23eb34c86c3db5a9e90bdd8ef772b79b2a06c8460542e032589f7962fd8f64", + "matched_output_lines": 225126 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "7b23eb34c86c3db5a9e90bdd8ef772b79b2a06c8460542e032589f7962fd8f64", + "matched_output_lines": 225126 + } + ], + "scope": "Actual CollisionContext factories and EntityCollisionContext/Empty/PositionCollisionContext queries on controlled player and marker snapshots. Checks entity identity, captured descending and placement flags, fluid collision flags, empty-stack AIR identity, height thresholds including f32 epsilon, null factories, callback arguments/order/failures and all five fluid type pairs. Entity lifecycle, inventory mutations after capture, experimental minecart contexts, contextual block shape dispatch and live movement integration remain pending." +} diff --git a/benchmarks/rust-liquid-collision-2026-10-06/scaffolding-regression.json b/benchmarks/rust-liquid-collision-2026-10-06/scaffolding-regression.json new file mode 100644 index 000000000..8d5f58051 --- /dev/null +++ b/benchmarks/rust-liquid-collision-2026-10-06/scaffolding-regression.json @@ -0,0 +1,204 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 56448, + "block_states": 32, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java": "d2f5b022be1ee2111c38acf6710c21b59da09506e246fb22b8c7c8eeb253a7d9", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_collision_context_parity.py": "75d6f01e072867d2bd286d2e518e123fcfe055a11ac1705ec99ecec3975cb8d2", + "tools/test_scaffolding_collision_parity.py": "bab75e2cad68a3193035a87497eaa372466c405293cc547e39dbd7bd4450d69d", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "a40c9d7a4e0a734c124dc856e31359fd4d8de3d1bfc79c86787afa8e8e05e480", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "e321bed47d34ef1fdcdd99dad07cc537d34ed3cfbc07f10f10ec8b6848daf208", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/collision_context_fixture.rs": "22701112922a2f806a1d6906f0e56bfbff309093bbbc7c140bf077d9686e854f" + }, + "fixtures_sha256": { + ".local/rust-scaffolding-collision-parity/inputs.txt": "5945054e86700237a7b6de6b362a37a98bdc8afaa67004e8aaa92da1421b552c" + }, + "rust_output_sha256": "33a33cd612c999ab21f1acbbdee522f2ec2b3f877d62f922c665715e3012e207", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "33a33cd612c999ab21f1acbbdee522f2ec2b3f877d62f922c665715e3012e207", + "matched_output_lines": 524300 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "33a33cd612c999ab21f1acbbdee522f2ec2b3f877d62f922c665715e3012e207", + "matched_output_lines": 524300 + } + ], + "scope": "Actual CollisionContext.getCollisionShape dispatch and native scaffolding behavior for all 32 scaffolding states, nine context variants, descending flags, integer Y extremes, nonfinite positions and adjacent double values around the top/bottom float-epsilon thresholds. Full shape coordinates, extrema, box ordering and cube metadata match. A rejecting world proxy verifies selection performs no world reads. Scaffolding placement/update/falling behavior and live movement remain pending." +} diff --git a/benchmarks/rust-liquid-collision-2026-10-06/scoped-parity.json b/benchmarks/rust-liquid-collision-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..cd4618a83 --- /dev/null +++ b/benchmarks/rust-liquid-collision-2026-10-06/scoped-parity.json @@ -0,0 +1,204 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 58344, + "block_states": 32, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java": "d2f5b022be1ee2111c38acf6710c21b59da09506e246fb22b8c7c8eeb253a7d9", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_collision_context_parity.py": "75d6f01e072867d2bd286d2e518e123fcfe055a11ac1705ec99ecec3975cb8d2", + "tools/test_liquid_collision_parity.py": "dd77dfef7d3a66e81d92b66680d9626b6d69c54fc742bf5122674f05342fe788", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "a40c9d7a4e0a734c124dc856e31359fd4d8de3d1bfc79c86787afa8e8e05e480", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "e321bed47d34ef1fdcdd99dad07cc537d34ed3cfbc07f10f10ec8b6848daf208", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/collision_context_fixture.rs": "22701112922a2f806a1d6906f0e56bfbff309093bbbc7c140bf077d9686e854f" + }, + "fixtures_sha256": { + ".local/rust-liquid-collision-parity/inputs.txt": "564e80e9a55a186cd70c21a1db14abf59849be90bc5493346e9e64ff9d3c9d8b" + }, + "rust_output_sha256": "d845ce538e9ce157f6455b32e73e03e9d7df86ebc5c9ab80ebf94705500748ab", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "d845ce538e9ce157f6455b32e73e03e9d7df86ebc5c9ab80ebf94705500748ab", + "matched_output_lines": 571179 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "d845ce538e9ce157f6455b32e73e03e9d7df86ebc5c9ab80ebf94705500748ab", + "matched_output_lines": 571179 + } + ], + "scope": "Native contextual LiquidBlock collision dispatch for all 32 water/lava states. Checks the always-fluid bypass, source-only selection, living-entity gating, supplied entity standing shapes, exact height boundaries, all 33 above-block fluid states, callback order and failure propagation, null/placement contexts and wrapping above-block coordinates. Full selected shape data and callback traces are compared. Entity-specific standing shape implementations, liquid simulation and live movement remain pending." +} diff --git a/benchmarks/rust-live-attribute-health-2026-10-07/scoped-parity.json b/benchmarks/rust-live-attribute-health-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..01a4aacd6 --- /dev/null +++ b/benchmarks/rust-live-attribute-health-2026-10-07/scoped-parity.json @@ -0,0 +1,309 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 3918, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeHealthOracle.java": "0ee2907d85c91895cfd6460de225326e77e30658785be4b3f2737ac4b8edb38e", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "tools/test_attribute_health_parity.py": "d021e4d6575fc752cd8a9fb65f525c83cebc5cff933735d488ca2b43ffa1de89", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "1c4256a2c6858b9e9e34466b684839b7cc8b4d18c3ee4a6edd20b413349ffa32", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/attribute_health_fixture.rs": "342d91697b124d52d5e3e4c5feb75370eeac09af1fef4d3efb47b3d44981d98b" + }, + "fixtures_sha256": { + ".local/rust-attribute-health-parity/inputs.txt": "36ab827ee17f1452f7e88cfe26dbe368e5348da25ab6b6905f7a1b62fcfa5b7c", + ".local/rust-attribute-health-parity/catalog.json": "d1e488e4f432888beb9f643904c8bca242d1e2093f53e23e07da305d70cf7106" + }, + "rust_output_sha256": "4f7248d8f06aac71b0de827b26a3e3cfa0920a1181cc92dc9e06257d1c6e783e", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "4f7248d8f06aac71b0de827b26a3e3cfa0920a1181cc92dc9e06257d1c6e783e", + "matched_output_lines": 666082, + "live_matched_output_lines": 666082 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "4f7248d8f06aac71b0de827b26a3e3cfa0920a1181cc92dc9e06257d1c6e783e", + "matched_output_lines": 666082, + "live_matched_output_lines": 666082 + } + ], + "scope": "Registered entity AttributeMap defaults/modifiers composed with actual LivingEntity/Player health methods, SynchedEntityData float health and FoodData regeneration. All 93 default suppliers; attribute mutations, health limits, actual healing and dirty state, hunger/exhaustion/timers, observer failures and starvation requests. Internal absorption storage and starvation damage delivery are controlled; Player absorption synchronization, attribute-change refresh, full damage and live gameplay remain pending. Both the per-attribute EntityAttributes storage and native-order LiveAttributes component execute the same production health binding. This health trace normalizes attribute collection order; actual JVM map/queue order is covered by the separate live-attribute gate.", + "live_rust_output_sha256": "4f7248d8f06aac71b0de827b26a3e3cfa0920a1181cc92dc9e06257d1c6e783e" +} diff --git a/benchmarks/rust-live-attribute-updates-2026-10-07/scoped-parity.json b/benchmarks/rust-live-attribute-updates-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..673c6f650 --- /dev/null +++ b/benchmarks/rust-live-attribute-updates-2026-10-07/scoped-parity.json @@ -0,0 +1,319 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 9284, + "attributes": 40, + "entity_suppliers": 93, + "fastutil_sha256": { + ".local/minecraft/26.3/libraries/server/it/unimi/dsi/fastutil/8.5.18/fastutil-8.5.18.jar": "9094ae67d01d0ad246f886f11ad557fc2e79c72cbf3feed83e1512a8ae90a74a" + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLiveAttributeUpdatesOracle.java": "23ef1bc52c59018258126197f22ef98cdcd4dd4db852be0bb60eeac3ab9f9b1f", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLiveAttributesOracle.java": "e6a6ab15c6ac2594e41e7830de480a01844d54d171913dd7bfe07881d10226c1", + "tools/test_live_attribute_updates_parity.py": "ea80fc255e14e25fe0e35dfa8037675e3e561e3e72b597b6c548d7ddc6416292", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "00243ac1a80934d54546452a98bc5b37b64a2cafa3a3dfadb82cd5997b46d7cb", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/live_attribute_updates_fixture.rs": "657f86f79582073ac23d7958cec5464fdc1071b9c50e19b1aa5f5c5033cbe3af", + "crates/horizon-world/examples/live_attributes_fixture.rs": "dc4136118c6b42f700cb5d5474aefc8bb136ca5f1a8ca02f7766c1412ad7e665" + }, + "fixtures_sha256": { + ".local/rust-live-attribute-updates-parity/inputs.txt": "1de9e5ca84a2dbd2c04b42c17548dc3a00ad38d006cae7906cfad8558cf90954", + ".local/rust-live-attribute-updates-parity/catalog.json": "ea8811c786c28dd2a6e3dee78dd36ee9655f7c415b4febd0c2218159e4dbc1eb", + ".local/rust-live-attribute-updates-parity/catalog-client.json": "d1e488e4f432888beb9f643904c8bca242d1e2093f53e23e07da305d70cf7106", + ".local/rust-live-attribute-updates-parity/catalog-server.json": "d1e488e4f432888beb9f643904c8bca242d1e2093f53e23e07da305d70cf7106", + ".local/rust-live-attribute-updates-parity/inputs-client.txt": "5c2d384d141240f79132399e384dcb73c8f25ec2f4d550cd3759f7e9dba2b747", + ".local/rust-live-attribute-updates-parity/inputs-server.txt": "be6a31b6e0b3da73ac012c081ae073d57fc5954bceba59770b9a1e01b22aaa1a" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "6d25f14bb8fe0e8e8bad48dfcea0795c7508515b8ba6892cc5beeeb1aa25d0c2", + "matched_output_lines": 2836190, + "rust_output_sha256": "6d25f14bb8fe0e8e8bad48dfcea0795c7508515b8ba6892cc5beeeb1aa25d0c2" + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e124ba567070fd090bc152408f73fd6742e8da8e14280b62f798b4a1e02d5e22", + "matched_output_lines": 2836234, + "rust_output_sha256": "e124ba567070fd090bc152408f73fd6742e8da8e14280b62f798b4a1e02d5e22" + } + ], + "scope": "Native LivingEntity attribute queries, notification and private refresh methods with registered AttributeMaps, real effect modifiers and pending queues, onAttributeUpdated health/absorption consequences and SynchedEntityData Float storage. Exercises all registered attributes/default suppliers, separate captured/selected maps and health stores, callbacks changing limits and routes, null pending members, client guards, failure prefixes and modifier/cache/queue identity. Replays JVM holder/instance hashes per reference. Scale dimension rebuild and waypoint-manager internals remain controlled; passenger lists are empty. Full effect lifecycle/dirty-particle synchronization, player absorption, complete gameplay and playable platform builds remain pending." +} diff --git a/benchmarks/rust-live-attributes-2026-10-07/scoped-parity.json b/benchmarks/rust-live-attributes-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..8e25ecd87 --- /dev/null +++ b/benchmarks/rust-live-attributes-2026-10-07/scoped-parity.json @@ -0,0 +1,317 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 5986, + "attributes": 40, + "entity_suppliers": 93, + "fastutil_sha256": { + ".local/minecraft/26.3/libraries/server/it/unimi/dsi/fastutil/8.5.18/fastutil-8.5.18.jar": "9094ae67d01d0ad246f886f11ad557fc2e79c72cbf3feed83e1512a8ae90a74a" + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLiveAttributesOracle.java": "e6a6ab15c6ac2594e41e7830de480a01844d54d171913dd7bfe07881d10226c1", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "tools/test_live_attributes_parity.py": "b4efc9de68b5f9f7bf8454826ac340e6dd9a77082abc9b656ac12025a98fe386", + "tools/test_entity_attribute_parity.py": "cdd15835061eb2ed8d1fbbbf77cf515ec7515b7ff129a3deaf403142ce9caead", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "1c4256a2c6858b9e9e34466b684839b7cc8b4d18c3ee4a6edd20b413349ffa32", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/live_attributes_fixture.rs": "dc4136118c6b42f700cb5d5474aefc8bb136ca5f1a8ca02f7766c1412ad7e665" + }, + "fixtures_sha256": { + ".local/rust-live-attributes-parity/inputs.txt": "77f069dea9926aa10456ba7574a229a90e3f65c33294e2d032471acb065cb2d4", + ".local/rust-live-attributes-parity/catalog.json": "ea8811c786c28dd2a6e3dee78dd36ee9655f7c415b4febd0c2218159e4dbc1eb", + ".local/rust-live-attributes-parity/catalog-client.json": "d1e488e4f432888beb9f643904c8bca242d1e2093f53e23e07da305d70cf7106", + ".local/rust-live-attributes-parity/catalog-server.json": "d1e488e4f432888beb9f643904c8bca242d1e2093f53e23e07da305d70cf7106", + ".local/rust-live-attributes-parity/inputs-client.txt": "37f569e9c2bcab467faf4d9990bc9e7f912ffeb2ceae3398c702a5dd20b81323", + ".local/rust-live-attributes-parity/inputs-server.txt": "3e294dc955fc918f8c1668383d054f7e25dad41e0daa95fe33a93f6d53eff0ab" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "5b9fd8785ae90f95d0d6b6d9507eefcb58f7bac1b087db3cda35ce2bf2a061e7", + "matched_output_lines": 8350018, + "rust_output_sha256": "5b9fd8785ae90f95d0d6b6d9507eefcb58f7bac1b087db3cda35ce2bf2a061e7" + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "7ab463a06c424257e781a1dc8d2f3e11974f570d88dbf74b7f3c94c9c14e2c42", + "matched_output_lines": 8350018, + "rust_output_sha256": "7ab463a06c424257e781a1dc8d2f3e11974f570d88dbf74b7f3c94c9c14e2c42" + } + ], + "scope": "Actual registered AttributeMap, immutable DefaultAttributes suppliers, ranged definitions, lazy instances, query/reset methods, modifier reference identities/caches/permanent state, MobEffect modifier loops and native-order update/sync queues. Includes the complete previous entity-attribute corpus, all registered attributes/entity suppliers, null lookups, range boundaries, nonfinite arithmetic, wrapping amplifiers and independent/bulk queue acknowledgements. Replays each reference JVM holder/instance hash sequence. Mutable custom supplier prototypes, internal supplier caches, full entity health/dimensions/gameplay, wire/save codecs and playable platform builds remain outside this gate." +} diff --git a/benchmarks/rust-live-player-combat-2026-10-07/scoped-parity.json b/benchmarks/rust-live-player-combat-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..180de6645 --- /dev/null +++ b/benchmarks/rust-live-player-combat-2026-10-07/scoped-parity.json @@ -0,0 +1,315 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 7465, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaServerPlayerCombatOracle.java": "1c4fac076598ff3cb6e23059355781a42d5a992ac720fa3c6dc0f26131c30f08", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerHealthOracle.java": "5d6dc93c0140e2b2f953fba7290721079d5a607fa81b051e2ac1e4742ab606f2", + "tools/test_server_player_combat_parity.py": "f947183bb0e7bd870a3c9260e5c7d6dd06f1c8f37e338c79b56cfee47ada1fe6", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_player_hurt_parity.py": "3164b8644664fcd46903e801ea70d1bb866e07e7112dc94570161831644bc84d", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/server_player_combat_fixture.rs": "243ddd24d91337c07526b586a92e183c0524f584612e5a4ab304fa489b7a7082" + }, + "fixtures_sha256": { + ".local/rust-server-player-combat-parity/inputs.txt": "0267042ca199aba2647667b349b22be374c83fbae3d9846a33519c1f96a402b4", + ".local/rust-server-player-combat-parity/catalog.json": "d1e488e4f432888beb9f643904c8bca242d1e2093f53e23e07da305d70cf7106", + ".local/rust-server-player-combat-parity/ids.json": "f7d6037166d966e2714b01cff5626f0cc0a02ce883885ec791c93e977afde0e6", + ".local/rust-server-player-combat-parity/slots.json": "29101ebf1ead685029508789eee51c4d4fff65524064d8e32a48efded7036982", + ".local/rust-server-player-combat-parity/head.json": "ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d" + }, + "rust_output_sha256": "e2e937abc1e00904c23573390279fb6f7474b88e0adf8ebb0f0019504e888939", + "live_rust_output_sha256": "e2e937abc1e00904c23573390279fb6f7474b88e0adf8ebb0f0019504e888939", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "e2e937abc1e00904c23573390279fb6f7474b88e0adf8ebb0f0019504e888939", + "matched_output_lines": 1176994 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e2e937abc1e00904c23573390279fb6f7474b88e0adf8ebb0f0019504e888939", + "matched_output_lines": 1176994 + } + ], + "scope": "Both EntityAttributes and LiveAttributes storage bindings produce the same native traces. Actual ServerPlayer outer hurt through Player/LivingEntity gates and actual Player inner damage, native armor/resistance reduction, registered modified attributes, synchronized health/absorption and FoodData exhaustion. Repeated hits, cooldown/state writes, death rejection, callbacks and numeric edges. Actual inherited invulnerability predicates include virtual flags, empty-equipment enchantment immunity, damage gamerules and client-loading/dimension guards; blocking amount, durability, effects, PvP permission, attribution, knockback, death services and criterion listeners remain controlled; enchanted items, registered sources and complete entity/game lifecycle remain pending." +} diff --git a/benchmarks/rust-live-upgrade-region-2026-10-06/scoped-parity.json b/benchmarks/rust-live-upgrade-region-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..d752388e3 --- /dev/null +++ b/benchmarks/rust-live-upgrade-region-2026-10-06/scoped-parity.json @@ -0,0 +1,219 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "direct_state_probes": 35723, + "write_zone_cases": 20125, + "upgrade_height_cases": 10098, + "upgrade_lifecycle_cases": 54, + "block_tag_files": 300, + "fixtures": 192, + "worldgen_random_modes": [ + false, + true + ], + "resident_chunks_per_fixture": 9, + "requested_placements": 3456, + "direct_tick_requests": 14784, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureRegionOracle.java": "3af9440fa50b0c42a23e9d65b394d214965b2c4af2c9cf7e58c5b4b0e56fb569", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "tools/test_feature_region_parity.py": "dfbbdedb16a1989306060ea96cfeea1ab5ba8615e17117e172b7a5773d17bbf1", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "4f803d21656a1420555bee6369617ddc825219a2cf05f842a209b3f8eaa583ec", + "Cargo.lock": "b1674833e1d5e66032589eea75643bf1c1eb2f2d6503e79ff7da8efa1b6d21dc", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "2995b209aa3dc24cfcbba405cf8b97a398efbc0de97bb04ef2f51abb4cd2b84c", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "516c2a1841583acf1f9aef161dee3d59c68dfda9b9f2a7c936be9823abbdbb77", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/feature_region_fixture.rs": "d65fe974a6d5a691d57690b0eafe28f90604268dda17c51d9d02c4dc35a9ae9f" + }, + "fixtures_sha256": { + ".local/rust-feature-region-parity/heights.json": "5a9a24cd8dcd081955f856df741a8e0eb34c84649d636947f474139d3ed30698", + ".local/rust-feature-region-parity/zones.json": "1864a9cdc17816c12fc5e92cd6abd32e45d67615075c52e928872e041d84244c", + ".local/rust-feature-region-parity/inputs.txt": "597236d7f85cfad764729c389bd71a1063d40587903ba3bd3ef86e4e3f9a481f", + ".local/rust-feature-region-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-feature-region-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-feature-region-parity/facts-client.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0", + ".local/rust-feature-region-parity/facts-server.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0" + }, + "rust_output_sha256": "eacca412638854ec0ae4ff375b18ae63cae249f714d3b37f055fca62868faa8f", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "eacca412638854ec0ae4ff375b18ae63cae249f714d3b37f055fca62868faa8f", + "matched_output_lines": 29248297 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "eacca412638854ec0ae4ff375b18ae63cae249f714d3b37f055fca62868faa8f", + "matched_output_lines": 29248297 + } + ], + "scope": "Native FeaturePlacer and three basic block-writing features, a composed sequence of four configured fill layers, single-block replacements, scattered ore and water springs share a world proxy backed by nine actual ProtoChunks. Configured water, horizontal logs, air, out-of-height fills and ore/replacement rules test graph-to-region binding. Initial two-layer stone/dirt terrain, both pre-light heightmap groups, count/square/heightmap/layered modifier chains, repeated placements, direct and WorldgenRandom-wrapped random streams, missing-neighbor errors, rejected writes and injected partial failures are compared. Final complete raw sections, heightmap presence and packed words are compared alongside ordered feature writes, update flags, explicit height queries and subsequent random draws. Rust uses resident registry-backed chunks, lazy heightmap priming and a caller-supplied write callback; imported air/fluid facts and bundled block tags bind independently across authenticated JARs. The proxy supplies storage mutation and actual native default scheduleTick/createTick methods routed through WorldGenTickAccess into each ProtoChunk. Separate block/fluid queues, first-request deduplication, nondefault-state block identity, shared tick-order advancement on duplicates and missing-chunk errors, out-of-height requests and wrapped clock values are compared, including saved queue order and priorities. Active and inactive End podiums additionally exercise native WorldGenRegion.destroyBlock through a subclass transport overriding only block reads and writes; air short-circuit, rejected replacements and write failures retain the generation-time semantics. All block states are also written into resident chunks, queried through feature access, cleared and queried again; contained fluid identity/amount/falling/source/full flags, water-tag membership and every bundled block tag plus an absent tag are compared. Negative coordinates, chunk edges, outside-height and absent chunks are covered. Block/fluid query bindings are an immutable registry-checked shared snapshot. The native horizontal write-zone predicate is compared separately across chunk/block coordinates, negative radii and wrapped subtraction/absolute-value extremes, and gates feature callbacks in selected fixtures. Actual WorldGenRegion.ensureCanWrite also checks the center proto-chunk before/after installing native below-zero retrogen data, with extreme and boundary heights; the generic height interval is independently compared against LevelHeightAccessor. Region feature callbacks and direct accepted/rejected write probes apply the upgrade height before mutation. The Rust access object now reads live center-chunk retrogen metadata before each write. Fifty-four lifecycle cases pair all six pre-light stages with all nine nonempty upgrade targets; one access object observes target-completion cleanup, explicit removal, reinstallation and backward stage changes from accepted write callbacks. Neighbor upgrade state is independent. Actual native highest-generated status and ProtoChunk biome-read availability are compared before and after those sequences, including clamped extreme quart Y. Retrogen activation and the world write effects remain caller-owned. Actual WorldGenRegion construction, full retrogen biome resolution, POIs, block entities, postprocessing execution, lighting, block/fluid tick execution, complete feature registries and complete world generation remain outside this comparison." +} diff --git a/benchmarks/rust-living-air-2026-10-07/scoped-parity.json b/benchmarks/rust-living-air-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..a4adb3c4a --- /dev/null +++ b/benchmarks/rust-living-air-2026-10-07/scoped-parity.json @@ -0,0 +1,226 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 35655, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingAirOracle.java": "787aa79779b3bf2445a566840759d15dfc85f57e2d80d2d41948cfc5694b68b7", + "tools/test_living_air_parity.py": "e629186b1e4bd8faa1c535fe469a084ac0f5ccf04b2961b3e8cfc322417adac3", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "6c3ba8a4db5b04508f5bc0633fd864095c7afbcc024523c9a6219134210489a2", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/living_air_fixture.rs": "4736e209a6772840a953b1aabd736cbc4eef064b9658300aa152f081345190c1" + }, + "fixtures_sha256": { + ".local/rust-living-air-parity/inputs.txt": "975ea006fdc523f37ccef52b654630ed653a0766ab1a5faf0b006f829bc73618" + }, + "rust_output_sha256": "c1f207978d91c4ee96a148c47f1a5962270d0272b0c9aa9f7829714821bc511c", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "c1f207978d91c4ee96a148c47f1a5962270d0272b0c9aa9f7829714821bc511c", + "matched_output_lines": 443554 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "c1f207978d91c4ee96a148c47f1a5962270d0272b0c9aa9f7829714821bc511c", + "matched_output_lines": 443554 + } + ], + "scope": "Actual LivingEntity.travelInAir, handleRelativeFrictionAndCalculateMovement, handleOnClimbable, getFrictionInfluencedSpeed, computeModifiedFriction and Entity.getInputVector. Traces native moveRelative and state writes, both Player/nonplayer ladder guards, registered scaffolding/boots checks, levitation, missing client chunks, float friction/drag, callback mutations and failures. Entity.move, effective gravity, ground/climb predicates and attributes use controlled providers; live world integration and complete player travel remain pending." +} diff --git a/benchmarks/rust-living-damage-2026-10-07/scoped-parity.json b/benchmarks/rust-living-damage-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..d88ddb889 --- /dev/null +++ b/benchmarks/rust-living-damage-2026-10-07/scoped-parity.json @@ -0,0 +1,248 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 14696, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingDamageOracle.java": "f6901c9875488132658fd99410958f072976c553f1badf25c50727873c9240c4", + "tools/test_living_damage_parity.py": "f858e0f3ee9498e0960dc527ac393ebc4154503a8c8ff3971ce64d9430e4111a", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "1322599246b34aa06f8e5908a1d20e6797b5a0e1e2c7f45d7172c1c46e5047ac", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "74b07b8231bdd7ea76350c3172c196ba5bfa3ad09705d5d0555300e20f6e0f8f", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/living_damage_fixture.rs": "c00017fed110ab6ebb229791d59ca7d3dd0ecaa48a8030ae7f156672a88dd02b" + }, + "fixtures_sha256": { + ".local/rust-living-damage-parity/inputs.txt": "5815be47de0e489e8439e61e868595aeb3ace34317841b31cdaab6eecfb4dbff" + }, + "rust_output_sha256": "2d5568691fefb75c1dfb914f390860d6b008d8cef18b743b78277941936dc19b", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "2d5568691fefb75c1dfb914f390860d6b008d8cef18b743b78277941936dc19b", + "matched_output_lines": 161198 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "2d5568691fefb75c1dfb914f390860d6b008d8cef18b743b78277941936dc19b", + "matched_output_lines": 161198 + } + ], + "scope": "Actual LivingEntity and Player actuallyHurt with observable phase/storage/stat/combat/event hooks; real final absorption clamping. Invulnerability, armor/magic dispatch, two absorption reads, absorbed statistics and Java rounding, player exhaustion/taken statistics, base-living second absorption write, health and damage-event ordering, mutation/failure retention. Armor/magic results, storage, combat/stat sinks and exhaustion delivery are controlled; outer hurt gates, full damage binding and live gameplay remain pending." +} diff --git a/benchmarks/rust-living-fall-2026-10-07/scoped-parity.json b/benchmarks/rust-living-fall-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..2a923a023 --- /dev/null +++ b/benchmarks/rust-living-fall-2026-10-07/scoped-parity.json @@ -0,0 +1,216 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 11096, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingFallOracle.java": "bb29b1f99030f1407d7c25b1553433508a9fbeb5227d236b71ab14ffb8ec7ad9", + "tools/test_living_fall_parity.py": "e18fee2458dcda91c11f1e8226ad078aae1080e1ce3990b29e7e9bf18b52d370", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "3beb1feaf4f2972efb4eb242d6deebe6c3c0a953892b03c8ca4abeea8b5adf59", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_properties.rs": "9c78bed0d30c8b9cfaa413b9b81b0bf94861605c13b26754e09b24e83d75a227", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/living_fall_fixture.rs": "1e11e704754fbebea9513f17aa3d781fa4498d89fd186240495d16c08c7fbf9d" + }, + "fixtures_sha256": { + ".local/rust-living-fall-parity/inputs.txt": "f8502f8d94827af3aa569327bc15fb1c461d29b2a421d6033ceb37600c1d31c0" + }, + "rust_output_sha256": "4404a6eb6e61bb51c0b96b092739defc07925149451bf0aa8e054deae1b402b9", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "4404a6eb6e61bb51c0b96b092739defc07925149451bf0aa8e054deae1b402b9", + "matched_output_lines": 153025 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "4404a6eb6e61bb51c0b96b092739defc07925149451bf0aa8e054deae1b402b9", + "matched_output_lines": 153025 + } + ], + "scope": "Actual LivingEntity.calculateFallDamage, causeFallDamage and impulse-context setter/reset/grace methods. Controlled immunity/attribute getters, passenger callback, sounds and server hurt callback expose native query order and failure state. Includes changing immunity, passenger mutations, impulse-height limiting, zero/negative/large grace values, float multiplier widening, floor/saturation, signed zero/nonfinite values and setter sequences. Hurt return values do not change the causeFallDamage result. A null level snapshot exercises the native non-server hurt no-op; actual client entity lifecycle, passenger storage/recursion, health/damage processing, attribute provisioning and tick/save/network integration remain pending." +} diff --git a/benchmarks/rust-living-fluid-2026-10-07/scoped-parity.json b/benchmarks/rust-living-fluid-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..7f4ce3c57 --- /dev/null +++ b/benchmarks/rust-living-fluid-2026-10-07/scoped-parity.json @@ -0,0 +1,227 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 26642, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingFluidOracle.java": "aee079a665cf8191a61ac26fb4598e4064a455611c0b933cffaa99e4b0797299", + "tools/test_living_fluid_parity.py": "aace76dd9c048825791e4548c07d4e9f9dc359764ebd884b5726b0067d0748ec", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "9eb870cad873b1e0be6c4e42fecffe73c0267f862d0f257ad78bb63409de1de0", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/living_fluid_fixture.rs": "38768bcc98b9c741863fbe7d3bfa5a3068325a7caafa0b8f0be0e650f131dd6a" + }, + "fixtures_sha256": { + ".local/rust-living-fluid-parity/inputs.txt": "dcdb7bf9e12914bca107e8e283768495426e51db46c740c7cb409ee9f8ebf3ae" + }, + "rust_output_sha256": "228ecd8dbcbdd845995eec1642dd88ec6493be64442a402d494e3c51732cb498", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "228ecd8dbcbdd845995eec1642dd88ec6493be64442a402d494e3c51732cb498", + "matched_output_lines": 265100 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "228ecd8dbcbdd845995eec1642dd88ec6493be64442a402d494e3c51732cb498", + "matched_output_lines": 265100 + } + ], + "scope": "Actual LivingEntity water/lava travel, fluid falling adjustment, shallow-fluid branch, fluid escape and ridden buoyancy. Includes native input acceleration and field write ordering, sprint changes, efficiency/dolphin effects, movement and free-space mutations, nonfinite arithmetic and injected failures. Controlled collision movement, immersion depths, free-space results, attributes and gravity; live fluid propagation, player/world binding and complete gameplay remain pending." +} diff --git a/benchmarks/rust-living-health-2026-10-07/scoped-parity.json b/benchmarks/rust-living-health-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..d417a3261 --- /dev/null +++ b/benchmarks/rust-living-health-2026-10-07/scoped-parity.json @@ -0,0 +1,245 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 5087, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingHealthOracle.java": "8f95ea7ee66a8d7330130ab6a91d1f78b20db26a24fa3e0e8ae21c49c8efc8e6", + "tools/test_living_health_parity.py": "0b64f1f87b8e5c0c2e9aa98c58ad8a704f6752d76f3b8dc5086b760bd1bc5a1c", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attributes/entity.rs": "d165e952e0ff2d1a1b037c03df5fbc778b7e263b8f9e402cf9b0fa27c933e0c6", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "ae8773da6061d4b76cf38b0719b87174114b48df719bb0f80a894a32d1e7bd99", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/living_health_fixture.rs": "0044e1beb40f6d432b5288ced93935cdba22728cc6289c977d36af205a2a8ab2" + }, + "fixtures_sha256": { + ".local/rust-living-health-parity/inputs.txt": "95eeb82892b387b083dcc84b56db296feb4e8ec13d65ec3ac13f9a157300c90d" + }, + "rust_output_sha256": "83ad151160fe38f60c9cbda57fda5e21031d93a79172f8218928e551ca862ea7", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "83ad151160fe38f60c9cbda57fda5e21031d93a79172f8218928e551ca862ea7", + "matched_output_lines": 442007 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "83ad151160fe38f60c9cbda57fda5e21031d93a79172f8218928e551ca862ea7", + "matched_output_lines": 442007 + } + ], + "scope": "Actual LivingEntity/Player health, healing, absorption and predicates composed with actual SynchedEntityData Float storage. Checks captured synchronized-data identity, attribute narrowing/clamping, boxed-float equality, callback-before-dirty ordering, partial state after exceptions, mutations and dirty/default extraction. Attribute values and the internal absorption sink are controlled; Player-specific absorption synchronization, full multi-item synchronization, registered attribute binding, damage pipeline and playable entities remain pending." +} diff --git a/benchmarks/rust-living-hurt-2026-10-07/scoped-parity.json b/benchmarks/rust-living-hurt-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..78aed88c3 --- /dev/null +++ b/benchmarks/rust-living-hurt-2026-10-07/scoped-parity.json @@ -0,0 +1,254 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 5584, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingHurtOracle.java": "b5173b07be60991c6ed9cf75a1056f117459207c57411c00a0cee14fea8a51bf", + "tools/test_living_hurt_parity.py": "2e9770f9e4653feada6a758a40eeaea89f370394106f55199a9541c8c867cec3", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "3caead29ea3c4ce5da28a58f0e9071cbc5e163735bf7039adc8a698a34e6f4fd", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "711e78438ece3e94eb156c0e64cfea06a63f79640a7a81e396ae2c1b277cdce6", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_damage.rs": "c4fc29eecf2bf401680d1754bef06797a5e4608ab53c5b52e0dd4996f859dbfe", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/living_hurt_fixture.rs": "63ecc1532d32c227855605b9be399bb1c3fc1b3c9d59b2b49a4b2d30955043e0" + }, + "fixtures_sha256": { + ".local/rust-living-hurt-parity/inputs.txt": "70ab2e85a6c2a52e042896873de6e64b51581a9455a5175dcbb1d942d08038c1" + }, + "rust_output_sha256": "0ae19c20fc44ab04a061113a9f45d1f25843f092539f935e49e36d2d366f9921", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "0ae19c20fc44ab04a061113a9f45d1f25843f092539f935e49e36d2d366f9921", + "matched_output_lines": 441413 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "0ae19c20fc44ab04a061113a9f45d1f25843f092539f935e49e36d2d366f9921", + "matched_output_lines": 441413 + } + ], + "scope": "Actual LivingEntity.hurtServer invoked directly on base and ServerPlayer receivers. Controlled blocking, inner damage, sounds, knockback, death, attribution and effect callbacks; native empty death-protection lookup and empty-listener victim criterion. Compares field write ordering, cooldown thresholds, float sanitization, modifiers, repeated hits and injected callback failure. Successful totems, attacker-player criteria, actual blocking reduction, combat/death services and full player outer gates remain pending." +} diff --git a/benchmarks/rust-living-landing-2026-10-07/scoped-parity.json b/benchmarks/rust-living-landing-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..df4192da2 --- /dev/null +++ b/benchmarks/rust-living-landing-2026-10-07/scoped-parity.json @@ -0,0 +1,225 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 26460, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingLandingOracle.java": "6c0f8109aa685f04e94ee642459fe27573667e0076ec181b0371b88356ac9f7a", + "tools/test_living_landing_parity.py": "039d18708631d1c139f2590bd0cc8cf0dae95439ba56fb338e6b9c5e8769a7b4", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "5aa09a6af45a1cbba716343b1ae9cdb565e32086bf837bdbc449140268c82595", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/living_landing_fixture.rs": "929d423377667e5f1b7145150dabfc4706c8f73e509c37c0a91173816870d1c7" + }, + "fixtures_sha256": { + ".local/rust-living-landing-parity/inputs.txt": "b01850d7cb4a55b36f59b0848a5445f1f1bd78cea2a68593a4f693cce74601b8" + }, + "rust_output_sha256": "83eba3422733039e35adac26da5020d02b0df640746b5cb5c80fd82c57a09120", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "83eba3422733039e35adac26da5020d02b0df640746b5cb5c80fd82c57a09120", + "matched_output_lines": 244844 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "83eba3422733039e35adac26da5020d02b0df640746b5cb5c80fd82c57a09120", + "matched_output_lines": 244844 + } + ], + "scope": "Actual LivingEntity.checkFallDamage including its base Entity fall handling. Controlled fluid update, onChangedBlock, attribute, state, particle and block landing providers exercise callback order, mutations, server class identity, particle positions/counts, nonfinite arithmetic, climbing cleanup and partial state after failures. Full fluid immersion, enchantment hooks, particle rendering and player/world integration remain pending." +} diff --git a/benchmarks/rust-living-motion-2026-10-07/scoped-parity.json b/benchmarks/rust-living-motion-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..5860939d5 --- /dev/null +++ b/benchmarks/rust-living-motion-2026-10-07/scoped-parity.json @@ -0,0 +1,228 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 18610, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingMotionOracle.java": "535cf4290c65b268fa7a258098fe6b687716ea3b4abf882cd60324c98f278d9d", + "tools/test_living_motion_parity.py": "8fe13a4f06beeb2e9edf322aee0120355a946fe8e0849c7ecee27dd6521d08ae", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "898a89475695fe1ca7f206f1d18cc548588f804899caa43c4a308edfa2a72d06", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/living_motion_fixture.rs": "f1ea835163c5b8168116f7b1e1af8e3c3312d5e8ab0f34c4dbde86dae6f4547e" + }, + "fixtures_sha256": { + ".local/rust-living-motion-parity/inputs.txt": "8603f89da46ca7e28eb08aa3e7ad314eeb3ae3ef572232361fb1d15d49c47822" + }, + "rust_output_sha256": "2d3b0d5b24dcc43fae025ec2b617ad433234634be55d9440ccbab8dba3eea1c6", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "2d3b0d5b24dcc43fae025ec2b617ad433234634be55d9440ccbab8dba3eea1c6", + "matched_output_lines": 113623 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "2d3b0d5b24dcc43fae025ec2b617ad433234634be55d9440ccbab8dba3eea1c6", + "matched_output_lines": 113623 + } + ], + "scope": "Actual default living jump power/boost/from-ground, gravity/effective-gravity, vertical liquid inputs, rider flight speed, air drag, Entity.applyGravity and finite addDeltaMovement. Traces field writes and lazy attribute/effect callbacks, both passenger classes, signed zero/nonfinite arithmetic, integer amplifier edges, callback mutations and failures. Effect amplifier fields are injected directly at boundaries. Entity-type jump/flight overrides, full effect/attribute storage, registered jump-factor binding and live gameplay integration remain pending." +} diff --git a/benchmarks/rust-material-condition-2026-10-06/scoped-parity.json b/benchmarks/rust-material-condition-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..9843a46c6 --- /dev/null +++ b/benchmarks/rust-material-condition-2026-10-06/scoped-parity.json @@ -0,0 +1,145 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 245, + "initial_conditions": 11288, + "context_operations": 217969, + "noise_resources": 64, + "condition_resources": 8, + "biome_resources": 67, + "biome_tag_resources": 86, + "biome_fixtures": 23, + "preliminary_fixtures": 61, + "ore_fixtures": 57, + "noise_fixtures": 24, + "initial_rules": 6271, + "codec_inputs": 8609, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialConditionOracle.java": "04a87405fd2a1c79baf4eb3a8895aa66dc96b8f6baffb9b486ef207f8b91b5ee", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAnchorOracle.java": "226628d98b89aadbdd374936575d033945e7064a900dbb050c662204dbc7e119", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeTemperatureOracle.java": "243bbc525c6aec24674e7f172c5fb4f7b50f9a679d8b9dfba40ea278219a2d28", + "tools/test_biome_temperature_parity.py": "68f84d02e7802349e491b8cb66e18d9b08c9e72ab2306b663667259e852cc2b1", + "tools/test_material_condition_parity.py": "01c82e1a768d9131f8f7e6d59d01ddb06272074469dbdcd8547f44f0a8fa152d", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "3968e2a337a6a23226c485057c79359e66df16683f00fb4ebc9fabb03910a015", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "476f1542d335eb02fb627b7480d708f4aa6b7f9929f4dbc2c646e15b063cf083", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "39e1a8807f9ae975ff5a4c92effe619050049a386549a94c0d1ddaebf66f24af", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "04ac9130138ea4ce67fc43f7701f5036972984724ffcd49bfe857d0693361d87", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "4ab2681a45108e5d2ea6fb761ea1cb7fa40b72833fa6190d2efe34ce29845c21", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "99926c7b867b752966084cdf2b20530dde8069703f4b3709bf623fefad425102", + "crates/horizon-world/src/worldgen.rs": "cffb5e72b59222dad13e57fa74ed4f553570a61a8773f27b5199444111ced2e0", + "crates/horizon-world/examples/material_condition_fixture.rs": "a9b6c0adf7308eebfa746baa84696ec6df75e6a0d93c5742958fb9a58e090000" + }, + "fixtures_sha256": { + ".local/rust-material-condition-parity/inputs.txt": "56215086f8ae7d82df35e05235d67da42749bd4f8b629bb55d9c408e6aab70ef", + ".local/rust-material-condition-parity/noises.json": "310b240c9b70586bb704ca44a915766a8d41d6a073183324c37184fcb317a992", + ".local/rust-material-condition-parity/conditions.json": "a417b8cd9e41ad6b45ea9ac8d587d70c0a50f0b0c4aa7d4812fce1a6c6016ba8", + ".local/rust-material-condition-parity/biomes.json": "9b26dc3b662627dc3bbbf8da209f287882ce79ff4daf8f454b994ddc7510df99", + ".local/rust-material-condition-parity/biome_tags.json": "f7ed4da9e7755712a1116b2fd64e749639f085d8698b5def3ecabae5ece87095" + }, + "rust_output_sha256": "02c3bcbfae34fe6f7eed98add6ef550a3dae15734eda587d269d622661c68633", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "02c3bcbfae34fe6f7eed98add6ef550a3dae15734eda587d269d622661c68633", + "matched_output_lines": 5627426 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "02c3bcbfae34fe6f7eed98add6ef550a3dae15734eda587d269d622661c68633", + "matched_output_lines": 5627426 + } + ], + "scope": "Actual runtime constructors and compiled evaluators for hole, steep, Y, water, stone-depth, vertical-gradient, noise-threshold, biome-membership, temperature and negated conditions, with actual MaterialRuleContext updates and secondary-noise caching. Both world random algorithms and named positional gradient factories, boundary/overflow arithmetic, floor/ceiling selection, reversed/equal gradient bounds, late compilation and repeated/changed context evaluations. Context surfaceDepth is injected after native updateXZ and the secondary sampler is a traced constant-noise override; these supplied inputs isolate condition behavior, with full MaterialSystem surface inputs checked separately. Direct and holder condition codecs cover all eight bundled definitions, canonical encoding, forward and nested references, default namespaces, numeric wrapping/truncation, required fields, invalid types and nested anchor alternatives. Cycles and bounded resource limits are typed Rust errors, not compared to native stack overflow. Actual BlockRule, SequenceRule, ConditionRule and BandlandsRule compilation/application additionally cover ordered short circuiting, nested and empty/singleton sequences, independent context versus application coordinates, late compilation and seeded band results/failures. Noise-threshold conditions additionally cover shared/separate XZ and XYZ cached suppliers, all bundled named noise resources under both random modes, traced changing source inputs, repeated coordinates/updates, late binding, float promotion, NaN/infinite thresholds and values. Encoded JSON numbers are compared as canonical double bits, including nonfinite Gson output tokens. Biome membership and temperature conditions additionally cover all bundled biome climate settings, possible-biome constant folding (including empty sets), context biome caching and XZ/Y invalidation, shared temperature caches across contexts, null biome results, query failures and lazy-condition retry behavior. Named biome-tag holders additionally cover every bundled biome tag, native TagLoader resolution/binding versus Rust TagDefinitions, encoded tag identity, namespace aliases, empty/duplicate/nested/optional entries, membership and possible-biome folding, predicate errors and conditional-rule application. Preliminary-surface conditions additionally cover lazy unit-spaced XZ plane sampling versus scalar fallback, traced sample order, ignored source-volume strides/Y extent, column minimum caching, block-height changes, partial density failures and retained buffers, same-column failure retries, floor/nonfinite conversions and wrapping arithmetic. Provider error occurrence is compared, not exception class or message. Preliminary planes are bounded to 1,048,576 samples in Rust. Ore-vein rules additionally cover eager density/richness volumes, lazy gap sampling, exact strided lattice hits and scalar misses, shared context versus independent application/random coordinates, both positional random modes, ordered draws and short circuiting, mutable/NaN/infinite sources, raw-ore chances, failed compilation and provider retries. Rust requires precompiled density roots for the same world context; live registry/tag reloads, rule codecs, registry-owner validation, arbitrary provider failures and full surface-stage application remain pending." +} diff --git a/benchmarks/rust-material-extension-2026-10-06/scoped-parity.json b/benchmarks/rust-material-extension-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..96b409158 --- /dev/null +++ b/benchmarks/rust-material-extension-2026-10-06/scoped-parity.json @@ -0,0 +1,134 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 410, + "extension_calls": 3920, + "biome_resources": 67, + "noise_resources": 64, + "constant_noise_fixtures": 142, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialExtensionOracle.java": "4ad5ad2836095f06394d84c9b86ca5866b6180dd6ed9f81bc038754051537184", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeTemperatureOracle.java": "243bbc525c6aec24674e7f172c5fb4f7b50f9a679d8b9dfba40ea278219a2d28", + "tools/test_material_extension_parity.py": "b4e03657bfcec04e1844f1c738d6dd28181b97686b8f07dbe32ba4b541e30364", + "tools/test_biome_temperature_parity.py": "68f84d02e7802349e491b8cb66e18d9b08c9e72ab2306b663667259e852cc2b1", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "3968e2a337a6a23226c485057c79359e66df16683f00fb4ebc9fabb03910a015", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "476f1542d335eb02fb627b7480d708f4aa6b7f9929f4dbc2c646e15b063cf083", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "39e1a8807f9ae975ff5a4c92effe619050049a386549a94c0d1ddaebf66f24af", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "04ac9130138ea4ce67fc43f7701f5036972984724ffcd49bfe857d0693361d87", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "4ab2681a45108e5d2ea6fb761ea1cb7fa40b72833fa6190d2efe34ce29845c21", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "99926c7b867b752966084cdf2b20530dde8069703f4b3709bf623fefad425102", + "crates/horizon-world/src/worldgen.rs": "cffb5e72b59222dad13e57fa74ed4f553570a61a8773f27b5199444111ced2e0", + "crates/horizon-world/examples/material_extension_fixture.rs": "3eae986504abfc5087b9f93d570aa26a3a0b4ad7dfc354c53cf887d7a2ad31a4" + }, + "fixtures_sha256": { + ".local/rust-material-extension-parity/inputs.txt": "9b688fb99c7ff971b5824749f9b6fef0cc647b8543efb7a0b1e52e24eba798be", + ".local/rust-material-extension-parity/noises.json": "310b240c9b70586bb704ca44a915766a8d41d6a073183324c37184fcb317a992", + ".local/rust-material-extension-parity/biomes.json": "9b26dc3b662627dc3bbbf8da209f287882ce79ff4daf8f454b994ddc7510df99" + }, + "rust_output_sha256": "8cdb9fb92fe6b66759941ece3ba56d6653c1bcebf1b6744ab3b74c7ad7bed9c5", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "8cdb9fb92fe6b66759941ece3ba56d6653c1bcebf1b6744ab3b74c7ad7bed9c5", + "matched_output_lines": 233100 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "8cdb9fb92fe6b66759941ece3ba56d6653c1bcebf1b6744ab3b74c7ad7bed9c5", + "matched_output_lines": 233100 + } + ], + "scope": "Actual private MaterialSystem erodedBadlandsExtension and frozenOceanExtension methods, with ordered noise-coordinate/block-read/block-write traces and complete resulting columns. Both positional random modes, actual seeded bundled noises, all biome climate settings, same-block identity across state properties, air variants, flowing water, waterlogged nonwater blocks, snow/ice thresholds, repeated calls and height clipping by supplied column providers. Constant overrides cover thresholds, signed zero, NaN/infinity, sea-level integer extremes and bounded provider read failures. Native exception class/message and full chunk/heightmap/postprocessing integration are not compared here. Rust caps extension loops to 1,048,576 iterations; oversized synthetic scans hit the fixture provider limit in both implementations. Full surface-stage and playable parity remain pending." +} diff --git a/benchmarks/rust-material-rule-library-2026-10-06/scoped-parity.json b/benchmarks/rust-material-rule-library-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..4f0d1c51a --- /dev/null +++ b/benchmarks/rust-material-rule-library-2026-10-06/scoped-parity.json @@ -0,0 +1,149 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "resources": { + "noises": 64, + "densities": 55, + "rules": 42, + "conditions": 8, + "biomes": 67, + "biome_tags": 86 + }, + "fixtures": 12, + "codec_inputs": 142, + "rule_applications": 665712, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialConditionOracle.java": "04a87405fd2a1c79baf4eb3a8895aa66dc96b8f6baffb9b486ef207f8b91b5ee", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAnchorOracle.java": "226628d98b89aadbdd374936575d033945e7064a900dbb050c662204dbc7e119", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeTemperatureOracle.java": "243bbc525c6aec24674e7f172c5fb4f7b50f9a679d8b9dfba40ea278219a2d28", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "tools/test_material_rule_library_parity.py": "21bf17b6bebd7dab2927be075f9098b773a56365462cf910d69160995a7b6939", + "tools/test_material_condition_parity.py": "01c82e1a768d9131f8f7e6d59d01ddb06272074469dbdcd8547f44f0a8fa152d", + "tools/test_biome_temperature_parity.py": "68f84d02e7802349e491b8cb66e18d9b08c9e72ab2306b663667259e852cc2b1", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "3968e2a337a6a23226c485057c79359e66df16683f00fb4ebc9fabb03910a015", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "476f1542d335eb02fb627b7480d708f4aa6b7f9929f4dbc2c646e15b063cf083", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "39e1a8807f9ae975ff5a4c92effe619050049a386549a94c0d1ddaebf66f24af", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "04ac9130138ea4ce67fc43f7701f5036972984724ffcd49bfe857d0693361d87", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "4ab2681a45108e5d2ea6fb761ea1cb7fa40b72833fa6190d2efe34ce29845c21", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "99926c7b867b752966084cdf2b20530dde8069703f4b3709bf623fefad425102", + "crates/horizon-world/src/worldgen.rs": "cffb5e72b59222dad13e57fa74ed4f553570a61a8773f27b5199444111ced2e0", + "crates/horizon-world/examples/material_condition_fixture.rs": "a9b6c0adf7308eebfa746baa84696ec6df75e6a0d93c5742958fb9a58e090000" + }, + "fixtures_sha256": { + ".local/rust-material-rule-library-parity/inputs.txt": "194b14c212a1fb423cb689141d2f38b79654c9f665616094ca0f6a70e2220633", + ".local/rust-material-rule-library-parity/facts-client.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-material-rule-library-parity/facts-server.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-material-rule-library-parity/noises.json": "310b240c9b70586bb704ca44a915766a8d41d6a073183324c37184fcb317a992", + ".local/rust-material-rule-library-parity/densities.json": "28fe94e1b7cf3a06edfa2337319c03b5374c15bf18235570ee76e9c498c2f450", + ".local/rust-material-rule-library-parity/rules.json": "d5410ec3af96cf17a672a2f4c0a27b4e10ac4e4c75d63c52f6de406b64acbe57", + ".local/rust-material-rule-library-parity/conditions.json": "54a470a4513fb34a23e0fe66b0a5129a468dbd0002f5b2839437a9861a6005b9", + ".local/rust-material-rule-library-parity/biomes.json": "9b26dc3b662627dc3bbbf8da209f287882ce79ff4daf8f454b994ddc7510df99", + ".local/rust-material-rule-library-parity/biome_tags.json": "4006b76c24f616cb457a6fdad816db9b27f4528fe6daaed5747f1f79cf6225cf" + }, + "rust_output_sha256": "8f4055c8b6b4ca1a01c1451808a76a79ea5453cc5bfca21d879810a3322ca10d", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "8f4055c8b6b4ca1a01c1451808a76a79ea5453cc5bfca21d879810a3322ca10d", + "matched_output_lines": 678174 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "8f4055c8b6b4ca1a01c1451808a76a79ea5453cc5bfca21d879810a3322ca10d", + "matched_output_lines": 678174 + } + ], + "scope": "All bundled material-rule definitions loaded against authenticated condition, biome/tag, block-state, noise and density registries, then compiled/evaluated for both world random modes. Forward/nested rule holders, all five rule kinds, malformed/omitted fields and property fallback, actual seeded density/richness/gap sources, strided chunk-volume caching, scalar fallback and independent context/application positions are covered. Surface depth and secondary noise remain supplied context inputs; preliminary density is zero for isolation. All bundled biome climates are used, with unrestricted or complete possible-biome sets. Rust library definitions are immutable and atomically loaded, with typed cycle/resource-bound errors. Rule/density encoding, live reload/registry owner validation, complete surface-stage chunks and gameplay remain pending." +} diff --git a/benchmarks/rust-material-stage-2026-10-06/scoped-parity.json b/benchmarks/rust-material-stage-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..eb6e129f8 --- /dev/null +++ b/benchmarks/rust-material-stage-2026-10-06/scoped-parity.json @@ -0,0 +1,180 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "resources": { + "noises": 64, + "densities": 55, + "rules": 42, + "settings": 7, + "carvers": 4, + "conditions": 8, + "biomes": 67, + "biome_tags": 86, + "block_tags": 300 + }, + "fixtures": 79, + "generated_carving_passes": 42, + "carving_passes": 158, + "top_material_queries": 7584, + "surface_builds": 106, + "terrain_builds": 42, + "biome_chunks": 378, + "biome_values": 400896, + "block_values": 21757952, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialStageOracle.java": "2eda078914d39c40ff995e465a0be02dc413d9de8fd9272b9658a4d1587762b5", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialConditionOracle.java": "04a87405fd2a1c79baf4eb3a8895aa66dc96b8f6baffb9b486ef207f8b91b5ee", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAnchorOracle.java": "226628d98b89aadbdd374936575d033945e7064a900dbb050c662204dbc7e119", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeTemperatureOracle.java": "243bbc525c6aec24674e7f172c5fb4f7b50f9a679d8b9dfba40ea278219a2d28", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeExport.java": "f9a773713cf21b69bfa10018b76f27b953bda140ede9934f43d3aa3091101cf5", + "tools/test_material_stage_parity.py": "002cc17628a05b94ce4d40e1e5c29240d1a87ea8fc29281794e0a2e42be7add2", + "tools/test_material_condition_parity.py": "01c82e1a768d9131f8f7e6d59d01ddb06272074469dbdcd8547f44f0a8fa152d", + "tools/test_biome_temperature_parity.py": "68f84d02e7802349e491b8cb66e18d9b08c9e72ab2306b663667259e852cc2b1", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "476f1542d335eb02fb627b7480d708f4aa6b7f9929f4dbc2c646e15b063cf083", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "ecf8fd3be57fa773033bac4a303a951f8c12dcd5cbb4d5432a21534525a69546", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "db91c00342842cab4f001b1428692d12dce7fa43b0704a7c0bb6f4f26ad8e2d9", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/height_provider.rs": "c9a148cdbd392b4ae998e466120c0870eb121736366a160347e1a697bdad914f", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "42823918deec5e149dc729a95bfe54aa32d91604098d5eb8452da0162d557d22", + "crates/horizon-world/src/worldgen/value_provider.rs": "7083e7a494894e080c252e7fb485651eb9f54e72043122e4f2b5bee5749e6184", + "crates/horizon-world/src/worldgen.rs": "58527080379e82d834763d661ebf51fb8f9a83f6d530c85ddf26bf0ea2d53f7d", + "crates/horizon-world/examples/material_stage_fixture.rs": "58f2b8cbcc537c43c4596a9d0ef937ae4e23612a49a7865ab5546bc346726d96" + }, + "fixtures_sha256": { + ".local/rust-material-stage-parity/inputs.txt": "7b0e92acc72ccf74f8f89a0feb2c5d42a65cf479ce86ed4338c2fe01d2e2cb83", + ".local/rust-material-stage-parity/presets-client.json": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9", + ".local/rust-material-stage-parity/presets-server.json": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9", + ".local/rust-material-stage-parity/facts-client.json": "e4b5e33240a44a6c86a5ec0a3793c22b507e8aea31ea85ed6d6c9d3069384e7f", + ".local/rust-material-stage-parity/facts-server.json": "e4b5e33240a44a6c86a5ec0a3793c22b507e8aea31ea85ed6d6c9d3069384e7f", + ".local/rust-material-stage-parity/noises.json": "310b240c9b70586bb704ca44a915766a8d41d6a073183324c37184fcb317a992", + ".local/rust-material-stage-parity/densities.json": "28fe94e1b7cf3a06edfa2337319c03b5374c15bf18235570ee76e9c498c2f450", + ".local/rust-material-stage-parity/rules.json": "b47af5bc7a19f2f3796326b310af49d677432ac87c6c9f4dc9c9cc4664fd5afb", + ".local/rust-material-stage-parity/settings.json": "dcc7d892420fb3faadab36c935ef0d2d8709a038a8fb944c00e354f417b3b586", + ".local/rust-material-stage-parity/carvers.json": "b09cf69ff328cad7836da8cd9565d0fb7ecf8bc35aebf17815f40f32a6a0ca4e", + ".local/rust-material-stage-parity/conditions.json": "54a470a4513fb34a23e0fe66b0a5129a468dbd0002f5b2839437a9861a6005b9", + ".local/rust-material-stage-parity/biomes.json": "9b26dc3b662627dc3bbbf8da209f287882ce79ff4daf8f454b994ddc7510df99", + ".local/rust-material-stage-parity/biome_tags.json": "4006b76c24f616cb457a6fdad816db9b27f4528fe6daaed5747f1f79cf6225cf", + ".local/rust-material-stage-parity/block_tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-material-stage-parity/presets.json": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9" + }, + "rust_output_sha256": "6cf2554dae38af3e828ce4f04934b5f08b1db0c034c5e95f4087e3a17ef2ae3d", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "6cf2554dae38af3e828ce4f04934b5f08b1db0c034c5e95f4087e3a17ef2ae3d", + "matched_output_lines": 6733382 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "6cf2554dae38af3e828ce4f04934b5f08b1db0c034c5e95f4087e3a17ef2ae3d", + "matched_output_lines": 6733382 + } + ], + "scope": "Actual MaterialSystem.buildSurface and topMaterial against ProtoChunk before lighting, with complete raw sections, WG heightmap words, ordered fluid-postprocessing offsets and biome-lookup traces. All bundled rule registries, both seeded random modes, real surface/band/extension noises, real or supplied preliminary density, ore densities, empty/populated chunks, synthetic vertical spans/cavities/nondefault solids, clipped generation writes, lazy/primed maps and repeated surface builds sharing density contexts. Synthetic prefilled fixtures use a supplied deterministic block-position biome resolver; generated terrain fixtures first generate a 3x3 biome neighborhood through actual ChunkGenerator.doCreateBiomes, using pinned multi-noise preset tables or the End biome source. Complete stored biome values and subsequent BiomeManager block/quart lookup traces are compared. Both runtimes load the biome-source JSON against their biome/preset registries before generation. Rust imports independently authenticated preset tables; preset builders remain outside this comparison. Block air/fluid identities are imported from both authenticated JARs and motion predicates use resolved block tags. Each fixture applies an explicit carving mask twice through actual NoiseBasedChunkGenerator.applyCarvingMask after surface and top-material queries. The native aquifer is wrapped only to trace ordered computeSubstance/results/fluid-scheduling queries. Filtered and unfiltered passes, uncarvable tags, grass/mycelium/dirt restoration, repeated writes and disjoint runs are compared, followed by full chunk/heightmap/postprocessing dumps. Generated fixtures additionally invoke actual generateCarvers with biome carver settings selected from a 17x17 origin neighborhood, ordinal world seeds, native start checks and cave/canyon paths. The same source is reused after biome filling, preserving prior search state; a traced wrapper exposes uncached quart lookup order. Terrain/aquifer/postprocessing state is compared after procedural carving before explicit mask stress. Native carver settings retain actual carver holder lists while placed features are empty, as features are not evaluated in this stage. Each completed fixture also queries topMaterial at column edges and interior positions, above/below vertical bounds and around sea level, in dry and submerged contexts; these bind fresh one-cell material contexts without possible-biome restrictions. Empty blending only. Generated terrain fixtures also invoke actual NoiseBasedChunkGenerator.doFill before the surface stage, sharing a NoiseChunk and comparing full chunk state before and after surface builds for all bundled terrain routers and aquifers. Biome/feature/structure stages, nonempty blending, lighting and complete generated worlds/gameplay remain pending." +} diff --git a/benchmarks/rust-material-surface-2026-10-06/scoped-parity.json b/benchmarks/rust-material-surface-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..13c1637ed --- /dev/null +++ b/benchmarks/rust-material-surface-2026-10-06/scoped-parity.json @@ -0,0 +1,118 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 277, + "surface_queries": 5263, + "noise_resources": 64, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialSurfaceOracle.java": "37ecc58f73344830bc743075d813411ace42032e23b6c4572a1d2e5206d30fc3", + "tools/test_material_surface_parity.py": "8fcc300339e33017c4475adce5ae1d0fb79ae7eae95f70015fda58f8d383c1a2", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "3968e2a337a6a23226c485057c79359e66df16683f00fb4ebc9fabb03910a015", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry.rs": "f46065659e60eb5e84ad69b9f3b5e94dc87ee19de16408817e26f23d16b6c7e7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "134cf93b53a40fb1ed0e0170c90316c80e270773b2968c63dc3f9cef2c941bff", + "crates/horizon-world/src/worldgen.rs": "3460256893108079ecebed39d496b0d1ad17feb5193455ad8c51f441dfd19b2f", + "crates/horizon-world/examples/material_surface_fixture.rs": "5283d0c1cabfc0585e259525bba09a1acf30a749cfa7d8735bac415f3505305f" + }, + "fixtures_sha256": { + ".local/rust-material-surface-parity/inputs.txt": "2f070e7a9cc33fd7c5fba9a76dfedde9514aca66e36c7599b46b5a2d2e2ab0eb", + ".local/rust-material-surface-parity/noises.json": "310b240c9b70586bb704ca44a915766a8d41d6a073183324c37184fcb317a992" + }, + "rust_output_sha256": "f36a2c1972b0cce429fd2ef23a4dae9f91b134ca161f085c27da03b2ff74e0f3", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "f36a2c1972b0cce429fd2ef23a4dae9f91b134ca161f085c27da03b2ff74e0f3", + "matched_output_lines": 122988 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "f36a2c1972b0cce429fd2ef23a4dae9f91b134ca161f085c27da03b2ff74e0f3", + "matched_output_lines": 122988 + } + ], + "scope": "Actual MaterialSystem.generateBands and constructor-generated terracotta bands, protected getBand/getSurfaceDepth/getSurfaceSecondary methods. Both random streams, direct and world-root-derived clay_bands child streams, preconsumed inputs, complete 192-state band arrays and subsequent RNG draws. Surface lookups use independently authenticated bundled noise definitions, world-root positional random factories and optional constant-noise overrides for rounding/cast edges, nonfinite float values and signed integer overflow/remainder. Raw float-to-double secondary bits use canonical NaNs. Registry adapter identity binding, full material rule evaluation, eroded badlands/frozen ocean extensions and surface-stage chunk integration remain pending." +} diff --git a/benchmarks/rust-model-baking-2026-10-06/scoped-parity.json b/benchmarks/rust-model-baking-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..967425995 --- /dev/null +++ b/benchmarks/rust-model-baking-2026-10-06/scoped-parity.json @@ -0,0 +1,45 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "resource_models": 2883, + "graph_fixtures": 440, + "rejected_roots": 1039, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaModelBakingOracle.java": "fca267347a21149791a3260826be98df55705208c30396277ef6c3feba875748", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_cuboid_model_parity.py": "3b7c018570b0f609aae43cef60ff3139c543d5d629be804a5aa257e3ab2dd67c", + "tools/test_model_resolution_parity.py": "d9595f2f1442f1f590b72d2a46600657e79ae103bec3d4c45db98242b964bde0", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "7b4ab0ffa35af7ea8b6e38525f18ff6c3e94768198915f5ffe560d84263423f8", + "crates/horizon-assets/Cargo.toml": "fadb78cf819e026500606c45d27138ed67fcbbc967ae8cee6c1e7c82c9046b36", + "crates/horizon-assets/examples/cuboid_model_fixture.rs": "97609d90e3f6ce340f3590296db2dc778113bb2b33c7d1b54080a1d6f3023f40", + "crates/horizon-assets/examples/model_baking_fixture.rs": "59caca09dd5afd0b70a2e8fdb8e949deb9322f00adc617918b33d1e7e5b0b522", + "crates/horizon-assets/examples/model_resolution_fixture.rs": "c071067140299e49345a6ebd94e15b3b6d853cb9ae11d8de46e3cbdfb8b01f0e", + "crates/horizon-assets/examples/support/mod.rs": "bcf5a6d8a54845982191e037911c24139237771d6afa4b01b1e83c011489c3f5", + "crates/horizon-assets/src/bake.rs": "0bc519e93ad8200d89543ceb5c811dd82bbeb0e9003b143385c8a03e758dfe65", + "crates/horizon-assets/src/json.rs": "e7b89bf4852f561a0e5bf1a984857c61e755961dfd86fcc326b6d55558615f39", + "crates/horizon-assets/src/lib.rs": "5fe567bdf1e63230cee2b960719c5cb6166176a674772955329a9d04cf22b9db", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541" + }, + "fixtures_sha256": { + ".local/rust-model-baking-parity/inputs.jsonl": "aba24d38f4fc1af060502f983923c2f279c016d0fd412d40f6d50093fac1d811" + }, + "rust_output_sha256": "9216be3bbae9e59bb89b6ed780ccedc5608cd4583c8e7527e50b165a0d8d30da", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "9216be3bbae9e59bb89b6ed780ccedc5608cd4583c8e7527e50b165a0d8d30da", + "matched_output_lines": 7100 + } + ], + "scope": "Actual client FaceBakery geometry overload with a real unit-atlas sprite and default JOML math options. Identity blockstate transform, all bundled cuboid geometry and synthetic rotations, rescaling, default/explicit UVs, winding, degenerate and reversed bounds, inherited models and missing materials. Positions, UVs and element matrix coefficients compare by float bits. This does not cover blockstate transforms/UV lock, atlas packing, transparency classification, lighting, GPU rendering or gameplay." +} diff --git a/benchmarks/rust-model-resolution-2026-10-06/scoped-parity.json b/benchmarks/rust-model-resolution-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..5b18ce2cf --- /dev/null +++ b/benchmarks/rust-model-resolution-2026-10-06/scoped-parity.json @@ -0,0 +1,42 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "resource_models": 2883, + "graph_fixtures": 439, + "rejected_cyclic_roots": 702, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaModelResolutionOracle.java": "bd6581d68c69a96586d158ede8be4f3270d0d7a16288ca82dddab16785685b26", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "tools/test_model_resolution_parity.py": "d9595f2f1442f1f590b72d2a46600657e79ae103bec3d4c45db98242b964bde0", + "tools/test_cuboid_model_parity.py": "3b7c018570b0f609aae43cef60ff3139c543d5d629be804a5aa257e3ab2dd67c", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "7b4ab0ffa35af7ea8b6e38525f18ff6c3e94768198915f5ffe560d84263423f8", + "crates/horizon-assets/Cargo.toml": "fadb78cf819e026500606c45d27138ed67fcbbc967ae8cee6c1e7c82c9046b36", + "crates/horizon-assets/examples/cuboid_model_fixture.rs": "97609d90e3f6ce340f3590296db2dc778113bb2b33c7d1b54080a1d6f3023f40", + "crates/horizon-assets/examples/model_resolution_fixture.rs": "c071067140299e49345a6ebd94e15b3b6d853cb9ae11d8de46e3cbdfb8b01f0e", + "crates/horizon-assets/examples/support/mod.rs": "bcf5a6d8a54845982191e037911c24139237771d6afa4b01b1e83c011489c3f5", + "crates/horizon-assets/src/json.rs": "e7b89bf4852f561a0e5bf1a984857c61e755961dfd86fcc326b6d55558615f39", + "crates/horizon-assets/src/lib.rs": "0d31dd0fa84d7b4467a78a1a2b8a8e179533ef5e64a7cbae88e5358e59160a40", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541" + }, + "fixtures_sha256": { + ".local/rust-model-resolution-parity/inputs.jsonl": "9b3f9cb64bdb84303a3393ab035a00c11e857a5140e2992c0c5ebac0da2d3744" + }, + "rust_output_sha256": "146858eb5c73a16d71bf255bbd21f6082f330df5b322f10a288b4149b2cc98a4", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "146858eb5c73a16d71bf255bbd21f6082f330df5b322f10a288b4149b2cc98a4", + "matched_output_lines": 5648 + } + ], + "scope": "Actual ModelDiscovery and ResolvedModel/TextureSlots APIs over all bundled block models plus synthetic parent/alias graphs. Compares inherited geometry, AO/gui defaults, per-context display transforms, resolved materials, missing-model fallback, ignored built-in override, cyclic parent rejection, long alias/parent chains and slot lookup. Native rejection text/logging and discovery map iteration order are not compared. Geometry is shared through Arc in Rust; this does not prove quad baking, blockstate dispatch, pixels or gameplay." +} diff --git a/benchmarks/rust-movement-emission-2026-10-07/scoped-parity.json b/benchmarks/rust-movement-emission-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..6d0994a6c --- /dev/null +++ b/benchmarks/rust-movement-emission-2026-10-07/scoped-parity.json @@ -0,0 +1,219 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 53036, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementEmissionOracle.java": "8f19d72b0d7ef53dead2be1b97a36c129182bb9849d75c9eddca5075112f4edf", + "tools/test_movement_emission_parity.py": "eed6f8507308a7c7a785abe4bb017bec0e206f63672834e00957b208066915b9", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "c875482eb6dd1783e01b3c223464b08e9b6d52c259ac83b17f960b5c6558068e", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/movement_emission_fixture.rs": "d511ef20357c6231b13f85c5bf8d7554d080ea0ce927247a935aca38c65c1eca" + }, + "fixtures_sha256": { + ".local/rust-movement-emission-parity/inputs.txt": "28788ffb694d89eda22a5c3ef510d2258ffe0827e53e526ae83bc5bd76d8e6e6" + }, + "rust_output_sha256": "eb84dc864380d2b7830b71ec8bb7391a86f79d0eb6e9f9872e495b8601cbf544", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "eb84dc864380d2b7830b71ec8bb7391a86f79d0eb6e9f9872e495b8601cbf544", + "matched_output_lines": 598611 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "eb84dc864380d2b7830b71ec8bb7391a86f79d0eb6e9f9872e495b8601cbf544", + "matched_output_lines": 598611 + } + ], + "scope": "Actual Entity movement emission, private block vibration/step dispatch, flapping dispatch and native next-step arithmetic. Compares distance accumulation, climbable/powder predicates, legacy/current support ordering, ground/crouch/rail/swimming guards, sound/event emissions, float boundaries, NaN/infinity, callback mutations and partial state on failures. Block predicates, world reads and sound callbacks are controlled; crystal sound predicate is false in this scope. Registered sound selection, audio playback, full entity movement and gameplay remain separate work." +} diff --git a/benchmarks/rust-movement-registry-2026-10-07/scoped-parity.json b/benchmarks/rust-movement-registry-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..038fb976e --- /dev/null +++ b/benchmarks/rust-movement-registry-2026-10-07/scoped-parity.json @@ -0,0 +1,220 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "registry_states": 35723, + "registry_blocks": 1286, + "fixtures": 648054, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementRegistryOracle.java": "49fcc1f4348a8e279dcb916ae149de8c97f15df54ff1a675826b7c6c3dda06d9", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_movement_registry_parity.py": "537dd0aa67e16d31e433351cf61820f5916bc8b98654deb45015e26df7639baa", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/examples/movement_registry_fixture.rs": "97640fdbacfc94464cec8904fe7b4e8b912e3160d91d40234d77eaa1d7ccd1a0", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "c81f2a9a49dd889333894af2498cd1b44c17932bd0d5df026f27346acd6b5436", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_properties.rs": "9c78bed0d30c8b9cfaa413b9b81b0bf94861605c13b26754e09b24e83d75a227", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "8ac9e90fe899855036658afd862ff20c4dcd15d1bd3f92a763c4795fecf0549f", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "fixtures_sha256": { + ".local/rust-movement-registry-parity/inputs.txt": "9b94e30e101bf16b40a74685515b2ff3467c8bac92f6fcc4450c49789198f7a5", + ".local/rust-movement-registry-parity/registry-info.json": "58c9ad06a3b4af632e45a65d7fe2b930d0b05a5a17a490267dc3c7e98d9e23f7", + ".local/rust-movement-registry-parity/movement-properties.nbt": "4b5646cbb675025efc9ac6e24b024ac2edddfa6725eb8e158357beda622a3888", + ".local/rust-movement-registry-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-movement-registry-parity/tags.json": "5e1301e5a9abf7e4de93af5dae3a157e852dbdb4ea345c2eb626305a605d4f98" + }, + "rust_output_sha256": "81c05fbffc18b7eef6fbc778afbdb6032b782d1d245d900093a07efe7b7f7006", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "81c05fbffc18b7eef6fbc778afbdb6032b782d1d245d900093a07efe7b7f7006", + "matched_output_lines": 2300888 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "81c05fbffc18b7eef6fbc778afbdb6032b782d1d245d900093a07efe7b7f7006", + "matched_output_lines": 2300888 + } + ], + "scope": "Imports raw registered friction/speed/jump/bounce/fall-distance coefficients and fence-gate type; binds resolved fence/wall/bounce-suppression tags. Actual native getters independently verify every state. Entity support positions and jump/speed factors run every registered state with natural, empty and universal tags; additional mixed-block queries, null support and failures exercise lazy behavior. Does not establish live player travel, bounce effects or full gameplay." +} diff --git a/benchmarks/rust-movement-support-2026-10-07/scoped-parity.json b/benchmarks/rust-movement-support-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..b2d933324 --- /dev/null +++ b/benchmarks/rust-movement-support-2026-10-07/scoped-parity.json @@ -0,0 +1,211 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 12392, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementSupportOracle.java": "64fa67e3b56e41baaa7e858eada1c640b28f22f2d1908729c434ef366b17eb0a", + "tools/test_movement_support_parity.py": "7e18f5b72b6160c0b9ba2ea1479ab718d4c068c0411926f146f0d3b7dc0a91c7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "4656150b8935049b526c8342ef842cf1f691d13aeaf6429d3c9872810cc93254", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "8ac9e90fe899855036658afd862ff20c4dcd15d1bd3f92a763c4795fecf0549f", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/movement_support_fixture.rs": "e43fdcebf23d39fb072c9d81a812fbc2b51dfd45501f0ed697250e44d47fc639" + }, + "fixtures_sha256": { + ".local/rust-movement-support-parity/inputs.txt": "4bc148e12dee21d1fd4ff0704cd8968491bfa9f1852541a828c15c32336e5b0c" + }, + "rust_output_sha256": "249eb9ea77c304c45bbcfd0e93d7f6066e5baad89b49197bf08db218f1d5f481", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "249eb9ea77c304c45bbcfd0e93d7f6066e5baad89b49197bf08db218f1d5f481", + "matched_output_lines": 51572 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "249eb9ea77c304c45bbcfd0e93d7f6066e5baad89b49197bf08db218f1d5f481", + "matched_output_lines": 51572 + } + ], + "scope": "Actual Entity.getOnPos(float), all three public support-position wrappers, getBlockJumpFactor and getBlockSpeedFactor. Controlled block providers vary fence/wall tags, gate type, water/bubble identities and float factors. Compares lazy query order, cached block position, support-coordinate retention, float offset widening, floor behavior, nonfinite inputs and failures. Jump queries the lower block unconditionally; speed can short-circuit. This does not establish registered movement property provisioning, LivingEntity movement efficiency, live entity storage or full gameplay." +} diff --git a/benchmarks/rust-native-attribute-updates-2026-10-07/input-scene.json b/benchmarks/rust-native-attribute-updates-2026-10-07/input-scene.json new file mode 100644 index 000000000..ed147775d --- /dev/null +++ b/benchmarks/rust-native-attribute-updates-2026-10-07/input-scene.json @@ -0,0 +1,354 @@ +{ + "schema": 2, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "fixtures": 710, + "operations": 30025, + "sources_sha256": { + "tools/test_native_scene_motion.py": "378aab3e86084e73e3405b38e350f55f9088f14af6424aa69960de092c6b4066", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneMotionOracle.java": "8297b477a2374b09589ff0195643614cb385c18d81aba6c1976ba13c56ccabb6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java": "85570f2f5a98bc508f887bd61d3266cda1f6f8ba06d304241aa2128a4650f66d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockLandingOracle.java": "e397acdbaf2702f358c90ba53a804afa26d7f29a278884c0e779b18f1ae40e63", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementRegistryOracle.java": "49fcc1f4348a8e279dcb916ae149de8c97f15df54ff1a675826b7c6c3dda06d9", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageSourceOracle.java": "0cf0126d69d1052dea74a6bfb5a97250ab69d8f7a95360d9c6399fe03376dcd2", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSprintInputOracle.java": "f66f73f89c2c59d20d0dcca82e86b2115495921a5a7c49b080017abcea12fd7a", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/examples/scene_motion_probe.rs": "d1b1436d026da48ec721d24c7a71e4d9f39e87f32496b448ab9b160f72052d6f", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "e25b3543c07f31c2a9d23d811792de9a33290263c7c7445549a0682f6935d8a5", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_statistics.rs": "fe28061e29c41f8f399d29cce8c468a63854613702b5aa525c0f0fd98cb87f9a", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/attribute_updates.rs": "d8fa55efc02943b3dbe1868651fe7dabbedac8cda102b27611507d66d0f5b0cf", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "2b80c381378ee64a278dba524245d9bdfb67c50d9b055e2d4034dcddcfc2aa08", + "crates/horizon-client/src/lib.rs": "c0731ad0ac1308c8e21fb36d0e2c74002b2bd7203b6096cfbda6b320923b1b3b", + "crates/horizon-client/src/main.rs": "a8917e0dfb8b03c7896610af526a695a77e7bca4c9379689f0ca19b87f25cd14", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "4d37931e63470145120f33005f86da067f61d10c4149a6d0c123c2ad47d1d094", + "crates/horizon-client/src/pose.rs": "a06822319ebfcc1db53f656ae362ac9ee958090f0a4ac1ba5a707dbe1a0d78e2", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprint.rs": "6f5ba5ea8e9a19872b26c1d7b5073e29549f2d820a0fe46e5450c9e7446e98b2", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7" + }, + "resources": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "input_sha256": "2d897211ef4cc0eee0c0fe8008d0dba1fb73a6e89836e6035164997fdd55d3a9", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "427b22c5249debe77e4d253ab4e15c0c48bc8380a5c819f5d5ed295462f39b74", + "matched_output_lines": 210885, + "identity_input_sha256": "c101fefd99fec7560b7851f4f4c3e59cd8654ddd0775728f93c42c05c5fe2a83", + "rust_output_sha256": "427b22c5249debe77e4d253ab4e15c0c48bc8380a5c819f5d5ed295462f39b74" + } + ], + "scope": "Client sprint scene executes the real LocalPlayer.aiStep prefix through sprint decisions, stopping at the riding/parent movement boundary, followed by real LocalPlayer.modifyInput and the native server actor simulation. Sprint setters dispatch to that server actor, sharing its actual FoodData and collision conditions. Compares local sprint timer/input history and actual attribute changes, movement, distance exhaustion and hunger. Actual local crouch selection precedes new keyboard input; slowdown, sprint eligibility and pose-dependent dimensions share resident state. No effects, equipment, vehicles or fluid physics. Full client/server tick and networking remain unfinished. Stored PlayerMotion binds resident client chunks and registered attributes/coefficients to air travel, jumping, Entity.move, step resolution, ground/support updates, restitution and speed factors. Repeated native Player.travel/jump/move and actual Player.aiStep / direct LivingEntity.aiStep compare position, velocity, bounds, collision/ground flags, support, climb state, fall-reset field, both sync flags, speed, head yaw, jump trigger and jump delay by exact bits. Prepared-local-input Player.aiStep paths verify the stored speed refresh after movement, with empty inventory and no nearby entities. Travel uses the actual Player.getSpeed movement-attribute query, independently of that stored base-living speed field; both getter and setter execute native bodies. Dry aiStep includes small-velocity cleanup, input damping, held/released jump timing and server frost-modifier removal. Snapshots also compare all allocated attribute instances, base/cache/dirty state, modifier values/operations/permanence and pending update/sync membership. Per-reference JVM holder/instance hashes are replayed so pending callback order and resulting ordered events also match. Dry resident scene with standing, crouching and crawling bounds, cached eye height, native pose-fit selection and ledge backoff; zero frozen ticks, empty equipment, no interpolation, fluids, vehicles, effects or other entities. The oracle controls pose storage and invokes actual native refreshDimensions on changes; full synchronized pose schema and network notifications remain separate. Actual pending attribute refresh runs after player movement and before pose selection in simulation operations, clamping health/absorption and rebuilding scale-dependent dimensions. Native ServerPlayer waypoint-receive and inherited transmit callbacks are compared as ordered requests; the waypoint manager and its network delivery remain controlled consumers. Direct refresh operations and the full enclosing tick remain separate boundaries. Actual LivingEntity.checkFallDamage, registered Block.fallOn/bounceOn and Player/LivingEntity.causeFallDamage are composed, including float-narrowed fall-distance accumulation, reset, last-climb clearing, safe-fall and damage-multiplier attributes, impulse exemptions and ordered landing particle/sound/statistic/hit-ground/damage requests. Farmland pushes the stored player and replaces actual chunk state; repeated turtle-egg changes preserve hatch. Block state at the landing fixture is compared after every operation. World RNG is a seeded native legacy stream. Actual ServerPlayer/Player/LivingEntity hurt dispatch now updates native synchronized health and player absorption, modified armor/toughness reduction, exhaustion, damage cooldown/last-source state and velocity synchronization. Native health storage and dirty flags are compared after every operation. Damage sources use actual decoded/tagged pinned damage registries. ServerPlayer jump statistics and exhaustion are included; dead-or-dying state disables movement input and jumping. Empty equipment/hands/effects, configurable difficulty and natural regeneration, damage gamerules enabled, loaded client and no spawn-extra fall particles define this scene domain. Ordered health/statistic/combat-record/broadcast/sound/criterion/death requests are compared; criterion argument payloads retain the separate combat gate. Actual health changes are applied, but audiovisual playback, persistent statistics, combat tracker internals, full death/drop/respawn services, block neighbor/drop/block-entity callbacks, movement emission, block-inside and networking remain controlled consumers. Actual FoodData.tick and ServerPlayer.tickRegeneration now share the same stored health, attributes, exhaustion and registered starvation damage. Snapshots compare food level, saturation, exhaustion, timer and tick count. Cases cover all four difficulties, regeneration rule changes, absorption during starvation, Peaceful recovery, timer overflow and nonfinite food values. Simulation operations compose clock setup, actual player movement and actual food ticking in their native order, including fall damage followed by regeneration in the same tick. Explicit clock operations establish cooldown/hurt-time/game-time/tick-count state; full enclosing native tick/doTick methods are not invoked by those setup operations. Input preparation has its own client comparison. ServerPlayer.checkMovementStatistics executes on accepted resident deltas after movement and before food ticking. Additional direct method fixtures cover all 512 overlapping passenger/swim/eye-water/water/climb/ground/sprint/crouch/glide flag combinations, invulnerable abilities, centimeter rounding, overflow, signed zero and nonfinite deltas. Those query contexts apply only to the statistics method; fluid/vehicle/glide physics remain unbound. ServerGamePacketListener packet acceptance/rejection and scheduling are not executed. No full Player.tick, consumable item-use lifecycle, local input lifecycle, nonempty inventory/equipment ticks, full freezing, complete death lifecycle or full gameplay parity claim." +} diff --git a/benchmarks/rust-native-attribute-updates-2026-10-07/interactive-smoke.json b/benchmarks/rust-native-attribute-updates-2026-10-07/interactive-smoke.json new file mode 100644 index 000000000..8515fa33d --- /dev/null +++ b/benchmarks/rust-native-attribute-updates-2026-10-07/interactive-smoke.json @@ -0,0 +1,836 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 50, + "arch": "x86_64", + "camera_eye_height": 1.619999885559082, + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 16.107479465226167, + 5.619999885559082, + 16.107479465226167 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "crouch_distance_cm": 229, + "crouch_ticks": 36, + "culled_model_faces": 59636, + "elapsed_seconds": 20.501806022, + "error": null, + "fall_damage_requests": 1, + "last_requested_fall_damage": 9.0, + "merged_quads": 3169, + "mesh_revision": 0, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "movement_ticks": 151, + "os": "linux", + "player_absorption": 0.0, + "player_dead": false, + "player_dimensions": [ + 0.6000000238418579, + 1.7999999523162842, + 1.6200000047683716 + ], + "player_exhaustion": 0.9760003089904785, + "player_fall_distance": 0.0, + "player_food": 20, + "player_food_timer": 42, + "player_health": 14.333333969116211, + "player_hurt_cooldown": 0, + "player_local_crouching": false, + "player_on_ground": true, + "player_pose": "STANDING", + "player_position": [ + 16.107479465226167, + 4.0, + 16.107479465226167 + ], + "player_saturation": 0.0, + "player_shift": false, + "player_sprint_trigger": 0, + "player_sprinting": false, + "player_velocity": [ + 0.0, + -0.0784000015258789, + 0.0 + ], + "presented_frames": 1101, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native resident-scene renderer with inspection camera and optional fixed-rate dry walking test; full gameplay remains unfinished", + "sprint_distance_cm": 976, + "sprint_ticks": 36, + "sprite_layers": 18, + "visible_model_faces": 5991, + "walk_distance_cm": 40, + "walking": true, + "window_size": [ + 1280, + 720 + ], + "world_revision": 0, + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/attribute_updates.rs": "d8fa55efc02943b3dbe1868651fe7dabbedac8cda102b27611507d66d0f5b0cf", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "2b80c381378ee64a278dba524245d9bdfb67c50d9b055e2d4034dcddcfc2aa08", + "crates/horizon-client/src/lib.rs": "c0731ad0ac1308c8e21fb36d0e2c74002b2bd7203b6096cfbda6b320923b1b3b", + "crates/horizon-client/src/main.rs": "a8917e0dfb8b03c7896610af526a695a77e7bca4c9379689f0ca19b87f25cd14", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "4d37931e63470145120f33005f86da067f61d10c4149a6d0c123c2ad47d1d094", + "crates/horizon-client/src/pose.rs": "a06822319ebfcc1db53f656ae362ac9ee958090f0a4ac1ba5a707dbe1a0d78e2", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprint.rs": "6f5ba5ea8e9a19872b26c1d7b5073e29549f2d820a0fe46e5450c9e7446e98b2", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "e25b3543c07f31c2a9d23d811792de9a33290263c7c7445549a0682f6935d8a5", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_statistics.rs": "fe28061e29c41f8f399d29cce8c468a63854613702b5aa525c0f0fd98cb87f9a", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "executable_sha256": "a6341a60a8003863809b6c1f222e12e2aaee08451e3b57c2ebe4c34a233e8f97", + "resource_files": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "resource_manifest_sha256": "92a51de578be0e7c37d21e94caa3f22503f7d88b73827a5fce109b1b889e5d18", + "verification": { + "physical_controls": [ + "F5 walking", + "F3 diagnostics", + "Ctrl and W held 1800 ms", + "Release Ctrl and W", + "Left Shift and W held 1800 ms", + "Release W and Shift", + "Ctrl+Q exit" + ], + "observations": [ + "Window title showed Pose CROUCHING with Shift held", + "Rendered walking view visually inspected", + "Final actor alive and grounded; no runtime error" + ], + "screenshots_private_sha256": { + "attribute-walk.png": "536795a33d4295b22fd8553a0f61edd4a8a16c6736a2f34e55d569f69e53d190" + }, + "limits": "Linux resident-scene driver smoke check after pending attribute integration. Native differential gates exercise changing attribute limits, modifier/queue callbacks, dimensions and low-tunnel traversal. GUI check uses ordinary default actor attributes; no full gameplay, native pixel, platform release or hardware FPS claim." + } +} diff --git a/benchmarks/rust-native-attribute-updates-2026-10-07/scene-motion.json b/benchmarks/rust-native-attribute-updates-2026-10-07/scene-motion.json new file mode 100644 index 000000000..c90c95514 --- /dev/null +++ b/benchmarks/rust-native-attribute-updates-2026-10-07/scene-motion.json @@ -0,0 +1,360 @@ +{ + "schema": 2, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "fixtures": 5801, + "operations": 234949, + "sources_sha256": { + "tools/test_native_scene_motion.py": "378aab3e86084e73e3405b38e350f55f9088f14af6424aa69960de092c6b4066", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneMotionOracle.java": "8297b477a2374b09589ff0195643614cb385c18d81aba6c1976ba13c56ccabb6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java": "85570f2f5a98bc508f887bd61d3266cda1f6f8ba06d304241aa2128a4650f66d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockLandingOracle.java": "e397acdbaf2702f358c90ba53a804afa26d7f29a278884c0e779b18f1ae40e63", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementRegistryOracle.java": "49fcc1f4348a8e279dcb916ae149de8c97f15df54ff1a675826b7c6c3dda06d9", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageSourceOracle.java": "0cf0126d69d1052dea74a6bfb5a97250ab69d8f7a95360d9c6399fe03376dcd2", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/examples/scene_motion_probe.rs": "d1b1436d026da48ec721d24c7a71e4d9f39e87f32496b448ab9b160f72052d6f", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "e25b3543c07f31c2a9d23d811792de9a33290263c7c7445549a0682f6935d8a5", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_statistics.rs": "fe28061e29c41f8f399d29cce8c468a63854613702b5aa525c0f0fd98cb87f9a", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/attribute_updates.rs": "d8fa55efc02943b3dbe1868651fe7dabbedac8cda102b27611507d66d0f5b0cf", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "2b80c381378ee64a278dba524245d9bdfb67c50d9b055e2d4034dcddcfc2aa08", + "crates/horizon-client/src/lib.rs": "c0731ad0ac1308c8e21fb36d0e2c74002b2bd7203b6096cfbda6b320923b1b3b", + "crates/horizon-client/src/main.rs": "a8917e0dfb8b03c7896610af526a695a77e7bca4c9379689f0ca19b87f25cd14", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "4d37931e63470145120f33005f86da067f61d10c4149a6d0c123c2ad47d1d094", + "crates/horizon-client/src/pose.rs": "a06822319ebfcc1db53f656ae362ac9ee958090f0a4ac1ba5a707dbe1a0d78e2", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprint.rs": "6f5ba5ea8e9a19872b26c1d7b5073e29549f2d820a0fe46e5450c9e7446e98b2", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5" + }, + "resources": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "input_sha256": "ffa1fa94831cc7d47c0b8baa232543f9d41afe8cf77f56bfb7565e207f79876d", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a97946fec7e71c1b59eb02f5f8aceda30547ef3ec3533a2b85fb52741c24e391", + "matched_output_lines": 1650444, + "identity_input_sha256": "c580350763f12a4cfcda75c245170b50de04015d7f4cbaa31d1fbedbae7451eb", + "rust_output_sha256": "a97946fec7e71c1b59eb02f5f8aceda30547ef3ec3533a2b85fb52741c24e391" + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "a97946fec7e71c1b59eb02f5f8aceda30547ef3ec3533a2b85fb52741c24e391", + "matched_output_lines": 1650444, + "identity_input_sha256": "080cdbf9d5a041e81f558e501a32f98c775c636c2e1299bbd1d563f95acf695b", + "rust_output_sha256": "a97946fec7e71c1b59eb02f5f8aceda30547ef3ec3533a2b85fb52741c24e391" + } + ], + "scope": "Stored PlayerMotion binds resident client chunks and registered attributes/coefficients to air travel, jumping, Entity.move, step resolution, ground/support updates, restitution and speed factors. Repeated native Player.travel/jump/move and actual Player.aiStep / direct LivingEntity.aiStep compare position, velocity, bounds, collision/ground flags, support, climb state, fall-reset field, both sync flags, speed, head yaw, jump trigger and jump delay by exact bits. Prepared-local-input Player.aiStep paths verify the stored speed refresh after movement, with empty inventory and no nearby entities. Travel uses the actual Player.getSpeed movement-attribute query, independently of that stored base-living speed field; both getter and setter execute native bodies. Dry aiStep includes small-velocity cleanup, input damping, held/released jump timing and server frost-modifier removal. Snapshots also compare all allocated attribute instances, base/cache/dirty state, modifier values/operations/permanence and pending update/sync membership. Per-reference JVM holder/instance hashes are replayed so pending callback order and resulting ordered events also match. Dry resident scene with standing, crouching and crawling bounds, cached eye height, native pose-fit selection and ledge backoff; zero frozen ticks, empty equipment, no interpolation, fluids, vehicles, effects or other entities. The oracle controls pose storage and invokes actual native refreshDimensions on changes; full synchronized pose schema and network notifications remain separate. Actual pending attribute refresh runs after player movement and before pose selection in simulation operations, clamping health/absorption and rebuilding scale-dependent dimensions. Native ServerPlayer waypoint-receive and inherited transmit callbacks are compared as ordered requests; the waypoint manager and its network delivery remain controlled consumers. Direct refresh operations and the full enclosing tick remain separate boundaries. Actual LivingEntity.checkFallDamage, registered Block.fallOn/bounceOn and Player/LivingEntity.causeFallDamage are composed, including float-narrowed fall-distance accumulation, reset, last-climb clearing, safe-fall and damage-multiplier attributes, impulse exemptions and ordered landing particle/sound/statistic/hit-ground/damage requests. Farmland pushes the stored player and replaces actual chunk state; repeated turtle-egg changes preserve hatch. Block state at the landing fixture is compared after every operation. World RNG is a seeded native legacy stream. Actual ServerPlayer/Player/LivingEntity hurt dispatch now updates native synchronized health and player absorption, modified armor/toughness reduction, exhaustion, damage cooldown/last-source state and velocity synchronization. Native health storage and dirty flags are compared after every operation. Damage sources use actual decoded/tagged pinned damage registries. ServerPlayer jump statistics and exhaustion are included; dead-or-dying state disables movement input and jumping. Empty equipment/hands/effects, configurable difficulty and natural regeneration, damage gamerules enabled, loaded client and no spawn-extra fall particles define this scene domain. Ordered health/statistic/combat-record/broadcast/sound/criterion/death requests are compared; criterion argument payloads retain the separate combat gate. Actual health changes are applied, but audiovisual playback, persistent statistics, combat tracker internals, full death/drop/respawn services, block neighbor/drop/block-entity callbacks, movement emission, block-inside and networking remain controlled consumers. Actual FoodData.tick and ServerPlayer.tickRegeneration now share the same stored health, attributes, exhaustion and registered starvation damage. Snapshots compare food level, saturation, exhaustion, timer and tick count. Cases cover all four difficulties, regeneration rule changes, absorption during starvation, Peaceful recovery, timer overflow and nonfinite food values. Simulation operations compose clock setup, actual player movement and actual food ticking in their native order, including fall damage followed by regeneration in the same tick. Explicit clock operations establish cooldown/hurt-time/game-time/tick-count state; full enclosing native tick/doTick methods are not invoked by those setup operations. Input preparation has its own client comparison. ServerPlayer.checkMovementStatistics executes on accepted resident deltas after movement and before food ticking. Additional direct method fixtures cover all 512 overlapping passenger/swim/eye-water/water/climb/ground/sprint/crouch/glide flag combinations, invulnerable abilities, centimeter rounding, overflow, signed zero and nonfinite deltas. Those query contexts apply only to the statistics method; fluid/vehicle/glide physics remain unbound. ServerGamePacketListener packet acceptance/rejection and scheduling are not executed. No full Player.tick, consumable item-use lifecycle, local input lifecycle, nonempty inventory/equipment ticks, full freezing, complete death lifecycle or full gameplay parity claim." +} diff --git a/benchmarks/rust-native-attribute-updates-2026-10-07/startup-smoke.json b/benchmarks/rust-native-attribute-updates-2026-10-07/startup-smoke.json new file mode 100644 index 000000000..f36e9eea3 --- /dev/null +++ b/benchmarks/rust-native-attribute-updates-2026-10-07/startup-smoke.json @@ -0,0 +1,816 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 1, + "arch": "x86_64", + "camera_eye_height": 1.6200000047683716, + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "crouch_distance_cm": 0, + "crouch_ticks": 0, + "culled_model_faces": 59636, + "elapsed_seconds": 0.646637553, + "error": null, + "fall_damage_requests": 0, + "last_requested_fall_damage": null, + "merged_quads": 3169, + "mesh_revision": 0, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "movement_ticks": 0, + "os": "linux", + "player_absorption": null, + "player_dead": null, + "player_dimensions": null, + "player_exhaustion": null, + "player_fall_distance": null, + "player_food": null, + "player_food_timer": null, + "player_health": null, + "player_hurt_cooldown": null, + "player_local_crouching": null, + "player_on_ground": null, + "player_pose": null, + "player_position": null, + "player_saturation": null, + "player_shift": null, + "player_sprint_trigger": null, + "player_sprinting": null, + "player_velocity": null, + "presented_frames": 30, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native resident-scene renderer with inspection camera and optional fixed-rate dry walking test; full gameplay remains unfinished", + "sprint_distance_cm": 0, + "sprint_ticks": 0, + "sprite_layers": 18, + "visible_model_faces": 5991, + "walk_distance_cm": 0, + "walking": false, + "window_size": [ + 1280, + 720 + ], + "world_revision": 0, + "native_scene_culling": { + "blocks": 10919, + "culled_faces": 59636, + "visible_faces": 5991 + }, + "native_selection": { + "matched_placements": 16, + "selected_parts": 20, + "client_jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a2ff1c890d6f3a5292c3a9402f02ca5404a993dc117853b25cbe64ac92b76d30", + "scope": "Actual native registry states, blockstate dispatch, tagged root baking and legacy collection using state.getSeed(position). All 16 featured placements match model names/transforms. An independently constructed native scene also matches total occupied blocks and visible/culled model faces using native parent resolution, rotated culling directions and Block.shouldRenderFace. No shader/pixel parity claim." + }, + "resource_files": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "executable_sha256": "a6341a60a8003863809b6c1f222e12e2aaee08451e3b57c2ebe4c34a233e8f97", + "resource_manifest_sha256": "92a51de578be0e7c37d21e94caa3f22503f7d88b73827a5fce109b1b889e5d18", + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/attribute_updates.rs": "d8fa55efc02943b3dbe1868651fe7dabbedac8cda102b27611507d66d0f5b0cf", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "2b80c381378ee64a278dba524245d9bdfb67c50d9b055e2d4034dcddcfc2aa08", + "crates/horizon-client/src/lib.rs": "c0731ad0ac1308c8e21fb36d0e2c74002b2bd7203b6096cfbda6b320923b1b3b", + "crates/horizon-client/src/main.rs": "a8917e0dfb8b03c7896610af526a695a77e7bca4c9379689f0ca19b87f25cd14", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "4d37931e63470145120f33005f86da067f61d10c4149a6d0c123c2ad47d1d094", + "crates/horizon-client/src/pose.rs": "a06822319ebfcc1db53f656ae362ac9ee958090f0a4ac1ba5a707dbe1a0d78e2", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprint.rs": "6f5ba5ea8e9a19872b26c1d7b5073e29549f2d820a0fe46e5450c9e7446e98b2", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "e25b3543c07f31c2a9d23d811792de9a33290263c7c7445549a0682f6935d8a5", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_statistics.rs": "fe28061e29c41f8f399d29cce8c468a63854613702b5aa525c0f0fd98cb87f9a", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + } +} diff --git a/benchmarks/rust-native-blockstate-client-2026-10-06/startup-smoke.json b/benchmarks/rust-native-blockstate-client-2026-10-06/startup-smoke.json new file mode 100644 index 000000000..e058faef8 --- /dev/null +++ b/benchmarks/rust-native-blockstate-client-2026-10-06/startup-smoke.json @@ -0,0 +1,661 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 1, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "elapsed_seconds": 0.636712699, + "error": null, + "merged_quads": 166, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 209, + "os": "linux", + "presented_frames": 30, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native cube and cuboid-model renderer with binary cutouts, stepped sprite animation and free camera; no gameplay simulation", + "sprite_layers": 18, + "window_size": [ + 1280, + 720 + ], + "native_selection": { + "matched_placements": 16, + "selected_parts": 20, + "client_jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "ea3bc37e515550e33301f8c12b50bb44a5496e5e1382c071eae1e43c4ffb3620", + "scope": "Actual native registry states, blockstate dispatch, root baking with tagged empty geometry, and legacy collection using state.getSeed(position). Model names and transform matrices match scene selections; no shader/pixel parity claim." + }, + "resource_files": { + "files": 5580, + "sha256": "873ea291669e5acbc7cb3e156efa0990c3a9b899a784fc63c16be75b187f5391" + }, + "executable_sha256": "a6f08da44b188cedcb9da2557d9a40c7ecc90a74c5efad8541c57330a2e0519b", + "resource_manifest_sha256": "94ec11d21355ece462b8fdc72da26d84d8fa686ce3e3d932f43b9f7aad8371ff", + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "tools/test_native_client.py": "f796ce17f2d93a7a876db531f178fde92a893338b1e056d649945ca63046005a", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "c1f6ed253c2c043050403b8d57a3f112275887d332d47344e1c157b4a0355de0", + "crates/horizon-client/src/camera.rs": "f9821c8a51a004dd4ad9c0952e746eb07926f6040cf8660bc26da5a0728ae572", + "crates/horizon-client/src/main.rs": "88cf5386ddbf9494d2867ee4c3b3016b7d55ceb6bf7f543362acc2f9e2fe1abd", + "crates/horizon-client/src/mesh.rs": "e2fa00435ec8239ba8a3c6539022bb50a10ff9c3850c6faab72f86aabea896ef", + "crates/horizon-client/src/models/catalog.rs": "35b854021f0bc941f44f76e99e7fcccb3a135157e7272174e84c3907aadbddf7", + "crates/horizon-client/src/models.rs": "63af351c9b48e7a796b2a9591ddb093316f301523b42c6855e5904ddf3ca20d9", + "crates/horizon-client/src/render.rs": "0f8929d9061b20adbc5ddd0adcbe9f90ce76227b7bb9bafe3f4474961ee2984c", + "crates/horizon-client/src/sprites.rs": "4dd10998581f901bd1c72ed49c27671f362f18285e86e795ddadd11cbc255f69", + "crates/horizon-client/src/world.rs": "901aa59c23ea084e926eec014589f4d511c41691a8dc1520534e039c28cfc76c", + "crates/horizon-client/src/world.wgsl": "82873c131f46a31aef35106f89a53589f179048362d0f8877eca6d20aa6274a4", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "a0cf45cb96367404ea60c94a7fe25c142fba138df619bbe4396c633770342adc", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "87d3f99309ebe54c572fb6b2d3b693da172494eef438e9652c2353b6b00db4a6", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "2995b209aa3dc24cfcbba405cf8b97a398efbc0de97bb04ef2f51abb4cd2b84c", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "visual_inspection": { + "platform": "Linux x86_64, headless Wayland, Vulkan llvmpipe LLVM 21.1.8 CPU renderer", + "presented_frames": 3600, + "error": null, + "observed": "Rotated stairs and top slab, anvil orientation, multipart fence connections, open gate, bars, sideways amethyst, wall grindstone and four stone variants inspected in the controlled scene. Physical keyboard movement/rotation exercised. No native pixel comparison or hardware performance claim.", + "screenshots": "Private under .local/horizon-client/; no game textures or images in Git." + } +} diff --git a/benchmarks/rust-native-chunk-models-2026-10-06/startup-smoke.json b/benchmarks/rust-native-chunk-models-2026-10-06/startup-smoke.json new file mode 100644 index 000000000..38986e175 --- /dev/null +++ b/benchmarks/rust-native-chunk-models-2026-10-06/startup-smoke.json @@ -0,0 +1,676 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 1, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "culled_model_faces": 59636, + "elapsed_seconds": 0.674486099, + "error": null, + "merged_quads": 3169, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "os": "linux", + "presented_frames": 30, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native cube and cuboid-model renderer with binary cutouts, stepped sprite animation and free camera; no gameplay simulation", + "sprite_layers": 18, + "visible_model_faces": 5991, + "window_size": [ + 1280, + 720 + ], + "native_scene_culling": { + "blocks": 10919, + "culled_faces": 59636, + "visible_faces": 5991 + }, + "native_selection": { + "matched_placements": 16, + "selected_parts": 20, + "client_jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a2ff1c890d6f3a5292c3a9402f02ca5404a993dc117853b25cbe64ac92b76d30", + "scope": "Actual native registry states, blockstate dispatch, tagged root baking and legacy collection using state.getSeed(position). All 16 featured placements match model names/transforms. An independently constructed native scene also matches total occupied blocks and visible/culled model faces using native parent resolution, rotated culling directions and Block.shouldRenderFace. No shader/pixel parity claim." + }, + "resource_files": { + "files": 5582, + "sha256": "9b03385cb17f8c75a9031e05c0524c2b50606e149857a44a398fe353a830f756" + }, + "executable_sha256": "6c3bed79f13b82275f8164ce2c98feb11fdf8718be59c90b7bbd139f52f7703b", + "resource_manifest_sha256": "f25499f7b4897feee0f097c065b65541e932611e4de6817210db527532d36c14", + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "tools/test_native_client.py": "95b12bdb90702a5e2253119543f5430fa7a344e0dc5ad312354325feb97c2e79", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "f9821c8a51a004dd4ad9c0952e746eb07926f6040cf8660bc26da5a0728ae572", + "crates/horizon-client/src/main.rs": "e74045bc8f882b55d1861ff87700e517766645596d02dd72f2e16e8165d5b6e5", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/render.rs": "db17511223d0b72cf13bbb1bd7cbfca119d249f1d8914e7c1c06a710494c5123", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "17bd7127283c5ea27166e0e8079e8c284c6cff426a2fa8994879e48151e1ded4", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "712c1de220bea609621b376cdff04e65fa2102dbb214604d556cff7511fb9f7c", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "9f254668a237fc2d28a599b0ee6f1eac57cdafa2fd1af67e6a2303ee98fdd5ed", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "visual_inspection": { + "platform": "Linux x86_64, headless Wayland, Vulkan llvmpipe LLVM 21.1.8 CPU renderer", + "resident_chunks": 81, + "model_blocks": 84647, + "merged_quads": 28071, + "model_quads": 179, + "presented_frames": 3232, + "error": null, + "observed": "Resident terrain and featured models inspected on the virtual screen. Physical movement, arrow rotation, diagnostics toggle and Ctrl+Q exercised; clean exit. No native pixel or hardware FPS comparison.", + "screenshots": "Private under .local/horizon-client/." + } +} diff --git a/benchmarks/rust-native-client-2026-10-06/startup-smoke.json b/benchmarks/rust-native-client-2026-10-06/startup-smoke.json new file mode 100644 index 000000000..9da1f902e --- /dev/null +++ b/benchmarks/rust-native-client-2026-10-06/startup-smoke.json @@ -0,0 +1,141 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "elapsed_seconds": 0.541997659, + "error": null, + "merged_quads": 166, + "os": "linux", + "presented_frames": 30, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native opaque-cube renderer and free inspection camera; no gameplay simulation", + "window_size": [ + 1280, + 720 + ], + "executable_sha256": "4907a5678c323ab250934f3dfa32ba10e1554635f81d226ed2a88e7625737c5f", + "resource_manifest_sha256": "eda44ebee6904eab880c15458dbd1212dc2799d320a4419fc810e2ceb0e5d9d6", + "sources": { + "crates/horizon-client/src/assets.rs": "f35107193fc6d08be41891181da1803abf15bd373b62dd63758213809e2c5cbf", + "crates/horizon-client/src/camera.rs": "f9821c8a51a004dd4ad9c0952e746eb07926f6040cf8660bc26da5a0728ae572", + "crates/horizon-client/src/main.rs": "0cc250b695ba0d1e49107f581695edea1d24cdc2fb8ffa3a46368ef2c40430a7", + "crates/horizon-client/src/mesh.rs": "e2fa00435ec8239ba8a3c6539022bb50a10ff9c3850c6faab72f86aabea896ef", + "crates/horizon-client/src/render.rs": "4d58443465ea25769d73701d138db6a99c4f939a288e89e1f2b1ee3d017a2737", + "crates/horizon-client/src/world.rs": "901aa59c23ea084e926eec014589f4d511c41691a8dc1520534e039c28cfc76c", + "crates/horizon-client/src/world.wgsl": "dd7d579d0afb8a61da849171e444fa05a3e9d15bbfe6d019ff6653e8e0774c66", + "Cargo.toml": "4f803d21656a1420555bee6369617ddc825219a2cf05f842a209b3f8eaa583ec", + "Cargo.lock": "b1674833e1d5e66032589eea75643bf1c1eb2f2d6503e79ff7da8efa1b6d21dc", + "crates/horizon-client/Cargo.toml": "3047995858c9cd103ce358dfd991cb81e7d0688a149f4874cc73c36b859bbff7", + "tools/prepare_native_client.py": "b16f62acfc6242552af14ff405e2169ebba3adab12b991fc011e78edb4ffa982", + "tools/test_native_client.py": "adb9aa87cc28b0980d811ce47c1b09878d2d72cef2e083b278ec41183d231f1b" + }, + "validation": { + "rust_workspace_tests": "passed", + "clippy_all_targets": "passed", + "python_tooling_tests": 149, + "mesh_tests": 2, + "manual_visual_checks": [ + "textured scene with 81 chunks and 382 merged quads", + "window resize from 1600x1000 to 1280x720" + ], + "input_checks": [ + "physical W movement", + "physical Right rotation", + "captured relative mouse delta (150,-50) changed yaw by -0.3 and pitch by +0.1 radians", + "Escape and Ctrl+Q" + ] + }, + "environment": { + "os": "Ubuntu 26.04.1 LTS", + "kernel": "7.0.0-31-generic", + "cpu": "Intel Core i7-7500U", + "display": "headless Sway Wayland", + "renderer": "Vulkan llvmpipe software rasterizer" + }, + "limits": [ + "Controlled development scene only; no gameplay simulation or vanilla pixel-parity claim", + "No hardware FPS or render-distance improvement demonstrated", + "macOS and Windows runtime checks and final playable packages remain pending", + "Private game resources and screenshots excluded from this report" + ], + "mouse_check": { + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "arch": "x86_64", + "camera_pitch": -0.2839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.6561944901923447, + "elapsed_seconds": 8.654220098, + "error": null, + "merged_quads": 166, + "os": "linux", + "presented_frames": 532, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native opaque-cube renderer and free inspection camera; no gameplay simulation", + "window_size": [ + 1280, + 720 + ] + }, + "physical_keyboard_check": { + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 18.943610750255, + 18.0, + 18.943610750255 + ], + "camera_yaw": -2.6478875051923443, + "elapsed_seconds": 17.488515374, + "error": null, + "merged_quads": 166, + "os": "linux", + "presented_frames": 1080, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native opaque-cube renderer and free inspection camera; no gameplay simulation", + "window_size": [ + 1280, + 720 + ], + "source_note": "Same camera/input behavior; before subsequent diagnostic formatting and equivalent let-chain cleanup" + }, + "private_capture_sha256": { + "first-launch.png": "7e53fa26d3d55f943db41828e1c8dd5b65279f9a130854fff288c75a394ee5aa", + "moved-resized.png": "be5a0473ab505740d18ba8eecf1512c15ba93d53d046f49b8dfa96357b25bf22", + "mouse-look.png": "7103678309f06938de40ac294f2f9ca1f56b253bc463e792b121ba607cd7b0a3" + } +} diff --git a/benchmarks/rust-native-crouch-2026-10-07/input-scene.json b/benchmarks/rust-native-crouch-2026-10-07/input-scene.json new file mode 100644 index 000000000..c8da2835c --- /dev/null +++ b/benchmarks/rust-native-crouch-2026-10-07/input-scene.json @@ -0,0 +1,352 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "fixtures": 514, + "operations": 21241, + "sources_sha256": { + "tools/test_native_scene_motion.py": "2d14483b7c0ac6060b665dc1f1dabe87a6c19cb325c8fa50a250023c52c24d31", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneMotionOracle.java": "824994591af3511d834f1d60e005b83645b4720b9671ce063e208e62e342be10", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java": "85570f2f5a98bc508f887bd61d3266cda1f6f8ba06d304241aa2128a4650f66d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockLandingOracle.java": "e397acdbaf2702f358c90ba53a804afa26d7f29a278884c0e779b18f1ae40e63", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementRegistryOracle.java": "49fcc1f4348a8e279dcb916ae149de8c97f15df54ff1a675826b7c6c3dda06d9", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageSourceOracle.java": "0cf0126d69d1052dea74a6bfb5a97250ab69d8f7a95360d9c6399fe03376dcd2", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSprintInputOracle.java": "f66f73f89c2c59d20d0dcca82e86b2115495921a5a7c49b080017abcea12fd7a", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/examples/scene_motion_probe.rs": "360a542fa75eb060e256900737695efc751bdc1c0e05cd7fe5b4b3f94868d8ca", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "e25b3543c07f31c2a9d23d811792de9a33290263c7c7445549a0682f6935d8a5", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_statistics.rs": "fe28061e29c41f8f399d29cce8c468a63854613702b5aa525c0f0fd98cb87f9a", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "2b80c381378ee64a278dba524245d9bdfb67c50d9b055e2d4034dcddcfc2aa08", + "crates/horizon-client/src/lib.rs": "85670a67bcd070d89409593b6ed475a0116414f1982099f4fd05af4ff9428107", + "crates/horizon-client/src/main.rs": "a8917e0dfb8b03c7896610af526a695a77e7bca4c9379689f0ca19b87f25cd14", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "caa81db7bcd2865cde53e3a604f3a0f498d82529d77cc8e756ac5f06229fa278", + "crates/horizon-client/src/pose.rs": "a06822319ebfcc1db53f656ae362ac9ee958090f0a4ac1ba5a707dbe1a0d78e2", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprint.rs": "6f5ba5ea8e9a19872b26c1d7b5073e29549f2d820a0fe46e5450c9e7446e98b2", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7" + }, + "resources": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "input_sha256": "d36fd226b23f03e00eecc8808bc50d96aa873fc52e7d90398a729bf86353e3de", + "rust_output_sha256": "18f53e34878b4a4c7de3b25df0e1e8a7fd3bc272c2b283d256f5e2fd09137291", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "18f53e34878b4a4c7de3b25df0e1e8a7fd3bc272c2b283d256f5e2fd09137291", + "matched_output_lines": 149201 + } + ], + "scope": "Client sprint scene executes the real LocalPlayer.aiStep prefix through sprint decisions, stopping at the riding/parent movement boundary, followed by real LocalPlayer.modifyInput and the native server actor simulation. Sprint setters dispatch to that server actor, sharing its actual FoodData and collision conditions. Compares local sprint timer/input history and actual attribute changes, movement, distance exhaustion and hunger. Actual local crouch selection precedes new keyboard input; slowdown, sprint eligibility and pose-dependent dimensions share resident state. No effects, equipment, vehicles or fluid physics. Full client/server tick and networking remain unfinished. Stored PlayerMotion binds resident client chunks and registered attributes/coefficients to air travel, jumping, Entity.move, step resolution, ground/support updates, restitution and speed factors. Repeated native Player.travel/jump/move and actual Player.aiStep / direct LivingEntity.aiStep compare position, velocity, bounds, collision/ground flags, support, climb state, fall-reset field, both sync flags, speed, head yaw, jump trigger and jump delay by exact bits. Prepared-local-input Player.aiStep paths verify the stored speed refresh after movement, with empty inventory and no nearby entities. Travel uses the actual Player.getSpeed movement-attribute query, independently of that stored base-living speed field; both getter and setter execute native bodies. Dry aiStep includes small-velocity cleanup, input damping, held/released jump timing and server frost-modifier removal. Snapshots also compare all allocated attribute instances, base/cache/dirty state, modifier values/operations/permanence and pending update/sync membership (not JVM identity-dependent iteration order). Dry resident scene with standing, crouching and crawling bounds, cached eye height, native pose-fit selection and ledge backoff; zero frozen ticks, empty equipment, no interpolation, fluids, vehicles, effects or other entities. The oracle controls pose storage and invokes actual native refreshDimensions on changes; full synchronized pose schema and network notifications remain separate. Scale changes use explicit dimension-refresh operations, not the complete pending attribute-update lifecycle. Actual LivingEntity.checkFallDamage, registered Block.fallOn/bounceOn and Player/LivingEntity.causeFallDamage are composed, including float-narrowed fall-distance accumulation, reset, last-climb clearing, safe-fall and damage-multiplier attributes, impulse exemptions and ordered landing particle/sound/statistic/hit-ground/damage requests. Farmland pushes the stored player and replaces actual chunk state; repeated turtle-egg changes preserve hatch. Block state at the landing fixture is compared after every operation. World RNG is a seeded native legacy stream. Actual ServerPlayer/Player/LivingEntity hurt dispatch now updates native synchronized health and player absorption, modified armor/toughness reduction, exhaustion, damage cooldown/last-source state and velocity synchronization. Native health storage and dirty flags are compared after every operation. Damage sources use actual decoded/tagged pinned damage registries. ServerPlayer jump statistics and exhaustion are included; dead-or-dying state disables movement input and jumping. Empty equipment/hands/effects, configurable difficulty and natural regeneration, damage gamerules enabled, loaded client and no spawn-extra fall particles define this scene domain. Ordered health/statistic/combat-record/broadcast/sound/criterion/death requests are compared; criterion argument payloads retain the separate combat gate. Actual health changes are applied, but audiovisual playback, persistent statistics, combat tracker internals, full death/drop/respawn services, block neighbor/drop/block-entity callbacks, movement emission, block-inside and networking remain controlled consumers. Actual FoodData.tick and ServerPlayer.tickRegeneration now share the same stored health, attributes, exhaustion and registered starvation damage. Snapshots compare food level, saturation, exhaustion, timer and tick count. Cases cover all four difficulties, regeneration rule changes, absorption during starvation, Peaceful recovery, timer overflow and nonfinite food values. Simulation operations compose clock setup, actual player movement and actual food ticking in their native order, including fall damage followed by regeneration in the same tick. Explicit clock operations establish cooldown/hurt-time/game-time/tick-count state; full enclosing native tick/doTick methods are not invoked by those setup operations. Input preparation has its own client comparison. ServerPlayer.checkMovementStatistics executes on accepted resident deltas after movement and before food ticking. Additional direct method fixtures cover all 512 overlapping passenger/swim/eye-water/water/climb/ground/sprint/crouch/glide flag combinations, invulnerable abilities, centimeter rounding, overflow, signed zero and nonfinite deltas. Those query contexts apply only to the statistics method; fluid/vehicle/glide physics remain unbound. ServerGamePacketListener packet acceptance/rejection and scheduling are not executed. No full Player.tick, consumable item-use lifecycle, local input lifecycle, nonempty inventory/equipment ticks, full freezing, complete death lifecycle or full gameplay parity claim." +} diff --git a/benchmarks/rust-native-crouch-2026-10-07/interactive-smoke.json b/benchmarks/rust-native-crouch-2026-10-07/interactive-smoke.json new file mode 100644 index 000000000..d0c131f96 --- /dev/null +++ b/benchmarks/rust-native-crouch-2026-10-07/interactive-smoke.json @@ -0,0 +1,834 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 66, + "arch": "x86_64", + "camera_eye_height": 1.619999885559082, + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 20.31676484243802, + 5.619999885559082, + 20.31676484243802 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "crouch_distance_cm": 613, + "crouch_ticks": 100, + "culled_model_faces": 59636, + "elapsed_seconds": 26.840849628, + "error": null, + "fall_damage_requests": 1, + "last_requested_fall_damage": 9.0, + "merged_quads": 3169, + "mesh_revision": 0, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "movement_ticks": 179, + "os": "linux", + "player_absorption": 0.0, + "player_dead": false, + "player_dimensions": [ + 0.6000000238418579, + 1.7999999523162842, + 1.6200000047683716 + ], + "player_exhaustion": 1.0, + "player_fall_distance": 0.0, + "player_food": 20, + "player_food_timer": 70, + "player_health": 14.500000953674316, + "player_hurt_cooldown": 0, + "player_local_crouching": false, + "player_on_ground": true, + "player_pose": "STANDING", + "player_position": [ + 20.31676484243802, + 4.0, + 20.31676484243802 + ], + "player_saturation": 0.0, + "player_shift": false, + "player_sprint_trigger": 0, + "player_sprinting": false, + "player_velocity": [ + 0.0, + -0.0784000015258789, + 0.0 + ], + "presented_frames": 1232, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native resident-scene renderer with inspection camera and optional fixed-rate dry walking test; full gameplay remains unfinished", + "sprint_distance_cm": 0, + "sprint_ticks": 0, + "sprite_layers": 18, + "visible_model_faces": 5991, + "walk_distance_cm": 8, + "walking": true, + "window_size": [ + 1280, + 720 + ], + "world_revision": 0, + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "2b80c381378ee64a278dba524245d9bdfb67c50d9b055e2d4034dcddcfc2aa08", + "crates/horizon-client/src/lib.rs": "85670a67bcd070d89409593b6ed475a0116414f1982099f4fd05af4ff9428107", + "crates/horizon-client/src/main.rs": "a8917e0dfb8b03c7896610af526a695a77e7bca4c9379689f0ca19b87f25cd14", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "caa81db7bcd2865cde53e3a604f3a0f498d82529d77cc8e756ac5f06229fa278", + "crates/horizon-client/src/pose.rs": "a06822319ebfcc1db53f656ae362ac9ee958090f0a4ac1ba5a707dbe1a0d78e2", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprint.rs": "6f5ba5ea8e9a19872b26c1d7b5073e29549f2d820a0fe46e5450c9e7446e98b2", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "e25b3543c07f31c2a9d23d811792de9a33290263c7c7445549a0682f6935d8a5", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_statistics.rs": "fe28061e29c41f8f399d29cce8c468a63854613702b5aa525c0f0fd98cb87f9a", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "executable_sha256": "579666bb2fbc66f34cad15309f4cf0cba2885f1790ed506981b9c0a18eeed129", + "resource_files": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "resource_manifest_sha256": "92a51de578be0e7c37d21e94caa3f22503f7d88b73827a5fce109b1b889e5d18", + "verification": { + "physical_controls": [ + "F5 walking", + "F3 diagnostics", + "Left Shift and W held 5000 ms", + "Release W and Shift", + "Ctrl+Q exit" + ], + "observations": [ + "Captured window title showed Pose CROUCHING during held Shift", + "Window title showed Pose STANDING after release", + "Both rendered views visually inspected; final actor alive and grounded" + ], + "screenshots_private_sha256": { + "crouch-held.png": "cc7640a14280007af4f7840ccf6df6b21a76149bbd03dd6bd7dba42147e58b64", + "crouch-released.png": "d24b975f571ae1e5af098475dcb6dd231f0850f8d905fa70eb7a9e2666bf5006" + }, + "limits": "Linux resident-scene smoke check; focus pauses simulation. Differential checks cover dry pose selection and cached dimensions, input timing and movement. Camera eye smoothing follows the inspected native float arithmetic, without full camera or native pixel parity validation. No fluid movement, sleeping/flight/death poses, complete client/server lifecycle, platform release acceptance or hardware FPS claim." + } +} diff --git a/benchmarks/rust-native-crouch-2026-10-07/scene-motion.json b/benchmarks/rust-native-crouch-2026-10-07/scene-motion.json new file mode 100644 index 000000000..3d2f0c2f3 --- /dev/null +++ b/benchmarks/rust-native-crouch-2026-10-07/scene-motion.json @@ -0,0 +1,356 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "fixtures": 5605, + "operations": 223645, + "sources_sha256": { + "tools/test_native_scene_motion.py": "2d14483b7c0ac6060b665dc1f1dabe87a6c19cb325c8fa50a250023c52c24d31", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneMotionOracle.java": "824994591af3511d834f1d60e005b83645b4720b9671ce063e208e62e342be10", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java": "85570f2f5a98bc508f887bd61d3266cda1f6f8ba06d304241aa2128a4650f66d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockLandingOracle.java": "e397acdbaf2702f358c90ba53a804afa26d7f29a278884c0e779b18f1ae40e63", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementRegistryOracle.java": "49fcc1f4348a8e279dcb916ae149de8c97f15df54ff1a675826b7c6c3dda06d9", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageSourceOracle.java": "0cf0126d69d1052dea74a6bfb5a97250ab69d8f7a95360d9c6399fe03376dcd2", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/examples/scene_motion_probe.rs": "360a542fa75eb060e256900737695efc751bdc1c0e05cd7fe5b4b3f94868d8ca", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "e25b3543c07f31c2a9d23d811792de9a33290263c7c7445549a0682f6935d8a5", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_statistics.rs": "fe28061e29c41f8f399d29cce8c468a63854613702b5aa525c0f0fd98cb87f9a", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "2b80c381378ee64a278dba524245d9bdfb67c50d9b055e2d4034dcddcfc2aa08", + "crates/horizon-client/src/lib.rs": "85670a67bcd070d89409593b6ed475a0116414f1982099f4fd05af4ff9428107", + "crates/horizon-client/src/main.rs": "a8917e0dfb8b03c7896610af526a695a77e7bca4c9379689f0ca19b87f25cd14", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "caa81db7bcd2865cde53e3a604f3a0f498d82529d77cc8e756ac5f06229fa278", + "crates/horizon-client/src/pose.rs": "a06822319ebfcc1db53f656ae362ac9ee958090f0a4ac1ba5a707dbe1a0d78e2", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprint.rs": "6f5ba5ea8e9a19872b26c1d7b5073e29549f2d820a0fe46e5450c9e7446e98b2", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5" + }, + "resources": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "input_sha256": "bc2880c106d629b8b1853bf6aa5941706043d738f34205e9f35a96b9eb2b53e7", + "rust_output_sha256": "b85fad1fe5f4790c764590f141bedd31fd607e1e572acfef186a0f15242ad7c0", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "b85fad1fe5f4790c764590f141bedd31fd607e1e572acfef186a0f15242ad7c0", + "matched_output_lines": 1571120 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "b85fad1fe5f4790c764590f141bedd31fd607e1e572acfef186a0f15242ad7c0", + "matched_output_lines": 1571120 + } + ], + "scope": "Stored PlayerMotion binds resident client chunks and registered attributes/coefficients to air travel, jumping, Entity.move, step resolution, ground/support updates, restitution and speed factors. Repeated native Player.travel/jump/move and actual Player.aiStep / direct LivingEntity.aiStep compare position, velocity, bounds, collision/ground flags, support, climb state, fall-reset field, both sync flags, speed, head yaw, jump trigger and jump delay by exact bits. Prepared-local-input Player.aiStep paths verify the stored speed refresh after movement, with empty inventory and no nearby entities. Travel uses the actual Player.getSpeed movement-attribute query, independently of that stored base-living speed field; both getter and setter execute native bodies. Dry aiStep includes small-velocity cleanup, input damping, held/released jump timing and server frost-modifier removal. Snapshots also compare all allocated attribute instances, base/cache/dirty state, modifier values/operations/permanence and pending update/sync membership (not JVM identity-dependent iteration order). Dry resident scene with standing, crouching and crawling bounds, cached eye height, native pose-fit selection and ledge backoff; zero frozen ticks, empty equipment, no interpolation, fluids, vehicles, effects or other entities. The oracle controls pose storage and invokes actual native refreshDimensions on changes; full synchronized pose schema and network notifications remain separate. Scale changes use explicit dimension-refresh operations, not the complete pending attribute-update lifecycle. Actual LivingEntity.checkFallDamage, registered Block.fallOn/bounceOn and Player/LivingEntity.causeFallDamage are composed, including float-narrowed fall-distance accumulation, reset, last-climb clearing, safe-fall and damage-multiplier attributes, impulse exemptions and ordered landing particle/sound/statistic/hit-ground/damage requests. Farmland pushes the stored player and replaces actual chunk state; repeated turtle-egg changes preserve hatch. Block state at the landing fixture is compared after every operation. World RNG is a seeded native legacy stream. Actual ServerPlayer/Player/LivingEntity hurt dispatch now updates native synchronized health and player absorption, modified armor/toughness reduction, exhaustion, damage cooldown/last-source state and velocity synchronization. Native health storage and dirty flags are compared after every operation. Damage sources use actual decoded/tagged pinned damage registries. ServerPlayer jump statistics and exhaustion are included; dead-or-dying state disables movement input and jumping. Empty equipment/hands/effects, configurable difficulty and natural regeneration, damage gamerules enabled, loaded client and no spawn-extra fall particles define this scene domain. Ordered health/statistic/combat-record/broadcast/sound/criterion/death requests are compared; criterion argument payloads retain the separate combat gate. Actual health changes are applied, but audiovisual playback, persistent statistics, combat tracker internals, full death/drop/respawn services, block neighbor/drop/block-entity callbacks, movement emission, block-inside and networking remain controlled consumers. Actual FoodData.tick and ServerPlayer.tickRegeneration now share the same stored health, attributes, exhaustion and registered starvation damage. Snapshots compare food level, saturation, exhaustion, timer and tick count. Cases cover all four difficulties, regeneration rule changes, absorption during starvation, Peaceful recovery, timer overflow and nonfinite food values. Simulation operations compose clock setup, actual player movement and actual food ticking in their native order, including fall damage followed by regeneration in the same tick. Explicit clock operations establish cooldown/hurt-time/game-time/tick-count state; full enclosing native tick/doTick methods are not invoked by those setup operations. Input preparation has its own client comparison. ServerPlayer.checkMovementStatistics executes on accepted resident deltas after movement and before food ticking. Additional direct method fixtures cover all 512 overlapping passenger/swim/eye-water/water/climb/ground/sprint/crouch/glide flag combinations, invulnerable abilities, centimeter rounding, overflow, signed zero and nonfinite deltas. Those query contexts apply only to the statistics method; fluid/vehicle/glide physics remain unbound. ServerGamePacketListener packet acceptance/rejection and scheduling are not executed. No full Player.tick, consumable item-use lifecycle, local input lifecycle, nonempty inventory/equipment ticks, full freezing, complete death lifecycle or full gameplay parity claim." +} diff --git a/benchmarks/rust-native-crouch-2026-10-07/sprint-input.json b/benchmarks/rust-native-crouch-2026-10-07/sprint-input.json new file mode 100644 index 000000000..c0d44eda1 --- /dev/null +++ b/benchmarks/rust-native-crouch-2026-10-07/sprint-input.json @@ -0,0 +1,29 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "fixtures": 146648, + "operations": 502112, + "sources_sha256": { + "tools/test_sprint_input_parity.py": "4668708147083aebf665f0b4a511d44fb2f0473e5a6c098ad0697a3e356bf8a1", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSprintInputOracle.java": "f66f73f89c2c59d20d0dcca82e86b2115495921a5a7c49b080017abcea12fd7a", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/sprint.rs": "6f5ba5ea8e9a19872b26c1d7b5073e29549f2d820a0fe46e5450c9e7446e98b2", + "crates/horizon-client/src/lib.rs": "85670a67bcd070d89409593b6ed475a0116414f1982099f4fd05af4ff9428107", + "crates/horizon-client/examples/sprint_probe.rs": "1c18066b6ae33ce77d8ee6f2bed0a1fdd2fcdc8bdce0d70e5cb0917d6b4d600a" + }, + "input_sha256": "764b7990c7b7cfcc478a2de72a04c8798c1552d5742655899ef650864ef10922", + "client_jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "matched_output_lines": 648760, + "output_sha256": "06d9079101d5d77b0278f0141fa4edb0df66f4c39a92feba98aca49953b986db", + "scope": "Actual KeyboardInput.tick and LocalPlayer.aiStep prefix through sprint start/stop requests and sprintTriggerTime. A sentinel in jumpableVehicle stops before riding and parent/world movement. Native private canStartSprinting, isSprintingPossible and shouldStopRun/SwimSprinting execute, with controlled environmental/effect/vehicle/UI queries, actual FoodData/Abilities and actual ItemStack USE_EFFECTS. Compares evolving sprint state, timer, keyboard vector/shift and every ordered setSprinting request, including duplicate requests. All 17 query-flag combinations, all keyboard combinations with previous states, signed timer boundaries, food thresholds, configurable windows0..10, double taps and random sequences. Setter records requests; the separate scene gate covers actual attribute changes and movement. Parent movement, complete LocalPlayer ticks, GUI options persistence, networking and full gameplay parity remain unfinished." +} diff --git a/benchmarks/rust-native-crouch-2026-10-07/startup-smoke.json b/benchmarks/rust-native-crouch-2026-10-07/startup-smoke.json new file mode 100644 index 000000000..e5c205a88 --- /dev/null +++ b/benchmarks/rust-native-crouch-2026-10-07/startup-smoke.json @@ -0,0 +1,815 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 2, + "arch": "x86_64", + "camera_eye_height": 1.6200000047683716, + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "crouch_distance_cm": 0, + "crouch_ticks": 0, + "culled_model_faces": 59636, + "elapsed_seconds": 1.08931564, + "error": null, + "fall_damage_requests": 0, + "last_requested_fall_damage": null, + "merged_quads": 3169, + "mesh_revision": 0, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "movement_ticks": 0, + "os": "linux", + "player_absorption": null, + "player_dead": null, + "player_dimensions": null, + "player_exhaustion": null, + "player_fall_distance": null, + "player_food": null, + "player_food_timer": null, + "player_health": null, + "player_hurt_cooldown": null, + "player_local_crouching": null, + "player_on_ground": null, + "player_pose": null, + "player_position": null, + "player_saturation": null, + "player_shift": null, + "player_sprint_trigger": null, + "player_sprinting": null, + "player_velocity": null, + "presented_frames": 30, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native resident-scene renderer with inspection camera and optional fixed-rate dry walking test; full gameplay remains unfinished", + "sprint_distance_cm": 0, + "sprint_ticks": 0, + "sprite_layers": 18, + "visible_model_faces": 5991, + "walk_distance_cm": 0, + "walking": false, + "window_size": [ + 1280, + 720 + ], + "world_revision": 0, + "native_scene_culling": { + "blocks": 10919, + "culled_faces": 59636, + "visible_faces": 5991 + }, + "native_selection": { + "matched_placements": 16, + "selected_parts": 20, + "client_jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a2ff1c890d6f3a5292c3a9402f02ca5404a993dc117853b25cbe64ac92b76d30", + "scope": "Actual native registry states, blockstate dispatch, tagged root baking and legacy collection using state.getSeed(position). All 16 featured placements match model names/transforms. An independently constructed native scene also matches total occupied blocks and visible/culled model faces using native parent resolution, rotated culling directions and Block.shouldRenderFace. No shader/pixel parity claim." + }, + "resource_files": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "executable_sha256": "579666bb2fbc66f34cad15309f4cf0cba2885f1790ed506981b9c0a18eeed129", + "resource_manifest_sha256": "92a51de578be0e7c37d21e94caa3f22503f7d88b73827a5fce109b1b889e5d18", + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "2b80c381378ee64a278dba524245d9bdfb67c50d9b055e2d4034dcddcfc2aa08", + "crates/horizon-client/src/lib.rs": "85670a67bcd070d89409593b6ed475a0116414f1982099f4fd05af4ff9428107", + "crates/horizon-client/src/main.rs": "a8917e0dfb8b03c7896610af526a695a77e7bca4c9379689f0ca19b87f25cd14", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "caa81db7bcd2865cde53e3a604f3a0f498d82529d77cc8e756ac5f06229fa278", + "crates/horizon-client/src/pose.rs": "a06822319ebfcc1db53f656ae362ac9ee958090f0a4ac1ba5a707dbe1a0d78e2", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprint.rs": "6f5ba5ea8e9a19872b26c1d7b5073e29549f2d820a0fe46e5450c9e7446e98b2", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "e25b3543c07f31c2a9d23d811792de9a33290263c7c7445549a0682f6935d8a5", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_statistics.rs": "fe28061e29c41f8f399d29cce8c468a63854613702b5aa525c0f0fd98cb87f9a", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + } +} diff --git a/benchmarks/rust-native-health-2026-10-07/interactive-smoke.json b/benchmarks/rust-native-health-2026-10-07/interactive-smoke.json new file mode 100644 index 000000000..5736ca654 --- /dev/null +++ b/benchmarks/rust-native-health-2026-10-07/interactive-smoke.json @@ -0,0 +1,812 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 81, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 22.75728047606706, + 5.620000004768372, + 22.75728047606706 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "culled_model_faces": 59636, + "elapsed_seconds": 32.477205874, + "error": null, + "fall_damage_requests": 1, + "last_requested_fall_damage": 9.0, + "merged_quads": 3169, + "mesh_revision": 0, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "movement_ticks": 110, + "os": "linux", + "player_absorption": 0.0, + "player_dead": false, + "player_fall_distance": 0.0, + "player_health": 11.0, + "player_hurt_cooldown": 0, + "player_on_ground": true, + "player_position": [ + 22.75728047606706, + 4.0, + 22.75728047606706 + ], + "player_velocity": [ + 0.0, + -0.0784000015258789, + 0.0 + ], + "presented_frames": 1875, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native resident-scene renderer with inspection camera and optional fixed-rate dry walking test; full gameplay remains unfinished", + "sprite_layers": 18, + "visible_model_faces": 5991, + "walking": true, + "window_size": [ + 1280, + 720 + ], + "world_revision": 0, + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "3725d5adf8b6f227736b22c5b474a761c1986ff023163ad6ba5cea56418da469", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "ad2be13a2b5897ded12d67cb61d19f5a50bf8f2a6fd1fc79ae640863746041ef", + "crates/horizon-client/src/lib.rs": "f932e2500dfe12f2969eb54303fb248c63d79f6be4bebc441b839270ed5aad8b", + "crates/horizon-client/src/main.rs": "97afb9f33b0b9933defcd5e761e8ea7f0621e5d2872ee62e55922237e22ca68f", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "75f1f856e1ad5b1eec947f8f8a67a7f6d4696c9059d37e0eb61290d7f97c3d41", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "66c921c4a0c4e5bf97f2594ed243f6769d0dcebe9fe227177df928df22d6d03e", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "executable_sha256": "cb7f4e2f8b95c591235101c6a08dfb6239f8792f722a4e39ecf3d81c64b7db70", + "resource_files": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "resource_manifest_sha256": "92a51de578be0e7c37d21e94caa3f22503f7d88b73827a5fce109b1b889e5d18", + "verification": { + "physical_controls": [ + "F5 enable walking", + "F3 diagnostics", + "W held 650 ms", + "Space held 500 ms", + "Ctrl+Q exit" + ], + "observations": [ + "Landed at ground y=4; health dropped from 20 to 11", + "Window diagnostics displayed Health 11", + "Exactly one incoming fall damage request of 9.0", + "Hurt cooldown expired to zero; player remained alive", + "Horizontal position changed; player returned to grounded state", + "Ground screenshot visually inspected; exit report has no error and virtual screen has no remaining window" + ], + "screenshots_private_sha256": { + "health-ground.png": "e2ed86fa9597ef9e5324213a616465909b160e2e1d71d351d70f891ed2638adb" + }, + "limits": "Linux resident-scene smoke check only. Full hunger regeneration, death/drop/respawn, native pixel parity, platform release acceptance and hardware FPS comparisons remain unfinished." + } +} diff --git a/benchmarks/rust-native-health-2026-10-07/scene-motion.json b/benchmarks/rust-native-health-2026-10-07/scene-motion.json new file mode 100644 index 000000000..62dee41ca --- /dev/null +++ b/benchmarks/rust-native-health-2026-10-07/scene-motion.json @@ -0,0 +1,352 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "fixtures": 1881, + "operations": 90065, + "sources_sha256": { + "tools/test_native_scene_motion.py": "e90632f2216777a8eff8da7b6a55e433fdfb30fd37859a593823f5c72213976f", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneMotionOracle.java": "fa12b8b05726cc306abd6dfddc2d9d122c8f26a346b53d2b1cf69712ec5386bd", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java": "85570f2f5a98bc508f887bd61d3266cda1f6f8ba06d304241aa2128a4650f66d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockLandingOracle.java": "e397acdbaf2702f358c90ba53a804afa26d7f29a278884c0e779b18f1ae40e63", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementRegistryOracle.java": "49fcc1f4348a8e279dcb916ae149de8c97f15df54ff1a675826b7c6c3dda06d9", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageSourceOracle.java": "0cf0126d69d1052dea74a6bfb5a97250ab69d8f7a95360d9c6399fe03376dcd2", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/examples/scene_motion_probe.rs": "f5d9824c6a233ec49da2052a6aca253a87edc056ea67d29dedbe9618848b928a", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "3725d5adf8b6f227736b22c5b474a761c1986ff023163ad6ba5cea56418da469", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "ad2be13a2b5897ded12d67cb61d19f5a50bf8f2a6fd1fc79ae640863746041ef", + "crates/horizon-client/src/lib.rs": "f932e2500dfe12f2969eb54303fb248c63d79f6be4bebc441b839270ed5aad8b", + "crates/horizon-client/src/main.rs": "97afb9f33b0b9933defcd5e761e8ea7f0621e5d2872ee62e55922237e22ca68f", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "75f1f856e1ad5b1eec947f8f8a67a7f6d4696c9059d37e0eb61290d7f97c3d41", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "66c921c4a0c4e5bf97f2594ed243f6769d0dcebe9fe227177df928df22d6d03e" + }, + "resources": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "input_sha256": "49760fc8bd2f6fb429e5e8664e9aeee614efeebc9414fe29884462d646b88221", + "rust_output_sha256": "09ea5e3740e1a2c330487e226244bc066b387d34e0cff52d5661336e289ee569", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "09ea5e3740e1a2c330487e226244bc066b387d34e0cff52d5661336e289ee569", + "matched_output_lines": 362141 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "09ea5e3740e1a2c330487e226244bc066b387d34e0cff52d5661336e289ee569", + "matched_output_lines": 362141 + } + ], + "scope": "Stored PlayerMotion binds resident client chunks and registered attributes/coefficients to air travel, jumping, Entity.move, step resolution, ground/support updates, restitution and speed factors. Repeated native Player.travel/jump/move and actual Player.aiStep / direct LivingEntity.aiStep compare position, velocity, bounds, collision/ground flags, support, climb state, fall-reset field, both sync flags, speed, head yaw, jump trigger and jump delay by exact bits. Prepared-local-input Player.aiStep paths verify the stored speed refresh after movement, with empty inventory and no nearby entities. Travel uses the actual Player.getSpeed movement-attribute query, independently of that stored base-living speed field; both getter and setter execute native bodies. Dry aiStep includes small-velocity cleanup, input damping, held/released jump timing and server frost-modifier removal. Snapshots also compare all allocated attribute instances, base/cache/dirty state, modifier values/operations/permanence and pending update/sync membership (not JVM identity-dependent iteration order). Dry resident scene, fixed standing dimensions, zero frozen ticks, empty equipment, no interpolation, fluids, vehicles, effects, crouching or other entities. Actual LivingEntity.checkFallDamage, registered Block.fallOn/bounceOn and Player/LivingEntity.causeFallDamage are composed, including float-narrowed fall-distance accumulation, reset, last-climb clearing, safe-fall and damage-multiplier attributes, impulse exemptions and ordered landing particle/sound/statistic/hit-ground/damage requests. Farmland pushes the stored player and replaces actual chunk state; repeated turtle-egg changes preserve hatch. Block state at the landing fixture is compared after every operation. World RNG is a seeded native legacy stream. Actual ServerPlayer/Player/LivingEntity hurt dispatch now updates native synchronized health and player absorption, modified armor/toughness reduction, exhaustion, damage cooldown/last-source state and velocity synchronization. Native health storage and dirty flags are compared after every operation. Damage sources use actual decoded/tagged pinned damage registries. ServerPlayer jump statistics and exhaustion are included; dead-or-dying state disables movement input and jumping. Empty equipment/hands/effects, normal difficulty, damage gamerules enabled, loaded client and no spawn-extra fall particles define this scene domain. Ordered health/statistic/combat-record/broadcast/sound/criterion/death requests are compared; criterion argument payloads retain the separate combat gate. Actual health changes are applied, but audiovisual playback, persistent statistics, combat tracker internals, full death/drop/respawn services, block neighbor/drop/block-entity callbacks, movement emission, block-inside and networking remain controlled consumers. Explicit clock operations establish cooldown/hurt-time/game-time state using the two damage-clock phases; the full enclosing native ticks are not invoked by those setup operations. Input preparation has its own client comparison. No full Player.tick, hunger regeneration, local input lifecycle, nonempty inventory/equipment ticks, full freezing, complete death lifecycle or full gameplay parity claim." +} diff --git a/benchmarks/rust-native-health-2026-10-07/startup-smoke.json b/benchmarks/rust-native-health-2026-10-07/startup-smoke.json new file mode 100644 index 000000000..75884ba27 --- /dev/null +++ b/benchmarks/rust-native-health-2026-10-07/startup-smoke.json @@ -0,0 +1,795 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 1, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "culled_model_faces": 59636, + "elapsed_seconds": 0.589926787, + "error": null, + "fall_damage_requests": 0, + "last_requested_fall_damage": null, + "merged_quads": 3169, + "mesh_revision": 0, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "movement_ticks": 0, + "os": "linux", + "player_absorption": null, + "player_dead": null, + "player_fall_distance": null, + "player_health": null, + "player_hurt_cooldown": null, + "player_on_ground": null, + "player_position": null, + "player_velocity": null, + "presented_frames": 30, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native resident-scene renderer with inspection camera and optional fixed-rate dry walking test; full gameplay remains unfinished", + "sprite_layers": 18, + "visible_model_faces": 5991, + "walking": false, + "window_size": [ + 1280, + 720 + ], + "world_revision": 0, + "native_scene_culling": { + "blocks": 10919, + "culled_faces": 59636, + "visible_faces": 5991 + }, + "native_selection": { + "matched_placements": 16, + "selected_parts": 20, + "client_jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a2ff1c890d6f3a5292c3a9402f02ca5404a993dc117853b25cbe64ac92b76d30", + "scope": "Actual native registry states, blockstate dispatch, tagged root baking and legacy collection using state.getSeed(position). All 16 featured placements match model names/transforms. An independently constructed native scene also matches total occupied blocks and visible/culled model faces using native parent resolution, rotated culling directions and Block.shouldRenderFace. No shader/pixel parity claim." + }, + "resource_files": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "executable_sha256": "cb7f4e2f8b95c591235101c6a08dfb6239f8792f722a4e39ecf3d81c64b7db70", + "resource_manifest_sha256": "92a51de578be0e7c37d21e94caa3f22503f7d88b73827a5fce109b1b889e5d18", + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "3725d5adf8b6f227736b22c5b474a761c1986ff023163ad6ba5cea56418da469", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "ad2be13a2b5897ded12d67cb61d19f5a50bf8f2a6fd1fc79ae640863746041ef", + "crates/horizon-client/src/lib.rs": "f932e2500dfe12f2969eb54303fb248c63d79f6be4bebc441b839270ed5aad8b", + "crates/horizon-client/src/main.rs": "97afb9f33b0b9933defcd5e761e8ea7f0621e5d2872ee62e55922237e22ca68f", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "75f1f856e1ad5b1eec947f8f8a67a7f6d4696c9059d37e0eb61290d7f97c3d41", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "66c921c4a0c4e5bf97f2594ed243f6769d0dcebe9fe227177df928df22d6d03e", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + } +} diff --git a/benchmarks/rust-native-hunger-2026-10-07/interactive-smoke.json b/benchmarks/rust-native-hunger-2026-10-07/interactive-smoke.json new file mode 100644 index 000000000..74bddddb2 --- /dev/null +++ b/benchmarks/rust-native-hunger-2026-10-07/interactive-smoke.json @@ -0,0 +1,814 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 714, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 5.620000004768372, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "culled_model_faces": 59636, + "elapsed_seconds": 285.782266301, + "error": null, + "fall_damage_requests": 1, + "last_requested_fall_damage": 9.0, + "merged_quads": 3169, + "mesh_revision": 0, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "movement_ticks": 42, + "os": "linux", + "player_absorption": 0.0, + "player_dead": false, + "player_exhaustion": 1.0, + "player_fall_distance": 0.0, + "player_food": 20, + "player_food_timer": 3, + "player_health": 12.5, + "player_hurt_cooldown": 0, + "player_on_ground": true, + "player_position": [ + 25.0, + 4.0, + 25.0 + ], + "player_saturation": 3.0, + "player_velocity": [ + 0.0, + -0.0784000015258789, + 0.0 + ], + "presented_frames": 16723, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native resident-scene renderer with inspection camera and optional fixed-rate dry walking test; full gameplay remains unfinished", + "sprite_layers": 18, + "visible_model_faces": 5991, + "walking": true, + "window_size": [ + 1280, + 720 + ], + "world_revision": 0, + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "b9d0ecc5ec60a09d75ab9fe778e0a2e5bbb36fd8364a7ce996405f3dc9cb3b9f", + "crates/horizon-client/src/lib.rs": "bc1d0a7e42c11a9090abfebc4ed1f595415dd8b72a6a04b63c765b0deba29f6f", + "crates/horizon-client/src/main.rs": "aeb6b5220f8b89a1c9e85bf23fa2bbbafbc876108e59a222d383ad6e6fa238a6", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "673cc4bf6c4bc5523c104981e7c1cd640081a1b6ddca1e0ebe02181f04830347", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "executable_sha256": "62fc8ff8bc750d2afeede7aaf830484de869655d7334c2a6405c9194e9a79cf9", + "resource_files": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "resource_manifest_sha256": "92a51de578be0e7c37d21e94caa3f22503f7d88b73827a5fce109b1b889e5d18", + "verification": { + "physical_controls": [ + "F5 enable walking", + "F3 diagnostics", + "Ctrl+Q exit" + ], + "observations": [ + "Exactly one incoming fall damage request of 9.0; final health recovered to 12.5 from the resulting 11.0", + "F3 title showed Health 11.833333 and Food 20 during recovery", + "Final food 20, saturation 3.0, exhaustion 1.0, food timer 3", + "Player grounded at [25, 4, 25], alive, hurt cooldown zero after 42 movement ticks", + "Ground screenshot visually inspected; clean exit with no remaining window" + ], + "screenshots_private_sha256": { + "hunger-ground.png": "e2ed86fa9597ef9e5324213a616465909b160e2e1d71d351d70f891ed2638adb" + }, + "limits": "Linux resident-scene smoke check only. Movement pauses without focus; elapsed wall time is not simulation time. Complete enclosing native ticks, item use, movement-distance exhaustion, full death/drop/respawn, native pixel parity, platform release acceptance and hardware FPS comparisons remain unfinished." + } +} diff --git a/benchmarks/rust-native-hunger-2026-10-07/scene-motion.json b/benchmarks/rust-native-hunger-2026-10-07/scene-motion.json new file mode 100644 index 000000000..25d36f41c --- /dev/null +++ b/benchmarks/rust-native-hunger-2026-10-07/scene-motion.json @@ -0,0 +1,353 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "fixtures": 2837, + "operations": 196489, + "sources_sha256": { + "tools/test_native_scene_motion.py": "f787570730442ea7c88629749e465a3f6edf14209192e578b307a35ddda1afc6", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneMotionOracle.java": "618b372e497277b38e15de3b32015318c5243387e3a205f552aa2d6840d9a91a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java": "85570f2f5a98bc508f887bd61d3266cda1f6f8ba06d304241aa2128a4650f66d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockLandingOracle.java": "e397acdbaf2702f358c90ba53a804afa26d7f29a278884c0e779b18f1ae40e63", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementRegistryOracle.java": "49fcc1f4348a8e279dcb916ae149de8c97f15df54ff1a675826b7c6c3dda06d9", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageSourceOracle.java": "0cf0126d69d1052dea74a6bfb5a97250ab69d8f7a95360d9c6399fe03376dcd2", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/examples/scene_motion_probe.rs": "35628d4afb104f6722c1a6288879b06e6ee5596ca32448271e66f2f5c6f2409d", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "b9d0ecc5ec60a09d75ab9fe778e0a2e5bbb36fd8364a7ce996405f3dc9cb3b9f", + "crates/horizon-client/src/lib.rs": "bc1d0a7e42c11a9090abfebc4ed1f595415dd8b72a6a04b63c765b0deba29f6f", + "crates/horizon-client/src/main.rs": "aeb6b5220f8b89a1c9e85bf23fa2bbbafbc876108e59a222d383ad6e6fa238a6", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "673cc4bf6c4bc5523c104981e7c1cd640081a1b6ddca1e0ebe02181f04830347", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5" + }, + "resources": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "input_sha256": "f19b11f5f1911f77d559f25e4604d5e0db0d44f27161bf5db9be26d0f3fec739", + "rust_output_sha256": "dde3b937493a8cadf978fde8f016c42eab8bc69ebb86bd09c9cd3063b30a0f60", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "dde3b937493a8cadf978fde8f016c42eab8bc69ebb86bd09c9cd3063b30a0f60", + "matched_output_lines": 985282 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "dde3b937493a8cadf978fde8f016c42eab8bc69ebb86bd09c9cd3063b30a0f60", + "matched_output_lines": 985282 + } + ], + "scope": "Stored PlayerMotion binds resident client chunks and registered attributes/coefficients to air travel, jumping, Entity.move, step resolution, ground/support updates, restitution and speed factors. Repeated native Player.travel/jump/move and actual Player.aiStep / direct LivingEntity.aiStep compare position, velocity, bounds, collision/ground flags, support, climb state, fall-reset field, both sync flags, speed, head yaw, jump trigger and jump delay by exact bits. Prepared-local-input Player.aiStep paths verify the stored speed refresh after movement, with empty inventory and no nearby entities. Travel uses the actual Player.getSpeed movement-attribute query, independently of that stored base-living speed field; both getter and setter execute native bodies. Dry aiStep includes small-velocity cleanup, input damping, held/released jump timing and server frost-modifier removal. Snapshots also compare all allocated attribute instances, base/cache/dirty state, modifier values/operations/permanence and pending update/sync membership (not JVM identity-dependent iteration order). Dry resident scene, fixed standing dimensions, zero frozen ticks, empty equipment, no interpolation, fluids, vehicles, effects, crouching or other entities. Actual LivingEntity.checkFallDamage, registered Block.fallOn/bounceOn and Player/LivingEntity.causeFallDamage are composed, including float-narrowed fall-distance accumulation, reset, last-climb clearing, safe-fall and damage-multiplier attributes, impulse exemptions and ordered landing particle/sound/statistic/hit-ground/damage requests. Farmland pushes the stored player and replaces actual chunk state; repeated turtle-egg changes preserve hatch. Block state at the landing fixture is compared after every operation. World RNG is a seeded native legacy stream. Actual ServerPlayer/Player/LivingEntity hurt dispatch now updates native synchronized health and player absorption, modified armor/toughness reduction, exhaustion, damage cooldown/last-source state and velocity synchronization. Native health storage and dirty flags are compared after every operation. Damage sources use actual decoded/tagged pinned damage registries. ServerPlayer jump statistics and exhaustion are included; dead-or-dying state disables movement input and jumping. Empty equipment/hands/effects, configurable difficulty and natural regeneration, damage gamerules enabled, loaded client and no spawn-extra fall particles define this scene domain. Ordered health/statistic/combat-record/broadcast/sound/criterion/death requests are compared; criterion argument payloads retain the separate combat gate. Actual health changes are applied, but audiovisual playback, persistent statistics, combat tracker internals, full death/drop/respawn services, block neighbor/drop/block-entity callbacks, movement emission, block-inside and networking remain controlled consumers. Actual FoodData.tick and ServerPlayer.tickRegeneration now share the same stored health, attributes, exhaustion and registered starvation damage. Snapshots compare food level, saturation, exhaustion, timer and tick count. Cases cover all four difficulties, regeneration rule changes, absorption during starvation, Peaceful recovery, timer overflow and nonfinite food values. Simulation operations compose clock setup, actual player movement and actual food ticking in their native order, including fall damage followed by regeneration in the same tick. Explicit clock operations establish cooldown/hurt-time/game-time/tick-count state; full enclosing native tick/doTick methods are not invoked by those setup operations. Input preparation has its own client comparison. No full Player.tick, consumable item-use lifecycle, movement-distance exhaustion, local input lifecycle, nonempty inventory/equipment ticks, full freezing, complete death lifecycle or full gameplay parity claim." +} diff --git a/benchmarks/rust-native-hunger-2026-10-07/startup-smoke.json b/benchmarks/rust-native-hunger-2026-10-07/startup-smoke.json new file mode 100644 index 000000000..0304a26ab --- /dev/null +++ b/benchmarks/rust-native-hunger-2026-10-07/startup-smoke.json @@ -0,0 +1,800 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 1, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "culled_model_faces": 59636, + "elapsed_seconds": 0.547544857, + "error": null, + "fall_damage_requests": 0, + "last_requested_fall_damage": null, + "merged_quads": 3169, + "mesh_revision": 0, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "movement_ticks": 0, + "os": "linux", + "player_absorption": null, + "player_dead": null, + "player_exhaustion": null, + "player_fall_distance": null, + "player_food": null, + "player_food_timer": null, + "player_health": null, + "player_hurt_cooldown": null, + "player_on_ground": null, + "player_position": null, + "player_saturation": null, + "player_velocity": null, + "presented_frames": 30, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native resident-scene renderer with inspection camera and optional fixed-rate dry walking test; full gameplay remains unfinished", + "sprite_layers": 18, + "visible_model_faces": 5991, + "walking": false, + "window_size": [ + 1280, + 720 + ], + "world_revision": 0, + "native_scene_culling": { + "blocks": 10919, + "culled_faces": 59636, + "visible_faces": 5991 + }, + "native_selection": { + "matched_placements": 16, + "selected_parts": 20, + "client_jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a2ff1c890d6f3a5292c3a9402f02ca5404a993dc117853b25cbe64ac92b76d30", + "scope": "Actual native registry states, blockstate dispatch, tagged root baking and legacy collection using state.getSeed(position). All 16 featured placements match model names/transforms. An independently constructed native scene also matches total occupied blocks and visible/culled model faces using native parent resolution, rotated culling directions and Block.shouldRenderFace. No shader/pixel parity claim." + }, + "resource_files": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "executable_sha256": "62fc8ff8bc750d2afeede7aaf830484de869655d7334c2a6405c9194e9a79cf9", + "resource_manifest_sha256": "92a51de578be0e7c37d21e94caa3f22503f7d88b73827a5fce109b1b889e5d18", + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "b9d0ecc5ec60a09d75ab9fe778e0a2e5bbb36fd8364a7ce996405f3dc9cb3b9f", + "crates/horizon-client/src/lib.rs": "bc1d0a7e42c11a9090abfebc4ed1f595415dd8b72a6a04b63c765b0deba29f6f", + "crates/horizon-client/src/main.rs": "aeb6b5220f8b89a1c9e85bf23fa2bbbafbc876108e59a222d383ad6e6fa238a6", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "673cc4bf6c4bc5523c104981e7c1cd640081a1b6ddca1e0ebe02181f04830347", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + } +} diff --git a/benchmarks/rust-native-landing-2026-10-07/interactive-smoke.json b/benchmarks/rust-native-landing-2026-10-07/interactive-smoke.json new file mode 100644 index 000000000..c28b0d8fa --- /dev/null +++ b/benchmarks/rust-native-landing-2026-10-07/interactive-smoke.json @@ -0,0 +1,802 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 168, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 5.620000004768372, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "culled_model_faces": 59636, + "elapsed_seconds": 67.622529318, + "error": null, + "fall_damage_requests": 1, + "last_requested_fall_damage": 9.0, + "merged_quads": 3169, + "mesh_revision": 0, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "movement_ticks": 68, + "os": "linux", + "player_fall_distance": 0.0, + "player_on_ground": true, + "player_position": [ + 25.0, + 4.0, + 25.0 + ], + "player_velocity": [ + 0.0, + -0.0784000015258789, + 0.0 + ], + "presented_frames": 3930, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native resident-scene renderer with inspection camera and optional fixed-rate dry walking test; full gameplay remains unfinished", + "sprite_layers": 18, + "visible_model_faces": 5991, + "walking": true, + "window_size": [ + 1280, + 720 + ], + "world_revision": 0, + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "9310a571c3a8908c6c4804a8b14935882382da0f4755ffc4d1087d379824bb32", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "4192ce43717696b2c893b69f7f156b3084cd5a92dd275f0c5be1ee7c6228918b", + "crates/horizon-client/src/lib.rs": "6eb8caa81741cabc56651603f9be8d15a8d219be5a5ae4dc2045c557fc24bb79", + "crates/horizon-client/src/main.rs": "aa602d14ab9512de90165c9aeee40dd04d5cd602d8fc2a9d2d7139f12a7db1ec", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "0b2ecde5118b60a158e18aa5cf7746ef88566a0ad0fc3c97594b8d5ee00b1cdb", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "66c921c4a0c4e5bf97f2594ed243f6769d0dcebe9fe227177df928df22d6d03e", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "3a02b5f384235eb2d7002396cbddffb3bf3840534c205c85aefac090562b76c4", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "executable_sha256": "fcfd655b756ed003cd5b97fe9ca5afba8b965813b2d7cb30e7639168f8d17e22", + "resource_files": { + "files": 5586, + "sha256": "df3e6624ad08800f224dbe4c90fd3753ba84e7643f93475701957108a73acb25" + }, + "resource_manifest_sha256": "91491cf250a0032f6a7fc8e4a10807f7384310d927babe178ffc75ded8ef25b0", + "verification": { + "physical_controls": [ + "F5 enable walking after window became ready", + "Ctrl+Q exit" + ], + "observations": [ + "Landed at scene ground y=4 with fall distance reset to zero", + "Exactly one fall damage request of 9.0 recorded", + "Ground screenshot visually inspected", + "Exit report has no error; virtual screen has no remaining window" + ], + "screenshots_private_sha256": { + "landing-ground.png": "e2ed86fa9597ef9e5324213a616465909b160e2e1d71d351d70f891ed2638adb" + }, + "limits": "Linux development-scene smoke check only. Damage requests are not yet applied to health. No full gameplay, native pixel parity, platform release acceptance or FPS comparison claim." + } +} diff --git a/benchmarks/rust-native-landing-2026-10-07/scene-motion.json b/benchmarks/rust-native-landing-2026-10-07/scene-motion.json new file mode 100644 index 000000000..83a1b46c4 --- /dev/null +++ b/benchmarks/rust-native-landing-2026-10-07/scene-motion.json @@ -0,0 +1,350 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "fixtures": 1449, + "operations": 73025, + "sources_sha256": { + "tools/test_native_scene_motion.py": "703dad2ad4a821f5924edf9721b7f22bab72e2f2fe814a1310f2edae53e759c0", + "tools/test_native_client.py": "9310a571c3a8908c6c4804a8b14935882382da0f4755ffc4d1087d379824bb32", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "3a02b5f384235eb2d7002396cbddffb3bf3840534c205c85aefac090562b76c4", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneMotionOracle.java": "75e415884509d86e1529a252fd40d263ad122db4600fadab796d77c45bfe274a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java": "85570f2f5a98bc508f887bd61d3266cda1f6f8ba06d304241aa2128a4650f66d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockLandingOracle.java": "e397acdbaf2702f358c90ba53a804afa26d7f29a278884c0e779b18f1ae40e63", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementRegistryOracle.java": "49fcc1f4348a8e279dcb916ae149de8c97f15df54ff1a675826b7c6c3dda06d9", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/examples/scene_motion_probe.rs": "1192653e45613171a76131b0407a57be7966f6f77e4c59b9e5323cd3d7b24fa1", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "4192ce43717696b2c893b69f7f156b3084cd5a92dd275f0c5be1ee7c6228918b", + "crates/horizon-client/src/lib.rs": "6eb8caa81741cabc56651603f9be8d15a8d219be5a5ae4dc2045c557fc24bb79", + "crates/horizon-client/src/main.rs": "aa602d14ab9512de90165c9aeee40dd04d5cd602d8fc2a9d2d7139f12a7db1ec", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "0b2ecde5118b60a158e18aa5cf7746ef88566a0ad0fc3c97594b8d5ee00b1cdb", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "66c921c4a0c4e5bf97f2594ed243f6769d0dcebe9fe227177df928df22d6d03e" + }, + "resources": { + "files": 5586, + "sha256": "df3e6624ad08800f224dbe4c90fd3753ba84e7643f93475701957108a73acb25" + }, + "input_sha256": "c52c1bd3688779819676bcef6280f225f6e3965521135914adc49c82977887e4", + "rust_output_sha256": "25d9b329565afab3af41ae9e16fba9bffc957d206724f3df0c9153d1051c7712", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "25d9b329565afab3af41ae9e16fba9bffc957d206724f3df0c9153d1051c7712", + "matched_output_lines": 220524 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "25d9b329565afab3af41ae9e16fba9bffc957d206724f3df0c9153d1051c7712", + "matched_output_lines": 220524 + } + ], + "scope": "Stored PlayerMotion binds resident client chunks and registered attributes/coefficients to air travel, jumping, Entity.move, step resolution, ground/support updates, restitution and speed factors. Repeated native Player.travel/jump/move and actual Player.aiStep / direct LivingEntity.aiStep compare position, velocity, bounds, collision/ground flags, support, climb state, fall-reset field, both sync flags, speed, head yaw, jump trigger and jump delay by exact bits. Prepared-local-input Player.aiStep paths verify speed refresh after movement, with empty inventory and no nearby entities. Dry aiStep includes small-velocity cleanup, input damping, held/released jump timing and server frost-modifier removal. Snapshots also compare all allocated attribute instances, base/cache/dirty state, modifier values/operations/permanence and pending update/sync membership (not JVM identity-dependent iteration order). Dry resident scene, fixed standing dimensions, zero frozen ticks, empty equipment, no interpolation, fluids, vehicles, effects, crouching or other entities. Actual LivingEntity.checkFallDamage, registered Block.fallOn/bounceOn and Player/LivingEntity.causeFallDamage are composed, including float-narrowed fall-distance accumulation, reset, last-climb clearing, safe-fall and damage-multiplier attributes, impulse exemptions and ordered landing particle/sound/statistic/hit-ground/damage requests. Farmland pushes the stored player and replaces actual chunk state; repeated turtle-egg changes preserve hatch. Block state at the landing fixture is compared after every operation. World RNG is a seeded native legacy stream. Health damage, audiovisual playback, block neighbor/drop/block-entity callbacks, movement emission, block-inside and networking remain controlled boundaries; the native hurtServer consumer records requests and returns false. Input preparation has its own client comparison. No full Player.tick, local input lifecycle, nonempty inventory/equipment ticks, full freezing, health/damage lifecycle or full gameplay parity claim." +} diff --git a/benchmarks/rust-native-landing-2026-10-07/startup-smoke.json b/benchmarks/rust-native-landing-2026-10-07/startup-smoke.json new file mode 100644 index 000000000..4bcdcfecf --- /dev/null +++ b/benchmarks/rust-native-landing-2026-10-07/startup-smoke.json @@ -0,0 +1,790 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 1, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "culled_model_faces": 59636, + "elapsed_seconds": 0.547517663, + "error": null, + "fall_damage_requests": 0, + "last_requested_fall_damage": null, + "merged_quads": 3169, + "mesh_revision": 0, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "movement_ticks": 0, + "os": "linux", + "player_fall_distance": null, + "player_on_ground": null, + "player_position": null, + "player_velocity": null, + "presented_frames": 30, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native resident-scene renderer with inspection camera and optional fixed-rate dry walking test; full gameplay remains unfinished", + "sprite_layers": 18, + "visible_model_faces": 5991, + "walking": false, + "window_size": [ + 1280, + 720 + ], + "world_revision": 0, + "native_scene_culling": { + "blocks": 10919, + "culled_faces": 59636, + "visible_faces": 5991 + }, + "native_selection": { + "matched_placements": 16, + "selected_parts": 20, + "client_jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a2ff1c890d6f3a5292c3a9402f02ca5404a993dc117853b25cbe64ac92b76d30", + "scope": "Actual native registry states, blockstate dispatch, tagged root baking and legacy collection using state.getSeed(position). All 16 featured placements match model names/transforms. An independently constructed native scene also matches total occupied blocks and visible/culled model faces using native parent resolution, rotated culling directions and Block.shouldRenderFace. No shader/pixel parity claim." + }, + "resource_files": { + "files": 5586, + "sha256": "df3e6624ad08800f224dbe4c90fd3753ba84e7643f93475701957108a73acb25" + }, + "executable_sha256": "fcfd655b756ed003cd5b97fe9ca5afba8b965813b2d7cb30e7639168f8d17e22", + "resource_manifest_sha256": "91491cf250a0032f6a7fc8e4a10807f7384310d927babe178ffc75ded8ef25b0", + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "9310a571c3a8908c6c4804a8b14935882382da0f4755ffc4d1087d379824bb32", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "4192ce43717696b2c893b69f7f156b3084cd5a92dd275f0c5be1ee7c6228918b", + "crates/horizon-client/src/lib.rs": "6eb8caa81741cabc56651603f9be8d15a8d219be5a5ae4dc2045c557fc24bb79", + "crates/horizon-client/src/main.rs": "aa602d14ab9512de90165c9aeee40dd04d5cd602d8fc2a9d2d7139f12a7db1ec", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "0b2ecde5118b60a158e18aa5cf7746ef88566a0ad0fc3c97594b8d5ee00b1cdb", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "66c921c4a0c4e5bf97f2594ed243f6769d0dcebe9fe227177df928df22d6d03e", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "3a02b5f384235eb2d7002396cbddffb3bf3840534c205c85aefac090562b76c4", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + } +} diff --git a/benchmarks/rust-native-model-client-2026-10-06/startup-smoke.json b/benchmarks/rust-native-model-client-2026-10-06/startup-smoke.json new file mode 100644 index 000000000..77e26f46a --- /dev/null +++ b/benchmarks/rust-native-model-client-2026-10-06/startup-smoke.json @@ -0,0 +1,96 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 1, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "elapsed_seconds": 0.691954259, + "error": null, + "merged_quads": 166, + "model_gallery": [ + "oak_stairs", + "stone_slab", + "anvil", + "torch", + "lantern", + "oak_fence_post", + "oak_fence_gate", + "iron_bars_post", + "cobweb", + "grindstone", + "ladder", + "amethyst_cluster" + ], + "model_quads": 145, + "os": "linux", + "presented_frames": 30, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native cube and cuboid-model renderer with binary cutouts, stepped sprite animation and free camera; no gameplay simulation", + "sprite_layers": 18, + "window_size": [ + 1280, + 720 + ], + "resource_files": { + "files": 5579, + "sha256": "0bc95c8e4b10ef7401f4b948e9a151ea2f9d9112e8dadb9f6807a51e143fcf6f" + }, + "executable_sha256": "da79260dbc9ac235d48837dd7a2ea7369c03adffba40f7cb6a3e30f86c42daa4", + "resource_manifest_sha256": "eda44ebee6904eab880c15458dbd1212dc2799d320a4419fc810e2ceb0e5d9d6", + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "fed441cad861a44e9919087307cdb9b3d8165fe36ae05ab03f72dde23758cbd5", + "tools/test_native_client.py": "e47a866cffd20fcd6fdab62fca573227ca9837488e72384f08f8c33fd4b6228c", + "crates/horizon-client/Cargo.toml": "a6eaf78388d88f1e9628474734ee6f1678f1b12c63ee25e86d7d95c8a9c155a8", + "crates/horizon-assets/Cargo.toml": "fadb78cf819e026500606c45d27138ed67fcbbc967ae8cee6c1e7c82c9046b36", + "crates/horizon-client/src/assets.rs": "c953a42820cb8d19d8964d4807df401614d4d6621bb47d8ba591c8db38f3e214", + "crates/horizon-client/src/camera.rs": "f9821c8a51a004dd4ad9c0952e746eb07926f6040cf8660bc26da5a0728ae572", + "crates/horizon-client/src/main.rs": "7fb00e89b963a77f124c8e7ad59c5506a4a2f3e6c69720944dec00677ed15239", + "crates/horizon-client/src/mesh.rs": "e2fa00435ec8239ba8a3c6539022bb50a10ff9c3850c6faab72f86aabea896ef", + "crates/horizon-client/src/models.rs": "70b0273100e83afbfc5c013c79afae1e6b13565845e067ad3303244c3f0bbe68", + "crates/horizon-client/src/render.rs": "0f8929d9061b20adbc5ddd0adcbe9f90ce76227b7bb9bafe3f4474961ee2984c", + "crates/horizon-client/src/sprites.rs": "0c4d6acc07b947e5d99aeed8f3788d15639d5af1071eaa0852e9e2fd8c51e318", + "crates/horizon-client/src/world.rs": "901aa59c23ea084e926eec014589f4d511c41691a8dc1520534e039c28cfc76c", + "crates/horizon-client/src/world.wgsl": "82873c131f46a31aef35106f89a53589f179048362d0f8877eca6d20aa6274a4", + "crates/horizon-assets/src/bake.rs": "0bc519e93ad8200d89543ceb5c811dd82bbeb0e9003b143385c8a03e758dfe65", + "crates/horizon-assets/src/json.rs": "e7b89bf4852f561a0e5bf1a984857c61e755961dfd86fcc326b6d55558615f39", + "crates/horizon-assets/src/lib.rs": "5fe567bdf1e63230cee2b960719c5cb6166176a674772955329a9d04cf22b9db", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541" + }, + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "manual_validation": { + "scope": "Interactive close inspection of the twelve gallery models, followed by stationary screenshot differences confined to the lantern. This preceded the final Arc allocation/lint cleanup; the bounded startup test above used the final source fingerprints.", + "interactive_frames": 6226, + "animation_uploads": 269, + "lantern_difference_bounds": [ + 411, + 307, + 425, + 318 + ], + "screenshot_sha256": { + "model-gallery-first.png": "2ac637607e34ec05f552b3496c721ae9c09fa9e2a4a1d5e64073a49c39c5b36c", + "model-gallery-close.png": "188d35e8a9ecd0c68ee08545b503402450e2675f2ccf28fbb32d26751e634a7e", + "model-gallery-animation-0.png": "188d35e8a9ecd0c68ee08545b503402450e2675f2ccf28fbb32d26751e634a7e", + "model-gallery-animation-1.png": "1e26f942411d91554c4e509803d7e5eafa8e6d5467c455051d0b5c77497a2ec2", + "model-gallery-animation-2.png": "188d35e8a9ecd0c68ee08545b503402450e2675f2ccf28fbb32d26751e634a7e", + "model-gallery-animation-3.png": "1e26f942411d91554c4e509803d7e5eafa8e6d5467c455051d0b5c77497a2ec2" + }, + "limitations": "Linux software Vulkan adapter only; no native Mac or Windows execution, gameplay or full pixel-parity claim." + } +} diff --git a/benchmarks/rust-native-motion-tick-2026-10-07/scoped-parity.json b/benchmarks/rust-native-motion-tick-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..d5d2b249c --- /dev/null +++ b/benchmarks/rust-native-motion-tick-2026-10-07/scoped-parity.json @@ -0,0 +1,345 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "fixtures": 847, + "operations": 47393, + "sources_sha256": { + "tools/test_native_scene_motion.py": "e8d9bbfefe0d1901de18d1e1991e9fb7a4c510cf5757c5efea2e98ce75e4c8c9", + "tools/test_native_client.py": "5e8f5b24763d39e48ffabfe8a661c933b16cc41ff9b34dbede10dc921bb78716", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "524e4904d4f90f7f31895d228762e3e4f20dc97f8401c79cf99c33d7b497e84b", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneMotionOracle.java": "d5a842d9b99806f7450158da0f0ac5ce374cf0a97928a868734b5ac60e31c491", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java": "85570f2f5a98bc508f887bd61d3266cda1f6f8ba06d304241aa2128a4650f66d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/examples/scene_motion_probe.rs": "988800ccae79598bb0f0bd6aed4f519563b14c188b8b92c6fdc17d6daac70379", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "219896d942b84b4f60035e2fffb9d0590eeb7dbd79bf63e28aa40e0327accb20", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/lib.rs": "8efef76b8ed60a06af0f79a701e8a469f0b384756be19040b1f65490cd5614b3", + "crates/horizon-client/src/main.rs": "92fb3347a98b583e3a5f42e501aff4c35a0f7bc7bee5840b6054fdf7b7a3f1e6", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "f6b87da8f6e4cfe0df7d378e3eb3978299b51e7c3d63eb091ad25023b492c32b", + "crates/horizon-client/src/render.rs": "db17511223d0b72cf13bbb1bd7cbfca119d249f1d8914e7c1c06a710494c5123", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "17bd7127283c5ea27166e0e8079e8c284c6cff426a2fa8994879e48151e1ded4" + }, + "resources": { + "files": 5585, + "sha256": "f4a62ce38414761ec928babb2bad6ec73e13031c27393227dfd61f67cadabdbc" + }, + "input_sha256": "318264df0820cea653a3f992626e2645362fca01b7869518cf742acb4eb5574e", + "rust_output_sha256": "c33854238168f7b51906d656364eea67156a27c36e8a961a5eea2528261b71b4", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "c33854238168f7b51906d656364eea67156a27c36e8a961a5eea2528261b71b4", + "matched_output_lines": 48240 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "c33854238168f7b51906d656364eea67156a27c36e8a961a5eea2528261b71b4", + "matched_output_lines": 48240 + } + ], + "scope": "Stored PlayerMotion binds resident client chunks and registered attributes/coefficients to air travel, jumping, Entity.move, step resolution, ground/support updates, restitution and speed factors. Repeated native Player.travel/jump/move and direct LivingEntity.aiStep compare position, velocity, bounds, collision/ground flags, support, climb state, fall-reset field, both sync flags, speed and jump delay by exact bits. Dry aiStep includes small-velocity cleanup, input damping, held/released jump timing and server frost-modifier removal. Snapshots also compare all allocated attribute instances, base/cache/dirty state, modifier values/operations/permanence and pending update/sync membership (not JVM identity-dependent iteration order). Dry resident scene, fixed standing dimensions, zero frozen ticks, empty equipment, no interpolation, fluids, vehicles, effects, crouching or other entities. Landing/damage, audiovisual emission, block-inside and network consumers remain controlled boundaries. No outer Player.aiStep/tick, local input controller, full freezing, health/damage or full gameplay parity claim." +} diff --git a/benchmarks/rust-native-movement-statistics-2026-10-07/interactive-smoke.json b/benchmarks/rust-native-movement-statistics-2026-10-07/interactive-smoke.json new file mode 100644 index 000000000..489198f7b --- /dev/null +++ b/benchmarks/rust-native-movement-statistics-2026-10-07/interactive-smoke.json @@ -0,0 +1,814 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 160, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 23.12939004788537, + 5.620000004768372, + 23.12939004788537 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "culled_model_faces": 59636, + "elapsed_seconds": 64.237116866, + "error": null, + "fall_damage_requests": 1, + "last_requested_fall_damage": 9.0, + "merged_quads": 3169, + "mesh_revision": 0, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "movement_ticks": 82, + "os": "linux", + "player_absorption": 0.0, + "player_dead": false, + "player_exhaustion": 2.0, + "player_fall_distance": 0.0, + "player_food": 20, + "player_food_timer": 3, + "player_health": 14.0, + "player_hurt_cooldown": 0, + "player_on_ground": true, + "player_position": [ + 23.12939004788537, + 4.0, + 23.12939004788537 + ], + "player_saturation": 1.0, + "player_velocity": [ + 0.0, + -0.0784000015258789, + 0.0 + ], + "presented_frames": 3770, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native resident-scene renderer with inspection camera and optional fixed-rate dry walking test; full gameplay remains unfinished", + "sprite_layers": 18, + "visible_model_faces": 5991, + "walking": true, + "window_size": [ + 1280, + 720 + ], + "world_revision": 0, + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "b9d0ecc5ec60a09d75ab9fe778e0a2e5bbb36fd8364a7ce996405f3dc9cb3b9f", + "crates/horizon-client/src/lib.rs": "bc1d0a7e42c11a9090abfebc4ed1f595415dd8b72a6a04b63c765b0deba29f6f", + "crates/horizon-client/src/main.rs": "aeb6b5220f8b89a1c9e85bf23fa2bbbafbc876108e59a222d383ad6e6fa238a6", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "833d7e14ee37f82bef05094c1f0fa681b5ead3b3bcf4e915fbd5bc94e46dd7ad", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "e25b3543c07f31c2a9d23d811792de9a33290263c7c7445549a0682f6935d8a5", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_statistics.rs": "fe28061e29c41f8f399d29cce8c468a63854613702b5aa525c0f0fd98cb87f9a", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "executable_sha256": "ac49c3978800a25550c082b05c1a56fc73a8d806ee1bdb0e4825a02051bf802b", + "resource_files": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "resource_manifest_sha256": "92a51de578be0e7c37d21e94caa3f22503f7d88b73827a5fce109b1b889e5d18", + "verification": { + "physical_controls": [ + "F5 enable walking", + "F3 diagnostics", + "W held 650 ms", + "Ctrl+Q exit" + ], + "observations": [ + "Player walked horizontally and returned to grounded state", + "F3 title showed health 13.833333 and food 20 during recovery from a 9-point landing hit", + "Ground screenshot visually inspected; client exited without an error" + ], + "screenshots_private_sha256": { + "movement-statistics-ground.png": "6bf37ba998cc3f510d3334153fa56f8c1936f5ad95e7a68d642142c80842bbab" + }, + "limits": "Linux resident-scene smoke check. Statistics values and exhaustion arithmetic are checked by native differential fixtures; no sprint controls, full gameplay, native pixel parity, release acceptance or hardware FPS claim." + } +} diff --git a/benchmarks/rust-native-movement-statistics-2026-10-07/scene-motion.json b/benchmarks/rust-native-movement-statistics-2026-10-07/scene-motion.json new file mode 100644 index 000000000..6d1467a0b --- /dev/null +++ b/benchmarks/rust-native-movement-statistics-2026-10-07/scene-motion.json @@ -0,0 +1,354 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "fixtures": 5510, + "operations": 215204, + "sources_sha256": { + "tools/test_native_scene_motion.py": "0a460f3de4fded30cc2db924103ebe832482ea553a5be4994d615fdeb6ec5925", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneMotionOracle.java": "986fa5a715a831c0523f0ceff049da89f221c183a3ffcf4889d23d71c1b4841c", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java": "85570f2f5a98bc508f887bd61d3266cda1f6f8ba06d304241aa2128a4650f66d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockLandingOracle.java": "e397acdbaf2702f358c90ba53a804afa26d7f29a278884c0e779b18f1ae40e63", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementRegistryOracle.java": "49fcc1f4348a8e279dcb916ae149de8c97f15df54ff1a675826b7c6c3dda06d9", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageSourceOracle.java": "0cf0126d69d1052dea74a6bfb5a97250ab69d8f7a95360d9c6399fe03376dcd2", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/examples/scene_motion_probe.rs": "9afefb9152d14eaf112d67aa873fcb9697fd9d9a13cc88b9023f96f38a76e749", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "e25b3543c07f31c2a9d23d811792de9a33290263c7c7445549a0682f6935d8a5", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_statistics.rs": "fe28061e29c41f8f399d29cce8c468a63854613702b5aa525c0f0fd98cb87f9a", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "b9d0ecc5ec60a09d75ab9fe778e0a2e5bbb36fd8364a7ce996405f3dc9cb3b9f", + "crates/horizon-client/src/lib.rs": "bc1d0a7e42c11a9090abfebc4ed1f595415dd8b72a6a04b63c765b0deba29f6f", + "crates/horizon-client/src/main.rs": "aeb6b5220f8b89a1c9e85bf23fa2bbbafbc876108e59a222d383ad6e6fa238a6", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "833d7e14ee37f82bef05094c1f0fa681b5ead3b3bcf4e915fbd5bc94e46dd7ad", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5" + }, + "resources": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "input_sha256": "2445727962a0a0b9636203a81235f7d086ced8dfb86017a0af0e53ac102efaae", + "rust_output_sha256": "63dcfe0bfed3e43090b29f6d9ea1f1130022fe028ff75f4b257404d65087ad86", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "63dcfe0bfed3e43090b29f6d9ea1f1130022fe028ff75f4b257404d65087ad86", + "matched_output_lines": 1081530 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "63dcfe0bfed3e43090b29f6d9ea1f1130022fe028ff75f4b257404d65087ad86", + "matched_output_lines": 1081530 + } + ], + "scope": "Stored PlayerMotion binds resident client chunks and registered attributes/coefficients to air travel, jumping, Entity.move, step resolution, ground/support updates, restitution and speed factors. Repeated native Player.travel/jump/move and actual Player.aiStep / direct LivingEntity.aiStep compare position, velocity, bounds, collision/ground flags, support, climb state, fall-reset field, both sync flags, speed, head yaw, jump trigger and jump delay by exact bits. Prepared-local-input Player.aiStep paths verify the stored speed refresh after movement, with empty inventory and no nearby entities. Travel uses the actual Player.getSpeed movement-attribute query, independently of that stored base-living speed field; both getter and setter execute native bodies. Dry aiStep includes small-velocity cleanup, input damping, held/released jump timing and server frost-modifier removal. Snapshots also compare all allocated attribute instances, base/cache/dirty state, modifier values/operations/permanence and pending update/sync membership (not JVM identity-dependent iteration order). Dry resident scene, fixed standing dimensions, zero frozen ticks, empty equipment, no interpolation, fluids, vehicles, effects, crouching or other entities. Actual LivingEntity.checkFallDamage, registered Block.fallOn/bounceOn and Player/LivingEntity.causeFallDamage are composed, including float-narrowed fall-distance accumulation, reset, last-climb clearing, safe-fall and damage-multiplier attributes, impulse exemptions and ordered landing particle/sound/statistic/hit-ground/damage requests. Farmland pushes the stored player and replaces actual chunk state; repeated turtle-egg changes preserve hatch. Block state at the landing fixture is compared after every operation. World RNG is a seeded native legacy stream. Actual ServerPlayer/Player/LivingEntity hurt dispatch now updates native synchronized health and player absorption, modified armor/toughness reduction, exhaustion, damage cooldown/last-source state and velocity synchronization. Native health storage and dirty flags are compared after every operation. Damage sources use actual decoded/tagged pinned damage registries. ServerPlayer jump statistics and exhaustion are included; dead-or-dying state disables movement input and jumping. Empty equipment/hands/effects, configurable difficulty and natural regeneration, damage gamerules enabled, loaded client and no spawn-extra fall particles define this scene domain. Ordered health/statistic/combat-record/broadcast/sound/criterion/death requests are compared; criterion argument payloads retain the separate combat gate. Actual health changes are applied, but audiovisual playback, persistent statistics, combat tracker internals, full death/drop/respawn services, block neighbor/drop/block-entity callbacks, movement emission, block-inside and networking remain controlled consumers. Actual FoodData.tick and ServerPlayer.tickRegeneration now share the same stored health, attributes, exhaustion and registered starvation damage. Snapshots compare food level, saturation, exhaustion, timer and tick count. Cases cover all four difficulties, regeneration rule changes, absorption during starvation, Peaceful recovery, timer overflow and nonfinite food values. Simulation operations compose clock setup, actual player movement and actual food ticking in their native order, including fall damage followed by regeneration in the same tick. Explicit clock operations establish cooldown/hurt-time/game-time/tick-count state; full enclosing native tick/doTick methods are not invoked by those setup operations. Input preparation has its own client comparison. ServerPlayer.checkMovementStatistics executes on accepted resident deltas after movement and before food ticking. Additional direct method fixtures cover all 512 overlapping passenger/swim/eye-water/water/climb/ground/sprint/crouch/glide flag combinations, invulnerable abilities, centimeter rounding, overflow, signed zero and nonfinite deltas. Those query contexts apply only to the statistics method; fluid/vehicle/crouch/glide physics remain unbound. ServerGamePacketListener packet acceptance/rejection and scheduling are not executed. No full Player.tick, consumable item-use lifecycle, local input lifecycle, nonempty inventory/equipment ticks, full freezing, complete death lifecycle or full gameplay parity claim." +} diff --git a/benchmarks/rust-native-movement-statistics-2026-10-07/startup-smoke.json b/benchmarks/rust-native-movement-statistics-2026-10-07/startup-smoke.json new file mode 100644 index 000000000..371af1dc4 --- /dev/null +++ b/benchmarks/rust-native-movement-statistics-2026-10-07/startup-smoke.json @@ -0,0 +1,801 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 1, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "culled_model_faces": 59636, + "elapsed_seconds": 0.556021335, + "error": null, + "fall_damage_requests": 0, + "last_requested_fall_damage": null, + "merged_quads": 3169, + "mesh_revision": 0, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "movement_ticks": 0, + "os": "linux", + "player_absorption": null, + "player_dead": null, + "player_exhaustion": null, + "player_fall_distance": null, + "player_food": null, + "player_food_timer": null, + "player_health": null, + "player_hurt_cooldown": null, + "player_on_ground": null, + "player_position": null, + "player_saturation": null, + "player_velocity": null, + "presented_frames": 30, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native resident-scene renderer with inspection camera and optional fixed-rate dry walking test; full gameplay remains unfinished", + "sprite_layers": 18, + "visible_model_faces": 5991, + "walking": false, + "window_size": [ + 1280, + 720 + ], + "world_revision": 0, + "native_scene_culling": { + "blocks": 10919, + "culled_faces": 59636, + "visible_faces": 5991 + }, + "native_selection": { + "matched_placements": 16, + "selected_parts": 20, + "client_jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a2ff1c890d6f3a5292c3a9402f02ca5404a993dc117853b25cbe64ac92b76d30", + "scope": "Actual native registry states, blockstate dispatch, tagged root baking and legacy collection using state.getSeed(position). All 16 featured placements match model names/transforms. An independently constructed native scene also matches total occupied blocks and visible/culled model faces using native parent resolution, rotated culling directions and Block.shouldRenderFace. No shader/pixel parity claim." + }, + "resource_files": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "executable_sha256": "ac49c3978800a25550c082b05c1a56fc73a8d806ee1bdb0e4825a02051bf802b", + "resource_manifest_sha256": "92a51de578be0e7c37d21e94caa3f22503f7d88b73827a5fce109b1b889e5d18", + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "b9d0ecc5ec60a09d75ab9fe778e0a2e5bbb36fd8364a7ce996405f3dc9cb3b9f", + "crates/horizon-client/src/lib.rs": "bc1d0a7e42c11a9090abfebc4ed1f595415dd8b72a6a04b63c765b0deba29f6f", + "crates/horizon-client/src/main.rs": "aeb6b5220f8b89a1c9e85bf23fa2bbbafbc876108e59a222d383ad6e6fa238a6", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "833d7e14ee37f82bef05094c1f0fa681b5ead3b3bcf4e915fbd5bc94e46dd7ad", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "e25b3543c07f31c2a9d23d811792de9a33290263c7c7445549a0682f6935d8a5", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_statistics.rs": "fe28061e29c41f8f399d29cce8c468a63854613702b5aa525c0f0fd98cb87f9a", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + } +} diff --git a/benchmarks/rust-native-scene-collision-2026-10-07/interactive-smoke.json b/benchmarks/rust-native-scene-collision-2026-10-07/interactive-smoke.json new file mode 100644 index 000000000..8a3ecb575 --- /dev/null +++ b/benchmarks/rust-native-scene-collision-2026-10-07/interactive-smoke.json @@ -0,0 +1,780 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 175, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 5.620000004768372, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": true, + "culled_model_faces": 59636, + "elapsed_seconds": 70.165940163, + "error": null, + "merged_quads": 3169, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "os": "linux", + "presented_frames": 4065, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native cube and cuboid-model renderer with binary cutouts, stepped sprite animation and optional camera collisions; no gameplay simulation", + "sprite_layers": 18, + "visible_model_faces": 5991, + "window_size": [ + 1280, + 720 + ], + "validation": { + "kind": "interactive physical keyboard check on vscreen", + "actions": [ + "F4 enables collisions", + "Hold physical ShiftLeft for 3 seconds", + "Release ShiftLeft", + "Inspect screenshot at ground contact", + "Ctrl+Q closes the client" + ], + "expected_camera_position": [ + 25.0, + 5.620000004768372, + 25.0 + ], + "observed": "Camera stopped at the y=4 terrain surface, with eye offset equal to float32(1.62), instead of descending through it. F4 state and a clean exit were confirmed in the runtime report.", + "limitations": "Inspection camera movement only. No player physics or hardware FPS comparison." + }, + "sources_sha256": { + "tools/test_native_scene_collision.py": "c51e998fd97ebae46918efc77bdf57f961481f8881312a9002c65bf637a1a2bb", + "tools/test_native_client.py": "3b838065aef8d4af24df95e6d0ad1a96ffd29ab36698cae5c8003f8e5524dc0f", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "9f7299079bd9b1e2d54899e031f8a389ce44b7322c71890609e23597f35fb217", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java": "a6f9ea150ca15e86c60fd7f222127e8895a95e21353939db92680b202fdc0c0a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/examples/scene_collision_probe.rs": "36ce97bea4d70c0238c9f63234239ba7de5c8645c67773a0f96d320af6f9a911", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "219896d942b84b4f60035e2fffb9d0590eeb7dbd79bf63e28aa40e0327accb20", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/lib.rs": "f98a1619883dc5654d50edb4fbd9211d69f3d6e7bd945799136d09e7e4510dab", + "crates/horizon-client/src/main.rs": "92fb3347a98b583e3a5f42e501aff4c35a0f7bc7bee5840b6054fdf7b7a3f1e6", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/render.rs": "db17511223d0b72cf13bbb1bd7cbfca119d249f1d8914e7c1c06a710494c5123", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "17bd7127283c5ea27166e0e8079e8c284c6cff426a2fa8994879e48151e1ded4" + }, + "executable_sha256": "e924949d00ac5164ba986ed91872b5474f2675150d6063f37aee9def91ee0aa7" +} diff --git a/benchmarks/rust-native-scene-collision-2026-10-07/scoped-parity.json b/benchmarks/rust-native-scene-collision-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..caaca236e --- /dev/null +++ b/benchmarks/rust-native-scene-collision-2026-10-07/scoped-parity.json @@ -0,0 +1,368 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "sources_sha256": { + "tools/test_native_scene_collision.py": "c51e998fd97ebae46918efc77bdf57f961481f8881312a9002c65bf637a1a2bb", + "tools/test_native_client.py": "3b838065aef8d4af24df95e6d0ad1a96ffd29ab36698cae5c8003f8e5524dc0f", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "9f7299079bd9b1e2d54899e031f8a389ce44b7322c71890609e23597f35fb217", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java": "a6f9ea150ca15e86c60fd7f222127e8895a95e21353939db92680b202fdc0c0a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/examples/scene_collision_probe.rs": "36ce97bea4d70c0238c9f63234239ba7de5c8645c67773a0f96d320af6f9a911", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "219896d942b84b4f60035e2fffb9d0590eeb7dbd79bf63e28aa40e0327accb20", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/lib.rs": "f98a1619883dc5654d50edb4fbd9211d69f3d6e7bd945799136d09e7e4510dab", + "crates/horizon-client/src/main.rs": "92fb3347a98b583e3a5f42e501aff4c35a0f7bc7bee5840b6054fdf7b7a3f1e6", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/render.rs": "db17511223d0b72cf13bbb1bd7cbfca119d249f1d8914e7c1c06a710494c5123", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "17bd7127283c5ea27166e0e8079e8c284c6cff426a2fa8994879e48151e1ded4" + }, + "resources": { + "files": 5583, + "sha256": "e09fcdecee0246a04bf5abe35c57b4b15b3e84260a9eb51e52911c125aaaba2c" + }, + "cases": [ + { + "radius": 1, + "fixtures": 7075, + "input_sha256": "241be6e99567bb11506c246790bf7f1d504abe410156ef455433d5161a626787", + "scene_sha256": "1c8f3f9c11bb5c6d8d0bfbd7d84852f5ebdf2f42d1e80d74c4fb082a31696c66", + "rust_output_sha256": "9f6e65451573f29c56b7e5d9f3f45d6f4a02fcf7b6e1939f3da88638d36fd182", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "matched_output_lines": 7075, + "output_sha256": "9f6e65451573f29c56b7e5d9f3f45d6f4a02fcf7b6e1939f3da88638d36fd182" + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "matched_output_lines": 7075, + "output_sha256": "9f6e65451573f29c56b7e5d9f3f45d6f4a02fcf7b6e1939f3da88638d36fd182" + } + ] + }, + { + "radius": 2, + "fixtures": 7075, + "input_sha256": "4367b18176dd4376b874a89f9d3b492f715f9b34eb14012f5deeb5e0aebdf34a", + "scene_sha256": "dc6f0c3ed5941948137ffad1141942f1d4a72d86cd1b4ae84eb34c676107fab6", + "rust_output_sha256": "d75a0493fdfbcc2e9bb24e62254ed2349e2e71e9ea80148ee9e84ec8181ee92d", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "matched_output_lines": 7075, + "output_sha256": "d75a0493fdfbcc2e9bb24e62254ed2349e2e71e9ea80148ee9e84ec8181ee92d" + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "matched_output_lines": 7075, + "output_sha256": "d75a0493fdfbcc2e9bb24e62254ed2349e2e71e9ea80148ee9e84ec8181ee92d" + } + ] + } + ], + "scope": "Actual client Assets loader and TestWorld resident chunks feed registered collision shapes, block scanning, Entity.collide step resolution and noCollision. Native independently constructs both scene sizes and all 16 gallery states/positions; compares exact movement bits and occupancy before/after against both pinned JARs. Includes partial blocks, pyramid ledges, negative/unloaded chunk boundaries, initial overlaps, vertical/horizontal/diagonal/tiny/zero movement and step heights. Position collision contexts, absent other entities/block entities and no border are explicit scene conditions. This validates the collision adapter, not player travel, gravity, tick scheduling, fluid/entity gameplay, rendering pixels or a complete playable game." +} diff --git a/benchmarks/rust-native-scene-collision-2026-10-07/startup-smoke.json b/benchmarks/rust-native-scene-collision-2026-10-07/startup-smoke.json new file mode 100644 index 000000000..ff9d59fbc --- /dev/null +++ b/benchmarks/rust-native-scene-collision-2026-10-07/startup-smoke.json @@ -0,0 +1,776 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 1, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "culled_model_faces": 59636, + "elapsed_seconds": 0.711288782, + "error": null, + "merged_quads": 3169, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "os": "linux", + "presented_frames": 30, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native cube and cuboid-model renderer with binary cutouts, stepped sprite animation and optional camera collisions; no gameplay simulation", + "sprite_layers": 18, + "visible_model_faces": 5991, + "window_size": [ + 1280, + 720 + ], + "native_scene_culling": { + "blocks": 10919, + "culled_faces": 59636, + "visible_faces": 5991 + }, + "native_selection": { + "matched_placements": 16, + "selected_parts": 20, + "client_jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a2ff1c890d6f3a5292c3a9402f02ca5404a993dc117853b25cbe64ac92b76d30", + "scope": "Actual native registry states, blockstate dispatch, tagged root baking and legacy collection using state.getSeed(position). All 16 featured placements match model names/transforms. An independently constructed native scene also matches total occupied blocks and visible/culled model faces using native parent resolution, rotated culling directions and Block.shouldRenderFace. No shader/pixel parity claim." + }, + "resource_files": { + "files": 5583, + "sha256": "e09fcdecee0246a04bf5abe35c57b4b15b3e84260a9eb51e52911c125aaaba2c" + }, + "executable_sha256": "e924949d00ac5164ba986ed91872b5474f2675150d6063f37aee9def91ee0aa7", + "resource_manifest_sha256": "f1b4ad065068d9f4fc3095c0a669fb5b57eafe7d07a0a8e3155c325136681bd3", + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "3b838065aef8d4af24df95e6d0ad1a96ffd29ab36698cae5c8003f8e5524dc0f", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "219896d942b84b4f60035e2fffb9d0590eeb7dbd79bf63e28aa40e0327accb20", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/lib.rs": "f98a1619883dc5654d50edb4fbd9211d69f3d6e7bd945799136d09e7e4510dab", + "crates/horizon-client/src/main.rs": "92fb3347a98b583e3a5f42e501aff4c35a0f7bc7bee5840b6054fdf7b7a3f1e6", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/render.rs": "db17511223d0b72cf13bbb1bd7cbfca119d249f1d8914e7c1c06a710494c5123", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "17bd7127283c5ea27166e0e8079e8c284c6cff426a2fa8994879e48151e1ded4", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "9f7299079bd9b1e2d54899e031f8a389ce44b7322c71890609e23597f35fb217", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + } +} diff --git a/benchmarks/rust-native-scene-motion-2026-10-07/collision-regression.json b/benchmarks/rust-native-scene-motion-2026-10-07/collision-regression.json new file mode 100644 index 000000000..8aaf74a88 --- /dev/null +++ b/benchmarks/rust-native-scene-motion-2026-10-07/collision-regression.json @@ -0,0 +1,369 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "sources_sha256": { + "tools/test_native_scene_collision.py": "c51e998fd97ebae46918efc77bdf57f961481f8881312a9002c65bf637a1a2bb", + "tools/test_native_client.py": "5e8f5b24763d39e48ffabfe8a661c933b16cc41ff9b34dbede10dc921bb78716", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "524e4904d4f90f7f31895d228762e3e4f20dc97f8401c79cf99c33d7b497e84b", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java": "85570f2f5a98bc508f887bd61d3266cda1f6f8ba06d304241aa2128a4650f66d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/examples/scene_collision_probe.rs": "36ce97bea4d70c0238c9f63234239ba7de5c8645c67773a0f96d320af6f9a911", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "219896d942b84b4f60035e2fffb9d0590eeb7dbd79bf63e28aa40e0327accb20", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/lib.rs": "8efef76b8ed60a06af0f79a701e8a469f0b384756be19040b1f65490cd5614b3", + "crates/horizon-client/src/main.rs": "92fb3347a98b583e3a5f42e501aff4c35a0f7bc7bee5840b6054fdf7b7a3f1e6", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "3c3d2fc81be849da91e168ad6af8f26f604873403ad10b1a594d00da1de9d65e", + "crates/horizon-client/src/render.rs": "db17511223d0b72cf13bbb1bd7cbfca119d249f1d8914e7c1c06a710494c5123", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "17bd7127283c5ea27166e0e8079e8c284c6cff426a2fa8994879e48151e1ded4" + }, + "resources": { + "files": 5585, + "sha256": "f4a62ce38414761ec928babb2bad6ec73e13031c27393227dfd61f67cadabdbc" + }, + "cases": [ + { + "radius": 1, + "fixtures": 7075, + "input_sha256": "241be6e99567bb11506c246790bf7f1d504abe410156ef455433d5161a626787", + "scene_sha256": "1c8f3f9c11bb5c6d8d0bfbd7d84852f5ebdf2f42d1e80d74c4fb082a31696c66", + "rust_output_sha256": "9f6e65451573f29c56b7e5d9f3f45d6f4a02fcf7b6e1939f3da88638d36fd182", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "matched_output_lines": 7075, + "output_sha256": "9f6e65451573f29c56b7e5d9f3f45d6f4a02fcf7b6e1939f3da88638d36fd182" + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "matched_output_lines": 7075, + "output_sha256": "9f6e65451573f29c56b7e5d9f3f45d6f4a02fcf7b6e1939f3da88638d36fd182" + } + ] + }, + { + "radius": 2, + "fixtures": 7075, + "input_sha256": "4367b18176dd4376b874a89f9d3b492f715f9b34eb14012f5deeb5e0aebdf34a", + "scene_sha256": "dc6f0c3ed5941948137ffad1141942f1d4a72d86cd1b4ae84eb34c676107fab6", + "rust_output_sha256": "d75a0493fdfbcc2e9bb24e62254ed2349e2e71e9ea80148ee9e84ec8181ee92d", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "matched_output_lines": 7075, + "output_sha256": "d75a0493fdfbcc2e9bb24e62254ed2349e2e71e9ea80148ee9e84ec8181ee92d" + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "matched_output_lines": 7075, + "output_sha256": "d75a0493fdfbcc2e9bb24e62254ed2349e2e71e9ea80148ee9e84ec8181ee92d" + } + ] + } + ], + "scope": "Actual client Assets loader and TestWorld resident chunks feed registered collision shapes, block scanning, Entity.collide step resolution and noCollision. Native independently constructs both scene sizes and all 16 gallery states/positions; compares exact movement bits and occupancy before/after against both pinned JARs. Includes partial blocks, pyramid ledges, negative/unloaded chunk boundaries, initial overlaps, vertical/horizontal/diagonal/tiny/zero movement and step heights. Position collision contexts, absent other entities/block entities and no border are explicit scene conditions. This validates the collision adapter, not player travel, gravity, tick scheduling, fluid/entity gameplay, rendering pixels or a complete playable game." +} diff --git a/benchmarks/rust-native-scene-motion-2026-10-07/scoped-parity.json b/benchmarks/rust-native-scene-motion-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..14ca5cc7b --- /dev/null +++ b/benchmarks/rust-native-scene-motion-2026-10-07/scoped-parity.json @@ -0,0 +1,345 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "fixtures": 637, + "operations": 42257, + "sources_sha256": { + "tools/test_native_scene_motion.py": "e56cdf54b23bb97cd0bb2cc6167c838df8edf2c8a6e78b0700a27e9b6d66fe53", + "tools/test_native_client.py": "5e8f5b24763d39e48ffabfe8a661c933b16cc41ff9b34dbede10dc921bb78716", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "524e4904d4f90f7f31895d228762e3e4f20dc97f8401c79cf99c33d7b497e84b", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneMotionOracle.java": "d7dee5d31dd5700cac76f0288e3ec5c7016196956962dd0cb1db50ae0e9c607b", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java": "85570f2f5a98bc508f887bd61d3266cda1f6f8ba06d304241aa2128a4650f66d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/examples/scene_motion_probe.rs": "d408f1436b17a43a26ff5536f2a6901ad57ac69c246174b1c93e78924f5e191d", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "219896d942b84b4f60035e2fffb9d0590eeb7dbd79bf63e28aa40e0327accb20", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/lib.rs": "8efef76b8ed60a06af0f79a701e8a469f0b384756be19040b1f65490cd5614b3", + "crates/horizon-client/src/main.rs": "92fb3347a98b583e3a5f42e501aff4c35a0f7bc7bee5840b6054fdf7b7a3f1e6", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "3c3d2fc81be849da91e168ad6af8f26f604873403ad10b1a594d00da1de9d65e", + "crates/horizon-client/src/render.rs": "db17511223d0b72cf13bbb1bd7cbfca119d249f1d8914e7c1c06a710494c5123", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "17bd7127283c5ea27166e0e8079e8c284c6cff426a2fa8994879e48151e1ded4" + }, + "resources": { + "files": 5585, + "sha256": "f4a62ce38414761ec928babb2bad6ec73e13031c27393227dfd61f67cadabdbc" + }, + "input_sha256": "ad4f05878965815a0d6735665d080b37266c554cf9b4e4e41a277c94e2b32eee", + "rust_output_sha256": "82b2ee0e02736c0cf1d02a34b3c4cae69d8fbe70937b1121b5225ba731707245", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "82b2ee0e02736c0cf1d02a34b3c4cae69d8fbe70937b1121b5225ba731707245", + "matched_output_lines": 42894 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "82b2ee0e02736c0cf1d02a34b3c4cae69d8fbe70937b1121b5225ba731707245", + "matched_output_lines": 42894 + } + ], + "scope": "Stored PlayerMotion binds actual resident client chunks and registered attributes/coefficients to air travel, jumping, Entity.move, step resolution, ground/support updates, restitution and speed factors. Repeated native Player.travel/jump/move sequences compare position, velocity, bounds, collision/ground flags, support, climb state, fall-reset field and sync flag by exact bits. Natural scene, no fluids/vehicles/effects, fixed standing dimensions, no crouching. Landing/damage, audiovisual emission and network consumers are explicitly controlled boundaries, recorded for future integration; no full player tick, input controller, inside-block effects, health/damage or full gameplay parity claim." +} diff --git a/benchmarks/rust-native-scene-motion-2026-10-07/startup-smoke.json b/benchmarks/rust-native-scene-motion-2026-10-07/startup-smoke.json new file mode 100644 index 000000000..84ce0445b --- /dev/null +++ b/benchmarks/rust-native-scene-motion-2026-10-07/startup-smoke.json @@ -0,0 +1,777 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 1, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "culled_model_faces": 59636, + "elapsed_seconds": 0.626378893, + "error": null, + "merged_quads": 3169, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "os": "linux", + "presented_frames": 30, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native cube and cuboid-model renderer with binary cutouts, stepped sprite animation and optional camera collisions; no gameplay simulation", + "sprite_layers": 18, + "visible_model_faces": 5991, + "window_size": [ + 1280, + 720 + ], + "native_scene_culling": { + "blocks": 10919, + "culled_faces": 59636, + "visible_faces": 5991 + }, + "native_selection": { + "matched_placements": 16, + "selected_parts": 20, + "client_jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a2ff1c890d6f3a5292c3a9402f02ca5404a993dc117853b25cbe64ac92b76d30", + "scope": "Actual native registry states, blockstate dispatch, tagged root baking and legacy collection using state.getSeed(position). All 16 featured placements match model names/transforms. An independently constructed native scene also matches total occupied blocks and visible/culled model faces using native parent resolution, rotated culling directions and Block.shouldRenderFace. No shader/pixel parity claim." + }, + "resource_files": { + "files": 5585, + "sha256": "f4a62ce38414761ec928babb2bad6ec73e13031c27393227dfd61f67cadabdbc" + }, + "executable_sha256": "f0d10690861ad82d0990dfa86a9fdaa25823bdd700e33687f9a089dfa9e1c8ff", + "resource_manifest_sha256": "dd3355aba962d224aa6c6e548260bc77015987fb8156b5680ab2c0c845942a93", + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "5e8f5b24763d39e48ffabfe8a661c933b16cc41ff9b34dbede10dc921bb78716", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "219896d942b84b4f60035e2fffb9d0590eeb7dbd79bf63e28aa40e0327accb20", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/lib.rs": "8efef76b8ed60a06af0f79a701e8a469f0b384756be19040b1f65490cd5614b3", + "crates/horizon-client/src/main.rs": "92fb3347a98b583e3a5f42e501aff4c35a0f7bc7bee5840b6054fdf7b7a3f1e6", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "3c3d2fc81be849da91e168ad6af8f26f604873403ad10b1a594d00da1de9d65e", + "crates/horizon-client/src/render.rs": "db17511223d0b72cf13bbb1bd7cbfca119d249f1d8914e7c1c06a710494c5123", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "17bd7127283c5ea27166e0e8079e8c284c6cff426a2fa8994879e48151e1ded4", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "524e4904d4f90f7f31895d228762e3e4f20dc97f8401c79cf99c33d7b497e84b", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + } +} diff --git a/benchmarks/rust-native-sprint-2026-10-07/double-tap-smoke.json b/benchmarks/rust-native-sprint-2026-10-07/double-tap-smoke.json new file mode 100644 index 000000000..fe2fe58d2 --- /dev/null +++ b/benchmarks/rust-native-sprint-2026-10-07/double-tap-smoke.json @@ -0,0 +1,821 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 163, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 14.62424370903317, + 5.620000004768372, + 14.62424370903317 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "culled_model_faces": 59636, + "elapsed_seconds": 65.464581305, + "error": null, + "fall_damage_requests": 1, + "last_requested_fall_damage": 9.0, + "merged_quads": 3169, + "mesh_revision": 0, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "movement_ticks": 111, + "os": "linux", + "player_absorption": 0.0, + "player_dead": false, + "player_exhaustion": 0.3730001449584961, + "player_fall_distance": 0.0, + "player_food": 20, + "player_food_timer": 12, + "player_health": 14.166666984558105, + "player_hurt_cooldown": 0, + "player_on_ground": true, + "player_position": [ + 14.62424370903317, + 4.0, + 14.62424370903317 + ], + "player_saturation": 0.0, + "player_sprint_trigger": 0, + "player_sprinting": false, + "player_velocity": [ + 0.0, + -0.0784000015258789, + 0.0 + ], + "presented_frames": 3835, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native resident-scene renderer with inspection camera and optional fixed-rate dry walking test; full gameplay remains unfinished", + "sprint_distance_cm": 1373, + "sprint_ticks": 50, + "sprite_layers": 18, + "visible_model_faces": 5991, + "walk_distance_cm": 90, + "walking": true, + "window_size": [ + 1280, + 720 + ], + "world_revision": 0, + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "b9d0ecc5ec60a09d75ab9fe778e0a2e5bbb36fd8364a7ce996405f3dc9cb3b9f", + "crates/horizon-client/src/lib.rs": "d34c467ee87b869c6645052f286305e218c80ba258603317e9d951f1b4c5345d", + "crates/horizon-client/src/main.rs": "14a459150f8dcc0a9bda2d91138e7e232d1e33e7b5f15fa17af8228653cbca2a", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "1949f35da0e65ee71c52f53a2faf22601fbbb43387fbd411d6c9281b2221bc42", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprint.rs": "6f5ba5ea8e9a19872b26c1d7b5073e29549f2d820a0fe46e5450c9e7446e98b2", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "e25b3543c07f31c2a9d23d811792de9a33290263c7c7445549a0682f6935d8a5", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_statistics.rs": "fe28061e29c41f8f399d29cce8c468a63854613702b5aa525c0f0fd98cb87f9a", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "executable_sha256": "632eb61d13b3274d5c991f2f2daffd56891abf472b99085cf04f9237b5f21f28", + "resource_files": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "resource_manifest_sha256": "92a51de578be0e7c37d21e94caa3f22503f7d88b73827a5fce109b1b889e5d18", + "verification": { + "physical_controls": [ + "F5 walking", + "F3 diagnostics", + "W held 100 ms, released 100 ms, held 2500 ms", + "Release W", + "Ctrl+Q exit" + ], + "observations": [ + "Window title captured Sprint true during the second W press", + "Window title showed Sprint false after releasing W", + "Ground view visually inspected" + ], + "screenshots_private_sha256": { + "sprint-double-tap-running.png": "184a3e670b8d4f2da9fae7987d6470717b76df51dbe44d55da756d0e5aa3064f" + }, + "limits": "Linux resident-scene smoke check; walking pauses without focus. Native differential checks cover input decisions, movement attributes and hunger. Full pose/fluid/effect/item-use/client-server lifecycle, native pixel parity, platform release acceptance and hardware FPS claims remain outside this smoke check." + } +} diff --git a/benchmarks/rust-native-sprint-2026-10-07/scene-motion.json b/benchmarks/rust-native-sprint-2026-10-07/scene-motion.json new file mode 100644 index 000000000..2e0fb7a5e --- /dev/null +++ b/benchmarks/rust-native-sprint-2026-10-07/scene-motion.json @@ -0,0 +1,355 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "fixtures": 5510, + "operations": 215204, + "sources_sha256": { + "tools/test_native_scene_motion.py": "9464bf83e89098ee5bf3dd639f682b6c3a03d90b3c5793cc860e27bec24cd09f", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneMotionOracle.java": "80f597f8530f372dd3e18c8fb1dba936c1e21577838462c46fbb1fbff5ffcd25", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java": "85570f2f5a98bc508f887bd61d3266cda1f6f8ba06d304241aa2128a4650f66d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockLandingOracle.java": "e397acdbaf2702f358c90ba53a804afa26d7f29a278884c0e779b18f1ae40e63", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementRegistryOracle.java": "49fcc1f4348a8e279dcb916ae149de8c97f15df54ff1a675826b7c6c3dda06d9", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageSourceOracle.java": "0cf0126d69d1052dea74a6bfb5a97250ab69d8f7a95360d9c6399fe03376dcd2", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/examples/scene_motion_probe.rs": "27f51ab7274a5bcdcc2593690f5da29f00bca1c8445461555d57a930d98fe5a2", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "e25b3543c07f31c2a9d23d811792de9a33290263c7c7445549a0682f6935d8a5", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_statistics.rs": "fe28061e29c41f8f399d29cce8c468a63854613702b5aa525c0f0fd98cb87f9a", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "b9d0ecc5ec60a09d75ab9fe778e0a2e5bbb36fd8364a7ce996405f3dc9cb3b9f", + "crates/horizon-client/src/lib.rs": "d34c467ee87b869c6645052f286305e218c80ba258603317e9d951f1b4c5345d", + "crates/horizon-client/src/main.rs": "14a459150f8dcc0a9bda2d91138e7e232d1e33e7b5f15fa17af8228653cbca2a", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "1949f35da0e65ee71c52f53a2faf22601fbbb43387fbd411d6c9281b2221bc42", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprint.rs": "6f5ba5ea8e9a19872b26c1d7b5073e29549f2d820a0fe46e5450c9e7446e98b2", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5" + }, + "resources": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "input_sha256": "2445727962a0a0b9636203a81235f7d086ced8dfb86017a0af0e53ac102efaae", + "rust_output_sha256": "61b67c3dc05aa0c595a4ca03e50dea66ac33e0e43e359c0c45b6b5403ee29817", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "61b67c3dc05aa0c595a4ca03e50dea66ac33e0e43e359c0c45b6b5403ee29817", + "matched_output_lines": 1296734 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "61b67c3dc05aa0c595a4ca03e50dea66ac33e0e43e359c0c45b6b5403ee29817", + "matched_output_lines": 1296734 + } + ], + "scope": "Stored PlayerMotion binds resident client chunks and registered attributes/coefficients to air travel, jumping, Entity.move, step resolution, ground/support updates, restitution and speed factors. Repeated native Player.travel/jump/move and actual Player.aiStep / direct LivingEntity.aiStep compare position, velocity, bounds, collision/ground flags, support, climb state, fall-reset field, both sync flags, speed, head yaw, jump trigger and jump delay by exact bits. Prepared-local-input Player.aiStep paths verify the stored speed refresh after movement, with empty inventory and no nearby entities. Travel uses the actual Player.getSpeed movement-attribute query, independently of that stored base-living speed field; both getter and setter execute native bodies. Dry aiStep includes small-velocity cleanup, input damping, held/released jump timing and server frost-modifier removal. Snapshots also compare all allocated attribute instances, base/cache/dirty state, modifier values/operations/permanence and pending update/sync membership (not JVM identity-dependent iteration order). Dry resident scene, fixed standing dimensions, zero frozen ticks, empty equipment, no interpolation, fluids, vehicles, effects, crouching or other entities. Actual LivingEntity.checkFallDamage, registered Block.fallOn/bounceOn and Player/LivingEntity.causeFallDamage are composed, including float-narrowed fall-distance accumulation, reset, last-climb clearing, safe-fall and damage-multiplier attributes, impulse exemptions and ordered landing particle/sound/statistic/hit-ground/damage requests. Farmland pushes the stored player and replaces actual chunk state; repeated turtle-egg changes preserve hatch. Block state at the landing fixture is compared after every operation. World RNG is a seeded native legacy stream. Actual ServerPlayer/Player/LivingEntity hurt dispatch now updates native synchronized health and player absorption, modified armor/toughness reduction, exhaustion, damage cooldown/last-source state and velocity synchronization. Native health storage and dirty flags are compared after every operation. Damage sources use actual decoded/tagged pinned damage registries. ServerPlayer jump statistics and exhaustion are included; dead-or-dying state disables movement input and jumping. Empty equipment/hands/effects, configurable difficulty and natural regeneration, damage gamerules enabled, loaded client and no spawn-extra fall particles define this scene domain. Ordered health/statistic/combat-record/broadcast/sound/criterion/death requests are compared; criterion argument payloads retain the separate combat gate. Actual health changes are applied, but audiovisual playback, persistent statistics, combat tracker internals, full death/drop/respawn services, block neighbor/drop/block-entity callbacks, movement emission, block-inside and networking remain controlled consumers. Actual FoodData.tick and ServerPlayer.tickRegeneration now share the same stored health, attributes, exhaustion and registered starvation damage. Snapshots compare food level, saturation, exhaustion, timer and tick count. Cases cover all four difficulties, regeneration rule changes, absorption during starvation, Peaceful recovery, timer overflow and nonfinite food values. Simulation operations compose clock setup, actual player movement and actual food ticking in their native order, including fall damage followed by regeneration in the same tick. Explicit clock operations establish cooldown/hurt-time/game-time/tick-count state; full enclosing native tick/doTick methods are not invoked by those setup operations. Input preparation has its own client comparison. ServerPlayer.checkMovementStatistics executes on accepted resident deltas after movement and before food ticking. Additional direct method fixtures cover all 512 overlapping passenger/swim/eye-water/water/climb/ground/sprint/crouch/glide flag combinations, invulnerable abilities, centimeter rounding, overflow, signed zero and nonfinite deltas. Those query contexts apply only to the statistics method; fluid/vehicle/crouch/glide physics remain unbound. ServerGamePacketListener packet acceptance/rejection and scheduling are not executed. No full Player.tick, consumable item-use lifecycle, local input lifecycle, nonempty inventory/equipment ticks, full freezing, complete death lifecycle or full gameplay parity claim." +} diff --git a/benchmarks/rust-native-sprint-2026-10-07/sprint-input.json b/benchmarks/rust-native-sprint-2026-10-07/sprint-input.json new file mode 100644 index 000000000..22cf6e0ab --- /dev/null +++ b/benchmarks/rust-native-sprint-2026-10-07/sprint-input.json @@ -0,0 +1,29 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "fixtures": 146648, + "operations": 502112, + "sources_sha256": { + "tools/test_sprint_input_parity.py": "4668708147083aebf665f0b4a511d44fb2f0473e5a6c098ad0697a3e356bf8a1", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSprintInputOracle.java": "e04d70acf97786e28973a1b372e0e40aef498407186ce517bad38bfce5ba86d5", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/sprint.rs": "6f5ba5ea8e9a19872b26c1d7b5073e29549f2d820a0fe46e5450c9e7446e98b2", + "crates/horizon-client/src/lib.rs": "d34c467ee87b869c6645052f286305e218c80ba258603317e9d951f1b4c5345d", + "crates/horizon-client/examples/sprint_probe.rs": "1c18066b6ae33ce77d8ee6f2bed0a1fdd2fcdc8bdce0d70e5cb0917d6b4d600a" + }, + "input_sha256": "764b7990c7b7cfcc478a2de72a04c8798c1552d5742655899ef650864ef10922", + "client_jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "matched_output_lines": 648760, + "output_sha256": "06d9079101d5d77b0278f0141fa4edb0df66f4c39a92feba98aca49953b986db", + "scope": "Actual KeyboardInput.tick and LocalPlayer.aiStep prefix through sprint start/stop requests and sprintTriggerTime. A sentinel in jumpableVehicle stops before riding and parent/world movement. Native private canStartSprinting, isSprintingPossible and shouldStopRun/SwimSprinting execute, with controlled environmental/effect/vehicle/UI queries, actual FoodData/Abilities and actual ItemStack USE_EFFECTS. Compares evolving sprint state, timer, keyboard vector/shift and every ordered setSprinting request, including duplicate requests. All 17 query-flag combinations, all keyboard combinations with previous states, signed timer boundaries, food thresholds, configurable windows0..10, double taps and random sequences. Setter records requests; the separate scene gate covers actual attribute changes and movement. Parent movement, complete LocalPlayer ticks, GUI options persistence, networking and full gameplay parity remain unfinished." +} diff --git a/benchmarks/rust-native-sprint-2026-10-07/sprint-key-smoke.json b/benchmarks/rust-native-sprint-2026-10-07/sprint-key-smoke.json new file mode 100644 index 000000000..240093d03 --- /dev/null +++ b/benchmarks/rust-native-sprint-2026-10-07/sprint-key-smoke.json @@ -0,0 +1,821 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 245, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 3.590114801377234, + 5.620000004768372, + 11.300000011920929 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "culled_model_faces": 59636, + "elapsed_seconds": 98.100381586, + "error": null, + "fall_damage_requests": 1, + "last_requested_fall_damage": 9.0, + "merged_quads": 3169, + "mesh_revision": 0, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "movement_ticks": 173, + "os": "linux", + "player_absorption": 0.0, + "player_dead": false, + "player_exhaustion": 0.9480018615722656, + "player_fall_distance": 0.0, + "player_food": 20, + "player_food_timer": 74, + "player_health": 14.166666984558105, + "player_hurt_cooldown": 0, + "player_on_ground": true, + "player_position": [ + 3.590114801377234, + 4.0, + 11.300000011920929 + ], + "player_saturation": 0.0, + "player_sprint_trigger": 0, + "player_sprinting": false, + "player_velocity": [ + 0.0, + -0.0784000015258789, + 0.0 + ], + "presented_frames": 5773, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native resident-scene renderer with inspection camera and optional fixed-rate dry walking test; full gameplay remains unfinished", + "sprint_distance_cm": 1948, + "sprint_ticks": 71, + "sprite_layers": 18, + "visible_model_faces": 5991, + "walk_distance_cm": 744, + "walking": true, + "window_size": [ + 1280, + 720 + ], + "world_revision": 0, + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "b9d0ecc5ec60a09d75ab9fe778e0a2e5bbb36fd8364a7ce996405f3dc9cb3b9f", + "crates/horizon-client/src/lib.rs": "d34c467ee87b869c6645052f286305e218c80ba258603317e9d951f1b4c5345d", + "crates/horizon-client/src/main.rs": "14a459150f8dcc0a9bda2d91138e7e232d1e33e7b5f15fa17af8228653cbca2a", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "1949f35da0e65ee71c52f53a2faf22601fbbb43387fbd411d6c9281b2221bc42", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprint.rs": "6f5ba5ea8e9a19872b26c1d7b5073e29549f2d820a0fe46e5450c9e7446e98b2", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "e25b3543c07f31c2a9d23d811792de9a33290263c7c7445549a0682f6935d8a5", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_statistics.rs": "fe28061e29c41f8f399d29cce8c468a63854613702b5aa525c0f0fd98cb87f9a", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "executable_sha256": "632eb61d13b3274d5c991f2f2daffd56891abf472b99085cf04f9237b5f21f28", + "resource_files": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "resource_manifest_sha256": "92a51de578be0e7c37d21e94caa3f22503f7d88b73827a5fce109b1b889e5d18", + "verification": { + "physical_controls": [ + "F5 walking", + "F3 diagnostics", + "Left Ctrl+W held 5 seconds", + "Release Ctrl, hold W another second", + "Release W", + "Ctrl+Q exit" + ], + "observations": [ + "Sprinting contributed 1948 centimeters and 71 simulation ticks", + "Player reached the gallery structure; the inspected ground view and F3 showed Sprint false after stopping" + ], + "screenshots_private_sha256": { + "sprint-running.png": "7f4c5172002b62ce2ba9415aed9f44d92db85d669ab74b24dedf7ba9e9707db7" + }, + "limits": "Linux resident-scene smoke check; walking pauses without focus. Native differential checks cover input decisions, movement attributes and hunger. Full pose/fluid/effect/item-use/client-server lifecycle, native pixel parity, platform release acceptance and hardware FPS claims remain outside this smoke check." + } +} diff --git a/benchmarks/rust-native-sprint-2026-10-07/sprint-scene.json b/benchmarks/rust-native-sprint-2026-10-07/sprint-scene.json new file mode 100644 index 000000000..f56b583de --- /dev/null +++ b/benchmarks/rust-native-sprint-2026-10-07/sprint-scene.json @@ -0,0 +1,351 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "fixtures": 419, + "operations": 13387, + "sources_sha256": { + "tools/test_native_scene_motion.py": "9464bf83e89098ee5bf3dd639f682b6c3a03d90b3c5793cc860e27bec24cd09f", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneMotionOracle.java": "80f597f8530f372dd3e18c8fb1dba936c1e21577838462c46fbb1fbff5ffcd25", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java": "85570f2f5a98bc508f887bd61d3266cda1f6f8ba06d304241aa2128a4650f66d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockLandingOracle.java": "e397acdbaf2702f358c90ba53a804afa26d7f29a278884c0e779b18f1ae40e63", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementRegistryOracle.java": "49fcc1f4348a8e279dcb916ae149de8c97f15df54ff1a675826b7c6c3dda06d9", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageSourceOracle.java": "0cf0126d69d1052dea74a6bfb5a97250ab69d8f7a95360d9c6399fe03376dcd2", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSprintInputOracle.java": "e04d70acf97786e28973a1b372e0e40aef498407186ce517bad38bfce5ba86d5", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/examples/scene_motion_probe.rs": "27f51ab7274a5bcdcc2593690f5da29f00bca1c8445461555d57a930d98fe5a2", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "e25b3543c07f31c2a9d23d811792de9a33290263c7c7445549a0682f6935d8a5", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_statistics.rs": "fe28061e29c41f8f399d29cce8c468a63854613702b5aa525c0f0fd98cb87f9a", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "b9d0ecc5ec60a09d75ab9fe778e0a2e5bbb36fd8364a7ce996405f3dc9cb3b9f", + "crates/horizon-client/src/lib.rs": "d34c467ee87b869c6645052f286305e218c80ba258603317e9d951f1b4c5345d", + "crates/horizon-client/src/main.rs": "14a459150f8dcc0a9bda2d91138e7e232d1e33e7b5f15fa17af8228653cbca2a", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "1949f35da0e65ee71c52f53a2faf22601fbbb43387fbd411d6c9281b2221bc42", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprint.rs": "6f5ba5ea8e9a19872b26c1d7b5073e29549f2d820a0fe46e5450c9e7446e98b2", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7" + }, + "resources": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "input_sha256": "cab8b10e5c5e613abeff9c5646e3aa2f292b6b4d101a5e1e83393aa219ffea97", + "rust_output_sha256": "67baa97dc99b8993ce33b57bebb2fd9cba21f352606993bc26bdd2d859911869", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "67baa97dc99b8993ce33b57bebb2fd9cba21f352606993bc26bdd2d859911869", + "matched_output_lines": 80741 + } + ], + "scope": "Client sprint scene executes the real LocalPlayer.aiStep prefix through sprint decisions, stopping at the riding/parent movement boundary, followed by real LocalPlayer.modifyInput and the native server actor simulation. Sprint setters dispatch to that server actor, sharing its actual FoodData and collision conditions. Compares local sprint timer/input history and actual attribute changes, movement, distance exhaustion and hunger. No effects, equipment, vehicles, fluids or pose transitions; raw shift input is recorded but crouching is unbound. Full client/server tick and networking remain unfinished. Stored PlayerMotion binds resident client chunks and registered attributes/coefficients to air travel, jumping, Entity.move, step resolution, ground/support updates, restitution and speed factors. Repeated native Player.travel/jump/move and actual Player.aiStep / direct LivingEntity.aiStep compare position, velocity, bounds, collision/ground flags, support, climb state, fall-reset field, both sync flags, speed, head yaw, jump trigger and jump delay by exact bits. Prepared-local-input Player.aiStep paths verify the stored speed refresh after movement, with empty inventory and no nearby entities. Travel uses the actual Player.getSpeed movement-attribute query, independently of that stored base-living speed field; both getter and setter execute native bodies. Dry aiStep includes small-velocity cleanup, input damping, held/released jump timing and server frost-modifier removal. Snapshots also compare all allocated attribute instances, base/cache/dirty state, modifier values/operations/permanence and pending update/sync membership (not JVM identity-dependent iteration order). Dry resident scene, fixed standing dimensions, zero frozen ticks, empty equipment, no interpolation, fluids, vehicles, effects, crouching or other entities. Actual LivingEntity.checkFallDamage, registered Block.fallOn/bounceOn and Player/LivingEntity.causeFallDamage are composed, including float-narrowed fall-distance accumulation, reset, last-climb clearing, safe-fall and damage-multiplier attributes, impulse exemptions and ordered landing particle/sound/statistic/hit-ground/damage requests. Farmland pushes the stored player and replaces actual chunk state; repeated turtle-egg changes preserve hatch. Block state at the landing fixture is compared after every operation. World RNG is a seeded native legacy stream. Actual ServerPlayer/Player/LivingEntity hurt dispatch now updates native synchronized health and player absorption, modified armor/toughness reduction, exhaustion, damage cooldown/last-source state and velocity synchronization. Native health storage and dirty flags are compared after every operation. Damage sources use actual decoded/tagged pinned damage registries. ServerPlayer jump statistics and exhaustion are included; dead-or-dying state disables movement input and jumping. Empty equipment/hands/effects, configurable difficulty and natural regeneration, damage gamerules enabled, loaded client and no spawn-extra fall particles define this scene domain. Ordered health/statistic/combat-record/broadcast/sound/criterion/death requests are compared; criterion argument payloads retain the separate combat gate. Actual health changes are applied, but audiovisual playback, persistent statistics, combat tracker internals, full death/drop/respawn services, block neighbor/drop/block-entity callbacks, movement emission, block-inside and networking remain controlled consumers. Actual FoodData.tick and ServerPlayer.tickRegeneration now share the same stored health, attributes, exhaustion and registered starvation damage. Snapshots compare food level, saturation, exhaustion, timer and tick count. Cases cover all four difficulties, regeneration rule changes, absorption during starvation, Peaceful recovery, timer overflow and nonfinite food values. Simulation operations compose clock setup, actual player movement and actual food ticking in their native order, including fall damage followed by regeneration in the same tick. Explicit clock operations establish cooldown/hurt-time/game-time/tick-count state; full enclosing native tick/doTick methods are not invoked by those setup operations. Input preparation has its own client comparison. ServerPlayer.checkMovementStatistics executes on accepted resident deltas after movement and before food ticking. Additional direct method fixtures cover all 512 overlapping passenger/swim/eye-water/water/climb/ground/sprint/crouch/glide flag combinations, invulnerable abilities, centimeter rounding, overflow, signed zero and nonfinite deltas. Those query contexts apply only to the statistics method; fluid/vehicle/crouch/glide physics remain unbound. ServerGamePacketListener packet acceptance/rejection and scheduling are not executed. No full Player.tick, consumable item-use lifecycle, local input lifecycle, nonempty inventory/equipment ticks, full freezing, complete death lifecycle or full gameplay parity claim." +} diff --git a/benchmarks/rust-native-sprint-2026-10-07/startup-smoke.json b/benchmarks/rust-native-sprint-2026-10-07/startup-smoke.json new file mode 100644 index 000000000..9196869d6 --- /dev/null +++ b/benchmarks/rust-native-sprint-2026-10-07/startup-smoke.json @@ -0,0 +1,807 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 1, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "culled_model_faces": 59636, + "elapsed_seconds": 0.545908777, + "error": null, + "fall_damage_requests": 0, + "last_requested_fall_damage": null, + "merged_quads": 3169, + "mesh_revision": 0, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "movement_ticks": 0, + "os": "linux", + "player_absorption": null, + "player_dead": null, + "player_exhaustion": null, + "player_fall_distance": null, + "player_food": null, + "player_food_timer": null, + "player_health": null, + "player_hurt_cooldown": null, + "player_on_ground": null, + "player_position": null, + "player_saturation": null, + "player_sprint_trigger": null, + "player_sprinting": null, + "player_velocity": null, + "presented_frames": 30, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native resident-scene renderer with inspection camera and optional fixed-rate dry walking test; full gameplay remains unfinished", + "sprint_distance_cm": 0, + "sprint_ticks": 0, + "sprite_layers": 18, + "visible_model_faces": 5991, + "walk_distance_cm": 0, + "walking": false, + "window_size": [ + 1280, + 720 + ], + "world_revision": 0, + "native_scene_culling": { + "blocks": 10919, + "culled_faces": 59636, + "visible_faces": 5991 + }, + "native_selection": { + "matched_placements": 16, + "selected_parts": 20, + "client_jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a2ff1c890d6f3a5292c3a9402f02ca5404a993dc117853b25cbe64ac92b76d30", + "scope": "Actual native registry states, blockstate dispatch, tagged root baking and legacy collection using state.getSeed(position). All 16 featured placements match model names/transforms. An independently constructed native scene also matches total occupied blocks and visible/culled model faces using native parent resolution, rotated culling directions and Block.shouldRenderFace. No shader/pixel parity claim." + }, + "resource_files": { + "files": 5590, + "sha256": "62f859d4d21b82158ab73e26cfa4973d58ab5926ab63d71c70c7a4d173502b7b" + }, + "executable_sha256": "632eb61d13b3274d5c991f2f2daffd56891abf472b99085cf04f9237b5f21f28", + "resource_manifest_sha256": "92a51de578be0e7c37d21e94caa3f22503f7d88b73827a5fce109b1b889e5d18", + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "6c615fed67fd7bcf09b3184216e08a82012049880a0d4da7c89f86553090cbda", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/health.rs": "b5e2d3cde4bd58d906e6f6d47cd756ed23aa6706c71b10c3aedde30c11806403", + "crates/horizon-client/src/hunger.rs": "01d8a35f570f2a0991ac17a078f2066a5a83037a728158585765723d208b4611", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/landing.rs": "b9d0ecc5ec60a09d75ab9fe778e0a2e5bbb36fd8364a7ce996405f3dc9cb3b9f", + "crates/horizon-client/src/lib.rs": "d34c467ee87b869c6645052f286305e218c80ba258603317e9d951f1b4c5345d", + "crates/horizon-client/src/main.rs": "14a459150f8dcc0a9bda2d91138e7e232d1e33e7b5f15fa17af8228653cbca2a", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "1949f35da0e65ee71c52f53a2faf22601fbbb43387fbd411d6c9281b2221bc42", + "crates/horizon-client/src/render.rs": "75cb40c257cf61e51009d292a06cd96532f59320b12ed7c3a509bbdbe1accdd4", + "crates/horizon-client/src/sprint.rs": "6f5ba5ea8e9a19872b26c1d7b5073e29549f2d820a0fe46e5450c9e7446e98b2", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "0333ecf3e18ccc63117295feb2cf77661462ba13feb293eeec667c12811423b5", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "159c12846058954a35ce86d415dc12fc89a6f11d46d21d1616ee686b7af4eee4", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "e25b3543c07f31c2a9d23d811792de9a33290263c7c7445549a0682f6935d8a5", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_statistics.rs": "fe28061e29c41f8f399d29cce8c468a63854613702b5aa525c0f0fd98cb87f9a", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "8155b315453c569db2fbe46228886c5881d1fd55eb095c5849e69bdb500ba2bd", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "0a94885c4b7a0d294ba7f4cee18b96ee59649b50112988250b53cc224059a979", + "crates/horizon-world/src/server_player_damage.rs": "29af22dec321fe01776cee5334f050c5bc3e27a688f99c8c3da4c0ad8bc8254e", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + } +} diff --git a/benchmarks/rust-native-walking-2026-10-07/interactive-smoke.json b/benchmarks/rust-native-walking-2026-10-07/interactive-smoke.json new file mode 100644 index 000000000..35fb818b9 --- /dev/null +++ b/benchmarks/rust-native-walking-2026-10-07/interactive-smoke.json @@ -0,0 +1,803 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 293, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 20.423593214612463, + 5.620000004768372, + 20.423593214612463 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "culled_model_faces": 59636, + "elapsed_seconds": 117.569687879, + "error": null, + "merged_quads": 3169, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "movement_ticks": 207, + "os": "linux", + "player_on_ground": true, + "player_position": [ + 20.423593214612463, + 4.0, + 20.423593214612463 + ], + "player_velocity": [ + 0.0, + -0.0784000015258789, + 0.0 + ], + "presented_frames": 6816, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native resident-scene renderer with inspection camera and optional fixed-rate dry walking test; full gameplay remains unfinished", + "sprite_layers": 18, + "visible_model_faces": 5991, + "walking": true, + "window_size": [ + 1280, + 720 + ], + "verification": { + "physical_controls": [ + "F5 enable walking", + "W held 1500 ms", + "Space held 700 ms", + "F5 inspection", + "F5 walking", + "Ctrl+Q exit" + ], + "observations": [ + "Landed at scene ground y=4", + "Horizontal position changed in the viewed direction", + "Jump screenshot visually inspected with raised viewpoint", + "Walking/inspection toggles logged", + "Exit report has no error and virtual screen has no remaining window" + ], + "screenshots_private_sha256": { + "walking-ground.png": "e2ed86fa9597ef9e5324213a616465909b160e2e1d71d351d70f891ed2638adb", + "walking-moved.png": "c6140f91f22374061311950d6a9ff937cf04aea5793e0c5e810f6995d75b382d", + "walking-jump.png": "c13bc059b9179d971a4a560fb1601023ae84d82c6f0d042c4aecf68336ab8edd" + }, + "limits": "Linux development-scene smoke check only. No full gameplay, native pixel parity, platform release acceptance or FPS comparison claim." + }, + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "5e8f5b24763d39e48ffabfe8a661c933b16cc41ff9b34dbede10dc921bb78716", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/lib.rs": "db973b1e051c8a92206582ba472449a6a5f1113fbff67825183f1bb18e0736a0", + "crates/horizon-client/src/main.rs": "bff1e825cdcbbf8997473eebf333a5b6c586904fa2285a03ca934ccf69cda155", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "26dbd630a53c7fe625cf94d130d68d2341e9dfea20ec7c33a1abb34f34bd73c5", + "crates/horizon-client/src/render.rs": "db17511223d0b72cf13bbb1bd7cbfca119d249f1d8914e7c1c06a710494c5123", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "17bd7127283c5ea27166e0e8079e8c284c6cff426a2fa8994879e48151e1ded4", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "524e4904d4f90f7f31895d228762e3e4f20dc97f8401c79cf99c33d7b497e84b", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "executable_sha256": "5ce1f82b0864675ee3bc073d0bb9d58883821e6c6f7aa9bacc795b2f28eb8f72", + "resource_files": { + "files": 5585, + "sha256": "f4a62ce38414761ec928babb2bad6ec73e13031c27393227dfd61f67cadabdbc" + }, + "resource_manifest_sha256": "dd3355aba962d224aa6c6e548260bc77015987fb8156b5680ab2c0c845942a93" +} diff --git a/benchmarks/rust-native-walking-2026-10-07/local-input.json b/benchmarks/rust-native-walking-2026-10-07/local-input.json new file mode 100644 index 000000000..312e32802 --- /dev/null +++ b/benchmarks/rust-native-walking-2026-10-07/local-input.json @@ -0,0 +1,27 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "fixtures": 13988, + "sources_sha256": { + "tools/test_local_input_parity.py": "3cdc6b7b04477b27fee133cd624a02255642236ec310e6aee9f7efe98d00768c", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLocalInputOracle.java": "6bd0cdd22faffc0a6cefdde72f53d114398f1a131d42a45c8ca6acf5a96781c6", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/lib.rs": "db973b1e051c8a92206582ba472449a6a5f1113fbff67825183f1bb18e0736a0", + "crates/horizon-client/examples/input_probe.rs": "872fe8275adc7f7eb05f0af04a234fb55183981df84e8df0fa2e93a1bfd8bb79" + }, + "input_sha256": "091d594e435f464bcaaec87555aa6c6183227158b6d4fb612752632bbe6ce282", + "client_jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "matched_output_lines": 13988, + "output_sha256": "79e0b897ed488723d2b857b78c706e776bb111a111140a57b990fc7fa970b9d3", + "scope": "Actual KeyboardInput.tick direction and private LocalPlayer.modifyInput compared by float bits. All 128 key combinations, input-use/riding/slow gates, supplied use-effects and sneaking multipliers, analogue vectors, signed zeros and nonfinite arithmetic. Native item speed reads a real ItemStack USE_EFFECTS component. Does not establish the full LocalPlayer tick, input remapping, sprint eligibility, poses, camera bob or network lifecycle." +} diff --git a/benchmarks/rust-native-walking-2026-10-07/scene-motion.json b/benchmarks/rust-native-walking-2026-10-07/scene-motion.json new file mode 100644 index 000000000..3d3a8bffb --- /dev/null +++ b/benchmarks/rust-native-walking-2026-10-07/scene-motion.json @@ -0,0 +1,347 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "java": "openjdk 25.0.4.1 2026-08-18", + "fixtures": 947, + "operations": 65893, + "sources_sha256": { + "tools/test_native_scene_motion.py": "243a57b9362cb127d4ead0b79617135e35816754b4641bbc4da85b73d6fcb726", + "tools/test_native_client.py": "5e8f5b24763d39e48ffabfe8a661c933b16cc41ff9b34dbede10dc921bb78716", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "524e4904d4f90f7f31895d228762e3e4f20dc97f8401c79cf99c33d7b497e84b", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneMotionOracle.java": "a1e09e9a6328fbfb4a0ed759eb0c300164957b1aaa41119ee647248a5746db69", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java": "85570f2f5a98bc508f887bd61d3266cda1f6f8ba06d304241aa2128a4650f66d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "61c320ce05a96cc0f4bf7a1526cb51a912e03bc64d8423f2dfd70513ce4f00a0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-client/examples/scene_motion_probe.rs": "6d137508f3b35e3d55f7d117bc59ca54726a4bf583d400d0e23197cad29f6939", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/lib.rs": "db973b1e051c8a92206582ba472449a6a5f1113fbff67825183f1bb18e0736a0", + "crates/horizon-client/src/main.rs": "bff1e825cdcbbf8997473eebf333a5b6c586904fa2285a03ca934ccf69cda155", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "26dbd630a53c7fe625cf94d130d68d2341e9dfea20ec7c33a1abb34f34bd73c5", + "crates/horizon-client/src/render.rs": "db17511223d0b72cf13bbb1bd7cbfca119d249f1d8914e7c1c06a710494c5123", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "17bd7127283c5ea27166e0e8079e8c284c6cff426a2fa8994879e48151e1ded4" + }, + "resources": { + "files": 5585, + "sha256": "f4a62ce38414761ec928babb2bad6ec73e13031c27393227dfd61f67cadabdbc" + }, + "input_sha256": "6420eb310f17a0dddfa2eab7079b7ede951f8da94cceba4434d65cf06fb232b8", + "rust_output_sha256": "2b4cf837dd4e0933d795df0866deb70fe5a5b3abaccb7644f982565713ec820d", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "2b4cf837dd4e0933d795df0866deb70fe5a5b3abaccb7644f982565713ec820d", + "matched_output_lines": 66840 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "2b4cf837dd4e0933d795df0866deb70fe5a5b3abaccb7644f982565713ec820d", + "matched_output_lines": 66840 + } + ], + "scope": "Stored PlayerMotion binds resident client chunks and registered attributes/coefficients to air travel, jumping, Entity.move, step resolution, ground/support updates, restitution and speed factors. Repeated native Player.travel/jump/move and actual Player.aiStep / direct LivingEntity.aiStep compare position, velocity, bounds, collision/ground flags, support, climb state, fall-reset field, both sync flags, speed, head yaw, jump trigger and jump delay by exact bits. Prepared-local-input Player.aiStep paths verify speed refresh after movement, with empty inventory and no nearby entities. Dry aiStep includes small-velocity cleanup, input damping, held/released jump timing and server frost-modifier removal. Snapshots also compare all allocated attribute instances, base/cache/dirty state, modifier values/operations/permanence and pending update/sync membership (not JVM identity-dependent iteration order). Dry resident scene, fixed standing dimensions, zero frozen ticks, empty equipment, no interpolation, fluids, vehicles, effects, crouching or other entities. Landing/damage, audiovisual emission, block-inside and network consumers remain controlled boundaries. Input preparation is a controlled boundary here and has its own client comparison. No full Player.tick, local input lifecycle, nonempty inventory/equipment ticks, full freezing, health/damage or full gameplay parity claim." +} diff --git a/benchmarks/rust-native-walking-2026-10-07/startup-smoke.json b/benchmarks/rust-native-walking-2026-10-07/startup-smoke.json new file mode 100644 index 000000000..85d8ee9f8 --- /dev/null +++ b/benchmarks/rust-native-walking-2026-10-07/startup-smoke.json @@ -0,0 +1,784 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 1, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "collision_camera": false, + "culled_model_faces": 59636, + "elapsed_seconds": 1.045018119, + "error": null, + "merged_quads": 3169, + "model_blocks": 10919, + "model_gallery": [ + { + "block": "minecraft:oak_stairs", + "models": [ + { + "model": "minecraft:block/oak_stairs_inner", + "rotations": [ + 2, + 3, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -7, + 4, + 14 + ], + "properties": { + "facing": "north", + "half": "top", + "shape": "inner_left", + "waterlogged": "false" + }, + "state_id": 5466 + }, + { + "block": "minecraft:stone_slab", + "models": [ + { + "model": "minecraft:block/stone_slab_top", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 14 + ], + "properties": { + "type": "top", + "waterlogged": "false" + }, + "state_id": 15250 + }, + { + "block": "minecraft:anvil", + "models": [ + { + "model": "minecraft:block/anvil", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 14 + ], + "properties": { + "facing": "east" + }, + "state_id": 12965 + }, + { + "block": "minecraft:torch", + "models": [ + { + "model": "minecraft:block/torch", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 14 + ], + "properties": {}, + "state_id": 4926 + }, + { + "block": "minecraft:lantern", + "models": [ + { + "model": "minecraft:block/lantern", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 18 + ], + "properties": { + "hanging": "false", + "waterlogged": "false" + }, + "state_id": 24197 + }, + { + "block": "minecraft:oak_fence", + "models": [ + { + "model": "minecraft:block/oak_fence_post", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": true + }, + { + "model": "minecraft:block/oak_fence_side", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + -3, + 4, + 18 + ], + "properties": { + "east": "true", + "north": "true", + "south": "false", + "waterlogged": "false", + "west": "false" + }, + "state_id": 8642 + }, + { + "block": "minecraft:oak_fence_gate", + "models": [ + { + "model": "minecraft:block/oak_fence_gate_open", + "rotations": [ + 0, + 1, + 0 + ], + "uv_lock": true + } + ], + "position": [ + 1, + 4, + 18 + ], + "properties": { + "facing": "west", + "in_wall": "false", + "open": "true", + "powered": "false" + }, + "state_id": 10401 + }, + { + "block": "minecraft:iron_bars", + "models": [ + { + "model": "minecraft:block/iron_bars_post_ends", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + }, + { + "model": "minecraft:block/iron_bars_side_alt", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 18 + ], + "properties": { + "east": "false", + "north": "true", + "south": "true", + "waterlogged": "false", + "west": "false" + }, + "state_id": 9711 + }, + { + "block": "minecraft:cobweb", + "models": [ + { + "model": "minecraft:block/cobweb", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 22 + ], + "properties": {}, + "state_id": 2362 + }, + { + "block": "minecraft:grindstone", + "models": [ + { + "model": "minecraft:block/grindstone", + "rotations": [ + 1, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 22 + ], + "properties": { + "face": "wall", + "facing": "west" + }, + "state_id": 24135 + }, + { + "block": "minecraft:ladder", + "models": [ + { + "model": "minecraft:block/ladder", + "rotations": [ + 0, + 3, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 22 + ], + "properties": { + "facing": "west", + "waterlogged": "false" + }, + "state_id": 7312 + }, + { + "block": "minecraft:amethyst_cluster", + "models": [ + { + "model": "minecraft:block/amethyst_cluster", + "rotations": [ + 1, + 1, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 22 + ], + "properties": { + "facing": "east", + "waterlogged": "false" + }, + "state_id": 26764 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -7, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone_mirrored", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + -3, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 0, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 1, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + }, + { + "block": "minecraft:stone", + "models": [ + { + "model": "minecraft:block/stone", + "rotations": [ + 0, + 2, + 0 + ], + "uv_lock": false + } + ], + "position": [ + 5, + 4, + 26 + ], + "properties": {}, + "state_id": 1 + } + ], + "model_quads": 179, + "movement_ticks": 0, + "os": "linux", + "player_on_ground": null, + "player_position": null, + "player_velocity": null, + "presented_frames": 30, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native resident-scene renderer with inspection camera and optional fixed-rate dry walking test; full gameplay remains unfinished", + "sprite_layers": 18, + "visible_model_faces": 5991, + "walking": false, + "window_size": [ + 1280, + 720 + ], + "native_scene_culling": { + "blocks": 10919, + "culled_faces": 59636, + "visible_faces": 5991 + }, + "native_selection": { + "matched_placements": 16, + "selected_parts": 20, + "client_jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a2ff1c890d6f3a5292c3a9402f02ca5404a993dc117853b25cbe64ac92b76d30", + "scope": "Actual native registry states, blockstate dispatch, tagged root baking and legacy collection using state.getSeed(position). All 16 featured placements match model names/transforms. An independently constructed native scene also matches total occupied blocks and visible/culled model faces using native parent resolution, rotated culling directions and Block.shouldRenderFace. No shader/pixel parity claim." + }, + "resource_files": { + "files": 5585, + "sha256": "f4a62ce38414761ec928babb2bad6ec73e13031c27393227dfd61f67cadabdbc" + }, + "executable_sha256": "5ce1f82b0864675ee3bc073d0bb9d58883821e6c6f7aa9bacc795b2f28eb8f72", + "resource_manifest_sha256": "dd3355aba962d224aa6c6e548260bc77015987fb8156b5680ab2c0c845942a93", + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "tools/test_native_client.py": "5e8f5b24763d39e48ffabfe8a661c933b16cc41ff9b34dbede10dc921bb78716", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "2f2cffacec0b4e22dd7cb032d594289bc51c94ae6cc4e985fee3e310f441d751", + "crates/horizon-client/src/assets.rs": "e595afa610e0425d0b3ad694218794bf9e680e46ae80f3925c278ef1a823c914", + "crates/horizon-client/src/camera.rs": "d386a56ca8fb3b37ba2b2ed9d09342f61b409a575bb21590e934120b4ccebfa6", + "crates/horizon-client/src/clock.rs": "4851ada3e8e65d935eda8c0b57d3b51233b34f74aab4f040fd53db0e0d40b8df", + "crates/horizon-client/src/collisions.rs": "112286b07c4cd11b36da8b6799e0e069e69dfddf9a8a3f9ce36dcb282c791d67", + "crates/horizon-client/src/input.rs": "55b259ca6425c502270e7abc4d3ae1b3838633e2bd77d3817c6e00d9143a2beb", + "crates/horizon-client/src/lib.rs": "db973b1e051c8a92206582ba472449a6a5f1113fbff67825183f1bb18e0736a0", + "crates/horizon-client/src/main.rs": "bff1e825cdcbbf8997473eebf333a5b6c586904fa2285a03ca934ccf69cda155", + "crates/horizon-client/src/mesh.rs": "4ac8d85b30f599b37a98b92adcc016b16434816b93c401bd39b8215f591f9330", + "crates/horizon-client/src/models/catalog.rs": "620103719167fc9ab76e730d68eeacb50014e95b7ad209ae7adf2cbbe69f70f7", + "crates/horizon-client/src/models/cube.rs": "1067229f9dd9b276950bf7ec0c5f67061ce3d40a21932dca8034b9748e7439a4", + "crates/horizon-client/src/models.rs": "98dd3b969947c2b297862a934e6235067ddc1fc8cda5adcc6276d19014d4b048", + "crates/horizon-client/src/motion.rs": "26dbd630a53c7fe625cf94d130d68d2341e9dfea20ec7c33a1abb34f34bd73c5", + "crates/horizon-client/src/render.rs": "db17511223d0b72cf13bbb1bd7cbfca119d249f1d8914e7c1c06a710494c5123", + "crates/horizon-client/src/sprites.rs": "292f844a31f6e8884008df9630e2b8862db1acfbc4640cc07d526e25f21f0bc5", + "crates/horizon-client/src/world.rs": "17bd7127283c5ea27166e0e8079e8c284c6cff426a2fa8994879e48151e1ded4", + "crates/horizon-client/src/world.wgsl": "972a58ccb34e9965515adbb30c47a93fceca5b742390db6d9f69cba1ec31f559", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake/transform.rs": "a95e658fef85b21bcb2f9f7512f98f98d57022d62c1199885b7133beae35a09d", + "crates/horizon-assets/src/bake.rs": "f55dda6b6cee5ac6e65a8ee4837fdd2c6674437d59e59b4c45718f6324d4a4d5", + "crates/horizon-assets/src/blockstate/bind.rs": "6278962e55c9786bba8184bdf2939af9c6e3b9002b08c3022129964b49a60009", + "crates/horizon-assets/src/blockstate/choice.rs": "5a66c8b9833e2f19dd8b0773f3593d97ff5941d3c5b773896b98049efa1395ba", + "crates/horizon-assets/src/blockstate.rs": "a4299dfd7adaeb4173982ffaa8e9c9eda2925739ae579a714193c99da2e7ce56", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "e39f21c59a2c3e1c53d977b29bd5e0638e5fc41d86ff0fcc1882a6d90fd961e4", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java": "dc5433f1ce1de629b30cb70f031a43a691fc1df1fb218ce23de89769c164d562", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/prepare_native_client.py": "524e4904d4f90f7f31895d228762e3e4f20dc97f8401c79cf99c33d7b497e84b", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "1420a80787d10dd2e2954a3ee6193ff313289d00c7c78ca26ece8bafa21f4380", + "crates/horizon-world/src/attribute_map.rs": "3d871cd530f5c035e0753f3ba065c2b9c5b49cdee75d4119f7dd584b22af67e6", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "64ac99682a3aa06b1fb94b776b47794234c76b1cf70f1f54933d51e545e69279", + "crates/horizon-world/src/attributes/live.rs": "8198c45134f69135d48ef203e71b6e702529568fd1ed9174d0aa843570bbf9e7", + "crates/horizon-world/src/attributes/mod.rs": "5c2fcbbde58c19261874d227ea98332f00336c9fa53446da2e9adb6aa64a5e5a", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/effect_particles.rs": "a42dc4ec55929dce1db0f22f8816ecf7621fdce1cd2ac0c90f6a57fea4e0afd2", + "crates/horizon-world/src/effect_sync.rs": "1388d4a69b42a14ff4cd474f5e36f0fad5a2874031e64fa2b19b2ea179deed2b", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "577c16c021352b706d123f0f1c734375fc4a5a67b508caccbc38c1e1f693f6f4", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/live_attribute_updates.rs": "778171faaaf7077deb0b62c4cc1db16351eba41adb8bb07656ba65e827056199", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "a1d4b53ae77d1899ba2b4ead67c9ec1e3c96615558e446f9d0760c1b4a520169", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + } +} diff --git a/benchmarks/rust-neighbor-spread-2026-10-06/scoped-parity.json b/benchmarks/rust-neighbor-spread-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..a281b076f --- /dev/null +++ b/benchmarks/rust-neighbor-spread-2026-10-06/scoped-parity.json @@ -0,0 +1,203 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 79580, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "82204d06e279275c5967f6d5fd80afe7416ba6c5f5ec19c682a30942f2fb6d7a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "99a396b9b983f6ca9149133251f3ece9aaf76d3d16dafa1f322378212a19490c", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "8d789c02b88cfd019064b7407f886a2054d26554390a25f804773bb2197c6c35", + "tools/test_neighbor_spread_parity.py": "67f1a5381470b819345b547f414ee72ed7c820809f7983bd21ad3c99efe9abe9", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b3caf26bd3afc9d10cdcca3f7e794c30abf5ba09afa1fe80ba8f44713acdb274", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "8a2834a9347ee2c2db7cf1c86a064907ec06e9ac16ba9cc3936e315fc4ad49ca", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "2ea6d26fe88c633ad3efe7bdb6fc49f54961cbdf93b82919d79cf7d37a5c3c7d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "431c523593e7db1e1b3ef446f8f0400dade5a13a097633d590774c2b6ed7c08a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "837c2756f10e344899418dca43b40c99662512910f7b3d60b7489dcfcf47177a", + "crates/horizon-world/src/worldgen/feature_region.rs": "2c78e5f1bdb08307f8d982f231f1abbc3306cd54348d9023b86ee6ed3516fd33", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "2fc100f8861fe0e0519a53dc4ae4a1eaa8a96aff2f6bf546ce613bdf665df237", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "2757f22706803afb3624afd65f4f5d05540acbc2bcb01f61e95fa40535575f0f", + "crates/horizon-world/examples/simple_block_fixture.rs": "d839de7fa2827189f8625903cedad84ab47c3e7384bed42e250f660f41d961dc" + }, + "fixtures_sha256": { + ".local/rust-neighbor-spread-parity/inputs.txt": "d625d0b563b8cd9f6f081baeb4e302fcd6086d757c8a5367398c389e51c0782a", + ".local/rust-neighbor-spread-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-neighbor-spread-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-neighbor-spread-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-neighbor-spread-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-neighbor-spread-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-neighbor-spread-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-neighbor-spread-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-neighbor-spread-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-neighbor-spread-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-neighbor-spread-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-neighbor-spread-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-neighbor-spread-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-neighbor-spread-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-neighbor-spread-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-neighbor-spread-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-neighbor-spread-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "e0a7c75ecb6274b4d68a479dc6da0a44ba847fbb1983e6b1aa8cff62a0295ebb", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "e0a7c75ecb6274b4d68a479dc6da0a44ba847fbb1983e6b1aa8cff62a0295ebb", + "matched_output_lines": 2650856 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e0a7c75ecb6274b4d68a479dc6da0a44ba847fbb1983e6b1aa8cff62a0295ebb", + "matched_output_lines": 2650856 + } + ], + "scope": "Native random-neighbor-spread codecs and placement. Origin provider evaluation/write precedes attempt sampling and all replacement checks. X/Y/Z offsets retain sample order. Every candidate state and every potential neighbor state, all six-direction acceptance masks, exactly-one acceptance and early exit after a second match, bounded provider codec ranges, empty/named holder sets, optional-provider fallback reads, mutable spread across repeated attempts, rejected writes, partial failures, wrapped positions, both random modes and composed feature/modifier calls are compared. Actual chunks, neighbor callbacks and complete gameplay remain pending." +} diff --git a/benchmarks/rust-noise-2026-10-05/scoped-parity.json b/benchmarks/rust-noise-2026-10-05/scoped-parity.json new file mode 100644 index 000000000..bd9a46e65 --- /dev/null +++ b/benchmarks/rust-noise-2026-10-05/scoped-parity.json @@ -0,0 +1,71 @@ +{ + "schema": 1, + "minecraft": "26.3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "commands": { + "wrap": 12026, + "create": 384, + "query": 234497, + "local": 38400, + "volume": 14208, + "stack": 723, + "normal": 3600 + }, + "inputs_sha256": "358956a9ee89ce2db357f6ad9b8b3c1fba68008d044af4758f3ae73e1249ad6d", + "rust_output_sha256": "21a1c084822f9ea6e97421e4280727fae1b9c01c1b04e1f44e552ccb84b6e92b", + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaNoiseOracle.java": "ac087a06452fbbe2823875cd771d7c06be313f3320aa0efa6e16c64c399c562e", + "tools/test_noise_parity.py": "3f2bcccc2fb8ff42f7d9d9b4c8f8df992195779144113309de8f411780fce595", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "86e7a87439acf5458be3c9b6ed5dfc3705170f39483ec0f1c2b723b4f5e3ff28", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "f00ebba7484168ae0064fa993ace9afafb323c3222ab80cfee3792bd98562e8d", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-core/Cargo.toml": "f9aff52d34439ed6511b026beee5cbd9918f34cc0a67e90e441df12c905a6dc0", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "faae2edce8b573fd32fcb4bd1f898be7d700a5b38479439f5bec96df764688fd" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "21a1c084822f9ea6e97421e4280727fae1b9c01c1b04e1f44e552ccb84b6e92b", + "matched_output_lines": 1443539 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "21a1c084822f9ea6e97421e4280727fae1b9c01c1b04e1f44e552ccb84b6e92b", + "matched_output_lines": 1443539 + } + ], + "scope": "26.3 gradient offsets, permutation tables, constructor RNG consumption, ranges, coordinate wrap, Perlin 2D/3D and derivative accumulation, simplex 2D/3D with both offset modes, smeared Perlin 2D/3D and inherited unsmeared derivatives; bounded strided density volumes, wrapped block coordinates, flat indices, cached and scalar bulk accumulation with preserved buffer tails; nested and flattened noise stacks; normal-noise octave construction, enabled/disabled/legacy normalization, parity factory, modern positional seeding, legacy Nether biome initialization, failure draw state, scalar and bulk sampling. Finite outputs and signed zeros compared by bits; NaNs canonicalized. No serialized noise definitions, density-function graphs, generated terrain, gameplay, rendering or performance claim." +} diff --git a/benchmarks/rust-object-open-map-2026-10-07/scoped-parity.json b/benchmarks/rust-object-open-map-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..4ba6d13f3 --- /dev/null +++ b/benchmarks/rust-object-open-map-2026-10-07/scoped-parity.json @@ -0,0 +1,303 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 2182, + "fastutil_sha256": { + ".local/minecraft/26.3/libraries/server/it/unimi/dsi/fastutil/8.5.18/fastutil-8.5.18.jar": "9094ae67d01d0ad246f886f11ad557fc2e79c72cbf3feed83e1512a8ae90a74a" + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaObjectOpenMapOracle.java": "592ed52a3e6b85515e7c52553bf6779f885458cc5d401c4e7e04ce2a67ad7d3c", + "tools/test_object_open_map_parity.py": "445a9ea8bccbd65dac95dbd15b679f55fedd6f807ade94ba990c3c7fff28c5c3", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "90789299b38cc9efbe14f5f47e6c16c3703f2e8e9e1abb16c9160b46fc659f96", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/object_open_map_fixture.rs": "5febed3906e4dd1e89c96d1d4e5efb259d946c0d209e87c714621d884f87e0eb" + }, + "fixtures_sha256": { + ".local/rust-object-open-map-parity/inputs.txt": "6d6758f670443e317deabe05a50c2e824042c4a70a67d816214e359bbfdfd031" + }, + "rust_output_sha256": "b2bff30d6eeb3f5e6926e1d8196ab555f8b96f856ace5715f5c06f69e6a9a97d", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "b2bff30d6eeb3f5e6926e1d8196ab555f8b96f856ace5715f5c06f69e6a9a97d", + "matched_output_lines": 1142630 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "b2bff30d6eeb3f5e6926e1d8196ab555f8b96f856ace5715f5c06f69e6a9a97d", + "matched_output_lines": 1142630 + } + ], + "scope": "Pinned fastutil 8.5.18 default Object2ObjectOpenHashMap used for effect modifier definitions and attribute instances. Compares put/get/containsKey/remove/clear, null keys/values, retained equal-key identity, slot order, growth/shrink, live indexed entry getKey/getValue/setValue and iterator removal/invalidation including wrapped clusters. forEach exercises captured keys with live values through callback mutation/rehash/failure. Pure hash/equality, nullable Integer values. Alternate constructors/default return values, compute/merge/bulk APIs, entry reuse across different maps and external structural mutation combined with iterator removal remain outside this gate; full attribute/entity gameplay integration is pending." +} diff --git a/benchmarks/rust-object-open-set-2026-10-07/scoped-parity.json b/benchmarks/rust-object-open-set-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..0e0fdebac --- /dev/null +++ b/benchmarks/rust-object-open-set-2026-10-07/scoped-parity.json @@ -0,0 +1,300 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 870, + "fastutil_sha256": { + ".local/minecraft/26.3/libraries/server/it/unimi/dsi/fastutil/8.5.18/fastutil-8.5.18.jar": "9094ae67d01d0ad246f886f11ad557fc2e79c72cbf3feed83e1512a8ae90a74a" + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaObjectOpenSetOracle.java": "b981560e985abb3284753728856a33575ad4f7c1b3b9b24ebaae68f6f93ff422", + "tools/test_object_open_set_parity.py": "c4edf206353896fdf3267e964fb6817fee2678808518577ac11956af1c62508d", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "1788f48f7f88463ced734af0bb02610cd7a991d5a6bdeaa2f9f198a4b7312c2a", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "b7f9fc194fc4bc6f49838de42f21df6c8661171044faa79ba0a8ae6f0d1cf055", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/object_open_set_fixture.rs": "b6d4fbfa2afbd7872046f3a148ca4a06de773ec5ce53c3f25d6c155f5aff5dba" + }, + "fixtures_sha256": { + ".local/rust-object-open-set-parity/inputs.txt": "121e7ada61aab8442a17e8cbf26999a518717554ac7c4b73fd69b4f302089c4d" + }, + "rust_output_sha256": "88424102c9730f9089fca06aeb29cd468d6dda0a4561a38d384d56296fa97682", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "88424102c9730f9089fca06aeb29cd468d6dda0a4561a38d384d56296fa97682", + "matched_output_lines": 611998 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "88424102c9730f9089fca06aeb29cd468d6dda0a4561a38d384d56296fa97682", + "matched_output_lines": 611998 + } + ], + "scope": "Pinned fastutil 8.5.18 default ObjectOpenHashSet used for pending attribute updates. Compares add/contains/get/remove/clear, null membership, equal distinct object retention, slot iteration, growth/shrink, iterator removal with wrapped clusters and live external mutation prefixes. Key equality/hash methods are pure. Alternate constructors, collection bulk methods and external structural mutation followed by iterator removal are outside this scoped gate; attribute/player integration remains pending." +} diff --git a/benchmarks/rust-pillar-2026-10-06/scoped-parity.json b/benchmarks/rust-pillar-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..e25ab67e1 --- /dev/null +++ b/benchmarks/rust-pillar-2026-10-06/scoped-parity.json @@ -0,0 +1,209 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 41746, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "c72dae42f87b15980ac2155d736126fa2b88f5f15642acf9c739c17849287ade", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "e871d3a01f15616a98ca9227c27a81e4d17e2d57ac4e68a5650a70fa29811497", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_pillar_parity.py": "c3df13e78a5f654d0c3525c57a28b5896395f2e7cd136b014666363b8aa4aa63", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "5ce5c6eaa5f8a2557a620e533788217b1eb430654801dcf6135d6c92d7a012ac", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "fbc0dc49fa5a825e3a7aef74bd465de83fc12855b5a19d907c5b8388bb350b5f", + "crates/horizon-world/src/worldgen/feature_region.rs": "3b893ceafbdd1d7b4264f4022dbdb6a7142dfc7001a5cf5c304f5ca7695dfaa0", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "c04a1f7e9409b0cea0ed9b90fd033fc5a398b66f2688b7f6c0583facc473c457", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "11804e16fe587ab8f2c613186de45b450e6d9c459a58e270f108b54223ae68c2", + "crates/horizon-world/examples/simple_block_fixture.rs": "1d2005bdc82c0c0d86d13d00b105983d431c7da6fa5357f4b1f6c43bdcc0019c" + }, + "fixtures_sha256": { + ".local/rust-pillar-parity/inputs.txt": "067db3ce1c72472e9f09341deec6a1bc92267716bd097c3d15722156b8676e52", + ".local/rust-pillar-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-pillar-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-pillar-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-pillar-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-pillar-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-pillar-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-pillar-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-pillar-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-pillar-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-pillar-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-pillar-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-pillar-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-pillar-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-pillar-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-pillar-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-pillar-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "f989182cf82026dbcfe3011990b153bf820d3a06b1f4969a1e63bbb8cc6bd734", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "f989182cf82026dbcfe3011990b153bf820d3a06b1f4969a1e63bbb8cc6bd734", + "matched_output_lines": 921111 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "f989182cf82026dbcfe3011990b153bf820d3a06b1f4969a1e63bbb8cc6bd734", + "matched_output_lines": 921111 + } + ], + "scope": "Native single-block pillar codec and placement, all provider state descriptors, upward/downward traversal, replacement predicates before continuation draws, bounds checks after draws, cap placement one opposite step from the stopping position even when no column block was placed, ignored rejected writes and cap false results, partial failures, coordinate wrapping, independent world random stream, named holders, nested pillars and feature sequences. Shared graph work limits bound pathological traversals. Actual resident chunks, neighbor updates and complete gameplay remain pending." +} diff --git a/benchmarks/rust-piston-movement-2026-10-07/movement-registry-regression.json b/benchmarks/rust-piston-movement-2026-10-07/movement-registry-regression.json new file mode 100644 index 000000000..c15b8ae5e --- /dev/null +++ b/benchmarks/rust-piston-movement-2026-10-07/movement-registry-regression.json @@ -0,0 +1,221 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "registry_states": 35723, + "registry_blocks": 1286, + "fixtures": 648054, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementRegistryOracle.java": "49fcc1f4348a8e279dcb916ae149de8c97f15df54ff1a675826b7c6c3dda06d9", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_movement_registry_parity.py": "a06e7e6bb194c4ac1476aaa8eadf1b31b7e5ebc18c01e02fa3011bb7ebe49a27", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/examples/movement_registry_fixture.rs": "97640fdbacfc94464cec8904fe7b4e8b912e3160d91d40234d77eaa1d7ccd1a0", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "c37ea9eb157c24d9c91eec8edfef652f12b9b6b4d7f64da5ad0179fe5259a674", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_properties.rs": "9c78bed0d30c8b9cfaa413b9b81b0bf94861605c13b26754e09b24e83d75a227", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "8ac9e90fe899855036658afd862ff20c4dcd15d1bd3f92a763c4795fecf0549f", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "fixtures_sha256": { + ".local/rust-movement-registry-parity/inputs.txt": "9b94e30e101bf16b40a74685515b2ff3467c8bac92f6fcc4450c49789198f7a5", + ".local/rust-movement-registry-parity/registry-info.json": "58c9ad06a3b4af632e45a65d7fe2b930d0b05a5a17a490267dc3c7e98d9e23f7", + ".local/rust-movement-registry-parity/movement-properties.nbt": "4b5646cbb675025efc9ac6e24b024ac2edddfa6725eb8e158357beda622a3888", + ".local/rust-movement-registry-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-movement-registry-parity/tags.json": "5e1301e5a9abf7e4de93af5dae3a157e852dbdb4ea345c2eb626305a605d4f98" + }, + "rust_output_sha256": "81c05fbffc18b7eef6fbc778afbdb6032b782d1d245d900093a07efe7b7f7006", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "81c05fbffc18b7eef6fbc778afbdb6032b782d1d245d900093a07efe7b7f7006", + "matched_output_lines": 2300888 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "81c05fbffc18b7eef6fbc778afbdb6032b782d1d245d900093a07efe7b7f7006", + "matched_output_lines": 2300888 + } + ], + "scope": "Imports raw registered friction/speed/jump/bounce/fall-distance coefficients and fence-gate type; binds resolved fence/wall/bounce-suppression tags. Actual native getters independently verify every state. Entity support positions and jump/speed factors run every registered state with natural, empty and universal tags; additional mixed-block queries, null support and failures exercise lazy behavior. Does not establish live player travel, bounce effects or full gameplay." +} diff --git a/benchmarks/rust-piston-movement-2026-10-07/scoped-parity.json b/benchmarks/rust-piston-movement-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..e8725102d --- /dev/null +++ b/benchmarks/rust-piston-movement-2026-10-07/scoped-parity.json @@ -0,0 +1,213 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 5723, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPistonMovementOracle.java": "f20f5f0a7bb604c4b034cefaa9725cea29b650380aceb317a85f6e479dd4d4d6", + "tools/test_piston_movement_parity.py": "69425e452501ca63bab35d371e4afc29fef5e61f4aa7bfaacf8d2c36b04b108f", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "c37ea9eb157c24d9c91eec8edfef652f12b9b6b4d7f64da5ad0179fe5259a674", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_properties.rs": "9c78bed0d30c8b9cfaa413b9b81b0bf94861605c13b26754e09b24e83d75a227", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "8ac9e90fe899855036658afd862ff20c4dcd15d1bd3f92a763c4795fecf0549f", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/piston_movement_fixture.rs": "88629fbf24e34822853cf10152e6e2d668cbb1267d530272a9dd178e03d65324" + }, + "fixtures_sha256": { + ".local/rust-piston-movement-parity/inputs.txt": "9bfb74b2783c96b1608390065f5e3e90c485fc79ed51bb9aff40c78ce526ebe4" + }, + "rust_output_sha256": "f2c7e4e5d146ffb382a5092a3b9eaab0395c2015d48a1e561ca8cbe3ee8d74dc", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "f2c7e4e5d146ffb382a5092a3b9eaab0395c2015d48a1e561ca8cbe3ee8d74dc", + "matched_output_lines": 325197 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "f2c7e4e5d146ffb382a5092a3b9eaab0395c2015d48a1e561ca8cbe3ee8d74dc", + "matched_output_lines": 325197 + } + ], + "scope": "Actual Entity.limitPistonMovement over sequential displacement and game-time snapshots. Compares lazy time queries, length and displacement thresholds, per-tick resets, first-nonzero-axis selection, clamped accumulation, signed zero/nonfinite values and state after injected time-query failures. This does not establish piston block event simulation, entity pushing, Entity.move guards or full gameplay." +} diff --git a/benchmarks/rust-piston-shape-2026-10-06/scoped-parity.json b/benchmarks/rust-piston-shape-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..d13eb0942 --- /dev/null +++ b/benchmarks/rust-piston-shape-2026-10-06/scoped-parity.json @@ -0,0 +1,177 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "kinematic_cases": 10000, + "fixtures": 102315, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPistonShapeOracle.java": "f8ce2b8d50a2ca8dfd131968cf79437af6ec686a827fdc0841dcd528418f43de", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "02acfbae94aee306c5a4e1db7c86c68f7d6156ddd3dd477dc9e9d06e5ca98118", + "tools/test_piston_shape_parity.py": "e1bed92b9f9fbdbcd42eba540bdb06c64cd2ddbb9e522943b96cf1764b87860e", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_properties.rs": "e74b368012d4d440dcdbd4d9bcaf80495220b90557f0e0c733b0aa21ad03c53c", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "1bf4ad95fcdf7f2df4e33dde38e08959d9b76a6260838c13e97c2bb59e006294", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "8a2834a9347ee2c2db7cf1c86a064907ec06e9ac16ba9cc3936e315fc4ad49ca", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "d347020c29ea795b6f9554828a84274d27820bdaf6257ce3b2d265c5c9051ecc", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "7c8f628601a6d835d913c034b0d421a8f83bee6c569033448aac99123ed84a2c", + "crates/horizon-world/src/worldgen/block_predicate.rs": "535c9840de71704f0338b5d77c63084aceb5239644f9ebb6f2993b95acfec042", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "fe61a5e43179a7588737a71782ea246811fe2c8721e74793e1ac018c8eb93c34", + "crates/horizon-world/src/worldgen/feature_region.rs": "2c78e5f1bdb08307f8d982f231f1abbc3306cd54348d9023b86ee6ed3516fd33", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "09d79c5acf7332e18a9049aed1a05c38a2bccbc6c2f20bbac560f2e58c35c6f5", + "crates/horizon-world/src/worldgen/placement/context.rs": "d801e1831200ddd9161ea960aa0009c9f5b8227d2113027abf88ad48ca259eed", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "fa0616353f07460975ab323357ab280b7f35e7bfe2de6edc08d304316766ed26", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "647f253a7d14d724086b4d146f26295e0da825df86f4adbd6a0e367d5198f3d5", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "821981c893fc84312351503f2be0c06c681d8bc768dade14576697cf047a9f8f", + "crates/horizon-world/examples/piston_shape_fixture.rs": "d3c6ae35bfd1183fcfe5360b0c175bd008c29b0db001bad122dbc2fc3169dab3" + }, + "fixtures_sha256": { + ".local/rust-piston-shape-parity/inputs.txt": "cc974edd3f7053e7b29d9f34695a3dde8bd5fdffdd034e3972f80dc56b4452ec", + ".local/rust-piston-shape-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-piston-shape-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-piston-shape-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078" + }, + "rust_output_sha256": "c86088bc353d6bb31da1aa6b9918c689bccc67da07129fcb38de21a639fb5ca7", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "c86088bc353d6bb31da1aa6b9918c689bccc67da07129fcb38de21a639fb5ca7", + "matched_output_lines": 1096811 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "c86088bc353d6bb31da1aa6b9918c689bccc67da07129fcb38de21a639fb5ca7", + "matched_output_lines": 1096811 + } + ], + "scope": "Actual moving-piston entity collision shape, interpolation/offset float bits, movement direction and collision-related block-state selection. Every registered moved state is sampled, piston-base/source/extension/head thresholds and all noclip directions are crossed, and dynamic block-entity query failures are compared. Cached collision geometry is imported privately; uncached moved blocks use Rust support selection only in the tested empty-collision-context, absent-block-entity world. Piston ticking, entity pushes, live block entities, networking and full gameplay remain pending." +} diff --git a/benchmarks/rust-placement-2026-10-06/scoped-parity.json b/benchmarks/rust-placement-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..69df2a846 --- /dev/null +++ b/benchmarks/rust-placement-2026-10-06/scoped-parity.json @@ -0,0 +1,153 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 21840, + "modifier_kinds": 17, + "predicate_kinds": 5, + "definitions": 520, + "requested_modifications": 70080, + "requested_counts": 17280, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "tools/test_placement_parity.py": "eeb3759f09561e00c9ec436bef84d2c14358a1e839e06b1214580f6fe043fc5d", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_predicate.rs": "dd8cbda2ec110444950f0b31bf4e088897eab0994674a91568c7b063f8f16210", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/placement/chain.rs": "76832dd4f76b44edfcc8bd52d8115f6e30684bfaea0e0b959ba060f07cc3483d", + "crates/horizon-world/src/worldgen/placement/context.rs": "b36dfd9297896e62770f2085cf934fc08ebd4c030ecc7ae17d864e819a113201", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "f9d264985d0ce6a7eb91a4f559661efbecc5a3fe097ce559f6acbcf0132c8c87", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "42823918deec5e149dc729a95bfe54aa32d91604098d5eb8452da0162d557d22", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "1ae40b843721d0f1e1c849b984e0a065aacda6e1384e21fc599cda261f996945", + "crates/horizon-world/src/worldgen.rs": "edc1d675acc52d264486a3c8c56e93a21ebf2c6a73da912f35b8fa2a7233cdde", + "crates/horizon-world/examples/placement_fixture.rs": "ad7ba1c87b033f26967e8a3b773bc656e03f41cbbf9e45f2a3687fd0b11c3deb", + "crates/horizon-world/examples/support/placement_queries.rs": "623b98c33245cb584d666a06bd5a3ddf7f19bf77e0ea9dc67be9a242086c063c" + }, + "fixtures_sha256": { + ".local/rust-placement-parity/inputs.txt": "7809f8d0b891cc84e12f317504b67493e2998a1f528517ec918bd49de810b6e5" + }, + "rust_output_sha256": "a9ebcecfb5ada440004a86c2a65de67968d648bdf5126dbdafa92ecf7b575d5a", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a9ebcecfb5ada440004a86c2a65de67968d648bdf5126dbdafa92ecf7b575d5a", + "matched_output_lines": 1268600 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "a9ebcecfb5ada440004a86c2a65de67968d648bdf5126dbdafa92ecf7b575d5a", + "matched_output_lines": 1268600 + } + ], + "scope": "Actual PlacementModifier.CODEC parsing and modify callbacks for count, in-square, offset, height-range, rarity, random-chance, fixed-position randomly-selected, heightmap, surface-relative-threshold and surface-water-depth modifiers, plus native noise-based and noise-threshold repeating counts and cuboid placement with edge/interior controls and count-on-every-layer scans, predicate filters and environment scans. Logical and inside-world-bounds predicates preserve short-circuiting and offset wrapping; traced world-bound queries expose scan termination, final target tests and failures. Layer scanning uses traced synthetic block strata containing air variants, water/lava, ordinary ground, bubble columns and bedrock; callbacks and injected height/block failures preserve query order and random consumption. Both random modes, repeated calls, zero counts, inclusive provider bounds, nested random choices, anchored and overflowing coordinates, same-chunk fixed filtering, duplicates, malformed fields and failing consumers. Consumer callbacks optionally draw from the shared random stream; subsequent nextLong values verify exact consumption. Contexts use an actual PlacementContext with a traced WorldGenLevel proxy and native noise generator. Heightmap queries use traced synthetic world responses, ordinary/extreme heights and injected query failures; world minimum and generation minimum can differ. Noise count-only calls include extreme ratios, factors, offsets and thresholds without expanding huge position lists. Additional block predicates, biome filtering, configured features, provider encoders, Gaussian providers and complete world generation remain pending." +} diff --git a/benchmarks/rust-player-equipment-2026-10-07/scoped-parity.json b/benchmarks/rust-player-equipment-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..62f6fdef1 --- /dev/null +++ b/benchmarks/rust-player-equipment-2026-10-07/scoped-parity.json @@ -0,0 +1,276 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 3571, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerEquipmentOracle.java": "e6713f951ef5583ccb06167613221e94a120ab1dac775aca732b220eeb1ee394", + "tools/test_player_equipment_parity.py": "80b3be0e7ba7c0fecaa73eb3324f61c91410657ec398b3801f992958ad4b05a9", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "1a83604c256a51898b59b0087c2378282bcebe7883add2c4634dc7f9183d6e49", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_use.rs": "1d0a3afa61b60d356e81a063da79ec6cd38730315976640a591325fc4c8ab98c", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "f9b29f42a528493d0d2521110d4f6e0bc89af8f579d539648cb7c3a9e68e31cd", + "crates/horizon-world/src/item_use_start.rs": "9996a9b90c313925cd90e78c02880f2a1d2ae65aef53f4ce081578a9dcd10c62", + "crates/horizon-world/src/lib.rs": "71dc72ba5c6c461456201f6f6cb28942223ecac7f899940d46d30fc15ec9b18a", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/player_equipment_fixture.rs": "9cf7128f3da64bf2ed64547d0397a584b18a27d0fb085d95489d32b45dba1310" + }, + "fixtures_sha256": { + ".local/rust-player-equipment-parity/inputs.txt": "8e3e0acd6656382699f5d128231a2ff7178d67ec09cc123aceb518cef249b900" + }, + "rust_output_sha256": "41c0d61417e9fdb12847097bb988fa88303d20ca71a71304085f22ca84c390b7", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "41c0d61417e9fdb12847097bb988fa88303d20ca71a71304085f22ca84c390b7", + "matched_output_lines": 408852 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "41c0d61417e9fdb12847097bb988fa88303d20ca71a71304085f22ca84c390b7", + "matched_output_lines": 408852 + } + ], + "scope": "Actual PlayerEquipment get/set/isEmpty and inherited LivingEntity hand/slot access over a real Inventory and shared ItemStack references. Equipment changes write storage before the controlled onEquipItem callback; mutations/failures and main-hand selection changes retain native prefixes. Raw enum-map main-hand entries exercise base storage independently from the selected main-hand override. Full onEquipItem effects, synchronized flags, active-use integration and complete gameplay integration remain pending." +} diff --git a/benchmarks/rust-player-food-2026-10-07/scoped-parity.json b/benchmarks/rust-player-food-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..77975f641 --- /dev/null +++ b/benchmarks/rust-player-food-2026-10-07/scoped-parity.json @@ -0,0 +1,249 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 5814, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerFoodOracle.java": "39ac1d8b732a1611f113ee9cd14a90711a29ba605decac75ba015d516a3a2ec8", + "tools/test_player_food_parity.py": "b455568a72be525f251113d1852acec63147c2bded7e96bbd5f293321b5d941f", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "cdb3276e6c4f25103e4ce8a76b31b88e3e6081ea0dea4d74b8c386579eeffbfc", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "74b07b8231bdd7ea76350c3172c196ba5bfa3ad09705d5d0555300e20f6e0f8f", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/player_food_fixture.rs": "98a301cf2e50e53a9431008920e3f23b2069a19f691b2d86cdc9b3d33c2c78b9" + }, + "fixtures_sha256": { + ".local/rust-player-food-parity/inputs.txt": "774b48a764503b5b56f59bf4eb2f47f4ac42a6dfd4d7fe0c1331cf73345451b7" + }, + "rust_output_sha256": "3d639c4634568a9ba8189a45a2266ceae6019582adc48f850c247ed530075377", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "3d639c4634568a9ba8189a45a2266ceae6019582adc48f850c247ed530075377", + "matched_output_lines": 32723 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "3d639c4634568a9ba8189a45a2266ceae6019582adc48f850c247ed530075377", + "matched_output_lines": 32723 + } + ], + "scope": "Actual Player causeFoodExhaustion/canEat/hasEnoughFoodToDoExhaustiveManoeuvres with native FoodData. Direct abilities/food fields versus virtual food/ability getters, captured food identity across callbacks, client/server and invulnerability guards, mutations/failures, nonfinite exhaustion and integer hunger boundaries. Also tests the ordinary stored-food binding. Consumable/item components, abilities persistence and live player tick remain pending." +} diff --git a/benchmarks/rust-player-health-2026-10-07/scoped-parity.json b/benchmarks/rust-player-health-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..215fcfb67 --- /dev/null +++ b/benchmarks/rust-player-health-2026-10-07/scoped-parity.json @@ -0,0 +1,255 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 4258, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerHealthOracle.java": "5d6dc93c0140e2b2f953fba7290721079d5a607fa81b051e2ac1e4742ab606f2", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "tools/test_player_health_parity.py": "7a094194489f5e952c23737da9b352cf17d4b5b08c05d4c8dc8f50a98f194beb", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "d66b993f1b13d15977a792e04a0668ca9cc3920d49d2c7737efaffb0be03621f", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "711e78438ece3e94eb156c0e64cfea06a63f79640a7a81e396ae2c1b277cdce6", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/player_health_fixture.rs": "7650495fbe91f9796a5b1be2115a583e4d55dba42d73ede292018711e3b9213f" + }, + "fixtures_sha256": { + ".local/rust-player-health-parity/inputs.txt": "ae26fb76cf1034d72f15095389903074ed1c435e83291ec9cb41023663481ec0", + ".local/rust-player-health-parity/catalog.json": "d1e488e4f432888beb9f643904c8bca242d1e2093f53e23e07da305d70cf7106", + ".local/rust-player-health-parity/ids.json": "f7d6037166d966e2714b01cff5626f0cc0a02ce883885ec791c93e977afde0e6" + }, + "rust_output_sha256": "546505ec6df593bc2e15ac2f28b3ee41ee0f723a537a827f982e6e34a6ad2ca0", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "546505ec6df593bc2e15ac2f28b3ee41ee0f723a537a827f982e6e34a6ad2ca0", + "matched_output_lines": 243146 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "546505ec6df593bc2e15ac2f28b3ee41ee0f723a537a827f982e6e34a6ad2ca0", + "matched_output_lines": 243146 + } + ], + "scope": "Actual Player health/absorption methods using registered player AttributeMap and one SynchedEntityData table. Exports actual health/absorption field IDs; compares modified attribute limits, healing, player absorption getter/setter, dirty/default extraction, received updates, callback packet drains and failures. Observer side effects are controlled; custom virtual data replacement, other synchronized serializers, wire codecs and full player damage/tick integration remain pending." +} diff --git a/benchmarks/rust-player-hurt-2026-10-07/scoped-parity.json b/benchmarks/rust-player-hurt-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..af64f6a27 --- /dev/null +++ b/benchmarks/rust-player-hurt-2026-10-07/scoped-parity.json @@ -0,0 +1,255 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 7068, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerHurtOracle.java": "f7d4e136f4baf5dcad2532be2f73375f22a19ebf17b8ee183c35abd8cc4dbff6", + "tools/test_player_hurt_parity.py": "3164b8644664fcd46903e801ea70d1bb866e07e7112dc94570161831644bc84d", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "62428dd3dd38eca45ff3d122387eb4ec8186161f857963d3557d5aefb85cb423", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "711e78438ece3e94eb156c0e64cfea06a63f79640a7a81e396ae2c1b277cdce6", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_damage.rs": "c4fc29eecf2bf401680d1754bef06797a5e4608ab53c5b52e0dd4996f859dbfe", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/player_hurt_fixture.rs": "0d2973abaf0784d15f5c15c30f1af29953c947eea820e3c9403e3a6dc3b09947" + }, + "fixtures_sha256": { + ".local/rust-player-hurt-parity/inputs.txt": "a4c5f7f9370daf4a1e54b0ccc45e9c157f399e62834016c27ba41651071d7ed5" + }, + "rust_output_sha256": "73f8200591b6331c70aa85f2d2f7e7d3fded984a5f39a17962dc33dc34017c68", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "73f8200591b6331c70aa85f2d2f7e7d3fded984a5f39a17962dc33dc34017c68", + "matched_output_lines": 410880 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "73f8200591b6331c70aa85f2d2f7e7d3fded984a5f39a17962dc33dc34017c68", + "matched_output_lines": 410880 + } + ], + "scope": "Actual Player and ServerPlayer hurtServer methods on ServerPlayer receivers through native LivingEntity dispatch. Ability/invulnerability ordering, shoulder removal, three difficulty queries, PvP player/arrow-owner gates, repeated hits, non-finite values and callback failures. Native downstream living dispatch uses controlled inner damage/blocking/effects/death services and empty victim criterion listeners. Rules/source registries, actual PvP team permissions, successful totems, attacker server-player criteria and complete player lifecycle remain pending." +} diff --git a/benchmarks/rust-player-inventory-2026-10-07/scoped-parity.json b/benchmarks/rust-player-inventory-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..62eee6f69 --- /dev/null +++ b/benchmarks/rust-player-inventory-2026-10-07/scoped-parity.json @@ -0,0 +1,273 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 3960, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerInventoryOracle.java": "dc30eda6ef4b858b8cd43e7d486895b4b3be3e6454b013ac1b86ef231ca36294", + "tools/test_player_inventory_parity.py": "e9330270104479af8d7b7ba360d2b66f64f0960a6b13351c113d00967e7f3fc0", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "1a83604c256a51898b59b0087c2378282bcebe7883add2c4634dc7f9183d6e49", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_use.rs": "1d0a3afa61b60d356e81a063da79ec6cd38730315976640a591325fc4c8ab98c", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "f9b29f42a528493d0d2521110d4f6e0bc89af8f579d539648cb7c3a9e68e31cd", + "crates/horizon-world/src/item_use_start.rs": "9996a9b90c313925cd90e78c02880f2a1d2ae65aef53f4ce081578a9dcd10c62", + "crates/horizon-world/src/lib.rs": "73067d8cbb5b1b6a6e460abc0a36ba4ea79de2d3c6d664374fb06f7c256aa0d1", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "e1d08747516ba9a8b3c8f7627ba9b6caa14677a53efacfe863ab782d13c6110f", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/player_inventory_fixture.rs": "5e8f93f623b225ad65721058b61269763b8d49179166fe8dcb45b83e5de794fd" + }, + "fixtures_sha256": { + ".local/rust-player-inventory-parity/inputs.txt": "01e7711fd5f12f3b3c4e47b263f5a98751a146aec217255ef0182b5e76ba1cc3" + }, + "rust_output_sha256": "003e761e441fad8b82b169f8ac04d228237236fb492e74690d85ded629278297", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "003e761e441fad8b82b169f8ac04d228237236fb492e74690d85ded629278297", + "matched_output_lines": 790440 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "003e761e441fad8b82b169f8ac04d228237236fb492e74690d85ded629278297", + "matched_output_lines": 790440 + } + ], + "scope": "Actual player Inventory storage, equipment, selected slots, hotbar picking, matching/crafting eligibility, reference removals, clear/replacement, counts and change counter. Actual ItemStack components cover damage, unbreakable, one enchantment and custom names; fixture-controlled equipment-map iteration order isolates native JVM Map.of random ordering. Shared stack and equipment references are traced across two inventories, including self-replacement and failures after selection changes. Pickup, item/equipment ticks, menus, recipes, persistence, arbitrary virtual overrides, full components and complete gameplay integration remain pending." +} diff --git a/benchmarks/rust-player-travel-2026-10-07/scoped-parity.json b/benchmarks/rust-player-travel-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..1f6dffdf8 --- /dev/null +++ b/benchmarks/rust-player-travel-2026-10-07/scoped-parity.json @@ -0,0 +1,229 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 15446, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerTravelOracle.java": "67c4086332ff24e387e5bdf2d57a0cf600a2af602661d0a8f9db5b882a0a1a82", + "tools/test_player_travel_parity.py": "37026a8eae60f6f6198f980f634215b8ae1ace3a223c790be9d9b4d9d2b8a0c3", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "b567c6026fc08791caf85df55cfaa06b9e1413d51e0a593427ade6e025f7eba1", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/player_travel_fixture.rs": "c52773da7223773565fe5685653caffec97d0ab83713ab91fcdbb1683b440f94" + }, + "fixtures_sha256": { + ".local/rust-player-travel-parity/inputs.txt": "8ab97e056004d2291ac9b66d1e89aed823c1236b2fbcc46b100e9b0d581cbd30" + }, + "rust_output_sha256": "e00866cdc3ebc3d82e51b1b6ecf9d57ea6b4ff526a5e92698152bd3fef490d5a", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "e00866cdc3ebc3d82e51b1b6ecf9d57ea6b4ff526a5e92698152bd3fef490d5a", + "matched_output_lines": 120933 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e00866cdc3ebc3d82e51b1b6ecf9d57ea6b4ff526a5e92698152bd3fef490d5a", + "matched_output_lines": 120933 + } + ], + "scope": "Actual Player.travel, getFlyingSpeed and isAffectedByFluids. Covers passenger bypass, swim look pitch and head-fluid queries, flying vertical preservation, sprint speed, lazy ability access, provider mutations/failures, signed zero and nonfinite coordinates/velocity. Parent LivingEntity.travel selects an instrumented fluid branch; actual air/fluid collision simulation and full player/world gameplay remain separately pending integration." +} diff --git a/benchmarks/rust-powder-snow-collision-2026-10-06/context-regression.json b/benchmarks/rust-powder-snow-collision-2026-10-06/context-regression.json new file mode 100644 index 000000000..26c56fc1e --- /dev/null +++ b/benchmarks/rust-powder-snow-collision-2026-10-06/context-regression.json @@ -0,0 +1,203 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 8338, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java": "b9c34e7f7a7c14001e03373cbbd468a228c5301eb639460b4ce465d14e946113", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_collision_context_parity.py": "75d6f01e072867d2bd286d2e518e123fcfe055a11ac1705ec99ecec3975cb8d2", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "a40c9d7a4e0a734c124dc856e31359fd4d8de3d1bfc79c86787afa8e8e05e480", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "f0997b21c8083de75f4f8883e8855e1d2d9f1876a2053a8a97b081deed5b0bcd", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/collision_context_fixture.rs": "b7bf0f48f7dc0129c1ebe43c11cb4cad00194b501c2bcbb3220bc8779e695ba4" + }, + "fixtures_sha256": { + ".local/rust-collision-context-parity/inputs.txt": "60b49e91a7a4999cfb8eb6ac3fbc6ec0a931d68cd53f9737959a2bd2b42be7a5" + }, + "rust_output_sha256": "7b23eb34c86c3db5a9e90bdd8ef772b79b2a06c8460542e032589f7962fd8f64", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "7b23eb34c86c3db5a9e90bdd8ef772b79b2a06c8460542e032589f7962fd8f64", + "matched_output_lines": 225126 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "7b23eb34c86c3db5a9e90bdd8ef772b79b2a06c8460542e032589f7962fd8f64", + "matched_output_lines": 225126 + } + ], + "scope": "Actual CollisionContext factories and EntityCollisionContext/Empty/PositionCollisionContext queries on controlled player and marker snapshots. Checks entity identity, captured descending and placement flags, fluid collision flags, empty-stack AIR identity, height thresholds including f32 epsilon, null factories, callback arguments/order/failures and all five fluid type pairs. Entity lifecycle, inventory mutations after capture, experimental minecart contexts, contextual block shape dispatch and live movement integration remain pending." +} diff --git a/benchmarks/rust-powder-snow-collision-2026-10-06/liquid-regression.json b/benchmarks/rust-powder-snow-collision-2026-10-06/liquid-regression.json new file mode 100644 index 000000000..2f96d816d --- /dev/null +++ b/benchmarks/rust-powder-snow-collision-2026-10-06/liquid-regression.json @@ -0,0 +1,205 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 58344, + "block_states": 32, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java": "b9c34e7f7a7c14001e03373cbbd468a228c5301eb639460b4ce465d14e946113", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_collision_context_parity.py": "75d6f01e072867d2bd286d2e518e123fcfe055a11ac1705ec99ecec3975cb8d2", + "tools/test_liquid_collision_parity.py": "dd77dfef7d3a66e81d92b66680d9626b6d69c54fc742bf5122674f05342fe788", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "a40c9d7a4e0a734c124dc856e31359fd4d8de3d1bfc79c86787afa8e8e05e480", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "f0997b21c8083de75f4f8883e8855e1d2d9f1876a2053a8a97b081deed5b0bcd", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/collision_context_fixture.rs": "b7bf0f48f7dc0129c1ebe43c11cb4cad00194b501c2bcbb3220bc8779e695ba4" + }, + "fixtures_sha256": { + ".local/rust-liquid-collision-parity/inputs.txt": "564e80e9a55a186cd70c21a1db14abf59849be90bc5493346e9e64ff9d3c9d8b" + }, + "rust_output_sha256": "d845ce538e9ce157f6455b32e73e03e9d7df86ebc5c9ab80ebf94705500748ab", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "d845ce538e9ce157f6455b32e73e03e9d7df86ebc5c9ab80ebf94705500748ab", + "matched_output_lines": 571179 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "d845ce538e9ce157f6455b32e73e03e9d7df86ebc5c9ab80ebf94705500748ab", + "matched_output_lines": 571179 + } + ], + "scope": "Native contextual LiquidBlock collision dispatch for all 32 water/lava states. Checks the always-fluid bypass, source-only selection, living-entity gating, supplied entity standing shapes, exact height boundaries, all 33 above-block fluid states, callback order and failure propagation, null/placement contexts and wrapping above-block coordinates. Full selected shape data and callback traces are compared. Entity-specific standing shape implementations, liquid simulation and live movement remain pending." +} diff --git a/benchmarks/rust-powder-snow-collision-2026-10-06/scaffolding-regression.json b/benchmarks/rust-powder-snow-collision-2026-10-06/scaffolding-regression.json new file mode 100644 index 000000000..74e66d686 --- /dev/null +++ b/benchmarks/rust-powder-snow-collision-2026-10-06/scaffolding-regression.json @@ -0,0 +1,205 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 56448, + "block_states": 32, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java": "b9c34e7f7a7c14001e03373cbbd468a228c5301eb639460b4ce465d14e946113", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_collision_context_parity.py": "75d6f01e072867d2bd286d2e518e123fcfe055a11ac1705ec99ecec3975cb8d2", + "tools/test_scaffolding_collision_parity.py": "bab75e2cad68a3193035a87497eaa372466c405293cc547e39dbd7bd4450d69d", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "a40c9d7a4e0a734c124dc856e31359fd4d8de3d1bfc79c86787afa8e8e05e480", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "f0997b21c8083de75f4f8883e8855e1d2d9f1876a2053a8a97b081deed5b0bcd", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/collision_context_fixture.rs": "b7bf0f48f7dc0129c1ebe43c11cb4cad00194b501c2bcbb3220bc8779e695ba4" + }, + "fixtures_sha256": { + ".local/rust-scaffolding-collision-parity/inputs.txt": "5945054e86700237a7b6de6b362a37a98bdc8afaa67004e8aaa92da1421b552c" + }, + "rust_output_sha256": "33a33cd612c999ab21f1acbbdee522f2ec2b3f877d62f922c665715e3012e207", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "33a33cd612c999ab21f1acbbdee522f2ec2b3f877d62f922c665715e3012e207", + "matched_output_lines": 524300 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "33a33cd612c999ab21f1acbbdee522f2ec2b3f877d62f922c665715e3012e207", + "matched_output_lines": 524300 + } + ], + "scope": "Actual CollisionContext.getCollisionShape dispatch and native scaffolding behavior for all 32 scaffolding states, nine context variants, descending flags, integer Y extremes, nonfinite positions and adjacent double values around the top/bottom float-epsilon thresholds. Full shape coordinates, extrema, box ordering and cube metadata match. A rejecting world proxy verifies selection performs no world reads. Scaffolding placement/update/falling behavior and live movement remain pending." +} diff --git a/benchmarks/rust-powder-snow-collision-2026-10-06/scoped-parity.json b/benchmarks/rust-powder-snow-collision-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..267fa9712 --- /dev/null +++ b/benchmarks/rust-powder-snow-collision-2026-10-06/scoped-parity.json @@ -0,0 +1,205 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 63336, + "block_states": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java": "b9c34e7f7a7c14001e03373cbbd468a228c5301eb639460b4ce465d14e946113", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_collision_context_parity.py": "75d6f01e072867d2bd286d2e518e123fcfe055a11ac1705ec99ecec3975cb8d2", + "tools/test_powder_snow_collision_parity.py": "ac06f4c6e62c4e95b2c0dbc9da6904e9d91c5389cb7278593f856fc44c43195d", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "a40c9d7a4e0a734c124dc856e31359fd4d8de3d1bfc79c86787afa8e8e05e480", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "f0997b21c8083de75f4f8883e8855e1d2d9f1876a2053a8a97b081deed5b0bcd", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/collision_context_fixture.rs": "b7bf0f48f7dc0129c1ebe43c11cb4cad00194b501c2bcbb3220bc8779e695ba4" + }, + "fixtures_sha256": { + ".local/rust-powder-snow-collision-parity/inputs.txt": "77bee44008a03ed3b55e5cf3d7cb640569dafd2878cc82c339d30f9c24d1420c" + }, + "rust_output_sha256": "08a59aca4df47cab9eb9bbf783291b5356ffb9887dc7b136a16e319ac7e0d358", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "08a59aca4df47cab9eb9bbf783291b5356ffb9887dc7b136a16e319ac7e0d358", + "matched_output_lines": 599180 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "08a59aca4df47cab9eb9bbf783291b5356ffb9887dc7b136a16e319ac7e0d358", + "matched_output_lines": 599180 + } + ], + "scope": "Native PowderSnowBlock contextual collision and canEntityWalkOnPowderSnow decisions with controlled entity metadata, entity-tag membership and equipment snapshots. Checks empty/position/player/nonliving/falling-block/placement contexts, fall-distance and top-height adjacent doubles, nonfinite values, descending, boot identity/count and lazy tag/equipment callbacks with injected failures. Full selected shape geometry and query traces match. Entity tag loading, entity lifecycle, freezing/sinking and live movement remain pending." +} diff --git a/benchmarks/rust-registered-entity-fluid-2026-10-07/immersion-regression.json b/benchmarks/rust-registered-entity-fluid-2026-10-07/immersion-regression.json new file mode 100644 index 000000000..ae733fd44 --- /dev/null +++ b/benchmarks/rust-registered-entity-fluid-2026-10-07/immersion-regression.json @@ -0,0 +1,236 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 7646, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityFluidOracle.java": "bf1b035389a37c9c6efcf6f30701b54b2377c1229604ea439aaf5a70afc66a0c", + "tools/test_entity_fluid_parity.py": "34d563a48f30434258cc8f836457f396ee4f1b2973a80b112bda22be1dc90bb8", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "fd004f993c35707caf1e0f7cdba87f7b615a7c16d2e0bf4b59f952d07488caa7", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/entity_fluid_fixture.rs": "9bdaccd55f57079fd7dd9ab6b9fd81ae737cb5f05642817869acd71a04fdc5bd" + }, + "fixtures_sha256": { + ".local/rust-entity-fluid-parity/inputs.txt": "e9eb2297d21b93c9c25046f240984508fa3593d14833e4f5592a623b8ed85838" + }, + "rust_output_sha256": "a675c1a446e77894680508b5160f2b8ce656ace279ad80352a122fd517efa699", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a675c1a446e77894680508b5160f2b8ce656ace279ad80352a122fd517efa699", + "matched_output_lines": 607338 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "a675c1a446e77894680508b5160f2b8ce656ace279ad80352a122fd517efa699", + "matched_output_lines": 607338 + } + ], + "scope": "Actual EntityFluidInteraction update, tracker pruning, body/eye depth, loaded-chunk preflight, overlapping/reloaded tags, ordered current accumulation and native Entity.addDeltaMovement. Controlled fluid height/flow and camera-support cells, real ProtoChunk section fluid flags, player versus nonplayer classes, callback mutations and injected failures. Live fluid flow/propagation and full entity/world integration remain pending." +} diff --git a/benchmarks/rust-registered-entity-fluid-2026-10-07/scoped-parity.json b/benchmarks/rust-registered-entity-fluid-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..0c226bfd3 --- /dev/null +++ b/benchmarks/rust-registered-entity-fluid-2026-10-07/scoped-parity.json @@ -0,0 +1,250 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 78902, + "registry_states": 35723, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegisteredEntityFluidOracle.java": "8ff418de400a73d369a351a49c7f8a6b7cfeb2fd678aae7d15b38cacb1f80b63", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityFluidOracle.java": "bf1b035389a37c9c6efcf6f30701b54b2377c1229604ea439aaf5a70afc66a0c", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryFluidOracle.java": "7d8a721941e1ca04c089fcae3dc0fbd44aeee6f91454993114afdb45379fae6c", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "tools/test_registered_entity_fluid_parity.py": "671763d2c5f1ebe7905654b162b34999bc22e37ffe6acf3200115d777a4a90ab", + "tools/test_entity_fluid_parity.py": "34d563a48f30434258cc8f836457f396ee4f1b2973a80b112bda22be1dc90bb8", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/examples/entity_fluid_fixture.rs": "9bdaccd55f57079fd7dd9ab6b9fd81ae737cb5f05642817869acd71a04fdc5bd", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "fd004f993c35707caf1e0f7cdba87f7b615a7c16d2e0bf4b59f952d07488caa7", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "fixtures_sha256": { + ".local/rust-registered-entity-fluid-parity/inputs.txt": "f7417739296dc2890ac7fbad2ed8efc3ad4f8d6d732224937b13714494a66651", + ".local/rust-registered-entity-fluid-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-registered-entity-fluid-parity/fluid-info.json": "ec4cae850110a5cdd520374f38f0c6db505bb8310b76017b623ec514db4dc002", + ".local/rust-registered-entity-fluid-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-registered-entity-fluid-parity/cached-support.nbt": "8d16793118cac5b7f6fe8532b8eee98d620641f825d6745b7cecc6de90c33664", + ".local/rust-registered-entity-fluid-parity/tags.json": "5e1301e5a9abf7e4de93af5dae3a157e852dbdb4ea345c2eb626305a605d4f98" + }, + "rust_output_sha256": "27d9674ad2adbcac96f4b55a781a347e8f3df1557e77b9d71314282f53399692", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "27d9674ad2adbcac96f4b55a781a347e8f3df1557e77b9d71314282f53399692", + "matched_output_lines": 6550126 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "27d9674ad2adbcac96f4b55a781a347e8f3df1557e77b9d71314282f53399692", + "matched_output_lines": 6550126 + } + ], + "scope": "Actual EntityFluidInteraction update and current application with registered contained fluids, native height/camera/current calculations and cached/dynamic block support. All registered states in immersed cells and above-eye support cells; mixed water/lava grids, ordered/reloaded tags, retained trackers, current velocities, callback mutations and failures. Chunk presence/section wet flags and cell storage are controlled; block entities are absent. Live chunk/entity lifecycle, fluid propagation and complete playable gameplay remain pending." +} diff --git a/benchmarks/rust-registered-entity-fluid-2026-10-07/tick-regression.json b/benchmarks/rust-registered-entity-fluid-2026-10-07/tick-regression.json new file mode 100644 index 000000000..fd5ea966c --- /dev/null +++ b/benchmarks/rust-registered-entity-fluid-2026-10-07/tick-regression.json @@ -0,0 +1,237 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 17346, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityFluidOracle.java": "bf1b035389a37c9c6efcf6f30701b54b2377c1229604ea439aaf5a70afc66a0c", + "tools/test_entity_fluid_tick_parity.py": "1417d2fabe648d97ae79f0682d2be26701039fcdc888e36a3c31af139643c142", + "tools/test_entity_fluid_parity.py": "34d563a48f30434258cc8f836457f396ee4f1b2973a80b112bda22be1dc90bb8", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "fd004f993c35707caf1e0f7cdba87f7b615a7c16d2e0bf4b59f952d07488caa7", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/entity_fluid_fixture.rs": "9bdaccd55f57079fd7dd9ab6b9fd81ae737cb5f05642817869acd71a04fdc5bd" + }, + "fixtures_sha256": { + ".local/rust-entity-fluid-tick-parity/inputs.txt": "0d587117237b039d0606d563a75ee23be3099612345dc893b398275d911c0349" + }, + "rust_output_sha256": "f38ab02725a0187c58fceeddb51751b0c2a91f678def80e8b4384aabe91e1ee9", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "f38ab02725a0187c58fceeddb51751b0c2a91f678def80e8b4384aabe91e1ee9", + "matched_output_lines": 953830 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "f38ab02725a0187c58fceeddb51751b0c2a91f678def80e8b4384aabe91e1ee9", + "matched_output_lines": 953830 + } + ], + "scope": "Actual Entity.updateFluidInteraction composing EntityFluidInteraction update and current application. Compares both push predicate calls, water-entry fall reset and splash dispatch, retained touching-water state, first tick, water/lava current coefficients and FAST_LAVA dimension attribute selection. Includes ordered/reloaded tags, controlled cell heights/flows, player/nonplayer classes, mutations and failures before/after partial writes. Splash audio/particles and full live world/entity gameplay binding remain pending." +} diff --git a/benchmarks/rust-registered-player-combat-2026-10-07/scoped-parity.json b/benchmarks/rust-registered-player-combat-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..0d747b10c --- /dev/null +++ b/benchmarks/rust-registered-player-combat-2026-10-07/scoped-parity.json @@ -0,0 +1,270 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 9097, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegisteredPlayerCombatOracle.java": "3411a6ffdb1126e8650231e727aea6710d40ac160d6589d68d78b8a54636ef42", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerHealthOracle.java": "5d6dc93c0140e2b2f953fba7290721079d5a607fa81b051e2ac1e4742ab606f2", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageSourceOracle.java": "0cf0126d69d1052dea74a6bfb5a97250ab69d8f7a95360d9c6399fe03376dcd2", + "tools/test_server_player_combat_parity.py": "79e74d60c3f4a9534c28642a6907271739f084ebb15b53009a747065733025bf", + "tools/test_registered_player_combat_parity.py": "9203869ccde846aa4c0caadedf519dc6a29c20dae403c922d45531803d2abc30", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_player_hurt_parity.py": "3164b8644664fcd46903e801ea70d1bb866e07e7112dc94570161831644bc84d", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "d659328576264bc7a454d4520dfba50664cdc86a617707b7caba0396965c1d97", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/registered_player_combat_fixture.rs": "7cde48fad3d4c26ab045127bdbaa6682b6c3156955588b30d350f36223d4d78f" + }, + "fixtures_sha256": { + ".local/rust-registered-player-combat-parity/inputs.txt": "f267227ed7120264697470d8ce9908c2b8dd5bfe5b354a8176c17deeb678f6b3", + ".local/rust-registered-player-combat-parity/catalog.json": "d1e488e4f432888beb9f643904c8bca242d1e2093f53e23e07da305d70cf7106", + ".local/rust-registered-player-combat-parity/ids.json": "f7d6037166d966e2714b01cff5626f0cc0a02ce883885ec791c93e977afde0e6", + ".local/rust-registered-player-combat-parity/slots.json": "29101ebf1ead685029508789eee51c4d4fff65524064d8e32a48efded7036982", + ".local/rust-registered-player-combat-parity/head.json": "ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d", + ".local/rust-registered-player-combat-parity/damage/catalog.json": "1c40ea4dc7430aa7ad737258a320ef35e72df977370d1a228bc2876d69289598", + ".local/rust-registered-player-combat-parity/damage/types.json": "ec99090df073d7fdad34de5c8930f9e09e25a04b432bb890120fedefb7bea30f", + ".local/rust-registered-player-combat-parity/damage/tags.json": "df5da1c56b40691bac096e0e8c98a77063b6f056a5f53e75068e5fef89595af8" + }, + "rust_output_sha256": "a0a044f256685a9db4da3fdb7041891d631748a4dd1a4dc18bc3e3149a6de2a3", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a0a044f256685a9db4da3fdb7041891d631748a4dd1a4dc18bc3e3149a6de2a3", + "matched_output_lines": 1431711 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "a0a044f256685a9db4da3fdb7041891d631748a4dd1a4dc18bc3e3149a6de2a3", + "matched_output_lines": 1431711 + } + ], + "scope": "All 51 bundled registered damage types and 36 native-resolved tags drive the actual ServerPlayer damage chain, immunity, difficulty scaling, armor/resistance, exhaustion, health/absorption and hurt state. Direct/causing entity identity and creative-source abilities use real DamageSource methods. Equipment is unenchanted; virtual flags/rule values, blocking amount, durability, PvP permission, attribution/effect/knockback/death services and empty criterion listeners are controlled. No full entity lifecycle, enchantments, death messages or playable integration claim." +} diff --git a/benchmarks/rust-registry-fall-ray-2026-10-07/scoped-parity.json b/benchmarks/rust-registry-fall-ray-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..904c3fb29 --- /dev/null +++ b/benchmarks/rust-registry-fall-ray-2026-10-07/scoped-parity.json @@ -0,0 +1,235 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 120297, + "registry_states": 35723, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryFallRayOracle.java": "029e91ed2e9b293dd8634071cb72ce2496bf9c43e136575a19310a6407d70f65", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInteractionShapeOracle.java": "8f55d6fb9152decf0c76dc417ce6b5b10ac4bdfc3d00aeee514c7b8f967fb1f1", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_registry_fall_ray_parity.py": "3cc30b5039da8a72b301dee9d45eb510f43df64fc614d8ca0cba81be21ae5a1c", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/examples/registry_fall_ray_fixture.rs": "52336bdb6ea2ead412cae1bcaf5035c6002112d582474bc4f0402a2486772f3e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "a211900291762261c224b8197b81f573375a7ca67f2cd41fb32ae6a45e05599f", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "fixtures_sha256": { + ".local/rust-registry-fall-ray-parity/inputs.txt": "3486ba60b5e2774dada5dbea681fb7ca47e1d34b7fbcedfeafd16f3d3abdd8c1", + ".local/rust-registry-fall-ray-parity/info.json": "e0cd14358b3d79a84cac9dda2f5baf4988a4cf9047ea16c941867b4dbcf4e93c", + ".local/rust-registry-fall-ray-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-registry-fall-ray-parity/interaction-shapes.nbt": "2cd47ffc580026355ee763ab6fca6bda8dc131cdabeab763113aeb33c61f161e", + ".local/rust-registry-fall-ray-parity/tags.json": "5e1301e5a9abf7e4de93af5dae3a157e852dbdb4ea345c2eb626305a605d4f98", + ".local/rust-registry-fall-ray-parity/fluid-tags.json": "1b543d69635937491aacb39096bf76959e11029076b8217c25fcadd480686440", + ".local/rust-registry-fall-ray-parity/bound-tags.json": "44b31f637645d96d133f72ce54b33c685274533e051b37cee2e550203205848f" + }, + "rust_output_sha256": "6d5351cc317f27187e058cbcd1fe62949c13c89fa3832bbacaa85d026a21fbbb", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "6d5351cc317f27187e058cbcd1fe62949c13c89fa3832bbacaa85d026a21fbbb", + "matched_output_lines": 3024623 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "6d5351cc317f27187e058cbcd1fe62949c13c89fa3832bbacaa85d026a21fbbb", + "matched_output_lines": 3024623 + } + ], + "scope": "Actual BlockGetter.clip with registered block/interaction/fluid shapes, FALLDAMAGE_RESETTING/WATER context and native tag reloads. Every block state runs natural, empty and universal reset tags; additional fluid tag modes, entity/player/server distinctions, portal delays, multiple ray positions, above-fluid changes, cache reuse and failures compare complete traces/results. Binding rejects unknown tag members and invalid block IDs. World block/fluid reads use controlled snapshots; live resident-world binding, actual player storage, movement integration and complete gameplay remain pending." +} diff --git a/benchmarks/rust-registry-fluid-2026-10-07/scoped-parity.json b/benchmarks/rust-registry-fluid-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..fc4866047 --- /dev/null +++ b/benchmarks/rust-registry-fluid-2026-10-07/scoped-parity.json @@ -0,0 +1,246 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 409389, + "registry_states": 35723, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryFluidOracle.java": "7d8a721941e1ca04c089fcae3dc0fbd44aeee6f91454993114afdb45379fae6c", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "tools/test_registry_fluid_parity.py": "84b6cd2be73e7c751bacb25fdeeb9434316fb24fe6140ef2ff7e2da5ccf91b35", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/examples/registry_fluid_fixture.rs": "86741f2641c2ce3972484fa9790cd44e23c6a77f82200a1ef8204efbc3f7ec66", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "7cf1dda619bbb6781ca812a98c9e667fd2aa3fd95a97ef45beba7e45f9834576", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "2d88983b56513e9b70bc79ef0b9743f5d2250c6e1dd954cc6fb7ea89c601e023", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "fixtures_sha256": { + ".local/rust-registry_fluid-parity/inputs.txt": "6d67e0679b4e9cee9a999c418f9c05792346605a8faea97e6ae3d15dec31a0d6", + ".local/rust-registry_fluid-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-registry_fluid-parity/fluid-info.json": "ec4cae850110a5cdd520374f38f0c6db505bb8310b76017b623ec514db4dc002", + ".local/rust-registry_fluid-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-registry_fluid-parity/cached-support.nbt": "8d16793118cac5b7f6fe8532b8eee98d620641f825d6745b7cecc6de90c33664", + ".local/rust-registry_fluid-parity/tags.json": "5e1301e5a9abf7e4de93af5dae3a157e852dbdb4ea345c2eb626305a605d4f98" + }, + "rust_output_sha256": "a8f20ee7b162e7b2cc81d70d0428647739d99049aa853610cb94875e517858c0", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "a8f20ee7b162e7b2cc81d70d0428647739d99049aa853610cb94875e517858c0", + "matched_output_lines": 2446969 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "a8f20ee7b162e7b2cc81d70d0428647739d99049aa853610cb94875e517858c0", + "matched_output_lines": 2446969 + } + ], + "scope": "Actual registered fluid height/camera-height/current vectors and solid-face selection using all native block states, BLOCKS_FLUID_FLOW tags and IceBlock class identities. Rust composes registered contained fluids with cached/dynamic block support, preserving world query order, directional walls, waterlogged contents, coordinate wrapping and failures. Block storage is controlled and block entities are absent; live entity/world binding, active block-entity lifecycle, fluid spreading and complete gameplay remain pending." +} diff --git a/benchmarks/rust-replace-blobs-2026-10-06/scoped-parity.json b/benchmarks/rust-replace-blobs-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..1a1520072 --- /dev/null +++ b/benchmarks/rust-replace-blobs-2026-10-06/scoped-parity.json @@ -0,0 +1,213 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 109003, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "1d4616f80e625ad1266aaa94d7c72770944d838cc06a085d6726e1ee812133cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "e871d3a01f15616a98ca9227c27a81e4d17e2d57ac4e68a5650a70fa29811497", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_replace_blobs_parity.py": "c91498d8cd779a77c00e90d9823f31b6a8c2d238193945554478b6494b003928", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "5ce5c6eaa5f8a2557a620e533788217b1eb430654801dcf6135d6c92d7a012ac", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "df9b813552cb39d4eb2480be3828d9909d5aeb50425d81012b3a29624ec88060", + "crates/horizon-world/src/worldgen/feature_region.rs": "79e8ce343b0dc80dceb8b214c818b383d9b110540bb8c3b0ac32863a7800e288", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "dc3f07719dac53c5ceab6635598c010ccc93db0b149970894407bf9b713946e7", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "5afb4a779143b571ba696f027b981c05f4bbd4646639c5616b0ecadf23d9f968", + "crates/horizon-world/examples/simple_block_fixture.rs": "517b0fb43755555e276b2cdb976cf0b7ae1adc6499bce84f3c9c7f51a0456949" + }, + "fixtures_sha256": { + ".local/rust-replace-blobs-parity/inputs.txt": "fcc765b831f7619cdcae2135e788d189d7aa5d018a0fec8028a32ac126b43c46", + ".local/rust-replace-blobs-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-replace-blobs-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-replace-blobs-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-replace-blobs-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-replace-blobs-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-replace-blobs-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-replace-blobs-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-replace-blobs-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-replace-blobs-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-replace-blobs-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-replace-blobs-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-replace-blobs-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-replace-blobs-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-replace-blobs-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-replace-blobs-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-replace-blobs-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "e386dd4e54b54132bc4023673056b1deb8172d00ee3e15b8af6384311bd011b6", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "e386dd4e54b54132bc4023673056b1deb8172d00ee3e15b8af6384311bd011b6", + "matched_output_lines": 5538034 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e386dd4e54b54132bc4023673056b1deb8172d00ee3e15b8af6384311bd011b6", + "matched_output_lines": 5538034 + } + ], + "scope": "Native ReplaceBlobsFeature under its netherrack_replace_blobs registry key: target block identity, required replacement state and radius provider bounded 0..12, build-height clamp, descending target search, three radius draws, clipped Manhattan shells in native depth/X/Y/positive-Z/mirrored-Z order, flags 3 and success after rejected writes. Every configured target and output state has a radius-zero run; all candidate states have failure-terminated prefixes. Full radius/provider runs cover both RNGs, boundaries, wrapped X/Z, repeated mutations, query failures and composition. Pathological descent is bounded to 2^20 visits. World updates and full generation remain pending." +} diff --git a/benchmarks/rust-replace-block-2026-10-06/scoped-parity.json b/benchmarks/rust-replace-block-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..e803da170 --- /dev/null +++ b/benchmarks/rust-replace-block-2026-10-06/scoped-parity.json @@ -0,0 +1,161 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 14840, + "block_states": 35723, + "integer_properties": 146, + "requested_placements": 44520, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaReplaceBlockOracle.java": "12de4d544e91d7e470fe225389ea8901a9590b89e9a16a1fb3bfc762584cd847", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_replace_block_parity.py": "7c670b047595bf2753a5e362f1c360d58944e2610e8598e4cea22d1ad2c7738b", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "23b2a335505bebfa512f2fee699cf0bf69f65b59ddf22add616fc5a3fcf5432c", + "crates/horizon-world/src/worldgen/block_predicate.rs": "dd8cbda2ec110444950f0b31bf4e088897eab0994674a91568c7b063f8f16210", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "2297b194514925688dba25016a69d5ba5eb8b869bdfff28f2e611a6742ac5954", + "crates/horizon-world/src/worldgen/feature_region.rs": "4a95a30c0987d97e671f84380e13ddea070ad81f996baa65b2a06c4d892971c7", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "1b976aa4dd2516468196d0af3451e3fdd037493a14d269f54ebdd7254055e05e", + "crates/horizon-world/src/worldgen/placement/context.rs": "b36dfd9297896e62770f2085cf934fc08ebd4c030ecc7ae17d864e819a113201", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "68ecf36954fea5705436d486e9be93836933fd56779022afeb881a0399d6a674", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "3ffc2db40a9c2d0ecc2d8de68f9d853c2d11320709139a203d4b3f5f9023fb0a", + "crates/horizon-world/examples/replace_block_fixture.rs": "15a088eb29f4efbe9ec1f872cea0f108cea080424d984516db6f3858217319f6" + }, + "fixtures_sha256": { + ".local/rust-replace-block-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-replace-block-parity/facts-client.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-replace-block-parity/facts-server.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-replace-block-parity/inputs.txt": "cc29f71f4afaa654bcea09f182cfcd3d04bbc64acc5e965e3082e8bfb1e5e132" + }, + "rust_output_sha256": "86fe7a04e08d0f2690843a8dab63cfb27be2fc491e1eb3c7fa053a1d2c05904d", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "86fe7a04e08d0f2690843a8dab63cfb27be2fc491e1eb3c7fa053a1d2c05904d", + "matched_output_lines": 303678 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "86fe7a04e08d0f2690843a8dab63cfb27be2fc491e1eb3c7fa053a1d2c05904d", + "matched_output_lines": 303678 + } + ], + "scope": "Actual replace_single_block feature codecs and native ReplaceBlockFeature.place. Ordered target rules re-read the origin state, short-circuit on the first match, preserve random draw order and write flags, ignore rejected writes, retain partial mutations and stop on injected read/write failures. Bound block/tag/state/height/random/logical targets and malformed unselected entries are compared across both random modes and repeated calls. Full region side effects, structure processors, ore clusters and complete gameplay remain pending." +} diff --git a/benchmarks/rust-resident-collision-scan-2026-10-06/scoped-parity.json b/benchmarks/rust-resident-collision-scan-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..99c2af3eb --- /dev/null +++ b/benchmarks/rust-resident-collision-scan-2026-10-06/scoped-parity.json @@ -0,0 +1,227 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "registry_states": 35723, + "block_definitions": 1286, + "definition_counts": { + "tagged_full": 1221, + "never": 42, + "closed_shulker": 17, + "always": 4, + "not_extended": 2 + }, + "native_chunk_storage": "ProtoChunk", + "rust_chunk_storage": "TerrainChunk", + "fixtures": 91254, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "d6f6016cf0e2ab378303dc09496dc94aefd3b74e30384e585c05f5c03bddfe17", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_registry_collision_scan_parity.py": "50983b0502efac97a619eec2732cd2a3ba25e53a0bfc469c924108a95e30a93b", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/examples/registry_collision_scan_fixture.rs": "b8d5b9693d8ffd9e2ce8d0065d931113c4da3df6c10d4cff4c281e85c923fb15", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "2c95e78b7dba5128b831bc16a7eb75317148f21bd135c757b883c149d6349f16", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "c5026e43c735599d9e761510cba690db3546570092f3446e6a250f6a65db629a", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "fixtures_sha256": { + ".local/rust-registry-collision-scan-parity/inputs.txt": "ce49ec76735a25422fda271743a1651961242092f14b1e92ee3c6e5d6af6a410", + ".local/rust-registry-collision-scan-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-registry-collision-scan-parity/definitions.json": "9cac3c650353104db1648050621057bfe104dec1f44b53d0b7875f7bc20e6eec", + ".local/rust-registry-collision-scan-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-registry-collision-scan-parity/cached-collision.nbt": "4a274cd720a1bda585b02f50f16e90246576679e1e173c214548c5cbf607ab2d", + ".local/rust-registry-collision-scan-parity/tags.json": "5e1301e5a9abf7e4de93af5dae3a157e852dbdb4ea345c2eb626305a605d4f98" + }, + "rust_output_sha256": "380675ae1ae8e6b159782b9db2bc1e1900e531a6a1ef6e882e742b1e85552d39", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "380675ae1ae8e6b159782b9db2bc1e1900e531a6a1ef6e882e742b1e85552d39", + "matched_output_lines": 3046929 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "380675ae1ae8e6b159782b9db2bc1e1900e531a6a1ef6e882e742b1e85552d39", + "matched_output_lines": 3046929 + } + ], + "scope": "Native BlockCollisions over actual registered block behavior and resident ProtoChunk sections compared with RegistryCollisionWorld, contextual dispatch and TerrainChunk storage. All states cover ordinary and suffocating-only selection. Context variants include empty, always-fluid, position and placement; dynamic and representative partial shapes cover positive/negative chunk boundaries. Shulker cases distinguish chunk-local suffocation entities from global collision entities, with ordered failure injection. Seeded scenes cover resident/missing chunks, build-height edges, block replacements and early consumer termination. This validates registry/storage integration for these snapshots, not chunk loading, entity lifecycle, experimental minecarts or gameplay movement." +} diff --git a/benchmarks/rust-resource-number-scanner-2026-10-06/model-baking.json b/benchmarks/rust-resource-number-scanner-2026-10-06/model-baking.json new file mode 100644 index 000000000..5e774bb2c --- /dev/null +++ b/benchmarks/rust-resource-number-scanner-2026-10-06/model-baking.json @@ -0,0 +1,47 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "resource_models": 2883, + "graph_fixtures": 440, + "rejected_roots": 1039, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaModelBakingOracle.java": "fca267347a21149791a3260826be98df55705208c30396277ef6c3feba875748", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_cuboid_model_parity.py": "4a8b1cdcac335751c23413341ae939eea1c49c38d33d70d0708b8904ab8d0461", + "tools/test_model_resolution_parity.py": "d9595f2f1442f1f590b72d2a46600657e79ae103bec3d4c45db98242b964bde0", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "fed441cad861a44e9919087307cdb9b3d8165fe36ae05ab03f72dde23758cbd5", + "crates/horizon-assets/Cargo.toml": "fadb78cf819e026500606c45d27138ed67fcbbc967ae8cee6c1e7c82c9046b36", + "crates/horizon-assets/examples/cuboid_model_fixture.rs": "97609d90e3f6ce340f3590296db2dc778113bb2b33c7d1b54080a1d6f3023f40", + "crates/horizon-assets/examples/model_baking_fixture.rs": "59caca09dd5afd0b70a2e8fdb8e949deb9322f00adc617918b33d1e7e5b0b522", + "crates/horizon-assets/examples/model_resolution_fixture.rs": "c071067140299e49345a6ebd94e15b3b6d853cb9ae11d8de46e3cbdfb8b01f0e", + "crates/horizon-assets/examples/sprite_animation_fixture.rs": "254314d52deda129ab461221d3d8b95323a60730d374e566c1cd599fba85f072", + "crates/horizon-assets/examples/support/mod.rs": "bcf5a6d8a54845982191e037911c24139237771d6afa4b01b1e83c011489c3f5", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake.rs": "0bc519e93ad8200d89543ceb5c811dd82bbeb0e9003b143385c8a03e758dfe65", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "92482e4ff4ca46ff5c11a9618ed5007e205762be6390d91648f95068510f0390", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541" + }, + "fixtures_sha256": { + ".local/rust-model-baking-parity/inputs.jsonl": "aba24d38f4fc1af060502f983923c2f279c016d0fd412d40f6d50093fac1d811" + }, + "rust_output_sha256": "9216be3bbae9e59bb89b6ed780ccedc5608cd4583c8e7527e50b165a0d8d30da", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "9216be3bbae9e59bb89b6ed780ccedc5608cd4583c8e7527e50b165a0d8d30da", + "matched_output_lines": 7100 + } + ], + "scope": "Actual client FaceBakery geometry overload with a real unit-atlas sprite and default JOML math options. Identity blockstate transform, all bundled cuboid geometry and synthetic rotations, rescaling, default/explicit UVs, winding, degenerate and reversed bounds, inherited models and missing materials. Positions, UVs and element matrix coefficients compare by float bits. This does not cover blockstate transforms/UV lock, atlas packing, transparency classification, lighting, GPU rendering or gameplay." +} diff --git a/benchmarks/rust-resource-number-scanner-2026-10-06/model-decoding.json b/benchmarks/rust-resource-number-scanner-2026-10-06/model-decoding.json new file mode 100644 index 000000000..33b99b897 --- /dev/null +++ b/benchmarks/rust-resource-number-scanner-2026-10-06/model-decoding.json @@ -0,0 +1,44 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "resource_models": 2883, + "synthetic_models": 2457, + "rejected_models": 1071, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "tools/test_cuboid_model_parity.py": "4a8b1cdcac335751c23413341ae939eea1c49c38d33d70d0708b8904ab8d0461", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "fed441cad861a44e9919087307cdb9b3d8165fe36ae05ab03f72dde23758cbd5", + "crates/horizon-assets/Cargo.toml": "fadb78cf819e026500606c45d27138ed67fcbbc967ae8cee6c1e7c82c9046b36", + "crates/horizon-assets/examples/cuboid_model_fixture.rs": "97609d90e3f6ce340f3590296db2dc778113bb2b33c7d1b54080a1d6f3023f40", + "crates/horizon-assets/examples/model_baking_fixture.rs": "59caca09dd5afd0b70a2e8fdb8e949deb9322f00adc617918b33d1e7e5b0b522", + "crates/horizon-assets/examples/model_resolution_fixture.rs": "c071067140299e49345a6ebd94e15b3b6d853cb9ae11d8de46e3cbdfb8b01f0e", + "crates/horizon-assets/examples/sprite_animation_fixture.rs": "254314d52deda129ab461221d3d8b95323a60730d374e566c1cd599fba85f072", + "crates/horizon-assets/examples/support/mod.rs": "bcf5a6d8a54845982191e037911c24139237771d6afa4b01b1e83c011489c3f5", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake.rs": "0bc519e93ad8200d89543ceb5c811dd82bbeb0e9003b143385c8a03e758dfe65", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "92482e4ff4ca46ff5c11a9618ed5007e205762be6390d91648f95068510f0390", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541" + }, + "fixtures_sha256": { + ".local/rust-cuboid-model-parity/inputs.jsonl": "0b22593eb0dfe0cf3a5fcb01747a6c845319d1f7001234767b45d2d988d7fc67" + }, + "rust_output_sha256": "c60acdc2d44b2385ff2f9e81c60c2cd335357e920d316adedd6119315cb1e151", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "c60acdc2d44b2385ff2f9e81c60c2cd335357e920d316adedd6119315cb1e151", + "matched_output_lines": 5340 + } + ], + "scope": "Actual pinned CuboidModel.fromStream parser compared over every bundled block model and synthetic JSON/numeric/syntax cases. Decoded geometry, texture materials/references, nullable children, inheritance markers, face quadrants, light emission and display transforms; floats compare by IEEE-754 bits. Rejections normalize exception text. This client-only API is absent from the server. Does not yet validate parent resolution, rotation matrices, quad baking, blockstate dispatch, rendered pixels or gameplay." +} diff --git a/benchmarks/rust-resource-number-scanner-2026-10-06/model-resolution.json b/benchmarks/rust-resource-number-scanner-2026-10-06/model-resolution.json new file mode 100644 index 000000000..b479e27f7 --- /dev/null +++ b/benchmarks/rust-resource-number-scanner-2026-10-06/model-resolution.json @@ -0,0 +1,46 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "resource_models": 2883, + "graph_fixtures": 439, + "rejected_cyclic_roots": 702, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaModelResolutionOracle.java": "bd6581d68c69a96586d158ede8be4f3270d0d7a16288ca82dddab16785685b26", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "tools/test_model_resolution_parity.py": "d9595f2f1442f1f590b72d2a46600657e79ae103bec3d4c45db98242b964bde0", + "tools/test_cuboid_model_parity.py": "4a8b1cdcac335751c23413341ae939eea1c49c38d33d70d0708b8904ab8d0461", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "fed441cad861a44e9919087307cdb9b3d8165fe36ae05ab03f72dde23758cbd5", + "crates/horizon-assets/Cargo.toml": "fadb78cf819e026500606c45d27138ed67fcbbc967ae8cee6c1e7c82c9046b36", + "crates/horizon-assets/examples/cuboid_model_fixture.rs": "97609d90e3f6ce340f3590296db2dc778113bb2b33c7d1b54080a1d6f3023f40", + "crates/horizon-assets/examples/model_baking_fixture.rs": "59caca09dd5afd0b70a2e8fdb8e949deb9322f00adc617918b33d1e7e5b0b522", + "crates/horizon-assets/examples/model_resolution_fixture.rs": "c071067140299e49345a6ebd94e15b3b6d853cb9ae11d8de46e3cbdfb8b01f0e", + "crates/horizon-assets/examples/sprite_animation_fixture.rs": "254314d52deda129ab461221d3d8b95323a60730d374e566c1cd599fba85f072", + "crates/horizon-assets/examples/support/mod.rs": "bcf5a6d8a54845982191e037911c24139237771d6afa4b01b1e83c011489c3f5", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake.rs": "0bc519e93ad8200d89543ceb5c811dd82bbeb0e9003b143385c8a03e758dfe65", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "92482e4ff4ca46ff5c11a9618ed5007e205762be6390d91648f95068510f0390", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541" + }, + "fixtures_sha256": { + ".local/rust-model-resolution-parity/inputs.jsonl": "9b3f9cb64bdb84303a3393ab035a00c11e857a5140e2992c0c5ebac0da2d3744" + }, + "rust_output_sha256": "146858eb5c73a16d71bf255bbd21f6082f330df5b322f10a288b4149b2cc98a4", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "146858eb5c73a16d71bf255bbd21f6082f330df5b322f10a288b4149b2cc98a4", + "matched_output_lines": 5648 + } + ], + "scope": "Actual ModelDiscovery and ResolvedModel/TextureSlots APIs over all bundled block models plus synthetic parent/alias graphs. Compares inherited geometry, AO/gui defaults, per-context display transforms, resolved materials, missing-model fallback, ignored built-in override, cyclic parent rejection, long alias/parent chains and slot lookup. Native rejection text/logging and discovery map iteration order are not compared. Geometry is shared through Arc in Rust; this does not prove quad baking, blockstate dispatch, pixels or gameplay." +} diff --git a/benchmarks/rust-resource-number-scanner-2026-10-06/sprite-animation.json b/benchmarks/rust-resource-number-scanner-2026-10-06/sprite-animation.json new file mode 100644 index 000000000..331ab541b --- /dev/null +++ b/benchmarks/rust-resource-number-scanner-2026-10-06/sprite-animation.json @@ -0,0 +1,48 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "resource_animations": 63, + "native_tick_states": 258996, + "fixtures": 907, + "rejected": 203, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSpriteAnimationOracle.java": "90b291abb0b76620f9ca719162393d4fe305ecfb9388d4675d3df89ac1ba136b", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "tools/test_sprite_animation_parity.py": "ea5961ff5e7770eeec6e91a916fedd3ec72dbf05e87cbeb8a8d2429440407d48", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_cuboid_model_parity.py": "4a8b1cdcac335751c23413341ae939eea1c49c38d33d70d0708b8904ab8d0461", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "fed441cad861a44e9919087307cdb9b3d8165fe36ae05ab03f72dde23758cbd5", + "crates/horizon-assets/Cargo.toml": "fadb78cf819e026500606c45d27138ed67fcbbc967ae8cee6c1e7c82c9046b36", + "crates/horizon-assets/examples/cuboid_model_fixture.rs": "97609d90e3f6ce340f3590296db2dc778113bb2b33c7d1b54080a1d6f3023f40", + "crates/horizon-assets/examples/model_baking_fixture.rs": "59caca09dd5afd0b70a2e8fdb8e949deb9322f00adc617918b33d1e7e5b0b522", + "crates/horizon-assets/examples/model_resolution_fixture.rs": "c071067140299e49345a6ebd94e15b3b6d853cb9ae11d8de46e3cbdfb8b01f0e", + "crates/horizon-assets/examples/sprite_animation_fixture.rs": "254314d52deda129ab461221d3d8b95323a60730d374e566c1cd599fba85f072", + "crates/horizon-assets/examples/support/mod.rs": "bcf5a6d8a54845982191e037911c24139237771d6afa4b01b1e83c011489c3f5", + "crates/horizon-assets/src/animation.rs": "ebbf7952146a0e66b41396174492f5702627170b03a57e6cd5a45c97a08c975e", + "crates/horizon-assets/src/bake.rs": "0bc519e93ad8200d89543ceb5c811dd82bbeb0e9003b143385c8a03e758dfe65", + "crates/horizon-assets/src/json.rs": "99fe8af4fbf5d4eed408a92e829ac1a39597a0d92471a6bff73771fad9c830a8", + "crates/horizon-assets/src/lib.rs": "92482e4ff4ca46ff5c11a9618ed5007e205762be6390d91648f95068510f0390", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541" + }, + "fixtures_sha256": { + ".local/rust-sprite-animation-parity/inputs.jsonl": "72ccfab50067a4e578c5ce498e395abfdc55df65c487cea758c1e723cabf4da7" + }, + "rust_output_sha256": "842c6693d75234d93b5623be5f55c2fbe739e94b3ec32241b96c81cd6d81317e", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "842c6693d75234d93b5623be5f55c2fbe739e94b3ec32241b96c81cd6d81317e", + "matched_output_lines": 907 + } + ], + "scope": "Actual AnimationMetadataSection JsonOps codec, frame-size calculation, SpriteContents sequence construction and AnimationState ticks. All bundled animated texture metadata plus synthetic numeric, null, invalid, repeated and out-of-image frame cases. Valid image grids only for SpriteContents construction. No resource-loader fallback, image decoding, GPU interpolation pixels, atlas packing or gameplay parity claim." +} diff --git a/benchmarks/rust-restitution-2026-10-07/scoped-parity.json b/benchmarks/rust-restitution-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..26667829b --- /dev/null +++ b/benchmarks/rust-restitution-2026-10-07/scoped-parity.json @@ -0,0 +1,209 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 19784, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRestitutionOracle.java": "7e63393bf0590fc7b1b2ec6c3e4afa8f3a84b555e25744ac94705fcb67be85d0", + "tools/test_restitution_parity.py": "db7090350723ac66ae9ec0bf106dff3e7a8961fcda2bf2132c71eb9e35d7ae7b", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "f2c399b48e8489cf1d9c659e6855967778e3b2e23b05c94b7e33c3e22c1912ec", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "8ac9e90fe899855036658afd862ff20c4dcd15d1bd3f92a763c4795fecf0549f", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/restitution_fixture.rs": "1c970701dc434155f8c830626ef5ad4cc9ac20330ceb2c91c3e351215b8dedf3" + }, + "fixtures_sha256": { + ".local/rust-restitution-parity/inputs.txt": "c123b46f42604e661c867d1ecf22f3ce1d84b19cb79dd11869aa7d92e6bba9a7" + }, + "rust_output_sha256": "94ab544d2c4c0a2644907521b96b913eeed376863b26912dda56755b48255cb5", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "94ab544d2c4c0a2644907521b96b913eeed376863b26912dda56755b48255cb5", + "matched_output_lines": 177090 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "94ab544d2c4c0a2644907521b96b913eeed376863b26912dda56755b48255cb5", + "matched_output_lines": 177090 + } + ], + "scope": "Actual Entity.restituteMovementAfterCollisions over living/nonliving snapshots and controlled block restitution/tag behavior. Compares horizontal/vertical bounce, effective-gravity threshold, nonliving float scaling, air-drag interpolation, signed zero/nonfinite values and ordered lazy queries. Bounce callbacks can change velocity and fail; final velocity and syncPosition are checked after every injected failure boundary. This does not establish registered block restitution/tag provisioning, actual bounce sound/game-event effects, Entity.move guard conditions, fall damage, grounding or full gameplay." +} diff --git a/benchmarks/rust-retained-upgrade-status-2026-10-06/scoped-parity.json b/benchmarks/rust-retained-upgrade-status-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..24a3c7ef5 --- /dev/null +++ b/benchmarks/rust-retained-upgrade-status-2026-10-06/scoped-parity.json @@ -0,0 +1,214 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "block_tag_files": 300, + "fixtures": 138, + "operation_counts": { + "stage": 916, + "prime": 40, + "fill": 84, + "dump": 324, + "upgrade": 300, + "upgrade_info": 1082, + "replace_bedrock": 164, + "mask": 244 + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkStageOracle.java": "51ae4a6682be6301d0bb7d0a2caba6e5a214f2bcc4d84d767b93ded1e3a2e9bf", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_retrogen_chunk_parity.py": "800e0fd0e9d4bdad0c52f0a7c9cecbbf05398dacadff789b7781eb992b0199d1", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "4f803d21656a1420555bee6369617ddc825219a2cf05f842a209b3f8eaa583ec", + "Cargo.lock": "b1674833e1d5e66032589eea75643bf1c1eb2f2d6503e79ff7da8efa1b6d21dc", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "2995b209aa3dc24cfcbba405cf8b97a398efbc0de97bb04ef2f51abb4cd2b84c", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "516c2a1841583acf1f9aef161dee3d59c68dfda9b9f2a7c936be9823abbdbb77", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/chunk_stage_fixture.rs": "6817bb3800d3752962fbc28951b938770fb6086d410ccdd488e7c7adf55170f9" + }, + "fixtures_sha256": { + ".local/rust-retrogen-chunk-parity/inputs.txt": "8d997d6967e791b0f804f003c6d16a991904f54094abeca8db4f9315aa3c3160", + ".local/rust-retrogen-chunk-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-retrogen-chunk-parity/facts-client.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0", + ".local/rust-retrogen-chunk-parity/facts-server.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0" + }, + "rust_output_sha256": "6012a86e482f4ce50e62403dbc37cf1d8b98dea4e9c10661c29532a55af4cb68", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "6012a86e482f4ce50e62403dbc37cf1d8b98dea4e9c10661c29532a55af4cb68", + "matched_output_lines": 3028057 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "6012a86e482f4ce50e62403dbc37cf1d8b98dea4e9c10661c29532a55af4cb68", + "matched_output_lines": 3028057 + } + ], + "scope": "Native ProtoChunk below-zero metadata installation/removal, pre-light persisted-stage assignments and target completion cleanup, normal/upgrading generation heights, highest-generated status from retained targets versus current persisted stages, actual BelowZeroRetrogen.replaceOldBedrock and applyBedrockMask. Mixed resident states, legacy five-layer bedrock bands, signed/chunk-relative coordinates, partial vertical overlap, masks with empty/single/sparse/all/out-of-footprint bits, repeated operations, preprimed/stale/missing heightmaps, and clearing under changed generation bounds are compared. Complete raw sections and selected packed heightmaps are checked after each mutation phase. All nine nonempty targets are paired with all six pre-light stages, including installation after an already-advanced status, repeated assignments, backward transitions and explicit removal. Data codecs have a separate comparison. Save-dirty notifications, post-light stages, structure restrictions, biome retention, automatic generation scheduling and complete world/gameplay parity remain outside this comparison." +} diff --git a/benchmarks/rust-retrogen-biome-fill-2026-10-06/scoped-parity.json b/benchmarks/rust-retrogen-biome-fill-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..ba4a85c93 --- /dev/null +++ b/benchmarks/rust-retrogen-biome-fill-2026-10-06/scoped-parity.json @@ -0,0 +1,202 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 40, + "fills": 740, + "block_queries": 24020, + "retrogen_fills": 560, + "resolver_queries": 2800, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeChunkOracle.java": "7fc0ed0e73178509939630ccb04b6b6737ebd1caf6bd16b4d9436dd9e5265bdf", + "tools/test_biome_chunk_parity.py": "d0bbfa5a165f0e2eaabe9b825101a873d7934b2756fa4821b03afbafce3b4b3d", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "4f803d21656a1420555bee6369617ddc825219a2cf05f842a209b3f8eaa583ec", + "Cargo.lock": "b1674833e1d5e66032589eea75643bf1c1eb2f2d6503e79ff7da8efa1b6d21dc", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "2995b209aa3dc24cfcbba405cf8b97a398efbc0de97bb04ef2f51abb4cd2b84c", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/biome_chunk_fixture.rs": "810d00491e29b4fa91ef2e4447dc95314abc7191939a0c5f98306d57d36c0711" + }, + "fixtures_sha256": { + ".local/rust-biome-chunk-parity/inputs.txt": "ee52367acd9cf70183e21b696204ac285f0ef371ccf057707790f0949283c20b" + }, + "rust_output_sha256": "d70591bab59501e722318c80c7d8cdffba42342124edee804ebf0fb5b17cb9dd", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "d70591bab59501e722318c80c7d8cdffba42342124edee804ebf0fb5b17cb9dd", + "matched_output_lines": 593152 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "d70591bab59501e722318c80c7d8cdffba42342124edee804ebf0fb5b17cb9dd", + "matched_output_lines": 593152 + } + ], + "scope": "Actual ChunkAccess.fillBiomesFromNoise, LevelChunkSection.fillBiomesFromNoise and chunk/section biome reads using synthetic registered holder identities. Ordered resolver queries, section contents and clamped/wrapped chunk lookups are compared after repeated fills and failures at section boundaries. Covers full supported aligned vertical bounds, generation bounds cutting through sections, negative/extreme chunk coordinates and 1..512 possible biome identities. Completed earlier sections survive failure while the failing section retains its previous values. Additional BelowZeroRetrogen.getBiomeResolver cases compare all three retained cave keys, a lookalike foreign namespace, ordinary keyed holders and a direct holder without a key. All four combinations of upgrade activation at resolver construction and after construction test the captured wrapping decision. Candidate invocation order, injected candidate failures, old-column reads with quart Y fixed to zero and X/Z wrapping, repeated fills, and overlap of generation bounds with the old column section are exercised. Synthetic generation bounds deliberately override the fixed native retrogen height to expose section commit/read ordering. Direct holder values and all keyed holders are identity-only placeholders; biome properties are not evaluated. This compares stored biome values and resolver behavior, not native in-memory palette layout, wire encoding, biome-source generation integration, nonempty blending or complete generated worlds." +} diff --git a/benchmarks/rust-retrogen-biome-generation-2026-10-06/scoped-parity.json b/benchmarks/rust-retrogen-biome-generation-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..7d2a8287e --- /dev/null +++ b/benchmarks/rust-retrogen-biome-generation-2026-10-06/scoped-parity.json @@ -0,0 +1,216 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 396, + "retrogen_fixtures": 144, + "fills": 610, + "biome_values": 728576, + "block_queries": 93510, + "preset_entries": { + "minecraft:nether": 5, + "minecraft:overworld": 7594 + }, + "source_fixtures": { + "multi": 132, + "fixed": 104, + "checkerboard": 80, + "end": 80 + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeGenerationOracle.java": "790bcfaf5cf67a41b0abe0994cc64f44bf809142db464573d64a3a018df9014d", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeExport.java": "f9a773713cf21b69bfa10018b76f27b953bda140ede9934f43d3aa3091101cf5", + "tools/test_biome_generation_parity.py": "3a48dfff639e261e58f07ab00126331f46ee31e65312171044e48d01b0926c45", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "4f803d21656a1420555bee6369617ddc825219a2cf05f842a209b3f8eaa583ec", + "Cargo.lock": "b1674833e1d5e66032589eea75643bf1c1eb2f2d6503e79ff7da8efa1b6d21dc", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "2995b209aa3dc24cfcbba405cf8b97a398efbc0de97bb04ef2f51abb4cd2b84c", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/biome_generation_fixture.rs": "5beb21fbf872a05082f5b7a0531188990ae14d3f35421b118dd529db2b36ce30" + }, + "fixtures_sha256": { + ".local/rust-biome-generation-parity/inputs.txt": "15c002f4aeeedfeccf9e26ab93c198fe089822dc702bf39740c81a92dd041f79", + ".local/rust-biome-generation-parity/registries.json": "c6868228cc1002755dab31d947e953cc4be785a1b6ae82697755817a238b7de9", + ".local/rust-biome-generation-parity/presets-client.json": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9", + ".local/rust-biome-generation-parity/presets-server.json": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9" + }, + "rust_output_sha256": "e200d072cb701cba116f6d4375e36fd9ea8e4fec650ce0b86fd87cee7bf9cfdb", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "e200d072cb701cba116f6d4375e36fd9ea8e4fec650ce0b86fd87cee7bf9cfdb", + "matched_output_lines": 834080 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e200d072cb701cba116f6d4375e36fd9ea8e4fec650ce0b86fd87cee7bf9cfdb", + "matched_output_lines": 834080 + } + ], + "scope": "Actual ChunkGenerator.doCreateBiomes through NoiseBasedChunkGenerator with empty Blender, in ordinary and below-zero upgrade modes. Both bundled Overworld/Nether multi-noise preset tables are independently exported from authenticated JARs; Rust imports quantized tables and compiles climate routers itself. All seven bundled routers, both random modes, multiple seeds and distant positive/negative chunks are tested. Complete section biome values and subsequent BiomeManager block lookups are compared, including repeated generation with fresh density contexts and persistent previous-leaf search state, and generation bounds excluding top/bottom sections. Holders are identity placeholders; no biome properties are evaluated. Fixed, checkerboard and End source fixtures also run actual chunk generation through every bundled router, including real seeded End erosion, the central-island shortcut, distant coordinates and wrapped checkerboard shifts. Retrogen cases initialize patterned old biome columns, install actual below-zero metadata with a full target on an empty persisted-stage ProtoChunk, and use its native generation height. Four below-zero noise settings, all source kinds, fixed candidates for each of the three retained cave biomes, both random modes, signed/distant seeds and repeated fills are compared. Above-zero stored biomes remain checked alongside regenerated sections and block-level biome zoom. Rust composes seeded candidate resolvers with the independently tested retention fill. Preset builders, complete biome-source codecs, nonempty blending, complete terrain-stage scheduling and complete generated worlds remain pending." +} diff --git a/benchmarks/rust-retrogen-chunk-2026-10-06/scoped-parity.json b/benchmarks/rust-retrogen-chunk-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..7cecf83e7 --- /dev/null +++ b/benchmarks/rust-retrogen-chunk-2026-10-06/scoped-parity.json @@ -0,0 +1,214 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "block_tag_files": 300, + "fixtures": 138, + "operation_counts": { + "stage": 916, + "prime": 40, + "fill": 84, + "dump": 324, + "upgrade": 300, + "upgrade_info": 1082, + "replace_bedrock": 164, + "mask": 244 + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkStageOracle.java": "44ef437cb7efff99d2687644841ab88ac301e4cbb9a39f266753da9a61dd2af5", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_retrogen_chunk_parity.py": "a19e0f2ce97aff4d85626728ebfab15f2b4a2c7f3149451d2b7c5cc2660cf27a", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "2995b209aa3dc24cfcbba405cf8b97a398efbc0de97bb04ef2f51abb4cd2b84c", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "516c2a1841583acf1f9aef161dee3d59c68dfda9b9f2a7c936be9823abbdbb77", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "18d51343c00ad3a551d02f6ddfa37d1be23d481e1861ce6299d0a66991bc7074", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "9f7b5d9fd62779d9bd2446797b304f980eb51db70eb85575dddaccc3d3a2beab", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/chunk_stage_fixture.rs": "ad802dd3ff3eff1a52010308f15c9ad6095ac0f8c26720cc41561e61df5961a1" + }, + "fixtures_sha256": { + ".local/rust-retrogen-chunk-parity/inputs.txt": "8d997d6967e791b0f804f003c6d16a991904f54094abeca8db4f9315aa3c3160", + ".local/rust-retrogen-chunk-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-retrogen-chunk-parity/facts-client.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0", + ".local/rust-retrogen-chunk-parity/facts-server.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0" + }, + "rust_output_sha256": "fd67f47ff49f4ea551892287a3fb3bca0e3770f1e0b8acd39a8838f45a76ed2e", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "fd67f47ff49f4ea551892287a3fb3bca0e3770f1e0b8acd39a8838f45a76ed2e", + "matched_output_lines": 3028057 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "fd67f47ff49f4ea551892287a3fb3bca0e3770f1e0b8acd39a8838f45a76ed2e", + "matched_output_lines": 3028057 + } + ], + "scope": "Native ProtoChunk below-zero metadata installation/removal, pre-light persisted-stage assignments and target completion cleanup, normal/upgrading generation heights, actual BelowZeroRetrogen.replaceOldBedrock and applyBedrockMask. Mixed resident states, legacy five-layer bedrock bands, signed/chunk-relative coordinates, partial vertical overlap, masks with empty/single/sparse/all/out-of-footprint bits, repeated operations, preprimed/stale/missing heightmaps, and clearing under changed generation bounds are compared. Complete raw sections and selected packed heightmaps are checked after each mutation phase. All nine nonempty targets are paired with all six pre-light stages, including installation after an already-advanced status, repeated assignments, backward transitions and explicit removal. Data codecs have a separate comparison. Save-dirty notifications, post-light stages, structure restrictions, biome retention, automatic generation scheduling and complete world/gameplay parity remain outside this comparison." +} diff --git a/benchmarks/rust-retrogen-data-2026-10-06/scoped-parity.json b/benchmarks/rust-retrogen-data-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..9ead91ad3 --- /dev/null +++ b/benchmarks/rust-retrogen-data-2026-10-06/scoped-parity.json @@ -0,0 +1,198 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "codec_cases": 5114, + "hole_queries_per_decoded_input": 1229, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRetrogenDataOracle.java": "9160fc33401fe150003dffdff72d916948a5b1ca2729d635b060d05ddd846adf", + "tools/test_retrogen_data_parity.py": "f8cf5be92d5d5632ee5be2f15b1d4519ac99937ef236956fe0a86b3c4c23d79c", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "2995b209aa3dc24cfcbba405cf8b97a398efbc0de97bb04ef2f51abb4cd2b84c", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "516c2a1841583acf1f9aef161dee3d59c68dfda9b9f2a7c936be9823abbdbb77", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "18d51343c00ad3a551d02f6ddfa37d1be23d481e1861ce6299d0a66991bc7074", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "9f7b5d9fd62779d9bd2446797b304f980eb51db70eb85575dddaccc3d3a2beab", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/retrogen_data_fixture.rs": "517cc8ae0381049ef8d34a23d3b2e64d212cb5b8b89cde824dc2cdffc688bc87" + }, + "fixtures_sha256": { + ".local/rust-retrogen-data-parity/inputs.txt": "df3024560b464227d7a6e0afd18c408abfd6a0a4874bc9dd448ac81c28e314fe" + }, + "rust_output_sha256": "973c296cb151b90b6877f148d21dae9fce66de7781803d9d1a5a0125725215b2", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "973c296cb151b90b6877f148d21dae9fce66de7781803d9d1a5a0125725215b2", + "matched_output_lines": 20626 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "973c296cb151b90b6877f148d21dae9fce66de7781803d9d1a5a0125725215b2", + "matched_output_lines": 20626 + } + ], + "scope": "Native BelowZeroRetrogen codec, non-empty target-status validation, lenient optional bedrock mask decoding, NumericTag/array/list numeric streams, canonical trailing-zero removal, omitted empty masks, hasBedrockHoles and wrapped local X/Z hole queries. All 256 column bits and extra bits beyond the chunk footprint, malformed target/mask fields, mixed numeric lists and random bitsets are covered. Codec error text is normalized rather than compared. Generation scheduling, status transition cleanup, bedrock replacement/masking, biome retention and chunk lifecycle integration remain outside this data comparison." +} diff --git a/benchmarks/rust-rule-test-2026-10-06/scoped-parity.json b/benchmarks/rust-rule-test-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..686e1c15a --- /dev/null +++ b/benchmarks/rust-rule-test-2026-10-06/scoped-parity.json @@ -0,0 +1,163 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "blocks": 1286, + "integer_properties": 146, + "codec_inputs": 75920, + "rule_types": 10, + "block_tag_files": 300, + "requested_tests": 1866052, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRuleTestOracle.java": "881ca5018ee48b5853f98aa1232462523a9bf6b3b5818e27a5a2a4a809a8bca2", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rule_test_parity.py": "ac7d41cda769b1538dd6bcfb8b5b21215b869220b35defb07725d0eb58f8c1ae", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "2f5e4f01628dd783c3c21203be533db585caacfe3eb26037fc5cd05e574d8273", + "crates/horizon-world/src/worldgen/block_predicate.rs": "dd8cbda2ec110444950f0b31bf4e088897eab0994674a91568c7b063f8f16210", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "5df2e58e2070b3a9e205b3cb7f52936fad16b5bcf538c2c2861a9d94d5ea90c1", + "crates/horizon-world/src/worldgen/feature_region.rs": "4a95a30c0987d97e671f84380e13ddea070ad81f996baa65b2a06c4d892971c7", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/placement/chain.rs": "1b976aa4dd2516468196d0af3451e3fdd037493a14d269f54ebdd7254055e05e", + "crates/horizon-world/src/worldgen/placement/context.rs": "b36dfd9297896e62770f2085cf934fc08ebd4c030ecc7ae17d864e819a113201", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "68ecf36954fea5705436d486e9be93836933fd56779022afeb881a0399d6a674", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "8494d32cbc0bf0b8f4b50c7e83e123f66d12490181844f14f633921dd7e20676", + "crates/horizon-world/examples/rule_test_fixture.rs": "91aa337a4d2b44b37003716658bbcd739479f23714471a2f2af73fb23cb58310" + }, + "fixtures_sha256": { + ".local/rust-rule-test-parity/inputs.txt": "4c101191c2f0feb5f4c9597dc90eba62246af06ab60ece43ff9535e88973da6d", + ".local/rust-rule-test-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-rule-test-parity/facts-client.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-rule-test-parity/facts-server.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b" + }, + "rust_output_sha256": "22050d0a64e4406d86231a0d905d978a294734e1a5adc9501b819ebd3f3fa5e3", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "22050d0a64e4406d86231a0d905d978a294734e1a5adc9501b819ebd3f3fa5e3", + "matched_output_lines": 1890716 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "22050d0a64e4406d86231a0d905d978a294734e1a5adc9501b819ebd3f3fa5e3", + "matched_output_lines": 1890716 + } + ], + "scope": "Actual RuleTest.CODEC and all ten registered replacement-rule types. Every block and block-state identity, all bundled block tags, absent tags, inclusive and reversed height ranges, unrestricted random probabilities, logical short-circuit evaluation, malformed inputs, both random modes and subsequent draws are compared. Registry metadata and tag resources independently agree across authenticated JARs. Bound tags are immutable snapshots. Replacement feature mutations, structure processors, reload ownership and complete gameplay remain outside this standalone comparison." +} diff --git a/benchmarks/rust-scaffolding-collision-2026-10-06/context-regression.json b/benchmarks/rust-scaffolding-collision-2026-10-06/context-regression.json new file mode 100644 index 000000000..b69f4739a --- /dev/null +++ b/benchmarks/rust-scaffolding-collision-2026-10-06/context-regression.json @@ -0,0 +1,201 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 8338, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java": "ee1525cc998c8b49fbc5318efffcec7b98cc8be3e4755d3bfc8458ac3c5e64c2", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_collision_context_parity.py": "75d6f01e072867d2bd286d2e518e123fcfe055a11ac1705ec99ecec3975cb8d2", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "a40c9d7a4e0a734c124dc856e31359fd4d8de3d1bfc79c86787afa8e8e05e480", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/collision_context.rs": "3053db15dff5776571a2c919634362fe43100978867f9e3ac46b2299563a6d4d", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "8f77b4a1c5e25ecf9336477c12e3141fafc0cd8884f3b198f2ec93b0eb47ae49", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/collision_context_fixture.rs": "c4df3b01bf9d7e58076c848fbb41f93677ea4f0fdaab768a131d9e77c7bee5cd" + }, + "fixtures_sha256": { + ".local/rust-collision-context-parity/inputs.txt": "60b49e91a7a4999cfb8eb6ac3fbc6ec0a931d68cd53f9737959a2bd2b42be7a5" + }, + "rust_output_sha256": "7b23eb34c86c3db5a9e90bdd8ef772b79b2a06c8460542e032589f7962fd8f64", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "7b23eb34c86c3db5a9e90bdd8ef772b79b2a06c8460542e032589f7962fd8f64", + "matched_output_lines": 225126 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "7b23eb34c86c3db5a9e90bdd8ef772b79b2a06c8460542e032589f7962fd8f64", + "matched_output_lines": 225126 + } + ], + "scope": "Actual CollisionContext factories and EntityCollisionContext/Empty/PositionCollisionContext queries on controlled player and marker snapshots. Checks entity identity, captured descending and placement flags, fluid collision flags, empty-stack AIR identity, height thresholds including f32 epsilon, null factories, callback arguments/order/failures and all five fluid type pairs. Entity lifecycle, inventory mutations after capture, experimental minecart contexts, contextual block shape dispatch and live movement integration remain pending." +} diff --git a/benchmarks/rust-scaffolding-collision-2026-10-06/scoped-parity.json b/benchmarks/rust-scaffolding-collision-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..dc224cf8b --- /dev/null +++ b/benchmarks/rust-scaffolding-collision-2026-10-06/scoped-parity.json @@ -0,0 +1,203 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 56448, + "block_states": 32, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java": "ee1525cc998c8b49fbc5318efffcec7b98cc8be3e4755d3bfc8458ac3c5e64c2", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_collision_context_parity.py": "75d6f01e072867d2bd286d2e518e123fcfe055a11ac1705ec99ecec3975cb8d2", + "tools/test_scaffolding_collision_parity.py": "bab75e2cad68a3193035a87497eaa372466c405293cc547e39dbd7bd4450d69d", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "a40c9d7a4e0a734c124dc856e31359fd4d8de3d1bfc79c86787afa8e8e05e480", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/collision_context.rs": "3053db15dff5776571a2c919634362fe43100978867f9e3ac46b2299563a6d4d", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "8f77b4a1c5e25ecf9336477c12e3141fafc0cd8884f3b198f2ec93b0eb47ae49", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/collision_context_fixture.rs": "c4df3b01bf9d7e58076c848fbb41f93677ea4f0fdaab768a131d9e77c7bee5cd" + }, + "fixtures_sha256": { + ".local/rust-scaffolding-collision-parity/inputs.txt": "5945054e86700237a7b6de6b362a37a98bdc8afaa67004e8aaa92da1421b552c" + }, + "rust_output_sha256": "33a33cd612c999ab21f1acbbdee522f2ec2b3f877d62f922c665715e3012e207", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "33a33cd612c999ab21f1acbbdee522f2ec2b3f877d62f922c665715e3012e207", + "matched_output_lines": 524300 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "33a33cd612c999ab21f1acbbdee522f2ec2b3f877d62f922c665715e3012e207", + "matched_output_lines": 524300 + } + ], + "scope": "Actual CollisionContext.getCollisionShape dispatch and native scaffolding behavior for all 32 scaffolding states, nine context variants, descending flags, integer Y extremes, nonfinite positions and adjacent double values around the top/bottom float-epsilon thresholds. Full shape coordinates, extrema, box ordering and cube metadata match. A rejecting world proxy verifies selection performs no world reads. Scaffolding placement/update/falling behavior and live movement remain pending." +} diff --git a/benchmarks/rust-scattered-ore-2026-10-06/scoped-parity.json b/benchmarks/rust-scattered-ore-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..e5abaaeb2 --- /dev/null +++ b/benchmarks/rust-scattered-ore-2026-10-06/scoped-parity.json @@ -0,0 +1,161 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 11544, + "block_states": 35723, + "integer_properties": 146, + "requested_placements": 23088, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaScatteredOreOracle.java": "3c635f6a2c169688db210710eebb269a91fad6432fc84485a41f1059f9a6e895", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_scattered_ore_parity.py": "7834042bcba27f5f538a063e173d49b73f7b1a174fda2086c3e4955a4ea9daed", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "23b2a335505bebfa512f2fee699cf0bf69f65b59ddf22add616fc5a3fcf5432c", + "crates/horizon-world/src/worldgen/block_predicate.rs": "dd8cbda2ec110444950f0b31bf4e088897eab0994674a91568c7b063f8f16210", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "2297b194514925688dba25016a69d5ba5eb8b869bdfff28f2e611a6742ac5954", + "crates/horizon-world/src/worldgen/feature_region.rs": "4a95a30c0987d97e671f84380e13ddea070ad81f996baa65b2a06c4d892971c7", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "1b976aa4dd2516468196d0af3451e3fdd037493a14d269f54ebdd7254055e05e", + "crates/horizon-world/src/worldgen/placement/context.rs": "b36dfd9297896e62770f2085cf934fc08ebd4c030ecc7ae17d864e819a113201", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "68ecf36954fea5705436d486e9be93836933fd56779022afeb881a0399d6a674", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "3ffc2db40a9c2d0ecc2d8de68f9d853c2d11320709139a203d4b3f5f9023fb0a", + "crates/horizon-world/examples/scattered_ore_fixture.rs": "1f5d77e1ce57230a1ca80870fd139fad8405a74e36b18bc781e2cdd61ec3eddf" + }, + "fixtures_sha256": { + ".local/rust-scattered-ore-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0", + ".local/rust-scattered-ore-parity/facts-client.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-scattered-ore-parity/facts-server.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-scattered-ore-parity/inputs.txt": "16b9b7dc315f01f8a86a063323f261e91047096131e46df9fbf721eccdaa8c0f" + }, + "rust_output_sha256": "2f63fa6cb1317368053a1983f0cac8914c8f3139bee1ddb1d3e376b8c9913c29", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "2f63fa6cb1317368053a1983f0cac8914c8f3139bee1ddb1d3e376b8c9913c29", + "matched_output_lines": 758484 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "2f63fa6cb1317368053a1983f0cac8914c8f3139bee1ddb1d3e376b8c9913c29", + "matched_output_lines": 758484 + } + ], + "scope": "Actual scattered_ore feature codec and native ScatteredOreFeature.place. Attempt counts, six float draws per offset, Java rounding, wrapped coordinates, state capture per attempt, ordered target predicates, conditional air-exposure draws, directional neighbor reads, early air detection and mutation flags/results/errors are compared. Both random modes, size/discard boundaries, empty targets, repeated calls, solid/mixed/directional-air worlds and partial failures are included. Complete ore veins, region side effects, chunk decoration and gameplay remain pending." +} diff --git a/benchmarks/rust-server-player-combat-2026-10-07/scoped-parity.json b/benchmarks/rust-server-player-combat-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..73bea6731 --- /dev/null +++ b/benchmarks/rust-server-player-combat-2026-10-07/scoped-parity.json @@ -0,0 +1,264 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 7465, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaServerPlayerCombatOracle.java": "f3a850b7c42ffa5b38a8a526290e4655da2c11220989acffd3a7808325fb8b7e", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerHealthOracle.java": "5d6dc93c0140e2b2f953fba7290721079d5a607fa81b051e2ac1e4742ab606f2", + "tools/test_server_player_combat_parity.py": "45c75e5f82049081a14af57106e24762ef664124635c8cccc53e66cf08539dde", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_player_hurt_parity.py": "3164b8644664fcd46903e801ea70d1bb866e07e7112dc94570161831644bc84d", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "06065c36a17442ea9e5369fd7eeada9b4c2f823863c0590d917b20693e97fdea", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "711e78438ece3e94eb156c0e64cfea06a63f79640a7a81e396ae2c1b277cdce6", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "b32663be1f83167735fd50cea9851b0e0e3c147e6a2be2b5ab40bf268ddbc01a", + "crates/horizon-world/src/server_player_damage.rs": "c4fc29eecf2bf401680d1754bef06797a5e4608ab53c5b52e0dd4996f859dbfe", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/server_player_combat_fixture.rs": "47ee61368412fd1602ae4eb3441315f57bf846fff1fc1caea384a6db9ec70ddd" + }, + "fixtures_sha256": { + ".local/rust-server-player-combat-parity/inputs.txt": "f3b1edb606a64067457fdc1e9420f6c893c3928cad7f983cd0f7a92c1cdee541", + ".local/rust-server-player-combat-parity/catalog.json": "d1e488e4f432888beb9f643904c8bca242d1e2093f53e23e07da305d70cf7106", + ".local/rust-server-player-combat-parity/ids.json": "f7d6037166d966e2714b01cff5626f0cc0a02ce883885ec791c93e977afde0e6", + ".local/rust-server-player-combat-parity/slots.json": "29101ebf1ead685029508789eee51c4d4fff65524064d8e32a48efded7036982", + ".local/rust-server-player-combat-parity/head.json": "ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d" + }, + "rust_output_sha256": "fe33d2fb5cd941b3c57138518bb349f06922ace7367b720bb6ee3ffaff7a0a0b", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "fe33d2fb5cd941b3c57138518bb349f06922ace7367b720bb6ee3ffaff7a0a0b", + "matched_output_lines": 561528 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "fe33d2fb5cd941b3c57138518bb349f06922ace7367b720bb6ee3ffaff7a0a0b", + "matched_output_lines": 561528 + } + ], + "scope": "Actual ServerPlayer outer hurt through Player/LivingEntity gates and actual Player inner damage, native armor/resistance reduction, registered modified attributes, synchronized health/absorption and FoodData exhaustion. Repeated hits, cooldown/state writes, death rejection, callbacks and numeric edges. Invulnerability predicate, blocking amount, durability, effects, PvP permission, attribution, knockback, death services and criterion listeners remain controlled; enchanted items, registered sources and complete entity/game lifecycle remain pending." +} diff --git a/benchmarks/rust-server-player-combat-immunity-2026-10-07/inner-damage-regression.json b/benchmarks/rust-server-player-combat-immunity-2026-10-07/inner-damage-regression.json new file mode 100644 index 000000000..e33d407e5 --- /dev/null +++ b/benchmarks/rust-server-player-combat-immunity-2026-10-07/inner-damage-regression.json @@ -0,0 +1,257 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 14696, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingDamageOracle.java": "f6901c9875488132658fd99410958f072976c553f1badf25c50727873c9240c4", + "tools/test_living_damage_parity.py": "f858e0f3ee9498e0960dc527ac393ebc4154503a8c8ff3971ce64d9430e4111a", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "06065c36a17442ea9e5369fd7eeada9b4c2f823863c0590d917b20693e97fdea", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/living_damage_fixture.rs": "c00017fed110ab6ebb229791d59ca7d3dd0ecaa48a8030ae7f156672a88dd02b" + }, + "fixtures_sha256": { + ".local/rust-living-damage-parity/inputs.txt": "5815be47de0e489e8439e61e868595aeb3ace34317841b31cdaab6eecfb4dbff" + }, + "rust_output_sha256": "2d5568691fefb75c1dfb914f390860d6b008d8cef18b743b78277941936dc19b", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "2d5568691fefb75c1dfb914f390860d6b008d8cef18b743b78277941936dc19b", + "matched_output_lines": 161198 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "2d5568691fefb75c1dfb914f390860d6b008d8cef18b743b78277941936dc19b", + "matched_output_lines": 161198 + } + ], + "scope": "Actual LivingEntity and Player actuallyHurt with observable phase/storage/stat/combat/event hooks; real final absorption clamping. Invulnerability, armor/magic dispatch, two absorption reads, absorbed statistics and Java rounding, player exhaustion/taken statistics, base-living second absorption write, health and damage-event ordering, mutation/failure retention. Armor/magic results, storage, combat/stat sinks and exhaustion delivery are controlled; outer hurt gates, full damage binding and live gameplay remain pending." +} diff --git a/benchmarks/rust-server-player-combat-immunity-2026-10-07/scoped-parity.json b/benchmarks/rust-server-player-combat-immunity-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..da544da9b --- /dev/null +++ b/benchmarks/rust-server-player-combat-immunity-2026-10-07/scoped-parity.json @@ -0,0 +1,264 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 7465, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaServerPlayerCombatOracle.java": "1c4fac076598ff3cb6e23059355781a42d5a992ac720fa3c6dc0f26131c30f08", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerHealthOracle.java": "5d6dc93c0140e2b2f953fba7290721079d5a607fa81b051e2ac1e4742ab606f2", + "tools/test_server_player_combat_parity.py": "79e74d60c3f4a9534c28642a6907271739f084ebb15b53009a747065733025bf", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_player_hurt_parity.py": "3164b8644664fcd46903e801ea70d1bb866e07e7112dc94570161831644bc84d", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "06065c36a17442ea9e5369fd7eeada9b4c2f823863c0590d917b20693e97fdea", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/server_player_combat_fixture.rs": "31708a06086de4fd510426c8f4f52e73065bf8fdf43cb2492215e957a5cc3895" + }, + "fixtures_sha256": { + ".local/rust-server-player-combat-parity/inputs.txt": "0267042ca199aba2647667b349b22be374c83fbae3d9846a33519c1f96a402b4", + ".local/rust-server-player-combat-parity/catalog.json": "d1e488e4f432888beb9f643904c8bca242d1e2093f53e23e07da305d70cf7106", + ".local/rust-server-player-combat-parity/ids.json": "f7d6037166d966e2714b01cff5626f0cc0a02ce883885ec791c93e977afde0e6", + ".local/rust-server-player-combat-parity/slots.json": "29101ebf1ead685029508789eee51c4d4fff65524064d8e32a48efded7036982", + ".local/rust-server-player-combat-parity/head.json": "ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d" + }, + "rust_output_sha256": "e2e937abc1e00904c23573390279fb6f7474b88e0adf8ebb0f0019504e888939", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "e2e937abc1e00904c23573390279fb6f7474b88e0adf8ebb0f0019504e888939", + "matched_output_lines": 1176994 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e2e937abc1e00904c23573390279fb6f7474b88e0adf8ebb0f0019504e888939", + "matched_output_lines": 1176994 + } + ], + "scope": "Actual ServerPlayer outer hurt through Player/LivingEntity gates and actual Player inner damage, native armor/resistance reduction, registered modified attributes, synchronized health/absorption and FoodData exhaustion. Repeated hits, cooldown/state writes, death rejection, callbacks and numeric edges. Actual inherited invulnerability predicates include virtual flags, empty-equipment enchantment immunity, damage gamerules and client-loading/dimension guards; blocking amount, durability, effects, PvP permission, attribution, knockback, death services and criterion listeners remain controlled; enchanted items, registered sources and complete entity/game lifecycle remain pending." +} diff --git a/benchmarks/rust-server-player-damage-2026-10-07/scoped-parity.json b/benchmarks/rust-server-player-damage-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..776f29610 --- /dev/null +++ b/benchmarks/rust-server-player-damage-2026-10-07/scoped-parity.json @@ -0,0 +1,258 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 7084, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaServerPlayerDamageOracle.java": "686bf09f482410cdbcdd10fd66ba8386f7cebff0b98e532c5f95fe8dd8674b31", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java": "2ad3190a9798ab54bd12e88573028d0ca6a204e2f8a92018aae98b22335213bf", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerHealthOracle.java": "5d6dc93c0140e2b2f953fba7290721079d5a607fa81b051e2ac1e4742ab606f2", + "tools/test_server_player_damage_parity.py": "69740bdebd799c7e995138c42174ef467a94ed2a824e09f07877174bf3df9554", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "3d96af3fcc2eaaa746e662e5307f1f4ea7f59fcbdfcb62d8144fb1ce0ca7f671", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "711e78438ece3e94eb156c0e64cfea06a63f79640a7a81e396ae2c1b277cdce6", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_damage.rs": "c4fc29eecf2bf401680d1754bef06797a5e4608ab53c5b52e0dd4996f859dbfe", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/server_player_damage_fixture.rs": "dd9e91f8f2a025a8674f4704c7126d68e92cb1ea839385489f4390a9fdbd6b17" + }, + "fixtures_sha256": { + ".local/rust-server-player-damage-parity/inputs.txt": "b0f5f0d59ead33819a69d4396937e0eac89864772997a684e81170caa5a05ce7", + ".local/rust-server-player-damage-parity/catalog.json": "d1e488e4f432888beb9f643904c8bca242d1e2093f53e23e07da305d70cf7106", + ".local/rust-server-player-damage-parity/ids.json": "f7d6037166d966e2714b01cff5626f0cc0a02ce883885ec791c93e977afde0e6", + ".local/rust-server-player-damage-parity/slots.json": "29101ebf1ead685029508789eee51c4d4fff65524064d8e32a48efded7036982" + }, + "rust_output_sha256": "25e4f2776522650c2b9e0043af0fd5dffadb9f19e5218aa41082cdefbc593f81", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "25e4f2776522650c2b9e0043af0fd5dffadb9f19e5218aa41082cdefbc593f81", + "matched_output_lines": 373455 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "25e4f2776522650c2b9e0043af0fd5dffadb9f19e5218aa41082cdefbc593f81", + "matched_output_lines": 373455 + } + ], + "scope": "Native ServerPlayer inner damage with actual armor/magic reduction, registered modified attributes, Player health/absorption synchronized storage and FoodData exhaustion. Repeated hits, armor attribute mutation, empty equipment, resistance, bypass tags, callback failures and packet drains. Equipment durability, effects, source tags, combat/stat/event services are controlled; outer hurt gates, enchanted equipment and full player lifecycle remain pending." +} diff --git a/benchmarks/rust-shared-item-use-2026-10-07/item-use-lifecycle.json b/benchmarks/rust-shared-item-use-2026-10-07/item-use-lifecycle.json new file mode 100644 index 000000000..1f578582e --- /dev/null +++ b/benchmarks/rust-shared-item-use-2026-10-07/item-use-lifecycle.json @@ -0,0 +1,276 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 19900, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseLifecycleOracle.java": "7a024212a18eff1891996fe5979c2d35aea36a4cef80c70638bb5ead4fbcaf57", + "tools/test_item_use_lifecycle_parity.py": "5bae87adf6b7591670a3f1b387f6bc85e70c11c1eadab0ede569266619b6afc4", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/lib.rs": "71dc72ba5c6c461456201f6f6cb28942223ecac7f899940d46d30fc15ec9b18a", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/item_use_lifecycle_fixture.rs": "e87046bfb6b2d15be0e781a9c81d9f49c7279f202d8ce888156146024adc241c" + }, + "fixtures_sha256": { + ".local/rust-item-use-lifecycle-parity/inputs.txt": "32379ce9a26546173d4a88d55665609aad15f6e6a38c6b6e3cc00d2e7a6c76a4" + }, + "rust_output_sha256": "79addc5b3f5d14a54965ff68a71ed18989490e00a103368c75a1825236166f95", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "79addc5b3f5d14a54965ff68a71ed18989490e00a103368c75a1825236166f95", + "matched_output_lines": 144736 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "79addc5b3f5d14a54965ff68a71ed18989490e00a103368c75a1825236166f95", + "matched_output_lines": 144736 + } + ], + "scope": "Actual LivingEntity private using-item tick, updateUsingItem, completeUsingItem, releaseUsingItem and stopUsingItem. Real ItemStack/UseEffects components call controlled custom item handlers; virtual level/hand queries and using flag updates are observed. Rust lifecycle now uses production reference-counted StackRef values with native identity equality. Covers captured stack/level references, same-type versus stack-identity checks, callback mutations/failures, empty stacks, wrapping countdowns, returned item placement, finish vibration and kinetic-enemy-map presence. Starting use, actual synchronized flags, consumables/kinetic item effects, use remainders/cooldowns, full inventory/equipment and game tick integration remain pending." +} diff --git a/benchmarks/rust-shared-item-use-2026-10-07/item-use-start.json b/benchmarks/rust-shared-item-use-2026-10-07/item-use-start.json new file mode 100644 index 000000000..682e04217 --- /dev/null +++ b/benchmarks/rust-shared-item-use-2026-10-07/item-use-start.json @@ -0,0 +1,276 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 14886, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseStartOracle.java": "630ce7f2bea3915d3de64263c6a78c8f93caee71d72c519b788956eab46ce00a", + "tools/test_item_use_start_parity.py": "fdbd4054287457d60b862a307555d59d6ec43f0be86bf6b8a65eb9e88b3905a0", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/lib.rs": "71dc72ba5c6c461456201f6f6cb28942223ecac7f899940d46d30fc15ec9b18a", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/item_use_start_fixture.rs": "80d62405d6cb626f86e23f9c6d6bc38441578674a8885e6e329ab85eb9993776" + }, + "fixtures_sha256": { + ".local/rust-item-use-start-parity/inputs.txt": "494e8b41f2336559f73fa4e6dad133614d9e240d8f44a51c416a348098c62701" + }, + "rust_output_sha256": "8268f65a5a4ac92739d7e8f6d3d8e287a48684e69ad4abbec18fa978d9606bff", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "8268f65a5a4ac92739d7e8f6d3d8e287a48684e69ad4abbec18fa978d9606bff", + "matched_output_lines": 84873 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "8268f65a5a4ac92739d7e8f6d3d8e287a48684e69ad4abbec18fa978d9606bff", + "matched_output_lines": 84873 + } + ], + "scope": "Actual inherited LivingEntity startUsingItem, native private equipment synchronization and ClientboundSetEquipmentPacket construction, item duration dispatch, using/offhand flag ordering, native UseEffects vibration and KineticWeapon presence. Covers captured held-stack/level/hand arguments, callback mutations/failures, empty stacks, client/server queries and recent-kinetic-map reset. Flag writes and delivery services are controlled; synchronized-data storage, wire encoding, kinetic combat, full inventory/equipment and game tick integration remain pending." +} diff --git a/benchmarks/rust-shared-item-use-2026-10-07/item-use.json b/benchmarks/rust-shared-item-use-2026-10-07/item-use.json new file mode 100644 index 000000000..1ee4f76a7 --- /dev/null +++ b/benchmarks/rust-shared-item-use-2026-10-07/item-use.json @@ -0,0 +1,276 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 22296, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseOracle.java": "b6d102e72dc166cdd2ae35dc13c4bf08c36265dcb42369ec9e15da16f8b6284f", + "tools/test_item_use_parity.py": "2e3c5ff8250e8d1d9d8a564d6d65b049b0d80fc9630bd12d907cccb55b00ab0a", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/lib.rs": "71dc72ba5c6c461456201f6f6cb28942223ecac7f899940d46d30fc15ec9b18a", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/item_use_fixture.rs": "ae94d70ce98734d9b4025137962de43cdfef89963bad3800f0d9a54385366421" + }, + "fixtures_sha256": { + ".local/rust-item-use-parity/inputs.txt": "37dc2ae8be576a3f3d933b752baf4edfefb1c61a77af521e7e5580fc36fd7ffd" + }, + "rust_output_sha256": "47c017ea6a6010c6a136fbdc5f7f1521490c8e418e4e9b5f95c77d08ed716425", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "47c017ea6a6010c6a136fbdc5f7f1521490c8e418e4e9b5f95c77d08ed716425", + "matched_output_lines": 108690 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "47c017ea6a6010c6a136fbdc5f7f1521490c8e418e4e9b5f95c77d08ed716425", + "matched_output_lines": 108690 + } + ], + "scope": "Actual LivingEntity blocking-item eligibility, isBlocking and both use-timer overloads. Controlled item types supply virtual duration queries; actual use-item/remaining fields and BlocksAttacks components provide captured and reread state. Covers wrapping tick arithmetic, delay boundaries, absent components, empty stacks, shared item types, partial-tick float bits, callback mutations and failures. Item-use lifecycle, durability, codecs and complete combat/world integration remain pending." +} diff --git a/benchmarks/rust-simple-block-2026-10-06/scoped-parity.json b/benchmarks/rust-simple-block-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..416d5a057 --- /dev/null +++ b/benchmarks/rust-simple-block-2026-10-06/scoped-parity.json @@ -0,0 +1,201 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 492554, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "82204d06e279275c5967f6d5fd80afe7416ba6c5f5ec19c682a30942f2fb6d7a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "99a396b9b983f6ca9149133251f3ece9aaf76d3d16dafa1f322378212a19490c", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "710cc537a5abfb410c28c8121dea9f216a00f96ea60fafbf2c3f82e7621b6e4e", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b3caf26bd3afc9d10cdcca3f7e794c30abf5ba09afa1fe80ba8f44713acdb274", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "8a2834a9347ee2c2db7cf1c86a064907ec06e9ac16ba9cc3936e315fc4ad49ca", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "2ea6d26fe88c633ad3efe7bdb6fc49f54961cbdf93b82919d79cf7d37a5c3c7d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "1db1c7bffcb045e4365c3434a22ab9b2589a78753f897d17a0ef09ae735619c1", + "crates/horizon-world/src/worldgen/feature_region.rs": "2c78e5f1bdb08307f8d982f231f1abbc3306cd54348d9023b86ee6ed3516fd33", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "2fc100f8861fe0e0519a53dc4ae4a1eaa8a96aff2f6bf546ce613bdf665df237", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "c0190c771ec164902db6988a511b7b409c4fa44456548cb7bc40a520ccdf7a92", + "crates/horizon-world/examples/simple_block_fixture.rs": "d839de7fa2827189f8625903cedad84ab47c3e7384bed42e250f660f41d961dc" + }, + "fixtures_sha256": { + ".local/rust-simple-block-parity/inputs.txt": "c60ac2104d268f70971d19ad2d9d94b064b6161e2ca3e258b3eaee5c0e217adc", + ".local/rust-simple-block-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-simple-block-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-simple-block-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-simple-block-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-simple-block-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-simple-block-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-simple-block-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-simple-block-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-simple-block-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-simple-block-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-simple-block-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-simple-block-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-simple-block-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-simple-block-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-simple-block-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-simple-block-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "844b94c4148519899e030393f1def423da6ab96353b73e8797e53bbb6ba958a6", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "844b94c4148519899e030393f1def423da6ab96353b73e8797e53bbb6ba958a6", + "matched_output_lines": 9613872 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "844b94c4148519899e030393f1def423da6ab96353b73e8797e53bbb6ba958a6", + "matched_output_lines": 9613872 + } + ], + "scope": "Native SimpleBlockFeature map codec, provider selection, actual state survival and single/double-plant/moss placement. Named feature/placed-feature/provider holders, selectors, sequences and placement modifier chains compose the same operations. Mutable world logs ordered reads, fluid/light/entity queries, writes and flags, rejected writes, thrown failures, scheduled block identities, repeated placements and both feature/world random tails. All candidate states and every above-state obstruction for representative double-plant definitions, waterlogging, moss attachment combinations and topper identities are exercised. Registry definition classes and immutable geometry are independently checked in both authenticated JARs. Actual chunks, neighbor updates, scheduled tick execution, entity lifecycle, complete feature registries and playable worlds remain pending." +} diff --git a/benchmarks/rust-simple-container-2026-10-07/scoped-parity.json b/benchmarks/rust-simple-container-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..c614edde5 --- /dev/null +++ b/benchmarks/rust-simple-container-2026-10-07/scoped-parity.json @@ -0,0 +1,272 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 6273, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleContainerOracle.java": "9757a90d83941614d94a089a60cc7309db617991e1d99a22d9f6b73c3b06a572", + "tools/test_simple_container_parity.py": "53e810759ea1e12025f419e2c89133e8eed2fb1f841388a753be14e4b2d304a1", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "1a83604c256a51898b59b0087c2378282bcebe7883add2c4634dc7f9183d6e49", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_use.rs": "1d0a3afa61b60d356e81a063da79ec6cd38730315976640a591325fc4c8ab98c", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "f9b29f42a528493d0d2521110d4f6e0bc89af8f579d539648cb7c3a9e68e31cd", + "crates/horizon-world/src/item_use_start.rs": "9996a9b90c313925cd90e78c02880f2a1d2ae65aef53f4ce081578a9dcd10c62", + "crates/horizon-world/src/lib.rs": "2145c37c7daadf735451a1e3f8e39fff005243861d1d8261cdb557dea7b8c466", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/simple_container_fixture.rs": "72eeb6dd9ae37b35643d9231047785dae0307d396ec2850e865f18a554580928" + }, + "fixtures_sha256": { + ".local/rust-simple-container-parity/inputs.txt": "4335da72561507dd19276c020cd198aa0d91d9034839f83707fcf75b4cc3df6b" + }, + "rust_output_sha256": "d8d71155d43f9cd6874344c27da2b0a07eaca7803592dfe53d98347c0dff12a5", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "d8d71155d43f9cd6874344c27da2b0a07eaca7803592dfe53d98347c0dff12a5", + "matched_output_lines": 590402 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "d8d71155d43f9cd6874344c27da2b0a07eaca7803592dfe53d98347c0dff12a5", + "matched_output_lines": 590402 + } + ], + "scope": "Actual SimpleContainer get/set/add/removal, reverse remove-by-type, clear/remove-all, can-add and count queries over real shared ItemStack storage. Small native prototypes expose component equality and copy isolation; alias identities and raw/visible state are traced. Native size/change callbacks cover mutations and failures before/after storage writes. Rust uses production reference-counted stack storage and container methods. Persistence, recipe accounting, arbitrary getItem/setItem overrides, player inventory/menu transactions, full component values and complete gameplay integration remain pending." +} diff --git a/benchmarks/rust-snow-freeze-2026-10-06/scoped-parity.json b/benchmarks/rust-snow-freeze-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..3219ea284 --- /dev/null +++ b/benchmarks/rust-snow-freeze-2026-10-06/scoped-parity.json @@ -0,0 +1,217 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 108339, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "4112535c68bfa231d377915112093da8ac776abe0c245e3b1c0cb2d0e3db4d5c", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "e871d3a01f15616a98ca9227c27a81e4d17e2d57ac4e68a5650a70fa29811497", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_snow_freeze_parity.py": "eed35be29a720748423bc51a1fdc7d30ec0b98a161ee61fb6c876f4eac866720", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "5ce5c6eaa5f8a2557a620e533788217b1eb430654801dcf6135d6c92d7a012ac", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "98bc93dff1373e3b6f4dcf8c4c2b05b56814acd4f66302834aa5877fe90ec7b9", + "crates/horizon-world/src/worldgen/feature_region.rs": "79e8ce343b0dc80dceb8b214c818b383d9b110540bb8c3b0ac32863a7800e288", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "b7a59a712d2e376e8f32ec1e1fd901df452c8019e06910c39d469816be63a14f", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "072d31a3b814eda9cc9bdc1da06a7dab43c38f133824bfd00f55ebb8452d8b88", + "crates/horizon-world/examples/simple_block_fixture.rs": "0e5cd53dc3208f53a71a80ac6d85ff9914c04c09c3d788ea1bb6606f9ae840b8" + }, + "fixtures_sha256": { + ".local/rust-snow-freeze-parity/inputs.txt": "909f7749270bf043415bb0d555298b09df23f175d32438fcb72ed4d0c0dd0372", + ".local/rust-snow-freeze-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-snow-freeze-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-snow-freeze-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-snow-freeze-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-snow-freeze-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-snow-freeze-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-snow-freeze-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-snow-freeze-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-snow-freeze-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-snow-freeze-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-snow-freeze-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-snow-freeze-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-snow-freeze-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-snow-freeze-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-snow-freeze-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-snow-freeze-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "81796448aa1639d911c29bcf2cdd6142aa55c6b1d8414194b3365504d565e195", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "81796448aa1639d911c29bcf2cdd6142aa55c6b1d8414194b3365504d565e195", + "matched_output_lines": 7764082 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "81796448aa1639d911c29bcf2cdd6142aa55c6b1d8414194b3365504d565e195", + "matched_output_lines": 7764082 + } + ], + "scope": "Native SnowAndFreezeFeature unit codec, 16x16 X-then-Z traversal, MOTION_BLOCKING heights, one biome lookup per column retained across freeze/snow checks, actual biome temperature/freezing/snow predicates, ice-before-snow mutation, snowy ground state changes after attempted snow writes, flags 2 and unconditional normal success. Every ground, snow candidate and fluid-state carrier is compared through failure-terminated prefixes. Full runs cover climate thresholds/NaN, both modifiers, precipitation, light gates, both unchanged RNGs, repeated mutations/cache use, rejected writes, partial failures, extreme heights/sea levels, wrapped X/Z and composition. Fixture heights and a single biome are controlled; actual lighting, dynamic biome selection, world update execution and full generation remain pending. Native temperature caches are released after each independent fixture." +} diff --git a/benchmarks/rust-speleothem-2026-10-06/scoped-parity.json b/benchmarks/rust-speleothem-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..4df39deb3 --- /dev/null +++ b/benchmarks/rust-speleothem-2026-10-06/scoped-parity.json @@ -0,0 +1,222 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 145473, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "d2f9843f8fb20d392cf19d14d1cdd99f0422cead8ef12487ff5b3b0e18576726", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "e871d3a01f15616a98ca9227c27a81e4d17e2d57ac4e68a5650a70fa29811497", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_speleothem_parity.py": "babade3019311690a76f1d0ed7a0f7f1e530b9c906af107e8de9a578a1a52ffb", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "ae7552027b2efc0db6299dc14ab04c28615e43b876b5d67644855fd7a047e33e", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "b8fb9fb80a66a851d916f07f15df1a40b6cc95b49e71aaec4d4b4107f13d9f9f", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "1dd9ccc9c555e29b52eb5eec591da98bbd9e68921196106d18793d993647592b", + "crates/horizon-world/examples/simple_block_fixture.rs": "c2827b81f21886027d2a53ff41457586a4c6ed7eafe451906320922b11756ca0" + }, + "fixtures_sha256": { + ".local/rust-speleothem-parity/inputs.txt": "c44660d49f333c226b31844317a7eaf4a6153a4a7b72ab5bf94a697e0668896d", + ".local/rust-speleothem-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-speleothem-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-speleothem-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-speleothem-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-speleothem-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-speleothem-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-speleothem-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-speleothem-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-speleothem-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-speleothem-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-speleothem-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-speleothem-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-speleothem-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-speleothem-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-speleothem-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-speleothem-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "30d673861253bf83e197f8cf45be0501f2f81ae9d75af20ee9f5ebfb54447c2f", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "30d673861253bf83e197f8cf45be0501f2f81ae9d75af20ee9f5ebfb54447c2f", + "matched_output_lines": 2752289 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "30d673861253bf83e197f8cf45be0501f2f81ae9d75af20ee9f5ebfb54447c2f", + "matched_output_lines": 2752289 + } + ], + "scope": "Native SpeleothemFeature codecs and optional float defaults, ceiling/floor base tests, conditional random direction, four horizontal base-patch branches with radius-two/three direction draws, taller-tip chance, post-patch base recheck and waterlogged tip/frustum writes. Base/pointed configured states select block identities and their defaults; invalid pointed properties fail at native placement time. All states cover support/taller/contained-fluid roles, both RNGs, probability boundaries, rejected writes, partial failures, repeated mutation, wrapped coordinates and composition. Base patch updates and point placement are traced in order; neighbor updates, falling behavior, fluids, larger clusters and full cave generation remain pending." +} diff --git a/benchmarks/rust-spike-2026-10-06/scoped-parity.json b/benchmarks/rust-spike-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..4311e007b --- /dev/null +++ b/benchmarks/rust-spike-2026-10-06/scoped-parity.json @@ -0,0 +1,211 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 113127, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "8166679666563fbe0fe6e1778f1d88a29c939bbc06f57f723ebf2f81731aea9b", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "e871d3a01f15616a98ca9227c27a81e4d17e2d57ac4e68a5650a70fa29811497", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_spike_parity.py": "c2f40423d588532a5d9f651152a045db3d0f5b1de5c93d33261c6d6ccce6c56e", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "5ce5c6eaa5f8a2557a620e533788217b1eb430654801dcf6135d6c92d7a012ac", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "d983b2e518e2da5089e55f03226570e8b6b3132fbb5566287fc8acf2d63038ec", + "crates/horizon-world/src/worldgen/feature_region.rs": "79e8ce343b0dc80dceb8b214c818b383d9b110540bb8c3b0ac32863a7800e288", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "33f8a02039131338cc0f50c53bc53df9d069f0d787c84699f07bf6e949a0e6f9", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "197d6660307c61808351ad9b57a1ce54bd6f4782c1bbbc28b14407afb71bbbcb", + "crates/horizon-world/examples/simple_block_fixture.rs": "2fd31ed9b7405cf59df24bb0eff4c7eb9bae4cd211e949c3b53cc3626febc9fa" + }, + "fixtures_sha256": { + ".local/rust-spike-parity/inputs.txt": "e17fd6c5927c52b9bb925d7d3618160b60dbefb826b3393b674d9e84ddf6a401", + ".local/rust-spike-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-spike-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-spike-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-spike-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-spike-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-spike-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-spike-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-spike-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-spike-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-spike-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-spike-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-spike-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-spike-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-spike-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-spike-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-spike-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "4c7ad7206f10188c86e530a67c915458846cfbba8dad25d3154b308db35f1ae1", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "4c7ad7206f10188c86e530a67c915458846cfbba8dad25d3154b308db35f1ae1", + "matched_output_lines": 8859761 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "4c7ad7206f10188c86e530a67c915458846cfbba8dad25d3154b308db35f1ae1", + "matched_output_lines": 8859761 + } + ], + "scope": "Native SpikeFeature required state/predicate codecs, air descent, support gating, height/radius draws, rare tall spikes, float taper and edge draws, independently tested mirrored layers, and discontinuous roots with a fixed Y=50 floor. Every configured output, origin and candidate state is compared through failure-terminated prefixes. Full runs cover 1024 seeds per RNG, replacement/support predicates, exact-state root exceptions, rejected writes, repeated mutations, query failures, wrapped positions and placement/overlay composition. Rust limits pathological descent/root work to 2^20 visits. World update execution and complete generation remain pending." +} diff --git a/benchmarks/rust-spring-2026-10-06/scoped-parity.json b/benchmarks/rust-spring-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..df273de7d --- /dev/null +++ b/benchmarks/rust-spring-2026-10-06/scoped-parity.json @@ -0,0 +1,207 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 172141, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "7ced6f7a0c44a40fe211d3e3bbfe5b5085bbb4e59a3a8d2f24592602825504c2", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "99a396b9b983f6ca9149133251f3ece9aaf76d3d16dafa1f322378212a19490c", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_spring_parity.py": "9fe53cc4c5f55ae5f1fae6c067b469bb7d972d791a6858a0dd1823c3fe3bfea7", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b3caf26bd3afc9d10cdcca3f7e794c30abf5ba09afa1fe80ba8f44713acdb274", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "bc8fb1a17cd988f7cfc1612180b68d87f90581ec034b880471b840452e66d543", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "0200de733c276f8ddc228f826b85ca0b650f9f3e8b10cf3291cfe005ae060ba9", + "crates/horizon-world/src/worldgen/feature_region.rs": "3b893ceafbdd1d7b4264f4022dbdb6a7142dfc7001a5cf5c304f5ca7695dfaa0", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "c04a1f7e9409b0cea0ed9b90fd033fc5a398b66f2688b7f6c0583facc473c457", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "8764f1f4bea56e6b826740e1e654387850116cba9e48f0595a7742eb618425e4", + "crates/horizon-world/examples/simple_block_fixture.rs": "1d2005bdc82c0c0d86d13d00b105983d431c7da6fa5357f4b1f6c43bdcc0019c" + }, + "fixtures_sha256": { + ".local/rust-spring-parity/inputs.txt": "5c359529c58cddcf3c37df0d585727d1f337800952778fc6b046ddb1cc266a4d", + ".local/rust-spring-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-spring-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-spring-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-spring-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-spring-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-spring-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-spring-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-spring-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-spring-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-spring-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-spring-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-spring-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-spring-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-spring-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-spring-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-spring-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "24f486c78cd80a9b299aa4816698ed9cbb67802ed151461e9ed4e74807ea379d", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "24f486c78cd80a9b299aa4816698ed9cbb67802ed151461e9ed4e74807ea379d", + "matched_output_lines": 3649087 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "24f486c78cd80a9b299aa4816698ed9cbb67802ed151461e9ed4e74807ea379d", + "matched_output_lines": 3649087 + } + ], + "scope": "Native SpringFeature codec and ordered cavity checks. Every block state is exercised above, below, at the origin and as a horizontal neighbor; all air/rock/other five-neighbor combinations and requested count pairs, overlapping air/valid-block membership, defaults, malformed fields, tags, wrapped coordinates and all 37 fluid states are included. Separate ordered rock and hole reads, flags 2, rejected writes, immediate fluid tick requests even after rejected writes, partial failures and untouched random streams are compared. Scheduled requests, named providers and overlay/modifier composition are traced; execution of fluid ticks, spreading and full gameplay remain pending." +} diff --git a/benchmarks/rust-sprite-animation-2026-10-06/scoped-parity.json b/benchmarks/rust-sprite-animation-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..ee6ec6ac4 --- /dev/null +++ b/benchmarks/rust-sprite-animation-2026-10-06/scoped-parity.json @@ -0,0 +1,48 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "resource_animations": 63, + "native_tick_states": 258996, + "fixtures": 907, + "rejected": 203, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSpriteAnimationOracle.java": "90b291abb0b76620f9ca719162393d4fe305ecfb9388d4675d3df89ac1ba136b", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java": "7526f20513c549483122ab0d5ad24b9e87f38dc2f6aae55addd701a91ac85e43", + "tools/test_sprite_animation_parity.py": "ea5961ff5e7770eeec6e91a916fedd3ec72dbf05e87cbeb8a8d2429440407d48", + "tools/test_model_baking_parity.py": "392ffec44918fb91740ca4a1316d684480d39f14bd34d46175f7f44946d15bd7", + "tools/test_cuboid_model_parity.py": "3b7c018570b0f609aae43cef60ff3139c543d5d629be804a5aa257e3ab2dd67c", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "fed441cad861a44e9919087307cdb9b3d8165fe36ae05ab03f72dde23758cbd5", + "crates/horizon-assets/Cargo.toml": "fadb78cf819e026500606c45d27138ed67fcbbc967ae8cee6c1e7c82c9046b36", + "crates/horizon-assets/examples/cuboid_model_fixture.rs": "97609d90e3f6ce340f3590296db2dc778113bb2b33c7d1b54080a1d6f3023f40", + "crates/horizon-assets/examples/model_baking_fixture.rs": "59caca09dd5afd0b70a2e8fdb8e949deb9322f00adc617918b33d1e7e5b0b522", + "crates/horizon-assets/examples/model_resolution_fixture.rs": "c071067140299e49345a6ebd94e15b3b6d853cb9ae11d8de46e3cbdfb8b01f0e", + "crates/horizon-assets/examples/sprite_animation_fixture.rs": "254314d52deda129ab461221d3d8b95323a60730d374e566c1cd599fba85f072", + "crates/horizon-assets/examples/support/mod.rs": "bcf5a6d8a54845982191e037911c24139237771d6afa4b01b1e83c011489c3f5", + "crates/horizon-assets/src/animation.rs": "ccd51499549d0aa040076406092e35420db56c52f8797a099a0c2468dd8665b1", + "crates/horizon-assets/src/bake.rs": "0bc519e93ad8200d89543ceb5c811dd82bbeb0e9003b143385c8a03e758dfe65", + "crates/horizon-assets/src/json.rs": "e7b89bf4852f561a0e5bf1a984857c61e755961dfd86fcc326b6d55558615f39", + "crates/horizon-assets/src/lib.rs": "92482e4ff4ca46ff5c11a9618ed5007e205762be6390d91648f95068510f0390", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541" + }, + "fixtures_sha256": { + ".local/rust-sprite-animation-parity/inputs.jsonl": "72ccfab50067a4e578c5ce498e395abfdc55df65c487cea758c1e723cabf4da7" + }, + "rust_output_sha256": "842c6693d75234d93b5623be5f55c2fbe739e94b3ec32241b96c81cd6d81317e", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "842c6693d75234d93b5623be5f55c2fbe739e94b3ec32241b96c81cd6d81317e", + "matched_output_lines": 907 + } + ], + "scope": "Actual AnimationMetadataSection JsonOps codec, frame-size calculation, SpriteContents sequence construction and AnimationState ticks. All bundled animated texture metadata plus synthetic numeric, null, invalid, repeated and out-of-image frame cases. Valid image grids only for SpriteContents construction. No resource-loader fallback, image decoding, GPU interpolation pixels, atlas packing or gameplay parity claim." +} diff --git a/benchmarks/rust-sprite-animation-2026-10-06/startup-smoke.json b/benchmarks/rust-sprite-animation-2026-10-06/startup-smoke.json new file mode 100644 index 000000000..064b842ef --- /dev/null +++ b/benchmarks/rust-sprite-animation-2026-10-06/startup-smoke.json @@ -0,0 +1,76 @@ +{ + "adapter": { + "backend": "Vulkan", + "device": 0, + "device_type": "Cpu", + "name": "llvmpipe (LLVM 21.1.8, 256 bits)", + "vendor": 65541 + }, + "animated_sprites": 1, + "animation_uploads": 1, + "arch": "x86_64", + "camera_pitch": -0.3839724354387525, + "camera_position": [ + 25.0, + 18.0, + 25.0 + ], + "camera_yaw": -2.356194490192345, + "elapsed_seconds": 0.885915504, + "error": null, + "merged_quads": 166, + "model_gallery": [ + "oak_stairs", + "stone_slab", + "anvil", + "torch", + "lantern", + "oak_fence_post", + "oak_fence_gate", + "iron_bars_post", + "cobweb", + "grindstone", + "ladder", + "amethyst_cluster" + ], + "model_quads": 145, + "os": "linux", + "presented_frames": 30, + "project": "Horizon", + "resident_chunks": 9, + "schema": 1, + "scope": "Native cube and cuboid-model renderer with binary cutouts, stepped sprite animation and free camera; no gameplay simulation", + "sprite_layers": 18, + "window_size": [ + 1280, + 720 + ], + "resource_files": { + "files": 5579, + "sha256": "0bc95c8e4b10ef7401f4b948e9a151ea2f9d9112e8dadb9f6807a51e143fcf6f" + }, + "executable_sha256": "e71e99a994250a22e530fe713c3323c7336f80eed04b1104828e5203857b4a82", + "resource_manifest_sha256": "eda44ebee6904eab880c15458dbd1212dc2799d320a4419fc810e2ceb0e5d9d6", + "sources": { + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "fed441cad861a44e9919087307cdb9b3d8165fe36ae05ab03f72dde23758cbd5", + "tools/test_native_client.py": "e47a866cffd20fcd6fdab62fca573227ca9837488e72384f08f8c33fd4b6228c", + "crates/horizon-client/Cargo.toml": "d56524457d761c2613c0699b20e21ad6977d93e009d59ef150bbd9fc20d7a025", + "crates/horizon-assets/Cargo.toml": "fadb78cf819e026500606c45d27138ed67fcbbc967ae8cee6c1e7c82c9046b36", + "crates/horizon-client/src/assets.rs": "c953a42820cb8d19d8964d4807df401614d4d6621bb47d8ba591c8db38f3e214", + "crates/horizon-client/src/camera.rs": "f9821c8a51a004dd4ad9c0952e746eb07926f6040cf8660bc26da5a0728ae572", + "crates/horizon-client/src/main.rs": "7fb00e89b963a77f124c8e7ad59c5506a4a2f3e6c69720944dec00677ed15239", + "crates/horizon-client/src/mesh.rs": "e2fa00435ec8239ba8a3c6539022bb50a10ff9c3850c6faab72f86aabea896ef", + "crates/horizon-client/src/models.rs": "70b0273100e83afbfc5c013c79afae1e6b13565845e067ad3303244c3f0bbe68", + "crates/horizon-client/src/render.rs": "0f8929d9061b20adbc5ddd0adcbe9f90ce76227b7bb9bafe3f4474961ee2984c", + "crates/horizon-client/src/sprites.rs": "4dd10998581f901bd1c72ed49c27671f362f18285e86e795ddadd11cbc255f69", + "crates/horizon-client/src/world.rs": "901aa59c23ea084e926eec014589f4d511c41691a8dc1520534e039c28cfc76c", + "crates/horizon-client/src/world.wgsl": "82873c131f46a31aef35106f89a53589f179048362d0f8877eca6d20aa6274a4", + "crates/horizon-assets/src/animation.rs": "ccd51499549d0aa040076406092e35420db56c52f8797a099a0c2468dd8665b1", + "crates/horizon-assets/src/bake.rs": "0bc519e93ad8200d89543ceb5c811dd82bbeb0e9003b143385c8a03e758dfe65", + "crates/horizon-assets/src/json.rs": "e7b89bf4852f561a0e5bf1a984857c61e755961dfd86fcc326b6d55558615f39", + "crates/horizon-assets/src/lib.rs": "92482e4ff4ca46ff5c11a9618ed5007e205762be6390d91648f95068510f0390", + "crates/horizon-assets/src/model.rs": "57ddb3d65e88e7a8aa22c62bc298a2dae7f4e994326a873a31f06c0f36ed051b", + "crates/horizon-assets/src/resolve.rs": "3927ac926cdcbd7d334901cc32d0ecc1e498b1bec98f76a46bca6d4964c13541" + } +} diff --git a/benchmarks/rust-state-provider-2026-10-06/scoped-parity.json b/benchmarks/rust-state-provider-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..11dc44ae2 --- /dev/null +++ b/benchmarks/rust-state-provider-2026-10-06/scoped-parity.json @@ -0,0 +1,217 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "blocks": 1286, + "integer_properties": 146, + "codec_inputs": 356935, + "provider_types": 10, + "named_providers": 22, + "rule_predicate_types": 16, + "survival_supported_blocks": 1286, + "survival_supported_states": 35723, + "support_cached_states": 35524, + "support_dynamic_states": 199, + "biomes": 67, + "biome_tag_files": 88, + "fluid_tag_files": 11, + "bundled_provider_definitions": 8, + "block_tag_files": 302, + "requested_samples": 79473574, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStateProviderOracle.java": "3dcf6c76e1a0d8f80946ef7773c52343e542977414fe269f46ebd7b77a3340c0", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialConditionOracle.java": "04a87405fd2a1c79baf4eb3a8895aa66dc96b8f6baffb9b486ef207f8b91b5ee", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeTemperatureOracle.java": "243bbc525c6aec24674e7f172c5fb4f7b50f9a679d8b9dfba40ea278219a2d28", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAnchorOracle.java": "226628d98b89aadbdd374936575d033945e7064a900dbb050c662204dbc7e119", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "99a396b9b983f6ca9149133251f3ece9aaf76d3d16dafa1f322378212a19490c", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_biome_temperature_parity.py": "68f84d02e7802349e491b8cb66e18d9b08c9e72ab2306b663667259e852cc2b1", + "tools/test_material_condition_parity.py": "01c82e1a768d9131f8f7e6d59d01ddb06272074469dbdcd8547f44f0a8fa152d", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_state_provider_parity.py": "7e39c1497e9f535998a70bcfbe38852a791e65c9688ce6f92f25547a07d040f6", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_properties.rs": "b3caf26bd3afc9d10cdcca3f7e794c30abf5ba09afa1fe80ba8f44713acdb274", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "2c882aeb095c27a8edfda1e934ac829102e4be136d53fd83110132150b7293b1", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "8a2834a9347ee2c2db7cf1c86a064907ec06e9ac16ba9cc3936e315fc4ad49ca", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "09f697d8d4e709acacc8e9f7c35c5fd307bab6ab0df4a1339fe760afc655cdab", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "82a424d3b20837dc401005f5fe038616659eb17b5bbd78d0c8c29f8bdeb1104a", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "fe61a5e43179a7588737a71782ea246811fe2c8721e74793e1ac018c8eb93c34", + "crates/horizon-world/src/worldgen/feature_region.rs": "2c78e5f1bdb08307f8d982f231f1abbc3306cd54348d9023b86ee6ed3516fd33", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "cd1d2fe305ad4e205e7e01b32128ff895fa8aacc76fa11f200ad6c7c9fba1f49", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "fa0616353f07460975ab323357ab280b7f35e7bfe2de6edc08d304316766ed26", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "9cc353d474184f4db880c4305137ec6e35a564a983f602c76af39349ecb58541", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "821981c893fc84312351503f2be0c06c681d8bc768dade14576697cf047a9f8f", + "crates/horizon-world/examples/state_provider_fixture.rs": "76c4648eb1b873b8e30c60da5350bb31794e5c539f8719ed914503538db0347b" + }, + "fixtures_sha256": { + ".local/rust-state-provider-parity/inputs.txt": "536f1388bc26c0ceb87cb656934b3600e567ef594b15e818108c8a25a0d900fa", + ".local/rust-state-provider-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-state-provider-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-state-provider-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-state-provider-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-state-provider-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-state-provider-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-state-provider-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-state-provider-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-state-provider-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-state-provider-parity/biomes.json": "9b26dc3b662627dc3bbbf8da209f287882ce79ff4daf8f454b994ddc7510df99", + ".local/rust-state-provider-parity/biome_tags.json": "2c0193d998b196c2b909e92f51e8158f5e8773f5387ade5a8b85a85f063ca560", + ".local/rust-state-provider-parity/fluid-tags.json": "244b4f208fd0d14613e1ded922c13ccb30a57b0b85db77b8922d3564e224774f", + ".local/rust-state-provider-parity/catalog.json": "7331cac31ef90434ab71ac75bad0a68e9abfd96942416a650a7d0e75f0ab558e", + ".local/rust-state-provider-parity/providers.json": "65f3c3a9a45682d9f654f772c871d70bced81fb133209b29cac06e26a1409c75", + ".local/rust-state-provider-parity/tags.json": "58948bd795faff8714b71ba1076afc68a645591e043ab97f1dec69817ed6885a", + ".local/rust-state-provider-parity/facts-client.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-state-provider-parity/facts-server.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b" + }, + "rust_output_sha256": "fd4afc0b54a8891aabf15f6b52fb47a50f73ebc4fa07200080a42741a905b594", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "fd4afc0b54a8891aabf15f6b52fb47a50f73ebc4fa07200080a42741a905b594", + "matched_output_lines": 257299719 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "fd4afc0b54a8891aabf15f6b52fb47a50f73ebc4fa07200080a42741a905b594", + "matched_output_lines": 257299719 + } + ], + "scope": "Actual BlockStateProvider DIRECT_CODEC/TYPED_CODEC and simple, weighted, random_block, rotated, copy_properties, randomized_int three noise-based providers and rule_based over the pinned state registry. All states and block defaults, full-state versus typed exclusive decoding, ordered holder sets/tags, duplicates, empty optional results versus world-state fallback, zero/overflow weights, query failures, every state across six fixed rotations, nested random rotations, property copying for every target state against representatives of every compatible property value, integer-property ranges/missing properties, composed transforms and subsequent random consumption. Native property equality families are checked for ambiguity; Rust validates Cartesian state tables and uses compact property strides. Both legacy/xoroshiro streams execute directly and through WorldgenRandom. Noise comparisons include every bundled provider definition, independent legacy seeding, float/double scaling, dual-noise variety selection, threshold draw order and coordinate/codec boundaries. Rule-based comparisons cover true/not/all_of/any_of/inside_world_bounds/height_range/volume_match/matching_block_tag/matching_blocks/matching_fluids/matching_biomes/unobstructed/solid/replaceable/has_sturdy_face/would_survive predicates, ordered optional results, fallbacks, nested rules and world-query failures. Every pinned block-state fluid identity, amount, falling/source flag and own-height bits are derived from descriptors and compared. Fluid-holder sets and all bundled fluid tags are tested against every state. Biome-holder membership and all bundled biome tags are compared across every pinned biome identity, including empty sets, missing names, ordered world queries and short-circuit composition. Unobstructed predicates compare null excluded entities, exact translated unit-shape bounds, ignored-but-validated offsets, true/false world results and failures. Named holder versus direct/typed decoding, nested named providers, missing names, inline ambiguity, ordered resource registration and all bundled named definitions are compared. Solidity and replacement predicates cover every block state, offset wrapping/validation, empty-child fallthrough, composed predicates and query failures using privately imported definition flags and Rust-calculated collision solidity. Has-sturdy-face predicates cover all 35,723 states through unified cached/dynamic support dispatch across six directions, native offset rules, failed state reads, block-entity query failures and ordered optional-child/boolean composition. Block entities are absent in this integration corpus; shulker animation-state shape selection is separately tested and active moving-piston shape generation is tested separately. Would-survive decodes candidate states and bounded offsets, evaluates all supported candidate states and each rule against every neighbor state, and preserves world read/entity failures and short-circuit/optional-child behavior. All pinned survival families are bound through the recorded definition inputs. Complete registry loading/reloading, full block placement behavior and full feature generation remain pending." +} diff --git a/benchmarks/rust-status-effect-2026-10-07/scoped-parity.json b/benchmarks/rust-status-effect-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..38afe568b --- /dev/null +++ b/benchmarks/rust-status-effect-2026-10-07/scoped-parity.json @@ -0,0 +1,291 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 2379, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStatusEffectOracle.java": "15b5cf711b86d20ada2f0dcfa6d520ccd1eccb4e009160fd64765f7a208eb5f6", + "tools/test_status_effect_parity.py": "2d2c264ff823889d58a05694b52b4c5d366f1105396806e0cac4a7d86b04de5f", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "a3ad79b1a4ea171726f07b1fc6e2b78f224157e8f0d53dd2ce96e93ccd2d38dd", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "6bd97d87f0e3eaad440162145a1515b9a0b7cfb85cb0ea337874ed9745f8dd45", + "crates/horizon-world/src/lib.rs": "479903c1bd985df82ce55ccca6399d5a31091b4d9832f2f8d58c6fb0effa4058", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "c9efdbed61340bbbce0708311240b5d69bc313401c7caf3cc67ff855476967bc", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/status_effect_fixture.rs": "7c96b8669e49c53cc0218f1111c3e4e8ae0e7ac91015b98b513b4138e11343c7" + }, + "fixtures_sha256": { + ".local/rust-status-effect-parity/inputs.txt": "ec1b31d6e2261fccaee2f071f13b270f8788baa7a73ca059d270f9ccf7d2e025" + }, + "rust_output_sha256": "c7343ea038046cd13abd6ae31e2fe1870a4d92af606b8bf9ed3e40d2905e754b", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "c7343ea038046cd13abd6ae31e2fe1870a4d92af606b8bf9ed3e40d2905e754b", + "matched_output_lines": 655643 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "c7343ea038046cd13abd6ae31e2fe1870a4d92af606b8bf9ed3e40d2905e754b", + "matched_output_lines": 655643 + } + ], + "scope": "Actual MobEffectInstance constructors, copy, update, duration mapping/scaling, equality and blend copying. Compares shared hidden-chain topology, aliases, raw and constructor-clamped amplifiers, infinite and overflow durations, copied scalar fields, reset blend state, and duration mapper mutations/failures. Mismatched-holder diagnostic logs are outside the comparison. Server/client ticking, effect behavior, registries and entity integration remain pending." +} diff --git a/benchmarks/rust-status-tick-2026-10-07/scoped-parity.json b/benchmarks/rust-status-tick-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..222d87343 --- /dev/null +++ b/benchmarks/rust-status-tick-2026-10-07/scoped-parity.json @@ -0,0 +1,293 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 2552, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStatusTickOracle.java": "01b3b61eb779b40c238243dae54d7f4bb48aa52199564f25d69e842d3b812bf0", + "tools/test_status_tick_parity.py": "f38956b1be4ef211818c7a5492d8fcac1e5779cb7a1dc8418caafe6492f055e0", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "a3ad79b1a4ea171726f07b1fc6e2b78f224157e8f0d53dd2ce96e93ccd2d38dd", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "6bd97d87f0e3eaad440162145a1515b9a0b7cfb85cb0ea337874ed9745f8dd45", + "crates/horizon-world/src/lib.rs": "b4184f71a8d817197b8730c8f002b96bdeb248028b2330fbc7bdd7fe11ea7049", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/status_tick_fixture.rs": "3883b38bde9e55f6e5cd411615441f8f2682198ad7e4d30a28a8edccb17b392b" + }, + "fixtures_sha256": { + ".local/rust-status-tick-parity/inputs.txt": "c3548162354280e1cacb5a45a060c6f38212679242f6907a42ee12e20c491b56" + }, + "rust_output_sha256": "707a7790ec99f9d9e8e328d76a421c1df1be6d28936b4790303bad6b0380989a", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "707a7790ec99f9d9e8e328d76a421c1df1be6d28936b4790303bad6b0380989a", + "matched_output_lines": 412552 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "707a7790ec99f9d9e8e328d76a421c1df1be6d28936b4790303bad6b0380989a", + "matched_output_lines": 412552 + } + ], + "scope": "Actual MobEffectInstance server/client ticks, skipBlending and getBlendFactor with shared instance/hidden-chain storage. Controlled MobEffect scheduling/application/blend-duration callbacks compare duration countdown, infinite actor clocks, hidden restoration and notification, live-state rereads, float interpolation, removed actors and callback mutation/failure prefixes. Concrete registered effect behaviors, entity effect maps, UI rendering and full gameplay remain pending." +} diff --git a/benchmarks/rust-stored-consume-2026-10-07/scoped-parity.json b/benchmarks/rust-stored-consume-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..64e833752 --- /dev/null +++ b/benchmarks/rust-stored-consume-2026-10-07/scoped-parity.json @@ -0,0 +1,298 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 3292, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredConsumeOracle.java": "0dc54cee95ed6416c3539c6e046e5efcc74120cc9be1aec5b75605ee7870d5af", + "tools/test_stored_consume_parity.py": "e6c0511067dfae838322d519fdd5ec02537287de94440da980b399d72a0d6e4a", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effects.rs": "1788f48f7f88463ced734af0bb02610cd7a991d5a6bdeaa2f9f198a4b7312c2a", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "cdb393bc95af39318aff30af90ab1aa82fbe989e25d194f79d6a1c2708d3c9de", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/stored_consume_fixture.rs": "65e97b29b504ba150314b1ebcdffe4855994e2060b365a75c03bbe60a0e146df" + }, + "fixtures_sha256": { + ".local/rust-stored-consume-parity/inputs.txt": "e137367d3154aafecfd48bf868dd3a84e4427d9196eab6efff14c458a715cdbe", + ".local/rust-stored-consume-parity/inputs-client.txt": "90a64e6b27537f79b5c7be26413fd72507b07cd83f908ddf7266e718ce1a0694", + ".local/rust-stored-consume-parity/inputs-server.txt": "90a64e6b27537f79b5c7be26413fd72507b07cd83f908ddf7266e718ce1a0694" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "e91e3946682b3410a907226c14ca169ddef0668c8e993f4bfee65bc956d1fc01", + "rust_output_sha256": "e91e3946682b3410a907226c14ca169ddef0668c8e993f4bfee65bc956d1fc01", + "matched_output_lines": 1214124 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e91e3946682b3410a907226c14ca169ddef0668c8e993f4bfee65bc956d1fc01", + "rust_output_sha256": "e91e3946682b3410a907226c14ca169ddef0668c8e993f4bfee65bc956d1fc01", + "matched_output_lines": 1214124 + } + ], + "scope": "Concrete apply/remove/clear/sound consume effects composed with inherited LivingEntity effect storage, actual status instances and JDK maps. Both RNG kinds, probability edges, ordinary instance copies, hidden updates, duplicate effects, source identity, map iteration/copy order, callback mutation and failure prefixes are compared. Native holder hashes and identity hashes are captured per reference run. Eligibility, registered effect bodies, attribute/packet notifications and sound delivery remain controlled. Full consumable/player lifecycle and gameplay remain pending." +} diff --git a/benchmarks/rust-stored-effect-attributes-2026-10-07/scoped-parity.json b/benchmarks/rust-stored-effect-attributes-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..e4d9bd2a1 --- /dev/null +++ b/benchmarks/rust-stored-effect-attributes-2026-10-07/scoped-parity.json @@ -0,0 +1,308 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 839, + "fastutil_sha256": { + ".local/minecraft/26.3/libraries/server/it/unimi/dsi/fastutil/8.5.18/fastutil-8.5.18.jar": "9094ae67d01d0ad246f886f11ad557fc2e79c72cbf3feed83e1512a8ae90a74a" + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredEffectAttributesOracle.java": "be47915cf63cbbac82b9506d9bd59636714a550a58ef3924b0be3d48999f432a", + "tools/test_stored_effect_attributes_parity.py": "1e2841cc9eba5421d9abfd04b462c0df43496de61a9877591daddf05ec0fe29e", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attribute_map.rs": "15dc8cef354efe903819ac7000f7d1aa3161651bb6b97336901bf4930fd9cb6d", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "7d950efc4eaa4771b6831074b9ad12ba268b2955b53566573581f857f422b9f2", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/stored_effect_attributes_fixture.rs": "685b513103deefeda50f3773a81a33e8466285f4ce6a10d91b091a63ceab6e96" + }, + "fixtures_sha256": { + ".local/rust-stored-effect-attributes-parity/inputs.txt": "2851e6a39211497a88c1c05cd851c0dba5a844c9968ce540d05ce7e5ed2dc9d1", + ".local/rust-stored-effect-attributes-parity/inputs-client.txt": "be82af30ab04178a03bdfc8002b39027f240dc7265d0d64100b959c8911521b6", + ".local/rust-stored-effect-attributes-parity/inputs-server.txt": "122cd486cb0fa92fad4134af583f92cb4fbc44056a4ee0f6b6d4604715fa6e89" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "51d2cb0b824da98920fe7dbc4f5594a19d8fb376666f2b9b5bbbf923b9c9894f", + "matched_output_lines": 4543569, + "rust_output_sha256": "51d2cb0b824da98920fe7dbc4f5594a19d8fb376666f2b9b5bbbf923b9c9894f" + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "295b3d856d2fe281a6b438bd78d2810d20e40fe450cc2f84da7258213e9f8db1", + "matched_output_lines": 4543569, + "rust_output_sha256": "295b3d856d2fe281a6b438bd78d2810d20e40fe450cc2f84da7258213e9f8db1" + } + ], + "scope": "Actual MobEffect modifier application bound to actual AttributeMap.getInstance, AttributeSupplier.createInstance and AttributeInstance replacement/modifier storage. Compares lazy creation, failed creation retained in update queues before map insertion, null cached entries, map key aliasing, native identity-hash update/sync set order, captured instance ownership after map clearing, dirty callback mutation/failure and value/cache/permanent state. Native instance identity hashes are exported per JVM for Rust replay. Supplier prototypes use real basic attributes and base values; isClientSyncable/getDefaultValue are controlled callbacks. Registered definitions, entity notification binding, bulk map methods and full gameplay/platform builds remain pending." +} diff --git a/benchmarks/rust-stored-effect-notifications-2026-10-07/scoped-parity.json b/benchmarks/rust-stored-effect-notifications-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..85a2f8331 --- /dev/null +++ b/benchmarks/rust-stored-effect-notifications-2026-10-07/scoped-parity.json @@ -0,0 +1,312 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 2225, + "fastutil_sha256": { + ".local/minecraft/26.3/libraries/server/it/unimi/dsi/fastutil/8.5.18/fastutil-8.5.18.jar": "9094ae67d01d0ad246f886f11ad557fc2e79c72cbf3feed83e1512a8ae90a74a" + }, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredEffectNotificationsOracle.java": "6e6e80d6b853054331f371875ab75972635ded89df0a0de626e0265f54257a5b", + "tools/test_stored_effect_notifications_parity.py": "6f1e9fc7f7a6e722e20349ba0e04562608e6027d73a92cf34e21e9786f698a0e", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/active_effect_tick.rs": "88f19cfc3532c47a58c646bb3e9d99ff239a900752302b6a444dda3013e95cbf", + "crates/horizon-world/src/active_effects.rs": "daaf352a69511a7d69fb329997f783b86585e486e0379c84ab0a55641771646c", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attribute_map.rs": "15dc8cef354efe903819ac7000f7d1aa3161651bb6b97336901bf4930fd9cb6d", + "crates/horizon-world/src/attribute_updates.rs": "4cb322d75a50d222298994607097ba7f7e6674021128fa02a98a74c057ad05f1", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/effect_attribute_modifiers.rs": "0bc7ab63d0f3f34a7133fe20364cae0ec1fdbd3773cba90faa1f08e0d63a5646", + "crates/horizon-world/src/effect_notifications.rs": "ea66bfa010d6d44aee97b9672902f41cd99d0d80239f41c6d4eae5c9a9472d3d", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "37c921889c4f5d91f7c09ab2ee68d1a5e5a3c4fb1c49b4b189c987b4615fd2d6", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "955502e696d7b0b33bae3ec485c8eb1453a8956116aad68226cf1fc67d60babc", + "crates/horizon-world/src/lib.rs": "1c4256a2c6858b9e9e34466b684839b7cc8b4d18c3ee4a6edd20b413349ffa32", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/object_open_map.rs": "b4934a9cc38df93ed206ab0bc3bbc4499acd8e40b41b7def7d47067b7170065b", + "crates/horizon-world/src/object_open_set.rs": "d3e0373bf1b652dd054345d5a8e25ec828e06dd7cad65aada35163c95df4e637", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "588bfcf4d93f50be86cb89545bd5c431edbc71771f704ff55cb52906b1964c37", + "crates/horizon-world/src/stored_consume.rs": "621a52c9fba447c393e561f881a16cf1f97d336e3a0ce493725ef51e2db12ffd", + "crates/horizon-world/src/stored_effect_attributes.rs": "c79f6a52d3cfee1a5288225bf8fa91a7bf3ea8cd21faea9f6dc748ecefc6309a", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/stored_effect_notifications_fixture.rs": "92f4142f123246bbe34b35b105dbfc26ee9b9de6d7efca0ea23c63b8d06d54de", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredEffectAttributesOracle.java": "be47915cf63cbbac82b9506d9bd59636714a550a58ef3924b0be3d48999f432a", + "crates/horizon-world/examples/stored_effect_attributes_fixture.rs": "25d03a5c31d7e1679456d852244c3b40a186b9d5140a2bac3944eba9f37b1d35", + "tools/test_stored_effect_attributes_parity.py": "1e2841cc9eba5421d9abfd04b462c0df43496de61a9877591daddf05ec0fe29e" + }, + "fixtures_sha256": { + ".local/rust-stored-effect-notifications-parity/inputs.txt": "ed75b9258d94ce4345521efdafb8826b1b9ba0289c0ad7026da4daa0b9b8019c", + ".local/rust-stored-effect-notifications-parity/inputs-client.txt": "c0da70b5df822103387543ec04b90e7e3d16b9e32f61bb9082ac4374228fd19a", + ".local/rust-stored-effect-notifications-parity/inputs-server.txt": "006d5b03b3073b9c99d4827fceb17f28d93b0eeb6e9219c626fb9ef678098526" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "f650ee0475e5069a658482293f457846ecee856cc770e457553bdee12223268e", + "matched_output_lines": 21117051, + "rust_output_sha256": "f650ee0475e5069a658482293f457846ecee856cc770e457553bdee12223268e" + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "93587e196e749ec55c6cfe7337f42d58e621a5224b71ad46ac50ee87b56f1714", + "matched_output_lines": 21117051, + "rust_output_sha256": "93587e196e749ec55c6cfe7337f42d58e621a5224b71ad46ac50ee87b56f1714" + } + ], + "scope": "Inherited LivingEntity onEffectAdded/onEffectUpdated/onEffectsRemoved and private refreshDirtyAttributes, with actual MobEffect modifier bodies, AttributeMap.getInstance, AttributeSupplier.createInstance, AttributeInstance storage and native pending update/sync sets. Includes complete stored-attribute corpus plus client guards, effect dirty state, reapply/empty removal, refresh failure prefixes and callback map/queue mutation. Actual JVM identity hashes replayed separately in Rust. Virtual onAttributeUpdated consequence, basic attribute default/syncability methods and level client flag are controlled; passenger lists are empty (packet paths have separate gates). Registered definitions, combined health/dimension consequences, full entity lifecycle/gameplay and platform builds remain pending." +} diff --git a/benchmarks/rust-structure-density-2026-10-06/scoped-parity.json b/benchmarks/rust-structure-density-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..b1b4e9bfd --- /dev/null +++ b/benchmarks/rust-structure-density-2026-10-06/scoped-parity.json @@ -0,0 +1,115 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 183, + "scalar_queries": 28093, + "volumes": 339, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStructureDensityOracle.java": "24fa3c5ac568997ede53cebc4bf9c8a98ba0586e195c74c2217a2770c8c104ec", + "tools/test_structure_density_parity.py": "9020711ae9f53c950c7a644a5587f0298f3bae272ce501cf653df51b85bddf4a", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "3968e2a337a6a23226c485057c79359e66df16683f00fb4ebc9fabb03910a015", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry.rs": "f46065659e60eb5e84ad69b9f3b5e94dc87ee19de16408817e26f23d16b6c7e7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "134cf93b53a40fb1ed0e0170c90316c80e270773b2968c63dc3f9cef2c941bff", + "crates/horizon-world/src/worldgen.rs": "b89dd4a9de02caf6bce457304a105ffbc0f0f220f8647c095852a45a1bf292bb", + "crates/horizon-world/examples/structure_density_fixture.rs": "780cbf5dbf1f948e2d8aac54eff67a900de652fe31eb007f55dd33177f38fdab" + }, + "fixtures_sha256": { + ".local/rust-structure-density-parity/inputs.txt": "1c948f36b4741ce0f5a16ccd5c3bda0626274a40ccdfcaabb95210336ed21836" + }, + "rust_output_sha256": "09f0779c2f39773e4772b259ab06a217f98324b5acb0bda472d603f543ef9bf1", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "09f0779c2f39773e4772b259ab06a217f98324b5acb0bda472d603f543ef9bf1", + "matched_output_lines": 1360095 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "09f0779c2f39773e4772b259ab06a217f98324b5acb0bda472d603f543ef9bf1", + "matched_output_lines": 1360095 + } + ], + "scope": "Actual vanilla Beardifier constructor and scalar/bulk samplers from supplied ordered rigid pieces, jigsaw junctions and normalized affected bounds. Five terrain-adjustment modes, the full 24-cubed junction kernel neighborhood, ground-level offsets and extreme wrapping arithmetic, ordered accumulation, nullable/empty affected bounds, clipped strided volumes including scalar/bulk floor-clipping differences and oversized output tails. Floating outputs compared as canonical-NaN raw bits. Live structure discovery/filtering, invalid bounding-box repair, structure placement and terrain integration remain pending. Local Math.pow-derived kernel results do not establish cross-platform math parity." +} diff --git a/benchmarks/rust-suffocation-2026-10-06/contextual-regression.json b/benchmarks/rust-suffocation-2026-10-06/contextual-regression.json new file mode 100644 index 000000000..53e27ae08 --- /dev/null +++ b/benchmarks/rust-suffocation-2026-10-06/contextual-regression.json @@ -0,0 +1,220 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 785906, + "block_states": 35723, + "independent_cached_states": 35492, + "context_sensitive_cached_states": 32, + "uncached_states": 199, + "audit_positions_per_cached_state": 7, + "audit_context_types": 2, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java": "bcc421fd7948ae7385e346e3de19c58222a2cad6b39122cac241cf70f9cc6071", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaContextualCollisionAudit.java": "7546f37e4c818bd8574bd4f1359be0ea49e0fff3cd58b0b29b1e176f7f6bf6b6", + "tools/test_collision_context_parity.py": "75d6f01e072867d2bd286d2e518e123fcfe055a11ac1705ec99ecec3975cb8d2", + "tools/test_contextual_collision_parity.py": "6108a0d9e0c4e1592a336c35d096fb623eccff8ed136e31d8984c2365f66d6e9", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "2bfc6f358d3843984f70aff3a90b50fef979e866a1cad9cedfe139ef29946826", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "8dd7163be91058ac887064245f62c992caae4901a2502ab98797b1c8335d0e19", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/collision_context_fixture.rs": "2350eced6e6639490ee131d3da41416ea2e949d33583d15c2a601a8fd20ab98d" + }, + "fixtures_sha256": { + ".local/rust-contextual-collision-parity/inputs.txt": "394a00fda537f7af0840ed7dd6664581c04f4af9b383107db81df21ca9d0915f", + ".local/rust-contextual-collision-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-contextual-collision-parity/cached-collision.nbt": "4a274cd720a1bda585b02f50f16e90246576679e1e173c214548c5cbf607ab2d" + }, + "rust_output_sha256": "9b328cde8c73c2e54870991bf847c966093f067b41980e1e7daa1a26558e424d", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "9b328cde8c73c2e54870991bf847c966093f067b41980e1e7daa1a26558e424d", + "matched_output_lines": 2391334, + "audited_states": 35723, + "audit_sha256": "d50b5aa0729d1b4af7df1e1cc33c8c4f2fa927ad33f8e5ece994e58e9a90abe1" + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "9b328cde8c73c2e54870991bf847c966093f067b41980e1e7daa1a26558e424d", + "matched_output_lines": 2391334, + "audited_states": 35723, + "audit_sha256": "d50b5aa0729d1b4af7df1e1cc33c8c4f2fa927ad33f8e5ece994e58e9a90abe1" + } + ], + "scope": "Integrated contextual dispatcher across every pinned block state, eleven context variants and both always-fluid flag inputs. The native audit verifies 35,492 cached states return the identical cached shape without world/context queries at seven positions with interface and entity context providers that reject queries; liquid states query context instead. Integrated outputs compare cache-relative shape equality or full uncached geometry and ordered entity/world callbacks. Missing block entities are used here; active shulker/piston states retain separate coverage. Experimental minecart contexts, entity lifecycle and live movement remain pending." +} diff --git a/benchmarks/rust-suffocation-2026-10-06/scoped-parity.json b/benchmarks/rust-suffocation-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..a5aa8ad80 --- /dev/null +++ b/benchmarks/rust-suffocation-2026-10-06/scoped-parity.json @@ -0,0 +1,224 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "registry_states": 35723, + "block_definitions": 1286, + "definition_counts": { + "tagged_full": 1221, + "never": 42, + "closed_shulker": 17, + "always": 4, + "not_extended": 2 + }, + "tag_variants": 3, + "positions": 4, + "fixtures": 557877, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "tools/test_suffocation_parity.py": "7c7fbcd79f932839b32f3cd8e8feb02e458dc16213e310ee901cda4422ef8e10", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/examples/suffocation_fixture.rs": "49471d8eb0e706b8fd0f283117bd723650cd9f1f9b68305785f4ef011573b798", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "2bfc6f358d3843984f70aff3a90b50fef979e866a1cad9cedfe139ef29946826", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "8dd7163be91058ac887064245f62c992caae4901a2502ab98797b1c8335d0e19", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "fixtures_sha256": { + ".local/rust-suffocation-parity/inputs.txt": "ea94ccd833782d435cd18ab63dbd0a03b81af1c6e4ea97b3a742ec760e822667", + ".local/rust-suffocation-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-suffocation-parity/definitions.json": "9cac3c650353104db1648050621057bfe104dec1f44b53d0b7875f7bc20e6eec", + ".local/rust-suffocation-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-suffocation-parity/cached-collision.nbt": "4a274cd720a1bda585b02f50f16e90246576679e1e173c214548c5cbf607ab2d", + ".local/rust-suffocation-parity/tags.json": "5e1301e5a9abf7e4de93af5dae3a157e852dbdb4ea345c2eb626305a605d4f98" + }, + "rust_output_sha256": "e45ba479197c25078e02f307eabb93a87ed6f28602e94d5a6cb1038580875212", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "e45ba479197c25078e02f307eabb93a87ed6f28602e94d5a6cb1038580875212", + "matched_output_lines": 1697193 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e45ba479197c25078e02f307eabb93a87ed6f28602e94d5a6cb1038580875212", + "matched_output_lines": 1697193 + } + ], + "scope": "Actual BlockState.isSuffocating, hasLargeCollisionShape and moving-piston identity for every registered state, natural/empty/all-block causes_suffocation tags and four positions including integer extremes. Native predicate identity and constant overrides are independently classified. Rust computes cached fullness, dynamic collision fullness, piston extension and lazy shulker state queries. Every shulker state covers absent/wrong block entities, all animation states and injected query failures; all other states test provider short circuits. This does not establish live chunk/provider integration, entity movement, damage or full gameplay parity." +} diff --git a/benchmarks/rust-swimming-2026-10-07/scoped-parity.json b/benchmarks/rust-swimming-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..41f9115b0 --- /dev/null +++ b/benchmarks/rust-swimming-2026-10-07/scoped-parity.json @@ -0,0 +1,237 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 39874, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSwimmingOracle.java": "b603f9bb1e69590eb3260c404ed1fc80824efe6b5dfb5e1b954f99bea3356684", + "tools/test_swimming_parity.py": "d0eed88c27baee145c01f0785335c39581257788a2530f8cdf0e7cce33e7340c", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "57b6efae4826d164e4b37849e10615e87e4c8bb01effd8908b9914903506cf94", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/swimming_fixture.rs": "204b8500c592076ec9be9cf73f339bf04a36e253f59b3bee5f682a1aafeeabfb" + }, + "fixtures_sha256": { + ".local/rust-swimming-parity/inputs.txt": "bacfe81a0553ed652dd45bf2174a387313562520a9117c4904e63e303bf9933c" + }, + "rust_output_sha256": "0f3103043c5ea94e65c7f118d15df146891dcd60cbf4a2dd632e01894b1992b2", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "0f3103043c5ea94e65c7f118d15df146891dcd60cbf4a2dd632e01894b1992b2", + "matched_output_lines": 191142 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "0f3103043c5ea94e65c7f118d15df146891dcd60cbf4a2dd632e01894b1992b2", + "matched_output_lines": 191142 + } + ], + "scope": "Actual Entity and Player updateSwimming, isUnderWater, isInShallowWater and fluid jump threshold. Compares previous-eye/body flags, player direct flying ability guard, sprint/passenger branches, direct block-position capture, native fluid tag membership, callbacks mutating fields and injected failures. Entity data and cell fluids are controlled; full synchronized entity storage, boat interaction boxes and playable gameplay remain pending." +} diff --git a/benchmarks/rust-synced-bytes-2026-10-07/float-regression.json b/benchmarks/rust-synced-bytes-2026-10-07/float-regression.json new file mode 100644 index 000000000..0245009a7 --- /dev/null +++ b/benchmarks/rust-synced-bytes-2026-10-07/float-regression.json @@ -0,0 +1,278 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 3019, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSyncedFloatsOracle.java": "567a871ed82ad0c0d1fef6f84cc2a68732ddae9110a9926c659af77933c6f61d", + "tools/test_synced_floats_parity.py": "64a2a3ef6c4ab63fcfd18fb3cd0442e2bbe2249481cbf7899aeadb3b6b61256f", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/lib.rs": "b4e17db9fc9e788e979a8bba1e3a10d77178f010b55814e4e087c8febfdea746", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/synced_floats_fixture.rs": "71858a47a15cb62eb8b53dfb507d6e2e96d23dda04b84bdd660b49301eeb9757" + }, + "fixtures_sha256": { + ".local/rust-synced-floats-parity/inputs.txt": "22904cc4d2748db510a0a5935c1024fb2d8d5bc9ce994b414cf6d265d6ca60c9" + }, + "rust_output_sha256": "80bb47d39c2d89981b03a0dd25715fcf9ab6d3f41671e9074f3a143b0bc78c2b", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "80bb47d39c2d89981b03a0dd25715fcf9ab6d3f41671e9074f3a143b0bc78c2b", + "matched_output_lines": 554909 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "80bb47d39c2d89981b03a0dd25715fcf9ab6d3f41671e9074f3a143b0bc78c2b", + "matched_output_lines": 554909 + } + ], + "scope": "Actual SynchedEntityData Float fields: boxed equality, forced updates, callback-before-dirty flags, ordered dirty/default extraction, received assignment including duplicates, partial unknown-ID/observer failures, batch callbacks and reentrant set/assign/pack. Native table gaps are untouched default dummy Float items; tested keys are explicit configured IDs. Other serializers, type-mismatch errors, wire codecs and player absorption integration remain pending." +} diff --git a/benchmarks/rust-synced-bytes-2026-10-07/scoped-parity.json b/benchmarks/rust-synced-bytes-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..0a251b57b --- /dev/null +++ b/benchmarks/rust-synced-bytes-2026-10-07/scoped-parity.json @@ -0,0 +1,278 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 7842, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSyncedBytesOracle.java": "db5fd583900168ee962dec3d1712d1bd4c2e300b10fda0e880427805345e039b", + "tools/test_synced_bytes_parity.py": "506e437e8a3d2fe1993acb68d52765cf599d793e41be177692e5669f92e3ae52", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/lib.rs": "b4e17db9fc9e788e979a8bba1e3a10d77178f010b55814e4e087c8febfdea746", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/synced_bytes_fixture.rs": "3f422e3a1dcb6815cf90a765ad3d42a2126352523a8b5d369249e8809c688b2d" + }, + "fixtures_sha256": { + ".local/rust-synced-bytes-parity/inputs.txt": "114892687b60fa881c44ef391250db430852e4f221bc28406983c204dbf00364" + }, + "rust_output_sha256": "0faa1e20a530ac978ebb54b68731242ce7212aee21bb4c5c3782e79a11dcbdf4", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "0faa1e20a530ac978ebb54b68731242ce7212aee21bb4c5c3782e79a11dcbdf4", + "matched_output_lines": 572100 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "0faa1e20a530ac978ebb54b68731242ce7212aee21bb4c5c3782e79a11dcbdf4", + "matched_output_lines": 572100 + } + ], + "scope": "Actual byte SynchedEntityData values and inherited LivingEntity using-item/offhand queries plus protected flag writes. Covers every initial byte, signed masks, ordered dirty/default output, assignment, reentrant flag/data writes, callback packing and failures before dirty marking. Rust shares a typed scalar implementation with existing synchronized floats. Heterogeneous serializer maps, entity schema/network codecs and full item-use/gameplay integration remain pending." +} diff --git a/benchmarks/rust-synced-floats-2026-10-07/scoped-parity.json b/benchmarks/rust-synced-floats-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..c2e22e623 --- /dev/null +++ b/benchmarks/rust-synced-floats-2026-10-07/scoped-parity.json @@ -0,0 +1,251 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 3019, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSyncedFloatsOracle.java": "567a871ed82ad0c0d1fef6f84cc2a68732ddae9110a9926c659af77933c6f61d", + "tools/test_synced_floats_parity.py": "64a2a3ef6c4ab63fcfd18fb3cd0442e2bbe2249481cbf7899aeadb3b6b61256f", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "fc5fe4b491968e0c70c46561cf548138469c93f76629e1f9b20016f94b22e8d2", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "711e78438ece3e94eb156c0e64cfea06a63f79640a7a81e396ae2c1b277cdce6", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/synced_floats_fixture.rs": "71858a47a15cb62eb8b53dfb507d6e2e96d23dda04b84bdd660b49301eeb9757" + }, + "fixtures_sha256": { + ".local/rust-synced-floats-parity/inputs.txt": "22904cc4d2748db510a0a5935c1024fb2d8d5bc9ce994b414cf6d265d6ca60c9" + }, + "rust_output_sha256": "80bb47d39c2d89981b03a0dd25715fcf9ab6d3f41671e9074f3a143b0bc78c2b", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "80bb47d39c2d89981b03a0dd25715fcf9ab6d3f41671e9074f3a143b0bc78c2b", + "matched_output_lines": 554909 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "80bb47d39c2d89981b03a0dd25715fcf9ab6d3f41671e9074f3a143b0bc78c2b", + "matched_output_lines": 554909 + } + ], + "scope": "Actual SynchedEntityData Float fields: boxed equality, forced updates, callback-before-dirty flags, ordered dirty/default extraction, received assignment including duplicates, partial unknown-ID/observer failures, batch callbacks and reentrant set/assign/pack. Native table gaps are untouched default dummy Float items; tested keys are explicit configured IDs. Other serializers, type-mismatch errors, wire codecs and player absorption integration remain pending." +} diff --git a/benchmarks/rust-teleport-consume-2026-10-07/scoped-parity.json b/benchmarks/rust-teleport-consume-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..d102e8da1 --- /dev/null +++ b/benchmarks/rust-teleport-consume-2026-10-07/scoped-parity.json @@ -0,0 +1,293 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 3676, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTeleportConsumeOracle.java": "d7148e1db43a65511516f6089e60a8b148a61e5e989306e375ada0b1d1d4e187", + "tools/test_teleport_consume_parity.py": "6480fb22e788b50b1ab676d5254248796c718567701886145e58f741c45f4fd4", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/bundle_weight.rs": "a0e7b0587ab5d46cd55588f25d55a088b7a4725099c13ba6df146957be36014c", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "f6f8992f241dfb25e012a06a7ba3fecab8d958686dddd096595a4806e56f0ab3", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/consumable.rs": "ba3575cb85866cb940f33a1ac86455d71cf0cc6395b848588a8ee1fe33f5c326", + "crates/horizon-world/src/consume_effect.rs": "03f2aac6879ce133347d42f6f6667d62c06d956ff9faac5dc14182a788b6a236", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/extra_items.rs": "6eba0a0c795d5fd841d31471708e78324b4852adebb2e6ed700dcc0caab668cd", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_properties.rs": "0926fa3f3bc3d0608c45d02f564355825ca3c3526a82bf9c1375c7a191fa5e12", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/identifier.rs": "a3ad79b1a4ea171726f07b1fc6e2b78f224157e8f0d53dd2ce96e93ccd2d38dd", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_after_use.rs": "2b6598ce5b7b304dea2c8057b4a1eb6530264ac4d0546c3da0c76deed9609da5", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_cooldowns.rs": "7b625868509ab3c51e72db0ac714bb0e7ec5e2610d37271005a1a737f4d14431", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_particles.rs": "861b14f65adb9b14f8158fe9f0b7128beac3df8107b1337c31b8b9b49434ba3f", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "dc80025215d1867e656924ea2a9d273aacbcaea21293d986ba42d0004ee93b69", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/java_hash_map.rs": "6bd97d87f0e3eaad440162145a1515b9a0b7cfb85cb0ea337874ed9745f8dd45", + "crates/horizon-world/src/lib.rs": "b4184f71a8d817197b8730c8f002b96bdeb248028b2330fbc7bdd7fe11ea7049", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/status_effect.rs": "c9efdbed61340bbbce0708311240b5d69bc313401c7caf3cc67ff855476967bc", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/teleport_consume.rs": "d6a53bbb6ac4dbbd4c0591d0646017898a95beb8ef093dc5d81b9833963be6c3", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "f555335afeca7970888131a6da2f5a614a73253b631185d1ba804593a349535e", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/teleport_consume_fixture.rs": "9f4e5d6f9dc302c18957a3ca0d78b1c80d3c202e7c88c384dc3a0222e3914efb" + }, + "fixtures_sha256": { + ".local/rust-teleport-consume-parity/inputs.txt": "874d9ac3e691b61a14bfc3fdb31ae324b827fbb6a6f616d309f8d018b032d2af" + }, + "rust_output_sha256": "ea993c3426ab64f33d4e2455fe359a96b75f6a8b8cac3a5d068f14f6adbe91df", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "ea993c3426ab64f33d4e2455fe359a96b75f6a8b8cac3a5d068f14f6adbe91df", + "matched_output_lines": 282010 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "ea993c3426ab64f33d4e2455fe359a96b75f6a8b8cac3a5d068f14f6adbe91df", + "matched_output_lines": 282010 + } + ], + "scope": "Actual TeleportRandomlyConsumeEffect with native Legacy/Xoroshiro random streams, ordinary/fox class branches, real fall/impulse reset bodies and BlockUtil offset packing. Compares captured versus live coordinates, repeated min-height reads, logical-height integer overflow, exact candidate bits and next RNG state, 16-attempt exhaustion, dismount/event/sound/directional-particle ordering and callback mutation/failure prefixes. Destination validation/teleport, passenger linkage, world event delivery and full gameplay integration remain controlled or pending." +} diff --git a/benchmarks/rust-terrain-2026-10-06/scoped-parity.json b/benchmarks/rust-terrain-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..8e06e6bb0 --- /dev/null +++ b/benchmarks/rust-terrain-2026-10-06/scoped-parity.json @@ -0,0 +1,123 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "block_states": 35723, + "block_tag_files": 300, + "fixtures": 114, + "fill_calls": 200, + "noise_aquifer_fixtures": 61, + "structure_density_fixtures": 24, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTerrainOracle.java": "47887c16a4106e6a9ef4d665fd4603ea23b62e38491376bcf9038b904e39b406", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_terrain_parity.py": "8bb8e716e957ef07d1117ed9939fab1b551ebab94d20e48d11f64bc477e4571f", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/test_worldgen_parity.py": "3574ac73f81e3a6606ac9d3c16fa2c50b57a37b89be52e7d5448e7045c41a9ee", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "3968e2a337a6a23226c485057c79359e66df16683f00fb4ebc9fabb03910a015", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry.rs": "f46065659e60eb5e84ad69b9f3b5e94dc87ee19de16408817e26f23d16b6c7e7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "134cf93b53a40fb1ed0e0170c90316c80e270773b2968c63dc3f9cef2c941bff", + "crates/horizon-world/src/worldgen.rs": "b89dd4a9de02caf6bce457304a105ffbc0f0f220f8647c095852a45a1bf292bb", + "crates/horizon-world/examples/terrain_fixture.rs": "eb521404a3e850be522f3bda2f7c724c7d1b66e154e1bc53121b4e7511e5b1bd" + }, + "fixtures_sha256": { + ".local/rust-terrain-parity/inputs.txt": "a9ddccd711b0b6bdcae612a21f2b0dc143e156c9c97f47fce33071c7ceb660bd", + ".local/rust-terrain-parity/registries.json": "2a4e6b29a707ebbb7261f978b9e0dcd372f0c8548e2fb7e00c6bebb043bc49b9", + ".local/rust-terrain-parity/facts-client.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0", + ".local/rust-terrain-parity/facts-server.json": "1d24883ee807b0b71473f0bbf8ed548ddaf712148caeb3fcc7aa13ab973a97b0" + }, + "rust_output_sha256": "ff3612b2d998278b65c1b453b9df73ecf198151b8d094c150c16872106212bfc", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "ff3612b2d998278b65c1b453b9df73ecf198151b8d094c150c16872106212bfc", + "matched_output_lines": 7950873 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "ff3612b2d998278b65c1b453b9df73ecf198151b8d094c150c16872106212bfc", + "matched_output_lines": 7950873 + } + ], + "scope": "Noise-stage filling only, using actual vanilla NoiseBasedChunkGenerator.doFill and NoiseChunk with empty blending and empty or supplied rigid-piece/junction structure fields. Independently authenticated client/server registry resources and exported block identities/properties/air/fluid facts must agree. Rust compiles the final density and optional aquifer through a shared compiler/context, writes resident block sections, updates ocean-floor/world-surface worldgen heightmaps and records ordered per-section fluid postprocessing offsets. Comparisons cover every raw section state, heightmap word and postprocessing offset after each fill, all bundled routers/aquifers, both seeded random factories, synthetic roots, prefilled chunks, partial vertical volumes, repeated fills and structure-density bindings in final-density/aquifer graphs. Block behavior facts remain imported; actual biome properties and material rules are not evaluated. Surface/material/carver/feature/structure stages, nonempty blending and live structure discovery, complete generated worlds and gameplay/rendering remain pending." +} diff --git a/benchmarks/rust-ticks-2026-10-05/scoped-parity.json b/benchmarks/rust-ticks-2026-10-05/scoped-parity.json new file mode 100644 index 000000000..c30f13981 --- /dev/null +++ b/benchmarks/rust-ticks-2026-10-05/scoped-parity.json @@ -0,0 +1,87 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "commands": { + "reset": 23, + "add": 1507, + "schedule": 13944, + "save": 814, + "tick": 2096, + "chunk": 1067, + "query": 976, + "load": 5, + "unpack": 5, + "remove": 1125, + "restore": 1145, + "copy": 423, + "clear": 558, + "enable": 1350, + "reload": 777 + }, + "inputs_sha256": "74c8b7c4cd29148e7a47834986d26e32d6eb45e59c8727984ecb0911a6c288eb", + "rust_output_sha256": "3f82d7de0cd6d114e8b52920ada98067134e7394880958d599d8faf2088ede98", + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTickOracle.java": "17bfb6ed3b35f20b84ee989e2688fa8754ed6a74c7f95663e75583ca9ac602f2", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTickDataOracle.java": "00a7ac5795ff0a3e489d0b41cb5ba40f00f04e560699d5d6d4641b96736ecda4", + "tools/test_tick_parity.py": "ca1fd537a77a0dfd1144e408028010e76d9bb8d82cf6121db7d7dc99d3a75949", + "tools/test_rust_parity.py": "500652427164c7e067a5eb69310ec81f843d5fe37a7c9d88edd2b1ca6606020a", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "faae2edce8b573fd32fcb4bd1f898be7d700a5b38479439f5bec96df764688fd", + "crates/horizon-core/Cargo.toml": "09243cac4d45e8b4aaed3a6169bf3ee0e1272fdff4298c43c80d5fff0116d01c", + "crates/horizon-world/Cargo.toml": "e3250c38fb21b149b5ccaf3c90b5c87ff15b2902f5204b7159207ef7fbf229f2", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/parity.rs": "7b455f2181862e1430e7387633c146877c2d317c2ea682c1e6fa64345dbc5885", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "acaa0a51a759e1a08d417538e567847a66b8c9ae6a7434872e1621ed210364b1", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random.rs": "2f304dfb580a6bc1b5c51b048a2fa2a57f73c5f28f5eb2447f925bf138513389", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/lib.rs": "521ed8987f9fc21e9df75206795414871611e5b6acbf3906c26f44a4c6e6115e", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry.rs": "f46065659e60eb5e84ad69b9f3b5e94dc87ee19de16408817e26f23d16b6c7e7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/examples/tick_fixture.rs": "df267c307e0491a238b2d93edf0384514f38f8ee3252e315b989de56c6e17990" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "3f82d7de0cd6d114e8b52920ada98067134e7394880958d599d8faf2088ede98", + "matched_output_lines": 97776, + "block_ticks": 251, + "fluid_ticks": 251, + "region_chunks": 1 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "3f82d7de0cd6d114e8b52920ada98067134e7394880958d599d8faf2088ede98", + "matched_output_lines": 97776, + "block_ticks": 251, + "fluid_ticks": 251, + "region_chunks": 1 + } + ], + "scope": "Scheduled tick ordering, deduplication, save packing, chunk eligibility/loading and callback mutations only. Block/fluid behavior is not implemented." +} diff --git a/benchmarks/rust-underwater-magma-2026-10-06/scoped-parity.json b/benchmarks/rust-underwater-magma-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..9492ca7a2 --- /dev/null +++ b/benchmarks/rust-underwater-magma-2026-10-06/scoped-parity.json @@ -0,0 +1,209 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 253252, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "c72dae42f87b15980ac2155d736126fa2b88f5f15642acf9c739c17849287ade", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "e871d3a01f15616a98ca9227c27a81e4d17e2d57ac4e68a5650a70fa29811497", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_underwater_magma_parity.py": "84481073a4b5ea812abe116e8636b57d224d3b94fd86dadc364a971fd29890bb", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "5ce5c6eaa5f8a2557a620e533788217b1eb430654801dcf6135d6c92d7a012ac", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "fbc0dc49fa5a825e3a7aef74bd465de83fc12855b5a19d907c5b8388bb350b5f", + "crates/horizon-world/src/worldgen/feature_region.rs": "3b893ceafbdd1d7b4264f4022dbdb6a7142dfc7001a5cf5c304f5ca7695dfaa0", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "c04a1f7e9409b0cea0ed9b90fd033fc5a398b66f2688b7f6c0583facc473c457", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "11804e16fe587ab8f2c613186de45b450e6d9c459a58e270f108b54223ae68c2", + "crates/horizon-world/examples/simple_block_fixture.rs": "1d2005bdc82c0c0d86d13d00b105983d431c7da6fa5357f4b1f6c43bdcc0019c" + }, + "fixtures_sha256": { + ".local/rust-underwater-magma-parity/inputs.txt": "332d2930db1501eb70466c5ff6f9ed1c180c83fc7db308c538f33d1aaf5f74c3", + ".local/rust-underwater-magma-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-underwater-magma-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-underwater-magma-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-underwater-magma-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-underwater-magma-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-underwater-magma-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-underwater-magma-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-underwater-magma-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-underwater-magma-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-underwater-magma-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-underwater-magma-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-underwater-magma-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-underwater-magma-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-underwater-magma-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-underwater-magma-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-underwater-magma-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "70e10d29d4283e391ca2e09b9e04e6e71ab0e99d90c1cf460f544b2997cf44b8", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "70e10d29d4283e391ca2e09b9e04e6e71ab0e99d90c1cf460f544b2997cf44b8", + "matched_output_lines": 6523072 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "70e10d29d4283e391ca2e09b9e04e6e71ab0e99d90c1cf460f544b2997cf44b8", + "matched_output_lines": 6523072 + } + ], + "scope": "Native UnderwaterMagmaFeature codecs and Column.scan floor selection. Initial water identity, upward scan before downward scan, repeated boundary reads, all scan endpoints, every state at origin/floor/below and each horizontal neighbor, exact full-face occlusion, cubic traversal, per-position float draws before block tests, flags 2, rejected writes and partial failures are compared. Both random modes include the complete radius-64 cube with probability zero (2146689 draws), wrapped radius-zero columns and nested placement. Rust allows the entire valid codec radius domain and bounds pathological overflow iteration at 2^23 visits. Actual chunk update callbacks, magma gameplay and full world generation remain pending." +} diff --git a/benchmarks/rust-use-flag-reaction-2026-10-07/scoped-parity.json b/benchmarks/rust-use-flag-reaction-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..2fa60abee --- /dev/null +++ b/benchmarks/rust-use-flag-reaction-2026-10-07/scoped-parity.json @@ -0,0 +1,279 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 12504, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaUseFlagReactionOracle.java": "e2916bc1169f27e962a89969dce03e5cc461cd19a499bcd1dbdeafd5066a6f61", + "tools/test_use_flag_reaction_parity.py": "6b5b7057ebc91ad094aea6b5040207e4876090ef12ade3895826dfc811cca722", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "15957ee9cee0c7e9ce1a3b109ec5a772f119ce4176c6ff0316812ac3a3d16ff9", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/lib.rs": "f0328adcaf4f61835ab48344be73941c65927c3f08c0adb0012a8abef7cb730b", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/use_flag_reaction_fixture.rs": "b33182dbc907b4cdd3283ec4cb37d9a26e8fb0a35fdf99d95eae9201dd62ccc3" + }, + "fixtures_sha256": { + ".local/rust-use-flag-reaction-parity/inputs.txt": "f5fda04be588eaff2148b2e553f0785b8cca032adb12929c68ed4a90454caef2" + }, + "rust_output_sha256": "fbb8c9622200f26e64c93bfc2d4a1ba88706948e5546b9b57348d1a57f443c82", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "fbb8c9622200f26e64c93bfc2d4a1ba88706948e5546b9b57348d1a57f443c82", + "matched_output_lines": 366331 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "fbb8c9622200f26e64c93bfc2d4a1ba88706948e5546b9b57348d1a57f443c82", + "matched_output_lines": 366331 + } + ], + "scope": "Actual inherited LivingEntity synchronized-use-flag observer reaction, composed with Inventory/PlayerEquipment, shared stacks and SynchedEntityData writes/assignments. Client reactions initialize a newly active held stack and duration or clear an existing active stack; server reactions leave active use untouched. Includes ordinary use tick/completion/release/stop, same-value received updates, duration callbacks, dirty packing, mutations and failure prefixes. Other synchronized keys, start-use packet flow, full equip/item effects and complete gameplay integration remain pending." +} diff --git a/benchmarks/rust-use-remainder-2026-10-07/scoped-parity.json b/benchmarks/rust-use-remainder-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..aa56f8fb7 --- /dev/null +++ b/benchmarks/rust-use-remainder-2026-10-07/scoped-parity.json @@ -0,0 +1,281 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 5216, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaUseRemainderOracle.java": "84482b5c48c6c2404f8f43df073bd26e54de70fd12be623399cbc8d223026278", + "tools/test_use_remainder_parity.py": "5d0bd33d604a841ab880cc301c3b9496da667b3d5fdca89c38ab45dc0d7cab22", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_item_damage.rs": "afea3cb5761e8b82ee4d9bb4ef3c6fd10182a324dbaec99e6c9ebfac255dda09", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/component_durability.rs": "37a46e184f95bc5027e2b9af72ff52f729ad03601d08e1827f181fca383a35af", + "crates/horizon-world/src/component_patch.rs": "3622244ccdee46e13956c64ffe9be6234e686adf58dbc3a24cece0f1814301a1", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/inventory_pickup.rs": "ea830c7916e7f2d95c6db7ef48be1e876e6ebafcb438e47fc72f9a5bd7c37d07", + "crates/horizon-world/src/inventory_tick.rs": "293a3d57a1689337cfd58e5a73dcdbed4cb360f94d98ff5458f0df92de387365", + "crates/horizon-world/src/inventory_use.rs": "6a6c2ecc73c83dda4cd798c0304df12ace6096eb110d899f4f0c7ffd852bf001", + "crates/horizon-world/src/item_blocking.rs": "f6eee0d6d177cc3148960122327ba1b459a2f0e85241c1d9a3e40f0b8c169296", + "crates/horizon-world/src/item_durability.rs": "9fdf835e5c7bd0e1dd63ef2ba0076b770cdd4d6d14cdcd11de27690f0702f94e", + "crates/horizon-world/src/item_stack_refs.rs": "18d3ca85cac0daf59200857513761359e5690f719cb3f7f64ae552f0c4169ea3", + "crates/horizon-world/src/item_stack_storage.rs": "b4dcb83dcaa346848c5484161feb3e2cf08e83f7793d7ed83be25b14b9d12884", + "crates/horizon-world/src/item_template.rs": "d9ab7958a55c695142403195244b14946caa2bf527bcbb4193b1372cd748e9a8", + "crates/horizon-world/src/item_use.rs": "b1c79428986efbf9dd5ede703a39eb387fb6dcc7d9950f0e49243a353a5b8070", + "crates/horizon-world/src/item_use_catalog.rs": "a9b53d2e816583239a75c3c61e78dacc5e3b27dee595be34b1c7fa169f17a571", + "crates/horizon-world/src/item_use_lifecycle.rs": "4639b70440cf811e79de09c48a3e035143fcb6be8a64c2f61b10ae55a2f133b7", + "crates/horizon-world/src/item_use_start.rs": "a84092dfb8b8f0a89d0928bb2f8ac252bd9bfd3f8d74fce1a7f7a5b3c3f4f50b", + "crates/horizon-world/src/lib.rs": "89919eac5a7441b1e0eb8fea40bdb7f01b3ce382bd8b2cfd37d273e5d54c1330", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/living_use_flags.rs": "826f4fdeba7e208368cbbf910fa408db0afbc6442d842d178a70fae53e0d0ea6", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_equipment.rs": "1fa8c53e67624c4641246249d79a800a28a4858c62482bd880b4e3b866b936ef", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_inventory.rs": "f4f67d8312793f25930626c4ac06db688fcf2e2292d6675071d105fb1708d952", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/simple_container.rs": "0fedbc7e974b1db79b88bd6aff977654189a5d553cf42852fe8bf0885cf90b30", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "0152f2752bafaf68769d56dbc88494a976496a680c6b113d6b48a446158ba072", + "crates/horizon-world/src/synced_values.rs": "adffa15026497d6671ffd12e5e17df9329c93f0e022700cdfebb80ab494382ae", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/use_remainder.rs": "50f0ac128bfcc5c9b2a43bfbb4f0d46f63693bea3bdcb64b15318a3dec28b9d5", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/use_remainder_fixture.rs": "cc13520801fa1c3bb2525d57907e30ee492263b2bc156308b92ffc3bfd496630" + }, + "fixtures_sha256": { + ".local/rust-use-remainder-parity/inputs.txt": "f3be368b63f3d035783da8cfc6a22a9ff02188da5ac68f109460d2188477f095" + }, + "rust_output_sha256": "8639a449feb82e464bc3f42dad86bf372263976ad5e133bf009ce624700fc2d4", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "8639a449feb82e464bc3f42dad86bf372263976ad5e133bf009ce624700fc2d4", + "matched_output_lines": 353264 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "8639a449feb82e464bc3f42dad86bf372263976ad5e133bf009ce624700fc2d4", + "matched_output_lines": 353264 + } + ], + "scope": "Actual UseRemainder.convertIntoRemainder composed with native ItemStackTemplate creation/validation and shared ItemStack references. Covers finite/infinite materials, visible count comparisons, exhausted and empty-but-distinct inputs, invalid templates returning canonical EMPTY, extra-item callbacks with mutations/failures, and captured-reference identity. Rust uses its item-template factory with scalar validation; contained component validation, concrete actor inventory insertion/drop, item finish side effects and complete gameplay integration remain pending." +} diff --git a/benchmarks/rust-value-provider-2026-10-06/scoped-parity.json b/benchmarks/rust-value-provider-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..d6c3ab752 --- /dev/null +++ b/benchmarks/rust-value-provider-2026-10-06/scoped-parity.json @@ -0,0 +1,151 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 5040, + "definitions": 504, + "samples_per_valid_fixture": 64, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaValueProviderOracle.java": "7cbaea3053efe6d861a05f9ab1cbd772c8010218b95102ff05d4028139c333bd", + "tools/test_value_provider_parity.py": "38f34d1a7b7ecc8acafd563c8acd74f12be930d4b1e181e371782a315cf84a87", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_predicate.rs": "dd8cbda2ec110444950f0b31bf4e088897eab0994674a91568c7b063f8f16210", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_graph.rs": "5dfb83b9f97eb24b386e3514aaac957b314461b32d59e1fdb6dcac7ca0a32e1b", + "crates/horizon-world/src/worldgen/feature_region.rs": "4a95a30c0987d97e671f84380e13ddea070ad81f996baa65b2a06c4d892971c7", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/placement/chain.rs": "1b976aa4dd2516468196d0af3451e3fdd037493a14d269f54ebdd7254055e05e", + "crates/horizon-world/src/worldgen/placement/context.rs": "b36dfd9297896e62770f2085cf934fc08ebd4c030ecc7ae17d864e819a113201", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "68ecf36954fea5705436d486e9be93836933fd56779022afeb881a0399d6a674", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "f18a6c0e66cadec431d2e3154ad70d96b3be623e675f939d4419858f2cce92ab", + "crates/horizon-world/examples/value_provider_fixture.rs": "ed66e3bb34c3d3c73c1e143843f7245f0c02eb36d584d856b6a15a8600caf5d1" + }, + "fixtures_sha256": { + ".local/rust-value-provider-parity/inputs.txt": "ec80fb8b841488b4167aaecf5417cbcbc39891ffb0fdff18ffd947affdd96492" + }, + "rust_output_sha256": "0115440c04ca851e177582e815b590409ba4af7b0d66e77806c2fba8ee82081d", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "0115440c04ca851e177582e815b590409ba4af7b0d66e77806c2fba8ee82081d", + "matched_output_lines": 429920 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "0115440c04ca851e177582e815b590409ba4af7b0d66e77806c2fba8ee82081d", + "matched_output_lines": 429920 + } + ], + "scope": "Actual FloatProviders.CODEC and IntProviders.CODEC decoding, declared ranges, seeded samples and interleaved subsequent nextLong values. Covers constant/uniform/trapezoid floats and constant/uniform/biased-to-bottom/very-biased-to-bottom/trapezoid/clamped/weighted-list integers, both random modes, numeric narrowing, signed zeros, overflow, equal/reversed bounds, negative plateaus, missing fields, duplicate keys and sampling failures. Float NaNs are canonicalized. Weighted lists include zero weights, singleton draws, nested providers, 63/64/65 weight totals, maximum/overflow totals and malformed entries; native constructor rejections count as decode errors. Gaussian providers, encoding, height providers and complete generation remain outside this scope." +} diff --git a/benchmarks/rust-view-direction-2026-10-07/scoped-parity.json b/benchmarks/rust-view-direction-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..3716bc833 --- /dev/null +++ b/benchmarks/rust-view-direction-2026-10-07/scoped-parity.json @@ -0,0 +1,260 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 226459, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaViewDirectionOracle.java": "f26bbbf155fcc1d1b4b2f2a714413b4fd7e19f03970c4e5b0915a1415d413275", + "tools/test_view_direction_parity.py": "361b91caf0e53e11978017f588ca091ba2f3cffd72d57e7feeb378d3870a8e79", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "6884c7209f007ab9ee742b9c3c73828cfa1c6753d35b5fe25a87cab5955b33f8", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "18bbad377a8047e4d4ecd0fc87d83d46d1c0f1ce2b8c47bbe64633e7b4420b57", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/attribute_health.rs": "6135beb1baf9a55745ab95955bcd05e585e4042a6cffda0a14c13f05593e7186", + "crates/horizon-world/src/attributes/entity.rs": "56fb96b1beb9caaa769369bf7cddf522d2f2e84e241c213b51ae8d39d31a9f13", + "crates/horizon-world/src/attributes/mod.rs": "3d05ce2ff10c1b68540e3c87bbd2ac65c56a2e7b7127a7865b60890a2e9a690d", + "crates/horizon-world/src/attributes/operation_map.rs": "fc5bc8921d78ea6721a2eaa915e67483e2a33683927467bdba24f0492356ad97", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/blocking_rules.rs": "83c5e2105cec56a90182ce582e1c67ade2b189be6de1a34d08035000cc07c492", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/combat_rules.rs": "01131f70d1acdd96a910e7f96deaa12e51a1e3bb9208085f04e3ec7b657d3cd4", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/damage_immunity.rs": "fd39c41124d694e755cf7faadcf93c636df4042c78ec345092a856b5f952dbcf", + "crates/horizon-world/src/damage_reduction.rs": "f5a599ab11e077f526237018aeda803ea3c420c5b35c78ae9d85e32267e23bf3", + "crates/horizon-world/src/damage_source.rs": "24945e397a926d34695652980923609e4723e02fe6b6e56d4aaf673e45d759f7", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/food.rs": "3cf416fa632a5555a8116bb528a6e80bcb5b6b754b0748b4959ed310102418d3", + "crates/horizon-world/src/food_storage.rs": "58c433801a285efcc973638c11d694a41f85dc96703a3a7ce8d3673f3eb31d52", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "ac2cca14198b7890bb748e77843ae087a0b6a40e8496e0053e4c817cdad01883", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_damage.rs": "2b448209629b9bf2e678d667ad0d6c7fa22146892dd106b169d96b31b0df12bb", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_health.rs": "221659f85552424e937d503bba6d8003006b106ced042b32d3a6f6cc23e12ed0", + "crates/horizon-world/src/living_hurt.rs": "844239ad7d15c39629bb3cfc06ebae6d1cff20b7627468f26e0ee8dff3abdcb8", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_food.rs": "f188dc110745bcc7acc15e6c521db943b06b404f69cd251bf74a345516070304", + "crates/horizon-world/src/player_health.rs": "79ecb6b4d7a044dc98e5552c53a5ac2724545b1c1cec4d797eb52576728e3480", + "crates/horizon-world/src/player_hurt.rs": "99c9bbd8587ec2dc287806049897b8034d2f5349ad47fc497b70d54148844a36", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/server_player_combat.rs": "a9743971581af86d926eeba42004d932caf83382c470dd98bf613cb9c417db58", + "crates/horizon-world/src/server_player_damage.rs": "828a4649fec3e9bda2dfe20aced8c95922c697321de2be4127bd4e5712ecbb7c", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/synced_floats.rs": "f417aab280331ddd6f0ca265a12c0130c78b9924f407c7e07f198140501e6010", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/view_direction.rs": "e18120ae26dc5cf702b29fc4c8487088bab133c8ce5abce01226833fafb0d5a4", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "74e4110fb19c4c4047192fd65c38015b8afc7f9fc50404d75380b5063808148c", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/view_direction_fixture.rs": "28c23881c7ea170dc9cbc4db9abbe278c391b38f2aa9a0ba8a3765625daf90e5" + }, + "fixtures_sha256": { + ".local/rust-view-direction-parity/inputs.txt": "b41c7a2cd7259bed9e5f833a68da8e192066f8beb632dc4ff91b5a22cf72e078" + }, + "rust_output_sha256": "3aed71ef2a5ad3e1f2cf944abc5b614d937d3128ead9e24213a763855566dbd0", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "3aed71ef2a5ad3e1f2cf944abc5b614d937d3128ead9e24213a763855566dbd0", + "matched_output_lines": 226459 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "3aed71ef2a5ad3e1f2cf944abc5b614d937d3128ead9e24213a763855566dbd0", + "matched_output_lines": 226459 + } + ], + "scope": "Actual Entity.calculateViewVector and Java Math.acos, plus the blocking-direction composition of native view vector, Vec3 subtraction/normalization/dot and acos. Exact bit comparisons cover random doubles, inverse-cosine boundaries, float-table directions, nonfinite/zero/near-zero horizontal vectors and the float-PI fallback. Uses pinned pure-Rust libm 0.2.16; full item-blocking dispatch and other platform JVMs remain pending." +} diff --git a/benchmarks/rust-vines-2026-10-06/scoped-parity.json b/benchmarks/rust-vines-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..ab07429ea --- /dev/null +++ b/benchmarks/rust-vines-2026-10-06/scoped-parity.json @@ -0,0 +1,208 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 224743, + "candidate_states": 35723, + "double_plant_blocks": 10, + "mossy_carpet_blocks": 1, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java": "7ced6f7a0c44a40fe211d3e3bbfe5b5085bbb4e59a3a8d2f24592602825504c2", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java": "12b1c46cc397755ef6827da777faef3e71c008cafa48403669c03ca2bdc3c7cb", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java": "4e7cc151617c1b02e872f9ca3e9fe4632379f225f4f07718ff6492df4ee551e7", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java": "99a396b9b983f6ca9149133251f3ece9aaf76d3d16dafa1f322378212a19490c", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java": "04350901a2d708fb8fa672de61d058f73f332d2e90df1b93a67781862f89c1ad", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "60ff9ef7c1d5e23c080f9aec95ab2e7d3b7c5b5bcd67b9efa9518776c400629a", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "tools/test_simple_block_parity.py": "50b783323051fe8cd369bb733448b0314f1e6e7994a950e4cb6cd2fe4f7f8e11", + "tools/test_vines_parity.py": "103ad644da719d1d8b6941c1ea5e4200e6a75a5790d29623afc72e6945fb814b", + "tools/test_block_survival_parity.py": "9e8dff3bd4b95dbfd29f8adc6a2f6d66abf19a6b1cd91423b794a345d4ec244a", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "cec2af81d212d5eed7a2196e4cf0be2daf4cecf53248f78cc68f2190e4d83f9a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b3caf26bd3afc9d10cdcca3f7e794c30abf5ba09afa1fe80ba8f44713acdb274", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "05313e0c1f3089524fe029f9aac3e439cd47f1c9584c8c7e154c9adcfa88c335", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "e799b31e5120cfdb04e0b342f2097d610ed98ef8c4be031620ee00368d82df59", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "a8cd85f6223668c1446ff103276d80937b9707d9a7dc619a176b1b1ceed36a4a", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "1eae82604d2b3377fd35aaa3a914a67e5af28f93923815a49e895b4d437433cd", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "d6389c8d1adf900eb8f0e6c8833feafe43dc92d74e5c7ffa6f3950975529d624", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "bc8fb1a17cd988f7cfc1612180b68d87f90581ec034b880471b840452e66d543", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "b7cbb8f464098f22aedbe4d954afd51cbb24d4f3be3f53f3c764015cf9d72d80", + "crates/horizon-world/src/worldgen/feature_region.rs": "3b893ceafbdd1d7b4264f4022dbdb6a7142dfc7001a5cf5c304f5ca7695dfaa0", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "e682d13a21f90605215b79f5d254bf2e524d35e89eab2e3b46384709af80b847", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "c04a1f7e9409b0cea0ed9b90fd033fc5a398b66f2688b7f6c0583facc473c457", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "16efd52eec5e625a5fdd6d4c0591e2d5b02ab4b641f1a1c193737056842ed7c1", + "crates/horizon-world/examples/simple_block_fixture.rs": "1d2005bdc82c0c0d86d13d00b105983d431c7da6fa5357f4b1f6c43bdcc0019c" + }, + "fixtures_sha256": { + ".local/rust-vines-parity/inputs.txt": "8443a66a51f95def2da83b6f9dcffbefbc09a52b9ba3fa6047a96ca8743cde07", + ".local/rust-vines-parity/block-properties.nbt": "1aba22092f70d16b8092014c058ddc210e4aaa77bac32f6ec62e4d0e91d92a99", + ".local/rust-vines-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-vines-parity/cached-collision.nbt": "f3a5c6a5b2d51dad6c52e486e2b9989e79fd55db1a9bda6196db399550b04078", + ".local/rust-vines-parity/cached-support.nbt": "b6fdc9471b0b61e904206d3f099f4dc235aad6d723536c210be0cb7c3560d82c", + ".local/rust-vines-parity/catalog.json": "93581107e3564e60261044fdca61e3b7f237b9e6724c14b86e335ccc01198ba9", + ".local/rust-vines-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-vines-parity/feature-catalog.json": "c048c761c5084a40560731955cc999a364d14055bdd86fa50989a92e4a771286", + ".local/rust-vines-parity/fluid-tags.json": "f1e5eb6d22ea7effbb118a2282709cfdeef1bfae4516b775a55ad7a4df29d7d0", + ".local/rust-vines-parity/placement-definitions.json": "f8a972ec87c2352500af6481158a3192bdbf699951025639bea744e4127b97c4", + ".local/rust-vines-parity/support-cached-states.json": "353945a58fe69b352925473f1693f9b14a9ad19f13c15159c4184f2c29258622", + ".local/rust-vines-parity/survival-classes.json": "361832008eea0aa9151d367a125a19c6353d99a0b88b27dd0682f55b7954553e", + ".local/rust-vines-parity/survival-extra-definitions.json": "170f2db5bc97a49fa25cc249540aa7f04beea455cdbaf43742ed9415f5090a02", + ".local/rust-vines-parity/survival-placement-classes.json": "7fdbf48ab18c87098bbe1b6176cb81f4842b6c5d9a4d6bbaf7037ff61cb1848c", + ".local/rust-vines-parity/survival-rules.json": "8805c18b3195bb1eac1f1e5281333df56e2892505f64023e5403c58ce2ec4368", + ".local/rust-vines-parity/survival-support-tags.json": "15d88d5bb5ad10d65124d5abb2cc055d251b06d129bca7be06f55b43dc13f6fd", + ".local/rust-vines-parity/tags.json": "36975358262568f32bf84778d63d9989a36e7394ed4796d70a34809a8f4a64f0" + }, + "rust_output_sha256": "dc00391d98cfb9a1297bba33c9a8574cc7bfa6247d86510242d175916435c195", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "dc00391d98cfb9a1297bba33c9a8574cc7bfa6247d86510242d175916435c195", + "matched_output_lines": 4315682 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "dc00391d98cfb9a1297bba33c9a8574cc7bfa6247d86510242d175916435c195", + "matched_output_lines": 4315682 + } + ], + "scope": "Native VinesFeature unit codec and placement. Every origin state and every neighbor state in each of the five accepted directions, all support masks, air variants, wrapped coordinates and first-attachment priority Up/North/South/West/East are compared. Native support/collision queries, flags 2, rejected writes, partial failures, repeated calls, unchanged feature/world random streams and overlay/modifier composition share the mutable world. Dynamic block entities are absent in this fixture; resident-world updates, vine growth and complete gameplay remain pending." +} diff --git a/benchmarks/rust-water-splash-2026-10-07/scoped-parity.json b/benchmarks/rust-water-splash-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..a7960805c --- /dev/null +++ b/benchmarks/rust-water-splash-2026-10-07/scoped-parity.json @@ -0,0 +1,239 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 7840, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWaterSplashOracle.java": "7cacf25db8f76ffdd183779d7d0c2fe901c050312455c4cedc44fa887d51d501", + "tools/test_water_splash_parity.py": "a81c446ac18bd53c9b71bf0a6533f60d4b63e1d6b95646c65b15bfaad5ae2041", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "795895284d6e615bcb2082fceacdfe7025c152fb2934bb43f598f17a00ab46f1", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/climbing.rs": "6cd2f919872ff0b726effddaa57eccb805b8eae43f9d01144716010853891879", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_fluid.rs": "02991040ae879a8914f09913128a3506e9e7a1ca33ffc0a22b5729a168346600", + "crates/horizon-world/src/entity_fluid_tick.rs": "4f9e070b88a73c98a4e2e659360ddd6edee636bca29377f1ea9011fd5a556f64", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/fluid_box.rs": "b586af72b1c04a9354fe66205c28dc8b619e205ab9ea19a68232722e4b6e96c1", + "crates/horizon-world/src/fluid_flow.rs": "7c7e486b5c565df3602799648b37b879bcca51414337f607962d6c7951b86d05", + "crates/horizon-world/src/fluid_occupancy.rs": "26037579caeef6c8a5a2bde2c3d142d278558b76d77ebff401cee6e35f2ea961", + "crates/horizon-world/src/fluid_shape.rs": "28bb65a72f5bd074a354ba38a1b1707fcb0947537977a11540bba0adb85995c2", + "crates/horizon-world/src/free_space.rs": "913536bf4c85ddeeb378d76d1b5110b4175f5688e1a749f32fe6a6d86fbb478e", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/interaction_shapes.rs": "f321284ddab440a394372b6dedc8b5cc29a653c0745251a9e96c650f21c33dea", + "crates/horizon-world/src/lib.rs": "13ceccc7110505ffd37705d2941e53bb73864d607031193c37f2ba6b59518918", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_air.rs": "b2de36bb50bed15e2808fe4a874fcef07f9fea0d2c96385b7b5e8ee9560d4442", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/living_fluid.rs": "d7cd914cfb2a1f4876ce0ae95e999bf0ff1af732cce3ab4a3aa2d1ab881c7339", + "crates/horizon-world/src/living_landing.rs": "8bca4eb7977abc2b14fb7174be4ea355352106ea1e76ff5f3ad8696969d9eefd", + "crates/horizon-world/src/living_motion.rs": "56f8c84cfbe205a7a69912d5f76b52ef1efca149c1b6801d4684e25fb179aeb9", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/player_travel.rs": "6841a677a900495eb6223031ef3ebe8d859bb98908dda0e2209e5f28839dc593", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "97cc950a9a4ba387b78e368f36d595f8664ab7730d132900d220ce23b92826ea", + "crates/horizon-world/src/registry_fall_ray.rs": "52935436132df505691144840dcbd858b15d00d8305997284e3a542ecf6bc0dc", + "crates/horizon-world/src/registry_fluid.rs": "b8959c05850cfeaaad1e4de8ca7c7d0d6ac56da9b2c1de3ebefa5871a11ed35e", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/swimming.rs": "49d2dae13c109b37ff832cde98a857944ff45247b864a527b9c4f03ecca7a7b7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/water_splash.rs": "e0461ae1b2e8c851cca6e3251a188334293292201d7f80dc9e7d60fd1815f4d1", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/water_splash_fixture.rs": "cc5c5f4c8cfa05acb805a6dc3d82f2a151d6b6385cd87124598606294b96e947" + }, + "fixtures_sha256": { + ".local/rust-water-splash-parity/inputs.txt": "e6ced93a73be331cf1393cf1c50e514c2e7cbfbbf29ca272d7f679d0a92eb26a" + }, + "rust_output_sha256": "9df875aa9277988d3b95bd332abb53468aaf676296c26a4b770f0421f18c7079", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "9df875aa9277988d3b95bd332abb53468aaf676296c26a4b770f0421f18c7079", + "matched_output_lines": 192506 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "9df875aa9277988d3b95bd332abb53468aaf676296c26a4b770f0421f18c7079", + "matched_output_lines": 192506 + } + ], + "scope": "Actual Entity.doWaterSplashEffect with native LegacyRandomSource and XoroshiroRandomSource. Compares controlling-passenger identity, captured velocity, sound selection/volume/pitch, ordered bubble/splash particle requests, float-rounded surface height, random draw continuation and final game event. Includes width/position/velocity mutations, nonfinite arithmetic and injected failures. Sound identities and effect sinks are controlled; audio playback, particle simulation/rendering and complete gameplay remain pending." +} diff --git a/benchmarks/rust-world-2026-10-05/scoped-parity.json b/benchmarks/rust-world-2026-10-05/scoped-parity.json new file mode 100644 index 000000000..6e441300a --- /dev/null +++ b/benchmarks/rust-world-2026-10-05/scoped-parity.json @@ -0,0 +1,77 @@ +{ + "schema": 1, + "minecraft": "26.3", + "data_version": 5023, + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "references": [ + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "nbt_pairs": 32, + "palettes": 44, + "palette_values": 123776, + "region_chunks": 48, + "registry_states": 35723, + "resident_values": 8192 + }, + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "nbt_pairs": 32, + "palettes": 44, + "palette_values": 123776, + "region_chunks": 48, + "registry_states": 35723, + "resident_values": 8192 + } + ], + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldOracle.java": "d7cf12dda8c284d6a9b3a1e08ee60831a20dea3883e227b51c5b268636421fd0", + "tools/test_world_parity.py": "cb86934e74b0840dcec2c3de1bf252307edc86d1ba650032ca28506536e39438", + "tools/test_rust_parity.py": "500652427164c7e067a5eb69310ec81f843d5fe37a7c9d88edd2b1ca6606020a", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "faae2edce8b573fd32fcb4bd1f898be7d700a5b38479439f5bec96df764688fd", + "crates/horizon-world/Cargo.toml": "e3250c38fb21b149b5ccaf3c90b5c87ff15b2902f5204b7159207ef7fbf229f2", + "crates/horizon-world/examples/collision_fixture.rs": "ee754b5b42e0a51fe0a305b3f4bb56522ff3fffae564180aab8087b1b9e44afc", + "crates/horizon-world/examples/tick_fixture.rs": "df267c307e0491a238b2d93edf0384514f38f8ee3252e315b989de56c6e17990", + "crates/horizon-world/examples/world_fixture.rs": "a3c4c0f5131ae051b24662eff0ed11ed797c6fd5069fbfdf819f0e3fcdfb2cf4", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/lib.rs": "521ed8987f9fc21e9df75206795414871611e5b6acbf3906c26f44a4c6e6115e", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry.rs": "f46065659e60eb5e84ad69b9f3b5e94dc87ee19de16408817e26f23d16b6c7e7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/tests/collision_data.rs": "45f3d33b36efe720e99ebf75b9f4fbddd777cebea4618bba245ca106b3443391", + "crates/horizon-world/tests/tick_data.rs": "ab345209367db6963b987797992c4a06433bd2039e6021bd834f6305324c04d7", + "crates/horizon-world/tests/world_io.rs": "4a42630c99ce89b27cc2be1a1b961ad880f62762ab661f9e92ef9bcf7f3e76e0", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/parity.rs": "7b455f2181862e1430e7387633c146877c2d317c2ea682c1e6fa64345dbc5885", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "acaa0a51a759e1a08d417538e567847a66b8c9ae6a7434872e1621ed210364b1", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random.rs": "2f304dfb580a6bc1b5c51b048a2fa2a57f73c5f28f5eb2447f925bf138513389", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e" + }, + "notes": [ + "Synthetic NBT and region fixtures serialized and verified by pinned vanilla classes.", + "Includes all four region codecs, external oversized chunks, UTF-16 edge cases, mixed lists, palette mutation, and the full exported block-state ID registry.", + "Storage-only edits; no world generation, simulation, lighting, live multiplayer, renderer, FPS or whole-game parity claim." + ] +} diff --git a/benchmarks/rust-world-border-2026-10-07/scoped-parity.json b/benchmarks/rust-world-border-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..39228449f --- /dev/null +++ b/benchmarks/rust-world-border-2026-10-07/scoped-parity.json @@ -0,0 +1,209 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 1072, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldBorderOracle.java": "d3366aacd9e6ea415046007dc1047ad44d15722cca5db2a685a0649642b91d50", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_world_border_parity.py": "29d3935d6c9fa77f4ddad8ebd9ce611421dbbc1a4eb80fd145bb24b3c0bb3313", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "434f48e310beb66490f6d861d326a5382a04dfb30b253676710b3f9fed6ca0c8", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "8ac9e90fe899855036658afd862ff20c4dcd15d1bd3f92a763c4795fecf0549f", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/world_border_fixture.rs": "2ee668ec9b6a81167eeeac16990914ded015057d02f35e9f1885b5ba3130b74e" + }, + "fixtures_sha256": { + ".local/rust-world-border-parity/inputs.txt": "17e5d1494da670d8b9856a212486e433f4e449f54b018ed807dff656554d9deb" + }, + "rust_output_sha256": "5216f1c366de17cdc9a9de1bf1ede19ac83c14363a57729de755e27faa18a446", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "5216f1c366de17cdc9a9de1bf1ede19ac83c14363a57729de755e27faa18a446", + "matched_output_lines": 1138830 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "5216f1c366de17cdc9a9de1bf1ede19ac83c14363a57729de755e27faa18a446", + "matched_output_lines": 1138830 + } + ], + "scope": "Actual WorldBorder stationary/moving extents, center/absolute-limit updates, tick progression, size/target/time/speed/status, float partial-tick bounds, full collision shape grids and proximity predicates. Covers finite nonnegative sizes, finite centers, nonnegative absolute limits and durations, signed zero, zero and very large durations, wrapping start timestamps, tick completion, retargeting, fractional boundaries and nonfinite predicate/partial-tick inputs. Rust returns typed errors for parameters outside this supported domain. Border saved-data codecs, listeners, dirty-state events, damage, networking and live movement integration remain pending." +} diff --git a/benchmarks/rust-world-collision-check-2026-10-07/movement-regression.json b/benchmarks/rust-world-collision-check-2026-10-07/movement-regression.json new file mode 100644 index 000000000..ab8a4a92c --- /dev/null +++ b/benchmarks/rust-world-collision-check-2026-10-07/movement-regression.json @@ -0,0 +1,235 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "registry_states": 35723, + "block_definitions": 1286, + "definition_counts": { + "tagged_full": 1221, + "never": 42, + "closed_shulker": 17, + "always": 4, + "not_extended": 2 + }, + "native_chunk_storage": "ProtoChunk", + "rust_chunk_storage": "TerrainChunk", + "fixtures": 45163, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "b53149d097a934f814c2374f26f27e5fbca485c58216d325744eaddfb074e60f", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_world_movement_parity.py": "c70470c10421ba93688aac821cdd45ac97f106162fd4b8a4e5823ab6eedb98bd", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/examples/registry_collision_scan_fixture.rs": "8aa40f2056f8dccb7166757dc08219a0331acfa5b6b489c1817c1393b10bb2c0", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "c37ea9eb157c24d9c91eec8edfef652f12b9b6b4d7f64da5ad0179fe5259a674", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_properties.rs": "9c78bed0d30c8b9cfaa413b9b81b0bf94861605c13b26754e09b24e83d75a227", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "fixtures_sha256": { + ".local/rust-world-movement-parity/inputs.txt": "bbe9f6e31b141231e9726858c4490335c6c563f845bb25ce43afa5bf2486b3f0", + ".local/rust-world-movement-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-world-movement-parity/definitions.json": "9cac3c650353104db1648050621057bfe104dec1f44b53d0b7875f7bc20e6eec", + ".local/rust-world-movement-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-world-movement-parity/cached-collision.nbt": "4a274cd720a1bda585b02f50f16e90246576679e1e173c214548c5cbf607ab2d", + ".local/rust-world-movement-parity/tags.json": "5e1301e5a9abf7e4de93af5dae3a157e852dbdb4ea345c2eb626305a605d4f98" + }, + "rust_output_sha256": "622f8c8bd0dc6ae6f8ce9606c1ecf15b163f75a6ee3241d43564d707f7d61497", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "622f8c8bd0dc6ae6f8ce9606c1ecf15b163f75a6ee3241d43564d707f7d61497", + "matched_output_lines": 7062798 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "622f8c8bd0dc6ae6f8ce9606c1ecf15b163f75a6ee3241d43564d707f7d61497", + "matched_output_lines": 7062798 + } + ], + "scope": "Actual native Entity.collide executes initial collision and step-up decisions over BlockCollisions, registered block shapes and resident ProtoChunk sections. Rust combines owned/fallible step resolution with registry-bound TerrainChunk scanning. All registered states are used as obstacles, plus step heights, falling/grounded motion, zero and underflow motion, partial blocks, fluids, dynamic blocks, ceilings, chunk boundaries and query failures. Entity collider lists and world-border proximity/shape are controlled inputs; query order and reuse, shape collection and resulting displacement are compared. Contexts are deliberately supplied empty/position/placement snapshots in both worlds. This does not establish entity broad-phase selection, actual world-border proximity, travel/gravity/velocity or grounded side effects, experimental minecarts or a playable game." +} diff --git a/benchmarks/rust-world-collision-check-2026-10-07/scoped-parity.json b/benchmarks/rust-world-collision-check-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..27e100115 --- /dev/null +++ b/benchmarks/rust-world-collision-check-2026-10-07/scoped-parity.json @@ -0,0 +1,235 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "registry_states": 35723, + "block_definitions": 1286, + "definition_counts": { + "tagged_full": 1221, + "never": 42, + "closed_shulker": 17, + "always": 4, + "not_extended": 2 + }, + "native_chunk_storage": "ProtoChunk", + "rust_chunk_storage": "TerrainChunk", + "fixtures": 80270, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "b53149d097a934f814c2374f26f27e5fbca485c58216d325744eaddfb074e60f", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_world_collision_check_parity.py": "3b8a82f72220e20f96e33e2ac09030fd82cb6c3a7511e7b11387de413be6452e", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/examples/registry_collision_scan_fixture.rs": "8aa40f2056f8dccb7166757dc08219a0331acfa5b6b489c1817c1393b10bb2c0", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "c37ea9eb157c24d9c91eec8edfef652f12b9b6b4d7f64da5ad0179fe5259a674", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_properties.rs": "9c78bed0d30c8b9cfaa413b9b81b0bf94861605c13b26754e09b24e83d75a227", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "fixtures_sha256": { + ".local/rust-world-collision-check-parity/inputs.txt": "210f1473983831ae93949eae6f5eae01ace1c729c46125e44f76143d23fa49ff", + ".local/rust-world-collision-check-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-world-collision-check-parity/definitions.json": "9cac3c650353104db1648050621057bfe104dec1f44b53d0b7875f7bc20e6eec", + ".local/rust-world-collision-check-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-world-collision-check-parity/cached-collision.nbt": "4a274cd720a1bda585b02f50f16e90246576679e1e173c214548c5cbf607ab2d", + ".local/rust-world-collision-check-parity/tags.json": "5e1301e5a9abf7e4de93af5dae3a157e852dbdb4ea345c2eb626305a605d4f98" + }, + "rust_output_sha256": "fadc86b51a80004c49117311fbe87d2d44405681ceb26bf71593784261ff214c", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "fadc86b51a80004c49117311fbe87d2d44405681ceb26bf71593784261ff214c", + "matched_output_lines": 4793095 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "fadc86b51a80004c49117311fbe87d2d44405681ceb26bf71593784261ff214c", + "matched_output_lines": 4793095 + } + ], + "scope": "Actual native CollisionGetter.noCollision for an entity executes lazy BlockCollisions over registered blocks and resident ProtoChunk sections, then entity list and applicable border shape checks. Rust uses the registry-bound TerrainChunk scan in the same short-circuit order. All registered states, controlled context variants, degenerate entity shapes, empty/disjoint borders, missing chunks, chunk/height boundaries and failures are compared. Entity list contents and border applicability/shapes are controlled; null-entity overloads, live entity indexing, experimental minecarts and player ledge behavior remain separate work." +} diff --git a/benchmarks/rust-world-edge-backoff-2026-10-07/scoped-parity.json b/benchmarks/rust-world-edge-backoff-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..3dc8ef1a0 --- /dev/null +++ b/benchmarks/rust-world-edge-backoff-2026-10-07/scoped-parity.json @@ -0,0 +1,236 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "registry_states": 35723, + "block_definitions": 1286, + "definition_counts": { + "tagged_full": 1221, + "never": 42, + "closed_shulker": 17, + "always": 4, + "not_extended": 2 + }, + "native_chunk_storage": "ProtoChunk", + "rust_chunk_storage": "TerrainChunk", + "fixtures": 42083, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "b016ca233f662ebac4730ae9af58e0b63aaeef16599106326376da7314114c48", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_world_edge_backoff_parity.py": "94094c0186c417062bc682e0860a54980805f3dcd3510f7380a153e572c707c4", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/examples/registry_collision_scan_fixture.rs": "19fd82abca9058d03f23cbdefb5c6f4ff78c8e5d024977bd287380528386d4ec", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "60097645dd2641eb53cde248b7d833bbe8e44ca53a3de4278aed6ccccc14e733", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_properties.rs": "9c78bed0d30c8b9cfaa413b9b81b0bf94861605c13b26754e09b24e83d75a227", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "fixtures_sha256": { + ".local/rust-world-edge-backoff-parity/inputs.txt": "869a645642747489fb1b26442383c684eed938ea164a326b6d60cc9d5bedfbd5", + ".local/rust-world-edge-backoff-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-world-edge-backoff-parity/definitions.json": "9cac3c650353104db1648050621057bfe104dec1f44b53d0b7875f7bc20e6eec", + ".local/rust-world-edge-backoff-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-world-edge-backoff-parity/cached-collision.nbt": "4a274cd720a1bda585b02f50f16e90246576679e1e173c214548c5cbf607ab2d", + ".local/rust-world-edge-backoff-parity/tags.json": "5e1301e5a9abf7e4de93af5dae3a157e852dbdb4ea345c2eb626305a605d4f98" + }, + "rust_output_sha256": "867e26dc548afc0e892725e62091517032f18e9de6cf9b796a44e37c32464f7c", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "867e26dc548afc0e892725e62091517032f18e9de6cf9b796a44e37c32464f7c", + "matched_output_lines": 27109699 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "867e26dc548afc0e892725e62091517032f18e9de6cf9b796a44e37c32464f7c", + "matched_output_lines": 27109699 + } + ], + "scope": "Actual Player.maybeBackOffFromEdge issues native noCollision queries over registered block states in resident ProtoChunk storage. Rust combines edge-backoff guards/probe geometry with short-circuit entity-bearing no_world_collision and registry-bound TerrainChunk scanning. Every state is used as the supporting block; additional falling, step-height, chunk-edge, diagonal, partial/dynamic block, mover/flight/crouch and failing-provider cases are compared. Entity collider lists, border applicability/shapes and empty/position/placement contexts remain controlled inputs. This is registered-world ledge integration, not a complete Player.move/travel loop or full playable game." +} diff --git a/benchmarks/rust-world-movement-2026-10-07/geometry-regression.json b/benchmarks/rust-world-movement-2026-10-07/geometry-regression.json new file mode 100644 index 000000000..b8f01cb16 --- /dev/null +++ b/benchmarks/rust-world-movement-2026-10-07/geometry-regression.json @@ -0,0 +1,112 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "commands": { + "traverse": 8448, + "trig-table": 1, + "rotation": 16000, + "vec": 7256, + "box": 7006, + "block-box": 100, + "grid": 201, + "query": 52500, + "many": 2500, + "motion": 12000, + "join": 5652, + "make-box": 600, + "optimize": 500, + "join-optimized": 500, + "step-motion": 17680, + "block-iterate": 2400, + "box-iterate": 2400, + "sweep": 9022, + "floor-height": 12000 + }, + "inputs_sha256": "95abe82bf9f328e8b51aafb84a3e97954073f743b963a3d2fa4892cc120f49f1", + "rust_output_sha256": "ebb938b5288e05a291b6e1039f286aa7565821f8de46afb1d853d8112c079dd5", + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGeometryOracle.java": "48c233ec1a5684cbd5a9edb5d7972aa4647465045ef298dce14a91de45cc4809", + "tools/test_geometry_parity.py": "38ce169dc520535c217a01705510b71ef3ee81128376640e849f47bc999ef64d", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "b00bfa09225e5de0a9199a405fe0a4bec5017da833432e5915dbf1941b8fb098", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "ebb938b5288e05a291b6e1039f286aa7565821f8de46afb1d853d8112c079dd5", + "matched_output_lines": 1320187 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "ebb938b5288e05a291b6e1039f286aa7565821f8de46afb1d853d8112c079dd5", + "matched_output_lines": 1320187 + } + ], + "scope": "Selected Vec3/AABB operations, sine table entries, quantized trig, rotations and look directions; finite block-ray traversal; bounded inclusive/directional block iteration and finite swept-block visits with step indices; immutable cube/array voxel-grid bounds, column minima/maxima, greedy boxes, collide, ray hits, closest points and cell lookup; lazy floor-height selection; box quantization, optimized/unoptimized Boolean joins, alias identity and joinIsNotEmpty; Entity.collideWithShapes, candidate step heights and Entity.collide step-up decisions/query bounds with caller-controlled block/entity/border shape lists. No live entities, actual world shape selection, grounding/velocity side effects, fluids or block behavior." +} diff --git a/benchmarks/rust-world-movement-2026-10-07/scoped-parity.json b/benchmarks/rust-world-movement-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..8d24c8618 --- /dev/null +++ b/benchmarks/rust-world-movement-2026-10-07/scoped-parity.json @@ -0,0 +1,228 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "registry_states": 35723, + "block_definitions": 1286, + "definition_counts": { + "tagged_full": 1221, + "never": 42, + "closed_shulker": 17, + "always": 4, + "not_extended": 2 + }, + "native_chunk_storage": "ProtoChunk", + "rust_chunk_storage": "TerrainChunk", + "fixtures": 45163, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java": "48ea6354fe17eeb1ccead6bd644dbb2a1823397b86173a025f2699b2bf8acb21", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java": "145c943637ed177cc4ef8a85f2484da8afd164868e84a8463882feec1653a860", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java": "f2b4f440a5bbce4224a4b3cee494b0f7ddcafbf72db12592c94ef9fb94fbc8a6", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java": "5c217a8cb72094020082bd4846ed675a6399b9fa371be95a221bd92d227b2e09", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java": "8dd870e65807bac4234085958830321061f0a3805dcf2b1219514107ba710503", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java": "9ce939a435842867786fed648951bbe77f6ab843f6df09af15f3deb1948c4877", + "tools/test_world_movement_parity.py": "c70470c10421ba93688aac821cdd45ac97f106162fd4b8a4e5823ab6eedb98bd", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-world/examples/registry_collision_scan_fixture.rs": "3bf73ec0bfd8d2a364882aa64080c4635314b094dcae571d6e824033abaaf6bd", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "b00bfa09225e5de0a9199a405fe0a4bec5017da833432e5915dbf1941b8fb098", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "befe4f7a8bf5399ccc2bbbfd2c8d6c016ecce28d53a699c42d021b83c80b7bb9", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "8ac9e90fe899855036658afd862ff20c4dcd15d1bd3f92a763c4795fecf0549f", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f" + }, + "fixtures_sha256": { + ".local/rust-world-movement-parity/inputs.txt": "bbe9f6e31b141231e9726858c4490335c6c563f845bb25ce43afa5bf2486b3f0", + ".local/rust-world-movement-parity/facts.json": "5e89a805514cabfe46e082d651db406b9479781e1d97b65faa2ab9f6f871309b", + ".local/rust-world-movement-parity/definitions.json": "9cac3c650353104db1648050621057bfe104dec1f44b53d0b7875f7bc20e6eec", + ".local/rust-world-movement-parity/block-registry.nbt": "5042073c80753f9548cb8fdb5b1000f0e5a1220127a0cc3c6a75737e180bf9bb", + ".local/rust-world-movement-parity/cached-collision.nbt": "4a274cd720a1bda585b02f50f16e90246576679e1e173c214548c5cbf607ab2d", + ".local/rust-world-movement-parity/tags.json": "5e1301e5a9abf7e4de93af5dae3a157e852dbdb4ea345c2eb626305a605d4f98" + }, + "rust_output_sha256": "622f8c8bd0dc6ae6f8ce9606c1ecf15b163f75a6ee3241d43564d707f7d61497", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "622f8c8bd0dc6ae6f8ce9606c1ecf15b163f75a6ee3241d43564d707f7d61497", + "matched_output_lines": 7062798 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "622f8c8bd0dc6ae6f8ce9606c1ecf15b163f75a6ee3241d43564d707f7d61497", + "matched_output_lines": 7062798 + } + ], + "scope": "Actual native Entity.collide executes initial collision and step-up decisions over BlockCollisions, registered block shapes and resident ProtoChunk sections. Rust combines owned/fallible step resolution with registry-bound TerrainChunk scanning. All registered states are used as obstacles, plus step heights, falling/grounded motion, zero and underflow motion, partial blocks, fluids, dynamic blocks, ceilings, chunk boundaries and query failures. Entity collider lists and world-border proximity/shape are controlled inputs; query order and reuse, shape collection and resulting displacement are compared. Contexts are deliberately supplied empty/position/placement snapshots in both worlds. This does not establish entity broad-phase selection, actual world-border proximity, travel/gravity/velocity or grounded side effects, experimental minecarts or a playable game." +} diff --git a/benchmarks/rust-world-ray-2026-10-07/scoped-parity.json b/benchmarks/rust-world-ray-2026-10-07/scoped-parity.json new file mode 100644 index 000000000..ab9e89fac --- /dev/null +++ b/benchmarks/rust-world-ray-2026-10-07/scoped-parity.json @@ -0,0 +1,221 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 13896, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldRayOracle.java": "9b6ad079ee7b826dd60fb180a3bdeae02f2d034f3c9e3549e292add94faa152f", + "tools/test_world_ray_parity.py": "f36ada99750efedf3a8e3ef59a0080967ccfe61f902608587532e8c09f5ddb22", + "tools/test_rust_parity.py": "29d3db08005873528894b45ca10dcd6278753650473b3eb574e53e06ede40ec6", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "3f93319c1eb70dbd7ba25cd74ef343fbf35c52c7c4752f955605c58699cbff9d", + "Cargo.lock": "cb1e87d449114a63edd904c0559d631e8fa9feeb27efd6539aacdcfeae178876", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/border.rs": "1386f8080521231d05ba3e84d94a3e1d5218d35ccb3d5e9fe2bbb05a8739e573", + "crates/horizon-core/src/geometry/mod.rs": "c650386f9860e44a96c55f18c8f1428ca715fcb0bc5c2434db5b1caa43df27fe", + "crates/horizon-core/src/geometry/movement.rs": "bcfb452752940ce53ae6dc267a3c4eb29459046a063c1f884684ab4f4bd0068f", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/face.rs": "f243bce81384040a95ce7984b02b5699206c596c537b2713097e86005b4d3a5c", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "e8d88a763de1525f77a30b99591641e8a8b80946263acbde035a9bcc356df960", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "4255e16837fde42a52ba118f60581d197c571bb530b60d635e506184ebf4db0b", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/text.rs": "e6553ddb5db5039e8dc4614b6a6dc9f35a26dc3d1673b68a04e72e7983b67abb", + "crates/horizon-core/src/ticks/generation.rs": "be1237e790693f633a61714ddae68c6506a777588a8a3ab5efbe53a35774dbd2", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "01634630668172516b8b79d0907bad47f6e2c543a6d499c2fa4b201823b375cb", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/block_collision.rs": "39207247f2f6dd3ddc77640229044246f91b32054563f88a435f1bd92ad2092c", + "crates/horizon-world/src/block_collision_scan.rs": "20802862364c110ff85eeaf48606596a8468b83768dda46b412d337958790b41", + "crates/horizon-world/src/block_entities.rs": "a9deae92e6e5a1fcf4f0476c33ea4d170ddad6fd4b3303e1bb66d933973d5e06", + "crates/horizon-world/src/block_entity_push.rs": "12ee91bf604946234b24a0da4333f07d1830ab9743a422d41c8d0afac7d49cfd", + "crates/horizon-world/src/block_landing.rs": "33083fe39266fbefec1b3ea1a19f2afc609791d189da247c895e116ad6eb266a", + "crates/horizon-world/src/block_placement.rs": "524f4892d50bab77b7d89d19f7b048ffe746996f2ed7f376db2c6ab00ed75c24", + "crates/horizon-world/src/block_properties.rs": "b0bd8a983336c48e488a20caa77dd5c39b1a74bbd14ebc03b3b64556a1c864fc", + "crates/horizon-world/src/block_render.rs": "8df52ee11aef406a1571198a64048062a0ef6864e0058d9293a57f64b73c916a", + "crates/horizon-world/src/block_support.rs": "ade4fbd47284b450dabdd682dc86138b2ac05a0fd379525d7110648908245476", + "crates/horizon-world/src/block_survival.rs": "28ce64375e09819a4f13da9cfbe37c08b5ad0daf01b289c1c360b4567e50e811", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/chunk_status.rs": "dbb8583cfa775203c544d24d69e03720385428f15a267a561356c21f5025e9c7", + "crates/horizon-world/src/collision.rs": "a749794d5c27ccd6c0d964ad02f9dc31d49d9f4fe4b7366cd4bd8155e681b00b", + "crates/horizon-world/src/collision_context.rs": "2176c7034e07f547510a8327cdad9d3b63f26e4754032b76b7d5fe13166c333c", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/dynamic_support.rs": "5996bc1c436fb6215d8fc3d0bb4de5dd9b966d842d432580d624195771697fb8", + "crates/horizon-world/src/edge_backoff.rs": "5259d7aa44e64f88351d1556c44dd0edcad3b400a099c659755792efba7b5773", + "crates/horizon-world/src/entity_collision.rs": "09f2fd7f6cd56fc282f468ecfa765a94506929e9684bd3a5c90123e5b51cd627", + "crates/horizon-world/src/entity_move.rs": "a40a50d3e841625a75d4cfbb7c2630ab5a62a574456567e7234f401ae8441b32", + "crates/horizon-world/src/entity_obstruction.rs": "a4b28a19bf83b23611c59d94535c488db37e4aee24b22c973c545910894a809f", + "crates/horizon-world/src/fall_damage.rs": "8c28e2933493569fe05dea22332024287d28b0746b514dd465681040b003296b", + "crates/horizon-world/src/fluid.rs": "a0a1f34ba94d8b59dc975becee8952960764d67ae08cf2d6a8bcd40a614b15c4", + "crates/horizon-world/src/ground_support.rs": "3e371d74ecede4d30beef0a7e8a2ee33463584a5b1ed3d852b394efcce1ffbe0", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "24cf8b3b172e576838ffc5693c86e50e586080cec1dfca4e595081f54a065c5c", + "crates/horizon-world/src/liquid_collision.rs": "0f0a83b04e5a5bc9d98ed05fde4d6584ba69642e93522e726e4cfc325d6fcb1d", + "crates/horizon-world/src/living_fall.rs": "da0f176f4731e1c86e08bfeee8167742fd1b86380ff0e9304c13c1ce3f1c67ab", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/movement_emission.rs": "76e7d6f5b19c94676190f54389f9c4ce12cf89945ccfcb9c750de473223e7753", + "crates/horizon-world/src/movement_properties.rs": "6f01ab920b376a13f5ae12c3718f4dd067e1dff2b829585af00a8b2100f3775d", + "crates/horizon-world/src/movement_restitution.rs": "04b4fe0947e7e52576145bd8ed15920278e8a538afcc74d125eaca513dffa0ef", + "crates/horizon-world/src/movement_support.rs": "02d85cf572847f2e60b5a7f9d60b856888a67b3c1f4df03e81998c66fdf874be", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/piston_movement.rs": "7a3fd2549a582b5f3a5c21aa05d67d944d62ca1105856679e100ac5b44e9a52f", + "crates/horizon-world/src/piston_shape.rs": "399c2337103b8e7e0eb5667227c5aa14f9549d6a467b7be7da3d0717f0263500", + "crates/horizon-world/src/powder_snow_collision.rs": "7289946a21478d11abfd2bdcdddff3d7f98e25bf6a68564fed45c3cc01ac2a36", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "7a683afcd1742c5307756927d7f0aa779c7d7992af87d8d371dd98108728e235", + "crates/horizon-world/src/registry.rs": "f2e58b2b4d944ac8fc6226bd3352cefc3d2052d8473e02ccf7dc402b176df435", + "crates/horizon-world/src/registry_collision_scan.rs": "a5021a168adcedc37d77f533a8921c02f09c59f46a01737586aaa33c5908b8d0", + "crates/horizon-world/src/retrogen.rs": "6efd36a6293756688c1990a7965bd65609d7c5e2bf2a5f4f01d54932d2b9386b", + "crates/horizon-world/src/suffocation.rs": "bed219dd5bbab6263b98fbe3d0eb512cb96c52ae847210efe49514d05f22f11e", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/world_movement.rs": "f8fe9e34f2395d2a04c839d1c8ba78e09ce493c26de6f6e4e237b9c19c061da5", + "crates/horizon-world/src/world_ray.rs": "879bdbbe12f56deb705cc183933431489e840b71eade40c33391eed5949c2e61", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/bamboo.rs": "d9b47113c99be34256e58308bc6f40072ff25c579d6bf995182aa862c0006102", + "crates/horizon-world/src/worldgen/biome.rs": "3fe316b875aa32683759c337dc71f624910faf0812a2d6d83b8098d6d0bac7a0", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "8fdfe6ebe3ffeca97611fd5991a5bc6b2783ea1c62f4d8ef3b2dd53c04a5dc1d", + "crates/horizon-world/src/worldgen/biome_predicate.rs": "bfc581bc40077cc74ffda43e990a55fe997adc04c7130f98e039c3305ca79aac", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/biome_weather.rs": "96b1f9494559ed31d06257b83d604d00cc069ccc8c7b68094117e034b4a71bd7", + "crates/horizon-world/src/worldgen/block_blob.rs": "c608c57b3d77279646ecb89e50677dd8e452b0422ffd357ba755536c5589eb89", + "crates/horizon-world/src/worldgen/block_column.rs": "f72c21a9066ee0aa68c2fb79fba436d05afb14c6ef5a2cb012f1ed35fc17cd22", + "crates/horizon-world/src/worldgen/block_feature.rs": "36b4e46ee7f7f73bcb94d8bce8d99013e4b16234c9a03542eeb3186e88dd1c21", + "crates/horizon-world/src/worldgen/block_pile.rs": "623e369b77e0526ed2756485a6c0bb09683cd28ad8876dea907360ca6665b39d", + "crates/horizon-world/src/worldgen/block_predicate.rs": "074c692367e3f2191a1bb28d87b23402430a843c246bd30a4ea838ee3500280e", + "crates/horizon-world/src/worldgen/blue_ice.rs": "eedd77bdaff808330b864166d303378096daa5c7d235e925770b171c05109247", + "crates/horizon-world/src/worldgen/bonus_chest.rs": "05d0f63fbc7412f13ba1fa37a7238114b8f70bfff318beb2dece590482d49cc0", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/chorus_plant.rs": "29224c164ede919e280a65a68f155c873e2c8fd0aa7d7e244d8fa9e468760250", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/decoration.rs": "75a79b20b21e133816e729f16e758be6165d0db18a64bfbd5fd3618325a2adf3", + "crates/horizon-world/src/worldgen/delta.rs": "c2bf49ddf3231d28c109e68871429bc13d76a7bebe14eb33e84aa856bdd66145", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/disk.rs": "6f8f9e059755af44c9bfa1b91eba54a7d13fad811dce31717c5502d7f6df33d7", + "crates/horizon-world/src/worldgen/end_gateway.rs": "f53fde77d6a36a525cd15d890003b2c129d0689a4cbfa2cf443a0c2e3acae040", + "crates/horizon-world/src/worldgen/end_podium.rs": "8f6d0d6d60ff0fde63de5781e867239db321f82cf12639f0537d410a3731ee1d", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "efc7b17b227e71622ef34108be9abd010f5675b68ea0409fcab82581d9aab88a", + "crates/horizon-world/src/worldgen/feature_graph.rs": "da132fca9fdafb0d89a917d5f4b68c60b70fb33cadf948a107da0e35d83dcd91", + "crates/horizon-world/src/worldgen/feature_region.rs": "df0ff142a461cafa9a3b42b949ad3376887f2be8d4ea5cc794a3ed2e977bb499", + "crates/horizon-world/src/worldgen/feature_sort.rs": "3488a093dfe1321aaa29d8a30cfb115d8e666a81bf195514e87b170de626835c", + "crates/horizon-world/src/worldgen/fluid_predicate.rs": "64197c9e63bebf1ce04bc280bfe980bb6c1b9aa887ca5cded904aeb0d9ae6c46", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "9218399b4d3757f7bbc550d7729a7201f32a1c83a7030865e0c12aab8a80d116", + "crates/horizon-world/src/worldgen/placement/context.rs": "a278304795136677ad4b4933ea50c972b9729a1c671c03fa309c193e224b1fd6", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "b0397e5818fae84358546193a95f84bcb0b5bffafce909e6fcb3386179ee8023", + "crates/horizon-world/src/worldgen/replace_blobs.rs": "bf3377d86d2570cd15288ba69dde64a2cf67c5bcbb9a31d0c23421964af74afa", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/simple_block.rs": "9ba1a88d5db4925f8c37366557887f776c805f9a6444781615b5dbaff52e92a4", + "crates/horizon-world/src/worldgen/snow_freeze.rs": "9040be3d5c7f8f0fd812d2df45e154bf8a9eeef038530b83fa4159d246eac35f", + "crates/horizon-world/src/worldgen/speleothem.rs": "c71651c1c97818a8a85863e14414d6139ea3bdeb897fa422043bcc1499d99aae", + "crates/horizon-world/src/worldgen/spike.rs": "eacf0d9d3d2bc3d4bcf62bc87555f90031138236a5bfef0eb5270204f7c2a4fc", + "crates/horizon-world/src/worldgen/spring.rs": "830849e9b89fcdf09e9b06fbefdcdebe3c8c3f82804f60b8bd5de04ba303cb62", + "crates/horizon-world/src/worldgen/state_provider/catalog.rs": "c8687e15a4887a9200c8d365857d801efaa8f90e669eee3e600a1db4905119eb", + "crates/horizon-world/src/worldgen/state_provider/noise.rs": "7ee369c2a032e5620cb9bdf9ee7adad1f70870fb0a27efb7b7c514d92f83491f", + "crates/horizon-world/src/worldgen/state_provider/properties.rs": "9909139aaca1dc4f743957257fadaa9d423d21fa401fa9abc050505f79365139", + "crates/horizon-world/src/worldgen/state_provider.rs": "be29ada818826a90afe01ab60916360fdfc4cbde5af15c9359cd56b1f1f7b156", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "fd1f2e0afc15daf66f484ea40a1f2b7013650bda0941b23c64c81ee9f79cb673", + "crates/horizon-world/src/worldgen/underwater_magma.rs": "7317e40af5ee5a9780f90ce358fa5d3e7f5b3d513b731df6ff97754d9c2a0154", + "crates/horizon-world/src/worldgen/value_provider.rs": "3358b563db8cb0bc8a9cfbbe2b8b3e70941cd2d37a0b519fbb6545f8d0dcbb69", + "crates/horizon-world/src/worldgen/vines.rs": "ee9b79b65012bd86a838241d2ef708680f7fe8eafc8aa656dae9cf2abf3c6418", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen/write_zone.rs": "8e17a179764d3f68c05882aef35f6810c28a0000f9a83e58bd6030660b76e64e", + "crates/horizon-world/src/worldgen.rs": "e8e9f099ee1fcec8eedce31805d676d3f89c18e84f494a147ffcbfee23d3d54f", + "crates/horizon-world/examples/world_ray_fixture.rs": "3e4d9cd496b3df69130dd124116b2778a14c19837d515489c103e3c779a8e8c7" + }, + "fixtures_sha256": { + ".local/rust-world-ray-parity/inputs.txt": "3f67bb952a1528123cf2858e23590d68bddd8350f636f4fea2b515fe65d7a5c6" + }, + "rust_output_sha256": "e45310cc0ecebb8330a86e6798735b4360cdde0100db9b283d619c5280c8694a", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "e45310cc0ecebb8330a86e6798735b4360cdde0100db9b283d619c5280c8694a", + "matched_output_lines": 248725 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "e45310cc0ecebb8330a86e6798735b4360cdde0100db9b283d619c5280c8694a", + "matched_output_lines": 248725 + } + ], + "scope": "Actual BlockGetter.clip, clipWithInteractionOverride and native ClipContext block/fluid selection. Covers collision/outline/visual/fall-reset modes, none/source/any/water fluid modes, nearest-hit ties, face-only interaction overrides, inside hits, misses, zero/signed-zero/tiny rays, ordered block/fluid reads and provider failures. Fall-reset tests include block tag, entity type identity, end gateways/portals and server nether-portal delay with lazy rule queries. Shapes and state predicates are controlled providers; registered outline/visual/interaction shapes, live world binding and gameplay integration remain separate work. Nonfinite rays and exhausted visit budgets return explicit Rust errors rather than fabricated misses." +} diff --git a/benchmarks/rust-worldgen-2026-10-05/scoped-parity.json b/benchmarks/rust-worldgen-2026-10-05/scoped-parity.json new file mode 100644 index 000000000..bc588a6de --- /dev/null +++ b/benchmarks/rust-worldgen-2026-10-05/scoped-parity.json @@ -0,0 +1,307 @@ +{ + "schema": 1, + "minecraft": "26.3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "commands": 16770, + "command_counts": { + "noise": 2111, + "quantize": 4116, + "index": 229, + "climate_parameter": 25, + "climate_point": 183, + "noise_settings": 217, + "settings_create": 182, + "aquifer": 9136, + "noise_aquifer": 379, + "registry": 24, + "router": 168 + }, + "noise_aquifer_injected_failures": { + "0": 3, + "1": 3, + "2": 3, + "3": 3, + "4": 3, + "5": 3 + }, + "noise_aquifer_outcomes": { + "1 false": 5800, + "0 false": 9995, + "default_solid false": 12655, + "2 false": 35365, + "0 true": 1114, + "2 true": 2021, + "1 true": 43, + "5 false": 443, + "5 true": 5, + "6 false": 295, + "6 true": 8, + "7 false": 49, + "7 true": 1, + "4 false": 51, + "4 true": 4, + "error false": 17, + "3 false": 81, + "error true": 2 + }, + "noise_registry_entries": 64, + "density_registry_entries": 55, + "noise_settings_entries": 7, + "biome_parameter_entries": { + "minecraft:nether": 5, + "minecraft:overworld": 7594 + }, + "biome_tables_sha256": { + "minecraft:nether": "09e477f851380a6e726ea85fee39cd1d41c7f160fe424f58cb3f0056b5c11218", + "minecraft:overworld": "6bc45ce2eed04b6afecdfaf2cf89273e83dad071aeb45638e181d33fe5180f57" + }, + "fixtures_sha256": { + ".local/rust-worldgen-parity/registries.json": "c6868228cc1002755dab31d947e953cc4be785a1b6ae82697755817a238b7de9", + ".local/rust-worldgen-parity/inputs.txt": "4afb482c8aa6e654ef47b9696f76c16fa862414248202c9bf748941bfc8d0877", + ".local/rust-worldgen-parity/biome-presets-client.json": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9", + ".local/rust-worldgen-parity/biome-presets-server.json": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9" + }, + "noise_resources_sha256": { + "data/minecraft/worldgen/noise/aquifer_barrier.json": "864a9d66a03b081adc8d4bf51a6d0cd5fdd94a0ebf1cecadec2aed9e549db7e4", + "data/minecraft/worldgen/noise/aquifer_fluid_level_floodedness.json": "e755b926628bc49edf48a3bd3b1e1bc3e2895b774f5e2e81f1d4340782a9fc56", + "data/minecraft/worldgen/noise/aquifer_fluid_level_spread.json": "6afc3f09b6616f799d739b5b114c4436059dcc60308af55fe96a8594de815214", + "data/minecraft/worldgen/noise/aquifer_lava.json": "96e1c4e411ffe302c5541cd2ee8462e1992f0290d623c560f353c39981737346", + "data/minecraft/worldgen/noise/badlands_pillar.json": "79c0d0628db949d3b83bbca145da427bcdc3ff585b0ad736f7cb20e4c593c9a2", + "data/minecraft/worldgen/noise/badlands_pillar_roof.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/badlands_surface.json": "79365a5c2017e93878d989a176520ba9cbdf8685cff8b3cb148730d949d98b09", + "data/minecraft/worldgen/noise/calcite.json": "331259d84572c32b4b268d069e0132da9e6623ba614080e34b815472c7f4ee0c", + "data/minecraft/worldgen/noise/cave_cheese.json": "24c6846b7fc1f7c652bf185797fe98b943146b6aaf8766d1bff2066c59b7ed24", + "data/minecraft/worldgen/noise/cave_entrance.json": "f75146a7b1a033998edd3c77319f78243fe933bdcda2067b78658940f145cac6", + "data/minecraft/worldgen/noise/cave_layer.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/clay_bands_offset.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/continentalness.json": "b7ce5ac29a2c7a7cfbfaa1e1eeca9ba8f4a52139e59318850fa2407242c69ba8", + "data/minecraft/worldgen/noise/continentalness_large.json": "76834cff0227d52b19b5932142925f4fc639e713c2180e489f813701ca45f53e", + "data/minecraft/worldgen/noise/erosion.json": "af8a7a0f16ff3e568ad646df9cbc28e04a31b16dad4f162705c0f7c747da6983", + "data/minecraft/worldgen/noise/erosion_large.json": "d20c2c6ec805a366b105924b3cee29ac5b84cc06d636b539ae0047aac413b60a", + "data/minecraft/worldgen/noise/gravel.json": "87d627634161e51a79512f3d3f42f990d2a185e35198eb5e2161939d866751e0", + "data/minecraft/worldgen/noise/gravel_layer.json": "a4b45bdb6efef2509b053b970f6e84250d7b16d54f3906bc7fcf2665ada2a692", + "data/minecraft/worldgen/noise/ice.json": "85d03cc06d6bc552dc399dcc90ca9749c2625ddf0049dc0f95684631a7c6e66e", + "data/minecraft/worldgen/noise/iceberg_pillar.json": "98816326f84a21ce29421a9cba3ad85e5a26069312c9819aaf5662691e777fd5", + "data/minecraft/worldgen/noise/iceberg_pillar_roof.json": "864a9d66a03b081adc8d4bf51a6d0cd5fdd94a0ebf1cecadec2aed9e549db7e4", + "data/minecraft/worldgen/noise/iceberg_surface.json": "79365a5c2017e93878d989a176520ba9cbdf8685cff8b3cb148730d949d98b09", + "data/minecraft/worldgen/noise/jagged.json": "d64347f4f9acb984075e3b4945b4699907ec6d893588388dd8f738f29f75f4d1", + "data/minecraft/worldgen/noise/nether/temperature.json": "5a67fbc28b5c2578b4ca5f6abdd115c715ea2ef1be3e1a7a8eb1a0de4c3a8f7c", + "data/minecraft/worldgen/noise/nether/vegetation.json": "5a67fbc28b5c2578b4ca5f6abdd115c715ea2ef1be3e1a7a8eb1a0de4c3a8f7c", + "data/minecraft/worldgen/noise/nether_state_selector.json": "116c8bf1d676fd3a3dea3908e074a4f4b7ee55d3263e93abf5889b41bfc77f5b", + "data/minecraft/worldgen/noise/nether_wart.json": "4518b186ffe4b65394a35276c8708037c6f3f73c7cb95ef6d41a5cd4b8d234f6", + "data/minecraft/worldgen/noise/netherrack.json": "cef60938a0304eec78a6bdebd24b80a45c5d1bad894c6c012e3413ecc485a81a", + "data/minecraft/worldgen/noise/noodle.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/noodle_ridge_a.json": "e755b926628bc49edf48a3bd3b1e1bc3e2895b774f5e2e81f1d4340782a9fc56", + "data/minecraft/worldgen/noise/noodle_ridge_b.json": "e755b926628bc49edf48a3bd3b1e1bc3e2895b774f5e2e81f1d4340782a9fc56", + "data/minecraft/worldgen/noise/noodle_thickness.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/offset.json": "45f51565587e2dc055271648037c0ec3466815e82f0d762e0198c16285fc8ae7", + "data/minecraft/worldgen/noise/ore_gap.json": "6afc3f09b6616f799d739b5b114c4436059dcc60308af55fe96a8594de815214", + "data/minecraft/worldgen/noise/ore_vein_a.json": "e755b926628bc49edf48a3bd3b1e1bc3e2895b774f5e2e81f1d4340782a9fc56", + "data/minecraft/worldgen/noise/ore_vein_b.json": "e755b926628bc49edf48a3bd3b1e1bc3e2895b774f5e2e81f1d4340782a9fc56", + "data/minecraft/worldgen/noise/ore_veininess.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/packed_ice.json": "0f51993727dcb0aa7c6cb9288e462443e711e9980c12927435126a3c45922786", + "data/minecraft/worldgen/noise/patch.json": "83a0052d4220c67c5513bce689d681e3af3325c18fec612cdd4941fc738f4be0", + "data/minecraft/worldgen/noise/pillar.json": "5a67fbc28b5c2578b4ca5f6abdd115c715ea2ef1be3e1a7a8eb1a0de4c3a8f7c", + "data/minecraft/worldgen/noise/pillar_rareness.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/pillar_thickness.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/powder_snow.json": "98816326f84a21ce29421a9cba3ad85e5a26069312c9819aaf5662691e777fd5", + "data/minecraft/worldgen/noise/ridge.json": "e05d077746b27d662a8c981807819df3e3bb1f1779d2245dd911c8193e03bbf8", + "data/minecraft/worldgen/noise/small_patch.json": "9ecc836feb68b42d717217e028f2a72112179f1097f5bd156b1d3f1db637732e", + "data/minecraft/worldgen/noise/soul_sand_layer.json": "a4b45bdb6efef2509b053b970f6e84250d7b16d54f3906bc7fcf2665ada2a692", + "data/minecraft/worldgen/noise/spaghetti_2d.json": "e755b926628bc49edf48a3bd3b1e1bc3e2895b774f5e2e81f1d4340782a9fc56", + "data/minecraft/worldgen/noise/spaghetti_2d_elevation.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/spaghetti_2d_modulator.json": "d210211c0c76c53f15908f0b004a7e98e9d753ed996cd5468f2068f2e23932d1", + "data/minecraft/worldgen/noise/spaghetti_2d_thickness.json": "d210211c0c76c53f15908f0b004a7e98e9d753ed996cd5468f2068f2e23932d1", + "data/minecraft/worldgen/noise/spaghetti_3d_1.json": "e755b926628bc49edf48a3bd3b1e1bc3e2895b774f5e2e81f1d4340782a9fc56", + "data/minecraft/worldgen/noise/spaghetti_3d_2.json": "e755b926628bc49edf48a3bd3b1e1bc3e2895b774f5e2e81f1d4340782a9fc56", + "data/minecraft/worldgen/noise/spaghetti_3d_rarity.json": "d210211c0c76c53f15908f0b004a7e98e9d753ed996cd5468f2068f2e23932d1", + "data/minecraft/worldgen/noise/spaghetti_3d_thickness.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/spaghetti_roughness.json": "6afc3f09b6616f799d739b5b114c4436059dcc60308af55fe96a8594de815214", + "data/minecraft/worldgen/noise/spaghetti_roughness_modulator.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/sulfur_cave_gradient.json": "4900ffd885ce33b220a673ba0a248504c78f9f2cdfce824106a237d9ad18a6a7", + "data/minecraft/worldgen/noise/surface.json": "79365a5c2017e93878d989a176520ba9cbdf8685cff8b3cb148730d949d98b09", + "data/minecraft/worldgen/noise/surface_secondary.json": "ae23cb210db7b64b66b327dbbf1e7b2acb5c15cb6fe5df0455eb29910d9312eb", + "data/minecraft/worldgen/noise/surface_swamp.json": "19e08e0d1dff257cf748d3cef79e939e8f25cc5e7226653c789008171f40695b", + "data/minecraft/worldgen/noise/temperature.json": "9b1d5a87d575abf2891882ec3e1544b964cd15fedc84ad14d2abbd3b48ee2e4b", + "data/minecraft/worldgen/noise/temperature_large.json": "4fe64b952b751eb7e45b4d1e274add508b504ee8bbc54cad417ce3a3b068d42e", + "data/minecraft/worldgen/noise/vegetation.json": "ff4c10776eb2822f9f66dec4e9878a1bc797aca711480bf8430f851ff9af77dc", + "data/minecraft/worldgen/noise/vegetation_large.json": "20f4a255e3f9452f4cf983b3efed71ead184d04f4070283f355ad4d97993d133" + }, + "density_resources_sha256": { + "data/minecraft/worldgen/density_function/end/base_3d_noise.json": "38db7d590abc3144e3357a79562d649d9880bc2c62ddc99480d93f4b6401c9a6", + "data/minecraft/worldgen/density_function/end/islands.json": "6e4f02929580ecc34bfb059855b4e88d080dc7ca6c9984f216bdaa32e6b47700", + "data/minecraft/worldgen/density_function/end/sloped_cheese.json": "5dee072865321e57e5e231e60a57bfcd1919454f93da33b3c1651b3712f2cfb2", + "data/minecraft/worldgen/density_function/nether/base_3d_noise.json": "76cfd16e6fc2b1ce8bdb5f5ee277d431c167bc01afc2462bffff09eb5f0bd582", + "data/minecraft/worldgen/density_function/overworld/base_3d_noise.json": "2791a1e6c5c730eac1bd35aaea9a7ab22855872fdb92349192d045330fd4614f", + "data/minecraft/worldgen/density_function/overworld/caves/entrances.json": "63a1b8351e6dea212501c36f515f32e5a0e960228b5b5ccf0dc5b43855cbc1ab", + "data/minecraft/worldgen/density_function/overworld/caves/noodle.json": "3bce7453470fd37e3bfc11dc8584494aab094f9fd820038dc5592cb47e825a69", + "data/minecraft/worldgen/density_function/overworld/caves/pillars.json": "069d35fbdaed7d74521fc3e9355a94e778450b52a05f1efbd470ce3917b8a207", + "data/minecraft/worldgen/density_function/overworld/caves/spaghetti_2d.json": "a99c68ac415596788c84e93e81c96c9786e31db21a81157459a13272cda4cb1f", + "data/minecraft/worldgen/density_function/overworld/caves/spaghetti_2d_thickness_modulator.json": "4f987a0b9e8c0adb02df47034fa8b3cebfbfb2c8e607123614ef009a16bfaf6c", + "data/minecraft/worldgen/density_function/overworld/caves/spaghetti_roughness_function.json": "03bd1b405e53aeb75b6a3440d97975c25b6f11c7fc07149471b86c80fbdb6ea4", + "data/minecraft/worldgen/density_function/overworld/chunk_surface_level.json": "93a4e26ce4a1144c42040f52ca375f0dec94648c70ccdcc52db4a7f55ca526a5", + "data/minecraft/worldgen/density_function/overworld/continents.json": "0f2ff487c0556391ae2d56b7cab6990d45766ade2503236fe2669f83a64517be", + "data/minecraft/worldgen/density_function/overworld/depth.json": "9fcd7c8badcae4dc8e86303b0f72b05b5fd998d5bb7ac637729dd7e688688069", + "data/minecraft/worldgen/density_function/overworld/erosion.json": "8173a3df61a3c5cfe352fb4a8fa64e99840836e42f2f4b0ddf8035f4d28f97a5", + "data/minecraft/worldgen/density_function/overworld/factor.json": "f7cd1629f1a034504bd74fd38af5ea75a59257c565b5d919a6212e2e08778e30", + "data/minecraft/worldgen/density_function/overworld/final_density.json": "a7e6b9f4618e27cb08ec37a294d8ca2a96747128a8d65d788dc418fda372cfb1", + "data/minecraft/worldgen/density_function/overworld/jaggedness.json": "5e8acc680409ae0b56596be02954eb5b49a72069d004e5dcf9a92c5e106ccdb2", + "data/minecraft/worldgen/density_function/overworld/offset.json": "da6b4e686d8eb16c19443a1126168b6f2719712c02b690b9d7384ce53badf995", + "data/minecraft/worldgen/density_function/overworld/ore_vein/copper_density.json": "3b16d3a4499981f40bfd2b33786a99046bbca0c958f8f41692ffcbf44ae927d7", + "data/minecraft/worldgen/density_function/overworld/ore_vein/gap.json": "89ccfa58c6b8ae3e3954d2ff2dbcc42a8a3ae24a7b07437dbfb85fdced55945a", + "data/minecraft/worldgen/density_function/overworld/ore_vein/iron_density.json": "8de70a31c97e2a8299679770d53c8e366ace1aa8585e8d840375d25f85b72f8f", + "data/minecraft/worldgen/density_function/overworld/ore_vein/mask.json": "7f92df0b19e7d29fef01abc7025fea2bdae7a57453e186785cde2fc7d08aa5bc", + "data/minecraft/worldgen/density_function/overworld/ore_vein/richness.json": "3eb0183e295a5f9c54aab936b706b4b9d570ddf56c983ae89b91151e6e38fb9d", + "data/minecraft/worldgen/density_function/overworld/ore_vein/toggle.json": "49b9db48740578911d0f8a2de40f02eced3ae742f03ebb05fee381af579cc9ed", + "data/minecraft/worldgen/density_function/overworld/preliminary_surface_level.json": "4b6ce4c38ede0bec7485d4c029b9fcc7ceb5b26977c2c391a650fe8f3a3272b6", + "data/minecraft/worldgen/density_function/overworld/ridges.json": "bf66a03bd8474d09dad4da23f4b7e76816b83e23df9f53d9c0b7c529c25ed9c1", + "data/minecraft/worldgen/density_function/overworld/ridges_folded.json": "c8a4343b56273a476648a84fbbe07d8c473c1dd3769749260db6340ba5b37f9a", + "data/minecraft/worldgen/density_function/overworld/sloped_cheese.json": "5e2e7756881a4f2acf2e8c8dc826a04681939ff1dc7508ce868e865e92a069d7", + "data/minecraft/worldgen/density_function/overworld/temperature.json": "3c2f498cbf4636cd1fa7f555c14220a733c9d07fb5a1563f11c6144a27f31ce8", + "data/minecraft/worldgen/density_function/overworld/vegetation.json": "c902ef045f63a568ef4c3d834716c67b5835f0994997ee45756837de111a806c", + "data/minecraft/worldgen/density_function/overworld_amplified/chunk_surface_level.json": "378eef8542e7ee3adffeaf746e0c776d1e00ff75cf030d9244292acd796739f6", + "data/minecraft/worldgen/density_function/overworld_amplified/depth.json": "35bbe18bc8eaec3bc8d81f1b3130018874d6cc8fa516c1e8380bdb8caf68c803", + "data/minecraft/worldgen/density_function/overworld_amplified/factor.json": "b42bc13d4d3c1cbeb7c6dfa2e16f4ef532ad0cff3a92d20bace01711fee6edd4", + "data/minecraft/worldgen/density_function/overworld_amplified/final_density.json": "cde96d8a5efa63cd20cea615dd1172e5e6f2626e9275d359fa2864e77083ac4f", + "data/minecraft/worldgen/density_function/overworld_amplified/jaggedness.json": "9f9a8993ce50cd2f0736ef98c3f8ff55db02d47b2a3e4f6aacae7c45a3c95bcc", + "data/minecraft/worldgen/density_function/overworld_amplified/offset.json": "0bb9ae6088ea4dbfdf79f6f2b2eed789c68e9a4e919a31bf912f91ddeda28e8b", + "data/minecraft/worldgen/density_function/overworld_amplified/preliminary_surface_level.json": "e8a82a9dfe183f4e624ea7a268efa2c54376caf99139596a26ad1dd27e887e5f", + "data/minecraft/worldgen/density_function/overworld_amplified/sloped_cheese.json": "d8609154b76d0eefcfbc3746fa84f32cb04c5817a2fd1b80e72ee0ae9d88e96c", + "data/minecraft/worldgen/density_function/overworld_large_biomes/chunk_surface_level.json": "72f29b5fa9c01afa296d3679e6be662ee1b0bfdc1ba40cc2092ea74380be5c47", + "data/minecraft/worldgen/density_function/overworld_large_biomes/continents.json": "cfab013269cff17cfdf95497f87e70591378e7a39da44a241199fb64b304d411", + "data/minecraft/worldgen/density_function/overworld_large_biomes/depth.json": "9ec8ced85b58494f5400d4a5f6a27f1d4d44271d7a87adb8c5d842319eb5997f", + "data/minecraft/worldgen/density_function/overworld_large_biomes/erosion.json": "773d626db8e356d92a321270895ce085287d2befcb4504842371c38fd10102ac", + "data/minecraft/worldgen/density_function/overworld_large_biomes/factor.json": "0e7aa57eca20ebd6d2f089a9a4a34502efe902295812650f71b2ff087bb8b15f", + "data/minecraft/worldgen/density_function/overworld_large_biomes/final_density.json": "6f644644293c5489c499dc57663f2c12de60fc720bc4f1120efd343246eb159e", + "data/minecraft/worldgen/density_function/overworld_large_biomes/jaggedness.json": "30090703d4d9e493d40d60e06ee12f1310a608e20b73aeb8f86efa8e31b11453", + "data/minecraft/worldgen/density_function/overworld_large_biomes/offset.json": "75517306420732023e2dfeeb253439d8f0edcde9bb8b10ee7870d1bdb072ec22", + "data/minecraft/worldgen/density_function/overworld_large_biomes/preliminary_surface_level.json": "ece7767faac91980f5349ddfdc6040dc4ebbfce71a9f4d5842fa1b7bb169db3b", + "data/minecraft/worldgen/density_function/overworld_large_biomes/sloped_cheese.json": "347e160b5f951137b5f82a39c18572f8851c5a22484d11f31d1f90f5e5f6ac99", + "data/minecraft/worldgen/density_function/overworld_large_biomes/temperature.json": "051138f2c2f0ca4050b92f7320ddea461dca2038a49eb6f9931ecbf39129f4ef", + "data/minecraft/worldgen/density_function/overworld_large_biomes/vegetation.json": "187b08814a3831cd0ff2f405c6683e7213a79dc7eeec44cd46136e350b0718b7", + "data/minecraft/worldgen/density_function/shift_x.json": "0db6e5f781089feede9d8d2936d7564024752e34006b8bc9f2a138749f91e3e7", + "data/minecraft/worldgen/density_function/shift_z.json": "0b561cdfafa9e82f431a8051576eb2ddc386d01459df571d7040021b0debb762", + "data/minecraft/worldgen/density_function/y.json": "e7766e59792605f5c3d8e05ff6263db1dc6c91343c736b3ab7a58ddee9771282", + "data/minecraft/worldgen/density_function/zero.json": "8aed642bf5118b9d3c859bd4be35ecac75b6e873cce34e7b6f554b06f75550d7" + }, + "noise_settings_resources_sha256": { + "data/minecraft/worldgen/noise_settings/amplified.json": "07fbadd0fd71e16e5497c575d3c86d997166087ccfaaba70a589a440b915024e", + "data/minecraft/worldgen/noise_settings/caves.json": "29a378b845f7bff27a8badecba7ecf2bb22d0d4224b751ab6d91677c83bc6a6a", + "data/minecraft/worldgen/noise_settings/end.json": "d0fd92ddd39081f1779ce5482041a837fb4a03841ea4d843556f17b557e31f4b", + "data/minecraft/worldgen/noise_settings/floating_islands.json": "54923e55bfad4274bea513eccb42e1eb3625fb47ae00905537e0d3d68f82045d", + "data/minecraft/worldgen/noise_settings/large_biomes.json": "dcb29a9e3fb630f2b76a52d759c6925b40e67cd13bc7f9ae93976f0633cc2c05", + "data/minecraft/worldgen/noise_settings/nether.json": "e6d7856fe4523e4c3fa4dce756b6b1e211bfc263c5e417fb6294d032b8f53e9b", + "data/minecraft/worldgen/noise_settings/overworld.json": "d093895d50edd79d53555b33b62d767115399764e32a4f9ae2687739f785d4b9" + }, + "inputs_sha256": "4afb482c8aa6e654ef47b9696f76c16fa862414248202c9bf748941bfc8d0877", + "rust_output_sha256": "c39201a8d64b2ec12dc08d8eddcb962d336885a749200a0a33c0fefd7910c193", + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldgenOracle.java": "272b7e7c90dfc1344f6964033b61ee27ac867da7b375e406586b88de08d02b08", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeExport.java": "f9a773713cf21b69bfa10018b76f27b953bda140ede9934f43d3aa3091101cf5", + "tools/test_worldgen_parity.py": "699826ef3d3f1ac5419b91153539bf0857e931fd128a39fc47d8c8071cc03268", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "69f89566a78456c29caaa39dacedfe711ca59e49b78f64e68b0414fb6a73d8fc", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "3968e2a337a6a23226c485057c79359e66df16683f00fb4ebc9fabb03910a015", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-core/tests/density_world_fields.rs": "e193e45080817ef92547828a8d106482a376b9f788e39d4d3831f44e9d693148", + "crates/horizon-world/examples/collision_fixture.rs": "ee754b5b42e0a51fe0a305b3f4bb56522ff3fffae564180aab8087b1b9e44afc", + "crates/horizon-world/examples/tick_fixture.rs": "df267c307e0491a238b2d93edf0384514f38f8ee3252e315b989de56c6e17990", + "crates/horizon-world/examples/world_fixture.rs": "a3c4c0f5131ae051b24662eff0ed11ed797c6fd5069fbfdf819f0e3fcdfb2cf4", + "crates/horizon-world/src/bin/worldgen_parity.rs": "5af97baa6681bc7aa04d981ec5c07c38cb27f28213abf34b1e83270828dd2980", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/lib.rs": "a6376d79c90ebdee539f4b460a9dd18d75e0c049c24f028d00c9c45c85ebf668", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry.rs": "f46065659e60eb5e84ad69b9f3b5e94dc87ee19de16408817e26f23d16b6c7e7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen.rs": "24f440a4be7546e79b4f462dd18aad9031e94dc87c5f1d32b78912650f7dd162", + "crates/horizon-world/tests/biome_data.rs": "d4de462ccc3e6ad5760490330e0f0cd8a45734077708a2eca95ca06e65f779b0", + "crates/horizon-world/tests/collision_data.rs": "45f3d33b36efe720e99ebf75b9f4fbddd777cebea4618bba245ca106b3443391", + "crates/horizon-world/tests/tick_data.rs": "ab345209367db6963b987797992c4a06433bd2039e6021bd834f6305324c04d7", + "crates/horizon-world/tests/world_io.rs": "4a42630c99ce89b27cc2be1a1b961ad880f62762ab661f9e92ef9bcf7f3e76e0", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "c39201a8d64b2ec12dc08d8eddcb962d336885a749200a0a33c0fefd7910c193", + "matched_output_lines": 922238, + "biome_export_sha256": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9" + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "c39201a8d64b2ec12dc08d8eddcb962d336885a749200a0a33c0fefd7910c193", + "matched_output_lines": 922238, + "biome_export_sha256": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9" + } + ], + "scope": "Direct normal-noise JSON decoding using the actual pinned vanilla CODEC. Every bundled noise registry resource, explicit/default parameters, empty and full amplitude modifiers, normalization modes, inclusive field bounds with signed-zero comparator ordering, malformed types, null fields, duplicate and ignored keys, decimal/exponent integer truncation and wrapping, signed zero, seeded modern/legacy and Nether construction, octave metadata, range and normalization bits, scalar noise values and parent random state. JSON resource contents stay private. Strict JSON parsing; no claim for Gson's permissive non-JSON syntax. Bundled density registries are also decoded with actual vanilla registry-aware CODECs: named forward references, all bundled function kinds, declared range/axes, raw compilation errors, seeded optimized roots, cache allocation, scalar values, strided bulk values, repeated cache hits and surface-volume errors are compared using RandomState's actual compile context. All seven bundled noise-setting resources contribute their actual eight-field NoiseRouter.CODEC objects to RandomState. Router fields are compiled in declaration order with a shared compiler/context; cache allocation, raw/optimized scalar and repeated strided volume values, successful single-layer surface volumes and invalid surface-volume shapes are compared. Actual RandomState climate sampler binding and quart-to-block coordinate wrapping are checked at ordinary and extreme positions. Float-to-long climate quantization and long-to-float conversion include subnormals, signed zeros, NaNs, infinities, cast saturation and seeded random bit patterns. Actual vanilla Climate.Parameter and ParameterPoint JSON codecs compare scalar, two-element list and min/max object intervals, float endpoint bounds/ordering, required coordinate/offset fields, negative zero, precision-sensitive float parsing, malformed types and duplicate keys. Climate parameter distances, wrapping squared fitness, stable search-tree leaf order and nearest lookup are compared across every supported branching value 2..32, sizes around branch powers, the 65536-entry API bound, duplicates, warm ties, fresh lookups, brute-force lookup and extreme signed-long endpoints/targets. The Rust tree is immutable with per-worker search state instead of hidden thread locals; invalid or degenerate searches return typed errors. Inline arbitrary distance metrics and behavior outside the bounded API are not covered. Built-in Overworld and Nether quantized biome parameter tables are exported independently by each authenticated JAR and required to agree before Rust consumes them. The Rust multi-noise resolver and actual vanilla MultiNoiseBiomeSource compare biome identities through scalar climate queries and prepared bulk quart volumes, including forward/reverse/repeated query order, wrapped extreme origins and shared previous-result state. Biome holder keys in the reference are registration placeholders; no biome property or gameplay behavior is evaluated. The Rust loader reads a Horizon quantized table format, not the vanilla biome codec, and the preset builders themselves have not been ported. Source and private fixture mutations during validation invalidate the report. The two-field 26.3 NoiseSettings codec, create helper and LevelHeightAccessor clamping are also compared across bundled noise members, dimension/alignment bounds, zero/negative runtime heights, disjoint ranges, wrapped integer arithmetic and decimal/exponent integer conversion. Global fluid cutoff selection and the actual disabled Aquifer implementation are compared with original default block-state identities, extreme sea levels/coordinates, signed-zero/subnormal/nonfinite density and counted picker calls; developer fluid-disable behavior is outside the regular-mode corpus. The actual noise-based Aquifer.Config codec and runtime are compared across bundled aquifer settings, modern/legacy world-seeded aquifer factories, synthetic density roots, nondefault water/lava states, cave/void air, nonfinite sampler overrides, strided volume extents, wrapped coordinates, repeated and reversed queries, counted picker calls, sampler call order/values, injected failures and retry state, scheduling flags, populated location/status caches and sorted surface-cache entries. Oversized or wrapped-invalid grid allocations and developer fluid-disable behavior are outside the bounded regular-mode API. Terrain filling is not yet validated. Router, vertical noise and optional aquifer members are decoded from each noise-setting resource; complete NoiseGeneratorSettings, material rules, nonempty world fields, biome registry/codecs and complete chunk biome assignment, generated chunks, gameplay and rendering remain pending. Inline noise holders and general codec behavior beyond the covered fixtures remain pending." +} diff --git a/benchmarks/rust-worldgen-2026-10-06/scoped-parity.json b/benchmarks/rust-worldgen-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..be295c20a --- /dev/null +++ b/benchmarks/rust-worldgen-2026-10-06/scoped-parity.json @@ -0,0 +1,627 @@ +{ + "schema": 1, + "minecraft": "26.3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "commands": 17338, + "command_counts": { + "noise": 2111, + "quantize": 4116, + "index": 229, + "climate_parameter": 25, + "climate_point": 183, + "noise_settings": 217, + "settings_create": 182, + "tag_entry": 32, + "tag_file": 335, + "tags": 200, + "tag_registry": 1, + "aquifer": 9136, + "noise_aquifer": 379, + "registry": 24, + "router": 168 + }, + "noise_aquifer_injected_failures": { + "0": 3, + "1": 3, + "2": 3, + "3": 3, + "4": 3, + "5": 3 + }, + "noise_aquifer_outcomes": { + "1 false": 5800, + "0 false": 9995, + "default_solid false": 12655, + "2 false": 35365, + "0 true": 1114, + "2 true": 2021, + "1 true": 43, + "5 false": 443, + "5 true": 5, + "6 false": 295, + "6 true": 8, + "7 false": 49, + "7 true": 1, + "4 false": 51, + "4 true": 4, + "error false": 17, + "3 false": 81, + "error true": 2 + }, + "block_tag_entries": 300, + "block_identifier_entries": 1286, + "block_tag_resources_sha256": { + "minecraft:acacia_logs": "a3fe4062ef8bb3451c897eb79914295a11f65798067f46125973c6fcbc38cd4a", + "minecraft:air": "8291f3984418fa56cd1ca3f5132344de25cee407647b0f97d6008bc0f3d47d1b", + "minecraft:all_hanging_signs": "33646181d260854e86dbec7cb3bdba15e5eb19a60e73a153ab08a4e6f309b022", + "minecraft:all_signs": "39fb174cfec0c7e7ab900d41688e5891ac054e8da52ed07a6ec9cd0a8e9f6109", + "minecraft:ancient_city_replaceable": "dfe7692dddb25cd1945334741782d2b85048aad2d20fc8e1106585a23ec34acf", + "minecraft:animals_spawnable_on": "29bc3cad17be92ae4b0e091a505cce0f6faf221dac55d2ee45268c9c3c9737ae", + "minecraft:anvil": "35b635afc68b437deab9e22b105f2157142f3c8982e9ae58768fce792794d9f9", + "minecraft:armadillo_spawnable_on": "d51ba988ad47362d4a0125a716d3d489ff97e86f5f81520f696647cbcd0d8e14", + "minecraft:axolotls_spawnable_on": "7cbbc9d5d3bc7c9a5f25486c13e0257beeeb33f5dd9d0e67e3c2e1cd5317fc0c", + "minecraft:azalea_grows_on": "06462d5bcf74a19283aa696ec12252c59f5779fb18919680e24e2632bcfa332f", + "minecraft:azalea_root_replaceable": "ea787c96911c9c031f6a08761a13df0e365f3ad32dd5550a6b467b1b0e6b823a", + "minecraft:badlands_terracotta": "fb20ddb79e6d9cf29cbe40a5712a563305022adbe1daa31ea6c690f99389c50c", + "minecraft:bamboo_blocks": "d31d10554cafb75ae74d3b753d985f2cbd7446902097581021666da9934e0d3c", + "minecraft:banners": "a619cc9e21da600971dcce0ecabbb2d08156e874e2d6eb753e08242a2f80c75c", + "minecraft:bars": "9a6bc562f574cdfff902974ab1165727eb6e81504dc4b4d44ba0f32e5957b268", + "minecraft:base_stone_nether": "8a29caeac2ba106f3b704764bec7d08f51825469933b022302dafd1692067ffa", + "minecraft:base_stone_overworld": "dbc51469f7d53ba1abd680a073c2cc25ba98985f0028404f1119e141dad0218f", + "minecraft:bats_spawnable_on": "69333efdca32f71c9dcee137cf6ffbec22607ee5619d381ea1c68f60efa49aea", + "minecraft:beacon_base_blocks": "14af42fff017cf89fc8386b3159c9257554c24dcf09143232bda49e3576f81c8", + "minecraft:beds": "c60f07a2c3442866abead7f297dc56d835b66d669e84b3bfb5b21e82d59de0cb", + "minecraft:bee_attractive": "079044ad1df6dfdb4db0fd4b0bfaa9b43faa10e2ddeb78375602d6aaf2157963", + "minecraft:bee_growables": "2914a1ec2a067fb0c86da831b73023bd7d877cc6d21bd16415464674724fec8d", + "minecraft:beehives": "f3da4490467e3cd1512d348a0c6fc007531de4709abc5503331db32759cd27e6", + "minecraft:beneath_bamboo_podzol_replaceable": "0e1b480d0de85f7442f0d6a8e2c6de59f85ac6a373cae267cf58f47d4d1fb6d9", + "minecraft:beneath_tree_podzol_replaceable": "0e1b480d0de85f7442f0d6a8e2c6de59f85ac6a373cae267cf58f47d4d1fb6d9", + "minecraft:birch_logs": "2a11ab5f2ebe93d1711c665f111b5ff2d64506a6df2a3fc74c0052ebefa18430", + "minecraft:blocks_dolphin_jump": "50071b6af79dbe9d94c0b98058dc2457d5480854d768bc74668411f7f58b9165", + "minecraft:blocks_fluid_flow": "d4c2425e9fe5472ddda8338490328855c546db5fe1851d6c1f4b4d32756caf56", + "minecraft:blocks_lava_fire_spread": "50071b6af79dbe9d94c0b98058dc2457d5480854d768bc74668411f7f58b9165", + "minecraft:blocks_motion": "35acfdd0a05447730fe2e6f07e32a847bb5b27fb3f4e6171e40c0d9612e81cda", + "minecraft:blocks_motion_in_heightmap": "50071b6af79dbe9d94c0b98058dc2457d5480854d768bc74668411f7f58b9165", + "minecraft:blocks_motion_in_heightmap_no_leaves": "653310d03a663ac3f29b65527057ef8858b6ea1082e9f06e9615f69018a972b4", + "minecraft:blocks_motion_no_leaves": "9b3eb333f9eb30185ec87d3bc81e0ee54c0ab31ddd3e9b7581b3b4266574f214", + "minecraft:blocks_wind_charge_explosions": "ef9816aea3e3beef7ed5c049c3d827955000272e810468e082d98cae0586da12", + "minecraft:buttons": "6f2192e09f74a817ba9861e0cb374e6859ef94cfd584f3d5945bb4b8ce15f360", + "minecraft:camel_sand_step_sound_blocks": "dae4cb2e5b66d4132350b8d27d9d725b6f82d1e0275ae8891aee704ff36d3bd5", + "minecraft:camels_spawnable_on": "99d10c8d690cda2d9334d3cf49f1feb4d1980c8661a0c903e2df7b5a5f23048f", + "minecraft:campfires": "32cb4dd3346afa7bf10901cb37304e6208e6c10dd63c88b1767d693d27b22c1d", + "minecraft:can_glide_through": "e1b304a494b93be2a3280ea6cc7c73ebc0fd76e21654af801d5e4359e94232a8", + "minecraft:candle_cakes": "6074402049e9768ee880ce88e7a00a8382ac0190b95a0534fea33b370b8c9289", + "minecraft:candles": "dc2341cd97a3d8dc1df1d442bacb0a911d1f81c25df08710eea0d7253415f345", + "minecraft:cannot_place_basalt_pillar_on": "d577b04d4223092aa2b1983f4e9802438daa7937c85ee53d1dbd54281ae13a84", + "minecraft:cannot_replace_below_tree_trunk": "b869c9fdac19692d9c365cdffadaabc73633e1588bbfdb08bdceb4a17c837309", + "minecraft:cannot_support_kelp": "c4aa173611f0f072f04e625e5d3d7a7b5e1cdb7f81a54103d7f89e4f4faa487b", + "minecraft:cannot_support_seagrass": "c4aa173611f0f072f04e625e5d3d7a7b5e1cdb7f81a54103d7f89e4f4faa487b", + "minecraft:cannot_support_snow_layer": "282662c1139488dcc43e3bfe48a36a6c4a759e53cb6a4024454236b8f07384cb", + "minecraft:cat_does_not_teleport_to": "c9da7ebe4c3f5cbb5dc72510a64484c68c79414cd63bba2b603cfb3d49a57ebe", + "minecraft:cats_can_lie_on": "bf3cb7e9d117fc573fca34ab86c6979289cc3192b17d84306ad534321e899fd3", + "minecraft:cats_can_sit_on": "4416a8f4f8d5cfcb599958932e3257483f9261c8972ff2defabdb02c7d6493e7", + "minecraft:cauldrons": "12ddaf45c37b545b22dbc7f05da886e6c97300e020e998a9d1bec68cd51b998c", + "minecraft:causes_continuous_geyser_eruptions": "83522a84667866ab21d9776f961368ac345c579f1eeb388580343261f1b21457", + "minecraft:causes_periodic_geyser_eruptions": "c4aa173611f0f072f04e625e5d3d7a7b5e1cdb7f81a54103d7f89e4f4faa487b", + "minecraft:causes_suffocation": "50071b6af79dbe9d94c0b98058dc2457d5480854d768bc74668411f7f58b9165", + "minecraft:cave_vines": "b936bbb57d972003dda38f1d3584e3749915f26220843b941fc2571ef901c75a", + "minecraft:ceiling_hanging_signs": "d1dbf93fc2ffe927d72c0fc6ea5702d7bbf77b5b9a5cd48a93a6ffcadab84598", + "minecraft:chains": "4e3ec3f4c41f349ed0b469c047e6084748b091d14ffd25caa3037ead63e21d48", + "minecraft:cherry_logs": "651f86e2ab999dcd89ca1bdf2e0cf8ed532b15e65d6a71bb6ea4dda59ebcc49e", + "minecraft:climbable": "d0e3e76d7457f3f3f3d7219fe218c7746e4b2e7626d5c388fcf193089069e365", + "minecraft:coal_ores": "a6d65d25fbfef911eb3df9b2fb2eb6412cafefda7e4b0dd3df3cda7d1fcb1df9", + "minecraft:combination_step_sound_blocks": "0f0049644c911eb764bf3b8fdaa59428c4e2fbc7c3de2717af173b649e8f882e", + "minecraft:completes_find_tree_tutorial": "0ba6fb9b71c4350443fc0c9e0a5c2155b95ecf3a13f855e4a58714b9a4955711", + "minecraft:concrete": "57fc0503da49743426d50286c13bb21794d31d566d273e26fe6ff81f5f9a719c", + "minecraft:concrete_powders": "353ec33929acd67fb3fd2d2d9afd400f4b78d728eb98aec54b71670915b101a8", + "minecraft:concrete_slabs": "8bbcc1487efaa92df0a692c6e981071815667f0dd7e54ccee902a68e66855b1a", + "minecraft:concrete_stairs": "f1aef28be2123848182ee00437371d1c654fdd03d5fba9f5dd047bc1146a5a22", + "minecraft:conduit_effect_block": "78203bb255a7f38b712e4901e216e2ba40134a178d6eb5c75513719954ee9280", + "minecraft:convertible_to_mud": "602250ca21d148d2039d75c295eb98a4298d0fdc262240d6d55d7ebb872809c6", + "minecraft:copper": "4e34e2f842a084c1604b7a3df787b35dc3b44a45b1019ada8ea4f50b2fc9c4f0", + "minecraft:copper_chests": "09fd20c394be6e02fd845abc57fd8f50c5731f373707831f54ea49da0b9136e5", + "minecraft:copper_golem_statues": "5f71ff30a9bd7f06790ea7bd7c622644ea01d1cfc609ff056c565194524208a5", + "minecraft:copper_ores": "d89eef2319cb6ee0c5dbd39e1750557ee92c7d94d262354f941fd5dbc323dc5b", + "minecraft:coral_blocks": "d890e6d640cc21a2b692c6e32e25baeeb2c120245105297a78fd4abf8250ff2c", + "minecraft:coral_plants": "f6646184b65ca1bc37deffc95cb56ff01a71374904052bca67985226e1ec85c2", + "minecraft:corals": "421caec9d699d741d7fd69c003fb46e0d551eaa94c9af80ea1a9e75e8d89d029", + "minecraft:crimson_stems": "d8a1ace15b4c981ad4e454dc064c7551e31f40430c93efadca268a008bcf8fbd", + "minecraft:crops": "3b97869fd0e334992d610f1285698384ad2a4d48446f4afb61bc774a066c9c77", + "minecraft:crystal_sound_blocks": "6217bd619dea59a80a48ae687cb20ac977d50bd5cffca7c53f5692fc478c063f", + "minecraft:cushion_uses_collision_shape": "fe4833d3ddebf67fc42ea78907d44c40b58e42bfe4a8a1aa25a6d26265052b9f", + "minecraft:dampens_vibrations": "7cf346b29f2939878163a82291418a9236e8fb5c290e2d07f2acc2469336050f", + "minecraft:dangerous_for_teleportation": "5c411d83a4d828689fad334c774b259120eb47f7c5996f7cc84c569b565a2a10", + "minecraft:dark_oak_logs": "482327a22a5acf4dcd54076ae08ef869c3a05b4ebc3c41eec4349c1c0af8fc6d", + "minecraft:deepslate_ore_replaceables": "358db693d329fa6830f0db25a6287812f04ca16bc76007bd02b27a9a783a09b0", + "minecraft:default_immune_to": "b83114c23eeec820ce7eca52011f13013fb6c64002254be7aebe1e4b36244d48", + "minecraft:diamond_ores": "6061b325909705037f8418bedc24508519507cace911b79369b9c8a2006d4b04", + "minecraft:dirt": "602250ca21d148d2039d75c295eb98a4298d0fdc262240d6d55d7ebb872809c6", + "minecraft:does_not_block_hoppers": "1fe898820d7fafb4b8e154f3f91870571975ca8efdd53041a704162711cf607e", + "minecraft:doors": "07865a23bdc74e0f220b6dc7dbd96bb913f7bf243e71376983de0856e93720d1", + "minecraft:dragon_immune": "b6b5f6eed47888883574b9eccd06178251a730f15c828c2dc83d0870b37a2fd3", + "minecraft:dragon_transparent": "fceddc0e5ad8b41c33a47f6ad3d232a57c04b8f1d3ca2f1fc1edf37741591e03", + "minecraft:dripstone_replaceable_blocks": "69333efdca32f71c9dcee137cf6ffbec22607ee5619d381ea1c68f60efa49aea", + "minecraft:edible_for_sheep": "bd5e054d8a8833a0dd829316196eeb43e9b5ae80d55b0986f26ac6240233cba6", + "minecraft:emerald_ores": "9c4bfb7344364eb612ab4a0cff87356d8538aa508ae0dae134806b946207b6d7", + "minecraft:enables_bubble_column_drag_down": "c4aa173611f0f072f04e625e5d3d7a7b5e1cdb7f81a54103d7f89e4f4faa487b", + "minecraft:enables_bubble_column_push_up": "34064a586d19afe34ef83fbd356eacfe026b9b3a3569efdf28cd88fea8c4bbb1", + "minecraft:enchantment_power_provider": "10d762f960be6460c3c451690b8b2275a339ee188aa6ee2c562611ea2a154cf7", + "minecraft:enchantment_power_transmitter": "994fa10c1ef5d93ac297c5cd254c8487c359c5b8c18b272f02dab1630d4a932c", + "minecraft:enderman_does_not_teleport_to": "791133f6dfd29b7e3dd4f972c520731d5f3ba5ea6a788631e3abb3dc26fbf87d", + "minecraft:enderman_holdable": "62810b2747680097db833ac445364363691001206f22023b73ff54cae43ab289", + "minecraft:entities_can_teleport_to": "50071b6af79dbe9d94c0b98058dc2457d5480854d768bc74668411f7f58b9165", + "minecraft:fall_damage_resetting": "3a765259768c8ecdfcb83e97e00dd808e709d51919d6d52436869bc93bc7b9e4", + "minecraft:features_cannot_replace": "a117e03f857eacf14ff5862ba6f885bb02b476a844b683c2be61211202a9a10d", + "minecraft:fence_gates": "e7f5073f8d01da657f1672b267f11259850f1f516e9682e4d72753bab8f0692f", + "minecraft:fences": "214462701d11703b222317fb7d470caa40e017b5036b127db242986b92fb30cd", + "minecraft:fire": "0074ed2ae89b03a2008a8220636c7544c868326e925b4bfae223891bd5727a97", + "minecraft:flower_pots": "cfcd5bf8e08722705d4c39799b817e6def554f87c39a0c901a3b4a2770f5e754", + "minecraft:flowers": "879e9a5ef65da1212023dfb2f7d842c1053606ef9902c86f45def1efbe5925d8", + "minecraft:forest_rock_can_place_on": "089172380f9dad33704e6f888dad7cbe8ffc5084f1580db5ada9f17ff7509489", + "minecraft:fox_immune_to": "24140175721e7b970c19144465d65d9ad51f2f7eee62b0d46eea2fd9e8b41cde", + "minecraft:foxes_spawnable_on": "235a81e5c7a3fc53d4674d8ace8682999ad357d77f57093af82d50ab8210cc6a", + "minecraft:frog_prefer_jump_to": "746f4240de2b36def3a89d86323027f25e1e9c92cf80cb465e31e581b723ab5c", + "minecraft:frogs_spawnable_on": "26600c631e98396171480739ecef5da2a9a6c988aded4e4fe98e1037c13c5452", + "minecraft:geode_invalid_blocks": "bdf2c9f19d40e9648c58eb6ebe9583e32102a88acda417d89bb8ec8151b93313", + "minecraft:glazed_terracotta": "b26bcf2138eb8a100e648cd036e5ab76142edbbdbf679988e1f816087cda7680", + "minecraft:goats_spawnable_on": "b5da3deb14f0c4e78384638b9b770b628f4a394dd15fac8e4d3266926d802c75", + "minecraft:gold_ores": "65ad25a49ab9172921f468a528cb1a14de1c4f46b14cf275434cbe3e8d069bf0", + "minecraft:grass_blocks": "43e3ca99c7840ab423acdc412cc895a3d420061e5471f79c273de5c3ef665037", + "minecraft:grows_crops": "4d7f9113151ae6fcfc7622ffe89f7c64f3f5bd0cefe5b778c9e7c11491183cea", + "minecraft:guarded_by_piglins": "df149f60e06249fcfb0f70f92a3ea34917bcf5f265729425147597eb2aca0441", + "minecraft:happy_ghast_avoids": "f4e76ec462e4f8b120f14f3eab2dac459348c85090da677a8051c8699919f929", + "minecraft:height_specific_ore_replaceables": "4b5787e3d7aec6d70ce5f9a7919df0aab705e2e368695065e6abcd21005f1681", + "minecraft:hoglin_repellents": "09e4345473c0448dad9192dba6c9273f7dbe919cbe547c8eb6f0cea0247d027b", + "minecraft:huge_brown_mushroom_can_place_on": "334213e1abb6463227cc3d9a24970800047ebc02d596277e9c4e7ba6a9feb013", + "minecraft:huge_red_mushroom_can_place_on": "334213e1abb6463227cc3d9a24970800047ebc02d596277e9c4e7ba6a9feb013", + "minecraft:ice": "85098bdeb333fb4b630565e8679bfaae143d78defa4dbf0398280a9f4d863db7", + "minecraft:ice_melts_when_destroyed_above": "50071b6af79dbe9d94c0b98058dc2457d5480854d768bc74668411f7f58b9165", + "minecraft:ice_spike_replaceable": "5da056adf11b03c033541fc4cbb69ce878bfa31c48d54a6e88656f6b7284e841", + "minecraft:impermeable": "3afa898d24e49ba1e32165e8bfc370aeebd508cc90eec9e3bf0f5a3d202d5ad2", + "minecraft:incorrect_for_copper_tool": "5fe30a57d8935ba07c4b1f3d76498655ac4e8471e118474c18e42ca5caa9ca47", + "minecraft:incorrect_for_diamond_tool": "b83114c23eeec820ce7eca52011f13013fb6c64002254be7aebe1e4b36244d48", + "minecraft:incorrect_for_gold_tool": "dbe4a0337c74949f118c6252dd75488c75c41b672b753f1f5222d5def15711ac", + "minecraft:incorrect_for_iron_tool": "61c0fa3215f263a2bd4a01d504e03e3d83613f9f09a76d060136b37941abc78e", + "minecraft:incorrect_for_netherite_tool": "b83114c23eeec820ce7eca52011f13013fb6c64002254be7aebe1e4b36244d48", + "minecraft:incorrect_for_stone_tool": "5fe30a57d8935ba07c4b1f3d76498655ac4e8471e118474c18e42ca5caa9ca47", + "minecraft:incorrect_for_wooden_tool": "dbe4a0337c74949f118c6252dd75488c75c41b672b753f1f5222d5def15711ac", + "minecraft:infiniburn_end": "f498b235a368f9abe32ab4190fee70924da9af4624d0d2383260805f85882858", + "minecraft:infiniburn_nether": "c5256847f721908d61a51568598a141bc60bd2779aec34505b7b90381064592e", + "minecraft:infiniburn_overworld": "463640bbca53006d499273ffb36499d1f6f596a11d073ccd7ad7156335ba1a58", + "minecraft:inside_step_sound_blocks": "2d97011bfe26d35e5895027ce80f3372b79ced9138bc567bf8cb031520f8a596", + "minecraft:invalid_spawn_inside": "68137e3d5f9fa6a087427c73f686f7c2282011007153eed9377abfb3c57c4a04", + "minecraft:iron_ores": "2f6f3610e361a06ca72bda39893431eeebc864dcf389cb0c4c55826ebe6bb587", + "minecraft:jungle_logs": "4ae9b365f5d403065b424f54a80018da98fbc73dd9b21564dca5a0ed77e89f2d", + "minecraft:lanterns": "ed570e0784f38272eec1325490be861a719e0d3747a591aa865f175cc0ee9f54", + "minecraft:lapis_ores": "2c986a71c5f2819549e17647415b6911250ddba23f03d9720fd10b6ad7c066d4", + "minecraft:lava_pool_stone_cannot_replace": "5b276c48e550fd769a8137a42f7dadf5e15625c336c7def6e07379c60a27bc92", + "minecraft:leaves": "4e531a80db177ab0b6fa8c65bbb6d82179a1fd5c1e31ca2ca8860b9b6c26329f", + "minecraft:lightning_rods": "54efd924cb3670c6894bd5a1d3cefd40f80752a98c8c457c78210a8e3efd0e36", + "minecraft:logs": "439a696d433df1387db440b32017d1ae9a5b1ffad9ffce5d5c9cdc3a02b29484", + "minecraft:logs_that_burn": "6697c4380b98c6d240f59ba291974c61067e6e4e45bce4464ed7a0a15c333b93", + "minecraft:lush_ground_replaceable": "b783ab0f70d5d9aa2807bc852410a0e1b682d46c476a05ca947f6f33001f839d", + "minecraft:maintains_farmland": "8d059a868793fe740b1cd2a6edc013246a068e35fb7477effef2b59b49f07bdc", + "minecraft:mangrove_logs": "0e314f82ca811b358eac141f3fd65b5f886ca1de9a5055a370901118c4096f1e", + "minecraft:mangrove_logs_can_grow_through": "7bd6f349aa8ae59cea0cc1469abad9963d5df24ec797777e3c3d750fe7555ce2", + "minecraft:mangrove_roots_can_grow_through": "64ba58eb3e4e89e8488a641f35dbad02fc2f19517ec690013d6aa2c9266d95a9", + "minecraft:mineable/axe": "14cad4e01465720095785e2d83807ca9b5eff6a1e24a76d50d17eabbee327ee9", + "minecraft:mineable/hoe": "138f9a28a1ca58c362dbcff3d7487f33b5e921b60c82a155a38dc5ef3a1ca26f", + "minecraft:mineable/pickaxe": "1573d7327fd943eb1f58f81e56bf29f55140ab200f4e721773fcb10b6cdfa7fd", + "minecraft:mineable/shovel": "732d8db1157516e8238ed13c85d4d85b5e49313b745007f361970a83b5f0b87e", + "minecraft:mob_interactable_doors": "e1b420c07e8f75bd802a2fded9307c0d13db1b72624660f59bcd99ff0552592d", + "minecraft:mooshrooms_spawnable_on": "67dd8577579b4c563afcb5d0f4c66677af1d0be4c5061b3e87eb4f3438c2f8f5", + "minecraft:moss_blocks": "4302e1e162fddeb21cf18ac8375f57bc2885fbdfa5b5cdcfecf1406b701d73d7", + "minecraft:moss_replaceable": "d53f7ef7d5c4cec3347e1a6aa39dd92655d09685768446e15b7e944ee9d3add2", + "minecraft:mud": "21b98cf5d9598dd147bd1cb169d5ab133083b0af90bfdf343e786c7b2e764ee2", + "minecraft:needs_diamond_tool": "fce3d4bef99721711ffb1bcdd72812c82e55e90d02417fa3065c260c0f96b833", + "minecraft:needs_iron_tool": "38ddda4cdd6d06afa8afa328f3606c944f736ef6e85e376121c84bbb8743d2e5", + "minecraft:needs_stone_tool": "9086735ddeba00745a8fca8d8768d19d638613a50a3835064aaa0188a9867200", + "minecraft:nether_portal_frame": "b72bce8b52e825930a2b907f6d720d8019a98405c4e66db0cd785235d378791e", + "minecraft:nylium": "2bf59f6932ed8a1530f92d4dfe8410eaa25741291f9f882688438814701bfe53", + "minecraft:oak_logs": "939819db71415f16498a0f19ab34e80c9cd60e08a507b31f60d49762575613e0", + "minecraft:occludes_vibration_signals": "b848777c11c4a202a79169339d6f3898c63610b2556cca783395fdbe36377a41", + "minecraft:ores": "0571768a41f42bf46252e9be35515558245b8640f2809bb6be74fd00a7c57da1", + "minecraft:overrides_mushroom_light_requirement": "efdca24061ea4c72dfd92d7fc85ba4febacbe7b2438430ad22fc50a5c31c4a9e", + "minecraft:overworld_natural_logs": "6e0974d475d448f34b0c23f062aaa7ab007afbddaa808870b63ae97aa88d82f5", + "minecraft:pale_oak_logs": "272aa7c38e04ab5616d8b70bd319fb7867fa9fa54ca4f815f338ba22084268ac", + "minecraft:parrots_spawnable_on": "d95d588b2b0971b6a1ea9ec59917c3834c5b6faee760e64455090b024417553c", + "minecraft:piglin_repellents": "e8d41b3b596d6bd2614787d1ad0d9eb79f79243aaf37c4f22be77edd4d6639e3", + "minecraft:planks": "1b2433c0a7edddaea36d87189429fb22d726ba2f8c406532624ba1df49998908", + "minecraft:polar_bear_immune_to": "c9331c65e0f8e076b9556a4951117b5db18676ebeaedd34c98a4c36229721b0e", + "minecraft:polar_bears_spawnable_on_alternate": "0214bf0cf9dc2da33e3c8619b6bc8654ae81126711ce8a55d07fe3af80cd6bdc", + "minecraft:poplar_logs": "9f2c1c5cf9a53e7cb2d21dc770b4c10c1bde4fefe5c2c46e1c3d95b53b69e968", + "minecraft:portals": "fe9759678b07daacfebc3ce9e5aa616489cb432af36d14ce4cc1128cd3a410ef", + "minecraft:pressure_plates": "f230b7dfb4144845d2a5c8686c22d0ee6401ac7688e9941025f322c76b93d807", + "minecraft:prevent_mob_spawning_inside": "6b48540f3809b6cde38322153e4c09a45e91c5d8b6356ac03ac2ed763af40f3d", + "minecraft:prevents_nearby_leaf_decay": "1f97c8515ceb8886dab66238b675a3c4ea0eef6b8a92350bc7667d81a90dcfee", + "minecraft:rabbits_spawnable_on": "a908ed77300ac3d697c8a3c56570fe60e08562b8bd5a3f079aa4671218ac94e7", + "minecraft:rails": "fa33f7e0ee5381b318e70b3a0a96a73ea420c75355ac77e9ae69933491585a99", + "minecraft:redstone_ores": "7884553e4f4b0ac64a7dfdf172271b870ada01b0fbdfbc8a4af3bb8db6ab974b", + "minecraft:replaceable": "6abeeb6e8520263e0876b4ef457f0d38dae703abca63ca4408adf3ba99fe2ecf", + "minecraft:replaceable_by_mushrooms": "f62394a973f927da9b4b667938c03528412ea2dac58663fbf94e0f3eeda31d0d", + "minecraft:replaceable_by_trees": "8aae57fc70df3c4c9a7224adb842df9e35b3456567e75b7598d236a38a0b3f04", + "minecraft:required_for_poplar_leaf_ambience": "14a398b48f6980dabd49663f04bd864effe9fca3287da35d7217f95668abd206", + "minecraft:sand": "8b019e944ba404bfbfadd0389a94e0fe907819b109cbccf577f7bb80826cc8e8", + "minecraft:saplings": "a59858d94b488625036481631db5b63c716ea1027cd89eedcc3749e3832e3ff2", + "minecraft:sculk_growth_inhibitors": "86f2dc2d79bfe4f8a25e9877b2453b0b493654af80f9fd1f77d8133c8abd5377", + "minecraft:sculk_replaceable": "8f5c608ef4e8c74002bf9d13a50e81804d37f72c59faf80dfcb7367f6e1ec476", + "minecraft:sculk_replaceable_world_gen": "35a9d8a4e947c8f09d44a9836766d639ac37e647dd5da23ca5b8b8f3e0afcb34", + "minecraft:shears_extreme_breaking_speed": "5f10b4c2ffc5a5a565fbbf9e36f5ef7a39db59cc52d495e82f59232a87055cfd", + "minecraft:shears_major_breaking_speed": "bbca62b8be3d948489f7a36a58ca63e9a88d7a400ca48c20bd7c16dcab8302e4", + "minecraft:shears_minor_breaking_speed": "400e88cc600815a02e905e834331d8f5f7f06d0f7a8bfeb762b2914a1e1930df", + "minecraft:shulker_boxes": "9bc43c47d90eb246371c67b7d5b631ceed7acdaf489be766f5f03b32cae9d12a", + "minecraft:shulker_does_not_teleport_to": "6948279d2a8c57c2033996a56afb1cdf5f9bb08e54b48449834d25aa11b56b8f", + "minecraft:signs": "f17adec59bd57315440524f6edfe7d18a8f6f372afe887dc9a0151055a15706e", + "minecraft:skulls": "9d95ce3eff65efe58e979dd82eb66fcbf224c8d583a28a12f6f9ed8499e2c987", + "minecraft:slabs": "c29f6f1f62555855b99d525641ce4bd4e6e31516d7c20fb9ff987762ab8d1a9b", + "minecraft:small_flowers": "d54cf92939e90d72302dfe7c0c2f127e56ccb9622e8564729a591089f42e9d0f", + "minecraft:smelts_to_glass": "f32f9a585b721d552bdddd85e3ae92515b24f320508be56e79da1b5dfbe40126", + "minecraft:snaps_goat_horn": "e0adabc6b55755bbe745e2d1ad76a888bc0ddb0946c49066f43781b6d260db27", + "minecraft:sniffer_diggable_block": "882d72a1c6578f0daa93700cb32833ab255fb92b8db0b7008c48d43592cfcc80", + "minecraft:sniffer_egg_hatch_boost": "bb3f57906b51fa5d25833d31618a004ad8674079f221080ad3f725a06dbfab39", + "minecraft:snow": "24d5e3b9042595e734d911caf4d1d59f8d27c865743fd7562fa72d32f0b5acd0", + "minecraft:snow_golem_immune_to": "c9331c65e0f8e076b9556a4951117b5db18676ebeaedd34c98a4c36229721b0e", + "minecraft:soul_fire_base_blocks": "8ba7eac6f7c74d25601ef4455b71e3947fdb8e51b8fafd55dddee48397b144b6", + "minecraft:soul_speed_blocks": "8ba7eac6f7c74d25601ef4455b71e3947fdb8e51b8fafd55dddee48397b144b6", + "minecraft:speeds_up_zombie_villager_curing": "38c66dd46c59f72fe7832706e8f197e2654975aa2c9c8a87d5d9bb3bfe5a80a1", + "minecraft:speleothems": "ab7de03a837a56a0ddba55735f279688546b19a80e4f6cd73332dd3a5da8c286", + "minecraft:spruce_logs": "129c6d79945e1bc246fb8ff32b8a6848035c6ba63f0a6d65c18adfbd41111307", + "minecraft:stairs": "5d25e93ee7bf03994223098ea9bcf2f9a49a619aa345e7097848e441ad63d33c", + "minecraft:standing_signs": "0d212a5664d8626496b70b38aba8cda581db0ccea7021d051be5cc5b1e2f9335", + "minecraft:stone_bricks": "61f8c78df54ce0d2af255dfda5d13d9768c82817518122b77a27da6d5f62e924", + "minecraft:stone_buttons": "1ebb5c3d79c2828ace64c52636451f05ea536411050c3d198646dc60d367051c", + "minecraft:stone_ore_replaceables": "73e4e80760bec9744d8f16343b21c396ce656e21593512264034b71f39164b27", + "minecraft:stone_pressure_plates": "88ef362edff8fcd8911d9e66db8b9e8d7202666e349706399ee97cd532126e01", + "minecraft:stray_immune_to": "c9331c65e0f8e076b9556a4951117b5db18676ebeaedd34c98a4c36229721b0e", + "minecraft:strider_warm_blocks": "83522a84667866ab21d9776f961368ac345c579f1eeb388580343261f1b21457", + "minecraft:substrate_overworld": "bd87412cd52db66ca8be5c79bad2622ec04318a5ccd90da89304e03d15360e5a", + "minecraft:sulfur_spike_replaceable_blocks": "9b691bdeedfa35a01dabb7554b1c32dca4c5de67da85a841c381db7d3ce84bb6", + "minecraft:support_override_cactus_flower": "396c699cd80945fbeda41f41c5797e36464f866c43a0dca08740c790dd428923", + "minecraft:support_override_snow_layer": "c7491ae1bafae440421e90a1387ac87f46f7e003f37315f4acf5ea0d0ee8cd5a", + "minecraft:supports_azalea": "7cd5cc83fc555289eac260b9a6726e531e6590ac4abac92e1de2a9e163d25b31", + "minecraft:supports_bamboo": "3d11eaccececc7c180f07c29103f4e0c0de0eae88cef00cb6c830df27fe6bbb1", + "minecraft:supports_big_dripleaf": "29b86e096da2a2a4c1efdd676b64ad7d7c8db65b537412d374781f068e6c14c7", + "minecraft:supports_cactus": "99d10c8d690cda2d9334d3cf49f1feb4d1980c8661a0c903e2df7b5a5f23048f", + "minecraft:supports_chorus_flower": "fd1861976dd8d10f3181b7070dc066b06d20b1ec6764bec7ef1d26f5c500b989", + "minecraft:supports_chorus_plant": "fd1861976dd8d10f3181b7070dc066b06d20b1ec6764bec7ef1d26f5c500b989", + "minecraft:supports_cocoa": "9c052ed599c8b8c782ae8bfaeb82cf241b8e5fdf0dfb8461f72db7de41991e98", + "minecraft:supports_crimson_fungus": "edfb0dd7ad8c89ecc53d6983332b353b1c9bae7bae38dbf6ef01d9805d79ca66", + "minecraft:supports_crimson_roots": "3c682d1feea46f22e4a1c382321347ef6c7f0c875c472ccb5ee77c5ef6cffda4", + "minecraft:supports_crops": "4d7f9113151ae6fcfc7622ffe89f7c64f3f5bd0cefe5b778c9e7c11491183cea", + "minecraft:supports_dry_vegetation": "15c03a19f25f4e359ce7bbed76e3545b003afee26a6dd1fa9fc54ed13d757f14", + "minecraft:supports_frogspawn": "b83114c23eeec820ce7eca52011f13013fb6c64002254be7aebe1e4b36244d48", + "minecraft:supports_hanging_mangrove_propagule": "568c4172f5e1c709753e9bd5c0b90fd8d00ebf273d3ae41ce2d0b994b3d70e30", + "minecraft:supports_lily_pad": "083ad48f95c51480fe049d717ae88770fb736087f5e654260eb3fea47cefee9b", + "minecraft:supports_mangrove_propagule": "7cd5cc83fc555289eac260b9a6726e531e6590ac4abac92e1de2a9e163d25b31", + "minecraft:supports_melon_stem": "95f16c95de4122a2d1cf36e4a465ea02c9f471adfe846fa3edcf147c5df0cf14", + "minecraft:supports_melon_stem_fruit": "0aec0e82e8fe82cb1900a7c4b25755985f863af73d7f473d2bbcfa51c2dbd14c", + "minecraft:supports_nether_sprouts": "da4cbcf213787b215358c9c671b8a0f675f6066b2b057126b320d7bdc8b7b3c6", + "minecraft:supports_nether_wart": "34064a586d19afe34ef83fbd356eacfe026b9b3a3569efdf28cd88fea8c4bbb1", + "minecraft:supports_pumpkin_stem": "95f16c95de4122a2d1cf36e4a465ea02c9f471adfe846fa3edcf147c5df0cf14", + "minecraft:supports_pumpkin_stem_fruit": "0aec0e82e8fe82cb1900a7c4b25755985f863af73d7f473d2bbcfa51c2dbd14c", + "minecraft:supports_small_dripleaf": "a99bba4f6b9d38de565a516dc3225a44bf1bfb0abcb5a41b741b4391ad82185d", + "minecraft:supports_stem_crops": "95fa800e152c76f36a71d12f471f9410676c5a959685e16067e1858bd6aadc43", + "minecraft:supports_stem_fruit": "d60c648291a7878f5e2b817990e4cf96861a0ff0665f9279cd7ccd2edc9f1502", + "minecraft:supports_sugar_cane": "e14e48890d10f8a260218e45d9461ae7f3d2a8b67f40760e4d61f6e4f1ed082c", + "minecraft:supports_sugar_cane_adjacently": "d423c0f2b573812f5145e497cf05f1a0f58919f8e8102d1cc8e41460c82c0a4e", + "minecraft:supports_vegetation": "4d1b4da00fa525283307235bbf0ccb7d9d0d5b7ca2fb79a9bc526c45cdaed94f", + "minecraft:supports_warped_fungus": "f19d6362b9fae5e2142e3b0dfee12b71ca41f4017d711d1629e374ddff03995b", + "minecraft:supports_warped_roots": "da4cbcf213787b215358c9c671b8a0f675f6066b2b057126b320d7bdc8b7b3c6", + "minecraft:supports_wither_rose": "1e4b2b3e19deb22aa3d5342e530a184f1d9388bb957bd39f5bb4da5f36c7bd08", + "minecraft:suppresses_bounce": "a477a87ac4bcb97971cb0b445f4cc9b6b8e02cd31ba3d01bc842b17a6a8477a8", + "minecraft:sword_efficient": "d7dd01ce779d198112646b71060382d7f6e10fee51f69dd792bb7e70cdbd3796", + "minecraft:sword_instantly_mines": "3160a75a72843c85ea22a98f4cd3b811cd1c9d71b807a3f7ad1fed05d6e2f06f", + "minecraft:terracotta": "d05ea6b1a2f1e794ff11745534938eaf024ac9debed7b29ef272aba4f1b648b9", + "minecraft:trail_ruins_replaceable": "dd61dc33a8cad62aaf6ee212ec69a4cfa06a2548259203d8d5f975048c6d6c68", + "minecraft:trapdoors": "0b72384f2da185aa3727914af7c4b72eb09574b1f3319a8bfd38b7899e77871d", + "minecraft:triggers_ambient_desert_dry_vegetation_block_sounds": "b9a1ed369a8a7d615f5fdb4a189dc6692984f562136502238c31c8b43344f74b", + "minecraft:triggers_ambient_desert_sand_block_sounds": "f32f9a585b721d552bdddd85e3ae92515b24f320508be56e79da1b5dfbe40126", + "minecraft:triggers_ambient_dried_ghast_block_sounds": "8ba7eac6f7c74d25601ef4455b71e3947fdb8e51b8fafd55dddee48397b144b6", + "minecraft:turns_into_dirt_path": "1e1986bfbc635a9c2e8dafe50201c9ab228973770bd4adf60336451b0eaff725", + "minecraft:turns_into_farmland": "b6e5c0b39744b55dff4b471486cf653757095ed24898fec15111a6da6eb21232", + "minecraft:uncarvable": "6948279d2a8c57c2033996a56afb1cdf5f9bb08e54b48449834d25aa11b56b8f", + "minecraft:underwater_bonemeals": "7f145355f4840f498d2e8951e905562df9ec57b35bd2e239db60fe5e6c4b78c4", + "minecraft:unstable_bottom_center": "b7b0ae50f52c2c35c3c2aa266d7365f88d6b6d463eb3c23ddb6f25d7438e0c11", + "minecraft:valid_spawn": "0fa990e0cfe3e367fce4af268e5cb1958b2ce2f1fd569c1bb2ce38c28bd4092b", + "minecraft:vibration_resonators": "21ae4048432850b44fc277224bc0bb04ac26c43ea865b677c4d61d316cf4199d", + "minecraft:villager_babies_can_jump_on_bed": "bf3cb7e9d117fc573fca34ab86c6979289cc3192b17d84306ad534321e899fd3", + "minecraft:villagers_can_sleep_on_bed": "bf3cb7e9d117fc573fca34ab86c6979289cc3192b17d84306ad534321e899fd3", + "minecraft:wall_corals": "e218e0a27b6e0b1ff685c3181a747b25eef3fdecf1d91bd22acc420eed16cf39", + "minecraft:wall_hanging_signs": "4015ec17b365fbbf2790fcc77f9cce25c2bc8f573b2bfb76615920d5b4f480c3", + "minecraft:wall_post_override": "c0aff6e7027ae63685e75d05e9d317ac35b8f0e65ef0702a1a0e7e92dd711c34", + "minecraft:wall_signs": "48193b7fd4ae4ed47b4bd3b143fa2679d3389301c89eeec62f87421b3ae3048a", + "minecraft:walls": "b41e70add357bbf1b1498ad15df2257c3fd8677f27578a2980b6e3f1e9082996", + "minecraft:warped_stems": "7515406d2b3d3f41697dc6b31579d2750730de34638196df3b9ba1618e3afbaa", + "minecraft:wart_blocks": "548bc2c73a5292d7beab476a32329866c2a5c870ae5d537eb20c459578f06b28", + "minecraft:washed_away_by_fluids": "766b16b3c4a49982103214e10398f4dd8a941cd69e100e3ae89c6a7c0267cab1", + "minecraft:wither_immune": "b6e3c98f2ffab1e0c4ac7000ff5a0da7446caddda14128d629ad8e91d1088d21", + "minecraft:wither_immune_to": "6c5034bdd6acf6121eba6ecac49c3492f5a0c640d71d37802231f413331ebdb3", + "minecraft:wither_skeleton_immune_to": "6c5034bdd6acf6121eba6ecac49c3492f5a0c640d71d37802231f413331ebdb3", + "minecraft:wither_summon_base_blocks": "8ba7eac6f7c74d25601ef4455b71e3947fdb8e51b8fafd55dddee48397b144b6", + "minecraft:wolves_spawnable_on": "52048dd1c3d0b7c8e53b50a377759e08da6bc258d874f299809ccf2e3ceaf16f", + "minecraft:wooden_buttons": "9b98c5efd80d70e2c0c242742faadf928c55bb87a12537ceaab819098de59acf", + "minecraft:wooden_doors": "a1119985376529ec73b217cb1fa776232830d03d6504d7479819e49067dc195f", + "minecraft:wooden_fences": "5d2ef0da8c97d26478f44329541792cbd0be1f141a0a347fba32a1f1b292f552", + "minecraft:wooden_pressure_plates": "013f6d8f09d6cd0c0d3a173971fc5aada626122361c164c36ec0291d642de082", + "minecraft:wooden_shelves": "a9934fc780d5e6e533443a842f36eab0c09e14c19ff06d537d77964952f5b91c", + "minecraft:wooden_slabs": "191dbe3c0e7a6a8a1c5cdca0ef89f8e0d5d15d7df01d05afde971e1954944745", + "minecraft:wooden_stairs": "9c6340ce2573c3b988be980ebe15200d9f817bc14d6f4982fab430f0b6696923", + "minecraft:wooden_trapdoors": "b5cd0998d48fe3ecb24b49cffe4eeed411085e3c3b9ed05e794254c29b0afb93", + "minecraft:wool": "02dba7a59e67c70ea0c21e21ff9b081047f9d6f0d39b5b6ad8d95d53eff28ca4", + "minecraft:wool_carpets": "bcf8ca0da1842f340fbb23f7582913a0ede9f33c6b99149fde3cb944c4bef545", + "minecraft:wool_slabs": "7047da1dc7f8f64b74d327b6e491b5ce4d3296ccb73cd8813b01853fcd54c660", + "minecraft:wool_stairs": "7f70163726c2e5632c673f0cf7b0ca3cc39347eff97284c41d3d787c2fb8c7f5" + }, + "noise_registry_entries": 64, + "density_registry_entries": 55, + "noise_settings_entries": 7, + "biome_parameter_entries": { + "minecraft:nether": 5, + "minecraft:overworld": 7594 + }, + "biome_tables_sha256": { + "minecraft:nether": "09e477f851380a6e726ea85fee39cd1d41c7f160fe424f58cb3f0056b5c11218", + "minecraft:overworld": "6bc45ce2eed04b6afecdfaf2cf89273e83dad071aeb45638e181d33fe5180f57" + }, + "fixtures_sha256": { + ".local/rust-worldgen-parity/registries.json": "816a473e6109c3eca1800f15641eb67b909a17b5e638e38428878dfa1ba2bc56", + ".local/rust-worldgen-parity/inputs.txt": "838760bf635afb0ae8925f490cef9dbdc30142bbcc67be088c2b5a65dff91937", + ".local/rust-worldgen-parity/biome-presets-client.json": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9", + ".local/rust-worldgen-parity/biome-presets-server.json": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9", + ".local/rust-worldgen-parity/blocks-client.json": "2e1b3c1c168bd1b54665df724791923f703db859bf62cf8ac1d083a8da9b3ec9", + ".local/rust-worldgen-parity/blocks-server.json": "2e1b3c1c168bd1b54665df724791923f703db859bf62cf8ac1d083a8da9b3ec9" + }, + "noise_resources_sha256": { + "data/minecraft/worldgen/noise/aquifer_barrier.json": "864a9d66a03b081adc8d4bf51a6d0cd5fdd94a0ebf1cecadec2aed9e549db7e4", + "data/minecraft/worldgen/noise/aquifer_fluid_level_floodedness.json": "e755b926628bc49edf48a3bd3b1e1bc3e2895b774f5e2e81f1d4340782a9fc56", + "data/minecraft/worldgen/noise/aquifer_fluid_level_spread.json": "6afc3f09b6616f799d739b5b114c4436059dcc60308af55fe96a8594de815214", + "data/minecraft/worldgen/noise/aquifer_lava.json": "96e1c4e411ffe302c5541cd2ee8462e1992f0290d623c560f353c39981737346", + "data/minecraft/worldgen/noise/badlands_pillar.json": "79c0d0628db949d3b83bbca145da427bcdc3ff585b0ad736f7cb20e4c593c9a2", + "data/minecraft/worldgen/noise/badlands_pillar_roof.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/badlands_surface.json": "79365a5c2017e93878d989a176520ba9cbdf8685cff8b3cb148730d949d98b09", + "data/minecraft/worldgen/noise/calcite.json": "331259d84572c32b4b268d069e0132da9e6623ba614080e34b815472c7f4ee0c", + "data/minecraft/worldgen/noise/cave_cheese.json": "24c6846b7fc1f7c652bf185797fe98b943146b6aaf8766d1bff2066c59b7ed24", + "data/minecraft/worldgen/noise/cave_entrance.json": "f75146a7b1a033998edd3c77319f78243fe933bdcda2067b78658940f145cac6", + "data/minecraft/worldgen/noise/cave_layer.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/clay_bands_offset.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/continentalness.json": "b7ce5ac29a2c7a7cfbfaa1e1eeca9ba8f4a52139e59318850fa2407242c69ba8", + "data/minecraft/worldgen/noise/continentalness_large.json": "76834cff0227d52b19b5932142925f4fc639e713c2180e489f813701ca45f53e", + "data/minecraft/worldgen/noise/erosion.json": "af8a7a0f16ff3e568ad646df9cbc28e04a31b16dad4f162705c0f7c747da6983", + "data/minecraft/worldgen/noise/erosion_large.json": "d20c2c6ec805a366b105924b3cee29ac5b84cc06d636b539ae0047aac413b60a", + "data/minecraft/worldgen/noise/gravel.json": "87d627634161e51a79512f3d3f42f990d2a185e35198eb5e2161939d866751e0", + "data/minecraft/worldgen/noise/gravel_layer.json": "a4b45bdb6efef2509b053b970f6e84250d7b16d54f3906bc7fcf2665ada2a692", + "data/minecraft/worldgen/noise/ice.json": "85d03cc06d6bc552dc399dcc90ca9749c2625ddf0049dc0f95684631a7c6e66e", + "data/minecraft/worldgen/noise/iceberg_pillar.json": "98816326f84a21ce29421a9cba3ad85e5a26069312c9819aaf5662691e777fd5", + "data/minecraft/worldgen/noise/iceberg_pillar_roof.json": "864a9d66a03b081adc8d4bf51a6d0cd5fdd94a0ebf1cecadec2aed9e549db7e4", + "data/minecraft/worldgen/noise/iceberg_surface.json": "79365a5c2017e93878d989a176520ba9cbdf8685cff8b3cb148730d949d98b09", + "data/minecraft/worldgen/noise/jagged.json": "d64347f4f9acb984075e3b4945b4699907ec6d893588388dd8f738f29f75f4d1", + "data/minecraft/worldgen/noise/nether/temperature.json": "5a67fbc28b5c2578b4ca5f6abdd115c715ea2ef1be3e1a7a8eb1a0de4c3a8f7c", + "data/minecraft/worldgen/noise/nether/vegetation.json": "5a67fbc28b5c2578b4ca5f6abdd115c715ea2ef1be3e1a7a8eb1a0de4c3a8f7c", + "data/minecraft/worldgen/noise/nether_state_selector.json": "116c8bf1d676fd3a3dea3908e074a4f4b7ee55d3263e93abf5889b41bfc77f5b", + "data/minecraft/worldgen/noise/nether_wart.json": "4518b186ffe4b65394a35276c8708037c6f3f73c7cb95ef6d41a5cd4b8d234f6", + "data/minecraft/worldgen/noise/netherrack.json": "cef60938a0304eec78a6bdebd24b80a45c5d1bad894c6c012e3413ecc485a81a", + "data/minecraft/worldgen/noise/noodle.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/noodle_ridge_a.json": "e755b926628bc49edf48a3bd3b1e1bc3e2895b774f5e2e81f1d4340782a9fc56", + "data/minecraft/worldgen/noise/noodle_ridge_b.json": "e755b926628bc49edf48a3bd3b1e1bc3e2895b774f5e2e81f1d4340782a9fc56", + "data/minecraft/worldgen/noise/noodle_thickness.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/offset.json": "45f51565587e2dc055271648037c0ec3466815e82f0d762e0198c16285fc8ae7", + "data/minecraft/worldgen/noise/ore_gap.json": "6afc3f09b6616f799d739b5b114c4436059dcc60308af55fe96a8594de815214", + "data/minecraft/worldgen/noise/ore_vein_a.json": "e755b926628bc49edf48a3bd3b1e1bc3e2895b774f5e2e81f1d4340782a9fc56", + "data/minecraft/worldgen/noise/ore_vein_b.json": "e755b926628bc49edf48a3bd3b1e1bc3e2895b774f5e2e81f1d4340782a9fc56", + "data/minecraft/worldgen/noise/ore_veininess.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/packed_ice.json": "0f51993727dcb0aa7c6cb9288e462443e711e9980c12927435126a3c45922786", + "data/minecraft/worldgen/noise/patch.json": "83a0052d4220c67c5513bce689d681e3af3325c18fec612cdd4941fc738f4be0", + "data/minecraft/worldgen/noise/pillar.json": "5a67fbc28b5c2578b4ca5f6abdd115c715ea2ef1be3e1a7a8eb1a0de4c3a8f7c", + "data/minecraft/worldgen/noise/pillar_rareness.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/pillar_thickness.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/powder_snow.json": "98816326f84a21ce29421a9cba3ad85e5a26069312c9819aaf5662691e777fd5", + "data/minecraft/worldgen/noise/ridge.json": "e05d077746b27d662a8c981807819df3e3bb1f1779d2245dd911c8193e03bbf8", + "data/minecraft/worldgen/noise/small_patch.json": "9ecc836feb68b42d717217e028f2a72112179f1097f5bd156b1d3f1db637732e", + "data/minecraft/worldgen/noise/soul_sand_layer.json": "a4b45bdb6efef2509b053b970f6e84250d7b16d54f3906bc7fcf2665ada2a692", + "data/minecraft/worldgen/noise/spaghetti_2d.json": "e755b926628bc49edf48a3bd3b1e1bc3e2895b774f5e2e81f1d4340782a9fc56", + "data/minecraft/worldgen/noise/spaghetti_2d_elevation.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/spaghetti_2d_modulator.json": "d210211c0c76c53f15908f0b004a7e98e9d753ed996cd5468f2068f2e23932d1", + "data/minecraft/worldgen/noise/spaghetti_2d_thickness.json": "d210211c0c76c53f15908f0b004a7e98e9d753ed996cd5468f2068f2e23932d1", + "data/minecraft/worldgen/noise/spaghetti_3d_1.json": "e755b926628bc49edf48a3bd3b1e1bc3e2895b774f5e2e81f1d4340782a9fc56", + "data/minecraft/worldgen/noise/spaghetti_3d_2.json": "e755b926628bc49edf48a3bd3b1e1bc3e2895b774f5e2e81f1d4340782a9fc56", + "data/minecraft/worldgen/noise/spaghetti_3d_rarity.json": "d210211c0c76c53f15908f0b004a7e98e9d753ed996cd5468f2068f2e23932d1", + "data/minecraft/worldgen/noise/spaghetti_3d_thickness.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/spaghetti_roughness.json": "6afc3f09b6616f799d739b5b114c4436059dcc60308af55fe96a8594de815214", + "data/minecraft/worldgen/noise/spaghetti_roughness_modulator.json": "7f137a0382721b8c7b3227e65dc32a3f6d9c3d5893458b03e892797ae31d85d7", + "data/minecraft/worldgen/noise/sulfur_cave_gradient.json": "4900ffd885ce33b220a673ba0a248504c78f9f2cdfce824106a237d9ad18a6a7", + "data/minecraft/worldgen/noise/surface.json": "79365a5c2017e93878d989a176520ba9cbdf8685cff8b3cb148730d949d98b09", + "data/minecraft/worldgen/noise/surface_secondary.json": "ae23cb210db7b64b66b327dbbf1e7b2acb5c15cb6fe5df0455eb29910d9312eb", + "data/minecraft/worldgen/noise/surface_swamp.json": "19e08e0d1dff257cf748d3cef79e939e8f25cc5e7226653c789008171f40695b", + "data/minecraft/worldgen/noise/temperature.json": "9b1d5a87d575abf2891882ec3e1544b964cd15fedc84ad14d2abbd3b48ee2e4b", + "data/minecraft/worldgen/noise/temperature_large.json": "4fe64b952b751eb7e45b4d1e274add508b504ee8bbc54cad417ce3a3b068d42e", + "data/minecraft/worldgen/noise/vegetation.json": "ff4c10776eb2822f9f66dec4e9878a1bc797aca711480bf8430f851ff9af77dc", + "data/minecraft/worldgen/noise/vegetation_large.json": "20f4a255e3f9452f4cf983b3efed71ead184d04f4070283f355ad4d97993d133" + }, + "density_resources_sha256": { + "data/minecraft/worldgen/density_function/end/base_3d_noise.json": "38db7d590abc3144e3357a79562d649d9880bc2c62ddc99480d93f4b6401c9a6", + "data/minecraft/worldgen/density_function/end/islands.json": "6e4f02929580ecc34bfb059855b4e88d080dc7ca6c9984f216bdaa32e6b47700", + "data/minecraft/worldgen/density_function/end/sloped_cheese.json": "5dee072865321e57e5e231e60a57bfcd1919454f93da33b3c1651b3712f2cfb2", + "data/minecraft/worldgen/density_function/nether/base_3d_noise.json": "76cfd16e6fc2b1ce8bdb5f5ee277d431c167bc01afc2462bffff09eb5f0bd582", + "data/minecraft/worldgen/density_function/overworld/base_3d_noise.json": "2791a1e6c5c730eac1bd35aaea9a7ab22855872fdb92349192d045330fd4614f", + "data/minecraft/worldgen/density_function/overworld/caves/entrances.json": "63a1b8351e6dea212501c36f515f32e5a0e960228b5b5ccf0dc5b43855cbc1ab", + "data/minecraft/worldgen/density_function/overworld/caves/noodle.json": "3bce7453470fd37e3bfc11dc8584494aab094f9fd820038dc5592cb47e825a69", + "data/minecraft/worldgen/density_function/overworld/caves/pillars.json": "069d35fbdaed7d74521fc3e9355a94e778450b52a05f1efbd470ce3917b8a207", + "data/minecraft/worldgen/density_function/overworld/caves/spaghetti_2d.json": "a99c68ac415596788c84e93e81c96c9786e31db21a81157459a13272cda4cb1f", + "data/minecraft/worldgen/density_function/overworld/caves/spaghetti_2d_thickness_modulator.json": "4f987a0b9e8c0adb02df47034fa8b3cebfbfb2c8e607123614ef009a16bfaf6c", + "data/minecraft/worldgen/density_function/overworld/caves/spaghetti_roughness_function.json": "03bd1b405e53aeb75b6a3440d97975c25b6f11c7fc07149471b86c80fbdb6ea4", + "data/minecraft/worldgen/density_function/overworld/chunk_surface_level.json": "93a4e26ce4a1144c42040f52ca375f0dec94648c70ccdcc52db4a7f55ca526a5", + "data/minecraft/worldgen/density_function/overworld/continents.json": "0f2ff487c0556391ae2d56b7cab6990d45766ade2503236fe2669f83a64517be", + "data/minecraft/worldgen/density_function/overworld/depth.json": "9fcd7c8badcae4dc8e86303b0f72b05b5fd998d5bb7ac637729dd7e688688069", + "data/minecraft/worldgen/density_function/overworld/erosion.json": "8173a3df61a3c5cfe352fb4a8fa64e99840836e42f2f4b0ddf8035f4d28f97a5", + "data/minecraft/worldgen/density_function/overworld/factor.json": "f7cd1629f1a034504bd74fd38af5ea75a59257c565b5d919a6212e2e08778e30", + "data/minecraft/worldgen/density_function/overworld/final_density.json": "a7e6b9f4618e27cb08ec37a294d8ca2a96747128a8d65d788dc418fda372cfb1", + "data/minecraft/worldgen/density_function/overworld/jaggedness.json": "5e8acc680409ae0b56596be02954eb5b49a72069d004e5dcf9a92c5e106ccdb2", + "data/minecraft/worldgen/density_function/overworld/offset.json": "da6b4e686d8eb16c19443a1126168b6f2719712c02b690b9d7384ce53badf995", + "data/minecraft/worldgen/density_function/overworld/ore_vein/copper_density.json": "3b16d3a4499981f40bfd2b33786a99046bbca0c958f8f41692ffcbf44ae927d7", + "data/minecraft/worldgen/density_function/overworld/ore_vein/gap.json": "89ccfa58c6b8ae3e3954d2ff2dbcc42a8a3ae24a7b07437dbfb85fdced55945a", + "data/minecraft/worldgen/density_function/overworld/ore_vein/iron_density.json": "8de70a31c97e2a8299679770d53c8e366ace1aa8585e8d840375d25f85b72f8f", + "data/minecraft/worldgen/density_function/overworld/ore_vein/mask.json": "7f92df0b19e7d29fef01abc7025fea2bdae7a57453e186785cde2fc7d08aa5bc", + "data/minecraft/worldgen/density_function/overworld/ore_vein/richness.json": "3eb0183e295a5f9c54aab936b706b4b9d570ddf56c983ae89b91151e6e38fb9d", + "data/minecraft/worldgen/density_function/overworld/ore_vein/toggle.json": "49b9db48740578911d0f8a2de40f02eced3ae742f03ebb05fee381af579cc9ed", + "data/minecraft/worldgen/density_function/overworld/preliminary_surface_level.json": "4b6ce4c38ede0bec7485d4c029b9fcc7ceb5b26977c2c391a650fe8f3a3272b6", + "data/minecraft/worldgen/density_function/overworld/ridges.json": "bf66a03bd8474d09dad4da23f4b7e76816b83e23df9f53d9c0b7c529c25ed9c1", + "data/minecraft/worldgen/density_function/overworld/ridges_folded.json": "c8a4343b56273a476648a84fbbe07d8c473c1dd3769749260db6340ba5b37f9a", + "data/minecraft/worldgen/density_function/overworld/sloped_cheese.json": "5e2e7756881a4f2acf2e8c8dc826a04681939ff1dc7508ce868e865e92a069d7", + "data/minecraft/worldgen/density_function/overworld/temperature.json": "3c2f498cbf4636cd1fa7f555c14220a733c9d07fb5a1563f11c6144a27f31ce8", + "data/minecraft/worldgen/density_function/overworld/vegetation.json": "c902ef045f63a568ef4c3d834716c67b5835f0994997ee45756837de111a806c", + "data/minecraft/worldgen/density_function/overworld_amplified/chunk_surface_level.json": "378eef8542e7ee3adffeaf746e0c776d1e00ff75cf030d9244292acd796739f6", + "data/minecraft/worldgen/density_function/overworld_amplified/depth.json": "35bbe18bc8eaec3bc8d81f1b3130018874d6cc8fa516c1e8380bdb8caf68c803", + "data/minecraft/worldgen/density_function/overworld_amplified/factor.json": "b42bc13d4d3c1cbeb7c6dfa2e16f4ef532ad0cff3a92d20bace01711fee6edd4", + "data/minecraft/worldgen/density_function/overworld_amplified/final_density.json": "cde96d8a5efa63cd20cea615dd1172e5e6f2626e9275d359fa2864e77083ac4f", + "data/minecraft/worldgen/density_function/overworld_amplified/jaggedness.json": "9f9a8993ce50cd2f0736ef98c3f8ff55db02d47b2a3e4f6aacae7c45a3c95bcc", + "data/minecraft/worldgen/density_function/overworld_amplified/offset.json": "0bb9ae6088ea4dbfdf79f6f2b2eed789c68e9a4e919a31bf912f91ddeda28e8b", + "data/minecraft/worldgen/density_function/overworld_amplified/preliminary_surface_level.json": "e8a82a9dfe183f4e624ea7a268efa2c54376caf99139596a26ad1dd27e887e5f", + "data/minecraft/worldgen/density_function/overworld_amplified/sloped_cheese.json": "d8609154b76d0eefcfbc3746fa84f32cb04c5817a2fd1b80e72ee0ae9d88e96c", + "data/minecraft/worldgen/density_function/overworld_large_biomes/chunk_surface_level.json": "72f29b5fa9c01afa296d3679e6be662ee1b0bfdc1ba40cc2092ea74380be5c47", + "data/minecraft/worldgen/density_function/overworld_large_biomes/continents.json": "cfab013269cff17cfdf95497f87e70591378e7a39da44a241199fb64b304d411", + "data/minecraft/worldgen/density_function/overworld_large_biomes/depth.json": "9ec8ced85b58494f5400d4a5f6a27f1d4d44271d7a87adb8c5d842319eb5997f", + "data/minecraft/worldgen/density_function/overworld_large_biomes/erosion.json": "773d626db8e356d92a321270895ce085287d2befcb4504842371c38fd10102ac", + "data/minecraft/worldgen/density_function/overworld_large_biomes/factor.json": "0e7aa57eca20ebd6d2f089a9a4a34502efe902295812650f71b2ff087bb8b15f", + "data/minecraft/worldgen/density_function/overworld_large_biomes/final_density.json": "6f644644293c5489c499dc57663f2c12de60fc720bc4f1120efd343246eb159e", + "data/minecraft/worldgen/density_function/overworld_large_biomes/jaggedness.json": "30090703d4d9e493d40d60e06ee12f1310a608e20b73aeb8f86efa8e31b11453", + "data/minecraft/worldgen/density_function/overworld_large_biomes/offset.json": "75517306420732023e2dfeeb253439d8f0edcde9bb8b10ee7870d1bdb072ec22", + "data/minecraft/worldgen/density_function/overworld_large_biomes/preliminary_surface_level.json": "ece7767faac91980f5349ddfdc6040dc4ebbfce71a9f4d5842fa1b7bb169db3b", + "data/minecraft/worldgen/density_function/overworld_large_biomes/sloped_cheese.json": "347e160b5f951137b5f82a39c18572f8851c5a22484d11f31d1f90f5e5f6ac99", + "data/minecraft/worldgen/density_function/overworld_large_biomes/temperature.json": "051138f2c2f0ca4050b92f7320ddea461dca2038a49eb6f9931ecbf39129f4ef", + "data/minecraft/worldgen/density_function/overworld_large_biomes/vegetation.json": "187b08814a3831cd0ff2f405c6683e7213a79dc7eeec44cd46136e350b0718b7", + "data/minecraft/worldgen/density_function/shift_x.json": "0db6e5f781089feede9d8d2936d7564024752e34006b8bc9f2a138749f91e3e7", + "data/minecraft/worldgen/density_function/shift_z.json": "0b561cdfafa9e82f431a8051576eb2ddc386d01459df571d7040021b0debb762", + "data/minecraft/worldgen/density_function/y.json": "e7766e59792605f5c3d8e05ff6263db1dc6c91343c736b3ab7a58ddee9771282", + "data/minecraft/worldgen/density_function/zero.json": "8aed642bf5118b9d3c859bd4be35ecac75b6e873cce34e7b6f554b06f75550d7" + }, + "noise_settings_resources_sha256": { + "data/minecraft/worldgen/noise_settings/amplified.json": "07fbadd0fd71e16e5497c575d3c86d997166087ccfaaba70a589a440b915024e", + "data/minecraft/worldgen/noise_settings/caves.json": "29a378b845f7bff27a8badecba7ecf2bb22d0d4224b751ab6d91677c83bc6a6a", + "data/minecraft/worldgen/noise_settings/end.json": "d0fd92ddd39081f1779ce5482041a837fb4a03841ea4d843556f17b557e31f4b", + "data/minecraft/worldgen/noise_settings/floating_islands.json": "54923e55bfad4274bea513eccb42e1eb3625fb47ae00905537e0d3d68f82045d", + "data/minecraft/worldgen/noise_settings/large_biomes.json": "dcb29a9e3fb630f2b76a52d759c6925b40e67cd13bc7f9ae93976f0633cc2c05", + "data/minecraft/worldgen/noise_settings/nether.json": "e6d7856fe4523e4c3fa4dce756b6b1e211bfc263c5e417fb6294d032b8f53e9b", + "data/minecraft/worldgen/noise_settings/overworld.json": "d093895d50edd79d53555b33b62d767115399764e32a4f9ae2687739f785d4b9" + }, + "inputs_sha256": "838760bf635afb0ae8925f490cef9dbdc30142bbcc67be088c2b5a65dff91937", + "rust_output_sha256": "9a006099c19f8527b739ea906bfe3c7db54e7517910562e16a78482ed0f9b4fb", + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldgenOracle.java": "f81e5e2c3cbdc47ecbc14333f43c10487aa67e1a4166cf96c7c6cb11d8dbd27c", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeExport.java": "f9a773713cf21b69bfa10018b76f27b953bda140ede9934f43d3aa3091101cf5", + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTagExport.java": "83b3ae46e8d052eda3f65c044ae742651366138c7014b91464824c79dae24b41", + "tools/test_worldgen_parity.py": "b40972ab2ad222aa6d77537cc36b434a217baa1f1b56bbaad945d6e12fe776af", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "3968e2a337a6a23226c485057c79359e66df16683f00fb4ebc9fabb03910a015", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random.rs": "92135a94c79111cc810b4b071dbd76043ee47c2585fd431e7486ea381f19e5db", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-core/tests/density_world_fields.rs": "e193e45080817ef92547828a8d106482a376b9f788e39d4d3831f44e9d693148", + "crates/horizon-world/examples/collision_fixture.rs": "ee754b5b42e0a51fe0a305b3f4bb56522ff3fffae564180aab8087b1b9e44afc", + "crates/horizon-world/examples/heightmap_fixture.rs": "eddd4c15620eebfc5bd919d3b19b0b2fd69d6fd31a19d8c512121aa297efa848", + "crates/horizon-world/examples/structure_density_fixture.rs": "780cbf5dbf1f948e2d8aac54eff67a900de652fe31eb007f55dd33177f38fdab", + "crates/horizon-world/examples/terrain_fixture.rs": "eb521404a3e850be522f3bda2f7c724c7d1b66e154e1bc53121b4e7511e5b1bd", + "crates/horizon-world/examples/tick_fixture.rs": "df267c307e0491a238b2d93edf0384514f38f8ee3252e315b989de56c6e17990", + "crates/horizon-world/examples/world_fixture.rs": "a3c4c0f5131ae051b24662eff0ed11ed797c6fd5069fbfdf819f0e3fcdfb2cf4", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry.rs": "f46065659e60eb5e84ad69b9f3b5e94dc87ee19de16408817e26f23d16b6c7e7", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "7516e20a20479d1c4a9734d7d8e9826740b324869d7afe51eab94bb1bc7c97ae", + "crates/horizon-world/src/worldgen/terrain.rs": "134cf93b53a40fb1ed0e0170c90316c80e270773b2968c63dc3f9cef2c941bff", + "crates/horizon-world/src/worldgen.rs": "b89dd4a9de02caf6bce457304a105ffbc0f0f220f8647c095852a45a1bf292bb", + "crates/horizon-world/tests/biome_data.rs": "d4de462ccc3e6ad5760490330e0f0cd8a45734077708a2eca95ca06e65f779b0", + "crates/horizon-world/tests/collision_data.rs": "45f3d33b36efe720e99ebf75b9f4fbddd777cebea4618bba245ca106b3443391", + "crates/horizon-world/tests/tick_data.rs": "ab345209367db6963b987797992c4a06433bd2039e6021bd834f6305324c04d7", + "crates/horizon-world/tests/world_io.rs": "4a42630c99ce89b27cc2be1a1b961ad880f62762ab661f9e92ef9bcf7f3e76e0", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e" + }, + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "9a006099c19f8527b739ea906bfe3c7db54e7517910562e16a78482ed0f9b4fb", + "matched_output_lines": 961693, + "biome_export_sha256": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9", + "block_export_sha256": "2e1b3c1c168bd1b54665df724791923f703db859bf62cf8ac1d083a8da9b3ec9" + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "9a006099c19f8527b739ea906bfe3c7db54e7517910562e16a78482ed0f9b4fb", + "matched_output_lines": 961693, + "biome_export_sha256": "b03e2fbe85c191a22f333bc989bd2a73c66f0f9fbcd9ddb54774f17c247832e9", + "block_export_sha256": "2e1b3c1c168bd1b54665df724791923f703db859bf62cf8ac1d083a8da9b3ec9" + } + ], + "scope": "Direct normal-noise JSON decoding using the actual pinned vanilla CODEC. Every bundled noise registry resource, explicit/default parameters, empty and full amplitude modifiers, normalization modes, inclusive field bounds with signed-zero comparator ordering, malformed types, null fields, duplicate and ignored keys, decimal/exponent integer truncation and wrapping, signed zero, seeded modern/legacy and Nether construction, octave metadata, range and normalization bits, scalar noise values and parent random state. JSON resource contents stay private. Strict JSON parsing; no claim for Gson's permissive non-JSON syntax. Bundled density registries are also decoded with actual vanilla registry-aware CODECs: named forward references, all bundled function kinds, declared range/axes, raw compilation errors, seeded optimized roots, cache allocation, scalar values, strided bulk values, repeated cache hits and surface-volume errors are compared using RandomState's actual compile context. All seven bundled noise-setting resources contribute their actual eight-field NoiseRouter.CODEC objects to RandomState. Router fields are compiled in declaration order with a shared compiler/context; cache allocation, raw/optimized scalar and repeated strided volume values, successful single-layer surface volumes and invalid surface-volume shapes are compared. Actual RandomState climate sampler binding and quart-to-block coordinate wrapping are checked at ordinary and extreme positions. Float-to-long climate quantization and long-to-float conversion include subnormals, signed zeros, NaNs, infinities, cast saturation and seeded random bit patterns. Actual vanilla Climate.Parameter and ParameterPoint JSON codecs compare scalar, two-element list and min/max object intervals, float endpoint bounds/ordering, required coordinate/offset fields, negative zero, precision-sensitive float parsing, malformed types and duplicate keys. Climate parameter distances, wrapping squared fitness, stable search-tree leaf order and nearest lookup are compared across every supported branching value 2..32, sizes around branch powers, the 65536-entry API bound, duplicates, warm ties, fresh lookups, brute-force lookup and extreme signed-long endpoints/targets. The Rust tree is immutable with per-worker search state instead of hidden thread locals; invalid or degenerate searches return typed errors. Inline arbitrary distance metrics and behavior outside the bounded API are not covered. Built-in Overworld and Nether quantized biome parameter tables are exported independently by each authenticated JAR and required to agree before Rust consumes them. The Rust multi-noise resolver and actual vanilla MultiNoiseBiomeSource compare biome identities through scalar climate queries and prepared bulk quart volumes, including forward/reverse/repeated query order, wrapped extreme origins and shared previous-result state. Biome holder keys in the reference are registration placeholders; no biome property or gameplay behavior is evaluated. The Rust loader reads a Horizon quantized table format, not the vanilla biome codec, and the preset builders themselves have not been ported. Source and private fixture mutations during validation invalidate the report. The two-field 26.3 NoiseSettings codec, create helper and LevelHeightAccessor clamping are also compared across bundled noise members, dimension/alignment bounds, zero/negative runtime heights, disjoint ranges, wrapped integer arithmetic and decimal/exponent integer conversion. Global fluid cutoff selection and the actual disabled Aquifer implementation are compared with original default block-state identities, extreme sea levels/coordinates, signed-zero/subnormal/nonfinite density and counted picker calls; developer fluid-disable behavior is outside the regular-mode corpus. The actual noise-based Aquifer.Config codec and runtime are compared across bundled aquifer settings, modern/legacy world-seeded aquifer factories, synthetic density roots, nondefault water/lava states, cave/void air, nonfinite sampler overrides, strided volume extents, wrapped coordinates, repeated and reversed queries, counted picker calls, sampler call order/values, injected failures and retry state, scheduling flags, populated location/status caches and sorted surface-cache entries. Oversized or wrapped-invalid grid allocations and developer fluid-disable behavior are outside the bounded regular-mode API. Terrain filling is not yet validated. Router, vertical noise and optional aquifer members are decoded from each noise-setting resource; complete NoiseGeneratorSettings, material rules, nonempty world fields, biome registry/codecs and complete chunk biome assignment, generated chunks, gameplay and rendering remain pending. TagEntry and TagFile codecs, ordered resource-stack replacement, first-occurrence member deduplication, required/optional dependency cycle pruning, lookup order and flags, missing-reference partial results and all bundled block tag members are also compared with actual vanilla TagLoader. Block identifier tables are exported independently by authenticated client/server JARs and required to agree. The bounded tag API supports at most 8192 tags, dependency depth 256 and Java hash buckets without tree nodes; hash-tree ordering and pathological self-cycle failures remain pending. No heightmap or complete terrain integration follows from tag resolution. Inline noise holders and general codec behavior beyond the covered fixtures remain pending." +} diff --git a/benchmarks/rust-worldgen-random-2026-10-06/scoped-parity.json b/benchmarks/rust-worldgen-random-2026-10-06/scoped-parity.json new file mode 100644 index 000000000..f0c80d9d4 --- /dev/null +++ b/benchmarks/rust-worldgen-random-2026-10-06/scoped-parity.json @@ -0,0 +1,162 @@ +{ + "schema": 1, + "minecraft": "26.3", + "manifest_sha1": "4fe1aa1ef8da1cb95c5bad1fb98890ca56dd8ca3", + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "java": "openjdk 25.0.4.1 2026-08-18", + "rustc": "rustc 1.99.0 (b940084d7 2026-09-28)", + "fixtures": 300, + "random_modes": 2, + "wrapper_depths": [ + 1, + 2, + 3 + ], + "operations": 119100, + "sources_sha256": { + "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldgenRandomOracle.java": "25e4a0c0403d1261038aa525e04e53c0484f4e5ada6c6a32f951bf6af5b057c8", + "tools/test_worldgen_random_parity.py": "be09554796751cfd2c872676f36ebb4a71def368049a7ab413ca478defdc63a3", + "tools/test_rust_parity.py": "7efa699a38c5820424f5fc8992ee601dbfe26d6482da9d2dab2c17c41fe8f12a", + "tools/lab.py": "d00bf107fa01b6c579734a082c3ca4ade3018f0d6851d46844acf17574f66e64", + "Cargo.toml": "dc370d5fdde37238c3e4820046f11c3201020406a4edfa1308257c13edbdcda4", + "Cargo.lock": "7307d0c887364db36d327685ecf0671b75305e31e5ba5fbdcdbb15eaf156d20e", + "crates/horizon-core/Cargo.toml": "e21b502c949da93cf67826592459b687a8cbf737ef92fee514e3ed2cc7cd27ad", + "crates/horizon-world/Cargo.toml": "977338bf3e654193685b015d383493b9f59ff6f5d6210bec212cef8ac4a50bed", + "crates/horizon-core/src/bin/density_parity.rs": "e5b1dd33b7d01306c73cf072629b4fb186e9ab87b672a00108999d1a72263fd0", + "crates/horizon-core/src/bin/float_log_parity.rs": "4a655fcf8822ee7668c4bd126bc84d0b118864a6fc7f5a6aeee667d8bf2590b1", + "crates/horizon-core/src/bin/geometry_parity.rs": "27f6c09fe5018ac3de8e70e0f0bbf78f9abb14f5e4783bcaf46e8ca87b9c6f8a", + "crates/horizon-core/src/bin/noise_parity.rs": "c135bfc708d853e7061e81487d2cfe10de64b2f65677d3b4837cbfe0b8341010", + "crates/horizon-core/src/bin/parity.rs": "f35d928c66f958de39fac5e7e836a657eed95f83599e84899f7ea7a5802ba481", + "crates/horizon-core/src/bin/tick_parity.rs": "a54c164fe4814034d369947a887f5273966f5a878ba849204b80d1c729526a8f", + "crates/horizon-core/src/biome/seed_hash.rs": "5afbb4921c750826b395a08bf06f382fc7f01b5759a93de02a2749c523e2a317", + "crates/horizon-core/src/biome.rs": "908efa8cd4aa0a7adf1cb5e1a222e3dfb640eed5e9172e0fe7f0d1287afae7e8", + "crates/horizon-core/src/carving/ellipsoid.rs": "09232a7588610e8a9176fd9c62d40afb1fb89f2ecab6d555536a1d847b142d86", + "crates/horizon-core/src/carving.rs": "0aa3093caa0437868a8c0ed52a6c6e1993bd51c03583c670a2837e749eae5426", + "crates/horizon-core/src/density/arithmetic.rs": "372faec96c923e2cf4aa6c66c1ac398e676853274557823850dbc8933dd15ab1", + "crates/horizon-core/src/density/beardifier.rs": "bb1052e27dae4a01954ca78d7d5babafef85f3b2c704ccaf1920cb85a098cb50", + "crates/horizon-core/src/density/cache.rs": "38d0b6c9dd04ffef979fdad3f29cfebf98d331c8c9d430be5f39aa34f6c30975", + "crates/horizon-core/src/density/end_islands.rs": "168b9384237bd2e41d0ae5a74e944da4dc74e493bdec31fb73184c9a49e3de55", + "crates/horizon-core/src/density/graph/compiler.rs": "ac67deeb16f16d0859aa20e5a165811a29aca0b910037ee6bf5098211f3a6ede", + "crates/horizon-core/src/density/graph/mod.rs": "b776e7da934cb03051a3053d56d461c71e9978e084922fe4194147aa580c07bf", + "crates/horizon-core/src/density/graph/seeded.rs": "6bcdcaa3dffcfa9df673bbbea35120057a16ba3d2b506c52709c36cf8976b74a", + "crates/horizon-core/src/density/graph/tests.rs": "6bfb8cbff462587dd147b0775ea01d370abbd97544b9bd596c792df1b5f7e634", + "crates/horizon-core/src/density/interpolation.rs": "8c890f52b6467f38a94c654986a6a484b8e0b296ab98c398e60a6ce465b5b010", + "crates/horizon-core/src/density/interval.rs": "b42629163baa6b599a233afe8596d1c370cd81d015cc6fc36a9663aa47b98424", + "crates/horizon-core/src/density/mod.rs": "ca0d77d3282e3746ddcbc92bee97dbf640b9a56214e6ac1537f51f9a5b63d6e7", + "crates/horizon-core/src/density/power.rs": "d5b7270a128d4264268cd772109ad16d71a8ec3ff2d3b63b84cb985296d54a91", + "crates/horizon-core/src/density/rounding.rs": "71840c5206ff8d218ac29bf6f66915d5212764ba270c675711a866ba5b55a7a6", + "crates/horizon-core/src/density/selection.rs": "0dd26af2e85004ec5e053039ad11c384c17c56ace9ab45eb3f5cb3503c0b0330", + "crates/horizon-core/src/density/slice.rs": "5d77605573c0deda47778f1f78f7fa3fbf1944d8f5efbcc65cf589181cadf80b", + "crates/horizon-core/src/density/spline.rs": "6bb2e40f940fc6544d6fb09cb0b8cac722be03bc663dbdfb0f61faae207400bc", + "crates/horizon-core/src/density/surface.rs": "159e0e69cda74f870e80ea64fe523c4397e64af4ccb861bb9fd07b2c3cb91b00", + "crates/horizon-core/src/density/terrain_noise.rs": "8d0059d25eb5d248cb97a4c5a2e670d61528928ea151495c004f25adb723fe3e", + "crates/horizon-core/src/density/tests.rs": "7817796ee40d0ae241bfbebec6bca190e0a8e7d5a1caa8ddf858c3eaa58b8858", + "crates/horizon-core/src/density/world_fields.rs": "c1ce305cb8046b384d90c564cafb24af7365d580389637910f3d8b0cc18eb583", + "crates/horizon-core/src/geometry/mod.rs": "dc92f73885dd0a7760743bf74f1ab8afa839d61cef2dfef890f8a23b67b4742e", + "crates/horizon-core/src/geometry/movement.rs": "930e34abef6f6eeec1ee7a6c920b5ba01bfe37b90678884490f4be53241f6b96", + "crates/horizon-core/src/geometry/shape/create.rs": "189812b91d5e0e3ad963afcd1a6e2831b31b8188df91a904ef27061e644806ad", + "crates/horizon-core/src/geometry/shape/join.rs": "f1b51887b7bf9482557e3ffa99e136f2e5db07ceeb05fdb116adf45e87129075", + "crates/horizon-core/src/geometry/shape.rs": "de22acd7430df3f69ef3632d427c57dffe57f3bdb78950bc75eac7e179ccf9df", + "crates/horizon-core/src/geometry/sweep.rs": "abd6009c61555161ef2f18b431b2aa384b126c0871cae8b96a62358498a56a1d", + "crates/horizon-core/src/geometry/traversal.rs": "77a3da570a0b85582b669cf4d841cba4b06327006dda26d4a26df4e8ce05bae4", + "crates/horizon-core/src/geometry/trig.rs": "05cef9341a298a474221a0556a11ddf47650393ea7a97b4b2022a4da6628fe37", + "crates/horizon-core/src/lib.rs": "47350edab5791f5074a54563ba98108818c5c6b1c5818a591388eab2ac9f5490", + "crates/horizon-core/src/noise/mod.rs": "1dab5a713abf702402e69ace1bf9e476bba544b0ede5a61c3c3afc60af0a03f3", + "crates/horizon-core/src/noise/normal.rs": "e9e7a46472a54a02c98c46da819842090567153b32fe0c84249009ef19af7aad", + "crates/horizon-core/src/noise/perlin.rs": "e73815447432eab7542f67366cb3f1b368d164e33f6c9cdbd045ac8e4db0932a", + "crates/horizon-core/src/noise/simplex.rs": "6c0dbc15b2b7510195dd28fceca01dcaac1847ccc4a84d299c351589c642fe7a", + "crates/horizon-core/src/noise/stack.rs": "7f6ef0e7d920139ef1a6ad3ec5640f92765715f86dcc5ec29f1a149984f45fa3", + "crates/horizon-core/src/noise/volume.rs": "3f05d2b1780acfdfee60037677d309937a5033b45ef428fc2d540942d4b56b43", + "crates/horizon-core/src/position/iter.rs": "32d2d8e74821cc4e49e3354202d35d3120e4415bfdda9375a73f2137ef651129", + "crates/horizon-core/src/position.rs": "e10101088e6902386b9b6d27773d44312f1ff72bebb19e57967a54945dde9dcd", + "crates/horizon-core/src/random/hash.rs": "0f88a127a1ba2705d3d6c0ebd009324d6ba86ffa2d27edf2d2a84765e690e4a3", + "crates/horizon-core/src/random/positional.rs": "35494745e5d4cf89e282c3ae0ee245e9f2640ddbbc03bc0055df742006a9c862", + "crates/horizon-core/src/random/worldgen.rs": "9f07ff33bcc038d34e27aa5465753bb21df18f2975e43cae201f709bc186945a", + "crates/horizon-core/src/random.rs": "ddb95d3a83e28ad605ff1f49f5df270cc543ca5ef1130e37d989dc74c8d861e6", + "crates/horizon-core/src/storage.rs": "f6c32201c64aefde06e57a2c767be46918df613548a322801546b133799cc33d", + "crates/horizon-core/src/ticks/heap.rs": "bf28afab8af77c3d243aa96cd8a1fb8d934140a4dbd07dbfdbf4e7908bb4b845", + "crates/horizon-core/src/ticks/index.rs": "1f1a6a568c2a30eafecb020ca4d5f5fc414860de85b8b381fc419a2e3e65c24a", + "crates/horizon-core/src/ticks/mod.rs": "84852599dde78687d782f115a5b4b3ef6856c1f9cc92917255167e89c72ab01e", + "crates/horizon-world/src/bin/worldgen_parity.rs": "3143ceb9b56eecfd7667e5feb5f9f0cd13cfb8754b38d4ea338dbba97f2819da", + "crates/horizon-world/src/chunk.rs": "8843e6f48dbbc4245ce4e95564dfba3a4d7a051ba0b1577fb038c07adb0ff0f9", + "crates/horizon-world/src/collision.rs": "6c40ab491efd0332bd4e65a1a112f3598f9eb0ea2f32f9c8cc7e81278d003251", + "crates/horizon-world/src/compression.rs": "4db73e6ca9a0d552d415ce60e7e88b89c9cf2b7d060a669ff8328f518316e101", + "crates/horizon-world/src/heightmap.rs": "a5edef082b5af40d814421ea17e129b3b06d70abee6434ed263e4bba58571698", + "crates/horizon-world/src/lib.rs": "5476d0a811941c4ea229c9a21c640aec51757b2483133a0f9c222fecbef5cb36", + "crates/horizon-world/src/main.rs": "fce57418b8c22a6a0a9044baa89ed3d9c243bc2e8413fea3ff0f32985daba021", + "crates/horizon-world/src/nbt.rs": "60262c3de8c8f68bc2da0370ccb17393d32b85f5f5022c6358599a7d32119ea6", + "crates/horizon-world/src/region.rs": "72b642e87fed37ed17f54d4c30f96c3b64d26c14bc0589c31ef40ff1616188fc", + "crates/horizon-world/src/registry/json.rs": "40974e8ddbca79f4a4f866f91f1241a7ac7289874527d4729483995dcf9b4f7e", + "crates/horizon-world/src/registry.rs": "566d7ef6a0d0d7e492d73b7f963ff0158544560a86ba33e179ef4d17e1274706", + "crates/horizon-world/src/tick_data.rs": "f8d04a69ea263f4168bce33f92e5b4ee2fe07d7caf50a1621c6b3ef6eb2479f3", + "crates/horizon-world/src/worldgen/anchor.rs": "d156b8a0b147a274cdd143409b441f4f43edecde6e8ee14ef9cf0309f743143a", + "crates/horizon-world/src/worldgen/aquifer/config.rs": "fcd2cc3a520c1527c88f095a3b5d38487e7ebb1ccecc5f757f93d04a069add4f", + "crates/horizon-world/src/worldgen/aquifer/noise_based.rs": "74daaa389b5c3dfdc99214dfff256a9e172f83548d2326cbc941d9637cc53fb7", + "crates/horizon-world/src/worldgen/aquifer.rs": "cb4b66d87de3f9f79ae6ffe4badd6f0f44886cd42ad9de2771b8b56c4f1e28c7", + "crates/horizon-world/src/worldgen/biome.rs": "b3b73091aa5ec989d916206567c5e4b0e997b007a5bb9c0ca5c53ada9d5fe81f", + "crates/horizon-world/src/worldgen/biome_chunk.rs": "32b937832b7058d86e8557a2012df32be1c97be324f15d0ae85245c45c73b314", + "crates/horizon-world/src/worldgen/biome_source/codec.rs": "2b9e4f5d679eb444cb73174f511e3b9f32e9eb138248ab12cffc6cfd76adf3a8", + "crates/horizon-world/src/worldgen/biome_source/runtime.rs": "f0b02c1521178e4d0377c6ca62694604b6a773f1f234f070ff0cde4685911d45", + "crates/horizon-world/src/worldgen/biome_source.rs": "e181e1736f3e0b75f7091a24c88de3fd116e01b98424d02382aea7a503d1eb54", + "crates/horizon-world/src/worldgen/biome_temperature.rs": "cde4bbab5e260c4065b113376c423b8511ade93c5aa5fd976e245ee8a58b5ad1", + "crates/horizon-world/src/worldgen/block_feature.rs": "c215156f2ecf7faf214b3d89e0829b65d54f4ff6d134d778ec941f18a606a327", + "crates/horizon-world/src/worldgen/block_predicate.rs": "dd8cbda2ec110444950f0b31bf4e088897eab0994674a91568c7b063f8f16210", + "crates/horizon-world/src/worldgen/bulk_section.rs": "eecf61532d7793f853884c5a18a7f436a59835c7b13d3ec9075804511553c9ba", + "crates/horizon-world/src/worldgen/carver/canyon.rs": "509c4d5a9d689849e98e894ab14a9fbf82d10707d38e9cc688ded3c4778df3e2", + "crates/horizon-world/src/worldgen/carver/generation.rs": "a4498d0d1457536de3922a08e9c40ccce8d2ef9cc263801c15a412327513c098", + "crates/horizon-world/src/worldgen/carver.rs": "46b251e28225fe1250de38f49dec5dacda4e2c4ba1e556e21e6d1e14e2651fc3", + "crates/horizon-world/src/worldgen/carving.rs": "4e77d4e5c4a0ca55ca3563b9bdf6f379342e0bdf9d019d60f7bc57ce4afb5fbd", + "crates/horizon-world/src/worldgen/climate/codec.rs": "d567adeb5d837816fca69102db51d790f71aec1b51c09298230d24612e400a14", + "crates/horizon-world/src/worldgen/climate/index.rs": "c5ce61679a5f0e0f2f0af2a373424effa124d0cce8250609eff38b7034650756", + "crates/horizon-world/src/worldgen/climate.rs": "1b9ad44407f40aee4c1cd5357a5c9c443c1b105728f01cf5c644072f99f8357e", + "crates/horizon-world/src/worldgen/density.rs": "65a98c156a290a6b374ef670d28cd5dfbe0aa93171824d1bbd96422536273f84", + "crates/horizon-world/src/worldgen/feature.rs": "40500af71ee6628dfb27518262d99f08d0383ae6c7b9397452feef0c213eadd9", + "crates/horizon-world/src/worldgen/feature_catalog.rs": "486fe9d8588eb09e0ee5707a0541b0df167b63b0b56c90a2709bfa09a0a3ad19", + "crates/horizon-world/src/worldgen/feature_graph.rs": "2297b194514925688dba25016a69d5ba5eb8b869bdfff28f2e611a6742ac5954", + "crates/horizon-world/src/worldgen/feature_region.rs": "4a95a30c0987d97e671f84380e13ddea070ad81f996baa65b2a06c4d892971c7", + "crates/horizon-world/src/worldgen/feature_sort.rs": "0b9d1e1c15d8449125d39e400776b8f28eec7b7cbd047660a94f8cb90160adfe", + "crates/horizon-world/src/worldgen/height_provider.rs": "368d4dc119854742a045c4a717679c921456da681fc5f71aa9b37102d6f33b47", + "crates/horizon-world/src/worldgen/material_condition/codec.rs": "09b909bc384472f76d163c8069ec6b507c7d5c6a028a36d5e0e3df20deff7b3b", + "crates/horizon-world/src/worldgen/material_condition/density.rs": "df9d0761e978e5010663ae8b44f2d6c1ecb4907331e333bdb6a2b487c1e107de", + "crates/horizon-world/src/worldgen/material_condition/library.rs": "a55534c5da97575a819af5a7dc0dbec9069993fa8b2619c6c9d5576946e683fa", + "crates/horizon-world/src/worldgen/material_condition/noise.rs": "ffb59cc6be2275d7a5621bf7d768527e74a8326ed7ad78618746711540921675", + "crates/horizon-world/src/worldgen/material_condition/rule.rs": "fed643352efbcb1f68f29b6241896617db889fc7c577a6247564e01922fec1fe", + "crates/horizon-world/src/worldgen/material_condition.rs": "d638dcb8cbcb5da20b3cb29602b0ae6a86c4fdf9d8c0fb725de8ec5fc108717e", + "crates/horizon-world/src/worldgen/material_extensions.rs": "ab806eb679d5116e1aebb64fca70e1499ae71f83c9507a8cb4c3201c2b1bf037", + "crates/horizon-world/src/worldgen/material_stage.rs": "698cbc786eff13c246e2bc2ea062401918cd4265899fbc3d53abc87e45a8e7a1", + "crates/horizon-world/src/worldgen/material_surface.rs": "5d37b90099df3d6da0845dab164e71469fb287019c2ee74bc6714f3b9d6d6d5b", + "crates/horizon-world/src/worldgen/ore_feature.rs": "83b89fd3be691c5412c0215b6abefdcaa44119a05aa41217e061970eb7e12ebd", + "crates/horizon-world/src/worldgen/placement/chain.rs": "1b976aa4dd2516468196d0af3451e3fdd037493a14d269f54ebdd7254055e05e", + "crates/horizon-world/src/worldgen/placement/context.rs": "b36dfd9297896e62770f2085cf934fc08ebd4c030ecc7ae17d864e819a113201", + "crates/horizon-world/src/worldgen/placement/layer.rs": "a0f5ca776f33f9d4f72b8fdcd163426152e5e43cb4a7572fc1d4fc57bf965de1", + "crates/horizon-world/src/worldgen/placement.rs": "68ecf36954fea5705436d486e9be93836933fd56779022afeb881a0399d6a674", + "crates/horizon-world/src/worldgen/router.rs": "2cee7cf15a0d2ada12be6b39d83e78177fd3033922e4f4cce87a64073cec2847", + "crates/horizon-world/src/worldgen/rule_test.rs": "d1662ec492489ebaa4b87e20f9a8c809dcf3a223a151211bd65ec241a63692fc", + "crates/horizon-world/src/worldgen/settings.rs": "a8fe87752e1982ef11cb67f8d80d8e3428b2c27db178044cb425ba803e689e59", + "crates/horizon-world/src/worldgen/tags.rs": "d35ded93fe6e95ea045cadcf4925e656dc34ef832b742179b9ad0cc49f902f31", + "crates/horizon-world/src/worldgen/terrain.rs": "7fb7130111654563f7217f7b84563adde0b11c3ebd6a499a514dc98ebef7c733", + "crates/horizon-world/src/worldgen/value_provider.rs": "ad1c0efffcc201839e3471d7dfa06c39307d8cbabddb4c5aed8389ee7b68737a", + "crates/horizon-world/src/worldgen/weighted.rs": "839840aae25302933bbd97a81a2336330e2d03a0ad1684e1e16ac769ed408e6b", + "crates/horizon-world/src/worldgen.rs": "55c4317bd9c782378de7c2a7d58be5aa08febc5b8f2f4b86379a39e0ba500b3c", + "crates/horizon-world/examples/worldgen_random_fixture.rs": "9b1d7c9035245edd112b6ea93f49cefb9ae1a64d34ff75a16d66598d6b152664" + }, + "fixtures_sha256": { + ".local/rust-worldgen-random-parity/inputs.txt": "a2315c27a8afa09528edc6d1c71c3f429b395b2cdad648ee76f13029b367870d" + }, + "rust_output_sha256": "87634cb2d11a28031ef8b2ed0dc7c8afafad5dc1dca5a53a67f57f4727e11397", + "references": [ + { + "side": "client", + "jar_sha256": "4508d006323f24fa02876310c192d739af56516eb259000ac50f0909a68c9a2d", + "output_sha256": "87634cb2d11a28031ef8b2ed0dc7c8afafad5dc1dca5a53a67f57f4727e11397", + "matched_output_lines": 238800 + }, + { + "side": "server", + "jar_sha256": "a362163eec5d1612d520772bc16e5b39c09e3b234fdc045f56bf544284ee8ae6", + "output_sha256": "87634cb2d11a28031ef8b2ed0dc7c8afafad5dc1dca5a53a67f57f4727e11397", + "matched_output_lines": 238800 + } + ], + "scope": "Actual WorldgenRandom bit sampling over legacy and xoroshiro sources, nested wrappers, signed bit-width shifts, draw counters, valid/invalid bounds, reseeding, fork and positional-factory delegation. Decoration, per-feature, large-feature, salt and slime-chunk seeds exercise signed int/long overflow, extreme coordinates and inherited legacy multi-draw behavior. Gaussian samples, concurrent access and full chunk decoration remain pending." +} diff --git a/crates/horizon-assets/Cargo.toml b/crates/horizon-assets/Cargo.toml new file mode 100644 index 000000000..56d71bd60 --- /dev/null +++ b/crates/horizon-assets/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "horizon-assets" +version = "0.1.0" +edition.workspace = true +license.workspace = true +rust-version.workspace = true +description = "Horizon version-specific model and resource decoding" + +[dependencies] +horizon-core = { path = "../horizon-core" } +serde = "1.0.229" +serde_json = { version = "1.0.151", features = ["raw_value"] } diff --git a/crates/horizon-assets/examples/blockstate_binding_fixture.rs b/crates/horizon-assets/examples/blockstate_binding_fixture.rs new file mode 100644 index 000000000..c69884a5c --- /dev/null +++ b/crates/horizon-assets/examples/blockstate_binding_fixture.rs @@ -0,0 +1,60 @@ +use horizon_assets::blockstate::{ + BlockStateDefinition, + bind::{Properties, PropertySchema, PropertyValues, SelectedModels}, +}; +use serde_json::{Value, json}; +use std::{ + collections::BTreeMap, + fs::File, + io::{BufRead, BufReader, BufWriter, Write}, +}; +fn main() -> Result<(), Box> { + let args: Vec<_> = std::env::args().collect(); + let facts: BTreeMap = serde_json::from_reader(File::open(&args[3])?)?; + let blocks: BTreeMap<_, _> = facts + .iter() + .map(|(key, value)| { + let schema: PropertySchema = value["schema"] + .as_object() + .unwrap() + .iter() + .map(|(key, value)| { + let values = if let Some(range) = value.get("integer") { + PropertyValues::Integer { + minimum: range[0].as_i64().unwrap() as i32, + maximum: range[1].as_i64().unwrap() as i32, + } + } else { + PropertyValues::Named( + value["named"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_str().unwrap().to_owned()) + .collect(), + ) + }; + (key.clone(), values) + }) + .collect(); + let states: Vec = serde_json::from_value(value["states"].clone()).unwrap(); + (key, (schema, states)) + }) + .collect(); + let input = BufReader::new(File::open(&args[1])?); + let mut output = BufWriter::new(File::create(&args[2])?); + for line in input.lines() { + let row: Value = serde_json::from_str(&line?)?; + let (schema, states) = &blocks[&row["block"].as_str().unwrap().to_owned()]; + let value = BlockStateDefinition::from_json(row["json"].as_str().unwrap()) + .and_then(|v| v.bind(schema, states)); + let result = match value { + Ok(selected) => { + json!({"name":row["name"],"selected":selected.iter().map(|s| match s {None=>Value::Null,Some(SelectedModels::Variant(index))=>json!({"variant":index}),Some(SelectedModels::Multipart(indices))=>json!({"multipart":indices})}).collect::>()}) + } + Err(_) => json!({"name":row["name"],"error":true}), + }; + writeln!(output, "{result}")?; + } + Ok(()) +} diff --git a/crates/horizon-assets/examples/blockstate_model_fixture.rs b/crates/horizon-assets/examples/blockstate_model_fixture.rs new file mode 100644 index 000000000..53ec83fd2 --- /dev/null +++ b/crates/horizon-assets/examples/blockstate_model_fixture.rs @@ -0,0 +1,44 @@ +use horizon_assets::blockstate::{BlockStateDefinition, Condition, Variant, VariantSet}; +use serde_json::{Value, json}; +use std::{ + collections::BTreeMap, + fs::File, + io::{BufRead, BufReader, BufWriter, Write}, +}; +fn variant(v: &Variant) -> Value { + json!({"model":v.model,"rotations":v.rotations,"uvlock":v.uv_lock}) +} +fn model(v: &VariantSet) -> Value { + match v { + VariantSet::Single(v) => json!({"single":variant(v)}), + VariantSet::Weighted(entries) => { + json!({"weighted":entries.iter().map(|(v,w)|json!([variant(v),w])).collect::>()}) + } + } +} +fn condition(v: &Condition) -> Value { + match v { + Condition::Or(v) => json!({"or":v.iter().map(condition).collect::>()}), + Condition::And(v) => json!({"and":v.iter().map(condition).collect::>()}), + Condition::Properties(v) => { + json!({"properties":v.iter().map(|(key,terms)| (key, terms.iter().map(|t|json!({"value":t.value,"negated":t.negated})).collect::>())).collect::>()}) + } + } +} +fn definition(v: &BlockStateDefinition) -> Value { + json!({"variants":v.variants.as_ref().map(|v|v.iter().map(|(k,v)|json!([k,model(v)])).collect::>()),"multipart":v.multipart.as_ref().map(|v|v.iter().map(|s|json!({"when":s.condition.as_ref().map(condition),"apply":model(&s.variant)})).collect::>())}) +} +fn main() -> Result<(), Box> { + let args: Vec<_> = std::env::args().collect(); + let input = BufReader::new(File::open(&args[1])?); + let mut output = BufWriter::new(File::create(&args[2])?); + for line in input.lines() { + let row: Vec = serde_json::from_str(&line?)?; + let result = match BlockStateDefinition::from_json(&row[1]) { + Ok(v) => json!({"name":row[0],"definition":definition(&v)}), + Err(_) => json!({"name":row[0],"error":true}), + }; + writeln!(output, "{result}")?; + } + Ok(()) +} diff --git a/crates/horizon-assets/examples/cuboid_model_fixture.rs b/crates/horizon-assets/examples/cuboid_model_fixture.rs new file mode 100644 index 000000000..cff7b67ef --- /dev/null +++ b/crates/horizon-assets/examples/cuboid_model_fixture.rs @@ -0,0 +1,23 @@ +mod support; +use horizon_assets::model::CuboidModel; +use serde_json::json; +use std::{ + fs::File, + io::{BufRead, BufReader, BufWriter, Write}, +}; +use support::model; + +fn main() -> Result<(), Box> { + let args: Vec<_> = std::env::args().collect(); + let input = BufReader::new(File::open(&args[1])?); + let mut output = BufWriter::new(File::create(&args[2])?); + for line in input.lines() { + let row: Vec = serde_json::from_str(&line?)?; + let result = match CuboidModel::from_json(&row[1]) { + Ok(value) => json!({"name":row[0],"model":model(&value)}), + Err(_) => json!({"name":row[0],"error":true}), + }; + writeln!(output, "{result}")?; + } + Ok(()) +} diff --git a/crates/horizon-assets/examples/model_baking_fixture.rs b/crates/horizon-assets/examples/model_baking_fixture.rs new file mode 100644 index 000000000..63e9b0c79 --- /dev/null +++ b/crates/horizon-assets/examples/model_baking_fixture.rs @@ -0,0 +1,63 @@ +use horizon_assets::{ + bake::{BlockModelTransform, ElementMatrix, bake_model_transformed}, + model::*, + resolve::ModelLibrary, +}; +use serde_json::{Value, json}; +use std::{ + fs::File, + io::{BufRead, BufReader, BufWriter, Write}, +}; +fn bits(value: f32) -> u32 { + if value.is_nan() { + 0x7fc0_0000 + } else { + value.to_bits() + } +} +fn main() -> Result<(), Box> { + let args: Vec<_> = std::env::args().collect(); + let input = BufReader::new(File::open(&args[1])?); + let mut output = BufWriter::new(File::create(&args[2])?); + for (index, line) in input.lines().enumerate() { + let row: Value = serde_json::from_str(&line?)?; + let models = row["models"] + .as_object() + .unwrap() + .iter() + .map(|(name, raw)| Ok((name.clone(), CuboidModel::from_json(raw.as_str().unwrap())?))) + .collect::>()?; + let library = ModelLibrary::new(models)?; + let transform = row.get("transform").map(|t| { + BlockModelTransform::new( + std::array::from_fn(|i| t[i].as_u64().unwrap() as u8), + t[3].as_bool().unwrap(), + ) + }); + let state = transform.unwrap_or_else(|| BlockModelTransform::new([0; 3], false)); + for root in row["roots"].as_array().unwrap() { + let name = root.as_str().unwrap(); + let baked = library.resolve(name).and_then(|model| { + let quads = bake_model_transformed(&model, state)?.into_iter().map(|q| json!({ + "positions":q.positions.map(|v| v.map(bits)),"uv":q.uv.map(|v| v.map(bits)), + "facing":q.facing.name(),"cull":q.cull.map(Direction::name),"tint":q.tint_index, + "shade":q.shade_direction_override.map(Direction::name),"light":q.light_emission, + "material":{"sprite":q.material.sprite,"translucent":q.material.force_translucent} + })).collect::>(); + let matrices: Vec<_> = model.elements().iter().map(|e| e.as_ref().unwrap().rotation.as_ref().map(|r| ElementMatrix::from_rotation(r).rows.map(|row| row.map(bits)))).collect(); + let mut value = json!({"quads":quads,"matrices":matrices}); + if transform.is_some() { + value["transform"] = json!({"matrix":state.matrix_rows().map(|r| r.map(bits)), + "inverse_uv":Direction::ALL.map(|d| state.inverse_uv_rows(d).map(|r| r.map(bits)))}); + } + Ok(value) + }); + let value = match baked { + Ok(baked) => json!({"case":index,"name":name,"baked":baked}), + Err(_) => json!({"case":index,"name":name,"error":true}), + }; + writeln!(output, "{value}")?; + } + } + Ok(()) +} diff --git a/crates/horizon-assets/examples/model_choice_fixture.rs b/crates/horizon-assets/examples/model_choice_fixture.rs new file mode 100644 index 000000000..1bd3aea8b --- /dev/null +++ b/crates/horizon-assets/examples/model_choice_fixture.rs @@ -0,0 +1,97 @@ +use horizon_assets::blockstate::{ + BlockStateDefinition, Selector, Variant, VariantSet, bind::SelectedModels, + choice::CompiledChoices, +}; +use horizon_core::random::{LegacyRandom, RandomSource, XoroshiroRandom}; +use serde_json::{Value, json}; +use std::{ + fs::File, + io::{BufRead, BufReader, BufWriter, Write}, +}; +fn choice(value: &Value, index: usize) -> VariantSet { + let variant = |suffix| Variant { + model: format!("horizon:part{index}_{suffix}"), + rotations: [0; 3], + uv_lock: false, + }; + if value.is_null() { + VariantSet::Single(variant("single".to_owned())) + } else { + VariantSet::Weighted( + value + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(i, w)| (variant(format!("variant{i}")), w.as_i64().unwrap() as i32)) + .collect(), + ) + } +} +fn trace( + mut random: impl RandomSource, + compiled: &CompiledChoices, + selected: &SelectedModels, + repeats: u64, +) -> Result> { + let mut result = Vec::new(); + let mut output = Vec::new(); + for _ in 0..repeats { + output.clear(); + compiled.collect(selected, &mut random, &mut output)?; + result.push(json!({"models":output.iter().map(|v|&v.model).collect::>(),"next_long":random.next_long(),"next_int":random.next_int()})); + } + Ok(json!(result)) +} +fn main() -> Result<(), Box> { + let args: Vec<_> = std::env::args().collect(); + let input = BufReader::new(File::open(&args[1])?); + let mut output = BufWriter::new(File::create(&args[2])?); + for line in input.lines() { + let row: Value = serde_json::from_str(&line?)?; + let parts = row["parts"].as_array().unwrap(); + let (definition, selected) = if row["multipart"].as_bool().unwrap() { + ( + BlockStateDefinition { + variants: None, + multipart: Some( + parts + .iter() + .enumerate() + .map(|(i, v)| Selector { + condition: None, + variant: choice(v, i), + }) + .collect(), + ), + }, + SelectedModels::Multipart( + row["selected"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_u64().unwrap() as usize) + .collect(), + ), + ) + } else { + ( + BlockStateDefinition { + variants: Some(vec![(String::new(), choice(&parts[0], 0))]), + multipart: None, + }, + SelectedModels::Variant(0), + ) + }; + let compiled = CompiledChoices::new(&definition)?; + let seed = row["seed"].as_i64().unwrap(); + let repeats = row["repeats"].as_u64().unwrap(); + let result = if row["random"] == "legacy" { + trace(LegacyRandom::new(seed), &compiled, &selected, repeats)? + } else { + trace(XoroshiroRandom::new(seed), &compiled, &selected, repeats)? + }; + writeln!(output, "{}", json!({"name":row["name"],"trace":result}))?; + } + Ok(()) +} diff --git a/crates/horizon-assets/examples/model_resolution_fixture.rs b/crates/horizon-assets/examples/model_resolution_fixture.rs new file mode 100644 index 000000000..e549783c2 --- /dev/null +++ b/crates/horizon-assets/examples/model_resolution_fixture.rs @@ -0,0 +1,68 @@ +mod support; +use horizon_assets::{model::*, resolve::ModelLibrary}; +use serde_json::{Value, json}; +use std::{ + collections::BTreeMap, + fs::File, + io::{BufRead, BufReader, BufWriter, Write}, +}; + +fn material(value: &Material) -> Value { + json!({"sprite":value.sprite,"translucent":value.force_translucent}) +} +fn main() -> Result<(), Box> { + let args: Vec<_> = std::env::args().collect(); + let input = BufReader::new(File::open(&args[1])?); + let mut output = BufWriter::new(File::create(&args[2])?); + for (index, line) in input.lines().enumerate() { + let row: Value = serde_json::from_str(&line?)?; + let models = row["models"] + .as_object() + .unwrap() + .iter() + .map(|(name, raw)| Ok((name.clone(), CuboidModel::from_json(raw.as_str().unwrap())?))) + .collect::>()?; + let library = ModelLibrary::new(models)?; + for root in row["roots"].as_array().unwrap() { + let name = root.as_str().unwrap(); + let Ok(model) = library.resolve(name) else { + writeln!(output, "{}", json!({"case":index,"name":name,"error":true}))?; + continue; + }; + let elements: Vec<_> = model + .elements() + .iter() + .map(|e| e.as_ref().map(support::element)) + .collect(); + let display: BTreeMap<_, _> = DISPLAY_CONTEXTS + .into_iter() + .zip(model.display.contexts.iter().map(support::transform)) + .collect(); + let textures: BTreeMap<_, _> = model + .textures + .iter() + .map(|(key, value)| (key, material(value))) + .collect(); + let queries: Vec<_> = row["queries"] + .as_array() + .unwrap() + .iter() + .map(|raw| { + let slot = raw.as_str().unwrap(); + match model.material(slot) { + Ok(value) => json!({"slot":slot,"value":value.map(material)}), + Err(_) => json!({"slot":slot,"error":true}), + } + }) + .collect(); + writeln!( + output, + "{}", + json!({"case":index,"name":name,"ao":model.ambient_occlusion, + "gui":match model.gui_light { GuiLight::Front => "front", GuiLight::Side => "side" }, + "elements":elements,"display":display,"textures":textures,"queries":queries}) + )?; + } + } + Ok(()) +} diff --git a/crates/horizon-assets/examples/sprite_animation_fixture.rs b/crates/horizon-assets/examples/sprite_animation_fixture.rs new file mode 100644 index 000000000..1b9d016a7 --- /dev/null +++ b/crates/horizon-assets/examples/sprite_animation_fixture.rs @@ -0,0 +1,68 @@ +use horizon_assets::animation::{AnimationMetadata, AnimationSample}; +use serde_json::{Value, json}; +use std::{ + fs::File, + io::{BufRead, BufReader, BufWriter, Write}, +}; +fn probe(row: &Value) -> Result> { + let m = AnimationMetadata::from_json(row["json"].as_str().unwrap())?; + let width = row["width"].as_i64().unwrap() as i32; + let height = row["height"].as_i64().unwrap() as i32; + let size = m.frame_size(width, height); + let frames = m.frames.as_ref().map(|frames| { + frames + .iter() + .map(|f| json!({"index":f.index,"time":f.time})) + .collect::>() + }); + let mut result = json!({"metadata":{"frames":frames,"width":m.width,"height":m.height,"frametime":m.frame_time,"interpolate":m.interpolate},"size":size}); + if size[0] > width || size[1] > height || width % size[0] != 0 || height % size[1] != 0 { + return Ok(result); + } + result["animation"] = match m.clip(((width / size[0]) * (height / size[1])) as u32)? { + None => Value::Null, + Some(clip) => { + let samples: Vec<_> = (0..=row["ticks"].as_u64().unwrap()) + .map(|tick| sample(clip.sample(tick))) + .collect(); + let mut edges = Vec::new(); + let mut start = 0u64; + for &(_, duration) in clip.sequence() { + let duration = i64::from(duration); + for sub in [0, 1, duration / 2, duration - 2, duration - 1] { + if sub >= 0 && sub < duration { + edges.push(sample(clip.sample(start + sub as u64 + 1))); + } + } + start += duration as u64; + } + json!({"sequence":clip.sequence(),"columns":width/size[0],"samples":samples,"edges":edges}) + } + }; + Ok(result) +} +fn sample(v: AnimationSample) -> Value { + json!([ + v.sequence_index, + v.sub_frame, + v.frame, + v.next_frame, + v.dirty, + v.needs_draw, + v.interpolation_millis + ]) +} +fn main() -> Result<(), Box> { + let args: Vec<_> = std::env::args().collect(); + let input = BufReader::new(File::open(&args[1])?); + let mut output = BufWriter::new(File::create(&args[2])?); + for line in input.lines() { + let row: Value = serde_json::from_str(&line?)?; + let result = match probe(&row) { + Ok(value) => json!({"name":row["name"],"value":value}), + Err(_) => json!({"name":row["name"],"error":true}), + }; + writeln!(output, "{result}")?; + } + Ok(()) +} diff --git a/crates/horizon-assets/examples/support/mod.rs b/crates/horizon-assets/examples/support/mod.rs new file mode 100644 index 000000000..0d0022baf --- /dev/null +++ b/crates/horizon-assets/examples/support/mod.rs @@ -0,0 +1,67 @@ +use horizon_assets::model::*; +use serde_json::{Value, json}; +use std::collections::BTreeMap; + +fn bits(values: [f32; N]) -> Vec { + values.map(f32::to_bits).to_vec() +} +pub fn transform(value: &DisplayTransform) -> Value { + match value { + DisplayTransform::Inherit => json!("inherit"), + DisplayTransform::Explicit(None) => Value::Null, + DisplayTransform::Explicit(Some(v)) => { + json!({"rotation":bits(v.rotation),"translation":bits(v.translation),"scale":bits(v.scale)}) + } + } +} +fn rotation(value: &ElementRotation) -> Value { + let angles = match value.value { + RotationValue::SingleAxis { axis, angle } => { + json!({"axis": match axis { Axis::X => "x", Axis::Y => "y", Axis::Z => "z" }, "angle":angle.to_bits()}) + } + RotationValue::EulerXyz(v) => json!(bits(v)), + }; + json!({"origin":bits(value.origin),"value":angles,"rescale":value.rescale}) +} +fn face(v: &Face) -> Value { + json!({"cull":v.cull.map(Direction::name),"tint":v.tint_index,"texture":v.texture,"rotation":v.rotation,"uv":v.uv.map(bits)}) +} +pub fn element(v: &Element) -> Value { + let faces: BTreeMap<_, _> = v + .faces + .iter() + .map(|(k, v)| (k.name(), v.as_ref().map(face))) + .collect(); + json!({"from":bits(v.from),"to":bits(v.to),"faces":faces,"rotation":v.rotation.as_ref().map(rotation),"shade":v.shade_direction_override.map(Direction::name),"light":v.light_emission}) +} +#[allow(dead_code)] // Shared by fixtures which normalize different model stages. +pub fn model(v: &CuboidModel) -> Value { + let textures: BTreeMap<_, _> = v + .textures + .iter() + .map(|(key, value)| { + ( + key, + match value { + TextureSlot::Reference(r) => json!({"reference":r}), + TextureSlot::Material(m) => { + json!({"sprite":m.sprite,"translucent":m.force_translucent}) + } + }, + ) + }) + .collect(); + let elements = v.elements.as_ref().map(|values| { + values + .iter() + .map(|v| v.as_ref().map(element)) + .collect::>() + }); + let display = v.display.as_ref().map(|v| { + DISPLAY_CONTEXTS + .into_iter() + .zip(v.contexts.iter().map(transform)) + .collect::>() + }); + json!({"parent":v.parent,"ao":v.ambient_occlusion,"gui":v.gui_light.map(|v| match v { GuiLight::Front => "front", GuiLight::Side => "side" }),"textures":textures,"elements":elements,"display":display}) +} diff --git a/crates/horizon-assets/src/animation.rs b/crates/horizon-assets/src/animation.rs new file mode 100644 index 000000000..66f494798 --- /dev/null +++ b/crates/horizon-assets/src/animation.rs @@ -0,0 +1,186 @@ +//! Java Edition 26.3 animation metadata and sprite tick selection. +use crate::json::*; +use serde_json::value::RawValue; + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct AnimationFrame { + pub index: i32, + pub time: Option, +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct AnimationMetadata { + pub frames: Option>, + pub width: Option, + pub height: Option, + pub frame_time: i32, + pub interpolate: bool, +} + +fn optional<'a>(object: &Object<'a>, name: &str) -> Option<&'a RawValue> { + object.get(name).copied().filter(|v| v.get() != "null") +} +fn bounded_integer(value: &RawValue, minimum: i32) -> Result { + // A lenient JsonParser exposes scanner failures as strings, which the + // uncompressed numeric codec rejects. Model streams instead reject them + // globally, even inside ignored fields. + if !native_number_token(value.get()) { + return Err(error( + "native reader classifies animation number as a string", + )); + } + let value = integer(value)?; + if value < minimum { + return Err(error("animation integer outside codec range")); + } + Ok(value) +} +impl AnimationMetadata { + /// Decode the animation section itself, using the uncompressed JsonOps codec + /// rules. Numeric primitives truncate and wrap as Java Number.intValue does; + /// strings and booleans are not numbers. Null optional fields are absent. + pub fn from_json(text: &str) -> Result { + let raw: &RawValue = serde_json::from_str(text)?; + let fields = object(raw)?; + let positive = |name| { + optional(&fields, name) + .map(|v| bounded_integer(v, 1)) + .transpose() + }; + let frames = optional(&fields, "frames") + .map(|v| { + array(v)? + .into_iter() + .map(|v| { + if v.get().starts_with('{') { + let fields = object(v)?; + Ok(AnimationFrame { + index: bounded_integer(required(&fields, "index")?, 0)?, + time: optional(&fields, "time") + .map(|v| bounded_integer(v, 1)) + .transpose()?, + }) + } else { + Ok(AnimationFrame { + index: bounded_integer(v, 0)?, + time: None, + }) + } + }) + .collect::>>() + }) + .transpose()?; + Ok(Self { + frames, + width: positive("width")?, + height: positive("height")?, + frame_time: positive("frametime")?.unwrap_or(1), + interpolate: optional(&fields, "interpolate") + .map(|v| serde_json::from_str(v.get())) + .transpose()? + .unwrap_or(false), + }) + } + + pub fn frame_size(&self, image_width: i32, image_height: i32) -> [i32; 2] { + match (self.width, self.height) { + (Some(w), Some(h)) => [w, h], + (Some(w), None) => [w, image_height], + (None, Some(h)) => [image_width, h], + (None, None) => [image_width.min(image_height); 2], + } + } + + /// Build the animation after image/frame dimensions have been validated by + /// the resource loader. Out-of-image indices are removed, preserving order + /// and repeats. Zero or one remaining entries mean static physical frame 0. + pub fn clip(&self, physical_frames: u32) -> Result> { + if self.frame_time <= 0 { + return Err(error("nonpositive default animation duration")); + } + let sequence: Vec<_> = match &self.frames { + Some(frames) => frames + .iter() + .filter_map(|v| { + let time = v.time.unwrap_or(self.frame_time); + (v.index >= 0 && (v.index as u32) < physical_frames && time > 0) + .then_some((v.index as u32, time as u32)) + }) + .collect(), + None => (0..physical_frames) + .map(|i| (i, self.frame_time as u32)) + .collect(), + }; + if sequence.len() <= 1 { + return Ok(None); + } + let mut duration = 0u64; + let ends = sequence + .iter() + .map(|&(_, time)| { + duration = duration + .checked_add(u64::from(time)) + .ok_or_else(|| error("animation duration overflow"))?; + Ok(duration) + }) + .collect::>>()?; + Ok(Some(AnimationClip { + sequence, + ends, + duration, + interpolate: self.interpolate, + })) + } +} + +#[derive(Clone, Debug)] +pub struct AnimationClip { + sequence: Vec<(u32, u32)>, + ends: Vec, + duration: u64, + interpolate: bool, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct AnimationSample { + pub sequence_index: usize, + pub sub_frame: u32, + pub frame: u32, + pub next_frame: u32, + pub dirty: bool, + pub needs_draw: bool, + /// Native drawToAtlas encodes floor((subFrame / time) * 1000) in its + /// first-vertex argument. This is not a claim about GPU interpolation pixels. + pub interpolation_millis: u32, +} +impl AnimationClip { + pub fn sequence(&self) -> &[(u32, u32)] { + &self.sequence + } + pub fn duration(&self) -> u64 { + self.duration + } + pub fn interpolates(&self) -> bool { + self.interpolate + } + + /// Random access to the state after `tick` native ticks. Binary search avoids + /// advancing every missed tick when a render frame takes longer than 50 ms. + pub fn sample(&self, tick: u64) -> AnimationSample { + let time = tick % self.duration; + let index = self.ends.partition_point(|end| *end <= time); + let start = if index == 0 { 0 } else { self.ends[index - 1] }; + let sub_frame = (time - start) as u32; + let (frame, duration) = self.sequence[index]; + let previous = (index + self.sequence.len() - 1) % self.sequence.len(); + let dirty = tick == 0 || (sub_frame == 0 && frame != self.sequence[previous].0); + AnimationSample { + sequence_index: index, + sub_frame, + frame, + next_frame: self.sequence[(index + 1) % self.sequence.len()].0, + dirty, + needs_draw: self.interpolate || dirty, + interpolation_millis: ((sub_frame as f32 / duration as f32) * 1000.0) as u32, + } + } +} diff --git a/crates/horizon-assets/src/bake.rs b/crates/horizon-assets/src/bake.rs new file mode 100644 index 000000000..e2afe55df --- /dev/null +++ b/crates/horizon-assets/src/bake.rs @@ -0,0 +1,257 @@ +//! Cuboid geometry in block units, including blockstate rotation and UV locking. +use crate::{json::*, model::*, resolve::ResolvedCuboidModel}; +mod transform; +pub use transform::BlockModelTransform; + +#[derive(Clone, Debug, PartialEq)] +pub struct ModelQuad { + pub positions: [[f32; 3]; 4], + /// Normalized unit-atlas coordinates, before placement in a larger atlas. + pub uv: [[f32; 2]; 4], + pub facing: Direction, + pub cull: Option, + pub material: Material, + pub tint_index: i32, + pub shade_direction_override: Option, + pub light_emission: u8, +} + +#[derive(Clone, Copy, Debug)] +pub struct ElementMatrix { + pub rows: [[f32; 3]; 3], + identity: bool, +} +impl ElementMatrix { + pub fn from_rotation(rotation: &ElementRotation) -> Self { + const DEG: f32 = std::f32::consts::PI / 180.0; + let mut matrix = match rotation.value { + RotationValue::SingleAxis { angle: 0.0, .. } => Self { + rows: [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], + identity: true, + }, + RotationValue::SingleAxis { axis, angle } => { + let (s, c) = sin_cos(angle * DEG); + let rows = match axis { + Axis::X => [[1.0, 0.0, 0.0], [0.0, c, -s], [0.0, s, c]], + Axis::Y => [[c, 0.0, s], [0.0, 1.0, 0.0], [-s, 0.0, c]], + Axis::Z => [[c, -s, 0.0], [s, c, 0.0], [0.0, 0.0, 1.0]], + }; + Self { + rows, + identity: false, + } + } + RotationValue::EulerXyz([x, y, z]) => { + let (sx, cx) = sin_cos(x * DEG); + let (sy, cy) = sin_cos(y * DEG); + let (sz, cz) = sin_cos(z * DEG); + let czsy = cz * sy; + let szsy = sz * sy; + Self { + rows: [ + [cz * cy, -sz * cx + czsy * sx, -sz * -sx + czsy * cx], + [sz * cy, cz * cx + szsy * sx, cz * -sx + szsy * cx], + [-sy, cy * sx, cy * cx], + ], + identity: false, + } + } + }; + if rotation.rescale && !matrix.identity { + let scales: [f32; 3] = std::array::from_fn(|axis| { + let basis = std::array::from_fn(|i| if i == axis { 1.0 } else { 0.0 }); + let column = matrix.direction(basis); + let maximum = java_max(java_max(column[0].abs(), column[1].abs()), column[2].abs()); + 1.0 / maximum + }); + for (axis, scale) in scales.into_iter().enumerate() { + for row in &mut matrix.rows { + row[axis] *= scale; + } + } + } + matrix + } + fn direction(self, value: [f32; 3]) -> [f32; 3] { + self.rows + .map(|r| r[0] * value[0] + (r[1] * value[1] + r[2] * value[2])) + } + fn position(self, value: [f32; 3]) -> [f32; 3] { + if self.identity { + value + } else { + self.rows + .map(|r| r[0] * value[0] + (r[1] * value[1] + (r[2] * value[2] + 0.0))) + } + } +} +fn java_max(a: f32, b: f32) -> f32 { + if a.is_nan() || b.is_nan() { + f32::NAN + } else { + a.max(b) + } +} +/// JOML's default float path uses a double sine rounded to float, and obtains +/// cosine's magnitude from that rounded sine. Keep all subsequent steps f32. +fn sin_cos(angle: f32) -> (f32, f32) { + let sin = f64::from(angle).sin() as f32; + let cos = (1.0 - sin * sin).sqrt(); + let shifted = angle + std::f32::consts::FRAC_PI_2; + let mut period = + shifted - (shifted / std::f32::consts::TAU) as i32 as f32 * std::f32::consts::TAU; + if period < 0.0 { + period += std::f32::consts::TAU; + } + ( + sin, + if period >= std::f32::consts::PI { + -cos + } else { + cos + }, + ) +} + +pub fn default_uv(from: [f32; 3], to: [f32; 3], direction: Direction) -> [f32; 4] { + match direction { + Direction::Down => [from[0], 16.0 - to[2], to[0], 16.0 - from[2]], + Direction::Up => [from[0], from[2], to[0], to[2]], + Direction::North => [16.0 - to[0], 16.0 - to[1], 16.0 - from[0], 16.0 - from[1]], + Direction::South => [from[0], 16.0 - to[1], to[0], 16.0 - from[1]], + Direction::West => [from[2], 16.0 - to[1], to[2], 16.0 - from[1]], + Direction::East => [16.0 - to[2], 16.0 - to[1], 16.0 - from[2], 16.0 - from[1]], + } +} +fn corners(from: [f32; 3], to: [f32; 3], direction: Direction) -> [[f32; 3]; 4] { + let selectors = match direction { + Direction::Down => [[0, 0, 1], [0, 0, 0], [1, 0, 0], [1, 0, 1]], + Direction::Up => [[0, 1, 0], [0, 1, 1], [1, 1, 1], [1, 1, 0]], + Direction::North => [[1, 1, 0], [1, 0, 0], [0, 0, 0], [0, 1, 0]], + Direction::South => [[0, 1, 1], [0, 0, 1], [1, 0, 1], [1, 1, 1]], + Direction::West => [[0, 1, 0], [0, 0, 0], [0, 0, 1], [0, 1, 1]], + Direction::East => [[1, 1, 1], [1, 0, 1], [1, 0, 0], [1, 1, 0]], + }; + selectors + .map(|selector| std::array::from_fn(|i| if selector[i] == 0 { from[i] } else { to[i] })) +} +fn facing(vertices: &[[f32; 3]; 4]) -> Option { + let a: [f32; 3] = std::array::from_fn(|i| vertices[1][i] - vertices[0][i]); + let b: [f32; 3] = std::array::from_fn(|i| vertices[2][i] - vertices[0][i]); + let n = [ + a[1] * b[2] - a[2] * b[1], + a[2] * b[0] - a[0] * b[2], + a[0] * b[1] - a[1] * b[0], + ]; + let inverse_length = 1.0 / (n[0] * n[0] + (n[1] * n[1] + n[2] * n[2])).sqrt(); + let n = n.map(|v| v * inverse_length); + if n.iter().any(|v| !v.is_finite()) { + return None; + } + let mut best = 0.0; + let mut result = None; + for (direction, dot) in Direction::ALL + .into_iter() + .zip([-n[1], n[1], -n[2], n[2], -n[0], n[0]]) + { + if dot >= 0.0 && dot > best { + best = dot; + result = Some(direction); + } + } + result +} + +pub fn bake_model(model: &ResolvedCuboidModel) -> Result> { + bake_model_transformed(model, BlockModelTransform::new([0; 3], false)) +} +pub fn bake_model_transformed( + model: &ResolvedCuboidModel, + transform: BlockModelTransform, +) -> Result> { + let mut output = Vec::new(); + for element in model.elements() { + let element = element + .as_ref() + .ok_or_else(|| error("null model element"))?; + let matrix = element.rotation.as_ref().map(ElementMatrix::from_rotation); + for (direction, face) in &element.faces { + let face = face.as_ref().ok_or_else(|| error("null model face"))?; + let material = model.material(&face.texture)?.cloned().unwrap_or(Material { + sprite: "minecraft:missingno".to_owned(), + force_translucent: false, + }); + output.push(bake_face( + element, face, *direction, matrix, material, transform, + )?); + } + } + Ok(output) +} +fn bake_face( + element: &Element, + face: &Face, + direction: Direction, + matrix: Option, + material: Material, + transform: BlockModelTransform, +) -> Result { + let mut positions = corners(element.from, element.to, direction).map(|v| v.map(|c| c / 16.0)); + if let (Some(rotation), Some(matrix)) = (&element.rotation, matrix) { + for vertex in &mut positions { + let relative = std::array::from_fn(|i| vertex[i] - rotation.origin[i]); + let rotated = matrix.position(relative); + *vertex = std::array::from_fn(|i| rotated[i] + rotation.origin[i]); + } + } + positions = positions.map(|v| transform.position(v)); + let bounds = face + .uv + .unwrap_or_else(|| default_uv(element.from, element.to, direction)); + let mut uv = std::array::from_fn(|i| { + let corner = (i + usize::from(face.rotation)) % 4; + transform + .uv( + direction, + [ + bounds[if corner < 2 { 0 } else { 2 }] / 16.0, + bounds[if corner == 0 || corner == 3 { 1 } else { 3 }] / 16.0, + ], + ) + // Native TextureAtlasSprite applies origin + extent * coordinate; + // even the unit atlas changes negative zero to positive zero. + .map(|value| 0.0 + value) + }); + let normal = facing(&positions); + if let (None, Some(facing)) = (&element.rotation, normal) { + let mut min = [999.0; 3]; + let mut max = [-999.0; 3]; + for vertex in &positions { + for axis in 0..3 { + if vertex[axis] < min[axis] { + min[axis] = vertex[axis]; + } + if vertex[axis] > max[axis] { + max[axis] = vertex[axis]; + } + } + } + for (index, expected) in corners(min, max, facing).into_iter().enumerate() { + let found = (index..4) + .find(|i| positions[*i] == expected) + .ok_or_else(|| error("cannot reorder model face"))?; + positions.swap(index, found); + uv.swap(index, found); + } + } + Ok(ModelQuad { + positions, + uv, + facing: normal.unwrap_or(Direction::Up), + cull: face.cull.map(|d| transform.direction(d)), + material, + tint_index: face.tint_index, + shade_direction_override: element.shade_direction_override, + light_emission: element.light_emission, + }) +} diff --git a/crates/horizon-assets/src/bake/transform.rs b/crates/horizon-assets/src/bake/transform.rs new file mode 100644 index 000000000..f431e3dbd --- /dev/null +++ b/crates/horizon-assets/src/bake/transform.rs @@ -0,0 +1,243 @@ +//! Prepared blockstate transforms. The face basis and inverse arithmetic use +//! the pinned client's default, unfused f32 operations, including UV-lock +//! identity detection and quaternion basis normalization error. +use super::sin_cos; +use crate::model::Direction; +use std::sync::OnceLock; + +#[derive(Clone, Copy, Debug)] +struct Affine { + rows: [[f32; 4]; 3], + identity: bool, +} +impl Affine { + const IDENTITY: Self = Self { + rows: [ + [1.0, 0.0, 0.0, 0.0], + [0.0, 1.0, 0.0, 0.0], + [0.0, 0.0, 1.0, 0.0], + ], + identity: true, + }; + fn position(self, v: [f32; 3]) -> [f32; 3] { + self.rows + .map(|r| r[0] * v[0] + (r[1] * v[1] + (r[2] * v[2] + r[3]))) + } + fn mul(self, b: Self) -> Self { + if self.identity { + return b; + } + if b.identity { + return self; + } + Self { + rows: std::array::from_fn(|r| { + std::array::from_fn(|c| { + self.rows[r][0] * b.rows[0][c] + + (self.rows[r][1] * b.rows[1][c] + + if c == 3 { + self.rows[r][2] * b.rows[2][c] + self.rows[r][3] + } else { + self.rows[r][2] * b.rows[2][c] + }) + }) + }), + identity: false, + } + } + fn inverse(self) -> Self { + let [[a, b, c, x], [d, e, f, y], [g, h, i, z]] = self.rows; + let ae = a * e; + let db = d * b; + let gb = g * b; + let ah = a * h; + let dh = d * h; + let ge = g * e; + let bi = b * i; + let bf = b * f; + let ei = e * i; + let ec = e * c; + let hf = h * f; + let hc = h * c; + let cg = c * g; + let cd = c * d; + let fg = f * g; + let fa = f * a; + let id = i * d; + let ia = i * a; + let inverse = 1.0 / ((ae - db) * i + (gb - ah) * f + (dh - ge) * c); + Self { + rows: [ + [ + (ei - hf) * inverse, + (hc - bi) * inverse, + (bf - ec) * inverse, + (bi * y - bf * z + ec * z - ei * x + hf * x - hc * y) * inverse, + ], + [ + (fg - id) * inverse, + (ia - cg) * inverse, + (cd - fa) * inverse, + (cg * y - cd * z + fa * z - fg * x + id * x - ia * y) * inverse, + ], + [ + (dh - ge) * inverse, + (gb - ah) * inverse, + (ae - db) * inverse, + (ge * x - dh * x + ah * y - gb * y + db * z - ae * z) * inverse, + ], + ], + identity: false, + } + } + fn face_basis(direction: Direction) -> Self { + use Direction::*; + use std::f32::consts::{FRAC_PI_2, PI}; + let (axis, angle) = match direction { + South => return Self::IDENTITY, + Down => (0, FRAC_PI_2), + Up => (0, -FRAC_PI_2), + East => (1, FRAC_PI_2), + West => (1, -FRAC_PI_2), + North => (1, PI), + }; + let (s, c) = sin_cos(angle * 0.5); + // Quaternion.rotateX/Y on an identity quaternion retains signed zeros. + let [x, y, z, w] = if axis == 0 { + [ + s + 0.0 * c, + 0.0 * c + 0.0 * s, + 0.0 * c - 0.0 * s, + c - 0.0 * s, + ] + } else { + [ + 0.0 * c - 0.0 * s, + s + 0.0 * c, + 0.0 * s + 0.0 * c, + c - 0.0 * s, + ] + }; + let (xx, yy, zz, ww) = (x * x, y * y, z * z, w * w); + let (xy, xz, yz, xw, yw, zw) = (x * y, x * z, y * z, x * w, y * w, z * w); + let (xy, xz, yz, xw, yw, zw) = (xy + xy, xz + xz, yz + yz, xw + xw, yw + yw, zw + zw); + Self { + rows: [ + [ww + xx - zz - yy, -zw + xy, yw + xz, 0.0], + [xy + zw, yy - zz + ww - xx, yz - xw, 0.0], + [xz - yw, yz + xw, zz - yy - xx + ww, 0.0], + ], + identity: false, + } + } +} + +/// A blockstate's negative XYZ quarter-turns and optional face UV locking. +/// All 64 rotation combinations are prepared once and reused across models. +#[derive(Clone, Copy, Debug)] +pub struct BlockModelTransform { + orientation: &'static Orientation, + uv_lock: bool, +} +#[derive(Debug)] +struct Orientation { + matrix: Affine, + inverse_uv: [Affine; 6], +} +impl BlockModelTransform { + pub fn new(quarter_turns: [u8; 3], uv_lock: bool) -> Self { + static ORIENTATIONS: OnceLock<[Orientation; 64]> = OnceLock::new(); + let orientations = ORIENTATIONS.get_or_init(|| { + let bases = Direction::ALL.map(Affine::face_basis); + let inverses = bases.map(|b| if b.identity { b } else { b.inverse() }); + std::array::from_fn(|index| { + let turns = [index / 16, index / 4 % 4, index % 4]; + let mut rows = [[1i8, 0, 0], [0, 1, 0], [0, 0, 1]]; + for (axis, turns) in turns.into_iter().enumerate() { + for _ in 0..turns { + let a = (axis + 1) % 3; + let b = (axis + 2) % 3; + let old = rows[a]; + rows[a] = rows[b]; + rows[b] = old.map(|v| -v); + } + } + let matrix = Affine { + identity: rows == [[1, 0, 0], [0, 1, 0], [0, 0, 1]], + rows: rows.map(|r| [f32::from(r[0]), f32::from(r[1]), f32::from(r[2]), 0.0]), + }; + let inverse_uv = bases.map(|b| { + if matrix.identity { + return matrix.inverse(); + } + let transformed = matrix.mul(b); + let normal = transformed.rows.map(|r| r[2]); + inverses[nearest(normal) as usize] + .mul(transformed) + .inverse() + }); + Orientation { matrix, inverse_uv } + }) + }); + let [x, y, z] = quarter_turns.map(|n| usize::from(n % 4)); + Self { + orientation: &orientations[x * 16 + y * 4 + z], + uv_lock, + } + } + pub fn matrix_rows(self) -> [[f32; 4]; 3] { + self.orientation.matrix.rows + } + pub fn inverse_uv_rows(self, direction: Direction) -> [[f32; 4]; 3] { + self.uv_matrix(direction).rows + } + fn uv_matrix(self, direction: Direction) -> Affine { + if self.uv_lock { + self.orientation.inverse_uv[direction as usize] + } else { + Affine::IDENTITY + } + } + pub(super) fn position(self, v: [f32; 3]) -> [f32; 3] { + if self.orientation.matrix.identity { + return v; + } + self.orientation + .matrix + .position(v.map(|c| c - 0.5)) + .map(|c| c + 0.5) + } + pub(super) fn uv(self, direction: Direction, uv: [f32; 2]) -> [f32; 2] { + let matrix = self.uv_matrix(direction); + // MatrixUtil re-determines properties when the identity bit is absent. + // Its numeric comparison treats signed zeros as equal, without changing + // the matrix coefficients retained for later use. + if matrix.rows == Affine::IDENTITY.rows { + return uv; + } + let result = matrix.position([uv[0] - 0.5, uv[1] - 0.5, 0.0]); + [result[0] + 0.5, result[1] + 0.5] + } + pub fn direction(self, direction: Direction) -> Direction { + let v = match direction { + Direction::Down => [0.0, -1.0, 0.0], + Direction::Up => [0.0, 1.0, 0.0], + Direction::North => [0.0, 0.0, -1.0], + Direction::South => [0.0, 0.0, 1.0], + Direction::West => [-1.0, 0.0, 0.0], + Direction::East => [1.0, 0.0, 0.0], + }; + nearest(self.orientation.matrix.position(v)) + } +} +fn nearest([x, y, z]: [f32; 3]) -> Direction { + let mut best = f32::MIN_POSITIVE; + let mut direction = Direction::North; + for (candidate, dot) in Direction::ALL.into_iter().zip([-y, y, -z, z, -x, x]) { + if dot > best { + best = dot; + direction = candidate; + } + } + direction +} diff --git a/crates/horizon-assets/src/blockstate.rs b/crates/horizon-assets/src/blockstate.rs new file mode 100644 index 000000000..e482aa66f --- /dev/null +++ b/crates/horizon-assets/src/blockstate.rs @@ -0,0 +1,228 @@ +//! Pinned blockstate resource definitions, before registry binding and baking. +pub mod bind; +pub mod choice; +use crate::json::*; +use serde::{ + Deserializer, + de::{MapAccess, Visitor}, +}; +use serde_json::value::RawValue; +use std::{collections::BTreeMap, fmt}; + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Variant { + pub model: String, + /// X, Y, Z rotations in quarter turns. + pub rotations: [u8; 3], + pub uv_lock: bool, +} +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum VariantSet { + Single(Variant), + Weighted(Vec<(Variant, i32)>), +} +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Term { + pub value: String, + pub negated: bool, +} +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum Condition { + Or(Vec), + And(Vec), + Properties(BTreeMap>), +} +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Selector { + pub condition: Option, + pub variant: VariantSet, +} +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct BlockStateDefinition { + /// Preserve resource order: overlapping variant selectors have order-sensitive + /// native recovery behavior when bound to a registry. + pub variants: Option>, + pub multipart: Option>, +} +fn optional<'a>(fields: &Object<'a>, name: &str) -> Option<&'a RawValue> { + fields.get(name).copied().filter(|v| v.get() != "null") +} +fn ordered_object(raw: &RawValue) -> Result> { + struct Ordered; + impl<'de> Visitor<'de> for Ordered { + type Value = Vec<(String, &'de RawValue)>; + fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + formatter.write_str("an object") + } + fn visit_map>( + self, + mut map: M, + ) -> std::result::Result { + let mut values: Self::Value = Vec::new(); + let mut indices = BTreeMap::new(); + while let Some((name, value)) = map.next_entry::()? { + if let Some(&index) = indices.get(&name) { + values[index] = (name, value); + } else { + indices.insert(name.clone(), values.len()); + values.push((name, value)); + } + } + Ok(values) + } + } + Ok(serde_json::Deserializer::from_str(raw.get()).deserialize_map(Ordered)?) +} +impl BlockStateDefinition { + pub fn from_json(text: &str) -> Result { + let raw: &RawValue = serde_json::from_str(text.strip_prefix('\u{feff}').unwrap_or(text))?; + validate_number_tokens(raw)?; + let fields = object(raw)?; + let variants = optional(&fields, "variants") + .map(|v| { + let values = ordered_object(v)?; + if values.is_empty() { + return Err(error("empty variant map")); + } + values + .into_iter() + .map(|(key, value)| Ok((key, VariantSet::decode(value)?))) + .collect::>>() + }) + .transpose()?; + let multipart = optional(&fields, "multipart") + .map(|v| { + let values = array(v)?; + if values.is_empty() { + return Err(error("empty multipart list")); + } + values + .into_iter() + .map(|v| { + let fields = object(v)?; + Ok(Selector { + condition: optional(&fields, "when") + .map(Condition::decode) + .transpose()?, + variant: VariantSet::decode(required(&fields, "apply")?)?, + }) + }) + .collect::>>() + }) + .transpose()?; + if variants.is_none() && multipart.is_none() { + return Err(error("no variants or multipart")); + } + Ok(Self { + variants, + multipart, + }) + } +} +impl Variant { + fn decode(raw: &RawValue) -> Result { + let fields = object(raw)?; + let mut rotations = [0; 3]; + for (target, name) in rotations.iter_mut().zip(["x", "y", "z"]) { + let angle = optional(&fields, name) + .map(integer) + .transpose()? + .unwrap_or(0) + .rem_euclid(360); + if angle % 90 != 0 { + return Err(error("model rotation must be a multiple of 90")); + } + *target = (angle / 90) as u8; + } + Ok(Self { + model: identifier(&string(required(&fields, "model")?)?)?, + rotations, + uv_lock: optional(&fields, "uvlock") + .map(|v| serde_json::from_str(v.get())) + .transpose()? + .unwrap_or(false), + }) + } +} +impl VariantSet { + fn decode(raw: &RawValue) -> Result { + if !raw.get().starts_with('[') { + return Ok(Self::Single(Variant::decode(raw)?)); + } + let values = array(raw)?; + if values.is_empty() { + return Err(error("empty weighted variants")); + } + let mut total = 0i32; + let entries = values + .into_iter() + .map(|v| { + let fields = object(v)?; + let weight = optional(&fields, "weight") + .map(integer) + .transpose()? + .unwrap_or(1); + if weight <= 0 { + return Err(error("nonpositive variant weight")); + } + total = total + .checked_add(weight) + .ok_or_else(|| error("variant weight overflow"))?; + Ok((Variant::decode(v)?, weight)) + }) + .collect::>>()?; + Ok(Self::Weighted(entries)) + } +} +impl Condition { + fn decode(raw: &RawValue) -> Result { + let fields = object(raw)?; + if fields.len() == 1 { + for name in ["OR", "AND"] { + if let Some(raw) = fields.get(name) { + if let Ok(values) = array(raw).and_then(|values| { + values + .into_iter() + .map(Self::decode) + .collect::>>() + }) { + return Ok(if name == "OR" { + Self::Or(values) + } else { + Self::And(values) + }); + } + } + } + } + if fields.is_empty() { + return Err(error("empty property conditions")); + } + let tests = fields + .into_iter() + .map(|(key, raw)| { + let value = match raw.get().as_bytes().first() { + Some(b'"') => string(raw)?, + Some(b't' | b'f') => raw.get().to_owned(), + _ => integer(raw)?.to_string(), + }; + let terms = value + .split('|') + .map(|v| { + let negated = v.starts_with('!'); + let value = v.strip_prefix('!').unwrap_or(v); + if value.is_empty() { + return Err(error("empty property term")); + } + Ok(Term { + value: value.to_owned(), + negated, + }) + }) + .collect::>>()?; + Ok((key, terms)) + }) + .collect::>()?; + Ok(Self::Properties(tests)) + } +} diff --git a/crates/horizon-assets/src/blockstate/bind.rs b/crates/horizon-assets/src/blockstate/bind.rs new file mode 100644 index 000000000..a55245c11 --- /dev/null +++ b/crates/horizon-assets/src/blockstate/bind.rs @@ -0,0 +1,160 @@ +//! Bind resource selectors to a block's property schema and ordered states. +use super::{BlockStateDefinition, Condition, Term}; +use crate::json::{Result, error}; +use horizon_core::text::parse_java_integer; +use std::collections::{BTreeMap, BTreeSet}; + +pub type Properties = BTreeMap; +pub type PropertySchema = BTreeMap; +#[derive(Clone, Debug)] +pub enum PropertyValues { + Named(BTreeSet), + Integer { minimum: i32, maximum: i32 }, +} +impl PropertyValues { + fn parse(&self, text: &str) -> Option { + match self { + Self::Named(values) => values.contains(text).then(|| text.to_owned()), + Self::Integer { minimum, maximum } => { + let value = parse_java_integer(text)?; + (value >= *minimum && value <= *maximum).then(|| value.to_string()) + } + } + } +} +/// Indices into the original definition. An empty multipart selection is distinct +/// from an absent root: the native root exists but contributes no model parts. +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum SelectedModels { + Variant(usize), + Multipart(Vec), +} +#[derive(Clone, Debug)] +enum BoundCondition { + Or(Vec), + And(Vec), + Properties(BTreeMap>), +} +impl BoundCondition { + fn bind(value: &Condition, schema: &PropertySchema) -> Result { + Ok(match value { + Condition::Or(values) => Self::Or( + values + .iter() + .map(|v| Self::bind(v, schema)) + .collect::>()?, + ), + Condition::And(values) => Self::And( + values + .iter() + .map(|v| Self::bind(v, schema)) + .collect::>()?, + ), + Condition::Properties(values) => Self::Properties( + values + .iter() + .map(|(key, terms)| { + let domain = schema + .get(key) + .ok_or_else(|| error("unknown multipart property"))?; + let terms = terms + .iter() + .map(|t| { + Ok(Term { + value: domain + .parse(&t.value) + .ok_or_else(|| error("unknown multipart property value"))?, + negated: t.negated, + }) + }) + .collect::>()?; + Ok((key.clone(), terms)) + }) + .collect::>()?, + ), + }) + } + fn matches(&self, state: &Properties) -> bool { + match self { + Self::Or(values) => values.iter().any(|v| v.matches(state)), + Self::And(values) => values.iter().all(|v| v.matches(state)), + Self::Properties(values) => values.iter().all(|(key, terms)| { + state + .get(key) + .is_some_and(|value| terms.iter().any(|t| (value == &t.value) ^ t.negated)) + }), + } + } +} +fn variant_predicate(text: &str, schema: &PropertySchema) -> Result { + let mut result = Properties::new(); + for clause in text.split(',') { + let (key, value) = clause + .split_once('=') + .map_or((clause, None), |(k, v)| (k, Some(v))); + if let (Some(domain), Some(value)) = (schema.get(key), value) { + result.insert( + key.to_owned(), + domain + .parse(value) + .ok_or_else(|| error("unknown variant property value"))?, + ); + } else if !key.is_empty() { + return Err(error("unknown or incomplete variant property")); + } + } + Ok(result) +} +impl BlockStateDefinition { + /// `states` must be the block's canonical possible states in native order. + /// Invalid variant selectors are skipped. On overlapping selectors, vanilla + /// replaces the first overlapping state before aborting that selector's walk. + /// Multipart predicates bind eagerly, even when variants cover every state. + pub fn bind( + &self, + schema: &PropertySchema, + states: &[Properties], + ) -> Result>> { + let mut result = vec![None; states.len()]; + if let Some(variants) = &self.variants { + for (index, (key, _)) in variants.iter().enumerate() { + let Ok(predicate) = variant_predicate(key, schema) else { + continue; + }; + for (target, state) in result.iter_mut().zip(states) { + if predicate + .iter() + .all(|(key, value)| state.get(key) == Some(value)) + && target.replace(SelectedModels::Variant(index)).is_some() + { + break; + } + } + } + } + if let Some(selectors) = &self.multipart { + let predicates = selectors + .iter() + .map(|s| { + s.condition + .as_ref() + .map(|v| BoundCondition::bind(v, schema)) + .transpose() + }) + .collect::>>()?; + for (target, state) in result.iter_mut().zip(states) { + if target.is_none() { + let selected = predicates + .iter() + .enumerate() + .filter_map(|(index, p)| { + p.as_ref().is_none_or(|p| p.matches(state)).then_some(index) + }) + .collect(); + *target = Some(SelectedModels::Multipart(selected)); + } + } + } + Ok(result) + } +} diff --git a/crates/horizon-assets/src/blockstate/choice.rs b/crates/horizon-assets/src/blockstate/choice.rs new file mode 100644 index 000000000..93e9a4118 --- /dev/null +++ b/crates/horizon-assets/src/blockstate/choice.rs @@ -0,0 +1,115 @@ +//! Prepared model choices with vanilla random draw consumption. +use super::{BlockStateDefinition, Variant, VariantSet, bind::SelectedModels}; +use crate::json::{Result, error}; +use horizon_core::random::RandomSource; + +#[derive(Clone, Debug)] +enum Choice { + Single(Variant), + Weighted { + variants: Vec, + ends: Vec, + total: i32, + }, +} +impl Choice { + fn new(value: &VariantSet) -> Result { + match value { + VariantSet::Single(value) => Ok(Self::Single(value.clone())), + VariantSet::Weighted(entries) => { + let mut total = 0i32; + let mut ends = Vec::with_capacity(entries.len()); + let mut variants = Vec::with_capacity(entries.len()); + for (variant, weight) in entries { + if *weight <= 0 { + return Err(error("nonpositive model weight")); + } + total = total + .checked_add(*weight) + .ok_or_else(|| error("model weight overflow"))?; + ends.push(total); + variants.push(variant.clone()); + } + if total == 0 { + return Err(error("empty weighted model")); + } + Ok(Self::Weighted { + variants, + ends, + total, + }) + } + } + } + fn select(&self, random: &mut impl RandomSource) -> &Variant { + match self { + Self::Single(value) => value, + Self::Weighted { + variants, + ends, + total, + } => { + // A singleton weighted list still consumes the bounded draw. + let index = random + .next_int_bound(*total) + .expect("validated positive model weight"); + &variants[ends.partition_point(|end| *end <= index)] + } + } + } +} +/// Compile once per definition and share across its bound block states. Prefix +/// sums avoid rebuilding weight totals or scanning all entries during selection. +#[derive(Clone, Debug)] +pub struct CompiledChoices { + variants: Vec, + multipart: Vec, +} +impl CompiledChoices { + pub fn new(definition: &BlockStateDefinition) -> Result { + Ok(Self { + variants: definition + .variants + .iter() + .flatten() + .map(|(_, v)| Choice::new(v)) + .collect::>()?, + multipart: definition + .multipart + .iter() + .flatten() + .map(|s| Choice::new(&s.variant)) + .collect::>()?, + }) + } + /// Append selected variants without allocating intermediate part lists. A + /// multipart root consumes nextLong even for an empty selected subset, then + /// resets the same random source to that seed before each selected part. + pub fn collect<'a>( + &'a self, + selected: &SelectedModels, + random: &mut impl RandomSource, + output: &mut Vec<&'a Variant>, + ) -> Result<()> { + match selected { + SelectedModels::Variant(index) => { + let choice = self + .variants + .get(*index) + .ok_or_else(|| error("invalid variant selection"))?; + output.push(choice.select(random)); + } + SelectedModels::Multipart(indices) => { + if indices.iter().any(|index| *index >= self.multipart.len()) { + return Err(error("invalid multipart selection")); + } + let seed = random.next_long(); + for index in indices { + random.set_seed(seed); + output.push(self.multipart[*index].select(random)); + } + } + } + Ok(()) + } +} diff --git a/crates/horizon-assets/src/json.rs b/crates/horizon-assets/src/json.rs new file mode 100644 index 000000000..32a90d9f5 --- /dev/null +++ b/crates/horizon-assets/src/json.rs @@ -0,0 +1,183 @@ +use serde_json::value::RawValue; +use std::{collections::BTreeMap, fmt}; + +#[derive(Debug)] +pub struct DecodeError(pub(crate) String); + +impl fmt::Display for DecodeError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.write_str(&self.0) + } +} +impl std::error::Error for DecodeError {} +impl From for DecodeError { + fn from(value: serde_json::Error) -> Self { + Self(value.to_string()) + } +} +pub(crate) type Result = std::result::Result; +pub(crate) type Object<'a> = BTreeMap; +pub(crate) fn error(message: &str) -> DecodeError { + DecodeError(message.to_owned()) +} +/// Whether a syntactically valid JSON number is classified as numeric by the +/// native reader. Its wrapping i64 scanner can hit zero after overflow, causing +/// the next integer digit to be rejected as if it followed a leading zero. +pub(crate) fn native_number_token(token: &str) -> bool { + if token.len() >= 1024 { + return false; + } + let mut accumulator = 0i64; + for (index, digit) in token + .trim_start_matches('-') + .bytes() + .take_while(u8::is_ascii_digit) + .enumerate() + { + if index > 0 && accumulator == 0 { + return false; + } + accumulator = accumulator + .wrapping_mul(10) + .wrapping_sub(i64::from(digit - b'0')); + } + true +} +/// Strict stream parsing rejects numeric scanner failures everywhere, including +/// ignored fields. Quoted copies of those tokens remain ordinary strings. +pub(crate) fn validate_number_tokens(raw: &RawValue) -> Result<()> { + let text = raw.get(); + let mut quoted = false; + let mut escaped = false; + let mut start = None; + for (index, byte) in text.bytes().enumerate() { + if quoted { + if escaped { + escaped = false; + } else if byte == b'\\' { + escaped = true; + } else if byte == b'"' { + quoted = false; + } + continue; + } + if let Some(begin) = start { + if byte.is_ascii_digit() || b"-.eE+".contains(&byte) { + continue; + } + if !native_number_token(&text[begin..index]) { + return Err(error("native reader rejects numeric token")); + } + start = None; + } + if byte == b'"' { + quoted = true; + } else if byte.is_ascii_digit() || byte == b'-' { + start = Some(index); + } + } + if start.is_some_and(|begin| !native_number_token(&text[begin..])) { + return Err(error("native reader rejects numeric token")); + } + Ok(()) +} +pub(crate) fn object(raw: &RawValue) -> Result> { + if !raw.get().starts_with('{') { + return Err(error("expected object")); + } + Ok(serde_json::from_str(raw.get())?) +} +pub(crate) fn array(raw: &RawValue) -> Result> { + Ok(serde_json::from_str(raw.get())?) +} +pub(crate) fn required<'a>(object: &Object<'a>, key: &str) -> Result<&'a RawValue> { + object + .get(key) + .copied() + .ok_or_else(|| error(&format!("missing {key}"))) +} +pub(crate) fn string(raw: &RawValue) -> Result { + Ok(serde_json::from_str(raw.get())?) +} +/// Gson's string helper accepts any primitive and preserves a number's spelling. +pub(crate) fn primitive_string(raw: &RawValue) -> Result { + match raw.get().as_bytes().first() { + Some(b'"') => string(raw), + Some(b't' | b'f' | b'-' | b'0'..=b'9') => Ok(raw.get().to_owned()), + _ => Err(error("expected primitive")), + } +} +pub(crate) fn boolean(raw: &RawValue) -> Result { + Ok(primitive_string(raw)?.eq_ignore_ascii_case("true")) +} +fn number(raw: &RawValue) -> Result<&str> { + match raw.get().as_bytes().first() { + Some(b'-' | b'0'..=b'9') => Ok(raw.get()), + _ => Err(error("expected number")), + } +} +pub(crate) fn float(raw: &RawValue) -> Result { + number(raw)?.parse().map_err(|_| error("invalid float")) +} +/// Gson LazilyParsedNumber.intValue truncates decimals then keeps the low 32 bits. +/// Work on decimal digits, avoiding f64 rounding and saturating Rust casts. +pub(crate) fn integer(raw: &RawValue) -> Result { + let raw = number(raw)?; + if raw.len() > 10_000 { + return Err(error("number string too long")); + } + let negative = raw.starts_with('-'); + let raw = raw.strip_prefix('-').unwrap_or(raw); + let (mantissa, exponent) = raw.split_once(['e', 'E']).unwrap_or((raw, "0")); + let exponent: i32 = exponent.parse().map_err(|_| error("invalid exponent"))?; + let fractional = mantissa.split_once('.').map_or(0, |(_, f)| f.len()); + let scale = + i64::try_from(fractional).map_err(|_| error("number too long"))? - i64::from(exponent); + if scale.abs() >= 10_000 { + return Err(error("unsupported decimal scale")); + } + let digits = mantissa.bytes().filter(|c| *c != b'.'); + let count = mantissa.len() - usize::from(mantissa.contains('.')); + let take = (count as i64 - scale.max(0)).max(0) as usize; + let mut value = 0u32; + for digit in digits.take(take) { + value = value.wrapping_mul(10).wrapping_add(u32::from(digit - b'0')); + } + if scale < 0 { + // 10^32 and larger are divisible by 2^32. + value = if scale <= -32 { + 0 + } else { + value.wrapping_mul(10u32.wrapping_pow((-scale) as u32)) + }; + } + Ok(if negative { + value.wrapping_neg() + } else { + value + } as i32) +} +pub(crate) fn vector(raw: &RawValue) -> Result<[f32; N]> { + let values = array(raw)?; + if values.len() != N { + return Err(error("wrong vector length")); + } + let mut result = [0.0; N]; + for (target, value) in result.iter_mut().zip(values) { + *target = float(value)?; + } + Ok(result) +} +pub(crate) fn identifier(name: &str) -> Result { + let (namespace, path) = name.split_once(':').unwrap_or(("minecraft", name)); + let namespace = if namespace.is_empty() { + "minecraft" + } else { + namespace + }; + let valid = |c: u8| c.is_ascii_lowercase() || c.is_ascii_digit() || b"_.-".contains(&c); + if !namespace.bytes().all(valid) || !path.bytes().all(|c| valid(c) || c == b'/') { + return Err(error("invalid resource identifier")); + } + Ok(format!("{namespace}:{path}")) +} diff --git a/crates/horizon-assets/src/lib.rs b/crates/horizon-assets/src/lib.rs new file mode 100644 index 000000000..e52fe3a32 --- /dev/null +++ b/crates/horizon-assets/src/lib.rs @@ -0,0 +1,11 @@ +//! Resource decoding for the pinned Java Edition client. +#![forbid(unsafe_code)] + +pub mod animation; +pub mod bake; +pub mod blockstate; +mod json; +pub mod model; +pub mod resolve; + +pub use json::DecodeError; diff --git a/crates/horizon-assets/src/model.rs b/crates/horizon-assets/src/model.rs new file mode 100644 index 000000000..2e55f9a0f --- /dev/null +++ b/crates/horizon-assets/src/model.rs @@ -0,0 +1,394 @@ +//! The 26.3 cuboid model format, before parent resolution and quad baking. +//! +//! Absent geometry differs from an explicit empty element list. Explicit null +//! elements, faces and display transforms are retained as the native decoder +//! does; render preparation must diagnose these before baking. +use crate::json::*; +use serde_json::value::RawValue; +use std::collections::BTreeMap; + +#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)] +pub enum Direction { + Down, + Up, + North, + South, + West, + East, +} +impl Direction { + pub const ALL: [Self; 6] = [ + Self::Down, + Self::Up, + Self::North, + Self::South, + Self::West, + Self::East, + ]; + pub fn name(self) -> &'static str { + match self { + Self::Down => "down", + Self::Up => "up", + Self::North => "north", + Self::South => "south", + Self::West => "west", + Self::East => "east", + } + } + pub fn by_name(name: &str) -> Option { + Self::ALL + .into_iter() + .find(|direction| direction.name() == name) + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GuiLight { + Front, + Side, +} +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Material { + pub sprite: String, + pub force_translucent: bool, +} +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum TextureSlot { + Reference(String), + Material(Material), +} +#[derive(Clone, Debug, PartialEq)] +pub struct CuboidModel { + pub parent: Option, + pub ambient_occlusion: Option, + pub gui_light: Option, + pub textures: BTreeMap, + pub elements: Option>>, + pub display: Option, +} +#[derive(Clone, Debug, PartialEq)] +pub struct Element { + pub from: [f32; 3], + pub to: [f32; 3], + pub faces: BTreeMap>, + pub rotation: Option, + pub shade_direction_override: Option, + pub light_emission: u8, +} +#[derive(Clone, Debug, PartialEq)] +pub struct Face { + pub cull: Option, + pub tint_index: i32, + pub texture: String, + pub uv: Option<[f32; 4]>, + /// Normalized counterclockwise quadrants, in the range 0..4. + pub rotation: u8, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Axis { + X, + Y, + Z, +} +#[derive(Clone, Debug, PartialEq)] +pub enum RotationValue { + SingleAxis { axis: Axis, angle: f32 }, + EulerXyz([f32; 3]), +} +#[derive(Clone, Debug, PartialEq)] +pub struct ElementRotation { + /// Block units, converted from model coordinates during decoding. + pub origin: [f32; 3], + pub value: RotationValue, + pub rescale: bool, +} +#[derive(Clone, Debug, PartialEq)] +pub struct ItemTransform { + pub rotation: [f32; 3], + pub translation: [f32; 3], + pub scale: [f32; 3], +} +/// Missing transforms inherit later. Explicit identity and null values do not. +#[derive(Clone, Debug, PartialEq)] +pub enum DisplayTransform { + Inherit, + Explicit(Option), +} +pub const DISPLAY_CONTEXTS: [&str; 9] = [ + "thirdperson_lefthand", + "thirdperson_righthand", + "firstperson_lefthand", + "firstperson_righthand", + "head", + "gui", + "ground", + "fixed", + "on_shelf", +]; +#[derive(Clone, Debug, PartialEq)] +pub struct ItemTransforms { + pub contexts: [DisplayTransform; 9], +} + +impl CuboidModel { + /// Decode strict JSON, preserving the native parser's primitive coercions, + /// optional inheritance fields, nullable children and f32 conversion. + /// Like the native stream entry point, this reads one value and leaves + /// trailing input unread. The pinned native entry point uses strict JSON. + pub fn from_json(json: &str) -> Result { + let raw = serde_json::Deserializer::from_str(json.strip_prefix('\u{feff}').unwrap_or(json)) + .into_iter::<&RawValue>() + .next() + .ok_or_else(|| error("empty model input"))??; + validate_number_tokens(raw)?; + Self::decode(raw) + } + fn decode(raw: &RawValue) -> Result { + let obj = object(raw)?; + let parent = obj + .get("parent") + .map(|r| primitive_string(r)) + .transpose()? + .unwrap_or_default(); + let parent = if parent.is_empty() { + None + } else { + Some(identifier(&parent)?) + }; + let ambient_occlusion = obj + .get("ambientocclusion") + .map(|r| boolean(r)) + .transpose()?; + let gui_light = obj + .get("gui_light") + .map(|raw| match primitive_string(raw)?.as_str() { + "front" => Ok(GuiLight::Front), + "side" => Ok(GuiLight::Side), + _ => Err(error("invalid gui light")), + }) + .transpose()?; + let mut textures = BTreeMap::new(); + if let Some(raw) = obj.get("textures") { + for (key, raw) in object(raw)? { + textures.insert(key, texture(raw)?); + } + } + let elements = obj + .get("elements") + .map(|raw| { + array(raw)? + .into_iter() + .map(|raw| nullable(raw, Element::decode)) + .collect::>>() + }) + .transpose()?; + let display = obj + .get("display") + .map(|r| ItemTransforms::decode(r)) + .transpose()?; + Ok(Self { + parent, + ambient_occlusion, + gui_light, + textures, + elements, + display, + }) + } +} +fn nullable(raw: &RawValue, decode: impl FnOnce(&RawValue) -> Result) -> Result> { + if raw.get() == "null" { + Ok(None) + } else { + decode(raw).map(Some) + } +} +fn texture(raw: &RawValue) -> Result { + if raw.get().starts_with('"') { + let name = string(raw)?; + if name.is_empty() { + return Err(error("empty texture slot value")); + } + if let Some(target) = name.strip_prefix('#') { + return Ok(TextureSlot::Reference(target.to_owned())); + } + return Ok(TextureSlot::Material(Material { + sprite: identifier(&name)?, + force_translucent: false, + })); + } + let obj = object(raw)?; + let sprite = identifier(&string(required(&obj, "sprite")?)?)?; + let force_translucent = match obj.get("force_translucent") { + None => false, + Some(raw) if raw.get() == "null" => false, + Some(raw) if raw.get() == "true" => true, + Some(raw) if raw.get() == "false" => false, + Some(_) => return Err(error("invalid material boolean")), + }; + Ok(TextureSlot::Material(Material { + sprite, + force_translucent, + })) +} +impl Element { + fn decode(raw: &RawValue) -> Result { + let obj = object(raw)?; + let from = vector(required(&obj, "from")?)?; + let to = vector(required(&obj, "to")?)?; + if from.iter().chain(&to).any(|v| !(-16.0..=32.0).contains(v)) { + return Err(error("element outside model bounds")); + } + let rotation = obj + .get("rotation") + .map(|r| ElementRotation::decode(r)) + .transpose()?; + let mut faces = BTreeMap::new(); + for (name, raw) in object(required(&obj, "faces")?)? { + let direction = + Direction::by_name(&name).ok_or_else(|| error("invalid face direction"))?; + faces.insert(direction, nullable(raw, Face::decode)?); + } + if faces.is_empty() { + return Err(error("element requires a face")); + } + let shade_direction_override = obj + .get("shade_direction_override") + .map(|raw| { + Direction::by_name(&primitive_string(raw)?) + .ok_or_else(|| error("invalid shade direction")) + }) + .transpose()?; + let light_emission = obj + .get("light_emission") + .map(|r| integer(r)) + .transpose()? + .unwrap_or(0); + if !(0..=15).contains(&light_emission) { + return Err(error("invalid light emission")); + } + Ok(Self { + from, + to, + faces, + rotation, + shade_direction_override, + light_emission: light_emission as u8, + }) + } +} +impl Face { + fn decode(raw: &RawValue) -> Result { + let obj = object(raw)?; + let cull = obj + .get("cullface") + .map(|r| primitive_string(r)) + .transpose()? + .and_then(|s| Direction::by_name(&s)); + let texture = primitive_string(required(&obj, "texture")?)?; + let tint_index = obj + .get("tintindex") + .map(|r| integer(r)) + .transpose()? + .unwrap_or(-1); + let rotation = obj + .get("rotation") + .map(|r| integer(r)) + .transpose()? + .unwrap_or(0) + .rem_euclid(360); + if rotation % 90 != 0 { + return Err(error("face rotation must be a multiple of 90")); + } + let uv = obj.get("uv").map(|r| vector(r)).transpose()?; + Ok(Self { + cull, + tint_index, + texture, + uv, + rotation: (rotation / 90) as u8, + }) + } +} +impl ElementRotation { + fn decode(raw: &RawValue) -> Result { + let obj = object(raw)?; + let origin = vector::<3>(required(&obj, "origin")?)?.map(|v| v * 0.0625); + let value = if obj.contains_key("axis") || obj.contains_key("angle") { + let axis = match primitive_string(required(&obj, "axis")?)? + .to_lowercase() + .as_str() + { + "x" => Axis::X, + "y" => Axis::Y, + "z" => Axis::Z, + _ => return Err(error("invalid rotation axis")), + }; + RotationValue::SingleAxis { + axis, + angle: float(required(&obj, "angle")?)?, + } + } else if ["x", "y", "z"].iter().any(|key| obj.contains_key(*key)) { + let mut angles = [0.0; 3]; + for (angle, key) in angles.iter_mut().zip(["x", "y", "z"]) { + *angle = obj.get(key).map(|r| float(r)).transpose()?.unwrap_or(0.0); + } + RotationValue::EulerXyz(angles) + } else { + return Err(error("missing rotation value")); + }; + let rescale = obj + .get("rescale") + .map(|r| boolean(r)) + .transpose()? + .unwrap_or(false); + Ok(Self { + origin, + value, + rescale, + }) + } +} +impl ItemTransform { + fn decode(raw: &RawValue) -> Result { + let obj = object(raw)?; + let rotation = obj + .get("rotation") + .map(|r| vector(r)) + .transpose()? + .unwrap_or([0.0; 3]); + let translation = obj + .get("translation") + .map(|r| vector(r)) + .transpose()? + .unwrap_or([0.0; 3]) + .map(|v| (v * 0.0625).clamp(-5.0, 5.0)); + let scale = obj + .get("scale") + .map(|r| vector(r)) + .transpose()? + .unwrap_or([1.0; 3]) + .map(|v| v.clamp(-4.0, 4.0)); + Ok(Self { + rotation, + translation, + scale, + }) + } +} +impl ItemTransforms { + fn decode(raw: &RawValue) -> Result { + let obj = object(raw)?; + let mut contexts = std::array::from_fn(|_| DisplayTransform::Inherit); + for (transform, key) in contexts.iter_mut().zip(DISPLAY_CONTEXTS) { + if let Some(raw) = obj.get(key) { + *transform = DisplayTransform::Explicit(nullable(raw, ItemTransform::decode)?); + } + } + for (left, right) in [(0, 1), (2, 3)] { + if contexts[left] == DisplayTransform::Inherit { + contexts[left] = contexts[right].clone(); + } + } + Ok(Self { contexts }) + } +} diff --git a/crates/horizon-assets/src/resolve.rs b/crates/horizon-assets/src/resolve.rs new file mode 100644 index 000000000..ca601f0cc --- /dev/null +++ b/crates/horizon-assets/src/resolve.rs @@ -0,0 +1,243 @@ +//! Cuboid parent inheritance and texture-slot resolution. +use crate::{json::*, model::*}; +use std::{ + collections::{BTreeMap, BTreeSet}, + sync::Arc, +}; + +pub const MISSING_MODEL: &str = "minecraft:builtin/missing"; + +/// Decoded models are immutable and their inherited geometry is shared. +pub struct ModelLibrary { + models: BTreeMap>, + missing: Arc, +} +#[derive(Clone, Debug)] +pub struct ResolvedCuboidModel { + pub ambient_occlusion: bool, + pub gui_light: GuiLight, + pub display: ItemTransforms, + pub textures: BTreeMap, + /// Cyclic and dangling aliases are absent from `textures`. + pub unresolved_textures: BTreeSet, + geometry: Option>, +} +impl ResolvedCuboidModel { + pub fn elements(&self) -> &[Option] { + self.geometry + .as_ref() + .and_then(|m| m.elements.as_deref()) + .unwrap_or(&[]) + } + /// Native slot lookup strips a single leading '#'. Non-reference names + /// are still slot names, not direct sprite identifiers. + pub fn material(&self, slot: &str) -> Result> { + if slot.is_empty() { + return Err(error("empty texture lookup")); + } + Ok(self.textures.get(slot.strip_prefix('#').unwrap_or(slot))) + } +} +impl ModelLibrary { + pub fn new(models: BTreeMap) -> Result { + let mut decoded = BTreeMap::new(); + for (name, model) in models { + if decoded + .insert(identifier(&name)?, Arc::new(model)) + .is_some() + { + return Err(error("duplicate normalized model identifier")); + } + } + let missing = Arc::new(missing_model()); + // The native discovery registers this built-in before consulting resources. + decoded.insert(MISSING_MODEL.to_owned(), missing.clone()); + Ok(Self { + models: decoded, + missing, + }) + } + /// Follow the complete parent chain. A missing resource uses the built-in + /// model; a cyclic chain is rejected, as native discovery excludes it. + /// The returned model can outlive this library without copying its elements. + pub fn resolve(&self, name: &str) -> Result { + let mut name = identifier(name)?; + let mut visited = BTreeSet::new(); + let mut chain = Vec::new(); + loop { + if !visited.insert(name.clone()) { + return Err(error("cyclic model parent")); + } + let model = self.models.get(&name).unwrap_or(&self.missing); + chain.push(model); + match &model.parent { + Some(parent) => name = parent.clone(), + None => break, + } + } + let ambient_occlusion = chain + .iter() + .find_map(|m| m.ambient_occlusion) + .unwrap_or(true); + let gui_light = chain + .iter() + .find_map(|m| m.gui_light) + .unwrap_or(GuiLight::Side); + let geometry = chain + .iter() + .find(|m| m.elements.is_some()) + .map(|m| Arc::clone(m)); + let display = ItemTransforms { + contexts: std::array::from_fn(|index| { + chain + .iter() + .filter_map(|m| m.display.as_ref()) + .map(|d| &d.contexts[index]) + .find(|t| **t != DisplayTransform::Inherit) + .cloned() + .unwrap_or(DisplayTransform::Inherit) + }), + }; + // Resolve aliases only after applying every child override. A reference + // inherited from a parent binds to the child's final slot definition. + let mut slots = BTreeMap::new(); + for model in chain.into_iter().rev() { + slots.extend(model.textures.iter().map(|(k, v)| (k.clone(), v))); + } + let mut textures = BTreeMap::::new(); + let mut unresolved_textures = BTreeSet::::new(); + for start in slots.keys() { + let mut current = start.as_str(); + let mut seen = BTreeSet::new(); + let mut path = Vec::new(); + let material = loop { + if let Some(material) = textures.get(current) { + break Some(material.clone()); + } + if unresolved_textures.contains(current) || !seen.insert(current) { + break None; + } + let Some(slot) = slots.get(current) else { + break None; + }; + path.push(current); + match slot { + TextureSlot::Reference(target) => current = target, + TextureSlot::Material(material) => break Some(material.clone()), + } + }; + // Cache the entire walk, including failures, so long alias chains + // and cycles are traversed once rather than once per referencing slot. + match material { + Some(material) => { + for name in path { + textures.insert(name.to_owned(), material.clone()); + } + } + None => { + unresolved_textures.extend(path.into_iter().map(str::to_owned)); + } + } + } + Ok(ResolvedCuboidModel { + ambient_occlusion, + gui_light, + display, + textures, + unresolved_textures, + geometry, + }) + } +} + +/// The native missing-model cube uses slot names without a leading '#'. +pub fn missing_model() -> CuboidModel { + let faces = Direction::ALL + .into_iter() + .map(|direction| { + ( + direction, + Some(Face { + cull: Some(direction), + tint_index: -1, + texture: "missingno".to_owned(), + uv: Some([0.0, 0.0, 16.0, 16.0]), + rotation: 0, + }), + ) + }) + .collect(); + CuboidModel { + parent: None, + ambient_occlusion: None, + gui_light: None, + elements: Some(vec![Some(Element { + from: [0.0; 3], + to: [16.0; 3], + faces, + rotation: None, + shade_direction_override: None, + light_emission: 0, + })]), + display: Some(ItemTransforms { + contexts: std::array::from_fn(|_| DisplayTransform::Inherit), + }), + textures: BTreeMap::from([ + ( + "particle".to_owned(), + TextureSlot::Reference("missingno".to_owned()), + ), + ( + "missingno".to_owned(), + TextureSlot::Material(Material { + sprite: "minecraft:missingno".to_owned(), + force_translucent: false, + }), + ), + ]), + } +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn inherited_alias_uses_child_material_and_geometry_outlives_library() { + let parent = CuboidModel::from_json(r##"{"textures":{"side":"#all","all":"block/stone"},"elements":[{"from":[0,0,0],"to":[16,8,16],"faces":{"up":{"texture":"#side"}}}]}"##).unwrap(); + let child = CuboidModel::from_json(r#"{"parent":"horizon:parent","textures":{"all":{"sprite":"block/glass","force_translucent":true}}}"#).unwrap(); + let library = ModelLibrary::new(BTreeMap::from([ + ("horizon:parent".into(), parent), + ("horizon:child".into(), child), + ])) + .unwrap(); + let model = library.resolve("horizon:child").unwrap(); + drop(library); + assert_eq!(model.elements()[0].as_ref().unwrap().to, [16.0, 8.0, 16.0]); + assert_eq!( + model.material("#side").unwrap().unwrap(), + &Material { + sprite: "minecraft:block/glass".into(), + force_translucent: true + } + ); + } + #[test] + fn absent_parents_fall_back_but_cycles_invalidate_descendants() { + let a = CuboidModel::from_json(r#"{"parent":"horizon:b"}"#).unwrap(); + let b = CuboidModel::from_json(r#"{"parent":"horizon:a"}"#).unwrap(); + let child = CuboidModel::from_json(r#"{"parent":"horizon:a","elements":[]}"#).unwrap(); + let library = ModelLibrary::new(BTreeMap::from([ + ("horizon:a".into(), a), + ("horizon:b".into(), b), + ("horizon:child".into(), child), + ])) + .unwrap(); + assert!(library.resolve("horizon:child").is_err()); + let absent = library.resolve("horizon:absent").unwrap(); + assert_eq!(absent.elements().len(), 1); + assert_eq!( + absent.material("particle").unwrap().unwrap().sprite, + "minecraft:missingno" + ); + } +} diff --git a/crates/horizon-client/Cargo.toml b/crates/horizon-client/Cargo.toml new file mode 100644 index 000000000..4da5f8513 --- /dev/null +++ b/crates/horizon-client/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "horizon-client" +default-run = "horizon-client" +version = "0.1.0" +edition.workspace = true +license.workspace = true +rust-version = "1.90" +description = "Horizon native development client" + +[dependencies] +horizon-assets = { path = "../horizon-assets" } +horizon-core = { path = "../horizon-core" } +horizon-world = { path = "../horizon-world" } +wgpu = { version = "30.0.1", default-features = false, features = ["std", "parking_lot", "vulkan", "metal", "wgsl"] } +winit = "0.30.13" +pollster = "0.4" +bytemuck = { version = "1.24", features = ["derive"] } +glam = "0.30" +png = "0.18" +serde_json = { version = "1.0.151", features = ["raw_value"] } +cpal = "0.16" +symphonia = { version = "0.5", default-features = false, features = ["ogg", "vorbis"] } diff --git a/crates/horizon-client/examples/input_probe.rs b/crates/horizon-client/examples/input_probe.rs new file mode 100644 index 000000000..b628bce5d --- /dev/null +++ b/crates/horizon-client/examples/input_probe.rs @@ -0,0 +1,43 @@ +#![forbid(unsafe_code)] +use horizon_client::{Result, input}; +use serde_json::Value; +use std::{ + fs::File, + io::{BufRead, BufReader, BufWriter, Write}, +}; +fn number(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { 0x7fc00000 } else { v.to_bits() } +} +fn main() -> Result<()> { + let args: Vec<_> = std::env::args().skip(1).collect(); + let mut out = BufWriter::new(File::create(&args[1])?); + for line in BufReader::new(File::open(&args[0])?).lines() { + let f: Value = serde_json::from_str(&line?)?; + let keys = f["keys"].as_u64().unwrap(); + let direction = + input::keyboard_direction(keys & 1 != 0, keys & 2 != 0, keys & 4 != 0, keys & 8 != 0); + let vector = if f["vector"].is_null() { + direction + } else { + [number(&f["vector"][0]), number(&f["vector"][1])] + }; + let result = input::modify_input( + vector, + (f["using"].as_bool().unwrap() && !f["riding"].as_bool().unwrap()) + .then(|| number(&f["item"])), + f["slow"].as_bool().unwrap().then(|| number(&f["sneak"])), + ); + writeln!( + out, + "{:08x} {:08x} {:08x} {:08x}", + bits(direction[0]), + bits(direction[1]), + bits(result[0]), + bits(result[1]) + )?; + } + Ok(()) +} diff --git a/crates/horizon-client/examples/scene_collision_probe.rs b/crates/horizon-client/examples/scene_collision_probe.rs new file mode 100644 index 000000000..f1a0696de --- /dev/null +++ b/crates/horizon-client/examples/scene_collision_probe.rs @@ -0,0 +1,76 @@ +//! Headless transport exercising the actual client resource loader and chunks. +#![forbid(unsafe_code)] +use horizon_client::{assets, collisions, world}; +use horizon_core::geometry::{Aabb, Vec3}; +use serde_json::Value; +use std::{ + fs, + io::{BufRead, Write}, + path::PathBuf, +}; +type Result = std::result::Result>; + +fn vector(value: &Value) -> Result { + let a = value + .as_array() + .filter(|v| v.len() == 3) + .ok_or("expected vector")?; + let number = |i: usize| -> Result { + Ok(f64::from_bits(u64::from_str_radix( + a[i].as_str().ok_or("expected double bits")?, + 16, + )?)) + }; + Ok(Vec3::new(number(0)?, number(1)?, number(2)?)) +} +fn main() -> Result<()> { + let args: Vec<_> = std::env::args().skip(1).collect(); + if args.len() != 3 { + return Err("usage: scene_collision_probe RESOURCES FIXTURE_DIRECTORY RADIUS".into()); + } + let resources = PathBuf::from(&args[0]); + let dir = PathBuf::from(&args[1]); + let radius: i32 = args[2].parse()?; + if !(1..=16).contains(&radius) { + return Err("radius must be 1..16".into()); + } + let assets = assets::Assets::load(&resources)?; + let world = world::TestWorld::new(&assets, radius)?; + let binding = collisions::load(&resources, &assets.registry)?; + let mut scene = collisions::SceneCollisions { + world: &world, + binding: &binding, + }; + fs::write( + dir.join("scene.json"), + serde_json::to_vec(&serde_json::json!({ + "radius":radius,"resident_chunks":world.chunks.len(),"model_gallery":assets.model_gallery, + }))?, + )?; + let mut output = std::io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in std::io::BufReader::new(fs::File::open(dir.join("inputs.txt"))?).lines() { + let f: Value = serde_json::from_str(&line?)?; + let bounds = Aabb::new(vector(&f["min"])?, vector(&f["max"])?); + let delta = vector(&f["delta"])?; + let step = f32::from_bits(u32::from_str_radix( + f["step"].as_str().ok_or("expected step bits")?, + 16, + )?); + let movement = scene.resolve( + bounds, + delta, + step, + f["grounded"].as_bool().ok_or("expected grounded flag")?, + )?; + writeln!( + output, + "move {:016x} {:016x} {:016x} clear {} {}", + movement.x.to_bits(), + movement.y.to_bits(), + movement.z.to_bits(), + scene.unobstructed(bounds)?, + scene.unobstructed(bounds.move_by(movement))? + )?; + } + Ok(()) +} diff --git a/crates/horizon-client/examples/scene_motion_probe.rs b/crates/horizon-client/examples/scene_motion_probe.rs new file mode 100644 index 000000000..388d47e2a --- /dev/null +++ b/crates/horizon-client/examples/scene_motion_probe.rs @@ -0,0 +1,552 @@ +//! Repeated movement over the same owned actor and resident scene as the client. +#![forbid(unsafe_code)] +use horizon_client::{ + Result, + assets::Assets, + collisions, + motion::{MotionEvent, MotionResources, MotionWorld, PlayerMotion}, + world::TestWorld, +}; +use horizon_core::geometry::Vec3; +use horizon_core::{position::BlockPos, random::RandomSource}; +use horizon_world::attributes::{Modifier, Operation}; +use horizon_world::movement_statistics::{self, MovementStat, MovementStatisticsWorld}; +use serde_json::Value; +use std::{ + fs, + io::{BufRead, Write}, + path::PathBuf, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vector(v: &Value) -> Vec3 { + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])) +} +fn position(p: Option) -> String { + p.map_or_else(|| "none".into(), |p| format!("{},{},{}", p.x, p.y, p.z)) +} +struct StatisticsContext<'a> { + flags: u16, + invulnerable: bool, + player: &'a mut PlayerMotion, +} +impl StatisticsContext<'_> { + fn flag(&self, bit: u32) -> Result { + Ok(self.flags & (1 << bit) != 0) + } +} +impl MovementStatisticsWorld for StatisticsContext<'_> { + type Error = Box; + fn passenger(&mut self) -> Result { + self.flag(0) + } + fn swimming(&mut self) -> Result { + self.flag(1) + } + fn eyes_in_water(&mut self) -> Result { + self.flag(2) + } + fn in_water(&mut self) -> Result { + self.flag(3) + } + fn on_climbable(&mut self) -> Result { + self.flag(4) + } + fn on_ground(&mut self) -> Result { + self.flag(5) + } + fn sprinting(&mut self) -> Result { + self.flag(6) + } + fn crouching(&mut self) -> Result { + self.flag(7) + } + fn fall_flying(&mut self) -> Result { + self.flag(8) + } + fn award(&mut self, stat: MovementStat, amount: i32) -> Result<()> { + self.player.events.push(MotionEvent::Health( + horizon_client::health::HealthEvent::Statistic { + name: stat.name(), + amount, + }, + )); + Ok(()) + } + fn exhaust(&mut self, amount: f32) -> Result<()> { + if !self.invulnerable { + self.player.health.food.add_exhaustion(amount); + } + Ok(()) + } +} +fn snapshot(out: &mut impl Write, player: &PlayerMotion) -> Result<()> { + // Compare membership and stored values without allocating lazy instances or + // evaluating computed values. Runtime identity hashes differ between VMs. + let mut attributes = Vec::new(); + for (handle, key, value) in player.attributes.instances() { + let mut modifiers: Vec<_> = value + .modifiers() + .iter() + .map(|m| { + format!( + "{}:{:016x}:{}:{}", + m.id(), + m.amount().to_bits(), + m.operation() as u8, + value.permanent_modifiers().iter().any(|p| p.id() == m.id()) + ) + }) + .collect(); + modifiers.sort(); + attributes.push(format!( + "{}:{:016x}:{}:{:016x}:{}:{}:[{}]", + key.name(), + value.base_value().to_bits(), + value.is_dirty(), + value.cached_value().to_bits(), + player.attributes.updates().contains(Some(handle)), + player.attributes.sync().contains(Some(handle)), + modifiers.join(",") + )); + } + attributes.sort(); + for v in [ + player.position, + player.velocity, + player.bounds().min_position(), + player.bounds().max_position(), + ] { + write!( + out, + "{:016x} {:016x} {:016x} ", + v.x.to_bits(), + v.y.to_bits(), + v.z.to_bits() + )?; + } + writeln!( + out, + "{} {} {} {} {} {} {} {:016x} {} {} {} {:08x} {} {:08x} {} {} {} | {}", + player.collision.horizontal, + player.collision.vertical, + player.collision.below, + player.collision.minor, + player.ground.on_ground, + player.ground.on_ground_no_blocks, + position(player.ground.supporting_block), + player.fall_distance.to_bits(), + position(player.last_climbable), + player.needs_sync, + player.sync_position, + player.speed.to_bits(), + player.no_jump_delay, + player.head_yaw.to_bits(), + player.jump_trigger_time, + player.impulse.reset_grace_time, + player.impulse.impact_position.map_or_else( + || "none".into(), + |p| format!( + "{:016x},{:016x},{:016x}", + p.x.to_bits(), + p.y.to_bits(), + p.z.to_bits() + ) + ), + attributes.join(";") + )?; + let events: Vec<_> = player + .events + .iter() + .filter_map(|e| match e { + MotionEvent::Fall(e) => Some(e.trace()), + MotionEvent::Health(e) => Some(e.trace()), + MotionEvent::Waypoint { receiver, enabled } => Some(format!( + "waypoint {} {enabled}", + if *receiver { "receive" } else { "transmit" } + )), + _ => None, + }) + .collect(); + writeln!(out, "events {}", events.join(" | "))?; + Ok(()) +} +fn main() -> Result<()> { + let args: Vec<_> = std::env::args().skip(1).collect(); + if args.len() != 3 { + return Err( + "usage: scene_motion_probe RESOURCES FIXTURE_DIRECTORY --describe|REFERENCE".into(), + ); + } + let root = PathBuf::from(&args[0]); + let dir = PathBuf::from(&args[1]); + let assets = Assets::load(&root)?; + let mut scene = TestWorld::new(&assets, 1)?; + let binding = collisions::load(&root, &assets.registry)?; + let resources = MotionResources::load(&root, &assets)?; + fs::write( + dir.join("scene.json"), + serde_json::to_vec( + &serde_json::json!({"radius":1,"resident_chunks":scene.chunks.len(),"model_gallery":assets.model_gallery}), + )?, + )?; + if args[2] == "--describe" { + return Ok(()); + } + let side = &args[2]; + let mut out = std::io::BufWriter::new(fs::File::create(dir.join(format!("rust-{side}.txt")))?); + for line in + std::io::BufReader::new(fs::File::open(dir.join(format!("inputs-{side}.txt")))?).lines() + { + let f: Value = serde_json::from_str(&line?)?; + scene.health_rules = horizon_client::health::HealthRules::default(); + let hashes: Vec<_> = resources + .attributes + .attributes() + .map(|(_, a)| { + f["holder_hashes"][&a.name] + .as_i64() + .expect("missing holder identity") as i32 + }) + .collect(); + let mut instances = f["instance_hashes"] + .as_array() + .ok_or("missing instance identities")? + .iter() + .map(|v| v.as_i64().unwrap() as i32) + .collect::>() + .into_iter(); + let count = instances.len(); + let used = std::rc::Rc::new(std::cell::Cell::new(0)); + let counter = used.clone(); + let mut player = PlayerMotion::with_attribute_identities( + &resources, + vector(&f["position"]), + &hashes, + Box::new(move || { + counter.set(counter.get() + 1); + instances.next().expect("unexpected instance allocation") + }), + )?; + for op in f["ops"].as_array().unwrap() { + let mut world = MotionWorld { + player: &mut player, + scene: &mut scene, + assets: &assets, + collision_binding: &binding, + resources: &resources, + }; + match op["mode"].as_str().unwrap() { + "shift" => world.player.shift_key_down = op["value"].as_bool().unwrap(), + "pose_tick" => world.update_player_pose()?, + "refresh_dimensions" => world.player.refresh_dimensions()?, + "refresh_attributes" => world.player.refresh_attributes()?, + "pose" => world.player.set_pose(match op["value"].as_str().unwrap() { + "STANDING" => horizon_client::pose::Pose::Standing, + "CROUCHING" => horizon_client::pose::Pose::Crouching, + "SWIMMING" => horizon_client::pose::Pose::Swimming, + _ => return Err("unknown fixture pose".into()), + })?, + "controlled_tick" => { + let mask = op["value"].as_u64().unwrap(); + world.controlled_simulation_tick(horizon_client::sprint::Keys { + forward: mask & 1 != 0, + backward: mask & 2 != 0, + left: mask & 4 != 0, + right: mask & 8 != 0, + jump: mask & 16 != 0, + shift: mask & 32 != 0, + sprint: mask & 64 != 0, + })?; + } + "movement_statistics" => world.check_movement_statistics(vector(&op["value"]))?, + "statistics_context" => movement_statistics::check( + &mut StatisticsContext { + player: world.player, + flags: op["flags"].as_u64().unwrap() as u16, + invulnerable: op["invulnerable"].as_bool().unwrap(), + }, + vector(&op["value"]), + )?, + "tick_count" => { + world.player.health.tick_count = op["value"].as_i64().unwrap() as i32 + } + "rules" => { + world.scene.health_rules = horizon_client::health::HealthRules { + difficulty: [ + horizon_world::food::Difficulty::Peaceful, + horizon_world::food::Difficulty::Easy, + horizon_world::food::Difficulty::Normal, + horizon_world::food::Difficulty::Hard, + ][op["difficulty"].as_u64().unwrap() as usize], + natural_regeneration: op["regenerate"].as_bool().unwrap(), + }; + } + "food" => { + world.player.health.food = horizon_world::food::FoodData { + food: op["food"].as_i64().unwrap() as i32, + saturation: single(&op["saturation"]), + exhaustion: single(&op["exhaustion"]), + timer: op["timer"].as_i64().unwrap() as i32, + }; + } + "exhaust" => world + .player + .health + .food + .add_exhaustion(single(&op["value"])), + "eat" => world.player.health.food.eat( + op["nutrition"].as_i64().unwrap() as i32, + single(&op["value"]), + ), + "food_tick" => world + .player + .food_tick(&resources.health, world.scene.health_rules)?, + "peaceful" => world + .player + .peaceful_regeneration(world.scene.health_rules)?, + "simulation_tick" => { + let v = vector(&op["value"]); + world.simulation_tick( + [v.x as f32, v.z as f32], + op["jumping"].as_bool().unwrap(), + )?; + } + "clock" => world.player.health.advance_clock(), + "health" | "absorption" => world + .player + .set_health(single(&op["value"]), op["mode"] == "absorption")?, + "hurt" => { + let source = resources + .health + .damage + .id(op["name"].as_str().unwrap()) + .ok_or("missing fixture damage source")?; + let kind = match op["name"].as_str().unwrap() { + "minecraft:fall" => horizon_world::block_landing::LandingDamage::Fall, + "minecraft:stalagmite" => { + horizon_world::block_landing::LandingDamage::Stalagmite + } + _ => return Err("fixture source is not a landing source".into()), + }; + let amount = single(&op["value"]); + world.player.events.push(MotionEvent::Fall( + horizon_client::landing::FallEvent::Damage { + source: kind, + amount, + }, + )); + world.player.hurt( + &resources.health, + world.scene.health_rules, + source, + amount, + )?; + } + "seed" => world.scene.random.set_seed(op["value"].as_i64().unwrap()), + "impulse" => world.player.impulse.set_ignore_fall_damage( + op["ignore"].as_bool().unwrap(), + if op["value"].is_null() { + None + } else { + Some(vector(&op["value"])) + }, + ), + "block" => { + let p = &op["position"]; + let mut state = assets + .registry + .default_state(op["name"].as_str().unwrap()) + .ok_or("missing fixture block")?; + if let Some(properties) = op["properties"].as_object() { + let mut definition = assets.registry.state(state).unwrap().clone(); + for (name, value) in properties { + definition + .properties + .insert(name.clone(), value.as_str().unwrap().into()); + } + state = assets + .registry + .id(&definition) + .ok_or("missing fixture state")?; + } + world.scene.set( + p[0].as_i64().unwrap() as i32, + p[1].as_i64().unwrap() as i32, + p[2].as_i64().unwrap() as i32, + state, + )?; + } + "landing" => { + let p = &op["position"]; + let p = BlockPos::new( + p[0].as_i64().unwrap() as i32, + p[1].as_i64().unwrap() as i32, + p[2].as_i64().unwrap() as i32, + ); + let state = world.scene.block(p.x, p.y, p.z); + horizon_world::entity_move::EntityMoveWorld::check_fall_damage( + &mut world, + number(&op["value"]), + op["ground"].as_bool().unwrap(), + state, + p, + )?; + } + "travel" => world.travel_in_air(vector(&op["value"]))?, + "tick" => { + let v = vector(&op["value"]); + world.movement_tick([v.x as f32, v.y as f32, v.z as f32])?; + } + "player_tick" => { + let v = vector(&op["value"]); + world.player_movement_tick( + [v.x as f32, v.z as f32], + op["jumping"].as_bool().unwrap(), + )?; + } + "trigger" => world.player.jump_trigger_time = op["value"].as_i64().unwrap() as i32, + "delay" => world.player.no_jump_delay = op["value"].as_i64().unwrap() as i32, + "move" => world.move_self(vector(&op["value"]))?, + "jump" => world.jump_from_ground()?, + "sprint" => world.player.set_sprinting(op["value"].as_bool().unwrap())?, + "speed" => world.player.speed = single(&op["value"]), + "yaw" => world.player.yaw = single(&op["value"]), + "velocity" => world.player.velocity = vector(&op["value"]), + "stuck" => world.player.stuck_multiplier = vector(&op["value"]), + "fall" => world.player.fall_distance = number(&op["value"]), + "jumping" => world.player.jumping = op["value"].as_bool().unwrap(), + "ack_attributes" => { + world.player.attributes.updates_mut().clear(); + world.player.attributes.sync_mut().clear(); + } + "modifier" => { + let key = world + .player + .attributes + .key(op["name"].as_str().unwrap()) + .unwrap(); + let handle = world + .player + .attributes + .get_instance(Some(key)) + .map_err(|e| format!("{e:?}"))? + .unwrap(); + let operation = match op["operation"].as_u64().unwrap() { + 0 => Operation::AddValue, + 1 => Operation::AddMultipliedBase, + 2 => Operation::AddMultipliedTotal, + _ => return Err("unknown modifier operation".into()), + }; + let modifier = + Modifier::new(op["id"].as_str().unwrap(), number(&op["value"]), operation)?; + world + .player + .attributes + .edit(&handle, |a, o| { + if op["permanent"].as_bool().unwrap() { + a.add_permanent(modifier, o) + } else { + a.add_transient(modifier, o) + } + }) + .map_err(|e| format!("{e:?}"))?; + } + "attribute" => { + let key = world + .player + .attributes + .key(op["name"].as_str().unwrap()) + .unwrap(); + let handle = world + .player + .attributes + .get_instance(Some(key)) + .map_err(|e| format!("{e:?}"))? + .unwrap(); + world + .player + .attributes + .edit(&handle, |a, o| a.set_base_value(number(&op["value"]), o)) + .map_err(|e| format!("{e:?}"))?; + } + _ => return Err("unknown motion operation".into()), + } + let check_block = scene.block(25, 3, 25); + snapshot(&mut out, &player)?; + writeln!(out, "block {}", check_block.0)?; + let h = &player.health; + let canonical = |v: f32| { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } + }; + writeln!( + out, + "health {:08x} {:08x} {:08x} {} {} {:08x} {} {} {} {} {} {} {} {} {} {}", + canonical(h.health()), + canonical(h.absorption()), + canonical(h.food.exhaustion), + h.hurt.no_action_time, + h.hurt.cooldown, + canonical(h.hurt.last_hurt), + h.hurt.hurt_duration, + h.hurt.hurt_time, + h.hurt.last_source.map_or("none", |id| resources + .health + .damage + .definition(id) + .unwrap() + .name + .as_str()), + h.hurt.last_stamp, + h.dead, + h.sync_velocity, + h.data.is_dirty(), + h.data.item_dirty(h.ids.health).unwrap(), + h.data.item_dirty(h.ids.absorption).unwrap(), + h.game_time + )?; + writeln!( + out, + "food {} {:08x} {} {} {} {}", + h.food.food, + canonical(h.food.saturation), + h.food.timer, + h.tick_count, + scene.health_rules.difficulty as u8, + scene.health_rules.natural_regeneration + )?; + player.events.clear(); + writeln!( + out, + "input {} {} {} {}", + player.sprinting, + player.sprint_input.trigger_time, + player.sprint_input.previous_forward, + player.sprint_input.previous_shift + )?; + writeln!( + out, + "pose {} {} {} {:08x} {:08x} {:08x}", + player.pose.name(), + player.shift_key_down, + player.local_crouching, + player.dimensions.width.to_bits(), + player.dimensions.height.to_bits(), + player.dimensions.eye_height.to_bits() + )?; + } + writeln!(out, "end")?; + if used.get() != count { + return Err("reference instance allocation count differs".into()); + } + } + Ok(()) +} diff --git a/crates/horizon-client/examples/sprint_probe.rs b/crates/horizon-client/examples/sprint_probe.rs new file mode 100644 index 000000000..18d4b8fce --- /dev/null +++ b/crates/horizon-client/examples/sprint_probe.rs @@ -0,0 +1,84 @@ +#![forbid(unsafe_code)] +use horizon_client::{ + Result, + sprint::{Conditions, Keys, SprintState}, +}; +use serde_json::Value; +use std::{ + fs::File, + io::{BufRead, BufReader, BufWriter, Write}, +}; +fn keys(mask: u64) -> Keys { + Keys { + forward: mask & 1 != 0, + backward: mask & 2 != 0, + left: mask & 4 != 0, + right: mask & 8 != 0, + jump: mask & 16 != 0, + shift: mask & 32 != 0, + sprint: mask & 64 != 0, + } +} +fn main() -> Result<()> { + let args: Vec<_> = std::env::args().skip(1).collect(); + let mut out = BufWriter::new(File::create(&args[1])?); + for line in BufReader::new(File::open(&args[0])?).lines() { + let f: Value = serde_json::from_str(&line?)?; + let initial = keys(f["initial_keys"].as_u64().unwrap()); + let mut state = SprintState { + trigger_time: f["trigger"].as_i64().unwrap() as i32, + previous_forward: initial.direction()[1] > 1.0e-5, + previous_shift: initial.shift, + }; + let mut sprinting = f["sprint"].as_bool().unwrap(); + for step in f["steps"].as_array().unwrap() { + let mask = step["flags"].as_u64().unwrap(); + let flag = |bit: u32| mask & (1u64 << bit) != 0u64; + let conditions = Conditions { + sprinting, + mobility_restricted: flag(0), + passenger: flag(1), + vehicle_can_sprint: flag(2), + vehicle_local: flag(3), + enough_food: step["food"].as_i64().unwrap() as i32 as f32 > 6.0, + may_fly: flag(4), + flying: flag(5), + shallow_water: flag(6), + slow_item: flag(7) && !flag(8), + fall_flying: flag(9), + under_water: flag(10), + moving_slowly: flag(11), + swimming: flag(12), + in_water: flag(13), + on_ground: flag(14), + horizontal_collision: flag(15), + minor_horizontal_collision: flag(16), + }; + let input = keys(step["keys"].as_u64().unwrap()); + let mut calls = Vec::new(); + state.tick( + input, + conditions, + step["window"].as_i64().unwrap() as i32, + |value| { + sprinting = value; + calls.push(value.to_string()); + Ok::<_, std::convert::Infallible>(()) + }, + )?; + let direction = input.direction(); + writeln!( + out, + "{} {} {:08x} {:08x} {} | {}", + sprinting, + state.trigger_time, + direction[0].to_bits(), + direction[1].to_bits(), + state.previous_shift, + calls.join(",") + )?; + } + writeln!(out, "end")?; + } + Ok(()) +} diff --git a/crates/horizon-client/src/assets.rs b/crates/horizon-client/src/assets.rs new file mode 100644 index 000000000..cafdd7b2d --- /dev/null +++ b/crates/horizon-client/src/assets.rs @@ -0,0 +1,207 @@ +use crate::Result; +use horizon_world::{ + DATA_VERSION, + heightmap::HeightmapState, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, + worldgen::{tags::TagDefinitions, terrain::TerrainBlockStates}, +}; +use serde_json::Value; +use std::{ + collections::BTreeSet, + fs::File, + io::{self, BufReader}, + path::Path, + sync::Arc, +}; + +pub const MATERIALS: [&str; 6] = ["bedrock", "dirt", "stone", "sand", "oak_planks", "bricks"]; +#[derive(Clone, Copy)] +pub struct StateFacts { + air: bool, + fluid: bool, + air_block: bool, + motion: bool, + no_leaves: bool, +} +impl HeightmapState for StateFacts { + fn is_air(self) -> bool { + self.air + } + fn is_air_block(self) -> bool { + self.air_block + } + fn has_fluid(self) -> bool { + self.fluid + } + fn blocks_motion_in_heightmap(self) -> bool { + self.motion + } + fn blocks_motion_in_heightmap_no_leaves(self) -> bool { + self.no_leaves + } +} +#[derive(Clone)] +pub struct Properties(Arc>); +impl TerrainBlockStates for Properties { + type State = StateFacts; + fn heightmap_state(&self, id: BlockStateId) -> StateFacts { + self.0[id.0 as usize] + } +} +pub struct Assets { + /// Leaked once per process: shared by world generation threads. + pub registry: &'static BlockRegistry, + pub properties: Properties, + pub material_states: [BlockStateId; 6], + pub sprite_size: u32, + pub pixels: Vec, + pub texture_layers: u32, + pub model_catalog: crate::models::StateModels, + pub model_placements: Vec<(horizon_core::position::BlockPos, BlockStateId)>, + pub model_gallery: Vec, + pub animations: Vec, + pub sprite_layers: std::collections::BTreeMap, + pub translucent_layers: Vec, +} +fn invalid(message: &str) -> io::Error { + io::Error::new(io::ErrorKind::InvalidData, message) +} +fn tag(value: &Value) -> Result { + Ok(match value { + Value::String(value) => Tag::String(value.as_str().into()), + Value::Number(value) => Tag::Int(i32::try_from( + value + .as_i64() + .ok_or_else(|| invalid("invalid registry number"))?, + )?), + Value::Array(values) => Tag::List(values.iter().map(tag).collect::>()?), + Value::Object(values) => Tag::Compound( + values + .iter() + .map(|(name, value)| Ok((name.as_str().into(), tag(value)?))) + .collect::>()?, + ), + _ => return Err(invalid("unsupported registry value").into()), + }) +} +impl Assets { + pub fn load(root: &Path) -> Result { + let manifest: Value = serde_json::from_reader(BufReader::new(File::open( + root.join("horizon-resources.json"), + )?))?; + if manifest["data_version"].as_i64() != Some(i64::from(DATA_VERSION)) { + return Err(invalid("resources do not match Horizon's pinned data version").into()); + } + let facts: Value = + serde_json::from_reader(BufReader::new(File::open(root.join("facts.json"))?))?; + let states = facts["states"] + .as_array() + .ok_or_else(|| invalid("missing registry state facts"))?; + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ( + "states", + Tag::List( + states + .iter() + .map(|state| tag(&state[4])) + .collect::>()?, + ), + ), + ("defaults", tag(&facts["defaults"])?), + ]))?; + let bundle: Value = + serde_json::from_reader(BufReader::new(File::open(root.join("block-tags.json"))?))?; + let mut definitions = TagDefinitions::default(); + for (name, text) in bundle + .as_object() + .ok_or_else(|| invalid("invalid block tag bundle"))? + { + definitions.apply_json( + name, + "vanilla", + text.as_str() + .ok_or_else(|| invalid("invalid block tag text"))?, + )?; + } + let built = + definitions.build(|name, _| facts["defaults"].get(name).map(|_| name.to_owned()))?; + if !built.missing.is_empty() { + return Err(invalid("unresolved block tags").into()); + } + let motion: BTreeSet<_> = built + .tags + .get("minecraft:blocks_motion_in_heightmap") + .ok_or_else(|| invalid("missing motion tag"))? + .iter() + .map(String::as_str) + .collect(); + let no_leaves: BTreeSet<_> = built + .tags + .get("minecraft:blocks_motion_in_heightmap_no_leaves") + .ok_or_else(|| invalid("missing no-leaves motion tag"))? + .iter() + .map(String::as_str) + .collect(); + let properties = Properties(Arc::new( + states + .iter() + .map(|state| { + Ok(StateFacts { + air: state[1] + .as_bool() + .ok_or_else(|| invalid("missing air fact"))?, + fluid: state[2] + .as_bool() + .ok_or_else(|| invalid("missing fluid fact"))?, + air_block: state[0].as_str() == Some("minecraft:air"), + motion: motion.contains( + state[0] + .as_str() + .ok_or_else(|| invalid("missing state name"))?, + ), + no_leaves: no_leaves.contains( + state[0] + .as_str() + .ok_or_else(|| invalid("missing state name"))?, + ), + }) + }) + .collect::>()?, + )); + let mut material_states = [BlockStateId(0); 6]; + let mut sprites = crate::sprites::Sprites::default(); + for (layer, name) in MATERIALS.iter().enumerate() { + let state = registry + .default_state(&format!("minecraft:{name}")) + .ok_or_else(|| invalid("missing test-scene material"))?; + material_states[layer] = state; + sprites.insert(root, &format!("minecraft:block/{name}"))?; + } + let registry: &'static BlockRegistry = Box::leak(Box::new(registry)); + let models = crate::models::prepare(root, registry, &mut sprites)?; + // Fluids are drawn by the fluid renderer, not block models; breaking + // progress uses the destroy-stage overlays. + for name in ["water_still", "water_flow", "water_overlay", "lava_still", "lava_flow"] { + sprites.insert(root, &format!("minecraft:block/{name}"))?; + } + for stage in 0..10 { + sprites.insert(root, &format!("minecraft:block/destroy_stage_{stage}"))?; + } + Ok(Self { + registry, + properties, + material_states, + sprite_size: sprites.size, + texture_layers: u32::try_from(sprites.layers.len())?, + pixels: sprites.pixels, + model_catalog: models.catalog, + model_placements: models.placements, + model_gallery: models.states, + animations: sprites.animations, + sprite_layers: sprites.layers, + translucent_layers: sprites.translucent, + }) + } +} diff --git a/crates/horizon-client/src/attribute_updates.rs b/crates/horizon-client/src/attribute_updates.rs new file mode 100644 index 000000000..b81db5835 --- /dev/null +++ b/crates/horizon-client/src/attribute_updates.rs @@ -0,0 +1,142 @@ +//! Resident ServerPlayer pending attribute callbacks over its owned live map. +//! Waypoint requests are observable boundaries; manager/network delivery is +//! still supplied by the eventual multiplayer runtime. +use crate::{ + Result, + health::Updates, + motion::{MotionEvent, PlayerMotion}, +}; +use horizon_world::{ + attribute_map::ValueKind, + attribute_updates::{self, UpdateWorld, UpdatedAttribute}, + attributes::live::{self, Handle, Key, LiveAttributes}, + live_attribute_updates::{self as live_updates, LiveAttributeWorld}, + living_health::{self, HealthWorld}, + object_open_set::CursorError, +}; +use std::io; + +impl PlayerMotion { + /// LivingEntity.tick refreshes these callbacks after aiStep and before the + /// enclosing Player.tick selects its pose. Synchronization stays queued. + pub fn refresh_attributes(&mut self) -> Result<()> { + live_updates::refresh(self) + } +} +impl HealthWorld for PlayerMotion { + type Error = Box; + type Data = (); + fn health(&mut self) -> Result { + Ok(self.health.health()) + } + fn health_data(&self) {} + fn max_health_attribute(&mut self) -> Result { + self.attribute("minecraft:max_health") + } + fn max_absorption_attribute(&mut self) -> Result { + self.attribute("minecraft:max_absorption") + } + fn store_health(&mut self, _: (), value: f32) -> Result<()> { + self.health.data.set( + self.health.ids.health, + value, + false, + &mut Updates(&mut self.events), + )?; + Ok(()) + } + fn store_absorption(&mut self, value: f32) -> Result<()> { + // Player.internalSetAbsorptionAmount stores the already clamped value + // through its current synchronized data, without another limit query. + self.health.data.set( + self.health.ids.absorption, + value, + false, + &mut Updates(&mut self.events), + )?; + Ok(()) + } + fn dead_flag(&self) -> bool { + self.health.dead + } + fn dispatch_set_health(&mut self, value: f32) -> Result<()> { + living_health::set_health(self, value) + } +} +impl UpdateWorld for PlayerMotion { + type Level = (); + type Manager = (); + type Attributes = (); + fn attribute_kind(&self, attribute: &Key) -> UpdatedAttribute { + live_updates::kind(attribute) + } + fn absorption(&mut self) -> Result { + Ok(self.health.absorption()) + } + fn refresh_dimensions(&mut self) -> Result<()> { + PlayerMotion::refresh_dimensions(self) + } + fn level(&mut self) -> Result<()> { + Ok(()) + } + fn is_server_level(&self, _: ()) -> bool { + true + } + fn waypoint_manager(&mut self, _: ()) -> Result<()> { + Ok(()) + } + fn attributes_field(&self) {} + fn attribute_value_in(&mut self, _: (), attribute: Key) -> Result { + self.attributes + .value(Some(attribute), ValueKind::Computed) + .map_err(Self::attribute_error) + } + fn track_waypoint(&mut self, _: (), track: bool) -> Result<()> { + self.events.push(MotionEvent::Waypoint { + receiver: false, + enabled: track, + }); + Ok(()) + } +} +impl LiveAttributeWorld for PlayerMotion { + type Identity = Box i32>; + fn get_attributes(&mut self) -> Result<()> { + Ok(()) + } + fn live_attributes(&self, _: ()) -> &LiveAttributes { + &self.attributes + } + fn live_attributes_mut(&mut self, _: ()) -> &mut LiveAttributes { + &mut self.attributes + } + fn instance_attribute(&self, instance: Option) -> Result { + let instance = + instance.ok_or_else(|| io::Error::other("null pending attribute instance"))?; + self.attributes + .attribute(&instance) + .cloned() + .map_err(Self::attribute_error) + } + fn attribute_error(error: live::Error) -> Self::Error { + io::Error::other(format!("resident attribute: {error:?}")).into() + } + fn cursor_error(error: CursorError) -> Self::Error { + io::Error::other(format!("resident attribute cursor: {error:?}")).into() + } + fn dispatch_attribute_updated(&mut self, attribute: Key) -> Result<()> { + // ServerPlayer.onAttributeUpdated handles receive range, then calls + // the inherited LivingEntity handler, including for this same holder. + if attribute.name() == "minecraft:waypoint_receive_range" { + let value = self + .attributes + .value(Some(attribute.clone()), ValueKind::Computed) + .map_err(Self::attribute_error)?; + self.events.push(MotionEvent::Waypoint { + receiver: true, + enabled: value > 0.0, + }); + } + attribute_updates::updated(self, attribute) + } +} diff --git a/crates/horizon-client/src/audio.rs b/crates/horizon-client/src/audio.rs new file mode 100644 index 000000000..e332e863b --- /dev/null +++ b/crates/horizon-client/src/audio.rs @@ -0,0 +1,247 @@ +//! Sound playback: `sounds.json` events with weighted variants, Ogg/Vorbis +//! decoding, and a small mixer with vanilla's linear distance attenuation +//! (`SoundInstance.Attenuation.LINEAR`, default range 16 blocks) and stereo panning. +use crate::Result; +use cpal::traits::{DeviceTrait, HostTrait, StreamTrait}; +use serde_json::Value; +use std::{ + collections::HashMap, + fs, + path::{Path, PathBuf}, + sync::{Arc, Mutex}, +}; + +#[derive(Clone, Debug)] +struct Variant { + name: String, + volume: f32, + pitch: f32, + weight: u32, + attenuation: f32, + is_event: bool, +} +struct Voice { + samples: Arc>, + position: f64, + step: f64, + left: f32, + right: f32, +} +#[derive(Default)] +struct Mixer { + voices: Vec, +} +pub struct Audio { + _stream: Option, + mixer: Arc>, + rate: u32, + root: PathBuf, + events: HashMap>, + cache: HashMap>, u32)>>, + seed: u64, + pub listener: [f64; 3], + pub listener_yaw: f32, + pub master: f32, +} +fn decode(path: &Path) -> Option<(Vec, u32)> { + use symphonia::core::{ + audio::SampleBuffer, codecs::DecoderOptions, formats::FormatOptions, io::MediaSourceStream, + meta::MetadataOptions, probe::Hint, + }; + let file = fs::File::open(path).ok()?; + let stream = MediaSourceStream::new(Box::new(file), Default::default()); + let mut hint = Hint::new(); + hint.with_extension("ogg"); + let probed = symphonia::default::get_probe() + .format(&hint, stream, &FormatOptions::default(), &MetadataOptions::default()) + .ok()?; + let mut format = probed.format; + let track = format.default_track()?; + let id = track.id; + let rate = track.codec_params.sample_rate?; + let mut decoder = symphonia::default::get_codecs() + .make(&track.codec_params, &DecoderOptions::default()) + .ok()?; + let mut mono = Vec::new(); + while let Ok(packet) = format.next_packet() { + if packet.track_id() != id { + continue; + } + let Ok(buffer) = decoder.decode(&packet) else { continue }; + let spec = *buffer.spec(); + let channels = spec.channels.count().max(1); + let mut samples = SampleBuffer::::new(buffer.capacity() as u64, spec); + samples.copy_interleaved_ref(buffer); + for frame in samples.samples().chunks(channels) { + mono.push(frame.iter().sum::() / channels as f32); + } + } + Some((mono, rate)) +} +impl Audio { + pub fn new(root: &Path) -> Self { + let mut events = HashMap::new(); + if let Ok(text) = fs::read(root.join("assets/minecraft/sounds.json")) + && let Ok(Value::Object(map)) = serde_json::from_slice::(&text) + { + for (name, def) in map { + let variants = def["sounds"] + .as_array() + .into_iter() + .flatten() + .map(|s| match s { + Value::String(n) => Variant { + name: n.clone(), + volume: 1.0, + pitch: 1.0, + weight: 1, + attenuation: 16.0, + is_event: false, + }, + _ => Variant { + name: s["name"].as_str().unwrap_or("").to_owned(), + volume: s["volume"].as_f64().unwrap_or(1.0) as f32, + pitch: s["pitch"].as_f64().unwrap_or(1.0) as f32, + weight: s["weight"].as_u64().unwrap_or(1) as u32, + attenuation: s["attenuation_distance"].as_f64().unwrap_or(16.0) as f32, + is_event: s["type"].as_str() == Some("event"), + }, + }) + .collect::>(); + events.insert(format!("minecraft:{name}"), variants); + } + } + let mixer = Arc::new(Mutex::new(Mixer::default())); + let (stream, rate) = match Self::open(mixer.clone()) { + Ok(v) => (Some(v.0), v.1), + Err(e) => { + eprintln!("Horizon: audio unavailable: {e}"); + (None, 48_000) + } + }; + Self { + _stream: stream, + mixer, + rate, + root: root.to_owned(), + events, + cache: HashMap::new(), + seed: 0x5DEE_CE66, + listener: [0.0; 3], + listener_yaw: 0.0, + master: 1.0, + } + } + fn open(mixer: Arc>) -> Result<(cpal::Stream, u32)> { + let host = cpal::default_host(); + let device = host.default_output_device().ok_or("no audio output device")?; + let config = device.default_output_config()?; + let rate = config.sample_rate().0; + let channels = config.channels() as usize; + let stream = device.build_output_stream( + &config.into(), + move |data: &mut [f32], _| { + data.fill(0.0); + let Ok(mut mixer) = mixer.lock() else { return }; + for frame in data.chunks_mut(channels) { + let (mut l, mut r) = (0.0f32, 0.0f32); + for v in mixer.voices.iter_mut() { + let i = v.position as usize; + if i + 1 >= v.samples.len() { + continue; + } + let t = (v.position - i as f64) as f32; + let s = v.samples[i] * (1.0 - t) + v.samples[i + 1] * t; + l += s * v.left; + r += s * v.right; + v.position += v.step; + } + if channels >= 2 { + frame[0] = l.clamp(-1.0, 1.0); + frame[1] = r.clamp(-1.0, 1.0); + } else { + frame[0] = ((l + r) / 2.0).clamp(-1.0, 1.0); + } + } + mixer.voices.retain(|v| (v.position as usize) + 1 < v.samples.len()); + }, + |e| eprintln!("Horizon: audio stream error: {e}"), + None, + )?; + stream.play()?; + Ok((stream, rate)) + } + fn random(&mut self) -> u64 { + self.seed ^= self.seed << 13; + self.seed ^= self.seed >> 7; + self.seed ^= self.seed << 17; + self.seed + } + fn resolve(&mut self, event: &str, depth: u32) -> Option { + let variants = self.events.get(event)?.clone(); + let total: u32 = variants.iter().map(|v| v.weight).sum(); + if total == 0 { + return None; + } + let mut pick = (self.random() % u64::from(total)) as u32; + let chosen = variants.into_iter().find(|v| { + if pick < v.weight { + true + } else { + pick -= v.weight; + false + } + })?; + if chosen.is_event && depth < 4 { + let name = if chosen.name.contains(':') { chosen.name.clone() } else { format!("minecraft:{}", chosen.name) }; + let mut inner = self.resolve(&name, depth + 1)?; + inner.volume *= chosen.volume; + inner.pitch *= chosen.pitch; + return Some(inner); + } + Some(chosen) + } + /// Play a sound event at a world position (None = non-positional UI sound). + pub fn play(&mut self, event: &str, at: Option<[f64; 3]>, volume: f32, pitch: f32) { + if self._stream.is_none() { + return; + } + let Some(variant) = self.resolve(event, 0) else { return }; + let file = variant.name.trim_start_matches("minecraft:").to_owned(); + let entry = self.cache.entry(file.clone()).or_insert_with(|| { + decode(&self.root.join(format!("assets/minecraft/sounds/{file}.ogg"))).map(|(s, r)| (Arc::new(s), r)) + }); + let Some((samples, rate)) = entry.clone() else { return }; + let volume = (volume * variant.volume).clamp(0.0, 1.0) * self.master; + let pitch = (pitch * variant.pitch).clamp(0.5, 2.0); + let (mut left, mut right) = (volume, volume); + if let Some(p) = at { + let d = [p[0] - self.listener[0], p[1] - self.listener[1], p[2] - self.listener[2]]; + let distance = (d[0] * d[0] + d[1] * d[1] + d[2] * d[2]).sqrt() as f32; + let range = variant.attenuation * volume.max(1.0); + let gain = (1.0 - distance / range).clamp(0.0, 1.0); + if gain <= 0.0 { + return; + } + let yaw = self.listener_yaw.to_radians(); + // Right vector of a Minecraft yaw. + let side = (-(yaw.cos()) as f64 * d[0] - (yaw.sin()) as f64 * d[2]) as f32 / distance.max(0.001); + let pan = side.clamp(-1.0, 1.0); + left = volume * gain * (1.0 - pan.max(0.0) * 0.6); + right = volume * gain * (1.0 + pan.min(0.0) * 0.6); + } + let step = f64::from(rate) / f64::from(self.rate) * f64::from(pitch); + if let Ok(mut m) = self.mixer.lock() { + if m.voices.len() > 64 { + m.voices.remove(0); + } + m.voices.push(Voice { + samples, + position: 0.0, + step, + left, + right, + }); + } + } +} diff --git a/crates/horizon-client/src/bin/horizon-ctl.rs b/crates/horizon-client/src/bin/horizon-ctl.rs new file mode 100644 index 000000000..3ecfe2583 --- /dev/null +++ b/crates/horizon-client/src/bin/horizon-ctl.rs @@ -0,0 +1,203 @@ +//! horizon-ctl: drive a running Horizon client through its control socket. +#![forbid(unsafe_code)] +use std::{ + io::{BufRead, BufReader, Write}, + os::unix::net::UnixStream, + path::{Path, PathBuf}, + process::{Command, ExitCode, Stdio}, + thread, + time::{Duration, Instant}, +}; + +const USAGE: &str = "usage: horizon-ctl [--socket PATH] COMMAND [ARGS...] + +Local commands: + launch [GAME ARGS...] start horizon-client with a control socket and wait for it + hold KEY SECONDS press KEY, wait, release it + wait-ready [SECONDS] wait until the player has spawned and no chunks are pending + - run commands from stdin, one per line (\"sleep S\" waits locally) + +Game commands (run \"horizon-ctl help\" against a running game for the full list): + status, key, mouse, look, turn, tp, hotbar, give, render-distance, time, + screenshot PATH, stats, bench SECONDS, open, save, quit + +Replies are JSON lines; the exit status is 1 when the reply has an \"error\". +The socket defaults to $HORIZON_CONTROL or $XDG_RUNTIME_DIR/horizon-control.sock."; + +struct Client { + writer: UnixStream, + reader: BufReader, +} + +impl Client { + fn connect(path: &Path) -> Result { + let stream = UnixStream::connect(path).map_err(|e| { + format!( + "cannot connect to {} ({e}); is the game running with --control?", + path.display() + ) + })?; + let reader = BufReader::new(stream.try_clone().map_err(|e| e.to_string())?); + Ok(Self { + writer: stream, + reader, + }) + } + fn send(&mut self, line: &str) -> Result { + writeln!(self.writer, "{line}").map_err(|e| e.to_string())?; + let mut reply = String::new(); + if self + .reader + .read_line(&mut reply) + .map_err(|e| e.to_string())? + == 0 + { + return Err("the game closed the connection".into()); + } + Ok(reply.trim_end().to_owned()) + } +} + +fn is_error(reply: &str) -> bool { + serde_json::from_str::(reply).map_or(true, |v| v.get("error").is_some()) +} + +/// Screenshot paths are written by the game process: make them absolute here. +fn absolute_paths(words: &mut [String]) { + if words.first().map(String::as_str) == Some("screenshot") + && let Some(path) = words.get_mut(1) + && let Ok(cwd) = std::env::current_dir() + { + *path = cwd.join(&*path).display().to_string(); + } +} + +fn run_line(client: &mut Client, words: &mut [String]) -> Result { + match words.first().map(String::as_str) { + Some("sleep") => { + let seconds: f64 = words + .get(1) + .ok_or("sleep SECONDS")? + .parse() + .map_err(|_| "sleep SECONDS")?; + thread::sleep(Duration::from_secs_f64(seconds)); + Ok(true) + } + Some("hold") => { + let (key, seconds) = match words { + [_, key, seconds] => ( + key.clone(), + seconds.parse::().map_err(|_| "hold KEY SECONDS")?, + ), + _ => return Err("hold KEY SECONDS".into()), + }; + let down = client.send(&format!("key {key} down"))?; + if is_error(&down) { + println!("{down}"); + return Ok(false); + } + thread::sleep(Duration::from_secs_f64(seconds)); + let up = client.send(&format!("key {key} up"))?; + println!("{up}"); + Ok(!is_error(&up)) + } + Some("wait-ready") => { + let limit = words + .get(1) + .map_or(Ok(120.0), |s| s.parse::()) + .map_err(|_| "wait-ready [SECONDS]")?; + let deadline = Instant::now() + Duration::from_secs_f64(limit); + loop { + let reply = client.send("status")?; + let status: serde_json::Value = + serde_json::from_str(&reply).map_err(|e| e.to_string())?; + if !status["player"].is_null() && status["pending_chunks"] == 0 { + println!("{reply}"); + return Ok(true); + } + if Instant::now() > deadline { + println!( + "{{\"error\":\"not ready after {limit} seconds\",\"status\":{reply}}}" + ); + return Ok(false); + } + thread::sleep(Duration::from_millis(250)); + } + } + _ => { + absolute_paths(words); + let reply = client.send(&words.join(" "))?; + println!("{reply}"); + Ok(!is_error(&reply)) + } + } +} + +fn launch(socket: &Path, args: &[String]) -> Result { + let exe = std::env::current_exe().map_err(|e| e.to_string())?; + let game = exe.with_file_name("horizon-client"); + let log = socket.with_extension("log"); + let file = std::fs::File::create(&log).map_err(|e| format!("{}: {e}", log.display()))?; + let child = Command::new(&game) + .args(args) + .arg("--control-socket") + .arg(socket) + .stdin(Stdio::null()) + .stdout(file.try_clone().map_err(|e| e.to_string())?) + .stderr(file) + .spawn() + .map_err(|e| format!("{}: {e}", game.display()))?; + let deadline = Instant::now() + Duration::from_secs(60); + while Instant::now() < deadline { + if UnixStream::connect(socket).is_ok() { + println!( + "{}", + serde_json::json!({ "ok": true, "pid": child.id(), "socket": socket, "log": log }) + ); + return Ok(true); + } + thread::sleep(Duration::from_millis(100)); + } + println!( + "{}", + serde_json::json!({ "error": "control socket did not open within 60 seconds", "log": log }) + ); + Ok(false) +} + +fn main() -> ExitCode { + let mut args: Vec = std::env::args().skip(1).collect(); + let mut socket = horizon_client::control::default_path(); + if args.first().map(String::as_str) == Some("--socket") && args.len() >= 2 { + socket = PathBuf::from(args.remove(1)); + args.remove(0); + } + let result = match args.first().map(String::as_str) { + None | Some("-h" | "--help") => { + println!("{USAGE}"); + return ExitCode::SUCCESS; + } + Some("launch") => launch(&socket, &args[1..]), + Some("-") => Client::connect(&socket).and_then(|mut client| { + let mut all_ok = true; + for line in std::io::stdin().lock().lines() { + let line = line.map_err(|e| e.to_string())?; + let mut words: Vec = line.split_whitespace().map(str::to_owned).collect(); + if words.is_empty() || words[0].starts_with('#') { + continue; + } + all_ok &= run_line(&mut client, &mut words)?; + } + Ok(all_ok) + }), + Some(_) => Client::connect(&socket).and_then(|mut client| run_line(&mut client, &mut args)), + }; + match result { + Ok(true) => ExitCode::SUCCESS, + Ok(false) => ExitCode::from(1), + Err(e) => { + eprintln!("horizon-ctl: {e}"); + ExitCode::from(2) + } + } +} diff --git a/crates/horizon-client/src/biome.rs b/crates/horizon-client/src/biome.rs new file mode 100644 index 000000000..bc4a0344e --- /dev/null +++ b/crates/horizon-client/src/biome.rs @@ -0,0 +1,193 @@ +//! Biome colours from the pinned biome definitions and colormaps +//! (`Biome.getGrassColor`/`getFoliageColor`/..., `BlockTintSources`). +use crate::Result; +use horizon_core::{noise::SimplexNoise, random::LegacyRandom}; +use serde_json::Value; +use std::{collections::HashMap, fs, path::Path}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GrassModifier { + None, + DarkForest, + Swamp, +} +#[derive(Clone, Debug)] +pub struct SpawnEntry { + pub entity: String, + pub weight: u32, + pub min: u32, + pub max: u32, +} +#[derive(Clone, Debug)] +pub struct BiomeInfo { + /// `natural_mob_spawns` by category (creature, monster, ...). + pub spawns: HashMap>, + pub creature_probability: f32, + pub name: String, + pub temperature: f32, + pub downfall: f32, + pub precipitation: bool, + pub grass: u32, + pub modifier: GrassModifier, + pub foliage: u32, + pub dry_foliage: u32, + pub water: u32, + pub sky: u32, + pub fog: u32, + pub water_fog: u32, +} +pub struct Biomes { + pub list: Vec, + pub index: HashMap, + info_noise: SimplexNoise, +} +fn color(v: &Value) -> Option { + match v { + Value::String(s) => u32::from_str_radix(s.trim_start_matches('#'), 16) + .ok() + .map(|c| c & 0xFF_FFFF), + Value::Number(n) => n.as_i64().map(|c| c as u32 & 0xFF_FFFF), + _ => None, + } +} +fn colormap(root: &Path, name: &str) -> Result> { + let path = root.join(format!("assets/minecraft/textures/colormap/{name}.png")); + let mut decoder = png::Decoder::new(std::io::BufReader::new(fs::File::open(path)?)); + decoder.set_transformations(png::Transformations::EXPAND | png::Transformations::STRIP_16); + let mut reader = decoder.read_info()?; + let mut bytes = vec![0; reader.output_buffer_size().ok_or("colormap too large")?]; + let info = reader.next_frame(&mut bytes)?; + let channels = info.color_type.samples(); + Ok(bytes[..info.buffer_size()] + .chunks_exact(channels) + .map(|p| u32::from(p[0]) << 16 | u32::from(p[1]) << 8 | u32::from(p[2])) + .collect()) +} +/// `GrassColor.get`/`FoliageColor.get`: temperature and downfall index a 256x256 map. +fn sample(map: &[u32], temperature: f32, downfall: f32, fallback: u32) -> u32 { + let temperature = f64::from(temperature.clamp(0.0, 1.0)); + let downfall = f64::from(downfall.clamp(0.0, 1.0)) * temperature; + let x = ((1.0 - temperature) * 255.0) as i32; + let y = ((1.0 - downfall) * 255.0) as i32; + let index = (y << 8 | x) as usize; + map.get(index).copied().unwrap_or(fallback) +} +impl Biomes { + pub fn load(root: &Path) -> Result { + let grass = colormap(root, "grass")?; + let foliage = colormap(root, "foliage")?; + let dry = colormap(root, "dry_foliage")?; + let dimension: Value = serde_json::from_slice(&fs::read( + root.join("data/minecraft/dimension_type/overworld.json"), + )?)?; + let default_fog = color(&dimension["attributes"]["minecraft:visual/fog_color"]) + .unwrap_or(0xC0D8FF); + let default_sky = color(&dimension["attributes"]["minecraft:visual/sky_color"]) + .unwrap_or(0x78A7FF); + let mut list = Vec::new(); + let mut names: Vec<_> = fs::read_dir(root.join("data/minecraft/worldgen/biome"))? + .filter_map(|e| e.ok()) + .map(|e| e.path()) + .filter(|p| p.extension().is_some_and(|e| e == "json")) + .collect(); + names.sort(); + for path in names { + let name = format!( + "minecraft:{}", + path.file_stem().and_then(|s| s.to_str()).ok_or("bad biome")? + ); + let v: Value = serde_json::from_slice(&fs::read(&path)?)?; + let effects = &v["effects"]; + let attributes = &v["attributes"]; + let temperature = v["temperature"].as_f64().unwrap_or(0.5) as f32; + let downfall = v["downfall"].as_f64().unwrap_or(0.5) as f32; + let modifier = match effects["grass_color_modifier"].as_str() { + Some("dark_forest") => GrassModifier::DarkForest, + Some("swamp") => GrassModifier::Swamp, + _ => GrassModifier::None, + }; + let mut spawns: HashMap> = HashMap::new(); + let categories = &attributes["minecraft:gameplay/natural_mob_spawns"]["argument"]["spawns_by_category"]; + for (category, entries) in categories.as_object().into_iter().flatten() { + let list = entries + .as_array() + .into_iter() + .flatten() + .filter_map(|e| { + let (min, max) = match &e["count"] { + Value::Number(n) => { + let n = n.as_u64().unwrap_or(1) as u32; + (n, n) + } + c => ( + c["min_inclusive"].as_u64().unwrap_or(1) as u32, + c["max_inclusive"].as_u64().unwrap_or(1) as u32, + ), + }; + Some(SpawnEntry { + entity: e["type"].as_str()?.to_owned(), + weight: e["weight"].as_u64().unwrap_or(1) as u32, + min, + max, + }) + }) + .collect(); + spawns.insert(category.clone(), list); + } + list.push(BiomeInfo { + spawns, + creature_probability: v["creature_spawn_probability"].as_f64().unwrap_or(0.1) as f32, + temperature, + downfall, + precipitation: v["has_precipitation"].as_bool().unwrap_or(true), + grass: color(&effects["grass_color"]) + .unwrap_or_else(|| sample(&grass, temperature, downfall, 0xFF00FF)), + modifier, + foliage: color(&effects["foliage_color"]) + .unwrap_or_else(|| sample(&foliage, temperature, downfall, 0x48B518)), + dry_foliage: color(&effects["dry_foliage_color"]) + .unwrap_or_else(|| sample(&dry, temperature, downfall, 0x5D4930)), + water: color(&effects["water_color"]).unwrap_or(0x3F76E4), + sky: color(&attributes["minecraft:visual/sky_color"]).unwrap_or(default_sky), + fog: color(&attributes["minecraft:visual/fog_color"]).unwrap_or(default_fog), + water_fog: color(&attributes["minecraft:visual/water_fog_color"]) + .unwrap_or(0x050533), + name, + }); + } + let index = list + .iter() + .enumerate() + .map(|(i, b)| (b.name.clone(), i as u16)) + .collect(); + Ok(Self { + list, + index, + info_noise: SimplexNoise::with_skipped_offsets(&mut LegacyRandom::new(2345), true), + }) + } + pub fn id(&self, name: &str) -> u16 { + self.index + .get(name) + .or_else(|| self.index.get("minecraft:plains")) + .copied() + .unwrap_or(0) + } + pub fn get(&self, id: u16) -> &BiomeInfo { + &self.list[usize::from(id).min(self.list.len() - 1)] + } + pub fn grass(&self, id: u16, x: f64, z: f64) -> u32 { + let b = self.get(id); + match b.modifier { + GrassModifier::None => b.grass, + GrassModifier::DarkForest => ((b.grass & 0xFE_FEFE) + 0x28_340A) >> 1, + GrassModifier::Swamp => { + if f64::from(self.info_noise.get2(x * 0.0225, z * 0.0225)) < -0.1 { + 0x4C_763C + } else { + 0x6A_7039 + } + } + } + } +} diff --git a/crates/horizon-client/src/blocks.rs b/crates/horizon-client/src/blocks.rs new file mode 100644 index 000000000..b67529ece --- /dev/null +++ b/crates/horizon-client/src/blocks.rs @@ -0,0 +1,164 @@ +//! Per-state gameplay facts exported from vanilla's own block-state accessors +//! (`gameplay-facts.json`), indexed by registry state ID. +use crate::Result; +use horizon_world::registry::{BlockRegistry, BlockStateId}; +use serde_json::Value; +use std::{collections::HashMap, fs::File, io::BufReader, path::Path, sync::Arc}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RenderShape { + Model, + Invisible, + Animated, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Fluid { + None, + Water, + Lava, +} +#[derive(Clone, Debug)] +pub struct Sounds { + pub volume: f32, + pub pitch: f32, + pub break_sound: Arc, + pub step: Arc, + pub place: Arc, + pub hit: Arc, + pub fall: Arc, +} +#[derive(Clone, Debug)] +pub struct StateFacts { + pub name: Arc, + pub emission: u8, + pub dampening: u8, + pub skylight_down: bool, + pub shape_occlusion: bool, + pub can_occlude: bool, + pub solid_render: bool, + pub hardness: f32, + pub requires_tool: bool, + pub replaceable: bool, + pub random_ticks: bool, + pub block_entity: bool, + pub render_shape: RenderShape, + pub full_collision: bool, + pub friction: f32, + pub explosion_resistance: f32, + pub item: Arc, + pub sounds: Sounds, + pub fluid: Fluid, + /// Fluid amount 1..=8 (8 = source/falling surface), 0 when there is no fluid. + pub fluid_level: u8, + pub fluid_falling: bool, + pub waterlogged: bool, +} +pub struct BlockFacts { + pub states: Vec, + pub air: BlockStateId, +} +impl BlockFacts { + pub fn load(root: &Path, registry: &BlockRegistry) -> Result { + let raw: Value = + serde_json::from_reader(BufReader::new(File::open(root.join("gameplay-facts.json"))?))?; + let entries = raw["states"] + .as_array() + .ok_or("missing gameplay state facts")?; + if entries.len() != registry.len() { + return Err("gameplay facts do not match the block registry".into()); + } + let mut names: HashMap> = HashMap::new(); + let mut intern = |s: &str| -> Arc { + names + .entry(s.to_owned()) + .or_insert_with(|| Arc::from(s)) + .clone() + }; + let mut states = Vec::with_capacity(entries.len()); + for (index, entry) in entries.iter().enumerate() { + let id = BlockStateId(index as u32); + if entry["id"].as_u64() != Some(index as u64) { + return Err("gameplay facts are not in registry order".into()); + } + let state = registry.state(id).ok_or("missing registry state")?; + let num = |k: &str| entry[k].as_f64().unwrap_or(0.0); + let flag = |k: &str| entry[k].as_bool().unwrap_or(false); + let sound = &entry["sound"]; + let sound_id = |k: &str| sound[k]["id"].as_str().unwrap_or("").to_owned(); + let prop = |k: &str| state.properties.get(k).map(String::as_str); + let (fluid, fluid_level, fluid_falling) = match state.name.as_str() { + "minecraft:water" | "minecraft:lava" => { + let level: u8 = prop("level").and_then(|v| v.parse().ok()).unwrap_or(0); + let kind = if state.name == "minecraft:water" { + Fluid::Water + } else { + Fluid::Lava + }; + // LiquidBlock: level 0 is the source; 1..7 flowing; >=8 falling. + if level == 0 { + (kind, 8, false) + } else if level >= 8 { + (kind, 8, true) + } else { + (kind, 8 - level, false) + } + } + "minecraft:bubble_column" | "minecraft:kelp" | "minecraft:kelp_plant" + | "minecraft:seagrass" | "minecraft:tall_seagrass" => (Fluid::Water, 8, false), + _ if prop("waterlogged") == Some("true") => (Fluid::Water, 8, false), + _ => (Fluid::None, 0, false), + }; + states.push(StateFacts { + name: intern(&state.name), + emission: num("emission") as u8, + dampening: num("dampening") as u8, + skylight_down: flag("skylight_down"), + shape_occlusion: flag("shape_occlusion"), + can_occlude: flag("can_occlude"), + solid_render: flag("solid_render"), + hardness: num("hardness") as f32, + requires_tool: flag("requires_tool"), + replaceable: flag("replaceable"), + random_ticks: flag("random_ticks"), + block_entity: flag("block_entity"), + render_shape: match entry["render_shape"].as_str() { + Some("INVISIBLE") => RenderShape::Invisible, + Some("ENTITYBLOCK_ANIMATED") => RenderShape::Animated, + _ => RenderShape::Model, + }, + full_collision: flag("full_collision"), + friction: num("friction") as f32, + explosion_resistance: num("explosion_resistance") as f32, + item: intern(entry["item"].as_str().unwrap_or("minecraft:air")), + sounds: Sounds { + volume: sound["volume"].as_f64().unwrap_or(1.0) as f32, + pitch: sound["pitch"].as_f64().unwrap_or(1.0) as f32, + break_sound: intern(&sound_id("break")), + step: intern(&sound_id("step")), + place: intern(&sound_id("place")), + hit: intern(&sound_id("hit")), + fall: intern(&sound_id("fall")), + }, + fluid, + fluid_level, + fluid_falling, + waterlogged: prop("waterlogged") == Some("true"), + }); + } + Ok(Self { + states, + air: registry + .default_state("minecraft:air") + .ok_or("missing air")?, + }) + } + pub fn get(&self, id: BlockStateId) -> &StateFacts { + &self.states[id.0 as usize] + } + pub fn is_air(&self, id: BlockStateId) -> bool { + matches!( + &*self.states[id.0 as usize].name, + "minecraft:air" | "minecraft:cave_air" | "minecraft:void_air" + ) + } +} diff --git a/crates/horizon-client/src/chunk.rs b/crates/horizon-client/src/chunk.rs new file mode 100644 index 000000000..fd20abf21 --- /dev/null +++ b/crates/horizon-client/src/chunk.rs @@ -0,0 +1,150 @@ +//! Resident client chunk storage. Sections are reference-counted so worker +//! threads can mesh and light immutable snapshots while the game thread edits +//! (copy-on-write through `Arc::make_mut`). +use horizon_world::registry::BlockStateId; +use std::sync::Arc; + +pub const MIN_Y: i32 = -64; +pub const HEIGHT: i32 = 384; +pub const SECTIONS: usize = (HEIGHT / 16) as usize; + +#[derive(Clone)] +pub enum Blocks { + Uniform(u16), + Full(Box<[u16; 4096]>), +} +/// Packed light per block: sky light in the high nibble, block light in the low one. +#[derive(Clone)] +pub enum Light { + Uniform(u8), + Full(Box<[u8; 4096]>), +} +#[inline] +pub fn index(x: i32, y: i32, z: i32) -> usize { + ((y & 15) << 8 | (z & 15) << 4 | (x & 15)) as usize +} +#[derive(Clone)] +pub struct Section { + pub blocks: Blocks, + pub light: Light, +} +impl Default for Section { + fn default() -> Self { + Self { + blocks: Blocks::Uniform(0), + light: Light::Uniform(0xF0), + } + } +} +impl Section { + #[inline] + pub fn get(&self, i: usize) -> u16 { + match &self.blocks { + Blocks::Uniform(v) => *v, + Blocks::Full(a) => a[i], + } + } + pub fn set(&mut self, i: usize, v: u16) -> u16 { + match &mut self.blocks { + Blocks::Uniform(u) if *u == v => v, + Blocks::Uniform(u) => { + let old = *u; + let mut a = Box::new([old; 4096]); + a[i] = v; + self.blocks = Blocks::Full(a); + old + } + Blocks::Full(a) => std::mem::replace(&mut a[i], v), + } + } + #[inline] + pub fn light(&self, i: usize) -> u8 { + match &self.light { + Light::Uniform(v) => *v, + Light::Full(a) => a[i], + } + } + pub fn is_uniform(&self, v: u16) -> bool { + match &self.blocks { + Blocks::Uniform(u) => *u == v, + Blocks::Full(a) => a.iter().all(|&b| b == v), + } + } + /// Collapse storage that became uniform. + pub fn compact(&mut self) { + if let Blocks::Full(a) = &self.blocks + && a.iter().all(|&b| b == a[0]) + { + self.blocks = Blocks::Uniform(a[0]); + } + if let Light::Full(a) = &self.light + && a.iter().all(|&b| b == a[0]) + { + self.light = Light::Uniform(a[0]); + } + } +} +#[derive(Clone)] +pub struct Chunk { + pub x: i32, + pub z: i32, + pub sections: Vec>, + /// Biome index per 4x4x4 cell (x,z in 0..4, y in 0..96) into `Biomes`. + pub biomes: Arc>, + /// Highest non-air, light-blocking-or-fluid Y per column (MOTION_BLOCKING-like), for rain/sky. + pub heights: Arc<[i16; 256]>, + pub lit: bool, + /// Newly generated (not loaded from a save): eligible for generation-time spawns. + pub fresh: bool, + /// Block entities read from a save, moved into the world on arrival. + pub block_entities: Vec<((i32, i32, i32), crate::containers::BlockEntity)>, +} +impl Chunk { + pub fn empty(x: i32, z: i32) -> Self { + Self { + x, + z, + sections: (0..SECTIONS).map(|_| Arc::new(Section::default())).collect(), + biomes: Arc::new(vec![0; 16 * (HEIGHT as usize / 4)]), + heights: Arc::new([MIN_Y as i16; 256]), + lit: false, + fresh: false, + block_entities: Vec::new(), + } + } + #[inline] + pub fn get(&self, x: i32, y: i32, z: i32) -> u16 { + let s = (y - MIN_Y) >> 4; + if !(0..SECTIONS as i32).contains(&s) { + return 0; + } + self.sections[s as usize].get(index(x, y, z)) + } + #[inline] + pub fn block(&self, x: i32, y: i32, z: i32) -> BlockStateId { + BlockStateId(u32::from(self.get(x, y, z))) + } + pub fn set(&mut self, x: i32, y: i32, z: i32, v: u16) -> u16 { + let s = (y - MIN_Y) >> 4; + if !(0..SECTIONS as i32).contains(&s) { + return v; + } + Arc::make_mut(&mut self.sections[s as usize]).set(index(x, y, z), v) + } + #[inline] + pub fn light(&self, x: i32, y: i32, z: i32) -> u8 { + let s = (y - MIN_Y) >> 4; + if s < 0 { + return 0; + } + if s >= SECTIONS as i32 { + return 0xF0; + } + self.sections[s as usize].light(index(x, y, z)) + } + #[inline] + pub fn biome(&self, x: i32, y: i32, z: i32) -> u16 { + let qy = ((y - MIN_Y) >> 2).clamp(0, HEIGHT / 4 - 1); + self.biomes[(qy * 16 + ((z & 15) >> 2) * 4 + ((x & 15) >> 2)) as usize] + } +} diff --git a/crates/horizon-client/src/clock.rs b/crates/horizon-client/src/clock.rs new file mode 100644 index 000000000..874fec656 --- /dev/null +++ b/crates/horizon-client/src/clock.rs @@ -0,0 +1,63 @@ +//! Fixed-rate development simulation driver. Rendering consumes elapsed time; +//! a per-frame work cap retains its backlog instead of dropping simulation time. +use std::time::Duration; + +pub const TICK: Duration = Duration::from_millis(50); +#[derive(Default)] +pub struct FixedStep { + pending: Duration, +} +impl FixedStep { + pub fn advance(&mut self, elapsed: Duration) -> u32 { + self.pending += elapsed; + let steps = (self.pending.as_nanos() / TICK.as_nanos()).min(10) as u32; + self.pending -= TICK * steps; + steps + } + pub fn reset(&mut self) { + self.pending = Duration::ZERO; + } + pub fn fraction(&self) -> f64 { + (self.pending.as_secs_f64() / TICK.as_secs_f64()).min(1.0) + } +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn render_schedules_preserve_ticks_and_stall_backlog() { + for schedule in [&[7, 13, 18, 12][..], &[50][..], &[1, 999, 2700, 300][..]] { + let mut clock = FixedStep::default(); + let mut elapsed = Duration::ZERO; + let mut ticks = 0; + for _ in 0..100 { + for &ms in schedule { + let frame = Duration::from_millis(ms); + elapsed += frame; + let count = clock.advance(frame); + assert!(count <= 10); + ticks += count; + } + } + loop { + let count = clock.advance(Duration::ZERO); + ticks += count; + if count == 0 { + break; + } + } + assert_eq!(u128::from(ticks), elapsed.as_nanos() / TICK.as_nanos()); + } + } + #[test] + fn pause_discards_only_explicitly_reset_time() { + let mut clock = FixedStep::default(); + assert_eq!(clock.advance(Duration::from_millis(49)), 0); + assert_eq!(clock.advance(Duration::from_millis(1)), 1); + assert_eq!(clock.advance(Duration::from_millis(24)), 0); + clock.reset(); + assert_eq!(clock.advance(Duration::from_millis(26)), 0); + assert_eq!(clock.advance(Duration::from_millis(24)), 1); + } +} diff --git a/crates/horizon-client/src/collisions.rs b/crates/horizon-client/src/collisions.rs new file mode 100644 index 000000000..6b06c5384 --- /dev/null +++ b/crates/horizon-client/src/collisions.rs @@ -0,0 +1,168 @@ +//! Collision queries against the same resident chunks used by the renderer. +//! The development scene has no entities, block entities or world border. +//! Entity-dependent rules use the defaults for players and the supported mobs. +use crate::{Result, world::World}; +use horizon_core::{ + geometry::{Aabb, Vec3, VoxelShape}, + position::{BlockPos, ChunkPos}, +}; +use horizon_world::{ + block_collision::{BlockCollisionRegistry, DynamicCollisionWorld, ShulkerCollisionState}, + block_collision_scan::{BlockCollisionWorld, CollisionBlock}, + collision::CachedCollisionRegistry, + collision_context::CollisionContext, + dynamic_support::DynamicSupportWorld, + entity_obstruction::EntityIdentity, + fluid::FluidState, + liquid_collision::LiquidCollisionWorld, + nbt::{self, Limits}, + powder_snow_collision::{PowderSnowEntity, PowderSnowWorld}, + registry::BlockRegistry, + world_movement::{ + CollisionCheckRequest, EntityMovementWorld, MovementRequest, no_world_collision, + resolve_world_movement, + }, +}; +use std::{fs, io, path::Path, sync::Arc}; + +pub fn load<'r>(root: &Path, registry: &'r BlockRegistry) -> Result> { + let data = nbt::read_named( + &fs::read(root.join("cached-collision.nbt"))?, + Limits::default(), + )? + .0 + .tag; + let cached = CachedCollisionRegistry::from_nbt(&data, registry)?; + if !cached.has_canonical_identities() { + return Err("scene collisions require canonical shape identities".into()); + } + Ok(BlockCollisionRegistry::new(Arc::new(cached))?) +} + +pub struct SceneCollisions<'w, 'r> { + pub world: &'w World, + pub binding: &'w BlockCollisionRegistry<'r>, +} +impl SceneCollisions<'_, '_> { + /// Position contexts permit geometric movement probes without inventing a + /// player, inventory, effects or fluid-standing behavior. + pub fn resolve( + &mut self, + bounds: Aabb, + movement: Vec3, + max_step: f32, + on_ground: bool, + ) -> Result { + Ok(resolve_world_movement( + self, + MovementRequest { + entity: EntityIdentity(0), + context: CollisionContext::position(bounds.min_position().y), + bounds, + movement, + max_step, + on_ground, + candidate_budget: 1_000_000, + }, + )?) + } + pub fn unobstructed(&mut self, bounds: Aabb) -> Result { + Ok(no_world_collision( + self, + CollisionCheckRequest { + entity: EntityIdentity(0), + context: CollisionContext::position(bounds.min_position().y), + bounds, + candidate_budget: 1_000_000, + }, + )?) + } +} +impl BlockCollisionWorld for SceneCollisions<'_, '_> { + type Error = io::Error; + type Chunk = ChunkPos; + fn collision_chunk(&mut self, p: ChunkPos) -> io::Result> { + Ok(self.world.chunks.contains_key(&(p.x, p.z)).then_some(p)) + } + fn collision_block(&mut self, chunk: ChunkPos, p: BlockPos) -> io::Result { + let chunk = self + .world + .chunks + .get(&(chunk.x, chunk.z)) + .ok_or_else(|| io::Error::other("resident collision chunk disappeared"))?; + self.binding.collision_block(chunk.block(p.x, p.y, p.z)) + } + fn is_suffocating(&mut self, _: ChunkPos, _: CollisionBlock, _: BlockPos) -> io::Result { + Ok(false) + } + fn context_shape( + &mut self, + block: CollisionBlock, + p: BlockPos, + context: &CollisionContext<'_>, + ) -> io::Result { + self.binding + .collision_shape_with_context(self, block.state, p, context) + .map_err(io::Error::other) + } +} +impl EntityMovementWorld for SceneCollisions<'_, '_> { + type Error = io::Error; + fn entity_collisions(&mut self, _: EntityIdentity, _: Aabb) -> io::Result> { + Ok(Vec::new()) + } + fn movement_border(&mut self, _: EntityIdentity, _: Aabb) -> io::Result> { + Ok(None) + } +} +impl DynamicSupportWorld for SceneCollisions<'_, '_> { + type Error = io::Error; + fn shulker_is_closed(&mut self, _: [i32; 3]) -> io::Result> { + Ok(None) + } + fn moving_piston_shape(&mut self, _: [i32; 3]) -> io::Result> { + Ok(None) + } +} +impl DynamicCollisionWorld for SceneCollisions<'_, '_> { + fn shulker_collision_state( + &mut self, + _: [i32; 3], + ) -> io::Result> { + Ok(None) + } +} +impl LiquidCollisionWorld for SceneCollisions<'_, '_> { + type Error = io::Error; + /// Players and the supported mobs cannot stand on fluids (no striders). + fn entity_liquid_shape(&mut self, _: EntityIdentity) -> io::Result { + Ok(VoxelShape::empty()) + } + fn fluid(&mut self, p: BlockPos) -> io::Result { + FluidState::from_block( + self.binding + .registry() + .state(self.world.block(p.x, p.y, p.z)) + .ok_or_else(|| io::Error::other("scene fluid state outside registry"))?, + ) + } + fn entity_can_stand(&mut self, _: EntityIdentity, _: FluidState) -> io::Result { + Ok(false) + } +} +impl PowderSnowWorld for SceneCollisions<'_, '_> { + type Error = io::Error; + // Entities here are never falling blocks and wear no leather boots. + fn powder_snow_entity(&mut self, _: EntityIdentity) -> io::Result { + Ok(PowderSnowEntity { + fall_distance: 0.0, + falling_block: false, + }) + } + fn powder_snow_walkable_tag(&mut self, _: EntityIdentity) -> io::Result { + Ok(false) + } + fn feet_are_leather_boots(&mut self, _: EntityIdentity) -> io::Result { + Ok(false) + } +} diff --git a/crates/horizon-client/src/containers.rs b/crates/horizon-client/src/containers.rs new file mode 100644 index 000000000..2eed1860c --- /dev/null +++ b/crates/horizon-client/src/containers.rs @@ -0,0 +1,255 @@ +//! Container block entities: chests/barrels (27 slots) and the three furnace +//! kinds, ticking as `AbstractFurnaceBlockEntity.serverTick` with fuel times +//! from the data-driven `context_int_provider`/`context_float_provider` files. +use crate::{ + crafting::Recipes, + items::{ItemStack, Items}, +}; +use serde_json::Value; +use std::{collections::HashMap, fs, path::Path, sync::Arc}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FurnaceKind { + Furnace, + BlastFurnace, + Smoker, +} +impl FurnaceKind { + pub fn recipe_type(self) -> &'static str { + match self { + Self::Furnace => "minecraft:smelting", + Self::BlastFurnace => "minecraft:blasting", + Self::Smoker => "minecraft:smoking", + } + } + pub fn fast(self) -> bool { + self != Self::Furnace + } + pub fn from_block(name: &str) -> Option { + match name { + "minecraft:furnace" => Some(Self::Furnace), + "minecraft:blast_furnace" => Some(Self::BlastFurnace), + "minecraft:smoker" => Some(Self::Smoker), + _ => None, + } + } +} +#[derive(Clone, Debug)] +pub struct Furnace { + pub kind: FurnaceKind, + /// input, fuel, result + pub items: [Option; 3], + pub lit_remaining: i32, + pub lit_total: i32, + pub cooking_timer: i32, + pub cooking_total: i32, + pub speed: f32, +} +#[derive(Clone, Debug)] +pub enum BlockEntity { + Chest(Vec>), + Furnace(Furnace), +} +impl BlockEntity { + pub fn for_block(name: &str) -> Option { + if let Some(kind) = FurnaceKind::from_block(name) { + return Some(Self::Furnace(Furnace { + kind, + items: [None, None, None], + lit_remaining: 0, + lit_total: 0, + cooking_timer: 0, + cooking_total: 200, + speed: 1.0, + })); + } + matches!( + name, + "minecraft:chest" | "minecraft:trapped_chest" | "minecraft:barrel" + ) + .then(|| Self::Chest(vec![None; 27])) + } + pub fn id(&self) -> &'static str { + match self { + Self::Chest(_) => "minecraft:chest", + Self::Furnace(f) => match f.kind { + FurnaceKind::Furnace => "minecraft:furnace", + FurnaceKind::BlastFurnace => "minecraft:blast_furnace", + FurnaceKind::Smoker => "minecraft:smoker", + }, + } + } + pub fn contents(&self) -> Vec { + match self { + Self::Chest(items) => items.iter().flatten().cloned().collect(), + Self::Furnace(f) => f.items.iter().flatten().cloned().collect(), + } + } + pub fn slots_mut(&mut self) -> &mut [Option] { + match self { + Self::Chest(items) => items, + Self::Furnace(f) => &mut f.items, + } + } +} +/// Evaluator for `context_int_provider` / `context_float_provider` values. +pub struct Providers { + ints: HashMap, + floats: HashMap, +} +fn load_dir(dir: &Path, prefix: &str, out: &mut HashMap) { + let Ok(entries) = fs::read_dir(dir) else { return }; + for e in entries.flatten() { + let p = e.path(); + let name = p.file_stem().and_then(|s| s.to_str()).unwrap_or("").to_owned(); + if p.is_dir() { + load_dir(&p, &format!("{prefix}{name}/"), out); + } else if let Ok(bytes) = fs::read(&p) + && let Ok(v) = serde_json::from_slice(&bytes) + { + out.insert(format!("minecraft:{prefix}{name}"), v); + } + } +} +impl Providers { + pub fn load(root: &Path) -> Self { + let mut ints = HashMap::new(); + let mut floats = HashMap::new(); + load_dir(&root.join("data/minecraft/context_int_provider"), "", &mut ints); + load_dir(&root.join("data/minecraft/context_float_provider"), "", &mut floats); + Self { ints, floats } + } + fn eval(&self, v: &Value, fast: bool, table: &HashMap, depth: u32) -> f64 { + if depth > 16 { + return 0.0; + } + match v { + Value::Number(n) => n.as_f64().unwrap_or(0.0), + Value::String(name) => table.get(name).map_or(0.0, |v| self.eval(v, fast, table, depth + 1)), + Value::Object(o) => { + let f = |k: &str| self.eval(o.get(k).unwrap_or(&Value::Null), fast, table, depth + 1); + match o.get("type").and_then(Value::as_str).unwrap_or("") { + "minecraft:div" => { + let r = f("right"); + if r == 0.0 { 0.0 } else { (f("left") / r).trunc() } + } + "minecraft:mul" => f("left") * f("right"), + "minecraft:add" | "minecraft:sum" => f("left") + f("right"), + "minecraft:sub" => f("left") - f("right"), + "minecraft:constant" => f("value"), + "minecraft:conditional" => { + // The only condition in the pinned data: block/fast_cooking. + let condition = o.get("condition").and_then(Value::as_str) == Some("minecraft:block/fast_cooking"); + if condition && fast { f("on_true") } else { f("on_false") } + } + _ => 0.0, + } + } + _ => 0.0, + } + } + pub fn burn_time(&self, items: &Items, stack: &ItemStack, fast: bool) -> i32 { + items + .get(&stack.item) + .and_then(|i| i.fuel.as_ref()) + .map_or(0, |(time, _)| self.eval(time, fast, &self.ints, 0) as i32) + } + pub fn speed(&self, items: &Items, stack: &ItemStack, fast: bool) -> f32 { + items + .get(&stack.item) + .and_then(|i| i.fuel.as_ref()) + .map_or(1.0, |(_, speed)| self.eval(speed, fast, &self.floats, 0) as f32) + } +} +fn remainder(item: &str) -> Option<&'static str> { + match item { + "minecraft:lava_bucket" | "minecraft:water_bucket" | "minecraft:milk_bucket" => Some("minecraft:bucket"), + _ => None, + } +} +impl Furnace { + /// One server tick. Returns `Some(lit)` when the LIT block state must change. + pub fn tick(&mut self, recipes: &Recipes, items: &Items, providers: &Providers) -> Option { + let was_lit = self.lit_remaining > 0; + let mut lit = false; + if self.lit_remaining > 0 { + self.lit_remaining -= 1; + lit = self.lit_remaining > 0; + } + let fast = self.kind.fast(); + let has_ingredient = self.items[0].is_some(); + let has_fuel = self.items[1].is_some(); + if lit || has_fuel && has_ingredient { + if let Some(ingredient) = self.items[0].clone() { + if let Some(recipe) = recipes.cook(self.kind.recipe_type(), &ingredient).cloned() { + if self.cooking_timer == 0 { + self.cooking_total = total_time(recipe.time, self.speed); + } + let max = items.get(&recipe.result.item).map_or(64, |i| i.max_stack); + let can_burn = match &self.items[2] { + None => true, + Some(out) => out.item == recipe.result.item && out.count + recipe.result.count <= max, + }; + if can_burn { + if !lit { + let fuel = self.items[1].clone(); + let time = fuel.as_ref().map_or(0, |f| providers.burn_time(items, f, fast)); + let speed = fuel.as_ref().map_or(1.0, |f| providers.speed(items, f, fast)); + self.lit_remaining = time; + self.lit_total = time; + self.speed = speed; + if self.cooking_total > 0 && self.cooking_timer < self.cooking_total { + let ratio = self.cooking_timer as f32 / self.cooking_total as f32; + self.cooking_total = total_time(recipe.time, self.speed); + self.cooking_timer = (ratio * self.cooking_total as f32).ceil() as i32; + } + if time > 0 { + if let Some(f) = self.items[1].as_mut() { + let item = f.item.clone(); + f.count -= 1; + if f.count == 0 { + self.items[1] = remainder(&item).map(|r| ItemStack { item: Arc::from(r), count: 1, damage: 0 }); + } + } + lit = true; + } + } + if lit { + self.cooking_timer += 1; + if self.cooking_timer >= self.cooking_total { + self.cooking_timer = 0; + self.cooking_total = total_time(recipe.time, self.speed); + match &mut self.items[2] { + Some(out) => out.count += recipe.result.count, + None => self.items[2] = Some(recipe.result.clone()), + } + if let Some(i) = self.items[0].as_mut() { + i.count -= 1; + if i.count == 0 { + self.items[0] = None; + } + } + } + } else { + self.cooking_timer = 0; + } + } else { + self.cooking_timer = 0; + } + } + } else { + self.cooking_timer = 0; + } + } else if self.cooking_timer > 0 { + self.cooking_timer = (self.cooking_timer - 2).clamp(0, self.cooking_total); + } + (was_lit != lit).then_some(lit) + } +} +fn total_time(time: u32, speed: f32) -> i32 { + if speed > 0.0 { + (time as f32 / speed).ceil() as i32 + } else { + time as i32 + } +} diff --git a/crates/horizon-client/src/control.rs b/crates/horizon-client/src/control.rs new file mode 100644 index 000000000..eb8c6a619 --- /dev/null +++ b/crates/horizon-client/src/control.rs @@ -0,0 +1,137 @@ +//! Local control socket: lets a script or `horizon-ctl` drive a running game. +//! +//! Each connection sends commands as text lines and receives one JSON line per +//! command. Commands are executed on the game thread between frames; replies +//! that depend on a later frame (screenshots, benchmarks) arrive when ready. +use std::{ + io::{BufRead, BufReader, Write}, + os::unix::net::{UnixListener, UnixStream}, + path::{Path, PathBuf}, + sync::mpsc, + thread, +}; + +/// One command line from a client, with the channel for its JSON reply. +pub struct Request { + pub line: String, + pub reply: mpsc::Sender, +} + +pub struct Server { + path: PathBuf, + requests: mpsc::Receiver, +} + +/// `$HORIZON_CONTROL`, else `horizon-control.sock` in the user's runtime directory. +pub fn default_path() -> PathBuf { + if let Some(path) = std::env::var_os("HORIZON_CONTROL") { + return path.into(); + } + let dir = std::env::var_os("XDG_RUNTIME_DIR").map_or_else(std::env::temp_dir, PathBuf::from); + dir.join("horizon-control.sock") +} + +impl Server { + pub fn start(path: &Path) -> std::io::Result { + // A socket left by a crashed game refuses connections; replace it. + if path.exists() && UnixStream::connect(path).is_err() { + std::fs::remove_file(path)?; + } + let listener = UnixListener::bind(path)?; + let (sender, requests) = mpsc::channel(); + thread::Builder::new() + .name("horizon-control".into()) + .spawn(move || { + for stream in listener.incoming().flatten() { + let sender = sender.clone(); + let _ = thread::Builder::new() + .name("horizon-control-client".into()) + .spawn(move || serve(stream, &sender)); + } + })?; + Ok(Self { + path: path.to_owned(), + requests, + }) + } + pub fn path(&self) -> &Path { + &self.path + } + pub fn try_recv(&self) -> Option { + self.requests.try_recv().ok() + } +} + +impl Drop for Server { + fn drop(&mut self) { + let _ = std::fs::remove_file(&self.path); + } +} + +fn serve(stream: UnixStream, sender: &mpsc::Sender) { + let Ok(mut writer) = stream.try_clone() else { + return; + }; + for line in BufReader::new(stream).lines() { + let Ok(line) = line else { return }; + if line.trim().is_empty() { + continue; + } + let (reply, response) = mpsc::channel(); + if sender.send(Request { line, reply }).is_err() { + return; + } + // The game dropping the reply sender means it exited mid-command. + let text = response + .recv() + .unwrap_or_else(|_| r#"{"error":"game exited"}"#.to_owned()); + if writeln!(writer, "{text}").is_err() { + return; + } + } +} + +/// Frame durations since the last reset, summarized like the Java recorder. +#[derive(Default)] +pub struct FrameStats { + millis: Vec, +} + +impl FrameStats { + const LIMIT: usize = 1 << 20; + pub fn record(&mut self, millis: f32) { + if self.millis.len() < Self::LIMIT { + self.millis.push(millis); + } + } + pub fn reset(&mut self) { + self.millis.clear(); + } + pub fn summary(&self) -> serde_json::Value { + let mut sorted = self.millis.clone(); + sorted.sort_by(f32::total_cmp); + let n = sorted.len(); + if n == 0 { + return serde_json::json!({ "frames": 0 }); + } + let total: f64 = sorted.iter().map(|&m| f64::from(m)).sum(); + let percentile = |p: f64| sorted[((n as f64 * p).ceil() as usize).clamp(1, n) - 1]; + // Average frame time of the slowest 1% of frames, as frames per second. + let slowest = n.div_ceil(100); + let slow: f64 = sorted[n - slowest..] + .iter() + .map(|&m| f64::from(m)) + .sum::() + / slowest as f64; + serde_json::json!({ + "frames": n, + "seconds": total / 1000.0, + "avg_fps": n as f64 * 1000.0 / total, + "low_1pct_fps": 1000.0 / slow, + "p50_ms": percentile(0.5), + "p95_ms": percentile(0.95), + "p99_ms": percentile(0.99), + "max_ms": sorted[n - 1], + }) + } +} diff --git a/crates/horizon-client/src/crafting.rs b/crates/horizon-client/src/crafting.rs new file mode 100644 index 000000000..6d2c876b3 --- /dev/null +++ b/crates/horizon-client/src/crafting.rs @@ -0,0 +1,204 @@ +//! Crafting and cooking recipes from the pinned data pack: shaped patterns +//! (placed anywhere in the grid, optionally mirrored as in +//! `ShapedRecipePattern.matches`), shapeless ingredient sets, and furnace-type +//! cooking lookups. +use crate::{Result, items::{ItemStack, Items}}; +use serde_json::Value; +use std::{collections::HashSet, fs, path::Path, sync::Arc}; + +/// A set of accepted items (expanded from an item, list or tag). +#[derive(Clone, Debug)] +pub struct Ingredient(pub HashSet); +impl Ingredient { + fn parse(v: &Value, items: &Items) -> Option { + let mut set = HashSet::new(); + let mut add = |s: &str| { + if let Some(tag) = s.strip_prefix('#') { + set.extend(items.item_tags.get(tag).into_iter().flatten().cloned()); + } else { + set.insert(s.to_owned()); + } + }; + match v { + Value::String(s) => add(s), + Value::Array(a) => a.iter().filter_map(Value::as_str).for_each(&mut add), + Value::Object(o) => { + if let Some(s) = o.get("item").and_then(Value::as_str) { + add(s); + } + if let Some(t) = o.get("tag").and_then(Value::as_str) { + add(&format!("#{t}")); + } + } + _ => return None, + } + (!set.is_empty()).then_some(Self(set)) + } + pub fn test(&self, stack: &ItemStack) -> bool { + self.0.contains(&*stack.item) + } +} +#[derive(Clone, Debug)] +pub enum Recipe { + Shaped { + width: usize, + height: usize, + cells: Vec>, + result: ItemStack, + }, + Shapeless { + ingredients: Vec, + result: ItemStack, + }, +} +#[derive(Clone, Debug)] +pub struct Cooking { + pub kind: String, + pub ingredient: Ingredient, + pub result: ItemStack, + pub experience: f32, + pub time: u32, +} +pub struct Recipes { + pub crafting: Vec<(String, Recipe)>, + pub cooking: Vec, +} +fn result(v: &Value) -> Option { + Some(ItemStack { + item: Arc::from(v["id"].as_str()?), + count: v["count"].as_u64().unwrap_or(1) as u32, + damage: 0, + }) +} +impl Recipes { + pub fn load(root: &Path, items: &Items) -> Result { + let mut crafting = Vec::new(); + let mut cooking = Vec::new(); + let mut files: Vec<_> = fs::read_dir(root.join("data/minecraft/recipe"))? + .flatten() + .map(|e| e.path()) + .filter(|p| p.extension().is_some_and(|e| e == "json")) + .collect(); + files.sort(); + for path in files { + let name = path.file_stem().and_then(|s| s.to_str()).unwrap_or("").to_owned(); + let v: Value = serde_json::from_slice(&fs::read(&path)?)?; + match v["type"].as_str().unwrap_or("") { + "minecraft:crafting_shaped" => { + let pattern: Vec> = v["pattern"] + .as_array() + .into_iter() + .flatten() + .filter_map(|r| r.as_str().map(|s| s.chars().collect())) + .collect(); + let height = pattern.len(); + let width = pattern.iter().map(Vec::len).max().unwrap_or(0); + let mut cells = Vec::with_capacity(width * height); + let mut ok = true; + for row in &pattern { + for x in 0..width { + let c = row.get(x).copied().unwrap_or(' '); + if c == ' ' { + cells.push(None); + } else { + match Ingredient::parse(&v["key"][c.to_string()], items) { + Some(i) => cells.push(Some(i)), + None => ok = false, + } + } + } + } + if let (true, Some(result)) = (ok, result(&v["result"])) { + crafting.push((name, Recipe::Shaped { width, height, cells, result })); + } + } + "minecraft:crafting_shapeless" => { + let ingredients: Option> = v["ingredients"] + .as_array() + .into_iter() + .flatten() + .map(|i| Ingredient::parse(i, items)) + .collect(); + if let (Some(ingredients), Some(result)) = (ingredients, result(&v["result"])) { + crafting.push((name, Recipe::Shapeless { ingredients, result })); + } + } + kind @ ("minecraft:smelting" | "minecraft:blasting" | "minecraft:smoking" | "minecraft:campfire_cooking") => { + if let (Some(ingredient), Some(result)) = (Ingredient::parse(&v["ingredient"], items), result(&v["result"])) { + cooking.push(Cooking { + kind: kind.to_owned(), + ingredient, + result, + experience: v["experience"].as_f64().unwrap_or(0.0) as f32, + time: v["cookingtime"].as_u64().unwrap_or(200) as u32, + }); + } + } + _ => {} + } + } + Ok(Self { crafting, cooking }) + } + /// Match a `size`x`size` grid (row-major) against the crafting recipes. + pub fn craft(&self, grid: &[Option], size: usize) -> Option { + // Trim to the occupied bounding box. + let occupied: Vec<(usize, usize)> = (0..size * size) + .filter(|&i| grid[i].is_some()) + .map(|i| (i % size, i / size)) + .collect(); + if occupied.is_empty() { + return None; + } + let (x0, x1) = (occupied.iter().map(|p| p.0).min()?, occupied.iter().map(|p| p.0).max()?); + let (y0, y1) = (occupied.iter().map(|p| p.1).min()?, occupied.iter().map(|p| p.1).max()?); + let (w, h) = (x1 - x0 + 1, y1 - y0 + 1); + let cell = |x: usize, y: usize| grid[(y0 + y) * size + x0 + x].as_ref(); + for (_, recipe) in &self.crafting { + match recipe { + Recipe::Shaped { width, height, cells, result } => { + if *width != w || *height != h { + continue; + } + let matches = |mirror: bool| { + (0..h).all(|y| { + (0..w).all(|x| { + let rx = if mirror { w - 1 - x } else { x }; + match (&cells[y * w + rx], cell(x, y)) { + (None, None) => true, + (Some(i), Some(s)) => i.test(s), + _ => false, + } + }) + }) + }; + if matches(false) || matches(true) { + return Some(result.clone()); + } + } + Recipe::Shapeless { ingredients, result } => { + let stacks: Vec<&ItemStack> = grid.iter().flatten().collect(); + if stacks.len() != ingredients.len() { + continue; + } + // Greedy bipartite matching is sufficient for vanilla's ingredient sets. + let mut used = vec![false; stacks.len()]; + let ok = ingredients.iter().all(|ingredient| { + if let Some(i) = (0..stacks.len()).find(|&i| !used[i] && ingredient.test(stacks[i])) { + used[i] = true; + true + } else { + false + } + }); + if ok { + return Some(result.clone()); + } + } + } + } + None + } + pub fn cook(&self, kind: &str, input: &ItemStack) -> Option<&Cooking> { + self.cooking.iter().find(|c| c.kind == kind && c.ingredient.test(input)) + } +} diff --git a/crates/horizon-client/src/creative.rs b/crates/horizon-client/src/creative.rs new file mode 100644 index 000000000..331ca794f --- /dev/null +++ b/crates/horizon-client/src/creative.rs @@ -0,0 +1,112 @@ +//! Creative inventory (CreativeModeInventoryScreen): vanilla's tabs and their +//! contents as built by the game's own display generators +//! (`creative-tabs.json`), a 9x5 scrolling grid and the search tab. +use crate::Result; +use serde_json::Value; +use std::{collections::HashMap, fs, path::Path}; + +#[derive(Clone, Debug)] +pub struct Tab { + pub id: String, + pub title: String, + pub icon: String, + pub items: Vec, + pub top: bool, + pub column: u32, + pub search: bool, + pub inventory: bool, +} +pub struct Creative { + pub tabs: Vec, + pub selected: usize, + /// Scroll position 0..1. + pub scroll: f32, + pub search: String, + all_items: Vec, +} +/// Display names from the pinned en_us language file. +pub struct Names { + map: HashMap, +} +impl Names { + pub fn load(root: &Path) -> Self { + let map = fs::read(root.join("assets/minecraft/lang/en_us.json")) + .ok() + .and_then(|b| serde_json::from_slice::>(&b).ok()) + .unwrap_or_default(); + Self { map } + } + pub fn item(&self, id: &str) -> String { + let path = id.trim_start_matches("minecraft:"); + self.map + .get(&format!("item.minecraft.{path}")) + .or_else(|| self.map.get(&format!("block.minecraft.{path}"))) + .cloned() + .unwrap_or_else(|| path.replace('_', " ")) + } + pub fn get(&self, key: &str) -> Option<&str> { + self.map.get(key).map(String::as_str) + } +} +impl Creative { + pub const WIDTH: f32 = 195.0; + pub const HEIGHT: f32 = 136.0; + pub fn load(root: &Path) -> Result { + let raw: Value = serde_json::from_slice(&fs::read(root.join("creative-tabs.json"))?)?; + let mut tabs = Vec::new(); + let mut all_items: Vec = Vec::new(); + for t in raw.as_array().into_iter().flatten() { + let items: Vec = t["items"].as_array().into_iter().flatten().filter_map(|v| v.as_str().map(str::to_owned)).collect(); + for i in &items { + if !all_items.contains(i) { + all_items.push(i.clone()); + } + } + let kind = t["type"].as_str().unwrap_or(""); + if t["id"] == "minecraft:hotbar" || t["id"] == "minecraft:op_blocks" { + continue; + } + tabs.push(Tab { + id: t["id"].as_str().unwrap_or("").to_owned(), + title: t["title"].as_str().unwrap_or("").to_owned(), + icon: t["icon"].as_str().unwrap_or("minecraft:stone").to_owned(), + items, + top: t["row"] == "TOP", + column: t["column"].as_u64().unwrap_or(0) as u32, + search: kind == "SEARCH", + inventory: kind == "INVENTORY", + }); + } + Ok(Self { tabs, selected: 0, scroll: 0.0, search: String::new(), all_items }) + } + pub fn tab(&self) -> &Tab { + &self.tabs[self.selected.min(self.tabs.len() - 1)] + } + /// Items shown by the selected tab (the search tab filters by name). + pub fn items(&self, names: &Names) -> Vec { + let tab = self.tab(); + if tab.search { + let query = self.search.to_lowercase(); + return self.all_items.iter().filter(|i| query.is_empty() || names.item(i).to_lowercase().contains(&query) || i.contains(&query)).cloned().collect(); + } + tab.items.clone() + } + pub fn rows(&self, names: &Names) -> usize { + self.items(names).len().div_ceil(9) + } + /// First visible grid row for the scroll position. + pub fn first_row(&self, names: &Names) -> usize { + let hidden = self.rows(names).saturating_sub(5); + (self.scroll * hidden as f32 + 0.5) as usize + } + /// Tab button position relative to the screen origin (CreativeModeInventoryScreen.getTabX/Y). + pub fn tab_position(tab: &Tab) -> (f32, f32) { + let mut x = tab.column as f32 * 27.0; + if tab.column >= 5 { + // Right-aligned tabs (search, inventory). + x = Self::WIDTH - 27.0 * (7 - tab.column) as f32 + 1.0; + } + let y = if tab.top { -28.0 } else { Self::HEIGHT - 4.0 }; + (x, y) + } +} diff --git a/crates/horizon-client/src/entities.rs b/crates/horizon-client/src/entities.rs new file mode 100644 index 000000000..98fec0e91 --- /dev/null +++ b/crates/horizon-client/src/entities.rs @@ -0,0 +1,260 @@ +//! Non-player entities simulated on the client world. Dropped items follow +//! `ItemEntity.tick`: gravity 0.04, 0.98 drag (block friction on the ground), +//! a ground bounce of -0.5, water buoyancy, pickup delay and 6000-tick despawn. +use crate::{ + blocks::{BlockFacts, Fluid}, + collisions::SceneCollisions, + items::ItemStack, + world::World, +}; +use horizon_core::geometry::{Aabb, Vec3}; +use horizon_world::block_collision::BlockCollisionRegistry; + +#[derive(Clone, Debug)] +pub struct ItemEntity { + pub id: u32, + pub stack: ItemStack, + pub position: Vec3, + pub previous: Vec3, + pub velocity: Vec3, + pub on_ground: bool, + pub age: u32, + pub pickup_delay: u32, + pub bob_offset: f32, +} +impl ItemEntity { + pub const WIDTH: f64 = 0.25; + pub fn bounds(&self) -> Aabb { + let h = Self::WIDTH / 2.0; + Aabb::new( + Vec3::new(self.position.x - h, self.position.y, self.position.z - h), + Vec3::new(self.position.x + h, self.position.y + Self::WIDTH, self.position.z + h), + ) + } + /// Returns false when the item should be removed. + pub fn tick( + &mut self, + world: &World, + facts: &BlockFacts, + collision: &BlockCollisionRegistry<'_>, + ) -> bool { + self.previous = self.position; + if self.pickup_delay > 0 && self.pickup_delay != u32::MAX { + self.pickup_delay -= 1; + } + let eye = world.block( + self.position.x.floor() as i32, + (self.position.y + 0.1).floor() as i32, + self.position.z.floor() as i32, + ); + let in_water = facts.get(eye).fluid == Fluid::Water; + if in_water { + // ItemEntity.setUnderwaterMovement + self.velocity = Vec3::new( + self.velocity.x * 0.99, + self.velocity.y + if self.velocity.y < 0.06 { 5.0e-4 } else { 0.0 }, + self.velocity.z * 0.99, + ); + } else { + self.velocity.y -= 0.04; + } + let horizontal = self.velocity.x * self.velocity.x + self.velocity.z * self.velocity.z; + if !self.on_ground || horizontal > 1.0e-5 || (self.age + self.id) % 4 == 0 { + let mut scene = SceneCollisions { world, binding: collision }; + let wanted = self.velocity; + let moved = scene + .resolve(self.bounds(), wanted, 0.0, self.on_ground) + .unwrap_or(Vec3::ZERO); + self.position = Vec3::new( + self.position.x + moved.x, + self.position.y + moved.y, + self.position.z + moved.z, + ); + self.on_ground = wanted.y < 0.0 && moved.y != wanted.y; + if moved.x != wanted.x { + self.velocity.x = 0.0; + } + if moved.z != wanted.z { + self.velocity.z = 0.0; + } + if moved.y != wanted.y { + self.velocity.y = 0.0; + } + let mut friction = 0.98; + if self.on_ground { + let below = world.block( + self.position.x.floor() as i32, + (self.position.y - 0.999_999).floor() as i32, + self.position.z.floor() as i32, + ); + friction = f64::from(facts.get(below).friction) * 0.98; + } + self.velocity = Vec3::new(self.velocity.x * friction, self.velocity.y * 0.98, self.velocity.z * friction); + if self.on_ground && self.velocity.y < 0.0 { + self.velocity.y *= -0.5; + } + } + self.age += 1; + self.age < 6000 && self.position.y > -128.0 + } +} +/// Arrows (`AbstractArrow.tick`): 0.99 drag, 0.05 gravity, sticking in blocks. +#[derive(Clone, Debug)] +pub struct Arrow { + /// Shot by the player (hits mobs) rather than a mob (hits the player). + pub from_player: bool, + pub critical: bool, + pub position: Vec3, + pub previous: Vec3, + pub velocity: Vec3, + pub stuck: bool, + pub age: u32, + pub base_damage: f64, +} +pub enum ArrowHit { + None, + Player(f32), +} +impl Arrow { + pub fn tick(&mut self, world: &World, facts: &BlockFacts, player: Option) -> (bool, ArrowHit) { + self.previous = self.position; + self.age += 1; + if self.stuck { + return (self.age < 1200, ArrowHit::None); + } + let steps = 4; + for _ in 0..steps { + let next = Vec3::new( + self.position.x + self.velocity.x / f64::from(steps), + self.position.y + self.velocity.y / f64::from(steps), + self.position.z + self.velocity.z / f64::from(steps), + ); + if let Some(b) = player { + let (min, max) = (b.min_position(), b.max_position()); + if next.x >= min.x && next.x <= max.x && next.y >= min.y && next.y <= max.y && next.z >= min.z && next.z <= max.z { + let speed = (self.velocity.x.powi(2) + self.velocity.y.powi(2) + self.velocity.z.powi(2)).sqrt(); + // AbstractArrow.onHitEntity: ceil(speed * baseDamage). + let damage = (speed * self.base_damage).ceil().max(0.0) as f32; + return (false, ArrowHit::Player(damage)); + } + } + let block = world.block(next.x.floor() as i32, next.y.floor() as i32, next.z.floor() as i32); + if facts.get(block).full_collision { + self.stuck = true; + self.age = 0; + return (true, ArrowHit::None); + } + self.position = next; + } + self.velocity = Vec3::new(self.velocity.x * 0.99, self.velocity.y * 0.99 - 0.05, self.velocity.z * 0.99); + (self.position.y > -128.0 && self.age < 1200, ArrowHit::None) + } +} +/// ExperienceOrb: gravity 0.03, homing towards the player within 8 blocks. +#[derive(Clone, Debug)] +pub struct ExperienceOrb { + pub position: Vec3, + pub previous: Vec3, + pub velocity: Vec3, + pub value: u32, + pub age: u32, + pub on_ground: bool, +} +impl ExperienceOrb { + /// ExperienceOrb.getExperienceValue: the largest orb size not above `value`. + pub fn split(value: u32) -> u32 { + [2477, 1237, 617, 307, 149, 73, 37, 17, 7, 3, 1] + .into_iter() + .find(|&v| value >= v) + .unwrap_or(1) + } + /// ExperienceOrb.getIcon + pub fn icon(&self) -> u32 { + match self.value { + 2477.. => 10, + 1237.. => 9, + 617.. => 8, + 307.. => 7, + 149.. => 6, + 73.. => 5, + 37.. => 4, + 17.. => 3, + 7.. => 2, + 3.. => 1, + _ => 0, + } + } + pub fn tick(&mut self, world: &World, facts: &BlockFacts, collision: &BlockCollisionRegistry<'_>, player: Option<[f64; 3]>) -> bool { + self.previous = self.position; + let block = world.block(self.position.x.floor() as i32, self.position.y.floor() as i32, self.position.z.floor() as i32); + if facts.get(block).fluid == Fluid::Water { + self.velocity = Vec3::new(self.velocity.x * 0.99, (self.velocity.y + 5.0e-4).min(0.06), self.velocity.z * 0.99); + } else { + self.velocity.y -= 0.03; + } + if let Some(p) = player { + let d = [(p[0] - self.position.x) / 8.0, (p[1] - self.position.y) / 8.0, (p[2] - self.position.z) / 8.0]; + let length = (d[0] * d[0] + d[1] * d[1] + d[2] * d[2]).sqrt(); + let power = 1.0 - length; + if power > 0.0 && length > 1e-6 { + let power = power * power; + self.velocity = Vec3::new( + self.velocity.x + d[0] / length * power * 0.1, + self.velocity.y + d[1] / length * power * 0.1, + self.velocity.z + d[2] / length * power * 0.1, + ); + } + } + let h = 0.25; + let bounds = Aabb::new( + Vec3::new(self.position.x - h, self.position.y, self.position.z - h), + Vec3::new(self.position.x + h, self.position.y + 0.5, self.position.z + h), + ); + let mut scene = SceneCollisions { world, binding: collision }; + let wanted = self.velocity; + let moved = scene.resolve(bounds, wanted, 0.0, self.on_ground).unwrap_or(Vec3::ZERO); + self.position = Vec3::new(self.position.x + moved.x, self.position.y + moved.y, self.position.z + moved.z); + self.on_ground = wanted.y < 0.0 && moved.y != wanted.y; + let mut friction = 0.98; + if self.on_ground { + let below = world.block(self.position.x.floor() as i32, (self.position.y - 1.0).floor() as i32, self.position.z.floor() as i32); + friction = f64::from(facts.get(below).friction) * 0.98; + } + self.velocity = Vec3::new(self.velocity.x * friction, self.velocity.y * 0.98, self.velocity.z * friction); + if self.on_ground { + self.velocity.y *= -0.9; + } + self.age += 1; + self.age < 6000 + } +} +/// Player experience (Player.giveExperiencePoints / getXpNeededForNextLevel). +#[derive(Clone, Copy, Debug, Default)] +pub struct Experience { + pub level: i32, + pub progress: f32, + pub total: i32, +} +impl Experience { + pub fn needed(level: i32) -> i32 { + if level >= 30 { + 112 + (level - 30) * 9 + } else if level >= 15 { + 37 + (level - 15) * 5 + } else { + 7 + level * 2 + } + } + /// Returns true when a level was gained. + pub fn give(&mut self, points: i32) -> bool { + let start = self.level; + self.progress += points as f32 / Self::needed(self.level) as f32; + self.total = self.total.saturating_add(points).max(0); + while self.progress >= 1.0 { + self.progress = (self.progress - 1.0) * Self::needed(self.level) as f32; + self.level += 1; + self.progress /= Self::needed(self.level) as f32; + } + self.level > start + } +} diff --git a/crates/horizon-client/src/entity.wgsl b/crates/horizon-client/src/entity.wgsl new file mode 100644 index 000000000..e56607466 --- /dev/null +++ b/crates/horizon-client/src/entity.wgsl @@ -0,0 +1,59 @@ +// Entities, dropped items and particles: camera-relative vertices textured +// from the shared 2D atlas, lit through the same lightmap as terrain. +struct Globals { + view_proj: mat4x4, + fog_color: vec4, + fog: vec4, + sky_color: vec4, + misc: vec4, + inverse_view: mat4x4, + sunrise: vec4, + sun: vec4, +} +@group(0) @binding(0) var globals: Globals; +@group(0) @binding(1) var atlas: texture_2d; +@group(0) @binding(2) var atlas_sampler: sampler; +@group(0) @binding(3) var lightmap: texture_2d; +@group(0) @binding(4) var lightmap_sampler: sampler; +struct Out { + @builtin(position) clip: vec4, + @location(0) uv: vec2, + @location(1) color: vec4, + @location(2) spherical: f32, + @location(3) cylindrical: f32, +} +@vertex fn vs_entity(@location(0) position: vec3, @location(1) uv: vec2, + @location(2) overlay: u32, @location(3) color: vec4, @location(4) light: vec4) -> Out { + var out: Out; + out.clip = globals.view_proj * vec4(position, 1.0); + out.uv = uv; + let l = vec2(f32(light.y), f32(light.x)); + let lm = textureSampleLevel(lightmap, lightmap_sampler, + clamp(l / 256.0 + 0.5 / 16.0, vec2(0.5 / 16.0), vec2(15.5 / 16.0)), 0.0); + // overlay 2: celestial bodies use their vertex colour unlit. + var c = select(color * lm, color, overlay == 2u); + // Hurt overlay (OverlayTexture red tint). + if overlay == 1u { c = vec4(mix(c.rgb, vec3(1.0, 0.0, 0.0), 0.3), c.a); } + out.color = c; + // Sky geometry (clouds, celestial bodies) is exempt from render-distance fog. + out.spherical = select(length(position), 0.0, overlay >= 2u); + out.cylindrical = select(max(length(position.xz), abs(position.y)), 0.0, overlay >= 2u); + return out; +} +fn linear_fog(d: f32, start: f32, end: f32) -> f32 { + if d <= start { return 0.0; } + if d >= end { return 1.0; } + return (d - start) / (end - start); +} +@fragment fn fs_entity(in: Out) -> @location(0) vec4 { + let color = textureSample(atlas, atlas_sampler, in.uv) * in.color; + if color.a < 0.1 { discard; } + let f = max(linear_fog(in.spherical, globals.fog.x, globals.fog.y), + linear_fog(in.cylindrical, globals.fog.z, globals.fog.w)); + return vec4(mix(color.rgb, globals.fog_color.rgb, f * globals.fog_color.a), color.a); +} + +@fragment fn fs_celestial(in: Out) -> @location(0) vec4 { + let color = textureSample(atlas, atlas_sampler, in.uv) * in.color; + return color; +} diff --git a/crates/horizon-client/src/environment.rs b/crates/horizon-client/src/environment.rs new file mode 100644 index 000000000..09f00947f --- /dev/null +++ b/crates/horizon-client/src/environment.rs @@ -0,0 +1,312 @@ +//! Data-driven environment attributes sampled from the pinned timelines +//! (`KeyframeTrackSampler`, `EasingType`): sky/fog colours, sky light factor, +//! celestial angles and star brightness for the overworld day cycle. +use crate::Result; +use serde_json::Value; +use std::{collections::HashMap, fs, path::Path}; + +#[derive(Clone, Copy, Debug)] +enum Easing { + Linear, + Constant, + Bezier([f32; 4]), +} +impl Easing { + fn apply(self, x: f32) -> f32 { + match self { + Self::Linear => x, + Self::Constant => 0.0, + Self::Bezier([x1, y1, x2, y2]) => { + let curve = |c1: f32, c2: f32| (3.0 * c1 - 3.0 * c2 + 1.0, -6.0 * c1 + 3.0 * c2, 3.0 * c1); + let (ax, bx, cx) = curve(x1, x2); + let (ay, by, cy) = curve(y1, y2); + let sample = |(a, b, c): (f32, f32, f32), t: f32| ((a * t + b) * t + c) * t; + let gradient = |t: f32| (3.0 * ax * t + 2.0 * bx) * t + cx; + let mut t = x; + let mut solved = false; + for _ in 0..4 { + let error = sample((ax, bx, cx), t) - x; + if error.abs() < 1e-5 { + solved = true; + break; + } + let g = gradient(t); + if g < 1e-5 { + break; + } + t -= (error / g).clamp(-0.25, 0.25); + } + if !solved { + let (mut t0, mut t1) = (0.0f32, 1.0f32); + while t0 < t1 { + let error = sample((ax, bx, cx), t) - x; + if error.abs() < 1e-5 { + break; + } + if error < 0.0 { + t0 = t; + } else { + t1 = t; + } + let next = (t0 + t1) / 2.0; + if next == t { + break; + } + t = next; + } + } + sample((ay, by, cy), t) + } + } + } +} +#[derive(Clone, Debug)] +struct Track { + keyframes: Vec<(i64, [f32; 4])>, + easing: Easing, + multiply: bool, +} +fn parse_value(v: &Value) -> Option<[f32; 4]> { + match v { + Value::Number(n) => n.as_f64().map(|f| [f as f32, 0.0, 0.0, 0.0]), + Value::Bool(b) => Some([f32::from(u8::from(*b)), 0.0, 0.0, 0.0]), + Value::String(s) => { + let hex = s.trim_start_matches('#'); + let c = u32::from_str_radix(hex, 16).ok()?; + let f = |shift: u32| (c >> shift & 255) as f32 / 255.0; + Some(if hex.len() == 8 { + [f(16), f(8), f(0), f(24)] + } else { + [f(16), f(8), f(0), 1.0] + }) + } + _ => None, + } +} +impl Track { + fn sample(&self, ticks: i64, period: i64) -> [f32; 4] { + let k = &self.keyframes; + if k.len() == 1 { + return k[0].1; + } + let t = ticks.rem_euclid(period); + let (first, last) = (k[0], k[k.len() - 1]); + let mut segments = vec![(last.1, last.0 - period, first.1, first.0)]; + for pair in k.windows(2) { + segments.push((pair[0].1, pair[0].0, pair[1].1, pair[1].0)); + } + segments.push((last.1, last.0, first.1, first.0 + period)); + let segment = segments + .iter() + .find(|s| t < s.3) + .copied() + .unwrap_or(segments[segments.len() - 1]); + let (from, from_t, to, to_t) = segment; + if t <= from_t { + return from; + } + if t >= to_t { + return to; + } + let alpha = self.easing.apply((t - from_t) as f32 / (to_t - from_t) as f32); + std::array::from_fn(|i| from[i] + (to[i] - from[i]) * alpha) + } +} +pub struct Environment { + period: i64, + tracks: HashMap, + base: HashMap, +} +#[derive(Clone, Copy, Debug, Default)] +pub struct Sky { + pub sky_color: [f32; 3], + pub fog_color: [f32; 3], + pub sky_light_factor: f32, + pub sky_light_color: [f32; 3], + pub block_light_tint: [f32; 3], + pub ambient_light_color: [f32; 3], + pub sun_angle: f32, + pub moon_angle: f32, + pub star_angle: f32, + pub star_brightness: f32, + pub sunrise_color: [f32; 4], + pub cloud_color: [f32; 4], + /// `gameplay/sky_light_level`, the server-side sky darkening. + pub sky_light_level: f32, + /// Environmental fog (`visual/fog_start_distance` / `fog_end_distance`). + pub fog_start: f32, + pub fog_end: f32, +} +impl Environment { + pub fn load(root: &Path) -> Result { + Self::load_dimension(root, "overworld", true) + } + /// A dimension's base attributes, optionally driven by the day timeline. + pub fn load_dimension(root: &Path, dimension: &str, day_cycle: bool) -> Result { + let timeline: Value = if day_cycle { + serde_json::from_slice(&fs::read(root.join("data/minecraft/timeline/day.json"))?)? + } else { + serde_json::json!({"period_ticks": 24000, "tracks": {}}) + }; + let dimension: Value = serde_json::from_slice(&fs::read( + root.join(format!("data/minecraft/dimension_type/{dimension}.json")), + )?)?; + let mut tracks = HashMap::new(); + for (name, track) in timeline["tracks"].as_object().ok_or("invalid timeline")? { + let easing = match &track["ease"] { + Value::String(s) if s == "constant" => Easing::Constant, + Value::Object(o) => match o.get("cubic_bezier").and_then(Value::as_array) { + Some(a) if a.len() == 4 => Easing::Bezier(std::array::from_fn(|i| { + a[i].as_f64().unwrap_or(0.0) as f32 + })), + _ => Easing::Linear, + }, + _ => Easing::Linear, + }; + let keyframes: Vec<_> = track["keyframes"] + .as_array() + .into_iter() + .flatten() + .filter_map(|k| Some((k["ticks"].as_i64()?, parse_value(&k["value"])?))) + .collect(); + if keyframes.is_empty() { + continue; + } + tracks.insert( + name.clone(), + Track { + keyframes, + easing, + multiply: track["modifier"].as_str() == Some("multiply"), + }, + ); + } + let mut base: HashMap = [ + ("minecraft:visual/block_light_tint", "#ffd88c"), + ("minecraft:visual/sky_light_color", "#ffffff"), + ("minecraft:visual/ambient_light_color", "#000000"), + ] + .into_iter() + .filter_map(|(k, v)| Some((k.to_owned(), parse_value(&Value::String(v.into()))?))) + .collect(); + base.insert("minecraft:visual/sky_light_factor".into(), [1.0, 0.0, 0.0, 0.0]); + // Sky light level in light levels (the timeline multiplies it). + base.insert("minecraft:gameplay/sky_light_level".into(), [15.0, 0.0, 0.0, 0.0]); + for (k, v) in dimension["attributes"].as_object().into_iter().flatten() { + if let Some(v) = parse_value(v) { + base.insert(k.clone(), v); + } + } + Ok(Self { + period: timeline["period_ticks"].as_i64().unwrap_or(24000), + tracks, + base, + }) + } + fn value(&self, name: &str, base: [f32; 4], ticks: i64) -> [f32; 4] { + match self.tracks.get(name) { + Some(track) => { + let v = track.sample(ticks, self.period); + if track.multiply { + std::array::from_fn(|i| base[i] * v[i]) + } else { + v + } + } + None => base, + } + } + fn base(&self, name: &str) -> [f32; 4] { + self.base.get(name).copied().unwrap_or([0.0, 0.0, 0.0, 1.0]) + } + /// Sky state for a time of day, with the biome's sky and fog colours as base values. + pub fn sample(&self, ticks: i64, biome_sky: u32, biome_fog: u32) -> Sky { + let rgb = |c: u32| { + [ + (c >> 16 & 255) as f32 / 255.0, + (c >> 8 & 255) as f32 / 255.0, + (c & 255) as f32 / 255.0, + 1.0, + ] + }; + let v = |name: &str, base: [f32; 4]| self.value(name, base, ticks); + let three = |a: [f32; 4]| [a[0], a[1], a[2]]; + let scalar = |name: &str| { + let b = self.base(name); + let b = if self.base.contains_key(name) { b } else { [1.0, 0.0, 0.0, 0.0] }; + let t = self.tracks.get(name); + match t { + Some(t) if t.multiply => b[0] * t.sample(ticks, self.period)[0], + Some(t) => t.sample(ticks, self.period)[0], + None => b[0], + } + }; + let angle = |name: &str| { + self.tracks + .get(name) + .map_or(0.0, |t| t.sample(ticks, self.period)[0]) + }; + Sky { + sky_color: three(v("minecraft:visual/sky_color", rgb(biome_sky))), + fog_color: three(v("minecraft:visual/fog_color", rgb(biome_fog))), + sky_light_factor: scalar("minecraft:visual/sky_light_factor"), + sky_light_color: three(v( + "minecraft:visual/sky_light_color", + self.base("minecraft:visual/sky_light_color"), + )), + block_light_tint: three(self.base("minecraft:visual/block_light_tint")), + ambient_light_color: three(self.base("minecraft:visual/ambient_light_color")), + sun_angle: angle("minecraft:visual/sun_angle"), + moon_angle: angle("minecraft:visual/moon_angle"), + star_angle: angle("minecraft:visual/star_angle"), + star_brightness: angle("minecraft:visual/star_brightness"), + sunrise_color: self + .tracks + .get("minecraft:visual/sunrise_sunset_color") + .map_or([0.0; 4], |t| t.sample(ticks, self.period)), + cloud_color: v( + "minecraft:visual/cloud_color", + self.base("minecraft:visual/cloud_color"), + ), + sky_light_level: scalar("minecraft:gameplay/sky_light_level") / 15.0, + fog_start: self.base.get("minecraft:visual/fog_start_distance").map_or(0.0, |v| v[0]), + fog_end: self.base.get("minecraft:visual/fog_end_distance").map_or(1024.0, |v| v[0]), + } + } +} +/// WeatherAttributes: rain then thunder layers lerped by their levels +/// (rain counts only the part not covered by thunder). +pub fn apply_weather(sky: &mut Sky, rain: f32, thunder: f32) { + let grey = |c: [f32; 3]| c[0] * 0.3 + c[1] * 0.59 + c[2] * 0.11; + let lerp3 = |t: f32, a: [f32; 3], b: [f32; 3]| -> [f32; 3] { std::array::from_fn(|i| a[i] + (b[i] - a[i]) * t) }; + let lerp4 = |t: f32, a: [f32; 4], b: [f32; 4]| -> [f32; 4] { std::array::from_fn(|i| a[i] + (b[i] - a[i]) * t) }; + let lerp = |t: f32, a: f32, b: f32| a + (b - a) * t; + let night = [0.48, 0.48, 1.0]; + // (level, sky gray (brightness, factor), fog multiplier, cloud gray, alpha, sunrise multiplier) + let layers = [ + (rain - thunder, (0.6, 0.75), [0.5, 0.5, 0.6], (0.24, 0.5), 0.3125, [0.5, 0.5, 0.6]), + (thunder, (0.24, 0.94), [0.25, 0.25, 0.3], (0.095, 0.94), 0.527_343_75, [0.25, 0.25, 0.3]), + ]; + for (level, (sb, sf), fog, (cb, cf), alpha, sunrise) in layers { + if level <= 0.0 { + continue; + } + let g = grey(sky.sky_color) * sb; + let target = lerp3(sf, sky.sky_color, [g; 3]); + sky.sky_color = lerp3(level, sky.sky_color, target); + let fogged = std::array::from_fn(|i| sky.fog_color[i] * fog[i]); + sky.fog_color = lerp3(level, sky.fog_color, fogged); + let cloud3 = [sky.cloud_color[0], sky.cloud_color[1], sky.cloud_color[2]]; + let g = grey(cloud3) * cb; + let c = lerp3(cf, cloud3, [g; 3]); + sky.cloud_color = lerp4(level, sky.cloud_color, [c[0], c[1], c[2], sky.cloud_color[3]]); + // sky_light_level is a fraction of 15 here; the layer blends towards level 4. + let target_level = lerp(alpha, sky.sky_light_level * 15.0, 4.0) / 15.0; + sky.sky_light_level = lerp(level, sky.sky_light_level, target_level); + sky.sky_light_color = lerp3(level, sky.sky_light_color, lerp3(alpha, sky.sky_light_color, night)); + sky.sky_light_factor = lerp(level, sky.sky_light_factor, lerp(alpha, sky.sky_light_factor, 0.24)); + sky.star_brightness = lerp(level, sky.star_brightness, 0.0); + let s = sky.sunrise_color; + sky.sunrise_color = lerp4(level, s, [s[0] * sunrise[0], s[1] * sunrise[1], s[2] * sunrise[2], s[3]]); + } +} diff --git a/crates/horizon-client/src/game.rs b/crates/horizon-client/src/game.rs new file mode 100644 index 000000000..6f6b063aa --- /dev/null +++ b/crates/horizon-client/src/game.rs @@ -0,0 +1,4837 @@ +//! The playable game loop: streaming world, player simulation at 20 ticks/s, +//! block interaction, inventory and HUD. +mod control; +use horizon_client::{ + Result, + assets::Assets, + audio::Audio, + biome::Biomes, + blocks::{BlockFacts, Fluid}, + chunk::{HEIGHT, MIN_Y}, + clock::FixedStep, + entities::{Arrow, ArrowHit, Experience, ExperienceOrb, ItemEntity}, + mobs::{Mob, MobEvent, MobType, MobTypes, MobWorld}, + particles::Particle, + containers::{BlockEntity, Providers}, + creative::{Creative, Names}, + crafting::Recipes, + collisions, + environment::Environment, + gfx::{Frame, Renderer}, + hud::{HudAtlas, HudBatch, rgba}, + items::{ItemStack, Items}, + light::LightTables, + mesher::{MeshTables, Vertex}, + models, + motion::{MotionEvent, MotionResources, MotionWorld, PlayerMotion}, + sprint::Keys, + streaming::{Streaming, WorkerContext}, + save::{Level, Persistent, SaveDir}, + settings::Settings, + title::{Action, Title}, + testgen::TestTerrain, + vanillagen::VanillaTerrain, + world::World, +}; +use horizon_core::{geometry::Vec3, random::RandomSource}; +use horizon_core::{geometry::Direction, position::BlockPos}; +use horizon_world::{ + block_collision::BlockCollisionRegistry, + level::{ + Behaviours, Dimension as LevelDimension, LevelAccess, LevelEvent, Landing, PlaceContext, PlaceOutcome, PlayerContext, + PlayerEffect, Ticks, flags as level_flags, + }, + registry::BlockStateId, +}; +use std::{ + collections::{HashMap, HashSet}, + path::PathBuf, + sync::Arc, + time::{Duration, Instant}, +}; +use winit::{ + application::ApplicationHandler, + event::{DeviceEvent, DeviceId, ElementState, MouseButton, MouseScrollDelta, WindowEvent}, + event_loop::{ActiveEventLoop, ControlFlow, EventLoop}, + keyboard::{KeyCode, PhysicalKey}, + window::{CursorGrabMode, Window, WindowId}, +}; + +struct Options { + resources: PathBuf, + distance: i32, + distance_override: Option, + seed: i64, + creative: bool, + test_terrain: bool, + frames: Option, + screenshot_after: Option, + timeout: Duration, + report: Option, + world: Option, + look: Option<(f32, f32)>, + time: Option, + weather: Option, + dimension: Option, + /// Options.pauseOnLostFocus off (F3+P), for scripted testing. + no_pause: bool, + /// Control socket path (`--control`), for `horizon-ctl`. + control: Option, +} +impl Options { + fn read() -> Result> { + let sibling = std::env::current_exe()? + .parent() + .ok_or("missing executable directory")? + .join("resources"); + let mut o = Self { + resources: if sibling.join("horizon-resources.json").exists() { + sibling + } else { + PathBuf::from(".local/horizon-client/26.3") + }, + distance: 12, + distance_override: None, + seed: 0, + creative: false, + test_terrain: false, + frames: None, + screenshot_after: None, + timeout: Duration::from_secs(120), + report: None, + world: None, + look: None, + time: None, + weather: None, + dimension: None, + no_pause: false, + control: None, + }; + let mut args = std::env::args().skip(1); + while let Some(arg) = args.next() { + match arg.as_str() { + "--help" | "-h" => { + println!( + "Horizon — Minecraft Java Edition 26.3 in Rust\n\n --resources PATH Prepared resources (tools/prepare_native_client.py)\n --render-distance N Chunks, 2..64 (default 12)\n --world NAME World folder under saves/ (default \"New World\")\n --seed N World seed for new worlds (default 0)\n --creative Creative mode (default survival)\n --test-terrain Simple test terrain instead of vanilla generation\n --frames N Exit after N frames (testing)\n --smoke-report PATH Write a JSON report on exit\n --control Accept horizon-ctl commands on a local socket\n --control-socket PATH Control socket path (default $XDG_RUNTIME_DIR/horizon-control.sock)\n\nControls: mouse look, WASD move, Space jump, Left Shift sneak, Left Ctrl sprint,\nleft click break, right click place/use, 1-9/scroll hotbar, E inventory,\nQ drop, F3 debug, Esc pause." + ); + return Ok(None); + } + "--creative" => o.creative = true, + "--test-terrain" => o.test_terrain = true, + "--no-pause" => o.no_pause = true, + "--control" => o.control = Some(horizon_client::control::default_path()), + _ => { + let value = args.next().ok_or_else(|| format!("missing value after {arg}"))?; + match arg.as_str() { + "--resources" => o.resources = value.into(), + "--render-distance" | "--radius" => { + o.distance = value.parse()?; + o.distance_override = Some(o.distance); + if !(2..=64).contains(&o.distance) { + return Err("render distance must be 2..64".into()); + } + } + "--seed" => { + o.seed = value.parse().unwrap_or_else(|_| { + // Text seeds hash like String.hashCode. + value + .encode_utf16() + .fold(0i32, |h, c| h.wrapping_mul(31).wrapping_add(i32::from(c))) + .into() + }) + } + "--frames" => o.frames = Some(value.parse()?), + "--timeout-seconds" => o.timeout = Duration::from_secs(value.parse()?), + "--smoke-report" => o.report = Some(value.into()), + "--screenshot-after" => o.screenshot_after = Some(value.parse()?), + "--world" => o.world = Some(value), + "--control-socket" => o.control = Some(value.into()), + "--time" => o.time = Some(value.parse()?), + "--weather" => o.weather = Some(value), + "--dimension" => o.dimension = Some(if value.contains(':') { value } else { format!("minecraft:{value}") }), + "--look" => { + let (y, p) = value.split_once(',').ok_or("--look takes YAW,PITCH")?; + o.look = Some((y.parse()?, p.parse()?)); + } + _ => return Err(format!("unknown option {arg}").into()), + } + } + } + } + Ok(Some(o)) + } +} +#[derive(Clone, Copy, PartialEq, Eq)] +enum Screen { + Playing, + Paused, + Options, + Creative, + Inventory, + Dead, +} +#[derive(Clone)] +enum Icon { + Flat(String), + Cube { top: String, left: String, right: String, tint: u32 }, +} +struct Mining { + pos: [i32; 3], + progress: f32, + ticks: u32, +} +struct Hit { + pos: [i32; 3], + face: [i32; 3], + point: [f64; 3], +} + +/// The client world as seen by the vanilla block-behaviour library. +struct GameLevel<'w> { + world: &'w mut World, + facts: &'w BlockFacts, + events: &'w mut Vec, + dimension: LevelDimension, + darken: i32, + raining: bool, + thundering: bool, + player_box: Option<([f64; 3], [f64; 3])>, +} +impl LevelAccess for GameLevel<'_> { + fn block_state(&self, pos: BlockPos) -> BlockStateId { + self.world.block(pos.x, pos.y, pos.z) + } + fn set_raw(&mut self, pos: BlockPos, state: BlockStateId) -> Option { + if !self.world.loaded(pos.x, pos.z) || pos.y < MIN_Y || pos.y >= MIN_Y + HEIGHT { + return None; + } + let previous = self.world.block(pos.x, pos.y, pos.z); + self.world.set(pos.x, pos.y, pos.z, state).ok()?; + Some(previous) + } + fn is_loaded(&self, pos: BlockPos) -> bool { + self.world.loaded(pos.x, pos.z) + } + fn min_y(&self) -> i32 { + if self.dimension == LevelDimension::Nether { 0 } else { MIN_Y } + } + fn max_y(&self) -> i32 { + if self.dimension == LevelDimension::Nether { 255 } else { MIN_Y + HEIGHT - 1 } + } + fn random(&mut self) -> &mut horizon_core::random::LegacyRandom { + &mut self.world.random + } + fn game_time(&self) -> i64 { + self.world.game_time + } + fn block_light(&self, pos: BlockPos) -> i32 { + i32::from(self.world.light(pos.x, pos.y, pos.z) & 15) + } + fn sky_light(&self, pos: BlockPos) -> i32 { + i32::from(self.world.light(pos.x, pos.y, pos.z) >> 4) + } + fn sky_darken(&self) -> i32 { + self.darken + } + fn is_raining(&self) -> bool { + self.raining + } + fn is_thundering(&self) -> bool { + self.thundering + } + fn dimension(&self) -> LevelDimension { + self.dimension + } + /// Level.isUnobstructed against the player for full-collision blocks. + fn is_unobstructed(&self, pos: BlockPos, state: BlockStateId) -> bool { + let Some((lo, hi)) = self.player_box else { return true }; + if !self.facts.get(state).full_collision { + return true; + } + let (x, y, z) = (f64::from(pos.x), f64::from(pos.y), f64::from(pos.z)); + !(x < hi[0] - 1e-7 && x + 1.0 > lo[0] + 1e-7 && y < hi[1] - 1e-7 && y + 1.0 > lo[1] + 1e-7 && z < hi[2] - 1e-7 && z + 1.0 > lo[2] + 1e-7) + } + fn emit(&mut self, event: LevelEvent) { + self.events.push(event); + } +} +/// FallingBlockEntity carrying a block state. +#[derive(Clone, Debug)] +struct FallingBlock { + state: BlockStateId, + position: Vec3, + previous: Vec3, + velocity: Vec3, + age: u32, +} +pub struct Resources { + assets: Arc, + facts: BlockFacts, + items: Items, + recipes: Recipes, + biomes: Arc, + environment: Environment, + atlas: HudAtlas, + icons: HashMap>, + layer_names: HashMap, + mob_types: HashMap>, + providers: Providers, + chest_model: Option, + nether_environment: Environment, + behaviours: Behaviours, + names: Names, + /// clouds.png: (width, height, filled cells). + clouds: (u32, u32, Vec), + context: Arc, + threads: usize, + player_arm: Option, + /// firstperson_righthand display transforms per item: (rotation, translation, scale). + displays: HashMap>, +} +struct Game<'a> { + res: &'a mut Resources, + collision: &'a BlockCollisionRegistry<'a>, + motion: &'a MotionResources, + world: World, + streaming: Streaming, + options: Options, + player: Option, + spawn: Option, + clock: FixedStep, + previous_position: Vec3, + eye: f32, + previous_eye: f32, + yaw: f32, + pitch: f32, + inventory: Vec>, + selected: usize, + carried: Option, + craft_grid: Vec>, + craft_size: usize, + /// Open container block entity, if any. + container: Option<(i32, i32, i32)>, + scratch_slot: Option, + mining: Option, + destroy_delay: u32, + use_delay: u32, + creative: bool, + keys: HashSet, + left: bool, + right: bool, + cursor: (f32, f32), + captured: bool, + focused: bool, + debug: bool, + screen: Screen, + window: Option>, + renderer: Option, + started: Instant, + previous: Instant, + frames: u64, + fps: f32, + fps_frames: u64, + fps_at: Instant, + ticks: u64, + error: Option, + message: Option<(String, Instant)>, + save: Arc, + level: Level, + audio: Audio, + dropped: Vec, + next_entity: u32, + particles: Vec, + spawn_search: u32, + mobs: Vec, + arrows: Vec, + attack_ticks: u32, + last_hurt_by_player: HashSet, + chest_open: HashMap<(i32, i32, i32), (f32, f32)>, + /// Item being used (eaten): hotbar slot and ticks used. + using: Option<(usize, u32)>, + title: Option, + /// Armor slots: head, chest, legs, feet. + armor: [Option<ItemStack>; 4], + applied_modifiers: Vec<(String, String)>, + experience: Experience, + orbs: Vec<ExperienceOrb>, + xp_delay: u32, + last_level_up: u64, + /// Arm swing: ticks into the 6-tick swing (None when idle), previous/current progress. + swing: Option<u32>, + swing_anim: (f32, f32), + /// Main-hand equip height (previous, current) and the item it shows. + hand_height: (f32, f32), + hand_item: Option<ItemStack>, + settings: Settings, + /// Where the options screen returns: true = title, false = pause menu. + options_from_title: bool, + dragging: bool, + walk: (f32, f32), + bob: (f32, f32), + flash: u32, + /// Sleeping in a bed: (bed head position, ticks asleep). + sleeping: Option<([i32; 3], u32)>, + dim: Dim, + world_root: PathBuf, + /// A player carried through a portal, re-placed once the destination loads. + travelling: Option<(PlayerMotion, Vec3)>, + portal_ticks: u32, + portal_cooldown: u32, + block_ticks: Ticks, + tick_chunks: HashSet<(i32, i32)>, + level_events: Vec<LevelEvent>, + falling: Vec<FallingBlock>, + creative_screen: Creative, + control: Option<horizon_client::control::Server>, + frame_stats: horizon_client::control::FrameStats, + /// Control replies waiting for a rendered frame or a benchmark deadline. + pending_screenshot: Option<std::sync::mpsc::Sender<String>>, + pending_bench: Option<(Instant, std::sync::mpsc::Sender<String>)>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +enum Dim { + Overworld, + Nether, +} +impl Dim { + fn id(self) -> &'static str { + match self { + Self::Overworld => "minecraft:overworld", + Self::Nether => "minecraft:the_nether", + } + } + fn from_id(id: &str) -> Self { + if id == "minecraft:the_nether" { Self::Nether } else { Self::Overworld } + } + /// Region folder inside the world (vanilla's DIM-1 for the Nether). + fn folder(self) -> Option<&'static str> { + match self { + Self::Overworld => None, + Self::Nether => Some("DIM-1"), + } + } +} +fn facing_offset(facing: &str) -> [i32; 3] { + match facing { + "north" => [0, 0, -1], + "south" => [0, 0, 1], + "west" => [-1, 0, 0], + "east" => [1, 0, 0], + "up" => [0, 1, 0], + _ => [0, -1, 0], + } +} +fn view_vector(yaw: f32, pitch: f32) -> [f64; 3] { + let (y, p) = (f64::from(yaw).to_radians(), f64::from(pitch).to_radians()); + [-y.sin() * p.cos(), -p.sin(), y.cos() * p.cos()] +} +impl Game<'_> { + fn eye_position(&self) -> Option<[f64; 3]> { + let p = self.player.as_ref()?; + Some([p.position.x, p.position.y + f64::from(p.dimensions.eye_height), p.position.z]) + } + fn reach(&self) -> f64 { + if self.creative { 5.0 } else { 4.5 } + } + /// Voxel traversal against non-air, non-fluid blocks (outline = full cube). + fn pick(&self) -> Option<Hit> { + let origin = self.eye_position()?; + let dir = view_vector(self.yaw, self.pitch); + let reach = self.reach(); + let mut pos = origin.map(|v| v.floor() as i32); + let step = dir.map(|d| if d > 0.0 { 1 } else { -1 }); + let delta = dir.map(|d| if d == 0.0 { f64::INFINITY } else { (1.0 / d).abs() }); + let mut t_max = [0.0; 3]; + for i in 0..3 { + let boundary = if dir[i] > 0.0 { f64::from(pos[i]) + 1.0 } else { f64::from(pos[i]) }; + t_max[i] = if dir[i] == 0.0 { f64::INFINITY } else { (boundary - origin[i]) / dir[i] }; + } + let mut face = [0; 3]; + let mut t = 0.0; + while t <= reach { + let state = self.world.block(pos[0], pos[1], pos[2]); + let f = self.res.facts.get(state); + if !self.res.facts.is_air(state) + && !(f.fluid != Fluid::None && !f.waterlogged && &*f.name != "minecraft:kelp" && f.render_shape != horizon_client::blocks::RenderShape::Model) + && !matches!(&*f.name, "minecraft:water" | "minecraft:lava" | "minecraft:bubble_column") + { + return Some(Hit { + pos, + face, + point: [origin[0] + dir[0] * t, origin[1] + dir[1] * t, origin[2] + dir[2] * t], + }); + } + let axis = if t_max[0] < t_max[1] { + if t_max[0] < t_max[2] { 0 } else { 2 } + } else if t_max[1] < t_max[2] { + 1 + } else { + 2 + }; + t = t_max[axis]; + t_max[axis] += delta[axis]; + pos[axis] += step[axis]; + face = [0; 3]; + face[axis] = -step[axis]; + } + None + } + fn held(&self) -> Option<&ItemStack> { + self.inventory[self.selected].as_ref() + } + /// Inventory.add: returns the stack that did not fit. + fn give(&mut self, mut stack: ItemStack) -> Option<ItemStack> { + let max = self.res.items.get(&stack.item).map_or(64, |i| i.max_stack); + // Prefer the selected slot, then the hotbar, then the main inventory. + let order: Vec<usize> = std::iter::once(self.selected).chain((0..36).filter(|&i| i != self.selected)).collect(); + for &i in &order { + if let Some(slot) = &mut self.inventory[i] + && slot.item == stack.item + && slot.damage == stack.damage + && slot.count < max + { + let moved = (max - slot.count).min(stack.count); + slot.count += moved; + stack.count -= moved; + if stack.count == 0 { + return None; + } + } + } + for i in 0..36 { + if self.inventory[i].is_none() { + let moved = stack.count.min(max); + self.inventory[i] = Some(ItemStack { count: moved, ..stack.clone() }); + stack.count -= moved; + if stack.count == 0 { + return None; + } + } + } + Some(stack) + } + /// The block's particle texture (approximated by its first model face) and tint. + /// The `particle` texture of a block's first blockstate model (for models without faces). + fn model_particle(&self, block: &str) -> Option<String> { + let root = &self.options.resources; + let read = |path: String| -> Option<serde_json::Value> { serde_json::from_slice(&std::fs::read(root.join(path)).ok()?).ok() }; + let states = read(format!("assets/minecraft/blockstates/{block}.json"))?; + let mut model = states["variants"].as_object()?.values().next().and_then(|v| v["model"].as_str().or_else(|| v[0]["model"].as_str()))?.to_owned(); + for _ in 0..8 { + let m = read(format!("assets/minecraft/models/{}.json", model.trim_start_matches("minecraft:")))?; + if let Some(p) = m["textures"]["particle"].as_str() { + let p = if let Some(alias) = p.strip_prefix('#') { m["textures"][alias].as_str()? } else { p }; + return Some(p.trim_start_matches("minecraft:").to_owned()); + } + model = m["parent"].as_str()?.to_owned(); + } + None + } + fn particle_sprite(&self, state: BlockStateId) -> Option<(String, u32)> { + let models = self.res.assets.model_catalog.collect(state, horizon_core::position::BlockPos::new(0, 0, 0)).ok()?; + let face = models.iter().flat_map(|(_, m)| m.faces.iter()).find(|f| f.quad.facing == horizon_assets::model::Direction::Up) + .or_else(|| models.iter().flat_map(|(_, m)| m.faces.iter()).next())?; + let name = self.res.layer_names.get(&face.layer)?.clone(); + let tint = if face.quad.tint_index >= 0 { + let n = &self.res.facts.get(state).name; + if n.contains("leaves") || n.contains("vine") { 0x48B518 } else { 0x91BD59 } + } else { + 0xFFFFFF + }; + Some((name, tint)) + } + /// ParticleEngine.destroy: a 4x4x4 burst. + fn destroy_particles(&mut self, pos: [i32; 3], state: BlockStateId) { + let Some((sprite, tint)) = self.particle_sprite(state) else { return }; + for x in 0..4 { + for y in 0..4 { + for z in 0..4 { + let d = |i: i32| (f64::from(i) + 0.5) / 4.0; + let p = [f64::from(pos[0]) + d(x), f64::from(pos[1]) + d(y), f64::from(pos[2]) + d(z)]; + let v = [d(x) - 0.5, d(y) - 0.5, d(z) - 0.5]; + let particle = Particle::terrain(&mut self.world.random, p, v, sprite.clone(), tint); + self.particles.push(particle); + } + } + } + } + /// ParticleEngine.crack: one crumb on the face being mined. + fn crack_particle(&mut self, pos: [i32; 3], face: [i32; 3], state: BlockStateId) { + let Some((sprite, tint)) = self.particle_sprite(state) else { return }; + let r = &mut self.world.random; + let mut p = [0.0; 3]; + for i in 0..3 { + let base = f64::from(pos[i]); + p[i] = match face[i] { + 1 => base + 1.0 + 0.1, + -1 => base - 0.1, + _ => base + 0.1 + r.next_double() * 0.8, + }; + } + let mut particle = Particle::terrain(r, p, [0.0; 3], sprite, tint); + for c in &mut particle.velocity { + *c *= 0.2; + } + particle.velocity[1] = (particle.velocity[1] - 0.1) * 0.2 + 0.1; + particle.size *= 0.6; + self.particles.push(particle); + } + fn spawn_item(&mut self, stack: ItemStack, position: [f64; 3], velocity: [f64; 3], pickup_delay: u32) { + self.next_entity += 1; + let p = Vec3::new(position[0], position[1], position[2]); + let bob = self.world.random.next_float() * std::f32::consts::PI * 2.0; + self.dropped.push(ItemEntity { + id: self.next_entity, + stack, + position: p, + previous: p, + velocity: Vec3::new(velocity[0], velocity[1], velocity[2]), + on_ground: false, + age: 0, + pickup_delay, + bob_offset: bob, + }); + } + /// Block.popResource + fn pop_resource(&mut self, pos: [i32; 3], stack: ItemStack) { + let r = &mut self.world.random; + let mut offset = || f64::from(r.next_float()) * 0.5 - 0.25; + let p = [ + f64::from(pos[0]) + 0.5 + offset(), + f64::from(pos[1]) + 0.5 + offset() - 0.125, + f64::from(pos[2]) + 0.5 + offset(), + ]; + let v = [r.next_double() * 0.2 - 0.1, 0.2, r.next_double() * 0.2 - 0.1]; + self.spawn_item(stack, p, v, 10); + } + /// Player.drop: thrown from the eyes along the view direction. + fn drop_held(&mut self, all: bool) { + let Some(eye) = self.eye_position() else { return }; + let Some(stack) = self.inventory[self.selected].as_mut() else { return }; + let count = if all { stack.count } else { 1 }; + let thrown = ItemStack { count, ..stack.clone() }; + stack.count -= count; + if stack.count == 0 { + self.inventory[self.selected] = None; + } + let (yaw, pitch) = (f64::from(self.yaw).to_radians(), f64::from(self.pitch).to_radians()); + let r = &mut self.world.random; + let spread = f64::from(r.next_float()) * std::f64::consts::TAU; + let strength = 0.02 * f64::from(r.next_float()); + let v = [ + -yaw.sin() * pitch.cos() * 0.3 + spread.cos() * strength, + -pitch.sin() * 0.3 + 0.1 + f64::from(r.next_float() - r.next_float()) * 0.1, + yaw.cos() * pitch.cos() * 0.3 + spread.sin() * strength, + ]; + self.spawn_item(thrown, [eye[0], eye[1] - 0.3, eye[2]], v, 40); + } + fn tick_items(&mut self) { + let mut items = std::mem::take(&mut self.dropped); + items.retain_mut(|item| item.tick(&self.world, &self.res.facts, self.collision)); + let Some(p) = self.player.as_ref() else { + self.dropped = items; + return; + }; + if p.health.dead_or_dying() { + self.dropped = items; + return; + } + let w = f64::from(p.dimensions.width) / 2.0; + let (min, max) = ( + [p.position.x - w - 1.0, p.position.y - 0.5, p.position.z - w - 1.0], + [p.position.x + w + 1.0, p.position.y + f64::from(p.dimensions.height) + 0.5, p.position.z + w + 1.0], + ); + let feet = [p.position.x, p.position.y, p.position.z]; + let mut kept = Vec::with_capacity(items.len()); + for mut item in items { + let b = item.bounds(); + let touching = b.min_position().x < max[0] && b.max_position().x > min[0] + && b.min_position().y < max[1] && b.max_position().y > min[1] + && b.min_position().z < max[2] && b.max_position().z > min[2]; + if touching && item.pickup_delay == 0 { + let before = item.stack.count; + match self.give(item.stack.clone()) { + None => { + let pitch = ((self.world.random.next_float() - self.world.random.next_float()) * 0.7 + 1.0) * 2.0; + self.audio.play("minecraft:entity.item.pickup", Some(feet), 0.2, pitch); + continue; + } + Some(rest) => { + if rest.count < before { + self.audio.play("minecraft:entity.item.pickup", Some(feet), 0.2, 1.0); + } + item.stack = rest; + } + } + } + kept.push(item); + } + self.dropped = kept; + } + /// Run vanilla block behaviour against the world through `LevelAccess`. + fn with_level<R>(&mut self, f: impl FnOnce(&Behaviours, &mut GameLevel<'_>, &mut Ticks) -> R) -> R { + let darken = self.sky_darken(); + let (rain, thunder) = self.world.weather.levels(1.0); + let player_box = self.player.as_ref().map(|p| { + let w = f64::from(p.dimensions.width) / 2.0; + ([p.position.x - w, p.position.y, p.position.z - w], [p.position.x + w, p.position.y + f64::from(p.dimensions.height), p.position.z + w]) + }); + let dimension = if self.dim == Dim::Nether { LevelDimension::Nether } else { LevelDimension::Overworld }; + let mut level = GameLevel { + world: &mut self.world, + facts: &self.res.facts, + events: &mut self.level_events, + dimension, + darken, + raining: rain > 0.2, + thundering: thunder > 0.9, + player_box, + }; + f(&self.res.behaviours, &mut level, &mut self.block_ticks) + } + /// Level.setBlock(pos, state, UPDATE_ALL) with neighbour/shape updates. + fn level_set(&mut self, pos: [i32; 3], state: BlockStateId) -> Result<()> { + self.with_level(|b, level, ticks| { + b.set_block(level, ticks, BlockPos::new(pos[0], pos[1], pos[2]), state, level_flags::UPDATE_ALL); + }); + self.process_level_events() + } + /// Track which chunks are ticking (Ticks needs chunk load/unload). + fn sync_tick_chunks(&mut self) { + let loaded: HashSet<(i32, i32)> = self.world.chunks.keys().copied().collect(); + for k in loaded.difference(&self.tick_chunks.clone()) { + let _ = self.block_ticks.add_empty_chunk(horizon_core::position::ChunkPos::new(k.0, k.1)); + } + for k in self.tick_chunks.difference(&loaded) { + self.block_ticks.remove_chunk(horizon_core::position::ChunkPos::new(k.0, k.1)); + } + self.tick_chunks = loaded; + } + /// ServerLevel.tick block phases: scheduled ticks, random ticks within the + /// simulation distance, block events and moving pistons. + fn tick_blocks(&mut self) -> Result<()> { + self.sync_tick_chunks(); + let Some(p) = self.player.as_ref() else { return Ok(()) }; + let (pcx, pcz) = ((p.position.x.floor() as i32) >> 4, (p.position.z.floor() as i32) >> 4); + let simulation = self.settings.render_distance.min(8); + let mut ticking = Vec::new(); + for (&(x, z), chunk) in &self.world.chunks { + if (x - pcx).abs() > simulation || (z - pcz).abs() > simulation || !chunk.lit { + continue; + } + let sections: Vec<i32> = chunk + .sections + .iter() + .enumerate() + .filter(|(_, s)| !s.is_uniform(0)) + .map(|(i, _)| MIN_Y + i as i32 * 16) + .collect(); + ticking.push((x, z, sections)); + } + self.with_level(|b, level, ticks| { + b.tick_scheduled(level, ticks); + for (x, z, sections) in ticking { + b.tick_chunk_random(level, ticks, horizon_core::position::ChunkPos::new(x, z), sections); + } + b.run_block_events(level, ticks); + b.tick_block_entities(level, ticks); + }); + self.process_level_events() + } + /// Side effects reported by the behaviour library, in vanilla order. + fn process_level_events(&mut self) -> Result<()> { + let events = std::mem::take(&mut self.level_events); + for event in events { + match event { + LevelEvent::LevelEvent { id: 2001, pos, data } => { + // LevelRenderer: destroy particles and the block's break sound. + let state = BlockStateId(data as u32); + let p = [pos.x, pos.y, pos.z]; + self.destroy_particles(p, state); + let sounds = self.res.facts.get(state).sounds.clone(); + let c = [f64::from(pos.x) + 0.5, f64::from(pos.y) + 0.5, f64::from(pos.z) + 0.5]; + self.audio.play(&sounds.break_sound, Some(c), (sounds.volume + 1.0) / 2.0, sounds.pitch * 0.8); + } + LevelEvent::LevelEvent { id, pos, .. } => { + let c = Some([f64::from(pos.x) + 0.5, f64::from(pos.y) + 0.5, f64::from(pos.z) + 0.5]); + let sound = match id { + 1501 => Some(("minecraft:block.lava.extinguish", 0.5)), + 1009 => Some(("minecraft:block.fire.extinguish", 0.5)), + 1502 => Some(("minecraft:block.redstone_torch.burnout", 0.5)), + 1030 => Some(("minecraft:block.anvil.use", 1.0)), + 1031 => Some(("minecraft:block.anvil.land", 0.3)), + _ => None, + }; + if let Some((name, volume)) = sound { + self.audio.play(name, c, volume, 1.0); + } + } + LevelEvent::Sound { pos, sound, volume, pitch } => { + let c = [f64::from(pos.x) + 0.5, f64::from(pos.y) + 0.5, f64::from(pos.z) + 0.5]; + let name = if sound.contains(':') { sound.to_string() } else { format!("minecraft:{sound}") }; + self.audio.play(&name, Some(c), volume, pitch); + } + LevelEvent::DropResources { pos, state } => { + let drops = self.res.items.block_drops(&self.res.assets.registry, state, None, &mut self.world.random); + for d in drops { + if &*d.item != "minecraft:air" { + self.pop_resource([pos.x, pos.y, pos.z], d); + } + } + if let Some(entity) = self.world.block_entities.remove(&(pos.x, pos.y, pos.z)) { + for stack in entity.contents() { + self.pop_resource([pos.x, pos.y, pos.z], stack); + } + } + } + LevelEvent::FallingBlock { pos, state } => { + let p = Vec3::new(f64::from(pos.x) + 0.5, f64::from(pos.y), f64::from(pos.z) + 0.5); + self.falling.push(FallingBlock { state, position: p, previous: p, velocity: Vec3::ZERO, age: 0 }); + } + LevelEvent::Player { pos, effect, .. } => match effect { + PlayerEffect::OpenMenu => self.open_menu([pos.x, pos.y, pos.z]), + PlayerEffect::Sleep => self.try_sleep([pos.x, pos.y, pos.z]), + PlayerEffect::GiveItem(item) => { + if let Some(rest) = self.give(ItemStack { item, count: 1, damage: 0 }) { + self.pop_resource([pos.x, pos.y, pos.z], rest); + } + } + PlayerEffect::DropItem(item) => self.pop_resource([pos.x, pos.y + 1, pos.z], ItemStack { item, count: 1, damage: 0 }), + PlayerEffect::EatCake => { + if let Some(p) = self.player.as_mut() { + let food = &mut p.health.food; + food.food = (food.food + 2).min(20); + food.saturation = (food.saturation + 0.4).min(food.food as f32); + } + } + PlayerEffect::InteractLoot(_) | PlayerEffect::RespawnAnchor => {} + }, + LevelEvent::PrimeTnt { pos } => { + // Simplified: TNT explodes after its 80-tick fuse immediately. + self.explode([f64::from(pos.x) + 0.5, f64::from(pos.y), f64::from(pos.z) + 0.5], 4.0)?; + } + LevelEvent::GrowTree { .. } | LevelEvent::PlaceFeature { .. } | LevelEvent::BlockEvent { .. } | LevelEvent::GameEvent { .. } => {} + } + } + Ok(()) + } + /// Menus opened by PlayerEffect::OpenMenu. + fn open_menu(&mut self, pos: [i32; 3]) { + let name = self.res.facts.get(self.world.block(pos[0], pos[1], pos[2])).name.clone(); + let key = (pos[0], pos[1], pos[2]); + if &*name == "minecraft:crafting_table" { + self.craft_size = 3; + } else if let Some(entity) = BlockEntity::for_block(&name) { + self.world.block_entities.entry(key).or_insert(entity); + self.container = Some(key); + let sound = if name.contains("chest") { Some("minecraft:block.chest.open") } else if &*name == "minecraft:barrel" { Some("minecraft:block.barrel.open") } else { None }; + if let Some(sound) = sound { + self.audio.play(sound, Some([f64::from(key.0) + 0.5, f64::from(key.1) + 0.5, f64::from(key.2) + 0.5]), 0.5, 1.0); + } + } else { + self.message = Some((format!("{} is not available yet", name.trim_start_matches("minecraft:").replace('_', " ")), Instant::now())); + return; + } + self.screen = Screen::Inventory; + self.capture(false); + self.right = false; + } + /// FallingBlockEntity.tick: fall with 0.04 gravity and 0.98 drag, then land. + fn tick_falling(&mut self) -> Result<()> { + let mut falling = std::mem::take(&mut self.falling); + let mut landed = Vec::new(); + falling.retain_mut(|f| { + f.previous = f.position; + f.age += 1; + f.velocity.y -= 0.04; + let next = Vec3::new(f.position.x + f.velocity.x, f.position.y + f.velocity.y, f.position.z + f.velocity.z); + let below = self.world.block(next.x.floor() as i32, next.y.floor() as i32, next.z.floor() as i32); + let solid = self.res.facts.get(below).full_collision; + if solid || f.age > 600 { + landed.push((f.state, [next.x.floor() as i32, next.y.floor() as i32 + 1, next.z.floor() as i32])); + return false; + } + f.position = next; + f.velocity = Vec3::new(f.velocity.x * 0.98, f.velocity.y * 0.98, f.velocity.z * 0.98); + true + }); + self.falling = falling; + for (state, pos) in landed { + let landing = self.with_level(|b, level, ticks| b.falling_block_landed(level, ticks, BlockPos::new(pos[0], pos[1], pos[2]), state, false)); + if matches!(landing, Landing::Broken) { + let item = self.res.facts.get(state).item.clone(); + if &*item != "minecraft:air" { + self.pop_resource(pos, ItemStack { item, count: 1, damage: 0 }); + } + } + } + self.process_level_events() + } + fn break_block(&mut self, pos: [i32; 3]) -> Result<()> { + let state = self.world.block(pos[0], pos[1], pos[2]); + let facts = self.res.facts.get(state).clone(); + if !self.creative { + if let Some(p) = self.player.as_mut() { + p.health.food.exhaustion = (p.health.food.exhaustion + 0.005).min(40.0); + } + let held = self.held().cloned(); + let harvest = !facts.requires_tool + || self.res.items.correct_for_drops(held.as_ref(), &facts.name); + if harvest { + let drops = self.res.items.block_drops( + &self.res.assets.registry, + state, + held.as_ref(), + &mut self.world.random, + ); + let silk = false; + for d in drops { + if &*d.item != "minecraft:air" { + self.pop_resource(pos, d); + } + } + let xp = if silk { 0 } else { self.block_experience(&facts.name) }; + if xp > 0 { + self.spawn_orbs([f64::from(pos[0]) + 0.5, f64::from(pos[1]) + 0.5, f64::from(pos[2]) + 0.5], xp); + } + } + // Tools lose durability on blocks with nonzero hardness. + if facts.hardness > 0.0 + && let Some(stack) = self.inventory[self.selected].as_mut() + && let Some(info) = self.res.items.get(&stack.item) + && info.max_damage > 0 + && !info.tool.is_empty() + { + stack.damage += 1; + if stack.damage >= info.max_damage { + self.inventory[self.selected] = None; + } + } + } + let replacement = if facts.waterlogged { + self.res.assets.registry.default_state("minecraft:water") + } else { + None + } + .unwrap_or(self.world.air); + if let Some(entity) = self.world.block_entities.remove(&(pos[0], pos[1], pos[2])) { + // Containers.dropContents + for stack in entity.contents() { + self.pop_resource(pos, stack); + } + if self.container == Some((pos[0], pos[1], pos[2])) { + self.container = None; + self.screen = Screen::Playing; + } + } + let _ = replacement; + // Block.playerDestroy through the vanilla behaviour library: removal, + // neighbour and shape updates, and the destroy event (particles, sound). + let creative = self.creative; + self.with_level(|b, level, ticks| { + b.player_destroy_block(level, ticks, BlockPos::new(pos[0], pos[1], pos[2]), creative); + }); + self.process_level_events()?; + Ok(()) + } + fn use_item(&mut self) -> Result<()> { + let sneaking = self.keys.contains(&KeyCode::ShiftLeft); + // MultiPlayerGameMode.useItemOn: blocks react first unless sneaking with an item. + if !(sneaking && self.held().is_some()) + && let Some(hit) = self.pick() + { + let face = match hit.face { + [0, 1, 0] => Direction::Up, + [0, -1, 0] => Direction::Down, + [0, 0, -1] => Direction::North, + [0, 0, 1] => Direction::South, + [-1, 0, 0] => Direction::West, + _ => Direction::East, + }; + let player = PlayerContext { + yaw: self.yaw, + pitch: self.pitch, + may_build: true, + can_eat: self.creative || self.player.as_ref().is_some_and(|p| p.health.food.food < 20), + game_master: false, + }; + let at = Vec3::new(hit.point[0], hit.point[1], hit.point[2]); + let result = self.with_level(|b, level, ticks| b.use_without_item(level, ticks, BlockPos::new(hit.pos[0], hit.pos[1], hit.pos[2]), face, at, player)); + self.process_level_events()?; + if result.consumes_action() { + self.swing_arm(); + return Ok(()); + } + } + let Some(stack) = self.held().cloned() else { return Ok(()) }; + let Some(info) = self.res.items.get(&stack.item).cloned() else { return Ok(()) }; + if &*stack.item == "minecraft:bow" { + if self.using.is_none() { + self.using = Some((self.selected, 0)); + } + return Ok(()); + } + if info.food.is_some() + && let Some(p) = self.player.as_ref() + && (p.health.food.food < 20 || self.creative) + { + // Consumable.startConsuming: held right click for consume_seconds. + if self.using.is_none() { + self.using = Some((self.selected, 0)); + } + return Ok(()); + } + if self.use_tool(&stack)? { + return Ok(()); + } + let Some(hit) = self.pick() else { return Ok(()) }; + if info.block.is_none() { + return Ok(()); + } + let face = match hit.face { + [0, 1, 0] => Direction::Up, + [0, -1, 0] => Direction::Down, + [0, 0, -1] => Direction::North, + [0, 0, 1] => Direction::South, + [-1, 0, 0] => Direction::West, + _ => Direction::East, + }; + // BlockItem.place through the vanilla placement rules. + let ctx = PlaceContext { + clicked_pos: BlockPos::new(hit.pos[0], hit.pos[1], hit.pos[2]), + face, + hit: Vec3::new(hit.point[0], hit.point[1], hit.point[2]), + inside: false, + yaw: self.yaw, + pitch: self.pitch, + sneaking: self.keys.contains(&KeyCode::ShiftLeft), + item: stack.item.to_string(), + can_use_game_master_blocks: false, + }; + let outcome = self.with_level(|b, level, ticks| b.place_block(level, ticks, &ctx)); + let PlaceOutcome::Placed { pos, state } = outcome else { + self.process_level_events()?; + return Ok(()); + }; + let target = [pos.x, pos.y, pos.z]; + if let Some(entity) = BlockEntity::for_block(&self.res.facts.get(state).name) { + self.world.block_entities.insert((target[0], target[1], target[2]), entity); + } + self.swing_arm(); + let sounds = self.res.facts.get(state).sounds.clone(); + let center = [f64::from(target[0]) + 0.5, f64::from(target[1]) + 0.5, f64::from(target[2]) + 0.5]; + self.audio.play(&sounds.place, Some(center), (sounds.volume + 1.0) / 2.0, sounds.pitch * 0.8); + self.process_level_events()?; + self.consume_held(); + Ok(()) + } + fn consume_held(&mut self) { + if self.creative { + return; + } + if let Some(s) = self.inventory[self.selected].as_mut() { + s.count -= 1; + if s.count == 0 { + self.inventory[self.selected] = None; + } + } + } + fn tick_using(&mut self) { + let Some((slot, ticks)) = self.using else { return }; + let Some(stack) = self.inventory[slot].clone() else { + self.using = None; + return; + }; + if !self.right || slot != self.selected || self.screen != Screen::Playing { + if &*stack.item == "minecraft:bow" && slot == self.selected { + self.release_bow(ticks); + } + self.using = None; + return; + } + let Some(info) = self.res.items.get(&stack.item).cloned() else { + self.using = None; + return; + }; + if &*stack.item == "minecraft:bow" { + self.using = Some((slot, ticks + 1)); + return; + } + let duration = 32; + let ticks = ticks + 1; + let remaining = duration - ticks.min(duration); + let eye = self.eye_position().unwrap_or_default(); + // Consumable.shouldEmitParticlesAndSounds: every 4 ticks in the last 25. + if remaining <= 25 && remaining % 4 == 0 { + let pitch = (self.world.random.next_float() - self.world.random.next_float()) * 0.2 + 1.0; + self.audio.play("minecraft:entity.generic.eat", Some(eye), 0.5 + 0.5 * self.world.random.next_int_bound(2).unwrap_or(0) as f32, pitch); + if let Some(Icon::Flat(sprite)) = self.icon(&stack.item) { + let (yaw, pitch) = (f64::from(self.yaw).to_radians(), f64::from(self.pitch).to_radians()); + let at = [eye[0] - yaw.sin() * pitch.cos() * 0.3, eye[1] - 0.1, eye[2] + yaw.cos() * pitch.cos() * 0.3]; + for _ in 0..5 { + let v = [(f64::from(self.world.random.next_float()) - 0.5) * 0.1, 0.1, (f64::from(self.world.random.next_float()) - 0.5) * 0.1]; + let p = Particle::terrain(&mut self.world.random, at, v, sprite.clone(), 0xFFFFFF); + self.particles.push(p); + } + } + } + if ticks >= duration { + self.using = None; + if let Some((nutrition, saturation)) = info.food + && let Some(p) = self.player.as_mut() + { + // FoodData.eat(nutrition, saturation) + let food = &mut p.health.food; + food.food = (food.food + nutrition as i32).clamp(0, 20); + food.saturation = (food.saturation + saturation).clamp(0.0, food.food as f32); + self.audio.play("minecraft:entity.player.burp", Some(eye), 0.5, self.world.random.next_float() * 0.1 + 0.9); + self.consume_held(); + } + } else { + self.using = Some((slot, ticks)); + } + } + fn tick_mining(&mut self) -> Result<()> { + if self.destroy_delay > 0 { + self.destroy_delay -= 1; + } + if !self.left || self.screen != Screen::Playing { + self.mining = None; + return Ok(()); + } + let Some(hit) = self.pick() else { + self.mining = None; + return Ok(()); + }; + if self.creative { + if self.destroy_delay == 0 { + self.break_block(hit.pos)?; + self.destroy_delay = 5; + } + return Ok(()); + } + if self.destroy_delay > 0 { + return Ok(()); + } + if self.mining.as_ref().is_none_or(|m| m.pos != hit.pos) { + self.mining = Some(Mining { pos: hit.pos, progress: 0.0, ticks: 0 }); + } + let state = self.world.block(hit.pos[0], hit.pos[1], hit.pos[2]); + let facts = self.res.facts.get(state); + if facts.hardness < 0.0 { + return Ok(()); + } + // Player.getDestroySpeed / BlockBehaviour.getDestroyProgress. + let held = self.held(); + let mut speed = self.res.items.mining_speed(held, &facts.name); + let player = self.player.as_ref().ok_or("no player")?; + if !player.ground.on_ground { + speed /= 5.0; + } + let eye = self.eye_position().unwrap_or_default(); + if self.res.facts.get(self.world.block(eye[0].floor() as i32, eye[1].floor() as i32, eye[2].floor() as i32)).fluid == Fluid::Water { + speed /= 5.0; + } + let harvest = !facts.requires_tool || self.res.items.correct_for_drops(held, &facts.name); + let progress = if facts.hardness == 0.0 { + 1.0 + } else { + speed / facts.hardness / if harvest { 30.0 } else { 100.0 } + }; + let hit_sound = facts.sounds.clone(); + self.swing_arm(); + let m = self.mining.as_mut().ok_or("mining")?; + m.progress += progress; + m.ticks += 1; + let crack = (m.pos, hit.face); + if m.ticks % 4 == 1 { + let c = [f64::from(m.pos[0]) + 0.5, f64::from(m.pos[1]) + 0.5, f64::from(m.pos[2]) + 0.5]; + self.audio.play(&hit_sound.hit, Some(c), (hit_sound.volume + 1.0) / 8.0, hit_sound.pitch * 0.5); + } + self.crack_particle(crack.0, crack.1, state); + let m = self.mining.as_mut().ok_or("mining")?; + if m.progress >= 1.0 { + let pos = m.pos; + self.mining = None; + self.break_block(pos)?; + self.destroy_delay = 5; + } + Ok(()) + } + /// The i-th world spawn search point: a square spiral in 48-block steps. + fn spawn_candidate(i: u32) -> (i32, i32) { + if i == 0 { + return (0, 0); + } + let mut k = 1u32; + let mut ring = 1i32; + loop { + let points = 8 * ring as u32; + if i < k + points { + let j = (i - k) as i32; + let side = j / (2 * ring); + let t = j % (2 * ring) - ring; + let (x, z) = match side { + 0 => (t, -ring), + 1 => (ring, t), + 2 => (-t, ring), + _ => (-ring, -t), + }; + return (x * 48, z * 48); + } + k += points; + ring += 1; + } + } + /// A column whose surface is a full solid, non-fluid, non-leaf block open to the sky. + fn land_column(&self, x: i32, z: i32) -> Option<i32> { + if self.dim == Dim::Nether { + // Below the bedrock ceiling: a solid floor with two air blocks above. + for y in (32..120).rev() { + let floor = self.res.facts.get(self.world.block(x, y - 1, z)); + if floor.full_collision && floor.fluid == Fluid::None + && self.res.facts.is_air(self.world.block(x, y, z)) + && self.res.facts.is_air(self.world.block(x, y + 1, z)) + { + return Some(y); + } + } + return None; + } + let mut y = MIN_Y + HEIGHT - 1; + while y > MIN_Y { + let s = self.world.block(x, y, z); + if !self.res.facts.is_air(s) { + let f = self.res.facts.get(s); + let ok = f.full_collision && f.fluid == Fluid::None && !f.name.contains("leaves") && f.hardness >= 0.0; + return ok.then_some(y + 1); + } + y -= 1; + } + None + } + fn spawn_player(&mut self) -> Result<()> { + if self.player.is_some() { + return Ok(()); + } + if let Some((_, target)) = &self.travelling { + let (cx, cz) = ((target.x.floor() as i32) >> 4, (target.z.floor() as i32) >> 4); + self.streaming.center = (cx, cz); + if (-2..=2).all(|dz| (-2..=2).all(|dx| self.streaming.is_lit(cx + dx, cz + dz))) { + let (player, target) = self.travelling.take().ok_or("travel")?; + self.place_after_travel(player, target)?; + } + return Ok(()); + } + let saved = self.level.position.map(|p| Vec3::new(p[0], p[1], p[2])); + if self.spawn.is_none() { + self.spawn = self.level.spawn.map(|s| Vec3::new(s[0] + 0.5, s[1], s[2] + 0.5)); + } + let anchor = match saved.or(self.spawn) { + Some(p) => (p.x.floor() as i32, p.z.floor() as i32), + None => Self::spawn_candidate(self.spawn_search), + }; + let (cx, cz) = (anchor.0 >> 4, anchor.1 >> 4); + self.streaming.center = (cx, cz); + if !(-1..=1).all(|dz| (-1..=1).all(|dx| self.streaming.is_lit(cx + dx, cz + dz))) { + return Ok(()); + } + let feet = if let Some(p) = saved { + self.level.position = None; + p + } else if let Some(s) = self.spawn { + // WorldSpawn: the stored column, lifted onto its current surface. + let y = self.land_column(s.x.floor() as i32, s.z.floor() as i32).map_or(s.y, f64::from); + Vec3::new(s.x, y.max(s.y), s.z) + } else { + let mut best: Option<(i64, i32, i32, i32)> = None; + for z in (cz - 1) * 16..(cz + 2) * 16 { + for x in (cx - 1) * 16..(cx + 2) * 16 { + if let Some(y) = self.land_column(x, z) { + let d = i64::from(x - anchor.0).pow(2) + i64::from(z - anchor.1).pow(2); + if best.is_none_or(|b| d < b.0) { + best = Some((d, x, y, z)); + } + } + } + } + match best { + Some((_, x, y, z)) => { + let spawn = Vec3::new(f64::from(x) + 0.5, f64::from(y), f64::from(z) + 0.5); + self.spawn = Some(spawn); + self.level.spawn = Some([f64::from(x), f64::from(y), f64::from(z)]); + spawn + } + None => { + self.spawn_search += 1; + return Ok(()); + } + } + }; + let mut player = PlayerMotion::new(self.motion, feet)?; + player.yaw = self.yaw; + if self.level.health > 0.0 && self.ticks < 2 { + player.set_health(self.level.health, false)?; + player.health.food.food = self.level.food; + player.health.food.saturation = self.level.saturation; + } + self.previous_position = feet; + self.player = Some(player); + self.apply_equipment(); + self.eye = 1.62; + self.previous_eye = 1.62; + self.clock.reset(); + Ok(()) + } + fn tick(&mut self) -> Result<()> { + self.ticks += 1; + self.world.game_time += 1; + self.world.weather.tick(&mut self.world.random); + self.tick_weather_effects(); + if self.ticks % 6000 == 0 { + self.save_game()?; + } + self.world.day_time += 1; + if self.use_delay > 0 { + self.use_delay -= 1; + } + let Some(player) = self.player.as_mut() else { return Ok(()) }; + // Hold position until the surrounding terrain exists. + let (cx, cz) = ((player.position.x.floor() as i32) >> 4, (player.position.z.floor() as i32) >> 4); + if !self.streaming.is_lit(cx, cz) { + return Ok(()); + } + let playing = self.screen == Screen::Playing; + let held = |k| playing && self.keys.contains(&k); + let keys = Keys { + forward: held(KeyCode::KeyW), + backward: held(KeyCode::KeyS), + left: held(KeyCode::KeyA), + right: held(KeyCode::KeyD), + jump: held(KeyCode::Space), + shift: held(KeyCode::ShiftLeft), + sprint: held(KeyCode::ControlLeft), + }; + self.previous_position = player.position; + player.yaw = self.yaw; + MotionWorld { + player, + scene: &mut self.world, + assets: &self.res.assets, + collision_binding: self.collision, + resources: self.motion, + } + .controlled_simulation_tick(keys)?; + let events = std::mem::take(&mut player.events); + let feet = [player.position.x, player.position.y, player.position.z]; + self.previous_eye = self.eye; + self.eye += (player.dimensions.eye_height - self.eye) * 0.5; + let crouching = player.pose == horizon_client::pose::Pose::Crouching; + for event in events { + match event { + MotionEvent::Emission { position, state, .. } if !crouching => { + // Entity.playStepSound: the block's step sound at 0.15 volume. + let sounds = self.res.facts.get(state).sounds.clone(); + self.audio.play(&sounds.step, Some(feet), sounds.volume * 0.15, sounds.pitch); + let _ = position; + } + MotionEvent::Fall(horizon_client::landing::FallEvent::Sound { sound, volume, pitch, .. }) => { + let name = match sound { + horizon_client::landing::SceneSound::BigFall => "minecraft:entity.player.big_fall", + horizon_client::landing::SceneSound::SmallFall => "minecraft:entity.player.small_fall", + _ => continue, + }; + self.audio.play(name, Some(feet), volume, pitch); + } + MotionEvent::Fall(horizon_client::landing::FallEvent::Damage { .. }) => { + self.audio.play("minecraft:entity.player.hurt", Some(feet), 1.0, 1.0); + } + _ => {} + } + } + let Some(player) = self.player.as_mut() else { return Ok(()) }; + if player.position.y < f64::from(MIN_Y - 64) { + // Out of the world. + let _ = player.set_health(0.0, false); + } + if player.health.dead_or_dying() && self.screen != Screen::Dead { + // Inventory.dropAll: every stack thrown in a random direction. + let at = [player.position.x, player.position.y + 1.32, player.position.z]; + if !self.creative { + let stacks: Vec<ItemStack> = self.inventory.iter_mut().filter_map(Option::take).collect(); + for stack in stacks { + let r = &mut self.world.random; + let strength = f64::from(r.next_float()) * 0.5; + let angle = f64::from(r.next_float()) * std::f64::consts::TAU; + let v = [-angle.sin() * strength, 0.2, angle.cos() * strength]; + self.spawn_item(stack, at, v, 40); + } + } + self.audio.play("minecraft:entity.player.death", Some(at), 1.0, 1.0); + self.screen = Screen::Dead; + self.capture(false); + } + self.tick_using(); + self.tick_mining()?; + self.tick_items(); + self.tick_mobs()?; + self.tick_experience(); + self.tick_hand(); + self.tick_sleep(); + self.tick_portal()?; + self.tick_blocks()?; + self.tick_falling()?; + if let Some(p) = &self.player { + // Player.aiStep bob and Entity.walkDist (0.6 per block). + let (dx, dz) = (p.position.x - self.previous_position.x, p.position.z - self.previous_position.z); + let speed = ((dx * dx + dz * dz).sqrt() as f32).min(0.1); + self.walk.0 = self.walk.1; + self.walk.1 += (dx * dx + dz * dz).sqrt() as f32 * 0.6; + self.bob.0 = self.bob.1; + let target = if p.ground.on_ground && !p.health.dead_or_dying() { speed } else { 0.0 }; + self.bob.1 += (target - self.bob.1) * 0.4; + } + self.tick_block_entities()?; + let facts = &self.res.facts; + let world = &self.world; + self.particles.retain_mut(|p| p.tick(world, |id| facts.states[id as usize].full_collision)); + if self.particles.len() > 4000 { + let excess = self.particles.len() - 4000; + self.particles.drain(..excess); + } + if self.right && self.use_delay == 0 && self.screen == Screen::Playing { + self.use_item()?; + self.use_delay = 4; + } + Ok(()) + } + fn capture(&mut self, capture: bool) { + let Some(window) = &self.window else { return }; + if capture { + self.captured = window + .set_cursor_grab(CursorGrabMode::Locked) + .or_else(|_| window.set_cursor_grab(CursorGrabMode::Confined)) + .is_ok(); + } else { + let _ = window.set_cursor_grab(CursorGrabMode::None); + self.captured = false; + } + window.set_cursor_visible(!self.captured); + } + fn icon(&mut self, item: &str) -> Option<Icon> { + if let Some(icon) = self.res.icons.get(item) { + return icon.clone(); + } + let icon = self.resolve_icon(item); + self.res.icons.insert(item.to_owned(), icon.clone()); + icon + } + fn resolve_icon(&self, item: &str) -> Option<Icon> { + let root = &self.options.resources; + let name = item.trim_start_matches("minecraft:"); + let info = self.res.items.get(item); + let model_name = info.map_or(name.to_owned(), |i| i.model.trim_start_matches("minecraft:").to_owned()); + let def: serde_json::Value = serde_json::from_slice( + &std::fs::read(root.join(format!("assets/minecraft/items/{model_name}.json"))).ok()?, + ) + .ok()?; + // Find the first plain model reference in the item model definition. + fn first_model(v: &serde_json::Value) -> Option<String> { + match v { + serde_json::Value::Object(o) => { + if o.get("type").and_then(|t| t.as_str()) == Some("minecraft:model") { + return o.get("model").and_then(|m| m.as_str()).map(str::to_owned); + } + for key in ["model", "fallback", "on_false", "on_true", "cases", "entries", "tints"] { + if let Some(m) = o.get(key).and_then(first_model) { + return Some(m); + } + } + o.values().find_map(first_model) + } + serde_json::Value::Array(a) => a.iter().find_map(first_model), + _ => None, + } + } + let Some(model) = first_model(&def["model"]) else { + // Special item models (chests, beds, banners...): show the block's particle texture. + let block = self.res.assets.registry.default_state(item).or_else(|| info.and_then(|i| i.block))?; + let (sprite, tint) = self.particle_sprite(block).or_else(|| self.model_particle(name).map(|s| (s, 0xFFFFFF)))?; + return Some(Icon::Cube { top: sprite.clone(), left: sprite.clone(), right: sprite, tint }); + }; + let path = model.trim_start_matches("minecraft:").to_owned(); + let mut current = path.clone(); + let mut textures = serde_json::Map::new(); + for _ in 0..16 { + let text = std::fs::read(root.join(format!("assets/minecraft/models/{current}.json"))).ok()?; + let m: serde_json::Value = serde_json::from_slice(&text).ok()?; + if let Some(t) = m["textures"].as_object() { + for (k, v) in t { + textures.entry(k.clone()).or_insert(v.clone()); + } + } + match m["parent"].as_str() { + Some(p) if p.ends_with("item/generated") || p.ends_with("item/handheld") || p.contains("handheld") => { + let layer = textures.get("layer0")?.as_str()?; + return Some(Icon::Flat(layer.trim_start_matches("minecraft:").to_owned())); + } + Some(p) => current = p.trim_start_matches("minecraft:").to_owned(), + None => break, + } + } + if path.starts_with("block/") { + let block = self.res.assets.registry.default_state(&format!("minecraft:{name}")) + .or_else(|| info.and_then(|i| i.block))?; + let models = self.res.assets.model_catalog.collect(block, horizon_core::position::BlockPos::new(0, 0, 0)).ok()?; + let mut faces: HashMap<usize, (u32, i32)> = HashMap::new(); + for (_, m) in &models { + for f in &m.faces { + faces.entry(f.quad.facing as usize).or_insert((f.layer, f.quad.tint_index)); + } + } + use horizon_assets::model::Direction as D; + let get = |d: D| faces.get(&(d as usize)).and_then(|(l, _)| self.res.layer_names.get(l)).cloned(); + let top = get(D::Up)?; + let tinted = faces.get(&(D::Up as usize)).is_some_and(|(_, t)| *t >= 0); + let tint = if tinted { + if name.contains("leaves") || name == "vine" { 0x48B518 } else { 0x91BD59 } + } else { + 0xFFFFFF + }; + return Some(Icon::Cube { + left: get(D::South).unwrap_or(top.clone()), + right: get(D::East).unwrap_or(top.clone()), + top, + tint, + }); + } + textures + .get("layer0") + .or_else(|| textures.get("all")) + .or_else(|| textures.get("texture")) + .and_then(|t| t.as_str()) + .map(|t| Icon::Flat(t.trim_start_matches("minecraft:").to_owned())) + } + fn draw_item(&mut self, batch: &mut HudBatch, stack: &ItemStack, x: f32, y: f32) { + let icon = self.icon(&stack.item); + let atlas = &self.res.atlas; + match icon { + Some(Icon::Flat(name)) => batch.sprite_scaled(atlas, &name, x, y, 16.0, 16.0, u32::MAX), + Some(Icon::Cube { top, left, right, tint }) => { + let color = |b: f32| { + let c = |s: u32| (((tint >> s) & 255) as f32 * b) as u8; + rgba(c(16), c(8), c(0), 255) + }; + let (cx, top_y) = (x + 8.0, y + 1.0); + let quad = |batch: &mut HudBatch, name: &str, p: [[f32; 2]; 4], c: u32| { + if let Some(r) = atlas.sprites.get(name).copied() { + batch.quad(p, [[r.u0, r.v0], [r.u1, r.v0], [r.u1, r.v1], [r.u0, r.v1]], c); + } + }; + let (w, h) = (7.0, 3.6); + quad(batch, &top, [[cx, top_y], [cx + w, top_y + h], [cx, top_y + 2.0 * h], [cx - w, top_y + h]], color(1.0)); + let side = 8.0; + quad(batch, &left, [[cx - w, top_y + h], [cx, top_y + 2.0 * h], [cx, top_y + 2.0 * h + side], [cx - w, top_y + h + side]], color(0.8)); + quad(batch, &right, [[cx, top_y + 2.0 * h], [cx + w, top_y + h], [cx + w, top_y + h + side], [cx, top_y + 2.0 * h + side]], color(0.6)); + } + None => batch.fill(atlas, x + 2.0, y + 2.0, 12.0, 12.0, rgba(200, 0, 200, 255)), + } + if stack.count > 1 { + let text = stack.count.to_string(); + let w = HudBatch::text_width(atlas, &text); + batch.text(atlas, &text, x + 17.0 - w, y + 9.0, u32::MAX, true); + } + if let Some(info) = self.res.items.get(&stack.item) + && info.max_damage > 0 + && stack.damage > 0 + { + let f = 1.0 - stack.damage as f32 / info.max_damage as f32; + let width = (13.0 * f).round(); + let hue = f / 3.0; + let (r, g) = ((255.0 * (1.0 - hue * 3.0).clamp(0.0, 1.0)) as u8, (255.0 * (hue * 3.0).clamp(0.0, 1.0)) as u8); + batch.fill(atlas, x + 2.0, y + 13.0, 13.0, 2.0, rgba(0, 0, 0, 255)); + batch.fill(atlas, x + 2.0, y + 13.0, width, 1.0, rgba(r, g, 0, 255)); + } + } + fn hud(&mut self, size: [u32; 2]) -> HudBatch { + let mut batch = HudBatch::new(size); + let (w, h) = (batch.width, batch.height); + if self.screen == Screen::Options { + self.settings.draw(&self.res.atlas, &mut batch, self.cursor); + return batch; + } + if let Some(title) = &self.title { + title.draw(&self.res.atlas, &mut batch, self.cursor); + return batch; + } + let atlas_ptr: *const HudAtlas = &self.res.atlas; + let _ = atlas_ptr; + if self.player.is_none() { + let text = if self.spawn_search > 0 { "Finding a place to spawn..." } else { "Loading terrain..." }; + let atlas = &self.res.atlas; + let tw = HudBatch::text_width(atlas, text); + batch.fill(atlas, 0.0, 0.0, w, h, rgba(20, 20, 20, 255)); + batch.text(atlas, text, (w - tw) / 2.0, h / 2.0 - 4.0, u32::MAX, true); + return batch; + } + { + let atlas = &self.res.atlas; + // Crosshair. + batch.sprite(atlas, "gui/sprites/hud/crosshair", (w - 15.0) / 2.0, (h - 15.0) / 2.0); + // Hotbar. + batch.sprite(atlas, "gui/sprites/hud/hotbar", w / 2.0 - 91.0, h - 22.0); + batch.sprite(atlas, "gui/sprites/hud/hotbar_selection", w / 2.0 - 91.0 - 1.0 + self.selected as f32 * 20.0, h - 23.0); + } + for i in 0..9 { + if let Some(stack) = self.inventory[i].clone() { + self.draw_item(&mut batch, &stack, w / 2.0 - 90.0 + i as f32 * 20.0 + 2.0, h - 19.0); + } + } + let atlas = &self.res.atlas; + if !self.creative + && let Some(p) = &self.player + { + // Experience bar and hearts/food (Gui.renderPlayerHealth). + batch.sprite(atlas, "gui/sprites/hud/experience_bar_background", w / 2.0 - 91.0, h - 29.0); + let filled = (self.experience.progress * 183.0).floor() / 182.0; + if filled > 0.0 { + batch.sprite_part(atlas, "gui/sprites/hud/experience_bar_progress", w / 2.0 - 91.0, h - 29.0, filled.min(1.0)); + } + if self.experience.level > 0 { + // Gui.renderExperienceLevel: green text with a black outline. + let text = self.experience.level.to_string(); + let tw = HudBatch::text_width(atlas, &text); + let (x, y) = ((w - tw) / 2.0, h - 31.0 - 4.0); + for (dx, dy) in [(1.0, 0.0), (-1.0, 0.0), (0.0, 1.0), (0.0, -1.0)] { + batch.text(atlas, &text, x + dx, y + dy, rgba(0, 0, 0, 255), false); + } + batch.text(atlas, &text, x, y, rgba(128, 255, 32, 255), false); + } + let health = p.health.health().ceil() as i32; + let top = h - 39.0; + for i in 0..10 { + let x = w / 2.0 - 91.0 + i as f32 * 8.0; + let y = if health <= 4 { top + ((self.ticks + i as u64 * 7) % 3) as f32 - 1.0 } else { top }; + batch.sprite(atlas, "gui/sprites/hud/heart/container", x, y); + let v = health - i * 2; + if v >= 2 { + batch.sprite(atlas, "gui/sprites/hud/heart/full", x, y); + } else if v == 1 { + batch.sprite(atlas, "gui/sprites/hud/heart/half", x, y); + } + } + let food = p.health.food.food; + for i in 0..10 { + let x = w / 2.0 + 91.0 - i as f32 * 8.0 - 9.0; + batch.sprite(atlas, "gui/sprites/hud/food_empty", x, top); + let v = food - i * 2; + if v >= 2 { + batch.sprite(atlas, "gui/sprites/hud/food_full", x, top); + } else if v == 1 { + batch.sprite(atlas, "gui/sprites/hud/food_half", x, top); + } + } + } + if self.debug { + let p = self.player.as_ref().map(|p| p.position).unwrap_or(Vec3::ZERO); + let block = [p.x.floor() as i32, p.y.floor() as i32, p.z.floor() as i32]; + let biome = self + .world + .chunks + .get(&(block[0] >> 4, block[2] >> 4)) + .map(|c| self.res.biomes.get(c.biome(block[0], block[1], block[2])).name.clone()) + .unwrap_or_default(); + let light = self.world.light(block[0], block[1], block[2]); + let facing = match ((self.yaw.rem_euclid(360.0) + 45.0) / 90.0) as i32 % 4 { + 0 => "south (Towards positive Z)", + 1 => "west (Towards negative X)", + 2 => "north (Towards negative Z)", + _ => "east (Towards positive X)", + }; + let lines = [ + format!("Horizon 26.3 (Rust) {:.0} fps", self.fps), + format!("C: {} chunks, {} sections drawn / {}", self.world.chunks.len(), self.renderer.as_ref().map_or(0, |r| r.drawn_sections), self.renderer.as_ref().map_or(0, |r| r.section_count())), + format!("Pending jobs: {}", self.streaming.pending()), + String::new(), + format!("XYZ: {:.3} / {:.5} / {:.3}", p.x, p.y, p.z), + format!("Block: {} {} {}", block[0], block[1], block[2]), + format!("Chunk: {} {} {} in {} {} {}", block[0] & 15, block[1] & 15, block[2] & 15, block[0] >> 4, block[1] >> 4, block[2] >> 4), + format!("Facing: {facing} ({:.1} / {:.1})", self.yaw.rem_euclid(360.0) - if self.yaw.rem_euclid(360.0) > 180.0 { 360.0 } else { 0.0 }, self.pitch), + format!("Light: {} (sky {}, block {})", (light >> 4).max(light & 15), light >> 4, light & 15), + format!("Biome: {biome}"), + format!("Day {} time {}", self.world.day_time / 24000, self.world.day_time % 24000), + ]; + for (i, line) in lines.iter().enumerate() { + if line.is_empty() { + continue; + } + let tw = HudBatch::text_width(atlas, line); + batch.fill(atlas, 1.0, 2.0 + i as f32 * 9.0 - 1.0, tw + 2.0, 9.0, rgba(80, 80, 80, 144)); + batch.text(atlas, line, 2.0, 2.0 + i as f32 * 9.0, rgba(224, 224, 224, 255), false); + } + } + if let Some((text, at)) = &self.message + && at.elapsed() < Duration::from_secs(3) + { + let tw = HudBatch::text_width(atlas, text); + batch.text(atlas, text, (w - tw) / 2.0, h - 59.0, u32::MAX, true); + } + if let Some((_, ticks)) = self.sleeping { + // Gui sleep overlay fading in over 100 ticks. + let a = ((ticks as f32 / 100.0).min(1.0) * 204.0) as u8; + batch.fill(atlas, 0.0, 0.0, w, h, rgba(16, 16, 32, a)); + } + match self.screen { + Screen::Paused => { + batch.fill(atlas, 0.0, 0.0, w, h, rgba(16, 16, 16, 160)); + let title = "Game Menu"; + let tw = HudBatch::text_width(atlas, title); + batch.text(atlas, title, (w - tw) / 2.0, 40.0, u32::MAX, true); + for (i, label) in ["Back to Game", "Options...", "Save and Quit to Title"].iter().enumerate() { + let (bx, by) = (w / 2.0 - 100.0, h / 4.0 + 24.0 + i as f32 * 24.0 + 16.0); + let hover = self.cursor.0 >= bx && self.cursor.0 < bx + 200.0 && self.cursor.1 >= by && self.cursor.1 < by + 20.0; + let sprite = if hover { "gui/sprites/widget/button_highlighted" } else { "gui/sprites/widget/button" }; + batch.sprite_scaled(atlas, sprite, bx, by, 200.0, 20.0, u32::MAX); + let tw = HudBatch::text_width(atlas, label); + batch.text(atlas, label, bx + (200.0 - tw) / 2.0, by + 6.0, u32::MAX, true); + } + } + Screen::Dead => { + batch.fill(atlas, 0.0, 0.0, w, h, rgba(80, 0, 0, 120)); + let title = "You Died!"; + let tw = HudBatch::text_width(atlas, title); + batch.text(atlas, title, (w - tw) / 2.0, 60.0, u32::MAX, true); + let (bx, by) = (w / 2.0 - 100.0, h / 4.0 + 72.0); + batch.sprite_scaled(atlas, "gui/sprites/widget/button", bx, by, 200.0, 20.0, u32::MAX); + let label = "Respawn"; + let tw = HudBatch::text_width(atlas, label); + batch.text(atlas, label, bx + (200.0 - tw) / 2.0, by + 6.0, u32::MAX, true); + } + Screen::Inventory => { + self.draw_inventory(&mut batch); + } + Screen::Creative => { + self.draw_creative(&mut batch); + } + Screen::Playing | Screen::Options => {} + } + batch + } + fn inventory_origin(&self, batch: &HudBatch) -> (f32, f32) { + ((batch.width - 176.0) / 2.0, (batch.height - 166.0) / 2.0) + } + /// Slot ids: 0..36 player inventory, 100..109 crafting grid, 200 result. + fn container_kind(&self) -> Option<&BlockEntity> { + self.container.and_then(|k| self.world.block_entities.get(&k)) + } + /// 300.. are the open container's slots. + fn slots(&self) -> Vec<usize> { + let mut v: Vec<usize> = (0..36).collect(); + match self.container_kind() { + Some(BlockEntity::Chest(items)) => v.extend((0..items.len()).map(|i| 300 + i)), + Some(BlockEntity::Furnace(_)) => v.extend(300..303), + None => { + v.extend((0..self.craft_size * self.craft_size).map(|i| 100 + i)); + v.push(200); + if self.craft_size == 2 { + v.extend(500..504); + } + } + } + v + } + /// InventoryMenu / CraftingMenu slot layouts. + fn slot_position(&self, i: usize) -> (f32, f32) { + let table = self.craft_size == 3; + // ContainerScreen (3 rows) shifts the player inventory down by one pixel. + let shift = if matches!(self.container_kind(), Some(BlockEntity::Chest(_))) { 1.0 } else { 0.0 }; + match i { + 0..9 => (8.0 + i as f32 * 18.0, 142.0 + shift), + 9..36 => (8.0 + ((i - 9) % 9) as f32 * 18.0, 84.0 + shift + ((i - 9) / 9) as f32 * 18.0), + 500..504 => (8.0, 8.0 + (i - 500) as f32 * 18.0), + 300..500 => match self.container_kind() { + Some(BlockEntity::Furnace(_)) => [(56.0, 17.0), (56.0, 53.0), (116.0, 35.0)][(i - 300).min(2)], + _ => (8.0 + ((i - 300) % 9) as f32 * 18.0, 18.0 + ((i - 300) / 9) as f32 * 18.0), + }, + 200 => if table { (124.0, 35.0) } else { (154.0, 28.0) }, + _ => { + let g = i - 100; + let (r, c) = (g / self.craft_size, g % self.craft_size); + if table { + (30.0 + c as f32 * 18.0, 17.0 + r as f32 * 18.0) + } else { + (98.0 + c as f32 * 18.0, 18.0 + r as f32 * 18.0) + } + } + } + } + fn slot_at(&self, batch: &HudBatch, x: f32, y: f32) -> Option<usize> { + let (ox, oy) = self.inventory_origin(batch); + self.slots().into_iter().find(|&i| { + let (sx, sy) = self.slot_position(i); + x >= ox + sx && x < ox + sx + 16.0 && y >= oy + sy && y < oy + sy + 16.0 + }) + } + fn slot_mut(&mut self, i: usize) -> &mut Option<ItemStack> { + if (500..504).contains(&i) { + return &mut self.armor[i - 500]; + } + if i >= 300 { + let key = self.container; + return match key.and_then(|k| self.world.block_entities.get_mut(&k)) { + Some(e) => e.slots_mut().get_mut(i - 300).unwrap_or(&mut self.scratch_slot), + None => &mut self.scratch_slot, + }; + } + if (100..109).contains(&i) { + &mut self.craft_grid[i - 100] + } else { + &mut self.inventory[i] + } + } + fn craft_result(&self) -> Option<ItemStack> { + let n = self.craft_size; + let grid: Vec<Option<ItemStack>> = (0..n * n).map(|i| self.craft_grid[i].clone()).collect(); + self.res.recipes.craft(&grid, n) + } + fn draw_inventory(&mut self, batch: &mut HudBatch) { + let (ox, oy) = self.inventory_origin(batch); + { + let atlas = &self.res.atlas; + batch.fill(atlas, 0.0, 0.0, batch.width, batch.height, rgba(16, 16, 16, 160)); + let part = |batch: &mut HudBatch, name: &str, sx: f32, sy: f32, w: f32, h: f32, dx: f32, dy: f32| { + if let Some(mut r) = atlas.sprites.get(name).copied() { + let (du, dv) = ((r.u1 - r.u0) / r.w as f32, (r.v1 - r.v0) / r.h as f32); + r.u0 += sx * du; + r.v0 += sy * dv; + r.u1 = r.u0 + w * du; + r.v1 = r.v0 + h * dv; + batch.rect_uv(dx, dy, w, h, r, u32::MAX); + } + }; + let grey = rgba(64, 64, 64, 255); + match self.container.and_then(|k| self.world.block_entities.get(&k)) { + Some(BlockEntity::Chest(_)) => { + // ContainerScreen with 3 rows: top 71px, then the player inventory from v=126. + part(batch, "gui/container/generic_54", 0.0, 0.0, 176.0, 71.0, ox, oy); + part(batch, "gui/container/generic_54", 0.0, 126.0, 176.0, 96.0, ox, oy + 71.0); + let name = self.container.map(|k| self.world.block(k.0, k.1, k.2)).map(|s| self.res.facts.get(s).name.clone()); + let title = if name.as_deref() == Some("minecraft:barrel") { "Barrel" } else { "Chest" }; + batch.text(atlas, title, ox + 8.0, oy + 6.0, grey, false); + batch.text(atlas, "Inventory", ox + 8.0, oy + 73.0, grey, false); + } + Some(BlockEntity::Furnace(f)) => { + let (tex, title) = match f.kind { + horizon_client::containers::FurnaceKind::Furnace => ("gui/container/furnace", "Furnace"), + horizon_client::containers::FurnaceKind::BlastFurnace => ("gui/container/blast_furnace", "Blast Furnace"), + horizon_client::containers::FurnaceKind::Smoker => ("gui/container/smoker", "Smoker"), + }; + part(batch, tex, 0.0, 0.0, 176.0, 166.0, ox, oy); + let tw = HudBatch::text_width(atlas, title); + batch.text(atlas, title, ox + (176.0 - tw) / 2.0, oy + 6.0, grey, false); + batch.text(atlas, "Inventory", ox + 8.0, oy + 72.0, grey, false); + if f.lit_remaining > 0 { + // AbstractFurnaceScreen: flame height ceil(lit * 13) + 1. + let total = if f.lit_total == 0 { 200 } else { f.lit_total }; + let h = ((f.lit_remaining as f32 / total as f32) * 13.0).ceil() + 1.0; + part(batch, "gui/sprites/container/furnace/lit_progress", 0.0, 14.0 - h, 14.0, h, ox + 56.0, oy + 36.0 + 14.0 - h); + } + if f.cooking_timer > 0 && f.cooking_total > 0 { + let w = ((f.cooking_timer as f32 / f.cooking_total as f32) * 24.0).ceil(); + part(batch, "gui/sprites/container/furnace/burn_progress", 0.0, 0.0, w, 16.0, ox + 79.0, oy + 34.0); + } + } + None => { + let texture = if self.craft_size == 3 { "gui/container/crafting_table" } else { "gui/container/inventory" }; + part(batch, texture, 0.0, 0.0, 176.0, 166.0, ox, oy); + let (title, tx) = if self.craft_size == 3 { ("Crafting", 29.0) } else { ("Crafting", 97.0) }; + batch.text(atlas, title, ox + tx, oy + if self.craft_size == 3 { 6.0 } else { 8.0 }, grey, false); + if self.craft_size == 3 { + batch.text(atlas, "Inventory", ox + 8.0, oy + 72.0, grey, false); + } + } + } + } + for i in self.slots() { + let (sx, sy) = self.slot_position(i); + if (500..504).contains(&i) && self.armor[i - 500].is_none() { + let icon = ["helmet", "chestplate", "leggings", "boots"][i - 500]; + batch.sprite(&self.res.atlas, &format!("gui/sprites/container/slot/{icon}"), ox + sx, oy + sy); + } + let stack = if i == 200 { self.craft_result() } else { self.slot_mut(i).clone() }; + if let Some(stack) = stack { + self.draw_item(batch, &stack, ox + sx, oy + sy); + } + } + if let Some(slot) = self.slot_at(batch, self.cursor.0, self.cursor.1) { + let (sx, sy) = self.slot_position(slot); + batch.fill(&self.res.atlas, ox + sx, oy + sy, 16.0, 16.0, rgba(255, 255, 255, 128)); + } + if let Some(stack) = self.carried.clone() { + self.draw_item(batch, &stack, self.cursor.0 - 8.0, self.cursor.1 - 8.0); + } + } + fn close_container(&mut self) { + let mut returned: Vec<ItemStack> = self.carried.take().into_iter().collect(); + returned.extend(self.craft_grid.iter_mut().filter_map(Option::take)); + for stack in returned { + if let Some(rest) = self.give(stack) + && let Some(eye) = self.eye_position() + { + self.spawn_item(rest, [eye[0], eye[1] - 0.3, eye[2]], [0.0, 0.1, 0.0], 40); + } + } + self.craft_size = 2; + if let Some(key) = self.container.take() { + let name = self.res.facts.get(self.world.block(key.0, key.1, key.2)).name.clone(); + let sound = if name.contains("chest") { Some("minecraft:block.chest.close") } else if &*name == "minecraft:barrel" { Some("minecraft:block.barrel.close") } else { None }; + if let Some(sound) = sound { + self.audio.play(sound, Some([f64::from(key.0) + 0.5, f64::from(key.1) + 0.5, f64::from(key.2) + 0.5]), 0.5, 1.0); + } + self.world.modified.insert((key.0 >> 4, key.2 >> 4)); + } + } + fn click_inventory(&mut self, right: bool) { + let Some(size) = self.renderer.as_ref().map(|r| [r.config.width, r.config.height]) else { return }; + let batch = HudBatch::new(size); + let Some(slot) = self.slot_at(&batch, self.cursor.0, self.cursor.1) else { return }; + let max = |items: &Items, s: &ItemStack| items.get(&s.item).map_or(64, |i| i.max_stack); + let shift = self.keys.contains(&KeyCode::ShiftLeft) || self.keys.contains(&KeyCode::ShiftRight); + if slot >= 300 { + if let Some(key) = self.container { + self.world.modified.insert((key.0 >> 4, key.2 >> 4)); + } + } + let is_furnace = matches!(self.container_kind(), Some(BlockEntity::Furnace(_))); + if is_furnace && slot == 302 { + // FurnaceResultSlot: take only. + let Some(result) = self.slot_mut(302).take() else { return }; + match &mut self.carried { + None => self.carried = Some(result), + Some(c) if c.item == result.item && c.count + result.count <= max(&self.res.items, c) => c.count += result.count, + _ => *self.slot_mut(302) = Some(result), + } + return; + } + if is_furnace + && slot == 300 + && let Some(BlockEntity::Furnace(f)) = self.container.and_then(|k| self.world.block_entities.get_mut(&k)) + { + // Changing the input restarts cooking (AbstractFurnaceBlockEntity.setItem). + f.cooking_timer = 0; + } + if slot == 200 { + // ResultSlot: take the crafted stack and consume one of each ingredient. + let mut crafted = 0; + while let Some(result) = self.craft_result() { + if shift { + if self.give(result).is_some() { + break; + } + } else { + match &mut self.carried { + None => self.carried = Some(result), + Some(c) if c.item == result.item && c.count + result.count <= max(&self.res.items, c) => c.count += result.count, + _ => return, + } + } + for cell in self.craft_grid.iter_mut() { + if let Some(s) = cell { + s.count -= 1; + if s.count == 0 { + *cell = None; + } + } + } + crafted += 1; + if !shift || crafted >= 64 { + break; + } + } + return; + } + if shift && slot < 36 { + // Quick move between hotbar and main inventory. + if let Some(stack) = self.inventory[slot].take() { + let range = if slot < 9 { 9..36 } else { 0..9 }; + let mut stack = stack; + for i in range.clone() { + if let Some(s) = &mut self.inventory[i] + && s.item == stack.item + && s.damage == stack.damage + { + let moved = max(&self.res.items, s).saturating_sub(s.count).min(stack.count); + s.count += moved; + stack.count -= moved; + } + } + if stack.count > 0 + && let Some(i) = range.clone().find(|&i| self.inventory[i].is_none()) + { + self.inventory[i] = Some(stack); + stack = ItemStack { count: 0, ..self.inventory[i].clone().unwrap() }; + } + if stack.count > 0 { + self.inventory[slot] = Some(stack); + } + } + return; + } + if (500..504).contains(&slot) { + let wanted = ["head", "chest", "legs", "feet"][slot - 500]; + let fits = self.carried.as_ref().is_none_or(|c| self.res.items.get(&c.item).and_then(|i| i.equip_slot.as_deref()) == Some(wanted)); + if !fits { + return; + } + std::mem::swap(&mut self.carried, &mut self.armor[slot - 500]); + self.apply_equipment(); + return; + } + let carried = self.carried.take(); + let current = self.slot_mut(slot).take(); + let items = &self.res.items; + let (new_slot, new_carried) = match (carried, current) { + (None, Some(mut s)) if right => { + let half = s.count.div_ceil(2); + s.count -= half; + let taken = ItemStack { count: half, ..s.clone() }; + ((s.count > 0).then_some(s), Some(taken)) + } + (None, s) => (None, s), + (Some(mut c), None) if right => { + let one = ItemStack { count: 1, ..c.clone() }; + c.count -= 1; + (Some(one), (c.count > 0).then_some(c)) + } + (Some(c), None) => (Some(c), None), + (Some(mut c), Some(mut s)) if c.item == s.item && c.damage == s.damage => { + let room = max(items, &s).saturating_sub(s.count); + let moved = if right { 1.min(room).min(c.count) } else { room.min(c.count) }; + s.count += moved; + c.count -= moved; + (Some(s), (c.count > 0).then_some(c)) + } + (Some(c), Some(s)) => (Some(c), Some(s)), + }; + *self.slot_mut(slot) = new_slot; + self.carried = new_carried; + } + /// ItemEntityRenderer: items bob and spin; blocks render as small cubes. + fn entity_geometry(&mut self, camera: glam::DVec3, alpha: f64) -> Vec<Vertex> { + let mut out = Vec::new(); + let items = self.dropped.clone(); + for item in &items { + let p = item.previous; + let q = item.position; + let pos = glam::DVec3::new( + p.x + (q.x - p.x) * alpha, + p.y + (q.y - p.y) * alpha, + p.z + (q.z - p.z) * alpha, + ) - camera; + if pos.length_squared() > 64.0 * 64.0 { + continue; + } + let age = item.age as f32 + alpha as f32; + let bob = (age / 10.0 + item.bob_offset).sin() * 0.1 + 0.1; + let spin = age / 20.0 + item.bob_offset; + let light = self.world.light(q.x.floor() as i32, (q.y + 0.1).floor() as i32, q.z.floor() as i32); + let packed = u32::from(light >> 4) * 16 | (u32::from(light & 15) * 16) << 8; + let center = pos.as_vec3() + glam::Vec3::new(0.0, bob + 0.125, 0.0); + let rot = glam::Mat3::from_rotation_y(spin); + let icon = self.icon(&item.stack.item); + let atlas = &self.res.atlas; + let mut quad = |corners: [glam::Vec3; 4], name: &str, shade: f32, tint: u32| { + let Some(r) = atlas.sprites.get(name).copied() else { return }; + let uv = [[r.u0, r.v1], [r.u1, r.v1], [r.u1, r.v0], [r.u0, r.v0]]; + let c = |sft: u32| (((tint >> sft) & 255) as f32 * shade) as u32; + let color = 0xFF00_0000 | c(0) << 16 | c(8) << 8 | c(16); + for (corner, uv) in corners.iter().zip(uv) { + let v = center + rot * *corner; + out.push(Vertex { pos: v.to_array(), uv, layer: 0, color, light: packed }); + } + }; + let copies = match item.stack.count { + 0..=1 => 1, + 2..=16 => 2, + 17..=32 => 3, + _ => 4, + }; + for k in 0..copies { + let o = glam::Vec3::new(k as f32 * 0.03, k as f32 * 0.03, k as f32 * 0.05); + match &icon { + Some(Icon::Cube { top, left, right, tint }) => { + let h = 0.125; + let v = |x: f32, y: f32, z: f32| glam::Vec3::new(x * h, y * h, z * h) + o; + quad([v(-1., 1., 1.), v(1., 1., 1.), v(1., 1., -1.), v(-1., 1., -1.)], top, 1.0, *tint); + quad([v(-1., -1., -1.), v(1., -1., -1.), v(1., -1., 1.), v(-1., -1., 1.)], top, 0.5, *tint); + quad([v(-1., -1., 1.), v(1., -1., 1.), v(1., 1., 1.), v(-1., 1., 1.)], left, 0.8, 0xFFFFFF); + quad([v(1., -1., -1.), v(-1., -1., -1.), v(-1., 1., -1.), v(1., 1., -1.)], left, 0.8, 0xFFFFFF); + quad([v(1., -1., 1.), v(1., -1., -1.), v(1., 1., -1.), v(1., 1., 1.)], right, 0.6, 0xFFFFFF); + quad([v(-1., -1., -1.), v(-1., -1., 1.), v(-1., 1., 1.), v(-1., 1., -1.)], right, 0.6, 0xFFFFFF); + } + Some(Icon::Flat(name)) => { + let h = 0.25; + let v = |x: f32, y: f32| glam::Vec3::new(x * h, y * h + 0.125, 0.0) + o; + quad([v(-1., -1.), v(1., -1.), v(1., 1.), v(-1., 1.)], name, 1.0, 0xFFFFFF); + } + None => {} + } + } + } + // Mobs. + for mob in &self.mobs { + let d = glam::DVec3::new(mob.position.x, mob.position.y, mob.position.z) - camera; + if d.length_squared() > 128.0 * 128.0 { + continue; + } + let Some(r) = self.res.atlas.sprites.get(&mob.kind.texture).copied() else { continue }; + let light = self.world.light(mob.position.x.floor() as i32, (mob.position.y + mob.kind.eye_height).floor() as i32, mob.position.z.floor() as i32); + let packed = u32::from(light >> 4) * 16 | (u32::from(light & 15) * 16) << 8; + horizon_client::mobs::render(mob, alpha as f32, camera, [r.u0, r.v0, r.u1, r.v1], packed, &mut out); + } + // Arrows: two crossed quads along the flight direction. + if let Some(r) = self.res.atlas.sprites.get("entity/projectiles/arrow").copied() { + for a in &self.arrows { + let p = glam::DVec3::new( + a.previous.x + (a.position.x - a.previous.x) * alpha, + a.previous.y + (a.position.y - a.previous.y) * alpha, + a.previous.z + (a.position.z - a.previous.z) * alpha, + ) - camera; + let dir = glam::Vec3::new(a.velocity.x as f32, a.velocity.y as f32, a.velocity.z as f32).normalize_or(glam::Vec3::X); + let side = dir.cross(glam::Vec3::Y).normalize_or(glam::Vec3::Z) * 0.08; + let up = dir.cross(side).normalize_or(glam::Vec3::Y) * 0.08; + let c = p.as_vec3(); + let (u1, v1) = (r.u0 + (r.u1 - r.u0) * 0.5, r.v0 + (r.v1 - r.v0) * (5.0 / 32.0)); + for off in [side, up] { + let q = [c - dir * 0.25 - off, c + dir * 0.25 - off, c + dir * 0.25 + off, c - dir * 0.25 + off]; + for (v, uv) in q.iter().zip([[r.u0, v1], [u1, v1], [u1, r.v0], [r.u0, r.v0]]) { + out.push(Vertex { pos: v.to_array(), uv, layer: 0, color: 0xFFFF_FFFF, light: 240 | 240 << 8 }); + } + } + } + } + // Chests (ChestRenderer): rotate by facing around the block centre, lift the lid. + if let Some(model) = &self.res.chest_model { + for (pos, entity) in &self.world.block_entities { + if !matches!(entity, BlockEntity::Chest(_)) { + continue; + } + let state = self.world.block(pos.0, pos.1, pos.2); + let name = &self.res.facts.get(state).name; + let texture = match &**name { + "minecraft:chest" => "entity/chest/normal", + "minecraft:trapped_chest" => "entity/chest/trapped", + _ => continue, + }; + let origin = glam::DVec3::new(f64::from(pos.0), f64::from(pos.1), f64::from(pos.2)) - camera; + if origin.length_squared() > 64.0 * 64.0 { + continue; + } + let Some(r) = self.res.atlas.sprites.get(texture).copied() else { continue }; + let facing = self.res.assets.registry.state(state).and_then(|s| s.properties.get("facing").cloned()).unwrap_or_default(); + let yrot: f32 = match facing.as_str() { + "west" => 90.0, + "north" => 180.0, + "east" => 270.0, + _ => 0.0, + }; + let (prev, cur) = self.chest_open.get(pos).copied().unwrap_or((0.0, 0.0)); + let o = prev + (cur - prev) * alpha as f32; + let open = 1.0 - (1.0 - o).powi(3); + let base = glam::Mat4::from_translation(origin.as_vec3()) + * glam::Mat4::from_translation(glam::Vec3::new(0.5, 0.0, 0.5)) + * glam::Mat4::from_rotation_y((-yrot).to_radians()) + * glam::Mat4::from_translation(glam::Vec3::new(-0.5, 0.0, -0.5)); + let light = self.world.light(pos.0, pos.1, pos.2); + let packed = u32::from(light >> 4) * 16 | (u32::from(light & 15) * 16) << 8; + let pose = |part: &horizon_client::mobs::Part| { + let mut p = part.pose; + if part.name == "lid" || part.name == "lock" { + p[3] = -(open * std::f32::consts::FRAC_PI_2); + } + p + }; + horizon_client::mobs::render_model(model, base, &pose, [r.u0, r.v0, r.u1, r.v1], packed, 0, &mut out); + } + } + // Experience orbs (ExperienceOrbRenderer): pulsing billboards from a 4x4 icon sheet. + if let Some(r) = self.res.atlas.sprites.get("entity/experience_orb").copied() { + let (yaw, pitch) = (self.yaw.to_radians(), self.pitch.to_radians()); + let forward = glam::Vec3::new(-yaw.sin() * pitch.cos(), -pitch.sin(), yaw.cos() * pitch.cos()); + let right = forward.cross(glam::Vec3::Y).normalize_or_zero(); + let up = right.cross(forward).normalize_or_zero(); + for o in &self.orbs { + let p = glam::DVec3::new( + o.previous.x + (o.position.x - o.previous.x) * alpha, + o.previous.y + (o.position.y - o.previous.y) * alpha + 0.1, + o.previous.z + (o.position.z - o.previous.z) * alpha, + ) - camera; + let icon = o.icon(); + let (du, dv) = ((r.u1 - r.u0) / 4.0, (r.v1 - r.v0) / 4.0); + let (u0, v0) = (r.u0 + (icon % 4) as f32 * du, r.v0 + (icon / 4) as f32 * dv); + let t = (o.age as f32 + alpha as f32) / 2.0; + let red = ((t.sin() + 1.0) * 0.5 * 255.0) as u32; + let blue = (((t + 4.188_79).sin() + 1.0) * 0.1 * 255.0) as u32; + let color = 0x8000_0000 | blue << 16 | 255 << 8 | red; + let light = self.world.light(o.position.x.floor() as i32, o.position.y.floor() as i32, o.position.z.floor() as i32); + let packed = u32::from(light >> 4).max(10) * 16 | (u32::from(light & 15).max(10) * 16) << 8; + let c = p.as_vec3(); + let s = 0.15; + for (k, uv) in [(-1.0, -1.0), (1.0, -1.0), (1.0, 1.0), (-1.0, 1.0)].iter().zip([[u0, v0 + dv], [u0 + du, v0 + dv], [u0 + du, v0], [u0, v0]]) { + let v = c + right * (k.0 * s) + up * (k.1 * s); + out.push(Vertex { pos: v.to_array(), uv, layer: 0, color, light: packed }); + } + } + } + // Falling blocks: a unit cube with the block's texture. + for f in self.falling.clone() { + let Some((sprite, tint)) = self.particle_sprite(f.state) else { continue }; + let Some(r) = self.res.atlas.sprites.get(&sprite).copied() else { continue }; + let p = glam::DVec3::new( + f.previous.x + (f.position.x - f.previous.x) * alpha - 0.5, + f.previous.y + (f.position.y - f.previous.y) * alpha, + f.previous.z + (f.position.z - f.previous.z) * alpha - 0.5, + ) - camera; + let o = p.as_vec3(); + let light = self.world.light(f.position.x.floor() as i32, f.position.y.floor() as i32 + 1, f.position.z.floor() as i32); + let packed = u32::from(light >> 4) * 16 | (u32::from(light & 15) * 16) << 8; + let v = |x: f32, y: f32, z: f32| o + glam::Vec3::new(x, y, z); + let faces = [ + ([v(0., 1., 1.), v(1., 1., 1.), v(1., 1., 0.), v(0., 1., 0.)], 1.0), + ([v(0., 0., 0.), v(1., 0., 0.), v(1., 0., 1.), v(0., 0., 1.)], 0.5), + ([v(1., 0., 0.), v(0., 0., 0.), v(0., 1., 0.), v(1., 1., 0.)], 0.8), + ([v(0., 0., 1.), v(1., 0., 1.), v(1., 1., 1.), v(0., 1., 1.)], 0.8), + ([v(0., 0., 0.), v(0., 0., 1.), v(0., 1., 1.), v(0., 1., 0.)], 0.6), + ([v(1., 0., 1.), v(1., 0., 0.), v(1., 1., 0.), v(1., 1., 1.)], 0.6), + ]; + for (corners, shade) in faces { + let c = |sft: u32| (((tint >> sft) & 255) as f32 * shade) as u32; + let color = 0xFF00_0000 | c(0) << 16 | c(8) << 8 | c(16); + for (p, uv) in corners.iter().zip([[r.u0, r.v1], [r.u1, r.v1], [r.u1, r.v0], [r.u0, r.v0]]) { + out.push(Vertex { pos: p.to_array(), uv, layer: 0, color, light: packed }); + } + } + } + // Camera-facing particle quads. + let (yaw, pitch) = (self.yaw.to_radians(), self.pitch.to_radians()); + let forward = glam::Vec3::new(-yaw.sin() * pitch.cos(), -pitch.sin(), yaw.cos() * pitch.cos()); + let right = forward.cross(glam::Vec3::Y).normalize_or_zero(); + let up = right.cross(forward).normalize_or_zero(); + let atlas = &self.res.atlas; + for p in &self.particles { + let Some(r) = atlas.sprites.get(&p.sprite).copied() else { continue }; + let a = alpha; + let pos = glam::DVec3::new( + p.previous[0] + (p.position[0] - p.previous[0]) * a, + p.previous[1] + (p.position[1] - p.previous[1]) * a, + p.previous[2] + (p.position[2] - p.previous[2]) * a, + ) - camera; + let c = pos.as_vec3(); + let light = self.world.light(p.position[0].floor() as i32, p.position[1].floor() as i32, p.position[2].floor() as i32); + let packed = u32::from(light >> 4) * 16 | (u32::from(light & 15) * 16) << 8; + // TerrainParticle colour: 0.6 base brightness times the block tint. + let ch = |sft: u32| (((p.tint >> sft) & 255) as f32 * 0.6) as u32; + let color = 0xFF00_0000 | ch(0) << 16 | ch(8) << 8 | ch(16); + let (du, dv) = (r.u1 - r.u0, r.v1 - r.v0); + let (u0, v0, u1, v1) = (r.u0 + du * p.uv[0], r.v0 + dv * p.uv[1], r.u0 + du * p.uv[2], r.v0 + dv * p.uv[3]); + let s = p.size; + for (k, uv) in [(-1.0, -1.0), (1.0, -1.0), (1.0, 1.0), (-1.0, 1.0)].iter().zip([[u0, v1], [u1, v1], [u1, v0], [u0, v0]]) { + let v = c + right * (k.0 * s) + up * (k.1 * s); + out.push(Vertex { pos: v.to_array(), uv, layer: 0, color, light: packed }); + } + } + // Breaking progress overlay (destroy_stage_0..9). + if let Some(m) = &self.mining + && m.progress > 0.0 + { + let stage = ((m.progress * 10.0) as u32).min(9); + if let Some(r) = atlas.sprites.get(&format!("block/destroy_stage_{stage}")).copied() { + let o = (glam::DVec3::new(f64::from(m.pos[0]), f64::from(m.pos[1]), f64::from(m.pos[2])) - camera).as_vec3(); + let e = 0.002; + let corner = |x: f32, y: f32, z: f32| o + glam::Vec3::new(x * (1.0 + 2.0 * e) - e, y * (1.0 + 2.0 * e) - e, z * (1.0 + 2.0 * e) - e); + let faces = [ + [corner(0., 1., 0.), corner(1., 1., 0.), corner(1., 1., 1.), corner(0., 1., 1.)], + [corner(0., 0., 1.), corner(1., 0., 1.), corner(1., 0., 0.), corner(0., 0., 0.)], + [corner(0., 0., 0.), corner(1., 0., 0.), corner(1., 1., 0.), corner(0., 1., 0.)], + [corner(1., 0., 1.), corner(0., 0., 1.), corner(0., 1., 1.), corner(1., 1., 1.)], + [corner(0., 0., 1.), corner(0., 0., 0.), corner(0., 1., 0.), corner(0., 1., 1.)], + [corner(1., 0., 0.), corner(1., 0., 1.), corner(1., 1., 1.), corner(1., 1., 0.)], + ]; + for f in faces { + for (v, uv) in f.iter().zip([[r.u0, r.v1], [r.u1, r.v1], [r.u1, r.v0], [r.u0, r.v0]]) { + out.push(Vertex { pos: v.to_array(), uv, layer: 0, color: 0xB4FF_FFFF, light: 15 * 16 | (15 * 16) << 8 }); + } + } + } + } + out + } + + fn sky_darken(&self) -> i32 { + if self.dim == Dim::Nether { + return 11; + } + let mut sky = self.res.environment.sample(self.world.day_time, 0, 0); + let (rain, thunder) = self.world.weather.levels(1.0); + horizon_client::environment::apply_weather(&mut sky, rain, thunder); + // Level.updateSkyBrightness: darkening from the sky light level. + (15.0 - 15.0 * sky.sky_light_level).round() as i32 + } + fn weighted<'b>(&mut self, entries: &'b [horizon_client::biome::SpawnEntry]) -> Option<&'b horizon_client::biome::SpawnEntry> { + let supported: Vec<&horizon_client::biome::SpawnEntry> = + entries.iter().filter(|e| self.res.mob_types.contains_key(&e.entity)).collect(); + let total: u32 = supported.iter().map(|e| e.weight).sum(); + if total == 0 { + return None; + } + let mut r = self.world.random.next_int_bound(total as i32).ok()? as u32; + supported.into_iter().find(|e| { + if r < e.weight { + true + } else { + r -= e.weight; + false + } + }) + } + fn add_mob(&mut self, kind: &str, x: f64, y: f64, z: f64, persistent: bool) { + let Some(t) = self.res.mob_types.get(kind).cloned() else { return }; + self.next_entity += 1; + let yaw = self.world.random.next_float() * 360.0; + let mut mob = Mob::new(self.next_entity, t, Vec3::new(x, y, z), yaw); + mob.persistent = persistent; + self.mobs.push(mob); + } + /// NaturalSpawner.spawnMobsForChunkGeneration for the creature category. + fn spawn_chunk_creatures(&mut self, cx: i32, cz: i32) { + let Some(chunk) = self.world.chunks.get(&(cx, cz)).cloned() else { return }; + let biome = self.res.biomes.get(chunk.biome(8, 64, 8)).clone(); + let Some(entries) = biome.spawns.get("creature").cloned() else { return }; + while self.world.random.next_float() < biome.creature_probability { + let Some(entry) = self.weighted(&entries).cloned() else { return }; + let count = entry.min + self.world.random.next_int_bound((entry.max - entry.min + 1) as i32).unwrap_or(0) as u32; + let mut x = cx * 16 + self.world.random.next_int_bound(16).unwrap_or(0); + let mut z = cz * 16 + self.world.random.next_int_bound(16).unwrap_or(0); + for _ in 0..count { + if let Some(y) = self.land_column(x, z) { + let below = self.world.block(x, y - 1, z); + if self.res.facts.get(below).name.contains("grass") { + self.add_mob(&entry.entity, f64::from(x) + 0.5, f64::from(y), f64::from(z) + 0.5, true); + } + } + x = (x + self.world.random.next_int_bound(5).unwrap_or(0) - self.world.random.next_int_bound(5).unwrap_or(0)).clamp(cx * 16, cx * 16 + 15); + z = (z + self.world.random.next_int_bound(5).unwrap_or(0) - self.world.random.next_int_bound(5).unwrap_or(0)).clamp(cz * 16, cz * 16 + 15); + } + } + } + /// NaturalSpawner.spawnCategoryForPosition for monsters near the player. + fn spawn_monsters(&mut self) { + let Some(p) = self.player.as_ref().map(|p| p.position) else { return }; + if self.creative && false { + return; + } + let monsters = self.mobs.iter().filter(|m| m.hostile()).count(); + if monsters >= 70 { + return; + } + let r = &mut self.world.random; + let cx = (p.x.floor() as i32 >> 4) + r.next_int_bound(17).unwrap_or(8) - 8; + let cz = (p.z.floor() as i32 >> 4) + r.next_int_bound(17).unwrap_or(8) - 8; + let Some(chunk) = self.world.chunks.get(&(cx, cz)).cloned() else { return }; + let x = cx * 16 + r.next_int_bound(16).unwrap_or(0); + let z = cz * 16 + r.next_int_bound(16).unwrap_or(0); + let top = self.land_column(x, z).unwrap_or(MIN_Y + 1).max(MIN_Y + 1); + let y = MIN_Y + self.world.random.next_int_bound((top - MIN_Y + 1).max(1)).unwrap_or(0); + let biome = self.res.biomes.get(chunk.biome(x, y, z)).clone(); + let Some(entries) = biome.spawns.get("monster").cloned() else { return }; + let Some(entry) = self.weighted(&entries).cloned() else { return }; + let darken = self.sky_darken(); + let pack = entry.min + self.world.random.next_int_bound((entry.max - entry.min + 1) as i32).unwrap_or(0) as u32; + let (mut sx, mut sz) = (x, z); + for _ in 0..pack.min(4) { + sx += self.world.random.next_int_bound(6).unwrap_or(0) - self.world.random.next_int_bound(6).unwrap_or(0); + sz += self.world.random.next_int_bound(6).unwrap_or(0) - self.world.random.next_int_bound(6).unwrap_or(0); + let (fx, fy, fz) = (f64::from(sx) + 0.5, f64::from(y), f64::from(sz) + 0.5); + let d2 = (fx - p.x).powi(2) + (fy - p.y).powi(2) + (fz - p.z).powi(2); + if d2 < 24.0 * 24.0 || d2 > 128.0 * 128.0 { + continue; + } + let free = |g: &Self, yy: i32| { + let f = g.res.facts.get(g.world.block(sx, yy, sz)); + !f.full_collision && f.fluid == Fluid::None + }; + let below = self.res.facts.get(self.world.block(sx, y - 1, sz)); + if !below.full_collision || below.fluid != Fluid::None || !free(self, y) || !free(self, y + 1) { + continue; + } + // Monster.isDarkEnoughToSpawn: sky light vs random(32), then + // block light 0 and darkened brightness within uniform(0, 7). + let light = self.world.light(sx, y, sz); + let (sky, block) = (i32::from(light >> 4), i32::from(light & 15)); + if sky > self.world.random.next_int_bound(32).unwrap_or(0) || block > 0 { + continue; + } + if (sky - darken).max(0) > self.world.random.next_int_bound(8).unwrap_or(0) { + continue; + } + self.add_mob(&entry.entity, fx, fy, fz, false); + } + } + fn mob_hit(&self) -> Option<(usize, f64)> { + let eye = self.eye_position()?; + let dir = view_vector(self.yaw, self.pitch); + let reach: f64 = if self.creative { 5.0 } else { 3.0 }; + let mut best: Option<(usize, f64)> = None; + for (i, m) in self.mobs.iter().enumerate() { + if !m.alive() { + continue; + } + let b = m.bounds(); + let (min, max) = (b.min_position(), b.max_position()); + let (lo, hi) = ([min.x, min.y, min.z], [max.x, max.y, max.z]); + let (mut t0, mut t1) = (0.0f64, reach); + let mut hit = true; + for a in 0..3 { + if dir[a].abs() < 1e-9 { + if eye[a] < lo[a] || eye[a] > hi[a] { + hit = false; + } + continue; + } + let (mut ta, mut tb) = ((lo[a] - eye[a]) / dir[a], (hi[a] - eye[a]) / dir[a]); + if ta > tb { + std::mem::swap(&mut ta, &mut tb); + } + t0 = t0.max(ta); + t1 = t1.min(tb); + } + if hit && t0 <= t1 && best.is_none_or(|b| t0 < b.1) { + best = Some((i, t0)); + } + } + best + } + /// Player.attack with the attack-strength charge, crits and knockback. + fn attack(&mut self) -> bool { + let Some((index, distance)) = self.mob_hit() else { return false }; + if let Some(hit) = self.pick() { + let eye = self.eye_position().unwrap_or_default(); + let d = ((hit.point[0] - eye[0]).powi(2) + (hit.point[1] - eye[1]).powi(2) + (hit.point[2] - eye[2]).powi(2)).sqrt(); + if d < distance { + return false; + } + } + let held = self.held().cloned(); + let modifiers = held.as_ref().and_then(|h| self.res.items.get(&h.item)).map(|i| (i.attack_damage, i.attack_speed)).unwrap_or((0.0, 0.0)); + let damage = 1.0 + modifiers.0; + let speed = (4.0 + modifiers.1).max(0.1); + let delay = 20.0 / speed; + let scale = ((self.attack_ticks as f32 + 0.5) / delay).clamp(0.0, 1.0); + let mut amount = damage * (0.2 + scale * scale * 0.8); + let player = self.player.as_ref(); + let falling = player.is_some_and(|p| !p.ground.on_ground && p.velocity.y < 0.0 && !p.sprinting); + let crit = scale > 0.9 && falling; + if crit { + amount *= 1.5; + } + self.attack_ticks = 0; + if let Some(p) = self.player.as_mut() + && !self.creative + { + p.health.food.exhaustion = (p.health.food.exhaustion + 0.1).min(40.0); + } + let player = self.player.as_ref(); + let from = player.map(|p| [p.position.x, p.position.y, p.position.z]); + self.swing_arm(); + let mob = &mut self.mobs[index]; + let center = [mob.position.x, mob.position.y + mob.kind.height / 2.0, mob.position.z]; + if mob.hurt(amount, from, &mut self.world.random) { + self.last_hurt_by_player.insert(mob.id); + let kind = mob.kind.clone(); + let dead = !mob.alive(); + let sound = if crit { "minecraft:entity.player.attack.crit" } else if scale > 0.9 { "minecraft:entity.player.attack.strong" } else { "minecraft:entity.player.attack.weak" }; + self.audio.play(sound, Some(center), 1.0, 1.0); + let event = format!("minecraft:{}", kind.sounds[if dead { 2 } else { 1 }]); + let pitch = (self.world.random.next_float() - self.world.random.next_float()) * 0.2 + 1.0; + self.audio.play(&event, Some(center), 1.0, pitch); + if let Some(stack) = self.inventory[self.selected].as_mut() + && let Some(info) = self.res.items.get(&stack.item) + && info.max_damage > 0 + { + stack.damage += 1; + if stack.damage >= info.max_damage { + self.inventory[self.selected] = None; + } + } + } + true + } + /// ServerExplosion: rays from a 16^3 grid lose (resistance + 0.3) * 0.3 per step. + fn explode(&mut self, center: [f64; 3], radius: f32) -> Result<()> { + let mut destroyed = HashSet::new(); + for j in 0..16 { + for k in 0..16 { + for l in 0..16 { + if !(j == 0 || j == 15 || k == 0 || k == 15 || l == 0 || l == 15) { + continue; + } + let mut d = [f64::from(j) / 15.0 * 2.0 - 1.0, f64::from(k) / 15.0 * 2.0 - 1.0, f64::from(l) / 15.0 * 2.0 - 1.0]; + let len = (d[0] * d[0] + d[1] * d[1] + d[2] * d[2]).sqrt(); + d = d.map(|v| v / len); + let mut h = radius * (0.7 + self.world.random.next_float() * 0.6); + let mut p = center; + while h > 0.0 { + let b = [p[0].floor() as i32, p[1].floor() as i32, p[2].floor() as i32]; + let state = self.world.block(b[0], b[1], b[2]); + if !self.res.facts.is_air(state) { + let f = self.res.facts.get(state); + let resistance = if f.fluid != Fluid::None && !f.waterlogged { 100.0 } else { f.explosion_resistance }; + h -= (resistance + 0.3) * 0.3; + if h > 0.0 && f.hardness >= 0.0 { + destroyed.insert(b); + } + } + p = [p[0] + d[0] * 0.3, p[1] + d[1] * 0.3, p[2] + d[2] * 0.3]; + h -= 0.225_000_01; + } + } + } + } + for b in destroyed { + let state = self.world.block(b[0], b[1], b[2]); + if self.res.facts.is_air(state) { + continue; + } + // Explosion decay: each drop survives with probability 1 / radius. + if self.world.random.next_float() < 1.0 / radius { + let drops = self.res.items.block_drops(&self.res.assets.registry, state, None, &mut self.world.random); + for d in drops { + self.pop_resource(b, d); + } + } + self.world.set(b[0], b[1], b[2], self.world.air)?; + } + self.audio.play("minecraft:entity.generic.explode", Some(center), 4.0, (1.0 + (self.world.random.next_float() - self.world.random.next_float()) * 0.2) * 0.7); + // Entity damage by distance (exposure approximated as unobstructed). + let diameter = f64::from(radius) * 2.0; + let mut armor_damage = None; + if let Some(player) = self.player.as_mut() { + let p = [player.position.x, player.position.y, player.position.z]; + let dist = ((p[0] - center[0]).powi(2) + (p[1] - center[1]).powi(2) + (p[2] - center[2]).powi(2)).sqrt() / diameter; + if dist <= 1.0 { + let impact = 1.0 - dist; + let damage = ((impact * impact + impact) / 2.0 * 7.0 * diameter + 1.0) as f32; + if let Some(id) = self.motion.health.damage.id("minecraft:explosion") { + let _ = player.hurt(&self.motion.health, self.world.health_rules, id, damage); + armor_damage = Some(damage); + } + let (dx, dy, dz) = (p[0] - center[0], p[1] - center[1], p[2] - center[2]); + let l = (dx * dx + dy * dy + dz * dz).sqrt().max(1e-4); + player.velocity = Vec3::new(player.velocity.x + dx / l * impact, player.velocity.y + dy / l * impact, player.velocity.z + dz / l * impact); + } + } + if let Some(d) = armor_damage + && !self.creative + { + self.hurt_armor(d); + } + for m in &mut self.mobs { + let dist = ((m.position.x - center[0]).powi(2) + (m.position.y - center[1]).powi(2) + (m.position.z - center[2]).powi(2)).sqrt() / diameter; + if dist <= 1.0 && m.alive() { + let impact = 1.0 - dist; + m.hurt(((impact * impact + impact) / 2.0 * 7.0 * diameter + 1.0) as f32, Some(center), &mut self.world.random); + } + } + Ok(()) + } + fn tick_block_entities(&mut self) -> Result<()> { + // ChestLidController: 0.1 per tick towards open/closed. + if let Some(key) = self.container { + self.chest_open.entry(key).or_insert((0.0, 0.0)); + } + let open = self.container; + self.chest_open.retain(|k, (prev, cur)| { + *prev = *cur; + *cur = if Some(*k) == open { (*cur + 0.1).min(1.0) } else { (*cur - 0.1).max(0.0) }; + *cur > 0.0 || *prev > 0.0 + }); + let mut lit_changes = Vec::new(); + for (pos, entity) in self.world.block_entities.iter_mut() { + if let BlockEntity::Furnace(f) = entity + && let Some(lit) = f.tick(&self.res.recipes, &self.res.items, &self.res.providers) + { + lit_changes.push((*pos, lit)); + } + } + for ((x, y, z), lit) in lit_changes { + let state = self.world.block(x, y, z); + if let Some(mut s) = self.res.assets.registry.state(state).cloned() + && s.properties.contains_key("lit") + { + s.properties.insert("lit".into(), lit.to_string()); + if let Ok(id) = self.res.assets.registry.resolve(&s) { + self.world.set(x, y, z, id)?; + } + } + } + Ok(()) + } + /// A copy of a chunk carrying its block entities, for saving. + fn with_entities(&self, chunk: &Arc<horizon_client::chunk::Chunk>) -> Arc<horizon_client::chunk::Chunk> { + let mut c = (**chunk).clone(); + c.block_entities = self + .world + .block_entities + .iter() + .filter(|(p, _)| p.0 >> 4 == c.x && p.2 >> 4 == c.z) + .map(|(p, e)| (*p, e.clone())) + .collect(); + Arc::new(c) + } + fn tick_mobs(&mut self) -> Result<()> { + self.attack_ticks = self.attack_ticks.saturating_add(1); + // Generation-time creature packs for newly generated chunks. + let fresh: Vec<(i32, i32)> = self.world.chunks.iter().filter(|(_, c)| c.fresh && c.lit).map(|(k, _)| *k).collect(); + for key in fresh { + if let Some(c) = self.world.chunks.get_mut(&key) { + Arc::make_mut(c).fresh = false; + } + self.spawn_chunk_creatures(key.0, key.1); + } + if self.ticks % 2 == 0 { + self.spawn_monsters(); + } + let player = self.player.as_ref().map(|p| ([p.position.x, p.position.y + 0.5, p.position.z], !p.health.dead_or_dying())); + let daylight = self.sky_darken() < 4 && self.world.weather.levels(1.0).0 < 0.2; + let mut events = Vec::new(); + let mut mobs = std::mem::take(&mut self.mobs); + { + let w = MobWorld { world: &self.world, facts: &self.res.facts, collision: self.collision, player, daylight }; + let random = &mut self.world.random.clone(); + let loaded = |m: &Mob| w.world.loaded(m.position.x.floor() as i32, m.position.z.floor() as i32); + let mut dead = Vec::new(); + mobs.retain_mut(|m| { + if !loaded(m) { + return !m.hostile() || m.persistent; + } + let keep = m.tick(&w, random, &mut events); + if !keep && !m.alive() { + dead.push((m.kind.id.clone(), [m.position.x, m.position.y, m.position.z], m.id)); + } + keep + }); + self.world.random = random.clone(); + for (kind, pos, id) in dead { + let by_player = self.last_hurt_by_player.remove(&id); + let held = self.held().cloned(); + let drops = self.res.items.entity_drops(&kind, by_player, held.as_ref(), &mut self.world.random); + for d in drops { + self.spawn_item(d, [pos[0], pos[1] + 0.5, pos[2]], [0.0, 0.2, 0.0], 10); + } + if by_player { + // Animal: 1 + random(3); Monster: 5. + let hostile = self.res.mob_types.get(&kind).is_some_and(|t| t.category == "monster"); + let xp = if hostile { 5 } else { 1 + self.world.random.next_int_bound(3).unwrap_or(0) as u32 }; + self.spawn_orbs([pos[0], pos[1] + 0.5, pos[2]], xp); + } + } + } + self.mobs = mobs; + for e in events { + match e { + MobEvent::Sound(name, at, volume, pitch) => self.audio.play(&format!("minecraft:{name}"), Some(at), volume, pitch), + MobEvent::AttackPlayer(amount, from) => { + if self.creative { + continue; + } + if let Some(player) = self.player.as_mut() + && let Some(id) = self.motion.health.damage.id("minecraft:mob_attack") + && player.hurt(&self.motion.health, self.world.health_rules, id, amount).unwrap_or(false) + { + let (dx, dz) = (player.position.x - from[0], player.position.z - from[2]); + let l = (dx * dx + dz * dz).sqrt().max(1e-4); + player.velocity = Vec3::new(player.velocity.x / 2.0 + dx / l * 0.4, (player.velocity.y / 2.0 + 0.4).min(0.4), player.velocity.z / 2.0 + dz / l * 0.4); + let at = [player.position.x, player.position.y, player.position.z]; + self.audio.play("minecraft:entity.player.hurt", Some(at), 1.0, 1.0); + self.hurt_armor(amount); + } + } + MobEvent::Shoot(from, target) => { + // Skeleton.performRangedAttack: aim above by 20% of distance, inaccuracy 14 - 4 * difficulty(2). + let (dx, dz) = (target[0] - from[0], target[2] - from[2]); + let horizontal = (dx * dx + dz * dz).sqrt(); + let dy = target[1] + 0.5 - from[1] + horizontal * 0.2; + let len = (dx * dx + dy * dy + dz * dz).sqrt().max(1e-4); + let spread = 0.0075 * 6.0; + let r = &mut self.world.random; + let mut gauss = || f64::from(r.next_float() + r.next_float() - 1.0) * spread; + let v = [(dx / len + gauss()) * 1.6, (dy / len + gauss()) * 1.6, (dz / len + gauss()) * 1.6]; + let p = Vec3::new(from[0], from[1] - 0.1, from[2]); + self.arrows.push(Arrow { from_player: false, critical: false, position: p, previous: p, velocity: Vec3::new(v[0], v[1], v[2]), stuck: false, age: 0, base_damage: 2.0 }); + self.audio.play("minecraft:entity.skeleton.shoot", Some(from), 1.0, 1.0 / (self.world.random.next_float() * 0.4 + 0.8)); + } + MobEvent::Explode(at, radius) => self.explode(at, radius)?, + } + } + // Arrows. + let bounds = self.player.as_ref().map(|p| { + let w = f64::from(p.dimensions.width) / 2.0; + horizon_core::geometry::Aabb::new( + Vec3::new(p.position.x - w, p.position.y, p.position.z - w), + Vec3::new(p.position.x + w, p.position.y + f64::from(p.dimensions.height), p.position.z + w), + ) + }); + let mut arrows = std::mem::take(&mut self.arrows); + let mut hits = Vec::new(); + let mobs = &mut self.mobs; + let mut random_state = self.world.random.clone(); + let random = &mut random_state; + let mut mob_hits = Vec::new(); + arrows.retain_mut(|a| { + if a.from_player && !a.stuck { + let (keep, _) = a.tick(&self.world, &self.res.facts, None); + for m in mobs.iter_mut().filter(|m| m.alive()) { + let b = m.bounds(); + let (lo, hi) = (b.min_position(), b.max_position()); + let p = a.position; + if p.x > lo.x - 0.3 && p.x < hi.x + 0.3 && p.y > lo.y - 0.3 && p.y < hi.y + 0.3 && p.z > lo.z - 0.3 && p.z < hi.z + 0.3 { + // AbstractArrow.onHitEntity: ceil(speed * base), crits add random(damage / 2 + 2). + let speed = (a.velocity.x.powi(2) + a.velocity.y.powi(2) + a.velocity.z.powi(2)).sqrt(); + let mut damage = (speed * a.base_damage).ceil().max(0.0) as i32; + if a.critical { + damage += random.next_int_bound(damage / 2 + 2).unwrap_or(0); + } + if m.hurt(damage as f32, Some([a.previous.x, a.previous.y, a.previous.z]), random) { + mob_hits.push((m.id, [p.x, p.y, p.z])); + } + return false; + } + } + return keep; + } + let (keep, hit) = a.tick(&self.world, &self.res.facts, if a.from_player { None } else { bounds }); + if let ArrowHit::Player(d) = hit { + hits.push(d); + } + keep + }); + self.arrows = arrows; + self.world.random = random_state; + for (id, at) in mob_hits { + self.last_hurt_by_player.insert(id); + self.audio.play("minecraft:entity.arrow.hit", Some(at), 1.0, 1.2 / (self.world.random.next_float() * 0.2 + 0.9)); + } + for d in hits { + if self.creative { + continue; + } + if let Some(player) = self.player.as_mut() + && let Some(id) = self.motion.health.damage.id("minecraft:arrow") + { + let _ = player.hurt(&self.motion.health, self.world.health_rules, id, d); + let at = [player.position.x, player.position.y, player.position.z]; + self.audio.play("minecraft:entity.arrow.hit_player", Some(at), 1.0, 1.0); + self.hurt_armor(d); + } + } + Ok(()) + } + /// SkyRenderer.renderSunMoonAndStars: bodies on a frame rotated Y -90 then X by angle. + fn celestial_geometry(&self, sky: &horizon_client::environment::Sky) -> Vec<Vertex> { + let mut out = Vec::new(); + let atlas = &self.res.atlas; + let frame = |angle: f32| glam::Mat4::from_rotation_y((-90.0f32).to_radians()) * glam::Mat4::from_rotation_x(angle.to_radians()); + let mut body = |name: &str, angle: f32, size: f32, color: u32| { + let Some(r) = atlas.sprites.get(name).copied() else { return }; + let m = frame(angle); + let corners = [(-size, -size), (size, -size), (size, size), (-size, size)]; + let uv = [[r.u0, r.v0], [r.u1, r.v0], [r.u1, r.v1], [r.u0, r.v1]]; + for ((x, z), uv) in corners.iter().zip(uv) { + let p = m.transform_point3(glam::Vec3::new(*x, 100.0, *z)); + out.push(Vertex { pos: p.to_array(), uv, layer: 2, color: color, light: 0 }); + } + }; + body("environment/celestial/sun", sky.sun_angle, 30.0, 0xFFFF_FFFF); + let phases = ["full_moon", "waning_gibbous", "third_quarter", "waning_crescent", "new_moon", "waxing_crescent", "first_quarter", "waxing_gibbous"]; + let phase = phases[(self.world.day_time / 24000).rem_euclid(8) as usize]; + body(&format!("environment/celestial/moon/{phase}"), sky.moon_angle, 20.0, 0xFFFF_FFFF); + if sky.star_brightness > 0.0 { + let b = (sky.star_brightness.clamp(0.0, 1.0) * 255.0) as u32; + let color = b << 24 | b << 16 | b << 8 | b; + let white = atlas.sprites.get("horizon/white").copied(); + let m = frame(sky.star_angle); + if let Some(r) = white { + let (cu, cv) = ((r.u0 + r.u1) / 2.0, (r.v0 + r.v1) / 2.0); + // SkyRenderer.buildStars with its fixed seed. + let mut random = horizon_core::random::LegacyRandom::new(10842); + for _ in 0..1500 { + let x = random.next_float() * 2.0 - 1.0; + let y = random.next_float() * 2.0 - 1.0; + let z = random.next_float() * 2.0 - 1.0; + let size = 0.15 + random.next_float() * 0.1; + let l = x * x + y * y + z * z; + if l <= 0.010_000_001 || l >= 1.0 { + continue; + } + let center = glam::Vec3::new(x, y, z).normalize() * 100.0; + let z_rot = (random.next_double() * std::f64::consts::TAU) as f32; + let forward = -center.normalize(); + let right = glam::Vec3::Y.cross(forward).normalize_or(glam::Vec3::X); + let up = forward.cross(right); + let (s, c) = (-z_rot).sin_cos(); + let (r2, u2) = (right * c + up * s, up * c - right * s); + for (a, b) in [(size, -size), (size, size), (-size, size), (-size, -size)] { + let p = m.transform_point3(center + r2 * a + u2 * b); + out.push(Vertex { pos: p.to_array(), uv: [cu, cv], layer: 2, color, light: 0 }); + } + } + } + } + out + } + /// CloudRenderer (fancy): 12x4x12 cells from clouds.png drifting east. + fn cloud_geometry(&self, sky: &horizon_client::environment::Sky, camera: glam::DVec3, alpha: f64, out: &mut Vec<Vertex>) { + let (w, h, cells) = &self.res.clouds; + let (w, h) = (i64::from(*w), i64::from(*h)); + let Some(white) = self.res.atlas.sprites.get("horizon/white").copied() else { return }; + let uv = [(white.u0 + white.u1) / 2.0, (white.v0 + white.v1) / 2.0]; + let cloud_height = 192.33; + let offset = (self.world.game_time.rem_euclid(w * 400)) as f64 + alpha; + let mut cloud_x = camera.x + offset * 0.030_000_001; + let mut cloud_z = camera.z + 3.96; + let (tw, th) = (w as f64 * 12.0, h as f64 * 12.0); + cloud_x -= (cloud_x / tw).floor() * tw; + cloud_z -= (cloud_z / th).floor() * th; + let cell_x = (cloud_x / 12.0).floor() as i64; + let cell_z = (cloud_z / 12.0).floor() as i64; + let x_in = (cloud_x - cell_x as f64 * 12.0) as f32; + let z_in = (cloud_z - cell_z as f64 * 12.0) as f32; + let bottom = (cloud_height - camera.y) as f32; + let filled = |cx: i64, cz: i64| cells[(cz.rem_euclid(h) * w + cx.rem_euclid(w)) as usize]; + let radius = (self.streaming.radius * 16 / 12 + 1) as i64; + let c = sky.cloud_color; + let color = |shade: f32| { + let ch = |v: f32| ((v * shade).clamp(0.0, 1.0) * 255.0) as u32; + ch(c[3].max(0.0).min(1.0)) << 24 | ch(c[2]) << 16 | ch(c[1]) << 8 | ch(c[0]) + }; + let light = 240 | 240 << 8; + for dz in -radius..=radius { + for dx in -radius..=radius { + if dx * dx + dz * dz > radius * radius { + continue; + } + let (cx, cz) = (cell_x + dx, cell_z + dz); + if !filled(cx, cz) { + continue; + } + let x0 = dx as f32 * 12.0 - x_in; + let z0 = dz as f32 * 12.0 - z_in; + let (x1, z1, y0, y1) = (x0 + 12.0, z0 + 12.0, bottom, bottom + 4.0); + let mut quad = |p: [[f32; 3]; 4], shade: f32| { + for v in p { + out.push(Vertex { pos: v, uv, layer: 2, color: color(shade), light }); + } + }; + quad([[x0, y1, z0], [x0, y1, z1], [x1, y1, z1], [x1, y1, z0]], 1.0); + quad([[x1, y0, z0], [x1, y0, z1], [x0, y0, z1], [x0, y0, z0]], 0.7); + if !filled(cx, cz - 1) { + quad([[x0, y0, z0], [x0, y1, z0], [x1, y1, z0], [x1, y0, z0]], 0.8); + } + if !filled(cx, cz + 1) { + quad([[x1, y0, z1], [x1, y1, z1], [x0, y1, z1], [x0, y0, z1]], 0.8); + } + if !filled(cx - 1, cz) { + quad([[x0, y0, z1], [x0, y1, z1], [x0, y1, z0], [x0, y0, z0]], 0.9); + } + if !filled(cx + 1, cz) { + quad([[x1, y0, z0], [x1, y1, z0], [x1, y1, z1], [x1, y0, z1]], 0.9); + } + } + } + } + /// Load (or create) a world folder under saves/ and start streaming it. + fn open_world(&mut self, folder: &str, name: Option<&str>, seed: Option<i64>, creative: bool) -> Result<()> { + let save_root = std::env::current_dir()?.join("saves").join(folder); + let level = Level::read(&save_root).unwrap_or_else(|| Level { + name: name.unwrap_or(folder).to_owned(), + // WorldOptions.randomSeed when no seed was given. + seed: seed.unwrap_or_else(|| { + let t = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map_or(0, |d| d.as_nanos() as u64); + (t ^ (t >> 29)).wrapping_mul(0x9E37_79B9_7F4A_7C15) as i64 + }), + creative, + day_time: 0, + health: 20.0, + food: 20, + saturation: 5.0, + ..Level::default() + }); + let mut level = level; + if let Some(d) = &self.options.dimension { + level.dimension = d.clone(); + level.position = None; + } + let dim = Dim::from_id(&level.dimension); + let (mut streaming, save) = self.make_streaming(&save_root, dim, level.seed)?; + streaming.radius = self.settings.render_distance; + let mut world = World::new(self.res.facts.air, level.seed); + world.game_time = level.time; + world.day_time = self.options.time.unwrap_or(level.day_time); + world.weather = level.weather; + if let Some(w) = self.options.weather.as_deref() { + // /weather: clear, rain or thunder for a long duration. + let (rain, thunder) = (w != "clear", w == "thunder"); + world.weather = horizon_client::world::Weather { + clear_time: if w == "clear" { 6000 } else { 0 }, + rain_time: 6000, + thunder_time: 6000, + raining: rain, + thundering: thunder, + rain_level: if rain { (1.0, 1.0) } else { (0.0, 0.0) }, + thunder_level: if thunder { (1.0, 1.0) } else { (0.0, 0.0) }, + }; + } + self.creative = level.creative; + let mut inventory = vec![None; 36]; + self.armor = [None, None, None, None]; + for (slot, id, count, damage) in &level.inventory { + let stack = ItemStack { item: Arc::from(id.as_str()), count: *count, damage: *damage }; + if (100..104).contains(slot) { + self.armor[usize::from(103 - slot)] = Some(stack); + } else if let Some(cell) = inventory.get_mut(usize::from(*slot)) { + *cell = Some(stack); + } + } + if self.creative && level.inventory.is_empty() && level.position.is_none() { + for (i, name) in ["minecraft:grass_block", "minecraft:stone", "minecraft:oak_planks", "minecraft:glass", "minecraft:torch", "minecraft:oak_log", "minecraft:chest", "minecraft:furnace", "minecraft:diamond_pickaxe"].iter().enumerate() { + inventory[i] = Some(ItemStack { item: Arc::from(*name), count: 1, damage: 0 }); + } + } + let (yaw, pitch) = self.options.look.unwrap_or((level.rotation[0], level.rotation[1])); + self.yaw = yaw; + self.pitch = pitch; + self.streaming = streaming; + self.world = world; + self.inventory = inventory; + self.save = save; + self.level = level; + self.dim = dim; + self.world_root = save_root.clone(); + self.block_ticks = Ticks::new(self.level.seed as i32); + self.tick_chunks.clear(); + self.falling.clear(); + self.travelling = None; + self.player = None; + self.spawn = None; + self.spawn_search = 0; + self.mobs.clear(); + self.arrows.clear(); + self.dropped.clear(); + self.particles.clear(); + self.orbs.clear(); + self.experience = Experience { level: self.level.xp_level, progress: self.level.xp_progress, total: self.level.xp_total }; + self.mining = None; + self.container = None; + self.carried = None; + self.using = None; + self.screen = Screen::Playing; + self.title = None; + if let Some(r) = self.renderer.as_mut() { + r.clear_sections(); + } + self.apply_settings(); + self.streaming.sky_light = dim == Dim::Overworld; + self.streaming.nether_shading = dim == Dim::Nether; + // New worlds get their level.dat right away. + if !save_root.join("level.dat").exists() { + self.level.write(&save_root)?; + } + Ok(()) + } + /// Streaming and region storage for one dimension of a world. + fn make_streaming(&self, world_root: &std::path::Path, dim: Dim, seed: i64) -> Result<(Streaming, Arc<SaveDir>)> { + let region_root = match dim.folder() { + Some(f) => world_root.join(f), + None => world_root.to_owned(), + }; + let save = Arc::new(SaveDir::new(region_root)); + let res = &*self.res; + let mut streaming = if self.options.test_terrain && dim == Dim::Overworld { + let inner = Arc::new(TestTerrain::new(res.assets.registry, &res.biomes)?); + Streaming::new(Arc::new(Persistent { inner, save: save.clone(), registry: res.assets.clone(), biomes: res.biomes.clone() }), res.context.clone(), res.threads) + } else { + let inner = Arc::new(VanillaTerrain::for_dimension(&self.options.resources.join("worldgen"), res.assets.registry, &res.biomes, seed, dim.id()).map_err(|e| { + format!("{e}\nPrepare the worldgen bundle with: python3 tools/prepare_native_client.py") + })?); + Streaming::new(Arc::new(Persistent { inner, save: save.clone(), registry: res.assets.clone(), biomes: res.biomes.clone() }), res.context.clone(), res.threads) + }; + streaming.radius = self.settings.render_distance; + streaming.sky_light = dim == Dim::Overworld; + streaming.nether_shading = dim == Dim::Nether; + Ok((streaming, save)) + } + /// Change dimension through a portal (Entity.changeDimension with + /// PortalForcer placement once the destination has loaded). + fn enter_dimension(&mut self, target: Dim) -> Result<()> { + let Some(player) = self.player.take() else { return Ok(()) }; + // Save the departing dimension's changed chunks. + let keys: Vec<_> = self.world.modified.drain().collect(); + let chunks: Vec<_> = keys.iter().filter_map(|k| self.world.chunks.get(k)).map(|c| self.with_entities(c)).collect(); + self.save.save(&chunks, &self.res.assets.registry, &self.res.biomes)?; + // Coordinates scale by 8 between the Overworld and the Nether. + let scale = match (self.dim, target) { + (Dim::Overworld, Dim::Nether) => 1.0 / 8.0, + (Dim::Nether, Dim::Overworld) => 8.0, + _ => 1.0, + }; + let destination = Vec3::new(player.position.x * scale, player.position.y, player.position.z * scale); + let (streaming, save) = self.make_streaming(&self.world_root.clone(), target, self.level.seed)?; + let mut world = World::new(self.res.facts.air, self.level.seed); + world.game_time = self.world.game_time; + world.day_time = self.world.day_time; + world.weather = self.world.weather; + self.streaming = streaming; + self.world = world; + self.save = save; + self.dim = target; + self.level.dimension = target.id().to_owned(); + self.block_ticks = Ticks::new(self.level.seed as i32); + self.tick_chunks.clear(); + self.falling.clear(); + self.mobs.clear(); + self.arrows.clear(); + self.dropped.clear(); + self.particles.clear(); + self.orbs.clear(); + self.mining = None; + self.travelling = Some((player, destination)); + self.portal_cooldown = 300; + if let Some(r) = self.renderer.as_mut() { + r.clear_sections(); + } + self.apply_settings(); + Ok(()) + } + /// PortalShape: an obsidian frame around 2..=21 by 3..=21 empty blocks. + fn portal_shape(&self, start: [i32; 3], x_axis: bool) -> Option<([i32; 3], i32, i32)> { + let name = |p: [i32; 3]| self.res.facts.get(self.world.block(p[0], p[1], p[2])).name.clone(); + let empty = |p: [i32; 3]| { + let n = name(p); + matches!(&*n, "minecraft:air" | "minecraft:cave_air" | "minecraft:fire" | "minecraft:soul_fire" | "minecraft:nether_portal") + }; + let frame = |p: [i32; 3]| &*name(p) == "minecraft:obsidian"; + let d = if x_axis { [1, 0, 0] } else { [0, 0, 1] }; + let mut bottom = start; + let mut n = 0; + while empty([bottom[0], bottom[1] - 1, bottom[2]]) && n < 21 { + bottom[1] -= 1; + n += 1; + } + if !frame([bottom[0], bottom[1] - 1, bottom[2]]) { + return None; + } + let mut left = bottom; + n = 0; + while empty([left[0] - d[0], left[1], left[2] - d[2]]) && n < 21 { + left = [left[0] - d[0], left[1], left[2] - d[2]]; + n += 1; + } + if !frame([left[0] - d[0], left[1], left[2] - d[2]]) { + return None; + } + let mut width = 0; + while width <= 21 { + let p = [left[0] + d[0] * width, left[1], left[2] + d[2] * width]; + if !empty(p) || !frame([p[0], p[1] - 1, p[2]]) { + break; + } + width += 1; + } + if !(2..=21).contains(&width) || !frame([left[0] + d[0] * width, left[1], left[2] + d[2] * width]) { + return None; + } + let mut height = 0; + 'rows: while height <= 21 { + let y = left[1] + height; + if !frame([left[0] - d[0], y, left[2] - d[2]]) || !frame([left[0] + d[0] * width, y, left[2] + d[2] * width]) { + break; + } + for i in 0..width { + if !empty([left[0] + d[0] * i, y, left[2] + d[2] * i]) { + break 'rows; + } + } + height += 1; + } + let top_ok = (0..width).all(|i| frame([left[0] + d[0] * i, left[1] + height, left[2] + d[2] * i])); + ((3..=21).contains(&height) && top_ok).then_some((left, width, height)) + } + /// BaseFireBlock.onPlace: lighting fire inside a frame creates a portal. + fn try_light_portal(&mut self, at: [i32; 3]) -> Result<bool> { + for x_axis in [true, false] { + if let Some((origin, width, height)) = self.portal_shape(at, x_axis) { + let d = if x_axis { [1, 0, 0] } else { [0, 0, 1] }; + let registry = &self.res.assets.registry; + let Some(default) = registry.default_state("minecraft:nether_portal") else { return Ok(false) }; + let mut portal = registry.state(default).cloned().ok_or("portal state")?; + portal.properties.insert("axis".into(), if x_axis { "x" } else { "z" }.into()); + let id = registry.resolve(&portal).unwrap_or(default); + for h in 0..height { + for w in 0..width { + self.world.set(origin[0] + d[0] * w, origin[1] + h, origin[2] + d[2] * w, id)?; + } + } + return Ok(true); + } + } + Ok(false) + } + /// PortalForcer: reuse a nearby portal, else build a 2x3 obsidian portal. + fn place_after_travel(&mut self, mut player: PlayerMotion, target: Vec3) -> Result<()> { + let (tx, tz) = (target.x.floor() as i32, target.z.floor() as i32); + let radius = if self.dim == Dim::Nether { 16 } else { 32 }; + let (min_y, max_y) = if self.dim == Dim::Nether { (1, 126) } else { (MIN_Y + 1, MIN_Y + HEIGHT - 3) }; + let portal_name = "minecraft:nether_portal"; + let mut best: Option<(i64, [i32; 3])> = None; + for z in tz - radius..=tz + radius { + for x in tx - radius..=tx + radius { + if !self.world.loaded(x, z) { + continue; + } + for y in min_y..max_y { + if &*self.res.facts.get(self.world.block(x, y, z)).name == portal_name + && &*self.res.facts.get(self.world.block(x, y - 1, z)).name != portal_name + { + let d = i64::from(x - tx).pow(2) + i64::from(z - tz).pow(2) + i64::from(y - target.y as i32).pow(2); + if best.is_none_or(|b| d < b.0) { + best = Some((d, [x, y, z])); + } + } + } + } + } + let spot = match best { + Some((_, p)) => p, + None => { + // Build: obsidian frame 4 wide, 5 tall, with a floor, carved into the terrain. + let y = (target.y.floor() as i32).clamp(min_y + 1, max_y - 5); + let set = |g: &mut Self, p: [i32; 3], name: &str| -> Result<()> { + if let Some(id) = g.res.assets.registry.default_state(name) { + g.world.set(p[0], p[1], p[2], id)?; + } + Ok(()) + }; + for dz in -1..=1 { + for dx in -1..=2 { + set(self, [tx + dx, y - 1, tz + dz], "minecraft:obsidian")?; + for dy in 0..4 { + set(self, [tx + dx, y + dy, tz + dz], "minecraft:air")?; + } + } + } + for w in -1..=2 { + for h in -1..=3 { + if w == -1 || w == 2 || h == -1 || h == 3 { + set(self, [tx + w, y + h, tz], "minecraft:obsidian")?; + } + } + } + self.try_light_portal([tx, y, tz])?; + [tx, y, tz] + } + }; + player.position = Vec3::new(f64::from(spot[0]) + 0.5, f64::from(spot[1]), f64::from(spot[2]) + 0.5); + player.velocity = Vec3::ZERO; + self.previous_position = player.position; + self.player = Some(player); + self.apply_equipment(); + let at = [f64::from(spot[0]), f64::from(spot[1]), f64::from(spot[2])]; + self.audio.play("minecraft:block.portal.travel", Some(at), 0.25, 1.0); + Ok(()) + } + fn tick_portal(&mut self) -> Result<()> { + let Some(p) = self.player.as_ref() else { return Ok(()) }; + let w = f64::from(p.dimensions.width) / 2.0; + let (lo, hi) = ([p.position.x - w, p.position.y, p.position.z - w], [p.position.x + w, p.position.y + f64::from(p.dimensions.height), p.position.z + w]); + let mut inside = false; + for x in lo[0].floor() as i32..=hi[0].floor() as i32 { + for y in lo[1].floor() as i32..=hi[1].floor() as i32 { + for z in lo[2].floor() as i32..=hi[2].floor() as i32 { + if &*self.res.facts.get(self.world.block(x, y, z)).name == "minecraft:nether_portal" { + inside = true; + } + } + } + } + if !inside { + self.portal_ticks = 0; + self.portal_cooldown = self.portal_cooldown.saturating_sub(1); + return Ok(()); + } + if self.portal_cooldown > 0 { + return Ok(()); + } + if self.portal_ticks == 0 { + let at = self.eye_position(); + self.audio.play("minecraft:block.portal.trigger", at, 0.25, self.world.random.next_float() * 0.4 + 0.8); + } + self.portal_ticks += 1; + // Player.getPortalWaitTime: 80 ticks, or 1 when invulnerable (creative). + let wait = if self.creative { 1 } else { 80 }; + if self.portal_ticks >= wait { + self.portal_ticks = 0; + let target = if self.dim == Dim::Overworld { Dim::Nether } else { Dim::Overworld }; + self.enter_dimension(target)?; + } + Ok(()) + } + fn close_world(&mut self) -> Result<()> { + self.save_game()?; + self.streaming.paused = true; + self.world = World::new(self.res.facts.air, 0); + self.player = None; + self.mobs.clear(); + self.arrows.clear(); + self.dropped.clear(); + self.particles.clear(); + self.screen = Screen::Playing; + if let Some(r) = self.renderer.as_mut() { + r.clear_sections(); + } + self.title = Some(Title::new(std::env::current_dir()?.join("saves"))); + self.capture(false); + Ok(()) + } + /// The title panorama as six camera-centred faces (panorama_0..5: + /// front, right, back, left, up, down). + fn panorama_geometry(&self) -> Vec<Vertex> { + let mut out = Vec::new(); + let d = 100.0; + let faces: [(&str, [glam::Vec3; 4]); 6] = [ + ("0", [glam::Vec3::new(-d, d, -d), glam::Vec3::new(d, d, -d), glam::Vec3::new(d, -d, -d), glam::Vec3::new(-d, -d, -d)]), + ("1", [glam::Vec3::new(d, d, -d), glam::Vec3::new(d, d, d), glam::Vec3::new(d, -d, d), glam::Vec3::new(d, -d, -d)]), + ("2", [glam::Vec3::new(d, d, d), glam::Vec3::new(-d, d, d), glam::Vec3::new(-d, -d, d), glam::Vec3::new(d, -d, d)]), + ("3", [glam::Vec3::new(-d, d, d), glam::Vec3::new(-d, d, -d), glam::Vec3::new(-d, -d, -d), glam::Vec3::new(-d, -d, d)]), + ("4", [glam::Vec3::new(-d, d, d), glam::Vec3::new(d, d, d), glam::Vec3::new(d, d, -d), glam::Vec3::new(-d, d, -d)]), + ("5", [glam::Vec3::new(-d, -d, -d), glam::Vec3::new(d, -d, -d), glam::Vec3::new(d, -d, d), glam::Vec3::new(-d, -d, d)]), + ]; + for (index, corners) in faces { + let Some(r) = self.res.atlas.sprites.get(&format!("gui/title/background/panorama_{index}")).copied() else { continue }; + let uv = [[r.u0, r.v0], [r.u1, r.v0], [r.u1, r.v1], [r.u0, r.v1]]; + for (p, uv) in corners.iter().zip(uv) { + out.push(Vertex { pos: p.to_array(), uv, layer: 2, color: 0xFFFF_FFFF, light: 0 }); + } + } + out + } + /// Equipment attribute modifiers (LivingEntity.collectEquipmentChanges). + fn apply_equipment(&mut self) { + let Some(player) = self.player.as_mut() else { return }; + for (attribute, id) in std::mem::take(&mut self.applied_modifiers) { + let _ = player.set_modifier(&attribute, &id, 0.0, "add_value", false); + } + let slots = ["head", "chest", "legs", "feet"]; + let mut equipped: Vec<(Option<&ItemStack>, &str)> = self.armor.iter().zip(slots).map(|(s, n)| (s.as_ref(), n)).collect(); + equipped.push((self.inventory[self.selected].as_ref(), "mainhand")); + for (stack, slot) in equipped { + let Some(info) = stack.and_then(|s| self.res.items.get(&s.item)) else { continue }; + for (attribute, id, amount, op, group) in &info.modifiers { + let matches = group == slot + || group == "any" + || (group == "armor" && slot != "mainhand") + || (group == "hand" && slot == "mainhand"); + // Main-hand attack modifiers are read by the attack code directly. + if !matches || slot == "mainhand" { + continue; + } + if player.set_modifier(attribute, id, *amount, op, true).is_ok() { + self.applied_modifiers.push((attribute.clone(), id.clone())); + } + } + } + } + /// Inventory.hurtArmor: each piece loses max(1, damage / 4) durability. + fn hurt_armor(&mut self, damage: f32) { + let amount = ((damage / 4.0) as u32).max(1); + let mut broke = false; + for slot in &mut self.armor { + if let Some(stack) = slot.as_mut() + && let Some(info) = self.res.items.get(&stack.item) + && info.max_damage > 0 + { + stack.damage += amount; + if stack.damage >= info.max_damage { + *slot = None; + broke = true; + } + } + } + if broke { + if let Some(eye) = self.eye_position() { + self.audio.play("minecraft:entity.item.break", Some(eye), 0.8, 0.8 + self.world.random.next_float() * 0.4); + } + self.apply_equipment(); + } + } + /// Voxel traversal that also stops at fluid source blocks (bucket pick). + fn pick_fluid(&self) -> Option<Hit> { + let origin = self.eye_position()?; + let dir = view_vector(self.yaw, self.pitch); + let mut t = 0.0; + let mut last = origin.map(|v| v.floor() as i32); + while t <= self.reach() { + let p = [origin[0] + dir[0] * t, origin[1] + dir[1] * t, origin[2] + dir[2] * t]; + let b = p.map(|v| v.floor() as i32); + if b != last { + let state = self.world.block(b[0], b[1], b[2]); + let f = self.res.facts.get(state); + let face = [last[0] - b[0], last[1] - b[1], last[2] - b[2]]; + if f.fluid != Fluid::None && f.fluid_level == 8 && !f.fluid_falling && !f.waterlogged && f.render_shape != horizon_client::blocks::RenderShape::Model { + return Some(Hit { pos: b, face, point: p }); + } + if !self.res.facts.is_air(state) && f.fluid == Fluid::None { + return Some(Hit { pos: b, face, point: p }); + } + last = b; + } + t += 0.05; + } + None + } + fn set_state_named(&mut self, pos: [i32; 3], name: &str, keep: &[&str]) -> Result<bool> { + let registry = &self.res.assets.registry; + let old = self.world.block(pos[0], pos[1], pos[2]); + let Some(default) = registry.default_state(name) else { return Ok(false) }; + let mut state = registry.state(default).cloned().ok_or("state")?; + if let Some(previous) = registry.state(old) { + for k in keep { + if let Some(v) = previous.properties.get(*k) { + state.properties.insert((*k).to_owned(), v.clone()); + } + } + } + let id = registry.resolve(&state).unwrap_or(default); + self.level_set(pos, id)?; + Ok(true) + } + fn damage_held(&mut self, amount: u32) { + if self.creative { + return; + } + if let Some(stack) = self.inventory[self.selected].as_mut() + && let Some(info) = self.res.items.get(&stack.item) + && info.max_damage > 0 + { + stack.damage += amount; + if stack.damage >= info.max_damage { + self.inventory[self.selected] = None; + if let Some(eye) = self.eye_position() { + self.audio.play("minecraft:entity.item.break", Some(eye), 0.8, 0.8 + self.world.random.next_float() * 0.4); + } + } + } + } + /// Item use on blocks for tools, buckets and fire starters; returns true if handled. + fn use_tool(&mut self, stack: &ItemStack) -> Result<bool> { + let item = stack.item.trim_start_matches("minecraft:").to_owned(); + let at = |p: [i32; 3]| [f64::from(p[0]) + 0.5, f64::from(p[1]) + 0.5, f64::from(p[2]) + 0.5]; + if item == "bucket" { + let Some(hit) = self.pick_fluid() else { return Ok(false) }; + let state = self.world.block(hit.pos[0], hit.pos[1], hit.pos[2]); + let f = self.res.facts.get(state).clone(); + if f.fluid == Fluid::None || f.fluid_level != 8 || f.fluid_falling { + return Ok(false); + } + let (filled, sound) = match f.fluid { + Fluid::Water => ("minecraft:water_bucket", "minecraft:item.bucket.fill"), + _ => ("minecraft:lava_bucket", "minecraft:item.bucket.fill_lava"), + }; + self.world.set(hit.pos[0], hit.pos[1], hit.pos[2], self.world.air)?; + self.audio.play(sound, Some(at(hit.pos)), 1.0, 1.0); + if !self.creative { + self.consume_held(); + let filled = ItemStack { item: Arc::from(filled), count: 1, damage: 0 }; + if self.inventory[self.selected].is_none() { + self.inventory[self.selected] = Some(filled); + } else if let Some(rest) = self.give(filled) + && let Some(eye) = self.eye_position() + { + self.spawn_item(rest, eye, [0.0, 0.1, 0.0], 40); + } + } + return Ok(true); + } + let Some(hit) = self.pick() else { return Ok(false) }; + let clicked = self.world.block(hit.pos[0], hit.pos[1], hit.pos[2]); + let name = self.res.facts.get(clicked).name.trim_start_matches("minecraft:").to_owned(); + let above_air = self.res.facts.is_air(self.world.block(hit.pos[0], hit.pos[1] + 1, hit.pos[2])); + if item == "water_bucket" || item == "lava_bucket" { + let target = if self.res.facts.get(clicked).replaceable { hit.pos } else { [hit.pos[0] + hit.face[0], hit.pos[1] + hit.face[1], hit.pos[2] + hit.face[2]] }; + let existing = self.world.block(target[0], target[1], target[2]); + if !self.res.facts.get(existing).replaceable && !self.res.facts.is_air(existing) { + return Ok(true); + } + let fluid = if item == "water_bucket" { "minecraft:water" } else { "minecraft:lava" }; + self.set_state_named(target, fluid, &[])?; + let sound = if item == "water_bucket" { "minecraft:item.bucket.empty" } else { "minecraft:item.bucket.empty_lava" }; + self.audio.play(sound, Some(at(target)), 1.0, 1.0); + if !self.creative { + self.inventory[self.selected] = Some(ItemStack { item: Arc::from("minecraft:bucket"), count: 1, damage: 0 }); + } + return Ok(true); + } + if item.ends_with("_hoe") && hit.face != [0, -1, 0] && above_air { + // HoeItem.TILLABLES + let result = match name.as_str() { + "grass_block" | "dirt_path" | "dirt" => Some("minecraft:farmland"), + "coarse_dirt" | "rooted_dirt" => Some("minecraft:dirt"), + _ => None, + }; + if let Some(result) = result { + self.set_state_named(hit.pos, result, &[])?; + if name == "rooted_dirt" { + self.pop_resource([hit.pos[0], hit.pos[1] - 1, hit.pos[2]], ItemStack { item: Arc::from("minecraft:hanging_roots"), count: 1, damage: 0 }); + } + self.audio.play("minecraft:item.hoe.till", Some(at(hit.pos)), 1.0, 1.0); + self.damage_held(1); + return Ok(true); + } + } + if item.ends_with("_shovel") && hit.face != [0, -1, 0] && above_air + && matches!(name.as_str(), "grass_block" | "dirt" | "podzol" | "coarse_dirt" | "mycelium" | "rooted_dirt") + { + // ShovelItem.FLATTENABLES + self.set_state_named(hit.pos, "minecraft:dirt_path", &[])?; + self.audio.play("minecraft:item.shovel.flatten", Some(at(hit.pos)), 1.0, 1.0); + self.damage_held(1); + return Ok(true); + } + if item.ends_with("_axe") && !name.starts_with("stripped_") { + // AxeItem.STRIPPABLES + let strippable = name.ends_with("_log") || name.ends_with("_wood") || name.ends_with("_stem") || name.ends_with("_hyphae") || name == "bamboo_block"; + let stripped = format!("minecraft:stripped_{name}"); + if strippable && self.res.assets.registry.default_state(&stripped).is_some() { + self.set_state_named(hit.pos, &stripped, &["axis"])?; + self.audio.play("minecraft:item.axe.strip", Some(at(hit.pos)), 1.0, 1.0); + self.damage_held(1); + return Ok(true); + } + } + if item == "flint_and_steel" || item == "fire_charge" { + let target = [hit.pos[0] + hit.face[0], hit.pos[1] + hit.face[1], hit.pos[2] + hit.face[2]]; + if self.res.facts.is_air(self.world.block(target[0], target[1], target[2])) { + if !self.try_light_portal(target)? { + self.set_state_named(target, "minecraft:fire", &[])?; + } + let sound = if item == "fire_charge" { "minecraft:item.firecharge.use" } else { "minecraft:item.flintandsteel.use" }; + self.audio.play(sound, Some(at(target)), 1.0, self.world.random.next_float() * 0.4 + 0.8); + if item == "fire_charge" { + self.consume_held(); + } else { + self.damage_held(1); + } + return Ok(true); + } + } + // Equippable items swap into their armor slot (Equippable.swapWithEquipmentSlot). + if let Some(slot) = self.res.items.get(&stack.item).and_then(|i| i.equip_slot.clone()) { + let index = match slot.as_str() { + "head" => 0, + "chest" => 1, + "legs" => 2, + "feet" => 3, + _ => return Ok(false), + }; + let held = self.inventory[self.selected].take(); + self.inventory[self.selected] = self.armor[index].take(); + self.armor[index] = held; + if let Some(eye) = self.eye_position() { + self.audio.play("minecraft:item.armor.equip_generic", Some(eye), 1.0, 1.0); + } + self.apply_equipment(); + return Ok(true); + } + Ok(false) + } + /// ExperienceOrb.award: split into vanilla orb sizes. + fn spawn_orbs(&mut self, at: [f64; 3], mut value: u32) { + while value > 0 { + let v = ExperienceOrb::split(value); + value -= v; + let r = &mut self.world.random; + let p = Vec3::new(at[0], at[1], at[2]); + self.orbs.push(ExperienceOrb { + position: p, + previous: p, + velocity: Vec3::new((r.next_double() * 0.2 - 0.1) * 2.0, r.next_double() * 0.2 * 2.0, (r.next_double() * 0.2 - 0.1) * 2.0), + value: v, + age: 0, + on_ground: false, + }); + } + } + /// DropExperienceBlock / RedStoneOreBlock / SculkBlock experience ranges. + fn block_experience(&mut self, name: &str) -> u32 { + let (min, max) = match name.trim_start_matches("minecraft:") { + "coal_ore" | "deepslate_coal_ore" => (0, 2), + "nether_gold_ore" => (0, 1), + "lapis_ore" | "deepslate_lapis_ore" | "nether_quartz_ore" => (2, 5), + "diamond_ore" | "deepslate_diamond_ore" | "emerald_ore" | "deepslate_emerald_ore" => (3, 7), + "redstone_ore" | "deepslate_redstone_ore" => (1, 5), + "sculk" => (1, 1), + "sculk_catalyst" | "sculk_sensor" | "calibrated_sculk_sensor" | "sculk_shrieker" => (5, 5), + "spawner" => (15, 43), + _ => (0, 0), + }; + if max == 0 { + return 0; + } + (min + self.world.random.next_int_bound(max - min + 1).unwrap_or(0)) as u32 + } + fn tick_experience(&mut self) { + if self.xp_delay > 0 { + self.xp_delay -= 1; + } + let player = self.player.as_ref().filter(|p| !p.health.dead_or_dying()); + let target = player.map(|p| [p.position.x, p.position.y + f64::from(p.dimensions.eye_height) / 2.0, p.position.z]); + let bounds = player.map(|p| { + let w = f64::from(p.dimensions.width) / 2.0; + ([p.position.x - w, p.position.y, p.position.z - w], [p.position.x + w, p.position.y + f64::from(p.dimensions.height), p.position.z + w]) + }); + let mut orbs = std::mem::take(&mut self.orbs); + orbs.retain_mut(|o| o.tick(&self.world, &self.res.facts, self.collision, target)); + let mut gained = 0; + if let Some((min, max)) = bounds { + orbs.retain(|o| { + let touching = o.position.x + 0.25 > min[0] && o.position.x - 0.25 < max[0] + && o.position.y + 0.5 > min[1] && o.position.y < max[1] + && o.position.z + 0.25 > min[2] && o.position.z - 0.25 < max[2]; + if touching && self.xp_delay == 0 { + // ExperienceOrb.playerTouch: one orb every 2 ticks. + self.xp_delay = 2; + gained += o.value; + return false; + } + true + }); + } + self.orbs = orbs; + if gained > 0 { + let at = self.eye_position(); + let pitch = (self.world.random.next_float() - self.world.random.next_float()) * 0.35 + 0.9; + self.audio.play("minecraft:entity.experience_orb.pickup", at, 0.1, pitch); + if self.experience.give(gained as i32) && self.experience.level % 5 == 0 && self.ticks > self.last_level_up + 100 { + self.last_level_up = self.ticks; + let volume = if self.experience.level > 30 { 1.0 } else { self.experience.level as f32 / 30.0 }; + self.audio.play("minecraft:entity.player.levelup", at, volume * 0.75, 1.0); + } + } + } + /// BowItem.releaseUsing: power from charge time, arrows at power * 3. + fn release_bow(&mut self, ticks: u32) { + let f = ticks as f32 / 20.0; + let power = ((f * f + f * 2.0) / 3.0).min(1.0); + if power < 0.1 { + return; + } + let arrow_slot = self.inventory.iter().position(|s| s.as_ref().is_some_and(|s| &*s.item == "minecraft:arrow")); + if arrow_slot.is_none() && !self.creative { + return; + } + let Some(eye) = self.eye_position() else { return }; + let dir = view_vector(self.yaw, self.pitch); + // Projectile.shoot: inaccuracy 1.0 as gaussian * 0.0075. + let r = &mut self.world.random; + let mut jitter = || f64::from(r.next_float() + r.next_float() - 1.0) * 0.0075; + let speed = f64::from(power) * 3.0; + let v = [(dir[0] + jitter()) * speed, (dir[1] + jitter()) * speed, (dir[2] + jitter()) * speed]; + let p = Vec3::new(eye[0], eye[1] - 0.1, eye[2]); + self.arrows.push(Arrow { from_player: true, critical: power >= 1.0, position: p, previous: p, velocity: Vec3::new(v[0], v[1], v[2]), stuck: false, age: 0, base_damage: 2.0 }); + let pitch = 1.0 / (self.world.random.next_float() * 0.4 + 1.2) + power * 0.5; + self.audio.play("minecraft:entity.arrow.shoot", Some(eye), 1.0, pitch); + if !self.creative + && let Some(i) = arrow_slot + && let Some(s) = self.inventory[i].as_mut() + { + s.count -= 1; + if s.count == 0 { + self.inventory[i] = None; + } + } + self.damage_held(1); + } + /// LivingEntity.swing: restart the 6-tick arm swing. + fn swing_arm(&mut self) { + if self.swing.is_none_or(|t| t >= 3) { + self.swing = Some(0); + } + } + /// LivingEntity.updateSwingTime and ItemInHandRenderer.tick (equip height). + fn tick_hand(&mut self) { + self.swing_anim.0 = self.swing_anim.1; + if let Some(t) = self.swing { + let t = t + 1; + if t >= 6 { + self.swing = None; + self.swing_anim.1 = 0.0; + } else { + self.swing = Some(t); + self.swing_anim.1 = t as f32 / 6.0; + } + } + self.hand_height.0 = self.hand_height.1; + let held = self.inventory[self.selected].clone(); + let same = match (&held, &self.hand_item) { + (Some(a), Some(b)) => a.item == b.item, + (None, None) => true, + _ => false, + }; + let target = if same { 1.0 } else { 0.0 }; + self.hand_height.1 += (target - self.hand_height.1).clamp(-0.4, 0.4); + if self.hand_height.1 < 0.1 { + self.hand_item = held; + } + } + fn display_transform(&mut self, item: &str) -> Option<([f32; 3], [f32; 3], [f32; 3])> { + if let Some(d) = self.res.displays.get(item) { + return *d; + } + let root = &self.options.resources; + let name = item.trim_start_matches("minecraft:"); + let model_name = self.res.items.get(item).map_or(name.to_owned(), |i| i.model.trim_start_matches("minecraft:").to_owned()); + let mut found = None; + let def: Option<serde_json::Value> = std::fs::read(root.join(format!("assets/minecraft/items/{model_name}.json"))).ok().and_then(|b| serde_json::from_slice(&b).ok()); + let mut current = def.and_then(|d| { + fn first(v: &serde_json::Value) -> Option<String> { + match v { + serde_json::Value::Object(o) => { + if o.get("type").and_then(|t| t.as_str()) == Some("minecraft:model") { + return o.get("model").and_then(|m| m.as_str()).map(str::to_owned); + } + o.values().find_map(first) + } + serde_json::Value::Array(a) => a.iter().find_map(first), + _ => None, + } + } + first(&d["model"]) + }); + for _ in 0..16 { + let Some(m) = current.take() else { break }; + let path = m.trim_start_matches("minecraft:").to_owned(); + let Some(model) = std::fs::read(root.join(format!("assets/minecraft/models/{path}.json"))).ok().and_then(|b| serde_json::from_slice::<serde_json::Value>(&b).ok()) else { break }; + let d = &model["display"]["firstperson_righthand"]; + if d.is_object() { + let v = |k: &str, default: f32| -> [f32; 3] { + let a = d[k].as_array(); + std::array::from_fn(|i| a.and_then(|a| a.get(i)).and_then(|x| x.as_f64()).map_or(default, |x| x as f32)) + }; + found = Some((v("rotation", 0.0), v("translation", 0.0), v("scale", 1.0))); + break; + } + current = model["parent"].as_str().map(str::to_owned); + } + self.res.displays.insert(item.to_owned(), found); + found + } + /// FirstPersonHandsAndItemsRenderer: the right arm or held item in view + /// space, converted to camera-relative world space. + fn hand_geometry(&mut self, alpha: f64) -> Vec<Vertex> { + let mut out = Vec::new(); + if self.player.as_ref().is_none_or(|p| p.health.dead_or_dying()) || self.screen == Screen::Dead { + return out; + } + let a = alpha as f32; + let attack = self.swing_anim.0 + (self.swing_anim.1 - self.swing_anim.0) * a; + let attack = if self.swing.is_none() && self.swing_anim.1 == 0.0 { 0.0 } else { attack }; + let height = self.hand_height.0 + (self.hand_height.1 - self.hand_height.0) * a; + let inverse_height = 1.0 - height; + let (yaw, pitch) = (self.yaw.to_radians(), self.pitch.to_radians()); + let forward = glam::Vec3::new(-yaw.sin() * pitch.cos(), -pitch.sin(), yaw.cos() * pitch.cos()); + let view = glam::Mat4::look_to_rh(glam::Vec3::ZERO, forward, glam::Vec3::Y); + let to_world = view.inverse(); + let eye = self.eye_position().unwrap_or_default(); + let light = self.world.light(eye[0].floor() as i32, eye[1].floor() as i32, eye[2].floor() as i32); + let packed = u32::from(light >> 4) * 16 | (u32::from(light & 15) * 16) << 8; + let deg = |d: f32| d.to_radians(); + let sqrt_attack = attack.sqrt(); + match self.hand_item.clone() { + None => { + let Some(arm) = self.res.player_arm.clone() else { return out }; + let Some(r) = self.res.atlas.sprites.get("entity/player/wide/steve").copied() else { return out }; + // renderPlayerArm (right arm) + let x_swing = -0.3 * (sqrt_attack * std::f32::consts::PI).sin(); + let y_swing = 0.4 * (sqrt_attack * std::f32::consts::TAU).sin(); + let z_swing = -0.4 * (attack * std::f32::consts::PI).sin(); + let z_rot = (attack * attack * std::f32::consts::PI).sin(); + let y_rot = (sqrt_attack * std::f32::consts::PI).sin(); + let m = to_world + * glam::Mat4::from_translation(glam::Vec3::new(x_swing + 0.64, y_swing - 0.6 + inverse_height * -0.6, z_swing - 0.72)) + * glam::Mat4::from_rotation_y(deg(45.0)) + * glam::Mat4::from_rotation_y(deg(y_rot * 70.0)) + * glam::Mat4::from_rotation_z(deg(z_rot * -20.0)) + * glam::Mat4::from_translation(glam::Vec3::new(-1.0, 3.6, 3.5)) + * glam::Mat4::from_rotation_z(deg(120.0)) + * glam::Mat4::from_rotation_x(deg(200.0)) + * glam::Mat4::from_rotation_y(deg(-135.0)) + * glam::Mat4::from_translation(glam::Vec3::new(5.6, 0.0, 0.0)); + let pose = |p: &horizon_client::mobs::Part| { + let mut pose = p.pose; + pose[3] = 0.0; + pose[4] = 0.0; + pose[5] = 0.0; + pose + }; + horizon_client::mobs::render_model(&arm, m, &pose, [r.u0, r.v0, r.u1, r.v1], packed, 0, &mut out); + } + Some(stack) => { + let display = self.display_transform(&stack.item).unwrap_or(([0.0; 3], [0.0; 3], [1.0; 3])); + let icon = self.icon(&stack.item); + // applyItemArmTransform + swingArm (applyItemArmAttackTransform) + let x = -0.4 * (sqrt_attack * std::f32::consts::PI).sin(); + let y = 0.2 * (sqrt_attack * std::f32::consts::TAU).sin(); + let z = -0.2 * (attack * std::f32::consts::PI).sin(); + let y_swing_rot = (attack * attack * std::f32::consts::PI).sin(); + let xz_swing_rot = (sqrt_attack * std::f32::consts::PI).sin(); + let (rot, trans, scale) = display; + let m = to_world + * glam::Mat4::from_translation(glam::Vec3::new(0.56, -0.52 + inverse_height * -0.6, -0.72)) + * glam::Mat4::from_translation(glam::Vec3::new(x, y, z)) + * glam::Mat4::from_rotation_y(deg(45.0 + y_swing_rot * -20.0)) + * glam::Mat4::from_rotation_z(deg(xz_swing_rot * -20.0)) + * glam::Mat4::from_rotation_x(deg(xz_swing_rot * -80.0)) + * glam::Mat4::from_rotation_y(deg(-45.0)) + // ItemTransform.apply: translation is in sixteenths, rotation XYZ, then scale. + * glam::Mat4::from_translation(glam::Vec3::from(trans) / 16.0) + * glam::Mat4::from_quat(glam::Quat::from_euler(glam::EulerRot::XYZ, deg(rot[0]), deg(rot[1]), deg(rot[2]))) + * glam::Mat4::from_scale(glam::Vec3::from(scale)) + * glam::Mat4::from_translation(glam::Vec3::splat(-0.5)); + let atlas = &self.res.atlas; + let quad = |corners: [glam::Vec3; 4], name: &str, shade: f32, tint: u32, out: &mut Vec<Vertex>| { + let Some(r) = atlas.sprites.get(name).copied() else { return }; + let uv = [[r.u0, r.v1], [r.u1, r.v1], [r.u1, r.v0], [r.u0, r.v0]]; + let c = |sft: u32| (((tint >> sft) & 255) as f32 * shade) as u32; + let color = 0xFF00_0000 | c(0) << 16 | c(8) << 8 | c(16); + for (p, uv) in corners.iter().zip(uv) { + out.push(Vertex { pos: m.transform_point3(*p).to_array(), uv, layer: 0, color, light: packed }); + } + }; + let v = glam::Vec3::new; + match icon { + Some(Icon::Cube { top, left, right, tint }) => { + quad([v(0., 1., 1.), v(1., 1., 1.), v(1., 1., 0.), v(0., 1., 0.)], &top, 1.0, tint, &mut out); + quad([v(0., 0., 1.), v(1., 0., 1.), v(1., 1., 1.), v(0., 1., 1.)], &left, 0.8, 0xFFFFFF, &mut out); + quad([v(1., 0., 0.), v(0., 0., 0.), v(0., 1., 0.), v(1., 1., 0.)], &left, 0.8, 0xFFFFFF, &mut out); + quad([v(1., 0., 1.), v(1., 0., 0.), v(1., 1., 0.), v(1., 1., 1.)], &right, 0.6, 0xFFFFFF, &mut out); + quad([v(0., 0., 0.), v(0., 0., 1.), v(0., 1., 1.), v(0., 1., 0.)], &right, 0.6, 0xFFFFFF, &mut out); + } + Some(Icon::Flat(name)) => { + // Generated item models are a sprite on the z = 8/16 plane. + quad([v(0., 0., 0.5), v(1., 0., 0.5), v(1., 1., 0.5), v(0., 1., 0.5)], &name, 1.0, 0xFFFFFF, &mut out); + } + None => {} + } + } + } + out + } + fn apply_settings(&mut self) { + self.streaming.radius = self.settings.render_distance; + self.audio.master = self.settings.master_volume; + horizon_client::hud::GUI_SCALE.store(self.settings.gui_scale, std::sync::atomic::Ordering::Relaxed); + } + /// Whether precipitation at a column is snow (Biome.coldEnoughToSnow: + /// base temperature lowered above y 80) or none (no precipitation). + fn precipitation(&self, x: i32, y: i32, z: i32) -> Option<bool> { + let chunk = self.world.chunks.get(&(x >> 4, z >> 4))?; + let b = self.res.biomes.get(chunk.biome(x, y, z)); + if !b.precipitation { + return None; + } + let t = if y > 80 { b.temperature - (y - 80) as f32 * 0.05 / 40.0 } else { b.temperature }; + Some(t < 0.15) + } + /// The first motion-blocking block from the top (Heightmap MOTION_BLOCKING). + fn rain_height(&self, x: i32, z: i32, from: i32) -> i32 { + let mut y = from; + while y > MIN_Y { + let s = self.world.block(x, y, z); + let f = self.res.facts.get(s); + if f.full_collision || f.fluid != Fluid::None || f.name.contains("leaves") { + return y + 1; + } + y -= 1; + } + MIN_Y + } + fn tick_weather_effects(&mut self) { + if self.flash > 0 { + self.flash -= 1; + } + let (rain, thunder) = self.world.weather.levels(1.0); + let Some(eye) = self.eye_position() else { return }; + // WeatherEffectRenderer.tickRainParticles: occasional rain sounds. + if rain > 0.0 && self.world.random.next_int_bound(3).unwrap_or(1) < (rain * 3.0) as i32 { + let r = &mut self.world.random; + let (dx, dz) = (r.next_int_bound(21).unwrap_or(10) - 10, r.next_int_bound(21).unwrap_or(10) - 10); + let (x, z) = (eye[0].floor() as i32 + dx, eye[2].floor() as i32 + dz); + let top = self.rain_height(x, z, eye[1] as i32 + 10); + if self.precipitation(x, top, z) == Some(false) && (top - eye[1] as i32).abs() < 10 && self.world.random.next_int_bound(5).unwrap_or(1) == 0 { + let above = f64::from(top) > eye[1] + 1.0; + let (name, volume, pitch) = if above { ("minecraft:weather.rain.above", 0.1, 0.5) } else { ("minecraft:weather.rain", 0.2, 1.0) }; + self.audio.play(name, Some([f64::from(x) + 0.5, f64::from(top), f64::from(z) + 0.5]), volume, pitch); + } + } + // ServerLevel.tickChunk lightning: 1 in 100000 per chunk per tick while thundering. + if thunder > 0.0 && self.world.weather.thundering { + let chunks = self.world.chunks.len().max(1) as i32; + if self.world.random.next_int_bound((100_000 / chunks).max(1)).unwrap_or(1) == 0 { + self.flash = 2; + let r = &mut self.world.random; + let (dx, dz) = (f64::from(r.next_int_bound(160).unwrap_or(0) - 80), f64::from(r.next_int_bound(160).unwrap_or(0) - 80)); + let at = [eye[0] + dx, eye[1], eye[2] + dz]; + let pitch = 0.8 + self.world.random.next_float() * 0.2; + self.audio.play("minecraft:entity.lightning_bolt.thunder", Some(at), 10000.0, pitch); + self.audio.play("minecraft:entity.lightning_bolt.impact", Some(at), 2.0, 0.5 + self.world.random.next_float() * 0.2); + } + } + } + /// WeatherEffectRenderer: rain/snow columns within 10 blocks. + fn weather_geometry(&self, camera: glam::DVec3, alpha: f64, out: &mut Vec<Vertex>) { + let (rain, _) = self.world.weather.levels(alpha as f32); + if rain <= 0.0 { + return; + } + let atlas = &self.res.atlas; + let (Some(rain_tex), Some(snow_tex)) = (atlas.sprites.get("environment/rain").copied(), atlas.sprites.get("environment/snow").copied()) else { return }; + let (cx, cy, cz) = (camera.x.floor() as i32, camera.y.floor() as i32, camera.z.floor() as i32); + let radius = 10; + let time = self.ticks as f32 + alpha as f32; + for dz in -radius..=radius { + for dx in -radius..=radius { + let (x, z) = (cx + dx, cz + dz); + let d2 = (dx * dx + dz * dz) as f32; + if d2 > (radius * radius) as f32 { + continue; + } + let top = self.rain_height(x, z, cy + radius + 10); + let y0 = (cy - radius).max(top); + let y1 = (cy + radius).max(top); + if y0 >= y1 { + continue; + } + let Some(snow) = self.precipitation(x, top, z) else { continue }; + let hash = (x.wrapping_mul(x).wrapping_mul(3121).wrapping_add(x.wrapping_mul(45_238_971)) ^ z.wrapping_mul(z).wrapping_mul(418_711).wrapping_add(z.wrapping_mul(13761))) & 31; + let r = if snow { snow_tex } else { rain_tex }; + // Columns face the camera horizontally. + let (fx, fz) = (f64::from(x) + 0.5 - camera.x, f64::from(z) + 0.5 - camera.z); + let len = (fx * fx + fz * fz).sqrt().max(1e-3); + let (sx, sz) = ((-fz / len * 0.5) as f32, (fx / len * 0.5) as f32); + let center = glam::Vec3::new(fx as f32, 0.0, fz as f32); + let scroll = if snow { + (time / 512.0 + hash as f32 / 32.0) % 1.0 + } else { + ((time + hash as f32) / 32.0 * (3.0 + (hash % 5) as f32 * 0.25)) % 1.0 + }; + let fade = ((1.0 - d2 / (radius * radius) as f32) * 0.5 + 0.5) * rain; + let a = (fade.clamp(0.0, 1.0) * 255.0) as u32; + let color = a << 24 | 0xFF_FFFF; + let light = self.world.light(x, top.max(cy), z); + let packed = u32::from(light >> 4) * 16 | (u32::from(light & 15) * 16) << 8; + let (b, t) = ((f64::from(y0) - camera.y) as f32, (f64::from(y1) - camera.y) as f32); + let vh = r.v1 - r.v0; + let corners = [ + center + glam::Vec3::new(-sx, b, -sz), + center + glam::Vec3::new(sx, b, sz), + center + glam::Vec3::new(sx, t, sz), + center + glam::Vec3::new(-sx, t, -sz), + ]; + // The rain texture is a vertical strip; sample a scrolling window of it. + let s0 = scroll * 0.75; + let uv0 = r.v0 + vh * s0; + let uv1 = r.v0 + vh * (s0 + 0.25); + let uvs = [[r.u0, uv1], [r.u1, uv1], [r.u1, uv0], [r.u0, uv0]]; + for (p, uv) in corners.iter().zip(uvs) { + out.push(Vertex { pos: p.to_array(), uv, layer: 0, color, light: packed }); + } + } + } + } + /// Player.startSleepInBed: night or thunder, no monsters within 8 blocks; + /// the bed becomes the respawn point either way. + fn try_sleep(&mut self, pos: [i32; 3]) { + let Some(p) = self.player.as_ref() else { return }; + let time = self.world.day_time.rem_euclid(24000); + let night = (12542..23460).contains(&time) || self.world.weather.thundering; + let state = self.world.block(pos[0], pos[1], pos[2]); + let props = self.res.assets.registry.state(state).map(|s| s.properties.clone()).unwrap_or_default(); + let head = if props.get("part").map(String::as_str) == Some("foot") { + let d = facing_offset(props.get("facing").map_or("north", String::as_str)); + [pos[0] + d[0], pos[1], pos[2] + d[2]] + } else { + pos + }; + self.spawn = Some(Vec3::new(f64::from(head[0]) + 0.5, f64::from(head[1]) + 0.6, f64::from(head[2]) + 0.5)); + self.level.spawn = Some([f64::from(head[0]), f64::from(head[1]) + 1.0, f64::from(head[2])]); + let dist = ((p.position.x - f64::from(head[0]) - 0.5).powi(2) + (p.position.z - f64::from(head[2]) - 0.5).powi(2)).sqrt(); + if !night { + self.message = Some(("You can sleep only at night or during thunderstorms".into(), Instant::now())); + return; + } + if dist > 3.0 { + self.message = Some(("You may not rest now; the bed is too far away".into(), Instant::now())); + return; + } + let monsters = self.mobs.iter().any(|m| { + m.hostile() && m.alive() && (m.position.x - p.position.x).abs() < 8.0 && (m.position.y - p.position.y).abs() < 5.0 && (m.position.z - p.position.z).abs() < 8.0 + }); + if monsters { + self.message = Some(("You may not rest now; there are monsters nearby".into(), Instant::now())); + return; + } + self.message = Some(("Respawn point set".into(), Instant::now())); + self.sleeping = Some((head, 0)); + } + fn tick_sleep(&mut self) { + let Some((head, ticks)) = self.sleeping else { return }; + if self.keys.contains(&KeyCode::ShiftLeft) || self.player.as_ref().is_none_or(|p| p.health.dead_or_dying()) { + self.sleeping = None; + return; + } + if let Some(p) = self.player.as_mut() { + p.position = Vec3::new(f64::from(head[0]) + 0.5, f64::from(head[1]) + 0.5625, f64::from(head[2]) + 0.5); + p.velocity = Vec3::ZERO; + } + let ticks = ticks + 1; + // ServerLevel: once everyone has slept 100 ticks, skip to morning and clear weather. + if ticks >= 100 { + let t = self.world.day_time; + self.world.day_time = t + 24000 - t.rem_euclid(24000); + self.world.weather.raining = false; + self.world.weather.thundering = false; + self.world.weather.rain_time = 0; + self.world.weather.thunder_time = 0; + self.sleeping = None; + } else { + self.sleeping = Some((head, ticks)); + } + } + fn creative_origin(batch: &HudBatch) -> (f32, f32) { + ((batch.width - Creative::WIDTH) / 2.0, (batch.height - Creative::HEIGHT) / 2.0) + } + /// Vanilla tooltip: dark box with a purple gradient border. + fn tooltip(&self, batch: &mut HudBatch, text: &str, x: f32, y: f32) { + let atlas = &self.res.atlas; + let w = HudBatch::text_width(atlas, text); + let (x, y) = (x + 12.0, y - 12.0); + batch.fill(atlas, x - 3.0, y - 4.0, w + 6.0, 16.0, rgba(16, 0, 16, 240)); + batch.fill(atlas, x - 3.0, y - 3.0, w + 6.0, 1.0, rgba(80, 0, 255, 80)); + batch.fill(atlas, x - 3.0, y + 10.0, w + 6.0, 1.0, rgba(40, 0, 127, 80)); + batch.text(atlas, text, x, y, u32::MAX, true); + } + fn draw_creative(&mut self, batch: &mut HudBatch) { + let (ox, oy) = Self::creative_origin(batch); + let selected = self.creative_screen.selected; + let tabs = self.creative_screen.tabs.clone(); + let tab = self.creative_screen.tab().clone(); + let tab_sprite = |t: &horizon_client::creative::Tab, on: bool| { + format!("gui/sprites/container/creative_inventory/tab_{}_{}_{}", if t.top { "top" } else { "bottom" }, if on { "selected" } else { "unselected" }, t.column + 1) + }; + batch.fill(&self.res.atlas, 0.0, 0.0, batch.width, batch.height, rgba(16, 16, 16, 160)); + // Unselected tabs behind the panel, then the panel, then the selected tab. + for (i, t) in tabs.iter().enumerate() { + if i != selected { + let (tx, ty) = Creative::tab_position(t); + batch.sprite(&self.res.atlas, &tab_sprite(t, false), ox + tx, oy + ty); + } + } + let background = if tab.search { + "gui/container/creative_inventory/tab_item_search" + } else if tab.inventory { + "gui/container/creative_inventory/tab_inventory" + } else { + "gui/container/creative_inventory/tab_items" + }; + if let Some(mut r) = self.res.atlas.sprites.get(background).copied() { + r.u1 = r.u0 + (r.u1 - r.u0) * Creative::WIDTH / r.w as f32; + r.v1 = r.v0 + (r.v1 - r.v0) * Creative::HEIGHT / r.h as f32; + batch.rect_uv(ox, oy, Creative::WIDTH, Creative::HEIGHT, r, u32::MAX); + } + let (tx, ty) = Creative::tab_position(&tab); + batch.sprite(&self.res.atlas, &tab_sprite(&tab, true), ox + tx, oy + ty); + for t in &tabs { + let (tx, ty) = Creative::tab_position(t); + let stack = ItemStack { item: Arc::from(t.icon.as_str()), count: 1, damage: 0 }; + self.draw_item(batch, &stack, ox + tx + 5.0, oy + ty + if t.top { 9.0 } else { 7.0 }); + } + let atlas = &self.res.atlas; + batch.text(atlas, &tab.title, ox + 8.0, oy + 6.0, rgba(64, 64, 64, 255), false); + if tab.search { + let shown = format!("{}_", self.creative_screen.search); + batch.text(atlas, &shown, ox + 82.0, oy + 6.0, u32::MAX, true); + } + let items = self.creative_screen.items(&self.res.names); + let first = self.creative_screen.first_row(&self.res.names); + let mut hovered: Option<String> = None; + for r in 0..5 { + for c in 0..9 { + let Some(item) = items.get((first + r) * 9 + c) else { continue }; + let (x, y) = (ox + 9.0 + c as f32 * 18.0, oy + 18.0 + r as f32 * 18.0); + let stack = ItemStack { item: Arc::from(item.as_str()), count: 1, damage: 0 }; + self.draw_item(batch, &stack, x, y); + if self.cursor.0 >= x && self.cursor.0 < x + 16.0 && self.cursor.1 >= y && self.cursor.1 < y + 16.0 { + batch.fill(&self.res.atlas, x, y, 16.0, 16.0, rgba(255, 255, 255, 128)); + hovered = Some(item.clone()); + } + } + } + for c in 0..9 { + let (x, y) = (ox + 9.0 + c as f32 * 18.0, oy + 112.0); + if let Some(stack) = self.inventory[c].clone() { + self.draw_item(batch, &stack, x, y); + if self.cursor.0 >= x && self.cursor.0 < x + 16.0 && self.cursor.1 >= y && self.cursor.1 < y + 16.0 { + hovered = Some(stack.item.to_string()); + } + } + } + let scrollable = self.creative_screen.rows(&self.res.names) > 5; + let scroller = if scrollable { + "gui/sprites/container/creative_inventory/scroller" + } else { + "gui/sprites/container/creative_inventory/scroller_disabled" + }; + batch.sprite(&self.res.atlas, scroller, ox + 175.0, oy + 18.0 + self.creative_screen.scroll * (112.0 - 15.0)); + for t in &tabs { + let (tx, ty) = Creative::tab_position(t); + if self.cursor.0 >= ox + tx && self.cursor.0 < ox + tx + 26.0 && self.cursor.1 >= oy + ty && self.cursor.1 < oy + ty + 32.0 { + self.tooltip(batch, &t.title, self.cursor.0, self.cursor.1); + } + } + if let Some(stack) = self.carried.clone() { + self.draw_item(batch, &stack, self.cursor.0 - 8.0, self.cursor.1 - 8.0); + } else if let Some(item) = hovered { + let name = self.res.names.item(&item); + self.tooltip(batch, &name, self.cursor.0, self.cursor.1); + } + } + fn click_creative(&mut self, right: bool) { + let Some(size) = self.renderer.as_ref().map(|r| [r.config.width, r.config.height]) else { return }; + let batch = HudBatch::new(size); + let (ox, oy) = Self::creative_origin(&batch); + let (cx, cy) = self.cursor; + let tabs = self.creative_screen.tabs.clone(); + for (i, t) in tabs.iter().enumerate() { + let (tx, ty) = Creative::tab_position(t); + if cx >= ox + tx && cx < ox + tx + 26.0 && cy >= oy + ty && cy < oy + ty + 32.0 { + if t.inventory { + self.screen = Screen::Inventory; + return; + } + self.creative_screen.selected = i; + self.creative_screen.scroll = 0.0; + return; + } + } + if cx >= ox + 175.0 && cx < ox + 187.0 && cy >= oy + 18.0 && cy < oy + 130.0 { + self.creative_screen.scroll = ((cy - oy - 18.0 - 7.5) / (112.0 - 15.0)).clamp(0.0, 1.0); + return; + } + let shift = self.keys.contains(&KeyCode::ShiftLeft); + let items = self.creative_screen.items(&self.res.names); + let first = self.creative_screen.first_row(&self.res.names); + for r in 0..5 { + for c in 0..9 { + let (x, y) = (ox + 9.0 + c as f32 * 18.0, oy + 18.0 + r as f32 * 18.0); + if !(cx >= x && cx < x + 16.0 && cy >= y && cy < y + 16.0) { + continue; + } + // Clicking the grid with an item deletes it; otherwise take a stack. + if self.carried.take().is_some() { + return; + } + let Some(item) = items.get((first + r) * 9 + c) else { return }; + let max = self.res.items.get(item).map_or(64, |i| i.max_stack); + let stack = ItemStack { item: Arc::from(item.as_str()), count: if right { 1 } else { max }, damage: 0 }; + if shift { + let _ = self.give(stack); + } else { + self.carried = Some(stack); + } + return; + } + } + for c in 0..9 { + let (x, y) = (ox + 9.0 + c as f32 * 18.0, oy + 112.0); + if cx >= x && cx < x + 16.0 && cy >= y && cy < y + 16.0 { + std::mem::swap(&mut self.carried, &mut self.inventory[c]); + return; + } + } + // Clicking outside the panel throws the carried stack away. + if !(cx >= ox && cx < ox + Creative::WIDTH && cy >= oy && cy < oy + Creative::HEIGHT) { + self.carried = None; + } + } + fn save_game(&mut self) -> Result<()> { + let keys: Vec<_> = self.world.modified.drain().collect(); + let chunks: Vec<_> = keys + .iter() + .filter_map(|k| self.world.chunks.get(k)) + .map(|c| self.with_entities(c)) + .collect(); + self.save.save(&chunks, &self.res.assets.registry, &self.res.biomes)?; + let level = &mut self.level; + level.creative = self.creative; + level.time = self.world.game_time; + level.weather = self.world.weather; + level.day_time = self.world.day_time; + level.spawn = self.spawn.map(|s| [s.x, s.y, s.z]); + level.rotation = [self.yaw, self.pitch]; + level.xp_level = self.experience.level; + level.xp_progress = self.experience.progress; + level.xp_total = self.experience.total; + if let Some(p) = &self.player { + level.position = Some([p.position.x, p.position.y, p.position.z]); + level.health = p.health.health(); + level.food = p.health.food.food; + level.saturation = p.health.food.saturation; + } + level.inventory = self + .inventory + .iter() + .enumerate() + .filter_map(|(i, s)| s.as_ref().map(|s| (i as u8, s.item.to_string(), s.count, s.damage))) + .collect(); + // Vanilla stores armor in slots 100 (feet) to 103 (head). + for (i, s) in self.armor.iter().enumerate() { + if let Some(s) = s { + level.inventory.push((103 - i as u8, s.item.to_string(), s.count, s.damage)); + } + } + level.dimension = self.dim.id().to_owned(); + level.write(&self.world_root)?; + self.message = Some(("Saved the game".into(), Instant::now())); + Ok(()) + } + fn render(&mut self) -> Result<bool> { + let Some(size) = self.renderer.as_ref().map(|r| [r.config.width, r.config.height]) else { + return Ok(false); + }; + let alpha = self.clock.fraction(); + let (camera, underwater) = match &self.player { + Some(p) => { + let (a, b) = (self.previous_position, p.position); + let eye = self.previous_eye + alpha as f32 * (self.eye - self.previous_eye); + let c = glam::DVec3::new( + a.x + (b.x - a.x) * alpha, + a.y + (b.y - a.y) * alpha + f64::from(eye), + a.z + (b.z - a.z) * alpha, + ); + let s = self.world.block(c.x.floor() as i32, c.y.floor() as i32, c.z.floor() as i32); + (c, self.res.facts.get(s).fluid == Fluid::Water) + } + None => (glam::DVec3::new(0.5, 100.0, 0.5), false), + }; + self.audio.listener = [camera.x, camera.y, camera.z]; + self.audio.listener_yaw = self.yaw; + let block = [camera.x.floor() as i32, camera.y.floor() as i32, camera.z.floor() as i32]; + let biome = self + .world + .chunks + .get(&(block[0] >> 4, block[2] >> 4)) + .map(|c| c.biome(block[0], block[1], block[2])) + .unwrap_or(0); + let info = self.res.biomes.get(biome).clone(); + let environment = if self.dim == Dim::Nether { &self.res.nether_environment } else { &self.res.environment }; + let mut sky = environment.sample(self.world.day_time, info.sky, info.fog); + let (rain, thunder) = if self.dim == Dim::Overworld { self.world.weather.levels(alpha as f32) } else { (0.0, 0.0) }; + horizon_client::environment::apply_weather(&mut sky, rain, thunder); + if self.flash > 0 { + // Lightning flash brightens the sky (LevelRenderer skyFlashTime). + sky.sky_color = [0.9, 0.9, 1.0]; + sky.sky_light_factor = 1.0; + } + let outline = if self.screen == Screen::Playing { + self.pick().map(|h| { + let p = h.pos.map(f64::from); + [p[0], p[1], p[2], p[0] + 1.0, p[1] + 1.0, p[2] + 1.0] + }) + } else { + None + }; + let hud = self.hud(size); + let title = self.title.is_some(); + let entities = if title { Vec::new() } else { self.entity_geometry(camera, alpha) }; + let celestial = if title { + self.panorama_geometry() + } else if self.dim == Dim::Overworld { + self.celestial_geometry(&sky) + } else { + Vec::new() + }; + let hand = if title || self.screen == Screen::Inventory { Vec::new() } else { self.hand_geometry(alpha) }; + let mut entities = entities; + if !title && self.dim == Dim::Overworld { + self.cloud_geometry(&sky, camera, alpha, &mut entities); + self.weather_geometry(camera, alpha, &mut entities); + } + // PanoramaRenderer: the title cube spins at 0.1 degrees per tick, pitched 10 degrees. + let (yaw, pitch) = if title { (-(self.started.elapsed().as_secs_f32() * 2.0) % 360.0, 10.0) } else { (self.yaw, self.pitch) }; + let water_fog = { + let c = info.water_fog; + [(c >> 16 & 255) as f32 / 255.0, (c >> 8 & 255) as f32 / 255.0, (c & 255) as f32 / 255.0] + }; + let frame = Frame { + camera, + yaw, + pitch, + fov_degrees: if title { 85.0 } else { self.settings.fov }, + bob: (self.settings.view_bobbing && !title && self.player.is_some()).then(|| { + let a = alpha as f32; + (self.walk.0 + (self.walk.1 - self.walk.0) * a, self.bob.0 + (self.bob.1 - self.bob.0) * a) + }), + sky, + distance: (self.streaming.radius * 16) as f32, + underwater, + title, + skybox: self.dim == Dim::Overworld, + environment_fog: (self.dim == Dim::Nether).then_some((sky.fog_start, sky.fog_end)), + // The camera inside an opaque block sees nothing through it: disable. + cave_culling: !self.res.facts.get(self.world.block(block[0], block[1], block[2])).solid_render, + water_fog, + outline, + hud: &hud, + entities: &entities, + celestial: &celestial, + hand: &hand, + game_time: self.world.game_time as f32, + ticks: self.ticks, + }; + self.renderer.as_mut().ok_or("renderer")?.render(&frame) + } + /// A key press while a world is open (keyboard or control socket). + fn key_pressed(&mut self, key: KeyCode) -> Result<()> { + match key { + KeyCode::Escape => match self.screen { + Screen::Options => { + self.settings.save(&std::env::current_dir()?.join("options.txt")); + self.screen = if self.options_from_title { Screen::Playing } else { Screen::Paused }; + } + Screen::Playing => { + self.screen = Screen::Paused; + self.capture(false); + } + Screen::Creative => { + self.carried = None; + self.screen = Screen::Playing; + self.capture(true); + } + Screen::Paused | Screen::Inventory => { + self.close_container(); + self.screen = Screen::Playing; + self.capture(true); + } + Screen::Dead => {} + }, + KeyCode::KeyE if self.screen == Screen::Creative && self.creative_screen.tab().search => {} + KeyCode::KeyE => match self.screen { + Screen::Playing => { + self.screen = if self.creative { Screen::Creative } else { Screen::Inventory }; + self.capture(false); + } + Screen::Creative => { + if let Some(c) = self.carried.take() { + let _ = self.give(c); + } + self.screen = Screen::Playing; + self.capture(true); + } + Screen::Inventory => { + self.close_container(); + self.screen = Screen::Playing; + self.capture(true); + } + _ => {} + }, + KeyCode::F3 => self.debug = !self.debug, + KeyCode::KeyQ if self.screen == Screen::Playing => { + let all = self.keys.contains(&KeyCode::ControlLeft); + self.drop_held(all); + } + KeyCode::Digit1 | KeyCode::Digit2 | KeyCode::Digit3 | KeyCode::Digit4 | KeyCode::Digit5 | KeyCode::Digit6 | KeyCode::Digit7 | KeyCode::Digit8 | KeyCode::Digit9 => { + self.selected = match key { + KeyCode::Digit1 => 0, + KeyCode::Digit2 => 1, + KeyCode::Digit3 => 2, + KeyCode::Digit4 => 3, + KeyCode::Digit5 => 4, + KeyCode::Digit6 => 5, + KeyCode::Digit7 => 6, + KeyCode::Digit8 => 7, + _ => 8, + }; + } + _ => {} + } + Ok(()) + } + /// A mouse button while playing (window or control socket). + fn play_mouse(&mut self, button: MouseButton, pressed: bool) -> Result<()> { + match button { + MouseButton::Left => { + if pressed && self.attack() { + return Ok(()); + } + self.left = pressed; + if pressed { + self.destroy_delay = 0; + } + } + MouseButton::Right => { + self.right = pressed; + if pressed { + self.use_item()?; + self.use_delay = 4; + } + } + MouseButton::Middle if pressed && self.creative => { + if let Some(hit) = self.pick() { + let state = self.world.block(hit.pos[0], hit.pos[1], hit.pos[2]); + let item = self.res.facts.get(state).item.clone(); + if &*item != "minecraft:air" { + self.inventory[self.selected] = Some(ItemStack { item, count: 1, damage: 0 }); + } + } + } + _ => {} + } + Ok(()) + } + fn update_world(&mut self) { + if let Some(p) = &self.player { + self.streaming.center = ((p.position.x.floor() as i32) >> 4, (p.position.z.floor() as i32) >> 4); + } + let (uploads, unloaded) = self.streaming.update(&mut self.world); + let dirty: Vec<_> = unloaded + .iter() + .filter(|c| self.world.modified.remove(&(c.x, c.z))) + .cloned() + .collect(); + let modified: Vec<_> = dirty.iter().map(|c| self.with_entities(c)).collect(); + for c in &unloaded { + self.world.block_entities.retain(|p, _| !(p.0 >> 4 == c.x && p.2 >> 4 == c.z)); + } + if !modified.is_empty() + && let Err(e) = self.save.save(&modified, &self.res.assets.registry, &self.res.biomes) + { + eprintln!("Horizon: failed to save unloaded chunks: {e}"); + } + if let Some(renderer) = self.renderer.as_mut() { + for (key, mesh) in uploads { + renderer.upload(key, &mesh); + } + for c in unloaded { + for sy in 0..(HEIGHT / 16) { + renderer.remove((c.x, sy, c.z)); + } + } + } + } +} +impl ApplicationHandler for Game<'_> { + fn resumed(&mut self, event_loop: &ActiveEventLoop) { + if self.window.is_some() { + return; + } + let window = match event_loop.create_window( + Window::default_attributes() + .with_title("Horizon") + .with_inner_size(winit::dpi::LogicalSize::new(1280.0, 720.0)), + ) { + Ok(w) => Arc::new(w), + Err(e) => { + self.error = Some(e.to_string()); + event_loop.exit(); + return; + } + }; + let assets = &self.res.assets; + match pollster::block_on(Renderer::new( + window.clone(), + &assets.pixels, + assets.sprite_size, + assets.texture_layers, + &assets.animations, + (&self.res.atlas.pixels, self.res.atlas.width, self.res.atlas.height), + )) { + Ok(r) => self.renderer = Some(r), + Err(e) => { + self.error = Some(e.to_string()); + event_loop.exit(); + return; + } + } + self.window = Some(window); + self.previous = Instant::now(); + } + fn window_event(&mut self, event_loop: &ActiveEventLoop, id: WindowId, event: WindowEvent) { + if self.window.as_ref().is_none_or(|w| w.id() != id) { + return; + } + let result: Result<()> = (|| { + match event { + WindowEvent::CloseRequested => { + if self.title.is_none() { + self.save_game()?; + } + event_loop.exit(); + } + WindowEvent::Resized(size) => { + if let Some(r) = &mut self.renderer { + r.resize(size.width, size.height); + } + } + WindowEvent::Focused(focused) => { + self.focused = focused; + if !focused && self.control.is_none() { + self.keys.clear(); + self.left = false; + self.right = false; + self.capture(false); + if self.screen == Screen::Playing && self.player.is_some() && !self.options.no_pause { + self.screen = Screen::Paused; + } + } + } + WindowEvent::CursorMoved { position, .. } => { + if let Some(r) = &self.renderer { + let b = HudBatch::new([r.config.width, r.config.height]); + self.cursor = (position.x as f32 / b.scale, position.y as f32 / b.scale); + if self.dragging && self.screen == Screen::Options { + self.settings.click(self.cursor.0, self.cursor.1, (b.width, b.height), true); + self.apply_settings(); + } + } + } + WindowEvent::MouseWheel { delta, .. } => { + let d = match delta { + MouseScrollDelta::LineDelta(_, y) => y, + MouseScrollDelta::PixelDelta(p) => p.y as f32, + }; + if self.screen == Screen::Creative && d != 0.0 { + let rows = self.creative_screen.rows(&self.res.names).saturating_sub(5).max(1) as f32; + self.creative_screen.scroll = (self.creative_screen.scroll - d.signum() / rows).clamp(0.0, 1.0); + } + if self.screen == Screen::Playing && d != 0.0 { + self.selected = (self.selected as i32 - d.signum() as i32).rem_euclid(9) as usize; + } + } + WindowEvent::MouseInput { state, button: MouseButton::Left, .. } if self.screen == Screen::Options => { + self.dragging = state == ElementState::Pressed; + if self.dragging { + let size = self.renderer.as_ref().map(|r| [r.config.width, r.config.height]).unwrap_or([1, 1]); + let b = HudBatch::new(size); + if self.settings.click(self.cursor.0, self.cursor.1, (b.width, b.height), false) { + self.settings.save(&std::env::current_dir()?.join("options.txt")); + self.screen = if self.options_from_title { Screen::Playing } else { Screen::Paused }; + self.dragging = false; + } + self.apply_settings(); + } + } + WindowEvent::MouseInput { state, button: MouseButton::Left, .. } + if self.title.is_some() && state == ElementState::Pressed => + { + let size = self.renderer.as_ref().map(|r| [r.config.width, r.config.height]).unwrap_or([1, 1]); + let b = HudBatch::new(size); + let action = self.title.as_mut().map_or(Action::None, |t| t.click(self.cursor.0, self.cursor.1, (b.width, b.height))); + match action { + Action::Quit => event_loop.exit(), + Action::Options => { + self.screen = Screen::Options; + self.options_from_title = true; + } + Action::Play { folder } => self.open_world(&folder, None, None, false)?, + Action::Create { folder, name, seed, creative } => self.open_world(&folder, Some(&name), seed, creative)?, + Action::None => {} + } + } + WindowEvent::MouseInput { .. } if self.title.is_some() => {} + WindowEvent::MouseInput { state, button, .. } => { + let pressed = state == ElementState::Pressed; + match self.screen { + Screen::Playing => { + if pressed && !self.captured { + self.capture(true); + return Ok(()); + } + self.play_mouse(button, pressed)?; + } + Screen::Inventory if pressed => { + self.click_inventory(button == MouseButton::Right); + } + Screen::Creative if pressed => { + self.click_creative(button == MouseButton::Right); + } + Screen::Paused if pressed => { + let size = self.renderer.as_ref().map(|r| [r.config.width, r.config.height]).unwrap_or([1, 1]); + let b = HudBatch::new(size); + for i in 0..3 { + let (bx, by) = (b.width / 2.0 - 100.0, b.height / 4.0 + 24.0 + i as f32 * 24.0 + 16.0); + if self.cursor.0 >= bx && self.cursor.0 < bx + 200.0 && self.cursor.1 >= by && self.cursor.1 < by + 20.0 { + if i == 0 { + self.screen = Screen::Playing; + self.capture(true); + } else if i == 1 { + self.screen = Screen::Options; + self.options_from_title = false; + } else { + self.close_world()?; + } + } + } + } + Screen::Dead if pressed => { + self.player = None; + self.screen = Screen::Playing; + self.spawn_player()?; + self.capture(true); + } + _ => {} + } + } + WindowEvent::KeyboardInput { event, .. } + if self.screen == Screen::Creative && self.creative_screen.tab().search && event.state == ElementState::Pressed + && !matches!(event.physical_key, PhysicalKey::Code(KeyCode::Escape)) => + { + match event.physical_key { + PhysicalKey::Code(KeyCode::Backspace) => { + self.creative_screen.search.pop(); + } + _ => { + if let Some(text) = &event.text { + self.creative_screen.search.extend(text.chars().filter(|c| !c.is_control())); + } + } + } + self.creative_screen.scroll = 0.0; + } + WindowEvent::KeyboardInput { event, .. } if self.title.is_some() => { + if event.state == ElementState::Pressed + && let Some(title) = self.title.as_mut() + { + match event.physical_key { + PhysicalKey::Code(KeyCode::Backspace) => title.backspace(), + PhysicalKey::Code(KeyCode::Tab) => title.tab(), + PhysicalKey::Code(KeyCode::Escape) => title.escape(), + _ => { + if let Some(text) = &event.text { + title.type_text(text); + } + } + } + } + } + WindowEvent::KeyboardInput { event, .. } => { + let PhysicalKey::Code(key) = event.physical_key else { return Ok(()) }; + if event.state != ElementState::Pressed { + self.keys.remove(&key); + return Ok(()); + } + self.keys.insert(key); + if event.repeat { + return Ok(()); + } + self.key_pressed(key)?; + } + WindowEvent::RedrawRequested => { + let now = Instant::now(); + let elapsed = now.duration_since(self.previous); + self.previous = now; + // Arrow keys turn the camera (accessibility / scripted testing). + let turn = |k| f32::from(u8::from(self.keys.contains(&k))); + let secs = elapsed.as_secs_f32().min(0.1); + self.yaw += (turn(KeyCode::ArrowRight) - turn(KeyCode::ArrowLeft)) * 90.0 * secs; + self.pitch = (self.pitch + (turn(KeyCode::ArrowDown) - turn(KeyCode::ArrowUp)) * 90.0 * secs).clamp(-90.0, 90.0); + if self.title.is_none() { + self.update_world(); + self.spawn_player()?; + } + let steps = self.clock.advance(elapsed); + for _ in 0..steps { + if self.title.is_none() { + self.tick()?; + } + } + let rendered = self.render()?; + if let Some(result) = self.renderer.as_mut().and_then(|r| r.screenshot_result.take()) + && let Some(reply) = self.pending_screenshot.take() + { + let _ = reply.send(match result { + Ok([w, h]) => serde_json::json!({ "ok": true, "width": w, "height": h }), + Err(e) => serde_json::json!({ "error": e }), + }.to_string()); + } + if rendered { + self.frame_stats.record(elapsed.as_secs_f32() * 1000.0); + self.frames += 1; + self.fps_frames += 1; + if self.fps_at.elapsed() >= Duration::from_secs(1) { + self.fps = self.fps_frames as f32 / self.fps_at.elapsed().as_secs_f32(); + self.fps_frames = 0; + self.fps_at = Instant::now(); + } + if self.options.frames.is_some_and(|f| self.frames >= f) { + event_loop.exit(); + } + } + } + _ => {} + } + Ok(()) + })(); + if let Err(e) = result { + self.error = Some(e.to_string()); + event_loop.exit(); + } + } + fn device_event(&mut self, _: &ActiveEventLoop, _: DeviceId, event: DeviceEvent) { + if self.captured + && self.focused + && self.screen == Screen::Playing + && let DeviceEvent::MouseMotion { delta: (x, y) } = event + { + // MouseHandler.turnPlayer at default sensitivity 0.5: 0.15 degrees per count. + let s = f64::from(self.settings.sensitivity) * 0.6 + 0.2; + let f = s * s * s * 8.0; + self.yaw += (x * f * 0.15) as f32; + self.pitch = (self.pitch + (y * f * 0.15) as f32).clamp(-90.0, 90.0); + } + } + fn about_to_wait(&mut self, event_loop: &ActiveEventLoop) { + self.poll_control(event_loop); + if self.options.frames.is_some() && self.started.elapsed() > self.options.timeout { + self.error = Some("frame-limited run timed out".into()); + event_loop.exit(); + return; + } + if let Some(w) = &self.window { + w.request_redraw(); + } + event_loop.set_control_flow(ControlFlow::Poll); + } +} +pub fn run() -> Result<()> { + let Some(options) = Options::read()? else { return Ok(()) }; + let started = Instant::now(); + let root = options.resources.clone(); + let assets = Arc::new(Assets::load(&root).map_err(|e| { + format!("{e}\nPrepare resources with: python3 tools/prepare_native_client.py --prepare") + })?); + eprintln!("load assets: {:.2}s", started.elapsed().as_secs_f32()); + let facts = BlockFacts::load(&root, &assets.registry)?; + eprintln!("load facts: {:.2}s", started.elapsed().as_secs_f32()); + let items = Items::load(&root, &assets.registry, &facts)?; + eprintln!("load items: {:.2}s", started.elapsed().as_secs_f32()); + let recipes = Recipes::load(&root, &items)?; + let biomes = Arc::new(Biomes::load(&root)?); + let environment = Environment::load(&root)?; + eprintln!("load biomes+env: {:.2}s", started.elapsed().as_secs_f32()); + let visibility = models::load_visibility(&root, &assets.registry)?; + eprintln!("load visibility: {:.2}s", started.elapsed().as_secs_f32()); + let tables = Arc::new(MeshTables::new(&assets, &facts, visibility)?); + let light = Arc::new(LightTables::new(&facts)); + eprintln!("load tables: {:.2}s", started.elapsed().as_secs_f32()); + let atlas = HudAtlas::build(&root)?; + eprintln!("load atlas: {:.2}s", started.elapsed().as_secs_f32()); + let layer_names = assets + .sprite_layers + .iter() + .map(|(name, layer)| (*layer, name.trim_start_matches("minecraft:").to_owned())) + .collect(); + let registry_owner = assets.clone(); + let collision = collisions::load(&root, ®istry_owner.registry)?; + let motion = MotionResources::load(&root, ®istry_owner)?; + eprintln!("load collision+motion: {:.2}s", started.elapsed().as_secs_f32()); + let context = Arc::new(WorkerContext { + assets: assets.clone(), + tables, + biomes: biomes.clone(), + light, + }); + let threads = std::thread::available_parallelism().map_or(2, |n| n.get()).saturating_sub(1).max(1); + eprintln!( + "Horizon: resources loaded in {:.1}s; {} block states, {} items, {} biomes; {} worker threads", + started.elapsed().as_secs_f32(), + facts.states.len(), + items.items.len(), + biomes.list.len(), + threads + ); + // Until a world is opened the streamer is idle. + let mut streaming = Streaming::new( + Arc::new(TestTerrain::new(assets.registry, &biomes)?), + context.clone(), + 1, + ); + streaming.paused = true; + let level = Level::default(); + let save = Arc::new(SaveDir::new(std::env::current_dir()?.join("saves").join(".horizon-title"))); + let audio = Audio::new(&root); + let world = World::new(facts.air, 0); + let creative = options.creative; + let mut resources = Resources { + assets, + facts, + items, + recipes, + biomes, + environment, + atlas, + icons: HashMap::new(), + layer_names, + providers: Providers::load(&root), + chest_model: horizon_client::mobs::load_model(&root, "minecraft:chest#main"), + nether_environment: Environment::load_dimension(&root, "the_nether", false)?, + behaviours: Behaviours::load(registry_owner.registry, &root)?, + names: Names::load(&root), + clouds: horizon_client::hud::decode(&root.join("assets/minecraft/textures/environment/clouds.png")) + .map(|(w, h, px)| (w, h, px.chunks_exact(4).map(|p| p[3] > 0).collect())) + .unwrap_or((1, 1, vec![false])), + mob_types: MobTypes::load(&root)?.types.into_iter().map(|(k, v)| (k, Arc::new(v))).collect(), + context, + threads, + player_arm: horizon_client::mobs::load_model(&root, "minecraft:player#main") + .and_then(|m| m.children.into_iter().find(|c| c.name == "right_arm")), + displays: HashMap::new(), + }; + let inventory = vec![None; 36]; + let now = Instant::now(); + let game_root = options.resources.clone(); + let mut settings = Settings::load(&std::env::current_dir()?.join("options.txt")); + if let Some(d) = options.distance_override { + settings.render_distance = d; + } + let look = options.look; + let mut game = Game { + res: &mut resources, + collision: &collision, + motion: &motion, + world, + streaming, + options, + player: None, + spawn: None, + clock: FixedStep::default(), + previous_position: Vec3::ZERO, + eye: 1.62, + previous_eye: 1.62, + yaw: look.map_or(level.rotation[0], |l| l.0), + pitch: look.map_or(level.rotation[1], |l| l.1), + inventory, + selected: 0, + carried: None, + craft_grid: vec![None; 9], + craft_size: 2, + container: None, + scratch_slot: None, + mining: None, + destroy_delay: 0, + use_delay: 0, + creative, + keys: HashSet::new(), + left: false, + right: false, + cursor: (0.0, 0.0), + captured: false, + focused: true, + debug: false, + screen: Screen::Playing, + window: None, + renderer: None, + started: now, + previous: now, + frames: 0, + fps: 0.0, + fps_frames: 0, + fps_at: now, + ticks: 0, + error: None, + message: None, + save, + level, + audio, + dropped: Vec::new(), + next_entity: 0, + particles: Vec::new(), + spawn_search: 0, + mobs: Vec::new(), + arrows: Vec::new(), + attack_ticks: 100, + last_hurt_by_player: HashSet::new(), + chest_open: HashMap::new(), + using: None, + title: None, + armor: [None, None, None, None], + applied_modifiers: Vec::new(), + experience: Experience::default(), + orbs: Vec::new(), + xp_delay: 0, + last_level_up: 0, + swing: None, + swing_anim: (0.0, 0.0), + hand_height: (1.0, 1.0), + hand_item: None, + settings, + options_from_title: false, + dragging: false, + walk: (0.0, 0.0), + bob: (0.0, 0.0), + flash: 0, + sleeping: None, + dim: Dim::Overworld, + world_root: PathBuf::new(), + travelling: None, + portal_ticks: 0, + portal_cooldown: 0, + block_ticks: Ticks::new(0), + tick_chunks: HashSet::new(), + level_events: Vec::new(), + falling: Vec::new(), + creative_screen: Creative::load(&game_root)?, + control: None, + frame_stats: Default::default(), + pending_screenshot: None, + pending_bench: None, + }; + if let Some(path) = &game.options.control { + let server = horizon_client::control::Server::start(path) + .map_err(|e| format!("control socket {}: {e}", path.display()))?; + eprintln!("Horizon: control socket {}", server.path().display()); + game.control = Some(server); + } + match game.options.world.clone() { + Some(folder) => { + let (seed, creative) = (game.options.seed, game.options.creative); + game.open_world(&folder, None, Some(seed), creative)?; + } + None => game.title = Some(Title::new(std::env::current_dir()?.join("saves"))), + } + EventLoop::new()?.run_app(&mut game)?; + if let Some(path) = &game.options.report { + let report = serde_json::json!({ + "frames": game.frames, + "elapsed_seconds": game.started.elapsed().as_secs_f64(), + "chunks": game.world.chunks.len(), + "generated": game.streaming.generated_total, + "meshed_sections": game.streaming.meshed_total, + "player": game.player.as_ref().map(|p| [p.position.x, p.position.y, p.position.z]), + "error": game.error, + }); + std::fs::write(path, serde_json::to_vec_pretty(&report)?)?; + } + if let Some(e) = game.error { + return Err(e.into()); + } + Ok(()) +} diff --git a/crates/horizon-client/src/game/control.rs b/crates/horizon-client/src/game/control.rs new file mode 100644 index 000000000..f6b2bdcc6 --- /dev/null +++ b/crates/horizon-client/src/game/control.rs @@ -0,0 +1,400 @@ +//! Commands from the control socket (`horizon-ctl`), run on the game thread. +use super::{Game, Screen}; +use horizon_client::{Result, items::ItemStack}; +use horizon_core::geometry::Vec3; +use serde_json::{Value, json}; +use std::{ + sync::mpsc::Sender, + time::{Duration, Instant}, +}; +use winit::{event::MouseButton, event_loop::ActiveEventLoop, keyboard::KeyCode}; + +const HELP: &[&str] = &[ + "status game, player, streaming and renderer state", + "key KEY down|up|tap press or release a key (w a s d space shift ctrl e q esc f3 1-9 arrows ...)", + "release release every key and mouse button", + "mouse left|right|middle down|up|click", + "look YAW PITCH set the view direction in degrees", + "turn DYAW DPITCH rotate the view", + "tp X Y Z teleport the player", + "hotbar 1-9 select a hotbar slot", + "give ITEM [COUNT] add items to the inventory", + "render-distance N chunks, 2..64", + "time TICKS set the time of day", + "resume leave the pause menu", + "screenshot PATH write the next frame as PNG", + "stats [reset] frame-time summary since the last reset", + "bench SECONDS reset stats, wait, then reply with the summary", + "open WORLD [SEED] [creative] open or create a world from the title screen", + "save save the world", + "quit save and exit", +]; + +impl Game<'_> { + pub(super) fn poll_control(&mut self, event_loop: &ActiveEventLoop) { + if let Some((deadline, reply)) = self.pending_bench.take() { + if Instant::now() >= deadline { + let _ = reply.send(self.frame_stats.summary().to_string()); + } else { + self.pending_bench = Some((deadline, reply)); + } + } + while let Some(request) = self.control.as_ref().and_then(|c| c.try_recv()) { + let reply = match self.control_command(&request.line, &request.reply, event_loop) { + Ok(Some(value)) => value, + // Deferred: the command keeps its own reply channel. + Ok(None) => continue, + Err(e) => json!({ "error": e.to_string() }), + }; + let _ = request.reply.send(reply.to_string()); + } + } + + fn control_command( + &mut self, + line: &str, + reply: &Sender<String>, + event_loop: &ActiveEventLoop, + ) -> Result<Option<Value>> { + let words: Vec<&str> = line.split_whitespace().collect(); + let arg = |i: usize| { + words + .get(i) + .copied() + .ok_or_else(|| format!("missing argument {i} for {}", words[0])) + }; + let ok = || Ok(Some(json!({ "ok": true }))); + match words[0] { + "help" => Ok(Some(json!({ "commands": HELP }))), + "status" => Ok(Some(self.control_status())), + "key" => { + let key = key_code(arg(1)?).ok_or_else(|| format!("unknown key {}", words[1]))?; + self.require_world()?; + match arg(2)? { + "down" => self.control_key_down(key)?, + "up" => { + self.keys.remove(&key); + } + "tap" => { + self.control_key_down(key)?; + self.keys.remove(&key); + } + other => { + return Err( + format!("key action must be down, up or tap, not {other}").into() + ); + } + } + ok() + } + "release" => { + self.keys.clear(); + self.left = false; + self.right = false; + ok() + } + "mouse" => { + let button = match arg(1)? { + "left" => MouseButton::Left, + "right" => MouseButton::Right, + "middle" => MouseButton::Middle, + other => return Err(format!("unknown mouse button {other}").into()), + }; + self.require_world()?; + if self.screen != Screen::Playing { + return Err(format!( + "mouse needs the playing screen, not {}", + self.screen_name() + ) + .into()); + } + match arg(2)? { + "down" => self.play_mouse(button, true)?, + "up" => self.play_mouse(button, false)?, + "click" => { + self.play_mouse(button, true)?; + self.play_mouse(button, false)?; + } + other => { + return Err( + format!("mouse action must be down, up or click, not {other}").into(), + ); + } + } + ok() + } + "look" => { + self.yaw = arg(1)?.parse()?; + self.pitch = arg(2)?.parse::<f32>()?.clamp(-90.0, 90.0); + ok() + } + "turn" => { + self.yaw += arg(1)?.parse::<f32>()?; + self.pitch = (self.pitch + arg(2)?.parse::<f32>()?).clamp(-90.0, 90.0); + ok() + } + "tp" => { + let to = Vec3::new(arg(1)?.parse()?, arg(2)?.parse()?, arg(3)?.parse()?); + let player = self.player.as_mut().ok_or("no player yet")?; + player.position = to; + player.velocity = Vec3::new(0.0, 0.0, 0.0); + player.fall_distance = 0.0; + self.previous_position = to; + ok() + } + "hotbar" => { + let slot: usize = arg(1)?.parse()?; + if !(1..=9).contains(&slot) { + return Err("hotbar slot must be 1..9".into()); + } + self.selected = slot - 1; + ok() + } + "give" => { + self.require_world()?; + let name = arg(1)?; + let item = if name.contains(':') { + name.to_owned() + } else { + format!("minecraft:{name}") + }; + let info = self + .res + .items + .get(&item) + .ok_or_else(|| format!("unknown item {item}"))?; + let count: u32 = words.get(2).map_or(Ok(1), |c| c.parse())?; + let max = info.max_stack; + let mut given = 0; + // Stop once the inventory is full. + while given < count { + let n = (count - given).min(max); + let rest = self + .give(ItemStack { + item: item.as_str().into(), + count: n, + damage: 0, + }) + .map_or(0, |r| r.count); + given += n - rest; + if rest > 0 { + break; + } + } + Ok(Some(json!({ "ok": true, "given": given }))) + } + "render-distance" => { + let n: i32 = arg(1)?.parse()?; + if !(2..=64).contains(&n) { + return Err("render distance must be 2..64".into()); + } + self.settings.render_distance = n; + self.apply_settings(); + ok() + } + "time" => { + self.world.day_time = arg(1)?.parse()?; + ok() + } + "resume" => { + if self.screen == Screen::Paused { + self.screen = Screen::Playing; + } + ok() + } + "screenshot" => { + let renderer = self.renderer.as_mut().ok_or("no renderer yet")?; + if self.pending_screenshot.is_some() { + return Err("a screenshot is already pending".into()); + } + renderer.screenshot = Some(arg(1)?.into()); + self.pending_screenshot = Some(reply.clone()); + Ok(None) + } + "stats" => { + let summary = self.frame_stats.summary(); + if words.get(1) == Some(&"reset") { + self.frame_stats.reset(); + } + Ok(Some(summary)) + } + "bench" => { + let seconds: f64 = arg(1)?.parse()?; + if self.pending_bench.is_some() { + return Err("a benchmark is already running".into()); + } + self.frame_stats.reset(); + self.pending_bench = Some(( + Instant::now() + Duration::from_secs_f64(seconds), + reply.clone(), + )); + Ok(None) + } + "open" => { + if self.title.is_none() { + return Err("a world is already open".into()); + } + let folder = arg(1)?; + let seed = words.get(2).map(|s| s.parse::<i64>()).transpose()?; + let creative = words.get(3) == Some(&"creative"); + self.open_world(folder, Some(folder), seed, creative)?; + ok() + } + "save" => { + self.require_world()?; + self.save_game()?; + ok() + } + "quit" => { + if self.title.is_none() { + self.save_game()?; + } + event_loop.exit(); + ok() + } + other => Err(format!("unknown command {other}; try help").into()), + } + } + + fn require_world(&self) -> Result<()> { + if self.title.is_some() { + return Err("no world open; use: open WORLD [SEED] [creative]".into()); + } + Ok(()) + } + + fn control_key_down(&mut self, key: KeyCode) -> Result<()> { + if self.keys.insert(key) { + self.key_pressed(key)?; + } + Ok(()) + } + + fn screen_name(&self) -> &'static str { + if self.title.is_some() { + return "title"; + } + match self.screen { + Screen::Playing => "playing", + Screen::Paused => "paused", + Screen::Options => "options", + Screen::Inventory => "inventory", + Screen::Creative => "creative", + Screen::Dead => "dead", + } + } + + fn control_status(&self) -> Value { + let player = self.player.as_ref().map(|p| { + json!({ + "position": [p.position.x, p.position.y, p.position.z], + "velocity": [p.velocity.x, p.velocity.y, p.velocity.z], + "on_ground": p.ground.on_ground, + "health": p.health.health(), + "food": p.health.food.food, + }) + }); + let target = self.pick().map(|hit| { + let state = self.world.block(hit.pos[0], hit.pos[1], hit.pos[2]); + json!({ "pos": hit.pos, "block": &*self.res.facts.get(state).name }) + }); + let renderer = self.renderer.as_ref().map(|r| { + json!({ + "gpu": r.info.name, + "backend": format!("{:?}", r.info.backend), + "size": [r.config.width, r.config.height], + "present_mode": format!("{:?}", r.config.present_mode), + "drawn_sections": r.drawn_sections, + "uploaded_bytes": r.uploaded_bytes, + }) + }); + json!({ + "screen": self.screen_name(), + "dimension": self.dim.id(), + "creative": self.creative, + "player": player, + "yaw": self.yaw, + "pitch": self.pitch, + "target": target, + "selected": self.selected + 1, + "held": self.held().map(|s| json!({ "item": &*s.item, "count": s.count })), + "keys": self.keys.iter().map(|k| format!("{k:?}")).collect::<Vec<_>>(), + "fps": self.fps, + "frames": self.frames, + "ticks": self.ticks, + "day_time": self.world.day_time, + "render_distance": self.streaming.radius, + "chunks": self.world.chunks.len(), + "pending_chunks": self.streaming.pending(), + "generated_chunks": self.streaming.generated_total, + "meshed_sections": self.streaming.meshed_total, + "renderer": renderer, + "uptime_seconds": self.started.elapsed().as_secs_f64(), + }) + } +} + +fn key_code(name: &str) -> Option<KeyCode> { + let name = name.to_ascii_lowercase(); + let letters = [ + KeyCode::KeyA, + KeyCode::KeyB, + KeyCode::KeyC, + KeyCode::KeyD, + KeyCode::KeyE, + KeyCode::KeyF, + KeyCode::KeyG, + KeyCode::KeyH, + KeyCode::KeyI, + KeyCode::KeyJ, + KeyCode::KeyK, + KeyCode::KeyL, + KeyCode::KeyM, + KeyCode::KeyN, + KeyCode::KeyO, + KeyCode::KeyP, + KeyCode::KeyQ, + KeyCode::KeyR, + KeyCode::KeyS, + KeyCode::KeyT, + KeyCode::KeyU, + KeyCode::KeyV, + KeyCode::KeyW, + KeyCode::KeyX, + KeyCode::KeyY, + KeyCode::KeyZ, + ]; + let digits = [ + KeyCode::Digit0, + KeyCode::Digit1, + KeyCode::Digit2, + KeyCode::Digit3, + KeyCode::Digit4, + KeyCode::Digit5, + KeyCode::Digit6, + KeyCode::Digit7, + KeyCode::Digit8, + KeyCode::Digit9, + ]; + if let [c] = name.as_bytes() { + return match c { + b'a'..=b'z' => Some(letters[usize::from(c - b'a')]), + b'0'..=b'9' => Some(digits[usize::from(c - b'0')]), + _ => None, + }; + } + Some(match name.as_str() { + "space" => KeyCode::Space, + "shift" | "lshift" => KeyCode::ShiftLeft, + "ctrl" | "control" | "lctrl" => KeyCode::ControlLeft, + "esc" | "escape" => KeyCode::Escape, + "tab" => KeyCode::Tab, + "enter" | "return" => KeyCode::Enter, + "f3" => KeyCode::F3, + "left" => KeyCode::ArrowLeft, + "right" => KeyCode::ArrowRight, + "up" => KeyCode::ArrowUp, + "down" => KeyCode::ArrowDown, + _ => return None, + }) +} diff --git a/crates/horizon-client/src/gfx.rs b/crates/horizon-client/src/gfx.rs new file mode 100644 index 000000000..d40da0e31 --- /dev/null +++ b/crates/horizon-client/src/gfx.rs @@ -0,0 +1,1336 @@ +//! GPU renderer for streamed terrain sections, sky, block outline and HUD. +//! Section origins are supplied relative to the camera each frame so large +//! world coordinates keep full precision. +use crate::{ + Result, + environment::Sky, + hud::{HudBatch, HudRenderer}, + mesher::{SectionMesh, Vertex}, + sprites::SpriteAnimation, +}; +use glam::{DVec3, Mat4, Vec3, Vec4}; +use std::{collections::HashMap, path::PathBuf, sync::Arc, time::Instant}; +use wgpu::util::DeviceExt; +use winit::window::Window; + +#[repr(C)] +#[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)] +struct Globals { + view_proj: [[f32; 4]; 4], + fog_color: [f32; 4], + fog: [f32; 4], + sky_color: [f32; 4], + misc: [f32; 4], + inverse_view: [[f32; 4]; 4], + sunrise: [f32; 4], + sun: [f32; 4], +} +pub type SectionKey = (i32, i32, i32); +struct SectionGpu { + buffer: wgpu::Buffer, + solid: u32, + translucent: u32, +} +pub struct Frame<'a> { + pub camera: DVec3, + pub yaw: f32, + pub pitch: f32, + pub fov_degrees: f32, + /// GameRenderer.bobView: (walk distance, bob amount), interpolated. + pub bob: Option<(f32, f32)>, + pub sky: Sky, + /// Render distance in blocks (fog end). + pub distance: f32, + pub underwater: bool, + /// Skip sections the camera cannot see through open faces (vanilla's + /// occlusion graph; off in spectator-like views inside blocks). + pub cave_culling: bool, + /// Title screen: only the panorama (in `celestial`) and the HUD. + pub title: bool, + /// Dimensions without a skybox (the Nether) clear to the fog colour. + pub skybox: bool, + /// Environmental fog start/end (Nether 10..96), if any. + pub environment_fog: Option<(f32, f32)>, + pub water_fog: [f32; 3], + pub outline: Option<[f64; 6]>, + pub hud: &'a HudBatch, + /// Camera-relative entity geometry textured from the shared atlas. + pub entities: &'a [Vertex], + /// Camera-relative sun, moon and stars (drawn behind everything, additive). + pub celestial: &'a [Vertex], + /// First-person hand and held item, drawn after clearing depth. + pub hand: &'a [Vertex], + pub game_time: f32, + pub ticks: u64, +} +pub struct Renderer { + instance: wgpu::Instance, + surface: wgpu::Surface<'static>, + window: Arc<Window>, + pub device: wgpu::Device, + pub queue: wgpu::Queue, + pub config: wgpu::SurfaceConfiguration, + solid: wgpu::RenderPipeline, + translucent: wgpu::RenderPipeline, + sky: wgpu::RenderPipeline, + lines: wgpu::RenderPipeline, + entity_pipeline: wgpu::RenderPipeline, + celestial_pipeline: wgpu::RenderPipeline, + celestial_buffer: wgpu::Buffer, + entity_group: wgpu::BindGroup, + entity_buffer: wgpu::Buffer, + entity_capacity: u64, + group: wgpu::BindGroup, + globals: wgpu::Buffer, + lightmap: wgpu::Texture, + sprite_texture: wgpu::Texture, + mip_levels: u32, + animations: Vec<(SpriteAnimation, usize)>, + indices: wgpu::Buffer, + index_quads: u32, + instances: wgpu::Buffer, + instance_capacity: u64, + outline: wgpu::Buffer, + depth: wgpu::TextureView, + sections: HashMap<SectionKey, SectionGpu>, + /// VisGraph face connectivity per meshed section (cave culling). + visibility: HashMap<SectionKey, u64>, + reachable: std::collections::HashSet<SectionKey>, + reachable_from: Option<SectionKey>, + visibility_dirty: bool, + pub hud: HudRenderer, + pub info: wgpu::AdapterInfo, + pub suspended: bool, + pub drawn_sections: usize, + pub uploaded_bytes: u64, + started: Instant, + /// Write the next presented frame to this PNG path (control socket). + pub screenshot: Option<PathBuf>, + /// Outcome of the last screenshot: frame size, or the error. + pub screenshot_result: Option<std::result::Result<[u32; 2], String>>, +} +fn mip_chain(pixels: &[u8], size: u32, layers: u32) -> (Vec<u8>, u32) { + let levels = size.trailing_zeros() + 1; + let mut out = Vec::new(); + for layer in 0..layers as usize { + let base = &pixels[layer * (size * size * 4) as usize..(layer + 1) * (size * size * 4) as usize]; + let mut level = base.to_vec(); + let mut s = size as usize; + out.extend_from_slice(&level); + for _ in 1..levels { + let n = s / 2; + let mut next = vec![0u8; n * n * 4]; + for y in 0..n { + for x in 0..n { + let mut acc = [0u32; 4]; + let mut weight = 0u32; + for (dx, dy) in [(0, 0), (1, 0), (0, 1), (1, 1)] { + let p = &level[((y * 2 + dy) * s + x * 2 + dx) * 4..][..4]; + let a = u32::from(p[3]); + for c in 0..3 { + acc[c] += u32::from(p[c]) * a; + } + acc[3] += a; + weight += a; + } + let o = &mut next[(y * n + x) * 4..][..4]; + for c in 0..3 { + o[c] = if weight > 0 { (acc[c] / weight) as u8 } else { 0 }; + } + o[3] = (acc[3] / 4) as u8; + } + } + out.extend_from_slice(&next); + level = next; + s = n; + } + } + (out, levels) +} +impl Renderer { + pub async fn new( + window: Arc<Window>, + sprite_pixels: &[u8], + sprite_size: u32, + layers: u32, + animations: &[SpriteAnimation], + hud_atlas: (&[u8], u32, u32), + ) -> Result<Self> { + let instance = + wgpu::Instance::new(wgpu::InstanceDescriptor::new_without_display_handle_from_env()); + let surface = instance.create_surface(window.clone())?; + let adapter = instance + .request_adapter(&wgpu::RequestAdapterOptions { + power_preference: wgpu::PowerPreference::HighPerformance, + compatible_surface: Some(&surface), + force_fallback_adapter: false, + ..Default::default() + }) + .await?; + let info = adapter.get_info(); + eprintln!( + "Horizon renderer: {} ({:?}, {:?})", + info.name, info.backend, info.device_type + ); + let limits = adapter.limits(); + if limits.max_texture_array_layers < layers { + return Err(format!( + "GPU supports {} texture layers; {layers} required", + limits.max_texture_array_layers + ) + .into()); + } + let (device, queue) = adapter + .request_device(&wgpu::DeviceDescriptor { + label: Some("Horizon device"), + required_limits: limits.clone(), + ..Default::default() + }) + .await?; + let size = window.inner_size(); + let mut config = surface + .get_default_config(&adapter, size.width.max(1), size.height.max(1)) + .ok_or("surface has no supported configuration")?; + let caps = surface.get_capabilities(&adapter); + // Vanilla blends and tints in gamma space: use a non-sRGB target. + config.format = caps + .formats + .iter() + .copied() + .find(|f| !f.is_srgb()) + .unwrap_or(config.format); + config.view_formats = vec![config.format.remove_srgb_suffix()]; + // Screenshots copy the presented frame back from the swapchain. + if caps.usages.contains(wgpu::TextureUsages::COPY_SRC) { + config.usage |= wgpu::TextureUsages::COPY_SRC; + } + config.present_mode = if caps.present_modes.contains(&wgpu::PresentMode::Mailbox) { + wgpu::PresentMode::Mailbox + } else { + wgpu::PresentMode::Fifo + }; + surface.configure(&device, &config); + let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor { + label: Some("Horizon terrain"), + source: wgpu::ShaderSource::Wgsl(include_str!("terrain.wgsl").into()), + }); + let entry = |binding, visibility, ty| wgpu::BindGroupLayoutEntry { + binding, + visibility, + ty, + count: None, + }; + let vf = wgpu::ShaderStages::VERTEX_FRAGMENT; + let bindings = device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { + label: Some("Horizon terrain bindings"), + entries: &[ + entry( + 0, + vf, + wgpu::BindingType::Buffer { + ty: wgpu::BufferBindingType::Uniform, + has_dynamic_offset: false, + min_binding_size: None, + }, + ), + entry( + 1, + vf, + wgpu::BindingType::Texture { + sample_type: wgpu::TextureSampleType::Float { filterable: true }, + view_dimension: wgpu::TextureViewDimension::D2Array, + multisampled: false, + }, + ), + entry(1 + 1, vf, wgpu::BindingType::Sampler(wgpu::SamplerBindingType::Filtering)), + entry( + 3, + vf, + wgpu::BindingType::Texture { + sample_type: wgpu::TextureSampleType::Float { filterable: true }, + view_dimension: wgpu::TextureViewDimension::D2, + multisampled: false, + }, + ), + entry(4, vf, wgpu::BindingType::Sampler(wgpu::SamplerBindingType::Filtering)), + ], + }); + let layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { + label: Some("Horizon terrain layout"), + bind_group_layouts: &[Some(&bindings)], + ..Default::default() + }); + let vertex_attributes = wgpu::vertex_attr_array![0=>Float32x3,1=>Float32x2,2=>Uint32,3=>Unorm8x4,4=>Uint8x4]; + let instance_attributes = wgpu::vertex_attr_array![5=>Float32x4]; + let terrain_buffers = [ + Some(wgpu::VertexBufferLayout { + array_stride: std::mem::size_of::<Vertex>() as u64, + step_mode: wgpu::VertexStepMode::Vertex, + attributes: &vertex_attributes, + }), + Some(wgpu::VertexBufferLayout { + array_stride: 16, + step_mode: wgpu::VertexStepMode::Instance, + attributes: &instance_attributes, + }), + ]; + let line_attributes = wgpu::vertex_attr_array![0=>Float32x3]; + let line_buffers = [Some(wgpu::VertexBufferLayout { + array_stride: 12, + step_mode: wgpu::VertexStepMode::Vertex, + attributes: &line_attributes, + })]; + let alpha_blend = wgpu::BlendState::ALPHA_BLENDING; + let pipeline = |label: &str, + vertex: &str, + fragment: &str, + buffers: &[Option<wgpu::VertexBufferLayout<'_>>], + topology: wgpu::PrimitiveTopology, + cull: Option<wgpu::Face>, + depth_write: bool, + depth_test: bool, + blend: Option<wgpu::BlendState>| { + device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + label: Some(label), + layout: Some(&layout), + vertex: wgpu::VertexState { + module: &shader, + entry_point: Some(vertex), + compilation_options: Default::default(), + buffers, + }, + primitive: wgpu::PrimitiveState { + topology, + cull_mode: cull, + ..Default::default() + }, + depth_stencil: Some(wgpu::DepthStencilState { + format: wgpu::TextureFormat::Depth32Float, + depth_write_enabled: Some(depth_write), + depth_compare: Some(if depth_test { + wgpu::CompareFunction::LessEqual + } else { + wgpu::CompareFunction::Always + }), + stencil: Default::default(), + bias: Default::default(), + }), + multisample: Default::default(), + fragment: Some(wgpu::FragmentState { + module: &shader, + entry_point: Some(fragment), + compilation_options: Default::default(), + targets: &[Some(wgpu::ColorTargetState { + format: config.format.remove_srgb_suffix(), + blend, + write_mask: wgpu::ColorWrites::ALL, + })], + }), + multiview_mask: None, + cache: None, + }) + }; + let tri = wgpu::PrimitiveTopology::TriangleList; + let solid = pipeline( + "Terrain solid", + "vs_terrain", + "fs_solid", + &terrain_buffers, + tri, + Some(wgpu::Face::Back), + true, + true, + None, + ); + let translucent = pipeline( + "Terrain translucent", + "vs_terrain", + "fs_translucent", + &terrain_buffers, + tri, + Some(wgpu::Face::Back), + false, + true, + Some(alpha_blend), + ); + let sky = pipeline("Sky", "vs_sky", "fs_sky", &[], tri, None, false, false, None); + let lines = pipeline( + "Block outline", + "vs_line", + "fs_line", + &line_buffers, + wgpu::PrimitiveTopology::LineList, + None, + false, + true, + Some(alpha_blend), + ); + let globals = device.create_buffer(&wgpu::BufferDescriptor { + label: Some("Horizon globals"), + size: std::mem::size_of::<Globals>() as u64, + usage: wgpu::BufferUsages::UNIFORM | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); + let (mips, mip_levels) = mip_chain(sprite_pixels, sprite_size, layers); + let sprite_texture = device.create_texture_with_data( + &queue, + &wgpu::TextureDescriptor { + label: Some("Block sprites"), + size: wgpu::Extent3d { + width: sprite_size, + height: sprite_size, + depth_or_array_layers: layers, + }, + mip_level_count: mip_levels, + sample_count: 1, + dimension: wgpu::TextureDimension::D2, + format: wgpu::TextureFormat::Rgba8Unorm, + usage: wgpu::TextureUsages::TEXTURE_BINDING | wgpu::TextureUsages::COPY_DST, + view_formats: &[], + }, + wgpu::util::TextureDataOrder::LayerMajor, + &mips, + ); + let sprite_view = sprite_texture.create_view(&wgpu::TextureViewDescriptor { + dimension: Some(wgpu::TextureViewDimension::D2Array), + ..Default::default() + }); + let sprite_sampler = device.create_sampler(&wgpu::SamplerDescriptor { + label: Some("Block sprites"), + address_mode_u: wgpu::AddressMode::Repeat, + address_mode_v: wgpu::AddressMode::Repeat, + mag_filter: wgpu::FilterMode::Nearest, + min_filter: wgpu::FilterMode::Nearest, + mipmap_filter: wgpu::MipmapFilterMode::Nearest, + ..Default::default() + }); + let lightmap = device.create_texture(&wgpu::TextureDescriptor { + label: Some("Lightmap"), + size: wgpu::Extent3d { + width: 16, + height: 16, + depth_or_array_layers: 1, + }, + mip_level_count: 1, + sample_count: 1, + dimension: wgpu::TextureDimension::D2, + format: wgpu::TextureFormat::Rgba8Unorm, + usage: wgpu::TextureUsages::TEXTURE_BINDING | wgpu::TextureUsages::COPY_DST, + view_formats: &[], + }); + let lightmap_view = lightmap.create_view(&Default::default()); + let lightmap_sampler = device.create_sampler(&wgpu::SamplerDescriptor { + label: Some("Lightmap"), + mag_filter: wgpu::FilterMode::Linear, + min_filter: wgpu::FilterMode::Linear, + ..Default::default() + }); + let group = device.create_bind_group(&wgpu::BindGroupDescriptor { + label: Some("Horizon terrain resources"), + layout: &bindings, + entries: &[ + wgpu::BindGroupEntry { + binding: 0, + resource: globals.as_entire_binding(), + }, + wgpu::BindGroupEntry { + binding: 1, + resource: wgpu::BindingResource::TextureView(&sprite_view), + }, + wgpu::BindGroupEntry { + binding: 2, + resource: wgpu::BindingResource::Sampler(&sprite_sampler), + }, + wgpu::BindGroupEntry { + binding: 3, + resource: wgpu::BindingResource::TextureView(&lightmap_view), + }, + wgpu::BindGroupEntry { + binding: 4, + resource: wgpu::BindingResource::Sampler(&lightmap_sampler), + }, + ], + }); + let index_quads = 1 << 16; + let indices = Self::quad_indices(&device, index_quads); + let instance_capacity = 4096; + let instances = device.create_buffer(&wgpu::BufferDescriptor { + label: Some("Section origins"), + size: instance_capacity * 16, + usage: wgpu::BufferUsages::VERTEX | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); + let outline = device.create_buffer(&wgpu::BufferDescriptor { + label: Some("Outline"), + size: 24 * 12, + usage: wgpu::BufferUsages::VERTEX | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); + let depth = Self::depth(&device, &config); + let (atlas_pixels, atlas_width, atlas_height) = hud_atlas; + let atlas = device.create_texture_with_data( + &queue, + &wgpu::TextureDescriptor { + label: Some("Shared atlas"), + size: wgpu::Extent3d { + width: atlas_width, + height: atlas_height, + depth_or_array_layers: 1, + }, + mip_level_count: 1, + sample_count: 1, + dimension: wgpu::TextureDimension::D2, + format: wgpu::TextureFormat::Rgba8Unorm, + usage: wgpu::TextureUsages::TEXTURE_BINDING | wgpu::TextureUsages::COPY_DST, + view_formats: &[], + }, + wgpu::util::TextureDataOrder::LayerMajor, + atlas_pixels, + ); + let atlas_view = atlas.create_view(&Default::default()); + let hud = HudRenderer::new(&device, config.format.remove_srgb_suffix(), &atlas_view)?; + let entity_shader = device.create_shader_module(wgpu::ShaderModuleDescriptor { + label: Some("Horizon entities"), + source: wgpu::ShaderSource::Wgsl(include_str!("entity.wgsl").into()), + }); + let entity_bindings = device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { + label: Some("Entity bindings"), + entries: &[ + entry( + 0, + vf, + wgpu::BindingType::Buffer { + ty: wgpu::BufferBindingType::Uniform, + has_dynamic_offset: false, + min_binding_size: None, + }, + ), + entry( + 1, + vf, + wgpu::BindingType::Texture { + sample_type: wgpu::TextureSampleType::Float { filterable: true }, + view_dimension: wgpu::TextureViewDimension::D2, + multisampled: false, + }, + ), + entry(2, vf, wgpu::BindingType::Sampler(wgpu::SamplerBindingType::Filtering)), + entry( + 3, + vf, + wgpu::BindingType::Texture { + sample_type: wgpu::TextureSampleType::Float { filterable: true }, + view_dimension: wgpu::TextureViewDimension::D2, + multisampled: false, + }, + ), + entry(4, vf, wgpu::BindingType::Sampler(wgpu::SamplerBindingType::Filtering)), + ], + }); + let atlas_sampler = device.create_sampler(&wgpu::SamplerDescriptor { + label: Some("Atlas"), + ..Default::default() + }); + let entity_group = device.create_bind_group(&wgpu::BindGroupDescriptor { + label: Some("Entity resources"), + layout: &entity_bindings, + entries: &[ + wgpu::BindGroupEntry { + binding: 0, + resource: globals.as_entire_binding(), + }, + wgpu::BindGroupEntry { + binding: 1, + resource: wgpu::BindingResource::TextureView(&atlas_view), + }, + wgpu::BindGroupEntry { + binding: 2, + resource: wgpu::BindingResource::Sampler(&atlas_sampler), + }, + wgpu::BindGroupEntry { + binding: 3, + resource: wgpu::BindingResource::TextureView(&lightmap_view), + }, + wgpu::BindGroupEntry { + binding: 4, + resource: wgpu::BindingResource::Sampler(&lightmap_sampler), + }, + ], + }); + let entity_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { + label: Some("Entity layout"), + bind_group_layouts: &[Some(&entity_bindings)], + ..Default::default() + }); + let entity_vertex = [Some(wgpu::VertexBufferLayout { + array_stride: std::mem::size_of::<Vertex>() as u64, + step_mode: wgpu::VertexStepMode::Vertex, + attributes: &vertex_attributes, + })]; + let entity_pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + label: Some("Entities"), + layout: Some(&entity_layout), + vertex: wgpu::VertexState { + module: &entity_shader, + entry_point: Some("vs_entity"), + compilation_options: Default::default(), + buffers: &entity_vertex, + }, + primitive: wgpu::PrimitiveState { + cull_mode: None, + ..Default::default() + }, + depth_stencil: Some(wgpu::DepthStencilState { + format: wgpu::TextureFormat::Depth32Float, + depth_write_enabled: Some(true), + depth_compare: Some(wgpu::CompareFunction::LessEqual), + stencil: Default::default(), + bias: Default::default(), + }), + multisample: Default::default(), + fragment: Some(wgpu::FragmentState { + module: &entity_shader, + entry_point: Some("fs_entity"), + compilation_options: Default::default(), + targets: &[Some(wgpu::ColorTargetState { + format: config.format.remove_srgb_suffix(), + blend: Some(alpha_blend), + write_mask: wgpu::ColorWrites::ALL, + })], + }), + multiview_mask: None, + cache: None, + }); + let celestial_pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + label: Some("Celestial bodies"), + layout: Some(&entity_layout), + vertex: wgpu::VertexState { + module: &entity_shader, + entry_point: Some("vs_entity"), + compilation_options: Default::default(), + buffers: &entity_vertex, + }, + primitive: wgpu::PrimitiveState { + cull_mode: None, + ..Default::default() + }, + depth_stencil: Some(wgpu::DepthStencilState { + format: wgpu::TextureFormat::Depth32Float, + depth_write_enabled: Some(false), + depth_compare: Some(wgpu::CompareFunction::Always), + stencil: Default::default(), + bias: Default::default(), + }), + multisample: Default::default(), + fragment: Some(wgpu::FragmentState { + module: &entity_shader, + entry_point: Some("fs_celestial"), + compilation_options: Default::default(), + targets: &[Some(wgpu::ColorTargetState { + format: config.format.remove_srgb_suffix(), + // RenderPipelines.CELESTIAL: additive (src alpha, one). + blend: Some(wgpu::BlendState { + color: wgpu::BlendComponent { + src_factor: wgpu::BlendFactor::SrcAlpha, + dst_factor: wgpu::BlendFactor::One, + operation: wgpu::BlendOperation::Add, + }, + alpha: wgpu::BlendComponent::OVER, + }), + write_mask: wgpu::ColorWrites::ALL, + })], + }), + multiview_mask: None, + cache: None, + }); + let celestial_buffer = device.create_buffer(&wgpu::BufferDescriptor { + label: Some("Celestial vertices"), + size: 2048 * 4 * std::mem::size_of::<Vertex>() as u64, + usage: wgpu::BufferUsages::VERTEX | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); + let entity_capacity = 1 << 14; + let entity_buffer = device.create_buffer(&wgpu::BufferDescriptor { + label: Some("Entity vertices"), + size: entity_capacity * std::mem::size_of::<Vertex>() as u64, + usage: wgpu::BufferUsages::VERTEX | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); + Ok(Self { + instance, + surface, + window, + device, + queue, + config, + solid, + translucent, + sky, + lines, + entity_pipeline, + celestial_pipeline, + celestial_buffer, + entity_group, + entity_buffer, + entity_capacity, + group, + globals, + lightmap, + sprite_texture, + mip_levels, + animations: animations.iter().map(|a| (a.clone(), usize::MAX)).collect(), + indices, + index_quads, + instances, + instance_capacity, + outline, + depth, + sections: HashMap::new(), + visibility: HashMap::new(), + reachable: std::collections::HashSet::new(), + reachable_from: None, + visibility_dirty: true, + hud, + info, + suspended: size.width == 0 || size.height == 0, + drawn_sections: 0, + uploaded_bytes: 0, + started: Instant::now(), + screenshot: None, + screenshot_result: None, + }) + } + fn quad_indices(device: &wgpu::Device, quads: u32) -> wgpu::Buffer { + let indices: Vec<u32> = (0..quads) + .flat_map(|q| { + let b = q * 4; + [b, b + 1, b + 2, b, b + 2, b + 3] + }) + .collect(); + device.create_buffer_init(&wgpu::util::BufferInitDescriptor { + label: Some("Quad indices"), + contents: bytemuck::cast_slice(&indices), + usage: wgpu::BufferUsages::INDEX, + }) + } + fn depth(device: &wgpu::Device, config: &wgpu::SurfaceConfiguration) -> wgpu::TextureView { + device + .create_texture(&wgpu::TextureDescriptor { + label: Some("Horizon depth"), + size: wgpu::Extent3d { + width: config.width, + height: config.height, + depth_or_array_layers: 1, + }, + mip_level_count: 1, + sample_count: 1, + dimension: wgpu::TextureDimension::D2, + format: wgpu::TextureFormat::Depth32Float, + usage: wgpu::TextureUsages::RENDER_ATTACHMENT, + view_formats: &[], + }) + .create_view(&Default::default()) + } + pub fn resize(&mut self, width: u32, height: u32) { + self.suspended = width == 0 || height == 0; + if self.suspended { + return; + } + self.config.width = width; + self.config.height = height; + self.surface.configure(&self.device, &self.config); + self.depth = Self::depth(&self.device, &self.config); + } + pub fn section_count(&self) -> usize { + self.sections.len() + } + pub fn upload(&mut self, key: SectionKey, mesh: &SectionMesh) { + if self.visibility.insert(key, mesh.visibility) != Some(mesh.visibility) { + self.visibility_dirty = true; + } + let solid = (mesh.solid.len() / 4) as u32; + let translucent = (mesh.translucent.len() / 4) as u32; + if solid + translucent == 0 { + self.sections.remove(&key); + return; + } + let max = solid.max(translucent); + if max > self.index_quads { + self.index_quads = max.next_power_of_two(); + self.indices = Self::quad_indices(&self.device, self.index_quads); + } + let mut data = Vec::with_capacity(mesh.solid.len() + mesh.translucent.len()); + data.extend_from_slice(&mesh.solid); + data.extend_from_slice(&mesh.translucent); + let bytes: &[u8] = bytemuck::cast_slice(&data); + self.uploaded_bytes += bytes.len() as u64; + let buffer = self + .device + .create_buffer_init(&wgpu::util::BufferInitDescriptor { + label: Some("Section mesh"), + contents: bytes, + usage: wgpu::BufferUsages::VERTEX, + }); + self.sections.insert( + key, + SectionGpu { + buffer, + solid, + translucent, + }, + ); + } + pub fn clear_sections(&mut self) { + self.sections.clear(); + self.visibility.clear(); + self.visibility_dirty = true; + } + /// SectionOcclusionGraph: breadth-first from the camera section through + /// faces its VisGraph connects, never stepping back towards the camera. + fn update_reachable(&mut self, from: SectionKey, radius: i32) { + const STEPS: [(i32, i32, i32); 6] = [(0, -1, 0), (0, 1, 0), (0, 0, -1), (0, 0, 1), (-1, 0, 0), (1, 0, 0)]; + let opposite = |d: usize| d ^ 1; + self.reachable.clear(); + let mut queue = std::collections::VecDeque::new(); + // (section, entered face, directions travelled) + queue.push_back((from, None::<usize>, 0u8)); + self.reachable.insert(from); + let sections = (crate::chunk::HEIGHT / 16) as i32; + while let Some((key, entered, travelled)) = queue.pop_front() { + let vis = self.visibility.get(&key).copied().unwrap_or(crate::mesher::ALL_VISIBLE); + for (d, step) in STEPS.iter().enumerate() { + if travelled & (1 << opposite(d)) != 0 { + continue; + } + if let Some(e) = entered + && vis & (1 << (e * 6 + d)) == 0 + { + continue; + } + let next = (key.0 + step.0, key.1 + step.1, key.2 + step.2); + if next.1 < -1 || next.1 > sections || (next.0 - from.0).abs() > radius || (next.2 - from.2).abs() > radius { + continue; + } + if self.reachable.insert(next) { + queue.push_back((next, Some(opposite(d)), travelled | (1 << d))); + } + } + } + self.reachable_from = Some(from); + self.visibility_dirty = false; + } + pub fn remove(&mut self, key: SectionKey) { + self.visibility.remove(&key); + self.visibility_dirty = true; + self.sections.remove(&key); + } + pub fn view_projection(&self, frame: &Frame) -> Mat4 { + let aspect = self.config.width as f32 / self.config.height.max(1) as f32; + let (yaw, pitch) = (frame.yaw.to_radians(), frame.pitch.to_radians()); + // Minecraft yaw: 0 = +Z (south), 90 = -X (west); pitch positive looks down. + let forward = Vec3::new(-yaw.sin() * pitch.cos(), -pitch.sin(), yaw.cos() * pitch.cos()); + let far = (frame.distance * 4.0).max(1024.0); + let bob = frame.bob.map_or(Mat4::IDENTITY, |(walk, bob)| { + let f = -walk * std::f32::consts::PI; + Mat4::from_translation(Vec3::new(f.sin() * bob * 0.5, -(f.cos() * bob).abs(), 0.0)) + * Mat4::from_rotation_z((f.sin() * bob * 3.0).to_radians()) + * Mat4::from_rotation_x(((f - 0.2).cos() * bob).abs().mul_add(5.0, 0.0).to_radians()) + }); + Mat4::perspective_rh(frame.fov_degrees.to_radians(), aspect, 0.05, far) + * bob + * Mat4::look_to_rh(Vec3::ZERO, forward, Vec3::Y) + } + fn update_lightmap(&self, sky: &Sky, darkness: f32, gamma: f32) { + // lightmap.fsh: per (block, sky) level. + let brightness = |level: f32| level / (4.0 - 3.0 * level); + let mut pixels = [0u8; 16 * 16 * 4]; + for s in 0..16 { + for b in 0..16 { + let block_level = b as f32 / 15.0; + let sky_level = s as f32 / 15.0; + let block_brightness = brightness(block_level) * 1.4; + let sky_brightness = brightness(sky_level) * sky.sky_light_factor; + let mut color = Vec3::from(sky.ambient_light_color); + color += Vec3::from(sky.sky_light_color) * sky_brightness; + let parabolic = (2.0 * block_level - 1.0).powi(2); + let block_color = Vec3::from(sky.block_light_tint).lerp(Vec3::ONE, 0.9 * parabolic); + color += block_color * block_brightness; + color -= Vec3::splat(darkness); + color = color.clamp(Vec3::ZERO, Vec3::ONE); + let max = color.max_element().max(1e-6); + let inverted = 1.0 - max; + let scaled = 1.0 - inverted.powi(4); + let not_gamma = color * (scaled / max); + color = color.lerp(not_gamma, gamma); + let i = (s * 16 + b) * 4; + pixels[i] = (color.x * 255.0) as u8; + pixels[i + 1] = (color.y * 255.0) as u8; + pixels[i + 2] = (color.z * 255.0) as u8; + pixels[i + 3] = 255; + } + } + self.queue.write_texture( + wgpu::TexelCopyTextureInfo { + texture: &self.lightmap, + mip_level: 0, + origin: wgpu::Origin3d::ZERO, + aspect: wgpu::TextureAspect::All, + }, + &pixels, + wgpu::TexelCopyBufferLayout { + offset: 0, + bytes_per_row: Some(64), + rows_per_image: Some(16), + }, + wgpu::Extent3d { + width: 16, + height: 16, + depth_or_array_layers: 1, + }, + ); + } + fn animate(&mut self, tick: u64) { + for (animation, previous) in &mut self.animations { + let frame = animation.frame(tick); + if frame == *previous { + continue; + } + *previous = frame; + let (mips, levels) = mip_chain(animation.pixels(frame), 16, 1); + let mut offset = 0; + for level in 0..levels.min(self.mip_levels) { + let size = 16 >> level; + let bytes = (size * size * 4) as usize; + self.queue.write_texture( + wgpu::TexelCopyTextureInfo { + texture: &self.sprite_texture, + mip_level: level, + origin: wgpu::Origin3d { + x: 0, + y: 0, + z: animation.layer, + }, + aspect: wgpu::TextureAspect::All, + }, + &mips[offset..offset + bytes], + wgpu::TexelCopyBufferLayout { + offset: 0, + bytes_per_row: Some(size * 4), + rows_per_image: Some(size), + }, + wgpu::Extent3d { + width: size, + height: size, + depth_or_array_layers: 1, + }, + ); + offset += bytes; + } + } + } + pub fn render(&mut self, frame: &Frame) -> Result<bool> { + if self.suspended { + return Ok(false); + } + let (surface_frame, reconfigure) = match self.surface.get_current_texture() { + wgpu::CurrentSurfaceTexture::Success(f) => (f, false), + wgpu::CurrentSurfaceTexture::Suboptimal(f) => (f, true), + wgpu::CurrentSurfaceTexture::Timeout | wgpu::CurrentSurfaceTexture::Occluded => { + return Ok(false); + } + wgpu::CurrentSurfaceTexture::Outdated => { + self.surface.configure(&self.device, &self.config); + return Ok(false); + } + wgpu::CurrentSurfaceTexture::Lost => { + self.surface = self.instance.create_surface(self.window.clone())?; + self.surface.configure(&self.device, &self.config); + return Ok(false); + } + wgpu::CurrentSurfaceTexture::Validation => { + return Err("surface acquisition failed validation".into()); + } + }; + self.animate(frame.ticks); + self.update_lightmap(&frame.sky, 0.0, 0.5); + let view_proj = self.view_projection(frame); + let aspect = self.config.width as f32 / self.config.height.max(1) as f32; + let (yaw, pitch) = (frame.yaw.to_radians(), frame.pitch.to_radians()); + let forward = Vec3::new(-yaw.sin() * pitch.cos(), -pitch.sin(), yaw.cos() * pitch.cos()); + let view = Mat4::look_to_rh(Vec3::ZERO, forward, Vec3::Y); + let sun_angle = frame.sky.sun_angle.to_radians(); + // Celestial bodies rotate around the X axis; angle 0 = noon. + let sun = Vec3::new(0.0, sun_angle.cos(), -sun_angle.sin()); + let (fog_color, fog) = if frame.underwater { + ( + [frame.water_fog[0], frame.water_fog[1], frame.water_fog[2], 1.0], + [-8.0, 96.0, -8.0, 96.0], + ) + } else { + let d = frame.distance; + ( + [frame.sky.fog_color[0], frame.sky.fog_color[1], frame.sky.fog_color[2], 1.0], + // FogRenderer: render-distance fog starts at max(d - 16, 0)... d. + { + let (start, end) = frame.environment_fog.unwrap_or((f32::MAX, f32::MAX)); + [start, end, (d - d.min(64.0) * 0.25).max(0.0), d] + }, + ) + }; + let globals = Globals { + view_proj: view_proj.to_cols_array_2d(), + fog_color, + fog, + sky_color: [frame.sky.sky_color[0], frame.sky.sky_color[1], frame.sky.sky_color[2], 1.0], + misc: [ + 1.0 - frame.sky.sky_light_factor, + frame.game_time, + aspect, + (frame.fov_degrees.to_radians() / 2.0).tan(), + ], + inverse_view: view.inverse().to_cols_array_2d(), + sunrise: frame.sky.sunrise_color, + sun: [sun.x, sun.y, sun.z, frame.sky.star_brightness], + }; + self.queue + .write_buffer(&self.globals, 0, bytemuck::bytes_of(&globals)); + // Frustum culling and camera-relative origins. + let planes = frustum(view_proj); + let camera = frame.camera; + let camera_section = ( + (camera.x.floor() as i32) >> 4, + (camera.y.floor() as i32 - crate::chunk::MIN_Y) >> 4, + (camera.z.floor() as i32) >> 4, + ); + let culling = !frame.title && frame.cave_culling; + if culling && (self.visibility_dirty || self.reachable_from != Some(camera_section)) { + let radius = (frame.distance / 16.0) as i32 + 2; + self.update_reachable(camera_section, radius); + } + let reachable = &self.reachable; + let mut visible: Vec<(SectionKey, f64, [f32; 3])> = self + .sections + .keys() + .filter(|k| !culling || reachable.contains(k)) + .filter_map(|&(sx, sy, sz)| { + let origin = DVec3::new( + f64::from(sx * 16), + f64::from(crate::chunk::MIN_Y + sy * 16), + f64::from(sz * 16), + ) - camera; + let center = origin + DVec3::splat(8.0); + let horizontal = (center.x * center.x + center.z * center.z).sqrt(); + if horizontal > f64::from(frame.distance) + 24.0 { + return None; + } + let min = origin.as_vec3(); + let max = min + Vec3::splat(16.0); + if planes.iter().any(|p| { + let v = Vec3::new( + if p.x >= 0.0 { max.x } else { min.x }, + if p.y >= 0.0 { max.y } else { min.y }, + if p.z >= 0.0 { max.z } else { min.z }, + ); + p.truncate().dot(v) + p.w < 0.0 + }) { + return None; + } + Some(((sx, sy, sz), center.length_squared(), origin.as_vec3().to_array())) + }) + .collect(); + visible.sort_by(|a, b| a.1.total_cmp(&b.1)); + self.drawn_sections = visible.len(); + if visible.len() as u64 > self.instance_capacity { + self.instance_capacity = (visible.len() as u64).next_power_of_two(); + self.instances = self.device.create_buffer(&wgpu::BufferDescriptor { + label: Some("Section origins"), + size: self.instance_capacity * 16, + usage: wgpu::BufferUsages::VERTEX | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); + } + let origins: Vec<[f32; 4]> = visible + .iter() + .map(|(_, _, o)| [o[0], o[1], o[2], 0.0]) + .collect(); + if !origins.is_empty() { + self.queue + .write_buffer(&self.instances, 0, bytemuck::cast_slice(&origins)); + } + if let Some(b) = frame.outline { + let o = [ + (b[0] - camera.x) as f32 - 0.002, + (b[1] - camera.y) as f32 - 0.002, + (b[2] - camera.z) as f32 - 0.002, + ]; + let e = [ + (b[3] - camera.x) as f32 + 0.002, + (b[4] - camera.y) as f32 + 0.002, + (b[5] - camera.z) as f32 + 0.002, + ]; + let c = |i: usize| -> [f32; 3] { + [ + if i & 1 == 0 { o[0] } else { e[0] }, + if i & 2 == 0 { o[1] } else { e[1] }, + if i & 4 == 0 { o[2] } else { e[2] }, + ] + }; + let edges = [ + (0, 1), (2, 3), (4, 5), (6, 7), (0, 2), (1, 3), (4, 6), (5, 7), (0, 4), (1, 5), (2, 6), (3, 7), + ]; + let lines: Vec<[f32; 3]> = edges.iter().flat_map(|&(a, b)| [c(a), c(b)]).collect(); + self.queue + .write_buffer(&self.outline, 0, bytemuck::cast_slice(&lines)); + } + let mut combined; + let all_entities: &[Vertex] = if frame.hand.is_empty() { + frame.entities + } else { + combined = Vec::with_capacity(frame.entities.len() + frame.hand.len()); + combined.extend_from_slice(frame.entities); + combined.extend_from_slice(frame.hand); + &combined + }; + let hand_quads = (frame.hand.len() / 4) as u32; + let entity_vertices = all_entities.len() as u64; + if entity_vertices > self.entity_capacity { + self.entity_capacity = entity_vertices.next_power_of_two(); + self.entity_buffer = self.device.create_buffer(&wgpu::BufferDescriptor { + label: Some("Entity vertices"), + size: self.entity_capacity * std::mem::size_of::<Vertex>() as u64, + usage: wgpu::BufferUsages::VERTEX | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); + } + if entity_vertices > 0 { + self.queue + .write_buffer(&self.entity_buffer, 0, bytemuck::cast_slice(all_entities)); + } + let celestial_vertices = frame.celestial.len().min(2048 * 4); + if celestial_vertices > 0 { + self.queue.write_buffer( + &self.celestial_buffer, + 0, + bytemuck::cast_slice(&frame.celestial[..celestial_vertices]), + ); + } + let entity_quads = (entity_vertices / 4) as u32 - hand_quads; + if entity_quads + hand_quads > self.index_quads { + self.index_quads = (entity_quads + hand_quads).next_power_of_two(); + self.indices = Self::quad_indices(&self.device, self.index_quads); + } + let view_target = surface_frame.texture.create_view(&wgpu::TextureViewDescriptor { + format: Some(self.config.format.remove_srgb_suffix()), + ..Default::default() + }); + let mut encoder = self + .device + .create_command_encoder(&wgpu::CommandEncoderDescriptor { + label: Some("Horizon frame"), + }); + { + let attachments = [Some(wgpu::RenderPassColorAttachment { + view: &view_target, + resolve_target: None, + depth_slice: None, + ops: wgpu::Operations { + load: wgpu::LoadOp::Clear(if frame.title { + wgpu::Color::BLACK + } else { + wgpu::Color { + r: f64::from(fog_color[0]), + g: f64::from(fog_color[1]), + b: f64::from(fog_color[2]), + a: 1.0, + } + }), + store: wgpu::StoreOp::Store, + }, + })]; + let mut pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + label: Some("Horizon world"), + color_attachments: &attachments, + depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment { + view: &self.depth, + depth_ops: Some(wgpu::Operations { + load: wgpu::LoadOp::Clear(1.0), + store: wgpu::StoreOp::Discard, + }), + stencil_ops: None, + }), + ..Default::default() + }); + pass.set_bind_group(0, &self.group, &[]); + if !frame.underwater && frame.skybox { + if !frame.title { + pass.set_pipeline(&self.sky); + pass.draw(0..3, 0..1); + } + if celestial_vertices > 0 { + pass.set_pipeline(&self.celestial_pipeline); + pass.set_bind_group(0, &self.entity_group, &[]); + pass.set_index_buffer(self.indices.slice(..), wgpu::IndexFormat::Uint32); + pass.set_vertex_buffer(0, self.celestial_buffer.slice(..)); + pass.draw_indexed(0..(celestial_vertices as u32 / 4) * 6, 0, 0..1); + pass.set_bind_group(0, &self.group, &[]); + } + } + if frame.title { + visible.clear(); + } + pass.set_pipeline(&self.solid); + pass.set_index_buffer(self.indices.slice(..), wgpu::IndexFormat::Uint32); + pass.set_vertex_buffer(1, self.instances.slice(..)); + for (i, (key, _, _)) in visible.iter().enumerate() { + let s = &self.sections[key]; + if s.solid == 0 { + continue; + } + pass.set_vertex_buffer(0, s.buffer.slice(..)); + pass.draw_indexed(0..s.solid * 6, 0, i as u32..i as u32 + 1); + } + if entity_quads > 0 { + pass.set_pipeline(&self.entity_pipeline); + pass.set_bind_group(0, &self.entity_group, &[]); + pass.set_vertex_buffer(0, self.entity_buffer.slice(..)); + pass.draw_indexed(0..entity_quads * 6, 0, 0..1); + pass.set_bind_group(0, &self.group, &[]); + } + if frame.outline.is_some() { + pass.set_pipeline(&self.lines); + pass.set_vertex_buffer(0, self.outline.slice(..)); + pass.draw(0..24, 0..1); + } + pass.set_pipeline(&self.translucent); + pass.set_vertex_buffer(1, self.instances.slice(..)); + for (i, (key, _, _)) in visible.iter().enumerate().rev() { + let s = &self.sections[key]; + if s.translucent == 0 { + continue; + } + pass.set_vertex_buffer(0, s.buffer.slice(..)); + pass.draw_indexed( + 0..s.translucent * 6, + (s.solid * 4) as i32, + i as u32..i as u32 + 1, + ); + } + } + if hand_quads > 0 { + let attachments = [Some(wgpu::RenderPassColorAttachment { + view: &view_target, + resolve_target: None, + depth_slice: None, + ops: wgpu::Operations { + load: wgpu::LoadOp::Load, + store: wgpu::StoreOp::Store, + }, + })]; + let mut pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + label: Some("First-person hand"), + color_attachments: &attachments, + depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment { + view: &self.depth, + depth_ops: Some(wgpu::Operations { + load: wgpu::LoadOp::Clear(1.0), + store: wgpu::StoreOp::Discard, + }), + stencil_ops: None, + }), + ..Default::default() + }); + pass.set_pipeline(&self.entity_pipeline); + pass.set_bind_group(0, &self.entity_group, &[]); + pass.set_index_buffer(self.indices.slice(..), wgpu::IndexFormat::Uint32); + pass.set_vertex_buffer(0, self.entity_buffer.slice(..)); + pass.draw_indexed(0..hand_quads * 6, (entity_quads * 4) as i32, 0..1); + } + self.hud.draw( + &self.device, + &self.queue, + &mut encoder, + &view_target, + frame.hud, + [self.config.width, self.config.height], + ); + let readback = self.screenshot.take().map(|path| (path, self.copy_frame(&mut encoder, &surface_frame.texture))); + self.queue.submit([encoder.finish()]); + if let Some((path, buffer)) = readback { + self.screenshot_result = Some(self.write_screenshot(&path, &buffer).map_err(|e| e.to_string())); + } + self.window.pre_present_notify(); + self.queue.present(surface_frame); + if reconfigure { + self.surface.configure(&self.device, &self.config); + } + let _ = self.started; + Ok(true) + } +} +impl Renderer { + fn padded_row(&self) -> u32 { + (self.config.width * 4).next_multiple_of(wgpu::COPY_BYTES_PER_ROW_ALIGNMENT) + } + fn copy_frame(&self, encoder: &mut wgpu::CommandEncoder, texture: &wgpu::Texture) -> wgpu::Buffer { + let buffer = self.device.create_buffer(&wgpu::BufferDescriptor { + label: Some("Horizon screenshot"), + size: u64::from(self.padded_row()) * u64::from(self.config.height), + usage: wgpu::BufferUsages::COPY_DST | wgpu::BufferUsages::MAP_READ, + mapped_at_creation: false, + }); + encoder.copy_texture_to_buffer( + texture.as_image_copy(), + wgpu::TexelCopyBufferInfo { + buffer: &buffer, + layout: wgpu::TexelCopyBufferLayout { + offset: 0, + bytes_per_row: Some(self.padded_row()), + rows_per_image: None, + }, + }, + wgpu::Extent3d { width: self.config.width, height: self.config.height, depth_or_array_layers: 1 }, + ); + buffer + } + fn write_screenshot(&self, path: &std::path::Path, buffer: &wgpu::Buffer) -> Result<[u32; 2]> { + if !self.config.usage.contains(wgpu::TextureUsages::COPY_SRC) { + return Err("this surface does not support frame readback".into()); + } + let (sender, receiver) = std::sync::mpsc::channel(); + buffer.map_async(wgpu::MapMode::Read, .., move |r| { + let _ = sender.send(r); + }); + self.device.poll(wgpu::PollType::wait_indefinitely()).map_err(|e| e.to_string())?; + receiver.recv().map_err(|e| e.to_string())?.map_err(|e| e.to_string())?; + let (width, height, row) = (self.config.width, self.config.height, self.padded_row() as usize); + let bgra = matches!(self.config.format.remove_srgb_suffix(), wgpu::TextureFormat::Bgra8Unorm); + let mut pixels = Vec::with_capacity((width * height * 4) as usize); + { + let data = buffer.get_mapped_range(..).map_err(|e| e.to_string())?; + for y in 0..height as usize { + for px in data[y * row..y * row + width as usize * 4].as_chunks::<4>().0 { + let (r, b) = if bgra { (px[2], px[0]) } else { (px[0], px[2]) }; + pixels.extend_from_slice(&[r, px[1], b, 255]); + } + } + } + buffer.unmap(); + let mut encoder = png::Encoder::new(std::io::BufWriter::new(std::fs::File::create(path)?), width, height); + encoder.set_color(png::ColorType::Rgba); + encoder.set_depth(png::BitDepth::Eight); + encoder.write_header()?.write_image_data(&pixels)?; + Ok([width, height]) + } +} +fn frustum(m: Mat4) -> [Vec4; 6] { + let r = |i| m.row(i); + let planes = [ + r(3) + r(0), + r(3) - r(0), + r(3) + r(1), + r(3) - r(1), + r(2), + r(3) - r(2), + ]; + planes.map(|p| p / p.truncate().length()) +} diff --git a/crates/horizon-client/src/health.rs b/crates/horizon-client/src/health.rs new file mode 100644 index 000000000..fedb8db09 --- /dev/null +++ b/crates/horizon-client/src/health.rs @@ -0,0 +1,555 @@ +//! Stored player health and empty-equipment server damage for the resident scene. +//! World/audio/network consumers are queued explicitly; full death and tick +//! lifecycles (drops, respawn, effects) remain separate work. +use crate::{ + Result, + motion::{MotionEvent, PlayerMotion}, +}; +use horizon_world::{ + attributes::live::LiveAttributes, + block_landing::LandingDamage, + combat_rules::ArmorWorld, + damage_immunity::{self, DamageRule, ImmunityTag, ImmunityWorld}, + damage_reduction::Bypass, + damage_source::{Catalog, DamageSource, DamageTypeId, Scaling}, + food::{Difficulty, FoodData}, + living_damage::DamageStat, + living_hurt::{HurtState, HurtTag, HurtWorld}, + player_health::{PlayerAttributeHealth, PlayerFloatIds}, + player_hurt::{CausingEntity, PlayerHurtWorld, ServerPlayerHurtWorld}, + server_player_combat::{CombatEnvironment, ServerPlayerCombat}, + server_player_damage::ServerDamageEnvironment, + synced_floats::{FloatValue, Observer, SyncedFloats}, +}; +use std::{fs, io, path::Path}; +pub(crate) type Attributes = LiveAttributes<Box<dyn FnMut() -> i32>>; +pub(crate) type State = HurtState<DamageTypeId>; + +#[derive(Clone, Copy, Debug)] +pub struct HealthRules { + pub difficulty: Difficulty, + pub natural_regeneration: bool, +} +impl Default for HealthRules { + fn default() -> Self { + Self { + difficulty: Difficulty::Normal, + natural_regeneration: true, + } + } +} +pub struct HealthResources { + pub damage: Catalog, + pub ids: PlayerFloatIds, +} +impl HealthResources { + pub fn load(root: &Path) -> Result<Self> { + let read = |name: &str| -> Result<serde_json::Value> { + Ok(serde_json::from_slice(&fs::read(root.join(name))?)?) + }; + let ids = read("player-float-ids.json")?; + let id = |name: &str| -> Result<u8> { + Ok(u8::try_from( + ids[name].as_u64().ok_or("missing player float ID")?, + )?) + }; + let damage = Catalog::from_json(&read("damage-catalog.json")?, &read("damage-tags.json")?)?; + for name in ["minecraft:fall", "minecraft:stalagmite", "minecraft:starve"] { + if damage.id(name).is_none() { + return Err(format!("missing damage type {name}").into()); + } + } + Ok(Self { + damage, + ids: PlayerFloatIds { + health: id("health")?, + absorption: id("absorption")?, + }, + }) + } + pub fn landing_source(&self, source: LandingDamage) -> DamageTypeId { + self.damage + .id(match source { + LandingDamage::Fall => "minecraft:fall", + LandingDamage::Stalagmite => "minecraft:stalagmite", + }) + .expect("validated landing source") + } +} +#[derive(Clone, Copy, Debug)] +pub enum HealthEvent { + StarvationDamage(f32), + Updated { + id: u8, + value: f32, + dirty: bool, + }, + Statistic { + name: &'static str, + amount: i32, + }, + RecordedDamage { + source: DamageTypeId, + amount: f32, + }, + Phase(&'static str), + Criterion { + original: f32, + amount: f32, + blocked: bool, + }, +} +impl HealthEvent { + pub fn trace(self) -> String { + match self { + Self::StarvationDamage(amount) => format!("damage starve {:08x}", amount.to_bits()), + Self::Updated { id, value, dirty } => { + format!("updated {id} {:08x} {dirty}", value.to_bits()) + } + Self::Statistic { name, amount } => format!("health-stat {name} {amount}"), + Self::RecordedDamage { amount, .. } => { + format!("record-damage {:08x}", amount.to_bits()) + } + Self::Phase(name) => name.into(), + Self::Criterion { .. } => "hurt-criterion".into(), + } + } +} +pub(crate) struct Updates<'a>(pub(crate) &'a mut Vec<MotionEvent>); +impl Observer for Updates<'_> { + type Error = io::Error; + fn updated(&mut self, data: &mut SyncedFloats, id: u8) -> io::Result<()> { + self.0.push(MotionEvent::Health(HealthEvent::Updated { + id, + value: data.get(id).expect("existing updated field"), + dirty: data.is_dirty(), + })); + Ok(()) + } +} +pub struct PlayerHealth { + pub data: SyncedFloats, + pub ids: PlayerFloatIds, + pub food: FoodData, + pub hurt: State, + pub dead: bool, + pub sync_velocity: bool, + pub game_time: i64, + pub tick_count: i32, +} +impl PlayerHealth { + pub fn new(resources: &HealthResources, attributes: &mut Attributes) -> Result<Self> { + let ids = resources.ids; + let mut data = SyncedFloats::new(&[ + FloatValue { + id: ids.health, + value: 1.0, + }, + FloatValue { + id: ids.absorption, + value: 0.0, + }, + ])?; + let mut ignored = Vec::new(); + let mut observer = Updates(&mut ignored); + let maximum = attributes + .key("minecraft:max_health") + .ok_or("missing max health")?; + let maximum = attributes + .value( + Some(maximum), + horizon_world::attribute_map::ValueKind::Computed, + ) + .map_err(|e| io::Error::other(format!("health attribute: {e:?}")))? + as f32; + PlayerAttributeHealth::new(attributes, &mut data, ids, false, &mut observer)? + .set_health(maximum)?; + Ok(Self { + data, + ids, + food: FoodData::default(), + hurt: HurtState { + no_action_time: 0, + cooldown: 0, + last_hurt: 0.0, + hurt_duration: 0, + hurt_time: 0, + last_source: None, + last_stamp: 0, + }, + dead: false, + sync_velocity: false, + game_time: 0, + tick_count: 0, + }) + } + pub fn health(&self) -> f32 { + self.data + .get(self.ids.health) + .expect("validated health field") + } + pub fn absorption(&self) -> f32 { + self.data + .get(self.ids.absorption) + .expect("validated absorption field") + } + pub fn dead_or_dying(&self) -> bool { + self.health() <= 0.0 || self.dead + } + /// The damage-clock phases of ServerPlayer.tick and LivingEntity.baseTick. + /// The complete enclosing ticks, including death removal, are not yet bound. + pub fn advance_clock(&mut self) { + self.game_time = self.game_time.wrapping_add(1); + self.tick_count = self.tick_count.wrapping_add(1); + if self.hurt.cooldown > 0 { + self.hurt.cooldown -= 1; + } + if self.hurt.hurt_time > 0 { + self.hurt.hurt_time -= 1; + } + } +} +impl PlayerMotion { + pub fn hurt( + &mut self, + resources: &HealthResources, + rules: HealthRules, + source: DamageTypeId, + amount: f32, + ) -> Result<bool> { + let source = resources + .damage + .source::<()>(source, None, None, None) + .ok_or("unknown resident damage source")?; + let h = &mut self.health; + let mut environment = Environment { + rules, + source, + events: &mut self.events, + dead: &mut h.dead, + sync_velocity: &mut h.sync_velocity, + game_time: h.game_time, + }; + Ok(ServerPlayerCombat::new( + &mut self.attributes, + &mut h.data, + &mut h.food, + h.ids, + &mut environment, + )? + .hurt(&mut h.hurt, amount)?) + } + pub fn set_health(&mut self, value: f32, absorption: bool) -> Result<()> { + let h = &mut self.health; + let mut observer = Updates(&mut self.events); + let mut binding = PlayerAttributeHealth::new( + &mut self.attributes, + &mut h.data, + h.ids, + h.dead, + &mut observer, + )?; + if absorption { + binding.set_absorption(value)?; + } else { + binding.set_health(value)?; + } + Ok(()) + } +} +pub(crate) struct Environment<'a> { + pub(crate) rules: HealthRules, + pub(crate) source: DamageSource<'a, ()>, + pub(crate) events: &'a mut Vec<MotionEvent>, + pub(crate) dead: &'a mut bool, + pub(crate) sync_velocity: &'a mut bool, + pub(crate) game_time: i64, +} +impl Environment<'_> { + fn event(&mut self, event: HealthEvent) { + self.events.push(MotionEvent::Health(event)); + } + fn phase(&mut self, name: &'static str) -> io::Result<()> { + self.event(HealthEvent::Phase(name)); + Ok(()) + } + fn stat(&mut self, name: &'static str, amount: i32) -> io::Result<()> { + self.event(HealthEvent::Statistic { name, amount }); + Ok(()) + } +} +impl Observer for Environment<'_> { + type Error = io::Error; + fn updated(&mut self, data: &mut SyncedFloats, id: u8) -> io::Result<()> { + Updates(self.events).updated(data, id) + } +} +impl ArmorWorld for Environment<'_> { + type Error = io::Error; + type Weapon = (); + type ServerLevel = (); + fn weapon(&mut self) -> io::Result<Option<()>> { + Ok(None) + } + fn server_level(&mut self) -> io::Result<Option<()>> { + Ok(Some(())) + } + fn modify_armor_effectiveness(&mut self, _: (), _: (), value: f32) -> io::Result<f32> { + Ok(value) + } +} +impl ServerDamageEnvironment<Attributes> for Environment<'_> { + type Attacker = (); + fn invulnerable(&mut self) -> io::Result<bool> { + damage_immunity::server_player_immunity(self) + } + fn bypasses(&mut self, kind: Bypass) -> io::Result<bool> { + Ok(self.source.bypasses(kind)) + } + fn hurt_armor(&mut self, _: &mut Attributes, _: f32) -> io::Result<()> { + Ok(()) + } // empty equipment + fn has_resistance(&mut self) -> io::Result<bool> { + Ok(false) + } + fn resistance_amplifier(&mut self) -> io::Result<i32> { + Err(io::Error::other("no resistance effect")) + } + fn award_resisted(&mut self, value: i32) -> io::Result<()> { + self.stat("resisted", value) + } + fn attacker(&mut self) -> io::Result<Option<()>> { + Ok(None) + } + fn award_dealt_resisted(&mut self, _: i32) -> io::Result<()> { + Err(io::Error::other("no damage attacker")) + } + fn damage_protection(&mut self, _: ()) -> io::Result<f32> { + Ok(0.0) + } // empty equipment + fn award_self(&mut self, stat: DamageStat, value: i32) -> io::Result<()> { + self.stat( + match stat { + DamageStat::Absorbed => "absorbed", + DamageStat::Taken => "taken", + DamageStat::DealtAbsorbed => return Err(io::Error::other("attacker statistic")), + }, + value, + ) + } + fn award_attacker(&mut self, _: (), _: DamageStat, _: i32) -> io::Result<()> { + Err(io::Error::other("no damage attacker")) + } + fn source_food_exhaustion(&mut self) -> io::Result<f32> { + Ok(self.source.definition().exhaustion) + } + fn ability_invulnerable(&self) -> bool { + false + } + fn level_is_client(&mut self) -> io::Result<bool> { + Ok(false) + } + fn record_damage(&mut self, amount: f32) -> io::Result<()> { + self.event(HealthEvent::RecordedDamage { + source: self.source.type_id(), + amount, + }); + Ok(()) + } + fn damage_event(&mut self) -> io::Result<()> { + self.phase("entity-damage") + } +} +impl CombatEnvironment<Attributes> for Environment<'_> { + fn dead_flag(&self) -> bool { + *self.dead + } +} +impl ImmunityWorld for Environment<'_> { + type Error = io::Error; + fn removed(&self) -> bool { + false + } + fn permanently_invulnerable(&mut self) -> io::Result<bool> { + Ok(false) + } + fn temporarily_invulnerable(&mut self) -> io::Result<bool> { + Ok(false) + } + fn tag(&mut self, tag: ImmunityTag) -> io::Result<bool> { + Ok(self.source.immunity_tag(tag)) + } + fn creative_source(&mut self) -> io::Result<bool> { + Ok(false) + } + fn fire_immune(&mut self) -> io::Result<bool> { + Ok(false) + } + fn fall_immune(&mut self) -> io::Result<bool> { + Ok(false) + } + fn enchantment_immunity(&mut self) -> io::Result<bool> { + Ok(false) + } + fn damage_rule(&mut self, _: DamageRule) -> io::Result<bool> { + Ok(true) + } + fn changing_dimension(&mut self) -> io::Result<bool> { + Ok(false) + } + fn ender_pearl(&mut self) -> io::Result<bool> { + Ok(self.source.is_type("minecraft:ender_pearl")) + } + fn client_loaded(&mut self) -> io::Result<bool> { + Ok(true) + } +} +impl HurtWorld for Environment<'_> { + type Error = io::Error; + type Source = DamageTypeId; + type UseItem = (); + type Blocking = (); + type Sound = (); + fn source(&self) -> DamageTypeId { + self.source.type_id() + } + fn is_server_player(&self) -> bool { + true + } + fn invulnerable(&mut self, _: &mut State) -> io::Result<bool> { + damage_immunity::server_player_immunity(self) + } + fn dead_or_dying(&mut self, _: &mut State) -> io::Result<bool> { + Err(io::Error::other("combat binding supplies health predicate")) + } + fn tag(&mut self, _: &mut State, tag: HurtTag) -> io::Result<bool> { + Ok(self.source.hurt_tag(tag)) + } + fn fire_resistance(&mut self, _: &mut State) -> io::Result<bool> { + Ok(false) + } + fn sleeping(&mut self, _: &mut State) -> io::Result<bool> { + Ok(false) + } + fn stop_sleeping(&mut self, _: &mut State) -> io::Result<()> { + Ok(()) + } + fn use_item(&mut self, _: &mut State) -> io::Result<()> { + Ok(()) + } + fn apply_blocking(&mut self, _: &mut State, _: f32) -> io::Result<f32> { + Ok(0.0) + } + fn freeze_hurts_extra(&mut self, _: &mut State) -> io::Result<bool> { + Ok(false) + } + fn helmet_empty(&mut self, _: &mut State) -> io::Result<bool> { + Ok(true) + } + fn hurt_helmet(&mut self, _: &mut State, _: f32) -> io::Result<()> { + Ok(()) + } + fn actually_hurt(&mut self, _: &mut State, _: f32) -> io::Result<()> { + Err(io::Error::other("combat binding supplies inner damage")) + } + fn resolve_mob(&mut self, _: &mut State) -> io::Result<()> { + Ok(()) + } + fn resolve_player(&mut self, _: &mut State) -> io::Result<()> { + Ok(()) + } + fn blocking_component(&mut self, _: ()) -> Option<()> { + None + } + fn on_blocked(&mut self, _: &mut State, _: ()) -> io::Result<()> { + Ok(()) + } + fn broadcast_damage(&mut self, _: &mut State) -> io::Result<()> { + self.phase("broadcast-damage") + } + fn mark_hurt(&mut self, _: &mut State) -> io::Result<()> { + *self.sync_velocity = true; + Ok(()) + } + fn knockback(&mut self, _: &mut State, _: f32, _: bool) -> io::Result<()> { + Ok(()) + } // no entity or position on these sources + fn death_protection(&mut self, _: &mut State) -> io::Result<bool> { + Ok(false) + } // empty hands + fn death_sound(&mut self, _: &mut State) -> io::Result<()> { + Ok(()) + } + fn make_sound(&mut self, _: &mut State, _: ()) -> io::Result<()> { + self.phase("death-sound") + } + fn secondary_sound(&mut self, _: &mut State) -> io::Result<()> { + if self.source.definition().effects == "thorns" { + self.phase("thorns-sound")?; + } + Ok(()) + } + fn die(&mut self, _: &mut State) -> io::Result<()> { + *self.dead = true; + self.phase("death-request") + } + fn hurt_sound(&mut self, _: &mut State) -> io::Result<()> { + self.phase("hurt-sound") + } + fn game_time(&mut self, _: &mut State) -> io::Result<i64> { + Ok(self.game_time) + } + fn effects_on_hurt(&mut self, _: &mut State, _: f32) -> io::Result<()> { + Ok(()) + } + fn player_hurt_criterion( + &mut self, + _: &mut State, + original: f32, + amount: f32, + blocked: bool, + ) -> io::Result<()> { + self.event(HealthEvent::Criterion { + original, + amount, + blocked, + }); + Ok(()) + } + fn award_blocked(&mut self, _: &mut State, amount: i32) -> io::Result<()> { + self.stat("blocked", amount) + } + fn attacker_criterion(&mut self, _: &mut State, _: f32, _: f32, _: bool) -> io::Result<()> { + Ok(()) + } +} +impl PlayerHurtWorld for Environment<'_> { + fn ability_invulnerable(&self) -> bool { + false + } + fn bypasses_invulnerability(&mut self, _: &mut State) -> io::Result<bool> { + Ok(self.source.in_tag("minecraft:bypasses_invulnerability")) + } + fn remove_shoulders(&mut self, _: &mut State) -> io::Result<()> { + Ok(()) + } + fn scales_with_difficulty(&mut self, _: &mut State) -> io::Result<bool> { + Ok(self.source.definition().scaling == Scaling::Always) + } // no causing entity + fn difficulty(&mut self, _: &mut State) -> io::Result<Difficulty> { + Ok(self.rules.difficulty) + } +} +impl ServerPlayerHurtWorld for Environment<'_> { + type Player = (); + type Arrow = (); + fn causing_entity(&mut self, _: &mut State) -> io::Result<CausingEntity<(), ()>> { + Ok(CausingEntity::Other) + } + fn arrow_player_owner(&mut self, _: &mut State, _: ()) -> io::Result<Option<()>> { + Ok(None) + } + fn can_harm_player(&mut self, _: &mut State, _: ()) -> io::Result<bool> { + Ok(true) + } +} diff --git a/crates/horizon-client/src/hud.rs b/crates/horizon-client/src/hud.rs new file mode 100644 index 000000000..fa6a0f20e --- /dev/null +++ b/crates/horizon-client/src/hud.rs @@ -0,0 +1,524 @@ +//! 2D overlay: one atlas holding GUI sprites, the bitmap font, item and block +//! textures, and a batch of textured quads in GUI pixels (vanilla's automatic +//! GUI scale is applied when drawing). +use crate::Result; +use std::{ + collections::HashMap, + fs, + path::{Path, PathBuf}, +}; +use wgpu::util::DeviceExt; + +#[derive(Clone, Copy, Debug)] +pub struct Rect { + pub u0: f32, + pub v0: f32, + pub u1: f32, + pub v1: f32, + pub w: u32, + pub h: u32, +} +#[derive(Clone, Copy)] +struct Glyph { + rect: Rect, + advance: f32, +} +pub struct HudAtlas { + pub pixels: Vec<u8>, + pub width: u32, + pub height: u32, + pub sprites: HashMap<String, Rect>, + glyphs: HashMap<char, Glyph>, + white: Rect, +} +pub fn decode(path: &Path) -> Result<(u32, u32, Vec<u8>)> { + let mut decoder = png::Decoder::new(std::io::BufReader::new(fs::File::open(path)?)); + decoder.set_transformations(png::Transformations::EXPAND | png::Transformations::STRIP_16); + let mut reader = decoder.read_info()?; + let mut bytes = vec![0; reader.output_buffer_size().ok_or("image too large")?]; + let info = reader.next_frame(&mut bytes)?; + let channels = info.color_type.samples(); + let mut rgba = Vec::with_capacity((info.width * info.height * 4) as usize); + for p in bytes[..info.buffer_size()].chunks_exact(channels) { + rgba.extend(match channels { + 4 => [p[0], p[1], p[2], p[3]], + 3 => [p[0], p[1], p[2], 255], + 2 => [p[0], p[0], p[0], p[1]], + _ => [p[0], p[0], p[0], 255], + }); + } + Ok((info.width, info.height, rgba)) +} +fn walk(dir: &Path, out: &mut Vec<PathBuf>) { + let Ok(entries) = fs::read_dir(dir) else { return }; + for entry in entries.flatten() { + let path = entry.path(); + if path.is_dir() { + walk(&path, out); + } else if path.extension().is_some_and(|e| e == "png") { + out.push(path); + } + } +} +impl HudAtlas { + pub fn build(root: &Path) -> Result<Self> { + let textures = root.join("assets/minecraft/textures"); + let mut files = Vec::new(); + walk(&textures.join("gui"), &mut files); + walk(&textures.join("item"), &mut files); + walk(&textures.join("block"), &mut files); + walk(&textures.join("font"), &mut files); + walk(&textures.join("environment"), &mut files); + walk(&textures.join("misc"), &mut files); + walk(&textures.join("entity"), &mut files); + walk(&textures.join("particle"), &mut files); + files.retain(|p| { + let s = p.to_string_lossy(); + (!s.contains("title/background") || s.contains("panorama_")) && !s.contains("realms") && !s.contains("presets") + }); + let decode_one = |path: &PathBuf| -> Option<(String, u32, u32, Vec<u8>)> { + let name = path + .strip_prefix(&textures) + .ok()? + .with_extension("") + .to_string_lossy() + .replace('\\', "/"); + let (w, mut h, pixels) = decode(path).ok()?; + let is_frame_strip = (name.starts_with("block/") || name.starts_with("item/")) && h > w; + let pixels = if is_frame_strip { + h = w; + pixels[..(w * w * 4) as usize].to_vec() + } else { + pixels + }; + // Title panorama faces are downsampled to 256 for the shared atlas. + if name.contains("panorama_") && w >= 512 && w == h { + let step = (w / 256) as usize; + let mut small = Vec::with_capacity(256 * 256 * 4); + for y in 0..256usize { + for x in 0..256usize { + let i = ((y * step) * w as usize + x * step) * 4; + small.extend_from_slice(&pixels[i..i + 4]); + } + } + return Some((name, 256, 256, small)); + } + (w <= 1024 && h <= 512).then_some((name, w, h, pixels)) + }; + let threads = std::thread::available_parallelism().map_or(2, |n| n.get()); + let chunk = files.len().div_ceil(threads).max(1); + let mut images: Vec<_> = std::thread::scope(|scope| { + let handles: Vec<_> = files + .chunks(chunk) + .map(|part| scope.spawn(move || part.iter().filter_map(decode_one).collect::<Vec<_>>())) + .collect(); + handles.into_iter().flat_map(|h| h.join().unwrap_or_default()).collect() + }); + images.push(("horizon/white".into(), 4, 4, vec![255; 64])); + images.sort_by(|a, b| b.2.cmp(&a.2).then(b.1.cmp(&a.1))); + let width = 4096u32; + let mut placements = Vec::with_capacity(images.len()); + let (mut x, mut y, mut row) = (0u32, 0u32, 0u32); + for (_, w, h, _) in &images { + if x + w + 1 > width { + x = 0; + y += row + 1; + row = 0; + } + placements.push((x, y)); + x += w + 1; + row = row.max(*h); + } + let height = (y + row + 1).next_power_of_two(); + let mut pixels = vec![0u8; (width * height * 4) as usize]; + let mut sprites = HashMap::new(); + for ((name, w, h, data), (px, py)) in images.iter().zip(placements) { + for row in 0..*h { + let src = &data[(row * w * 4) as usize..((row + 1) * w * 4) as usize]; + let dst = (((py + row) * width + px) * 4) as usize; + pixels[dst..dst + (w * 4) as usize].copy_from_slice(src); + } + sprites.insert( + name.clone(), + Rect { + u0: px as f32 / width as f32, + v0: py as f32 / height as f32, + u1: (px + w) as f32 / width as f32, + v1: (py + h) as f32 / height as f32, + w: *w, + h: *h, + }, + ); + } + let white = sprites["horizon/white"]; + let mut atlas = Self { + pixels, + width, + height, + sprites, + glyphs: HashMap::new(), + white, + }; + atlas.load_font(root)?; + Ok(atlas) + } + fn load_font(&mut self, root: &Path) -> Result<()> { + let text = fs::read_to_string(root.join("assets/minecraft/font/include/default.json"))?; + let value: serde_json::Value = serde_json::from_str(&text)?; + for provider in value["providers"].as_array().into_iter().flatten() { + if provider["type"] != "bitmap" { + continue; + } + let file = provider["file"].as_str().unwrap_or(""); + let name = file + .trim_start_matches("minecraft:") + .trim_end_matches(".png") + .to_owned(); + let Some(rect) = self.sprites.get(&name).copied() else { + continue; + }; + let rows: Vec<Vec<char>> = provider["chars"] + .as_array() + .into_iter() + .flatten() + .filter_map(|r| r.as_str().map(|s| s.chars().collect())) + .collect(); + if rows.is_empty() { + continue; + } + let columns = rows[0].len() as u32; + let cell_w = rect.w / columns; + let cell_h = rect.h / rows.len() as u32; + let height = provider["height"].as_f64().unwrap_or(8.0) as f32; + let scale = height / cell_h as f32; + let (ax, ay) = ( + (rect.u0 * self.width as f32) as u32, + (rect.v0 * self.height as f32) as u32, + ); + for (r, row) in rows.iter().enumerate() { + for (c, ch) in row.iter().enumerate() { + if *ch == '\0' || self.glyphs.contains_key(ch) { + continue; + } + let (cx, cy) = (ax + c as u32 * cell_w, ay + r as u32 * cell_h); + // Glyph width: rightmost column containing an opaque pixel. + let mut used = 0; + for x in (0..cell_w).rev() { + if (0..cell_h).any(|y| { + self.pixels[(((cy + y) * self.width + cx + x) * 4 + 3) as usize] != 0 + }) { + used = x + 1; + break; + } + } + self.glyphs.insert( + *ch, + Glyph { + rect: Rect { + u0: cx as f32 / self.width as f32, + v0: cy as f32 / self.height as f32, + u1: (cx + cell_w) as f32 / self.width as f32, + v1: (cy + cell_h) as f32 / self.height as f32, + w: cell_w, + h: cell_h, + }, + advance: (used as f32 * scale + 0.5).floor() + 1.0, + }, + ); + } + } + } + self.glyphs.insert( + ' ', + Glyph { + rect: self.white, + advance: 4.0, + }, + ); + Ok(()) + } +} +#[repr(C)] +#[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)] +pub struct HudVertex { + pub pos: [f32; 2], + pub uv: [f32; 2], + pub color: u32, +} +/// The GUI Scale option (0 = auto). +pub static GUI_SCALE: std::sync::atomic::AtomicU32 = std::sync::atomic::AtomicU32::new(0); +/// One frame of overlay geometry in GUI pixels. +pub struct HudBatch { + pub vertices: Vec<HudVertex>, + pub scale: f32, + pub width: f32, + pub height: f32, +} +pub fn rgba(r: u8, g: u8, b: u8, a: u8) -> u32 { + u32::from(a) << 24 | u32::from(b) << 16 | u32::from(g) << 8 | u32::from(r) +} +impl HudBatch { + /// Window.calculateScale: the largest scale keeping >= 320x240 GUI pixels, + /// capped by the GUI Scale option (0 = auto). + pub fn new(window: [u32; 2]) -> Self { + let limit = GUI_SCALE.load(std::sync::atomic::Ordering::Relaxed); + let mut scale = 1; + while (limit == 0 || scale < limit) && window[0] / (scale + 1) >= 320 && window[1] / (scale + 1) >= 240 { + scale += 1; + } + Self { + vertices: Vec::new(), + scale: scale as f32, + width: (window[0] as f32 / scale as f32).ceil(), + height: (window[1] as f32 / scale as f32).ceil(), + } + } + pub fn quad(&mut self, p: [[f32; 2]; 4], uv: [[f32; 2]; 4], color: u32) { + for i in [0, 1, 2, 0, 2, 3] { + self.vertices.push(HudVertex { + pos: p[i], + uv: uv[i], + color, + }); + } + } + pub fn rect_uv(&mut self, x: f32, y: f32, w: f32, h: f32, r: Rect, color: u32) { + self.quad( + [[x, y], [x + w, y], [x + w, y + h], [x, y + h]], + [[r.u0, r.v0], [r.u1, r.v0], [r.u1, r.v1], [r.u0, r.v1]], + color, + ); + } + pub fn sprite(&mut self, atlas: &HudAtlas, name: &str, x: f32, y: f32) { + if let Some(r) = atlas.sprites.get(name).copied() { + self.rect_uv(x, y, r.w as f32, r.h as f32, r, u32::MAX); + } + } + pub fn sprite_scaled(&mut self, atlas: &HudAtlas, name: &str, x: f32, y: f32, w: f32, h: f32, color: u32) { + if let Some(r) = atlas.sprites.get(name).copied() { + self.rect_uv(x, y, w, h, r, color); + } + } + /// Draw part of a sprite, `fraction` of its width from the left. + pub fn sprite_part(&mut self, atlas: &HudAtlas, name: &str, x: f32, y: f32, fraction: f32) { + if let Some(mut r) = atlas.sprites.get(name).copied() { + let w = r.w as f32 * fraction; + r.u1 = r.u0 + (r.u1 - r.u0) * fraction; + self.rect_uv(x, y, w, r.h as f32, r, u32::MAX); + } + } + pub fn fill(&mut self, atlas: &HudAtlas, x: f32, y: f32, w: f32, h: f32, color: u32) { + let mut r = atlas.white; + let (cu, cv) = ((r.u0 + r.u1) / 2.0, (r.v0 + r.v1) / 2.0); + r.u0 = cu; + r.u1 = cu; + r.v0 = cv; + r.v1 = cv; + self.rect_uv(x, y, w, h, r, color); + } + pub fn text_width(atlas: &HudAtlas, text: &str) -> f32 { + text.chars() + .map(|c| atlas.glyphs.get(&c).map_or(6.0, |g| g.advance)) + .sum() + } + pub fn text(&mut self, atlas: &HudAtlas, text: &str, x: f32, y: f32, color: u32, shadow: bool) -> f32 { + if shadow { + let c = color.to_le_bytes(); + let dark = rgba(c[0] / 4, c[1] / 4, c[2] / 4, c[3]); + self.text(atlas, text, x + 1.0, y + 1.0, dark, false); + } + let mut cursor = x; + for ch in text.chars() { + let Some(g) = atlas.glyphs.get(&ch).copied() else { + cursor += 6.0; + continue; + }; + if ch != ' ' { + self.rect_uv(cursor, y, 8.0, 8.0, g.rect, color); + } + cursor += g.advance; + } + cursor - x + } +} +#[repr(C)] +#[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)] +struct HudUniform { + size: [f32; 4], +} +pub struct HudRenderer { + pipeline: wgpu::RenderPipeline, + group: wgpu::BindGroup, + uniform: wgpu::Buffer, + buffer: wgpu::Buffer, + capacity: u64, +} +impl HudRenderer { + pub fn new( + device: &wgpu::Device, + format: wgpu::TextureFormat, + view: &wgpu::TextureView, + ) -> Result<Self> { + let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor { + label: Some("Horizon HUD"), + source: wgpu::ShaderSource::Wgsl(include_str!("hud.wgsl").into()), + }); + + let sampler = device.create_sampler(&wgpu::SamplerDescriptor { + label: Some("HUD"), + ..Default::default() + }); + let uniform = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { + label: Some("HUD size"), + contents: bytemuck::bytes_of(&HudUniform { size: [1.0; 4] }), + usage: wgpu::BufferUsages::UNIFORM | wgpu::BufferUsages::COPY_DST, + }); + let layout = device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { + label: Some("HUD bindings"), + entries: &[ + wgpu::BindGroupLayoutEntry { + binding: 0, + visibility: wgpu::ShaderStages::VERTEX, + ty: wgpu::BindingType::Buffer { + ty: wgpu::BufferBindingType::Uniform, + has_dynamic_offset: false, + min_binding_size: None, + }, + count: None, + }, + wgpu::BindGroupLayoutEntry { + binding: 1, + visibility: wgpu::ShaderStages::FRAGMENT, + ty: wgpu::BindingType::Texture { + sample_type: wgpu::TextureSampleType::Float { filterable: true }, + view_dimension: wgpu::TextureViewDimension::D2, + multisampled: false, + }, + count: None, + }, + wgpu::BindGroupLayoutEntry { + binding: 2, + visibility: wgpu::ShaderStages::FRAGMENT, + ty: wgpu::BindingType::Sampler(wgpu::SamplerBindingType::Filtering), + count: None, + }, + ], + }); + let group = device.create_bind_group(&wgpu::BindGroupDescriptor { + label: Some("HUD resources"), + layout: &layout, + entries: &[ + wgpu::BindGroupEntry { + binding: 0, + resource: uniform.as_entire_binding(), + }, + wgpu::BindGroupEntry { + binding: 1, + resource: wgpu::BindingResource::TextureView(view), + }, + wgpu::BindGroupEntry { + binding: 2, + resource: wgpu::BindingResource::Sampler(&sampler), + }, + ], + }); + let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { + label: Some("HUD layout"), + bind_group_layouts: &[Some(&layout)], + ..Default::default() + }); + let attributes = wgpu::vertex_attr_array![0=>Float32x2,1=>Float32x2,2=>Unorm8x4]; + let pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + label: Some("HUD"), + layout: Some(&pipeline_layout), + vertex: wgpu::VertexState { + module: &shader, + entry_point: Some("vs_main"), + compilation_options: Default::default(), + buffers: &[Some(wgpu::VertexBufferLayout { + array_stride: std::mem::size_of::<HudVertex>() as u64, + step_mode: wgpu::VertexStepMode::Vertex, + attributes: &attributes, + })], + }, + primitive: Default::default(), + depth_stencil: None, + multisample: Default::default(), + fragment: Some(wgpu::FragmentState { + module: &shader, + entry_point: Some("fs_main"), + compilation_options: Default::default(), + targets: &[Some(wgpu::ColorTargetState { + format, + blend: Some(wgpu::BlendState::ALPHA_BLENDING), + write_mask: wgpu::ColorWrites::ALL, + })], + }), + multiview_mask: None, + cache: None, + }); + let capacity = 1 << 16; + let buffer = device.create_buffer(&wgpu::BufferDescriptor { + label: Some("HUD vertices"), + size: capacity * std::mem::size_of::<HudVertex>() as u64, + usage: wgpu::BufferUsages::VERTEX | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); + Ok(Self { + pipeline, + group, + uniform, + buffer, + capacity, + }) + } + pub fn draw( + &mut self, + device: &wgpu::Device, + queue: &wgpu::Queue, + encoder: &mut wgpu::CommandEncoder, + target: &wgpu::TextureView, + batch: &HudBatch, + size: [u32; 2], + ) { + if batch.vertices.is_empty() { + return; + } + let count = batch.vertices.len() as u64; + if count > self.capacity { + self.capacity = count.next_power_of_two(); + self.buffer = device.create_buffer(&wgpu::BufferDescriptor { + label: Some("HUD vertices"), + size: self.capacity * std::mem::size_of::<HudVertex>() as u64, + usage: wgpu::BufferUsages::VERTEX | wgpu::BufferUsages::COPY_DST, + mapped_at_creation: false, + }); + } + queue.write_buffer(&self.buffer, 0, bytemuck::cast_slice(&batch.vertices)); + queue.write_buffer( + &self.uniform, + 0, + bytemuck::bytes_of(&HudUniform { + size: [size[0] as f32, size[1] as f32, batch.scale, 0.0], + }), + ); + let attachments = [Some(wgpu::RenderPassColorAttachment { + view: target, + resolve_target: None, + depth_slice: None, + ops: wgpu::Operations { + load: wgpu::LoadOp::Load, + store: wgpu::StoreOp::Store, + }, + })]; + let mut pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + label: Some("HUD"), + color_attachments: &attachments, + ..Default::default() + }); + pass.set_pipeline(&self.pipeline); + pass.set_bind_group(0, &self.group, &[]); + pass.set_vertex_buffer(0, self.buffer.slice(..)); + pass.draw(0..count as u32, 0..1); + } +} diff --git a/crates/horizon-client/src/hud.wgsl b/crates/horizon-client/src/hud.wgsl new file mode 100644 index 000000000..d455db179 --- /dev/null +++ b/crates/horizon-client/src/hud.wgsl @@ -0,0 +1,22 @@ +struct Hud { size: vec4<f32> } +@group(0) @binding(0) var<uniform> hud: Hud; +@group(0) @binding(1) var atlas: texture_2d<f32>; +@group(0) @binding(2) var atlas_sampler: sampler; +struct Out { + @builtin(position) clip: vec4<f32>, + @location(0) uv: vec2<f32>, + @location(1) color: vec4<f32>, +} +@vertex fn vs_main(@location(0) pos: vec2<f32>, @location(1) uv: vec2<f32>, @location(2) color: vec4<f32>) -> Out { + let pixels = pos * hud.size.z; + var out: Out; + out.clip = vec4(pixels.x / hud.size.x * 2.0 - 1.0, 1.0 - pixels.y / hud.size.y * 2.0, 0.0, 1.0); + out.uv = uv; + out.color = color; + return out; +} +@fragment fn fs_main(in: Out) -> @location(0) vec4<f32> { + let c = textureSample(atlas, atlas_sampler, in.uv) * in.color; + if c.a < 0.004 { discard; } + return c; +} diff --git a/crates/horizon-client/src/hunger.rs b/crates/horizon-client/src/hunger.rs new file mode 100644 index 000000000..1a70d975b --- /dev/null +++ b/crates/horizon-client/src/hunger.rs @@ -0,0 +1,142 @@ +//! Hunger and regeneration over the resident player's actual health, damage, +//! attribute and exhaustion storage. Starvation borrows the same FoodData that +//! is mid-tick, preserving damage callbacks and the following timer reset. +use crate::{ + Result, + health::{Attributes, Environment, HealthEvent, HealthResources, HealthRules, State, Updates}, + motion::{MotionEvent, PlayerMotion}, +}; +use horizon_world::{ + food::{Difficulty, FoodData, FoodWorld}, + player_health::{PlayerAttributeHealth, PlayerFloatIds}, + server_player_combat::ServerPlayerCombat, + synced_floats::SyncedFloats, +}; + +impl PlayerMotion { + /// ServerPlayer.tickRegeneration, dispatched from Player.aiStep before + /// inventory and living movement. The separately invoked food tick follows + /// movement in ServerPlayer.doTick. + pub fn peaceful_regeneration(&mut self, rules: HealthRules) -> Result<()> { + if rules.difficulty != Difficulty::Peaceful || !rules.natural_regeneration { + return Ok(()); + } + if self.health.tick_count % 20 == 0 { + let health = self.health.health(); + let maximum = self.attribute("minecraft:max_health")? as f32; + if health < maximum { + let h = &mut self.health; + let mut observer = Updates(&mut self.events); + PlayerAttributeHealth::new( + &mut self.attributes, + &mut h.data, + h.ids, + h.dead, + &mut observer, + )? + .heal(1.0)?; + } + let saturation = self.health.food.saturation; + if saturation < 20.0 { + self.health.food.saturation = saturation + 1.0; + } + } + if self.health.tick_count % 10 == 0 && self.health.food.needs_food() { + self.health.food.food = self.health.food.food.wrapping_add(1); + } + Ok(()) + } + pub fn food_tick(&mut self, resources: &HealthResources, rules: HealthRules) -> Result<()> { + let h = &mut self.health; + let mut world = TickWorld { + resources, + rules, + attributes: &mut self.attributes, + data: &mut h.data, + ids: h.ids, + hurt: &mut h.hurt, + dead: &mut h.dead, + sync_velocity: &mut h.sync_velocity, + game_time: h.game_time, + events: &mut self.events, + }; + h.food.tick(&mut world) + } +} +struct TickWorld<'a> { + resources: &'a HealthResources, + rules: HealthRules, + attributes: &'a mut Attributes, + data: &'a mut SyncedFloats, + ids: PlayerFloatIds, + hurt: &'a mut State, + dead: &'a mut bool, + sync_velocity: &'a mut bool, + game_time: i64, + events: &'a mut Vec<MotionEvent>, +} +impl FoodWorld for TickWorld<'_> { + type Error = Box<dyn std::error::Error>; + type Level = (); + fn level(&mut self, _: &mut FoodData) -> Result<()> { + Ok(()) + } + fn difficulty(&mut self, _: (), _: &mut FoodData) -> Result<Difficulty> { + Ok(self.rules.difficulty) + } + fn natural_regeneration(&mut self, _: (), _: &mut FoodData) -> Result<bool> { + Ok(self.rules.natural_regeneration) + } + fn is_hurt(&mut self, _: &mut FoodData) -> Result<bool> { + let mut observer = Updates(self.events); + Ok(PlayerAttributeHealth::new( + self.attributes, + self.data, + self.ids, + *self.dead, + &mut observer, + )? + .is_hurt()?) + } + fn heal(&mut self, _: &mut FoodData, amount: f32) -> Result<()> { + let mut observer = Updates(self.events); + Ok(PlayerAttributeHealth::new( + self.attributes, + self.data, + self.ids, + *self.dead, + &mut observer, + )? + .heal(amount)?) + } + fn health(&mut self, _: &mut FoodData) -> Result<f32> { + Ok(self + .data + .get(self.ids.health) + .expect("validated health field")) + } + fn hurt_starvation(&mut self, _: (), food: &mut FoodData, amount: f32) -> Result<()> { + let id = self + .resources + .damage + .id("minecraft:starve") + .expect("validated starvation source"); + self.events + .push(MotionEvent::Health(HealthEvent::StarvationDamage(amount))); + let mut environment = Environment { + rules: self.rules, + source: self + .resources + .damage + .source::<()>(id, None, None, None) + .expect("validated starvation source"), + events: self.events, + dead: self.dead, + sync_velocity: self.sync_velocity, + game_time: self.game_time, + }; + ServerPlayerCombat::new(self.attributes, self.data, food, self.ids, &mut environment)? + .hurt(self.hurt, amount)?; + Ok(()) + } +} diff --git a/crates/horizon-client/src/input.rs b/crates/horizon-client/src/input.rs new file mode 100644 index 000000000..74481d51c --- /dev/null +++ b/crates/horizon-client/src/input.rs @@ -0,0 +1,67 @@ +//! KeyboardInput direction and LocalPlayer input-speed arithmetic for 26.3. +//! Item-use and sneak multipliers come from the player's current state; this +//! module does not implement sprint eligibility, poses or the input lifecycle. + +fn length(v: [f32; 2]) -> f32 { + f64::from(v[0] * v[0] + v[1] * v[1]).sqrt() as f32 +} +fn scale(v: [f32; 2], factor: f32) -> [f32; 2] { + [v[0] * factor, v[1] * factor] +} +pub fn keyboard_direction(forward: bool, backward: bool, left: bool, right: bool) -> [f32; 2] { + let impulse = |positive: bool, negative: bool| { + if positive == negative { + 0.0 + } else if positive { + 1.0 + } else { + -1.0 + } + }; + let v = [impulse(left, right), impulse(forward, backward)]; + let magnitude = length(v); + if magnitude < 1.0e-4 { + [0.0, 0.0] + } else { + [v[0] / magnitude, v[1] / magnitude] + } +} + +/// LocalPlayer.modifyInput with already selected multipliers. `item_use` is +/// Some only when using an item and not riding; `sneaking` only when moving +/// slowly. Zero input returns before either multiplier is applied. +pub fn modify_input(input: [f32; 2], item_use: Option<f32>, sneaking: Option<f32>) -> [f32; 2] { + if input[0] * input[0] + input[1] * input[1] == 0.0 { + return input; + } + let mut v = scale(input, 0.98); + if let Some(multiplier) = item_use { + v = scale(v, multiplier); + } + if let Some(multiplier) = sneaking { + v = scale(v, multiplier); + } + square_movement(v) +} + +fn square_movement(v: [f32; 2]) -> [f32; 2] { + let magnitude = length(v); + if magnitude <= 0.0 { + return v; + } + let unit = scale(v, 1.0 / magnitude); + let x = unit[0].abs(); + let y = unit[1].abs(); + let ratio = if y > x { x / y } else { y / x }; + let distance = f64::from(1.0 + ratio * ratio).sqrt() as f32; + let speed = magnitude * distance; + // Java Math.min propagates NaN, unlike Rust's f32::min. + scale( + unit, + if speed.is_nan() || speed < 1.0 { + speed + } else { + 1.0 + }, + ) +} diff --git a/crates/horizon-client/src/items.rs b/crates/horizon-client/src/items.rs new file mode 100644 index 000000000..3caf4b445 --- /dev/null +++ b/crates/horizon-client/src/items.rs @@ -0,0 +1,531 @@ +//! Items from vanilla's default-component reports, block<->item mapping, +//! tool mining rules and block loot tables (`LootTable`/`LootPool` semantics +//! for the condition, entry and modifier types used by block drops). +use crate::{Result, blocks::BlockFacts}; +use horizon_core::random::{LegacyRandom, RandomSource}; +use horizon_world::registry::{BlockRegistry, BlockStateId}; +use serde_json::Value; +use std::{ + collections::{BTreeMap, HashMap, HashSet}, + fs, + path::Path, + sync::Arc, +}; + +#[derive(Clone, Debug)] +pub struct ToolRule { + pub blocks: Vec<String>, + pub speed: Option<f32>, + pub correct: Option<bool>, +} +#[derive(Clone, Debug)] +pub struct ItemInfo { + pub id: Arc<str>, + pub max_stack: u32, + pub max_damage: u32, + pub block: Option<BlockStateId>, + pub tool: Vec<ToolRule>, + pub tool_default_speed: f32, + pub food: Option<(u32, f32)>, + pub model: String, + /// Main-hand `attack_damage` / `attack_speed` modifier amounts. + pub attack_damage: f32, + pub attack_speed: f32, + /// `cooking_fuel`: burn-time and speed-multiplier provider references. + pub fuel: Option<(Value, Value)>, + /// Item left behind after crafting/fuel use (e.g. bucket). + pub remainder: Option<String>, + /// `equippable.slot` (head, chest, legs, feet, ...). + pub equip_slot: Option<String>, + /// All `attribute_modifiers`: (attribute, id, amount, operation, slot group). + pub modifiers: Vec<(String, String, f64, String, String)>, +} +#[derive(Clone, Debug, PartialEq)] +pub struct ItemStack { + pub item: Arc<str>, + pub count: u32, + pub damage: u32, +} +pub struct Items { + pub items: HashMap<Arc<str>, ItemInfo>, + pub order: Vec<Arc<str>>, + /// Block tag name (without '#') -> member block names. + pub block_tags: HashMap<String, HashSet<String>>, + pub item_tags: HashMap<String, HashSet<String>>, + loot: HashMap<String, Value>, +} +fn load_tags(root: &Path, kind: &str) -> Result<HashMap<String, HashSet<String>>> { + let dir = root.join(format!("data/minecraft/tags/{kind}")); + let mut raw: HashMap<String, Vec<String>> = HashMap::new(); + fn walk(dir: &Path, base: &Path, raw: &mut HashMap<String, Vec<String>>) -> Result<()> { + for entry in fs::read_dir(dir)?.flatten() { + let p = entry.path(); + if p.is_dir() { + walk(&p, base, raw)?; + } else if p.extension().is_some_and(|e| e == "json") { + let name = format!( + "minecraft:{}", + p.strip_prefix(base)?.with_extension("").to_string_lossy().replace('\\', "/") + ); + let v: Value = serde_json::from_slice(&fs::read(&p)?)?; + let values = v["values"] + .as_array() + .into_iter() + .flatten() + .filter_map(|e| e.as_str().or_else(|| e["id"].as_str()).map(str::to_owned)) + .collect(); + raw.insert(name, values); + } + } + Ok(()) + } + if dir.exists() { + walk(&dir, &dir, &mut raw)?; + } + fn resolve(name: &str, raw: &HashMap<String, Vec<String>>, out: &mut HashSet<String>, depth: u32) { + if depth > 32 { + return; + } + for v in raw.get(name).into_iter().flatten() { + if let Some(tag) = v.strip_prefix('#') { + resolve(tag, raw, out, depth + 1); + } else { + out.insert(v.clone()); + } + } + } + Ok(raw + .keys() + .map(|k| { + let mut set = HashSet::new(); + resolve(k, &raw, &mut set, 0); + (k.clone(), set) + }) + .collect()) +} +impl Items { + pub fn load(root: &Path, registry: &BlockRegistry, facts: &BlockFacts) -> Result<Self> { + let raw: BTreeMap<String, Value> = + serde_json::from_slice(&fs::read(root.join("items.json"))?)?; + let mut block_for_item: HashMap<&str, BlockStateId> = HashMap::new(); + for (i, s) in facts.states.iter().enumerate() { + let default = registry.default_state(&s.name); + if default == Some(BlockStateId(i as u32)) && &*s.item != "minecraft:air" { + block_for_item.entry(&s.item).or_insert(BlockStateId(i as u32)); + } + } + let mut items = HashMap::new(); + let mut order = Vec::new(); + for (name, c) in &raw { + let id: Arc<str> = Arc::from(name.as_str()); + let tool = c["minecraft:tool"]["rules"] + .as_array() + .into_iter() + .flatten() + .map(|r| ToolRule { + blocks: match &r["blocks"] { + Value::String(s) => vec![s.clone()], + Value::Array(a) => a.iter().filter_map(|v| v.as_str().map(str::to_owned)).collect(), + _ => vec![], + }, + speed: r["speed"].as_f64().map(|v| v as f32), + correct: r["correct_for_drops"].as_bool(), + }) + .collect(); + let modifier = |kind: &str| -> f32 { + c["minecraft:attribute_modifiers"] + .as_array() + .into_iter() + .flatten() + .filter(|m| m["type"].as_str() == Some(kind) && m["operation"].as_str() == Some("add_value")) + .filter_map(|m| m["amount"].as_f64()) + .sum::<f64>() as f32 + }; + let food = c.get("minecraft:food").map(|f| { + ( + f["nutrition"].as_u64().unwrap_or(0) as u32, + f["saturation"].as_f64().unwrap_or(0.0) as f32, + ) + }); + items.insert( + id.clone(), + ItemInfo { + id: id.clone(), + max_stack: c["minecraft:max_stack_size"].as_u64().unwrap_or(64) as u32, + max_damage: c["minecraft:max_damage"].as_u64().unwrap_or(0) as u32, + block: block_for_item.get(name.as_str()).copied(), + tool, + tool_default_speed: c["minecraft:tool"]["default_mining_speed"] + .as_f64() + .unwrap_or(1.0) as f32, + food, + model: c["minecraft:item_model"].as_str().unwrap_or(name).to_owned(), + equip_slot: c["minecraft:equippable"]["slot"].as_str().map(str::to_owned), + modifiers: c["minecraft:attribute_modifiers"] + .as_array() + .into_iter() + .flatten() + .filter_map(|m| { + Some(( + m["type"].as_str()?.to_owned(), + m["id"].as_str()?.to_owned(), + m["amount"].as_f64()?, + m["operation"].as_str().unwrap_or("add_value").to_owned(), + m["slot"].as_str().unwrap_or("any").to_owned(), + )) + }) + .collect(), + fuel: c.get("minecraft:cooking_fuel").map(|f| (f["burn_time"].clone(), f["speed_multiplier"].clone())), + remainder: c["minecraft:use_remainder"]["id"].as_str().or(c["minecraft:crafting_remainder"]["id"].as_str()).or(c["minecraft:crafting_remainder"].as_str()).map(str::to_owned), + attack_damage: modifier("minecraft:attack_damage"), + attack_speed: modifier("minecraft:attack_speed"), + }, + ); + order.push(id); + } + let mut loot = HashMap::new(); + for kind in ["blocks", "entities"] { + let dir = root.join(format!("data/minecraft/loot_table/{kind}")); + for entry in fs::read_dir(&dir)?.flatten() { + let p = entry.path(); + if p.extension().is_some_and(|e| e == "json") + && let Some(stem) = p.file_stem().and_then(|s| s.to_str()) + { + loot.insert(format!("minecraft:{kind}/{stem}"), serde_json::from_slice(&fs::read(&p)?)?); + } + } + } + Ok(Self { + items, + order, + block_tags: load_tags(root, "block")?, + item_tags: load_tags(root, "item")?, + loot, + }) + } + pub fn get(&self, id: &str) -> Option<&ItemInfo> { + self.items.get(id) + } + fn block_matches(&self, spec: &str, block: &str) -> bool { + match spec.strip_prefix('#') { + Some(tag) => self.block_tags.get(tag).is_some_and(|s| s.contains(block)), + None => spec == block, + } + } + /// `Tool.getMiningSpeed` for the held item (1.0 without a tool component). + pub fn mining_speed(&self, held: Option<&ItemStack>, block: &str) -> f32 { + let Some(info) = held.and_then(|s| self.get(&s.item)) else { + return 1.0; + }; + for rule in &info.tool { + if let Some(speed) = rule.speed + && rule.blocks.iter().any(|b| self.block_matches(b, block)) + { + return speed; + } + } + if info.tool.is_empty() { + 1.0 + } else { + info.tool_default_speed + } + } + /// `Tool.isCorrectForDrops`. + pub fn correct_for_drops(&self, held: Option<&ItemStack>, block: &str) -> bool { + let Some(info) = held.and_then(|s| self.get(&s.item)) else { + return false; + }; + for rule in &info.tool { + if let Some(correct) = rule.correct + && rule.blocks.iter().any(|b| self.block_matches(b, block)) + { + return correct; + } + } + false + } + /// Evaluate the block's loot table for a player break without explosions. + pub fn block_drops( + &self, + registry: &BlockRegistry, + state: BlockStateId, + held: Option<&ItemStack>, + random: &mut LegacyRandom, + ) -> Vec<ItemStack> { + let Some(block) = registry.state(state) else { + return vec![]; + }; + let name = block.name.trim_start_matches("minecraft:"); + let Some(table) = self.loot.get(&format!("minecraft:blocks/{name}")) else { + return vec![]; + }; + let ctx = LootContext { + items: self, + block: &block.name, + properties: &block.properties, + held, + killed_by_player: false, + }; + ctx.evaluate(table, random) + } + /// Evaluate an entity's loot table (`minecraft:entities/<name>`). + pub fn entity_drops(&self, entity: &str, killed_by_player: bool, held: Option<&ItemStack>, random: &mut LegacyRandom) -> Vec<ItemStack> { + let name = entity.trim_start_matches("minecraft:"); + let Some(table) = self.loot.get(&format!("minecraft:entities/{name}")) else { + return vec![]; + }; + let empty = BTreeMap::new(); + let ctx = LootContext { + items: self, + block: "", + properties: &empty, + held, + killed_by_player, + }; + ctx.evaluate(table, random) + } +} +impl LootContext<'_> { + fn evaluate(&self, table: &Value, random: &mut LegacyRandom) -> Vec<ItemStack> { + let ctx = self; + let mut out = Vec::new(); + for pool in table["pools"].as_array().into_iter().flatten() { + if !ctx.conditions(pool, random) { + continue; + } + let rolls = ctx.number(&pool["rolls"], random).max(0.0) as u32; + for _ in 0..rolls { + let mut produced = Vec::new(); + ctx.choose(pool["entries"].as_array().map_or(&[][..], Vec::as_slice), random, &mut produced); + for mut stack in produced { + ctx.modifiers(&pool["modifier"], &mut stack, random); + ctx.modifiers(&table["modifier"], &mut stack, random); + if stack.count > 0 { + out.push(stack); + } + } + } + } + out + } +} +struct LootContext<'a> { + items: &'a Items, + block: &'a str, + properties: &'a BTreeMap<String, String>, + held: Option<&'a ItemStack>, + killed_by_player: bool, +} +impl LootContext<'_> { + fn number(&self, v: &Value, random: &mut LegacyRandom) -> f32 { + match v { + Value::Number(n) => n.as_f64().unwrap_or(0.0) as f32, + Value::Object(o) => match o.get("type").and_then(Value::as_str).unwrap_or("minecraft:uniform") { + "minecraft:constant" => o.get("value").and_then(Value::as_f64).unwrap_or(0.0) as f32, + "minecraft:uniform" => { + let min = self.number(o.get("min").unwrap_or(&Value::Null), random); + let max = self.number(o.get("max").unwrap_or(&Value::Null), random); + // UniformGenerator.getFloat / getInt (Mth.nextInt) differ; use int for counts. + if max <= min { + min + } else { + min + random.next_float() * (max - min) + } + } + "minecraft:binomial" => { + let n = self.number(o.get("n").unwrap_or(&Value::Null), random) as u32; + let p = self.number(o.get("p").unwrap_or(&Value::Null), random); + (0..n).filter(|_| random.next_float() < p).count() as f32 + } + _ => 1.0, + }, + _ => 1.0, + } + } + fn int_number(&self, v: &Value, random: &mut LegacyRandom) -> i32 { + if let Value::Object(o) = v + && o.get("type").and_then(Value::as_str).unwrap_or("minecraft:uniform") == "minecraft:uniform" + { + let min = self.int_number(o.get("min").unwrap_or(&Value::Null), random); + let max = self.int_number(o.get("max").unwrap_or(&Value::Null), random); + return if max <= min { + min + } else { + min + random.next_int_bound(max - min + 1).unwrap_or(0) + }; + } + self.number(v, random).round() as i32 + } + fn condition(&self, c: &Value, random: &mut LegacyRandom) -> bool { + let (kind, c) = match c { + Value::String(s) => (s.as_str(), &Value::Null), + Value::Object(o) => (o.get("type").and_then(Value::as_str).unwrap_or(""), c), + _ => return true, + }; + match kind { + "minecraft:survives_explosion" => true, + "minecraft:tool/can_silk_touch" => false, + "minecraft:tool/can_shear" => self.held.is_some_and(|h| &*h.item == "minecraft:shears"), + "minecraft:inverted" => !self.condition(&c["term"], random), + "minecraft:any_of" => c["terms"].as_array().into_iter().flatten().any(|t| self.condition(t, random)), + "minecraft:all_of" => c["terms"].as_array().into_iter().flatten().all(|t| self.condition(t, random)), + "minecraft:random_chance" => random.next_float() < self.number(&c["chance"], random), + "minecraft:table_bonus" => { + let chance = c["chances"][0].as_f64().unwrap_or(0.0) as f32; + random.next_float() < chance + } + "minecraft:match_block" | "minecraft:block_state_property" => { + let blocks_ok = match &c["blocks"].as_str().or(c["block"].as_str()) { + Some(spec) => self.items.block_matches(spec, self.block), + None => true, + }; + blocks_ok + && c["state"].as_object().into_iter().flatten().chain(c["properties"].as_object().into_iter().flatten()).all(|(k, v)| { + let have = self.properties.get(k).map(String::as_str); + match v { + Value::String(s) => have == Some(s.as_str()), + Value::Object(r) => { + let have: i64 = have.and_then(|h| h.parse().ok()).unwrap_or(0); + r.get("min").and_then(Value::as_i64).is_none_or(|m| have >= m) + && r.get("max").and_then(Value::as_i64).is_none_or(|m| have <= m) + } + _ => true, + } + }) + } + "minecraft:match_tool" => { + let items = &c["predicate"]["items"]; + match (self.held, items) { + (Some(h), Value::String(s)) => match s.strip_prefix('#') { + Some(tag) => self.items.item_tags.get(tag).is_some_and(|t| t.contains(&*h.item)), + None => **s == *h.item, + }, + _ => false, + } + } + "minecraft:killed_by_player" => self.killed_by_player, + "minecraft:random_chance_with_enchanted_bonus" => { + random.next_float() < c["unenchanted_chance"].as_f64().unwrap_or(0.0) as f32 + } + // Entity flags, equipment and damage-source predicates: none hold + // for an unenchanted player kill without fire or lightning. + "minecraft:entity_properties" | "minecraft:damage_source_properties" => false, + _ => true, + } + } + fn conditions(&self, o: &Value, random: &mut LegacyRandom) -> bool { + if let Some(c) = o.get("condition") + && !self.condition(c, random) + { + return false; + } + o.get("conditions") + .and_then(Value::as_array) + .into_iter() + .flatten() + .all(|c| self.condition(c, random)) + } + /// Expand entries; returns whether an entry succeeded (for alternatives). + fn expand(&self, e: &Value, random: &mut LegacyRandom, out: &mut Vec<(i32, ItemStack, Value)>) -> bool { + if !self.conditions(e, random) { + return false; + } + match e["type"].as_str().unwrap_or("") { + "minecraft:item" => { + out.push(( + e["weight"].as_i64().unwrap_or(1) as i32, + ItemStack { + item: Arc::from(e["name"].as_str().unwrap_or("minecraft:air")), + count: 1, + damage: 0, + }, + e["modifier"].clone(), + )); + true + } + "minecraft:alternatives" => { + for child in e["children"].as_array().into_iter().flatten() { + if self.expand(child, random, out) { + return true; + } + } + false + } + "minecraft:group" => { + for child in e["children"].as_array().into_iter().flatten() { + self.expand(child, random, out); + } + true + } + "minecraft:sequence" => { + for child in e["children"].as_array().into_iter().flatten() { + if !self.expand(child, random, out) { + break; + } + } + true + } + "minecraft:empty" => { + out.push((e["weight"].as_i64().unwrap_or(1) as i32, ItemStack { item: Arc::from("minecraft:air"), count: 0, damage: 0 }, Value::Null)); + true + } + _ => false, + } + } + fn choose(&self, entries: &[Value], random: &mut LegacyRandom, produced: &mut Vec<ItemStack>) { + let mut candidates = Vec::new(); + for e in entries { + self.expand(e, random, &mut candidates); + } + if candidates.is_empty() { + return; + } + let pick = if candidates.len() == 1 { + 0 + } else { + let total: i32 = candidates.iter().map(|c| c.0.max(0)).sum(); + let mut r = random.next_int_bound(total.max(1)).unwrap_or(0); + let mut chosen = 0; + for (i, c) in candidates.iter().enumerate() { + r -= c.0.max(0); + if r < 0 { + chosen = i; + break; + } + } + chosen + }; + let (_, mut stack, modifiers) = candidates.swap_remove(pick); + self.modifiers(&modifiers, &mut stack, random); + produced.push(stack); + } + fn modifiers(&self, m: &Value, stack: &mut ItemStack, random: &mut LegacyRandom) { + let list: Vec<&Value> = match m { + Value::Array(a) => a.iter().collect(), + Value::Object(_) => vec![m], + _ => return, + }; + for f in list { + if !self.conditions(f, random) { + continue; + } + match f["type"].as_str().or(f["function"].as_str()).unwrap_or("") { + "minecraft:set_count" => { + let n = self.int_number(&f["count"], random); + let base = if f["add"].as_bool() == Some(true) { stack.count as i32 } else { 0 }; + stack.count = (base + n).max(0) as u32; + } + "minecraft:limit_count" => { + let limit = &f["limit"]; + if let Some(min) = limit["min"].as_i64() { + stack.count = stack.count.max(min as u32); + } + if let Some(max) = limit["max"].as_i64() { + stack.count = stack.count.min(max as u32); + } + } + _ => {} + } + } + } +} diff --git a/crates/horizon-client/src/landing.rs b/crates/horizon-client/src/landing.rs new file mode 100644 index 000000000..9e5b17530 --- /dev/null +++ b/crates/horizon-client/src/landing.rs @@ -0,0 +1,523 @@ +//! Resident-world landing, registered block reactions and fall-damage requests. +//! Health, sound/particle playback and network delivery remain event consumers. +use crate::{ + Result, + collisions::SceneCollisions, + motion::{MotionEvent, MotionWorld}, +}; +use horizon_core::{ + geometry::{Aabb, Vec3, VoxelShape}, + position::BlockPos, + random::RandomSource, +}; +use horizon_world::{ + block_entity_push::BlockPushWorld, + block_landing::{ + BlockLandingRegistry, BlockLandingWorld, DamageSourceOwner, FallDefinition, LandingDamage, + LandingDefinition, LandingEntityKind, LandingEvent, LandingSound, + }, + entity_obstruction::EntityIdentity, + fall_damage::FallDamageWorld, + living_fall::{self, LivingFallWorld}, + living_landing::LivingLandingWorld, + movement_properties::MovementProperties, + registry::BlockStateId, +}; +use std::{collections::BTreeMap, fs, path::Path}; + +pub fn load(root: &Path, properties: &MovementProperties<'_>) -> Result<BlockLandingRegistry> { + let raw: BTreeMap<String, serde_json::Value> = + serde_json::from_slice(&fs::read(root.join("landing-definitions.json"))?)?; + let mut definitions = BTreeMap::new(); + for (name, d) in raw { + let float = |key: &str| -> Result<f32> { + Ok(f32::from_bits(u32::from_str_radix( + d[key].as_str().ok_or("missing landing float")?, + 16, + )?)) + }; + let fall = match d["fall"].as_str().ok_or("missing landing family")? { + "Block" => FallDefinition::Default, + "HayBlock" => FallDefinition::Hay, + "HoneyBlock" => FallDefinition::Honey { + volume: float("volume")?, + pitch: float("pitch")?, + }, + "SlimeBlock" => FallDefinition::Slime, + "PowderSnowBlock" => FallDefinition::PowderSnow, + "PointedDripstoneBlock" => FallDefinition::PointedDripstone, + "FarmlandBlock" => FallDefinition::Farmland { + base_block: d["base"].as_str().ok_or("missing farmland base")?.into(), + }, + "TurtleEggBlock" => FallDefinition::TurtleEgg, + _ => return Err("unsupported landing family".into()), + }; + definitions.insert( + name, + LandingDefinition { + fall, + shelf_mushroom_bounce: d["bounce"].as_bool().ok_or("missing bounce flag")?, + }, + ); + } + Ok(BlockLandingRegistry::new(properties, &definitions)?) +} +#[derive(Clone, Copy, Debug)] +pub enum SceneSound { + Block(LandingSound), + SmallFall, + BigFall, +} +impl SceneSound { + fn name(self) -> &'static str { + match self { + Self::SmallFall => "small", + Self::BigFall => "big", + Self::Block(v) => match v { + LandingSound::HoneySlide => "honey-slide", + LandingSound::HoneyFall => "honey-fall", + LandingSound::TurtleEggBreak => "egg-break", + LandingSound::ShelfMushroomBounce => "mushroom", + }, + } + } +} +#[derive(Clone, Copy, Debug)] +pub enum FallEvent { + Particles { + state: BlockStateId, + position: Vec3, + count: i32, + speed: f64, + }, + HitGround { + position: Vec3, + state: BlockStateId, + }, + Statistic(i32), + Damage { + source: LandingDamage, + amount: f32, + }, + Sound { + sound: SceneSound, + position: Option<BlockPos>, + volume: f32, + pitch: f32, + }, + BlockFallSound, + Broadcast(u8), + Write { + position: BlockPos, + state: BlockStateId, + flags: u32, + }, + Destroy { + position: BlockPos, + drops: bool, + }, + BlockEvent { + kind: LandingEvent, + position: BlockPos, + state: BlockStateId, + with_entity: bool, + }, + LevelEvent { + event: i32, + position: BlockPos, + data: i32, + }, +} +impl FallEvent { + /// Exact-bit diagnostic representation shared by the headless scene probe. + pub fn trace(self) -> String { + fn p(v: BlockPos) -> String { + format!("{},{},{}", v.x, v.y, v.z) + } + fn v(v: Vec3) -> String { + format!( + "{:016x},{:016x},{:016x}", + v.x.to_bits(), + v.y.to_bits(), + v.z.to_bits() + ) + } + match self { + Self::Particles { + state, + position, + count, + speed, + } => format!( + "particles {} {} {} {:016x}", + state.0, + v(position), + count, + speed.to_bits() + ), + Self::HitGround { position, state } => format!("hit {} {}", v(position), state.0), + Self::Statistic(n) => format!("stat {n}"), + Self::Damage { source, amount } => format!( + "damage {} {:08x}", + if source == LandingDamage::Fall { + "fall" + } else { + "stalagmite" + }, + amount.to_bits() + ), + Self::Sound { + sound, + position, + volume, + pitch, + } => format!( + "sound {} {} {:08x} {:08x}", + sound.name(), + position.map_or_else(|| "entity".into(), p), + volume.to_bits(), + pitch.to_bits() + ), + Self::BlockFallSound => "block-fall-sound".into(), + Self::Broadcast(event) => format!("broadcast {event}"), + Self::Write { + position, + state, + flags, + } => format!("write {} {} {}", p(position), state.0, flags), + Self::Destroy { position, drops } => format!("destroy {} {}", p(position), drops), + Self::BlockEvent { + kind, + position, + state, + with_entity, + } => format!( + "event {} {} {} {}", + if kind == LandingEvent::BlockChange { + "change" + } else { + "destroy" + }, + p(position), + state.0, + with_entity + ), + Self::LevelEvent { + event, + position, + data, + } => format!("level-event {} {} {}", event, p(position), data), + } + } +} +impl MotionWorld<'_, '_, '_> { + fn fall_event(&mut self, event: FallEvent) { + self.player.events.push(MotionEvent::Fall(event)); + } +} +impl FallDamageWorld for MotionWorld<'_, '_, '_> { + type Error = Box<dyn std::error::Error>; + type State = BlockStateId; + fn is_in_water(&mut self) -> Result<bool> { + Ok(false) + } + fn fall_distance(&self) -> f64 { + self.player.fall_distance + } + fn set_fall_distance(&mut self, value: f64) { + self.player.fall_distance = value; + } + fn fall_on(&mut self, state: BlockStateId, position: BlockPos, distance: f64) -> Result<()> { + self.resources + .landing + .fall_on(self, state, position, LandingEntityKind::Player, distance) + .map_err(|e| e.to_string().into()) + } + fn position(&self) -> Vec3 { + self.player.position + } + fn supporting_block(&self) -> Option<BlockPos> { + self.player.ground.supporting_block + } + fn block_state(&mut self, p: BlockPos) -> Result<BlockStateId> { + Ok(self.scene.block(p.x, p.y, p.z)) + } + fn hit_ground(&mut self, position: Vec3, state: BlockStateId) -> Result<()> { + self.fall_event(FallEvent::HitGround { position, state }); + Ok(()) + } + fn reset_fall_distance(&mut self) -> Result<()> { + self.player.fall_distance = 0.0; + Ok(()) + } +} +impl LivingLandingWorld for MotionWorld<'_, '_, '_> { + fn update_fluid_interaction(&mut self) -> Result<bool> { + Ok(false) + } // dry scene + fn is_server_level(&self) -> bool { + true + } + fn on_changed_block(&mut self, _: BlockPos) -> Result<()> { + Ok(()) + } // empty equipment + fn safe_fall_distance(&mut self) -> Result<f64> { + self.player.attribute("minecraft:safe_fall_distance") + } + fn state_is_air(&mut self, state: BlockStateId) -> Result<bool> { + Ok(self.scene.is_air(state)) + } + fn block_position(&mut self) -> Result<BlockPos> { + Ok(BlockPos::containing(self.player.position)) + } + fn landing_particles( + &mut self, + state: BlockStateId, + position: Vec3, + count: i32, + speed: f64, + ) -> Result<()> { + self.fall_event(FallEvent::Particles { + state, + position, + count, + speed, + }); + Ok(()) + } + fn clear_last_climbable_position(&mut self) { + self.player.last_climbable = None; + } +} +impl BlockPushWorld for MotionWorld<'_, '_, '_> { + type Error = Box<dyn std::error::Error>; + fn collision_shape(&mut self, state: BlockStateId, p: BlockPos) -> Result<VoxelShape> { + let mut world = SceneCollisions { + world: self.scene, + binding: self.collision_binding, + }; + self.collision_binding + .collision_shape(&mut world, state, [p.x, p.y, p.z]) + .map_err(|e| e.to_string().into()) + } + fn entities(&mut self, bounds: Aabb) -> Result<Vec<EntityIdentity>> { + Ok(if bounds.intersects(self.player.bounds()) { + vec![EntityIdentity(0)] + } else { + vec![] + }) + } + fn entity_bounds(&self, _: EntityIdentity) -> Aabb { + self.player.bounds() + } + fn teleport_relative(&mut self, _: EntityIdentity, movement: Vec3) -> Result<()> { + self.player.position = Vec3::new( + self.player.position.x + movement.x, + self.player.position.y + movement.y, + self.player.position.z + movement.z, + ); + Ok(()) + } +} +impl BlockLandingWorld for MotionWorld<'_, '_, '_> { + type DamageSource = LandingDamage; + type Sound = SceneSound; + fn is_server_level(&self) -> bool { + true + } + fn is_client_side(&mut self) -> Result<bool> { + Ok(false) + } + fn random_float(&mut self) -> Result<f32> { + Ok(self.scene.random.next_float()) + } + fn random_int(&mut self, bound: i32) -> Result<i32> { + Ok(self.scene.random.next_int_bound(bound)?) + } + fn under_spawn_protection(&mut self, _: BlockPos) -> Result<bool> { + Ok(false) + } + fn mob_griefing(&mut self) -> Result<bool> { + Ok(true) + } + fn entity_dimensions(&self) -> (f32, f32) { + (self.player.dimensions.width, self.player.dimensions.height) + } + fn suppressing_bounce(&mut self) -> Result<bool> { + Ok(self.player.shift_key_down) + } + fn damage_source( + &mut self, + _: DamageSourceOwner, + kind: LandingDamage, + ) -> Result<LandingDamage> { + Ok(kind) + } + fn cause_fall_damage( + &mut self, + distance: f64, + multiplier: f32, + source: LandingDamage, + ) -> Result<bool> { + // Nonflying player: Player.causeFallDamage records centimeters before + // delegating to LivingEntity. No mayfly ability in the walking scene. + if distance >= 2.0 || distance.is_nan() { + let scaled = distance * 100.0; + let floor = scaled.floor(); + let rounded = (if scaled - floor >= 0.5 { + floor + 1.0 + } else { + floor + }) as i64; + self.fall_event(FallEvent::Statistic(rounded as i32)); + } + living_fall::cause_living_fall_damage( + &mut FallCall { + world: self, + source, + }, + distance, + multiplier, + ) + } + fn known_sound(&self, s: LandingSound) -> SceneSound { + SceneSound::Block(s) + } + fn living_fall_sound(&mut self, big: bool) -> Result<SceneSound> { + Ok(if big { + SceneSound::BigFall + } else { + SceneSound::SmallFall + }) + } + fn entity_sound(&mut self, sound: SceneSound, volume: f32, pitch: f32) -> Result<()> { + self.fall_event(FallEvent::Sound { + sound, + position: None, + volume, + pitch, + }); + Ok(()) + } + fn block_sound( + &mut self, + position: BlockPos, + sound: SceneSound, + volume: f32, + pitch: f32, + ) -> Result<()> { + self.fall_event(FallEvent::Sound { + sound, + position: Some(position), + volume, + pitch, + }); + Ok(()) + } + fn broadcast_entity_event(&mut self, event: u8) -> Result<()> { + self.fall_event(FallEvent::Broadcast(event)); + Ok(()) + } + fn destroy_block(&mut self, position: BlockPos, drops: bool) -> Result<bool> { + let air = self + .assets + .registry + .default_state("minecraft:air") + .ok_or("missing air")?; + self.scene.set(position.x, position.y, position.z, air)?; + self.fall_event(FallEvent::Destroy { position, drops }); + Ok(true) + } + fn set_block(&mut self, position: BlockPos, state: BlockStateId, flags: u32) -> Result<bool> { + self.scene.set(position.x, position.y, position.z, state)?; + self.fall_event(FallEvent::Write { + position, + state, + flags, + }); + Ok(true) + } + fn block_event( + &mut self, + kind: LandingEvent, + position: BlockPos, + state: BlockStateId, + with_entity: bool, + ) -> Result<()> { + self.fall_event(FallEvent::BlockEvent { + kind, + position, + state, + with_entity, + }); + Ok(()) + } + fn level_event(&mut self, event: i32, position: BlockPos, data: i32) -> Result<()> { + self.fall_event(FallEvent::LevelEvent { + event, + position, + data, + }); + Ok(()) + } +} +struct FallCall<'a, 'p, 'w, 'r> { + world: &'a mut MotionWorld<'p, 'w, 'r>, + source: LandingDamage, +} +impl LivingFallWorld for FallCall<'_, '_, '_, '_> { + type Error = Box<dyn std::error::Error>; + type Sound = SceneSound; + fn impact_position(&self) -> Option<Vec3> { + self.world.player.impulse.impact_position + } + fn y(&self) -> f64 { + self.world.player.position.y + } + fn reset_impulse(&mut self) -> Result<()> { + self.world.player.impulse.reset(); + Ok(()) + } + fn try_reset_impulse(&mut self) -> Result<()> { + self.world.player.impulse.try_reset(); + Ok(()) + } + fn immune_to_fall_damage(&mut self) -> Result<bool> { + Ok(false) + } // player type + fn propagate_fall_to_passengers(&mut self, _: f64, _: f32) -> Result<()> { + Ok(()) + } // no passengers + fn safe_fall_distance(&mut self) -> Result<f64> { + self.world.player.attribute("minecraft:safe_fall_distance") + } + fn fall_damage_multiplier(&mut self) -> Result<f64> { + self.world + .player + .attribute("minecraft:fall_damage_multiplier") + } + fn fall_sound(&mut self, big: bool) -> Result<SceneSound> { + self.world.living_fall_sound(big) + } + fn play_fall_sound(&mut self, sound: SceneSound) -> Result<()> { + self.world.entity_sound(sound, 1.0, 1.0) + } + fn play_block_fall_sound(&mut self) -> Result<()> { + self.world.fall_event(FallEvent::BlockFallSound); + Ok(()) + } + fn hurt(&mut self, amount: f32) -> Result<()> { + self.world.fall_event(FallEvent::Damage { + source: self.source, + amount, + }); + let resources = &self.world.resources.health; + self.world.player.hurt( + resources, + self.world.scene.health_rules, + resources.landing_source(self.source), + amount, + )?; + Ok(()) + } +} diff --git a/crates/horizon-client/src/lib.rs b/crates/horizon-client/src/lib.rs new file mode 100644 index 000000000..00265cade --- /dev/null +++ b/crates/horizon-client/src/lib.rs @@ -0,0 +1,41 @@ +//! Horizon native client: resources, world streaming, rendering and the +//! bindings between the validated simulation pieces and the game loop. +#![forbid(unsafe_code)] +pub mod assets; +pub mod attribute_updates; +pub mod audio; +pub mod biome; +pub mod blocks; +pub mod chunk; +pub mod clock; +pub mod containers; +pub mod control; +pub mod crafting; +pub mod creative; +pub mod collisions; +pub mod entities; +pub mod environment; +pub mod gfx; +pub mod health; +pub mod hud; +pub mod hunger; +pub mod input; +pub mod items; +pub mod landing; +pub mod light; +pub mod mesher; +pub mod mobs; +pub mod models; +pub mod motion; +pub mod particles; +pub mod pose; +pub mod save; +pub mod settings; +pub mod sprint; +pub mod sprites; +pub mod streaming; +pub mod testgen; +pub mod title; +pub mod vanillagen; +pub mod world; +pub type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>; diff --git a/crates/horizon-client/src/light.rs b/crates/horizon-client/src/light.rs new file mode 100644 index 000000000..5f479e3f1 --- /dev/null +++ b/crates/horizon-client/src/light.rs @@ -0,0 +1,186 @@ +//! Sky and block light for one chunk, flood-filled over its 3x3 neighbourhood +//! with vanilla's rules: sky sources run down each column until an edge is +//! occluded (`ChunkSkyLightSources`), and light then spreads losing +//! `max(1, dampening)` per step (`LightEngine.getOpacity`). Light can travel at +//! most 15 blocks, so the 48-wide region determines the centre exactly, apart +//! from face-shape occlusion of partial blocks (slabs, stairs), which is not +//! modelled yet. +use crate::{ + blocks::BlockFacts, + chunk::{Chunk, HEIGHT, Light, SECTIONS, Section, index}, +}; +use std::{collections::VecDeque, sync::Arc}; + +const W: usize = 48; +#[derive(Clone, Copy)] +struct Cell { + dampening: u8, + emission: u8, +} +pub struct LightTables { + cells: Vec<Cell>, +} +impl LightTables { + pub fn new(facts: &BlockFacts) -> Self { + Self { + cells: facts + .states + .iter() + .map(|s| Cell { + dampening: s.dampening.min(15), + emission: s.emission.min(15), + }) + .collect(), + } + } +} +/// `region[dz][dx]` holds the chunks around the centre (index 1,1). +/// `sky` is false in dimensions without skylight (the Nether). +pub fn light_chunk(region: &[[Option<&Chunk>; 3]; 3], tables: &LightTables, sky_light: bool) -> Vec<Arc<Section>> { + let center = region[1][1].expect("centre chunk"); + // Highest occupied section in the region bounds the work. + let mut top_section = 0; + for chunk in region.iter().flatten().flatten() { + for (i, s) in chunk.sections.iter().enumerate().rev() { + if !s.is_uniform(0) { + top_section = top_section.max(i + 1); + break; + } + } + } + let h = (top_section * 16 + 1).min(HEIGHT as usize); + let at = |x: usize, y: usize, z: usize| (y * W + z) * W + x; + let mut damp = vec![0u8; W * W * h]; + let mut sky = vec![0u8; W * W * h]; + let mut block = vec![0u8; W * W * h]; + let mut queue = VecDeque::new(); + let mut sky_queue = VecDeque::new(); + for (dz, row) in region.iter().enumerate() { + for (dx, chunk) in row.iter().enumerate() { + let Some(chunk) = chunk else { continue }; + for (si, section) in chunk.sections.iter().enumerate().take(top_section) { + if section.is_uniform(0) { + continue; + } + for i in 0..4096 { + let id = section.get(i) as usize; + let cell = tables.cells[id]; + let (lx, lz, ly) = (i & 15, (i >> 4) & 15, i >> 8); + let p = at(dx * 16 + lx, si * 16 + ly, dz * 16 + lz); + damp[p] = cell.dampening; + if cell.emission > 0 { + block[p] = cell.emission; + queue.push_back(p as u32); + } + } + } + } + } + // Columns of missing neighbour chunks contribute no light. + let present = |x: usize, z: usize| region[z / 16][x / 16].is_some(); + let mut lowest = vec![h as i32; W * W]; + for z in 0..W { + for x in 0..W { + if !present(x, z) || !sky_light { + continue; + } + let mut y = h as i32 - 1; + // The top layer (above the occupied range) is always open sky. + while y >= 0 && damp[at(x, y as usize, z)] == 0 { + sky[at(x, y as usize, z)] = 15; + y -= 1; + } + lowest[z * W + x] = y + 1; + } + } + for z in 0..W { + for x in 0..W { + if !present(x, z) || !sky_light { + continue; + } + let own = lowest[z * W + x]; + let mut deepest = own; + for (nx, nz) in [(x.wrapping_sub(1), z), (x + 1, z), (x, z.wrapping_sub(1)), (x, z + 1)] { + if nx < W && nz < W && present(nx, nz) { + deepest = deepest.max(lowest[nz * W + nx]); + } + } + // Seed propagation from the source cells that border darker cells. + let from = own.max(0) as usize; + let to = (deepest as usize).min(h - 1); + for y in from..=to { + if sky[at(x, y, z)] == 15 { + sky_queue.push_back(at(x, y, z) as u32); + } + } + } + } + let spread = |light: &mut [u8], queue: &mut VecDeque<u32>| { + while let Some(p) = queue.pop_front() { + let p = p as usize; + let level = light[p]; + if level <= 1 { + continue; + } + let x = p % W; + let z = (p / W) % W; + let y = p / (W * W); + let mut visit = |q: usize| { + let next = level.saturating_sub(damp[q].max(1)); + if next > light[q] { + light[q] = next; + queue.push_back(q as u32); + } + }; + if x > 0 { + visit(p - 1); + } + if x + 1 < W { + visit(p + 1); + } + if z > 0 { + visit(p - W); + } + if z + 1 < W { + visit(p + W); + } + if y > 0 { + visit(p - W * W); + } + if y + 1 < h { + visit(p + W * W); + } + } + }; + spread(&mut sky, &mut sky_queue); + spread(&mut block, &mut queue); + let mut sections = Vec::with_capacity(SECTIONS); + for (si, section) in center.sections.iter().enumerate() { + let mut out = (**section).clone(); + let open = if sky_light { 0xF0 } else { 0x00 }; + if si * 16 >= h { + out.light = Light::Uniform(open); + } else { + let mut data = Box::new([0u8; 4096]); + for ly in 0..16 { + let y = si * 16 + ly; + if y >= h { + for i in 0..256 { + data[ly << 8 | i] = open; + } + continue; + } + for lz in 0..16 { + for lx in 0..16 { + let p = at(16 + lx, y, 16 + lz); + data[index(lx as i32, ly as i32, lz as i32)] = sky[p] << 4 | block[p]; + } + } + } + out.light = Light::Full(data); + } + out.compact(); + sections.push(Arc::new(out)); + } + sections +} diff --git a/crates/horizon-client/src/main.rs b/crates/horizon-client/src/main.rs new file mode 100644 index 000000000..a9fb16aa8 --- /dev/null +++ b/crates/horizon-client/src/main.rs @@ -0,0 +1,10 @@ +//! Horizon: native Rust client for Minecraft Java Edition 26.3 gameplay. +#![forbid(unsafe_code)] +mod game; + +fn main() { + if let Err(error) = game::run() { + eprintln!("Horizon: {error}"); + std::process::exit(1); + } +} diff --git a/crates/horizon-client/src/mesher.rs b/crates/horizon-client/src/mesher.rs new file mode 100644 index 000000000..28750057a --- /dev/null +++ b/crates/horizon-client/src/mesher.rs @@ -0,0 +1,731 @@ +//! Section meshing on worker threads. Faces follow the baked blockstate models +//! with vanilla's neighbour culling; vertex lighting follows +//! `ModelBlockRenderer`'s smooth-lighting blend (four samples per corner, zero +//! samples replaced by the centre) and ambient-occlusion shade brightness. +//! Fluids follow `FluidRenderer` (corner heights, still/flowing sprites). +use crate::{ + assets::Assets, + biome::Biomes, + blocks::{BlockFacts, Fluid, RenderShape}, + chunk::{Chunk, MIN_Y}, + models::catalog::BakedFace, +}; +use horizon_core::{geometry::Direction, position::BlockPos}; +use horizon_world::{block_render::FaceVisibility, registry::BlockStateId}; +use std::sync::Arc; + +#[repr(C)] +#[derive(Clone, Copy, Debug, bytemuck::Pod, bytemuck::Zeroable)] +pub struct Vertex { + /// Section-relative position. + pub pos: [f32; 3], + pub uv: [f32; 2], + pub layer: u32, + /// RGBA8: tint multiplied by directional shade and ambient occlusion. + pub color: u32, + /// Smooth light, 16x fixed point: sky in bits 0..8, block in bits 8..16. + pub light: u32, +} +pub struct SectionMesh { + pub solid: Vec<Vertex>, + pub translucent: Vec<Vertex>, + /// VisGraph: bit `a * 6 + b` is set when faces `a` and `b` (Direction + /// order) are connected through non-opaque blocks. + pub visibility: u64, +} +impl Default for SectionMesh { + fn default() -> Self { + Self { solid: Vec::new(), translucent: Vec::new(), visibility: ALL_VISIBLE } + } +} +pub const ALL_VISIBLE: u64 = (1 << 36) - 1; +/// VisGraph.resolve: flood fill non-opaque cells and connect the faces each region touches. +fn visibility(pad: &Padded, info: &[Info]) -> u64 { + let mut seen = vec![false; 4096]; + let mut result = 0u64; + let opaque = |x: i32, y: i32, z: i32| info[pad.blocks[pi(x, y, z)] as usize].solid; + let mut stack = Vec::new(); + for start in 0..4096usize { + let (x, y, z) = ((start & 15) as i32, (start >> 8) as i32, ((start >> 4) & 15) as i32); + if seen[start] || opaque(x, y, z) { + continue; + } + let mut faces = 0u8; + seen[start] = true; + stack.push(start); + while let Some(c) = stack.pop() { + let (x, y, z) = ((c & 15) as i32, (c >> 8) as i32, ((c >> 4) & 15) as i32); + if y == 0 { faces |= 1 << 0; } + if y == 15 { faces |= 1 << 1; } + if z == 0 { faces |= 1 << 2; } + if z == 15 { faces |= 1 << 3; } + if x == 0 { faces |= 1 << 4; } + if x == 15 { faces |= 1 << 5; } + for (dx, dy, dz) in [(1, 0, 0), (-1, 0, 0), (0, 1, 0), (0, -1, 0), (0, 0, 1), (0, 0, -1)] { + let (nx, ny, nz) = (x + dx, y + dy, z + dz); + if !(0..16).contains(&nx) || !(0..16).contains(&ny) || !(0..16).contains(&nz) { + continue; + } + let n = (ny << 8 | nz << 4 | nx) as usize; + if !seen[n] && !opaque(nx, ny, nz) { + seen[n] = true; + stack.push(n); + } + } + } + for a in 0..6 { + if faces & (1 << a) != 0 { + for b in 0..6 { + if faces & (1 << b) != 0 { + result |= 1 << (a * 6 + b); + } + } + } + } + } + result +} +#[derive(Clone, Copy, PartialEq, Eq)] +enum Tint { + None, + Grass, + TallGrassUpper, + Foliage, + DryFoliage, + Water, + Constant(u32), + Redstone(u8), + Stem(u8), +} +/// Per-state data the mesher needs on every block, flattened for speed. +#[derive(Clone, Copy)] +struct Info { + solid: bool, + /// `isCollisionShapeFullBlock` drives the 0.2 AO shade brightness. + full: bool, + /// Side blocks that are transparent let the AO corner sample through. + translucent: bool, + emission: u8, + fluid: Fluid, + level: u8, + model: bool, + tints: [Tint; 2], +} +pub struct MeshTables { + info: Vec<Info>, + pub visibility: FaceVisibility, + water_still: u32, + water_flow: u32, + lava_still: u32, + lava_flow: u32, +} +fn redstone_color(power: u8) -> u32 { + // RedstoneWireBlock.COLORS + let f = f32::from(power) / 15.0; + let r = f * 0.6 + if f > 0.0 { 0.4 } else { 0.3 }; + let g = (f * f * 0.7 - 0.5).clamp(0.0, 1.0); + let b = (f * f * 0.6 - 0.7).clamp(0.0, 1.0); + ((r * 255.0) as u32) << 16 | ((g * 255.0) as u32) << 8 | (b * 255.0) as u32 +} +impl MeshTables { + pub fn new( + assets: &Assets, + facts: &BlockFacts, + visibility: FaceVisibility, + ) -> crate::Result<Self> { + let layer = |name: &str| -> crate::Result<u32> { + assets + .sprite_layers + .get(name) + .copied() + .ok_or_else(|| format!("missing fluid sprite {name}").into()) + }; + let info = facts + .states + .iter() + .enumerate() + .map(|(id, s)| { + let props = assets + .registry + .state(BlockStateId(id as u32)) + .map(|s| &s.properties); + let prop = |k: &str| -> u8 { + props + .and_then(|p| p.get(k)) + .and_then(|v| v.parse().ok()) + .unwrap_or(0) + }; + let name = s.name.strip_prefix("minecraft:").unwrap_or(&s.name); + let tints = match name { + "large_fern" | "tall_grass" => { + if props.and_then(|p| p.get("half")).map(String::as_str) == Some("upper") { + [Tint::TallGrassUpper; 2] + } else { + [Tint::Grass; 2] + } + } + "fern" | "short_grass" | "potted_fern" | "bush" | "grass_block" + | "sugar_cane" => [Tint::Grass; 2], + "pink_petals" | "wildflowers" => [Tint::None, Tint::Grass], + "spruce_leaves" => [Tint::Constant(0x61_9961); 2], + "birch_leaves" => [Tint::Constant(0x80_A755); 2], + "oak_leaves" | "jungle_leaves" | "acacia_leaves" | "dark_oak_leaves" + | "vine" | "mangrove_leaves" => [Tint::Foliage; 2], + "leaf_litter" => [Tint::DryFoliage; 2], + "water_cauldron" | "water" | "bubble_column" => [Tint::Water; 2], + "redstone_wire" => [Tint::Redstone(prop("power")); 2], + "attached_melon_stem" | "attached_pumpkin_stem" => { + [Tint::Constant(0xE0_C71C); 2] + } + "melon_stem" | "pumpkin_stem" => [Tint::Stem(prop("age")); 2], + "lily_pad" => [Tint::Constant(0x20_8030); 2], + _ => [Tint::None; 2], + }; + Info { + solid: s.solid_render, + full: s.full_collision, + translucent: !s.solid_render || s.dampening == 0, + emission: s.emission, + fluid: s.fluid, + level: s.fluid_level, + model: s.render_shape == RenderShape::Model, + tints, + } + }) + .collect(); + Ok(Self { + info, + visibility, + water_still: layer("minecraft:block/water_still")?, + water_flow: layer("minecraft:block/water_flow")?, + lava_still: layer("minecraft:block/lava_still")?, + lava_flow: layer("minecraft:block/lava_flow")?, + }) + } +} +const P: usize = 18; +#[inline] +fn pi(x: i32, y: i32, z: i32) -> usize { + ((y + 1) as usize * P + (z + 1) as usize) * P + (x + 1) as usize +} +/// Blocks and light of one section plus a one-block border. +struct Padded { + blocks: Vec<u16>, + light: Vec<u8>, +} +impl Padded { + fn new(region: &[[Option<&Chunk>; 3]; 3], sy: i32) -> Self { + let mut blocks = vec![0u16; P * P * P]; + let mut light = vec![0u8; P * P * P]; + let base_y = MIN_Y + sy * 16; + for y in -1..17 { + let wy = base_y + y; + for z in -1..17i32 { + for x in -1..17i32 { + let chunk = region[((z + 16) >> 4) as usize][((x + 16) >> 4) as usize]; + let i = pi(x, y, z); + if let Some(c) = chunk { + blocks[i] = c.get(x & 15, wy, z & 15); + light[i] = c.light(x & 15, wy, z & 15); + } else { + light[i] = 0xF0; + } + } + } + } + Self { blocks, light } + } +} +#[derive(Clone, Copy)] +struct Colors { + grass: [u32; 256], + tall_upper: [u32; 256], + foliage: [u32; 256], + dry: [u32; 256], + water: [u32; 256], +} +fn blend(region: &[[Option<&Chunk>; 3]; 3], biomes: &Biomes, cx: i32, cz: i32, y: i32) -> Colors { + // Vanilla blends over a (2r+1)^2 area; r = 2 is the default option. + const R: i32 = 2; + let biome_at = |x: i32, z: i32| -> u16 { + region[((z + 16) >> 4) as usize][((x + 16) >> 4) as usize] + .map_or(0, |c| c.biome(x & 15, y, z & 15)) + }; + let mut colors = Colors { + grass: [0; 256], + tall_upper: [0; 256], + foliage: [0; 256], + dry: [0; 256], + water: [0; 256], + }; + let avg = |f: &dyn Fn(u16, i32, i32) -> u32, x: i32, z: i32| -> u32 { + let (mut r, mut g, mut b) = (0, 0, 0); + for dz in -R..=R { + for dx in -R..=R { + let c = f(biome_at(x + dx, z + dz), x + dx, z + dz); + r += c >> 16 & 255; + g += c >> 8 & 255; + b += c & 255; + } + } + let n = ((2 * R + 1) * (2 * R + 1)) as u32; + (r / n) << 16 | (g / n) << 8 | b / n + }; + for z in 0..16 { + for x in 0..16 { + let i = (z * 16 + x) as usize; + let (wx, wz) = (cx * 16 + x, cz * 16 + z); + colors.grass[i] = avg( + &|b, dx, dz| biomes.grass(b, f64::from(wx + dx - x), f64::from(wz + dz - z)), + x, + z, + ); + colors.tall_upper[i] = colors.grass[i]; + colors.foliage[i] = avg(&|b, _, _| biomes.get(b).foliage, x, z); + colors.dry[i] = avg(&|b, _, _| biomes.get(b).dry_foliage, x, z); + colors.water[i] = avg(&|b, _, _| biomes.get(b).water, x, z); + } + } + colors +} +fn shade(direction: horizon_assets::model::Direction) -> f32 { + use horizon_assets::model::Direction as D; + match direction { + D::Down => 0.5, + D::Up => 1.0, + D::North | D::South => 0.8, + D::West | D::East => 0.6, + } +} +fn pack_color(rgb: u32, brightness: f32) -> u32 { + let r = ((rgb >> 16 & 255) as f32 * brightness) as u32; + let g = ((rgb >> 8 & 255) as f32 * brightness) as u32; + let b = ((rgb & 255) as f32 * brightness) as u32; + 0xFF00_0000 | b << 16 | g << 8 | r +} +fn pack_light(sky: f32, block: f32) -> u32 { + (sky * 16.0).clamp(0.0, 255.0) as u32 | ((block * 16.0).clamp(0.0, 255.0) as u32) << 8 +} +pub struct Mesher<'a> { + /// CardinalLighting.NETHER: brighter up/down faces. + pub nether_shading: bool, + pub assets: &'a Assets, + pub tables: &'a MeshTables, + pub biomes: &'a Biomes, + pub visibility: FaceVisibility, +} +impl Mesher<'_> { + /// `region[dz][dx]` are the chunks around the meshed column (centre 1,1). + pub fn mesh(&mut self, region: &[[Option<&Chunk>; 3]; 3], sy: i32) -> SectionMesh { + let mut out = SectionMesh::default(); + let center = region[1][1].expect("centre chunk"); + let section = ¢er.sections[sy as usize]; + if section.is_uniform(0) { + return out; + } + let pad = Padded::new(region, sy); + out.visibility = visibility(&pad, &self.tables.info); + let base_y = MIN_Y + sy * 16; + let colors = blend(region, self.biomes, center.x, center.z, base_y + 8); + let info = &self.tables.info; + for y in 0..16 { + for z in 0..16 { + for x in 0..16 { + let id = pad.blocks[pi(x, y, z)]; + if id == 0 { + continue; + } + let state = info[id as usize]; + if state.solid + && Direction::ALL.iter().all(|d| { + let [dx, dy, dz] = d.normal(); + info[pad.blocks[pi(x + dx, y + dy, z + dz)] as usize].solid + }) + { + continue; + } + if state.fluid != Fluid::None { + self.fluid(&pad, &colors, &mut out, x, y, z, id); + } + if !state.model { + continue; + } + let world = BlockPos::new(center.x * 16 + x, base_y + y, center.z * 16 + z); + let Ok(models) = self.assets.model_catalog.collect(BlockStateId(id.into()), world) + else { + continue; + }; + let mut visible = [false; 6]; + for d in Direction::ALL { + let [dx, dy, dz] = d.normal(); + let neighbor = pad.blocks[pi(x + dx, y + dy, z + dz)]; + visible[d as usize] = self + .visibility + .should_render_face( + BlockStateId(id.into()), + BlockStateId(neighbor.into()), + d, + true, + ) + .unwrap_or(true); + } + for (_, model) in models { + for face in &model.faces { + if face.quad.cull.is_some_and(|d| !visible[d as usize]) { + continue; + } + self.face( + &pad, + &colors, + &mut out, + [x, y, z], + face, + model.ambient_occlusion, + state, + ); + } + } + } + } + } + out + } + fn tint(state: Info, index: i32, colors: &Colors, x: i32, z: i32) -> u32 { + if index < 0 { + return 0xFF_FFFF; + } + let column = (z * 16 + x) as usize; + match state.tints[(index as usize).min(1)] { + Tint::None => 0xFF_FFFF, + Tint::Grass => colors.grass[column], + Tint::TallGrassUpper => colors.tall_upper[column], + Tint::Foliage => colors.foliage[column], + Tint::DryFoliage => colors.dry[column], + Tint::Water => colors.water[column], + Tint::Constant(c) => c, + Tint::Redstone(p) => redstone_color(p), + Tint::Stem(age) => { + let a = u32::from(age); + (a * 32) << 16 | (255 - a * 8) << 8 | a * 4 + } + } + } + #[allow(clippy::too_many_arguments)] + fn face( + &self, + pad: &Padded, + colors: &Colors, + out: &mut SectionMesh, + [x, y, z]: [i32; 3], + face: &BakedFace, + ao: bool, + state: Info, + ) { + let q = &face.quad; + let facing = q.facing; + let normal = Direction::ALL[facing as usize].normal(); + let axis = normal.iter().position(|&n| n != 0).unwrap_or(1); + let positive = normal[axis] > 0; + let on_boundary = q.positions.iter().all(|p| { + if positive { + p[axis] >= 1.0 - 1e-4 + } else { + p[axis] <= 1e-4 + } + }); + let base = if on_boundary { + [x + normal[0], y + normal[1], z + normal[2]] + } else { + [x, y, z] + }; + let tint = Self::tint(state, q.tint_index, colors, x, z); + let mut directional = match q.shade_direction_override { + Some(d) => shade(d), + None => shade(facing), + }; + if self.nether_shading && matches!(q.shade_direction_override.unwrap_or(facing), horizon_assets::model::Direction::Up | horizon_assets::model::Direction::Down) { + directional = 0.9; + } + let info = &self.tables.info; + let light_at = |p: [i32; 3]| -> u32 { + let i = pi(p[0], p[1], p[2]); + let packed = pad.light[i]; + let s = info[pad.blocks[i] as usize]; + let block = (packed & 15).max(s.emission); + u32::from(packed >> 4) << 16 | u32::from(block) + }; + let shade_at = |p: [i32; 3]| -> f32 { + if info[pad.blocks[pi(p[0], p[1], p[2])] as usize].full { + 0.2 + } else { + 1.0 + } + }; + let open_at = |p: [i32; 3]| -> bool { info[pad.blocks[pi(p[0], p[1], p[2])] as usize].translucent }; + // Tangent axes of the face plane. + let (ua, va) = match axis { + 0 => (2, 1), + 1 => (0, 2), + _ => (0, 1), + }; + let center_light = light_at(base); + let center_shade = shade_at(base); + // Corner values for (su, sv) in {0,1}^2 -> (sky, block, ao). + let mut corners = [[0f32; 3]; 4]; + for (ci, corner) in corners.iter_mut().enumerate() { + let su = if ci & 1 == 0 { -1 } else { 1 }; + let sv = if ci & 2 == 0 { -1 } else { 1 }; + let mut p1 = base; + p1[ua] += su; + let mut p2 = base; + p2[va] += sv; + let mut pc = base; + pc[ua] += su; + pc[va] += sv; + let (l1, l2) = (light_at(p1), light_at(p2)); + let (lc, ac) = if open_at(p1) || open_at(p2) { + (light_at(pc), shade_at(pc)) + } else { + (l1, shade_at(p1)) + }; + // ModelBlockRenderer.blend: zero samples take the centre value. + let fix = |v: u32| if v == 0 { center_light } else { v }; + let sum = fix(l1) + fix(l2) + fix(lc) + center_light; + corner[0] = (sum >> 16) as f32 / 4.0; + corner[1] = (sum & 0xFFFF) as f32 / 4.0; + corner[2] = (shade_at(p1) + shade_at(p2) + ac + center_shade) / 4.0; + } + let flat_sky = (center_light >> 16) as f32; + let flat_block = (center_light & 0xFFFF) as f32; + let target = if face.translucent { + &mut out.translucent + } else { + &mut out.solid + }; + for (p, uv) in q.positions.iter().zip(q.uv) { + let (sky, block, occlusion) = if ao { + let u = p[ua].clamp(0.0, 1.0); + let v = p[va].clamp(0.0, 1.0); + let lerp = |k: usize| { + let a = corners[0][k] * (1.0 - u) + corners[1][k] * u; + let b = corners[2][k] * (1.0 - u) + corners[3][k] * u; + a * (1.0 - v) + b * v + }; + (lerp(0), lerp(1), lerp(2)) + } else { + (flat_sky, flat_block, 1.0) + }; + target.push(Vertex { + pos: [p[0] + x as f32, p[1] + y as f32, p[2] + z as f32], + uv, + layer: face.layer, + color: pack_color(tint, directional * occlusion), + light: pack_light(sky, block), + }); + } + } + #[allow(clippy::too_many_arguments)] + fn fluid(&self, pad: &Padded, colors: &Colors, out: &mut SectionMesh, x: i32, y: i32, z: i32, id: u16) { + let info = &self.tables.info; + let me = info[id as usize]; + let water = me.fluid == Fluid::Water; + let same = |p: [i32; 3]| info[pad.blocks[pi(p[0], p[1], p[2])] as usize].fluid == me.fluid; + let solid = |p: [i32; 3]| { + let s = info[pad.blocks[pi(p[0], p[1], p[2])] as usize]; + s.solid || s.full + }; + let height = |p: [i32; 3]| -> f32 { + let s = info[pad.blocks[pi(p[0], p[1], p[2])] as usize]; + if s.fluid == me.fluid { + if same([p[0], p[1] + 1, p[2]]) { + 1.0 + } else { + f32::from(s.level) / 9.0 + } + } else if !(s.solid || s.full) { + 0.0 + } else { + -1.0 + } + }; + let own = height([x, y, z]); + let corner = |a: f32, b: f32, c: [i32; 3]| -> f32 { + if a >= 1.0 || b >= 1.0 { + return 1.0; + } + let mut sum = [0.0f32; 2]; + let mut add = |h: f32| { + if h >= 0.8 { + sum[0] += h * 10.0; + sum[1] += 10.0; + } else if h >= 0.0 { + sum[0] += h; + sum[1] += 1.0; + } + }; + if a > 0.0 || b > 0.0 { + let hc = height(c); + if hc >= 1.0 { + return 1.0; + } + add(hc); + } + add(own); + add(a); + add(b); + sum[0] / sum[1] + }; + let (nw, sw, se, ne) = if own >= 1.0 { + (1.0, 1.0, 1.0, 1.0) + } else { + let n = height([x, y, z - 1]); + let s = height([x, y, z + 1]); + let e = height([x + 1, y, z]); + let w = height([x - 1, y, z]); + ( + corner(n, w, [x - 1, y, z - 1]), + corner(s, w, [x - 1, y, z + 1]), + corner(s, e, [x + 1, y, z + 1]), + corner(n, e, [x + 1, y, z - 1]), + ) + }; + let tint = if water { + colors.water[(z * 16 + x) as usize] + } else { + 0xFF_FFFF + }; + let (still, flow) = if water { + (self.tables.water_still, self.tables.water_flow) + } else { + (self.tables.lava_still, self.tables.lava_flow) + }; + let light = |p: [i32; 3]| { + let packed = pad.light[pi(p[0], p[1], p[2])]; + let emission = if water { 0 } else { 15 }; + pack_light(f32::from(packed >> 4), f32::from((packed & 15).max(emission))) + }; + let target = if water { + &mut out.translucent + } else { + &mut out.solid + }; + let (fx, fy, fz) = (x as f32, y as f32, z as f32); + let quad = |target: &mut Vec<Vertex>, v: [([f32; 3], [f32; 2]); 4], layer: u32, b: f32, l: u32, back: bool| { + for (p, uv) in v { + target.push(Vertex { + pos: p, + uv, + layer, + color: pack_color(tint, b), + light: l, + }); + } + if back { + for i in [0, 3, 2, 1] { + let (p, uv) = v[i]; + target.push(Vertex { + pos: p, + uv, + layer, + color: pack_color(tint, b), + light: l, + }); + } + } + }; + let above_same = same([x, y + 1, z]); + if !above_same && !solid([x, y + 1, z]) || !above_same && own < 1.0 { + let o = 0.001; + let (h0, h1, h2, h3) = (nw - o, sw - o, se - o, ne - o); + // Flow direction from neighbour height differences. + let mut fxv = 0.0f32; + let mut fzv = 0.0f32; + if own < 1.0 && me.level < 8 || own < 0.88 { + for (dx, dz) in [(1, 0), (-1, 0), (0, 1), (0, -1)] { + let h = height([x + dx, y, z + dz]); + if h >= 0.0 { + let d = own - h.max(0.0); + fxv += dx as f32 * d; + fzv += dz as f32 * d; + } + } + } + let (layer, uvs) = if fxv.abs() < 1e-4 && fzv.abs() < 1e-4 { + (still, [[0.0, 0.0], [0.0, 1.0], [1.0, 1.0], [1.0, 0.0]]) + } else { + let angle = fzv.atan2(fxv) - std::f32::consts::FRAC_PI_2; + let (s, c) = (angle.sin() * 0.25, angle.cos() * 0.25); + // Flowing sprites are sampled over their top-left quarter-scaled region (getU(0.5+..) of 16 units). + ( + flow, + [ + [0.5 + (-c - s), 0.5 + (-c + s)], + [0.5 + (-c + s), 0.5 + (c + s)], + [0.5 + (c + s), 0.5 + (c - s)], + [0.5 + (c - s), 0.5 + (-c - s)], + ], + ) + }; + quad( + target, + [ + ([fx, fy + h0, fz], uvs[0]), + ([fx, fy + h1, fz + 1.0], uvs[1]), + ([fx + 1.0, fy + h2, fz + 1.0], uvs[2]), + ([fx + 1.0, fy + h3, fz], uvs[3]), + ], + layer, + 1.0, + light([x, y, z]), + water && !solid([x, y + 1, z]), + ); + } + if !same([x, y - 1, z]) && !solid([x, y - 1, z]) { + quad( + target, + [ + ([fx, fy + 0.001, fz], [0.0, 0.0]), + ([fx + 1.0, fy + 0.001, fz], [1.0, 0.0]), + ([fx + 1.0, fy + 0.001, fz + 1.0], [1.0, 1.0]), + ([fx, fy + 0.001, fz + 1.0], [0.0, 1.0]), + ], + still, + 0.5, + light([x, y - 1, z]), + false, + ); + } + let o = 0.001; + for (dx, dz, h0, h1, p0, p1, sh) in [ + (0, -1, nw, ne, [fx, fz + o], [fx + 1.0, fz + o], 0.8), + (0, 1, se, sw, [fx + 1.0, fz + 1.0 - o], [fx, fz + 1.0 - o], 0.8), + (-1, 0, sw, nw, [fx + o, fz + 1.0], [fx + o, fz], 0.6), + (1, 0, ne, se, [fx + 1.0 - o, fz], [fx + 1.0 - o, fz + 1.0], 0.6), + ] { + let n = [x + dx, y, z + dz]; + if same(n) || solid(n) { + continue; + } + let v0 = (1.0 - h0) * 0.5; + let v1 = (1.0 - h1) * 0.5; + quad( + target, + [ + ([p0[0], fy + h0, p0[1]], [0.0, v0]), + ([p1[0], fy + h1, p1[1]], [0.5, v1]), + ([p1[0], fy, p1[1]], [0.5, 0.5]), + ([p0[0], fy, p0[1]], [0.0, 0.5]), + ], + flow, + sh, + light([x, y, z]), + water, + ); + } + } +} +/// Snapshot of the 3x3 chunk neighbourhood used by a worker job. +pub type Region = [[Option<Arc<Chunk>>; 3]; 3]; +pub fn borrow(region: &Region) -> [[Option<&Chunk>; 3]; 3] { + std::array::from_fn(|z| std::array::from_fn(|x| region[z][x].as_deref())) +} diff --git a/crates/horizon-client/src/mobs.rs b/crates/horizon-client/src/mobs.rs new file mode 100644 index 000000000..047d99d5a --- /dev/null +++ b/crates/horizon-client/src/mobs.rs @@ -0,0 +1,652 @@ +//! Mobs: entity types (dimensions and default attributes exported from vanilla), +//! models (vanilla `LayerDefinitions` baked part trees), `LivingEntity.travel` +//! movement with step-up and jumping, and goal-style AI for the common +//! overworld mobs (strolling, panicking, chasing, melee, creeper swelling). +use crate::{ + blocks::{BlockFacts, Fluid}, + collisions::SceneCollisions, + mesher::Vertex, + world::World, +}; +use horizon_core::{ + geometry::{Aabb, Vec3}, + random::{LegacyRandom, RandomSource}, +}; +use horizon_world::block_collision::BlockCollisionRegistry; +use serde_json::Value; +use std::{collections::HashMap, fs, path::Path, sync::Arc}; + +#[derive(Clone, Debug)] +pub struct Polygon { + pub vertices: [[f32; 5]; 4], +} +#[derive(Clone, Debug)] +pub struct Part { + pub name: String, + /// x, y, z, xRot, yRot, zRot, xScale, yScale, zScale + pub pose: [f32; 9], + pub polygons: Vec<Polygon>, + pub children: Vec<Part>, +} +impl Part { + fn parse(name: &str, v: &Value) -> Self { + let pose: Vec<f32> = v["pose"].as_array().into_iter().flatten().map(|x| x.as_f64().unwrap_or(0.0) as f32).collect(); + let mut p = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0]; + for (i, x) in pose.iter().enumerate().take(9) { + p[i] = *x; + } + let polygons = v["polygons"] + .as_array() + .into_iter() + .flatten() + .filter_map(|poly| { + let verts: Vec<[f32; 5]> = poly + .as_array()? + .iter() + .map(|vx| { + let a: Vec<f32> = vx.as_array().into_iter().flatten().map(|x| x.as_f64().unwrap_or(0.0) as f32).collect(); + [a[0], a[1], a[2], a[3], a[4]] + }) + .collect(); + (verts.len() == 4).then(|| Polygon { vertices: [verts[0], verts[1], verts[2], verts[3]] }) + }) + .collect(); + let mut children: Vec<Part> = v["children"] + .as_object() + .into_iter() + .flatten() + .map(|(k, c)| Part::parse(k, c)) + .collect(); + children.sort_by(|a, b| a.name.cmp(&b.name)); + Self { name: name.to_owned(), pose: p, polygons, children } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Brain { + Passive, + Chicken, + Zombie, + Skeleton, + Spider, + Creeper, +} +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum Anim { + Quadruped, + Humanoid { zombie_arms: bool }, + Creeper, + Spider, + Chicken, +} +#[derive(Clone, Debug)] +pub struct MobType { + pub id: String, + pub width: f64, + pub height: f64, + pub eye_height: f64, + pub category: String, + pub max_health: f32, + pub speed: f64, + pub attack_damage: f32, + pub follow_range: f64, + pub step_height: f64, + pub model: Arc<Part>, + pub texture: String, + pub brain: Brain, + pub anim: Anim, + pub sounds: [&'static str; 3], +} +pub struct MobTypes { + pub types: HashMap<String, MobType>, +} +impl MobTypes { + pub fn load(root: &Path) -> crate::Result<Self> { + let types: Value = serde_json::from_slice(&fs::read(root.join("entity-types.json"))?)?; + let models: Value = serde_json::from_slice(&fs::read(root.join("entity-models.json"))?)?; + // Vanilla renderers' default texture per supported mob. + let table: [(&str, &str, Brain, Anim, [&str; 3]); 9] = [ + ("pig", "entity/pig/pig_temperate", Brain::Passive, Anim::Quadruped, ["entity.pig.ambient", "entity.pig.hurt", "entity.pig.death"]), + ("cow", "entity/cow/cow_temperate", Brain::Passive, Anim::Quadruped, ["entity.cow.ambient", "entity.cow.hurt", "entity.cow.death"]), + ("sheep", "entity/sheep/sheep", Brain::Passive, Anim::Quadruped, ["entity.sheep.ambient", "entity.sheep.hurt", "entity.sheep.death"]), + ("chicken", "entity/chicken/chicken_temperate", Brain::Chicken, Anim::Chicken, ["entity.chicken.ambient", "entity.chicken.hurt", "entity.chicken.death"]), + ("zombie", "entity/zombie/zombie", Brain::Zombie, Anim::Humanoid { zombie_arms: true }, ["entity.zombie.ambient", "entity.zombie.hurt", "entity.zombie.death"]), + ("skeleton", "entity/skeleton/skeleton", Brain::Skeleton, Anim::Humanoid { zombie_arms: false }, ["entity.skeleton.ambient", "entity.skeleton.hurt", "entity.skeleton.death"]), + ("spider", "entity/spider/spider", Brain::Spider, Anim::Spider, ["entity.spider.ambient", "entity.spider.hurt", "entity.spider.death"]), + ("creeper", "entity/creeper/creeper", Brain::Creeper, Anim::Creeper, ["entity.creeper.primed", "entity.creeper.hurt", "entity.creeper.death"]), + ("cave_spider", "entity/spider/cave_spider", Brain::Spider, Anim::Spider, ["entity.spider.ambient", "entity.spider.hurt", "entity.spider.death"]), + ]; + let mut out = HashMap::new(); + for (name, texture, brain, anim, sounds) in table { + let id = format!("minecraft:{name}"); + let t = &types[&id]; + let model_key = if name == "cave_spider" { "minecraft:cave_spider#main".to_owned() } else { format!("{id}#main") }; + let model_value = models.get(&model_key).or_else(|| models.get(&format!("{id}#main"))); + let Some(model) = model_value else { continue }; + let attr = |k: &str| t["attributes"][k].as_f64(); + let texture = if root.join(format!("assets/minecraft/textures/{texture}.png")).exists() { + texture.to_owned() + } else { + // Fall back to the first texture in the entity's folder. + let folder = texture.rsplit_once('/').map_or(texture, |(a, _)| a); + fs::read_dir(root.join(format!("assets/minecraft/textures/{folder}"))) + .ok() + .and_then(|d| { + let mut names: Vec<String> = d.flatten().filter_map(|e| e.file_name().to_str().map(str::to_owned)).filter(|n| n.ends_with(".png") && !n.contains("baby")).collect(); + names.sort(); + names.first().map(|n| format!("{folder}/{}", n.trim_end_matches(".png"))) + }) + .unwrap_or_else(|| texture.to_owned()) + }; + out.insert( + id.clone(), + MobType { + width: t["width"].as_f64().unwrap_or(0.6), + height: t["height"].as_f64().unwrap_or(1.8), + eye_height: t["eye_height"].as_f64().unwrap_or(1.6), + category: t["category"].as_str().unwrap_or("creature").to_owned(), + max_health: attr("minecraft:max_health").unwrap_or(10.0) as f32, + speed: attr("minecraft:movement_speed").unwrap_or(0.25), + attack_damage: attr("minecraft:attack_damage").unwrap_or(0.0) as f32, + follow_range: attr("minecraft:follow_range").unwrap_or(16.0), + step_height: attr("minecraft:step_height").unwrap_or(0.6), + model: Arc::new(Part::parse("root", model)), + texture, + brain, + anim, + sounds: sounds.map(|s| s), + id, + }, + ); + } + Ok(Self { types: out }) + } +} +#[derive(Clone, Debug)] +pub struct Mob { + pub id: u32, + pub kind: Arc<MobType>, + pub position: Vec3, + pub previous: Vec3, + pub velocity: Vec3, + pub yaw: f32, + pub previous_yaw: f32, + pub body_yaw: f32, + pub previous_body_yaw: f32, + pub head_pitch: f32, + pub on_ground: bool, + pub horizontal_collision: bool, + pub health: f32, + pub hurt_time: i32, + pub invulnerable: i32, + pub death_time: i32, + pub age: u32, + pub limb_position: f32, + pub limb_speed: f32, + pub previous_limb_speed: f32, + pub target: Option<[f64; 3]>, + pub speed_modifier: f64, + pub panic: i32, + pub attack_cooldown: i32, + pub swell: i32, + pub previous_swell: i32, + pub ambient_timer: i32, + pub fall_distance: f64, + pub persistent: bool, + pub idle: u32, +} +/// Events a mob tick asks the game to act on. +#[derive(Clone, Debug)] +pub enum MobEvent { + Sound(&'static str, [f64; 3], f32, f32), + AttackPlayer(f32, [f64; 3]), + Shoot([f64; 3], [f64; 3]), + Explode([f64; 3], f32), +} +pub struct MobWorld<'a> { + pub world: &'a World, + pub facts: &'a BlockFacts, + pub collision: &'a BlockCollisionRegistry<'a>, + pub player: Option<([f64; 3], bool)>, + pub daylight: bool, +} +fn wrap(a: f32) -> f32 { + let mut a = a % 360.0; + if a >= 180.0 { + a -= 360.0; + } + if a < -180.0 { + a += 360.0; + } + a +} +impl Mob { + pub fn new(id: u32, kind: Arc<MobType>, position: Vec3, yaw: f32) -> Self { + Self { + id, + health: kind.max_health, + kind, + position, + previous: position, + velocity: Vec3::ZERO, + yaw, + previous_yaw: yaw, + body_yaw: yaw, + previous_body_yaw: yaw, + head_pitch: 0.0, + on_ground: false, + horizontal_collision: false, + hurt_time: 0, + invulnerable: 0, + death_time: 0, + age: 0, + limb_position: 0.0, + limb_speed: 0.0, + previous_limb_speed: 0.0, + target: None, + speed_modifier: 1.0, + panic: 0, + attack_cooldown: 0, + swell: 0, + previous_swell: 0, + ambient_timer: -80, + fall_distance: 0.0, + persistent: false, + idle: 0, + } + } + pub fn bounds(&self) -> Aabb { + let w = self.kind.width / 2.0; + Aabb::new( + Vec3::new(self.position.x - w, self.position.y, self.position.z - w), + Vec3::new(self.position.x + w, self.position.y + self.kind.height, self.position.z + w), + ) + } + pub fn alive(&self) -> bool { + self.health > 0.0 + } + pub fn hostile(&self) -> bool { + self.kind.category == "monster" + } + /// LivingEntity.hurt with invulnerability frames and knockback. + pub fn hurt(&mut self, amount: f32, from: Option<[f64; 3]>, random: &mut LegacyRandom) -> bool { + if !self.alive() || self.invulnerable > 10 { + return false; + } + self.health -= amount; + self.invulnerable = 20; + self.hurt_time = 10; + if let Some(f) = from { + // LivingEntity.knockback(0.4, dx, dz) + let (dx, dz) = (f[0] - self.position.x, f[2] - self.position.z); + let len = (dx * dx + dz * dz).sqrt().max(1e-4); + let strength = 0.4; + self.velocity = Vec3::new( + self.velocity.x / 2.0 - dx / len * strength, + if self.on_ground { (self.velocity.y / 2.0 + strength).min(0.4) } else { self.velocity.y }, + self.velocity.z / 2.0 - dz / len * strength, + ); + if !self.hostile() { + self.panic = 60 + random.next_int_bound(40).unwrap_or(0); + self.target = None; + } + } + true + } + fn random_target(&self, random: &mut LegacyRandom, w: &MobWorld, radius: i32) -> Option<[f64; 3]> { + // DefaultRandomPos.getPos: ten tries, prefer walkable spots. + for _ in 0..10 { + let x = self.position.x.floor() as i32 + random.next_int_bound(2 * radius + 1).ok()? - radius; + let z = self.position.z.floor() as i32 + random.next_int_bound(2 * radius + 1).ok()? - radius; + let mut y = self.position.y.floor() as i32 + random.next_int_bound(15).ok()? - 7; + if !w.world.loaded(x, z) { + continue; + } + let solid = |y: i32| w.facts.get(w.world.block(x, y, z)).full_collision; + while y > crate::chunk::MIN_Y && !solid(y - 1) { + y -= 1; + } + while solid(y) && y < 319 { + y += 1; + } + let below = w.facts.get(w.world.block(x, y - 1, z)); + if below.fluid != Fluid::None || &*below.name == "minecraft:lava" { + continue; + } + return Some([f64::from(x) + 0.5, f64::from(y), f64::from(z) + 0.5]); + } + None + } + pub fn tick(&mut self, w: &MobWorld, random: &mut LegacyRandom, events: &mut Vec<MobEvent>) -> bool { + self.previous = self.position; + self.previous_yaw = self.yaw; + self.previous_body_yaw = self.body_yaw; + self.previous_swell = self.swell; + self.age += 1; + if self.hurt_time > 0 { + self.hurt_time -= 1; + } + if self.invulnerable > 0 { + self.invulnerable -= 1; + } + if !self.alive() { + self.death_time += 1; + self.velocity = Vec3::new(0.0, self.velocity.y - 0.08, 0.0); + self.travel(w, 0.0); + return self.death_time < 20; + } + let center = [self.position.x, self.position.y + self.kind.eye_height, self.position.z]; + // Ambient sounds (Mob.playAmbientSound every ~80 ticks on average). + self.ambient_timer += 1; + if random.next_int_bound(1000).unwrap_or(1) < self.ambient_timer { + self.ambient_timer = -80; + if self.kind.brain != Brain::Creeper { + let pitch = (random.next_float() - random.next_float()) * 0.2 + 1.0; + events.push(MobEvent::Sound(self.kind.sounds[0], center, 1.0, pitch)); + } + } + let mut forward = 0.0f32; + let player = w.player.filter(|(_, alive)| *alive).map(|(p, _)| p); + let aggressive = match self.kind.brain { + Brain::Zombie | Brain::Skeleton | Brain::Creeper => true, + Brain::Spider => !w.daylight, + _ => false, + }; + let chase = if aggressive { + player.filter(|p| self.distance_to(*p) < self.kind.follow_range.min(24.0)) + } else { + None + }; + if self.attack_cooldown > 0 { + self.attack_cooldown -= 1; + } + if let Some(p) = chase { + let d = self.distance_to(p); + self.face(p, 30.0); + match self.kind.brain { + Brain::Creeper => { + // SwellGoal: fuse within 3 blocks, defuse beyond 7. + if d < 3.0 { + if self.swell == 0 { + events.push(MobEvent::Sound("entity.creeper.primed", center, 1.0, 0.5)); + } + self.swell += 1; + if self.swell >= 30 { + events.push(MobEvent::Explode([self.position.x, self.position.y, self.position.z], 3.0)); + self.health = 0.0; + self.death_time = 20; + return false; + } + } else { + self.swell = (self.swell - 1).max(0); + forward = 1.0; + } + } + Brain::Skeleton => { + // RangedBowAttackGoal: keep ~15 blocks, shoot every 20-40 ticks. + if d > 12.0 { + forward = 1.0; + } + if d < 15.0 && self.attack_cooldown == 0 { + events.push(MobEvent::Shoot(center, p)); + self.attack_cooldown = 20 + random.next_int_bound(20).unwrap_or(0); + } + } + _ => { + forward = 1.0; + let reach = self.kind.width * 2.0 * self.kind.width * 2.0 + 0.6; + let dx = p[0] - self.position.x; + let dz = p[2] - self.position.z; + if dx * dx + dz * dz <= reach.max(2.0) && (p[1] - self.position.y).abs() < 2.0 && self.attack_cooldown == 0 { + events.push(MobEvent::AttackPlayer(self.kind.attack_damage.max(2.0), [self.position.x, self.position.y, self.position.z])); + self.attack_cooldown = 20; + } + } + } + self.speed_modifier = 1.0; + self.idle = 0; + } else { + self.swell = (self.swell - 1).max(0); + if self.panic > 0 { + self.panic -= 1; + if self.target.is_none() || random.next_int_bound(20).unwrap_or(1) == 0 { + self.target = self.random_target(random, w, 5); + } + self.speed_modifier = if self.kind.brain == Brain::Chicken { 1.4 } else { 1.25 }; + } else if self.target.is_none() && random.next_int_bound(120).unwrap_or(1) == 0 { + // RandomStrollGoal(speed 1.0, interval 120) + self.target = self.random_target(random, w, 10); + self.speed_modifier = 1.0; + } + if let Some(t) = self.target { + let dx = t[0] - self.position.x; + let dz = t[2] - self.position.z; + if dx * dx + dz * dz < 0.5 || (self.horizontal_collision && random.next_int_bound(40).unwrap_or(1) == 0) { + self.target = None; + } else { + self.face(t, 30.0); + forward = 1.0; + } + } else if let Some(p) = player + && self.distance_to(p) < 8.0 + && random.next_float() < 0.02 + { + // LookAtPlayerGoal. + self.face(p, 10.0); + } + self.idle += 1; + } + // Body follows head (BodyRotationControl). + self.body_yaw += wrap(self.yaw - self.body_yaw) * 0.3; + // Daylight burning for undead. + if matches!(self.kind.brain, Brain::Zombie | Brain::Skeleton) && w.daylight && self.age % 20 == 0 { + let x = self.position.x.floor() as i32; + let z = self.position.z.floor() as i32; + let y = (self.position.y + self.kind.eye_height).floor() as i32; + if w.world.light(x, y, z) >> 4 == 15 && w.facts.get(w.world.block(x, y, z)).fluid == Fluid::None { + self.hurt(1.0, None, random); + } + } + let speed = (self.kind.speed * self.speed_modifier) as f32 * forward; + self.travel(w, speed); + // Limb animation (WalkAnimationState.update). + let dx = self.position.x - self.previous.x; + let dz = self.position.z - self.previous.z; + let moved = ((dx * dx + dz * dz).sqrt() * 4.0).min(1.0) as f32; + self.previous_limb_speed = self.limb_speed; + self.limb_speed += (moved - self.limb_speed) * 0.4; + self.limb_position += self.limb_speed; + // Despawn far monsters. + if self.hostile() && !self.persistent + && let Some(p) = player + { + let d = self.distance_to(p); + if d > 128.0 || (d > 32.0 && self.idle > 600 && random.next_int_bound(800).unwrap_or(1) == 0) { + return false; + } + } + self.position.y > -128.0 + } + fn distance_to(&self, p: [f64; 3]) -> f64 { + let d = [p[0] - self.position.x, p[1] - self.position.y, p[2] - self.position.z]; + (d[0] * d[0] + d[1] * d[1] + d[2] * d[2]).sqrt() + } + fn face(&mut self, p: [f64; 3], max: f32) { + let dx = p[0] - self.position.x; + let dz = p[2] - self.position.z; + let target = (dz.atan2(dx).to_degrees() as f32) - 90.0; + self.yaw += wrap(target - self.yaw).clamp(-max, max); + } + /// LivingEntity.travel (ground/air friction, gravity, step-up and jumping). + fn travel(&mut self, w: &MobWorld, speed: f32) { + let x = self.position.x.floor() as i32; + let z = self.position.z.floor() as i32; + let below = w.world.block(x, (self.position.y - 0.5).floor() as i32, z); + let in_water = w.facts.get(w.world.block(x, (self.position.y + 0.2).floor() as i32, z)).fluid != Fluid::None; + let friction = if self.on_ground { w.facts.get(below).friction * 0.91 } else { 0.91 }; + let acceleration = if in_water { + 0.02 + } else if self.on_ground { + f64::from(speed) * (0.216_000_02 / f64::from(friction * friction * friction)) + } else { + 0.02 * f64::from(speed > 0.0) + }; + if speed > 0.0 { + let yaw = f64::from(self.yaw).to_radians(); + self.velocity.x += -yaw.sin() * acceleration; + self.velocity.z += yaw.cos() * acceleration; + // JumpControl: hop when blocked by a full block. + if self.horizontal_collision && self.on_ground { + self.velocity.y = 0.42; + } + } + if in_water { + if speed > 0.0 || self.kind.brain != Brain::Passive { + self.velocity.y += 0.04; + } + self.velocity.y = self.velocity.y.min(0.1); + } + let mut scene = SceneCollisions { world: w.world, binding: w.collision }; + let wanted = self.velocity; + let moved = scene + .resolve(self.bounds(), wanted, self.kind.step_height as f32, self.on_ground) + .unwrap_or(Vec3::ZERO); + self.position = Vec3::new(self.position.x + moved.x, self.position.y + moved.y, self.position.z + moved.z); + self.horizontal_collision = (moved.x - wanted.x).abs() > 1e-6 || (moved.z - wanted.z).abs() > 1e-6; + let vertical = (moved.y - wanted.y).abs() > 1e-6; + self.on_ground = vertical && wanted.y < 0.0; + if vertical { + self.velocity.y = 0.0; + } + if self.horizontal_collision { + if (moved.x - wanted.x).abs() > 1e-6 { + self.velocity.x = 0.0; + } + if (moved.z - wanted.z).abs() > 1e-6 { + self.velocity.z = 0.0; + } + } + // Spiders climb walls. + if self.kind.brain == Brain::Spider && self.horizontal_collision { + self.velocity.y = 0.2; + } + if self.on_ground { + if self.fall_distance > 3.0 { + self.health -= (self.fall_distance - 3.0).ceil() as f32; + self.hurt_time = 10; + } + self.fall_distance = 0.0; + } else if moved.y < 0.0 { + self.fall_distance -= moved.y; + } + let gravity = if self.kind.brain == Brain::Chicken && self.velocity.y < 0.0 { 0.0 } else { 0.08 }; + if !in_water { + self.velocity.y -= gravity; + } + if self.kind.brain == Brain::Chicken && !self.on_ground && self.velocity.y < 0.0 { + // Chicken flapping: slow fall. + self.velocity.y *= 0.6; + } + let drag = if in_water { 0.8 } else { f64::from(friction) }; + self.velocity = Vec3::new(self.velocity.x * drag, self.velocity.y * 0.98, self.velocity.z * drag); + } +} +/// Model geometry for a mob, posed for its animation state, as camera-relative +/// vertices textured from the shared atlas. +pub fn render(mob: &Mob, alpha: f32, camera: glam::DVec3, uv: [f32; 4], light: u32, out: &mut Vec<Vertex>) { + let a = f64::from(alpha); + let p = glam::DVec3::new( + mob.previous.x + (mob.position.x - mob.previous.x) * a, + mob.previous.y + (mob.position.y - mob.previous.y) * a, + mob.previous.z + (mob.position.z - mob.previous.z) * a, + ) - camera; + let body = mob.previous_body_yaw + wrap(mob.body_yaw - mob.previous_body_yaw) * alpha; + let head_yaw = wrap((mob.previous_yaw + wrap(mob.yaw - mob.previous_yaw) * alpha) - body); + let limb_speed = (mob.previous_limb_speed + (mob.limb_speed - mob.previous_limb_speed) * alpha).min(1.0); + let limb = mob.limb_position - mob.limb_speed * (1.0 - alpha); + let age = mob.age as f32 + alpha; + // LivingEntityRenderer: rotate 180-body, flip, lift 1.501. + let mut base = glam::Mat4::from_translation(p.as_vec3()) + * glam::Mat4::from_rotation_y((180.0 - body).to_radians()); + if mob.death_time > 0 { + let f = ((mob.death_time as f32 + alpha - 1.0) / 20.0 * 1.6).sqrt().min(1.0); + base *= glam::Mat4::from_rotation_z(f * 90.0_f32.to_radians()); + } + if mob.kind.brain == Brain::Creeper { + // CreeperRenderer.scale: swelling. + let s = (mob.previous_swell as f32 + (mob.swell - mob.previous_swell) as f32 * alpha) / 28.0; + let s = s.clamp(0.0, 1.0); + let wobble = 1.0 + (s * 100.0).sin() * s * 0.01; + let s4 = s * s * s * s; + let xz = (1.0 + s4 * 0.4) * wobble; + let y = (1.0 + s4 * 0.1) / wobble; + base *= glam::Mat4::from_scale(glam::Vec3::new(xz, y, xz)); + } + base *= glam::Mat4::from_scale(glam::Vec3::new(-1.0, -1.0, 1.0)) * glam::Mat4::from_translation(glam::Vec3::new(0.0, -1.501, 0.0)); + let overlay = u32::from(mob.hurt_time > 0 || mob.death_time > 0); + let swing = |phase: f32| (limb * 0.6662 + phase).cos() * 1.4 * limb_speed; + let pose_for = |part: &Part| -> [f32; 9] { + let mut pose = part.pose; + match (&mob.kind.anim, part.name.as_str()) { + (_, "head") => { + pose[4] = head_yaw.to_radians(); + pose[3] += mob.head_pitch.to_radians(); + } + (Anim::Quadruped, "right_hind_leg") | (Anim::Quadruped, "left_front_leg") => pose[3] = swing(0.0), + (Anim::Quadruped, "left_hind_leg") | (Anim::Quadruped, "right_front_leg") => pose[3] = swing(std::f32::consts::PI), + (Anim::Chicken, "right_leg") => pose[3] = swing(0.0), + (Anim::Chicken, "left_leg") => pose[3] = swing(std::f32::consts::PI), + (Anim::Chicken, "right_wing") => pose[5] = (age * 0.3).sin().abs() * if mob.on_ground { 0.0 } else { 1.0 }, + (Anim::Chicken, "left_wing") => pose[5] = -(age * 0.3).sin().abs() * if mob.on_ground { 0.0 } else { 1.0 }, + (Anim::Humanoid { .. }, "right_leg") => pose[3] = (limb * 0.6662).cos() * 1.4 * limb_speed * 0.5 * 2.0 / 2.0 * 1.0, + (Anim::Humanoid { .. }, "left_leg") => pose[3] = (limb * 0.6662 + std::f32::consts::PI).cos() * 1.4 * limb_speed, + (Anim::Humanoid { zombie_arms: true }, "right_arm") | (Anim::Humanoid { zombie_arms: true }, "left_arm") => { + // AnimationUtils.animateZombieArms + pose[3] = -std::f32::consts::FRAC_PI_2 + (age * 0.067).sin() * 0.05; + } + (Anim::Humanoid { .. }, "right_arm") => pose[3] = (limb * 0.6662 + std::f32::consts::PI).cos() * 2.0 * limb_speed * 0.5, + (Anim::Humanoid { .. }, "left_arm") => pose[3] = (limb * 0.6662).cos() * 2.0 * limb_speed * 0.5, + (Anim::Creeper, "right_hind_leg") | (Anim::Creeper, "left_front_leg") => pose[3] = swing(0.0), + (Anim::Creeper, "left_hind_leg") | (Anim::Creeper, "right_front_leg") => pose[3] = swing(std::f32::consts::PI), + (Anim::Spider, name) if name.contains("leg") => { + let n: f32 = name.chars().filter(|c| c.is_ascii_digit()).collect::<String>().parse().unwrap_or(0.0); + let phase = (n % 4.0) * std::f32::consts::FRAC_PI_2; + pose[4] += (limb * 0.6662 * 2.0 + phase).cos() * 0.4 * limb_speed; + pose[5] += (limb * 0.6662 + phase).sin().abs() * 0.4 * limb_speed; + } + _ => {} + } + pose + }; + render_model(&mob.kind.model, base, &pose_for, uv, light, overlay, out); +} +/// Load one baked model layer from `entity-models.json` (e.g. `minecraft:chest#main`). +pub fn load_model(root: &Path, key: &str) -> Option<Part> { + let models: Value = serde_json::from_slice(&fs::read(root.join("entity-models.json")).ok()?).ok()?; + models.get(key).map(|m| Part::parse("root", m)) +} +/// ModelPart.render: translate, rotate ZYX, scale, then children. +pub fn render_model(part: &Part, base: glam::Mat4, pose_for: &dyn Fn(&Part) -> [f32; 9], uv: [f32; 4], light: u32, overlay: u32, out: &mut Vec<Vertex>) { + visit(part, base, pose_for, uv, light, overlay, out); + fn visit(part: &Part, parent: glam::Mat4, pose_for: &dyn Fn(&Part) -> [f32; 9], uv: [f32; 4], light: u32, overlay: u32, out: &mut Vec<Vertex>) { + let p = pose_for(part); + let m = parent + * glam::Mat4::from_translation(glam::Vec3::new(p[0], p[1], p[2]) / 16.0) + * glam::Mat4::from_quat(glam::Quat::from_euler(glam::EulerRot::ZYX, p[5], p[4], p[3])) + * glam::Mat4::from_scale(glam::Vec3::new(p[6], p[7], p[8])); + for poly in &part.polygons { + for v in poly.vertices { + let pos = m.transform_point3(glam::Vec3::new(v[0], v[1], v[2]) / 16.0); + out.push(Vertex { + pos: pos.to_array(), + uv: [uv[0] + (uv[2] - uv[0]) * v[3], uv[1] + (uv[3] - uv[1]) * v[4]], + layer: overlay, + color: 0xFFFF_FFFF, + light, + }); + } + } + for c in &part.children { + visit(c, m, pose_for, uv, light, overlay, out); + } + } +} diff --git a/crates/horizon-client/src/models.rs b/crates/horizon-client/src/models.rs new file mode 100644 index 000000000..23280150b --- /dev/null +++ b/crates/horizon-client/src/models.rs @@ -0,0 +1,138 @@ +//! A blockstate-driven inspection gallery, separate from gameplay simulation. +pub mod catalog; +mod cube; +use crate::{Result, sprites::Sprites}; +pub use catalog::StateModels; +use catalog::descriptor; +pub use cube::CubeStyle; +use horizon_core::position::BlockPos; +use horizon_world::registry::{BlockRegistry, BlockStateId}; +use serde_json::{Value, json}; +use std::path::Path; + +type Placement = (&'static str, &'static [(&'static str, &'static str)]); +const GALLERY: [Placement; 16] = [ + ( + "oak_stairs", + &[ + ("facing", "north"), + ("half", "top"), + ("shape", "inner_left"), + ], + ), + ("stone_slab", &[("type", "top")]), + ("anvil", &[("facing", "east")]), + ("torch", &[]), + ("lantern", &[]), + ("oak_fence", &[("north", "true"), ("east", "true")]), + ("oak_fence_gate", &[("facing", "west"), ("open", "true")]), + ("iron_bars", &[("north", "true"), ("south", "true")]), + ("cobweb", &[]), + ("grindstone", &[("face", "wall"), ("facing", "west")]), + ("ladder", &[("facing", "west")]), + ("amethyst_cluster", &[("facing", "east")]), + ("stone", &[]), + ("stone", &[]), + ("stone", &[]), + ("stone", &[]), +]; + +#[repr(C)] +#[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)] +pub struct ModelInstance { + pub positions: [[f32; 3]; 4], + pub uv: [[f32; 2]; 4], + pub layer: u32, + pub shade: f32, +} +pub struct PreparedModels { + pub catalog: StateModels, + pub placements: Vec<(BlockPos, BlockStateId)>, + pub states: Vec<Value>, +} +pub fn prepare( + root: &Path, + registry: &BlockRegistry, + sprites: &mut Sprites, +) -> Result<PreparedModels> { + let facts: serde_json::Map<String, Value> = + serde_json::from_reader(std::fs::File::open(root.join("model-states.json"))?)?; + let blocks: Vec<&str> = facts + .keys() + .filter(|name| registry.default_state(name).is_some()) + .filter_map(|name| name.strip_prefix("minecraft:")) + .collect(); + let catalog = StateModels::load(root, registry, &blocks, sprites)?; + let mut placements = Vec::new(); + let mut states = Vec::new(); + for (index, (name, properties)) in GALLERY.iter().enumerate() { + let state = registry.resolve(&descriptor(name, properties))?; + let actual = registry + .state(state) + .ok_or("missing gallery registry state")?; + let position = BlockPos::new((index % 4) as i32 * 4 - 7, 4, (index / 4) as i32 * 4 + 14); + let selected = catalog.collect(state, position)?; + states.push(json!({"block":actual.name,"properties":actual.properties,"state_id":state.0, + "position":[position.x,position.y,position.z], + "models":selected.iter().map(|(v,_)| json!({"model":v.model,"rotations":v.rotations,"uv_lock":v.uv_lock})).collect::<Vec<_>>()})); + placements.push((position, state)); + } + Ok(PreparedModels { + catalog, + placements, + states, + }) +} +pub fn instance(face: &catalog::BakedFace, position: BlockPos) -> ModelInstance { + let origin = [position.x as f32, position.y as f32, position.z as f32]; + ModelInstance { + positions: face + .quad + .positions + .map(|v| std::array::from_fn(|i| v[i] + origin[i])), + uv: face.quad.uv, + layer: face.layer, + shade: cube::shade(face), + } +} + +pub fn load_visibility( + root: &Path, + registry: &BlockRegistry, +) -> Result<horizon_world::block_render::FaceVisibility> { + use horizon_world::{ + block_render::{FaceVisibility, RenderDefinition, SkipRendering}, + collision::CachedCollisionRegistry, + nbt::{self, Limits}, + }; + use std::{collections::BTreeMap, fs}; + let data = nbt::read_named(&fs::read(root.join("occlusion.nbt"))?, Limits::default())? + .0 + .tag; + let occlusion = CachedCollisionRegistry::from_nbt(&data, registry)?; + let raw: BTreeMap<String, Value> = + serde_json::from_reader(fs::File::open(root.join("render-definitions.json"))?)?; + let definitions = raw + .into_iter() + .map(|(name, v)| { + let skip = match v["rule"].as_str().ok_or("missing render rule")? { + "never" => SkipRendering::Never, + "same_block" => SkipRendering::SameBlock, + "bars" => SkipRendering::Bars, + "leaves" => SkipRendering::Leaves, + "liquid" => SkipRendering::Liquid, + "mangrove_roots" => SkipRendering::MangroveRoots, + _ => return Err("unrecognized render rule"), + }; + Ok(( + name, + RenderDefinition { + skip, + can_occlude: v["can_occlude"].as_bool().ok_or("missing occlusion flag")?, + bars_tag: v["bars_tag"].as_bool().ok_or("missing bars tag")?, + }, + )) + }) + .collect::<std::result::Result<_, &str>>()?; + Ok(FaceVisibility::new(&occlusion, &definitions)?) +} diff --git a/crates/horizon-client/src/models/catalog.rs b/crates/horizon-client/src/models/catalog.rs new file mode 100644 index 000000000..fa223905b --- /dev/null +++ b/crates/horizon-client/src/models/catalog.rs @@ -0,0 +1,237 @@ +//! Bind prepared registry states to model choices; bake each transformed model +//! once and share its geometry across positions. Resource failure recovery and +//! resource-pack reloads remain separate work. +use crate::{Result, sprites::Sprites}; +use horizon_assets::{ + bake::{BlockModelTransform, ModelQuad, bake_model_transformed}, + blockstate::{ + BlockStateDefinition, Variant, VariantSet, + bind::{Properties, PropertySchema, PropertyValues, SelectedModels}, + choice::CompiledChoices, + }, + model::CuboidModel, + resolve::ModelLibrary, +}; +use horizon_core::{ + position::BlockPos, + random::{LegacyRandom, position_seed}, +}; +use horizon_world::{ + chunk::BlockState, + registry::{BlockRegistry, BlockStateId}, +}; +use serde_json::Value; +use std::{ + collections::{BTreeMap, BTreeSet}, + fs, + path::Path, +}; + +pub struct BakedFace { + pub quad: ModelQuad, + pub layer: u32, + pub opaque: bool, + /// Fractional alpha: drawn in the sorted translucent pass. + pub translucent: bool, +} +pub struct BakedModel { + pub ambient_occlusion: bool, + pub faces: Vec<BakedFace>, + pub cube: Option<[super::cube::CubeStyle; 6]>, +} +type VariantKey = (String, [u8; 3], bool); +pub struct StateModels { + choices: Vec<CompiledChoices>, + states: BTreeMap<BlockStateId, (usize, SelectedModels)>, + baked: BTreeMap<VariantKey, BakedModel>, +} +fn key(variant: &Variant) -> VariantKey { + (variant.model.clone(), variant.rotations, variant.uv_lock) +} +impl StateModels { + pub fn load( + root: &Path, + registry: &BlockRegistry, + blocks: &[&str], + sprites: &mut Sprites, + ) -> Result<Self> { + let facts: BTreeMap<String, Value> = + serde_json::from_reader(fs::File::open(root.join("model-states.json"))?)?; + let mut choices = Vec::new(); + let mut states = BTreeMap::new(); + let mut variants = BTreeSet::new(); + let mut by_name: std::collections::HashMap<&str, Vec<BlockStateId>> = + std::collections::HashMap::new(); + for i in 0..registry.len() { + let id = BlockStateId(i as u32); + if let Some(state) = registry.state(id) { + by_name.entry(state.name.as_str()).or_default().push(id); + } + } + for block in blocks.iter().copied().collect::<BTreeSet<_>>() { + let name = format!("minecraft:{block}"); + let facts = facts.get(&name).ok_or("missing block model state schema")?; + let schema: PropertySchema = facts["schema"] + .as_object() + .ok_or("invalid model schema")? + .iter() + .map(|(key, value)| { + let values = if let Some(range) = value.get("integer") { + PropertyValues::Integer { + minimum: i32::try_from( + range[0] + .as_i64() + .ok_or("invalid integer property minimum")?, + )?, + maximum: i32::try_from( + range[1] + .as_i64() + .ok_or("invalid integer property maximum")?, + )?, + } + } else { + PropertyValues::Named( + value["named"] + .as_array() + .ok_or("missing named property values")? + .iter() + .map(|v| { + v.as_str() + .map(str::to_owned) + .ok_or("invalid named property value") + }) + .collect::<std::result::Result<_, _>>()?, + ) + }; + Ok((key.clone(), values)) + }) + .collect::<Result<_>>()?; + let possible: Vec<Properties> = serde_json::from_value(facts["states"].clone())?; + let resource = fs::read_to_string( + root.join(format!("assets/minecraft/blockstates/{block}.json")), + )?; + let definition = BlockStateDefinition::from_json(&resource)?; + let bound = definition.bind(&schema, &possible)?; + let native_order: Vec<_> = by_name + .get(name.as_str()) + .map(Vec::as_slice) + .unwrap_or_default() + .iter() + .map(|&id| (id, ®istry.state(id).expect("indexed state").properties)) + .collect(); + if native_order.len() != possible.len() + || native_order + .iter() + .zip(&possible) + .any(|((_, a), b)| *a != b) + { + return Err( + "model state definitions disagree with the imported block registry".into(), + ); + } + for ((id, _), selected) in native_order.into_iter().zip(bound) { + if let Some(selected) = selected { + states.insert(id, (choices.len(), selected)); + } + } + for choice in definition + .variants + .iter() + .flatten() + .map(|(_, choice)| choice) + .chain( + definition + .multipart + .iter() + .flatten() + .map(|selector| &selector.variant), + ) + { + match choice { + VariantSet::Single(v) => { + variants.insert(key(v)); + } + VariantSet::Weighted(v) => variants.extend(v.iter().map(|(v, _)| key(v))), + } + } + choices.push(CompiledChoices::new(&definition)?); + } + let mut models = BTreeMap::new(); + let mut pending: Vec<_> = variants.iter().map(|(name, _, _)| name.clone()).collect(); + while let Some(name) = pending.pop() { + if models.contains_key(&name) { + continue; + } + let (namespace, path) = name.split_once(':').ok_or("invalid model identifier")?; + let text = + fs::read_to_string(root.join(format!("assets/{namespace}/models/{path}.json")))?; + let model = CuboidModel::from_json(&text)?; + if let Some(parent) = &model.parent { + pending.push(parent.clone()); + } + models.insert(name, model); + } + let library = ModelLibrary::new(models)?; + let mut baked = BTreeMap::new(); + for (name, turns, lock) in variants { + let model = library.resolve(&name)?; + let faces: Vec<BakedFace> = + bake_model_transformed(&model, BlockModelTransform::new(turns, lock))? + .into_iter() + .map(|quad| { + let layer = sprites.insert(root, &quad.material.sprite)?; + Ok(BakedFace { + translucent: quad.material.force_translucent + || sprites.translucent[layer as usize], + quad, + layer, + opaque: sprites.opaque[layer as usize], + }) + }) + .collect::<Result<_>>()?; + let cube = super::cube::cube_styles(&faces); + baked.insert( + (name, turns, lock), + BakedModel { + ambient_occlusion: model.ambient_occlusion, + faces, + cube, + }, + ); + } + Ok(Self { + choices, + states, + baked, + }) + } + pub fn collect( + &self, + state: BlockStateId, + position: BlockPos, + ) -> Result<Vec<(&Variant, &BakedModel)>> { + let (choice, selected) = self + .states + .get(&state) + .ok_or("unbound gallery block state")?; + // These inspection blocks use Block's default position seed. Blocks with + // specialized model seeds (e.g. two-block structures) need their callbacks. + let mut random = LegacyRandom::new(position_seed(position)); + let mut variants = Vec::new(); + self.choices[*choice].collect(selected, &mut random, &mut variants)?; + variants + .into_iter() + .map(|v| Ok((v, self.baked.get(&key(v)).ok_or("unbaked block model")?))) + .collect() + } +} + +pub fn descriptor(name: &str, overrides: &[(&str, &str)]) -> BlockState { + BlockState { + name: format!("minecraft:{name}"), + properties: overrides + .iter() + .map(|(k, v)| ((*k).to_owned(), (*v).to_owned())) + .collect(), + } +} diff --git a/crates/horizon-client/src/models/cube.rs b/crates/horizon-client/src/models/cube.rs new file mode 100644 index 000000000..fddce73dd --- /dev/null +++ b/crates/horizon-client/src/models/cube.rs @@ -0,0 +1,160 @@ +//! Exact unit-cube faces eligible for repeated-texture greedy rectangles. +use super::catalog::BakedFace; +use horizon_assets::model::Direction; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct CubeStyle { + pub layer: u32, + /// UV at spatial (u,v)=(0,0), then the two signed unit-axis derivatives. + pub uv: [i8; 6], + pub shade_bits: u32, +} +pub fn shade(face: &BakedFace) -> f32 { + match face + .quad + .shade_direction_override + .unwrap_or(face.quad.facing) + { + Direction::Down => 0.5, + Direction::Up => 1.0, + Direction::North | Direction::South => 0.8, + Direction::West | Direction::East => 0.6, + } +} +pub fn cube_styles(faces: &[BakedFace]) -> Option<[CubeStyle; 6]> { + if faces.len() != 6 { + return None; + } + let mut styles = [None; 6]; + for face in faces { + if !face.opaque || face.translucent || face.quad.tint_index != -1 || face.quad.light_emission != 0 { + return None; + } + let q = &face.quad; + let direction = q.cull?; + if q.facing != direction || styles[direction as usize].is_some() { + return None; + } + let (axis, u, v) = match direction { + Direction::Down | Direction::Up => (1, 0, 2), + Direction::North | Direction::South => (2, 0, 1), + Direction::West | Direction::East => (0, 2, 1), + }; + let plane = if (direction as usize).is_multiple_of(2) { + 0.0 + } else { + 1.0 + }; + let mut uv = [None; 4]; + for (p, texture) in q.positions.iter().zip(q.uv) { + if p[axis] != plane + || ![p[u], p[v], texture[0], texture[1]] + .iter() + .all(|&x| x == 0.0 || x == 1.0) + { + return None; + } + let index = p[u] as usize + 2 * p[v] as usize; + if uv[index].replace(texture.map(|x| x as i8)).is_some() { + return None; + } + } + let [a, b, c, d] = uv.map(|v| v.unwrap()); + let du = [b[0] - a[0], b[1] - a[1]]; + let dv = [c[0] - a[0], c[1] - a[1]]; + if d != [a[0] + du[0] + dv[0], a[1] + du[1] + dv[1]] + || (du[0] * dv[1] - du[1] * dv[0]).abs() != 1 + { + return None; + } + styles[direction as usize] = Some(CubeStyle { + layer: face.layer, + uv: [a[0], a[1], du[0], du[1], dv[0], dv[1]], + shade_bits: shade(face).to_bits(), + }); + } + Some(styles.map(|v| v.unwrap())) +} + +#[cfg(test)] +mod tests { + use super::*; + use horizon_assets::{ + bake::{BlockModelTransform, bake_model_transformed}, + model::CuboidModel, + resolve::ModelLibrary, + }; + use serde_json::json; + #[test] + fn projected_cube_uvs_match_baked_quarter_turns() { + let faces: serde_json::Map<String, serde_json::Value> = Direction::ALL + .into_iter() + .map(|d| { + ( + d.name().to_owned(), + json!({"texture":"#all","cullface":d.name()}), + ) + }) + .collect(); + let model = CuboidModel::from_json(&json!({"textures":{"all":"horizon:probe"},"elements":[{"from":[0,0,0],"to":[16,16,16],"faces":faces}]}).to_string()).unwrap(); + let library = ModelLibrary::new([("horizon:cube".to_owned(), model)].into()).unwrap(); + let model = library.resolve("horizon:cube").unwrap(); + let mut eligible = 0; + for x in 0..4 { + for y in 0..4 { + for z in 0..4 { + for lock in [false, true] { + let faces: Vec<_> = bake_model_transformed( + &model, + BlockModelTransform::new([x, y, z], lock), + ) + .unwrap() + .into_iter() + .map(|quad| BakedFace { + quad, + layer: 7, + opaque: true, + translucent: false, + }) + .collect(); + let Some(styles) = cube_styles(&faces) else { + assert!(lock); + continue; + }; + eligible += 1; + for face in &faces { + let direction = face.quad.cull.unwrap(); + let (u, v) = match direction { + Direction::Down | Direction::Up => (0, 2), + Direction::North | Direction::South => (0, 1), + _ => (2, 1), + }; + let style = styles[direction as usize]; + let [a, b, c, d, e, f] = style.uv.map(f32::from); + for (p, uv) in face.quad.positions.iter().zip(face.quad.uv) { + assert_eq!([a + c * p[u] + e * p[v], b + d * p[u] + f * p[v]], uv); + } + } + } + } + } + } + assert!(eligible >= 64); + let mut faces: Vec<_> = + bake_model_transformed(&model, BlockModelTransform::new([0; 3], false)) + .unwrap() + .into_iter() + .map(|quad| BakedFace { + quad, + layer: 0, + opaque: true, + translucent: false, + }) + .collect(); + faces[0].opaque = false; + assert!(cube_styles(&faces).is_none()); + faces[0].opaque = true; + faces[0].quad.positions[0][0] = 0.25; + assert!(cube_styles(&faces).is_none()); + } +} diff --git a/crates/horizon-client/src/motion.rs b/crates/horizon-client/src/motion.rs new file mode 100644 index 000000000..fb5a835b9 --- /dev/null +++ b/crates/horizon-client/src/motion.rs @@ -0,0 +1,1008 @@ +//! Stored movement state for the resident scene. This binds the validated air, +//! jump, collision, support, restitution and stored health bindings. Entity lifecycle, +//! block-inside effects and audiovisual event consumers remain separate work. +use crate::{Result, assets::Assets, collisions::SceneCollisions, world::World}; +use horizon_core::{ + geometry::{Aabb, Vec3, VoxelShape, traverse_blocks}, + position::BlockPos, +}; +use horizon_world::{ + attribute_map::ValueKind, + attributes::{Modifier, Operation, entity::Catalog, live::LiveAttributes}, + block_collision::BlockCollisionRegistry, + block_landing::BlockLandingRegistry, + collision_context::{CollisionContext, CollisionEntity, CollisionItem}, + edge_backoff::{self, EdgeBackoffInput, EdgeBackoffWorld}, + entity_move::{self, CollisionFlags, EntityMoveWorld, MovementHistory, MoverType}, + entity_obstruction::EntityIdentity, + ground_support::{GroundState, find_supporting_block}, + living_air::{self, LivingAirWorld}, + living_fall::ImpulseContext, + living_motion::{self, LivingMotionWorld}, + movement_emission::MovementEmission, + movement_properties::{ + BoundMovementProperties, MovementBlockProvider, MovementProperties, MovementTags, + RegistryMovementWorld, + }, + movement_restitution::{self, RestitutionInput, RestitutionWorld}, + movement_statistics::{self, MovementStat, MovementStatisticsWorld}, + movement_support::{self, MovementLocation}, + nbt::{self, Limits}, + registry::BlockStateId, + world_movement::{self, MovementRequest}, + worldgen::tags::TagDefinitions, +}; +use std::{ + collections::{BTreeMap, BTreeSet}, + fs, io, + path::Path, + sync::Arc, +}; + +pub struct MotionResources { + pub attributes: Arc<Catalog>, + pub blocks: BoundMovementProperties, + pub climbable: BTreeSet<String>, + pub fall_reset: BTreeSet<String>, + pub landing: BlockLandingRegistry, + pub health: crate::health::HealthResources, +} +impl MotionResources { + pub fn load(root: &Path, assets: &Assets) -> Result<Self> { + let attributes = Arc::new(Catalog::from_json(&serde_json::from_slice(&fs::read( + root.join("attributes.json"), + )?)?)?); + let data = nbt::read_named( + &fs::read(root.join("movement-properties.nbt"))?, + Limits::default(), + )? + .0 + .tag; + let properties = MovementProperties::from_nbt(&data, &assets.registry)?; + let bundle: BTreeMap<String, String> = + serde_json::from_slice(&fs::read(root.join("block-tags.json"))?)?; + let mut definitions = TagDefinitions::default(); + for (name, text) in bundle { + definitions.apply_json(&name, "vanilla", &text)?; + } + let built = definitions + .build(|name, _| assets.registry.default_state(name).map(|_| name.to_owned()))?; + if !built.missing.is_empty() { + return Err("unresolved motion block tags".into()); + } + let tag = |name: &str| -> Result<BTreeSet<String>> { + Ok(built + .tags + .get(name) + .ok_or_else(|| format!("missing motion tag {name}"))? + .iter() + .cloned() + .collect()) + }; + Ok(Self { + landing: crate::landing::load(root, &properties)?, + health: crate::health::HealthResources::load(root)?, + attributes, + blocks: properties.bind(&MovementTags { + fences: tag("minecraft:fences")?, + walls: tag("minecraft:walls")?, + suppresses_bounce: tag("minecraft:suppresses_bounce")?, + })?, + climbable: tag("minecraft:climbable")?, + fall_reset: tag("minecraft:fall_damage_resetting")?, + }) + } +} + +/// Ordered requests and phase records for world/audio/network consumers. Landing +/// hurt dispatch updates stored health synchronously before these are drained. +#[derive(Clone, Copy, Debug)] +pub enum MotionEvent { + Waypoint { + receiver: bool, + enabled: bool, + }, + Health(crate::health::HealthEvent), + Fall(crate::landing::FallEvent), + Recorded { + mover: MoverType, + movement: Vec3, + }, + Landing { + dy: f64, + grounded: bool, + state: BlockStateId, + position: BlockPos, + }, + Emission { + movement: Vec3, + position: BlockPos, + state: BlockStateId, + }, + Bounce { + position: BlockPos, + state: BlockStateId, + fall_distance: f64, + }, +} +pub struct PlayerMotion { + pub position: Vec3, + pub velocity: Vec3, + pub ground: GroundState, + pub collision: CollisionFlags, + pub history: MovementHistory, + pub fall_distance: f64, + pub stuck_multiplier: Vec3, + pub yaw: f32, + pub head_yaw: f32, + pub jumping: bool, + pub no_jump_delay: i32, + pub jump_trigger_time: i32, + pub sprinting: bool, + pub sprint_input: crate::sprint::SprintState, + pub shift_key_down: bool, + pub local_crouching: bool, + pub pose: crate::pose::Pose, + pub dimensions: crate::pose::Dimensions, + pub speed: f32, + pub last_climbable: Option<BlockPos>, + pub needs_sync: bool, + pub sync_position: bool, + pub events: Vec<MotionEvent>, + pub attributes: LiveAttributes<Box<dyn FnMut() -> i32>>, + pub impulse: ImpulseContext, + pub health: crate::health::PlayerHealth, +} +fn attribute_error(error: impl std::fmt::Debug) -> io::Error { + io::Error::other(format!("movement attribute: {error:?}")) +} +impl PlayerMotion { + pub fn new(resources: &MotionResources, position: Vec3) -> Result<Self> { + // Process-owned identities determine native collection callback order. + // Differential fixtures can replay a reference process's identities. + let hashes: Vec<_> = resources + .attributes + .attributes() + .enumerate() + .map(|(i, _)| i as i32) + .collect(); + let mut identity = 0i32; + let next: Box<dyn FnMut() -> i32> = Box::new(move || { + identity = identity.wrapping_add(1); + identity + }); + Self::with_attribute_identities(resources, position, &hashes, next) + } + /// Explicit identity allocation for deterministic reference replay. + pub fn with_attribute_identities( + resources: &MotionResources, + position: Vec3, + hashes: &[i32], + next: Box<dyn FnMut() -> i32>, + ) -> Result<Self> { + let mut attributes = LiveAttributes::new( + resources.attributes.clone(), + "minecraft:player", + hashes, + next, + ) + .map_err(attribute_error)?; + Ok(Self { + health: crate::health::PlayerHealth::new(&resources.health, &mut attributes)?, + impulse: ImpulseContext::default(), + position, + velocity: Vec3::ZERO, + ground: GroundState::default(), + collision: CollisionFlags::default(), + history: MovementHistory::default(), + fall_distance: 0.0, + stuck_multiplier: Vec3::ZERO, + yaw: 0.0, + head_yaw: 0.0, + jumping: false, + no_jump_delay: 0, + jump_trigger_time: 0, + sprinting: false, + sprint_input: crate::sprint::SprintState::default(), + shift_key_down: false, + local_crouching: false, + pose: crate::pose::Pose::Standing, + dimensions: crate::pose::Pose::Standing.dimensions(1.0), + speed: 0.0, + last_climbable: None, + needs_sync: false, + sync_position: false, + events: Vec::new(), + attributes, + }) + } + pub fn bounds(&self) -> Aabb { + self.dimensions.bounds(self.position) + } + pub fn attribute(&mut self, name: &str) -> Result<f64> { + let key = self + .attributes + .key(name) + .ok_or_else(|| format!("missing movement attribute {name}"))?; + Ok(self + .attributes + .value(Some(key), ValueKind::Computed) + .map_err(attribute_error)?) + } + /// Add (or remove) a transient attribute modifier, e.g. from equipment + /// (`LivingEntity.collectEquipmentChanges` applying item modifiers). + pub fn set_modifier(&mut self, attribute: &str, id: &str, amount: f64, operation: &str, present: bool) -> Result<()> { + let Some(key) = self.attributes.key(attribute) else { + return Ok(()); + }; + let Some(handle) = self.attributes.get_instance(Some(key)).map_err(attribute_error)? else { + return Ok(()); + }; + let operation = match operation { + "add_multiplied_base" => Operation::AddMultipliedBase, + "add_multiplied_total" => Operation::AddMultipliedTotal, + _ => Operation::AddValue, + }; + let modifier = Modifier::new(id, amount, operation)?; + self.attributes + .edit(&handle, |value, observer| { + value.remove(modifier.id(), observer)?; + if present { + value.add_transient(modifier, observer)?; + } + Ok(()) + }) + .map_err(attribute_error)?; + Ok(()) + } + pub fn set_sprinting(&mut self, sprinting: bool) -> Result<()> { + self.sprinting = sprinting; + let key = self + .attributes + .key("minecraft:movement_speed") + .ok_or("missing movement speed")?; + let handle = self + .attributes + .get_instance(Some(key)) + .map_err(attribute_error)? + .ok_or("player has no movement speed")?; + let modifier = Modifier::new( + "minecraft:sprinting", + f64::from(0.3_f32), + Operation::AddMultipliedTotal, + )?; + self.attributes + .edit(&handle, |value, observer| { + value.remove(modifier.id(), observer)?; + if sprinting { + value.add_transient(modifier, observer)?; + } + Ok(()) + }) + .map_err(attribute_error)?; + Ok(()) + } + /// Local input sprint phase for the resident dry, standing, empty-equipment + /// player. Fluid, pose, vehicle, ability-flight and effect bindings remain + /// separate; hunger and collision conditions use this actor's actual state. + pub fn sprint_input_tick(&mut self, keys: crate::sprint::Keys) -> Result<()> { + let conditions = crate::sprint::Conditions { + sprinting: self.sprinting, + enough_food: self.health.food.has_enough_food(), + on_ground: self.ground.on_ground, + horizontal_collision: self.collision.horizontal, + minor_horizontal_collision: self.collision.minor, + moving_slowly: self.moving_slowly(), + ..Default::default() + }; + // The sprint setter edits attributes and flags, independent of local + // keyboard history. Retain the input prefix even if that setter fails. + let mut state = self.sprint_input; + let result = state.tick(keys, conditions, 7, |value| self.set_sprinting(value)); + self.sprint_input = state; + result + } + fn remove_frost(&mut self) -> Result<()> { + let key = self + .attributes + .key("minecraft:movement_speed") + .ok_or("missing movement speed")?; + // Native removeFrost obtains the instance even when no modifier exists. + // Pure value lookup would miss lazy creation and its pending updates. + if let Some(handle) = self + .attributes + .get_instance(Some(key)) + .map_err(attribute_error)? + { + self.attributes + .edit(&handle, |value, observer| { + value.remove("minecraft:powder_snow", observer) + }) + .map_err(attribute_error)?; + } + Ok(()) + } +} + +pub struct MotionWorld<'p, 'w, 'r> { + pub player: &'p mut PlayerMotion, + pub scene: &'w mut World, + pub assets: &'r Assets, + pub collision_binding: &'w BlockCollisionRegistry<'r>, + pub resources: &'w MotionResources, +} +enum TickInput { + Living([f32; 3]), + PreparedLocal { direction: [f32; 2], jumping: bool }, +} +impl MotionWorld<'_, '_, '_> { + fn context(&self) -> CollisionContext<'static> { + CollisionContext::for_entity( + CollisionEntity { + identity: EntityIdentity(0), + y: self.player.position.y, + descending: self.player.shift_key_down, + main_hand: Some(CollisionItem::EMPTY), + }, + false, + ) + } + fn collisions(&self) -> SceneCollisions<'_, '_> { + SceneCollisions { + world: self.scene, + binding: self.collision_binding, + } + } + pub(crate) fn no_player_collision(&mut self, bounds: Aabb) -> Result<bool> { + let context = self.context(); + Ok(world_movement::no_world_collision( + &mut self.collisions(), + world_movement::CollisionCheckRequest { + entity: EntityIdentity(0), + context, + bounds, + candidate_budget: 1_000_000, + }, + )?) + } + fn block(&self, p: BlockPos) -> BlockStateId { + self.scene.block(p.x, p.y, p.z) + } + fn support(&mut self, offset: f32) -> Result<BlockPos> { + let position = self.player.position; + let support = self.player.ground.supporting_block; + Ok(movement_support::support_position( + &mut RegistryMovementWorld { + properties: &self.resources.blocks, + world: self, + }, + position, + support, + offset, + )?) + } + fn location(&self) -> MovementLocation { + MovementLocation { + position: self.player.position, + block_position: BlockPos::containing(self.player.position), + supporting_block: self.player.ground.supporting_block, + } + } + fn climbable(&mut self) -> Result<bool> { + let p = BlockPos::containing(self.player.position); + let name = &self + .assets + .registry + .state(self.block(p)) + .ok_or("missing scene state")? + .name; + let climbable = self.resources.climbable.contains(name); + if climbable { + self.player.last_climbable = Some(p); + } + Ok(climbable) + } + pub fn travel_in_air(&mut self, input: Vec3) -> Result<()> { + living_air::travel_in_air(self, input) + } + /// Dry, standing movement phases of LivingEntity.aiStep, including server + /// frost-modifier cleanup with zero frozen ticks. Equipment, interpolation, + /// effects and world/entity effects remain unbound. Inputs are the native + /// float xxa/yya/zza fields, before LivingEntity.applyInput damping. + pub fn movement_tick(&mut self, input: [f32; 3]) -> Result<()> { + self.dry_tick(TickInput::Living(input)) + } + /// Dry Player.aiStep movement with a prepared local input vector. The + /// caller applies LocalPlayer input preparation once. Empty inventory, + /// equipment and nearby-entity sets are the current scene domain. + pub fn player_movement_tick(&mut self, direction: [f32; 2], jumping: bool) -> Result<()> { + if self.player.jump_trigger_time > 0 { + self.player.jump_trigger_time -= 1; + } + self.player.peaceful_regeneration(self.scene.health_rules)?; + self.dry_tick(TickInput::PreparedLocal { direction, jumping })?; + self.player.head_yaw = self.player.yaw; + // Player.aiStep refreshes speed after movement, not before travel. + self.player.speed = self.player.attribute("minecraft:movement_speed")? as f32; + Ok(()) + } + /// Resident simulation phases in native order. Enclosing entity/world tick + /// services are still incomplete; this composes clocks, movement and hunger. + pub fn simulation_tick(&mut self, direction: [f32; 2], jumping: bool) -> Result<()> { + self.player.health.advance_clock(); + let previous = self.player.position; + self.player_movement_tick(direction, jumping)?; + self.player.refresh_attributes()?; + self.update_player_pose()?; + // The resident scene accepts the resolved local movement directly. + // Vanilla dispatches this separately from travel, on packet acceptance. + self.check_movement_statistics(previous.vector_to(self.player.position))?; + self.player + .food_tick(&self.resources.health, self.scene.health_rules) + } + pub fn controlled_simulation_tick(&mut self, keys: crate::sprint::Keys) -> Result<()> { + self.update_local_crouching()?; + self.player.sprint_input_tick(keys)?; + self.player.shift_key_down = keys.shift; + let direction = keys.direction(); + let sneak = if direction[0] * direction[0] + direction[1] * direction[1] != 0.0 + && self.player.moving_slowly() + { + Some(self.player.attribute("minecraft:sneaking_speed")? as f32) + } else { + None + }; + self.simulation_tick( + crate::input::modify_input(direction, None, sneak), + keys.jump, + ) + } + pub fn check_movement_statistics(&mut self, delta: Vec3) -> Result<()> { + movement_statistics::check(self, delta) + } + fn dry_tick(&mut self, input: TickInput) -> Result<()> { + if self.player.no_jump_delay > 0 { + self.player.no_jump_delay -= 1; + } + let mut velocity = self.player.velocity; + if velocity.x * velocity.x + velocity.z * velocity.z < 9.0e-6 { + velocity.x = 0.0; + velocity.z = 0.0; + } + if velocity.y.abs() < 0.003 { + velocity.y = 0.0; + } + self.player.velocity = velocity; + let mut input = match input { + TickInput::Living(v) => Vec3::new( + f64::from(v[0] * 0.98), + f64::from(v[1]), + f64::from(v[2] * 0.98), + ), + TickInput::PreparedLocal { direction, jumping } => { + self.player.jumping = jumping; + Vec3::new(f64::from(direction[0]), 0.0, f64::from(direction[1])) + } + }; + if self.player.health.dead_or_dying() { + self.player.jumping = false; + input.x = 0.0; + input.z = 0.0; + } + if self.player.jumping { + if self.player.ground.on_ground && self.player.no_jump_delay == 0 { + self.jump_from_ground()?; + self.player.no_jump_delay = 10; + } + } else { + self.player.no_jump_delay = 0; + } + self.travel_in_air(input)?; + self.player.remove_frost() + } + pub fn jump_from_ground(&mut self) -> Result<()> { + living_motion::jump_from_ground(self)?; + self.player + .events + .push(MotionEvent::Health(crate::health::HealthEvent::Statistic { + name: "jump", + amount: 1, + })); + self.player + .health + .food + .add_exhaustion(if self.player.sprinting { 0.2 } else { 0.05 }); + Ok(()) + } + pub fn move_self(&mut self, movement: Vec3) -> Result<()> { + entity_move::move_entity(self, MoverType::SelfMovement, movement) + } +} +// Current resident movement domain: dry, standing, no vehicles or gliding. +// The shared kernel also handles swimming/crouching/flight when those states +// are supplied by their eventual runtime bindings. +impl MovementStatisticsWorld for MotionWorld<'_, '_, '_> { + type Error = Box<dyn std::error::Error>; + fn passenger(&mut self) -> Result<bool> { + Ok(false) + } + fn swimming(&mut self) -> Result<bool> { + Ok(false) + } + fn eyes_in_water(&mut self) -> Result<bool> { + Ok(false) + } + fn in_water(&mut self) -> Result<bool> { + Ok(false) + } + fn on_climbable(&mut self) -> Result<bool> { + self.climbable() + } + fn on_ground(&mut self) -> Result<bool> { + Ok(self.player.ground.on_ground) + } + fn sprinting(&mut self) -> Result<bool> { + Ok(self.player.sprinting) + } + fn crouching(&mut self) -> Result<bool> { + Ok(self.player.pose == crate::pose::Pose::Crouching) + } + fn fall_flying(&mut self) -> Result<bool> { + Ok(false) + } + fn award(&mut self, stat: MovementStat, amount: i32) -> Result<()> { + self.player + .events + .push(MotionEvent::Health(crate::health::HealthEvent::Statistic { + name: stat.name(), + amount, + })); + Ok(()) + } + fn exhaust(&mut self, amount: f32) -> Result<()> { + self.player.health.food.add_exhaustion(amount); + Ok(()) + } +} +impl MovementBlockProvider for MotionWorld<'_, '_, '_> { + type Error = io::Error; + fn movement_block_state(&mut self, p: BlockPos) -> io::Result<BlockStateId> { + Ok(self.block(p)) + } +} +impl EdgeBackoffWorld for MotionWorld<'_, '_, '_> { + type Error = Box<dyn std::error::Error>; + fn max_up_step(&mut self) -> Result<f32> { + Ok(self.player.attribute("minecraft:step_height")? as f32) + } + fn staying_on_ground_surface(&mut self) -> Result<bool> { + Ok(self.player.shift_key_down) + } + fn on_ground(&mut self) -> Result<bool> { + Ok(self.player.ground.on_ground) + } + fn no_collision(&mut self, bounds: Aabb) -> Result<bool> { + self.no_player_collision(bounds) + } +} +impl EntityMoveWorld for MotionWorld<'_, '_, '_> { + type Error = Box<dyn std::error::Error>; + fn no_physics(&self) -> bool { + false + } + fn position(&self) -> Vec3 { + self.player.position + } + fn set_position(&mut self, p: Vec3) -> Result<()> { + self.player.position = p; + Ok(()) + } + fn record_movement(&mut self, mover: MoverType, movement: Vec3) -> Result<()> { + self.player + .events + .push(MotionEvent::Recorded { mover, movement }); + Ok(()) + } + fn collision_flags(&self) -> CollisionFlags { + self.player.collision + } + fn set_collision_flags(&mut self, value: CollisionFlags) { + self.player.collision = value; + } + fn limit_piston_movement(&mut self, _: Vec3) -> Result<Vec3> { + Err("piston movement requires a ticking entity runtime".into()) + } + fn stuck_multiplier(&self) -> Vec3 { + self.player.stuck_multiplier + } + fn set_stuck_multiplier(&mut self, value: Vec3) { + self.player.stuck_multiplier = value; + } + fn velocity(&mut self) -> Result<Vec3> { + Ok(self.player.velocity) + } + fn set_velocity(&mut self, value: Vec3) -> Result<()> { + self.player.velocity = value; + Ok(()) + } + fn back_off_edge(&mut self, movement: Vec3, mover: MoverType) -> Result<Vec3> { + let input = EdgeBackoffInput { + movement, + bounds: self.player.bounds(), + flying: false, + self_or_player: matches!(mover, MoverType::SelfMovement | MoverType::Player), + fall_distance: self.player.fall_distance, + query_budget: 1_000_000, + }; + edge_backoff::back_off_from_edge(self, input) + .map_err(|e| io::Error::other(e.to_string()).into()) + } + fn collide(&mut self, movement: Vec3) -> Result<Vec3> { + let max_step = self.player.attribute("minecraft:step_height")? as f32; + Ok(world_movement::resolve_world_movement( + &mut self.collisions(), + MovementRequest { + entity: EntityIdentity(0), + context: self.context(), + bounds: self.player.bounds(), + movement, + max_step, + on_ground: self.player.ground.on_ground, + candidate_budget: 1_000_000, + }, + )?) + } + fn fall_distance(&self) -> f64 { + self.player.fall_distance + } + fn fall_reset_clip(&mut self, from: Vec3, to: Vec3) -> Result<bool> { + // Every fluid in this controlled scene is empty. Tagged reset blocks use + // a full block in ClipContext.FALLDAMAGE_RESETTING, not their collider. + let hit = traverse_blocks(from, to, 1_000_000, |p| { + let name = &self.assets.registry.state(self.block(p)).unwrap().name; + (self.resources.fall_reset.contains(name) + && VoxelShape::block().clip(from, to, p).is_some()) + .then_some(()) + })?; + Ok(hit.is_some()) + } + fn reset_fall_distance(&mut self) -> Result<()> { + self.player.fall_distance = 0.0; + Ok(()) + } + fn movement_history(&mut self) -> &mut MovementHistory { + &mut self.player.history + } + fn locally_authoritative(&mut self) -> Result<bool> { + Ok(true) + } + fn set_on_ground_with_movement( + &mut self, + below: bool, + horizontal: bool, + movement: Vec3, + ) -> Result<()> { + let position = self.player.position; + let bounds = self.player.bounds(); + let context = self.context(); + let mut collisions = SceneCollisions { + world: self.scene, + binding: self.collision_binding, + }; + self.player.ground.set_with_movement( + below, + horizontal, + bounds, + Some(movement), + |bounds| find_supporting_block(&mut collisions, context, position, bounds, 1_000_000), + )?; + Ok(()) + } + fn minor_horizontal_collision(&mut self, _: Vec3) -> Result<bool> { + Ok(false) + } + fn legacy_on_position(&mut self) -> Result<BlockPos> { + self.support(movement_support::LEGACY_SUPPORT_OFFSET) + } + fn block_state(&mut self, p: BlockPos) -> Result<BlockStateId> { + Ok(self.block(p)) + } + fn on_ground(&mut self) -> Result<bool> { + Ok(self.player.ground.on_ground) + } + fn check_fall_damage( + &mut self, + dy: f64, + grounded: bool, + state: BlockStateId, + position: BlockPos, + ) -> Result<()> { + self.player.events.push(MotionEvent::Landing { + dy, + grounded, + state, + position, + }); + horizon_world::living_landing::check_living_fall_damage(self, dy, grounded, state, position) + } + fn removed(&mut self) -> Result<bool> { + Ok(false) + } + fn can_simulate(&mut self) -> Result<bool> { + Ok(true) + } + fn restitute(&mut self, state: BlockStateId, x: bool, z: bool, resolved: Vec3) -> Result<()> { + let input = RestitutionInput { + block: state, + collided_x: x, + collided_z: z, + vertical_collision: self.player.collision.vertical, + collision_below: self.player.collision.below, + living: true, + resolved_movement: resolved, + fall_distance: self.player.fall_distance, + }; + movement_restitution::restitute_movement(self, input) + } + fn client_side(&mut self) -> Result<bool> { + Ok(false) + } + fn movement_emission(&mut self) -> Result<MovementEmission> { + Ok(MovementEmission::All) + } + fn passenger(&mut self) -> Result<bool> { + Ok(false) + } + fn apply_movement_emission( + &mut self, + _: MovementEmission, + movement: Vec3, + position: BlockPos, + state: BlockStateId, + ) -> Result<()> { + self.player.events.push(MotionEvent::Emission { + movement, + position, + state, + }); + Ok(()) + } + fn block_speed_factor(&mut self) -> Result<f32> { + let efficiency = self.player.attribute("minecraft:movement_efficiency")? as f32; + let location = self.location(); + let block = movement_support::block_speed_factor( + &mut RegistryMovementWorld { + properties: &self.resources.blocks, + world: self, + }, + location, + )?; + Ok(block + efficiency * (1.0 - block)) + } +} +impl RestitutionWorld for MotionWorld<'_, '_, '_> { + type Error = Box<dyn std::error::Error>; + fn suppressing_bounce(&mut self) -> Result<bool> { + Ok(self.player.shift_key_down) + } + fn entity_bounciness(&mut self) -> Result<f64> { + self.player.attribute("minecraft:bounciness") + } + fn velocity(&mut self) -> Result<Vec3> { + Ok(self.player.velocity) + } + fn effective_gravity(&mut self) -> Result<f64> { + living_motion::effective_gravity(self) + } + fn block_suppresses_bounce(&mut self, state: BlockStateId) -> Result<bool> { + Ok(self.resources.blocks.get(state)?.suppresses_bounce) + } + fn block_bounce_restitution(&mut self, state: BlockStateId) -> Result<f32> { + Ok(self + .resources + .blocks + .get(state)? + .coefficients + .bounce_restitution) + } + fn air_drag(&mut self) -> Result<f32> { + living_motion::air_drag(self) + } + fn movement_support_position(&mut self) -> Result<BlockPos> { + self.support(movement_support::MOVEMENT_SUPPORT_OFFSET) + } + fn bounce_on( + &mut self, + state: BlockStateId, + position: BlockPos, + fall_distance: f64, + ) -> Result<()> { + self.player.events.push(MotionEvent::Bounce { + state, + position, + fall_distance, + }); + self.resources + .landing + .bounce_on( + self, + state, + position, + horizon_world::block_landing::LandingEntityKind::Player, + ) + .map_err(|e| e.to_string().into()) + } + fn bounce_event(&mut self) -> Result<()> { + Ok(()) + } + fn mark_position_for_sync(&mut self) { + self.player.sync_position = true; + } + fn set_velocity(&mut self, value: Vec3) -> Result<()> { + self.player.velocity = value; + Ok(()) + } +} +impl LivingAirWorld for MotionWorld<'_, '_, '_> { + type Error = Box<dyn std::error::Error>; + fn movement_support_position(&mut self) -> Result<BlockPos> { + self.support(movement_support::MOVEMENT_SUPPORT_OFFSET) + } + fn on_ground(&mut self) -> Result<bool> { + Ok(self.player.ground.on_ground) + } + fn block_friction(&mut self, p: BlockPos) -> Result<f32> { + Ok(self + .resources + .blocks + .get(self.block(p))? + .coefficients + .friction) + } + fn friction_modifier(&mut self) -> Result<f64> { + self.player.attribute("minecraft:friction_modifier") + } + fn speed(&mut self) -> Result<f32> { + Ok(self.player.attribute("minecraft:movement_speed")? as f32) + } + fn flying_speed(&mut self) -> Result<f32> { + Ok(if self.player.sprinting { + 0.025999999 + } else { + 0.02 + }) + } + fn yaw(&mut self) -> Result<f32> { + Ok(self.player.yaw) + } + fn velocity(&self) -> Vec3 { + self.player.velocity + } + fn set_velocity(&mut self, v: Vec3) -> Result<()> { + self.player.velocity = v; + Ok(()) + } + fn on_climbable(&mut self) -> Result<bool> { + self.climbable() + } + fn reset_fall_distance(&mut self) -> Result<()> { + self.player.fall_distance = 0.0; + Ok(()) + } + fn in_scaffolding(&mut self) -> Result<bool> { + Ok(self + .assets + .registry + .state(self.block(BlockPos::containing(self.player.position))) + .unwrap() + .name + == "minecraft:scaffolding") + } + fn suppressing_ladder_slide(&mut self) -> Result<bool> { + Ok(self.player.shift_key_down) + } + fn is_player_class(&self) -> bool { + true + } + fn move_self(&mut self, v: Vec3) -> Result<()> { + MotionWorld::move_self(self, v) + } + fn horizontal_collision(&self) -> bool { + self.player.collision.horizontal + } + fn jumping(&self) -> bool { + self.player.jumping + } + fn was_in_powder_snow(&self) -> bool { + false + } + fn can_walk_powder_snow(&mut self) -> Result<bool> { + Ok(false) + } + fn levitation_amplifier(&mut self) -> Result<Option<i32>> { + Ok(None) + } + fn is_client_side(&mut self) -> Result<bool> { + Ok(false) + } + fn has_chunk_at(&mut self, p: BlockPos) -> Result<bool> { + Ok(self.scene.chunks.contains_key(&(p.x >> 4, p.z >> 4))) + } + fn effective_gravity(&mut self) -> Result<f64> { + living_motion::effective_gravity(self) + } + fn y(&self) -> f64 { + self.player.position.y + } + fn minimum_y(&mut self) -> Result<i32> { + Ok(0) + } + fn discard_friction(&mut self) -> Result<bool> { + Ok(false) + } + fn air_drag_modifier(&mut self) -> Result<f64> { + self.player.attribute("minecraft:air_drag_modifier") + } + fn omnidirectional_air_mover(&mut self) -> Result<bool> { + Ok(false) + } +} +impl LivingMotionWorld for MotionWorld<'_, '_, '_> { + type Error = Box<dyn std::error::Error>; + fn velocity(&self) -> Vec3 { + self.player.velocity + } + fn set_velocity(&mut self, v: Vec3) -> Result<()> { + self.player.velocity = v; + Ok(()) + } + fn jump_strength(&mut self) -> Result<f64> { + self.player.attribute("minecraft:jump_strength") + } + fn block_jump_factor(&mut self) -> Result<f32> { + let location = self.location(); + Ok(movement_support::block_jump_factor( + &mut RegistryMovementWorld { + properties: &self.resources.blocks, + world: self, + }, + location, + )?) + } + fn has_jump_boost(&mut self) -> Result<bool> { + Ok(false) + } + fn jump_boost_amplifier(&mut self) -> Result<i32> { + Err("absent jump boost".into()) + } + fn sprinting(&mut self) -> Result<bool> { + Ok(self.player.sprinting) + } + fn yaw(&mut self) -> Result<f32> { + Ok(self.player.yaw) + } + fn mark_needs_sync(&mut self) { + self.player.needs_sync = true; + } + fn no_gravity(&mut self) -> Result<bool> { + Ok(false) + } + fn gravity_attribute(&mut self) -> Result<f64> { + self.player.attribute("minecraft:gravity") + } + fn has_slow_falling(&mut self) -> Result<bool> { + Ok(false) + } + fn controlling_passenger_is_player(&mut self) -> Result<bool> { + Ok(false) + } + fn speed(&mut self) -> Result<f32> { + Ok(self.player.attribute("minecraft:movement_speed")? as f32) + } + fn omnidirectional_air_mover(&mut self) -> Result<bool> { + Ok(false) + } + fn air_drag_modifier(&mut self) -> Result<f64> { + self.player.attribute("minecraft:air_drag_modifier") + } +} diff --git a/crates/horizon-client/src/particles.rs b/crates/horizon-client/src/particles.rs new file mode 100644 index 000000000..aaac918f3 --- /dev/null +++ b/crates/horizon-client/src/particles.rs @@ -0,0 +1,87 @@ +//! Block particles (`TerrainParticle`): destroy bursts and mining crumbs that +//! sample a random quarter of the block's texture, fall with gravity and +//! expire after a randomized lifetime. +use crate::world::World; +use horizon_core::random::{LegacyRandom, RandomSource}; + +#[derive(Clone, Debug)] +pub struct Particle { + pub position: [f64; 3], + pub previous: [f64; 3], + pub velocity: [f64; 3], + pub age: u32, + pub lifetime: u32, + pub size: f32, + pub sprite: String, + /// Sub-rectangle of the sprite in 0..1 (u0, v0, u1, v1). + pub uv: [f32; 4], + pub tint: u32, + pub gravity: f64, + pub on_ground: bool, +} +impl Particle { + /// TerrainParticle(level, x, y, z, xa, ya, za, state) + pub fn terrain(random: &mut LegacyRandom, position: [f64; 3], velocity: [f64; 3], sprite: String, tint: u32) -> Self { + // Particle constructor: random jitter of velocity, normalized speed. + let mut v = [ + velocity[0] + f64::from(random.next_float() * 2.0 - 1.0) * 0.4, + velocity[1] + f64::from(random.next_float() * 2.0 - 1.0) * 0.4, + velocity[2] + f64::from(random.next_float() * 2.0 - 1.0) * 0.4, + ]; + let speed = f64::from(random.next_float() + random.next_float() + 1.0) * 0.15; + let length = (v[0] * v[0] + v[1] * v[1] + v[2] * v[2]).sqrt().max(1e-9); + for (i, c) in v.iter_mut().enumerate() { + *c = *c / length * speed * 0.4; + if i == 1 { + *c += 0.1; + } + } + let u = random.next_float() * 3.0 / 4.0; + let w = random.next_float() * 3.0 / 4.0; + // SingleQuadParticle quadSize: 0.1 * (rand*0.5+0.5) * 2, halved for terrain. + let size = 0.1 * (random.next_float() * 0.5 + 0.5); + let lifetime = (4.0 / (random.next_float() * 0.9 + 0.1)) as u32; + Self { + position, + previous: position, + velocity: v, + age: 0, + lifetime, + size, + sprite, + uv: [u, w, u + 0.25, w + 0.25], + tint, + gravity: 1.0, + on_ground: false, + } + } + pub fn tick(&mut self, world: &World, solid: impl Fn(u16) -> bool) -> bool { + self.previous = self.position; + self.age += 1; + if self.age >= self.lifetime { + return false; + } + self.velocity[1] -= 0.04 * self.gravity; + for axis in 0..3 { + let mut next = self.position; + next[axis] += self.velocity[axis]; + let block = world.block(next[0].floor() as i32, next[1].floor() as i32, next[2].floor() as i32); + if solid(block.0 as u16) { + if axis == 1 && self.velocity[1] < 0.0 { + self.on_ground = true; + } + self.velocity[axis] = 0.0; + } else { + self.position = next; + } + } + for c in &mut self.velocity { + *c *= 0.98; + } + if self.on_ground { + self.velocity[0] *= 0.7; + self.velocity[2] *= 0.7; + } + true + } +} diff --git a/crates/horizon-client/src/pose.rs b/crates/horizon-client/src/pose.rs new file mode 100644 index 000000000..2eb1975df --- /dev/null +++ b/crates/horizon-client/src/pose.rs @@ -0,0 +1,111 @@ +//! Resident player pose, native dimension arithmetic and dry pose-fit selection. +//! Full synchronized entity schemas, sleeping and fluid/flight lifecycles remain +//! separate from these stored movement fields. +use crate::{ + Result, + motion::{MotionWorld, PlayerMotion}, +}; +use horizon_core::geometry::{Aabb, Vec3}; + +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +pub enum Pose { + #[default] + Standing, + Crouching, + Swimming, +} +impl Pose { + pub fn name(self) -> &'static str { + match self { + Self::Standing => "STANDING", + Self::Crouching => "CROUCHING", + Self::Swimming => "SWIMMING", + } + } + pub fn dimensions(self, scale: f32) -> Dimensions { + let (height, eye_height) = match self { + Self::Standing => (1.8, 1.62), + Self::Crouching => (1.5, 1.27), + Self::Swimming => (0.6, 0.4), + }; + Dimensions { + width: 0.6 * scale, + height: height * scale, + eye_height: eye_height * scale, + } + } +} +#[derive(Clone, Copy, Debug)] +pub struct Dimensions { + pub width: f32, + pub height: f32, + pub eye_height: f32, +} +impl Dimensions { + pub fn bounds(self, position: Vec3) -> Aabb { + let half = f64::from(self.width / 2.0); + Aabb::new( + Vec3::new(position.x - half, position.y, position.z - half), + Vec3::new( + position.x + half, + position.y + f64::from(self.height), + position.z + half, + ), + ) + } +} +impl PlayerMotion { + pub fn dimensions_for_pose(&mut self, pose: Pose) -> Result<Dimensions> { + Ok(pose.dimensions(self.attribute("minecraft:scale")? as f32)) + } + pub fn refresh_dimensions(&mut self) -> Result<()> { + self.dimensions = self.dimensions_for_pose(self.pose)?; + Ok(()) + } + pub fn set_pose(&mut self, pose: Pose) -> Result<()> { + if self.pose != pose { + self.pose = pose; + self.refresh_dimensions()?; + } + Ok(()) + } + pub fn moving_slowly(&self) -> bool { + self.local_crouching || self.pose == Pose::Swimming // dry scene: not in water + } +} +impl MotionWorld<'_, '_, '_> { + pub fn can_fit_pose(&mut self, pose: Pose) -> Result<bool> { + let bounds = self + .player + .dimensions_for_pose(pose)? + .bounds(self.player.position); + self.no_player_collision(bounds.deflate(Vec3::new(1.0e-7, 1.0e-7, 1.0e-7))) + } + /// LocalPlayer.aiStep computes crouching BEFORE KeyboardInput.tick, using + /// the old shift input. This is distinct from Entity's current pose. + pub fn update_local_crouching(&mut self) -> Result<()> { + self.player.local_crouching = self.can_fit_pose(Pose::Crouching)? + && (self.player.shift_key_down || !self.can_fit_pose(Pose::Standing)?); + Ok(()) + } + /// Dry Player.updatePlayerPose after movement: crawl when neither standing + /// nor crouching fits; leave the current pose if even crawling cannot fit. + pub fn update_player_pose(&mut self) -> Result<()> { + if !self.can_fit_pose(Pose::Swimming)? { + return Ok(()); + } + let desired = if self.player.shift_key_down { + Pose::Crouching + } else { + Pose::Standing + }; + let pose = if self.can_fit_pose(desired)? { + desired + } else if self.can_fit_pose(Pose::Crouching)? { + Pose::Crouching + } else { + Pose::Swimming + }; + self.player.set_pose(pose) + } +} diff --git a/crates/horizon-client/src/save.rs b/crates/horizon-client/src/save.rs new file mode 100644 index 000000000..6997be4f8 --- /dev/null +++ b/crates/horizon-client/src/save.rs @@ -0,0 +1,554 @@ +//! World persistence in vanilla's Anvil layout: `region/r.X.Z.mca` files with +//! zlib-compressed chunk NBT (paletted `block_states`/`biomes` per section) and +//! a gzip `level.dat`. Light is not stored (`isLightOn: 0`), so both Horizon and +//! vanilla relight saved chunks on load. +use crate::{ + Result, + biome::Biomes, + chunk::{Blocks, Chunk, MIN_Y, SECTIONS}, + streaming::ChunkGenerator, +}; +use horizon_core::position::ChunkPos; +use horizon_world::{ + DATA_VERSION, + chunk::BlockState, + compression::Compression, + nbt::{self, Limits, NamedTag, Tag}, + region::{ChunkRecord, RegionFile, RegionWriter}, + registry::{BlockRegistry, BlockStateId}, +}; +use std::{ + collections::{BTreeMap, HashMap}, + fs, + path::{Path, PathBuf}, + sync::{Arc, Mutex}, +}; + +fn pack(indices: &[u16], bits: u32) -> Vec<i64> { + let per_long = (64 / bits) as usize; + let mut longs = vec![0i64; indices.len().div_ceil(per_long)]; + for (i, &v) in indices.iter().enumerate() { + longs[i / per_long] |= (i64::from(v) & ((1i64 << bits) - 1)) << ((i % per_long) as u32 * bits); + } + longs +} +fn unpack(longs: &[i64], bits: u32, count: usize) -> Vec<u16> { + let per_long = (64 / bits) as usize; + let mask = (1u64 << bits) - 1; + (0..count) + .map(|i| { + longs + .get(i / per_long) + .map_or(0, |&l| ((l as u64 >> ((i % per_long) as u32 * bits)) & mask) as u16) + }) + .collect() +} +fn bits_for(len: usize, min: u32) -> u32 { + (usize::BITS - (len.max(1) - 1).leading_zeros()).max(min) +} +fn string(s: &str) -> Tag { + Tag::String(s.into()) +} + +fn encode_items(slots: &[Option<crate::items::ItemStack>]) -> Tag { + Tag::List( + slots + .iter() + .enumerate() + .filter_map(|(i, s)| { + let s = s.as_ref()?; + let mut entries = vec![ + ("Slot", Tag::Byte(i as i8)), + ("id", string(&s.item)), + ("count", Tag::Int(s.count as i32)), + ]; + if s.damage > 0 { + entries.push(("components", Tag::compound([("minecraft:damage", Tag::Int(s.damage as i32))]))); + } + Some(Tag::compound(entries)) + }) + .collect(), + ) +} +fn decode_items(tag: Option<&Tag>, size: usize) -> Vec<Option<crate::items::ItemStack>> { + let mut slots = vec![None; size]; + if let Some(Tag::List(items)) = tag { + for it in items { + let Some(Tag::Byte(slot)) = it.get("Slot") else { continue }; + let Some(Tag::String(id)) = it.get("id") else { continue }; + let count = match it.get("count") { + Some(Tag::Int(c)) => *c as u32, + Some(Tag::Byte(c)) => *c as u32, + _ => 1, + }; + let damage = match it.get("components").and_then(|c| c.get("minecraft:damage")) { + Some(Tag::Int(d)) => *d as u32, + _ => 0, + }; + if let Some(cell) = slots.get_mut(*slot as u8 as usize) { + *cell = Some(crate::items::ItemStack { item: Arc::from(id.to_string_lossy().as_str()), count, damage }); + } + } + } + slots +} +fn encode_block_entity(p: (i32, i32, i32), e: &crate::containers::BlockEntity) -> Tag { + use crate::containers::BlockEntity; + let mut entries = vec![ + ("id", string(e.id())), + ("x", Tag::Int(p.0)), + ("y", Tag::Int(p.1)), + ("z", Tag::Int(p.2)), + ("keepPacked", Tag::Byte(0)), + ]; + match e { + BlockEntity::Chest(items) => entries.push(("Items", encode_items(items))), + BlockEntity::Furnace(f) => { + entries.push(("Items", encode_items(&f.items))); + entries.push(("lit_time_remaining", Tag::Short(f.lit_remaining.clamp(0, i32::from(i16::MAX)) as i16))); + entries.push(("lit_total_time", Tag::Short(f.lit_total.clamp(0, i32::from(i16::MAX)) as i16))); + entries.push(("cooking_time_spent", Tag::Short(f.cooking_timer as i16))); + entries.push(("cooking_total_time", Tag::Short(f.cooking_total as i16))); + } + } + Tag::compound(entries) +} +fn decode_block_entity(tag: &Tag) -> Option<((i32, i32, i32), crate::containers::BlockEntity)> { + use crate::containers::BlockEntity; + let int = |k: &str| match tag.get(k) { + Some(Tag::Int(v)) => Some(*v), + Some(Tag::Short(v)) => Some(i32::from(*v)), + _ => None, + }; + let Some(Tag::String(id)) = tag.get("id") else { return None }; + let id = id.to_string_lossy(); + let pos = (int("x")?, int("y")?, int("z")?); + let mut entity = BlockEntity::for_block(&id)?; + match &mut entity { + BlockEntity::Chest(items) => *items = decode_items(tag.get("Items"), 27), + BlockEntity::Furnace(f) => { + let items = decode_items(tag.get("Items"), 3); + f.items = [items[0].clone(), items[1].clone(), items[2].clone()]; + f.lit_remaining = int("lit_time_remaining").unwrap_or(0); + f.lit_total = int("lit_total_time").unwrap_or(0); + f.cooking_timer = int("cooking_time_spent").unwrap_or(0); + f.cooking_total = int("cooking_total_time").unwrap_or(200); + } + } + Some((pos, entity)) +} +pub fn encode(chunk: &Chunk, registry: &BlockRegistry, biomes: &Biomes) -> NamedTag { + let mut sections = Vec::new(); + for (si, section) in chunk.sections.iter().enumerate() { + let y = (MIN_Y >> 4) + si as i32; + let ids: Vec<u16> = match §ion.blocks { + Blocks::Uniform(v) => vec![*v], + Blocks::Full(a) => a.to_vec(), + }; + let mut palette: Vec<u16> = Vec::new(); + let mut lookup: HashMap<u16, u16> = HashMap::new(); + let indices: Vec<u16> = ids + .iter() + .map(|id| { + *lookup.entry(*id).or_insert_with(|| { + palette.push(*id); + (palette.len() - 1) as u16 + }) + }) + .collect(); + let mut states = vec![( + "palette", + Tag::List( + palette + .iter() + .map(|id| { + registry + .state(BlockStateId(u32::from(*id))) + .map_or_else(|| Tag::compound([("Name", string("minecraft:air"))]), BlockState::to_nbt) + }) + .collect(), + ), + )]; + if palette.len() > 1 { + states.push(("data", Tag::LongArray(pack(&indices, bits_for(palette.len(), 4))))); + } + let quart: Vec<u16> = (0..64).map(|i| chunk.biomes[si * 64 + i]).collect(); + let mut biome_palette: Vec<u16> = Vec::new(); + let biome_indices: Vec<u16> = quart + .iter() + .map(|b| match biome_palette.iter().position(|p| p == b) { + Some(i) => i as u16, + None => { + biome_palette.push(*b); + (biome_palette.len() - 1) as u16 + } + }) + .collect(); + let mut biome_tag = vec![( + "palette", + Tag::List(biome_palette.iter().map(|b| string(&biomes.get(*b).name)).collect()), + )]; + if biome_palette.len() > 1 { + biome_tag.push(("data", Tag::LongArray(pack(&biome_indices, bits_for(biome_palette.len(), 0))))); + } + sections.push(Tag::compound([ + ("Y", Tag::Byte(y as i8)), + ("block_states", Tag::compound(states)), + ("biomes", Tag::compound(biome_tag)), + ])); + } + NamedTag { + name: "".into(), + tag: Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ("xPos", Tag::Int(chunk.x)), + ("zPos", Tag::Int(chunk.z)), + ("yPos", Tag::Int(MIN_Y >> 4)), + ("Status", string("minecraft:full")), + ("LastUpdate", Tag::Long(0)), + ("InhabitedTime", Tag::Long(0)), + ("isLightOn", Tag::Byte(0)), + ("sections", Tag::List(sections)), + ("block_entities", Tag::List(chunk.block_entities.iter().map(|(p, e)| encode_block_entity(*p, e)).collect())), + ]), + } +} +pub fn decode(root: &NamedTag, registry: &BlockRegistry, biomes: &Biomes) -> Option<Chunk> { + let tag = &root.tag; + let Tag::Int(x) = tag.get("xPos")? else { return None }; + let Tag::Int(z) = tag.get("zPos")? else { return None }; + let mut chunk = Chunk::empty(*x, *z); + let air = registry.default_state("minecraft:air")?.0 as u16; + let mut cache: HashMap<String, u16> = HashMap::new(); + let mut biome_data = (*chunk.biomes).clone(); + let Some(Tag::List(sections)) = tag.get("sections") else { return Some(chunk) }; + for section in sections { + let Some(Tag::Byte(y)) = section.get("Y") else { continue }; + let si = i32::from(*y) - (MIN_Y >> 4); + if !(0..SECTIONS as i32).contains(&si) { + continue; + } + if let Some(states) = section.get("block_states") + && let Some(Tag::List(palette)) = states.get("palette") + { + let ids: Vec<u16> = palette + .iter() + .map(|p| { + let state = BlockState::from_nbt(p).ok(); + let key = state.as_ref().map(|s| format!("{}{:?}", s.name, s.properties)).unwrap_or_default(); + *cache.entry(key).or_insert_with(|| { + state + .and_then(|s| registry.id(&s).or_else(|| registry.default_state(&s.name))) + .map_or(air, |id| id.0 as u16) + }) + }) + .collect(); + let target = Arc::make_mut(&mut chunk.sections[si as usize]); + if ids.len() <= 1 { + target.blocks = Blocks::Uniform(ids.first().copied().unwrap_or(air)); + } else if let Some(Tag::LongArray(data)) = states.get("data") { + let indices = unpack(data, bits_for(ids.len(), 4), 4096); + let mut full = Box::new([air; 4096]); + for (i, idx) in indices.iter().enumerate() { + full[i] = ids.get(*idx as usize).copied().unwrap_or(air); + } + target.blocks = Blocks::Full(full); + } + } + if let Some(b) = section.get("biomes") + && let Some(Tag::List(palette)) = b.get("palette") + { + let ids: Vec<u16> = palette + .iter() + .map(|p| match p { + Tag::String(s) => biomes.id(&s.to_string_lossy()), + _ => 0, + }) + .collect(); + let indices = match b.get("data") { + Some(Tag::LongArray(data)) if ids.len() > 1 => unpack(data, bits_for(ids.len(), 0), 64), + _ => vec![0; 64], + }; + for (i, idx) in indices.iter().enumerate() { + biome_data[si as usize * 64 + i] = ids.get(*idx as usize).copied().unwrap_or(0); + } + } + } + chunk.biomes = Arc::new(biome_data); + if let Some(Tag::List(entities)) = tag.get("block_entities") { + chunk.block_entities = entities.iter().filter_map(decode_block_entity).collect(); + } + Some(chunk) +} +/// The world folder. Region files are read lazily by worker threads. +pub struct SaveDir { + pub root: PathBuf, + regions: Mutex<HashMap<(i32, i32), Option<Arc<Mutex<RegionFile>>>>>, +} +impl SaveDir { + pub fn new(root: PathBuf) -> Self { + Self { + root, + regions: Mutex::new(HashMap::new()), + } + } + fn region_path(&self, rx: i32, rz: i32) -> PathBuf { + self.root.join(format!("region/r.{rx}.{rz}.mca")) + } + pub fn load(&self, x: i32, z: i32, registry: &BlockRegistry, biomes: &Biomes) -> Option<Chunk> { + let key = (x >> 5, z >> 5); + let region = { + let mut regions = self.regions.lock().ok()?; + regions + .entry(key) + .or_insert_with(|| RegionFile::open(self.region_path(key.0, key.1)).ok().map(|r| Arc::new(Mutex::new(r)))) + .clone()? + }; + let record = region.lock().ok()?.read(ChunkPos::new(x, z)).ok()??; + let root = record.nbt(Limits::default()).ok()?; + decode(&root, registry, biomes) + } + /// Rewrite every region touched by `chunks`, keeping their other chunks. + pub fn save(&self, chunks: &[Arc<Chunk>], registry: &BlockRegistry, biomes: &Biomes) -> Result<usize> { + let mut by_region: BTreeMap<(i32, i32), Vec<&Arc<Chunk>>> = BTreeMap::new(); + for c in chunks { + by_region.entry((c.x >> 5, c.z >> 5)).or_default().push(c); + } + let staging = self.root.join("region/.staging"); + fs::create_dir_all(&staging)?; + let timestamp = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .map_or(0, |d| d.as_secs() as u32); + for ((rx, rz), list) in by_region { + let path = self.region_path(rx, rz); + let mut records: BTreeMap<(i32, i32), ChunkRecord> = BTreeMap::new(); + if let Ok(mut existing) = RegionFile::open(&path) { + let positions: Vec<ChunkPos> = existing.chunks().map(|(p, _)| p).collect(); + for p in positions { + if let Ok(Some(r)) = existing.read(p) { + records.insert((p.x, p.z), r); + } + } + } + for c in list { + let record = ChunkRecord::from_nbt(&encode(c, registry, biomes), Compression::Zlib, timestamp, Limits::default())?; + records.insert((c.x, c.z), record); + } + let temporary = staging.join(format!("r.{rx}.{rz}.mca")); + let _ = fs::remove_file(&temporary); + let mut writer = RegionWriter::create(&temporary)?; + for ((x, z), r) in &records { + writer.write(ChunkPos::new(*x, *z), r)?; + } + writer.finish()?; + fs::rename(&temporary, &path)?; + self.regions.lock().map_err(|_| "region cache poisoned")?.remove(&(rx, rz)); + } + Ok(chunks.len()) + } +} +/// Player and world state stored in `level.dat`. +#[derive(Clone, Debug, Default)] +pub struct Level { + pub name: String, + pub seed: i64, + pub creative: bool, + pub time: i64, + pub day_time: i64, + pub spawn: Option<[f64; 3]>, + pub position: Option<[f64; 3]>, + pub rotation: [f32; 2], + pub health: f32, + pub food: i32, + pub saturation: f32, + pub inventory: Vec<(u8, String, u32, u32)>, + pub xp_level: i32, + pub xp_progress: f32, + pub xp_total: i32, + pub weather: crate::world::Weather, + /// Player.Dimension (minecraft:overworld / minecraft:the_nether). + pub dimension: String, +} +impl Level { + pub fn read(dir: &Path) -> Option<Self> { + let bytes = fs::read(dir.join("level.dat")).ok()?; + let raw = Compression::Gzip.decode(&bytes, 64 << 20).ok()?; + let (root, _) = nbt::read_named(&raw, Limits::default()).ok()?; + let data = root.tag.get("Data")?; + let long = |t: Option<&Tag>| match t { + Some(Tag::Long(v)) => *v, + Some(Tag::Int(v)) => i64::from(*v), + Some(Tag::Short(v)) => i64::from(*v), + Some(Tag::Byte(v)) => i64::from(*v), + _ => 0, + }; + let doubles = |t: Option<&Tag>| match t { + Some(Tag::List(l)) if l.len() == 3 => { + let v: Vec<f64> = l.iter().map(|d| if let Tag::Double(b) = d { f64::from_bits(*b) } else { 0.0 }).collect(); + Some([v[0], v[1], v[2]]) + } + _ => None, + }; + let player = data.get("Player"); + let float = |t: Option<&Tag>| if let Some(Tag::Float(b)) = t { f32::from_bits(*b) } else { 0.0 }; + let mut inventory = Vec::new(); + if let Some(Tag::List(items)) = player.and_then(|p| p.get("Inventory")) { + for it in items { + let slot = if let Some(Tag::Byte(s)) = it.get("Slot") { *s as u8 } else { continue }; + let id = if let Some(Tag::String(s)) = it.get("id") { s.to_string_lossy() } else { continue }; + let count = long(it.get("count")).max(1) as u32; + let damage = it + .get("components") + .and_then(|c| c.get("minecraft:damage")) + .map_or(0, |d| long(Some(d)) as u32); + inventory.push((slot, id, count, damage)); + } + } + let rotation = match player.and_then(|p| p.get("Rotation")) { + Some(Tag::List(r)) if r.len() == 2 => [float(r.first()), float(r.get(1))], + _ => [0.0; 2], + }; + Some(Self { + name: match data.get("LevelName") { + Some(Tag::String(s)) => s.to_string_lossy(), + _ => "World".into(), + }, + seed: long(data.get("WorldGenSettings").and_then(|w| w.get("seed"))), + creative: long(data.get("GameType")) == 1, + time: long(data.get("Time")), + day_time: long(data.get("DayTime")), + spawn: Some([long(data.get("SpawnX")) as f64, long(data.get("SpawnY")) as f64, long(data.get("SpawnZ")) as f64]), + position: doubles(player.and_then(|p| p.get("Pos"))), + rotation, + health: player.map_or(20.0, |p| float(p.get("Health"))), + food: player.map_or(20, |p| long(p.get("foodLevel")) as i32), + saturation: player.map_or(5.0, |p| float(p.get("foodSaturationLevel"))), + dimension: match player.and_then(|p| p.get("Dimension")) { + Some(Tag::String(s)) => s.to_string_lossy(), + _ => "minecraft:overworld".into(), + }, + weather: crate::world::Weather { + clear_time: long(data.get("clearWeatherTime")) as i32, + rain_time: long(data.get("rainTime")) as i32, + thunder_time: long(data.get("thunderTime")) as i32, + raining: long(data.get("raining")) != 0, + thundering: long(data.get("thundering")) != 0, + rain_level: if long(data.get("raining")) != 0 { (1.0, 1.0) } else { (0.0, 0.0) }, + thunder_level: if long(data.get("thundering")) != 0 { (1.0, 1.0) } else { (0.0, 0.0) }, + }, + xp_level: player.map_or(0, |p| long(p.get("XpLevel")) as i32), + xp_progress: player.map_or(0.0, |p| float(p.get("XpP"))), + xp_total: player.map_or(0, |p| long(p.get("XpTotal")) as i32), + inventory, + }) + } + pub fn write(&self, dir: &Path) -> Result<()> { + fs::create_dir_all(dir)?; + let spawn = self.spawn.unwrap_or([0.0, 64.0, 0.0]); + let mut player = vec![ + ("Health", Tag::Float(self.health.to_bits())), + ("foodLevel", Tag::Int(self.food)), + ("foodSaturationLevel", Tag::Float(self.saturation.to_bits())), + ("XpLevel", Tag::Int(self.xp_level)), + ("XpP", Tag::Float(self.xp_progress.to_bits())), + ("XpTotal", Tag::Int(self.xp_total)), + ("playerGameType", Tag::Int(i32::from(self.creative))), + ( + "Rotation", + Tag::List(vec![Tag::Float(self.rotation[0].to_bits()), Tag::Float(self.rotation[1].to_bits())]), + ), + ( + "Inventory", + Tag::List( + self.inventory + .iter() + .map(|(slot, id, count, damage)| { + let mut entries = vec![ + ("Slot", Tag::Byte(*slot as i8)), + ("id", string(id)), + ("count", Tag::Int(*count as i32)), + ]; + if *damage > 0 { + entries.push(("components", Tag::compound([("minecraft:damage", Tag::Int(*damage as i32))]))); + } + Tag::compound(entries) + }) + .collect(), + ), + ), + ("Dimension", string(if self.dimension.is_empty() { "minecraft:overworld" } else { &self.dimension })), + ]; + if let Some(p) = self.position { + player.push(("Pos", Tag::List(p.iter().map(|v| Tag::Double(v.to_bits())).collect()))); + } + let root = NamedTag { + name: "".into(), + tag: Tag::compound([( + "Data", + Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ("version", Tag::Int(19133)), + ("LevelName", string(&self.name)), + ("GameType", Tag::Int(i32::from(self.creative))), + ("Time", Tag::Long(self.time)), + ("DayTime", Tag::Long(self.day_time)), + ("SpawnX", Tag::Int(spawn[0].floor() as i32)), + ("SpawnY", Tag::Int(spawn[1].floor() as i32)), + ("SpawnZ", Tag::Int(spawn[2].floor() as i32)), + ("initialized", Tag::Byte(1)), + ("clearWeatherTime", Tag::Int(self.weather.clear_time)), + ("rainTime", Tag::Int(self.weather.rain_time)), + ("thunderTime", Tag::Int(self.weather.thunder_time)), + ("raining", Tag::Byte(i8::from(self.weather.raining))), + ("thundering", Tag::Byte(i8::from(self.weather.thundering))), + ("allowCommands", Tag::Byte(0)), + ("hardcore", Tag::Byte(0)), + ("Difficulty", Tag::Byte(2)), + ("WorldGenSettings", Tag::compound([("seed", Tag::Long(self.seed)), ("generate_features", Tag::Byte(1)), ("bonus_chest", Tag::Byte(0))])), + ("Player", Tag::compound(player)), + ]), + )]), + }; + let bytes = nbt::write_named(&root, Limits::default()).map_err(|e| e.to_string())?; + let compressed = Compression::Gzip.encode(&bytes)?; + let temporary = dir.join("level.dat_new"); + fs::write(&temporary, compressed)?; + if dir.join("level.dat").exists() { + let _ = fs::rename(dir.join("level.dat"), dir.join("level.dat_old")); + } + fs::rename(temporary, dir.join("level.dat"))?; + Ok(()) + } +} +/// Loads saved chunks before falling back to generation. +pub struct Persistent<G> { + pub inner: Arc<G>, + pub save: Arc<SaveDir>, + pub registry: Arc<crate::assets::Assets>, + pub biomes: Arc<Biomes>, +} +impl<G: ChunkGenerator> ChunkGenerator for Persistent<G> { + type Worker = G::Worker; + fn worker(&self) -> G::Worker { + self.inner.worker() + } + fn load(&self, x: i32, z: i32) -> Option<Chunk> { + let mut chunk = self.save.load(x, z, &self.registry.registry, &self.biomes)?; + for s in &mut chunk.sections { + Arc::make_mut(s).compact(); + } + Some(chunk) + } + fn proto(&self, worker: &mut G::Worker, x: i32, z: i32) -> crate::streaming::Proto { + self.inner.proto(worker, x, z) + } + fn decorates(&self) -> bool { + self.inner.decorates() + } + fn decorate(&self, worker: &mut G::Worker, region: &mut [crate::streaming::Proto; 9]) { + self.inner.decorate(worker, region); + } + fn finish(&self, proto: crate::streaming::Proto) -> Chunk { + self.inner.finish(proto) + } +} diff --git a/crates/horizon-client/src/settings.rs b/crates/horizon-client/src/settings.rs new file mode 100644 index 000000000..55a729382 --- /dev/null +++ b/crates/horizon-client/src/settings.rs @@ -0,0 +1,128 @@ +//! Player settings persisted in `options.txt` with vanilla's keys, and the +//! options screen (sliders and toggles in OptionsScreen's two-column layout). +use crate::hud::{HudAtlas, HudBatch, rgba}; +use std::{fs, path::Path}; + +#[derive(Clone, Debug)] +pub struct Settings { + /// Degrees, 30..=110 (vanilla stores the slider value). + pub fov: f32, + /// Chunks, 2..=32. + pub render_distance: i32, + /// 0..1, vanilla default 0.5. + pub sensitivity: f32, + /// 0..1. + pub master_volume: f32, + /// 0 = auto. + pub gui_scale: u32, + pub view_bobbing: bool, +} +impl Default for Settings { + fn default() -> Self { + Self { fov: 70.0, render_distance: 12, sensitivity: 0.5, master_volume: 1.0, gui_scale: 0, view_bobbing: true } + } +} +impl Settings { + pub fn load(path: &Path) -> Self { + let mut s = Self::default(); + let Ok(text) = fs::read_to_string(path) else { return s }; + for line in text.lines() { + let Some((k, v)) = line.split_once(':') else { continue }; + match k { + // Options.fov is stored as (fov - 70) / 40. + "fov" => s.fov = v.parse::<f32>().map_or(70.0, |f| (70.0 + f * 40.0).clamp(30.0, 110.0)), + "renderDistance" => s.render_distance = v.parse().unwrap_or(12).clamp(2, 32), + "mouseSensitivity" => s.sensitivity = v.parse().unwrap_or(0.5f32).clamp(0.0, 1.0), + "soundCategory_master" => s.master_volume = v.parse().unwrap_or(1.0f32).clamp(0.0, 1.0), + "guiScale" => s.gui_scale = v.parse().unwrap_or(0), + "bobView" => s.view_bobbing = v == "true", + _ => {} + } + } + s + } + pub fn save(&self, path: &Path) { + let text = format!( + "version:4793\nfov:{}\nrenderDistance:{}\nmouseSensitivity:{}\nsoundCategory_master:{}\nguiScale:{}\nbobView:{}\n", + (self.fov - 70.0) / 40.0, + self.render_distance, + self.sensitivity, + self.master_volume, + self.gui_scale, + self.view_bobbing + ); + let _ = fs::write(path, text); + } + fn rows(&self) -> Vec<(String, Option<f32>)> { + vec![ + (format!("FOV: {}", if self.fov.round() == 70.0 { "Normal".into() } else if self.fov >= 110.0 { "Quake Pro".into() } else { format!("{:.0}", self.fov) }), Some((self.fov - 30.0) / 80.0)), + (format!("Render Distance: {} chunks", self.render_distance), Some((self.render_distance - 2) as f32 / 30.0)), + (format!("Sensitivity: {}", if self.sensitivity == 0.0 { "*yawn*".into() } else if self.sensitivity >= 1.0 { "HYPERSPEED!!!".into() } else { format!("{:.0}%", self.sensitivity * 200.0) }), Some(self.sensitivity)), + (format!("Master Volume: {}", if self.master_volume == 0.0 { "OFF".into() } else { format!("{:.0}%", self.master_volume * 100.0) }), Some(self.master_volume)), + (format!("GUI Scale: {}", if self.gui_scale == 0 { "Auto".into() } else { self.gui_scale.to_string() }), None), + (format!("View Bobbing: {}", if self.view_bobbing { "ON" } else { "OFF" }), None), + ] + } + fn layout(w: f32, i: usize) -> (f32, f32) { + (w / 2.0 - 155.0 + (i % 2) as f32 * 160.0, 48.0 + (i / 2) as f32 * 24.0) + } + pub fn draw(&self, atlas: &HudAtlas, batch: &mut HudBatch, cursor: (f32, f32)) { + let (w, h) = (batch.width, batch.height); + batch.fill(atlas, 0.0, 0.0, w, h, rgba(0, 0, 0, 150)); + let title = "Options"; + let tw = HudBatch::text_width(atlas, title); + batch.text(atlas, title, (w - tw) / 2.0, 15.0, u32::MAX, true); + let mut rows = self.rows(); + rows.push(("Done".into(), None)); + for (i, (label, slider)) in rows.iter().enumerate() { + let (x, y) = if i == rows.len() - 1 { (w / 2.0 - 100.0, h / 6.0 + 168.0) } else { Self::layout(w, i) }; + let width = if i == rows.len() - 1 { 200.0 } else { 150.0 }; + let hover = cursor.0 >= x && cursor.0 < x + width && cursor.1 >= y && cursor.1 < y + 20.0; + let sprite = match (slider, hover) { + (Some(_), _) => "gui/sprites/widget/slider", + (None, true) => "gui/sprites/widget/button_highlighted", + (None, false) => "gui/sprites/widget/button", + }; + if let Some(r) = atlas.sprites.get(sprite).copied() { + let half = width / 2.0; + let mut left = r; + left.u1 = r.u0 + (r.u1 - r.u0) * (half / r.w as f32); + batch.rect_uv(x, y, half, 20.0, left, u32::MAX); + let mut right = r; + right.u0 = r.u1 - (r.u1 - r.u0) * (half / r.w as f32); + batch.rect_uv(x + half, y, half, 20.0, right, u32::MAX); + } + if let Some(v) = slider { + let handle = if hover { "gui/sprites/widget/slider_handle_highlighted" } else { "gui/sprites/widget/slider_handle" }; + batch.sprite_scaled(atlas, handle, x + v.clamp(0.0, 1.0) * (width - 8.0), y, 8.0, 20.0, u32::MAX); + } + let tw = HudBatch::text_width(atlas, label); + batch.text(atlas, label, x + (width - tw) / 2.0, y + 6.0, u32::MAX, true); + } + } + /// Handle a click or drag; returns true when Done was pressed. + pub fn click(&mut self, x: f32, y: f32, size: (f32, f32), drag: bool) -> bool { + let (w, h) = size; + let rows = self.rows().len(); + if !drag && x >= w / 2.0 - 100.0 && x < w / 2.0 + 100.0 && y >= h / 6.0 + 168.0 && y < h / 6.0 + 188.0 { + return true; + } + for i in 0..rows { + let (bx, by) = Self::layout(w, i); + if !(x >= bx && x < bx + 150.0 && y >= by && y < by + 20.0) { + continue; + } + let v = ((x - bx - 4.0) / 142.0).clamp(0.0, 1.0); + match i { + 0 => self.fov = (30.0 + v * 80.0).round(), + 1 => self.render_distance = 2 + (v * 30.0).round() as i32, + 2 => self.sensitivity = (v * 100.0).round() / 100.0, + 3 => self.master_volume = (v * 100.0).round() / 100.0, + 4 if !drag => self.gui_scale = (self.gui_scale + 1) % 5, + 5 if !drag => self.view_bobbing = !self.view_bobbing, + _ => {} + } + } + false + } +} diff --git a/crates/horizon-client/src/sprint.rs b/crates/horizon-client/src/sprint.rs new file mode 100644 index 000000000..6842d42f3 --- /dev/null +++ b/crates/horizon-client/src/sprint.rs @@ -0,0 +1,117 @@ +//! LocalPlayer sprint decisions around KeyboardInput.tick. Conditions are the +//! current player queries; setting sprint dispatches to the live attribute state. +use crate::input; + +#[derive(Clone, Copy, Debug, Default)] +pub struct Keys { + pub forward: bool, + pub backward: bool, + pub left: bool, + pub right: bool, + pub jump: bool, + pub shift: bool, + pub sprint: bool, +} +impl Keys { + pub fn direction(self) -> [f32; 2] { + input::keyboard_direction(self.forward, self.backward, self.left, self.right) + } +} +#[derive(Clone, Copy, Debug, Default)] +pub struct SprintState { + pub trigger_time: i32, + pub previous_forward: bool, + pub previous_shift: bool, +} +#[derive(Clone, Copy, Debug, Default)] +pub struct Conditions { + pub sprinting: bool, + pub mobility_restricted: bool, + pub passenger: bool, + pub vehicle_can_sprint: bool, + pub vehicle_local: bool, + pub enough_food: bool, + pub may_fly: bool, + pub flying: bool, + pub shallow_water: bool, + pub slow_item: bool, + pub fall_flying: bool, + pub under_water: bool, + pub moving_slowly: bool, + pub swimming: bool, + pub in_water: bool, + pub on_ground: bool, + pub horizontal_collision: bool, + pub minor_horizontal_collision: bool, +} +impl Conditions { + fn possible(self, allow_shallow_water: bool) -> bool { + !self.mobility_restricted + && if self.passenger { + self.vehicle_can_sprint && self.vehicle_local + } else { + self.enough_food || self.may_fly + } + && (allow_shallow_water || !self.shallow_water) + } + fn can_start(self, forward: bool) -> bool { + !self.sprinting + && forward + && self.possible(self.flying) + && !self.slow_item + && (!self.fall_flying || self.under_water) + && (!self.moving_slowly || self.under_water) + } + fn should_stop(self, forward: bool, shift: bool) -> bool { + if self.swimming { + !self.possible(true) || !self.in_water || (!forward && !self.on_ground && !shift) + } else { + !self.possible(self.flying) + || !forward + || (self.horizontal_collision && !self.minor_horizontal_collision) + } + } +} +impl SprintState { + /// Runs the sprint phase. The default vanilla sprint window is seven ticks; + /// it is supplied so the options binding can also select 0..10. The setter + /// is called for every native request, including repeated true requests. + pub fn tick<E>( + &mut self, + keys: Keys, + conditions: Conditions, + window: i32, + mut set_sprinting: impl FnMut(bool) -> Result<(), E>, + ) -> Result<(), E> { + if self.trigger_time > 0 { + self.trigger_time -= 1; + } + let old_forward = self.previous_forward; + let old_shift = self.previous_shift; + let forward = keys.direction()[1] > 1.0e-5; + self.previous_forward = forward; + self.previous_shift = keys.shift; + if old_shift || (conditions.slow_item && !conditions.passenger) || keys.backward { + self.trigger_time = 0; + } + let mut sprinting = conditions.sprinting; + if conditions.can_start(forward) { + if !old_forward { + if self.trigger_time > 0 { + set_sprinting(true)?; + sprinting = true; + } else { + self.trigger_time = window; + } + } + if keys.sprint { + set_sprinting(true)?; + sprinting = true; + } + } + if sprinting && conditions.should_stop(forward, keys.shift) { + set_sprinting(false)?; + } + Ok(()) + } +} diff --git a/crates/horizon-client/src/sprites.rs b/crates/horizon-client/src/sprites.rs new file mode 100644 index 000000000..758e9e857 --- /dev/null +++ b/crates/horizon-client/src/sprites.rs @@ -0,0 +1,165 @@ +//! Shared nearest-sampled sprite array for block and item textures. +use crate::Result; +use horizon_assets::animation::{AnimationClip, AnimationMetadata}; +use std::{ + collections::BTreeMap, + fs::{self, File}, + io::BufReader, + path::Path, + sync::Arc, +}; + +#[derive(Clone)] +pub struct SpriteAnimation { + pub layer: u32, + frames: Arc<Vec<Vec<u8>>>, + clip: Arc<AnimationClip>, +} +impl SpriteAnimation { + pub fn frame(&self, tick: u64) -> usize { + self.clip.sample(tick).frame as usize + } + pub fn pixels(&self, frame: usize) -> &[u8] { + &self.frames[frame] + } +} + +#[derive(Default)] +pub struct Sprites { + pub size: u32, + pub pixels: Vec<u8>, + pub layers: BTreeMap<String, u32>, + pub animations: Vec<SpriteAnimation>, + pub opaque: Vec<bool>, + pub translucent: Vec<bool>, +} +/// Edge length of every sprite array layer. +pub const SPRITE_SIZE: u32 = 16; +impl Sprites { + pub fn insert(&mut self, root: &Path, name: &str) -> Result<u32> { + if let Some(layer) = self.layers.get(name) { + return Ok(*layer); + } + let (namespace, path) = name.split_once(':').ok_or("invalid sprite identifier")?; + let path = root.join(format!("assets/{namespace}/textures/{path}.png")); + let metadata = match fs::read_to_string(path.with_extension("png.mcmeta")) { + Ok(text) => Some(serde_json::from_str::< + BTreeMap<String, Box<serde_json::value::RawValue>>, + >(&text)?), + Err(error) if error.kind() == std::io::ErrorKind::NotFound => None, + Err(error) => return Err(error.into()), + }; + let animation = metadata + .as_ref() + .and_then(|v| v.get("animation")) + .map(|v| AnimationMetadata::from_json(v.get())) + .transpose()?; + let mut decoder = png::Decoder::new(BufReader::new(File::open(path)?)); + decoder.set_transformations(png::Transformations::EXPAND | png::Transformations::STRIP_16); + let mut reader = decoder.read_info()?; + let mut bytes = vec![ + 0; + reader + .output_buffer_size() + .ok_or("sprite exceeds decoder limits")? + ]; + let info = reader.next_frame(&mut bytes)?; + let (width, height) = if let Some(animation) = &animation { + let [width, height] = + animation.frame_size(i32::try_from(info.width)?, i32::try_from(info.height)?); + (u32::try_from(width)?, u32::try_from(height)?) + } else { + (info.width, info.height) + }; + if width == 0 || height == 0 || info.width % width != 0 || info.height % height != 0 { + return Err(format!("sprite {name} has invalid frame dimensions").into()); + } + let channels = info.color_type.samples(); + let mut pixels = Vec::with_capacity(info.width as usize * info.height as usize * 4); + for pixel in bytes[..info.buffer_size()].chunks_exact(channels) { + let rgba = match info.color_type { + png::ColorType::Rgba => [pixel[0], pixel[1], pixel[2], pixel[3]], + png::ColorType::Rgb => [pixel[0], pixel[1], pixel[2], 255], + png::ColorType::Grayscale => [pixel[0], pixel[0], pixel[0], 255], + png::ColorType::GrayscaleAlpha => [pixel[0], pixel[0], pixel[0], pixel[1]], + _ => return Err("unsupported expanded sprite format".into()), + }; + pixels.extend(rgba); + } + let layer = u32::try_from(self.layers.len())?; + let columns = info.width / width; + let count = columns * (info.height / height); + let mut frames = Vec::new(); + for index in 0..count { + let x = index % columns * width; + let y = index / columns * height; + // Every array layer is SPRITE_SIZE square; other sizes are + // nearest-resampled so UVs (normalized per layer) are unchanged. + let mut frame = Vec::with_capacity((SPRITE_SIZE * SPRITE_SIZE * 4) as usize); + for row in 0..SPRITE_SIZE { + let source_row = y + row * height / SPRITE_SIZE; + for column in 0..SPRITE_SIZE { + let offset = + ((source_row * info.width + x + column * width / SPRITE_SIZE) * 4) as usize; + frame.extend_from_slice(&pixels[offset..offset + 4]); + } + } + frames.push(frame); + } + let frames = Arc::new(frames); + let mut initial = 0; + if let Some(clip) = animation + .as_ref() + .map(|m| m.clip(count)) + .transpose()? + .flatten() + { + initial = clip.sample(0).frame as usize; + self.animations.push(SpriteAnimation { + layer, + frames: frames.clone(), + clip: Arc::new(clip), + }); + } + self.opaque + .push(pixels.as_chunks::<4>().0.iter().all(|p| p[3] == 255)); + self.translucent.push( + pixels + .as_chunks::<4>() + .0 + .iter() + .any(|p| p[3] != 0 && p[3] != 255), + ); + self.layers.insert(name.to_owned(), layer); + self.size = SPRITE_SIZE; + self.pixels.extend_from_slice(&frames[initial]); + Ok(layer) + } +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn animation_boundaries_and_repeated_frames_do_not_depend_on_render_rate() { + let animation = SpriteAnimation { + layer: 0, + frames: Arc::new(vec![vec![], vec![], vec![]]), + clip: Arc::new(AnimationMetadata::from_json(r#"{"frames":[{"index":2,"time":8},{"index":1,"time":3},{"index":1,"time":2},0]}"#).unwrap().clip(3).unwrap().unwrap()), + }; + for (tick, frame) in [ + (0, 2), + (7, 2), + (8, 1), + (10, 1), + (11, 1), + (12, 1), + (13, 0), + (14, 2), + (29, 2), + (u64::MAX, 2), + ] { + assert_eq!(animation.frame(tick), frame); + } + } +} diff --git a/crates/horizon-client/src/streaming.rs b/crates/horizon-client/src/streaming.rs new file mode 100644 index 000000000..60e404f76 --- /dev/null +++ b/crates/horizon-client/src/streaming.rs @@ -0,0 +1,471 @@ +//! Chunk streaming: a worker pool generates, lights and meshes chunk columns +//! around the player, closest first. The game thread owns the world and only +//! hands immutable `Arc` snapshots to workers; results carry a sequence number +//! so stale work is dropped. +use crate::{ + chunk::{Chunk, SECTIONS}, + light::{LightTables, light_chunk}, + mesher::{MeshTables, Mesher, Region, SectionMesh, borrow}, + world::World, +}; +use std::{ + collections::{BinaryHeap, HashMap, HashSet}, + sync::{ + Arc, Condvar, Mutex, + atomic::{AtomicBool, Ordering}, + mpsc, + }, + thread, +}; + +/// A chunk under generation, opaque to the streamer. +pub type Proto = Box<dyn std::any::Any + Send>; +/// Chunk generation in vanilla's stages: a neighbour-independent proto chunk +/// (biomes, noise, surface, carvers), decoration of a 3x3 neighbourhood +/// (FEATURES, which may write into neighbours), then conversion of a chunk +/// whose eight neighbours are decorated into a final column. Implementations +/// must be thread-safe; each worker thread owns one `Worker`. +pub trait ChunkGenerator: Send + Sync + 'static { + type Worker: Send + 'static; + fn worker(&self) -> Self::Worker; + /// A previously saved final chunk, bypassing generation. + fn load(&self, _x: i32, _z: i32) -> Option<Chunk> { + None + } + fn proto(&self, worker: &mut Self::Worker, x: i32, z: i32) -> Proto; + fn decorates(&self) -> bool { + false + } + /// Decorate `region[4]`; the region is row-major (dz, dx) around it. + fn decorate(&self, _worker: &mut Self::Worker, _region: &mut [Proto; 9]) {} + fn finish(&self, proto: Proto) -> Chunk; +} +enum Job { + Generate(i32, i32), + Decorate(i32, i32, Box<[Proto; 9]>), + Finish(Proto), + Light(i32, i32, Box<Region>, u64, bool), + Mesh(i32, i32, i32, Box<Region>, u64, bool), +} +pub enum Done { + Generated(Chunk), + Proto(i32, i32, Proto), + Decorated(i32, i32, Box<[Proto; 9]>), + Lit(i32, i32, Vec<Arc<crate::chunk::Section>>, u64), + Meshed(i32, i32, i32, SectionMesh, u64), +} +struct Queued { + priority: i64, + order: u64, + job: Job, +} +impl PartialEq for Queued { + fn eq(&self, o: &Self) -> bool { + self.priority == o.priority && self.order == o.order + } +} +impl Eq for Queued {} +impl PartialOrd for Queued { + fn partial_cmp(&self, o: &Self) -> Option<std::cmp::Ordering> { + Some(self.cmp(o)) + } +} +impl Ord for Queued { + fn cmp(&self, o: &Self) -> std::cmp::Ordering { + // BinaryHeap is a max-heap: lower priority value = more urgent. + o.priority + .cmp(&self.priority) + .then(o.order.cmp(&self.order)) + } +} +struct Shared { + queue: Mutex<BinaryHeap<Queued>>, + ready: Condvar, + stop: AtomicBool, +} +pub struct Streaming { + shared: Arc<Shared>, + results: mpsc::Receiver<Done>, + threads: Vec<thread::JoinHandle<()>>, + order: u64, + generating: HashSet<(i32, i32)>, + /// Proto chunks: `None` while checked out to a decoration job. + protos: HashMap<(i32, i32), Option<Proto>>, + decorated: HashSet<(i32, i32)>, + decorating: usize, + finishing: HashSet<(i32, i32)>, + decorates: bool, + lighting: HashMap<(i32, i32), u64>, + meshing: HashMap<(i32, i32, i32), u64>, + /// Chunks whose light is current. + lit: HashSet<(i32, i32)>, + /// Columns whose sections have been meshed at least once. + meshed: HashSet<(i32, i32)>, + sequence: u64, + pub center: (i32, i32), + pub radius: i32, + /// No work is scheduled while paused (title screen). + pub paused: bool, + /// Dimension flags: sky light, Nether face shading. + pub sky_light: bool, + pub nether_shading: bool, + pub generated_total: u64, + pub meshed_total: u64, +} +pub struct WorkerContext { + pub assets: Arc<crate::assets::Assets>, + pub tables: Arc<MeshTables>, + pub biomes: Arc<crate::biome::Biomes>, + pub light: Arc<LightTables>, +} +impl Streaming { + pub fn new<G: ChunkGenerator>(generator: Arc<G>, context: Arc<WorkerContext>, threads: usize) -> Self { + let shared = Arc::new(Shared { + queue: Mutex::new(BinaryHeap::new()), + ready: Condvar::new(), + stop: AtomicBool::new(false), + }); + let (send, results) = mpsc::channel(); + let threads = (0..threads.max(1)) + .map(|i| { + let shared = shared.clone(); + let send = send.clone(); + let generator = generator.clone(); + let context = context.clone(); + thread::Builder::new() + .name(format!("horizon-worker-{i}")) + .spawn(move || { + let mut worker = generator.worker(); + let mut mesher = Mesher { + nether_shading: false, + assets: &context.assets, + tables: &context.tables, + biomes: &context.biomes, + visibility: context.tables.visibility.clone(), + }; + loop { + let job = { + let mut queue = shared.queue.lock().unwrap(); + loop { + if shared.stop.load(Ordering::Relaxed) { + return; + } + if let Some(job) = queue.pop() { + break job.job; + } + queue = shared.ready.wait(queue).unwrap(); + } + }; + let done = match job { + Job::Generate(x, z) => match generator.load(x, z) { + Some(chunk) => Done::Generated(chunk), + None => Done::Proto(x, z, generator.proto(&mut worker, x, z)), + }, + Job::Decorate(x, z, mut region) => { + generator.decorate(&mut worker, &mut region); + Done::Decorated(x, z, region) + } + Job::Finish(proto) => Done::Generated(generator.finish(proto)), + Job::Light(x, z, region, seq, sky) => { + Done::Lit(x, z, light_chunk(&borrow(®ion), &context.light, sky), seq) + } + Job::Mesh(x, sy, z, region, seq, nether) => { + mesher.nether_shading = nether; + Done::Meshed(x, sy, z, mesher.mesh(&borrow(®ion), sy), seq) + } + }; + if send.send(done).is_err() { + return; + } + } + }) + .expect("spawn worker") + }) + .collect(); + Self { + shared, + results, + threads, + order: 0, + generating: HashSet::new(), + protos: HashMap::new(), + decorated: HashSet::new(), + decorating: 0, + finishing: HashSet::new(), + decorates: generator.decorates(), + lighting: HashMap::new(), + meshing: HashMap::new(), + lit: HashSet::new(), + meshed: HashSet::new(), + sequence: 0, + center: (0, 0), + radius: 8, + paused: false, + sky_light: true, + nether_shading: false, + generated_total: 0, + meshed_total: 0, + } + } + fn submit(&mut self, priority: i64, job: Job) { + self.order += 1; + self.shared.queue.lock().unwrap().push(Queued { + priority, + order: self.order, + job, + }); + self.shared.ready.notify_one(); + } + fn distance(&self, x: i32, z: i32) -> i64 { + let (dx, dz) = (i64::from(x - self.center.0), i64::from(z - self.center.1)); + dx * dx + dz * dz + } + fn region(world: &World, x: i32, z: i32) -> Option<Box<Region>> { + let mut region: Region = Default::default(); + for dz in 0..3 { + for dx in 0..3 { + region[dz][dx] = Some(world.chunks.get(&(x + dx as i32 - 1, z + dz as i32 - 1))?.clone()); + } + } + Some(Box::new(region)) + } + pub fn is_lit(&self, x: i32, z: i32) -> bool { + self.lit.contains(&(x, z)) + } + pub fn pending(&self) -> usize { + self.shared.queue.lock().unwrap().len() + } + /// Advance streaming: collect finished work, then schedule more. + /// Returns meshes ready for upload and columns that were unloaded. + pub fn update(&mut self, world: &mut World) -> (Vec<((i32, i32, i32), SectionMesh)>, Vec<Arc<Chunk>>) { + let mut uploads = Vec::new(); + if self.paused { + return (uploads, Vec::new()); + } + while let Ok(done) = self.results.try_recv() { + match done { + Done::Proto(x, z, proto) => { + self.generating.remove(&(x, z)); + if self.in_range(x, z, 4) { + self.protos.insert((x, z), Some(proto)); + if !self.decorates { + self.decorated.insert((x, z)); + } + } + } + Done::Decorated(x, z, region) => { + self.decorating -= 1; + self.decorated.insert((x, z)); + for (i, proto) in region.into_iter().enumerate() { + let key = (x + (i % 3) as i32 - 1, z + (i / 3) as i32 - 1); + self.protos.insert(key, Some(proto)); + } + } + Done::Generated(mut chunk) => { + let key = (chunk.x, chunk.z); + world.block_entities.extend(std::mem::take(&mut chunk.block_entities)); + self.generating.remove(&key); + self.finishing.remove(&key); + self.decorated.insert(key); + if self.in_range(key.0, key.1, 2) { + self.generated_total += 1; + world.chunks.insert(key, Arc::new(chunk)); + for dz in -1..=1 { + for dx in -1..=1 { + world.dirty_light.insert((key.0 + dx, key.1 + dz)); + } + } + } + } + Done::Lit(x, z, sections, seq) => { + if self.lighting.get(&(x, z)) != Some(&seq) { + continue; + } + self.lighting.remove(&(x, z)); + if let Some(chunk) = world.chunks.get_mut(&(x, z)) { + let chunk = Arc::make_mut(chunk); + // Keep blocks edited since the snapshot; take only light. + for (target, lit) in chunk.sections.iter_mut().zip(sections) { + let mut section = (**target).clone(); + section.light = lit.light.clone(); + *target = Arc::new(section); + } + chunk.lit = true; + self.lit.insert((x, z)); + for dz in -1..=1 { + for dx in -1..=1 { + for sy in 0..SECTIONS as i32 { + world.dirty_sections.insert((x + dx, sy, z + dz)); + } + } + } + } + } + Done::Meshed(x, sy, z, mesh, seq) => { + if self.meshing.get(&(x, sy, z)) != Some(&seq) { + continue; + } + self.meshing.remove(&(x, sy, z)); + self.meshed_total += 1; + uploads.push(((x, sy, z), mesh)); + } + } + } + // Unload far columns. + let far: Vec<_> = world + .chunks + .keys() + .copied() + .filter(|&(x, z)| !self.in_range(x, z, 3)) + .collect(); + for key in &far { + self.decorated.remove(key); + } + let mut removed = Vec::with_capacity(far.len()); + for key in &far { + if let Some(chunk) = world.chunks.remove(key) { + removed.push(chunk); + } + self.lit.remove(key); + self.meshed.remove(key); + } + // Drop far proto chunks that are not checked out. + let (cx, cz, r4) = (self.center.0, self.center.1, i64::from(self.radius + 4)); + self.protos.retain(|&(x, z), p| { + let d = i64::from(x - cx).pow(2) + i64::from(z - cz).pow(2); + p.is_none() || d <= r4 * r4 + }); + let (protos, finishing) = (&self.protos, &self.finishing); + self.decorated + .retain(|k| protos.contains_key(k) || finishing.contains(k) || world.chunks.contains_key(k)); + // Finalize chunks whose neighbourhood is decorated. + let candidates: Vec<(i32, i32)> = self.protos.keys().copied().collect(); + for (x, z) in candidates { + if world.chunks.contains_key(&(x, z)) || self.finishing.contains(&(x, z)) || !self.in_range(x, z, 1) { + continue; + } + let ready = (-1..=1).all(|dz| { + (-1..=1).all(|dx| self.decorated.contains(&(x + dx, z + dz)) || world.chunks.contains_key(&(x + dx, z + dz))) + }); + if ready && let Some(Some(_)) = self.protos.get(&(x, z)) { + let proto = self.protos.remove(&(x, z)).flatten().expect("present proto"); + self.finishing.insert((x, z)); + self.submit(self.distance(x, z) * 4, Job::Finish(proto)); + } + } + // Decorate chunks whose 3x3 proto neighbourhood is available. + let workers = self.threads.len(); + if self.decorates && self.decorating < workers * 2 { + let mut wanted: Vec<(i64, i32, i32)> = self + .protos + .iter() + .filter(|(k, p)| p.is_some() && !self.decorated.contains(k) && self.in_range(k.0, k.1, 2)) + .map(|(k, _)| (self.distance(k.0, k.1), k.0, k.1)) + .collect(); + wanted.sort_unstable(); + for (d, x, z) in wanted { + if self.decorating >= workers * 2 { + break; + } + let keys: Vec<(i32, i32)> = (0..9).map(|i| (x + (i % 3) - 1, z + (i / 3) - 1)).collect(); + // A final (saved) neighbour cannot receive writes: skip decoration. + if keys.iter().any(|k| world.chunks.contains_key(k)) { + self.decorated.insert((x, z)); + continue; + } + if !keys.iter().all(|k| matches!(self.protos.get(k), Some(Some(_)))) { + continue; + } + let region: Vec<Proto> = keys + .iter() + .map(|k| self.protos.insert(*k, None).flatten().expect("present proto")) + .collect(); + let region: Box<[Proto; 9]> = match region.try_into() { + Ok(r) => Box::new(r), + Err(_) => continue, + }; + self.decorating += 1; + self.submit(d * 4 + 1, Job::Decorate(x, z, region)); + } + } + // Generation (load or proto), closest first, bounded in flight. + let margin = if self.decorates { 3 } else { 1 }; + if self.generating.len() < workers * 3 { + let r = self.radius + margin; + let mut wanted = Vec::new(); + for dz in -r..=r { + for dx in -r..=r { + let (x, z) = (self.center.0 + dx, self.center.1 + dz); + if !self.in_range(x, z, margin) + || world.chunks.contains_key(&(x, z)) + || self.generating.contains(&(x, z)) + || self.protos.contains_key(&(x, z)) + || self.finishing.contains(&(x, z)) + { + continue; + } + wanted.push((self.distance(x, z), x, z)); + } + } + wanted.sort_unstable(); + for (d, x, z) in wanted.into_iter().take(workers * 3 - self.generating.len()) { + self.generating.insert((x, z)); + self.submit(d * 4, Job::Generate(x, z)); + } + } + // Lighting once all neighbours exist. + let light: Vec<_> = world.dirty_light.iter().copied().collect(); + for (x, z) in light { + if !world.chunks.contains_key(&(x, z)) { + world.dirty_light.remove(&(x, z)); + continue; + } + let Some(region) = Self::region(world, x, z) else { + continue; + }; + world.dirty_light.remove(&(x, z)); + self.sequence += 1; + self.lighting.insert((x, z), self.sequence); + self.submit(self.distance(x, z) * 4 + 1, Job::Light(x, z, region, self.sequence, self.sky_light)); + } + // Meshing once the column and its neighbours are lit. + let dirty: Vec<_> = world.dirty_sections.iter().copied().collect(); + let mut columns: HashMap<(i32, i32), Option<Box<Region>>> = HashMap::new(); + for (x, sy, z) in dirty { + if !world.chunks.contains_key(&(x, z)) || !self.in_range(x, z, 0) { + world.dirty_sections.remove(&(x, sy, z)); + continue; + } + let ready = (-1..=1).all(|dz| (-1..=1).all(|dx| self.lit.contains(&(x + dx, z + dz)))); + if !ready || self.lighting.contains_key(&(x, z)) { + continue; + } + let region = columns + .entry((x, z)) + .or_insert_with(|| Self::region(world, x, z)); + let Some(region) = region.clone() else { continue }; + world.dirty_sections.remove(&(x, sy, z)); + let first = self.meshed.insert((x, z)); + self.sequence += 1; + self.meshing.insert((x, sy, z), self.sequence); + self.submit( + self.distance(x, z) * 4 + if first { 2 } else { 0 }, + Job::Mesh(x, sy, z, region, self.sequence, self.nether_shading), + ); + } + (uploads, removed) + } + fn in_range(&self, x: i32, z: i32, margin: i32) -> bool { + let r = i64::from(self.radius + margin); + self.distance(x, z) <= r * r + } +} +impl Drop for Streaming { + fn drop(&mut self) { + self.shared.stop.store(true, Ordering::Relaxed); + self.shared.ready.notify_all(); + for t in self.threads.drain(..) { + let _ = t.join(); + } + } +} diff --git a/crates/horizon-client/src/terrain.wgsl b/crates/horizon-client/src/terrain.wgsl new file mode 100644 index 000000000..406e718fc --- /dev/null +++ b/crates/horizon-client/src/terrain.wgsl @@ -0,0 +1,106 @@ +// Terrain, sky and outline shaders, ported from the pinned vanilla +// terrain.vsh/fsh, fog.glsl and sample_lightmap.glsl. +struct Globals { + view_proj: mat4x4<f32>, + fog_color: vec4<f32>, + // environmental start/end, render-distance start/end + fog: vec4<f32>, + sky_color: vec4<f32>, + // x: sky darkening, y: game time, z: aspect, w: tan(fov/2) + misc: vec4<f32>, + inverse_view: mat4x4<f32>, + sunrise: vec4<f32>, + // xyz: sun direction, w: star brightness + sun: vec4<f32>, +} +@group(0) @binding(0) var<uniform> globals: Globals; +@group(0) @binding(1) var sprites: texture_2d_array<f32>; +@group(0) @binding(2) var sprite_sampler: sampler; +@group(0) @binding(3) var lightmap: texture_2d<f32>; +@group(0) @binding(4) var lightmap_sampler: sampler; + +struct TerrainOut { + @builtin(position) clip: vec4<f32>, + @location(0) uv: vec2<f32>, + @location(1) @interpolate(flat) layer: u32, + @location(2) color: vec4<f32>, + @location(3) spherical: f32, + @location(4) cylindrical: f32, +} +fn sample_lightmap(sky: f32, block: f32) -> vec4<f32> { + let uv = vec2(block, sky) * 16.0; + return textureSampleLevel(lightmap, lightmap_sampler, + clamp(uv / 256.0 + 0.5 / 16.0, vec2(0.5 / 16.0), vec2(15.5 / 16.0)), 0.0); +} +@vertex fn vs_terrain( + @location(0) position: vec3<f32>, @location(1) uv: vec2<f32>, + @location(2) layer: u32, @location(3) color: vec4<f32>, @location(4) light: vec4<u32>, + @location(5) origin: vec4<f32>) -> TerrainOut { + let pos = position + origin.xyz; + var out: TerrainOut; + out.clip = globals.view_proj * vec4(pos, 1.0); + out.uv = uv; + out.layer = layer; + out.color = color * sample_lightmap(f32(light.x) / 16.0, f32(light.y) / 16.0); + out.spherical = length(pos); + out.cylindrical = max(length(pos.xz), abs(pos.y)); + return out; +} +fn linear_fog(d: f32, start: f32, end: f32) -> f32 { + if d <= start { return 0.0; } + if d >= end { return 1.0; } + return (d - start) / (end - start); +} +fn apply_fog(color: vec4<f32>, spherical: f32, cylindrical: f32) -> vec4<f32> { + let f = max(linear_fog(spherical, globals.fog.x, globals.fog.y), + linear_fog(cylindrical, globals.fog.z, globals.fog.w)); + return vec4(mix(color.rgb, globals.fog_color.rgb, f * globals.fog_color.a), color.a); +} +@fragment fn fs_solid(in: TerrainOut) -> @location(0) vec4<f32> { + let color = textureSample(sprites, sprite_sampler, in.uv, i32(in.layer)) * in.color; + if color.a < 0.5 { discard; } + return apply_fog(vec4(color.rgb, 1.0), in.spherical, in.cylindrical); +} +@fragment fn fs_translucent(in: TerrainOut) -> @location(0) vec4<f32> { + let color = textureSample(sprites, sprite_sampler, in.uv, i32(in.layer)) * in.color; + if color.a < 0.01 { discard; } + return apply_fog(color, in.spherical, in.cylindrical); +} + +// Sky: vanilla draws a sky disc in the sky colour and blends towards the fog +// colour at the horizon; sunrise/sunset tints the horizon facing the sun. +struct SkyOut { + @builtin(position) clip: vec4<f32>, + @location(0) ndc: vec2<f32>, +} +@vertex fn vs_sky(@builtin(vertex_index) i: u32) -> SkyOut { + let p = vec2(f32(i32(i & 1u) * 4 - 1), f32(i32(i >> 1u) * 4 - 1)); + var out: SkyOut; + out.clip = vec4(p, 0.0, 1.0); + out.ndc = p; + return out; +} +@fragment fn fs_sky(in: SkyOut) -> @location(0) vec4<f32> { + let view = normalize((globals.inverse_view * vec4(in.ndc.x * globals.misc.z * globals.misc.w, + in.ndc.y * globals.misc.w, -1.0, 0.0)).xyz); + let up = clamp(view.y, -1.0, 1.0); + // Fog band towards the horizon (vanilla sky end distance blending). + let horizon = 1.0 - smoothstep(0.0, 0.35, up); + var color = mix(globals.sky_color.rgb, globals.fog_color.rgb, horizon); + let toward_sun = max(dot(normalize(vec3(view.x, 0.0, view.z) + vec3(0.0001)), normalize(vec3(globals.sun.x, 0.0, globals.sun.z) + vec3(0.0001))), 0.0); + let band = (1.0 - smoothstep(-0.1, 0.4, abs(up))) * pow(toward_sun, 3.0); + color = mix(color, globals.sunrise.rgb, band * globals.sunrise.a); + if up < 0.0 { + // Void below the horizon. + color = mix(color, globals.sky_color.rgb * 0.2, smoothstep(0.0, -0.3, up) * (1.0 - globals.misc.x)); + } + return vec4(color, 1.0); +} + +struct LineOut { @builtin(position) clip: vec4<f32> } +@vertex fn vs_line(@location(0) position: vec3<f32>) -> LineOut { + var out: LineOut; + out.clip = globals.view_proj * vec4(position, 1.0); + return out; +} +@fragment fn fs_line() -> @location(0) vec4<f32> { return vec4(0.0, 0.0, 0.0, 0.4); } diff --git a/crates/horizon-client/src/testgen.rs b/crates/horizon-client/src/testgen.rs new file mode 100644 index 000000000..16e6b18d0 --- /dev/null +++ b/crates/horizon-client/src/testgen.rs @@ -0,0 +1,133 @@ +//! Simple rolling terrain used only until the vanilla overworld generator is +//! bound (`--test-terrain`). Not vanilla generation. +use crate::{chunk::Chunk, streaming::ChunkGenerator}; +use horizon_world::registry::BlockRegistry; + +pub struct TestTerrain { + stone: u16, + dirt: u16, + grass: u16, + water: u16, + sand: u16, + bedrock: u16, + log: u16, + leaves: u16, + short_grass: u16, + plains: u16, +} +impl TestTerrain { + pub fn new(registry: &BlockRegistry, biomes: &crate::biome::Biomes) -> crate::Result<Self> { + let id = |name: &str| -> crate::Result<u16> { + Ok(registry + .default_state(name) + .ok_or_else(|| format!("missing {name}"))? + .0 as u16) + }; + Ok(Self { + stone: id("minecraft:stone")?, + dirt: id("minecraft:dirt")?, + grass: id("minecraft:grass_block")?, + water: id("minecraft:water")?, + sand: id("minecraft:sand")?, + bedrock: id("minecraft:bedrock")?, + log: id("minecraft:oak_log")?, + leaves: registry + .resolve(&horizon_world::chunk::BlockState { + name: "minecraft:oak_leaves".into(), + properties: [ + ("distance".to_owned(), "1".to_owned()), + ("persistent".to_owned(), "false".to_owned()), + ("waterlogged".to_owned(), "false".to_owned()), + ] + .into(), + })? + .0 as u16, + short_grass: id("minecraft:short_grass")?, + plains: biomes.id("minecraft:plains"), + }) + } + fn height(x: i32, z: i32) -> i32 { + let (x, z) = (f64::from(x), f64::from(z)); + let h = 68.0 + + 10.0 * (x / 47.0).sin() * (z / 61.0).cos() + + 5.0 * ((x + z) / 23.0).sin() + + 3.0 * (x / 11.0).cos() * (z / 13.0).sin(); + h as i32 + } +} +fn hash(x: i32, z: i32) -> u32 { + let mut h = (x as u32).wrapping_mul(0x9E37_79B1) ^ (z as u32).wrapping_mul(0x85EB_CA77); + h ^= h >> 15; + h = h.wrapping_mul(0x2C1B_3C6D); + h ^ (h >> 12) +} +impl ChunkGenerator for TestTerrain { + type Worker = (); + fn worker(&self) {} + fn proto(&self, w: &mut (), x: i32, z: i32) -> crate::streaming::Proto { + Box::new(self.generate(w, x, z)) + } + fn finish(&self, proto: crate::streaming::Proto) -> Chunk { + let mut chunk = *proto.downcast::<Chunk>().expect("test terrain proto"); + chunk.fresh = true; + chunk + } +} +impl TestTerrain { + fn generate(&self, _: &mut (), cx: i32, cz: i32) -> Chunk { + let mut chunk = Chunk::empty(cx, cz); + chunk.biomes = std::sync::Arc::new(vec![self.plains; chunk.biomes.len()]); + for z in 0..16 { + for x in 0..16 { + let (wx, wz) = (cx * 16 + x, cz * 16 + z); + let h = Self::height(wx, wz); + for y in -64..=h.max(62) { + let b = if y == -64 { + self.bedrock + } else if y > h { + self.water + } else if y < h - 3 { + self.stone + } else if h <= 63 { + self.sand + } else if y == h { + self.grass + } else { + self.dirt + }; + chunk.set(x, y, z, b); + } + if h > 63 && hash(wx, wz) % 13 == 0 { + chunk.set(x, h + 1, z, self.short_grass); + } + } + } + // Trees fully inside the chunk. + for z in 2..14 { + for x in 2..14 { + let (wx, wz) = (cx * 16 + x, cz * 16 + z); + let h = Self::height(wx, wz); + if h <= 64 || hash(wx, wz) % 97 != 0 { + continue; + } + for y in h + 1..h + 6 { + chunk.set(x, y, z, self.log); + } + for dy in 3..7 { + let r = if dy >= 5 { 1 } else { 2 }; + for dz in -r..=r { + for dx in -r..=r { + if chunk.get(x + dx, h + dy, z + dz) == 0 { + chunk.set(x + dx, h + dy, z + dz, self.leaves); + } + } + } + } + } + } + for s in &mut chunk.sections { + std::sync::Arc::make_mut(s).compact(); + } + chunk + } +} diff --git a/crates/horizon-client/src/title.rs b/crates/horizon-client/src/title.rs new file mode 100644 index 000000000..ba53902ea --- /dev/null +++ b/crates/horizon-client/src/title.rs @@ -0,0 +1,299 @@ +//! Title, world selection and world creation screens (TitleScreen, +//! SelectWorldScreen, CreateWorldScreen layouts), drawn as HUD quads. +use crate::{ + hud::{HudAtlas, HudBatch, rgba}, + save::Level, +}; +use std::path::{Path, PathBuf}; + +#[derive(Clone, Debug)] +pub struct WorldEntry { + pub folder: String, + pub name: String, + pub creative: bool, + pub modified: std::time::SystemTime, +} +#[derive(Clone, Debug)] +pub enum Mode { + Main, + Select { worlds: Vec<WorldEntry>, selected: Option<usize> }, + Create { name: String, seed: String, creative: bool, focus: u8 }, +} +#[derive(Clone, Debug, PartialEq)] +pub enum Action { + None, + Quit, + Options, + Play { folder: String }, + Create { folder: String, name: String, seed: Option<i64>, creative: bool }, +} +pub struct Title { + pub mode: Mode, + pub saves: PathBuf, + pub started: std::time::Instant, +} +struct Button { + x: f32, + y: f32, + w: f32, + label: String, + enabled: bool, + id: u8, +} +/// Java String.hashCode for text seeds (WorldOptions.parseSeed). +pub fn parse_seed(text: &str) -> Option<i64> { + let t = text.trim(); + if t.is_empty() { + return None; + } + Some(t.parse::<i64>().unwrap_or_else(|_| i64::from(t.encode_utf16().fold(0i32, |h, c| h.wrapping_mul(31).wrapping_add(i32::from(c)))))) +} +pub fn list_worlds(saves: &Path) -> Vec<WorldEntry> { + let mut worlds: Vec<WorldEntry> = std::fs::read_dir(saves) + .into_iter() + .flatten() + .flatten() + .filter_map(|e| { + let path = e.path(); + let level = Level::read(&path)?; + let modified = std::fs::metadata(path.join("level.dat")).and_then(|m| m.modified()).ok()?; + Some(WorldEntry { + folder: e.file_name().to_string_lossy().into_owned(), + name: level.name, + creative: level.creative, + modified, + }) + }) + .collect(); + worlds.sort_by(|a, b| b.modified.cmp(&a.modified)); + worlds +} +impl Title { + pub fn new(saves: PathBuf) -> Self { + Self { mode: Mode::Main, saves, started: std::time::Instant::now() } + } + fn buttons(&self, w: f32, h: f32) -> Vec<Button> { + let b = |x: f32, y: f32, w: f32, label: &str, enabled: bool, id: u8| Button { x, y, w, label: label.into(), enabled, id }; + match &self.mode { + Mode::Main => { + let y = h / 4.0 + 48.0; + vec![ + b(w / 2.0 - 100.0, y, 200.0, "Singleplayer", true, 1), + b(w / 2.0 - 100.0, y + 24.0, 200.0, "Multiplayer", false, 0), + b(w / 2.0 - 100.0, y + 48.0, 200.0, "Minecraft Realms", false, 0), + b(w / 2.0 - 100.0, y + 84.0, 98.0, "Options...", true, 3), + b(w / 2.0 + 2.0, y + 84.0, 98.0, "Quit Game", true, 2), + ] + } + Mode::Select { selected, .. } => vec![ + b(w / 2.0 - 154.0, h - 52.0, 150.0, "Play Selected World", selected.is_some(), 10), + b(w / 2.0 + 4.0, h - 52.0, 150.0, "Create New World", true, 11), + b(w / 2.0 + 4.0, h - 28.0, 150.0, "Back", true, 12), + ], + Mode::Create { creative, .. } => vec![ + b(w / 2.0 - 75.0, 120.0, 150.0, if *creative { "Game Mode: Creative" } else { "Game Mode: Survival" }, true, 20), + b(w / 2.0 - 155.0, h - 28.0, 150.0, "Create New World", true, 21), + b(w / 2.0 + 5.0, h - 28.0, 150.0, "Cancel", true, 22), + ], + } + } + pub fn draw(&self, atlas: &HudAtlas, batch: &mut HudBatch, cursor: (f32, f32)) { + let (w, h) = (batch.width, batch.height); + match &self.mode { + Mode::Main => { + // Logo: minecraft.png is a 1024x256 sheet drawn at 256x64. + batch.sprite_scaled(atlas, "gui/title/minecraft", w / 2.0 - 128.0, 30.0, 256.0, 64.0, u32::MAX); + batch.sprite_scaled(atlas, "gui/title/edition", w / 2.0 - 64.0, 30.0 + 64.0 - 7.0, 128.0, 14.0, u32::MAX); + let version = "Horizon 26.3 (Rust)"; + batch.text(atlas, version, 2.0, h - 10.0, u32::MAX, true); + let notice = "Not affiliated with Mojang or Microsoft"; + let tw = HudBatch::text_width(atlas, notice); + batch.text(atlas, notice, w - tw - 2.0, h - 10.0, u32::MAX, true); + } + Mode::Select { worlds, selected } => { + batch.fill(atlas, 0.0, 0.0, w, h, rgba(0, 0, 0, 120)); + let title = "Select World"; + let tw = HudBatch::text_width(atlas, title); + batch.text(atlas, title, (w - tw) / 2.0, 8.0, u32::MAX, true); + batch.fill(atlas, 0.0, 32.0, w, h - 32.0 - 64.0, rgba(0, 0, 0, 100)); + for (i, world) in worlds.iter().enumerate() { + let y = 36.0 + i as f32 * 36.0; + if y + 36.0 > h - 64.0 { + break; + } + let x = w / 2.0 - 110.0; + if *selected == Some(i) { + batch.fill(atlas, x - 2.0, y - 2.0, 224.0, 36.0, rgba(128, 128, 128, 255)); + batch.fill(atlas, x - 1.0, y - 1.0, 222.0, 34.0, rgba(0, 0, 0, 255)); + } + batch.text(atlas, &world.name, x + 34.0, y + 1.0, u32::MAX, false); + let date = world.modified.duration_since(std::time::UNIX_EPOCH).map_or(0, |d| d.as_secs()); + let line = format!("{} ({})", world.folder, date_string(date)); + batch.text(atlas, &line, x + 34.0, y + 12.0, rgba(128, 128, 128, 255), false); + let mode = if world.creative { "Creative Mode" } else { "Survival Mode" }; + batch.text(atlas, mode, x + 34.0, y + 22.0, rgba(128, 128, 128, 255), false); + batch.sprite_scaled(atlas, "misc/unknown_server", x, y, 32.0, 32.0, u32::MAX); + } + if worlds.is_empty() { + let empty = "No worlds yet: create one!"; + let tw = HudBatch::text_width(atlas, empty); + batch.text(atlas, empty, (w - tw) / 2.0, h / 2.0 - 20.0, rgba(160, 160, 160, 255), true); + } + } + Mode::Create { name, seed, focus, .. } => { + batch.fill(atlas, 0.0, 0.0, w, h, rgba(0, 0, 0, 120)); + let title = "Create New World"; + let tw = HudBatch::text_width(atlas, title); + batch.text(atlas, title, (w - tw) / 2.0, 8.0, u32::MAX, true); + let blink = (self.started.elapsed().as_millis() / 300) % 2 == 0; + for (i, (label, value)) in [("World Name", name), ("Seed for the World Generator (leave blank for random)", seed)].iter().enumerate() { + let y = 40.0 + i as f32 * 40.0; + batch.text(atlas, label, w / 2.0 - 100.0, y, rgba(160, 160, 160, 255), true); + batch.fill(atlas, w / 2.0 - 100.0, y + 11.0, 200.0, 20.0, if *focus == i as u8 { u32::MAX } else { rgba(160, 160, 160, 255) }); + batch.fill(atlas, w / 2.0 - 99.0, y + 12.0, 198.0, 18.0, rgba(0, 0, 0, 255)); + let shown = if *focus == i as u8 && blink { format!("{value}_") } else { value.to_string() }; + batch.text(atlas, &shown, w / 2.0 - 96.0, y + 17.0, rgba(224, 224, 224, 255), true); + } + } + } + for b in self.buttons(w, h) { + let hover = b.enabled && cursor.0 >= b.x && cursor.0 < b.x + b.w && cursor.1 >= b.y && cursor.1 < b.y + 20.0; + let sprite = if !b.enabled { + "gui/sprites/widget/button_disabled" + } else if hover { + "gui/sprites/widget/button_highlighted" + } else { + "gui/sprites/widget/button" + }; + // Nine-slice approximation: left and right halves of the 200-wide sprite. + if let Some(r) = atlas.sprites.get(sprite).copied() { + let half = b.w / 2.0; + let mut left = r; + left.u1 = r.u0 + (r.u1 - r.u0) * (half / r.w as f32); + batch.rect_uv(b.x, b.y, half, 20.0, left, u32::MAX); + let mut right = r; + right.u0 = r.u1 - (r.u1 - r.u0) * (half / r.w as f32); + batch.rect_uv(b.x + half, b.y, half, 20.0, right, u32::MAX); + } + let color = if b.enabled { u32::MAX } else { rgba(160, 160, 160, 255) }; + let tw = HudBatch::text_width(atlas, &b.label); + batch.text(atlas, &b.label, b.x + (b.w - tw) / 2.0, b.y + 6.0, color, true); + } + } + pub fn click(&mut self, x: f32, y: f32, size: (f32, f32)) -> Action { + let (w, h) = size; + let hit = self + .buttons(w, h) + .into_iter() + .find(|b| b.enabled && x >= b.x && x < b.x + b.w && y >= b.y && y < b.y + 20.0) + .map(|b| b.id); + match (&mut self.mode, hit) { + (Mode::Main, Some(1)) => { + self.mode = Mode::Select { worlds: list_worlds(&self.saves), selected: None }; + Action::None + } + (Mode::Main, Some(2)) => Action::Quit, + (Mode::Main, Some(3)) => Action::Options, + (Mode::Select { worlds, selected }, Some(10)) => match selected.and_then(|i| worlds.get(i)) { + Some(world) => Action::Play { folder: world.folder.clone() }, + None => Action::None, + }, + (Mode::Select { .. }, Some(11)) => { + self.mode = Mode::Create { name: "New World".into(), seed: String::new(), creative: false, focus: 0 }; + Action::None + } + (Mode::Select { .. }, Some(12)) => { + self.mode = Mode::Main; + Action::None + } + (Mode::Select { worlds, selected }, None) => { + // Clicking a list entry selects it; clicking it again plays it. + let index = ((y - 36.0) / 36.0).floor(); + if y >= 36.0 && y < h - 64.0 && (x - w / 2.0).abs() < 112.0 && (index as usize) < worlds.len() { + let index = index as usize; + if *selected == Some(index) { + return Action::Play { folder: worlds[index].folder.clone() }; + } + *selected = Some(index); + } + Action::None + } + (Mode::Create { creative, .. }, Some(20)) => { + *creative = !*creative; + Action::None + } + (Mode::Create { name, seed, creative, .. }, Some(21)) => { + let base: String = name + .chars() + .map(|c| if c.is_alphanumeric() || c == ' ' || c == '-' || c == '_' { c } else { '_' }) + .collect(); + let base = if base.trim().is_empty() { "World".to_owned() } else { base.trim().to_owned() }; + // FileUtil.findAvailableName: append (n) until unused. + let mut folder = base.clone(); + let mut n = 1; + while self.saves.join(&folder).exists() { + folder = format!("{base} ({n})"); + n += 1; + } + Action::Create { folder, name: name.clone(), seed: parse_seed(seed), creative: *creative } + } + (Mode::Create { .. }, Some(22)) => { + self.mode = Mode::Select { worlds: list_worlds(&self.saves), selected: None }; + Action::None + } + (Mode::Create { focus, .. }, None) => { + for i in 0..2u8 { + let fy = 40.0 + f32::from(i) * 40.0 + 11.0; + if y >= fy && y < fy + 20.0 && (x - w / 2.0).abs() < 100.0 { + *focus = i; + } + } + Action::None + } + _ => Action::None, + } + } + pub fn type_text(&mut self, text: &str) { + if let Mode::Create { name, seed, focus, .. } = &mut self.mode { + let field = if *focus == 0 { name } else { seed }; + for c in text.chars().filter(|c| !c.is_control()) { + if field.chars().count() < 32 { + field.push(c); + } + } + } + } + pub fn backspace(&mut self) { + if let Mode::Create { name, seed, focus, .. } = &mut self.mode { + let field = if *focus == 0 { name } else { seed }; + field.pop(); + } + } + pub fn tab(&mut self) { + if let Mode::Create { focus, .. } = &mut self.mode { + *focus = (*focus + 1) % 2; + } + } + pub fn escape(&mut self) { + self.mode = match &self.mode { + Mode::Create { .. } => Mode::Select { worlds: list_worlds(&self.saves), selected: None }, + _ => Mode::Main, + }; + } +} +fn date_string(secs: u64) -> String { + // Civil date from Unix time (days-from-civil inverse), UTC. + let days = (secs / 86400) as i64; + let (h, m) = ((secs % 86400) / 3600, (secs % 3600) / 60); + let z = days + 719_468; + let era = z.div_euclid(146_097); + let doe = z - era * 146_097; + let yoe = (doe - doe / 1460 + doe / 36524 - doe / 146_096) / 365; + let y = yoe + era * 400; + let doy = doe - (365 * yoe + yoe / 4 - yoe / 100); + let mp = (5 * doy + 2) / 153; + let d = doy - (153 * mp + 2) / 5 + 1; + let mo = if mp < 10 { mp + 3 } else { mp - 9 }; + let y = if mo <= 2 { y + 1 } else { y }; + format!("{y}-{mo:02}-{d:02} {h:02}:{m:02}") +} diff --git a/crates/horizon-client/src/vanillagen.rs b/crates/horizon-client/src/vanillagen.rs new file mode 100644 index 000000000..6c49822ea --- /dev/null +++ b/crates/horizon-client/src/vanillagen.rs @@ -0,0 +1,133 @@ +//! Binds `horizon_world`'s vanilla overworld generator (noise terrain, +//! aquifers, surface rules, carvers and placed features) to chunk streaming. +use crate::{ + biome::Biomes, + chunk::{Chunk, HEIGHT, MIN_Y}, + streaming::{ChunkGenerator, Proto}, +}; +use horizon_core::position::ChunkPos; +use horizon_world::{ + registry::BlockRegistry, + worldgen::generator::{GeneratorData, GeneratorWorker, OverworldGenerator, ProtoChunk}, +}; +use std::{path::Path, sync::Arc}; + +pub struct VanillaTerrain { + generator: OverworldGenerator, + /// Generator biome index -> client biome table index. + biome_map: Vec<u16>, +} +/// A proto chunk, or the position of one whose generation failed. +enum VanillaProto { + Ready(Box<ProtoChunk>), + Failed(i32, i32), +} +impl VanillaTerrain { + pub fn new(dir: &Path, registry: &'static BlockRegistry, biomes: &Biomes, seed: i64) -> crate::Result<Self> { + Self::for_dimension(dir, registry, biomes, seed, "minecraft:overworld") + } + pub fn for_dimension(dir: &Path, registry: &'static BlockRegistry, biomes: &Biomes, seed: i64, dimension: &str) -> crate::Result<Self> { + let data: Arc<GeneratorData> = GeneratorData::load(dir, registry)?; + let biome_map = data.biome_names().iter().map(|name| biomes.id(name)).collect(); + let generator = OverworldGenerator::for_dimension(data, seed, "minecraft:normal", dimension)?; + let unsupported = generator.unsupported_features(); + if !unsupported.is_empty() { + eprintln!( + "Horizon: {} placed features are not implemented yet and will be skipped", + unsupported.len() + ); + } + Ok(Self { generator, biome_map }) + } +} +impl ChunkGenerator for VanillaTerrain { + type Worker = GeneratorWorker; + fn worker(&self) -> GeneratorWorker { + self.generator.worker() + } + fn proto(&self, worker: &mut GeneratorWorker, x: i32, z: i32) -> Proto { + match worker.generate_proto(ChunkPos::new(x, z)) { + Ok(chunk) => Box::new(VanillaProto::Ready(Box::new(chunk))), + Err(e) => { + eprintln!("Horizon: generating chunk {x} {z} failed: {e}"); + Box::new(VanillaProto::Failed(x, z)) + } + } + } + fn decorates(&self) -> bool { + true + } + fn decorate(&self, worker: &mut GeneratorWorker, region: &mut [Proto; 9]) { + let taken: Vec<Box<VanillaProto>> = region + .iter_mut() + .map(|p| { + std::mem::replace(p, Box::new(())) + .downcast::<VanillaProto>() + .expect("vanilla proto") + }) + .collect(); + let all_ready = taken.iter().all(|p| matches!(**p, VanillaProto::Ready(_))); + if all_ready { + let chunks: Vec<ProtoChunk> = taken + .into_iter() + .map(|p| match *p { + VanillaProto::Ready(c) => *c, + VanillaProto::Failed(..) => unreachable!(), + }) + .collect(); + let mut array: [ProtoChunk; 9] = match chunks.try_into() { + Ok(a) => a, + Err(_) => unreachable!(), + }; + if let Err(e) = worker.decorate(&mut array) { + eprintln!("Horizon: decorating chunk failed: {e}"); + } + for (slot, chunk) in region.iter_mut().zip(array) { + *slot = Box::new(VanillaProto::Ready(Box::new(chunk))); + } + } else { + for (slot, p) in region.iter_mut().zip(taken) { + *slot = p; + } + } + } + fn finish(&self, proto: Proto) -> Chunk { + let proto = proto.downcast::<VanillaProto>().expect("vanilla proto"); + let chunk = match *proto { + VanillaProto::Ready(c) => c, + VanillaProto::Failed(x, z) => return Chunk::empty(x, z), + }; + let pos = chunk.position(); + let mut out = Chunk::empty(pos.x, pos.z); + let (bx, bz) = (pos.x * 16, pos.z * 16); + // Only the generated range (the Nether is 0..256) is copied. + let (lo, hi) = (chunk.terrain.min_y().max(MIN_Y), (chunk.terrain.min_y() + chunk.terrain.height()).min(MIN_Y + HEIGHT)); + for y in lo..hi { + for z in 0..16 { + for x in 0..16 { + let id = chunk.block(bx + x, y, bz + z).0 as u16; + if id != 0 { + out.set(x, y, z, id); + } + } + } + } + let mut biomes = vec![0u16; 16 * (HEIGHT as usize / 4)]; + for qy in 0..HEIGHT / 4 { + for qz in 0..4 { + for qx in 0..4 { + let y = (MIN_Y + qy * 4).clamp(lo, hi - 1); + let id = chunk.biome_id_at(bx + qx * 4, y, bz + qz * 4); + let index = id.0 as usize; + biomes[(qy * 16 + qz * 4 + qx) as usize] = self.biome_map.get(index).copied().unwrap_or(0); + } + } + } + out.biomes = Arc::new(biomes); + for s in &mut out.sections { + Arc::make_mut(s).compact(); + } + out.fresh = true; + out + } +} diff --git a/crates/horizon-client/src/world.rs b/crates/horizon-client/src/world.rs new file mode 100644 index 000000000..d377c5103 --- /dev/null +++ b/crates/horizon-client/src/world.rs @@ -0,0 +1,152 @@ +//! Resident client world: streamed chunk columns plus the bookkeeping the game +//! loop needs to relight and remesh after edits. +use crate::chunk::{Chunk, MIN_Y, SECTIONS}; +use horizon_core::random::LegacyRandom; +use horizon_world::registry::BlockStateId; +use std::{ + collections::{HashMap, HashSet}, + sync::Arc, +}; + +pub struct World { + pub chunks: HashMap<(i32, i32), Arc<Chunk>>, + pub random: LegacyRandom, + pub revision: u64, + pub health_rules: crate::health::HealthRules, + pub air: BlockStateId, + /// Sections whose geometry changed and need remeshing. + pub dirty_sections: HashSet<(i32, i32, i32)>, + /// Chunks whose light must be recomputed. + pub dirty_light: HashSet<(i32, i32)>, + /// Chunks changed since the last save. + pub modified: HashSet<(i32, i32)>, + pub block_entities: HashMap<(i32, i32, i32), crate::containers::BlockEntity>, + pub game_time: i64, + pub day_time: i64, + pub weather: Weather, +} +/// ServerLevel weather state (advanceWeatherCycle). +#[derive(Clone, Copy, Debug, Default)] +pub struct Weather { + pub clear_time: i32, + pub rain_time: i32, + pub thunder_time: i32, + pub raining: bool, + pub thundering: bool, + pub rain_level: (f32, f32), + pub thunder_level: (f32, f32), +} +impl Weather { + pub fn tick(&mut self, random: &mut horizon_core::random::LegacyRandom) { + use horizon_core::random::RandomSource; + let mut uniform = |min: i32, max: i32| min + random.next_int_bound(max - min + 1).unwrap_or(0); + if self.clear_time > 0 { + self.clear_time -= 1; + self.thunder_time = if self.thundering { 0 } else { 1 }; + self.rain_time = if self.raining { 0 } else { 1 }; + self.thundering = false; + self.raining = false; + } else { + if self.thunder_time > 0 { + self.thunder_time -= 1; + if self.thunder_time == 0 { + self.thundering = !self.thundering; + } + } else if self.thundering { + self.thunder_time = uniform(3600, 15600); + } else { + self.thunder_time = uniform(12000, 180000); + } + if self.rain_time > 0 { + self.rain_time -= 1; + if self.rain_time == 0 { + self.raining = !self.raining; + } + } else if self.raining { + self.rain_time = uniform(12000, 24000); + } else { + self.rain_time = uniform(12000, 180000); + } + } + self.thunder_level.0 = self.thunder_level.1; + self.thunder_level.1 = (self.thunder_level.1 + if self.thundering { 0.01 } else { -0.01 }).clamp(0.0, 1.0); + self.rain_level.0 = self.rain_level.1; + self.rain_level.1 = (self.rain_level.1 + if self.raining { 0.01 } else { -0.01 }).clamp(0.0, 1.0); + } + /// Level.getRainLevel / getThunderLevel (thunder scales with rain). + pub fn levels(&self, partial: f32) -> (f32, f32) { + let rain = self.rain_level.0 + (self.rain_level.1 - self.rain_level.0) * partial; + let thunder = self.thunder_level.0 + (self.thunder_level.1 - self.thunder_level.0) * partial; + (rain, thunder * rain) + } +} +impl World { + pub fn new(air: BlockStateId, seed: i64) -> Self { + Self { + chunks: HashMap::new(), + random: LegacyRandom::new(seed), + revision: 0, + health_rules: crate::health::HealthRules::default(), + air, + dirty_sections: HashSet::new(), + dirty_light: HashSet::new(), + modified: HashSet::new(), + block_entities: HashMap::new(), + game_time: 0, + day_time: 1000, + weather: Weather::default(), + } + } + /// Resident storage write; marks the touched sections (and neighbours on + /// section borders) for remeshing and the surrounding chunks for relighting. + /// Neighbour updates, drops and block entities belong to the gameplay layer. + pub fn set(&mut self, x: i32, y: i32, z: i32, state: BlockStateId) -> crate::Result<()> { + let Some(chunk) = self.chunks.get_mut(&(x >> 4, z >> 4)) else { + return Err("write outside resident chunks".into()); + }; + if y < MIN_Y || y >= MIN_Y + (SECTIONS as i32) * 16 { + return Err("write outside world height".into()); + } + let previous = Arc::make_mut(chunk).set(x & 15, y, z & 15, state.0 as u16); + if u32::from(previous) != state.0 { + self.revision = self.revision.wrapping_add(1); + self.modified.insert((x >> 4, z >> 4)); + let sy = (y - MIN_Y) >> 4; + for dz in -1..=1 { + for dy in -1..=1 { + for dx in -1..=1 { + let (bx, by, bz) = (x + dx, y + dy, z + dz); + let s = (by - MIN_Y) >> 4; + if !(0..SECTIONS as i32).contains(&s) { + continue; + } + self.dirty_sections.insert((bx >> 4, s, bz >> 4)); + } + } + } + let _ = sy; + for dz in -1..=1 { + for dx in -1..=1 { + self.dirty_light.insert(((x >> 4) + dx, (z >> 4) + dz)); + } + } + } + Ok(()) + } + pub fn block(&self, x: i32, y: i32, z: i32) -> BlockStateId { + self.chunks + .get(&(x >> 4, z >> 4)) + .map_or(self.air, |chunk| chunk.block(x & 15, y, z & 15)) + } + pub fn light(&self, x: i32, y: i32, z: i32) -> u8 { + self.chunks + .get(&(x >> 4, z >> 4)) + .map_or(0xF0, |chunk| chunk.light(x & 15, y, z & 15)) + } + pub fn is_air(&self, state: BlockStateId) -> bool { + state == self.air + } + pub fn loaded(&self, x: i32, z: i32) -> bool { + self.chunks.contains_key(&(x >> 4, z >> 4)) + } +} diff --git a/crates/horizon-core/Cargo.toml b/crates/horizon-core/Cargo.toml new file mode 100644 index 000000000..65b2acc65 --- /dev/null +++ b/crates/horizon-core/Cargo.toml @@ -0,0 +1,31 @@ +[package] +name = "horizon-core" +version = "0.1.0" +edition.workspace = true +license.workspace = true +rust-version.workspace = true +description = "Horizon simulation foundations for the pinned vanilla Java Edition target" + +[[bin]] +name = "horizon-parity" +path = "src/bin/parity.rs" + +[[bin]] +name = "horizon-tick-parity" +path = "src/bin/tick_parity.rs" + +[[bin]] +name = "horizon-geometry-parity" +path = "src/bin/geometry_parity.rs" + +[[bin]] +name = "horizon-noise-parity" +path = "src/bin/noise_parity.rs" + +[[bin]] +name = "horizon-density-parity" +path = "src/bin/density_parity.rs" + +[[bin]] +name = "horizon-float-log-parity" +path = "src/bin/float_log_parity.rs" diff --git a/crates/horizon-core/examples/biome_zoom_fixture.rs b/crates/horizon-core/examples/biome_zoom_fixture.rs new file mode 100644 index 000000000..4099bed13 --- /dev/null +++ b/crates/horizon-core/examples/biome_zoom_fixture.rs @@ -0,0 +1,46 @@ +//! Text transport for native BiomeManager comparisons. +use horizon_core::{ + biome::{BiomeZoom, noise_quart_at_block, noise_quart_at_position, obfuscate_seed}, + position::BlockPos, +}; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let mut values = line.split_whitespace(); + match values.next().unwrap() { + "s" => writeln!(out, "s {}", obfuscate_seed(values.next().unwrap().parse()?))?, + "b" => { + let seed: i64 = values.next().unwrap().parse()?; + let xyz: Vec<i32> = values.map(str::parse).collect::<Result<_, _>>()?; + let pos = BlockPos::new(xyz[0], xyz[1], xyz[2]); + let zoom = BiomeZoom::new(seed); + write!(out, "b")?; + for value in zoom + .quart_at_block(pos) + .into_iter() + .chain(noise_quart_at_block(pos)) + .chain(zoom.quart_at_block(pos)) + { + write!(out, " {value}")?; + } + writeln!(out)?; + } + "p" => { + let bits: Vec<_> = values + .map(|v| u64::from_str_radix(v, 16).map(f64::from_bits)) + .collect::<Result<_, _>>()?; + let xyz = noise_quart_at_position(bits.try_into().unwrap()); + writeln!(out, "p {} {} {}", xyz[0], xyz[1], xyz[2])?; + } + _ => panic!("unknown fixture operation"), + } + } + Ok(()) +} diff --git a/crates/horizon-core/examples/generation_tick_fixture.rs b/crates/horizon-core/examples/generation_tick_fixture.rs new file mode 100644 index 000000000..3d154e82a --- /dev/null +++ b/crates/horizon-core/examples/generation_tick_fixture.rs @@ -0,0 +1,188 @@ +//! Private native differential transport for generation-stage tick containers. +use horizon_core::{ + position::BlockPos, + ticks::{ + ChunkTicks, ProtoChunkTicks, SavedTick, ScheduledTick, TickContainerAccess, TickPriority, + TickTypeId, WorldGenTickAccess, WorldGenTickContainers, + }, +}; +use std::{ + collections::BTreeMap, + io::{self, BufRead, Write}, + str::{FromStr, SplitWhitespace}, +}; +enum Container { + Proto(ProtoChunkTicks), + Level(ChunkTicks), +} +impl TickContainerAccess for Container { + fn schedule(&mut self, t: ScheduledTick) -> bool { + match self { + Self::Proto(c) => c.schedule(t), + Self::Level(c) => c.schedule(t), + } + } + fn has_scheduled(&self, p: BlockPos, k: TickTypeId) -> bool { + match self { + Self::Proto(c) => c.has_scheduled(p, k), + Self::Level(c) => c.has_scheduled(p, k), + } + } +} +#[derive(Default)] +struct World { + chunks: BTreeMap<(i32, i32), Container>, + events: Vec<String>, + fail: bool, +} +impl WorldGenTickContainers for World { + type Container = Container; + type Error = (); + fn container_at(&mut self, p: BlockPos) -> Result<&mut Container, ()> { + self.events.push(format!("lookup {} {} {}", p.x, p.y, p.z)); + if self.fail { + return Err(()); + } + Ok(self + .chunks + .entry((p.x >> 4, p.z >> 4)) + .or_insert_with(|| Container::Proto(ProtoChunkTicks::default()))) + } +} +fn number<T: FromStr>(input: &mut SplitWhitespace<'_>) -> T +where + T::Err: std::fmt::Debug, +{ + input.next().unwrap().parse().unwrap() +} +fn pos(input: &mut SplitWhitespace<'_>) -> BlockPos { + BlockPos::new(number(input), number(input), number(input)) +} +fn saved(input: &mut SplitWhitespace<'_>) -> SavedTick { + SavedTick { + kind: TickTypeId(number(input)), + pos: pos(input), + delay: number(input), + priority: TickPriority::by_value(number(input)), + } +} +fn emit(out: &mut impl Write, ticks: &[SavedTick]) -> io::Result<()> { + writeln!(out, "saved {}", ticks.len())?; + for t in ticks { + writeln!( + out, + "value {} {} {} {} {} {}", + t.kind.0, t.pos.x, t.pos.y, t.pos.z, t.delay, t.priority as i8 + )?; + } + Ok(()) +} +fn flush(access: &mut WorldGenTickAccess<World>, out: &mut impl Write) -> io::Result<()> { + for e in access.containers_mut().events.drain(..) { + writeln!(out, "{e}")?; + } + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let mut access = WorldGenTickAccess::new(World::default()); + let mut snapshot = Vec::new(); + let mut out = io::BufWriter::new(io::stdout().lock()); + for (index, line) in io::stdin().lock().lines().enumerate() { + let line = line?; + let mut input = line.split_whitespace(); + let op = input.next().unwrap(); + writeln!(out, "command {index} {op}")?; + match op { + "reset" => { + access = WorldGenTickAccess::new(World::default()); + snapshot.clear(); + } + "fail" => access.containers_mut().fail = number::<i32>(&mut input) != 0, + "load" | "level" => { + let key = (number(&mut input), number(&mut input)); + let count: usize = number(&mut input); + let ticks = (0..count).map(|_| saved(&mut input)).collect::<Vec<_>>(); + let c = if op == "load" { + Container::Proto(ProtoChunkTicks::from_saved(ticks)) + } else { + Container::Level(ChunkTicks::from_saved(ticks)) + }; + access.containers_mut().chunks.insert(key, c); + } + "schedule" => { + let t = ScheduledTick { + kind: TickTypeId(number(&mut input)), + pos: pos(&mut input), + trigger_tick: number(&mut input), + priority: TickPriority::by_value(number(&mut input)), + sub_tick_order: number(&mut input), + }; + let result = access.schedule(t); + flush(&mut access, &mut out)?; + writeln!( + out, + "{}", + if result.is_ok() { "scheduled" } else { "error" } + )?; + } + "query" => { + let k = TickTypeId(number(&mut input)); + let p = pos(&mut input); + let result = access.has_scheduled(p, k); + flush(&mut access, &mut out)?; + match result { + Ok(v) => writeln!(out, "query {v}")?, + Err(()) => writeln!(out, "error")?, + } + } + "will" => { + let k = TickTypeId(number(&mut input)); + let p = pos(&mut input); + writeln!(out, "will {}", access.will_tick_this_tick(p, k))?; + } + "dump" => { + let key = (number(&mut input), number(&mut input)); + let time = number(&mut input); + match access.containers().chunks.get(&key) { + Some(Container::Proto(c)) => emit(&mut out, c.pack(time))?, + Some(Container::Level(c)) => emit(&mut out, &c.pack(time))?, + None => writeln!(out, "absent")?, + } + } + "snapshot" => { + let key = (number(&mut input), number(&mut input)); + if let Some(Container::Proto(c)) = access.containers().chunks.get(&key) { + snapshot = c.scheduled_ticks(); + } else { + snapshot.clear(); + } + } + "snapshot_dump" => emit(&mut out, &snapshot)?, + "unpack" | "promote" => { + let key = (number(&mut input), number(&mut input)); + let time = number(&mut input); + if let Some(c) = access.containers_mut().chunks.get_mut(&key) { + if op == "promote" { + if let Container::Proto(proto) = c { + *c = Container::Level(ChunkTicks::from_saved(proto.scheduled_ticks())); + } + } + if let Container::Level(c) = c { + c.unpack(time); + } + } + } + "remove" => { + access + .containers_mut() + .chunks + .remove(&(number(&mut input), number(&mut input))); + } + "count" => {} + _ => panic!("unknown operation {op}"), + } + assert!(input.next().is_none()); + writeln!(out, "count {}", access.count())?; + } + Ok(()) +} diff --git a/crates/horizon-core/src/bin/density_parity.rs b/crates/horizon-core/src/bin/density_parity.rs new file mode 100644 index 000000000..07bdf6537 --- /dev/null +++ b/crates/horizon-core/src/bin/density_parity.rs @@ -0,0 +1,1103 @@ +//! Original line transport for differential tests of density evaluation. +use horizon_core::density::graph::{ + DensityCompiler, DensityGraph, FunctionId, GraphBinary, GraphNode, GraphUnary, NoiseId, +}; +use horizon_core::{ + density::{ + BinaryOp, BinarySampler, BlendDensitySampler, BlendedNoise, CachingDensitySampler, + ConstantSampler, ContextBoundSampler, CubicSpline, DensitySampler, DensityValue, + DistanceMetric, DistanceToPointSampler, EmptyBlender, FindTopSurfaceSampler, + GradientSampler, InterpolatedSampler, Interval, IntervalError, IntervalSelectSampler, + LerpSampler, NoiseSampler, PowerSampler, RangeChoiceSampler, RoundMode, RoundSampler, + SamplerContext, ShiftNoiseKind, ShiftedNoiseSampler, SliceAxes, SliceSampler, SplinePoint, + SplineSampler, TilingMode, UnaryOp, UnarySampler, WorldField, WorldFields, + compile_shift_noise, compile_surface_search, create_blended_fbm, + }, + geometry::Axis, + noise::{ + DensityVolume, Noise, NormalNoise, Normalization, PerlinNoise, SimplexNoise, + SmearedPerlinNoise, + }, + random::{LegacyRandom, RandomSource, XoroshiroRandom}, +}; +use std::{ + io::{self, BufRead, BufWriter, Write}, + sync::Arc, +}; +#[derive(Debug)] +struct CountedSampler { + input: Arc<dyn DensitySampler>, + calls: Arc<[std::sync::atomic::AtomicUsize; 2]>, +} +impl DensitySampler for CountedSampler { + fn sample_value( + &self, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, horizon_core::density::SampleError> { + self.calls[0].fetch_add(1, std::sync::atomic::Ordering::Relaxed); + self.input.sample_value(context, position) + } + fn sample_volume( + &self, + context: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), horizon_core::density::SampleError> { + self.calls[1].fetch_add(1, std::sync::atomic::Ordering::Relaxed); + self.input.sample_volume(context, buffer, volume) + } +} +fn read<T: std::str::FromStr>( + args: &mut std::str::SplitWhitespace<'_>, +) -> Result<T, Box<dyn std::error::Error>> { + args.next() + .ok_or("missing argument")? + .parse() + .map_err(|_| "invalid argument".into()) +} +fn float(args: &mut std::str::SplitWhitespace<'_>) -> Result<f32, Box<dyn std::error::Error>> { + Ok(f32::from_bits(u32::from_str_radix( + args.next().ok_or("missing float")?, + 16, + )?)) +} +fn double(args: &mut std::str::SplitWhitespace<'_>) -> Result<f64, Box<dyn std::error::Error>> { + Ok(f64::from_bits(u64::from_str_radix( + args.next().ok_or("missing double")?, + 16, + )?)) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { 0x7fc0_0000 } else { v.to_bits() } +} +fn noise(kind: &str, mut random: impl RandomSource, scale: f64) -> Arc<dyn Noise> { + match kind { + "normal" => { + let mut definition = NormalNoise::builder(); + definition.set_base_octave(-7); + definition.set_octave_count(4).unwrap(); + Arc::new(definition.build().unwrap().create(&mut random).unwrap()) + } + "perlin" => Arc::new(PerlinNoise::new(&mut random)), + "simplex" => Arc::new(SimplexNoise::new(&mut random)), + "smeared" => Arc::new(SmearedPerlinNoise::new(&mut random, scale)), + _ => panic!("unknown noise kind"), + } +} +fn interval_output( + out: &mut impl Write, + name: &str, + result: Result<Interval, IntervalError>, +) -> io::Result<()> { + match result { + Ok(range) => writeln!( + out, + "bounds {name} {} {} {} {}", + bits(range.min()), + bits(range.max()), + u8::from(range.is_nai()), + range.java_hash_code() + ), + Err(_) => writeln!(out, "bounds {name} error"), + } +} +fn blended_probe( + random: &mut impl RandomSource, + definition: BlendedNoise, + out: &mut impl Write, +) -> Result<Option<Arc<dyn DensitySampler>>, Box<dyn std::error::Error>> { + interval_output(out, "blended", definition.range())?; + let result = definition.compile(random); + writeln!( + out, + "blended {} {}", + if result.is_ok() { "ok" } else { "error" }, + random.next_long() + )?; + Ok(result + .ok() + .map(|value| Arc::new(value) as Arc<dyn DensitySampler>)) +} +fn fbm_probe( + random: &mut impl RandomSource, + octave: i32, + smear: f64, + amplitude: f64, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let result = create_blended_fbm(random, octave, smear, amplitude); + match result { + Ok(stack) => { + let range = stack.range()?; + writeln!( + out, + "fbm {} {} {}", + stack.layers().len(), + bits(range[0]), + bits(range[1]) + )?; + for layer in stack.layers() { + writeln!( + out, + "fbm-layer {} {} {}", + layer.frequency.to_bits(), + bits(layer.amplitude), + bits(layer.noise.get3(-17.25, 64.125, 32.5)) + )?; + } + for point in [ + [0.0; 3], + [-17.25, 64.125, 32.5], + [3e7, -64.0, -3e7], + [f64::INFINITY; 3], + ] { + writeln!( + out, + "fbm-query {} {}", + bits(stack.get2(point[0], point[2])), + bits(stack.get3(point[0], point[1], point[2])) + )?; + } + let volume = DensityVolume::new([2, 5, 2], [-17, -64, 32], [4, 1, 4])?; + let mut buffer = vec![0.0; volume.size() + 2]; + for (i, v) in buffer.iter_mut().enumerate() { + *v = (i as f32 - 10.0) * 0.125; + } + stack.add_to_volume(&mut buffer, volume, 0.125, 0.25, -0.5)?; + for value in buffer { + writeln!(out, "fbm-cell {}", bits(value))?; + } + } + Err(_) => writeln!(out, "fbm error")?, + } + writeln!(out, "fbm-parent {}", random.next_long())?; + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let mut samplers: Vec<Arc<dyn DensitySampler>> = Vec::new(); + let mut graph_compiler = DensityCompiler::new(DensityGraph::new()); + let mut functions: Vec<FunctionId> = Vec::new(); + let mut graph_splines: Vec<CubicSpline<FunctionId>> = Vec::new(); + let mut graph_noises: Vec<NoiseId> = Vec::new(); + let mut noises = Vec::new(); + let mut splines: Vec<CubicSpline> = Vec::new(); + let mut counters: Vec<Arc<[std::sync::atomic::AtomicUsize; 2]>> = Vec::new(); + let mut context = SamplerContext::default(); + let mut out = BufWriter::new(io::stdout().lock()); + for line in io::stdin().lock().lines() { + let line = line?; + let mut args = line.split_whitespace(); + match args.next().ok_or("empty command")? { + "constant" => { + samplers.push(Arc::new(ConstantSampler(float(&mut args)?))); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "gradient" => { + let axis = Axis::ALL[read::<usize>(&mut args)?]; + let tiling = [ + TilingMode::ClampToEdge, + TilingMode::Repeat, + TilingMode::MirroredRepeat, + ][read::<usize>(&mut args)?]; + let from = read(&mut args)?; + let to = read(&mut args)?; + let low = float(&mut args)?; + let high = float(&mut args)?; + samplers.push(Arc::new(GradientSampler::new( + axis, tiling, from, to, low, high, + ))); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "noise" => { + let kind = args.next().ok_or("missing noise kind")?; + let stream = args.next().ok_or("missing stream")?; + let seed = read(&mut args)?; + let scale = double(&mut args)?; + let source = if stream == "legacy" { + noise(kind, LegacyRandom::new(seed), scale) + } else { + noise(kind, XoroshiroRandom::new(seed), scale) + }; + let sampler = NoiseSampler { + noise: source, + xz_scale: double(&mut args)?, + y_scale: double(&mut args)?, + }; + noises.push(sampler.clone()); + samplers.push(Arc::new(sampler)); + writeln!(out, "noise {} {}", noises.len() - 1, samplers.len() - 1)?; + } + "shift" => { + let source = noises[read::<usize>(&mut args)?].clone(); + let x = read::<usize>(&mut args)?; + let y = read::<i32>(&mut args)?; + let z = read::<usize>(&mut args)?; + samplers.push(Arc::new(ShiftedNoiseSampler { + source, + shift_x: samplers[x].clone(), + shift_y: if y < 0 { + None + } else { + Some(samplers[y as usize].clone()) + }, + shift_z: samplers[z].clone(), + })); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "unary" => { + let kind = args.next().ok_or("missing unary kind")?; + let input = samplers[read::<usize>(&mut args)?].clone(); + let a = float(&mut args)?; + let b = float(&mut args)?; + let operation = match kind { + "abs" => UnaryOp::Abs, + "negate" => UnaryOp::Negate, + "square" => UnaryOp::Square, + "cube" => UnaryOp::Cube, + "sqrt" => UnaryOp::Sqrt, + "log" => UnaryOp::Log, + "reciprocal" => UnaryOp::Reciprocal, + "sign" => UnaryOp::Sign, + "squeeze" => UnaryOp::Squeeze, + "leaky" => UnaryOp::LeakyRelu(a), + "add" => UnaryOp::Add(a), + "sub" => UnaryOp::SubtractFrom(a), + "mul" => UnaryOp::Multiply(a), + "div" => UnaryOp::DivideInto(a), + "min" => UnaryOp::Minimum(a), + "max" => UnaryOp::Maximum(a), + "clamp" => UnaryOp::Clamp { min: a, max: b }, + _ => return Err("unknown unary kind".into()), + }; + samplers.push(Arc::new(UnarySampler { input, operation })); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "power" => { + let mode = read::<u8>(&mut args)?; + let sampler: Arc<dyn DensitySampler> = match mode { + 0 => Arc::new(PowerSampler { + base: samplers[read::<usize>(&mut args)?].clone(), + exponent: samplers[read::<usize>(&mut args)?].clone(), + }), + 1 => { + let base = double(&mut args)?; + Arc::new(UnarySampler { + input: samplers[read::<usize>(&mut args)?].clone(), + operation: UnaryOp::PowerBase(base), + }) + } + 2 => { + let base = samplers[read::<usize>(&mut args)?].clone(); + Arc::new(UnarySampler { + input: base, + operation: UnaryOp::PowerExponent(double(&mut args)?), + }) + } + _ => return Err("unknown power mode".into()), + }; + samplers.push(sampler); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "round" => { + let mode = [ + RoundMode::Floor, + RoundMode::Round, + RoundMode::Ceil, + RoundMode::Truncate, + ][read::<usize>(&mut args)?]; + let input = samplers[read::<usize>(&mut args)?].clone(); + let multiple = read::<i32>(&mut args)?; + let multiple = if multiple < 0 { + None + } else { + Some(samplers[multiple as usize].clone()) + }; + samplers.push(Arc::new(RoundSampler { + mode, + input, + multiple, + })); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "binary" => { + let kind = args.next().ok_or("missing binary kind")?; + let left = samplers[read::<usize>(&mut args)?].clone(); + let right = samplers[read::<usize>(&mut args)?].clone(); + let bound = float(&mut args)?; + let operation = match kind { + "add" => BinaryOp::Add, + "sub" => BinaryOp::Subtract, + "mul" => BinaryOp::Multiply, + "div" => BinaryOp::Divide, + "min" => BinaryOp::Minimum { right_min: bound }, + "max" => BinaryOp::Maximum { right_max: bound }, + _ => return Err("unknown binary kind".into()), + }; + samplers.push(Arc::new(BinarySampler { + left, + right, + operation, + })); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "choice" => { + let mode = read::<u8>(&mut args)?; + let input = samplers[read::<usize>(&mut args)?].clone(); + let min_inclusive = float(&mut args)?; + let max_exclusive = float(&mut args)?; + let sampler: Arc<dyn DensitySampler> = if mode == 1 { + let inside = float(&mut args)?; + let outside = float(&mut args)?; + Arc::new(UnarySampler { + input, + operation: UnaryOp::ConstantRangeChoice { + min_inclusive, + max_exclusive, + inside, + outside, + }, + }) + } else { + let when_in_range = samplers[read::<usize>(&mut args)?].clone(); + let when_out_of_range = samplers[read::<usize>(&mut args)?].clone(); + Arc::new(RangeChoiceSampler { + input, + min_inclusive, + max_exclusive, + when_in_range, + when_out_of_range, + }) + }; + samplers.push(sampler); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "lerp" => { + let mode = read::<u8>(&mut args)?; + let alpha = samplers[read::<usize>(&mut args)?].clone(); + let first = if mode == 1 { + DensityValue::Constant(float(&mut args)?) + } else { + DensityValue::Sampler(samplers[read::<usize>(&mut args)?].clone()) + }; + let second = if mode == 2 { + DensityValue::Constant(float(&mut args)?) + } else { + DensityValue::Sampler(samplers[read::<usize>(&mut args)?].clone()) + }; + samplers.push(Arc::new(LerpSampler { + alpha, + first, + second, + })); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "interval" => { + let _specialization = read::<u8>(&mut args)?; + let input = samplers[read::<usize>(&mut args)?].clone(); + let count = read::<usize>(&mut args)?; + let thresholds = (0..count) + .map(|_| float(&mut args)) + .collect::<Result<Vec<_>, _>>()?; + let branches = (0..=count) + .map(|_| read::<usize>(&mut args).map(|id| samplers[id].clone())) + .collect::<Result<Vec<_>, _>>()?; + samplers.push(Arc::new(IntervalSelectSampler::new( + input, thresholds, branches, + )?)); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "bounds" => { + let mode = read::<u8>(&mut args)?; + let a = float(&mut args)?; + let b = float(&mut args)?; + let c = float(&mut args)?; + let d = float(&mut args)?; + let e = float(&mut args)?; + let f = float(&mut args)?; + let result = match mode { + 0 => Interval::new(a, b), + 1 => Interval::symmetric(a), + 2 => Interval::exact(a), + 3 => Ok(Interval::encapsulating_values(a, b)), + 4 => Ok(Interval::NAI), + 5 => Ok(Interval::INFINITE), + _ => return Err("unknown interval constructor".into()), + }; + interval_output(&mut out, "create", result)?; + if let Ok(left) = result { + let right = Interval::encapsulating_values(c, d); + let third = Interval::encapsulating_values(e, f); + interval_output(&mut out, "right", Ok(right))?; + for (name, value) in [ + ("add", left.add_range(right)), + ("sub", left.subtract_range(right)), + ("mul", left.multiply_range(right)), + ("div", left.divide_range(right)), + ("min", left.minimum(right)), + ("max", left.maximum(right)), + ("reciprocal", left.reciprocal()), + ("abs", left.abs()), + ("square", left.square()), + ("sign", left.sign()), + ("power", left.power(right)), + ] { + interval_output(&mut out, name, Ok(value))?; + } + interval_output(&mut out, "clamp", left.clamp(c, d))?; + interval_output(&mut out, "log", left.log())?; + interval_output(&mut out, "lerp-values", Ok(left.lerp_values(c, d)))?; + interval_output(&mut out, "lerp-ranges", Ok(left.lerp_ranges(right, third)))?; + interval_output(&mut out, "map-negate", left.map_monotonic(|v| -v))?; + interval_output(&mut out, "map-cube", left.map_monotonic(|v| v * v * v))?; + interval_output( + &mut out, + "map-sqrt", + left.map_monotonic(|v| (v as f64).sqrt() as f32), + )?; + interval_output(&mut out, "map-reciprocal", left.map_monotonic(|v| 1.0 / v))?; + interval_output( + &mut out, + "hull", + Interval::encapsulating(&[left, right, third]), + )?; + interval_output(&mut out, "empty", Interval::encapsulating(&[]))?; + writeln!( + out, + "bounds query {} {} {} {}", + u8::from(left.contains(e)), + u8::from(left.intersects(right)), + u8::from(left == right), + u8::from(left == result.unwrap()) + )?; + } + } + "offset" => { + let kind = [ + ShiftNoiseKind::Shift, + ShiftNoiseKind::ShiftA, + ShiftNoiseKind::ShiftB, + ][read::<usize>(&mut args)?]; + let noise = noises[read::<usize>(&mut args)?].noise.clone(); + samplers.push(compile_shift_noise(noise, kind)); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "blended" | "blendfail" => { + let stream = args.next().ok_or("missing stream")?; + let seed = read(&mut args)?; + let definition = BlendedNoise { + xz_scale: double(&mut args)?, + y_scale: double(&mut args)?, + xz_factor: double(&mut args)?, + y_factor: double(&mut args)?, + smear_scale_multiplier: double(&mut args)?, + }; + let result = if stream == "legacy" { + blended_probe(&mut LegacyRandom::new(seed), definition, &mut out)? + } else { + blended_probe(&mut XoroshiroRandom::new(seed), definition, &mut out)? + }; + if let Some(sampler) = result { + samplers.push(sampler); + writeln!(out, "create {}", samplers.len() - 1)?; + } + } + "blendfbm" => { + let stream = args.next().ok_or("missing stream")?; + let seed = read(&mut args)?; + let octave = read(&mut args)?; + let smear = double(&mut args)?; + let amplitude = double(&mut args)?; + if stream == "legacy" { + fbm_probe( + &mut LegacyRandom::new(seed), + octave, + smear, + amplitude, + &mut out, + )?; + } else { + fbm_probe( + &mut XoroshiroRandom::new(seed), + octave, + smear, + amplitude, + &mut out, + )?; + } + } + "distance" => { + let metric = [ + DistanceMetric::Euclidean, + DistanceMetric::EuclideanSquared, + DistanceMetric::Manhattan, + DistanceMetric::Chebyshev, + ][read::<usize>(&mut args)?]; + let point = [read(&mut args)?, read(&mut args)?, read(&mut args)?]; + samplers.push(Arc::new(DistanceToPointSampler { point, metric })); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "metric" => { + let x = float(&mut args)?; + let y = float(&mut args)?; + let z = float(&mut args)?; + for metric in [ + DistanceMetric::Euclidean, + DistanceMetric::EuclideanSquared, + DistanceMetric::Manhattan, + DistanceMetric::Chebyshev, + ] { + writeln!( + out, + "metric {} {}", + bits(metric.compute2(x, y)), + bits(metric.compute3(x, y, z)) + )?; + } + } + "wcontext" => { + let cached = read::<u8>(&mut args)? != 0; + let mut fields = WorldFields::default(); + for field in [ + WorldField::BlendAlpha, + WorldField::BlendOffset, + WorldField::Beardifier, + ] { + let binding = read::<isize>(&mut args)?; + if binding >= 0 { + fields = fields.with_field(field, samplers[binding as usize].clone()); + } + } + if read::<u8>(&mut args)? != 0 { + fields = fields.with_blender(Arc::new(EmptyBlender)); + } + context = (if cached { + SamplerContext::cached() + } else { + SamplerContext::default() + }) + .with_world_fields(fields); + writeln!(out, "context")?; + } + "wfield" => { + let field = [ + WorldField::BlendAlpha, + WorldField::BlendOffset, + WorldField::Beardifier, + ][read::<usize>(&mut args)?]; + let fallback = read::<isize>(&mut args)?; + samplers.push(Arc::new(if fallback < 0 { + ContextBoundSampler::new(field) + } else { + ContextBoundSampler::with_fallback(field, samplers[fallback as usize].clone()) + })); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "blenddensity" => { + let input = samplers[read::<usize>(&mut args)?].clone(); + samplers.push(Arc::new(BlendDensitySampler { input })); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "context" => { + context = if read::<u8>(&mut args)? == 0 { + SamplerContext::default() + } else { + SamplerContext::cached() + }; + writeln!(out, "context")?; + } + "counted" => { + let input = samplers[read::<usize>(&mut args)?].clone(); + let calls = Arc::new(std::array::from_fn(|_| { + std::sync::atomic::AtomicUsize::new(0) + })); + counters.push(calls.clone()); + samplers.push(Arc::new(CountedSampler { input, calls })); + writeln!(out, "counted {} {}", counters.len() - 1, samplers.len() - 1)?; + } + "counts" => { + let calls = &counters[read::<usize>(&mut args)?]; + writeln!( + out, + "counts {} {}", + calls[0].load(std::sync::atomic::Ordering::Relaxed), + calls[1].load(std::sync::atomic::Ordering::Relaxed) + )?; + } + "greset" => { + graph_compiler = DensityCompiler::new(DensityGraph::new()); + functions.clear(); + graph_splines.clear(); + graph_noises.clear(); + context = SamplerContext::default(); + writeln!(out, "graph-reset")?; + } + "gseed" => { + let seed = read::<i64>(&mut args)?; + let legacy = read::<u8>(&mut args)? != 0; + graph_compiler = DensityCompiler::new_seeded(DensityGraph::new(), seed, legacy); + functions.clear(); + graph_splines.clear(); + graph_noises.clear(); + context = SamplerContext::default(); + writeln!(out, "graph-seed")?; + } + "gready" => writeln!(out, "graph-ready")?, + "gend" => { + functions.push(graph_compiler.graph_mut().insert(GraphNode::EndIslands)?); + writeln!(out, "graph-create {}", functions.len() - 1)?; + } + "gregister" => { + let name = args.next().ok_or("missing noise identifier")?.to_owned(); + let mut builder = NormalNoise::builder(); + builder + .set_base_octave(read(&mut args)?) + .set_base_amplitude(double(&mut args)?); + builder.set_octave_count(read(&mut args)?)?; + builder.set_normalization( + [ + Normalization::Disabled, + Normalization::Enabled, + Normalization::Legacy, + ][read::<usize>(&mut args)?], + ); + let modifiers = read::<usize>(&mut args)?; + for index in 0..modifiers { + builder.set_amplitude_modifier(index as i32, double(&mut args)?)?; + } + graph_noises.push( + graph_compiler + .graph_mut() + .register_noise(name, builder.build()?)?, + ); + writeln!(out, "graph-noise {}", graph_noises.len() - 1)?; + } + "ginstance" => { + let id = graph_noises[read::<usize>(&mut args)?]; + let a = graph_compiler.get_noise_sampler(id)?; + let b = graph_compiler.get_noise_sampler(id)?; + writeln!(out, "graph-instance {}", u8::from(Arc::ptr_eq(&a, &b)))?; + } + "gbind" => { + let sampler = samplers[read::<usize>(&mut args)?].clone(); + let range = Interval::encapsulating_values(float(&mut args)?, float(&mut args)?); + let axes = read(&mut args)?; + functions.push(graph_compiler.graph_mut().bind(sampler, range, axes)?); + writeln!(out, "graph-create {}", functions.len() - 1)?; + } + "gsconstant" => { + graph_splines.push(CubicSpline::Constant(float(&mut args)?)); + writeln!(out, "graph-spline {}", graph_splines.len() - 1)?; + } + "gspoints" => { + let coordinate = functions[read::<usize>(&mut args)?]; + let count = read::<usize>(&mut args)?; + let mut points = Vec::with_capacity(count); + for _ in 0..count { + let location = float(&mut args)?; + let derivative = float(&mut args)?; + let value = graph_splines[read::<usize>(&mut args)?].clone(); + points.push(SplinePoint { + location, + derivative, + value, + }); + } + graph_splines.push(CubicSpline::multipoint(coordinate, points)?); + writeln!(out, "graph-spline {}", graph_splines.len() - 1)?; + } + "gref" => { + let input = functions[read::<usize>(&mut args)?]; + functions.push(graph_compiler.graph_mut().insert(GraphNode::Reference { + input, + holder: None, + })?); + writeln!(out, "graph-create {}", functions.len() - 1)?; + } + "gnamed" => { + let name = read::<String>(&mut args)?; + let input = functions[read::<usize>(&mut args)?]; + functions.push(graph_compiler.graph_mut().register_function(name, input)?); + writeln!(out, "graph-create {}", functions.len() - 1)?; + } + "glookup" => { + let name = read::<String>(&mut args)?; + functions.push( + graph_compiler + .graph() + .function(&name) + .ok_or("unknown density name")?, + ); + writeln!(out, "graph-create {}", functions.len() - 1)?; + } + "gspline" => { + let spline = graph_splines[read::<usize>(&mut args)?].clone(); + functions.push( + graph_compiler + .graph_mut() + .insert(GraphNode::Spline(spline))?, + ); + writeln!(out, "graph-create {}", functions.len() - 1)?; + } + command @ ("gconst" | "ggradient" | "gunary" | "gbinary" | "gclamp" | "gchoice" + | "glerp" | "gslice" | "gcache" | "ginterp" | "gsurface" | "ginterval" + | "gdistance" | "gnoise" | "goffset" | "gblended" | "ground" | "gpow" + | "gwfield" | "gblenddensity") => { + let reference = |args: &mut std::str::SplitWhitespace<'_>| -> Result<FunctionId,Box<dyn std::error::Error>> { Ok(functions[read::<usize>(args)?]) }; + let node = match command { + "gconst" => GraphNode::Constant(float(&mut args)?), + "gwfield" => GraphNode::WorldField( + [ + WorldField::BlendAlpha, + WorldField::BlendOffset, + WorldField::Beardifier, + ][read::<usize>(&mut args)?], + ), + "gblenddensity" => GraphNode::BlendDensity(reference(&mut args)?), + "gpow" => GraphNode::Power { + base: reference(&mut args)?, + exponent: reference(&mut args)?, + }, + "ground" => GraphNode::Round { + mode: [ + RoundMode::Floor, + RoundMode::Round, + RoundMode::Ceil, + RoundMode::Truncate, + ][read::<usize>(&mut args)?], + input: reference(&mut args)?, + multiple: reference(&mut args)?, + }, + "gnoise" => GraphNode::Noise { + noise: graph_noises[read::<usize>(&mut args)?], + xz_scale: double(&mut args)?, + y_scale: double(&mut args)?, + shift_x: reference(&mut args)?, + shift_y: reference(&mut args)?, + shift_z: reference(&mut args)?, + }, + "goffset" => GraphNode::OffsetNoise { + noise: graph_noises[read::<usize>(&mut args)?], + kind: [ + ShiftNoiseKind::Shift, + ShiftNoiseKind::ShiftA, + ShiftNoiseKind::ShiftB, + ][read::<usize>(&mut args)?], + }, + "gblended" => GraphNode::BlendedNoise(BlendedNoise { + xz_scale: double(&mut args)?, + y_scale: double(&mut args)?, + xz_factor: double(&mut args)?, + y_factor: double(&mut args)?, + smear_scale_multiplier: double(&mut args)?, + }), + "gdistance" => GraphNode::DistanceToPoint { + point: [read(&mut args)?, read(&mut args)?, read(&mut args)?], + metric: [ + DistanceMetric::Euclidean, + DistanceMetric::EuclideanSquared, + DistanceMetric::Manhattan, + DistanceMetric::Chebyshev, + ][read::<usize>(&mut args)?], + }, + "ginterval" => { + let input = reference(&mut args)?; + let count: usize = read(&mut args)?; + let thresholds = (0..count) + .map(|_| float(&mut args)) + .collect::<Result<Vec<_>, _>>()?; + let branches = + (0..=count) + .map(|_| reference(&mut args)) + .collect::<Result<Vec<_>, _>>()?; + GraphNode::IntervalSelect { + input, + thresholds: thresholds.into(), + branches, + } + } + "ggradient" => { + let axis = [Axis::X, Axis::Y, Axis::Z][read::<usize>(&mut args)?]; + let tiling = [ + TilingMode::ClampToEdge, + TilingMode::Repeat, + TilingMode::MirroredRepeat, + ][read::<usize>(&mut args)?]; + GraphNode::Gradient { + axis, + tiling, + from: read(&mut args)?, + to: read(&mut args)?, + low: float(&mut args)?, + high: float(&mut args)?, + } + } + "gunary" => { + let kind = [ + GraphUnary::Abs, + GraphUnary::Square, + GraphUnary::Cube, + GraphUnary::HalfNegative, + GraphUnary::QuarterNegative, + GraphUnary::Reciprocal, + GraphUnary::Negate, + GraphUnary::Squeeze, + GraphUnary::Sign, + GraphUnary::Log, + GraphUnary::Sqrt, + ][read::<usize>(&mut args)?]; + GraphNode::Unary { + kind, + input: reference(&mut args)?, + } + } + "gbinary" => { + let kind = [ + GraphBinary::Add, + GraphBinary::Subtract, + GraphBinary::Multiply, + GraphBinary::Divide, + GraphBinary::Minimum, + GraphBinary::Maximum, + ][read::<usize>(&mut args)?]; + GraphNode::Binary { + kind, + left: reference(&mut args)?, + right: reference(&mut args)?, + } + } + "gclamp" => GraphNode::Clamp { + input: reference(&mut args)?, + min: float(&mut args)?, + max: float(&mut args)?, + }, + "gchoice" => GraphNode::Choice { + input: reference(&mut args)?, + min: float(&mut args)?, + max: float(&mut args)?, + inside: reference(&mut args)?, + outside: reference(&mut args)?, + }, + "glerp" => GraphNode::Lerp { + alpha: reference(&mut args)?, + first: reference(&mut args)?, + second: reference(&mut args)?, + }, + "gslice" => GraphNode::Slice { + axis: [Axis::X, Axis::Y, Axis::Z][read::<usize>(&mut args)?], + coordinate: read(&mut args)?, + input: reference(&mut args)?, + }, + "gcache" => GraphNode::Cache(reference(&mut args)?), + "ginterp" => GraphNode::Interpolated { + input: reference(&mut args)?, + xz: read(&mut args)?, + y: read(&mut args)?, + }, + "gsurface" => GraphNode::Surface { + density: reference(&mut args)?, + upper: reference(&mut args)?, + lower: read(&mut args)?, + height: read(&mut args)?, + }, + _ => unreachable!(), + }; + functions.push(graph_compiler.graph_mut().insert(node)?); + writeln!(out, "graph-create {}", functions.len() - 1)?; + } + "ginfo" => { + let id = functions[read::<usize>(&mut args)?]; + let range = graph_compiler + .graph() + .range(id) + .map_err(|_| IntervalError::NanBound); + interval_output(&mut out, "graph", range)?; + writeln!( + out, + "graph-axes {}", + graph_compiler.graph().domain_axes(id)? + )?; + } + "gsame" => { + let a = functions[read::<usize>(&mut args)?]; + let b = functions[read::<usize>(&mut args)?]; + writeln!( + out, + "graph-same {}", + u8::from(graph_compiler.graph().java_equals(a, b)?) + )?; + } + command @ ("gcompile" | "gtry") => { + let mode = read::<u8>(&mut args)?; + let id = functions[read::<usize>(&mut args)?]; + let result = if mode == 0 { + graph_compiler.compile_raw(id) + } else { + graph_compiler.get_sampler(id) + }; + if command == "gtry" { + writeln!( + out, + "graph-try {} {}", + if result.is_ok() { "ok" } else { "error" }, + graph_compiler.cache_count() + )?; + } else { + let sampler = result?; + let same = if mode == 0 { + -1 + } else { + i32::from(Arc::ptr_eq(&sampler, &graph_compiler.get_sampler(id)?)) + }; + samplers.push(sampler); + writeln!( + out, + "graph-compile {} {} {}", + samplers.len() - 1, + graph_compiler.cache_count(), + same + )?; + } + } + "spconstant" => { + splines.push(CubicSpline::Constant(float(&mut args)?)); + writeln!(out, "spline {}", splines.len() - 1)?; + } + "sppoints" => { + let coordinate = read(&mut args)?; + let count = read::<usize>(&mut args)?; + let mut points = Vec::new(); + for _ in 0..count { + let location = float(&mut args)?; + let derivative = float(&mut args)?; + let value = splines[read::<usize>(&mut args)?].clone(); + points.push(SplinePoint { + location, + derivative, + value, + }); + } + splines.push(CubicSpline::multipoint(coordinate, points)?); + writeln!(out, "spline {}", splines.len() - 1)?; + } + "spfail" => { + let spline = &splines[read::<usize>(&mut args)?]; + writeln!( + out, + "spline-compile {}", + if SplineSampler::new(spline, &samplers).is_err() { + "error" + } else { + "ok" + } + )?; + } + "sprange" => { + let spline = &splines[read::<usize>(&mut args)?]; + let mut ranges = [Interval::NAI; 3]; + for range in &mut ranges { + *range = Interval::encapsulating_values(float(&mut args)?, float(&mut args)?); + } + interval_output(&mut out, "spline", spline.range(&mut |id| ranges[id % 3]))?; + } + "spsampler" => { + let spline = &splines[read::<usize>(&mut args)?]; + samplers.push(Arc::new(SplineSampler::new(spline, &samplers)?)); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "surface" => { + let mode = read::<u8>(&mut args)?; + let density = samplers[read::<usize>(&mut args)?].clone(); + let upper = samplers[read::<usize>(&mut args)?].clone(); + let lower = read(&mut args)?; + let height = read(&mut args)?; + let sampler: Arc<dyn DensitySampler> = if mode == 0 { + Arc::new(FindTopSurfaceSampler::new(density, upper, lower, height)?) + } else { + Arc::new(compile_surface_search(density, upper, lower, height)?) + }; + samplers.push(sampler); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "interpolate" => { + let input = samplers[read::<usize>(&mut args)?].clone(); + let xz = read(&mut args)?; + let y = read(&mut args)?; + samplers.push(Arc::new(InterpolatedSampler::new(input, xz, y)?)); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "slice" => { + let mode = read::<u8>(&mut args)?; + let input = samplers[read::<usize>(&mut args)?].clone(); + let a = read(&mut args)?; + let b = read(&mut args)?; + let axes = match mode { + 0 => SliceAxes::X(a), + 1 => SliceAxes::Y(a), + 2 => SliceAxes::Z(a), + 3 => SliceAxes::Xz { x: a, z: b }, + _ => return Err("invalid slice mode".into()), + }; + samplers.push(Arc::new(SliceSampler { input, axes })); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "cache" => { + let id = read::<usize>(&mut args)?; + let input = samplers[read::<usize>(&mut args)?].clone(); + samplers.push(Arc::new(CachingDensitySampler::new(id, input)?)); + writeln!(out, "create {}", samplers.len() - 1)?; + } + "lookup" => { + let sizes = [read(&mut args)?, read(&mut args)?, read(&mut args)?]; + let minimum = [read(&mut args)?, read(&mut args)?, read(&mut args)?]; + let steps = [read(&mut args)?, read(&mut args)?, read(&mut args)?]; + let position = [read(&mut args)?, read(&mut args)?, read(&mut args)?]; + let volume = DensityVolume::new(sizes, minimum, steps)?; + writeln!( + out, + "lookup {}", + volume.index_of_block(position).map_or(-1, |v| v as i32) + )?; + } + "query" => { + let sampler = &samplers[read::<usize>(&mut args)?]; + let position = [read(&mut args)?, read(&mut args)?, read(&mut args)?]; + match sampler.sample_value(&mut context, position) { + Ok(value) => writeln!(out, "query {}", bits(value))?, + Err(_) => writeln!(out, "query error")?, + } + } + "volume" => { + let sampler = &samplers[read::<usize>(&mut args)?]; + let sizes = [read(&mut args)?, read(&mut args)?, read(&mut args)?]; + let minimum = [read(&mut args)?, read(&mut args)?, read(&mut args)?]; + let steps = [read(&mut args)?, read(&mut args)?, read(&mut args)?]; + let tail = read::<usize>(&mut args)?; + let seed = read(&mut args)?; + let repeats = read::<usize>(&mut args)?; + let volume = DensityVolume::new(sizes, minimum, steps)?; + let mut random = LegacyRandom::new(seed); + let mut buffer: Vec<_> = (0..volume.size() + tail) + .map(|_| f32::from_bits(random.next_int() as u32)) + .collect(); + for pass in 0..repeats { + let result = sampler.sample_volume(&mut context, &mut buffer, volume); + writeln!( + out, + "volume {pass} {}", + if result.is_ok() { "ok" } else { "error" } + )?; + for (i, value) in buffer.iter().enumerate() { + writeln!(out, "cell {i} {}", bits(*value))?; + } + } + } + _ => return Err("unknown command".into()), + } + if args.next().is_some() { + return Err("extra argument".into()); + } + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-core/src/bin/float_log_parity.rs b/crates/horizon-core/src/bin/float_log_parity.rs new file mode 100644 index 000000000..570a7c666 --- /dev/null +++ b/crates/horizon-core/src/bin/float_log_parity.rs @@ -0,0 +1,55 @@ +//! Binary transport for exhaustive comparison of the compiled float log sampler. +use horizon_core::density::{DensitySampler, SampleError, SamplerContext, UnaryOp, UnarySampler}; +use std::{ + io::{self, Write}, + sync::Arc, +}; + +#[derive(Debug)] +struct FloatBitsInput; +impl DensitySampler for FloatBitsInput { + fn sample_value(&self, _: &mut SamplerContext, position: [i32; 3]) -> Result<f32, SampleError> { + Ok(f32::from_bits(position[0] as u32)) + } +} + +fn main() -> Result<(), Box<dyn std::error::Error>> { + let mut args = std::env::args().skip(1); + let mut start = args + .next() + .ok_or("missing first float bits")? + .parse::<u64>()?; + let mut remaining = args.next().ok_or("missing float count")?.parse::<u64>()?; + if args.next().is_some() + || start + .checked_add(remaining) + .is_none_or(|end| end > 1_u64 << 32) + { + return Err("invalid float bit range".into()); + } + let sampler = UnarySampler { + input: Arc::new(FloatBitsInput), + operation: UnaryOp::Log, + }; + let mut context = SamplerContext::default(); + let mut out = io::BufWriter::with_capacity(1 << 20, io::stdout().lock()); + let mut buffer = vec![0_u8; 1 << 20]; + while remaining > 0 { + let entries = remaining.min((buffer.len() / 4) as u64) as usize; + for (offset, bytes) in buffer[..entries * 4].chunks_exact_mut(4).enumerate() { + let bits = (start + offset as u64) as u32; + let value = sampler.sample_value(&mut context, [bits as i32, 0, 0])?; + let result = if value.is_nan() { + 0x7fc0_0000 + } else { + value.to_bits() + }; + bytes.copy_from_slice(&result.to_be_bytes()); + } + out.write_all(&buffer[..entries * 4])?; + start += entries as u64; + remaining -= entries as u64; + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-core/src/bin/geometry_parity.rs b/crates/horizon-core/src/bin/geometry_parity.rs new file mode 100644 index 000000000..a51f51887 --- /dev/null +++ b/crates/horizon-core/src/bin/geometry_parity.rs @@ -0,0 +1,564 @@ +//! Text adapter for differential checks; no vanilla logic lives in the adapter. +use horizon_core::geometry::{ + Aabb, Axis, BlockHit, Direction, Vec3, VoxelShape, block_floor_height, candidate_step_heights, + entity_collision_bounds, resolve_shape_movement, resolve_step_movement, + sweep_intersected_blocks, +}; +use horizon_core::position::BlockPos; +use std::io::{self, BufRead, Write}; + +struct Input<'a>(std::str::SplitWhitespace<'a>); +impl Input<'_> { + fn word(&mut self) -> &str { + self.0.next().expect("missing input") + } + fn integer(&mut self) -> i32 { + self.word().parse().expect("integer") + } + fn number(&mut self) -> f64 { + f64::from_bits(u64::from_str_radix(self.word(), 16).expect("double bits")) + } + fn vector(&mut self) -> Vec3 { + Vec3::new(self.number(), self.number(), self.number()) + } + fn aabb(&mut self) -> Aabb { + Aabb::new(self.vector(), self.vector()) + } + fn pos(&mut self) -> BlockPos { + BlockPos::new(self.integer(), self.integer(), self.integer()) + } +} +fn bits(value: f64) -> String { + format!( + "{:016x}", + if value.is_nan() { + 0x7ff8_0000_0000_0000 + } else { + value.to_bits() + } + ) +} +fn positions( + out: &mut impl Write, + label: &str, + iter: impl Iterator<Item = BlockPos>, + limit: usize, +) -> io::Result<()> { + let mut count = 0; + for pos in iter.take(limit) { + writeln!(out, "{label} {} {} {}", pos.x, pos.y, pos.z)?; + count += 1; + } + writeln!(out, "{label}-count {count}") +} +fn values( + out: &mut impl Write, + label: &str, + values: impl IntoIterator<Item = f64>, +) -> io::Result<()> { + write!(out, "{label}")?; + for value in values { + write!(out, " {}", bits(value))?; + } + writeln!(out) +} +fn vector(out: &mut impl Write, label: &str, v: Vec3) -> io::Result<()> { + values(out, label, v.components()) +} +fn aabb(out: &mut impl Write, label: &str, b: Aabb) -> io::Result<()> { + values( + out, + label, + b.min_position() + .components() + .into_iter() + .chain(b.max_position().components()), + ) +} +fn point(out: &mut impl Write, label: &str, p: Option<Vec3>) -> io::Result<()> { + match p { + Some(v) => vector(out, label, v), + None => writeln!(out, "{label} none"), + } +} +fn hit(out: &mut impl Write, h: Option<BlockHit>) -> io::Result<()> { + match h { + Some(h) => { + write!( + out, + "hit {} {} {} {} {}", + h.direction as u8, + u8::from(h.inside), + h.block.x, + h.block.y, + h.block.z + )?; + for c in h.location.components() { + write!(out, " {}", bits(c))?; + } + writeln!(out) + } + None => writeln!(out, "hit none"), + } +} +fn shape_values(out: &mut impl Write, id: usize, shape: &VoxelShape) -> io::Result<()> { + values( + out, + "axis-extrema", + Axis::ALL + .map(|axis| shape.min(axis)) + .into_iter() + .chain(Axis::ALL.map(|axis| shape.max(axis))), + )?; + writeln!(out, "shape {id} {}", shape.boxes().len())?; + let flags = shape.cube_coordinate_axes(); + writeln!( + out, + "cube {} {}", + u8::from(shape.is_cube()), + u8::from(flags[0]) + 2 * u8::from(flags[1]) + 4 * u8::from(flags[2]) + )?; + for (axis, label) in Axis::ALL + .into_iter() + .zip(["x-coords", "y-coords", "z-coords"]) + { + values(out, label, shape.coordinates(axis).iter().copied())?; + } + if let Some(b) = shape.bounds() { + aabb(out, "shape-bounds", b)?; + } else { + writeln!(out, "shape-bounds none")?; + } + for b in shape.boxes() { + aabb(out, "part", *b)?; + } + Ok(()) +} +fn main() -> io::Result<()> { + let mut out = io::BufWriter::new(io::stdout().lock()); + let mut shapes = Vec::<VoxelShape>::new(); + for (line_number, line) in io::stdin().lock().lines().enumerate() { + let line = line?; + let mut input = Input(line.split_whitespace()); + let operation = input.word().to_owned(); + writeln!(out, "command {} {operation}", line_number + 1)?; + match operation.as_str() { + "make-box" => { + let shape = VoxelShape::from_box(input.aabb()).expect("valid box"); + shape_values(&mut out, shapes.len(), &shape)?; + shapes.push(shape); + } + "optimize" => { + let shape = shapes[input.integer() as usize] + .optimized() + .expect("bounded optimization"); + shape_values(&mut out, shapes.len(), &shape)?; + shapes.push(shape); + } + "join" | "join-optimized" => { + let optimized = operation == "join-optimized"; + let a = input.integer() as usize; + let b = input.integer() as usize; + let operation = + horizon_core::geometry::ShapeOp::from_truth_table(input.integer() as u8); + let result = if optimized { + shapes[a].join(&shapes[b], operation) + } else { + shapes[a].join_unoptimized(&shapes[b], operation) + }; + match result { + Err(horizon_core::geometry::ShapeError::UnboundedBoolean) => { + writeln!(out, "join invalid")? + } + Err(error) => panic!("join failed: {error}"), + Ok(shape) => { + writeln!( + out, + "overlap {}", + u8::from( + shapes[a] + .join_is_not_empty(&shapes[b], operation) + .expect("bounded Boolean") + ) + )?; + shape_values(&mut out, shapes.len(), &shape)?; + shapes.push(shape); + } + } + } + "traverse" => { + let start = input.vector(); + let end = input.vector(); + let stop = input.integer(); + let mut count = 0; + let result = horizon_core::geometry::traverse_blocks(start, end, 10000, |pos| { + count += 1; + writeln!(out, "visit {} {} {}", pos.x, pos.y, pos.z).expect("write visit"); + (count == stop).then_some(pos) + }) + .expect("finite bounded corpus"); + match result { + Some(pos) => writeln!(out, "traverse {} {} {} {count}", pos.x, pos.y, pos.z)?, + None => writeln!(out, "traverse none {count}")?, + } + } + "trig-table" => { + for (i, value) in horizon_core::geometry::trig::sine_table() + .iter() + .enumerate() + { + writeln!(out, "sine {i} {:08x}", value.to_bits())?; + } + } + "rotation" => { + let v = input.vector(); + let angle = input.number(); + let pitch = input.number() as f32; + let yaw = input.number() as f32; + let axes = input.integer(); + let axis = Axis::ALL[input.integer() as usize]; + let direction = Direction::ALL[input.integer() as usize]; + let amount = input.number(); + values( + &mut out, + "trig", + [ + horizon_core::geometry::trig::sin(angle) as f64, + horizon_core::geometry::trig::cos(angle) as f64, + ], + )?; + vector(&mut out, "rotate-x", v.rotate_x(angle as f32))?; + vector(&mut out, "rotate-y", v.rotate_y(angle as f32))?; + vector(&mut out, "rotate-z", v.rotate_z(angle as f32))?; + vector(&mut out, "clockwise", v.rotate_clockwise_90())?; + vector(&mut out, "look", Vec3::direction_from_rotation(pitch, yaw))?; + values(&mut out, "rotation", v.rotation().map(|v| v as f64))?; + vector( + &mut out, + "align", + v.align([axes & 1 != 0, axes & 2 != 0, axes & 4 != 0]), + )?; + vector(&mut out, "with", v.with_component(axis, amount))?; + vector(&mut out, "relative", v.relative(direction, amount))?; + } + "vec" => { + let a = input.vector(); + let b = input.vector(); + let t = input.number(); + for (label, v) in [ + ("add", a.add_vector(b)), + ("subtract", a.subtract(b)), + ("vector-to", a.vector_to(b)), + ("multiply", a.multiply(b)), + ("scale", a.scale(t)), + ("normalize", a.normalize()), + ("cross", a.cross(b)), + ("lerp", a.lerp(b, t)), + ("projected", a.projected_on(b)), + ("reverse", a.reverse()), + ("horizontal", a.horizontal()), + ] { + vector(&mut out, label, v)?; + } + values( + &mut out, + "scalar", + [ + a.dot(b), + a.length_squared(), + a.length(), + a.horizontal_distance_squared(), + a.horizontal_distance(), + a.distance_squared(b), + a.distance(b), + ], + )?; + writeln!( + out, + "flags {} {} {} {}", + u8::from(a == b), + u8::from(a.is_finite()), + u8::from(a.closer_than(b, t)), + Direction::approximate_nearest(a) as u8 + )?; + let order = Axis::step_order(a); + writeln!( + out, + "order {} {} {}", + order[0] as u8, order[1] as u8, order[2] as u8 + )?; + } + "box" => { + let a = input.aabb(); + let b = input.aabb(); + let start = input.vector(); + let end = input.vector(); + let amount = input.vector(); + let axis = Axis::ALL[input.integer() as usize]; + let value = input.number(); + for (label, b) in [ + ("bounds", a), + ("move", a.move_by(amount)), + ("inflate", a.inflate(amount)), + ("deflate", a.deflate(amount)), + ("contract", a.contract(amount)), + ("expand", a.expand_towards(amount)), + ("intersect", a.intersect(b)), + ("union", a.union_bounds(b)), + ("next", a.next_deflated()), + ("set-min", a.with_min(axis, value)), + ("set-max", a.with_max(axis, value)), + ("of-size", Aabb::of_size(start, amount)), + ("unit", Aabb::unit_cube(start)), + ] { + aabb(&mut out, label, b)?; + } + vector(&mut out, "center", a.center())?; + vector(&mut out, "bottom", a.bottom_center())?; + vector(&mut out, "size", a.size())?; + values( + &mut out, + "distance", + [ + a.average_size(), + a.distance_squared_to_point(start), + a.distance_squared_to_box(b), + ], + )?; + writeln!( + out, + "flags {} {} {} {}", + u8::from(a.intersects(b)), + u8::from(a.contains(start)), + u8::from(a.has_nan()), + u8::from(a.collided_along_vector(amount, &[b])) + )?; + point(&mut out, "clip", a.clip(start, end))?; + hit( + &mut out, + Aabb::clip_boxes([a, b], start, end, BlockPos::default()), + )?; + } + "block-box" => { + let a = input.pos(); + let b = input.pos(); + aabb(&mut out, "block", Aabb::block(a))?; + aabb(&mut out, "encapsulate", Aabb::encapsulating_blocks(a, b))?; + } + "grid" => { + let cube = input.integer() != 0; + let sizes = std::array::from_fn(|_| input.integer() as usize); + let coords = std::array::from_fn(|i| { + (0..=sizes[i]).map(|_| input.number()).collect::<Vec<_>>() + }); + let occupied = input.word().bytes().map(|b| b == b'1').collect::<Vec<_>>(); + let occupied = if sizes.contains(&0) { + &[][..] + } else { + &occupied[..] + }; + let shape = if cube { + VoxelShape::from_cube(sizes, occupied) + } else { + VoxelShape::from_grid(coords, occupied) + } + .expect("valid shape"); + writeln!(out, "shape {} {}", shapes.len(), shape.boxes().len())?; + values( + &mut out, + "axis-extrema", + Axis::ALL + .map(|axis| shape.min(axis)) + .into_iter() + .chain(Axis::ALL.map(|axis| shape.max(axis))), + )?; + if let Some(b) = shape.bounds() { + aabb(&mut out, "shape-bounds", b)?; + } else { + writeln!(out, "shape-bounds none")?; + } + for b in shape.boxes() { + aabb(&mut out, "part", *b)?; + } + shapes.push(shape); + } + "query" => { + let id = input.integer() as usize; + let b = input.aabb(); + let start = input.vector(); + let end = input.vector(); + let p = input.vector(); + let block = input.pos(); + let axis = Axis::ALL[input.integer() as usize]; + let amount = input.number(); + let shape = &shapes[id]; + values( + &mut out, + "column", + [shape.min_at(axis, p.x, p.y), shape.max_at(axis, p.x, p.y)], + )?; + values(&mut out, "collide", [shape.collide(axis, b, amount)])?; + hit(&mut out, shape.clip(start, end, block))?; + point(&mut out, "closest", shape.closest_point(p))?; + writeln!( + out, + "index {} {} {}", + shape.find_index(Axis::X, p.x), + shape.find_index(Axis::Y, p.y), + shape.find_index(Axis::Z, p.z) + )?; + } + "many" => { + let b = input.aabb(); + let axis = Axis::ALL[input.integer() as usize]; + let amount = input.number(); + let count = input.integer(); + let selected = (0..count) + .map(|_| &shapes[input.integer() as usize]) + .collect::<Vec<_>>(); + values( + &mut out, + "many", + [VoxelShape::collide_all(axis, b, selected, amount)], + )?; + } + "floor-height" => { + let shape = &shapes[input.integer() as usize]; + let below = &shapes[input.integer() as usize]; + let mut calls = 0; + let height = block_floor_height(shape, || { + calls += 1; + below + }); + values(&mut out, "floor-height", [height])?; + writeln!(out, "below-calls {calls}")?; + } + "block-iterate" => { + let a = input.pos(); + let b = input.pos(); + let direction = input.vector(); + let limit = input.integer() as usize; + positions( + &mut out, + "closed", + BlockPos::between_closed(a, b).expect("bounded block box"), + limit, + )?; + positions( + &mut out, + "direction", + BlockPos::between_corners_in_direction(a, b, direction) + .expect("bounded block box"), + limit, + )?; + } + "box-iterate" => { + let b = input.aabb(); + let direction = input.vector(); + let limit = input.integer() as usize; + positions( + &mut out, + "closed", + BlockPos::between_closed_box(b).expect("bounded block box"), + limit, + )?; + positions( + &mut out, + "direction", + BlockPos::between_box_corners_in_direction(b, direction) + .expect("bounded block box"), + limit, + )?; + } + "sweep" => { + let start = input.vector(); + let end = input.vector(); + let b = input.aabb(); + let stop = input.integer() as usize; + let mut visits = Vec::new(); + let completed = sweep_intersected_blocks(start, end, b, 1_000_000, |pos, step| { + visits.push((pos, step)); + visits.len() != stop + }) + .expect("bounded finite sweep"); + for (pos, step) in &visits { + writeln!(out, "block-visit {} {} {} {step}", pos.x, pos.y, pos.z)?; + } + writeln!(out, "sweep {} {}", u8::from(completed), visits.len())?; + } + "step-motion" => { + let b = input.aabb(); + let movement = input.vector(); + let max_step = input.number() as f32; + let grounded = input.integer() != 0; + let mut read_shapes = || { + let count = input.integer(); + (0..count) + .map(|_| &shapes[input.integer() as usize]) + .collect::<Vec<_>>() + }; + let entities = read_shapes(); + let initial = read_shapes(); + let stepping = read_shapes(); + let border = input.integer(); + aabb( + &mut out, + "entity-query", + entity_collision_bounds(movement, b, max_step), + )?; + let mut queries = Vec::new(); + let result = resolve_step_movement(movement, b, max_step, grounded, |query| { + let blocks = if queries.is_empty() { + &initial + } else { + &stepping + }; + queries.push(query); + let mut selected = entities.clone(); + if border >= 0 { + selected.push(&shapes[border as usize]); + } + selected.extend(blocks.iter().copied()); + selected + }); + for query in &queries { + aabb(&mut out, "block-query", *query)?; + } + vector(&mut out, "step-motion", result)?; + writeln!(out, "block-queries {}", queries.len())?; + } + "motion" => { + let b = input.aabb(); + let movement = input.vector(); + let max_step = input.number() as f32; + let current_y = input.number() as f32; + let count = input.integer(); + let selected = (0..count) + .map(|_| &shapes[input.integer() as usize]) + .collect::<Vec<_>>(); + vector( + &mut out, + "motion", + resolve_shape_movement(movement, b, &selected), + )?; + let candidates = candidate_step_heights(b, &selected, max_step, current_y); + write!(out, "steps {}", candidates.len())?; + for value in candidates { + write!( + out, + " {:08x}", + if value.is_nan() { + 0x7fc0_0000 + } else { + value.to_bits() + } + )?; + } + writeln!(out)?; + } + _ => panic!("unknown command {operation}"), + } + assert!(input.0.next().is_none(), "trailing input"); + } + out.flush() +} diff --git a/crates/horizon-core/src/bin/noise_parity.rs b/crates/horizon-core/src/bin/noise_parity.rs new file mode 100644 index 000000000..52085cddd --- /dev/null +++ b/crates/horizon-core/src/bin/noise_parity.rs @@ -0,0 +1,423 @@ +//! Test transport for comparing noise with the downloaded vanilla artifacts. +use horizon_core::{ + geometry::Axis, + noise::{ + DensityVolume, GradientTable, Noise, NoiseBuildError, NoiseStack, NormalNoise, + Normalization, PerlinNoise, SimplexNoise, SmearedPerlinNoise, wrap, + }, + random::{LegacyRandom, RandomSource, XoroshiroRandom}, +}; +use std::io::{self, BufRead, BufWriter, Write}; +use std::sync::Arc; + +enum Sampler { + Perlin(PerlinNoise), + Simplex(SimplexNoise), + Smeared(SmearedPerlinNoise), + Stack(NoiseStack), +} +impl Sampler { + fn table(&self) -> &GradientTable { + match self { + Self::Perlin(n) => n.table(), + Self::Simplex(n) => n.table(), + Self::Smeared(n) => n.table(), + Self::Stack(_) => panic!("stack has no gradient table"), + } + } + fn as_noise(&self) -> &dyn Noise { + match self { + Self::Perlin(n) => n, + Self::Simplex(n) => n, + Self::Smeared(n) => n, + Self::Stack(n) => n, + } + } + fn shared_noise(&self) -> Arc<dyn Noise> { + match self { + Self::Perlin(n) => Arc::new(n.clone()), + Self::Simplex(n) => Arc::new(n.clone()), + Self::Smeared(n) => Arc::new(n.clone()), + Self::Stack(n) => Arc::new(n.clone()), + } + } + fn range(&self) -> Result<[f32; 2], horizon_core::noise::NanRange> { + self.as_noise().range() + } + fn get2(&self, x: f64, z: f64) -> f32 { + self.as_noise().get2(x, z) + } + fn get3(&self, x: f64, y: f64, z: f64) -> f32 { + self.as_noise().get3(x, y, z) + } +} +fn read<T: std::str::FromStr>( + args: &mut std::str::SplitWhitespace<'_>, +) -> Result<T, Box<dyn std::error::Error>> { + args.next() + .ok_or("missing argument")? + .parse() + .map_err(|_| "invalid argument".into()) +} +fn double(args: &mut std::str::SplitWhitespace<'_>) -> Result<f64, Box<dyn std::error::Error>> { + Ok(f64::from_bits(u64::from_str_radix( + args.next().ok_or("missing double")?, + 16, + )?)) +} +fn float(args: &mut std::str::SplitWhitespace<'_>) -> Result<f32, Box<dyn std::error::Error>> { + Ok(f32::from_bits(u32::from_str_radix( + args.next().ok_or("missing float")?, + 16, + )?)) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { 0x7fc0_0000 } else { v.to_bits() } +} +fn dbits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8_0000_0000_0000 + } else { + v.to_bits() + } +} +fn create<R: RandomSource>( + kind: &str, + mut rng: R, + skip: bool, + scale: f64, + out: &mut impl Write, +) -> io::Result<Sampler> { + let sampler = match kind { + "perlin" => Sampler::Perlin(PerlinNoise::new(&mut rng)), + "simplex" => Sampler::Simplex(SimplexNoise::with_skipped_offsets(&mut rng, skip)), + "smeared" => Sampler::Smeared(SmearedPerlinNoise::new(&mut rng, scale)), + _ => { + return Err(io::Error::new( + io::ErrorKind::InvalidInput, + "unknown sampler", + )); + } + }; + let offsets = sampler.table().offsets(); + let range = sampler.range(); + let (lower, upper) = match range { + Ok(range) => (bits(range[0]).to_string(), bits(range[1]).to_string()), + Err(_) => ("error".to_owned(), "error".to_owned()), + }; + writeln!( + out, + "create {} {} {} {} {} {}", + dbits(offsets[0]), + dbits(offsets[1]), + dbits(offsets[2]), + lower, + upper, + rng.next_long() + )?; + write!(out, "permutations")?; + for v in sampler.table().permutations() { + write!(out, " {v}")?; + } + writeln!(out)?; + Ok(sampler) +} +fn normal_probe<R: RandomSource>( + out: &mut impl Write, + definition: Result<NormalNoise, NoiseBuildError>, + mut random: R, + points: &[[f64; 3]], + legacy: bool, +) -> Result<(), Box<dyn std::error::Error>> { + let Ok(definition) = definition else { + writeln!(out, "normal error {}", random.next_long())?; + return Ok(()); + }; + let range = definition.range(); + writeln!( + out, + "normal {} {} {} {}", + definition.octaves().len(), + dbits(definition.normalization_factor()), + bits(range[0]), + bits(range[1]) + )?; + for octave in definition.octaves() { + writeln!( + out, + "octave {} {} {} {}", + octave.octave_index, + dbits(octave.frequency), + dbits(octave.amplitude), + octave.seed() + )?; + } + let created = if legacy { + definition.create_for_legacy_nether_biome(&mut random) + } else { + definition.create(&mut random) + }; + match created { + Err(_) => writeln!(out, "normal-create error")?, + Ok(noise) => { + let range = noise.range()?; + writeln!( + out, + "normal-create {} {} {}", + noise.layers().len(), + bits(range[0]), + bits(range[1]) + )?; + for layer in noise.layers() { + writeln!( + out, + "normal-layer {} {} {} {}", + dbits(layer.frequency), + bits(layer.amplitude), + bits(layer.noise.get2(0.25, 0.75)), + bits(layer.noise.get3(-17.25, 64.125, 32.5)) + )?; + } + for &[x, y, z] in points { + writeln!( + out, + "normal-query {} {}", + bits(noise.get2(x, z)), + bits(noise.get3(x, y, z)) + )?; + } + let volume = DensityVolume::new([2, 5, 2], [-17, -64, 32], [4, 1, 4])?; + let mut values: Vec<f32> = (0..volume.size()) + .map(|i| (i as f32 - 10.0) * 0.125) + .collect(); + for (pass, amplitude) in [0.5, -0.25].into_iter().enumerate() { + noise.add_to_volume(&mut values, volume, 0.125, 0.25, amplitude)?; + for (i, value) in values.iter().enumerate() { + writeln!(out, "normal-volume {pass} {i} {}", bits(*value))?; + } + } + } + } + writeln!(out, "normal-parent {}", random.next_long())?; + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let stdin = io::stdin(); + let mut out = BufWriter::new(io::stdout().lock()); + let mut samplers = Vec::new(); + for line in stdin.lock().lines() { + let line = line?; + let mut args = line.split_whitespace(); + match args.next().ok_or("missing operation")? { + "normal" => { + let kind = args.next().ok_or("missing RNG kind")?; + let seed: i64 = read(&mut args)?; + let parity: i32 = read(&mut args)?; + let base: i32 = read(&mut args)?; + let count: i32 = read(&mut args)?; + let normalization: i32 = read(&mut args)?; + let amplitude = double(&mut args)?; + let modifiers: usize = read(&mut args)?; + let modifiers = (0..modifiers) + .map(|_| double(&mut args)) + .collect::<Result<Vec<_>, _>>()?; + let point_count: usize = read(&mut args)?; + let points = (0..point_count) + .map(|_| Ok([double(&mut args)?, double(&mut args)?, double(&mut args)?])) + .collect::<Result<Vec<_>, Box<dyn std::error::Error>>>()?; + let definition = if parity & 1 != 0 { + NormalNoise::create_parity(base, &modifiers) + } else { + (|| { + let mut builder = NormalNoise::builder(); + builder + .set_base_octave(base) + .set_base_amplitude(amplitude) + .set_normalization(match normalization { + 0 => Normalization::Disabled, + 1 => Normalization::Enabled, + _ => Normalization::Legacy, + }); + builder.set_octave_count(count)?; + for (index, value) in modifiers.iter().enumerate() { + builder.set_amplitude_modifier(index as i32, *value)?; + } + builder.build() + })() + }; + match kind { + "legacy" => normal_probe( + &mut out, + definition, + LegacyRandom::new(seed), + &points, + parity & 2 != 0, + )?, + "xoroshiro" => normal_probe( + &mut out, + definition, + XoroshiroRandom::new(seed), + &points, + parity & 2 != 0, + )?, + _ => return Err("unknown stream".into()), + } + } + "create" => { + let kind = args.next().ok_or("missing sampler")?; + let stream = args.next().ok_or("missing stream")?; + let seed: i64 = read(&mut args)?; + let skip: i32 = read(&mut args)?; + let scale = double(&mut args)?; + let sampler = match stream { + "legacy" => create(kind, LegacyRandom::new(seed), skip != 0, scale, &mut out)?, + "xoroshiro" => { + create(kind, XoroshiroRandom::new(seed), skip != 0, scale, &mut out)? + } + _ => return Err("unknown stream".into()), + }; + samplers.push(sampler); + } + operation @ ("query" | "local") => { + let id: usize = read(&mut args)?; + let mut point = [double(&mut args)?, double(&mut args)?, double(&mut args)?]; + let mut derivative = [float(&mut args)?, float(&mut args)?, float(&mut args)?]; + let sampler = &samplers[id]; + if operation == "local" { + for (value, offset) in point.iter_mut().zip(sampler.table().offsets()) { + *value -= offset; + } + } + let [x, y, z] = point; + write!( + out, + "query {} {}", + bits(sampler.get2(x, z)), + bits(sampler.get3(x, y, z)) + )?; + let value = match sampler { + Sampler::Perlin(n) => Some(n.noise_with_derivative(x, y, z, &mut derivative)), + Sampler::Smeared(n) => Some(n.noise_with_derivative(x, y, z, &mut derivative)), + Sampler::Simplex(_) | Sampler::Stack(_) => None, + }; + if let Some(value) = value { + write!( + out, + " {} {} {} {}", + bits(value), + bits(derivative[0]), + bits(derivative[1]), + bits(derivative[2]) + )?; + } + writeln!(out)?; + } + "volume" => { + let id: usize = read(&mut args)?; + let sizes = [read(&mut args)?, read(&mut args)?, read(&mut args)?]; + let minimum = [read(&mut args)?, read(&mut args)?, read(&mut args)?]; + let steps = [read(&mut args)?, read(&mut args)?, read(&mut args)?]; + let xz_scale = double(&mut args)?; + let y_scale = double(&mut args)?; + let amplitude = float(&mut args)?; + let seed: i64 = read(&mut args)?; + let repeats: usize = read(&mut args)?; + match DensityVolume::new(sizes, minimum, steps) { + Err(_) => writeln!(out, "volume error")?, + Ok(volume) => { + let mut random = LegacyRandom::new(seed); + let mut values: Vec<f32> = (0..volume.size() + 4) + .map(|_| f32::from_bits(random.next_int() as u32)) + .collect(); + let sampler = &samplers[id]; + for _ in 0..repeats { + sampler.as_noise().add_to_volume( + &mut values, + volume, + xz_scale, + y_scale, + amplitude, + )?; + } + let maximum = volume.maximum(); + writeln!( + out, + "volume {} {} {} {}", + volume.size(), + maximum[0], + maximum[1], + maximum[2] + )?; + let [sx, sy, sz] = volume.sizes(); + for z in 0..sz { + for x in 0..sx { + for y in 0..sy { + let index = volume.index([x, y, z]).unwrap(); + writeln!( + out, + "cell {index} {} {} {} {}", + volume.block(Axis::X, x).unwrap(), + volume.block(Axis::Y, y).unwrap(), + volume.block(Axis::Z, z).unwrap(), + bits(values[index]) + )?; + } + } + } + for value in &values[volume.size()..] { + writeln!(out, "tail {}", bits(*value))?; + } + } + } + } + "stack" => { + let count: usize = read(&mut args)?; + let mut builder = NoiseStack::builder(); + for _ in 0..count { + let flatten: i32 = read(&mut args)?; + let id: usize = read(&mut args)?; + let frequency = double(&mut args)?; + let amplitude = float(&mut args)?; + if flatten != 0 { + let Sampler::Stack(stack) = &samplers[id] else { + return Err("flatten expects a stack".into()); + }; + builder.add_stack(stack, frequency, amplitude); + } else { + builder.add(samplers[id].shared_noise(), frequency, amplitude); + } + } + match builder.build() { + Err(_) => writeln!(out, "stack error")?, + Ok(stack) => { + let range = stack.range()?; + writeln!( + out, + "stack {} {} {}", + stack.layers().len(), + bits(range[0]), + bits(range[1]) + )?; + for (index, layer) in stack.layers().iter().enumerate() { + writeln!( + out, + "layer {} {} {}", + dbits(layer.frequency), + bits(layer.amplitude), + bits(stack.get_layer(index).unwrap().get3(0.0, 0.0, 0.0)) + )?; + } + samplers.push(Sampler::Stack(stack)); + } + } + } + "wrap" => writeln!(out, "wrap {}", dbits(wrap(double(&mut args)?)))?, + _ => return Err("unknown operation".into()), + } + if args.next().is_some() { + return Err("extra argument".into()); + } + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-core/src/bin/parity.rs b/crates/horizon-core/src/bin/parity.rs new file mode 100644 index 000000000..964391b3f --- /dev/null +++ b/crates/horizon-core/src/bin/parity.rs @@ -0,0 +1,321 @@ +//! Line-based differential probe. Not a game client or server. +use horizon_core::{ + position::{BlockPos, ChunkPos, SectionPos}, + random::{ + LegacyPositionalRandom, LegacyRandom, PositionalRandom, RandomSource, + XoroshiroPositionalRandom, XoroshiroRandom, java_string_hash, position_seed, + seed_from_hash_utf16, + }, + storage::PackedStorage, +}; +use std::io::{self, BufRead, BufWriter, Write}; + +fn random_probe<R: RandomSource>(out: &mut impl Write, mut rng: R, count: usize) -> io::Result<()> { + let bounds = [1, 2, 3, 16, 31, 256, 65_537, 1_073_741_825, i32::MAX, 0, -1]; + for i in 0..count { + let value = match i % 10 { + 0 => rng.next_int().to_string(), + 1 => rng.next_long().to_string(), + 2 => match rng.next_int_bound(bounds[(i / 10) % bounds.len()]) { + Ok(value) => value.to_string(), + Err(_) => "error".to_owned(), + }, + 3 => u8::from(rng.next_boolean()).to_string(), + 4 => rng.next_float().to_bits().to_string(), + 5 => rng.next_double().to_bits().to_string(), + 6 => rng.fork().next_long().to_string(), + 7 => { + rng.consume_count((i % 7) as i32 - 2); + rng.next_long().to_string() + } + 8 => { + if i % 101 == 8 { + let seed = rng.next_long().wrapping_sub(i as i64); + rng.set_seed(seed); + } + rng.next_int_bound(1_073_741_825).unwrap().to_string() + } + _ => rng.next_int().to_string(), + }; + writeln!(out, "rng {i} {value}")?; + } + Ok(()) +} + +fn read<T: std::str::FromStr>(args: &mut std::str::SplitWhitespace<'_>) -> Result<T, String> { + args.next() + .ok_or_else(|| "missing argument".to_owned())? + .parse() + .map_err(|_| "invalid argument".to_owned()) +} +fn helpers<R: RandomSource>( + out: &mut impl Write, + mut rng: R, + bounds: [i32; 2], + double: [f64; 2], + float: [f32; 2], +) -> io::Result<()> { + for i in 0..32 { + let inclusive = rng + .next_int_between_inclusive(bounds[0], bounds[1]) + .map_or_else(|_| "error".to_owned(), |v| v.to_string()); + let exclusive = rng + .next_int_between(bounds[0], bounds[1]) + .map_or_else(|_| "error".to_owned(), |v| v.to_string()); + let d = rng.triangle(double[0], double[1]); + let f = rng.triangle_float(float[0], float[1]); + let d = if d.is_nan() { + 0x7ff8_0000_0000_0000 + } else { + d.to_bits() + }; + let f = if f.is_nan() { 0x7fc0_0000 } else { f.to_bits() }; + writeln!( + out, + "helpers {i} {inclusive} {exclusive} {d} {f} {}", + rng.next_long() + )?; + } + random_probe(out, rng, 24) +} +fn utf16(token: &str) -> Result<Vec<u16>, String> { + if token == "-" { + return Ok(Vec::new()); + } + if token.len() % 4 != 0 { + return Err("invalid UTF-16 hex".to_owned()); + } + token + .as_bytes() + .chunks_exact(4) + .map(|part| { + u16::from_str_radix( + std::str::from_utf8(part).map_err(|_| "invalid UTF-16 hex")?, + 16, + ) + .map_err(|_| "invalid UTF-16 hex".to_owned()) + }) + .collect() +} +fn factory_probe<P: PositionalRandom>( + out: &mut impl Write, + factory: P, + position: BlockPos, + seed: i64, + name: &[u16], + count: usize, +) -> io::Result<()> { + for (label, rng) in [ + ("at", factory.at(position)), + ("seed", factory.from_seed(seed)), + ("hash", factory.from_hash_of_utf16(name)), + ] { + writeln!(out, "factory {label}")?; + random_probe(out, rng, count)?; + } + Ok(()) +} + +fn probe(line: &str, out: &mut impl Write) -> Result<(), Box<dyn std::error::Error>> { + let mut args = line.split_whitespace(); + match args.next().ok_or("missing operation")? { + "helpers" => { + let kind = args.next().ok_or("missing RNG kind")?; + let seed: i64 = read(&mut args)?; + let bounds = [read(&mut args)?, read(&mut args)?]; + let d = [ + f64::from_bits(u64::from_str_radix( + args.next().ok_or("missing double")?, + 16, + )?), + f64::from_bits(u64::from_str_radix( + args.next().ok_or("missing double")?, + 16, + )?), + ]; + let f = [ + f32::from_bits(u32::from_str_radix( + args.next().ok_or("missing float")?, + 16, + )?), + f32::from_bits(u32::from_str_radix( + args.next().ok_or("missing float")?, + 16, + )?), + ]; + match kind { + "legacy" => helpers(out, LegacyRandom::new(seed), bounds, d, f)?, + "xoroshiro" => helpers(out, XoroshiroRandom::new(seed), bounds, d, f)?, + _ => return Err("unknown RNG kind".into()), + } + } + "factory" => { + let kind = args.next().ok_or("missing RNG kind")?; + let mode: i32 = read(&mut args)?; + let lo: i64 = read(&mut args)?; + let hi: i64 = read(&mut args)?; + let position = BlockPos::new(read(&mut args)?, read(&mut args)?, read(&mut args)?); + let seed: i64 = read(&mut args)?; + let name = utf16(args.next().ok_or("missing name")?)?; + let count: usize = read(&mut args)?; + let hash = seed_from_hash_utf16(&name); + writeln!( + out, + "seeds {} {} {} {}", + position_seed(position), + java_string_hash(name.iter().copied()), + hash[0] as i64, + hash[1] as i64 + )?; + if kind == "legacy" { + let mut source = LegacyRandom::new(lo); + let factory = if mode == 0 { + LegacyPositionalRandom::new(lo) + } else { + source.fork_positional() + }; + factory_probe(out, factory, position, seed, &name, count)?; + if mode != 0 { + writeln!(out, "parent {}", source.next_long())?; + } + } else { + let mut source = XoroshiroRandom::new(lo); + let factory = if mode == 0 { + XoroshiroPositionalRandom::new(lo as u64, hi as u64) + } else { + source.fork_positional() + }; + factory_probe(out, factory, position, seed, &name, count)?; + if mode != 0 { + writeln!(out, "parent {}", source.next_long())?; + } + } + } + "position" => { + let p = BlockPos::new(read(&mut args)?, read(&mut args)?, read(&mut args)?); + let offset = p.offset(read(&mut args)?, read(&mut args)?, read(&mut args)?); + let packed = p.pack(); + let decoded = BlockPos::unpack(packed); + let section = p.section(); + let sp = section.pack(); + let sd = SectionPos::unpack(sp); + let chunk = p.chunk(); + let cp = chunk.pack(); + let cd = ChunkPos::unpack(cp); + let region = chunk.region(); + let (rx, rz) = chunk.region_local(); + let relative = p.section_relative(); + let rebuilt = section.relative_to_block(relative); + writeln!( + out, + "position {packed} {} {} {} {sp} {} {} {} {cp} {} {} {} {} {rx} {rz} {relative} {} {} {} {} {} {} {}", + decoded.x, + decoded.y, + decoded.z, + sd.x, + sd.y, + sd.z, + cd.x, + cd.z, + region.x, + region.z, + p.section_index(), + rebuilt.x, + rebuilt.y, + rebuilt.z, + offset.x, + offset.y, + offset.z + )?; + } + "legacy" => random_probe(out, LegacyRandom::new(read(&mut args)?), read(&mut args)?)?, + "xoroshiro" => random_probe( + out, + XoroshiroRandom::new(read(&mut args)?), + read(&mut args)?, + )?, + "xoroshiro_state" => random_probe( + out, + XoroshiroRandom::from_state( + read::<i64>(&mut args)? as u64, + read::<i64>(&mut args)? as u64, + ), + read(&mut args)?, + )?, + "storage" => { + let bits: u8 = read(&mut args)?; + let len: usize = read(&mut args)?; + let seed: i64 = read(&mut args)?; + let mut storage = PackedStorage::new(bits, len)?; + let mut rng = LegacyRandom::new(seed); + let mask = ((1_u64 << bits) - 1).min(i32::MAX as u64); + for i in 0..len * 3 { + let index = rng.next_int_bound(len as i32)? as usize; + let value = (rng.next_int() as u32 as u64 & mask) as u32; + let old = storage.set(index, value)?; + writeln!(out, "set {i} {index} {old} {}", storage.get(index)?)?; + } + for (i, &word) in storage.words().iter().enumerate() { + writeln!(out, "word {i} {}", word as i64)?; + } + for (i, value) in storage.unpack().iter().enumerate() { + writeln!(out, "value {i} {}", *value as i32)?; + } + let mut imported = + PackedStorage::from_words(bits, len, vec![u64::MAX; storage.words().len()])?; + for i in 0..len { + writeln!(out, "import {i} {}", imported.get(i)? as i32)?; + } + if len > 0 { + imported.set(len - 1, 0)?; + } + for (i, &word) in imported.words().iter().enumerate() { + writeln!(out, "import_word {i} {}", word as i64)?; + } + for value in [0, 1, mask as u32] { + imported.fill(value)?; + for (i, &word) in imported.words().iter().enumerate() { + writeln!(out, "fill {value} {i} {}", word as i64)?; + } + } + let before = storage.clone(); + writeln!( + out, + "invalid_index {}", + u8::from(storage.set(len, 0).is_err()) + )?; + let invalid_value = if bits == 32 { u32::MAX } else { 1_u32 << bits }; + // An empty storage has no valid index at which to test value errors. + if len > 0 { + writeln!( + out, + "invalid_value {}", + u8::from(storage.set(0, invalid_value).is_err()) + )?; + } + writeln!(out, "unchanged {}", u8::from(storage == before))?; + } + _ => return Err("unknown operation".into()), + } + if args.next().is_some() { + return Err("unexpected trailing argument".into()); + } + Ok(()) +} + +fn main() { + let mut out = BufWriter::new(io::stdout().lock()); + for (i, line) in io::stdin().lock().lines().enumerate() { + let result = line + .map_err(|e| e.to_string()) + .and_then(|line| probe(&line, &mut out).map_err(|e| e.to_string())); + if let Err(error) = result { + eprintln!("line {}: {error}", i + 1); + std::process::exit(2); + } + } + if let Err(error) = out.flush() { + eprintln!("output failed: {error}"); + std::process::exit(2); + } +} diff --git a/crates/horizon-core/src/bin/tick_parity.rs b/crates/horizon-core/src/bin/tick_parity.rs new file mode 100644 index 000000000..e4b8c46ea --- /dev/null +++ b/crates/horizon-core/src/bin/tick_parity.rs @@ -0,0 +1,246 @@ +//! Original trace adapter for pinned vanilla scheduler comparisons. +use horizon_core::{ + position::{BlockPos, ChunkPos}, + ticks::{ + ChunkTicks, LevelTicks, SavedTick, ScheduleResult, ScheduledTick, TickArea, TickPriority, + TickTypeId, + }, +}; +use std::{ + collections::{HashMap, HashSet}, + error::Error, + io::{self, BufRead, Write}, + str::{FromStr, SplitWhitespace}, +}; +struct Input<'a>(SplitWhitespace<'a>); +impl Input<'_> { + fn value<T: FromStr>(&mut self) -> Result<T, Box<dyn Error>> + where + T::Err: Error + 'static, + { + Ok(self.0.next().ok_or("missing argument")?.parse()?) + } + fn pos(&mut self) -> Result<BlockPos, Box<dyn Error>> { + Ok(BlockPos::new(self.value()?, self.value()?, self.value()?)) + } + fn chunk(&mut self) -> Result<ChunkPos, Box<dyn Error>> { + Ok(ChunkPos::new(self.value()?, self.value()?)) + } + fn area(&mut self) -> Result<TickArea, Box<dyn Error>> { + Ok(TickArea::new(self.pos()?, self.pos()?)) + } +} +fn result(result: ScheduleResult) -> u8 { + match result { + ScheduleResult::Added => 1, + ScheduleResult::Duplicate => 0, + ScheduleResult::MissingChunk => 2, + } +} +fn scheduled(out: &mut impl Write, tick: ScheduledTick) -> io::Result<()> { + writeln!( + out, + "queued {} {} {} {} {} {} {}", + tick.kind.0, + tick.pos.x, + tick.pos.y, + tick.pos.z, + tick.trigger_tick, + tick.priority as i8, + tick.sub_tick_order + ) +} +fn main() -> Result<(), Box<dyn Error>> { + let mut level = LevelTicks::default(); + let mut detached = HashMap::<ChunkPos, ChunkTicks>::new(); + let mut blocked = HashSet::new(); + let mut out = io::BufWriter::new(io::stdout().lock()); + for (line_number, line) in io::stdin().lock().lines().enumerate() { + let line = line?; + let mut input = Input(line.split_whitespace()); + let operation = input.0.next().ok_or("empty command")?; + writeln!(out, "command {} {}", line_number, operation)?; + match operation { + "reset" => { + level = LevelTicks::default(); + detached.clear(); + blocked.clear(); + } + "add" => { + let pos = input.chunk()?; + if level.chunk(pos).is_none() { + level.add_chunk(pos, ChunkTicks::default())?; + } + } + "load" => { + let pos = input.chunk()?; + let count: usize = input.value()?; + let mut ticks = Vec::with_capacity(count); + for _ in 0..count { + ticks.push(SavedTick { + kind: TickTypeId(input.value()?), + pos: input.pos()?, + delay: input.value()?, + priority: TickPriority::by_value(input.value()?), + }); + } + if level.chunk(pos).is_some() { + level.remove_chunk(pos); + } + level.add_chunk(pos, ChunkTicks::from_saved(ticks))?; + } + "unpack" => { + let pos = input.chunk()?; + level.unpack_chunk(pos, input.value()?); + } + "remove" => { + let pos = input.chunk()?; + if let Some(chunk) = level.remove_chunk(pos) { + detached.insert(pos, chunk); + } + } + "restore" => { + let pos = input.chunk()?; + if level.chunk(pos).is_none() { + if let Some(chunk) = detached.remove(&pos) { + level.add_chunk(pos, chunk)?; + } + } + } + "enable" => { + let pos = input.chunk()?; + if input.value::<i32>()? == 0 { + blocked.insert(pos); + } else { + blocked.remove(&pos); + } + } + "schedule" => { + let tick = ScheduledTick { + kind: TickTypeId(input.value()?), + pos: input.pos()?, + trigger_tick: input.value()?, + priority: TickPriority::by_value(input.value()?), + sub_tick_order: input.value()?, + }; + writeln!(out, "schedule {}", result(level.schedule(tick)))?; + } + "query" => { + let kind = TickTypeId(input.value()?); + let pos = input.pos()?; + writeln!( + out, + "query {} {}", + u8::from(level.has_scheduled(pos, kind)), + u8::from(level.will_tick_this_tick(pos, kind)) + )?; + } + "chunk" => { + let pos = input.chunk()?; + if let Some(chunk) = level.chunk(pos) { + writeln!(out, "chunk {}", chunk.count())?; + for &tick in chunk.queued() { + scheduled(&mut out, tick)?; + } + } else { + writeln!(out, "chunk absent")?; + } + } + "save" => { + let pos = input.chunk()?; + let time = input.value()?; + if let Some(chunk) = level.chunk(pos) { + let ticks = chunk.pack(time); + writeln!(out, "saved {}", ticks.len())?; + for tick in ticks { + writeln!( + out, + "saved-value {} {} {} {} {} {}", + tick.kind.0, + tick.pos.x, + tick.pos.y, + tick.pos.z, + tick.delay, + tick.priority as i8 + )?; + } + } else { + writeln!(out, "saved absent")?; + } + } + "reload" => { + let pos = input.chunk()?; + let save_time = input.value()?; + let load_time = input.value()?; + if let Some(old) = level.remove_chunk(pos) { + let mut chunk = ChunkTicks::from_saved(old.pack(save_time)); + chunk.unpack(load_time); + level.add_chunk(pos, chunk)?; + } + } + "clear" => level.clear_area(input.area()?), + "copy" => { + let area = input.area()?; + level.copy_area(area, input.pos()?); + } + "tick" => { + let time: i64 = input.value()?; + let maximum: i32 = input.value()?; + let action: i32 = input.value()?; + let probe_kind = TickTypeId(input.value()?); + let probe = input.pos()?; + let mut order: i64 = input.value()?; + level.begin_tick(time, maximum, |pos| !blocked.contains(&pos))?; + while let Some(tick) = level.next_tick()? { + scheduled(&mut out, tick)?; + writeln!( + out, + "running {} {} {}", + u8::from(level.will_tick_this_tick(tick.pos, tick.kind)), + u8::from(level.has_scheduled(tick.pos, tick.kind)), + u8::from(level.will_tick_this_tick(probe, probe_kind)) + )?; + match action { + 1 => { + let mut next = tick; + next.trigger_tick = time; + next.sub_tick_order = order; + order = order.wrapping_add(1); + writeln!(out, "callback-schedule {}", result(level.schedule(next)))?; + } + 2 => { + level.clear_area(TickArea::new(tick.pos, tick.pos.offset(1, 1, 1))); + writeln!( + out, + "callback-clear {}", + u8::from(level.will_tick_this_tick(probe, probe_kind)) + )?; + } + 3 => level.copy_area( + TickArea::new(tick.pos.offset(-2, -2, -2), tick.pos.offset(2, 2, 2)), + BlockPos::new(16, 0, 0), + ), + 4 => { + let pos = tick.pos.chunk(); + if let Some(chunk) = level.remove_chunk(pos) { + detached.insert(pos, chunk); + } + } + 5 => { + blocked.insert(tick.pos.chunk()); + } + 0 => {} + _ => return Err("unknown callback action".into()), + } + } + level.finish_tick()?; + } + _ => return Err(format!("unknown command {operation}").into()), + } + if input.0.next().is_some() { + return Err("extra arguments".into()); + } + writeln!(out, "count {}", level.count())?; + } + Ok(()) +} diff --git a/crates/horizon-core/src/biome.rs b/crates/horizon-core/src/biome.rs new file mode 100644 index 000000000..4f8c9ff54 --- /dev/null +++ b/crates/horizon-core/src/biome.rs @@ -0,0 +1,74 @@ +//! Block-to-quart biome lookup for Java Edition 26.3. +//! Selection is independent of the provider that stores or generates quart biomes. +mod seed_hash; +use crate::position::BlockPos; + +/// The seed sent to clients: SHA-256 of the little-endian world seed, with the +/// first eight digest bytes interpreted as a little-endian signed long. +pub fn obfuscate_seed(world_seed: i64) -> i64 { + seed_hash::hash(world_seed) +} + +#[derive(Clone, Copy, Debug)] +pub struct BiomeZoom { + seed: i64, +} +impl BiomeZoom { + /// Accepts the obfuscated biome seed, not the original world seed. + pub const fn new(obfuscated_seed: i64) -> Self { + Self { + seed: obfuscated_seed, + } + } + /// Choose the closest of eight jittered quart corners, preserving vanilla's + /// corner order, strict tie comparison and signed coordinate wrapping. + pub fn quart_at_block(self, block: BlockPos) -> [i32; 3] { + let shifted = [block.x, block.y, block.z].map(|v| v.wrapping_sub(2)); + let base = shifted.map(|v| v >> 2); + let fractions = shifted.map(|v| f64::from(v & 3) / 4.); + let mut selected = base; + let mut best = f64::INFINITY; + for corner in 0..8 { + let offsets = [(corner >> 2) & 1, (corner >> 1) & 1, corner & 1]; + let quart = std::array::from_fn(|i| base[i].wrapping_add(offsets[i])); + let delta = std::array::from_fn(|i| fractions[i] - f64::from(offsets[i])); + let distance = fiddled_distance(self.seed, quart, delta); + if best > distance { + best = distance; + selected = quart; + } + } + selected + } +} + +/// Direct noise-biome lookup bypasses the eight-corner zoom. +pub fn noise_quart_at_block(block: BlockPos) -> [i32; 3] { + [block.x, block.y, block.z].map(|v| v >> 2) +} +/// Java floors each double to a saturating int (NaN becomes zero) before shifting. +pub fn noise_quart_at_position(position: [f64; 3]) -> [i32; 3] { + position.map(|v| (v.floor() as i32) >> 2) +} +fn next(seed: i64, salt: i64) -> i64 { + seed.wrapping_mul( + seed.wrapping_mul(6364136223846793005) + .wrapping_add(1442695040888963407), + ) + .wrapping_add(salt) +} +fn fiddle(seed: i64) -> f64 { + (((seed >> 24) & 1023) as f64 / 1024. - 0.5) * 0.9 +} +fn fiddled_distance(seed: i64, quart: [i32; 3], delta: [f64; 3]) -> f64 { + let mut mixed = seed; + for coordinate in quart.into_iter().cycle().take(6) { + mixed = next(mixed, i64::from(coordinate)); + } + let x = delta[0] + fiddle(mixed); + mixed = next(mixed, seed); + let y = delta[1] + fiddle(mixed); + mixed = next(mixed, seed); + let z = delta[2] + fiddle(mixed); + z * z + y * y + x * x +} diff --git a/crates/horizon-core/src/biome/seed_hash.rs b/crates/horizon-core/src/biome/seed_hash.rs new file mode 100644 index 000000000..e88d67ae1 --- /dev/null +++ b/crates/horizon-core/src/biome/seed_hash.rs @@ -0,0 +1,66 @@ +// SHA-256 specialized to one eight-byte input. This is a world-seed compatibility +// transform, not a general-purpose cryptography interface. +const K: [u32; 64] = [ + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2, +]; +pub(super) fn hash(seed: i64) -> i64 { + let bytes = seed.to_le_bytes(); + let mut words = [0_u32; 64]; + words[0] = u32::from_be_bytes(bytes[..4].try_into().unwrap()); + words[1] = u32::from_be_bytes(bytes[4..].try_into().unwrap()); + words[2] = 0x80000000; + words[15] = 64; + for i in 16..64 { + let a = words[i - 15]; + let b = words[i - 2]; + let small0 = a.rotate_right(7) ^ a.rotate_right(18) ^ (a >> 3); + let small1 = b.rotate_right(17) ^ b.rotate_right(19) ^ (b >> 10); + words[i] = words[i - 16] + .wrapping_add(small0) + .wrapping_add(words[i - 7]) + .wrapping_add(small1); + } + let initial = [ + 0x6a09e667_u32, + 0xbb67ae85, + 0x3c6ef372, + 0xa54ff53a, + 0x510e527f, + 0x9b05688c, + 0x1f83d9ab, + 0x5be0cd19, + ]; + let [mut a, mut b, mut c, mut d, mut e, mut f, mut g, mut h] = initial; + for i in 0..64 { + let sum1 = e.rotate_right(6) ^ e.rotate_right(11) ^ e.rotate_right(25); + let choice = (e & f) ^ (!e & g); + let t1 = h + .wrapping_add(sum1) + .wrapping_add(choice) + .wrapping_add(K[i]) + .wrapping_add(words[i]); + let sum0 = a.rotate_right(2) ^ a.rotate_right(13) ^ a.rotate_right(22); + let majority = (a & b) ^ (a & c) ^ (b & c); + let t2 = sum0.wrapping_add(majority); + h = g; + g = f; + f = e; + e = d.wrapping_add(t1); + d = c; + c = b; + b = a; + a = t1.wrapping_add(t2); + } + let first = a.wrapping_add(initial[0]).to_be_bytes(); + let second = b.wrapping_add(initial[1]).to_be_bytes(); + i64::from_le_bytes([ + first[0], first[1], first[2], first[3], second[0], second[1], second[2], second[3], + ]) +} diff --git a/crates/horizon-core/src/carving.rs b/crates/horizon-core/src/carving.rs new file mode 100644 index 000000000..e539203f3 --- /dev/null +++ b/crates/horizon-core/src/carving.rs @@ -0,0 +1,164 @@ +//! Packed carving masks and vanilla's ordered inclusive column segments. +mod ellipsoid; +pub use ellipsoid::{ + CarveError, CarverOutput, can_reach, carve_ellipsoid, carve_ellipsoid_with_budget, +}; + +/// A contiguous carved interval in a local chunk column. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct CarvingColumn { + pub x: i32, + pub z: i32, + pub min_y: i32, + pub max_y: i32, +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CarvingMaskError { + InvalidBounds, + NegativeIndex, + Capacity, +} +impl std::fmt::Display for CarvingMaskError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str(match self { + Self::InvalidBounds => "carving mask height must be between 1 and 4064", + Self::NegativeIndex => "carving mask index is negative", + Self::Capacity => "carving mask exceeds its bounded bit capacity", + }) + } +} +impl std::error::Error for CarvingMaskError {} + +/// Bits are contiguous in Y, then Z, then X. Coordinates retain Java's wrapping +/// index arithmetic and positive out-of-range aliases. Growth is capped at +/// 2^24 bits; valid chunk coordinates use at most 256 * 4064 bits. +#[derive(Clone, Debug)] +pub struct CarvingMask { + min_y: i32, + max_y: i32, + height: i32, + words: Vec<u64>, + used_words: usize, +} +impl CarvingMask { + pub fn new(min_y: i32, max_y: i32) -> Result<Self, CarvingMaskError> { + let height = i64::from(max_y) - i64::from(min_y) + 1; + if !(1..=4064).contains(&height) { + return Err(CarvingMaskError::InvalidBounds); + } + Ok(Self { + min_y, + max_y, + height: height as i32, + words: vec![0; (height as usize * 256).div_ceil(64)], + used_words: 0, + }) + } + pub fn min_y(&self) -> i32 { + self.min_y + } + pub fn max_y(&self) -> i32 { + self.max_y + } + pub fn is_empty(&self) -> bool { + self.used_words == 0 + } + pub fn carve(&mut self, x: i32, y: i32, z: i32) -> Result<(), CarvingMaskError> { + let index = y + .wrapping_sub(self.min_y) + .wrapping_add(z.wrapping_add(x.wrapping_shl(4)).wrapping_mul(self.height)); + if index < 0 { + return Err(CarvingMaskError::NegativeIndex); + } + if index >= 1 << 24 { + return Err(CarvingMaskError::Capacity); + } + let index = index as usize; + let word = index / 64; + if word >= self.words.len() { + self.words.resize(word + 1, 0); + } + self.words[word] |= 1 << (index & 63); + self.used_words = self.used_words.max(word + 1); + Ok(()) + } + /// Traverse ascending packed runs, splitting each run at column boundaries. + /// No per-cell or per-column allocation is required. + pub fn columns(&self) -> impl Iterator<Item = CarvingColumn> + '_ { + let mut cursor = Cursor::default(); + std::iter::from_fn(move || cursor.next(self)) + } + /// Like vanilla's callback traversal, changes made by the visitor affect the + /// next run search, but do not change the already selected run's boundaries. + /// An error stops traversal immediately and retains visitor mutations. + pub fn try_visit_mut<E>( + &mut self, + mut visitor: impl FnMut(&mut Self, CarvingColumn) -> Result<(), E>, + ) -> Result<(), E> { + let mut cursor = Cursor::default(); + while let Some(column) = cursor.next(self) { + visitor(self, column)?; + } + Ok(()) + } + fn next_set(&self, from: usize) -> Option<usize> { + let mut word = from / 64; + if word >= self.used_words { + return None; + } + let mut bits = self.words[word] & (u64::MAX << (from & 63)); + loop { + if bits != 0 { + return Some(word * 64 + bits.trailing_zeros() as usize); + } + word += 1; + if word == self.used_words { + return None; + } + bits = self.words[word]; + } + } + fn next_clear(&self, from: usize) -> usize { + let mut word = from / 64; + let mut bits = !self.words[word] & (u64::MAX << (from & 63)); + loop { + if bits != 0 { + return word * 64 + bits.trailing_zeros() as usize; + } + word += 1; + if word == self.used_words { + return word * 64; + } + bits = !self.words[word]; + } + } +} + +#[derive(Default)] +struct Cursor { + search: usize, + run: Option<(usize, usize, usize)>, +} +impl Cursor { + fn next(&mut self, mask: &CarvingMask) -> Option<CarvingColumn> { + let height = mask.height as usize; + let (start, end, column) = match self.run { + Some(run) => run, + None => { + let start = mask.next_set(self.search)?; + let end = mask.next_clear(start) - 1; + self.search = end + 1; + (start, end, start / height) + } + }; + self.run = (column < end / height).then_some((start, end, column + 1)); + let base = column * height; + Some(CarvingColumn { + x: ((column >> 4) & 15) as i32, + z: (column & 15) as i32, + min_y: mask.min_y.wrapping_add(start.saturating_sub(base) as i32), + max_y: mask.min_y.wrapping_add((end - base).min(height - 1) as i32), + }) + } +} diff --git a/crates/horizon-core/src/carving/ellipsoid.rs b/crates/horizon-core/src/carving/ellipsoid.rs new file mode 100644 index 000000000..49b9d0e3a --- /dev/null +++ b/crates/horizon-core/src/carving/ellipsoid.rs @@ -0,0 +1,124 @@ +//! Shared cave/canyon ellipsoid traversal and path reachability. +use super::{CarvingMask, CarvingMaskError}; +use crate::{geometry::floor_i32, position::ChunkPos}; + +pub trait CarverOutput { + type Error; + fn min_y(&self) -> i32; + fn max_y(&self) -> i32; + fn carve(&mut self, x: i32, y: i32, z: i32) -> Result<(), Self::Error>; +} +impl CarverOutput for CarvingMask { + type Error = CarvingMaskError; + fn min_y(&self) -> i32 { + CarvingMask::min_y(self) + } + fn max_y(&self) -> i32 { + CarvingMask::max_y(self) + } + fn carve(&mut self, x: i32, y: i32, z: i32) -> Result<(), Self::Error> { + CarvingMask::carve(self, x, y, z) + } +} +#[derive(Debug, PartialEq, Eq)] +pub enum CarveError<E> { + Output(E), + IterationLimit, +} +impl<E: std::fmt::Display> std::fmt::Display for CarveError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Output(e) => e.fmt(f), + Self::IterationLimit => f.write_str("carver traversal budget exhausted"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for CarveError<E> {} + +/// Tests a cave/canyon path against the target chunk's center. Thickness math +/// first rounds in float precision, while distances use doubles. +pub fn can_reach(chunk: ChunkPos, x: f64, z: f64, step: i32, end: i32, thickness: f32) -> bool { + let dx = x - f64::from(chunk.x.wrapping_shl(4).wrapping_add(8)); + let dz = z - f64::from(chunk.z.wrapping_shl(4).wrapping_add(8)); + let remaining = f64::from(end.wrapping_sub(step)); + let radius = f64::from((thickness + 2.) + 16.); + dx * dx + dz * dz - remaining * remaining <= radius * radius +} + +/// Visit candidate cells in X/Z/descending-Y order. The lower Y limit is +/// exclusive; normalized vertical coordinates use Y-0.5. The caller supplies +/// the cave/canyon skip predicate, which receives each candidate's absolute Y. +/// Failure retains previous output writes. Work is capped at 2^24 candidates. +pub fn carve_ellipsoid<O: CarverOutput>( + chunk: ChunkPos, + center: [f64; 3], + horizontal: f64, + vertical: f64, + output: &mut O, + skip: impl FnMut([f64; 3], i32) -> bool, +) -> Result<(), CarveError<O::Error>> { + carve_ellipsoid_with_budget( + chunk, + center, + horizontal, + vertical, + output, + skip, + &mut (1 << 24), + ) +} + +/// The same traversal with a shared candidate budget for a complete carver path. +/// Each tested cell consumes one unit, including cells rejected by the predicate. +pub fn carve_ellipsoid_with_budget<O: CarverOutput>( + chunk: ChunkPos, + [x, y, z]: [f64; 3], + horizontal: f64, + vertical: f64, + output: &mut O, + mut skip: impl FnMut([f64; 3], i32) -> bool, + remaining: &mut usize, +) -> Result<(), CarveError<O::Error>> { + let cx = chunk.x.wrapping_shl(4); + let cz = chunk.z.wrapping_shl(4); + let reach = 16. + horizontal * 2.; + if (x - f64::from(cx.wrapping_add(8))).abs() > reach + || (z - f64::from(cz.wrapping_add(8))).abs() > reach + { + return Ok(()); + } + let min_x = floor_i32(x - horizontal) + .wrapping_sub(cx) + .wrapping_sub(1) + .max(0); + let max_x = floor_i32(x + horizontal).wrapping_sub(cx).min(15); + let min_y = floor_i32(y - vertical).wrapping_sub(1).max(output.min_y()); + let max_y = floor_i32(y + vertical).wrapping_add(1).min(output.max_y()); + let min_z = floor_i32(z - horizontal) + .wrapping_sub(cz) + .wrapping_sub(1) + .max(0); + let max_z = floor_i32(z + horizontal).wrapping_sub(cz).min(15); + for lx in min_x..=max_x { + let nx = (f64::from(cx.wrapping_add(lx)) + 0.5 - x) / horizontal; + for lz in min_z..=max_z { + let nz = (f64::from(cz.wrapping_add(lz)) + 0.5 - z) / horizontal; + if nx * nx + nz * nz >= 1. { + continue; + } + let mut by = max_y; + while by > min_y { + if *remaining == 0 { + return Err(CarveError::IterationLimit); + } + *remaining -= 1; + let ny = (f64::from(by) - 0.5 - y) / vertical; + if !skip([nx, ny, nz], by) { + output.carve(lx, by, lz).map_err(CarveError::Output)?; + } + by -= 1; + } + } + } + Ok(()) +} diff --git a/crates/horizon-core/src/density/arithmetic.rs b/crates/horizon-core/src/density/arithmetic.rs new file mode 100644 index 000000000..296a071e8 --- /dev/null +++ b/crates/horizon-core/src/density/arithmetic.rs @@ -0,0 +1,248 @@ +use super::*; + +pub(super) fn java_power(base: f64, exponent: f64) -> f64 { + // Native libm can propagate a signaling NaN base even for exponent zero; + // Java returns one for every base in this case. + if exponent == 0.0 { + 1.0 + } else if exponent.is_nan() || (base.abs() == 1.0 && exponent.is_infinite()) { + f64::NAN + } else { + base.powf(exponent) + } +} + +pub(super) fn java_min(a: f32, b: f32) -> f32 { + if a.is_nan() || b.is_nan() { + f32::NAN + } else if a == 0.0 && b == 0.0 { + f32::from_bits(a.to_bits() | b.to_bits()) + } else if a <= b { + a + } else { + b + } +} +pub(super) fn java_max(a: f32, b: f32) -> f32 { + if a.is_nan() || b.is_nan() { + f32::NAN + } else if a == 0.0 && b == 0.0 { + f32::from_bits(a.to_bits() & b.to_bits()) + } else if a >= b { + a + } else { + b + } +} +fn clamp(value: f32, min: f32, max: f32) -> f32 { + if value < min { + min + } else { + java_min(value, max) + } +} + +/// Selected compiled unary samplers, including constant-operand specializations. +/// Graph compilation is implemented separately. +#[derive(Clone, Copy, Debug)] +pub enum UnaryOp { + Abs, + Negate, + Square, + Cube, + Sqrt, + Log, + PowerBase(f64), + PowerExponent(f64), + Reciprocal, + Sign, + Squeeze, + LeakyRelu(f32), + Add(f32), + SubtractFrom(f32), + Multiply(f32), + DivideInto(f32), + Minimum(f32), + Maximum(f32), + ConstantRangeChoice { + min_inclusive: f32, + max_exclusive: f32, + inside: f32, + outside: f32, + }, + Clamp { + min: f32, + max: f32, + }, +} +impl UnaryOp { + pub(super) fn apply(self, value: f32, bulk: bool) -> f32 { + match self { + Self::Abs => value.abs(), + Self::Negate => -value, + Self::Square => value * value, + Self::Cube => value * value * value, + Self::Sqrt => (value as f64).sqrt() as f32, + Self::Log => (value as f64).ln() as f32, + Self::PowerBase(base) => java_power(base, value as f64) as f32, + Self::PowerExponent(exponent) => java_power(value as f64, exponent) as f32, + Self::Reciprocal => 1.0 / value, + Self::Sign => { + if value == 0.0 || value.is_nan() { + value + } else { + value.signum() + } + } + Self::Squeeze => { + let v = clamp(value, -1.0, 1.0); + v / 2.0 - v * v * v / 24.0 + } + Self::LeakyRelu(factor) => { + if value > 0.0 { + value + } else { + value * factor + } + } + Self::Add(right) => value + right, + Self::SubtractFrom(left) => left - value, + Self::Multiply(right) => value * right, + Self::DivideInto(left) => left / value, + Self::Minimum(right) => { + if bulk { + if right < value { right } else { value } + } else { + java_min(value, right) + } + } + Self::Maximum(right) => { + if bulk { + if right > value { right } else { value } + } else { + java_max(value, right) + } + } + Self::Clamp { min, max } => clamp(value, min, max), + Self::ConstantRangeChoice { + min_inclusive, + max_exclusive, + inside, + outside, + } => { + if value >= min_inclusive && value < max_exclusive { + inside + } else { + outside + } + } + } + } +} +#[derive(Clone, Debug)] +pub struct UnarySampler { + pub input: Arc<dyn DensitySampler>, + pub operation: UnaryOp, +} +impl DensitySampler for UnarySampler { + fn sample_value( + &self, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + Ok(self + .operation + .apply(self.input.sample_value(context, position)?, false)) + } + fn sample_volume( + &self, + context: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_buffer(buffer, volume)?; + self.input.sample_volume(context, buffer, volume)?; + for value in buffer { + *value = self.operation.apply(*value, true); + } + Ok(()) + } +} + +/// Range bounds are the values baked into vanilla's compiled min/max samplers. +/// Computing those bounds from a density graph is a separate compiler step. +#[derive(Clone, Copy, Debug)] +pub enum BinaryOp { + Add, + Subtract, + Multiply, + Divide, + Minimum { right_min: f32 }, + Maximum { right_max: f32 }, +} +impl BinaryOp { + fn apply(self, left: f32, right: f32, bulk: bool) -> f32 { + match self { + Self::Add => left + right, + Self::Subtract => left - right, + Self::Multiply => left * right, + Self::Divide => left / right, + Self::Minimum { .. } => { + if bulk { + if right < left { right } else { left } + } else { + java_min(left, right) + } + } + Self::Maximum { .. } => { + if bulk { + if right > left { right } else { left } + } else { + java_max(left, right) + } + } + } + } +} +#[derive(Clone, Debug)] +pub struct BinarySampler { + pub left: Arc<dyn DensitySampler>, + pub right: Arc<dyn DensitySampler>, + pub operation: BinaryOp, +} +impl DensitySampler for BinarySampler { + fn sample_value( + &self, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + let left = self.left.sample_value(context, position)?; + match self.operation { + BinaryOp::Multiply | BinaryOp::Divide if left == 0.0 => return Ok(0.0), + BinaryOp::Minimum { right_min } if left <= right_min => return Ok(left), + BinaryOp::Maximum { right_max } if left >= right_max => return Ok(left), + _ => {} + } + Ok(self + .operation + .apply(left, self.right.sample_value(context, position)?, false)) + } + fn sample_volume( + &self, + context: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_exact_buffer(buffer, volume)?; + // Vanilla reads a volume-sized temporary through every output index. + // Restrict this API to the valid equal-size case before invoking children. + self.left.sample_volume(context, buffer, volume)?; + context.with_buffer(volume.size(), |context, right| { + self.right.sample_volume(context, right, volume)?; + for (left, right) in buffer.iter_mut().zip(right) { + *left = self.operation.apply(*left, *right, true); + } + Ok(()) + }) + } +} diff --git a/crates/horizon-core/src/density/beardifier.rs b/crates/horizon-core/src/density/beardifier.rs new file mode 100644 index 000000000..225f74714 --- /dev/null +++ b/crates/horizon-core/src/density/beardifier.rs @@ -0,0 +1,214 @@ +//! Structure terrain adaptation from ordered rigid pieces and jigsaw junctions. +//! Discovery/filtering of live structure starts is a separate world subsystem. +use super::{DensitySampler, SampleError, SamplerContext, check_buffer}; +use crate::noise::DensityVolume; +use std::sync::OnceLock; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct StructureBounds { + minimum: [i32; 3], + maximum: [i32; 3], +} +impl StructureBounds { + /// Already normalized inclusive bounds. Invalid inputs are rejected rather + /// than invoking vanilla's development-mode logging/repair path. + pub fn new(minimum: [i32; 3], maximum: [i32; 3]) -> Option<Self> { + (0..3) + .all(|axis| minimum[axis] <= maximum[axis]) + .then_some(Self { minimum, maximum }) + } + pub fn minimum(self) -> [i32; 3] { + self.minimum + } + pub fn maximum(self) -> [i32; 3] { + self.maximum + } + pub fn contains(self, position: [i32; 3]) -> bool { + (0..3).all(|i| position[i] >= self.minimum[i] && position[i] <= self.maximum[i]) + } + fn intersects(self, minimum: [i32; 3], maximum: [i32; 3]) -> bool { + (0..3).all(|i| self.maximum[i] >= minimum[i] && self.minimum[i] <= maximum[i]) + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TerrainAdjustment { + None, + Bury, + BeardThin, + BeardBox, + Encapsulate, +} +#[derive(Clone, Copy, Debug)] +pub struct RigidPiece { + pub bounds: StructureBounds, + pub adjustment: TerrainAdjustment, + pub ground_level_delta: i32, +} +#[derive(Clone, Copy, Debug)] +pub struct JigsawJunction { + pub source_x: i32, + pub source_ground_y: i32, + pub source_z: i32, +} + +#[derive(Clone, Debug, Default)] +pub struct Beardifier { + pieces: Vec<RigidPiece>, + junctions: Vec<JigsawJunction>, + affected: Option<StructureBounds>, +} +impl Beardifier { + /// Matches the runtime constructor. A missing affected box makes the entire + /// sampler empty, even when the supplied component lists are nonempty. + pub fn new( + pieces: Vec<RigidPiece>, + junctions: Vec<JigsawJunction>, + affected: Option<StructureBounds>, + ) -> Self { + Self { + pieces, + junctions, + affected, + } + } + pub fn affected_bounds(&self) -> Option<StructureBounds> { + self.affected + } + fn sample_unchecked(&self, [x, y, z]: [i32; 3]) -> f32 { + let mut value = 0.; + for piece in &self.pieces { + let low = piece.bounds.minimum; + let high = piece.bounds.maximum; + let dx = 0.max(low[0].wrapping_sub(x).max(x.wrapping_sub(high[0]))); + let dz = 0.max(low[2].wrapping_sub(z).max(z.wrapping_sub(high[2]))); + let ground = low[1].wrapping_add(piece.ground_level_delta); + let dy = y.wrapping_sub(ground); + let distance_y = match piece.adjustment { + TerrainAdjustment::None => 0, + TerrainAdjustment::Bury | TerrainAdjustment::BeardThin => dy, + TerrainAdjustment::BeardBox => { + 0.max(ground.wrapping_sub(y).max(y.wrapping_sub(high[1]))) + } + TerrainAdjustment::Encapsulate => { + 0.max(low[1].wrapping_sub(y).max(y.wrapping_sub(high[1]))) + } + }; + value += match piece.adjustment { + TerrainAdjustment::None => 0., + TerrainAdjustment::Bury => bury(dx as f32, distance_y as f32 / 2., dz as f32), + TerrainAdjustment::BeardThin | TerrainAdjustment::BeardBox => { + beard(dx, distance_y, dz, dy) * 0.8 + } + TerrainAdjustment::Encapsulate => { + bury(dx as f32 / 2., distance_y as f32 / 2., dz as f32 / 2.) * 0.8 + } + }; + } + for junction in &self.junctions { + let dx = x.wrapping_sub(junction.source_x); + let dy = y.wrapping_sub(junction.source_ground_y); + let dz = z.wrapping_sub(junction.source_z); + value += beard(dx, dy, dz, dy) * 0.4; + } + value + } +} +impl DensitySampler for Beardifier { + fn sample_value(&self, _: &mut SamplerContext, position: [i32; 3]) -> Result<f32, SampleError> { + Ok( + if self + .affected + .is_some_and(|bounds| bounds.contains(position)) + { + self.sample_unchecked(position) + } else { + 0. + }, + ) + } + fn sample_volume( + &self, + _: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_buffer(buffer, volume)?; + buffer.fill(0.); + let Some(bounds) = self.affected else { + return Ok(()); + }; + let minimum = volume.minimum(); + if !bounds.intersects(minimum, volume.maximum()) { + return Ok(()); + } + let steps = volume.steps(); + let sizes = volume.sizes(); + // Deliberately floor, not ceil: the first bulk lattice sample can lie + // below the affected bounds and is evaluated without the scalar guard. + let low: [i32; 3] = std::array::from_fn(|i| { + bounds.minimum[i] + .wrapping_sub(minimum[i]) + .max(0) + .div_euclid(steps[i]) + }); + let high: [i32; 3] = std::array::from_fn(|i| { + ((sizes[i] - 1) as i32).min( + bounds.maximum[i] + .wrapping_sub(minimum[i]) + .div_euclid(steps[i]), + ) + }); + for z in low[2]..=high[2] { + for x in low[0]..=high[0] { + for y in low[1]..=high[1] { + let index = volume + .index([x as usize, y as usize, z as usize]) + .expect("bounded structure density indices"); + let local = [x, y, z]; + let point = std::array::from_fn(|i| { + minimum[i].wrapping_add(local[i].wrapping_mul(steps[i])) + }); + buffer[index] = self.sample_unchecked(point); + } + } + } + Ok(()) + } +} +fn bury(x: f32, y: f32, z: f32) -> f32 { + let squared = (x * x + y * y) + z * z; + if squared >= 36. { + 0. + } else { + 1. - squared.sqrt() / 6. + } +} +fn beard(x: i32, y: i32, z: i32, ground_delta: i32) -> f32 { + let indices = [x, y, z].map(|v| v.wrapping_add(12)); + if indices.iter().any(|v| !(0..24).contains(v)) { + return 0.; + } + let vertical = ground_delta as f32 + 0.5; + let squared = (x as f32 * x as f32 + vertical * vertical) + z as f32 * z as f32; + let factor = (-vertical * fast_inverse_sqrt(f64::from(squared / 2.)) as f32) / 2.; + factor * kernel()[((indices[2] * 24 + indices[0]) * 24 + indices[1]) as usize] +} +fn fast_inverse_sqrt(value: f64) -> f64 { + let half = 0.5 * value; + let bits = 6_910_469_410_427_058_090i64.wrapping_sub((value.to_bits() as i64) >> 1); + let estimate = f64::from_bits(bits as u64); + estimate * (1.5 - half * estimate * estimate) +} +fn kernel() -> &'static [f32; 13824] { + static KERNEL: OnceLock<[f32; 13824]> = OnceLock::new(); + KERNEL.get_or_init(|| { + std::array::from_fn(|i| { + let z = (i / 576) as f64 - 12.; + let x = ((i / 24) % 24) as f64 - 12.; + let y = (i % 24) as f64 - 12. + 0.5; + let squared = (x * x + y * y) + z * z; + std::f64::consts::E.powf(-squared / 16.) as f32 + }) + }) +} diff --git a/crates/horizon-core/src/density/cache.rs b/crates/horizon-core/src/density/cache.rs new file mode 100644 index 000000000..8e5b46f44 --- /dev/null +++ b/crates/horizon-core/src/density/cache.rs @@ -0,0 +1,128 @@ +use super::*; +use crate::position::BlockPos; + +#[derive(Debug)] +pub(super) struct CacheCell { + volume: Option<DensityVolume>, + buffer: Vec<f32>, + value_key: i64, + value: f32, + active: bool, +} +impl Default for CacheCell { + fn default() -> Self { + Self { + volume: None, + buffer: Vec::new(), + value_key: 0, + value: f32::NAN, + active: false, + } + } +} +impl SamplerContext { + /// Cache cells belong to this evaluation context, never to shared samplers. + pub fn cached() -> Self { + Self { + caches: Some(Vec::new()), + ..Self::default() + } + } + pub fn clear_caches(&mut self) { + if let Some(caches) = &mut self.caches { + caches.clear(); + } + } + fn prepare_cache(&mut self, id: usize) -> Result<bool, SampleError> { + let Some(caches) = &mut self.caches else { + return Ok(false); + }; + if id >= caches.len() { + caches.resize_with((id + 16) & !15, CacheCell::default); + } + if caches[id].active { + return Err(SampleError::RecursiveCache); + } + Ok(true) + } +} + +/// A compiled acyclic cache node. IDs are allocated by the graph compiler and +/// shared only for the same function. The bounded API accepts IDs 0..=65535. +#[derive(Clone, Debug)] +pub struct CachingDensitySampler { + id: usize, + input: Arc<dyn DensitySampler>, +} +impl CachingDensitySampler { + pub fn new(id: usize, input: Arc<dyn DensitySampler>) -> Result<Self, SampleError> { + if id > 65535 { + return Err(SampleError::CacheIdOutOfRange); + } + Ok(Self { id, input }) + } + pub fn id(&self) -> usize { + self.id + } +} +impl DensitySampler for CachingDensitySampler { + fn sample_value( + &self, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + if !context.prepare_cache(self.id)? { + return self.input.sample_value(context, position); + } + let key = BlockPos::new(position[0], position[1], position[2]).pack(); + let cell = &mut context.caches.as_mut().unwrap()[self.id]; + if cell.value_key == key && !cell.value.is_nan() { + return Ok(cell.value); + } + if let Some(volume) = cell.volume { + if let Some(index) = volume.index_of_block(position) { + return Ok(cell.buffer[index]); + } + } + cell.active = true; + let result = self.input.sample_value(context, position); + let cell = &mut context.caches.as_mut().unwrap()[self.id]; + cell.active = false; + if let Ok(value) = result { + cell.value_key = key; + cell.value = value; + } + result + } + fn sample_volume( + &self, + context: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_buffer(buffer, volume)?; + if !context.prepare_cache(self.id)? { + return self.input.sample_volume(context, buffer, volume); + } + check_exact_buffer(buffer, volume)?; + let cell = &mut context.caches.as_mut().unwrap()[self.id]; + if cell.volume == Some(volume) { + buffer.copy_from_slice(&cell.buffer); + return Ok(()); + } + let mut cached = std::mem::take(&mut cell.buffer); + cached.resize(volume.size(), 0.0); + // Unwritten values after a failed child are deterministic. Differential + // error tests use a reference arena with the same zero-initialization. + cached.fill(0.0); + cell.volume = Some(volume); + cell.active = true; + let result = self.input.sample_volume(context, &mut cached, volume); + let cell = &mut context.caches.as_mut().unwrap()[self.id]; + cell.active = false; + cell.buffer = cached; + result?; + buffer.copy_from_slice(&cell.buffer); + Ok(()) + } +} diff --git a/crates/horizon-core/src/density/end_islands.rs b/crates/horizon-core/src/density/end_islands.rs new file mode 100644 index 000000000..148f3575d --- /dev/null +++ b/crates/horizon-core/src/density/end_islands.rs @@ -0,0 +1,79 @@ +use super::*; +use crate::{ + noise::SimplexNoise, + random::{LegacyRandom, RandomSource}, +}; + +/// Java Edition 26.3's outer End island density. The center island is supplied +/// by the surrounding terrain graph, rather than by this sampler. +#[derive(Clone, Debug)] +pub struct EndIslandSampler { + noise: SimplexNoise, +} +impl EndIslandSampler { + pub fn new(world_seed: i64) -> Self { + let mut random = LegacyRandom::new(world_seed); + random.consume_count(17_292); + Self { + noise: SimplexNoise::with_skipped_offsets(&mut random, true), + } + } + fn height(&self, x: i32, z: i32) -> f32 { + // These divisions and remainders truncate toward zero, including for + // negative coordinates. They are not block/chunk floor conversions. + let center_x = x / 2; + let center_z = z / 2; + let local_x = x % 2; + let local_z = z % 2; + let mut height = -100.0; + for offset_x in -12_i32..=12 { + for offset_z in -12_i32..=12 { + let island_x = i64::from(center_x.wrapping_add(offset_x)); + let island_z = i64::from(center_z.wrapping_add(offset_z)); + if island_x * island_x + island_z * island_z <= 4096 + || self.noise.get2(island_x as f64, island_z as f64) >= -0.9 + { + continue; + } + let scale = ((island_x as f32).abs() * 3439.0 + (island_z as f32).abs() * 147.0) + % 13.0 + + 9.0; + let dx = (local_x - offset_x * 2) as f32; + let dz = (local_z - offset_z * 2) as f32; + let candidate = 100.0 - ((dx * dx + dz * dz) as f64).sqrt() as f32 * scale; + let candidate = super::arithmetic::java_min( + super::arithmetic::java_max(candidate, -100.0), + 80.0, + ); + height = super::arithmetic::java_max(height, candidate); + } + } + height + } + fn density(&self, x: i32, z: i32) -> f32 { + (self.height(x / 8, z / 8) - 8.0) / 128.0 + } +} +impl DensitySampler for EndIslandSampler { + fn sample_value(&self, _: &mut SamplerContext, position: [i32; 3]) -> Result<f32, SampleError> { + Ok(self.density(position[0], position[2])) + } + fn sample_volume( + &self, + _: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_buffer(buffer, volume)?; + let [sx, sy, sz] = volume.sizes(); + for z in 0..sz { + let block_z = volume.block(Axis::Z, z).unwrap(); + for x in 0..sx { + let value = self.density(volume.block(Axis::X, x).unwrap(), block_z); + let start = (x + z * sx) * sy; + buffer[start..start + sy].fill(value); + } + } + Ok(()) + } +} diff --git a/crates/horizon-core/src/density/graph/compiler.rs b/crates/horizon-core/src/density/graph/compiler.rs new file mode 100644 index 000000000..53d8fe2eb --- /dev/null +++ b/crates/horizon-core/src/density/graph/compiler.rs @@ -0,0 +1,498 @@ +use super::*; + +/// A compiler and cache-ID namespace for one immutable set of density inputs. +/// Share resulting samplers across workers, with a separate SamplerContext per +/// worker. Context cache cells must not be reused across compiler namespaces. +#[derive(Debug)] +pub struct DensityCompiler { + graph: DensityGraph, + samplers: HashMap<FunctionId, Arc<dyn DensitySampler>>, + prepared: HashMap<FunctionId, FunctionId>, + next_cache: usize, + context: Option<seeded::SeededContext>, +} +impl DensityCompiler { + pub fn new(graph: DensityGraph) -> Self { + Self { + graph, + samplers: HashMap::new(), + prepared: HashMap::new(), + next_cache: 0, + context: None, + } + } + pub fn new_seeded(graph: DensityGraph, seed: i64, use_legacy_random: bool) -> Self { + let mut compiler = Self::new(graph); + compiler.context = Some(seeded::SeededContext::new(seed, use_legacy_random)); + compiler + } + pub fn graph(&self) -> &DensityGraph { + &self.graph + } + pub fn graph_mut(&mut self) -> &mut DensityGraph { + &mut self.graph + } + pub fn cache_count(&self) -> usize { + self.next_cache + } + /// Resolve a registered noise using this compiler's fixed world seed. + /// Ordinary names reuse their sampler; Nether biome compatibility names + /// create a fresh sampler from their dedicated legacy seed on each call. + pub fn get_noise_sampler(&self, noise: NoiseId) -> Result<Arc<dyn Noise>, CompileError> { + self.context + .as_ref() + .ok_or(CompileError::MissingSeededContext)? + .noise(&self.graph, noise) + } + pub fn get_sampler(&mut self, id: FunctionId) -> Result<Arc<dyn DensitySampler>, CompileError> { + if let Some(sampler) = self.samplers.get(&id) { + return Ok(sampler.clone()); + } + let optimized = self.optimize(id)?; + let sampler = self.compile_raw(optimized)?; + self.samplers.insert(id, sampler.clone()); + Ok(sampler) + } + fn rewrite_children( + &mut self, + id: FunctionId, + mut rewrite: impl FnMut(&mut Self, FunctionId) -> Result<FunctionId, CompileError>, + ) -> Result<FunctionId, CompileError> { + let Definition::Node(mut node) = self.graph.entry(id)?.definition.clone() else { + return Ok(id); + }; + if let GraphNode::Reference { input, .. } = node { + let rewritten = rewrite(self, input)?; + return Ok(if rewritten == input { id } else { rewritten }); + } + for child in node.children_mut() { + *child = rewrite(self, *child)?; + } + self.graph.insert(node) + } + fn optimize(&mut self, id: FunctionId) -> Result<FunctionId, CompileError> { + let prepared = self.prepare(id)?; + self.slice_uniform_axes(prepared, 7) + } + fn prepare(&mut self, mut id: FunctionId) -> Result<FunctionId, CompileError> { + // Vanilla INLINE_REFERENCE unwraps one holder before detecting caches. + // Nested holders still follow their own rewriteChildren identity rule. + if let Definition::Node(GraphNode::Reference { input, .. }) = + self.graph.entry(id)?.definition + { + id = input; + } + if let Definition::Node(GraphNode::Cache(input)) = self.graph.entry(id)?.definition.clone() + { + if let Some(prepared) = self.prepared.get(&input) { + return Ok(*prepared); + } + let cache_id = self.next_cache; + self.next_cache += 1; + let optimized = self.optimize(input)?; + let sampler = self.compile_raw(optimized)?; + let sampler = Arc::new(CachingDensitySampler::new(cache_id, sampler)?); + let range = self.graph.range(optimized)?; + let axes = self.graph.domain_axes(optimized)?; + let prepared = self.graph.bind(sampler, range, axes)?; + self.prepared.insert(input, prepared); + return Ok(prepared); + } + self.rewrite_children(id, Self::prepare) + } + fn slice_uniform_axes( + &mut self, + id: FunctionId, + parent_axes: u8, + ) -> Result<FunctionId, CompileError> { + if matches!( + self.graph.entry(id)?.definition, + Definition::Node(GraphNode::Constant(_) | GraphNode::Gradient { .. }) + ) { + return Ok(id); + } + let axes = self.graph.domain_axes(id)?; + let mut result = self.rewrite_children(id, |compiler, child| { + compiler.slice_uniform_axes(child, axes) + })?; + if axes == parent_axes { + return Ok(result); + } + let mut existing = 0; + let mut cursor = result; + while let Definition::Node(GraphNode::Slice { axis, input, .. }) = + self.graph.entry(cursor)?.definition + { + existing |= 1 << axis as u8; + cursor = input; + } + let remove = parent_axes & !axes & !existing; + // X then Z places these slices adjacent for the XZ sampler specialization. + for axis in [Axis::X, Axis::Z, Axis::Y] { + if remove & (1 << axis as u8) != 0 { + result = self.graph.insert(GraphNode::Slice { + axis, + coordinate: 0, + input: result, + })?; + } + } + Ok(result) + } + fn constant(&self, id: FunctionId) -> Option<f32> { + match self.graph.entries[id.0].definition { + Definition::Node(GraphNode::Constant(value)) => Some(value), + _ => None, + } + } + /// Compile exactly the supplied definition, without rewriting. Cache nodes + /// require get_sampler's preparation pass and are rejected here. + pub fn compile_raw(&self, id: FunctionId) -> Result<Arc<dyn DensitySampler>, CompileError> { + let node = match &self.graph.entry(id)?.definition { + Definition::Bound { sampler, .. } => return Ok(sampler.clone()), + Definition::Node(node) => node, + }; + let sampler: Arc<dyn DensitySampler> = match *node { + GraphNode::Constant(value) => Arc::new(ConstantSampler(value)), + GraphNode::Reference { input, .. } => self.compile_raw(input)?, + GraphNode::WorldField(field) => Arc::new(ContextBoundSampler::new(field)), + GraphNode::BlendDensity(input) => Arc::new(BlendDensitySampler { + input: self.compile_raw(input)?, + }), + GraphNode::EndIslands => self + .context + .as_ref() + .ok_or(CompileError::MissingSeededContext)? + .end_islands(), + GraphNode::Noise { + noise, + xz_scale, + y_scale, + shift_x, + shift_y, + shift_z, + } => { + let noise = self + .context + .as_ref() + .ok_or(CompileError::MissingSeededContext)? + .noise(&self.graph, noise)?; + let zero = |id: FunctionId| matches!(self.graph.entries[id.0].definition, Definition::Node(GraphNode::Constant(value)) if value.to_bits() == 0); + if zero(shift_x) && zero(shift_y) && zero(shift_z) { + Arc::new(NoiseSampler { + noise, + xz_scale, + y_scale, + }) + } else { + // Compilation order differs from the XYZ sampler's sampling + // order: vanilla compiles X, then Z, then optional Y. + let x = self.compile_raw(shift_x)?; + let z = self.compile_raw(shift_z)?; + let y = if zero(shift_y) { + None + } else { + Some(self.compile_raw(shift_y)?) + }; + Arc::new(ShiftedNoiseSampler { + source: NoiseSampler { + noise, + xz_scale, + y_scale, + }, + shift_x: x, + shift_y: y, + shift_z: z, + }) + } + } + GraphNode::OffsetNoise { noise, kind } => compile_shift_noise( + self.context + .as_ref() + .ok_or(CompileError::MissingSeededContext)? + .noise(&self.graph, noise)?, + kind, + ), + GraphNode::BlendedNoise(definition) => self + .context + .as_ref() + .ok_or(CompileError::MissingSeededContext)? + .blended(definition)?, + GraphNode::Spline(ref spline) => { + let mut ids = HashMap::new(); + let mut coordinates = Vec::new(); + let compiled = spline.try_map_coordinates(&mut |id| { + if let Some(index) = ids.get(&id) { + return Ok::<usize, CompileError>(*index); + } + let sampler = self.compile_raw(id)?; + // Vanilla validates each unique coordinate range immediately + // after compiling it, even if sampling never selects it. + self.graph.range(id)?; + let index = coordinates.len(); + coordinates.push(sampler); + ids.insert(id, index); + Ok(index) + })?; + Arc::new(SplineSampler::new(&compiled, &coordinates)?) + } + GraphNode::DistanceToPoint { point, metric } => { + Arc::new(DistanceToPointSampler { point, metric }) + } + GraphNode::IntervalSelect { + input, + ref thresholds, + ref branches, + } => { + let input = self.compile_raw(input)?; + let branches = branches + .iter() + .map(|id| self.compile_raw(*id)) + .collect::<Result<Vec<_>, _>>()?; + Arc::new( + IntervalSelectSampler::new(input, thresholds.to_vec(), branches) + .map_err(|_| CompileError::InvalidIntervals)?, + ) + } + GraphNode::Gradient { + axis, + tiling, + from, + to, + low, + high, + } => Arc::new(GradientSampler::new(axis, tiling, from, to, low, high)), + GraphNode::Unary { kind, input } => Arc::new(UnarySampler { + input: self.compile_raw(input)?, + operation: kind.operation(), + }), + GraphNode::Round { + mode, + input, + multiple, + } => { + let input = self.compile_raw(input)?; + let multiple = if self.constant(multiple) == Some(1.0) { + None + } else { + Some(self.compile_raw(multiple)?) + }; + Arc::new(RoundSampler { + mode, + input, + multiple, + }) + } + GraphNode::Power { base, exponent } => { + // Both children compile before literal selection, even when one + // compiled child will be discarded by the specialization. + let compiled_base = self.compile_raw(base)?; + let compiled_exponent = self.compile_raw(exponent)?; + if let Some(value) = self.constant(base) { + Arc::new(UnarySampler { + input: compiled_exponent, + operation: UnaryOp::PowerBase(value as f64), + }) + } else if let Some(value) = self.constant(exponent) { + compile_constant_exponent(compiled_base, value) + } else { + Arc::new(PowerSampler { + base: compiled_base, + exponent: compiled_exponent, + }) + } + } + GraphNode::Binary { kind, left, right } => { + return self.compile_binary(kind, left, right); + } + GraphNode::Clamp { input, min, max } => Arc::new(UnarySampler { + input: self.compile_raw(input)?, + operation: UnaryOp::Clamp { min, max }, + }), + GraphNode::Choice { + input, + min, + max, + inside, + outside, + } => { + let input = self.compile_raw(input)?; + if let (Some(inside), Some(outside)) = + (self.constant(inside), self.constant(outside)) + { + Arc::new(UnarySampler { + input, + operation: UnaryOp::ConstantRangeChoice { + min_inclusive: min, + max_exclusive: max, + inside, + outside, + }, + }) + } else { + Arc::new(RangeChoiceSampler { + input, + min_inclusive: min, + max_exclusive: max, + when_in_range: self.compile_raw(inside)?, + when_out_of_range: self.compile_raw(outside)?, + }) + } + } + GraphNode::Lerp { + alpha, + first, + second, + } => { + let alpha = self.compile_raw(alpha)?; + let first_sampler = self.compile_raw(first)?; + let second_sampler = self.compile_raw(second)?; + let (first, second) = if let Some(value) = self.constant(first) { + ( + DensityValue::Constant(value), + DensityValue::Sampler(second_sampler), + ) + } else if let Some(value) = self.constant(second) { + ( + DensityValue::Sampler(first_sampler), + DensityValue::Constant(value), + ) + } else { + ( + DensityValue::Sampler(first_sampler), + DensityValue::Sampler(second_sampler), + ) + }; + Arc::new(LerpSampler { + alpha, + first, + second, + }) + } + GraphNode::Slice { + axis, + coordinate, + input, + } => { + let mut axes = match axis { + Axis::X => SliceAxes::X(coordinate), + Axis::Y => SliceAxes::Y(coordinate), + Axis::Z => SliceAxes::Z(coordinate), + }; + let mut child = input; + if let Definition::Node(GraphNode::Slice { + axis: inner_axis, + coordinate: inner_coordinate, + input: inner, + }) = self.graph.entry(input)?.definition + { + if axis == Axis::X && inner_axis == Axis::Z { + axes = SliceAxes::Xz { + x: coordinate, + z: inner_coordinate, + }; + child = inner; + } else if axis == Axis::Z && inner_axis == Axis::X { + axes = SliceAxes::Xz { + x: inner_coordinate, + z: coordinate, + }; + child = inner; + } + } + Arc::new(SliceSampler { + axes, + input: self.compile_raw(child)?, + }) + } + GraphNode::Cache(_) => return Err(CompileError::UnpreparedCache), + GraphNode::Interpolated { input, xz, y } => { + Arc::new(InterpolatedSampler::new(self.compile_raw(input)?, xz, y)?) + } + GraphNode::Surface { + density, + upper, + lower, + height, + } => Arc::new(compile_surface_search( + self.compile_raw(density)?, + self.compile_raw(upper)?, + lower, + height, + )?), + }; + Ok(sampler) + } + fn compile_binary( + &self, + kind: GraphBinary, + left_id: FunctionId, + right_id: FunctionId, + ) -> Result<Arc<dyn DensitySampler>, CompileError> { + let left = self.compile_raw(left_id)?; + let right = self.compile_raw(right_id)?; + let unary = |input, operation| { + Arc::new(UnarySampler { input, operation }) as Arc<dyn DensitySampler> + }; + let bounds = if matches!(kind, GraphBinary::Minimum | GraphBinary::Maximum) { + let a = self.graph.range(left_id)?; + let b = self.graph.range(right_id)?; + if (kind == GraphBinary::Minimum && a.max() < b.min()) + || (kind == GraphBinary::Maximum && a.min() > b.max()) + { + return Ok(left); + } + if (kind == GraphBinary::Minimum && b.max() < a.min()) + || (kind == GraphBinary::Maximum && b.min() > a.max()) + { + return Ok(right); + } + Some(b) + } else { + None + }; + if let Some(value) = self.constant(left_id) { + return Ok(unary( + right, + match kind { + GraphBinary::Add => UnaryOp::Add(value), + GraphBinary::Subtract => UnaryOp::SubtractFrom(value), + GraphBinary::Multiply => UnaryOp::Multiply(value), + GraphBinary::Divide => UnaryOp::DivideInto(value), + GraphBinary::Minimum => UnaryOp::Minimum(value), + GraphBinary::Maximum => UnaryOp::Maximum(value), + }, + )); + } + if let Some(value) = self.constant(right_id) { + return Ok(unary( + left, + match kind { + GraphBinary::Add => UnaryOp::Add(value), + GraphBinary::Subtract => UnaryOp::Add(-value), + GraphBinary::Multiply => UnaryOp::Multiply(value), + GraphBinary::Divide => UnaryOp::Multiply(1.0 / value), + GraphBinary::Minimum => UnaryOp::Minimum(value), + GraphBinary::Maximum => UnaryOp::Maximum(value), + }, + )); + } + let operation = match kind { + GraphBinary::Add => BinaryOp::Add, + GraphBinary::Subtract => BinaryOp::Subtract, + GraphBinary::Multiply => BinaryOp::Multiply, + GraphBinary::Divide => BinaryOp::Divide, + GraphBinary::Minimum => BinaryOp::Minimum { + right_min: bounds.unwrap().min(), + }, + GraphBinary::Maximum => BinaryOp::Maximum { + right_max: bounds.unwrap().max(), + }, + }; + Ok(Arc::new(BinarySampler { + left, + right, + operation, + })) + } +} diff --git a/crates/horizon-core/src/density/graph/mod.rs b/crates/horizon-core/src/density/graph/mod.rs new file mode 100644 index 000000000..8eefe2d1d --- /dev/null +++ b/crates/horizon-core/src/density/graph/mod.rs @@ -0,0 +1,712 @@ +//! Immutable density definitions and the first integrated compiler operations. +//! Seeded noise registration is supported; serialized codecs and remaining +//! function kinds are pending. +use super::*; +use std::collections::HashMap; +mod compiler; +mod seeded; +#[cfg(test)] +mod tests; +pub use compiler::DensityCompiler; + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub struct FunctionId(usize); +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub struct NoiseId(usize); +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub struct HolderId(usize); + +#[derive(Clone, Copy, Debug)] +pub enum GraphUnary { + Abs, + Square, + Cube, + HalfNegative, + QuarterNegative, + Reciprocal, + Negate, + Squeeze, + Sign, + Log, + Sqrt, +} +impl GraphUnary { + fn operation(self) -> UnaryOp { + match self { + Self::Abs => UnaryOp::Abs, + Self::Square => UnaryOp::Square, + Self::Cube => UnaryOp::Cube, + Self::HalfNegative => UnaryOp::LeakyRelu(0.5), + Self::QuarterNegative => UnaryOp::LeakyRelu(0.25), + Self::Reciprocal => UnaryOp::Reciprocal, + Self::Negate => UnaryOp::Negate, + Self::Squeeze => UnaryOp::Squeeze, + Self::Sign => UnaryOp::Sign, + Self::Log => UnaryOp::Log, + Self::Sqrt => UnaryOp::Sqrt, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum GraphBinary { + Add, + Subtract, + Multiply, + Divide, + Minimum, + Maximum, +} + +/// References belong to the graph that creates them. New nodes may refer only +/// to existing immutable nodes, keeping the definition graph acyclic. +#[derive(Clone, Debug)] +pub enum GraphNode { + Constant(f32), + Spline(CubicSpline<FunctionId>), + Noise { + noise: NoiseId, + xz_scale: f64, + y_scale: f64, + shift_x: FunctionId, + shift_y: FunctionId, + shift_z: FunctionId, + }, + OffsetNoise { + noise: NoiseId, + kind: ShiftNoiseKind, + }, + BlendedNoise(BlendedNoise), + EndIslands, + WorldField(WorldField), + BlendDensity(FunctionId), + /// A direct holder compares by value; a registry holder by identity. + Reference { + input: FunctionId, + holder: Option<HolderId>, + }, + Gradient { + axis: Axis, + tiling: TilingMode, + from: i32, + to: i32, + low: f32, + high: f32, + }, + Unary { + kind: GraphUnary, + input: FunctionId, + }, + Binary { + kind: GraphBinary, + left: FunctionId, + right: FunctionId, + }, + Round { + mode: RoundMode, + input: FunctionId, + multiple: FunctionId, + }, + Power { + base: FunctionId, + exponent: FunctionId, + }, + Clamp { + input: FunctionId, + min: f32, + max: f32, + }, + Choice { + input: FunctionId, + min: f32, + max: f32, + inside: FunctionId, + outside: FunctionId, + }, + Lerp { + alpha: FunctionId, + first: FunctionId, + second: FunctionId, + }, + Slice { + axis: Axis, + coordinate: i32, + input: FunctionId, + }, + Cache(FunctionId), + Interpolated { + input: FunctionId, + xz: i32, + y: i32, + }, + Surface { + density: FunctionId, + upper: FunctionId, + lower: i32, + height: i32, + }, + IntervalSelect { + input: FunctionId, + thresholds: Arc<[f32]>, + branches: Vec<FunctionId>, + }, + DistanceToPoint { + point: [i32; 3], + metric: DistanceMetric, + }, +} +impl GraphNode { + fn children_mut(&mut self) -> Vec<&mut FunctionId> { + match self { + Self::Spline(spline) => spline.coordinates_mut(), + Self::Constant(_) + | Self::Gradient { .. } + | Self::DistanceToPoint { .. } + | Self::OffsetNoise { .. } + | Self::BlendedNoise(_) + | Self::EndIslands + | Self::WorldField(_) => vec![], + Self::Noise { + shift_x, + shift_y, + shift_z, + .. + } => vec![shift_x, shift_y, shift_z], + Self::Reference { input, .. } + | Self::Unary { input, .. } + | Self::Clamp { input, .. } + | Self::Slice { input, .. } + | Self::Cache(input) + | Self::BlendDensity(input) + | Self::Interpolated { input, .. } => vec![input], + Self::Binary { left, right, .. } => vec![left, right], + Self::Round { + input, multiple, .. + } => vec![input, multiple], + Self::Power { base, exponent } => vec![base, exponent], + Self::Choice { + input, + inside, + outside, + .. + } => vec![input, inside, outside], + Self::Lerp { + alpha, + first, + second, + } => vec![alpha, first, second], + Self::Surface { density, upper, .. } => vec![density, upper], + Self::IntervalSelect { + input, branches, .. + } => std::iter::once(input).chain(branches.iter_mut()).collect(), + } + } + fn key(&self) -> Vec<u64> { + let f = |v: f32| u64::from(if v.is_nan() { 0x7fc0_0000 } else { v.to_bits() }); + let i = |v: i32| u64::from(v as u32); + let d = |v: f64| { + if v.is_nan() { + 0x7ff8_0000_0000_0000 + } else { + v.to_bits() + } + }; + let id = |v: FunctionId| v.0 as u64; + match *self { + Self::Reference { input, holder } => match holder { + Some(holder) => vec![22, 1, holder.0 as u64], + None => vec![22, 0, id(input)], + }, + Self::EndIslands => vec![17], + Self::WorldField(field) => vec![20, field as u64], + Self::BlendDensity(input) => vec![21, id(input)], + Self::Power { base, exponent } => vec![19, id(base), id(exponent)], + Self::Round { + mode, + input, + multiple, + } => vec![18, mode as u64, id(input), id(multiple)], + Self::Noise { + noise, + xz_scale, + y_scale, + shift_x, + shift_y, + shift_z, + } => vec![ + 14, + noise.0 as u64, + d(xz_scale), + d(y_scale), + id(shift_x), + id(shift_y), + id(shift_z), + ], + Self::OffsetNoise { noise, kind } => vec![15, noise.0 as u64, kind as u64], + Self::BlendedNoise(v) => vec![ + 16, + d(v.xz_scale), + d(v.y_scale), + d(v.xz_factor), + d(v.y_factor), + d(v.smear_scale_multiplier), + ], + Self::Spline(ref spline) => { + fn append(spline: &CubicSpline<FunctionId>, key: &mut Vec<u64>) { + let bits = + |v: f32| u64::from(if v.is_nan() { 0x7fc0_0000 } else { v.to_bits() }); + match spline { + CubicSpline::Constant(value) => key.extend([0, bits(*value)]), + CubicSpline::Multipoint(node) => { + key.extend([1, node.coordinate.0 as u64, node.points.len() as u64]); + for point in &node.points { + key.extend([bits(point.location), bits(point.derivative)]); + append(&point.value, key); + } + } + } + } + let mut key = vec![13]; + append(spline, &mut key); + key + } + Self::Constant(v) => vec![0, f(v)], + Self::Gradient { + axis, + tiling, + from, + to, + low, + high, + } => vec![ + 1, + axis as u64, + tiling as u64, + i(from), + i(to), + f(low), + f(high), + ], + Self::Unary { kind, input } => vec![2, kind as u64, id(input)], + Self::Binary { kind, left, right } => vec![3, kind as u64, id(left), id(right)], + Self::Clamp { input, min, max } => vec![4, id(input), f(min), f(max)], + Self::Choice { + input, + min, + max, + inside, + outside, + } => vec![5, id(input), f(min), f(max), id(inside), id(outside)], + Self::Lerp { + alpha, + first, + second, + } => vec![6, id(alpha), id(first), id(second)], + Self::Slice { + axis, + coordinate, + input, + } => vec![7, axis as u64, i(coordinate), id(input)], + Self::Cache(input) => vec![8, id(input)], + Self::Interpolated { input, xz, y } => vec![9, id(input), i(xz), i(y)], + Self::Surface { + density, + upper, + lower, + height, + } => vec![10, id(density), id(upper), i(lower), i(height)], + Self::IntervalSelect { + input, + ref thresholds, + ref branches, + } => { + let mut key = vec![11, id(input), thresholds.len() as u64]; + key.push(if thresholds.iter().any(|v| v.is_nan()) { + Arc::as_ptr(thresholds) as *const f32 as usize as u64 + } else { + 0 + }); + key.extend(thresholds.iter().map(|v| if *v == 0.0 { 0 } else { f(*v) })); + key.extend(branches.iter().copied().map(id)); + key + } + Self::DistanceToPoint { point, metric } => { + vec![12, i(point[0]), i(point[1]), i(point[2]), metric as u64] + } + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CompileError { + UnknownFunction, + NestingTooDeep, + InvalidAxes, + UnpreparedCache, + InvalidIntervals, + UnknownNoise, + DuplicateNoise, + DuplicateFunction, + UnknownHolder, + MissingSeededContext, + PoisonedNoiseCache, + Noise(crate::noise::NoiseBuildError), + Spline(SplineError), + Range(IntervalError), + Sample(SampleError), +} +impl From<IntervalError> for CompileError { + fn from(e: IntervalError) -> Self { + Self::Range(e) + } +} +impl From<SampleError> for CompileError { + fn from(e: SampleError) -> Self { + Self::Sample(e) + } +} +impl From<SplineError> for CompileError { + fn from(e: SplineError) -> Self { + Self::Spline(e) + } +} +impl From<crate::noise::NoiseBuildError> for CompileError { + fn from(e: crate::noise::NoiseBuildError) -> Self { + Self::Noise(e) + } +} +impl std::fmt::Display for CompileError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "density graph compilation failed: {self:?}") + } +} +impl std::error::Error for CompileError {} + +#[derive(Clone, Debug)] +enum Definition { + Node(GraphNode), + Bound { + sampler: Arc<dyn DensitySampler>, + range: Interval, + axes: u8, + }, +} +#[derive(Clone, Debug)] +struct Entry { + definition: Definition, + depth: usize, + equality_id: FunctionId, + hash_variant: bool, +} +#[derive(Clone, Debug, Default)] +pub struct DensityGraph { + entries: Vec<Entry>, + interned: HashMap<(Vec<u64>, bool), FunctionId>, + equal: HashMap<Vec<u64>, FunctionId>, + noises: Vec<seeded::NoiseEntry>, + noise_names: HashMap<String, NoiseId>, + holders: Vec<FunctionId>, + function_names: HashMap<String, FunctionId>, +} +impl DensityGraph { + pub fn new() -> Self { + Self::default() + } + pub fn insert(&mut self, node: GraphNode) -> Result<FunctionId, CompileError> { + if let GraphNode::Reference { + input, + holder: Some(holder), + } = node + { + if self.holders.get(holder.0) != Some(&input) { + return Err(CompileError::UnknownHolder); + } + } + if let GraphNode::Noise { noise, .. } | GraphNode::OffsetNoise { noise, .. } = node { + self.noise_entry(noise)?; + } + if let GraphNode::IntervalSelect { + thresholds, + branches, + .. + } = &node + { + if branches.len() != thresholds.len().saturating_add(1) || branches.len() > 256 { + return Err(CompileError::InvalidIntervals); + } + } + // Fastutil threshold lists compare zeros numerically but hash their + // signed bits. Among equal definitions, the only possible hash delta + // is 0x80000000. Java record/list hashes use odd (31) multipliers, so + // these deltas XOR through children and cancel in pairs. Keep equality + // classes separate from this hash variant to reproduce Java map reuse, + // including equal parents whose differing child hashes cancel. + let mut hash_variant = match &node { + GraphNode::IntervalSelect { thresholds, .. } => { + thresholds + .iter() + .filter(|v| v.to_bits() == 0x8000_0000) + .count() + % 2 + != 0 + } + _ => false, + }; + let mut canonical = node.clone(); + let mut depth = if let GraphNode::Spline(spline) = &node { + fn spline_depth( + spline: &CubicSpline<FunctionId>, + graph: &DensityGraph, + ) -> Result<usize, CompileError> { + Ok(match spline { + CubicSpline::Constant(_) => 0, + CubicSpline::Multipoint(node) => { + let mut depth = graph.entry(node.coordinate)?.depth; + for point in &node.points { + depth = depth.max(spline_depth(&point.value, graph)?); + } + depth + 1 + } + }) + } + spline_depth(spline, self)? + 1 + } else { + 1 + }; + for child in canonical.children_mut() { + let entry = self.entry(*child)?; + depth = depth.max(entry.depth + 1); + // Registry references hash their holder identity, not its value. + if !matches!( + node, + GraphNode::Reference { + holder: Some(_), + .. + } + ) { + hash_variant ^= entry.hash_variant; + } + *child = entry.equality_id; + } + let key = canonical.key(); + if let Some(id) = self.interned.get(&(key.clone(), hash_variant)) { + return Ok(*id); + } + if depth > 256 { + return Err(CompileError::NestingTooDeep); + } + let id = FunctionId(self.entries.len()); + let equality_id = *self.equal.entry(key.clone()).or_insert(id); + self.entries.push(Entry { + definition: Definition::Node(node), + depth, + equality_id, + hash_variant, + }); + self.interned.insert((key, hash_variant), id); + Ok(id) + } + /// Bind a precompiled input with its declared range and axis dependency + /// mask (X=1, Y=2, Z=4). Each binding has distinct function identity. + pub fn bind( + &mut self, + sampler: Arc<dyn DensitySampler>, + range: Interval, + axes: u8, + ) -> Result<FunctionId, CompileError> { + if axes & !7 != 0 { + return Err(CompileError::InvalidAxes); + } + let id = FunctionId(self.entries.len()); + self.entries.push(Entry { + definition: Definition::Bound { + sampler, + range, + axes, + }, + depth: 1, + equality_id: id, + hash_variant: false, + }); + Ok(id) + } + fn entry(&self, id: FunctionId) -> Result<&Entry, CompileError> { + self.entries.get(id.0).ok_or(CompileError::UnknownFunction) + } + /// Register a noise under its canonical namespaced registry identifier. + /// Definitions and names are immutable after registration. + pub fn register_noise( + &mut self, + name: String, + definition: crate::noise::NormalNoise, + ) -> Result<NoiseId, CompileError> { + if self.noise_names.contains_key(&name) { + return Err(CompileError::DuplicateNoise); + } + let id = NoiseId(self.noises.len()); + self.noise_names.insert(name.clone(), id); + self.noises.push(seeded::NoiseEntry { name, definition }); + Ok(id) + } + /// Register an immutable named density value and return its holder wrapper. + /// Names must already be canonical namespaced registry identifiers. + pub fn register_function( + &mut self, + name: String, + input: FunctionId, + ) -> Result<FunctionId, CompileError> { + if self.function_names.contains_key(&name) { + return Err(CompileError::DuplicateFunction); + } + self.entry(input)?; + let holder = HolderId(self.holders.len()); + self.holders.push(input); + let result = self.insert(GraphNode::Reference { + input, + holder: Some(holder), + }); + match result { + Ok(id) => { + self.function_names.insert(name, id); + Ok(id) + } + Err(error) => { + self.holders.pop(); + Err(error) + } + } + } + pub fn function(&self, name: &str) -> Option<FunctionId> { + self.function_names.get(name).copied() + } + fn noise_entry(&self, id: NoiseId) -> Result<&seeded::NoiseEntry, CompileError> { + self.noises.get(id.0).ok_or(CompileError::UnknownNoise) + } + /// Vanilla definition equality, separate from interned identity. Interval + /// threshold lists can compare equal despite having different Java hashes. + pub fn java_equals(&self, left: FunctionId, right: FunctionId) -> Result<bool, CompileError> { + Ok(self.entry(left)?.equality_id == self.entry(right)?.equality_id) + } + pub fn domain_axes(&self, id: FunctionId) -> Result<u8, CompileError> { + let mut node = match &self.entry(id)?.definition { + Definition::Bound { axes, .. } => return Ok(*axes), + Definition::Node(node) => node.clone(), + }; + let mask = match node { + GraphNode::EndIslands => return Ok(5), + GraphNode::WorldField(field) => return Ok(field.domain_axes()), + GraphNode::OffsetNoise { kind, .. } => { + return Ok(if kind == ShiftNoiseKind::Shift { 7 } else { 5 }); + } + GraphNode::BlendedNoise(_) => return Ok(7), + GraphNode::Noise { + xz_scale, y_scale, .. + } => { + let mut axes = if xz_scale == 0.0 { 0 } else { 5 }; + if y_scale != 0.0 { + axes |= 2; + } + for child in node.children_mut() { + axes |= self.domain_axes(*child)?; + } + return Ok(axes); + } + GraphNode::Constant(_) => return Ok(0), + GraphNode::Gradient { axis, .. } => return Ok(1 << axis as u8), + GraphNode::DistanceToPoint { .. } => return Ok(7), + GraphNode::Slice { axis, .. } => !(1 << axis as u8), + GraphNode::Surface { .. } => !2, + _ => 7, + }; + let mut axes = 0; + for child in node.children_mut() { + axes |= self.domain_axes(*child)?; + } + Ok(axes & mask) + } + pub fn range(&self, id: FunctionId) -> Result<Interval, CompileError> { + let node = match &self.entry(id)?.definition { + Definition::Bound { range, .. } => return Ok(*range), + Definition::Node(node) => node, + }; + Ok(match *node { + GraphNode::EndIslands => Interval::new(-0.84375, 0.5625)?, + GraphNode::WorldField(field) => field.range(), + GraphNode::Noise { noise, .. } => { + let [min, max] = self.noise_entry(noise)?.definition.range(); + Interval::new(min, max)? + } + GraphNode::OffsetNoise { noise, .. } => { + let [min, max] = self.noise_entry(noise)?.definition.range(); + Interval::new(min, max)?.multiply_range(Interval::exact(4.0)?) + } + GraphNode::BlendedNoise(definition) => definition.range()?, + GraphNode::Spline(ref spline) => spline.try_range(&mut |id| self.range(id))?, + GraphNode::Constant(v) => Interval::exact(v)?, + GraphNode::Gradient { low, high, .. } => Interval::encapsulating_values(low, high), + GraphNode::DistanceToPoint { .. } => Interval::new(0.0, f32::INFINITY)?, + GraphNode::IntervalSelect { ref branches, .. } => { + let ranges = branches + .iter() + .map(|id| self.range(*id)) + .collect::<Result<Vec<_>, _>>()?; + Interval::encapsulating(&ranges)? + } + GraphNode::Unary { kind, input } => { + let range = self.range(input)?; + match kind { + GraphUnary::Abs => range.abs(), + GraphUnary::Square => range.square(), + GraphUnary::Reciprocal => range.reciprocal(), + GraphUnary::Sign => range.sign(), + GraphUnary::Negate => Interval::exact(0.0)?.subtract_range(range), + GraphUnary::Log => range.log()?, + GraphUnary::Sqrt => range.power(Interval::exact(0.5)?), + _ => range.map_monotonic(|v| kind.operation().apply(v, false))?, + } + } + GraphNode::Binary { kind, left, right } => { + let left = self.range(left)?; + let right = self.range(right)?; + match kind { + GraphBinary::Add => left.add_range(right), + GraphBinary::Subtract => left.subtract_range(right), + GraphBinary::Multiply => left.multiply_range(right), + GraphBinary::Divide => left.divide_range(right), + GraphBinary::Minimum => left.minimum(right), + GraphBinary::Maximum => left.maximum(right), + } + } + GraphNode::Round { + mode, + input, + multiple, + } => { + let multiple = self.range(multiple)?; + self.range(input)? + .divide_range(multiple) + .map_monotonic(|v| mode.integer(v))? + .multiply_range(multiple) + } + GraphNode::Power { base, exponent } => self.range(base)?.power(self.range(exponent)?), + GraphNode::Clamp { input, min, max } => self.range(input)?.clamp(min, max)?, + GraphNode::Choice { + inside, outside, .. + } => Interval::encapsulating(&[self.range(inside)?, self.range(outside)?])?, + GraphNode::Lerp { + alpha, + first, + second, + } => self + .range(alpha)? + .lerp_ranges(self.range(first)?, self.range(second)?), + GraphNode::Slice { input, .. } + | GraphNode::Cache(input) + | GraphNode::BlendDensity(input) + | GraphNode::Reference { input, .. } + | GraphNode::Interpolated { input, .. } => self.range(input)?, + GraphNode::Surface { upper, lower, .. } => Interval::new( + lower as f32, + super::arithmetic::java_max(lower as f32, self.range(upper)?.max()), + )?, + }) + } +} diff --git a/crates/horizon-core/src/density/graph/seeded.rs b/crates/horizon-core/src/density/graph/seeded.rs new file mode 100644 index 000000000..17d66ce0f --- /dev/null +++ b/crates/horizon-core/src/density/graph/seeded.rs @@ -0,0 +1,97 @@ +use super::*; +use crate::{ + noise::NormalNoise, + random::{ + LegacyPositionalRandom, LegacyRandom, PositionalRandom, RandomSource, + XoroshiroPositionalRandom, XoroshiroRandom, + }, +}; +use std::sync::Mutex; + +#[derive(Debug)] +enum Factory { + Legacy(LegacyPositionalRandom), + Xoroshiro(XoroshiroPositionalRandom), +} + +/// The seed-dependent portion of vanilla's RandomState compile context. +#[derive(Debug)] +pub(super) struct SeededContext { + seed: i64, + factory: Factory, + instances: Mutex<HashMap<NoiseId, Arc<dyn Noise>>>, +} +impl SeededContext { + pub(super) fn end_islands(&self) -> Arc<dyn DensitySampler> { + Arc::new(EndIslandSampler::new(self.seed)) + } + pub(super) fn new(seed: i64, legacy: bool) -> Self { + let factory = if legacy { + Factory::Legacy(LegacyRandom::new(seed).fork_positional()) + } else { + Factory::Xoroshiro(XoroshiroRandom::new(seed).fork_positional()) + }; + Self { + seed, + factory, + instances: Mutex::new(HashMap::new()), + } + } + pub(super) fn noise( + &self, + graph: &DensityGraph, + id: NoiseId, + ) -> Result<Arc<dyn Noise>, CompileError> { + let entry = graph.noise_entry(id)?; + // Nether biome compatibility samplers are recreated on every lookup; + // vanilla bypasses its normal named-noise instance map for these keys. + let legacy_offset = match entry.name.as_str() { + "minecraft:nether/temperature" => Some(0), + "minecraft:nether/vegetation" => Some(1), + _ => None, + }; + if let Some(offset) = legacy_offset { + return Ok(Arc::new(entry.definition.create_for_legacy_nether_biome( + &mut LegacyRandom::new(self.seed.wrapping_add(offset)), + )?)); + } + let mut instances = self + .instances + .lock() + .map_err(|_| CompileError::PoisonedNoiseCache)?; + if let Some(noise) = instances.get(&id) { + return Ok(noise.clone()); + } + let noise: Arc<dyn Noise> = match &self.factory { + Factory::Legacy(factory) => Arc::new( + entry + .definition + .create(&mut factory.from_hash_of(&entry.name))?, + ), + Factory::Xoroshiro(factory) => Arc::new( + entry + .definition + .create(&mut factory.from_hash_of(&entry.name))?, + ), + }; + instances.insert(id, noise.clone()); + Ok(noise) + } + pub(super) fn blended( + &self, + definition: BlendedNoise, + ) -> Result<Arc<dyn DensitySampler>, CompileError> { + Ok(match &self.factory { + Factory::Legacy(_) => Arc::new(definition.compile(&mut LegacyRandom::new(self.seed))?), + Factory::Xoroshiro(factory) => { + Arc::new(definition.compile(&mut factory.from_hash_of("minecraft:terrain"))?) + } + }) + } +} + +#[derive(Clone, Debug)] +pub(super) struct NoiseEntry { + pub(super) name: String, + pub(super) definition: NormalNoise, +} diff --git a/crates/horizon-core/src/density/graph/tests.rs b/crates/horizon-core/src/density/graph/tests.rs new file mode 100644 index 000000000..4f3358460 --- /dev/null +++ b/crates/horizon-core/src/density/graph/tests.rs @@ -0,0 +1,552 @@ +use super::*; +use std::sync::Mutex; + +#[test] +fn power_literal_selection_retains_signed_zeros_and_negative_fallback_behavior() { + let signaling_base = UnarySampler { + input: Arc::new(ConstantSampler(0.0)), + operation: UnaryOp::PowerBase(f64::from_bits(0x7ff4_0000_2000_0000)), + }; + assert_eq!( + signaling_base.sample_value(&mut SamplerContext::default(), [0; 3]), + Ok(1.0) + ); + let mut graph = DensityGraph::new(); + let negative_zero = graph.insert(GraphNode::Constant(-0.0)).unwrap(); + let two = graph.insert(GraphNode::Constant(2.0)).unwrap(); + let half = graph.insert(GraphNode::Constant(0.5)).unwrap(); + let minus_four = graph.insert(GraphNode::Constant(-4.0)).unwrap(); + let bound_zero = graph + .bind( + Arc::new(ConstantSampler(-0.0)), + Interval::exact(-0.0).unwrap(), + 7, + ) + .unwrap(); + let bound_two = graph + .bind( + Arc::new(ConstantSampler(2.0)), + Interval::exact(2.0).unwrap(), + 7, + ) + .unwrap(); + let roots = [ + (negative_zero, half), + (bound_zero, half), + (two, minus_four), + (bound_two, minus_four), + ] + .map(|(base, exponent)| graph.insert(GraphNode::Power { base, exponent }).unwrap()); + let cached_half = graph.insert(GraphNode::Cache(half)).unwrap(); + let invalid_raw = graph + .insert(GraphNode::Power { + base: two, + exponent: cached_half, + }) + .unwrap(); + let compiler = DensityCompiler::new(graph); + assert_eq!( + compiler.compile_raw(invalid_raw).unwrap_err(), + CompileError::UnpreparedCache + ); + for (root, expected) in roots.into_iter().zip([0.0_f32, -0.0, 0.0625, 0.0625]) { + let value = compiler + .compile_raw(root) + .unwrap() + .sample_value(&mut SamplerContext::default(), [0; 3]) + .unwrap(); + assert_eq!(value.to_bits(), expected.to_bits()); + } + let sampler = PowerSampler { + base: Arc::new(ConstantSampler(0.0)), + exponent: Arc::new(FailingSampler), + }; + assert_eq!( + sampler.sample_value(&mut SamplerContext::default(), [0; 3]), + Err(SampleError::ZeroGradientPeriod) + ); + let mut output = [17.0]; + let volume = DensityVolume::new([1; 3], [0; 3], [1; 3]).unwrap(); + assert_eq!( + sampler.sample_volume(&mut SamplerContext::default(), &mut output, volume), + Err(SampleError::ZeroGradientPeriod) + ); + assert_eq!(output, [0.0]); +} + +#[test] +fn rounding_specializes_only_literal_one_and_preserves_input_on_multiple_failure() { + let mut graph = DensityGraph::new(); + let input = graph.insert(GraphNode::Constant(0.5)).unwrap(); + let one = graph.insert(GraphNode::Constant(1.0)).unwrap(); + let bound = graph + .bind( + Arc::new(ConstantSampler(1.0)), + Interval::exact(1.0).unwrap(), + 0, + ) + .unwrap(); + let failing = graph + .bind(Arc::new(FailingSampler), Interval::INFINITE, 7) + .unwrap(); + let roots = [one, bound, failing].map(|multiple| { + graph + .insert(GraphNode::Round { + mode: RoundMode::Round, + input, + multiple, + }) + .unwrap() + }); + let compiler = DensityCompiler::new(graph); + let volume = DensityVolume::new([1; 3], [0; 3], [1; 3]).unwrap(); + let mut output = [17.0; 2]; + compiler + .compile_raw(roots[0]) + .unwrap() + .sample_volume(&mut SamplerContext::default(), &mut output, volume) + .unwrap(); + assert_eq!(output, [1.0; 2]); + assert_eq!( + compiler.compile_raw(roots[1]).unwrap().sample_volume( + &mut SamplerContext::default(), + &mut output, + volume + ), + Err(SampleError::ExactBufferSizeRequired) + ); + assert_eq!( + compiler.compile_raw(roots[2]).unwrap().sample_volume( + &mut SamplerContext::default(), + &mut output[..1], + volume + ), + Err(SampleError::ZeroGradientPeriod) + ); + assert_eq!(output[0], 0.5); +} + +#[test] +fn end_islands_use_the_world_seed_independently_of_the_noise_algorithm() { + let mut graph = DensityGraph::new(); + let root = graph.insert(GraphNode::EndIslands).unwrap(); + assert_eq!(graph.domain_axes(root), Ok(5)); + assert_eq!( + graph.range(root).unwrap(), + Interval::new(-0.84375, 0.5625).unwrap() + ); + assert_eq!( + DensityCompiler::new(graph.clone()) + .compile_raw(root) + .unwrap_err(), + CompileError::MissingSeededContext + ); + let volume = DensityVolume::new([3, 4, 2], [-2049, -64, 4096], [17, 8, 31]).unwrap(); + let mut outputs = Vec::new(); + for legacy in [false, true] { + let mut compiler = DensityCompiler::new_seeded(graph.clone(), i64::MIN, legacy); + let sampler = compiler.get_sampler(root).unwrap(); + let mut output = vec![17.0; volume.size() + 1]; + sampler + .sample_volume(&mut SamplerContext::default(), &mut output, volume) + .unwrap(); + for column in output[..volume.size()].chunks_exact(4) { + assert!(column.iter().all(|&value| value == column[0])); + } + assert_eq!(output[volume.size()], 17.0); + outputs.push(output); + } + assert_eq!(outputs[0], outputs[1]); +} + +#[test] +fn registered_noises_share_ordinary_instances_and_recreate_nether_instances() { + let mut builder = crate::noise::NormalNoise::builder(); + builder.set_base_octave(-3).set_octave_count(3).unwrap(); + let definition = builder.build().unwrap(); + let mut graph = DensityGraph::new(); + let ordinary = graph + .register_noise("horizon:sample".to_owned(), definition.clone()) + .unwrap(); + assert_eq!( + graph.register_noise("horizon:sample".to_owned(), definition.clone()), + Err(CompileError::DuplicateNoise) + ); + let nether = graph + .register_noise("minecraft:nether/vegetation".to_owned(), definition) + .unwrap(); + let unseeded = DensityCompiler::new(graph.clone()); + assert_eq!( + unseeded.get_noise_sampler(ordinary).unwrap_err(), + CompileError::MissingSeededContext + ); + for legacy in [false, true] { + let compiler = DensityCompiler::new_seeded(graph.clone(), i64::MAX, legacy); + let a = compiler.get_noise_sampler(ordinary).unwrap(); + let b = compiler.get_noise_sampler(ordinary).unwrap(); + assert!(Arc::ptr_eq(&a, &b)); + let a = compiler.get_noise_sampler(nether).unwrap(); + let b = compiler.get_noise_sampler(nether).unwrap(); + assert!(!Arc::ptr_eq(&a, &b)); + assert_eq!( + a.get3(-17.25, 64.0, 32.5).to_bits(), + b.get3(-17.25, 64.0, 32.5).to_bits() + ); + } +} + +#[test] +fn noise_specialization_requires_literal_positive_zero_shifts() { + let mut graph = DensityGraph::new(); + let noise = graph + .register_noise( + "horizon:empty".to_owned(), + crate::noise::NormalNoise::builder() + .set_octave_count(0) + .unwrap() + .build() + .unwrap(), + ) + .unwrap(); + let zero = graph.insert(GraphNode::Constant(0.0)).unwrap(); + let negative = graph.insert(GraphNode::Constant(-0.0)).unwrap(); + let roots = [zero, negative].map(|shift_x| { + graph + .insert(GraphNode::Noise { + noise, + xz_scale: 1.0, + y_scale: 1.0, + shift_x, + shift_y: zero, + shift_z: zero, + }) + .unwrap() + }); + let compiler = DensityCompiler::new_seeded(graph, 1, false); + let volume = DensityVolume::new([1; 3], [0; 3], [1; 3]).unwrap(); + let mut buffer = [17.0; 2]; + compiler + .compile_raw(roots[0]) + .unwrap() + .sample_volume(&mut SamplerContext::default(), &mut buffer, volume) + .unwrap(); + assert_eq!(buffer, [0.0; 2]); + compiler + .compile_raw(roots[1]) + .unwrap() + .sample_volume(&mut SamplerContext::default(), &mut buffer, volume) + .unwrap(); + assert_eq!(buffer[0].to_bits(), 0); + assert_eq!(buffer[1].to_bits(), (-0.0_f32).to_bits()); +} + +#[test] +fn spline_range_early_return_does_not_skip_coordinate_validation_during_compilation() { + let mut graph = DensityGraph::new(); + let unavailable = graph + .bind(Arc::new(FailingSampler), Interval::NAI, 2) + .unwrap(); + let invalid = graph.insert(GraphNode::Constant(f32::NAN)).unwrap(); + let nested = CubicSpline::multipoint( + invalid, + vec![SplinePoint { + location: 0.0, + value: CubicSpline::Constant(1.0), + derivative: 0.0, + }], + ) + .unwrap(); + let root = graph + .insert(GraphNode::Spline( + CubicSpline::multipoint( + unavailable, + vec![SplinePoint { + location: 0.0, + value: nested, + derivative: 0.0, + }], + ) + .unwrap(), + )) + .unwrap(); + assert_eq!(graph.range(root), Ok(Interval::NAI)); + let compiler = DensityCompiler::new(graph); + assert!(matches!( + compiler.compile_raw(root), + Err(CompileError::Range(_)) + )); +} + +#[test] +fn spline_coordinates_share_bulk_evaluation_after_graph_rewriting() { + let trace = Arc::new(VerticalTrace::default()); + let mut graph = DensityGraph::new(); + let coordinate = graph + .bind(trace.clone(), Interval::new(-1.0, 1.0).unwrap(), 2) + .unwrap(); + let inner = CubicSpline::multipoint( + coordinate, + vec![SplinePoint { + location: 0.0, + value: CubicSpline::Constant(3.0), + derivative: 1.0, + }], + ) + .unwrap(); + let root = graph + .insert(GraphNode::Spline( + CubicSpline::multipoint( + coordinate, + vec![ + SplinePoint { + location: -1.0, + value: inner.clone(), + derivative: 0.0, + }, + SplinePoint { + location: 1.0, + value: inner, + derivative: 0.0, + }, + ], + ) + .unwrap(), + )) + .unwrap(); + let mut compiler = DensityCompiler::new(graph); + let sampler = compiler.get_sampler(root).unwrap(); + let volume = DensityVolume::new([3, 3, 2], [-1; 3], [1; 3]).unwrap(); + let mut output = vec![0.0; volume.size()]; + sampler + .sample_volume(&mut SamplerContext::default(), &mut output, volume) + .unwrap(); + assert_eq!(trace.0.lock().unwrap().len(), 1); + for column in output.chunks_exact(3) { + assert_eq!(column, [2.0, 3.0, 4.0]); + } +} + +#[test] +fn interval_threshold_equality_and_hashing_preserve_distinct_cache_inputs() { + let mut graph = DensityGraph::new(); + let one = graph.insert(GraphNode::Constant(1.0)).unwrap(); + let zero = graph.insert(GraphNode::Constant(0.0)).unwrap(); + let shared_nan: Arc<[f32]> = Arc::from([f32::NAN]); + let mut ids = Vec::new(); + for thresholds in [ + shared_nan.clone(), + shared_nan, + Arc::from([f32::NAN]), + Arc::from([0.0]), + Arc::from([-0.0]), + ] { + ids.push( + graph + .insert(GraphNode::IntervalSelect { + input: one, + thresholds, + branches: vec![zero, one], + }) + .unwrap(), + ); + } + assert_eq!(ids[0], ids[1]); + assert!(!graph.java_equals(ids[0], ids[2]).unwrap()); + assert!(graph.java_equals(ids[3], ids[4]).unwrap()); + assert_ne!(ids[3], ids[4]); + let doubled_positive = graph + .insert(GraphNode::Binary { + kind: GraphBinary::Add, + left: ids[3], + right: ids[3], + }) + .unwrap(); + let doubled_negative = graph + .insert(GraphNode::Binary { + kind: GraphBinary::Add, + left: ids[4], + right: ids[4], + }) + .unwrap(); + assert_eq!(doubled_positive, doubled_negative); + let caches = ids + .into_iter() + .map(|input| graph.insert(GraphNode::Cache(input)).unwrap()) + .collect::<Vec<_>>(); + let mut compiler = DensityCompiler::new(graph); + for cache in caches { + compiler.get_sampler(cache).unwrap(); + } + assert_eq!(compiler.cache_count(), 4); +} + +#[test] +fn structural_identity_preserves_java_float_keys_and_shared_cache_ids() { + let mut graph = DensityGraph::new(); + let positive = graph.insert(GraphNode::Constant(0.0)).unwrap(); + let negative = graph.insert(GraphNode::Constant(-0.0)).unwrap(); + assert_ne!(positive, negative); + let nan = graph.insert(GraphNode::Constant(f32::NAN)).unwrap(); + assert_eq!( + nan, + graph + .insert(GraphNode::Constant(f32::from_bits(0xffa00001))) + .unwrap() + ); + let first = graph.insert(GraphNode::Cache(positive)).unwrap(); + let second = graph.insert(GraphNode::Cache(positive)).unwrap(); + assert_eq!(first, second); + let root = graph + .insert(GraphNode::Binary { + kind: GraphBinary::Add, + left: first, + right: second, + }) + .unwrap(); + let mut compiler = DensityCompiler::new(graph); + assert_eq!( + compiler.compile_raw(first).unwrap_err(), + CompileError::UnpreparedCache + ); + let sampler = compiler.get_sampler(root).unwrap(); + assert_eq!(compiler.cache_count(), 1); + assert!(Arc::ptr_eq(&sampler, &compiler.get_sampler(root).unwrap())); +} + +#[test] +fn failed_parent_preparation_retains_successful_child_and_consumes_new_id_on_retry() { + let mut graph = DensityGraph::new(); + let good = graph.insert(GraphNode::Constant(1.0)).unwrap(); + let child = graph.insert(GraphNode::Cache(good)).unwrap(); + let bad = graph.insert(GraphNode::Constant(f32::NAN)).unwrap(); + let sum = graph + .insert(GraphNode::Binary { + kind: GraphBinary::Add, + left: child, + right: bad, + }) + .unwrap(); + let root = graph.insert(GraphNode::Cache(sum)).unwrap(); + let mut compiler = DensityCompiler::new(graph); + assert!(matches!( + compiler.get_sampler(root), + Err(CompileError::Range(_)) + )); + assert_eq!(compiler.cache_count(), 2); + assert!(matches!( + compiler.get_sampler(root), + Err(CompileError::Range(_)) + )); + assert_eq!(compiler.cache_count(), 3); + let sampler = compiler.get_sampler(child).unwrap(); + assert_eq!(compiler.cache_count(), 3); + assert_eq!( + sampler.sample_value(&mut SamplerContext::default(), [3; 3]), + Ok(1.0) + ); +} + +#[derive(Debug)] +struct FailingSampler; +impl DensitySampler for FailingSampler { + fn sample_value(&self, _: &mut SamplerContext, _: [i32; 3]) -> Result<f32, SampleError> { + Err(SampleError::ZeroGradientPeriod) + } +} + +#[test] +fn min_range_elimination_is_strict_and_does_not_skip_child_compilation() { + let mut graph = DensityGraph::new(); + let one = graph.insert(GraphNode::Constant(1.0)).unwrap(); + let disjoint = graph + .bind( + Arc::new(FailingSampler), + Interval::new(2.0, 3.0).unwrap(), + 7, + ) + .unwrap(); + let touching = graph + .bind( + Arc::new(FailingSampler), + Interval::new(1.0, 3.0).unwrap(), + 7, + ) + .unwrap(); + let cached = graph.insert(GraphNode::Cache(disjoint)).unwrap(); + let roots: Vec<_> = [disjoint, touching, cached] + .into_iter() + .map(|right| { + graph + .insert(GraphNode::Binary { + kind: GraphBinary::Minimum, + left: one, + right, + }) + .unwrap() + }) + .collect(); + let compiler = DensityCompiler::new(graph); + let volume = DensityVolume::new([1; 3], [0; 3], [1; 3]).unwrap(); + let mut context = SamplerContext::default(); + let mut output = [17.0]; + compiler + .compile_raw(roots[0]) + .unwrap() + .sample_volume(&mut context, &mut output, volume) + .unwrap(); + assert_eq!(output, [1.0]); + assert_eq!( + compiler + .compile_raw(roots[1]) + .unwrap() + .sample_volume(&mut context, &mut output, volume), + Err(SampleError::ZeroGradientPeriod) + ); + assert_eq!( + compiler.compile_raw(roots[2]).unwrap_err(), + CompileError::UnpreparedCache + ); +} + +#[derive(Debug, Default)] +struct VerticalTrace(Mutex<Vec<DensityVolume>>); +impl DensitySampler for VerticalTrace { + fn sample_value(&self, _: &mut SamplerContext, position: [i32; 3]) -> Result<f32, SampleError> { + Ok(position[1] as f32) + } + fn sample_volume( + &self, + _: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + self.0.lock().unwrap().push(volume); + visit(volume, |index, position| { + buffer[index] = position[1] as f32; + Ok(()) + }) + } +} + +#[test] +fn compiler_reduces_uniform_axes_and_preserves_strided_vertical_samples() { + let trace = Arc::new(VerticalTrace::default()); + let mut graph = DensityGraph::new(); + let root = graph.bind(trace.clone(), Interval::INFINITE, 2).unwrap(); + let mut compiler = DensityCompiler::new(graph); + let sampler = compiler.get_sampler(root).unwrap(); + let volume = DensityVolume::new([3, 4, 2], [-9, -7, 11], [2, 3, 5]).unwrap(); + let mut output = vec![17.0; volume.size() + 1]; + sampler + .sample_volume(&mut SamplerContext::default(), &mut output, volume) + .unwrap(); + assert_eq!( + *trace.0.lock().unwrap(), + vec![DensityVolume::new([1, 4, 1], [0, -7, 0], [2, 3, 5]).unwrap()] + ); + for column in output[..volume.size()].chunks_exact(4) { + assert_eq!(column, [-7.0, -4.0, -1.0, 2.0]); + } + assert_eq!(output[volume.size()], 17.0); + assert_eq!(compiler.graph().domain_axes(root), Ok(2)); +} diff --git a/crates/horizon-core/src/density/interpolation.rs b/crates/horizon-core/src/density/interpolation.rs new file mode 100644 index 000000000..25a5e826b --- /dev/null +++ b/crates/horizon-core/src/density/interpolation.rs @@ -0,0 +1,207 @@ +use super::*; + +/// Interpolation over a coarse density grid. Scalar queries and volume queries +/// retain vanilla's distinct floating-point paths and child bulk calls. +#[derive(Clone, Debug)] +pub struct InterpolatedSampler { + input: Arc<dyn DensitySampler>, + cell_size: [i32; 3], + inverse: [f32; 3], +} +impl InterpolatedSampler { + pub fn new( + input: Arc<dyn DensitySampler>, + cell_size_xz: i32, + cell_size_y: i32, + ) -> Result<Self, SampleError> { + if cell_size_xz <= 0 || cell_size_y <= 0 { + return Err(DensityError::NonpositiveSteps.into()); + } + let cell_size = [cell_size_xz, cell_size_y, cell_size_xz]; + Ok(Self { + input, + cell_size, + inverse: cell_size.map(|size| 1.0 / size as f32), + }) + } + + fn sample_block_volume( + &self, + context: &mut SamplerContext, + output: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + let minimum = volume.minimum(); + let maximum = volume.maximum(); + let first: [i32; 3] = std::array::from_fn(|i| minimum[i].div_euclid(self.cell_size[i])); + let counts: [i32; 3] = std::array::from_fn(|i| { + maximum[i] + .div_euclid(self.cell_size[i]) + .wrapping_sub(first[i]) + .wrapping_add(1) + }); + let sizes = std::array::from_fn(|i| { + counts[i].wrapping_add(i32::from(maximum[i].rem_euclid(self.cell_size[i]) != 0)) + }); + let coarse = DensityVolume::new( + sizes, + std::array::from_fn(|i| first[i].wrapping_mul(self.cell_size[i])), + self.cell_size, + )?; + context.with_buffer(coarse.size(), |context, samples| { + self.input.sample_volume(context, samples, coarse)?; + for z in 0..counts[2] { + for x in 0..counts[0] { + for y in 0..counts[1] { + let cell = [x as usize, y as usize, z as usize]; + let corners = std::array::from_fn(|corner| { + let position = std::array::from_fn(|axis| { + (cell[axis] + ((corner >> axis) & 1)).min(coarse.sizes()[axis] - 1) + }); + samples[coarse.index(position).unwrap()] + }); + self.fill_cell(output, volume, coarse, cell, corners)?; + } + } + } + Ok(()) + }) + } + + fn fill_cell( + &self, + output: &mut [f32], + volume: DensityVolume, + coarse: DensityVolume, + cell: [usize; 3], + corners: [f32; 8], + ) -> Result<(), SampleError> { + let offset: [i32; 3] = std::array::from_fn(|i| { + coarse.minimum()[i] + .wrapping_add((cell[i] as i32).wrapping_mul(self.cell_size[i])) + .wrapping_sub(volume.minimum()[i]) + }); + let start = offset.map(|offset| offset.wrapping_neg().max(0)); + let end: [i32; 3] = std::array::from_fn(|i| { + self.cell_size[i] + .min((volume.sizes()[i] as i32).wrapping_sub(offset[i])) + .wrapping_sub(1) + }); + for z in start[2]..=end[2] { + let alpha_z = z as f32 * self.inverse[2]; + let z00 = lerp(alpha_z, corners[0], corners[4]); + let z01 = lerp(alpha_z, corners[2], corners[6]); + let z10 = lerp(alpha_z, corners[1], corners[5]); + let z11 = lerp(alpha_z, corners[3], corners[7]); + for x in start[0]..=end[0] { + let alpha_x = x as f32 * self.inverse[0]; + let low = lerp(alpha_x, z00, z10); + let high = lerp(alpha_x, z01, z11); + let increment = (high - low) * self.inverse[1]; + let mut value = low + increment * start[1] as f32; + if end[1] < start[1] { + continue; + } + let index = volume + .index([ + offset[0].wrapping_add(x) as usize, + offset[1].wrapping_add(start[1]) as usize, + offset[2].wrapping_add(z) as usize, + ]) + .ok_or(DensityError::VolumeTooLarge)?; + let length = (end[1] - start[1] + 1) as usize; + let end_index = index + .checked_add(length) + .ok_or(DensityError::VolumeTooLarge)?; + let column = output + .get_mut(index..end_index) + .ok_or(DensityError::VolumeTooLarge)?; + for output in column { + *output = value; + // Repeated addition is observable: multiplication by the + // current Y offset does not have the same rounding. + value += increment; + } + } + } + Ok(()) + } +} + +fn lerp(alpha: f32, first: f32, second: f32) -> f32 { + first + alpha * (second - first) +} +impl DensitySampler for InterpolatedSampler { + fn sample_value( + &self, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + let remainder: [i32; 3] = + std::array::from_fn(|i| position[i].rem_euclid(self.cell_size[i])); + if remainder == [0; 3] { + return self.input.sample_value(context, position); + } + let volume = DensityVolume::new( + [2; 3], + std::array::from_fn(|i| position[i].wrapping_sub(remainder[i])), + self.cell_size, + )?; + context.with_buffer(8, |context, corners| { + self.input.sample_volume(context, corners, volume)?; + let alpha: [f32; 3] = + std::array::from_fn(|i| remainder[i] as f32 / self.cell_size[i] as f32); + // Samples use Y-innermost storage; interpolation blends X, Y, Z. + let xy0 = lerp( + alpha[1], + lerp(alpha[0], corners[0], corners[2]), + lerp(alpha[0], corners[1], corners[3]), + ); + let xy1 = lerp( + alpha[1], + lerp(alpha[0], corners[4], corners[6]), + lerp(alpha[0], corners[5], corners[7]), + ); + Ok(lerp(alpha[2], xy0, xy1)) + }) + } + fn sample_volume( + &self, + context: &mut SamplerContext, + output: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_buffer(output, volume)?; + if (0..3).all(|i| { + (volume.steps()[i] == self.cell_size[i] || volume.sizes()[i] == 1) + && volume.minimum()[i].rem_euclid(self.cell_size[i]) == 0 + }) { + return self.input.sample_volume(context, output, volume); + } + if volume.steps() == [1; 3] { + return self.sample_block_volume(context, output, volume); + } + // The reference evaluates the complete block-resolution bounding volume + // before selecting strided samples, including trailing unsampled blocks. + let dense = DensityVolume::new( + std::array::from_fn(|i| (volume.sizes()[i] as i32).wrapping_mul(volume.steps()[i])), + volume.minimum(), + [1; 3], + )?; + context.with_buffer(dense.size(), |context, samples| { + self.sample_block_volume(context, samples, dense)?; + let [sx, sy, sz] = volume.sizes(); + for z in 0..sz { + for x in 0..sx { + for y in 0..sy { + let source = dense.index(std::array::from_fn(|i| { + [x, y, z][i] * volume.steps()[i] as usize + })); + output[(x + z * sx) * sy + y] = samples[source.unwrap()]; + } + } + } + Ok(()) + }) + } +} diff --git a/crates/horizon-core/src/density/interval.rs b/crates/horizon-core/src/density/interval.rs new file mode 100644 index 000000000..0375dba6d --- /dev/null +++ b/crates/horizon-core/src/density/interval.rs @@ -0,0 +1,412 @@ +//! Selected vanilla interval operations used for density graph range analysis. +use super::arithmetic::{java_max, java_min}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IntervalError { + NanBound, + InvertedBounds, + EmptyInput, + NanMappedBound, +} +impl std::fmt::Display for IntervalError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str(match self { + Self::NanBound => "interval endpoint is NaN", + Self::InvertedBounds => "interval endpoints are reversed", + Self::EmptyInput => "at least one interval is required", + Self::NanMappedBound => "monotonic range operator produced NaN", + }) + } +} +impl std::error::Error for IntervalError {} + +#[derive(Clone, Copy, Debug)] +pub struct Interval { + min: f32, + max: f32, +} +impl PartialEq for Interval { + fn eq(&self, other: &Self) -> bool { + (self.is_nai() && other.is_nai()) || (self.min == other.min && self.max == other.max) + } +} +impl Eq for Interval {} +impl Interval { + pub const NAI: Self = Self { + min: f32::NAN, + max: f32::NAN, + }; + pub const INFINITE: Self = Self { + min: f32::NEG_INFINITY, + max: f32::INFINITY, + }; + pub fn new(min: f32, max: f32) -> Result<Self, IntervalError> { + if max < min { + return Err(IntervalError::InvertedBounds); + } + if min.is_nan() || max.is_nan() { + return Err(IntervalError::NanBound); + } + // The reference returns a cached [0, 1], canonicalizing a negative zero. + Ok(Self { + min: if min == 0.0 && max == 1.0 { 0.0 } else { min }, + max, + }) + } + pub fn symmetric(value: f32) -> Result<Self, IntervalError> { + Self::new(-value, value) + } + pub fn exact(value: f32) -> Result<Self, IntervalError> { + Self::new(value, value) + } + pub fn min(self) -> f32 { + self.min + } + pub fn max(self) -> f32 { + self.max + } + pub fn is_nai(self) -> bool { + self.min.is_nan() + } + pub fn contains(self, value: f32) -> bool { + value >= self.min && value <= self.max + } + pub fn intersects(self, other: Self) -> bool { + self.min <= other.max && self.max >= other.min + } + /// Kept separate from Rust's Hash contract: Java compares signed zeros equal + /// here, but its endpoint-based hash can distinguish them. + pub fn java_hash_code(self) -> i32 { + let bits = |v: f32| { + if v.is_nan() { + 0x7fc0_0000_i32 + } else { + v.to_bits() as i32 + } + }; + bits(self.min).wrapping_mul(31).wrapping_add(bits(self.max)) + } + pub fn encapsulating_values(a: f32, b: f32) -> Self { + if a.is_nan() && b.is_nan() { + Self::NAI + } else if a.is_nan() { + Self::exact(b).unwrap() + } else if b.is_nan() { + Self::exact(a).unwrap() + } else { + Self::new(java_min(a, b), java_max(a, b)).unwrap() + } + } + pub fn encapsulating(intervals: &[Self]) -> Result<Self, IntervalError> { + if intervals.is_empty() { + return Err(IntervalError::EmptyInput); + } + let mut min = f32::INFINITY; + let mut max = f32::NEG_INFINITY; + for interval in intervals { + if !interval.is_nai() { + min = java_min(interval.min, min); + max = java_max(interval.max, max); + } + } + if max < min { + Ok(Self::NAI) + } else { + Self::new(min, max) + } + } + fn arithmetic_bounds(min: f32, max: f32) -> Self { + if min.is_nan() || max.is_nan() { + Self::NAI + } else { + Self::new(min, max).expect("ordered interval arithmetic") + } + } + pub fn add_range(self, right: Self) -> Self { + Self::arithmetic_bounds(self.min + right.min, self.max + right.max) + } + pub fn subtract_range(self, right: Self) -> Self { + Self::arithmetic_bounds(self.min - right.max, self.max - right.min) + } + pub fn multiply_range(self, right: Self) -> Self { + if self.is_nai() || right.is_nai() { + return Self::NAI; + } + let a = mul_bound(self.min, right.min); + let b = mul_bound(self.min, right.max); + let c = mul_bound(self.max, right.min); + let d = mul_bound(self.max, right.max); + Self::new( + java_min(java_min(a, b), java_min(c, d)), + java_max(java_max(a, b), java_max(c, d)), + ) + .unwrap() + } + pub fn reciprocal(self) -> Self { + if self.is_nai() || (self.min == 0.0 && self.max == 0.0) { + Self::NAI + } else if !self.contains(0.0) { + Self::new(1.0 / self.max, 1.0 / self.min).unwrap() + } else if self.max == 0.0 { + Self::new(f32::NEG_INFINITY, 1.0 / self.min).unwrap() + } else if self.min == 0.0 { + Self::new(1.0 / self.max, f32::INFINITY).unwrap() + } else { + Self::INFINITE + } + } + pub fn divide_range(self, right: Self) -> Self { + self.multiply_range(right.reciprocal()) + } + pub fn minimum(self, right: Self) -> Self { + Self::arithmetic_bounds(java_min(self.min, right.min), java_min(self.max, right.max)) + } + pub fn maximum(self, right: Self) -> Self { + Self::arithmetic_bounds(java_max(self.min, right.min), java_max(self.max, right.max)) + } + pub fn clamp(self, min: f32, max: f32) -> Result<Self, IntervalError> { + if min > max { + return Err(IntervalError::InvertedBounds); + } + if self.is_nai() { + Ok(Self::NAI) + } else if self.min >= max { + Self::exact(max) + } else if self.max <= min { + Self::exact(min) + } else { + Self::new(java_max(self.min, min), java_min(self.max, max)) + } + } + pub fn abs(self) -> Self { + self.even_bounds(f32::abs) + } + pub fn square(self) -> Self { + self.even_bounds(|v| v * v) + } + pub fn log(self) -> Result<Self, IntervalError> { + if self.is_nai() || self.max < 0.0 { + Ok(Self::NAI) + } else { + self.maximum(Self::exact(0.0)?) + .map_monotonic(|v| (v as f64).ln() as f32) + } + } + pub fn power(self, exponent: Self) -> Self { + if self.is_nai() || exponent.is_nai() { + return Self::NAI; + } + if self.min == self.max { + return Self::power_base(self.min, exponent); + } + let mut result = Self::encapsulating(&[ + Self::power_base(self.min, exponent), + Self::power_base(self.max, exponent), + ]) + .unwrap(); + if self.contains(0.0) { + if self.max > 0.0 { + result = Self::encapsulating(&[result, Self::power_base(0.0, exponent)]).unwrap(); + } + if self.min < 0.0 { + result = Self::encapsulating(&[result, Self::power_base(-0.0, exponent)]).unwrap(); + } + } + result + } + fn including_value(self, value: f32) -> Self { + if value.is_nan() { + self + } else if self.is_nai() { + Self::exact(value).unwrap() + } else { + Self::new(java_min(self.min, value), java_max(self.max, value)).unwrap() + } + } + fn power_base(base: f32, exponent: Self) -> Self { + if base.is_nan() || exponent.is_nai() { + return Self::NAI; + } + if exponent.min == exponent.max { + let value = java_power(base, exponent.min); + return Self::encapsulating_values(value, value); + } + if base == 0.0 { + let range = if exponent.contains(0.0) { + if exponent.max == 0.0 { + Self::new(1.0, f32::INFINITY).unwrap() + } else if exponent.min == 0.0 { + Self::new(0.0, 1.0).unwrap() + } else { + Self::new(0.0, f32::INFINITY).unwrap() + } + } else if exponent.max < 0.0 { + Self::exact(f32::INFINITY).unwrap() + } else { + Self::exact(0.0).unwrap() + }; + return range.multiply_range(Self::exact(1.0_f32.copysign(base)).unwrap()); + } + if base == 1.0 { + return Self::exact(1.0).unwrap(); + } + if base > 0.0 { + if exponent.min.is_finite() && exponent.max.is_finite() { + return Self::encapsulating_values( + java_power(base, exponent.min), + java_power(base, exponent.max), + ); + } + if exponent.min.is_infinite() && exponent.max.is_infinite() { + return Self::new(0.0, f32::INFINITY).unwrap(); + } + let (min, max) = if exponent.min.is_infinite() { + if base < 1.0 { + (java_power(base, exponent.max), f32::INFINITY) + } else { + (0.0, java_power(base, exponent.max)) + } + } else if base < 1.0 { + (0.0, java_power(base, exponent.min)) + } else { + (java_power(base, exponent.min), f32::INFINITY) + }; + return Self::new(min, max).unwrap(); + } + let first = (exponent.min as f64).ceil() as f32; + let last = (exponent.max as f64).floor() as f32; + if last < first { + return Self::NAI; + } + let a = java_power(base, first); + let b = java_power(base, last); + let mut result = Self::encapsulating_values(a, b); + if first.is_infinite() { + result = result.including_value(-a); + } else if first + 1.0 < last { + result = result.including_value(java_power(base, first + 1.0)); + } + if last.is_infinite() { + result = result.including_value(-b); + } else if last - 1.0 > first { + result = result.including_value(java_power(base, last - 1.0)); + } + result + } + fn even_bounds(self, transform: impl Fn(f32) -> f32) -> Self { + if self.is_nai() { + return self; + } + let a = transform(self.min); + let b = transform(self.max); + Self::new( + if self.contains(0.0) { + 0.0 + } else { + java_min(a, b) + }, + java_max(a, b), + ) + .unwrap() + } + /// The caller supplies a monotonic transformation. As in vanilla, this maps + /// only the endpoints; it does not attempt to prove monotonicity. + pub fn map_monotonic( + self, + mut transform: impl FnMut(f32) -> f32, + ) -> Result<Self, IntervalError> { + if self.is_nai() { + return Ok(self); + } + let a = transform(self.min); + let b = transform(self.max); + if a.is_nan() || b.is_nan() { + Err(IntervalError::NanMappedBound) + } else { + Self::new(java_min(a, b), java_max(a, b)) + } + } + pub fn lerp_ranges(self, first: Self, second: Self) -> Self { + if self.is_nai() || first.is_nai() || second.is_nai() { + return Self::NAI; + } + Self::encapsulating(&[ + self.lerp_values(first.min, second.min), + self.lerp_values(first.max, second.min), + self.lerp_values(first.min, second.max), + self.lerp_values(first.max, second.max), + ]) + .unwrap() + } + pub fn lerp_values(self, first: f32, second: f32) -> Self { + if self.is_nai() || first.is_nan() || second.is_nan() { + return Self::NAI; + } + if first.is_finite() && second.is_finite() { + return Self::encapsulating_values( + first + mul_bound(self.min, second - first), + first + mul_bound(self.max, second - first), + ); + } + if first == second { + return Self::exact(first).unwrap(); + } + let a = lerp_infinite_bound(self.min, first, second); + let b = lerp_infinite_bound(self.max, first, second); + if a.is_nan() || b.is_nan() { + Self::NAI + } else { + Self::encapsulating_values(a, b) + } + } + pub fn sign(self) -> Self { + if self.is_nai() { + self + } else if self.min == self.max { + Self::exact(if self.min == 0.0 { + self.min + } else { + self.min.signum() + }) + .unwrap() + } else if self.contains(0.0) { + Self::new( + if self.min == 0.0 { 0.0 } else { -1.0 }, + if self.max == 0.0 { 0.0 } else { 1.0 }, + ) + .unwrap() + } else { + Self::exact(if self.min > 0.0 { 1.0 } else { -1.0 }).unwrap() + } + } +} +fn java_power(base: f32, exponent: f32) -> f32 { + super::arithmetic::java_power(base as f64, exponent as f64) as f32 +} +fn mul_bound(a: f32, b: f32) -> f32 { + if a == 0.0 || b == 0.0 { 0.0 } else { a * b } +} + +fn lerp_infinite_bound(alpha: f32, first: f32, second: f32) -> f32 { + let a = mul_bound(1.0 - alpha, first); + let b = mul_bound(alpha, second); + if a.is_infinite() && b.is_infinite() { + if alpha <= 0.0 { + if second > first { + f32::NEG_INFINITY + } else { + f32::INFINITY + } + } else if alpha >= 1.0 { + if second > first { + f32::INFINITY + } else { + f32::NEG_INFINITY + } + } else { + f32::NAN + } + } else { + a + b + } +} diff --git a/crates/horizon-core/src/density/mod.rs b/crates/horizon-core/src/density/mod.rs new file mode 100644 index 000000000..6bc84a8d1 --- /dev/null +++ b/crates/horizon-core/src/density/mod.rs @@ -0,0 +1,391 @@ +//! Compiled density samplers for Java Edition 26.3. +//! +//! Evaluation primitives and an initial graph compiler; complete terrain +//! generation is pending. Bulk evaluation retains its own floating-point path. +use crate::{ + geometry::Axis, + noise::{DensityError, DensityVolume, Noise}, +}; +use std::sync::Arc; + +mod beardifier; +pub use beardifier::{Beardifier, JigsawJunction, RigidPiece, StructureBounds, TerrainAdjustment}; +mod cache; +mod world_fields; +pub use world_fields::{ + BlendDensitySampler, ContextBoundSampler, DensityBlender, EmptyBlender, WorldField, WorldFields, +}; +mod end_islands; +pub use end_islands::EndIslandSampler; +pub mod graph; +pub use cache::CachingDensitySampler; +mod arithmetic; +mod interpolation; +mod interval; +pub use interpolation::InterpolatedSampler; +pub use interval::{Interval, IntervalError}; +mod rounding; +mod selection; +pub use rounding::{RoundMode, RoundSampler}; +mod power; +pub use power::{PowerSampler, compile_constant_exponent}; +mod slice; +pub use slice::{SliceAxes, SliceSampler}; +mod spline; +pub use spline::{CubicSpline, MultipointSpline, SplineError, SplinePoint, SplineSampler}; +mod surface; +pub use surface::{FindTopSurfaceSampler, compile_surface_search}; +mod terrain_noise; +pub use arithmetic::{BinaryOp, BinarySampler, UnaryOp, UnarySampler}; +pub use selection::{ + DensityValue, IntervalSelectSampler, InvalidIntervals, LerpSampler, RangeChoiceSampler, +}; +pub use terrain_noise::{ + BlendedFbmSet, BlendedNoise, DistanceMetric, DistanceToPointSampler, ShiftNoiseKind, + compile_shift_noise, create_blended_fbm, +}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SampleError { + Volume(DensityError), + ZeroGradientPeriod, + ExactBufferSizeRequired, + CacheIdOutOfRange, + RecursiveCache, + SurfaceRequiresSingleLayer, + SurfaceSearchOverflow, +} +impl From<DensityError> for SampleError { + fn from(value: DensityError) -> Self { + Self::Volume(value) + } +} +impl std::fmt::Display for SampleError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Volume(error) => error.fmt(f), + Self::SurfaceRequiresSingleLayer => { + f.write_str("surface search requires a single Y layer") + } + Self::SurfaceSearchOverflow => { + f.write_str("surface search crossed the integer height domain") + } + Self::CacheIdOutOfRange => f.write_str("density cache id exceeds 65535"), + Self::RecursiveCache => f.write_str("density cache reentered its own evaluation"), + Self::ExactBufferSizeRequired => { + f.write_str("this density sampler requires exactly a volume-sized output") + } + Self::ZeroGradientPeriod => { + f.write_str("repeating gradient has a zero coordinate period") + } + } + } +} +impl std::error::Error for SampleError {} + +/// Worker-owned temporary storage. Samplers can be shared across workers; their +/// scratch buffers cannot. World fields are immutable for an evaluation context. +#[derive(Debug, Default)] +pub struct SamplerContext { + scratch: Vec<Vec<f32>>, + caches: Option<Vec<cache::CacheCell>>, + fields: WorldFields, +} +impl SamplerContext { + fn with_buffer<T>( + &mut self, + size: usize, + sample: impl FnOnce(&mut Self, &mut [f32]) -> Result<T, SampleError>, + ) -> Result<T, SampleError> { + let mut buffer = self.scratch.pop().unwrap_or_default(); + buffer.resize(size, 0.0); + let result = sample(self, &mut buffer); + self.scratch.push(buffer); + result + } + /// Release retained storage between worlds or after unusually large work. + pub fn clear_scratch(&mut self) { + self.scratch.clear(); + } +} + +pub trait DensitySampler: std::fmt::Debug + Send + Sync { + fn sample_value( + &self, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError>; + + /// The slice length is the logical buffer size. Some samplers fill its tail; + /// others leave it untouched. A short buffer is rejected before any writes. + fn sample_volume( + &self, + context: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_buffer(buffer, volume)?; + visit(volume, |index, position| { + buffer[index] = self.sample_value(context, position)?; + Ok(()) + }) + } +} +fn check_buffer(buffer: &[f32], volume: DensityVolume) -> Result<(), SampleError> { + if buffer.len() < volume.size() { + Err(DensityError::BufferTooShort.into()) + } else { + Ok(()) + } +} +fn check_exact_buffer(buffer: &[f32], volume: DensityVolume) -> Result<(), SampleError> { + check_buffer(buffer, volume)?; + if buffer.len() != volume.size() { + Err(SampleError::ExactBufferSizeRequired) + } else { + Ok(()) + } +} +fn visit( + volume: DensityVolume, + mut cell: impl FnMut(usize, [i32; 3]) -> Result<(), SampleError>, +) -> Result<(), SampleError> { + let [sx, sy, sz] = volume.sizes(); + let mut index = 0; + for z in 0..sz { + let bz = volume.block(Axis::Z, z).unwrap(); + for x in 0..sx { + let bx = volume.block(Axis::X, x).unwrap(); + for y in 0..sy { + cell(index, [bx, volume.block(Axis::Y, y).unwrap(), bz])?; + index += 1; + } + } + } + Ok(()) +} + +#[derive(Clone, Copy, Debug)] +pub struct ConstantSampler(pub f32); +impl DensitySampler for ConstantSampler { + fn sample_value(&self, _: &mut SamplerContext, _: [i32; 3]) -> Result<f32, SampleError> { + Ok(self.0) + } + fn sample_volume( + &self, + _: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_buffer(buffer, volume)?; + buffer.fill(self.0); + Ok(()) + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TilingMode { + ClampToEdge, + Repeat, + MirroredRepeat, +} + +#[derive(Clone, Copy, Debug)] +pub struct GradientSampler { + axis: Axis, + tiling: TilingMode, + from: i32, + to: i32, + period: i32, + value: f32, + factor: f32, +} +impl GradientSampler { + pub fn new( + axis: Axis, + tiling: TilingMode, + from: i32, + to: i32, + from_value: f32, + to_value: f32, + ) -> Self { + let period = to.wrapping_sub(from); + Self { + axis, + tiling, + from, + to, + period, + value: from_value, + factor: (to_value - from_value) / period as f32, + } + } + pub fn compute(&self, coordinate: i32) -> Result<f32, SampleError> { + let distance = match self.tiling { + TilingMode::ClampToEdge => coordinate + .clamp(self.from.min(self.to), self.from.max(self.to)) + .wrapping_sub(self.from), + TilingMode::Repeat | TilingMode::MirroredRepeat => { + if self.period == 0 { + return Err(SampleError::ZeroGradientPeriod); + } + let delta = coordinate.wrapping_sub(self.from); + // Java floorDiv/floorMod wrap MIN / -1, and round toward -infinity. + let mut cycle = delta.wrapping_div(self.period); + let mut remainder = delta.wrapping_rem(self.period); + if remainder != 0 && (delta ^ self.period) < 0 { + cycle = cycle.wrapping_sub(1); + remainder = remainder.wrapping_add(self.period); + } + if self.tiling == TilingMode::MirroredRepeat && cycle & 1 != 0 { + self.period.wrapping_sub(remainder) + } else { + remainder + } + } + }; + Ok(self.value + distance as f32 * self.factor) + } +} +impl DensitySampler for GradientSampler { + fn sample_value(&self, _: &mut SamplerContext, position: [i32; 3]) -> Result<f32, SampleError> { + self.compute(position[self.axis as usize]) + } + fn sample_volume( + &self, + _: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_buffer(buffer, volume)?; + let [sx, sy, sz] = volume.sizes(); + for coordinate in 0..volume.sizes()[self.axis as usize] { + let value = self.compute(volume.block(self.axis, coordinate).unwrap())?; + match self.axis { + Axis::X => { + for z in 0..sz { + let start = (coordinate + z * sx) * sy; + buffer[start..start + sy].fill(value); + } + } + Axis::Y => { + for z in 0..sz { + for x in 0..sx { + buffer[(x + z * sx) * sy + coordinate] = value; + } + } + } + Axis::Z => { + let start = coordinate * sx * sy; + buffer[start..start + sx * sy].fill(value); + } + } + } + Ok(()) + } +} + +#[derive(Clone, Debug)] +pub struct NoiseSampler { + pub noise: Arc<dyn Noise>, + pub xz_scale: f64, + pub y_scale: f64, +} +impl DensitySampler for NoiseSampler { + fn sample_value( + &self, + _: &mut SamplerContext, + [x, y, z]: [i32; 3], + ) -> Result<f32, SampleError> { + Ok(self.noise.get3( + x as f64 * self.xz_scale, + y as f64 * self.y_scale, + z as f64 * self.xz_scale, + )) + } + fn sample_volume( + &self, + _: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_buffer(buffer, volume)?; + buffer.fill(0.0); + Ok(self + .noise + .add_to_volume(buffer, volume, self.xz_scale, self.y_scale, 1.0)?) + } +} + +/// Compiled XZ or XYZ shifted noise. `None` selects vanilla's XZ specialization; +/// it must not add a synthetic zero Y shift (that would change signed zeros). +#[derive(Clone, Debug)] +pub struct ShiftedNoiseSampler { + pub source: NoiseSampler, + pub shift_x: Arc<dyn DensitySampler>, + pub shift_y: Option<Arc<dyn DensitySampler>>, + pub shift_z: Arc<dyn DensitySampler>, +} +impl DensitySampler for ShiftedNoiseSampler { + fn sample_value( + &self, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + let x = position[0] as f64 * self.source.xz_scale + + self.shift_x.sample_value(context, position)? as f64; + let mut y = position[1] as f64 * self.source.y_scale; + if let Some(shift) = &self.shift_y { + y += shift.sample_value(context, position)? as f64; + } + let z = position[2] as f64 * self.source.xz_scale + + self.shift_z.sample_value(context, position)? as f64; + Ok(self.source.noise.get3(x, y, z)) + } + fn sample_volume( + &self, + context: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_buffer(buffer, volume)?; + self.shift_x.sample_volume(context, buffer, volume)?; + if let Some(shift_y) = &self.shift_y { + context.with_buffer(volume.size(), |context, y| { + shift_y.sample_volume(context, y, volume)?; + context.with_buffer(volume.size(), |context, z| { + self.shift_z.sample_volume(context, z, volume)?; + self.sample_shifted_volume(buffer, volume, Some(y), z) + }) + }) + } else { + context.with_buffer(volume.size(), |context, z| { + self.shift_z.sample_volume(context, z, volume)?; + self.sample_shifted_volume(buffer, volume, None, z) + }) + } + } +} +impl ShiftedNoiseSampler { + fn sample_shifted_volume( + &self, + buffer: &mut [f32], + volume: DensityVolume, + shift_y: Option<&[f32]>, + shift_z: &[f32], + ) -> Result<(), SampleError> { + visit(volume, |index, [x, y, z]| { + let x = x as f64 * self.source.xz_scale + buffer[index] as f64; + let mut y = y as f64 * self.source.y_scale; + if let Some(shift) = shift_y { + y += shift[index] as f64; + } + let z = z as f64 * self.source.xz_scale + shift_z[index] as f64; + buffer[index] = self.source.noise.get3(x, y, z); + Ok(()) + }) + } +} + +#[cfg(test)] +mod tests; diff --git a/crates/horizon-core/src/density/power.rs b/crates/horizon-core/src/density/power.rs new file mode 100644 index 000000000..b400093ae --- /dev/null +++ b/crates/horizon-core/src/density/power.rs @@ -0,0 +1,72 @@ +use super::*; + +/// Both operands evaluate in base/exponent order, including zero and one bases. +#[derive(Clone, Debug)] +pub struct PowerSampler { + pub base: Arc<dyn DensitySampler>, + pub exponent: Arc<dyn DensitySampler>, +} +impl DensitySampler for PowerSampler { + fn sample_value( + &self, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + let base = self.base.sample_value(context, position)?; + let exponent = self.exponent.sample_value(context, position)?; + Ok(super::arithmetic::java_power(base as f64, exponent as f64) as f32) + } + fn sample_volume( + &self, + context: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_exact_buffer(buffer, volume)?; + self.base.sample_volume(context, buffer, volume)?; + context.with_buffer(volume.size(), |context, scratch| { + self.exponent.sample_volume(context, scratch, volume)?; + for (base, exponent) in buffer.iter_mut().zip(scratch) { + *base = super::arithmetic::java_power(*base as f64, *exponent as f64) as f32; + } + Ok(()) + }) + } +} + +/// Only sqrt/identity/square/cube receive the negative-exponent reciprocal. +/// Other exponents return directly from vanilla's signed fallback sampler. +pub fn compile_constant_exponent( + base: Arc<dyn DensitySampler>, + exponent: f32, +) -> Arc<dyn DensitySampler> { + let positive: Arc<dyn DensitySampler> = match exponent.abs() { + 0.5 => Arc::new(UnarySampler { + input: base, + operation: UnaryOp::Sqrt, + }), + 1.0 => base, + 2.0 => Arc::new(UnarySampler { + input: base, + operation: UnaryOp::Square, + }), + 3.0 => Arc::new(UnarySampler { + input: base, + operation: UnaryOp::Cube, + }), + _ => { + return Arc::new(UnarySampler { + input: base, + operation: UnaryOp::PowerExponent(exponent as f64), + }); + } + }; + if exponent < 0.0 { + Arc::new(UnarySampler { + input: positive, + operation: UnaryOp::Reciprocal, + }) + } else { + positive + } +} diff --git a/crates/horizon-core/src/density/rounding.rs b/crates/horizon-core/src/density/rounding.rs new file mode 100644 index 000000000..4ac9bbe83 --- /dev/null +++ b/crates/horizon-core/src/density/rounding.rs @@ -0,0 +1,98 @@ +use super::*; + +#[derive(Clone, Copy, Debug)] +pub enum RoundMode { + Floor, + Round, + Ceil, + Truncate, +} +impl RoundMode { + pub(super) fn integer(self, value: f32) -> f32 { + match self { + Self::Floor => (value as f64).floor() as f32, + Self::Ceil => (value as f64).ceil() as f32, + Self::Truncate => { + if value > 0.0 { + (value as f64).floor() as f32 + } else { + (value as f64).ceil() as f32 + } + } + Self::Round => { + // Math.round(float): ties go toward positive infinity, NaNs + // become zero, and the result saturates to Java's int domain. + let bits = value.to_bits() as i32; + let shift = 149 - ((bits >> 23) & 0xff); + let rounded = if (0..32).contains(&shift) { + let mut significand = (bits & 0x7f_ffff) | 0x80_0000; + if bits < 0 { + significand = -significand; + } + ((significand >> shift) + 1) >> 1 + } else { + value as i32 + }; + rounded as f32 + } + } + } + fn apply(self, input: f32, multiple: f32) -> f32 { + if multiple == 0.0 { + input + } else { + self.integer(input / multiple) * multiple + } + } +} + +/// A missing multiple selects vanilla's literal-one specialization. A supplied +/// sampler is evaluated even when its value is zero or always one. +#[derive(Clone, Debug)] +pub struct RoundSampler { + pub mode: RoundMode, + pub input: Arc<dyn DensitySampler>, + pub multiple: Option<Arc<dyn DensitySampler>>, +} +impl DensitySampler for RoundSampler { + fn sample_value( + &self, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + let input = self.input.sample_value(context, position)?; + Ok(if let Some(multiple) = &self.multiple { + self.mode + .apply(input, multiple.sample_value(context, position)?) + } else { + self.mode.integer(input) + }) + } + fn sample_volume( + &self, + context: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + if self.multiple.is_some() { + check_exact_buffer(buffer, volume)?; + } else { + check_buffer(buffer, volume)?; + } + self.input.sample_volume(context, buffer, volume)?; + if let Some(multiple) = &self.multiple { + context.with_buffer(volume.size(), |context, scratch| { + multiple.sample_volume(context, scratch, volume)?; + for (input, multiple) in buffer.iter_mut().zip(scratch) { + *input = self.mode.apply(*input, *multiple); + } + Ok(()) + }) + } else { + for value in buffer { + *value = self.mode.integer(*value); + } + Ok(()) + } + } +} diff --git a/crates/horizon-core/src/density/selection.rs b/crates/horizon-core/src/density/selection.rs new file mode 100644 index 000000000..eed6145ff --- /dev/null +++ b/crates/horizon-core/src/density/selection.rs @@ -0,0 +1,228 @@ +use super::*; + +#[derive(Clone, Debug)] +pub struct RangeChoiceSampler { + pub input: Arc<dyn DensitySampler>, + pub min_inclusive: f32, + pub max_exclusive: f32, + pub when_in_range: Arc<dyn DensitySampler>, + pub when_out_of_range: Arc<dyn DensitySampler>, +} +impl RangeChoiceSampler { + fn contains(&self, value: f32) -> bool { + value >= self.min_inclusive && value < self.max_exclusive + } +} +impl DensitySampler for RangeChoiceSampler { + fn sample_value( + &self, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + if self.contains(self.input.sample_value(context, position)?) { + self.when_in_range.sample_value(context, position) + } else { + self.when_out_of_range.sample_value(context, position) + } + } + fn sample_volume( + &self, + context: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_exact_buffer(buffer, volume)?; + // Vanilla evaluates the in-range branch before the selector in bulk. + self.when_in_range.sample_volume(context, buffer, volume)?; + context.with_buffer(volume.size(), |context, input| { + self.input.sample_volume(context, input, volume)?; + context.with_buffer(volume.size(), |context, outside| { + self.when_out_of_range + .sample_volume(context, outside, volume)?; + for i in 0..buffer.len() { + if !self.contains(input[i]) { + buffer[i] = outside[i]; + } + } + Ok(()) + }) + }) + } +} + +/// An explicitly compiled value. Distinguishing literal constants here avoids +/// scratch allocation in the constant-endpoint interpolation specializations. +#[derive(Clone, Debug)] +pub enum DensityValue { + Constant(f32), + Sampler(Arc<dyn DensitySampler>), +} +impl DensityValue { + fn sample_value( + &self, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + match self { + Self::Constant(value) => Ok(*value), + Self::Sampler(sampler) => sampler.sample_value(context, position), + } + } + fn with_volume<T>( + &self, + context: &mut SamplerContext, + volume: DensityVolume, + use_values: impl FnOnce(&mut SamplerContext, Values<'_>) -> Result<T, SampleError>, + ) -> Result<T, SampleError> { + match self { + Self::Constant(value) => use_values(context, Values::Constant(*value)), + Self::Sampler(sampler) => context.with_buffer(volume.size(), |context, buffer| { + sampler.sample_volume(context, buffer, volume)?; + use_values(context, Values::Buffer(buffer)) + }), + } + } +} +#[derive(Clone, Copy)] +enum Values<'a> { + Constant(f32), + Buffer(&'a [f32]), +} +impl Values<'_> { + fn get(self, index: usize) -> f32 { + match self { + Self::Constant(value) => value, + Self::Buffer(buffer) => buffer[index], + } + } +} +#[derive(Clone, Debug)] +pub struct LerpSampler { + pub alpha: Arc<dyn DensitySampler>, + pub first: DensityValue, + pub second: DensityValue, +} +fn interpolate(alpha: f32, first: f32, second: f32) -> f32 { + if alpha == 0.0 { + first + } else if alpha == 1.0 { + second + } else { + first + alpha * (second - first) + } +} +impl DensitySampler for LerpSampler { + fn sample_value( + &self, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + let alpha = self.alpha.sample_value(context, position)?; + if alpha == 0.0 { + return self.first.sample_value(context, position); + } + if alpha == 1.0 { + return self.second.sample_value(context, position); + } + let first = self.first.sample_value(context, position)?; + let second = self.second.sample_value(context, position)?; + Ok(interpolate(alpha, first, second)) + } + fn sample_volume( + &self, + context: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_exact_buffer(buffer, volume)?; + self.alpha.sample_volume(context, buffer, volume)?; + self.first.with_volume(context, volume, |context, first| { + self.second.with_volume(context, volume, |_, second| { + for (index, alpha) in buffer.iter_mut().enumerate() { + *alpha = interpolate(*alpha, first.get(index), second.get(index)); + } + Ok(()) + }) + }) + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct InvalidIntervals; +impl std::fmt::Display for InvalidIntervals { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str("compiled interval selection requires one more branch than thresholds, at most 256 branches") + } +} +impl std::error::Error for InvalidIntervals {} + +/// Compiled interval selection. Threshold order is preserved, including NaNs +/// and equal thresholds; sorting and codec validation belong to the compiler. +#[derive(Clone, Debug)] +pub struct IntervalSelectSampler { + input: Arc<dyn DensitySampler>, + thresholds: Vec<f32>, + branches: Vec<Arc<dyn DensitySampler>>, +} +impl IntervalSelectSampler { + pub fn new( + input: Arc<dyn DensitySampler>, + thresholds: Vec<f32>, + branches: Vec<Arc<dyn DensitySampler>>, + ) -> Result<Self, InvalidIntervals> { + if branches.len() > 256 || thresholds.len().checked_add(1) != Some(branches.len()) { + return Err(InvalidIntervals); + } + Ok(Self { + input, + thresholds, + branches, + }) + } + fn select(&self, value: f32) -> usize { + self.thresholds + .iter() + .position(|threshold| value < *threshold) + .unwrap_or(self.branches.len() - 1) + } +} +impl DensitySampler for IntervalSelectSampler { + fn sample_value( + &self, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + let value = self.input.sample_value(context, position)?; + self.branches[self.select(value)].sample_value(context, position) + } + fn sample_volume( + &self, + context: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_exact_buffer(buffer, volume)?; + let total = volume + .size() + .checked_mul(self.branches.len()) + .filter(|count| *count <= isize::MAX as usize / size_of::<f32>()) + .ok_or(DensityError::VolumeTooLarge)?; + self.input.sample_volume(context, buffer, volume)?; + // Contiguous retained storage replaces a separate allocation per branch. + // Each child still receives a slice with exactly the logical volume size. + context.with_buffer(total, |context, values| { + for (branch, output) in self + .branches + .iter() + .zip(values.chunks_exact_mut(volume.size())) + { + branch.sample_volume(context, output, volume)?; + } + // Delay every output selection until all child volumes have returned. + for (index, input) in buffer.iter_mut().enumerate() { + *input = values[self.select(*input) * volume.size() + index]; + } + Ok(()) + }) + } +} diff --git a/crates/horizon-core/src/density/slice.rs b/crates/horizon-core/src/density/slice.rs new file mode 100644 index 000000000..e1f6d4ed7 --- /dev/null +++ b/crates/horizon-core/src/density/slice.rs @@ -0,0 +1,85 @@ +use super::*; + +/// Coordinates fixed by the compiled single-axis or combined XZ slice node. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SliceAxes { + X(i32), + Y(i32), + Z(i32), + Xz { x: i32, z: i32 }, +} +impl SliceAxes { + fn coordinates(self) -> [Option<i32>; 3] { + match self { + Self::X(x) => [Some(x), None, None], + Self::Y(y) => [None, Some(y), None], + Self::Z(z) => [None, None, Some(z)], + Self::Xz { x, z } => [Some(x), None, Some(z)], + } + } +} + +#[derive(Clone, Debug)] +pub struct SliceSampler { + pub input: Arc<dyn DensitySampler>, + pub axes: SliceAxes, +} +impl DensitySampler for SliceSampler { + fn sample_value( + &self, + context: &mut SamplerContext, + mut position: [i32; 3], + ) -> Result<f32, SampleError> { + for (axis, fixed) in self.axes.coordinates().into_iter().enumerate() { + if let Some(coordinate) = fixed { + position[axis] = coordinate; + } + } + self.input.sample_value(context, position) + } + + fn sample_volume( + &self, + context: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_buffer(buffer, volume)?; + let fixed = self.axes.coordinates(); + let mut sizes = volume.sizes().map(|size| size as i32); + let mut minimum = volume.minimum(); + for (axis, coordinate) in fixed.into_iter().enumerate() { + if let Some(coordinate) = coordinate { + sizes[axis] = 1; + minimum[axis] = coordinate; + } + } + // Keep the original steps, even on fixed axes: cached children observe + // the complete volume descriptor. An unchanged slice delegates directly + // and therefore retains the child's tail and partial-write behavior. + let reduced = DensityVolume::new(sizes, minimum, volume.steps())?; + if reduced == volume { + return self.input.sample_volume(context, buffer, volume); + } + context.with_buffer(reduced.size(), |context, samples| { + self.input.sample_volume(context, samples, reduced)?; + let [sx, sy, sz] = volume.sizes(); + let [rx, ry, _] = reduced.sizes(); + for z in 0..sz { + let source_z = if fixed[2].is_some() { 0 } else { z }; + for x in 0..sx { + let source_x = if fixed[0].is_some() { 0 } else { x }; + let source = (source_x + source_z * rx) * ry; + let target = (x + z * sx) * sy; + let column = &mut buffer[target..target + sy]; + if fixed[1].is_some() { + column.fill(samples[source]); + } else { + column.copy_from_slice(&samples[source..source + sy]); + } + } + } + Ok(()) + }) + } +} diff --git a/crates/horizon-core/src/density/spline.rs b/crates/horizon-core/src/density/spline.rs new file mode 100644 index 000000000..14eaa0adf --- /dev/null +++ b/crates/horizon-core/src/density/spline.rs @@ -0,0 +1,344 @@ +use super::*; +use std::collections::HashMap; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SplineError { + EmptyPoints, + NestingTooDeep, + MissingCoordinate, + NanConstant, +} +impl std::fmt::Display for SplineError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str(match self { + Self::NanConstant => "a compiled constant spline cannot be NaN", + Self::EmptyPoints => "a multipoint spline requires at least one point", + Self::NestingTooDeep => "spline nesting exceeds 256 levels", + Self::MissingCoordinate => "spline coordinate has no density sampler", + }) + } +} +impl std::error::Error for SplineError {} + +#[derive(Clone, Debug)] +pub struct SplinePoint<C = usize> { + pub location: f32, + pub value: CubicSpline<C>, + pub derivative: f32, +} +#[derive(Clone, Debug)] +pub struct MultipointSpline<C = usize> { + pub(super) coordinate: C, + pub(super) points: Vec<SplinePoint<C>>, + pub(super) depth: usize, +} +/// An immutable spline definition. Coordinate indices are resolved against a +/// sampler table at compilation. Point order is retained, including NaNs and +/// equal locations; codec ordering constraints belong to serialized definitions. +#[derive(Clone, Debug)] +pub enum CubicSpline<C = usize> { + Constant(f32), + Multipoint(Arc<MultipointSpline<C>>), +} +impl<C: Copy> CubicSpline<C> { + pub fn multipoint(coordinate: C, points: Vec<SplinePoint<C>>) -> Result<Self, SplineError> { + let depth = points + .iter() + .map(|p| match &p.value { + Self::Constant(_) => 0, + Self::Multipoint(node) => node.depth, + }) + .max() + .ok_or(SplineError::EmptyPoints)? + + 1; + if depth > 256 { + return Err(SplineError::NestingTooDeep); + } + Ok(Self::Multipoint(Arc::new(MultipointSpline { + coordinate, + points, + depth, + }))) + } + fn sample( + &self, + coordinate: &mut impl FnMut(C) -> Result<f32, SampleError>, + ) -> Result<f32, SampleError> { + let node = match self { + Self::Constant(value) => return Ok(*value), + Self::Multipoint(node) => node, + }; + let input = coordinate(node.coordinate)?; + // Vanilla binarySearch finds the first strictly greater location. Keep + // this search even for manually supplied unsorted or NaN locations. + let mut first = 0; + let mut remaining = node.points.len(); + while remaining != 0 { + let half = remaining / 2; + let middle = first + half; + if input < node.points[middle].location { + remaining = half; + } else { + first = middle + 1; + remaining -= half + 1; + } + } + if first == 0 || first == node.points.len() { + let endpoint = if first == 0 { 0 } else { first - 1 }; + let point = &node.points[endpoint]; + let value = point.value.sample(coordinate)?; + return Ok(if point.derivative == 0.0 { + value + } else { + value + point.derivative * (input - point.location) + }); + } + let left = &node.points[first - 1]; + let right = &node.points[first]; + let width = right.location - left.location; + let alpha = (input - left.location) / width; + let left_value = left.value.sample(coordinate)?; + let right_value = right.value.sample(coordinate)?; + let left_correction = left.derivative * width - (right_value - left_value); + let right_correction = -right.derivative * width + (right_value - left_value); + let linear = left_value + alpha * (right_value - left_value); + let correction = left_correction + alpha * (right_correction - left_correction); + Ok(linear + (alpha * (1.0 - alpha)) * correction) + } + /// Vanilla's conservative range analysis, with coordinate ranges supplied + /// by the enclosing graph. Child ranges are evaluated in reference order. + pub fn range( + &self, + coordinate: &mut impl FnMut(C) -> Interval, + ) -> Result<Interval, IntervalError> { + self.try_range(&mut |id| Ok(coordinate(id))) + } + /// Fallible coordinate range lookup, preserving early returns and error order. + pub fn try_range<E: From<IntervalError>>( + &self, + coordinate: &mut impl FnMut(C) -> Result<Interval, E>, + ) -> Result<Interval, E> { + use super::arithmetic::{java_max, java_min}; + let node = match self { + Self::Constant(value) => return Interval::exact(*value).map_err(E::from), + Self::Multipoint(node) => node, + }; + let input = coordinate(node.coordinate)?; + if input.is_nai() { + return Ok(input); + } + let mut minimum = f32::INFINITY; + let mut maximum = f32::NEG_INFINITY; + let first = &node.points[0]; + let last = node.points.last().unwrap(); + let extend = |point: &SplinePoint<C>, input: f32, value: f32| { + if point.derivative == 0.0 { + value + } else { + value + point.derivative * (input - point.location) + } + }; + if input.min() < first.location { + let value = first.value.try_range(coordinate)?; + let low = extend(first, input.min(), value.min()); + let high = extend(first, input.min(), value.max()); + minimum = java_min(minimum, java_min(low, high)); + maximum = java_max(maximum, java_max(low, high)); + } + if input.max() > last.location { + let value = last.value.try_range(coordinate)?; + let low = extend(last, input.max(), value.min()); + let high = extend(last, input.max(), value.max()); + minimum = java_min(minimum, java_min(low, high)); + maximum = java_max(maximum, java_max(low, high)); + } + let ranges = node + .points + .iter() + .map(|point| point.value.try_range(coordinate)) + .collect::<Result<Vec<_>, _>>()?; + for range in &ranges { + minimum = java_min(minimum, range.min()); + maximum = java_max(maximum, range.max()); + } + for (points, ranges) in node.points.windows(2).zip(ranges.windows(2)) { + let width = points[1].location - points[0].location; + let left = ranges[0]; + let right = ranges[1]; + let derivative_left = points[0].derivative; + let derivative_right = points[1].derivative; + if derivative_left == 0.0 && derivative_right == 0.0 { + continue; + } + let tangent_left = derivative_left * width; + let tangent_right = derivative_right * width; + let value_min = java_min(left.min(), right.min()); + let value_max = java_max(left.max(), right.max()); + let low_left = tangent_left - right.max() + left.min(); + let high_left = tangent_left - right.min() + left.max(); + let low_right = -tangent_right + right.min() - left.max(); + let high_right = -tangent_right + right.max() - left.min(); + minimum = java_min(minimum, value_min + 0.25 * java_min(low_left, low_right)); + maximum = java_max(maximum, value_max + 0.25 * java_max(high_left, high_right)); + } + Interval::new(minimum, maximum).map_err(E::from) + } + pub(super) fn coordinates_mut(&mut self) -> Vec<&mut C> { + match self { + Self::Constant(_) => Vec::new(), + Self::Multipoint(node) => { + let node = Arc::make_mut(node); + let mut coordinates = vec![&mut node.coordinate]; + for point in &mut node.points { + coordinates.extend(point.value.coordinates_mut()); + } + coordinates + } + } + } + pub(super) fn try_map_coordinates<D: Copy, E>( + &self, + map: &mut impl FnMut(C) -> Result<D, E>, + ) -> Result<CubicSpline<D>, E> { + Ok(match self { + Self::Constant(value) => CubicSpline::Constant(*value), + Self::Multipoint(node) => { + let coordinate = map(node.coordinate)?; + let points = node + .points + .iter() + .map(|point| { + Ok(SplinePoint { + location: point.location, + value: point.value.try_map_coordinates(map)?, + derivative: point.derivative, + }) + }) + .collect::<Result<Vec<_>, E>>()?; + CubicSpline::Multipoint(Arc::new(MultipointSpline { + coordinate, + points, + depth: node.depth, + })) + } + }) + } +} +impl CubicSpline { + fn compile( + &self, + inputs: &[Arc<dyn DensitySampler>], + ids: &mut HashMap<usize, usize>, + coordinates: &mut Vec<Arc<dyn DensitySampler>>, + ) -> Result<Self, SplineError> { + match self { + Self::Constant(value) => Ok(Self::Constant(*value)), + Self::Multipoint(node) => { + let coordinate = if let Some(index) = ids.get(&node.coordinate) { + *index + } else { + let input = inputs + .get(node.coordinate) + .ok_or(SplineError::MissingCoordinate)?; + let index = coordinates.len(); + coordinates.push(input.clone()); + ids.insert(node.coordinate, index); + index + }; + let points = node + .points + .iter() + .map(|point| { + Ok(SplinePoint { + location: point.location, + derivative: point.derivative, + value: point.value.compile(inputs, ids, coordinates)?, + }) + }) + .collect::<Result<Vec<_>, SplineError>>()?; + Self::multipoint(coordinate, points) + } + } + } +} + +#[derive(Clone, Debug)] +pub struct SplineSampler { + spline: CubicSpline, + coordinates: Vec<Arc<dyn DensitySampler>>, +} +impl SplineSampler { + /// Equal coordinate IDs share evaluation results. Structural function + /// identity and deduplication are supplied by the density graph compiler. + pub fn new( + spline: &CubicSpline, + inputs: &[Arc<dyn DensitySampler>], + ) -> Result<Self, SplineError> { + if matches!(spline, CubicSpline::Constant(value) if value.is_nan()) { + return Err(SplineError::NanConstant); + } + let mut coordinates = Vec::new(); + let spline = spline.compile(inputs, &mut HashMap::new(), &mut coordinates)?; + Ok(Self { + spline, + coordinates, + }) + } + pub fn coordinate_count(&self) -> usize { + self.coordinates.len() + } +} +impl DensitySampler for SplineSampler { + fn sample_value( + &self, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + context.with_buffer(self.coordinates.len(), |context, values| { + values.fill(f32::NAN); + self.spline.sample(&mut |id| { + if values[id].is_nan() { + values[id] = self.coordinates[id].sample_value(context, position)?; + } + Ok(values[id]) + }) + }) + } + fn sample_volume( + &self, + context: &mut SamplerContext, + output: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_buffer(output, volume)?; + if let CubicSpline::Constant(value) = self.spline { + output.fill(value); + return Ok(()); + } + check_exact_buffer(output, volume)?; + let mut buffers: Vec<Option<Vec<f32>>> = + (0..self.coordinates.len()).map(|_| None).collect(); + let result = (|| { + for (index, value) in output.iter_mut().enumerate() { + *value = self.spline.sample(&mut |id| { + if buffers[id].is_none() { + let mut buffer = context.scratch.pop().unwrap_or_default(); + buffer.resize(volume.size(), 0.0); + if let Err(error) = + self.coordinates[id].sample_volume(context, &mut buffer, volume) + { + context.scratch.push(buffer); + return Err(error); + } + buffers[id] = Some(buffer); + } + Ok(buffers[id].as_ref().unwrap()[index]) + })?; + } + Ok(()) + })(); + // Release in coordinate-ID order, also after a later lazy child fails. + context.scratch.extend(buffers.into_iter().flatten()); + result + } +} diff --git a/crates/horizon-core/src/density/surface.rs b/crates/horizon-core/src/density/surface.rs new file mode 100644 index 000000000..df437bc2b --- /dev/null +++ b/crates/horizon-core/src/density/surface.rs @@ -0,0 +1,99 @@ +use super::*; + +/// The unsliced search primitive. Compiled terrain graphs wrap this in a Y=0 +/// slice through `compile_surface_search`, so their upper bound is horizontal. +#[derive(Clone, Debug)] +pub struct FindTopSurfaceSampler { + density: Arc<dyn DensitySampler>, + upper_bound: Arc<dyn DensitySampler>, + lower_bound: i32, + cell_height: i32, +} +impl FindTopSurfaceSampler { + pub fn new( + density: Arc<dyn DensitySampler>, + upper_bound: Arc<dyn DensitySampler>, + lower_bound: i32, + cell_height: i32, + ) -> Result<Self, SampleError> { + if cell_height <= 0 { + return Err(DensityError::NonpositiveSteps.into()); + } + Ok(Self { + density, + upper_bound, + lower_bound, + cell_height, + }) + } + fn find_surface_from( + &self, + context: &mut SamplerContext, + x: i32, + z: i32, + upper: f32, + ) -> Result<i32, SampleError> { + let quotient = upper / self.cell_height as f32; + // Java 26.3 Mth.floor(float) widens to double, calls Math.floor, + // then uses a saturating double-to-int conversion (NaN becomes zero). + let floor = (quotient as f64).floor() as i32; + let mut y = floor.wrapping_mul(self.cell_height); + if y <= self.lower_bound { + return Ok(self.lower_bound); + } + while y >= self.lower_bound { + if self.density.sample_value(context, [x, y, z])? > 0.0 { + return Ok(y); + } + // Malformed manually constructed bounds can otherwise wrap and + // loop forever; serialized vanilla terrain bounds do not reach this. + y = y + .checked_sub(self.cell_height) + .ok_or(SampleError::SurfaceSearchOverflow)?; + } + Ok(self.lower_bound) + } +} +impl DensitySampler for FindTopSurfaceSampler { + fn sample_value( + &self, + context: &mut SamplerContext, + [x, y, z]: [i32; 3], + ) -> Result<f32, SampleError> { + let upper = self.upper_bound.sample_value(context, [x, y, z])?; + Ok(self.find_surface_from(context, x, z, upper)? as f32) + } + fn sample_volume( + &self, + context: &mut SamplerContext, + output: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_buffer(output, volume)?; + if volume.sizes()[1] != 1 { + return Err(SampleError::SurfaceRequiresSingleLayer); + } + self.upper_bound.sample_volume(context, output, volume)?; + visit(volume, |index, [x, _, z]| { + output[index] = self.find_surface_from(context, x, z, output[index])? as f32; + Ok(()) + }) + } +} + +pub fn compile_surface_search( + density: Arc<dyn DensitySampler>, + upper_bound: Arc<dyn DensitySampler>, + lower_bound: i32, + cell_height: i32, +) -> Result<SliceSampler, SampleError> { + Ok(SliceSampler { + input: Arc::new(FindTopSurfaceSampler::new( + density, + upper_bound, + lower_bound, + cell_height, + )?), + axes: SliceAxes::Y(0), + }) +} diff --git a/crates/horizon-core/src/density/terrain_noise.rs b/crates/horizon-core/src/density/terrain_noise.rs new file mode 100644 index 000000000..908a06576 --- /dev/null +++ b/crates/horizon-core/src/density/terrain_noise.rs @@ -0,0 +1,220 @@ +use super::*; +use crate::{ + noise::{NoiseBuildError, NoiseStack, SmearedPerlinNoise}, + random::RandomSource, +}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ShiftNoiseKind { + Shift, + ShiftA, + ShiftB, +} + +/// Compile the three offset-noise variants without changing their bulk paths. +pub fn compile_shift_noise(noise: Arc<dyn Noise>, kind: ShiftNoiseKind) -> Arc<dyn DensitySampler> { + if kind == ShiftNoiseKind::ShiftB { + return Arc::new(ShiftBSampler { noise }); + } + Arc::new(UnarySampler { + input: Arc::new(NoiseSampler { + noise, + xz_scale: 0.25, + y_scale: if kind == ShiftNoiseKind::ShiftA { + 0.0 + } else { + 0.25 + }, + }), + operation: UnaryOp::Multiply(4.0), + }) +} +#[derive(Clone, Debug)] +struct ShiftBSampler { + noise: Arc<dyn Noise>, +} +impl DensitySampler for ShiftBSampler { + fn sample_value( + &self, + _: &mut SamplerContext, + [x, _, z]: [i32; 3], + ) -> Result<f32, SampleError> { + Ok(self.noise.get3(z as f64 * 0.25, x as f64 * 0.25, 0.0) * 4.0) + } + fn sample_volume( + &self, + context: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + check_buffer(buffer, volume)?; + let [sx, sy, sz] = volume.sizes(); + let [mx, _, mz] = volume.minimum(); + let [dx, _, dz] = volume.steps(); + let transposed = DensityVolume::new([sz as i32, sx as i32, 1], [mz, mx, 0], [dz, dx, 1])?; + context.with_buffer(transposed.size(), |_, plane| { + plane.fill(0.0); + self.noise + .add_to_volume(plane, transposed, 0.25, 0.25, 4.0)?; + for z in 0..sz { + for x in 0..sx { + let start = (x + z * sx) * sy; + buffer[start..start + sy].fill(plane[x + z * sx]); + } + } + Ok(()) + }) + } +} + +/// Parameters for vanilla's old blended terrain density function. Serialized +/// codec limits and compile-context seed lookup are separate integration work. +#[derive(Clone, Copy, Debug)] +pub struct BlendedNoise { + pub xz_scale: f64, + pub y_scale: f64, + pub xz_factor: f64, + pub y_factor: f64, + pub smear_scale_multiplier: f64, +} +#[derive(Clone, Debug)] +pub struct BlendedFbmSet { + pub min_limit: NoiseStack, + pub max_limit: NoiseStack, + pub main: NoiseStack, +} +impl BlendedNoise { + pub fn create_fbm_set( + &self, + random: &mut impl RandomSource, + ) -> Result<BlendedFbmSet, NoiseBuildError> { + let smear = (684.412 * self.y_scale) * self.smear_scale_multiplier; + let main_smear = smear / self.y_factor; + Ok(BlendedFbmSet { + min_limit: create_blended_fbm(random, -15, smear, 0.9999847412109375)?, + max_limit: create_blended_fbm(random, -15, smear, 0.9999847412109375)?, + main: create_blended_fbm(random, -7, main_smear, 12.75)?, + }) + } + pub fn compile(&self, random: &mut impl RandomSource) -> Result<LerpSampler, NoiseBuildError> { + let layers = self.create_fbm_set(random)?; + let xz_scale = 684.412 * self.xz_scale; + let y_scale = 684.412 * self.y_scale; + let min_limit = Arc::new(NoiseSampler { + noise: Arc::new(layers.min_limit), + xz_scale, + y_scale, + }); + let max_limit = Arc::new(NoiseSampler { + noise: Arc::new(layers.max_limit), + xz_scale, + y_scale, + }); + let main = Arc::new(NoiseSampler { + noise: Arc::new(layers.main), + xz_scale: xz_scale / self.xz_factor, + y_scale: y_scale / self.y_factor, + }); + let shifted = Arc::new(UnarySampler { + input: main, + operation: UnaryOp::Add(0.5), + }); + let alpha = Arc::new(UnarySampler { + input: shifted, + operation: UnaryOp::Clamp { min: 0.0, max: 1.0 }, + }); + Ok(LerpSampler { + alpha, + first: DensityValue::Sampler(min_limit), + second: DensityValue::Sampler(max_limit), + }) + } + pub fn range(&self) -> Result<Interval, IntervalError> { + let smear = (684.412 * self.y_scale) * self.smear_scale_multiplier; + let mut range = Interval::exact(0.0)?; + let mut frequency = 1.0; + let mut amplitude = 0.9999847412109375 / 65535.0; + for _ in 0..16 { + let base = Interval::symmetric(((smear * frequency).abs() + 2.0) as f32)?; + range = range.add_range(base.multiply_range(Interval::exact(amplitude as f32)?)); + frequency /= 2.0; + amplitude *= 2.0; + } + Ok(range) + } +} + +/// Construct high-to-low frequency smeared octaves, consuming the caller's +/// stream directly. The public API caps work at 4096 layers before any draws. +pub fn create_blended_fbm( + random: &mut impl RandomSource, + first_octave: i32, + smear: f64, + amplitude: f64, +) -> Result<NoiseStack, NoiseBuildError> { + if first_octave > 0 { + return Err(NoiseBuildError::PositiveLegacyOctaves); + } + if first_octave < -4095 { + return Err(NoiseBuildError::TooManyOctaves); + } + let count = 1 - first_octave; + let power = if count > 1023 { + f64::INFINITY + } else { + f64::from_bits(((count + 1023) as u64) << 52) + }; + let mut amplitude = amplitude / (power - 1.0); + let mut frequency = 1.0; + let mut builder = NoiseStack::builder(); + for _ in 0..count { + builder.add( + Arc::new(SmearedPerlinNoise::new(random, smear * frequency)), + frequency, + amplitude as f32, + ); + frequency /= 2.0; + amplitude *= 2.0; + } + Ok(builder.build()?) +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DistanceMetric { + Euclidean, + EuclideanSquared, + Manhattan, + Chebyshev, +} +impl DistanceMetric { + pub fn compute2(self, x: f32, y: f32) -> f32 { + match self { + Self::Euclidean => ((x * x + y * y) as f64).sqrt() as f32, + Self::EuclideanSquared => x * x + y * y, + Self::Manhattan => x.abs() + y.abs(), + Self::Chebyshev => arithmetic::java_max(x.abs(), y.abs()), + } + } + pub fn compute3(self, x: f32, y: f32, z: f32) -> f32 { + match self { + Self::Euclidean => ((x * x + y * y + z * z) as f64).sqrt() as f32, + Self::EuclideanSquared => x * x + y * y + z * z, + Self::Manhattan => x.abs() + y.abs() + z.abs(), + Self::Chebyshev => { + arithmetic::java_max(arithmetic::java_max(x.abs(), y.abs()), z.abs()) + } + } + } +} +#[derive(Clone, Copy, Debug)] +pub struct DistanceToPointSampler { + pub point: [i32; 3], + pub metric: DistanceMetric, +} +impl DensitySampler for DistanceToPointSampler { + fn sample_value(&self, _: &mut SamplerContext, position: [i32; 3]) -> Result<f32, SampleError> { + let delta: [f32; 3] = + std::array::from_fn(|i| self.point[i].wrapping_sub(position[i]) as f32); + Ok(self.metric.compute3(delta[0], delta[1], delta[2])) + } +} diff --git a/crates/horizon-core/src/density/tests.rs b/crates/horizon-core/src/density/tests.rs new file mode 100644 index 000000000..77a643097 --- /dev/null +++ b/crates/horizon-core/src/density/tests.rs @@ -0,0 +1,757 @@ +use super::*; +use crate::{noise::PerlinNoise, random::LegacyRandom}; + +#[test] +fn tail_writes_follow_the_selected_bulk_sampler() { + let mut context = SamplerContext::default(); + let volume = DensityVolume::new([2, 3, 2], [-3, -4, -5], [1, 2, 1]).unwrap(); + let mut buffer = vec![17.0; volume.size() + 2]; + ConstantSampler(-0.0) + .sample_volume(&mut context, &mut buffer, volume) + .unwrap(); + assert!(buffer.iter().all(|v| v.to_bits() == (-0.0_f32).to_bits())); + GradientSampler::new(Axis::Y, TilingMode::ClampToEdge, -4, 0, -1.0, 1.0) + .sample_volume(&mut context, &mut buffer, volume) + .unwrap(); + assert_eq!(&buffer[..3], &[-1.0, 0.0, 1.0]); + assert_eq!(buffer[volume.size()].to_bits(), (-0.0_f32).to_bits()); + let noise = NoiseSampler { + noise: Arc::new(PerlinNoise::new(&mut LegacyRandom::new(0))), + xz_scale: 0.1, + y_scale: 0.2, + }; + noise + .sample_volume(&mut context, &mut buffer, volume) + .unwrap(); + assert!(buffer[volume.size()..].iter().all(|v| v.to_bits() == 0)); +} + +#[test] +fn invalid_buffer_is_rejected_before_child_evaluation() { + let volume = DensityVolume::new([1, 2, 1], [0; 3], [1; 3]).unwrap(); + let mut context = SamplerContext::default(); + let mut buffer = [19.0]; + let gradient = GradientSampler::new(Axis::X, TilingMode::Repeat, 0, 0, 1.0, 2.0); + assert_eq!( + gradient.sample_volume(&mut context, &mut buffer, volume), + Err(SampleError::Volume(DensityError::BufferTooShort)) + ); + assert_eq!(buffer, [19.0]); +} + +#[test] +fn scratch_returns_to_context_after_nested_sampling_errors() { + let mut context = SamplerContext::default(); + let error = context.with_buffer(16, |context, _| { + context.with_buffer(32, |_, _| Err::<(), _>(SampleError::ZeroGradientPeriod)) + }); + assert_eq!(error, Err(SampleError::ZeroGradientPeriod)); + assert_eq!(context.scratch.len(), 2); + context + .with_buffer(8, |context, outer| { + outer.fill(17.0); + context.with_buffer(8, |_, inner| { + inner.fill(29.0); + Ok(()) + })?; + assert!(outer.iter().all(|v| *v == 17.0)); + Ok(()) + }) + .unwrap(); + assert_eq!(context.scratch.len(), 2); + context.clear_scratch(); + assert!(context.scratch.is_empty()); +} + +#[test] +fn scalar_shortcuts_and_bulk_arithmetic_keep_distinct_results() { + let mut context = SamplerContext::default(); + let volume = DensityVolume::new([1; 3], [0; 3], [1; 3]).unwrap(); + let multiply = BinarySampler { + left: Arc::new(ConstantSampler(-0.0)), + right: Arc::new(ConstantSampler(f32::NAN)), + operation: BinaryOp::Multiply, + }; + assert_eq!( + multiply + .sample_value(&mut context, [0; 3]) + .unwrap() + .to_bits(), + 0 + ); + let mut buffer = [17.0]; + multiply + .sample_volume(&mut context, &mut buffer, volume) + .unwrap(); + assert!(buffer[0].is_nan()); + let minimum = BinarySampler { + left: Arc::new(ConstantSampler(0.0)), + right: Arc::new(ConstantSampler(-0.0)), + operation: BinaryOp::Minimum { + right_min: f32::NEG_INFINITY, + }, + }; + assert_eq!( + minimum + .sample_value(&mut context, [0; 3]) + .unwrap() + .to_bits(), + (-0.0_f32).to_bits() + ); + minimum + .sample_volume(&mut context, &mut buffer, volume) + .unwrap(); + assert_eq!(buffer[0].to_bits(), 0); +} + +#[test] +fn bulk_choice_evaluates_in_range_before_a_failing_selector() { + let mut context = SamplerContext::default(); + let volume = DensityVolume::new([1; 3], [0; 3], [1; 3]).unwrap(); + let choice = RangeChoiceSampler { + input: Arc::new(GradientSampler::new( + Axis::X, + TilingMode::Repeat, + 0, + 0, + 0.0, + 1.0, + )), + min_inclusive: 0.0, + max_exclusive: 1.0, + when_in_range: Arc::new(ConstantSampler(3.0)), + when_out_of_range: Arc::new(ConstantSampler(7.0)), + }; + let mut buffer = [19.0]; + assert_eq!( + choice.sample_volume(&mut context, &mut buffer, volume), + Err(SampleError::ZeroGradientPeriod) + ); + assert_eq!(buffer, [3.0]); + assert_eq!(context.scratch.len(), 1); + let mut too_long = [19.0; 2]; + assert_eq!( + choice.sample_volume(&mut context, &mut too_long, volume), + Err(SampleError::ExactBufferSizeRequired) + ); + assert_eq!(too_long, [19.0; 2]); +} + +#[test] +fn interval_branch_errors_keep_selector_output_and_return_scratch() { + let mut context = SamplerContext::default(); + let volume = DensityVolume::new([1; 3], [0; 3], [1; 3]).unwrap(); + let selector = IntervalSelectSampler::new( + Arc::new(ConstantSampler(-3.0)), + vec![0.0], + vec![ + Arc::new(ConstantSampler(7.0)), + Arc::new(GradientSampler::new( + Axis::X, + TilingMode::Repeat, + 0, + 0, + 0.0, + 1.0, + )), + ], + ) + .unwrap(); + assert_eq!(selector.sample_value(&mut context, [0; 3]), Ok(7.0)); + let mut buffer = [19.0]; + assert_eq!( + selector.sample_volume(&mut context, &mut buffer, volume), + Err(SampleError::ZeroGradientPeriod) + ); + assert_eq!(buffer, [-3.0]); + assert_eq!(context.scratch.len(), 1); + assert_eq!(context.scratch[0].len(), 2); + assert!(IntervalSelectSampler::new(Arc::new(ConstantSampler(0.0)), vec![], vec![]).is_err()); +} + +#[test] +fn range_arithmetic_and_zero_equality_match_reference_special_cases() { + let zero = Interval::exact(0.0).unwrap(); + assert_eq!(zero.multiply_range(Interval::INFINITE), zero); + assert!(zero.reciprocal().is_nai()); + assert!( + Interval::exact(f32::INFINITY) + .unwrap() + .add_range(Interval::exact(f32::NEG_INFINITY).unwrap()) + .is_nai() + ); + let cached = Interval::new(-0.0, 1.0).unwrap(); + assert_eq!(cached.min().to_bits(), 0); + let mixed_zero = Interval::new(-0.0, 0.0).unwrap(); + assert_eq!(mixed_zero, zero); + assert_ne!(mixed_zero.java_hash_code(), zero.java_hash_code()); + assert_eq!(Interval::NAI, Interval::NAI); + assert_eq!( + Interval::encapsulating(&[Interval::NAI, cached]), + Ok(cached) + ); + assert_eq!(Interval::encapsulating(&[]), Err(IntervalError::EmptyInput)); +} + +#[test] +fn monotonic_mapping_skips_nai_and_rejects_nan_after_both_endpoints() { + let mut calls = Vec::new(); + assert_eq!( + Interval::NAI.map_monotonic(|v| { + calls.push(v); + v + }), + Ok(Interval::NAI) + ); + assert!(calls.is_empty()); + assert_eq!( + Interval::new(-1.0, 1.0).unwrap().map_monotonic(|v| { + calls.push(v); + v.sqrt() + }), + Err(IntervalError::NanMappedBound) + ); + assert_eq!(calls, [-1.0, 1.0]); + assert_eq!( + Interval::exact(0.0) + .unwrap() + .lerp_values(f32::INFINITY, f32::NEG_INFINITY), + Interval::exact(f32::INFINITY).unwrap() + ); +} + +#[test] +fn shift_b_repeats_each_horizontal_sample_and_preserves_tail() { + let mut context = SamplerContext::default(); + let volume = DensityVolume::new([2, 3, 4], [-17, -64, 32], [4, 8, 16]).unwrap(); + let source = Arc::new(PerlinNoise::new(&mut LegacyRandom::new(0))); + let sampler = compile_shift_noise(source, ShiftNoiseKind::ShiftB); + let mut buffer = vec![19.0; volume.size() + 2]; + sampler + .sample_volume(&mut context, &mut buffer, volume) + .unwrap(); + for column in buffer[..volume.size()].chunks_exact(3) { + assert!(column.iter().all(|v| v.to_bits() == column[0].to_bits())); + } + assert_eq!(&buffer[volume.size()..], &[19.0, 19.0]); + assert_eq!(context.scratch.len(), 1); + assert_eq!(context.scratch[0].len(), 8); + let mut short = [23.0; 2]; + assert_eq!( + sampler.sample_volume(&mut context, &mut short, volume), + Err(SampleError::Volume(DensityError::BufferTooShort)) + ); + assert_eq!(short, [23.0; 2]); +} + +#[test] +fn blended_fbm_work_bound_rejects_before_random_draws() { + let mut random = LegacyRandom::new(0); + let mut expected = random.clone(); + assert!(matches!( + create_blended_fbm(&mut random, i32::MIN, 1.0, 1.0), + Err(crate::noise::NoiseBuildError::TooManyOctaves) + )); + assert!(matches!( + create_blended_fbm(&mut random, 1, 1.0, 1.0), + Err(crate::noise::NoiseBuildError::PositiveLegacyOctaves) + )); + use crate::random::RandomSource; + assert_eq!(random.next_long(), expected.next_long()); +} + +#[test] +fn volume_lookup_requires_exact_lattice_and_preserves_java_overflow() { + let volume = DensityVolume::new([2, 3, 2], [i32::MAX, -64, 32], [4, 1, 4]).unwrap(); + assert_eq!(volume.index_of_block([i32::MIN + 3, -63, 36]), Some(10)); + assert_eq!(volume.index_of_block([i32::MIN, -64, 32]), None); + let overflow = DensityVolume::new([2, 1, 1], [0; 3], [i32::MAX, 1, 1]).unwrap(); + assert_eq!(overflow.index_of_block([0; 3]), None); +} + +#[test] +fn cache_returns_filled_failure_buffer_on_the_next_volume_request() { + let mut context = SamplerContext::cached(); + let volume = DensityVolume::new([1; 3], [0; 3], [1; 3]).unwrap(); + let input = RangeChoiceSampler { + input: Arc::new(GradientSampler::new( + Axis::X, + TilingMode::Repeat, + 0, + 0, + 0.0, + 1.0, + )), + min_inclusive: 0.0, + max_exclusive: 1.0, + when_in_range: Arc::new(ConstantSampler(7.0)), + when_out_of_range: Arc::new(ConstantSampler(9.0)), + }; + let cached = CachingDensitySampler::new(0, Arc::new(input)).unwrap(); + let mut buffer = [19.0]; + assert_eq!( + cached.sample_volume(&mut context, &mut buffer, volume), + Err(SampleError::ZeroGradientPeriod) + ); + assert_eq!(buffer, [19.0]); + cached + .sample_volume(&mut context, &mut buffer, volume) + .unwrap(); + assert_eq!(buffer, [7.0]); + assert_eq!(cached.sample_value(&mut context, [0; 3]), Ok(7.0)); + context.clear_caches(); + assert_eq!( + cached.sample_value(&mut context, [0; 3]), + Err(SampleError::ZeroGradientPeriod) + ); + assert!(matches!( + CachingDensitySampler::new(65536, Arc::new(ConstantSampler(0.0))), + Err(SampleError::CacheIdOutOfRange) + )); +} + +#[test] +fn slices_delegate_matching_volumes_and_isolate_reduced_child_failures() { + let mut context = SamplerContext::default(); + let slice = SliceSampler { + input: Arc::new(ConstantSampler(-0.0)), + axes: SliceAxes::Xz { x: 7, z: 9 }, + }; + for (sizes, minimum, delegated) in [ + ([1, 2, 1], [7, -64, 9], true), + ([1, 2, 1], [8, -64, 9], false), + ([2, 2, 1], [7, -64, 9], false), + ([1, 2, 2], [7, -64, 9], false), + ] { + let volume = DensityVolume::new(sizes, minimum, [4, 8, 16]).unwrap(); + let mut output = vec![19.0; volume.size() + 2]; + slice + .sample_volume(&mut context, &mut output, volume) + .unwrap(); + assert!( + output[..volume.size()] + .iter() + .all(|v| v.to_bits() == (-0.0_f32).to_bits()) + ); + let expected_tail = if delegated { -0.0_f32 } else { 19.0 }; + assert!( + output[volume.size()..] + .iter() + .all(|v| v.to_bits() == expected_tail.to_bits()) + ); + } + let failing = SliceSampler { + axes: SliceAxes::Y(3), + input: Arc::new(RangeChoiceSampler { + input: Arc::new(GradientSampler::new( + Axis::X, + TilingMode::Repeat, + 0, + 0, + 0.0, + 1.0, + )), + min_inclusive: 0.0, + max_exclusive: 1.0, + when_in_range: Arc::new(ConstantSampler(7.0)), + when_out_of_range: Arc::new(ConstantSampler(9.0)), + }), + }; + for (y, expected) in [(2, 19.0), (3, 7.0)] { + let volume = DensityVolume::new([1; 3], [0, y, 0], [4, 8, 16]).unwrap(); + let mut output = [19.0]; + assert_eq!( + failing.sample_volume(&mut context, &mut output, volume), + Err(SampleError::ZeroGradientPeriod) + ); + assert_eq!(output, [expected]); + } + assert!(!context.scratch.is_empty()); +} + +#[test] +fn slices_preserve_reduced_volume_steps_in_cached_children() { + let input = Arc::new( + CachingDensitySampler::new( + 0, + Arc::new(DistanceToPointSampler { + point: [0; 3], + metric: DistanceMetric::Manhattan, + }), + ) + .unwrap(), + ); + let mut context = SamplerContext::cached(); + let slice = SliceSampler { + input: input.clone(), + axes: SliceAxes::X(7), + }; + let volume = DensityVolume::new([3, 2, 2], [-17, -64, 32], [4, 8, 16]).unwrap(); + let mut output = vec![0.0; volume.size()]; + slice + .sample_volume(&mut context, &mut output, volume) + .unwrap(); + for z in 0..2 { + for x in 0..3 { + assert_eq!( + &output[(x + z * 3) * 2..(x + z * 3) * 2 + 2], + &[103.0 + z as f32 * 16.0, 95.0 + z as f32 * 16.0] + ); + } + } + // The following matching request must hit the cached reduced descriptor. + // A short logical output is still rejected before touching that child. + let reduced = DensityVolume::new([1, 2, 2], [7, -64, 32], [4, 8, 16]).unwrap(); + let mut reduced_output = [0.0; 4]; + input + .sample_volume(&mut context, &mut reduced_output, reduced) + .unwrap(); + assert_eq!(reduced_output, [103.0, 95.0, 119.0, 111.0]); + let mut short = [19.0]; + assert_eq!( + slice.sample_volume(&mut context, &mut short, volume), + Err(SampleError::Volume(DensityError::BufferTooShort)) + ); + assert_eq!(short, [19.0]); +} + +#[test] +fn grid_interpolation_keeps_incremental_bulk_rounding() { + let input = Arc::new(GradientSampler::new( + Axis::Y, + TilingMode::ClampToEdge, + 0, + 10, + 0.0, + 1.0, + )); + let sampler = InterpolatedSampler::new(input, 4, 10).unwrap(); + let mut context = SamplerContext::default(); + let volume = DensityVolume::new([1, 10, 1], [0; 3], [1; 3]).unwrap(); + let mut output = [19.0; 11]; + sampler + .sample_volume(&mut context, &mut output, volume) + .unwrap(); + assert_eq!(output[7].to_bits(), 0x3f333334); + assert_eq!( + sampler + .sample_value(&mut context, [0, 7, 0]) + .unwrap() + .to_bits(), + 0x3f333333 + ); + assert_eq!(output[10], 19.0); + let strided = DensityVolume::new([1, 5, 1], [0; 3], [1, 2, 1]).unwrap(); + let mut selected = [0.0; 5]; + sampler + .sample_volume(&mut context, &mut selected, strided) + .unwrap(); + for (i, value) in selected.iter().enumerate() { + assert_eq!(value.to_bits(), output[i * 2].to_bits()); + } +} + +#[test] +fn grid_interpolation_uses_child_bulk_corners_and_preserves_aligned_delegation() { + #[derive(Debug, Default)] + struct Traced { + volumes: std::sync::Mutex<Vec<DensityVolume>>, + points: std::sync::Mutex<Vec<[i32; 3]>>, + } + impl DensitySampler for Traced { + fn sample_value( + &self, + _: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + self.points.lock().unwrap().push(position); + Ok(-0.0) + } + fn sample_volume( + &self, + _: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + self.volumes.lock().unwrap().push(volume); + buffer.fill(-0.0); + Ok(()) + } + } + let traced = Arc::new(Traced::default()); + let sampler = InterpolatedSampler::new(traced.clone(), 4, 8).unwrap(); + let mut context = SamplerContext::default(); + assert_eq!( + sampler + .sample_value(&mut context, [-4, -8, 4]) + .unwrap() + .to_bits(), + (-0.0_f32).to_bits() + ); + sampler.sample_value(&mut context, [-1, -1, -1]).unwrap(); + assert_eq!(*traced.points.lock().unwrap(), [[-4, -8, 4]]); + assert_eq!( + *traced.volumes.lock().unwrap(), + [DensityVolume::new([2; 3], [-4, -8, -4], [4, 8, 4]).unwrap()] + ); + let volume = DensityVolume::new([2, 1, 2], [-4, -8, 4], [4, 1, 4]).unwrap(); + let mut output = [19.0; 6]; + sampler + .sample_volume(&mut context, &mut output, volume) + .unwrap(); + assert!(output.iter().all(|v| v.to_bits() == (-0.0_f32).to_bits())); + assert_eq!(traced.volumes.lock().unwrap()[1], volume); + assert!(InterpolatedSampler::new(traced.clone(), 0, 8).is_err()); + assert!(InterpolatedSampler::new(traced, 4, -1).is_err()); +} + +#[test] +fn surface_search_fixes_upper_bound_y_and_visits_descending_cell_boundaries() { + #[derive(Debug, Default)] + struct DensityTrace(std::sync::Mutex<Vec<[i32; 3]>>); + impl DensitySampler for DensityTrace { + fn sample_value( + &self, + _: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + self.0.lock().unwrap().push(position); + Ok(match position[1] { + 12 => f32::NAN, + 8 => -0.0, + _ => 1.0, + }) + } + } + let density = Arc::new(DensityTrace::default()); + let upper = Arc::new(GradientSampler::new( + Axis::Y, + TilingMode::ClampToEdge, + 0, + 10, + 14.0, + 54.0, + )); + let sampler = compile_surface_search(density.clone(), upper, -64, 4).unwrap(); + assert_eq!( + sampler.sample_value(&mut SamplerContext::default(), [7, 1000, -9]), + Ok(4.0) + ); + assert_eq!( + *density.0.lock().unwrap(), + [[7, 12, -9], [7, 8, -9], [7, 4, -9]] + ); + density.0.lock().unwrap().clear(); + let shortcut = + FindTopSurfaceSampler::new(density.clone(), Arc::new(ConstantSampler(-63.0)), -64, 8) + .unwrap(); + assert_eq!( + shortcut.sample_value(&mut SamplerContext::default(), [0; 3]), + Ok(-64.0) + ); + assert!(density.0.lock().unwrap().is_empty()); + let negative_infinity = FindTopSurfaceSampler::new( + density.clone(), + Arc::new(ConstantSampler(f32::NEG_INFINITY)), + -64, + 1, + ) + .unwrap(); + assert_eq!( + negative_infinity.sample_value(&mut SamplerContext::default(), [0; 3]), + Ok(-64.0) + ); + assert!(density.0.lock().unwrap().is_empty()); +} + +#[test] +fn surface_bulk_preserves_upper_bound_writes_and_sliced_error_isolation() { + #[derive(Debug)] + struct FailSecondColumn; + impl DensitySampler for FailSecondColumn { + fn sample_value( + &self, + _: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + if position[0] == 1 { + Err(SampleError::ZeroGradientPeriod) + } else { + Ok(if position[1] <= 4 { 1.0 } else { 0.0 }) + } + } + } + let raw = Arc::new( + FindTopSurfaceSampler::new( + Arc::new(FailSecondColumn), + Arc::new(ConstantSampler(14.0)), + -64, + 4, + ) + .unwrap(), + ); + let mut context = SamplerContext::default(); + let volume = DensityVolume::new([2, 1, 1], [0; 3], [1; 3]).unwrap(); + let mut output = [19.0; 3]; + assert_eq!( + raw.sample_volume(&mut context, &mut output, volume), + Err(SampleError::ZeroGradientPeriod) + ); + assert_eq!(output, [4.0, 14.0, 14.0]); + let volume = DensityVolume::new([2, 2, 1], [0; 3], [1; 3]).unwrap(); + let mut output = [19.0; 5]; + assert_eq!( + raw.sample_volume(&mut context, &mut output, volume), + Err(SampleError::SurfaceRequiresSingleLayer) + ); + assert_eq!(output, [19.0; 5]); + let sliced = SliceSampler { + input: raw, + axes: SliceAxes::Y(0), + }; + assert_eq!( + sliced.sample_volume(&mut context, &mut output, volume), + Err(SampleError::ZeroGradientPeriod) + ); + assert_eq!(output, [19.0; 5]); + assert!(!context.scratch.is_empty()); +} + +#[test] +fn spline_coordinate_cache_retries_nan_scalars_but_reuses_nan_volumes() { + use std::sync::atomic::{AtomicUsize, Ordering}; + #[derive(Debug)] + struct Counted { + value: f32, + scalar: AtomicUsize, + bulk: AtomicUsize, + } + impl DensitySampler for Counted { + fn sample_value(&self, _: &mut SamplerContext, _: [i32; 3]) -> Result<f32, SampleError> { + self.scalar.fetch_add(1, Ordering::Relaxed); + Ok(self.value) + } + fn sample_volume( + &self, + _: &mut SamplerContext, + output: &mut [f32], + _: DensityVolume, + ) -> Result<(), SampleError> { + self.bulk.fetch_add(1, Ordering::Relaxed); + output.fill(self.value); + Ok(()) + } + } + let inner = CubicSpline::multipoint( + 1, + vec![SplinePoint { + location: 0.0, + derivative: -0.0, + value: CubicSpline::Constant(7.0), + }], + ) + .unwrap(); + let root = CubicSpline::multipoint( + 1, + vec![ + SplinePoint { + location: -1.0, + derivative: 0.0, + value: inner.clone(), + }, + SplinePoint { + location: 1.0, + derivative: 0.0, + value: inner, + }, + ], + ) + .unwrap(); + for (value, scalar_calls) in [(0.0, 1), (f32::NAN, 2)] { + let input = Arc::new(Counted { + value, + scalar: AtomicUsize::new(0), + bulk: AtomicUsize::new(0), + }); + let sampler = + SplineSampler::new(&root, &[Arc::new(ConstantSampler(99.0)), input.clone()]).unwrap(); + assert_eq!(sampler.coordinate_count(), 1); + let mut context = SamplerContext::default(); + assert_eq!(sampler.sample_value(&mut context, [0; 3]), Ok(7.0)); + assert_eq!(input.scalar.load(Ordering::Relaxed), scalar_calls); + let volume = DensityVolume::new([2, 3, 2], [0; 3], [1; 3]).unwrap(); + let mut output = [19.0; 12]; + sampler + .sample_volume(&mut context, &mut output, volume) + .unwrap(); + assert_eq!(output, [7.0; 12]); + assert_eq!(input.bulk.load(Ordering::Relaxed), 1); + assert_eq!(input.scalar.load(Ordering::Relaxed), scalar_calls); + } + assert!(matches!( + SplineSampler::new(&root, &[]), + Err(SplineError::MissingCoordinate) + )); + assert!(matches!( + CubicSpline::multipoint(0, vec![]), + Err(SplineError::EmptyPoints) + )); +} + +#[test] +fn spline_lazy_branch_failure_preserves_completed_output_and_returns_scratch() { + let fail = CubicSpline::multipoint( + 1, + vec![SplinePoint { + location: 0.0, + derivative: 0.0, + value: CubicSpline::Constant(11.0), + }], + ) + .unwrap(); + let root = CubicSpline::multipoint( + 0, + vec![ + SplinePoint { + location: -1.0, + derivative: 0.0, + value: CubicSpline::Constant(7.0), + }, + SplinePoint { + location: 1.0, + derivative: 0.0, + value: fail, + }, + ], + ) + .unwrap(); + let inputs: Vec<Arc<dyn DensitySampler>> = vec![ + Arc::new(GradientSampler::new( + Axis::X, + TilingMode::ClampToEdge, + 0, + 1, + -2.0, + 0.0, + )), + Arc::new(GradientSampler::new( + Axis::X, + TilingMode::Repeat, + 0, + 0, + 0.0, + 1.0, + )), + ]; + let sampler = SplineSampler::new(&root, &inputs).unwrap(); + let mut context = SamplerContext::default(); + let volume = DensityVolume::new([2, 1, 1], [0; 3], [1; 3]).unwrap(); + let mut output = [19.0; 2]; + assert_eq!( + sampler.sample_volume(&mut context, &mut output, volume), + Err(SampleError::ZeroGradientPeriod) + ); + assert_eq!(output, [7.0, 19.0]); + assert_eq!(context.scratch.len(), 2); + assert_eq!(sampler.sample_value(&mut context, [0; 3]), Ok(7.0)); +} diff --git a/crates/horizon-core/src/density/world_fields.rs b/crates/horizon-core/src/density/world_fields.rs new file mode 100644 index 000000000..7709de819 --- /dev/null +++ b/crates/horizon-core/src/density/world_fields.rs @@ -0,0 +1,151 @@ +use super::*; + +/// Vanilla's three density fields, resolved at evaluation time rather than +/// during graph compilation. Their declared ranges do not inspect bindings. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum WorldField { + BlendAlpha, + BlendOffset, + Beardifier, +} +impl WorldField { + pub fn domain_axes(self) -> u8 { + match self { + Self::BlendAlpha | Self::BlendOffset => 5, + Self::Beardifier => 7, + } + } + pub fn range(self) -> Interval { + match self { + Self::BlendAlpha => Interval::new(0.0, 1.0).unwrap(), + Self::BlendOffset | Self::Beardifier => Interval::INFINITE, + } + } + fn fallback(self) -> f32 { + match self { + Self::BlendAlpha => 1.0, + Self::BlendOffset | Self::Beardifier => 0.0, + } + } +} + +/// Old-world blending provider. The full vanilla Blender data model and +/// distance-weighting algorithm are a separate, still pending implementation. +pub trait DensityBlender: std::fmt::Debug + Send + Sync { + fn is_empty(&self) -> bool; + fn blend_density(&self, position: [i32; 3], input: f32) -> f32; +} + +#[derive(Debug)] +pub struct EmptyBlender; +impl DensityBlender for EmptyBlender { + fn is_empty(&self) -> bool { + true + } + fn blend_density(&self, _: [i32; 3], input: f32) -> f32 { + input + } +} + +/// Bindings can be assembled and shared between workers. Attaching new +/// bindings consumes the worker context and invalidates its cached densities. +#[derive(Clone, Debug, Default)] +pub struct WorldFields { + samplers: [Option<Arc<dyn DensitySampler>>; 3], + blender: Option<Arc<dyn DensityBlender>>, +} +impl WorldFields { + pub fn with_field(mut self, field: WorldField, sampler: Arc<dyn DensitySampler>) -> Self { + self.samplers[field as usize] = Some(sampler); + self + } + pub fn with_blender(mut self, blender: Arc<dyn DensityBlender>) -> Self { + self.blender = Some(blender); + self + } +} +impl SamplerContext { + pub fn with_world_fields(mut self, fields: WorldFields) -> Self { + self.clear_caches(); + self.fields = fields; + self + } +} + +#[derive(Clone, Debug)] +pub struct ContextBoundSampler { + field: WorldField, + fallback: Arc<dyn DensitySampler>, +} +impl ContextBoundSampler { + pub fn new(field: WorldField) -> Self { + Self::with_fallback(field, Arc::new(ConstantSampler(field.fallback()))) + } + /// The vanilla sampler also permits a fallback supplied by its caller. + pub fn with_fallback(field: WorldField, fallback: Arc<dyn DensitySampler>) -> Self { + Self { field, fallback } + } + fn resolve(&self, context: &SamplerContext) -> Arc<dyn DensitySampler> { + context.fields.samplers[self.field as usize] + .as_ref() + .unwrap_or(&self.fallback) + .clone() + } +} +impl DensitySampler for ContextBoundSampler { + fn sample_value( + &self, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + self.resolve(context).sample_value(context, position) + } + fn sample_volume( + &self, + context: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + self.resolve(context).sample_volume(context, buffer, volume) + } +} + +#[derive(Clone, Debug)] +pub struct BlendDensitySampler { + pub input: Arc<dyn DensitySampler>, +} +impl DensitySampler for BlendDensitySampler { + fn sample_value( + &self, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + let input = self.input.sample_value(context, position)?; + let Some(blender) = &context.fields.blender else { + return Ok(input); + }; + Ok(if blender.is_empty() { + input + } else { + blender.blend_density(position, input) + }) + } + fn sample_volume( + &self, + context: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + self.input.sample_volume(context, buffer, volume)?; + let Some(blender) = &context.fields.blender else { + return Ok(()); + }; + if blender.is_empty() { + return Ok(()); + } + visit(volume, |index, position| { + buffer[index] = blender.blend_density(position, buffer[index]); + Ok(()) + }) + } +} diff --git a/crates/horizon-core/src/geometry/border.rs b/crates/horizon-core/src/geometry/border.rs new file mode 100644 index 000000000..156b5804d --- /dev/null +++ b/crates/horizon-core/src/geometry/border.rs @@ -0,0 +1,266 @@ +//! Pinned world-border extent geometry and tick-driven size interpolation. +//! Saved-data codecs, listeners, damage and synchronization are separate layers. +use super::{Aabb, ShapeError, ShapeOp, Vec3, VoxelShape, clamp, java_max, java_min}; + +#[derive(Debug)] +pub enum BorderError { + InvalidParameters, + Shape(ShapeError), +} +impl std::fmt::Display for BorderError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self {Self::InvalidParameters=>f.write_str("border requires finite nonnegative sizes, finite centers and nonnegative limits/duration"),Self::Shape(e)=>e.fmt(f)} + } +} +impl std::error::Error for BorderError {} +impl From<ShapeError> for BorderError { + fn from(e: ShapeError) -> Self { + Self::Shape(e) + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BorderStatus { + Stationary, + Growing, + Shrinking, +} +#[derive(Clone)] +enum Extent { + Static { + size: f64, + bounds: [f64; 4], + shape: VoxelShape, + }, + Moving { + from: f64, + to: f64, + duration: i64, + remaining: i64, + size: f64, + previous: f64, + }, +} +pub struct BorderGeometry { + center: [f64; 2], + absolute_max: i32, + extent: Extent, +} +impl BorderGeometry { + pub fn new(center: [f64; 2], size: f64, absolute_max: i32) -> Result<Self, BorderError> { + if !center.into_iter().all(f64::is_finite) + || !size.is_finite() + || size < 0.0 + || absolute_max < 0 + { + return Err(BorderError::InvalidParameters); + } + Ok(Self { + center, + absolute_max, + extent: Self::stationary(center, size, absolute_max)?, + }) + } + fn stationary(center: [f64; 2], size: f64, absolute_max: i32) -> Result<Extent, BorderError> { + let bounds = Self::extent_bounds(center, size, absolute_max); + Ok(Extent::Static { + size, + bounds, + shape: Self::shape_for(bounds)?, + }) + } + fn extent_bounds(center: [f64; 2], size: f64, absolute_max: i32) -> [f64; 4] { + let limit = f64::from(absolute_max); + let lower = f64::from(-absolute_max); + [ + clamp(center[0] - size / 2.0, lower, limit), + clamp(center[1] - size / 2.0, lower, limit), + clamp(center[0] + size / 2.0, lower, limit), + clamp(center[1] + size / 2.0, lower, limit), + ] + } + fn shape_for([min_x, min_z, max_x, max_z]: [f64; 4]) -> Result<VoxelShape, ShapeError> { + let infinity = VoxelShape::from_box(Aabb::new( + Vec3::new(f64::NEG_INFINITY, f64::NEG_INFINITY, f64::NEG_INFINITY), + Vec3::new(f64::INFINITY, f64::INFINITY, f64::INFINITY), + ))?; + let inside = VoxelShape::from_box(Aabb::new( + Vec3::new(min_x.floor(), f64::NEG_INFINITY, min_z.floor()), + Vec3::new(max_x.ceil(), f64::INFINITY, max_z.ceil()), + ))?; + infinity.join(&inside, ShapeOp::ONLY_FIRST) + } + pub fn center(&self) -> [f64; 2] { + self.center + } + pub fn set_center(&mut self, center: [f64; 2]) -> Result<(), BorderError> { + if !center.into_iter().all(f64::is_finite) { + return Err(BorderError::InvalidParameters); + } + if let Extent::Static { size, .. } = self.extent { + self.extent = Self::stationary(center, size, self.absolute_max)?; + } + self.center = center; + Ok(()) + } + pub fn set_absolute_max(&mut self, limit: i32) -> Result<(), BorderError> { + if limit < 0 { + return Err(BorderError::InvalidParameters); + } + if let Extent::Static { size, .. } = self.extent { + self.extent = Self::stationary(self.center, size, limit)?; + } + self.absolute_max = limit; + Ok(()) + } + pub fn set_size(&mut self, size: f64) -> Result<(), BorderError> { + if !size.is_finite() || size < 0.0 { + return Err(BorderError::InvalidParameters); + } + self.extent = Self::stationary(self.center, size, self.absolute_max)?; + Ok(()) + } + /// Native start/end tick timestamps cancel in the exposed speed calculation; + /// progress itself advances by one per tick, independently of wall time. + pub fn lerp_size_between( + &mut self, + from: f64, + to: f64, + duration: i64, + ) -> Result<(), BorderError> { + if !from.is_finite() || !to.is_finite() || from < 0.0 || to < 0.0 || duration < 0 { + return Err(BorderError::InvalidParameters); + } + if from == to { + return self.set_size(to); + } + let size = Self::moving_size(from, to, duration, duration); + self.extent = Extent::Moving { + from, + to, + duration, + remaining: duration, + size, + previous: size, + }; + Ok(()) + } + fn moving_size(from: f64, to: f64, duration: i64, remaining: i64) -> f64 { + let fraction = (duration as f64 - remaining as f64) / duration as f64; + if fraction < 1.0 { + from + fraction * (to - from) + } else { + to + } + } + pub fn tick(&mut self) -> Result<(), BorderError> { + if let Extent::Moving { + from, + to, + duration, + remaining, + size, + previous, + } = &mut self.extent + { + *remaining = remaining.wrapping_sub(1); + *previous = *size; + *size = Self::moving_size(*from, *to, *duration, *remaining); + if *remaining <= 0 { + self.extent = Self::stationary(self.center, *to, self.absolute_max)?; + } + } + Ok(()) + } + pub fn size(&self) -> f64 { + match self.extent { + Extent::Static { size, .. } | Extent::Moving { size, .. } => size, + } + } + pub fn lerp_target(&self) -> f64 { + match self.extent { + Extent::Static { size, .. } => size, + Extent::Moving { to, .. } => to, + } + } + pub fn lerp_time(&self) -> i64 { + match self.extent { + Extent::Static { .. } => 0, + Extent::Moving { remaining, .. } => remaining, + } + } + pub fn lerp_speed(&self) -> f64 { + match self.extent { + Extent::Static { .. } => 0.0, + Extent::Moving { + from, to, duration, .. + } => (from - to).abs() / duration as f64, + } + } + pub fn status(&self) -> BorderStatus { + match self.extent { + Extent::Static { .. } => BorderStatus::Stationary, + Extent::Moving { from, to, .. } => { + if to < from { + BorderStatus::Shrinking + } else { + BorderStatus::Growing + } + } + } + } + /// [minX, minZ, maxX, maxZ]. Ordinary collision bounds use partial_tick=0, + /// hence the previous size while moving. Static extents ignore partial_tick. + pub fn bounds(&self, partial_tick: f32) -> [f64; 4] { + match self.extent { + Extent::Static { bounds, .. } => bounds, + Extent::Moving { size, previous, .. } => Self::extent_bounds( + self.center, + previous + f64::from(partial_tick) * (size - previous), + self.absolute_max, + ), + } + } + pub fn collision_shape(&self) -> Result<VoxelShape, ShapeError> { + match &self.extent { + Extent::Static { shape, .. } => Ok(shape.clone()), + Extent::Moving { .. } => Self::shape_for(self.bounds(0.0)), + } + } + pub fn distance_to_border(&self, x: f64, z: f64) -> f64 { + let [min_x, min_z, max_x, max_z] = self.bounds(0.0); + java_min( + java_min(java_min(x - min_x, max_x - x), z - min_z), + max_z - z, + ) + } + pub fn is_within_bounds(&self, x: f64, z: f64, margin: f64) -> bool { + let [min_x, min_z, max_x, max_z] = self.bounds(0.0); + x >= min_x - margin && x < max_x + margin && z >= min_z - margin && z < max_z + margin + } + pub fn is_inside_close_to_border(&self, entity_x: f64, entity_z: f64, bounds: Aabb) -> bool { + let size = bounds.size(); + let margin = java_max(java_max(size.x.abs(), size.z.abs()), 1.0); + self.distance_to_border(entity_x, entity_z) < margin * 2.0 + && self.is_within_bounds(entity_x, entity_z, margin) + } +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn invalid_parameters_leave_existing_extent_unchanged() { + let mut border = BorderGeometry::new([1.0, 2.0], 10.0, 100).unwrap(); + let bounds = border.bounds(0.0); + assert!(border.set_center([f64::NAN, 0.0]).is_err()); + assert!(border.set_size(-1.0).is_err()); + assert!(border.set_size(f64::INFINITY).is_err()); + assert!(border.set_absolute_max(-1).is_err()); + assert!(border.lerp_size_between(10.0, 20.0, -1).is_err()); + assert!(border.lerp_size_between(10.0, f64::NAN, 1).is_err()); + assert_eq!(border.bounds(0.0), bounds); + assert_eq!(border.center(), [1.0, 2.0]); + assert_eq!(border.size(), 10.0); + assert_eq!(border.status(), BorderStatus::Stationary); + } +} diff --git a/crates/horizon-core/src/geometry/mod.rs b/crates/horizon-core/src/geometry/mod.rs new file mode 100644 index 000000000..f8ad81331 --- /dev/null +++ b/crates/horizon-core/src/geometry/mod.rs @@ -0,0 +1,657 @@ +//! Double-precision simulation geometry for the pinned Java Edition target. +//! +//! Operation order and Java floating-point edge cases are deliberate. These are +//! simulation coordinates; rendering may use a separate camera-relative format. + +pub mod border; +mod movement; +mod shape; +mod sweep; +mod traversal; +pub mod trig; +use crate::position::BlockPos; +pub use movement::{ + block_floor_height, candidate_step_heights, entity_collision_bounds, resolve_shape_movement, + resolve_step_movement, try_resolve_step_movement, +}; +pub use shape::{ShapeError, ShapeOp, VoxelShape}; +pub use sweep::sweep_intersected_blocks; +pub use traversal::{TraversalError, traverse_blocks}; + +pub const COLLISION_EPSILON: f64 = 1.0e-7; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(usize)] +pub enum Axis { + X, + Y, + Z, +} + +impl Axis { + pub const ALL: [Self; 3] = [Self::X, Self::Y, Self::Z]; + pub fn step_order(movement: Vec3) -> [Self; 3] { + if movement.x.abs() < movement.z.abs() { + [Self::Y, Self::Z, Self::X] + } else { + [Self::Y, Self::X, Self::Z] + } + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum Direction { + Down, + Up, + North, + South, + West, + East, +} + +impl Direction { + pub const ALL: [Self; 6] = [ + Self::Down, + Self::Up, + Self::North, + Self::South, + Self::West, + Self::East, + ]; + pub const fn opposite(self) -> Self { + match self { + Self::Down => Self::Up, + Self::Up => Self::Down, + Self::North => Self::South, + Self::South => Self::North, + Self::West => Self::East, + Self::East => Self::West, + } + } + pub const fn normal(self) -> [i32; 3] { + match self { + Self::Down => [0, -1, 0], + Self::Up => [0, 1, 0], + Self::North => [0, 0, -1], + Self::South => [0, 0, 1], + Self::West => [-1, 0, 0], + Self::East => [1, 0, 0], + } + } + pub fn approximate_nearest(vector: Vec3) -> Self { + let [x, y, z] = vector.components().map(|v| v as f32); + let mut best = f32::from_bits(1); + let mut result = Self::North; + for direction in Self::ALL { + let [nx, ny, nz] = direction.normal().map(|v| v as f32); + let dot = x * nx + y * ny + z * nz; + if dot > best { + best = dot; + result = direction; + } + } + result + } +} + +/// Component equality follows Java Double.compare, including NaNs and -0.0. +#[derive(Clone, Copy, Debug, Default)] +pub struct Vec3 { + pub x: f64, + pub y: f64, + pub z: f64, +} + +impl PartialEq for Vec3 { + fn eq(&self, other: &Self) -> bool { + self.components() + .into_iter() + .zip(other.components()) + .all(|(a, b)| canonical_bits(a) == canonical_bits(b)) + } +} +impl Vec3 { + pub const ZERO: Self = Self::new(0.0, 0.0, 0.0); + pub const fn new(x: f64, y: f64, z: f64) -> Self { + Self { x, y, z } + } + pub const fn components(self) -> [f64; 3] { + [self.x, self.y, self.z] + } + pub fn component(self, axis: Axis) -> f64 { + self.components()[axis as usize] + } + pub fn from_block(pos: BlockPos) -> Self { + Self::new(pos.x as f64, pos.y as f64, pos.z as f64) + } + pub fn add_vector(self, other: Self) -> Self { + Self::new(self.x + other.x, self.y + other.y, self.z + other.z) + } + pub fn subtract(self, other: Self) -> Self { + self.add_vector(Self::new(-other.x, -other.y, -other.z)) + } + pub fn vector_to(self, other: Self) -> Self { + Self::new(other.x - self.x, other.y - self.y, other.z - self.z) + } + pub fn multiply(self, other: Self) -> Self { + Self::new(self.x * other.x, self.y * other.y, self.z * other.z) + } + pub fn scale(self, scale: f64) -> Self { + self.multiply(Self::new(scale, scale, scale)) + } + pub fn reverse(self) -> Self { + self.scale(-1.0) + } + pub fn horizontal(self) -> Self { + Self::new(self.x, 0.0, self.z) + } + pub fn dot(self, other: Self) -> f64 { + self.x * other.x + self.y * other.y + self.z * other.z + } + pub fn cross(self, other: Self) -> Self { + Self::new( + self.y * other.z - self.z * other.y, + self.z * other.x - self.x * other.z, + self.x * other.y - self.y * other.x, + ) + } + pub fn length_squared(self) -> f64 { + self.x * self.x + self.y * self.y + self.z * self.z + } + pub fn length(self) -> f64 { + self.length_squared().sqrt() + } + pub fn horizontal_distance_squared(self) -> f64 { + self.x * self.x + self.z * self.z + } + pub fn horizontal_distance(self) -> f64 { + self.horizontal_distance_squared().sqrt() + } + pub fn distance_squared(self, other: Self) -> f64 { + let x = self.x - other.x; + let y = self.y - other.y; + let z = self.z - other.z; + x * x + y * y + z * z + } + pub fn distance(self, other: Self) -> f64 { + self.distance_squared(other).sqrt() + } + pub fn normalize(self) -> Self { + let length = self.length(); + if length < 9.999999747378752e-6 { + Self::ZERO + } else { + Self::new(self.x / length, self.y / length, self.z / length) + } + } + pub fn lerp(self, other: Self, amount: f64) -> Self { + Self::new( + lerp(amount, self.x, other.x), + lerp(amount, self.y, other.y), + lerp(amount, self.z, other.z), + ) + } + pub fn projected_on(self, other: Self) -> Self { + if other.length_squared() == 0.0 { + other + } else { + other + .scale(self.dot(other)) + .scale(1.0 / other.length_squared()) + } + } + pub fn closer_than(self, other: Self, distance: f64) -> bool { + self.distance_squared(other) < distance * distance + } + pub fn is_finite(self) -> bool { + self.x.is_finite() && self.y.is_finite() && self.z.is_finite() + } + pub fn with_component(self, axis: Axis, value: f64) -> Self { + let mut coordinates = self.components(); + coordinates[axis as usize] = value; + Self::new(coordinates[0], coordinates[1], coordinates[2]) + } + pub fn align(self, axes: [bool; 3]) -> Self { + let coordinates = std::array::from_fn::<_, 3, _>(|i| { + if axes[i] { + floor_i32(self.components()[i]) as f64 + } else { + self.components()[i] + } + }); + Self::new(coordinates[0], coordinates[1], coordinates[2]) + } + pub fn relative(self, direction: Direction, distance: f64) -> Self { + let normal = direction.normal(); + Self::new( + self.x + distance * normal[0] as f64, + self.y + distance * normal[1] as f64, + self.z + distance * normal[2] as f64, + ) + } + pub fn rotate_x(self, angle: f32) -> Self { + let c = trig::cos(angle as f64) as f64; + let s = trig::sin(angle as f64) as f64; + Self::new(self.x, self.y * c + self.z * s, self.z * c - self.y * s) + } + pub fn rotate_y(self, angle: f32) -> Self { + let c = trig::cos(angle as f64) as f64; + let s = trig::sin(angle as f64) as f64; + Self::new(self.x * c + self.z * s, self.y, self.z * c - self.x * s) + } + pub fn rotate_z(self, angle: f32) -> Self { + let c = trig::cos(angle as f64) as f64; + let s = trig::sin(angle as f64) as f64; + Self::new(self.x * c + self.y * s, self.y * c - self.x * s, self.z) + } + pub fn rotate_clockwise_90(self) -> Self { + Self::new(-self.z, self.y, self.x) + } + pub fn direction_from_rotation(pitch: f32, yaw: f32) -> Self { + let yaw_radians = -yaw * trig::DEG_TO_RAD - std::f32::consts::PI; + let cy = trig::cos(yaw_radians as f64); + let sy = trig::sin(yaw_radians as f64); + let pitch_radians = -pitch * trig::DEG_TO_RAD; + let cp = -trig::cos(pitch_radians as f64); + let sp = trig::sin(pitch_radians as f64); + Self::new((sy * cp) as f64, sp as f64, (cy * cp) as f64) + } + /// Return vanilla's (pitch, yaw) float pair in degrees. + pub fn rotation(self) -> [f32; 2] { + let yaw = ((-self.x).atan2(self.z) as f32) * trig::RAD_TO_DEG; + let pitch = ((-self.y / self.length()).asin() as f32) * trig::RAD_TO_DEG; + [pitch, yaw] + } +} + +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct Aabb { + min: Vec3, + max: Vec3, +} + +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct BlockHit { + pub location: Vec3, + pub direction: Direction, + pub block: BlockPos, + pub inside: bool, +} + +impl Aabb { + pub fn new(min: Vec3, max: Vec3) -> Self { + Self { + min: Vec3::new( + java_min(min.x, max.x), + java_min(min.y, max.y), + java_min(min.z, max.z), + ), + max: Vec3::new( + java_max(min.x, max.x), + java_max(min.y, max.y), + java_max(min.z, max.z), + ), + } + } + pub fn block(pos: BlockPos) -> Self { + Self::new(Vec3::from_block(pos), Vec3::from_block(pos.offset(1, 1, 1))) + } + pub fn unit_cube(lower: Vec3) -> Self { + Self::new(lower, lower.add_vector(Vec3::new(1.0, 1.0, 1.0))) + } + pub fn of_size(center: Vec3, size: Vec3) -> Self { + Self::new( + Vec3::new( + center.x - size.x / 2.0, + center.y - size.y / 2.0, + center.z - size.z / 2.0, + ), + Vec3::new( + center.x + size.x / 2.0, + center.y + size.y / 2.0, + center.z + size.z / 2.0, + ), + ) + } + pub fn encapsulating_blocks(a: BlockPos, b: BlockPos) -> Self { + Self::new( + Vec3::from_block(BlockPos::new(a.x.min(b.x), a.y.min(b.y), a.z.min(b.z))), + Vec3::from_block(BlockPos::new( + a.x.max(b.x).wrapping_add(1), + a.y.max(b.y).wrapping_add(1), + a.z.max(b.z).wrapping_add(1), + )), + ) + } + pub const fn min_position(self) -> Vec3 { + self.min + } + pub const fn max_position(self) -> Vec3 { + self.max + } + pub fn min(self, axis: Axis) -> f64 { + self.min.component(axis) + } + pub fn max(self, axis: Axis) -> f64 { + self.max.component(axis) + } + pub fn with_min(self, axis: Axis, value: f64) -> Self { + let mut a = self.min.components(); + a[axis as usize] = value; + Self::new(Vec3::new(a[0], a[1], a[2]), self.max) + } + pub fn with_max(self, axis: Axis, value: f64) -> Self { + let mut a = self.max.components(); + a[axis as usize] = value; + Self::new(self.min, Vec3::new(a[0], a[1], a[2])) + } + pub fn size(self) -> Vec3 { + self.min.vector_to(self.max) + } + pub fn average_size(self) -> f64 { + let v = self.size(); + (v.x + v.y + v.z) / 3.0 + } + pub fn center(self) -> Vec3 { + self.min.lerp(self.max, 0.5) + } + pub fn bottom_center(self) -> Vec3 { + let v = self.center(); + Vec3::new(v.x, self.min.y, v.z) + } + pub fn move_by(self, offset: Vec3) -> Self { + Self::new(self.min.add_vector(offset), self.max.add_vector(offset)) + } + pub fn inflate(self, amount: Vec3) -> Self { + Self::new( + Vec3::new( + self.min.x - amount.x, + self.min.y - amount.y, + self.min.z - amount.z, + ), + self.max.add_vector(amount), + ) + } + pub fn deflate(self, amount: Vec3) -> Self { + self.inflate(amount.reverse()) + } + pub fn expand_towards(self, amount: Vec3) -> Self { + self.change_extent(amount, false) + } + pub fn contract(self, amount: Vec3) -> Self { + self.change_extent(amount, true) + } + fn change_extent(self, amount: Vec3, contract: bool) -> Self { + let mut min = self.min.components(); + let mut max = self.max.components(); + for (i, v) in amount.components().into_iter().enumerate() { + if v < 0.0 { + min[i] = if contract { min[i] - v } else { min[i] + v }; + } else if v > 0.0 { + max[i] = if contract { max[i] - v } else { max[i] + v }; + } + } + Self::new( + Vec3::new(min[0], min[1], min[2]), + Vec3::new(max[0], max[1], max[2]), + ) + } + pub fn intersect(self, other: Self) -> Self { + Self::new( + Vec3::new( + java_max(self.min.x, other.min.x), + java_max(self.min.y, other.min.y), + java_max(self.min.z, other.min.z), + ), + Vec3::new( + java_min(self.max.x, other.max.x), + java_min(self.max.y, other.max.y), + java_min(self.max.z, other.max.z), + ), + ) + } + pub fn union_bounds(self, other: Self) -> Self { + Self::new( + Vec3::new( + java_min(self.min.x, other.min.x), + java_min(self.min.y, other.min.y), + java_min(self.min.z, other.min.z), + ), + Vec3::new( + java_max(self.max.x, other.max.x), + java_max(self.max.y, other.max.y), + java_max(self.max.z, other.max.z), + ), + ) + } + pub fn intersects(self, other: Self) -> bool { + self.min.x < other.max.x + && self.max.x > other.min.x + && self.min.y < other.max.y + && self.max.y > other.min.y + && self.min.z < other.max.z + && self.max.z > other.min.z + } + pub fn contains(self, point: Vec3) -> bool { + point.x >= self.min.x + && point.x < self.max.x + && point.y >= self.min.y + && point.y < self.max.y + && point.z >= self.min.z + && point.z < self.max.z + } + pub fn has_nan(self) -> bool { + self.min + .components() + .into_iter() + .chain(self.max.components()) + .any(f64::is_nan) + } + pub fn distance_squared_to_point(self, point: Vec3) -> f64 { + let distances = Axis::ALL.map(|a| { + java_max( + java_max( + self.min(a) - point.component(a), + point.component(a) - self.max(a), + ), + 0.0, + ) + }); + distances[0] * distances[0] + distances[1] * distances[1] + distances[2] * distances[2] + } + pub fn distance_squared_to_box(self, other: Self) -> f64 { + let distances = Axis::ALL.map(|a| { + java_max( + java_max(self.min(a) - other.max(a), other.min(a) - self.max(a)), + 0.0, + ) + }); + distances[0] * distances[0] + distances[1] * distances[1] + distances[2] * distances[2] + } + pub fn next_deflated(self) -> Self { + let lo = self.min.components().map(next_up); + let hi = self.max.components().map(next_down); + Self::new( + Vec3::new(lo[0], lo[1], lo[2]), + Vec3::new(hi[0], hi[1], hi[2]), + ) + } + fn clip_direction(self, start: Vec3, delta: Vec3, best: &mut f64) -> Option<Direction> { + let mut result = None; + for axis in Axis::ALL { + let i = axis as usize; + let j = (i + 1) % 3; + let k = (i + 2) % 3; + let ds = delta.components(); + let origins = start.components(); + let (plane, face) = if ds[i] > COLLISION_EPSILON { + ( + self.min(axis), + [Direction::West, Direction::Down, Direction::North][i], + ) + } else if ds[i] < -COLLISION_EPSILON { + ( + self.max(axis), + [Direction::East, Direction::Up, Direction::South][i], + ) + } else { + continue; + }; + let t = (plane - origins[i]) / ds[i]; + let u = origins[j] + t * ds[j]; + let v = origins[k] + t * ds[k]; + if 0.0 < t + && t < *best + && self.min.components()[j] - COLLISION_EPSILON < u + && u < self.max.components()[j] + COLLISION_EPSILON + && self.min.components()[k] - COLLISION_EPSILON < v + && v < self.max.components()[k] + COLLISION_EPSILON + { + *best = t; + result = Some(face); + } + } + result + } + pub fn clip(self, start: Vec3, end: Vec3) -> Option<Vec3> { + let delta = start.vector_to(end); + let mut best = 1.0; + self.clip_direction(start, delta, &mut best) + .map(|_| start.add_vector(delta.scale(best))) + } + pub fn clip_boxes( + boxes: impl IntoIterator<Item = Self>, + start: Vec3, + end: Vec3, + block: BlockPos, + ) -> Option<BlockHit> { + let delta = start.vector_to(end); + let mut best = 1.0; + let mut direction = None; + for aabb in boxes { + if let Some(face) = aabb + .move_by(Vec3::from_block(block)) + .clip_direction(start, delta, &mut best) + { + direction = Some(face); + } + } + direction.map(|face| BlockHit { + location: start.add_vector(delta.scale(best)), + direction: face, + block, + inside: false, + }) + } + pub fn collided_along_vector(self, movement: Vec3, boxes: &[Self]) -> bool { + let start = self.center(); + let end = start.add_vector(movement); + let amount = self.size().scale(0.5).subtract(Vec3::new( + COLLISION_EPSILON, + COLLISION_EPSILON, + COLLISION_EPSILON, + )); + boxes.iter().any(|b| { + let b = b.inflate(amount); + b.contains(end) || b.contains(start) || b.clip(start, end).is_some() + }) + } +} + +pub(crate) fn java_min(a: f64, b: f64) -> f64 { + if a.is_nan() { + a + } else if b.is_nan() { + b + } else if a == 0.0 && b == 0.0 { + f64::from_bits(a.to_bits() | b.to_bits()) + } else if a <= b { + a + } else { + b + } +} +pub(crate) fn java_max(a: f64, b: f64) -> f64 { + if a.is_nan() { + a + } else if b.is_nan() { + b + } else if a == 0.0 && b == 0.0 { + f64::from_bits(a.to_bits() & b.to_bits()) + } else if a >= b { + a + } else { + b + } +} +pub(crate) fn clamp(value: f64, min: f64, max: f64) -> f64 { + if value < min { + min + } else { + java_min(value, max) + } +} +pub(crate) fn floor_i32(value: f64) -> i32 { + value.floor() as i32 +} +fn lerp(amount: f64, start: f64, end: f64) -> f64 { + start + amount * (end - start) +} +fn canonical_bits(value: f64) -> u64 { + if value.is_nan() { + 0x7ff8_0000_0000_0000 + } else { + value.to_bits() + } +} +fn next_up(value: f64) -> f64 { + if value.is_nan() || value == f64::INFINITY { + value + } else if value == 0.0 { + f64::from_bits(1) + } else { + f64::from_bits(if value > 0.0 { + value.to_bits() + 1 + } else { + value.to_bits() - 1 + }) + } +} +fn next_down(value: f64) -> f64 { + -next_up(-value) +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn ray_faces_and_half_open_bounds() { + let b = Aabb::block(BlockPos::new(0, 0, 0)); + assert!(b.contains(Vec3::ZERO)); + assert!(!b.contains(Vec3::new(1.0, 0.0, 0.0))); + assert_eq!( + b.clip(Vec3::new(-1.0, 0.5, 0.5), Vec3::new(2.0, 0.5, 0.5)), + Some(Vec3::new(0.0, 0.5, 0.5)) + ); + assert!( + b.clip(Vec3::new(0.5, 0.5, 0.5), Vec3::new(2.0, 0.5, 0.5)) + .is_none() + ); + assert!( + b.clip(Vec3::new(-1.0, 0.5, 0.5), Vec3::new(0.0, 0.5, 0.5)) + .is_none() + ); + } + #[test] + fn numerical_boundaries() { + assert_eq!(java_min(0.0, -0.0).to_bits(), (-0.0f64).to_bits()); + assert_eq!(java_max(0.0, -0.0).to_bits(), 0.0f64.to_bits()); + assert_eq!(Vec3::new(-0.0, 0.0, 0.0).normalize(), Vec3::ZERO); + assert_ne!(Vec3::new(-0.0, 0.0, 0.0), Vec3::ZERO); + let b = Aabb::block(BlockPos::new(i32::MAX, 0, 0)); + assert_eq!(b.min(Axis::X), i32::MIN as f64); + assert_eq!(b.max(Axis::X), i32::MAX as f64); + assert!(Aabb::new(Vec3::new(f64::NAN, 0.0, 0.0), Vec3::new(1.0, 1.0, 1.0)).has_nan()); + } +} diff --git a/crates/horizon-core/src/geometry/movement.rs b/crates/horizon-core/src/geometry/movement.rs new file mode 100644 index 000000000..ec0843203 --- /dev/null +++ b/crates/horizon-core/src/geometry/movement.rs @@ -0,0 +1,284 @@ +//! Entity geometry helpers operating on an already selected collider list. +use super::{Aabb, Axis, Vec3, VoxelShape}; + +/// BlockGetter's floor-height decision for caller-selected collision shapes. +/// The lower block is queried lazily only if the current shape is empty. +pub fn block_floor_height<'s>(shape: &VoxelShape, below: impl FnOnce() -> &'s VoxelShape) -> f64 { + if !shape.is_empty() { + return shape.max(Axis::Y); + } + let height = below().max(Axis::Y); + if height >= 1.0 { + height - 1.0 + } else { + f64::NEG_INFINITY + } +} + +/// Bounds used once by Entity.collide to select entity collisions. The same +/// entity list is reused for both subsequent block/world-border queries. +pub fn entity_collision_bounds(movement: Vec3, aabb: Aabb, max_step: f32) -> Aabb { + aabb.expand_towards(movement) + .expand_towards(Vec3::new(0.0, max_step as f64, 0.0)) +} + +/// Resolve Entity.collide's initial movement and complete step-up decision. +/// +/// `collect` supplies vanilla-equivalent colliders for each requested bound, +/// including the previously selected entity shapes, applicable world border, +/// and context-dependent block shapes in vanilla order. It is called for the +/// initial movement (unless its squared length is zero), then at most once +/// more if stepping is eligible. Entity collision selection and movement's +/// grounding/velocity/inside-block side effects belong to the caller. +pub fn resolve_step_movement<'s>( + movement: Vec3, + aabb: Aabb, + max_step: f32, + on_ground: bool, + mut collect: impl FnMut(Aabb) -> Vec<&'s VoxelShape>, +) -> Vec3 { + try_resolve_step_movement(movement, aabb, max_step, on_ground, |bounds| { + Ok::<_, std::convert::Infallible>(collect(bounds)) + }) + .unwrap_or_else(|never| match never {}) +} + +/// The same movement/step decision with fallible, owned or borrowed collider +/// collections. A provider failure stops before the next query and returns no +/// movement result. Existing world-query side effects are not rolled back. +pub fn try_resolve_step_movement<S: std::borrow::Borrow<VoxelShape>, E>( + movement: Vec3, + aabb: Aabb, + max_step: f32, + on_ground: bool, + mut collect: impl FnMut(Aabb) -> Result<Vec<S>, E>, +) -> Result<Vec3, E> { + let resolved = if movement.length_squared() == 0.0 { + movement + } else { + let shapes = collect(aabb.expand_towards(movement))?; + resolve_borrowed_shape_movement(movement, aabb, &shapes) + }; + let landed = movement.y != resolved.y && movement.y < 0.0; + if max_step > 0.0 + && (landed || on_ground) + && (movement.x != resolved.x || movement.z != resolved.z) + { + let step_box = if landed { + aabb.move_by(Vec3::new(0.0, resolved.y, 0.0)) + } else { + aabb + }; + let mut query = step_box.expand_towards(Vec3::new(movement.x, max_step as f64, movement.z)); + if !landed { + query = query.expand_towards(Vec3::new(0.0, -(1.0e-5_f32 as f64), 0.0)); + } + let shapes = collect(query)?; + for height in borrowed_step_heights(step_box, &shapes, max_step, resolved.y as f32) { + let candidate = resolve_borrowed_shape_movement( + Vec3::new(movement.x, height as f64, movement.z), + step_box, + &shapes, + ); + if candidate.horizontal_distance_squared() > resolved.horizontal_distance_squared() { + return Ok(candidate.subtract(Vec3::new( + 0.0, + aabb.min(Axis::Y) - step_box.min(Axis::Y), + 0.0, + ))); + } + } + } + Ok(resolved) +} + +/// Resolve vanilla's Y-first, magnitude-dependent horizontal axis ordering. +/// +/// The caller must supply vanilla-equivalent block/entity/world-border shapes. +/// This helper does not collect shapes, step up, set grounded flags, modify +/// velocity, or apply inside-block effects. +pub fn resolve_shape_movement(movement: Vec3, aabb: Aabb, shapes: &[&VoxelShape]) -> Vec3 { + resolve_borrowed_shape_movement(movement, aabb, shapes) +} +fn resolve_borrowed_shape_movement<S: std::borrow::Borrow<VoxelShape>>( + movement: Vec3, + aabb: Aabb, + shapes: &[S], +) -> Vec3 { + if shapes.is_empty() { + return movement; + } + let mut result = [0.0; 3]; + for axis in Axis::step_order(movement) { + let amount = movement.component(axis); + if amount == 0.0 { + continue; + } + let moved = aabb.move_by(Vec3::new(result[0], result[1], result[2])); + result[axis as usize] = VoxelShape::collide_all( + axis, + moved, + shapes.iter().map(std::borrow::Borrow::borrow), + amount, + ); + } + Vec3::new(result[0], result[1], result[2]) +} + +/// Candidate heights from Entity.collectCandidateStepUpHeights, including its +/// float narrowing, signed-zero set identity, current-Y exclusion and sorting. +/// Used by the step-up decision after collecting the appropriate world shapes. +pub fn candidate_step_heights( + aabb: Aabb, + shapes: &[&VoxelShape], + max_step: f32, + current_y: f32, +) -> Vec<f32> { + borrowed_step_heights(aabb, shapes, max_step, current_y) +} + +fn borrowed_step_heights<S: std::borrow::Borrow<VoxelShape>>( + aabb: Aabb, + shapes: &[S], + max_step: f32, + current_y: f32, +) -> Vec<f32> { + let mut heights = Vec::<f32>::with_capacity(4); + for shape in shapes { + let shape = shape.borrow(); + for coordinate in shape.coordinates(Axis::Y) { + let height = (*coordinate - aabb.min(Axis::Y)) as f32; + if height < 0.0 || height == current_y { + continue; + } + if height > max_step { + break; + } + // FloatArraySet uses Float.floatToIntBits, so NaNs compare equal + // while positive and negative zero remain separate members. + let height = if height.is_nan() { f32::NAN } else { height }; + if !heights.iter().any(|old| old.to_bits() == height.to_bits()) { + heights.push(height); + } + } + } + heights.sort_unstable_by(f32::total_cmp); + heights +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::position::BlockPos; + #[test] + fn movement_slides_after_a_wall_collision() { + let wall = VoxelShape::block(); + let b = Aabb::new(Vec3::new(-0.6, 0.0, 0.2), Vec3::new(-0.2, 1.8, 0.8)); + let requested = Vec3::new(1.0, 0.0, 0.1); + assert_eq!( + resolve_shape_movement(requested, b, &[&wall]), + Vec3::new(0.2, 0.0, 0.1) + ); + assert_eq!( + resolve_shape_movement(Vec3::new(-0.0, -0.0, -0.0), b, &[]), + Vec3::new(-0.0, -0.0, -0.0) + ); + assert_eq!( + resolve_shape_movement(Vec3::new(-0.0, -0.0, -0.0), b, &[&wall]), + Vec3::ZERO + ); + } + #[test] + fn step_heights_deduplicate_and_exclude_current_y() { + let shape = VoxelShape::from_cube([1, 2, 1], &[true, true]).unwrap(); + let b = Aabb::block(BlockPos::default()); + assert_eq!( + candidate_step_heights(b, &[&shape, &shape], 0.6, 0.0), + vec![0.5] + ); + assert_eq!( + candidate_step_heights(b, &[&shape], 1.0, 0.5), + vec![0.0, 1.0] + ); + } + + #[test] + fn stepping_requeries_and_clears_a_half_block() { + let ledge = VoxelShape::from_box(Aabb::new(Vec3::ZERO, Vec3::new(1.0, 0.5, 1.0))).unwrap(); + let b = Aabb::new(Vec3::new(-0.6, 0.0, 0.2), Vec3::new(-0.2, 1.8, 0.8)); + let requested = Vec3::new(1.0, 0.0, 0.0); + let mut queries = Vec::new(); + let result = resolve_step_movement(requested, b, 0.6, true, |query| { + queries.push(query); + vec![&ledge] + }); + assert_eq!(result, Vec3::new(1.0, 0.5, 0.0)); + assert_eq!(queries.len(), 2); + assert_eq!(queries[0], b.expand_towards(requested)); + assert_eq!(queries[1].min(Axis::Y), -(1.0e-5_f32 as f64)); + assert_eq!( + resolve_step_movement(requested, b, 0.6, false, |_| vec![&ledge]), + Vec3::new(0.2, 0.0, 0.0) + ); + } + + #[test] + fn squared_length_underflow_skips_collection_and_keeps_signed_zero() { + let b = Aabb::block(BlockPos::default()); + let requested = Vec3::new(-0.0, 1e-200, -0.0); + assert_eq!( + resolve_step_movement(requested, b, 0.6, true, |_| panic!("unexpected query")), + requested + ); + } + #[test] + fn floor_height_defers_the_lower_lookup_until_empty() { + let empty = VoxelShape::empty(); + let block = VoxelShape::block(); + assert_eq!( + block_floor_height(&block, || panic!("unnecessary lower lookup")), + 1.0 + ); + assert_eq!(block_floor_height(&empty, || &block), 0.0); + assert_eq!(block_floor_height(&empty, || &empty), f64::NEG_INFINITY); + } +} + +#[cfg(test)] +mod fallible_tests { + use super::*; + #[test] + fn owned_collision_queries_stop_at_first_failure() { + let bounds = Aabb::new(Vec3::new(-0.6, 0.0, 0.2), Vec3::new(-0.2, 1.8, 0.8)); + let ledge = VoxelShape::from_box(Aabb::new(Vec3::ZERO, Vec3::new(1.0, 0.5, 1.0))).unwrap(); + for fail in [0, 1] { + let mut queries = 0; + let result = + try_resolve_step_movement(Vec3::new(1.0, 0.0, 0.0), bounds, 0.6, true, |_| { + let call = queries; + queries += 1; + if call == fail { + Err(call) + } else { + Ok(vec![ledge.clone()]) + } + }); + assert_eq!(result, Err(fail)); + assert_eq!(queries, fail + 1); + } + let result = try_resolve_step_movement( + Vec3::new(-0.0, -0.0, -0.0), + bounds, + 0.6, + true, + |_| -> Result<Vec<VoxelShape>, ()> { + panic!("zero movement must skip shape collection") + }, + ) + .unwrap(); + assert_eq!( + [result.x.to_bits(), result.y.to_bits(), result.z.to_bits()], + [(-0.0f64).to_bits(); 3] + ); + } +} diff --git a/crates/horizon-core/src/geometry/shape.rs b/crates/horizon-core/src/geometry/shape.rs new file mode 100644 index 000000000..62593ebc6 --- /dev/null +++ b/crates/horizon-core/src/geometry/shape.rs @@ -0,0 +1,551 @@ +use super::{ + Aabb, Axis, BlockHit, COLLISION_EPSILON, Direction, Vec3, clamp, floor_i32, java_max, java_min, +}; +use crate::position::BlockPos; +use std::fmt; +use std::sync::{Arc, OnceLock}; +mod create; +mod face; +mod join; +pub use join::ShapeOp; + +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum ShapeError { + InvalidCoordinates, + InvalidOccupancy, + TooLarge, + UnboundedBoolean, + InvalidBounds, +} +impl fmt::Display for ShapeError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "invalid voxel shape: {self:?}") + } +} +impl std::error::Error for ShapeError {} + +/// Immutable discrete occupancy with exact double coordinate boundaries. +/// +/// Greedy boxes are calculated once and reused for ray and proximity queries. +/// Cube shapes retain vanilla's arithmetic cell lookup instead of replacing it +/// with a binary search over coordinates (which differs at rounding boundaries). +#[derive(Clone, Debug)] +pub struct VoxelShape { + identity: Arc<ShapeIdentity>, + coords: Arc<[Vec<f64>; 3]>, + sizes: [usize; 3], + occupancy: Arc<[u64]>, + cube: bool, + coordinate_cubes: [bool; 3], + boxes: Arc<Vec<Aabb>>, + bounds: Option<Aabb>, + discrete_min: [i32; 3], + discrete_max: [i32; 3], +} + +type FaceCache = [OnceLock<Result<VoxelShape, ShapeError>>; 6]; +#[derive(Debug, Default)] +struct ShapeIdentity { + faces: OnceLock<Box<FaceCache>>, +} + +impl VoxelShape { + pub fn from_grid(coords: [Vec<f64>; 3], occupied: &[bool]) -> Result<Self, ShapeError> { + Self::build(coords, occupied, false, [false; 3]) + } + pub fn from_cube(sizes: [usize; 3], occupied: &[bool]) -> Result<Self, ShapeError> { + if sizes.contains(&0) { + return Err(ShapeError::InvalidCoordinates); + } + let volume = volume(sizes)?; + if occupied.len() != volume { + return Err(ShapeError::InvalidOccupancy); + } + let coords = sizes.map(|size| (0..=size).map(|i| i as f64 / size as f64).collect()); + Self::build(coords, occupied, true, [true; 3]) + } + fn build( + coords: [Vec<f64>; 3], + occupied: &[bool], + cube: bool, + coordinate_cubes: [bool; 3], + ) -> Result<Self, ShapeError> { + if coords.iter().any(|c| { + c.is_empty() + || c.len() > 1_048_577 + || c.iter().any(|v| v.is_nan()) + || c.windows(2).any(|p| p[0] >= p[1]) + }) { + return Err(ShapeError::InvalidCoordinates); + } + let sizes = std::array::from_fn(|i| coords[i].len() - 1); + let count = volume(sizes)?; + if count != occupied.len() { + return Err(ShapeError::InvalidOccupancy); + } + let mut occupancy = vec![0; count.div_ceil(64)]; + let mut discrete_min = sizes.map(|v| v as i32); + let mut discrete_max = [0; 3]; + for (i, full) in occupied.iter().enumerate() { + if *full { + occupancy[i / 64] |= 1 << (i % 64); + let position = [ + (i / (sizes[1] * sizes[2])) as i32, + (i / sizes[2] % sizes[1]) as i32, + (i % sizes[2]) as i32, + ]; + for axis in 0..3 { + discrete_min[axis] = discrete_min[axis].min(position[axis]); + discrete_max[axis] = discrete_max[axis].max(position[axis] + 1); + } + } + } + let mut shape = Self { + identity: Arc::new(ShapeIdentity::default()), + coords: Arc::new(coords), + sizes, + occupancy: occupancy.into(), + cube, + coordinate_cubes, + boxes: Arc::new(Vec::new()), + bounds: None, + discrete_min, + discrete_max, + }; + shape.boxes = Arc::new(shape.decompose()); + shape.bounds = shape.boxes.iter().copied().reduce(Aabb::union_bounds); + Ok(shape) + } + pub fn empty() -> Self { + static EMPTY: OnceLock<VoxelShape> = OnceLock::new(); + EMPTY + .get_or_init(|| { + Self::from_grid([vec![0.0], vec![0.0], vec![0.0]], &[]).expect("valid empty grid") + }) + .clone() + } + pub fn block() -> Self { + static BLOCK: OnceLock<VoxelShape> = OnceLock::new(); + BLOCK + .get_or_init(|| Self::from_cube([1, 1, 1], &[true]).expect("valid unit cube")) + .clone() + } + pub fn is_empty(&self) -> bool { + self.bounds.is_none() + } + pub fn bounds(&self) -> Option<Aabb> { + self.bounds + } + pub fn boxes(&self) -> &[Aabb] { + &self.boxes + } + pub fn coordinates(&self, axis: Axis) -> &[f64] { + &self.coords[axis as usize] + } + pub fn sizes(&self) -> [usize; 3] { + self.sizes + } + pub fn is_cube(&self) -> bool { + self.cube + } + /// Clones and operations returning an existing immutable shape preserve its + /// identity. Separately constructed grids remain distinct even if equal. + pub fn same_identity(&self, other: &Self) -> bool { + Arc::ptr_eq(&self.identity, &other.identity) + } + /// A separately constructed shape with the same immutable grid. Storage is + /// shared, while identity-sensitive vanilla join shortcuts remain distinct. + pub fn fresh_identity(&self) -> Self { + let mut shape = self.clone(); + shape.identity = Arc::new(ShapeIdentity::default()); + shape + } + pub fn cube_coordinate_axes(&self) -> [bool; 3] { + self.coordinate_cubes + } + /// An array shape can contain CubePointRange axes after a partial cube + /// merge. Preserve that metadata for subsequent Boolean operations. + pub fn from_mixed_grid( + coords: [Vec<f64>; 3], + occupied: &[bool], + coordinate_cubes: [bool; 3], + ) -> Result<Self, ShapeError> { + for i in 0..3 { + if coordinate_cubes[i] { + let size = coords[i].len().saturating_sub(1); + if size == 0 + || coords[i] + .iter() + .enumerate() + .any(|(j, v)| v.to_bits() != (j as f64 / size as f64).to_bits()) + { + return Err(ShapeError::InvalidCoordinates); + } + } + } + Self::build(coords, occupied, false, coordinate_cubes) + } + pub fn min(&self, axis: Axis) -> f64 { + let i = axis as usize; + let index = self.discrete_min[i]; + if index >= self.sizes[i] as i32 { + f64::INFINITY + } else { + self.coords[i][index as usize] + } + } + pub fn max(&self, axis: Axis) -> f64 { + let i = axis as usize; + let index = self.discrete_max[i]; + if index <= 0 { + f64::NEG_INFINITY + } else { + self.coords[i][index as usize] + } + } + /// Discrete extrema are separate from occupancy: a quantized empty shape + /// can retain nonempty axis ranges, and empty joins retain Java sentinels. + pub fn discrete_bounds(&self) -> ([i32; 3], [i32; 3]) { + (self.discrete_min, self.discrete_max) + } + /// Import reference extrema. Nonempty shapes must match their occupancy; + /// empty shapes admit bounded ranges or the empty-join sentinel triple. + pub fn with_discrete_bounds( + mut self, + min: [i32; 3], + max: [i32; 3], + ) -> Result<Self, ShapeError> { + let in_range = (0..3).all(|i| { + min[i] >= 0 + && min[i] <= self.sizes[i] as i32 + && max[i] >= 0 + && max[i] <= self.sizes[i] as i32 + }); + let join_sentinel = min == [i32::MAX; 3] && max == [i32::MIN + 1; 3]; + if (!in_range && !join_sentinel) + || (!self.is_empty() && (min != self.discrete_min || max != self.discrete_max)) + { + return Err(ShapeError::InvalidBounds); + } + if min != self.discrete_min || max != self.discrete_max { + self.identity = Arc::new(ShapeIdentity::default()); + } + self.discrete_min = min; + self.discrete_max = max; + Ok(self) + } + /// Minimum occupied coordinate along an axis at the two cyclic + /// perpendicular coordinates; an empty/outside column yields +infinity. + pub fn min_at(&self, axis: Axis, first: f64, second: f64) -> f64 { + let mut position = self.column_position(axis, first, second); + for i in 0..self.sizes[axis as usize] { + position[axis as usize] = i as i32; + if self.is_full(position[0], position[1], position[2]) { + return self.coords[axis as usize][i]; + } + } + f64::INFINITY + } + /// Maximum occupied coordinate at the same cyclic column; an empty/outside + /// column yields -infinity. The maximum is the cell's upper face. + pub fn max_at(&self, axis: Axis, first: f64, second: f64) -> f64 { + let mut position = self.column_position(axis, first, second); + for i in (0..self.sizes[axis as usize]).rev() { + position[axis as usize] = i as i32; + if self.is_full(position[0], position[1], position[2]) { + return self.coords[axis as usize][i + 1]; + } + } + f64::NEG_INFINITY + } + fn column_position(&self, axis: Axis, first: f64, second: f64) -> [i32; 3] { + let a = (axis as usize + 1) % 3; + let b = (axis as usize + 2) % 3; + let mut position = [0; 3]; + position[a] = self.find_index(Axis::ALL[a], first); + position[b] = self.find_index(Axis::ALL[b], second); + position + } + /// Vanilla movement converts cube coordinates to an array shape, even for + /// a zero offset. Keep this distinction for subsequent cell lookups. + pub fn moved(&self, offset: Vec3) -> Self { + if self.is_empty() { + return Self::empty(); + } + let mut result = self.clone(); + result.identity = Arc::new(ShapeIdentity::default()); + result.cube = false; + result.coordinate_cubes = [false; 3]; + let mut coords = (*self.coords).clone(); + for axis in Axis::ALL { + for value in &mut coords[axis as usize] { + *value += offset.component(axis); + } + } + result.coords = Arc::new(coords); + result.boxes = Arc::new(result.decompose()); + result.bounds = self.bounds.map(|bounds| bounds.move_by(offset)); + result + } + pub fn is_full(&self, x: i32, y: i32, z: i32) -> bool { + if x < 0 + || y < 0 + || z < 0 + || x as usize >= self.sizes[0] + || y as usize >= self.sizes[1] + || z as usize >= self.sizes[2] + { + return false; + } + full( + &self.occupancy, + index(self.sizes, x as usize, y as usize, z as usize), + ) + } + pub fn find_index(&self, axis: Axis, value: f64) -> i32 { + let i = axis as usize; + if self.cube { + return floor_i32(clamp( + value * self.sizes[i] as f64, + -1.0, + self.sizes[i] as f64, + )); + } + // Upper-bound search, including the final outside cell index. + let coords = &self.coords[i]; + let mut start = 0; + let mut end = coords.len(); + while start < end { + let middle = (start + end) / 2; + if value < coords[middle] { + end = middle; + } else { + start = middle + 1; + } + } + start as i32 - 1 + } + pub fn collide(&self, axis: Axis, aabb: Aabb, amount: f64) -> f64 { + if self.is_empty() { + return amount; + } + if amount.abs() < COLLISION_EPSILON { + return 0.0; + } + let i = axis as usize; + let p = Axis::ALL[(i + 1) % 3]; + let q = Axis::ALL[(i + 2) % 3]; + let p_start = self.find_index(p, aabb.min(p) + COLLISION_EPSILON).max(0); + let p_end = (self.find_index(p, aabb.max(p) - COLLISION_EPSILON) + 1) + .min(self.sizes[p as usize] as i32); + let q_start = self.find_index(q, aabb.min(q) + COLLISION_EPSILON).max(0); + let q_end = (self.find_index(q, aabb.max(q) - COLLISION_EPSILON) + 1) + .min(self.sizes[q as usize] as i32); + let occupied_layer = |layer| { + (p_start..p_end).any(|u| { + (q_start..q_end).any(|v| { + let mut cell = [0; 3]; + cell[i] = layer; + cell[p as usize] = u; + cell[q as usize] = v; + self.is_full(cell[0], cell[1], cell[2]) + }) + }) + }; + if amount > 0.0 { + let start = self.find_index(axis, aabb.max(axis) - COLLISION_EPSILON) + 1; + for layer in start..self.sizes[i] as i32 { + if occupied_layer(layer) { + let distance = self.coords[i][layer as usize] - aabb.max(axis); + return if distance >= -COLLISION_EPSILON { + java_min(amount, distance) + } else { + amount + }; + } + } + } else if amount < 0.0 { + let start = self.find_index(axis, aabb.min(axis) + COLLISION_EPSILON); + for layer in (0..start).rev() { + if occupied_layer(layer) { + let distance = self.coords[i][layer as usize + 1] - aabb.min(axis); + return if distance <= COLLISION_EPSILON { + java_max(amount, distance) + } else { + amount + }; + } + } + } + amount + } + pub fn collide_all<'a>( + axis: Axis, + aabb: Aabb, + shapes: impl IntoIterator<Item = &'a Self>, + mut amount: f64, + ) -> f64 { + for shape in shapes { + if amount.abs() < COLLISION_EPSILON { + return 0.0; + } + amount = shape.collide(axis, aabb, amount); + } + amount + } + pub fn clip(&self, start: Vec3, end: Vec3, block: BlockPos) -> Option<BlockHit> { + if self.is_empty() { + return None; + } + let delta = end.subtract(start); + if delta.length_squared() < COLLISION_EPSILON { + return None; + } + let nudged = start.add_vector(delta.scale(0.001)); + let x = self.find_index(Axis::X, nudged.x - block.x as f64); + let y = self.find_index(Axis::Y, nudged.y - block.y as f64); + let z = self.find_index(Axis::Z, nudged.z - block.z as f64); + if self.is_full(x, y, z) { + Some(BlockHit { + location: nudged, + direction: Direction::approximate_nearest(delta).opposite(), + block, + inside: true, + }) + } else { + Aabb::clip_boxes(self.boxes.iter().copied(), start, end, block) + } + } + pub fn closest_point(&self, point: Vec3) -> Option<Vec3> { + let mut best = None; + for aabb in self.boxes.iter() { + let candidate = Vec3::new( + clamp(point.x, aabb.min(Axis::X), aabb.max(Axis::X)), + clamp(point.y, aabb.min(Axis::Y), aabb.max(Axis::Y)), + clamp(point.z, aabb.min(Axis::Z), aabb.max(Axis::Z)), + ); + if best + .is_none_or(|old| point.distance_squared(candidate) < point.distance_squared(old)) + { + best = Some(candidate); + } + } + best + } + fn decompose(&self) -> Vec<Aabb> { + let mut remaining = self.occupancy.to_vec(); + let mut boxes = Vec::new(); + let [nx, ny, nz] = self.sizes; + for y in 0..ny { + for x in 0..nx { + let mut run = None; + for z in 0..=nz { + if z < nz && full(&remaining, index(self.sizes, x, y, z)) { + if run.is_none() { + run = Some(z); + } + continue; + } + let Some(z_start) = run.take() else { continue }; + clear_strip(&mut remaining, self.sizes, x, y, z_start, z); + let mut x_end = x + 1; + while x_end < nx && strip_full(&remaining, self.sizes, x_end, y, z_start, z) { + clear_strip(&mut remaining, self.sizes, x_end, y, z_start, z); + x_end += 1; + } + let mut y_end = y + 1; + while y_end < ny + && (x..x_end) + .all(|u| strip_full(&remaining, self.sizes, u, y_end, z_start, z)) + { + for u in x..x_end { + clear_strip(&mut remaining, self.sizes, u, y_end, z_start, z); + } + y_end += 1; + } + boxes.push(Aabb::new( + Vec3::new( + self.coords[0][x], + self.coords[1][y], + self.coords[2][z_start], + ), + Vec3::new( + self.coords[0][x_end], + self.coords[1][y_end], + self.coords[2][z], + ), + )); + } + } + } + boxes + } +} + +fn volume(sizes: [usize; 3]) -> Result<usize, ShapeError> { + let count = sizes + .into_iter() + .try_fold(1usize, usize::checked_mul) + .ok_or(ShapeError::TooLarge)?; + if count > 1_048_576 { + Err(ShapeError::TooLarge) + } else { + Ok(count) + } +} +fn index(sizes: [usize; 3], x: usize, y: usize, z: usize) -> usize { + (x * sizes[1] + y) * sizes[2] + z +} +fn full(bits: &[u64], i: usize) -> bool { + bits[i / 64] & (1 << (i % 64)) != 0 +} +fn strip_full(bits: &[u64], sizes: [usize; 3], x: usize, y: usize, min: usize, max: usize) -> bool { + (min..max).all(|z| full(bits, index(sizes, x, y, z))) +} +fn clear_strip(bits: &mut [u64], sizes: [usize; 3], x: usize, y: usize, min: usize, max: usize) { + for z in min..max { + let i = index(sizes, x, y, z); + bits[i / 64] &= !(1 << (i % 64)); + } +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn stop_at_obstacle_and_reuse_boxes() { + let shape = VoxelShape::block(); + let player = Aabb::new(Vec3::new(-0.6, 0.0, 0.2), Vec3::new(-0.2, 1.8, 0.8)); + assert_eq!(shape.collide(Axis::X, player, 1.0), 0.2); + assert_eq!(shape.collide(Axis::Z, player, 1.0), 1.0); + assert_eq!(shape.boxes().len(), 1); + assert!( + shape + .clip( + Vec3::new(0.5, 0.5, 0.5), + Vec3::new(2.0, 0.5, 0.5), + BlockPos::default() + ) + .unwrap() + .inside + ); + assert_eq!( + VoxelShape::empty().collide(Axis::X, player, -0.0).to_bits(), + (-0.0f64).to_bits() + ); + } + #[test] + fn sparse_stair_decomposition() { + let shape = VoxelShape::from_cube( + [2, 2, 2], + &[true, true, false, false, true, true, true, true], + ) + .unwrap(); + assert_eq!(shape.boxes().len(), 2); + assert_eq!( + shape.closest_point(Vec3::new(0.1, 0.9, 0.5)), + Some(Vec3::new(0.1, 0.5, 0.5)) + ); + assert!(VoxelShape::from_grid(std::array::from_fn(|_| vec![0.0, 1.0]), &[]).is_err()); + } +} diff --git a/crates/horizon-core/src/geometry/shape/create.rs b/crates/horizon-core/src/geometry/shape/create.rs new file mode 100644 index 000000000..312e030b3 --- /dev/null +++ b/crates/horizon-core/src/geometry/shape/create.rs @@ -0,0 +1,147 @@ +use super::{ShapeError, ShapeOp, VoxelShape}; +use crate::geometry::{Aabb, Axis, COLLISION_EPSILON}; + +impl VoxelShape { + /// Shapes.create(AABB): thin-box rejection and up to 1/8 cube quantization. + pub fn from_box(aabb: Aabb) -> Result<Self, ShapeError> { + if aabb.has_nan() { + return Err(ShapeError::InvalidCoordinates); + } + if Axis::ALL + .into_iter() + .any(|axis| aabb.max(axis) - aabb.min(axis) < COLLISION_EPSILON) + { + return Ok(Self::empty()); + } + let bits = Axis::ALL.map(|axis| find_bits(aabb.min(axis), aabb.max(axis))); + if bits.iter().any(Option::is_none) { + return Self::from_grid( + Axis::ALL.map(|axis| vec![aabb.min(axis), aabb.max(axis)]), + &[true], + ); + } + let bits = bits.map(Option::unwrap); + if bits == [0, 0, 0] { + return Ok(Self::block()); + } + let sizes = bits.map(|bits| 1usize << bits); + let lo = std::array::from_fn::<_, 3, _>(|i| { + round_small(aabb.min(Axis::ALL[i]) * sizes[i] as f64) as usize + }); + let hi = std::array::from_fn::<_, 3, _>(|i| { + round_small(aabb.max(Axis::ALL[i]) * sizes[i] as f64) as usize + }); + let mut occupied = Vec::with_capacity(sizes[0] * sizes[1] * sizes[2]); + for x in 0..sizes[0] { + for y in 0..sizes[1] { + for z in 0..sizes[2] { + occupied.push( + x >= lo[0] + && x < hi[0] + && y >= lo[1] + && y < hi[1] + && z >= lo[2] + && z < hi[2], + ); + } + } + } + Self::from_cube(sizes, &occupied)? + .with_discrete_bounds(lo.map(|v| v as i32), hi.map(|v| v as i32)) + } + /// VoxelShape.optimize, reconstructing greedy boxes in vanilla order. + pub fn optimized(&self) -> Result<Self, ShapeError> { + let mut result = Self::empty(); + for aabb in self.boxes.iter() { + let part = Self::from_box(*aabb)?; + result = result.join_unoptimized(&part, ShapeOp::OR)?; + } + Ok(result) + } + pub fn join(&self, other: &Self, operation: ShapeOp) -> Result<Self, ShapeError> { + self.join_unoptimized(other, operation)?.optimized() + } +} +fn find_bits(min: f64, max: f64) -> Option<u32> { + if min < -COLLISION_EPSILON || max > 1.0000001 { + return None; + } + for bits in 0..=3 { + let size = (1usize << bits) as f64; + let lo = min * size; + let hi = max * size; + if (lo - round_small(lo) as f64).abs() < COLLISION_EPSILON * size + && (hi - round_small(hi) as f64).abs() < COLLISION_EPSILON * size + { + return Some(bits); + } + } + None +} +// Values reach this helper only in the small range admitted by find_bits. +// Avoid floor(value + 0.5): addition can round a value just below a tie upward. +fn round_small(value: f64) -> i64 { + let lower = value.floor(); + (if value - lower >= 0.5 { + lower + 1.0 + } else { + lower + }) as i64 +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::geometry::Vec3; + #[test] + fn quantization_thin_boxes_and_shared_block_identity() { + let full = VoxelShape::from_box(Aabb::new(Vec3::ZERO, Vec3::new(1.0, 1.0, 1.0))).unwrap(); + assert!(full.same_identity(&VoxelShape::block())); + let slab = VoxelShape::from_box(Aabb::new(Vec3::ZERO, Vec3::new(1.0, 0.5, 1.0))).unwrap(); + assert!(slab.is_cube()); + assert_eq!(slab.sizes(), [1, 2, 1]); + assert_eq!(slab.max(Axis::Y), 0.5); + let thin = VoxelShape::from_box(Aabb::new(Vec3::ZERO, Vec3::new(1e-8, 1.0, 1.0))).unwrap(); + assert!(thin.same_identity(&VoxelShape::empty())); + assert_eq!(round_small(f64::from_bits(0.5f64.to_bits() - 1)), 0); + } + #[test] + fn optimization_restores_composite_shapes() { + let a = VoxelShape::from_box(Aabb::new(Vec3::ZERO, Vec3::new(1.0, 0.5, 1.0))).unwrap(); + let b = VoxelShape::from_box(Aabb::new( + Vec3::new(0.5, 0.5, 0.0), + Vec3::new(1.0, 1.0, 1.0), + )) + .unwrap(); + let combined = a.join(&b, ShapeOp::OR).unwrap(); + assert_eq!(combined.boxes().len(), 2); + assert_eq!(combined.max(Axis::Y), 1.0); + assert!( + !combined + .join_is_not_empty(&a.join_unoptimized(&b, ShapeOp::OR).unwrap(), ShapeOp::XOR) + .unwrap() + ); + } + #[test] + fn quantized_empty_boxes_keep_independent_axis_extrema() { + let shape = VoxelShape::from_box(Aabb::new( + crate::geometry::Vec3::new(1e-8, 0.875, -1e-8), + crate::geometry::Vec3::new(0.12500001, 1.0, 9e-8), + )) + .unwrap(); + assert!(shape.is_empty()); + assert_eq!(shape.min(Axis::Y), 0.875); + assert_eq!(shape.max(Axis::Y), 1.0); + assert_eq!(shape.max(Axis::Z), f64::NEG_INFINITY); + assert_eq!( + crate::geometry::block_floor_height(&VoxelShape::empty(), || &shape), + 0.0 + ); + assert!( + shape + .optimized() + .unwrap() + .same_identity(&VoxelShape::empty()) + ); + } +} diff --git a/crates/horizon-core/src/geometry/shape/face.rs b/crates/horizon-core/src/geometry/shape/face.rs new file mode 100644 index 000000000..06a0f95ef --- /dev/null +++ b/crates/horizon-core/src/geometry/shape/face.rs @@ -0,0 +1,123 @@ +use super::{ShapeError, VoxelShape, volume}; +use crate::geometry::{Aabb, Axis, COLLISION_EPSILON, Direction, Vec3}; + +impl VoxelShape { + /// Native face selection samples just inside the unit-block boundary. The + /// result preserves identity on empty/cube-like axes and caches other faces. + pub fn face_shape(&self, direction: Direction) -> Result<Self, ShapeError> { + let (axis, _) = face_axis(direction); + if self.is_empty() || self.cube_like_along(axis) { + return Ok(self.clone()); + } + self.identity + .faces + .get_or_init(|| Box::new(std::array::from_fn(|_| std::sync::OnceLock::new()))) + [direction as usize] + .get_or_init(|| self.calculate_face(direction)) + .clone() + } + fn cube_like_along(&self, axis: Axis) -> bool { + let coords = self.coordinates(axis); + coords.len() == 2 + && coords[0].abs() <= COLLISION_EPSILON + && (coords[1] - 1.0).abs() <= COLLISION_EPSILON + } + fn calculate_face(&self, direction: Direction) -> Result<Self, ShapeError> { + let (axis, positive) = face_axis(direction); + let a = axis as usize; + let index = self.find_index( + axis, + if positive { + 0.9999999 + } else { + COLLISION_EPSILON + }, + ); + let mut starts = [0; 3]; + starts[a] = index; + let mut ends = self.sizes.map(|v| v as i32); + ends[a] = index + 1; + // SubShape extrema clamp the parent bounds; they are not recomputed + // from the selected occupancy. Sparse slices can therefore be nonempty + // by native metadata even when their decomposition contains no boxes. + let min = + std::array::from_fn(|i| self.discrete_min[i].clamp(starts[i], ends[i]) - starts[i]); + let max = + std::array::from_fn(|i| self.discrete_max[i].clamp(starts[i], ends[i]) - starts[i]); + if (0..3).any(|i| min[i] >= max[i]) { + return Ok(Self::empty()); + } + let mut coords = (*self.coords).clone(); + coords[a] = vec![0.0, 1.0]; + if (0..3).all(|i| { + coords[i].len() == 2 + && coords[i][0].abs() <= COLLISION_EPSILON + && (coords[i][1] - 1.0).abs() <= COLLISION_EPSILON + }) { + return Ok(Self::block()); + } + let sizes = std::array::from_fn(|i| coords[i].len() - 1); + let mut occupied = Vec::with_capacity(volume(sizes)?); + for x in 0..sizes[0] { + for y in 0..sizes[1] { + for z in 0..sizes[2] { + let mut p = [x as i32, y as i32, z as i32]; + p[a] = index; + occupied.push(self.is_full(p[0], p[1], p[2])); + } + } + } + let mut cubes = self.coordinate_cubes; + cubes[a] = true; + let mut result = Self::build(coords, &occupied, false, cubes)?; + result.discrete_min = min; + result.discrete_max = max; + result.bounds = Some(Aabb::new( + Vec3::new( + result.min(Axis::X), + result.min(Axis::Y), + result.min(Axis::Z), + ), + Vec3::new( + result.max(Axis::X), + result.max(Axis::Y), + result.max(Axis::Z), + ), + )); + Ok(result) + } +} +fn face_axis(direction: Direction) -> (Axis, bool) { + match direction { + Direction::Down => (Axis::Y, false), + Direction::Up => (Axis::Y, true), + Direction::North => (Axis::Z, false), + Direction::South => (Axis::Z, true), + Direction::West => (Axis::X, false), + Direction::East => (Axis::X, true), + } +} + +#[cfg(test)] +mod tests { + use super::*; + use std::sync::Arc; + #[test] + fn face_cache_is_lazy_shared_and_does_not_retain_parent() { + let shape = VoxelShape::from_cube( + [2, 2, 2], + &[true, false, false, false, false, false, false, false], + ) + .unwrap(); + assert!(shape.identity.faces.get().is_none()); + let weak = Arc::downgrade(&shape.identity); + let face = shape.face_shape(Direction::Down).unwrap(); + assert!(!face.same_identity(&shape)); + assert!(face.same_identity(&shape.clone().face_shape(Direction::Down).unwrap())); + assert!(shape.fresh_identity().identity.faces.get().is_none()); + assert!(shape.moved(Vec3::ZERO).identity.faces.get().is_none()); + drop(shape); + assert!(weak.upgrade().is_none()); + assert!(!face.is_empty()); + } +} diff --git a/crates/horizon-core/src/geometry/shape/join.rs b/crates/horizon-core/src/geometry/shape/join.rs new file mode 100644 index 000000000..57c981e65 --- /dev/null +++ b/crates/horizon-core/src/geometry/shape/join.rs @@ -0,0 +1,363 @@ +use super::{ShapeError, VoxelShape, volume}; +use crate::geometry::{Axis, COLLISION_EPSILON}; + +/// A four-bit truth table, indexed as (first << 1) | second. +/// True for two empty cells would describe an unbounded volume, which vanilla +/// rejects for shape joins. Typed errors preserve that rejection here. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct ShapeOp(u8); +impl ShapeOp { + pub const FALSE: Self = Self(0); + pub const AND: Self = Self(8); + pub const OR: Self = Self(14); + pub const XOR: Self = Self(6); + pub const ONLY_FIRST: Self = Self(4); + pub const ONLY_SECOND: Self = Self(2); + pub const FIRST: Self = Self(12); + pub const SECOND: Self = Self(10); + pub const fn from_truth_table(bits: u8) -> Self { + Self(bits & 15) + } + pub const fn apply(self, first: bool, second: bool) -> bool { + self.0 & (1 << ((first as u8) * 2 + second as u8)) != 0 + } + fn validate(self) -> Result<(), ShapeError> { + if self.apply(false, false) { + Err(ShapeError::UnboundedBoolean) + } else { + Ok(()) + } + } +} + +struct Merger { + coords: Vec<f64>, + first: Vec<i32>, + second: Vec<i32>, + cube_range: bool, + discrete_cube: bool, +} + +impl VoxelShape { + /// Shapes.joinUnoptimized, preserving merged coordinates and cube metadata. + pub fn join_unoptimized(&self, other: &Self, operation: ShapeOp) -> Result<Self, ShapeError> { + operation.validate()?; + if self.same_identity(other) { + return Ok(if operation.apply(true, true) { + self.clone() + } else { + Self::empty() + }); + } + let only_first = operation.apply(true, false); + let only_second = operation.apply(false, true); + if self.is_empty() { + return Ok(if only_second { + other.clone() + } else { + Self::empty() + }); + } + if other.is_empty() { + return Ok(if only_first { + self.clone() + } else { + Self::empty() + }); + } + let mergers = self.mergers(other, only_first, only_second)?; + let sizes = std::array::from_fn(|i| mergers[i].coords.len() - 1); + let count = volume(sizes)?; + let mut occupied = Vec::with_capacity(count); + for x in 0..sizes[0] { + for y in 0..sizes[1] { + for z in 0..sizes[2] { + let a = self.is_full( + mergers[0].first[x], + mergers[1].first[y], + mergers[2].first[z], + ); + let b = other.is_full( + mergers[0].second[x], + mergers[1].second[y], + mergers[2].second[z], + ); + occupied.push(operation.apply(a, b)); + } + } + } + let [x, y, z] = mergers; + let coordinate_cubes = [x.cube_range, y.cube_range, z.cube_range]; + let cube = x.discrete_cube && y.discrete_cube && z.discrete_cube; + let shape = Self::build( + [x.coords, y.coords, z.coords], + &occupied, + cube, + coordinate_cubes, + )?; + if shape.is_empty() { + shape.with_discrete_bounds([i32::MAX; 3], [i32::MIN + 1; 3]) + } else { + Ok(shape) + } + } + /// Shapes.joinIsNotEmpty without allocating the result occupancy or boxes. + pub fn join_is_not_empty(&self, other: &Self, operation: ShapeOp) -> Result<bool, ShapeError> { + operation.validate()?; + let a_empty = self.is_empty(); + let b_empty = other.is_empty(); + if a_empty || b_empty { + return Ok(operation.apply(!a_empty, !b_empty)); + } + if self.same_identity(other) { + return Ok(operation.apply(true, true)); + } + let only_first = operation.apply(true, false); + let only_second = operation.apply(false, true); + for axis in Axis::ALL { + if self.max(axis) < other.min(axis) - COLLISION_EPSILON + || other.max(axis) < self.min(axis) - COLLISION_EPSILON + { + return Ok(only_first || only_second); + } + } + let mergers = self.mergers(other, only_first, only_second)?; + let sizes = std::array::from_fn(|i| mergers[i].coords.len() - 1); + volume(sizes)?; + for x in 0..sizes[0] { + for y in 0..sizes[1] { + for z in 0..sizes[2] { + if operation.apply( + self.is_full( + mergers[0].first[x], + mergers[1].first[y], + mergers[2].first[z], + ), + other.is_full( + mergers[0].second[x], + mergers[1].second[y], + mergers[2].second[z], + ), + ) { + return Ok(true); + } + } + } + } + Ok(false) + } + fn mergers( + &self, + other: &Self, + only_first: bool, + only_second: bool, + ) -> Result<[Merger; 3], ShapeError> { + let x = merge( + 1, + &self.coords[0], + &other.coords[0], + self.coordinate_cubes[0], + other.coordinate_cubes[0], + only_first, + only_second, + )?; + let y = merge( + x.coords.len() - 1, + &self.coords[1], + &other.coords[1], + self.coordinate_cubes[1], + other.coordinate_cubes[1], + only_first, + only_second, + )?; + let multiplier = (x.coords.len() - 1) + .checked_mul(y.coords.len() - 1) + .ok_or(ShapeError::TooLarge)?; + let z = merge( + multiplier, + &self.coords[2], + &other.coords[2], + self.coordinate_cubes[2], + other.coordinate_cubes[2], + only_first, + only_second, + )?; + Ok([x, y, z]) + } +} + +#[allow(clippy::too_many_arguments)] // Mirrors the coordinate-merger selection inputs. +fn merge( + multiplier: usize, + a: &[f64], + b: &[f64], + a_cube: bool, + b_cube: bool, + only_first: bool, + only_second: bool, +) -> Result<Merger, ShapeError> { + let na = a.len() - 1; + let nb = b.len() - 1; + if a_cube && b_cube { + let gcd = gcd(na, nb); + let lcm = (na / gcd).checked_mul(nb).ok_or(ShapeError::TooLarge)?; + if multiplier + .checked_mul(lcm) + .is_some_and(|volume| volume <= 256) + { + return Ok(Merger { + coords: (0..=lcm).map(|i| i as f64 / lcm as f64).collect(), + first: (0..lcm).map(|i| (i / (nb / gcd)) as i32).collect(), + second: (0..lcm).map(|i| (i / (na / gcd)) as i32).collect(), + cube_range: true, + discrete_cube: true, + }); + } + } + if a[na] < b[0] - COLLISION_EPSILON { + return Ok(disjoint(a, b, false)); + } + if b[nb] < a[0] - COLLISION_EPSILON { + return Ok(disjoint(b, a, true)); + } + // Primitive DoubleArrayList equality treats the two signed zeros equally. + if a.len() == b.len() && a.iter().zip(b).all(|(a, b)| a == b) { + return Ok(Merger { + coords: a.to_vec(), + first: (0..na).map(|i| i as i32).collect(), + second: (0..na).map(|i| i as i32).collect(), + cube_range: a_cube, + discrete_cube: false, + }); + } + let mut coords = Vec::with_capacity(a.len() + b.len()); + let mut first = Vec::with_capacity(coords.capacity()); + let mut second = Vec::with_capacity(coords.capacity()); + let (mut i, mut j) = (0usize, 0usize); + let mut last = f64::NAN; + while i < a.len() || j < b.len() { + let a_end = i == a.len(); + let b_end = j == b.len(); + let choose_a = !a_end && (b_end || a[i] < b[j] + COLLISION_EPSILON); + if choose_a { + i += 1; + if !only_first && (j == 0 || b_end) { + continue; + } + } else { + j += 1; + if !only_second && (i == 0 || a_end) { + continue; + } + } + let ai = i as i32 - 1; + let bj = j as i32 - 1; + let value = if choose_a { a[i - 1] } else { b[j - 1] }; + if !matches!( + last.partial_cmp(&(value - COLLISION_EPSILON)), + Some(std::cmp::Ordering::Greater | std::cmp::Ordering::Equal) + ) { + coords.push(value); + first.push(ai); + second.push(bj); + last = value; + } else { + let n = coords.len() - 1; + first[n] = ai; + second[n] = bj; + } + } + if coords.len() <= 1 { + coords = vec![0.0]; + first.clear(); + second.clear(); + } else { + first.pop(); + second.pop(); + } + Ok(Merger { + coords, + first, + second, + cube_range: false, + discrete_cube: false, + }) +} +fn disjoint(lower: &[f64], upper: &[f64], swap: bool) -> Merger { + let nl = lower.len(); + let nu = upper.len(); + let mut first = Vec::with_capacity(nl + nu - 1); + let mut second = Vec::with_capacity(nl + nu - 1); + for i in 0..nl { + first.push(i as i32); + second.push(-1); + } + for i in 0..nu - 1 { + first.push(nl as i32 - 1); + second.push(i as i32); + } + if swap { + std::mem::swap(&mut first, &mut second); + } + Merger { + coords: lower.iter().chain(upper).copied().collect(), + first, + second, + cube_range: false, + discrete_cube: false, + } +} +fn gcd(mut a: usize, mut b: usize) -> usize { + while b != 0 { + let r = a % b; + a = b; + b = r; + } + a +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::geometry::Vec3; + #[test] + fn signed_zero_list_equality_preserves_first_coordinates() { + let a = VoxelShape::from_grid([vec![0.0, 1.0], vec![0.0, 1.0], vec![0.0, 1.0]], &[true]) + .unwrap(); + let b = VoxelShape::from_grid([vec![-0.0, 1.0], vec![0.0, 1.0], vec![0.0, 1.0]], &[true]) + .unwrap(); + let joined = a.join_unoptimized(&b, ShapeOp::FALSE).unwrap(); + assert!(joined.is_empty()); + assert_eq!(joined.coordinates(Axis::X)[0].to_bits(), 0.0f64.to_bits()); + assert_eq!(joined.coordinates(Axis::X).len(), 2); + } + #[test] + fn returned_shapes_preserve_alias_identity() { + let a = VoxelShape::block().moved(Vec3::new(2.0, 0.0, 0.0)); + let alias = VoxelShape::empty() + .join_unoptimized(&a, ShapeOp::OR) + .unwrap(); + assert!(a.same_identity(&alias)); + let result = a.join_unoptimized(&alias, ShapeOp::FALSE).unwrap(); + assert!(result.same_identity(&VoxelShape::empty())); + assert_eq!(result.coordinates(Axis::X), &[0.0]); + assert!(!a.same_identity(&a.moved(Vec3::ZERO))); + } + #[test] + fn unions_intersections_difference_and_rejection() { + let a = VoxelShape::block(); + let b = a.moved(Vec3::new(0.5, 0.0, 0.0)); + let union = a.join_unoptimized(&b, ShapeOp::OR).unwrap(); + assert_eq!(union.max(Axis::X), 1.5); + let intersection = a.join_unoptimized(&b, ShapeOp::AND).unwrap(); + assert_eq!(intersection.min(Axis::X), 0.5); + assert_eq!(intersection.max(Axis::X), 1.0); + let difference = a.join_unoptimized(&b, ShapeOp::ONLY_FIRST).unwrap(); + assert_eq!(difference.max(Axis::X), 0.5); + assert!(!a.join_is_not_empty(&a, ShapeOp::XOR).unwrap()); + assert!( + a.join_unoptimized(&b, ShapeOp::from_truth_table(1)) + .is_err() + ); + } +} diff --git a/crates/horizon-core/src/geometry/sweep.rs b/crates/horizon-core/src/geometry/sweep.rs new file mode 100644 index 000000000..e90ee5634 --- /dev/null +++ b/crates/horizon-core/src/geometry/sweep.rs @@ -0,0 +1,224 @@ +//! BlockGetter.forEachBlockIntersectedBetween's ordered movement-path visits. +use super::{Aabb, TraversalError, Vec3, clamp, floor_i32}; +use crate::position::BlockPos; +use std::collections::HashSet; + +struct Sweep<'v, V> { + visitor: &'v mut V, + visited: HashSet<i64>, + work: usize, + limit: usize, +} +impl<V: FnMut(BlockPos, i32) -> bool> Sweep<'_, V> { + fn spend(&mut self) -> Result<(), TraversalError> { + if self.work == self.limit { + return Err(TraversalError::VisitLimit); + } + self.work += 1; + Ok(()) + } + fn visit( + &mut self, + positions: impl Iterator<Item = BlockPos>, + step: i32, + deduplicate: bool, + ) -> Result<bool, TraversalError> { + for pos in positions { + self.spend()?; + if deduplicate && !self.visited.insert(pos.pack()) { + continue; + } + if !(self.visitor)(pos, step) { + return Ok(false); + } + if !deduplicate { + self.visited.insert(pos.pack()); + } + } + Ok(true) + } +} + +/// Visit blocks and step indices for a moving box, stopping if the callback +/// returns false. `final_box` is the box at `end`, not at `start`. +/// +/// Only finite inputs/computed geometry and positive Java-int-sized block boxes +/// are supported. `max_work` limits iterator candidates and ray steps, including +/// suppressed duplicate visits. Prior callbacks remain applied on an error. +/// Block/entity effects and their state transitions are separate from visitation. +pub fn sweep_intersected_blocks( + start: Vec3, + end: Vec3, + final_box: Aabb, + max_work: usize, + mut visitor: impl FnMut(BlockPos, i32) -> bool, +) -> Result<bool, TraversalError> { + if !start.is_finite() + || !end.is_finite() + || !final_box.min_position().is_finite() + || !final_box.max_position().is_finite() + { + return Err(TraversalError::NonFinite); + } + let movement = end.subtract(start); + if !movement.is_finite() { + return Err(TraversalError::NonFinite); + } + if movement.length_squared() < (1.0e-5_f32 * 1.0e-5_f32) as f64 { + let blocks = + BlockPos::between_closed_box(final_box).map_err(|_| TraversalError::InvalidBounds)?; + // This branch has no deduplication in vanilla. Avoid allocating a set + // or copying visited positions for stationary/tiny movements. + for (work, pos) in blocks.enumerate() { + if work == max_work { + return Err(TraversalError::VisitLimit); + } + if !visitor(pos, 0) { + return Ok(false); + } + } + return Ok(true); + } + let mut sweep = Sweep { + visitor: &mut visitor, + visited: HashSet::new(), + work: 0, + limit: max_work, + }; + let initial_box = final_box.move_by(movement.scale(-1.0)); + if !initial_box.min_position().is_finite() || !initial_box.max_position().is_finite() { + return Err(TraversalError::NonFinite); + } + let initial = BlockPos::between_box_corners_in_direction(initial_box, movement) + .map_err(|_| TraversalError::InvalidBounds)?; + if !sweep.visit(initial, 0, false)? { + return Ok(false); + } + let size = final_box.size().components(); + let corner = furthest_corner(movement); + let center = final_box.center().components(); + let finish = Vec3::new( + center[0] + size[0] * 0.5 * corner[0] as f64, + center[1] + size[1] * 0.5 * corner[1] as f64, + center[2] + size[2] * 0.5 * corner[2] as f64, + ); + let origin = finish.subtract(movement); + if !origin.is_finite() || !finish.is_finite() || size.iter().any(|v| !v.is_finite()) { + return Err(TraversalError::NonFinite); + } + let mut position = origin.components().map(floor_i32); + let delta = movement.components(); + let sign = delta.map(|v| { + if v == 0.0 { + 0i32 + } else if v > 0.0 { + 1 + } else { + -1 + } + }); + let increment = std::array::from_fn::<_, 3, _>(|i| { + if sign[i] == 0 { + f64::MAX + } else { + sign[i] as f64 / delta[i] + } + }); + let mut boundary = std::array::from_fn::<_, 3, _>(|i| { + let value = origin.components()[i]; + let fraction = value - (value.floor() as i64) as f64; + increment[i] + * if sign[i] > 0 { + 1.0 - fraction + } else { + fraction + } + }); + let mut step = 0i32; + while boundary.iter().any(|v| *v <= 1.0) { + sweep.spend()?; + let axis = if boundary[0] < boundary[1] { + if boundary[0] < boundary[2] { 0 } else { 2 } + } else if boundary[1] < boundary[2] { + 1 + } else { + 2 + }; + position[axis] = position[axis].wrapping_add(sign[axis]); + boundary[axis] += increment[axis]; + let pos = BlockPos::new(position[0], position[1], position[2]); + // The static Java clip takes raw endpoints, including wrapped +1 ints. + let block_box = Aabb { + min: Vec3::from_block(pos), + max: Vec3::from_block(pos.offset(1, 1, 1)), + }; + let Some(point) = block_box.clip(origin, finish) else { + continue; + }; + step = step.wrapping_add(1); + let clamped = std::array::from_fn::<_, 3, _>(|i| { + clamp( + point.components()[i], + position[i] as f64 + 1.0e-5_f32 as f64, + (position[i] as f64 + 1.0) - 1.0e-5_f32 as f64, + ) + }); + let opposite = + std::array::from_fn::<_, 3, _>(|i| floor_i32(clamped[i] - size[i] * corner[i] as f64)); + let blocks = BlockPos::between_corners_in_direction( + pos, + BlockPos::new(opposite[0], opposite[1], opposite[2]), + movement, + ) + .map_err(|_| TraversalError::InvalidBounds)?; + if !sweep.visit(blocks, step, true)? { + return Ok(false); + } + } + let final_blocks = BlockPos::between_box_corners_in_direction(final_box, movement) + .map_err(|_| TraversalError::InvalidBounds)?; + sweep.visit(final_blocks, step.wrapping_add(1), true) +} + +fn furthest_corner(movement: Vec3) -> [i32; 3] { + let abs = [ + Vec3::new(1.0, 0.0, 0.0).dot(movement).abs(), + Vec3::new(0.0, 1.0, 0.0).dot(movement).abs(), + Vec3::new(0.0, 0.0, 1.0).dot(movement).abs(), + ]; + let [x, y, z] = movement.components().map(|v| if v >= 0.0 { 1 } else { -1 }); + if abs[0] <= abs[1] && abs[0] <= abs[2] { + [-x, -z, y] + } else if abs[1] <= abs[2] { + [z, -y, -x] + } else { + [-y, x, -z] + } +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn tiny_movement_includes_maximum_faces_and_stops_immediately() { + let box_ = Aabb::unit_cube(Vec3::ZERO); + let mut visits = Vec::new(); + assert_eq!( + sweep_intersected_blocks(Vec3::ZERO, Vec3::ZERO, box_, 20, |p, step| { + visits.push((p, step)); + true + }), + Ok(true) + ); + assert_eq!(visits.len(), 8); + assert!(visits.iter().all(|(_, step)| *step == 0)); + assert_eq!( + sweep_intersected_blocks(Vec3::ZERO, Vec3::ZERO, box_, 20, |_, _| false), + Ok(false) + ); + assert_eq!( + sweep_intersected_blocks(Vec3::ZERO, Vec3::ZERO, box_, 1, |_, _| true), + Err(TraversalError::VisitLimit) + ); + } +} diff --git a/crates/horizon-core/src/geometry/traversal.rs b/crates/horizon-core/src/geometry/traversal.rs new file mode 100644 index 000000000..6dee29f6e --- /dev/null +++ b/crates/horizon-core/src/geometry/traversal.rs @@ -0,0 +1,155 @@ +//! Ordered block visits for a finite ray, as in BlockGetter.traverseBlocks. +use super::{Vec3, floor_i32}; +use crate::position::BlockPos; +use std::fmt; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TraversalError { + NonFinite, + VisitLimit, + InvalidBounds, +} +impl fmt::Display for TraversalError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "block traversal failed: {self:?}") + } +} +impl std::error::Error for TraversalError {} + +/// Visit blocks in vanilla ray order until the visitor returns Some, or the +/// segment is exhausted. `None` corresponds to vanilla's miss callback. +/// +/// Non-finite geometry and exceeding the caller's visit budget return typed +/// errors. Previously invoked callbacks are not rolled back on a budget error. +pub fn traverse_blocks<T>( + start: Vec3, + end: Vec3, + max_visits: usize, + mut visitor: impl FnMut(BlockPos) -> Option<T>, +) -> Result<Option<T>, TraversalError> { + if !start.is_finite() || !end.is_finite() { + return Err(TraversalError::NonFinite); + } + if start == end { + return Ok(None); + } + let finish = end.lerp(start, -1e-7); + let origin = start.lerp(end, -1e-7); + let delta = origin.vector_to(finish).components(); + if !origin.is_finite() || !finish.is_finite() || delta.iter().any(|v| !v.is_finite()) { + return Err(TraversalError::NonFinite); + } + let mut position = origin.components().map(floor_i32); + let sign = delta.map(|v| { + if v == 0.0 { + 0i32 + } else if v > 0.0 { + 1 + } else { + -1 + } + }); + let step = std::array::from_fn::<_, 3, _>(|i| { + if sign[i] == 0 { + f64::MAX + } else { + sign[i] as f64 / delta[i] + } + }); + let mut boundary = std::array::from_fn::<_, 3, _>(|i| { + let value = origin.components()[i]; + let fraction = value - (value.floor() as i64) as f64; + step[i] + * if sign[i] > 0 { + 1.0 - fraction + } else { + fraction + } + }); + let mut visited = 0; + loop { + if visited == max_visits { + return Err(TraversalError::VisitLimit); + } + visited += 1; + if let Some(result) = visitor(BlockPos::new(position[0], position[1], position[2])) { + return Ok(Some(result)); + } + if !(boundary[0] <= 1.0 || boundary[1] <= 1.0 || boundary[2] <= 1.0) { + return Ok(None); + } + // Strict comparisons give Z priority on a three-way corner tie. + let axis = if boundary[0] < boundary[1] { + if boundary[0] < boundary[2] { 0 } else { 2 } + } else if boundary[1] < boundary[2] { + 1 + } else { + 2 + }; + position[axis] = position[axis].wrapping_add(sign[axis]); + boundary[axis] += step[axis]; + } +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn corner_order_and_early_exit() { + let mut visited = Vec::new(); + assert_eq!( + traverse_blocks::<()>( + Vec3::new(0.5, 0.5, 0.5), + Vec3::new(1.5, 1.5, 1.5), + 10, + |pos| { + visited.push(pos); + None + } + ), + Ok(None) + ); + assert_eq!( + visited, + vec![ + BlockPos::new(0, 0, 0), + BlockPos::new(0, 0, 1), + BlockPos::new(0, 1, 1), + BlockPos::new(1, 1, 1) + ] + ); + let result = traverse_blocks( + Vec3::new(0.5, 0.5, 0.5), + Vec3::new(1.5, 1.5, 1.5), + 10, + |pos| (pos.z == 1).then_some(pos), + ); + assert_eq!(result, Ok(Some(BlockPos::new(0, 0, 1)))); + } + #[test] + fn miss_zero_identity_and_budget_errors() { + let mut count = 0; + assert_eq!( + traverse_blocks::<()>(Vec3::ZERO, Vec3::ZERO, 0, |_| panic!( + "no visits for equal endpoints" + )), + Ok(None) + ); + assert_eq!( + traverse_blocks::<()>(Vec3::new(-0.0, 0.0, 0.0), Vec3::ZERO, 10, |_| { + count += 1; + None + }), + Ok(None) + ); + assert_eq!(count, 4); + assert_eq!( + traverse_blocks::<()>(Vec3::ZERO, Vec3::new(1.0, 1.0, 1.0), 1, |_| None), + Err(TraversalError::VisitLimit) + ); + assert_eq!( + traverse_blocks::<()>(Vec3::ZERO, Vec3::new(f64::NAN, 1.0, 1.0), 1, |_| None), + Err(TraversalError::NonFinite) + ); + } +} diff --git a/crates/horizon-core/src/geometry/trig.rs b/crates/horizon-core/src/geometry/trig.rs new file mode 100644 index 000000000..988f05177 --- /dev/null +++ b/crates/horizon-core/src/geometry/trig.rs @@ -0,0 +1,38 @@ +//! Vanilla's quantized float sine table with Java double-to-long indexing. +use std::sync::OnceLock; + +pub const DEG_TO_RAD: f32 = f32::from_bits(0x3c8e_fa35); +pub const RAD_TO_DEG: f32 = f32::from_bits(0x4265_2ee0); +const SCALE: f64 = 10430.378350470453; +static SINE: OnceLock<Box<[f32]>> = OnceLock::new(); + +/// Generated from the 26.3 table formula, with no bundled vanilla artifact. +/// Differential validation checks all 65,536 entries on the tested platform. +pub fn sine_table() -> &'static [f32] { + SINE.get_or_init(|| { + (0..65536) + .map(|i| (i as f64 / SCALE).sin() as f32) + .collect::<Vec<_>>() + .into_boxed_slice() + }) +} +pub fn sin(angle: f64) -> f32 { + sine_table()[((angle * SCALE) as i64 & 65535) as usize] +} +pub fn cos(angle: f64) -> f32 { + sine_table()[((angle * SCALE + 16384.0) as i64 & 65535) as usize] +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn long_narrowing_and_quadrants() { + assert_eq!(sin(0.0).to_bits(), 0.0f32.to_bits()); + assert_eq!(sin(f64::NAN), sin(0.0)); + assert_eq!(sin(f64::INFINITY), sine_table()[65535]); + assert_eq!(sin(f64::NEG_INFINITY), sine_table()[0]); + assert_eq!(cos(0.0), 1.0); + assert_eq!(sin(std::f64::consts::FRAC_PI_2), 1.0); + } +} diff --git a/crates/horizon-core/src/lib.rs b/crates/horizon-core/src/lib.rs new file mode 100644 index 000000000..01af3f932 --- /dev/null +++ b/crates/horizon-core/src/lib.rs @@ -0,0 +1,18 @@ +//! Horizon's initial simulation primitives, targeting Minecraft Java Edition 26.3. +//! +//! This is not a playable game. Differential checks cover only the operations +//! listed in docs/rust-parity.md; the rest of vanilla remains unimplemented. +#![forbid(unsafe_code)] + +pub mod biome; +pub mod carving; +pub mod density; +pub mod geometry; +pub mod noise; +pub mod position; +pub mod random; +pub mod storage; +pub mod text; +pub mod ticks; + +pub const VANILLA_VERSION: &str = "26.3"; diff --git a/crates/horizon-core/src/noise/mod.rs b/crates/horizon-core/src/noise/mod.rs new file mode 100644 index 000000000..cb255fbe5 --- /dev/null +++ b/crates/horizon-core/src/noise/mod.rs @@ -0,0 +1,289 @@ +//! Base noise samplers for the pinned 26.3 target. +//! +//! Coordinates use double precision; Perlin interpolation and its derivatives +//! use single precision. Keep operation order: algebraic rearrangement changes +//! world generation. Complete density graphs and terrain generation remain absent. +mod normal; +mod perlin; +mod simplex; +mod stack; +mod volume; + +pub use normal::{ + NoiseBuildError, NormalNoise, NormalNoiseBuilder, Normalization, OctaveInfo, create_legacy_fbm, +}; +pub use perlin::{PerlinNoise, SmearedPerlinNoise}; +pub use simplex::SimplexNoise; +pub use stack::{Noise, NoiseLayer, NoiseStack, NoiseStackBuilder}; +pub use volume::{DensityError, DensityVolume}; + +use crate::random::RandomSource; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct NanRange; +impl std::fmt::Display for NanRange { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str("noise interval bounds cannot include NaN") + } +} +impl std::error::Error for NanRange {} + +/// The immutable offsets and permutation table shared by gradient samplers. +#[derive(Clone, Debug)] +pub struct GradientTable { + offsets: [f64; 3], + permutations: [u8; 256], +} + +impl GradientTable { + pub fn new(random: &mut impl RandomSource, offset_scale: f64) -> Self { + // Zero scale still consumes all three draws. + let offsets = std::array::from_fn(|_| random.next_double() * offset_scale); + let mut permutations = std::array::from_fn(|i| i as u8); + for i in 0..256 { + let other = i + random.next_int_bound((256 - i) as i32).unwrap() as usize; + permutations.swap(i, other); + } + Self { + offsets, + permutations, + } + } + + pub fn offsets(&self) -> &[f64; 3] { + &self.offsets + } + pub fn permutations(&self) -> &[u8; 256] { + &self.permutations + } + + fn permute(&self, index: i32) -> i32 { + i32::from(self.permutations[(index & 255) as usize]) + } + + fn gradient(&self, index: i32) -> [i32; 3] { + GRADIENTS[(self.permute(index) & 15) as usize] + } +} + +// Perlin's 16-direction table includes four repeated directions. Simplex uses +// the first twelve directions, selecting them with remainder instead of masking. +const GRADIENTS: [[i32; 3]; 16] = [ + [1, 1, 0], + [-1, 1, 0], + [1, -1, 0], + [-1, -1, 0], + [1, 0, 1], + [-1, 0, 1], + [1, 0, -1], + [-1, 0, -1], + [0, 1, 1], + [0, -1, 1], + [0, 1, -1], + [0, -1, -1], + [1, 1, 0], + [0, -1, 1], + [-1, 1, 0], + [0, -1, -1], +]; + +fn dot(gradient: [i32; 3], point: [f32; 3]) -> f32 { + gradient[0] as f32 * point[0] + gradient[1] as f32 * point[1] + gradient[2] as f32 * point[2] +} + +/// Vanilla's periodic coordinate reduction with the normal Far Lands flag off. +/// The fast-path boundary is the double immediately below 2^24. +pub fn wrap(value: f64) -> f64 { + let half = f64::from_bits(16_777_216.0_f64.to_bits() - 1); + if value >= -half && value < half { + value + } else { + value - (value / 33_554_432.0 + 0.5).floor() * 33_554_432.0 + } +} + +fn smoothstep(value: f32) -> f32 { + value * value * value * (value * (value * 6.0 - 15.0) + 10.0) +} +fn smoothstep_derivative(value: f32) -> f32 { + 30.0 * value * value * (value - 1.0) * (value - 1.0) +} +fn lerp(delta: f32, start: f32, end: f32) -> f32 { + start + delta * (end - start) +} +fn lerp2(a: f32, b: f32, values: [f32; 4]) -> f32 { + lerp( + b, + lerp(a, values[0], values[1]), + lerp(a, values[2], values[3]), + ) +} +fn lerp3(fade: [f32; 3], values: [f32; 8]) -> f32 { + lerp( + fade[2], + lerp2(fade[0], fade[1], values[..4].try_into().unwrap()), + lerp2(fade[0], fade[1], values[4..].try_into().unwrap()), + ) +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::{geometry::Axis, random::LegacyRandom}; + + #[test] + fn vanilla_seed_zero_samples_and_derivatives() { + // Values captured by the original adapter from the pinned server JAR. + let mut random = LegacyRandom::new(0); + let noise = PerlinNoise::new(&mut random); + assert_eq!(random.next_long(), -6_819_959_017_335_327_829); + let mut derivative = [0.0; 3]; + assert_eq!( + noise + .noise_with_derivative(0.0, 0.0, 0.0, &mut derivative) + .to_bits(), + 3_183_733_582 + ); + assert_eq!( + derivative.map(f32::to_bits), + [3_189_117_465, 3_214_556_526, 1_017_326_887] + ); + let mut random = LegacyRandom::new(0); + let simplex = SimplexNoise::with_skipped_offsets(&mut random, true); + assert_eq!(simplex.table().offsets(), &[0.0; 3]); + assert_eq!(simplex.table().permutations(), noise.table().permutations()); + assert_eq!(random.next_long(), -6_819_959_017_335_327_829); + assert_eq!(simplex.get2(0.25, 0.75).to_bits(), 3_146_180_247); + assert_eq!(simplex.get3(0.25, 0.5, 0.75).to_bits(), 1_062_011_824); + assert!(simplex.get3(f64::NAN, 0.0, 0.0).is_nan()); + assert_eq!( + SmearedPerlinNoise::new(&mut random, f64::NAN).range(), + Err(NanRange) + ); + } + + #[test] + fn bulk_accumulation_preserves_tail_and_rejects_short_buffers_before_writes() { + let noise = PerlinNoise::new(&mut LegacyRandom::new(0)); + let volume = DensityVolume::new([1; 3], [0; 3], [1; 3]).unwrap(); + let mut random = LegacyRandom::new(0); + let mut values = + std::array::from_fn::<_, 5, _>(|_| f32::from_bits(random.next_int() as u32)); + let tail = values[1..].iter().map(|v| v.to_bits()).collect::<Vec<_>>(); + noise + .add_to_volume(&mut values, volume, 1.0, 1.0, 1.0) + .unwrap(); + assert_eq!(values[0].to_bits(), 3_184_062_705); + assert_eq!( + values[1..].iter().map(|v| v.to_bits()).collect::<Vec<_>>(), + tail + ); + let before = values.map(f32::to_bits); + let too_large = DensityVolume::new([2; 3], [0; 3], [1; 3]).unwrap(); + assert_eq!( + noise.add_to_volume(&mut values, too_large, 1.0, 1.0, 1.0), + Err(DensityError::BufferTooShort) + ); + assert_eq!(values.map(f32::to_bits), before); + } + + #[test] + fn density_dimensions_are_bounded_and_coordinates_wrap() { + assert_eq!( + DensityVolume::new([0, 1, 1], [0; 3], [1; 3]), + Err(DensityError::NonpositiveDimensions) + ); + assert_eq!( + DensityVolume::new([1; 3], [0; 3], [1, 0, 1]), + Err(DensityError::NonpositiveSteps) + ); + assert_eq!( + DensityVolume::new([i32::MAX; 3], [0; 3], [1; 3]), + Err(DensityError::VolumeTooLarge) + ); + let volume = DensityVolume::new([2, 3, 4], [i32::MAX, 0, -1], [2, 4, 8]).unwrap(); + assert_eq!(volume.block(Axis::X, 1), Some(i32::MIN + 1)); + assert_eq!(volume.block(Axis::X, 2), None); + assert_eq!(volume.index([1, 2, 3]), Some(23)); + assert_eq!(volume.index([1, 3, 3]), None); + } + + #[test] + fn normal_noise_reference_values_and_legacy_failure_draws() { + let mut builder = NormalNoise::builder(); + builder.set_base_octave(-3); + assert_eq!( + builder.set_amplitude_modifier(-1, 0.0).unwrap_err(), + NoiseBuildError::ModifierIndex + ); + builder.set_octave_count(3).unwrap(); + builder.set_amplitude_modifier(1, 0.0).unwrap(); + assert_eq!( + builder.set_octave_count(4).unwrap_err(), + NoiseBuildError::CountAfterModifiers + ); + let definition = builder.build().unwrap(); + assert_eq!( + definition.normalization_factor().to_bits(), + 4_607_442_513_526_237_848 + ); + assert_eq!( + definition + .octaves() + .iter() + .map(|o| o.octave_index) + .collect::<Vec<_>>(), + [-3, -1] + ); + let mut random = LegacyRandom::new(0); + let modern = definition.create(&mut random).unwrap(); + assert_eq!(modern.get3(0.0, 0.0, 0.0).to_bits(), 1_042_650_710); + assert_eq!(random.next_long(), -6_688_467_811_848_818_630); + let mut random = LegacyRandom::new(0); + let legacy = definition + .create_for_legacy_nether_biome(&mut random) + .unwrap(); + assert_eq!(legacy.get3(0.0, 0.0, 0.0).to_bits(), 3_199_632_936); + assert_eq!(random.next_long(), 4_966_550_093_728_345_520); + let mut empty = NormalNoise::builder(); + empty.set_base_octave(2).set_octave_count(0).unwrap(); + let mut random = LegacyRandom::new(0); + assert_eq!( + empty + .build() + .unwrap() + .create_for_legacy_nether_biome(&mut random) + .unwrap_err(), + NoiseBuildError::PositiveLegacyOctaves + ); + assert_eq!(random.next_long(), -6_819_959_017_335_327_829); + let mut random = LegacyRandom::new(0); + assert_eq!( + create_legacy_fbm(&mut random, i32::MIN, &[1.0]).unwrap_err(), + NoiseBuildError::LegacyWorkLimit + ); + assert_eq!(random.next_long(), LegacyRandom::new(0).next_long()); + } + + #[test] + fn stack_snapshots_share_layers_and_preserve_zero_amplitude_semantics() { + use std::sync::Arc; + let sampler: Arc<dyn Noise> = Arc::new(PerlinNoise::new(&mut LegacyRandom::new(0))); + let mut builder = NoiseStack::builder(); + builder.add(Arc::clone(&sampler), 1.0, 0.0); + let zero = builder.build().unwrap(); + builder.add(Arc::clone(&sampler), 2.0, 1.0); + assert_eq!(zero.layers().len(), 1); + assert!(Arc::ptr_eq(zero.get_layer(0).unwrap(), &sampler)); + assert!(zero.get_layer(1).is_none()); + let mut flattened = NoiseStack::builder(); + flattened.add_stack(&zero, 1.0, f32::INFINITY); + assert_eq!(flattened.build().unwrap_err(), NanRange); + let nested = NoiseStack::builder() + .add(Arc::new(zero), 1.0, f32::INFINITY) + .build() + .unwrap(); + assert_eq!(nested.range().unwrap(), [0.0; 2]); + assert!(nested.get3(1.0, 2.0, 3.0).is_nan()); + } +} diff --git a/crates/horizon-core/src/noise/normal.rs b/crates/horizon-core/src/noise/normal.rs new file mode 100644 index 000000000..1a0b8b853 --- /dev/null +++ b/crates/horizon-core/src/noise/normal.rs @@ -0,0 +1,387 @@ +use super::{NanRange, NoiseStack, PerlinNoise}; +use crate::random::{PositionalRandom, RandomSource}; +use std::sync::Arc; + +/// An allocation bound for the builder API (the vanilla data codec allows 32). +const MAX_BUILDER_OCTAVES: i32 = 4096; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum NoiseBuildError { + NegativeOctaveCount, + TooManyOctaves, + CountAfterModifiers, + ModifierIndex, + EmptyAmplitudes, + NanRange, + InvertedRange, + MissingNoiseLevels, + PositiveLegacyOctaves, + LegacyWorkLimit, +} +impl std::fmt::Display for NoiseBuildError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str(match self { + Self::NegativeOctaveCount => "octave count cannot be negative", + Self::TooManyOctaves => "octave count exceeds the 4096-layer allocation bound", + Self::CountAfterModifiers => { + "cannot change octave count after setting amplitude modifiers" + } + Self::ModifierIndex => "amplitude modifier index is outside the octave range", + Self::EmptyAmplitudes => "at least one amplitude is required", + Self::NanRange => "noise interval bounds cannot include NaN", + Self::InvertedRange => "noise interval lower bound exceeds its upper bound", + Self::MissingNoiseLevels => "legacy initializer could not create all nonzero octaves", + Self::PositiveLegacyOctaves => "positive legacy octaves are disabled", + Self::LegacyWorkLimit => "legacy initializer exceeds the 4096-octave work bound", + }) + } +} +impl std::error::Error for NoiseBuildError {} +impl From<NanRange> for NoiseBuildError { + fn from(_: NanRange) -> Self { + Self::NanRange + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Normalization { + Enabled, + Disabled, + Legacy, +} + +#[derive(Clone, Copy, Debug)] +pub struct OctaveInfo { + pub octave_index: i32, + pub frequency: f64, + pub amplitude: f64, +} +impl OctaveInfo { + pub fn seed(&self) -> String { + format!("octave_{}", self.octave_index) + } +} + +#[derive(Clone, Debug)] +pub struct NormalNoise { + parameters: NormalNoiseBuilder, + octaves: Vec<OctaveInfo>, + normalization_factor: f64, + range: [f32; 2], +} +impl NormalNoise { + pub fn builder() -> NormalNoiseBuilder { + NormalNoiseBuilder::default() + } + pub fn octaves(&self) -> &[OctaveInfo] { + &self.octaves + } + pub fn normalization_factor(&self) -> f64 { + self.normalization_factor + } + pub fn range(&self) -> [f32; 2] { + self.range + } + + pub fn create(&self, random: &mut impl RandomSource) -> Result<NoiseStack, NoiseBuildError> { + // Even an empty stack consumes both positional forks. + let first = random.fork_positional(); + let second = random.fork_positional(); + let mut builder = NoiseStack::builder(); + for octave in &self.octaves { + let name = octave.seed(); + let a = PerlinNoise::new(&mut first.from_hash_of(&name)); + let b = PerlinNoise::new(&mut second.from_hash_of(&name)); + let amplitude = (self.normalization_factor * octave.amplitude) as f32; + builder.add(Arc::new(a), octave.frequency, amplitude); + builder.add( + Arc::new(b), + octave.frequency * 1.018_126_888_217_522_7, + amplitude, + ); + } + Ok(builder.build()?) + } + + pub fn create_for_legacy_nether_biome( + &self, + random: &mut impl RandomSource, + ) -> Result<NoiseStack, NoiseBuildError> { + let defaults; + let modifiers = if self.parameters.modifiers.is_empty() { + defaults = vec![1.0; self.parameters.octave_count as usize]; + &defaults + } else { + &self.parameters.modifiers + }; + let first = create_legacy_fbm(random, self.parameters.base_octave, modifiers)?; + let second = create_legacy_fbm(random, self.parameters.base_octave, modifiers)?; + let amplitude = (self.normalization_factor * self.parameters.base_amplitude) as f32; + Ok(NoiseStack::builder() + .add_stack(&first, 1.0, amplitude) + .add_stack(&second, 1.018_126_888_217_522_7, amplitude) + .build()?) + } + + pub fn create_parity(base_octave: i32, amplitudes: &[f64]) -> Result<Self, NoiseBuildError> { + if amplitudes.is_empty() { + return Err(NoiseBuildError::EmptyAmplitudes); + } + if amplitudes.len() > MAX_BUILDER_OCTAVES as usize { + return Err(NoiseBuildError::TooManyOctaves); + } + let count = amplitudes.len() as i32; + let octaves = build_octaves(base_octave, 1.0, count, true, amplitudes); + let factor = normalization_factor(sum_abs(&octaves), &octaves); + let base_amplitude = if factor == 0.0 { + 1.0 + } else { + parity_factor(1.0, count, amplitudes) / factor + }; + NormalNoiseBuilder { + base_octave, + base_amplitude, + octave_count: count, + normalization: Normalization::Enabled, + modifiers: amplitudes.to_vec(), + } + .build() + } +} + +#[derive(Clone, Debug)] +pub struct NormalNoiseBuilder { + base_amplitude: f64, + base_octave: i32, + octave_count: i32, + normalization: Normalization, + modifiers: Vec<f64>, +} +impl Default for NormalNoiseBuilder { + fn default() -> Self { + Self { + base_amplitude: 1.0, + base_octave: 0, + octave_count: 1, + normalization: Normalization::Enabled, + modifiers: Vec::new(), + } + } +} +impl NormalNoiseBuilder { + pub fn set_base_amplitude(&mut self, amplitude: f64) -> &mut Self { + self.base_amplitude = amplitude; + self + } + pub fn set_base_octave(&mut self, octave: i32) -> &mut Self { + self.base_octave = octave; + self + } + pub fn set_normalization(&mut self, normalization: Normalization) -> &mut Self { + self.normalization = normalization; + self + } + pub fn set_octave_count(&mut self, count: i32) -> Result<&mut Self, NoiseBuildError> { + if !self.modifiers.is_empty() { + return Err(NoiseBuildError::CountAfterModifiers); + } + self.octave_count = count; + Ok(self) + } + pub fn set_amplitude_modifier( + &mut self, + index: i32, + value: f64, + ) -> Result<&mut Self, NoiseBuildError> { + if index < 0 || index >= self.octave_count { + return Err(NoiseBuildError::ModifierIndex); + } + if self.octave_count > MAX_BUILDER_OCTAVES { + return Err(NoiseBuildError::TooManyOctaves); + } + if self.modifiers.is_empty() { + self.modifiers.resize(self.octave_count as usize, 1.0); + } + self.modifiers[index as usize] = value; + Ok(self) + } + pub fn build(&self) -> Result<NormalNoise, NoiseBuildError> { + if self.octave_count < 0 { + return Err(NoiseBuildError::NegativeOctaveCount); + } + if self.octave_count > MAX_BUILDER_OCTAVES { + return Err(NoiseBuildError::TooManyOctaves); + } + let octaves = build_octaves( + self.base_octave, + self.base_amplitude, + self.octave_count, + self.normalization != Normalization::Disabled, + &self.modifiers, + ); + let mut sum = sum_abs(&octaves); + let mut factor = normalization_factor(sum, &octaves); + if self.normalization == Normalization::Legacy && factor != 0.0 { + let legacy = parity_factor(self.base_amplitude, self.octave_count, &self.modifiers); + sum *= legacy / factor; + factor = legacy; + } + let bound = (sum * (1.0 / 3.0) * 6.0) as f32; + if bound.is_nan() { + return Err(NoiseBuildError::NanRange); + } + if bound < 0.0 { + return Err(NoiseBuildError::InvertedRange); + } + Ok(NormalNoise { + parameters: self.clone(), + octaves, + normalization_factor: factor, + range: [-bound, bound], + }) + } +} + +/// The legacy initializer consumes the caller's stream in reverse octave order. +/// Missing and zero-amplitude octaves consume exactly 262 integer draws. +/// Requests outside the documented allocation/work bounds fail before drawing. +pub fn create_legacy_fbm( + random: &mut impl RandomSource, + base_octave: i32, + amplitudes: &[f64], +) -> Result<NoiseStack, NoiseBuildError> { + if amplitudes.len() > MAX_BUILDER_OCTAVES as usize { + return Err(NoiseBuildError::TooManyOctaves); + } + let zero_index = base_octave.wrapping_neg(); + if zero_index.wrapping_sub(1) >= MAX_BUILDER_OCTAVES { + return Err(NoiseBuildError::LegacyWorkLimit); + } + let count = amplitudes.len() as i32; + let mut levels = vec![None; amplitudes.len()]; + let zero_noise = PerlinNoise::new(random); + if zero_index >= 0 && zero_index < count && amplitudes[zero_index as usize] != 0.0 { + levels[zero_index as usize] = Some(zero_noise); + } + for index in (0..zero_index).rev() { + if index < count && amplitudes[index as usize] != 0.0 { + levels[index as usize] = Some(PerlinNoise::new(random)); + } else { + random.consume_count(262); + } + } + if levels.iter().filter(|v| v.is_some()).count() + != amplitudes.iter().filter(|v| **v != 0.0).count() + { + return Err(NoiseBuildError::MissingNoiseLevels); + } + if zero_index < count - 1 { + return Err(NoiseBuildError::PositiveLegacyOctaves); + } + let mut frequency = power_of_two(zero_index.wrapping_neg()); + let mut amplitude = power_of_two(count - 1) / (power_of_two(count) - 1.0); + let mut builder = NoiseStack::builder(); + for (index, noise) in levels.into_iter().enumerate() { + if let Some(noise) = noise { + builder.add( + Arc::new(noise), + frequency, + (amplitude * amplitudes[index]) as f32, + ); + } + frequency *= 2.0; + amplitude /= 2.0; + } + Ok(builder.build()?) +} + +fn modifier(modifiers: &[f64], index: usize) -> f64 { + if modifiers.is_empty() { + 1.0 + } else { + modifiers[index] + } +} + +fn build_octaves( + base: i32, + amplitude: f64, + count: i32, + normalize: bool, + modifiers: &[f64], +) -> Vec<OctaveInfo> { + let mut frequency = power_of_two(base); + let mut amplitude = amplitude; + if normalize { + amplitude *= power_of_two(count - 1) / (power_of_two(count) - 1.0); + } + let mut result = Vec::with_capacity(count as usize); + for index in 0..count { + let multiplier = modifier(modifiers, index as usize); + if multiplier != 0.0 { + result.push(OctaveInfo { + octave_index: base.wrapping_add(index), + frequency, + amplitude: amplitude * multiplier, + }); + } + frequency *= 2.0; + amplitude *= 0.5; + } + result +} + +// Math.pow(2, integer), including exact subnormal powers and saturation, without +// a platform libm approximation. Frequencies subsequently double iteratively. +fn power_of_two(exponent: i32) -> f64 { + match exponent { + ..=-1075 => 0.0, + -1074..=-1023 => f64::from_bits(1_u64 << (exponent + 1074)), + -1022..=1023 => f64::from_bits(((exponent + 1023) as u64) << 52), + _ => f64::INFINITY, + } +} + +fn sum_abs(octaves: &[OctaveInfo]) -> f64 { + // Sequential DoubleStream.sum uses compensated summation and an uncorrected + // sum to recover infinity when compensation arithmetic produces NaN. + let (mut sum, mut correction, mut simple) = (0.0, 0.0, 0.0); + for octave in octaves { + let value = octave.amplitude.abs(); + let adjusted = value - correction; + let next = sum + adjusted; + correction = (next - sum) - adjusted; + sum = next; + simple += value; + } + let result = sum - correction; + if result.is_nan() && simple.is_infinite() { + simple + } else { + result + } +} +fn normalization_factor(sum: f64, octaves: &[OctaveInfo]) -> f64 { + let mut variance = 0.0; + for octave in octaves { + let deviation = 0.270_224_783_124_521_1 * octave.amplitude.abs(); + variance += deviation * deviation; + } + let deviation = variance.sqrt(); + if deviation == 0.0 { + 0.0 + } else { + (sum * (1.0 / 3.0)) / (deviation * 2.0_f64.sqrt()) + } +} +fn parity_factor(base_amplitude: f64, count: i32, modifiers: &[f64]) -> f64 { + let (mut first, mut last) = (i32::MAX, i32::MIN); + for index in 0..count { + if modifier(modifiers, index as usize) != 0.0 { + first = first.min(index); + last = last.max(index); + } + } + let distance = last.wrapping_sub(first).wrapping_add(1); + base_amplitude * 0.5 * (1.0 / 3.0) / (0.1 * (1.0 + 1.0 / f64::from(distance))) +} diff --git a/crates/horizon-core/src/noise/perlin.rs b/crates/horizon-core/src/noise/perlin.rs new file mode 100644 index 000000000..101ded427 --- /dev/null +++ b/crates/horizon-core/src/noise/perlin.rs @@ -0,0 +1,273 @@ +use super::{ + DensityError, DensityVolume, GradientTable, dot, lerp2, lerp3, smoothstep, + smoothstep_derivative, wrap, +}; +use crate::{geometry::floor_i32, random::RandomSource}; + +#[derive(Clone, Debug)] +pub struct PerlinNoise { + table: GradientTable, +} + +impl PerlinNoise { + pub fn new(random: &mut impl RandomSource) -> Self { + Self { + table: GradientTable::new(random, 256.0), + } + } + pub fn table(&self) -> &GradientTable { + &self.table + } + pub fn range(&self) -> [f32; 2] { + [-2.0, 2.0] + } + pub fn get2(&self, x: f64, z: f64) -> f32 { + self.get3(wrap(x), 0.0, wrap(z)) + } + pub fn get3(&self, x: f64, y: f64, z: f64) -> f32 { + let (cell, relative) = self.coordinates([x, y, z]); + let point = relative.map(|v| v as f32); + self.sample(cell, point, point[1]) + } + + fn coordinates(&self, point: [f64; 3]) -> ([i32; 3], [f64; 3]) { + let shifted: [f64; 3] = std::array::from_fn(|i| wrap(point[i]) + self.table.offsets[i]); + let cell = shifted.map(floor_i32); + ( + cell, + std::array::from_fn(|i| shifted[i] - f64::from(cell[i])), + ) + } + + fn gradients(&self, cell: [i32; 3]) -> [[i32; 3]; 8] { + let p = self.table.permute(cell[0]); + let q = self.table.permute(cell[0].wrapping_add(1)); + let lower = self.table.permute(p.wrapping_add(cell[1])); + let upper = self.table.permute(p.wrapping_add(cell[1]).wrapping_add(1)); + let lower_x = self.table.permute(q.wrapping_add(cell[1])); + let upper_x = self.table.permute(q.wrapping_add(cell[1]).wrapping_add(1)); + let rows = [ + lower, lower_x, upper, upper_x, lower, lower_x, upper, upper_x, + ]; + std::array::from_fn(|i| { + self.table + .gradient(rows[i].wrapping_add(cell[2]).wrapping_add((i / 4) as i32)) + }) + } + + fn corner_values(gradients: [[i32; 3]; 8], point: [f32; 3]) -> [f32; 8] { + std::array::from_fn(|i| { + dot( + gradients[i], + [ + point[0] - (i & 1) as f32, + point[1] - ((i >> 1) & 1) as f32, + point[2] - ((i >> 2) & 1) as f32, + ], + ) + }) + } + + fn sample(&self, cell: [i32; 3], point: [f32; 3], interpolation_y: f32) -> f32 { + let values = Self::corner_values(self.gradients(cell), point); + lerp3( + [ + smoothstep(point[0]), + smoothstep(interpolation_y), + smoothstep(point[2]), + ], + values, + ) + } + + /// Returns the sampled value and adds its gradient into the supplied array. + pub fn noise_with_derivative(&self, x: f64, y: f64, z: f64, derivative: &mut [f32; 3]) -> f32 { + let (cell, relative) = self.coordinates([x, y, z]); + let point = relative.map(|v| v as f32); + let gradients = self.gradients(cell); + let values = Self::corner_values(gradients, point); + let fade = point.map(smoothstep); + let gradient = + std::array::from_fn::<_, 3, _>(|axis| lerp3(fade, gradients.map(|g| g[axis] as f32))); + let changes = [ + lerp2( + fade[1], + fade[2], + [ + values[1] - values[0], + values[3] - values[2], + values[5] - values[4], + values[7] - values[6], + ], + ), + lerp2( + fade[2], + fade[0], + [ + values[2] - values[0], + values[6] - values[4], + values[3] - values[1], + values[7] - values[5], + ], + ), + lerp2( + fade[0], + fade[1], + [ + values[4] - values[0], + values[5] - values[1], + values[6] - values[2], + values[7] - values[3], + ], + ), + ]; + for axis in 0..3 { + derivative[axis] += gradient[axis] + smoothstep_derivative(point[axis]) * changes[axis]; + } + lerp3(fade, values) + } + + /// Adds a scaled volume using vanilla's cached X/Z dot products and Y loop. + /// Extra buffer elements are untouched; short buffers are rejected up front. + pub fn add_to_volume( + &self, + buffer: &mut [f32], + volume: DensityVolume, + xz_scale: f64, + y_scale: f64, + amplitude: f32, + ) -> Result<(), DensityError> { + self.add_volume(buffer, volume, xz_scale, y_scale, amplitude, None) + } + + fn add_volume( + &self, + buffer: &mut [f32], + volume: DensityVolume, + xz_scale: f64, + y_scale: f64, + amplitude: f32, + fudge_y_scale: Option<f64>, + ) -> Result<(), DensityError> { + if buffer.len() < volume.size() { + return Err(DensityError::BufferTooShort); + } + let [size_x, size_y, size_z] = volume.sizes(); + let mut index = 0; + for z in 0..size_z { + let shifted_z = + wrap(f64::from(volume.coordinate(2, z)) * xz_scale) + self.table.offsets[2]; + let cell_z = floor_i32(shifted_z); + let dz = (shifted_z - f64::from(cell_z)) as f32; + let fade_z = smoothstep(dz); + for x in 0..size_x { + let shifted_x = + wrap(f64::from(volume.coordinate(0, x)) * xz_scale) + self.table.offsets[0]; + let cell_x = floor_i32(shifted_x); + let dx = (shifted_x - f64::from(cell_x)) as f32; + let fade_x = smoothstep(dx); + let mut previous_y = i32::MIN; + let mut xz_dots = [0.0_f32; 8]; + let mut y_gradients = [0.0_f32; 8]; + for y in 0..size_y { + let input_y = f64::from(volume.coordinate(1, y)) * y_scale; + let shifted_y = wrap(input_y) + self.table.offsets[1]; + let cell_y = floor_i32(shifted_y); + let dy = shifted_y - f64::from(cell_y); + let fade_y = smoothstep(dy as f32); + if previous_y != cell_y { + let gradients = self.gradients([cell_x, cell_y, cell_z]); + for i in 0..8 { + xz_dots[i] = gradients[i][0] as f32 * (dx - (i & 1) as f32) + + gradients[i][2] as f32 * (dz - ((i >> 2) & 1) as f32); + y_gradients[i] = gradients[i][1] as f32; + } + previous_y = cell_y; + } + let dy = match fudge_y_scale { + Some(scale) => (dy - compute_fudge_y(input_y, dy, scale)) as f32, + None => dy as f32, + }; + let values = std::array::from_fn(|i| { + xz_dots[i] + y_gradients[i] * (dy - ((i >> 1) & 1) as f32) + }); + buffer[index] += amplitude * lerp3([fade_x, fade_y, fade_z], values); + index += 1; + } + } + } + Ok(()) + } +} + +#[derive(Clone, Debug)] +pub struct SmearedPerlinNoise { + base: PerlinNoise, + fudge_y_scale: f64, +} + +impl SmearedPerlinNoise { + pub fn new(random: &mut impl RandomSource, fudge_y_scale: f64) -> Self { + Self { + base: PerlinNoise::new(random), + fudge_y_scale, + } + } + pub fn table(&self) -> &GradientTable { + self.base.table() + } + pub fn range(&self) -> Result<[f32; 2], super::NanRange> { + let bound = (self.fudge_y_scale.abs() + 2.0) as f32; + if bound.is_nan() { + Err(super::NanRange) + } else { + Ok([-bound, bound]) + } + } + pub fn get2(&self, x: f64, z: f64) -> f32 { + self.get3(wrap(x), 0.0, wrap(z)) + } + pub fn get3(&self, x: f64, y: f64, z: f64) -> f32 { + let (cell, relative) = self.base.coordinates([x, y, z]); + let fudge = compute_fudge_y(y, relative[1], self.fudge_y_scale); + self.base.sample( + cell, + [ + relative[0] as f32, + (relative[1] - fudge) as f32, + relative[2] as f32, + ], + relative[1] as f32, + ) + } + // This inherited method samples the unsmeared field, just as vanilla does. + pub fn noise_with_derivative(&self, x: f64, y: f64, z: f64, derivative: &mut [f32; 3]) -> f32 { + self.base.noise_with_derivative(x, y, z, derivative) + } + pub fn add_to_volume( + &self, + buffer: &mut [f32], + volume: DensityVolume, + xz_scale: f64, + y_scale: f64, + amplitude: f32, + ) -> Result<(), DensityError> { + self.base.add_volume( + buffer, + volume, + xz_scale, + y_scale, + amplitude, + Some(self.fudge_y_scale), + ) + } +} + +fn compute_fudge_y(input_y: f64, relative_y: f64, scale: f64) -> f64 { + let limited_y = if input_y >= 0.0 && input_y < relative_y { + input_y + } else { + relative_y + }; + f64::from(floor_i32(limited_y / scale + f64::from(1e-7_f32))) * scale +} diff --git a/crates/horizon-core/src/noise/simplex.rs b/crates/horizon-core/src/noise/simplex.rs new file mode 100644 index 000000000..8dcb56f85 --- /dev/null +++ b/crates/horizon-core/src/noise/simplex.rs @@ -0,0 +1,121 @@ +use super::{GRADIENTS, GradientTable}; +use crate::{geometry::floor_i32, random::RandomSource}; + +#[derive(Clone, Debug)] +pub struct SimplexNoise { + table: GradientTable, +} + +impl SimplexNoise { + pub fn new(random: &mut impl RandomSource) -> Self { + Self::with_skipped_offsets(random, false) + } + pub fn with_skipped_offsets(random: &mut impl RandomSource, skip_offsets: bool) -> Self { + Self { + table: GradientTable::new(random, if skip_offsets { 0.0 } else { 256.0 }), + } + } + pub fn table(&self) -> &GradientTable { + &self.table + } + pub fn range(&self) -> [f32; 2] { + [-2.0, 2.0] + } + + fn corner(gradient: usize, point: [f64; 3], radius: f64) -> f64 { + let attenuation = radius - point[0] * point[0] - point[1] * point[1] - point[2] * point[2]; + // Negative attenuation contributes zero; NaN follows the arithmetic path. + if attenuation < 0.0 { + 0.0 + } else { + let squared = attenuation * attenuation; + let g = GRADIENTS[gradient]; + squared + * squared + * (f64::from(g[0]) * point[0] + + f64::from(g[1]) * point[1] + + f64::from(g[2]) * point[2]) + } + } + + pub fn get2(&self, x: f64, y: f64) -> f32 { + let x = x + self.table.offsets[0]; + let y = y + self.table.offsets[1]; + let root3 = 3.0_f64.sqrt(); + let skew = 0.5 * (root3 - 1.0); + let unskew = (3.0 - root3) / 6.0; + let shift = (x + y) * skew; + let i = floor_i32(x + shift); + let j = floor_i32(y + shift); + let shift = f64::from(i.wrapping_add(j)) * unskew; + let dx = x - (f64::from(i) - shift); + let dy = y - (f64::from(j) - shift); + let (a, b) = if dx > dy { (1, 0) } else { (0, 1) }; + let i = i & 255; + let j = j & 255; + let grad = |a, b| (self.table.permute(i + a + self.table.permute(j + b)) % 12) as usize; + let first = Self::corner(grad(0, 0), [dx, dy, 0.0], 0.5); + let second = Self::corner( + grad(a, b), + [dx - f64::from(a) + unskew, dy - f64::from(b) + unskew, 0.0], + 0.5, + ); + let third = Self::corner( + grad(1, 1), + [dx - 1.0 + 2.0 * unskew, dy - 1.0 + 2.0 * unskew, 0.0], + 0.5, + ); + (70.0 * (first + second + third)) as f32 + } + + pub fn get3(&self, x: f64, y: f64, z: f64) -> f32 { + let shifted = [ + x + self.table.offsets[0], + y + self.table.offsets[1], + z + self.table.offsets[2], + ]; + let skew = (shifted[0] + shifted[1] + shifted[2]) * (1.0 / 3.0); + let cell = shifted.map(|v| floor_i32(v + skew)); + let unskew = f64::from(cell[0].wrapping_add(cell[1]).wrapping_add(cell[2])) * (1.0 / 6.0); + let point: [f64; 3] = std::array::from_fn(|i| shifted[i] - (f64::from(cell[i]) - unskew)); + let [x, y, z] = point; + let (a, b) = if x >= y { + if y >= z { + ([1, 0, 0], [1, 1, 0]) + } else if x >= z { + ([1, 0, 0], [1, 0, 1]) + } else { + ([0, 0, 1], [1, 0, 1]) + } + } else if y < z { + ([0, 0, 1], [0, 1, 1]) + } else if x < z { + ([0, 1, 0], [0, 1, 1]) + } else { + ([0, 1, 0], [1, 1, 0]) + }; + let cell = cell.map(|v| v & 255); + let grad = |delta: [i32; 3]| { + (self.table.permute( + cell[0] + + delta[0] + + self + .table + .permute(cell[1] + delta[1] + self.table.permute(cell[2] + delta[2])), + ) % 12) as usize + }; + let first = Self::corner(grad([0; 3]), point, 0.6); + let second = Self::corner( + grad(a), + std::array::from_fn(|i| point[i] - f64::from(a[i]) + (1.0 / 6.0)), + 0.6, + ); + let third = Self::corner( + grad(b), + std::array::from_fn(|i| point[i] - f64::from(b[i]) + (1.0 / 3.0)), + 0.6, + ); + let fourth = Self::corner(grad([1; 3]), point.map(|v| v - 1.0 + 0.5), 0.6); + (32.0 * (first + second + third + fourth)) as f32 + } +} diff --git a/crates/horizon-core/src/noise/stack.rs b/crates/horizon-core/src/noise/stack.rs new file mode 100644 index 000000000..9cfe093d5 --- /dev/null +++ b/crates/horizon-core/src/noise/stack.rs @@ -0,0 +1,233 @@ +use super::{DensityError, DensityVolume, NanRange, PerlinNoise, SimplexNoise, SmearedPerlinNoise}; +use std::sync::Arc; + +/// Immutable noise sampling. Implementations may override the default scalar +/// volume traversal when vanilla has a distinct bulk arithmetic path. +pub trait Noise: std::fmt::Debug + Send + Sync { + fn range(&self) -> Result<[f32; 2], NanRange>; + fn get2(&self, x: f64, z: f64) -> f32; + fn get3(&self, x: f64, y: f64, z: f64) -> f32; + fn add_to_volume( + &self, + buffer: &mut [f32], + volume: DensityVolume, + xz_scale: f64, + y_scale: f64, + amplitude: f32, + ) -> Result<(), DensityError> { + if buffer.len() < volume.size() { + return Err(DensityError::BufferTooShort); + } + let [sx, sy, sz] = volume.sizes(); + let mut index = 0; + for z in 0..sz { + let z = f64::from(volume.coordinate(2, z)) * xz_scale; + for x in 0..sx { + let x = f64::from(volume.coordinate(0, x)) * xz_scale; + for y in 0..sy { + let y = f64::from(volume.coordinate(1, y)) * y_scale; + buffer[index] += amplitude * self.get3(x, y, z); + index += 1; + } + } + } + Ok(()) + } +} + +impl Noise for PerlinNoise { + fn range(&self) -> Result<[f32; 2], NanRange> { + Ok(PerlinNoise::range(self)) + } + fn get2(&self, x: f64, z: f64) -> f32 { + PerlinNoise::get2(self, x, z) + } + fn get3(&self, x: f64, y: f64, z: f64) -> f32 { + PerlinNoise::get3(self, x, y, z) + } + fn add_to_volume( + &self, + buffer: &mut [f32], + volume: DensityVolume, + xz_scale: f64, + y_scale: f64, + amplitude: f32, + ) -> Result<(), DensityError> { + PerlinNoise::add_to_volume(self, buffer, volume, xz_scale, y_scale, amplitude) + } +} +impl Noise for SmearedPerlinNoise { + fn range(&self) -> Result<[f32; 2], NanRange> { + SmearedPerlinNoise::range(self) + } + fn get2(&self, x: f64, z: f64) -> f32 { + SmearedPerlinNoise::get2(self, x, z) + } + fn get3(&self, x: f64, y: f64, z: f64) -> f32 { + SmearedPerlinNoise::get3(self, x, y, z) + } + fn add_to_volume( + &self, + buffer: &mut [f32], + volume: DensityVolume, + xz_scale: f64, + y_scale: f64, + amplitude: f32, + ) -> Result<(), DensityError> { + SmearedPerlinNoise::add_to_volume(self, buffer, volume, xz_scale, y_scale, amplitude) + } +} +impl Noise for SimplexNoise { + fn range(&self) -> Result<[f32; 2], NanRange> { + Ok(SimplexNoise::range(self)) + } + fn get2(&self, x: f64, z: f64) -> f32 { + SimplexNoise::get2(self, x, z) + } + fn get3(&self, x: f64, y: f64, z: f64) -> f32 { + SimplexNoise::get3(self, x, y, z) + } +} + +#[derive(Clone, Debug)] +pub struct NoiseLayer { + pub noise: Arc<dyn Noise>, + pub frequency: f64, + pub amplitude: f32, +} + +#[derive(Clone, Debug)] +pub struct NoiseStack { + layers: Vec<NoiseLayer>, + range: [f32; 2], +} + +impl NoiseStack { + pub fn builder() -> NoiseStackBuilder { + NoiseStackBuilder::default() + } + pub fn layers(&self) -> &[NoiseLayer] { + &self.layers + } + pub fn get_layer(&self, index: usize) -> Option<&Arc<dyn Noise>> { + self.layers.get(index).map(|layer| &layer.noise) + } +} +impl Noise for NoiseStack { + fn range(&self) -> Result<[f32; 2], NanRange> { + Ok(self.range) + } + fn get2(&self, x: f64, z: f64) -> f32 { + let mut value = 0.0; + for layer in &self.layers { + value += layer.amplitude * layer.noise.get2(x * layer.frequency, z * layer.frequency); + } + value + } + fn get3(&self, x: f64, y: f64, z: f64) -> f32 { + let mut value = 0.0; + for layer in &self.layers { + value += layer.amplitude + * layer.noise.get3( + x * layer.frequency, + y * layer.frequency, + z * layer.frequency, + ); + } + value + } + fn add_to_volume( + &self, + buffer: &mut [f32], + volume: DensityVolume, + xz_scale: f64, + y_scale: f64, + amplitude: f32, + ) -> Result<(), DensityError> { + if buffer.len() < volume.size() { + return Err(DensityError::BufferTooShort); + } + for layer in &self.layers { + layer.noise.add_to_volume( + buffer, + volume, + xz_scale * layer.frequency, + y_scale * layer.frequency, + amplitude * layer.amplitude, + )?; + } + Ok(()) + } +} + +#[derive(Clone, Debug, Default)] +pub struct NoiseStackBuilder { + layers: Vec<NoiseLayer>, +} +impl NoiseStackBuilder { + pub fn add(&mut self, noise: Arc<dyn Noise>, frequency: f64, amplitude: f32) -> &mut Self { + self.layers.push(NoiseLayer { + noise, + frequency, + amplitude, + }); + self + } + /// Flattening rescales each existing layer before subsequent sampling. + pub fn add_stack(&mut self, stack: &NoiseStack, frequency: f64, amplitude: f32) -> &mut Self { + self.layers + .extend(stack.layers.iter().map(|layer| NoiseLayer { + noise: Arc::clone(&layer.noise), + frequency: layer.frequency * frequency, + amplitude: layer.amplitude * amplitude, + })); + self + } + pub fn build(&self) -> Result<NoiseStack, NanRange> { + let mut range = [0.0; 2]; + for layer in &self.layers { + let bounds = layer.noise.range()?; + if layer.amplitude.is_nan() { + return Err(NanRange); + } + let scaled = if bounds[0].is_nan() || bounds[1].is_nan() { + [f32::NAN; 2] + } else { + // Interval.mulBound defines zero times infinity as positive zero. + let product = |v: f32| { + if v == 0.0 || layer.amplitude == 0.0 { + 0.0 + } else { + v * layer.amplitude + } + }; + let a = product(bounds[0]); + let b = product(bounds[1]); + if a < b { + [a, b] + } else if a > b { + [b, a] + } else if a == 0.0 { + [ + f32::from_bits(a.to_bits() | b.to_bits()), + f32::from_bits(a.to_bits() & b.to_bits()), + ] + } else { + [a, b] + } + }; + range = [range[0] + scaled[0], range[1] + scaled[1]]; + if range[0].is_nan() || range[1].is_nan() { + range = [f32::NAN; 2]; + } + // Interval.of interns [0,1], including a supplied negative zero. + if range[0] == 0.0 && range[1] == 1.0 { + range[0] = 0.0; + } + } + Ok(NoiseStack { + layers: self.layers.clone(), + range, + }) + } +} diff --git a/crates/horizon-core/src/noise/volume.rs b/crates/horizon-core/src/noise/volume.rs new file mode 100644 index 000000000..d0362ee1b --- /dev/null +++ b/crates/horizon-core/src/noise/volume.rs @@ -0,0 +1,94 @@ +use crate::geometry::Axis; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DensityError { + NonpositiveDimensions, + NonpositiveSteps, + VolumeTooLarge, + BufferTooShort, +} +impl std::fmt::Display for DensityError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str(match self { + Self::NonpositiveDimensions => "density dimensions must be positive", + Self::NonpositiveSteps => "density coordinate steps must be positive", + Self::VolumeTooLarge => "density volume exceeds the Java array index domain", + Self::BufferTooShort => "density buffer is smaller than its volume", + }) + } +} +impl std::error::Error for DensityError {} + +/// A bounded strided density volume. The flat layout is Z, X, Y (Y innermost). +/// Block coordinate multiplication and addition retain Java's i32 wrapping. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct DensityVolume { + sizes: [usize; 3], + minimum: [i32; 3], + steps: [i32; 3], + size: usize, +} +impl DensityVolume { + pub fn new(sizes: [i32; 3], minimum: [i32; 3], steps: [i32; 3]) -> Result<Self, DensityError> { + if sizes.iter().any(|v| *v <= 0) { + return Err(DensityError::NonpositiveDimensions); + } + if steps.iter().any(|v| *v <= 0) { + return Err(DensityError::NonpositiveSteps); + } + let sizes = sizes.map(|v| v as usize); + let size = sizes + .into_iter() + .try_fold(1_usize, |n, v| n.checked_mul(v)) + .filter(|n| *n <= i32::MAX as usize) + .ok_or(DensityError::VolumeTooLarge)?; + Ok(Self { + sizes, + minimum, + steps, + size, + }) + } + pub fn sizes(self) -> [usize; 3] { + self.sizes + } + pub fn minimum(self) -> [i32; 3] { + self.minimum + } + pub fn steps(self) -> [i32; 3] { + self.steps + } + pub fn size(self) -> usize { + self.size + } + pub fn maximum(self) -> [i32; 3] { + std::array::from_fn(|axis| self.coordinate(axis, self.sizes[axis]).wrapping_sub(1)) + } + pub fn index(self, position: [usize; 3]) -> Option<usize> { + if (0..3).any(|i| position[i] >= self.sizes[i]) { + return None; + } + Some(position[1] + (position[0] + position[2] * self.sizes[0]) * self.sizes[1]) + } + pub fn block(self, axis: Axis, index: usize) -> Option<i32> { + let axis = axis as usize; + (index < self.sizes[axis]).then(|| self.coordinate(axis, index)) + } + /// Find an exact lattice sample, retaining Java's wrapped subtraction and + /// extent multiplication. Coordinates between samples are cache misses. + pub fn index_of_block(self, position: [i32; 3]) -> Option<usize> { + let relative: [i32; 3] = std::array::from_fn(|i| position[i].wrapping_sub(self.minimum[i])); + for (axis, value) in relative.iter().enumerate() { + let extent = (self.sizes[axis] as i32).wrapping_mul(self.steps[axis]); + if *value < 0 || *value >= extent || *value % self.steps[axis] != 0 { + return None; + } + } + self.index(std::array::from_fn(|i| { + (relative[i] / self.steps[i]) as usize + })) + } + pub(super) fn coordinate(self, axis: usize, index: usize) -> i32 { + self.minimum[axis].wrapping_add((index as i32).wrapping_mul(self.steps[axis])) + } +} diff --git a/crates/horizon-core/src/position.rs b/crates/horizon-core/src/position.rs new file mode 100644 index 000000000..2c657ca41 --- /dev/null +++ b/crates/horizon-core/src/position.rs @@ -0,0 +1,184 @@ +//! Integer coordinates and vanilla's packed position formats. +mod iter; +pub use iter::{BlockBoxIter, BlockIterationTooLarge}; + +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)] +pub struct BlockPos { + pub x: i32, + pub y: i32, + pub z: i32, +} + +impl BlockPos { + pub const fn new(x: i32, y: i32, z: i32) -> Self { + Self { x, y, z } + } + + /// Values outside the signed 26/12/26-bit ranges are truncated as in vanilla. + pub const fn pack(self) -> i64 { + (((self.x as u64 & 0x3ff_ffff) << 38) + | ((self.z as u64 & 0x3ff_ffff) << 12) + | (self.y as u64 & 0xfff)) as i64 + } + + pub const fn unpack(value: i64) -> Self { + Self::new( + (value >> 38) as i32, + (value << 52 >> 52) as i32, + (value << 26 >> 38) as i32, + ) + } + + pub const fn offset(self, dx: i32, dy: i32, dz: i32) -> Self { + Self::new( + self.x.wrapping_add(dx), + self.y.wrapping_add(dy), + self.z.wrapping_add(dz), + ) + } + + pub const fn section(self) -> SectionPos { + // Arithmetic shift floors negative coordinates; integer / 16 does not. + SectionPos::new(self.x >> 4, self.y >> 4, self.z >> 4) + } + + pub const fn chunk(self) -> ChunkPos { + ChunkPos::new(self.x >> 4, self.z >> 4) + } + + /// Section update packet coordinate: X in bits 8..11, Z in 4..7, Y in 0..3. + pub const fn section_relative(self) -> u16 { + (((self.x & 15) << 8) | ((self.z & 15) << 4) | (self.y & 15)) as u16 + } + + /// Block-state container index. This is a different layout from packets. + pub const fn section_index(self) -> usize { + (((self.y & 15) << 8) | ((self.z & 15) << 4) | (self.x & 15)) as usize + } +} + +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)] +pub struct SectionPos { + pub x: i32, + pub y: i32, + pub z: i32, +} + +impl SectionPos { + pub const fn new(x: i32, y: i32, z: i32) -> Self { + Self { x, y, z } + } + + pub const fn pack(self) -> i64 { + (((self.x as u64 & 0x3f_ffff) << 42) + | ((self.z as u64 & 0x3f_ffff) << 20) + | (self.y as u64 & 0xf_ffff)) as i64 + } + + pub const fn unpack(value: i64) -> Self { + Self::new( + (value >> 42) as i32, + (value << 44 >> 44) as i32, + (value << 22 >> 42) as i32, + ) + } + + pub const fn relative_to_block(self, relative: u16) -> BlockPos { + BlockPos::new( + self.x + .wrapping_shl(4) + .wrapping_add(((relative >> 8) & 15) as i32), + self.y.wrapping_shl(4).wrapping_add((relative & 15) as i32), + self.z + .wrapping_shl(4) + .wrapping_add(((relative >> 4) & 15) as i32), + ) + } +} + +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)] +pub struct ChunkPos { + pub x: i32, + pub z: i32, +} + +impl ChunkPos { + pub const fn new(x: i32, z: i32) -> Self { + Self { x, z } + } + + pub const fn pack(self) -> i64 { + ((self.x as u32 as u64) | ((self.z as u32 as u64) << 32)) as i64 + } + + pub const fn unpack(value: i64) -> Self { + Self::new(value as i32, (value >> 32) as i32) + } + + pub const fn region(self) -> Self { + Self::new(self.x >> 5, self.z >> 5) + } + + pub const fn region_local(self) -> (u8, u8) { + ((self.x & 31) as u8, (self.z & 31) as u8) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn negative_boundaries_use_floor_division() { + for (block, section, local) in [ + (-17, -2, 15), + (-16, -1, 0), + (-1, -1, 15), + (0, 0, 0), + (16, 1, 0), + ] { + let p = BlockPos::new(block, block, block); + assert_eq!(p.section(), SectionPos::new(section, section, section)); + assert_eq!(p.section_relative(), local * 0x111); + assert_eq!(p.section().relative_to_block(p.section_relative()), p); + } + assert_eq!(ChunkPos::new(-1, -33).region(), ChunkPos::new(-1, -2)); + assert_eq!(ChunkPos::new(-1, -33).region_local(), (31, 31)); + } + + #[test] + fn coordinate_formats_are_distinct_and_bijective_in_range() { + let mut packet_indices = [false; 4096]; + let mut storage_indices = [false; 4096]; + for y in 0..16 { + for z in 0..16 { + for x in 0..16 { + let p = BlockPos::new(x, y, z); + packet_indices[p.section_relative() as usize] = true; + storage_indices[p.section_index()] = true; + assert_eq!( + SectionPos::default().relative_to_block(p.section_relative()), + p + ); + } + } + } + assert!(packet_indices.into_iter().all(|x| x)); + assert!(storage_indices.into_iter().all(|x| x)); + assert_ne!( + BlockPos::new(1, 2, 3).section_relative() as usize, + BlockPos::new(1, 2, 3).section_index() + ); + } + + #[test] + fn packed_signed_limits_and_java_overflow() { + let block = BlockPos::new(-33_554_432, -2048, 33_554_431); + assert_eq!(BlockPos::unpack(block.pack()), block); + let section = SectionPos::new(-2_097_152, -524_288, 2_097_151); + assert_eq!(SectionPos::unpack(section.pack()), section); + let chunk = ChunkPos::new(i32::MIN, i32::MAX); + assert_eq!(ChunkPos::unpack(chunk.pack()), chunk); + assert_eq!(BlockPos::new(i32::MAX, 0, 0).offset(1, 0, 0).x, i32::MIN); + } +} diff --git a/crates/horizon-core/src/position/iter.rs b/crates/horizon-core/src/position/iter.rs new file mode 100644 index 000000000..980df68c6 --- /dev/null +++ b/crates/horizon-core/src/position/iter.rs @@ -0,0 +1,159 @@ +//! Inclusive block boxes in vanilla's fixed and movement-dependent visit orders. +use super::BlockPos; +use crate::geometry::{Aabb, Axis, Vec3, floor_i32}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct BlockIterationTooLarge; +impl std::fmt::Display for BlockIterationTooLarge { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str("block box exceeds the positive Java-int iteration domain") + } +} +impl std::error::Error for BlockIterationTooLarge {} + +/// Value iterator; each position is independent of later cursor updates. +/// +/// Bounds are inclusive, including an AABB's floored maximum face. Boxes whose +/// true volume exceeds i32::MAX are rejected instead of reproducing Java's +/// overflowed counts. A caller can lazily limit a supported box with `take`. +#[derive(Clone, Debug)] +pub struct BlockBoxIter { + start: [i32; 3], + steps: [i32; 3], + sizes: [usize; 3], + // Innermost axis first. + axes: [Axis; 3], + index: usize, + count: usize, +} +impl BlockBoxIter { + fn new( + a: BlockPos, + b: BlockPos, + direction: Option<Vec3>, + ) -> Result<Self, BlockIterationTooLarge> { + let a = [a.x, a.y, a.z]; + let b = [b.x, b.y, b.z]; + let min = std::array::from_fn::<_, 3, _>(|i| a[i].min(b[i])); + let max = std::array::from_fn::<_, 3, _>(|i| a[i].max(b[i])); + let sizes = std::array::from_fn::<_, 3, _>(|i| (max[i] as i64 - min[i] as i64 + 1) as u64); + let count = sizes + .into_iter() + .try_fold(1u64, |total, size| { + total.checked_mul(size).filter(|v| *v <= i32::MAX as u64) + }) + .ok_or(BlockIterationTooLarge)?; + let mut start = min; + let mut steps = [1; 3]; + let axes = if let Some(direction) = direction { + for axis in Axis::ALL { + let i = axis as usize; + // NaN takes the negative direction in Java's dcmpl branch. + let forward = direction.component(axis) >= 0.0; + if !forward { + start[i] = max[i]; + steps[i] = -1; + } + } + let [first, second, third] = Axis::step_order(direction); + [third, second, first] + } else { + [Axis::X, Axis::Y, Axis::Z] + }; + Ok(Self { + start, + steps, + sizes: sizes.map(|v| v as usize), + axes, + index: 0, + count: count as usize, + }) + } +} +impl Iterator for BlockBoxIter { + type Item = BlockPos; + fn next(&mut self) -> Option<Self::Item> { + if self.index == self.count { + return None; + } + let mut index = self.index; + let mut point = self.start; + for axis in self.axes { + let i = axis as usize; + let offset = index % self.sizes[i]; + index /= self.sizes[i]; + point[i] = point[i].wrapping_add(self.steps[i].wrapping_mul(offset as i32)); + } + self.index += 1; + Some(BlockPos::new(point[0], point[1], point[2])) + } + fn size_hint(&self) -> (usize, Option<usize>) { + let remaining = self.count - self.index; + (remaining, Some(remaining)) + } +} +impl ExactSizeIterator for BlockBoxIter {} +impl std::iter::FusedIterator for BlockBoxIter {} + +impl BlockPos { + pub fn containing(point: Vec3) -> Self { + Self::new(floor_i32(point.x), floor_i32(point.y), floor_i32(point.z)) + } + pub fn between_closed(a: Self, b: Self) -> Result<BlockBoxIter, BlockIterationTooLarge> { + BlockBoxIter::new(a, b, None) + } + pub fn between_closed_box(b: Aabb) -> Result<BlockBoxIter, BlockIterationTooLarge> { + Self::between_closed( + Self::containing(b.min_position()), + Self::containing(b.max_position()), + ) + } + pub fn between_corners_in_direction( + a: Self, + b: Self, + direction: Vec3, + ) -> Result<BlockBoxIter, BlockIterationTooLarge> { + BlockBoxIter::new(a, b, Some(direction)) + } + pub fn between_box_corners_in_direction( + b: Aabb, + direction: Vec3, + ) -> Result<BlockBoxIter, BlockIterationTooLarge> { + Self::between_corners_in_direction( + Self::containing(b.min_position()), + Self::containing(b.max_position()), + direction, + ) + } +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn ordering_inclusive_faces_and_value_independence() { + let a = BlockPos::new(-1, 0, 0); + let b = BlockPos::new(0, 1, 0); + assert_eq!( + BlockPos::between_closed(b, a).unwrap().collect::<Vec<_>>(), + vec![a, BlockPos::new(0, 0, 0), BlockPos::new(-1, 1, 0), b] + ); + assert_eq!( + BlockPos::between_corners_in_direction(a, b, Vec3::new(-1.0, 0.0, 0.0)) + .unwrap() + .collect::<Vec<_>>(), + vec![BlockPos::new(0, 0, 0), a, b, BlockPos::new(-1, 1, 0)] + ); + assert_eq!( + BlockPos::between_closed_box(Aabb::unit_cube(Vec3::ZERO)) + .unwrap() + .len(), + 8 + ); + assert_eq!( + BlockPos::between_closed(BlockPos::new(i32::MIN, 0, 0), BlockPos::new(i32::MAX, 0, 0)) + .unwrap_err(), + BlockIterationTooLarge + ); + } +} diff --git a/crates/horizon-core/src/random.rs b/crates/horizon-core/src/random.rs new file mode 100644 index 000000000..46397b5c4 --- /dev/null +++ b/crates/horizon-core/src/random.rs @@ -0,0 +1,304 @@ +//! Vanilla's two seeded random streams. No platform/default Rust RNG is used. +mod hash; +mod positional; +mod worldgen; +pub use hash::{seed_from_hash, seed_from_hash_utf16}; +pub use positional::{ + LegacyPositionalRandom, PositionalRandom, XoroshiroPositionalRandom, java_string_hash, + position_seed, +}; +pub use worldgen::{WorldgenPositional, WorldgenRandom, WorldgenSource, slime_chunk_random}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct InvalidBound; + +impl std::fmt::Display for InvalidBound { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str("bound must be positive") + } +} + +impl std::error::Error for InvalidBound {} + +pub trait RandomSource: Sized { + type Positional: PositionalRandom<Source = Self>; + fn set_seed(&mut self, seed: i64); + fn next_int(&mut self) -> i32; + fn next_int_bound(&mut self, bound: i32) -> Result<i32, InvalidBound>; + fn next_long(&mut self) -> i64; + fn next_boolean(&mut self) -> bool; + fn next_float(&mut self) -> f32; + fn next_double(&mut self) -> f64; + /// MarsagliaPolarGaussian over this source; the cached second value is + /// part of the source state (reset by `set_seed` where vanilla resets it). + fn next_gaussian(&mut self) -> f64; + fn fork_positional(&mut self) -> Self::Positional; + fn fork(&mut self) -> Self + where + Self: Sized; + + fn consume_count(&mut self, count: i32) { + for _ in 0..count { + self.next_int(); + } + } + fn next_int_between_inclusive(&mut self, min: i32, max: i32) -> Result<i32, InvalidBound> { + self.next_int_bound(max.wrapping_sub(min).wrapping_add(1)) + .map(|v| v.wrapping_add(min)) + } + fn next_int_between(&mut self, origin: i32, bound: i32) -> Result<i32, InvalidBound> { + if origin >= bound { + return Err(InvalidBound); + } + self.next_int_bound(bound.wrapping_sub(origin)) + .map(|v| v.wrapping_add(origin)) + } + fn triangle(&mut self, mean: f64, deviation: f64) -> f64 { + mean + deviation * (self.next_double() - self.next_double()) + } + fn triangle_float(&mut self, mean: f32, deviation: f32) -> f32 { + mean + deviation * (self.next_float() - self.next_float()) + } +} + +#[derive(Clone, Debug)] +pub struct LegacyRandom { + state: u64, + gaussian: Option<f64>, +} + +impl LegacyRandom { + const MULTIPLIER: u64 = 0x5_deec_e66d; + const MASK: u64 = (1 << 48) - 1; + + pub fn new(seed: i64) -> Self { + Self { + state: (seed as u64 ^ Self::MULTIPLIER) & Self::MASK, + gaussian: None, + } + } + + fn bits(&mut self, count: u32) -> i32 { + self.state = self.state.wrapping_mul(Self::MULTIPLIER).wrapping_add(11) & Self::MASK; + (self.state >> (48 - count)) as i32 + } +} + +impl RandomSource for LegacyRandom { + type Positional = LegacyPositionalRandom; + fn fork_positional(&mut self) -> Self::Positional { + LegacyPositionalRandom::new(self.next_long()) + } + fn set_seed(&mut self, seed: i64) { + *self = Self::new(seed); + } + + fn next_int(&mut self) -> i32 { + self.bits(32) + } + + fn next_int_bound(&mut self, bound: i32) -> Result<i32, InvalidBound> { + if bound <= 0 { + return Err(InvalidBound); + } + if bound & (bound - 1) == 0 { + return Ok(((i64::from(bound) * i64::from(self.bits(31))) >> 31) as i32); + } + loop { + let bits = self.bits(31); + let value = bits % bound; + // Java's signed overflow is part of the rejection rule. + if bits.wrapping_sub(value).wrapping_add(bound - 1) >= 0 { + return Ok(value); + } + } + } + + fn next_long(&mut self) -> i64 { + let high = i64::from(self.bits(32)) << 32; + // Java sign-extends the low int before addition; concatenation differs. + high.wrapping_add(i64::from(self.bits(32))) + } + + fn next_boolean(&mut self) -> bool { + self.bits(1) != 0 + } + fn next_float(&mut self) -> f32 { + self.bits(24) as f32 * (1.0 / 16_777_216.0) + } + fn next_double(&mut self) -> f64 { + let value = (i64::from(self.bits(26)) << 27) + i64::from(self.bits(27)); + value as f64 * (1.0 / 9_007_199_254_740_992.0) + } + fn next_gaussian(&mut self) -> f64 { + let mut cache = self.gaussian.take(); + let value = marsaglia_polar(&mut cache, || self.next_double()); + self.gaussian = cache; + value + } + + fn fork(&mut self) -> Self { + Self::new(self.next_long()) + } +} + +#[derive(Clone, Debug)] +pub struct XoroshiroRandom { + lo: u64, + hi: u64, + gaussian: Option<f64>, +} + +impl XoroshiroRandom { + const GOLDEN_RATIO: u64 = 0x9e37_79b9_7f4a_7c15; + const SILVER_RATIO: u64 = 0x6a09_e667_f3bc_c909; + + pub fn new(seed: i64) -> Self { + let lo = seed as u64 ^ Self::SILVER_RATIO; + Self::from_state( + mix_stafford13(lo), + mix_stafford13(lo.wrapping_add(Self::GOLDEN_RATIO)), + ) + } + + pub fn from_state(lo: u64, hi: u64) -> Self { + if lo | hi == 0 { + Self { + lo: Self::GOLDEN_RATIO, + hi: Self::SILVER_RATIO, + gaussian: None, + } + } else { + Self { + lo, + hi, + gaussian: None, + } + } + } +} + +impl RandomSource for XoroshiroRandom { + type Positional = XoroshiroPositionalRandom; + fn fork_positional(&mut self) -> Self::Positional { + let lo = self.next_long() as u64; + let hi = self.next_long() as u64; + XoroshiroPositionalRandom::new(lo, hi) + } + fn set_seed(&mut self, seed: i64) { + *self = Self::new(seed); + } + fn next_int(&mut self) -> i32 { + self.next_long() as i32 + } + + fn next_int_bound(&mut self, bound: i32) -> Result<i32, InvalidBound> { + if bound <= 0 { + return Err(InvalidBound); + } + let bound = bound as u32; + let threshold = bound.wrapping_neg() % bound; + loop { + let product = u64::from(self.next_int() as u32) * u64::from(bound); + if product as u32 >= threshold { + return Ok((product >> 32) as i32); + } + } + } + + fn next_long(&mut self) -> i64 { + let lo = self.lo; + let hi = self.hi ^ lo; + let result = lo.wrapping_add(self.hi).rotate_left(17).wrapping_add(lo); + self.lo = lo.rotate_left(49) ^ hi ^ (hi << 21); + self.hi = hi.rotate_left(28); + result as i64 + } + + fn next_boolean(&mut self) -> bool { + self.next_long() & 1 != 0 + } + fn next_float(&mut self) -> f32 { + ((self.next_long() as u64) >> 40) as f32 * (1.0 / 16_777_216.0) + } + fn next_double(&mut self) -> f64 { + ((self.next_long() as u64) >> 11) as f64 * (1.0 / 9_007_199_254_740_992.0) + } + fn next_gaussian(&mut self) -> f64 { + let mut cache = self.gaussian.take(); + let value = marsaglia_polar(&mut cache, || self.next_double()); + self.gaussian = cache; + value + } + fn fork(&mut self) -> Self { + let lo = self.next_long() as u64; + let hi = self.next_long() as u64; + Self::from_state(lo, hi) + } +} + +/// MarsagliaPolarGaussian.nextGaussian with an external second-value cache. +pub fn marsaglia_polar(cache: &mut Option<f64>, mut next_double: impl FnMut() -> f64) -> f64 { + if let Some(value) = cache.take() { + return value; + } + loop { + let x = 2.0 * next_double() - 1.0; + let y = 2.0 * next_double() - 1.0; + let radius = x * x + y * y; + if radius >= 1.0 || radius == 0.0 { + continue; + } + let multiplier = (-2.0 * radius.ln() / radius).sqrt(); + *cache = Some(y * multiplier); + return x * multiplier; + } +} + +pub const fn mix_stafford13(mut value: u64) -> u64 { + value = (value ^ (value >> 30)).wrapping_mul(0xbf58_476d_1ce4_e5b9); + value = (value ^ (value >> 27)).wrapping_mul(0x94d0_49bb_1331_11eb); + value ^ (value >> 31) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn legacy_jdk_sequence_and_sign_extended_low_word() { + let mut rng = LegacyRandom::new(0); + assert_eq!(rng.next_int(), -1_155_484_576); + assert_eq!(rng.next_int(), -723_955_400); + assert_eq!(LegacyRandom::new(0).next_long(), -4_962_768_465_676_381_896); + } + + fn invalid_bounds_do_not_consume_state<R: RandomSource + Clone>(mut rng: R) { + let mut reference = rng.clone(); + for bound in [0, -1, i32::MIN] { + assert_eq!(rng.next_int_bound(bound), Err(InvalidBound)); + } + rng.consume_count(-1); + assert_eq!(rng.next_long(), reference.next_long()); + } + + #[test] + fn invalid_inputs_preserve_both_streams() { + invalid_bounds_do_not_consume_state(LegacyRandom::new(0)); + invalid_bounds_do_not_consume_state(XoroshiroRandom::new(0)); + } + + #[test] + fn zero_state_fallback_and_reseed() { + let mut a = XoroshiroRandom::from_state(0, 0); + let mut b = XoroshiroRandom::from_state( + XoroshiroRandom::GOLDEN_RATIO, + XoroshiroRandom::SILVER_RATIO, + ); + for _ in 0..100 { + assert_eq!(a.next_long(), b.next_long()); + } + a.set_seed(-1); + assert_eq!(a.next_long(), XoroshiroRandom::new(-1).next_long()); + } +} diff --git a/crates/horizon-core/src/random/hash.rs b/crates/horizon-core/src/random/hash.rs new file mode 100644 index 000000000..15cd50174 --- /dev/null +++ b/crates/horizon-core/src/random/hash.rs @@ -0,0 +1,157 @@ +//! Original MD5 implementation for vanilla's deterministic name-derived seeds. +//! Integer algorithm and vectors: https://www.rfc-editor.org/rfc/rfc1321 +//! This is an internal seed transform, not an authentication API. +const K: [u32; 64] = [ + 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, + 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, 0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, + 0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, 0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8, + 0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, 0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a, + 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c, 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, + 0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x04881d05, 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665, + 0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, 0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1, + 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391, +]; +const SHIFT: [[u32; 4]; 4] = [ + [7, 12, 17, 22], + [5, 9, 14, 20], + [4, 11, 16, 23], + [6, 10, 15, 21], +]; +struct Md5 { + state: [u32; 4], + buffer: [u8; 64], + used: usize, + bytes: u64, +} +impl Md5 { + fn new() -> Self { + Self { + state: [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476], + buffer: [0; 64], + used: 0, + bytes: 0, + } + } + fn block(&mut self, block: &[u8; 64]) { + let words = std::array::from_fn::<_, 16, _>(|i| { + u32::from_le_bytes(block[i * 4..i * 4 + 4].try_into().unwrap()) + }); + let [mut a, mut b, mut c, mut d] = self.state; + for (i, constant) in K.iter().enumerate() { + let (mix, index) = match i / 16 { + 0 => ((b & c) | (!b & d), i), + 1 => ((d & b) | (!d & c), (5 * i + 1) % 16), + 2 => (b ^ c ^ d, (3 * i + 5) % 16), + _ => (c ^ (b | !d), (7 * i) % 16), + }; + let next = b.wrapping_add( + a.wrapping_add(mix) + .wrapping_add(*constant) + .wrapping_add(words[index]) + .rotate_left(SHIFT[i / 16][i % 4]), + ); + a = d; + d = c; + c = b; + b = next; + } + for (old, value) in self.state.iter_mut().zip([a, b, c, d]) { + *old = old.wrapping_add(value); + } + } + fn update(&mut self, mut input: &[u8]) { + self.bytes = self.bytes.wrapping_add(input.len() as u64); + if self.used != 0 { + let count = (64 - self.used).min(input.len()); + self.buffer[self.used..self.used + count].copy_from_slice(&input[..count]); + self.used += count; + input = &input[count..]; + if self.used != 64 { + return; + } + let block = self.buffer; + self.block(&block); + self.used = 0; + } + while input.len() >= 64 { + self.block(input[..64].try_into().unwrap()); + input = &input[64..]; + } + self.buffer[..input.len()].copy_from_slice(input); + self.used = input.len(); + } + fn finish(mut self) -> [u8; 16] { + let length = self.bytes.wrapping_mul(8).to_le_bytes(); + let count = if self.used < 56 { + 56 - self.used + } else { + 120 - self.used + }; + let mut padding = [0; 64]; + padding[0] = 0x80; + self.update(&padding[..count]); + self.update(&length); + std::array::from_fn(|i| self.state[i / 4].to_le_bytes()[i % 4]) + } +} +fn seed(digest: [u8; 16]) -> [u64; 2] { + [ + u64::from_be_bytes(digest[..8].try_into().unwrap()), + u64::from_be_bytes(digest[8..].try_into().unwrap()), + ] +} +pub fn seed_from_hash(name: &str) -> [u64; 2] { + let mut digest = Md5::new(); + digest.update(name.as_bytes()); + seed(digest.finish()) +} +pub fn seed_from_hash_utf16(name: &[u16]) -> [u64; 2] { + let mut digest = Md5::new(); + for point in char::decode_utf16(name.iter().copied()) { + let mut bytes = [0; 4]; + // Java UTF-8 encoding replaces each malformed surrogate with '?'. + digest.update(point.unwrap_or('?').encode_utf8(&mut bytes).as_bytes()); + } + seed(digest.finish()) +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn rfc_vectors_and_streaming_padding_boundaries() { + for (input, expected) in [ + ("", "d41d8cd98f00b204e9800998ecf8427e"), + ("a", "0cc175b9c0f1b6a831c399e269772661"), + ("abc", "900150983cd24fb0d6963f7d28e17f72"), + ("message digest", "f96b697d7cb7938d525a2f31aaf161d0"), + ( + "abcdefghijklmnopqrstuvwxyz", + "c3fcd3d76192e4007dfb496cca67e13b", + ), + ( + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", + "d174ab98d277d9f5a5611c2c9f419d9f", + ), + ( + "12345678901234567890123456789012345678901234567890123456789012345678901234567890", + "57edf4a22be3c955ac49da2e2107b67a", + ), + ] { + let mut digest = Md5::new(); + for chunk in input.as_bytes().chunks(3) { + digest.update(chunk); + } + let actual: String = digest.finish().iter().map(|v| format!("{v:02x}")).collect(); + assert_eq!(actual, expected); + } + assert_eq!( + seed_from_hash_utf16(&[0xd800, 0x61, 0xdc00]), + seed_from_hash("?a?") + ); + assert_eq!( + seed_from_hash_utf16(&[0xd83d, 0xde00]), + seed_from_hash("😀") + ); + } +} diff --git a/crates/horizon-core/src/random/positional.rs b/crates/horizon-core/src/random/positional.rs new file mode 100644 index 000000000..e7d629185 --- /dev/null +++ b/crates/horizon-core/src/random/positional.rs @@ -0,0 +1,79 @@ +use super::{LegacyRandom, RandomSource, XoroshiroRandom, seed_from_hash, seed_from_hash_utf16}; +use crate::position::BlockPos; + +#[allow(clippy::wrong_self_convention)] // These are seeded factories, matching Java's fromSeed/fromHashOf. +pub trait PositionalRandom { + type Source: RandomSource; + fn at(&self, position: BlockPos) -> Self::Source; + fn from_seed(&self, seed: i64) -> Self::Source; + fn from_hash_of(&self, name: &str) -> Self::Source; + fn from_hash_of_utf16(&self, name: &[u16]) -> Self::Source; +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct LegacyPositionalRandom { + seed: i64, +} +impl LegacyPositionalRandom { + pub const fn new(seed: i64) -> Self { + Self { seed } + } +} +impl PositionalRandom for LegacyPositionalRandom { + type Source = LegacyRandom; + fn at(&self, position: BlockPos) -> Self::Source { + LegacyRandom::new(position_seed(position) ^ self.seed) + } + fn from_seed(&self, seed: i64) -> Self::Source { + LegacyRandom::new(seed) + } + fn from_hash_of(&self, name: &str) -> Self::Source { + LegacyRandom::new(java_string_hash(name.encode_utf16()) as i64 ^ self.seed) + } + fn from_hash_of_utf16(&self, name: &[u16]) -> Self::Source { + LegacyRandom::new(java_string_hash(name.iter().copied()) as i64 ^ self.seed) + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct XoroshiroPositionalRandom { + lo: u64, + hi: u64, +} +impl XoroshiroPositionalRandom { + pub const fn new(lo: u64, hi: u64) -> Self { + Self { lo, hi } + } +} +impl PositionalRandom for XoroshiroPositionalRandom { + type Source = XoroshiroRandom; + fn at(&self, position: BlockPos) -> Self::Source { + XoroshiroRandom::from_state(position_seed(position) as u64 ^ self.lo, self.hi) + } + fn from_seed(&self, seed: i64) -> Self::Source { + XoroshiroRandom::from_state(seed as u64 ^ self.lo, seed as u64 ^ self.hi) + } + fn from_hash_of(&self, name: &str) -> Self::Source { + let [lo, hi] = seed_from_hash(name); + XoroshiroRandom::from_state(lo ^ self.lo, hi ^ self.hi) + } + fn from_hash_of_utf16(&self, name: &[u16]) -> Self::Source { + let [lo, hi] = seed_from_hash_utf16(name); + XoroshiroRandom::from_state(lo ^ self.lo, hi ^ self.hi) + } +} +pub fn java_string_hash(name: impl IntoIterator<Item = u16>) -> i32 { + name.into_iter().fold(0i32, |hash, unit| { + hash.wrapping_mul(31).wrapping_add(unit as i32) + }) +} +/// Mth.getSeed's signed Java arithmetic, including the initial int product. +pub const fn position_seed(position: BlockPos) -> i64 { + let mixed = position.x.wrapping_mul(3_129_871) as i64 + ^ (position.z as i64).wrapping_mul(116_129_781) + ^ position.y as i64; + mixed + .wrapping_mul(mixed) + .wrapping_mul(42_317_861) + .wrapping_add(mixed.wrapping_mul(11)) + >> 16 +} diff --git a/crates/horizon-core/src/random/worldgen.rs b/crates/horizon-core/src/random/worldgen.rs new file mode 100644 index 000000000..aa16ab249 --- /dev/null +++ b/crates/horizon-core/src/random/worldgen.rs @@ -0,0 +1,203 @@ +//! Legacy bit-sampling adapter used by vanilla's world-generation random stream. +use super::{InvalidBound, LegacyRandom, PositionalRandom, RandomSource, XoroshiroRandom}; +use crate::position::BlockPos; + +mod sealed { + pub trait Sealed {} +} +pub trait WorldgenSource: RandomSource + sealed::Sealed { + #[doc(hidden)] + fn worldgen_bits(&mut self, count: i32) -> i32; +} +impl sealed::Sealed for LegacyRandom {} +impl WorldgenSource for LegacyRandom { + fn worldgen_bits(&mut self, count: i32) -> i32 { + self.state = self.state.wrapping_mul(Self::MULTIPLIER).wrapping_add(11) & Self::MASK; + self.state.wrapping_shr(48_i32.wrapping_sub(count) as u32) as i32 + } +} +impl sealed::Sealed for XoroshiroRandom {} +impl WorldgenSource for XoroshiroRandom { + fn worldgen_bits(&mut self, count: i32) -> i32 { + (self.next_long() as u64).wrapping_shr(64_i32.wrapping_sub(count) as u32) as i32 + } +} + +#[derive(Clone, Debug)] +pub struct WorldgenRandom<R: WorldgenSource> { + source: R, + count: i32, + wrapped: bool, + /// The adapter's own Gaussian cache; native setSeed does not reset it. + gaussian: Option<f64>, +} +impl<R: WorldgenSource> WorldgenRandom<R> { + pub fn new(source: R) -> Self { + Self { + source, + count: 0, + wrapped: true, + gaussian: None, + } + } + fn plain(source: R) -> Self { + Self { + source, + count: 0, + wrapped: false, + gaussian: None, + } + } + pub fn count(&self) -> i32 { + self.count + } + pub fn next_bits(&mut self, bits: i32) -> i32 { + if self.wrapped { + self.count = self.count.wrapping_add(1); + } + self.source.worldgen_bits(bits) + } + pub fn set_decoration_seed(&mut self, seed: i64, x: i32, z: i32) -> i64 { + self.set_seed(seed); + let a = self.next_long() | 1; + let b = self.next_long() | 1; + let mixed = (x as i64) + .wrapping_mul(a) + .wrapping_add((z as i64).wrapping_mul(b)) + ^ seed; + self.set_seed(mixed); + mixed + } + pub fn set_feature_seed(&mut self, seed: i64, index: i32, step: i32) { + self.set_seed( + seed.wrapping_add(index as i64) + .wrapping_add(step.wrapping_mul(10000) as i64), + ); + } + pub fn set_large_feature_seed(&mut self, seed: i64, x: i32, z: i32) { + self.set_seed(seed); + let a = self.next_long(); + let b = self.next_long(); + self.set_seed((x as i64).wrapping_mul(a) ^ (z as i64).wrapping_mul(b) ^ seed); + } + pub fn set_large_feature_with_salt(&mut self, seed: i64, x: i32, z: i32, salt: i32) { + self.set_seed( + (x as i64) + .wrapping_mul(341873128712) + .wrapping_add((z as i64).wrapping_mul(132897987541)) + .wrapping_add(seed) + .wrapping_add(salt as i64), + ); + } +} +impl<R: WorldgenSource> sealed::Sealed for WorldgenRandom<R> {} +impl<R: WorldgenSource> WorldgenSource for WorldgenRandom<R> { + fn worldgen_bits(&mut self, count: i32) -> i32 { + self.next_bits(count) + } +} +impl<R: WorldgenSource> RandomSource for WorldgenRandom<R> { + type Positional = WorldgenPositional<R::Positional>; + fn set_seed(&mut self, seed: i64) { + self.source.set_seed(seed); + } + fn next_int(&mut self) -> i32 { + if self.wrapped { + self.next_bits(32) + } else { + self.source.next_int() + } + } + fn next_int_bound(&mut self, bound: i32) -> Result<i32, InvalidBound> { + if !self.wrapped { + return self.source.next_int_bound(bound); + } + if bound <= 0 { + return Err(InvalidBound); + } + if bound & (bound - 1) == 0 { + return Ok(((bound as i64 * self.next_bits(31) as i64) >> 31) as i32); + } + loop { + let bits = self.next_bits(31); + let value = bits % bound; + if bits.wrapping_sub(value).wrapping_add(bound - 1) >= 0 { + return Ok(value); + } + } + } + fn next_long(&mut self) -> i64 { + if !self.wrapped { + return self.source.next_long(); + } + let high = (self.next_bits(32) as i64) << 32; + high.wrapping_add(self.next_bits(32) as i64) + } + fn next_boolean(&mut self) -> bool { + if self.wrapped { + self.next_bits(1) != 0 + } else { + self.source.next_boolean() + } + } + fn next_float(&mut self) -> f32 { + if self.wrapped { + self.next_bits(24) as f32 * (1.0 / 16777216.0) + } else { + self.source.next_float() + } + } + fn next_double(&mut self) -> f64 { + if !self.wrapped { + return self.source.next_double(); + } + let bits = ((self.next_bits(26) as i64) << 27) + self.next_bits(27) as i64; + bits as f64 * (1.0 / 9007199254740992.0) + } + fn next_gaussian(&mut self) -> f64 { + if !self.wrapped { + return self.source.next_gaussian(); + } + let mut cache = self.gaussian.take(); + let value = super::marsaglia_polar(&mut cache, || self.next_double()); + self.gaussian = cache; + value + } + /// Native forks return the underlying source, not another bit adapter. + /// The returned value keeps that behavior through a transparent variant. + fn fork(&mut self) -> Self { + Self::plain(self.source.fork()) + } + fn fork_positional(&mut self) -> Self::Positional { + WorldgenPositional(self.source.fork_positional()) + } +} +#[derive(Clone, Debug)] +pub struct WorldgenPositional<P: PositionalRandom>(P); +impl<P: PositionalRandom> PositionalRandom for WorldgenPositional<P> +where + P::Source: WorldgenSource, +{ + type Source = WorldgenRandom<P::Source>; + fn at(&self, position: BlockPos) -> Self::Source { + WorldgenRandom::plain(self.0.at(position)) + } + fn from_seed(&self, seed: i64) -> Self::Source { + WorldgenRandom::plain(self.0.from_seed(seed)) + } + fn from_hash_of(&self, name: &str) -> Self::Source { + WorldgenRandom::plain(self.0.from_hash_of(name)) + } + fn from_hash_of_utf16(&self, name: &[u16]) -> Self::Source { + WorldgenRandom::plain(self.0.from_hash_of_utf16(name)) + } +} +pub fn slime_chunk_random(x: i32, z: i32, seed: i64, salt: i64) -> LegacyRandom { + let mixed = seed + .wrapping_add(x.wrapping_mul(x).wrapping_mul(4987142) as i64) + .wrapping_add(x.wrapping_mul(5947611) as i64) + .wrapping_add((z.wrapping_mul(z) as i64).wrapping_mul(4392871)) + .wrapping_add(z.wrapping_mul(389711) as i64) + ^ salt; + LegacyRandom::new(mixed) +} diff --git a/crates/horizon-core/src/storage.rs b/crates/horizon-core/src/storage.rs new file mode 100644 index 000000000..61f8c505f --- /dev/null +++ b/crates/horizon-core/src/storage.rs @@ -0,0 +1,172 @@ +//! Palette indices packed into padded 64-bit words, not a continuous bitstream. + +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum StorageError { + InvalidBits(u8), + InvalidLength { expected: usize, actual: usize }, + OutOfBounds { index: usize, len: usize }, + ValueTooLarge(u32), +} + +impl std::fmt::Display for StorageError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{self:?}") + } +} + +impl std::error::Error for StorageError {} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct PackedStorage { + bits: u8, + len: usize, + per_word: usize, + mask: u64, + words: Vec<u64>, +} + +impl PackedStorage { + pub fn new(bits: u8, len: usize) -> Result<Self, StorageError> { + let per_word = Self::per_word(bits)?; + Self::from_words(bits, len, vec![0; len.div_ceil(per_word)]) + } + + /// Retains padding and unused tail bits from input, as the Java long[] does. + pub fn from_words(bits: u8, len: usize, words: Vec<u64>) -> Result<Self, StorageError> { + let per_word = Self::per_word(bits)?; + let expected = len.div_ceil(per_word); + if words.len() != expected { + return Err(StorageError::InvalidLength { + expected, + actual: words.len(), + }); + } + Ok(Self { + bits, + len, + per_word, + mask: (1_u64 << bits) - 1, + words, + }) + } + + fn per_word(bits: u8) -> Result<usize, StorageError> { + if !(1..=32).contains(&bits) { + return Err(StorageError::InvalidBits(bits)); + } + Ok(64 / usize::from(bits)) + } + + pub fn bits(&self) -> u8 { + self.bits + } + pub fn len(&self) -> usize { + self.len + } + pub fn is_empty(&self) -> bool { + self.len == 0 + } + pub fn words(&self) -> &[u64] { + &self.words + } + + fn location(&self, index: usize) -> Result<(usize, usize), StorageError> { + if index >= self.len { + return Err(StorageError::OutOfBounds { + index, + len: self.len, + }); + } + Ok(( + index / self.per_word, + (index % self.per_word) * usize::from(self.bits), + )) + } + + pub fn get(&self, index: usize) -> Result<u32, StorageError> { + let (word, shift) = self.location(index)?; + Ok(((self.words[word] >> shift) & self.mask) as u32) + } + + /// Validation fails before mutation. Writes accept nonnegative Java ints; + /// imported 32-bit words may still decode to any u32 bit pattern. + pub fn set(&mut self, index: usize, value: u32) -> Result<u32, StorageError> { + let (word, shift) = self.location(index)?; + if u64::from(value) > self.mask || value > i32::MAX as u32 { + return Err(StorageError::ValueTooLarge(value)); + } + let old = ((self.words[word] >> shift) & self.mask) as u32; + self.words[word] = (self.words[word] & !(self.mask << shift)) | (u64::from(value) << shift); + Ok(old) + } + + /// Vanilla's doubling fill also writes padding and unused tail slots. + pub fn fill(&mut self, value: u32) -> Result<(), StorageError> { + if u64::from(value) > self.mask || value > i32::MAX as u32 { + return Err(StorageError::ValueTooLarge(value)); + } + let mut word = u64::from(value); + let mut shift = u32::from(self.bits); + while shift < 64 { + word |= word << shift; + shift *= 2; + } + self.words.fill(word); + Ok(()) + } + + pub fn unpack(&self) -> Vec<u32> { + let mut values = Vec::with_capacity(self.len); + for &word in &self.words { + for slot in 0..self.per_word.min(self.len - values.len()) { + values.push(((word >> (slot * usize::from(self.bits))) & self.mask) as u32); + } + } + values + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn padded_words_never_split_entries() { + let mut storage = PackedStorage::new(5, 13).unwrap(); + assert_eq!(storage.words().len(), 2); + storage.set(11, 31).unwrap(); + storage.set(12, 7).unwrap(); + assert_eq!(storage.words(), &[31 << 55, 7]); + } + + #[test] + fn all_widths_survive_overwrites_and_unpack() { + for bits in 1..=32 { + let mut storage = PackedStorage::new(bits, 4096).unwrap(); + let mut expected = vec![0; 4096]; + for pass in 0..3 { + for (i, item) in expected.iter_mut().enumerate() { + let value = ((i as u64 * 7 + pass) & storage.mask) as u32; + assert_eq!(storage.set(i, value).unwrap(), *item); + *item = value; + } + assert_eq!(storage.unpack(), expected); + } + } + } + + #[test] + fn imported_padding_is_preserved_and_invalid_writes_are_atomic() { + let mut storage = PackedStorage::from_words(5, 1, vec![u64::MAX]).unwrap(); + assert_eq!(storage.set(0, 0).unwrap(), 31); + assert_eq!(storage.words(), &[u64::MAX << 5]); + let unchanged = storage.clone(); + assert!(storage.set(1, 0).is_err()); + assert!(storage.set(0, 32).is_err()); + assert_eq!(storage, unchanged); + assert!(PackedStorage::new(0, 1).is_err()); + assert!(PackedStorage::new(33, 1).is_err()); + assert!(PackedStorage::from_words(5, 13, vec![0]).is_err()); + assert!(PackedStorage::new(1, 0).unwrap().unpack().is_empty()); + } +} diff --git a/crates/horizon-core/src/text.rs b/crates/horizon-core/src/text.rs new file mode 100644 index 000000000..f6333826f --- /dev/null +++ b/crates/horizon-core/src/text.rs @@ -0,0 +1,33 @@ +//! Java text conversions shared by registry and client resource binding. + +/// JDK 25 Integer.parseInt decimal semantics, including BMP decimal digits. +pub fn parse_java_integer(text: &str) -> Option<i32> { + let (negative, text) = if let Some(text) = text.strip_prefix('-') { + (true, text) + } else { + (false, text.strip_prefix('+').unwrap_or(text)) + }; + if text.is_empty() { + return None; + } + // BMP decimal digit runs accepted by Character.digit(char, 10) in JDK 25. + const ZEROES: [u32; 37] = [ + 0x30, 0x660, 0x6f0, 0x7c0, 0x966, 0x9e6, 0xa66, 0xae6, 0xb66, 0xbe6, 0xc66, 0xce6, 0xd66, + 0xde6, 0xe50, 0xed0, 0xf20, 0x1040, 0x1090, 0x17e0, 0x1810, 0x1946, 0x19d0, 0x1a80, 0x1a90, + 0x1b50, 0x1bb0, 0x1c40, 0x1c50, 0xa620, 0xa8d0, 0xa900, 0xa9d0, 0xa9f0, 0xaa50, 0xabf0, + 0xff10, + ]; + let mut value = 0i64; + for c in text.chars() { + let c = c as u32; + let zero = ZEROES + .iter() + .copied() + .find(|zero| c >= *zero && c < *zero + 10)?; + value = value * 10 + i64::from(c - zero); + if value > i64::from(i32::MAX) + i64::from(negative) { + return None; + } + } + Some(if negative { -value } else { value } as i32) +} diff --git a/crates/horizon-core/src/ticks/generation.rs b/crates/horizon-core/src/ticks/generation.rs new file mode 100644 index 000000000..4e1fdce6f --- /dev/null +++ b/crates/horizon-core/src/ticks/generation.rs @@ -0,0 +1,110 @@ +//! Generation-stage tick storage and routing, before level tick execution. +use super::{ChunkTicks, SavedTick, ScheduledTick, TickTypeId}; +use crate::position::BlockPos; +use std::collections::HashSet; + +/// Proto chunks retain the first request for a type/position in insertion order. +/// Newly scheduled delays are zero; loaded delays and priorities are preserved. +#[derive(Clone, Debug, Default)] +pub struct ProtoChunkTicks { + ticks: Vec<SavedTick>, + positions: HashSet<(TickTypeId, BlockPos)>, +} +impl ProtoChunkTicks { + pub fn from_saved(ticks: impl IntoIterator<Item = SavedTick>) -> Self { + let mut result = Self::default(); + for tick in ticks { + result.schedule_saved(tick); + } + result + } + fn schedule_saved(&mut self, tick: SavedTick) -> bool { + if !self.positions.insert((tick.kind, tick.pos)) { + return false; + } + self.ticks.push(tick); + true + } + pub fn schedule(&mut self, tick: ScheduledTick) -> bool { + self.schedule_saved(SavedTick { + kind: tick.kind, + pos: tick.pos, + delay: 0, + priority: tick.priority, + }) + } + pub fn has_scheduled(&self, pos: BlockPos, kind: TickTypeId) -> bool { + self.positions.contains(&(kind, pos)) + } + pub fn count(&self) -> usize { + self.ticks.len() + } + /// Borrow the current saved list. Game time does not affect proto delays. + pub fn pack(&self, _game_time: i64) -> &[SavedTick] { + &self.ticks + } + /// An independent snapshot, matching scheduledTicks rather than pack's view. + pub fn scheduled_ticks(&self) -> Vec<SavedTick> { + self.ticks.clone() + } +} + +pub trait TickContainerAccess { + fn schedule(&mut self, tick: ScheduledTick) -> bool; + fn has_scheduled(&self, pos: BlockPos, kind: TickTypeId) -> bool; +} +impl TickContainerAccess for ProtoChunkTicks { + fn schedule(&mut self, tick: ScheduledTick) -> bool { + Self::schedule(self, tick) + } + fn has_scheduled(&self, pos: BlockPos, kind: TickTypeId) -> bool { + Self::has_scheduled(self, pos, kind) + } +} +impl TickContainerAccess for ChunkTicks { + fn schedule(&mut self, tick: ScheduledTick) -> bool { + Self::schedule(self, tick) + } + fn has_scheduled(&self, pos: BlockPos, kind: TickTypeId) -> bool { + Self::has_scheduled(self, pos, kind) + } +} + +/// World-owned selection of the receiving chunk/container. This receives the +/// original block position, so lookup policy and its errors remain observable. +pub trait WorldGenTickContainers { + type Container: TickContainerAccess; + type Error; + fn container_at(&mut self, pos: BlockPos) -> Result<&mut Self::Container, Self::Error>; +} + +pub struct WorldGenTickAccess<C> { + containers: C, +} +impl<C: WorldGenTickContainers> WorldGenTickAccess<C> { + pub fn new(containers: C) -> Self { + Self { containers } + } + pub fn containers(&self) -> &C { + &self.containers + } + pub fn containers_mut(&mut self) -> &mut C { + &mut self.containers + } + pub fn into_containers(self) -> C { + self.containers + } + pub fn schedule(&mut self, tick: ScheduledTick) -> Result<bool, C::Error> { + Ok(self.containers.container_at(tick.pos)?.schedule(tick)) + } + pub fn has_scheduled(&mut self, pos: BlockPos, kind: TickTypeId) -> Result<bool, C::Error> { + Ok(self.containers.container_at(pos)?.has_scheduled(pos, kind)) + } + /// Generation access never reports a currently executing tick or a level count. + pub fn will_tick_this_tick(&self, _pos: BlockPos, _kind: TickTypeId) -> bool { + false + } + pub fn count(&self) -> usize { + 0 + } +} diff --git a/crates/horizon-core/src/ticks/heap.rs b/crates/horizon-core/src/ticks/heap.rs new file mode 100644 index 000000000..262105392 --- /dev/null +++ b/crates/horizon-core/src/ticks/heap.rs @@ -0,0 +1,101 @@ +//! Array heap with the pinned JDK PriorityQueue's equal-key and iterator-removal +//! behavior. Equal comparator keys are observable in saved and loaded ticks. +use std::{cmp::Ordering, collections::VecDeque}; + +#[derive(Clone, Debug)] +pub(super) struct Heap<T> { + pub(super) values: Vec<T>, +} +impl<T> Default for Heap<T> { + fn default() -> Self { + Self { values: Vec::new() } + } +} +impl<T: Copy + PartialEq> Heap<T> { + pub(super) fn peek(&self) -> Option<T> { + self.values.first().copied() + } + pub(super) fn push(&mut self, value: T, compare: impl Fn(T, T) -> Ordering) { + self.values.push(value); + self.up(self.values.len() - 1, value, &compare); + } + fn up(&mut self, mut index: usize, value: T, compare: &impl Fn(T, T) -> Ordering) -> usize { + while index > 0 { + let parent = (index - 1) / 2; + if compare(value, self.values[parent]) != Ordering::Less { + break; + } + self.values[index] = self.values[parent]; + index = parent; + } + self.values[index] = value; + index + } + fn down(&mut self, mut index: usize, value: T, compare: &impl Fn(T, T) -> Ordering) -> usize { + let half = self.values.len() / 2; + while index < half { + let mut child = index * 2 + 1; + let right = child + 1; + if right < self.values.len() + && compare(self.values[child], self.values[right]) == Ordering::Greater + { + child = right; + } + if compare(value, self.values[child]) != Ordering::Greater { + break; + } + self.values[index] = self.values[child]; + index = child; + } + self.values[index] = value; + index + } + pub(super) fn pop(&mut self, compare: impl Fn(T, T) -> Ordering) -> Option<T> { + let first = self.peek()?; + let last = self.values.pop().unwrap(); + if !self.values.is_empty() { + self.down(0, last, &compare); + } + Some(first) + } + fn remove_at(&mut self, index: usize, compare: &impl Fn(T, T) -> Ordering) -> Option<T> { + let last = self.values.pop().unwrap(); + if index == self.values.len() { + return None; + } + if self.down(index, last, compare) == index && self.up(index, last, compare) != index { + Some(last) + } else { + None + } + } + pub(super) fn remove_if( + &mut self, + mut predicate: impl FnMut(T) -> bool, + compare: impl Fn(T, T) -> Ordering, + ) { + let mut cursor = 0; + let mut moved = VecDeque::new(); + while cursor < self.values.len() { + let value = self.values[cursor]; + cursor += 1; + if predicate(value) { + if let Some(value) = self.remove_at(cursor - 1, &compare) { + moved.push_back(value); + } else { + cursor -= 1; + } + } + } + while let Some(value) = moved.pop_front() { + if predicate(value) { + let index = self + .values + .iter() + .position(|&candidate| candidate == value) + .unwrap(); + self.remove_at(index, &compare); + } + } + } +} diff --git a/crates/horizon-core/src/ticks/index.rs b/crates/horizon-core/src/ticks/index.rs new file mode 100644 index 000000000..6f88cf701 --- /dev/null +++ b/crates/horizon-core/src/ticks/index.rs @@ -0,0 +1,159 @@ +//! Deadline index whose traversal matches the pinned fastutil long map. Heap +//! insertion order decides exact ties between chunk heads after save loading. +#[derive(Clone, Debug)] +pub(super) struct DeadlineIndex { + keys: Vec<i64>, + values: Vec<i64>, + zero: bool, + size: usize, +} +fn mix(key: i64) -> usize { + let mut value = (key as u64).wrapping_mul(0x9e3779b97f4a7c15); + value ^= value >> 32; + (value ^ (value >> 16)) as usize +} +impl Default for DeadlineIndex { + fn default() -> Self { + Self { + keys: vec![0; 33], + values: vec![0; 33], + zero: false, + size: 0, + } + } +} +impl DeadlineIndex { + fn capacity(&self) -> usize { + self.keys.len() - 1 + } + fn find(&self, key: i64) -> usize { + if key == 0 { + return self.capacity(); + } + let mask = self.capacity() - 1; + let mut slot = mix(key) & mask; + while self.keys[slot] != 0 && self.keys[slot] != key { + slot = (slot + 1) & mask; + } + slot + } + pub(super) fn put(&mut self, key: i64, value: i64) { + let slot = self.find(key); + let exists = if key == 0 { + self.zero + } else { + self.keys[slot] != 0 + }; + self.values[slot] = value; + if exists { + return; + } + self.keys[slot] = key; + if key == 0 { + self.zero = true; + } + let old_size = self.size; + self.size += 1; + if old_size >= self.capacity() * 3 / 4 { + self.rehash(self.capacity() * 2); + } + } + fn rehash(&mut self, capacity: usize) { + let old_keys = std::mem::replace(&mut self.keys, vec![0; capacity + 1]); + let old_values = std::mem::replace(&mut self.values, vec![0; capacity + 1]); + for slot in (0..old_keys.len() - 1).rev() { + if old_keys[slot] == 0 { + continue; + } + let destination = self.find(old_keys[slot]); + self.keys[destination] = old_keys[slot]; + self.values[destination] = old_values[slot]; + } + self.values[capacity] = *old_values.last().unwrap(); + } + fn shift_keys(&mut self, mut hole: usize, wrapped: &mut Vec<i64>) { + let mask = self.capacity() - 1; + loop { + let mut slot = (hole + 1) & mask; + loop { + let key = self.keys[slot]; + if key == 0 { + self.keys[hole] = 0; + return; + } + let home = mix(key) & mask; + let crosses = if hole <= slot { + hole >= home || home > slot + } else { + hole >= home && home > slot + }; + if crosses { + break; + } + slot = (slot + 1) & mask; + } + if slot < hole { + wrapped.push(self.keys[slot]); + } + self.keys[hole] = self.keys[slot]; + self.values[hole] = self.values[slot]; + hole = slot; + } + } + pub(super) fn remove(&mut self, key: i64) { + let slot = self.find(key); + if key == 0 { + if !self.zero { + return; + } + self.zero = false; + } else { + if self.keys[slot] == 0 { + return; + } + self.shift_keys(slot, &mut Vec::new()); + } + self.size -= 1; + if self.capacity() > 32 && self.size < self.capacity() * 3 / 16 { + self.rehash(self.capacity() / 2); + } + } + /// Visit in vanilla iterator order. The callback updates the deadline and + /// returns true to remove the entry. Regular iterator removal does not shrink. + pub(super) fn visit(&mut self, mut action: impl FnMut(i64, &mut i64) -> bool) { + let mut remaining = self.size; + let mut position = self.capacity() as isize; + let mut wrapped = Vec::new(); + let mut zero = self.zero; + while remaining > 0 { + remaining -= 1; + let slot = if zero { + zero = false; + self.capacity() + } else { + loop { + position -= 1; + if position < 0 { + break self.find(wrapped[(-position - 1) as usize]); + } + if self.keys[position as usize] != 0 { + break position as usize; + } + } + }; + let key = self.keys[slot]; + if !action(key, &mut self.values[slot]) { + continue; + } + if slot == self.capacity() { + self.zero = false; + self.size -= 1; + } else if position >= 0 { + self.shift_keys(slot, &mut wrapped); + self.size -= 1; + } else { + self.remove(key); + } + } + } +} diff --git a/crates/horizon-core/src/ticks/mod.rs b/crates/horizon-core/src/ticks/mod.rs new file mode 100644 index 000000000..f3cc83999 --- /dev/null +++ b/crates/horizon-core/src/ticks/mod.rs @@ -0,0 +1,642 @@ +//! Scheduled block/fluid tick machinery for Java Edition 26.3. Type IDs identify +//! registry-owned types; each block/fluid registry uses its own LevelTicks. +mod generation; +pub use generation::{ + ProtoChunkTicks, TickContainerAccess, WorldGenTickAccess, WorldGenTickContainers, +}; +mod heap; +mod index; +use crate::position::{BlockPos, ChunkPos}; +use heap::Heap; +use index::DeadlineIndex; +use std::{ + cmp::Ordering, + collections::{HashMap, HashSet, VecDeque}, +}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct TickTypeId(pub u32); + +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord)] +#[repr(i8)] +pub enum TickPriority { + ExtremelyHigh = -3, + VeryHigh = -2, + High = -1, + #[default] + Normal = 0, + Low = 1, + VeryLow = 2, + ExtremelyLow = 3, +} +impl TickPriority { + pub const fn by_value(value: i32) -> Self { + match value { + i32::MIN..=-3 => Self::ExtremelyHigh, + -2 => Self::VeryHigh, + -1 => Self::High, + 0 => Self::Normal, + 1 => Self::Low, + 2 => Self::VeryLow, + 3..=i32::MAX => Self::ExtremelyLow, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct ScheduledTick { + pub kind: TickTypeId, + pub pos: BlockPos, + pub trigger_tick: i64, + pub priority: TickPriority, + pub sub_tick_order: i64, +} +impl ScheduledTick { + pub fn drain_cmp(self, other: Self) -> Ordering { + self.trigger_tick + .cmp(&other.trigger_tick) + .then_with(|| self.intra_cmp(other)) + } + pub fn intra_cmp(self, other: Self) -> Ordering { + self.priority + .cmp(&other.priority) + .then_with(|| self.sub_tick_order.cmp(&other.sub_tick_order)) + } + pub fn saved(self, game_time: i64) -> SavedTick { + SavedTick { + kind: self.kind, + pos: self.pos, + delay: self.trigger_tick.wrapping_sub(game_time) as i32, + priority: self.priority, + } + } + fn key(self) -> (TickTypeId, BlockPos) { + (self.kind, self.pos) + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct SavedTick { + pub kind: TickTypeId, + pub pos: BlockPos, + pub delay: i32, + pub priority: TickPriority, +} +impl SavedTick { + pub fn unpack(self, game_time: i64, sub_tick_order: i64) -> ScheduledTick { + ScheduledTick { + kind: self.kind, + pos: self.pos, + trigger_tick: game_time.wrapping_add(i64::from(self.delay)), + priority: self.priority, + sub_tick_order, + } + } +} + +#[derive(Clone, Debug, Default)] +pub struct ChunkTicks { + queue: Heap<ScheduledTick>, + pending: Option<Vec<SavedTick>>, + positions: HashSet<(TickTypeId, BlockPos)>, +} +impl ChunkTicks { + pub fn from_saved(ticks: Vec<SavedTick>) -> Self { + Self { + positions: ticks.iter().map(|t| (t.kind, t.pos)).collect(), + pending: Some(ticks), + ..Self::default() + } + } + pub fn peek(&self) -> Option<ScheduledTick> { + self.queue.peek() + } + pub fn poll(&mut self) -> Option<ScheduledTick> { + let tick = self.queue.pop(ScheduledTick::drain_cmp)?; + self.positions.remove(&tick.key()); + Some(tick) + } + /// First schedule wins for a type/position, irrespective of timing/priority. + pub fn schedule(&mut self, tick: ScheduledTick) -> bool { + if !self.positions.insert(tick.key()) { + return false; + } + self.queue.push(tick, ScheduledTick::drain_cmp); + true + } + pub fn has_scheduled(&self, pos: BlockPos, kind: TickTypeId) -> bool { + self.positions.contains(&(kind, pos)) + } + pub fn count(&self) -> usize { + self.queue.values.len() + self.pending.as_ref().map_or(0, Vec::len) + } + /// Heap traversal order, as exposed by vanilla getAll, rather than sorted order. + pub fn queued(&self) -> &[ScheduledTick] { + &self.queue.values + } + pub fn remove_if(&mut self, mut predicate: impl FnMut(ScheduledTick) -> bool) { + self.queue.remove_if( + |tick| { + if !predicate(tick) { + return false; + } + self.positions.remove(&tick.key()); + true + }, + ScheduledTick::drain_cmp, + ); + } + pub fn pack(&self, game_time: i64) -> Vec<SavedTick> { + let mut saved = self.pending.clone().unwrap_or_default(); + let mut queued = self.queue.values.clone(); + queued.sort_by_key(|t| t.sub_tick_order); + saved.extend(queued.into_iter().map(|t| t.saved(game_time))); + saved + } + pub fn unpack(&mut self, game_time: i64) { + if let Some(pending) = self.pending.take() { + let mut order = (pending.len() as i32).wrapping_neg() as i64; + for saved in pending { + // Vanilla does not deduplicate a saved list during unpack. + self.queue + .push(saved.unpack(game_time, order), ScheduledTick::drain_cmp); + order = order.wrapping_add(1); + } + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + fn tick(kind: u32, x: i32, time: i64, priority: i32, order: i64) -> ScheduledTick { + ScheduledTick { + kind: TickTypeId(kind), + pos: BlockPos::new(x, 64, 0), + trigger_tick: time, + priority: TickPriority::by_value(priority), + sub_tick_order: order, + } + } + fn level() -> LevelTicks { + let mut level = LevelTicks::default(); + for x in -1..=2 { + level + .add_chunk(ChunkPos::new(x, 0), ChunkTicks::default()) + .unwrap(); + } + level + } + #[test] + fn due_chunks_compete_by_priority_not_trigger_time() { + let mut level = level(); + for tick in [ + tick(0, 0, 1, 3, 10), + tick(1, 1, 2, -3, 11), + tick(2, 16, 3, 0, 12), + ] { + assert_eq!(level.schedule(tick), ScheduleResult::Added); + } + assert_eq!( + level.schedule(tick(0, 0, -100, -3, -10)), + ScheduleResult::Duplicate + ); + let mut ran = Vec::new(); + level + .tick(10, 10, |_| true, |_, tick| ran.push(tick.kind.0)) + .unwrap(); + assert_eq!(ran, [2, 0, 1]); + assert_eq!(level.count(), 0); + } + #[test] + fn callback_scheduling_waits_until_the_next_collection() { + let mut level = level(); + let original = tick(0, 0, 0, 0, 0); + level.schedule(original); + let mut ran = 0; + level + .tick( + 0, + 100, + |_| true, + |level, tick| { + ran += 1; + assert!(!level.will_tick_this_tick(tick.pos, tick.kind)); + assert_eq!(level.schedule(tick), ScheduleResult::Added); + assert!(level.has_scheduled(tick.pos, tick.kind)); + }, + ) + .unwrap(); + assert_eq!(ran, 1); + assert_eq!(level.count(), 1); + level.tick(0, 100, |_| true, |_, _| ran += 1).unwrap(); + assert_eq!(ran, 2); + assert_eq!(level.count(), 0); + } + #[test] + fn pending_ticks_keep_list_order_and_java_time_overflow() { + let a = tick(0, 0, i64::MAX, -9, 10).saved(i64::MIN); + assert_eq!(a.delay, -1); + let b = SavedTick { + delay: 1, + kind: TickTypeId(1), + ..a + }; + let mut chunk = ChunkTicks::from_saved(vec![a, b, a]); + assert_eq!(chunk.count(), 3); + assert!(chunk.peek().is_none()); + assert!(!chunk.schedule(tick(0, 0, 100, 0, 0))); + chunk.unpack(i64::MAX); + assert_eq!(chunk.count(), 3); + assert_eq!(chunk.poll().unwrap().trigger_tick, i64::MIN); + assert_eq!(chunk.poll().unwrap().sub_tick_order, -3); + assert_eq!(chunk.poll().unwrap().sub_tick_order, -1); + chunk.unpack(0); + assert_eq!(chunk.count(), 0); + } + #[test] + fn disabled_and_removed_chunks_retain_their_queue() { + let mut level = level(); + level.schedule(tick(0, 0, 0, 0, 0)); + level + .tick(10, 10, |_| false, |_, _| panic!("disabled chunk ran")) + .unwrap(); + let chunk = level.remove_chunk(ChunkPos::new(0, 0)).unwrap(); + assert_eq!(chunk.count(), 1); + assert_eq!( + level.schedule(tick(1, 0, 0, 0, 0)), + ScheduleResult::MissingChunk + ); + level.add_chunk(ChunkPos::new(0, 0), chunk).unwrap(); + let mut ran = Vec::new(); + level + .tick(10, 1, |_| true, |_, tick| ran.push(tick)) + .unwrap(); + assert_eq!(ran, [tick(0, 0, 0, 0, 0)]); + } + #[test] + fn collection_guards_and_membership_survive_area_mutation() { + let mut level = level(); + level.schedule(tick(0, 0, 0, 0, 0)); + level.schedule(tick(1, 1, 0, 0, 1)); + level.begin_tick(0, 10, |_| true).unwrap(); + assert_eq!( + level.begin_tick(0, 10, |_| true), + Err(TickError::AlreadyCollecting) + ); + assert_eq!(level.finish_tick(), Err(TickError::TicksRemain)); + assert_eq!(level.next_tick().unwrap().unwrap().kind, TickTypeId(0)); + let probe = BlockPos::new(1, 64, 0); + assert!(level.will_tick_this_tick(probe, TickTypeId(1))); + level.clear_area(TickArea::new(probe, probe)); + // Preserve vanilla's stale lazily built set until cleanup. + assert!(level.will_tick_this_tick(probe, TickTypeId(1))); + assert!(level.next_tick().unwrap().is_none()); + level.finish_tick().unwrap(); + assert!(!level.will_tick_this_tick(probe, TickTypeId(1))); + assert_eq!(level.next_tick(), Err(TickError::NotCollecting)); + } + #[test] + fn copying_active_ticks_preserves_relative_order_and_wraps() { + let mut level = level(); + level.schedule(tick(0, 0, 0, 0, i64::MAX - 1)); + level.schedule(tick(1, 1, 0, 0, i64::MAX)); + level.begin_tick(0, 10, |_| true).unwrap(); + level.next_tick().unwrap(); + level.copy_area( + TickArea::new(BlockPos::new(0, 64, 0), BlockPos::new(1, 64, 0)), + BlockPos::new(16, 0, 0), + ); + let copied = level.chunk(ChunkPos::new(1, 0)).unwrap().queued(); + assert_eq!(copied.len(), 2); + assert_eq!(copied[0].sub_tick_order, i64::MIN); + assert_eq!(copied[1].sub_tick_order, i64::MIN + 1); + while level.next_tick().unwrap().is_some() {} + level.finish_tick().unwrap(); + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct TickArea { + pub min: BlockPos, + pub max: BlockPos, +} +impl TickArea { + pub fn new(a: BlockPos, b: BlockPos) -> Self { + Self { + min: BlockPos::new(a.x.min(b.x), a.y.min(b.y), a.z.min(b.z)), + max: BlockPos::new(a.x.max(b.x), a.y.max(b.y), a.z.max(b.z)), + } + } + pub fn contains(self, pos: BlockPos) -> bool { + (self.min.x..=self.max.x).contains(&pos.x) + && (self.min.y..=self.max.y).contains(&pos.y) + && (self.min.z..=self.max.z).contains(&pos.z) + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ScheduleResult { + Added, + Duplicate, + MissingChunk, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TickError { + AlreadyCollecting, + NotCollecting, + TicksRemain, + ChunkAlreadyAdded, + WrongChunk, +} +impl std::fmt::Display for TickError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "scheduled tick invariant: {self:?}") + } +} +impl std::error::Error for TickError {} + +#[derive(Default)] +pub struct LevelTicks { + chunks: HashMap<i64, ChunkTicks>, + deadlines: DeadlineIndex, + containers_to_tick: Heap<i64>, + to_run: VecDeque<ScheduledTick>, + already_run: Vec<ScheduledTick>, + to_run_set: HashSet<(TickTypeId, BlockPos)>, + collecting: bool, +} +impl LevelTicks { + pub fn add_chunk(&mut self, pos: ChunkPos, ticks: ChunkTicks) -> Result<(), TickError> { + let key = pos.pack(); + if self.chunks.contains_key(&key) { + return Err(TickError::ChunkAlreadyAdded); + } + if ticks.queue.values.iter().any(|t| t.pos.chunk() != pos) + || ticks + .pending + .as_ref() + .is_some_and(|p| p.iter().any(|t| t.pos.chunk() != pos)) + { + return Err(TickError::WrongChunk); + } + if let Some(tick) = ticks.peek() { + self.deadlines.put(key, tick.trigger_tick); + } + self.chunks.insert(key, ticks); + Ok(()) + } + pub fn remove_chunk(&mut self, pos: ChunkPos) -> Option<ChunkTicks> { + self.deadlines.remove(pos.pack()); + self.chunks.remove(&pos.pack()) + } + pub fn chunk(&self, pos: ChunkPos) -> Option<&ChunkTicks> { + self.chunks.get(&pos.pack()) + } + pub fn unpack_chunk(&mut self, pos: ChunkPos, game_time: i64) { + if let Some(chunk) = self.chunks.get_mut(&pos.pack()) { + chunk.unpack(game_time); + if let Some(tick) = chunk.peek() { + self.deadlines.put(pos.pack(), tick.trigger_tick); + } + } + } + pub fn schedule(&mut self, tick: ScheduledTick) -> ScheduleResult { + let key = tick.pos.chunk().pack(); + let Some(chunk) = self.chunks.get_mut(&key) else { + return ScheduleResult::MissingChunk; + }; + if !chunk.schedule(tick) { + return ScheduleResult::Duplicate; + } + if chunk.peek() == Some(tick) { + self.deadlines.put(key, tick.trigger_tick); + } + ScheduleResult::Added + } + pub fn has_scheduled(&self, pos: BlockPos, kind: TickTypeId) -> bool { + self.chunk(pos.chunk()) + .is_some_and(|c| c.has_scheduled(pos, kind)) + } + pub fn will_tick_this_tick(&mut self, pos: BlockPos, kind: TickTypeId) -> bool { + if self.to_run_set.is_empty() && !self.to_run.is_empty() { + self.to_run_set.extend(self.to_run.iter().map(|t| t.key())); + } + self.to_run_set.contains(&(kind, pos)) + } + pub fn count(&self) -> usize { + self.chunks.values().map(ChunkTicks::count).sum() + } + pub fn begin_tick( + &mut self, + game_time: i64, + maximum: i32, + mut can_tick: impl FnMut(ChunkPos) -> bool, + ) -> Result<(), TickError> { + if self.collecting { + return Err(TickError::AlreadyCollecting); + } + self.collecting = true; + let mut containers = std::mem::take(&mut self.containers_to_tick); + let chunks = &mut self.chunks; + let compare = |a: i64, b: i64| { + chunks[&a] + .peek() + .unwrap() + .intra_cmp(chunks[&b].peek().unwrap()) + }; + self.deadlines.visit(|key, deadline| { + if *deadline > game_time { + return false; + } + let Some(head) = chunks.get(&key).and_then(ChunkTicks::peek) else { + return true; + }; + if head.trigger_tick > game_time { + *deadline = head.trigger_tick; + return false; + } + if !can_tick(ChunkPos::unpack(key)) { + return false; + } + containers.push(key, compare); + true + }); + let maximum = maximum.max(0) as usize; + while self.to_run.len() < maximum { + let Some(key) = containers.pop(|a, b| { + self.chunks[&a] + .peek() + .unwrap() + .intra_cmp(self.chunks[&b].peek().unwrap()) + }) else { + break; + }; + let chunk = self.chunks.get_mut(&key).unwrap(); + self.to_run.push_back(chunk.poll().unwrap()); + let competing = containers.peek().and_then(|key| self.chunks[&key].peek()); + let chunk = self.chunks.get_mut(&key).unwrap(); + while self.to_run.len() < maximum { + let Some(head) = chunk.peek() else { + break; + }; + if head.trigger_tick > game_time + || competing.is_some_and(|other| head.intra_cmp(other) == Ordering::Greater) + { + break; + } + self.to_run.push_back(chunk.poll().unwrap()); + } + if let Some(head) = chunk.peek() { + if head.trigger_tick <= game_time && self.to_run.len() < maximum { + containers.push(key, |a, b| { + self.chunks[&a] + .peek() + .unwrap() + .intra_cmp(self.chunks[&b].peek().unwrap()) + }); + } else { + self.deadlines.put(key, head.trigger_tick); + } + } + } + for &key in &containers.values { + self.deadlines + .put(key, self.chunks[&key].peek().unwrap().trigger_tick); + } + containers.values.clear(); + self.containers_to_tick = containers; + Ok(()) + } + /// Pop immediately before invoking block/fluid behavior. The current tick is + /// already-run, absent from will_tick, and available to area copying. + pub fn next_tick(&mut self) -> Result<Option<ScheduledTick>, TickError> { + if !self.collecting { + return Err(TickError::NotCollecting); + } + let Some(tick) = self.to_run.pop_front() else { + return Ok(None); + }; + if !self.to_run_set.is_empty() { + self.to_run_set.remove(&tick.key()); + } + self.already_run.push(tick); + Ok(Some(tick)) + } + pub fn finish_tick(&mut self) -> Result<(), TickError> { + if !self.collecting { + return Err(TickError::NotCollecting); + } + if !self.to_run.is_empty() { + return Err(TickError::TicksRemain); + } + self.already_run.clear(); + self.to_run_set.clear(); + self.collecting = false; + Ok(()) + } + pub fn tick( + &mut self, + game_time: i64, + maximum: i32, + can_tick: impl FnMut(ChunkPos) -> bool, + mut run: impl FnMut(&mut Self, ScheduledTick), + ) -> Result<(), TickError> { + self.begin_tick(game_time, maximum, can_tick)?; + while let Some(tick) = self.next_tick()? { + run(self, tick); + } + self.finish_tick() + } + fn chunks_in_area(&self, area: TickArea) -> Vec<i64> { + let min = area.min.chunk(); + let max = area.max.chunk(); + if min.x > max.x || min.z > max.z { + return Vec::new(); + } + let width = (i64::from(max.x) - i64::from(min.x) + 1) as u64; + let depth = (i64::from(max.z) - i64::from(min.z) + 1) as u64; + // Small edits should probe their grid rather than scan every loaded chunk. + // Large empty areas should visit loaded chunks rather than the empty grid. + if width * depth <= self.chunks.len() as u64 { + let mut keys = Vec::new(); + for x in min.x..=max.x { + for z in min.z..=max.z { + let key = ChunkPos::new(x, z).pack(); + if self.chunks.contains_key(&key) { + keys.push(key); + } + } + } + return keys; + } + let mut keys: Vec<_> = self + .chunks + .keys() + .copied() + .filter(|key| { + let pos = ChunkPos::unpack(*key); + (min.x..=max.x).contains(&pos.x) && (min.z..=max.z).contains(&pos.z) + }) + .collect(); + keys.sort_by_key(|key| { + let p = ChunkPos::unpack(*key); + (p.x, p.z) + }); + keys + } + pub fn clear_area(&mut self, area: TickArea) { + for key in self.chunks_in_area(area) { + let chunk = self.chunks.get_mut(&key).unwrap(); + let old = chunk.peek(); + chunk.remove_if(|tick| area.contains(tick.pos)); + if chunk.peek() != old { + if let Some(tick) = chunk.peek() { + self.deadlines.put(key, tick.trigger_tick); + } else { + self.deadlines.remove(key); + } + } + } + self.already_run.retain(|tick| !area.contains(tick.pos)); + self.to_run.retain(|tick| !area.contains(tick.pos)); + // Vanilla clearArea leaves its lazily computed membership set intact. + } + fn area_ticks(&self, area: TickArea) -> Vec<ScheduledTick> { + let mut ticks: Vec<_> = self + .already_run + .iter() + .chain(self.to_run.iter()) + .copied() + .filter(|t| area.contains(t.pos)) + .collect(); + for key in self.chunks_in_area(area) { + ticks.extend( + self.chunks[&key] + .queued() + .iter() + .copied() + .filter(|t| area.contains(t.pos)), + ); + } + ticks + } + fn schedule_copy(&mut self, ticks: Vec<ScheduledTick>, offset: BlockPos) { + let Some(min) = ticks.iter().map(|t| t.sub_tick_order).min() else { + return; + }; + let max = ticks.iter().map(|t| t.sub_tick_order).max().unwrap(); + for mut tick in ticks { + tick.pos = tick.pos.offset(offset.x, offset.y, offset.z); + tick.sub_tick_order = tick + .sub_tick_order + .wrapping_sub(min) + .wrapping_add(max) + .wrapping_add(1); + self.schedule(tick); + } + } + pub fn copy_area(&mut self, area: TickArea, offset: BlockPos) { + self.schedule_copy(self.area_ticks(area), offset); + } + pub fn copy_area_from(&mut self, source: &Self, area: TickArea, offset: BlockPos) { + self.schedule_copy(source.area_ticks(area), offset); + } +} diff --git a/crates/horizon-core/tests/carving_bounds.rs b/crates/horizon-core/tests/carving_bounds.rs new file mode 100644 index 000000000..0eae83caa --- /dev/null +++ b/crates/horizon-core/tests/carving_bounds.rs @@ -0,0 +1,58 @@ +use horizon_core::carving::{CarvingMask, CarvingMaskError}; + +#[test] +fn invalid_bounds_and_growth_fail_without_changing_existing_cells() { + for (min, max) in [(0, -1), (0, 4064), (i32::MIN, i32::MAX)] { + assert!(matches!( + CarvingMask::new(min, max), + Err(CarvingMaskError::InvalidBounds) + )); + } + let mut mask = CarvingMask::new(-64, 319).unwrap(); + mask.carve(0, -64, 0).unwrap(); + mask.carve(15, 319, 15).unwrap(); + let previous: Vec<_> = mask.columns().collect(); + assert_eq!(mask.carve(0, -65, 0), Err(CarvingMaskError::NegativeIndex)); + assert_eq!( + mask.carve(0, (1 << 24) - 64, 0), + Err(CarvingMaskError::Capacity) + ); + assert_eq!(mask.columns().collect::<Vec<_>>(), previous); +} + +#[test] +fn shared_candidate_budget_counts_skipped_cells_and_stops_before_the_next_callback() { + use horizon_core::{ + carving::{CarveError, carve_ellipsoid_with_budget}, + position::ChunkPos, + }; + let mut mask = CarvingMask::new(0, 15).unwrap(); + let mut remaining = 2; + let mut calls = 0; + let result = carve_ellipsoid_with_budget( + ChunkPos::new(0, 0), + [8., 8., 8.], + 4., + 4., + &mut mask, + |_, _| { + calls += 1; + true + }, + &mut remaining, + ); + assert_eq!(result, Err(CarveError::IterationLimit)); + assert_eq!(calls, 2); + assert_eq!(remaining, 0); + assert!(mask.is_empty()); + let result = carve_ellipsoid_with_budget( + ChunkPos::new(0, 0), + [1000., 8., 1000.], + 1., + 1., + &mut mask, + |_, _| panic!("culled shape queried its predicate"), + &mut remaining, + ); + assert!(result.is_ok()); +} diff --git a/crates/horizon-core/tests/density_world_fields.rs b/crates/horizon-core/tests/density_world_fields.rs new file mode 100644 index 000000000..7bc9ed6dd --- /dev/null +++ b/crates/horizon-core/tests/density_world_fields.rs @@ -0,0 +1,202 @@ +use horizon_core::{ + density::{ + BlendDensitySampler, CachingDensitySampler, ConstantSampler, ContextBoundSampler, + DensityBlender, DensitySampler, SampleError, SamplerContext, WorldField, WorldFields, + graph::{DensityCompiler, DensityGraph, GraphNode}, + }, + noise::DensityVolume, +}; +use std::sync::{Arc, Mutex}; + +#[derive(Debug)] +struct SpatialBlender { + calls: Mutex<Vec<Option<[i32; 3]>>>, +} +impl DensityBlender for SpatialBlender { + fn is_empty(&self) -> bool { + self.calls.lock().unwrap().push(None); + false + } + fn blend_density(&self, [x, y, z]: [i32; 3], input: f32) -> f32 { + self.calls.lock().unwrap().push(Some([x, y, z])); + input + (x * 100 + y * 10 + z) as f32 + } +} + +#[test] +fn fields_resolve_through_the_same_context_and_replace_cached_values() { + let alpha: Arc<dyn DensitySampler> = Arc::new(ContextBoundSampler::new(WorldField::BlendAlpha)); + let beard = ContextBoundSampler::new(WorldField::Beardifier); + let fields = WorldFields::default() + .with_field(WorldField::Beardifier, alpha) + .with_field(WorldField::BlendAlpha, Arc::new(ConstantSampler(0.25))); + let mut context = SamplerContext::cached().with_world_fields(fields); + let cached = CachingDensitySampler::new(0, Arc::new(beard)).unwrap(); + assert_eq!(cached.sample_value(&mut context, [0; 3]).unwrap(), 0.25); + context = context.with_world_fields( + WorldFields::default().with_field(WorldField::Beardifier, Arc::new(ConstantSampler(0.75))), + ); + assert_eq!(cached.sample_value(&mut context, [0; 3]).unwrap(), 0.75); +} + +#[test] +fn absent_fields_use_vanilla_defaults_including_buffer_tails() { + let volume = DensityVolume::new([1; 3], [0; 3], [1; 3]).unwrap(); + let mut context = SamplerContext::default(); + for (field, expected) in [ + (WorldField::BlendAlpha, 1.0), + (WorldField::BlendOffset, 0.0), + (WorldField::Beardifier, 0.0), + ] { + let mut buffer = [9.0; 3]; + ContextBoundSampler::new(field) + .sample_volume(&mut context, &mut buffer, volume) + .unwrap(); + assert_eq!(buffer, [expected; 3]); + } +} + +#[test] +fn blending_visits_z_x_y_and_preserves_the_input_tail() { + let blender = Arc::new(SpatialBlender { + calls: Mutex::new(Vec::new()), + }); + let mut context = SamplerContext::default() + .with_world_fields(WorldFields::default().with_blender(blender.clone())); + let sampler = BlendDensitySampler { + input: Arc::new(ConstantSampler(0.5)), + }; + let volume = DensityVolume::new([2; 3], [1, 2, 3], [2, 3, 4]).unwrap(); + let mut buffer = [9.0; 10]; + sampler + .sample_volume(&mut context, &mut buffer, volume) + .unwrap(); + assert_eq!( + *blender.calls.lock().unwrap(), + vec![ + None, + Some([1, 2, 3]), + Some([1, 5, 3]), + Some([3, 2, 3]), + Some([3, 5, 3]), + Some([1, 2, 7]), + Some([1, 5, 7]), + Some([3, 2, 7]), + Some([3, 5, 7]) + ] + ); + assert_eq!( + buffer, + [ + 123.5, 153.5, 323.5, 353.5, 127.5, 157.5, 327.5, 357.5, 0.5, 0.5 + ] + ); +} + +#[derive(Debug)] +struct FailedInput; +impl DensitySampler for FailedInput { + fn sample_value(&self, _: &mut SamplerContext, _: [i32; 3]) -> Result<f32, SampleError> { + Err(SampleError::ZeroGradientPeriod) + } + fn sample_volume( + &self, + _: &mut SamplerContext, + buffer: &mut [f32], + _: DensityVolume, + ) -> Result<(), SampleError> { + buffer[0] = 0.25; + Err(SampleError::ZeroGradientPeriod) + } +} +#[test] +fn failed_input_prevents_blender_lookup_and_preserves_partial_writes() { + let blender = Arc::new(SpatialBlender { + calls: Mutex::new(Vec::new()), + }); + let mut context = SamplerContext::default() + .with_world_fields(WorldFields::default().with_blender(blender.clone())); + let sampler = BlendDensitySampler { + input: Arc::new(FailedInput), + }; + assert!(sampler.sample_value(&mut context, [0; 3]).is_err()); + let mut buffer = [9.0; 2]; + assert!( + sampler + .sample_volume( + &mut context, + &mut buffer, + DensityVolume::new([1; 3], [0; 3], [1; 3]).unwrap() + ) + .is_err() + ); + assert_eq!(buffer, [0.25, 9.0]); + assert!(blender.calls.lock().unwrap().is_empty()); +} + +#[test] +fn blending_range_and_axes_follow_input_even_for_spatial_providers() { + let mut graph = DensityGraph::default(); + let constant = graph.insert(GraphNode::Constant(0.5)).unwrap(); + let root = graph.insert(GraphNode::BlendDensity(constant)).unwrap(); + assert_eq!(graph.domain_axes(root).unwrap(), 0); + assert_eq!(graph.range(root).unwrap(), graph.range(constant).unwrap()); + let mut compiler = DensityCompiler::new(graph); + let raw = compiler.compile_raw(root).unwrap(); + let optimized = compiler.get_sampler(root).unwrap(); + let blender = Arc::new(SpatialBlender { + calls: Mutex::new(Vec::new()), + }); + let mut context = + SamplerContext::default().with_world_fields(WorldFields::default().with_blender(blender)); + assert_eq!(raw.sample_value(&mut context, [1, 2, 3]).unwrap(), 123.5); + assert_eq!( + optimized.sample_value(&mut context, [1, 2, 3]).unwrap(), + 0.5 + ); +} + +#[test] +fn named_reference_identity_differs_from_direct_value_equality() { + let mut graph = DensityGraph::new(); + let value = graph.insert(GraphNode::Constant(-0.0)).unwrap(); + let direct = graph + .insert(GraphNode::Reference { + input: value, + holder: None, + }) + .unwrap(); + let a = graph + .register_function("minecraft:a".into(), value) + .unwrap(); + let b = graph + .register_function("minecraft:b".into(), value) + .unwrap(); + assert!(!graph.java_equals(a, b).unwrap()); + assert!(!graph.java_equals(a, direct).unwrap()); + assert_eq!(graph.function("minecraft:a"), Some(a)); + assert!( + graph + .register_function("minecraft:a".into(), value) + .is_err() + ); + let exponent = graph.insert(GraphNode::Constant(0.5)).unwrap(); + let power = graph + .insert(GraphNode::Power { base: a, exponent }) + .unwrap(); + let mut compiler = DensityCompiler::new(graph); + let raw = compiler.compile_raw(power).unwrap(); + let optimized = compiler.get_sampler(power).unwrap(); + let mut context = SamplerContext::default(); + assert_eq!( + raw.sample_value(&mut context, [0; 3]).unwrap().to_bits(), + 0x8000_0000 + ); + assert_eq!( + optimized + .sample_value(&mut context, [0; 3]) + .unwrap() + .to_bits(), + 0 + ); +} diff --git a/crates/horizon-world/Cargo.toml b/crates/horizon-world/Cargo.toml new file mode 100644 index 000000000..f8fb09adf --- /dev/null +++ b/crates/horizon-world/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "horizon-world" +version = "0.1.0" +edition.workspace = true +license.workspace = true +rust-version.workspace = true +description = "Horizon vanilla world data, NBT, regions and chunk storage" + +[dependencies] +libm = "=0.2.16" +serde_json = { version = "1.0.151", features = ["raw_value"] } +horizon-core = { path = "../horizon-core" } +flate2 = { version = "1.1.10", default-features = false, features = ["rust_backend"] } +lz4_flex = { version = "0.14", default-features = false, features = ["std", "safe-encode", "safe-decode", "checked-decode"] } +xxhash-rust = { version = "0.8.19", features = ["xxh32"] } + +[[bin]] +name = "horizon-world" +path = "src/main.rs" + +[[bin]] +name = "horizon-worldgen-parity" +path = "src/bin/worldgen_parity.rs" diff --git a/crates/horizon-world/examples/active_effect_tick_fixture.rs b/crates/horizon-world/examples/active_effect_tick_fixture.rs new file mode 100644 index 000000000..7a4ed3c29 --- /dev/null +++ b/crates/horizon-world/examples/active_effect_tick_fixture.rs @@ -0,0 +1,529 @@ +use horizon_core::{ + position::BlockPos, + random::{LegacyRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::{ + active_effect_tick::{TickError, TickHooks}, + active_effects::{ActiveEffects, EffectHooks}, + consume_effect::ConsumeEffect, + java_hash_map::CursorError, + java_hash_map::JavaKey, + status_effect::{BlendState, Details, EffectInstance}, + stored_consume::{ConsumeHooks, StoredConsume}, +}; +use serde_json::Value; +use std::{ + cmp::Ordering, + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone)] +struct Key { + id: usize, + hash: i32, + identity: i32, +} +impl PartialEq for Key { + fn eq(&self, other: &Self) -> bool { + self.id == other.id + } +} +impl Eq for Key {} +impl JavaKey for Key { + fn java_hash(&self) -> i32 { + self.hash + } + fn tie_break(&self, other: &Self) -> Ordering { + if self.identity <= other.identity { + Ordering::Less + } else { + Ordering::Greater + } + } +} +type Effect = EffectInstance<Key>; +type Storage = ActiveEffects<Key>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn fl(v: &Value, k: &str) -> f32 { + f32::from_bits(v[k].as_u64().unwrap() as u32) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { 0x7fc00000 } else { v.to_bits() } +} +fn details(v: &Value) -> Details { + Details { + duration: n(v, "duration"), + amplifier: n(v, "amplifier"), + ambient: v["ambient"].as_bool().unwrap(), + visible: v["visible"].as_bool().unwrap(), + show_icon: v["icon"].as_bool().unwrap(), + } +} +struct World<'a, R> { + random: [R; 2], + f: Value, + out: &'a mut dyn Write, + keys: Vec<Key>, + pool: Vec<Effect>, + ids: Vec<Effect>, + calls: i32, + changed: bool, +} +impl<R: RandomSource> World<'_, R> { + fn config(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn id(&mut self, e: &Effect) -> usize { + if let Some(i) = self.ids.iter().position(|v| v.same_reference(e)) { + i + } else { + self.ids.push(e.clone()); + self.ids.len() - 1 + } + } + fn reset(&mut self) { + let c = self.config().clone(); + if c["reseed"].as_bool().unwrap() { + for i in 0..2 { + self.random[i].set_seed(c["seeds"][i].as_i64().unwrap()); + } + } + for (i, v) in c["states"].as_array().unwrap().iter().enumerate() { + let mut e = self.pool[i].write(); + e.details = details(v); + e.blend = BlendState { + factor: fl(v, "factor"), + previous: fl(v, "previous"), + }; + } + } + fn all(&mut self, s: &Storage) { + writeln!(self.out, "state {} {}", self.calls, self.changed).unwrap(); + let mut roots = Vec::new(); + let entries = s + .entries + .entries() + .map(|(k, e)| { + let id = self.id(e); + roots.push(e.clone()); + format!("{}={id}", k.id) + }) + .collect::<Vec<_>>() + .join(","); + writeln!(self.out, "map {entries}").unwrap(); + for (i, e) in self.pool.clone().iter().enumerate() { + let id = self.id(e); + writeln!(self.out, "pool {i} {id}").unwrap(); + roots.push(e.clone()); + } + let mut seen = Vec::new(); + let mut i = 0; + while i < roots.len() { + let e = roots[i].clone(); + i += 1; + if seen.iter().any(|v: &Effect| v.same_reference(&e)) { + continue; + } + seen.push(e.clone()); + let id = self.id(&e); + let d = e.read(); + let h = d + .hidden + .as_ref() + .map(|h| { + roots.push(h.clone()); + self.id(h).to_string() + }) + .unwrap_or("none".into()); + writeln!( + self.out, + "node {id} {} {} {} {} {} {} {h} {} {}", + d.effect.id, + d.details.duration, + d.details.amplifier, + d.details.ambient, + d.details.visible, + d.details.show_icon, + bits(d.blend.factor), + bits(d.blend.previous) + ) + .unwrap(); + } + } + fn raw(&mut self, s: &mut Storage, op: &Value) { + let a = n(op, "a") as usize; + let b = n(op, "b") as usize; + match op["op"].as_str().unwrap() { + "put" => { + s.entries.put(self.keys[a].clone(), self.pool[b].clone()); + } + "drop" => { + s.entries.remove(&self.keys[a]); + } + "clear" => s.entries.clear(), + "copy" => self.pool[b] = self.pool[a].copy_instance(), + "alias" => self.pool[b] = self.pool[a].clone(), + _ => panic!("raw op"), + } + } + fn event(&mut self, s: &mut Storage, name: String) -> Result<(), &'static str> { + writeln!(self.out, "event {name}").unwrap(); + let i = self.calls; + self.calls += 1; + self.all(s); + if i == n(&self.f, "fail") { + return Err("callback"); + } + if i == n(&self.f, "cme") { + return Err("concurrent"); + } + if i == n(&self.f, "mutate") { + self.changed = true; + self.reset(); + for op in self.f["mutations"].as_array().unwrap().clone() { + self.raw(s, &op); + } + } + Ok(()) + } +} +impl<R: RandomSource> EffectHooks<Key> for World<'_, R> { + type Error = &'static str; + type Source = i32; + type Level = i32; + fn can_be_affected(&mut self, s: &mut Storage, e: Effect) -> Result<bool, Self::Error> { + let i = self.id(&e); + self.event(s, format!("eligible {i}"))?; + Ok(self.config()["allow"].as_bool().unwrap()) + } + fn on_added( + &mut self, + s: &mut Storage, + e: Effect, + source: Option<i32>, + ) -> Result<(), Self::Error> { + let i = self.id(&e); + self.event(s, format!("added {i} {}", source.unwrap_or(-1))) + } + fn on_updated( + &mut self, + s: &mut Storage, + e: Effect, + reapply: bool, + source: Option<i32>, + ) -> Result<(), Self::Error> { + let i = self.id(&e); + self.event(s, format!("updated {i} {reapply} {}", source.unwrap_or(-1))) + } + fn effect_added(&mut self, s: &mut Storage, e: Key, amp: i32) -> Result<(), Self::Error> { + self.event(s, format!("effect-added {} {amp}", e.id)) + } + fn effect_started(&mut self, s: &mut Storage, e: Key, amp: i32) -> Result<(), Self::Error> { + self.event(s, format!("effect-started {} {amp}", e.id)) + } + fn level(&mut self, s: &mut Storage) -> Result<i32, Self::Error> { + self.event(s, "level".into())?; + Ok(n(self.config(), "level")) + } + fn is_client(&mut self, s: &mut Storage, l: i32) -> Result<bool, Self::Error> { + self.event(s, format!("client {l}"))?; + Ok(self.config()["client"].as_bool().unwrap()) + } + fn on_removed(&mut self, s: &mut Storage, es: Vec<Effect>) -> Result<(), Self::Error> { + let ids = es + .iter() + .map(|e| self.id(e).to_string()) + .collect::<Vec<_>>() + .join(","); + self.event(s, format!("removed {ids}")) + } + fn get_effect(&mut self, s: &mut Storage, key: Key) -> Result<Option<Effect>, Self::Error> { + self.event(s, format!("get {}", key.id))?; + Ok(s.get(&key)) + } + fn actor_removed(&self) -> bool { + self.config()["removed"].as_bool().unwrap() + } +} +impl<R: RandomSource> ConsumeHooks<Key, u8, Vec<Key>> for World<'_, R> { + type Random = usize; + type Rng = R; + type SoundCategory = i32; + fn get_random(&mut self, s: &mut Storage) -> Result<usize, Self::Error> { + self.event(s, "random".into())?; + Ok(n(self.config(), "random") as usize) + } + fn random_source(&mut self, r: usize) -> &mut R { + &mut self.random[r] + } + fn effect_set(&self, set: &Vec<Key>) -> Vec<Key> { + set.clone() + } + fn block_position(&mut self, s: &mut Storage) -> Result<BlockPos, Self::Error> { + self.event(s, "position".into())?; + let p = &self.config()["position"]; + Ok(BlockPos::new( + p[0].as_i64().unwrap() as i32, + p[1].as_i64().unwrap() as i32, + p[2].as_i64().unwrap() as i32, + )) + } + fn sound_category(&mut self, s: &mut Storage) -> Result<i32, Self::Error> { + self.event(s, "category".into())?; + Ok(n(self.config(), "category")) + } + fn play_sound( + &mut self, + storage: &mut Storage, + level: i32, + p: BlockPos, + sound: u8, + category: i32, + ) -> Result<(), Self::Error> { + self.event( + storage, + format!("sound {level} {} {} {} {sound} {category}", p.x, p.y, p.z), + ) + } +} +impl<R: RandomSource> TickHooks<Key> for World<'_, R> { + type Rng = R; + type Particle = i32; + fn is_server_level(&self, level: i32) -> bool { + self.f["servers"][level as usize].as_bool().unwrap() + } + fn is_concurrent_modification(&self, e: &Self::Error) -> bool { + *e == "concurrent" + } + fn actor_tick_count(&self) -> i32 { + n(self.config(), "tick") + } + fn should_apply( + &mut self, + s: &mut Storage, + effect: Key, + time: i32, + amp: i32, + ) -> Result<bool, Self::Error> { + self.event(s, format!("should {} {time} {amp}", effect.id))?; + Ok(self.config()["should"].as_bool().unwrap()) + } + fn apply_tick( + &mut self, + s: &mut Storage, + effect: Key, + level: i32, + amp: i32, + ) -> Result<bool, Self::Error> { + self.event(s, format!("apply {} {level} {amp}", effect.id))?; + Ok(self.config()["apply"].as_bool().unwrap()) + } + fn advance_ticks(&mut self, s: &mut Storage, effect: Key) -> Result<i32, Self::Error> { + self.event(s, format!("advance {}", effect.id))?; + Ok(n(self.config(), "advance")) + } + fn duration_ticks( + &mut self, + s: &mut Storage, + effect: Key, + blending_in: bool, + ) -> Result<i32, Self::Error> { + self.event(s, format!("blend-duration {} {blending_in}", effect.id))?; + Ok(n( + self.config(), + if blending_in { "blend_in" } else { "blend_out" }, + )) + } + fn particles(&self) -> Vec<i32> { + self.config()["particles"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_i64().unwrap() as i32) + .collect() + } + fn ambient(&self) -> bool { + self.config()["ambience"].as_bool().unwrap() + } + fn invisible(&mut self, s: &mut Storage) -> Result<bool, Self::Error> { + self.event(s, "invisible".into())?; + Ok(self.config()["invisible"].as_bool().unwrap()) + } + fn random_source(&mut self) -> &mut R { + let r = n(self.config(), "random") as usize; + &mut self.random[r] + } + fn random_x(&mut self, s: &mut Storage, scale: f64) -> Result<f64, Self::Error> { + assert_eq!(scale, 0.5); + self.event(s, "x".into())?; + Ok(f64::from_bits( + self.config()["coordinates"][0].as_u64().unwrap(), + )) + } + fn random_y(&mut self, s: &mut Storage) -> Result<f64, Self::Error> { + self.event(s, "y".into())?; + Ok(f64::from_bits( + self.config()["coordinates"][1].as_u64().unwrap(), + )) + } + fn random_z(&mut self, s: &mut Storage, scale: f64) -> Result<f64, Self::Error> { + assert_eq!(scale, 0.5); + self.event(s, "z".into())?; + Ok(f64::from_bits( + self.config()["coordinates"][2].as_u64().unwrap(), + )) + } + fn add_particle( + &mut self, + s: &mut Storage, + level: i32, + particle: i32, + p: [f64; 3], + ) -> Result<(), Self::Error> { + let bits = |v: f64| { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } + }; + self.event( + s, + format!( + "particle {level} {particle} {} {} {}", + bits(p[0]), + bits(p[1]), + bits(p[2]) + ), + ) + } +} +fn run<R: RandomSource>(f: Value, out: &mut dyn Write, make: fn(i64) -> R) { + let random = std::array::from_fn(|i| make(f["seeds"][i].as_i64().unwrap())); + let keys = f["hashes"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(id, v)| Key { + id, + hash: v.as_i64().unwrap() as i32, + identity: f["identities"][id].as_i64().unwrap() as i32, + }) + .collect::<Vec<_>>(); + let mut pool: Vec<Effect> = Vec::new(); + for v in f["initial"]["states"].as_array().unwrap() { + let h = n(v, "hidden"); + pool.push(Effect::new( + keys[n(v, "key") as usize].clone(), + details(v), + (h >= 0).then(|| pool[h as usize].clone()), + )); + } + let mut w = World { + random, + f, + out, + keys, + pool, + ids: Vec::new(), + calls: 0, + changed: false, + }; + let mut s = Storage::default(); + w.reset(); + for op in w.f["setup"].as_array().unwrap().clone() { + w.raw(&mut s, &op); + } + w.all(&s); + for op in w.f["ops"].as_array().unwrap().clone() { + let a = n(&op, "a") as usize; + let b = n(&op, "b") as usize; + let source = n(&op, "source"); + let source = (source >= 0).then_some(source); + let result: Result<String, &'static str> = match op["op"].as_str().unwrap() { + "tick" => s.tick(&mut w).map(|_| "ok".into()).map_err(|e| match e { + TickError::Callback(e) => e, + TickError::Iterator(CursorError::ConcurrentModification) => "concurrent", + other => panic!("{other:?}"), + }), + "apply-status" | "remove-status" | "clear-status" | "sound" => { + let list = op["list"].as_array().unwrap(); + let effect: ConsumeEffect<Key, u8> = match op["op"].as_str().unwrap() { + "apply-status" => ConsumeEffect::ApplyStatus { + effects: list + .iter() + .map(|i| w.pool[i.as_u64().unwrap() as usize].clone()) + .collect(), + probability: fl(&op, "probability"), + }, + "remove-status" => ConsumeEffect::RemoveStatus( + list.iter() + .map(|i| w.keys[i.as_u64().unwrap() as usize].clone()) + .collect(), + ), + "clear-status" => ConsumeEffect::ClearStatus, + _ => ConsumeEffect::PlaySound(n(&op, "sound") as u8), + }; + effect + .apply( + &mut StoredConsume { + effects: &mut s, + world: &mut w, + }, + n(&op, "level"), + ) + .map(|v| v.to_string()) + } + "add" => s + .add(w.pool[a].clone(), source, &mut w) + .map(|v| v.to_string()), + "force" => s + .force_add(w.pool[a].clone(), source, &mut w) + .map(|_| "ok".into()), + "remove" => s.remove(&w.keys[a].clone(), &mut w).map(|v| v.to_string()), + "remove-raw" => Ok(s + .remove_no_update(&w.keys[a]) + .map(|e| w.id(&e).to_string()) + .unwrap_or("none".into())), + "all" => s.remove_all(&mut w).map(|v| v.to_string()), + "has" => Ok(s.has(&w.keys[a]).to_string()), + "get" => { + let key = w.keys[a].clone(); + EffectHooks::get_effect(&mut w, &mut s, key) + .map(|e| e.map(|e| w.id(&e).to_string()).unwrap_or("none".into())) + } + "blend" => s + .blend_factor(w.keys[a].clone(), fl(&op, "partial"), &mut w) + .map(|v| bits(v).to_string()), + "put" | "drop" | "clear" | "copy" | "alias" => { + w.raw(&mut s, &op); + Ok("ok".into()) + } + _ => panic!("operation {b}"), + }; + writeln!(w.out, "result {}", result.unwrap_or_else(str::to_string)).unwrap(); + w.all(&s); + } + for (i, r) in w.random.iter_mut().enumerate() { + writeln!(w.out, "random {i} {} {}", r.next_long(), r.next_long()).unwrap(); + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let side = std::env::args().nth(2).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join(format!("rust-{side}.txt")))?); + for line in fs::read_to_string(dir.join(format!("inputs-{side}.txt")))?.lines() { + let f: Value = serde_json::from_str(line)?; + if f["xor"].as_bool().unwrap() { + run(f, &mut out, XoroshiroRandom::new); + } else { + run(f, &mut out, LegacyRandom::new); + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/active_effects_fixture.rs b/crates/horizon-world/examples/active_effects_fixture.rs new file mode 100644 index 000000000..dba99cccd --- /dev/null +++ b/crates/horizon-world/examples/active_effects_fixture.rs @@ -0,0 +1,316 @@ +use horizon_world::{ + active_effects::{ActiveEffects, EffectHooks}, + java_hash_map::JavaKey, + status_effect::{BlendState, Details, EffectInstance}, +}; +use serde_json::Value; +use std::{ + cmp::Ordering, + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone)] +struct Key { + id: usize, + hash: i32, + identity: i32, +} +impl PartialEq for Key { + fn eq(&self, other: &Self) -> bool { + self.id == other.id + } +} +impl Eq for Key {} +impl JavaKey for Key { + fn java_hash(&self) -> i32 { + self.hash + } + fn tie_break(&self, other: &Self) -> Ordering { + if self.identity <= other.identity { + Ordering::Less + } else { + Ordering::Greater + } + } +} +type Effect = EffectInstance<Key>; +type Storage = ActiveEffects<Key>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn fl(v: &Value, k: &str) -> f32 { + f32::from_bits(v[k].as_u64().unwrap() as u32) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { 0x7fc00000 } else { v.to_bits() } +} +fn details(v: &Value) -> Details { + Details { + duration: n(v, "duration"), + amplifier: n(v, "amplifier"), + ambient: v["ambient"].as_bool().unwrap(), + visible: v["visible"].as_bool().unwrap(), + show_icon: v["icon"].as_bool().unwrap(), + } +} +struct World<'a> { + f: Value, + out: &'a mut dyn Write, + keys: Vec<Key>, + pool: Vec<Effect>, + ids: Vec<Effect>, + calls: i32, + changed: bool, +} +impl World<'_> { + fn config(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn id(&mut self, e: &Effect) -> usize { + if let Some(i) = self.ids.iter().position(|v| v.same_reference(e)) { + i + } else { + self.ids.push(e.clone()); + self.ids.len() - 1 + } + } + fn reset(&mut self) { + let c = self.config().clone(); + for (i, v) in c["states"].as_array().unwrap().iter().enumerate() { + let mut e = self.pool[i].write(); + e.details = details(v); + e.blend = BlendState { + factor: fl(v, "factor"), + previous: fl(v, "previous"), + }; + } + } + fn all(&mut self, s: &Storage) { + writeln!(self.out, "state {} {}", self.calls, self.changed).unwrap(); + let mut roots = Vec::new(); + let entries = s + .entries + .entries() + .map(|(k, e)| { + let id = self.id(e); + roots.push(e.clone()); + format!("{}={id}", k.id) + }) + .collect::<Vec<_>>() + .join(","); + writeln!(self.out, "map {entries}").unwrap(); + for (i, e) in self.pool.clone().iter().enumerate() { + let id = self.id(e); + writeln!(self.out, "pool {i} {id}").unwrap(); + roots.push(e.clone()); + } + let mut seen = Vec::new(); + let mut i = 0; + while i < roots.len() { + let e = roots[i].clone(); + i += 1; + if seen.iter().any(|v: &Effect| v.same_reference(&e)) { + continue; + } + seen.push(e.clone()); + let id = self.id(&e); + let d = e.read(); + let h = d + .hidden + .as_ref() + .map(|h| { + roots.push(h.clone()); + self.id(h).to_string() + }) + .unwrap_or("none".into()); + writeln!( + self.out, + "node {id} {} {} {} {} {} {} {h} {} {}", + d.effect.id, + d.details.duration, + d.details.amplifier, + d.details.ambient, + d.details.visible, + d.details.show_icon, + bits(d.blend.factor), + bits(d.blend.previous) + ) + .unwrap(); + } + } + fn raw(&mut self, s: &mut Storage, op: &Value) { + let a = n(op, "a") as usize; + let b = n(op, "b") as usize; + match op["op"].as_str().unwrap() { + "put" => { + s.entries.put(self.keys[a].clone(), self.pool[b].clone()); + } + "drop" => { + s.entries.remove(&self.keys[a]); + } + "clear" => s.entries.clear(), + "copy" => self.pool[b] = self.pool[a].copy_instance(), + "alias" => self.pool[b] = self.pool[a].clone(), + _ => panic!("raw op"), + } + } + fn event(&mut self, s: &mut Storage, name: String) -> Result<(), &'static str> { + writeln!(self.out, "event {name}").unwrap(); + let i = self.calls; + self.calls += 1; + self.all(s); + if i == n(&self.f, "fail") { + return Err("callback"); + } + if i == n(&self.f, "mutate") { + self.changed = true; + self.reset(); + for op in self.f["mutations"].as_array().unwrap().clone() { + self.raw(s, &op); + } + } + Ok(()) + } +} +impl EffectHooks<Key> for World<'_> { + type Error = &'static str; + type Source = i32; + type Level = i32; + fn can_be_affected(&mut self, s: &mut Storage, e: Effect) -> Result<bool, Self::Error> { + let i = self.id(&e); + self.event(s, format!("eligible {i}"))?; + Ok(self.config()["allow"].as_bool().unwrap()) + } + fn on_added( + &mut self, + s: &mut Storage, + e: Effect, + source: Option<i32>, + ) -> Result<(), Self::Error> { + let i = self.id(&e); + self.event(s, format!("added {i} {}", source.unwrap_or(-1))) + } + fn on_updated( + &mut self, + s: &mut Storage, + e: Effect, + reapply: bool, + source: Option<i32>, + ) -> Result<(), Self::Error> { + let i = self.id(&e); + self.event(s, format!("updated {i} {reapply} {}", source.unwrap_or(-1))) + } + fn effect_added(&mut self, s: &mut Storage, e: Key, amp: i32) -> Result<(), Self::Error> { + self.event(s, format!("effect-added {} {amp}", e.id)) + } + fn effect_started(&mut self, s: &mut Storage, e: Key, amp: i32) -> Result<(), Self::Error> { + self.event(s, format!("effect-started {} {amp}", e.id)) + } + fn level(&mut self, s: &mut Storage) -> Result<i32, Self::Error> { + self.event(s, "level".into())?; + Ok(n(self.config(), "level")) + } + fn is_client(&mut self, s: &mut Storage, l: i32) -> Result<bool, Self::Error> { + self.event(s, format!("client {l}"))?; + Ok(self.config()["client"].as_bool().unwrap()) + } + fn on_removed(&mut self, s: &mut Storage, es: Vec<Effect>) -> Result<(), Self::Error> { + let ids = es + .iter() + .map(|e| self.id(e).to_string()) + .collect::<Vec<_>>() + .join(","); + self.event(s, format!("removed {ids}")) + } + fn get_effect(&mut self, s: &mut Storage, key: Key) -> Result<Option<Effect>, Self::Error> { + self.event(s, format!("get {}", key.id))?; + Ok(s.get(&key)) + } + fn actor_removed(&self) -> bool { + self.config()["removed"].as_bool().unwrap() + } +} +fn run(f: Value, out: &mut dyn Write) { + let keys = f["hashes"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(id, v)| Key { + id, + hash: v.as_i64().unwrap() as i32, + identity: f["identities"][id].as_i64().unwrap() as i32, + }) + .collect::<Vec<_>>(); + let mut pool: Vec<Effect> = Vec::new(); + for v in f["initial"]["states"].as_array().unwrap() { + let h = n(v, "hidden"); + pool.push(Effect::new( + keys[n(v, "key") as usize].clone(), + details(v), + (h >= 0).then(|| pool[h as usize].clone()), + )); + } + let mut w = World { + f, + out, + keys, + pool, + ids: Vec::new(), + calls: 0, + changed: false, + }; + let mut s = Storage::default(); + w.reset(); + for op in w.f["setup"].as_array().unwrap().clone() { + w.raw(&mut s, &op); + } + w.all(&s); + for op in w.f["ops"].as_array().unwrap().clone() { + let a = n(&op, "a") as usize; + let b = n(&op, "b") as usize; + let source = n(&op, "source"); + let source = (source >= 0).then_some(source); + let result: Result<String, &'static str> = match op["op"].as_str().unwrap() { + "add" => s + .add(w.pool[a].clone(), source, &mut w) + .map(|v| v.to_string()), + "force" => s + .force_add(w.pool[a].clone(), source, &mut w) + .map(|_| "ok".into()), + "remove" => s.remove(&w.keys[a].clone(), &mut w).map(|v| v.to_string()), + "remove-raw" => Ok(s + .remove_no_update(&w.keys[a]) + .map(|e| w.id(&e).to_string()) + .unwrap_or("none".into())), + "all" => s.remove_all(&mut w).map(|v| v.to_string()), + "has" => Ok(s.has(&w.keys[a]).to_string()), + "get" => { + let key = w.keys[a].clone(); + EffectHooks::get_effect(&mut w, &mut s, key) + .map(|e| e.map(|e| w.id(&e).to_string()).unwrap_or("none".into())) + } + "blend" => s + .blend_factor(w.keys[a].clone(), fl(&op, "partial"), &mut w) + .map(|v| bits(v).to_string()), + "put" | "drop" | "clear" | "copy" | "alias" => { + w.raw(&mut s, &op); + Ok("ok".into()) + } + _ => panic!("operation {b}"), + }; + writeln!(w.out, "result {}", result.unwrap_or_else(str::to_string)).unwrap(); + w.all(&s); + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let side = std::env::args().nth(2).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join(format!("rust-{side}.txt")))?); + for line in fs::read_to_string(dir.join(format!("inputs-{side}.txt")))?.lines() { + run(serde_json::from_str(line)?, &mut out); + } + Ok(()) +} diff --git a/crates/horizon-world/examples/anchor_fixture.rs b/crates/horizon-world/examples/anchor_fixture.rs new file mode 100644 index 000000000..c6c15e65e --- /dev/null +++ b/crates/horizon-world/examples/anchor_fixture.rs @@ -0,0 +1,71 @@ +//! Original comparison transport for generation bounds and vertical anchors. +use horizon_world::worldgen::anchor::{VerticalAnchor, WorldGenerationContext}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn anchor( + a: VerticalAnchor, + context: WorldGenerationContext, + out: &mut impl Write, +) -> io::Result<()> { + writeln!( + out, + "anchor {} {}", + a.resolve(context), + a.to_json().unwrap_or_else(|_| "error".to_owned()) + ) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let [min, height, sea] = std::array::from_fn(|i| f["context"][i].as_i64().unwrap() as i32); + let context = if let Some(g) = f.get("generator") { + WorldGenerationContext::with_generator( + min, + height, + g[0].as_i64().unwrap() as i32, + g[1].as_i64().unwrap() as i32, + g[2].as_i64().unwrap() as i32, + ) + } else { + WorldGenerationContext::new(min, height, sea) + }; + writeln!( + out, + "context {} {} {}", + context.min_y, context.height, context.sea_level + )?; + for a in [ + VerticalAnchor::BOTTOM, + VerticalAnchor::TOP, + VerticalAnchor::SEA_LEVEL, + ] { + anchor(a, context, &mut out)?; + } + for e in f["values"].as_array().unwrap() { + let v = e.as_i64().unwrap() as i32; + for a in [ + VerticalAnchor::Absolute(v), + VerticalAnchor::AboveBottom(v), + VerticalAnchor::BelowTop(v), + VerticalAnchor::RelativeToSeaLevel(v), + ] { + anchor(a, context, &mut out)?; + } + } + for e in f["json"].as_array().unwrap() { + match VerticalAnchor::from_json(e.as_str().unwrap()) { + Ok(a) => anchor(a, context, &mut out)?, + Err(_) => writeln!(out, "error")?, + } + } + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-world/examples/attribute_fixture.rs b/crates/horizon-world/examples/attribute_fixture.rs new file mode 100644 index 000000000..450400c21 --- /dev/null +++ b/crates/horizon-world/examples/attribute_fixture.rs @@ -0,0 +1,200 @@ +use horizon_world::attributes::{ + AttributeError, Definition, Instance, Modifier, Observer, Operation, Packed, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + f64::NAN.to_bits() + } else { + v.to_bits() + } +} +fn refs<'a>(mods: impl IntoIterator<Item = &'a Modifier>, pool: &[Modifier]) -> String { + let s = mods + .into_iter() + .map(|m| { + pool.iter() + .position(|p| p.same_identity(m)) + .unwrap() + .to_string() + }) + .collect::<Vec<_>>() + .join(","); + if s.is_empty() { "-".into() } else { s } +} +struct Callback<'a> { + out: &'a mut dyn Write, + target: usize, + calls: i64, + op: &'a Value, +} +impl Observer for Callback<'_> { + type Error = io::Error; + fn dirty(&mut self, a: &mut Instance) -> io::Result<()> { + writeln!( + self.out, + "dirty {} {:016x} {} {:016x} {} {}", + self.target, + bits(a.base_value()), + a.is_dirty(), + bits(a.cached_value()), + a.modifiers().len(), + a.permanent_modifiers().len() + )?; + let n = self.calls; + self.calls += 1; + if n == self.op["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected attribute observer failure")); + } + if self.op["read"].as_bool().unwrap() { + writeln!(self.out, "observed {:016x}", bits(a.value()))?; + } + Ok(()) + } +} +fn state(out: &mut dyn Write, id: usize, a: &Instance, pool: &[Modifier]) -> io::Result<()> { + writeln!( + out, + "state {id} {:016x} {} {:016x}", + bits(a.base_value()), + a.is_dirty(), + bits(a.cached_value()) + )?; + writeln!(out, "all {}", refs(a.modifiers(), pool))?; + writeln!(out, "permanent {}", refs(a.permanent_modifiers(), pool))?; + for op in Operation::ALL { + writeln!( + out, + "operation {} {}", + op as u8, + refs(a.operation_modifiers(op), pool) + )?; + } + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let definitions = f["definitions"] + .as_array() + .unwrap() + .iter() + .map(|v| { + let d = number(&v["default"]); + if v.get("min").is_some() { + Definition::ranged(d, number(&v["min"]), number(&v["max"])) + } else { + Ok(Definition::basic(d)) + } + }) + .collect::<io::Result<Vec<_>>>(); + let Ok(definitions) = definitions else { + writeln!(out, "definition error")?; + continue; + }; + let mut instances = [Instance::new(definitions[0]), Instance::new(definitions[1])]; + let pool = f["modifiers"] + .as_array() + .unwrap() + .iter() + .map(|v| { + Modifier::new( + v["id"].as_str().unwrap(), + number(&v["amount"]), + Operation::ALL[v["operation"].as_u64().unwrap() as usize], + ) + }) + .collect::<io::Result<Vec<_>>>()?; + let mut packed: Option<Packed> = None; + for op in f["ops"].as_array().unwrap() { + let target = op["target"].as_u64().unwrap() as usize; + let mut cb = Callback { + out: &mut out, + target, + calls: 0, + op, + }; + let m = || pool[op["modifier"].as_u64().unwrap() as usize].clone(); + let mods = || { + op["modifiers"] + .as_array() + .unwrap() + .iter() + .map(|v| pool[v.as_u64().unwrap() as usize].clone()) + .collect::<Vec<_>>() + }; + let result = match op["mode"].as_str().unwrap() { + "base" => instances[target].set_base_value(number(&op["base"]), &mut cb), + "add" => instances[target].add_transient(m(), &mut cb), + "update" => instances[target].add_or_update_transient(m(), &mut cb), + "permanent" => instances[target].add_permanent(m(), &mut cb), + "replace" => instances[target].add_or_replace_permanent(m(), &mut cb), + "remove" => { + let v = instances[target].remove(m().id(), &mut cb); + match v { + Ok(v) => { + writeln!(cb.out, "removed {v}")?; + Ok(()) + } + Err(e) => Err(e), + } + } + "clear" => instances[target].remove_all(&mut cb), + "copy" => { + let source = op["source"].as_u64().unwrap() as usize; + if source == target { + instances[target].replace_from_self(&mut cb) + } else { + let snapshot = instances[source].clone(); + instances[target].replace_from(&snapshot, &mut cb) + } + } + "pack" => { + let p = instances[target].pack(); + writeln!( + cb.out, + "packed {:016x} {}", + bits(p.base), + refs(&p.modifiers, &pool) + )?; + packed = Some(p); + Ok(()) + } + "unpack" => instances[target].apply(packed.as_ref().unwrap(), &mut cb), + "apply" => instances[target].apply( + &Packed { + base: number(&op["base"]), + modifiers: mods(), + }, + &mut cb, + ), + "many" => instances[target].add_permanent_many(mods(), &mut cb), + "value" => { + writeln!(cb.out, "value {:016x}", bits(instances[target].value()))?; + Ok(()) + } + _ => panic!("fixture mode"), + }; + match result { + Ok(()) => writeln!(cb.out, "result ok")?, + Err(AttributeError::DuplicateModifier(_)) => writeln!(cb.out, "error duplicate")?, + Err(AttributeError::Observer(_)) => writeln!(cb.out, "error observer")?, + }; + state(cb.out, 0, &instances[0], &pool)?; + state(cb.out, 1, &instances[1], &pool)?; + writeln!(cb.out, "calls {}", cb.calls)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/attribute_health_fixture.rs b/crates/horizon-world/examples/attribute_health_fixture.rs new file mode 100644 index 000000000..3bf0d8d75 --- /dev/null +++ b/crates/horizon-world/examples/attribute_health_fixture.rs @@ -0,0 +1,315 @@ +use horizon_world::{ + attribute_health::{AttributeHealth, HealthAttributes, HealthError, HealthObserver}, + attributes::{ + Modifier, Operation, + entity::{AttributeId, Catalog, EntityAttributes}, + live::{Key, LiveAttributes}, + }, + food::{Difficulty, FoodData, FoodWorld}, + living_health::SyncedFloat, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, + sync::Arc, +}; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +fn double_bits(v: f64) -> u64 { + if v.is_nan() { + f64::NAN.to_bits() + } else { + v.to_bits() + } +} +struct Observer<'a> { + out: &'a mut dyn Write, + calls: i64, + fail: i64, +} +impl Observer<'_> { + fn effect(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.fail { + Err(io::Error::other("injected effect failure")) + } else { + Ok(()) + } + } +} +impl HealthObserver for Observer<'_> { + type Error = io::Error; + fn updated(&mut self, h: &mut SyncedFloat) -> io::Result<()> { + self.effect(&format!("updated {:08x}", bits(h.value()))) + } +} +// This fixture observes health/food values, not cross-attribute hash order. +// Live map/queue order is checked separately with actual JVM hash sequences. +trait TestAttributes: HealthAttributes<Error: std::fmt::Debug> + Sized { + fn create(catalog: &Arc<Catalog>, entity: &str) -> Self; + fn set_attribute(&mut self, key: Self::Key, value: f64); + fn update_attribute(&mut self, key: Self::Key, modifier: Modifier); + fn remove_attribute(&mut self, key: Self::Key, id: &str); + fn reset_attribute(&mut self, key: Self::Key); +} +impl TestAttributes for EntityAttributes { + fn create(catalog: &Arc<Catalog>, entity: &str) -> Self { + catalog.create(entity).unwrap() + } + fn set_attribute(&mut self, key: AttributeId, value: f64) { + self.edit(key, |a, o| a.set_base_value(value, o)) + .unwrap() + .unwrap(); + } + fn update_attribute(&mut self, key: AttributeId, modifier: Modifier) { + self.edit(key, |a, o| a.add_or_update_transient(modifier, o)) + .unwrap() + .unwrap(); + } + fn remove_attribute(&mut self, key: AttributeId, id: &str) { + self.edit(key, |a, o| a.remove(id, o)).unwrap().unwrap(); + } + fn reset_attribute(&mut self, key: AttributeId) { + self.reset_base(key); + } +} +type Live = LiveAttributes<Box<dyn FnMut() -> i32>>; +impl TestAttributes for Live { + fn create(catalog: &Arc<Catalog>, entity: &str) -> Self { + let hashes: Vec<_> = (0..catalog.attributes().count()) + .map(|i| i as i32) + .collect(); + let mut identity = 0; + Self::new( + catalog.clone(), + entity, + &hashes, + Box::new(move || { + identity += 1; + identity + }), + ) + .unwrap() + } + fn set_attribute(&mut self, key: Key, value: f64) { + let handle = self.get_instance(Some(key)).unwrap().unwrap(); + self.edit(&handle, |a, o| a.set_base_value(value, o)) + .unwrap(); + } + fn update_attribute(&mut self, key: Key, modifier: Modifier) { + let handle = self.get_instance(Some(key)).unwrap().unwrap(); + self.edit(&handle, |a, o| a.add_or_update_transient(modifier, o)) + .unwrap(); + } + fn remove_attribute(&mut self, key: Key, id: &str) { + let handle = self.get_instance(Some(key)).unwrap().unwrap(); + self.edit(&handle, |a, o| a.remove(id, o)).unwrap(); + } + fn reset_attribute(&mut self, key: Key) { + self.reset_base(Some(key)).unwrap(); + } +} +struct World<'a, A> { + attributes: A, + health: SyncedFloat, + absorption: f32, + dead: bool, + regen: bool, + difficulty: Difficulty, + observer: Observer<'a>, +} +impl<'a, A: TestAttributes> World<'a, A> { + fn binding(&mut self) -> AttributeHealth<'_, Observer<'a>, A> { + AttributeHealth::new( + &mut self.attributes, + &mut self.health, + &mut self.absorption, + self.dead, + &mut self.observer, + ) + .unwrap() + } +} +impl<A: TestAttributes> FoodWorld for World<'_, A> { + type Error = HealthError<io::Error, A::Error>; + type Level = (); + fn level(&mut self, _: &mut FoodData) -> Result<(), Self::Error> { + Ok(()) + } + fn difficulty(&mut self, _: (), _: &mut FoodData) -> Result<Difficulty, Self::Error> { + Ok(self.difficulty) + } + fn natural_regeneration(&mut self, _: (), _: &mut FoodData) -> Result<bool, Self::Error> { + Ok(self.regen) + } + fn is_hurt(&mut self, _: &mut FoodData) -> Result<bool, Self::Error> { + self.binding().is_hurt() + } + fn heal(&mut self, _: &mut FoodData, v: f32) -> Result<(), Self::Error> { + self.binding().heal(v) + } + fn health(&mut self, _: &mut FoodData) -> Result<f32, Self::Error> { + Ok(self.health.value()) + } + fn hurt_starvation(&mut self, _: (), _: &mut FoodData, v: f32) -> Result<(), Self::Error> { + self.observer + .effect(&format!("starve {:08x}", bits(v))) + .map_err(HealthError::Observer) + } +} +fn run<A: TestAttributes>(dir: &Path, output: &str) -> Result<(), Box<dyn std::error::Error>> { + let mut out = io::BufWriter::new(fs::File::create(dir.join(output))?); + let catalog = Arc::new(Catalog::from_json(&serde_json::from_str( + &fs::read_to_string(dir.join("catalog.json"))?, + )?)?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut w = World { + attributes: A::create(&catalog, f["entity"].as_str().unwrap()), + health: SyncedFloat::new(single(&f["health"])), + absorption: single(&f["absorption"]), + dead: f["dead"].as_bool().unwrap(), + regen: f["regen"].as_bool().unwrap(), + difficulty: [ + Difficulty::Peaceful, + Difficulty::Easy, + Difficulty::Normal, + Difficulty::Hard, + ][f["difficulty"].as_u64().unwrap() as usize], + observer: Observer { + out: &mut out, + calls: 0, + fail: f["fail"].as_i64().unwrap(), + }, + }; + let keys = [ + w.attributes + .health_attribute_key("minecraft:max_health") + .unwrap(), + w.attributes + .health_attribute_key("minecraft:max_absorption") + .unwrap(), + ]; + let t = &f["food"]; + let mut food = FoodData { + food: t["food"].as_i64().unwrap() as i32, + saturation: single(&t["saturation"]), + exhaustion: single(&t["exhaustion"]), + timer: t["timer"].as_i64().unwrap() as i32, + }; + for op in f["ops"].as_array().unwrap() { + let v = single(&op["value"]); + let key = keys[op["attribute"].as_u64().unwrap() as usize].clone(); + let result = match op["mode"].as_str().unwrap() { + "base" => { + w.attributes.set_attribute(key, number(&op["amount"])); + Ok(()) + } + "add" => { + let m = Modifier::new( + op["id"].as_str().unwrap(), + number(&op["amount"]), + Operation::ALL[op["operation"].as_u64().unwrap() as usize], + )?; + w.attributes.update_attribute(key, m); + Ok(()) + } + "remove" => { + w.attributes + .remove_attribute(key, op["id"].as_str().unwrap()); + Ok(()) + } + "reset" => { + w.attributes.reset_attribute(key); + Ok(()) + } + "set" => w.binding().set_health(v), + "heal" => w.binding().heal(v), + "absorption" => w.binding().set_absorption(v), + "hurt" => w.binding().is_hurt().and_then(|v| { + writeln!(w.observer.out, "bool {v}").map_err(HealthError::Observer) + }), + "dead" => w.binding().is_dead_or_dying().and_then(|v| { + writeln!(w.observer.out, "bool {v}").map_err(HealthError::Observer) + }), + "tick" => food.tick(&mut w), + "eat" => { + food.eat(op["nutrition"].as_i64().unwrap() as i32, v); + Ok(()) + } + "exhaust" => { + food.add_exhaustion(v); + Ok(()) + } + "pack" => writeln!( + w.observer.out, + "packed {}", + w.health + .take_dirty() + .map(|v| format!("{:08x}", bits(v))) + .unwrap_or_else(|| "none".into()) + ) + .map_err(HealthError::Observer), + _ => panic!("mode"), + }; + writeln!( + w.observer.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!( + w.observer.out, + "state {:08x} {} {} {:08x} {} {:08x} {:08x} {} {}", + bits(w.health.value()), + w.health.is_dirty(), + w.health.is_default(), + bits(w.absorption), + food.food, + bits(food.saturation), + bits(food.exhaustion), + food.timer, + w.observer.calls + )?; + writeln!( + w.observer.out, + "limits {:016x} {:016x}", + double_bits( + w.attributes + .health_attribute_value(keys[0].clone()) + .unwrap() + ), + double_bits( + w.attributes + .health_attribute_value(keys[1].clone()) + .unwrap() + ) + )?; + } + } + Ok(()) +} + +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + if std::env::args().nth(2).as_deref() == Some("live") { + run::<Live>(dir, "rust-live.txt") + } else { + run::<EntityAttributes>(dir, "rust.txt") + } +} diff --git a/crates/horizon-world/examples/attribute_map_queries_fixture.rs b/crates/horizon-world/examples/attribute_map_queries_fixture.rs new file mode 100644 index 000000000..28ee0c73a --- /dev/null +++ b/crates/horizon-world/examples/attribute_map_queries_fixture.rs @@ -0,0 +1,504 @@ +// Reuse the concrete attribute fixture's arena, supplier and observer binding. +#[allow(dead_code)] +mod integration { + include!("stored_effect_attributes_fixture.rs"); + + use horizon_world::{ + active_effects::{ActiveEffects, EffectHooks}, + effect_notifications::{self as notify, EffectPacket, NotificationWorld}, + java_hash_map::JavaKey, + object_open_set::ObjectOpenSet, + status_effect::{Details, EffectInstance}, + stored_effect_attributes::{self as stored, AttributeAccess}, + }; + impl AttributeAccess<Key, Handle> for World { + type Error = Stop; + fn create_instance( + &mut self, + _: &mut Definitions<Key>, + map: &mut Map, + key: Option<Key>, + ) -> Result<Option<Handle>, Stop> { + self.create(map, key) + } + fn get_instance( + &mut self, + _: &mut Definitions<Key>, + map: &mut Map, + key: Option<Key>, + ) -> Result<Option<Handle>, Stop> { + self.get(map, key) + } + fn remove_modifier( + &mut self, + _: &mut Definitions<Key>, + map: &mut Map, + h: &Handle, + id: &str, + ) -> Result<(), Stop> { + self.edit(map, h, |a, cb| a.remove(id, cb)).map(|_| ()) + } + fn add_permanent( + &mut self, + _: &mut Definitions<Key>, + map: &mut Map, + h: &Handle, + modifier: Modifier, + ) -> Result<(), Stop> { + self.edit(map, h, |a, cb| a.add_permanent(modifier, cb)) + } + } + #[derive(Clone, PartialEq, Eq)] + struct EffectKey; + impl JavaKey for EffectKey { + fn java_hash(&self) -> i32 { + 0 + } + fn tie_break(&self, _: &Self) -> std::cmp::Ordering { + std::cmp::Ordering::Less + } + } + struct Entity<'a> { + world: &'a mut World, + map: &'a mut Map, + definitions: &'a mut Definitions<Key>, + } + type Storage = ActiveEffects<EffectKey>; + type Effect = EffectInstance<EffectKey>; + impl EffectHooks<EffectKey> for Entity<'_> { + type Error = Stop; + type Source = (); + type Level = (); + fn can_be_affected(&mut self, _: &mut Storage, _: Effect) -> Result<bool, Stop> { + Ok(true) + } + fn on_added(&mut self, s: &mut Storage, e: Effect, _: Option<()>) -> Result<(), Stop> { + notify::on_added(s, &e, self) + } + fn on_updated( + &mut self, + s: &mut Storage, + e: Effect, + apply: bool, + _: Option<()>, + ) -> Result<(), Stop> { + notify::on_updated(s, &e, apply, self) + } + fn on_removed(&mut self, s: &mut Storage, es: Vec<Effect>) -> Result<(), Stop> { + notify::on_removed(s, &es, self) + } + fn effect_added(&mut self, _: &mut Storage, _: EffectKey, _: i32) -> Result<(), Stop> { + Ok(()) + } + fn effect_started(&mut self, _: &mut Storage, _: EffectKey, _: i32) -> Result<(), Stop> { + Ok(()) + } + fn level(&mut self, _: &mut Storage) -> Result<(), Stop> { + self.world.event(self.map, None, "level".into()) + } + fn is_client(&mut self, _: &mut Storage, _: ()) -> Result<bool, Stop> { + self.world.event(self.map, None, "client".into())?; + Ok(self.world.op["client"].as_bool().unwrap_or(false)) + } + fn actor_removed(&self) -> bool { + false + } + } + impl NotificationWorld<EffectKey> for Entity<'_> { + type Attributes = (); + type UpdateSet = (); + type AttributeInstance = Handle; + type Attribute = Key; + type Passenger = (); + type Connection = (); + fn attributes(&mut self, _: &mut Storage) -> Result<(), Stop> { + self.world.event(self.map, None, "attributes".into()) + } + fn add_modifiers( + &mut self, + _: &mut Storage, + _: EffectKey, + _: (), + amp: i32, + ) -> Result<(), Stop> { + stored::add(self.definitions, self.map, self.world, amp).map_err(effect_error) + } + fn remove_modifiers(&mut self, _: &mut Storage, _: EffectKey, _: ()) -> Result<(), Stop> { + stored::remove(self.definitions, self.map, self.world).map_err(effect_error) + } + fn pending_updates(&mut self, _: &mut Storage, _: ()) -> Result<(), Stop> { + Ok(()) + } + fn update_set(&self, _: ()) -> &ObjectOpenSet<Handle> { + &self.map.updates + } + fn update_set_mut(&mut self, _: ()) -> &mut ObjectOpenSet<Handle> { + &mut self.map.updates + } + fn iterator_error(e: CursorError) -> Stop { + match e { + CursorError::IndexOutOfBounds => Stop::Bounds, + _ => Stop::Null, + } + } + fn attribute_of(&mut self, _: &mut Storage, h: Option<Handle>) -> Result<Key, Stop> { + let h = h.ok_or(Stop::Null)?; + Ok(self.world.instances[h.id].key.clone()) + } + fn attribute_updated(&mut self, _: &mut Storage, key: Key) -> Result<(), Stop> { + self.world + .event(self.map, None, format!("updated {}", key.id)) + } + fn passengers(&self) -> Vec<()> { + Vec::new() + } + fn is_server_player(&self, _: ()) -> bool { + false + } + fn connection(&self, _: ()) {} + fn entity_id(&mut self, _: &mut Storage) -> Result<i32, Stop> { + Ok(0) + } + fn send_packet( + &mut self, + _: &mut Storage, + _: (), + _: EffectPacket<EffectKey>, + ) -> Result<(), Stop> { + Ok(()) + } + } + + use horizon_world::attribute_map::{ModifierValueError, QueryWorld, ValueKind}; + impl QueryWorld<Key, Handle> for World { + type Error = Stop; + fn supplier_has_attribute(&mut self, _: &mut Map, key: Option<Key>) -> Result<bool, Stop> { + Ok(key.is_some_and(|k| self.suppliers[k.id].is_some())) + } + fn supplier_has_modifier( + &mut self, + _: &mut Map, + key: Option<Key>, + id: &str, + ) -> Result<bool, Stop> { + Ok(key + .and_then(|k| self.suppliers[k.id].as_ref()) + .is_some_and(|a| a.modifier(id).is_some())) + } + fn supplier_value( + &mut self, + _: &mut Map, + key: Option<Key>, + kind: ValueKind, + ) -> Result<f64, Stop> { + let k = key.ok_or(Stop::Null)?; + let a = self.suppliers[k.id].as_mut().ok_or(Stop::Duplicate)?; + Ok(match kind { + ValueKind::Computed => a.value(), + ValueKind::Base => a.base_value(), + }) + } + fn supplier_modifier_value( + &mut self, + _: &mut Map, + key: Option<Key>, + id: &str, + ) -> Result<f64, Stop> { + let k = key.ok_or(Stop::Null)?; + self.suppliers[k.id] + .as_ref() + .and_then(|a| a.modifier(id)) + .map(|m| m.amount()) + .ok_or(Stop::Duplicate) + } + fn instance_value(&mut self, _: &mut Map, h: Handle, kind: ValueKind) -> Result<f64, Stop> { + let a = self.instances[h.id].value.as_mut().unwrap(); + Ok(match kind { + ValueKind::Computed => a.value(), + ValueKind::Base => a.base_value(), + }) + } + fn instance_modifier( + &mut self, + _: &mut Map, + h: Handle, + id: &str, + ) -> Result<Option<f64>, Stop> { + Ok(self.instances[h.id] + .value + .as_ref() + .unwrap() + .modifier(id) + .map(|m| m.amount())) + } + fn set_instance_base(&mut self, map: &mut Map, h: Handle, value: f64) -> Result<(), Stop> { + self.edit(map, &h, |a, cb| a.set_base_value(value, cb)) + } + } + impl World { + fn prototype_states(&mut self) { + for id in 0..self.suppliers.len() { + let Some(a) = self.suppliers[id].as_ref() else { + self.logs.push(format!("prototype {id} absent")); + continue; + }; + let prefix = format!( + "prototype {id} {} {} {}", + bits(a.base_value()), + a.is_dirty(), + bits(a.cached_value()) + ); + let all = a.modifiers().to_vec(); + let permanent = a.permanent_modifiers().to_vec(); + let all = self.refs(&all); + let permanent = self.refs(&permanent); + self.logs.push(format!("{prefix} | {all} | {permanent}")); + } + } + fn prototype_edit(&mut self, op: &Value) -> Result<(), Stop> { + let key = self.key(op).ok_or(Stop::Null)?; + let a = self.suppliers[key.id].as_mut().ok_or(Stop::Null)?; + let template = &self.templates[op["template"].as_u64().unwrap() as usize]; + match op["op"].as_str().unwrap() { + "prototype-base" => a.set_base_value(number(&op["value"]), &mut Silent), + "prototype-permanent" => a.add_permanent( + template.create(op["amplifier"].as_i64().unwrap() as i32), + &mut Silent, + ), + _ => a.remove(template.id(), &mut Silent).map(|_| ()), + } + .map_err(attribute_error) + } + } + pub fn run() -> Result<(), Box<dyn std::error::Error>> { + let args: Vec<_> = std::env::args().collect(); + let dir = Path::new(&args[1]); + let mut out = + io::BufWriter::new(fs::File::create(dir.join(format!("rust-{}.txt", args[2])))?); + for line in fs::read_to_string(dir.join(format!("inputs-{}.txt", args[2])))?.lines() { + let f: Value = serde_json::from_str(line)?; + let keys: Vec<_> = f["hashes"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(id, h)| Key { + id, + hash: h.as_i64().unwrap() as i32, + }) + .collect(); + let defaults: Vec<_> = f["defaults"] + .as_array() + .unwrap() + .iter() + .map(number) + .collect(); + let suppliers = f["bases"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(id, v)| { + if v.is_null() { + None + } else { + let mut a = Instance::new(Definition::basic(defaults[id])); + a.set_base_value(number(v), &mut Silent).unwrap(); + Some(a) + } + }) + .collect(); + let templates = f["templates"] + .as_array() + .unwrap() + .iter() + .map(|v| { + Template::new( + v["id"].as_str().unwrap(), + number(&v["amount"]), + Operation::ALL[v["operation"].as_u64().unwrap() as usize], + ) + }) + .collect::<io::Result<Vec<_>>>()?; + let syncable = f["syncable"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_bool().unwrap()) + .collect(); + let hashes = f["instance_hashes"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_i64().unwrap() as i32) + .collect(); + let mut world = World { + keys, + defaults, + suppliers, + templates, + syncable, + hashes, + instances: Vec::new(), + pool: Vec::new(), + calls: 0, + changed: false, + op: Value::Null, + logs: Vec::new(), + }; + let mut map = Map::default(); + let mut defs = Definitions::default(); + let mut storage = ActiveEffects::default(); + for op in f["definitions"].as_array().unwrap() { + effects::add_definition( + &mut defs, + world.key(op), + world.templates[op["template"].as_u64().unwrap() as usize].clone(), + ); + } + for op in f["ops"].as_array().unwrap() { + world.op = op.clone(); + world.calls = 0; + world.changed = false; + let result = match op["op"].as_str().unwrap() { + "attribute-has" => map + .has_attribute(world.key(op), &mut world) + .map(|v| v.to_string()), + "modifier-has" => { + let id = world.templates[op["template"].as_u64().unwrap() as usize] + .id() + .to_owned(); + map.has_modifier(world.key(op), &id, &mut world) + .map(|v| v.to_string()) + } + "attribute-value" | "attribute-base" => { + let kind = if op["op"] == "attribute-value" { + ValueKind::Computed + } else { + ValueKind::Base + }; + map.value(world.key(op), kind, &mut world).map(bits) + } + "modifier-value" => { + let id = world.templates[op["template"].as_u64().unwrap() as usize] + .id() + .to_owned(); + map.modifier_value(world.key(op), &id, &mut world) + .map(bits) + .map_err(|e| match e { + ModifierValueError::World(e) => e, + ModifierValueError::MissingInstanceModifier => Stop::Null, + }) + } + "reset-base" => map + .reset_base(world.key(op), &mut world) + .map(|v| v.to_string()), + "base" => world + .handle(op["instance"].as_i64().unwrap()) + .and_then(|h| h.ok_or(Stop::Null)) + .and_then(|h| { + world.edit(&mut map, &h, |a, cb| { + a.set_base_value(number(&op["value"]), cb) + }) + }) + .map(|()| "ok".into()), + "prototype-base" | "prototype-permanent" | "prototype-remove" => { + world.prototype_edit(op).map(|()| "ok".into()) + } + "dirty" => { + storage.dirty = op["flag"].as_bool().unwrap(); + Ok("ok".into()) + } + "notify-add" | "notify-update" | "notify-remove" | "refresh" => { + let instance = EffectInstance::new( + EffectKey, + Details { + duration: 200, + amplifier: op["amplifier"].as_i64().unwrap() as i32, + ambient: false, + visible: true, + show_icon: true, + }, + None, + ); + let mut entity = Entity { + world: &mut world, + map: &mut map, + definitions: &mut defs, + }; + let result = match op["op"].as_str().unwrap() { + "notify-add" => notify::on_added(&mut storage, &instance, &mut entity), + "notify-update" => notify::on_updated( + &mut storage, + &instance, + op["reapply"].as_bool().unwrap(), + &mut entity, + ), + "notify-remove" => notify::on_removed( + &mut storage, + &vec![instance; op["count"].as_u64().unwrap() as usize], + &mut entity, + ), + _ => notify::refresh_attributes(&mut storage, &mut entity), + }; + result.map(|()| "ok".into()) + } + "get" => world + .get(&mut map, world.key(op)) + .map(|h| reference(h.as_ref())), + "lookup" => Ok(reference( + map.instances.get(world.key(op).as_ref()).as_ref(), + )), + "add" => effects::add_modifiers( + &mut defs, + &mut Bound { + world: &mut world, + map: &mut map, + }, + op["amplifier"].as_i64().unwrap() as i32, + ) + .map_err(effect_error) + .map(|()| "ok".into()), + "remove" => effects::remove_modifiers( + &mut defs, + &mut Bound { + world: &mut world, + map: &mut map, + }, + ) + .map_err(effect_error) + .map(|()| "ok".into()), + "modified" => world + .handle(op["instance"].as_i64().unwrap()) + .and_then(|h| world.modified(&mut map, h, None)) + .map(|()| "ok".into()), + "value" => world + .handle(op["instance"].as_i64().unwrap()) + .and_then(|h| h.ok_or(Stop::Null)) + .map(|h| bits(world.instances[h.id].value.as_mut().unwrap().value())), + _ => world.raw(&mut map, op).map(|()| "ok".into()), + }; + world.logs.push(format!( + "result {}", + result.unwrap_or_else(|e| match e { + Stop::Callback => "callback", + Stop::Duplicate => "duplicate", + Stop::Null => "null", + Stop::Bounds => "bounds", + } + .into()) + )); + world.logs.push(format!("effect-dirty {}", storage.dirty)); + world.state(&map, None); + world.prototype_states(); + for line in world.logs.drain(..) { + writeln!(out, "{line}")?; + } + } + } + Ok(()) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + integration::run() +} diff --git a/crates/horizon-world/examples/attribute_memory.rs b/crates/horizon-world/examples/attribute_memory.rs new file mode 100644 index 000000000..b814711ac --- /dev/null +++ b/crates/horizon-world/examples/attribute_memory.rs @@ -0,0 +1,47 @@ +//! Held-live entity attribute allocation workload for external RSS measurement. +use horizon_world::attributes::entity::Catalog; +use std::{ + hint::black_box, + io::{self, Write}, + sync::Arc, +}; +fn main() -> Result<(), Box<dyn std::error::Error>> { + let args: Vec<_> = std::env::args().collect(); + let catalog = Arc::new(Catalog::from_json(&serde_json::from_str( + &std::fs::read_to_string(&args[1])?, + )?)?); + let count: usize = args[2].parse()?; + let active = args[3] == "active"; + if count > 100_000 { + return Err("allocation workload exceeds limit".into()); + } + let keys = [ + "minecraft:max_health", + "minecraft:max_absorption", + "minecraft:movement_speed", + "minecraft:armor", + ] + .map(|s| catalog.id(s).unwrap()); + let mut entities = Vec::with_capacity(count); + let mut sum = 0.0; + for _ in 0..count { + let mut a = catalog.create("minecraft:zombie").unwrap(); + if active { + for id in keys { + assert!(a.ensure(id)); + } + } + sum += a.value(keys[0]).unwrap(); + entities.push(a); + } + black_box(&entities); + println!( + "{}", + serde_json::json!({"entities":entities.len(),"active_per_entity":if active{4}else{0},"health_sum":sum}) + ); + io::stdout().flush()?; + let mut line = String::new(); + io::stdin().read_line(&mut line)?; + black_box(&entities); + Ok(()) +} diff --git a/crates/horizon-world/examples/attribute_updates_fixture.rs b/crates/horizon-world/examples/attribute_updates_fixture.rs new file mode 100644 index 000000000..461a552b8 --- /dev/null +++ b/crates/horizon-world/examples/attribute_updates_fixture.rs @@ -0,0 +1,637 @@ +use horizon_world::{ + active_effects::{ActiveEffects, EffectHooks}, + effect_notifications::{ + self as notify, EffectPacket, EligibilityWorld, ImmunityTag, NotificationWorld, + RestrictedEffect, + }, + java_hash_map::JavaKey, + object_open_set::{CursorError, ObjectKey, ObjectOpenSet}, + status_effect::{BlendState, Details, EffectInstance}, +}; +use horizon_world::{ + attribute_updates::{self, UpdateWorld, UpdatedAttribute}, + living_health::{self, HealthWorld, SyncedFloat}, +}; +use serde_json::Value; +use std::{ + cmp::Ordering, + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone)] +struct Key { + id: usize, + hash: i32, + identity: i32, +} +impl PartialEq for Key { + fn eq(&self, other: &Self) -> bool { + self.id == other.id + } +} +impl Eq for Key {} +impl ObjectKey for Key { + fn object_hash(&self) -> i32 { + self.hash + } +} +impl JavaKey for Key { + fn java_hash(&self) -> i32 { + self.hash + } + fn tie_break(&self, other: &Self) -> Ordering { + if self.identity <= other.identity { + Ordering::Less + } else { + Ordering::Greater + } + } +} +type Effect = EffectInstance<Key>; +type Storage = ActiveEffects<Key>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn fl(v: &Value, k: &str) -> f32 { + f32::from_bits(v[k].as_u64().unwrap() as u32) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { 0x7fc00000 } else { v.to_bits() } +} +fn details(v: &Value) -> Details { + Details { + duration: n(v, "duration"), + amplifier: n(v, "amplifier"), + ambient: v["ambient"].as_bool().unwrap(), + visible: v["visible"].as_bool().unwrap(), + show_icon: v["icon"].as_bool().unwrap(), + } +} +struct World<'a> { + health: [SyncedFloat; 2], + absorption: f32, + f: Value, + out: &'a mut dyn Write, + keys: Vec<Key>, + attribute_keys: Vec<Key>, + updates: [ObjectOpenSet<Key>; 2], + pool: Vec<Effect>, + ids: Vec<Effect>, + calls: i32, + changed: bool, +} +impl World<'_> { + fn config(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn id(&mut self, e: &Effect) -> usize { + if let Some(i) = self.ids.iter().position(|v| v.same_reference(e)) { + i + } else { + self.ids.push(e.clone()); + self.ids.len() - 1 + } + } + fn reset(&mut self, storage: &mut Storage) { + if let Some(bits) = self.config()["absorption"].as_u64() { + self.absorption = f32::from_bits(bits as u32); + } + if let Some(dirty) = self.config()["dirty"].as_bool() { + storage.dirty = dirty; + } + let c = self.config().clone(); + for (i, v) in c["states"].as_array().unwrap().iter().enumerate() { + let mut e = self.pool[i].write(); + e.details = details(v); + e.blend = BlendState { + factor: fl(v, "factor"), + previous: fl(v, "previous"), + }; + } + } + fn all(&mut self, s: &Storage) { + writeln!( + self.out, + "state {} {} {}", + self.calls, self.changed, s.dirty + ) + .unwrap(); + for (i, h) in self.health.iter().enumerate() { + writeln!( + self.out, + "health-data {i} {} {} {} {}", + bits(h.value()), + h.is_dirty(), + h.item_dirty(), + h.is_default() + ) + .unwrap(); + } + writeln!(self.out, "absorption-data {}", bits(self.absorption)).unwrap(); + for (i, updates) in self.updates.iter().enumerate() { + writeln!( + self.out, + "updates {i} {}", + updates + .values() + .map(|v| v.map_or("null".into(), |k| k.id.to_string())) + .collect::<Vec<_>>() + .join(",") + ) + .unwrap(); + } + let mut roots = Vec::new(); + let entries = s + .entries + .entries() + .map(|(k, e)| { + let id = self.id(e); + roots.push(e.clone()); + format!("{}={id}", k.id) + }) + .collect::<Vec<_>>() + .join(","); + writeln!(self.out, "map {entries}").unwrap(); + for (i, e) in self.pool.clone().iter().enumerate() { + let id = self.id(e); + writeln!(self.out, "pool {i} {id}").unwrap(); + roots.push(e.clone()); + } + let mut seen = Vec::new(); + let mut i = 0; + while i < roots.len() { + let e = roots[i].clone(); + i += 1; + if seen.iter().any(|v: &Effect| v.same_reference(&e)) { + continue; + } + seen.push(e.clone()); + let id = self.id(&e); + let d = e.read(); + let h = d + .hidden + .as_ref() + .map(|h| { + roots.push(h.clone()); + self.id(h).to_string() + }) + .unwrap_or("none".into()); + writeln!( + self.out, + "node {id} {} {} {} {} {} {} {h} {} {}", + d.effect.id, + d.details.duration, + d.details.amplifier, + d.details.ambient, + d.details.visible, + d.details.show_icon, + bits(d.blend.factor), + bits(d.blend.previous) + ) + .unwrap(); + } + } + fn raw(&mut self, s: &mut Storage, op: &Value) { + let a = n(op, "a") as usize; + let b = n(op, "b") as usize; + match op["op"].as_str().unwrap() { + "pending-add" => { + let key = op["b"].as_i64().unwrap(); + self.updates[a].add((key >= 0).then(|| self.attribute_keys[key as usize].clone())); + } + "pending-remove" => { + let key = op["b"].as_i64().unwrap(); + self.updates[a].remove((key >= 0).then(|| &self.attribute_keys[key as usize])); + } + "pending-clear" => self.updates[a].clear(), + "put" => { + s.entries.put(self.keys[a].clone(), self.pool[b].clone()); + } + "drop" => { + s.entries.remove(&self.keys[a]); + } + "clear" => s.entries.clear(), + "copy" => self.pool[b] = self.pool[a].copy_instance(), + "alias" => self.pool[b] = self.pool[a].clone(), + _ => panic!("raw op"), + } + } + fn event(&mut self, s: &mut Storage, name: String) -> Result<(), &'static str> { + writeln!(self.out, "event {name}").unwrap(); + let i = self.calls; + self.calls += 1; + self.all(s); + if i == n(&self.f, "fail") { + return Err("callback"); + } + if i == n(&self.f, "mutate") { + self.changed = true; + self.reset(s); + for op in self.f["mutations"].as_array().unwrap().clone() { + self.raw(s, &op); + } + } + Ok(()) + } +} +impl EffectHooks<Key> for World<'_> { + type Error = &'static str; + type Source = i32; + type Level = i32; + fn can_be_affected(&mut self, s: &mut Storage, e: Effect) -> Result<bool, Self::Error> { + notify::can_be_affected(s, &e, self) + } + fn on_added(&mut self, s: &mut Storage, e: Effect, _: Option<i32>) -> Result<(), Self::Error> { + notify::on_added(s, &e, self) + } + fn on_updated( + &mut self, + s: &mut Storage, + e: Effect, + reapply: bool, + _: Option<i32>, + ) -> Result<(), Self::Error> { + notify::on_updated(s, &e, reapply, self) + } + fn effect_added(&mut self, s: &mut Storage, e: Key, amp: i32) -> Result<(), Self::Error> { + if e.id < 4 { + Ok(()) + } else { + self.event(s, format!("effect-added {} {amp}", e.id)) + } + } + fn effect_started(&mut self, s: &mut Storage, e: Key, amp: i32) -> Result<(), Self::Error> { + if e.id < 4 { + Ok(()) + } else { + self.event(s, format!("effect-started {} {amp}", e.id)) + } + } + fn level(&mut self, s: &mut Storage) -> Result<i32, Self::Error> { + self.event(s, "level".into())?; + Ok(n(self.config(), "level")) + } + fn is_client(&mut self, s: &mut Storage, l: i32) -> Result<bool, Self::Error> { + self.event(s, format!("client {l}"))?; + Ok(self.config()["client"].as_bool().unwrap()) + } + fn on_removed(&mut self, s: &mut Storage, es: Vec<Effect>) -> Result<(), Self::Error> { + notify::on_removed(s, &es, self) + } + fn get_effect(&mut self, s: &mut Storage, key: Key) -> Result<Option<Effect>, Self::Error> { + self.event(s, format!("get {}", key.id))?; + Ok(s.get(&key)) + } + fn actor_removed(&self) -> bool { + self.config()["removed"].as_bool().unwrap() + } +} +impl EligibilityWorld<Key> for World<'_> { + type Error = &'static str; + fn has_immunity_tag(&mut self, s: &mut Storage, tag: ImmunityTag) -> Result<bool, Self::Error> { + let id = tag as usize; + self.event(s, format!("tag {id}"))?; + Ok(self.config()["tags"][id].as_bool().unwrap()) + } + fn is_restricted_effect(&self, effect: &Key, kind: RestrictedEffect) -> bool { + effect.id == kind as usize + } +} +impl NotificationWorld<Key> for World<'_> { + type Attributes = usize; + type UpdateSet = usize; + type AttributeInstance = Key; + type Attribute = i32; + type Passenger = usize; + type Connection = i32; + fn attributes(&mut self, s: &mut Storage) -> Result<usize, Self::Error> { + self.event(s, "attributes".into())?; + Ok(n(self.config(), "attributes") as usize) + } + fn add_modifiers( + &mut self, + s: &mut Storage, + e: Key, + a: usize, + amp: i32, + ) -> Result<(), Self::Error> { + if e.id < 4 { + return Ok(()); + } + self.event(s, format!("add-modifiers {} {a} {amp}", e.id)) + } + fn remove_modifiers(&mut self, s: &mut Storage, e: Key, a: usize) -> Result<(), Self::Error> { + if e.id < 4 { + return Ok(()); + } + self.event(s, format!("remove-modifiers {} {a}", e.id)) + } + fn pending_updates(&mut self, s: &mut Storage, a: usize) -> Result<usize, Self::Error> { + self.event(s, format!("pending {a}"))?; + Ok(self.config()["routes"][a].as_u64().unwrap() as usize) + } + fn update_set(&self, s: usize) -> &ObjectOpenSet<Key> { + &self.updates[s] + } + fn update_set_mut(&mut self, s: usize) -> &mut ObjectOpenSet<Key> { + &mut self.updates[s] + } + fn iterator_error(e: CursorError) -> Self::Error { + match e { + CursorError::MissingWrapped => "null", + CursorError::IndexOutOfBounds => "bounds", + CursorError::NoSuchElement => "empty", + CursorError::NoCurrentEntry => "current", + } + } + fn attribute_of(&mut self, s: &mut Storage, i: Option<Key>) -> Result<i32, Self::Error> { + let i = i.ok_or("null")?; + self.event(s, format!("attribute {}", i.id))?; + Ok(self.config()["holders"][i.id].as_i64().unwrap() as i32) + } + fn attribute_updated(&mut self, s: &mut Storage, a: i32) -> Result<(), Self::Error> { + attribute_updates::updated(&mut Update { w: self, s }, a) + } + fn passengers(&self) -> Vec<usize> { + self.config()["passengers"] + .as_array() + .unwrap() + .iter() + .map(|p| p.as_u64().unwrap() as usize) + .collect() + } + fn is_server_player(&self, p: usize) -> bool { + p < 2 + } + fn connection(&self, p: usize) -> i32 { + self.config()["connections"][p].as_i64().unwrap() as i32 + } + fn entity_id(&mut self, s: &mut Storage) -> Result<i32, Self::Error> { + self.event(s, "entity-id".into())?; + Ok(n(self.config(), "entity")) + } + fn send_packet( + &mut self, + s: &mut Storage, + c: i32, + p: EffectPacket<Key>, + ) -> Result<(), Self::Error> { + if c < 0 { + return Err("null"); + } + let message = match p { + EffectPacket::Update { + entity, + effect, + amplifier, + duration, + flags, + } => format!( + "packet {c} update {entity} {} {amplifier} {duration} {flags}", + effect.id + ), + EffectPacket::Remove { entity, effect } => { + format!("packet {c} remove {entity} {}", effect.id) + } + }; + self.event(s, message) + } +} +struct Update<'w, 'a> { + w: &'w mut World<'a>, + s: &'w mut Storage, +} +impl HealthWorld for Update<'_, '_> { + type Error = &'static str; + type Data = usize; + fn health(&mut self) -> Result<f32, Self::Error> { + self.w.event(self.s, "health".into())?; + Ok(self.w.health[self.health_data()].value()) + } + fn health_data(&self) -> usize { + n(self.w.config(), "data") as usize + } + fn max_health_attribute(&mut self) -> Result<f64, Self::Error> { + self.w.event(self.s, "max-health".into())?; + Ok(f64::from_bits( + self.w.config()["maximums"][0].as_u64().unwrap(), + )) + } + fn max_absorption_attribute(&mut self) -> Result<f64, Self::Error> { + self.w.event(self.s, "max-absorption".into())?; + Ok(f64::from_bits( + self.w.config()["maximums"][1].as_u64().unwrap(), + )) + } + fn store_health(&mut self, data: usize, value: f32) -> Result<(), Self::Error> { + let mut h = self.w.health[data]; + let result = h.set(value, false, |h| { + self.w.health[data] = *h; + self.w.event(self.s, "health-updated".into()) + }); + self.w.health[data] = h; + result + } + fn store_absorption(&mut self, value: f32) -> Result<(), Self::Error> { + self.w + .event(self.s, format!("internal-absorption {}", bits(value)))?; + self.w.absorption = value; + Ok(()) + } + fn dead_flag(&self) -> bool { + false + } + fn dispatch_set_health(&mut self, value: f32) -> Result<(), Self::Error> { + self.w + .event(self.s, format!("set-health {}", bits(value)))?; + living_health::set_health(self, value) + } +} +impl UpdateWorld<i32> for Update<'_, '_> { + type Level = i32; + type Manager = usize; + type Attributes = usize; + fn attribute_kind(&self, h: &i32) -> UpdatedAttribute { + match *h { + 0 => UpdatedAttribute::MaxHealth, + 1 => UpdatedAttribute::MaxAbsorption, + 2 => UpdatedAttribute::Scale, + 3 => UpdatedAttribute::WaypointRange, + _ => UpdatedAttribute::Other, + } + } + fn absorption(&mut self) -> Result<f32, Self::Error> { + self.w.event(self.s, "absorption".into())?; + Ok(self.w.absorption) + } + fn refresh_dimensions(&mut self) -> Result<(), Self::Error> { + self.w.event(self.s, "dimensions".into()) + } + fn level(&mut self) -> Result<i32, Self::Error> { + EffectHooks::level(self.w, self.s) + } + fn is_server_level(&self, l: i32) -> bool { + self.w.f["servers"][l as usize].as_bool().unwrap() + } + fn waypoint_manager(&mut self, l: i32) -> Result<usize, Self::Error> { + self.w.event(self.s, format!("manager {l}"))?; + Ok(self.w.config()["managers"][l as usize].as_u64().unwrap() as usize) + } + fn attributes_field(&self) -> usize { + n(self.w.config(), "direct_attributes") as usize + } + fn attribute_value_in(&mut self, a: usize, h: i32) -> Result<f64, Self::Error> { + self.w.event(self.s, format!("value-in {a} {h}"))?; + Ok(f64::from_bits( + self.w.config()["values"][a][h as usize].as_u64().unwrap(), + )) + } + fn track_waypoint(&mut self, m: usize, track: bool) -> Result<(), Self::Error> { + self.w.event(self.s, format!("waypoint {m} {track}")) + } +} +fn run(f: Value, out: &mut dyn Write) { + let keys = f["hashes"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(id, v)| Key { + id, + hash: v.as_i64().unwrap() as i32, + identity: f["identities"][id].as_i64().unwrap() as i32, + }) + .collect::<Vec<_>>(); + let mut pool: Vec<Effect> = Vec::new(); + for v in f["initial"]["states"].as_array().unwrap() { + let h = n(v, "hidden"); + pool.push(Effect::new( + keys[n(v, "key") as usize].clone(), + details(v), + (h >= 0).then(|| pool[h as usize].clone()), + )); + } + let attribute_keys = f["attribute_hashes"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(id, h)| Key { + id, + hash: h.as_i64().unwrap() as i32, + identity: 0, + }) + .collect(); + let health = std::array::from_fn(|i| { + SyncedFloat::new(f32::from_bits(f["health"][i].as_u64().unwrap() as u32)) + }); + let mut w = World { + health, + absorption: 0.0, + attribute_keys, + updates: std::array::from_fn(|_| ObjectOpenSet::default()), + f, + out, + keys, + pool, + ids: Vec::new(), + calls: 0, + changed: false, + }; + let mut s = Storage::default(); + w.reset(&mut s); + for op in w.f["setup"].as_array().unwrap().clone() { + w.raw(&mut s, &op); + } + w.all(&s); + for op in w.f["ops"].as_array().unwrap().clone() { + let a = n(&op, "a") as usize; + let b = n(&op, "b") as usize; + let source = n(&op, "source"); + let source = (source >= 0).then_some(source); + let result: Result<String, &'static str> = match op["op"].as_str().unwrap() { + "attribute-update" => attribute_updates::updated( + &mut Update { + w: &mut w, + s: &mut s, + }, + a as i32, + ) + .map(|_| "ok".into()), + "pack" => Ok(w.health[a] + .take_dirty() + .map(|v| bits(v).to_string()) + .unwrap_or("none".into())), + "eligible" => { + let e = w.pool[a].clone(); + notify::can_be_affected(&mut s, &e, &mut w).map(|v| v.to_string()) + } + "notify-add" => { + let e = w.pool[a].clone(); + notify::on_added(&mut s, &e, &mut w).map(|_| "ok".into()) + } + "notify-update" => { + let e = w.pool[a].clone(); + notify::on_updated(&mut s, &e, op["reapply"].as_bool().unwrap(), &mut w) + .map(|_| "ok".into()) + } + "notify-remove" => { + let es = op["list"] + .as_array() + .unwrap() + .iter() + .map(|i| w.pool[i.as_u64().unwrap() as usize].clone()) + .collect::<Vec<_>>(); + notify::on_removed(&mut s, &es, &mut w).map(|_| "ok".into()) + } + "send" => { + let e = w.pool[a].clone(); + notify::send_to_passengers(&mut s, &e, &mut w).map(|_| "ok".into()) + } + "refresh" => notify::refresh_attributes(&mut s, &mut w).map(|_| "ok".into()), + "pending-add" | "pending-remove" | "pending-clear" => { + w.raw(&mut s, &op); + Ok("ok".into()) + } + "add" => s + .add(w.pool[a].clone(), source, &mut w) + .map(|v| v.to_string()), + "force" => s + .force_add(w.pool[a].clone(), source, &mut w) + .map(|_| "ok".into()), + "remove" => s.remove(&w.keys[a].clone(), &mut w).map(|v| v.to_string()), + "remove-raw" => Ok(s + .remove_no_update(&w.keys[a]) + .map(|e| w.id(&e).to_string()) + .unwrap_or("none".into())), + "all" => s.remove_all(&mut w).map(|v| v.to_string()), + "has" => Ok(s.has(&w.keys[a]).to_string()), + "get" => { + let key = w.keys[a].clone(); + EffectHooks::get_effect(&mut w, &mut s, key) + .map(|e| e.map(|e| w.id(&e).to_string()).unwrap_or("none".into())) + } + "blend" => s + .blend_factor(w.keys[a].clone(), fl(&op, "partial"), &mut w) + .map(|v| bits(v).to_string()), + "put" | "drop" | "clear" | "copy" | "alias" => { + w.raw(&mut s, &op); + Ok("ok".into()) + } + _ => panic!("operation {b}"), + }; + writeln!(w.out, "result {}", result.unwrap_or_else(str::to_string)).unwrap(); + w.all(&s); + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let side = std::env::args().nth(2).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join(format!("rust-{side}.txt")))?); + for line in fs::read_to_string(dir.join(format!("inputs-{side}.txt")))?.lines() { + run(serde_json::from_str(line)?, &mut out); + } + Ok(()) +} diff --git a/crates/horizon-world/examples/basic_feature_fixture.rs b/crates/horizon-world/examples/basic_feature_fixture.rs new file mode 100644 index 000000000..f8ec7f53c --- /dev/null +++ b/crates/horizon-world/examples/basic_feature_fixture.rs @@ -0,0 +1,175 @@ +//! Feature world transport retaining ordered mutations and partial failures. +use horizon_core::random::{LegacyRandom, RandomSource, XoroshiroRandom}; +use horizon_world::{ + heightmap::HeightmapType, + registry::BlockStateId, + worldgen::{ + anchor::WorldGenerationContext, + feature::{BasicFeature, FeatureBlocks, FeatureWorld}, + placement::{FeaturePlacer, PlacementContext, PlacementModifier, PlacementQueryError}, + }, +}; +use serde_json::Value; +use std::{ + collections::BTreeMap, + fs, + io::{self, Write}, + path::Path, +}; +struct World<'a, W> { + states: BTreeMap<[i32; 3], BlockStateId>, + blocks: [BlockStateId; 5], + calls: i32, + fail: i32, + reject: i32, + out: &'a mut W, +} +impl<W> PlacementContext for World<'_, W> { + fn generation(&self) -> WorldGenerationContext { + WorldGenerationContext::new(-64, 384, 63) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(-64) + } + fn height(&mut self, _: HeightmapType, _: i32, _: i32) -> Result<i32, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } +} +impl<W: Write> FeatureWorld for World<'_, W> { + type Error = io::Error; + fn block(&mut self, p: [i32; 3]) -> Result<BlockStateId, Self::Error> { + let call = self.calls; + self.calls += 1; + writeln!(self.out, "get {} {} {}", p[0], p[1], p[2])?; + if call == self.fail { + return Err(io::Error::other("world failure")); + } + let hash = p[0] + .wrapping_mul(31) + .wrapping_add(p[1].wrapping_mul(7)) + .wrapping_add(p[2].wrapping_mul(17)) + .rem_euclid(5) as usize; + let state = self.states.get(&p).copied().unwrap_or(self.blocks[hash]); + writeln!(self.out, "state {}", state.0)?; + Ok(state) + } + fn set_block( + &mut self, + p: [i32; 3], + state: BlockStateId, + flags: i32, + ) -> Result<bool, Self::Error> { + let call = self.calls; + self.calls += 1; + writeln!( + self.out, + "set {} {} {} {} {flags}", + p[0], p[1], p[2], state.0 + )?; + if call == self.fail { + return Err(io::Error::other("world failure")); + } + let result = self.reject == 0 || call % self.reject != 0; + if result { + self.states.insert(p, state); + } + writeln!(self.out, "written {result}")?; + Ok(result) + } +} +fn fixture( + f: &Value, + mut random: impl RandomSource, + blocks: [BlockStateId; 5], + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let decoded = BasicFeature::from_json(f["definition"].as_str().unwrap()).and_then(|feature| { + let modifiers = f + .get("placement") + .map(|v| { + v.as_array() + .unwrap() + .iter() + .map(|v| PlacementModifier::from_json(&v.to_string())) + .collect::<Result<Vec<_>, _>>() + }) + .transpose()?; + Ok((feature, modifiers)) + }); + match decoded { + Err(_) => writeln!(out, "decode error")?, + Ok((feature, modifiers)) => { + writeln!(out, "decode ok")?; + let mut world = World { + states: BTreeMap::new(), + blocks, + calls: 0, + fail: f["fail"].as_i64().unwrap() as i32, + reject: f["reject"].as_i64().unwrap() as i32, + out, + }; + let blocks = FeatureBlocks { + air: blocks[0], + stone: blocks[1], + cobblestone: blocks[2], + end_stone: blocks[3], + obsidian: blocks[4], + }; + let p = &f["origin"]; + let origin = [ + p[0].as_i64().unwrap() as i32, + p[1].as_i64().unwrap() as i32, + p[2].as_i64().unwrap() as i32, + ]; + let mut placer = FeaturePlacer::new(); + for _ in 0..f["repeats"].as_u64().unwrap() { + world.calls = 0; + let result = if let Some(modifiers) = &modifiers { + placer + .place_with_context( + modifiers, + &mut world, + &mut random, + origin, + |world, random, position| { + feature.place(world, random, position, blocks) + }, + ) + .map_err(|_| ()) + } else { + feature + .place(&mut world, &mut random, origin, blocks) + .map_err(|_| ()) + }; + match result { + Ok(value) => writeln!(world.out, "place {value}")?, + Err(_) => writeln!(world.out, "place error")?, + } + writeln!(world.out, "next {}", random.next_long())?; + for (p, state) in &world.states { + writeln!(world.out, "stored {} {} {} {}", p[0], p[1], p[2], state.0)?; + } + writeln!(world.out, "end")?; + } + } + } + writeln!(out, "tail {}", random.next_long())?; + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let ids: [u32; 5] = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + let blocks = ids.map(BlockStateId); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture(&f, LegacyRandom::new(seed), blocks, &mut out)?; + } else { + fixture(&f, XoroshiroRandom::new(seed), blocks, &mut out)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/biome_chunk_fixture.rs b/crates/horizon-world/examples/biome_chunk_fixture.rs new file mode 100644 index 000000000..69f7c897d --- /dev/null +++ b/crates/horizon-world/examples/biome_chunk_fixture.rs @@ -0,0 +1,104 @@ +//! Original transport for native chunk biome fill order and failure state. +use horizon_core::position::ChunkPos; +use horizon_world::{retrogen::RetrogenBiomeResolver, worldgen::biome_chunk::BiomeChunk}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +fn biome_key(id: &i32) -> Option<&str> { + match *id { + 0 => Some("minecraft:lush_caves"), + 1 => Some("minecraft:dripstone_caves"), + 2 => Some("minecraft:deep_dark"), + 3 => Some("horizon:lush_caves"), + 511 => None, + _ => Some("horizon:other"), + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let height = n(&f["height"]); + let mut chunk = BiomeChunk::new( + ChunkPos::new(n(&f["cx"]), n(&f["cz"])), + n(&f["min"]), + height, + n(&f["default"]), + )?; + for op in f["ops"].as_array().unwrap() { + let mut calls = 0; + let resolve = |[x, y, z]: [i32; 3]| { + writeln!(out, "resolve {x} {y} {z}").unwrap(); + let previous = calls; + calls += 1; + if previous == n(&op[2]) { + return Err(()); + } + Ok(x.wrapping_mul(31) + .wrapping_add(y.wrapping_mul(7)) + .wrapping_add(z.wrapping_mul(17)) + .wrapping_add(n(&op[0])) + .rem_euclid(n(&op[1]))) + }; + let result = if let Some(before) = op.get(5) { + // Native wrapper activation is captured before the later metadata + // mutation at op[6]; filling still uses the supplied bounds. + chunk.fill_with_retrogen( + n(&op[3]), + n(&op[4]), + before.as_bool().unwrap(), + resolve, + biome_key, + ) + } else { + chunk.fill(n(&op[3]), n(&op[4]), resolve) + }; + writeln!( + out, + "fill {} {calls}", + if result.is_ok() { "ok" } else { "error" } + )?; + for index in 0..height as usize / 16 { + writeln!(out, "section {index}")?; + for row in chunk.section(index).unwrap().chunks(4) { + writeln!(out, "biomes {} {} {} {}", row[0], row[1], row[2], row[3])?; + } + } + for q in f["queries"].as_array().unwrap() { + writeln!( + out, + "query {}", + chunk.noise_biome([n(&q[0]), n(&q[1]), n(&q[2])]) + )?; + } + } + if let Some(queries) = f["resolver_queries"].as_array() { + for query in queries { + let p = [n(&query[1]), n(&query[2]), n(&query[3])]; + let mut resolver = + RetrogenBiomeResolver::new(query[4].as_bool().unwrap(), |[x, y, z]| { + writeln!(out, "resolve_query {x} {y} {z}").unwrap(); + if n(&query[0]) < 0 { + Err(()) + } else { + Ok(n(&query[0])) + } + }); + let result = resolver.sample(p, biome_key, |old| Ok(*chunk.noise_biome(old))); + match result { + Ok(value) => writeln!(out, "resolver_query {value}")?, + Err(()) => writeln!(out, "resolver_query error")?, + } + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/biome_generation_fixture.rs b/crates/horizon-world/examples/biome_generation_fixture.rs new file mode 100644 index 000000000..2377747f9 --- /dev/null +++ b/crates/horizon-world/examples/biome_generation_fixture.rs @@ -0,0 +1,129 @@ +//! Chunk biome generation from bundled climate routers and imported preset tables. +use horizon_core::{ + biome::{BiomeZoom, obfuscate_seed}, + density::{SamplerContext, graph::DensityCompiler}, + position::{BlockPos, ChunkPos}, +}; +use horizon_world::worldgen::{ + biome_chunk::BiomeChunk, + biome_source::{BiomeSet, BiomeSourceDefinition}, + density::DensityRegistry, + router::{NoiseRouter, RouterField}, +}; +use serde_json::Value; +use std::{ + collections::BTreeMap, + fs, + io::{self, Write}, + path::Path, +}; +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let bundle: Value = serde_json::from_str(&fs::read_to_string(dir.join("registries.json"))?)?; + let noises: BTreeMap<String, String> = serde_json::from_value(bundle["noises"].clone())?; + let densities: BTreeMap<String, String> = serde_json::from_value(bundle["densities"].clone())?; + let presets: BTreeMap<String, String> = serde_json::from_value(bundle["presets"].clone())?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let settings: Value = serde_json::from_str( + bundle["settings"][f["setting"].as_str().unwrap()] + .as_str() + .unwrap(), + )?; + let mut definitions = DensityRegistry::from_json(&noises, &densities)?; + let router = + NoiseRouter::from_json(&settings["noise_router"].to_string(), &mut definitions)?; + let seed = f["seed"].as_i64().unwrap(); + let mut compiler = DensityCompiler::new_seeded( + definitions.into_graph(), + seed, + f["legacy"].as_bool().unwrap(), + ); + let climate = router.compile_climate(&mut compiler)?; + let definition = match f["source"].as_str().unwrap_or("multi") { + "fixed" => BiomeSourceDefinition::Fixed( + f["fixed_biome"] + .as_str() + .unwrap_or("minecraft:plains") + .into(), + ), + "checkerboard" => BiomeSourceDefinition::Checkerboard { + biomes: BiomeSet::Direct(vec![ + "minecraft:plains".into(), + "minecraft:the_end".into(), + "minecraft:nether_wastes".into(), + ]), + scale: n(&f["scale"]), + }, + "end" => BiomeSourceDefinition::End, + "multi" => BiomeSourceDefinition::Preset { + name: f["preset"].as_str().unwrap().into(), + inline: false, + }, + _ => panic!("unknown source"), + }; + let source = definition.resolve(&presets)?; + let erosion = compiler.get_sampler(router.function(RouterField::Erosion))?; + let mut resolver = source.resolver(&climate, erosion.as_ref()); + let (cx, cz, min, height) = (n(&f["cx"]), n(&f["cz"]), n(&f["min"]), n(&f["height"])); + let mut chunk = BiomeChunk::new( + ChunkPos::new(cx, cz), + min, + height, + "minecraft:plains".to_owned(), + )?; + let retrogen = f["retrogen"].as_bool().unwrap_or(false); + if retrogen { + chunk.fill(min, min + height - 1, |[x, y, z]| { + Ok::<_, std::convert::Infallible>(format!( + "horizon:old_{}", + x.wrapping_mul(31) + .wrapping_add(y.wrapping_mul(7)) + .wrapping_add(z.wrapping_mul(17)) + .rem_euclid(3) + )) + })?; + } + for repeat in 0..n(&f["repeats"]) { + let mut context = SamplerContext::cached(); + let volume = resolver.prepare_volume( + &mut context, + [cx.wrapping_shl(4) >> 2, min >> 2, cz.wrapping_shl(4) >> 2], + [4, height >> 2, 4], + )?; + chunk.fill_with_retrogen( + n(&f["write_min"]), + n(&f["write_max"]), + retrogen, + |quart| { + resolver + .sample_prepared(&mut context, volume.as_ref(), quart) + .map(str::to_owned) + }, + |name| Some(name), + )?; + writeln!(out, "fill {repeat}")?; + for section in 0..height as usize / 16 { + writeln!(out, "section {section}")?; + for name in chunk.section(section).unwrap() { + writeln!(out, "biome {name}")?; + } + } + let zoom = BiomeZoom::new(obfuscate_seed(seed)); + for q in f["queries"].as_array().unwrap() { + let block = BlockPos::new(n(&q[0]), n(&q[1]), n(&q[2])); + writeln!( + out, + "query {}", + chunk.noise_biome(zoom.quart_at_block(block)) + )?; + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/biome_placement_fixture.rs b/crates/horizon-world/examples/biome_placement_fixture.rs new file mode 100644 index 000000000..a412b9924 --- /dev/null +++ b/crates/horizon-world/examples/biome_placement_fixture.rs @@ -0,0 +1,175 @@ +use horizon_core::random::{LegacyRandom, RandomSource, WorldgenRandom, XoroshiroRandom}; +use horizon_world::{ + heightmap::HeightmapType, + worldgen::{ + anchor::WorldGenerationContext, + feature_sort::FeatureIdentity, + placement::{FeaturePlacer, PlacementContext, PlacementModifier, PlacementQueryError}, + }, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +struct World<'a, W> { + out: &'a mut W, + f: &'a Value, + queries: i32, + calls: i32, +} +impl<W: Write> PlacementContext for World<'_, W> { + fn top_feature(&self) -> Option<FeatureIdentity> { + self.f["top"] + .as_bool() + .unwrap() + .then_some(FeatureIdentity(42)) + } + fn generation(&self) -> WorldGenerationContext { + WorldGenerationContext::new(-64, 384, 63) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(-64) + } + fn height(&mut self, _: HeightmapType, _: i32, _: i32) -> Result<i32, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + fn biome_allows_feature( + &mut self, + p: [i32; 3], + feature: FeatureIdentity, + ) -> Result<bool, PlacementQueryError> { + assert_eq!(feature, FeatureIdentity(42)); + let error = |e: io::Error| PlacementQueryError::Failed(e.to_string()); + writeln!(self.out, "biome {} {} {}", p[0], p[1], p[2]).map_err(error)?; + let call = self.queries; + self.queries += 1; + if call == n(&self.f["query_fail"]) { + return Err(PlacementQueryError::Unavailable); + } + let index = p[0] + .wrapping_mul(31) + .wrapping_add(p[1].wrapping_mul(7)) + .wrapping_add(p[2].wrapping_mul(17)) + .rem_euclid(2) as usize; + writeln!(self.out, "selected {index}").map_err(error)?; + writeln!(self.out, "settings {index}").map_err(error)?; + let call = self.queries; + self.queries += 1; + if call == n(&self.f["query_fail"]) { + return Err(PlacementQueryError::Unavailable); + } + Ok(matches!(n(&self.f["membership"][index]), 1 | 2)) + } +} +fn feature<W: Write>( + world: &mut World<'_, W>, + random: &mut impl RandomSource, + p: [i32; 3], +) -> Result<bool, ()> { + writeln!(world.out, "feature {} {} {}", p[0], p[1], p[2]).map_err(|_| ())?; + if world.f["draw"].as_bool().unwrap() { + writeln!(world.out, "draw {}", random.next_long()).map_err(|_| ())?; + } + let call = world.calls; + world.calls += 1; + if call == n(&world.f["feature_fail"]) { + return Err(()); + } + if world.f["nested"].as_bool().unwrap() { + return FeaturePlacer::new() + .place_with_context(&[PlacementModifier::Biome], world, random, p, feature) + .map_err(|_| ()); + } + Ok(n(&world.f["return_mode"]) == 0 + || (n(&world.f["return_mode"]) == 2 + && p[0].wrapping_add(p[1]).wrapping_add(p[2]).rem_euclid(2) == 0)) +} +fn fixture( + f: &Value, + mut random: impl RandomSource, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let modifiers = f["placement"] + .as_array() + .unwrap() + .iter() + .map(|v| PlacementModifier::from_json(&v.to_string())) + .collect::<Result<Vec<_>, _>>()?; + let origin = std::array::from_fn(|i| n(&f["origin"][i])); + let mut world = World { + out, + f, + queries: 0, + calls: 0, + }; + let mut placer = FeaturePlacer::new(); + for _ in 0..3 { + world.queries = 0; + world.calls = 0; + let result = if f["direct"].as_bool().unwrap() { + // Direct modifier callbacks share their query world through a local + // emitted-position list; this corpus uses only the unit biome filter. + let mut positions = Vec::new(); + let result = modifiers[0].modify_in(&mut world, &mut random, origin, |_, p| { + positions.push(p); + Ok::<_, ()>(()) + }); + result.map_err(|_| ()).and_then(|()| { + for p in positions { + feature(&mut world, &mut random, p)?; + } + Ok(true) + }) + } else if f["top"].as_bool().unwrap() { + placer + .place_with_biome_check( + &modifiers, + &mut world, + &mut random, + origin, + FeatureIdentity(42), + feature, + ) + .map_err(|_| ()) + } else { + placer + .place_with_context(&modifiers, &mut world, &mut random, origin, feature) + .map_err(|_| ()) + }; + match result { + Ok(value) => writeln!(world.out, "place {value}")?, + Err(()) => writeln!(world.out, "place error")?, + } + writeln!(world.out, "next {}", random.next_long())?; + } + writeln!(world.out, "tail {}", random.next_long())?; + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + match ( + f["legacy"].as_bool().unwrap(), + f["worldgen"].as_bool().unwrap(), + ) { + (true, false) => fixture(&f, LegacyRandom::new(seed), &mut out)?, + (true, true) => fixture(&f, WorldgenRandom::new(LegacyRandom::new(seed)), &mut out)?, + (false, false) => fixture(&f, XoroshiroRandom::new(seed), &mut out)?, + (false, true) => fixture( + &f, + WorldgenRandom::new(XoroshiroRandom::new(seed)), + &mut out, + )?, + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/biome_source_codec_fixture.rs b/crates/horizon-world/examples/biome_source_codec_fixture.rs new file mode 100644 index 000000000..d45dcdd3a --- /dev/null +++ b/crates/horizon-world/examples/biome_source_codec_fixture.rs @@ -0,0 +1,79 @@ +//! Registry-aware codec transport for biome-source definitions. +use horizon_core::density::{ConstantSampler, SamplerContext}; +use horizon_world::worldgen::{ + biome_source::BiomeSourceCatalog, climate::ClimateSampler, tags::TagDefinitions, +}; +use serde_json::Value; +use std::{ + collections::{BTreeMap, BTreeSet}, + fs, + io::{self, Write}, + path::Path, + sync::Arc, +}; +fn normalized(value: Value) -> Value { + match value { + Value::Number(n) => { + serde_json::json!({"float64_bits":format!("{:016x}",n.as_f64().unwrap().to_bits())}) + } + Value::Array(values) => Value::Array(values.into_iter().map(normalized).collect()), + Value::Object(values) => Value::Object( + values + .into_iter() + .map(|(k, v)| (k, normalized(v))) + .collect(), + ), + value => value, + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let read = |name: &str| -> Result<BTreeMap<String, String>, Box<dyn std::error::Error>> { + Ok(serde_json::from_str(&fs::read_to_string( + dir.join(format!("{name}.json")), + )?)?) + }; + let biomes: BTreeSet<_> = read("biomes")?.into_keys().collect(); + let presets = read("presets")?; + let mut tags = TagDefinitions::default(); + for (name, raw) in read("biome_tags")? { + tags.apply_json(&name, "vanilla", &raw)?; + } + let tags = tags.build(|name, _| biomes.contains(name).then(|| name.to_owned()))?; + assert!(tags.missing.is_empty()); + let catalog = BiomeSourceCatalog::new(&biomes, &tags.tags, &presets.keys().cloned().collect())?; + let positions: Vec<[i32; 3]> = + serde_json::from_str(&fs::read_to_string(dir.join("positions.json"))?)?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for json in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let definition = match catalog.decode(json) { + Ok(v) => v, + Err(_) => { + writeln!(out, "codec error")?; + continue; + } + }; + let encoded = catalog.encode(&definition)?; + writeln!(out, "codec {}", normalized(serde_json::from_str(&encoded)?))?; + let source = definition.resolve(&presets)?; + writeln!( + out, + "possible {}", + serde_json::to_string(&source.possible_biomes())? + )?; + let climate = + ClimateSampler::new(std::array::from_fn(|_| Arc::new(ConstantSampler(0.)) as _)); + let erosion = ConstantSampler(0.); + let mut resolver = source.resolver(&climate, &erosion); + let mut context = SamplerContext::cached(); + for &pos in &positions { + writeln!( + out, + "biome {}", + resolver.sample(&mut context, pos).unwrap_or("error") + )?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/biome_source_fixture.rs b/crates/horizon-world/examples/biome_source_fixture.rs new file mode 100644 index 000000000..cbf262a7c --- /dev/null +++ b/crates/horizon-world/examples/biome_source_fixture.rs @@ -0,0 +1,79 @@ +//! Original transport for fixed, checkerboard and End biome-source queries. +use horizon_core::density::{DensitySampler, SampleError, SamplerContext}; +use horizon_world::worldgen::biome_source::{ + CheckerboardBiomeSource, EndBiomeSource, FixedBiomeSource, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, + sync::{Arc, Mutex}, +}; +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +#[derive(Debug)] +struct Erosion { + value: f32, + fail: bool, + trace: Arc<Mutex<Vec<[i32; 3]>>>, +} +impl DensitySampler for Erosion { + fn sample_value(&self, _: &mut SamplerContext, pos: [i32; 3]) -> Result<f32, SampleError> { + self.trace.lock().unwrap().push(pos); + if self.fail { + Err(SampleError::RecursiveCache) + } else { + Ok(self.value) + } + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let kind = f["kind"].as_str().unwrap(); + let fixed = FixedBiomeSource { biome: 7 }; + let checker = CheckerboardBiomeSource::new( + f["biomes"] + .as_array() + .map(|v| v.iter().map(n).collect()) + .unwrap_or_default(), + f["scale"].as_i64().unwrap_or(0) as i32, + )?; + let end = EndBiomeSource { + center: 0, + highlands: 1, + midlands: 2, + islands: 3, + barrens: 4, + }; + let trace = Arc::new(Mutex::new(Vec::new())); + let erosion = Erosion { + value: f32::from_bits(u32::from_str_radix(f["bits"].as_str().unwrap_or("0"), 16)?), + fail: f["fail"].as_bool().unwrap_or(false), + trace: trace.clone(), + }; + let mut context = SamplerContext::cached(); + for pos in f["positions"].as_array().unwrap() { + let q = [n(&pos[0]), n(&pos[1]), n(&pos[2])]; + let value = match kind { + "fixed" => Some(*fixed.noise_biome(q)), + "checkerboard" => checker.noise_biome(q).ok().copied(), + "end" => end.noise_biome(q, &erosion, &mut context).ok().copied(), + _ => panic!("invalid source"), + }; + for [x, y, z] in trace.lock().unwrap().drain(..) { + writeln!(out, "sample {x} {y} {z}")?; + } + match value { + Some(id) => writeln!(out, "biome {id}")?, + None => writeln!(out, "error")?, + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/biome_temperature_fixture.rs b/crates/horizon-world/examples/biome_temperature_fixture.rs new file mode 100644 index 000000000..86b1393ce --- /dev/null +++ b/crates/horizon-world/examples/biome_temperature_fixture.rs @@ -0,0 +1,119 @@ +//! Original comparison transport for biome temperatures and ordered caches. +use horizon_core::position::BlockPos; +use horizon_world::worldgen::biome_temperature::{ + BiomeTemperature, BiomeTemperatureSettings, Precipitation, TemperatureModifier, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn bits(value: f32) -> u32 { + if value.is_nan() { + 0x7fc00000 + } else { + value.to_bits() + } +} +fn operations(worker: &mut BiomeTemperature, ops: &Value, out: &mut impl Write) -> io::Result<()> { + for op in ops.as_array().unwrap() { + match op[0].as_str().unwrap() { + "query" => { + let p = BlockPos::new( + op[1].as_i64().unwrap() as i32, + op[2].as_i64().unwrap() as i32, + op[3].as_i64().unwrap() as i32, + ); + let sea = op[4].as_i64().unwrap() as i32; + writeln!( + out, + "adjusted {:x}", + bits(worker.settings().height_adjusted(p, sea)) + )?; + writeln!(out, "cached {:x}", bits(worker.temperature(p, sea)))?; + let warm = worker.warm_enough_to_rain(p, sea); + let cold = worker.cold_enough_to_snow(p, sea); + let melt = worker.should_melt_frozen_ocean_iceberg_slightly(p, sea); + let precipitation = match worker.precipitation_at(p, sea) { + Precipitation::None => "NONE", + Precipitation::Rain => "RAIN", + Precipitation::Snow => "SNOW", + }; + writeln!(out, "weather {warm} {cold} {melt} {precipitation}")?; + } + "fill" => { + for i in 0..op[1].as_i64().unwrap() as i32 { + let p = BlockPos::new( + (op[2].as_i64().unwrap() as i32).wrapping_add(i), + i & 255, + i.wrapping_mul(31), + ); + writeln!( + out, + "fill {:x}", + bits(worker.temperature(p, op[3].as_i64().unwrap() as i32)) + )?; + } + } + "dump" => { + writeln!(out, "cache {}", worker.cached_temperatures().len())?; + for (key, value) in worker.cached_temperatures() { + writeln!(out, "{:x} {:x}", key as u64, bits(value))?; + } + } + "thread" => operations(&mut BiomeTemperature::new(worker.settings()), &op[1], out)?, + _ => panic!("unknown operation"), + } + } + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let settings = if let Some(json) = f.get("json") { + match BiomeTemperatureSettings::from_json(json.as_str().unwrap()) { + Ok(value) => value, + Err(_) => { + writeln!(out, "decode error")?; + continue; + } + } + } else { + BiomeTemperatureSettings { + base_temperature: f32::from_bits(u32::from_str_radix( + f["base"].as_str().unwrap(), + 16, + )?), + downfall: f32::from_bits(u32::from_str_radix( + f.get("downfall").and_then(Value::as_str).unwrap_or("0"), + 16, + )?), + modifier: if f["modifier"].as_str().unwrap() == "FROZEN" { + TemperatureModifier::Frozen + } else { + TemperatureModifier::None + }, + has_precipitation: f["precipitation"].as_bool().unwrap(), + } + }; + writeln!( + out, + "settings {} {:x} {} {:x}", + settings.has_precipitation, + bits(settings.base_temperature), + if settings.modifier == TemperatureModifier::Frozen { + "FROZEN" + } else { + "NONE" + }, + bits(settings.downfall) + )?; + operations(&mut BiomeTemperature::new(settings), &f["ops"], &mut out)?; + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-world/examples/block_collision_scan_fixture.rs b/crates/horizon-world/examples/block_collision_scan_fixture.rs new file mode 100644 index 000000000..40fbd2182 --- /dev/null +++ b/crates/horizon-world/examples/block_collision_scan_fixture.rs @@ -0,0 +1,260 @@ +use horizon_core::{ + geometry::{Aabb, Axis, ShapeOp, Vec3, VoxelShape}, + position::{BlockPos, ChunkPos}, +}; +use horizon_world::{ + block_collision_scan::{BlockCollisionScan, BlockCollisionWorld, CollisionBlock}, + collision_context::{CollisionContext, CollisionEntity}, + entity_obstruction::EntityIdentity, + ground_support::find_supporting_block, + registry::BlockStateId, +}; +use serde_json::Value; +use std::{ + cell::RefCell, + fs, + io::{self, Write}, + path::Path, + rc::Rc, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn values( + out: &mut impl Write, + label: &str, + values: impl IntoIterator<Item = f64>, +) -> io::Result<()> { + write!(out, "{label}")?; + for v in values { + let bits = if v.is_nan() { + 0x7ff8_0000_0000_0000 + } else { + v.to_bits() + }; + write!(out, " {bits:016x}")?; + } + writeln!(out) +} +fn box_values(out: &mut impl Write, label: &str, b: Aabb) -> io::Result<()> { + values( + out, + label, + [ + b.min(Axis::X), + b.min(Axis::Y), + b.min(Axis::Z), + b.max(Axis::X), + b.max(Axis::Y), + b.max(Axis::Z), + ], + ) +} +fn emit(out: &mut impl Write, shape: &VoxelShape) -> io::Result<()> { + writeln!( + out, + "shape {} {} {}", + shape.is_empty(), + shape.boxes().len(), + shape.is_cube() + )?; + for (axis, name) in Axis::ALL.into_iter().zip(["x", "y", "z"]) { + values(out, name, shape.coordinates(axis).iter().copied())?; + } + let axes = shape.cube_coordinate_axes(); + writeln!( + out, + "axes {}", + u8::from(axes[0]) + 2 * u8::from(axes[1]) + 4 * u8::from(axes[2]) + )?; + values( + out, + "extrema", + Axis::ALL + .map(|a| shape.min(a)) + .into_iter() + .chain(Axis::ALL.map(|a| shape.max(a))), + )?; + match shape.bounds() { + Some(b) => box_values(out, "bounds", b)?, + None => writeln!(out, "bounds none")?, + } + for b in shape.boxes() { + box_values(out, "box", *b)?; + } + Ok(()) +} + +fn shape(index: u64) -> VoxelShape { + let cuboid = |min, max| VoxelShape::from_box(Aabb::new(min, max)).unwrap(); + match index { + 0 => VoxelShape::empty(), + 1 => VoxelShape::block(), + 2 => VoxelShape::block().moved(Vec3::ZERO), + 3 => cuboid(Vec3::ZERO, Vec3::new(1.0, 0.5, 1.0)), + 4 => cuboid(Vec3::new(-0.25, -0.5, -0.25), Vec3::new(1.25, 1.5, 1.25)), + 5 => cuboid(Vec3::ZERO, Vec3::new(1e-8, 1.0, 1.0)), + 6 => cuboid(Vec3::ZERO, Vec3::new(0.25, 1.0, 0.25)) + .join( + &cuboid(Vec3::new(0.75, 0.0, 0.75), Vec3::new(1.0, 1.0, 1.0)), + ShapeOp::OR, + ) + .unwrap(), + _ => unreachable!(), + } +} +struct Entry { + block: CollisionBlock, + shape: VoxelShape, + suffocating: bool, +} +struct World<W> { + out: Rc<RefCell<W>>, + calls: i32, + fail: i32, + missing: i32, + seed: i32, + palette: Vec<Entry>, +} +impl<W: Write> World<W> { + fn query(&mut self, value: &str) -> io::Result<()> { + writeln!(self.out.borrow_mut(), "{value}")?; + let index = self.calls; + self.calls += 1; + if index == self.fail { + return Err(io::Error::other("injected collision scan failure")); + } + Ok(()) + } +} +impl<W: Write> BlockCollisionWorld for World<W> { + type Error = io::Error; + type Chunk = ChunkPos; + fn collision_chunk(&mut self, p: ChunkPos) -> io::Result<Option<ChunkPos>> { + self.query(&format!("chunk {} {}", p.x, p.z))?; + Ok( + if self.missing == 1 || self.missing == 2 && (p.x ^ p.z) & 1 != 0 { + None + } else { + Some(p) + }, + ) + } + fn collision_block(&mut self, chunk: ChunkPos, p: BlockPos) -> io::Result<CollisionBlock> { + assert_eq!(chunk, p.chunk()); + self.query(&format!("block {} {} {}", p.x, p.y, p.z))?; + let hash = + p.x.wrapping_mul(3) + .wrapping_add(p.y.wrapping_mul(5)) + .wrapping_add(p.z.wrapping_mul(7)) + .wrapping_add(self.seed) + & i32::MAX; + Ok(self.palette[hash as usize % self.palette.len()].block) + } + fn is_suffocating( + &mut self, + chunk: ChunkPos, + block: CollisionBlock, + p: BlockPos, + ) -> io::Result<bool> { + assert_eq!(chunk, p.chunk()); + self.query(&format!( + "suffocating {} {} {} {}", + p.x, p.y, p.z, block.state.0 + ))?; + Ok(self.palette[block.state.0 as usize].suffocating) + } + fn context_shape( + &mut self, + block: CollisionBlock, + p: BlockPos, + _: &CollisionContext<'_>, + ) -> io::Result<VoxelShape> { + self.query(&format!("shape {} {} {} {}", p.x, p.y, p.z, block.state.0))?; + Ok(self.palette[block.state.0 as usize].shape.clone()) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let out = Rc::new(RefCell::new(io::BufWriter::new(fs::File::create( + dir.join("rust.txt"), + )?))); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let palette = f["palette"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(i, v)| Entry { + block: CollisionBlock { + state: BlockStateId(i as u32), + large_collision_shape: v[1].as_bool().unwrap(), + moving_piston: v[2].as_bool().unwrap(), + }, + shape: shape(v[0].as_u64().unwrap()), + suffocating: v[3].as_bool().unwrap(), + }) + .collect(); + let mut world = World { + out: out.clone(), + calls: 0, + fail: f["fail"].as_i64().unwrap() as i32, + missing: f["missing"].as_i64().unwrap() as i32, + seed: f["seed"].as_i64().unwrap() as i32, + palette, + }; + let v = &f["box"]; + let bounds = Aabb::new( + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])), + Vec3::new(number(&v[3]), number(&v[4]), number(&v[5])), + ); + if let Some(p) = f.get("support_position") { + let position = Vec3::new(number(&p[0]), number(&p[1]), number(&p[2])); + let context = CollisionContext::for_entity( + CollisionEntity { + identity: EntityIdentity(1), + y: position.y, + descending: false, + main_hand: None, + }, + false, + ); + match find_supporting_block(&mut world, context, position, bounds, 1_000_000) { + Ok(Some(p)) => writeln!(out.borrow_mut(), "support {} {} {}", p.x, p.y, p.z)?, + Ok(None) => writeln!(out.borrow_mut(), "support none")?, + Err(_) => writeln!(out.borrow_mut(), "support error")?, + } + writeln!(out.borrow_mut(), "done support {}", world.calls)?; + continue; + } + let mut hits = 0; + { + let mut scan = BlockCollisionScan::new( + &mut world, + CollisionContext::empty(false), + bounds, + f["suffocating"].as_bool().unwrap(), + 1_000_000, + )?; + for _ in 0..f["limit"].as_u64().unwrap() { + match scan.next() { + None => break, + Some(Ok(hit)) => { + let p = hit.position; + writeln!(out.borrow_mut(), "hit {} {} {}", p.x, p.y, p.z)?; + emit(&mut *out.borrow_mut(), &hit.shape)?; + hits += 1; + } + Some(Err(_)) => { + writeln!(out.borrow_mut(), "error")?; + break; + } + } + } + } + writeln!(out.borrow_mut(), "done {hits} {}", world.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/block_entity_storage_fixture.rs b/crates/horizon-world/examples/block_entity_storage_fixture.rs new file mode 100644 index 000000000..e321f23fe --- /dev/null +++ b/crates/horizon-world/examples/block_entity_storage_fixture.rs @@ -0,0 +1,169 @@ +use horizon_core::position::{BlockPos, ChunkPos}; +use horizon_world::{ + block_entities::{ProtoBlockEntities, position_from_tag}, + nbt::Tag, +}; +use std::{ + fs, + io::{self, BufRead, Write}, + str::SplitWhitespace, +}; +struct Input<'a>(SplitWhitespace<'a>); +impl Input<'_> { + fn int(&mut self) -> i32 { + self.0.next().unwrap().parse().unwrap() + } + fn long(&mut self) -> i64 { + self.0.next().unwrap().parse().unwrap() + } + fn pos(&mut self) -> BlockPos { + BlockPos::new(self.int(), self.int(), self.int()) + } + fn tag(&mut self) -> Option<Tag> { + let kind = self.0.next().unwrap(); + let text = self.0.next().unwrap(); + Some(match kind { + "none" => return None, + "byte" => Tag::Byte(text.parse().unwrap()), + "short" => Tag::Short(text.parse().unwrap()), + "int" => Tag::Int(text.parse().unwrap()), + "long" => Tag::Long(text.parse().unwrap()), + "float" => { + let bits = u32::from_str_radix(text, 16).unwrap(); + Tag::Float(if f32::from_bits(bits) == 0.0 { 0 } else { bits }) + } + "double" => { + let bits = u64::from_str_radix(text, 16).unwrap(); + Tag::Double(if f64::from_bits(bits) == 0.0 { 0 } else { bits }) + } + "string" => Tag::String(text.into()), + _ => panic!("unknown atom"), + }) + } +} +fn xyz(p: BlockPos) -> String { + format!("{} {} {}", p.x, p.y, p.z) +} +fn atom(tag: Option<&Tag>) -> String { + match tag { + None => "none".into(), + Some(Tag::Float(v)) => format!("float:{v:x}"), + Some(Tag::Double(v)) => format!("double:{v:x}"), + Some(Tag::Byte(v)) => format!("1:{v}"), + Some(Tag::Short(v)) => format!("2:{v}"), + Some(Tag::Int(v)) => format!("3:{v}"), + Some(Tag::Long(v)) => format!("4:{v}"), + Some(v) => format!("{}:invalid", v.id()), + } +} +fn pending(tag: Option<&Tag>) -> String { + match tag { + None => "none".into(), + Some(tag) => { + let Some(Tag::Long(mark)) = tag.get("mark") else { + panic!("missing marker") + }; + format!( + "{mark} {} {} {}", + atom(tag.get("x")), + atom(tag.get("y")), + atom(tag.get("z")) + ) + } + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let args: Vec<_> = std::env::args().collect(); + let mut out = io::BufWriter::new(fs::File::create(&args[2])?); + let mut position = ChunkPos::default(); + let mut chunk = ProtoBlockEntities::<i64>::new(position); + for (index, line) in io::BufReader::new(fs::File::open(&args[1])?) + .lines() + .enumerate() + { + let line = line?; + let mut input = Input(line.split_whitespace()); + let op = input.0.next().unwrap(); + writeln!(out, "command {index} {op}")?; + match op { + "reset" => { + position = ChunkPos::new(input.int(), input.int()); + chunk = ProtoBlockEntities::new(position); + } + "pending" | "resolve" => { + let mut entries = std::collections::BTreeMap::new(); + entries.insert("mark".into(), Tag::Long(input.long())); + for name in ["x", "y", "z"] { + if let Some(tag) = input.tag() { + entries.insert(name.into(), tag); + } + } + let tag = Tag::Compound(entries); + writeln!(out, "position {}", xyz(position_from_tag(position, &tag)?))?; + if op == "pending" { + chunk.set_pending(tag)?; + } + } + "active" => { + let p = input.pos(); + chunk.set_active(p, input.long()); + } + "remove" => { + chunk.remove(input.pos()); + } + "mutate" => { + let p = input.pos(); + let x = input.int(); + if let Some(Tag::Compound(map)) = chunk.pending_mut(p) { + map.insert("x".into(), Tag::Int(x)); + } + } + "get" => { + let p = input.pos(); + writeln!( + out, + "active {}", + chunk.active(p).map_or("none".into(), ToString::to_string) + )?; + writeln!(out, "pending {}", pending(chunk.pending(p)))?; + } + "save" => { + let p = input.pos(); + let saved = chunk.for_saving(p, |mark| { + Ok::<_, io::Error>(Tag::compound([("LootTableSeed", Tag::Long(*mark))])) + })?; + if chunk.active(p).is_some() { + let Some(Tag::Long(seed)) = saved.as_ref().unwrap().get("LootTableSeed") else { + unreachable!() + }; + writeln!(out, "saved active minecraft:chest {} {seed}", xyz(p))?; + } else { + writeln!(out, "saved pending {}", pending(saved.as_ref()))?; + } + } + "dump" => { + let mut positions: Vec<_> = chunk.positions().into_iter().collect(); + positions.sort_by_key(|p| (p.x, p.y, p.z)); + for p in &positions { + writeln!( + out, + "entry {} {} {}", + xyz(*p), + chunk.active(*p).map_or("none".into(), ToString::to_string), + pending(chunk.pending(*p)) + )?; + } + writeln!( + out, + "size {} {}", + positions.len(), + chunk.pending_entries().len() + )?; + } + _ => panic!("unknown command"), + } + assert!(input.0.next().is_none()); + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-world/examples/block_landing_fixture.rs b/crates/horizon-world/examples/block_landing_fixture.rs new file mode 100644 index 000000000..9e20d5a1b --- /dev/null +++ b/crates/horizon-world/examples/block_landing_fixture.rs @@ -0,0 +1,326 @@ +use horizon_core::{ + geometry::{Aabb, Axis, Vec3, VoxelShape}, + position::BlockPos, +}; +use horizon_world::{ + block_entity_push::BlockPushWorld, + block_landing::*, + collision::CachedCollisionRegistry, + entity_obstruction::EntityIdentity, + movement_properties::MovementProperties, + nbt::{self, Limits, Tag}, + registry::{BlockRegistry, BlockStateId}, +}; +use serde_json::Value; +use std::{ + collections::BTreeMap, + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn fbits(v: f32) -> u32 { + if v.is_nan() { 0x7fc00000 } else { v.to_bits() } +} +fn pos(p: BlockPos) -> String { + format!("{} {} {}", p.x, p.y, p.z) +} +fn bbox(v: &Value) -> Aabb { + Aabb::new( + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])), + Vec3::new(number(&v[3]), number(&v[4]), number(&v[5])), + ) +} +fn bounds(label: &str, b: Aabb) -> String { + format!( + "{label} {:016x} {:016x} {:016x} {:016x} {:016x} {:016x}", + bits(b.min(Axis::X)), + bits(b.min(Axis::Y)), + bits(b.min(Axis::Z)), + bits(b.max(Axis::X)), + bits(b.max(Axis::Y)), + bits(b.max(Axis::Z)) + ) +} +struct World<'a, 'r> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + state: BlockStateId, + air: BlockStateId, + collision: &'a CachedCollisionRegistry<'r>, + entities: Vec<Aabb>, +} +impl World<'_, '_> { + fn flag(&self, k: &str) -> bool { + self.f[k].as_bool().unwrap() + } + fn query(&mut self, s: String) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let call = self.calls; + self.calls += 1; + if call == self.f["fail"].as_i64().unwrap() { + Err(io::Error::other("injected landing failure")) + } else { + Ok(()) + } + } +} +impl BlockPushWorld for World<'_, '_> { + type Error = io::Error; + fn collision_shape(&mut self, s: BlockStateId, _: BlockPos) -> io::Result<VoxelShape> { + Ok(self + .collision + .cached_shape(s)? + .expect("registered farmland/base shapes cached") + .clone()) + } + fn entities(&mut self, b: Aabb) -> io::Result<Vec<EntityIdentity>> { + self.query(bounds("entities", b))?; + Ok((0..self.entities.len()) + .map(|i| EntityIdentity(i as u64)) + .collect()) + } + fn entity_bounds(&self, e: EntityIdentity) -> Aabb { + self.entities[e.0 as usize] + } + fn teleport_relative(&mut self, e: EntityIdentity, v: Vec3) -> io::Result<()> { + self.query(format!( + "teleport {} {:016x} {:016x} {:016x}", + e.0, + bits(v.x), + bits(v.y), + bits(v.z) + ))?; + let i = e.0 as usize; + self.entities[i] = self.entities[i].move_by(v); + if self.flag("mutate") && i + 1 < self.entities.len() { + self.entities[i + 1] = self.entities[i + 1].move_by(Vec3::new(0.0, 0.125, 0.0)); + } + Ok(()) + } +} +impl BlockLandingWorld for World<'_, '_> { + type DamageSource = &'static str; + type Sound = &'static str; + fn is_server_level(&self) -> bool { + self.flag("server") + } + fn is_client_side(&mut self) -> io::Result<bool> { + self.query("client".into())?; + Ok(self.flag("client")) + } + fn random_float(&mut self) -> io::Result<f32> { + self.query("random".into())?; + self.query("float".into())?; + Ok(single(&self.f["random_float"])) + } + fn random_int(&mut self, b: i32) -> io::Result<i32> { + self.query("random".into())?; + self.query(format!("int {b}"))?; + Ok(self.f["random_int"].as_i64().unwrap() as i32) + } + fn under_spawn_protection(&mut self, p: BlockPos) -> io::Result<bool> { + self.query("server".into())?; + self.query(format!("protection {}", pos(p)))?; + Ok(self.flag("protected")) + } + fn mob_griefing(&mut self) -> io::Result<bool> { + self.query("rules".into())?; + self.query("mob-griefing".into())?; + Ok(self.flag("griefing")) + } + fn entity_dimensions(&self) -> (f32, f32) { + (single(&self.f["width"]), single(&self.f["height"])) + } + fn suppressing_bounce(&mut self) -> io::Result<bool> { + self.query("suppress".into())?; + Ok(self.flag("suppress")) + } + fn damage_source( + &mut self, + o: DamageSourceOwner, + k: LandingDamage, + ) -> io::Result<Self::DamageSource> { + self.query( + match o { + DamageSourceOwner::Entity => "entity-sources", + DamageSourceOwner::Level => "level-sources", + } + .into(), + )?; + let k = match k { + LandingDamage::Fall => "fall", + LandingDamage::Stalagmite => "stalagmite", + }; + self.query(format!("{k}-source"))?; + Ok(k) + } + fn cause_fall_damage(&mut self, d: f64, m: f32, s: Self::DamageSource) -> io::Result<bool> { + self.query(format!("damage {:016x} {:08x} {s}", bits(d), fbits(m)))?; + Ok(self.flag("damage")) + } + fn known_sound(&self, s: LandingSound) -> Self::Sound { + match s { + LandingSound::HoneySlide => "honey-slide", + LandingSound::HoneyFall => "honey-fall", + LandingSound::TurtleEggBreak => "egg-break", + LandingSound::ShelfMushroomBounce => "mushroom", + } + } + fn living_fall_sound(&mut self, big: bool) -> io::Result<Self::Sound> { + self.query("fall-sounds".into())?; + Ok(if big { "big" } else { "small" }) + } + fn entity_sound(&mut self, s: Self::Sound, v: f32, p: f32) -> io::Result<()> { + self.query(format!( + "entity-sound {s} {:08x} {:08x}", + fbits(v), + fbits(p) + )) + } + fn block_sound(&mut self, p: BlockPos, s: Self::Sound, v: f32, pitch: f32) -> io::Result<()> { + self.query(format!( + "block-sound {} {s} {:08x} {:08x}", + pos(p), + fbits(v), + fbits(pitch) + )) + } + fn broadcast_entity_event(&mut self, e: u8) -> io::Result<()> { + self.query(format!("broadcast {e}")) + } + fn destroy_block(&mut self, p: BlockPos, drops: bool) -> io::Result<bool> { + self.query(format!("destroy {} {drops}", pos(p)))?; + if self.flag("write") { + self.state = self.air; + } + Ok(self.flag("write")) + } + fn set_block(&mut self, p: BlockPos, s: BlockStateId, flags: u32) -> io::Result<bool> { + self.query(format!("set {} {} {flags}", pos(p), s.0))?; + if self.flag("write") { + self.state = s; + } + Ok(self.flag("write")) + } + fn block_event( + &mut self, + e: LandingEvent, + p: BlockPos, + s: BlockStateId, + entity: bool, + ) -> io::Result<()> { + self.query(format!( + "event {} {} {} {entity}", + match e { + LandingEvent::BlockChange => "change", + LandingEvent::BlockDestroy => "destroy", + }, + pos(p), + s.0 + )) + } + fn level_event(&mut self, e: i32, p: BlockPos, d: i32) -> io::Result<()> { + self.query(format!("level-event {e} {} {d}", pos(p))) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + let read = |name: &str| -> Result<Tag, Box<dyn std::error::Error>> { + Ok( + nbt::read_named(&fs::read(dir.join(name))?, Limits::default())? + .0 + .tag, + ) + }; + let registry = BlockRegistry::from_nbt(&read("block-registry.nbt")?)?; + let data = read("movement-properties.nbt")?; + let properties = MovementProperties::from_nbt(&data, ®istry)?; + let collision = CachedCollisionRegistry::from_nbt(&read("cached-collision.nbt")?, ®istry)?; + let raw: BTreeMap<String, Value> = + serde_json::from_str(&fs::read_to_string(dir.join("landing-definitions.json"))?)?; + let mut definitions = BTreeMap::new(); + for (name, d) in raw { + let fall = match d["fall"].as_str().unwrap() { + "Block" => FallDefinition::Default, + "HayBlock" => FallDefinition::Hay, + "HoneyBlock" => FallDefinition::Honey { + volume: single(&d["volume"]), + pitch: single(&d["pitch"]), + }, + "SlimeBlock" => FallDefinition::Slime, + "PowderSnowBlock" => FallDefinition::PowderSnow, + "PointedDripstoneBlock" => FallDefinition::PointedDripstone, + "FarmlandBlock" => FallDefinition::Farmland { + base_block: d["base"].as_str().unwrap().into(), + }, + "TurtleEggBlock" => FallDefinition::TurtleEgg, + _ => panic!("unknown landing family"), + }; + definitions.insert( + name, + LandingDefinition { + fall, + shelf_mushroom_bounce: d["bounce"].as_bool().unwrap(), + }, + ); + } + let landing = BlockLandingRegistry::new(&properties, &definitions)?; + let kinds = [ + LandingEntityKind::Other, + LandingEntityKind::Living, + LandingEntityKind::Player, + LandingEntityKind::Zombie, + LandingEntityKind::Turtle, + LandingEntityKind::Bat, + LandingEntityKind::Item, + LandingEntityKind::PrimedTnt, + ]; + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let s = BlockStateId(f["state"].as_u64().unwrap() as u32); + let p = &f["position"]; + let p = BlockPos::new( + p[0].as_i64().unwrap() as i32, + p[1].as_i64().unwrap() as i32, + p[2].as_i64().unwrap() as i32, + ); + let kind = kinds[f["kind"].as_u64().unwrap() as usize]; + let mut world = World { + f: &f, + out: &mut out, + calls: 0, + state: s, + air: registry.default_state("minecraft:air").unwrap(), + collision: &collision, + entities: f["entities"].as_array().unwrap().iter().map(bbox).collect(), + }; + let result = if world.flag("bounce") { + landing.bounce_on(&mut world, s, p, kind) + } else { + landing.fall_on(&mut world, s, p, kind, number(&f["distance"])) + }; + writeln!(world.out, "{}", if result.is_ok() { "ok" } else { "error" })?; + writeln!(world.out, "state {}", world.state.0)?; + for (i, b) in world.entities.iter().enumerate() { + writeln!(world.out, "{}", bounds(&format!("final {i}"), *b))?; + } + writeln!(world.out, "queries {}", world.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/block_properties_fixture.rs b/crates/horizon-world/examples/block_properties_fixture.rs new file mode 100644 index 000000000..3404b1fa1 --- /dev/null +++ b/crates/horizon-world/examples/block_properties_fixture.rs @@ -0,0 +1,160 @@ +use horizon_core::geometry::{Aabb, Axis, Direction, ShapeOp, Vec3, VoxelShape}; +use horizon_world::{ + block_properties::{BlockDefinitionProperties, BlockPropertiesRegistry, BlockProperty}, + collision::CachedCollisionRegistry, + nbt::{self, Limits, Tag}, + registry::{BlockRegistry, BlockStateId}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn bbox(v: &Value) -> Aabb { + let v = v + .as_array() + .unwrap() + .iter() + .map(|v| f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap())) + .collect::<Vec<_>>(); + Aabb::new(Vec3::new(v[0], v[1], v[2]), Vec3::new(v[3], v[4], v[5])) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let read = |name: &str| -> Result<Tag, Box<dyn std::error::Error>> { + Ok( + nbt::read_named(&fs::read(dir.join(name))?, Limits::default())? + .0 + .tag, + ) + }; + let registry = BlockRegistry::from_nbt(&read("block-registry.nbt")?)?; + let collisions = CachedCollisionRegistry::from_nbt(&read("cached-collision.nbt")?, ®istry)?; + let data = read("block-properties.nbt")?; + let properties = BlockPropertiesRegistry::from_nbt(&data, &collisions)?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + let solid = properties.bind(BlockProperty::Solid); + let replaceable = properties.bind(BlockProperty::Replaceable); + let faces = properties.bind_occlusion_faces(); + assert!( + faces + .is_full(BlockStateId(registry.len() as u32), Direction::Up) + .is_err() + ); + for id in 0..registry.len() { + let state = BlockStateId(id as u32); + let definition = properties + .definition(®istry.state(state).unwrap().name) + .unwrap(); + let s = properties.property(state, BlockProperty::Solid)?; + let r = properties.property(state, BlockProperty::Replaceable)?; + assert_eq!(s, solid.contains(state)); + assert_eq!(r, replaceable.contains(state)); + writeln!( + out, + "state {id} {} {} {r} {s}", + definition.force_solid_on, definition.force_solid_off + )?; + writeln!( + out, + "render {} {} {}", + properties.property(state, BlockProperty::Liquid)?, + definition.can_occlude, + properties.property(state, BlockProperty::SolidRender)? + )?; + assert_eq!( + properties.property(state, BlockProperty::Liquid)?, + properties.bind(BlockProperty::Liquid).contains(state) + ); + assert_eq!( + properties.property(state, BlockProperty::SolidRender)?, + properties.bind(BlockProperty::SolidRender).contains(state) + ); + let mut mask = 0; + for direction in Direction::ALL { + if faces.is_full(state, direction)? { + mask |= 1 << direction as u8; + } + } + writeln!(out, "occlusion {mask}")?; + match collisions.cached_shape(state)? { + None => writeln!(out, "cache none")?, + Some(shape) => match shape.bounds() { + None => writeln!(out, "cache empty")?, + Some(b) => { + let v = [ + b.min(Axis::X), + b.min(Axis::Y), + b.min(Axis::Z), + b.max(Axis::X), + b.max(Axis::Y), + b.max(Axis::Z), + ] + .map(f64::to_bits); + writeln!( + out, + "cache {:016x} {:016x} {:016x} {:016x} {:016x} {:016x}", + v[0], v[1], v[2], v[3], v[4], v[5] + )?; + } + }, + } + } + assert!( + properties + .property(BlockStateId(registry.len() as u32), BlockProperty::Solid) + .is_err() + ); + for (name, value) in [ + ("DataVersion", Tag::Int(0)), + ("states", Tag::List(vec![])), + ("blocks", Tag::compound([] as [(&str, Tag); 0])), + ("occlusion", Tag::compound([] as [(&str, Tag); 0])), + ] { + let mut bad = data.clone(); + *bad.get_mut(name).unwrap() = value; + assert!(BlockPropertiesRegistry::from_nbt(&bad, &collisions).is_err()); + } + for flags in [-1, 32] { + let mut bad = data.clone(); + *bad.get_mut("blocks") + .unwrap() + .get_mut("minecraft:stone") + .unwrap() = Tag::Byte(flags); + assert!(BlockPropertiesRegistry::from_nbt(&bad, &collisions).is_err()); + } + let mut bad = data.clone(); + let Some(Tag::List(states)) = bad.get_mut("states") else { + unreachable!() + }; + states.swap(0, 1); + assert!(BlockPropertiesRegistry::from_nbt(&bad, &collisions).is_err()); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut shape = VoxelShape::empty(); + for v in f["shape"].as_array().unwrap() { + shape = shape.join(&VoxelShape::from_box(bbox(v))?, ShapeOp::OR)?; + } + let properties = BlockDefinitionProperties { + force_solid_on: f["on"].as_bool().unwrap(), + force_solid_off: f["off"].as_bool().unwrap(), + replaceable: false, + liquid: false, + can_occlude: f["occludes"].as_bool().unwrap(), + }; + writeln!( + out, + "solid {}", + properties.calculate_solid(f["cached"].as_bool().unwrap().then_some(&shape)) + )?; + writeln!(out, "render {}", properties.calculate_solid_render(&shape)?)?; + writeln!( + out, + "occlusion {}", + properties.calculate_full_occlusion_faces(&shape)? + )?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/block_push_fixture.rs b/crates/horizon-world/examples/block_push_fixture.rs new file mode 100644 index 000000000..8871b1070 --- /dev/null +++ b/crates/horizon-world/examples/block_push_fixture.rs @@ -0,0 +1,129 @@ +use horizon_core::{ + geometry::{Aabb, Axis, ShapeOp, Vec3, VoxelShape}, + position::BlockPos, +}; +use horizon_world::{ + block_entity_push::{BlockPushWorld, push_entities_up}, + entity_obstruction::EntityIdentity, + registry::BlockStateId, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn bbox(v: &Value) -> Aabb { + Aabb::new( + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])), + Vec3::new(number(&v[3]), number(&v[4]), number(&v[5])), + ) +} +fn bounds(label: &str, b: Aabb) -> String { + format!( + "{label} {:016x} {:016x} {:016x} {:016x} {:016x} {:016x}", + bits(b.min(Axis::X)), + bits(b.min(Axis::Y)), + bits(b.min(Axis::Z)), + bits(b.max(Axis::X)), + bits(b.max(Axis::Y)), + bits(b.max(Axis::Z)) + ) +} +fn shape(v: &Value) -> Result<VoxelShape, Box<dyn std::error::Error>> { + let mut s = VoxelShape::empty(); + for b in v.as_array().unwrap() { + s = s.join(&VoxelShape::from_box(bbox(b))?, ShapeOp::OR)?; + } + Ok(s) +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + shapes: [VoxelShape; 2], + entities: Vec<Aabb>, +} +impl World<'_> { + fn query(&mut self, s: String) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let call = self.calls; + self.calls += 1; + if call == self.f["fail"].as_i64().unwrap() { + Err(io::Error::other("injected push failure")) + } else { + Ok(()) + } + } +} +impl BlockPushWorld for World<'_> { + type Error = io::Error; + fn collision_shape(&mut self, s: BlockStateId, p: BlockPos) -> io::Result<VoxelShape> { + self.query(format!("shape {} {} {} {}", s.0, p.x, p.y, p.z))?; + Ok(self.shapes[s.0 as usize].clone()) + } + fn entities(&mut self, b: Aabb) -> io::Result<Vec<EntityIdentity>> { + self.query(bounds("entities", b))?; + Ok((0..self.entities.len()) + .map(|i| EntityIdentity(i as u64)) + .collect()) + } + fn entity_bounds(&self, e: EntityIdentity) -> Aabb { + self.entities[e.0 as usize] + } + fn teleport_relative(&mut self, e: EntityIdentity, v: Vec3) -> io::Result<()> { + self.query(format!( + "teleport {} {:016x} {:016x} {:016x}", + e.0, + bits(v.x), + bits(v.y), + bits(v.z) + ))?; + let index = e.0 as usize; + self.entities[index] = self.entities[index].move_by(v); + if self.f["mutate"].as_bool().unwrap() && index + 1 < self.entities.len() { + self.entities[index + 1] = self.entities[index + 1].move_by(Vec3::new(0.0, 0.125, 0.0)); + } + Ok(()) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let p = &f["position"]; + let pos = BlockPos::new( + p[0].as_i64().unwrap() as i32, + p[1].as_i64().unwrap() as i32, + p[2].as_i64().unwrap() as i32, + ); + let mut world = World { + f: &f, + out: &mut out, + calls: 0, + shapes: [shape(&f["old"])?, shape(&f["new"])?], + entities: f["entities"].as_array().unwrap().iter().map(bbox).collect(), + }; + match push_entities_up(&mut world, BlockStateId(0), BlockStateId(1), pos) { + Ok(state) => writeln!(world.out, "result {}", state == BlockStateId(1))?, + Err(_) => writeln!(world.out, "error")?, + }; + for (i, b) in world.entities.iter().enumerate() { + writeln!(world.out, "{}", bounds(&format!("final {i}"), *b))?; + } + writeln!(world.out, "queries {}", world.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/block_state_codec_fixture.rs b/crates/horizon-world/examples/block_state_codec_fixture.rs new file mode 100644 index 000000000..d0632ae86 --- /dev/null +++ b/crates/horizon-world/examples/block_state_codec_fixture.rs @@ -0,0 +1,70 @@ +//! Original JSON block-state codec comparison transport. +use horizon_world::{ + DATA_VERSION, + nbt::Tag, + registry::{BlockRegistry, BlockStateId, BlockStateJsonCodec}, +}; +use serde_json::Value; +use std::{ + collections::BTreeSet, + fs, + io::{self, Write}, + path::Path, +}; +fn tag(v: &Value) -> Tag { + match v { + Value::String(s) => Tag::String(s.as_str().into()), + Value::Number(n) => Tag::Int(n.as_i64().unwrap() as i32), + Value::Array(a) => Tag::List(a.iter().map(tag).collect()), + Value::Object(m) => { + Tag::Compound(m.iter().map(|(k, v)| (k.as_str().into(), tag(v))).collect()) + } + _ => panic!("invalid registry metadata"), + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ("states", tag(&facts["states"])), + ("defaults", tag(&facts["defaults"])), + ]))?; + let integers: BTreeSet<_> = facts["integers"] + .as_array() + .unwrap() + .iter() + .map(|v| { + ( + v[0].as_str().unwrap().to_owned(), + v[1].as_str().unwrap().to_owned(), + ) + }) + .collect(); + let codec = BlockStateJsonCodec::new(®istry, integers)?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for i in 0..registry.len() { + let id = BlockStateId(i as u32); + writeln!( + out, + "state {i} {} {}", + codec.encode(id, false)?, + codec.encode(id, true)? + )?; + } + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let input: Value = serde_json::from_str(line)?; + match codec.decode(input[1].as_str().unwrap(), input[0].as_bool().unwrap()) { + Err(_) => writeln!(out, "decode error")?, + Ok(id) => writeln!( + out, + "decode {} {} {}", + id.0, + codec.encode(id, false)?, + codec.encode(id, true)? + )?, + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/block_support_fixture.rs b/crates/horizon-world/examples/block_support_fixture.rs new file mode 100644 index 000000000..9c43d5798 --- /dev/null +++ b/crates/horizon-world/examples/block_support_fixture.rs @@ -0,0 +1,69 @@ +use horizon_core::geometry::Direction; +use horizon_world::{ + block_support::{CachedBlockSupportRegistry, SupportType}, + nbt::{self, Limits, Tag}, + registry::{BlockRegistry, BlockStateId}, +}; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let read = |name: &str| -> Result<Tag, Box<dyn std::error::Error>> { + Ok( + nbt::read_named(&fs::read(dir.join(name))?, Limits::default())? + .0 + .tag, + ) + }; + let registry = BlockRegistry::from_nbt(&read("block-registry.nbt")?)?; + let tag = read("cached-support.nbt")?; + let support = CachedBlockSupportRegistry::from_nbt(&tag, ®istry)?; + assert_eq!(registry.len(), 35723); + assert_eq!(support.cached_state_count(), 35524); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for id in 0..registry.len() { + let state = BlockStateId(id as u32); + if support.cached_shape(state)?.is_none() { + writeln!(out, "state {id} uncached")?; + for d in Direction::ALL { + assert!( + support + .is_face_sturdy(state, d, SupportType::Full)? + .is_none() + ); + } + continue; + } + writeln!(out, "state {id} cached")?; + for d in Direction::ALL { + write!(out, "support {}", d as u8)?; + for t in [SupportType::Full, SupportType::Center, SupportType::Rigid] { + write!(out, " {}", support.is_face_sturdy(state, d, t)?.unwrap())?; + } + writeln!( + out, + " {}", + support + .is_face_sturdy(state, d, SupportType::Full)? + .unwrap() + )?; + } + } + let mut bad = tag.clone(); + *bad.get_mut("Kind").unwrap() = Tag::String("collision".into()); + assert!(CachedBlockSupportRegistry::from_nbt(&bad, ®istry).is_err()); + assert!( + support + .is_face_sturdy( + BlockStateId(registry.len() as u32), + Direction::Down, + SupportType::Full + ) + .is_err() + ); + Ok(()) +} diff --git a/crates/horizon-world/examples/block_survival_fixture.rs b/crates/horizon-world/examples/block_survival_fixture.rs new file mode 100644 index 000000000..e062eb8da --- /dev/null +++ b/crates/horizon-world/examples/block_survival_fixture.rs @@ -0,0 +1,279 @@ +use horizon_core::geometry::VoxelShape; +use horizon_world::{ + block_collision::{BlockCollisionRegistry, DynamicCollisionWorld, ShulkerCollisionState}, + block_properties::BlockPropertiesRegistry, + block_support::BlockSupportRegistry, + block_survival::{BlockSurvivalRegistry, SurvivalDefinitions, SurvivalRule, SurvivalWorld}, + collision::CachedCollisionRegistry, + dynamic_support::DynamicSupportWorld, + fluid::{FluidKind, FluidState, FluidStateTable}, + nbt::{self, Limits, Tag}, + registry::{BlockRegistry, BlockStateId}, + worldgen::tags::TagDefinitions, +}; +use serde_json::Value; +use std::{ + collections::BTreeMap, + fs, + io::{self, BufRead, Write}, + path::Path, + sync::Arc, +}; +struct World<'a, W> { + out: &'a mut W, + neighbors: Vec<BlockStateId>, + fluids: &'a FluidStateTable, + fluid_states: Vec<BlockStateId>, + fluid_calls: i32, + fluid_fail: i32, + entity: &'a str, + shulker: ShulkerCollisionState, + reads: i32, + lights: i32, + light_fail: i32, + brightness: i32, + entities: i32, + fail: i32, + entity_fail: i32, +} +impl<W: Write> World<'_, W> { + fn entity(&mut self, p: [i32; 3]) -> io::Result<()> { + writeln!(self.out, "entity {} {} {}", p[0], p[1], p[2])?; + let old = self.entities; + self.entities += 1; + if old == self.entity_fail { + return Err(io::Error::other("injected entity query failure")); + } + Ok(()) + } +} +impl<W: Write> DynamicSupportWorld for World<'_, W> { + type Error = io::Error; + fn shulker_is_closed(&mut self, p: [i32; 3]) -> io::Result<Option<bool>> { + self.entity(p)?; + Ok(match self.entity { + "none" => None, + "closed" => Some(true), + "opened" => Some(false), + _ => unreachable!(), + }) + } + fn moving_piston_shape(&mut self, p: [i32; 3]) -> io::Result<Option<VoxelShape>> { + self.entity(p)?; + Ok(None) + } +} +impl<W: Write> DynamicCollisionWorld for World<'_, W> { + fn shulker_collision_state( + &mut self, + p: [i32; 3], + ) -> io::Result<Option<ShulkerCollisionState>> { + self.entity(p)?; + Ok((self.entity != "none").then_some(self.shulker)) + } +} +impl<W: Write> SurvivalWorld for World<'_, W> { + fn fluid_state(&mut self, p: [i32; 3]) -> io::Result<FluidState> { + writeln!(self.out, "fluid {} {} {}", p[0], p[1], p[2])?; + let old = self.fluid_calls; + self.fluid_calls += 1; + if old == self.fluid_fail { + return Err(io::Error::other("injected fluid query failure")); + } + self.fluids + .get(self.fluid_states[old as usize % self.fluid_states.len()]) + .ok_or_else(|| io::Error::other("unknown fixture fluid state")) + } + fn raw_brightness(&mut self, p: [i32; 3], sky_darken: i32) -> io::Result<i32> { + writeln!(self.out, "light {} {} {} {sky_darken}", p[0], p[1], p[2])?; + let old = self.lights; + self.lights += 1; + if old == self.light_fail { + return Err(io::Error::other("injected light query failure")); + } + Ok(self.brightness) + } + fn block_state(&mut self, p: [i32; 3]) -> io::Result<BlockStateId> { + writeln!(self.out, "read {} {} {}", p[0], p[1], p[2])?; + let old = self.reads; + self.reads += 1; + if old == self.fail { + return Err(io::Error::other("injected block query failure")); + } + Ok(self.neighbors[old as usize % self.neighbors.len()]) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let read = |name: &str| -> Result<Tag, Box<dyn std::error::Error>> { + Ok( + nbt::read_named(&fs::read(dir.join(name))?, Limits::default())? + .0 + .tag, + ) + }; + let registry = BlockRegistry::from_nbt(&read("block-registry.nbt")?)?; + let collisions = CachedCollisionRegistry::from_nbt(&read("cached-collision.nbt")?, ®istry)?; + let properties = + BlockPropertiesRegistry::from_nbt(&read("block-properties.nbt")?, &collisions)?; + let support = Arc::new(BlockSupportRegistry::from_nbt( + &read("cached-support.nbt")?, + ®istry, + )?); + let resources: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?; + let mut tags = TagDefinitions::default(); + for (name, text) in resources { + tags.apply_json(&name, "vanilla", &text)?; + } + let tags = tags.build(|name, _| registry.default_state(name).map(|_| name.to_owned()))?; + assert!(tags.missing.is_empty()); + let definitions: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("survival-rules.json"))?)?; + let definitions = definitions + .into_iter() + .map(|(name, rule)| { + use SurvivalRule::*; + let rule = match rule.as_str() { + value if value.starts_with("TagBelow:") => TagBelow(value[9..].to_owned()), + "CactusFlower" => CactusFlower, + "Seagrass" => Seagrass, + "BubbleColumn" => BubbleColumn, + "RedstoneWire" => RedstoneWire, + "DoublePlant" => DoublePlant, + "Door" => Door, + "BigDripleaf" => BigDripleaf, + "BigDripleafStem" => BigDripleafStem, + "Farmland" => Farmland, + "Cocoa" => Cocoa, + "Crop" => Crop, + "GrowingPlant" => GrowingPlant, + "MangrovePropagule" => MangrovePropagule, + "Speleothem" => Speleothem, + "Scaffolding" => Scaffolding, + "PistonHead" => PistonHead, + "ChorusPlant" => ChorusPlant, + "ChorusFlower" => ChorusFlower, + "PitcherCrop" => PitcherCrop, + "Multiface" => Multiface, + "Vine" => Vine, + "HangingMoss" => HangingMoss, + "SnowLayer" => SnowLayer, + "SeaPickle" => SeaPickle, + "Fire" => Fire, + "Cactus" => Cactus, + "Path" => Path, + "Mushroom" => Mushroom, + "Bell" => Bell, + "SugarCane" => SugarCane, + "LilyPad" => LilyPad, + "Frogspawn" => Frogspawn, + "SporeBlossom" => SporeBlossom, + "SmallDripleaf" => SmallDripleaf, + "TallSeagrass" => TallSeagrass, + "Always" => Always, + "SolidBelow" => SolidBelow, + "SolidBehind" => SolidBehind, + "NonAirBelow" => NonAirBelow, + "MossCarpet" => MossCarpet, + "CenterBelow" => CenterBelow, + "Lantern" => Lantern, + "FullAbove" => FullAbove, + "FullBehind" => FullBehind, + "RigidOrCenterBelow" => RigidOrCenterBelow, + "RigidBelow" => RigidBelow, + "FullBelow" => FullBelow, + "CenterAbove" => CenterAbove, + "FaceAttached" => FaceAttached, + "SupportsBamboo" => SupportsBamboo, + _ => panic!("unknown rule {rule}"), + }; + (name, rule) + }) + .collect(); + let fluid_resources: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("fluid-tags.json"))?)?; + let mut fluid_tags = TagDefinitions::default(); + for (name, text) in fluid_resources { + fluid_tags.apply_json(&name, "vanilla", &text)?; + } + let fluid_tags = + fluid_tags.build(|name, _| FluidKind::from_name(name).map(|_| name.to_owned()))?; + assert!(fluid_tags.missing.is_empty()); + let fluids = FluidStateTable::new(®istry)?; + let collision = Arc::new(BlockCollisionRegistry::new(Arc::new(collisions))?); + let extra: Value = serde_json::from_str(&fs::read_to_string( + dir.join("survival-extra-definitions.json"), + )?)?; + let definitions = SurvivalDefinitions { + rules: definitions, + ignition_odds: serde_json::from_value(extra["ignition_odds"].clone())?, + fence_gates: serde_json::from_value(extra["fence_gates"].clone())?, + }; + let survival = BlockSurvivalRegistry::new( + ®istry, + &properties, + support, + collision, + &definitions, + &tags.tags, + &fluid_tags.tags, + )?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in io::BufReader::new(fs::File::open(dir.join("inputs.txt"))?).lines() { + let f: Value = serde_json::from_str(&line?)?; + let mut world = World { + out: &mut out, + fluids: &fluids, + fluid_states: f + .get("fluid_states") + .unwrap_or(&f["neighbors"]) + .as_array() + .unwrap() + .iter() + .map(|v| BlockStateId(v.as_u64().unwrap() as u32)) + .collect(), + fluid_calls: 0, + fluid_fail: f["fluid_fail"].as_i64().unwrap_or(-1) as i32, + neighbors: f["neighbors"] + .as_array() + .unwrap() + .iter() + .map(|v| BlockStateId(v.as_u64().unwrap() as u32)) + .collect(), + entity: f["entity"].as_str().unwrap(), + shulker: ShulkerCollisionState { + previous_progress: f.get("shulker_progress").map_or(0.0, |v| { + f32::from_bits(u32::from_str_radix(v[0].as_str().unwrap(), 16).unwrap()) + }), + progress: f.get("shulker_progress").map_or(0.0, |v| { + f32::from_bits(u32::from_str_radix(v[1].as_str().unwrap(), 16).unwrap()) + }), + }, + reads: 0, + lights: 0, + brightness: f["brightness"].as_i64().unwrap_or(15) as i32, + light_fail: f["light_fail"].as_i64().unwrap_or(-1) as i32, + entities: 0, + fail: f["fail"].as_i64().unwrap() as i32, + entity_fail: f["entity_fail"].as_i64().unwrap() as i32, + }; + let p = std::array::from_fn(|i| f["position"][i].as_i64().unwrap() as i32); + match survival.can_survive( + &mut world, + BlockStateId(f["state"].as_u64().unwrap() as u32), + p, + ) { + Ok(value) => writeln!(world.out, "survive {value}")?, + Err(_) => writeln!(world.out, "survive error")?, + } + writeln!( + world.out, + "counts {} {} {} {}", + world.reads, world.entities, world.lights, world.fluid_calls + )?; + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-world/examples/blocking_item_damage_fixture.rs b/crates/horizon-world/examples/blocking_item_damage_fixture.rs new file mode 100644 index 000000000..2fd39bea0 --- /dev/null +++ b/crates/horizon-world/examples/blocking_item_damage_fixture.rs @@ -0,0 +1,148 @@ +use horizon_world::item_durability::{self, DurabilityStack, DurabilityWorld}; +use horizon_world::{ + blocking_item_damage::{self, BlockingItemDamageWorld}, + blocking_rules::ItemDamageFunction, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn stack(v: &Value, air: bool) -> DurabilityStack { + DurabilityStack { + count: v["count"].as_i64().unwrap() as i32, + air, + max_damage: v["max"].as_i64().map(|v| v as i32), + damage: v["damage"].as_i64().map(|v| v as i32), + unbreakable: v["unbreakable"].as_bool().unwrap(), + } +} +fn optional(v: Option<i32>) -> String { + v.map_or("none".into(), |v| v.to_string()) +} +fn snapshot(s: &DurabilityStack) -> String { + format!( + "{} {} {} {} {} {} {} {} {} {} {} {}", + s.count, + s.count(), + optional(s.max_damage), + optional(s.damage), + s.unbreakable, + s.max_damage(), + s.damage(), + s.is_empty(), + s.is_damageable(), + s.is_damaged(), + s.is_broken(), + s.next_damage_will_break() + ) +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + changed: bool, +} +impl World<'_> { + fn event(&mut self, s: &mut DurabilityStack, name: &str) -> io::Result<()> { + writeln!(self.out, "{name} | {}", snapshot(s))?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected callback failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.changed = true; + *s = stack(&self.f["after"], s.air); + } + Ok(()) + } +} +impl DurabilityWorld for World<'_> { + type Error = io::Error; + type Stack = DurabilityStack; + fn storage_error(error: std::convert::Infallible) -> Self::Error { + match error {} + } + fn infinite_materials(&mut self, s: &mut DurabilityStack) -> io::Result<bool> { + self.event(s, "infinite")?; + Ok(self.f[if self.changed { + "after_infinite" + } else { + "infinite" + }] + .as_bool() + .unwrap()) + } + fn process_enchantments(&mut self, _: &mut DurabilityStack, amount: i32) -> io::Result<i32> { + Ok(item_durability::unenchanted_change(amount)) + } + fn durability_changed(&mut self, s: &mut DurabilityStack, _: i32) -> io::Result<()> { + self.event(s, "criterion") + } + fn broken(&mut self, s: &mut DurabilityStack, copy: DurabilityStack) -> io::Result<()> { + writeln!(self.out, "copy {}", snapshot(©))?; + self.event(s, &format!("break {}", self.f["hand"].as_u64().unwrap())) + } +} +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +impl World<'_> { + fn flag(&self, name: &str) -> bool { + self.f[format!("{}{name}", if self.changed { "after_" } else { "" })] + .as_bool() + .unwrap() + } +} +impl BlockingItemDamageWorld for World<'_> { + type Level = (); + fn is_player(&self) -> bool { + self.f["kind"].as_u64().unwrap() > 0 + } + fn is_server_player(&self) -> bool { + self.f["kind"].as_u64().unwrap() == 2 + } + fn level_is_client(&mut self, s: &mut DurabilityStack, _: ()) -> io::Result<bool> { + self.event(s, "client")?; + Ok(self.flag("client")) + } + fn award_item_used(&mut self, s: &mut DurabilityStack) -> io::Result<()> { + let kind = if s.is_empty() { 0 } else { 1 }; + self.event(s, &format!("stat {kind}")) + } + fn entity_level_is_server(&mut self, s: &mut DurabilityStack) -> io::Result<bool> { + self.event(s, "level")?; + Ok(self.flag("server")) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut s = stack(&f["initial"], f["air"].as_bool().unwrap()); + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + changed: false, + }; + let r = &f["rule"]; + let rule = ItemDamageFunction { + threshold: single(&r["threshold"]), + base: single(&r["base"]), + factor: single(&r["factor"]), + }; + let result = blocking_item_damage::hurt(&mut s, &mut w, (), single(&f["damage"]), rule); + writeln!( + w.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!(w.out, "state {} {} {}", snapshot(&s), w.calls, w.changed)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/blocking_rules_fixture.rs b/crates/horizon-world/examples/blocking_rules_fixture.rs new file mode 100644 index 000000000..c0e19d541 --- /dev/null +++ b/crates/horizon-world/examples/blocking_rules_fixture.rs @@ -0,0 +1,105 @@ +use horizon_world::blocking_rules::{ + BlockingRules, DamageReduction, ItemDamageFunction, TypeMatchWorld, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + changed: bool, +} +impl TypeMatchWorld for World<'_> { + type Error = io::Error; + type Set = u64; + fn source_in_set(&mut self, set: u64) -> io::Result<bool> { + writeln!(self.out, "type-holder")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected holder query failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.changed = true; + } + let id = self.f[if self.changed { "after_type" } else { "type" }] + .as_u64() + .unwrap(); + Ok(match set { + 1 => id == 0, + 2 => id == 1, + 3 => true, + 4 => false, + _ => panic!("set"), + }) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let item = &f["item"]; + let rules = BlockingRules { + delay_seconds: single(&f["delay"]), + disable_scale: single(&f["disable_scale"]), + item_damage: ItemDamageFunction { + threshold: single(&item["threshold"]), + base: single(&item["base"]), + factor: single(&item["factor"]), + }, + reductions: f["reductions"] + .as_array() + .unwrap() + .iter() + .map(|r| { + let set = r["set"].as_u64().unwrap(); + DamageReduction { + horizontal_angle: single(&r["angle"]), + types: (set != 0).then_some(set), + base: single(&r["base"]), + factor: single(&r["factor"]), + } + }) + .collect(), + }; + let damage = single(&f["damage"]); + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + changed: false, + }; + writeln!(w.out, "delay {}", rules.delay_ticks())?; + writeln!( + w.out, + "disable {}", + rules.disable_ticks(single(&f["disable_seconds"])) + )?; + writeln!(w.out, "item {}", rules.item_damage.apply(damage))?; + match rules.resolve(&mut w, damage, number(&f["angle"])) { + Ok(v) => writeln!(w.out, "blocked {:08x}\nresult ok", bits(v))?, + Err(_) => writeln!(w.out, "result error")?, + }; + writeln!(w.out, "queries {} {}", w.calls, w.changed)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/bulk_section_fixture.rs b/crates/horizon-world/examples/bulk_section_fixture.rs new file mode 100644 index 000000000..b9be692a7 --- /dev/null +++ b/crates/horizon-world/examples/bulk_section_fixture.rs @@ -0,0 +1,209 @@ +use horizon_world::worldgen::{ + anchor::WorldGenerationContext, bulk_section::TerrainBulkAccess, feature_region::TerrainRegion, +}; +// Feature chains against a resident multi-chunk region. +use horizon_core::position::ChunkPos; +use horizon_world::{ + DATA_VERSION, + heightmap::{HeightmapState, HeightmapType}, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, + worldgen::{ + tags::TagDefinitions, + terrain::{PreLightChunkStage, TerrainBlockStates, TerrainChunk}, + }, +}; +use serde_json::Value; +use std::{ + collections::BTreeSet, + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone, Copy)] +struct State { + air: bool, + air_block: bool, + fluid: bool, + motion: bool, + no_leaves: bool, +} +impl HeightmapState for State { + fn is_air(self) -> bool { + self.air + } + fn is_air_block(self) -> bool { + self.air_block + } + fn has_fluid(self) -> bool { + self.fluid + } + fn blocks_motion_in_heightmap(self) -> bool { + self.motion + } + fn blocks_motion_in_heightmap_no_leaves(self) -> bool { + self.no_leaves + } +} +struct Properties<'a>(&'a [State]); +impl TerrainBlockStates for Properties<'_> { + type State = State; + fn heightmap_state(&self, id: BlockStateId) -> State { + self.0[id.0 as usize] + } +} +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +fn tag(v: &Value) -> Tag { + match v { + Value::String(s) => Tag::String(s.as_str().into()), + Value::Number(i) => Tag::Int(i.as_i64().unwrap() as i32), + Value::Object(m) => { + Tag::Compound(m.iter().map(|(k, v)| (k.as_str().into(), tag(v))).collect()) + } + Value::Array(a) => Tag::List(a.iter().map(tag).collect()), + _ => panic!("unsupported registry fixture value"), + } +} +fn fixture( + f: &Value, + registry: &BlockRegistry, + states: &[State], + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let minimum = n(&f["min"]); + let height = n(&f["height"]); + let mut chunks = Vec::new(); + for p in f["chunks"].as_array().unwrap() { + let mut chunk = TerrainChunk::new( + ChunkPos::new(n(&p[0]), n(&p[1])), + minimum, + height, + registry, + Properties(states), + )?; + chunk.set_generation_stage(PreLightChunkStage::Terrain); + if f["prime"].as_bool().unwrap() { + chunk.prime_heightmaps(&HeightmapType::ALL)?; + } + chunks.push(chunk); + } + let mut region = TerrainRegion::new(chunks, WorldGenerationContext::new(minimum, height, 0))?; + let mut bulk = TerrainBulkAccess::new(&mut region)?; + for op in f["ops"].as_array().unwrap() { + if op[0].as_str() == Some("reset") { + drop(bulk); + bulk = TerrainBulkAccess::new(&mut region)?; + writeln!(out, "reset")?; + writeln!(out, "cache 0")?; + continue; + } + let result = (|| -> Result<(), Box<dyn std::error::Error>> { + match op[0].as_str().unwrap() { + "height" => { + let kind = HeightmapType::ALL + .into_iter() + .find(|k| k.name() == op[1].as_str().unwrap()) + .unwrap(); + writeln!(out, "height {}", bulk.height(kind, n(&op[2]), n(&op[3]))?)?; + } + kind => { + let p = [n(&op[1]), n(&op[2]), n(&op[3])]; + match kind { + "get" => writeln!(out, "get {}", bulk.block(p)?.0)?, + "world" => writeln!(out, "world {}", bulk.world_block(p)?.0)?, + "has" => writeln!(out, "has {}", bulk.has_section(p)?)?, + "set" => match bulk.set_block(p, BlockStateId(n(&op[4]) as u32))? { + Some(old) => writeln!(out, "set {}", old.0)?, + None => writeln!(out, "set none")?, + }, + _ => panic!("unknown operation"), + } + } + } + Ok(()) + })(); + if result.is_err() { + writeln!(out, "error")?; + } + writeln!(out, "cache {}", bulk.acquired_section_count())?; + } + drop(bulk); + for chunk in region.chunks() { + writeln!(out, "chunk {} {}", chunk.position().x, chunk.position().z)?; + for kind in HeightmapType::ALL { + if let Some(map) = chunk.heightmap(kind) { + writeln!(out, "map {}", kind.name())?; + for word in map.raw_data() { + writeln!(out, "{word:x}")?; + } + } else { + writeln!(out, "missing {}", kind.name())?; + } + } + for i in 0..height / 16 { + writeln!(out, "section {i}")?; + for index in 0..4096 { + writeln!(out, "{}", chunk.section(i as usize).unwrap().get(index)?.0)?; + } + } + } + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + let bundle: Value = serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?; + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ( + "states", + Tag::List( + facts["states"] + .as_array() + .unwrap() + .iter() + .map(|s| tag(&s[4])) + .collect(), + ), + ), + ("defaults", tag(&facts["defaults"])), + ]))?; + let mut definitions = TagDefinitions::default(); + for (name, text) in bundle.as_object().unwrap() { + definitions.apply_json(name, "vanilla", text.as_str().unwrap())?; + } + let built = definitions.build(|id, _| facts["defaults"].get(id).map(|_| id.to_owned()))?; + assert!(built.missing.is_empty()); + let motion: BTreeSet<_> = built.tags["minecraft:blocks_motion_in_heightmap"] + .iter() + .map(String::as_str) + .collect(); + let no_leaves: BTreeSet<_> = built.tags["minecraft:blocks_motion_in_heightmap_no_leaves"] + .iter() + .map(String::as_str) + .collect(); + let states: Vec<_> = facts["states"] + .as_array() + .unwrap() + .iter() + .map(|a| { + let name = a[0].as_str().unwrap(); + State { + air: a[1].as_bool().unwrap(), + air_block: name == "minecraft:air", + fluid: a[2].as_bool().unwrap(), + motion: motion.contains(name), + no_leaves: no_leaves.contains(name), + } + }) + .collect(); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + fixture(&serde_json::from_str(line)?, ®istry, &states, &mut out)?; + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-world/examples/bundle_weight_fixture.rs b/crates/horizon-world/examples/bundle_weight_fixture.rs new file mode 100644 index 000000000..2a47cdc37 --- /dev/null +++ b/crates/horizon-world/examples/bundle_weight_fixture.rs @@ -0,0 +1,158 @@ +use horizon_world::{ + bundle_weight::{self, BundleWeight, ContentsError, Fraction, ItemWeights}, + component_patch::Prototype, + item_stack_storage::ItemStackData, + item_template::{self, ValidationRules}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone)] +struct Item { + kind: usize, + count: i32, + maximum: Option<i32>, + bees: bool, + nested: Option<BundleWeight<Item>>, +} +struct View([Option<i32>; 2]); +impl ItemWeights<Item> for View { + fn count(&self, item: &Item) -> i32 { + item.count + } + fn max_stack_size(&self, item: &Item) -> i32 { + item.maximum.or(self.0[item.kind]).unwrap_or(1) + } + fn has_bees(&self, item: &Item) -> bool { + item.bees + } + fn bundle(&self, item: &Item) -> Option<BundleWeight<Item>> { + item.nested.clone() + } +} +struct Rules<'a> { + view: &'a View, + container: Option<&'a [Item]>, + bundle: Option<&'a BundleWeight<Item>>, + projectiles: Option<&'a [Item]>, +} +impl ValidationRules<u8, u8, i32> for Rules<'_> { + type ContentsError = ContentsError; + fn has_max_damage(&self, s: &ItemStackData<u8, u8, i32>) -> bool { + s.component(&1).is_some() + } + fn max_stack_size(&self, s: &ItemStackData<u8, u8, i32>) -> i32 { + s.component(&0).copied().unwrap_or(1) + } + fn validate_contents(&self, s: &ItemStackData<u8, u8, i32>) -> Result<(), ContentsError> { + if s.is_empty() { + Ok(()) + } else { + bundle_weight::validate_contents( + self.container, + self.bundle, + self.projectiles, + self.view, + ) + } + } +} +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn maximum(v: &Value) -> Option<i32> { + v.as_i64().map(|x| x as i32) +} +fn fraction(f: Fraction) -> String { + format!("{}/{}", f.numerator(), f.denominator()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + if f["mode"] == "fraction" { + match ( + Fraction::new(n(&f, "a"), n(&f, "b")), + Fraction::new(n(&f, "c"), n(&f, "d")), + ) { + (Ok(a), Ok(b)) => { + writeln!(out, "new {} {}", fraction(a), fraction(b))?; + writeln!( + out, + "add {}", + a.checked_add(b).map_or("error".into(), fraction) + )?; + writeln!( + out, + "multiply {}", + a.checked_multiply(b).map_or("error".into(), fraction) + )?; + } + _ => writeln!(out, "new error")?, + } + continue; + } + let mut view = View(std::array::from_fn(|i| maximum(&f["prototypes"][i]))); + let mut bundles: Vec<BundleWeight<Item>> = Vec::new(); + for b in f["bundles"].as_array().unwrap() { + let items = b + .as_array() + .unwrap() + .iter() + .map(|v| Item { + kind: n(v, "kind") as usize, + count: n(v, "count"), + maximum: maximum(&v["maximum"]), + bees: v["bees"].as_bool().unwrap(), + nested: usize::try_from(n(v, "nested")) + .ok() + .map(|i| bundles[i].clone()), + }) + .collect(); + bundles.push(BundleWeight::new(items)); + } + for op in f["ops"].as_array().unwrap() { + match op["kind"].as_str().unwrap() { + "prototype" => { + view.0[n(op, "index") as usize] = maximum(&op["maximum"]); + writeln!(out, "prototype")?; + } + "weight" => writeln!( + out, + "weight {}", + bundles[n(op, "index") as usize] + .weight(&view) + .map_or("error".into(), fraction) + )?, + "validate" => { + let mut s = ItemStackData::new(1, 0, n(op, "count"), Prototype::new([])); + if let Some(m) = maximum(&op["maximum"]) { + s.components.set(0, Some(m))?; + } + if op["damage"].as_bool().unwrap() { + s.components.set(1, Some(0))?; + } + let get = |k| usize::try_from(n(op, k)).ok().map(|i| &bundles[i]); + let rules = Rules { + view: &view, + container: get("container").map(BundleWeight::items), + bundle: get("bundle"), + projectiles: get("projectiles").map(BundleWeight::items), + }; + writeln!( + out, + "valid {}", + item_template::validate_strict(&s, &rules).is_ok() + )?; + } + _ => panic!(), + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/canyon_carver_fixture.rs b/crates/horizon-world/examples/canyon_carver_fixture.rs new file mode 100644 index 000000000..023ffa356 --- /dev/null +++ b/crates/horizon-world/examples/canyon_carver_fixture.rs @@ -0,0 +1,99 @@ +//! Transport for decoded canyon paths, ordered mask writes and RNG continuation. +use horizon_core::{ + carving::{CarverOutput, CarvingMask}, + position::ChunkPos, + random::{LegacyRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::worldgen::{anchor::WorldGenerationContext, carver::CanyonCarver}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +struct Output<'a, W: Write> { + mask: &'a mut CarvingMask, + out: &'a mut W, + calls: i32, + fail: i32, +} +impl<W: Write> CarverOutput for Output<'_, W> { + type Error = (); + fn min_y(&self) -> i32 { + self.mask.min_y() + } + fn max_y(&self) -> i32 { + self.mask.max_y() + } + fn carve(&mut self, x: i32, y: i32, z: i32) -> Result<(), ()> { + writeln!(self.out, "cell {x} {y} {z}").unwrap(); + let previous = self.calls; + self.calls += 1; + if previous == self.fail { + return Err(()); + } + self.mask.carve(x, y, z).unwrap(); + Ok(()) + } +} +fn fixture( + f: &Value, + mut random: impl RandomSource, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let c = &f["context"]; + let context = WorldGenerationContext::new(n(&c[0]), n(&c[1]), n(&c[2])); + match CanyonCarver::from_json(f["definition"].as_str().unwrap()) { + Ok(carver) => { + writeln!(out, "decode ok")?; + let mut mask = CarvingMask::new(context.min_y + 1, context.min_y + context.height - 8)?; + let target = ChunkPos::new(n(&f["target"][0]), n(&f["target"][1])); + let origin = ChunkPos::new(n(&f["origin"][0]), n(&f["origin"][1])); + for _ in 0..n(&f["repeats"]) { + writeln!(out, "start {}", carver.is_start_chunk(&mut random))?; + let mut output = Output { + mask: &mut mask, + out, + calls: 0, + fail: n(&f["fail"]), + }; + let result = carver.carve(context, &mut random, target, origin, &mut output); + let calls = output.calls; + writeln!( + out, + "carve {} {calls}", + match result { + Ok(true) => "true", + Ok(false) => "false", + Err(_) => "error", + } + )?; + for c in mask.columns() { + writeln!(out, "column {} {} {} {}", c.x, c.z, c.min_y, c.max_y)?; + } + writeln!(out, "next {}", random.next_long())?; + } + } + Err(_) => writeln!(out, "decode error")?, + } + writeln!(out, "tail {}", random.next_long())?; + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture(&f, LegacyRandom::new(seed), &mut out)?; + } else { + fixture(&f, XoroshiroRandom::new(seed), &mut out)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/carving_geometry_fixture.rs b/crates/horizon-world/examples/carving_geometry_fixture.rs new file mode 100644 index 000000000..1f0ce0ea2 --- /dev/null +++ b/crates/horizon-world/examples/carving_geometry_fixture.rs @@ -0,0 +1,119 @@ +//! Transport for shared cave/canyon geometry and ordered output failures. +use horizon_core::{ + carving::{CarverOutput, CarvingMask, can_reach, carve_ellipsoid}, + position::ChunkPos, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +fn d(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +struct Output<'a> { + mask: &'a mut CarvingMask, + trace: &'a std::cell::RefCell<Vec<String>>, + calls: i32, + fail: i32, +} +impl CarverOutput for Output<'_> { + type Error = (); + fn min_y(&self) -> i32 { + self.mask.min_y() + } + fn max_y(&self) -> i32 { + self.mask.max_y() + } + fn carve(&mut self, x: i32, y: i32, z: i32) -> Result<(), ()> { + self.trace.borrow_mut().push(format!("cell {x} {y} {z}")); + let previous = self.calls; + self.calls += 1; + if previous == self.fail { + return Err(()); + } + self.mask.carve(x, y, z).unwrap(); + Ok(()) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let chunk = ChunkPos::new(n(&f["chunk"][0]), n(&f["chunk"][1])); + let mut mask = CarvingMask::new(n(&f["min"]), n(&f["max"]))?; + for e in f["ellipsoids"].as_array().unwrap() { + let trace = std::cell::RefCell::new(Vec::new()); + let mut output = Output { + mask: &mut mask, + trace: &trace, + calls: 0, + fail: n(&e["fail"]), + }; + let result = carve_ellipsoid( + chunk, + [d(&e["center"][0]), d(&e["center"][1]), d(&e["center"][2])], + d(&e["horizontal"]), + d(&e["vertical"]), + &mut output, + |[x, y, z], by| { + let skip = match n(&e["skip"]) { + 0 => x * x + y * y + z * z >= 1., + 1 => y <= -0.7 || x * x + y * y + z * z >= 1., + 2 => by.rem_euclid(3) == 0, + _ => false, + }; + trace.borrow_mut().push(format!( + "skip {:x} {:x} {:x} {by} {skip}", + bits(x), + bits(y), + bits(z) + )); + skip + }, + ); + let calls = output.calls; + for event in trace.into_inner() { + writeln!(out, "{event}")?; + } + writeln!( + out, + "ellipsoid {} {calls}", + if result.is_ok() { "ok" } else { "error" } + )?; + for c in mask.columns() { + writeln!(out, "column {} {} {} {}", c.x, c.z, c.min_y, c.max_y)?; + } + } + } + for line in fs::read_to_string(dir.join("reach.txt"))?.lines() { + let q: Value = serde_json::from_str(line)?; + let thickness = f32::from_bits(u32::from_str_radix(q[6].as_str().unwrap(), 16)?); + writeln!( + out, + "reach {}", + can_reach( + ChunkPos::new(n(&q[0]), n(&q[1])), + d(&q[2]), + d(&q[3]), + n(&q[4]), + n(&q[5]), + thickness + ) + )?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/carving_mask_fixture.rs b/crates/horizon-world/examples/carving_mask_fixture.rs new file mode 100644 index 000000000..c7675ce47 --- /dev/null +++ b/crates/horizon-world/examples/carving_mask_fixture.rs @@ -0,0 +1,76 @@ +//! Transport for native carving-mask traversal and callback mutation behavior. +use horizon_core::carving::CarvingMask; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut mask = CarvingMask::new(n(&f["min"]), n(&f["max"]))?; + writeln!(out, "mask {} {}", mask.min_y(), mask.max_y())?; + for op in f["ops"].as_array().unwrap() { + match op["kind"].as_str().unwrap() { + "carve" => { + let q = &op["pos"]; + let ok = mask.carve(n(&q[0]), n(&q[1]), n(&q[2])).is_ok(); + writeln!(out, "carve {}", if ok { "ok" } else { "error" })?; + } + "fill" => { + let b = &op["box"]; + let mut calls = 0; + for x in n(&b[0])..=n(&b[1]) { + for z in n(&b[4])..=n(&b[5]) { + for y in n(&b[2])..=n(&b[3]) { + mask.carve(x, y, z)?; + calls += 1; + } + } + } + writeln!(out, "fill {calls}")?; + } + "visit" => { + let mut calls = 0; + let result = mask.try_visit_mut(|mask, c| { + writeln!(out, "column {} {} {} {}", c.x, c.z, c.min_y, c.max_y).unwrap(); + let previous = calls; + calls += 1; + if let Some(points) = op["add"].get(previous.to_string()) { + for q in points.as_array().unwrap() { + let ok = mask.carve(n(&q[0]), n(&q[1]), n(&q[2])).is_ok(); + writeln!(out, "add {}", if ok { "ok" } else { "error" }).unwrap(); + } + } + if previous == n(&op["fail"]) { + Err(()) + } else { + Ok(()) + } + }); + writeln!( + out, + "visit {} {calls}", + if result.is_ok() { "ok" } else { "error" } + )?; + } + "read" => { + for c in mask.columns() { + writeln!(out, "column {} {} {} {}", c.x, c.z, c.min_y, c.max_y)?; + } + writeln!(out, "read")?; + } + _ => unreachable!(), + } + writeln!(out, "empty {}", mask.is_empty())?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/cave_carver_fixture.rs b/crates/horizon-world/examples/cave_carver_fixture.rs new file mode 100644 index 000000000..ad0d37612 --- /dev/null +++ b/crates/horizon-world/examples/cave_carver_fixture.rs @@ -0,0 +1,99 @@ +//! Transport for decoded cave paths, ordered mask writes and RNG continuation. +use horizon_core::{ + carving::{CarverOutput, CarvingMask}, + position::ChunkPos, + random::{LegacyRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::worldgen::{anchor::WorldGenerationContext, carver::CaveCarver}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +struct Output<'a, W: Write> { + mask: &'a mut CarvingMask, + out: &'a mut W, + calls: i32, + fail: i32, +} +impl<W: Write> CarverOutput for Output<'_, W> { + type Error = (); + fn min_y(&self) -> i32 { + self.mask.min_y() + } + fn max_y(&self) -> i32 { + self.mask.max_y() + } + fn carve(&mut self, x: i32, y: i32, z: i32) -> Result<(), ()> { + writeln!(self.out, "cell {x} {y} {z}").unwrap(); + let previous = self.calls; + self.calls += 1; + if previous == self.fail { + return Err(()); + } + self.mask.carve(x, y, z).unwrap(); + Ok(()) + } +} +fn fixture( + f: &Value, + mut random: impl RandomSource, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let c = &f["context"]; + let context = WorldGenerationContext::new(n(&c[0]), n(&c[1]), n(&c[2])); + match CaveCarver::from_json(f["definition"].as_str().unwrap()) { + Ok(carver) => { + writeln!(out, "decode ok")?; + let mut mask = CarvingMask::new(context.min_y + 1, context.min_y + context.height - 8)?; + let target = ChunkPos::new(n(&f["target"][0]), n(&f["target"][1])); + let origin = ChunkPos::new(n(&f["origin"][0]), n(&f["origin"][1])); + for _ in 0..n(&f["repeats"]) { + writeln!(out, "start {}", carver.is_start_chunk(&mut random))?; + let mut output = Output { + mask: &mut mask, + out, + calls: 0, + fail: n(&f["fail"]), + }; + let result = carver.carve(context, &mut random, target, origin, &mut output); + let calls = output.calls; + writeln!( + out, + "carve {} {calls}", + match result { + Ok(true) => "true", + Ok(false) => "false", + Err(_) => "error", + } + )?; + for c in mask.columns() { + writeln!(out, "column {} {} {} {}", c.x, c.z, c.min_y, c.max_y)?; + } + writeln!(out, "next {}", random.next_long())?; + } + } + Err(_) => writeln!(out, "decode error")?, + } + writeln!(out, "tail {}", random.next_long())?; + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture(&f, LegacyRandom::new(seed), &mut out)?; + } else { + fixture(&f, XoroshiroRandom::new(seed), &mut out)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/chunk_stage_fixture.rs b/crates/horizon-world/examples/chunk_stage_fixture.rs new file mode 100644 index 000000000..ee57f8930 --- /dev/null +++ b/crates/horizon-world/examples/chunk_stage_fixture.rs @@ -0,0 +1,281 @@ +//! Test transport for pre-light ProtoChunk writes and stage heightmap transitions. +use horizon_core::position::ChunkPos; +use horizon_world::{ + DATA_VERSION, + chunk_status::ChunkStatus, + heightmap::{HeightmapState, HeightmapType}, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, + retrogen::BelowZeroRetrogen, + worldgen::{ + tags::TagDefinitions, + terrain::{PreLightChunkStage, TerrainBlockStates, TerrainChunk}, + }, +}; +use serde_json::Value; +use std::{ + collections::BTreeSet, + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone, Copy)] +struct State { + air: bool, + air_block: bool, + fluid: bool, + motion: bool, + no_leaves: bool, +} +impl HeightmapState for State { + fn is_air(self) -> bool { + self.air + } + fn is_air_block(self) -> bool { + self.air_block + } + fn has_fluid(self) -> bool { + self.fluid + } + fn blocks_motion_in_heightmap(self) -> bool { + self.motion + } + fn blocks_motion_in_heightmap_no_leaves(self) -> bool { + self.no_leaves + } +} +struct Properties<'a>(&'a [State]); +impl TerrainBlockStates for Properties<'_> { + type State = State; + fn heightmap_state(&self, id: BlockStateId) -> State { + self.0[id.0 as usize] + } +} +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +fn tag(v: &Value) -> Tag { + match v { + Value::String(s) => Tag::String(s.as_str().into()), + Value::Number(i) => Tag::Int(i.as_i64().unwrap() as i32), + Value::Object(m) => { + Tag::Compound(m.iter().map(|(k, v)| (k.as_str().into(), tag(v))).collect()) + } + Value::Array(a) => Tag::List(a.iter().map(tag).collect()), + _ => panic!("unsupported registry fixture value"), + } +} +fn fixture( + f: &Value, + registry: &BlockRegistry, + states: &[State], + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let mut chunk = TerrainChunk::new( + ChunkPos::new(n(&f["chunk"][0]), n(&f["chunk"][1])), + n(&f["min"]), + n(&f["height"]), + registry, + Properties(states), + )?; + writeln!( + out, + "chunk {} {} {} {}", + n(&f["chunk"][0]), + n(&f["chunk"][1]), + chunk.min_y(), + chunk.height() + )?; + for op in f["ops"].as_array().unwrap() { + match op[0].as_str().unwrap() { + "stage" => { + let stage = PreLightChunkStage::ALL + .into_iter() + .find(|s| s.name() == op[1].as_str().unwrap()) + .unwrap(); + chunk.set_generation_stage(stage); + writeln!(out, "stage {}", chunk.generation_stage().name())?; + } + "upgrade" => { + let data = if op[1].is_null() { + None + } else { + Some(BelowZeroRetrogen::new( + ChunkStatus::parse(op[1].as_str().unwrap())?, + op[2] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_i64().unwrap() as u64) + .collect(), + )?) + }; + chunk.set_below_zero_retrogen(data); + writeln!(out, "upgrade")?; + } + "upgrade_info" => { + let (min_y, height) = chunk.height_for_generation(); + writeln!( + out, + "upgrade_info {} {} {min_y} {height} {}", + chunk.is_upgrading(), + chunk + .below_zero_retrogen() + .map_or("none", |data| data.target_status().name()), + chunk.highest_generated_status().name() + )?; + } + "replace_bedrock" => { + BelowZeroRetrogen::replace_old_bedrock(&mut chunk)?; + writeln!(out, "replace_bedrock")?; + } + "mask" => { + let data = BelowZeroRetrogen::new( + ChunkStatus::Full, + op[1] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_i64().unwrap() as u64) + .collect(), + )?; + data.apply_bedrock_mask(&mut chunk)?; + writeln!(out, "mask")?; + } + "fill" => { + let states = op[1].as_array().unwrap(); + let salt = n(&op[2]); + let p = chunk.position(); + for y in 0..chunk.height() { + for z in 0..16 { + for x in 0..16 { + let state = BlockStateId(n( + &states[((x + 3 * y + 5 * z + salt) as usize) % states.len()] + ) as u32); + chunk.set_block_worldgen( + p.x.wrapping_shl(4).wrapping_add(x), + chunk.min_y().wrapping_add(y), + p.z.wrapping_shl(4).wrapping_add(z), + state, + )?; + } + } + } + writeln!(out, "fill")?; + } + "set" => { + let previous = chunk.set_block_worldgen( + n(&op[1]), + n(&op[2]), + n(&op[3]), + BlockStateId(n(&op[4]) as u32), + )?; + writeln!(out, "set {}", previous.0)?; + } + "get" => writeln!( + out, + "get {}", + chunk.block(n(&op[1]), n(&op[2]), n(&op[3])).0 + )?, + "prime" => { + let kinds: Vec<_> = HeightmapType::ALL + .into_iter() + .enumerate() + .filter_map(|(i, k)| (n(&op[1]) & (1 << i) != 0).then_some(k)) + .collect(); + chunk.prime_heightmaps(&kinds)?; + writeln!(out, "prime {}", n(&op[1]))?; + } + "query" => { + for kind in HeightmapType::ALL { + if let Some(map) = chunk.heightmap(kind) { + writeln!( + out, + "height {} {}", + kind.name(), + map.first_available(n(&op[1]) & 15, n(&op[2]) & 15)? + )?; + } else { + writeln!(out, "missing {}", kind.name())?; + } + } + } + "dump" => { + for kind in HeightmapType::ALL { + if let Some(map) = chunk.heightmap(kind) { + writeln!(out, "map {}", kind.name())?; + for word in map.raw_data() { + writeln!(out, "{word:x}")?; + } + } else { + writeln!(out, "missing {}", kind.name())?; + } + } + for i in 0..chunk.height() / 16 { + writeln!(out, "section {i}")?; + for index in 0..4096 { + writeln!(out, "{}", chunk.section(i as usize).unwrap().get(index)?.0)?; + } + } + } + _ => panic!("unknown operation"), + } + } + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + let bundle: Value = serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?; + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ( + "states", + Tag::List( + facts["states"] + .as_array() + .unwrap() + .iter() + .map(|s| tag(&s[4])) + .collect(), + ), + ), + ("defaults", tag(&facts["defaults"])), + ]))?; + let mut definitions = TagDefinitions::default(); + for (name, text) in bundle.as_object().unwrap() { + definitions.apply_json(name, "vanilla", text.as_str().unwrap())?; + } + let built = definitions.build(|id, _| facts["defaults"].get(id).map(|_| id.to_owned()))?; + assert!(built.missing.is_empty()); + let motion: BTreeSet<_> = built.tags["minecraft:blocks_motion_in_heightmap"] + .iter() + .map(String::as_str) + .collect(); + let no_leaves: BTreeSet<_> = built.tags["minecraft:blocks_motion_in_heightmap_no_leaves"] + .iter() + .map(String::as_str) + .collect(); + let states: Vec<_> = facts["states"] + .as_array() + .unwrap() + .iter() + .map(|a| { + let name = a[0].as_str().unwrap(); + State { + air: a[1].as_bool().unwrap(), + air_block: name == "minecraft:air", + fluid: a[2].as_bool().unwrap(), + motion: motion.contains(name), + no_leaves: no_leaves.contains(name), + } + }) + .collect(); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + fixture(&serde_json::from_str(line)?, ®istry, &states, &mut out)?; + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-world/examples/chunk_status_fixture.rs b/crates/horizon-world/examples/chunk_status_fixture.rs new file mode 100644 index 000000000..92c5fe7bd --- /dev/null +++ b/crates/horizon-world/examples/chunk_status_fixture.rs @@ -0,0 +1,69 @@ +use horizon_world::{chunk_status::ChunkStatus, nbt::Tag, worldgen::terrain::PreLightChunkStage}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, +}; +fn main() -> Result<(), Box<dyn std::error::Error>> { + let args: Vec<_> = std::env::args().collect(); + let mut out = io::BufWriter::new(fs::File::create(&args[2])?); + writeln!( + out, + "structure_distance {}", + ChunkStatus::MAX_STRUCTURE_DISTANCE + )?; + for status in ChunkStatus::ALL { + let (name, maps) = if let Some(stage) = PreLightChunkStage::ALL.get(status.index()) { + (format!("minecraft:{}", stage.name()), stage.heightmaps()) + } else { + (status.name().to_owned(), status.heightmaps()) + }; + writeln!( + out, + "status {} {} {} {} {}", + status.index(), + name, + status.parent().name(), + status.is_level_chunk(), + maps.iter() + .map(|kind| kind.name()) + .collect::<Vec<_>>() + .join(",") + )?; + for other in ChunkStatus::ALL { + writeln!( + out, + "order {} {} {} {} {}", + status >= other, + status > other, + status <= other, + status < other, + status.max(other).name() + )?; + } + } + for line in fs::read_to_string(&args[1])?.lines() { + let row: Value = serde_json::from_str(line)?; + let tag = match row[0].as_str().unwrap() { + "string" => Tag::String(row[1].as_str().unwrap().into()), + "int" => Tag::Int(row[1].as_i64().unwrap() as i32), + "list" => Tag::List(Vec::new()), + "compound" => Tag::Compound(Default::default()), + _ => panic!("unknown tag"), + }; + if let Some(name) = row[1].as_str() { + writeln!(out, "lookup {}", ChunkStatus::by_name(name).name())?; + } + match ChunkStatus::from_nbt(&tag) { + Ok(status) => { + let Tag::String(encoded) = status.to_nbt() else { + unreachable!() + }; + writeln!(out, "decoded {} {}", status.index(), encoded.to_string()?)?; + } + Err(_) => writeln!(out, "decoded error")?, + } + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-world/examples/chunkgen_bench.rs b/crates/horizon-world/examples/chunkgen_bench.rs new file mode 100644 index 000000000..5c1c99400 --- /dev/null +++ b/crates/horizon-world/examples/chunkgen_bench.rs @@ -0,0 +1,504 @@ +//! Chunk generation throughput and sanity map. +//! +//! chunkgen_bench <client resource dir> [--seed S] [--size N] [--threads T] +//! [--center CX CZ] [--verify <material-stage parity dir>] [--no-decorate] +use horizon_core::position::ChunkPos; +use horizon_world::{ + DATA_VERSION, + heightmap::HeightmapType, + nbt::Tag, + registry::BlockRegistry, + worldgen::generator::{ + DecorateStats, GeneratorData, GeneratorWorker, OverworldGenerator, ProtoChunk, StageTimings, + }, +}; +use serde_json::Value; +use std::{ + collections::BTreeMap, + fs, + io::{BufRead, BufReader}, + path::{Path, PathBuf}, + sync::{ + Mutex, + atomic::{AtomicUsize, Ordering}, + }, + time::Instant, +}; + +type Error = Box<dyn std::error::Error + Send + Sync>; + +fn tag(v: &Value) -> Tag { + match v { + Value::String(s) => Tag::String(s.as_str().into()), + Value::Number(n) => Tag::Int(n.as_i64().unwrap() as i32), + Value::Array(a) => Tag::List(a.iter().map(tag).collect()), + Value::Object(o) => { + Tag::Compound(o.iter().map(|(k, v)| (k.as_str().into(), tag(v))).collect()) + } + _ => panic!("invalid registry metadata"), + } +} +fn registry(resources: &Path) -> Result<&'static BlockRegistry, Error> { + let facts: Value = serde_json::from_str(&fs::read_to_string(resources.join("facts.json"))?)?; + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ( + "states", + Tag::List( + facts["states"] + .as_array() + .unwrap() + .iter() + .map(|v| tag(&v[4])) + .collect(), + ), + ), + ("defaults", tag(&facts["defaults"])), + ]))?; + Ok(Box::leak(Box::new(registry))) +} + +/// The material-stage fixture's chunk dump format. +fn dump(chunk: &ProtoChunk) -> Vec<String> { + let terrain = &chunk.terrain; + let mut out = Vec::new(); + for section in 0..terrain.height() as usize / 16 { + out.push(format!("section {section}")); + let data = terrain.section(section).unwrap(); + for y in 0..16 { + for z in 0..16 { + let mut line = String::from("blocks"); + for x in 0..16 { + line += &format!(" {}", data.get((y << 8) | (z << 4) | x).unwrap().0); + } + out.push(line); + } + } + } + for kind in [HeightmapType::WorldSurfaceWg, HeightmapType::OceanFloorWg] { + out.push(format!("heightmap {}", kind.name())); + for word in terrain.heightmap(kind).unwrap().raw_data() { + out.push(format!("{word:x}")); + } + } + for (section, offsets) in terrain.postprocessing().iter().enumerate() { + out.push(format!("post {section} {}", offsets.len())); + out.extend(offsets.iter().map(u16::to_string)); + } + out +} + +/// Compare generated chunks with vanilla's post-carver dumps in server.txt. +fn verify(data: &std::sync::Arc<GeneratorData>, parity: &Path) -> Result<(), Error> { + let cases = [ + (-1i64, -2, 3), + (0x0123_4567_89ab_cdef, 1_875_000, -1_875_000), + ]; + let mut expected = Vec::new(); + for (seed, x, z) in cases { + let generator = OverworldGenerator::without_structures(data.clone(), seed)?; + let lines = dump(&generator.worker().generate_proto(ChunkPos::new(x, z))?); + if let Ok(path) = std::env::var("HORIZON_VERIFY_DUMP") { + fs::write(format!("{path}{seed}.txt"), lines.join("\n") + "\n")?; + } + expected.push((seed, lines)); + } + let mut matched = vec![false; expected.len()]; + let mut lines = BufReader::new(fs::File::open(parity.join("server.txt"))?).lines(); + let mut candidates = 0; + while let Some(line) = lines.next() { + if line? != "generatedcarving ok" { + continue; + } + candidates += 1; + // Each candidate dump is followed by other output; compare per case. + let mut active = (0..expected.len()).collect::<Vec<_>>(); + let length = expected.iter().map(|(_, e)| e.len()).max().unwrap_or(0); + for i in 0..length { + let Some(line) = lines.next() else { break }; + let line = line?; + active.retain(|&c| { + let expected = &expected[c].1; + if i == expected.len() { + matched[c] = true; + } + i < expected.len() && expected[i] == line + }); + if active.is_empty() { + break; + } + } + for c in active { + matched[c] = true; + } + } + for ((seed, _), ok) in expected.iter().zip(&matched) { + println!( + "verify seed {seed}: {}", + if *ok { "MATCH" } else { "MISMATCH" } + ); + } + println!("({candidates} vanilla generated-terrain dumps scanned)"); + if matched.iter().all(|m| *m) { + Ok(()) + } else { + Err("generated chunks differ from vanilla".into()) + } +} + +/// Structure starts in the oracle's line format (VanillaStructureStartOracle). +fn dump_starts( + generator: &OverworldGenerator, + seed: i64, + [x0, z0, x1, z1]: [i32; 4], + out: &Path, +) -> Result<(), Error> { + use horizon_world::worldgen::structure::{Rotation, start::Piece}; + let _ = seed; + let mut worker = generator.worker(); + let mut lines = Vec::new(); + let start = Instant::now(); + for cx in x0..=x1 { + for cz in z0..=z1 { + for s in worker.structure_starts(ChunkPos::new(cx, cz)) { + let b = s.bounding_box; + lines.push(format!( + "start {cx} {cz} {} {} {} {} {} {} {} {}", + s.name, + b.min[0], + b.min[1], + b.min[2], + b.max[0], + b.max[1], + b.max[2], + s.pieces.len() + )); + for piece in &s.pieces { + let Piece::Pool(p) = piece else { + let b = piece.bounding_box(); + lines.push(format!( + "piece {} {} {} {} {} {} {}", + piece.type_name(), + b.min[0], + b.min[1], + b.min[2], + b.max[0], + b.max[1], + b.max[2] + )); + continue; + }; + let b = p.bounding_box; + let rotation = match p.rotation { + Rotation::None => "NONE", + Rotation::Clockwise90 => "CLOCKWISE_90", + Rotation::Clockwise180 => "CLOCKWISE_180", + Rotation::Counterclockwise90 => "COUNTERCLOCKWISE_90", + }; + lines.push(format!( + "piece minecraft:jigsaw {} {} {} {} {} {} {} {} {} {rotation} {} {}", + b.min[0], + b.min[1], + b.min[2], + b.max[0], + b.max[1], + b.max[2], + p.position[0], + p.position[1], + p.position[2], + p.ground_level_delta, + p.junctions.len() + )); + } + } + } + } + println!( + "structure starts for {} chunks in {:.2?}", + (x1 - x0 + 1) * (z1 - z0 + 1), + start.elapsed() + ); + fs::write(out, lines.join("\n") + "\n")?; + Ok(()) +} + +/// Process CPU seconds (Linux), robust against other load on shared machines. +fn cpu_seconds() -> f64 { + fs::read_to_string("/proc/self/stat") + .ok() + .and_then(|stat| { + let fields = stat + .rsplit_once(')')? + .1 + .split_whitespace() + .collect::<Vec<_>>(); + Some((fields[11].parse::<f64>().ok()? + fields[12].parse::<f64>().ok()?) / 100.) + }) + .unwrap_or(0.) +} +fn glyph(name: &str) -> char { + let name = name.strip_prefix("minecraft:").unwrap_or(name); + match name { + "water" => '~', + "lava" => '!', + "dirt_path" => '_', + "cobblestone" | "mossy_cobblestone" => 'o', + "hay_block" => 'h', + _ if name.ends_with("planks") || name.ends_with("stairs") || name.ends_with("slab") => 'P', + _ if name.contains("glass") => 'g', + "grass_block" => '"', + "sand" | "suspicious_sand" => '.', + "red_sand" => ',', + "sandstone" | "red_sandstone" => '=', + "stone" | "deepslate" | "andesite" | "diorite" | "granite" | "tuff" => '#', + "gravel" => ':', + "dirt" | "coarse_dirt" | "rooted_dirt" => 'd', + "podzol" => 'p', + "mycelium" => 'm', + "mud" => 'u', + "snow" | "snow_block" | "powder_snow" => 's', + "ice" | "packed_ice" | "blue_ice" => 'i', + "clay" => 'c', + "calcite" => 'C', + _ if name.ends_with("terracotta") => 't', + _ if name.ends_with("leaves") => '*', + _ if name.ends_with("log") || name.ends_with("wood") => '|', + _ if name.contains("grass") || name.contains("fern") || name.contains("flower") => '\'', + _ => '?', + } +} + +fn main() -> Result<(), Error> { + let mut args = std::env::args().skip(1); + let resources = PathBuf::from(args.next().expect("client resource directory")); + let (mut seed, mut size, mut threads, mut center) = (0i64, 16i32, 2usize, (0, 0)); + let mut parity = None; + let mut decorate = true; + let mut starts: Option<(i32, i32, i32, i32, PathBuf)> = None; + while let Some(arg) = args.next() { + let mut next = || args.next().expect("argument value"); + match arg.as_str() { + "--seed" => seed = next().parse()?, + "--size" => size = next().parse()?, + "--threads" => threads = next().parse()?, + "--center" => center = (next().parse()?, next().parse()?), + "--verify" => parity = Some(PathBuf::from(next())), + "--no-decorate" => decorate = false, + "--starts" => { + starts = Some(( + next().parse()?, + next().parse()?, + next().parse()?, + next().parse()?, + PathBuf::from(next()), + )) + } + _ => return Err(format!("unknown argument {arg}").into()), + } + } + let start = Instant::now(); + let registry = registry(&resources)?; + let data = GeneratorData::load(&resources.join("worldgen"), registry)?; + println!("loaded resources in {:.2?}", start.elapsed()); + if let Some(parity) = parity { + verify(&data, &parity)?; + } + let start = Instant::now(); + let generator = OverworldGenerator::new(data.clone(), seed)?; + println!("seeded generator in {:.2?}", start.elapsed()); + if let Some((x0, z0, x1, z1, out)) = starts { + dump_starts(&generator, seed, [x0, z0, x1, z1], &out)?; + return Ok(()); + } + let (x0, z0) = (center.0 - size / 2, center.1 - size / 2); + let count = (size * size) as usize; + let next = AtomicUsize::new(0); + let slots: Vec<Mutex<Option<ProtoChunk>>> = (0..count).map(|_| Mutex::new(None)).collect(); + let timings = Mutex::new(Vec::new()); + let cpu = cpu_seconds(); + let start = Instant::now(); + std::thread::scope(|scope| -> Result<(), Error> { + let handles = (0..threads) + .map(|_| { + scope.spawn(|| -> Result<(), Error> { + let mut worker = generator.worker(); + loop { + let i = next.fetch_add(1, Ordering::Relaxed); + if i >= count { + timings.lock().unwrap().push(worker.stage_timings()); + return Ok(()); + } + let pos = ChunkPos::new(x0 + (i as i32 % size), z0 + (i as i32 / size)); + *slots[i].lock().unwrap() = Some(worker.generate_proto(pos)?); + } + }) + }) + .collect::<Vec<_>>(); + handles.into_iter().try_for_each(|h| h.join().unwrap()) + })?; + let elapsed = start.elapsed(); + println!( + "generated {count} proto chunks with {threads} threads in {elapsed:.2?}: {:.1} chunks/s ({:.1} ms/chunk/thread)", + count as f64 / elapsed.as_secs_f64(), + elapsed.as_secs_f64() * 1000. * threads as f64 / count as f64 + ); + println!( + " cpu time {:.1} ms/chunk", + (cpu_seconds() - cpu) * 1000. / count as f64 + ); + let timings = timings.into_inner().unwrap(); + let per_chunk = |f: fn(&StageTimings) -> std::time::Duration| { + timings + .iter() + .map(f) + .sum::<std::time::Duration>() + .as_secs_f64() + * 1000. + / count as f64 + }; + println!( + " per chunk: biomes {:.2} ms, noise {:.2} ms, surface {:.2} ms, carvers {:.2} ms", + per_chunk(|t| t.biomes), + per_chunk(|t| t.noise), + per_chunk(|t| t.surface), + per_chunk(|t| t.carvers) + ); + let mut chunks: Vec<Option<ProtoChunk>> = slots + .into_iter() + .map(|slot| slot.into_inner().unwrap()) + .collect(); + if decorate && size >= 3 { + let totals = Mutex::new(DecorateStats::default()); + let start = Instant::now(); + let mut decorated = 0; + // Disjoint 3×3 regions per phase can be decorated concurrently. + for phase in 0..9 { + let mut regions = Vec::new(); + for z in 1..size - 1 { + for x in 1..size - 1 { + if (x % 3) * 3 + z % 3 != phase { + continue; + } + let mut region = Vec::with_capacity(9); + for dz in -1..=1 { + for dx in -1..=1 { + region + .push(chunks[((z + dz) * size + x + dx) as usize].take().unwrap()); + } + } + regions.push(((x, z), region)); + } + } + decorated += regions.len(); + let queue = Mutex::new(regions); + let done = Mutex::new(Vec::new()); + std::thread::scope(|scope| -> Result<(), Error> { + let handles = (0..threads) + .map(|_| { + scope.spawn(|| -> Result<(), Error> { + let mut worker: GeneratorWorker = generator.worker(); + loop { + let Some((at, region)) = queue.lock().unwrap().pop() else { + return Ok(()); + }; + let mut region: [ProtoChunk; 9] = + region.try_into().map_err(|_| "region size")?; + let stats = worker.decorate(&mut region)?; + let mut totals = totals.lock().unwrap(); + totals.placed += stats.placed; + totals.unsupported += stats.unsupported; + totals.failed += stats.failed; + totals.skipped.extend(stats.skipped); + drop(totals); + done.lock().unwrap().push((at, region)); + } + }) + }) + .collect::<Vec<_>>(); + handles.into_iter().try_for_each(|h| h.join().unwrap()) + })?; + for ((x, z), region) in done.into_inner().unwrap() { + for (i, chunk) in region.into_iter().enumerate() { + let (dx, dz) = (i as i32 % 3 - 1, i as i32 / 3 - 1); + chunks[((z + dz) * size + x + dx) as usize] = Some(chunk); + } + } + } + let elapsed = start.elapsed(); + let totals = totals.into_inner().unwrap(); + println!( + "decorated {decorated} chunks in {elapsed:.2?}: {:.1} chunks/s; feature roots placed {}, unsupported {}, failed {}", + decorated as f64 / elapsed.as_secs_f64(), + totals.placed, + totals.unsupported, + totals.failed + ); + if std::env::var_os("HORIZON_FEATURE_ERRORS").is_some() { + for (name, error) in generator.unsupported_features() { + println!("unsupported {name}: {error}"); + } + } + if !totals.skipped.is_empty() { + println!( + "skipped roots: {}", + totals.skipped.into_iter().collect::<Vec<_>>().join(" ") + ); + } + } + let mut structures = BTreeMap::<(String, i32, i32), [[i32; 3]; 2]>::new(); + for chunk in chunks.iter().flatten() { + for (name, start, min, max) in chunk.structures() { + structures.insert((name.to_owned(), start.x, start.z), [min, max]); + } + } + for ((name, x, z), [min, max]) in &structures { + println!("structure {name} start chunk ({x}, {z}) box {min:?}..{max:?}"); + } + let block_entities: usize = chunks + .iter() + .flatten() + .map(|c| c.block_entities.len()) + .sum(); + println!("block entities: {block_entities}"); + let mut legend = BTreeMap::<char, BTreeMap<String, usize>>::new(); + let step = (size * 16 / 96).max(1); + for bz in (0..size * 16).step_by(step as usize) { + let mut row = String::new(); + for bx in (0..size * 16).step_by(step as usize) { + let chunk = chunks[((bz / 16) * size + bx / 16) as usize] + .as_ref() + .unwrap(); + let (x, z) = ( + chunk.position().x * 16 + bx % 16, + chunk.position().z * 16 + bz % 16, + ); + let y = chunk.surface_height(x, z) - 1; + let name = chunk.block_name(x, y, z).to_owned(); + let c = glyph(&name); + *legend.entry(c).or_default().entry(name).or_default() += 1; + row.push(c); + } + println!("{row}"); + } + for (c, names) in legend { + let mut names = names.into_iter().collect::<Vec<_>>(); + names.sort_by_key(|(_, n)| std::cmp::Reverse(*n)); + let names = names + .into_iter() + .take(4) + .map(|(n, _)| n) + .collect::<Vec<_>>(); + println!(" {c} {}", names.join(" ")); + } + let middle = chunks[(size / 2 * size + size / 2) as usize] + .as_ref() + .unwrap(); + let p = middle.position(); + println!( + "biome at center ({}, 64, {}): {}", + p.x * 16, + p.z * 16, + middle.biome_at(p.x * 16, 64, p.z * 16) + ); + Ok(()) +} diff --git a/crates/horizon-world/examples/climbing_fixture.rs b/crates/horizon-world/examples/climbing_fixture.rs new file mode 100644 index 000000000..19badd19b --- /dev/null +++ b/crates/horizon-world/examples/climbing_fixture.rs @@ -0,0 +1,152 @@ +use horizon_core::position::BlockPos; +use horizon_world::{ + climbing::{ClimbingRegistry, ClimbingWorld, on_climbable}, + nbt::{self, Limits}, + registry::{BlockRegistry, BlockStateId}, +}; +use serde_json::Value; +use std::{ + collections::BTreeSet, + fs, + io::{self, Write}, + path::Path, +}; +fn pos(v: &Value) -> BlockPos { + BlockPos::new( + v[0].as_i64().unwrap() as i32, + v[1].as_i64().unwrap() as i32, + v[2].as_i64().unwrap() as i32, + ) +} +fn text(p: BlockPos) -> String { + format!("{} {} {}", p.x, p.y, p.z) +} +struct World<'a> { + op: &'a Value, + out: &'a mut dyn Write, + calls: i64, + position: BlockPos, + last: Option<BlockPos>, +} +impl World<'_> { + fn query(&mut self, s: impl AsRef<str>) -> io::Result<()> { + writeln!(self.out, "{}", s.as_ref())?; + let n = self.calls; + self.calls += 1; + if n == self.op["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected climbing failure")); + } + if n == self.op["mutate_at"].as_i64().unwrap() { + self.position = BlockPos::new(31, 32, 33); + self.last = Some(BlockPos::new(-8, -9, -10)); + } + Ok(()) + } +} +impl ClimbingWorld for World<'_> { + type Error = io::Error; + fn is_spectator(&mut self) -> io::Result<bool> { + self.query("spectator")?; + Ok(self.op["spectator"].as_bool().unwrap()) + } + fn block_position(&mut self) -> io::Result<BlockPos> { + self.query("position")?; + Ok(self.position) + } + fn in_block_state(&mut self) -> io::Result<BlockStateId> { + self.query("in-state")?; + Ok(BlockStateId(self.op["state"].as_u64().unwrap() as u32)) + } + fn is_fall_flying(&mut self) -> io::Result<bool> { + self.query("gliding")?; + Ok(self.op["gliding"].as_bool().unwrap()) + } + fn block_state(&mut self, p: BlockPos) -> io::Result<BlockStateId> { + self.query(format!("below {}", text(p)))?; + Ok(BlockStateId(self.op["below"].as_u64().unwrap() as u32)) + } + fn set_last_climbable_position(&mut self, p: BlockPos) { + self.last = Some(p); + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let registry = BlockRegistry::from_nbt( + &nbt::read_named( + &fs::read(dir.join("block-registry.nbt"))?, + Limits::default(), + )? + .0 + .tag, + )?; + let info: Value = serde_json::from_str(&fs::read_to_string(dir.join("info.json"))?)?; + let names = |key: &str| -> BTreeSet<String> { + info[key] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_str().unwrap().to_owned()) + .collect() + }; + let all: BTreeSet<String> = (0..registry.len()) + .map(|i| registry.state(BlockStateId(i as u32)).unwrap().name.clone()) + .collect(); + let trapdoors = names("trapdoors"); + let climb = [names("climbable"), BTreeSet::new(), all.clone()]; + let glide = [names("glide_through"), BTreeSet::new(), all]; + let mut bindings = Vec::new(); + for c in &climb { + for g in &glide { + bindings.push(ClimbingRegistry::new(®istry, &trapdoors, c, g)?); + } + } + let invalid = BTreeSet::from(["horizon:missing".to_owned()]); + assert!(ClimbingRegistry::new(®istry, &invalid, &climb[0], &glide[0]).is_err()); + assert!(ClimbingRegistry::new(®istry, &trapdoors, &invalid, &glide[0]).is_err()); + assert!(ClimbingRegistry::new(®istry, &trapdoors, &climb[0], &invalid).is_err()); + assert!( + ClimbingRegistry::new( + ®istry, + &BTreeSet::from(["minecraft:stone".to_owned()]), + &climb[0], + &glide[0] + ) + .is_err() + ); + assert!( + bindings[0] + .is_climbable_tag(BlockStateId(u32::MAX)) + .is_err() + ); + assert!(std::ptr::eq(bindings[0].registry(), ®istry)); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut last = Some(BlockPos::new(7, 8, 9)); + let binding = &bindings[f["climb_tags"].as_u64().unwrap() as usize * 3 + + f["glide_tags"].as_u64().unwrap() as usize]; + for op in f["ops"].as_array().unwrap() { + let mut w = World { + op, + out: &mut out, + calls: 0, + position: pos(&op["position"]), + last, + }; + match on_climbable(&mut w, binding) { + Ok(b) => writeln!(w.out, "result {b}")?, + Err(_) => writeln!(w.out, "error")?, + }; + writeln!(w.out, "position {}", text(w.position))?; + if let Some(p) = w.last { + writeln!(w.out, "last {}", text(p))?; + } else { + writeln!(w.out, "last none")?; + } + writeln!(w.out, "queries {}", w.calls)?; + last = w.last; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/collision_context_fixture.rs b/crates/horizon-world/examples/collision_context_fixture.rs new file mode 100644 index 000000000..e99673e11 --- /dev/null +++ b/crates/horizon-world/examples/collision_context_fixture.rs @@ -0,0 +1,513 @@ +use horizon_core::{ + geometry::{Aabb, Axis, ShapeOp, Vec3, VoxelShape}, + position::BlockPos, +}; +use horizon_world::{ + block_collision::{BlockCollisionRegistry, DynamicCollisionWorld, ShulkerCollisionState}, + chunk::BlockState, + collision::CachedCollisionRegistry, + collision_context::{CollisionContext, CollisionEntity, CollisionItem}, + dynamic_support::DynamicSupportWorld, + entity_obstruction::EntityIdentity, + fluid::{FluidKind, FluidState}, + liquid_collision::{LiquidCollision, LiquidCollisionWorld}, + nbt::{self, Limits}, + powder_snow_collision::{PowderSnowEntity, PowderSnowWorld, powder_snow_collision_shape}, + registry::{BlockRegistry, BlockStateId}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +const ITEMS: [&str; 5] = [ + "minecraft:air", + "minecraft:stone", + "minecraft:scaffolding", + "minecraft:powder_snow_bucket", + "minecraft:leather_boots", +]; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn values( + out: &mut impl Write, + label: &str, + values: impl IntoIterator<Item = f64>, +) -> io::Result<()> { + write!(out, "{label}")?; + for v in values { + let bits = if v.is_nan() { + 0x7ff8_0000_0000_0000 + } else { + v.to_bits() + }; + write!(out, " {bits:016x}")?; + } + writeln!(out) +} +fn box_values(out: &mut impl Write, label: &str, b: Aabb) -> io::Result<()> { + values( + out, + label, + [ + b.min(Axis::X), + b.min(Axis::Y), + b.min(Axis::Z), + b.max(Axis::X), + b.max(Axis::Y), + b.max(Axis::Z), + ], + ) +} +fn emit(out: &mut impl Write, shape: &VoxelShape) -> io::Result<()> { + writeln!( + out, + "shape {} {} {}", + shape.is_empty(), + shape.boxes().len(), + shape.is_cube() + )?; + for (axis, name) in Axis::ALL.into_iter().zip(["x", "y", "z"]) { + values(out, name, shape.coordinates(axis).iter().copied())?; + } + let axes = shape.cube_coordinate_axes(); + writeln!( + out, + "axes {}", + u8::from(axes[0]) + 2 * u8::from(axes[1]) + 4 * u8::from(axes[2]) + )?; + values( + out, + "extrema", + Axis::ALL + .map(|a| shape.min(a)) + .into_iter() + .chain(Axis::ALL.map(|a| shape.max(a))), + )?; + match shape.bounds() { + Some(b) => box_values(out, "bounds", b)?, + None => writeln!(out, "bounds none")?, + } + for b in shape.boxes() { + box_values(out, "box", *b)?; + } + Ok(()) +} +struct LiquidWorld<'a, W> { + out: &'a mut W, + calls: i32, + fail: i32, + shape: VoxelShape, + above: FluidState, + stand: bool, +} +impl<W: Write> LiquidWorld<'_, W> { + fn query(&mut self, value: &str) -> io::Result<()> { + writeln!(self.out, "{value}")?; + let index = self.calls; + self.calls += 1; + if index == self.fail { + return Err(io::Error::other("injected liquid query failure")); + } + Ok(()) + } +} +impl<W: Write> LiquidCollisionWorld for LiquidWorld<'_, W> { + type Error = io::Error; + fn entity_liquid_shape(&mut self, entity: EntityIdentity) -> io::Result<VoxelShape> { + self.query(&format!("liquid_shape {}", entity.0))?; + Ok(self.shape.clone()) + } + fn fluid(&mut self, p: BlockPos) -> io::Result<FluidState> { + self.query(&format!("fluid_at {} {} {}", p.x, p.y, p.z))?; + Ok(self.above) + } + fn entity_can_stand(&mut self, entity: EntityIdentity, fluid: FluidState) -> io::Result<bool> { + self.query(&format!( + "stand {} {} {} {}", + entity.0, + fluid.kind() as u8, + fluid.amount(), + fluid.falling() + ))?; + Ok(self.stand) + } +} +fn liquid_state(lava: bool, level: i64) -> BlockState { + BlockState { + name: if lava { + "minecraft:lava" + } else { + "minecraft:water" + } + .into(), + properties: [("level".into(), level.to_string())].into(), + } +} +fn liquid_shape(index: i64) -> VoxelShape { + let (min, max) = match index { + 0 => return VoxelShape::empty(), + 1 => return VoxelShape::block(), + 2 => (Vec3::ZERO, Vec3::new(1.0, 0.5, 1.0)), + 3 => (Vec3::new(0.25, -0.5, 0.25), Vec3::new(0.75, 1.5, 0.75)), + _ => unreachable!(), + }; + VoxelShape::from_box(Aabb::new(min, max)).unwrap() +} +struct PowderWorld<'a, W> { + out: &'a mut W, + calls: i32, + fail: i32, + snapshot: PowderSnowEntity, + tag: bool, + feet: CollisionItem<'a>, +} +impl<W: Write> PowderWorld<'_, W> { + fn query(&mut self, value: &str) -> io::Result<()> { + writeln!(self.out, "{value}")?; + let index = self.calls; + self.calls += 1; + if index == self.fail { + return Err(io::Error::other("injected powder query failure")); + } + Ok(()) + } +} +impl<W: Write> PowderSnowWorld for PowderWorld<'_, W> { + type Error = io::Error; + fn powder_snow_entity(&mut self, _: EntityIdentity) -> io::Result<PowderSnowEntity> { + Ok(self.snapshot) + } + fn powder_snow_walkable_tag(&mut self, entity: EntityIdentity) -> io::Result<bool> { + self.query(&format!("walkable_tag {}", entity.0))?; + Ok(self.tag) + } + fn feet_are_leather_boots(&mut self, entity: EntityIdentity) -> io::Result<bool> { + self.query(&format!("feet {}", entity.0))?; + Ok(self.feet.is_item("minecraft:leather_boots")) + } +} +struct RegistryWorld<'a, W> { + liquid: LiquidWorld<'a, W>, + powder: PowderSnowEntity, + tag: bool, + feet: CollisionItem<'a>, +} +impl<W: Write> DynamicSupportWorld for RegistryWorld<'_, W> { + type Error = io::Error; + fn shulker_is_closed(&mut self, p: [i32; 3]) -> io::Result<Option<bool>> { + self.liquid + .query(&format!("block_entity {} {} {}", p[0], p[1], p[2]))?; + Ok(None) + } + fn moving_piston_shape(&mut self, p: [i32; 3]) -> io::Result<Option<VoxelShape>> { + self.liquid + .query(&format!("block_entity {} {} {}", p[0], p[1], p[2]))?; + Ok(None) + } +} +impl<W: Write> DynamicCollisionWorld for RegistryWorld<'_, W> { + fn shulker_collision_state( + &mut self, + p: [i32; 3], + ) -> io::Result<Option<ShulkerCollisionState>> { + self.liquid + .query(&format!("block_entity {} {} {}", p[0], p[1], p[2]))?; + Ok(None) + } +} +impl<W: Write> LiquidCollisionWorld for RegistryWorld<'_, W> { + type Error = io::Error; + fn entity_liquid_shape(&mut self, entity: EntityIdentity) -> io::Result<VoxelShape> { + self.liquid.entity_liquid_shape(entity) + } + fn fluid(&mut self, p: BlockPos) -> io::Result<FluidState> { + self.liquid.fluid(p) + } + fn entity_can_stand(&mut self, entity: EntityIdentity, fluid: FluidState) -> io::Result<bool> { + self.liquid.entity_can_stand(entity, fluid) + } +} +impl<W: Write> PowderSnowWorld for RegistryWorld<'_, W> { + type Error = io::Error; + fn powder_snow_entity(&mut self, _: EntityIdentity) -> io::Result<PowderSnowEntity> { + Ok(self.powder) + } + fn powder_snow_walkable_tag(&mut self, entity: EntityIdentity) -> io::Result<bool> { + self.liquid.query(&format!("walkable_tag {}", entity.0))?; + Ok(self.tag) + } + fn feet_are_leather_boots(&mut self, entity: EntityIdentity) -> io::Result<bool> { + self.liquid.query(&format!("feet {}", entity.0))?; + Ok(self.feet.is_item("minecraft:leather_boots")) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let registry = if dir.join("block-registry.nbt").exists() { + Some(BlockRegistry::from_nbt( + &nbt::read_named( + &fs::read(dir.join("block-registry.nbt"))?, + Limits::default(), + )? + .0 + .tag, + )?) + } else { + None + }; + let cached = registry + .as_ref() + .map(|registry| { + let tag = nbt::read_named( + &fs::read(dir.join("cached-collision.nbt"))?, + Limits::default(), + ) + .map_err(io::Error::other)? + .0 + .tag; + CachedCollisionRegistry::from_nbt(&tag, registry).map(std::sync::Arc::new) + }) + .transpose()?; + let collisions = cached + .as_ref() + .map(|cached| BlockCollisionRegistry::new(cached.clone())) + .transpose()?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + if let (Some(registry), Some(cached)) = (®istry, &cached) { + let mut audit = io::BufWriter::new(fs::File::create(dir.join("rust-audit.txt"))?); + for index in 0..registry.len() { + let id = BlockStateId(index as u32); + let label = if cached.cached_shape(id)?.is_none() { + "uncached" + } else if matches!( + registry.state(id).unwrap().name.as_str(), + "minecraft:water" | "minecraft:lava" + ) { + "fluid" + } else { + "independent" + }; + let block = collisions.as_ref().unwrap().collision_block(id)?; + writeln!( + audit, + "audit {index} {label} {} {}", + block.large_collision_shape, block.moving_piston + )?; + } + } + let fluids = FluidKind::ALL + .map(|kind| FluidState::from_json(&format!("{{\"id\":\"{}\"}}", kind.name())).unwrap()); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let player = CollisionEntity { + identity: EntityIdentity(1), + y: number(&f["y"]), + descending: f["descending"].as_bool().unwrap(), + main_hand: Some(CollisionItem { + item: ITEMS[f["item"].as_u64().unwrap() as usize], + count: f["count"].as_i64().unwrap() as i32, + }), + }; + let marker = CollisionEntity { + identity: EntityIdentity(2), + main_hand: None, + ..player + }; + let falling = CollisionEntity { + identity: EntityIdentity(3), + ..marker + }; + let always = f["always"].as_bool().unwrap(); + let other = number(&f["other"]); + let context = match f["mode"].as_str().unwrap() { + "empty" => CollisionContext::empty(always), + "position" => CollisionContext::position(player.y), + "player" => CollisionContext::for_entity(player, always), + "marker" => CollisionContext::for_entity(marker, always), + "falling" => CollisionContext::for_entity(falling, always), + "with_falling" => CollisionContext::with_position(Some(falling), other), + "factory_player" => CollisionContext::for_entity(player, false), + "factory_marker" => CollisionContext::for_entity(marker, false), + "placement" => CollisionContext::placement(Some(player)), + "placement_null" => CollisionContext::placement(None), + "with_player" => CollisionContext::with_position(Some(player), other), + "with_marker" => CollisionContext::with_position(Some(marker), other), + "with_null" => CollisionContext::with_position(None, other), + _ => unreachable!(), + }; + let held = ITEMS.iter().enumerate().fold(0, |mask, (i, item)| { + mask | (u32::from(context.is_holding_item(item)) << i) + }); + writeln!( + out, + "context {} {} {} {} {}", + context.is_descending(), + context.is_placement(), + context.always_collide_with_fluid(), + context.entity().map_or(0, |id| id.0), + held + )?; + if let Some(config) = f.get("registry") { + let state = BlockStateId(config[0].as_u64().unwrap() as u32); + let p = BlockPos::new( + config[1].as_i64().unwrap() as i32, + config[2].as_i64().unwrap() as i32, + config[3].as_i64().unwrap() as i32, + ); + let mut world = RegistryWorld { + liquid: LiquidWorld { + out: &mut out, + calls: 0, + fail: -1, + shape: liquid_shape(2), + above: FluidState::EMPTY, + stand: f["stand"].as_bool().unwrap(), + }, + powder: PowderSnowEntity { + fall_distance: if always { 3.0 } else { 0.0 }, + falling_block: context.entity() == Some(falling.identity), + }, + tag: false, + feet: CollisionItem { + item: "minecraft:leather_boots", + count: 1, + }, + }; + let shape = collisions + .as_ref() + .unwrap() + .collision_shape_with_context(&mut world, state, p, &context)?; + if let Some(reference) = cached.as_ref().unwrap().cached_shape(state)? { + writeln!( + world.liquid.out, + "cache_equal {}", + !shape.join_is_not_empty(reference, ShapeOp::XOR)? + )?; + } else { + emit(world.liquid.out, &shape)?; + } + writeln!(world.liquid.out, "queries {}", world.liquid.calls)?; + continue; + } + if let Some(config) = f.get("powder") { + let p = BlockPos::new(17, config[0].as_i64().unwrap() as i32, -33); + let mut world = PowderWorld { + out: &mut out, + calls: 0, + fail: config[5].as_i64().unwrap() as i32, + snapshot: PowderSnowEntity { + fall_distance: number(&config[1]), + falling_block: context.entity() == Some(falling.identity), + }, + tag: config[2].as_bool().unwrap(), + feet: CollisionItem { + item: ITEMS[config[3].as_u64().unwrap() as usize], + count: config[4].as_i64().unwrap() as i32, + }, + }; + match powder_snow_collision_shape(&mut world, p, &context) { + Ok(shape) => emit(world.out, &shape)?, + Err(_) => writeln!(world.out, "shape error")?, + } + writeln!(world.out, "queries {}", world.calls)?; + continue; + } + if let Some(config) = f.get("liquid") { + let state = liquid_state(config[1].as_bool().unwrap(), config[0].as_i64().unwrap()); + let above = config[3].as_i64().unwrap(); + let mut world = LiquidWorld { + out: &mut out, + calls: 0, + fail: config[5].as_i64().unwrap() as i32, + shape: liquid_shape(config[4].as_i64().unwrap()), + above: if above < 0 { + FluidState::EMPTY + } else { + FluidState::from_block(&liquid_state(above >= 16, above % 16))? + }, + stand: f["stand"].as_bool().unwrap(), + }; + let p = BlockPos::new(17, config[2].as_i64().unwrap() as i32, -33); + match LiquidCollision::from_state(&state)? + .unwrap() + .shape(&mut world, p, &context) + { + Ok(shape) => emit(world.out, &shape)?, + Err(_) => writeln!(world.out, "shape error")?, + } + writeln!(world.out, "queries {}", world.calls)?; + continue; + } + if let Some(config) = f.get("scaffolding") { + let state = horizon_world::chunk::BlockState { + name: "minecraft:scaffolding".into(), + properties: [ + ("distance".into(), config[0].as_i64().unwrap().to_string()), + ("bottom".into(), config[1].as_bool().unwrap().to_string()), + ( + "waterlogged".into(), + config[2].as_bool().unwrap().to_string(), + ), + ] + .into(), + }; + let rule = + horizon_world::block_collision::ScaffoldingCollision::from_state(&state)?.unwrap(); + emit( + &mut out, + &rule.shape( + &context, + BlockPos::new(17, config[3].as_i64().unwrap() as i32, -33), + ), + )?; + continue; + } + write!(out, "above ")?; + for query in f["above"].as_array().unwrap() { + let top = number(&query[1]); + let shape = if query[2].as_bool().unwrap() { + VoxelShape::empty() + } else { + VoxelShape::from_box(Aabb::new( + Vec3::new(0.0, top - 0.25, 0.0), + Vec3::new(1.0, top, 1.0), + ))? + }; + for fallback in [false, true] { + write!( + out, + "{}", + u8::from(context.is_above( + &shape, + BlockPos::new(0, query[0].as_i64().unwrap() as i32, 0), + fallback + )) + )?; + } + } + writeln!(out)?; + for first in fluids { + for second in fluids { + let mut calls = 0; + let mut last = -1; + let result = context.can_stand_on_fluid(first, second, |entity, fluid| { + assert_eq!(entity, player.identity); + calls += 1; + last = fluid.kind() as i32; + if f["fail"].as_bool().unwrap() { + Err(()) + } else { + Ok(f["stand"].as_bool().unwrap()) + } + }); + let result = result.map_or_else(|()| "error".into(), |v| v.to_string()); + writeln!(out, "fluid {result} {calls} {last}")?; + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/collision_fixture.rs b/crates/horizon-world/examples/collision_fixture.rs new file mode 100644 index 000000000..f8f2651c9 --- /dev/null +++ b/crates/horizon-world/examples/collision_fixture.rs @@ -0,0 +1,206 @@ +//! Queries imported cached shapes through resident section state IDs. +use horizon_core::{ + geometry::{Aabb, Axis, Vec3}, + position::BlockPos, +}; +use horizon_world::{ + chunk::BlockSection, + collision::CachedCollisionRegistry, + nbt::{self, Limits, Tag}, + registry::{BlockRegistry, BlockStateId}, +}; +use std::{ + error::Error, + fs, + io::{BufRead, Write}, + path::PathBuf, +}; + +fn bits(value: f64) -> u64 { + if value.is_nan() { + 0x7ff8_0000_0000_0000 + } else { + value.to_bits() + } +} +fn values( + out: &mut impl Write, + label: &str, + numbers: impl IntoIterator<Item = f64>, +) -> std::io::Result<()> { + write!(out, "{label}")?; + for value in numbers { + write!(out, " {:016x}", bits(value))?; + } + writeln!(out) +} +fn box_values(out: &mut impl Write, label: &str, b: Aabb) -> std::io::Result<()> { + values( + out, + label, + b.min_position() + .components() + .into_iter() + .chain(b.max_position().components()), + ) +} +struct Input<'a>(std::str::SplitWhitespace<'a>); +impl Input<'_> { + fn integer(&mut self) -> i32 { + self.0.next().unwrap().parse().unwrap() + } + fn number(&mut self) -> f64 { + f64::from_bits(u64::from_str_radix(self.0.next().unwrap(), 16).unwrap()) + } + fn vector(&mut self) -> Vec3 { + Vec3::new(self.number(), self.number(), self.number()) + } +} +fn main() -> Result<(), Box<dyn Error>> { + let base = PathBuf::from( + std::env::args() + .nth(1) + .ok_or("fixture directory required")?, + ); + let (registry_root, _) = nbt::read_named( + &fs::read(base.join("block-registry.nbt"))?, + Limits::default(), + )?; + let registry = BlockRegistry::from_nbt(®istry_root.tag)?; + let (root, _) = nbt::read_named( + &fs::read(base.join("cached-collision.nbt"))?, + Limits::default(), + )?; + let collisions = CachedCollisionRegistry::from_nbt(&root.tag, ®istry)?; + assert!(collisions.has_canonical_identities()); + let mut section = BlockSection::uniform(BlockStateId(0), ®istry)?; + let mut out = std::io::BufWriter::new(fs::File::create(base.join("rust.txt"))?); + let mut identities = std::collections::HashMap::new(); + for id in 0..registry.len() { + let index = id % 4096; + section.set(index, BlockStateId(id as u32))?; + match collisions.section_shape(§ion, index)? { + None => writeln!(out, "state {id} uncached")?, + Some(shape) => { + writeln!(out, "state {id} cached {}", shape.boxes().len())?; + let count = identities.len(); + let identity = *identities.entry(std::ptr::from_ref(shape)).or_insert(count); + writeln!(out, "identity {identity}")?; + writeln!( + out, + "canonical {} {}", + shape.same_identity(&horizon_core::geometry::VoxelShape::empty()), + shape.same_identity(&horizon_core::geometry::VoxelShape::block()) + )?; + let flags = shape.cube_coordinate_axes(); + writeln!( + out, + "cube {} {}", + u8::from(shape.is_cube()), + u8::from(flags[0]) + 2 * u8::from(flags[1]) + 4 * u8::from(flags[2]) + )?; + values( + &mut out, + "axis-extrema", + Axis::ALL + .map(|axis| shape.min(axis)) + .into_iter() + .chain(Axis::ALL.map(|axis| shape.max(axis))), + )?; + if let Some(b) = shape.bounds() { + box_values(&mut out, "bounds", b)?; + } else { + writeln!(out, "bounds none")?; + } + for b in shape.boxes() { + box_values(&mut out, "part", *b)?; + } + } + } + } + let other_registry = BlockRegistry::from_nbt(®istry_root.tag)?; + let other_section = BlockSection::uniform(BlockStateId(0), &other_registry)?; + assert!(collisions.section_shape(&other_section, 0).is_err()); + assert!( + collisions + .cached_shape(BlockStateId(registry.len() as u32)) + .is_err() + ); + assert!(collisions.section_shape(§ion, 4096).is_err()); + // Import failures must not create a usable partial collision registry. + let mut corrupt = root.tag.clone(); + *corrupt.get_mut("DataVersion").unwrap() = Tag::Int(0); + assert!(CachedCollisionRegistry::from_nbt(&corrupt, ®istry).is_err()); + let mut corrupt = root.tag.clone(); + let Some(Tag::IntArray(mapping)) = corrupt.get_mut("cached_shapes") else { + unreachable!() + }; + mapping[0] = -2; + assert!(CachedCollisionRegistry::from_nbt(&corrupt, ®istry).is_err()); + let mut corrupt = root.tag.clone(); + let Some(Tag::List(states)) = corrupt.get_mut("states") else { + unreachable!() + }; + states.swap(0, 1); + assert!(CachedCollisionRegistry::from_nbt(&corrupt, ®istry).is_err()); + let mut count = 0; + for line in std::io::BufReader::new(fs::File::open(base.join("inputs.txt"))?).lines() { + let line = line?; + let mut input = Input(line.split_whitespace()); + let id = input.integer(); + let block = BlockPos::new(input.integer(), input.integer(), input.integer()); + let b = Aabb::new(input.vector(), input.vector()); + let start = input.vector(); + let end = input.vector(); + let point = input.vector(); + let amount = input.number(); + section.set(count % 4096, BlockStateId(id as u32))?; + let shape = collisions + .section_shape(§ion, count % 4096)? + .ok_or("query used uncached state")?; + let moved = shape.moved(Vec3::from_block(block)); + values( + &mut out, + "collide", + Axis::ALL.map(|axis| moved.collide(axis, b, amount)), + )?; + if let Some(h) = shape.clip(start, end, block) { + writeln!( + out, + "hit {} {} {:016x} {:016x} {:016x}", + h.direction as u8, + u8::from(h.inside), + bits(h.location.x), + bits(h.location.y), + bits(h.location.z) + )?; + } else { + writeln!(out, "hit none")?; + } + if let Some(p) = moved.closest_point(point) { + values(&mut out, "closest", p.components())?; + } else { + writeln!(out, "closest none")?; + } + writeln!( + out, + "index {} {} {}", + moved.find_index(Axis::X, point.x), + moved.find_index(Axis::Y, point.y), + moved.find_index(Axis::Z, point.z) + )?; + assert!(input.0.next().is_none()); + count += 1; + } + out.flush()?; + println!( + "HORIZON_COLLISION_RESULT {{\"registry_states\":{},\"cached_states\":{},\"uncached_states\":{},\"unique_shapes\":{},\"unique_grids\":{},\"queries\":{}}}", + registry.len(), + collisions.cached_state_count(), + registry.len() - collisions.cached_state_count(), + collisions.shape_count(), + collisions.unique_grid_count(), + count + ); + Ok(()) +} diff --git a/crates/horizon-world/examples/combat_rules_fixture.rs b/crates/horizon-world/examples/combat_rules_fixture.rs new file mode 100644 index 000000000..42d01285d --- /dev/null +++ b/crates/horizon-world/examples/combat_rules_fixture.rs @@ -0,0 +1,87 @@ +use horizon_world::combat_rules::{self, ArmorWorld}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + changed: bool, +} +impl World<'_> { + fn query(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected armor query failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.changed = true; + } + Ok(()) + } + fn flag(&self, name: &str) -> bool { + self.f[format!("{}{name}", if self.changed { "after_" } else { "" })] + .as_bool() + .unwrap() + } +} +impl ArmorWorld for World<'_> { + type Error = io::Error; + type Weapon = (); + type ServerLevel = (); + fn weapon(&mut self) -> io::Result<Option<()>> { + self.query("weapon")?; + Ok(self.flag("weapon").then_some(())) + } + fn server_level(&mut self) -> io::Result<Option<()>> { + self.query("level")?; + Ok(self.flag("server").then_some(())) + } + fn modify_armor_effectiveness(&mut self, _: (), _: (), v: f32) -> io::Result<f32> { + Ok(v) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + changed: false, + }; + let damage = single(&f["damage"]); + let armor = single(&f["armor"]); + let result = if f["mode"] == "magic" { + Ok(combat_rules::after_magic(damage, armor)) + } else { + combat_rules::after_armor(&mut w, damage, armor, single(&f["toughness"])) + }; + match result { + Ok(v) => { + writeln!(w.out, "value {:08x}\nresult ok", bits(v))?; + } + Err(_) => writeln!(w.out, "result error")?, + } + writeln!(w.out, "queries {}", w.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/component_durability_fixture.rs b/crates/horizon-world/examples/component_durability_fixture.rs new file mode 100644 index 000000000..99f6c2389 --- /dev/null +++ b/crates/horizon-world/examples/component_durability_fixture.rs @@ -0,0 +1,187 @@ +use horizon_world::{ + component_durability::{ + Change, ComponentDurability, DurabilityPatch, DurabilityPrototype, Key, + }, + component_patch::MissingPrototype, + item_durability::{self, DurabilityWorld}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn changes(v: &Value) -> [Change; 3] { + [ + Change::MaxDamage(v["max"].as_i64().map(|v| v as i32)), + Change::Damage(v["damage"].as_i64().map(|v| v as i32)), + Change::Unbreakable(v["unbreakable"].as_bool().unwrap()), + ] +} +fn reset(s: &mut ComponentDurability, v: &Value) -> io::Result<()> { + s.count = v["count"].as_i64().unwrap() as i32; + for change in changes(v) { + match change { + Change::MaxDamage(None) => { + s.remove(Key::MaxDamage); + } + Change::Damage(None) => { + s.remove(Key::Damage); + } + Change::Unbreakable(false) => { + s.remove(Key::Unbreakable); + } + _ => { + s.set(change).map_err(io::Error::other)?; + } + } + } + Ok(()) +} +fn patch(v: &Value) -> DurabilityPatch { + DurabilityPatch::new( + v.as_array() + .unwrap() + .iter() + .map(|v| match v[0].as_u64().unwrap() { + 0 => Change::MaxDamage(v[1].as_i64().map(|v| v as i32)), + 1 => Change::Damage(v[1].as_i64().map(|v| v as i32)), + _ => Change::Unbreakable(!v[1].is_null()), + }), + ) +} +fn patch_text(s: &ComponentDurability) -> String { + s.as_patch() + .changes() + .map(|c| match c { + Change::MaxDamage(v) => format!("0={}", optional(v)), + Change::Damage(v) => format!("1={}", optional(v)), + Change::Unbreakable(v) => format!("2={}", if v { "0" } else { "none" }), + }) + .collect::<Vec<_>>() + .join(",") +} +fn optional(v: Option<i32>) -> String { + v.map_or("none".into(), |v| v.to_string()) +} +fn snapshot(s: &ComponentDurability) -> String { + format!( + "{} {} {} {} {} {} {} {} {} {} {} {} | {}", + s.count, + s.count(), + optional(s.raw_component(Key::MaxDamage)), + optional(s.raw_component(Key::Damage)), + s.raw_component(Key::Unbreakable).is_some(), + s.max_damage(), + s.damage(), + s.is_empty(), + s.is_damageable(), + s.is_damaged(), + s.is_broken(), + s.next_damage_will_break(), + patch_text(s) + ) +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + changed: bool, +} +impl World<'_> { + fn event(&mut self, s: &mut ComponentDurability, name: &str) -> io::Result<()> { + writeln!(self.out, "{name} | {}", snapshot(s))?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected callback failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.changed = true; + reset(s, &self.f["after"])?; + } + Ok(()) + } +} +impl DurabilityWorld for World<'_> { + type Error = io::Error; + type Stack = ComponentDurability; + fn storage_error(error: MissingPrototype) -> Self::Error { + io::Error::other(error) + } + fn infinite_materials(&mut self, s: &mut ComponentDurability) -> io::Result<bool> { + self.event(s, "infinite")?; + Ok(self.f[if self.changed { + "after_infinite" + } else { + "infinite" + }] + .as_bool() + .unwrap()) + } + fn process_enchantments( + &mut self, + _: &mut ComponentDurability, + amount: i32, + ) -> io::Result<i32> { + Ok(item_durability::unenchanted_change(amount)) + } + fn durability_changed(&mut self, s: &mut ComponentDurability, _: i32) -> io::Result<()> { + self.event(s, "criterion") + } + fn broken(&mut self, s: &mut ComponentDurability, copy: ComponentDurability) -> io::Result<()> { + writeln!(self.out, "copy {}", snapshot(©))?; + self.event(s, "break")?; + writeln!(self.out, "copy-after {}", snapshot(©)) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let prototype = DurabilityPrototype::new(changes(&f["prototype"])); + let mut s = ComponentDurability::new(&prototype, 1, f["air"].as_bool().unwrap()); + reset(&mut s, &f["initial"])?; + if let Some(v) = f.get("restore") { + s.restore_patch(&patch(v)); + } + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + changed: false, + }; + let amount = f["amount"].as_i64().unwrap() as i32; + let result = match f["mode"].as_str().unwrap() { + "hurt" => item_durability::hurt_and_break( + &mut s, + &mut w, + amount, + f["player"].as_bool().unwrap(), + ), + "without" => w + .event(&mut s, "level") + .and_then(|()| item_durability::hurt_without_breaking(&mut s, &mut w, amount)), + "set" => s.set_damage(amount).map_err(io::Error::other), + "grow" => { + s.grow(amount); + Ok(()) + } + "shrink" => { + s.shrink(amount); + Ok(()) + } + "query" => Ok(()), + _ => panic!("mode"), + }; + writeln!( + w.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!(w.out, "state {} {} {}", snapshot(&s), w.calls, w.changed)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/component_patch_fixture.rs b/crates/horizon-world/examples/component_patch_fixture.rs new file mode 100644 index 000000000..29b345c8d --- /dev/null +++ b/crates/horizon-world/examples/component_patch_fixture.rs @@ -0,0 +1,136 @@ +use horizon_world::component_patch::{ComponentMap, Patch, Prototype}; +use serde_json::Value as Json; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone, Debug, PartialEq)] +enum Value { + Int(i32), + Float(u32), +} +fn value(v: &Json) -> Option<Value> { + if v.is_null() { + None + } else if let Some(s) = v.as_str() { + let raw = u32::from_str_radix(s, 16).unwrap(); + Some(Value::Float(if f32::from_bits(raw).is_nan() { + f32::NAN.to_bits() + } else { + raw + })) + } else { + Some(Value::Int(v.as_i64().unwrap() as i32)) + } +} +fn text(v: Option<&Value>) -> String { + match v { + None => "none".into(), + Some(Value::Int(v)) => format!("i{v}"), + Some(Value::Float(v)) => format!("f{v:08x}"), + } +} +fn patch(v: &Json) -> Patch<usize, Value> { + Patch::new( + v.as_array() + .unwrap() + .iter() + .map(|v| (v[0].as_u64().unwrap() as usize, value(&v[1]))), + ) +} +fn patch_text(p: &Patch<usize, Value>) -> String { + p.entries() + .iter() + .map(|(k, v)| format!("{k}={}", text(v.as_ref()))) + .collect::<Vec<_>>() + .join(",") +} +fn snapshot( + out: &mut dyn Write, + maps: &[ComponentMap<usize, Value>; 3], + patches: &[Patch<usize, Value>; 3], +) -> io::Result<()> { + for (i, m) in maps.iter().enumerate() { + let entries = m + .entries() + .map(|(k, v)| format!("{k}={}", text(Some(v)))) + .collect::<Vec<_>>() + .join(","); + let keys = m + .keys() + .iter() + .map(usize::to_string) + .collect::<Vec<_>>() + .join(","); + let values = (0..16) + .map(|k| text(m.get(&k))) + .collect::<Vec<_>>() + .join(","); + let flags = (0..16) + .filter(|k| m.has_non_default(k)) + .fold(0u32, |v, k| v | (1 << k)); + writeln!( + out, + "map {i} {} {entries} | {keys} | {values} | {flags} | {}", + m.len(), + patch_text(&m.as_patch()) + )?; + } + for (i, p) in patches.iter().enumerate() { + writeln!(out, "patch {i} {}", patch_text(p))?; + } + writeln!( + out, + "equal {} {} {}", + maps[0] == maps[1], + maps[0] == maps[2], + maps[1] == maps[2] + ) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Json = serde_json::from_str(line)?; + let base = Prototype::new( + f["prototype"] + .as_array() + .unwrap() + .iter() + .map(|v| (v[0].as_u64().unwrap() as usize, value(&v[1]).unwrap())), + ); + let mut maps = std::array::from_fn(|_| ComponentMap::new(base.clone())); + let mut patches = std::array::from_fn(|_| Patch::new([])); + snapshot(&mut out, &maps, &patches)?; + for op in f["ops"].as_array().unwrap() { + let a = op["a"].as_u64().unwrap() as usize; + let b = op["b"].as_u64().unwrap() as usize; + let mut success = true; + match op["kind"].as_str().unwrap() { + "set" => { + match maps[a].set(op["key"].as_u64().unwrap() as usize, value(&op["value"])) { + Ok(v) => writeln!(out, "old {}", text(v.as_ref()))?, + Err(_) => success = false, + } + } + "remove" => { + let v = maps[a].remove(op["key"].as_u64().unwrap() as usize); + writeln!(out, "old {}", text(v.as_ref()))?; + } + "copy" => maps[b] = maps[a].clone(), + "save" => patches[b] = maps[a].as_patch(), + "apply" => maps[a].apply_patch(&patches[b]), + "restore" => maps[a].restore_patch(&patches[b]), + "clear" => maps[a].clear_patch(), + "build" => patches[b] = patch(&op["entries"]), + "from" => maps[a] = ComponentMap::from_patch(base.clone(), &patches[b]), + _ => panic!("operation"), + }; + writeln!(out, "result {}", if success { "ok" } else { "error" })?; + snapshot(&mut out, &maps, &patches)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/consumable_emission_fixture.rs b/crates/horizon-world/examples/consumable_emission_fixture.rs new file mode 100644 index 000000000..966cec1d6 --- /dev/null +++ b/crates/horizon-world/examples/consumable_emission_fixture.rs @@ -0,0 +1,253 @@ +use horizon_core::{ + geometry::Vec3, + random::{LegacyRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::consumable::{Consumable, EmissionWorld, UseAnimation}; +use horizon_world::{ + component_patch::Prototype, + item_particles::{self, ItemParticleWorld, ParticleError}, + item_stack_refs::{ItemStacks, StackRef}, + item_template::ItemTemplate, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +type Stack = StackRef<u8, u8, i32>; +type Template = ItemTemplate<u8, u8, i32>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn fl(v: &Value, k: &str) -> f32 { + f32::from_bits(v[k].as_u64().unwrap() as u32) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn opt(v: Option<&i32>) -> String { + v.map_or("none".into(), i32::to_string) +} +struct World<'a, R> { + f: Value, + out: &'a mut dyn Write, + stack: Stack, + random: [R; 2], + position: Vec3, + changed: bool, + calls: i32, + first: Option<Template>, +} +impl<R: RandomSource> World<'_, R> { + fn config(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn reset(&mut self) { + let c = self.config().clone(); + let p = &c["position"]; + self.position = Vec3::new( + p[0].as_f64().unwrap(), + p[1].as_f64().unwrap(), + p[2].as_f64().unwrap(), + ); + let mut s = self.stack.write(); + s.count = n(&c, "count"); + s.components + .set(0, c["damage"].as_i64().map(|v| v as i32)) + .unwrap(); + if c["reseed"].as_bool().unwrap() { + for i in 0..2 { + self.random[i].set_seed(c["seeds"][i].as_i64().unwrap()); + } + } + } + fn all(&mut self) { + let s = self.stack.read(); + writeln!( + self.out, + "state {} {} {} {} {} {} {}", + self.calls, + self.changed, + n(self.config(), "random"), + n(self.config(), "level"), + s.item(), + s.count(), + opt(s.component(&0)) + ) + .unwrap(); + } + fn event(&mut self, name: String) -> Result<(), &'static str> { + writeln!(self.out, "event {name}").unwrap(); + let i = self.calls; + self.calls += 1; + self.all(); + if i == n(&self.f, "fail") { + return Err("callback"); + } + if i == n(&self.f, "mutate") { + self.changed = true; + self.reset(); + } + Ok(()) + } +} +impl<R: RandomSource> ItemParticleWorld<u8, u8, i32> for World<'_, R> { + type Error = &'static str; + type Level = i32; + type Source = R; + fn random(&mut self) -> &mut R { + let i = n(self.config(), "random") as usize; + &mut self.random[i] + } + fn pitch(&mut self) -> Result<f32, Self::Error> { + self.event("pitch".into())?; + Ok(fl(self.config(), "pitch")) + } + fn yaw(&mut self) -> Result<f32, Self::Error> { + self.event("yaw".into())?; + Ok(fl(self.config(), "yaw")) + } + fn position(&self) -> Vec3 { + self.position + } + fn eye_y(&mut self) -> Result<f64, Self::Error> { + self.event("eye".into())?; + Ok(self.position.y + f64::from(fl(self.config(), "eye"))) + } + fn level(&mut self) -> Result<i32, Self::Error> { + self.event("level".into())?; + Ok(n(self.config(), "level")) + } + fn add_particle( + &mut self, + level: i32, + t: &Template, + p: Vec3, + v: Vec3, + ) -> Result<(), Self::Error> { + let same = self + .first + .as_ref() + .is_none_or(|first| first.same_reference(t)); + if self.first.is_none() { + self.first = Some(t.clone()); + } + let damage = opt(t.component(&Prototype::new([]), &0)); + self.event(format!( + "particle {level} {} {} {damage} {same} {} {} {} {} {} {}", + t.item(), + t.count(), + bits(p.x), + bits(p.y), + bits(p.z), + bits(v.x), + bits(v.y), + bits(v.z) + )) + } +} +impl<R: RandomSource> EmissionWorld for World<'_, R> { + type Error = &'static str; + type Stack = Stack; + type Sound = u8; + type Random = usize; + type Source = R; + fn random_source(&mut self, r: usize) -> &mut R { + &mut self.random[r] + } + fn spawn_item_particles(&mut self, s: Stack, count: i32) -> Result<(), Self::Error> { + assert!(s.same_reference(&self.stack)); + self.event(format!("spawn {count}"))?; + item_particles::spawn(self, &s, 0, count).map_err(|e| match e { + ParticleError::World(e) => e, + ParticleError::Template(_) => "template", + }) + } + fn overrides_consume_sound(&self) -> bool { + self.f["override"].as_bool().unwrap() + } + fn consume_sound(&mut self, s: Stack) -> Result<u8, Self::Error> { + assert!(s.same_reference(&self.stack)); + self.event("override".into())?; + Ok(n(self.config(), "sound") as u8) + } + fn play_sound(&mut self, s: u8, volume: f32, pitch: f32) -> Result<(), Self::Error> { + self.event(format!( + "sound {s} {} {}", + volume.to_bits(), + pitch.to_bits() + )) + } +} +fn run<R: RandomSource>(f: Value, out: &mut dyn Write, make: fn(i64) -> R) { + let random = std::array::from_fn(|i| make(f["seeds"][i].as_i64().unwrap())); + let stack = ItemStacks::new(0).create(n(&f, "item") as u8, 1, Prototype::new([])); + let count = n(&f, "particles"); + let mut w = World { + f, + out, + stack: stack.clone(), + random, + position: Vec3::ZERO, + changed: false, + calls: 0, + first: None, + }; + w.reset(); + w.all(); + let animation = [ + UseAnimation::None, + UseAnimation::Eat, + UseAnimation::Drink, + UseAnimation::Block, + UseAnimation::Bow, + UseAnimation::Trident, + UseAnimation::Crossbow, + UseAnimation::Spyglass, + UseAnimation::TootHorn, + UseAnimation::Brush, + UseAnimation::Bundle, + UseAnimation::Spear, + ][n(&w.f, "animation") as usize]; + let component = Consumable::<u8> { + seconds: fl(&w.f, "seconds"), + animation, + sound: n(&w.f, "sound") as u8, + particles: w.f["has_particles"].as_bool().unwrap(), + effects: vec![], + }; + let remaining = n(&w.f, "remaining"); + writeln!( + w.out, + "timing {} {}", + component.ticks(), + component.should_emit(remaining) + ) + .unwrap(); + let random = n(&w.f, "emit_random") as usize; + let result = component.emit(&mut w, random, stack, count); + writeln!(w.out, "result {}", result.err().unwrap_or("ok")).unwrap(); + w.all(); + for (i, r) in w.random.iter_mut().enumerate() { + writeln!(w.out, "random {i} {} {}", r.next_long(), r.next_long()).unwrap(); + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + if f["xor"].as_bool().unwrap() { + run(f, &mut out, XoroshiroRandom::new); + } else { + run(f, &mut out, LegacyRandom::new); + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/consumable_fixture.rs b/crates/horizon-world/examples/consumable_fixture.rs new file mode 100644 index 000000000..bfb1ad786 --- /dev/null +++ b/crates/horizon-world/examples/consumable_fixture.rs @@ -0,0 +1,419 @@ +use horizon_core::{ + geometry::Vec3, + random::{LegacyRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::consumable::{Consumable, EmissionWorld, UseAnimation}; +use horizon_world::{ + component_patch::Prototype, + item_particles::{self, ItemParticleWorld, ParticleError}, + item_stack_refs::{ItemStacks, StackRef}, + item_template::ItemTemplate, +}; +use horizon_world::{ + consumable::{ConsumeResult, ConsumptionWorld}, + food::FoodData, + food_properties::{ConsumptionSound, FoodConsumptionWorld, FoodProperties, SoundCategory}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone, Debug, PartialEq)] +enum Component { + Damage(i32), + Food(FoodProperties), +} +type Stack = StackRef<u8, u8, Component>; +type Template = ItemTemplate<u8, u8, Component>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn fl(v: &Value, k: &str) -> f32 { + f32::from_bits(v[k].as_u64().unwrap() as u32) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn opt(v: Option<&Component>) -> String { + match v { + None => "none".into(), + Some(Component::Damage(v)) => v.to_string(), + _ => panic!("not damage"), + } +} +fn fbits(v: f32) -> u32 { + if v.is_nan() { 0x7fc00000 } else { v.to_bits() } +} +fn food_component(c: &Value) -> Option<Component> { + let f = &c["food_component"]; + if f.is_null() { + None + } else { + Some(Component::Food(FoodProperties { + nutrition: n(f, "nutrition"), + saturation: fl(f, "saturation"), + can_always_eat: f["always"].as_bool().unwrap(), + })) + } +} +struct World<'a, R> { + f: Value, + out: &'a mut dyn Write, + stack: Stack, + random: [R; 2], + position: Vec3, + changed: bool, + calls: i32, + first: Option<Template>, + food: FoodData, +} +impl<R: RandomSource> World<'_, R> { + fn config(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn reset(&mut self) { + let c = self.config().clone(); + let p = &c["position"]; + self.position = Vec3::new( + p[0].as_f64().unwrap(), + p[1].as_f64().unwrap(), + p[2].as_f64().unwrap(), + ); + let mut s = self.stack.write(); + s.count = n(&c, "count"); + s.components + .set(0, c["damage"].as_i64().map(|v| Component::Damage(v as i32))) + .unwrap(); + s.components.set(1, food_component(&c)).unwrap(); + self.food = FoodData { + food: n(&c, "food"), + saturation: fl(&c, "saturation"), + exhaustion: 0.0, + timer: 0, + }; + if c["reseed"].as_bool().unwrap() { + for i in 0..2 { + self.random[i].set_seed(c["seeds"][i].as_i64().unwrap()); + } + } + } + fn all(&mut self) { + let s = self.stack.read(); + writeln!( + self.out, + "state {} {} {} {} {} {} {}", + self.calls, + self.changed, + n(self.config(), "random"), + n(self.config(), "level"), + s.item(), + s.count(), + opt(s.component(&0)) + ) + .unwrap(); + } + fn food_state(&mut self) { + writeln!( + self.out, + "food {} {}", + self.food.food, + fbits(self.food.saturation) + ) + .unwrap(); + } + fn event(&mut self, name: String) -> Result<(), &'static str> { + writeln!(self.out, "event {name}").unwrap(); + let i = self.calls; + self.calls += 1; + self.all(); + self.food_state(); + if i == n(&self.f, "fail") { + return Err("callback"); + } + if i == n(&self.f, "mutate") { + self.changed = true; + self.reset(); + } + Ok(()) + } +} +impl<R: RandomSource> ItemParticleWorld<u8, u8, Component> for World<'_, R> { + type Error = &'static str; + type Level = i32; + type Source = R; + fn random(&mut self) -> &mut R { + let i = n(self.config(), "random") as usize; + &mut self.random[i] + } + fn pitch(&mut self) -> Result<f32, Self::Error> { + self.event("pitch".into())?; + Ok(fl(self.config(), "pitch")) + } + fn yaw(&mut self) -> Result<f32, Self::Error> { + self.event("yaw".into())?; + Ok(fl(self.config(), "yaw")) + } + fn position(&self) -> Vec3 { + self.position + } + fn eye_y(&mut self) -> Result<f64, Self::Error> { + self.event("eye".into())?; + Ok(self.position.y + f64::from(fl(self.config(), "eye"))) + } + fn level(&mut self) -> Result<i32, Self::Error> { + self.event("level".into())?; + Ok(n(self.config(), "level")) + } + fn add_particle( + &mut self, + level: i32, + t: &Template, + p: Vec3, + v: Vec3, + ) -> Result<(), Self::Error> { + let same = self + .first + .as_ref() + .is_none_or(|first| first.same_reference(t)); + if self.first.is_none() { + self.first = Some(t.clone()); + } + let damage = opt(t.component(&Prototype::new([]), &0)); + self.event(format!( + "particle {level} {} {} {damage} {same} {} {} {} {} {} {}", + t.item(), + t.count(), + bits(p.x), + bits(p.y), + bits(p.z), + bits(v.x), + bits(v.y), + bits(v.z) + )) + } +} +impl<R: RandomSource> EmissionWorld for World<'_, R> { + type Error = &'static str; + type Stack = Stack; + type Sound = u8; + type Random = usize; + type Source = R; + fn random_source(&mut self, r: usize) -> &mut R { + &mut self.random[r] + } + fn spawn_item_particles(&mut self, s: Stack, count: i32) -> Result<(), Self::Error> { + assert!(s.same_reference(&self.stack)); + self.event(format!("spawn {count}"))?; + item_particles::spawn(self, &s, 0, count).map_err(|e| match e { + ParticleError::World(e) => e, + ParticleError::Template(_) => "template", + }) + } + fn overrides_consume_sound(&self) -> bool { + self.f["override"].as_bool().unwrap() + } + fn consume_sound(&mut self, s: Stack) -> Result<u8, Self::Error> { + assert!(s.same_reference(&self.stack)); + self.event("override".into())?; + Ok(n(self.config(), "sound") as u8) + } + fn play_sound(&mut self, s: u8, volume: f32, pitch: f32) -> Result<(), Self::Error> { + self.event(format!( + "sound {s} {} {}", + volume.to_bits(), + pitch.to_bits() + )) + } +} +impl<R: RandomSource> FoodConsumptionWorld for World<'_, R> { + type Error = &'static str; + type Level = i32; + type Sound = u8; + type Random = usize; + type Source = R; + fn get_random(&mut self) -> Result<usize, Self::Error> { + self.event("random".into())?; + Ok(n(self.config(), "virtual_random") as usize) + } + fn random_source(&mut self, r: usize) -> &mut R { + &mut self.random[r] + } + fn position(&self) -> Vec3 { + self.position + } + fn is_player(&self) -> bool { + n(&self.f, "actor") != 0 + } + fn food_data(&mut self) -> Result<&mut FoodData, Self::Error> { + self.event("food-data".into())?; + Ok(&mut self.food) + } + fn play_sound(&mut self, s: ConsumptionSound<i32, u8>) -> Result<(), Self::Error> { + let category = match s.category { + SoundCategory::Neutral => 6, + SoundCategory::Players => 7, + }; + self.event(format!( + "food-sound {} {} {category} {} {} {} {} {}", + s.level, + s.sound, + bits(s.position.x), + bits(s.position.y), + bits(s.position.z), + fbits(s.volume), + fbits(s.pitch) + )) + } +} +impl<R: RandomSource> ConsumptionWorld<u8, u8, Component, u8> for World<'_, R> { + type Level = i32; + type Hand = i32; + fn food(&self, s: &Stack) -> Option<FoodProperties> { + match s.read().component(&1) { + Some(Component::Food(f)) => Some(*f), + _ => None, + } + } + fn is_player(&self) -> bool { + n(&self.f, "actor") != 0 + } + fn can_eat(&mut self, always: bool) -> Result<bool, Self::Error> { + self.event(format!("can-eat {always}"))?; + Ok(self.config()["can_eat"].as_bool().unwrap()) + } + fn start_using(&mut self, hand: i32) -> Result<(), Self::Error> { + self.event(format!("start {hand}")) + } + fn level(&mut self) -> Result<i32, Self::Error> { + ItemParticleWorld::level(self) + } + fn get_random(&mut self) -> Result<usize, Self::Error> { + FoodConsumptionWorld::get_random(self) + } + fn is_server_player(&self) -> bool { + n(&self.f, "actor") == 2 + } + fn award_item_used(&mut self, item: u8) -> Result<(), Self::Error> { + self.event(format!("stat {item}")) + } + fn consume_criterion(&mut self, s: Stack) -> Result<(), Self::Error> { + assert!(s.same_reference(&self.stack)); + self.event("criterion".into()) + } + fn consume_listeners( + &mut self, + level: i32, + s: Stack, + c: &Consumable<u8, u8>, + ) -> Result<(), Self::Error> { + if let Some(food) = ConsumptionWorld::food(self, &s) { + food.on_consume(self, level, c.sound, 1)?; + } + Ok(()) + } + fn is_client(&mut self, level: i32) -> Result<bool, Self::Error> { + self.event(format!("client {level}"))?; + Ok(self.config()["client"].as_bool().unwrap()) + } + fn apply_effect(&mut self, e: &u8, level: i32, s: Stack) -> Result<bool, Self::Error> { + assert!(s.same_reference(&self.stack)); + self.event(format!("effect {level} {e}"))?; + Ok(self.config()["effect_result"].as_bool().unwrap()) + } + fn consume_event(&mut self, drink: bool) -> Result<(), Self::Error> { + self.event(format!("game-event {drink}")) + } + fn infinite_materials(&mut self) -> Result<bool, Self::Error> { + self.event("infinite".into())?; + Ok(self.config()["infinite"].as_bool().unwrap()) + } +} +fn run<R: RandomSource>(f: Value, out: &mut dyn Write, make: fn(i64) -> R) { + let random = std::array::from_fn(|i| make(f["seeds"][i].as_i64().unwrap())); + let stack = ItemStacks::new(0).create(n(&f, "item") as u8, 1, Prototype::new([])); + let mut w = World { + f, + out, + stack: stack.clone(), + random, + position: Vec3::ZERO, + changed: false, + calls: 0, + first: None, + food: FoodData::default(), + }; + w.reset(); + w.all(); + let animation = [ + UseAnimation::None, + UseAnimation::Eat, + UseAnimation::Drink, + UseAnimation::Block, + UseAnimation::Bow, + UseAnimation::Trident, + UseAnimation::Crossbow, + UseAnimation::Spyglass, + UseAnimation::TootHorn, + UseAnimation::Brush, + UseAnimation::Bundle, + UseAnimation::Spear, + ][n(&w.f, "animation") as usize]; + let component = Consumable::<u8, u8> { + seconds: fl(&w.f, "seconds"), + animation, + sound: n(&w.f, "sound") as u8, + particles: w.f["has_particles"].as_bool().unwrap(), + effects: (0..n(&w.f, "effects") as u8).collect(), + }; + w.food_state(); + let op = n(&w.f, "op"); + let hand = n(&w.f, "hand"); + let level = n(&w.f, "passed_level"); + let result: Result<String, &'static str> = match op { + 0 => component + .can_consume(&mut w, &stack) + .map(|v| format!("can {v}")), + 1 => component + .start(&mut w, stack.clone(), hand) + .map(|v| match v { + ConsumeResult::Fail => "fail".into(), + ConsumeResult::Consume { transformed: None } => "consume none".into(), + ConsumeResult::Consume { + transformed: Some(s), + } => { + assert!(s.same_reference(&stack)); + "consume input".into() + } + }), + _ => component.on_consume(&mut w, level, stack.clone()).map(|s| { + assert!(s.same_reference(&stack)); + "input".into() + }), + }; + writeln!(w.out, "result {}", result.unwrap_or_else(str::to_string)).unwrap(); + w.all(); + w.food_state(); + for (i, r) in w.random.iter_mut().enumerate() { + writeln!(w.out, "random {i} {} {}", r.next_long(), r.next_long()).unwrap(); + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + if f["xor"].as_bool().unwrap() { + run(f, &mut out, XoroshiroRandom::new); + } else { + run(f, &mut out, LegacyRandom::new); + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/consume_effect_fixture.rs b/crates/horizon-world/examples/consume_effect_fixture.rs new file mode 100644 index 000000000..5e4b878b5 --- /dev/null +++ b/crates/horizon-world/examples/consume_effect_fixture.rs @@ -0,0 +1,222 @@ +use horizon_core::{ + position::BlockPos, + random::{LegacyRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::{ + consume_effect::{ConsumeEffect, EffectWorld}, + status_effect::{BlendState, Details, EffectInstance}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +type Instance = EffectInstance<u8>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn fl(v: &Value, k: &str) -> f32 { + f32::from_bits(v[k].as_u64().unwrap() as u32) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { 0x7fc00000 } else { v.to_bits() } +} +fn details(v: &Value) -> Details { + Details { + duration: n(v, "duration"), + amplifier: n(v, "amplifier"), + ambient: v["ambient"].as_bool().unwrap(), + visible: v["visible"].as_bool().unwrap(), + show_icon: v["icon"].as_bool().unwrap(), + } +} +fn desc(e: &Instance) -> String { + let e = e.read(); + format!( + "{} {} {} {} {} {} {} {} {}", + e.effect, + e.details.duration, + e.details.amplifier, + e.details.ambient, + e.details.visible, + e.details.show_icon, + e.hidden.is_some(), + bits(e.blend.factor), + bits(e.blend.previous) + ) +} +struct World<'a, R> { + f: Value, + out: &'a mut dyn Write, + random: [R; 2], + inputs: Vec<Instance>, + added: Vec<Instance>, + changed: bool, + calls: i32, +} +impl<R: RandomSource> World<'_, R> { + fn config(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn reset(&mut self) { + let c = self.config().clone(); + for (i, v) in c["instances"].as_array().unwrap().iter().enumerate() { + let mut e = self.inputs[i].write(); + e.details = details(v); + e.blend = BlendState { + factor: fl(v, "factor"), + previous: fl(v, "previous"), + }; + } + if c["reseed"].as_bool().unwrap() { + for i in 0..2 { + self.random[i].set_seed(c["seeds"][i].as_i64().unwrap()); + } + } + } + fn all(&mut self) { + writeln!( + self.out, + "state {} {} {}", + self.calls, + self.changed, + n(self.config(), "random") + ) + .unwrap(); + for (i, e) in self.inputs.iter().enumerate() { + writeln!(self.out, "input {i} {}", desc(e)).unwrap(); + } + for (i, e) in self.added.iter().enumerate() { + writeln!(self.out, "added {i} {}", desc(e)).unwrap(); + } + } + fn event(&mut self, name: String) -> Result<bool, &'static str> { + writeln!(self.out, "event {name}").unwrap(); + let i = self.calls; + self.calls += 1; + self.all(); + if i == n(&self.f, "fail") { + return Err("callback"); + } + if i == n(&self.f, "mutate") { + self.changed = true; + self.reset(); + } + let r = self.config()["returns"].as_array().unwrap(); + Ok(r[i as usize % r.len()].as_bool().unwrap()) + } +} +impl<R: RandomSource> EffectWorld<u8, u8, Vec<u8>> for World<'_, R> { + type Error = &'static str; + type Level = i32; + type Random = usize; + type Source = R; + type SoundCategory = i32; + fn get_random(&mut self) -> Result<usize, Self::Error> { + self.event("random".into())?; + Ok(n(self.config(), "random") as usize) + } + fn random_source(&mut self, r: usize) -> &mut R { + &mut self.random[r] + } + fn add_effect(&mut self, e: Instance) -> Result<bool, Self::Error> { + let fresh = !self + .inputs + .iter() + .chain(self.added.iter()) + .any(|v| v.same_reference(&e)); + let result = self.event(format!("add {fresh} {}", desc(&e)))?; + self.added.push(e); + Ok(result) + } + fn effect_set(&self, set: &Vec<u8>) -> Vec<u8> { + set.clone() + } + fn remove_effect(&mut self, e: u8) -> Result<bool, Self::Error> { + self.event(format!("remove {e}")) + } + fn remove_all_effects(&mut self) -> Result<bool, Self::Error> { + self.event("clear".into()) + } + fn block_position(&mut self) -> Result<BlockPos, Self::Error> { + self.event("position".into())?; + let p = &self.config()["position"]; + Ok(BlockPos::new( + p[0].as_i64().unwrap() as i32, + p[1].as_i64().unwrap() as i32, + p[2].as_i64().unwrap() as i32, + )) + } + fn sound_category(&mut self) -> Result<i32, Self::Error> { + self.event("category".into())?; + Ok(n(self.config(), "category")) + } + fn play_sound(&mut self, level: i32, p: BlockPos, s: u8, c: i32) -> Result<(), Self::Error> { + self.event(format!("sound {level} {} {} {} {s} {c}", p.x, p.y, p.z))?; + Ok(()) + } +} +fn run<R: RandomSource>(f: Value, out: &mut dyn Write, make: fn(i64) -> R) { + let random = std::array::from_fn(|i| make(f["seeds"][i].as_i64().unwrap())); + let inputs = (0..3) + .map(|i| { + let d = details(&f["initial"]["instances"][i]); + Instance::new(i as u8, d, Some(Instance::new(i as u8, d, None))) + }) + .collect(); + let mut w = World { + f, + out, + random, + inputs, + added: Vec::new(), + changed: false, + calls: 0, + }; + w.reset(); + w.all(); + let commands = w.f["ops"].as_array().unwrap().clone(); + for op in commands { + let list = op["list"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_u64().unwrap() as u8) + .collect::<Vec<_>>(); + let effect: ConsumeEffect<u8, u8> = match n(&op, "kind") { + 0 => ConsumeEffect::ApplyStatus { + effects: list.iter().map(|&i| w.inputs[i as usize].clone()).collect(), + probability: fl(&op, "probability"), + }, + 1 => ConsumeEffect::RemoveStatus(list), + 2 => ConsumeEffect::ClearStatus, + _ => ConsumeEffect::PlaySound(n(&op, "sound") as u8), + }; + let result = effect.apply(&mut w, n(&op, "level")); + writeln!( + w.out, + "result {}", + result.map(|b| b.to_string()).unwrap_or_else(str::to_string) + ) + .unwrap(); + w.all(); + } + for (i, r) in w.random.iter_mut().enumerate() { + writeln!(w.out, "random {i} {} {}", r.next_long(), r.next_long()).unwrap(); + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + if f["xor"].as_bool().unwrap() { + run(f, &mut out, XoroshiroRandom::new); + } else { + run(f, &mut out, LegacyRandom::new); + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/damage_immunity_fixture.rs b/crates/horizon-world/examples/damage_immunity_fixture.rs new file mode 100644 index 000000000..b404b27b2 --- /dev/null +++ b/crates/horizon-world/examples/damage_immunity_fixture.rs @@ -0,0 +1,123 @@ +use horizon_world::damage_immunity::{self, DamageRule, ImmunityTag, ImmunityWorld}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +struct Env<'a> { + f: &'a Value, + out: &'a mut dyn Write, + slots: &'a [Value], + calls: i64, + changed: bool, +} +impl Env<'_> { + fn flag(&self, n: &str) -> bool { + self.f[if self.changed { "after" } else { "initial" }][n] + .as_bool() + .unwrap() + } + fn event(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected immunity callback failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.changed = true; + } + Ok(()) + } + fn query(&mut self, n: &str, k: &str) -> io::Result<bool> { + self.event(n)?; + Ok(self.flag(k)) + } +} +impl ImmunityWorld for Env<'_> { + type Error = io::Error; + fn removed(&self) -> bool { + self.f["initial"]["removed"].as_bool().unwrap() + } + fn permanently_invulnerable(&mut self) -> io::Result<bool> { + self.query("permanent", "permanent") + } + fn temporarily_invulnerable(&mut self) -> io::Result<bool> { + self.query("temporary", "temporary") + } + fn tag(&mut self, t: ImmunityTag) -> io::Result<bool> { + let n = match t { + ImmunityTag::BypassesInvulnerability => "bypass", + ImmunityTag::Fire => "fire", + ImmunityTag::Fall => "fall", + ImmunityTag::Drowning => "drowning", + ImmunityTag::Freezing => "freezing", + }; + self.query(&format!("tag {n}"), n) + } + fn creative_source(&mut self) -> io::Result<bool> { + self.query("creative", "creative") + } + fn fire_immune(&mut self) -> io::Result<bool> { + self.query("fire-immune", "fire_immune") + } + fn fall_immune(&mut self) -> io::Result<bool> { + self.query("fall-immune", "fall_immune") + } + fn enchantment_immunity(&mut self) -> io::Result<bool> { + for s in self.slots { + self.event(&format!("slot {}", s.as_u64().unwrap()))?; + } + Ok(false) + } + fn damage_rule(&mut self, r: DamageRule) -> io::Result<bool> { + let n = match r { + DamageRule::Drowning => "drowning", + DamageRule::Fall => "fall", + DamageRule::Fire => "fire", + DamageRule::Freeze => "freeze", + }; + self.event("rules")?; + self.query(&format!("rule {n}"), &format!("rule_{n}")) + } + fn changing_dimension(&mut self) -> io::Result<bool> { + self.query("changing", "changing") + } + fn ender_pearl(&mut self) -> io::Result<bool> { + self.query("pearl", "pearl") + } + fn client_loaded(&mut self) -> io::Result<bool> { + self.query("loaded", "loaded") + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let slots: Value = serde_json::from_str(&fs::read_to_string(dir.join("slots.json"))?)?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut e = Env { + f: &f, + out: &mut out, + slots: slots.as_array().unwrap(), + calls: 0, + changed: false, + }; + let result = match f["mode"].as_str().unwrap() { + "entity" => damage_immunity::entity_invulnerable(&mut e), + "base" => damage_immunity::base_immunity(&mut e), + "living" => damage_immunity::living_immunity(&mut e), + "player" => damage_immunity::player_immunity(&mut e), + "server" => damage_immunity::server_player_immunity(&mut e), + _ => panic!("mode"), + }; + match result { + Ok(v) => writeln!(e.out, "bool {v}\nresult ok")?, + Err(_) => writeln!(e.out, "result error")?, + }; + writeln!(e.out, "queries {} {}", e.calls, e.changed)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/damage_reduction_fixture.rs b/crates/horizon-world/examples/damage_reduction_fixture.rs new file mode 100644 index 000000000..16d37af2f --- /dev/null +++ b/crates/horizon-world/examples/damage_reduction_fixture.rs @@ -0,0 +1,152 @@ +use horizon_world::{ + combat_rules::ArmorWorld, + damage_reduction::{self, Bypass, DamageReductionWorld}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + changed: bool, + slots: &'a [Value], +} +impl World<'_> { + fn state(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn query(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected damage reduction failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.changed = true; + } + Ok(()) + } +} +impl ArmorWorld for World<'_> { + type Error = io::Error; + type Weapon = (); + type ServerLevel = (); + fn weapon(&mut self) -> io::Result<Option<()>> { + self.query("weapon")?; + Ok(self.state()["weapon"].as_bool().unwrap().then_some(())) + } + fn server_level(&mut self) -> io::Result<Option<()>> { + self.query("level")?; + Ok(self.state()["server"].as_bool().unwrap().then_some(())) + } + fn modify_armor_effectiveness(&mut self, _: (), _: (), v: f32) -> io::Result<f32> { + Ok(v) + } +} +impl DamageReductionWorld for World<'_> { + fn bypasses(&mut self, b: Bypass) -> io::Result<bool> { + let n = match b { + Bypass::Armor => "armor", + Bypass::Effects => "effects", + Bypass::Resistance => "resistance", + Bypass::Enchantments => "enchantments", + }; + self.query(&format!("bypass {n}"))?; + Ok(self.state()[format!("bypass_{n}")].as_bool().unwrap()) + } + fn hurt_armor(&mut self, v: f32) -> io::Result<()> { + self.query(&format!("hurt-armor {:08x}", bits(v))) + } + fn armor_value(&mut self) -> io::Result<i32> { + self.query("armor")?; + Ok(damage_reduction::armor_from_attribute(number( + &self.state()["armor"], + ))) + } + fn toughness_attribute(&mut self) -> io::Result<f64> { + self.query("toughness")?; + Ok(number(&self.state()["toughness"])) + } + fn has_resistance(&mut self) -> io::Result<bool> { + self.query("has-resistance")?; + Ok(self.state()["resistance"].as_bool().unwrap()) + } + fn resistance_amplifier(&mut self) -> io::Result<i32> { + self.query("effect")?; + Ok(self.state()["amplifier"].as_i64().unwrap() as i32) + } + fn victim_is_server_player(&self) -> bool { + self.f["player"].as_bool().unwrap() + } + fn award_resisted(&mut self, v: i32) -> io::Result<()> { + self.query(&format!("stat self resisted {v}")) + } + fn attacker_is_server_player(&mut self) -> io::Result<bool> { + self.query("attacker")?; + Ok(self.f["attacker"] == 2) + } + fn award_dealt_resisted(&mut self, v: i32) -> io::Result<()> { + self.query("attacker")?; + self.query(&format!("stat attacker dealt-resisted {v}")) + } + fn damage_protection(&mut self, _: ()) -> io::Result<f32> { + for i in 0..self.slots.len() { + let slot = self.slots[i].as_i64().unwrap(); + self.query(&format!("slot {slot}"))?; + } + Ok(0.0) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let slots: Value = serde_json::from_str(&fs::read_to_string(dir.join("slots.json"))?)?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + changed: false, + slots: slots.as_array().unwrap(), + }; + let mode = f["mode"].as_str().unwrap(); + let result = if mode == "armor-value" { + w.armor_value().and_then(|v| writeln!(w.out, "int {v}")) + } else { + let d = single(&f["damage"]); + let r = if mode == "armor" { + damage_reduction::after_armor(&mut w, d) + } else { + damage_reduction::after_magic(&mut w, d) + }; + r.and_then(|v| writeln!(w.out, "float {:08x}", bits(v))) + }; + writeln!( + w.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!(w.out, "queries {}", w.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/damage_source_fixture.rs b/crates/horizon-world/examples/damage_source_fixture.rs new file mode 100644 index 000000000..7e8bfdaee --- /dev/null +++ b/crates/horizon-world/examples/damage_source_fixture.rs @@ -0,0 +1,170 @@ +use horizon_world::damage_source::{Catalog, EntityKind, SourceWorld}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn position(v: &Value) -> [f64; 3] { + std::array::from_fn(|i| number(&v[i])) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + f64::NAN.to_bits() + } else { + v.to_bits() + } +} +fn vec(v: Option<[f64; 3]>) -> String { + match v { + None => "none".into(), + Some(v) => format!( + "{:016x} {:016x} {:016x}", + bits(v[0]), + bits(v[1]), + bits(v[2]) + ), + } +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + changed: bool, +} +impl World<'_> { + fn state(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn event(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected damage source query failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.changed = true; + } + Ok(()) + } +} +impl SourceWorld for World<'_> { + type Error = io::Error; + type Entity = usize; + type Weapon = (); + fn kind(&self, id: usize) -> EntityKind { + match id { + 2 => EntityKind::Living, + 3 | 4 => EntityKind::Player, + _ => EntityKind::Other, + } + } + fn weapon(&mut self, id: usize) -> io::Result<Option<()>> { + self.event(&format!("weapon {id}"))?; + Ok(self.state()["weapons"][id].as_bool().unwrap().then_some(())) + } + fn position(&mut self, id: usize) -> io::Result<[f64; 3]> { + self.event(&format!("position {id}"))?; + Ok(position(&self.state()["positions"][id])) + } + fn causing_entity(&mut self, stored: Option<usize>) -> io::Result<Option<usize>> { + self.event("entity")?; + Ok(if self.f["virtual"].as_bool().unwrap() { + let id = self.state()["virtual_entity"].as_u64().unwrap() as usize; + (id != 0).then_some(id) + } else { + stored + }) + } + fn instabuild(&mut self, id: usize) -> io::Result<bool> { + self.event(&format!("abilities {id}"))?; + Ok(self.state()["creative"][id].as_bool().unwrap()) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let catalog = Catalog::from_json( + &serde_json::from_str(&fs::read_to_string(dir.join("catalog.json"))?)?, + &serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?, + )?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for (id, d) in catalog.entries() { + writeln!( + out, + "definition {} {} {:08x} {} {} {}", + d.name, + d.message_id, + d.exhaustion.to_bits(), + d.scaling.name(), + d.effects, + d.death_message_type + )?; + for tag in catalog.tags() { + writeln!(out, "tag {tag} {}", catalog.in_tag(id, tag))?; + } + } + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let entity = |key: &str| { + let id = f[key].as_u64().unwrap() as usize; + (id != 0).then_some(id) + }; + let (direct, causing, pos) = match f["constructor"].as_u64().unwrap() { + 0 => (entity("direct"), entity("causing"), None), + 1 => (entity("direct"), entity("direct"), None), + 2 => (None, None, Some(position(&f["position"]))), + 3 => (None, None, None), + _ => panic!("constructor"), + }; + let source = catalog + .source( + catalog.id(f["type"].as_str().unwrap()).unwrap(), + direct, + causing, + pos, + ) + .unwrap(); + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + changed: false, + }; + let result = (|| -> io::Result<()> { + writeln!( + w.out, + "direct {} {} {}", + source.is_direct(), + source.direct_entity().unwrap_or(0), + source.causing_entity().unwrap_or(0) + )?; + let scales = source.scales_with_difficulty(&w); + writeln!(w.out, "scales {scales}")?; + let weapon = source.weapon(&mut w)?; + writeln!(w.out, "weapon-result {}", weapon.is_some())?; + let creative = source.creative_player(&mut w)?; + writeln!(w.out, "creative {creative}")?; + let pos = source.position(&mut w)?; + writeln!(w.out, "position-result {}", vec(pos))?; + writeln!(w.out, "raw {}", vec(source.position_raw()))?; + writeln!( + w.out, + "type {}", + source.is_type(f["check_type"].as_str().unwrap()) + )?; + Ok(()) + })(); + writeln!( + w.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!(w.out, "queries {} {}", w.calls, w.changed)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/decoration_fixture.rs b/crates/horizon-world/examples/decoration_fixture.rs new file mode 100644 index 000000000..57c33d24b --- /dev/null +++ b/crates/horizon-world/examples/decoration_fixture.rs @@ -0,0 +1,211 @@ +use horizon_core::{position::ChunkPos, random::RandomSource}; +use horizon_world::{ + heightmap::HeightmapType, + worldgen::{ + anchor::WorldGenerationContext, + decoration::{DecorationBiome, DecorationWorld, FeatureDecorationPlan}, + feature_sort::FeatureIdentity, + placement::{PlacementContext, PlacementModifier, PlacementQueryError}, + }, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +struct World<'a, W> { + f: &'a Value, + out: &'a mut W, + biomes: &'a [Vec<Vec<FeatureIdentity>>], + calls: i32, + queries: i32, + notifications: i32, + chunks_read: i32, +} +impl<W: Write> DecorationWorld for World<'_, W> { + type Error = (); + fn min_section_y(&mut self) -> Result<i32, ()> { + Ok(n(&self.f["min"]) >> 4) + } + fn chunk_biomes(&mut self, chunk: ChunkPos) -> Result<Vec<DecorationBiome>, ()> { + writeln!(self.out, "chunk {} {}", chunk.x, chunk.z).map_err(|_| ())?; + let call = self.chunks_read; + self.chunks_read += 1; + if call == n(&self.f["chunk_fail"]) { + return Err(()); + } + let dx = chunk.x.wrapping_sub(n(&self.f["cx"])); + let dz = chunk.z.wrapping_sub(n(&self.f["cz"])); + let values = self.f["palettes"][((dz + 1) * 3 + dx + 1) as usize] + .as_array() + .unwrap(); + // The native fixture fills every quart cell from this repeating sequence. + // Only cells actually present in the chunk count as resident biomes. + Ok((0..n(&self.f["height"]) * 4) + .map(|i| DecorationBiome(n(&values[i as usize % values.len()]) as u32)) + .collect()) + } + fn set_currently_generating(&mut self, feature: Option<FeatureIdentity>) -> Result<(), ()> { + match feature { + Some(id) => writeln!( + self.out, + "generating ResourceKey[minecraft:worldgen/placed_feature / horizon:f{}]", + id.0 + ), + None => writeln!(self.out, "generating none"), + } + .map_err(|_| ())?; + let call = self.notifications; + self.notifications += 1; + if call == n(&self.f["notify_fail"]) { + Err(()) + } else { + Ok(()) + } + } +} +impl<W: Write> PlacementContext for World<'_, W> { + fn generation(&self) -> WorldGenerationContext { + WorldGenerationContext::new(-64, 384, 63) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(n(&self.f["min"])) + } + fn height(&mut self, _: HeightmapType, _: i32, _: i32) -> Result<i32, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + fn biome_allows_feature( + &mut self, + p: [i32; 3], + feature: FeatureIdentity, + ) -> Result<bool, PlacementQueryError> { + let index = p[0] + .wrapping_mul(31) + .wrapping_add(p[1].wrapping_mul(7)) + .wrapping_add(p[2].wrapping_mul(17)) + .wrapping_add(n(&self.f["biome_offset"])) + .rem_euclid(self.biomes.len() as i32 + 1) as usize; + writeln!(self.out, "biome {} {} {} {}", p[0], p[1], p[2], index) + .map_err(|e| PlacementQueryError::Failed(e.to_string()))?; + let call = self.queries; + self.queries += 1; + if call == n(&self.f["query_fail"]) { + return Err(PlacementQueryError::Unavailable); + } + Ok(self + .biomes + .get(index) + .is_some_and(|steps| steps.iter().flatten().any(|id| *id == feature))) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let biomes = f["biomes"] + .as_array() + .unwrap() + .iter() + .map(|b| { + b.as_array() + .unwrap() + .iter() + .map(|s| { + s.as_array() + .unwrap() + .iter() + .map(|id| FeatureIdentity(n(id) as u32)) + .collect::<Vec<_>>() + }) + .collect::<Vec<_>>() + }) + .collect::<Vec<_>>(); + let plan = FeatureDecorationPlan::new( + biomes + .iter() + .enumerate() + .map(|(i, b)| (DecorationBiome(i as u32), b.clone())) + .collect(), + ); + let Ok(plan) = plan else { + writeln!(out, "plan error")?; + continue; + }; + writeln!(out, "plan ok")?; + let placements = f["placements"] + .as_array() + .unwrap() + .iter() + .map(|p| { + p.as_array() + .unwrap() + .iter() + .map(|m| PlacementModifier::from_json(&m.to_string())) + .collect::<Result<Vec<_>, _>>() + }) + .collect::<Result<Vec<_>, _>>()?; + let mut world = World { + f: &f, + out: &mut out, + biomes: &biomes, + calls: 0, + queries: 0, + notifications: 0, + chunks_read: 0, + }; + for _ in 0..2 { + world.calls = 0; + world.queries = 0; + world.notifications = 0; + world.chunks_read = 0; + let result = plan.decorate_features( + &mut world, + ChunkPos::new(n(&f["cx"]), n(&f["cz"])), + f["seed"].as_i64().unwrap(), + |w, placer, rng, id, origin| { + placer + .place_with_biome_check( + &placements[id.0 as usize], + w, + rng, + origin, + id, + |w, r, p| { + writeln!(w.out, "feature {} {} {} {}", id.0, p[0], p[1], p[2]) + .map_err(|_| ())?; + writeln!( + w.out, + "draw {} {} {:x} {:x}", + r.next_long(), + r.next_int_bound(17).unwrap(), + r.next_float().to_bits(), + r.next_double().to_bits() + ) + .map_err(|_| ())?; + let call = w.calls; + w.calls += 1; + if call == n(&w.f["feature_fail"]) { + return Err(()); + } + Ok(n(&w.f["return_mode"]) == 0 + || (n(&w.f["return_mode"]) == 2 && id.0 % 2 == 0)) + }, + ) + .map_err(|_| ()) + }, + ); + writeln!( + world.out, + "decorate {}", + if result.is_ok() { "ok" } else { "error" } + )?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/decoration_region_fixture.rs b/crates/horizon-world/examples/decoration_region_fixture.rs new file mode 100644 index 000000000..db1fb4206 --- /dev/null +++ b/crates/horizon-world/examples/decoration_region_fixture.rs @@ -0,0 +1,304 @@ +#[path = "support/decoration_storage.rs"] +mod storage; +use horizon_core::{ + biome::obfuscate_seed, + position::{BlockPos, ChunkPos}, +}; +use horizon_world::{ + heightmap::HeightmapType, + registry::{BlockRegistry, BlockStateId}, + worldgen::{ + anchor::WorldGenerationContext, + biome_chunk::{BiomeChunk, BiomeRegion}, + biome_predicate::BiomePredicateBindings, + block_feature::FeatureBlockBindings, + decoration::{DecorationBiome, DecorationWorld, FeatureDecorationPlan}, + feature::{FeatureBlocks, FeatureWorld}, + feature_graph::FeatureDefinition, + feature_region::TerrainRegion, + feature_sort::FeatureIdentity, + placement::{LayerBlock, PlacementContext, PlacementModifier, PlacementQueryError}, + terrain::{PreLightChunkStage, TerrainChunk}, + }, +}; +use serde_json::Value; +use std::{ + collections::{BTreeMap, BTreeSet}, + fs, + io::{self, Write}, + path::Path, + sync::Arc, +}; +use storage::{Properties, State}; +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +struct World<'a, W> { + out: &'a mut W, + f: &'a Value, + region: TerrainRegion<'a, Properties<'a>>, + biomes: BiomeRegion<DecorationBiome>, + settings: Vec<Vec<Vec<FeatureIdentity>>>, + writes: i32, +} +impl<W: Write> DecorationWorld for World<'_, W> { + type Error = (); + fn min_section_y(&mut self) -> Result<i32, ()> { + Ok(n(&self.f["min"]) >> 4) + } + fn chunk_biomes(&mut self, p: ChunkPos) -> Result<Vec<DecorationBiome>, ()> { + writeln!(self.out, "chunk {} {}", p.x, p.z).map_err(|_| ())?; + self.biomes.present_in_chunk(p).map_err(|_| ()) + } + fn set_currently_generating(&mut self, feature: Option<FeatureIdentity>) -> Result<(), ()> { + match feature { + Some(id) => writeln!( + self.out, + "generating ResourceKey[minecraft:worldgen/placed_feature / horizon:f{}]", + id.0 + ), + None => writeln!(self.out, "generating none"), + } + .map_err(|_| ()) + } +} +impl<W: Write> FeatureWorld for World<'_, W> { + type Error = (); + fn block(&mut self, p: [i32; 3]) -> Result<BlockStateId, ()> { + self.region.block(p).map_err(|_| ()) + } + fn set_block(&mut self, p: [i32; 3], state: BlockStateId, flags: i32) -> Result<bool, ()> { + writeln!( + self.out, + "write {} {} {} {} {flags}", + p[0], p[1], p[2], state.0 + ) + .map_err(|_| ())?; + let call = self.writes; + self.writes += 1; + if call == n(&self.f["write_fail"]) { + return Err(()); + } + let reject = n(&self.f["reject"]); + let result = reject == 0 || call % reject != 0; + if result { + self.region.set_block_worldgen(p, state).map_err(|_| ())?; + } + writeln!(self.out, "written {result}").map_err(|_| ())?; + Ok(result) + } +} +impl<W: Write> PlacementContext for World<'_, W> { + fn biome_identity(&mut self, p: [i32; 3]) -> Result<DecorationBiome, PlacementQueryError> { + let id = *self + .region + .biome_at(&self.biomes, BlockPos::new(p[0], p[1], p[2])) + .map_err(|e| PlacementQueryError::Failed(e.to_string()))?; + writeln!(self.out, "biome {} {} {} {}", p[0], p[1], p[2], id.0) + .map_err(|e| PlacementQueryError::Failed(e.to_string()))?; + Ok(id) + } + fn generation(&self) -> WorldGenerationContext { + self.region.generation() + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + self.region.min_y() + } + fn max_y(&mut self) -> Result<i32, PlacementQueryError> { + self.region.max_y() + } + fn height(&mut self, kind: HeightmapType, x: i32, z: i32) -> Result<i32, PlacementQueryError> { + self.region.height(kind, x, z) + } + fn layer_block(&mut self, p: [i32; 3]) -> Result<LayerBlock, PlacementQueryError> { + self.region.layer_block(p) + } + fn biome_allows_feature( + &mut self, + p: [i32; 3], + feature: FeatureIdentity, + ) -> Result<bool, PlacementQueryError> { + let id = self.biome_identity(p)?; + Ok(self + .settings + .get(id.0 as usize) + .is_some_and(|b| b.iter().flatten().any(|v| *v == feature))) + } +} +fn fixture( + f: &Value, + registry: &BlockRegistry, + states: &[State], + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let settings = f["biomes"] + .as_array() + .unwrap() + .iter() + .map(|b| { + b.as_array() + .unwrap() + .iter() + .map(|s| { + s.as_array() + .unwrap() + .iter() + .map(|id| FeatureIdentity(n(id) as u32)) + .collect::<Vec<_>>() + }) + .collect::<Vec<_>>() + }) + .collect::<Vec<_>>(); + let plan = FeatureDecorationPlan::new( + settings + .iter() + .enumerate() + .map(|(i, b)| (DecorationBiome(i as u32), b.clone())) + .collect(), + )?; + writeln!(out, "plan ok")?; + let names = (0..=settings.len()) + .map(|i| (format!("horizon:b{i}"), DecorationBiome(i as u32))) + .collect::<BTreeMap<_, _>>(); + let biomes = Arc::new(BiomePredicateBindings::new(&names, &BTreeMap::new())?); + let bindings = FeatureBlockBindings::new(registry, BTreeSet::new())?.with_biomes(biomes); + let features = f["features"] + .as_array() + .unwrap() + .iter() + .map(|v| FeatureDefinition::from_json_with_blocks(&v.to_string(), &bindings)) + .collect::<Result<Vec<_>, _>>()?; + let placements = f["placements"] + .as_array() + .unwrap() + .iter() + .map(|p| { + p.as_array() + .unwrap() + .iter() + .map(|m| PlacementModifier::from_json_with_blocks(&m.to_string(), &bindings)) + .collect::<Result<Vec<_>, _>>() + }) + .collect::<Result<Vec<_>, _>>()?; + let blocks = FeatureBlocks::from_registry(registry)?; + let min = n(&f["min"]); + let height = n(&f["height"]); + let cp = ChunkPos::new(n(&f["cx"]), n(&f["cz"])); + let stage = PreLightChunkStage::ALL + .into_iter() + .find(|s| s.name() == f["stage"].as_str().unwrap()) + .unwrap(); + let mut chunks = Vec::new(); + let mut biome_chunks = Vec::new(); + for dz in -1..=1 { + for dx in -1..=1 { + let p = ChunkPos::new(cp.x + dx, cp.z + dz); + let mut chunk = TerrainChunk::new(p, min, height, registry, Properties(states))?; + chunk.set_generation_stage(stage); + for x in 0..16 { + for z in 0..16 { + chunk.set_block_worldgen( + (p.x << 4) + x, + -56, + (p.z << 4) + z, + registry.default_state("minecraft:stone").unwrap(), + )?; + if (x + z) % 3 != 0 { + chunk.set_block_worldgen( + (p.x << 4) + x, + -48, + (p.z << 4) + z, + registry.default_state("minecraft:dirt").unwrap(), + )?; + } + } + } + chunks.push(chunk); + let values = f["palettes"][((dz + 1) * 3 + dx + 1) as usize] + .as_array() + .unwrap(); + let mut biomes = + BiomeChunk::new(p, min, height, DecorationBiome(settings.len() as u32))?; + biomes.fill(min, min + height - 1, |[x, y, z]| { + let index = ((y - (min >> 2)) * 16 + (z & 3) * 4 + (x & 3)) + .rem_euclid(values.len() as i32) as usize; + Ok::<_, std::convert::Infallible>(DecorationBiome(n(&values[index]) as u32)) + })?; + biome_chunks.push(biomes); + } + } + let mut world = World { + out, + f, + region: TerrainRegion::new(chunks, WorldGenerationContext::new(-64, 384, 63))?, + biomes: BiomeRegion::new(biome_chunks, obfuscate_seed(f["seed"].as_i64().unwrap()))?, + settings, + writes: 0, + }; + for _ in 0..2 { + world.writes = 0; + let result = plan.decorate_features( + &mut world, + cp, + f["seed"].as_i64().unwrap(), + |w, placer, rng, id, origin| { + placer + .place_with_biome_check( + &placements[id.0 as usize], + w, + rng, + origin, + id, + |w, r, p| features[id.0 as usize].place(w, r, p, blocks), + ) + .map_err(|_| ()) + }, + ); + writeln!( + world.out, + "decorate {}", + if result.is_ok() { "ok" } else { "error" } + )?; + for [x, z] in [[0, 0], [15, 15], [16, 16], [-1, -1]] { + for kind in HeightmapType::ALL { + writeln!( + world.out, + "height {} {x} {z} {}", + kind.name(), + world.region.height(kind, x, z)? + )?; + } + } + } + for chunk in world.region.chunks() { + let p = chunk.position(); + writeln!(world.out, "stored {} {}", p.x, p.z)?; + for kind in HeightmapType::ALL { + if let Some(map) = chunk.heightmap(kind) { + writeln!(world.out, "map {}", kind.name())?; + for word in map.raw_data() { + writeln!(world.out, "{word:x}")?; + } + } else { + writeln!(world.out, "missing {}", kind.name())?; + } + } + for i in 0..height as usize / 16 { + writeln!(world.out, "section {i}")?; + for index in 0..4096 { + writeln!(world.out, "{}", chunk.section(i).unwrap().get(index)?.0)?; + } + } + } + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let (registry, states) = storage::load(dir)?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + fixture(&serde_json::from_str(line)?, ®istry, &states, &mut out)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/dynamic_support_fixture.rs b/crates/horizon-world/examples/dynamic_support_fixture.rs new file mode 100644 index 000000000..a321f97d0 --- /dev/null +++ b/crates/horizon-world/examples/dynamic_support_fixture.rs @@ -0,0 +1,252 @@ +use horizon_core::geometry::{Aabb, Axis, Direction, VoxelShape}; +use horizon_world::{ + block_collision::{DynamicCollisionWorld, ShulkerCollisionState}, + block_support::SupportType, + chunk::BlockState, + collision::CachedCollisionRegistry, + dynamic_support::{DynamicSupport, DynamicSupportWorld}, + nbt::{self, Limits, Tag}, + piston_shape::{MovingPistonState, PistonBlockBindings, PistonCollisionWorld}, + registry::{BlockRegistry, BlockStateId}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn values( + out: &mut impl Write, + label: &str, + values: impl IntoIterator<Item = f64>, +) -> io::Result<()> { + write!(out, "{label}")?; + for v in values { + let bits = if v.is_nan() { + 0x7ff8_0000_0000_0000 + } else { + v.to_bits() + }; + write!(out, " {bits:016x}")?; + } + writeln!(out) +} +fn box_values(out: &mut impl Write, label: &str, b: Aabb) -> io::Result<()> { + values( + out, + label, + [ + b.min(Axis::X), + b.min(Axis::Y), + b.min(Axis::Z), + b.max(Axis::X), + b.max(Axis::Y), + b.max(Axis::Z), + ], + ) +} +fn emit(out: &mut impl Write, shape: &VoxelShape) -> io::Result<()> { + writeln!( + out, + "shape {} {} {}", + shape.is_empty(), + shape.boxes().len(), + shape.is_cube() + )?; + for (axis, name) in Axis::ALL.into_iter().zip(["x", "y", "z"]) { + values(out, name, shape.coordinates(axis).iter().copied())?; + } + let axes = shape.cube_coordinate_axes(); + writeln!( + out, + "axes {}", + u8::from(axes[0]) + 2 * u8::from(axes[1]) + 4 * u8::from(axes[2]) + )?; + values( + out, + "extrema", + Axis::ALL + .map(|a| shape.min(a)) + .into_iter() + .chain(Axis::ALL.map(|a| shape.max(a))), + )?; + match shape.bounds() { + Some(b) => box_values(out, "bounds", b)?, + None => writeln!(out, "bounds none")?, + } + for b in shape.boxes() { + box_values(out, "box", *b)?; + } + Ok(()) +} +struct World<'a, W> { + collisions: &'a CachedCollisionRegistry<'a>, + pistons: &'a PistonBlockBindings<'a>, + dynamic: &'a [Option<DynamicSupport>], + active: Option<MovingPistonState>, + noclip: Option<Direction>, + out: &'a mut W, + entity: &'a str, + shulker: ShulkerCollisionState, + fail: i32, + calls: i32, +} +impl<W: Write> World<'_, W> { + fn query(&mut self, p: [i32; 3]) -> io::Result<()> { + writeln!(self.out, "entity {} {} {}", p[0], p[1], p[2])?; + let count = self.calls; + self.calls += 1; + if count == self.fail { + return Err(io::Error::other("injected block entity failure")); + } + Ok(()) + } +} +impl<W: Write> DynamicSupportWorld for World<'_, W> { + type Error = io::Error; + fn shulker_is_closed(&mut self, p: [i32; 3]) -> io::Result<Option<bool>> { + self.query(p)?; + Ok(match self.entity { + "none" | "other" | "piston" => None, + "closed" => Some(true), + _ => Some(false), + }) + } + fn moving_piston_shape(&mut self, p: [i32; 3]) -> io::Result<Option<VoxelShape>> { + self.query(p)?; + match self.active { + None => Ok(None), + Some(active) => { + let bindings = self.pistons; + bindings + .collision_shape(self, p, active, self.noclip) + .map(Some) + .map_err(io::Error::other) + } + } + } +} +impl<W: Write> DynamicCollisionWorld for World<'_, W> { + fn shulker_collision_state( + &mut self, + p: [i32; 3], + ) -> io::Result<Option<ShulkerCollisionState>> { + self.query(p)?; + Ok(match self.entity { + "none" | "other" | "piston" => None, + _ => Some(self.shulker), + }) + } +} +impl<W: Write> PistonCollisionWorld for World<'_, W> { + type Error = io::Error; + fn collision_shape(&mut self, state: BlockStateId, p: [i32; 3]) -> io::Result<VoxelShape> { + if let Some(shape) = self.collisions.cached_shape(state)? { + return Ok(shape.clone()); + } + self.dynamic[state.0 as usize] + .as_ref() + .expect("known empty-context dynamic collision") + .clone() + .collision_shape(self, p) + .map_err(io::Error::other) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts.json"))?)?; + let states = facts["states"] + .as_array() + .unwrap() + .iter() + .map(|value| BlockState { + name: value["id"].as_str().unwrap().to_owned(), + properties: value + .get("properties") + .and_then(Value::as_object) + .map(|p| { + p.iter() + .map(|(k, v)| (k.clone(), v.as_str().unwrap().to_owned())) + .collect() + }) + .unwrap_or_default(), + }) + .collect::<Vec<_>>(); + let read = |name: &str| -> Result<Tag, Box<dyn std::error::Error>> { + Ok( + nbt::read_named(&fs::read(dir.join(name))?, Limits::default())? + .0 + .tag, + ) + }; + let registry = BlockRegistry::from_nbt(&read("block-registry.nbt")?)?; + let collisions = CachedCollisionRegistry::from_nbt(&read("cached-collision.nbt")?, ®istry)?; + let pistons = PistonBlockBindings::new(®istry)?; + let dynamic = states + .iter() + .map(DynamicSupport::from_state) + .collect::<io::Result<Vec<_>>>()?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let support = DynamicSupport::from_state(&states[f["state"].as_u64().unwrap() as usize])? + .ok_or("missing dynamic support selection")?; + let p = std::array::from_fn(|i| f["position"][i].as_i64().unwrap() as i32); + values(&mut out, "offset", support.offset(p).components())?; + let active = f.get("piston").map(|v| MovingPistonState { + moved_state: BlockStateId(v["state"].as_u64().unwrap() as u32), + direction: Direction::ALL[v["direction"].as_u64().unwrap() as usize], + extending: v["extending"].as_bool().unwrap(), + source: v["source"].as_bool().unwrap(), + progress: f32::from_bits( + u32::from_str_radix(v["progress"].as_str().unwrap(), 16).unwrap(), + ), + previous_progress: 0.0, + }); + let clip = f + .get("piston") + .map(|v| v["noclip"].as_i64().unwrap()) + .unwrap_or(-1); + let mut world = World { + collisions: &collisions, + pistons: &pistons, + dynamic: &dynamic, + active, + noclip: (clip >= 0).then(|| Direction::ALL[clip as usize]), + out: &mut out, + entity: f["entity"].as_str().unwrap(), + shulker: ShulkerCollisionState { + previous_progress: f.get("shulker_progress").map_or(0.0, |v| { + f32::from_bits(u32::from_str_radix(v[0].as_str().unwrap(), 16).unwrap()) + }), + progress: f.get("shulker_progress").map_or(0.0, |v| { + f32::from_bits(u32::from_str_radix(v[1].as_str().unwrap(), 16).unwrap()) + }), + }, + calls: 0, + fail: f["fail"].as_i64().unwrap() as i32, + }; + match if f.get("collision").and_then(Value::as_bool).unwrap_or(false) { + support.collision_shape(&mut world, p) + } else { + support.shape(&mut world, p) + } { + Ok(shape) => emit(world.out, &shape)?, + Err(_) => writeln!(world.out, "shape error")?, + } + for direction in Direction::ALL { + for (i, kind) in [SupportType::Full, SupportType::Center, SupportType::Rigid] + .into_iter() + .enumerate() + { + match support.is_face_sturdy(&mut world, p, direction, kind) { + Ok(value) => writeln!(world.out, "support {} {i} {value}", direction as u8)?, + Err(_) => writeln!(world.out, "support {} {i} error", direction as u8)?, + } + } + } + writeln!(world.out, "queries {}", world.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/edge_backoff_fixture.rs b/crates/horizon-world/examples/edge_backoff_fixture.rs new file mode 100644 index 000000000..f12ce4431 --- /dev/null +++ b/crates/horizon-world/examples/edge_backoff_fixture.rs @@ -0,0 +1,117 @@ +use horizon_core::geometry::{Aabb, Axis, Vec3}; +use horizon_world::edge_backoff::{EdgeBackoffInput, EdgeBackoffWorld, back_off_from_edge}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vector(v: &Value) -> Vec3 { + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +struct World<'a> { + input: &'a Value, + out: &'a mut dyn Write, + calls: i64, + probes: usize, +} +impl World<'_> { + fn query(&mut self, text: String) -> io::Result<()> { + writeln!(self.out, "{text}")?; + let call = self.calls; + self.calls += 1; + if call == self.input["fail"].as_i64().unwrap() { + Err(io::Error::other("injected edge query failure")) + } else { + Ok(()) + } + } +} +impl EdgeBackoffWorld for World<'_> { + type Error = io::Error; + fn max_up_step(&mut self) -> io::Result<f32> { + self.query("step".into())?; + Ok(f32::from_bits( + u32::from_str_radix(self.input["step"].as_str().unwrap(), 16).unwrap(), + )) + } + fn staying_on_ground_surface(&mut self) -> io::Result<bool> { + self.query("staying".into())?; + Ok(self.input["staying"].as_bool().unwrap()) + } + fn on_ground(&mut self) -> io::Result<bool> { + self.query("ground".into())?; + Ok(self.input["ground"].as_bool().unwrap()) + } + fn no_collision(&mut self, b: Aabb) -> io::Result<bool> { + self.query(format!( + "clear {:016x} {:016x} {:016x} {:016x} {:016x} {:016x}", + bits(b.min(Axis::X)), + bits(b.min(Axis::Y)), + bits(b.min(Axis::Z)), + bits(b.max(Axis::X)), + bits(b.max(Axis::Y)), + bits(b.max(Axis::Z)) + ))?; + let p = self.probes; + self.probes += 1; + Ok(self.input["clear"] + .as_array() + .unwrap() + .get(p) + .and_then(Value::as_bool) + .unwrap_or(false)) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let b = &f["box"]; + let bounds = Aabb::new( + Vec3::new(number(&b[0]), number(&b[1]), number(&b[2])), + Vec3::new(number(&b[3]), number(&b[4]), number(&b[5])), + ); + let mut world = World { + input: &f, + out: &mut out, + calls: 0, + probes: 0, + }; + let result = back_off_from_edge( + &mut world, + EdgeBackoffInput { + movement: vector(&f["movement"]), + bounds, + flying: f["flying"].as_bool().unwrap(), + self_or_player: matches!(f["mover"].as_str().unwrap(), "SELF" | "PLAYER"), + fall_distance: number(&f["fall"]), + query_budget: 10000, + }, + ); + match result { + Ok(v) => writeln!( + world.out, + "movement {:016x} {:016x} {:016x}", + bits(v.x), + bits(v.y), + bits(v.z) + )?, + Err(_) => writeln!(world.out, "error")?, + }; + writeln!(world.out, "queries {}", world.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/effect_attribute_modifiers_fixture.rs b/crates/horizon-world/examples/effect_attribute_modifiers_fixture.rs new file mode 100644 index 000000000..8616303de --- /dev/null +++ b/crates/horizon-world/examples/effect_attribute_modifiers_fixture.rs @@ -0,0 +1,348 @@ +use horizon_world::{ + attributes::{AttributeError, Definition, Instance, Modifier, Observer, Operation}, + effect_attribute_modifiers::{self as effects, Definitions, Error, ModifierWorld, Template}, + object_open_set::{CursorError, ObjectKey}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone, PartialEq, Eq)] +struct Key { + id: usize, + hash: i32, +} +impl ObjectKey for Key { + fn object_hash(&self) -> i32 { + self.hash + } +} +#[derive(Debug)] +enum Stop { + Callback, + Duplicate, +} +fn bits(v: f64) -> String { + format!( + "{:016x}", + if v.is_nan() { + f64::NAN.to_bits() + } else { + v.to_bits() + } + ) +} +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn desc(m: &Modifier) -> String { + format!("{}:{}:{}", m.id(), bits(m.amount()), m.operation() as u8) +} +fn key_desc(k: Option<&Key>) -> String { + k.map_or("null".into(), |k| k.id.to_string()) +} +struct Shared { + keys: Vec<Key>, + templates: Vec<Template>, + routes: Vec<i32>, + pool: Vec<Modifier>, + calls: i64, + changed: bool, + op: Value, + logs: Vec<String>, +} +impl Shared { + fn key(&self, op: &Value) -> Option<Key> { + let k = op["key"].as_i64().unwrap(); + (k >= 0).then(|| self.keys[k as usize].clone()) + } + fn definitions(&mut self, defs: &Definitions<Key>) { + self.logs.push(format!( + "definitions {} | {}", + defs.len(), + defs.entries() + .iter() + .map(|(k, v)| { + let v = v.as_ref().map_or("null".into(), |t| { + format!("{}:{}:{}", t.id(), bits(t.amount()), t.operation() as u8) + }); + format!("{}={v}", key_desc(k.as_ref())) + }) + .collect::<Vec<_>>() + .join(",") + )); + } + fn raw(&mut self, defs: &mut Definitions<Key>, op: &Value) { + match op["op"].as_str().unwrap() { + "define" => effects::add_definition( + defs, + self.key(op), + self.templates[op["template"].as_u64().unwrap() as usize].clone(), + ), + "null" => { + defs.put(self.key(op), None); + } + "drop" => { + defs.remove(self.key(op).as_ref()); + } + "clear" => defs.clear(), + "route" => { + let k = self.key(op).map_or(self.keys.len(), |k| k.id); + self.routes[k] = op["target"].as_i64().unwrap() as i32; + } + _ => panic!("raw operation"), + } + } + fn event(&mut self, defs: &mut Definitions<Key>, name: String) -> Result<(), Stop> { + let call = self.calls; + self.calls += 1; + self.logs.push(format!("event {call} {name}")); + self.definitions(defs); + if call == self.op["fail"].as_i64().unwrap() { + return Err(Stop::Callback); + } + if call == self.op["mutate"].as_i64().unwrap() { + self.changed = true; + for action in self.op["mutations"].as_array().unwrap().clone() { + self.raw(defs, &action); + } + } + Ok(()) + } + fn refs(&self, mods: &[Modifier]) -> String { + mods.iter() + .map(|m| { + self.pool + .iter() + .position(|p| p.same_identity(m)) + .unwrap() + .to_string() + }) + .collect::<Vec<_>>() + .join(",") + } + fn state(&mut self, id: usize, a: &Instance) { + self.logs.push(format!( + "instance {id} {} {} {} | {} | {}", + bits(a.base_value()), + a.is_dirty(), + bits(a.cached_value()), + self.refs(a.modifiers()), + self.refs(a.permanent_modifiers()) + )); + } + fn modifier(&mut self, m: Modifier) -> usize { + let id = self.pool.len(); + self.pool.push(m); + id + } +} +struct Dirty<'a> { + shared: &'a mut Shared, + definitions: &'a mut Definitions<Key>, + id: usize, +} +impl Observer for Dirty<'_> { + type Error = Stop; + fn dirty(&mut self, a: &mut Instance) -> Result<(), Stop> { + self.shared.state(self.id, a); + self.shared + .event(self.definitions, format!("dirty {}", self.id))?; + if self.shared.op["read"].as_bool().unwrap() { + self.shared + .logs + .push(format!("observed {}", bits(a.value()))); + } + Ok(()) + } +} +fn attribute_error(e: AttributeError<Stop>) -> Stop { + match e { + AttributeError::DuplicateModifier(_) => Stop::Duplicate, + AttributeError::Observer(e) => e, + } +} +struct World { + shared: Shared, + instances: Vec<Instance>, +} +impl ModifierWorld<Key> for World { + type Instance = usize; + type Error = Stop; + fn get_instance( + &mut self, + defs: &mut Definitions<Key>, + key: Option<Key>, + ) -> Result<Option<usize>, Stop> { + self.shared + .event(defs, format!("get {}", key_desc(key.as_ref())))?; + let i = key.as_ref().map_or(self.shared.keys.len(), |k| k.id); + let id = self.shared.routes[i]; + Ok((id >= 0).then_some(id as usize)) + } + fn remove_modifier( + &mut self, + defs: &mut Definitions<Key>, + id: &usize, + modifier: &str, + ) -> Result<(), Stop> { + self.shared.event(defs, format!("remove {id} {modifier}"))?; + let mut cb = Dirty { + shared: &mut self.shared, + definitions: defs, + id: *id, + }; + self.instances[*id] + .remove(modifier, &mut cb) + .map_err(attribute_error)?; + Ok(()) + } + fn add_permanent( + &mut self, + defs: &mut Definitions<Key>, + id: &usize, + modifier: Modifier, + ) -> Result<(), Stop> { + let m = self.shared.modifier(modifier.clone()); + self.shared + .event(defs, format!("permanent {id} {m} {}", desc(&modifier)))?; + let mut cb = Dirty { + shared: &mut self.shared, + definitions: defs, + id: *id, + }; + self.instances[*id] + .add_permanent(modifier, &mut cb) + .map_err(attribute_error) + } +} +fn error(e: Error<Stop>) -> &'static str { + match e { + Error::MissingTemplate | Error::Cursor(CursorError::MissingWrapped) => "null", + Error::Cursor(CursorError::IndexOutOfBounds) => "bounds", + Error::Cursor(CursorError::NoSuchElement) => "empty", + Error::Cursor(CursorError::NoCurrentEntry) => "current", + Error::World(Stop::Callback) => "callback", + Error::World(Stop::Duplicate) => "duplicate", + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let keys = f["hashes"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(id, h)| Key { + id, + hash: h.as_i64().unwrap() as i32, + }) + .collect(); + let templates = f["templates"] + .as_array() + .unwrap() + .iter() + .map(|v| { + Template::new( + v["id"].as_str().unwrap(), + number(&v["amount"]), + Operation::ALL[v["operation"].as_u64().unwrap() as usize], + ) + }) + .collect::<io::Result<Vec<_>>>()?; + let routes = f["routes"] + .as_array() + .unwrap() + .iter() + .map(|i| i.as_i64().unwrap() as i32) + .collect(); + let instances = f["defaults"] + .as_array() + .unwrap() + .iter() + .map(|v| Instance::new(Definition::basic(number(v)))) + .collect(); + let shared = Shared { + keys, + templates, + routes, + pool: Vec::new(), + calls: 0, + changed: false, + op: Value::Null, + logs: Vec::new(), + }; + let mut world = World { shared, instances }; + let mut defs = Definitions::default(); + for op in f["setup"].as_array().unwrap() { + world.shared.raw(&mut defs, op); + } + for op in f["ops"].as_array().unwrap() { + world.shared.op = op.clone(); + world.shared.calls = 0; + world.shared.changed = false; + let amp = op["amplifier"].as_i64().unwrap() as i32; + let result = match op["op"].as_str().unwrap() { + "add" => effects::add_modifiers(&mut defs, &mut world, amp), + "remove" => effects::remove_modifiers(&mut defs, &mut world), + "create" => effects::create_modifiers(&mut defs, amp, |defs, key, modifier| { + let id = world.shared.modifier(modifier.clone()); + world.shared.event( + defs, + format!( + "consume {} {id} {}", + key_desc(key.as_ref()), + desc(&modifier) + ), + ) + }), + "seed" => { + let template = + &world.shared.templates[op["template"].as_u64().unwrap() as usize]; + let modifier = template.create(amp); + world + .add_permanent( + &mut defs, + &(op["target"].as_u64().unwrap() as usize), + modifier, + ) + .map_err(Error::World) + } + "value" => { + let id = op["target"].as_u64().unwrap() as usize; + world + .shared + .logs + .push(format!("value {id} {}", bits(world.instances[id].value()))); + Ok(()) + } + _ => { + world.shared.raw(&mut defs, op); + Ok(()) + } + }; + world + .shared + .logs + .push(format!("result {}", result.map_or_else(error, |()| "ok"))); + world.shared.logs.push(format!( + "calls {} {}", + world.shared.calls, world.shared.changed + )); + world.shared.definitions(&defs); + for (id, a) in world.instances.iter().enumerate() { + world.shared.state(id, a); + } + for log in world.shared.logs.drain(..) { + writeln!(out, "{log}")?; + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/effect_notifications_fixture.rs b/crates/horizon-world/examples/effect_notifications_fixture.rs new file mode 100644 index 000000000..248c77a97 --- /dev/null +++ b/crates/horizon-world/examples/effect_notifications_fixture.rs @@ -0,0 +1,506 @@ +use horizon_world::{ + active_effects::{ActiveEffects, EffectHooks}, + effect_notifications::{ + self as notify, EffectPacket, EligibilityWorld, ImmunityTag, NotificationWorld, + RestrictedEffect, + }, + java_hash_map::JavaKey, + object_open_set::{CursorError, ObjectKey, ObjectOpenSet}, + status_effect::{BlendState, Details, EffectInstance}, +}; +use serde_json::Value; +use std::{ + cmp::Ordering, + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone)] +struct Key { + id: usize, + hash: i32, + identity: i32, +} +impl PartialEq for Key { + fn eq(&self, other: &Self) -> bool { + self.id == other.id + } +} +impl Eq for Key {} +impl ObjectKey for Key { + fn object_hash(&self) -> i32 { + self.hash + } +} +impl JavaKey for Key { + fn java_hash(&self) -> i32 { + self.hash + } + fn tie_break(&self, other: &Self) -> Ordering { + if self.identity <= other.identity { + Ordering::Less + } else { + Ordering::Greater + } + } +} +type Effect = EffectInstance<Key>; +type Storage = ActiveEffects<Key>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn fl(v: &Value, k: &str) -> f32 { + f32::from_bits(v[k].as_u64().unwrap() as u32) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { 0x7fc00000 } else { v.to_bits() } +} +fn details(v: &Value) -> Details { + Details { + duration: n(v, "duration"), + amplifier: n(v, "amplifier"), + ambient: v["ambient"].as_bool().unwrap(), + visible: v["visible"].as_bool().unwrap(), + show_icon: v["icon"].as_bool().unwrap(), + } +} +struct World<'a> { + f: Value, + out: &'a mut dyn Write, + keys: Vec<Key>, + attribute_keys: Vec<Key>, + updates: [ObjectOpenSet<Key>; 2], + pool: Vec<Effect>, + ids: Vec<Effect>, + calls: i32, + changed: bool, +} +impl World<'_> { + fn config(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn id(&mut self, e: &Effect) -> usize { + if let Some(i) = self.ids.iter().position(|v| v.same_reference(e)) { + i + } else { + self.ids.push(e.clone()); + self.ids.len() - 1 + } + } + fn reset(&mut self, storage: &mut Storage) { + if let Some(dirty) = self.config()["dirty"].as_bool() { + storage.dirty = dirty; + } + let c = self.config().clone(); + for (i, v) in c["states"].as_array().unwrap().iter().enumerate() { + let mut e = self.pool[i].write(); + e.details = details(v); + e.blend = BlendState { + factor: fl(v, "factor"), + previous: fl(v, "previous"), + }; + } + } + fn all(&mut self, s: &Storage) { + writeln!( + self.out, + "state {} {} {}", + self.calls, self.changed, s.dirty + ) + .unwrap(); + for (i, updates) in self.updates.iter().enumerate() { + writeln!( + self.out, + "updates {i} {}", + updates + .values() + .map(|v| v.map_or("null".into(), |k| k.id.to_string())) + .collect::<Vec<_>>() + .join(",") + ) + .unwrap(); + } + let mut roots = Vec::new(); + let entries = s + .entries + .entries() + .map(|(k, e)| { + let id = self.id(e); + roots.push(e.clone()); + format!("{}={id}", k.id) + }) + .collect::<Vec<_>>() + .join(","); + writeln!(self.out, "map {entries}").unwrap(); + for (i, e) in self.pool.clone().iter().enumerate() { + let id = self.id(e); + writeln!(self.out, "pool {i} {id}").unwrap(); + roots.push(e.clone()); + } + let mut seen = Vec::new(); + let mut i = 0; + while i < roots.len() { + let e = roots[i].clone(); + i += 1; + if seen.iter().any(|v: &Effect| v.same_reference(&e)) { + continue; + } + seen.push(e.clone()); + let id = self.id(&e); + let d = e.read(); + let h = d + .hidden + .as_ref() + .map(|h| { + roots.push(h.clone()); + self.id(h).to_string() + }) + .unwrap_or("none".into()); + writeln!( + self.out, + "node {id} {} {} {} {} {} {} {h} {} {}", + d.effect.id, + d.details.duration, + d.details.amplifier, + d.details.ambient, + d.details.visible, + d.details.show_icon, + bits(d.blend.factor), + bits(d.blend.previous) + ) + .unwrap(); + } + } + fn raw(&mut self, s: &mut Storage, op: &Value) { + let a = n(op, "a") as usize; + let b = n(op, "b") as usize; + match op["op"].as_str().unwrap() { + "pending-add" => { + let key = op["b"].as_i64().unwrap(); + self.updates[a].add((key >= 0).then(|| self.attribute_keys[key as usize].clone())); + } + "pending-remove" => { + let key = op["b"].as_i64().unwrap(); + self.updates[a].remove((key >= 0).then(|| &self.attribute_keys[key as usize])); + } + "pending-clear" => self.updates[a].clear(), + "put" => { + s.entries.put(self.keys[a].clone(), self.pool[b].clone()); + } + "drop" => { + s.entries.remove(&self.keys[a]); + } + "clear" => s.entries.clear(), + "copy" => self.pool[b] = self.pool[a].copy_instance(), + "alias" => self.pool[b] = self.pool[a].clone(), + _ => panic!("raw op"), + } + } + fn event(&mut self, s: &mut Storage, name: String) -> Result<(), &'static str> { + writeln!(self.out, "event {name}").unwrap(); + let i = self.calls; + self.calls += 1; + self.all(s); + if i == n(&self.f, "fail") { + return Err("callback"); + } + if i == n(&self.f, "mutate") { + self.changed = true; + self.reset(s); + for op in self.f["mutations"].as_array().unwrap().clone() { + self.raw(s, &op); + } + } + Ok(()) + } +} +impl EffectHooks<Key> for World<'_> { + type Error = &'static str; + type Source = i32; + type Level = i32; + fn can_be_affected(&mut self, s: &mut Storage, e: Effect) -> Result<bool, Self::Error> { + notify::can_be_affected(s, &e, self) + } + fn on_added(&mut self, s: &mut Storage, e: Effect, _: Option<i32>) -> Result<(), Self::Error> { + notify::on_added(s, &e, self) + } + fn on_updated( + &mut self, + s: &mut Storage, + e: Effect, + reapply: bool, + _: Option<i32>, + ) -> Result<(), Self::Error> { + notify::on_updated(s, &e, reapply, self) + } + fn effect_added(&mut self, s: &mut Storage, e: Key, amp: i32) -> Result<(), Self::Error> { + if e.id < 4 { + Ok(()) + } else { + self.event(s, format!("effect-added {} {amp}", e.id)) + } + } + fn effect_started(&mut self, s: &mut Storage, e: Key, amp: i32) -> Result<(), Self::Error> { + if e.id < 4 { + Ok(()) + } else { + self.event(s, format!("effect-started {} {amp}", e.id)) + } + } + fn level(&mut self, s: &mut Storage) -> Result<i32, Self::Error> { + self.event(s, "level".into())?; + Ok(n(self.config(), "level")) + } + fn is_client(&mut self, s: &mut Storage, l: i32) -> Result<bool, Self::Error> { + self.event(s, format!("client {l}"))?; + Ok(self.config()["client"].as_bool().unwrap()) + } + fn on_removed(&mut self, s: &mut Storage, es: Vec<Effect>) -> Result<(), Self::Error> { + notify::on_removed(s, &es, self) + } + fn get_effect(&mut self, s: &mut Storage, key: Key) -> Result<Option<Effect>, Self::Error> { + self.event(s, format!("get {}", key.id))?; + Ok(s.get(&key)) + } + fn actor_removed(&self) -> bool { + self.config()["removed"].as_bool().unwrap() + } +} +impl EligibilityWorld<Key> for World<'_> { + type Error = &'static str; + fn has_immunity_tag(&mut self, s: &mut Storage, tag: ImmunityTag) -> Result<bool, Self::Error> { + let id = tag as usize; + self.event(s, format!("tag {id}"))?; + Ok(self.config()["tags"][id].as_bool().unwrap()) + } + fn is_restricted_effect(&self, effect: &Key, kind: RestrictedEffect) -> bool { + effect.id == kind as usize + } +} +impl NotificationWorld<Key> for World<'_> { + type Attributes = usize; + type UpdateSet = usize; + type AttributeInstance = Key; + type Attribute = i32; + type Passenger = usize; + type Connection = i32; + fn attributes(&mut self, s: &mut Storage) -> Result<usize, Self::Error> { + self.event(s, "attributes".into())?; + Ok(n(self.config(), "attributes") as usize) + } + fn add_modifiers( + &mut self, + s: &mut Storage, + e: Key, + a: usize, + amp: i32, + ) -> Result<(), Self::Error> { + if e.id < 4 { + return Ok(()); + } + self.event(s, format!("add-modifiers {} {a} {amp}", e.id)) + } + fn remove_modifiers(&mut self, s: &mut Storage, e: Key, a: usize) -> Result<(), Self::Error> { + if e.id < 4 { + return Ok(()); + } + self.event(s, format!("remove-modifiers {} {a}", e.id)) + } + fn pending_updates(&mut self, s: &mut Storage, a: usize) -> Result<usize, Self::Error> { + self.event(s, format!("pending {a}"))?; + Ok(self.config()["routes"][a].as_u64().unwrap() as usize) + } + fn update_set(&self, s: usize) -> &ObjectOpenSet<Key> { + &self.updates[s] + } + fn update_set_mut(&mut self, s: usize) -> &mut ObjectOpenSet<Key> { + &mut self.updates[s] + } + fn iterator_error(e: CursorError) -> Self::Error { + match e { + CursorError::MissingWrapped => "null", + CursorError::IndexOutOfBounds => "bounds", + CursorError::NoSuchElement => "empty", + CursorError::NoCurrentEntry => "current", + } + } + fn attribute_of(&mut self, s: &mut Storage, i: Option<Key>) -> Result<i32, Self::Error> { + let i = i.ok_or("null")?; + self.event(s, format!("attribute {}", i.id))?; + Ok(self.config()["holders"][i.id].as_i64().unwrap() as i32) + } + fn attribute_updated(&mut self, s: &mut Storage, a: i32) -> Result<(), Self::Error> { + self.event(s, format!("attribute-updated {a}")) + } + fn passengers(&self) -> Vec<usize> { + self.config()["passengers"] + .as_array() + .unwrap() + .iter() + .map(|p| p.as_u64().unwrap() as usize) + .collect() + } + fn is_server_player(&self, p: usize) -> bool { + p < 2 + } + fn connection(&self, p: usize) -> i32 { + self.config()["connections"][p].as_i64().unwrap() as i32 + } + fn entity_id(&mut self, s: &mut Storage) -> Result<i32, Self::Error> { + self.event(s, "entity-id".into())?; + Ok(n(self.config(), "entity")) + } + fn send_packet( + &mut self, + s: &mut Storage, + c: i32, + p: EffectPacket<Key>, + ) -> Result<(), Self::Error> { + if c < 0 { + return Err("null"); + } + let message = match p { + EffectPacket::Update { + entity, + effect, + amplifier, + duration, + flags, + } => format!( + "packet {c} update {entity} {} {amplifier} {duration} {flags}", + effect.id + ), + EffectPacket::Remove { entity, effect } => { + format!("packet {c} remove {entity} {}", effect.id) + } + }; + self.event(s, message) + } +} +fn run(f: Value, out: &mut dyn Write) { + let keys = f["hashes"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(id, v)| Key { + id, + hash: v.as_i64().unwrap() as i32, + identity: f["identities"][id].as_i64().unwrap() as i32, + }) + .collect::<Vec<_>>(); + let mut pool: Vec<Effect> = Vec::new(); + for v in f["initial"]["states"].as_array().unwrap() { + let h = n(v, "hidden"); + pool.push(Effect::new( + keys[n(v, "key") as usize].clone(), + details(v), + (h >= 0).then(|| pool[h as usize].clone()), + )); + } + let attribute_keys = f["attribute_hashes"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(id, h)| Key { + id, + hash: h.as_i64().unwrap() as i32, + identity: 0, + }) + .collect(); + let mut w = World { + attribute_keys, + updates: std::array::from_fn(|_| ObjectOpenSet::default()), + f, + out, + keys, + pool, + ids: Vec::new(), + calls: 0, + changed: false, + }; + let mut s = Storage::default(); + w.reset(&mut s); + for op in w.f["setup"].as_array().unwrap().clone() { + w.raw(&mut s, &op); + } + w.all(&s); + for op in w.f["ops"].as_array().unwrap().clone() { + let a = n(&op, "a") as usize; + let b = n(&op, "b") as usize; + let source = n(&op, "source"); + let source = (source >= 0).then_some(source); + let result: Result<String, &'static str> = match op["op"].as_str().unwrap() { + "eligible" => { + let e = w.pool[a].clone(); + notify::can_be_affected(&mut s, &e, &mut w).map(|v| v.to_string()) + } + "notify-add" => { + let e = w.pool[a].clone(); + notify::on_added(&mut s, &e, &mut w).map(|_| "ok".into()) + } + "notify-update" => { + let e = w.pool[a].clone(); + notify::on_updated(&mut s, &e, op["reapply"].as_bool().unwrap(), &mut w) + .map(|_| "ok".into()) + } + "notify-remove" => { + let es = op["list"] + .as_array() + .unwrap() + .iter() + .map(|i| w.pool[i.as_u64().unwrap() as usize].clone()) + .collect::<Vec<_>>(); + notify::on_removed(&mut s, &es, &mut w).map(|_| "ok".into()) + } + "send" => { + let e = w.pool[a].clone(); + notify::send_to_passengers(&mut s, &e, &mut w).map(|_| "ok".into()) + } + "refresh" => notify::refresh_attributes(&mut s, &mut w).map(|_| "ok".into()), + "pending-add" | "pending-remove" | "pending-clear" => { + w.raw(&mut s, &op); + Ok("ok".into()) + } + "add" => s + .add(w.pool[a].clone(), source, &mut w) + .map(|v| v.to_string()), + "force" => s + .force_add(w.pool[a].clone(), source, &mut w) + .map(|_| "ok".into()), + "remove" => s.remove(&w.keys[a].clone(), &mut w).map(|v| v.to_string()), + "remove-raw" => Ok(s + .remove_no_update(&w.keys[a]) + .map(|e| w.id(&e).to_string()) + .unwrap_or("none".into())), + "all" => s.remove_all(&mut w).map(|v| v.to_string()), + "has" => Ok(s.has(&w.keys[a]).to_string()), + "get" => { + let key = w.keys[a].clone(); + EffectHooks::get_effect(&mut w, &mut s, key) + .map(|e| e.map(|e| w.id(&e).to_string()).unwrap_or("none".into())) + } + "blend" => s + .blend_factor(w.keys[a].clone(), fl(&op, "partial"), &mut w) + .map(|v| bits(v).to_string()), + "put" | "drop" | "clear" | "copy" | "alias" => { + w.raw(&mut s, &op); + Ok("ok".into()) + } + _ => panic!("operation {b}"), + }; + writeln!(w.out, "result {}", result.unwrap_or_else(str::to_string)).unwrap(); + w.all(&s); + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let side = std::env::args().nth(2).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join(format!("rust-{side}.txt")))?); + for line in fs::read_to_string(dir.join(format!("inputs-{side}.txt")))?.lines() { + run(serde_json::from_str(line)?, &mut out); + } + Ok(()) +} diff --git a/crates/horizon-world/examples/effect_sync_fixture.rs b/crates/horizon-world/examples/effect_sync_fixture.rs new file mode 100644 index 000000000..6c7b5f3ae --- /dev/null +++ b/crates/horizon-world/examples/effect_sync_fixture.rs @@ -0,0 +1,455 @@ +use horizon_world::{ + active_effects::ActiveEffects, + effect_particles::{Catalog, EffectValue, Particle}, + effect_sync::{self as sync, EffectSyncWorld, Presence}, + java_hash_map::JavaKey, + status_effect::{Details, EffectInstance}, + synced_values::{DataError, DataValue, Observer, SyncedValues}, +}; +use serde_json::Value; +use std::{ + cmp::Ordering, + fs, + io::{self, Write}, + path::Path, + sync::Arc, +}; +type Result<T, E = &'static str> = std::result::Result<T, E>; +#[derive(Clone)] +struct Key { + id: usize, + hash: i32, + identity: i32, + name: String, +} +impl PartialEq for Key { + fn eq(&self, other: &Self) -> bool { + self.id == other.id + } +} +impl Eq for Key {} +impl JavaKey for Key { + fn java_hash(&self) -> i32 { + self.hash + } + fn tie_break(&self, other: &Self) -> Ordering { + if self.identity <= other.identity { + Ordering::Less + } else { + Ordering::Greater + } + } +} +type Storage = ActiveEffects<Key>; +type Data = SyncedValues<EffectValue>; +struct World<'a> { + keys: Vec<Key>, + catalog: &'a Catalog, + tables: [Data; 2], + flags: u8, + particles: u8, + ambient: u8, + data: usize, + client: bool, + tag: bool, + calls: i64, + op: Value, + pool: Vec<EffectInstance<Key>>, + particle_pool: Vec<Particle>, + out: &'a mut dyn Write, +} +impl World<'_> { + fn particle_ref(&mut self, particle: &Particle) -> String { + let id = self + .particle_pool + .iter() + .position(|p| p.same_reference(particle)) + .unwrap_or_else(|| { + self.particle_pool.push(particle.clone()); + self.particle_pool.len() - 1 + }); + let p = particle.data(); + format!( + "{id}:{}:{}", + p.kind, + p.color.map_or("none".into(), |v| v.to_string()) + ) + } + fn value(&mut self, value: &EffectValue) -> String { + match value { + EffectValue::Flags(v) => format!("flags:{v}"), + EffectValue::Ambient(v) => format!("ambient:{v}"), + EffectValue::Particles(v) => format!( + "particles:[{}]", + v.iter() + .map(|p| self.particle_ref(p)) + .collect::<Vec<_>>() + .join(",") + ), + } + } + fn packed(&mut self, values: Option<Vec<DataValue<EffectValue>>>) -> String { + match values { + None => "none".into(), + Some(v) if v.is_empty() => "empty".into(), + Some(v) => v + .iter() + .map(|v| format!("{}={}", v.id, self.value(&v.value))) + .collect::<Vec<_>>() + .join("|"), + } + } + fn controls(&mut self, s: &mut Storage, c: &Value) { + if let Some(v) = c["data"].as_u64() { + self.data = v as usize; + } + if let Some(v) = c["client"].as_bool() { + self.client = v; + } + if let Some(v) = c["tag"].as_bool() { + self.tag = v; + } + if let Some(v) = c["dirty"].as_bool() { + s.dirty = v; + } + } + fn event(&mut self, s: &mut Storage, name: impl AsRef<str>) -> Result<()> { + let call = self.calls; + self.calls += 1; + writeln!(self.out, "event {call} {}", name.as_ref()).unwrap(); + if call == self.op["fail"].as_i64().unwrap() { + return Err("callback"); + } + if call == self.op["mutate"].as_i64().unwrap() { + self.controls(s, &self.op["changes"].clone()); + for action in self.op["actions"].as_array().unwrap().clone() { + self.raw(s, &action)?; + } + } + Ok(()) + } + fn raw(&mut self, s: &mut Storage, op: &Value) -> Result<()> { + let target = op["target"].as_u64().unwrap() as usize; + let key = op["key"].as_u64().unwrap() as usize; + let slot = op["pool"].as_u64().unwrap() as usize; + match op["mode"].as_str().unwrap() { + "put" => { + s.entries + .put(self.keys[key].clone(), self.pool[slot].clone()); + } + "drop" => { + s.entries.remove(&self.keys[key]); + } + "clear" => s.entries.clear(), + "details" => { + let mut e = self.pool[slot].write(); + e.details.visible = op["visible"].as_bool().unwrap(); + e.details.ambient = op["ambient"].as_bool().unwrap(); + } + "controls" => self.controls(s, &op["changes"]), + "flags" => self.store( + s, + target, + self.flags, + EffectValue::Flags(op["flags"].as_u64().unwrap() as u8), + )?, + "ambient" => self.store( + s, + target, + self.ambient, + EffectValue::Ambient(op["ambient"].as_bool().unwrap()), + )?, + "pack" => { + let values = self.tables[target].take_dirty(); + let text = self.packed(values); + writeln!(self.out, "packed {target} {text}").unwrap(); + } + "defaults" => { + let values = self.tables[target].non_default(); + let text = self.packed(values); + writeln!(self.out, "defaults {target} {text}").unwrap(); + } + mode => panic!("raw mode {mode}"), + } + Ok(()) + } + fn store(&mut self, s: &mut Storage, data: usize, id: u8, value: EffectValue) -> Result<()> { + // Fixture callbacks can inspect/pack/reenter the same table. Mirror the + // actual item during the observer, then keep its captured identity. + let mut table = self.tables[data].clone(); + let result = table.set( + id, + value, + false, + &mut Callback { + world: self, + storage: s, + data, + }, + ); + self.tables[data] = table; + result.map_err(|e| match e { + DataError::Observer(e) => e, + _ => panic!("registered data IDs"), + }) + } + fn state(&mut self, s: &Storage) { + writeln!( + self.out, + "state {} {} {} {} {}", + self.data, self.client, self.tag, s.dirty, self.calls + ) + .unwrap(); + let entries = s + .entries + .entries() + .map(|(k, e)| { + format!( + "{}={}", + k.id, + self.pool.iter().position(|v| v.same_reference(e)).unwrap() + ) + }) + .collect::<Vec<_>>() + .join(","); + writeln!(self.out, "effects {entries}").unwrap(); + for (i, e) in self.pool.iter().enumerate() { + let e = e.read(); + writeln!( + self.out, + "instance {i} {} {}", + e.details.visible, e.details.ambient + ) + .unwrap(); + } + let mut ids = [self.flags, self.particles, self.ambient]; + ids.sort_unstable(); + for i in 0..2 { + writeln!(self.out, "data {i} {}", self.tables[i].is_dirty()).unwrap(); + for id in ids { + let value = self.tables[i].get(id).unwrap(); + let value = self.value(&value); + writeln!( + self.out, + "field {id} {value} {} {}", + self.tables[i].item_dirty(id).unwrap(), + self.tables[i].is_default(id).unwrap() + ) + .unwrap(); + } + } + } +} +struct Callback<'a, 'b> { + world: &'a mut World<'b>, + storage: &'a mut Storage, + data: usize, +} +impl Observer<EffectValue> for Callback<'_, '_> { + type Error = &'static str; + fn updated(&mut self, data: &mut Data, id: u8) -> Result<()> { + self.world.tables[self.data] = data.clone(); + let result = self.world.event(self.storage, format!("updated {id}")); + *data = self.world.tables[self.data].clone(); + result + } +} +impl EffectSyncWorld<Key> for World<'_> { + type Error = &'static str; + type Data = usize; + type Level = (); + fn data(&self) -> usize { + self.data + } + fn store_particles( + &mut self, + s: &mut Storage, + data: usize, + particles: Arc<[Particle]>, + ) -> Result<()> { + self.store(s, data, self.particles, EffectValue::Particles(particles)) + } + fn store_ambient(&mut self, s: &mut Storage, data: usize, ambient: bool) -> Result<()> { + self.store(s, data, self.ambient, EffectValue::Ambient(ambient)) + } + fn particle(&self, key: &Key, ambient: bool) -> Result<Particle> { + Ok(self.catalog.create(&key.name, ambient).unwrap()) + } + fn has_effect(&mut self, s: &mut Storage, kind: Presence) -> Result<bool> { + let name = match kind { + Presence::Invisibility => "minecraft:invisibility", + Presence::Glowing => "minecraft:glowing", + }; + self.event(s, format!("has {name}"))?; + Ok(s.has(self.keys.iter().find(|k| k.name == name).unwrap())) + } + fn level(&mut self, s: &mut Storage) -> Result<()> { + self.event(s, "level") + } + fn is_client(&mut self, s: &mut Storage, _: ()) -> Result<bool> { + self.event(s, "client")?; + Ok(self.client) + } + fn glowing_tag(&self) -> bool { + self.tag + } + fn write_glowing_tag(&mut self, tag: bool) { + self.tag = tag; + } + fn read_flags(&self, data: usize) -> Result<u8> { + match self.tables[data].get(self.flags).unwrap() { + EffectValue::Flags(v) => Ok(v), + _ => panic!("flags type"), + } + } + fn write_flags(&mut self, s: &mut Storage, data: usize, flags: u8) -> Result<()> { + self.store(s, data, self.flags, EffectValue::Flags(flags)) + } + fn get_flag(&mut self, s: &mut Storage, bit: i32) -> Result<bool> { + self.event(s, format!("get-flag {bit}"))?; + sync::shared_flag(self, bit) + } + fn set_flag(&mut self, s: &mut Storage, bit: i32, value: bool) -> Result<()> { + self.event(s, format!("set-flag {bit} {value}"))?; + sync::set_shared_flag(s, self, bit, value) + } + fn set_invisible(&mut self, s: &mut Storage, value: bool) -> Result<()> { + self.event(s, format!("invisible {value}"))?; + self.set_flag(s, 5, value) + } + fn currently_glowing(&mut self, s: &mut Storage) -> Result<bool> { + self.event(s, "glowing")?; + sync::currently_glowing(s, self) + } + fn remove_particles(&mut self, s: &mut Storage) -> Result<()> { + self.event(s, "remove-particles")?; + sync::remove_particles(s, self) + } + fn update_invisibility(&mut self, s: &mut Storage) -> Result<()> { + self.event(s, "invisibility")?; + sync::update_invisibility(s, self) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let args: Vec<_> = std::env::args().collect(); + let dir = Path::new(&args[1]); + let metadata: Value = serde_json::from_str(&fs::read_to_string(dir.join("catalog.json"))?)?; + let catalog = Catalog::from_json(&metadata)?; + let flags = metadata["schema"]["flags"].as_u64().unwrap() as u8; + let ambient = metadata["schema"]["ambient"].as_u64().unwrap() as u8; + let particles = metadata["schema"]["particles"].as_u64().unwrap() as u8; + let mut out = io::BufWriter::new(fs::File::create(dir.join(format!("rust-{}.txt", args[2])))?); + for line in fs::read_to_string(dir.join(format!("inputs-{}.txt", args[2])))?.lines() { + let f: Value = serde_json::from_str(line)?; + let keys: Vec<_> = metadata["effects"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(id, d)| Key { + id, + hash: f["hashes"][id].as_i64().unwrap() as i32, + identity: f["identities"][id].as_i64().unwrap() as i32, + name: d["id"].as_str().unwrap().into(), + }) + .collect(); + let pool = f["pool"] + .as_array() + .unwrap() + .iter() + .map(|e| { + EffectInstance::new( + keys[e["effect"].as_u64().unwrap() as usize].clone(), + Details { + duration: 200, + amplifier: e["amplifier"].as_i64().unwrap() as i32, + ambient: e["ambient"].as_bool().unwrap(), + visible: e["visible"].as_bool().unwrap(), + show_icon: true, + }, + None, + ) + }) + .collect(); + let tables = std::array::from_fn(|i| { + Data::new(&[ + DataValue { + id: flags, + value: EffectValue::Flags(f["flags"][i].as_u64().unwrap() as u8), + }, + DataValue { + id: ambient, + value: EffectValue::Ambient(f["ambient"][i].as_bool().unwrap()), + }, + DataValue { + id: particles, + value: EffectValue::Particles(Arc::from([])), + }, + ]) + .unwrap() + }); + let mut w = World { + keys, + catalog: &catalog, + tables, + flags, + particles, + ambient, + data: 0, + client: false, + tag: false, + calls: 0, + op: Value::Null, + pool, + particle_pool: vec![], + out: &mut out, + }; + let mut storage = Storage::default(); + w.controls(&mut storage, &f["controls"]); + for op in f["setup"].as_array().unwrap() { + w.raw(&mut storage, op).unwrap(); + } + for op in f["ops"].as_array().unwrap() { + w.op = op.clone(); + w.calls = 0; + let result = match op["mode"].as_str().unwrap() { + "dirty-update" => sync::update_dirty(&mut storage, &mut w).map(|()| "ok".into()), + "invisibility" => w.update_invisibility(&mut storage).map(|()| "ok".into()), + "particles" => { + sync::synchronize_particles(&mut storage, &mut w).map(|()| "ok".into()) + } + "glowing-update" => { + sync::update_glowing(&mut storage, &mut w).map(|()| "ok".into()) + } + "remove-particles" => w.remove_particles(&mut storage).map(|()| "ok".into()), + "glowing" => w.currently_glowing(&mut storage).map(|v| v.to_string()), + "glow-tag" => { + sync::set_glowing_tag(&mut storage, &mut w, op["flag"].as_bool().unwrap()) + .map(|()| "ok".into()) + } + "invisible" => w + .set_invisible(&mut storage, op["flag"].as_bool().unwrap()) + .map(|()| "ok".into()), + "get-flag" => w + .get_flag(&mut storage, op["bit"].as_i64().unwrap() as i32) + .map(|v| v.to_string()), + "set-flag" => w + .set_flag( + &mut storage, + op["bit"].as_i64().unwrap() as i32, + op["flag"].as_bool().unwrap(), + ) + .map(|()| "ok".into()), + "all-ambient" => Ok(sync::all_ambient(&storage).to_string()), + _ => w.raw(&mut storage, op).map(|()| "ok".into()), + }; + writeln!( + w.out, + "result {}", + result.unwrap_or_else(|e| format!("error {e}")) + )?; + w.state(&storage); + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/entity_attribute_fixture.rs b/crates/horizon-world/examples/entity_attribute_fixture.rs new file mode 100644 index 000000000..eb1bc8358 --- /dev/null +++ b/crates/horizon-world/examples/entity_attribute_fixture.rs @@ -0,0 +1,131 @@ +use horizon_world::attributes::{ + AttributeError, Modifier, Operation, + entity::{Catalog, LookupError}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, + sync::Arc, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + f64::NAN.to_bits() + } else { + v.to_bits() + } +} +fn lookup(out: &mut dyn Write, label: &str, result: Result<f64, LookupError>) -> io::Result<()> { + match result { + Ok(v) => { + writeln!(out, "{label} {:016x}", bits(v))?; + writeln!(out, "ok") + } + Err(e) => writeln!( + out, + "error {}", + match e { + LookupError::MissingAttribute => "attribute", + LookupError::MissingModifier => "modifier", + LookupError::InstanceMissingModifier => "instance_modifier", + } + ), + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let catalog = Arc::new(Catalog::from_json(&serde_json::from_str( + &fs::read_to_string(dir.join("catalog.json"))?, + )?)?); + let ids: Vec<_> = catalog.attributes().map(|(id, _)| id).collect(); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut map = catalog.create(f["entity"].as_str().unwrap()).unwrap(); + for op in f["ops"].as_array().unwrap() { + let id = ids[op["attribute"].as_u64().unwrap() as usize]; + let mode = op["mode"].as_str().unwrap(); + let modifier = Modifier::new( + op["id"].as_str().unwrap(), + number(&op["amount"]), + Operation::ALL[op["operation"].as_u64().unwrap() as usize], + )?; + match mode { + "value" => lookup(&mut out, "value", map.value(id))?, + "base" => lookup(&mut out, "base", map.base_value(id))?, + "modifier" => lookup(&mut out, "modifier", map.modifier_value(id, modifier.id()))?, + "has" => { + writeln!(out, "has {}\nok", map.has(id))?; + } + "has_modifier" => { + writeln!( + out, + "has_modifier {}\nok", + map.has_modifier(id, modifier.id()) + )?; + } + "ensure" => { + writeln!(out, "ensure {}\nok", map.ensure(id))?; + } + "reset" => { + writeln!(out, "reset {}\nok", map.reset_base(id))?; + } + "ack_update" => { + map.clear_update(id); + writeln!(out, "ok")?; + } + "ack_sync" => { + map.clear_sync(id); + writeln!(out, "ok")?; + } + _ => { + let mut removed = None; + let result = map.edit(id, |a, o| match mode { + "set" => a.set_base_value(number(&op["base"]), o), + "add" => a.add_transient(modifier.clone(), o), + "update" => a.add_or_update_transient(modifier.clone(), o), + "permanent" => a.add_permanent(modifier.clone(), o), + "remove" => a.remove(modifier.id(), o).map(|v| { + removed = Some(v); + }), + "clear" => a.remove_all(o), + _ => panic!("mode"), + }); + if let Some(v) = removed { + writeln!(out, "removed {v}")?; + } + match result { + None => writeln!(out, "absent\nok")?, + Some(Ok(())) => writeln!(out, "ok")?, + Some(Err(AttributeError::DuplicateModifier(_))) => { + writeln!(out, "error duplicate")? + } + Some(Err(AttributeError::Observer(e))) => match e {}, + } + } + } + for (i, id) in ids.iter().copied().enumerate() { + if let Some(a) = map.instance(id) { + writeln!( + out, + "state {i} {:016x} {} {:016x} {} {} {} {}", + bits(a.base_value()), + a.is_dirty(), + bits(a.cached_value()), + map.needs_update(id), + map.needs_sync(id), + a.modifiers().len(), + a.permanent_modifiers().len() + )?; + } + } + writeln!(out, "end")?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/entity_collision_fixture.rs b/crates/horizon-world/examples/entity_collision_fixture.rs new file mode 100644 index 000000000..edf258069 --- /dev/null +++ b/crates/horizon-world/examples/entity_collision_fixture.rs @@ -0,0 +1,191 @@ +use horizon_core::geometry::{Aabb, Axis, Vec3, VoxelShape}; +use horizon_world::{ + entity_collision::{CollisionCandidate, EntityCollisionWorld, entity_collision_shapes}, + entity_obstruction::EntityIdentity, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn values( + out: &mut impl Write, + label: &str, + values: impl IntoIterator<Item = f64>, +) -> io::Result<()> { + write!(out, "{label}")?; + for v in values { + let bits = if v.is_nan() { + 0x7ff8_0000_0000_0000 + } else { + v.to_bits() + }; + write!(out, " {bits:016x}")?; + } + writeln!(out) +} +fn box_values(out: &mut impl Write, label: &str, b: Aabb) -> io::Result<()> { + values( + out, + label, + [ + b.min(Axis::X), + b.min(Axis::Y), + b.min(Axis::Z), + b.max(Axis::X), + b.max(Axis::Y), + b.max(Axis::Z), + ], + ) +} +fn emit(out: &mut impl Write, shape: &VoxelShape) -> io::Result<()> { + writeln!( + out, + "shape {} {} {}", + shape.is_empty(), + shape.boxes().len(), + shape.is_cube() + )?; + for (axis, name) in Axis::ALL.into_iter().zip(["x", "y", "z"]) { + values(out, name, shape.coordinates(axis).iter().copied())?; + } + let axes = shape.cube_coordinate_axes(); + writeln!( + out, + "axes {}", + u8::from(axes[0]) + 2 * u8::from(axes[1]) + 4 * u8::from(axes[2]) + )?; + values( + out, + "extrema", + Axis::ALL + .map(|a| shape.min(a)) + .into_iter() + .chain(Axis::ALL.map(|a| shape.max(a))), + )?; + match shape.bounds() { + Some(b) => box_values(out, "bounds", b)?, + None => writeln!(out, "bounds none")?, + } + for b in shape.boxes() { + box_values(out, "box", *b)?; + } + Ok(()) +} +fn bounds(v: &Value) -> Aabb { + Aabb::new( + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])), + Vec3::new(number(&v[3]), number(&v[4]), number(&v[5])), + ) +} +struct Entity { + candidate: CollisionCandidate, + root: EntityIdentity, + collidable: bool, + policy: u64, +} +struct World<'a, W> { + out: &'a mut W, + entities: Vec<Entity>, + calls: i32, + fail: i32, +} +impl<W: Write> World<'_, W> { + fn query(&mut self, line: String) -> io::Result<()> { + writeln!(self.out, "{line}")?; + let call = self.calls; + self.calls += 1; + if call == self.fail { + Err(io::Error::other("injected entity collision query failure")) + } else { + Ok(()) + } + } +} +impl<W: Write> EntityCollisionWorld for World<'_, W> { + type Error = io::Error; + fn collision_candidates( + &mut self, + source: Option<EntityIdentity>, + b: Aabb, + ) -> io::Result<Vec<CollisionCandidate>> { + let id = source.map_or(-1, |e| e.0 as i64); + let mut output = Vec::new(); + box_values(&mut output, &format!("query {id}"), b)?; + let line = String::from_utf8(output).unwrap(); + self.query(line.trim_end().to_owned())?; + Ok(self.entities.iter().map(|e| e.candidate).collect()) + } + fn can_collide( + &mut self, + source: Option<EntityIdentity>, + candidate: EntityIdentity, + ) -> io::Result<bool> { + if let Some(source) = source { + self.query(format!("collide {} {}", source.0, candidate.0))?; + let policy = self.entities[source.0 as usize - 1].policy; + if policy != 0 { + return Ok(policy == 1); + } + } + self.query(format!( + "collidable {} {}", + candidate.0, + source.map_or(-1, |e| e.0 as i64) + ))?; + let entity = &self.entities[candidate.0 as usize - 1]; + Ok(entity.collidable + && source.is_none_or(|id| self.entities[id.0 as usize - 1].root != entity.root)) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut entities: Vec<Entity> = Vec::new(); + for v in f["entities"].as_array().unwrap() { + let id = EntityIdentity(entities.len() as u64 + 1); + let parent = v["parent"].as_i64().unwrap(); + let root = if parent < 0 { + id + } else { + entities[parent as usize].root + }; + entities.push(Entity { + candidate: CollisionCandidate { + identity: id, + bounds: bounds(&v["box"]), + spectator: v["spectator"].as_bool().unwrap(), + }, + root, + collidable: v["collidable"].as_bool().unwrap(), + policy: v["policy"].as_u64().unwrap(), + }); + } + let mut world = World { + out: &mut out, + entities, + calls: 0, + fail: f["fail"].as_i64().unwrap() as i32, + }; + let source = f["source"].as_i64().unwrap(); + let source = (source >= 0).then_some(EntityIdentity(source.wrapping_add(1) as u64)); + match entity_collision_shapes(&mut world, source, bounds(&f["box"])) { + Ok(shapes) => { + writeln!(world.out, "selected {}", shapes.len())?; + for shape in shapes { + emit(world.out, &shape)?; + } + } + Err(_) => writeln!(world.out, "error")?, + } + writeln!(world.out, "queries {}", world.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/entity_fluid_fixture.rs b/crates/horizon-world/examples/entity_fluid_fixture.rs new file mode 100644 index 000000000..1178c63bf --- /dev/null +++ b/crates/horizon-world/examples/entity_fluid_fixture.rs @@ -0,0 +1,485 @@ +use horizon_core::{ + geometry::{Aabb, Vec3}, + position::BlockPos, +}; +use horizon_world::{ + block_support::BlockSupportRegistry, + dynamic_support::DynamicSupportWorld, + entity_fluid::*, + entity_fluid_tick::{self, EntityFluidTickWorld}, + fluid::{FluidKind, FluidState}, + nbt::{self, Limits}, + registry::{BlockRegistry, BlockStateId}, + registry_fluid::{FluidBlockWorld, FluidEntityWorld, FluidRegistry, RegistryFluidWorld}, +}; +use serde_json::Value; +use std::{ + collections::BTreeSet, + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vector(v: &Value) -> Vec3 { + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + f64::NAN.to_bits() + } else { + v.to_bits() + } +} +fn show(v: Vec3) -> String { + format!("{:016x} {:016x} {:016x}", bits(v.x), bits(v.y), bits(v.z)) +} +fn pos(p: BlockPos) -> String { + format!("{} {} {}", p.x, p.y, p.z) +} +fn position(v: &Value) -> BlockPos { + BlockPos::new( + v[0].as_i64().unwrap() as i32, + v[1].as_i64().unwrap() as i32, + v[2].as_i64().unwrap() as i32, + ) +} +#[derive(Clone, Copy, Default)] +struct Tick { + touch: bool, + first: bool, + fall: f64, +} +struct World<'a> { + op: &'a Value, + out: &'a mut dyn Write, + calls: i64, + velocity: Vec3, + block: BlockPos, + wet: Vec<bool>, + states: [FluidState; 5], + player: bool, + tick: Tick, + pushed: usize, +} +impl World<'_> { + fn query(&mut self, s: String) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.op["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected query failure")); + } + if n == self.op["mutate_at"].as_i64().unwrap() { + self.velocity = vector(&self.op["after_velocity"]); + self.block = position(&self.op["after_block"]); + if self.op.get("after_touch").is_some() { + self.tick.touch = self.op["after_touch"].as_bool().unwrap(); + self.tick.first = self.op["after_first"].as_bool().unwrap(); + self.tick.fall = number(&self.op["after_fall"]); + } + } + Ok(()) + } + fn cell(&self, p: BlockPos) -> &Value { + self.op["cells"].get(pos(p)).unwrap_or(&self.op["default"]) + } +} +impl FluidMembership for World<'_> { + fn fluid_in_tag(&self, fluid: FluidKind, tag: FluidTagId) -> bool { + self.op["tags"][tag.0 as usize].as_u64().unwrap() & (1 << (fluid as u8)) != 0 + } +} +impl FluidInteractionWorld for World<'_> { + type Error = io::Error; + type Chunk = (); + fn interaction_box(&mut self) -> io::Result<Option<Aabb>> { + self.query("box".into())?; + let b = &self.op["bounds"]; + Ok(if b.is_null() { + None + } else { + Some(Aabb::new( + Vec3::new(number(&b[0]), number(&b[1]), number(&b[2])), + Vec3::new(number(&b[3]), number(&b[4]), number(&b[5])), + )) + }) + } + fn loaded_chunk(&mut self, x: i32, z: i32) -> io::Result<Option<()>> { + self.query(format!("chunk {x} {z}"))?; + Ok((!self.op["missing"] + .as_array() + .unwrap() + .contains(&Value::String(format!("{x} {z}")))) + .then_some(())) + } + fn chunk_sections(&mut self, _: ()) -> io::Result<FluidSections<'_>> { + self.query("sections".into())?; + Ok(FluidSections { + minimum_section_y: self.op["min_section"].as_i64().unwrap() as i32, + has_fluid: &self.wet, + }) + } + fn bounding_box_min_y(&self) -> f64 { + number(&self.op["base_y"]) + } + fn block_x(&self) -> i32 { + self.block.x + } + fn block_z(&self) -> i32 { + self.block.z + } + fn eye_y(&mut self) -> io::Result<f64> { + self.query("eye".into())?; + Ok(number(&self.op["eye"])) + } + fn fluid_state(&mut self, p: BlockPos) -> io::Result<FluidState> { + self.query(format!("fluid {}", pos(p)))?; + Ok(self.states[self.cell(p)["kind"].as_u64().unwrap() as usize]) + } + fn fluid_height(&mut self, _: FluidState, p: BlockPos) -> io::Result<f32> { + self.query(format!("height {}", pos(p)))?; + Ok(single(&self.cell(p)["height"])) + } + fn camera_height(&mut self, s: FluidState, p: BlockPos) -> io::Result<f32> { + if matches!(s.kind(), FluidKind::Water | FluidKind::Lava) { + self.query(format!( + "block {}", + pos(BlockPos::new(p.x, p.y.wrapping_add(1), p.z)) + ))?; + if self.op["sturdy"].as_bool().unwrap() { + return Ok(1.0); + } + } + self.fluid_height(s, p) + } + fn flow(&mut self, _: FluidState, p: BlockPos) -> io::Result<Vec3> { + self.query(format!("flow {}", pos(p)))?; + Ok(vector(&self.cell(p)["flow"])) + } +} +impl DynamicSupportWorld for World<'_> { + type Error = io::Error; + fn shulker_is_closed(&mut self, p: [i32; 3]) -> io::Result<Option<bool>> { + self.query(format!("entity {} {} {}", p[0], p[1], p[2]))?; + Ok(None) + } + fn moving_piston_shape( + &mut self, + p: [i32; 3], + ) -> io::Result<Option<horizon_core::geometry::VoxelShape>> { + self.query(format!("entity {} {} {}", p[0], p[1], p[2]))?; + Ok(None) + } +} +impl FluidBlockWorld for World<'_> { + fn block_state(&mut self, p: BlockPos) -> io::Result<BlockStateId> { + self.query(format!("block {}", pos(p)))?; + Ok(BlockStateId(self.cell(p)["state"].as_u64().unwrap() as u32)) + } + fn fluid_block_state(&mut self, p: BlockPos) -> io::Result<BlockStateId> { + self.query(format!("fluid {}", pos(p)))?; + Ok(BlockStateId(self.cell(p)["state"].as_u64().unwrap() as u32)) + } +} +impl FluidEntityWorld for World<'_> { + type Chunk = (); + fn interaction_box(&mut self) -> io::Result<Option<Aabb>> { + FluidInteractionWorld::interaction_box(self) + } + fn loaded_chunk(&mut self, x: i32, z: i32) -> io::Result<Option<()>> { + FluidInteractionWorld::loaded_chunk(self, x, z) + } + fn chunk_sections(&mut self, c: ()) -> io::Result<FluidSections<'_>> { + FluidInteractionWorld::chunk_sections(self, c) + } + fn bounding_box_min_y(&self) -> f64 { + FluidInteractionWorld::bounding_box_min_y(self) + } + fn block_x(&self) -> i32 { + FluidInteractionWorld::block_x(self) + } + fn eye_y(&mut self) -> io::Result<f64> { + FluidInteractionWorld::eye_y(self) + } + fn block_z(&self) -> i32 { + FluidInteractionWorld::block_z(self) + } +} +impl CurrentTarget for World<'_> { + type Error = io::Error; + fn is_player_class(&self) -> bool { + self.player + } + fn velocity(&mut self) -> io::Result<Vec3> { + self.query("velocity".into())?; + Ok(self.velocity) + } + fn add_delta_movement(&mut self, v: Vec3) -> io::Result<()> { + if [v.x, v.y, v.z].iter().all(|v| v.is_finite()) { + let old = CurrentTarget::velocity(self)?; + let next = Vec3::new(old.x + v.x, old.y + v.y, old.z + v.z); + self.query(format!("set {}", show(next)))?; + self.velocity = next; + } + Ok(()) + } +} +impl EntityFluidTickWorld for World<'_> { + fn is_pushed_by_fluid(&mut self) -> io::Result<bool> { + self.query("pushed".into())?; + let values = self.op["pushed"].as_array().unwrap(); + let result = values[self.pushed.min(values.len() - 1)].as_bool().unwrap(); + self.pushed += 1; + Ok(result) + } + fn reset_fall_distance(&mut self) -> io::Result<()> { + self.query("reset-fall".into())?; + self.tick.fall = 0.0; + Ok(()) + } + fn was_touching_water(&self) -> bool { + self.tick.touch + } + fn first_tick(&self) -> bool { + self.tick.first + } + fn water_splash(&mut self) -> io::Result<()> { + self.query("splash".into()) + } + fn set_was_touching_water(&mut self, value: bool) { + self.tick.touch = value; + } + fn fast_lava(&mut self) -> io::Result<bool> { + self.query("fast-lava".into())?; + Ok(self.op["fast_lava"].as_bool().unwrap()) + } +} +fn limit_checks(template: &Value, states: [FluidState; 5]) { + let mut op = template.clone(); + op["cells"] = serde_json::json!({}); + op["default"]["kind"] = 2.into(); + op["default"]["height"] = format!("{:08x}", 0.8f32.to_bits()).into(); + op["eye"] = format!("{:016x}", 0.5f64.to_bits()).into(); + let mut sink = io::sink(); + let mut world = World { + op: &op, + out: &mut sink, + calls: 0, + velocity: Vec3::ZERO, + block: BlockPos::new(0, 0, 0), + wet: vec![false, true, false], + states, + player: false, + tick: Tick::default(), + pushed: 0, + }; + let mut interaction = EntityFluidInteraction::new([FluidTagId(0)]); + assert!(matches!( + interaction.update(&mut world, false, 0), + Err(FluidInteractionError::BudgetExceeded) + )); + assert_eq!(world.calls, 1); + world.calls = 0; + assert!(matches!( + interaction.update(&mut world, false, 1), + Err(FluidInteractionError::BudgetExceeded) + )); + assert_eq!(world.calls, 3); + world.calls = 0; + assert!(matches!( + interaction.update(&mut world, false, 8), + Err(FluidInteractionError::BudgetExceeded) + )); + assert_eq!(world.calls, 10); + assert!(interaction.trackers().is_empty()); + assert!(interaction.update(&mut world, false, 9).unwrap()); + assert_eq!(interaction.trackers().len(), 1); + assert_eq!(interaction.currents()[0].1.count, 1); + let mut invalid = op.clone(); + invalid["bounds"][0] = format!("{:016x}", f64::NAN.to_bits()).into(); + world.op = &invalid; + world.calls = 0; + assert!(matches!( + interaction.update(&mut world, false, 9), + Err(FluidInteractionError::NonFiniteBounds) + )); + assert_eq!(world.calls, 1); + assert_eq!(interaction.trackers().len(), 1); + assert_eq!(interaction.trackers()[0].height, 0.0); + assert!(!interaction.trackers()[0].eyes_inside); + assert_eq!(interaction.currents()[0].1.count, 0); + let mut absent = op.clone(); + absent["bounds"] = Value::Null; + world.op = &absent; + assert!(!interaction.update(&mut world, false, 0).unwrap()); + assert!(interaction.trackers().is_empty()); +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + let load = |n: &str| -> Result<_, Box<dyn std::error::Error>> { + Ok(nbt::read_named(&fs::read(dir.join(n))?, Limits::default())? + .0 + .tag) + }; + let registry = if dir.join("block-registry.nbt").exists() { + Some(BlockRegistry::from_nbt(&load("block-registry.nbt")?)?) + } else { + None + }; + let support = registry + .as_ref() + .map(|r| { + Ok::<_, Box<dyn std::error::Error>>(BlockSupportRegistry::from_nbt( + &load("cached-support.nbt")?, + r, + )?) + }) + .transpose()?; + let bindings = registry + .as_ref() + .map(|r| -> Result<_, Box<dyn std::error::Error>> { + let info: Value = serde_json::from_slice(&fs::read(dir.join("fluid-info.json"))?)?; + let names = |v: &Value| -> BTreeSet<String> { + v.as_array() + .unwrap() + .iter() + .map(|v| v.as_str().unwrap().to_owned()) + .collect() + }; + let ice = names(&info["ice"]); + let all = (0..r.len()) + .map(|i| r.state(BlockStateId(i as u32)).unwrap().name.clone()) + .collect(); + Ok([ + FluidRegistry::new(r, &names(&info["blocks_flow"]), &ice)?, + FluidRegistry::new(r, &BTreeSet::new(), &ice)?, + FluidRegistry::new(r, &all, &ice)?, + ]) + }) + .transpose()?; + let states = FluidKind::ALL + .map(|k| FluidState::from_json(&format!("{{\"id\":\"{}\"}}", k.name())).unwrap()); + let input = fs::read_to_string(dir.join("inputs.txt"))?; + let first: Value = serde_json::from_str(input.lines().next().unwrap())?; + limit_checks(&first["ops"][0], states); + for line in input.lines() { + let f: Value = serde_json::from_str(line)?; + let mut interaction = EntityFluidInteraction::new( + f["order"] + .as_array() + .unwrap() + .iter() + .map(|v| FluidTagId(v.as_u64().unwrap() as u32)), + ); + let initial = f.get("tick_initial"); + let mut tick = initial.map_or(Tick::default(), |v| Tick { + touch: v["touch"].as_bool().unwrap(), + first: v["first"].as_bool().unwrap(), + fall: number(&v["fall"]), + }); + for op in f["ops"].as_array().unwrap() { + let mut w = World { + op, + out: &mut out, + calls: 0, + velocity: vector(&op["velocity"]), + block: position(&op["block"]), + wet: op["wet"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_bool().unwrap()) + .collect(), + states, + player: f["player"].as_bool().unwrap(), + tick, + pushed: 0, + }; + if op["mode"].as_str().unwrap() == "tick" { + match entity_fluid_tick::update( + &mut interaction, + &mut w, + FluidTagId(0), + FluidTagId(1), + 1_000_000, + ) { + Ok(v) => writeln!(w.out, "result {v}")?, + Err(_) => writeln!(w.out, "error")?, + } + } else if op["mode"].as_str().unwrap() == "registered" { + let binding = + &bindings.as_ref().unwrap()[op["block_tag"].as_u64().unwrap() as usize]; + let result = interaction.update( + &mut RegistryFluidWorld::new(binding, support.as_ref().unwrap(), &mut w)?, + op["ignore"].as_bool().unwrap(), + 1_000_000, + ); + match result { + Ok(v) => writeln!(w.out, "result {v}")?, + Err(_) => writeln!(w.out, "error")?, + } + } else if op["mode"].as_str().unwrap() == "update" { + match interaction.update(&mut w, op["ignore"].as_bool().unwrap(), 1_000_000) { + Ok(v) => writeln!(w.out, "result {v}")?, + Err(_) => writeln!(w.out, "error")?, + } + } else { + match interaction.apply_current( + &mut w, + FluidTagId(op["tag"].as_u64().unwrap() as u32), + number(&op["speed"]), + ) { + Ok(()) => writeln!(w.out, "result ok")?, + Err(_) => writeln!(w.out, "error")?, + } + } + writeln!(w.out, "trackers {}", interaction.trackers().len())?; + for t in interaction.trackers() { + writeln!( + w.out, + "tracker {} {:016x} {}", + t.fluid as u8, + bits(t.height), + t.eyes_inside + )?; + } + for (tag, c) in interaction.currents() { + writeln!( + w.out, + "current {} {:016x} {} {}", + tag.0, + bits(c.height), + show(c.accumulated), + c.count + )?; + } + for t in 0..4 { + let tag = FluidTagId(t); + let height = interaction.fluid_height(&w, tag); + let inside = interaction.is_in_fluid(&w, tag); + let eyes = interaction.is_eye_in_fluid(&w, tag); + writeln!(w.out, "tag {t} {:016x} {inside} {eyes}", bits(height))?; + } + writeln!(w.out, "final {}", show(w.velocity))?; + writeln!(w.out, "queries {}", w.calls)?; + tick = w.tick; + if initial.is_some() { + writeln!( + w.out, + "tick {} {} {:016x}", + tick.touch, + tick.first, + bits(tick.fall) + )?; + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/entity_move_fixture.rs b/crates/horizon-world/examples/entity_move_fixture.rs new file mode 100644 index 000000000..fbcbb8ed1 --- /dev/null +++ b/crates/horizon-world/examples/entity_move_fixture.rs @@ -0,0 +1,418 @@ +use horizon_core::{ + geometry::{Aabb, Axis, Vec3, VoxelShape, resolve_shape_movement}, + position::BlockPos, +}; +use horizon_world::{ + entity_move::*, + movement_emission::MovementEmission, + movement_restitution::{RestitutionInput, RestitutionWorld, restitute_movement}, + registry::BlockStateId, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vector(v: &Value) -> Vec3 { + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn vec(label: &str, v: Vec3) -> String { + format!( + "{label} {:016x} {:016x} {:016x}", + bits(v.x), + bits(v.y), + bits(v.z) + ) +} +fn bounds(label: &str, b: Aabb) -> String { + format!( + "{label} {:016x} {:016x} {:016x} {:016x} {:016x} {:016x}", + bits(b.min(Axis::X)), + bits(b.min(Axis::Y)), + bits(b.min(Axis::Z)), + bits(b.max(Axis::X)), + bits(b.max(Axis::Y)), + bits(b.max(Axis::Z)) + ) +} +fn pos(p: BlockPos) -> String { + format!("{} {} {}", p.x, p.y, p.z) +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + position: Vec3, + velocity: Vec3, + stuck: Vec3, + bounds: Aabb, + flags: CollisionFlags, + grounded: bool, + removed: bool, + fall: f64, + history: MovementHistory, + shapes: Vec<VoxelShape>, +} +impl World<'_> { + fn flag(&self, n: &str) -> bool { + self.f[n].as_bool().unwrap() + } + fn query(&mut self, s: String) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let call = self.calls; + self.calls += 1; + if call == self.f["fail"].as_i64().unwrap() { + Err(io::Error::other("injected move failure")) + } else { + Ok(()) + } + } +} +impl EntityMoveWorld for World<'_> { + type Error = io::Error; + fn no_physics(&self) -> bool { + self.flag("no_physics") + } + fn position(&self) -> Vec3 { + self.position + } + fn set_position(&mut self, p: Vec3) -> io::Result<()> { + self.query(vec("set-position", p))?; + self.bounds = self.bounds.move_by(p.subtract(self.position)); + self.position = p; + Ok(()) + } + fn record_movement(&mut self, t: MoverType, v: Vec3) -> io::Result<()> { + self.query(vec(&format!("record {}", t as u32), v)) + } + fn collision_flags(&self) -> CollisionFlags { + self.flags + } + fn set_collision_flags(&mut self, f: CollisionFlags) { + self.flags = f; + } + fn limit_piston_movement(&mut self, v: Vec3) -> io::Result<Vec3> { + self.query(vec("piston", v))?; + Ok(vector(&self.f["piston_result"])) + } + fn stuck_multiplier(&self) -> Vec3 { + self.stuck + } + fn set_stuck_multiplier(&mut self, v: Vec3) { + self.stuck = v; + } + fn velocity(&mut self) -> io::Result<Vec3> { + self.query("velocity".into())?; + Ok(self.velocity) + } + fn set_velocity(&mut self, v: Vec3) -> io::Result<()> { + self.query(vec("set-velocity", v))?; + self.velocity = v; + Ok(()) + } + fn back_off_edge(&mut self, v: Vec3, t: MoverType) -> io::Result<Vec3> { + self.query(vec(&format!("edge {}", t as u32), v))?; + Ok(if self.flag("edge_override") { + vector(&self.f["edge_result"]) + } else { + v + }) + } + fn collide(&mut self, v: Vec3) -> io::Result<Vec3> { + let b = self.bounds.expand_towards(v); + self.query(bounds("entities", b))?; + if v.length_squared() == 0.0 { + return Ok(v); + } + self.query("border".into())?; + self.query(bounds("border-test", b))?; + self.query(bounds("blocks", b))?; + Ok(resolve_shape_movement( + v, + self.bounds, + &self.shapes.iter().collect::<Vec<_>>(), + )) + } + fn fall_distance(&self) -> f64 { + self.fall + } + fn fall_reset_clip(&mut self, from: Vec3, to: Vec3) -> io::Result<bool> { + self.query(vec("clip-from", from))?; + self.query(vec("clip-to", to))?; + Ok(self.flag("clip_hit")) + } + fn reset_fall_distance(&mut self) -> io::Result<()> { + self.query("reset-fall".into())?; + self.fall = 0.0; + Ok(()) + } + fn movement_history(&mut self) -> &mut MovementHistory { + &mut self.history + } + fn locally_authoritative(&mut self) -> io::Result<bool> { + let client = self.client_side()?; + self.query( + if client { + "local-client-authority" + } else { + "client-authority" + } + .into(), + )?; + Ok(if client { + self.flag("local_client") + } else { + !self.flag("client_authority") + }) + } + fn set_on_ground_with_movement( + &mut self, + below: bool, + horizontal: bool, + v: Vec3, + ) -> io::Result<()> { + self.query(vec(&format!("ground-set {below} {horizontal}"), v))?; + self.grounded = below; + self.flags.horizontal = horizontal; + Ok(()) + } + fn minor_horizontal_collision(&mut self, v: Vec3) -> io::Result<bool> { + self.query(vec("minor", v))?; + Ok(self.flag("minor_result")) + } + fn legacy_on_position(&mut self) -> io::Result<BlockPos> { + self.query("legacy".into())?; + Ok(BlockPos::new(17, -64, -33)) + } + fn block_state(&mut self, p: BlockPos) -> io::Result<BlockStateId> { + self.query(format!("block {}", pos(p)))?; + Ok(BlockStateId(0)) + } + fn on_ground(&mut self) -> io::Result<bool> { + self.query("ground".into())?; + Ok(self.grounded) + } + fn check_fall_damage( + &mut self, + dy: f64, + ground: bool, + _: BlockStateId, + p: BlockPos, + ) -> io::Result<()> { + self.query(format!("fall {:016x} {ground} {}", bits(dy), pos(p)))?; + if self.flag("fall_mutates") { + self.fall = 3.0; + self.velocity = Vec3::new(17.0, 18.0, 19.0); + self.flags.horizontal = self.flag("mutated_horizontal"); + self.flags.vertical = self.flag("mutated_vertical"); + self.flags.below = self.flag("mutated_below"); + } + if self.flag("fall_removes") { + self.removed = true; + } + Ok(()) + } + fn removed(&mut self) -> io::Result<bool> { + Ok(self.removed) + } + fn can_simulate(&mut self) -> io::Result<bool> { + self.query("simulation".into())?; + Ok(true) + } + fn restitute( + &mut self, + state: BlockStateId, + x: bool, + z: bool, + resolved: Vec3, + ) -> io::Result<()> { + let input = RestitutionInput { + block: state, + collided_x: x, + collided_z: z, + vertical_collision: self.flags.vertical, + collision_below: self.flags.below, + living: false, + resolved_movement: resolved, + fall_distance: self.fall, + }; + restitute_movement(&mut Bounce(self), input) + } + fn client_side(&mut self) -> io::Result<bool> { + self.query("client".into())?; + Ok(self.flag("client")) + } + fn movement_emission(&mut self) -> io::Result<MovementEmission> { + self.query("emission".into())?; + Ok(if self.flag("emits") { + MovementEmission::All + } else { + MovementEmission::None + }) + } + fn passenger(&mut self) -> io::Result<bool> { + self.query("passenger".into())?; + Ok(true) + } + fn apply_movement_emission( + &mut self, + _: MovementEmission, + _: Vec3, + _: BlockPos, + _: BlockStateId, + ) -> io::Result<()> { + panic!("passenger guard must skip emission in this fixture") + } + fn block_speed_factor(&mut self) -> io::Result<f32> { + self.query("speed".into())?; + Ok(single(&self.f["speed"])) + } +} +struct Bounce<'a, 'b>(&'a mut World<'b>); +impl RestitutionWorld for Bounce<'_, '_> { + type Error = io::Error; + fn suppressing_bounce(&mut self) -> io::Result<bool> { + self.0.query("suppress".into())?; + Ok(false) + } + fn entity_bounciness(&mut self) -> io::Result<f64> { + self.0.query("entity-bounce".into())?; + Ok(0.0) + } + fn velocity(&mut self) -> io::Result<Vec3> { + self.0.velocity() + } + fn effective_gravity(&mut self) -> io::Result<f64> { + self.0.query("gravity".into())?; + Ok(0.08) + } + fn block_suppresses_bounce(&mut self, _: BlockStateId) -> io::Result<bool> { + self.0.query("block-suppresses".into())?; + Ok(false) + } + fn block_bounce_restitution(&mut self, _: BlockStateId) -> io::Result<f32> { + self.0.query("block-bounce".into())?; + Ok(0.0) + } + fn air_drag(&mut self) -> io::Result<f32> { + panic!("no positive restitution") + } + fn movement_support_position(&mut self) -> io::Result<BlockPos> { + panic!("no bounce event") + } + fn bounce_on(&mut self, _: BlockStateId, _: BlockPos, _: f64) -> io::Result<()> { + panic!("no bounce event") + } + fn bounce_event(&mut self) -> io::Result<()> { + panic!("no bounce event") + } + fn mark_position_for_sync(&mut self) { + panic!("no bounce event") + } + fn set_velocity(&mut self, v: Vec3) -> io::Result<()> { + self.0.set_velocity(v) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let p = vector(&f["position"]); + let flag = |n: &str| f[n].as_bool().unwrap(); + let shapes = f["shapes"] + .as_array() + .unwrap() + .iter() + .map(|v| { + VoxelShape::from_box(Aabb::new( + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])), + Vec3::new(number(&v[3]), number(&v[4]), number(&v[5])), + )) + }) + .collect::<Result<Vec<_>, _>>()?; + let mut history = MovementHistory::default(); + for i in 0..f["history"].as_u64().unwrap() { + history.add(MovementRecord { + from: Vec3::new(i as f64, 0.0, 0.0), + to: Vec3::new((i + 1) as f64, 0.0, 0.0), + original: Some(Vec3::new(1.0, 0.0, 0.0)), + }); + } + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + position: p, + velocity: vector(&f["velocity"]), + stuck: vector(&f["stuck"]), + bounds: Aabb::new( + Vec3::new(p.x - 0.3, p.y, p.z - 0.3), + Vec3::new(p.x + 0.3, p.y + 1.8, p.z + 0.3), + ), + flags: CollisionFlags { + horizontal: flag("horizontal"), + vertical: flag("vertical"), + below: flag("below"), + minor: flag("minor"), + }, + grounded: flag("ground"), + removed: flag("removed"), + fall: number(&f["distance"]), + history, + shapes, + }; + let mover = [ + MoverType::SelfMovement, + MoverType::Player, + MoverType::Piston, + MoverType::ShulkerBox, + MoverType::Shulker, + ][f["mover"].as_u64().unwrap() as usize]; + let result = move_entity(&mut w, mover, vector(&f["movement"])); + writeln!(w.out, "{}", if result.is_ok() { "ok" } else { "error" })?; + writeln!(w.out, "{}", vec("position", w.position))?; + writeln!(w.out, "{}", vec("velocity-final", w.velocity))?; + writeln!(w.out, "{}", vec("stuck", w.stuck))?; + writeln!(w.out, "{}", bounds("bounds", w.bounds))?; + writeln!( + w.out, + "flags {} {} {} {} {} {} {:016x}", + w.flags.horizontal, + w.flags.vertical, + w.flags.below, + w.flags.minor, + w.grounded, + w.removed, + bits(w.fall) + )?; + writeln!(w.out, "history {}", w.history.records().len())?; + for r in w.history.records() { + writeln!(w.out, "{}", vec("from", r.from))?; + writeln!(w.out, "{}", vec("to", r.to))?; + writeln!( + w.out, + "{}", + r.original + .map_or_else(|| "original none".to_string(), |v| vec("original", v)) + )?; + } + writeln!(w.out, "queries {}", w.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/entity_obstruction_fixture.rs b/crates/horizon-world/examples/entity_obstruction_fixture.rs new file mode 100644 index 000000000..ef8f0acc8 --- /dev/null +++ b/crates/horizon-world/examples/entity_obstruction_fixture.rs @@ -0,0 +1,115 @@ +use horizon_core::geometry::{Aabb, Axis, ShapeOp, Vec3, VoxelShape}; +use horizon_world::entity_obstruction::{ + EntityIdentity, EntityObstructionWorld, ObstructionEntity, is_unobstructed, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +struct World<'a, W> { + entities: Vec<ObstructionEntity>, + out: &'a mut W, + fail: bool, + calls: usize, +} +impl<W: Write> EntityObstructionWorld for World<'_, W> { + type Error = io::Error; + fn obstruction_candidates( + &mut self, + excluded: Option<EntityIdentity>, + bounds: Aabb, + ) -> io::Result<Vec<ObstructionEntity>> { + let values = [ + bounds.min(Axis::X), + bounds.min(Axis::Y), + bounds.min(Axis::Z), + bounds.max(Axis::X), + bounds.max(Axis::Y), + bounds.max(Axis::Z), + ] + .map(f64::to_bits); + writeln!( + self.out, + "query {} {:016x} {:016x} {:016x} {:016x} {:016x} {:016x}", + excluded.map(|id| id.0 as i64).unwrap_or(-1), + values[0], + values[1], + values[2], + values[3], + values[4], + values[5] + )?; + self.calls += 1; + if self.fail { + return Err(io::Error::other("injected entity query failure")); + } + let selected = self + .entities + .iter() + .filter(|e| Some(e.identity) != excluded && e.bounds.intersects(bounds) && !e.spectator) + .copied() + .collect::<Vec<_>>(); + for entity in &selected { + writeln!(self.out, "picked {}", entity.identity.0)?; + } + Ok(selected) + } +} +fn bbox(v: &Value) -> Aabb { + let values = v + .as_array() + .unwrap() + .iter() + .map(|v| f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap())) + .collect::<Vec<_>>(); + Aabb::new( + Vec3::new(values[0], values[1], values[2]), + Vec3::new(values[3], values[4], values[5]), + ) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut entities = Vec::<ObstructionEntity>::new(); + for value in f["entities"].as_array().unwrap() { + let identity = EntityIdentity(entities.len() as u64 + 1); + let parent = value["parent"].as_i64().unwrap(); + let root_vehicle = if parent < 0 { + identity + } else { + entities[parent as usize].root_vehicle + }; + entities.push(ObstructionEntity { + identity, + root_vehicle, + bounds: bbox(&value["box"]), + spectator: value["spectator"].as_bool().unwrap(), + removed: value["removed"].as_bool().unwrap(), + blocks_building: value["building"].as_bool().unwrap(), + }); + } + let mut shape = VoxelShape::empty(); + for value in f["shape"].as_array().unwrap() { + shape = shape.join(&VoxelShape::from_box(bbox(value))?, ShapeOp::OR)?; + } + let excluded = f["exclude"].as_i64().unwrap(); + let excluded = (excluded >= 0).then(|| entities[excluded as usize]); + let mut world = World { + entities, + out: &mut out, + fail: f["fail"].as_bool().unwrap(), + calls: 0, + }; + match is_unobstructed(&mut world, excluded.as_ref(), &shape) { + Ok(value) => writeln!(world.out, "clear {value}")?, + Err(_) => writeln!(world.out, "clear error")?, + } + writeln!(world.out, "queries {}", world.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/extra_items_fixture.rs b/crates/horizon-world/examples/extra_items_fixture.rs new file mode 100644 index 000000000..0cbdd98d0 --- /dev/null +++ b/crates/horizon-world/examples/extra_items_fixture.rs @@ -0,0 +1,446 @@ +use horizon_world::{ + component_patch::{Patch, Prototype}, + identifier::Identifier, + item_after_use::{self, AfterUseWorld}, + item_cooldowns::{self, CooldownUser, ItemCooldowns, Observer, UseCooldown}, + item_stack_refs::{ItemStacks, StackRef}, + item_stack_storage::ItemStackData, + item_template::{ItemTemplate, ValidationRules}, +}; +use horizon_world::{ + extra_items::{self, ExtraItemHooks}, + inventory_pickup::{PickupError, PickupHooks}, + player_inventory::{EntityEquipment, InventoryRules, PlayerInventory}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone, Debug, PartialEq)] +enum Component { + Integer(i32), + Remainder(ItemTemplate<usize, u8, Component>), + Cooldown(UseCooldown<Identifier>), +} +type Stack = StackRef<usize, u8, Component>; +type StackData = ItemStackData<usize, u8, Component>; +type Template = ItemTemplate<usize, u8, Component>; +type Book = ItemCooldowns<Identifier>; +type Inventory = PlayerInventory<usize, u8, Component>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn integer(v: Option<&Component>) -> Option<i32> { + match v { + Some(Component::Integer(n)) => Some(*n), + _ => None, + } +} +fn bits(f: f32) -> u32 { + if f.is_nan() { 0x7fc00000 } else { f.to_bits() } +} +fn cooldown(v: &Value) -> Option<UseCooldown<Identifier>> { + v["cooldown"].as_u64().map(|b| UseCooldown { + seconds: f32::from_bits(b as u32), + group: usize::try_from(n(v, "group")) + .ok() + .map(|i| Identifier::parse(&format!("test:group{i}")).unwrap()), + }) +} +fn template(v: &Value) -> Option<Template> { + v["remainder"].as_i64().map(|count| { + let mut p = Vec::new(); + if let Some(m) = v["maximum"].as_i64() { + p.push((0, Some(Component::Integer(m as i32)))); + } + if v["damage"].as_bool().unwrap() { + p.push((1, Some(Component::Integer(0)))); + } + Template::new(2, 0, count as i32, Patch::new(p)).unwrap() + }) +} +fn components(stack: &Stack, v: &Value) { + let mut s = stack.write(); + s.components + .set(2, template(v).map(Component::Remainder)) + .unwrap(); + s.components + .set(3, cooldown(v).map(Component::Cooldown)) + .unwrap(); +} +struct Data { + f: Value, + out: io::BufWriter<fs::File>, + refs: [Stack; 3], + extra: Option<Stack>, + original: Option<Stack>, + result: Option<Stack>, + dropped: Option<Stack>, + changed: bool, + calls: i32, + prototypes: [Prototype<u8, Component>; 3], + store: ItemStacks<usize, u8, Component>, +} +impl Data { + fn config(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn snapshot(&self, s: Option<&Stack>) -> String { + let Some(s) = s else { + return "none".into(); + }; + let d = s.read(); + let remainder = match d.component(&2) { + Some(Component::Remainder(t)) => format!( + "{}:{}", + t.count(), + integer(t.component(&self.prototypes[t.item()], &0)).unwrap_or(1) + ), + _ => "none".into(), + }; + let cooldown = match d.component(&3) { + Some(Component::Cooldown(c)) => format!( + "{}:{}", + bits(c.seconds), + c.group.as_ref().map_or("none".into(), ToString::to_string) + ), + _ => "none".into(), + }; + format!( + "{} {} {} {} {} {} {}", + s.same_reference(&self.store.empty()), + d.item(), + d.count, + d.count(), + d.pop_time, + remainder, + cooldown + ) + } + fn all(&mut self, book: &Book, inventory: &Inventory) { + writeln!( + self.out, + "state {} {} {}", + self.calls, self.changed, book.tick_count + ) + .unwrap(); + let slots = [ + Some(self.refs[0].clone()), + Some(self.refs[1].clone()), + Some(self.refs[2].clone()), + self.extra.clone(), + self.original.clone(), + self.result.clone(), + self.dropped.clone(), + ]; + for (i, s) in slots.iter().enumerate() { + writeln!(self.out, "ref {i} {}", self.snapshot(s.as_ref())).unwrap(); + } + let mut same = Vec::new(); + for a in 0..slots.len() { + for b in a + 1..slots.len() { + same.push((slots[a] == slots[b]).to_string()); + } + } + writeln!(self.out, "same {}", same.join(",")).unwrap(); + let entries = book + .entries() + .map(|(k, v)| format!("{k}={}:{}", v.start, v.end)) + .collect::<Vec<_>>() + .join(","); + writeln!(self.out, "cooldowns {entries}").unwrap(); + let mut contents = Vec::new(); + for i in 0..43 { + let item = inventory.get(i).unwrap(); + if !item.same_reference(&self.store.empty()) { + let aliases = slots + .iter() + .map(|v| { + v.as_ref() + .is_some_and(|r| r.same_reference(&item)) + .to_string() + }) + .collect::<Vec<_>>() + .join(","); + contents.push(format!("{i}={} [{aliases}]", self.snapshot(Some(&item)))); + } + } + writeln!( + self.out, + "inventory {} | {}", + inventory.selected(), + contents.join(" | ") + ) + .unwrap(); + } + fn reset(&mut self, book: &mut Book, inventory: &mut Inventory) { + let c = self.config().clone(); + self.prototypes[2] = Prototype::new([(0, Component::Integer(n(&c, "prototype_max")))]); + for i in 0..2 { + let v = &c["items"][i]; + self.refs[i].write().count = n(v, "count"); + components(&self.refs[i], v); + } + book.tick_count = n(&c, "clock"); + inventory.clear(); + inventory.set_selected(n(&c, "selected")).unwrap(); + for pair in c["slots"].as_array().unwrap() { + inventory + .set( + pair[0].as_i64().unwrap() as i32, + self.refs[pair[1].as_u64().unwrap() as usize].clone(), + ) + .unwrap(); + } + if let Some(extra) = &self.extra { + extra.write().count = n(&c, "extra_count"); + } + if let Some(original) = &self.original { + original.write().count = n(&c, "original_count"); + components(original, &c["items"][1]); + } + } + fn event( + &mut self, + book: &mut Book, + inventory: &mut Inventory, + name: String, + ) -> Result<(), &'static str> { + writeln!(self.out, "event {name}").unwrap(); + let index = self.calls; + self.calls += 1; + self.all(book, inventory); + if index == n(&self.f, "fail") { + return Err("callback"); + } + if index == n(&self.f, "mutate") { + self.changed = true; + self.reset(book, inventory); + } + Ok(()) + } +} +struct Observe<'a> { + data: &'a mut Data, + inventory: &'a mut Inventory, +} +impl Observer<Identifier> for Observe<'_> { + type Error = &'static str; + fn started(&mut self, b: &mut Book, g: Identifier, d: i32) -> Result<(), Self::Error> { + self.data + .event(b, self.inventory, format!("started {g} {d}")) + } + fn ended(&mut self, _: &mut Book, _: Identifier) -> Result<(), Self::Error> { + unreachable!() + } +} +struct Pickup<'a> { + data: &'a mut Data, + book: &'a mut Book, +} +impl InventoryRules<usize, u8, Component> for Pickup<'_> { + fn is_enchanted(&self, _: &Stack) -> bool { + false + } + fn is_damaged(&self, _: &Stack) -> bool { + false + } + fn has_custom_name(&self, _: &Stack) -> bool { + false + } +} +impl PickupHooks<usize, u8, Component> for Pickup<'_> { + type Error = &'static str; + fn item_max_stack_size(&self, s: &Stack) -> i32 { + integer(s.read().component(&0)).unwrap_or(1) + } + fn max_stack_size(&mut self, _: &mut Inventory) -> Result<i32, Self::Error> { + Ok(99) + } + fn infinite_materials(&mut self, inv: &mut Inventory) -> Result<bool, Self::Error> { + self.data.event(self.book, inv, "infinite".into())?; + Ok(self.data.config()["infinite"].as_bool().unwrap()) + } +} +impl ExtraItemHooks<usize, u8, Component> for Pickup<'_> { + fn drop_predicted(&mut self, inv: &mut Inventory, s: Stack) -> Result<(), Self::Error> { + self.data.dropped = Some(s); + self.data.event(self.book, inv, "drop".into()) + } +} +struct World { + data: Data, + book: Book, + inventory: Inventory, +} +impl ValidationRules<usize, u8, Component> for World { + type ContentsError = std::convert::Infallible; + fn has_max_damage(&self, s: &StackData) -> bool { + s.component(&1).is_some() + } + fn max_stack_size(&self, s: &StackData) -> i32 { + integer(s.component(&0)).unwrap_or(1) + } + fn validate_contents(&self, _: &StackData) -> Result<(), Self::ContentsError> { + Ok(()) + } +} +impl CooldownUser for World { + type Error = &'static str; + type Stack = Stack; + type Manager = (); + fn is_player(&self) -> bool { + self.data.f["player"].as_bool().unwrap() + } + fn cooldowns(&mut self) -> Result<(), Self::Error> { + self.data + .event(&mut self.book, &mut self.inventory, "get-cooldowns".into()) + } + fn add_cooldown(&mut self, _: (), stack: Stack, ticks: i32) -> Result<(), Self::Error> { + self.data.original = Some(stack.clone()); + self.data.event( + &mut self.book, + &mut self.inventory, + format!("add-cooldown {ticks}"), + )?; + let group = { + let s = stack.read(); + let c = match s.component(&3) { + Some(Component::Cooldown(c)) => Some(c), + _ => None, + }; + item_cooldowns::group(c, || { + Identifier::parse(if s.item() == 2 { + "minecraft:stick" + } else { + "minecraft:air" + }) + .unwrap() + }) + }; + self.book.add( + group, + ticks, + &mut Observe { + data: &mut self.data, + inventory: &mut self.inventory, + }, + ) + } +} +impl AfterUseWorld<usize, u8, Component> for World { + type Error = &'static str; + type Level = (); + type Group = Identifier; + fn remainder(&self, s: &StackData) -> Option<Template> { + match s.component(&2) { + Some(Component::Remainder(t)) => Some(t.clone()), + _ => None, + } + } + fn cooldown(&self, s: &StackData) -> Option<UseCooldown<Identifier>> { + match s.component(&3) { + Some(Component::Cooldown(c)) => Some(c.clone()), + _ => None, + } + } + fn prototype(&self, item: usize) -> Prototype<u8, Component> { + self.data.prototypes[item].clone() + } + fn finish_item(&mut self, s: Stack, _: ()) -> Result<Stack, Self::Error> { + let kind = s.read().item(); + if kind == 1 { + self.data + .event(&mut self.book, &mut self.inventory, "finish".into())?; + Ok(self.data.refs[n(self.data.config(), "finish") as usize].clone()) + } else { + Ok(s) + } + } + fn infinite_materials(&mut self) -> Result<bool, Self::Error> { + self.data + .event(&mut self.book, &mut self.inventory, "infinite".into())?; + Ok(self.data.config()["infinite"].as_bool().unwrap()) + } + fn extra_item(&mut self, s: Stack) -> Result<(), Self::Error> { + self.data.extra = Some(s.clone()); + self.data + .event(&mut self.book, &mut self.inventory, "extra".into())?; + if self.data.f["player"].as_bool().unwrap() { + extra_items::deliver( + &mut self.inventory, + s, + &mut Pickup { + data: &mut self.data, + book: &mut self.book, + }, + ) + .map_err(|e| match e { + PickupError::Callback(e) => e, + PickupError::Inventory(_) => "callback", + })?; + } + Ok(()) + } + fn apply_cooldown( + &mut self, + c: UseCooldown<Identifier>, + original: Stack, + ) -> Result<(), Self::Error> { + c.apply(self, original) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let store = ItemStacks::new(0); + let prototypes = [ + Prototype::new([]), + Prototype::new([]), + Prototype::new([(0, Component::Integer(n(&f["initial"], "prototype_max")))]), + ]; + let refs = [ + store.create(1, 1, prototypes[1].clone()), + store.create(2, 1, prototypes[2].clone()), + store.empty(), + ]; + refs[0].write().pop_time = 5; + refs[1].write().pop_time = 7; + let mut w = World { + data: Data { + f, + out, + refs, + extra: None, + original: None, + result: None, + dropped: None, + changed: false, + calls: 0, + prototypes, + store: store.clone(), + }, + book: Book::default(), + inventory: Inventory::new(store.clone(), EntityEquipment::new(store.empty())), + }; + w.data.reset(&mut w.book, &mut w.inventory); + w.data.all(&w.book, &w.inventory); + let source = w.data.refs[n(&w.data.f, "source") as usize].clone(); + let result = item_after_use::finish(&store, &mut w, source, ()); + match result { + Ok(s) => { + w.data.result = Some(s); + writeln!(w.data.out, "result ok")?; + } + Err(e) => writeln!(w.data.out, "result {e}")?, + } + w.data.all(&w.book, &w.inventory); + out = w.data.out; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/face_support_fixture.rs b/crates/horizon-world/examples/face_support_fixture.rs new file mode 100644 index 000000000..e6bee0e7a --- /dev/null +++ b/crates/horizon-world/examples/face_support_fixture.rs @@ -0,0 +1,147 @@ +use horizon_core::geometry::{Aabb, Axis, Direction, ShapeOp, Vec3, VoxelShape}; +use horizon_world::block_support::SupportType; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn numbers(v: &Value) -> Vec<f64> { + v.as_array() + .unwrap() + .iter() + .map(|v| f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap())) + .collect() +} +fn values( + out: &mut impl Write, + label: &str, + values: impl IntoIterator<Item = f64>, +) -> io::Result<()> { + write!(out, "{label}")?; + for v in values { + let bits = if v.is_nan() { + 0x7ff8_0000_0000_0000 + } else { + v.to_bits() + }; + write!(out, " {bits:016x}")?; + } + writeln!(out) +} +fn box_values(out: &mut impl Write, label: &str, b: Aabb) -> io::Result<()> { + values( + out, + label, + [ + b.min(Axis::X), + b.min(Axis::Y), + b.min(Axis::Z), + b.max(Axis::X), + b.max(Axis::Y), + b.max(Axis::Z), + ], + ) +} +fn emit(out: &mut impl Write, shape: &VoxelShape) -> io::Result<()> { + writeln!( + out, + "shape {} {} {}", + shape.is_empty(), + shape.boxes().len(), + shape.is_cube() + )?; + for (axis, name) in Axis::ALL.into_iter().zip(["x", "y", "z"]) { + values(out, name, shape.coordinates(axis).iter().copied())?; + } + let axes = shape.cube_coordinate_axes(); + writeln!( + out, + "axes {}", + u8::from(axes[0]) + 2 * u8::from(axes[1]) + 4 * u8::from(axes[2]) + )?; + values( + out, + "extrema", + Axis::ALL + .map(|a| shape.min(a)) + .into_iter() + .chain(Axis::ALL.map(|a| shape.max(a))), + )?; + match shape.bounds() { + Some(b) => box_values(out, "bounds", b)?, + None => writeln!(out, "bounds none")?, + } + for b in shape.boxes() { + box_values(out, "box", *b)?; + } + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut shape = if f.get("coords").is_some() { + let coords = std::array::from_fn(|i| numbers(&f["coords"][i])); + let occupied = f["occupied"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_bool().unwrap()) + .collect::<Vec<_>>(); + if f["cube"].as_bool().unwrap() { + VoxelShape::from_cube(coords.map(|v| v.len() - 1), &occupied)? + } else { + VoxelShape::from_grid(coords, &occupied)? + } + } else { + let mut s = VoxelShape::empty(); + for v in f["boxes"].as_array().unwrap() { + let v = numbers(v); + s = s.join( + &VoxelShape::from_box(Aabb::new( + Vec3::new(v[0], v[1], v[2]), + Vec3::new(v[3], v[4], v[5]), + ))?, + ShapeOp::OR, + )?; + } + s + }; + if let Some(v) = f.get("move") { + let v = numbers(v); + shape = shape.moved(Vec3::new(v[0], v[1], v[2])); + } + for direction in Direction::ALL { + let face = shape.face_shape(direction)?; + writeln!( + out, + "face {} {} {}", + direction as u8, + face.same_identity(&shape), + face.same_identity(&shape.face_shape(direction)?) + )?; + emit(&mut out, &face)?; + writeln!( + out, + "support {} {} {} 3", + SupportType::Full.is_supporting(&shape, direction)?, + SupportType::Center.is_supporting(&shape, direction)?, + SupportType::Rigid.is_supporting(&shape, direction)? + )?; + for nested in Direction::ALL { + let second = face.face_shape(nested)?; + writeln!( + out, + "nested {} {}", + nested as u8, + second.same_identity(&face) + )?; + emit(&mut out, &second)?; + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/face_visibility_fixture.rs b/crates/horizon-world/examples/face_visibility_fixture.rs new file mode 100644 index 000000000..b2ef8716c --- /dev/null +++ b/crates/horizon-world/examples/face_visibility_fixture.rs @@ -0,0 +1,85 @@ +use horizon_core::geometry::Direction; +use horizon_world::{ + block_render::{FaceVisibility, RenderDefinition, SkipRendering}, + collision::CachedCollisionRegistry, + nbt::{self, Limits, Tag}, + registry::{BlockRegistry, BlockStateId}, +}; +use serde_json::Value; +use std::{ + collections::BTreeMap, + fs, + io::{BufRead, BufReader, BufWriter, Write}, + path::Path, +}; +fn main() -> Result<(), Box<dyn std::error::Error>> { + let path = std::env::args().nth(1).ok_or("private fixture directory")?; + let dir = Path::new(&path); + let read = |name: &str| -> Result<Tag, Box<dyn std::error::Error>> { + Ok( + nbt::read_named(&fs::read(dir.join(name))?, Limits::default())? + .0 + .tag, + ) + }; + let registry = BlockRegistry::from_nbt(&read("block-registry.nbt")?)?; + let occlusion = CachedCollisionRegistry::from_nbt(&read("occlusion.nbt")?, ®istry)?; + let definitions: BTreeMap<String, Value> = + serde_json::from_reader(fs::File::open(dir.join("definitions.json"))?)?; + let definitions = definitions + .into_iter() + .map(|(name, v)| { + let skip = match v["rule"].as_str().ok_or("missing rule")? { + "never" => SkipRendering::Never, + "same_block" => SkipRendering::SameBlock, + "bars" => SkipRendering::Bars, + "leaves" => SkipRendering::Leaves, + "liquid" => SkipRendering::Liquid, + "mangrove_roots" => SkipRendering::MangroveRoots, + _ => return Err("unrecognized rendering rule"), + }; + Ok(( + name, + RenderDefinition { + skip, + can_occlude: v["can_occlude"].as_bool().ok_or("missing occlusion flag")?, + bars_tag: v["bars_tag"].as_bool().ok_or("missing bars tag")?, + }, + )) + }) + .collect::<Result<_, &str>>()?; + let mut visibility = FaceVisibility::new(&occlusion, &definitions)?; + for invalid in [registry.len() as u32, u32::MAX] { + assert!( + visibility + .should_render_face(BlockStateId(invalid), BlockStateId(0), Direction::Up, false) + .is_err() + ); + assert!( + visibility + .skip_rendering(BlockStateId(0), BlockStateId(invalid), Direction::Up, false) + .is_err() + ); + } + let mut output = BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in BufReader::new(fs::File::open(dir.join("pairs.txt"))?).lines() { + let line = line?; + let (a, b) = line.split_once(' ').ok_or("invalid pair")?; + let a = BlockStateId(a.parse()?); + let b = BlockStateId(b.parse()?); + for cutout in [false, true] { + let mut skip = 0u8; + let mut visible = 0u8; + for direction in Direction::ALL { + if visibility.skip_rendering(a, b, direction, cutout)? { + skip |= 1 << direction as u8; + } + if visibility.should_render_face(a, b, direction, cutout)? { + visible |= 1 << direction as u8; + } + } + writeln!(output, "{} {} {cutout} {skip} {visible}", a.0, b.0)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/fall_damage_fixture.rs b/crates/horizon-world/examples/fall_damage_fixture.rs new file mode 100644 index 000000000..092208c95 --- /dev/null +++ b/crates/horizon-world/examples/fall_damage_fixture.rs @@ -0,0 +1,146 @@ +use horizon_core::{geometry::Vec3, position::BlockPos}; +use horizon_world::fall_damage::{FallDamageWorld, check_fall_damage}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn support(v: &Value) -> Option<BlockPos> { + if v.is_null() { + None + } else { + Some(BlockPos::new( + v[0].as_i64().unwrap() as i32, + v[1].as_i64().unwrap() as i32, + v[2].as_i64().unwrap() as i32, + )) + } +} +struct World<'a> { + input: &'a Value, + out: &'a mut dyn Write, + calls: i64, + fall: f64, + position: Vec3, + support: Option<BlockPos>, +} +impl World<'_> { + fn query(&mut self, text: String) -> io::Result<()> { + writeln!(self.out, "{text}")?; + let call = self.calls; + self.calls += 1; + if call == self.input["fail"].as_i64().unwrap() { + Err(io::Error::other("injected fall query failure")) + } else { + Ok(()) + } + } +} +impl FallDamageWorld for World<'_> { + type Error = io::Error; + type State = u8; + fn is_in_water(&mut self) -> io::Result<bool> { + self.query("water".into())?; + Ok(self.input["water"].as_bool().unwrap()) + } + fn fall_distance(&self) -> f64 { + self.fall + } + fn set_fall_distance(&mut self, v: f64) { + self.fall = v; + } + fn fall_on(&mut self, _: u8, p: BlockPos, distance: f64) -> io::Result<()> { + self.query(format!( + "fall-on {} {} {} {:016x}", + p.x, + p.y, + p.z, + bits(distance) + ))?; + if self.input["mutate"].as_bool().unwrap() { + self.fall = 17.25; + self.position = Vec3::new(17.0, 18.0, 19.0); + self.support = support(&self.input["after_support"]); + } + Ok(()) + } + fn position(&self) -> Vec3 { + self.position + } + fn supporting_block(&self) -> Option<BlockPos> { + self.support + } + fn block_state(&mut self, p: BlockPos) -> io::Result<u8> { + self.query(format!("state {} {} {}", p.x, p.y, p.z))?; + Ok(1) + } + fn hit_ground(&mut self, p: Vec3, s: u8) -> io::Result<()> { + self.query(format!( + "hit-ground {:016x} {:016x} {:016x} {}", + bits(p.x), + bits(p.y), + bits(p.z), + if s == 1 { "queried" } else { "input" } + )) + } + fn reset_fall_distance(&mut self) -> io::Result<()> { + self.query("reset".into())?; + self.fall = 0.0; + Ok(()) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut world = World { + input: &f, + out: &mut out, + calls: 0, + fall: number(&f["fall"]), + position: Vec3::new(0.3, 1.5, -0.3), + support: support(&f["support"]), + }; + let result = check_fall_damage( + &mut world, + number(&f["dy"]), + f["ground"].as_bool().unwrap(), + 0, + BlockPos::new(3, 4, 5), + ); + writeln!( + world.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + let p = world.position; + writeln!( + world.out, + "final {:016x} {:016x} {:016x} {:016x}", + bits(world.fall), + bits(p.x), + bits(p.y), + bits(p.z) + )?; + if let Some(p) = world.support { + writeln!(world.out, "support {} {} {}", p.x, p.y, p.z)?; + } else { + writeln!(world.out, "support none")?; + } + writeln!(world.out, "queries {}", world.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/feature_catalog_fixture.rs b/crates/horizon-world/examples/feature_catalog_fixture.rs new file mode 100644 index 000000000..c12b9c1a0 --- /dev/null +++ b/crates/horizon-world/examples/feature_catalog_fixture.rs @@ -0,0 +1,276 @@ +//! Feature world transport retaining ordered mutations and partial failures. +use horizon_core::random::{LegacyRandom, RandomSource, WorldgenRandom, XoroshiroRandom}; +use horizon_world::{ + DATA_VERSION, + heightmap::HeightmapType, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, + worldgen::{ + anchor::WorldGenerationContext, + block_feature::FeatureBlockBindings, + feature::{FeatureBlocks, FeatureWorld}, + feature_catalog::FeatureCatalog, + feature_graph::FeatureDefinition, + placement::{FeaturePlacer, PlacementContext, PlacementModifier, PlacementQueryError}, + tags::TagDefinitions, + }, +}; +use serde_json::Value; +use std::{ + collections::BTreeMap, + fs, + io::{self, Write}, + path::Path, +}; +struct World<'a, W> { + states: BTreeMap<[i32; 3], BlockStateId>, + blocks: [BlockStateId; 5], + calls: i32, + fail: i32, + reject: i32, + out: &'a mut W, +} +impl<W: Write> PlacementContext for World<'_, W> { + fn block_state(&mut self, position: [i32; 3]) -> Result<BlockStateId, PlacementQueryError> { + self.block(position) + .map_err(|e| PlacementQueryError::Failed(e.to_string())) + } + fn max_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(319) + } + fn generation(&self) -> WorldGenerationContext { + WorldGenerationContext::new(-64, 384, 63) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(-64) + } + fn height(&mut self, _: HeightmapType, _: i32, _: i32) -> Result<i32, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } +} +impl<W: Write> FeatureWorld for World<'_, W> { + type Error = io::Error; + fn block(&mut self, p: [i32; 3]) -> Result<BlockStateId, Self::Error> { + let call = self.calls; + self.calls += 1; + writeln!(self.out, "get {} {} {}", p[0], p[1], p[2])?; + if call == self.fail { + return Err(io::Error::other("world failure")); + } + let hash = p[0] + .wrapping_mul(31) + .wrapping_add(p[1].wrapping_mul(7)) + .wrapping_add(p[2].wrapping_mul(17)) + .rem_euclid(5) as usize; + let state = self.states.get(&p).copied().unwrap_or(self.blocks[hash]); + writeln!(self.out, "state {}", state.0)?; + Ok(state) + } + fn set_block( + &mut self, + p: [i32; 3], + state: BlockStateId, + flags: i32, + ) -> Result<bool, Self::Error> { + let call = self.calls; + self.calls += 1; + writeln!( + self.out, + "set {} {} {} {} {flags}", + p[0], p[1], p[2], state.0 + )?; + if call == self.fail { + return Err(io::Error::other("world failure")); + } + let result = self.reject == 0 || call % self.reject != 0; + if result { + self.states.insert(p, state); + } + writeln!(self.out, "written {result}")?; + Ok(result) + } +} +fn fixture( + f: &Value, + catalog: &FeatureCatalog, + bindings: &FeatureBlockBindings<'_>, + mut random: impl RandomSource, + blocks: [BlockStateId; 5], + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let root = if f["placed_root"].as_bool().unwrap_or(false) { + catalog + .placed_feature_with_blocks(f["definition"].as_str().unwrap(), bindings) + .map(|placed| FeatureDefinition::Sequence(vec![placed])) + } else { + catalog.feature_with_blocks(f["definition"].as_str().unwrap(), bindings) + }; + let decoded = root.and_then(|feature| { + let modifiers = f + .get("placement") + .map(|v| { + v.as_array() + .unwrap() + .iter() + .map(|v| PlacementModifier::from_json_with_blocks(&v.to_string(), bindings)) + .collect::<Result<Vec<_>, _>>() + }) + .transpose()?; + Ok((feature, modifiers)) + }); + match decoded { + Err(_) => writeln!(out, "decode error")?, + Ok((feature, modifiers)) => { + writeln!(out, "decode ok")?; + let mut world = World { + states: BTreeMap::new(), + blocks, + calls: 0, + fail: f["fail"].as_i64().unwrap() as i32, + reject: f["reject"].as_i64().unwrap() as i32, + out, + }; + let blocks = FeatureBlocks { + air: blocks[0], + stone: blocks[1], + cobblestone: blocks[2], + end_stone: blocks[3], + obsidian: blocks[4], + }; + let p = &f["origin"]; + let origin = [ + p[0].as_i64().unwrap() as i32, + p[1].as_i64().unwrap() as i32, + p[2].as_i64().unwrap() as i32, + ]; + let mut placer = FeaturePlacer::new(); + for _ in 0..f["repeats"].as_u64().unwrap() { + world.calls = 0; + let result = if let Some(modifiers) = &modifiers { + placer + .place_with_context( + modifiers, + &mut world, + &mut random, + origin, + |world, random, position| { + feature.place(world, random, position, blocks) + }, + ) + .map_err(|_| ()) + } else { + feature + .place(&mut world, &mut random, origin, blocks) + .map_err(|_| ()) + }; + match result { + Ok(value) => writeln!(world.out, "place {value}")?, + Err(_) => writeln!(world.out, "place error")?, + } + writeln!(world.out, "next {}", random.next_long())?; + for (p, state) in &world.states { + writeln!(world.out, "stored {} {} {} {}", p[0], p[1], p[2], state.0)?; + } + writeln!(world.out, "end")?; + } + } + } + writeln!(out, "tail {}", random.next_long())?; + Ok(()) +} +fn tag(v: &Value) -> Tag { + match v { + Value::String(s) => Tag::String(s.as_str().into()), + Value::Number(n) => Tag::Int(n.as_i64().unwrap() as i32), + Value::Array(a) => Tag::List(a.iter().map(tag).collect()), + Value::Object(m) => { + Tag::Compound(m.iter().map(|(k, v)| (k.as_str().into(), tag(v))).collect()) + } + _ => panic!("invalid registry metadata"), + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let resources: Value = serde_json::from_str(&fs::read_to_string(dir.join("catalog.json"))?)?; + let definitions = |name: &str| { + resources[name] + .as_object() + .unwrap() + .iter() + .map(|(k, v)| (k.clone(), v.as_str().unwrap().to_owned())) + .collect() + }; + let mut tags = TagDefinitions::default(); + for (name, value) in resources["tags"].as_object().unwrap() { + tags.apply_json(name, "fixture", value.as_str().unwrap())?; + } + let catalog = + FeatureCatalog::from_resources(&definitions("features"), &definitions("placed"), &tags)?; + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ("states", tag(&facts["states"])), + ("defaults", tag(&facts["defaults"])), + ]))?; + let integers = facts["integers"] + .as_array() + .unwrap() + .iter() + .map(|v| { + ( + v[0].as_str().unwrap().to_owned(), + v[1].as_str().unwrap().to_owned(), + ) + }) + .collect(); + let bindings = FeatureBlockBindings::new(®istry, integers)?; + let blocks = ["air", "stone", "cobblestone", "end_stone", "obsidian"].map(|name| { + registry + .default_state(&format!("minecraft:{name}")) + .unwrap() + }); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + match ( + f["legacy"].as_bool().unwrap(), + f["worldgen"].as_bool().unwrap(), + ) { + (true, false) => fixture( + &f, + &catalog, + &bindings, + LegacyRandom::new(seed), + blocks, + &mut out, + )?, + (true, true) => fixture( + &f, + &catalog, + &bindings, + WorldgenRandom::new(LegacyRandom::new(seed)), + blocks, + &mut out, + )?, + (false, false) => fixture( + &f, + &catalog, + &bindings, + XoroshiroRandom::new(seed), + blocks, + &mut out, + )?, + (false, true) => fixture( + &f, + &catalog, + &bindings, + WorldgenRandom::new(XoroshiroRandom::new(seed)), + blocks, + &mut out, + )?, + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/feature_graph_fixture.rs b/crates/horizon-world/examples/feature_graph_fixture.rs new file mode 100644 index 000000000..fae5b6e2e --- /dev/null +++ b/crates/horizon-world/examples/feature_graph_fixture.rs @@ -0,0 +1,180 @@ +//! Feature world transport retaining ordered mutations and partial failures. +use horizon_core::random::{LegacyRandom, RandomSource, XoroshiroRandom}; +use horizon_world::{ + heightmap::HeightmapType, + registry::BlockStateId, + worldgen::{ + anchor::WorldGenerationContext, + feature::{FeatureBlocks, FeatureWorld}, + feature_graph::FeatureDefinition, + placement::{FeaturePlacer, PlacementContext, PlacementModifier, PlacementQueryError}, + }, +}; +use serde_json::Value; +use std::{ + collections::BTreeMap, + fs, + io::{self, Write}, + path::Path, +}; +struct World<'a, W> { + states: BTreeMap<[i32; 3], BlockStateId>, + blocks: [BlockStateId; 5], + calls: i32, + fail: i32, + reject: i32, + out: &'a mut W, +} +impl<W> PlacementContext for World<'_, W> { + fn max_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(319) + } + fn generation(&self) -> WorldGenerationContext { + WorldGenerationContext::new(-64, 384, 63) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(-64) + } + fn height(&mut self, _: HeightmapType, _: i32, _: i32) -> Result<i32, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } +} +impl<W: Write> FeatureWorld for World<'_, W> { + type Error = io::Error; + fn block(&mut self, p: [i32; 3]) -> Result<BlockStateId, Self::Error> { + let call = self.calls; + self.calls += 1; + writeln!(self.out, "get {} {} {}", p[0], p[1], p[2])?; + if call == self.fail { + return Err(io::Error::other("world failure")); + } + let hash = p[0] + .wrapping_mul(31) + .wrapping_add(p[1].wrapping_mul(7)) + .wrapping_add(p[2].wrapping_mul(17)) + .rem_euclid(5) as usize; + let state = self.states.get(&p).copied().unwrap_or(self.blocks[hash]); + writeln!(self.out, "state {}", state.0)?; + Ok(state) + } + fn set_block( + &mut self, + p: [i32; 3], + state: BlockStateId, + flags: i32, + ) -> Result<bool, Self::Error> { + let call = self.calls; + self.calls += 1; + writeln!( + self.out, + "set {} {} {} {} {flags}", + p[0], p[1], p[2], state.0 + )?; + if call == self.fail { + return Err(io::Error::other("world failure")); + } + let result = self.reject == 0 || call % self.reject != 0; + if result { + self.states.insert(p, state); + } + writeln!(self.out, "written {result}")?; + Ok(result) + } +} +fn fixture( + f: &Value, + mut random: impl RandomSource, + blocks: [BlockStateId; 5], + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let decoded = + FeatureDefinition::from_json(f["definition"].as_str().unwrap()).and_then(|feature| { + let modifiers = f + .get("placement") + .map(|v| { + v.as_array() + .unwrap() + .iter() + .map(|v| PlacementModifier::from_json(&v.to_string())) + .collect::<Result<Vec<_>, _>>() + }) + .transpose()?; + Ok((feature, modifiers)) + }); + match decoded { + Err(_) => writeln!(out, "decode error")?, + Ok((feature, modifiers)) => { + writeln!(out, "decode ok")?; + let mut world = World { + states: BTreeMap::new(), + blocks, + calls: 0, + fail: f["fail"].as_i64().unwrap() as i32, + reject: f["reject"].as_i64().unwrap() as i32, + out, + }; + let blocks = FeatureBlocks { + air: blocks[0], + stone: blocks[1], + cobblestone: blocks[2], + end_stone: blocks[3], + obsidian: blocks[4], + }; + let p = &f["origin"]; + let origin = [ + p[0].as_i64().unwrap() as i32, + p[1].as_i64().unwrap() as i32, + p[2].as_i64().unwrap() as i32, + ]; + let mut placer = FeaturePlacer::new(); + for _ in 0..f["repeats"].as_u64().unwrap() { + world.calls = 0; + let result = if let Some(modifiers) = &modifiers { + placer + .place_with_context( + modifiers, + &mut world, + &mut random, + origin, + |world, random, position| { + feature.place(world, random, position, blocks) + }, + ) + .map_err(|_| ()) + } else { + feature + .place(&mut world, &mut random, origin, blocks) + .map_err(|_| ()) + }; + match result { + Ok(value) => writeln!(world.out, "place {value}")?, + Err(_) => writeln!(world.out, "place error")?, + } + writeln!(world.out, "next {}", random.next_long())?; + for (p, state) in &world.states { + writeln!(world.out, "stored {} {} {} {}", p[0], p[1], p[2], state.0)?; + } + writeln!(world.out, "end")?; + } + } + } + writeln!(out, "tail {}", random.next_long())?; + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let ids: [u32; 5] = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + let blocks = ids.map(BlockStateId); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture(&f, LegacyRandom::new(seed), blocks, &mut out)?; + } else { + fixture(&f, XoroshiroRandom::new(seed), blocks, &mut out)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/feature_placement_fixture.rs b/crates/horizon-world/examples/feature_placement_fixture.rs new file mode 100644 index 000000000..c7500fa4f --- /dev/null +++ b/crates/horizon-world/examples/feature_placement_fixture.rs @@ -0,0 +1,91 @@ +//! Transport for native modifier chains and a feature callback sharing the RNG. +#[path = "support/placement_queries.rs"] +mod queries; +use horizon_core::random::{LegacyRandom, RandomSource, XoroshiroRandom}; +use horizon_world::worldgen::{ + anchor::WorldGenerationContext, + placement::{FeaturePlacer, PlacementModifier}, +}; +use serde_json::Value; +use std::cell::RefCell; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +fn fixture( + f: &Value, + mut random: impl RandomSource, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let c = &f["context"]; + let context = WorldGenerationContext::new(n(&c[0]), n(&c[1]), n(&c[2])); + let out = RefCell::new(out); + let mut context = queries::Queries::new(f, context, &out); + let modifiers = f["modifiers"] + .as_array() + .unwrap() + .iter() + .map(|v| PlacementModifier::from_json(&v.to_string())) + .collect::<Result<Vec<_>, _>>(); + match modifiers { + Err(_) => writeln!(out.borrow_mut(), "decode error")?, + Ok(modifiers) => { + writeln!(out.borrow_mut(), "decode ok")?; + let mut placer = FeaturePlacer::new(); + for p in f["positions"].as_array().unwrap() { + let mut count = 0; + let fail = n(&f["fail"]); + let draw = f["draw"].as_bool().unwrap(); + let mode = n(&f["result"]); + let result = placer.place_in( + &modifiers, + &mut context, + &mut random, + [n(&p[0]), n(&p[1]), n(&p[2])], + |random, p| { + let previous = count; + count += 1; + if previous == fail { + return Err(io::Error::other("feature failure")); + } + writeln!(out.borrow_mut(), "feature {} {} {}", p[0], p[1], p[2])?; + let mut value = i64::from(p[0].wrapping_add(p[1]).wrapping_add(p[2])); + if draw { + value = random.next_long(); + writeln!(out.borrow_mut(), "consumer {value}")?; + } + let result = mode == 1 || (mode == 2 && value & 1 == 0); + writeln!(out.borrow_mut(), "result {result}")?; + Ok(result) + }, + ); + match result { + Ok(result) => writeln!(out.borrow_mut(), "place {result}")?, + Err(_) => writeln!(out.borrow_mut(), "place error")?, + } + writeln!(out.borrow_mut(), "next {}", random.next_long())?; + } + } + } + writeln!(out.borrow_mut(), "tail {}", random.next_long())?; + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture(&f, LegacyRandom::new(seed), &mut out)?; + } else { + fixture(&f, XoroshiroRandom::new(seed), &mut out)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/feature_region_fixture.rs b/crates/horizon-world/examples/feature_region_fixture.rs new file mode 100644 index 000000000..a6cb08b10 --- /dev/null +++ b/crates/horizon-world/examples/feature_region_fixture.rs @@ -0,0 +1,600 @@ +use horizon_core::random::{LegacyRandom, RandomSource, WorldgenRandom, XoroshiroRandom}; +use horizon_world::worldgen::{ + anchor::WorldGenerationContext, + block_feature::FeatureBlockBindings, + feature::{FeatureBlocks, FeatureWorld}, + feature_graph::FeatureDefinition, + feature_region::{RegionError, TerrainFeatureAccess, TerrainRegion}, + placement::{FeaturePlacer, PlacementContext, PlacementModifier}, + terrain::TerrainError, + write_zone::{GenerationWriteZone, UpgradeWriteHeight}, +}; +// Feature chains against a resident multi-chunk region. +use horizon_core::position::ChunkPos; +use horizon_world::{ + DATA_VERSION, + chunk_status::ChunkStatus, + fluid::FluidKind, + heightmap::{HeightmapState, HeightmapType}, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, + retrogen::BelowZeroRetrogen, + worldgen::{ + tags::TagDefinitions, + terrain::{PreLightChunkStage, TerrainBlockStates, TerrainChunk}, + }, +}; +use serde_json::Value; +use std::{ + collections::BTreeSet, + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone, Copy)] +struct State { + air: bool, + air_block: bool, + fluid: bool, + motion: bool, + no_leaves: bool, +} +impl HeightmapState for State { + fn is_air(self) -> bool { + self.air + } + fn is_air_block(self) -> bool { + self.air_block + } + fn has_fluid(self) -> bool { + self.fluid + } + fn blocks_motion_in_heightmap(self) -> bool { + self.motion + } + fn blocks_motion_in_heightmap_no_leaves(self) -> bool { + self.no_leaves + } +} +struct Properties<'a>(&'a [State]); +impl TerrainBlockStates for Properties<'_> { + type State = State; + fn heightmap_state(&self, id: BlockStateId) -> State { + self.0[id.0 as usize] + } +} +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +fn tag(v: &Value) -> Tag { + match v { + Value::String(s) => Tag::String(s.as_str().into()), + Value::Number(i) => Tag::Int(i.as_i64().unwrap() as i32), + Value::Object(m) => { + Tag::Compound(m.iter().map(|(k, v)| (k.as_str().into(), tag(v))).collect()) + } + Value::Array(a) => Tag::List(a.iter().map(tag).collect()), + _ => panic!("unsupported registry fixture value"), + } +} +fn fixture( + f: &Value, + registry: &BlockRegistry, + states: &[State], + bindings: &FeatureBlockBindings<'_>, + tags: &[String], + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let seed = f["seed"].as_i64().unwrap(); + match ( + f["legacy"].as_bool().unwrap(), + f["worldgen"].as_bool().unwrap(), + ) { + (true, false) => run( + f, + registry, + states, + bindings, + tags, + out, + LegacyRandom::new(seed), + ), + (true, true) => run( + f, + registry, + states, + bindings, + tags, + out, + WorldgenRandom::new(LegacyRandom::new(seed)), + ), + (false, false) => run( + f, + registry, + states, + bindings, + tags, + out, + XoroshiroRandom::new(seed), + ), + (false, true) => run( + f, + registry, + states, + bindings, + tags, + out, + WorldgenRandom::new(XoroshiroRandom::new(seed)), + ), + } +} +// Reuse one feature access object while successful callbacks change the center. +fn upgrade_lifecycle( + registry: &BlockRegistry, + states: &[State], + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + use horizon_world::worldgen::biome_chunk::{BiomeChunk, BiomeRegion}; + let biomes = BiomeRegion::new( + (0..2) + .map(|x| BiomeChunk::new(ChunkPos::new(x, 0), -64, 128, ()).unwrap()) + .collect(), + 0, + )?; + let stone = registry.default_state("minecraft:stone").unwrap(); + for stage in PreLightChunkStage::ALL { + for target in ChunkStatus::ALL.into_iter().skip(1) { + writeln!(out, "lifecycle {} {}", stage.status().name(), target.name())?; + let mut chunks = Vec::new(); + for x in 0..2 { + let mut chunk = + TerrainChunk::new(ChunkPos::new(x, 0), -64, 128, registry, Properties(states))?; + chunk.set_generation_stage(stage); + chunk.set_below_zero_retrogen(Some(BelowZeroRetrogen::new(target, vec![])?)); + chunks.push(chunk); + } + let mut region = TerrainRegion::new(chunks, WorldGenerationContext::new(-64, 128, 0))?; + for pass in 0..2 { + for x in 0..2 { + writeln!( + out, + "lifecycle_status {pass} {x} {} {}", + region.chunk(x, 0)?.highest_generated_status().name(), + region.noise_biome(&biomes, [x * 4, i32::MAX, 0]).is_ok() + )?; + } + if pass != 0 { + break; + } + let write = |region: &mut TerrainRegion<'_, Properties<'_>>, + _: [i32; 3], + _: BlockStateId, + flags: i32| + -> Result<bool, RegionError> { + let chunk = region.chunk_mut(0, 0)?; + match flags { + 1 => chunk.set_generation_stage(PreLightChunkStage::Features), + 2 => chunk.set_below_zero_retrogen(Some( + BelowZeroRetrogen::new(target, vec![]).unwrap(), + )), + 3 => chunk.set_below_zero_retrogen(None), + 4 => chunk.set_generation_stage(stage), + _ => {} + } + Ok(true) + }; + let mut world = TerrainFeatureAccess::new(&mut region, write) + .with_write_zone(GenerationWriteZone::new(ChunkPos::new(0, 0), 1)) + .with_upgrade_center(ChunkPos::new(0, 0))?; + for (x, y, flags) in [ + (16, 0, 0), + (16, -1, 1), + (16, 0, 0), + (0, -64, 3), + (16, 0, 2), + (16, 0, 0), + (0, -1, 4), + (16, 0, 0), + (0, -65, 0), + (0, -1, 3), + (16, i32::MAX, 0), + ] { + writeln!( + out, + "lifecycle_write {x} {y} {flags} {}", + world.set_block([x, y, 0], stone, flags)? + )?; + } + } + } + } + Ok(()) +} +fn run( + f: &Value, + registry: &BlockRegistry, + states: &[State], + bindings: &FeatureBlockBindings<'_>, + tags: &[String], + out: &mut impl Write, + mut random: impl RandomSource, +) -> Result<(), Box<dyn std::error::Error>> { + let stage = PreLightChunkStage::ALL + .into_iter() + .find(|s| s.name() == f["stage"].as_str().unwrap()) + .unwrap(); + let mut chunks = Vec::new(); + for cx in -1..=1 { + for cz in -1..=1 { + let mut chunk = + TerrainChunk::new(ChunkPos::new(cx, cz), -64, 64, registry, Properties(states))?; + chunk.set_generation_stage(stage); + for x in 0..16 { + for z in 0..16 { + chunk.set_block_worldgen( + (cx << 4) + x, + -56, + (cz << 4) + z, + registry.default_state("minecraft:stone").unwrap(), + )?; + if (x + z) % 3 != 0 { + chunk.set_block_worldgen( + (cx << 4) + x, + -48, + (cz << 4) + z, + registry.default_state("minecraft:dirt").unwrap(), + )?; + } + } + } + chunks.push(chunk); + } + } + let mut region = TerrainRegion::new(chunks, WorldGenerationContext::new(-64, 64, 0))? + .with_tick_clock( + f["game_time"].as_i64().unwrap(), + f["tick_order"].as_i64().unwrap(), + ) + .with_block_bindings(bindings)?; + if f["upgrading"].as_bool().unwrap() { + region + .chunk_mut(0, 0)? + .set_below_zero_retrogen(Some(BelowZeroRetrogen::new(ChunkStatus::Features, vec![])?)); + } + let blocks = FeatureBlocks::from_registry(registry)?; + let features = f["features"] + .as_array() + .unwrap() + .iter() + .map(|v| FeatureDefinition::from_json_with_blocks(&v.to_string(), bindings)) + .collect::<Result<Vec<_>, _>>()?; + let modifiers = f["placement"] + .as_array() + .unwrap() + .iter() + .map(|v| PlacementModifier::from_json(&v.to_string())) + .collect::<Result<Vec<_>, _>>()?; + let mut placer = FeaturePlacer::new(); + let fail = n(&f["fail"]); + let reject = n(&f["reject"]); + for repeat in 0..2 { + for feature in &features { + let mut calls = 0; + let result = { + let write = |region: &mut TerrainRegion<'_, Properties<'_>>, + p: [i32; 3], + state: BlockStateId, + flags: i32| + -> Result<bool, RegionError> { + writeln!(out, "write {} {} {} {} {flags}", p[0], p[1], p[2], state.0) + .map_err(TerrainError::from)?; + let call = calls; + calls += 1; + if call == fail { + return Err(TerrainError::Storage(io::Error::other( + "injected write failure", + )) + .into()); + } + let result = reject == 0 || call % reject != 0; + if result { + region.set_block_worldgen(p, state)?; + } + writeln!(out, "written {result}").map_err(TerrainError::from)?; + Ok(result) + }; + let mut world = TerrainFeatureAccess::new(&mut region, write) + .with_upgrade_center(ChunkPos::new(0, 0))?; + if let Some(zone) = f["write_zone"].as_array() { + world = world.with_write_zone(GenerationWriteZone::new( + ChunkPos::new(n(&zone[0]), n(&zone[1])), + n(&zone[2]), + )); + } + placer.place_with_context( + &modifiers, + &mut world, + &mut random, + [15, -40, 15], + |world, random, p| feature.place(world, random, p, blocks), + ) + }; + match result { + Ok(result) => writeln!(out, "place {result}")?, + Err(_) => writeln!(out, "place error")?, + } + writeln!(out, "next {}", random.next_long())?; + for [x, z] in [[0, 0], [15, 15], [16, 16], [-1, -1]] { + for kind in HeightmapType::ALL { + writeln!( + out, + "height {} {x} {z} {}", + kind.name(), + region.height(kind, x, z)? + )?; + } + } + } + writeln!(out, "repeat {repeat}")?; + } + for y in [i32::MIN, -65, -64, -63, -1, 0, 1, 319, 320, i32::MAX] { + for x in [0, 16] { + let result = { + let write = |region: &mut TerrainRegion<'_, Properties<'_>>, + p: [i32; 3], + state: BlockStateId, + flags: i32| + -> Result<bool, RegionError> { + writeln!(out, "write {} {} {} {} {flags}", p[0], p[1], p[2], state.0) + .map_err(TerrainError::from)?; + let result = reject == 0; + if result { + region.set_block_worldgen(p, state)?; + } + writeln!(out, "written {result}").map_err(TerrainError::from)?; + Ok(result) + }; + let mut world = TerrainFeatureAccess::new(&mut region, write) + .with_upgrade_center(ChunkPos::new(0, 0))?; + if let Some(zone) = f["write_zone"].as_array() { + world = world.with_write_zone(GenerationWriteZone::new( + ChunkPos::new(n(&zone[0]), n(&zone[1])), + n(&zone[2]), + )); + } + world.set_block( + [x, y, 0], + registry.default_state("minecraft:stone").unwrap(), + 2, + )? + }; + writeln!(out, "heightwrite {x} {y} {result}")?; + } + } + for command in f["tick_commands"].as_array().unwrap() { + let kind = command[0].as_str().unwrap(); + let id = n(&command[1]) as u32; + let p = std::array::from_fn(|i| n(&command[2][i])); + let delay = n(&command[3]); + writeln!(out, "tickrequest {kind} {id}")?; + let result = if kind == "block" { + region.schedule_block_tick(p, BlockStateId(id), delay) + } else { + region.schedule_fluid_tick(p, FluidKind::ALL[id as usize], delay) + }; + writeln!( + out, + "tickresult {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!(out, "tickorder {}", region.tick_clock().1)?; + } + for id in f["probe_states"].as_array().unwrap() { + let id = n(id) as u32; + let p = [[0, -64, 0], [-1, -49, -1], [16, -1, 16], [31, -32, 31]][id as usize % 4]; + writeln!(out, "probe {id}")?; + for state in [ + BlockStateId(id), + registry.default_state("minecraft:air").unwrap(), + ] { + region.set_block_worldgen(p, state)?; + let mut world = TerrainFeatureAccess::new( + &mut region, + |_: &mut TerrainRegion<'_, Properties<'_>>, + _: [i32; 3], + _: BlockStateId, + _: i32| Ok::<_, RegionError>(false), + ); + query_state(&mut world, p, tags, out)?; + } + } + for p in [ + [0, -65, 0], + [31, 0, 31], + [-1, i32::MIN, -1], + [16, i32::MAX, 16], + [-17, -40, 0], + [32, -40, 0], + [i32::MAX, i32::MIN, 0], + ] { + query_state(&mut region, p, tags, out)?; + } + for chunk in region.chunks() { + let p = chunk.position(); + writeln!(out, "chunk {} {}", p.x, p.z)?; + writeln!(out, "blockticks {}", chunk.block_ticks().count())?; + for tick in chunk.block_ticks().pack(region.tick_clock().0) { + writeln!( + out, + "bt {} {} {} {} {} {}", + tick.kind.0, tick.pos.x, tick.pos.y, tick.pos.z, tick.delay, tick.priority as i8 + )?; + } + writeln!(out, "fluidticks {}", chunk.fluid_ticks().count())?; + for tick in chunk.fluid_ticks().pack(region.tick_clock().0) { + writeln!( + out, + "ft {} {} {} {} {} {}", + FluidKind::ALL[tick.kind.0 as usize].name(), + tick.pos.x, + tick.pos.y, + tick.pos.z, + tick.delay, + tick.priority as i8 + )?; + } + for kind in HeightmapType::ALL { + if let Some(map) = chunk.heightmap(kind) { + writeln!(out, "map {}", kind.name())?; + for word in map.raw_data() { + writeln!(out, "{word:x}")?; + } + } else { + writeln!(out, "missing {}", kind.name())?; + } + } + for i in 0..4 { + writeln!(out, "section {i}")?; + for index in 0..4096 { + writeln!(out, "{}", chunk.section(i).unwrap().get(index)?.0)?; + } + } + } + writeln!(out, "tail {}", random.next_long())?; + Ok(()) +} +fn query_state( + world: &mut impl PlacementContext, + p: [i32; 3], + tags: &[String], + out: &mut impl Write, +) -> io::Result<()> { + writeln!(out, "query {} {} {}", p[0], p[1], p[2])?; + match world.fluid_state(p) { + Ok(fluid) => writeln!( + out, + "fluid {} {} {} {} {}", + fluid.kind().name(), + fluid.amount(), + fluid.falling(), + fluid.is_full(), + fluid.is_source() + )?, + Err(_) => writeln!(out, "fluid error")?, + } + match world.water_at(p) { + Ok(water) => writeln!(out, "water {water}")?, + Err(_) => writeln!(out, "water error")?, + } + let mut bits = String::new(); + for tag in tags { + bits.push(match world.block_matches_tag(p, tag) { + Ok(true) => '1', + Ok(false) => '0', + Err(_) => 'E', + }); + } + writeln!(out, "tags {bits}") +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + let bundle: Value = serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?; + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ( + "states", + Tag::List( + facts["states"] + .as_array() + .unwrap() + .iter() + .map(|s| tag(&s[4])) + .collect(), + ), + ), + ("defaults", tag(&facts["defaults"])), + ]))?; + let mut definitions = TagDefinitions::default(); + for (name, text) in bundle.as_object().unwrap() { + definitions.apply_json(name, "vanilla", text.as_str().unwrap())?; + } + let built = definitions.build(|id, _| facts["defaults"].get(id).map(|_| id.to_owned()))?; + assert!(built.missing.is_empty()); + let motion: BTreeSet<_> = built.tags["minecraft:blocks_motion_in_heightmap"] + .iter() + .map(String::as_str) + .collect(); + let no_leaves: BTreeSet<_> = built.tags["minecraft:blocks_motion_in_heightmap_no_leaves"] + .iter() + .map(String::as_str) + .collect(); + let states: Vec<_> = facts["states"] + .as_array() + .unwrap() + .iter() + .map(|a| { + let name = a[0].as_str().unwrap(); + State { + air: a[1].as_bool().unwrap(), + air_block: name == "minecraft:air", + fluid: a[2].as_bool().unwrap(), + motion: motion.contains(name), + no_leaves: no_leaves.contains(name), + } + }) + .collect(); + let fluid_resources: std::collections::BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("fluid-tags.json"))?)?; + let mut fluid_defs = TagDefinitions::default(); + for (name, text) in fluid_resources { + fluid_defs.apply_json(&name, "vanilla", &text)?; + } + let fluid_tags = + fluid_defs.build(|name, _| FluidKind::from_name(name).map(|_| name.to_owned()))?; + assert!(fluid_tags.missing.is_empty()); + let bindings = FeatureBlockBindings::with_tags(®istry, BTreeSet::new(), &built.tags)? + .with_fluid_tags(&fluid_tags.tags)?; + let tags: Vec<_> = built + .tags + .keys() + .cloned() + .chain(std::iter::once("horizon:absent".into())) + .collect(); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + let zones: Value = serde_json::from_str(&fs::read_to_string(dir.join("zones.json"))?)?; + for row in zones.as_array().unwrap() { + let zone = GenerationWriteZone::new(ChunkPos::new(n(&row[0]), n(&row[1])), n(&row[2])); + let (x, z) = (n(&row[3]), n(&row[4])); + writeln!( + out, + "zone {} {}", + zone.contains_chunk(ChunkPos::new(x, z)), + zone.contains_block(horizon_core::position::BlockPos::new(x, i32::MIN, z)) + )?; + } + let heights: Value = serde_json::from_str(&fs::read_to_string(dir.join("heights.json"))?)?; + for row in heights.as_array().unwrap() { + let y = n(&row[2]); + writeln!( + out, + "heightgate {} true {}", + UpgradeWriteHeight::new(n(&row[0]), n(&row[1])).contains(y), + UpgradeWriteHeight::BELOW_ZERO.contains(y) + )?; + } + upgrade_lifecycle(®istry, &states, &mut out)?; + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + fixture( + &serde_json::from_str(line)?, + ®istry, + &states, + &bindings, + &tags, + &mut out, + )?; + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-world/examples/feature_sort_fixture.rs b/crates/horizon-world/examples/feature_sort_fixture.rs new file mode 100644 index 000000000..6e645601c --- /dev/null +++ b/crates/horizon-world/examples/feature_sort_fixture.rs @@ -0,0 +1,50 @@ +use horizon_world::worldgen::feature_sort::{ + FeatureIdentity, FeatureSortError, build_features_per_step, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let biomes: Vec<Vec<Vec<u32>>> = serde_json::from_value(f["biomes"].clone())?; + let biomes = biomes + .into_iter() + .map(|steps| { + steps + .into_iter() + .map(|step| step.into_iter().map(FeatureIdentity).collect()) + .collect() + }) + .collect::<Vec<_>>(); + match build_features_per_step(&biomes) { + Err(FeatureSortError::Cycle) => writeln!(out, "cycle")?, + Err(error) => return Err(error.into()), + Ok(steps) => { + writeln!(out, "steps {}", steps.len())?; + for (index, step) in steps.iter().enumerate() { + writeln!(out, "step {index} {}", step.features().len())?; + for feature in step.features() { + writeln!(out, "feature {}", feature.0)?; + } + for id in f["queries"].as_array().unwrap() { + let id = FeatureIdentity(id.as_u64().unwrap() as u32); + writeln!( + out, + "index {} {}", + id.0, + step.index(id).map_or(-1, |i| i as i32) + )?; + } + } + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/fill_layer_fixture.rs b/crates/horizon-world/examples/fill_layer_fixture.rs new file mode 100644 index 000000000..d10cd2b72 --- /dev/null +++ b/crates/horizon-world/examples/fill_layer_fixture.rs @@ -0,0 +1,195 @@ +//! Feature world transport retaining ordered mutations and partial failures. +use horizon_core::random::{LegacyRandom, RandomSource, XoroshiroRandom}; +use horizon_world::{ + DATA_VERSION, + heightmap::HeightmapType, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, + worldgen::{ + anchor::WorldGenerationContext, + block_feature::{FeatureBlockBindings, FillLayerFeature}, + feature::FeatureWorld, + placement::{PlacementContext, PlacementQueryError}, + }, +}; +use serde_json::Value; +use std::{ + collections::BTreeMap, + fs, + io::{self, Write}, + path::Path, +}; +struct World<'a, W> { + states: BTreeMap<[i32; 3], BlockStateId>, + blocks: Vec<BlockStateId>, + minimum: i32, + calls: i32, + fail: i32, + reject: i32, + out: &'a mut W, +} +impl<W: Write> PlacementContext for World<'_, W> { + fn generation(&self) -> WorldGenerationContext { + WorldGenerationContext::new(self.minimum, 384, 63) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + writeln!(self.out, "min").map_err(|e| PlacementQueryError::Failed(e.to_string()))?; + let call = self.calls; + self.calls += 1; + if call == self.fail { + return Err(PlacementQueryError::Failed("minimum query failure".into())); + } + writeln!(self.out, "minimum {}", self.minimum) + .map_err(|e| PlacementQueryError::Failed(e.to_string()))?; + Ok(self.minimum) + } + fn height(&mut self, _: HeightmapType, _: i32, _: i32) -> Result<i32, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } +} +impl<W: Write> FeatureWorld for World<'_, W> { + type Error = io::Error; + fn block(&mut self, p: [i32; 3]) -> Result<BlockStateId, Self::Error> { + let call = self.calls; + self.calls += 1; + writeln!(self.out, "get {} {} {}", p[0], p[1], p[2])?; + if call == self.fail { + return Err(io::Error::other("world failure")); + } + let hash = p[0] + .wrapping_mul(31) + .wrapping_add(p[1].wrapping_mul(7)) + .wrapping_add(p[2].wrapping_mul(17)) + .rem_euclid(7) as usize; + let state = self.states.get(&p).copied().unwrap_or(self.blocks[hash]); + writeln!(self.out, "state {}", state.0)?; + Ok(state) + } + fn set_block( + &mut self, + p: [i32; 3], + state: BlockStateId, + flags: i32, + ) -> Result<bool, Self::Error> { + let call = self.calls; + self.calls += 1; + writeln!( + self.out, + "set {} {} {} {} {flags}", + p[0], p[1], p[2], state.0 + )?; + if call == self.fail { + return Err(io::Error::other("world failure")); + } + let result = self.reject == 0 || call % self.reject != 0; + if result { + self.states.insert(p, state); + } + writeln!(self.out, "written {result}")?; + Ok(result) + } +} +fn fixture( + f: &Value, + mut random: impl RandomSource, + blocks: &[BlockStateId], + bindings: &FeatureBlockBindings<'_>, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let decoded = FillLayerFeature::from_json(f["definition"].as_str().unwrap(), bindings); + match decoded { + Err(_) => writeln!(out, "decode error")?, + Ok(feature) => { + writeln!(out, "decode ok")?; + let mut world = World { + states: BTreeMap::new(), + blocks: blocks.to_vec(), + minimum: f["world_min"].as_i64().unwrap() as i32, + calls: 0, + fail: f["fail"].as_i64().unwrap() as i32, + reject: f["reject"].as_i64().unwrap() as i32, + out, + }; + let p = &f["origin"]; + let origin = [ + p[0].as_i64().unwrap() as i32, + p[1].as_i64().unwrap() as i32, + p[2].as_i64().unwrap() as i32, + ]; + for _ in 0..f["repeats"].as_u64().unwrap() { + world.calls = 0; + let result = feature.place(&mut world, origin); + match result { + Ok(value) => writeln!(world.out, "place {value}")?, + Err(_) => writeln!(world.out, "place error")?, + } + writeln!(world.out, "next {}", random.next_long())?; + for (p, state) in &world.states { + writeln!(world.out, "stored {} {} {} {}", p[0], p[1], p[2], state.0)?; + } + writeln!(world.out, "end")?; + } + } + } + writeln!(out, "tail {}", random.next_long())?; + Ok(()) +} +fn tag(v: &Value) -> Tag { + match v { + Value::String(s) => Tag::String(s.as_str().into()), + Value::Number(n) => Tag::Int(n.as_i64().unwrap() as i32), + Value::Array(a) => Tag::List(a.iter().map(tag).collect()), + Value::Object(m) => { + Tag::Compound(m.iter().map(|(k, v)| (k.as_str().into(), tag(v))).collect()) + } + _ => panic!("invalid registry metadata"), + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ("states", tag(&facts["states"])), + ("defaults", tag(&facts["defaults"])), + ]))?; + let integers = facts["integers"] + .as_array() + .unwrap() + .iter() + .map(|v| { + ( + v[0].as_str().unwrap().to_owned(), + v[1].as_str().unwrap().to_owned(), + ) + }) + .collect(); + let bindings = FeatureBlockBindings::new(®istry, integers)?; + let blocks: Vec<_> = [ + "air", + "cave_air", + "void_air", + "stone", + "water", + "oak_leaves", + "dirt", + ] + .map(|name| { + registry + .default_state(&format!("minecraft:{name}")) + .unwrap() + }) + .to_vec(); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture(&f, LegacyRandom::new(seed), &blocks, &bindings, &mut out)?; + } else { + fixture(&f, XoroshiroRandom::new(seed), &blocks, &bindings, &mut out)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/fluid_box_fixture.rs b/crates/horizon-world/examples/fluid_box_fixture.rs new file mode 100644 index 000000000..50e5b7caf --- /dev/null +++ b/crates/horizon-world/examples/fluid_box_fixture.rs @@ -0,0 +1,122 @@ +use horizon_core::geometry::{Aabb, Vec3}; +use horizon_world::fluid_box::{self, BoatFluidBoxWorld, FluidBoxWorld}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bounds(v: &Value) -> Aabb { + Aabb::new( + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])), + Vec3::new(number(&v[3]), number(&v[4]), number(&v[5])), + ) +} +fn show(b: Option<Aabb>) -> String { + let Some(b) = b else { return "none".into() }; + b.min_position() + .components() + .into_iter() + .chain(b.max_position().components()) + .map(|v| { + format!( + "{:016x}", + if v.is_nan() { + f64::NAN.to_bits() + } else { + v.to_bits() + } + ) + }) + .collect::<Vec<_>>() + .join(" ") +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + actor: Aabb, + boat: Aabb, + status: i64, +} +impl World<'_> { + fn query(&mut self, s: String) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected fluid box failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.actor = bounds(&self.f["after_actor"]); + self.boat = bounds(&self.f["after_boat"]); + self.status = self.f["after_status"].as_i64().unwrap(); + } + Ok(()) + } +} +impl FluidBoxWorld for World<'_> { + type Error = io::Error; + type Vehicle = u8; + fn bounding_box(&self) -> Aabb { + self.actor + } + fn vehicle(&mut self) -> io::Result<Option<u8>> { + self.query("vehicle".into())?; + let v = self.f["vehicle"].as_u64().unwrap() as u8; + Ok((v != 0).then_some(v)) + } + fn modify_passenger_box(&mut self, vehicle: u8, b: Aabb) -> io::Result<Option<Aabb>> { + match vehicle { + 1 => Ok(Some(b)), + 2 => fluid_box::boat_passenger_box(self, b), + 3 => { + self.query(format!("modifier {}", show(Some(b))))?; + Ok((!self.f["modified"].is_null()).then(|| bounds(&self.f["modified"]))) + } + _ => panic!("vehicle fixture"), + } + } +} +impl BoatFluidBoxWorld for World<'_> { + type Error = io::Error; + fn is_under_water(&mut self) -> io::Result<bool> { + self.query("boat-under".into())?; + Ok(self.status == 1 || self.status == 2) + } + fn boat_bounds(&self) -> Aabb { + self.boat + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + actor: bounds(&f["actor"]), + boat: bounds(&f["boat"]), + status: f["status"].as_i64().unwrap(), + }; + let result = if f["direct"].as_bool().unwrap() { + fluid_box::boat_passenger_box(&mut w, bounds(&f["input"])) + } else { + fluid_box::interaction_box(&mut w) + }; + match result { + Ok(b) => writeln!(w.out, "result {}", show(b))?, + Err(_) => writeln!(w.out, "error")?, + } + writeln!(w.out, "actor {}", show(Some(w.actor)))?; + writeln!(w.out, "boat {}", show(Some(w.boat)))?; + writeln!(w.out, "queries {}", w.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/fluid_fixture.rs b/crates/horizon-world/examples/fluid_fixture.rs new file mode 100644 index 000000000..466b85230 --- /dev/null +++ b/crates/horizon-world/examples/fluid_fixture.rs @@ -0,0 +1,138 @@ +use horizon_world::{ + DATA_VERSION, + fluid::{FluidBlockBindings, FluidHeightWorld, FluidKind, FluidState, FluidStateTable}, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +struct World<'a, W> { + out: &'a mut W, + above: FluidState, + sturdy: bool, + calls: i32, + fail: i32, +} +impl<W: Write> World<'_, W> { + fn query(&mut self, kind: &str, p: [i32; 3]) -> io::Result<()> { + writeln!(self.out, "{kind} {} {} {}", p[0], p[1], p[2])?; + let call = self.calls; + self.calls += 1; + if call == self.fail { + Err(io::Error::other("injected fluid query failure")) + } else { + Ok(()) + } + } +} +impl<W: Write> FluidHeightWorld for World<'_, W> { + type Error = io::Error; + fn fluid(&mut self, p: [i32; 3]) -> io::Result<FluidState> { + self.query("fluid", p)?; + Ok(self.above) + } + fn sturdy_down(&mut self, p: [i32; 3]) -> io::Result<bool> { + self.query("block", p)?; + Ok(self.sturdy) + } +} +fn tag(v: &Value) -> Tag { + match v { + Value::String(s) => Tag::String(s.as_str().into()), + Value::Number(n) => Tag::Int(n.as_i64().unwrap() as i32), + Value::Array(a) => Tag::List(a.iter().map(tag).collect()), + Value::Object(m) => { + Tag::Compound(m.iter().map(|(k, v)| (k.as_str().into(), tag(v))).collect()) + } + _ => panic!("invalid registry metadata"), + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ("states", tag(&facts["states"])), + ("defaults", tag(&facts["defaults"])), + ]))?; + let fluids = FluidStateTable::new(®istry)?; + let blocks = FluidBlockBindings::new(®istry)?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for first in FluidKind::ALL { + for second in FluidKind::ALL { + writeln!( + out, + "family {} {} {}", + first.name(), + second.name(), + first.same_family(second) + )?; + } + } + for i in 0..registry.len() { + let fluid = fluids.get(BlockStateId(i as u32)).unwrap(); + writeln!( + out, + "state {i} {} {} {} {} {} {} {}", + fluid.kind().name(), + fluid.amount(), + fluid.falling(), + fluid.is_full(), + fluid.is_source(), + fluid.own_height().to_bits(), + blocks.block(fluid).0 + )?; + } + for line in fs::read_to_string(dir.join("codec-inputs.txt"))?.lines() { + match FluidState::from_json(line) { + Err(_) => writeln!(out, "codec error")?, + Ok(state) => { + writeln!( + out, + "codec {} {} {} {} {}", + state.kind().name(), + state.amount(), + state.falling(), + state.is_source(), + blocks.block(state).0 + )?; + writeln!(out, "encoded {}", state.to_json()?)?; + } + } + } + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let fluid = fluids + .get(BlockStateId(f["state"].as_u64().unwrap() as u32)) + .unwrap(); + let above = fluids + .get(BlockStateId(f["above"].as_u64().unwrap() as u32)) + .unwrap(); + let p = std::array::from_fn(|i| f["position"][i].as_i64().unwrap() as i32); + let mut world = World { + out: &mut out, + above, + sturdy: f["sturdy"].as_bool().unwrap(), + calls: 0, + fail: f["fail"].as_i64().unwrap() as i32, + }; + for camera in [false, true] { + let result = if camera { + fluid.camera_height_at(&mut world, p) + } else { + fluid.height_at(&mut world, p) + }; + match result { + Ok(value) => writeln!(world.out, "height {}", value.to_bits())?, + Err(_) => writeln!(world.out, "height error")?, + } + } + writeln!(world.out, "calls {}", world.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/fluid_flow_fixture.rs b/crates/horizon-world/examples/fluid_flow_fixture.rs new file mode 100644 index 000000000..4da9f6a07 --- /dev/null +++ b/crates/horizon-world/examples/fluid_flow_fixture.rs @@ -0,0 +1,113 @@ +use horizon_core::{geometry::Direction, position::BlockPos}; +use horizon_world::{ + fluid::FluidState, + fluid_flow::{self, FluidFlowWorld}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn pos(p: BlockPos) -> String { + format!("{} {} {}", p.x, p.y, p.z) +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + fluids: Vec<FluidState>, +} +impl World<'_> { + fn query(&mut self, s: String) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + Err(io::Error::other("injected flow failure")) + } else { + Ok(()) + } + } + fn cell(&self, p: BlockPos) -> usize { + self.f["cells"] + .get(pos(p)) + .unwrap_or(&self.f["default"]) + .as_u64() + .unwrap() as usize + } +} +impl FluidFlowWorld for World<'_> { + type Error = io::Error; + type Block = usize; + fn fluid(&mut self, p: BlockPos) -> io::Result<FluidState> { + self.query(format!("fluid {}", pos(p)))?; + Ok(self.fluids[self.cell(p)]) + } + fn block(&mut self, p: BlockPos) -> io::Result<usize> { + self.query(format!("block {}", pos(p)))?; + Ok(self.cell(p)) + } + fn blocks_fluid_flow(&self, s: usize) -> bool { + self.f["states"][s]["blocks_flow"].as_bool().unwrap() + } + fn is_ice_class(&self, s: usize) -> bool { + self.f["states"][s]["ice"].as_bool().unwrap() + } + fn is_face_sturdy(&mut self, s: usize, p: BlockPos, d: Direction) -> io::Result<bool> { + let name = ["down", "up", "north", "south", "west", "east"][d as usize]; + self.query(format!("sturdy {} {name}", pos(p)))?; + Ok(self.f["states"][s]["faces"].as_u64().unwrap() & (1 << (d as u8)) != 0) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let fluids = f["states"] + .as_array() + .unwrap() + .iter() + .map(|s| FluidState::from_json(&s["fluid"].to_string())) + .collect::<io::Result<Vec<_>>>()?; + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + fluids, + }; + let a = &f["position"]; + let p = BlockPos::new( + a[0].as_i64().unwrap() as i32, + a[1].as_i64().unwrap() as i32, + a[2].as_i64().unwrap() as i32, + ); + let root = FluidState::from_json(&f["root"].to_string())?; + if f["mode"].as_str().unwrap() == "flow" { + match fluid_flow::flow_at(&mut w, root, p) { + Ok(v) => writeln!( + w.out, + "flow {:016x} {:016x} {:016x}", + v.x.to_bits(), + v.y.to_bits(), + v.z.to_bits() + )?, + Err(_) => writeln!(w.out, "error")?, + } + } else { + match fluid_flow::solid_face( + &mut w, + root.kind(), + p, + Direction::ALL[f["direction"].as_u64().unwrap() as usize], + ) { + Ok(v) => writeln!(w.out, "face {v}")?, + Err(_) => writeln!(w.out, "error")?, + } + } + writeln!(w.out, "queries {}", w.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/fluid_occupancy_fixture.rs b/crates/horizon-world/examples/fluid_occupancy_fixture.rs new file mode 100644 index 000000000..bb178e300 --- /dev/null +++ b/crates/horizon-world/examples/fluid_occupancy_fixture.rs @@ -0,0 +1,177 @@ +use horizon_core::geometry::{Aabb, Vec3}; +use horizon_world::{ + chunk::BlockSection, + fluid_occupancy::*, + nbt::{self, Limits}, + registry::{BlockRegistry, BlockStateId}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bounds(v: &Value) -> Aabb { + Aabb::new( + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])), + Vec3::new(number(&v[3]), number(&v[4]), number(&v[5])), + ) +} +struct World<'a, 'r> { + out: &'a mut dyn Write, + calls: i64, + fail: i64, + min: i32, + height: i32, + sections: Vec<BlockSection<'r>>, +} +impl World<'_, '_> { + fn query(&mut self, s: impl AsRef<str>) -> io::Result<()> { + writeln!(self.out, "{}", s.as_ref())?; + let n = self.calls; + self.calls += 1; + if n == self.fail { + Err(io::Error::other("injected occupancy failure")) + } else { + Ok(()) + } + } +} +impl FluidOccupancyWorld for World<'_, '_> { + type Error = io::Error; + type Chunk = (); + fn minimum_section_y(&mut self) -> io::Result<i32> { + self.query("min-section")?; + Ok(self.min >> 4) + } + fn maximum_section_y(&mut self) -> io::Result<i32> { + self.query("max-section")?; + Ok((self.min + self.height - 1) >> 4) + } + fn chunk(&mut self, x: i32, z: i32) -> io::Result<()> { + self.query(format!("chunk {x} {z}")) + } + fn section(&mut self, _: (), y: i32) -> io::Result<&BlockSection<'_>> { + self.query(format!("section {y}"))?; + Ok(&self.sections[(y - (self.min >> 4)) as usize]) + } + fn minimum_y(&mut self) -> io::Result<i32> { + self.query("min-y")?; + Ok(self.min) + } + fn maximum_y(&mut self) -> io::Result<i32> { + self.query("max-y")?; + Ok(self.min + self.height - 1) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let registry = BlockRegistry::from_nbt( + &nbt::read_named( + &fs::read(dir.join("block-registry.nbt"))?, + Limits::default(), + )? + .0 + .tag, + )?; + let fluid = FluidPresence::new(®istry)?; + assert!(fluid.has_fluid(BlockStateId(u32::MAX)).is_err()); + assert!(std::ptr::eq(fluid.registry(), ®istry)); + { + let air = registry.default_state("minecraft:air").unwrap(); + let mut sink = io::sink(); + let mut w = World { + out: &mut sink, + calls: 0, + fail: -1, + min: 0, + height: 16, + sections: vec![BlockSection::uniform(air, ®istry)?], + }; + let bad = Aabb::new(Vec3::new(f64::NAN, 0.0, 0.0), Vec3::new(1.0, 1.0, 1.0)); + assert!(matches!( + contains_any_liquid(&mut w, &fluid, bad, 100), + Err(FluidOccupancyError::NonFiniteBounds) + )); + assert_eq!(w.calls, 0); + let box_ = Aabb::new(Vec3::ZERO, Vec3::new(1.0, 1.0, 1.0)); + assert!(matches!( + contains_any_liquid(&mut w, &fluid, box_, 0), + Err(FluidOccupancyError::BudgetExceeded) + )); + assert_eq!(w.calls, 2); + w.calls = 0; + assert!(matches!( + contains_any_liquid(&mut w, &fluid, box_, 1), + Err(FluidOccupancyError::BudgetExceeded) + )); + assert_eq!(w.calls, 3); + assert!(!contains_any_liquid(&mut w, &fluid, box_, 2)?); + let foreign = BlockRegistry::from_nbt( + &nbt::read_named( + &fs::read(dir.join("block-registry.nbt"))?, + Limits::default(), + )? + .0 + .tag, + )?; + let foreign_presence = FluidPresence::new(&foreign)?; + assert!(matches!( + contains_any_liquid(&mut w, &foreign_presence, box_, 100), + Err(FluidOccupancyError::Data(_)) + )); + } + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for i in 0..registry.len() { + writeln!( + out, + "state {i} {}", + fluid.has_fluid(BlockStateId(i as u32))? + )?; + } + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let min = f["min"].as_i64().unwrap() as i32; + let height = f["height"].as_i64().unwrap() as i32; + let base = BlockStateId(f["base"].as_u64().unwrap() as u32); + let mut w = World { + out: &mut out, + calls: 0, + fail: -1, + min, + height, + sections: (0..height / 16) + .map(|_| BlockSection::uniform(base, ®istry)) + .collect::<io::Result<Vec<_>>>()?, + }; + for op in f["ops"].as_array().unwrap() { + for v in op["writes"].as_array().unwrap() { + let x = v[0].as_i64().unwrap() as i32; + let y = v[1].as_i64().unwrap() as i32; + let z = v[2].as_i64().unwrap() as i32; + w.sections[((y - min) >> 4) as usize].set( + ((y & 15) * 256 + (z & 15) * 16 + (x & 15)) as usize, + BlockStateId(v[3].as_u64().unwrap() as u32), + )?; + } + if op["compact"].as_bool().unwrap() { + for section in &mut w.sections { + section.compact()?; + } + } + w.calls = 0; + w.fail = op["fail"].as_i64().unwrap(); + match contains_any_liquid(&mut w, &fluid, bounds(&op["bounds"]), 1000000) { + Ok(b) => writeln!(w.out, "result {b}")?, + Err(FluidOccupancyError::World(_)) => writeln!(w.out, "error")?, + Err(e) => return Err(e.into()), + }; + writeln!(w.out, "queries {}", w.calls)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/fluid_shape_fixture.rs b/crates/horizon-world/examples/fluid_shape_fixture.rs new file mode 100644 index 000000000..7e42203ec --- /dev/null +++ b/crates/horizon-world/examples/fluid_shape_fixture.rs @@ -0,0 +1,97 @@ +use horizon_core::{ + geometry::{Axis, VoxelShape}, + position::BlockPos, +}; +use horizon_world::{ + fluid::{FluidHeightWorld, FluidState}, + fluid_shape::FluidShapeCache, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +struct World<'a> { + out: &'a mut dyn Write, + calls: i64, + fail: i64, + above: FluidState, +} +impl FluidHeightWorld for World<'_> { + type Error = io::Error; + fn fluid(&mut self, p: [i32; 3]) -> io::Result<FluidState> { + writeln!(self.out, "fluid {} {} {}", p[0], p[1], p[2])?; + let call = self.calls; + self.calls += 1; + if call == self.fail { + Err(io::Error::other("injected fluid height failure")) + } else { + Ok(self.above) + } + } + fn sturdy_down(&mut self, _: [i32; 3]) -> io::Result<bool> { + panic!("ray shape does not use camera immersion support") + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut cache = FluidShapeCache::default(); + let mut identities = Vec::<VoxelShape>::new(); + for op in f["ops"].as_array().unwrap() { + let state = FluidState::from_json(&op["state"].to_string())?; + let above = FluidState::from_json(&op["above"].to_string())?; + let p = &op["position"]; + let p = BlockPos::new( + p[0].as_i64().unwrap() as i32, + p[1].as_i64().unwrap() as i32, + p[2].as_i64().unwrap() as i32, + ); + let mut world = World { + out: &mut out, + calls: 0, + fail: op["fail"].as_i64().unwrap(), + above, + }; + match cache.shape(&mut world, state, p) { + Ok(s) => { + let id = identities + .iter() + .position(|old| old.same_identity(&s)) + .unwrap_or_else(|| { + identities.push(s.clone()); + identities.len() - 1 + }); + writeln!(world.out, "identity {id}")?; + writeln!( + world.out, + "shape {} {} {}", + s.same_identity(&VoxelShape::empty()), + s.same_identity(&VoxelShape::block()), + s.boxes().len() + )?; + for b in s.boxes() { + writeln!( + world.out, + "box {:016x} {:016x} {:016x} {:016x} {:016x} {:016x}", + b.min(Axis::X).to_bits(), + b.min(Axis::Y).to_bits(), + b.min(Axis::Z).to_bits(), + b.max(Axis::X).to_bits(), + b.max(Axis::Y).to_bits(), + b.max(Axis::Z).to_bits() + )?; + } + } + Err(_) => writeln!(world.out, "error")?, + } + writeln!(world.out, "cached {}", cache.cached_states())?; + writeln!(world.out, "queries {}", world.calls)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/food_fixture.rs b/crates/horizon-world/examples/food_fixture.rs new file mode 100644 index 000000000..d0645ea44 --- /dev/null +++ b/crates/horizon-world/examples/food_fixture.rs @@ -0,0 +1,145 @@ +use horizon_world::food::{Difficulty, FoodData, FoodWorld}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +fn state(v: &Value) -> FoodData { + FoodData { + food: v["food"].as_i64().unwrap() as i32, + saturation: single(&v["saturation"]), + exhaustion: single(&v["exhaustion"]), + timer: v["timer"].as_i64().unwrap() as i32, + } +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + changed: bool, +} +impl World<'_> { + fn query(&mut self, food: &mut FoodData, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected food callback failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + *food = state(&self.f["after"]); + self.changed = true; + } + Ok(()) + } + fn world(&self) -> &Value { + &self.f[if self.changed { "after_world" } else { "world" }] + } +} +impl FoodWorld for World<'_> { + type Error = io::Error; + type Level = (); + fn level(&mut self, f: &mut FoodData) -> io::Result<()> { + self.query(f, "level") + } + fn difficulty(&mut self, _: (), f: &mut FoodData) -> io::Result<Difficulty> { + self.query(f, "difficulty")?; + Ok([ + Difficulty::Peaceful, + Difficulty::Easy, + Difficulty::Normal, + Difficulty::Hard, + ][self.world()["difficulty"].as_u64().unwrap() as usize]) + } + fn natural_regeneration(&mut self, _: (), f: &mut FoodData) -> io::Result<bool> { + self.query(f, "rules")?; + self.query(f, "regeneration")?; + Ok(self.world()["regen"].as_bool().unwrap()) + } + fn is_hurt(&mut self, f: &mut FoodData) -> io::Result<bool> { + self.query(f, "is-hurt")?; + Ok(self.world()["hurt"].as_bool().unwrap()) + } + fn heal(&mut self, f: &mut FoodData, v: f32) -> io::Result<()> { + self.query(f, &format!("heal {:08x}", bits(v))) + } + fn health(&mut self, f: &mut FoodData) -> io::Result<f32> { + self.query(f, "health")?; + Ok(single(&self.world()["health"])) + } + fn hurt_starvation(&mut self, _: (), f: &mut FoodData, v: f32) -> io::Result<()> { + self.query(f, "damage-sources")?; + self.query(f, "starve-source")?; + self.query(f, &format!("hurt {:08x}", bits(v))) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut food = state(&f["initial"]); + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + changed: false, + }; + let mut error = false; + for op in f["ops"].as_array().unwrap() { + match op["mode"].as_str().unwrap() { + "eat" => food.eat( + op["nutrition"].as_i64().unwrap() as i32, + single(&op["amount"]), + ), + "properties" => food.eat_properties( + op["nutrition"].as_i64().unwrap() as i32, + single(&op["amount"]), + ), + "exhaust" => food.add_exhaustion(single(&op["amount"])), + "food" => food.food = op["nutrition"].as_i64().unwrap() as i32, + "saturation" => food.saturation = single(&op["amount"]), + "tick" => { + if food.tick(&mut w).is_err() { + error = true; + break; + } + } + _ => panic!("mode"), + } + writeln!( + w.out, + "state {} {:08x} {:08x} {} {} {}", + food.food, + bits(food.saturation), + bits(food.exhaustion), + food.timer, + food.has_enough_food(), + food.needs_food() + )?; + } + writeln!(w.out, "result {}", if error { "error" } else { "ok" })?; + writeln!( + w.out, + "final {} {:08x} {:08x} {}", + food.food, + bits(food.saturation), + bits(food.exhaustion), + food.timer + )?; + writeln!(w.out, "queries {}", w.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/food_properties_fixture.rs b/crates/horizon-world/examples/food_properties_fixture.rs new file mode 100644 index 000000000..59524b0dc --- /dev/null +++ b/crates/horizon-world/examples/food_properties_fixture.rs @@ -0,0 +1,176 @@ +use horizon_core::{ + geometry::Vec3, + random::{LegacyRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::{ + food::FoodData, + food_properties::{ConsumptionSound, FoodConsumptionWorld, FoodProperties, SoundCategory}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn fl(v: &Value, k: &str) -> f32 { + f32::from_bits(v[k].as_u64().unwrap() as u32) +} +fn bits(f: f32) -> u32 { + if f.is_nan() { 0x7fc00000 } else { f.to_bits() } +} +struct World<'a, R> { + f: Value, + out: &'a mut dyn Write, + foods: [FoodData; 2], + random: [R; 2], + position: Vec3, + changed: bool, + calls: i32, +} +impl<R: RandomSource> World<'_, R> { + fn config(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn reset(&mut self) { + let c = self.config().clone(); + let p = &c["position"]; + self.position = Vec3::new( + p[0].as_f64().unwrap(), + p[1].as_f64().unwrap(), + p[2].as_f64().unwrap(), + ); + for i in 0..2 { + let f = &c["foods"][i]; + self.foods[i] = FoodData { + food: n(f, "food"), + saturation: fl(f, "saturation"), + exhaustion: fl(f, "exhaustion"), + timer: n(f, "timer"), + }; + } + if c["reseed"].as_bool().unwrap() { + for i in 0..2 { + self.random[i].set_seed(c["seeds"][i].as_i64().unwrap()); + } + } + } + fn all(&mut self) { + writeln!( + self.out, + "state {} {} {} {}", + self.calls, + self.changed, + n(self.config(), "random"), + n(self.config(), "food") + ) + .unwrap(); + for (i, f) in self.foods.iter().enumerate() { + writeln!( + self.out, + "food {i} {} {} {} {}", + f.food, + bits(f.saturation), + bits(f.exhaustion), + f.timer + ) + .unwrap(); + } + } + fn event(&mut self, name: String) -> Result<(), &'static str> { + writeln!(self.out, "event {name}").unwrap(); + let index = self.calls; + self.calls += 1; + self.all(); + if index == n(&self.f, "fail") { + return Err("callback"); + } + if index == n(&self.f, "mutate") { + self.changed = true; + self.reset(); + } + Ok(()) + } +} +impl<R: RandomSource> FoodConsumptionWorld for World<'_, R> { + type Error = &'static str; + type Level = (); + type Sound = u8; + type Random = usize; + type Source = R; + fn get_random(&mut self) -> Result<usize, Self::Error> { + self.event("random".into())?; + Ok(n(self.config(), "random") as usize) + } + fn random_source(&mut self, r: usize) -> &mut R { + &mut self.random[r] + } + fn position(&self) -> Vec3 { + self.position + } + fn is_player(&self) -> bool { + self.f["player"].as_bool().unwrap() + } + fn food_data(&mut self) -> Result<&mut FoodData, Self::Error> { + self.event("food-data".into())?; + let i = n(self.config(), "food") as usize; + Ok(&mut self.foods[i]) + } + fn play_sound(&mut self, s: ConsumptionSound<(), u8>) -> Result<(), Self::Error> { + let category = match s.category { + SoundCategory::Neutral => 6, + SoundCategory::Players => 7, + }; + self.event(format!( + "sound {} {} {} {} {} {} {}", + s.sound, + category, + s.position.x.to_bits(), + s.position.y.to_bits(), + s.position.z.to_bits(), + bits(s.volume), + bits(s.pitch) + )) + } +} +fn run<R: RandomSource>(f: Value, out: &mut dyn Write, make: fn(i64) -> R) { + let random = std::array::from_fn(|i| make(f["seeds"][i].as_i64().unwrap())); + let properties = FoodProperties { + nutrition: n(&f, "nutrition"), + saturation: fl(&f, "saturation"), + can_always_eat: f["always"].as_bool().unwrap(), + }; + let mut w = World { + f, + out, + foods: [FoodData::default(); 2], + random, + position: Vec3::ZERO, + changed: false, + calls: 0, + }; + w.reset(); + w.all(); + let result = properties.on_consume(&mut w, (), 0, 1); + writeln!(w.out, "result {}", result.err().unwrap_or("ok")).unwrap(); + w.all(); + for (i, r) in w.random.iter_mut().enumerate() { + writeln!(w.out, "random {i} {} {}", r.next_long(), r.next_long()).unwrap(); + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + if f["xor"].as_bool().unwrap() { + run(f, &mut out, XoroshiroRandom::new); + } else { + run(f, &mut out, LegacyRandom::new); + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/food_storage_fixture.rs b/crates/horizon-world/examples/food_storage_fixture.rs new file mode 100644 index 000000000..4aafe920e --- /dev/null +++ b/crates/horizon-world/examples/food_storage_fixture.rs @@ -0,0 +1,114 @@ +use horizon_world::{ + food::FoodData, + nbt::{Compound, Tag}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +const KEYS: [&str; 4] = [ + "foodLevel", + "foodTickTimer", + "foodSaturationLevel", + "foodExhaustionLevel", +]; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +fn tag(v: &Value) -> Option<Tag> { + let value = &v["value"]; + Some(match v["type"].as_i64().unwrap() { + 0 => return None, + 1 => Tag::Byte(value.as_i64().unwrap() as i8), + 2 => Tag::Short(value.as_i64().unwrap() as i16), + 3 => Tag::Int(value.as_i64().unwrap() as i32), + 4 => Tag::Long(value.as_str().unwrap().parse().unwrap()), + 5 => { + let f = single(value); + Tag::Float(if f == 0.0 { 0 } else { f.to_bits() }) + } + 6 => { + let f = f64::from_bits(u64::from_str_radix(value.as_str().unwrap(), 16).unwrap()); + Tag::Double(if f == 0.0 { 0 } else { f.to_bits() }) + } + 7 => Tag::ByteArray(vec![1]), + 8 => Tag::String("17".into()), + 9 => Tag::List(vec![]), + 10 => Tag::Compound(Compound::new()), + 11 => Tag::IntArray(vec![2]), + 12 => Tag::LongArray(vec![3]), + _ => panic!("tag type"), + }) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut food = FoodData { + food: -9, + saturation: -7., + timer: 83, + exhaustion: 99., + }; + if f["mode"] == "read" { + let mut t = Compound::new(); + for (key, v) in KEYS.iter().zip(f["tags"].as_array().unwrap()) { + if let Some(v) = tag(v) { + t.insert((*key).into(), v); + } + } + food.read_nbt(&t); + } else { + food = FoodData { + food: f["food"].as_i64().unwrap() as i32, + timer: f["timer"].as_i64().unwrap() as i32, + saturation: single(&f["saturation"]), + exhaustion: single(&f["exhaustion"]), + }; + } + writeln!( + out, + "state {} {} {:08x} {:08x}", + food.food, + food.timer, + bits(food.saturation), + bits(food.exhaustion) + )?; + let mut saved = Compound::new(); + saved.insert("unrelated".into(), Tag::Int(42)); + saved.insert("foodLevel".into(), Tag::String("replace".into())); + food.write_nbt(&mut saved); + let Tag::Int(unrelated) = saved[&"unrelated".into()] else { + panic!("preserve unrelated") + }; + writeln!(out, "saved {} {unrelated}", saved.len())?; + for key in KEYS { + match saved[&key.into()] { + Tag::Int(v) => writeln!(out, "tag 3 {v}")?, + Tag::Float(v) => writeln!(out, "tag 5 {:08x}", bits(f32::from_bits(v)))?, + _ => panic!("saved type"), + } + } + food.read_nbt(&saved); + writeln!( + out, + "roundtrip {} {} {:08x} {:08x}", + food.food, + food.timer, + bits(food.saturation), + bits(food.exhaustion) + )?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/ground_state_fixture.rs b/crates/horizon-world/examples/ground_state_fixture.rs new file mode 100644 index 000000000..7b41515b3 --- /dev/null +++ b/crates/horizon-world/examples/ground_state_fixture.rs @@ -0,0 +1,117 @@ +use horizon_core::{ + geometry::{Aabb, Axis, Vec3}, + position::BlockPos, +}; +use horizon_world::ground_support::GroundState; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vector(v: &Value) -> Vec3 { + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn position(v: &Value) -> Option<BlockPos> { + if v.is_null() { + None + } else { + Some(BlockPos::new( + v[0].as_i64().unwrap() as i32, + v[1].as_i64().unwrap() as i32, + v[2].as_i64().unwrap() as i32, + )) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let initial = &f["initial"]; + let mut state = GroundState { + on_ground: initial["grounded"].as_bool().unwrap(), + horizontal_collision: initial["horizontal"].as_bool().unwrap(), + on_ground_no_blocks: initial["empty"].as_bool().unwrap(), + supporting_block: position(&initial["support"]), + }; + for op in f["ops"].as_array().unwrap() { + let v = &op["box"]; + let bounds = Aabb::new( + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])), + Vec3::new(number(&v[3]), number(&v[4]), number(&v[5])), + ); + let movement = if op["movement"].is_null() { + None + } else { + Some(vector(&op["movement"])) + }; + let mut calls = 0i32; + let find = |b: Aabb| -> io::Result<Option<BlockPos>> { + writeln!( + out, + "find {:016x} {:016x} {:016x} {:016x} {:016x} {:016x}", + bits(b.min(Axis::X)), + bits(b.min(Axis::Y)), + bits(b.min(Axis::Z)), + bits(b.max(Axis::X)), + bits(b.max(Axis::Y)), + bits(b.max(Axis::Z)) + )?; + let call = calls; + calls += 1; + if call == op["fail"].as_i64().unwrap() as i32 { + return Err(io::Error::other("injected support query failure")); + } + Ok(position(&op["results"][call as usize])) + }; + let ground = op["grounded"].as_bool().unwrap(); + let result = match op["mode"].as_u64().unwrap() { + 0 => state.check_support(ground, bounds, movement, find), + 1 => state.set_with_movement( + ground, + state.horizontal_collision, + bounds, + movement, + find, + ), + 2 => state.set_with_movement( + ground, + op["horizontal"].as_bool().unwrap(), + bounds, + movement, + find, + ), + _ => panic!("unknown ground state mode"), + }; + writeln!( + out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!( + out, + "flags {} {} {}", + state.on_ground, state.horizontal_collision, state.on_ground_no_blocks + )?; + if let Some(p) = state.supporting_block { + writeln!(out, "support {} {} {}", p.x, p.y, p.z)?; + } else { + writeln!(out, "support none")?; + } + writeln!(out, "queries {calls}")?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/height_provider_fixture.rs b/crates/horizon-world/examples/height_provider_fixture.rs new file mode 100644 index 000000000..7ada87a18 --- /dev/null +++ b/crates/horizon-world/examples/height_provider_fixture.rs @@ -0,0 +1,50 @@ +//! Transport for anchored provider samples and subsequent random state. +use horizon_core::random::{LegacyRandom, RandomSource, XoroshiroRandom}; +use horizon_world::worldgen::{anchor::WorldGenerationContext, height_provider::HeightProvider}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +fn fixture( + f: &Value, + mut random: impl RandomSource, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let c = &f["context"]; + let context = WorldGenerationContext::new(n(&c[0]), n(&c[1]), n(&c[2])); + match HeightProvider::from_json(f["definition"].as_str().unwrap()) { + Ok(provider) => { + writeln!(out, "decode ok")?; + for _ in 0..f["samples"].as_u64().unwrap() { + match provider.sample(&mut random, context) { + Ok(value) => writeln!(out, "sample {value}")?, + Err(_) => writeln!(out, "sample error")?, + } + writeln!(out, "next {}", random.next_long())?; + } + } + Err(_) => writeln!(out, "decode error")?, + } + writeln!(out, "tail {}", random.next_long())?; + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture(&f, LegacyRandom::new(seed), &mut out)?; + } else { + fixture(&f, XoroshiroRandom::new(seed), &mut out)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/heightmap_fixture.rs b/crates/horizon-world/examples/heightmap_fixture.rs new file mode 100644 index 000000000..35d7bc5c2 --- /dev/null +++ b/crates/horizon-world/examples/heightmap_fixture.rs @@ -0,0 +1,253 @@ +//! Original differential-test transport. State air/fluid facts are private inputs; +//! tag predicates are resolved by the Rust loader, not imported oracle results. +use horizon_world::heightmap::{Heightmap, HeightmapChunk, HeightmapState, HeightmapType}; +use horizon_world::worldgen::tags::TagDefinitions; +use serde_json::Value; +use std::{ + cell::RefCell, + collections::BTreeSet, + fs, + io::{self, Write}, + path::Path, +}; + +#[derive(Clone, Copy)] +struct State { + air: bool, + air_block: bool, + fluid: bool, + motion: bool, + no_leaves: bool, +} +impl HeightmapState for State { + fn is_air(self) -> bool { + self.air + } + fn is_air_block(self) -> bool { + self.air_block + } + fn has_fluid(self) -> bool { + self.fluid + } + fn blocks_motion_in_heightmap(self) -> bool { + self.motion + } + fn blocks_motion_in_heightmap_no_leaves(self) -> bool { + self.no_leaves + } +} +struct Chunk<'a> { + min: i32, + height: i32, + blocks: Vec<usize>, + counts: Vec<i32>, + states: &'a [State], + air: usize, + void_air: usize, + trace: bool, + reads: RefCell<Vec<String>>, +} +impl Chunk<'_> { + fn index(&self, x: i32, y: i32, z: i32) -> usize { + ((y - self.min) * 256 + (z & 15) * 16 + (x & 15)) as usize + } + fn write(&mut self, x: i32, y: i32, z: i32, id: usize) { + let index = self.index(x, y, z); + let old = self.blocks[index]; + self.counts[((y - self.min) >> 4) as usize] += + i32::from(!self.states[id].air) - i32::from(!self.states[old].air); + self.blocks[index] = id; + } +} +impl HeightmapChunk for Chunk<'_> { + type State = State; + fn min_y(&self) -> i32 { + self.min + } + fn height(&self) -> i32 { + self.height + } + fn highest_section_y(&self) -> i32 { + self.counts + .iter() + .rposition(|&n| n != 0) + .map_or(self.min, |i| self.min + i as i32 * 16) + } + fn block_state(&self, x: i32, y: i32, z: i32) -> State { + let id = if y < self.min || y >= self.min + self.height { + self.void_air + } else if self.counts[((y - self.min) >> 4) as usize] == 0 { + self.air + } else { + self.blocks[self.index(x, y, z)] + }; + if self.trace { + self.reads + .borrow_mut() + .push(format!("read {x} {y} {z} {id}")); + } + self.states[id] + } +} +fn num(value: &Value) -> i32 { + value.as_i64().unwrap() as i32 +} +fn fixture( + input: Value, + states: &[State], + defaults: &Value, + out: &mut impl Write, +) -> io::Result<()> { + let min = num(&input["min"]); + let height = num(&input["height"]); + let air = num(&defaults["minecraft:air"]) as usize; + let mut chunk = Chunk { + min, + height, + blocks: vec![air; (height * 256) as usize], + counts: vec![0; (height / 16) as usize], + states, + air, + void_air: num(&defaults["minecraft:void_air"]) as usize, + trace: input["trace"].as_bool().unwrap(), + reads: RefCell::default(), + }; + writeln!(out, "chunk {min} {height}")?; + for a in input["initial"].as_array().unwrap() { + chunk.write(num(&a[0]), num(&a[1]), num(&a[2]), num(&a[3]) as usize); + } + let mut maps = HeightmapType::ALL.map(|kind| Heightmap::new(kind, min, height).unwrap()); + for a in input["ops"].as_array().unwrap() { + match a[0].as_str().unwrap() { + "set" | "update" => { + let (x, y, z, id) = (num(&a[1]), num(&a[2]), num(&a[3]), num(&a[4]) as usize); + let mask = if a[0] == "set" { + chunk.write(x, y, z, id); + num(&a[5]) + } else { + 1 << num(&a[5]) + }; + for (t, map) in maps.iter_mut().enumerate() { + if mask & (1 << t) != 0 { + match map.update(&chunk, x, y, z, states[id]) { + Ok(changed) => writeln!(out, "update {t} {changed}")?, + Err(_) => writeln!(out, "update {t} error")?, + } + } + } + } + "prime" => { + let mask = num(&a[1]); + let mut selected: Vec<_> = maps + .iter_mut() + .enumerate() + .filter_map(|(t, map)| (mask & (1 << t) != 0).then_some(map)) + .collect(); + Heightmap::prime(&chunk, &mut selected).unwrap(); + writeln!(out, "prime {mask}")?; + } + "raw" => { + let t = num(&a[1]) as usize; + let words: Vec<_> = a[2] + .as_array() + .unwrap() + .iter() + .map(|word| u64::from_str_radix(word.as_str().unwrap(), 16).unwrap()) + .collect(); + maps[t].set_raw_data(&chunk, &words).unwrap(); + writeln!(out, "raw {t}")?; + } + "query" => { + let (x, z) = (num(&a[1]), num(&a[2])); + for (t, map) in maps.iter().enumerate() { + match map.first_available(x, z) { + Ok(first) => writeln!( + out, + "height {t} {x} {z} {first} {}", + map.highest_taken(x, z).unwrap() + )?, + Err(_) => writeln!(out, "height {t} {x} {z} error")?, + } + } + } + "dump" => { + writeln!(out, "highest_section {}", chunk.highest_section_y())?; + for (t, map) in maps.iter().enumerate() { + writeln!(out, "words {t} {}", map.raw_data().len())?; + for word in map.raw_data() { + writeln!(out, "{word:x}")?; + } + } + } + _ => panic!("unknown fixture operation"), + } + for read in chunk.reads.borrow_mut().drain(..) { + writeln!(out, "{read}")?; + } + } + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let directory = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&directory); + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + let tags: Value = serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?; + let mut definitions = TagDefinitions::default(); + for (name, text) in tags.as_object().unwrap() { + definitions.apply_json(name, "vanilla", text.as_str().unwrap())?; + } + let built = definitions.build(|id, _| facts["defaults"].get(id).map(|_| id.to_owned()))?; + assert!(built.missing.is_empty()); + let motion: BTreeSet<_> = built.tags["minecraft:blocks_motion_in_heightmap"] + .iter() + .map(String::as_str) + .collect(); + let no_leaves: BTreeSet<_> = built.tags["minecraft:blocks_motion_in_heightmap_no_leaves"] + .iter() + .map(String::as_str) + .collect(); + let states: Vec<_> = facts["states"] + .as_array() + .unwrap() + .iter() + .map(|a| { + let name = a[0].as_str().unwrap(); + State { + air: a[1].as_bool().unwrap(), + air_block: name == "minecraft:air", + fluid: a[2].as_bool().unwrap(), + motion: motion.contains(name), + no_leaves: no_leaves.contains(name), + } + }) + .collect(); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for (t, kind) in HeightmapType::ALL.iter().enumerate() { + writeln!( + out, + "type {t} {} {} {}", + kind.name(), + kind.send_to_client(), + kind.keep_after_worldgen() + )?; + } + for (id, &state) in states.iter().enumerate() { + let mask = HeightmapType::ALL + .iter() + .enumerate() + .fold(0, |mask, (t, kind)| { + mask | if kind.is_opaque(state) { 1 << t } else { 0 } + }); + writeln!(out, "predicate {id} {mask}")?; + } + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + fixture( + serde_json::from_str(line)?, + &states, + &facts["defaults"], + &mut out, + )?; + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-world/examples/interaction_shape_fixture.rs b/crates/horizon-world/examples/interaction_shape_fixture.rs new file mode 100644 index 000000000..60b9742b8 --- /dev/null +++ b/crates/horizon-world/examples/interaction_shape_fixture.rs @@ -0,0 +1,176 @@ +use horizon_core::{ + geometry::{Aabb, Axis, ShapeOp, Vec3, VoxelShape}, + position::BlockPos, +}; +use horizon_world::{ + interaction_shapes::InteractionShapes, + nbt::{self, Limits, Tag}, + registry::{BlockRegistry, BlockStateId}, + world_ray::{RayBlockMode, RayWorld, clip_with_interaction}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vector(v: &Value) -> Vec3 { + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn shape(v: &Value) -> Result<VoxelShape, Box<dyn std::error::Error>> { + let mut result = VoxelShape::empty(); + for b in v.as_array().unwrap() { + result = result.join( + &VoxelShape::from_box(Aabb::new( + Vec3::new(number(&b[0]), number(&b[1]), number(&b[2])), + Vec3::new(number(&b[3]), number(&b[4]), number(&b[5])), + ))?, + ShapeOp::OR, + )?; + } + Ok(result) +} +struct World<'a, 'r> { + shapes: &'a InteractionShapes<'r>, +} +impl RayWorld for World<'_, '_> { + type Error = io::Error; + type Block = BlockStateId; + type Fluid = (); + fn block_state(&mut self, _: BlockPos) -> io::Result<BlockStateId> { + panic!("direct interaction clip") + } + fn fluid_state(&mut self, _: BlockPos) -> io::Result<()> { + panic!("direct interaction clip") + } + fn block_shape( + &mut self, + _: BlockStateId, + _: BlockPos, + _: RayBlockMode, + ) -> io::Result<VoxelShape> { + panic!("direct interaction clip") + } + fn interaction_shape(&mut self, s: BlockStateId, _: BlockPos) -> io::Result<VoxelShape> { + Ok(self.shapes.shape(s)?.clone()) + } + fn fluid_is_source(&mut self, _: ()) -> io::Result<bool> { + panic!("direct interaction clip") + } + fn fluid_is_empty(&mut self, _: ()) -> io::Result<bool> { + panic!("direct interaction clip") + } + fn fluid_is_water(&mut self, _: ()) -> io::Result<bool> { + panic!("direct interaction clip") + } + fn fluid_shape(&mut self, _: (), _: BlockPos) -> io::Result<VoxelShape> { + panic!("direct interaction clip") + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + let read = |n: &str| -> Result<Tag, Box<dyn std::error::Error>> { + Ok(nbt::read_named(&fs::read(dir.join(n))?, Limits::default())? + .0 + .tag) + }; + let registry = BlockRegistry::from_nbt(&read("block-registry.nbt")?)?; + let data = read("interaction-shapes.nbt")?; + let shapes = InteractionShapes::from_nbt(&data, ®istry)?; + assert!(shapes.shape(BlockStateId(registry.len() as u32)).is_err()); + let mut bad = data.clone(); + *bad.get_mut("kind").unwrap() = Tag::String("collision".into()); + assert!(InteractionShapes::from_nbt(&bad, ®istry).is_err()); + let mut bad = data.clone(); + if let Some(Tag::IntArray(ids)) = bad.get_mut("cached_shapes") { + ids[0] = -1; + } + assert!(InteractionShapes::from_nbt(&bad, ®istry).is_err()); + let mut bad = data.clone(); + if let Some(Tag::List(shapes)) = bad.get_mut("shapes") { + if let Tag::Compound(first) = &mut shapes[0] { + first.remove(&"canonical".into()); + } + } + assert!(InteractionShapes::from_nbt(&bad, ®istry).is_err()); + let mut bad = data.clone(); + if let Some(Tag::List(states)) = bad.get_mut("states") { + states.swap(0, 1); + } + assert!(InteractionShapes::from_nbt(&bad, ®istry).is_err()); + let mut identities = Vec::<VoxelShape>::new(); + for state in 0..registry.len() { + let s = shapes.shape(BlockStateId(state as u32))?; + let id = identities + .iter() + .position(|old| old.same_identity(s)) + .unwrap_or_else(|| { + identities.push(s.clone()); + identities.len() - 1 + }); + writeln!( + out, + "state {state} {id} {} {} {}", + s.same_identity(&VoxelShape::empty()), + s.same_identity(&VoxelShape::block()), + s.boxes().len() + )?; + for b in s.boxes() { + writeln!( + out, + "box {:016x} {:016x} {:016x} {:016x} {:016x} {:016x}", + bits(b.min(Axis::X)), + bits(b.min(Axis::Y)), + bits(b.min(Axis::Z)), + bits(b.max(Axis::X)), + bits(b.max(Axis::Y)), + bits(b.max(Axis::Z)) + )?; + } + } + let mut w = World { shapes: &shapes }; + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let p = &f["position"]; + let p = BlockPos::new( + p[0].as_i64().unwrap() as i32, + p[1].as_i64().unwrap() as i32, + p[2].as_i64().unwrap() as i32, + ); + match clip_with_interaction( + &mut w, + vector(&f["from"]), + vector(&f["to"]), + p, + &shape(&f["shape"])?, + BlockStateId(f["state"].as_u64().unwrap() as u32), + )? { + Some(h) => writeln!( + out, + "hit {:016x} {:016x} {:016x} {} {} {} {} {}", + bits(h.location.x), + bits(h.location.y), + bits(h.location.z), + format!("{:?}", h.direction).to_lowercase(), + h.block.x, + h.block.y, + h.block.z, + h.inside + )?, + None => writeln!(out, "none")?, + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/inventory_pickup_fixture.rs b/crates/horizon-world/examples/inventory_pickup_fixture.rs new file mode 100644 index 000000000..b3f742aa0 --- /dev/null +++ b/crates/horizon-world/examples/inventory_pickup_fixture.rs @@ -0,0 +1,410 @@ +use horizon_world::{ + component_patch::{Patch, Prototype}, + item_stack_refs::{ItemStacks, StackRef}, + player_inventory::{EntityEquipment, EquipmentSlot, InventoryRules, PlayerInventory}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +type Stack = StackRef<u8, usize, i32>; +type Inventory = PlayerInventory<u8, usize, i32>; +struct Rules; +impl InventoryRules<u8, usize, i32> for Rules { + fn is_enchanted(&self, s: &Stack) -> bool { + s.read().component(&4).is_some_and(|n| *n != 0) + } + fn is_damaged(&self, s: &Stack) -> bool { + let s = s.read(); + s.component(&2).is_some() + && s.component(&3).is_none() + && s.component(&1).is_some() + && s.component(&1) + .copied() + .unwrap_or(0) + .max(0) + .min(s.component(&2).copied().unwrap_or(0)) + > 0 + } + fn has_custom_name(&self, s: &Stack) -> bool { + s.read().component(&5).is_some() + } +} +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn opt(v: Option<i32>) -> String { + v.map_or("none".into(), |n| n.to_string()) +} +struct Output { + out: io::BufWriter<fs::File>, + ids: Vec<Stack>, +} +impl Output { + fn snapshot(&mut self, s: &Stack) -> String { + let id = self + .ids + .iter() + .position(|v| v.same_reference(s)) + .unwrap_or_else(|| { + self.ids.push(s.clone()); + self.ids.len() - 1 + }); + let damaged = Rules.is_damaged(s); + let enchanted = Rules.is_enchanted(s); + let s = s.read(); + format!( + "{}:{}:{}:{}:{}:{}:{}:{}:{}:{}", + id, + s.item(), + s.count, + s.count(), + s.pop_time, + s.is_empty(), + damaged, + enchanted, + (0..6) + .map(|k| opt(s.component(&k).copied())) + .collect::<Vec<_>>() + .join(","), + s.components + .as_patch() + .entries() + .iter() + .map(|(k, v)| format!("{k}={}", opt(*v))) + .collect::<Vec<_>>() + .join(",") + ) + } + fn all(&mut self, refs: &[Stack], inv: &[Inventory; 2], empty: &Stack) { + for (i, s) in refs.iter().enumerate() { + let s = self.snapshot(s); + writeln!(self.out, "ref {i} {s}").unwrap(); + } + for (i, c) in inv.iter().enumerate() { + writeln!( + self.out, + "inventory {} {} {} {} {} {} {} {} {}", + i, + c.selected(), + c.times_changed, + c.free_slot(), + c.suitable_hotbar(&Rules), + c.is_empty(), + c.count_item(0), + c.count_item(1), + c.count_item(2) + ) + .unwrap(); + let slots = (0..43) + .map(|j| self.snapshot(&c.get(j).unwrap())) + .collect::<Vec<_>>() + .join(" | "); + writeln!(self.out, "slots {slots}").unwrap(); + let eq = c + .equipment() + .entries() + .into_iter() + .map(|(s, v)| { + format!( + "{}={}", + match s { + EquipmentSlot::MainHand => "MAINHAND", + EquipmentSlot::OffHand => "OFFHAND", + EquipmentSlot::Feet => "FEET", + EquipmentSlot::Legs => "LEGS", + EquipmentSlot::Chest => "CHEST", + EquipmentSlot::Head => "HEAD", + EquipmentSlot::Body => "BODY", + EquipmentSlot::Saddle => "SADDLE", + }, + self.snapshot(&v) + ) + }) + .collect::<Vec<_>>() + .join(" | "); + writeln!(self.out, "equipment {eq}").unwrap(); + for (j, s) in refs.iter().enumerate() { + writeln!( + self.out, + "query {} {} {} {}", + j, + c.contains(s), + c.find_matching(s), + c.find_crafting(1, s, &Rules) + ) + .unwrap(); + } + } + let e = self.snapshot(empty); + writeln!(self.out, "empty {e}").unwrap(); + } +} +struct World { + report: Output, + refs: Vec<Stack>, + op: Value, + calls: i32, +} +impl World { + fn event(&mut self, c: &mut Inventory, name: &str) -> Result<(), ()> { + self.calls += 1; + writeln!(self.report.out, "event {name} {}", self.calls).unwrap(); + writeln!( + self.report.out, + "active {} {}", + c.selected(), + c.times_changed + ) + .unwrap(); + for i in 0..self.refs.len() { + let s = self.report.snapshot(&self.refs[i]); + writeln!(self.report.out, "active-ref {i} {s}").unwrap(); + } + let slots = (0..43) + .map(|j| self.report.snapshot(&c.get(j).unwrap())) + .collect::<Vec<_>>() + .join(" | "); + writeln!(self.report.out, "active-slots {slots}").unwrap(); + if self.calls == n(&self.op, "fail_at") { + return Err(()); + } + if self.calls == n(&self.op, "mutate_at") { + let mut s = self.refs[n(&self.op, "mutate_ref") as usize].write(); + s.count = n(&self.op, "after_count"); + s.components + .set(0, Some(n(&self.op, "after_max"))) + .map_err(|_| ())?; + drop(s); + if n(&self.op, "mutate_slot") >= 0 { + c.set( + n(&self.op, "mutate_slot"), + self.refs[n(&self.op, "replace_ref") as usize].clone(), + ) + .map_err(|_| ())?; + } + if n(&self.op, "after_selected") >= 0 { + c.set_selected(n(&self.op, "after_selected")) + .map_err(|_| ())?; + } + } + Ok(()) + } +} +impl InventoryRules<u8, usize, i32> for World { + fn is_enchanted(&self, s: &Stack) -> bool { + Rules.is_enchanted(s) + } + fn is_damaged(&self, s: &Stack) -> bool { + Rules.is_damaged(s) + } + fn has_custom_name(&self, s: &Stack) -> bool { + Rules.has_custom_name(s) + } +} +impl horizon_world::inventory_pickup::PickupHooks<u8, usize, i32> for World { + type Error = (); + fn item_max_stack_size(&self, s: &Stack) -> i32 { + s.read().component(&0).copied().unwrap_or(1) + } + fn max_stack_size(&mut self, c: &mut Inventory) -> Result<i32, ()> { + self.event(c, "max")?; + Ok(n(&self.op, "max")) + } + fn infinite_materials(&mut self, c: &mut Inventory) -> Result<bool, ()> { + self.event(c, "infinite")?; + Ok(self.op["infinite"].as_bool().unwrap()) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let stacks = ItemStacks::new(0); + let empty = stacks.empty(); + let prototypes: Vec<_> = f["prototypes"] + .as_array() + .unwrap() + .iter() + .map(|p| { + Prototype::new(p.as_array().unwrap().iter().map(|v| { + ( + v[0].as_u64().unwrap() as usize, + v[1].as_i64().unwrap() as i32, + ) + })) + }) + .collect(); + let refs: Vec<_> = f["stacks"] + .as_array() + .unwrap() + .iter() + .map(|v| { + let item = n(v, "item"); + if item < 0 { + empty.clone() + } else { + let s = + stacks.create(item as u8, n(v, "count"), prototypes[item as usize].clone()); + s.write().pop_time = n(v, "pop"); + s.write().components.restore_patch(&Patch::new( + v["patch"].as_array().unwrap().iter().map(|v| { + ( + v[0].as_u64().unwrap() as usize, + v[1].as_i64().map(|n| n as i32), + ) + }), + )); + s + } + }) + .collect(); + let equipment = EntityEquipment::new(empty.clone()); + let other = if f["shared_equipment"].as_bool().unwrap() { + equipment.clone() + } else { + EntityEquipment::new(empty.clone()) + }; + let mut inv = [ + Inventory::new(stacks.clone(), equipment), + Inventory::new(stacks.clone(), other), + ]; + let order: [EquipmentSlot; 7] = std::array::from_fn(|i| { + EquipmentSlot::from_inventory_slot( + 36 + f["equipment_order"][i].as_i64().unwrap() as i32, + ) + .unwrap() + }); + for (i, c) in inv.iter_mut().enumerate() { + let initial = &f["inventories"][i]; + c.set_selected(n(initial, "selected")).unwrap(); + c.times_changed = n(initial, "changed"); + for p in initial["slots"].as_array().unwrap() { + c.set( + p[0].as_i64().unwrap() as i32, + refs[p[1].as_u64().unwrap() as usize].clone(), + ) + .unwrap(); + } + if n(initial, "mainhand") >= 0 { + c.equipment().set( + EquipmentSlot::MainHand, + refs[n(initial, "mainhand") as usize].clone(), + ); + } + } + let mut w = World { + report: Output { + out, + ids: vec![empty.clone()], + }, + refs, + op: Value::Null, + calls: 0, + }; + w.report.all(&w.refs, &inv, &empty); + for op in f["ops"].as_array().unwrap() { + w.op = op.clone(); + w.calls = 0; + let target = n(op, "inventory") as usize; + let a = n(op, "a") as usize; + let b = n(op, "b") as usize; + let slot = n(op, "slot"); + let amount = n(op, "amount"); + let result = (|| -> Result<(), ()> { + match op["kind"].as_str().unwrap() { + "add" => { + let input = w.refs[a].clone(); + let added = horizon_world::inventory_pickup::add( + &mut inv[target], + slot, + &input, + &mut w, + ) + .map_err(|_| ())?; + writeln!(w.report.out, "added {added}").unwrap(); + } + "space" => { + let input = w.refs[a].clone(); + let space = horizon_world::inventory_pickup::slot_with_space( + &mut inv[target], + &input, + &mut w, + ) + .map_err(|_| ())?; + writeln!(w.report.out, "space {space}").unwrap(); + } + "get" => w.refs[b] = inv[target].get(slot).map_err(|_| ())?, + "set" => inv[target].set(slot, w.refs[a].clone()).map_err(|_| ())?, + "remove" => w.refs[b] = inv[target].remove(slot, amount), + "no-update" => { + w.refs[b] = inv[target].remove_no_update(slot).map_err(|_| ())? + } + "remove-ref" => inv[target].remove_reference(&w.refs[a], &order), + "select" => inv[target].set_selected(slot).map_err(|_| ())?, + "selected" => w.refs[b] = inv[target].selected_item(), + "set-selected" => w.refs[b] = inv[target].set_selected_item(w.refs[a].clone()), + "remove-selected" => { + w.refs[b] = inv[target].remove_selected(op["all"].as_bool().unwrap()) + } + "pick" => inv[target].pick_slot(slot, &Rules).map_err(|_| ())?, + "add-pick" => inv[target].add_and_pick(w.refs[a].clone(), &Rules), + "clear" => inv[target].clear(), + "changed" => inv[target].changed(), + "replace" => { + let other = n(op, "other") as usize; + if other == target { + inv[target].replace_self(); + } else { + let (first, second) = inv.split_at_mut(1); + if target == 0 { + first[0].replace_with(&second[0]); + } else { + second[0].replace_with(&first[0]); + } + } + } + "equip" => { + w.refs[b] = inv[target].equipment().set( + EquipmentSlot::ALL[n(op, "equipment") as usize], + w.refs[a].clone(), + ) + } + "get-equip" => { + w.refs[b] = inv[target] + .equipment() + .get(EquipmentSlot::ALL[n(op, "equipment") as usize]) + } + "alias" => w.refs[b] = w.refs[a].clone(), + "copy" => w.refs[b] = stacks.copy(&w.refs[a]), + "count" => w.refs[a].write().count = amount, + "component" => { + w.refs[a] + .write() + .components + .set( + n(op, "key") as usize, + op["value"].as_i64().map(|n| n as i32), + ) + .map_err(|_| ())?; + } + _ => panic!("operation"), + } + Ok(()) + })(); + writeln!( + w.report.out, + "result {} {}", + if result.is_ok() { "ok" } else { "error" }, + w.calls + )?; + w.report.all(&w.refs, &inv, &empty); + } + out = w.report.out; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/inventory_tick_fixture.rs b/crates/horizon-world/examples/inventory_tick_fixture.rs new file mode 100644 index 000000000..974ed6760 --- /dev/null +++ b/crates/horizon-world/examples/inventory_tick_fixture.rs @@ -0,0 +1,231 @@ +use horizon_world::{ + component_patch::Prototype, + inventory_tick::{self, InventoryTickWorld}, + item_stack_refs::{ItemStacks, StackRef}, + player_inventory::{EntityEquipment, EquipmentSlot, PlayerInventory}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +type Stack = StackRef<u8, u8, i32>; +type Inventory = PlayerInventory<u8, u8, i32>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +struct World { + out: io::BufWriter<fs::File>, + f: Value, + refs: Vec<Stack>, + ids: Vec<Stack>, + empty: Stack, + level: u8, + calls: i32, +} +impl World { + fn id(&mut self, s: &Stack) -> usize { + self.ids + .iter() + .position(|v| v.same_reference(s)) + .unwrap_or_else(|| { + self.ids.push(s.clone()); + self.ids.len() - 1 + }) + } + fn snapshot(&mut self, s: &Stack) -> String { + let id = self.id(s); + let s = s.read(); + format!( + "{}:{}:{}:{}:{}:{}", + id, + s.item(), + s.count, + s.count(), + s.pop_time, + s.is_empty() + ) + } + fn all(&mut self, inv: &Inventory) { + for i in 0..self.refs.len() { + let s = self.snapshot(&self.refs[i].clone()); + writeln!(self.out, "ref {i} {s}").unwrap(); + } + writeln!( + self.out, + "state {} {} {}", + inv.selected(), + self.level, + self.calls + ) + .unwrap(); + let slots = (0..43) + .map(|i| self.snapshot(&inv.get(i).unwrap())) + .collect::<Vec<_>>() + .join(" | "); + writeln!(self.out, "slots {slots}").unwrap(); + let entries = inv + .equipment() + .entries() + .into_iter() + .map(|(s, v)| { + format!( + "{}={}", + match s { + EquipmentSlot::MainHand => "MAINHAND", + EquipmentSlot::OffHand => "OFFHAND", + EquipmentSlot::Feet => "FEET", + EquipmentSlot::Legs => "LEGS", + EquipmentSlot::Chest => "CHEST", + EquipmentSlot::Head => "HEAD", + EquipmentSlot::Body => "BODY", + EquipmentSlot::Saddle => "SADDLE", + }, + self.snapshot(&v) + ) + }) + .collect::<Vec<_>>() + .join(" | "); + writeln!(self.out, "equipment {entries}").unwrap(); + let s = self.snapshot(&self.empty.clone()); + writeln!(self.out, "empty {s}").unwrap(); + } + fn event(&mut self, inv: &mut Inventory, name: &str) -> Result<(), ()> { + writeln!(self.out, "{name}").unwrap(); + self.calls += 1; + self.all(inv); + if self.calls == n(&self.f, "fail_at") { + return Err(()); + } + if self.calls == n(&self.f, "mutate_at") { + self.refs[n(&self.f, "mutate_ref") as usize].write().count = n(&self.f, "after_count"); + self.refs[n(&self.f, "pop_ref") as usize].write().pop_time = n(&self.f, "after_pop"); + if n(&self.f, "replace_slot") >= 0 { + inv.set( + n(&self.f, "replace_slot"), + self.refs[n(&self.f, "replace_ref") as usize].clone(), + ) + .unwrap(); + } + if n(&self.f, "equipment_slot") >= 0 { + inv.equipment().set( + EquipmentSlot::ALL[n(&self.f, "equipment_slot") as usize], + self.refs[n(&self.f, "equipment_ref") as usize].clone(), + ); + } + inv.set_selected(n(&self.f, "after_selected")).unwrap(); + self.level = n(&self.f, "after_level") as u8; + } + Ok(()) + } +} +impl InventoryTickWorld<u8, u8, i32> for World { + type Error = (); + type Level = u8; + fn level(&mut self, inv: &mut Inventory) -> Result<u8, ()> { + self.event(inv, "level")?; + Ok(self.level) + } + fn is_server_level(&self, level: u8) -> bool { + level == 1 + } + fn item_tick( + &mut self, + inv: &mut Inventory, + item: u8, + stack: Stack, + level: u8, + slot: Option<EquipmentSlot>, + ) -> Result<(), ()> { + assert_eq!(level, 1); + if item != 0 { + let id = self.id(&stack); + self.event( + inv, + &format!("tick {item} {id} {}", slot.map_or(-1, |s| s as i32)), + )?; + } + Ok(()) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let stacks = ItemStacks::new(0); + let empty = stacks.empty(); + let refs: Vec<_> = f["stacks"] + .as_array() + .unwrap() + .iter() + .map(|v| { + let item = n(v, "item"); + if item < 0 { + empty.clone() + } else { + let s = stacks.create(item as u8, n(v, "count"), Prototype::new([])); + s.write().pop_time = n(v, "pop"); + s + } + }) + .collect(); + let equipment = EntityEquipment::new(empty.clone()); + let mut inv = Inventory::new(stacks, equipment); + inv.set_selected(n(&f, "selected")).unwrap(); + for p in f["slots"].as_array().unwrap() { + inv.set( + p[0].as_i64().unwrap() as i32, + refs[p[1].as_u64().unwrap() as usize].clone(), + ) + .unwrap(); + } + for p in f["equipment"].as_array().unwrap() { + inv.equipment().set( + EquipmentSlot::ALL[p[0].as_u64().unwrap() as usize], + refs[p[1].as_u64().unwrap() as usize].clone(), + ); + } + let mut w = World { + out, + f: f.clone(), + refs, + ids: vec![empty.clone()], + empty, + level: n(&f, "level") as u8, + calls: 0, + }; + w.all(&inv); + let result = match f["mode"].as_str().unwrap() { + "inventory" => inventory_tick::tick_inventory(&mut w, &mut inv), + "equipment" => inventory_tick::tick_equipment(&mut w, &mut inv), + "both" => inventory_tick::tick_inventory(&mut w, &mut inv) + .and_then(|()| inventory_tick::tick_equipment(&mut w, &mut inv)), + "stack" => { + let stack = w.refs[n(&f, "argument") as usize].clone(); + inventory_tick::tick_stack( + &mut w, + &mut inv, + stack, + n(&f, "argument_level") as u8, + if n(&f, "slot") < 0 { + None + } else { + Some(EquipmentSlot::ALL[n(&f, "slot") as usize]) + }, + ) + } + _ => panic!("mode"), + }; + writeln!( + w.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + w.all(&inv); + out = w.out; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/inventory_use_fixture.rs b/crates/horizon-world/examples/inventory_use_fixture.rs new file mode 100644 index 000000000..2f5ed557b --- /dev/null +++ b/crates/horizon-world/examples/inventory_use_fixture.rs @@ -0,0 +1,331 @@ +use horizon_world::{ + component_patch::Prototype, + inventory_use::{ActiveStack, InventoryUse, UseServices, UseView}, + item_stack_refs::{ItemStacks, StackRef}, + item_use_lifecycle::{self, UseState}, + living_use_flags, + player_equipment::InteractionHand, + player_inventory::{EntityEquipment, EquipmentSlot, PlayerInventory}, + synced_values::{DataValue, SyncedValues}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +type Stack = StackRef<usize, u8, bool>; +type State = ActiveStack<usize, u8, bool>; +type View<'a> = UseView<'a, usize, u8, bool>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +struct Services { + f: Value, + out: io::BufWriter<fs::File>, + calls: i32, + changed: bool, + items: [Stack; 3], +} +impl Services { + fn config(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn id(&self, s: &Stack) -> usize { + self.items.iter().position(|v| v.same_reference(s)).unwrap() + } + fn reset(&self, view: View<'_>, state: &mut State) { + let c = self.config(); + state.item = self.items[n(c, "item") as usize].clone(); + state.remaining = n(c, "remaining"); + state.has_recent_kinetic_enemies = c["kinetic"].as_bool().unwrap(); + for i in 0..3 { + self.items[i].write().count = c["counts"][i].as_i64().unwrap() as i32; + } + view.inventory.clear(); + view.inventory.set_selected(n(c, "selected")).unwrap(); + for p in c["slots"].as_array().unwrap() { + view.inventory + .set( + p[0].as_i64().unwrap() as i32, + self.items[p[1].as_u64().unwrap() as usize].clone(), + ) + .unwrap(); + } + } + fn all(&mut self, view: &View<'_>, state: &State) -> io::Result<()> { + writeln!( + self.out, + "state {} {} {} {} {} {} {} {} {} {} {}", + self.id(&state.item), + state.remaining, + state.has_recent_kinetic_enemies, + living_use_flags::using_item(view.flags).unwrap(), + match living_use_flags::used_hand(view.flags).unwrap() { + InteractionHand::Main => 0, + InteractionHand::Off => 1, + }, + view.flags.get(8).unwrap(), + view.flags.is_dirty(), + view.flags.item_dirty(8).unwrap(), + view.inventory.selected(), + self.calls, + self.changed + )?; + writeln!( + self.out, + "counts {} {} {}", + self.items[0].read().count, + self.items[1].read().count, + self.items[2].read().count + )?; + let slots = (0..43) + .map(|i| self.id(&view.inventory.get(i).unwrap()).to_string()) + .collect::<Vec<_>>() + .join(","); + writeln!(self.out, "slots {slots}")?; + let eq = view + .inventory + .equipment() + .entries() + .iter() + .map(|(slot, s)| format!("{}={}", *slot as usize, self.id(s))) + .collect::<Vec<_>>() + .join(","); + writeln!(self.out, "equipment {eq}")?; + Ok(()) + } + fn event(&mut self, view: View<'_>, state: &mut State, name: &str) -> io::Result<()> { + writeln!(self.out, "{name}")?; + let index = self.calls; + self.calls += 1; + self.all(&view, state)?; + if index == n(&self.f, "fail") { + return Err(io::Error::other("injected callback failure")); + } + if index == n(&self.f, "mutate_at") { + self.changed = true; + self.reset(view, state); + } + Ok(()) + } +} +impl UseServices<usize, u8, bool> for Services { + type Error = io::Error; + type Level = usize; + fn level(&mut self, view: View<'_>, state: &mut State) -> io::Result<usize> { + self.event(view, state, "level")?; + Ok(n(self.config(), "level") as usize) + } + fn is_client(&mut self, view: View<'_>, state: &mut State, level: usize) -> io::Result<bool> { + self.event(view, state, &format!("client {level}"))?; + Ok(self.config()["clients"][level].as_bool().unwrap()) + } + fn remaining_ticks(&mut self, view: View<'_>, state: &mut State) -> io::Result<i32> { + self.event(view, state, "remaining")?; + Ok(n(self.config(), "virtual_remaining")) + } + fn item_tick( + &mut self, + view: View<'_>, + state: &mut State, + item: Stack, + level: usize, + remaining: i32, + ) -> io::Result<()> { + let kind = item.read().item(); + if kind != 2 { + self.event( + view, + state, + &format!("tick {kind} {} {level} {remaining}", self.id(&item)), + )?; + } + Ok(()) + } + fn use_on_release( + &mut self, + view: View<'_>, + state: &mut State, + item: Stack, + ) -> io::Result<bool> { + let kind = item.read().item(); + if kind == 2 { + return Ok(false); + } + self.event( + view, + state, + &format!("release-query {kind} {}", self.id(&item)), + )?; + Ok(self.config()["releases"][kind].as_bool().unwrap()) + } + fn release_item( + &mut self, + view: View<'_>, + state: &mut State, + item: Stack, + level: usize, + remaining: i32, + ) -> io::Result<()> { + let kind = item.read().item(); + if kind != 2 { + self.event( + view, + state, + &format!("release {kind} {} {level} {remaining}", self.id(&item)), + )?; + } + Ok(()) + } + fn finish_item( + &mut self, + view: View<'_>, + state: &mut State, + item: Stack, + level: usize, + ) -> io::Result<Stack> { + let kind = item.read().item(); + if kind == 2 { + return Ok(item); + } + self.event( + view, + state, + &format!("finish {kind} {} {level}", self.id(&item)), + )?; + Ok(self.items[self.config()["finishes"][kind].as_u64().unwrap() as usize].clone()) + } + fn finish_vibration( + &mut self, + view: View<'_>, + state: &mut State, + item: Stack, + ) -> io::Result<()> { + if item.read().component(&0).copied().unwrap_or(false) { + self.event(view, state, "vibration")?; + } + Ok(()) + } + fn on_equip( + &mut self, + view: View<'_>, + state: &mut State, + slot: EquipmentSlot, + old: Stack, + new: Stack, + ) -> io::Result<()> { + self.event( + view, + state, + &format!( + "equip {} {} {}", + slot as usize, + self.id(&old), + self.id(&new) + ), + ) + } + fn on_synced(&mut self, view: View<'_>, state: &mut State, id: u8) -> io::Result<()> { + self.event(view, state, &format!("synced {id}")) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let stacks = ItemStacks::new(2); + let items = [ + stacks.create(0, 1, Prototype::new([])), + stacks.create( + if f["shared_type"].as_bool().unwrap() { + 0 + } else { + 1 + }, + 1, + Prototype::new([]), + ), + stacks.empty(), + ]; + for i in 0..2 { + if f["vibrations"][i].as_bool().unwrap() { + items[i].write().components.set(0, Some(true)).unwrap(); + } + } + let mut state = UseState { + item: items[2].clone(), + remaining: 0, + has_recent_kinetic_enemies: false, + }; + let inventory = PlayerInventory::new(stacks.clone(), EntityEquipment::new(stacks.empty())); + let flags = SyncedValues::new(&[DataValue { + id: 8, + value: n(&f, "flags") as u8, + }])?; + let services = Services { + f: f.clone(), + out, + calls: 0, + changed: false, + items, + }; + let mut world = InventoryUse::new(inventory, flags, services).unwrap(); + world.services.reset( + UseView { + inventory: &mut world.inventory, + flags: &mut world.flags, + }, + &mut state, + ); + world.services.all( + &UseView { + inventory: &mut world.inventory, + flags: &mut world.flags, + }, + &state, + )?; + let result = match f["mode"].as_str().unwrap() { + "tick" => item_use_lifecycle::tick(&mut world, &mut state), + "update" => { + let item = world.services.items[n(&f, "argument") as usize].clone(); + item_use_lifecycle::update(&mut world, &mut state, item) + } + "complete" => item_use_lifecycle::complete(&mut world, &mut state), + "release" => item_use_lifecycle::release(&mut world, &mut state), + "stop" => item_use_lifecycle::stop(&mut world, &mut state), + _ => panic!("mode"), + }; + writeln!( + world.services.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + world.services.all( + &UseView { + inventory: &mut world.inventory, + flags: &mut world.flags, + }, + &state, + )?; + let packed = world.flags.take_dirty().map_or("none".into(), |values| { + values + .iter() + .map(|v| format!("{}:{}", v.id, v.value)) + .collect::<Vec<_>>() + .join(",") + }); + writeln!(world.services.out, "packed {packed}")?; + world.services.all( + &UseView { + inventory: &mut world.inventory, + flags: &mut world.flags, + }, + &state, + )?; + out = world.services.out; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/inventory_use_start_fixture.rs b/crates/horizon-world/examples/inventory_use_start_fixture.rs new file mode 100644 index 000000000..f887e5688 --- /dev/null +++ b/crates/horizon-world/examples/inventory_use_start_fixture.rs @@ -0,0 +1,436 @@ +use horizon_world::{ + component_patch::Prototype, + inventory_use::{ + ActiveStack, DurationServices, InventoryUse, StartServices, UseServices, UseView, + flags_updated, + }, + item_stack_refs::{ItemStacks, StackRef}, + item_use_lifecycle::{self, UseState}, + living_use_flags, + player_equipment::InteractionHand, + player_inventory::{EntityEquipment, EquipmentSlot, PlayerInventory}, + synced_values::{DataValue, SyncedValues}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +type Stack = StackRef<usize, u8, bool>; +type State = ActiveStack<usize, u8, bool>; +type View<'a> = UseView<'a, usize, u8, bool>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +struct Services { + f: Value, + out: io::BufWriter<fs::File>, + calls: i32, + changed: bool, + kinetic_count: i32, + items: [Stack; 3], +} +impl Services { + fn config(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn id(&self, s: &Stack) -> usize { + self.items.iter().position(|v| v.same_reference(s)).unwrap() + } + fn reset(&mut self, view: View<'_>, state: &mut State) { + let c = self.config(); + state.item = self.items[n(c, "item") as usize].clone(); + state.remaining = n(c, "remaining"); + state.has_recent_kinetic_enemies = c["kinetic"].as_bool().unwrap(); + for i in 0..3 { + self.items[i].write().count = c["counts"][i].as_i64().unwrap() as i32; + } + view.inventory.clear(); + view.inventory.set_selected(n(c, "selected")).unwrap(); + for p in c["slots"].as_array().unwrap() { + view.inventory + .set( + p[0].as_i64().unwrap() as i32, + self.items[p[1].as_u64().unwrap() as usize].clone(), + ) + .unwrap(); + } + self.kinetic_count = if state.has_recent_kinetic_enemies { + 1 + } else { + -1 + }; + } + fn all(&mut self, view: &View<'_>, state: &State) -> io::Result<()> { + writeln!( + self.out, + "state {} {} {} {} {} {} {} {} {} {} {} {}", + self.id(&state.item), + state.remaining, + state.has_recent_kinetic_enemies, + living_use_flags::using_item(view.flags).unwrap(), + match living_use_flags::used_hand(view.flags).unwrap() { + InteractionHand::Main => 0, + InteractionHand::Off => 1, + }, + view.flags.get(8).unwrap(), + view.flags.is_dirty(), + view.flags.item_dirty(8).unwrap(), + view.inventory.selected(), + self.calls, + self.changed, + if state.has_recent_kinetic_enemies { + self.kinetic_count + } else { + -1 + } + )?; + writeln!( + self.out, + "counts {} {} {}", + self.items[0].read().count, + self.items[1].read().count, + self.items[2].read().count + )?; + let slots = (0..43) + .map(|i| self.id(&view.inventory.get(i).unwrap()).to_string()) + .collect::<Vec<_>>() + .join(","); + writeln!(self.out, "slots {slots}")?; + let eq = view + .inventory + .equipment() + .entries() + .iter() + .map(|(slot, s)| format!("{}={}", *slot as usize, self.id(s))) + .collect::<Vec<_>>() + .join(","); + writeln!(self.out, "equipment {eq}")?; + Ok(()) + } + fn event(&mut self, view: View<'_>, state: &mut State, name: &str) -> io::Result<()> { + writeln!(self.out, "{name}")?; + let index = self.calls; + self.calls += 1; + self.all(&view, state)?; + if index == n(&self.f, "fail") { + return Err(io::Error::other("injected callback failure")); + } + if index == n(&self.f, "mutate_at") { + self.changed = true; + self.reset(view, state); + } + Ok(()) + } +} +impl UseServices<usize, u8, bool> for Services { + type Error = io::Error; + type Level = usize; + fn level(&mut self, view: View<'_>, state: &mut State) -> io::Result<usize> { + self.event(view, state, "level")?; + Ok(n(self.config(), "level") as usize) + } + fn is_client(&mut self, view: View<'_>, state: &mut State, level: usize) -> io::Result<bool> { + self.event(view, state, &format!("client {level}"))?; + Ok(self.config()["clients"][level].as_bool().unwrap()) + } + fn remaining_ticks(&mut self, view: View<'_>, state: &mut State) -> io::Result<i32> { + self.event(view, state, "remaining")?; + Ok(n(self.config(), "virtual_remaining")) + } + fn item_tick( + &mut self, + view: View<'_>, + state: &mut State, + item: Stack, + level: usize, + remaining: i32, + ) -> io::Result<()> { + let kind = item.read().item(); + if kind != 2 { + self.event( + view, + state, + &format!("tick {kind} {} {level} {remaining}", self.id(&item)), + )?; + } + Ok(()) + } + fn use_on_release( + &mut self, + view: View<'_>, + state: &mut State, + item: Stack, + ) -> io::Result<bool> { + let kind = item.read().item(); + if kind == 2 { + return Ok(false); + } + self.event( + view, + state, + &format!("release-query {kind} {}", self.id(&item)), + )?; + Ok(self.config()["releases"][kind].as_bool().unwrap()) + } + fn release_item( + &mut self, + view: View<'_>, + state: &mut State, + item: Stack, + level: usize, + remaining: i32, + ) -> io::Result<()> { + let kind = item.read().item(); + if kind != 2 { + self.event( + view, + state, + &format!("release {kind} {} {level} {remaining}", self.id(&item)), + )?; + } + Ok(()) + } + fn finish_item( + &mut self, + view: View<'_>, + state: &mut State, + item: Stack, + level: usize, + ) -> io::Result<Stack> { + let kind = item.read().item(); + if kind == 2 { + return Ok(item); + } + self.event( + view, + state, + &format!("finish {kind} {} {level}", self.id(&item)), + )?; + Ok(self.items[self.config()["finishes"][kind].as_u64().unwrap() as usize].clone()) + } + fn finish_vibration( + &mut self, + view: View<'_>, + state: &mut State, + item: Stack, + ) -> io::Result<()> { + if item.read().component(&0).copied().unwrap_or(false) { + self.event(view, state, "vibration")?; + } + Ok(()) + } + fn on_equip( + &mut self, + view: View<'_>, + state: &mut State, + slot: EquipmentSlot, + old: Stack, + new: Stack, + ) -> io::Result<()> { + self.event( + view, + state, + &format!( + "equip {} {} {}", + slot as usize, + self.id(&old), + self.id(&new) + ), + ) + } + fn on_synced(&mut self, mut view: View<'_>, state: &mut State, id: u8) -> io::Result<()> { + self.event(view.reborrow(), state, &format!("synced {id}"))?; + flags_updated(self, view, state) + } +} +impl DurationServices<usize, u8, bool> for Services { + fn duration(&mut self, view: View<'_>, state: &mut State, item: Stack) -> io::Result<i32> { + let kind = item.read().item(); + if kind == 2 { + return Ok(0); + } + self.event(view, state, &format!("duration {kind} {}", self.id(&item)))?; + Ok(self.config()["durations"][kind].as_i64().unwrap() as i32) + } +} +impl StartServices<usize, u8, bool> for Services { + fn synchronize_equipment( + &mut self, + mut view: View<'_>, + state: &mut State, + level: usize, + hand: InteractionHand, + item: Stack, + ) -> io::Result<()> { + self.event(view.reborrow(), state, &format!("chunks {level}"))?; + self.event(view.reborrow(), state, "id")?; + self.event( + view, + state, + &format!( + "equipment {level} {} {} 17", + if hand == InteractionHand::Main { 0 } else { 1 }, + self.id(&item) + ), + ) + } + fn start_vibration( + &mut self, + view: View<'_>, + state: &mut State, + item: Stack, + ) -> io::Result<()> { + if item.read().component(&0).copied().unwrap_or(false) { + self.event(view, state, "vibration-start")?; + } + Ok(()) + } + fn has_kinetic_weapon(&self, item: &Stack) -> bool { + item.read().component(&1).copied().unwrap_or(false) + } + fn reset_recent_kinetic_enemies(&mut self, _view: View<'_>, state: &mut State) { + state.has_recent_kinetic_enemies = true; + self.kinetic_count = 0; + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let stacks = ItemStacks::new(2); + let items = [ + stacks.create(0, 1, Prototype::new([])), + stacks.create( + if f["shared_type"].as_bool().unwrap() { + 0 + } else { + 1 + }, + 1, + Prototype::new([]), + ), + stacks.empty(), + ]; + for i in 0..2 { + if f["vibrations"][i].as_bool().unwrap() { + items[i].write().components.set(0, Some(true)).unwrap(); + } + } + for i in 0..2 { + if f["kinetic_items"][i].as_bool().unwrap() { + items[i].write().components.set(1, Some(true)).unwrap(); + } + } + let mut state = UseState { + item: items[2].clone(), + remaining: 0, + has_recent_kinetic_enemies: false, + }; + let inventory = PlayerInventory::new(stacks.clone(), EntityEquipment::new(stacks.empty())); + let flags = SyncedValues::new(&[DataValue { + id: 8, + value: n(&f, "flags") as u8, + }])?; + let services = Services { + f: f.clone(), + out, + calls: 0, + changed: false, + kinetic_count: -1, + items, + }; + let mut world = InventoryUse::new(inventory, flags, services).unwrap(); + world.services.reset( + UseView { + inventory: &mut world.inventory, + flags: &mut world.flags, + }, + &mut state, + ); + world.services.all( + &UseView { + inventory: &mut world.inventory, + flags: &mut world.flags, + }, + &state, + )?; + let result = match f["mode"].as_str().unwrap() { + "start" => horizon_world::item_use_start::start( + &mut world, + &mut state, + if n(&f, "start_hand") == 0 { + InteractionHand::Main + } else { + InteractionHand::Off + }, + ), + "notify" => world.services.on_synced( + UseView { + inventory: &mut world.inventory, + flags: &mut world.flags, + }, + &mut state, + 8, + ), + "flag" => world + .set_flag(&mut state, n(&f, "mask"), f["value"].as_bool().unwrap()) + .map_err(io::Error::other), + "assign" => { + let values: Vec<_> = f["values"] + .as_array() + .unwrap() + .iter() + .map(|v| DataValue { + id: 8, + value: v.as_u64().unwrap() as u8, + }) + .collect(); + world + .assign_flags(&mut state, &values) + .map_err(io::Error::other) + } + "tick" => item_use_lifecycle::tick(&mut world, &mut state), + "update" => { + let item = world.services.items[n(&f, "argument") as usize].clone(); + item_use_lifecycle::update(&mut world, &mut state, item) + } + "complete" => item_use_lifecycle::complete(&mut world, &mut state), + "release" => item_use_lifecycle::release(&mut world, &mut state), + "stop" => item_use_lifecycle::stop(&mut world, &mut state), + _ => panic!("mode"), + }; + writeln!( + world.services.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + world.services.all( + &UseView { + inventory: &mut world.inventory, + flags: &mut world.flags, + }, + &state, + )?; + let packed = world.flags.take_dirty().map_or("none".into(), |values| { + values + .iter() + .map(|v| format!("{}:{}", v.id, v.value)) + .collect::<Vec<_>>() + .join(",") + }); + writeln!(world.services.out, "packed {packed}")?; + world.services.all( + &UseView { + inventory: &mut world.inventory, + flags: &mut world.flags, + }, + &state, + )?; + out = world.services.out; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/item_after_use_fixture.rs b/crates/horizon-world/examples/item_after_use_fixture.rs new file mode 100644 index 000000000..3daf5dfce --- /dev/null +++ b/crates/horizon-world/examples/item_after_use_fixture.rs @@ -0,0 +1,329 @@ +use horizon_world::{ + component_patch::{Patch, Prototype}, + identifier::Identifier, + item_after_use::{self, AfterUseWorld}, + item_cooldowns::{self, CooldownUser, ItemCooldowns, Observer, UseCooldown}, + item_stack_refs::{ItemStacks, StackRef}, + item_stack_storage::ItemStackData, + item_template::{ItemTemplate, ValidationRules}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone, Debug, PartialEq)] +enum Component { + Integer(i32), + Remainder(ItemTemplate<usize, u8, Component>), + Cooldown(UseCooldown<Identifier>), +} +type Stack = StackRef<usize, u8, Component>; +type StackData = ItemStackData<usize, u8, Component>; +type Template = ItemTemplate<usize, u8, Component>; +type Book = ItemCooldowns<Identifier>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn integer(v: Option<&Component>) -> Option<i32> { + match v { + Some(Component::Integer(n)) => Some(*n), + _ => None, + } +} +fn bits(f: f32) -> u32 { + if f.is_nan() { 0x7fc00000 } else { f.to_bits() } +} +fn cooldown(v: &Value) -> Option<UseCooldown<Identifier>> { + v["cooldown"].as_u64().map(|b| UseCooldown { + seconds: f32::from_bits(b as u32), + group: usize::try_from(n(v, "group")) + .ok() + .map(|i| Identifier::parse(&format!("test:group{i}")).unwrap()), + }) +} +fn template(v: &Value) -> Option<Template> { + v["remainder"].as_i64().map(|count| { + let mut p = Vec::new(); + if let Some(m) = v["maximum"].as_i64() { + p.push((0, Some(Component::Integer(m as i32)))); + } + if v["damage"].as_bool().unwrap() { + p.push((1, Some(Component::Integer(0)))); + } + Template::new(2, 0, count as i32, Patch::new(p)).unwrap() + }) +} +fn components(stack: &Stack, v: &Value) { + let mut s = stack.write(); + s.components + .set(2, template(v).map(Component::Remainder)) + .unwrap(); + s.components + .set(3, cooldown(v).map(Component::Cooldown)) + .unwrap(); +} +struct Data { + f: Value, + out: io::BufWriter<fs::File>, + refs: [Stack; 3], + extra: Option<Stack>, + original: Option<Stack>, + result: Option<Stack>, + changed: bool, + calls: i32, + prototypes: [Prototype<u8, Component>; 3], + store: ItemStacks<usize, u8, Component>, +} +impl Data { + fn config(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn snapshot(&self, s: Option<&Stack>) -> String { + let Some(s) = s else { + return "none".into(); + }; + let d = s.read(); + let remainder = match d.component(&2) { + Some(Component::Remainder(t)) => format!( + "{}:{}", + t.count(), + integer(t.component(&self.prototypes[t.item()], &0)).unwrap_or(1) + ), + _ => "none".into(), + }; + let cooldown = match d.component(&3) { + Some(Component::Cooldown(c)) => format!( + "{}:{}", + bits(c.seconds), + c.group.as_ref().map_or("none".into(), ToString::to_string) + ), + _ => "none".into(), + }; + format!( + "{} {} {} {} {} {} {}", + s.same_reference(&self.store.empty()), + d.item(), + d.count, + d.count(), + d.pop_time, + remainder, + cooldown + ) + } + fn all(&mut self, book: &Book) { + writeln!( + self.out, + "state {} {} {}", + self.calls, self.changed, book.tick_count + ) + .unwrap(); + let slots = [ + Some(self.refs[0].clone()), + Some(self.refs[1].clone()), + Some(self.refs[2].clone()), + self.extra.clone(), + self.original.clone(), + self.result.clone(), + ]; + for (i, s) in slots.iter().enumerate() { + writeln!(self.out, "ref {i} {}", self.snapshot(s.as_ref())).unwrap(); + } + let mut same = Vec::new(); + for a in 0..slots.len() { + for b in a + 1..slots.len() { + same.push((slots[a] == slots[b]).to_string()); + } + } + writeln!(self.out, "same {}", same.join(",")).unwrap(); + let entries = book + .entries() + .map(|(k, v)| format!("{k}={}:{}", v.start, v.end)) + .collect::<Vec<_>>() + .join(","); + writeln!(self.out, "cooldowns {entries}").unwrap(); + } + fn reset(&mut self, book: &mut Book) { + let c = self.config().clone(); + self.prototypes[2] = Prototype::new([(0, Component::Integer(n(&c, "prototype_max")))]); + for i in 0..2 { + let v = &c["items"][i]; + self.refs[i].write().count = n(v, "count"); + components(&self.refs[i], v); + } + book.tick_count = n(&c, "clock"); + if let Some(extra) = &self.extra { + extra.write().count = n(&c, "extra_count"); + } + if let Some(original) = &self.original { + original.write().count = n(&c, "original_count"); + components(original, &c["items"][1]); + } + } + fn event(&mut self, book: &mut Book, name: String) -> Result<(), &'static str> { + writeln!(self.out, "event {name}").unwrap(); + let index = self.calls; + self.calls += 1; + self.all(book); + if index == n(&self.f, "fail") { + return Err("callback"); + } + if index == n(&self.f, "mutate") { + self.changed = true; + self.reset(book); + } + Ok(()) + } +} +impl Observer<Identifier> for Data { + type Error = &'static str; + fn started(&mut self, b: &mut Book, g: Identifier, d: i32) -> Result<(), Self::Error> { + self.event(b, format!("started {g} {d}")) + } + fn ended(&mut self, _: &mut Book, _: Identifier) -> Result<(), Self::Error> { + unreachable!() + } +} +struct World { + data: Data, + book: Book, +} +impl ValidationRules<usize, u8, Component> for World { + type ContentsError = std::convert::Infallible; + fn has_max_damage(&self, s: &StackData) -> bool { + s.component(&1).is_some() + } + fn max_stack_size(&self, s: &StackData) -> i32 { + integer(s.component(&0)).unwrap_or(1) + } + fn validate_contents(&self, _: &StackData) -> Result<(), Self::ContentsError> { + Ok(()) + } +} +impl CooldownUser for World { + type Error = &'static str; + type Stack = Stack; + type Manager = (); + fn is_player(&self) -> bool { + self.data.f["player"].as_bool().unwrap() + } + fn cooldowns(&mut self) -> Result<(), Self::Error> { + self.data.event(&mut self.book, "get-cooldowns".into()) + } + fn add_cooldown(&mut self, _: (), stack: Stack, ticks: i32) -> Result<(), Self::Error> { + self.data.original = Some(stack.clone()); + self.data + .event(&mut self.book, format!("add-cooldown {ticks}"))?; + let group = { + let s = stack.read(); + let c = match s.component(&3) { + Some(Component::Cooldown(c)) => Some(c), + _ => None, + }; + item_cooldowns::group(c, || { + Identifier::parse(if s.item() == 2 { + "minecraft:stick" + } else { + "minecraft:air" + }) + .unwrap() + }) + }; + self.book.add(group, ticks, &mut self.data) + } +} +impl AfterUseWorld<usize, u8, Component> for World { + type Error = &'static str; + type Level = (); + type Group = Identifier; + fn remainder(&self, s: &StackData) -> Option<Template> { + match s.component(&2) { + Some(Component::Remainder(t)) => Some(t.clone()), + _ => None, + } + } + fn cooldown(&self, s: &StackData) -> Option<UseCooldown<Identifier>> { + match s.component(&3) { + Some(Component::Cooldown(c)) => Some(c.clone()), + _ => None, + } + } + fn prototype(&self, item: usize) -> Prototype<u8, Component> { + self.data.prototypes[item].clone() + } + fn finish_item(&mut self, s: Stack, _: ()) -> Result<Stack, Self::Error> { + let kind = s.read().item(); + if kind == 1 { + self.data.event(&mut self.book, "finish".into())?; + Ok(self.data.refs[n(self.data.config(), "finish") as usize].clone()) + } else { + Ok(s) + } + } + fn infinite_materials(&mut self) -> Result<bool, Self::Error> { + self.data.event(&mut self.book, "infinite".into())?; + Ok(self.data.config()["infinite"].as_bool().unwrap()) + } + fn extra_item(&mut self, s: Stack) -> Result<(), Self::Error> { + self.data.extra = Some(s); + self.data.event(&mut self.book, "extra".into()) + } + fn apply_cooldown( + &mut self, + c: UseCooldown<Identifier>, + original: Stack, + ) -> Result<(), Self::Error> { + c.apply(self, original) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let store = ItemStacks::new(0); + let prototypes = [ + Prototype::new([]), + Prototype::new([]), + Prototype::new([(0, Component::Integer(n(&f["initial"], "prototype_max")))]), + ]; + let refs = [ + store.create(1, 1, prototypes[1].clone()), + store.create(2, 1, prototypes[2].clone()), + store.empty(), + ]; + refs[0].write().pop_time = 5; + refs[1].write().pop_time = 7; + let mut w = World { + data: Data { + f, + out, + refs, + extra: None, + original: None, + result: None, + changed: false, + calls: 0, + prototypes, + store: store.clone(), + }, + book: Book::default(), + }; + w.data.reset(&mut w.book); + w.data.all(&w.book); + let source = w.data.refs[n(&w.data.f, "source") as usize].clone(); + let result = item_after_use::finish(&store, &mut w, source, ()); + match result { + Ok(s) => { + w.data.result = Some(s); + writeln!(w.data.out, "result ok")?; + } + Err(e) => writeln!(w.data.out, "result {e}")?, + } + w.data.all(&w.book); + out = w.data.out; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/item_blocking_fixture.rs b/crates/horizon-world/examples/item_blocking_fixture.rs new file mode 100644 index 000000000..c4889925a --- /dev/null +++ b/crates/horizon-world/examples/item_blocking_fixture.rs @@ -0,0 +1,217 @@ +use horizon_core::geometry::Vec3; +use horizon_world::{ + blocking_rules::{BlockingRules, DamageReduction, ItemDamageFunction, TypeMatchWorld}, + item_blocking::{self, ItemBlockingWorld}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, + sync::Arc, +}; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vec(v: &Value) -> Option<Vec3> { + (!v.is_null()).then(|| Vec3::new(number(&v[0]), number(&v[1]), number(&v[2]))) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +struct Component { + present: bool, + bypass: Option<u64>, + rules: Arc<BlockingRules<u64>>, +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + components: Vec<Component>, + calls: i64, + changed: bool, +} +impl World<'_> { + fn state(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn event(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected blocking callback failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.changed = true; + } + Ok(()) + } +} +impl TypeMatchWorld for World<'_> { + type Error = io::Error; + type Set = u64; + fn source_in_set(&mut self, set: u64) -> io::Result<bool> { + self.event("type-holder")?; + let id = self.state()["type"].as_u64().unwrap(); + Ok(match set { + 1 => id == 0, + 2 => id == 1, + 3 => true, + 4 => false, + _ => panic!("set"), + }) + } +} +impl ItemBlockingWorld for World<'_> { + type Error = io::Error; + type Item = usize; + type Component = usize; + type Entity = u64; + type Level = u64; + type Hand = u64; + fn blocking_item(&mut self) -> io::Result<Option<usize>> { + self.event("blocking-item")?; + let id = self.state()["item"].as_i64().unwrap(); + Ok((id >= 0).then_some(id as usize)) + } + fn component(&mut self, item: usize) -> Option<usize> { + self.components[item].present.then_some(item) + } + fn bypasses_component(&mut self, c: usize) -> io::Result<bool> { + match self.components[c].bypass { + Some(set) => self.source_in_set(set), + None => Ok(false), + } + } + fn direct_entity(&mut self) -> io::Result<Option<u64>> { + self.event("direct")?; + let id = self.state()["direct"].as_u64().unwrap(); + Ok((id != 0).then_some(id)) + } + fn is_arrow(&self, e: u64) -> bool { + e == 2 + } + fn pierce_level(&mut self, _: u64) -> io::Result<i8> { + self.event("pierce")?; + Ok(self.state()["pierce"].as_i64().unwrap() as i8) + } + fn source_position(&mut self) -> io::Result<Option<Vec3>> { + self.event("source-position")?; + Ok(vec(&self.state()["source"])) + } + fn head_yaw(&mut self) -> io::Result<f32> { + self.event("yaw")?; + Ok(single(&self.state()["yaw"])) + } + fn position(&mut self) -> io::Result<Vec3> { + self.event("position")?; + Ok(vec(&self.state()["position"]).unwrap()) + } + fn resolve(&mut self, c: usize, damage: f32, angle: f64) -> io::Result<f32> { + let rules = Arc::clone(&self.components[c].rules); + rules.resolve(self, damage, angle) + } + fn level(&mut self) -> io::Result<u64> { + self.event("level")?; + Ok(self.state()["level"].as_u64().unwrap()) + } + fn used_hand(&mut self) -> io::Result<u64> { + self.event("hand")?; + Ok(self.state()["hand"].as_u64().unwrap()) + } + fn hurt_blocking_item( + &mut self, + c: usize, + level: u64, + item: usize, + _: u64, + blocked: f32, + ) -> io::Result<()> { + if self.f["player"].as_bool().unwrap() { + self.event(&format!("client {level}"))?; + if !self.state()["client"].as_bool().unwrap() { + self.event(&format!("stat {item}"))?; + } + if self.components[c].rules.item_damage.apply(blocked) > 0 { + self.event("level")?; + } + } + Ok(()) + } + fn source_is_projectile(&mut self) -> io::Result<bool> { + self.event("projectile")?; + Ok(self.state()["projectile"].as_bool().unwrap()) + } + fn is_living(&self, e: u64) -> bool { + e == 1 + } + fn block_using_item(&mut self, _: u64, damage: f32, fully: bool) -> io::Result<()> { + self.event(&format!("block-using 0 {:08x} {fully}", bits(damage))) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let components = f["components"] + .as_array() + .unwrap() + .iter() + .map(|c| { + let item = &c["item_damage"]; + let bypass = c["bypass"].as_u64().unwrap(); + Component { + present: c["present"].as_bool().unwrap(), + bypass: (bypass != 0).then_some(bypass), + rules: Arc::new(BlockingRules { + delay_seconds: 0.0, + disable_scale: 1.0, + item_damage: ItemDamageFunction { + threshold: single(&item["threshold"]), + base: single(&item["base"]), + factor: single(&item["factor"]), + }, + reductions: c["reductions"] + .as_array() + .unwrap() + .iter() + .map(|r| { + let set = r["set"].as_u64().unwrap(); + DamageReduction { + horizontal_angle: single(&r["angle"]), + types: (set != 0).then_some(set), + base: single(&r["base"]), + factor: single(&r["factor"]), + } + }) + .collect(), + }), + } + }) + .collect(); + let mut w = World { + f: &f, + out: &mut out, + components, + calls: 0, + changed: false, + }; + match item_blocking::apply(&mut w, single(&f["damage"])) { + Ok(v) => writeln!(w.out, "blocked {:08x}\nresult ok", bits(v))?, + Err(_) => writeln!(w.out, "result error")?, + }; + writeln!(w.out, "queries {} {}", w.calls, w.changed)?; + writeln!(w.out, "items 1 0 1 0")?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/item_cooldowns_fixture.rs b/crates/horizon-world/examples/item_cooldowns_fixture.rs new file mode 100644 index 000000000..fb92d462f --- /dev/null +++ b/crates/horizon-world/examples/item_cooldowns_fixture.rs @@ -0,0 +1,238 @@ +use horizon_world::{ + component_patch::Prototype, + identifier::Identifier, + item_cooldowns::{self, CooldownUser, ItemCooldowns, Observer, TickError, UseCooldown}, + item_stack_refs::{ItemStacks, StackRef}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +type Book = ItemCooldowns<Identifier>; +type Stack = StackRef<usize, u8, UseCooldown<Identifier>>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn fl(v: &Value, k: &str) -> f32 { + f32::from_bits(v[k].as_u64().unwrap() as u32) +} +fn bits(f: f32) -> u32 { + if f.is_nan() { 0x7fc00000 } else { f.to_bits() } +} +fn group(stack: &Stack) -> Identifier { + let s = stack.read(); + item_cooldowns::group(s.component(&0), || { + Identifier::parse(["minecraft:air", "minecraft:stick", "minecraft:shield"][s.item()]) + .unwrap() + }) +} +fn tick(book: &mut Book, events: &mut Events) -> Result<(), &'static str> { + book.tick(events).map_err(|e| match e { + TickError::Iterator(_) => "modified", + TickError::Observer(e) => e, + }) +} +struct Events { + out: io::BufWriter<fs::File>, + groups: Vec<Identifier>, + stack: Stack, + op: Value, + calls: i32, + quiet: bool, +} +impl Events { + fn snapshot(&mut self, book: &Book) { + let entries = book + .entries() + .map(|(k, v)| format!("{k}={}:{}", v.start, v.end)) + .collect::<Vec<_>>() + .join(","); + writeln!( + self.out, + "state {} {} | {}", + book.tick_count, self.calls, entries + ) + .unwrap(); + writeln!( + self.out, + "stack {} {}", + self.stack.read().count(), + group(&self.stack) + ) + .unwrap(); + } + fn event(&mut self, book: &mut Book, name: String) -> Result<(), &'static str> { + if self.quiet { + return Ok(()); + } + writeln!(self.out, "event {name}").unwrap(); + let index = self.calls; + self.calls += 1; + self.snapshot(book); + if index == n(&self.op, "fail") { + return Err("callback"); + } + if index == n(&self.op, "mutate") { + let other = self.groups[n(&self.op, "other") as usize].clone(); + let after = n(&self.op, "after"); + match self.op["action"].as_str().unwrap() { + "add" => book.add(other, after, self)?, + "remove" => book.remove(other, self)?, + "clock" => book.tick_count = after, + "tick" => tick(book, self)?, + "stack" => { + let mut s = self.stack.write(); + s.count = after; + s.components + .set( + 0, + Some(UseCooldown { + seconds: 1.0, + group: Some(other), + }), + ) + .unwrap(); + } + "none" => {} + _ => panic!(), + } + } + Ok(()) + } +} +impl Observer<Identifier> for Events { + type Error = &'static str; + fn started(&mut self, b: &mut Book, g: Identifier, d: i32) -> Result<(), Self::Error> { + self.event(b, format!("started {g} {d}")) + } + fn ended(&mut self, b: &mut Book, g: Identifier) -> Result<(), Self::Error> { + self.event(b, format!("ended {g}")) + } +} +struct User<'a> { + book: &'a mut Book, + events: &'a mut Events, + player: bool, +} +impl CooldownUser for User<'_> { + type Error = &'static str; + type Stack = Stack; + type Manager = (); + fn is_player(&self) -> bool { + self.player + } + fn cooldowns(&mut self) -> Result<(), Self::Error> { + self.events.event(self.book, "get-cooldowns".into()) + } + fn add_cooldown(&mut self, _: (), stack: Stack, ticks: i32) -> Result<(), Self::Error> { + self.book.add(group(&stack), ticks, self.events) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let groups: Vec<_> = f["groups"] + .as_array() + .unwrap() + .iter() + .map(|v| Identifier::parse(v.as_str().unwrap()).unwrap()) + .collect(); + let store = ItemStacks::new(0); + let stack = store.create(n(&f, "item") as usize, n(&f, "count"), Prototype::new([])); + if f["component"].as_bool().unwrap() { + stack.write().components.set( + 0, + Some(UseCooldown { + seconds: fl(&f, "seconds"), + group: usize::try_from(n(&f, "group")) + .ok() + .map(|i| groups[i].clone()), + }), + )?; + } + let mut events = Events { + out, + groups, + stack, + op: Value::Null, + calls: 0, + quiet: true, + }; + let mut book = Book::default(); + book.tick_count = n(&f, "clock"); + for pair in f["initial"].as_array().unwrap() { + let g = events.groups[pair[0].as_u64().unwrap() as usize].clone(); + book.add(g, pair[1].as_i64().unwrap() as i32, &mut events) + .unwrap(); + } + events.quiet = false; + events.snapshot(&book); + for op in f["ops"].as_array().unwrap() { + events.op = op.clone(); + events.calls = 0; + let result = match op["kind"].as_str().unwrap() { + "add" => book.add( + events.groups[n(op, "group") as usize].clone(), + n(op, "duration"), + &mut events, + ), + "add-stack" => book.add(group(&events.stack), n(op, "duration"), &mut events), + "remove" => { + book.remove(events.groups[n(op, "group") as usize].clone(), &mut events) + } + "tick" => tick(&mut book, &mut events), + "clock" => { + book.tick_count = n(op, "duration"); + Ok(()) + } + "percent" => { + let group = group(&events.stack); + writeln!( + events.out, + "percent {} {}", + bits(book.percent(&group, fl(op, "partial"))), + book.is_on_cooldown(&group) + )?; + Ok(()) + } + "duration" => { + writeln!( + events.out, + "duration {}", + UseCooldown::<Identifier> { + seconds: fl(op, "seconds"), + group: None + } + .ticks() + )?; + Ok(()) + } + "apply" => { + let component = UseCooldown { + seconds: fl(op, "seconds"), + group: Some(events.groups[n(op, "group") as usize].clone()), + }; + let stack = events.stack.clone(); + component.apply( + &mut User { + book: &mut book, + events: &mut events, + player: op["player"].as_bool().unwrap(), + }, + stack, + ) + } + _ => panic!(), + }; + writeln!(events.out, "result {}", result.err().unwrap_or("ok"))?; + events.snapshot(&book); + } + out = events.out; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/item_durability_fixture.rs b/crates/horizon-world/examples/item_durability_fixture.rs new file mode 100644 index 000000000..f051bb91c --- /dev/null +++ b/crates/horizon-world/examples/item_durability_fixture.rs @@ -0,0 +1,132 @@ +use horizon_world::item_durability::{self, DurabilityStack, DurabilityWorld}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn stack(v: &Value, air: bool) -> DurabilityStack { + DurabilityStack { + count: v["count"].as_i64().unwrap() as i32, + air, + max_damage: v["max"].as_i64().map(|v| v as i32), + damage: v["damage"].as_i64().map(|v| v as i32), + unbreakable: v["unbreakable"].as_bool().unwrap(), + } +} +fn optional(v: Option<i32>) -> String { + v.map_or("none".into(), |v| v.to_string()) +} +fn snapshot(s: &DurabilityStack) -> String { + format!( + "{} {} {} {} {} {} {} {} {} {} {} {}", + s.count, + s.count(), + optional(s.max_damage), + optional(s.damage), + s.unbreakable, + s.max_damage(), + s.damage(), + s.is_empty(), + s.is_damageable(), + s.is_damaged(), + s.is_broken(), + s.next_damage_will_break() + ) +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + changed: bool, +} +impl World<'_> { + fn event(&mut self, s: &mut DurabilityStack, name: &str) -> io::Result<()> { + writeln!(self.out, "{name} | {}", snapshot(s))?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected callback failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.changed = true; + *s = stack(&self.f["after"], s.air); + } + Ok(()) + } +} +impl DurabilityWorld for World<'_> { + type Error = io::Error; + type Stack = DurabilityStack; + fn storage_error(error: std::convert::Infallible) -> Self::Error { + match error {} + } + fn infinite_materials(&mut self, s: &mut DurabilityStack) -> io::Result<bool> { + self.event(s, "infinite")?; + Ok(self.f[if self.changed { + "after_infinite" + } else { + "infinite" + }] + .as_bool() + .unwrap()) + } + fn process_enchantments(&mut self, _: &mut DurabilityStack, amount: i32) -> io::Result<i32> { + Ok(item_durability::unenchanted_change(amount)) + } + fn durability_changed(&mut self, s: &mut DurabilityStack, _: i32) -> io::Result<()> { + self.event(s, "criterion") + } + fn broken(&mut self, s: &mut DurabilityStack, copy: DurabilityStack) -> io::Result<()> { + writeln!(self.out, "copy {}", snapshot(©))?; + self.event(s, "break") + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut s = stack(&f["initial"], f["air"].as_bool().unwrap()); + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + changed: false, + }; + let amount = f["amount"].as_i64().unwrap() as i32; + let result = match f["mode"].as_str().unwrap() { + "hurt" => item_durability::hurt_and_break( + &mut s, + &mut w, + amount, + f["player"].as_bool().unwrap(), + ), + "without" => w + .event(&mut s, "level") + .and_then(|()| item_durability::hurt_without_breaking(&mut s, &mut w, amount)), + "set" => { + s.set_damage(amount); + Ok(()) + } + "grow" => { + s.grow(amount); + Ok(()) + } + "shrink" => { + s.shrink(amount); + Ok(()) + } + "query" => Ok(()), + _ => panic!("mode"), + }; + writeln!( + w.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!(w.out, "state {} {} {}", snapshot(&s), w.calls, w.changed)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/item_particles_fixture.rs b/crates/horizon-world/examples/item_particles_fixture.rs new file mode 100644 index 000000000..9eead88ca --- /dev/null +++ b/crates/horizon-world/examples/item_particles_fixture.rs @@ -0,0 +1,194 @@ +use horizon_core::{ + geometry::Vec3, + random::{LegacyRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::{ + component_patch::Prototype, + item_particles::{self, ItemParticleWorld, ParticleError}, + item_stack_refs::{ItemStacks, StackRef}, + item_template::ItemTemplate, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +type Stack = StackRef<u8, u8, i32>; +type Template = ItemTemplate<u8, u8, i32>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn fl(v: &Value, k: &str) -> f32 { + f32::from_bits(v[k].as_u64().unwrap() as u32) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn opt(v: Option<&i32>) -> String { + v.map_or("none".into(), i32::to_string) +} +struct World<'a, R> { + f: Value, + out: &'a mut dyn Write, + stack: Stack, + random: [R; 2], + position: Vec3, + changed: bool, + calls: i32, + first: Option<Template>, +} +impl<R: RandomSource> World<'_, R> { + fn config(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn reset(&mut self) { + let c = self.config().clone(); + let p = &c["position"]; + self.position = Vec3::new( + p[0].as_f64().unwrap(), + p[1].as_f64().unwrap(), + p[2].as_f64().unwrap(), + ); + let mut s = self.stack.write(); + s.count = n(&c, "count"); + s.components + .set(0, c["damage"].as_i64().map(|v| v as i32)) + .unwrap(); + if c["reseed"].as_bool().unwrap() { + for i in 0..2 { + self.random[i].set_seed(c["seeds"][i].as_i64().unwrap()); + } + } + } + fn all(&mut self) { + let s = self.stack.read(); + writeln!( + self.out, + "state {} {} {} {} {} {} {}", + self.calls, + self.changed, + n(self.config(), "random"), + n(self.config(), "level"), + s.item(), + s.count(), + opt(s.component(&0)) + ) + .unwrap(); + } + fn event(&mut self, name: String) -> Result<(), &'static str> { + writeln!(self.out, "event {name}").unwrap(); + let i = self.calls; + self.calls += 1; + self.all(); + if i == n(&self.f, "fail") { + return Err("callback"); + } + if i == n(&self.f, "mutate") { + self.changed = true; + self.reset(); + } + Ok(()) + } +} +impl<R: RandomSource> ItemParticleWorld<u8, u8, i32> for World<'_, R> { + type Error = &'static str; + type Level = i32; + type Source = R; + fn random(&mut self) -> &mut R { + let i = n(self.config(), "random") as usize; + &mut self.random[i] + } + fn pitch(&mut self) -> Result<f32, Self::Error> { + self.event("pitch".into())?; + Ok(fl(self.config(), "pitch")) + } + fn yaw(&mut self) -> Result<f32, Self::Error> { + self.event("yaw".into())?; + Ok(fl(self.config(), "yaw")) + } + fn position(&self) -> Vec3 { + self.position + } + fn eye_y(&mut self) -> Result<f64, Self::Error> { + self.event("eye".into())?; + Ok(self.position.y + f64::from(fl(self.config(), "eye"))) + } + fn level(&mut self) -> Result<i32, Self::Error> { + self.event("level".into())?; + Ok(n(self.config(), "level")) + } + fn add_particle( + &mut self, + level: i32, + t: &Template, + p: Vec3, + v: Vec3, + ) -> Result<(), Self::Error> { + let same = self + .first + .as_ref() + .is_none_or(|first| first.same_reference(t)); + if self.first.is_none() { + self.first = Some(t.clone()); + } + let damage = opt(t.component(&Prototype::new([]), &0)); + self.event(format!( + "particle {level} {} {} {damage} {same} {} {} {} {} {} {}", + t.item(), + t.count(), + bits(p.x), + bits(p.y), + bits(p.z), + bits(v.x), + bits(v.y), + bits(v.z) + )) + } +} +fn run<R: RandomSource>(f: Value, out: &mut dyn Write, make: fn(i64) -> R) { + let random = std::array::from_fn(|i| make(f["seeds"][i].as_i64().unwrap())); + let stack = ItemStacks::new(0).create(n(&f, "item") as u8, 1, Prototype::new([])); + let count = n(&f, "particles"); + let mut w = World { + f, + out, + stack: stack.clone(), + random, + position: Vec3::ZERO, + changed: false, + calls: 0, + first: None, + }; + w.reset(); + w.all(); + let result = item_particles::spawn(&mut w, &stack, 0, count); + let result = match result { + Ok(()) => "ok", + Err(ParticleError::World(e)) => e, + Err(ParticleError::Template(_)) => "template", + }; + writeln!(w.out, "result {result}").unwrap(); + w.all(); + for (i, r) in w.random.iter_mut().enumerate() { + writeln!(w.out, "random {i} {} {}", r.next_long(), r.next_long()).unwrap(); + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + if f["xor"].as_bool().unwrap() { + run(f, &mut out, XoroshiroRandom::new); + } else { + run(f, &mut out, LegacyRandom::new); + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/item_stack_storage_fixture.rs b/crates/horizon-world/examples/item_stack_storage_fixture.rs new file mode 100644 index 000000000..bceb9f797 --- /dev/null +++ b/crates/horizon-world/examples/item_stack_storage_fixture.rs @@ -0,0 +1,208 @@ +use horizon_world::{ + component_patch::{Patch, Prototype}, + item_stack_storage::{CopyResult, ItemStackData}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +type Stack = ItemStackData<u8, usize, i32>; +fn optional(v: Option<i32>) -> String { + v.map_or("none".into(), |v| v.to_string()) +} +fn patch(v: &Value) -> Patch<usize, i32> { + Patch::new(v.as_array().unwrap().iter().map(|v| { + ( + v[0].as_u64().unwrap() as usize, + v[1].as_i64().map(|v| v as i32), + ) + })) +} +fn patch_text(p: &Patch<usize, i32>) -> String { + p.entries() + .iter() + .map(|(k, v)| format!("{k}={}", optional(*v))) + .collect::<Vec<_>>() + .join(",") +} +fn snapshot(s: &Stack, canonical: bool) -> String { + let visible = (0..4) + .map(|k| optional(s.component(&k).copied())) + .collect::<Vec<_>>() + .join(","); + let entries = s + .components + .entries() + .map(|(k, v)| format!("{k}={v}")) + .collect::<Vec<_>>() + .join(","); + format!( + "{} {} {} {} {} {} {} | {} | {} | {} | {}", + canonical, + if canonical { + -1 + } else { + i32::from(s.stored_item()) + }, + s.item(), + s.count, + s.count(), + s.pop_time, + s.is_empty(), + visible, + entries, + patch_text(&s.components.as_patch()), + patch_text(&s.visible_patch()) + ) +} +fn all(out: &mut dyn Write, arena: &[Stack], slots: &[usize; 3]) -> io::Result<()> { + for (i, id) in slots.iter().enumerate() { + writeln!(out, "slot {i} {}", snapshot(&arena[*id], *id == 0))?; + } + for a in 0..3 { + for b in a + 1..3 { + let sa = &arena[slots[a]]; + let sb = &arena[slots[b]]; + writeln!( + out, + "equal {a} {b} {} {} {} {}", + slots[a] == slots[b], + sa.same_item(sb), + sa.same_item_components(sb), + sa.matches(sb) + )?; + } + } + Ok(()) +} +fn append(arena: &mut Vec<Stack>, copy: CopyResult<Stack>) -> usize { + match copy { + CopyResult::Empty => 0, + CopyResult::Stack(s) => { + arena.push(s); + arena.len() - 1 + } + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let prototypes: Vec<_> = f["prototypes"] + .as_array() + .unwrap() + .iter() + .map(|p| { + Prototype::new(p.as_array().unwrap().iter().map(|v| { + ( + v[0].as_u64().unwrap() as usize, + v[1].as_i64().unwrap() as i32, + ) + })) + }) + .collect(); + let mut arena = vec![Stack::new(0, 0, 0, Prototype::new([]))]; + let mut slots = [0; 3]; + for (i, v) in f["stacks"].as_array().unwrap().iter().enumerate() { + let item = v["item"].as_i64().unwrap(); + if item >= 0 { + let mut s = Stack::new( + item as u8, + 0, + v["count"].as_i64().unwrap() as i32, + prototypes[item as usize].clone(), + ); + s.pop_time = v["pop"].as_i64().unwrap() as i32; + s.components.restore_patch(&patch(&v["patch"])); + arena.push(s); + slots[i] = arena.len() - 1; + } + } + all(&mut out, &arena, &slots)?; + for op in f["ops"].as_array().unwrap() { + let a = op["a"].as_u64().unwrap() as usize; + let b = op["b"].as_u64().unwrap() as usize; + let amount = op["amount"].as_i64().unwrap() as i32; + let id = slots[a]; + let mut calls = 0; + let result = (|| -> io::Result<()> { + match op["kind"].as_str().unwrap() { + "count" => arena[id].count = amount, + "pop" => arena[id].pop_time = amount, + "grow" => arena[id].grow(amount), + "shrink" => arena[id].shrink(amount), + "limit" => arena[id].limit_size(amount), + "set" => { + let value = arena[id] + .components + .set( + op["key"].as_u64().unwrap() as usize, + op["value"].as_i64().map(|v| v as i32), + ) + .map_err(io::Error::other)?; + writeln!(out, "old {}", optional(value))?; + } + "copy" | "copy-count" | "copy-clear" | "split" | "transmute" => { + let copy = match op["kind"].as_str().unwrap() { + "copy" => arena[id].copy(), + "copy-count" => arena[id].copy_with_count(amount), + "copy-clear" => arena[id].copy_and_clear(), + "split" => arena[id].split(amount), + _ => { + let item = op["item"].as_u64().unwrap() as usize; + arena[id].transmute_copy( + item as u8, + prototypes[item].clone(), + amount, + ) + } + }; + slots[b] = append(&mut arena, copy); + } + "consume" | "consume-return" => { + let infinite = |s: &mut Stack| -> io::Result<bool> { + writeln!(out, "infinite | {}", snapshot(s, id == 0))?; + calls += 1; + if op["fail"].as_bool().unwrap() { + return Err(io::Error::other("injected callback failure")); + } + if op["mutate"].as_bool().unwrap() { + s.count = op["after_count"].as_i64().unwrap() as i32; + s.pop_time = op["after_pop"].as_i64().unwrap() as i32; + for pair in op["after_components"].as_array().unwrap() { + s.components + .set( + pair[0].as_u64().unwrap() as usize, + pair[1].as_i64().map(|v| v as i32), + ) + .map_err(io::Error::other)?; + } + } + Ok(op["infinite"].as_bool().unwrap()) + }; + let actor = op["actor"].as_bool().unwrap(); + if op["kind"] == "consume" { + arena[id].consume(amount, actor, infinite)?; + } else { + let copy = arena[id].consume_and_return(amount, actor, infinite)?; + slots[b] = append(&mut arena, copy); + } + } + _ => panic!("operation"), + }; + Ok(()) + })(); + writeln!( + out, + "result {} {calls}", + if result.is_ok() { "ok" } else { "error" } + )?; + all(&mut out, &arena, &slots)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/item_template_fixture.rs b/crates/horizon-world/examples/item_template_fixture.rs new file mode 100644 index 000000000..6a8df6cc0 --- /dev/null +++ b/crates/horizon-world/examples/item_template_fixture.rs @@ -0,0 +1,237 @@ +use horizon_world::{ + component_patch::{Patch, Prototype}, + item_stack_refs::{ItemStacks, StackRef}, + item_stack_storage::ItemStackData, + item_template::{self, ItemTemplate, ValidationRules}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +type Stack = StackRef<u8, usize, i32>; +type Template = ItemTemplate<u8, usize, i32>; +struct Rules; +impl ValidationRules<u8, usize, i32> for Rules { + type ContentsError = std::convert::Infallible; + fn has_max_damage(&self, s: &ItemStackData<u8, usize, i32>) -> bool { + s.component(&1).is_some() + } + fn max_stack_size(&self, s: &ItemStackData<u8, usize, i32>) -> i32 { + s.component(&0).copied().unwrap_or(1) + } + fn validate_contents( + &self, + _: &ItemStackData<u8, usize, i32>, + ) -> Result<(), Self::ContentsError> { + Ok(()) + } +} +fn opt(v: Option<i32>) -> String { + v.map_or("none".into(), |v| v.to_string()) +} +fn patch(v: &Value) -> Patch<usize, i32> { + Patch::new(v.as_array().unwrap().iter().map(|v| { + ( + v[0].as_u64().unwrap() as usize, + v[1].as_i64().map(|n| n as i32), + ) + })) +} +fn proto(v: &Value) -> Prototype<usize, i32> { + Prototype::new(v.as_array().unwrap().iter().map(|v| { + ( + v[0].as_u64().unwrap() as usize, + v[1].as_i64().unwrap() as i32, + ) + })) +} +fn patch_text(p: &Patch<usize, i32>) -> String { + p.entries() + .iter() + .map(|(k, v)| format!("{k}={}", opt(*v))) + .collect::<Vec<_>>() + .join(",") +} +fn all( + out: &mut dyn Write, + stacks: &[Stack], + templates: &[Option<Template>], + prototypes: &[Prototype<usize, i32>], + store: &ItemStacks<u8, usize, i32>, +) -> io::Result<()> { + for (i, s) in stacks.iter().enumerate() { + let data = s.read(); + let values = (0..3) + .map(|k| opt(data.component(&k).copied())) + .collect::<Vec<_>>() + .join(","); + writeln!( + out, + "stack {i} {} {} {} {} {} {} {} | {} | {}", + s.same_reference(&store.empty()), + data.item(), + data.count, + data.count(), + data.pop_time, + data.is_empty(), + item_template::validate_strict(&data, &Rules).is_ok(), + values, + patch_text(&data.components.as_patch()) + )?; + } + for (i, t) in templates.iter().enumerate() { + if let Some(t) = t { + let values = (0..3) + .map(|k| opt(t.component(&prototypes[t.item() as usize], &k).copied())) + .collect::<Vec<_>>() + .join(","); + writeln!( + out, + "template {i} {} {} | {} | {}", + t.item(), + t.count(), + values, + patch_text(t.patch()) + )?; + } else { + writeln!(out, "template {i} none")?; + } + } + for a in 0..3 { + for b in a + 1..3 { + let same = match (&templates[a], &templates[b]) { + (None, None) => true, + (Some(a), Some(b)) => a.same_reference(b), + _ => false, + }; + writeln!( + out, + "same {a} {b} {} {same}", + stacks[a].same_reference(&stacks[b]) + )?; + } + } + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let store = ItemStacks::new(0); + let mut prototypes: Vec<_> = f["prototypes"] + .as_array() + .unwrap() + .iter() + .map(proto) + .collect(); + let mut stacks: Vec<_> = f["stacks"] + .as_array() + .unwrap() + .iter() + .map(|v| { + let id = v["item"].as_i64().unwrap(); + if id < 0 { + store.empty() + } else { + let s = store.create( + id as u8, + v["count"].as_i64().unwrap() as i32, + prototypes[id as usize].clone(), + ); + s.write().pop_time = 5; + s.write().components.restore_patch(&patch(&v["patch"])); + s + } + }) + .collect(); + let mut templates: Vec<Option<Template>> = vec![None, None, None]; + all(&mut out, &stacks, &templates, &prototypes, &store)?; + for op in f["ops"].as_array().unwrap() { + let a = op["a"].as_u64().unwrap() as usize; + let b = op["b"].as_u64().unwrap() as usize; + let n = op["count"].as_i64().unwrap() as i32; + let result: Result<(), ()> = (|| { + match op["kind"].as_str().unwrap() { + "new" => { + templates[b] = Some( + Template::new( + op["item"].as_u64().unwrap() as u8, + 0, + n, + patch(&op["patch"]), + ) + .map_err(|_| ())?, + ) + } + "from" => { + templates[b] = + Some(Template::from_stack(&stacks[a].read(), 0).map_err(|_| ())?) + } + "from-nonempty" => { + templates[b] = Some( + Template::from_non_empty_stack(&stacks[a].read(), 0).map_err(|_| ())?, + ) + } + "from-count" => { + templates[b] = Some( + Template::from_non_empty_stack_with_count(&stacks[a].read(), 0, n) + .map_err(|_| ())?, + ) + } + "with" => { + templates[b] = Some( + templates[a] + .as_ref() + .ok_or(())? + .with_count(n) + .map_err(|_| ())?, + ) + } + "create" => { + let t = templates[a].as_ref().ok_or(())?; + stacks[b] = t + .create(&store, prototypes[t.item() as usize].clone(), &Rules) + .0; + } + "apply" | "apply-count" => { + let t = templates[a].as_ref().ok_or(())?; + let count = if op["kind"] == "apply" { t.count() } else { n }; + stacks[b] = t + .apply( + &store, + prototypes[t.item() as usize].clone(), + count, + &patch(&op["patch"]), + &Rules, + ) + .0; + } + "validate-patch" => { + let _ = item_template::apply_validated( + &mut stacks[a].write(), + &patch(&op["patch"]), + &Rules, + ); + } + "count" => stacks[a].write().count = n, + "prototype" => { + prototypes[op["item"].as_u64().unwrap() as usize] = proto(&op["prototype"]) + } + _ => panic!(), + } + Ok(()) + })(); + writeln!( + out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + all(&mut out, &stacks, &templates, &prototypes, &store)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/item_use_catalog_fixture.rs b/crates/horizon-world/examples/item_use_catalog_fixture.rs new file mode 100644 index 000000000..406ba521d --- /dev/null +++ b/crates/horizon-world/examples/item_use_catalog_fixture.rs @@ -0,0 +1,73 @@ +use horizon_world::item_use_catalog::{ItemUseCatalog, ItemUseStack}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn float(v: &Value) -> Option<f32> { + v.as_str() + .map(|s| f32::from_bits(u32::from_str_radix(s, 16).unwrap())) +} +fn snapshot(out: &mut dyn Write, s: &ItemUseStack<'_>) -> io::Result<()> { + let d = s.durability(); + writeln!( + out, + "stack {} {} {} {} {} {} {} {} {} {} {} {} {}", + if s.is_empty() { + 0 + } else { + s.definition().id().raw() + }, + d.count(), + s.max_stack_size(), + d.max_damage(), + d.damage(), + s.is_empty(), + d.is_damageable(), + d.is_damaged(), + d.is_broken(), + d.next_damage_will_break(), + s.is_stackable(), + s.use_duration(), + s.use_on_release() + ) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let catalog = ItemUseCatalog::from_json(&serde_json::from_str(&fs::read_to_string( + dir.join("catalog.json"), + )?)?)?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut s = catalog + .by_name(f["name"].as_str().unwrap()) + .unwrap() + .stack(f["count"].as_i64().unwrap() as i32); + snapshot(&mut out, &s)?; + for op in f["ops"].as_array().unwrap() { + let v = &op["value"]; + match op["kind"].as_str().unwrap() { + "count" => s.count = v.as_i64().unwrap() as i32, + "set-damage" => { + let mut d = s.durability(); + d.set_damage(v.as_i64().unwrap() as i32); + s.components.damage = d.damage; + } + "damage" => s.components.damage = v.as_i64().map(|v| v as i32), + "max-damage" => s.components.max_damage = v.as_i64().map(|v| v as i32), + "max-stack" => s.components.max_stack_size = v.as_i64().map(|v| v as i32), + "unbreakable" => s.components.unbreakable = v.as_bool().unwrap(), + "consume" => s.components.consume_seconds = float(v), + "blocking" => s.components.block_delay_seconds = float(v), + "kinetic" => s.components.kinetic_weapon = v.as_bool().unwrap(), + "instrument" => s.components.instrument_seconds = float(v), + _ => panic!("operation"), + }; + snapshot(&mut out, &s)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/item_use_fixture.rs b/crates/horizon-world/examples/item_use_fixture.rs new file mode 100644 index 000000000..74436d1f3 --- /dev/null +++ b/crates/horizon-world/examples/item_use_fixture.rs @@ -0,0 +1,145 @@ +use horizon_world::{ + blocking_rules::{BlockingRules, ItemDamageFunction}, + item_use::{self, ItemUseWorld}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + changed: bool, + item: usize, + remaining: i32, + delays: [Option<i32>; 2], +} +impl World<'_> { + fn state(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn reset(&mut self) { + self.item = self.state()["item"].as_u64().unwrap() as usize; + self.remaining = self.state()["remaining"].as_i64().unwrap() as i32; + } + fn event(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected use callback failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.changed = true; + self.reset(); + } + Ok(()) + } +} +impl ItemUseWorld for World<'_> { + type Error = io::Error; + type Item = usize; + type ItemType = usize; + fn using_item(&mut self) -> io::Result<bool> { + self.event("using")?; + Ok(self.state()["using"].as_bool().unwrap()) + } + fn use_item(&self) -> usize { + self.item + } + fn blocking_delay(&self, item: usize) -> Option<i32> { + self.delays.get(item).copied().flatten() + } + fn item_type(&self, item: usize) -> usize { + if item == 1 && self.f["shared_type"].as_bool().unwrap() { + 0 + } else { + item + } + } + fn use_duration(&mut self, kind: usize, item: usize) -> io::Result<i32> { + if kind == 2 { + return Ok(0); + } + self.event(&format!("duration {kind} {item}"))?; + Ok(self.state()["durations"][kind].as_i64().unwrap() as i32) + } + fn remaining_ticks(&self) -> i32 { + self.remaining + } + fn remaining_ticks_virtual(&mut self) -> io::Result<i32> { + self.event("remaining")?; + Ok(self.state()["virtual_remaining"].as_i64().unwrap() as i32) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let delays = std::array::from_fn(|i| { + let c = &f["components"][i]; + c["present"].as_bool().unwrap().then(|| { + BlockingRules::<()> { + delay_seconds: single(&c["delay"]), + disable_scale: 1.0, + reductions: vec![], + item_damage: ItemDamageFunction { + threshold: 0.0, + base: 0.0, + factor: 0.0, + }, + } + .delay_ticks() + }) + }); + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + changed: false, + item: 0, + remaining: 0, + delays, + }; + w.reset(); + let result = match f["mode"].as_str().unwrap() { + "blocking" => item_use::blocking_item(&mut w) + .and_then(|v| writeln!(w.out, "item {}", v.map_or(-1, |v| v as i32))), + "is-blocking" => { + item_use::is_blocking(&mut w).and_then(|v| writeln!(w.out, "bool {v}")) + } + "ticks" => { + item_use::ticks_using_item(&mut w).and_then(|v| writeln!(w.out, "ticks {v}")) + } + "partial" => item_use::ticks_using_item_partial(&mut w, single(&f["partial"])) + .and_then(|v| writeln!(w.out, "float {:08x}", bits(v))), + _ => panic!("mode"), + }; + writeln!( + w.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!( + w.out, + "state {} {} {} {}", + w.item, w.remaining, w.calls, w.changed + )?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/item_use_lifecycle_fixture.rs b/crates/horizon-world/examples/item_use_lifecycle_fixture.rs new file mode 100644 index 000000000..404f6ba17 --- /dev/null +++ b/crates/horizon-world/examples/item_use_lifecycle_fixture.rs @@ -0,0 +1,234 @@ +use horizon_world::{ + component_patch::Prototype, + item_stack_refs::{ItemStacks, StackRef}, + item_use_lifecycle::{self, UseLifecycleWorld, UseState}, +}; +type Stack = StackRef<usize, u8, i32>; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + changed: bool, + using: bool, + hands: [usize; 2], + items: [Stack; 3], +} +impl World<'_> { + fn state(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn reset(&mut self, s: &mut UseState<Stack>) { + s.item = self.items[self.state()["item"].as_u64().unwrap() as usize].clone(); + s.remaining = self.state()["remaining"].as_i64().unwrap() as i32; + s.has_recent_kinetic_enemies = self.state()["kinetic"].as_bool().unwrap(); + self.using = self.state()["using"].as_bool().unwrap(); + self.hands = std::array::from_fn(|i| self.state()["hands"][i].as_u64().unwrap() as usize); + } + fn event(&mut self, s: &mut UseState<Stack>, name: &str) -> io::Result<()> { + writeln!(self.out, "{name}")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected lifecycle failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.changed = true; + self.reset(s); + } + Ok(()) + } + fn id(&self, item: &Stack) -> usize { + self.items + .iter() + .position(|s| s.same_reference(item)) + .unwrap() + } + fn kind(&self, item: &Stack) -> usize { + item.read().item() + } +} +impl UseLifecycleWorld for World<'_> { + type Error = io::Error; + type Item = Stack; + type Hand = usize; + type Level = usize; + fn empty_item(&self) -> Stack { + self.items[2].clone() + } + fn is_empty(&self, item: Stack) -> bool { + item.read().is_empty() + } + fn same_item_type(&self, a: Stack, b: Stack) -> bool { + a.read().same_item(&b.read()) + } + fn using_item(&mut self, s: &mut UseState<Stack>) -> io::Result<bool> { + self.event(s, "using")?; + Ok(self.using) + } + fn used_hand(&mut self, s: &mut UseState<Stack>) -> io::Result<usize> { + self.event(s, "hand")?; + Ok(self.state()["hand"].as_u64().unwrap() as usize) + } + fn hand_item(&mut self, s: &mut UseState<Stack>, hand: usize) -> io::Result<Stack> { + self.event(s, &format!("get-hand {hand}"))?; + Ok(self.items[self.hands[hand]].clone()) + } + fn set_hand_item( + &mut self, + s: &mut UseState<Stack>, + hand: usize, + item: Stack, + ) -> io::Result<()> { + self.event(s, &format!("set-hand {hand} {}", self.id(&item)))?; + self.hands[hand] = self.id(&item); + Ok(()) + } + fn level(&mut self, s: &mut UseState<Stack>) -> io::Result<usize> { + self.event(s, "level")?; + Ok(self.state()["level"].as_u64().unwrap() as usize) + } + fn is_client(&mut self, s: &mut UseState<Stack>, level: usize) -> io::Result<bool> { + self.event(s, &format!("client {level}"))?; + Ok(self.state()["clients"][level].as_bool().unwrap()) + } + fn remaining_ticks(&mut self, s: &mut UseState<Stack>) -> io::Result<i32> { + self.event(s, "remaining")?; + Ok(self.state()["virtual_remaining"].as_i64().unwrap() as i32) + } + fn item_tick( + &mut self, + s: &mut UseState<Stack>, + item: Stack, + level: usize, + remaining: i32, + ) -> io::Result<()> { + let kind = self.kind(&item); + if kind == 2 { + return Ok(()); + } + self.event( + s, + &format!("tick {kind} {} {level} {remaining}", self.id(&item)), + ) + } + fn use_on_release(&mut self, s: &mut UseState<Stack>, item: Stack) -> io::Result<bool> { + let kind = self.kind(&item); + if kind == 2 { + return Ok(false); + } + self.event(s, &format!("release-query {kind} {}", self.id(&item)))?; + Ok(self.state()["releases"][kind].as_bool().unwrap()) + } + fn release_item( + &mut self, + s: &mut UseState<Stack>, + item: Stack, + level: usize, + remaining: i32, + ) -> io::Result<()> { + let kind = self.kind(&item); + if kind == 2 { + return Ok(()); + } + self.event( + s, + &format!("release {kind} {} {level} {remaining}", self.id(&item)), + ) + } + fn finish_item( + &mut self, + s: &mut UseState<Stack>, + item: Stack, + level: usize, + ) -> io::Result<Stack> { + let kind = self.kind(&item); + if kind == 2 { + return Ok(item); + } + self.event(s, &format!("finish {kind} {} {level}", self.id(&item)))?; + Ok(self.items[self.state()["finishes"][kind].as_u64().unwrap() as usize].clone()) + } + fn set_using_flag(&mut self, s: &mut UseState<Stack>, using: bool) -> io::Result<()> { + self.event(s, &format!("flag {using}"))?; + self.using = using; + Ok(()) + } + fn finish_vibration(&mut self, s: &mut UseState<Stack>, item: Stack) -> io::Result<()> { + if self.id(&item) < 2 && self.f["vibrations"][self.id(&item)].as_bool().unwrap() { + self.event(s, "vibration")?; + } + Ok(()) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let stacks = ItemStacks::new(2); + let items = [ + stacks.create(0, 1, Prototype::new([])), + stacks.create( + if f["shared_type"].as_bool().unwrap() { + 0 + } else { + 1 + }, + 1, + Prototype::new([]), + ), + stacks.empty(), + ]; + let mut s = UseState { + item: items[2].clone(), + remaining: 0, + has_recent_kinetic_enemies: false, + }; + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + changed: false, + using: false, + hands: [2, 2], + items, + }; + w.reset(&mut s); + let result = match f["mode"].as_str().unwrap() { + "tick" => item_use_lifecycle::tick(&mut w, &mut s), + "update" => { + let item = w.items[f["argument"].as_u64().unwrap() as usize].clone(); + item_use_lifecycle::update(&mut w, &mut s, item) + } + "complete" => item_use_lifecycle::complete(&mut w, &mut s), + "release" => item_use_lifecycle::release(&mut w, &mut s), + "stop" => item_use_lifecycle::stop(&mut w, &mut s), + _ => panic!("mode"), + }; + writeln!( + w.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!( + w.out, + "state {} {} {} {} {} {} {} {}", + w.id(&s.item), + s.remaining, + s.has_recent_kinetic_enemies, + w.using, + w.hands[0], + w.hands[1], + w.calls, + w.changed + )?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/item_use_start_fixture.rs b/crates/horizon-world/examples/item_use_start_fixture.rs new file mode 100644 index 000000000..19cb859f8 --- /dev/null +++ b/crates/horizon-world/examples/item_use_start_fixture.rs @@ -0,0 +1,247 @@ +use horizon_world::item_use_lifecycle::{UseLifecycleWorld, UseState}; +use horizon_world::item_use_start::{self, StartUseWorld}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + changed: bool, + using: bool, + hands: [usize; 2], + off: bool, + kinetic_count: i32, +} +impl World<'_> { + fn state(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn reset(&mut self, s: &mut UseState<usize>) { + s.item = self.state()["item"].as_u64().unwrap() as usize; + s.remaining = self.state()["remaining"].as_i64().unwrap() as i32; + s.has_recent_kinetic_enemies = self.state()["kinetic"].as_bool().unwrap(); + self.using = self.state()["using"].as_bool().unwrap(); + self.off = self.state()["off"].as_bool().unwrap(); + self.kinetic_count = if s.has_recent_kinetic_enemies { 1 } else { -1 }; + self.hands = std::array::from_fn(|i| self.state()["hands"][i].as_u64().unwrap() as usize); + } + fn event(&mut self, s: &mut UseState<usize>, name: &str) -> io::Result<()> { + writeln!(self.out, "{name}")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected lifecycle failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.changed = true; + self.reset(s); + } + Ok(()) + } + fn kind(&self, item: usize) -> usize { + if item == 1 && self.f["shared_type"].as_bool().unwrap() { + 0 + } else { + item + } + } +} +impl UseLifecycleWorld for World<'_> { + type Error = io::Error; + type Item = usize; + type Hand = usize; + type Level = usize; + fn empty_item(&self) -> usize { + 2 + } + fn is_empty(&self, item: usize) -> bool { + item == 2 + } + fn same_item_type(&self, a: usize, b: usize) -> bool { + self.kind(a) == self.kind(b) + } + fn using_item(&mut self, s: &mut UseState<usize>) -> io::Result<bool> { + self.event(s, "using")?; + Ok(self.using) + } + fn used_hand(&mut self, s: &mut UseState<usize>) -> io::Result<usize> { + self.event(s, "hand")?; + Ok(self.state()["hand"].as_u64().unwrap() as usize) + } + fn hand_item(&mut self, s: &mut UseState<usize>, hand: usize) -> io::Result<usize> { + self.event(s, &format!("get-hand {hand}"))?; + Ok(self.hands[hand]) + } + fn set_hand_item( + &mut self, + s: &mut UseState<usize>, + hand: usize, + item: usize, + ) -> io::Result<()> { + self.event(s, &format!("set-hand {hand} {item}"))?; + self.hands[hand] = item; + Ok(()) + } + fn level(&mut self, s: &mut UseState<usize>) -> io::Result<usize> { + self.event(s, "level")?; + Ok(self.state()["level"].as_u64().unwrap() as usize) + } + fn is_client(&mut self, s: &mut UseState<usize>, level: usize) -> io::Result<bool> { + self.event(s, &format!("client {level}"))?; + Ok(self.state()["clients"][level].as_bool().unwrap()) + } + fn remaining_ticks(&mut self, s: &mut UseState<usize>) -> io::Result<i32> { + self.event(s, "remaining")?; + Ok(self.state()["virtual_remaining"].as_i64().unwrap() as i32) + } + fn item_tick( + &mut self, + s: &mut UseState<usize>, + item: usize, + level: usize, + remaining: i32, + ) -> io::Result<()> { + let kind = self.kind(item); + if kind == 2 { + return Ok(()); + } + self.event(s, &format!("tick {kind} {item} {level} {remaining}")) + } + fn use_on_release(&mut self, s: &mut UseState<usize>, item: usize) -> io::Result<bool> { + let kind = self.kind(item); + if kind == 2 { + return Ok(false); + } + self.event(s, &format!("release-query {kind} {item}"))?; + Ok(self.state()["releases"][kind].as_bool().unwrap()) + } + fn release_item( + &mut self, + s: &mut UseState<usize>, + item: usize, + level: usize, + remaining: i32, + ) -> io::Result<()> { + let kind = self.kind(item); + if kind == 2 { + return Ok(()); + } + self.event(s, &format!("release {kind} {item} {level} {remaining}")) + } + fn finish_item( + &mut self, + s: &mut UseState<usize>, + item: usize, + level: usize, + ) -> io::Result<usize> { + let kind = self.kind(item); + if kind == 2 { + return Ok(item); + } + self.event(s, &format!("finish {kind} {item} {level}"))?; + Ok(self.state()["finishes"][kind].as_u64().unwrap() as usize) + } + fn set_using_flag(&mut self, s: &mut UseState<usize>, using: bool) -> io::Result<()> { + self.event(s, &format!("flag 1 {using}"))?; + self.using = using; + Ok(()) + } + fn finish_vibration(&mut self, s: &mut UseState<usize>, item: usize) -> io::Result<()> { + if item < 2 && self.f["vibrations"][item].as_bool().unwrap() { + self.event(s, "vibration")?; + } + Ok(()) + } +} +impl StartUseWorld for World<'_> { + fn duration(&mut self, s: &mut UseState<usize>, item: usize) -> io::Result<i32> { + let kind = self.kind(item); + if kind == 2 { + return Ok(0); + } + self.event(s, &format!("duration {kind} {item}"))?; + Ok(self.state()["durations"][kind].as_i64().unwrap() as i32) + } + fn synchronize_equipment( + &mut self, + s: &mut UseState<usize>, + level: usize, + hand: usize, + item: usize, + ) -> io::Result<()> { + self.event(s, &format!("chunks {level}"))?; + self.event(s, "id")?; + self.event(s, &format!("equipment {level} {hand} {item} 17")) + } + fn is_off_hand(&self, hand: usize) -> bool { + hand == 1 + } + fn set_off_hand_flag(&mut self, s: &mut UseState<usize>, off: bool) -> io::Result<()> { + self.event(s, &format!("flag 2 {off}"))?; + self.off = off; + Ok(()) + } + fn start_vibration(&mut self, s: &mut UseState<usize>, item: usize) -> io::Result<()> { + if item < 2 && self.f["vibrations"][item].as_bool().unwrap() { + self.event(s, "vibration-start")?; + } + Ok(()) + } + fn has_kinetic_weapon(&self, item: usize) -> bool { + item < 2 && self.f["kinetic_items"][item].as_bool().unwrap() + } + fn reset_recent_kinetic_enemies(&mut self, s: &mut UseState<usize>) { + s.has_recent_kinetic_enemies = true; + self.kinetic_count = 0; + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut s = UseState { + item: 2, + remaining: 0, + has_recent_kinetic_enemies: false, + }; + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + changed: false, + using: false, + hands: [2, 2], + off: false, + kinetic_count: -1, + }; + w.reset(&mut s); + let result = + item_use_start::start(&mut w, &mut s, f["start_hand"].as_u64().unwrap() as usize); + writeln!( + w.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!( + w.out, + "state {} {} {} {} {} {} {} {} {} {}", + s.item, + s.remaining, + s.has_recent_kinetic_enemies, + w.using, + w.hands[0], + w.hands[1], + w.calls, + w.changed, + w.off, + w.kinetic_count + )?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/java_hash_map_fixture.rs b/crates/horizon-world/examples/java_hash_map_fixture.rs new file mode 100644 index 000000000..cc2f6860d --- /dev/null +++ b/crates/horizon-world/examples/java_hash_map_fixture.rs @@ -0,0 +1,111 @@ +use horizon_world::java_hash_map::{CursorError, JavaHashMap, JavaKey}; +use serde_json::Value; +use std::{ + cmp::Ordering, + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone, Eq, PartialEq)] +struct Key { + id: usize, + hash: i32, +} +impl Ord for Key { + fn cmp(&self, other: &Self) -> Ordering { + self.id.cmp(&other.id) + } +} +impl PartialOrd for Key { + fn partial_cmp(&self, other: &Self) -> Option<Ordering> { + Some(self.cmp(other)) + } +} +impl JavaKey for Key { + fn java_hash(&self) -> i32 { + self.hash + } + fn comparable_compare(&self, other: &Self) -> Option<Ordering> { + Some(self.cmp(other)) + } + fn tie_break(&self, other: &Self) -> Ordering { + self.cmp(other) + } +} +fn opt(v: Option<i32>) -> String { + v.map_or("none".into(), |v| v.to_string()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let keys: Vec<_> = f["hashes"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(id, v)| Key { + id, + hash: v.as_i64().unwrap() as i32, + }) + .collect(); + let mut map = JavaHashMap::default(); + let mut cursor = map.cursor(); + for op in f["ops"].as_array().unwrap() { + let k = op[1].as_u64().unwrap() as usize; + let result: Result<String, CursorError> = match op[0].as_str().unwrap() { + "put" => Ok(format!( + "old {}", + opt(map.put(keys[k].clone(), op[2].as_i64().unwrap() as i32)) + )), + "remove" => Ok(format!("old {}", opt(map.remove(&keys[k])))), + "get" => Ok(format!("get {}", opt(map.get(&keys[k]).copied()))), + "clear" => { + map.clear(); + Ok("clear".into()) + } + "cursor" => { + cursor = map.cursor(); + Ok("cursor".into()) + } + "next" | "force-next" => { + if cursor.has_next() || op[0] == "force-next" { + map.next_entry(&mut cursor).map(|e| { + e.map_or("next none".into(), |(k, v)| format!("next {}={v}", k.id)) + }) + } else { + Ok("next none".into()) + } + } + "delete" => map.remove_current(&mut cursor).map(|()| "delete".into()), + _ => panic!(), + }; + writeln!( + out, + "{}", + match result { + Ok(s) => s, + Err(CursorError::ConcurrentModification) => "error modified".into(), + Err(CursorError::NoCurrentEntry) => "error current".into(), + Err(e) => panic!("{e:?}"), + } + )?; + let entries = map + .entries() + .map(|(k, v)| format!("{}={v}", k.id)) + .collect::<Vec<_>>() + .join(","); + writeln!( + out, + "map {} {} {} | {}", + map.len(), + map.is_empty(), + cursor.has_next(), + entries + )?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/java_identity_map_fixture.rs b/crates/horizon-world/examples/java_identity_map_fixture.rs new file mode 100644 index 000000000..c73d20f7d --- /dev/null +++ b/crates/horizon-world/examples/java_identity_map_fixture.rs @@ -0,0 +1,147 @@ +use horizon_world::java_hash_map::{CursorError, JavaHashMap, JavaKey}; +use serde_json::Value; +use std::{ + cmp::Ordering, + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone)] +struct Key { + object: usize, + id: i32, + hash: i32, + kind: i32, + identity: i32, +} +impl PartialEq for Key { + fn eq(&self, other: &Self) -> bool { + self.kind == other.kind && self.id == other.id + } +} +impl Eq for Key {} +impl JavaKey for Key { + fn java_hash(&self) -> i32 { + self.hash + } + fn comparable_compare(&self, other: &Self) -> Option<Ordering> { + if self.kind != other.kind { + None + } else { + match self.kind { + 2 => Some((self.id % 4).cmp(&(other.id % 4))), + 3 => Some(self.id.cmp(&other.id)), + _ => None, + } + } + } + fn tie_break(&self, other: &Self) -> Ordering { + self.kind.cmp(&other.kind).then_with(|| { + if self.identity <= other.identity { + Ordering::Less + } else { + Ordering::Greater + } + }) + } +} +fn opt(v: Option<i32>) -> String { + v.map_or("none".into(), |v| v.to_string()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let side = std::env::args().nth(2).unwrap(); + let mut out = io::BufWriter::new(fs::File::create(dir.join(format!("rust-{side}.txt")))?); + for line in fs::read_to_string(dir.join(format!("inputs-{side}.txt")))?.lines() { + let f: Value = serde_json::from_str(line)?; + let keys: Vec<_> = f["keys"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(object, v)| Key { + object, + id: v["id"].as_i64().unwrap() as i32, + hash: v["hash"].as_i64().unwrap() as i32, + kind: v["kind"].as_i64().unwrap() as i32, + identity: f["identities"][object].as_i64().unwrap() as i32, + }) + .collect(); + let mut map = JavaHashMap::default(); + let mut cursor = map.cursor(); + let mut saved = JavaHashMap::default(); + for op in f["ops"].as_array().unwrap() { + let k = op[1].as_u64().unwrap() as usize; + let result: Result<String, CursorError> = match op[0].as_str().unwrap() { + "put" => Ok(format!( + "old {}", + opt(map.put(keys[k].clone(), op[2].as_i64().unwrap() as i32)) + )), + "remove" => Ok(format!("old {}", opt(map.remove(&keys[k])))), + "get" => Ok(format!("get {}", opt(map.get(&keys[k]).copied()))), + "copy" => { + map = map.copied(); + cursor = map.cursor(); + Ok("copy".into()) + } + "save" => { + saved = map.copied(); + Ok("save".into()) + } + "swap" => { + std::mem::swap(&mut map, &mut saved); + cursor = map.cursor(); + Ok("swap".into()) + } + "clear" => { + map.clear(); + Ok("clear".into()) + } + "cursor" => { + cursor = map.cursor(); + Ok("cursor".into()) + } + "next" | "force-next" => { + if cursor.has_next() || op[0] == "force-next" { + map.next_entry(&mut cursor).map(|e| { + e.map_or("next none".into(), |(k, v)| { + format!("next {}={v}", k.object) + }) + }) + } else { + Ok("next none".into()) + } + } + "delete" => map.remove_current(&mut cursor).map(|()| "delete".into()), + _ => panic!(), + }; + writeln!( + out, + "{}", + match result { + Ok(s) => s, + Err(CursorError::ConcurrentModification) => "error modified".into(), + Err(CursorError::NoCurrentEntry) => "error current".into(), + Err(e) => panic!("{e:?}"), + } + )?; + for (name, current) in [("map", &map), ("saved", &saved)] { + let entries = current + .entries() + .map(|(k, v)| format!("{}={v}", k.object)) + .collect::<Vec<_>>() + .join(","); + writeln!( + out, + "{name} {} {} {} | {}", + current.len(), + current.is_empty(), + cursor.has_next(), + entries + )?; + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/level_place_fixture.rs b/crates/horizon-world/examples/level_place_fixture.rs new file mode 100644 index 000000000..a8f00edd1 --- /dev/null +++ b/crates/horizon-world/examples/level_place_fixture.rs @@ -0,0 +1,107 @@ +//! Rust side of `tools/test_level_place_parity.py`: evaluates +//! `Behaviours::placement_state` for generated neighbourhoods. +use horizon_core::{ + geometry::{Direction, Vec3}, + position::{BlockPos, ChunkPos}, + random::LegacyRandom, +}; +use horizon_world::{ + level::{Behaviours, LevelAccess, PlaceContext, Ticks, data::load_registry}, + registry::BlockStateId, +}; +use serde_json::Value; +use std::{ + collections::HashMap, + io::{BufRead, Write}, + path::Path, +}; + +struct Cells { + cells: HashMap<BlockPos, BlockStateId>, + air: BlockStateId, + random: LegacyRandom, +} +impl LevelAccess for Cells { + fn block_state(&self, pos: BlockPos) -> BlockStateId { + self.cells.get(&pos).copied().unwrap_or(self.air) + } + fn set_raw(&mut self, _pos: BlockPos, _state: BlockStateId) -> Option<BlockStateId> { + None + } + fn is_loaded(&self, _pos: BlockPos) -> bool { + true + } + fn random(&mut self) -> &mut LegacyRandom { + &mut self.random + } + fn game_time(&self) -> i64 { + 0 + } +} + +fn main() -> Result<(), Box<dyn std::error::Error>> { + let mut args = std::env::args().skip(1); + let resources = args.next().expect("resource directory"); + let cases = args.next().expect("case file"); + let output = args.next().expect("output file"); + let resources = Path::new(&resources); + let registry = load_registry(resources)?; + let behaviours = Behaviours::load(®istry, resources)?; + let air = registry.default_state("minecraft:air").unwrap(); + let mut out = std::io::BufWriter::new(std::fs::File::create(output)?); + for line in std::io::BufReader::new(std::fs::File::open(cases)?).lines() { + let case: Value = serde_json::from_str(&line?)?; + let mut cells = HashMap::new(); + for cell in case["cells"].as_array().unwrap() { + let c: Vec<i64> = cell + .as_array() + .unwrap() + .iter() + .map(|v| v.as_i64().unwrap()) + .collect(); + cells.insert( + BlockPos::new(c[0] as i32, c[1] as i32, c[2] as i32), + BlockStateId(c[3] as u32), + ); + } + let mut level = Cells { + cells, + air, + random: LegacyRandom::new(case["seed"].as_i64().unwrap()), + }; + let mut ticks = Ticks::new(0); + for x in -2..=2 { + for z in -2..=2 { + ticks.add_empty_chunk(ChunkPos::new(x, z))?; + } + } + let p: Vec<i32> = case["pos"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_i64().unwrap() as i32) + .collect(); + let h: Vec<f64> = case["hit"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_f64().unwrap()) + .collect(); + let ctx = PlaceContext { + clicked_pos: BlockPos::new(p[0], p[1], p[2]), + face: Direction::ALL[case["face"].as_u64().unwrap() as usize], + hit: Vec3::new(h[0], h[1], h[2]), + inside: false, + yaw: case["yaw"].as_f64().unwrap() as f32, + pitch: case["pitch"].as_f64().unwrap() as f32, + sneaking: case["sneak"].as_bool().unwrap(), + item: case["item"].as_str().unwrap().to_owned(), + can_use_game_master_blocks: false, + }; + match behaviours.placement_state(&mut level, &mut ticks, &ctx) { + Some((pos, state)) => writeln!(out, "place {},{},{} {}", pos.x, pos.y, pos.z, state.0)?, + None => writeln!(out, "place none")?, + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/level_shape_fixture.rs b/crates/horizon-world/examples/level_shape_fixture.rs new file mode 100644 index 000000000..1e4909928 --- /dev/null +++ b/crates/horizon-world/examples/level_shape_fixture.rs @@ -0,0 +1,147 @@ +//! Rust side of `tools/test_level_shape_parity.py`: evaluates +//! `Behaviours::update_shape` and `can_survive` for generated neighbourhoods. +use horizon_core::{ + geometry::Direction, + position::{BlockPos, ChunkPos}, + random::LegacyRandom, +}; +use horizon_world::{ + level::{Behaviours, LevelAccess, Ticks, data::load_registry}, + registry::BlockStateId, +}; +use serde_json::Value; +use std::{ + collections::{BTreeSet, HashMap}, + io::{BufRead, Write}, + path::Path, +}; + +struct Cells { + cells: HashMap<BlockPos, BlockStateId>, + air: BlockStateId, + random: LegacyRandom, + light: i32, +} +impl LevelAccess for Cells { + fn block_state(&self, pos: BlockPos) -> BlockStateId { + self.cells.get(&pos).copied().unwrap_or(self.air) + } + fn set_raw(&mut self, _pos: BlockPos, _state: BlockStateId) -> Option<BlockStateId> { + None + } + fn is_loaded(&self, _pos: BlockPos) -> bool { + true + } + fn random(&mut self) -> &mut LegacyRandom { + &mut self.random + } + fn game_time(&self) -> i64 { + 0 + } + fn sky_light(&self, _pos: BlockPos) -> i32 { + self.light + } +} + +fn main() -> Result<(), Box<dyn std::error::Error>> { + let mut args = std::env::args().skip(1); + let resources = args.next().expect("resource directory"); + let cases = args.next().expect("case file"); + let output = args.next().expect("output file"); + let resources = Path::new(&resources); + let registry = load_registry(resources)?; + let behaviours = Behaviours::load(®istry, resources)?; + let air = registry.default_state("minecraft:air").unwrap(); + let mut out = std::io::BufWriter::new(std::fs::File::create(output)?); + for line in std::io::BufReader::new(std::fs::File::open(cases)?).lines() { + let case: Value = serde_json::from_str(&line?)?; + let mut cells = HashMap::new(); + for cell in case["cells"].as_array().unwrap() { + let c: Vec<i64> = cell + .as_array() + .unwrap() + .iter() + .map(|v| v.as_i64().unwrap()) + .collect(); + cells.insert( + BlockPos::new(c[0] as i32, c[1] as i32, c[2] as i32), + BlockStateId(c[3] as u32), + ); + } + let mut level = Cells { + cells, + air, + random: LegacyRandom::new(case["seed"].as_i64().unwrap()), + light: case["light"].as_i64().unwrap() as i32, + }; + let mut ticks = Ticks::new(0); + for x in -2..=2 { + for z in -2..=2 { + ticks.add_empty_chunk(ChunkPos::new(x, z))?; + } + } + let p: Vec<i32> = case["pos"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_i64().unwrap() as i32) + .collect(); + let pos = BlockPos::new(p[0], p[1], p[2]); + let direction = Direction::ALL[case["dir"].as_u64().unwrap() as usize]; + let [dx, dy, dz] = direction.normal(); + let neighbour_pos = pos.offset(dx, dy, dz); + let state = level.block_state(pos); + let neighbour = level.block_state(neighbour_pos); + let shape = behaviours.update_shape( + &mut level, + &mut ticks, + state, + pos, + direction, + neighbour_pos, + neighbour, + ); + let mut scheduled = BTreeSet::new(); + for x in -2..=2 { + for z in -2..=2 { + let chunk = ChunkPos::new(x, z); + for tick in ticks + .blocks + .chunk(chunk) + .map(|c| c.queued()) + .unwrap_or_default() + { + let name = &behaviours + .table + .info(horizon_world::level::BlockId(tick.kind.0 as u16)) + .name; + scheduled.insert(format!( + "{name}@{},{},{}+{}p{}", + tick.pos.x, tick.pos.y, tick.pos.z, tick.trigger_tick, tick.priority as i32 + )); + } + for tick in ticks + .fluids + .chunk(chunk) + .map(|c| c.queued()) + .unwrap_or_default() + { + let name = horizon_world::fluid::FluidKind::ALL[tick.kind.0 as usize].name(); + scheduled.insert(format!( + "{name}@{},{},{}+{}p{}", + tick.pos.x, tick.pos.y, tick.pos.z, tick.trigger_tick, tick.priority as i32 + )); + } + } + } + let survive = behaviours.can_survive(&mut level, &mut ticks, pos, state); + let scheduled: Vec<String> = scheduled.into_iter().collect(); + writeln!( + out, + "shape {} ticks {} survive {survive}", + shape.0, + scheduled.join(" ") + )?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/live_attribute_updates_fixture.rs b/crates/horizon-world/examples/live_attribute_updates_fixture.rs new file mode 100644 index 000000000..9f73a07e3 --- /dev/null +++ b/crates/horizon-world/examples/live_attribute_updates_fixture.rs @@ -0,0 +1,598 @@ +#[allow(dead_code)] +mod integration { + include!("live_attributes_fixture.rs"); + use horizon_world::{ + active_effects::{ActiveEffects, EffectHooks}, + attribute_updates::{self, UpdateWorld, UpdatedAttribute}, + attributes::live::Key, + effect_notifications::{self as notify, EffectPacket, NotificationWorld}, + java_hash_map::JavaKey, + live_attribute_updates::{self as live_updates, LiveAttributeWorld}, + living_health::{self, HealthWorld, SyncedFloat}, + object_open_set::{CursorError, ObjectOpenSet}, + status_effect::{Details, EffectInstance}, + }; + type Live = LiveAttributes<Box<dyn FnMut() -> i32>>; + type Result<T, E = &'static str> = std::result::Result<T, E>; + #[derive(Clone, PartialEq, Eq)] + struct EffectKey; + impl JavaKey for EffectKey { + fn java_hash(&self) -> i32 { + 0 + } + fn tie_break(&self, _: &Self) -> std::cmp::Ordering { + std::cmp::Ordering::Less + } + } + type Storage = ActiveEffects<EffectKey>; + type Effect = EffectInstance<EffectKey>; + fn single(v: &Value) -> f32 { + f32::from_bits(v.as_u64().unwrap() as u32) + } + fn float_bits(v: f32) -> u32 { + if v.is_nan() { 0x7fc00000 } else { v.to_bits() } + } + fn stop(e: Error) -> &'static str { + match e { + Error::NullAttribute | Error::MissingInstanceModifier => "null", + Error::MissingAttribute | Error::MissingModifier | Error::DuplicateModifier(_) => { + "argument" + } + _ => panic!("invalid fixture: {e:?}"), + } + } + fn cursor_stop(e: CursorError) -> &'static str { + match e { + CursorError::IndexOutOfBounds => "bounds", + CursorError::NoSuchElement => "empty", + _ => "null", + } + } + struct World<'a> { + maps: [Live; 2], + health: [SyncedFloat; 2], + absorption: f32, + selection: usize, + direct: usize, + data: usize, + manager: usize, + server: bool, + client: bool, + calls: i64, + op: Value, + definitions: Definitions<Key>, + pools: [Vec<Modifier>; 2], + out: &'a mut dyn Write, + } + impl World<'_> { + fn key(&self, op: &Value) -> Option<Key> { + let index = op["attribute"].as_i64().unwrap(); + (index >= 0).then(|| self.maps[0].keys()[index as usize].clone()) + } + fn controls(&mut self, c: &Value) { + if let Some(v) = c["selection"].as_u64() { + self.selection = v as usize; + } + if let Some(v) = c["direct"].as_u64() { + self.direct = v as usize; + } + if let Some(v) = c["data"].as_u64() { + self.data = v as usize; + } + if let Some(v) = c["manager"].as_u64() { + self.manager = v as usize; + } + if let Some(v) = c["server"].as_bool() { + self.server = v; + } + if let Some(v) = c["client"].as_bool() { + self.client = v; + } + if !c["absorption"].is_null() { + self.absorption = single(&c["absorption"]); + } + } + fn event(&mut self, name: impl AsRef<str>) -> Result<()> { + let call = self.calls; + self.calls += 1; + writeln!(self.out, "event {call} {}", name.as_ref()).unwrap(); + if call == self.op["fail"].as_i64().unwrap() { + return Err("callback"); + } + if call == self.op["mutate"].as_i64().unwrap() { + let changes = self.op["changes"].clone(); + self.controls(&changes); + for action in self.op["actions"].as_array().unwrap().clone() { + self.raw(&action)?; + } + } + Ok(()) + } + fn attribute_value(&mut self, key: Option<Key>) -> Result<f64> { + self.event(format!("value {}", key.as_ref().map_or("null", Key::name)))?; + live_updates::value(self, key, ValueKind::Computed) + } + fn raw(&mut self, op: &Value) -> Result<String> { + let key = self.key(op); + let target = op["target"].as_u64().unwrap() as usize; + let m = Modifier::new( + op["id"].as_str().unwrap(), + number(&op["amount"]), + Operation::ALL[op["operation"].as_u64().unwrap() as usize], + ) + .unwrap(); + match op["mode"].as_str().unwrap() { + "controls" => { + self.controls(&op["changes"]); + Ok("ok".into()) + } + "ensure" => self.maps[target] + .get_instance(key) + .map(|h| handle(h.as_ref())) + .map_err(stop), + "reset" => self.maps[target] + .reset_base(key) + .map(|v| v.to_string()) + .map_err(stop), + "define" => { + effects::add_definition( + &mut self.definitions, + key, + Template::new(m.id(), m.amount(), m.operation()).unwrap(), + ); + Ok("ok".into()) + } + "effect-add" => self.maps[target] + .add_effect_modifiers( + &mut self.definitions, + op["amplifier"].as_i64().unwrap() as i32, + ) + .map(|()| "ok".into()) + .map_err(|e| stop(effect_error(e))), + "effect-remove" => self.maps[target] + .remove_effect_modifiers(&mut self.definitions) + .map(|()| "ok".into()) + .map_err(|e| stop(effect_error(e))), + "clear-updates" => { + self.maps[target].updates_mut().clear(); + Ok("ok".into()) + } + "clear-sync" => { + self.maps[target].sync_mut().clear(); + Ok("ok".into()) + } + "null-update" => { + self.maps[target].updates_mut().add(None); + Ok("ok".into()) + } + mode => { + let Some(h) = self.maps[target].get_instance(key).map_err(stop)? else { + return Ok("absent".into()); + }; + self.maps[target] + .edit(&h, |a, o| match mode { + "set" => a + .set_base_value(number(&op["base"]), o) + .map(|()| "ok".into()), + "update" => a.add_or_update_transient(m, o).map(|()| "ok".into()), + "permanent" => a.add_permanent(m, o).map(|()| "ok".into()), + "remove" => a.remove(m.id(), o).map(|v| v.to_string()), + "clear" => a.remove_all(o).map(|()| "ok".into()), + _ => panic!("raw mode: {mode}"), + }) + .map_err(stop) + } + } + } + fn state(&mut self, storage: &Storage) { + writeln!( + self.out, + "controls {} {} {} {} {} {} {} {}", + self.selection, + self.direct, + self.data, + self.manager, + self.server, + self.client, + self.calls, + storage.dirty + ) + .unwrap(); + for (i, h) in self.health.iter().enumerate() { + writeln!( + self.out, + "health {i} {} {} {} {}", + float_bits(h.value()), + h.is_dirty(), + h.item_dirty(), + h.is_default() + ) + .unwrap(); + } + writeln!(self.out, "absorption {}", float_bits(self.absorption)).unwrap(); + for (i, map) in self.maps.iter().enumerate() { + writeln!(self.out, "attributes {i}").unwrap(); + writeln!( + self.out, + "map {}", + map.entries() + .iter() + .map(|(k, h)| format!( + "{}={}", + k.as_ref().map_or("null", Key::name), + handle(h.as_ref()) + )) + .collect::<Vec<_>>() + .join(",") + ) + .unwrap(); + writeln!( + self.out, + "updates {}", + map.updates() + .values() + .map(handle) + .collect::<Vec<_>>() + .join(",") + ) + .unwrap(); + writeln!( + self.out, + "sync {}", + map.sync() + .values() + .map(handle) + .collect::<Vec<_>>() + .join(",") + ) + .unwrap(); + for (h, key, a) in map.instances() { + writeln!( + self.out, + "instance {} {} {} {} {} | {} | {}", + h.index(), + key.name(), + bits(a.base_value()), + a.is_dirty(), + bits(a.cached_value()), + refs(a.modifiers(), &mut self.pools[i]), + refs(a.permanent_modifiers(), &mut self.pools[i]) + ) + .unwrap(); + } + } + } + } + impl HealthWorld for World<'_> { + type Error = &'static str; + type Data = usize; + fn health(&mut self) -> Result<f32> { + self.event("health")?; + Ok(self.health[self.data].value()) + } + fn health_data(&self) -> usize { + self.data + } + fn max_health_attribute(&mut self) -> Result<f64> { + self.attribute_value(self.maps[0].key("minecraft:max_health")) + } + fn max_absorption_attribute(&mut self) -> Result<f64> { + self.attribute_value(self.maps[0].key("minecraft:max_absorption")) + } + fn store_health(&mut self, data: usize, value: f32) -> Result<()> { + let mut h = self.health[data]; + let result = h.set(value, false, |current| { + self.health[data] = *current; + let result = self.event("health-updated"); + *current = self.health[data]; + result + }); + self.health[data] = h; + result + } + fn store_absorption(&mut self, value: f32) -> Result<()> { + self.event(format!("store-absorption {}", float_bits(value)))?; + self.absorption = value; + Ok(()) + } + fn dead_flag(&self) -> bool { + false + } + fn dispatch_set_health(&mut self, value: f32) -> Result<()> { + self.event(format!("set-health {}", float_bits(value)))?; + living_health::set_health(self, value) + } + } + impl UpdateWorld<Key> for World<'_> { + type Attributes = usize; + type Level = bool; + type Manager = usize; + fn attribute_kind(&self, key: &Key) -> UpdatedAttribute { + live_updates::kind(key) + } + fn absorption(&mut self) -> Result<f32> { + self.event("absorption")?; + Ok(self.absorption) + } + fn refresh_dimensions(&mut self) -> Result<()> { + self.event("dimensions") + } + fn level(&mut self) -> Result<bool> { + self.event("level")?; + Ok(self.server) + } + fn is_server_level(&self, level: bool) -> bool { + level + } + fn waypoint_manager(&mut self, _: bool) -> Result<usize> { + self.event("manager")?; + Ok(self.manager) + } + fn attributes_field(&self) -> usize { + self.direct + } + fn attribute_value_in(&mut self, map: usize, key: Key) -> Result<f64> { + live_updates::value_in(self, map, Some(key), ValueKind::Computed) + } + fn track_waypoint(&mut self, manager: usize, track: bool) -> Result<()> { + self.event(format!("waypoint {manager} {track}")) + } + } + impl LiveAttributeWorld for World<'_> { + type Identity = Box<dyn FnMut() -> i32>; + fn get_attributes(&mut self) -> Result<usize> { + self.event("attributes")?; + Ok(self.selection) + } + fn live_attributes(&self, map: usize) -> &Live { + &self.maps[map] + } + fn live_attributes_mut(&mut self, map: usize) -> &mut Live { + &mut self.maps[map] + } + fn instance_attribute(&self, instance: Option<Handle>) -> Result<Key> { + let h = instance.ok_or("null")?; + self.maps + .iter() + .find_map(|m| m.attribute(&h).ok().cloned()) + .ok_or("null") + } + fn attribute_error(error: Error) -> &'static str { + stop(error) + } + fn cursor_error(error: CursorError) -> &'static str { + cursor_stop(error) + } + fn dispatch_attribute_updated(&mut self, key: Key) -> Result<()> { + self.event(format!("updated {}", key.name()))?; + attribute_updates::updated(self, key) + } + } + impl EffectHooks<EffectKey> for World<'_> { + type Error = &'static str; + type Source = (); + type Level = bool; + fn can_be_affected(&mut self, _: &mut Storage, _: Effect) -> Result<bool> { + Ok(true) + } + fn on_added(&mut self, s: &mut Storage, e: Effect, _: Option<()>) -> Result<()> { + notify::on_added(s, &e, self) + } + fn on_updated( + &mut self, + s: &mut Storage, + e: Effect, + reapply: bool, + _: Option<()>, + ) -> Result<()> { + notify::on_updated(s, &e, reapply, self) + } + fn on_removed(&mut self, s: &mut Storage, es: Vec<Effect>) -> Result<()> { + notify::on_removed(s, &es, self) + } + fn effect_added(&mut self, _: &mut Storage, _: EffectKey, _: i32) -> Result<()> { + Ok(()) + } + fn effect_started(&mut self, _: &mut Storage, _: EffectKey, _: i32) -> Result<()> { + Ok(()) + } + fn level(&mut self, _: &mut Storage) -> Result<bool> { + UpdateWorld::level(self) + } + fn is_client(&mut self, _: &mut Storage, level: bool) -> Result<bool> { + if !level { + return Err("null"); + } + self.event("client")?; + Ok(self.client) + } + fn actor_removed(&self) -> bool { + false + } + } + impl NotificationWorld<EffectKey> for World<'_> { + type Attributes = usize; + type UpdateSet = usize; + type AttributeInstance = Handle; + type Attribute = Key; + type Passenger = (); + type Connection = (); + fn attributes(&mut self, _: &mut Storage) -> Result<usize> { + self.get_attributes() + } + fn add_modifiers( + &mut self, + _: &mut Storage, + _: EffectKey, + map: usize, + amp: i32, + ) -> Result<()> { + self.maps[map] + .add_effect_modifiers(&mut self.definitions, amp) + .map_err(|e| stop(effect_error(e))) + } + fn remove_modifiers(&mut self, _: &mut Storage, _: EffectKey, map: usize) -> Result<()> { + self.maps[map] + .remove_effect_modifiers(&mut self.definitions) + .map_err(|e| stop(effect_error(e))) + } + fn pending_updates(&mut self, _: &mut Storage, map: usize) -> Result<usize> { + Ok(map) + } + fn update_set(&self, set: usize) -> &ObjectOpenSet<Handle> { + self.maps[set].updates() + } + fn update_set_mut(&mut self, set: usize) -> &mut ObjectOpenSet<Handle> { + self.maps[set].updates_mut() + } + fn iterator_error(e: CursorError) -> &'static str { + cursor_stop(e) + } + fn attribute_of(&mut self, _: &mut Storage, instance: Option<Handle>) -> Result<Key> { + self.instance_attribute(instance) + } + fn attribute_updated(&mut self, _: &mut Storage, key: Key) -> Result<()> { + self.dispatch_attribute_updated(key) + } + fn passengers(&self) -> Vec<()> { + vec![] + } + fn is_server_player(&self, _: ()) -> bool { + false + } + fn connection(&self, _: ()) {} + fn entity_id(&mut self, _: &mut Storage) -> Result<i32> { + Ok(0) + } + fn send_packet( + &mut self, + _: &mut Storage, + _: (), + _: EffectPacket<EffectKey>, + ) -> Result<()> { + Ok(()) + } + } + pub fn run() -> std::result::Result<(), Box<dyn std::error::Error>> { + let args: Vec<_> = std::env::args().collect(); + let dir = Path::new(&args[1]); + let catalog = Arc::new(Catalog::from_json(&serde_json::from_str( + &fs::read_to_string(dir.join("catalog.json"))?, + )?)?); + let mut out = + io::BufWriter::new(fs::File::create(dir.join(format!("rust-{}.txt", args[2])))?); + for line in fs::read_to_string(dir.join(format!("inputs-{}.txt", args[2])))?.lines() { + let f: Value = serde_json::from_str(line)?; + let hashes: Vec<_> = f["holder_hashes"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_i64().unwrap() as i32) + .collect(); + let maps = std::array::from_fn(|i| { + let mut ids = f["instance_hashes"][i] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_i64().unwrap() as i32) + .collect::<Vec<_>>() + .into_iter(); + Live::new( + catalog.clone(), + f["entity"].as_str().unwrap(), + &hashes, + Box::new(move || ids.next().unwrap()), + ) + .unwrap() + }); + let mut w = World { + maps, + health: std::array::from_fn(|i| SyncedFloat::new(single(&f["health"][i]))), + absorption: single(&f["absorption"]), + selection: 0, + direct: 0, + data: 0, + manager: 0, + server: true, + client: false, + calls: 0, + op: Value::Null, + definitions: Definitions::default(), + pools: [vec![], vec![]], + out: &mut out, + }; + let mut storage = Storage::default(); + for op in f["setup"].as_array().unwrap() { + w.raw(op).unwrap(); + } + for op in f["ops"].as_array().unwrap() { + w.op = op.clone(); + w.calls = 0; + let key = w.key(op); + let effect = EffectInstance::new( + EffectKey, + Details { + duration: 200, + amplifier: op["amplifier"].as_i64().unwrap() as i32, + ambient: false, + visible: true, + show_icon: true, + }, + None, + ); + let result = match op["mode"].as_str().unwrap() { + "value" => w.attribute_value(key).map(bits), + "base" => live_updates::value(&mut w, key, ValueKind::Base).map(bits), + "set-health" => w + .dispatch_set_health(single(&op["value"])) + .map(|()| "ok".into()), + "set-absorption" => living_health::set_absorption(&mut w, single(&op["value"])) + .map(|()| "ok".into()), + "heal" => { + living_health::heal(&mut w, single(&op["value"])).map(|()| "ok".into()) + } + "attribute-update" => match key { + Some(key) => w.dispatch_attribute_updated(key), + None => w.event("updated null").and(Err("null")), + } + .map(|()| "ok".into()), + "refresh" => live_updates::refresh(&mut w).map(|()| "ok".into()), + "notify-add" => { + notify::on_added(&mut storage, &effect, &mut w).map(|()| "ok".into()) + } + "notify-update" => notify::on_updated( + &mut storage, + &effect, + op["reapply"].as_bool().unwrap(), + &mut w, + ) + .map(|()| "ok".into()), + "notify-remove" => notify::on_removed( + &mut storage, + &vec![effect; op["count"].as_u64().unwrap() as usize], + &mut w, + ) + .map(|()| "ok".into()), + "pack" => Ok(w.health[op["target"].as_u64().unwrap() as usize] + .take_dirty() + .map_or("none".into(), |v| float_bits(v).to_string())), + "dirty" => { + storage.dirty = op["flag"].as_bool().unwrap(); + Ok("ok".into()) + } + _ => w.raw(op), + }; + writeln!( + w.out, + "result {}", + result.unwrap_or_else(|e| format!("error {e}")) + )?; + w.state(&storage); + } + } + Ok(()) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + integration::run() +} diff --git a/crates/horizon-world/examples/live_attributes_fixture.rs b/crates/horizon-world/examples/live_attributes_fixture.rs new file mode 100644 index 000000000..e90d8cb4f --- /dev/null +++ b/crates/horizon-world/examples/live_attributes_fixture.rs @@ -0,0 +1,221 @@ +use horizon_world::{ + attribute_map::ValueKind, + attributes::{ + Modifier, Operation, + entity::Catalog, + live::{Error, Handle, LiveAttributes}, + }, + effect_attribute_modifiers::{self as effects, Definitions, Template}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, + sync::Arc, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f64) -> String { + format!( + "{:016x}", + if v.is_nan() { + f64::NAN.to_bits() + } else { + v.to_bits() + } + ) +} +fn error(e: Error) -> &'static str { + match e { + Error::NullAttribute | Error::MissingInstanceModifier => "null", + Error::MissingAttribute => "attribute", + Error::MissingModifier => "modifier", + Error::DuplicateModifier(_) => "duplicate", + _ => panic!("invalid fixture: {e:?}"), + } +} +fn handle(h: Option<&Handle>) -> String { + h.map_or("null".into(), |h| h.index().to_string()) +} +fn refs(mods: &[Modifier], pool: &mut Vec<Modifier>) -> String { + mods.iter() + .map(|m| { + let id = pool + .iter() + .position(|p| p.same_identity(m)) + .unwrap_or_else(|| { + pool.push(m.clone()); + pool.len() - 1 + }); + format!( + "{id}:{}:{}:{}", + m.id(), + bits(m.amount()), + m.operation() as u8 + ) + }) + .collect::<Vec<_>>() + .join(",") +} +fn effect_error(e: effects::Error<Error>) -> Error { + match e { + effects::Error::World(e) => e, + _ => panic!("fixture definitions unexpectedly invalid"), + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let args: Vec<_> = std::env::args().collect(); + let dir = Path::new(&args[1]); + let catalog = Arc::new(Catalog::from_json(&serde_json::from_str( + &fs::read_to_string(dir.join("catalog.json"))?, + )?)?); + let mut out = io::BufWriter::new(fs::File::create(dir.join(format!("rust-{}.txt", args[2])))?); + for line in fs::read_to_string(dir.join(format!("inputs-{}.txt", args[2])))?.lines() { + let f: Value = serde_json::from_str(line)?; + let hashes: Vec<_> = f["holder_hashes"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_i64().unwrap() as i32) + .collect(); + let mut identities = f["instance_hashes"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_i64().unwrap() as i32); + let mut attrs = LiveAttributes::new( + catalog.clone(), + f["entity"].as_str().unwrap(), + &hashes, + || identities.next().unwrap(), + ) + .unwrap(); + let mut defs = Definitions::default(); + let mut pool = Vec::new(); + for op in f["ops"].as_array().unwrap() { + let index = op["attribute"].as_i64().unwrap(); + let key = (index >= 0).then(|| attrs.keys()[index as usize].clone()); + let m = Modifier::new( + op["id"].as_str().unwrap(), + number(&op["amount"]), + Operation::ALL[op["operation"].as_u64().unwrap() as usize], + )?; + let mode = op["mode"].as_str().unwrap(); + let result: Result<String, Error> = match mode { + "value" => attrs.value(key, ValueKind::Computed).map(bits), + "base" => attrs.value(key, ValueKind::Base).map(bits), + "has" => attrs.has_attribute(key).map(|v| v.to_string()), + "has_modifier" => attrs.has_modifier(key, m.id()).map(|v| v.to_string()), + "modifier" => attrs.modifier_value(key, m.id()).map(bits), + "ensure" => attrs.get_instance(key).map(|h| handle(h.as_ref())), + "reset" => attrs.reset_base(key).map(|v| v.to_string()), + "ack_update" => { + let h = attrs.lookup(key.as_ref()); + attrs.updates_mut().remove(h.as_ref()); + Ok("ok".into()) + } + "ack_sync" => { + let h = attrs.lookup(key.as_ref()); + attrs.sync_mut().remove(h.as_ref()); + Ok("ok".into()) + } + "clear_updates" => { + attrs.updates_mut().clear(); + Ok("ok".into()) + } + "clear_sync" => { + attrs.sync_mut().clear(); + Ok("ok".into()) + } + "define" => { + effects::add_definition( + &mut defs, + key, + Template::new(m.id(), m.amount(), m.operation())?, + ); + Ok("ok".into()) + } + "effect-add" => attrs + .add_effect_modifiers(&mut defs, op["amplifier"].as_i64().unwrap() as i32) + .map_err(effect_error) + .map(|()| "ok".into()), + "effect-remove" => attrs + .remove_effect_modifiers(&mut defs) + .map_err(effect_error) + .map(|()| "ok".into()), + _ => match attrs.get_instance(key) { + Err(e) => Err(e), + Ok(None) => Ok("absent".into()), + Ok(Some(h)) => attrs.edit(&h, |a, o| match mode { + "set" => a + .set_base_value(number(&op["base"]), o) + .map(|()| "ok".into()), + "add" => a.add_transient(m.clone(), o).map(|()| "ok".into()), + "update" => a + .add_or_update_transient(m.clone(), o) + .map(|()| "ok".into()), + "permanent" => a.add_permanent(m.clone(), o).map(|()| "ok".into()), + "remove" => a.remove(m.id(), o).map(|v| v.to_string()), + "clear" => a.remove_all(o).map(|()| "ok".into()), + _ => panic!("mode"), + }), + }, + }; + writeln!( + out, + "result {}", + result.unwrap_or_else(|e| format!("error {}", error(e))) + )?; + writeln!( + out, + "map {}", + attrs + .entries() + .iter() + .map(|(k, h)| format!( + "{}={}", + k.as_ref().map_or("null", |k| k.name()), + handle(h.as_ref()) + )) + .collect::<Vec<_>>() + .join(",") + )?; + writeln!( + out, + "updates {}", + attrs + .updates() + .values() + .map(handle) + .collect::<Vec<_>>() + .join(",") + )?; + writeln!( + out, + "sync {}", + attrs + .sync() + .values() + .map(handle) + .collect::<Vec<_>>() + .join(",") + )?; + for (h, key, a) in attrs.instances() { + writeln!( + out, + "instance {} {} {} {} {} | {} | {}", + h.index(), + key.name(), + bits(a.base_value()), + a.is_dirty(), + bits(a.cached_value()), + refs(a.modifiers(), &mut pool), + refs(a.permanent_modifiers(), &mut pool) + )?; + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/living_air_fixture.rs b/crates/horizon-world/examples/living_air_fixture.rs new file mode 100644 index 000000000..fe581f54f --- /dev/null +++ b/crates/horizon-world/examples/living_air_fixture.rs @@ -0,0 +1,246 @@ +use horizon_core::{geometry::Vec3, position::BlockPos}; +use horizon_world::living_air::*; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vec(v: &Value) -> Vec3 { + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn fbits(v: f32) -> u32 { + if v.is_nan() { 0x7fc00000 } else { v.to_bits() } +} +fn vector(v: Vec3) -> String { + format!("{:016x} {:016x} {:016x}", bits(v.x), bits(v.y), bits(v.z)) +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + ground_calls: usize, + climb_calls: usize, + velocity: Vec3, + fall: f64, + moved: bool, +} +impl World<'_> { + fn flag(&self, k: &str) -> bool { + self.f[k].as_bool().unwrap() + } + fn query(&mut self, s: impl AsRef<str>) -> io::Result<()> { + writeln!(self.out, "{}", s.as_ref())?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + Err(io::Error::other("injected travel failure")) + } else { + Ok(()) + } + } + fn sequence(&self, k: &str, n: usize) -> bool { + let a = self.f[k].as_array().unwrap(); + a[n.min(a.len() - 1)].as_bool().unwrap() + } +} +impl LivingAirWorld for World<'_> { + type Error = io::Error; + fn movement_support_position(&mut self) -> io::Result<BlockPos> { + self.query("support")?; + Ok(BlockPos::new(17, -64, -33)) + } + fn on_ground(&mut self) -> io::Result<bool> { + self.query("ground")?; + let b = self.sequence("ground", self.ground_calls); + self.ground_calls += 1; + Ok(b) + } + fn block_friction(&mut self, p: BlockPos) -> io::Result<f32> { + self.query(format!("state {} {} {}", p.x, p.y, p.z))?; + self.query("friction")?; + Ok(single(&self.f["friction"])) + } + fn friction_modifier(&mut self) -> io::Result<f64> { + self.query("friction-modifier")?; + Ok(number(&self.f["friction_modifier"])) + } + fn speed(&mut self) -> io::Result<f32> { + self.query("speed")?; + Ok(single(&self.f["speed"])) + } + fn flying_speed(&mut self) -> io::Result<f32> { + self.query("flying-speed")?; + Ok(single(&self.f["flying_speed"])) + } + fn yaw(&mut self) -> io::Result<f32> { + self.query("yaw")?; + if self.flag("yaw_mutate") { + self.velocity = Vec3::new(17.0, 18.0, 19.0); + } + Ok(single(&self.f["yaw"])) + } + fn velocity(&self) -> Vec3 { + self.velocity + } + fn set_velocity(&mut self, v: Vec3) -> io::Result<()> { + self.query(format!("set {}", vector(v)))?; + self.velocity = v; + Ok(()) + } + fn on_climbable(&mut self) -> io::Result<bool> { + self.query("climb")?; + let b = self.sequence("climb", self.climb_calls); + self.climb_calls += 1; + Ok(b) + } + fn reset_fall_distance(&mut self) -> io::Result<()> { + self.query("reset")?; + self.fall = 0.0; + Ok(()) + } + fn in_scaffolding(&mut self) -> io::Result<bool> { + self.query("in-block")?; + Ok(self.flag("scaffolding")) + } + fn suppressing_ladder_slide(&mut self) -> io::Result<bool> { + self.query("suppress")?; + Ok(self.flag("suppress")) + } + fn is_player_class(&self) -> bool { + self.flag("player") + } + fn move_self(&mut self, v: Vec3) -> io::Result<()> { + self.query(format!("move {}", vector(v)))?; + self.moved = true; + if self.flag("move_mutate") { + self.velocity = vec(&self.f["after_velocity"]); + } + Ok(()) + } + fn horizontal_collision(&self) -> bool { + self.flag(if self.moved { + "after_horizontal" + } else { + "horizontal" + }) + } + fn jumping(&self) -> bool { + self.flag(if self.moved { + "after_jumping" + } else { + "jumping" + }) + } + fn was_in_powder_snow(&self) -> bool { + self.flag(if self.moved { "after_snow" } else { "snow" }) + } + fn can_walk_powder_snow(&mut self) -> io::Result<bool> { + self.query("powder-tag")?; + if self.flag("powder_tag") { + Ok(true) + } else { + self.query("feet")?; + Ok(self.flag("boots")) + } + } + fn levitation_amplifier(&mut self) -> io::Result<Option<i32>> { + self.query("levitation")?; + Ok(self.f["levitation"].as_i64().map(|v| v as i32)) + } + fn is_client_side(&mut self) -> io::Result<bool> { + self.query("client")?; + Ok(self.flag("client")) + } + fn has_chunk_at(&mut self, p: BlockPos) -> io::Result<bool> { + self.query(format!("chunk {} {} {}", p.x, p.y, p.z))?; + Ok(self.flag("chunk")) + } + fn effective_gravity(&mut self) -> io::Result<f64> { + self.query("gravity")?; + Ok(number(&self.f["gravity"])) + } + fn y(&self) -> f64 { + number(&self.f["y"]) + } + fn minimum_y(&mut self) -> io::Result<i32> { + self.query("min-y")?; + Ok(self.f["min_y"].as_i64().unwrap() as i32) + } + fn discard_friction(&mut self) -> io::Result<bool> { + self.query("discard")?; + Ok(self.flag("discard")) + } + fn air_drag_modifier(&mut self) -> io::Result<f64> { + self.query("drag-modifier")?; + Ok(number(&self.f["drag_modifier"])) + } + fn omnidirectional_air_mover(&mut self) -> io::Result<bool> { + self.query("omni")?; + Ok(self.flag("omni")) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + ground_calls: 0, + climb_calls: 0, + velocity: vec(&f["velocity"]), + fall: number(&f["fall"]), + moved: false, + }; + let input = vec(&f["input"]); + let friction = single(&f["friction"]); + let result: io::Result<()> = match f["mode"].as_str().unwrap() { + "air" => travel_in_air(&mut w, input), + "relative" => relative_friction_movement(&mut w, input, friction) + .and_then(|v| writeln!(w.out, "vector {}", vector(v))), + "climb" => handle_on_climbable(&mut w, input) + .and_then(|v| writeln!(w.out, "vector {}", vector(v))), + "speed" => friction_influenced_speed(&mut w, friction) + .and_then(|v| writeln!(w.out, "float {:08x}", fbits(v))), + "input" => writeln!( + w.out, + "vector {}", + vector(input_vector(input, single(&f["speed"]), single(&f["yaw"]))) + ), + "friction" => writeln!( + w.out, + "float {:08x}", + fbits(modified_friction( + friction, + number(&f["friction_modifier"]) as f32 + )) + ), + _ => panic!("unknown mode"), + }; + writeln!( + w.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!(w.out, "final {} {:016x}", vector(w.velocity), bits(w.fall))?; + writeln!(w.out, "queries {}", w.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/living_damage_fixture.rs b/crates/horizon-world/examples/living_damage_fixture.rs new file mode 100644 index 000000000..b77048866 --- /dev/null +++ b/crates/horizon-world/examples/living_damage_fixture.rs @@ -0,0 +1,192 @@ +use horizon_world::{ + living_damage::{self, DamageStat, DamageWorld}, + living_health::{self, HealthWorld}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +fn stat(s: DamageStat) -> &'static str { + match s { + DamageStat::Absorbed => "absorbed", + DamageStat::DealtAbsorbed => "dealt-absorbed", + DamageStat::Taken => "taken", + } +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + changed: bool, + health: f32, + absorption: f32, + exhaustion: f32, + recorded: f32, +} +impl World<'_> { + fn state(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn reset(&mut self) { + self.health = single(&self.state()["health"]); + self.absorption = single(&self.state()["absorption"]); + self.exhaustion = single(&self.state()["exhaustion"]); + } + fn query(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected damage callback failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.changed = true; + self.reset(); + } + Ok(()) + } +} +impl DamageWorld for World<'_> { + type Error = io::Error; + type Attacker = (); + fn invulnerable(&mut self) -> io::Result<bool> { + self.query("invulnerable")?; + Ok(self.state()["invulnerable"].as_bool().unwrap()) + } + fn after_armor(&mut self, v: f32) -> io::Result<f32> { + self.query(&format!("armor {:08x}", bits(v)))?; + Ok(single(&self.state()["armor"])) + } + fn after_magic(&mut self, v: f32) -> io::Result<f32> { + self.query(&format!("magic {:08x}", bits(v)))?; + Ok(single(&self.state()["magic"])) + } + fn absorption(&mut self) -> io::Result<f32> { + self.query("absorption")?; + Ok(self.absorption) + } + fn set_absorption(&mut self, v: f32) -> io::Result<()> { + living_health::set_absorption(self, v) + } + fn server_player_attacker(&mut self) -> io::Result<Option<()>> { + self.query("attacker")?; + Ok((self.state()["attacker"] == 2).then_some(())) + } + fn award_attacker(&mut self, _: (), s: DamageStat, v: i32) -> io::Result<()> { + self.query(&format!("stat attacker {} {v}", stat(s))) + } + fn award_self(&mut self, s: DamageStat, v: i32) -> io::Result<()> { + self.query(&format!("stat self {} {v}", stat(s))) + } + fn source_food_exhaustion(&mut self) -> io::Result<f32> { + self.query("food-exhaustion")?; + Ok(single(&self.state()["food_exhaustion"])) + } + fn cause_food_exhaustion(&mut self, v: f32) -> io::Result<()> { + self.query(&format!("exhaust {:08x}", bits(v)))?; + self.exhaustion += v; + Ok(()) + } + fn record_damage(&mut self, v: f32) -> io::Result<()> { + self.query("tracker")?; + self.query(&format!("record {:08x}", bits(v)))?; + self.recorded = v; + Ok(()) + } + fn health(&mut self) -> io::Result<f32> { + self.query("health")?; + Ok(self.health) + } + fn set_health(&mut self, v: f32) -> io::Result<()> { + self.query(&format!("set-health {:08x}", bits(v)))?; + self.health = v; + Ok(()) + } + fn damage_event(&mut self) -> io::Result<()> { + self.query("damage-event") + } +} +// Reuse the separately verified final absorption setter for native clamping. +impl HealthWorld for World<'_> { + type Error = io::Error; + type Data = (); + fn health(&mut self) -> io::Result<f32> { + DamageWorld::health(self) + } + fn health_data(&self) {} + fn max_health_attribute(&mut self) -> io::Result<f64> { + unreachable!("fixture only binds absorption") + } + fn max_absorption_attribute(&mut self) -> io::Result<f64> { + self.query("max-absorption")?; + Ok(number(&self.state()["max_absorption"])) + } + fn store_health(&mut self, _: (), v: f32) -> io::Result<()> { + DamageWorld::set_health(self, v) + } + fn store_absorption(&mut self, v: f32) -> io::Result<()> { + self.query(&format!("set-absorption {:08x}", bits(v)))?; + self.absorption = v; + Ok(()) + } + fn dead_flag(&self) -> bool { + false + } + fn dispatch_set_health(&mut self, v: f32) -> io::Result<()> { + DamageWorld::set_health(self, v) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + changed: false, + health: 0., + absorption: 0., + exhaustion: 0., + recorded: 0., + }; + w.reset(); + let result = living_damage::actually_hurt( + &mut w, + single(&f["damage"]), + f["player"].as_bool().unwrap(), + ); + writeln!( + w.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!( + w.out, + "final {:08x} {:08x} {:08x} {:08x}", + bits(w.health), + bits(w.absorption), + bits(w.exhaustion), + bits(w.recorded) + )?; + writeln!(w.out, "queries {}", w.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/living_fall_fixture.rs b/crates/horizon-world/examples/living_fall_fixture.rs new file mode 100644 index 000000000..64dc1f2df --- /dev/null +++ b/crates/horizon-world/examples/living_fall_fixture.rs @@ -0,0 +1,197 @@ +use horizon_core::geometry::Vec3; +use horizon_world::living_fall::{ + ImpulseContext, LivingFallWorld, calculate_fall_damage, cause_living_fall_damage, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn vector(v: &Value) -> Option<Vec3> { + if v.is_null() { + None + } else { + Some(Vec3::new(number(&v[0]), number(&v[1]), number(&v[2]))) + } +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + immune_calls: usize, + hurt: usize, + impulse: ImpulseContext, +} +impl World<'_> { + fn query(&mut self, s: String) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let call = self.calls; + self.calls += 1; + if call == self.f["fail"].as_i64().unwrap() { + Err(io::Error::other("injected living fall query failure")) + } else { + Ok(()) + } + } + fn emit(&mut self) -> io::Result<()> { + let i = self.impulse; + writeln!( + self.out, + "grace {} {} {}", + i.reset_grace_time, + i.is_in_grace_time(), + i.ignores_fall_damage() + )?; + if let Some(p) = i.impact_position { + writeln!( + self.out, + "impact {:016x} {:016x} {:016x}", + bits(p.x), + bits(p.y), + bits(p.z) + ) + } else { + writeln!(self.out, "impact none") + } + } +} +impl LivingFallWorld for World<'_> { + type Error = io::Error; + type Sound = bool; + fn impact_position(&self) -> Option<Vec3> { + self.impulse.impact_position + } + fn y(&self) -> f64 { + number(&self.f["y"]) + } + fn reset_impulse(&mut self) -> io::Result<()> { + self.query("reset".into())?; + self.impulse.reset(); + Ok(()) + } + fn try_reset_impulse(&mut self) -> io::Result<()> { + self.query("try-reset".into())?; + if self.impulse.reset_grace_time == 0 { + self.reset_impulse()?; + } + Ok(()) + } + fn immune_to_fall_damage(&mut self) -> io::Result<bool> { + self.query("immune".into())?; + let v = self.f["immune"].as_array().unwrap(); + let value = v[self.immune_calls.min(v.len() - 1)].as_bool().unwrap(); + self.immune_calls += 1; + Ok(value) + } + fn propagate_fall_to_passengers(&mut self, d: f64, m: f32) -> io::Result<()> { + self.query(format!( + "passengers {:016x} {:08x}", + bits(d), + if m.is_nan() { 0x7fc00000 } else { m.to_bits() } + ))?; + if self.f["mutate"].as_bool().unwrap() { + self.impulse.reset_grace_time = 17; + self.impulse.impact_position = Some(Vec3::new(17.0, 18.0, 19.0)); + } + Ok(()) + } + fn safe_fall_distance(&mut self) -> io::Result<f64> { + self.query("safe".into())?; + Ok(number(&self.f["safe"])) + } + fn fall_damage_multiplier(&mut self) -> io::Result<f64> { + self.query("damage-factor".into())?; + Ok(number(&self.f["damage-factor"])) + } + fn fall_sound(&mut self, big: bool) -> io::Result<bool> { + self.query("sounds".into())?; + Ok(big) + } + fn play_fall_sound(&mut self, big: bool) -> io::Result<()> { + self.query(format!("sound {}", if big { "big" } else { "small" })) + } + fn play_block_fall_sound(&mut self) -> io::Result<()> { + self.query("block-sound".into()) + } + fn hurt(&mut self, damage: f32) -> io::Result<()> { + if self.f["server"].as_bool().unwrap() { + self.query(format!("hurt {:08x}", damage.to_bits()))?; + self.hurt += 1; + } + Ok(()) + } +} +fn run(world: &mut World<'_>) -> io::Result<()> { + let f = world.f; + match f["mode"].as_u64().unwrap() { + 0 => { + let value = + calculate_fall_damage(world, number(&f["distance"]), single(&f["multiplier"]))?; + writeln!(world.out, "damage {value}")?; + } + 1 => { + let value = + cause_living_fall_damage(world, number(&f["distance"]), single(&f["multiplier"]))?; + writeln!(world.out, "caused {value}")?; + } + 2 => { + for op in f["ops"].as_array().unwrap() { + match op["mode"].as_u64().unwrap() { + 0 => world.impulse.set_ignore_fall_damage( + op["ignore"].as_bool().unwrap(), + vector(&op["position"]), + ), + 1 => world + .impulse + .apply_grace_time(op["ticks"].as_i64().unwrap() as i32), + 2 => world.try_reset_impulse()?, + 3 => world.reset_impulse()?, + _ => unreachable!(), + }; + world.emit()?; + } + } + _ => unreachable!(), + }; + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut world = World { + f: &f, + out: &mut out, + calls: 0, + immune_calls: 0, + hurt: 0, + impulse: ImpulseContext { + reset_grace_time: f["grace"].as_i64().unwrap() as i32, + impact_position: vector(&f["impact"]), + }, + }; + if run(&mut world).is_err() { + writeln!(world.out, "error")?; + } + world.emit()?; + writeln!(world.out, "hurt-count {}", world.hurt)?; + writeln!(world.out, "queries {}", world.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/living_fluid_fixture.rs b/crates/horizon-world/examples/living_fluid_fixture.rs new file mode 100644 index 000000000..55ccdd8f5 --- /dev/null +++ b/crates/horizon-world/examples/living_fluid_fixture.rs @@ -0,0 +1,327 @@ +use horizon_core::{geometry::Vec3, position::BlockPos}; +use horizon_world::living_air::*; +use horizon_world::living_fluid::*; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vec(v: &Value) -> Vec3 { + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn fbits(v: f32) -> u32 { + if v.is_nan() { 0x7fc00000 } else { v.to_bits() } +} +fn vector(v: Vec3) -> String { + format!("{:016x} {:016x} {:016x}", bits(v.x), bits(v.y), bits(v.z)) +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + ground_calls: usize, + climb_calls: usize, + velocity: Vec3, + fall: f64, + moved: bool, + y: f64, + sprint_calls: usize, +} +impl World<'_> { + fn flag(&self, k: &str) -> bool { + self.f[k].as_bool().unwrap() + } + fn query(&mut self, s: impl AsRef<str>) -> io::Result<()> { + writeln!(self.out, "{}", s.as_ref())?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + Err(io::Error::other("injected travel failure")) + } else { + Ok(()) + } + } + fn sequence(&self, k: &str, n: usize) -> bool { + let a = self.f[k].as_array().unwrap(); + a[n.min(a.len() - 1)].as_bool().unwrap() + } +} +impl LivingAirWorld for World<'_> { + type Error = io::Error; + fn movement_support_position(&mut self) -> io::Result<BlockPos> { + self.query("support")?; + Ok(BlockPos::new(17, -64, -33)) + } + fn on_ground(&mut self) -> io::Result<bool> { + self.query("ground")?; + let b = self.sequence("ground", self.ground_calls); + self.ground_calls += 1; + Ok(b) + } + fn block_friction(&mut self, p: BlockPos) -> io::Result<f32> { + self.query(format!("state {} {} {}", p.x, p.y, p.z))?; + self.query("friction")?; + Ok(single(&self.f["friction"])) + } + fn friction_modifier(&mut self) -> io::Result<f64> { + self.query("friction-modifier")?; + Ok(number(&self.f["friction_modifier"])) + } + fn speed(&mut self) -> io::Result<f32> { + self.query("speed")?; + Ok(single(&self.f["speed"])) + } + fn flying_speed(&mut self) -> io::Result<f32> { + self.query("flying-speed")?; + Ok(single(&self.f["flying_speed"])) + } + fn yaw(&mut self) -> io::Result<f32> { + self.query("yaw")?; + if self.flag("yaw_mutate") { + self.velocity = Vec3::new(17.0, 18.0, 19.0); + } + Ok(single(&self.f["yaw"])) + } + fn velocity(&self) -> Vec3 { + self.velocity + } + fn set_velocity(&mut self, v: Vec3) -> io::Result<()> { + self.query(format!("set {}", vector(v)))?; + self.velocity = v; + Ok(()) + } + fn on_climbable(&mut self) -> io::Result<bool> { + self.query("climb")?; + let b = self.sequence("climb", self.climb_calls); + self.climb_calls += 1; + Ok(b) + } + fn reset_fall_distance(&mut self) -> io::Result<()> { + self.query("reset")?; + self.fall = 0.0; + Ok(()) + } + fn in_scaffolding(&mut self) -> io::Result<bool> { + self.query("in-block")?; + Ok(self.flag("scaffolding")) + } + fn suppressing_ladder_slide(&mut self) -> io::Result<bool> { + self.query("suppress")?; + Ok(self.flag("suppress")) + } + fn is_player_class(&self) -> bool { + self.flag("player") + } + fn move_self(&mut self, v: Vec3) -> io::Result<()> { + self.query(format!("move {}", vector(v)))?; + self.moved = true; + self.y = number(&self.f["after_y"]); + if self.flag("move_mutate") { + self.velocity = vec(&self.f["after_velocity"]); + } + Ok(()) + } + fn horizontal_collision(&self) -> bool { + self.flag(if self.moved { + "after_horizontal" + } else { + "horizontal" + }) + } + fn jumping(&self) -> bool { + self.flag(if self.moved { + "after_jumping" + } else { + "jumping" + }) + } + fn was_in_powder_snow(&self) -> bool { + self.flag(if self.moved { "after_snow" } else { "snow" }) + } + fn can_walk_powder_snow(&mut self) -> io::Result<bool> { + self.query("powder-tag")?; + if self.flag("powder_tag") { + Ok(true) + } else { + self.query("feet")?; + Ok(self.flag("boots")) + } + } + fn levitation_amplifier(&mut self) -> io::Result<Option<i32>> { + self.query("levitation")?; + Ok(self.f["levitation"].as_i64().map(|v| v as i32)) + } + fn is_client_side(&mut self) -> io::Result<bool> { + self.query("client")?; + Ok(self.flag("client")) + } + fn has_chunk_at(&mut self, p: BlockPos) -> io::Result<bool> { + self.query(format!("chunk {} {} {}", p.x, p.y, p.z))?; + Ok(self.flag("chunk")) + } + fn effective_gravity(&mut self) -> io::Result<f64> { + self.query("gravity")?; + Ok(number(&self.f["gravity"])) + } + fn y(&self) -> f64 { + self.y + } + fn minimum_y(&mut self) -> io::Result<i32> { + self.query("min-y")?; + Ok(self.f["min_y"].as_i64().unwrap() as i32) + } + fn discard_friction(&mut self) -> io::Result<bool> { + self.query("discard")?; + Ok(self.flag("discard")) + } + fn air_drag_modifier(&mut self) -> io::Result<f64> { + self.query("drag-modifier")?; + Ok(number(&self.f["drag_modifier"])) + } + fn omnidirectional_air_mover(&mut self) -> io::Result<bool> { + self.query("omni")?; + Ok(self.flag("omni")) + } +} +impl LivingFluidWorld for World<'_> { + fn in_water(&mut self) -> io::Result<bool> { + self.query("water")?; + Ok(self.flag("water")) + } + fn sprinting(&mut self) -> io::Result<bool> { + self.query("sprint")?; + let b = self.sequence("sprint", self.sprint_calls); + self.sprint_calls += 1; + Ok(b) + } + fn water_slow_down(&mut self) -> io::Result<f32> { + self.query("slow-down")?; + Ok(single(&self.f["slow_down"])) + } + fn water_movement_efficiency(&mut self) -> io::Result<f64> { + self.query("efficiency")?; + Ok(number(&self.f["efficiency"])) + } + fn dolphins_grace(&mut self) -> io::Result<bool> { + self.query("dolphin")?; + Ok(self.flag("dolphin")) + } + fn fluid_height(&mut self, tag: TravelFluidTag) -> io::Result<f64> { + let key = match tag { + TravelFluidTag::Lava => "lava", + TravelFluidTag::EntityFloatable => "floatable", + }; + self.query(format!("height {key}"))?; + Ok(number(&self.f[format!("{key}_height")])) + } + fn fluid_jump_threshold(&mut self) -> io::Result<f64> { + self.query("threshold")?; + Ok(number(&self.f["threshold"])) + } + fn is_free(&mut self, v: Vec3) -> io::Result<bool> { + self.query(format!("free {}", vector(v)))?; + if self.flag("free_mutate") { + self.velocity = Vec3::new(31.0, 32.0, 33.0); + } + Ok(self.flag("free")) + } + fn is_vehicle(&mut self) -> io::Result<bool> { + self.query("vehicle")?; + Ok(self.flag("vehicle")) + } + fn can_float_while_ridden(&mut self) -> io::Result<bool> { + self.query("float-tag")?; + Ok(self.flag("float_tag")) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + ground_calls: 0, + climb_calls: 0, + velocity: vec(&f["velocity"]), + fall: number(&f["fall"]), + moved: false, + y: number(&f["y"]), + sprint_calls: 0, + }; + let input = vec(&f["input"]); + let friction = single(&f["friction"]); + let result: io::Result<()> = match f["mode"].as_str().unwrap() { + "fluid" => travel_in_fluid(&mut w, input), + "water" => travel_in_water( + &mut w, + input, + number(&f["gravity"]), + f["falling"].as_bool().unwrap(), + number(&f["old_y"]), + ), + "lava" => travel_in_lava( + &mut w, + input, + number(&f["gravity"]), + f["falling"].as_bool().unwrap(), + number(&f["old_y"]), + ), + "adjust" => fluid_falling_adjusted_movement( + &mut w, + number(&f["gravity"]), + f["falling"].as_bool().unwrap(), + input, + ) + .and_then(|v| writeln!(w.out, "vector {}", vector(v))), + "jump" => jump_out_of_fluid(&mut w, number(&f["old_y"])), + "float" => float_in_liquid_while_ridden(&mut w, TravelFluidTag::EntityFloatable), + "air" => travel_in_air(&mut w, input), + "relative" => relative_friction_movement(&mut w, input, friction) + .and_then(|v| writeln!(w.out, "vector {}", vector(v))), + "climb" => handle_on_climbable(&mut w, input) + .and_then(|v| writeln!(w.out, "vector {}", vector(v))), + "speed" => friction_influenced_speed(&mut w, friction) + .and_then(|v| writeln!(w.out, "float {:08x}", fbits(v))), + "input" => writeln!( + w.out, + "vector {}", + vector(input_vector(input, single(&f["speed"]), single(&f["yaw"]))) + ), + "friction" => writeln!( + w.out, + "float {:08x}", + fbits(modified_friction( + friction, + number(&f["friction_modifier"]) as f32 + )) + ), + _ => panic!("unknown mode"), + }; + writeln!( + w.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!(w.out, "final {} {:016x}", vector(w.velocity), bits(w.fall))?; + writeln!(w.out, "queries {}", w.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/living_health_fixture.rs b/crates/horizon-world/examples/living_health_fixture.rs new file mode 100644 index 000000000..958d43b7d --- /dev/null +++ b/crates/horizon-world/examples/living_health_fixture.rs @@ -0,0 +1,158 @@ +use horizon_world::living_health::{self, HealthWorld, SyncedFloat}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +struct Context<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + changed: bool, + active: usize, +} +impl Context<'_> { + fn query(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected health callback failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.changed = true; + self.active = 1; + } + Ok(()) + } + fn world(&self) -> &Value { + &self.f[if self.changed { "after" } else { "world" }] + } +} +struct World<'a> { + ctx: Context<'a>, + stores: [SyncedFloat; 2], + absorption: f32, +} +impl HealthWorld for World<'_> { + type Error = io::Error; + type Data = usize; + fn health(&mut self) -> io::Result<f32> { + self.ctx.query("health")?; + Ok(self.stores[self.ctx.active].value()) + } + fn health_data(&self) -> usize { + self.ctx.active + } + fn max_health_attribute(&mut self) -> io::Result<f64> { + self.ctx.query("max-health")?; + Ok(number(&self.ctx.world()["max-health"])) + } + fn max_absorption_attribute(&mut self) -> io::Result<f64> { + self.ctx.query("max-absorption")?; + Ok(number(&self.ctx.world()["max-absorption"])) + } + fn store_health(&mut self, data: usize, v: f32) -> io::Result<()> { + self.stores[data].set(v, false, |_| self.ctx.query("updated")) + } + fn store_absorption(&mut self, v: f32) -> io::Result<()> { + self.ctx.query(&format!("absorption {:08x}", bits(v)))?; + self.absorption = v; + Ok(()) + } + fn dead_flag(&self) -> bool { + self.ctx.world()["dead"].as_bool().unwrap() + } + fn dispatch_set_health(&mut self, v: f32) -> io::Result<()> { + self.ctx.query(&format!("set {:08x}", bits(v)))?; + living_health::set_health(self, v) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut w = World { + ctx: Context { + f: &f, + out: &mut out, + calls: 0, + changed: false, + active: 0, + }, + stores: [ + SyncedFloat::new(single(&f["health"][0])), + SyncedFloat::new(single(&f["health"][1])), + ], + absorption: single(&f["absorption"]), + }; + for op in f["ops"].as_array().unwrap() { + let v = single(&op["value"]); + let result = match op["mode"].as_str().unwrap() { + "heal" => living_health::heal(&mut w, v), + "set" => w.dispatch_set_health(v), + "base" => living_health::set_health(&mut w, v), + "absorption" => living_health::set_absorption(&mut w, v), + "hurt" => { + living_health::is_hurt(&mut w).and_then(|v| writeln!(w.ctx.out, "bool {v}")) + } + "dead" => living_health::is_dead_or_dying(&mut w) + .and_then(|v| writeln!(w.ctx.out, "bool {v}")), + "sync" => w.stores[w.ctx.active].set(v, op["force"].as_bool().unwrap(), |_| { + w.ctx.query("updated") + }), + "pack" => { + writeln!( + w.ctx.out, + "packed {}", + w.stores[w.ctx.active] + .take_dirty() + .map(|v| format!("{:08x}", bits(v))) + .unwrap_or_else(|| "none".into()) + ) + } + _ => panic!("mode"), + }; + writeln!( + w.ctx.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + for (i, s) in w.stores.iter().enumerate() { + writeln!( + w.ctx.out, + "data {i} {:08x} {} {} {}", + bits(s.value()), + s.is_dirty(), + s.item_dirty(), + s.is_default() + )?; + } + let dead = w.dead_flag(); + writeln!( + w.ctx.out, + "state {} {:08x} {dead} {}", + w.ctx.active, + bits(w.absorption), + w.ctx.calls + )?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/living_hurt_fixture.rs b/crates/horizon-world/examples/living_hurt_fixture.rs new file mode 100644 index 000000000..e9addb406 --- /dev/null +++ b/crates/horizon-world/examples/living_hurt_fixture.rs @@ -0,0 +1,249 @@ +use horizon_world::living_hurt::{HurtState, HurtTag, HurtWorld, hurt_server}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +fn state(s: &HurtState<()>) -> String { + format!( + "{} {} {:08x} {} {} {} {}", + s.no_action_time, + s.cooldown, + bits(s.last_hurt), + s.hurt_duration, + s.hurt_time, + s.last_source.is_some(), + s.last_stamp + ) +} +struct Env<'a> { + out: &'a mut dyn Write, + op: &'a Value, + calls: i64, + hit: bool, + recorded: f32, + player: bool, +} +impl Env<'_> { + fn flag(&self, n: &str) -> bool { + self.op[n].as_bool().unwrap() + } + fn event(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.op["fail"].as_i64().unwrap() { + Err(io::Error::other("injected hurt callback failure")) + } else { + Ok(()) + } + } +} +impl HurtWorld for Env<'_> { + type Error = io::Error; + type Source = (); + type UseItem = bool; + type Blocking = (); + type Sound = (); + fn source(&self) {} + fn is_server_player(&self) -> bool { + self.player + } + fn invulnerable(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("invulnerable")?; + Ok(self.flag("invulnerable")) + } + fn fire_resistance(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("fire-resistance")?; + Ok(self.flag("fire_resistance")) + } + fn sleeping(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("sleeping")?; + Ok(self.flag("sleeping")) + } + fn freeze_hurts_extra(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("freeze-extra")?; + Ok(self.flag("freeze_extra")) + } + fn stop_sleeping(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("wake") + } + fn resolve_mob(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("resolve-mob") + } + fn resolve_player(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("resolve-player") + } + fn broadcast_damage(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("broadcast") + } + fn mark_hurt(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("mark") + } + fn secondary_sound(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("thorns") + } + fn die(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("die") + } + fn hurt_sound(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("hurt-sound") + } + + fn dead_or_dying(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("dead")?; + Ok(self.flag(if self.hit { + "dead_after" + } else { + "dead_before" + })) + } + fn tag(&mut self, _: &mut HurtState<()>, tag: HurtTag) -> io::Result<bool> { + let n = match tag { + HurtTag::Fire => "fire", + HurtTag::Freezing => "freezing", + HurtTag::DamagesHelmet => "damages_helmet", + HurtTag::BypassesCooldown => "bypasses_cooldown", + HurtTag::NoImpact => "no_impact", + HurtTag::NoKnockback => "no_knockback", + }; + self.event(&format!("tag {n}"))?; + Ok(self.flag(n)) + } + fn use_item(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("use-item")?; + Ok(self.flag("component")) + } + fn apply_blocking(&mut self, _: &mut HurtState<()>, v: f32) -> io::Result<f32> { + self.event(&format!("blocking {:08x}", bits(v)))?; + Ok(single(&self.op["blocked"])) + } + fn helmet_empty(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("helmet")?; + Ok(!self.flag("helmet")) + } + fn hurt_helmet(&mut self, _: &mut HurtState<()>, v: f32) -> io::Result<()> { + self.event(&format!("hurt-helmet {:08x}", bits(v))) + } + fn actually_hurt(&mut self, s: &mut HurtState<()>, v: f32) -> io::Result<()> { + self.event(&format!("hurt {:08x} {}", bits(v), state(s)))?; + self.hit = true; + self.recorded = v; + if self.flag("mutate_hit") { + s.cooldown = self.op["hit_cooldown"].as_i64().unwrap() as i32; + s.last_hurt = single(&self.op["hit_last"]); + s.hurt_duration = self.op["hit_duration"].as_i64().unwrap() as i32; + s.hurt_time = self.op["hit_time"].as_i64().unwrap() as i32; + } + Ok(()) + } + fn blocking_component(&mut self, v: bool) -> Option<()> { + v.then_some(()) + } + fn on_blocked(&mut self, _: &mut HurtState<()>, _: ()) -> io::Result<()> { + Ok(()) + } + fn knockback(&mut self, _: &mut HurtState<()>, v: f32, b: bool) -> io::Result<()> { + self.event(&format!("knockback {:08x} {b}", bits(v))) + } + fn death_protection(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("tag bypasses_invulnerability")?; + if !self.flag("bypasses_invulnerability") { + self.event("hand 0")?; + self.event("hand 1")?; + } + Ok(false) + } + fn death_sound(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("death-sound") + } + fn make_sound(&mut self, _: &mut HurtState<()>, _: ()) -> io::Result<()> { + self.event("make-sound") + } + fn game_time(&mut self, _: &mut HurtState<()>) -> io::Result<i64> { + self.event("level")?; + self.event("game-time")?; + Ok(self.op["game_time"].as_i64().unwrap()) + } + fn effects_on_hurt(&mut self, _: &mut HurtState<()>, v: f32) -> io::Result<()> { + self.event("effects")?; + for i in 0..self.op["effects"].as_u64().unwrap() { + self.event(&format!("effect {i} {:08x}", bits(v)))?; + } + Ok(()) + } + fn player_hurt_criterion( + &mut self, + _: &mut HurtState<()>, + _: f32, + _: f32, + _: bool, + ) -> io::Result<()> { + self.event("criterion") + } + fn award_blocked(&mut self, _: &mut HurtState<()>, v: i32) -> io::Result<()> { + self.event(&format!("blocked-stat {v}")) + } + fn attacker_criterion( + &mut self, + _: &mut HurtState<()>, + _: f32, + _: f32, + _: bool, + ) -> io::Result<()> { + self.event("attacker") + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut s = HurtState { + no_action_time: f["no_action"].as_i64().unwrap() as i32, + cooldown: f["cooldown"].as_i64().unwrap() as i32, + last_hurt: single(&f["last_hurt"]), + hurt_duration: f["duration"].as_i64().unwrap() as i32, + hurt_time: f["time"].as_i64().unwrap() as i32, + last_source: f["source"].as_bool().unwrap().then_some(()), + last_stamp: f["stamp"].as_i64().unwrap(), + }; + let mut recorded = 0.0; + for op in f["ops"].as_array().unwrap() { + let mut e = Env { + out: &mut out, + op, + calls: 0, + hit: false, + recorded, + player: f["player"].as_bool().unwrap(), + }; + match hurt_server(&mut s, &mut e, single(&op["damage"])) { + Ok(v) => writeln!(e.out, "bool {v}\nresult ok")?, + Err(_) => writeln!(e.out, "result error")?, + }; + recorded = e.recorded; + writeln!( + e.out, + "state {} {:08x} {} {}", + state(&s), + bits(recorded), + e.hit, + e.calls + )?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/living_landing_fixture.rs b/crates/horizon-world/examples/living_landing_fixture.rs new file mode 100644 index 000000000..156f8a2bd --- /dev/null +++ b/crates/horizon-world/examples/living_landing_fixture.rs @@ -0,0 +1,215 @@ +use horizon_core::{geometry::Vec3, position::BlockPos}; +use horizon_world::fall_damage::FallDamageWorld; +use horizon_world::living_landing::{LivingLandingWorld, check_living_fall_damage}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn support(v: &Value) -> Option<BlockPos> { + if v.is_null() { + None + } else { + Some(BlockPos::new( + v[0].as_i64().unwrap() as i32, + v[1].as_i64().unwrap() as i32, + v[2].as_i64().unwrap() as i32, + )) + } +} +struct World<'a> { + input: &'a Value, + out: &'a mut dyn Write, + calls: i64, + fall: f64, + position: Vec3, + support: Option<BlockPos>, + water: bool, + climbable: bool, +} +impl World<'_> { + fn query(&mut self, text: String) -> io::Result<()> { + writeln!(self.out, "{text}")?; + let call = self.calls; + self.calls += 1; + if call == self.input["fail"].as_i64().unwrap() { + Err(io::Error::other("injected fall query failure")) + } else { + Ok(()) + } + } +} +impl FallDamageWorld for World<'_> { + type Error = io::Error; + type State = u8; + fn is_in_water(&mut self) -> io::Result<bool> { + self.query("water".into())?; + Ok(self.water) + } + fn fall_distance(&self) -> f64 { + self.fall + } + fn set_fall_distance(&mut self, v: f64) { + self.fall = v; + } + fn fall_on(&mut self, _: u8, p: BlockPos, distance: f64) -> io::Result<()> { + self.query(format!( + "fall-on {} {} {} {:016x}", + p.x, + p.y, + p.z, + bits(distance) + ))?; + if self.input["mutate"].as_bool().unwrap() { + self.fall = 17.25; + self.position = Vec3::new(17.0, 18.0, 19.0); + self.support = support(&self.input["after_support"]); + } + Ok(()) + } + fn position(&self) -> Vec3 { + self.position + } + fn supporting_block(&self) -> Option<BlockPos> { + self.support + } + fn block_state(&mut self, p: BlockPos) -> io::Result<u8> { + self.query(format!("state {} {} {}", p.x, p.y, p.z))?; + Ok(1) + } + fn hit_ground(&mut self, p: Vec3, s: u8) -> io::Result<()> { + self.query(format!( + "hit-ground {:016x} {:016x} {:016x} {}", + bits(p.x), + bits(p.y), + bits(p.z), + if s == 1 { "queried" } else { "input" } + )) + } + fn reset_fall_distance(&mut self) -> io::Result<()> { + self.query("reset".into())?; + self.fall = 0.0; + Ok(()) + } +} +impl LivingLandingWorld for World<'_> { + fn update_fluid_interaction(&mut self) -> io::Result<bool> { + self.query("fluid-update".into())?; + self.water = self.input["after_water"].as_bool().unwrap(); + if self.input["fluid_mutate"].as_bool().unwrap() { + self.fall = number(&self.input["after_fall"]); + } + Ok(self.input["fluid_result"].as_bool().unwrap()) + } + fn is_server_level(&self) -> bool { + self.input["server"].as_bool().unwrap() + } + fn on_changed_block(&mut self, p: BlockPos) -> io::Result<()> { + self.query(format!("changed {} {} {}", p.x, p.y, p.z))?; + if self.input["changed_mutate"].as_bool().unwrap() { + self.fall = number(&self.input["after_fall"]); + self.position = Vec3::new(17.0, 18.0, 19.0); + } + Ok(()) + } + fn safe_fall_distance(&mut self) -> io::Result<f64> { + self.query("safe".into())?; + Ok(number(&self.input["safe"])) + } + fn state_is_air(&mut self, _: u8) -> io::Result<bool> { + self.query("air".into())?; + Ok(self.input["air"].as_bool().unwrap()) + } + fn block_position(&mut self) -> io::Result<BlockPos> { + self.query("block-position".into())?; + if self.input["block_mutate"].as_bool().unwrap() { + self.position = Vec3::new(31.0, 32.0, 33.0); + } + Ok(support(&self.input["block_position"]).unwrap()) + } + fn landing_particles(&mut self, s: u8, p: Vec3, count: i32, speed: f64) -> io::Result<()> { + assert_eq!(s, 0); + self.query(format!( + "particles {:016x} {:016x} {:016x} {} {:016x}", + bits(p.x), + bits(p.y), + bits(p.z), + count, + bits(speed) + ))?; + if self.input["particle_mutate"].as_bool().unwrap() { + self.fall = number(&self.input["after_fall"]); + self.water = !self.water; + } + Ok(()) + } + fn clear_last_climbable_position(&mut self) { + self.climbable = false; + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut world = World { + input: &f, + out: &mut out, + calls: 0, + fall: number(&f["fall"]), + position: Vec3::new( + number(&f["position"][0]), + number(&f["position"][1]), + number(&f["position"][2]), + ), + water: f["water"].as_bool().unwrap(), + climbable: true, + support: support(&f["support"]), + }; + let result = check_living_fall_damage( + &mut world, + number(&f["dy"]), + f["ground"].as_bool().unwrap(), + 0, + support(&f["landing"]).unwrap(), + ); + writeln!( + world.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + let p = world.position; + writeln!( + world.out, + "final {:016x} {:016x} {:016x} {:016x}", + bits(world.fall), + bits(p.x), + bits(p.y), + bits(p.z) + )?; + if let Some(p) = world.support { + writeln!(world.out, "support {} {} {}", p.x, p.y, p.z)?; + } else { + writeln!(world.out, "support none")?; + } + writeln!( + world.out, + "climbable {} water {}", + world.climbable, world.water + )?; + writeln!(world.out, "queries {}", world.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/living_motion_fixture.rs b/crates/horizon-world/examples/living_motion_fixture.rs new file mode 100644 index 000000000..92b4db938 --- /dev/null +++ b/crates/horizon-world/examples/living_motion_fixture.rs @@ -0,0 +1,164 @@ +use horizon_core::geometry::Vec3; +use horizon_world::living_motion::*; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vec(v: &Value) -> Vec3 { + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn fbits(v: f32) -> u32 { + if v.is_nan() { 0x7fc00000 } else { v.to_bits() } +} +fn vector(v: Vec3) -> String { + format!("{:016x} {:016x} {:016x}", bits(v.x), bits(v.y), bits(v.z)) +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + velocity: Vec3, + sync: bool, +} +impl World<'_> { + fn flag(&self, k: &str) -> bool { + self.f[k].as_bool().unwrap() + } + fn query(&mut self, s: impl AsRef<str>) -> io::Result<()> { + writeln!(self.out, "{}", s.as_ref())?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected motion failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.velocity = vec(&self.f["after_velocity"]); + } + Ok(()) + } +} +impl LivingMotionWorld for World<'_> { + type Error = io::Error; + fn velocity(&self) -> Vec3 { + self.velocity + } + fn set_velocity(&mut self, v: Vec3) -> io::Result<()> { + self.query(format!("set {}", vector(v)))?; + self.velocity = v; + Ok(()) + } + fn jump_strength(&mut self) -> io::Result<f64> { + self.query("strength")?; + Ok(number(&self.f["strength"])) + } + fn block_jump_factor(&mut self) -> io::Result<f32> { + self.query("block-factor")?; + Ok(single(&self.f["block_factor"])) + } + fn has_jump_boost(&mut self) -> io::Result<bool> { + self.query("has-boost")?; + Ok(self.flag("boost")) + } + fn jump_boost_amplifier(&mut self) -> io::Result<i32> { + self.query("get-boost")?; + Ok(self.f["amplifier"].as_i64().unwrap() as i32) + } + fn sprinting(&mut self) -> io::Result<bool> { + self.query("sprint")?; + Ok(self.flag("sprint")) + } + fn yaw(&mut self) -> io::Result<f32> { + self.query("yaw")?; + Ok(single(&self.f["yaw"])) + } + fn mark_needs_sync(&mut self) { + self.sync = true; + } + fn no_gravity(&mut self) -> io::Result<bool> { + self.query("no-gravity")?; + Ok(self.flag("no_gravity")) + } + fn gravity_attribute(&mut self) -> io::Result<f64> { + self.query("gravity")?; + Ok(number(&self.f["gravity"])) + } + fn has_slow_falling(&mut self) -> io::Result<bool> { + self.query("slow-falling")?; + Ok(self.flag("slow_falling")) + } + fn controlling_passenger_is_player(&mut self) -> io::Result<bool> { + self.query("passenger")?; + Ok(self.f["passenger"].as_i64().unwrap() == 2) + } + fn speed(&mut self) -> io::Result<f32> { + self.query("speed")?; + Ok(single(&self.f["speed"])) + } + fn omnidirectional_air_mover(&mut self) -> io::Result<bool> { + self.query("omni")?; + Ok(self.flag("omni")) + } + fn air_drag_modifier(&mut self) -> io::Result<f64> { + self.query("drag-modifier")?; + Ok(number(&self.f["drag_modifier"])) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + velocity: vec(&f["velocity"]), + sync: f["sync"].as_bool().unwrap(), + }; + let result: io::Result<()> = match f["mode"].as_str().unwrap() { + "boost" => { + jump_boost_power(&mut w).and_then(|v| writeln!(w.out, "float {:08x}", fbits(v))) + } + "power" => jump_power(&mut w, single(&f["scale"])) + .and_then(|v| writeln!(w.out, "float {:08x}", fbits(v))), + "jump" => jump_from_ground(&mut w), + "gravity" => gravity(&mut w).and_then(|v| writeln!(w.out, "double {:016x}", bits(v))), + "effective" => { + effective_gravity(&mut w).and_then(|v| writeln!(w.out, "double {:016x}", bits(v))) + } + "apply" => apply_gravity(&mut w), + "up" => swim_vertical(&mut w, true), + "down" => swim_vertical(&mut w, false), + "speed" => { + default_flying_speed(&mut w).and_then(|v| writeln!(w.out, "float {:08x}", fbits(v))) + } + "drag" => air_drag(&mut w).and_then(|v| writeln!(w.out, "float {:08x}", fbits(v))), + "add" => add_delta_movement(&mut w, vec(&f["delta"])), + _ => panic!("mode"), + }; + writeln!( + w.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!(w.out, "final {} {}", vector(w.velocity), w.sync)?; + writeln!(w.out, "queries {}", w.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/material_condition_fixture.rs b/crates/horizon-world/examples/material_condition_fixture.rs new file mode 100644 index 000000000..0cbb03168 --- /dev/null +++ b/crates/horizon-world/examples/material_condition_fixture.rs @@ -0,0 +1,735 @@ +//! Original comparison transport for material conditions and cache behavior. +use horizon_core::{ + density::{ConstantSampler, DensitySampler, SampleError, SamplerContext}, + noise::{DensityVolume, NanRange, Noise}, + position::BlockPos, + random::{LegacyRandom, PositionalRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::worldgen::{ + anchor::{VerticalAnchor, WorldGenerationContext}, + biome_temperature::{BiomeTemperature, BiomeTemperatureSettings}, + decode_noise, + density::DensityRegistry, + material_condition::{ + MaterialCondition, MaterialConditionRegistry, MaterialConditions, MaterialDensitySources, + MaterialNoiseSources, MaterialRule, MaterialRuleError, MaterialRuleLibrary, + MaterialSurfaceQueries, + }, + material_surface::{ClayBandBlocks, MaterialSurface}, + tags::TagDefinitions, +}; +use horizon_world::{ + DATA_VERSION, + nbt::Tag, + registry::{BlockRegistry, BlockStateId, BlockStateJsonCodec}, +}; +use serde_json::Value; +use std::{ + collections::{BTreeMap, BTreeSet}, + fs, + io::{self, Write}, + path::Path, + sync::{Arc, Mutex}, +}; +// Canonicalize numeric values as double bits, avoiding differences in JSON +// number formatting while preserving every encoded int32/double value. +fn encoded(value: &MaterialCondition) -> String { + let Ok(text) = value.to_json() else { + return "error".to_owned(); + }; + let bytes = text.as_bytes(); + let mut transformed = Vec::new(); + let mut i = 0; + let mut quoted = false; + let mut escaped = false; + while i < bytes.len() { + if !quoted { + let special = [ + ("-Infinity", 0xfff0000000000000u64), + ("Infinity", 0x7ff0000000000000), + ("NaN", 0x7ff8000000000000), + ] + .into_iter() + .find(|(token, _)| bytes[i..].starts_with(token.as_bytes())); + if let Some((token, bits)) = special { + transformed.extend_from_slice(format!("\"number:{bits:x}\"").as_bytes()); + i += token.len(); + continue; + } + } + let c = bytes[i]; + transformed.push(c); + i += 1; + if escaped { + escaped = false; + } else if quoted && c == b'\\' { + escaped = true; + } else if c == b'"' { + quoted = !quoted; + } + } + fn normalize(value: &mut Value) { + match value { + Value::Number(n) => { + let v = n.as_f64().unwrap(); + *value = Value::String(format!("number:{:x}", v.to_bits())); + } + Value::Array(a) => a.iter_mut().for_each(normalize), + Value::Object(o) => o.values_mut().for_each(normalize), + _ => {} + } + } + let mut value: Value = serde_json::from_slice(&transformed).unwrap(); + normalize(&mut value); + serde_json::to_string(&value).unwrap() +} +fn anchor(v: &Value) -> VerticalAnchor { + let n = v[1].as_i64().unwrap() as i32; + match v[0].as_u64().unwrap() { + 0 => VerticalAnchor::Absolute(n), + 1 => VerticalAnchor::AboveBottom(n), + 2 => VerticalAnchor::BelowTop(n), + 3 => VerticalAnchor::RelativeToSeaLevel(n), + _ => panic!("unknown anchor"), + } +} +fn condition(v: &Value, registry: &MaterialConditionRegistry) -> MaterialCondition { + match v[0].as_str().unwrap() { + "json" => registry.decode(v[1].as_str().unwrap()).unwrap(), + "noise" => MaterialCondition::NoiseThreshold { + noise: v[1].as_str().unwrap().to_owned(), + min: f64::from_bits(u64::from_str_radix(v[2].as_str().unwrap(), 16).unwrap()), + max: f64::from_bits(u64::from_str_radix(v[3].as_str().unwrap(), 16).unwrap()), + is_3d: v[4].as_bool().unwrap(), + }, + "temperature" => MaterialCondition::Temperature, + "above" => MaterialCondition::AbovePreliminarySurface, + "biome" => MaterialCondition::Biome( + v[1].as_array() + .unwrap() + .iter() + .map(|name| name.as_str().unwrap().to_owned()) + .collect(), + ), + "hole" => MaterialCondition::Hole, + "steep" => MaterialCondition::Steep, + "y" => MaterialCondition::YAbove { + anchor: anchor(&v[1]), + surface_depth_multiplier: v[2].as_i64().unwrap() as i32, + add_stone_depth: v[3].as_bool().unwrap(), + }, + "water" => MaterialCondition::Water { + offset: v[1].as_i64().unwrap() as i32, + surface_depth_multiplier: v[2].as_i64().unwrap() as i32, + add_stone_depth: v[3].as_bool().unwrap(), + }, + "stone" => MaterialCondition::StoneDepth { + offset: v[1].as_i64().unwrap() as i32, + add_surface_depth: v[2].as_bool().unwrap(), + secondary_depth_range: v[3].as_i64().unwrap() as i32, + ceiling: v[4].as_bool().unwrap(), + }, + "gradient" => MaterialCondition::VerticalGradient { + random_name: v[1].as_str().unwrap().to_owned(), + true_at_and_below: anchor(&v[2]), + false_at_and_above: anchor(&v[3]), + }, + "not" => MaterialCondition::Not(Box::new(condition(&v[1], registry))), + _ => panic!("unknown condition"), + } +} +#[derive(Default, Debug)] +struct Inputs { + depth: i32, + secondary: f32, + queries: Vec<String>, + biome: Option<String>, + density: f32, + density_remaining: i32, + ore_values: [f32; 3], + ore_remaining: [i32; 3], +} +#[derive(Debug)] +struct TracedDensity { + inputs: Arc<Mutex<Inputs>>, + channel: Option<usize>, +} +impl TracedDensity { + fn label(&self) -> String { + self.channel + .map(|i| format!("ore {i}")) + .unwrap_or_else(|| "density".to_owned()) + } +} +impl DensitySampler for TracedDensity { + fn sample_value(&self, _: &mut SamplerContext, position: [i32; 3]) -> Result<f32, SampleError> { + let [x, y, z] = position; + let mut inputs = self.inputs.lock().unwrap(); + inputs + .queries + .push(format!("{} query {x} {y} {z}", self.label())); + let remaining = match self.channel { + Some(i) => &mut inputs.ore_remaining[i], + None => &mut inputs.density_remaining, + }; + if *remaining == 0 { + return Err(SampleError::SurfaceSearchOverflow); + } + if *remaining > 0 { + *remaining -= 1; + } + Ok(self + .channel + .map(|i| inputs.ore_values[i]) + .unwrap_or(inputs.density)) + } + fn sample_volume( + &self, + context: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + let [sx, sy, sz] = volume.sizes(); + let [x, y, z] = volume.minimum(); + let [dx, dy, dz] = volume.steps(); + self.inputs.lock().unwrap().queries.push(format!( + "{} volume {sx} {sy} {sz} {x} {y} {z} {dx} {dy} {dz}", + self.label() + )); + for iz in 0..sz { + for ix in 0..sx { + for iy in 0..sy { + buffer[iy + (ix + iz * sx) * sy] = self.sample_value( + context, + [ + x.wrapping_add((ix as i32).wrapping_mul(dx)), + y.wrapping_add((iy as i32).wrapping_mul(dy)), + z.wrapping_add((iz as i32).wrapping_mul(dz)), + ], + )?; + } + } + } + Ok(()) + } +} +struct Surface<P: PositionalRandom> { + inputs: Arc<Mutex<Inputs>>, + noises: MaterialNoiseSources<P, MaterialSurface<P>>, + real_noise: bool, + biomes: Arc<Mutex<BTreeMap<String, BiomeTemperature>>>, + possible: Option<BTreeSet<String>>, +} +#[derive(Debug)] +struct TracedNoise { + name: String, + inputs: Arc<Mutex<Inputs>>, +} +impl Noise for TracedNoise { + fn range(&self) -> Result<[f32; 2], NanRange> { + Ok([f32::NEG_INFINITY, f32::INFINITY]) + } + fn get2(&self, _: f64, _: f64) -> f32 { + panic!("unexpected 2D noise call") + } + fn get3(&self, x: f64, y: f64, z: f64) -> f32 { + let mut inputs = self.inputs.lock().unwrap(); + inputs.queries.push(format!( + "noise query {} {} {} {}", + self.name, x as i32, y as i32, z as i32 + )); + inputs.secondary + } +} +impl<P: PositionalRandom> MaterialSurfaceQueries for Surface<P> { + fn possible_biomes(&self) -> Option<BTreeSet<String>> { + self.possible.clone() + } + fn biome(&mut self, p: BlockPos) -> Result<Option<Arc<str>>, MaterialRuleError> { + let mut inputs = self.inputs.lock().unwrap(); + inputs + .queries + .push(format!("biome query {} {} {}", p.x, p.y, p.z)); + if inputs.biome.as_deref() == Some("#throw") { + return Err(MaterialRuleError::BiomeQueryFailed); + } + Ok(inputs.biome.as_deref().map(Arc::from)) + } + fn cold_enough_to_snow( + &mut self, + name: &str, + p: BlockPos, + sea: i32, + ) -> Result<bool, MaterialRuleError> { + Ok(self + .biomes + .lock() + .unwrap() + .get_mut(name) + .ok_or(MaterialRuleError::MissingBiome)? + .cold_enough_to_snow(p, sea)) + } + fn bind_noise( + &mut self, + name: &str, + ) -> Result<Arc<dyn Noise>, horizon_world::worldgen::DecodeError> { + let real = self.noises.bind_noise(name)?; + if self.real_noise { + Ok(real) + } else { + Ok(Arc::new(TracedNoise { + name: name.to_owned(), + inputs: self.inputs.clone(), + })) + } + } + fn band(&mut self, position: BlockPos) -> Result<BlockStateId, MaterialRuleError> { + self.noises.band(position) + } + fn surface_depth(&mut self, _: i32, _: i32) -> i32 { + self.inputs.lock().unwrap().depth + } + fn surface_secondary(&mut self, x: i32, z: i32) -> f64 { + let mut i = self.inputs.lock().unwrap(); + i.queries.push(format!("secondary query {x} {z}")); + f64::from(i.secondary) + } +} +fn rule( + v: &Value, + registry: &MaterialConditionRegistry, + inputs: &Arc<Mutex<Inputs>>, +) -> MaterialRule { + match v[0].as_str().unwrap() { + "block" => MaterialRule::Block(BlockStateId(v[1].as_u64().unwrap() as u32)), + "band" => MaterialRule::Bandlands, + "ore" => MaterialRule::OreVein { + ore: BlockStateId(7), + raw_ore: BlockStateId(8), + filler: BlockStateId(9), + raw_ore_chance: f32::from_bits( + u32::from_str_radix(v[1].as_str().unwrap(), 16).unwrap(), + ), + density: Arc::new(TracedDensity { + inputs: inputs.clone(), + channel: Some(0), + }), + richness: Arc::new(TracedDensity { + inputs: inputs.clone(), + channel: Some(1), + }), + filler_gap: Arc::new(TracedDensity { + inputs: inputs.clone(), + channel: Some(2), + }), + }, + "if" => MaterialRule::Condition { + if_true: condition(&v[1], registry), + then_run: Box::new(rule(&v[2], registry, inputs)), + }, + "sequence" => MaterialRule::Sequence( + v[1].as_array() + .unwrap() + .iter() + .map(|v| rule(v, registry, inputs)) + .collect(), + ), + _ => panic!("unknown rule"), + } +} +fn queries(inputs: &Mutex<Inputs>, out: &mut impl Write) -> io::Result<()> { + for query in inputs.lock().unwrap().queries.drain(..) { + writeln!(out, "{query}")?; + } + Ok(()) +} +struct RuleData { + blocks: BlockRegistry, + integers: BTreeSet<(String, String)>, + densities: BTreeMap<String, String>, + definitions: BTreeMap<String, String>, +} +fn metadata_tag(v: &Value) -> Tag { + match v { + Value::String(s) => Tag::String(s.as_str().into()), + Value::Number(n) => Tag::Int(n.as_i64().unwrap() as i32), + Value::Array(a) => Tag::List(a.iter().map(metadata_tag).collect()), + Value::Object(o) => Tag::Compound( + o.iter() + .map(|(k, v)| (k.as_str().into(), metadata_tag(v))) + .collect(), + ), + _ => panic!("invalid registry metadata"), + } +} +impl RuleData { + fn library( + &self, + f: &Value, + conditions: &MaterialConditionRegistry, + noises: &BTreeMap<String, String>, + query: Option<&str>, + ) -> Result<MaterialRuleLibrary, Box<dyn std::error::Error>> { + let mut definitions = self.definitions.clone(); + if let Some(query) = query { + definitions.insert("horizon:query".to_owned(), query.to_owned()); + } + let blocks = BlockStateJsonCodec::new(&self.blocks, self.integers.clone())?; + let densities = DensityRegistry::from_json(noises, &self.densities)?; + Ok(MaterialRuleLibrary::from_json( + &definitions, + conditions, + &blocks, + densities, + f["seed"].as_i64().unwrap(), + f["legacy"].as_bool().unwrap(), + )?) + } +} +fn fixture<R: RandomSource>( + f: &Value, + registry: &MaterialConditionRegistry, + noises: &BTreeMap<String, String>, + biomes: Arc<Mutex<BTreeMap<String, BiomeTemperature>>>, + rules_data: Option<&RuleData>, + mut random: R, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> +where + R::Positional: Clone, +{ + let [min, height, sea] = std::array::from_fn(|i| f["context"][i].as_i64().unwrap() as i32); + let generation = WorldGenerationContext::new(min, height, sea); + let inputs = Arc::new(Mutex::new(Inputs { + biome: Some("minecraft:plains".to_owned()), + density_remaining: -1, + ore_values: f + .get("ore_values") + .map(|v| { + std::array::from_fn(|i| { + f32::from_bits(u32::from_str_radix(v[i].as_str().unwrap(), 16).unwrap()) + }) + }) + .unwrap_or([1.0, 1.0, -1.0]), + ore_remaining: [-1; 3], + ..Inputs::default() + })); + let root = random.fork_positional(); + let mut samplers: Vec<Arc<dyn Noise>> = Vec::new(); + for name in ["clay_bands_offset", "surface", "surface_secondary"] { + let id = format!("minecraft:{name}"); + samplers.push(Arc::new( + decode_noise(&noises[&id])?.create(&mut root.from_hash_of(&id))?, + )); + } + let mut library = rules_data + .map(|data| data.library(f, registry, noises, None)) + .transpose()?; + if let Some(data) = rules_data { + if let Some(values) = f.get("library_json") { + for value in values.as_array().unwrap() { + let result = data.library(f, registry, noises, Some(value.as_str().unwrap())); + writeln!( + out, + "rule decode {}", + if result.is_ok() { "ok" } else { "error" } + )?; + } + } + } + let block_id = |name: &str, fallback| { + rules_data + .map(|data| { + data.blocks + .default_state(&format!("minecraft:{name}")) + .unwrap() + }) + .unwrap_or(BlockStateId(fallback)) + }; + let blocks = ClayBandBlocks { + terracotta: block_id("terracotta", 0), + orange: block_id("orange_terracotta", 1), + yellow: block_id("yellow_terracotta", 2), + brown: block_id("brown_terracotta", 3), + red: block_id("red_terracotta", 4), + white: block_id("white_terracotta", 5), + light_gray: block_id("light_gray_terracotta", 6), + }; + let surface = MaterialSurface::new( + root.clone(), + blocks, + samplers[0].clone(), + samplers[1].clone(), + samplers[2].clone(), + ); + let sources = MaterialNoiseSources::from_json(root.clone(), surface, noises)?; + let surface = Surface { + inputs: inputs.clone(), + noises: sources, + real_noise: f["real_noise"].as_bool().unwrap_or(false), + biomes, + possible: f.get("possible_biomes").filter(|v| !v.is_null()).map(|v| { + v.as_array() + .unwrap() + .iter() + .map(|v| v.as_str().unwrap().to_owned()) + .collect() + }), + }; + let dims: [i32; 9] = f + .get("volume") + .map(|v| std::array::from_fn(|i| v[i].as_i64().unwrap() as i32)) + .unwrap_or([16, 1, 16, 0, 0, 0, 1, 1, 1]); + let expected = DensityVolume::new( + dims[..3].try_into().unwrap(), + dims[3..6].try_into().unwrap(), + dims[6..].try_into().unwrap(), + )?; + let surface = MaterialDensitySources::new( + surface, + expected, + if library.is_some() { + Arc::new(ConstantSampler(0.0)) + } else { + Arc::new(TracedDensity { + inputs: inputs.clone(), + channel: None, + }) + }, + if library.is_some() { + SamplerContext::cached() + } else { + SamplerContext::default() + }, + )?; + let mut worker = MaterialConditions::<R, _>::new(generation, root, surface); + let mut count = 0; + for c in f["conditions"].as_array().unwrap() { + let value = condition(c, registry); + writeln!(out, "runtime {}", encoded(&value))?; + worker.add(value)?; + count += 1; + } + if let Some(values) = f.get("json") { + for value in values.as_array().unwrap() { + match registry.decode(value.as_str().unwrap()) { + Err(_) => writeln!(out, "decode error")?, + Ok(condition) => { + writeln!(out, "decode {}", encoded(&condition))?; + match worker.add(condition) { + Ok(_) => count += 1, + Err(_) => writeln!(out, "compile error")?, + } + } + } + } + } + let mut rule_count = 0; + if let Some(values) = f.get("rules") { + for value in values.as_array().unwrap() { + worker.add_rule(rule(value, registry, &inputs))?; + queries(&inputs, out)?; + rule_count += 1; + } + } + if let Some(library) = &mut library { + for name in f["library_rules"].as_array().unwrap() { + worker.add_rule(library.rule(name.as_str().unwrap())?)?; + queries(&inputs, out)?; + rule_count += 1; + } + } + for op in f["ops"].as_array().unwrap() { + match op[0].as_str().unwrap() { + "ore_input" => { + let mut i = inputs.lock().unwrap(); + let channel = op[1].as_u64().unwrap() as usize; + i.ore_values[channel] = + f32::from_bits(u32::from_str_radix(op[2].as_str().unwrap(), 16)?); + i.ore_remaining[channel] = op[3].as_i64().unwrap() as i32; + } + "density" => { + let mut i = inputs.lock().unwrap(); + i.density = f32::from_bits(u32::from_str_radix(op[1].as_str().unwrap(), 16)?); + i.density_remaining = op[2].as_i64().unwrap() as i32; + } + "minimum" => { + let value = worker.minimum_surface_level(); + queries(&inputs, out)?; + match value { + Ok(v) => writeln!(out, "minimum {v}")?, + Err(_) => writeln!(out, "minimum error")?, + } + } + "biome" => inputs.lock().unwrap().biome = op[1].as_str().map(str::to_owned), + "rule" => { + let result = worker.add_rule(rule(&op[1], registry, &inputs)); + queries(&inputs, out)?; + match result { + Ok(index) => { + rule_count += 1; + writeln!(out, "rule added {index}")?; + } + Err(_) => writeln!(out, "rule compile error")?, + } + } + "apply" => { + let position = BlockPos::new( + op[1].as_i64().unwrap() as i32, + op[2].as_i64().unwrap() as i32, + op[3].as_i64().unwrap() as i32, + ); + for index in 0..rule_count { + let result = worker.try_apply(index, position); + queries(&inputs, out)?; + match result { + Ok(Some(block)) => writeln!(out, "rule {index} {}", block.0)?, + Ok(None) => writeln!(out, "rule {index} none")?, + Err(_) => writeln!(out, "rule {index} error")?, + } + } + } + "input" => { + let mut i = inputs.lock().unwrap(); + i.depth = op[1].as_i64().unwrap() as i32; + i.secondary = f32::from_bits(u32::from_str_radix(op[2].as_str().unwrap(), 16)?); + } + "xz" => worker.update_xz( + op[1].as_i64().unwrap() as i32, + op[2].as_i64().unwrap() as i32, + op[3].as_i64().unwrap() as i32, + op[4].as_i64().unwrap() as i32, + ), + "y" => worker.update_y( + op[1].as_i64().unwrap() as i32, + op[2].as_i64().unwrap() as i32, + op[3].as_i64().unwrap() as i32, + op[4].as_i64().unwrap() as i32, + ), + "add" => { + let index = worker.add(condition(&op[1], registry))?; + writeln!(out, "added {index}")?; + count += 1; + } + "eval" => { + let indices = if op.as_array().unwrap().len() == 1 { + (0..count).collect() + } else { + op[1] + .as_array() + .unwrap() + .iter() + .map(|i| i.as_u64().unwrap() as usize) + .collect::<Vec<_>>() + }; + for index in indices { + let result = worker.test(index); + queries(&inputs, out)?; + match result { + Ok(value) => writeln!(out, "eval {index} {value}")?, + Err(_) => writeln!(out, "eval {index} error")?, + } + } + } + "secondary" => { + let value = worker.surface_secondary(); + queries(&inputs, out)?; + let bits = if value.is_nan() { + 0x7ff8000000000000 + } else { + value.to_bits() + }; + writeln!(out, "secondary {bits:x}")?; + } + _ => panic!("unknown operation"), + } + } + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + let definitions = serde_json::from_str(&fs::read_to_string(dir.join("conditions.json"))?)?; + let biome_definitions: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("biomes.json"))?)?; + let mut temperatures = BTreeMap::new(); + for (name, json) in &biome_definitions { + temperatures.insert( + name.clone(), + BiomeTemperature::new(BiomeTemperatureSettings::from_json(json)?), + ); + } + let biomes = Arc::new(Mutex::new(temperatures)); + let tag_json: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("biome_tags.json"))?)?; + let mut tag_definitions = TagDefinitions::default(); + for (name, json) in tag_json { + tag_definitions.apply_json(&name, "vanilla", &json)?; + } + let tags = tag_definitions + .build(|id, _required| biome_definitions.contains_key(id).then(|| id.to_owned()))?; + assert!(tags.missing.is_empty()); + let registry = MaterialConditionRegistry::from_json_with_biome_tags( + &definitions, + &biome_definitions.keys().cloned().collect(), + &tags.tags, + )?; + let noises = serde_json::from_str(&fs::read_to_string(dir.join("noises.json"))?)?; + let rules_data = if dir.join("rules.json").exists() { + let facts: Value = + serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + Some(RuleData { + blocks: BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ("states", metadata_tag(&facts["states"])), + ("defaults", metadata_tag(&facts["defaults"])), + ]))?, + integers: facts["integers"] + .as_array() + .unwrap() + .iter() + .map(|v| { + ( + v[0].as_str().unwrap().to_owned(), + v[1].as_str().unwrap().to_owned(), + ) + }) + .collect(), + densities: serde_json::from_str(&fs::read_to_string(dir.join("densities.json"))?)?, + definitions: serde_json::from_str(&fs::read_to_string(dir.join("rules.json"))?)?, + }) + } else { + None + }; + for (name, value) in registry.entries() { + writeln!(out, "registry {name} {}", encoded(value))?; + } + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture( + &f, + ®istry, + &noises, + biomes.clone(), + rules_data.as_ref(), + LegacyRandom::new(seed), + &mut out, + )? + } else { + fixture( + &f, + ®istry, + &noises, + biomes.clone(), + rules_data.as_ref(), + XoroshiroRandom::new(seed), + &mut out, + )? + } + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-world/examples/material_extension_fixture.rs b/crates/horizon-world/examples/material_extension_fixture.rs new file mode 100644 index 000000000..a48943723 --- /dev/null +++ b/crates/horizon-world/examples/material_extension_fixture.rs @@ -0,0 +1,208 @@ +//! Original column-extension comparison transport. +use horizon_core::{ + noise::{NanRange, Noise}, + random::{LegacyRandom, PositionalRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::{ + registry::BlockStateId, + worldgen::{ + biome_temperature::{BiomeTemperature, BiomeTemperatureSettings}, + decode_noise, + material_extensions::{ + ExtensionBlocks, ExtensionNoises, MaterialColumn, MaterialExtensions, + }, + }, +}; +use serde_json::Value; +use std::{ + collections::BTreeMap, + fs, + io::{self, Write}, + path::Path, + sync::{Arc, Mutex}, +}; +const NAMES: [&str; 6] = [ + "badlands_surface", + "badlands_pillar", + "badlands_pillar_roof", + "iceberg_surface", + "iceberg_pillar", + "iceberg_pillar_roof", +]; +#[derive(Debug)] +struct TracedNoise { + name: &'static str, + real: Arc<dyn Noise>, + constant: Option<f32>, + trace: Arc<Mutex<Vec<String>>>, +} +impl Noise for TracedNoise { + fn range(&self) -> Result<[f32; 2], NanRange> { + Ok([f32::NEG_INFINITY, f32::INFINITY]) + } + fn get2(&self, _: f64, _: f64) -> f32 { + panic!("unexpected 2D noise query") + } + fn get3(&self, x: f64, y: f64, z: f64) -> f32 { + self.trace.lock().unwrap().push(format!( + "noise {} {:x} {:x} {:x}", + self.name, + x.to_bits(), + y.to_bits(), + z.to_bits() + )); + self.constant.unwrap_or_else(|| self.real.get3(x, y, z)) + } +} +struct Column { + min: i32, + values: Vec<BlockStateId>, + remaining: i32, + trace: Arc<Mutex<Vec<String>>>, +} +impl Column { + fn index(&self, y: i32) -> Option<usize> { + let i = i64::from(y) - i64::from(self.min); + (i >= 0 && i < self.values.len() as i64).then_some(i as usize) + } +} +impl MaterialColumn for Column { + type Error = io::Error; + fn block(&mut self, y: i32) -> io::Result<BlockStateId> { + if self.remaining == 0 { + self.trace.lock().unwrap().push(format!("read error {y}")); + return Err(io::Error::other("fixture read limit")); + } + self.remaining -= 1; + let id = self + .index(y) + .map(|i| self.values[i]) + .unwrap_or(BlockStateId(2)); + self.trace + .lock() + .unwrap() + .push(format!("read {y} {}", id.0)); + Ok(id) + } + fn set_block(&mut self, y: i32, state: BlockStateId) -> io::Result<()> { + self.trace + .lock() + .unwrap() + .push(format!("write {y} {}", state.0)); + if let Some(i) = self.index(y) { + self.values[i] = state; + } + Ok(()) + } + fn is_air(&self, state: BlockStateId) -> bool { + state.0 <= 2 + } + fn same_block(&self, a: BlockStateId, b: BlockStateId) -> bool { + let kind = |id: BlockStateId| match id.0 { + 5 => 4, + 9 => 8, + other => other, + }; + kind(a) == kind(b) + } +} +fn fixture<R: RandomSource>( + f: &Value, + noises: &BTreeMap<String, String>, + biomes: &BTreeMap<String, String>, + mut random: R, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> +where + R::Positional: Clone, +{ + let root = random.fork_positional(); + let trace = Arc::new(Mutex::new(Vec::new())); + let mut sources = Vec::<Arc<dyn Noise>>::new(); + for (i, name) in NAMES.iter().enumerate() { + let id = format!("minecraft:{name}"); + sources.push(Arc::new(TracedNoise { + name, + real: Arc::new(decode_noise(&noises[&id])?.create(&mut root.from_hash_of(&id))?), + constant: f + .get("noise_bits") + .map(|v| f32::from_bits(u32::from_str_radix(v[i].as_str().unwrap(), 16).unwrap())), + trace: trace.clone(), + })); + } + let system = MaterialExtensions::new( + root, + ExtensionBlocks { + default: BlockStateId(f["default"].as_u64().unwrap() as u32), + water: BlockStateId(4), + packed_ice: BlockStateId(7), + snow: BlockStateId(6), + }, + ExtensionNoises { + badlands_surface: sources[0].clone(), + badlands_pillar: sources[1].clone(), + badlands_roof: sources[2].clone(), + iceberg_surface: sources[3].clone(), + iceberg_pillar: sources[4].clone(), + iceberg_roof: sources[5].clone(), + }, + f["sea"].as_i64().unwrap() as i32, + ); + let mut biome = BiomeTemperature::new(BiomeTemperatureSettings::from_json( + &biomes[f["biome"].as_str().unwrap()], + )?); + let mut column = Column { + min: f["min"].as_i64().unwrap() as i32, + values: f["initial"] + .as_array() + .unwrap() + .iter() + .map(|v| BlockStateId(v.as_u64().unwrap() as u32)) + .collect(), + remaining: 0, + trace: trace.clone(), + }; + for op in f["ops"].as_array().unwrap() { + column.remaining = f["limit"].as_i64().unwrap() as i32; + let x = op[1].as_i64().unwrap() as i32; + let z = op[2].as_i64().unwrap() as i32; + let surface = op[3].as_i64().unwrap() as i32; + let minimum = op[4].as_i64().unwrap() as i32; + let result = match op[0].as_str().unwrap() { + "badlands" => system.eroded_badlands(&mut column, x, z, surface, minimum), + "frozen" => system.frozen_ocean(&mut column, &mut biome, [x, z], surface, minimum), + _ => panic!("unknown extension"), + }; + for event in trace.lock().unwrap().drain(..) { + writeln!(out, "{event}")?; + } + writeln!( + out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + write!(out, "column")?; + for id in &column.values { + write!(out, " {}", id.0)?; + } + writeln!(out)?; + } + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let noises = serde_json::from_str(&fs::read_to_string(dir.join("noises.json"))?)?; + let biomes = serde_json::from_str(&fs::read_to_string(dir.join("biomes.json"))?)?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture(&f, &noises, &biomes, LegacyRandom::new(seed), &mut out)?; + } else { + fixture(&f, &noises, &biomes, XoroshiroRandom::new(seed), &mut out)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/material_stage_fixture.rs b/crates/horizon-world/examples/material_stage_fixture.rs new file mode 100644 index 000000000..6682b04b7 --- /dev/null +++ b/crates/horizon-world/examples/material_stage_fixture.rs @@ -0,0 +1,838 @@ +//! Original transport for complete surface-stage chunk comparison. +use horizon_core::{ + biome::{BiomeZoom, obfuscate_seed}, + carving::CarvingMask, + density::{ConstantSampler, SamplerContext}, + noise::{DensityVolume, Noise}, + position::{BlockPos, ChunkPos}, + random::{LegacyRandom, PositionalRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::{ + DATA_VERSION, + heightmap::{HeightmapState, HeightmapType}, + nbt::Tag, + registry::{BlockRegistry, BlockStateId, BlockStateJsonCodec}, + worldgen::{ + DecodeError, + anchor::WorldGenerationContext, + aquifer::{ + AquiferConfig, AquiferError, DisabledAquifer, GlobalFluidPicker, NoiseBasedAquifer, + RegistryAquiferBlockStates, + }, + biome_chunk::BiomeChunk, + biome_source::{BiomeSourceCatalog, BiomeSourceResolver}, + biome_temperature::{BiomeTemperature, BiomeTemperatureSettings}, + carver::{CarverCatalog, WorldCarver, generate_carving_mask}, + carving::{CarvingBlocks, apply_carving_mask}, + decode_noise, + density::DensityRegistry, + material_condition::{ + MaterialConditionRegistry, MaterialNoiseSources, MaterialRuleError, + MaterialRuleLibrary, MaterialSurfaceQueries, + }, + material_extensions::{ExtensionBlocks, ExtensionNoises, MaterialExtensions}, + material_stage::{SurfaceInputs, TopMaterialInputs, build_surface, top_material}, + material_surface::{ClayBandBlocks, MaterialSurface}, + router::{NoiseRouter, RouterField}, + tags::TagDefinitions, + terrain::{TerrainAquifer, TerrainBlockStates, TerrainChunk, fill_noise}, + }, +}; +use serde_json::Value; +use std::{ + collections::{BTreeMap, BTreeSet}, + fs, + io::{self, Write}, + path::Path, + sync::{Arc, Mutex}, +}; +#[derive(Clone, Copy)] +struct State { + air: bool, + air_block: bool, + fluid: bool, + motion: bool, + no_leaves: bool, +} +impl HeightmapState for State { + fn is_air(self) -> bool { + self.air + } + fn is_air_block(self) -> bool { + self.air_block + } + fn has_fluid(self) -> bool { + self.fluid + } + fn blocks_motion_in_heightmap(self) -> bool { + self.motion + } + fn blocks_motion_in_heightmap_no_leaves(self) -> bool { + self.no_leaves + } +} +struct Properties<'a>(&'a [State]); +impl TerrainBlockStates for Properties<'_> { + type State = State; + fn heightmap_state(&self, id: BlockStateId) -> State { + self.0[id.0 as usize] + } +} +fn tag(v: &Value) -> Tag { + match v { + Value::String(s) => Tag::String(s.as_str().into()), + Value::Number(n) => Tag::Int(n.as_i64().unwrap() as i32), + Value::Array(a) => Tag::List(a.iter().map(tag).collect()), + Value::Object(o) => { + Tag::Compound(o.iter().map(|(k, v)| (k.as_str().into(), tag(v))).collect()) + } + _ => panic!("invalid registry metadata"), + } +} +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +type BiomeNeighborhood = BTreeMap<(i32, i32), BiomeChunk<Arc<str>>>; +type Temperatures = Arc<Mutex<BTreeMap<String, BiomeTemperature>>>; +struct Surface<P: PositionalRandom> { + noises: MaterialNoiseSources<P, MaterialSurface<P>>, + choices: Vec<Arc<str>>, + zoom: Option<BiomeZoom>, + neighborhood: Option<BiomeNeighborhood>, + possible: Option<BTreeSet<String>>, + temperatures: Temperatures, + trace: Arc<Mutex<Vec<String>>>, +} +impl<P: PositionalRandom> MaterialSurfaceQueries for Surface<P> { + fn surface_depth(&mut self, x: i32, z: i32) -> i32 { + self.noises.surface_depth(x, z) + } + fn surface_secondary(&mut self, x: i32, z: i32) -> f64 { + self.noises.surface_secondary(x, z) + } + fn band(&mut self, p: BlockPos) -> Result<BlockStateId, MaterialRuleError> { + self.noises.band(p) + } + fn bind_noise(&mut self, name: &str) -> Result<Arc<dyn Noise>, DecodeError> { + self.noises.bind_noise(name) + } + fn possible_biomes(&self) -> Option<BTreeSet<String>> { + self.possible.clone() + } + fn biome(&mut self, p: BlockPos) -> Result<Option<Arc<str>>, MaterialRuleError> { + let [x, y, z] = self + .zoom + .map_or([p.x, p.y, p.z], |zoom| zoom.quart_at_block(p)); + let hash = x + .wrapping_mul(31) + .wrapping_add(y.wrapping_mul(7)) + .wrapping_add(z.wrapping_mul(17)); + let name = if let Some(chunks) = &self.neighborhood { + chunks + .get(&(x >> 2, z >> 2)) + .ok_or(MaterialRuleError::MissingBiome)? + .noise_biome([x, y, z]) + .clone() + } else { + self.choices[hash.rem_euclid(self.choices.len() as i32) as usize].clone() + }; + if self.zoom.is_some() { + self.trace + .lock() + .unwrap() + .push(format!("quart {x} {y} {z} {name}")); + } + self.trace + .lock() + .unwrap() + .push(format!("biome {} {} {} {name}", p.x, p.y, p.z)); + Ok(Some(name)) + } + fn cold_enough_to_snow( + &mut self, + name: &str, + p: BlockPos, + sea: i32, + ) -> Result<bool, MaterialRuleError> { + Ok(self + .temperatures + .lock() + .unwrap() + .get_mut(name) + .unwrap() + .cold_enough_to_snow(p, sea)) + } + fn melts_frozen_ocean( + &mut self, + name: &str, + p: BlockPos, + sea: i32, + ) -> Result<bool, MaterialRuleError> { + Ok(self + .temperatures + .lock() + .unwrap() + .get_mut(name) + .unwrap() + .should_melt_frozen_ocean_iceberg_slightly(p, sea)) + } +} +struct Data { + registry: BlockRegistry, + integers: BTreeSet<(String, String)>, + properties: Vec<State>, + carving_blocks: CarvingBlocks, + biome_carvers: BTreeMap<String, Vec<Arc<WorldCarver>>>, + conditions: MaterialConditionRegistry, + noises: BTreeMap<String, String>, + densities: BTreeMap<String, String>, + rules: BTreeMap<String, String>, + presets: BTreeMap<String, String>, + source_catalog: BiomeSourceCatalog, + temperatures: Temperatures, +} +fn biome_neighborhood( + f: &Value, + resolver: Option<&mut BiomeSourceResolver<'_>>, + out: &mut impl Write, +) -> Result<Option<BiomeNeighborhood>, Box<dyn std::error::Error>> { + let Some(resolver) = resolver else { + return Ok(None); + }; + let (cx, cz, min, height) = (n(&f["cx"]), n(&f["cz"]), n(&f["min"]), n(&f["height"])); + let mut chunks = BTreeMap::new(); + for dx in -1..=1 { + for dz in -1..=1 { + let (x, z) = (cx.wrapping_add(dx), cz.wrapping_add(dz)); + let mut chunk = BiomeChunk::new( + ChunkPos::new(x, z), + min, + height, + Arc::<str>::from("minecraft:plains"), + )?; + let mut context = SamplerContext::cached(); + let volume = resolver.prepare_volume( + &mut context, + [x.wrapping_shl(4) >> 2, min >> 2, z.wrapping_shl(4) >> 2], + [4, height >> 2, 4], + )?; + chunk.fill(min, min + height - 1, |quart| { + resolver + .sample_prepared(&mut context, volume.as_ref(), quart) + .map(Arc::from) + })?; + writeln!(out, "biomechunk {x} {z}")?; + for section in 0..height as usize / 16 { + for name in chunk.section(section).unwrap() { + writeln!(out, "stored {name}")?; + } + } + chunks.insert((x, z), chunk); + } + } + Ok(Some(chunks)) +} +fn fixture<R: RandomSource>( + f: &Value, + data: &Data, + mut random: R, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> +where + R::Positional: Clone, +{ + let root = random.fork_positional(); + let seed = f["seed"].as_i64().unwrap(); + let legacy = f["legacy"].as_bool().unwrap(); + let codec = BlockStateJsonCodec::new(&data.registry, data.integers.clone())?; + let mut densities = DensityRegistry::from_json(&data.noises, &data.densities)?; + let router = f + .get("router") + .map(|value| NoiseRouter::from_json(&value.to_string(), &mut densities)) + .transpose()?; + let aquifers = f + .get("aquifers") + .filter(|value| !value.is_null()) + .map(|value| AquiferConfig::from_json(&value.to_string(), &mut densities)) + .transpose()?; + let mut library = MaterialRuleLibrary::from_json( + &data.rules, + &data.conditions, + &codec, + densities, + seed, + legacy, + )?; + let router = router + .map(|value| library.compile_router(value)) + .transpose()?; + let aquifers = aquifers + .map(|value| library.compile_aquifer(value)) + .transpose()?; + let rule = library.rule(f["rule"].as_str().unwrap())?; + let preliminary = if let Some(ref router) = router { + router.get(RouterField::ChunkSurfaceLevel).clone() + } else if let Some(name) = f["preliminary"].as_str() { + library.named_density(name)? + } else { + Arc::new(ConstantSampler(f["preliminary"].as_f64().unwrap() as f32)) + }; + let source = f + .get("biome_source_json") + .map(|json| { + data.source_catalog + .decode(&json.to_string())? + .resolve(&data.presets) + }) + .transpose()?; + let climate = router.as_ref().map(|r| r.climate_sampler()); + let mut biome_resolver = source.as_ref().map(|source| { + source.resolver( + climate.as_ref().unwrap(), + router.as_ref().unwrap().get(RouterField::Erosion).as_ref(), + ) + }); + let neighborhood = biome_neighborhood(f, biome_resolver.as_mut(), out)?; + let sampler = |name: &str| -> Result<Arc<dyn Noise>, DecodeError> { + let id = format!("minecraft:{name}"); + Ok(Arc::new( + decode_noise(&data.noises[&id])?.create(&mut root.from_hash_of(&id))?, + )) + }; + let surface = MaterialSurface::new( + root.clone(), + ClayBandBlocks::from_registry(&data.registry).unwrap(), + sampler("clay_bands_offset")?, + sampler("surface")?, + sampler("surface_secondary")?, + ); + let trace = Arc::new(Mutex::new(Vec::new())); + let mut surface = Surface { + noises: MaterialNoiseSources::from_json(root.clone(), surface, &data.noises)?, + neighborhood, + zoom: f["biome_zoom"] + .as_bool() + .unwrap_or(false) + .then(|| BiomeZoom::new(obfuscate_seed(seed))), + choices: f["biome_choices"] + .as_array() + .unwrap() + .iter() + .map(|v| Arc::from(v.as_str().unwrap())) + .collect(), + possible: f["possible"] + .as_array() + .map(|v| v.iter().map(|v| v.as_str().unwrap().to_owned()).collect()), + temperatures: data.temperatures.clone(), + trace: trace.clone(), + }; + let extensions = MaterialExtensions::new( + root.clone(), + ExtensionBlocks { + default: BlockStateId(f["default"].as_u64().unwrap() as u32), + water: data.registry.default_state("minecraft:water").unwrap(), + packed_ice: data.registry.default_state("minecraft:packed_ice").unwrap(), + snow: data.registry.default_state("minecraft:snow_block").unwrap(), + }, + ExtensionNoises { + badlands_surface: sampler("badlands_surface")?, + badlands_pillar: sampler("badlands_pillar")?, + badlands_roof: sampler("badlands_pillar_roof")?, + iceberg_surface: sampler("iceberg_surface")?, + iceberg_pillar: sampler("iceberg_pillar")?, + iceberg_roof: sampler("iceberg_pillar_roof")?, + }, + n(&f["sea"]), + ); + let (cx, cz, min, height) = (n(&f["cx"]), n(&f["cz"]), n(&f["min"]), n(&f["height"])); + let mut chunk = TerrainChunk::new( + ChunkPos::new(cx, cz), + min, + height, + &data.registry, + Properties(&data.properties), + )?; + for span in f["initial"].as_array().unwrap() { + for y in n(&span[1])..=n(&span[3]) { + chunk.set_block_raw( + n(&span[0]), + y, + n(&span[2]), + BlockStateId(span[4].as_u64().unwrap() as u32), + )?; + } + } + if f["prime"].as_bool().unwrap() { + chunk.prime_heightmaps(&[HeightmapType::WorldSurfaceWg, HeightmapType::OceanFloorWg])?; + } + let mut context = SamplerContext::cached(); + let volume = DensityVolume::new( + [16, n(&f["noise_height"]), 16], + [cx.wrapping_shl(4), n(&f["noise_min"]), cz.wrapping_shl(4)], + [1; 3], + )?; + let air = data.registry.default_state("minecraft:air").unwrap(); + let picker = GlobalFluidPicker::new( + n(&f["sea"]), + f.get("fluid").map_or_else( + || data.registry.default_state("minecraft:water").unwrap(), + |v| BlockStateId(v.as_u64().unwrap() as u32), + ), + data.registry.default_state("minecraft:lava").unwrap(), + air, + ); + let mut aquifer: Box<dyn TerrainAquifer> = if let Some(samplers) = aquifers { + Box::new(NoiseBasedAquifer::new( + samplers, + picker, + root.from_hash_of("minecraft:aquifer").fork_positional(), + RegistryAquiferBlockStates::new(&data.registry)?, + volume, + &mut context, + )?) + } else { + Box::new(DisabledAquifer::new(picker, air)) + }; + if let Some(ref router) = router { + fill_noise( + &mut chunk, + volume, + router.get(RouterField::FinalDensity).as_ref(), + &mut context, + aquifer.as_mut(), + BlockStateId(f["default"].as_u64().unwrap() as u32), + )?; + writeln!(out, "terrain {}", aquifer.should_schedule_fluid_update())?; + dump(&mut chunk, height, out)?; + } + for repeat in 0..n(&f["repeats"]) { + let inputs = SurfaceInputs::<R, _> { + generation: WorldGenerationContext::new(min, height, n(&f["sea"])), + noise_volume: volume, + root: root.clone(), + surface: &mut surface, + preliminary_surface: preliminary.clone(), + density_context: &mut context, + write_min_y: n(&f["write_min"]), + write_max_y: n(&f["write_max"]), + }; + let result = build_surface(&mut chunk, rule.clone(), inputs, &extensions); + for event in trace.lock().unwrap().drain(..) { + writeln!(out, "{event}")?; + } + writeln!( + out, + "surface {repeat} {}", + if result.is_ok() { "ok" } else { "error" } + )?; + if let Err(error) = result { + eprintln!("surface failure: {error}"); + } + dump(&mut chunk, height, out)?; + } + for query in f["top_queries"].as_array().unwrap() { + let position = BlockPos::new(n(&query[0]), n(&query[1]), n(&query[2])); + let result = top_material( + &mut chunk, + rule.clone(), + TopMaterialInputs::<R, _> { + generation: WorldGenerationContext::new(min, height, n(&f["sea"])), + root: root.clone(), + surface: &mut surface, + preliminary_surface: preliminary.clone(), + density_context: &mut context, + }, + position, + query[3].as_bool().unwrap(), + ); + for event in trace.lock().unwrap().drain(..) { + writeln!(out, "{event}")?; + } + match result { + Ok(Some(state)) => writeln!(out, "top {}", state.0)?, + Ok(None) => writeln!(out, "top none")?, + Err(error) => { + writeln!(out, "top error")?; + eprintln!("top failure: {error}"); + } + } + } + if let Some(resolver) = biome_resolver.as_mut() { + let mut biome_context = SamplerContext::default(); + let generation = WorldGenerationContext::new(min, height, n(&f["sea"])); + let generated = + generate_carving_mask(seed, ChunkPos::new(cx, cz), generation, false, |origin| { + let quart = [ + origin.x.wrapping_shl(4) >> 2, + 0, + origin.z.wrapping_shl(4) >> 2, + ]; + let name = raw_biome(resolver, &mut biome_context, quart, &trace)?; + data.biome_carvers + .get(name.as_ref()) + .map(Vec::as_slice) + .ok_or(MaterialRuleError::MissingBiome) + })?; + let mut traced = TracedAquifer { + inner: aquifer.as_mut(), + trace: trace.clone(), + }; + let result = if generated.is_empty() { + Ok(()) + } else { + apply_carving_mask( + &mut chunk, + &generated, + rule.clone(), + TopMaterialInputs::<R, _> { + generation, + root: root.clone(), + surface: CarverSurface { + surface: &mut surface, + resolver, + context: &mut biome_context, + zoom: BiomeZoom::new(obfuscate_seed(seed)), + trace: trace.clone(), + }, + preliminary_surface: preliminary.clone(), + density_context: &mut context, + }, + &mut traced, + &data.carving_blocks, + |_| true, + ) + }; + for event in trace.lock().unwrap().drain(..) { + writeln!(out, "{event}")?; + } + writeln!( + out, + "generatedcarving {}", + if result.is_ok() { "ok" } else { "error" } + )?; + if let Err(error) = result { + eprintln!("generated carving failure: {error}"); + } + dump(&mut chunk, height, out)?; + } + let carving = &f["carving"]; + for q in carving["initial"].as_array().unwrap() { + chunk.set_block_worldgen( + n(&q[0]), + n(&q[1]), + n(&q[2]), + BlockStateId(q[3].as_u64().unwrap() as u32), + )?; + } + let mut mask = CarvingMask::new(min + 1, min + height - 8)?; + for q in carving["spans"].as_array().unwrap() { + for y in n(&q[2])..=n(&q[3]) { + mask.carve(n(&q[0]), y, n(&q[1]))?; + } + } + let mut traced = TracedAquifer { + inner: aquifer.as_mut(), + trace: trace.clone(), + }; + for mode in carving["filters"].as_array().unwrap() { + let mode = n(mode); + let result = apply_carving_mask( + &mut chunk, + &mask, + rule.clone(), + TopMaterialInputs::<R, _> { + generation: WorldGenerationContext::new(min, height, n(&f["sea"])), + root: root.clone(), + surface: &mut surface, + preliminary_surface: preliminary.clone(), + density_context: &mut context, + }, + &mut traced, + &data.carving_blocks, + |[x, y, z]| { + if mode == 0 { + return true; + } + let keep = mode == 1 + && x.wrapping_mul(31) + .wrapping_add(y.wrapping_mul(7)) + .wrapping_add(z.wrapping_mul(17)) + .rem_euclid(5) + != 0; + trace + .lock() + .unwrap() + .push(format!("filter {x} {y} {z} {keep}")); + keep + }, + ); + for event in trace.lock().unwrap().drain(..) { + writeln!(out, "{event}")?; + } + writeln!( + out, + "carving {mode} {}", + if result.is_ok() { "ok" } else { "error" } + )?; + if let Err(error) = result { + eprintln!("carving failure: {error}"); + } + dump(&mut chunk, height, out)?; + } + Ok(()) +} +fn raw_biome( + resolver: &mut BiomeSourceResolver<'_>, + context: &mut SamplerContext, + [x, y, z]: [i32; 3], + trace: &Arc<Mutex<Vec<String>>>, +) -> Result<Arc<str>, MaterialRuleError> { + let name = resolver + .sample(context, [x, y, z]) + .map_err(|_| MaterialRuleError::BiomeQueryFailed)?; + trace + .lock() + .unwrap() + .push(format!("rawquart {x} {y} {z} {name}")); + Ok(Arc::from(name)) +} +struct CarverSurface<'a, 'b, P: PositionalRandom> { + surface: &'a mut Surface<P>, + resolver: &'a mut BiomeSourceResolver<'b>, + context: &'a mut SamplerContext, + zoom: BiomeZoom, + trace: Arc<Mutex<Vec<String>>>, +} +impl<P: PositionalRandom> MaterialSurfaceQueries for CarverSurface<'_, '_, P> { + fn surface_depth(&mut self, x: i32, z: i32) -> i32 { + self.surface.surface_depth(x, z) + } + fn surface_secondary(&mut self, x: i32, z: i32) -> f64 { + self.surface.surface_secondary(x, z) + } + fn band(&mut self, p: BlockPos) -> Result<BlockStateId, MaterialRuleError> { + self.surface.band(p) + } + fn bind_noise(&mut self, name: &str) -> Result<Arc<dyn Noise>, DecodeError> { + self.surface.bind_noise(name) + } + fn biome(&mut self, p: BlockPos) -> Result<Option<Arc<str>>, MaterialRuleError> { + raw_biome( + self.resolver, + self.context, + self.zoom.quart_at_block(p), + &self.trace, + ) + .map(Some) + } + fn cold_enough_to_snow( + &mut self, + name: &str, + p: BlockPos, + sea: i32, + ) -> Result<bool, MaterialRuleError> { + self.surface.cold_enough_to_snow(name, p, sea) + } + fn melts_frozen_ocean( + &mut self, + name: &str, + p: BlockPos, + sea: i32, + ) -> Result<bool, MaterialRuleError> { + self.surface.melts_frozen_ocean(name, p, sea) + } +} +struct TracedAquifer<'a> { + inner: &'a mut dyn TerrainAquifer, + trace: Arc<Mutex<Vec<String>>>, +} +impl TerrainAquifer for TracedAquifer<'_> { + fn compute_substance( + &mut self, + context: &mut SamplerContext, + [x, y, z]: [i32; 3], + density: f64, + ) -> Result<Option<BlockStateId>, AquiferError> { + self.trace + .lock() + .unwrap() + .push(format!("aquifer {x} {y} {z} {:x}", density.to_bits())); + let result = self.inner.compute_substance(context, [x, y, z], density)?; + self.trace.lock().unwrap().push(format!( + "substance {}", + result.map_or_else(|| "none".to_owned(), |v| v.0.to_string()) + )); + Ok(result) + } + fn should_schedule_fluid_update(&self) -> bool { + let result = self.inner.should_schedule_fluid_update(); + self.trace + .lock() + .unwrap() + .push(format!("fluid_schedule {result}")); + result + } +} +fn dump<B: TerrainBlockStates>( + chunk: &mut TerrainChunk<'_, B>, + height: i32, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + for section in 0..height as usize / 16 { + writeln!(out, "section {section}")?; + let data = chunk.section(section).unwrap(); + for y in 0..16 { + for z in 0..16 { + write!(out, "blocks")?; + for x in 0..16 { + write!(out, " {}", data.get((y << 8) | (z << 4) | x)?.0)?; + } + writeln!(out)?; + } + } + } + for kind in [HeightmapType::WorldSurfaceWg, HeightmapType::OceanFloorWg] { + writeln!(out, "heightmap {}", kind.name())?; + for word in chunk.ensure_heightmap(kind).raw_data() { + writeln!(out, "{word:x}")?; + } + } + for (section, offsets) in chunk.postprocessing().iter().enumerate() { + writeln!(out, "post {section} {}", offsets.len())?; + for offset in offsets { + writeln!(out, "{offset}")?; + } + } + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let read = |name: &str| -> Result<BTreeMap<String, String>, Box<dyn std::error::Error>> { + Ok(serde_json::from_str(&fs::read_to_string( + dir.join(format!("{name}.json")), + )?)?) + }; + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ( + "states", + Tag::List( + facts["states"] + .as_array() + .unwrap() + .iter() + .map(|v| tag(&v[4])) + .collect(), + ), + ), + ("defaults", tag(&facts["defaults"])), + ]))?; + let biomes = read("biomes")?; + let mut temperatures = BTreeMap::new(); + for (name, raw) in &biomes { + temperatures.insert( + name.clone(), + BiomeTemperature::new(BiomeTemperatureSettings::from_json(raw)?), + ); + } + let mut biome_tags = TagDefinitions::default(); + for (name, raw) in read("biome_tags")? { + biome_tags.apply_json(&name, "vanilla", &raw)?; + } + let biome_tags = biome_tags.build(|id, _| biomes.contains_key(id).then(|| id.to_owned()))?; + assert!(biome_tags.missing.is_empty()); + let conditions = MaterialConditionRegistry::from_json_with_biome_tags( + &read("conditions")?, + &biomes.keys().cloned().collect(), + &biome_tags.tags, + )?; + let mut block_tags = TagDefinitions::default(); + for (name, raw) in read("block_tags")? { + block_tags.apply_json(&name, "vanilla", &raw)?; + } + let block_tags = block_tags.build(|id, _| facts["defaults"].get(id).map(|_| id.to_owned()))?; + assert!(block_tags.missing.is_empty()); + let motion: BTreeSet<_> = block_tags.tags["minecraft:blocks_motion_in_heightmap"] + .iter() + .map(String::as_str) + .collect(); + let no_leaves: BTreeSet<_> = block_tags.tags["minecraft:blocks_motion_in_heightmap_no_leaves"] + .iter() + .map(String::as_str) + .collect(); + let properties = facts["states"] + .as_array() + .unwrap() + .iter() + .map(|v| { + let name = v[0].as_str().unwrap(); + State { + air: v[1].as_bool().unwrap(), + air_block: name == "minecraft:air", + fluid: v[2].as_bool().unwrap(), + motion: motion.contains(name), + no_leaves: no_leaves.contains(name), + } + }) + .collect(); + let integers = facts["integers"] + .as_array() + .unwrap() + .iter() + .map(|v| { + ( + v[0].as_str().unwrap().to_owned(), + v[1].as_str().unwrap().to_owned(), + ) + }) + .collect(); + let presets = read("presets")?; + let source_catalog = BiomeSourceCatalog::new( + &biomes.keys().cloned().collect(), + &biome_tags.tags, + &presets.keys().cloned().collect(), + )?; + let carving_blocks = CarvingBlocks::from_registry( + ®istry, + &block_tags.tags["minecraft:uncarvable"] + .iter() + .cloned() + .collect(), + )?; + let carvers = CarverCatalog::from_json(&read("carvers")?)?; + let mut biome_carvers = BTreeMap::new(); + for (name, json) in &biomes { + let value: Value = serde_json::from_str(json)?; + biome_carvers.insert( + name.clone(), + carvers.decode_set(&value["carvers"].to_string())?, + ); + } + let data = Data { + biome_carvers, + carving_blocks, + registry, + integers, + properties, + conditions, + noises: read("noises")?, + densities: read("densities")?, + rules: read("rules")?, + presets, + source_catalog, + temperatures: Arc::new(Mutex::new(temperatures)), + }; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture(&f, &data, LegacyRandom::new(seed), &mut out)?; + } else { + fixture(&f, &data, XoroshiroRandom::new(seed), &mut out)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/material_surface_fixture.rs b/crates/horizon-world/examples/material_surface_fixture.rs new file mode 100644 index 000000000..c7cb93bbd --- /dev/null +++ b/crates/horizon-world/examples/material_surface_fixture.rs @@ -0,0 +1,137 @@ +//! Original comparison transport for terracotta bands and surface queries. +use horizon_core::{ + noise::{NanRange, Noise}, + random::{LegacyRandom, PositionalRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::{ + registry::BlockStateId, + worldgen::{ + decode_noise, + material_surface::{ClayBandBlocks, ClayBands, MaterialSurface}, + }, +}; +use serde_json::Value; +use std::{ + collections::BTreeMap, + fs, + io::{self, Write}, + path::Path, + sync::Arc, +}; +#[derive(Debug)] +struct ConstantNoise(f32); +impl Noise for ConstantNoise { + fn range(&self) -> Result<[f32; 2], NanRange> { + Ok([f32::NEG_INFINITY, f32::INFINITY]) + } + fn get2(&self, _: f64, _: f64) -> f32 { + panic!("unexpected 2d noise query") + } + fn get3(&self, _: f64, y: f64, _: f64) -> f32 { + assert_eq!(y, 0.); + self.0 + } +} +fn blocks() -> ClayBandBlocks { + ClayBandBlocks { + terracotta: BlockStateId(0), + orange: BlockStateId(1), + yellow: BlockStateId(2), + brown: BlockStateId(3), + red: BlockStateId(4), + white: BlockStateId(5), + light_gray: BlockStateId(6), + } +} +fn fixture<R: RandomSource>( + f: &Value, + mut direct: R, + root: R::Positional, + noises: &BTreeMap<String, String>, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + if f["child"].as_bool().unwrap() { + direct = direct + .fork_positional() + .from_hash_of("minecraft:clay_bands"); + } + direct.consume_count(f["consume"].as_i64().unwrap() as i32); + let bands = ClayBands::generate(&mut direct, blocks()); + writeln!(out, "bands {}", bands.states().len())?; + for state in bands.states() { + writeln!(out, "{}", state.0)?; + } + writeln!(out, "next {} {}", direct.next_long(), direct.next_int())?; + let mut samplers: Vec<Arc<dyn Noise>> = Vec::new(); + for (i, name) in ["clay_bands_offset", "surface", "surface_secondary"] + .iter() + .enumerate() + { + let sampler: Arc<dyn Noise> = if let Some(bits) = f["overrides"][i].as_str() { + Arc::new(ConstantNoise(f32::from_bits(u32::from_str_radix( + bits, 16, + )?))) + } else { + let id = format!("minecraft:{name}"); + Arc::new(decode_noise(&noises[&id])?.create(&mut root.from_hash_of(&id))?) + }; + samplers.push(sampler); + } + let surface = MaterialSurface::new( + root, + blocks(), + samplers[0].clone(), + samplers[1].clone(), + samplers[2].clone(), + ); + writeln!(out, "system bands")?; + for state in surface.bands().states() { + writeln!(out, "{}", state.0)?; + } + for p in f["points"].as_array().unwrap() { + let [x, y, z] = std::array::from_fn(|i| p[i].as_i64().unwrap() as i32); + match surface.band([x, y, z]) { + Some(state) => writeln!(out, "band {}", state.0)?, + None => writeln!(out, "band error")?, + } + writeln!(out, "depth {}", surface.surface_depth(x, z))?; + let value = surface.surface_secondary(x, z); + let bits = if value.is_nan() { + 0x7ff8000000000000 + } else { + value.to_bits() + }; + writeln!(out, "secondary {bits:x}")?; + } + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private directory"); + let dir = Path::new(&arg); + let noises: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("noises.json"))?)?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture( + &f, + LegacyRandom::new(seed), + LegacyRandom::new(seed).fork_positional(), + &noises, + &mut out, + )?; + } else { + fixture( + &f, + XoroshiroRandom::new(seed), + XoroshiroRandom::new(seed).fork_positional(), + &noises, + &mut out, + )?; + } + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-world/examples/movement_emission_fixture.rs b/crates/horizon-world/examples/movement_emission_fixture.rs new file mode 100644 index 000000000..36439e118 --- /dev/null +++ b/crates/horizon-world/examples/movement_emission_fixture.rs @@ -0,0 +1,222 @@ +use horizon_core::{geometry::Vec3, position::BlockPos}; +use horizon_world::movement_emission::*; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vector(v: &Value) -> Vec3 { + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])) +} +fn position(v: &Value) -> BlockPos { + BlockPos::new( + v[0].as_i64().unwrap() as i32, + v[1].as_i64().unwrap() as i32, + v[2].as_i64().unwrap() as i32, + ) +} +fn pos(p: BlockPos) -> String { + format!("{} {} {}", p.x, p.y, p.z) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn fbits(v: f32) -> u32 { + if v.is_nan() { 0x7fc00000 } else { v.to_bits() } +} +fn emission(v: &Value) -> MovementEmission { + [ + MovementEmission::None, + MovementEmission::Sounds, + MovementEmission::Events, + MovementEmission::All, + ][v.as_u64().unwrap() as usize] +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + distances: MovementDistances, +} +impl World<'_> { + fn flag(&self, n: &str) -> bool { + self.f[n].as_bool().unwrap() + } + fn query(&mut self, s: String) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let call = self.calls; + self.calls += 1; + if call == self.f["fail"].as_i64().unwrap() { + Err(io::Error::other("injected emission failure")) + } else { + Ok(()) + } + } + fn mutate(&mut self) { + if self.flag("mutate") { + self.distances = MovementDistances { + movement: single(&self.f["mutated_move"]), + flight: single(&self.f["mutated_fly"]), + next_step: single(&self.f["mutated_next"]), + }; + } + } + fn predicate(&mut self, n: &str, key: &str, s: usize) -> io::Result<bool> { + self.query(format!("{n} {s}"))?; + Ok(self.f["states"][s][key].as_bool().unwrap()) + } + fn boolean(&mut self, n: &str) -> io::Result<bool> { + self.query(n.into())?; + Ok(self.flag(n)) + } +} +impl MovementEmissionWorld for World<'_> { + type Error = io::Error; + type State = usize; + fn distances(&self) -> MovementDistances { + self.distances + } + fn set_movement_distance(&mut self, v: f32) { + self.distances.movement = v; + } + fn set_flight_distance(&mut self, v: f32) { + self.distances.flight = v; + } + fn set_next_step(&mut self, v: f32) { + self.distances.next_step = v; + } + fn on_position(&mut self) -> io::Result<BlockPos> { + self.query("on-pos".into())?; + Ok(position(&self.f["on_pos"])) + } + fn block_state(&mut self, p: BlockPos) -> io::Result<usize> { + self.query(format!("state {}", pos(p)))?; + Ok(1) + } + fn is_air(&mut self, s: usize) -> io::Result<bool> { + self.predicate("air", "air", s) + } + fn climbable_tag(&mut self, s: usize) -> io::Result<bool> { + self.predicate("climbable", "climbable", s) + } + fn is_powder_snow(&mut self, s: usize) -> io::Result<bool> { + self.predicate("powder", "powder", s) + } + fn on_ground(&mut self) -> io::Result<bool> { + self.boolean("ground") + } + fn crouching(&mut self) -> io::Result<bool> { + self.boolean("crouch") + } + fn on_rails(&mut self) -> io::Result<bool> { + self.boolean("rails") + } + fn swimming(&mut self) -> io::Result<bool> { + self.boolean("swimming") + } + fn in_water(&mut self) -> io::Result<bool> { + self.boolean("water") + } + fn walking_step_sound(&mut self, p: BlockPos, s: usize) -> io::Result<()> { + self.query(format!("walking {} {s}", pos(p)))?; + self.mutate(); + self.query(format!("crystal {s}")) + } + fn step_event(&mut self, s: usize) -> io::Result<()> { + let p = vector(&self.f["position"]); + self.query(format!( + "step {s} {:016x} {:016x} {:016x}", + bits(p.x), + bits(p.y), + bits(p.z) + ))?; + self.mutate(); + Ok(()) + } + fn next_step(&mut self) -> io::Result<f32> { + self.query("next-step".into())?; + Ok(self.distances.next_step()) + } + fn water_swim_sound(&mut self) -> io::Result<()> { + self.query("water-sound".into())?; + self.mutate(); + Ok(()) + } + fn entity_event(&mut self, e: MovementEvent) -> io::Result<()> { + self.query(format!( + "event {}", + match e { + MovementEvent::Step => "step", + MovementEvent::Swim => "swim", + MovementEvent::Flap => "flap", + } + ))?; + self.mutate(); + Ok(()) + } + fn flapping(&mut self) -> io::Result<bool> { + self.boolean("flapping") + } + fn on_flap(&mut self) -> io::Result<()> { + self.query("on-flap".into())?; + self.mutate(); + Ok(()) + } + fn movement_emission(&mut self) -> io::Result<MovementEmission> { + self.query("emission".into())?; + Ok(emission(&self.f["flap_emission"])) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + distances: MovementDistances { + movement: single(&f["move"]), + flight: single(&f["fly"]), + next_step: single(&f["next"]), + }, + }; + let p = position(&f["legacy"]); + let m = vector(&f["movement"]); + if w.flag("block") { + let sounds = w.flag("sounds"); + let events = w.flag("events"); + match block_movement_effects(&mut w, p, 0, sounds, events, m) { + Ok(v) => writeln!(w.out, "result {v}")?, + Err(_) => writeln!(w.out, "error")?, + } + } else { + match apply_movement_emission(&mut w, emission(&f["emission"]), m, p, 0) { + Ok(()) => writeln!(w.out, "ok")?, + Err(_) => writeln!(w.out, "error")?, + } + } + writeln!( + w.out, + "distances {:08x} {:08x} {:08x}", + fbits(w.distances.movement), + fbits(w.distances.flight), + fbits(w.distances.next_step) + )?; + writeln!(w.out, "queries {}", w.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/movement_registry_fixture.rs b/crates/horizon-world/examples/movement_registry_fixture.rs new file mode 100644 index 000000000..a04f5c124 --- /dev/null +++ b/crates/horizon-world/examples/movement_registry_fixture.rs @@ -0,0 +1,184 @@ +use horizon_core::{geometry::Vec3, position::BlockPos}; +use horizon_world::movement_support::{self as support, MovementLocation}; +use horizon_world::{ + movement_properties::{ + MovementBlockProvider, MovementProperties, MovementTags, RegistryMovementWorld, + }, + nbt::{self, Limits, Tag}, + registry::{BlockRegistry, BlockStateId}, + worldgen::tags::TagDefinitions, +}; +use serde_json::Value; +use std::collections::{BTreeMap, BTreeSet}; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn position(v: &Value) -> BlockPos { + BlockPos::new( + v[0].as_i64().unwrap() as i32, + v[1].as_i64().unwrap() as i32, + v[2].as_i64().unwrap() as i32, + ) +} +struct World<'a> { + input: &'a Value, + out: &'a mut dyn Write, + calls: i64, +} +impl MovementBlockProvider for World<'_> { + type Error = io::Error; + fn movement_block_state(&mut self, p: BlockPos) -> io::Result<BlockStateId> { + writeln!(self.out, "state {} {} {}", p.x, p.y, p.z)?; + let call = self.calls; + self.calls += 1; + if call == self.input["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected block read failure")); + } + let states = self.input["states"].as_array().unwrap(); + Ok(BlockStateId( + states[call as usize % states.len()].as_u64().unwrap() as u32, + )) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + let read = |name: &str| -> Result<Tag, Box<dyn std::error::Error>> { + Ok( + nbt::read_named(&fs::read(dir.join(name))?, Limits::default())? + .0 + .tag, + ) + }; + let registry = BlockRegistry::from_nbt(&read("block-registry.nbt")?)?; + let data = read("movement-properties.nbt")?; + let properties = MovementProperties::from_nbt(&data, ®istry)?; + let resources: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?; + let mut tags = TagDefinitions::default(); + for (name, json) in resources { + tags.apply_json(&name, "vanilla", &json)?; + } + let built = tags.build(|name, _| registry.default_state(name).map(|_| name.to_owned()))?; + assert!(built.missing.is_empty()); + let members = |name: &str| -> BTreeSet<String> { + built.tags.get(name).unwrap().iter().cloned().collect() + }; + let natural = MovementTags { + fences: members("minecraft:fences"), + walls: members("minecraft:walls"), + suppresses_bounce: members("minecraft:suppresses_bounce"), + }; + let all: BTreeSet<String> = (0..registry.len()) + .map(|id| { + registry + .state(BlockStateId(id as u32)) + .unwrap() + .name + .clone() + }) + .collect(); + let bindings = [ + properties.bind(&natural)?, + properties.bind(&MovementTags::default())?, + properties.bind(&MovementTags { + fences: all.clone(), + walls: all.clone(), + suppresses_bounce: all, + })?, + ]; + assert!( + bindings[0] + .get(BlockStateId(registry.len() as u32)) + .is_err() + ); + for id in 0..registry.len() { + let s = bindings[0].get(BlockStateId(id as u32))?; + let c = s.coefficients; + writeln!( + out, + "properties {id} {:08x} {:08x} {:08x} {:08x} {:08x} {} {} {} {} {} {}", + c.friction.to_bits(), + c.speed_factor.to_bits(), + c.jump_factor.to_bits(), + c.bounce_restitution.to_bits(), + c.fall_distance_reduction.to_bits(), + c.fence_gate, + s.fence, + s.wall, + s.suppresses_bounce, + s.water, + s.bubble_column + )?; + } + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let p = &f["position"]; + let location = MovementLocation { + position: Vec3::new(number(&p[0]), number(&p[1]), number(&p[2])), + block_position: position(&f["cached"]), + supporting_block: if f["support"].is_null() { + None + } else { + Some(position(&f["support"])) + }, + }; + let mut world = World { + input: &f, + out: &mut out, + calls: 0, + }; + let mut bound = RegistryMovementWorld { + properties: &bindings[f["tags"].as_u64().unwrap() as usize], + world: &mut world, + }; + let mode = f["mode"].as_u64().unwrap(); + if mode < 4 { + let offset = match mode { + 0 => single(&f["offset"]), + 1 => support::LEGACY_SUPPORT_OFFSET, + 2 => support::ON_SUPPORT_OFFSET, + 3 => support::MOVEMENT_SUPPORT_OFFSET, + _ => unreachable!(), + }; + match support::support_position( + &mut bound, + location.position, + location.supporting_block, + offset, + ) { + Ok(p) => writeln!(world.out, "position {} {} {}", p.x, p.y, p.z)?, + Err(_) => writeln!(world.out, "error")?, + } + } else { + let result = if mode == 4 { + support::block_jump_factor(&mut bound, location) + } else { + support::block_speed_factor(&mut bound, location) + }; + match result { + Ok(factor) => writeln!( + world.out, + "factor {:08x}", + if factor.is_nan() { + 0x7fc00000 + } else { + factor.to_bits() + } + )?, + Err(_) => writeln!(world.out, "error")?, + } + } + writeln!(world.out, "queries {}", world.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/movement_support_fixture.rs b/crates/horizon-world/examples/movement_support_fixture.rs new file mode 100644 index 000000000..096559250 --- /dev/null +++ b/crates/horizon-world/examples/movement_support_fixture.rs @@ -0,0 +1,149 @@ +use horizon_core::{geometry::Vec3, position::BlockPos}; +use horizon_world::movement_support::{self as support, MovementBlockWorld, MovementLocation}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn position(v: &Value) -> BlockPos { + BlockPos::new( + v[0].as_i64().unwrap() as i32, + v[1].as_i64().unwrap() as i32, + v[2].as_i64().unwrap() as i32, + ) +} +struct World<'a> { + input: &'a Value, + out: &'a mut dyn Write, + calls: i64, + reads: usize, +} +impl World<'_> { + fn query(&mut self, text: String) -> io::Result<()> { + writeln!(self.out, "{text}")?; + let call = self.calls; + self.calls += 1; + if call == self.input["fail"].as_i64().unwrap() { + Err(io::Error::other("injected query failure")) + } else { + Ok(()) + } + } + fn flag(&self, id: usize, name: &str) -> bool { + self.input["states"][id][name].as_bool().unwrap() + } + fn predicate(&mut self, id: usize, name: &str) -> io::Result<bool> { + self.query(format!("{name} {id}"))?; + Ok(self.flag(id, name)) + } + fn factor(&mut self, id: usize, name: &str) -> io::Result<f32> { + self.query(format!("block {id}"))?; + if self.flag(id, "gate") { + return Ok(1.0); + } + self.query(format!("{name} {id}"))?; + Ok(single(&self.input["states"][id][name])) + } +} +impl MovementBlockWorld for World<'_> { + type Error = io::Error; + type State = usize; + fn block_state(&mut self, p: BlockPos) -> io::Result<usize> { + self.query(format!("state {} {} {}", p.x, p.y, p.z))?; + let id = self.reads % self.input["states"].as_array().unwrap().len(); + self.reads += 1; + Ok(id) + } + fn is_fence(&mut self, id: usize) -> io::Result<bool> { + self.predicate(id, "fence") + } + fn is_wall(&mut self, id: usize) -> io::Result<bool> { + self.predicate(id, "wall") + } + fn is_fence_gate(&mut self, id: usize) -> io::Result<bool> { + self.query(format!("block {id}"))?; + Ok(self.flag(id, "gate")) + } + fn is_water(&mut self, id: usize) -> io::Result<bool> { + self.predicate(id, "water") + } + fn is_bubble_column(&mut self, id: usize) -> io::Result<bool> { + self.predicate(id, "bubble") + } + fn jump_factor(&mut self, id: usize) -> io::Result<f32> { + self.factor(id, "jump") + } + fn speed_factor(&mut self, id: usize) -> io::Result<f32> { + self.factor(id, "speed") + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let p = &f["position"]; + let location = MovementLocation { + position: Vec3::new(number(&p[0]), number(&p[1]), number(&p[2])), + block_position: position(&f["cached"]), + supporting_block: if f["support"].is_null() { + None + } else { + Some(position(&f["support"])) + }, + }; + let mut world = World { + input: &f, + out: &mut out, + calls: 0, + reads: 0, + }; + let mode = f["mode"].as_u64().unwrap(); + if mode < 4 { + let offset = match mode { + 0 => single(&f["offset"]), + 1 => support::LEGACY_SUPPORT_OFFSET, + 2 => support::ON_SUPPORT_OFFSET, + 3 => support::MOVEMENT_SUPPORT_OFFSET, + _ => unreachable!(), + }; + match support::support_position( + &mut world, + location.position, + location.supporting_block, + offset, + ) { + Ok(p) => writeln!(world.out, "position {} {} {}", p.x, p.y, p.z)?, + Err(_) => writeln!(world.out, "error")?, + } + } else { + let result = if mode == 4 { + support::block_jump_factor(&mut world, location) + } else { + support::block_speed_factor(&mut world, location) + }; + match result { + Ok(factor) => writeln!( + world.out, + "factor {:08x}", + if factor.is_nan() { + 0x7fc00000 + } else { + factor.to_bits() + } + )?, + Err(_) => writeln!(world.out, "error")?, + } + } + writeln!(world.out, "queries {}", world.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/object_open_map_fixture.rs b/crates/horizon-world/examples/object_open_map_fixture.rs new file mode 100644 index 000000000..63073aa8d --- /dev/null +++ b/crates/horizon-world/examples/object_open_map_fixture.rs @@ -0,0 +1,169 @@ +use horizon_world::{ + object_open_map::{Entry, ObjectOpenMap, TraversalError}, + object_open_set::{CursorError, ObjectKey}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; + +#[derive(Clone)] +struct Key { + id: usize, + hash: i32, + object: usize, +} +impl PartialEq for Key { + fn eq(&self, other: &Self) -> bool { + self.id == other.id + } +} +impl Eq for Key {} +impl ObjectKey for Key { + fn object_hash(&self) -> i32 { + self.hash + } +} +fn desc(key: Option<&Key>) -> String { + key.map_or("null".into(), |k| format!("{}:{}", k.id, k.object)) +} +fn value(v: Option<i32>) -> String { + v.map_or("null".into(), |v| v.to_string()) +} +fn error(e: CursorError) -> String { + match e { + CursorError::NoSuchElement => "next none", + CursorError::NoCurrentEntry => "error current", + CursorError::MissingWrapped => "error null", + CursorError::IndexOutOfBounds => "error bounds", + } + .into() +} +fn snapshot(map: &ObjectOpenMap<Key, i32>) -> String { + format!( + "map {} {} | {}", + map.len(), + map.is_empty(), + map.entries() + .iter() + .map(|(k, v)| format!("{}={}", desc(k.as_ref()), value(*v))) + .collect::<Vec<_>>() + .join(",") + ) +} +fn key<'a>(keys: &'a [Key], op: &Value) -> Option<&'a Key> { + let index = op[1].as_i64().unwrap(); + (index >= 0).then(|| &keys[index as usize]) +} +fn mutation(map: &mut ObjectOpenMap<Key, i32>, keys: &[Key], op: &Value) -> String { + let k = key(keys, op); + match op[0].as_str().unwrap() { + "put" => format!( + "put {}", + value(map.put(k.cloned(), op[2].as_i64().map(|v| v as i32))) + ), + "remove" => format!("remove {}", value(map.remove(k))), + "contains" => format!("contains {}", map.contains_key(k)), + "get" => format!("get {}", value(map.get(k))), + "clear" => { + map.clear(); + "clear".into() + } + _ => panic!("mutation"), + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let keys: Vec<_> = f["hashes"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(object, h)| Key { + id: f["ids"][object].as_u64().unwrap() as usize, + hash: h.as_i64().unwrap() as i32, + object, + }) + .collect(); + let mut map = ObjectOpenMap::default(); + let mut cursor = map.cursor(); + let mut entries: Vec<Entry> = Vec::new(); + for op in f["ops"].as_array().unwrap() { + let result: Result<String, CursorError> = match op[0].as_str().unwrap() { + "put" | "remove" | "contains" | "get" | "clear" => { + Ok(mutation(&mut map, &keys, op)) + } + "cursor" => { + cursor = map.cursor(); + Ok("cursor".into()) + } + "next" | "force-next" => { + if cursor.has_next() || op[0] == "force-next" { + map.next_entry(&mut cursor).and_then(|entry| { + entries.push(entry.clone()); + Ok(format!( + "next {} {}={}", + entries.len() - 1, + desc(map.entry_key(&entry)?.as_ref()), + value(map.entry_value(&entry)?) + )) + }) + } else { + Ok("next none".into()) + } + } + "delete" => map.remove_current(&mut cursor).map(|()| "delete".into()), + "entry-key" | "entry-value" | "entry-set" => entries + .get(op[1].as_u64().unwrap() as usize) + .ok_or(CursorError::IndexOutOfBounds) + .and_then(|e| match op[0].as_str().unwrap() { + "entry-key" => map + .entry_key(e) + .map(|k| format!("entry-key {}", desc(k.as_ref()))), + "entry-value" => map + .entry_value(e) + .map(|v| format!("entry-value {}", value(v))), + _ => map + .set_entry_value(e, op[2].as_i64().map(|v| v as i32)) + .map(|v| format!("entry-set {}", value(v))), + }), + "each" => { + let mut call = 0usize; + let mut events = Vec::new(); + let result = map.for_each(|map, k, v| { + events.push(format!("visit {call} {}={}", desc(k.as_ref()), value(v))); + if let Some(actions) = op[1][call].as_array() { + for action in actions { + if action[0] == "fail" { + return Err(()); + } + events.push(format!("callback {}", mutation(map, &keys, action))); + events.push(snapshot(map)); + } + } + call += 1; + Ok(()) + }); + for event in events { + writeln!(out, "{event}")?; + } + match result { + Ok(()) => Ok("each".into()), + Err(TraversalError::Callback(())) => Ok("error callback".into()), + Err(TraversalError::Cursor(e)) => Err(e), + } + } + _ => panic!("operation"), + }; + writeln!(out, "{}", result.unwrap_or_else(error))?; + writeln!(out, "{} | cursor {}", snapshot(&map), cursor.has_next())?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/object_open_set_fixture.rs b/crates/horizon-world/examples/object_open_set_fixture.rs new file mode 100644 index 000000000..d4c06f39d --- /dev/null +++ b/crates/horizon-world/examples/object_open_set_fixture.rs @@ -0,0 +1,96 @@ +use horizon_world::object_open_set::{CursorError, ObjectKey, ObjectOpenSet}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone)] +struct Key { + id: usize, + hash: i32, + object: usize, +} +impl PartialEq for Key { + fn eq(&self, other: &Self) -> bool { + self.id == other.id + } +} +impl Eq for Key {} +impl ObjectKey for Key { + fn object_hash(&self) -> i32 { + self.hash + } +} +fn desc(key: Option<&Key>) -> String { + key.map_or("null".into(), |k| format!("{}:{}", k.id, k.object)) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let keys: Vec<_> = f["hashes"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(object, h)| Key { + id: f["ids"][object].as_u64().unwrap() as usize, + hash: h.as_i64().unwrap() as i32, + object, + }) + .collect(); + let mut set = ObjectOpenSet::default(); + let mut cursor = set.cursor(); + for op in f["ops"].as_array().unwrap() { + let index = op[1].as_i64().unwrap(); + let key = (index >= 0).then(|| &keys[index as usize]); + let result: Result<String, CursorError> = match op[0].as_str().unwrap() { + "add" => Ok(format!("add {}", set.add(key.cloned()))), + "remove" => Ok(format!("remove {}", set.remove(key))), + "contains" => Ok(format!("contains {}", set.contains(key))), + "get" => Ok(format!("get {}", desc(key.and_then(|k| set.get(k))))), + "clear" => { + set.clear(); + Ok("clear".into()) + } + "cursor" => { + cursor = set.cursor(); + Ok("cursor".into()) + } + "next" | "force-next" => { + if cursor.has_next() || op[0] == "force-next" { + set.next(&mut cursor) + .map(|k| format!("next {}", desc(k.as_ref()))) + } else { + Ok("next none".into()) + } + } + "delete" => set.remove_current(&mut cursor).map(|()| "delete".into()), + _ => panic!("operation"), + }; + writeln!( + out, + "{}", + match result { + Ok(v) => v, + Err(CursorError::NoSuchElement) => "next none".into(), + Err(CursorError::NoCurrentEntry) => "error current".into(), + Err(CursorError::MissingWrapped) => "error null".into(), + Err(CursorError::IndexOutOfBounds) => "error bounds".into(), + } + )?; + writeln!( + out, + "set {} {} {} | {}", + set.len(), + set.is_empty(), + cursor.has_next(), + set.values().map(desc).collect::<Vec<_>>().join(",") + )?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/piston_movement_fixture.rs b/crates/horizon-world/examples/piston_movement_fixture.rs new file mode 100644 index 000000000..3c324aa00 --- /dev/null +++ b/crates/horizon-world/examples/piston_movement_fixture.rs @@ -0,0 +1,66 @@ +use horizon_core::geometry::Vec3; +use horizon_world::piston_movement::PistonMovement; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vector(v: &Value) -> Vec3 { + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let d = vector(&f["deltas"]); + let mut state = PistonMovement { + game_time: f["time"].as_i64().unwrap(), + deltas: [d.x, d.y, d.z], + }; + for op in f["ops"].as_array().unwrap() { + let mut calls = 0; + let result = state.limit(vector(&op["movement"]), || -> io::Result<i64> { + writeln!(out, "time")?; + calls += 1; + if op["fail"].as_bool().unwrap() { + Err(io::Error::other("injected time failure")) + } else { + Ok(op["time"].as_i64().unwrap()) + } + }); + match result { + Ok(v) => writeln!( + out, + "movement {:016x} {:016x} {:016x}", + bits(v.x), + bits(v.y), + bits(v.z) + )?, + Err(_) => writeln!(out, "error")?, + } + writeln!( + out, + "deltas {:016x} {:016x} {:016x}", + bits(state.deltas[0]), + bits(state.deltas[1]), + bits(state.deltas[2]) + )?; + writeln!(out, "tick {}", state.game_time)?; + writeln!(out, "queries {calls}")?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/piston_shape_fixture.rs b/crates/horizon-world/examples/piston_shape_fixture.rs new file mode 100644 index 000000000..06c62803b --- /dev/null +++ b/crates/horizon-world/examples/piston_shape_fixture.rs @@ -0,0 +1,190 @@ +use horizon_core::geometry::{Aabb, Axis, Direction, VoxelShape}; +use horizon_world::{ + collision::CachedCollisionRegistry, + dynamic_support::{DynamicSupport, DynamicSupportWorld}, + nbt::{self, Limits, Tag}, + piston_shape::{MovingPistonState, PistonBlockBindings, PistonCollisionWorld}, + registry::{BlockRegistry, BlockStateId}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn values( + out: &mut impl Write, + label: &str, + values: impl IntoIterator<Item = f64>, +) -> io::Result<()> { + write!(out, "{label}")?; + for v in values { + let bits = if v.is_nan() { + 0x7ff8_0000_0000_0000 + } else { + v.to_bits() + }; + write!(out, " {bits:016x}")?; + } + writeln!(out) +} +fn box_values(out: &mut impl Write, label: &str, b: Aabb) -> io::Result<()> { + values( + out, + label, + [ + b.min(Axis::X), + b.min(Axis::Y), + b.min(Axis::Z), + b.max(Axis::X), + b.max(Axis::Y), + b.max(Axis::Z), + ], + ) +} +fn emit(out: &mut impl Write, shape: &VoxelShape) -> io::Result<()> { + writeln!( + out, + "shape {} {} {}", + shape.is_empty(), + shape.boxes().len(), + shape.is_cube() + )?; + for (axis, name) in Axis::ALL.into_iter().zip(["x", "y", "z"]) { + values(out, name, shape.coordinates(axis).iter().copied())?; + } + let axes = shape.cube_coordinate_axes(); + writeln!( + out, + "axes {}", + u8::from(axes[0]) + 2 * u8::from(axes[1]) + 4 * u8::from(axes[2]) + )?; + values( + out, + "extrema", + Axis::ALL + .map(|a| shape.min(a)) + .into_iter() + .chain(Axis::ALL.map(|a| shape.max(a))), + )?; + match shape.bounds() { + Some(b) => box_values(out, "bounds", b)?, + None => writeln!(out, "bounds none")?, + } + for b in shape.boxes() { + box_values(out, "box", *b)?; + } + Ok(()) +} +struct World<'a, 'r, W> { + collisions: &'a CachedCollisionRegistry<'r>, + dynamic: &'a [Option<DynamicSupport>], + out: &'a mut W, + fail: i32, + calls: i32, +} +impl<W: Write> World<'_, '_, W> { + fn query(&mut self, p: [i32; 3]) -> io::Result<()> { + writeln!(self.out, "entity {} {} {}", p[0], p[1], p[2])?; + let count = self.calls; + self.calls += 1; + if count == self.fail { + Err(io::Error::other("injected block entity failure")) + } else { + Ok(()) + } + } +} +impl<W: Write> DynamicSupportWorld for World<'_, '_, W> { + type Error = io::Error; + fn shulker_is_closed(&mut self, p: [i32; 3]) -> io::Result<Option<bool>> { + self.query(p)?; + Ok(None) + } + fn moving_piston_shape(&mut self, p: [i32; 3]) -> io::Result<Option<VoxelShape>> { + self.query(p)?; + Ok(None) + } +} +impl<W: Write> PistonCollisionWorld for World<'_, '_, W> { + type Error = io::Error; + fn collision_shape(&mut self, state: BlockStateId, p: [i32; 3]) -> io::Result<VoxelShape> { + if let Some(shape) = self.collisions.cached_shape(state)? { + return Ok(shape.clone()); + } + let dynamic = self.dynamic[state.0 as usize] + .as_ref() + .expect("known empty-context dynamic collision") + .clone(); + dynamic.shape(self, p).map_err(io::Error::other) + } +} +fn number(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn float_bits(v: f32) -> u32 { + if v.is_nan() { 0x7fc0_0000 } else { v.to_bits() } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let read = |name: &str| -> Result<Tag, Box<dyn std::error::Error>> { + Ok( + nbt::read_named(&fs::read(dir.join(name))?, Limits::default())? + .0 + .tag, + ) + }; + let registry = BlockRegistry::from_nbt(&read("block-registry.nbt")?)?; + let collisions = CachedCollisionRegistry::from_nbt(&read("cached-collision.nbt")?, ®istry)?; + let bindings = PistonBlockBindings::new(®istry)?; + let dynamic = (0..registry.len()) + .map(|id| DynamicSupport::from_state(registry.state(BlockStateId(id as u32)).unwrap())) + .collect::<io::Result<Vec<_>>>()?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let p = std::array::from_fn(|i| f["position"][i].as_i64().unwrap() as i32); + let piston = MovingPistonState { + moved_state: BlockStateId(f["state"].as_u64().unwrap() as u32), + direction: Direction::ALL[f["direction"].as_u64().unwrap() as usize], + extending: f["extending"].as_bool().unwrap(), + source: f["source"].as_bool().unwrap(), + progress: number(&f["progress"]), + previous_progress: number(&f["previous"]), + }; + let partial = number(&f["partial"]); + let offset = piston.interpolated_offset(partial).map(float_bits); + writeln!( + out, + "motion {} {:08x} {:08x} {:08x} {:08x}", + piston.movement_direction() as u8, + float_bits(piston.interpolated_progress(partial)), + offset[0], + offset[1], + offset[2] + )?; + writeln!( + out, + "related {}", + bindings.collision_related_state(piston)?.0 + )?; + let mut world = World { + collisions: &collisions, + dynamic: &dynamic, + out: &mut out, + fail: f["fail"].as_i64().unwrap() as i32, + calls: 0, + }; + let clip = f["noclip"].as_i64().unwrap(); + let noclip = (clip >= 0).then(|| Direction::ALL[clip as usize]); + if !f["kinematic"].as_bool().unwrap() { + match bindings.collision_shape(&mut world, p, piston, noclip) { + Ok(shape) => emit(world.out, &shape)?, + Err(_) => writeln!(world.out, "shape error")?, + } + } + writeln!(world.out, "queries {}", world.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/placement_fixture.rs b/crates/horizon-world/examples/placement_fixture.rs new file mode 100644 index 000000000..b3e6c4747 --- /dev/null +++ b/crates/horizon-world/examples/placement_fixture.rs @@ -0,0 +1,84 @@ +//! Transport for placement decoding, emissions, failures and random state. +#[path = "support/placement_queries.rs"] +mod queries; +use horizon_core::random::{LegacyRandom, RandomSource, XoroshiroRandom}; +use horizon_world::worldgen::{anchor::WorldGenerationContext, placement::PlacementModifier}; +use serde_json::Value; +use std::cell::RefCell; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +fn fixture( + f: &Value, + mut random: impl RandomSource, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let c = &f["context"]; + let context = WorldGenerationContext::new(n(&c[0]), n(&c[1]), n(&c[2])); + let out = RefCell::new(out); + let mut context = queries::Queries::new(f, context, &out); + match PlacementModifier::from_json(f["definition"].as_str().unwrap()) { + Err(_) => writeln!(out.borrow_mut(), "decode error")?, + Ok(modifier) => { + writeln!(out.borrow_mut(), "decode ok")?; + for p in f["positions"].as_array().unwrap() { + if f["count_only"].as_bool().unwrap_or(false) { + match modifier.repetitions(&mut random, [n(&p[0]), n(&p[1]), n(&p[2])]) { + Ok(Some(count)) => writeln!(out.borrow_mut(), "count {count}")?, + _ => writeln!(out.borrow_mut(), "count error")?, + } + writeln!(out.borrow_mut(), "next {}", random.next_long())?; + continue; + } + let mut count = 0; + let fail = n(&f["fail"]); + let draw = f["draw"].as_bool().unwrap(); + let result = modifier.modify_in( + &mut context, + &mut random, + [n(&p[0]), n(&p[1]), n(&p[2])], + |random, p| { + let previous = count; + count += 1; + if previous == fail { + return Err(io::Error::other("consumer failure")); + } + writeln!(out.borrow_mut(), "position {} {} {}", p[0], p[1], p[2])?; + if draw { + writeln!(out.borrow_mut(), "consumer {}", random.next_long())?; + } + Ok(()) + }, + ); + writeln!( + out.borrow_mut(), + "modify {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!(out.borrow_mut(), "next {}", random.next_long())?; + } + } + } + writeln!(out.borrow_mut(), "tail {}", random.next_long())?; + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture(&f, LegacyRandom::new(seed), &mut out)?; + } else { + fixture(&f, XoroshiroRandom::new(seed), &mut out)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/player_equipment_fixture.rs b/crates/horizon-world/examples/player_equipment_fixture.rs new file mode 100644 index 000000000..a7349b78c --- /dev/null +++ b/crates/horizon-world/examples/player_equipment_fixture.rs @@ -0,0 +1,273 @@ +use horizon_world::{ + component_patch::Prototype, + item_stack_refs::{ItemStacks, StackRef}, + player_equipment::{self, EquipWorld, InteractionHand}, + player_inventory::{EntityEquipment, EquipmentSlot, PlayerInventory}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +type Stack = StackRef<u8, u8, i32>; +type Inventory = PlayerInventory<u8, u8, i32>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +struct World { + out: io::BufWriter<fs::File>, + f: Value, + refs: Vec<Stack>, + ids: Vec<Stack>, + empty: Stack, + calls: i32, +} +impl World { + fn id(&mut self, s: &Stack) -> usize { + self.ids + .iter() + .position(|v| v.same_reference(s)) + .unwrap_or_else(|| { + self.ids.push(s.clone()); + self.ids.len() - 1 + }) + } + fn snapshot(&mut self, s: &Stack) -> String { + let id = self.id(s); + let s = s.read(); + format!( + "{}:{}:{}:{}:{}:{}", + id, + s.item(), + s.count, + s.count(), + s.pop_time, + s.is_empty() + ) + } + fn all(&mut self, inv: &Inventory) { + for i in 0..self.refs.len() { + let s = self.snapshot(&self.refs[i].clone()); + writeln!(self.out, "ref {i} {s}").unwrap(); + } + writeln!( + self.out, + "state {} {} {}", + inv.selected(), + self.calls, + player_equipment::is_empty(inv) + ) + .unwrap(); + let slots = (0..43) + .map(|i| self.snapshot(&inv.get(i).unwrap())) + .collect::<Vec<_>>() + .join(" | "); + writeln!(self.out, "slots {slots}").unwrap(); + let entries = inv + .equipment() + .entries() + .into_iter() + .map(|(s, v)| { + format!( + "{}={}", + match s { + EquipmentSlot::MainHand => "MAINHAND", + EquipmentSlot::OffHand => "OFFHAND", + EquipmentSlot::Feet => "FEET", + EquipmentSlot::Legs => "LEGS", + EquipmentSlot::Chest => "CHEST", + EquipmentSlot::Head => "HEAD", + EquipmentSlot::Body => "BODY", + EquipmentSlot::Saddle => "SADDLE", + }, + self.snapshot(&v) + ) + }) + .collect::<Vec<_>>() + .join(" | "); + writeln!(self.out, "raw-equipment {entries}").unwrap(); + let equipped = EquipmentSlot::ALL + .into_iter() + .map(|slot| self.snapshot(&player_equipment::get(inv, slot))) + .collect::<Vec<_>>() + .join(" | "); + writeln!(self.out, "equipped {equipped}").unwrap(); + let main = self.snapshot(&player_equipment::get_hand(inv, InteractionHand::Main)); + let off = self.snapshot(&player_equipment::get_hand(inv, InteractionHand::Off)); + writeln!(self.out, "hands {main} | {off}").unwrap(); + let s = self.snapshot(&self.empty.clone()); + writeln!(self.out, "empty {s}").unwrap(); + } +} +impl EquipWorld<u8, u8, i32> for World { + type Error = (); + fn on_equip( + &mut self, + inv: &mut Inventory, + slot: EquipmentSlot, + old: Stack, + next: Stack, + ) -> Result<(), ()> { + self.calls += 1; + let old = self.id(&old); + let next = self.id(&next); + writeln!(self.out, "equip {} {old} {next}", slot as usize).unwrap(); + self.all(inv); + if self.f["fail"].as_bool().unwrap() { + return Err(()); + } + if self.f["mutate"].as_bool().unwrap() { + self.refs[n(&self.f, "mutate_ref") as usize].write().count = n(&self.f, "after_count"); + inv.set_selected(n(&self.f, "after_selected")) + .map_err(|_| ())?; + inv.set( + n(&self.f, "replace_slot"), + self.refs[n(&self.f, "replace_ref") as usize].clone(), + ) + .map_err(|_| ())?; + } + Ok(()) + } +} + +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let stacks = ItemStacks::new(0); + let empty = stacks.empty(); + let refs: Vec<_> = f["stacks"] + .as_array() + .unwrap() + .iter() + .map(|v| { + let item = n(v, "item"); + if item < 0 { + empty.clone() + } else { + let s = stacks.create(item as u8, n(v, "count"), Prototype::new([])); + s.write().pop_time = n(v, "pop"); + s + } + }) + .collect(); + let equipment = EntityEquipment::new(empty.clone()); + let mut inv = Inventory::new(stacks, equipment); + inv.set_selected(n(&f, "selected")).unwrap(); + for p in f["slots"].as_array().unwrap() { + inv.set( + p[0].as_i64().unwrap() as i32, + refs[p[1].as_u64().unwrap() as usize].clone(), + ) + .unwrap(); + } + for p in f["equipment"].as_array().unwrap() { + player_equipment::set( + &mut inv, + EquipmentSlot::ALL[p[0].as_u64().unwrap() as usize], + refs[p[1].as_u64().unwrap() as usize].clone(), + ); + } + for p in f["raw_entries"].as_array().unwrap() { + inv.equipment().set( + EquipmentSlot::ALL[p[0].as_u64().unwrap() as usize], + refs[p[1].as_u64().unwrap() as usize].clone(), + ); + } + let mut w = World { + out, + f: Value::Null, + refs, + ids: vec![empty.clone()], + empty, + calls: 0, + }; + w.all(&inv); + for op in f["ops"].as_array().unwrap() { + w.f = op.clone(); + w.calls = 0; + let a = n(op, "a") as usize; + let b = n(op, "b") as usize; + let slot = n(op, "slot"); + let result = (|| -> Result<(), ()> { + match op["kind"].as_str().unwrap() { + "get-hand" => { + w.refs[b] = player_equipment::get_hand( + &inv, + if n(op, "hand") == 0 { + InteractionHand::Main + } else { + InteractionHand::Off + }, + ) + } + "set-hand" => { + let s = w.refs[a].clone(); + player_equipment::set_hand( + &mut w, + &mut inv, + if n(op, "hand") == 0 { + InteractionHand::Main + } else { + InteractionHand::Off + }, + s, + )?; + } + "get-item" => { + w.refs[b] = player_equipment::get( + &inv, + EquipmentSlot::ALL[n(op, "equipment") as usize], + ) + } + "set-item" => { + let s = w.refs[a].clone(); + player_equipment::set_item_slot( + &mut w, + &mut inv, + EquipmentSlot::ALL[n(op, "equipment") as usize], + s, + )?; + } + "set-equipment" => { + w.refs[b] = player_equipment::set( + &mut inv, + EquipmentSlot::ALL[n(op, "equipment") as usize], + w.refs[a].clone(), + ) + } + "clear-equipment" => inv.equipment().clear(), + "clear" => inv.clear(), + "select" => inv.set_selected(slot).map_err(|_| ())?, + "get" => w.refs[b] = inv.get(slot).map_err(|_| ())?, + "set" => inv.set(slot, w.refs[a].clone()).map_err(|_| ())?, + "count" => w.refs[a].write().count = n(op, "amount"), + "alias" => w.refs[b] = w.refs[a].clone(), + "copy" => { + let copied = w.refs[a].read().copy(); + w.refs[b] = match copied { + horizon_world::item_stack_storage::CopyResult::Empty => w.empty.clone(), + horizon_world::item_stack_storage::CopyResult::Stack(data) => { + Stack::new(data) + } + }; + } + _ => panic!("operation"), + } + Ok(()) + })(); + writeln!( + w.out, + "result {} {}", + if result.is_ok() { "ok" } else { "error" }, + w.calls + )?; + w.all(&inv); + } + out = w.out; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/player_food_fixture.rs b/crates/horizon-world/examples/player_food_fixture.rs new file mode 100644 index 000000000..7478be35f --- /dev/null +++ b/crates/horizon-world/examples/player_food_fixture.rs @@ -0,0 +1,145 @@ +use horizon_world::{ + food::FoodData, + player_food::{self, PlayerFoodWorld, StoredPlayerFood}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + changed: bool, + foods: [FoodData; 2], +} +impl World<'_> { + fn state(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn reset(&mut self) { + for i in 0..2 { + let v = &self.state()["foods"][i]; + self.foods[i] = FoodData { + food: v["food"].as_i64().unwrap() as i32, + exhaustion: single(&v["exhaustion"]), + ..FoodData::default() + }; + } + } + fn index(&self, k: &str) -> usize { + self.state()[k].as_u64().unwrap() as usize + } + fn query(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected food guard failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.changed = true; + self.reset(); + } + Ok(()) + } +} +impl PlayerFoodWorld for World<'_> { + type Error = io::Error; + fn invulnerable_direct(&self) -> bool { + self.state()["invulnerable"].as_bool().unwrap() + } + fn level_is_client(&mut self) -> io::Result<bool> { + self.query("level")?; + self.query("client")?; + Ok(self.state()["client"].as_bool().unwrap()) + } + fn add_exhaustion_direct(&mut self, v: f32) -> io::Result<()> { + let i = self.index("direct"); + self.query(&format!("exhaust {i} {:08x}", bits(v)))?; + self.foods[i].add_exhaustion(v); + Ok(()) + } + fn needs_food_direct(&mut self) -> io::Result<bool> { + let i = self.index("direct"); + self.query(&format!("needs {i}"))?; + Ok(self.foods[i].needs_food()) + } + fn enough_food_virtual(&mut self) -> io::Result<bool> { + self.query("food")?; + let i = self.index("virtual"); + self.query(&format!("enough {i}"))?; + Ok(self.foods[i].has_enough_food()) + } + fn may_fly_virtual(&mut self) -> io::Result<bool> { + self.query("abilities")?; + Ok(self.state()["mayfly"].as_bool().unwrap()) + } +} +fn run<W: PlayerFoodWorld>(w: &mut W, f: &Value) -> Result<Option<bool>, W::Error> { + match f["mode"].as_str().unwrap() { + "exhaust" => player_food::cause_exhaustion(w, single(&f["amount"])).map(|()| None), + "eat" => player_food::can_eat(w, f["always"].as_bool().unwrap()).map(Some), + "enough" => player_food::enough_food_for_manoeuvres(w).map(Some), + _ => panic!("mode"), + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + changed: false, + foods: [FoodData::default(); 2], + }; + w.reset(); + let result = if f["stored"].as_bool().unwrap() { + let s = &f["initial"]; + let mut stored = StoredPlayerFood { + food: &mut w.foods[0], + invulnerable: s["invulnerable"].as_bool().unwrap(), + client_side: s["client"].as_bool().unwrap(), + may_fly: s["mayfly"].as_bool().unwrap(), + }; + Ok(run(&mut stored, &f).unwrap()) + } else { + run(&mut w, &f) + }; + match result { + Ok(v) => { + if let Some(v) = v { + writeln!(w.out, "bool {v}")?; + } + writeln!(w.out, "result ok")?; + } + Err(_) => writeln!(w.out, "result error")?, + } + for (i, food) in w.foods.iter().enumerate() { + writeln!( + w.out, + "food {i} {} {:08x}", + food.food, + bits(food.exhaustion) + )?; + } + writeln!(w.out, "queries {}", w.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/player_health_fixture.rs b/crates/horizon-world/examples/player_health_fixture.rs new file mode 100644 index 000000000..f7b687f65 --- /dev/null +++ b/crates/horizon-world/examples/player_health_fixture.rs @@ -0,0 +1,242 @@ +use horizon_world::{ + attributes::{ + Modifier, Operation, + entity::{Catalog, EntityAttributes}, + }, + player_health::{PlayerAttributeHealth, PlayerFloatIds}, + synced_floats::{FloatValue, Observer, SyncedFloats}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, + sync::Arc, +}; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +fn values(v: Option<&[FloatValue]>) -> String { + match v { + None => "none".into(), + Some([]) => "empty".into(), + Some(v) => v + .iter() + .map(|v| format!("{}:{:08x}", v.id, bits(v.value))) + .collect::<Vec<_>>() + .join(","), + } +} +struct Callback<'a> { + out: &'a mut dyn Write, + op: &'a Value, + calls: i64, +} +impl Callback<'_> { + fn event(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.op["fail"].as_i64().unwrap() { + Err(io::Error::other("injected player health callback failure")) + } else { + Ok(()) + } + } +} +impl Observer for Callback<'_> { + type Error = io::Error; + fn updated(&mut self, data: &mut SyncedFloats, id: u8) -> io::Result<()> { + self.event(&format!( + "updated {id} {:08x} {}", + bits(data.get(id).unwrap()), + data.is_dirty() + ))?; + if self.op["pack_callback"].as_bool().unwrap() { + writeln!( + self.out, + "callback-pack {}", + values(data.take_dirty().as_deref()) + )?; + } + Ok(()) + } + fn assigned(&mut self, _: &mut SyncedFloats, v: &[FloatValue]) -> io::Result<()> { + self.event(&format!("assigned {}", values(Some(v)))) + } +} +struct State { + attributes: EntityAttributes, + data: SyncedFloats, + ids: PlayerFloatIds, + dead: bool, +} +impl State { + fn bind<'a, 'b>( + &'a mut self, + cb: &'a mut Callback<'b>, + ) -> PlayerAttributeHealth<'a, Callback<'b>> { + PlayerAttributeHealth::new( + &mut self.attributes, + &mut self.data, + self.ids, + self.dead, + cb, + ) + .unwrap() + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let ids: Value = serde_json::from_str(&fs::read_to_string(dir.join("ids.json"))?)?; + let ids = PlayerFloatIds { + health: ids["health"].as_u64().unwrap() as u8, + absorption: ids["absorption"].as_u64().unwrap() as u8, + }; + let catalog = Arc::new(Catalog::from_json(&serde_json::from_str( + &fs::read_to_string(dir.join("catalog.json"))?, + )?)?); + let keys = [ + catalog.id("minecraft:max_health").unwrap(), + catalog.id("minecraft:max_absorption").unwrap(), + ]; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut state = State { + attributes: catalog.create("minecraft:player").unwrap(), + data: SyncedFloats::new(&[ + FloatValue { + id: ids.health, + value: single(&f["health"]), + }, + FloatValue { + id: ids.absorption, + value: single(&f["absorption"]), + }, + ])?, + ids, + dead: f["dead"].as_bool().unwrap(), + }; + for op in f["ops"].as_array().unwrap() { + let mut cb = Callback { + out: &mut out, + op, + calls: 0, + }; + let key = keys[op["attribute"].as_u64().unwrap() as usize]; + let v = single(&op["value"]); + let result = match op["mode"].as_str().unwrap() { + "set" => state.bind(&mut cb).set_health(v).map_err(|_| ()), + "heal" => state.bind(&mut cb).heal(v).map_err(|_| ()), + "absorption" => state.bind(&mut cb).set_absorption(v).map_err(|_| ()), + "get-absorption" => state + .bind(&mut cb) + .absorption() + .map_err(|_| ()) + .and_then(|v| writeln!(cb.out, "float {:08x}", bits(v)).map_err(|_| ())), + "hurt" => state + .bind(&mut cb) + .is_hurt() + .map_err(|_| ()) + .and_then(|v| writeln!(cb.out, "bool {v}").map_err(|_| ())), + "dead" => state + .bind(&mut cb) + .is_dead_or_dying() + .map_err(|_| ()) + .and_then(|v| writeln!(cb.out, "bool {v}").map_err(|_| ())), + "base" => { + state + .attributes + .edit(key, |a, o| a.set_base_value(number(&op["amount"]), o)) + .unwrap() + .unwrap(); + Ok(()) + } + "add" => { + let m = Modifier::new( + op["id"].as_str().unwrap(), + number(&op["amount"]), + Operation::ALL[op["operation"].as_u64().unwrap() as usize], + )?; + state + .attributes + .edit(key, |a, o| a.add_or_update_transient(m, o)) + .unwrap() + .unwrap(); + Ok(()) + } + "remove" => { + state + .attributes + .edit(key, |a, o| a.remove(op["id"].as_str().unwrap(), o)) + .unwrap() + .unwrap(); + Ok(()) + } + "reset" => { + state.attributes.reset_base(key); + Ok(()) + } + "pack" => writeln!( + cb.out, + "packed {}", + values(state.data.take_dirty().as_deref()) + ) + .map_err(|_| ()), + "defaults" => writeln!( + cb.out, + "defaults {}", + values(state.data.non_default().as_deref()) + ) + .map_err(|_| ()), + "assign" => { + let values = op["values"] + .as_array() + .unwrap() + .iter() + .map(|v| FloatValue { + id: if v["field"] == 0 { + ids.health + } else { + ids.absorption + }, + value: single(&v["value"]), + }) + .collect::<Vec<_>>(); + state.data.assign(&values, &mut cb).map_err(|_| ()) + } + _ => panic!("mode"), + }; + writeln!( + cb.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!( + cb.out, + "state {:08x} {:08x} {} {} {} {} {} {}", + bits(state.data.get(ids.health).unwrap()), + bits(state.data.get(ids.absorption).unwrap()), + state.data.is_dirty(), + state.data.item_dirty(ids.health).unwrap(), + state.data.item_dirty(ids.absorption).unwrap(), + state.data.is_default(ids.health).unwrap(), + state.data.is_default(ids.absorption).unwrap(), + cb.calls + )?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/player_hurt_fixture.rs b/crates/horizon-world/examples/player_hurt_fixture.rs new file mode 100644 index 000000000..54a5ed5e4 --- /dev/null +++ b/crates/horizon-world/examples/player_hurt_fixture.rs @@ -0,0 +1,313 @@ +use horizon_world::living_hurt::{HurtState, HurtTag, HurtWorld}; +use horizon_world::{ + food::Difficulty, + player_hurt::{ + CausingEntity, PlayerHurtWorld, ServerPlayerHurtWorld, player_hurt_server, + server_player_hurt_server, + }, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +fn state(s: &HurtState<()>) -> String { + format!( + "{} {} {:08x} {} {} {} {}", + s.no_action_time, + s.cooldown, + bits(s.last_hurt), + s.hurt_duration, + s.hurt_time, + s.last_source.is_some(), + s.last_stamp + ) +} +struct Env<'a> { + out: &'a mut dyn Write, + op: &'a Value, + calls: i64, + hit: bool, + recorded: f32, + player: bool, + difficulty_calls: usize, +} +impl Env<'_> { + fn flag(&self, n: &str) -> bool { + self.op[n].as_bool().unwrap() + } + fn event(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.op["fail"].as_i64().unwrap() { + Err(io::Error::other("injected hurt callback failure")) + } else { + Ok(()) + } + } +} +impl HurtWorld for Env<'_> { + type Error = io::Error; + type Source = (); + type UseItem = bool; + type Blocking = (); + type Sound = (); + fn source(&self) {} + fn is_server_player(&self) -> bool { + self.player + } + fn invulnerable(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("invulnerable")?; + Ok(self.flag("invulnerable")) + } + fn fire_resistance(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("fire-resistance")?; + Ok(self.flag("fire_resistance")) + } + fn sleeping(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("sleeping")?; + Ok(self.flag("sleeping")) + } + fn freeze_hurts_extra(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("freeze-extra")?; + Ok(self.flag("freeze_extra")) + } + fn stop_sleeping(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("wake") + } + fn resolve_mob(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("resolve-mob") + } + fn resolve_player(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("resolve-player") + } + fn broadcast_damage(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("broadcast") + } + fn mark_hurt(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("mark") + } + fn secondary_sound(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("thorns") + } + fn die(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("die") + } + fn hurt_sound(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("hurt-sound") + } + + fn dead_or_dying(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("dead")?; + Ok(self.flag(if self.hit { + "dead_after" + } else { + "dead_before" + })) + } + fn tag(&mut self, _: &mut HurtState<()>, tag: HurtTag) -> io::Result<bool> { + let n = match tag { + HurtTag::Fire => "fire", + HurtTag::Freezing => "freezing", + HurtTag::DamagesHelmet => "damages_helmet", + HurtTag::BypassesCooldown => "bypasses_cooldown", + HurtTag::NoImpact => "no_impact", + HurtTag::NoKnockback => "no_knockback", + }; + self.event(&format!("tag {n}"))?; + Ok(self.flag(n)) + } + fn use_item(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("use-item")?; + Ok(self.flag("component")) + } + fn apply_blocking(&mut self, _: &mut HurtState<()>, v: f32) -> io::Result<f32> { + self.event(&format!("blocking {:08x}", bits(v)))?; + Ok(single(&self.op["blocked"])) + } + fn helmet_empty(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("helmet")?; + Ok(!self.flag("helmet")) + } + fn hurt_helmet(&mut self, _: &mut HurtState<()>, v: f32) -> io::Result<()> { + self.event(&format!("hurt-helmet {:08x}", bits(v))) + } + fn actually_hurt(&mut self, s: &mut HurtState<()>, v: f32) -> io::Result<()> { + self.event(&format!("hurt {:08x} {}", bits(v), state(s)))?; + self.hit = true; + self.recorded = v; + if self.flag("mutate_hit") { + s.cooldown = self.op["hit_cooldown"].as_i64().unwrap() as i32; + s.last_hurt = single(&self.op["hit_last"]); + s.hurt_duration = self.op["hit_duration"].as_i64().unwrap() as i32; + s.hurt_time = self.op["hit_time"].as_i64().unwrap() as i32; + } + Ok(()) + } + fn blocking_component(&mut self, v: bool) -> Option<()> { + v.then_some(()) + } + fn on_blocked(&mut self, _: &mut HurtState<()>, _: ()) -> io::Result<()> { + Ok(()) + } + fn knockback(&mut self, _: &mut HurtState<()>, v: f32, b: bool) -> io::Result<()> { + self.event(&format!("knockback {:08x} {b}", bits(v))) + } + fn death_protection(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("tag bypasses_invulnerability")?; + if !self.flag("bypasses_invulnerability") { + self.event("hand 0")?; + self.event("hand 1")?; + } + Ok(false) + } + fn death_sound(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("death-sound") + } + fn make_sound(&mut self, _: &mut HurtState<()>, _: ()) -> io::Result<()> { + self.event("make-sound") + } + fn game_time(&mut self, _: &mut HurtState<()>) -> io::Result<i64> { + self.event("level")?; + self.event("game-time")?; + Ok(self.op["game_time"].as_i64().unwrap()) + } + fn effects_on_hurt(&mut self, _: &mut HurtState<()>, v: f32) -> io::Result<()> { + self.event("effects")?; + for i in 0..self.op["effects"].as_u64().unwrap() { + self.event(&format!("effect {i} {:08x}", bits(v)))?; + } + Ok(()) + } + fn player_hurt_criterion( + &mut self, + _: &mut HurtState<()>, + _: f32, + _: f32, + _: bool, + ) -> io::Result<()> { + self.event("criterion") + } + fn award_blocked(&mut self, _: &mut HurtState<()>, v: i32) -> io::Result<()> { + self.event(&format!("blocked-stat {v}")) + } + fn attacker_criterion( + &mut self, + _: &mut HurtState<()>, + _: f32, + _: f32, + _: bool, + ) -> io::Result<()> { + self.event("attacker") + } +} +impl PlayerHurtWorld for Env<'_> { + fn ability_invulnerable(&self) -> bool { + self.flag("ability_invulnerable") + } + fn bypasses_invulnerability(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("tag bypasses_invulnerability")?; + Ok(self.flag("bypasses_invulnerability")) + } + fn remove_shoulders(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("shoulders") + } + fn scales_with_difficulty(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("scales")?; + Ok(self.flag("scales")) + } + fn difficulty(&mut self, _: &mut HurtState<()>) -> io::Result<Difficulty> { + self.event("difficulty")?; + let v = self.op["difficulties"][self.difficulty_calls] + .as_u64() + .unwrap(); + self.difficulty_calls += 1; + Ok([ + Difficulty::Peaceful, + Difficulty::Easy, + Difficulty::Normal, + Difficulty::Hard, + ][v as usize]) + } +} +impl ServerPlayerHurtWorld for Env<'_> { + type Player = (); + type Arrow = (); + fn causing_entity(&mut self, _: &mut HurtState<()>) -> io::Result<CausingEntity<(), ()>> { + self.event("attacker")?; + Ok(match self.op["attacker"].as_u64().unwrap() { + 0 | 1 => CausingEntity::Other, + 2 => CausingEntity::Player(()), + 3 => CausingEntity::Arrow(()), + _ => panic!("attacker"), + }) + } + fn arrow_player_owner(&mut self, _: &mut HurtState<()>, _: ()) -> io::Result<Option<()>> { + self.event("owner")?; + Ok((self.op["owner"] == 1).then_some(())) + } + fn can_harm_player(&mut self, _: &mut HurtState<()>, _: ()) -> io::Result<bool> { + self.event("can-harm")?; + Ok(self.flag("can_harm")) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut s = HurtState { + no_action_time: f["no_action"].as_i64().unwrap() as i32, + cooldown: f["cooldown"].as_i64().unwrap() as i32, + last_hurt: single(&f["last_hurt"]), + hurt_duration: f["duration"].as_i64().unwrap() as i32, + hurt_time: f["time"].as_i64().unwrap() as i32, + last_source: f["source"].as_bool().unwrap().then_some(()), + last_stamp: f["stamp"].as_i64().unwrap(), + }; + let mut recorded = 0.0; + for op in f["ops"].as_array().unwrap() { + let mut e = Env { + out: &mut out, + op, + calls: 0, + hit: false, + recorded, + player: true, + difficulty_calls: 0, + }; + let result = if f["server"].as_bool().unwrap() { + server_player_hurt_server(&mut s, &mut e, single(&op["damage"])) + } else { + player_hurt_server(&mut s, &mut e, single(&op["damage"])) + }; + match result { + Ok(v) => writeln!(e.out, "bool {v}\nresult ok")?, + Err(_) => writeln!(e.out, "result error")?, + }; + recorded = e.recorded; + writeln!( + e.out, + "state {} {:08x} {} {}", + state(&s), + bits(recorded), + e.hit, + e.calls + )?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/player_inventory_fixture.rs b/crates/horizon-world/examples/player_inventory_fixture.rs new file mode 100644 index 000000000..a3e2625e2 --- /dev/null +++ b/crates/horizon-world/examples/player_inventory_fixture.rs @@ -0,0 +1,303 @@ +use horizon_world::{ + component_patch::{Patch, Prototype}, + item_stack_refs::{ItemStacks, StackRef}, + player_inventory::{EntityEquipment, EquipmentSlot, InventoryRules, PlayerInventory}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +type Stack = StackRef<u8, usize, i32>; +type Inventory = PlayerInventory<u8, usize, i32>; +struct Rules; +impl InventoryRules<u8, usize, i32> for Rules { + fn is_enchanted(&self, s: &Stack) -> bool { + s.read().component(&4).is_some_and(|n| *n != 0) + } + fn is_damaged(&self, s: &Stack) -> bool { + let s = s.read(); + s.component(&2).is_some() + && s.component(&3).is_none() + && s.component(&1).is_some() + && s.component(&1) + .copied() + .unwrap_or(0) + .max(0) + .min(s.component(&2).copied().unwrap_or(0)) + > 0 + } + fn has_custom_name(&self, s: &Stack) -> bool { + s.read().component(&5).is_some() + } +} +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn opt(v: Option<i32>) -> String { + v.map_or("none".into(), |n| n.to_string()) +} +struct Output { + out: io::BufWriter<fs::File>, + ids: Vec<Stack>, +} +impl Output { + fn snapshot(&mut self, s: &Stack) -> String { + let id = self + .ids + .iter() + .position(|v| v.same_reference(s)) + .unwrap_or_else(|| { + self.ids.push(s.clone()); + self.ids.len() - 1 + }); + let damaged = Rules.is_damaged(s); + let enchanted = Rules.is_enchanted(s); + let s = s.read(); + format!( + "{}:{}:{}:{}:{}:{}:{}:{}:{}:{}", + id, + s.item(), + s.count, + s.count(), + s.pop_time, + s.is_empty(), + damaged, + enchanted, + (0..6) + .map(|k| opt(s.component(&k).copied())) + .collect::<Vec<_>>() + .join(","), + s.components + .as_patch() + .entries() + .iter() + .map(|(k, v)| format!("{k}={}", opt(*v))) + .collect::<Vec<_>>() + .join(",") + ) + } + fn all(&mut self, refs: &[Stack], inv: &[Inventory; 2], empty: &Stack) { + for (i, s) in refs.iter().enumerate() { + let s = self.snapshot(s); + writeln!(self.out, "ref {i} {s}").unwrap(); + } + for (i, c) in inv.iter().enumerate() { + writeln!( + self.out, + "inventory {} {} {} {} {} {} {} {} {}", + i, + c.selected(), + c.times_changed, + c.free_slot(), + c.suitable_hotbar(&Rules), + c.is_empty(), + c.count_item(0), + c.count_item(1), + c.count_item(2) + ) + .unwrap(); + let slots = (0..43) + .map(|j| self.snapshot(&c.get(j).unwrap())) + .collect::<Vec<_>>() + .join(" | "); + writeln!(self.out, "slots {slots}").unwrap(); + let eq = c + .equipment() + .entries() + .into_iter() + .map(|(s, v)| { + format!( + "{}={}", + match s { + EquipmentSlot::MainHand => "MAINHAND", + EquipmentSlot::OffHand => "OFFHAND", + EquipmentSlot::Feet => "FEET", + EquipmentSlot::Legs => "LEGS", + EquipmentSlot::Chest => "CHEST", + EquipmentSlot::Head => "HEAD", + EquipmentSlot::Body => "BODY", + EquipmentSlot::Saddle => "SADDLE", + }, + self.snapshot(&v) + ) + }) + .collect::<Vec<_>>() + .join(" | "); + writeln!(self.out, "equipment {eq}").unwrap(); + for (j, s) in refs.iter().enumerate() { + writeln!( + self.out, + "query {} {} {} {}", + j, + c.contains(s), + c.find_matching(s), + c.find_crafting(1, s, &Rules) + ) + .unwrap(); + } + } + let e = self.snapshot(empty); + writeln!(self.out, "empty {e}").unwrap(); + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let stacks = ItemStacks::new(0); + let empty = stacks.empty(); + let prototypes: Vec<_> = f["prototypes"] + .as_array() + .unwrap() + .iter() + .map(|p| { + Prototype::new(p.as_array().unwrap().iter().map(|v| { + ( + v[0].as_u64().unwrap() as usize, + v[1].as_i64().unwrap() as i32, + ) + })) + }) + .collect(); + let mut refs: Vec<_> = f["stacks"] + .as_array() + .unwrap() + .iter() + .map(|v| { + let item = n(v, "item"); + if item < 0 { + empty.clone() + } else { + let s = + stacks.create(item as u8, n(v, "count"), prototypes[item as usize].clone()); + s.write().pop_time = n(v, "pop"); + s.write().components.restore_patch(&Patch::new( + v["patch"].as_array().unwrap().iter().map(|v| { + ( + v[0].as_u64().unwrap() as usize, + v[1].as_i64().map(|n| n as i32), + ) + }), + )); + s + } + }) + .collect(); + let equipment = EntityEquipment::new(empty.clone()); + let other = if f["shared_equipment"].as_bool().unwrap() { + equipment.clone() + } else { + EntityEquipment::new(empty.clone()) + }; + let mut inv = [ + Inventory::new(stacks.clone(), equipment), + Inventory::new(stacks.clone(), other), + ]; + let order: [EquipmentSlot; 7] = std::array::from_fn(|i| { + EquipmentSlot::from_inventory_slot( + 36 + f["equipment_order"][i].as_i64().unwrap() as i32, + ) + .unwrap() + }); + for (i, c) in inv.iter_mut().enumerate() { + let initial = &f["inventories"][i]; + c.set_selected(n(initial, "selected")).unwrap(); + c.times_changed = n(initial, "changed"); + for p in initial["slots"].as_array().unwrap() { + c.set( + p[0].as_i64().unwrap() as i32, + refs[p[1].as_u64().unwrap() as usize].clone(), + ) + .unwrap(); + } + if n(initial, "mainhand") >= 0 { + c.equipment().set( + EquipmentSlot::MainHand, + refs[n(initial, "mainhand") as usize].clone(), + ); + } + } + let mut w = Output { + out, + ids: vec![empty.clone()], + }; + w.all(&refs, &inv, &empty); + for op in f["ops"].as_array().unwrap() { + let target = n(op, "inventory") as usize; + let a = n(op, "a") as usize; + let b = n(op, "b") as usize; + let slot = n(op, "slot"); + let amount = n(op, "amount"); + let result = (|| -> Result<(), ()> { + match op["kind"].as_str().unwrap() { + "get" => refs[b] = inv[target].get(slot).map_err(|_| ())?, + "set" => inv[target].set(slot, refs[a].clone()).map_err(|_| ())?, + "remove" => refs[b] = inv[target].remove(slot, amount), + "no-update" => refs[b] = inv[target].remove_no_update(slot).map_err(|_| ())?, + "remove-ref" => inv[target].remove_reference(&refs[a], &order), + "select" => inv[target].set_selected(slot).map_err(|_| ())?, + "selected" => refs[b] = inv[target].selected_item(), + "set-selected" => refs[b] = inv[target].set_selected_item(refs[a].clone()), + "remove-selected" => { + refs[b] = inv[target].remove_selected(op["all"].as_bool().unwrap()) + } + "pick" => inv[target].pick_slot(slot, &Rules).map_err(|_| ())?, + "add-pick" => inv[target].add_and_pick(refs[a].clone(), &Rules), + "clear" => inv[target].clear(), + "changed" => inv[target].changed(), + "replace" => { + let other = n(op, "other") as usize; + if other == target { + inv[target].replace_self(); + } else { + let (first, second) = inv.split_at_mut(1); + if target == 0 { + first[0].replace_with(&second[0]); + } else { + second[0].replace_with(&first[0]); + } + } + } + "equip" => { + refs[b] = inv[target].equipment().set( + EquipmentSlot::ALL[n(op, "equipment") as usize], + refs[a].clone(), + ) + } + "get-equip" => { + refs[b] = inv[target] + .equipment() + .get(EquipmentSlot::ALL[n(op, "equipment") as usize]) + } + "alias" => refs[b] = refs[a].clone(), + "copy" => refs[b] = stacks.copy(&refs[a]), + "count" => refs[a].write().count = amount, + "component" => { + refs[a] + .write() + .components + .set( + n(op, "key") as usize, + op["value"].as_i64().map(|n| n as i32), + ) + .map_err(|_| ())?; + } + _ => panic!("operation"), + } + Ok(()) + })(); + writeln!( + w.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + w.all(&refs, &inv, &empty); + } + out = w.out; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/player_travel_fixture.rs b/crates/horizon-world/examples/player_travel_fixture.rs new file mode 100644 index 000000000..47adeaeb7 --- /dev/null +++ b/crates/horizon-world/examples/player_travel_fixture.rs @@ -0,0 +1,156 @@ +use horizon_core::{geometry::Vec3, position::BlockPos}; +use horizon_world::player_travel::*; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vec(v: &Value) -> Vec3 { + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn fbits(v: f32) -> u32 { + if v.is_nan() { 0x7fc00000 } else { v.to_bits() } +} +fn vector(v: Vec3) -> String { + format!("{:016x} {:016x} {:016x}", bits(v.x), bits(v.y), bits(v.z)) +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + velocity: Vec3, + position: Vec3, + flying: bool, +} +impl World<'_> { + fn flag(&self, k: &str) -> bool { + self.f[k].as_bool().unwrap() + } + fn query(&mut self, s: impl AsRef<str>) -> io::Result<()> { + writeln!(self.out, "{}", s.as_ref())?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected player travel failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.velocity = vec(&self.f["after_velocity"]); + self.position = vec(&self.f["after_position"]); + self.flying = self.flag("after_flying"); + } + Ok(()) + } +} +impl PlayerTravelWorld for World<'_> { + type Error = io::Error; + fn is_passenger(&mut self) -> io::Result<bool> { + self.query("passenger")?; + Ok(self.flag("passenger")) + } + fn is_swimming(&mut self) -> io::Result<bool> { + self.query("swimming")?; + Ok(self.flag("swimming")) + } + fn look_angle(&mut self) -> io::Result<Vec3> { + self.query("look")?; + Ok(vec(&self.f["look"])) + } + fn jumping(&self) -> bool { + self.flag("jumping") + } + fn position(&self) -> Vec3 { + self.position + } + fn fluid_is_empty(&mut self, p: BlockPos) -> io::Result<bool> { + self.query(format!("fluid {} {} {}", p.x, p.y, p.z))?; + Ok(self.flag("empty")) + } + fn velocity(&self) -> Vec3 { + self.velocity + } + fn set_velocity(&mut self, v: Vec3) -> io::Result<()> { + self.query(format!("set {}", vector(v)))?; + self.velocity = v; + Ok(()) + } + fn query_flying_ability(&mut self) -> io::Result<bool> { + self.query("abilities")?; + Ok(self.flying) + } + fn flying_ability(&self) -> bool { + self.flying + } + fn ability_flying_speed(&mut self) -> io::Result<f32> { + self.query("ability-speed")?; + Ok(single(&self.f["speed"])) + } + fn sprinting(&mut self) -> io::Result<bool> { + self.query("sprint")?; + Ok(self.flag("sprint")) + } + fn living_travel(&mut self, input: Vec3) -> io::Result<()> { + // Native parent dispatch is exercised through a controlled fluid branch. + self.query("block-position")?; + self.query("fluid 17 -64 -33")?; + self.query("should-fluid")?; + self.query(format!("base {}", vector(input)))?; + if self.flag("base_mutate") { + self.velocity = vec(&self.f["base_velocity"]); + self.flying = self.flag("base_flying"); + } + Ok(()) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + velocity: vec(&f["velocity"]), + position: vec(&f["position"]), + flying: f["flying"].as_bool().unwrap(), + }; + let result: io::Result<()> = match f["mode"].as_str().unwrap() { + "travel" => travel(&mut w, vec(&f["input"])), + "speed" => flying_speed(&mut w).and_then(|v| writeln!(w.out, "float {:08x}", fbits(v))), + "affected" => { + let b = affected_by_fluids(&w); + writeln!(w.out, "bool {b}") + } + _ => panic!("mode"), + }; + writeln!( + w.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!( + w.out, + "final {} {} {}", + vector(w.velocity), + vector(w.position), + w.flying + )?; + writeln!(w.out, "queries {}", w.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/registered_player_combat_fixture.rs b/crates/horizon-world/examples/registered_player_combat_fixture.rs new file mode 100644 index 000000000..01afec289 --- /dev/null +++ b/crates/horizon-world/examples/registered_player_combat_fixture.rs @@ -0,0 +1,615 @@ +use horizon_world::damage_immunity::{DamageRule, ImmunityTag, ImmunityWorld}; +use horizon_world::damage_source::{ + Catalog as DamageCatalog, DamageSource, EntityKind, SourceWorld, +}; +use horizon_world::living_hurt::{HurtState, HurtTag, HurtWorld}; +use horizon_world::{ + attributes::{ + Modifier, Operation, + entity::{Catalog, EntityAttributes}, + }, + combat_rules::ArmorWorld, + damage_reduction::Bypass, + food::FoodData, + living_damage::DamageStat, + player_health::PlayerFloatIds, + server_player_combat::{CombatEnvironment, ServerPlayerCombat}, + server_player_damage::ServerDamageEnvironment, + synced_floats::{FloatValue, Observer, SyncedFloats}, +}; +use horizon_world::{ + food::Difficulty, + player_hurt::{CausingEntity, PlayerHurtWorld, ServerPlayerHurtWorld}, +}; +use serde_json::Value; +use std::sync::Arc; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +fn state(s: &HurtState<()>) -> String { + format!( + "{} {} {:08x} {} {} {} {}", + s.no_action_time, + s.cooldown, + bits(s.last_hurt), + s.hurt_duration, + s.hurt_time, + s.last_source.is_some(), + s.last_stamp + ) +} +struct Env<'a> { + out: &'a mut dyn Write, + op: &'a Value, + calls: i64, + hit: bool, + recorded: f32, + player: bool, + difficulty_calls: usize, + slots: &'a [Value], + head: u64, + dead: bool, + source: DamageSource<'a, usize>, +} +impl Env<'_> { + fn query(&mut self, event: &str, key: &str) -> io::Result<bool> { + self.event(event)?; + Ok(self.flag(key)) + } + + fn flag(&self, n: &str) -> bool { + self.op[n].as_bool().unwrap() + } + fn event(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.op["fail"].as_i64().unwrap() { + Err(io::Error::other("injected hurt callback failure")) + } else { + Ok(()) + } + } +} +impl HurtWorld for Env<'_> { + type Error = io::Error; + type Source = (); + type UseItem = bool; + type Blocking = (); + type Sound = (); + fn source(&self) {} + fn is_server_player(&self) -> bool { + self.player + } + fn invulnerable(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("invulnerable")?; + Ok(self.flag("invulnerable")) + } + fn fire_resistance(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("fire-resistance")?; + Ok(self.flag("fire_resistance")) + } + fn sleeping(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("sleeping")?; + Ok(self.flag("sleeping")) + } + fn freeze_hurts_extra(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("freeze-extra")?; + Ok(self.flag("freeze_extra")) + } + fn stop_sleeping(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("wake") + } + fn resolve_mob(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("resolve-mob") + } + fn resolve_player(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("resolve-player") + } + fn broadcast_damage(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("broadcast") + } + fn mark_hurt(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("mark") + } + fn secondary_sound(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + if self.source.is_type("minecraft:thorns") { + self.event("level")?; + self.event("thorns-sound")?; + } + Ok(()) + } + fn die(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("die")?; + self.dead = true; + Ok(()) + } + fn hurt_sound(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("hurt-sound") + } + + fn dead_or_dying(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + panic!("combat binding supplies stored health/death predicate") + } + fn tag(&mut self, _: &mut HurtState<()>, tag: HurtTag) -> io::Result<bool> { + Ok(self.source.hurt_tag(tag)) + } + fn use_item(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("use-item")?; + Ok(self.flag("component")) + } + fn apply_blocking(&mut self, _: &mut HurtState<()>, v: f32) -> io::Result<f32> { + self.event(&format!("blocking {:08x}", bits(v)))?; + Ok(single(&self.op["blocked"])) + } + fn helmet_empty(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event(&format!("slot {}", self.head))?; + Ok(!self.flag("helmet")) + } + fn hurt_helmet(&mut self, _: &mut HurtState<()>, v: f32) -> io::Result<()> { + self.event(&format!("hurt-helmet {:08x}", bits(v))) + } + fn actually_hurt(&mut self, _s: &mut HurtState<()>, _v: f32) -> io::Result<()> { + panic!("combat binding supplies actual inner damage") + } + fn blocking_component(&mut self, v: bool) -> Option<()> { + v.then_some(()) + } + fn on_blocked(&mut self, _: &mut HurtState<()>, _: ()) -> io::Result<()> { + Ok(()) + } + fn knockback(&mut self, _: &mut HurtState<()>, v: f32, b: bool) -> io::Result<()> { + self.event(&format!("knockback {:08x} {b}", bits(v))) + } + fn death_protection(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + if !self + .source + .immunity_tag(ImmunityTag::BypassesInvulnerability) + { + self.event("hand 0")?; + self.event("hand 1")?; + } + Ok(false) + } + fn death_sound(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("death-sound") + } + fn make_sound(&mut self, _: &mut HurtState<()>, _: ()) -> io::Result<()> { + self.event("make-sound") + } + fn game_time(&mut self, _: &mut HurtState<()>) -> io::Result<i64> { + self.event("level")?; + self.event("game-time")?; + Ok(self.op["game_time"].as_i64().unwrap()) + } + fn effects_on_hurt(&mut self, _: &mut HurtState<()>, v: f32) -> io::Result<()> { + self.event("effects")?; + for i in 0..self.op["effects"].as_u64().unwrap() { + self.event(&format!("effect {i} {:08x}", bits(v)))?; + } + Ok(()) + } + fn player_hurt_criterion( + &mut self, + _: &mut HurtState<()>, + _: f32, + _: f32, + _: bool, + ) -> io::Result<()> { + self.event("criterion") + } + fn award_blocked(&mut self, _: &mut HurtState<()>, v: i32) -> io::Result<()> { + self.event(&format!("blocked-stat {v}")) + } + fn attacker_criterion( + &mut self, + _: &mut HurtState<()>, + _: f32, + _: f32, + _: bool, + ) -> io::Result<()> { + Ok(()) + } +} +impl PlayerHurtWorld for Env<'_> { + fn ability_invulnerable(&self) -> bool { + self.flag("ability_invulnerable") + } + fn bypasses_invulnerability(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + Ok(self + .source + .immunity_tag(ImmunityTag::BypassesInvulnerability)) + } + fn remove_shoulders(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("shoulders") + } + fn scales_with_difficulty(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + Ok(self.source.scales_with_difficulty(self)) + } + fn difficulty(&mut self, _: &mut HurtState<()>) -> io::Result<Difficulty> { + self.event("difficulty")?; + let v = self.op["difficulties"][self.difficulty_calls] + .as_u64() + .unwrap(); + self.difficulty_calls += 1; + Ok([ + Difficulty::Peaceful, + Difficulty::Easy, + Difficulty::Normal, + Difficulty::Hard, + ][v as usize]) + } +} +impl ServerPlayerHurtWorld for Env<'_> { + type Player = (); + type Arrow = (); + fn causing_entity(&mut self, _: &mut HurtState<()>) -> io::Result<CausingEntity<(), ()>> { + Ok(match self.source.causing_entity() { + Some(2) => CausingEntity::Player(()), + Some(3) => CausingEntity::Arrow(()), + _ => CausingEntity::Other, + }) + } + fn arrow_player_owner(&mut self, _: &mut HurtState<()>, _: ()) -> io::Result<Option<()>> { + self.event("owner")?; + Ok((self.op["owner"] == 1).then_some(())) + } + fn can_harm_player(&mut self, _: &mut HurtState<()>, _: ()) -> io::Result<bool> { + self.event("can-harm")?; + Ok(self.flag("can_harm")) + } +} +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn values(v: Option<&[FloatValue]>) -> String { + match v { + None => "none".into(), + Some([]) => "empty".into(), + Some(v) => v + .iter() + .map(|v| format!("{}:{:08x}", v.id, bits(v.value))) + .collect::<Vec<_>>() + .join(","), + } +} +impl Observer for Env<'_> { + type Error = io::Error; + fn updated(&mut self, data: &mut SyncedFloats, id: u8) -> io::Result<()> { + self.event(&format!( + "updated {id} {:08x} {}", + bits(data.get(id).unwrap()), + data.is_dirty() + ))?; + if self.flag("pack_callback") { + writeln!( + self.out, + "callback-pack {}", + values(data.take_dirty().as_deref()) + )?; + } + Ok(()) + } +} +impl ArmorWorld for Env<'_> { + type Error = io::Error; + type Weapon = (); + type ServerLevel = (); + fn weapon(&mut self) -> io::Result<Option<()>> { + let source = self.source; + source.weapon(self) + } + fn server_level(&mut self) -> io::Result<Option<()>> { + self.event("level")?; + Ok(Some(())) + } + fn modify_armor_effectiveness(&mut self, _: (), _: (), v: f32) -> io::Result<f32> { + Ok(v) + } +} +impl ServerDamageEnvironment for Env<'_> { + type Attacker = (); + fn invulnerable(&mut self) -> io::Result<bool> { + self.event("invulnerable")?; + Ok(self.flag("invulnerable")) + } + fn bypasses(&mut self, b: Bypass) -> io::Result<bool> { + Ok(self.source.bypasses(b)) + } + fn hurt_armor(&mut self, a: &mut EntityAttributes, v: f32) -> io::Result<()> { + self.event(&format!("hurt-armor {:08x}", bits(v)))?; + if self.flag("break_armor") { + let id = a.catalog().id("minecraft:armor").unwrap(); + a.edit(id, |a, o| { + a.set_base_value(number(&self.op["armor_after"]), o) + }) + .unwrap() + .unwrap(); + } + Ok(()) + } + fn has_resistance(&mut self) -> io::Result<bool> { + self.event("has-resistance")?; + Ok(self.flag("resistance")) + } + fn resistance_amplifier(&mut self) -> io::Result<i32> { + self.event("effect")?; + Ok(self.op["amplifier"].as_i64().unwrap() as i32) + } + fn award_resisted(&mut self, v: i32) -> io::Result<()> { + self.event(&format!("stat resisted {v}")) + } + fn attacker(&mut self) -> io::Result<Option<()>> { + panic!("player damage must not query attacker") + } + fn award_dealt_resisted(&mut self, _: i32) -> io::Result<()> { + panic!("player damage must award own resisted stat") + } + fn damage_protection(&mut self, _: ()) -> io::Result<f32> { + for slot in self.slots { + self.event(&format!("slot {}", slot.as_u64().unwrap()))?; + } + Ok(0.0) + } + fn award_self(&mut self, s: DamageStat, v: i32) -> io::Result<()> { + let n = match s { + DamageStat::Absorbed => "absorbed", + DamageStat::Taken => "taken", + DamageStat::DealtAbsorbed => panic!("attacker stat"), + }; + self.event(&format!("stat {n} {v}")) + } + fn award_attacker(&mut self, _: (), _: DamageStat, _: i32) -> io::Result<()> { + panic!("attacker stat") + } + fn source_food_exhaustion(&mut self) -> io::Result<f32> { + Ok(self.source.food_exhaustion()) + } + fn ability_invulnerable(&self) -> bool { + self.flag("ability_invulnerable") + } + fn level_is_client(&mut self) -> io::Result<bool> { + self.event("level")?; + self.event("client")?; + Ok(self.flag("client")) + } + fn record_damage(&mut self, v: f32) -> io::Result<()> { + self.event("tracker")?; + self.event(&format!("record {:08x}", bits(v)))?; + self.recorded = v; + self.hit = true; + Ok(()) + } + fn damage_event(&mut self) -> io::Result<()> { + self.event("damage-event") + } +} +impl CombatEnvironment for Env<'_> { + fn dead_flag(&self) -> bool { + self.dead + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let damage_catalog = DamageCatalog::from_json( + &serde_json::from_str(&fs::read_to_string(dir.join("damage/catalog.json"))?)?, + &serde_json::from_str(&fs::read_to_string(dir.join("damage/tags.json"))?)?, + )?; + let ids: Value = serde_json::from_str(&fs::read_to_string(dir.join("ids.json"))?)?; + let ids = PlayerFloatIds { + health: ids["health"].as_u64().unwrap() as u8, + absorption: ids["absorption"].as_u64().unwrap() as u8, + }; + let slots: Value = serde_json::from_str(&fs::read_to_string(dir.join("slots.json"))?)?; + let head: u64 = serde_json::from_str(&fs::read_to_string(dir.join("head.json"))?)?; + let catalog = Arc::new(Catalog::from_json(&serde_json::from_str( + &fs::read_to_string(dir.join("catalog.json"))?, + )?)?); + let keys = [ + "minecraft:armor", + "minecraft:armor_toughness", + "minecraft:max_health", + "minecraft:max_absorption", + ] + .map(|k| catalog.id(k).unwrap()); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut attributes = catalog.create("minecraft:player").unwrap(); + for (i, key) in keys.iter().enumerate() { + let a = &f["attributes"][i]; + let m = Modifier::new( + "horizon:test", + number(&a["amount"]), + Operation::ALL[a["operation"].as_u64().unwrap() as usize], + )?; + attributes + .edit(*key, |a, o| { + a.set_base_value(number(&f["attributes"][i]["base"]), o)?; + a.add_transient(m, o) + }) + .unwrap() + .unwrap(); + } + let mut data = SyncedFloats::new(&[ + FloatValue { + id: ids.health, + value: single(&f["health"]), + }, + FloatValue { + id: ids.absorption, + value: single(&f["absorption"]), + }, + ])?; + let mut food = FoodData { + exhaustion: single(&f["exhaustion"]), + ..FoodData::default() + }; + let mut recorded = 0.0; + let mut dead = f["dead"].as_bool().unwrap(); + let mut s = HurtState { + no_action_time: f["no_action"].as_i64().unwrap() as i32, + cooldown: f["cooldown"].as_i64().unwrap() as i32, + last_hurt: single(&f["last_hurt"]), + hurt_duration: f["duration"].as_i64().unwrap() as i32, + hurt_time: f["time"].as_i64().unwrap() as i32, + last_source: f["source"].as_bool().unwrap().then_some(()), + last_stamp: f["stamp"].as_i64().unwrap(), + }; + for op in f["ops"].as_array().unwrap() { + if op["reset_cooldown"].as_bool().unwrap_or(false) { + s.cooldown = 0; + } + let entity = |key: &str| { + let id = op[key].as_u64().unwrap() as usize; + (id != 0).then_some(id) + }; + let source = damage_catalog + .source( + damage_catalog + .id(op["source_type"].as_str().unwrap()) + .unwrap(), + entity("direct"), + entity("attacker"), + None, + ) + .unwrap(); + let mut e = Env { + source, + out: &mut out, + op, + calls: 0, + hit: false, + recorded, + player: true, + difficulty_calls: 0, + slots: slots.as_array().unwrap(), + head, + dead, + }; + let result = + ServerPlayerCombat::new(&mut attributes, &mut data, &mut food, ids, &mut e)? + .hurt(&mut s, single(&op["damage"])); + match result { + Ok(v) => writeln!(e.out, "bool {v}\nresult ok")?, + Err(_) => writeln!(e.out, "result error")?, + }; + recorded = e.recorded; + dead = e.dead; + writeln!( + e.out, + "state {} {:08x} {} {}", + state(&s), + bits(recorded), + e.hit, + e.calls + )?; + writeln!( + e.out, + "storage {:08x} {:08x} {:08x} {} {} {} {}", + bits(data.get(ids.health).unwrap()), + bits(data.get(ids.absorption).unwrap()), + bits(food.exhaustion), + data.is_dirty(), + data.item_dirty(ids.health).unwrap(), + data.item_dirty(ids.absorption).unwrap(), + dead + )?; + if e.flag("pack") { + writeln!(e.out, "packed {}", values(data.take_dirty().as_deref()))?; + } + writeln!(e.out, "defaults {}", values(data.non_default().as_deref()))?; + } + } + Ok(()) +} +impl ImmunityWorld for Env<'_> { + type Error = io::Error; + fn removed(&self) -> bool { + self.flag("removed") + } + fn permanently_invulnerable(&mut self) -> io::Result<bool> { + self.query("permanent", "permanent") + } + fn temporarily_invulnerable(&mut self) -> io::Result<bool> { + self.query("temporary", "temporary") + } + fn tag(&mut self, t: ImmunityTag) -> io::Result<bool> { + Ok(self.source.immunity_tag(t)) + } + fn creative_source(&mut self) -> io::Result<bool> { + let source = self.source; + source.creative_player(self) + } + fn fire_immune(&mut self) -> io::Result<bool> { + self.query("fire-immune", "fire_immune") + } + fn fall_immune(&mut self) -> io::Result<bool> { + self.query("fall-immune", "fall_immune") + } + fn enchantment_immunity(&mut self) -> io::Result<bool> { + for s in self.slots { + self.event(&format!("slot {}", s.as_u64().unwrap()))?; + } + Ok(false) + } + fn damage_rule(&mut self, r: DamageRule) -> io::Result<bool> { + let n = match r { + DamageRule::Drowning => "drowning", + DamageRule::Fall => "fall", + DamageRule::Fire => "fire", + DamageRule::Freeze => "freeze", + }; + self.event("rules")?; + self.query(&format!("rule {n}"), &format!("rule_{n}")) + } + fn changing_dimension(&mut self) -> io::Result<bool> { + self.query("changing", "changing") + } + fn ender_pearl(&mut self) -> io::Result<bool> { + Ok(self.source.is_type("minecraft:ender_pearl")) + } + fn client_loaded(&mut self) -> io::Result<bool> { + self.query("loaded", "loaded") + } +} + +impl SourceWorld for Env<'_> { + type Error = io::Error; + type Entity = usize; + type Weapon = (); + fn kind(&self, id: usize) -> EntityKind { + match id { + 1 => EntityKind::Living, + 2 => EntityKind::Player, + _ => EntityKind::Other, + } + } + fn weapon(&mut self, id: usize) -> io::Result<Option<()>> { + self.event(&format!("source-weapon {id}"))?; + Ok(self.flag("weapon").then_some(())) + } + fn position(&mut self, _: usize) -> io::Result<[f64; 3]> { + panic!("controlled knockback must not query source position") + } + fn causing_entity(&mut self, stored: Option<usize>) -> io::Result<Option<usize>> { + Ok(stored) + } + fn instabuild(&mut self, _: usize) -> io::Result<bool> { + self.event("source-abilities")?; + Ok(self.flag("creative")) + } +} diff --git a/crates/horizon-world/examples/registry_collision_scan_fixture.rs b/crates/horizon-world/examples/registry_collision_scan_fixture.rs new file mode 100644 index 000000000..9e3a19914 --- /dev/null +++ b/crates/horizon-world/examples/registry_collision_scan_fixture.rs @@ -0,0 +1,654 @@ +//! Integrated registry/cursor differential transport using resident TerrainChunk storage. +use horizon_core::{ + geometry::{Aabb, Axis, Vec3, VoxelShape}, + position::{BlockPos, ChunkPos}, +}; +use horizon_world::{ + block_collision::{BlockCollisionRegistry, DynamicCollisionWorld, ShulkerCollisionState}, + block_collision_scan::{BlockCollisionScan, BlockCollisionWorld, CollisionScanError}, + collision::CachedCollisionRegistry, + collision_context::CollisionContext, + dynamic_support::DynamicSupportWorld, + edge_backoff::{EdgeBackoffInput, EdgeBackoffWorld, back_off_from_edge}, + entity_obstruction::EntityIdentity, + fluid::FluidState, + fluid_occupancy::{FluidOccupancyWorld, FluidPresence}, + free_space::offset_is_free, + heightmap::HeightmapState, + liquid_collision::LiquidCollisionWorld, + nbt::{self, Limits}, + powder_snow_collision::{PowderSnowEntity, PowderSnowWorld}, + registry::{BlockRegistry, BlockStateId}, + registry_collision_scan::{CollisionChunks, RegistryCollisionWorld}, + suffocation::{SuffocationDefinition, SuffocationRegistry}, + world_movement::{ + CollisionCheckRequest, EntityMovementWorld, MovementRequest, no_world_collision, + resolve_world_movement, + }, + worldgen::{ + tags::TagDefinitions, + terrain::{TerrainBlockStates, TerrainChunk}, + }, +}; +use serde_json::Value; +use std::{ + cell::RefCell, + collections::{BTreeMap, BTreeSet}, + fs, + io::{self, Write}, + path::Path, + rc::Rc, + sync::Arc, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn values( + out: &mut impl Write, + label: &str, + values: impl IntoIterator<Item = f64>, +) -> io::Result<()> { + write!(out, "{label}")?; + for v in values { + let bits = if v.is_nan() { + 0x7ff8_0000_0000_0000 + } else { + v.to_bits() + }; + write!(out, " {bits:016x}")?; + } + writeln!(out) +} +fn box_values(out: &mut impl Write, label: &str, b: Aabb) -> io::Result<()> { + values( + out, + label, + [ + b.min(Axis::X), + b.min(Axis::Y), + b.min(Axis::Z), + b.max(Axis::X), + b.max(Axis::Y), + b.max(Axis::Z), + ], + ) +} +fn emit(out: &mut impl Write, shape: &VoxelShape) -> io::Result<()> { + writeln!( + out, + "shape {} {} {}", + shape.is_empty(), + shape.boxes().len(), + shape.is_cube() + )?; + for (axis, name) in Axis::ALL.into_iter().zip(["x", "y", "z"]) { + values(out, name, shape.coordinates(axis).iter().copied())?; + } + let axes = shape.cube_coordinate_axes(); + writeln!( + out, + "axes {}", + u8::from(axes[0]) + 2 * u8::from(axes[1]) + 4 * u8::from(axes[2]) + )?; + values( + out, + "extrema", + Axis::ALL + .map(|a| shape.min(a)) + .into_iter() + .chain(Axis::ALL.map(|a| shape.max(a))), + )?; + match shape.bounds() { + Some(b) => box_values(out, "bounds", b)?, + None => writeln!(out, "bounds none")?, + } + for b in shape.boxes() { + box_values(out, "box", *b)?; + } + Ok(()) +} +struct Trace { + out: io::BufWriter<fs::File>, + calls: i32, + fail: i32, +} +impl Trace { + fn query(&mut self, text: String) -> io::Result<()> { + writeln!(self.out, "{text}")?; + let call = self.calls; + self.calls += 1; + if call == self.fail { + Err(io::Error::other("injected resident world failure")) + } else { + Ok(()) + } + } +} +type SharedTrace = Rc<RefCell<Trace>>; +struct Entities { + mode: u64, + scope: &'static str, + trace: SharedTrace, +} +impl Entities { + fn query(&mut self, p: [i32; 3]) -> io::Result<()> { + self.trace + .borrow_mut() + .query(format!("entity {} {} {} {}", self.scope, p[0], p[1], p[2])) + } +} +impl DynamicSupportWorld for Entities { + type Error = io::Error; + fn shulker_is_closed(&mut self, p: [i32; 3]) -> io::Result<Option<bool>> { + self.query(p)?; + Ok(if self.mode == 0 { + None + } else { + Some(self.mode == 1) + }) + } + fn moving_piston_shape(&mut self, p: [i32; 3]) -> io::Result<Option<VoxelShape>> { + self.query(p)?; + Ok(None) + } +} +impl DynamicCollisionWorld for Entities { + fn shulker_collision_state( + &mut self, + p: [i32; 3], + ) -> io::Result<Option<ShulkerCollisionState>> { + self.query(p)?; + let progress = if self.mode == 1 { 0.0 } else { 0.5 }; + Ok((self.mode != 0).then_some(ShulkerCollisionState { + previous_progress: progress, + progress, + })) + } +} +#[derive(Clone, Copy)] +struct Air(bool); +impl HeightmapState for Air { + fn is_air(self) -> bool { + self.0 + } + fn is_air_block(self) -> bool { + self.0 + } + fn has_fluid(self) -> bool { + false + } + fn blocks_motion_in_heightmap(self) -> bool { + false + } + fn blocks_motion_in_heightmap_no_leaves(self) -> bool { + false + } +} +#[derive(Clone)] +struct Properties(Arc<Vec<bool>>); +impl TerrainBlockStates for Properties { + type State = Air; + fn heightmap_state(&self, id: BlockStateId) -> Air { + Air(self.0[id.0 as usize]) + } +} +struct MovementShapes { + entities: Vec<VoxelShape>, + border: Option<VoxelShape>, +} +struct World<'r> { + movement: Option<MovementShapes>, + chunks: BTreeMap<(i32, i32), (TerrainChunk<'r, Properties>, Entities)>, + global: Entities, + trace: SharedTrace, +} +fn query_bounds(trace: &SharedTrace, label: &str, b: Aabb) -> io::Result<()> { + let text = format!( + "{label} {:016x} {:016x} {:016x} {:016x} {:016x} {:016x}", + b.min(Axis::X).to_bits(), + b.min(Axis::Y).to_bits(), + b.min(Axis::Z).to_bits(), + b.max(Axis::X).to_bits(), + b.max(Axis::Y).to_bits(), + b.max(Axis::Z).to_bits() + ); + trace.borrow_mut().query(text) +} +fn box_shape(v: &Value) -> io::Result<VoxelShape> { + VoxelShape::from_box(Aabb::new( + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])), + Vec3::new(number(&v[3]), number(&v[4]), number(&v[5])), + )) + .map_err(io::Error::other) +} +impl FluidOccupancyWorld for World<'_> { + type Error = io::Error; + type Chunk = (i32, i32); + fn minimum_section_y(&mut self) -> io::Result<i32> { + self.trace.borrow_mut().query("liquid-min-section".into())?; + Ok(-1) + } + fn maximum_section_y(&mut self) -> io::Result<i32> { + self.trace.borrow_mut().query("liquid-max-section".into())?; + Ok(1) + } + fn chunk(&mut self, x: i32, z: i32) -> io::Result<Self::Chunk> { + self.trace + .borrow_mut() + .query(format!("liquid-chunk {x} {z}"))?; + if self.chunks.contains_key(&(x, z)) { + Ok((x, z)) + } else { + Err(io::Error::other("missing required liquid chunk")) + } + } + fn section( + &mut self, + chunk: Self::Chunk, + y: i32, + ) -> io::Result<&horizon_world::chunk::BlockSection<'_>> { + self.trace + .borrow_mut() + .query(format!("liquid-section {y}"))?; + self.chunks[&chunk] + .0 + .section((y + 1) as usize) + .ok_or_else(|| io::Error::other("missing section")) + } + fn minimum_y(&mut self) -> io::Result<i32> { + self.trace.borrow_mut().query("liquid-min-y".into())?; + Ok(-16) + } + fn maximum_y(&mut self) -> io::Result<i32> { + self.trace.borrow_mut().query("liquid-max-y".into())?; + Ok(31) + } +} +impl EntityMovementWorld for World<'_> { + type Error = io::Error; + fn entity_collisions( + &mut self, + _: EntityIdentity, + bounds: Aabb, + ) -> io::Result<Vec<VoxelShape>> { + query_bounds(&self.trace, "entities", bounds)?; + Ok(self.movement.as_ref().unwrap().entities.clone()) + } + fn movement_border( + &mut self, + _: EntityIdentity, + bounds: Aabb, + ) -> io::Result<Option<VoxelShape>> { + self.trace.borrow_mut().query("border".to_owned())?; + query_bounds(&self.trace, "border-test", bounds)?; + let border = &self.movement.as_ref().unwrap().border; + if border.is_some() { + self.trace.borrow_mut().query("border-shape".to_owned())?; + } + Ok(border.clone()) + } +} +struct EdgeWorld<'w, 'c, W> { + world: &'w mut W, + context: CollisionContext<'c>, + step: f32, + grounded: bool, + staying: bool, +} +impl<W, E> EdgeBackoffWorld for EdgeWorld<'_, '_, W> +where + W: BlockCollisionWorld<Error = E> + EntityMovementWorld<Error = E>, +{ + type Error = CollisionScanError<E>; + fn max_up_step(&mut self) -> Result<f32, Self::Error> { + Ok(self.step) + } + fn staying_on_ground_surface(&mut self) -> Result<bool, Self::Error> { + Ok(self.staying) + } + fn on_ground(&mut self) -> Result<bool, Self::Error> { + Ok(self.grounded) + } + fn no_collision(&mut self, bounds: Aabb) -> Result<bool, Self::Error> { + no_world_collision( + self.world, + CollisionCheckRequest { + entity: EntityIdentity(1), + context: self.context, + bounds, + candidate_budget: 1_000_000, + }, + ) + } +} +impl DynamicSupportWorld for World<'_> { + type Error = io::Error; + fn shulker_is_closed(&mut self, p: [i32; 3]) -> io::Result<Option<bool>> { + self.global.shulker_is_closed(p) + } + fn moving_piston_shape(&mut self, p: [i32; 3]) -> io::Result<Option<VoxelShape>> { + self.global.moving_piston_shape(p) + } +} +impl DynamicCollisionWorld for World<'_> { + fn shulker_collision_state( + &mut self, + p: [i32; 3], + ) -> io::Result<Option<ShulkerCollisionState>> { + self.global.shulker_collision_state(p) + } +} +impl LiquidCollisionWorld for World<'_> { + type Error = io::Error; + fn entity_liquid_shape(&mut self, _: EntityIdentity) -> io::Result<VoxelShape> { + panic!("unexpected entity query") + } + fn fluid(&mut self, _: BlockPos) -> io::Result<FluidState> { + panic!("unexpected fluid query") + } + fn entity_can_stand(&mut self, _: EntityIdentity, _: FluidState) -> io::Result<bool> { + panic!("unexpected entity query") + } +} +impl PowderSnowWorld for World<'_> { + type Error = io::Error; + fn powder_snow_entity(&mut self, _: EntityIdentity) -> io::Result<PowderSnowEntity> { + panic!("unexpected entity query") + } + fn powder_snow_walkable_tag(&mut self, _: EntityIdentity) -> io::Result<bool> { + panic!("unexpected entity query") + } + fn feet_are_leather_boots(&mut self, _: EntityIdentity) -> io::Result<bool> { + panic!("unexpected entity query") + } +} +impl CollisionChunks for World<'_> { + type Chunk = ChunkPos; + type ChunkWorld = Entities; + fn collision_chunk(&mut self, p: ChunkPos) -> io::Result<Option<ChunkPos>> { + self.trace + .borrow_mut() + .query(format!("chunk {} {}", p.x, p.z))?; + Ok(self.chunks.contains_key(&(p.x, p.z)).then_some(p)) + } + fn block_state(&mut self, chunk: ChunkPos, p: BlockPos) -> io::Result<BlockStateId> { + assert_eq!(chunk, p.chunk()); + self.trace + .borrow_mut() + .query(format!("block {} {} {}", p.x, p.y, p.z))?; + Ok(self.chunks[&(chunk.x, chunk.z)].0.block(p.x, p.y, p.z)) + } + fn chunk_world(&mut self, p: ChunkPos) -> &mut Entities { + &mut self.chunks.get_mut(&(p.x, p.z)).unwrap().1 + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let read = |name| -> Result<_, Box<dyn std::error::Error>> { + Ok( + nbt::read_named(&fs::read(dir.join(name))?, Limits::default())? + .0 + .tag, + ) + }; + let registry = BlockRegistry::from_nbt(&read("block-registry.nbt")?)?; + let cached = Arc::new(CachedCollisionRegistry::from_nbt( + &read("cached-collision.nbt")?, + ®istry, + )?); + let collisions = Arc::new(BlockCollisionRegistry::new(cached)?); + let definitions: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("definitions.json"))?)?; + let definitions = definitions + .into_iter() + .map(|(name, kind)| { + Ok(( + name, + match kind.as_str() { + "tagged_full" => SuffocationDefinition::TaggedFullCollision, + "always" => SuffocationDefinition::Always, + "never" => SuffocationDefinition::Never, + "not_extended" => SuffocationDefinition::NotExtendedPiston, + "closed_shulker" => SuffocationDefinition::ClosedShulker, + _ => return Err(io::Error::other("unknown suffocation rule")), + }, + )) + }) + .collect::<io::Result<BTreeMap<_, _>>>()?; + let resources: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?; + let mut tags = TagDefinitions::default(); + for (name, json) in resources { + tags.apply_json(&name, "vanilla", &json)?; + } + let built = tags.build(|name, _| registry.default_state(name).map(|_| name.to_owned()))?; + if !built.missing.is_empty() { + return Err("unresolved native block tags".into()); + } + let natural = built + .tags + .get("minecraft:causes_suffocation") + .ok_or("missing suffocation tag")? + .iter() + .cloned() + .collect::<BTreeSet<_>>(); + let binding = SuffocationRegistry::new(collisions, &definitions, &natural)?; + let fluids = FluidPresence::new(®istry)?; + let properties = Properties(Arc::new( + (0..registry.len()) + .map(|id| { + matches!( + registry + .state(BlockStateId(id as u32)) + .unwrap() + .name + .as_str(), + "minecraft:air" | "minecraft:cave_air" | "minecraft:void_air" + ) + }) + .collect(), + )); + let trace = Rc::new(RefCell::new(Trace { + out: io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?), + calls: 0, + fail: -1, + })); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + { + let mut t = trace.borrow_mut(); + t.calls = 0; + t.fail = f["fail"].as_i64().unwrap() as i32; + } + let mut chunks = BTreeMap::new(); + for c in f["chunks"].as_array().unwrap() { + let x = c[0].as_i64().unwrap() as i32; + let z = c[1].as_i64().unwrap() as i32; + chunks.insert( + (x, z), + ( + TerrainChunk::new(ChunkPos::new(x, z), -16, 48, ®istry, properties.clone())?, + Entities { + mode: f["entities"][1].as_u64().unwrap(), + scope: "chunk", + trace: trace.clone(), + }, + ), + ); + } + for b in f["blocks"].as_array().unwrap() { + let x = b[0].as_i64().unwrap() as i32; + let y = b[1].as_i64().unwrap() as i32; + let z = b[2].as_i64().unwrap() as i32; + chunks + .get_mut(&(x >> 4, z >> 4)) + .unwrap() + .0 + .set_block_worldgen(x, y, z, BlockStateId(b[3].as_u64().unwrap() as u32))?; + } + let movement = f + .get("movement") + .map(|m| -> io::Result<_> { + Ok(MovementShapes { + entities: m["entities"] + .as_array() + .unwrap() + .iter() + .map(box_shape) + .collect::<io::Result<_>>()?, + border: if m["border"].is_null() { + None + } else { + Some(box_shape(&m["border"])?) + }, + }) + }) + .transpose()?; + let mut world = World { + movement, + chunks, + global: Entities { + mode: f["entities"][0].as_u64().unwrap(), + scope: "global", + trace: trace.clone(), + }, + trace: trace.clone(), + }; + let mut bound = RegistryCollisionWorld::new(&binding, &mut world)?; + let context = match f["context"].as_u64().unwrap() { + 0 => CollisionContext::empty(false), + 1 => CollisionContext::empty(true), + 2 => CollisionContext::position(number(&f["y"])), + _ => CollisionContext::placement(None), + }; + let v = &f["box"]; + let bounds = Aabb::new( + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])), + Vec3::new(number(&v[3]), number(&v[4]), number(&v[5])), + ); + if let Some(m) = f.get("movement") { + let v = &m["delta"]; + if let Some(edge) = m.get("edge") { + let mut world = EdgeWorld { + world: &mut bound, + context, + step: number(&m["step"]) as f32, + grounded: m["grounded"].as_bool().unwrap(), + staying: edge["staying"].as_bool().unwrap(), + }; + let result = back_off_from_edge( + &mut world, + EdgeBackoffInput { + movement: Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])), + bounds, + flying: edge["flying"].as_bool().unwrap(), + self_or_player: matches!( + edge["mover"].as_str().unwrap(), + "SELF" | "PLAYER" + ), + fall_distance: number(&edge["fall"]), + query_budget: 10000, + }, + ); + let mut t = trace.borrow_mut(); + match result { + Ok(v) => values(&mut t.out, "edge", [v.x, v.y, v.z])?, + Err(_) => writeln!(t.out, "error")?, + }; + let calls = t.calls; + writeln!(t.out, "done edge {calls}")?; + continue; + } + if m.get("free").and_then(Value::as_bool) == Some(true) { + let result = offset_is_free( + &mut bound, + &fluids, + CollisionCheckRequest { + entity: EntityIdentity(1), + context, + bounds, + candidate_budget: 1_000_000, + }, + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])), + 1_000_000, + ); + let mut t = trace.borrow_mut(); + match result { + Ok(b) => writeln!(t.out, "free {b}")?, + Err(_) => writeln!(t.out, "error")?, + }; + let calls = t.calls; + writeln!(t.out, "done free {calls}")?; + continue; + } + if m.get("check").and_then(Value::as_bool) == Some(true) { + let result = no_world_collision( + &mut bound, + CollisionCheckRequest { + entity: EntityIdentity(1), + context, + bounds, + candidate_budget: 1_000_000, + }, + ); + let mut t = trace.borrow_mut(); + match result { + Ok(value) => writeln!(t.out, "clear {value}")?, + Err(_) => writeln!(t.out, "error")?, + }; + let calls = t.calls; + writeln!(t.out, "done check {calls}")?; + continue; + } + let result = resolve_world_movement( + &mut bound, + MovementRequest { + entity: EntityIdentity(1), + context, + bounds, + movement: Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])), + max_step: number(&m["step"]) as f32, + on_ground: m["grounded"].as_bool().unwrap(), + candidate_budget: 1_000_000, + }, + ); + let mut t = trace.borrow_mut(); + match result { + Ok(v) => values(&mut t.out, "movement", [v.x, v.y, v.z])?, + Err(_) => writeln!(t.out, "error")?, + } + let calls = t.calls; + writeln!(t.out, "done movement {calls}")?; + continue; + } + let mut scan = BlockCollisionScan::new( + &mut bound, + context, + bounds, + f["suffocating"].as_bool().unwrap(), + 1_000_000, + )?; + let mut hits = 0; + for _ in 0..f["limit"].as_u64().unwrap() { + match scan.next() { + None => break, + Some(Ok(hit)) => { + let mut t = trace.borrow_mut(); + let p = hit.position; + writeln!(t.out, "hit {} {} {}", p.x, p.y, p.z)?; + emit(&mut t.out, &hit.shape)?; + hits += 1; + } + Some(Err(_)) => { + writeln!(trace.borrow_mut().out, "error")?; + break; + } + } + } + let mut t = trace.borrow_mut(); + let calls = t.calls; + writeln!(t.out, "done {hits} {calls}")?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/registry_fall_ray_fixture.rs b/crates/horizon-world/examples/registry_fall_ray_fixture.rs new file mode 100644 index 000000000..3f2ebce75 --- /dev/null +++ b/crates/horizon-world/examples/registry_fall_ray_fixture.rs @@ -0,0 +1,199 @@ +use horizon_core::{geometry::Vec3, position::BlockPos}; +use horizon_world::{ + entity_obstruction::EntityIdentity, + fluid::{FluidKind, FluidState}, + fluid_shape::FluidShapeCache, + interaction_shapes::InteractionShapes, + nbt::{self, Limits, Tag}, + registry::{BlockRegistry, BlockStateId}, + registry_fall_ray::{FallRayRegistry, FallRayWorld, fall_reset_ray}, +}; +use serde_json::Value; +use std::{ + collections::BTreeSet, + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vector(v: &Value) -> Vec3 { + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn pos(p: BlockPos) -> String { + format!("{} {} {}", p.x, p.y, p.z) +} +struct World<'a, 's, 'r> { + f: &'a Value, + op: &'a Value, + out: &'a mut dyn Write, + calls: i64, + p: BlockPos, + registry: &'a FallRayRegistry<'s, 'r>, +} +impl World<'_, '_, '_> { + fn flag(&self, n: &str) -> bool { + self.f[n].as_bool().unwrap() + } + fn query(&mut self, s: String) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let call = self.calls; + self.calls += 1; + if call == self.op["fail"].as_i64().unwrap() { + Err(io::Error::other("injected registered ray failure")) + } else { + Ok(()) + } + } + fn at(&self, p: BlockPos) -> BlockStateId { + BlockStateId(if p == self.p { + self.f["state"].as_u64().unwrap() as u32 + } else if p == self.p.offset(0, 1, 0) { + self.op["above"].as_u64().unwrap() as u32 + } else { + 0 + }) + } +} +impl FallRayWorld for World<'_, '_, '_> { + type Error = io::Error; + fn block_state(&mut self, p: BlockPos) -> io::Result<BlockStateId> { + self.query(format!("block {}", pos(p)))?; + Ok(self.at(p)) + } + fn fluid_state(&mut self, p: BlockPos) -> io::Result<FluidState> { + self.query(format!("fluid {}", pos(p)))?; + self.registry.fluid_for_block(self.at(p)) + } + fn is_server_level(&self) -> bool { + self.flag("server") + } + fn entity_is_player(&mut self, _: EntityIdentity) -> io::Result<bool> { + self.query("player".into())?; + Ok(self.flag("player")) + } + fn players_nether_portal_delay(&mut self) -> io::Result<i32> { + self.query("rules".into())?; + self.query("portal-delay".into())?; + Ok(self.f["delay"].as_i64().unwrap() as i32) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + let read = |n: &str| -> Result<Tag, Box<dyn std::error::Error>> { + Ok(nbt::read_named(&fs::read(dir.join(n))?, Limits::default())? + .0 + .tag) + }; + let registry = BlockRegistry::from_nbt(&read("block-registry.nbt")?)?; + let interactions = InteractionShapes::from_nbt(&read("interaction-shapes.nbt")?, ®istry)?; + let tags: Value = serde_json::from_str(&fs::read_to_string(dir.join("bound-tags.json"))?)?; + let names = |n: &str| -> BTreeSet<String> { + tags[n] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_str().unwrap().to_owned()) + .collect() + }; + let all = (0..registry.len()) + .map(|i| registry.state(BlockStateId(i as u32)).unwrap().name.clone()) + .collect(); + let blocks = [names("reset"), BTreeSet::new(), all]; + let fluids = [ + names("water"), + BTreeSet::new(), + FluidKind::ALL + .into_iter() + .map(|f| f.name().to_owned()) + .collect(), + ]; + let mut bindings = Vec::new(); + for b in &blocks { + for f in &fluids { + bindings.push(FallRayRegistry::new(&interactions, b, f)?); + } + } + assert!( + FallRayRegistry::new( + &interactions, + &BTreeSet::from(["minecraft:missing".into()]), + &fluids[0] + ) + .is_err() + ); + assert!( + FallRayRegistry::new( + &interactions, + &blocks[0], + &BTreeSet::from(["minecraft:missing".into()]) + ) + .is_err() + ); + assert!( + bindings[0] + .fluid_for_block(BlockStateId(registry.len() as u32)) + .is_err() + ); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let p = &f["position"]; + let p = BlockPos::new( + p[0].as_i64().unwrap() as i32, + p[1].as_i64().unwrap() as i32, + p[2].as_i64().unwrap() as i32, + ); + let binding = &bindings + [(f["block_tags"].as_u64().unwrap() * 3 + f["fluid_tags"].as_u64().unwrap()) as usize]; + let entity = f["entity"].as_bool().unwrap().then_some(EntityIdentity(0)); + let mut cache = FluidShapeCache::default(); + for op in f["ops"].as_array().unwrap() { + let mut w = World { + f: &f, + op, + out: &mut out, + calls: 0, + p, + registry: binding, + }; + match fall_reset_ray( + &mut w, + binding, + &mut cache, + entity, + vector(&op["from"]), + vector(&op["to"]), + 10000, + ) { + Ok(r) => { + let h = r.hit; + writeln!( + w.out, + "hit {} {:016x} {:016x} {:016x} {} {} {}", + r.miss, + bits(h.location.x), + bits(h.location.y), + bits(h.location.z), + format!("{:?}", h.direction).to_lowercase(), + pos(h.block), + h.inside + )?; + } + Err(_) => writeln!(w.out, "error")?, + } + writeln!(w.out, "cached {}", cache.cached_states())?; + writeln!(w.out, "queries {}", w.calls)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/registry_fluid_fixture.rs b/crates/horizon-world/examples/registry_fluid_fixture.rs new file mode 100644 index 000000000..de6e111a6 --- /dev/null +++ b/crates/horizon-world/examples/registry_fluid_fixture.rs @@ -0,0 +1,172 @@ +use horizon_core::{ + geometry::{Direction, VoxelShape}, + position::BlockPos, +}; +use horizon_world::{ + block_support::BlockSupportRegistry, + dynamic_support::DynamicSupportWorld, + fluid_flow, + nbt::{self, Limits}, + registry::{BlockRegistry, BlockStateId}, + registry_fluid::{FluidBlockWorld, FluidRegistry, RegistryFluidWorld}, +}; +use serde_json::Value; +use std::{ + collections::BTreeSet, + fs, + io::{self, Write}, + path::Path, +}; +fn pos(p: BlockPos) -> String { + format!("{} {} {}", p.x, p.y, p.z) +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, +} +impl World<'_> { + fn query(&mut self, s: String) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + Err(io::Error::other("injected registered fluid query failure")) + } else { + Ok(()) + } + } + fn cell(&self, p: BlockPos) -> BlockStateId { + BlockStateId( + self.f["cells"] + .get(pos(p)) + .unwrap_or(&self.f["default"]) + .as_u64() + .unwrap() as u32, + ) + } +} +impl FluidBlockWorld for World<'_> { + fn block_state(&mut self, p: BlockPos) -> io::Result<BlockStateId> { + self.query(format!("block {}", pos(p)))?; + Ok(self.cell(p)) + } + fn fluid_block_state(&mut self, p: BlockPos) -> io::Result<BlockStateId> { + self.query(format!("fluid {}", pos(p)))?; + Ok(self.cell(p)) + } +} +impl DynamicSupportWorld for World<'_> { + type Error = io::Error; + fn shulker_is_closed(&mut self, p: [i32; 3]) -> io::Result<Option<bool>> { + self.query(format!("entity {} {} {}", p[0], p[1], p[2]))?; + Ok(None) + } + fn moving_piston_shape(&mut self, p: [i32; 3]) -> io::Result<Option<VoxelShape>> { + self.query(format!("entity {} {} {}", p[0], p[1], p[2]))?; + Ok(None) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + let load = |n: &str| -> Result<_, Box<dyn std::error::Error>> { + Ok(nbt::read_named(&fs::read(dir.join(n))?, Limits::default())? + .0 + .tag) + }; + let registry = BlockRegistry::from_nbt(&load("block-registry.nbt")?)?; + let support = BlockSupportRegistry::from_nbt(&load("cached-support.nbt")?, ®istry)?; + let info: Value = serde_json::from_slice(&fs::read(dir.join("fluid-info.json"))?)?; + let names = |v: &Value| -> BTreeSet<String> { + v.as_array() + .unwrap() + .iter() + .map(|v| v.as_str().unwrap().to_owned()) + .collect() + }; + let natural = names(&info["blocks_flow"]); + let ice = names(&info["ice"]); + let all = (0..registry.len()) + .map(|i| registry.state(BlockStateId(i as u32)).unwrap().name.clone()) + .collect(); + let bindings = [ + FluidRegistry::new(®istry, &natural, &ice)?, + FluidRegistry::new(®istry, &BTreeSet::new(), &ice)?, + FluidRegistry::new(®istry, &all, &ice)?, + ]; + assert!(bindings[0].fluid(BlockStateId(u32::MAX)).is_err()); + assert!( + FluidRegistry::new( + ®istry, + &BTreeSet::from(["horizon:absent".to_owned()]), + &ice + ) + .is_err() + ); + let foreign = BlockRegistry::from_nbt(&load("block-registry.nbt")?)?; + let foreign_binding = FluidRegistry::new(&foreign, &natural, &ice)?; + let dummy = serde_json::json!({"fail":-1,"cells":{},"default":u32::MAX}); + let mut sink = io::sink(); + let mut probe = World { + f: &dummy, + out: &mut sink, + calls: 0, + }; + assert!(RegistryFluidWorld::new(&foreign_binding, &support, &mut probe).is_err()); + let mut bound = RegistryFluidWorld::new(&bindings[0], &support, &mut probe)?; + assert!(matches!( + horizon_world::fluid_flow::FluidFlowWorld::fluid(&mut bound, BlockPos::new(0, 0, 0)), + Err(horizon_world::registry_fluid::FluidQueryError::Data(_)) + )); + assert!(matches!( + horizon_world::fluid_flow::FluidFlowWorld::block(&mut bound, BlockPos::new(0, 0, 0)), + Err(horizon_world::registry_fluid::FluidQueryError::Data(_)) + )); + assert_eq!(probe.calls, 2); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let bindings = &bindings[f["tag"].as_u64().unwrap() as usize]; + let mut world = World { + f: &f, + out: &mut out, + calls: 0, + }; + let a = &f["position"]; + let p = BlockPos::new( + a[0].as_i64().unwrap() as i32, + a[1].as_i64().unwrap() as i32, + a[2].as_i64().unwrap() as i32, + ); + let root = bindings.fluid(BlockStateId(f["root"].as_u64().unwrap() as u32))?; + let mut w = RegistryFluidWorld::new(bindings, &support, &mut world)?; + let result = match f["mode"].as_str().unwrap() { + "flow" => fluid_flow::flow_at(&mut w, root, p).map(|v| { + format!( + "flow {:016x} {:016x} {:016x}", + v.x.to_bits(), + v.y.to_bits(), + v.z.to_bits() + ) + }), + "face" => fluid_flow::solid_face( + &mut w, + root.kind(), + p, + Direction::ALL[f["direction"].as_u64().unwrap() as usize], + ) + .map(|v| format!("face {v}")), + "height" => root + .height_at(&mut w, [p.x, p.y, p.z]) + .map(|v| format!("height {:08x}", v.to_bits())), + "camera" => root + .camera_height_at(&mut w, [p.x, p.y, p.z]) + .map(|v| format!("height {:08x}", v.to_bits())), + _ => panic!("fixture mode"), + }; + writeln!(world.out, "{}", result.unwrap_or_else(|_| "error".into()))?; + writeln!(world.out, "queries {}", world.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/replace_block_fixture.rs b/crates/horizon-world/examples/replace_block_fixture.rs new file mode 100644 index 000000000..7a8d00363 --- /dev/null +++ b/crates/horizon-world/examples/replace_block_fixture.rs @@ -0,0 +1,204 @@ +//! Feature world transport retaining ordered mutations and partial failures. +use horizon_core::random::{LegacyRandom, RandomSource, XoroshiroRandom}; +use horizon_world::{ + DATA_VERSION, + heightmap::HeightmapType, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, + worldgen::{ + anchor::WorldGenerationContext, + block_feature::{FeatureBlockBindings, ReplaceBlockFeature}, + feature::FeatureWorld, + placement::{PlacementContext, PlacementQueryError}, + tags::TagDefinitions, + }, +}; +use serde_json::Value; +use std::{ + collections::BTreeMap, + fs, + io::{self, Write}, + path::Path, +}; +struct World<'a, W> { + states: BTreeMap<[i32; 3], BlockStateId>, + blocks: Vec<BlockStateId>, + minimum: i32, + calls: i32, + fail: i32, + reject: i32, + out: &'a mut W, +} +impl<W: Write> PlacementContext for World<'_, W> { + fn generation(&self) -> WorldGenerationContext { + WorldGenerationContext::new(self.minimum, 384, 63) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + writeln!(self.out, "min").map_err(|e| PlacementQueryError::Failed(e.to_string()))?; + let call = self.calls; + self.calls += 1; + if call == self.fail { + return Err(PlacementQueryError::Failed("minimum query failure".into())); + } + writeln!(self.out, "minimum {}", self.minimum) + .map_err(|e| PlacementQueryError::Failed(e.to_string()))?; + Ok(self.minimum) + } + fn height(&mut self, _: HeightmapType, _: i32, _: i32) -> Result<i32, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } +} +impl<W: Write> FeatureWorld for World<'_, W> { + type Error = io::Error; + fn block(&mut self, p: [i32; 3]) -> Result<BlockStateId, Self::Error> { + let call = self.calls; + self.calls += 1; + writeln!(self.out, "get {} {} {}", p[0], p[1], p[2])?; + if call == self.fail { + return Err(io::Error::other("world failure")); + } + let hash = p[0] + .wrapping_mul(31) + .wrapping_add(p[1].wrapping_mul(7)) + .wrapping_add(p[2].wrapping_mul(17)) + .rem_euclid(7) as usize; + let state = self.states.get(&p).copied().unwrap_or(self.blocks[hash]); + writeln!(self.out, "state {}", state.0)?; + Ok(state) + } + fn set_block( + &mut self, + p: [i32; 3], + state: BlockStateId, + flags: i32, + ) -> Result<bool, Self::Error> { + let call = self.calls; + self.calls += 1; + writeln!( + self.out, + "set {} {} {} {} {flags}", + p[0], p[1], p[2], state.0 + )?; + if call == self.fail { + return Err(io::Error::other("world failure")); + } + let result = self.reject == 0 || call % self.reject != 0; + if result { + self.states.insert(p, state); + } + writeln!(self.out, "written {result}")?; + Ok(result) + } +} +fn fixture( + f: &Value, + mut random: impl RandomSource, + blocks: &[BlockStateId], + bindings: &FeatureBlockBindings<'_>, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let decoded = ReplaceBlockFeature::from_json(f["definition"].as_str().unwrap(), bindings); + match decoded { + Err(_) => writeln!(out, "decode error")?, + Ok(feature) => { + writeln!(out, "decode ok")?; + let mut world = World { + states: BTreeMap::new(), + blocks: blocks.to_vec(), + minimum: f["world_min"].as_i64().unwrap() as i32, + calls: 0, + fail: f["fail"].as_i64().unwrap() as i32, + reject: f["reject"].as_i64().unwrap() as i32, + out, + }; + let p = &f["origin"]; + let origin = [ + p[0].as_i64().unwrap() as i32, + p[1].as_i64().unwrap() as i32, + p[2].as_i64().unwrap() as i32, + ]; + for _ in 0..f["repeats"].as_u64().unwrap() { + world.calls = 0; + let result = feature.place(&mut world, &mut random, origin); + match result { + Ok(value) => writeln!(world.out, "place {value}")?, + Err(_) => writeln!(world.out, "place error")?, + } + writeln!(world.out, "next {}", random.next_long())?; + for (p, state) in &world.states { + writeln!(world.out, "stored {} {} {} {}", p[0], p[1], p[2], state.0)?; + } + writeln!(world.out, "end")?; + } + } + } + writeln!(out, "tail {}", random.next_long())?; + Ok(()) +} +fn tag(v: &Value) -> Tag { + match v { + Value::String(s) => Tag::String(s.as_str().into()), + Value::Number(n) => Tag::Int(n.as_i64().unwrap() as i32), + Value::Array(a) => Tag::List(a.iter().map(tag).collect()), + Value::Object(m) => { + Tag::Compound(m.iter().map(|(k, v)| (k.as_str().into(), tag(v))).collect()) + } + _ => panic!("invalid registry metadata"), + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ("states", tag(&facts["states"])), + ("defaults", tag(&facts["defaults"])), + ]))?; + let integers = facts["integers"] + .as_array() + .unwrap() + .iter() + .map(|v| { + ( + v[0].as_str().unwrap().to_owned(), + v[1].as_str().unwrap().to_owned(), + ) + }) + .collect(); + let resources: Value = serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?; + let mut definitions = TagDefinitions::default(); + for (name, text) in resources.as_object().unwrap() { + definitions.apply_json(name, "vanilla", text.as_str().unwrap())?; + } + let built = + definitions.build(|name, _| registry.default_state(name).map(|_| name.to_owned()))?; + assert!(built.missing.is_empty()); + let bindings = FeatureBlockBindings::with_tags(®istry, integers, &built.tags)?; + let blocks: Vec<_> = [ + "air", + "cave_air", + "void_air", + "stone", + "water", + "oak_leaves", + "dirt", + ] + .map(|name| { + registry + .default_state(&format!("minecraft:{name}")) + .unwrap() + }) + .to_vec(); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture(&f, LegacyRandom::new(seed), &blocks, &bindings, &mut out)?; + } else { + fixture(&f, XoroshiroRandom::new(seed), &blocks, &bindings, &mut out)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/restitution_fixture.rs b/crates/horizon-world/examples/restitution_fixture.rs new file mode 100644 index 000000000..d32532a82 --- /dev/null +++ b/crates/horizon-world/examples/restitution_fixture.rs @@ -0,0 +1,162 @@ +use horizon_core::{geometry::Vec3, position::BlockPos}; +use horizon_world::{ + movement_restitution::{RestitutionInput, RestitutionWorld, restitute_movement}, + registry::BlockStateId, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vector(v: &Value) -> Vec3 { + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn vector_text(prefix: &str, v: Vec3) -> String { + format!( + "{prefix} {:016x} {:016x} {:016x}", + bits(v.x), + bits(v.y), + bits(v.z) + ) +} +struct World<'a, W> { + f: &'a Value, + out: &'a mut W, + calls: i32, + suppress_calls: usize, + gravity_calls: usize, + velocity: Vec3, + sync: bool, +} +impl<W: Write> World<'_, W> { + fn query(&mut self, text: &str) -> io::Result<()> { + writeln!(self.out, "{text}")?; + let call = self.calls; + self.calls += 1; + if call == self.f["fail"].as_i64().unwrap() as i32 { + Err(io::Error::other("injected restitution failure")) + } else { + Ok(()) + } + } +} +impl<W: Write> RestitutionWorld for World<'_, W> { + type Error = io::Error; + fn suppressing_bounce(&mut self) -> io::Result<bool> { + self.query("suppress")?; + let values = self.f["suppress"].as_array().unwrap(); + let result = values[self.suppress_calls.min(values.len() - 1)] + .as_bool() + .unwrap(); + self.suppress_calls += 1; + Ok(result) + } + fn entity_bounciness(&mut self) -> io::Result<f64> { + self.query("entity-bounce")?; + Ok(number(&self.f["entity"])) + } + fn velocity(&mut self) -> io::Result<Vec3> { + self.query("velocity")?; + Ok(self.velocity) + } + fn effective_gravity(&mut self) -> io::Result<f64> { + self.query("gravity")?; + let values = self.f["gravity"].as_array().unwrap(); + let result = number(&values[self.gravity_calls.min(values.len() - 1)]); + self.gravity_calls += 1; + Ok(result) + } + fn block_suppresses_bounce(&mut self, _: BlockStateId) -> io::Result<bool> { + self.query("block-suppresses")?; + Ok(self.f["tag"].as_bool().unwrap()) + } + fn block_bounce_restitution(&mut self, _: BlockStateId) -> io::Result<f32> { + self.query("block-bounce")?; + Ok(single(&self.f["block"])) + } + fn air_drag(&mut self) -> io::Result<f32> { + self.query("drag")?; + Ok(single(&self.f["drag"])) + } + fn movement_support_position(&mut self) -> io::Result<BlockPos> { + self.query("support-position")?; + Ok(BlockPos::new(17, -64, -33)) + } + fn bounce_on(&mut self, _: BlockStateId, p: BlockPos, fall: f64) -> io::Result<()> { + self.query(&format!( + "bounce-on {} {} {} {:016x}", + p.x, + p.y, + p.z, + bits(fall) + ))?; + if self.f["mutate"].as_bool().unwrap() { + self.velocity = Vec3::new(17.0, 18.0, 19.0); + } + Ok(()) + } + fn bounce_event(&mut self) -> io::Result<()> { + self.query("bounce-event") + } + fn mark_position_for_sync(&mut self) { + self.sync = true; + } + fn set_velocity(&mut self, v: Vec3) -> io::Result<()> { + self.query(&vector_text("set-velocity", v))?; + self.velocity = v; + Ok(()) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut world = World { + f: &f, + out: &mut out, + calls: 0, + suppress_calls: 0, + gravity_calls: 0, + velocity: vector(&f["velocity"]), + sync: f["sync"].as_bool().unwrap(), + }; + let result = restitute_movement( + &mut world, + RestitutionInput { + block: BlockStateId(1), + collided_x: f["x"].as_bool().unwrap(), + collided_z: f["z"].as_bool().unwrap(), + vertical_collision: f["vertical"].as_bool().unwrap(), + collision_below: f["below"].as_bool().unwrap(), + living: f["living"].as_bool().unwrap(), + resolved_movement: vector(&f["resolved"]), + fall_distance: number(&f["fall"]), + }, + ); + writeln!( + world.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + writeln!(world.out, "{}", vector_text("final", world.velocity))?; + writeln!(world.out, "sync {}", world.sync)?; + writeln!(world.out, "queries {}", world.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/retrogen_data_fixture.rs b/crates/horizon-world/examples/retrogen_data_fixture.rs new file mode 100644 index 000000000..1f35cb363 --- /dev/null +++ b/crates/horizon-world/examples/retrogen_data_fixture.rs @@ -0,0 +1,112 @@ +use horizon_world::{nbt::Tag, retrogen::BelowZeroRetrogen}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, +}; +fn tag(row: &Value) -> Tag { + let value = &row[1]; + match row[0].as_str().unwrap() { + "end" => Tag::End, + "byte" => Tag::Byte(value.as_i64().unwrap() as i8), + "short" => Tag::Short(value.as_i64().unwrap() as i16), + "int" => Tag::Int(value.as_i64().unwrap() as i32), + "long" => Tag::Long(value.as_i64().unwrap()), + "float" => Tag::Float(u32::from_str_radix(value.as_str().unwrap(), 16).unwrap()), + "double" => Tag::Double(u64::from_str_radix(value.as_str().unwrap(), 16).unwrap()), + "string" => Tag::String(value.as_str().unwrap().into()), + "list" => Tag::List(value.as_array().unwrap().iter().map(tag).collect()), + "compound" => Tag::Compound( + value + .as_object() + .unwrap() + .iter() + .map(|(name, value)| (name.as_str().into(), tag(value))) + .collect(), + ), + "long_array" => Tag::LongArray( + value + .as_array() + .unwrap() + .iter() + .map(|v| v.as_i64().unwrap()) + .collect(), + ), + "int_array" => Tag::IntArray( + value + .as_array() + .unwrap() + .iter() + .map(|v| v.as_i64().unwrap() as i32) + .collect(), + ), + "byte_array" => Tag::ByteArray( + value + .as_array() + .unwrap() + .iter() + .map(|v| v.as_i64().unwrap() as u8) + .collect(), + ), + _ => panic!("unknown tag"), + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let args: Vec<_> = std::env::args().collect(); + let mut out = io::BufWriter::new(fs::File::create(&args[2])?); + for (index, line) in fs::read_to_string(&args[1])?.lines().enumerate() { + writeln!(out, "case {index}")?; + let row: Value = serde_json::from_str(line)?; + let Ok(data) = BelowZeroRetrogen::from_nbt(&tag(&row)) else { + writeln!(out, "decoded error")?; + continue; + }; + let encoded = data.to_nbt(); + let Tag::Compound(fields) = &encoded else { + unreachable!() + }; + writeln!( + out, + "decoded {} {} {}", + data.target_status().name(), + data.has_bedrock_holes(), + fields.len() + )?; + let Some(Tag::String(target)) = encoded.get("target_status") else { + unreachable!() + }; + writeln!(out, "encoded_target {}", target.to_string()?)?; + let words = match encoded.get("missing_bedrock") { + Some(Tag::LongArray(words)) => words + .iter() + .map(|v| format!("{:x}", *v as u64)) + .collect::<Vec<_>>() + .join(","), + None => "absent".into(), + _ => unreachable!(), + }; + writeln!(out, "mask {words}")?; + let mut holes = String::new(); + for z in -17..=17 { + for x in -17..=17 { + holes.push(if data.has_bedrock_hole(x, z) { + '1' + } else { + '0' + }); + } + } + for z in [i32::MIN, i32::MAX] { + for x in [i32::MIN, i32::MAX] { + holes.push(if data.has_bedrock_hole(x, z) { + '1' + } else { + '0' + }); + } + } + writeln!(out, "holes {holes}")?; + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-world/examples/rule_test_fixture.rs b/crates/horizon-world/examples/rule_test_fixture.rs new file mode 100644 index 000000000..31fa4c436 --- /dev/null +++ b/crates/horizon-world/examples/rule_test_fixture.rs @@ -0,0 +1,95 @@ +//! Differential transport for replacement rules over pinned block identities. +use horizon_core::random::{LegacyRandom, RandomSource, XoroshiroRandom}; +use horizon_world::{ + DATA_VERSION, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, + worldgen::{block_feature::FeatureBlockBindings, rule_test::RuleTest, tags::TagDefinitions}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn fixture( + f: &Value, + bindings: &FeatureBlockBindings<'_>, + mut random: impl RandomSource, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + match RuleTest::from_json(f["definition"].as_str().unwrap(), bindings) { + Err(_) => writeln!(out, "decode error")?, + Ok(rule) => { + writeln!(out, "decode ok")?; + let mut index = 0; + let heights = f["heights"].as_array().unwrap(); + for _ in 0..f["repeats"].as_u64().unwrap() { + for state in f["states"].as_array().unwrap() { + let y = heights[index % heights.len()].as_i64().unwrap() as i32; + index += 1; + let result = rule.test( + BlockStateId(state.as_u64().unwrap() as u32), + [17, y, -33], + &mut random, + ); + writeln!(out, "test {result} {}", random.next_long())?; + } + } + } + } + writeln!(out, "tail {}", random.next_long())?; + Ok(()) +} +fn tag(v: &Value) -> Tag { + match v { + Value::String(s) => Tag::String(s.as_str().into()), + Value::Number(n) => Tag::Int(n.as_i64().unwrap() as i32), + Value::Array(a) => Tag::List(a.iter().map(tag).collect()), + Value::Object(m) => { + Tag::Compound(m.iter().map(|(k, v)| (k.as_str().into(), tag(v))).collect()) + } + _ => panic!("invalid registry metadata"), + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ("states", tag(&facts["states"])), + ("defaults", tag(&facts["defaults"])), + ]))?; + let integers = facts["integers"] + .as_array() + .unwrap() + .iter() + .map(|v| { + ( + v[0].as_str().unwrap().to_owned(), + v[1].as_str().unwrap().to_owned(), + ) + }) + .collect(); + let resources: Value = serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?; + let mut definitions = TagDefinitions::default(); + for (name, text) in resources.as_object().unwrap() { + definitions.apply_json(name, "vanilla", text.as_str().unwrap())?; + } + let built = + definitions.build(|name, _| registry.default_state(name).map(|_| name.to_owned()))?; + assert!(built.missing.is_empty()); + let bindings = FeatureBlockBindings::with_tags(®istry, integers, &built.tags)?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture(&f, &bindings, LegacyRandom::new(seed), &mut out)?; + } else { + fixture(&f, &bindings, XoroshiroRandom::new(seed), &mut out)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/scattered_ore_fixture.rs b/crates/horizon-world/examples/scattered_ore_fixture.rs new file mode 100644 index 000000000..bc9dd9200 --- /dev/null +++ b/crates/horizon-world/examples/scattered_ore_fixture.rs @@ -0,0 +1,228 @@ +//! Feature world transport retaining ordered mutations and partial failures. +use horizon_core::random::{LegacyRandom, RandomSource, XoroshiroRandom}; +use horizon_world::{ + DATA_VERSION, + heightmap::HeightmapType, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, + worldgen::{ + anchor::WorldGenerationContext, + block_feature::FeatureBlockBindings, + feature::FeatureWorld, + ore_feature::ScatteredOreFeature, + placement::{PlacementContext, PlacementQueryError}, + tags::TagDefinitions, + }, +}; +use serde_json::Value; +use std::{ + collections::BTreeMap, + fs, + io::{self, Write}, + path::Path, +}; +struct World<'a, W> { + states: BTreeMap<[i32; 3], BlockStateId>, + blocks: Vec<BlockStateId>, + minimum: i32, + mode: usize, + center: [i32; 3], + calls: i32, + fail: i32, + reject: i32, + out: &'a mut W, +} +impl<W: Write> PlacementContext for World<'_, W> { + fn generation(&self) -> WorldGenerationContext { + WorldGenerationContext::new(self.minimum, 384, 63) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + writeln!(self.out, "min").map_err(|e| PlacementQueryError::Failed(e.to_string()))?; + let call = self.calls; + self.calls += 1; + if call == self.fail { + return Err(PlacementQueryError::Failed("minimum query failure".into())); + } + writeln!(self.out, "minimum {}", self.minimum) + .map_err(|e| PlacementQueryError::Failed(e.to_string()))?; + Ok(self.minimum) + } + fn height(&mut self, _: HeightmapType, _: i32, _: i32) -> Result<i32, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } +} +impl<W: Write> FeatureWorld for World<'_, W> { + type Error = io::Error; + fn block(&mut self, p: [i32; 3]) -> Result<BlockStateId, Self::Error> { + let call = self.calls; + self.calls += 1; + writeln!(self.out, "get {} {} {}", p[0], p[1], p[2])?; + if call == self.fail { + return Err(io::Error::other("world failure")); + } + let hash = p[0] + .wrapping_mul(31) + .wrapping_add(p[1].wrapping_mul(7)) + .wrapping_add(p[2].wrapping_mul(17)) + .rem_euclid(7) as usize; + let mut fallback = if self.mode == 0 { + self.blocks[hash] + } else { + self.blocks[3] + }; + if self.mode >= 2 { + let delta = [ + [0, -1, 0], + [0, 1, 0], + [0, 0, -1], + [0, 0, 1], + [-1, 0, 0], + [1, 0, 0], + ][self.mode - 2]; + let adjacent = std::array::from_fn(|i| self.center[i].wrapping_add(delta[i])); + if p == adjacent { + fallback = self.blocks[1]; + } + } + let state = self.states.get(&p).copied().unwrap_or(fallback); + writeln!(self.out, "state {}", state.0)?; + Ok(state) + } + fn set_block( + &mut self, + p: [i32; 3], + state: BlockStateId, + flags: i32, + ) -> Result<bool, Self::Error> { + let call = self.calls; + self.calls += 1; + writeln!( + self.out, + "set {} {} {} {} {flags}", + p[0], p[1], p[2], state.0 + )?; + if call == self.fail { + return Err(io::Error::other("world failure")); + } + let result = self.reject == 0 || call % self.reject != 0; + if result { + self.states.insert(p, state); + } + writeln!(self.out, "written {result}")?; + Ok(result) + } +} +fn fixture( + f: &Value, + mut random: impl RandomSource, + blocks: &[BlockStateId], + bindings: &FeatureBlockBindings<'_>, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let decoded = ScatteredOreFeature::from_json(f["definition"].as_str().unwrap(), bindings); + match decoded { + Err(_) => writeln!(out, "decode error")?, + Ok(feature) => { + writeln!(out, "decode ok")?; + let mut world = World { + states: BTreeMap::new(), + blocks: blocks.to_vec(), + minimum: f["world_min"].as_i64().unwrap() as i32, + mode: f["mode"].as_u64().unwrap() as usize, + center: std::array::from_fn(|i| f["origin"][i].as_i64().unwrap() as i32), + calls: 0, + fail: f["fail"].as_i64().unwrap() as i32, + reject: f["reject"].as_i64().unwrap() as i32, + out, + }; + let p = &f["origin"]; + let origin = [ + p[0].as_i64().unwrap() as i32, + p[1].as_i64().unwrap() as i32, + p[2].as_i64().unwrap() as i32, + ]; + for _ in 0..f["repeats"].as_u64().unwrap() { + world.calls = 0; + let result = feature.place(&mut world, &mut random, origin); + match result { + Ok(value) => writeln!(world.out, "place {value}")?, + Err(_) => writeln!(world.out, "place error")?, + } + writeln!(world.out, "next {}", random.next_long())?; + for (p, state) in &world.states { + writeln!(world.out, "stored {} {} {} {}", p[0], p[1], p[2], state.0)?; + } + writeln!(world.out, "end")?; + } + } + } + writeln!(out, "tail {}", random.next_long())?; + Ok(()) +} +fn tag(v: &Value) -> Tag { + match v { + Value::String(s) => Tag::String(s.as_str().into()), + Value::Number(n) => Tag::Int(n.as_i64().unwrap() as i32), + Value::Array(a) => Tag::List(a.iter().map(tag).collect()), + Value::Object(m) => { + Tag::Compound(m.iter().map(|(k, v)| (k.as_str().into(), tag(v))).collect()) + } + _ => panic!("invalid registry metadata"), + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ("states", tag(&facts["states"])), + ("defaults", tag(&facts["defaults"])), + ]))?; + let integers = facts["integers"] + .as_array() + .unwrap() + .iter() + .map(|v| { + ( + v[0].as_str().unwrap().to_owned(), + v[1].as_str().unwrap().to_owned(), + ) + }) + .collect(); + let resources: Value = serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?; + let mut definitions = TagDefinitions::default(); + for (name, text) in resources.as_object().unwrap() { + definitions.apply_json(name, "vanilla", text.as_str().unwrap())?; + } + let built = + definitions.build(|name, _| registry.default_state(name).map(|_| name.to_owned()))?; + assert!(built.missing.is_empty()); + let bindings = FeatureBlockBindings::with_tags(®istry, integers, &built.tags)?; + let blocks: Vec<_> = [ + "air", + "cave_air", + "void_air", + "stone", + "water", + "oak_leaves", + "dirt", + ] + .map(|name| { + registry + .default_state(&format!("minecraft:{name}")) + .unwrap() + }) + .to_vec(); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture(&f, LegacyRandom::new(seed), &blocks, &bindings, &mut out)?; + } else { + fixture(&f, XoroshiroRandom::new(seed), &blocks, &bindings, &mut out)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/server_player_combat_fixture.rs b/crates/horizon-world/examples/server_player_combat_fixture.rs new file mode 100644 index 000000000..ac911a7c8 --- /dev/null +++ b/crates/horizon-world/examples/server_player_combat_fixture.rs @@ -0,0 +1,635 @@ +use horizon_world::damage_immunity::{DamageRule, ImmunityTag, ImmunityWorld}; +use horizon_world::living_hurt::{HurtState, HurtTag, HurtWorld}; +use horizon_world::{ + attribute_health::HealthAttributes, + attributes::{ + Modifier, Operation, + entity::{Catalog, EntityAttributes}, + live::LiveAttributes, + }, + combat_rules::ArmorWorld, + damage_reduction::Bypass, + food::FoodData, + living_damage::DamageStat, + player_health::PlayerFloatIds, + server_player_combat::{CombatEnvironment, ServerPlayerCombat}, + server_player_damage::ServerDamageEnvironment, + synced_floats::{FloatValue, Observer, SyncedFloats}, +}; +use horizon_world::{ + food::Difficulty, + player_hurt::{CausingEntity, PlayerHurtWorld, ServerPlayerHurtWorld}, +}; +use serde_json::Value; +use std::sync::Arc; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +// Run the identical native combat corpus through both attribute stores. +trait FixtureAttributes: HealthAttributes { + fn create(catalog: Arc<Catalog>) -> Self; + fn configure(&mut self, name: &str, base: f64, modifier: Option<Modifier>); +} +impl FixtureAttributes for EntityAttributes { + fn create(catalog: Arc<Catalog>) -> Self { + catalog.create("minecraft:player").unwrap() + } + fn configure(&mut self, name: &str, base: f64, modifier: Option<Modifier>) { + let key = self.catalog().id(name).unwrap(); + self.edit(key, |a, o| { + a.set_base_value(base, o)?; + if let Some(m) = modifier { + a.add_transient(m, o)?; + } + Ok::<_, horizon_world::attributes::AttributeError<std::convert::Infallible>>(()) + }) + .unwrap() + .unwrap(); + } +} +type Live = LiveAttributes<Box<dyn FnMut() -> i32>>; +impl FixtureAttributes for Live { + fn create(catalog: Arc<Catalog>) -> Self { + let hashes: Vec<_> = catalog + .attributes() + .enumerate() + .map(|(i, _)| i as i32) + .collect(); + let mut next = 0i32; + Self::new( + catalog, + "minecraft:player", + &hashes, + Box::new(move || { + next = next.wrapping_add(1); + next + }), + ) + .unwrap() + } + fn configure(&mut self, name: &str, base: f64, modifier: Option<Modifier>) { + let handle = self.get_instance(self.key(name)).unwrap().unwrap(); + self.edit(&handle, |a, o| { + a.set_base_value(base, o)?; + if let Some(m) = modifier { + a.add_transient(m, o)?; + } + Ok(()) + }) + .unwrap(); + } +} +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +fn state(s: &HurtState<()>) -> String { + format!( + "{} {} {:08x} {} {} {} {}", + s.no_action_time, + s.cooldown, + bits(s.last_hurt), + s.hurt_duration, + s.hurt_time, + s.last_source.is_some(), + s.last_stamp + ) +} +struct Env<'a> { + out: &'a mut dyn Write, + op: &'a Value, + calls: i64, + hit: bool, + recorded: f32, + player: bool, + difficulty_calls: usize, + slots: &'a [Value], + head: u64, + dead: bool, +} +impl Env<'_> { + fn query(&mut self, event: &str, key: &str) -> io::Result<bool> { + self.event(event)?; + Ok(self.flag(key)) + } + + fn flag(&self, n: &str) -> bool { + self.op[n].as_bool().unwrap() + } + fn event(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.op["fail"].as_i64().unwrap() { + Err(io::Error::other("injected hurt callback failure")) + } else { + Ok(()) + } + } +} +impl HurtWorld for Env<'_> { + type Error = io::Error; + type Source = (); + type UseItem = bool; + type Blocking = (); + type Sound = (); + fn source(&self) {} + fn is_server_player(&self) -> bool { + self.player + } + fn invulnerable(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("invulnerable")?; + Ok(self.flag("invulnerable")) + } + fn fire_resistance(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("fire-resistance")?; + Ok(self.flag("fire_resistance")) + } + fn sleeping(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("sleeping")?; + Ok(self.flag("sleeping")) + } + fn freeze_hurts_extra(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("freeze-extra")?; + Ok(self.flag("freeze_extra")) + } + fn stop_sleeping(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("wake") + } + fn resolve_mob(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("resolve-mob") + } + fn resolve_player(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("resolve-player") + } + fn broadcast_damage(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("broadcast") + } + fn mark_hurt(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("mark") + } + fn secondary_sound(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("thorns") + } + fn die(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("die")?; + self.dead = true; + Ok(()) + } + fn hurt_sound(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("hurt-sound") + } + + fn dead_or_dying(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + panic!("combat binding supplies stored health/death predicate") + } + fn tag(&mut self, _: &mut HurtState<()>, tag: HurtTag) -> io::Result<bool> { + let n = match tag { + HurtTag::Fire => "fire", + HurtTag::Freezing => "freezing", + HurtTag::DamagesHelmet => "damages_helmet", + HurtTag::BypassesCooldown => "bypasses_cooldown", + HurtTag::NoImpact => "no_impact", + HurtTag::NoKnockback => "no_knockback", + }; + self.event(&format!("tag {n}"))?; + Ok(self.flag(n)) + } + fn use_item(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("use-item")?; + Ok(self.flag("component")) + } + fn apply_blocking(&mut self, _: &mut HurtState<()>, v: f32) -> io::Result<f32> { + self.event(&format!("blocking {:08x}", bits(v)))?; + Ok(single(&self.op["blocked"])) + } + fn helmet_empty(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event(&format!("slot {}", self.head))?; + Ok(!self.flag("helmet")) + } + fn hurt_helmet(&mut self, _: &mut HurtState<()>, v: f32) -> io::Result<()> { + self.event(&format!("hurt-helmet {:08x}", bits(v))) + } + fn actually_hurt(&mut self, _s: &mut HurtState<()>, _v: f32) -> io::Result<()> { + panic!("combat binding supplies actual inner damage") + } + fn blocking_component(&mut self, v: bool) -> Option<()> { + v.then_some(()) + } + fn on_blocked(&mut self, _: &mut HurtState<()>, _: ()) -> io::Result<()> { + Ok(()) + } + fn knockback(&mut self, _: &mut HurtState<()>, v: f32, b: bool) -> io::Result<()> { + self.event(&format!("knockback {:08x} {b}", bits(v))) + } + fn death_protection(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("tag bypasses_invulnerability")?; + if !self.flag("bypasses_invulnerability") { + self.event("hand 0")?; + self.event("hand 1")?; + } + Ok(false) + } + fn death_sound(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("death-sound") + } + fn make_sound(&mut self, _: &mut HurtState<()>, _: ()) -> io::Result<()> { + self.event("make-sound") + } + fn game_time(&mut self, _: &mut HurtState<()>) -> io::Result<i64> { + self.event("level")?; + self.event("game-time")?; + Ok(self.op["game_time"].as_i64().unwrap()) + } + fn effects_on_hurt(&mut self, _: &mut HurtState<()>, v: f32) -> io::Result<()> { + self.event("effects")?; + for i in 0..self.op["effects"].as_u64().unwrap() { + self.event(&format!("effect {i} {:08x}", bits(v)))?; + } + Ok(()) + } + fn player_hurt_criterion( + &mut self, + _: &mut HurtState<()>, + _: f32, + _: f32, + _: bool, + ) -> io::Result<()> { + self.event("criterion") + } + fn award_blocked(&mut self, _: &mut HurtState<()>, v: i32) -> io::Result<()> { + self.event(&format!("blocked-stat {v}")) + } + fn attacker_criterion( + &mut self, + _: &mut HurtState<()>, + _: f32, + _: f32, + _: bool, + ) -> io::Result<()> { + self.event("attacker") + } +} +impl PlayerHurtWorld for Env<'_> { + fn ability_invulnerable(&self) -> bool { + self.flag("ability_invulnerable") + } + fn bypasses_invulnerability(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("tag bypasses_invulnerability")?; + Ok(self.flag("bypasses_invulnerability")) + } + fn remove_shoulders(&mut self, _: &mut HurtState<()>) -> io::Result<()> { + self.event("shoulders") + } + fn scales_with_difficulty(&mut self, _: &mut HurtState<()>) -> io::Result<bool> { + self.event("scales")?; + Ok(self.flag("scales")) + } + fn difficulty(&mut self, _: &mut HurtState<()>) -> io::Result<Difficulty> { + self.event("difficulty")?; + let v = self.op["difficulties"][self.difficulty_calls] + .as_u64() + .unwrap(); + self.difficulty_calls += 1; + Ok([ + Difficulty::Peaceful, + Difficulty::Easy, + Difficulty::Normal, + Difficulty::Hard, + ][v as usize]) + } +} +impl ServerPlayerHurtWorld for Env<'_> { + type Player = (); + type Arrow = (); + fn causing_entity(&mut self, _: &mut HurtState<()>) -> io::Result<CausingEntity<(), ()>> { + self.event("attacker")?; + Ok(match self.op["attacker"].as_u64().unwrap() { + 0 | 1 => CausingEntity::Other, + 2 => CausingEntity::Player(()), + 3 => CausingEntity::Arrow(()), + _ => panic!("attacker"), + }) + } + fn arrow_player_owner(&mut self, _: &mut HurtState<()>, _: ()) -> io::Result<Option<()>> { + self.event("owner")?; + Ok((self.op["owner"] == 1).then_some(())) + } + fn can_harm_player(&mut self, _: &mut HurtState<()>, _: ()) -> io::Result<bool> { + self.event("can-harm")?; + Ok(self.flag("can_harm")) + } +} +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn values(v: Option<&[FloatValue]>) -> String { + match v { + None => "none".into(), + Some([]) => "empty".into(), + Some(v) => v + .iter() + .map(|v| format!("{}:{:08x}", v.id, bits(v.value))) + .collect::<Vec<_>>() + .join(","), + } +} +impl Observer for Env<'_> { + type Error = io::Error; + fn updated(&mut self, data: &mut SyncedFloats, id: u8) -> io::Result<()> { + self.event(&format!( + "updated {id} {:08x} {}", + bits(data.get(id).unwrap()), + data.is_dirty() + ))?; + if self.flag("pack_callback") { + writeln!( + self.out, + "callback-pack {}", + values(data.take_dirty().as_deref()) + )?; + } + Ok(()) + } +} +impl ArmorWorld for Env<'_> { + type Error = io::Error; + type Weapon = (); + type ServerLevel = (); + fn weapon(&mut self) -> io::Result<Option<()>> { + self.event("weapon")?; + Ok(self.flag("weapon").then_some(())) + } + fn server_level(&mut self) -> io::Result<Option<()>> { + self.event("level")?; + Ok(Some(())) + } + fn modify_armor_effectiveness(&mut self, _: (), _: (), v: f32) -> io::Result<f32> { + Ok(v) + } +} +impl<A: FixtureAttributes> ServerDamageEnvironment<A> for Env<'_> { + type Attacker = (); + fn invulnerable(&mut self) -> io::Result<bool> { + self.event("invulnerable")?; + Ok(self.flag("invulnerable")) + } + fn bypasses(&mut self, b: Bypass) -> io::Result<bool> { + let n = match b { + Bypass::Armor => "armor", + Bypass::Effects => "effects", + Bypass::Resistance => "resistance", + Bypass::Enchantments => "enchantments", + }; + self.event(&format!("tag bypass_{n}"))?; + Ok(self.flag(&format!("bypass_{n}"))) + } + fn hurt_armor(&mut self, a: &mut A, v: f32) -> io::Result<()> { + self.event(&format!("hurt-armor {:08x}", bits(v)))?; + if self.flag("break_armor") { + a.configure("minecraft:armor", number(&self.op["armor_after"]), None); + } + Ok(()) + } + fn has_resistance(&mut self) -> io::Result<bool> { + self.event("has-resistance")?; + Ok(self.flag("resistance")) + } + fn resistance_amplifier(&mut self) -> io::Result<i32> { + self.event("effect")?; + Ok(self.op["amplifier"].as_i64().unwrap() as i32) + } + fn award_resisted(&mut self, v: i32) -> io::Result<()> { + self.event(&format!("stat resisted {v}")) + } + fn attacker(&mut self) -> io::Result<Option<()>> { + panic!("player damage must not query attacker") + } + fn award_dealt_resisted(&mut self, _: i32) -> io::Result<()> { + panic!("player damage must award own resisted stat") + } + fn damage_protection(&mut self, _: ()) -> io::Result<f32> { + for slot in self.slots { + self.event(&format!("slot {}", slot.as_u64().unwrap()))?; + } + Ok(0.0) + } + fn award_self(&mut self, s: DamageStat, v: i32) -> io::Result<()> { + let n = match s { + DamageStat::Absorbed => "absorbed", + DamageStat::Taken => "taken", + DamageStat::DealtAbsorbed => panic!("attacker stat"), + }; + self.event(&format!("stat {n} {v}")) + } + fn award_attacker(&mut self, _: (), _: DamageStat, _: i32) -> io::Result<()> { + panic!("attacker stat") + } + fn source_food_exhaustion(&mut self) -> io::Result<f32> { + self.event("food-exhaustion")?; + Ok(single(&self.op["food_exhaustion"])) + } + fn ability_invulnerable(&self) -> bool { + self.flag("ability_invulnerable") + } + fn level_is_client(&mut self) -> io::Result<bool> { + self.event("level")?; + self.event("client")?; + Ok(self.flag("client")) + } + fn record_damage(&mut self, v: f32) -> io::Result<()> { + self.event("tracker")?; + self.event(&format!("record {:08x}", bits(v)))?; + self.recorded = v; + self.hit = true; + Ok(()) + } + fn damage_event(&mut self) -> io::Result<()> { + self.event("damage-event") + } +} +impl<A: FixtureAttributes> CombatEnvironment<A> for Env<'_> { + fn dead_flag(&self) -> bool { + self.dead + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + if std::env::args().nth(2).as_deref() == Some("--live") { + run::<Live>(dir, "rust-live.txt") + } else { + run::<EntityAttributes>(dir, "rust.txt") + } +} +fn run<A: FixtureAttributes>(dir: &Path, output: &str) -> Result<(), Box<dyn std::error::Error>> { + let ids: Value = serde_json::from_str(&fs::read_to_string(dir.join("ids.json"))?)?; + let ids = PlayerFloatIds { + health: ids["health"].as_u64().unwrap() as u8, + absorption: ids["absorption"].as_u64().unwrap() as u8, + }; + let slots: Value = serde_json::from_str(&fs::read_to_string(dir.join("slots.json"))?)?; + let head: u64 = serde_json::from_str(&fs::read_to_string(dir.join("head.json"))?)?; + let catalog = Arc::new(Catalog::from_json(&serde_json::from_str( + &fs::read_to_string(dir.join("catalog.json"))?, + )?)?); + let keys = [ + "minecraft:armor", + "minecraft:armor_toughness", + "minecraft:max_health", + "minecraft:max_absorption", + ]; + let mut out = io::BufWriter::new(fs::File::create(dir.join(output))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut attributes = A::create(catalog.clone()); + for (i, key) in keys.iter().enumerate() { + let a = &f["attributes"][i]; + let m = Modifier::new( + "horizon:test", + number(&a["amount"]), + Operation::ALL[a["operation"].as_u64().unwrap() as usize], + )?; + attributes.configure(key, number(&f["attributes"][i]["base"]), Some(m)); + } + let mut data = SyncedFloats::new(&[ + FloatValue { + id: ids.health, + value: single(&f["health"]), + }, + FloatValue { + id: ids.absorption, + value: single(&f["absorption"]), + }, + ])?; + let mut food = FoodData { + exhaustion: single(&f["exhaustion"]), + ..FoodData::default() + }; + let mut recorded = 0.0; + let mut dead = f["dead"].as_bool().unwrap(); + let mut s = HurtState { + no_action_time: f["no_action"].as_i64().unwrap() as i32, + cooldown: f["cooldown"].as_i64().unwrap() as i32, + last_hurt: single(&f["last_hurt"]), + hurt_duration: f["duration"].as_i64().unwrap() as i32, + hurt_time: f["time"].as_i64().unwrap() as i32, + last_source: f["source"].as_bool().unwrap().then_some(()), + last_stamp: f["stamp"].as_i64().unwrap(), + }; + for op in f["ops"].as_array().unwrap() { + if op["reset_cooldown"].as_bool().unwrap_or(false) { + s.cooldown = 0; + } + let mut e = Env { + out: &mut out, + op, + calls: 0, + hit: false, + recorded, + player: true, + difficulty_calls: 0, + slots: slots.as_array().unwrap(), + head, + dead, + }; + let result = + ServerPlayerCombat::new(&mut attributes, &mut data, &mut food, ids, &mut e)? + .hurt(&mut s, single(&op["damage"])); + match result { + Ok(v) => writeln!(e.out, "bool {v}\nresult ok")?, + Err(_) => writeln!(e.out, "result error")?, + }; + recorded = e.recorded; + dead = e.dead; + writeln!( + e.out, + "state {} {:08x} {} {}", + state(&s), + bits(recorded), + e.hit, + e.calls + )?; + writeln!( + e.out, + "storage {:08x} {:08x} {:08x} {} {} {} {}", + bits(data.get(ids.health).unwrap()), + bits(data.get(ids.absorption).unwrap()), + bits(food.exhaustion), + data.is_dirty(), + data.item_dirty(ids.health).unwrap(), + data.item_dirty(ids.absorption).unwrap(), + dead + )?; + if e.flag("pack") { + writeln!(e.out, "packed {}", values(data.take_dirty().as_deref()))?; + } + writeln!(e.out, "defaults {}", values(data.non_default().as_deref()))?; + } + } + Ok(()) +} +impl ImmunityWorld for Env<'_> { + type Error = io::Error; + fn removed(&self) -> bool { + self.flag("removed") + } + fn permanently_invulnerable(&mut self) -> io::Result<bool> { + self.query("permanent", "permanent") + } + fn temporarily_invulnerable(&mut self) -> io::Result<bool> { + self.query("temporary", "temporary") + } + fn tag(&mut self, t: ImmunityTag) -> io::Result<bool> { + let n = match t { + ImmunityTag::BypassesInvulnerability => "bypasses_invulnerability", + ImmunityTag::Fire => "fire", + ImmunityTag::Fall => "fall", + ImmunityTag::Drowning => "drowning", + ImmunityTag::Freezing => "freezing", + }; + self.query(&format!("tag {n}"), n) + } + fn creative_source(&mut self) -> io::Result<bool> { + self.query("creative", "creative") + } + fn fire_immune(&mut self) -> io::Result<bool> { + self.query("fire-immune", "fire_immune") + } + fn fall_immune(&mut self) -> io::Result<bool> { + self.query("fall-immune", "fall_immune") + } + fn enchantment_immunity(&mut self) -> io::Result<bool> { + for s in self.slots { + self.event(&format!("slot {}", s.as_u64().unwrap()))?; + } + Ok(false) + } + fn damage_rule(&mut self, r: DamageRule) -> io::Result<bool> { + let n = match r { + DamageRule::Drowning => "drowning", + DamageRule::Fall => "fall", + DamageRule::Fire => "fire", + DamageRule::Freeze => "freeze", + }; + self.event("rules")?; + self.query(&format!("rule {n}"), &format!("rule_{n}")) + } + fn changing_dimension(&mut self) -> io::Result<bool> { + self.query("changing", "changing") + } + fn ender_pearl(&mut self) -> io::Result<bool> { + self.query("pearl", "pearl") + } + fn client_loaded(&mut self) -> io::Result<bool> { + self.query("loaded", "loaded") + } +} diff --git a/crates/horizon-world/examples/server_player_damage_fixture.rs b/crates/horizon-world/examples/server_player_damage_fixture.rs new file mode 100644 index 000000000..e6eadb806 --- /dev/null +++ b/crates/horizon-world/examples/server_player_damage_fixture.rs @@ -0,0 +1,278 @@ +use horizon_world::{ + attributes::{ + Modifier, Operation, + entity::{Catalog, EntityAttributes}, + }, + combat_rules::ArmorWorld, + damage_reduction::Bypass, + food::FoodData, + living_damage::DamageStat, + player_health::PlayerFloatIds, + server_player_damage::{ServerDamageEnvironment, ServerPlayerDamage}, + synced_floats::{FloatValue, Observer, SyncedFloats}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, + sync::Arc, +}; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +fn values(v: Option<&[FloatValue]>) -> String { + match v { + None => "none".into(), + Some([]) => "empty".into(), + Some(v) => v + .iter() + .map(|v| format!("{}:{:08x}", v.id, bits(v.value))) + .collect::<Vec<_>>() + .join(","), + } +} +struct Env<'a> { + out: &'a mut dyn Write, + op: &'a Value, + slots: &'a [Value], + calls: i64, + recorded: f32, +} +impl Env<'_> { + fn event(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.op["fail"].as_i64().unwrap() { + Err(io::Error::other("injected damage callback failure")) + } else { + Ok(()) + } + } + fn flag(&self, s: &str) -> bool { + self.op[s].as_bool().unwrap() + } +} +impl Observer for Env<'_> { + type Error = io::Error; + fn updated(&mut self, data: &mut SyncedFloats, id: u8) -> io::Result<()> { + self.event(&format!( + "updated {id} {:08x} {}", + bits(data.get(id).unwrap()), + data.is_dirty() + ))?; + if self.flag("pack_callback") { + writeln!( + self.out, + "callback-pack {}", + values(data.take_dirty().as_deref()) + )?; + } + Ok(()) + } +} +impl ArmorWorld for Env<'_> { + type Error = io::Error; + type Weapon = (); + type ServerLevel = (); + fn weapon(&mut self) -> io::Result<Option<()>> { + self.event("weapon")?; + Ok(self.flag("weapon").then_some(())) + } + fn server_level(&mut self) -> io::Result<Option<()>> { + self.event("level")?; + Ok(Some(())) + } + fn modify_armor_effectiveness(&mut self, _: (), _: (), v: f32) -> io::Result<f32> { + Ok(v) + } +} +impl ServerDamageEnvironment for Env<'_> { + type Attacker = (); + fn invulnerable(&mut self) -> io::Result<bool> { + self.event("invulnerable")?; + Ok(self.flag("invulnerable")) + } + fn bypasses(&mut self, b: Bypass) -> io::Result<bool> { + let n = match b { + Bypass::Armor => "armor", + Bypass::Effects => "effects", + Bypass::Resistance => "resistance", + Bypass::Enchantments => "enchantments", + }; + self.event(&format!("bypass {n}"))?; + Ok(self.flag(&format!("bypass_{n}"))) + } + fn hurt_armor(&mut self, a: &mut EntityAttributes, v: f32) -> io::Result<()> { + self.event(&format!("hurt-armor {:08x}", bits(v)))?; + if self.flag("break_armor") { + let id = a.catalog().id("minecraft:armor").unwrap(); + a.edit(id, |a, o| { + a.set_base_value(number(&self.op["armor_after"]), o) + }) + .unwrap() + .unwrap(); + } + Ok(()) + } + fn has_resistance(&mut self) -> io::Result<bool> { + self.event("has-resistance")?; + Ok(self.flag("resistance")) + } + fn resistance_amplifier(&mut self) -> io::Result<i32> { + self.event("effect")?; + Ok(self.op["amplifier"].as_i64().unwrap() as i32) + } + fn award_resisted(&mut self, v: i32) -> io::Result<()> { + self.event(&format!("stat resisted {v}")) + } + fn attacker(&mut self) -> io::Result<Option<()>> { + panic!("player damage must not query attacker") + } + fn award_dealt_resisted(&mut self, _: i32) -> io::Result<()> { + panic!("player damage must award own resisted stat") + } + fn damage_protection(&mut self, _: ()) -> io::Result<f32> { + for slot in self.slots { + self.event(&format!("slot {}", slot.as_u64().unwrap()))?; + } + Ok(0.0) + } + fn award_self(&mut self, s: DamageStat, v: i32) -> io::Result<()> { + let n = match s { + DamageStat::Absorbed => "absorbed", + DamageStat::Taken => "taken", + DamageStat::DealtAbsorbed => panic!("attacker stat"), + }; + self.event(&format!("stat {n} {v}")) + } + fn award_attacker(&mut self, _: (), _: DamageStat, _: i32) -> io::Result<()> { + panic!("attacker stat") + } + fn source_food_exhaustion(&mut self) -> io::Result<f32> { + self.event("food-exhaustion")?; + Ok(single(&self.op["food_exhaustion"])) + } + fn ability_invulnerable(&self) -> bool { + self.flag("ability_invulnerable") + } + fn level_is_client(&mut self) -> io::Result<bool> { + self.event("level")?; + self.event("client")?; + Ok(self.flag("client")) + } + fn record_damage(&mut self, v: f32) -> io::Result<()> { + self.event("tracker")?; + self.event(&format!("record {:08x}", bits(v)))?; + self.recorded = v; + Ok(()) + } + fn damage_event(&mut self) -> io::Result<()> { + self.event("damage-event") + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let ids: Value = serde_json::from_str(&fs::read_to_string(dir.join("ids.json"))?)?; + let ids = PlayerFloatIds { + health: ids["health"].as_u64().unwrap() as u8, + absorption: ids["absorption"].as_u64().unwrap() as u8, + }; + let slots: Value = serde_json::from_str(&fs::read_to_string(dir.join("slots.json"))?)?; + let catalog = Arc::new(Catalog::from_json(&serde_json::from_str( + &fs::read_to_string(dir.join("catalog.json"))?, + )?)?); + let keys = [ + "minecraft:armor", + "minecraft:armor_toughness", + "minecraft:max_health", + "minecraft:max_absorption", + ] + .map(|k| catalog.id(k).unwrap()); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut attributes = catalog.create("minecraft:player").unwrap(); + for (i, key) in keys.iter().enumerate() { + let a = &f["attributes"][i]; + let m = Modifier::new( + "horizon:test", + number(&a["amount"]), + Operation::ALL[a["operation"].as_u64().unwrap() as usize], + )?; + attributes + .edit(*key, |a, o| { + a.set_base_value(number(&f["attributes"][i]["base"]), o)?; + a.add_transient(m, o) + }) + .unwrap() + .unwrap(); + } + let mut data = SyncedFloats::new(&[ + FloatValue { + id: ids.health, + value: single(&f["health"]), + }, + FloatValue { + id: ids.absorption, + value: single(&f["absorption"]), + }, + ])?; + let mut food = FoodData { + exhaustion: single(&f["exhaustion"]), + ..FoodData::default() + }; + let mut recorded = 0.0; + for op in f["ops"].as_array().unwrap() { + let mut env = Env { + out: &mut out, + op, + slots: slots.as_array().unwrap(), + calls: 0, + recorded, + }; + let result = + ServerPlayerDamage::new(&mut attributes, &mut data, &mut food, ids, &mut env)? + .apply(single(&op["damage"])); + writeln!( + env.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + recorded = env.recorded; + writeln!( + env.out, + "state {:08x} {:08x} {:08x} {:08x} {} {} {} {}", + bits(data.get(ids.health).unwrap()), + bits(data.get(ids.absorption).unwrap()), + bits(food.exhaustion), + bits(recorded), + data.is_dirty(), + data.item_dirty(ids.health).unwrap(), + data.item_dirty(ids.absorption).unwrap(), + env.calls + )?; + if env.flag("pack") { + writeln!(env.out, "packed {}", values(data.take_dirty().as_deref()))?; + } + writeln!( + env.out, + "defaults {}", + values(data.non_default().as_deref()) + )?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/simple_block_fixture.rs b/crates/horizon-world/examples/simple_block_fixture.rs new file mode 100644 index 000000000..742f3b39f --- /dev/null +++ b/crates/horizon-world/examples/simple_block_fixture.rs @@ -0,0 +1,773 @@ +//! Ordered feature effects over a mutable registry-bound world. +use horizon_core::{ + geometry::{Direction, VoxelShape}, + random::{LegacyRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::{ + block_collision::{BlockCollisionRegistry, DynamicCollisionWorld, ShulkerCollisionState}, + block_placement::BlockPlacementBindings, + block_properties::BlockPropertiesRegistry, + block_support::{BlockSupportRegistry, SupportType}, + block_survival::{BlockSurvivalRegistry, SurvivalDefinitions, SurvivalRule, SurvivalWorld}, + collision::CachedCollisionRegistry, + dynamic_support::DynamicSupportWorld, + fluid::{FluidKind, FluidState, FluidStateTable}, + heightmap::HeightmapType, + nbt::{self, Limits, Tag}, + registry::{BlockRegistry, BlockStateId}, + worldgen::{ + anchor::WorldGenerationContext, + biome::BiomeId, + biome_temperature::{BiomeTemperature, BiomeTemperatureSettings, TemperatureModifier}, + biome_weather::BiomeWeatherBindings, + block_feature::FeatureBlockBindings, + feature::{FeatureBlocks, FeatureWorld}, + feature_catalog::FeatureCatalog, + feature_graph::{FeatureDefinition, PlacedFeatureDefinition}, + placement::{PlacementContext, PlacementQueryError}, + simple_block::SimpleBlockFeature, + state_provider::{StateProviderBindings, StateProviderCatalog}, + tags::TagDefinitions, + }, +}; +use serde_json::Value; +use std::{ + collections::BTreeMap, + fs, + io::{self, BufRead, Write}, + path::Path, + sync::Arc, +}; +struct World<'a, 'r, W, R> { + out: &'a mut W, + random: R, + states: BTreeMap<[i32; 3], BlockStateId>, + fallback: BlockStateId, + fluid: Option<BlockStateId>, + fluids: &'a FluidStateTable, + water_mask: u8, + survival: &'a BlockSurvivalRegistry<'r>, + support: &'a BlockSupportRegistry<'r>, + collision: &'a BlockCollisionRegistry<'r>, + loot_container: bool, + loot: BTreeMap<[i32; 3], (String, i64)>, + calls: i32, + fail: i32, + reject: i32, + brightness: i32, + sea_level: i32, + surface_height: i32, + air_above: Option<i32>, + biome: Option<(BiomeWeatherBindings, BiomeTemperature)>, + air: BlockStateId, + destroy_success: bool, + gateway_entity: bool, + gateways: BTreeMap<[i32; 3], ([i32; 3], bool)>, +} +impl<W: Write, R> World<'_, '_, W, R> { + fn event(&mut self, text: std::fmt::Arguments<'_>) -> io::Result<i32> { + writeln!(self.out, "{text}")?; + let call = self.calls; + self.calls += 1; + if call == self.fail { + return Err(io::Error::other("injected world failure")); + } + Ok(call) + } + fn at(&self, p: [i32; 3]) -> BlockStateId { + self.states.get(&p).copied().unwrap_or_else(|| { + if self.air_above.is_some_and(|y| p[1] > y) { + self.air + } else { + self.fallback + } + }) + } + fn get(&mut self, p: [i32; 3]) -> io::Result<BlockStateId> { + self.event(format_args!("get {} {} {}", p[0], p[1], p[2]))?; + let state = self.at(p); + writeln!(self.out, "state {}", state.0)?; + Ok(state) + } + fn entity(&mut self, p: [i32; 3]) -> io::Result<()> { + self.event(format_args!("entity {} {} {}", p[0], p[1], p[2]))?; + Ok(()) + } +} +impl<W: Write, R> DynamicSupportWorld for World<'_, '_, W, R> { + type Error = io::Error; + fn shulker_is_closed(&mut self, p: [i32; 3]) -> io::Result<Option<bool>> { + self.entity(p)?; + Ok(None) + } + fn moving_piston_shape(&mut self, p: [i32; 3]) -> io::Result<Option<VoxelShape>> { + self.entity(p)?; + Ok(None) + } +} +impl<W: Write, R> DynamicCollisionWorld for World<'_, '_, W, R> { + fn shulker_collision_state( + &mut self, + p: [i32; 3], + ) -> io::Result<Option<ShulkerCollisionState>> { + self.entity(p)?; + Ok(None) + } +} +impl<W: Write, R> SurvivalWorld for World<'_, '_, W, R> { + fn block_state(&mut self, p: [i32; 3]) -> io::Result<BlockStateId> { + self.get(p) + } + fn fluid_state(&mut self, p: [i32; 3]) -> io::Result<FluidState> { + self.event(format_args!("fluid {} {} {}", p[0], p[1], p[2]))?; + self.fluids + .get(self.fluid.unwrap_or_else(|| self.at(p))) + .ok_or_else(|| io::Error::other("unknown fluid")) + } + fn raw_brightness(&mut self, p: [i32; 3], sky_darken: i32) -> io::Result<i32> { + self.event(format_args!( + "light {} {} {} {sky_darken}", + p[0], p[1], p[2] + ))?; + Ok(self.brightness) + } +} +impl<W: Write, R> FeatureWorld for World<'_, '_, W, R> { + type Error = io::Error; + fn block(&mut self, p: [i32; 3]) -> io::Result<BlockStateId> { + self.get(p) + } + fn set_block(&mut self, p: [i32; 3], state: BlockStateId, flags: i32) -> io::Result<bool> { + let call = self.event(format_args!( + "set {} {} {} {} {flags}", + p[0], p[1], p[2], state.0 + ))?; + let result = self.reject == 0 || call % self.reject != 0; + if result { + self.states.insert(p, state); + } + writeln!(self.out, "written {result}")?; + Ok(result) + } +} +fn query(error: impl std::fmt::Display) -> PlacementQueryError { + PlacementQueryError::Failed(error.to_string()) +} +impl<W: Write, R: RandomSource> World<'_, '_, W, R> { + fn weather( + &mut self, + biome: BiomeId, + p: [i32; 3], + snow: bool, + edge: bool, + ) -> Result<bool, PlacementQueryError> { + if biome != BiomeId(0) { + return Err(PlacementQueryError::Unavailable); + } + let (bindings, mut temperature) = + self.biome.take().ok_or(PlacementQueryError::Unavailable)?; + let result = if snow { + bindings.should_snow(self, &mut temperature, p) + } else { + bindings.should_freeze(self, &mut temperature, p, edge) + }; + self.biome = Some((bindings, temperature)); + result + } +} +impl<W: Write, R: RandomSource> PlacementContext for World<'_, '_, W, R> { + fn biome_identity(&mut self, p: [i32; 3]) -> Result<BiomeId, PlacementQueryError> { + self.event(format_args!("biome {} {} {}", p[0], p[1], p[2])) + .map_err(query)?; + if self.biome.is_none() { + return Err(PlacementQueryError::Unavailable); + } + Ok(BiomeId(0)) + } + fn state_collision_empty( + &mut self, + state: BlockStateId, + p: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + let collision = self.collision; + collision + .collision_shape(self, state, p) + .map(|shape| shape.is_empty()) + .map_err(query) + } + fn set_block_entity_loot_table( + &mut self, + p: [i32; 3], + table: &str, + random: &mut impl RandomSource, + ) -> Result<(), PlacementQueryError> { + self.event(format_args!("entity {} {} {}", p[0], p[1], p[2])) + .map_err(query)?; + if self.loot_container { + self.loot.insert(p, (table.into(), random.next_long())); + } + Ok(()) + } + fn configure_end_gateway( + &mut self, + p: [i32; 3], + exit: [i32; 3], + exact: bool, + ) -> Result<(), PlacementQueryError> { + self.event(format_args!("entity {} {} {}", p[0], p[1], p[2])) + .map_err(query)?; + if self.gateway_entity { + self.gateways.insert(p, (exit, exact)); + self.event(format_args!("gateway_changed {} {} {}", p[0], p[1], p[2])) + .map_err(query)?; + } + Ok(()) + } + fn biome_should_freeze( + &mut self, + biome: BiomeId, + p: [i32; 3], + edge: bool, + ) -> Result<bool, PlacementQueryError> { + self.weather(biome, p, false, edge) + } + fn biome_should_snow( + &mut self, + biome: BiomeId, + p: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + self.weather(biome, p, true, false) + } + fn destroy_block_without_entity( + &mut self, + p: [i32; 3], + drops: bool, + ) -> Result<bool, PlacementQueryError> { + self.event(format_args!("destroy {} {} {} {drops}", p[0], p[1], p[2])) + .map_err(query)?; + if self.destroy_success { + self.states.insert(p, self.air); + } + writeln!(self.out, "destroyed {}", self.destroy_success).map_err(query)?; + Ok(self.destroy_success) + } + fn block_brightness(&mut self, p: [i32; 3]) -> Result<i32, PlacementQueryError> { + self.event(format_args!("blocklight {} {} {}", p[0], p[1], p[2])) + .map_err(query)?; + Ok(self.brightness) + } + fn fluid_state(&mut self, p: [i32; 3]) -> Result<FluidState, PlacementQueryError> { + SurvivalWorld::fluid_state(self, p).map_err(query) + } + fn sea_level(&mut self) -> Result<i32, PlacementQueryError> { + Ok(self.sea_level) + } + + fn schedule_fluid_tick( + &mut self, + p: [i32; 3], + fluid: horizon_world::fluid::FluidKind, + delay: i32, + ) -> Result<(), PlacementQueryError> { + self.event(format_args!( + "fluidtick {} {} {} {} {delay}", + p[0], + p[1], + p[2], + fluid.name() + )) + .map_err(query)?; + Ok(()) + } + fn mark_postprocessing(&mut self, p: [i32; 3]) -> Result<(), PlacementQueryError> { + self.event(format_args!("chunk {} {} {}", p[0], p[1], p[2])) + .map_err(query)?; + self.event(format_args!("post {} {} {}", p[0], p[1], p[2])) + .map_err(query)?; + Ok(()) + } + fn water_at(&mut self, p: [i32; 3]) -> Result<bool, PlacementQueryError> { + Ok(SurvivalWorld::fluid_state(self, p) + .map_err(query)? + .kind() + .mask() + & self.water_mask + != 0) + } + fn attachment_at( + &mut self, + p: [i32; 3], + direction: Direction, + ) -> Result<bool, PlacementQueryError> { + let survival = self.survival; + survival.can_attach_to(self, p, direction).map_err(query) + } + fn next_world_boolean(&mut self) -> Result<bool, PlacementQueryError> { + Ok(self.random.next_boolean()) + } + fn schedule_block_tick( + &mut self, + p: [i32; 3], + block: BlockStateId, + delay: i32, + ) -> Result<(), PlacementQueryError> { + self.event(format_args!( + "tick {} {} {} {} {delay}", + p[0], p[1], p[2], block.0 + )) + .map_err(query)?; + Ok(()) + } + fn generation(&self) -> WorldGenerationContext { + WorldGenerationContext::new(-64, 384, 63) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(-64) + } + fn max_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(319) + } + fn height(&mut self, kind: HeightmapType, x: i32, z: i32) -> Result<i32, PlacementQueryError> { + self.event(format_args!("height {} {x} {z}", kind.name())) + .map_err(query)?; + Ok(self.surface_height) + } + fn block_state(&mut self, p: [i32; 3]) -> Result<BlockStateId, PlacementQueryError> { + self.get(p).map_err(query) + } + fn block_survives( + &mut self, + state: BlockStateId, + p: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + let survival = self.survival; + survival.can_survive(self, state, p).map_err(query) + } + fn face_sturdy( + &mut self, + p: [i32; 3], + direction: Direction, + ) -> Result<bool, PlacementQueryError> { + let state = self.get(p).map_err(query)?; + self.state_face_sturdy(state, p, direction) + } + fn state_face_sturdy( + &mut self, + state: BlockStateId, + p: [i32; 3], + direction: Direction, + ) -> Result<bool, PlacementQueryError> { + let support = self.support; + support + .is_face_sturdy(self, state, p, direction, SupportType::Full) + .map_err(query) + } +} +struct WeatherProbe { + bindings: BiomeWeatherBindings, + temperature: BiomeTemperature, + snow: bool, + require_edge: bool, +} +enum Feature { + Weather(Box<WeatherProbe>), + Map(SimpleBlockFeature), + Graph(Box<FeatureDefinition>), + Placed(Box<PlacedFeatureDefinition>), +} +#[allow(clippy::too_many_arguments)] +fn fixture<R: RandomSource>( + f: &Value, + mut random: R, + world_random: R, + providers: &StateProviderBindings<'_>, + catalog: &StateProviderCatalog, + placement: &BlockPlacementBindings<'_>, + feature_bindings: &FeatureBlockBindings<'_>, + feature_catalog: &FeatureCatalog, + blocks: FeatureBlocks, + survival: &BlockSurvivalRegistry<'_>, + support: &BlockSupportRegistry<'_>, + collision: &BlockCollisionRegistry<'_>, + fluids: &FluidStateTable, + water_mask: u8, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let json = f["definition"].as_str().unwrap(); + let feature = match f["mode"].as_str().unwrap_or("map") { + "weather" => BiomeWeatherBindings::new(feature_bindings).map(|bindings| { + Feature::Weather(Box::new(WeatherProbe { + bindings, + temperature: BiomeTemperature::new(BiomeTemperatureSettings { + base_temperature: f32::from_bits( + u32::from_str_radix(f["base"].as_str().unwrap(), 16).unwrap(), + ), + modifier: if f["modifier"].as_str() == Some("FROZEN") { + TemperatureModifier::Frozen + } else { + TemperatureModifier::None + }, + has_precipitation: f["precipitation"].as_bool().unwrap(), + downfall: 0.0, + }), + snow: f["operation"].as_str() == Some("snow"), + require_edge: f["edge"].as_bool().unwrap(), + })) + }), + "map" => { + SimpleBlockFeature::from_json(json, providers, catalog, placement).map(Feature::Map) + } + "feature" => feature_catalog + .feature_with_blocks(json, feature_bindings) + .map(|v| Feature::Graph(Box::new(v))), + _ => feature_catalog + .placed_feature_with_blocks(json, feature_bindings) + .map(|v| Feature::Placed(Box::new(v))), + }; + let biome = f + .get("biome") + .map(|value| -> Result<_, Box<dyn std::error::Error>> { + Ok(( + BiomeWeatherBindings::new(feature_bindings)?, + BiomeTemperature::new(BiomeTemperatureSettings { + base_temperature: f32::from_bits(u32::from_str_radix( + value["base"].as_str().unwrap(), + 16, + )?), + modifier: if value["modifier"].as_str() == Some("FROZEN") { + TemperatureModifier::Frozen + } else { + TemperatureModifier::None + }, + has_precipitation: value["precipitation"].as_bool().unwrap(), + downfall: 0.0, + }), + )) + }) + .transpose()?; + let mut world = World { + collision, + loot_container: f.get("loot_entity").and_then(Value::as_str) == Some("chest"), + loot: BTreeMap::new(), + gateway_entity: f.get("gateway_entity").and_then(Value::as_str) == Some("gateway"), + gateways: BTreeMap::new(), + biome, + out, + random: world_random, + states: f["states"] + .as_array() + .unwrap() + .iter() + .map(|v| { + ( + std::array::from_fn(|i| v[i].as_i64().unwrap() as i32), + BlockStateId(v[3].as_u64().unwrap() as u32), + ) + }) + .collect(), + fallback: BlockStateId(f["fallback"].as_u64().unwrap() as u32), + fluid: f + .get("fluid") + .map(|v| BlockStateId(v.as_u64().unwrap() as u32)), + fluids, + water_mask, + survival, + support, + calls: 0, + fail: f["fail"].as_i64().unwrap() as i32, + reject: f["reject"].as_i64().unwrap() as i32, + brightness: f["brightness"].as_i64().unwrap() as i32, + sea_level: f.get("sea").and_then(Value::as_i64).unwrap_or(63) as i32, + surface_height: f.get("height").and_then(Value::as_i64).unwrap_or(64) as i32, + air_above: f.get("air_above").and_then(Value::as_i64).map(|v| v as i32), + air: blocks.air, + destroy_success: f + .get("destroy_success") + .and_then(Value::as_bool) + .unwrap_or(true), + }; + match feature { + Err(_) => writeln!(world.out, "decode error")?, + Ok(mut feature) => { + writeln!(world.out, "decode ok")?; + let origin = std::array::from_fn(|i| f["origin"][i].as_i64().unwrap() as i32); + for _ in 0..f["repeats"].as_u64().unwrap() { + world.calls = 0; + let result = match &mut feature { + Feature::Weather(probe) => if probe.snow { + probe + .bindings + .should_snow(&mut world, &mut probe.temperature, origin) + } else { + probe.bindings.should_freeze( + &mut world, + &mut probe.temperature, + origin, + probe.require_edge, + ) + } + .map_err(|_| ()), + Feature::Map(feature) => feature + .place(&mut world, &mut random, origin) + .map_err(|_| ()), + Feature::Graph(feature) => feature + .place(&mut world, &mut random, origin, blocks) + .map_err(|_| ()), + Feature::Placed(feature) => feature + .place(&mut world, &mut random, origin, blocks) + .map_err(|_| ()), + }; + match result { + Ok(result) => writeln!(world.out, "place {result}")?, + Err(_) => writeln!(world.out, "place error")?, + } + writeln!( + world.out, + "next {} {}", + random.next_long(), + world.random.next_long() + )?; + writeln!(world.out, "calls {}", world.calls)?; + for (p, state) in &world.states { + writeln!(world.out, "stored {} {} {} {}", p[0], p[1], p[2], state.0)?; + } + for (p, (table, seed)) in &world.loot { + writeln!(world.out, "loot {} {} {} {table} {seed}", p[0], p[1], p[2])?; + } + for (p, (exit, exact)) in &world.gateways { + writeln!( + world.out, + "gateway {} {} {} {} {} {} {exact}", + p[0], p[1], p[2], exit[0], exit[1], exit[2] + )?; + } + writeln!(world.out, "end")?; + } + } + } + writeln!( + world.out, + "tail {} {}", + random.next_long(), + world.random.next_long() + )?; + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let read = |name: &str| -> Result<Tag, Box<dyn std::error::Error>> { + Ok( + nbt::read_named(&fs::read(dir.join(name))?, Limits::default())? + .0 + .tag, + ) + }; + let registry = BlockRegistry::from_nbt(&read("block-registry.nbt")?)?; + let collisions = CachedCollisionRegistry::from_nbt(&read("cached-collision.nbt")?, ®istry)?; + let properties = + BlockPropertiesRegistry::from_nbt(&read("block-properties.nbt")?, &collisions)?; + let support = Arc::new(BlockSupportRegistry::from_nbt( + &read("cached-support.nbt")?, + ®istry, + )?); + let resources: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?; + let mut tags = TagDefinitions::default(); + for (name, text) in resources { + tags.apply_json(&name, "vanilla", &text)?; + } + let tags = tags.build(|name, _| registry.default_state(name).map(|_| name.to_owned()))?; + assert!(tags.missing.is_empty()); + let definitions: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("survival-rules.json"))?)?; + let definitions = definitions + .into_iter() + .map(|(name, rule)| { + use SurvivalRule::*; + let rule = match rule.as_str() { + value if value.starts_with("TagBelow:") => TagBelow(value[9..].to_owned()), + "CactusFlower" => CactusFlower, + "Seagrass" => Seagrass, + "BubbleColumn" => BubbleColumn, + "RedstoneWire" => RedstoneWire, + "DoublePlant" => DoublePlant, + "Door" => Door, + "BigDripleaf" => BigDripleaf, + "BigDripleafStem" => BigDripleafStem, + "Farmland" => Farmland, + "Cocoa" => Cocoa, + "Crop" => Crop, + "GrowingPlant" => GrowingPlant, + "MangrovePropagule" => MangrovePropagule, + "Speleothem" => Speleothem, + "Scaffolding" => Scaffolding, + "PistonHead" => PistonHead, + "ChorusPlant" => ChorusPlant, + "ChorusFlower" => ChorusFlower, + "PitcherCrop" => PitcherCrop, + "Multiface" => Multiface, + "Vine" => Vine, + "HangingMoss" => HangingMoss, + "SnowLayer" => SnowLayer, + "SeaPickle" => SeaPickle, + "Fire" => Fire, + "Cactus" => Cactus, + "Path" => Path, + "Mushroom" => Mushroom, + "Bell" => Bell, + "SugarCane" => SugarCane, + "LilyPad" => LilyPad, + "Frogspawn" => Frogspawn, + "SporeBlossom" => SporeBlossom, + "SmallDripleaf" => SmallDripleaf, + "TallSeagrass" => TallSeagrass, + "Always" => Always, + "SolidBelow" => SolidBelow, + "SolidBehind" => SolidBehind, + "NonAirBelow" => NonAirBelow, + "MossCarpet" => MossCarpet, + "CenterBelow" => CenterBelow, + "Lantern" => Lantern, + "FullAbove" => FullAbove, + "FullBehind" => FullBehind, + "RigidOrCenterBelow" => RigidOrCenterBelow, + "RigidBelow" => RigidBelow, + "FullBelow" => FullBelow, + "CenterAbove" => CenterAbove, + "FaceAttached" => FaceAttached, + "SupportsBamboo" => SupportsBamboo, + _ => panic!("unknown rule {rule}"), + }; + (name, rule) + }) + .collect(); + let fluid_resources: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("fluid-tags.json"))?)?; + let mut fluid_tags = TagDefinitions::default(); + for (name, text) in fluid_resources { + fluid_tags.apply_json(&name, "vanilla", &text)?; + } + let fluid_tags = + fluid_tags.build(|name, _| FluidKind::from_name(name).map(|_| name.to_owned()))?; + assert!(fluid_tags.missing.is_empty()); + let fluids = FluidStateTable::new(®istry)?; + let collision = Arc::new(BlockCollisionRegistry::new(Arc::new(collisions))?); + let extra: Value = serde_json::from_str(&fs::read_to_string( + dir.join("survival-extra-definitions.json"), + )?)?; + let definitions = SurvivalDefinitions { + rules: definitions, + ignition_odds: serde_json::from_value(extra["ignition_odds"].clone())?, + fence_gates: serde_json::from_value(extra["fence_gates"].clone())?, + }; + let survival = BlockSurvivalRegistry::new( + ®istry, + &properties, + support.clone(), + collision.clone(), + &definitions, + &tags.tags, + &fluid_tags.tags, + )?; + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts.json"))?)?; + let integers: std::collections::BTreeSet<(String, String)> = facts["integers"] + .as_array() + .unwrap() + .iter() + .map(|v| { + ( + v[0].as_str().unwrap().to_owned(), + v[1].as_str().unwrap().to_owned(), + ) + }) + .collect(); + let providers = StateProviderBindings::new(®istry, integers.clone(), &tags.tags)? + .with_block_properties(&properties)? + .with_fluid_tags(&fluid_tags.tags)?; + let resources: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("catalog.json"))?)?; + let catalog = StateProviderCatalog::from_resources(&resources)?; + let definitions: Value = + serde_json::from_str(&fs::read_to_string(dir.join("placement-definitions.json"))?)?; + let placement = BlockPlacementBindings::new( + ®istry, + &properties, + &serde_json::from_value(definitions["double_plants"].clone())?, + &serde_json::from_value(definitions["mossy_carpets"].clone())?, + )?; + let feature_bindings = + FeatureBlockBindings::with_tags(®istry, integers.clone(), &tags.tags)? + .with_block_properties(&properties)? + .with_fluid_tags(&fluid_tags.tags)? + .with_state_providers( + StateProviderBindings::new(®istry, integers, &tags.tags)? + .with_block_properties(&properties)? + .with_fluid_tags(&fluid_tags.tags)?, + StateProviderCatalog::from_resources(&resources)?, + BlockPlacementBindings::new( + ®istry, + &properties, + &serde_json::from_value(definitions["double_plants"].clone())?, + &serde_json::from_value(definitions["mossy_carpets"].clone())?, + )?, + )?; + let feature_resources: Value = + serde_json::from_str(&fs::read_to_string(dir.join("feature-catalog.json"))?)?; + let feature_catalog = FeatureCatalog::from_resources( + &serde_json::from_value(feature_resources["features"].clone())?, + &serde_json::from_value(feature_resources["placed"].clone())?, + &TagDefinitions::default(), + )?; + let blocks = FeatureBlocks::from_registry(®istry)?; + let water_mask = fluid_tags.tags["minecraft:water"] + .iter() + .fold(0, |mask, name| { + mask | FluidKind::from_name(name).unwrap().mask() + }); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in io::BufReader::new(fs::File::open(dir.join("inputs.txt"))?).lines() { + let f: Value = serde_json::from_str(&line?)?; + let seed = f["seed"].as_i64().unwrap(); + let world_seed = f["world_seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture( + &f, + LegacyRandom::new(seed), + LegacyRandom::new(world_seed), + &providers, + &catalog, + &placement, + &feature_bindings, + &feature_catalog, + blocks, + &survival, + &support, + &collision, + &fluids, + water_mask, + &mut out, + )?; + } else { + fixture( + &f, + XoroshiroRandom::new(seed), + XoroshiroRandom::new(world_seed), + &providers, + &catalog, + &placement, + &feature_bindings, + &feature_catalog, + blocks, + &survival, + &support, + &collision, + &fluids, + water_mask, + &mut out, + )?; + } + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-world/examples/simple_container_fixture.rs b/crates/horizon-world/examples/simple_container_fixture.rs new file mode 100644 index 000000000..44f9a382a --- /dev/null +++ b/crates/horizon-world/examples/simple_container_fixture.rs @@ -0,0 +1,253 @@ +use horizon_world::{ + component_patch::{Patch, Prototype}, + item_stack_refs::{ItemStacks, StackRef}, + simple_container::{ContainerHooks, SimpleContainer}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +type Stack = StackRef<u8, usize, i32>; +type Container = SimpleContainer<u8, usize, i32>; +fn integer(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn opt(v: Option<i32>) -> String { + v.map_or("none".into(), |v| v.to_string()) +} +fn max(s: &Stack) -> i32 { + s.read().component(&0).copied().unwrap_or(1) +} +struct World { + out: io::BufWriter<fs::File>, + refs: Vec<Stack>, + ids: Vec<Stack>, + empty: Stack, + op: Value, + calls: i32, +} +impl World { + fn snapshot(&mut self, s: &Stack) -> String { + let id = self + .ids + .iter() + .position(|v| v.same_reference(s)) + .unwrap_or_else(|| { + self.ids.push(s.clone()); + self.ids.len() - 1 + }); + let s = s.read(); + let patch = s.components.as_patch(); + format!( + "{} {} {} {} {} {} {} | {} | {}", + id, + s.item(), + s.count, + s.count(), + s.pop_time, + s.is_empty(), + s.component(&0).copied().unwrap_or(1), + (0..3) + .map(|k| opt(s.component(&k).copied())) + .collect::<Vec<_>>() + .join(","), + patch + .entries() + .iter() + .map(|(k, v)| format!("{k}={}", opt(*v))) + .collect::<Vec<_>>() + .join(",") + ) + } + fn all(&mut self, c: &Container) { + for i in 0..self.refs.len() { + let s = self.snapshot(&self.refs[i].clone()); + writeln!(self.out, "ref {i} {s}").unwrap(); + } + for (i, s) in c.items().iter().enumerate() { + let s = self.snapshot(s); + writeln!(self.out, "slot {i} {s}").unwrap(); + } + let s = self.snapshot(&self.empty.clone()); + writeln!(self.out, "empty {s}").unwrap(); + writeln!( + self.out, + "container {} {} {} {} {}", + c.size(), + c.is_empty(), + c.count_item(0), + c.count_item(1), + c.count_item(2) + ) + .unwrap(); + } + fn event(&mut self, c: &mut Container, name: &str) -> Result<(), ()> { + self.calls += 1; + writeln!(self.out, "event {name} {}", self.calls).unwrap(); + self.all(c); + if self.calls == integer(&self.op, "fail_at") { + return Err(()); + } + if self.calls == integer(&self.op, "mutate_at") { + let i = integer(&self.op, "mutate_ref") as usize; + let mut s = self.refs[i].write(); + s.count = integer(&self.op, "after_count"); + s.components + .set(0, Some(integer(&self.op, "after_max"))) + .map_err(|_| ())?; + drop(s); + let slot = integer(&self.op, "mutate_slot"); + if slot >= 0 && (slot as usize) < c.size() { + c.items_mut()[slot as usize] = + self.refs[integer(&self.op, "replace_ref") as usize].clone(); + } + } + Ok(()) + } +} +impl ContainerHooks<u8, usize, i32> for World { + type Error = (); + fn max_stack_size(&mut self, c: &mut Container) -> Result<i32, ()> { + self.event(c, "max")?; + Ok(integer(&self.op, "max")) + } + fn item_max_stack_size(&self, s: &Stack) -> i32 { + max(s) + } + fn changed(&mut self, c: &mut Container) -> Result<(), ()> { + self.event(c, "changed") + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let prototypes: Vec<_> = f["prototypes"] + .as_array() + .unwrap() + .iter() + .map(|p| { + Prototype::new(p.as_array().unwrap().iter().map(|v| { + ( + v[0].as_u64().unwrap() as usize, + v[1].as_i64().unwrap() as i32, + ) + })) + }) + .collect(); + let stacks = ItemStacks::new(0); + let empty = stacks.empty(); + let refs: Vec<_> = f["stacks"] + .as_array() + .unwrap() + .iter() + .map(|v| { + let item = integer(v, "item"); + if item < 0 { + empty.clone() + } else { + let s = stacks.create( + item as u8, + integer(v, "count"), + prototypes[item as usize].clone(), + ); + s.write().pop_time = integer(v, "pop"); + s.write().components.restore_patch(&Patch::new( + v["patch"].as_array().unwrap().iter().map(|v| { + ( + v[0].as_u64().unwrap() as usize, + v[1].as_i64().map(|n| n as i32), + ) + }), + )); + s + } + }) + .collect(); + let mut c = Container::from_items( + f["slots"] + .as_array() + .unwrap() + .iter() + .map(|i| refs[i.as_u64().unwrap() as usize].clone()) + .collect(), + stacks.clone(), + ); + let mut w = World { + out, + refs, + ids: vec![empty.clone()], + empty, + op: Value::Null, + calls: 0, + }; + w.all(&c); + for op in f["ops"].as_array().unwrap() { + w.op = op.clone(); + w.calls = 0; + let a = integer(op, "a") as usize; + let b = integer(op, "b") as usize; + let slot = integer(op, "slot"); + let amount = integer(op, "amount"); + let result = (|| -> Result<(), ()> { + match op["kind"].as_str().unwrap() { + "set" => c.set(slot, w.refs[a].clone(), &mut w).map_err(|_| ())?, + "add" => { + let input = w.refs[a].clone(); + w.refs[b] = c.add(&input, &mut w).map_err(|_| ())?; + } + "remove" => w.refs[b] = c.remove(slot, amount, &mut w).map_err(|_| ())?, + "remove-type" => { + let i = integer(op, "item") as usize; + w.refs[b] = c + .remove_type(i as u8, prototypes[i].clone(), amount, &mut w) + .map_err(|_| ())?; + } + "no-update" => w.refs[b] = c.remove_no_update::<()>(slot).map_err(|_| ())?, + "clear" => c.clear(&mut w).map_err(|_| ())?, + "all" => { + let result = c.remove_all(&mut w).map_err(|_| ())?; + writeln!(w.out, "all-size {}", result.len()).unwrap(); + for s in result { + let s = w.snapshot(&s); + writeln!(w.out, "removed {s}").unwrap(); + } + } + "can-add" => { + let v = c.can_add(&w.refs[a], &w); + writeln!(w.out, "can-add {v}").unwrap(); + } + "get" => w.refs[b] = c.get(slot), + "alias" => w.refs[b] = w.refs[a].clone(), + "copy" => w.refs[b] = stacks.copy(&w.refs[a]), + "count" => w.refs[a].write().count = amount, + "component" => { + w.refs[a] + .write() + .components + .set( + integer(op, "key") as usize, + op["value"].as_i64().map(|n| n as i32), + ) + .map_err(|_| ())?; + } + _ => panic!("operation"), + } + Ok(()) + })(); + writeln!( + w.out, + "result {} {}", + if result.is_ok() { "ok" } else { "error" }, + w.calls + )?; + w.all(&c); + } + out = w.out; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/state_provider_fixture.rs b/crates/horizon-world/examples/state_provider_fixture.rs new file mode 100644 index 000000000..e8a8f9f5a --- /dev/null +++ b/crates/horizon-world/examples/state_provider_fixture.rs @@ -0,0 +1,540 @@ +use horizon_core::random::{LegacyRandom, RandomSource, WorldgenRandom, XoroshiroRandom}; +use horizon_world::{ + DATA_VERSION, + block_collision::{BlockCollisionRegistry, DynamicCollisionWorld, ShulkerCollisionState}, + block_support::{BlockSupportRegistry, SupportType}, + block_survival::{BlockSurvivalRegistry, SurvivalDefinitions, SurvivalRule, SurvivalWorld}, + fluid::{FluidKind, FluidStateTable}, + heightmap::HeightmapType, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, + worldgen::{ + anchor::WorldGenerationContext, + biome::BiomeId, + biome_predicate::BiomePredicateBindings, + feature::FeatureWorld, + placement::{PlacementContext, PlacementQueryError}, + state_provider::{StateProviderBindings, StateProviderCatalog}, + tags::TagDefinitions, + }, +}; +use serde_json::Value; +use std::{ + collections::{BTreeMap, BTreeSet}, + fs, + io::{self, Write}, + path::Path, + sync::Arc, +}; +struct World<'a, W> { + support: &'a BlockSupportRegistry<'a>, + survival: &'a BlockSurvivalRegistry<'a>, + out: &'a mut W, + fallback: BlockStateId, + biome: BiomeId, + unobstructed: bool, + brightness: i32, + tags: &'a BTreeMap<String, BTreeSet<BlockStateId>>, + calls: i32, + fail: i32, + queries: i32, + query_fail: i32, + bounds: [i32; 3], +} +impl<W: Write> FeatureWorld for World<'_, W> { + type Error = (); + fn block(&mut self, p: [i32; 3]) -> Result<BlockStateId, ()> { + writeln!(self.out, "read {} {} {}", p[0], p[1], p[2]).map_err(|_| ())?; + let call = self.calls; + self.calls += 1; + if call == self.fail { + Err(()) + } else { + Ok(self.fallback) + } + } + fn set_block(&mut self, _: [i32; 3], _: BlockStateId, _: i32) -> Result<bool, ()> { + panic!("providers must not write blocks") + } +} +impl<W: Write> World<'_, W> { + fn query(&mut self, name: &str, value: i32) -> Result<i32, PlacementQueryError> { + writeln!(self.out, "{name}").map_err(|_| PlacementQueryError::Unavailable)?; + let call = self.queries; + self.queries += 1; + if call == self.query_fail { + Err(PlacementQueryError::Unavailable) + } else { + Ok(value) + } + } +} +impl<W: Write> horizon_world::dynamic_support::DynamicSupportWorld for World<'_, W> { + type Error = PlacementQueryError; + fn shulker_is_closed(&mut self, p: [i32; 3]) -> Result<Option<bool>, Self::Error> { + self.query(&format!("entity {} {} {}", p[0], p[1], p[2]), 0)?; + Ok(None) + } + fn moving_piston_shape( + &mut self, + p: [i32; 3], + ) -> Result<Option<horizon_core::geometry::VoxelShape>, Self::Error> { + self.query(&format!("entity {} {} {}", p[0], p[1], p[2]), 0)?; + Ok(None) + } +} +impl<W: Write> DynamicCollisionWorld for World<'_, W> { + fn shulker_collision_state( + &mut self, + p: [i32; 3], + ) -> Result<Option<ShulkerCollisionState>, Self::Error> { + self.query(&format!("entity {} {} {}", p[0], p[1], p[2]), 0)?; + Ok(None) + } +} +impl<W: Write> SurvivalWorld for World<'_, W> { + fn fluid_state( + &mut self, + p: [i32; 3], + ) -> Result<horizon_world::fluid::FluidState, Self::Error> { + self.query(&format!("fluid {} {} {}", p[0], p[1], p[2]), 0)?; + horizon_world::fluid::FluidState::from_block( + self.support.registry().state(self.fallback).unwrap(), + ) + .map_err(|_| PlacementQueryError::Unavailable) + } + fn raw_brightness(&mut self, p: [i32; 3], sky_darken: i32) -> Result<i32, Self::Error> { + self.query( + &format!("light {} {} {} {sky_darken}", p[0], p[1], p[2]), + self.brightness, + ) + } + fn block_state(&mut self, position: [i32; 3]) -> Result<BlockStateId, Self::Error> { + self.block(position) + .map_err(|_| PlacementQueryError::Unavailable) + } +} +impl<W: Write> PlacementContext for World<'_, W> { + fn block_survives( + &mut self, + state: BlockStateId, + position: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + let survival = self.survival; + survival + .can_survive(self, state, position) + .map_err(|_| PlacementQueryError::Unavailable) + } + fn face_sturdy( + &mut self, + p: [i32; 3], + direction: horizon_core::geometry::Direction, + ) -> Result<bool, PlacementQueryError> { + let state = self + .block(p) + .map_err(|_| PlacementQueryError::Unavailable)?; + let support = self.support; + support + .is_face_sturdy(self, state, p, direction, SupportType::Full) + .map_err(|_| PlacementQueryError::Unavailable) + } + + fn unobstructed_block(&mut self, p: [i32; 3]) -> Result<bool, PlacementQueryError> { + let min = p.map(f64::from); + let max = min.map(|v| v + 1.0); + let label = format!( + "clear {:016x} {:016x} {:016x} {:016x} {:016x} {:016x}", + min[0].to_bits(), + min[1].to_bits(), + min[2].to_bits(), + max[0].to_bits(), + max[1].to_bits(), + max[2].to_bits() + ); + self.query(&label, i32::from(self.unobstructed)) + .map(|value| value != 0) + } + fn biome_identity(&mut self, p: [i32; 3]) -> Result<BiomeId, PlacementQueryError> { + self.query( + &format!("biome {} {} {}", p[0], p[1], p[2]), + self.biome.0 as i32, + ) + .map(|id| BiomeId(id as u32)) + } + fn generation(&self) -> WorldGenerationContext { + WorldGenerationContext { + min_y: self.bounds[0], + height: self.bounds[1], + sea_level: self.bounds[2], + } + } + fn predicate_generation(&mut self) -> Result<WorldGenerationContext, PlacementQueryError> { + let min_y = self.min_y()?; + let height = self.query("height", self.bounds[1])?; + let sea_level = self.query("sea", self.bounds[2])?; + Ok(WorldGenerationContext { + min_y, + height, + sea_level, + }) + } + fn block_state(&mut self, position: [i32; 3]) -> Result<BlockStateId, PlacementQueryError> { + self.block(position) + .map_err(|_| PlacementQueryError::Unavailable) + } + fn block_matches_tag( + &mut self, + position: [i32; 3], + tag: &str, + ) -> Result<bool, PlacementQueryError> { + let state = self + .block(position) + .map_err(|_| PlacementQueryError::Unavailable)?; + Ok(self + .tags + .get(tag) + .is_some_and(|states| states.contains(&state))) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + self.query("min", self.bounds[0]) + } + fn max_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(self + .min_y()? + .wrapping_add(self.query("height", self.bounds[1])?) + .wrapping_sub(1)) + } + fn height(&mut self, _: HeightmapType, _: i32, _: i32) -> Result<i32, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } +} +fn fixture( + f: &Value, + bindings: &StateProviderBindings<'_>, + catalog: &StateProviderCatalog, + tags: &BTreeMap<String, BTreeSet<BlockStateId>>, + support: (&BlockSupportRegistry<'_>, &BlockSurvivalRegistry<'_>), + mut random: impl RandomSource, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let json = f["definition"].as_str().unwrap(); + let decoded = if f["holder"].as_bool().unwrap_or(false) { + catalog.provider(json, bindings) + } else if f["typed"].as_bool().unwrap() { + catalog.typed_provider(json, bindings) + } else { + catalog.direct_provider(json, bindings) + }; + match decoded { + Err(_) => writeln!(out, "decode error")?, + Ok(provider) => { + writeln!(out, "decode ok")?; + let mut world = World { + support: support.0, + survival: support.1, + out, + tags, + fallback: BlockStateId(0), + biome: BiomeId(0), + unobstructed: f["unobstructed"].as_bool().unwrap_or(true), + brightness: f["brightness"].as_i64().unwrap_or(15) as i32, + calls: 0, + queries: 0, + query_fail: f["query_fail"].as_i64().unwrap_or(-1) as i32, + bounds: f + .get("bounds") + .map(|v| std::array::from_fn(|i| v[i].as_i64().unwrap() as i32)) + .unwrap_or([-64, 384, 63]), + fail: f["fail"].as_i64().unwrap() as i32, + }; + let mut position_index = 0usize; + let mut sample_index = 0usize; + for repeat in 0..f["repeats"].as_i64().unwrap() as i32 { + for state in f["states"].as_array().unwrap() { + world.fallback = BlockStateId(state.as_u64().unwrap() as u32); + world.biome = f + .get("biomes") + .map(|values| { + let values = values.as_array().unwrap(); + BiomeId(values[sample_index % values.len()].as_u64().unwrap() as u32) + }) + .unwrap_or(BiomeId(0)); + sample_index += 1; + let p = if let Some(positions) = f.get("positions") { + let positions = positions.as_array().unwrap(); + let p = &positions[position_index % positions.len()]; + position_index += 1; + std::array::from_fn(|i| p[i].as_i64().unwrap() as i32) + } else { + [17, repeat - 64, -33] + }; + for optional in [false, true] { + let result = if optional { + provider.get_optional_state(&mut world, &mut random, p) + } else { + provider.get_state(&mut world, &mut random, p).map(Some) + }; + match result { + Ok(Some(state)) => writeln!(world.out, "state {}", state.0)?, + Ok(None) => writeln!(world.out, "state none")?, + Err(_) => writeln!(world.out, "state error")?, + } + writeln!(world.out, "next {}", random.next_long())?; + } + } + } + } + } + writeln!(out, "tail {}", random.next_long())?; + Ok(()) +} +fn tag(v: &Value) -> Tag { + match v { + Value::String(s) => Tag::String(s.as_str().into()), + Value::Number(n) => Tag::Int(n.as_i64().unwrap() as i32), + Value::Array(a) => Tag::List(a.iter().map(tag).collect()), + Value::Object(m) => { + Tag::Compound(m.iter().map(|(k, v)| (k.as_str().into(), tag(v))).collect()) + } + _ => panic!("invalid registry metadata"), + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ("states", tag(&facts["states"])), + ("defaults", tag(&facts["defaults"])), + ]))?; + let integers = facts["integers"] + .as_array() + .unwrap() + .iter() + .map(|v| { + ( + v[0].as_str().unwrap().to_owned(), + v[1].as_str().unwrap().to_owned(), + ) + }) + .collect(); + let resources: Value = serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?; + let mut definitions = TagDefinitions::default(); + for (name, text) in resources.as_object().unwrap() { + definitions.apply_json(name, "vanilla", text.as_str().unwrap())?; + } + let built = + definitions.build(|name, _| registry.default_state(name).map(|_| name.to_owned()))?; + assert!(built.missing.is_empty()); + let tag_states: BTreeMap<String, BTreeSet<BlockStateId>> = built + .tags + .iter() + .map(|(tag, names)| { + let states = (0..registry.len()) + .map(|i| BlockStateId(i as u32)) + .filter(|id| names.contains(®istry.state(*id).unwrap().name)) + .collect(); + (tag.clone(), states) + }) + .collect(); + let fluid_resources: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("fluid-tags.json"))?)?; + let mut fluid_tags = TagDefinitions::default(); + for (name, text) in fluid_resources { + fluid_tags.apply_json(&name, "vanilla", &text)?; + } + let fluid_tags = + fluid_tags.build(|name, _| FluidKind::from_name(name).map(|_| name.to_owned()))?; + assert!(fluid_tags.missing.is_empty()); + let biome_resources: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("biomes.json"))?)?; + let biome_names: BTreeMap<String, BiomeId> = biome_resources + .keys() + .enumerate() + .map(|(i, name)| (name.clone(), BiomeId(i as u32))) + .collect(); + let biome_tags: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("biome_tags.json"))?)?; + let mut definitions = TagDefinitions::default(); + for (name, text) in biome_tags { + definitions.apply_json(&name, "vanilla", &text)?; + } + let biome_tags = + definitions.build(|name, _| biome_names.contains_key(name).then(|| name.to_owned()))?; + assert!(biome_tags.missing.is_empty()); + let biomes = Arc::new(BiomePredicateBindings::new(&biome_names, &biome_tags.tags)?); + let collision_tag = horizon_world::nbt::read_named( + &fs::read(dir.join("cached-collision.nbt"))?, + horizon_world::nbt::Limits::default(), + )? + .0 + .tag; + let collision = + horizon_world::collision::CachedCollisionRegistry::from_nbt(&collision_tag, ®istry)?; + let properties_tag = horizon_world::nbt::read_named( + &fs::read(dir.join("block-properties.nbt"))?, + horizon_world::nbt::Limits::default(), + )? + .0 + .tag; + let properties = horizon_world::block_properties::BlockPropertiesRegistry::from_nbt( + &properties_tag, + &collision, + )?; + let support_tag = horizon_world::nbt::read_named( + &fs::read(dir.join("cached-support.nbt"))?, + horizon_world::nbt::Limits::default(), + )? + .0 + .tag; + let support = Arc::new(BlockSupportRegistry::from_nbt(&support_tag, ®istry)?); + let survival_definitions: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("survival-rules.json"))?)?; + let survival_definitions = survival_definitions + .into_iter() + .map(|(name, rule)| { + use SurvivalRule::*; + let rule = match rule.as_str() { + value if value.starts_with("TagBelow:") => TagBelow(value[9..].to_owned()), + "CactusFlower" => CactusFlower, + "Seagrass" => Seagrass, + "BubbleColumn" => BubbleColumn, + "RedstoneWire" => RedstoneWire, + "DoublePlant" => DoublePlant, + "Door" => Door, + "BigDripleaf" => BigDripleaf, + "BigDripleafStem" => BigDripleafStem, + "Farmland" => Farmland, + "Cocoa" => Cocoa, + "Crop" => Crop, + "GrowingPlant" => GrowingPlant, + "MangrovePropagule" => MangrovePropagule, + "Speleothem" => Speleothem, + "Scaffolding" => Scaffolding, + "PistonHead" => PistonHead, + "ChorusPlant" => ChorusPlant, + "ChorusFlower" => ChorusFlower, + "PitcherCrop" => PitcherCrop, + "Multiface" => Multiface, + "Vine" => Vine, + "HangingMoss" => HangingMoss, + "SnowLayer" => SnowLayer, + "SeaPickle" => SeaPickle, + "Fire" => Fire, + "Cactus" => Cactus, + "Path" => Path, + "Mushroom" => Mushroom, + "Bell" => Bell, + "SugarCane" => SugarCane, + "LilyPad" => LilyPad, + "Frogspawn" => Frogspawn, + "SporeBlossom" => SporeBlossom, + "SmallDripleaf" => SmallDripleaf, + "TallSeagrass" => TallSeagrass, + "Always" => Always, + "SolidBelow" => SolidBelow, + "SolidBehind" => SolidBehind, + "NonAirBelow" => NonAirBelow, + "MossCarpet" => MossCarpet, + "CenterBelow" => CenterBelow, + "Lantern" => Lantern, + "FullAbove" => FullAbove, + "FullBehind" => FullBehind, + "RigidOrCenterBelow" => RigidOrCenterBelow, + "RigidBelow" => RigidBelow, + "FullBelow" => FullBelow, + "CenterAbove" => CenterAbove, + "FaceAttached" => FaceAttached, + "SupportsBamboo" => SupportsBamboo, + _ => panic!("unknown survival rule {rule}"), + }; + (name, rule) + }) + .collect(); + let collision = Arc::new(BlockCollisionRegistry::new(Arc::new(collision))?); + let extra: Value = serde_json::from_str(&fs::read_to_string( + dir.join("survival-extra-definitions.json"), + )?)?; + let survival_definitions = SurvivalDefinitions { + rules: survival_definitions, + ignition_odds: serde_json::from_value(extra["ignition_odds"].clone())?, + fence_gates: serde_json::from_value(extra["fence_gates"].clone())?, + }; + let survival = BlockSurvivalRegistry::new( + ®istry, + &properties, + Arc::clone(&support), + collision, + &survival_definitions, + &built.tags, + &fluid_tags.tags, + )?; + let bindings = StateProviderBindings::new(®istry, integers, &built.tags)? + .with_block_properties(&properties)? + .with_fluid_tags(&fluid_tags.tags)? + .with_biomes(biomes); + let resources: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("catalog.json"))?)?; + let catalog = StateProviderCatalog::from_resources(&resources)?; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + let fluids = FluidStateTable::new(®istry)?; + for i in 0..registry.len() { + let fluid = fluids.get(BlockStateId(i as u32)).unwrap(); + writeln!( + out, + "fluid {i} {} {} {} {} {}", + fluid.kind().name(), + fluid.amount(), + fluid.falling(), + fluid.is_source(), + fluid.own_height().to_bits() + )?; + } + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + match ( + f["legacy"].as_bool().unwrap(), + f["worldgen"].as_bool().unwrap(), + ) { + (true, false) => fixture( + &f, + &bindings, + &catalog, + &tag_states, + (&support, &survival), + LegacyRandom::new(seed), + &mut out, + )?, + (false, false) => fixture( + &f, + &bindings, + &catalog, + &tag_states, + (&support, &survival), + XoroshiroRandom::new(seed), + &mut out, + )?, + (true, true) => fixture( + &f, + &bindings, + &catalog, + &tag_states, + (&support, &survival), + WorldgenRandom::new(LegacyRandom::new(seed)), + &mut out, + )?, + (false, true) => fixture( + &f, + &bindings, + &catalog, + &tag_states, + (&support, &survival), + WorldgenRandom::new(XoroshiroRandom::new(seed)), + &mut out, + )?, + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/status_effect_fixture.rs b/crates/horizon-world/examples/status_effect_fixture.rs new file mode 100644 index 000000000..759aad818 --- /dev/null +++ b/crates/horizon-world/examples/status_effect_fixture.rs @@ -0,0 +1,149 @@ +use horizon_world::status_effect::{BlendState, Details, EffectInstance}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +type Effect = EffectInstance<u8>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn fl(v: &Value, k: &str) -> f32 { + f32::from_bits(v[k].as_u64().unwrap() as u32) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { 0x7fc00000 } else { v.to_bits() } +} +fn details(v: &Value) -> Details { + Details { + duration: n(v, "duration"), + amplifier: n(v, "amplifier"), + ambient: v["ambient"].as_bool().unwrap(), + visible: v["visible"].as_bool().unwrap(), + show_icon: v["icon"].as_bool().unwrap(), + } +} +fn id(ids: &mut Vec<Effect>, e: &Effect) -> usize { + if let Some(i) = ids.iter().position(|v| v.same_reference(e)) { + i + } else { + ids.push(e.clone()); + ids.len() - 1 + } +} +fn dump(out: &mut dyn Write, slots: &[Effect], ids: &mut Vec<Effect>) { + let mut visit = Vec::<Effect>::new(); + for (i, e) in slots.iter().enumerate() { + writeln!(out, "slot {i} {}", id(ids, e)).unwrap(); + if !visit.iter().any(|v| v.same_reference(e)) { + visit.push(e.clone()); + } + } + let mut i = 0; + while i < visit.len() { + let e = visit[i].clone(); + let d = e.read(); + let h = d + .hidden + .as_ref() + .map(|v| id(ids, v).to_string()) + .unwrap_or("none".into()); + if let Some(v) = &d.hidden { + if !visit.iter().any(|e| e.same_reference(v)) { + visit.push(v.clone()); + } + } + writeln!( + out, + "node {} {} {} {} {} {} {} {h} {} {}", + id(ids, &e), + d.effect, + d.details.duration, + d.details.amplifier, + d.details.ambient, + d.details.visible, + d.details.show_icon, + bits(d.blend.factor), + bits(d.blend.previous) + ) + .unwrap(); + i += 1; + } +} +fn run(f: Value, out: &mut dyn Write) { + let mut slots: Vec<Effect> = Vec::new(); + for v in f["instances"].as_array().unwrap() { + let h = n(v, "hidden"); + let e = Effect::new( + n(v, "effect") as u8, + details(v), + (h >= 0).then(|| slots[h as usize].clone()), + ); + slots.push(e); + } + let mut ids = Vec::new(); + dump(out, &slots, &mut ids); + for op in f["ops"].as_array().unwrap() { + let a = n(op, "a") as usize; + let b = n(op, "b") as usize; + let result = match op["op"].as_str().unwrap() { + "alias" => { + slots[b] = slots[a].clone(); + "ok".into() + } + "copy" => { + slots[b] = slots[a].copy_instance(); + "ok".into() + } + "scale" => { + slots[b] = slots[a].scaled(fl(op, "factor")); + "ok".into() + } + "update" => slots[a].update(&slots[b]).to_string(), + "eq" => (slots[a] == slots[b]).to_string(), + "same" => slots[a].same_reference(&slots[b]).to_string(), + "ends" => slots[a].ends_within(n(op, "value")).to_string(), + "infinite" => slots[a].infinite().to_string(), + "copy-blend" => { + slots[a].copy_blend_from(&slots[b]); + "ok".into() + } + "set" => { + let mut e = slots[a].write(); + e.details = details(op); + e.blend = BlendState { + factor: fl(op, "factor"), + previous: fl(op, "previous"), + }; + "ok".into() + } + "map" => slots[a] + .map_duration(|value| { + writeln!(out, "map {value}").unwrap(); + if op["mutate"].as_bool().unwrap() { + slots[b].write().details.duration = n(op, "value"); + } + if op["fail"].as_bool().unwrap() { + Err("callback") + } else { + Ok(value.wrapping_mul(n(op, "value"))) + } + }) + .map(|v| v.to_string()) + .unwrap_or_else(str::to_string), + _ => panic!("unknown operation"), + }; + writeln!(out, "result {result}").unwrap(); + dump(out, &slots, &mut ids); + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + run(serde_json::from_str(line)?, &mut out); + } + Ok(()) +} diff --git a/crates/horizon-world/examples/status_tick_fixture.rs b/crates/horizon-world/examples/status_tick_fixture.rs new file mode 100644 index 000000000..22aa0d412 --- /dev/null +++ b/crates/horizon-world/examples/status_tick_fixture.rs @@ -0,0 +1,221 @@ +use horizon_world::status_effect::{BlendState, Details, EffectInstance}; +use horizon_world::status_effect::{BlendWorld, TickWorld}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +type Effect = EffectInstance<u8>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn fl(v: &Value, k: &str) -> f32 { + f32::from_bits(v[k].as_u64().unwrap() as u32) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { 0x7fc00000 } else { v.to_bits() } +} +fn details(v: &Value) -> Details { + Details { + duration: n(v, "duration"), + amplifier: n(v, "amplifier"), + ambient: v["ambient"].as_bool().unwrap(), + visible: v["visible"].as_bool().unwrap(), + show_icon: v["icon"].as_bool().unwrap(), + } +} +fn id(ids: &mut Vec<Effect>, e: &Effect) -> usize { + if let Some(i) = ids.iter().position(|v| v.same_reference(e)) { + i + } else { + ids.push(e.clone()); + ids.len() - 1 + } +} +fn dump(out: &mut dyn Write, slots: &[Effect], ids: &mut Vec<Effect>) { + let mut visit = Vec::<Effect>::new(); + for (i, e) in slots.iter().enumerate() { + writeln!(out, "slot {i} {}", id(ids, e)).unwrap(); + if !visit.iter().any(|v| v.same_reference(e)) { + visit.push(e.clone()); + } + } + let mut i = 0; + while i < visit.len() { + let e = visit[i].clone(); + let d = e.read(); + let h = d + .hidden + .as_ref() + .map(|v| id(ids, v).to_string()) + .unwrap_or("none".into()); + if let Some(v) = &d.hidden { + if !visit.iter().any(|e| e.same_reference(v)) { + visit.push(v.clone()); + } + } + writeln!( + out, + "node {} {} {} {} {} {} {} {h} {} {}", + id(ids, &e), + d.effect, + d.details.duration, + d.details.amplifier, + d.details.ambient, + d.details.visible, + d.details.show_icon, + bits(d.blend.factor), + bits(d.blend.previous) + ) + .unwrap(); + i += 1; + } +} +struct World<'a> { + f: Value, + out: &'a mut dyn Write, + slots: Vec<Effect>, + ids: Vec<Effect>, + calls: i32, + changed: bool, +} +impl World<'_> { + fn config(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn reset(&mut self) { + let c = self.config().clone(); + for (i, v) in c["instances"].as_array().unwrap().iter().enumerate() { + let mut e = self.slots[i].write(); + e.details = details(v); + e.blend = BlendState { + factor: fl(v, "factor"), + previous: fl(v, "previous"), + }; + } + } + fn all(&mut self) { + writeln!( + self.out, + "state {} {} {}", + self.calls, + self.changed, + n(self.config(), "tick") + ) + .unwrap(); + dump(self.out, &self.slots, &mut self.ids); + } + fn event(&mut self, name: String) -> Result<(), &'static str> { + writeln!(self.out, "event {name}").unwrap(); + let i = self.calls; + self.calls += 1; + self.all(); + if i == n(&self.f, "fail") { + return Err("callback"); + } + if i == n(&self.f, "mutate") { + self.changed = true; + self.reset(); + } + Ok(()) + } +} +impl TickWorld<u8> for World<'_> { + type Error = &'static str; + type Level = i32; + fn actor_tick_count(&self) -> i32 { + n(self.config(), "tick") + } + fn should_apply( + &mut self, + e: u8, + time: i32, + amp: i32, + _: &Effect, + ) -> Result<bool, Self::Error> { + self.event(format!("should {e} {time} {amp}"))?; + Ok(self.config()["should"].as_bool().unwrap()) + } + fn apply_tick(&mut self, e: u8, l: i32, amp: i32, _: &Effect) -> Result<bool, Self::Error> { + self.event(format!("apply {e} {l} {amp}"))?; + Ok(self.config()["apply"].as_bool().unwrap()) + } + fn downgraded(&mut self, _: &Effect) -> Result<(), Self::Error> { + self.event("downgrade".into()) + } +} +impl BlendWorld<u8> for World<'_> { + type Error = &'static str; + fn advance_ticks(&mut self, e: u8, _: &Effect) -> Result<i32, Self::Error> { + self.event(format!("advance {e}"))?; + Ok(n(self.config(), "advance")) + } + fn duration_ticks(&mut self, e: u8, blending_in: bool, _: &Effect) -> Result<i32, Self::Error> { + self.event(format!("blend-duration {e} {blending_in}"))?; + Ok(n( + self.config(), + if blending_in { "blend_in" } else { "blend_out" }, + )) + } +} +fn run(f: Value, out: &mut dyn Write) { + let mut slots: Vec<Effect> = Vec::new(); + for v in f["initial"]["instances"].as_array().unwrap() { + let h = n(v, "hidden"); + let e = Effect::new( + n(v, "effect") as u8, + details(v), + (h >= 0).then(|| slots[h as usize].clone()), + ); + slots.push(e); + } + let mut w = World { + f, + out, + slots, + ids: Vec::new(), + calls: 0, + changed: false, + }; + w.reset(); + w.all(); + let ops = w.f["ops"].as_array().unwrap().clone(); + for op in ops { + let a = n(&op, "a") as usize; + let b = n(&op, "b") as usize; + let e = w.slots[a].clone(); + let result: Result<String, &'static str> = match op["op"].as_str().unwrap() { + "server" => e + .tick_server(&mut w, n(&op, "level")) + .map(|v| v.to_string()), + "client" => e.tick_client(&mut w).map(|_| "ok".into()), + "skip" => e.skip_blending(&mut w).map(|_| "ok".into()), + "factor" => Ok(bits( + e.blend_factor(fl(&op, "partial"), op["removed"].as_bool().unwrap()), + ) + .to_string()), + "update" => Ok(e.update(&w.slots[b]).to_string()), + "alias" => { + w.slots[b] = e; + Ok("ok".into()) + } + "copy" => { + w.slots[b] = e.copy_instance(); + Ok("ok".into()) + } + _ => panic!("unknown operation"), + }; + writeln!(w.out, "result {}", result.unwrap_or_else(str::to_string)).unwrap(); + w.all(); + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + run(serde_json::from_str(line)?, &mut out); + } + Ok(()) +} diff --git a/crates/horizon-world/examples/stored_consume_fixture.rs b/crates/horizon-world/examples/stored_consume_fixture.rs new file mode 100644 index 000000000..7fd9abc91 --- /dev/null +++ b/crates/horizon-world/examples/stored_consume_fixture.rs @@ -0,0 +1,407 @@ +use horizon_core::{ + position::BlockPos, + random::{LegacyRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::{ + active_effects::{ActiveEffects, EffectHooks}, + consume_effect::ConsumeEffect, + java_hash_map::JavaKey, + status_effect::{BlendState, Details, EffectInstance}, + stored_consume::{ConsumeHooks, StoredConsume}, +}; +use serde_json::Value; +use std::{ + cmp::Ordering, + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone)] +struct Key { + id: usize, + hash: i32, + identity: i32, +} +impl PartialEq for Key { + fn eq(&self, other: &Self) -> bool { + self.id == other.id + } +} +impl Eq for Key {} +impl JavaKey for Key { + fn java_hash(&self) -> i32 { + self.hash + } + fn tie_break(&self, other: &Self) -> Ordering { + if self.identity <= other.identity { + Ordering::Less + } else { + Ordering::Greater + } + } +} +type Effect = EffectInstance<Key>; +type Storage = ActiveEffects<Key>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn fl(v: &Value, k: &str) -> f32 { + f32::from_bits(v[k].as_u64().unwrap() as u32) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { 0x7fc00000 } else { v.to_bits() } +} +fn details(v: &Value) -> Details { + Details { + duration: n(v, "duration"), + amplifier: n(v, "amplifier"), + ambient: v["ambient"].as_bool().unwrap(), + visible: v["visible"].as_bool().unwrap(), + show_icon: v["icon"].as_bool().unwrap(), + } +} +struct World<'a, R> { + random: [R; 2], + f: Value, + out: &'a mut dyn Write, + keys: Vec<Key>, + pool: Vec<Effect>, + ids: Vec<Effect>, + calls: i32, + changed: bool, +} +impl<R: RandomSource> World<'_, R> { + fn config(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn id(&mut self, e: &Effect) -> usize { + if let Some(i) = self.ids.iter().position(|v| v.same_reference(e)) { + i + } else { + self.ids.push(e.clone()); + self.ids.len() - 1 + } + } + fn reset(&mut self) { + let c = self.config().clone(); + if c["reseed"].as_bool().unwrap() { + for i in 0..2 { + self.random[i].set_seed(c["seeds"][i].as_i64().unwrap()); + } + } + for (i, v) in c["states"].as_array().unwrap().iter().enumerate() { + let mut e = self.pool[i].write(); + e.details = details(v); + e.blend = BlendState { + factor: fl(v, "factor"), + previous: fl(v, "previous"), + }; + } + } + fn all(&mut self, s: &Storage) { + writeln!(self.out, "state {} {}", self.calls, self.changed).unwrap(); + let mut roots = Vec::new(); + let entries = s + .entries + .entries() + .map(|(k, e)| { + let id = self.id(e); + roots.push(e.clone()); + format!("{}={id}", k.id) + }) + .collect::<Vec<_>>() + .join(","); + writeln!(self.out, "map {entries}").unwrap(); + for (i, e) in self.pool.clone().iter().enumerate() { + let id = self.id(e); + writeln!(self.out, "pool {i} {id}").unwrap(); + roots.push(e.clone()); + } + let mut seen = Vec::new(); + let mut i = 0; + while i < roots.len() { + let e = roots[i].clone(); + i += 1; + if seen.iter().any(|v: &Effect| v.same_reference(&e)) { + continue; + } + seen.push(e.clone()); + let id = self.id(&e); + let d = e.read(); + let h = d + .hidden + .as_ref() + .map(|h| { + roots.push(h.clone()); + self.id(h).to_string() + }) + .unwrap_or("none".into()); + writeln!( + self.out, + "node {id} {} {} {} {} {} {} {h} {} {}", + d.effect.id, + d.details.duration, + d.details.amplifier, + d.details.ambient, + d.details.visible, + d.details.show_icon, + bits(d.blend.factor), + bits(d.blend.previous) + ) + .unwrap(); + } + } + fn raw(&mut self, s: &mut Storage, op: &Value) { + let a = n(op, "a") as usize; + let b = n(op, "b") as usize; + match op["op"].as_str().unwrap() { + "put" => { + s.entries.put(self.keys[a].clone(), self.pool[b].clone()); + } + "drop" => { + s.entries.remove(&self.keys[a]); + } + "clear" => s.entries.clear(), + "copy" => self.pool[b] = self.pool[a].copy_instance(), + "alias" => self.pool[b] = self.pool[a].clone(), + _ => panic!("raw op"), + } + } + fn event(&mut self, s: &mut Storage, name: String) -> Result<(), &'static str> { + writeln!(self.out, "event {name}").unwrap(); + let i = self.calls; + self.calls += 1; + self.all(s); + if i == n(&self.f, "fail") { + return Err("callback"); + } + if i == n(&self.f, "mutate") { + self.changed = true; + self.reset(); + for op in self.f["mutations"].as_array().unwrap().clone() { + self.raw(s, &op); + } + } + Ok(()) + } +} +impl<R: RandomSource> EffectHooks<Key> for World<'_, R> { + type Error = &'static str; + type Source = i32; + type Level = i32; + fn can_be_affected(&mut self, s: &mut Storage, e: Effect) -> Result<bool, Self::Error> { + let i = self.id(&e); + self.event(s, format!("eligible {i}"))?; + Ok(self.config()["allow"].as_bool().unwrap()) + } + fn on_added( + &mut self, + s: &mut Storage, + e: Effect, + source: Option<i32>, + ) -> Result<(), Self::Error> { + let i = self.id(&e); + self.event(s, format!("added {i} {}", source.unwrap_or(-1))) + } + fn on_updated( + &mut self, + s: &mut Storage, + e: Effect, + reapply: bool, + source: Option<i32>, + ) -> Result<(), Self::Error> { + let i = self.id(&e); + self.event(s, format!("updated {i} {reapply} {}", source.unwrap_or(-1))) + } + fn effect_added(&mut self, s: &mut Storage, e: Key, amp: i32) -> Result<(), Self::Error> { + self.event(s, format!("effect-added {} {amp}", e.id)) + } + fn effect_started(&mut self, s: &mut Storage, e: Key, amp: i32) -> Result<(), Self::Error> { + self.event(s, format!("effect-started {} {amp}", e.id)) + } + fn level(&mut self, s: &mut Storage) -> Result<i32, Self::Error> { + self.event(s, "level".into())?; + Ok(n(self.config(), "level")) + } + fn is_client(&mut self, s: &mut Storage, l: i32) -> Result<bool, Self::Error> { + self.event(s, format!("client {l}"))?; + Ok(self.config()["client"].as_bool().unwrap()) + } + fn on_removed(&mut self, s: &mut Storage, es: Vec<Effect>) -> Result<(), Self::Error> { + let ids = es + .iter() + .map(|e| self.id(e).to_string()) + .collect::<Vec<_>>() + .join(","); + self.event(s, format!("removed {ids}")) + } + fn get_effect(&mut self, s: &mut Storage, key: Key) -> Result<Option<Effect>, Self::Error> { + self.event(s, format!("get {}", key.id))?; + Ok(s.get(&key)) + } + fn actor_removed(&self) -> bool { + self.config()["removed"].as_bool().unwrap() + } +} +impl<R: RandomSource> ConsumeHooks<Key, u8, Vec<Key>> for World<'_, R> { + type Random = usize; + type Rng = R; + type SoundCategory = i32; + fn get_random(&mut self, s: &mut Storage) -> Result<usize, Self::Error> { + self.event(s, "random".into())?; + Ok(n(self.config(), "random") as usize) + } + fn random_source(&mut self, r: usize) -> &mut R { + &mut self.random[r] + } + fn effect_set(&self, set: &Vec<Key>) -> Vec<Key> { + set.clone() + } + fn block_position(&mut self, s: &mut Storage) -> Result<BlockPos, Self::Error> { + self.event(s, "position".into())?; + let p = &self.config()["position"]; + Ok(BlockPos::new( + p[0].as_i64().unwrap() as i32, + p[1].as_i64().unwrap() as i32, + p[2].as_i64().unwrap() as i32, + )) + } + fn sound_category(&mut self, s: &mut Storage) -> Result<i32, Self::Error> { + self.event(s, "category".into())?; + Ok(n(self.config(), "category")) + } + fn play_sound( + &mut self, + storage: &mut Storage, + level: i32, + p: BlockPos, + sound: u8, + category: i32, + ) -> Result<(), Self::Error> { + self.event( + storage, + format!("sound {level} {} {} {} {sound} {category}", p.x, p.y, p.z), + ) + } +} +fn run<R: RandomSource>(f: Value, out: &mut dyn Write, make: fn(i64) -> R) { + let random = std::array::from_fn(|i| make(f["seeds"][i].as_i64().unwrap())); + let keys = f["hashes"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(id, v)| Key { + id, + hash: v.as_i64().unwrap() as i32, + identity: f["identities"][id].as_i64().unwrap() as i32, + }) + .collect::<Vec<_>>(); + let mut pool: Vec<Effect> = Vec::new(); + for v in f["initial"]["states"].as_array().unwrap() { + let h = n(v, "hidden"); + pool.push(Effect::new( + keys[n(v, "key") as usize].clone(), + details(v), + (h >= 0).then(|| pool[h as usize].clone()), + )); + } + let mut w = World { + random, + f, + out, + keys, + pool, + ids: Vec::new(), + calls: 0, + changed: false, + }; + let mut s = Storage::default(); + w.reset(); + for op in w.f["setup"].as_array().unwrap().clone() { + w.raw(&mut s, &op); + } + w.all(&s); + for op in w.f["ops"].as_array().unwrap().clone() { + let a = n(&op, "a") as usize; + let b = n(&op, "b") as usize; + let source = n(&op, "source"); + let source = (source >= 0).then_some(source); + let result: Result<String, &'static str> = match op["op"].as_str().unwrap() { + "apply-status" | "remove-status" | "clear-status" | "sound" => { + let list = op["list"].as_array().unwrap(); + let effect: ConsumeEffect<Key, u8> = match op["op"].as_str().unwrap() { + "apply-status" => ConsumeEffect::ApplyStatus { + effects: list + .iter() + .map(|i| w.pool[i.as_u64().unwrap() as usize].clone()) + .collect(), + probability: fl(&op, "probability"), + }, + "remove-status" => ConsumeEffect::RemoveStatus( + list.iter() + .map(|i| w.keys[i.as_u64().unwrap() as usize].clone()) + .collect(), + ), + "clear-status" => ConsumeEffect::ClearStatus, + _ => ConsumeEffect::PlaySound(n(&op, "sound") as u8), + }; + effect + .apply( + &mut StoredConsume { + effects: &mut s, + world: &mut w, + }, + n(&op, "level"), + ) + .map(|v| v.to_string()) + } + "add" => s + .add(w.pool[a].clone(), source, &mut w) + .map(|v| v.to_string()), + "force" => s + .force_add(w.pool[a].clone(), source, &mut w) + .map(|_| "ok".into()), + "remove" => s.remove(&w.keys[a].clone(), &mut w).map(|v| v.to_string()), + "remove-raw" => Ok(s + .remove_no_update(&w.keys[a]) + .map(|e| w.id(&e).to_string()) + .unwrap_or("none".into())), + "all" => s.remove_all(&mut w).map(|v| v.to_string()), + "has" => Ok(s.has(&w.keys[a]).to_string()), + "get" => { + let key = w.keys[a].clone(); + EffectHooks::get_effect(&mut w, &mut s, key) + .map(|e| e.map(|e| w.id(&e).to_string()).unwrap_or("none".into())) + } + "blend" => s + .blend_factor(w.keys[a].clone(), fl(&op, "partial"), &mut w) + .map(|v| bits(v).to_string()), + "put" | "drop" | "clear" | "copy" | "alias" => { + w.raw(&mut s, &op); + Ok("ok".into()) + } + _ => panic!("operation {b}"), + }; + writeln!(w.out, "result {}", result.unwrap_or_else(str::to_string)).unwrap(); + w.all(&s); + } + for (i, r) in w.random.iter_mut().enumerate() { + writeln!(w.out, "random {i} {} {}", r.next_long(), r.next_long()).unwrap(); + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let side = std::env::args().nth(2).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join(format!("rust-{side}.txt")))?); + for line in fs::read_to_string(dir.join(format!("inputs-{side}.txt")))?.lines() { + let f: Value = serde_json::from_str(line)?; + if f["xor"].as_bool().unwrap() { + run(f, &mut out, XoroshiroRandom::new); + } else { + run(f, &mut out, LegacyRandom::new); + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/stored_effect_attributes_fixture.rs b/crates/horizon-world/examples/stored_effect_attributes_fixture.rs new file mode 100644 index 000000000..6abc4f79f --- /dev/null +++ b/crates/horizon-world/examples/stored_effect_attributes_fixture.rs @@ -0,0 +1,492 @@ +use horizon_world::{ + attribute_map::AttributeMap, + attributes::{AttributeError, Definition, Instance, Modifier, Observer, Operation}, + effect_attribute_modifiers::{self as effects, Definitions, ModifierWorld, Template}, + object_open_set::{CursorError, ObjectKey}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +#[derive(Clone, PartialEq, Eq)] +struct Key { + id: usize, + hash: i32, +} +impl ObjectKey for Key { + fn object_hash(&self) -> i32 { + self.hash + } +} +#[derive(Clone, PartialEq, Eq)] +struct Handle { + id: usize, + hash: i32, +} +impl ObjectKey for Handle { + fn object_hash(&self) -> i32 { + self.hash + } +} +type Map = AttributeMap<Key, Handle>; +#[derive(Debug)] +enum Stop { + Callback, + Duplicate, + Null, + Bounds, +} +fn bits(v: f64) -> String { + format!( + "{:016x}", + if v.is_nan() { + f64::NAN.to_bits() + } else { + v.to_bits() + } + ) +} +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn desc(k: Option<&Key>) -> String { + k.map_or("null".into(), |k| k.id.to_string()) +} +fn reference(h: Option<&Handle>) -> String { + h.map_or("null".into(), |h| h.id.to_string()) +} +fn attribute_error(e: AttributeError<Stop>) -> Stop { + match e { + AttributeError::DuplicateModifier(_) => Stop::Duplicate, + AttributeError::Observer(e) => e, + } +} +struct Silent; +impl Observer for Silent { + type Error = Stop; + fn dirty(&mut self, _: &mut Instance) -> Result<(), Stop> { + Ok(()) + } +} +struct Node { + key: Key, + handle: Handle, + value: Option<Instance>, +} +struct World { + keys: Vec<Key>, + defaults: Vec<f64>, + syncable: Vec<bool>, + suppliers: Vec<Option<Instance>>, + templates: Vec<Template>, + instances: Vec<Node>, + hashes: Vec<i32>, + pool: Vec<Modifier>, + calls: i64, + changed: bool, + op: Value, + logs: Vec<String>, +} +impl World { + fn key(&self, op: &Value) -> Option<Key> { + let id = op["key"].as_i64().unwrap(); + (id >= 0).then(|| self.keys[id as usize].clone()) + } + fn handle(&self, id: i64) -> Result<Option<Handle>, Stop> { + if id < 0 { + Ok(None) + } else { + self.instances + .get(id as usize) + .map(|n| Some(n.handle.clone())) + .ok_or(Stop::Bounds) + } + } + fn refs(&mut self, mods: &[Modifier]) -> String { + mods.iter() + .map(|m| { + let id = self + .pool + .iter() + .position(|p| p.same_identity(m)) + .unwrap_or_else(|| { + self.pool.push(m.clone()); + self.pool.len() - 1 + }); + format!( + "{id}:{}:{}:{}", + m.id(), + bits(m.amount()), + m.operation() as u8 + ) + }) + .collect::<Vec<_>>() + .join(",") + } + fn state(&mut self, map: &Map, current: Option<(usize, &Instance)>) { + self.logs + .push(format!("state {} {}", self.calls, self.changed)); + self.logs.push(format!( + "map {}", + map.instances + .entries() + .iter() + .map(|(k, h)| format!("{}={}", desc(k.as_ref()), reference(h.as_ref()))) + .collect::<Vec<_>>() + .join(",") + )); + self.logs.push(format!( + "updates {}", + map.updates + .values() + .map(reference) + .collect::<Vec<_>>() + .join(",") + )); + self.logs.push(format!( + "sync {}", + map.sync + .values() + .map(reference) + .collect::<Vec<_>>() + .join(",") + )); + for id in 0..self.instances.len() { + let n = &self.instances[id]; + let a = match current { + Some((i, a)) if i == id => a, + _ => n.value.as_ref().unwrap(), + }; + let prefix = format!( + "instance {id} {} {} {} {}", + n.key.id, + bits(a.base_value()), + a.is_dirty(), + bits(a.cached_value()) + ); + let all = a.modifiers().to_vec(); + let permanent = a.permanent_modifiers().to_vec(); + let all = self.refs(&all); + let permanent = self.refs(&permanent); + self.logs.push(format!("{prefix} | {all} | {permanent}")); + } + } + fn raw(&mut self, map: &mut Map, op: &Value) -> Result<(), Stop> { + match op["op"].as_str().unwrap() { + "put" => { + map.instances + .put(self.key(op), self.handle(op["instance"].as_i64().unwrap())?); + } + "drop" => { + map.instances.remove(self.key(op).as_ref()); + } + "clear" => map.instances.clear(), + "queue-add" | "queue-drop" | "queue-clear" => { + let handle = self.handle(op["instance"].as_i64().unwrap())?; + let set = if op["target"].as_u64().unwrap() == 0 { + &mut map.updates + } else { + &mut map.sync + }; + match op["op"].as_str().unwrap() { + "queue-add" => { + set.add(handle); + } + "queue-drop" => { + set.remove(handle.as_ref()); + } + _ => set.clear(), + } + } + "syncable" => { + self.syncable[op["key"].as_u64().unwrap() as usize] = op["flag"].as_bool().unwrap() + } + "default" => self.defaults[op["key"].as_u64().unwrap() as usize] = number(&op["value"]), + _ => panic!("raw operation"), + } + Ok(()) + } + fn event( + &mut self, + map: &mut Map, + current: Option<(usize, &Instance)>, + name: String, + ) -> Result<(), Stop> { + let call = self.calls; + self.calls += 1; + self.logs.push(format!("event {call} {name}")); + self.state(map, current); + if call == self.op["fail"].as_i64().unwrap() { + return Err(Stop::Callback); + } + if call == self.op["mutate"].as_i64().unwrap() { + self.changed = true; + for action in self.op["mutations"].as_array().unwrap().clone() { + self.raw(map, &action)?; + } + } + Ok(()) + } + fn modified( + &mut self, + map: &mut Map, + handle: Option<Handle>, + current: Option<(usize, &Instance)>, + ) -> Result<(), Stop> { + map.modified(handle, |map, handle| { + let handle = handle.ok_or(Stop::Null)?; + let key = self.instances[handle.id].key.id; + self.event(map, current, format!("syncable {key}"))?; + Ok(self.syncable[key]) + }) + } + fn get(&mut self, map: &mut Map, key: Option<Key>) -> Result<Option<Handle>, Stop> { + self.event(map, None, format!("get {}", desc(key.as_ref())))?; + map.get_instance(key, |map, key| self.create(map, key)) + } + fn create(&mut self, map: &mut Map, key: Option<Key>) -> Result<Option<Handle>, Stop> { + let Some(key) = key else { + return Ok(None); + }; + let Some(source) = self.suppliers[key.id].clone() else { + return Ok(None); + }; + self.event(map, None, format!("default {}", key.id))?; + let mut a = Instance::new(Definition::basic(self.defaults[key.id])); + let id = self.instances.len(); + let handle = Handle { + id, + hash: self.hashes[id], + }; + self.instances.push(Node { + key, + handle: handle.clone(), + value: None, + }); + let mut cb = Dirty { + world: self, + map, + handle: handle.clone(), + }; + let result = a.replace_from(&source, &mut cb).map_err(attribute_error); + self.instances[id].value = Some(a); + result?; + Ok(Some(handle)) + } + fn edit<R>( + &mut self, + map: &mut Map, + handle: &Handle, + edit: impl FnOnce(&mut Instance, &mut Dirty<'_>) -> Result<R, AttributeError<Stop>>, + ) -> Result<R, Stop> { + let mut a = self.instances[handle.id].value.take().unwrap(); + let mut cb = Dirty { + world: self, + map, + handle: handle.clone(), + }; + let result = edit(&mut a, &mut cb).map_err(attribute_error); + self.instances[handle.id].value = Some(a); + result + } +} +struct Dirty<'a> { + world: &'a mut World, + map: &'a mut Map, + handle: Handle, +} +impl Observer for Dirty<'_> { + type Error = Stop; + fn dirty(&mut self, a: &mut Instance) -> Result<(), Stop> { + self.world.modified( + self.map, + Some(self.handle.clone()), + Some((self.handle.id, a)), + ) + } +} +struct Bound<'a> { + world: &'a mut World, + map: &'a mut Map, +} +impl ModifierWorld<Key> for Bound<'_> { + type Instance = Handle; + type Error = Stop; + fn get_instance( + &mut self, + _: &mut Definitions<Key>, + key: Option<Key>, + ) -> Result<Option<Handle>, Stop> { + self.world.get(self.map, key) + } + fn remove_modifier( + &mut self, + _: &mut Definitions<Key>, + h: &Handle, + id: &str, + ) -> Result<(), Stop> { + self.world + .edit(self.map, h, |a, cb| a.remove(id, cb)) + .map(|_| ()) + } + fn add_permanent( + &mut self, + _: &mut Definitions<Key>, + h: &Handle, + modifier: Modifier, + ) -> Result<(), Stop> { + self.world + .edit(self.map, h, |a, cb| a.add_permanent(modifier, cb)) + } +} +fn effect_error(e: effects::Error<Stop>) -> Stop { + match e { + effects::Error::World(e) => e, + effects::Error::Cursor(CursorError::IndexOutOfBounds) => Stop::Bounds, + effects::Error::MissingTemplate | effects::Error::Cursor(_) => Stop::Null, + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let args: Vec<_> = std::env::args().collect(); + let dir = Path::new(&args[1]); + let mut out = io::BufWriter::new(fs::File::create(dir.join(format!("rust-{}.txt", args[2])))?); + for line in fs::read_to_string(dir.join(format!("inputs-{}.txt", args[2])))?.lines() { + let f: Value = serde_json::from_str(line)?; + let keys: Vec<_> = f["hashes"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(id, h)| Key { + id, + hash: h.as_i64().unwrap() as i32, + }) + .collect(); + let defaults: Vec<_> = f["defaults"] + .as_array() + .unwrap() + .iter() + .map(number) + .collect(); + let suppliers = f["bases"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(id, v)| { + if v.is_null() { + None + } else { + let mut a = Instance::new(Definition::basic(defaults[id])); + a.set_base_value(number(v), &mut Silent).unwrap(); + Some(a) + } + }) + .collect(); + let templates = f["templates"] + .as_array() + .unwrap() + .iter() + .map(|v| { + Template::new( + v["id"].as_str().unwrap(), + number(&v["amount"]), + Operation::ALL[v["operation"].as_u64().unwrap() as usize], + ) + }) + .collect::<io::Result<Vec<_>>>()?; + let syncable = f["syncable"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_bool().unwrap()) + .collect(); + let hashes = f["instance_hashes"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_i64().unwrap() as i32) + .collect(); + let mut world = World { + keys, + defaults, + suppliers, + templates, + syncable, + hashes, + instances: Vec::new(), + pool: Vec::new(), + calls: 0, + changed: false, + op: Value::Null, + logs: Vec::new(), + }; + let mut map = Map::default(); + let mut defs = Definitions::default(); + for op in f["definitions"].as_array().unwrap() { + effects::add_definition( + &mut defs, + world.key(op), + world.templates[op["template"].as_u64().unwrap() as usize].clone(), + ); + } + for op in f["ops"].as_array().unwrap() { + world.op = op.clone(); + world.calls = 0; + world.changed = false; + let result = match op["op"].as_str().unwrap() { + "get" => world + .get(&mut map, world.key(op)) + .map(|h| reference(h.as_ref())), + "lookup" => Ok(reference( + map.instances.get(world.key(op).as_ref()).as_ref(), + )), + "add" => effects::add_modifiers( + &mut defs, + &mut Bound { + world: &mut world, + map: &mut map, + }, + op["amplifier"].as_i64().unwrap() as i32, + ) + .map_err(effect_error) + .map(|()| "ok".into()), + "remove" => effects::remove_modifiers( + &mut defs, + &mut Bound { + world: &mut world, + map: &mut map, + }, + ) + .map_err(effect_error) + .map(|()| "ok".into()), + "modified" => world + .handle(op["instance"].as_i64().unwrap()) + .and_then(|h| world.modified(&mut map, h, None)) + .map(|()| "ok".into()), + "value" => world + .handle(op["instance"].as_i64().unwrap()) + .and_then(|h| h.ok_or(Stop::Null)) + .map(|h| bits(world.instances[h.id].value.as_mut().unwrap().value())), + _ => world.raw(&mut map, op).map(|()| "ok".into()), + }; + world.logs.push(format!( + "result {}", + result.unwrap_or_else(|e| match e { + Stop::Callback => "callback", + Stop::Duplicate => "duplicate", + Stop::Null => "null", + Stop::Bounds => "bounds", + } + .into()) + )); + world.state(&map, None); + for line in world.logs.drain(..) { + writeln!(out, "{line}")?; + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/stored_effect_notifications_fixture.rs b/crates/horizon-world/examples/stored_effect_notifications_fixture.rs new file mode 100644 index 000000000..96c089857 --- /dev/null +++ b/crates/horizon-world/examples/stored_effect_notifications_fixture.rs @@ -0,0 +1,357 @@ +// Reuse the concrete attribute fixture's arena, supplier and observer binding. +#[allow(dead_code)] +mod integration { + include!("stored_effect_attributes_fixture.rs"); + + use horizon_world::{ + active_effects::{ActiveEffects, EffectHooks}, + effect_notifications::{self as notify, EffectPacket, NotificationWorld}, + java_hash_map::JavaKey, + object_open_set::ObjectOpenSet, + status_effect::{Details, EffectInstance}, + stored_effect_attributes::{self as stored, AttributeAccess}, + }; + impl AttributeAccess<Key, Handle> for World { + type Error = Stop; + fn create_instance( + &mut self, + _: &mut Definitions<Key>, + map: &mut Map, + key: Option<Key>, + ) -> Result<Option<Handle>, Stop> { + self.create(map, key) + } + fn get_instance( + &mut self, + _: &mut Definitions<Key>, + map: &mut Map, + key: Option<Key>, + ) -> Result<Option<Handle>, Stop> { + self.get(map, key) + } + fn remove_modifier( + &mut self, + _: &mut Definitions<Key>, + map: &mut Map, + h: &Handle, + id: &str, + ) -> Result<(), Stop> { + self.edit(map, h, |a, cb| a.remove(id, cb)).map(|_| ()) + } + fn add_permanent( + &mut self, + _: &mut Definitions<Key>, + map: &mut Map, + h: &Handle, + modifier: Modifier, + ) -> Result<(), Stop> { + self.edit(map, h, |a, cb| a.add_permanent(modifier, cb)) + } + } + #[derive(Clone, PartialEq, Eq)] + struct EffectKey; + impl JavaKey for EffectKey { + fn java_hash(&self) -> i32 { + 0 + } + fn tie_break(&self, _: &Self) -> std::cmp::Ordering { + std::cmp::Ordering::Less + } + } + struct Entity<'a> { + world: &'a mut World, + map: &'a mut Map, + definitions: &'a mut Definitions<Key>, + } + type Storage = ActiveEffects<EffectKey>; + type Effect = EffectInstance<EffectKey>; + impl EffectHooks<EffectKey> for Entity<'_> { + type Error = Stop; + type Source = (); + type Level = (); + fn can_be_affected(&mut self, _: &mut Storage, _: Effect) -> Result<bool, Stop> { + Ok(true) + } + fn on_added(&mut self, s: &mut Storage, e: Effect, _: Option<()>) -> Result<(), Stop> { + notify::on_added(s, &e, self) + } + fn on_updated( + &mut self, + s: &mut Storage, + e: Effect, + apply: bool, + _: Option<()>, + ) -> Result<(), Stop> { + notify::on_updated(s, &e, apply, self) + } + fn on_removed(&mut self, s: &mut Storage, es: Vec<Effect>) -> Result<(), Stop> { + notify::on_removed(s, &es, self) + } + fn effect_added(&mut self, _: &mut Storage, _: EffectKey, _: i32) -> Result<(), Stop> { + Ok(()) + } + fn effect_started(&mut self, _: &mut Storage, _: EffectKey, _: i32) -> Result<(), Stop> { + Ok(()) + } + fn level(&mut self, _: &mut Storage) -> Result<(), Stop> { + self.world.event(self.map, None, "level".into()) + } + fn is_client(&mut self, _: &mut Storage, _: ()) -> Result<bool, Stop> { + self.world.event(self.map, None, "client".into())?; + Ok(self.world.op["client"].as_bool().unwrap_or(false)) + } + fn actor_removed(&self) -> bool { + false + } + } + impl NotificationWorld<EffectKey> for Entity<'_> { + type Attributes = (); + type UpdateSet = (); + type AttributeInstance = Handle; + type Attribute = Key; + type Passenger = (); + type Connection = (); + fn attributes(&mut self, _: &mut Storage) -> Result<(), Stop> { + self.world.event(self.map, None, "attributes".into()) + } + fn add_modifiers( + &mut self, + _: &mut Storage, + _: EffectKey, + _: (), + amp: i32, + ) -> Result<(), Stop> { + stored::add(self.definitions, self.map, self.world, amp).map_err(effect_error) + } + fn remove_modifiers(&mut self, _: &mut Storage, _: EffectKey, _: ()) -> Result<(), Stop> { + stored::remove(self.definitions, self.map, self.world).map_err(effect_error) + } + fn pending_updates(&mut self, _: &mut Storage, _: ()) -> Result<(), Stop> { + Ok(()) + } + fn update_set(&self, _: ()) -> &ObjectOpenSet<Handle> { + &self.map.updates + } + fn update_set_mut(&mut self, _: ()) -> &mut ObjectOpenSet<Handle> { + &mut self.map.updates + } + fn iterator_error(e: CursorError) -> Stop { + match e { + CursorError::IndexOutOfBounds => Stop::Bounds, + _ => Stop::Null, + } + } + fn attribute_of(&mut self, _: &mut Storage, h: Option<Handle>) -> Result<Key, Stop> { + let h = h.ok_or(Stop::Null)?; + Ok(self.world.instances[h.id].key.clone()) + } + fn attribute_updated(&mut self, _: &mut Storage, key: Key) -> Result<(), Stop> { + self.world + .event(self.map, None, format!("updated {}", key.id)) + } + fn passengers(&self) -> Vec<()> { + Vec::new() + } + fn is_server_player(&self, _: ()) -> bool { + false + } + fn connection(&self, _: ()) {} + fn entity_id(&mut self, _: &mut Storage) -> Result<i32, Stop> { + Ok(0) + } + fn send_packet( + &mut self, + _: &mut Storage, + _: (), + _: EffectPacket<EffectKey>, + ) -> Result<(), Stop> { + Ok(()) + } + } + pub fn run() -> Result<(), Box<dyn std::error::Error>> { + let args: Vec<_> = std::env::args().collect(); + let dir = Path::new(&args[1]); + let mut out = + io::BufWriter::new(fs::File::create(dir.join(format!("rust-{}.txt", args[2])))?); + for line in fs::read_to_string(dir.join(format!("inputs-{}.txt", args[2])))?.lines() { + let f: Value = serde_json::from_str(line)?; + let keys: Vec<_> = f["hashes"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(id, h)| Key { + id, + hash: h.as_i64().unwrap() as i32, + }) + .collect(); + let defaults: Vec<_> = f["defaults"] + .as_array() + .unwrap() + .iter() + .map(number) + .collect(); + let suppliers = f["bases"] + .as_array() + .unwrap() + .iter() + .enumerate() + .map(|(id, v)| { + if v.is_null() { + None + } else { + let mut a = Instance::new(Definition::basic(defaults[id])); + a.set_base_value(number(v), &mut Silent).unwrap(); + Some(a) + } + }) + .collect(); + let templates = f["templates"] + .as_array() + .unwrap() + .iter() + .map(|v| { + Template::new( + v["id"].as_str().unwrap(), + number(&v["amount"]), + Operation::ALL[v["operation"].as_u64().unwrap() as usize], + ) + }) + .collect::<io::Result<Vec<_>>>()?; + let syncable = f["syncable"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_bool().unwrap()) + .collect(); + let hashes = f["instance_hashes"] + .as_array() + .unwrap() + .iter() + .map(|v| v.as_i64().unwrap() as i32) + .collect(); + let mut world = World { + keys, + defaults, + suppliers, + templates, + syncable, + hashes, + instances: Vec::new(), + pool: Vec::new(), + calls: 0, + changed: false, + op: Value::Null, + logs: Vec::new(), + }; + let mut map = Map::default(); + let mut defs = Definitions::default(); + let mut storage = ActiveEffects::default(); + for op in f["definitions"].as_array().unwrap() { + effects::add_definition( + &mut defs, + world.key(op), + world.templates[op["template"].as_u64().unwrap() as usize].clone(), + ); + } + for op in f["ops"].as_array().unwrap() { + world.op = op.clone(); + world.calls = 0; + world.changed = false; + let result = match op["op"].as_str().unwrap() { + "dirty" => { + storage.dirty = op["flag"].as_bool().unwrap(); + Ok("ok".into()) + } + "notify-add" | "notify-update" | "notify-remove" | "refresh" => { + let instance = EffectInstance::new( + EffectKey, + Details { + duration: 200, + amplifier: op["amplifier"].as_i64().unwrap() as i32, + ambient: false, + visible: true, + show_icon: true, + }, + None, + ); + let mut entity = Entity { + world: &mut world, + map: &mut map, + definitions: &mut defs, + }; + let result = match op["op"].as_str().unwrap() { + "notify-add" => notify::on_added(&mut storage, &instance, &mut entity), + "notify-update" => notify::on_updated( + &mut storage, + &instance, + op["reapply"].as_bool().unwrap(), + &mut entity, + ), + "notify-remove" => notify::on_removed( + &mut storage, + &vec![instance; op["count"].as_u64().unwrap() as usize], + &mut entity, + ), + _ => notify::refresh_attributes(&mut storage, &mut entity), + }; + result.map(|()| "ok".into()) + } + "get" => world + .get(&mut map, world.key(op)) + .map(|h| reference(h.as_ref())), + "lookup" => Ok(reference( + map.instances.get(world.key(op).as_ref()).as_ref(), + )), + "add" => effects::add_modifiers( + &mut defs, + &mut Bound { + world: &mut world, + map: &mut map, + }, + op["amplifier"].as_i64().unwrap() as i32, + ) + .map_err(effect_error) + .map(|()| "ok".into()), + "remove" => effects::remove_modifiers( + &mut defs, + &mut Bound { + world: &mut world, + map: &mut map, + }, + ) + .map_err(effect_error) + .map(|()| "ok".into()), + "modified" => world + .handle(op["instance"].as_i64().unwrap()) + .and_then(|h| world.modified(&mut map, h, None)) + .map(|()| "ok".into()), + "value" => world + .handle(op["instance"].as_i64().unwrap()) + .and_then(|h| h.ok_or(Stop::Null)) + .map(|h| bits(world.instances[h.id].value.as_mut().unwrap().value())), + _ => world.raw(&mut map, op).map(|()| "ok".into()), + }; + world.logs.push(format!( + "result {}", + result.unwrap_or_else(|e| match e { + Stop::Callback => "callback", + Stop::Duplicate => "duplicate", + Stop::Null => "null", + Stop::Bounds => "bounds", + } + .into()) + )); + world.logs.push(format!("effect-dirty {}", storage.dirty)); + world.state(&map, None); + for line in world.logs.drain(..) { + writeln!(out, "{line}")?; + } + } + } + Ok(()) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + integration::run() +} diff --git a/crates/horizon-world/examples/structure_density_fixture.rs b/crates/horizon-world/examples/structure_density_fixture.rs new file mode 100644 index 000000000..55ef66f83 --- /dev/null +++ b/crates/horizon-world/examples/structure_density_fixture.rs @@ -0,0 +1,97 @@ +//! Original JSON transport for structure-density comparison. +use horizon_core::{ + density::{ + Beardifier, DensitySampler, JigsawJunction, RigidPiece, SamplerContext, StructureBounds, + TerrainAdjustment, + }, + noise::DensityVolume, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, +}; +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +fn bounds(v: &Value) -> Option<StructureBounds> { + if v.is_null() { + None + } else { + StructureBounds::new( + std::array::from_fn(|i| n(&v[i])), + std::array::from_fn(|i| n(&v[i + 3])), + ) + } +} +fn bits(value: f32) -> u32 { + if value.is_nan() { + 0x7fc00000 + } else { + value.to_bits() + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let args: Vec<_> = std::env::args().collect(); + let mut out = io::BufWriter::new(fs::File::create(&args[2])?); + for line in fs::read_to_string(&args[1])?.lines() { + let f: Value = serde_json::from_str(line)?; + let pieces = f["pieces"] + .as_array() + .unwrap() + .iter() + .map(|a| RigidPiece { + bounds: bounds(&a[0]).unwrap(), + adjustment: match a[1].as_str().unwrap() { + "NONE" => TerrainAdjustment::None, + "BURY" => TerrainAdjustment::Bury, + "BEARD_THIN" => TerrainAdjustment::BeardThin, + "BEARD_BOX" => TerrainAdjustment::BeardBox, + "ENCAPSULATE" => TerrainAdjustment::Encapsulate, + _ => panic!("unknown adjustment"), + }, + ground_level_delta: n(&a[2]), + }) + .collect(); + let junctions = f["junctions"] + .as_array() + .unwrap() + .iter() + .map(|a| JigsawJunction { + source_x: n(&a[0]), + source_ground_y: n(&a[1]), + source_z: n(&a[2]), + }) + .collect(); + let sampler = Beardifier::new(pieces, junctions, bounds(&f["affected"])); + let mut context = SamplerContext::default(); + writeln!( + out, + "beardifier {} {}", + f["pieces"].as_array().unwrap().len(), + f["junctions"].as_array().unwrap().len() + )?; + for p in f["points"].as_array().unwrap() { + writeln!( + out, + "value {:x}", + bits(sampler.sample_value(&mut context, std::array::from_fn(|i| n(&p[i])))?) + )?; + } + for a in f["volumes"].as_array().unwrap() { + let volume = DensityVolume::new( + std::array::from_fn(|i| n(&a[i])), + std::array::from_fn(|i| n(&a[i + 3])), + std::array::from_fn(|i| n(&a[i + 6])), + )?; + let mut buffer = vec![-123.5; volume.size() + n(&a[9]) as usize]; + sampler.sample_volume(&mut context, &mut buffer, volume)?; + writeln!(out, "volume {}", buffer.len())?; + for value in buffer { + writeln!(out, "{:x}", bits(value))?; + } + } + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-world/examples/suffocation_fixture.rs b/crates/horizon-world/examples/suffocation_fixture.rs new file mode 100644 index 000000000..79a3ccfa0 --- /dev/null +++ b/crates/horizon-world/examples/suffocation_fixture.rs @@ -0,0 +1,144 @@ +use horizon_core::geometry::VoxelShape; +use horizon_world::{ + block_collision::{BlockCollisionRegistry, DynamicCollisionWorld, ShulkerCollisionState}, + collision::CachedCollisionRegistry, + dynamic_support::DynamicSupportWorld, + nbt::{self, Limits}, + registry::{BlockRegistry, BlockStateId}, + suffocation::{SuffocationDefinition, SuffocationRegistry}, + worldgen::tags::TagDefinitions, +}; +use serde_json::Value; +use std::{ + collections::{BTreeMap, BTreeSet}, + fs, + io::{self, Write}, + path::Path, + sync::Arc, +}; +struct World<'a, W> { + out: &'a mut W, + calls: i32, + fail: i32, + entity: &'a str, +} +impl<W: Write> World<'_, W> { + fn query(&mut self, p: [i32; 3]) -> io::Result<()> { + writeln!(self.out, "entity {} {} {}", p[0], p[1], p[2])?; + let count = self.calls; + self.calls += 1; + if count == self.fail { + Err(io::Error::other("injected suffocation query failure")) + } else { + Ok(()) + } + } +} +impl<W: Write> DynamicSupportWorld for World<'_, W> { + type Error = io::Error; + fn shulker_is_closed(&mut self, p: [i32; 3]) -> io::Result<Option<bool>> { + self.query(p)?; + Ok(match self.entity { + "none" | "other" => None, + "closed" => Some(true), + _ => Some(false), + }) + } + fn moving_piston_shape(&mut self, p: [i32; 3]) -> io::Result<Option<VoxelShape>> { + self.query(p)?; + Ok(None) + } +} +impl<W: Write> DynamicCollisionWorld for World<'_, W> { + fn shulker_collision_state( + &mut self, + p: [i32; 3], + ) -> io::Result<Option<ShulkerCollisionState>> { + self.query(p)?; + Ok(None) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let read = |name| -> Result<_, Box<dyn std::error::Error>> { + Ok( + nbt::read_named(&fs::read(dir.join(name))?, Limits::default())? + .0 + .tag, + ) + }; + let registry = BlockRegistry::from_nbt(&read("block-registry.nbt")?)?; + let cached = Arc::new(CachedCollisionRegistry::from_nbt( + &read("cached-collision.nbt")?, + ®istry, + )?); + let collisions = Arc::new(BlockCollisionRegistry::new(cached)?); + let definitions: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("definitions.json"))?)?; + let definitions = definitions + .into_iter() + .map(|(name, kind)| { + Ok(( + name, + match kind.as_str() { + "tagged_full" => SuffocationDefinition::TaggedFullCollision, + "always" => SuffocationDefinition::Always, + "never" => SuffocationDefinition::Never, + "not_extended" => SuffocationDefinition::NotExtendedPiston, + "closed_shulker" => SuffocationDefinition::ClosedShulker, + _ => return Err(io::Error::other("unknown suffocation rule")), + }, + )) + }) + .collect::<io::Result<BTreeMap<_, _>>>()?; + let resources: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?; + let mut tags = TagDefinitions::default(); + for (name, json) in resources { + tags.apply_json(&name, "vanilla", &json)?; + } + let built = tags.build(|name, _| registry.default_state(name).map(|_| name.to_owned()))?; + if !built.missing.is_empty() { + return Err("unresolved native block tags".into()); + } + let natural = built + .tags + .get("minecraft:causes_suffocation") + .ok_or("missing suffocation tag")? + .iter() + .cloned() + .collect::<BTreeSet<_>>(); + let all = (0..registry.len()) + .map(|i| registry.state(BlockStateId(i as u32)).unwrap().name.clone()) + .collect::<BTreeSet<_>>(); + let bindings = [ + SuffocationRegistry::new(collisions.clone(), &definitions, &natural)?, + SuffocationRegistry::new(collisions.clone(), &definitions, &BTreeSet::new())?, + SuffocationRegistry::new(collisions.clone(), &definitions, &all)?, + ]; + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let state = BlockStateId(f["state"].as_u64().unwrap() as u32); + let p = std::array::from_fn(|i| f["position"][i].as_i64().unwrap() as i32); + let block = collisions.collision_block(state)?; + writeln!( + out, + "metadata {} {} {}", + state.0, block.large_collision_shape, block.moving_piston + )?; + let mut world = World { + out: &mut out, + calls: 0, + fail: f["fail"].as_i64().unwrap() as i32, + entity: f["entity"].as_str().unwrap(), + }; + match bindings[f["tags"].as_u64().unwrap() as usize].is_suffocating(&mut world, state, p) { + Ok(v) => writeln!(world.out, "suffocating {v}")?, + Err(_) => writeln!(world.out, "suffocating error")?, + } + writeln!(world.out, "queries {}", world.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/support/decoration_storage.rs b/crates/horizon-world/examples/support/decoration_storage.rs new file mode 100644 index 000000000..43afdc1fc --- /dev/null +++ b/crates/horizon-world/examples/support/decoration_storage.rs @@ -0,0 +1,101 @@ +use horizon_world::{ + DATA_VERSION, + heightmap::HeightmapState, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, + worldgen::{tags::TagDefinitions, terrain::TerrainBlockStates}, +}; +use serde_json::Value; +use std::{collections::BTreeSet, fs, path::Path}; +#[derive(Clone, Copy)] +pub struct State { + air: bool, + air_block: bool, + fluid: bool, + motion: bool, + no_leaves: bool, +} +impl HeightmapState for State { + fn is_air(self) -> bool { + self.air + } + fn is_air_block(self) -> bool { + self.air_block + } + fn has_fluid(self) -> bool { + self.fluid + } + fn blocks_motion_in_heightmap(self) -> bool { + self.motion + } + fn blocks_motion_in_heightmap_no_leaves(self) -> bool { + self.no_leaves + } +} +pub struct Properties<'a>(pub &'a [State]); +impl TerrainBlockStates for Properties<'_> { + type State = State; + fn heightmap_state(&self, id: BlockStateId) -> State { + self.0[id.0 as usize] + } +} +fn tag(v: &Value) -> Tag { + match v { + Value::String(s) => Tag::String(s.as_str().into()), + Value::Number(i) => Tag::Int(i.as_i64().unwrap() as i32), + Value::Object(m) => { + Tag::Compound(m.iter().map(|(k, v)| (k.as_str().into(), tag(v))).collect()) + } + Value::Array(a) => Tag::List(a.iter().map(tag).collect()), + _ => panic!("unsupported registry fixture value"), + } +} +pub fn load(dir: &Path) -> Result<(BlockRegistry, Vec<State>), Box<dyn std::error::Error>> { + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + let bundle: Value = serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?; + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ( + "states", + Tag::List( + facts["states"] + .as_array() + .unwrap() + .iter() + .map(|s| tag(&s[4])) + .collect(), + ), + ), + ("defaults", tag(&facts["defaults"])), + ]))?; + let mut definitions = TagDefinitions::default(); + for (name, text) in bundle.as_object().unwrap() { + definitions.apply_json(name, "vanilla", text.as_str().unwrap())?; + } + let built = definitions.build(|id, _| facts["defaults"].get(id).map(|_| id.to_owned()))?; + assert!(built.missing.is_empty()); + let motion: BTreeSet<_> = built.tags["minecraft:blocks_motion_in_heightmap"] + .iter() + .map(String::as_str) + .collect(); + let no_leaves: BTreeSet<_> = built.tags["minecraft:blocks_motion_in_heightmap_no_leaves"] + .iter() + .map(String::as_str) + .collect(); + let states: Vec<_> = facts["states"] + .as_array() + .unwrap() + .iter() + .map(|a| { + let name = a[0].as_str().unwrap(); + State { + air: a[1].as_bool().unwrap(), + air_block: name == "minecraft:air", + fluid: a[2].as_bool().unwrap(), + motion: motion.contains(name), + no_leaves: no_leaves.contains(name), + } + }) + .collect(); + Ok((registry, states)) +} diff --git a/crates/horizon-world/examples/support/placement_queries.rs b/crates/horizon-world/examples/support/placement_queries.rs new file mode 100644 index 000000000..eacb36cd6 --- /dev/null +++ b/crates/horizon-world/examples/support/placement_queries.rs @@ -0,0 +1,149 @@ +use horizon_world::{ + heightmap::HeightmapType, + worldgen::{ + anchor::WorldGenerationContext, + placement::{LayerBlock, PlacementContext, PlacementQueryError}, + }, +}; +use serde_json::Value; +use std::{cell::RefCell, io::Write}; +pub struct Queries<'a, W> { + generation: WorldGenerationContext, + world_min: i32, + height_base: i32, + mode: i32, + layer_world: bool, + fail: i32, + calls: i32, + out: &'a RefCell<W>, +} +impl<'a, W: Write> Queries<'a, W> { + pub fn new(f: &Value, generation: WorldGenerationContext, out: &'a RefCell<W>) -> Self { + let height_base = generation.min_y; + let world_min = f["world_min"] + .as_i64() + .map(|v| v as i32) + .unwrap_or(generation.min_y); + let generation = WorldGenerationContext::new( + generation.min_y.max(world_min), + generation.height, + generation.sea_level, + ); + Self { + generation, + world_min, + height_base, + layer_world: f["layer_world"].as_bool().unwrap_or(false), + mode: f["height_mode"].as_i64().unwrap_or(0) as i32, + fail: f["query_fail"].as_i64().unwrap_or(-1) as i32, + calls: 0, + out, + } + } +} +impl<W: Write> PlacementContext for Queries<'_, W> { + fn max_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(self + .world_min + .wrapping_add(self.generation.height) + .wrapping_sub(1)) + } + fn inside_build_height(&mut self, [x, y, z]: [i32; 3]) -> Result<bool, PlacementQueryError> { + writeln!(self.out.borrow_mut(), "inside {x} {y} {z}") + .map_err(|e| PlacementQueryError::Failed(e.to_string()))?; + let call = self.calls; + self.calls += 1; + if call == self.fail { + return Err(PlacementQueryError::Failed("bounds query failure".into())); + } + let result = y >= self.world_min && y <= self.max_y()?; + writeln!(self.out.borrow_mut(), "bounds_result {result}") + .map_err(|e| PlacementQueryError::Failed(e.to_string()))?; + Ok(result) + } + fn outside_build_height(&mut self, y: i32) -> Result<bool, PlacementQueryError> { + writeln!(self.out.borrow_mut(), "outside {y}") + .map_err(|e| PlacementQueryError::Failed(e.to_string()))?; + let call = self.calls; + self.calls += 1; + if call == self.fail { + return Err(PlacementQueryError::Failed("bounds query failure".into())); + } + let result = y < self.world_min || y > self.max_y()?; + writeln!(self.out.borrow_mut(), "bounds_result {result}") + .map_err(|e| PlacementQueryError::Failed(e.to_string()))?; + Ok(result) + } + fn layer_block(&mut self, [x, y, z]: [i32; 3]) -> Result<LayerBlock, PlacementQueryError> { + let mut out = self.out.borrow_mut(); + writeln!(out, "block {x} {y} {z}") + .map_err(|e| PlacementQueryError::Failed(e.to_string()))?; + let call = self.calls; + self.calls += 1; + if call == self.fail { + return Err(PlacementQueryError::Failed("block query failure".into())); + } + let names = [ + "bedrock", + "stone", + "air", + "water", + "dirt", + "cave_air", + "lava", + "bubble_column", + "void_air", + "grass_block", + "air", + "water", + ]; + let index = if y <= self.height_base { + 0 + } else { + y.wrapping_sub(self.height_base) + .wrapping_add(x.wrapping_mul(31).wrapping_add(z.wrapping_mul(17)) & 3) + .rem_euclid(12) as usize + }; + writeln!(out, "block_result minecraft:{}", names[index]) + .map_err(|e| PlacementQueryError::Failed(e.to_string()))?; + Ok(match index { + 0 => LayerBlock::Bedrock, + 1 | 4 | 7 | 9 => LayerBlock::Ground, + _ => LayerBlock::Empty, + }) + } + fn generation(&self) -> WorldGenerationContext { + self.generation + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(self.world_min) + } + fn height(&mut self, kind: HeightmapType, x: i32, z: i32) -> Result<i32, PlacementQueryError> { + let mut out = self.out.borrow_mut(); + writeln!(out, "height {} {x} {z}", kind.name()) + .map_err(|e| PlacementQueryError::Failed(e.to_string()))?; + let call = self.calls; + self.calls += 1; + if call == self.fail { + return Err(PlacementQueryError::Failed("height query failure".into())); + } + let min = self.height_base; + let result = if self.layer_world { + min.wrapping_add(24).wrapping_add((x ^ z) & 3) + } else if self.mode == 0 { + min.wrapping_add( + x.wrapping_mul(31) + .wrapping_add(z.wrapping_mul(17)) + .wrapping_add((kind as i32) * 7) + .rem_euclid(129), + ) + .wrapping_sub(64) + } else { + [i32::MIN, i32::MAX, 0, -1, min, min.wrapping_add(1)] + [(kind as usize + ((x ^ z) & 3) as usize) % 6] + }; + writeln!(out, "height_result {result}") + .map_err(|e| PlacementQueryError::Failed(e.to_string()))?; + Ok(result) + } +} diff --git a/crates/horizon-world/examples/swimming_fixture.rs b/crates/horizon-world/examples/swimming_fixture.rs new file mode 100644 index 000000000..ebf58cf8b --- /dev/null +++ b/crates/horizon-world/examples/swimming_fixture.rs @@ -0,0 +1,128 @@ +use horizon_core::position::BlockPos; +use horizon_world::swimming::{self, PlayerSwimmingWorld, SwimmingWorld}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + swimming: bool, + water: bool, + sprint: bool, + passenger: bool, + eye: bool, + position: BlockPos, +} +impl World<'_> { + fn query(&mut self, s: String) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected swimming failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.swimming = !self.swimming; + self.water = !self.water; + self.sprint = !self.sprint; + self.passenger = !self.passenger; + self.eye = !self.eye; + self.position = BlockPos::new(31, 32, 33); + } + Ok(()) + } +} +impl SwimmingWorld for World<'_> { + type Error = io::Error; + fn is_swimming(&mut self) -> io::Result<bool> { + self.query("swimming".into())?; + Ok(self.swimming) + } + fn is_sprinting(&mut self) -> io::Result<bool> { + self.query("sprint".into())?; + Ok(self.sprint) + } + fn is_in_water(&mut self) -> io::Result<bool> { + self.query("water".into())?; + Ok(self.water) + } + fn is_under_water(&mut self) -> io::Result<bool> { + self.query("under".into())?; + swimming::under_water(self) + } + fn is_passenger(&mut self) -> io::Result<bool> { + self.query("passenger".into())?; + Ok(self.passenger) + } + fn was_eye_in_water(&self) -> bool { + self.eye + } + fn block_position(&self) -> BlockPos { + self.position + } + fn water_at(&mut self, p: BlockPos) -> io::Result<bool> { + self.query(format!("fluid {} {} {}", p.x, p.y, p.z))?; + Ok(self.f["water_mask"].as_u64().unwrap() & (1 << self.f["fluid"].as_u64().unwrap()) != 0) + } + fn set_swimming(&mut self, v: bool) -> io::Result<()> { + self.query(format!("set {v}"))?; + self.swimming = v; + Ok(()) + } +} +impl PlayerSwimmingWorld for World<'_> { + fn flying_ability(&self) -> bool { + self.f["flying"].as_bool().unwrap() + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + swimming: f["swimming"].as_bool().unwrap(), + water: f["water"].as_bool().unwrap(), + sprint: f["sprint"].as_bool().unwrap(), + passenger: f["passenger"].as_bool().unwrap(), + eye: f["eye"].as_bool().unwrap(), + position: BlockPos::new(17, -64, -33), + }; + let player = f["player"].as_bool().unwrap(); + let result: io::Result<String> = match f["mode"].as_str().unwrap() { + "update" => if player { + swimming::update_player(&mut w) + } else { + swimming::update(&mut w) + } + .map(|()| "result ok".into()), + "under" => w.is_under_water().map(|v| format!("result {v}")), + "shallow" => swimming::shallow_water(&mut w).map(|v| format!("result {v}")), + "threshold" => Ok(format!( + "threshold {:016x}", + swimming::fluid_jump_threshold(f32::from_bits(u32::from_str_radix( + f["eye_height"].as_str().unwrap(), + 16 + )?)) + .to_bits() + )), + _ => panic!("fixture mode"), + }; + writeln!(w.out, "{}", result.unwrap_or_else(|_| "error".into()))?; + writeln!( + w.out, + "final {} {} {} {} {}", + w.swimming, w.eye, w.position.x, w.position.y, w.position.z + )?; + writeln!(w.out, "queries {}", w.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/synced_bytes_fixture.rs b/crates/horizon-world/examples/synced_bytes_fixture.rs new file mode 100644 index 000000000..288e5fa7c --- /dev/null +++ b/crates/horizon-world/examples/synced_bytes_fixture.rs @@ -0,0 +1,188 @@ +use horizon_world::{ + living_use_flags, + player_equipment::InteractionHand, + synced_values::{DataError, DataValue, Observer, SyncedValues}, +}; +type ByteValue = DataValue<u8>; +type SyncedBytes = SyncedValues<u8>; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn single(v: &Value) -> u8 { + u8::from_str_radix(v.as_str().unwrap(), 16).unwrap() +} +fn bits(v: u8) -> u8 { + v +} +fn parse(v: &Value) -> Vec<ByteValue> { + v.as_array() + .unwrap() + .iter() + .map(|v| ByteValue { + id: v["id"].as_u64().unwrap() as u8, + value: single(&v["value"]), + }) + .collect() +} +fn values(v: Option<&[ByteValue]>) -> String { + match v { + None => "none".into(), + Some([]) => "empty".into(), + Some(v) => v + .iter() + .map(|v| format!("{}:{:02x}", v.id, bits(v.value))) + .collect::<Vec<_>>() + .join(","), + } +} +struct Callback<'a> { + out: &'a mut dyn Write, + op: &'a Value, + calls: i64, + nested: bool, +} +impl Callback<'_> { + fn event(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.op["fail"].as_i64().unwrap() { + Err(io::Error::other("injected synchronized callback failure")) + } else { + Ok(()) + } + } +} +impl Observer<u8> for Callback<'_> { + type Error = io::Error; + fn updated(&mut self, data: &mut SyncedBytes, id: u8) -> io::Result<()> { + self.event(&format!( + "updated {id} {:02x} {} {}", + bits(data.get(id).unwrap()), + data.is_dirty(), + data.item_dirty(id).unwrap() + ))?; + if self.nested { + return Ok(()); + } + self.nested = true; + let other = self.op["other"].as_u64().unwrap() as u8; + let value = single(&self.op["other_value"]); + let result = match self.op["hook"].as_str().unwrap() { + "none" => Ok(()), + "pack" => writeln!( + self.out, + "callback-pack {}", + values(data.take_dirty().as_deref()) + ), + "flag" => living_use_flags::set_flag( + data, + self.op["mask"].as_i64().unwrap() as i32, + self.op["flag"].as_bool().unwrap(), + self, + ) + .map_err(|e| match e { + DataError::Observer(e) => e, + DataError::UnknownId(_) => panic!("flags registered"), + }), + "set" => data + .set( + other, + value, + self.op["other_force"].as_bool().unwrap(), + self, + ) + .map_err(|e| match e { + DataError::Observer(e) => e, + DataError::UnknownId(_) => panic!("hook uses registered ID"), + }), + "assign" => data + .assign(&[ByteValue { id: other, value }], self) + .map_err(|e| match e { + DataError::Observer(e) => e, + DataError::UnknownId(_) => panic!("hook uses registered ID"), + }), + _ => panic!("hook"), + }; + self.nested = false; + result + } + fn assigned(&mut self, _: &mut SyncedBytes, v: &[ByteValue]) -> io::Result<()> { + self.event(&format!("assigned {}", values(Some(v)))) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let initial = parse(&f["initial"]); + let mut ids = initial.iter().map(|v| v.id).collect::<Vec<_>>(); + ids.sort_unstable(); + let mut data = SyncedBytes::new(&initial)?; + for op in f["ops"].as_array().unwrap() { + let mut cb = Callback { + out: &mut out, + op, + calls: 0, + nested: false, + }; + let id = op["id"].as_u64().unwrap() as u8; + let result = match op["mode"].as_str().unwrap() { + "flag" => living_use_flags::set_flag( + &mut data, + op["mask"].as_i64().unwrap() as i32, + op["flag"].as_bool().unwrap(), + &mut cb, + ), + "set" => data.set( + id, + single(&op["value"]), + op["force"].as_bool().unwrap(), + &mut cb, + ), + "assign" => data.assign(&parse(&op["values"]), &mut cb), + "get" => data.get(id).map_err(DataError::UnknownId).and_then(|v| { + writeln!(cb.out, "get {:02x}", bits(v)).map_err(DataError::Observer) + }), + "pack" => writeln!(cb.out, "packed {}", values(data.take_dirty().as_deref())) + .map_err(DataError::Observer), + "defaults" => { + writeln!(cb.out, "defaults {}", values(data.non_default().as_deref())) + .map_err(DataError::Observer) + } + _ => panic!("mode"), + }; + match result { + Ok(()) => writeln!(cb.out, "result ok")?, + Err(DataError::Observer(_)) => writeln!(cb.out, "error observer")?, + Err(DataError::UnknownId(_)) => writeln!(cb.out, "error id")?, + } + writeln!(cb.out, "dirty {}", data.is_dirty())?; + for id in &ids { + writeln!( + cb.out, + "state {id} {:02x} {} {}", + bits(data.get(*id).unwrap()), + data.item_dirty(*id).unwrap(), + data.is_default(*id).unwrap() + )?; + } + writeln!(cb.out, "calls {}", cb.calls)?; + writeln!( + cb.out, + "flags {} {}", + living_use_flags::using_item(&data).unwrap(), + match living_use_flags::used_hand(&data).unwrap() { + InteractionHand::Main => 0, + InteractionHand::Off => 1, + } + )?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/synced_floats_fixture.rs b/crates/horizon-world/examples/synced_floats_fixture.rs new file mode 100644 index 000000000..4eb2e8046 --- /dev/null +++ b/crates/horizon-world/examples/synced_floats_fixture.rs @@ -0,0 +1,161 @@ +use horizon_world::synced_floats::{DataError, FloatValue, Observer, SyncedFloats}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +fn parse(v: &Value) -> Vec<FloatValue> { + v.as_array() + .unwrap() + .iter() + .map(|v| FloatValue { + id: v["id"].as_u64().unwrap() as u8, + value: single(&v["value"]), + }) + .collect() +} +fn values(v: Option<&[FloatValue]>) -> String { + match v { + None => "none".into(), + Some([]) => "empty".into(), + Some(v) => v + .iter() + .map(|v| format!("{}:{:08x}", v.id, bits(v.value))) + .collect::<Vec<_>>() + .join(","), + } +} +struct Callback<'a> { + out: &'a mut dyn Write, + op: &'a Value, + calls: i64, + nested: bool, +} +impl Callback<'_> { + fn event(&mut self, s: &str) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.op["fail"].as_i64().unwrap() { + Err(io::Error::other("injected synchronized callback failure")) + } else { + Ok(()) + } + } +} +impl Observer for Callback<'_> { + type Error = io::Error; + fn updated(&mut self, data: &mut SyncedFloats, id: u8) -> io::Result<()> { + self.event(&format!( + "updated {id} {:08x} {} {}", + bits(data.get(id).unwrap()), + data.is_dirty(), + data.item_dirty(id).unwrap() + ))?; + if self.nested { + return Ok(()); + } + self.nested = true; + let other = self.op["other"].as_u64().unwrap() as u8; + let value = single(&self.op["other_value"]); + let result = match self.op["hook"].as_str().unwrap() { + "none" => Ok(()), + "pack" => writeln!( + self.out, + "callback-pack {}", + values(data.take_dirty().as_deref()) + ), + "set" => data + .set( + other, + value, + self.op["other_force"].as_bool().unwrap(), + self, + ) + .map_err(|e| match e { + DataError::Observer(e) => e, + DataError::UnknownId(_) => panic!("hook uses registered ID"), + }), + "assign" => data + .assign(&[FloatValue { id: other, value }], self) + .map_err(|e| match e { + DataError::Observer(e) => e, + DataError::UnknownId(_) => panic!("hook uses registered ID"), + }), + _ => panic!("hook"), + }; + self.nested = false; + result + } + fn assigned(&mut self, _: &mut SyncedFloats, v: &[FloatValue]) -> io::Result<()> { + self.event(&format!("assigned {}", values(Some(v)))) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let initial = parse(&f["initial"]); + let mut ids = initial.iter().map(|v| v.id).collect::<Vec<_>>(); + ids.sort_unstable(); + let mut data = SyncedFloats::new(&initial)?; + for op in f["ops"].as_array().unwrap() { + let mut cb = Callback { + out: &mut out, + op, + calls: 0, + nested: false, + }; + let id = op["id"].as_u64().unwrap() as u8; + let result = match op["mode"].as_str().unwrap() { + "set" => data.set( + id, + single(&op["value"]), + op["force"].as_bool().unwrap(), + &mut cb, + ), + "assign" => data.assign(&parse(&op["values"]), &mut cb), + "get" => data.get(id).map_err(DataError::UnknownId).and_then(|v| { + writeln!(cb.out, "get {:08x}", bits(v)).map_err(DataError::Observer) + }), + "pack" => writeln!(cb.out, "packed {}", values(data.take_dirty().as_deref())) + .map_err(DataError::Observer), + "defaults" => { + writeln!(cb.out, "defaults {}", values(data.non_default().as_deref())) + .map_err(DataError::Observer) + } + _ => panic!("mode"), + }; + match result { + Ok(()) => writeln!(cb.out, "result ok")?, + Err(DataError::Observer(_)) => writeln!(cb.out, "error observer")?, + Err(DataError::UnknownId(_)) => writeln!(cb.out, "error id")?, + } + writeln!(cb.out, "dirty {}", data.is_dirty())?; + for id in &ids { + writeln!( + cb.out, + "state {id} {:08x} {} {}", + bits(data.get(*id).unwrap()), + data.item_dirty(*id).unwrap(), + data.is_default(*id).unwrap() + )?; + } + writeln!(cb.out, "calls {}", cb.calls)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/teleport_consume_fixture.rs b/crates/horizon-world/examples/teleport_consume_fixture.rs new file mode 100644 index 000000000..0c21b359c --- /dev/null +++ b/crates/horizon-world/examples/teleport_consume_fixture.rs @@ -0,0 +1,236 @@ +use horizon_core::{ + geometry::Vec3, + position::BlockPos, + random::{LegacyRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::teleport_consume::{TeleportConsume, TeleportConsumeWorld}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +struct World<'a, R> { + f: Value, + out: &'a mut dyn Write, + random: [R; 2], + pos: Vec3, + fall: f64, + grace: i32, + impact: bool, + riding: bool, + changed: bool, + calls: i32, + attempts: i32, +} +impl<R: RandomSource> World<'_, R> { + fn config(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn reset(&mut self) { + let c = self.config().clone(); + let p = &c["position"]; + self.pos = Vec3::new( + p[0].as_f64().unwrap(), + p[1].as_f64().unwrap(), + p[2].as_f64().unwrap(), + ); + self.fall = c["fall"].as_f64().unwrap(); + self.grace = n(&c, "grace"); + self.impact = c["impact"].as_bool().unwrap(); + self.riding = c["riding"].as_bool().unwrap(); + if c["reseed"].as_bool().unwrap() { + for i in 0..2 { + self.random[i].set_seed(c["seeds"][i].as_i64().unwrap()); + } + } + } + fn all(&mut self) { + writeln!( + self.out, + "state {} {} {} {} {} {} {} {} {} {}", + self.calls, + self.attempts, + self.changed, + self.riding, + bits(self.pos.x), + bits(self.pos.y), + bits(self.pos.z), + bits(self.fall), + self.grace, + self.impact + ) + .unwrap(); + } + fn event(&mut self, name: String) -> Result<(), &'static str> { + writeln!(self.out, "event {name}").unwrap(); + let i = self.calls; + self.calls += 1; + self.all(); + if i == n(&self.f, "fail") { + return Err("callback"); + } + if i == n(&self.f, "mutate") { + self.changed = true; + self.reset(); + } + Ok(()) + } +} +impl<R: RandomSource> TeleportConsumeWorld for World<'_, R> { + type Error = &'static str; + type Level = i32; + type Random = usize; + type Source = R; + fn position_field(&self) -> Vec3 { + self.pos + } + fn get_random(&mut self) -> Result<usize, Self::Error> { + self.event("random".into())?; + Ok(n(self.config(), "random") as usize) + } + fn random_source(&mut self, r: usize) -> &mut R { + &mut self.random[r] + } + fn min_y(&mut self, l: i32) -> Result<i32, Self::Error> { + self.event(format!("min {l}"))?; + Ok(n(self.config(), "min")) + } + fn logical_height(&mut self, l: i32) -> Result<i32, Self::Error> { + self.event(format!("height {l}"))?; + Ok(n(self.config(), "height")) + } + fn is_passenger(&mut self) -> Result<bool, Self::Error> { + self.event("passenger".into())?; + Ok(self.riding) + } + fn stop_riding(&mut self) -> Result<(), Self::Error> { + self.event("dismount".into())?; + self.riding = false; + Ok(()) + } + fn position(&mut self) -> Result<Vec3, Self::Error> { + self.event("position".into())?; + Ok(self.pos) + } + fn random_teleport(&mut self, p: Vec3) -> Result<bool, Self::Error> { + let i = self.attempts; + self.attempts += 1; + self.event(format!( + "teleport {} {} {}", + bits(p.x), + bits(p.y), + bits(p.z) + ))?; + let at = n(self.config(), "success_at"); + let success = at >= 0 && i >= at; + if self.config()["move"].as_bool().unwrap() { + self.pos = p; + } + Ok(success) + } + fn teleport_event(&mut self, l: i32, p: Vec3) -> Result<(), Self::Error> { + self.event(format!( + "game-event {l} {} {} {}", + bits(p.x), + bits(p.y), + bits(p.z) + )) + } + fn is_fox(&self) -> bool { + self.f["fox"].as_bool().unwrap() + } + fn teleport_sound(&mut self, l: i32, p: Vec3, fox: bool) -> Result<(), Self::Error> { + self.event(format!( + "sound {l} {fox} {} {} {}", + bits(p.x), + bits(p.y), + bits(p.z) + )) + } + fn block_position(&mut self) -> Result<BlockPos, Self::Error> { + self.event("block".into())?; + Ok(BlockPos::new( + self.pos.x.floor() as i32, + self.pos.y.floor() as i32, + self.pos.z.floor() as i32, + )) + } + fn directional_particles( + &mut self, + l: i32, + p: BlockPos, + offset: i32, + ) -> Result<(), Self::Error> { + self.event(format!("level-event {l} {} {} {} {offset}", p.x, p.y, p.z)) + } + fn reset_fall_distance(&mut self) -> Result<(), Self::Error> { + self.event("fall".into())?; + self.fall = 0.0; + Ok(()) + } + fn reset_impulse(&mut self) -> Result<(), Self::Error> { + self.event("impulse".into())?; + self.grace = 0; + self.impact = false; + Ok(()) + } +} +fn run<R: RandomSource>(f: Value, out: &mut dyn Write, make: fn(i64) -> R) { + let random = std::array::from_fn(|i| make(f["seeds"][i].as_i64().unwrap())); + let effect = TeleportConsume { + diameter: f32::from_bits(f["diameter"].as_u64().unwrap() as u32), + directional_particles: f["directional"].as_bool().unwrap(), + }; + let l = n(&f, "level"); + let mut w = World { + f, + out, + random, + pos: Vec3::ZERO, + fall: 0.0, + grace: 0, + impact: false, + riding: false, + changed: false, + calls: 0, + attempts: 0, + }; + w.reset(); + w.all(); + let result = effect.apply(&mut w, l); + writeln!( + w.out, + "result {}", + result.map(|v| v.to_string()).unwrap_or_else(str::to_string) + ) + .unwrap(); + w.all(); + for (i, r) in w.random.iter_mut().enumerate() { + writeln!(w.out, "random {i} {} {}", r.next_long(), r.next_long()).unwrap(); + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + if f["xor"].as_bool().unwrap() { + run(f, &mut out, XoroshiroRandom::new); + } else { + run(f, &mut out, LegacyRandom::new); + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/terrain_fixture.rs b/crates/horizon-world/examples/terrain_fixture.rs new file mode 100644 index 000000000..09868a340 --- /dev/null +++ b/crates/horizon-world/examples/terrain_fixture.rs @@ -0,0 +1,303 @@ +//! Test transport for registry-backed noise-stage filling against vanilla doFill. +use horizon_core::{ + density::{ + Beardifier, JigsawJunction, RigidPiece, SamplerContext, StructureBounds, TerrainAdjustment, + WorldField, WorldFields, graph::DensityCompiler, + }, + noise::DensityVolume, + position::ChunkPos, + random::{LegacyRandom, PositionalRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::{ + DATA_VERSION, + heightmap::{HeightmapState, HeightmapType}, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, + worldgen::{ + aquifer::{ + AquiferConfig, DisabledAquifer, GlobalFluidPicker, NoiseBasedAquifer, + RegistryAquiferBlockStates, + }, + density::DensityRegistry, + router::{NoiseRouter, RouterField}, + tags::TagDefinitions, + terrain::{TerrainAquifer, TerrainBlockStates, TerrainChunk, fill_noise}, + }, +}; +use serde_json::Value; +use std::{ + collections::{BTreeMap, BTreeSet}, + fs, + io::{self, Write}, + path::Path, + sync::Arc, +}; +#[derive(Clone, Copy)] +struct State { + air: bool, + air_block: bool, + fluid: bool, + motion: bool, + no_leaves: bool, +} +impl HeightmapState for State { + fn is_air(self) -> bool { + self.air + } + fn is_air_block(self) -> bool { + self.air_block + } + fn has_fluid(self) -> bool { + self.fluid + } + fn blocks_motion_in_heightmap(self) -> bool { + self.motion + } + fn blocks_motion_in_heightmap_no_leaves(self) -> bool { + self.no_leaves + } +} +struct Properties<'a>(&'a [State]); +impl TerrainBlockStates for Properties<'_> { + type State = State; + fn heightmap_state(&self, id: BlockStateId) -> State { + self.0[id.0 as usize] + } +} +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +fn tag(v: &Value) -> Tag { + match v { + Value::String(s) => Tag::String(s.as_str().into()), + Value::Number(i) => Tag::Int(i.as_i64().unwrap() as i32), + Value::Object(m) => { + Tag::Compound(m.iter().map(|(k, v)| (k.as_str().into(), tag(v))).collect()) + } + Value::Array(a) => Tag::List(a.iter().map(tag).collect()), + _ => panic!("unsupported registry fixture value"), + } +} +fn structure(v: &Value) -> Beardifier { + let bounds = |v: &Value| { + StructureBounds::new( + std::array::from_fn(|i| n(&v[i])), + std::array::from_fn(|i| n(&v[i + 3])), + ) + .unwrap() + }; + let pieces = v["pieces"] + .as_array() + .unwrap() + .iter() + .map(|a| RigidPiece { + bounds: bounds(&a[0]), + ground_level_delta: n(&a[2]), + adjustment: match a[1].as_str().unwrap() { + "NONE" => TerrainAdjustment::None, + "BURY" => TerrainAdjustment::Bury, + "BEARD_THIN" => TerrainAdjustment::BeardThin, + "BEARD_BOX" => TerrainAdjustment::BeardBox, + "ENCAPSULATE" => TerrainAdjustment::Encapsulate, + _ => panic!("unknown adjustment"), + }, + }) + .collect(); + let junctions = v["junctions"] + .as_array() + .unwrap() + .iter() + .map(|a| JigsawJunction { + source_x: n(&a[0]), + source_ground_y: n(&a[1]), + source_z: n(&a[2]), + }) + .collect(); + Beardifier::new(pieces, junctions, Some(bounds(&v["affected"]))) +} +fn fixture( + f: Value, + registry: &BlockRegistry, + states: &[State], + bundle: &Value, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let min = n(&f["min"]); + let height = n(&f["height"]); + let cx = n(&f["cx"]); + let cz = n(&f["cz"]); + let seed = f["seed"].as_i64().unwrap(); + let legacy = f["legacy"].as_bool().unwrap(); + let volume = DensityVolume::new( + [16, n(&f["noise_height"]), 16], + [cx.wrapping_shl(4), n(&f["noise_min"]), cz.wrapping_shl(4)], + [1; 3], + )?; + let mut chunk = TerrainChunk::new( + ChunkPos { x: cx, z: cz }, + min, + height, + registry, + Properties(states), + )?; + for a in f["initial"].as_array().unwrap() { + chunk.set_block_raw(n(&a[0]), n(&a[1]), n(&a[2]), BlockStateId(n(&a[3]) as u32))?; + } + let noises: BTreeMap<String, String> = serde_json::from_value(bundle["noises"].clone())?; + let densities: BTreeMap<String, String> = serde_json::from_value(bundle["densities"].clone())?; + let mut definitions = DensityRegistry::from_json(&noises, &densities)?; + let router = NoiseRouter::from_json(&f["router"].to_string(), &mut definitions)?; + let config = if f["aquifers"].is_null() { + None + } else { + Some(AquiferConfig::from_json( + &f["aquifers"].to_string(), + &mut definitions, + )?) + }; + let mut compiler = DensityCompiler::new_seeded(definitions.into_graph(), seed, legacy); + let mut context = SamplerContext::cached(); + if let Some(source) = f.get("structure") { + context = context.with_world_fields( + WorldFields::default().with_field(WorldField::Beardifier, Arc::new(structure(source))), + ); + } + let air = registry.default_state("minecraft:air").unwrap(); + let picker = GlobalFluidPicker::new( + n(&f["sea"]), + BlockStateId(n(&f["fluid"]) as u32), + registry.default_state("minecraft:lava").unwrap(), + air, + ); + let mut aquifer: Box<dyn TerrainAquifer> = if let Some(config) = config { + let samplers = config.compile(&mut compiler)?; + let blocks = RegistryAquiferBlockStates::new(registry)?; + if legacy { + let random = LegacyRandom::new(seed) + .fork_positional() + .from_hash_of("minecraft:aquifer") + .fork_positional(); + Box::new(NoiseBasedAquifer::new( + samplers, + picker, + random, + blocks, + volume, + &mut context, + )?) + } else { + let random = XoroshiroRandom::new(seed) + .fork_positional() + .from_hash_of("minecraft:aquifer") + .fork_positional(); + Box::new(NoiseBasedAquifer::new( + samplers, + picker, + random, + blocks, + volume, + &mut context, + )?) + } + } else { + Box::new(DisabledAquifer::new(picker, air)) + }; + let density = compiler.get_sampler(router.function(RouterField::FinalDensity))?; + writeln!(out, "chunk {cx} {cz} {min} {height}")?; + for repeat in 0..n(&f["repeats"]) { + fill_noise( + &mut chunk, + volume, + density.as_ref(), + &mut context, + aquifer.as_mut(), + BlockStateId(n(&f["block"]) as u32), + )?; + writeln!( + out, + "fill {repeat} {}", + aquifer.should_schedule_fluid_update() + )?; + for section in 0..(height / 16) as usize { + writeln!(out, "section {section}")?; + for index in 0..4096 { + writeln!(out, "{}", chunk.section(section).unwrap().get(index)?.0)?; + } + } + for kind in [HeightmapType::OceanFloorWg, HeightmapType::WorldSurfaceWg] { + writeln!(out, "heightmap {}", kind.name())?; + for word in chunk.heightmap(kind).unwrap().raw_data() { + writeln!(out, "{word:x}")?; + } + } + for (section, list) in chunk.postprocessing().iter().enumerate() { + writeln!(out, "post {section} {}", list.len())?; + for offset in list { + writeln!(out, "{offset}")?; + } + } + } + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts-server.json"))?)?; + let bundle: Value = serde_json::from_str(&fs::read_to_string(dir.join("registries.json"))?)?; + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ( + "states", + Tag::List( + facts["states"] + .as_array() + .unwrap() + .iter() + .map(|s| tag(&s[4])) + .collect(), + ), + ), + ("defaults", tag(&facts["defaults"])), + ]))?; + let mut definitions = TagDefinitions::default(); + for (name, text) in bundle["tags"].as_object().unwrap() { + definitions.apply_json(name, "vanilla", text.as_str().unwrap())?; + } + let built = definitions.build(|id, _| facts["defaults"].get(id).map(|_| id.to_owned()))?; + assert!(built.missing.is_empty()); + let motion: BTreeSet<_> = built.tags["minecraft:blocks_motion_in_heightmap"] + .iter() + .map(String::as_str) + .collect(); + let no_leaves: BTreeSet<_> = built.tags["minecraft:blocks_motion_in_heightmap_no_leaves"] + .iter() + .map(String::as_str) + .collect(); + let states: Vec<_> = facts["states"] + .as_array() + .unwrap() + .iter() + .map(|a| { + let name = a[0].as_str().unwrap(); + State { + air: a[1].as_bool().unwrap(), + air_block: name == "minecraft:air", + fluid: a[2].as_bool().unwrap(), + motion: motion.contains(name), + no_leaves: no_leaves.contains(name), + } + }) + .collect(); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + fixture( + serde_json::from_str(line)?, + ®istry, + &states, + &bundle, + &mut out, + )?; + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-world/examples/tick_fixture.rs b/crates/horizon-world/examples/tick_fixture.rs new file mode 100644 index 000000000..7b5bfa8ed --- /dev/null +++ b/crates/horizon-world/examples/tick_fixture.rs @@ -0,0 +1,71 @@ +//! Process vanilla saved block/fluid ticks through Horizon's storage and queues. +use horizon_core::{ + position::ChunkPos, + ticks::{ScheduledTick, TickPriority, TickTypeId}, +}; +use horizon_world::{ + chunk::ChunkData, + compression::Compression, + nbt::{self, Limits, Tag}, + region::{ChunkRecord, RegionFile, RegionWriter}, + tick_data::TickKind, +}; +use std::{collections::BTreeMap, error::Error, fs, path::PathBuf}; +fn main() -> Result<(), Box<dyn Error>> { + let base = PathBuf::from( + std::env::args() + .nth(1) + .ok_or("expected fixture directory")?, + ); + let bytes = fs::read(base.join("ticks-input.nbt"))?; + let (root, used) = nbt::read_named(&bytes, Limits::default())?; + assert_eq!(used, bytes.len()); + let mut chunk = ChunkData::new(root)?; + for (kind, ids_field, time) in [ + (TickKind::Block, "block_ids", 1000), + (TickKind::Fluid, "fluid_ids", i64::MAX - 8), + ] { + let Some(Tag::Compound(entries)) = chunk.root().tag.get(ids_field) else { + return Err("missing type IDs".into()); + }; + let mut ids = BTreeMap::new(); + let mut names = BTreeMap::new(); + for (name, id) in entries { + let Tag::Int(id) = id else { + return Err("invalid ID".into()); + }; + let name = name.to_string()?; + ids.insert(name.clone(), TickTypeId(*id as u32)); + names.insert(TickTypeId(*id as u32), name); + } + let mut ticks = chunk.saved_ticks(kind, |name| ids.get(name).copied())?; + assert!(ticks.peek().is_none()); + assert_eq!(ticks.count(), 251); + ticks.unpack(time); + if let Some(first) = ticks.poll() { + assert!(ticks.schedule(ScheduledTick { + trigger_tick: time.wrapping_add(123), + priority: TickPriority::High, + sub_tick_order: 77, + ..first + })); + } + let saved = ticks.pack(time); + chunk.set_saved_ticks(kind, &saved, |id| names.get(&id).cloned())?; + } + let root = chunk.into_nbt(); + fs::write( + base.join("ticks-output.nbt"), + nbt::write_named(&root, Limits::default())?, + )?; + let path = base.join("tick-region/r.0.0.mca"); + let record = ChunkRecord::from_nbt(&root, Compression::Zlib, 123, Limits::default())?; + let mut writer = RegionWriter::create(&path)?; + writer.write(ChunkPos::new(0, 0), &record)?; + writer.finish()?; + let record = RegionFile::open(path)? + .read(ChunkPos::new(0, 0))? + .ok_or("missing region chunk")?; + assert_eq!(record.nbt(Limits::default())?, root); + Ok(()) +} diff --git a/crates/horizon-world/examples/tree_feature_fixture.rs b/crates/horizon-world/examples/tree_feature_fixture.rs new file mode 100644 index 000000000..93b89ad9c --- /dev/null +++ b/crates/horizon-world/examples/tree_feature_fixture.rs @@ -0,0 +1,623 @@ +//! Vanilla tree, fallen-tree and ore features over a layered synthetic world. +use horizon_core::{ + geometry::{Direction, VoxelShape}, + random::{LegacyRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::{ + block_collision::{BlockCollisionRegistry, DynamicCollisionWorld, ShulkerCollisionState}, + block_placement::BlockPlacementBindings, + block_properties::BlockPropertiesRegistry, + block_support::{BlockSupportRegistry, SupportType}, + block_survival::{BlockSurvivalRegistry, SurvivalDefinitions, SurvivalRule, SurvivalWorld}, + collision::CachedCollisionRegistry, + dynamic_support::DynamicSupportWorld, + fluid::{FluidKind, FluidState, FluidStateTable}, + heightmap::HeightmapType, + nbt::{self, Limits, Tag}, + registry::{BlockRegistry, BlockStateId}, + worldgen::{ + anchor::WorldGenerationContext, + block_feature::FeatureBlockBindings, + feature::{FeatureBlocks, FeatureWorld}, + feature_catalog::FeatureCatalog, + placement::{PlacementContext, PlacementQueryError}, + state_provider::{StateProviderBindings, StateProviderCatalog}, + tags::TagDefinitions, + }, +}; +use serde_json::Value; +use std::{ + collections::{BTreeMap, BTreeSet, HashMap}, + fs, + io::{self, BufRead, Write}, + path::Path, + sync::Arc, +}; + +const MIN_Y: i32 = -64; +const HEIGHT: i32 = 384; + +struct Terrain { + layers: Vec<[i32; 2]>, + boxes: Vec<[i32; 7]>, + hole: [i32; 2], + obstacle: [i32; 3], + overrides: HashMap<[i32; 3], u32>, + air: u32, +} +impl Terrain { + fn new(f: &Value, air: u32) -> Self { + let n = |key: &str| f[key].as_i64().unwrap() as i32; + Self { + layers: f["layers"] + .as_array() + .unwrap() + .iter() + .map(|l| [l[0].as_i64().unwrap() as i32, l[1].as_i64().unwrap() as i32]) + .collect(), + boxes: f + .get("boxes") + .and_then(Value::as_array) + .map(|boxes| { + boxes + .iter() + .map(|b| std::array::from_fn(|i| b[i].as_i64().unwrap() as i32)) + .collect() + }) + .unwrap_or_default(), + hole: [n("hole_mod"), n("hole_state")], + obstacle: [n("obstacle_mod"), n("obstacle_state"), n("obstacle_min")], + overrides: f["states"] + .as_array() + .unwrap() + .iter() + .map(|v| { + ( + std::array::from_fn(|i| v[i].as_i64().unwrap() as i32), + v[3].as_u64().unwrap() as u32, + ) + }) + .collect(), + air, + } + } + fn hash(x: i32, y: i32, z: i32) -> i32 { + let mut h = x.wrapping_mul(73856093) ^ y.wrapping_mul(19349663) ^ z.wrapping_mul(83492791); + h ^= ((h as u32) >> 13) as i32; + h = h.wrapping_mul(0x5bd1e995); + h ^= ((h as u32) >> 15) as i32; + h & 0x7fff_ffff + } + fn at(&self, [x, y, z]: [i32; 3]) -> BlockStateId { + if let Some(state) = self.overrides.get(&[x, y, z]) { + return BlockStateId(*state); + } + for b in &self.boxes { + if x >= b[0] && y >= b[1] && z >= b[2] && x <= b[3] && y <= b[4] && z <= b[5] { + return BlockStateId(b[6] as u32); + } + } + let h = Self::hash(x, y, z); + if let Some(layer) = self.layers.iter().find(|l| y <= l[0]) { + if self.hole[0] > 0 && h % self.hole[0] == 0 { + return BlockStateId(self.hole[1] as u32); + } + return BlockStateId(layer[1] as u32); + } + if self.obstacle[0] > 0 && y >= self.obstacle[2] && h % self.obstacle[0] == 0 { + return BlockStateId(self.obstacle[1] as u32); + } + BlockStateId(self.air) + } +} + +struct World<'a, 'r, W> { + out: &'a mut W, + terrain: Terrain, + overlay: BTreeMap<[i32; 3], BlockStateId>, + void_air: BlockStateId, + height: i32, + fluids: &'a FluidStateTable, + tags: &'a BTreeMap<String, BTreeSet<BlockStateId>>, + support: &'a BlockSupportRegistry<'r>, + survival: &'a BlockSurvivalRegistry<'r>, + collision: &'a BlockCollisionRegistry<'r>, + seed: i64, + chest: BlockStateId, + world_random: LegacyRandom, + water_mask: u8, +} +impl<W: Write> World<'_, '_, W> { + fn get(&self, p: [i32; 3]) -> BlockStateId { + if p[1] < MIN_Y || p[1] >= MIN_Y + HEIGHT { + return self.void_air; + } + self.overlay + .get(&p) + .copied() + .unwrap_or_else(|| self.terrain.at(p)) + } +} +fn query(error: impl std::fmt::Display) -> PlacementQueryError { + PlacementQueryError::Failed(error.to_string()) +} +impl<W: Write> FeatureWorld for World<'_, '_, W> { + type Error = io::Error; + fn block(&mut self, p: [i32; 3]) -> io::Result<BlockStateId> { + Ok(self.get(p)) + } + fn set_block(&mut self, p: [i32; 3], state: BlockStateId, flags: i32) -> io::Result<bool> { + writeln!( + self.out, + "set {} {} {} {} {flags}", + p[0], p[1], p[2], state.0 + )?; + if p[1] < MIN_Y || p[1] >= MIN_Y + HEIGHT { + return Ok(false); + } + self.overlay.insert(p, state); + Ok(true) + } +} +impl<W: Write> DynamicSupportWorld for World<'_, '_, W> { + type Error = io::Error; + fn shulker_is_closed(&mut self, _: [i32; 3]) -> io::Result<Option<bool>> { + Ok(None) + } + fn moving_piston_shape(&mut self, _: [i32; 3]) -> io::Result<Option<VoxelShape>> { + Ok(None) + } +} +impl<W: Write> DynamicCollisionWorld for World<'_, '_, W> { + fn shulker_collision_state( + &mut self, + _: [i32; 3], + ) -> io::Result<Option<ShulkerCollisionState>> { + Ok(None) + } +} +impl<W: Write> SurvivalWorld for World<'_, '_, W> { + fn block_state(&mut self, p: [i32; 3]) -> io::Result<BlockStateId> { + Ok(self.get(p)) + } + fn fluid_state(&mut self, p: [i32; 3]) -> io::Result<FluidState> { + self.fluids + .get(self.get(p)) + .ok_or_else(|| io::Error::other("unknown fluid")) + } + fn raw_brightness(&mut self, _: [i32; 3], _: i32) -> io::Result<i32> { + Ok(15) + } +} +impl<W: Write> PlacementContext for World<'_, '_, W> { + fn collision_full_block( + &mut self, + state: BlockStateId, + p: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + use horizon_core::geometry::Axis; + let collision = self.collision; + let shape = collision.collision_shape(self, state, p).map_err(query)?; + let [nx, ny, nz] = shape.sizes(); + let spans = [Axis::X, Axis::Y, Axis::Z] + .into_iter() + .all(|axis| shape.min(axis) == 0.0 && shape.max(axis) == 1.0); + Ok(!shape.is_empty() + && spans + && (0..nx).all(|x| { + (0..ny).all(|y| (0..nz).all(|z| shape.is_full(x as i32, y as i32, z as i32))) + })) + } + fn configure_end_gateway( + &mut self, + _: [i32; 3], + _: [i32; 3], + _: bool, + ) -> Result<(), PlacementQueryError> { + Ok(()) + } + fn world_seed(&mut self) -> Result<i64, PlacementQueryError> { + Ok(self.seed) + } + fn next_world_boolean(&mut self) -> Result<bool, PlacementQueryError> { + Ok(self.world_random.next_boolean()) + } + fn schedule_block_tick( + &mut self, + _: [i32; 3], + _: BlockStateId, + _: i32, + ) -> Result<(), PlacementQueryError> { + Ok(()) + } + fn schedule_fluid_tick( + &mut self, + _: [i32; 3], + _: FluidKind, + _: i32, + ) -> Result<(), PlacementQueryError> { + Ok(()) + } + fn block_brightness(&mut self, _: [i32; 3]) -> Result<i32, PlacementQueryError> { + Ok(15) + } + fn sea_level(&mut self) -> Result<i32, PlacementQueryError> { + Ok(63) + } + fn water_at(&mut self, p: [i32; 3]) -> Result<bool, PlacementQueryError> { + let fluid = PlacementContext::fluid_state(self, p)?; + Ok(fluid.kind().mask() & self.water_mask != 0) + } + fn block_survives( + &mut self, + state: BlockStateId, + p: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + let survival = self.survival; + survival.can_survive(self, state, p).map_err(query) + } + fn attachment_at( + &mut self, + p: [i32; 3], + direction: Direction, + ) -> Result<bool, PlacementQueryError> { + let survival = self.survival; + survival.can_attach_to(self, p, direction).map_err(query) + } + fn state_collision_empty( + &mut self, + state: BlockStateId, + p: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + let collision = self.collision; + collision + .collision_shape(self, state, p) + .map(|shape| shape.is_empty()) + .map_err(query) + } + fn set_block_entity_loot_table( + &mut self, + p: [i32; 3], + table: &str, + random: &mut impl RandomSource, + ) -> Result<(), PlacementQueryError> { + if self.get(p) == self.chest { + let seed = random.next_long(); + writeln!(self.out, "loot {} {} {} {table} {seed}", p[0], p[1], p[2]).map_err(query)?; + } + Ok(()) + } + fn configure_spawner(&mut self, p: [i32; 3], entity: &str) -> Result<(), PlacementQueryError> { + writeln!(self.out, "spawner {} {} {} {entity}", p[0], p[1], p[2]).map_err(query) + } + fn generation(&self) -> WorldGenerationContext { + WorldGenerationContext::new(MIN_Y, HEIGHT, 63) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(MIN_Y) + } + fn max_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(MIN_Y + HEIGHT - 1) + } + fn height(&mut self, _: HeightmapType, _: i32, _: i32) -> Result<i32, PlacementQueryError> { + Ok(self.height) + } + fn block_state(&mut self, p: [i32; 3]) -> Result<BlockStateId, PlacementQueryError> { + Ok(self.get(p)) + } + fn fluid_state(&mut self, p: [i32; 3]) -> Result<FluidState, PlacementQueryError> { + self.fluids + .get(self.get(p)) + .ok_or_else(|| query("unknown fluid")) + } + fn block_matches_tag(&mut self, p: [i32; 3], tag: &str) -> Result<bool, PlacementQueryError> { + let state = self.get(p); + Ok(self.tags.get(tag).is_some_and(|s| s.contains(&state))) + } + fn state_face_sturdy( + &mut self, + state: BlockStateId, + p: [i32; 3], + direction: Direction, + ) -> Result<bool, PlacementQueryError> { + let support = self.support; + support + .is_face_sturdy(self, state, p, direction, SupportType::Full) + .map_err(query) + } + fn face_sturdy( + &mut self, + p: [i32; 3], + direction: Direction, + ) -> Result<bool, PlacementQueryError> { + let state = self.get(p); + self.state_face_sturdy(state, p, direction) + } + fn mark_postprocessing(&mut self, p: [i32; 3]) -> Result<(), PlacementQueryError> { + writeln!(self.out, "post {} {} {}", p[0], p[1], p[2]).map_err(query) + } + fn set_section_block( + &mut self, + p: [i32; 3], + state: BlockStateId, + ) -> Result<(), PlacementQueryError> { + self.overlay.insert(p, state); + Ok(()) + } + fn store_beehive_occupants( + &mut self, + p: [i32; 3], + ticks: &[i32], + ) -> Result<(), PlacementQueryError> { + for t in ticks { + writeln!(self.out, "bee {} {} {} {t}", p[0], p[1], p[2]).map_err(query)?; + } + Ok(()) + } +} + +#[allow(clippy::too_many_arguments)] +fn fixture<R: RandomSource>( + f: &Value, + mut random: R, + catalog: &FeatureCatalog, + features: &BTreeMap<String, String>, + bindings: &FeatureBlockBindings<'_>, + blocks: FeatureBlocks, + world: &mut World<'_, '_, impl Write>, +) -> io::Result<()> { + let name = f["feature"].as_str().unwrap(); + writeln!(world.out, "fixture {name}")?; + let feature = match catalog.feature_with_blocks(&features[name], bindings) { + Ok(feature) => feature, + Err(error) => { + eprintln!("decode {name}: {error}"); + return writeln!(world.out, "decode error"); + } + }; + let origin = std::array::from_fn(|i| f["origin"][i].as_i64().unwrap() as i32); + match feature.place(world, &mut random, origin, blocks) { + Ok(result) => writeln!(world.out, "place {result}")?, + Err(error) => { + eprintln!("{name}: {error}"); + writeln!(world.out, "place error")? + } + } + writeln!(world.out, "next {}", random.next_long())?; + let changes: Vec<_> = world + .overlay + .iter() + .filter(|(p, state)| world.terrain.at(**p) != **state) + .map(|(p, s)| (*p, *s)) + .collect(); + for (p, state) in changes { + writeln!(world.out, "final {} {} {} {}", p[0], p[1], p[2], state.0)?; + } + writeln!(world.out, "end") +} + +fn survival_rule(rule: &str) -> SurvivalRule { + use SurvivalRule::*; + match rule { + value if value.starts_with("TagBelow:") => TagBelow(value[9..].to_owned()), + "CactusFlower" => CactusFlower, + "Seagrass" => Seagrass, + "BubbleColumn" => BubbleColumn, + "RedstoneWire" => RedstoneWire, + "DoublePlant" => DoublePlant, + "Door" => Door, + "BigDripleaf" => BigDripleaf, + "BigDripleafStem" => BigDripleafStem, + "Farmland" => Farmland, + "Cocoa" => Cocoa, + "Crop" => Crop, + "GrowingPlant" => GrowingPlant, + "MangrovePropagule" => MangrovePropagule, + "Speleothem" => Speleothem, + "Scaffolding" => Scaffolding, + "PistonHead" => PistonHead, + "ChorusPlant" => ChorusPlant, + "ChorusFlower" => ChorusFlower, + "PitcherCrop" => PitcherCrop, + "Multiface" => Multiface, + "Vine" => Vine, + "HangingMoss" => HangingMoss, + "SnowLayer" => SnowLayer, + "SeaPickle" => SeaPickle, + "Fire" => Fire, + "Cactus" => Cactus, + "Path" => Path, + "Mushroom" => Mushroom, + "Bell" => Bell, + "SugarCane" => SugarCane, + "LilyPad" => LilyPad, + "Frogspawn" => Frogspawn, + "SporeBlossom" => SporeBlossom, + "SmallDripleaf" => SmallDripleaf, + "TallSeagrass" => TallSeagrass, + "Always" => Always, + "SolidBelow" => SolidBelow, + "SolidBehind" => SolidBehind, + "NonAirBelow" => NonAirBelow, + "MossCarpet" => MossCarpet, + "CenterBelow" => CenterBelow, + "Lantern" => Lantern, + "FullAbove" => FullAbove, + "FullBehind" => FullBehind, + "RigidOrCenterBelow" => RigidOrCenterBelow, + "RigidBelow" => RigidBelow, + "FullBelow" => FullBelow, + "CenterAbove" => CenterAbove, + "FaceAttached" => FaceAttached, + "SupportsBamboo" => SupportsBamboo, + _ => panic!("unknown rule {rule}"), + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let read = |name: &str| -> Result<Tag, Box<dyn std::error::Error>> { + Ok( + nbt::read_named(&fs::read(dir.join(name))?, Limits::default())? + .0 + .tag, + ) + }; + let registry = BlockRegistry::from_nbt(&read("block-registry.nbt")?)?; + let collisions = CachedCollisionRegistry::from_nbt(&read("cached-collision.nbt")?, ®istry)?; + let properties = + BlockPropertiesRegistry::from_nbt(&read("block-properties.nbt")?, &collisions)?; + let support = BlockSupportRegistry::from_nbt(&read("cached-support.nbt")?, ®istry)?; + let resources: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("tags.json"))?)?; + let mut tags = TagDefinitions::default(); + for (name, text) in resources { + tags.apply_json(&name, "vanilla", &text)?; + } + let tags = tags.build(|name, _| registry.default_state(name).map(|_| name.to_owned()))?; + let fluid_resources: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("fluid-tags.json"))?)?; + let mut fluid_tags = TagDefinitions::default(); + for (name, text) in fluid_resources { + fluid_tags.apply_json(&name, "vanilla", &text)?; + } + let fluid_tags = + fluid_tags.build(|name, _| FluidKind::from_name(name).map(|_| name.to_owned()))?; + let facts: Value = serde_json::from_str(&fs::read_to_string(dir.join("facts.json"))?)?; + let integers: BTreeSet<(String, String)> = facts["integers"] + .as_array() + .unwrap() + .iter() + .map(|v| { + ( + v[0].as_str().unwrap().to_owned(), + v[1].as_str().unwrap().to_owned(), + ) + }) + .collect(); + let bundle: Value = + serde_json::from_str(&fs::read_to_string(dir.join("vanilla-features.json"))?)?; + let providers: BTreeMap<String, String> = serde_json::from_value(bundle["providers"].clone())?; + let features: BTreeMap<String, String> = serde_json::from_value(bundle["features"].clone())?; + let placed: BTreeMap<String, String> = serde_json::from_value(bundle["placed"].clone())?; + let definitions: Value = + serde_json::from_str(&fs::read_to_string(dir.join("placement-definitions.json"))?)?; + let bindings = FeatureBlockBindings::with_tags(®istry, integers.clone(), &tags.tags)? + .with_block_properties(&properties)? + .with_fluid_tags(&fluid_tags.tags)? + .with_state_providers( + StateProviderBindings::new(®istry, integers, &tags.tags)? + .with_block_properties(&properties)? + .with_fluid_tags(&fluid_tags.tags)?, + StateProviderCatalog::from_resources(&providers)?, + BlockPlacementBindings::new( + ®istry, + &properties, + &serde_json::from_value(definitions["double_plants"].clone())?, + &serde_json::from_value(definitions["mossy_carpets"].clone())?, + )?, + )?; + let catalog = FeatureCatalog::from_resources(&features, &placed, &TagDefinitions::default())?; + let blocks = FeatureBlocks::from_registry(®istry)?; + let fluids = FluidStateTable::new(®istry)?; + let mut by_name = BTreeMap::<String, Vec<BlockStateId>>::new(); + for id in 0..registry.len() { + let id = BlockStateId(id as u32); + by_name + .entry(registry.state(id).unwrap().name.clone()) + .or_default() + .push(id); + } + let tag_states: BTreeMap<String, BTreeSet<BlockStateId>> = tags + .tags + .iter() + .map(|(name, entries)| { + ( + name.clone(), + entries + .iter() + .flat_map(|e| by_name.get(e).into_iter().flatten().copied()) + .collect(), + ) + }) + .collect(); + let support = Arc::new(support); + let definitions_text: BTreeMap<String, String> = + serde_json::from_str(&fs::read_to_string(dir.join("survival-rules.json"))?)?; + let rules = definitions_text + .into_iter() + .map(|(name, rule)| (name, survival_rule(&rule))) + .collect(); + let extra: Value = serde_json::from_str(&fs::read_to_string( + dir.join("survival-extra-definitions.json"), + )?)?; + let survival_definitions = SurvivalDefinitions { + rules, + ignition_odds: serde_json::from_value(extra["ignition_odds"].clone())?, + fence_gates: serde_json::from_value(extra["fence_gates"].clone())?, + }; + let collision = Arc::new(BlockCollisionRegistry::new(Arc::new( + CachedCollisionRegistry::from_nbt(&read("cached-collision.nbt")?, ®istry)?, + ))?); + let survival = BlockSurvivalRegistry::new( + ®istry, + &properties, + support.clone(), + collision.clone(), + &survival_definitions, + &tags.tags, + &fluid_tags.tags, + )?; + let chest = registry.default_state("minecraft:chest").unwrap(); + let water_mask = fluid_tags.tags["minecraft:water"] + .iter() + .fold(0, |mask, name| { + mask | FluidKind::from_name(name).unwrap().mask() + }); + let air = registry.default_state("minecraft:air").unwrap().0; + let void_air = registry.default_state("minecraft:void_air").unwrap(); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in io::BufReader::new(fs::File::open(dir.join("inputs.txt"))?).lines() { + let f: Value = serde_json::from_str(&line?)?; + let mut world = World { + out: &mut out, + terrain: Terrain::new(&f, air), + overlay: BTreeMap::new(), + void_air, + height: f["height"].as_i64().unwrap() as i32, + fluids: &fluids, + tags: &tag_states, + support: &support, + survival: &survival, + collision: &collision, + seed: f["world_seed"].as_i64().unwrap_or(0), + chest, + world_random: LegacyRandom::new(0), + water_mask, + }; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture( + &f, + LegacyRandom::new(seed), + &catalog, + &features, + &bindings, + blocks, + &mut world, + )?; + } else { + fixture( + &f, + XoroshiroRandom::new(seed), + &catalog, + &features, + &bindings, + blocks, + &mut world, + )?; + } + } + out.flush()?; + Ok(()) +} diff --git a/crates/horizon-world/examples/use_flag_reaction_fixture.rs b/crates/horizon-world/examples/use_flag_reaction_fixture.rs new file mode 100644 index 000000000..038b529fc --- /dev/null +++ b/crates/horizon-world/examples/use_flag_reaction_fixture.rs @@ -0,0 +1,369 @@ +use horizon_world::{ + component_patch::Prototype, + inventory_use::{ + ActiveStack, DurationServices, InventoryUse, UseServices, UseView, flags_updated, + }, + item_stack_refs::{ItemStacks, StackRef}, + item_use_lifecycle::{self, UseState}, + living_use_flags, + player_equipment::InteractionHand, + player_inventory::{EntityEquipment, EquipmentSlot, PlayerInventory}, + synced_values::{DataValue, SyncedValues}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +type Stack = StackRef<usize, u8, bool>; +type State = ActiveStack<usize, u8, bool>; +type View<'a> = UseView<'a, usize, u8, bool>; +fn n(v: &Value, k: &str) -> i32 { + v[k].as_i64().unwrap() as i32 +} +struct Services { + f: Value, + out: io::BufWriter<fs::File>, + calls: i32, + changed: bool, + items: [Stack; 3], +} +impl Services { + fn config(&self) -> &Value { + &self.f[if self.changed { "after" } else { "initial" }] + } + fn id(&self, s: &Stack) -> usize { + self.items.iter().position(|v| v.same_reference(s)).unwrap() + } + fn reset(&self, view: View<'_>, state: &mut State) { + let c = self.config(); + state.item = self.items[n(c, "item") as usize].clone(); + state.remaining = n(c, "remaining"); + state.has_recent_kinetic_enemies = c["kinetic"].as_bool().unwrap(); + for i in 0..3 { + self.items[i].write().count = c["counts"][i].as_i64().unwrap() as i32; + } + view.inventory.clear(); + view.inventory.set_selected(n(c, "selected")).unwrap(); + for p in c["slots"].as_array().unwrap() { + view.inventory + .set( + p[0].as_i64().unwrap() as i32, + self.items[p[1].as_u64().unwrap() as usize].clone(), + ) + .unwrap(); + } + } + fn all(&mut self, view: &View<'_>, state: &State) -> io::Result<()> { + writeln!( + self.out, + "state {} {} {} {} {} {} {} {} {} {} {}", + self.id(&state.item), + state.remaining, + state.has_recent_kinetic_enemies, + living_use_flags::using_item(view.flags).unwrap(), + match living_use_flags::used_hand(view.flags).unwrap() { + InteractionHand::Main => 0, + InteractionHand::Off => 1, + }, + view.flags.get(8).unwrap(), + view.flags.is_dirty(), + view.flags.item_dirty(8).unwrap(), + view.inventory.selected(), + self.calls, + self.changed + )?; + writeln!( + self.out, + "counts {} {} {}", + self.items[0].read().count, + self.items[1].read().count, + self.items[2].read().count + )?; + let slots = (0..43) + .map(|i| self.id(&view.inventory.get(i).unwrap()).to_string()) + .collect::<Vec<_>>() + .join(","); + writeln!(self.out, "slots {slots}")?; + let eq = view + .inventory + .equipment() + .entries() + .iter() + .map(|(slot, s)| format!("{}={}", *slot as usize, self.id(s))) + .collect::<Vec<_>>() + .join(","); + writeln!(self.out, "equipment {eq}")?; + Ok(()) + } + fn event(&mut self, view: View<'_>, state: &mut State, name: &str) -> io::Result<()> { + writeln!(self.out, "{name}")?; + let index = self.calls; + self.calls += 1; + self.all(&view, state)?; + if index == n(&self.f, "fail") { + return Err(io::Error::other("injected callback failure")); + } + if index == n(&self.f, "mutate_at") { + self.changed = true; + self.reset(view, state); + } + Ok(()) + } +} +impl UseServices<usize, u8, bool> for Services { + type Error = io::Error; + type Level = usize; + fn level(&mut self, view: View<'_>, state: &mut State) -> io::Result<usize> { + self.event(view, state, "level")?; + Ok(n(self.config(), "level") as usize) + } + fn is_client(&mut self, view: View<'_>, state: &mut State, level: usize) -> io::Result<bool> { + self.event(view, state, &format!("client {level}"))?; + Ok(self.config()["clients"][level].as_bool().unwrap()) + } + fn remaining_ticks(&mut self, view: View<'_>, state: &mut State) -> io::Result<i32> { + self.event(view, state, "remaining")?; + Ok(n(self.config(), "virtual_remaining")) + } + fn item_tick( + &mut self, + view: View<'_>, + state: &mut State, + item: Stack, + level: usize, + remaining: i32, + ) -> io::Result<()> { + let kind = item.read().item(); + if kind != 2 { + self.event( + view, + state, + &format!("tick {kind} {} {level} {remaining}", self.id(&item)), + )?; + } + Ok(()) + } + fn use_on_release( + &mut self, + view: View<'_>, + state: &mut State, + item: Stack, + ) -> io::Result<bool> { + let kind = item.read().item(); + if kind == 2 { + return Ok(false); + } + self.event( + view, + state, + &format!("release-query {kind} {}", self.id(&item)), + )?; + Ok(self.config()["releases"][kind].as_bool().unwrap()) + } + fn release_item( + &mut self, + view: View<'_>, + state: &mut State, + item: Stack, + level: usize, + remaining: i32, + ) -> io::Result<()> { + let kind = item.read().item(); + if kind != 2 { + self.event( + view, + state, + &format!("release {kind} {} {level} {remaining}", self.id(&item)), + )?; + } + Ok(()) + } + fn finish_item( + &mut self, + view: View<'_>, + state: &mut State, + item: Stack, + level: usize, + ) -> io::Result<Stack> { + let kind = item.read().item(); + if kind == 2 { + return Ok(item); + } + self.event( + view, + state, + &format!("finish {kind} {} {level}", self.id(&item)), + )?; + Ok(self.items[self.config()["finishes"][kind].as_u64().unwrap() as usize].clone()) + } + fn finish_vibration( + &mut self, + view: View<'_>, + state: &mut State, + item: Stack, + ) -> io::Result<()> { + if item.read().component(&0).copied().unwrap_or(false) { + self.event(view, state, "vibration")?; + } + Ok(()) + } + fn on_equip( + &mut self, + view: View<'_>, + state: &mut State, + slot: EquipmentSlot, + old: Stack, + new: Stack, + ) -> io::Result<()> { + self.event( + view, + state, + &format!( + "equip {} {} {}", + slot as usize, + self.id(&old), + self.id(&new) + ), + ) + } + fn on_synced(&mut self, mut view: View<'_>, state: &mut State, id: u8) -> io::Result<()> { + self.event(view.reborrow(), state, &format!("synced {id}"))?; + flags_updated(self, view, state) + } +} +impl DurationServices<usize, u8, bool> for Services { + fn duration(&mut self, view: View<'_>, state: &mut State, item: Stack) -> io::Result<i32> { + let kind = item.read().item(); + if kind == 2 { + return Ok(0); + } + self.event(view, state, &format!("duration {kind} {}", self.id(&item)))?; + Ok(self.config()["durations"][kind].as_i64().unwrap() as i32) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let stacks = ItemStacks::new(2); + let items = [ + stacks.create(0, 1, Prototype::new([])), + stacks.create( + if f["shared_type"].as_bool().unwrap() { + 0 + } else { + 1 + }, + 1, + Prototype::new([]), + ), + stacks.empty(), + ]; + for i in 0..2 { + if f["vibrations"][i].as_bool().unwrap() { + items[i].write().components.set(0, Some(true)).unwrap(); + } + } + let mut state = UseState { + item: items[2].clone(), + remaining: 0, + has_recent_kinetic_enemies: false, + }; + let inventory = PlayerInventory::new(stacks.clone(), EntityEquipment::new(stacks.empty())); + let flags = SyncedValues::new(&[DataValue { + id: 8, + value: n(&f, "flags") as u8, + }])?; + let services = Services { + f: f.clone(), + out, + calls: 0, + changed: false, + items, + }; + let mut world = InventoryUse::new(inventory, flags, services).unwrap(); + world.services.reset( + UseView { + inventory: &mut world.inventory, + flags: &mut world.flags, + }, + &mut state, + ); + world.services.all( + &UseView { + inventory: &mut world.inventory, + flags: &mut world.flags, + }, + &state, + )?; + let result = match f["mode"].as_str().unwrap() { + "notify" => world.services.on_synced( + UseView { + inventory: &mut world.inventory, + flags: &mut world.flags, + }, + &mut state, + 8, + ), + "flag" => world + .set_flag(&mut state, n(&f, "mask"), f["value"].as_bool().unwrap()) + .map_err(io::Error::other), + "assign" => { + let values: Vec<_> = f["values"] + .as_array() + .unwrap() + .iter() + .map(|v| DataValue { + id: 8, + value: v.as_u64().unwrap() as u8, + }) + .collect(); + world + .assign_flags(&mut state, &values) + .map_err(io::Error::other) + } + "tick" => item_use_lifecycle::tick(&mut world, &mut state), + "update" => { + let item = world.services.items[n(&f, "argument") as usize].clone(); + item_use_lifecycle::update(&mut world, &mut state, item) + } + "complete" => item_use_lifecycle::complete(&mut world, &mut state), + "release" => item_use_lifecycle::release(&mut world, &mut state), + "stop" => item_use_lifecycle::stop(&mut world, &mut state), + _ => panic!("mode"), + }; + writeln!( + world.services.out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + world.services.all( + &UseView { + inventory: &mut world.inventory, + flags: &mut world.flags, + }, + &state, + )?; + let packed = world.flags.take_dirty().map_or("none".into(), |values| { + values + .iter() + .map(|v| format!("{}:{}", v.id, v.value)) + .collect::<Vec<_>>() + .join(",") + }); + writeln!(world.services.out, "packed {packed}")?; + world.services.all( + &UseView { + inventory: &mut world.inventory, + flags: &mut world.flags, + }, + &state, + )?; + out = world.services.out; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/use_remainder_fixture.rs b/crates/horizon-world/examples/use_remainder_fixture.rs new file mode 100644 index 000000000..b572b3ce9 --- /dev/null +++ b/crates/horizon-world/examples/use_remainder_fixture.rs @@ -0,0 +1,277 @@ +use horizon_world::{ + component_patch::{Patch, Prototype}, + item_stack_refs::{ItemStacks, StackRef}, + item_stack_storage::ItemStackData, + item_template::{self, ItemTemplate, ValidationRules}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +type Stack = StackRef<u8, usize, i32>; +type Template = ItemTemplate<u8, usize, i32>; +struct Rules; +impl ValidationRules<u8, usize, i32> for Rules { + type ContentsError = std::convert::Infallible; + fn has_max_damage(&self, s: &ItemStackData<u8, usize, i32>) -> bool { + s.component(&1).is_some() + } + fn max_stack_size(&self, s: &ItemStackData<u8, usize, i32>) -> i32 { + s.component(&0).copied().unwrap_or(1) + } + fn validate_contents( + &self, + _: &ItemStackData<u8, usize, i32>, + ) -> Result<(), Self::ContentsError> { + Ok(()) + } +} +fn opt(v: Option<i32>) -> String { + v.map_or("none".into(), |v| v.to_string()) +} +fn patch(v: &Value) -> Patch<usize, i32> { + Patch::new(v.as_array().unwrap().iter().map(|v| { + ( + v[0].as_u64().unwrap() as usize, + v[1].as_i64().map(|n| n as i32), + ) + })) +} +fn proto(v: &Value) -> Prototype<usize, i32> { + Prototype::new(v.as_array().unwrap().iter().map(|v| { + ( + v[0].as_u64().unwrap() as usize, + v[1].as_i64().unwrap() as i32, + ) + })) +} +fn patch_text(p: &Patch<usize, i32>) -> String { + p.entries() + .iter() + .map(|(k, v)| format!("{k}={}", opt(*v))) + .collect::<Vec<_>>() + .join(",") +} +fn all( + out: &mut dyn Write, + stacks: &[Stack], + templates: &[Option<Template>], + prototypes: &[Prototype<usize, i32>], + store: &ItemStacks<u8, usize, i32>, +) -> io::Result<()> { + for (i, s) in stacks.iter().enumerate() { + let data = s.read(); + let values = (0..3) + .map(|k| opt(data.component(&k).copied())) + .collect::<Vec<_>>() + .join(","); + writeln!( + out, + "stack {i} {} {} {} {} {} {} {} | {} | {}", + s.same_reference(&store.empty()), + data.item(), + data.count, + data.count(), + data.pop_time, + data.is_empty(), + item_template::validate_strict(&data, &Rules).is_ok(), + values, + patch_text(&data.components.as_patch()) + )?; + } + for (i, t) in templates.iter().enumerate() { + if let Some(t) = t { + let values = (0..3) + .map(|k| opt(t.component(&prototypes[t.item() as usize], &k).copied())) + .collect::<Vec<_>>() + .join(","); + writeln!( + out, + "template {i} {} {} | {} | {}", + t.item(), + t.count(), + values, + patch_text(t.patch()) + )?; + } else { + writeln!(out, "template {i} none")?; + } + } + for a in 0..3 { + for b in a + 1..3 { + let same = match (&templates[a], &templates[b]) { + (None, None) => true, + (Some(a), Some(b)) => a.same_reference(b), + _ => false, + }; + writeln!( + out, + "same {a} {b} {} {same}", + stacks[a].same_reference(&stacks[b]) + )?; + } + } + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let store = ItemStacks::new(0); + let mut prototypes: Vec<_> = f["prototypes"] + .as_array() + .unwrap() + .iter() + .map(proto) + .collect(); + let mut stacks: Vec<_> = f["stacks"] + .as_array() + .unwrap() + .iter() + .map(|v| { + let id = v["item"].as_i64().unwrap(); + if id < 0 { + store.empty() + } else { + let s = store.create( + id as u8, + v["count"].as_i64().unwrap() as i32, + prototypes[id as usize].clone(), + ); + s.write().pop_time = 5; + s.write().components.restore_patch(&patch(&v["patch"])); + s + } + }) + .collect(); + let mut templates: Vec<Option<Template>> = vec![None, None, None]; + all(&mut out, &stacks, &templates, &prototypes, &store)?; + for op in f["ops"].as_array().unwrap() { + let a = op["a"].as_u64().unwrap() as usize; + let b = op["b"].as_u64().unwrap() as usize; + let n = op["count"].as_i64().unwrap() as i32; + let result: Result<(), ()> = (|| { + match op["kind"].as_str().unwrap() { + "convert" => { + let t = templates[op["template"].as_u64().unwrap() as usize] + .as_ref() + .ok_or(())?; + let captured = stacks[a].clone(); + stacks[b] = horizon_world::use_remainder::convert( + captured, + n, + op["infinite"].as_bool().unwrap(), + || { + t.create(&store, prototypes[t.item() as usize].clone(), &Rules) + .0 + }, + |extra| { + writeln!( + out, + "extra {} {} {}", + extra.same_reference(&store.empty()), + extra.read().item(), + extra.read().count() + ) + .unwrap(); + if op["fail"] == 1 { + return Err(()); + } + extra.write().count = op["extra_count"].as_i64().unwrap() as i32; + stacks[a].write().count = + op["source_count"].as_i64().unwrap() as i32; + let replace = op["replace"].as_i64().unwrap(); + if replace >= 0 { + stacks[a] = stacks[replace as usize].clone(); + } + stacks[2] = extra; + if op["fail"] == 2 { + return Err(()); + } + Ok(()) + }, + )?; + } + "new" => { + templates[b] = Some( + Template::new( + op["item"].as_u64().unwrap() as u8, + 0, + n, + patch(&op["patch"]), + ) + .map_err(|_| ())?, + ) + } + "from" => { + templates[b] = + Some(Template::from_stack(&stacks[a].read(), 0).map_err(|_| ())?) + } + "from-nonempty" => { + templates[b] = Some( + Template::from_non_empty_stack(&stacks[a].read(), 0).map_err(|_| ())?, + ) + } + "from-count" => { + templates[b] = Some( + Template::from_non_empty_stack_with_count(&stacks[a].read(), 0, n) + .map_err(|_| ())?, + ) + } + "with" => { + templates[b] = Some( + templates[a] + .as_ref() + .ok_or(())? + .with_count(n) + .map_err(|_| ())?, + ) + } + "create" => { + let t = templates[a].as_ref().ok_or(())?; + stacks[b] = t + .create(&store, prototypes[t.item() as usize].clone(), &Rules) + .0; + } + "apply" | "apply-count" => { + let t = templates[a].as_ref().ok_or(())?; + let count = if op["kind"] == "apply" { t.count() } else { n }; + stacks[b] = t + .apply( + &store, + prototypes[t.item() as usize].clone(), + count, + &patch(&op["patch"]), + &Rules, + ) + .0; + } + "validate-patch" => { + let _ = item_template::apply_validated( + &mut stacks[a].write(), + &patch(&op["patch"]), + &Rules, + ); + } + "count" => stacks[a].write().count = n, + "prototype" => { + prototypes[op["item"].as_u64().unwrap() as usize] = proto(&op["prototype"]) + } + _ => panic!(), + } + Ok(()) + })(); + writeln!( + out, + "result {}", + if result.is_ok() { "ok" } else { "error" } + )?; + all(&mut out, &stacks, &templates, &prototypes, &store)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/value_provider_fixture.rs b/crates/horizon-world/examples/value_provider_fixture.rs new file mode 100644 index 000000000..be7bf8afe --- /dev/null +++ b/crates/horizon-world/examples/value_provider_fixture.rs @@ -0,0 +1,68 @@ +//! Transport for decoded scalar provider samples and subsequent random state. +use horizon_core::random::{LegacyRandom, RandomSource, XoroshiroRandom}; +use horizon_world::worldgen::value_provider::{FloatProvider, IntProvider}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn bits(value: f32) -> u32 { + if value.is_nan() { + 0x7fc00000 + } else { + value.to_bits() + } +} +fn fixture( + f: &Value, + mut random: impl RandomSource, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let json = f["definition"].as_str().unwrap(); + match f["kind"].as_str().unwrap() { + "float" => match FloatProvider::from_json(json) { + Ok(provider) => { + let [min, max] = provider.bounds(); + writeln!(out, "float {:x} {:x}", bits(min), bits(max))?; + for _ in 0..f["samples"].as_u64().unwrap() { + writeln!(out, "sample {:x}", bits(provider.sample(&mut random)))?; + writeln!(out, "next {}", random.next_long())?; + } + } + Err(_) => writeln!(out, "decode error")?, + }, + "int" => match IntProvider::from_json(json) { + Ok(provider) => { + let [min, max] = provider.bounds(); + writeln!(out, "int {min} {max}")?; + for _ in 0..f["samples"].as_u64().unwrap() { + match provider.sample(&mut random) { + Ok(value) => writeln!(out, "sample {value}")?, + Err(_) => writeln!(out, "sample error")?, + } + writeln!(out, "next {}", random.next_long())?; + } + } + Err(_) => writeln!(out, "decode error")?, + }, + _ => unreachable!(), + } + writeln!(out, "tail {}", random.next_long())?; + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + fixture(&f, LegacyRandom::new(seed), &mut out)?; + } else { + fixture(&f, XoroshiroRandom::new(seed), &mut out)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/view_direction_fixture.rs b/crates/horizon-world/examples/view_direction_fixture.rs new file mode 100644 index 000000000..6fa6ccd55 --- /dev/null +++ b/crates/horizon-world/examples/view_direction_fixture.rs @@ -0,0 +1,65 @@ +use horizon_core::geometry::Vec3; +use horizon_world::view_direction; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vec(v: &Value) -> Vec3 { + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + f64::NAN.to_bits() + } else { + v.to_bits() + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).unwrap(); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + match f["mode"].as_str().unwrap() { + "acos" => writeln!( + out, + "angle {:016x}", + bits(view_direction::acos(number(&f["value"]))) + )?, + "view" => { + let v = view_direction::view_vector(single(&f["pitch"]), single(&f["yaw"])); + writeln!( + out, + "view {:016x} {:016x} {:016x}", + bits(v.x), + bits(v.y), + bits(v.z) + )?; + } + "blocking" => writeln!( + out, + "angle {:016x}", + bits(view_direction::blocking_angle( + vec(&f["source"]), + vec(&f["position"]), + single(&f["yaw"]) + )) + )?, + "fallback" => writeln!( + out, + "angle {:016x}", + bits(view_direction::BLOCKING_FALLBACK_ANGLE) + )?, + _ => panic!("mode"), + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/water_splash_fixture.rs b/crates/horizon-world/examples/water_splash_fixture.rs new file mode 100644 index 000000000..dd8c71080 --- /dev/null +++ b/crates/horizon-world/examples/water_splash_fixture.rs @@ -0,0 +1,184 @@ +use horizon_core::{ + geometry::Vec3, + random::{LegacyRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::water_splash::{self, SplashError, SplashParticle, WaterSplashWorld}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn single(v: &Value) -> f32 { + f32::from_bits(u32::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vec(v: &Value) -> Vec3 { + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + f64::NAN.to_bits() + } else { + v.to_bits() + } +} +fn float_bits(v: f32) -> u32 { + if v.is_nan() { + f32::NAN.to_bits() + } else { + v.to_bits() + } +} +fn vector(v: Vec3) -> String { + format!("{:016x} {:016x} {:016x}", bits(v.x), bits(v.y), bits(v.z)) +} +struct World<'a, R> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + position: Vec3, + width: f32, + velocity: Vec3, + other: Vec3, + rng: R, +} +impl<R> World<'_, R> { + fn query(&mut self, s: String) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let n = self.calls; + self.calls += 1; + if n == self.f["fail"].as_i64().unwrap() { + return Err(io::Error::other("injected splash failure")); + } + if n == self.f["mutate_at"].as_i64().unwrap() { + self.position = vec(&self.f["after_position"]); + self.width = single(&self.f["after_width"]); + self.velocity = vec(&self.f["after_velocity"]); + self.other = vec(&self.f["after_other_velocity"]); + } + Ok(()) + } +} +impl<R: RandomSource> WaterSplashWorld for World<'_, R> { + type Error = io::Error; + type Entity = u8; + type Sound = bool; + fn this_entity(&self) -> u8 { + 0 + } + fn controlling_passenger(&mut self) -> io::Result<Option<u8>> { + self.query("passenger".into())?; + Ok(match self.f["passenger"].as_u64().unwrap() { + 0 => None, + 1 => Some(0), + 2 => Some(1), + _ => panic!("fixture passenger"), + }) + } + fn velocity(&mut self, e: u8) -> io::Result<Vec3> { + self.query(format!( + "velocity {}", + if e == 0 { "self" } else { "other" } + ))?; + Ok(if e == 0 { self.velocity } else { self.other }) + } + fn splash_sound(&mut self, high: bool) -> io::Result<bool> { + self.query(format!("sound {}", if high { "high" } else { "low" }))?; + Ok(high) + } + fn random_float(&mut self) -> io::Result<f32> { + self.query("float".into())?; + Ok(self.rng.next_float()) + } + fn random_double(&mut self) -> io::Result<f64> { + self.query("double".into())?; + Ok(self.rng.next_double()) + } + fn play_sound(&mut self, s: bool, volume: f32, pitch: f32) -> io::Result<()> { + self.query(format!( + "play {} {:08x} {:08x}", + if s { "high" } else { "low" }, + float_bits(volume), + float_bits(pitch) + )) + } + fn position(&self) -> Vec3 { + self.position + } + fn width(&self) -> f32 { + self.width + } + fn particle(&mut self, k: SplashParticle, p: Vec3, v: Vec3) -> io::Result<()> { + self.query(format!( + "particle {} {} {}", + match k { + SplashParticle::Bubble => "bubble", + SplashParticle::Splash => "splash", + }, + vector(p), + vector(v) + )) + } + fn splash_event(&mut self) -> io::Result<()> { + self.query("event splash".into()) + } +} +fn world<'a, R>(f: &'a Value, out: &'a mut dyn Write, rng: R) -> World<'a, R> { + World { + f, + out, + calls: 0, + position: vec(&f["position"]), + width: single(&f["width"]), + velocity: vec(&f["velocity"]), + other: vec(&f["other_velocity"]), + rng, + } +} +fn run<R: RandomSource>(f: &Value, out: &mut dyn Write, rng: R) -> io::Result<()> { + let mut w = world(f, out, rng); + match water_splash::water_splash(&mut w, 10000) { + Ok(()) => writeln!(w.out, "result ok")?, + Err(SplashError::World(_)) => writeln!(w.out, "error")?, + Err(e) => panic!("unexpected fixture limit: {e}"), + }; + writeln!( + w.out, + "final {} {:08x}", + vector(w.position), + float_bits(w.width) + )?; + writeln!(w.out, "next {}", w.rng.next_long())?; + writeln!(w.out, "queries {}", w.calls) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + let input = fs::read_to_string(dir.join("inputs.txt"))?; + let first: Value = serde_json::from_str(input.lines().next().unwrap())?; + let mut sink = io::sink(); + let mut probe = world(&first, &mut sink, LegacyRandom::new(42)); + assert!(matches!( + water_splash::water_splash(&mut probe, 0), + Err(SplashError::BudgetExceeded) + )); + assert_eq!(probe.calls, 6); + let mut expected = LegacyRandom::new(42); + expected.next_float(); + expected.next_float(); + assert_eq!(probe.rng.next_long(), expected.next_long()); + for line in input.lines() { + let f: Value = serde_json::from_str(line)?; + let seed = f["seed"].as_i64().unwrap(); + if f["legacy"].as_bool().unwrap() { + run(&f, &mut out, LegacyRandom::new(seed))? + } else { + run(&f, &mut out, XoroshiroRandom::new(seed))? + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/world_border_fixture.rs b/crates/horizon-world/examples/world_border_fixture.rs new file mode 100644 index 000000000..60cabdd3d --- /dev/null +++ b/crates/horizon-world/examples/world_border_fixture.rs @@ -0,0 +1,154 @@ +use horizon_core::geometry::{ + Aabb, Axis, Vec3, VoxelShape, + border::{BorderGeometry, BorderStatus}, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn values( + out: &mut impl Write, + label: &str, + values: impl IntoIterator<Item = f64>, +) -> io::Result<()> { + write!(out, "{label}")?; + for v in values { + let bits = if v.is_nan() { + 0x7ff8_0000_0000_0000 + } else { + v.to_bits() + }; + write!(out, " {bits:016x}")?; + } + writeln!(out) +} +fn box_values(out: &mut impl Write, label: &str, b: Aabb) -> io::Result<()> { + values( + out, + label, + [ + b.min(Axis::X), + b.min(Axis::Y), + b.min(Axis::Z), + b.max(Axis::X), + b.max(Axis::Y), + b.max(Axis::Z), + ], + ) +} +fn emit(out: &mut impl Write, shape: &VoxelShape) -> io::Result<()> { + writeln!( + out, + "shape {} {} {}", + shape.is_empty(), + shape.boxes().len(), + shape.is_cube() + )?; + for (axis, name) in Axis::ALL.into_iter().zip(["x", "y", "z"]) { + values(out, name, shape.coordinates(axis).iter().copied())?; + } + let axes = shape.cube_coordinate_axes(); + writeln!( + out, + "axes {}", + u8::from(axes[0]) + 2 * u8::from(axes[1]) + 4 * u8::from(axes[2]) + )?; + values( + out, + "extrema", + Axis::ALL + .map(|a| shape.min(a)) + .into_iter() + .chain(Axis::ALL.map(|a| shape.max(a))), + )?; + match shape.bounds() { + Some(b) => box_values(out, "bounds", b)?, + None => writeln!(out, "bounds none")?, + } + for b in shape.boxes() { + box_values(out, "box", *b)?; + } + Ok(()) +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut border = BorderGeometry::new([0.0, 0.0], 59999968.0, 29999984)?; + let mut limit = 29999984; + for op in f["ops"].as_array().unwrap() { + match op[0].as_str().unwrap() { + "center" => border.set_center([number(&op[1]), number(&op[2])])?, + "size" => border.set_size(number(&op[1]))?, + "limit" => { + limit = op[1].as_i64().unwrap() as i32; + border.set_absolute_max(limit)?; + } + "lerp" => border.lerp_size_between( + number(&op[1]), + number(&op[2]), + op[3].as_i64().unwrap(), + )?, + "tick" => { + for _ in 0..op[1].as_u64().unwrap() { + border.tick()?; + } + } + _ => panic!("unknown border operation"), + } + let status = match border.status() { + BorderStatus::Stationary => "STATIONARY", + BorderStatus::Growing => "GROWING", + BorderStatus::Shrinking => "SHRINKING", + }; + writeln!(out, "status {status} {} {limit}", border.lerp_time())?; + let [x, z] = border.center(); + values( + &mut out, + "state", + [ + x, + z, + border.size(), + border.lerp_target(), + border.lerp_speed(), + ], + )?; + for partial in f["partials"].as_array().unwrap() { + values( + &mut out, + "bounds", + border.bounds(f32::from_bits(u32::from_str_radix( + partial.as_str().unwrap(), + 16, + )?)), + )?; + } + emit(&mut out, &border.collision_shape()?)?; + for q in f["queries"].as_array().unwrap() { + let x = number(&q[0]); + let z = number(&q[1]); + let margin = number(&q[2]); + let b = Aabb::new( + Vec3::new(number(&q[3]), number(&q[4]), number(&q[5])), + Vec3::new(number(&q[6]), number(&q[7]), number(&q[8])), + ); + values(&mut out, "distance", [border.distance_to_border(x, z)])?; + writeln!( + out, + "inside {} {}", + border.is_within_bounds(x, z, margin), + border.is_inside_close_to_border(x, z, b) + )?; + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/examples/world_fixture.rs b/crates/horizon-world/examples/world_fixture.rs new file mode 100644 index 000000000..d972643cc --- /dev/null +++ b/crates/horizon-world/examples/world_fixture.rs @@ -0,0 +1,154 @@ +//! Exercises world primitives using local vanilla-generated fixtures. +use horizon_world::{ + chunk::{BlockSection, BlockState, PalettedContainer}, + nbt::{self, JavaString, Limits, NamedTag, Tag}, + registry::{BlockRegistry, BlockStateId}, +}; +use std::{error::Error, fs, path::PathBuf}; + +fn main() -> Result<(), Box<dyn Error>> { + let base = PathBuf::from( + std::env::args() + .nth(1) + .ok_or("expected fixture directory")?, + ); + let output = base.join("rust/palettes"); + fs::create_dir_all(&output)?; + for entry in fs::read_dir(base.join("palettes"))? { + let entry = entry?; + let filename = entry + .file_name() + .into_string() + .map_err(|_| "invalid filename")?; + let biome = filename.starts_with("biome-"); + let count: usize = filename + .split_once('-') + .unwrap() + .1 + .trim_end_matches(".nbt") + .parse()?; + let len = if biome { 64 } else { 4096 }; + let (root, _) = nbt::read_named(&fs::read(entry.path())?, Limits::default())?; + let mut palette = PalettedContainer::from_nbt(&root.tag, len, if biome { 1 } else { 4 })?; + for i in 0..len { + assert_eq!( + palette.get(i)?, + &Tag::String(JavaString::from(format!("state{}", i % count).as_str())) + ); + } + palette.set(len - 1, Tag::String(JavaString::from("state4096")))?; + for kind in ["edited", "compact"] { + if kind == "compact" { + palette.compact()?; + } + let root = NamedTag { + name: root.name.clone(), + tag: palette.to_nbt(), + }; + fs::write( + output.join(format!("{kind}-{filename}")), + nbt::write_named(&root, Limits::default())?, + )?; + } + } + let (registry_root, _) = nbt::read_named( + &fs::read(base.join("block-registry.nbt"))?, + Limits::default(), + )?; + let registry = BlockRegistry::from_nbt(®istry_root.tag)?; + let Some(Tag::List(states)) = registry_root.tag.get("states") else { + return Err("missing states".into()); + }; + for (i, tag) in states.iter().enumerate() { + let state = BlockState::from_nbt(tag)?; + assert_eq!(registry.id(&state), Some(BlockStateId(i as u32))); + assert_eq!(registry.state(BlockStateId(i as u32)), Some(&state)); + assert_eq!(registry.resolve(&state)?, BlockStateId(i as u32)); + let descriptor = BlockState { + name: state.name.clone(), + properties: Default::default(), + }; + assert_eq!( + registry.resolve(&descriptor)?, + registry.default_state(&state.name).unwrap() + ); + } + fs::write( + base.join("rust/block-registry.nbt"), + nbt::write_named(®istry_root, Limits::default())?, + )?; + let mut section = BlockSection::uniform(BlockStateId(0), ®istry)?; + for i in 0..4096 { + section.set(i, BlockStateId(((i * 7) % registry.len()) as u32))?; + } + assert_eq!(section.bits(), 12); + let root = NamedTag { + name: "".into(), + tag: section.to_nbt()?, + }; + fs::write( + base.join("rust/runtime-section.nbt"), + nbt::write_named(&root, Limits::default())?, + )?; + let loaded = BlockSection::from_nbt(&root.tag, ®istry)?; + for i in 0..4096 { + assert_eq!(loaded.get(i)?, section.get(i)?); + } + assert!(section.set(4096, BlockStateId(0)).is_err()); + assert!(section.set(0, BlockStateId(registry.len() as u32)).is_err()); + // Rotate every registered state through one slot to exercise slot reuse. + for i in 0..registry.len() { + section.set(0, BlockStateId(i as u32))?; + } + for i in 1..4096 { + assert_eq!( + section.get(i)?, + BlockStateId(((i * 7) % registry.len()) as u32) + ); + } + for i in 0..4096 { + section.set(i, BlockStateId(0))?; + } + assert_eq!(section.bits(), 0); + // Mixed replacement, sharing, and compaction must preserve every block. + let mut expected = vec![BlockStateId(0); 4096]; + let mut random = 0x31415926u64; + for step in 0..100_000 { + random = random.wrapping_mul(6364136223846793005).wrapping_add(1); + let index = (random >> 32) as usize % 4096; + let state = BlockStateId(if step % 3 == 0 { + 0 + } else { + (random >> 16) as u32 % registry.len() as u32 + }); + assert_eq!(section.set(index, state)?, expected[index]); + expected[index] = state; + if step % 8192 == 0 { + section.compact()?; + for (index, state) in expected.iter().enumerate() { + assert_eq!(section.get(index)?, *state); + } + } + } + let mutated = NamedTag { + name: "".into(), + tag: section.to_nbt()?, + }; + fs::write( + base.join("rust/runtime-mutated.nbt"), + nbt::write_named(&mutated, Limits::default())?, + )?; + let loaded = BlockSection::from_nbt(&mutated.tag, ®istry)?; + for (index, state) in expected.iter().enumerate() { + assert_eq!(loaded.get(index)?, *state); + section.set(index, BlockStateId(0))?; + } + section.compact()?; + assert_eq!(section.bits(), 0); + assert!(section.to_nbt()?.get("data").is_none()); + println!( + "Rust registry: {} states and default-state resolutions checked", + registry.len() + ); + Ok(()) +} diff --git a/crates/horizon-world/examples/world_ray_fixture.rs b/crates/horizon-world/examples/world_ray_fixture.rs new file mode 100644 index 000000000..b418785b0 --- /dev/null +++ b/crates/horizon-world/examples/world_ray_fixture.rs @@ -0,0 +1,201 @@ +use horizon_core::{ + geometry::{Aabb, ShapeOp, Vec3, VoxelShape}, + position::BlockPos, +}; +use horizon_world::{entity_obstruction::EntityIdentity, world_ray::*}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn number(v: &Value) -> f64 { + f64::from_bits(u64::from_str_radix(v.as_str().unwrap(), 16).unwrap()) +} +fn vector(v: &Value) -> Vec3 { + Vec3::new(number(&v[0]), number(&v[1]), number(&v[2])) +} +fn bits(v: f64) -> u64 { + if v.is_nan() { + 0x7ff8000000000000 + } else { + v.to_bits() + } +} +fn pos(p: BlockPos) -> String { + format!("{} {} {}", p.x, p.y, p.z) +} +fn shape(v: &Value) -> Result<VoxelShape, Box<dyn std::error::Error>> { + let mut result = VoxelShape::empty(); + for b in v.as_array().unwrap() { + result = result.join( + &VoxelShape::from_box(Aabb::new( + Vec3::new(number(&b[0]), number(&b[1]), number(&b[2])), + Vec3::new(number(&b[3]), number(&b[4]), number(&b[5])), + ))?, + ShapeOp::OR, + )?; + } + Ok(result) +} +struct World<'a> { + f: &'a Value, + out: &'a mut dyn Write, + calls: i64, + shapes: Vec<[VoxelShape; 5]>, +} +impl World<'_> { + fn flag(&self, n: &str) -> bool { + self.f[n].as_bool().unwrap() + } + fn query(&mut self, s: String) -> io::Result<()> { + writeln!(self.out, "{s}")?; + let call = self.calls; + self.calls += 1; + if call == self.f["fail"].as_i64().unwrap() { + Err(io::Error::other("injected ray failure")) + } else { + Ok(()) + } + } + fn index(&self, p: BlockPos) -> usize { + self.f["cells"][pos(p)].as_u64().unwrap_or(0) as usize + } + fn predicate(&mut self, n: &str, key: &str, s: usize) -> io::Result<bool> { + self.query(format!("{n} {s}"))?; + Ok(self.f["states"][s][key].as_bool().unwrap()) + } +} +impl FallResetWorld for World<'_> { + type Error = io::Error; + type Block = usize; + fn fall_reset_tag(&mut self, s: usize) -> io::Result<bool> { + self.predicate("reset-tag", "reset", s) + } + fn entity_is_player(&mut self, _: EntityIdentity) -> io::Result<bool> { + self.query("player".into())?; + Ok(self.flag("player")) + } + fn is_portal(&mut self, s: usize, p: ResetPortal) -> io::Result<bool> { + let n = match p { + ResetPortal::EndGateway => "gateway", + ResetPortal::EndPortal => "end", + ResetPortal::NetherPortal => "nether", + }; + self.predicate(n, n, s) + } + fn is_server_level(&self) -> bool { + self.flag("server") + } + fn players_nether_portal_delay(&mut self) -> io::Result<i32> { + self.query("rules".into())?; + self.query("portal-delay".into())?; + Ok(self.f["delay"].as_i64().unwrap() as i32) + } +} +impl RayWorld for World<'_> { + type Error = io::Error; + type Block = usize; + type Fluid = usize; + fn block_state(&mut self, p: BlockPos) -> io::Result<usize> { + self.query(format!("block {}", pos(p)))?; + Ok(self.index(p)) + } + fn fluid_state(&mut self, p: BlockPos) -> io::Result<usize> { + self.query(format!("fluid {}", pos(p)))?; + Ok(self.index(p)) + } + fn block_shape(&mut self, s: usize, p: BlockPos, m: RayBlockMode) -> io::Result<VoxelShape> { + if m == RayBlockMode::FallDamageResetting { + let entity = self.flag("entity").then_some(EntityIdentity(0)); + return fall_reset_shape(self, s, entity); + } + let (n, i) = match m { + RayBlockMode::Collider => ("collider", 0), + RayBlockMode::Outline => ("outline", 1), + RayBlockMode::Visual => ("visual", 2), + RayBlockMode::FallDamageResetting => unreachable!(), + }; + self.query(format!("{n} {s} {}", pos(p)))?; + Ok(self.shapes[s][i].clone()) + } + fn interaction_shape(&mut self, s: usize, p: BlockPos) -> io::Result<VoxelShape> { + self.query(format!("interaction {s} {}", pos(p)))?; + Ok(self.shapes[s][3].clone()) + } + fn fluid_is_source(&mut self, s: usize) -> io::Result<bool> { + self.predicate("source", "source", s) + } + fn fluid_is_empty(&mut self, s: usize) -> io::Result<bool> { + self.predicate("empty", "empty", s) + } + fn fluid_is_water(&mut self, s: usize) -> io::Result<bool> { + self.predicate("water", "water", s) + } + fn fluid_shape(&mut self, s: usize, p: BlockPos) -> io::Result<VoxelShape> { + self.query(format!("fluid-shape {s} {}", pos(p)))?; + Ok(self.shapes[s][4].clone()) + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + let mut shapes = Vec::new(); + for s in f["states"].as_array().unwrap() { + shapes.push([ + shape(&s["collider"])?, + shape(&s["outline"])?, + shape(&s["visual"])?, + shape(&s["interaction"])?, + shape(&s["fluid_shape"])?, + ]); + } + let mut w = World { + f: &f, + out: &mut out, + calls: 0, + shapes, + }; + let block_mode = [ + RayBlockMode::Collider, + RayBlockMode::Outline, + RayBlockMode::Visual, + RayBlockMode::FallDamageResetting, + ][f["block_mode"].as_u64().unwrap() as usize]; + let fluid_mode = [ + RayFluidMode::None, + RayFluidMode::SourceOnly, + RayFluidMode::Any, + RayFluidMode::Water, + ][f["fluid_mode"].as_u64().unwrap() as usize]; + match clip_world( + &mut w, + vector(&f["from"]), + vector(&f["to"]), + block_mode, + fluid_mode, + 10000, + ) { + Ok(r) => { + let h = r.hit; + writeln!( + w.out, + "hit {} {:016x} {:016x} {:016x} {} {} {}", + r.miss, + bits(h.location.x), + bits(h.location.y), + bits(h.location.z), + format!("{:?}", h.direction).to_lowercase(), + pos(h.block), + h.inside + )?; + } + Err(_) => writeln!(w.out, "error")?, + } + writeln!(w.out, "queries {}", w.calls)?; + } + Ok(()) +} diff --git a/crates/horizon-world/examples/worldgen_random_fixture.rs b/crates/horizon-world/examples/worldgen_random_fixture.rs new file mode 100644 index 000000000..1cf37b1f9 --- /dev/null +++ b/crates/horizon-world/examples/worldgen_random_fixture.rs @@ -0,0 +1,134 @@ +use horizon_core::{ + position::BlockPos, + random::{ + LegacyRandom, PositionalRandom, RandomSource, WorldgenRandom, WorldgenSource, + XoroshiroRandom, slime_chunk_random, + }, +}; +use serde_json::Value; +use std::{ + fs, + io::{self, Write}, + path::Path, +}; +fn n(v: &Value) -> i32 { + v.as_i64().unwrap() as i32 +} +fn l(v: &Value) -> i64 { + v.as_i64().unwrap() +} +fn fixture(f: &Value, source: impl WorldgenSource, out: &mut impl Write) -> io::Result<()> { + let mut root = WorldgenRandom::new(source); + let mut child = None; + for op in f["ops"].as_array().unwrap() { + match op[0].as_str().unwrap() { + "root" => { + child = None; + writeln!(out, "root")?; + } + "bits" => writeln!(out, "bits {}", root.next_bits(n(&op[1])))?, + "decoration" => writeln!( + out, + "decoration {}", + root.set_decoration_seed(l(&op[1]), n(&op[2]), n(&op[3])) + )?, + "feature" => { + root.set_feature_seed(l(&op[1]), n(&op[2]), n(&op[3])); + writeln!(out, "feature")?; + } + "large" => { + root.set_large_feature_seed(l(&op[1]), n(&op[2]), n(&op[3])); + writeln!(out, "large")?; + } + "salt" => { + root.set_large_feature_with_salt(l(&op[1]), n(&op[2]), n(&op[3]), n(&op[4])); + writeln!(out, "salt")?; + } + "slime" => { + let mut r = slime_chunk_random(n(&op[1]), n(&op[2]), l(&op[3]), l(&op[4])); + writeln!( + out, + "slime {} {}", + r.next_long(), + r.next_int_bound(10).unwrap() + )?; + } + kind => { + let random = child.as_mut().unwrap_or(&mut root); + match kind { + "int" => writeln!(out, "int {}", random.next_int())?, + "long" => writeln!(out, "long {}", random.next_long())?, + "bool" => writeln!(out, "bool {}", random.next_boolean())?, + "float" => writeln!(out, "float {:x}", random.next_float().to_bits())?, + "double" => writeln!(out, "double {:x}", random.next_double().to_bits())?, + "bound" => match random.next_int_bound(n(&op[1])) { + Ok(v) => writeln!(out, "bound {v}")?, + Err(_) => writeln!(out, "bound error")?, + }, + "seed" => { + random.set_seed(l(&op[1])); + writeln!(out, "seed")?; + } + "consume" => { + random.consume_count(n(&op[1])); + writeln!(out, "consume")?; + } + "fork" => { + child = Some(random.fork()); + writeln!(out, "fork")?; + } + "pos" => { + child = Some(random.fork_positional().at(BlockPos::new( + n(&op[1]), + n(&op[2]), + n(&op[3]), + ))); + writeln!(out, "pos")?; + } + "pos_seed" => { + child = Some(random.fork_positional().from_seed(l(&op[1]))); + writeln!(out, "pos_seed")?; + } + "pos_hash" => { + let units = op[1] + .as_array() + .unwrap() + .iter() + .map(|v| n(v) as u16) + .collect::<Vec<_>>(); + child = Some(random.fork_positional().from_hash_of_utf16(&units)); + writeln!(out, "pos_hash")?; + } + _ => panic!("unknown operation"), + } + } + } + writeln!(out, "count {}", root.count())?; + } + writeln!(out, "tail {}", root.next_long())?; + writeln!(out, "count {}", root.count())?; + Ok(()) +} +fn layers(f: &Value, mut source: impl WorldgenSource, out: &mut impl Write) -> io::Result<()> { + source.consume_count(n(&f["warmup"])); + match n(&f["layers"]) { + 1 => fixture(f, source, out), + 2 => fixture(f, WorldgenRandom::new(source), out), + 3 => fixture(f, WorldgenRandom::new(WorldgenRandom::new(source)), out), + _ => panic!("unsupported layer count"), + } +} +fn main() -> Result<(), Box<dyn std::error::Error>> { + let arg = std::env::args().nth(1).expect("private fixture directory"); + let dir = Path::new(&arg); + let mut out = io::BufWriter::new(fs::File::create(dir.join("rust.txt"))?); + for line in fs::read_to_string(dir.join("inputs.txt"))?.lines() { + let f: Value = serde_json::from_str(line)?; + if f["legacy"].as_bool().unwrap() { + layers(&f, LegacyRandom::new(l(&f["seed"])), &mut out)?; + } else { + layers(&f, XoroshiroRandom::new(l(&f["seed"])), &mut out)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/src/active_effect_tick.rs b/crates/horizon-world/src/active_effect_tick.rs new file mode 100644 index 000000000..b2de37baf --- /dev/null +++ b/crates/horizon-world/src/active_effect_tick.rs @@ -0,0 +1,207 @@ +//! LivingEntity effect tick loop, including native iterator failure handling. +use crate::{ + active_effects::{ActiveEffects, EffectHooks}, + java_hash_map::{CursorError, JavaKey}, + status_effect::{BlendWorld, EffectInstance, TickWorld}, +}; +use horizon_core::random::RandomSource; + +pub trait TickHooks<H: JavaKey + Clone>: EffectHooks<H> { + type Rng: RandomSource; + type Particle: Clone; + /// Runtime ServerLevel class test, distinct from Level.isClientSide. + fn is_server_level(&self, level: Self::Level) -> bool; + fn is_concurrent_modification(&self, error: &Self::Error) -> bool; + fn actor_tick_count(&self) -> i32; + fn should_apply( + &mut self, + storage: &mut ActiveEffects<H>, + effect: H, + time: i32, + amplifier: i32, + ) -> Result<bool, Self::Error>; + fn apply_tick( + &mut self, + storage: &mut ActiveEffects<H>, + effect: H, + level: Self::Level, + amplifier: i32, + ) -> Result<bool, Self::Error>; + fn advance_ticks( + &mut self, + storage: &mut ActiveEffects<H>, + effect: H, + ) -> Result<i32, Self::Error>; + fn duration_ticks( + &mut self, + storage: &mut ActiveEffects<H>, + effect: H, + blending_in: bool, + ) -> Result<i32, Self::Error>; + /// Synced-data reads are direct and retain the selected particle list. + fn particles(&self) -> Vec<Self::Particle>; + fn ambient(&self) -> bool; + fn invisible(&mut self, storage: &mut ActiveEffects<H>) -> Result<bool, Self::Error>; + /// Direct actor random field access, without calling getRandom. + fn random_source(&mut self) -> &mut Self::Rng; + fn random_x(&mut self, storage: &mut ActiveEffects<H>, scale: f64) -> Result<f64, Self::Error>; + fn random_y(&mut self, storage: &mut ActiveEffects<H>) -> Result<f64, Self::Error>; + fn random_z(&mut self, storage: &mut ActiveEffects<H>, scale: f64) -> Result<f64, Self::Error>; + /// Native particle velocity is (1, 1, 1). + fn add_particle( + &mut self, + storage: &mut ActiveEffects<H>, + level: Self::Level, + particle: Self::Particle, + position: [f64; 3], + ) -> Result<(), Self::Error>; +} + +#[derive(Debug)] +pub enum TickError<E> { + Iterator(CursorError), + Callback(E), +} +struct InstanceTick<'a, H, W> { + storage: &'a mut ActiveEffects<H>, + world: &'a mut W, +} +impl<H: JavaKey + Clone, W: TickHooks<H>> TickWorld<H> for InstanceTick<'_, H, W> { + type Error = W::Error; + type Level = W::Level; + fn actor_tick_count(&self) -> i32 { + self.world.actor_tick_count() + } + fn should_apply( + &mut self, + effect: H, + time: i32, + amplifier: i32, + _: &EffectInstance<H>, + ) -> Result<bool, Self::Error> { + self.world + .should_apply(self.storage, effect, time, amplifier) + } + fn apply_tick( + &mut self, + effect: H, + level: Self::Level, + amplifier: i32, + _: &EffectInstance<H>, + ) -> Result<bool, Self::Error> { + self.world + .apply_tick(self.storage, effect, level, amplifier) + } + fn downgraded(&mut self, instance: &EffectInstance<H>) -> Result<(), Self::Error> { + self.world + .on_updated(self.storage, instance.clone(), true, None) + } +} +impl<H: JavaKey + Clone, W: TickHooks<H>> BlendWorld<H> for InstanceTick<'_, H, W> { + type Error = W::Error; + fn advance_ticks(&mut self, effect: H, _: &EffectInstance<H>) -> Result<i32, Self::Error> { + self.world.advance_ticks(self.storage, effect) + } + fn duration_ticks( + &mut self, + effect: H, + blending_in: bool, + _: &EffectInstance<H>, + ) -> Result<i32, Self::Error> { + self.world.duration_ticks(self.storage, effect, blending_in) + } +} + +impl<H: JavaKey + Clone> ActiveEffects<H> { + pub fn tick<W: TickHooks<H>>(&mut self, world: &mut W) -> Result<(), TickError<W::Error>> { + let level = world.level(self).map_err(TickError::Callback)?; + if world.is_server_level(level) { + // The catch begins after the level query and iterator creation. + match self.tick_server(world, level) { + Err(TickError::Iterator(CursorError::ConcurrentModification)) => Ok(()), + Err(TickError::Callback(error)) if world.is_concurrent_modification(&error) => { + Ok(()) + } + result => result, + } + } else { + self.tick_client(world) + } + } + fn tick_server<W: TickHooks<H>>( + &mut self, + world: &mut W, + level: W::Level, + ) -> Result<(), TickError<W::Error>> { + let mut cursor = self.entries.cursor(); + while cursor.has_next() { + let (key, _) = self + .entries + .next_entry(&mut cursor) + .map_err(TickError::Iterator)? + .unwrap(); + let instance = self.get(key).unwrap(); + let active = instance + .tick_server( + &mut InstanceTick { + storage: self, + world, + }, + level, + ) + .map_err(TickError::Callback)?; + if !active { + self.entries + .remove_current(&mut cursor) + .map_err(TickError::Iterator)?; + world + .on_removed(self, vec![instance]) + .map_err(TickError::Callback)?; + } else if instance.read().details.duration % 600 == 0 { + world + .on_updated(self, instance, false, None) + .map_err(TickError::Callback)?; + } + } + Ok(()) + } + fn tick_client<W: TickHooks<H>>(&mut self, world: &mut W) -> Result<(), TickError<W::Error>> { + let mut cursor = self.entries.cursor(); + while cursor.has_next() { + let (_, instance) = self + .entries + .next_entry(&mut cursor) + .map_err(TickError::Iterator)? + .unwrap(); + let instance = instance.clone(); + instance + .tick_client(&mut InstanceTick { + storage: self, + world, + }) + .map_err(TickError::Callback)?; + } + let particles = world.particles(); + if particles.is_empty() { + return Ok(()); + } + let ambient = world.ambient(); + let invisible = world.invisible(self).map_err(TickError::Callback)?; + let interval = (if invisible { 15 } else { 4 }) * (if ambient { 5 } else { 1 }); + if world.random_source().next_int_bound(interval).unwrap() != 0 { + return Ok(()); + } + let level = world.level(self).map_err(TickError::Callback)?; + let index = world + .random_source() + .next_int_bound(particles.len() as i32) + .unwrap() as usize; + let particle = particles[index].clone(); + let x = world.random_x(self, 0.5).map_err(TickError::Callback)?; + let y = world.random_y(self).map_err(TickError::Callback)?; + let z = world.random_z(self, 0.5).map_err(TickError::Callback)?; + world + .add_particle(self, level, particle, [x, y, z]) + .map_err(TickError::Callback) + } +} diff --git a/crates/horizon-world/src/active_effects.rs b/crates/horizon-world/src/active_effects.rs new file mode 100644 index 000000000..94c74ad24 --- /dev/null +++ b/crates/horizon-world/src/active_effects.rs @@ -0,0 +1,173 @@ +//! Living entity status storage and add/replace/remove lifecycle ordering. +use crate::{ + java_hash_map::{JavaHashMap, JavaKey}, + status_effect::EffectInstance, +}; + +pub struct ActiveEffects<H> { + /// LivingEntity schedules effect synchronization from construction. + pub dirty: bool, + /// Native activeEffects is exposed by getActiveEffectsMap. Direct mutations + /// bypass lifecycle notifications, but retain the map's iterator semantics. + pub entries: JavaHashMap<H, EffectInstance<H>>, +} +impl<H: JavaKey> Default for ActiveEffects<H> { + fn default() -> Self { + Self { + entries: JavaHashMap::default(), + dirty: true, + } + } +} +pub trait EffectHooks<H: JavaKey + Clone> { + type Error; + type Source: Clone; + type Level: Copy; + fn can_be_affected( + &mut self, + storage: &mut ActiveEffects<H>, + incoming: EffectInstance<H>, + ) -> Result<bool, Self::Error>; + fn on_added( + &mut self, + storage: &mut ActiveEffects<H>, + incoming: EffectInstance<H>, + source: Option<Self::Source>, + ) -> Result<(), Self::Error>; + fn on_updated( + &mut self, + storage: &mut ActiveEffects<H>, + existing: EffectInstance<H>, + reapply: bool, + source: Option<Self::Source>, + ) -> Result<(), Self::Error>; + /// Concrete MobEffect.onEffectAdded dispatch, after the actor callback. + fn effect_added( + &mut self, + storage: &mut ActiveEffects<H>, + effect: H, + amplifier: i32, + ) -> Result<(), Self::Error>; + fn effect_started( + &mut self, + storage: &mut ActiveEffects<H>, + effect: H, + amplifier: i32, + ) -> Result<(), Self::Error>; + fn level(&mut self, storage: &mut ActiveEffects<H>) -> Result<Self::Level, Self::Error>; + fn is_client( + &mut self, + storage: &mut ActiveEffects<H>, + level: Self::Level, + ) -> Result<bool, Self::Error>; + fn on_removed( + &mut self, + storage: &mut ActiveEffects<H>, + effects: Vec<EffectInstance<H>>, + ) -> Result<(), Self::Error>; + fn get_effect( + &mut self, + storage: &mut ActiveEffects<H>, + effect: H, + ) -> Result<Option<EffectInstance<H>>, Self::Error> { + Ok(storage.get(&effect)) + } + /// Entity.isRemoved is a final field-based query. + fn actor_removed(&self) -> bool; +} +impl<H: JavaKey + Clone> ActiveEffects<H> { + pub fn get(&self, effect: &H) -> Option<EffectInstance<H>> { + self.entries.get(effect).cloned() + } + pub fn has(&self, effect: &H) -> bool { + self.entries.get(effect).is_some() + } + pub fn add<W: EffectHooks<H>>( + &mut self, + incoming: EffectInstance<H>, + source: Option<W::Source>, + world: &mut W, + ) -> Result<bool, W::Error> { + if !world.can_be_affected(self, incoming.clone())? { + return Ok(false); + } + let key = incoming.read().effect.clone(); + let existing = self.get(&key); + let mut changed = false; + if let Some(existing) = existing { + if existing.update(&incoming) { + world.on_updated(self, existing, true, source)?; + changed = true; + } + } else { + self.entries.put(key, incoming.clone()); + world.on_added(self, incoming.clone(), source)?; + changed = true; + let data = incoming.read(); + let effect = data.effect.clone(); + let amplifier = data.details.amplifier; + drop(data); + world.effect_added(self, effect, amplifier)?; + } + let data = incoming.read(); + let effect = data.effect.clone(); + let amplifier = data.details.amplifier; + drop(data); + world.effect_started(self, effect, amplifier)?; + Ok(changed) + } + pub fn force_add<W: EffectHooks<H>>( + &mut self, + incoming: EffectInstance<H>, + source: Option<W::Source>, + world: &mut W, + ) -> Result<(), W::Error> { + if !world.can_be_affected(self, incoming.clone())? { + return Ok(()); + } + let key = incoming.read().effect.clone(); + let previous = self.entries.put(key, incoming.clone()); + if let Some(previous) = previous { + incoming.copy_blend_from(&previous); + world.on_updated(self, incoming, true, source)?; + } else { + world.on_added(self, incoming, source)?; + } + Ok(()) + } + pub fn remove_no_update(&mut self, effect: &H) -> Option<EffectInstance<H>> { + self.entries.remove(effect) + } + pub fn remove<W: EffectHooks<H>>( + &mut self, + effect: &H, + world: &mut W, + ) -> Result<bool, W::Error> { + if let Some(instance) = self.remove_no_update(effect) { + world.on_removed(self, vec![instance])?; + Ok(true) + } else { + Ok(false) + } + } + pub fn remove_all<W: EffectHooks<H>>(&mut self, world: &mut W) -> Result<bool, W::Error> { + let level = world.level(self)?; + if world.is_client(self, level)? || self.entries.is_empty() { + return Ok(false); + } + let previous = self.entries.copied(); + self.entries.clear(); + let values = previous.entries().map(|(_, v)| v.clone()).collect(); + world.on_removed(self, values)?; + Ok(true) + } + pub fn blend_factor<W: EffectHooks<H>>( + &mut self, + effect: H, + partial: f32, + world: &mut W, + ) -> Result<f32, W::Error> { + let effect = world.get_effect(self, effect)?; + Ok(effect.map_or(0.0, |e| e.blend_factor(partial, world.actor_removed()))) + } +} diff --git a/crates/horizon-world/src/attribute_health.rs b/crates/horizon-world/src/attribute_health.rs new file mode 100644 index 000000000..d4db63012 --- /dev/null +++ b/crates/horizon-world/src/attribute_health.rs @@ -0,0 +1,139 @@ +//! Bind health calculations to registered entity attributes and mutable data. +use crate::{ + attribute_map::ValueKind, + attributes::{ + entity::{AttributeId, EntityAttributes, LookupError}, + live::{self, Key, LiveAttributes}, + }, + living_health::{self, HealthWorld, SyncedFloat}, +}; +use std::fmt; + +#[derive(Debug)] +pub enum HealthError<E, A = LookupError> { + Attribute(A), + Observer(E), +} +impl<E: fmt::Display, A: fmt::Debug> fmt::Display for HealthError<E, A> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::Attribute(e) => write!(f, "health attribute lookup: {e:?}"), + Self::Observer(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static, A: fmt::Debug> std::error::Error for HealthError<E, A> {} +/// Computed registered limits for a borrowed base LivingEntity health binding. +/// The borrow keeps the attribute map fixed. Virtual dispatch that can replace +/// the selected map belongs in a full HealthWorld implementation. +pub trait HealthAttributes { + type Key: Clone; + type Error; + fn health_attribute_key(&self, name: &str) -> Option<Self::Key>; + fn health_attribute_value(&mut self, key: Self::Key) -> Result<f64, Self::Error>; +} +impl HealthAttributes for EntityAttributes { + type Key = AttributeId; + type Error = LookupError; + fn health_attribute_key(&self, name: &str) -> Option<AttributeId> { + self.catalog().id(name) + } + fn health_attribute_value(&mut self, key: AttributeId) -> Result<f64, LookupError> { + self.value(key) + } +} +impl<G: FnMut() -> i32> HealthAttributes for LiveAttributes<G> { + type Key = Key; + type Error = live::Error; + fn health_attribute_key(&self, name: &str) -> Option<Key> { + self.key(name) + } + fn health_attribute_value(&mut self, key: Key) -> Result<f64, live::Error> { + self.value(Some(key), ValueKind::Computed) + } +} +pub trait HealthObserver { + type Error; + fn updated(&mut self, health: &mut SyncedFloat) -> Result<(), Self::Error>; +} +/// A borrow of living state, without inventing spawn or save initialization. +/// Absorption here uses base LivingEntity field storage. Player-specific +/// synchronized absorption requires a different storage binding. +pub struct AttributeHealth<'a, O, A: HealthAttributes = EntityAttributes> { + attributes: &'a mut A, + health: &'a mut SyncedFloat, + absorption: &'a mut f32, + dead: bool, + observer: &'a mut O, + max_health: A::Key, + max_absorption: A::Key, +} +impl<'a, O: HealthObserver, A: HealthAttributes> AttributeHealth<'a, O, A> { + pub fn new( + attributes: &'a mut A, + health: &'a mut SyncedFloat, + absorption: &'a mut f32, + dead: bool, + observer: &'a mut O, + ) -> Option<Self> { + let max_health = attributes.health_attribute_key("minecraft:max_health")?; + let max_absorption = attributes.health_attribute_key("minecraft:max_absorption")?; + Some(Self { + attributes, + health, + absorption, + dead, + observer, + max_health, + max_absorption, + }) + } + pub fn heal(&mut self, amount: f32) -> Result<(), HealthError<O::Error, A::Error>> { + living_health::heal(self, amount) + } + pub fn set_health(&mut self, value: f32) -> Result<(), HealthError<O::Error, A::Error>> { + living_health::set_health(self, value) + } + pub fn set_absorption(&mut self, value: f32) -> Result<(), HealthError<O::Error, A::Error>> { + living_health::set_absorption(self, value) + } + pub fn is_hurt(&mut self) -> Result<bool, HealthError<O::Error, A::Error>> { + living_health::is_hurt(self) + } + pub fn is_dead_or_dying(&mut self) -> Result<bool, HealthError<O::Error, A::Error>> { + living_health::is_dead_or_dying(self) + } +} +impl<O: HealthObserver, A: HealthAttributes> HealthWorld for AttributeHealth<'_, O, A> { + type Error = HealthError<O::Error, A::Error>; + type Data = (); + fn health(&mut self) -> Result<f32, Self::Error> { + Ok(self.health.value()) + } + fn health_data(&self) {} + fn max_health_attribute(&mut self) -> Result<f64, Self::Error> { + self.attributes + .health_attribute_value(self.max_health.clone()) + .map_err(HealthError::Attribute) + } + fn max_absorption_attribute(&mut self) -> Result<f64, Self::Error> { + self.attributes + .health_attribute_value(self.max_absorption.clone()) + .map_err(HealthError::Attribute) + } + fn store_health(&mut self, _: (), value: f32) -> Result<(), Self::Error> { + self.health + .set(value, false, |health| self.observer.updated(health)) + .map_err(HealthError::Observer) + } + fn store_absorption(&mut self, value: f32) -> Result<(), Self::Error> { + *self.absorption = value; + Ok(()) + } + fn dead_flag(&self) -> bool { + self.dead + } + fn dispatch_set_health(&mut self, value: f32) -> Result<(), Self::Error> { + living_health::set_health(self, value) + } +} diff --git a/crates/horizon-world/src/attribute_map.rs b/crates/horizon-world/src/attribute_map.rs new file mode 100644 index 000000000..20ef8a7f1 --- /dev/null +++ b/crates/horizon-world/src/attribute_map.rs @@ -0,0 +1,183 @@ +//! Live AttributeMap instance lookup and update/synchronization queue ownership. +use crate::{ + object_open_map::ObjectOpenMap, + object_open_set::{ObjectKey, ObjectOpenSet}, +}; + +#[derive(Clone, Copy, Debug)] +pub enum ValueKind { + Computed, + Base, +} +#[derive(Debug)] +pub enum ModifierValueError<E> { + /// Cached instances dereference getModifier's result; suppliers instead + /// report their own missing-attribute/modifier error. + MissingInstanceModifier, + World(E), +} +pub trait QueryWorld<H, I> { + type Error; + fn supplier_has_attribute( + &mut self, + map: &mut AttributeMap<H, I>, + key: Option<H>, + ) -> Result<bool, Self::Error>; + fn supplier_has_modifier( + &mut self, + map: &mut AttributeMap<H, I>, + key: Option<H>, + id: &str, + ) -> Result<bool, Self::Error>; + fn supplier_value( + &mut self, + map: &mut AttributeMap<H, I>, + key: Option<H>, + kind: ValueKind, + ) -> Result<f64, Self::Error>; + fn supplier_modifier_value( + &mut self, + map: &mut AttributeMap<H, I>, + key: Option<H>, + id: &str, + ) -> Result<f64, Self::Error>; + fn instance_value( + &mut self, + map: &mut AttributeMap<H, I>, + instance: I, + kind: ValueKind, + ) -> Result<f64, Self::Error>; + fn instance_modifier( + &mut self, + map: &mut AttributeMap<H, I>, + instance: I, + id: &str, + ) -> Result<Option<f64>, Self::Error>; + fn set_instance_base( + &mut self, + map: &mut AttributeMap<H, I>, + instance: I, + value: f64, + ) -> Result<(), Self::Error>; +} + +/// Instance handles retain identity independently of map membership. In +/// particular, a failed creation callback can leave a queued instance that was +/// never inserted into `instances`. +pub struct AttributeMap<H, I> { + pub instances: ObjectOpenMap<H, I>, + pub updates: ObjectOpenSet<I>, + pub sync: ObjectOpenSet<I>, +} +impl<H, I> Default for AttributeMap<H, I> { + fn default() -> Self { + Self { + instances: ObjectOpenMap::default(), + updates: ObjectOpenSet::default(), + sync: ObjectOpenSet::default(), + } + } +} +impl<H: ObjectKey + Clone, I: ObjectKey + Clone> AttributeMap<H, I> { + pub fn has_attribute<W: QueryWorld<H, I>>( + &mut self, + key: Option<H>, + world: &mut W, + ) -> Result<bool, W::Error> { + if self.instances.get(key.as_ref()).is_some() { + Ok(true) + } else { + world.supplier_has_attribute(self, key) + } + } + pub fn has_modifier<W: QueryWorld<H, I>>( + &mut self, + key: Option<H>, + id: &str, + world: &mut W, + ) -> Result<bool, W::Error> { + if let Some(instance) = self.instances.get(key.as_ref()) { + world + .instance_modifier(self, instance, id) + .map(|m| m.is_some()) + } else { + world.supplier_has_modifier(self, key, id) + } + } + /// Value queries use a cached instance or its supplier prototype. They do + /// not create an instance or schedule a dirty update. + pub fn value<W: QueryWorld<H, I>>( + &mut self, + key: Option<H>, + kind: ValueKind, + world: &mut W, + ) -> Result<f64, W::Error> { + if let Some(instance) = self.instances.get(key.as_ref()) { + world.instance_value(self, instance, kind) + } else { + world.supplier_value(self, key, kind) + } + } + pub fn modifier_value<W: QueryWorld<H, I>>( + &mut self, + key: Option<H>, + id: &str, + world: &mut W, + ) -> Result<f64, ModifierValueError<W::Error>> { + if let Some(instance) = self.instances.get(key.as_ref()) { + world + .instance_modifier(self, instance, id) + .map_err(ModifierValueError::World)? + .ok_or(ModifierValueError::MissingInstanceModifier) + } else { + world + .supplier_modifier_value(self, key, id) + .map_err(ModifierValueError::World) + } + } + pub fn reset_base<W: QueryWorld<H, I>>( + &mut self, + key: Option<H>, + world: &mut W, + ) -> Result<bool, W::Error> { + if !world.supplier_has_attribute(self, key.clone())? { + return Ok(false); + } + if let Some(instance) = self.instances.get(key.as_ref()) { + let value = world.supplier_value(self, key, ValueKind::Base)?; + world.set_instance_base(self, instance, value)?; + } + Ok(true) + } + /// AttributeMap dispatches to Map.computeIfAbsent(Function), not fastutil's + /// Object2ObjectFunction overload. A null mapping is absent for this call; + /// the ordinary put re-finds its slot after the supplier callback returns. + pub fn get_instance<E>( + &mut self, + key: Option<H>, + create: impl FnOnce(&mut Self, Option<H>) -> Result<Option<I>, E>, + ) -> Result<Option<I>, E> { + if let Some(instance) = self.instances.get(key.as_ref()) { + return Ok(Some(instance)); + } + let instance = create(self, key.clone())?; + if instance.is_some() { + self.instances.put(key, instance.clone()); + } + Ok(instance) + } + /// The callback performs instance.getAttribute().value().isClientSyncable(). + /// It runs after adding the update entry, and can inspect or mutate both + /// queues. Failure preserves the update entry and skips the sync insertion. + pub fn modified<E>( + &mut self, + instance: Option<I>, + syncable: impl FnOnce(&mut Self, Option<I>) -> Result<bool, E>, + ) -> Result<(), E> { + self.updates.add(instance.clone()); + if syncable(self, instance.clone())? { + self.sync.add(instance); + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/attribute_updates.rs b/crates/horizon-world/src/attribute_updates.rs new file mode 100644 index 000000000..f97f6477f --- /dev/null +++ b/crates/horizon-world/src/attribute_updates.rs @@ -0,0 +1,57 @@ +//! Consequences of LivingEntity attribute changes, preserving virtual call order. +use crate::living_health::{self, HealthWorld}; +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum UpdatedAttribute { + MaxHealth, + MaxAbsorption, + Scale, + WaypointRange, + Other, +} +pub trait UpdateWorld<H>: HealthWorld { + type Level: Copy; + type Manager: Copy; + type Attributes: Copy; + fn attribute_kind(&self, attribute: &H) -> UpdatedAttribute; + fn absorption(&mut self) -> Result<f32, Self::Error>; + fn refresh_dimensions(&mut self) -> Result<(), Self::Error>; + fn level(&mut self) -> Result<Self::Level, Self::Error>; + fn is_server_level(&self, level: Self::Level) -> bool; + fn waypoint_manager(&mut self, level: Self::Level) -> Result<Self::Manager, Self::Error>; + /// Direct attributes field, read after obtaining the waypoint manager. + fn attributes_field(&self) -> Self::Attributes; + fn attribute_value_in( + &mut self, + attributes: Self::Attributes, + attribute: H, + ) -> Result<f64, Self::Error>; + fn track_waypoint(&mut self, manager: Self::Manager, track: bool) -> Result<(), Self::Error>; +} +pub fn updated<H, W: UpdateWorld<H>>(world: &mut W, attribute: H) -> Result<(), W::Error> { + match world.attribute_kind(&attribute) { + UpdatedAttribute::MaxHealth => { + let maximum = world.max_health_attribute()? as f32; + if world.health()? > maximum { + world.dispatch_set_health(maximum)?; + } + } + UpdatedAttribute::MaxAbsorption => { + let maximum = world.max_absorption_attribute()? as f32; + if world.absorption()? > maximum { + living_health::set_absorption(world, maximum)?; + } + } + UpdatedAttribute::Scale => world.refresh_dimensions()?, + UpdatedAttribute::WaypointRange => { + let level = world.level()?; + if world.is_server_level(level) { + let manager = world.waypoint_manager(level)?; + let attributes = world.attributes_field(); + let range = world.attribute_value_in(attributes, attribute)?; + world.track_waypoint(manager, range > 0.0)?; + } + } + UpdatedAttribute::Other => {} + } + Ok(()) +} diff --git a/crates/horizon-world/src/attributes/entity.rs b/crates/horizon-world/src/attributes/entity.rs new file mode 100644 index 000000000..1bdf94aaf --- /dev/null +++ b/crates/horizon-world/src/attributes/entity.rs @@ -0,0 +1,268 @@ +//! Registered entity defaults and lazy attribute instances. Cross-attribute bulk +//! mutation/serialization order is deliberately outside this per-attribute API. +use super::{Definition, Instance, Observer}; +use crate::{DATA_VERSION, compression::invalid}; +use serde_json::Value; +use std::{collections::BTreeMap, convert::Infallible, io, sync::Arc}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct AttributeId(usize); +impl AttributeId { + pub(super) fn index(self) -> usize { + self.0 + } +} +#[derive(Debug)] +pub struct RegisteredAttribute { + pub name: String, + pub definition: Definition, + pub syncable: bool, +} +#[derive(Debug)] +pub struct Catalog { + attributes: Vec<RegisteredAttribute>, + ids: BTreeMap<String, AttributeId>, + defaults: BTreeMap<String, Arc<[Option<f64>]>>, +} +fn string(v: &Value) -> io::Result<&str> { + v.as_str() + .ok_or_else(|| invalid("expected attribute string")) +} +fn number(v: &Value) -> io::Result<f64> { + let s = string(v)?; + if s.len() != 16 { + return Err(invalid("expected 16-digit attribute double bits")); + } + Ok(f64::from_bits( + u64::from_str_radix(s, 16).map_err(|e| invalid(e.to_string()))?, + )) +} +impl Catalog { + pub(super) fn default_bases(&self, entity: &str) -> Option<Arc<[Option<f64>]>> { + self.defaults.get(entity).cloned() + } + /// Imports a version-checked export of registered definitions and actual + /// DefaultAttributes suppliers. Defaults contain base values, not instances. + pub fn from_json(v: &Value) -> io::Result<Self> { + if v["data_version"].as_i64() != Some(i64::from(DATA_VERSION)) { + return Err(invalid("attribute catalog data version mismatch")); + } + let mut attributes = Vec::new(); + let mut ids = BTreeMap::new(); + for a in v["attributes"] + .as_array() + .ok_or_else(|| invalid("missing attributes"))? + { + let name = string(&a["id"])?; + // Identifier normalization is shared with modifier IDs. + let canonical = super::Modifier::new(name, 0.0, super::Operation::AddValue)?; + if canonical.id() != name + || ids + .insert(name.into(), AttributeId(attributes.len())) + .is_some() + { + return Err(invalid("noncanonical or duplicate attribute identifier")); + } + let default = number(&a["default"])?; + let definition = if a.get("min").is_some() { + Definition::ranged(default, number(&a["min"])?, number(&a["max"])?)? + } else { + Definition::basic(default) + }; + attributes.push(RegisteredAttribute { + name: name.into(), + definition, + syncable: a["syncable"] + .as_bool() + .ok_or_else(|| invalid("missing attribute sync flag"))?, + }); + } + let mut defaults = BTreeMap::new(); + for (entity, values) in v["entities"] + .as_object() + .ok_or_else(|| invalid("missing entity defaults"))? + { + let mut bases = vec![None; attributes.len()]; + for (name, base) in values + .as_object() + .ok_or_else(|| invalid("invalid entity supplier"))? + { + let id = ids + .get(name) + .ok_or_else(|| invalid("unknown supplier attribute"))?; + bases[id.0] = Some(number(base)?); + } + defaults.insert(entity.clone(), Arc::from(bases)); + } + Ok(Self { + attributes, + ids, + defaults, + }) + } + pub fn id(&self, name: &str) -> Option<AttributeId> { + self.ids.get(name).copied() + } + pub fn attribute(&self, id: AttributeId) -> &RegisteredAttribute { + &self.attributes[id.0] + } + pub fn attributes(&self) -> impl Iterator<Item = (AttributeId, &RegisteredAttribute)> { + self.attributes + .iter() + .enumerate() + .map(|(i, a)| (AttributeId(i), a)) + } + pub fn entities(&self) -> impl Iterator<Item = &str> { + self.defaults.keys().map(String::as_str) + } + pub fn create(self: &Arc<Self>, entity: &str) -> Option<EntityAttributes> { + let bases = self.defaults.get(entity)?.clone(); + let n = bases.len(); + Some(EntityAttributes { + catalog: self.clone(), + bases, + instances: vec![None; n], + updates: vec![false; n], + sync: vec![false; n], + }) + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LookupError { + MissingAttribute, + MissingModifier, + InstanceMissingModifier, +} +/// Membership in the native update/sync sets, with no JVM identity-hash order +/// promise. Clearing a flag acknowledges that particular pending update. +pub struct DirtyObserver<'a> { + update: &'a mut bool, + sync: &'a mut bool, + syncable: bool, +} +impl Observer for DirtyObserver<'_> { + type Error = Infallible; + fn dirty(&mut self, _: &mut Instance) -> Result<(), Infallible> { + *self.update = true; + if self.syncable { + *self.sync = true; + } + Ok(()) + } +} +pub struct EntityAttributes { + catalog: Arc<Catalog>, + bases: Arc<[Option<f64>]>, + instances: Vec<Option<Box<Instance>>>, + updates: Vec<bool>, + sync: Vec<bool>, +} +impl EntityAttributes { + pub fn catalog(&self) -> &Arc<Catalog> { + &self.catalog + } + pub fn has(&self, id: AttributeId) -> bool { + self.bases[id.0].is_some() + } + pub fn instance(&self, id: AttributeId) -> Option<&Instance> { + self.instances[id.0].as_deref() + } + /// Merely querying a default value must not instantiate or dirty it. + pub fn value(&mut self, id: AttributeId) -> Result<f64, LookupError> { + if let Some(a) = self.instances[id.0].as_deref_mut() { + return Ok(a.value()); + } + let base = self.bases[id.0].ok_or(LookupError::MissingAttribute)?; + Ok(self.catalog.attribute(id).definition.sanitize(base)) + } + pub fn base_value(&self, id: AttributeId) -> Result<f64, LookupError> { + self.instances[id.0] + .as_deref() + .map(Instance::base_value) + .or(self.bases[id.0]) + .ok_or(LookupError::MissingAttribute) + } + pub fn has_modifier(&self, id: AttributeId, modifier: &str) -> bool { + self.instance(id) + .and_then(|a| a.modifier(modifier)) + .is_some() + } + pub fn modifier_value(&self, id: AttributeId, modifier: &str) -> Result<f64, LookupError> { + if let Some(a) = self.instance(id) { + return a + .modifier(modifier) + .map(super::Modifier::amount) + .ok_or(LookupError::InstanceMissingModifier); + } + if self.has(id) { + Err(LookupError::MissingModifier) + } else { + Err(LookupError::MissingAttribute) + } + } + /// Native getInstance copies the supplier on first access and immediately + /// schedules an update, plus a sync when the definition is client-syncable. + pub fn ensure(&mut self, id: AttributeId) -> bool { + if self.instances[id.0].is_some() { + return true; + } + let Some(base) = self.bases[id.0] else { + return false; + }; + let definition = self.catalog.attribute(id); + let mut instance = Instance::new(definition.definition); + let mut observer = DirtyObserver { + update: &mut self.updates[id.0], + sync: &mut self.sync[id.0], + syncable: definition.syncable, + }; + // Registered default suppliers have no modifiers. replaceFrom always + // invalidates even when the supplier base equals the registered default. + let mut source = Instance::new(definition.definition); + source.base = base; + instance.replace_from(&source, &mut observer).unwrap(); + self.instances[id.0] = Some(Box::new(instance)); + true + } + /// Mutations must use the supplied observer to preserve dirty memberships. + pub fn edit<R>( + &mut self, + id: AttributeId, + f: impl FnOnce(&mut Instance, &mut DirtyObserver<'_>) -> R, + ) -> Option<R> { + if !self.ensure(id) { + return None; + } + let mut observer = DirtyObserver { + update: &mut self.updates[id.0], + sync: &mut self.sync[id.0], + syncable: self.catalog.attribute(id).syncable, + }; + Some(f( + self.instances[id.0].as_deref_mut().unwrap(), + &mut observer, + )) + } + /// Reset uses the entity supplier's base, without creating a missing instance. + pub fn reset_base(&mut self, id: AttributeId) -> bool { + let Some(base) = self.bases[id.0] else { + return false; + }; + if self.instances[id.0].is_some() { + self.edit(id, |a, o| a.set_base_value(base, o).unwrap()); + } + true + } + pub fn needs_update(&self, id: AttributeId) -> bool { + self.updates[id.0] + } + pub fn needs_sync(&self, id: AttributeId) -> bool { + self.sync[id.0] + } + pub fn clear_update(&mut self, id: AttributeId) { + self.updates[id.0] = false; + } + pub fn clear_sync(&mut self, id: AttributeId) { + self.sync[id.0] = false; + } +} diff --git a/crates/horizon-world/src/attributes/live.rs b/crates/horizon-world/src/attributes/live.rs new file mode 100644 index 000000000..ea661871b --- /dev/null +++ b/crates/horizon-world/src/attributes/live.rs @@ -0,0 +1,398 @@ +//! Registered entity attributes backed by live native-order maps and queues. +use super::{ + AttributeError, Instance, Modifier, Observer, + entity::{AttributeId, Catalog}, +}; +use crate::{ + attribute_map::{AttributeMap, ModifierValueError, QueryWorld, ValueKind}, + effect_attribute_modifiers::{self as effects, Definitions}, + object_open_set::{ObjectKey, ObjectOpenSet}, + stored_effect_attributes::{self as stored, AttributeAccess}, +}; +use std::{convert::Infallible, sync::Arc}; + +#[derive(Clone)] +pub struct Key { + catalog: Arc<Catalog>, + id: AttributeId, + hash: i32, +} +impl Key { + pub fn attribute(&self) -> AttributeId { + self.id + } + pub fn name(&self) -> &str { + &self.catalog.attribute(self.id).name + } +} +impl PartialEq for Key { + fn eq(&self, other: &Self) -> bool { + Arc::ptr_eq(&self.catalog, &other.catalog) && self.id == other.id + } +} +impl Eq for Key {} +impl ObjectKey for Key { + fn object_hash(&self) -> i32 { + self.hash + } +} +#[derive(Clone)] +pub struct Handle { + owner: Arc<()>, + index: usize, + hash: i32, +} +impl Handle { + pub fn index(&self) -> usize { + self.index + } +} +impl PartialEq for Handle { + fn eq(&self, other: &Self) -> bool { + Arc::ptr_eq(&self.owner, &other.owner) && self.index == other.index + } +} +impl Eq for Handle {} +impl ObjectKey for Handle { + fn object_hash(&self) -> i32 { + self.hash + } +} +#[derive(Debug)] +pub enum Error { + UnknownEntity, + InvalidHolderHashes, + NullAttribute, + MissingAttribute, + MissingModifier, + MissingInstanceModifier, + ForeignInstance, + DuplicateModifier(String), +} +struct Node { + handle: Handle, + key: Key, + value: Instance, +} +/// Observer for registered attributes. Registry syncability is immutable for +/// this binding; richer virtual attributes can use AttributeMap directly. +pub struct Dirty<'a> { + map: &'a mut AttributeMap<Key, Handle>, + handle: Handle, + syncable: bool, +} +impl Observer for Dirty<'_> { + type Error = Infallible; + fn dirty(&mut self, _: &mut Instance) -> Result<(), Infallible> { + self.map + .modified(Some(self.handle.clone()), |_, _| Ok(self.syncable)) + } +} +struct Data<G> { + catalog: Arc<Catalog>, + bases: Arc<[Option<f64>]>, + keys: Vec<Key>, + owner: Arc<()>, + nodes: Vec<Node>, + next_identity: G, +} +impl<G: FnMut() -> i32> Data<G> { + fn base(&self, key: &Key) -> Option<f64> { + Arc::ptr_eq(&self.catalog, &key.catalog) + .then(|| self.bases[key.id.index()]) + .flatten() + } + fn node(&self, h: &Handle) -> Result<&Node, Error> { + if !Arc::ptr_eq(&self.owner, &h.owner) { + return Err(Error::ForeignInstance); + } + self.nodes.get(h.index).ok_or(Error::ForeignInstance) + } + fn node_mut(&mut self, h: &Handle) -> Result<&mut Node, Error> { + if !Arc::ptr_eq(&self.owner, &h.owner) { + return Err(Error::ForeignInstance); + } + self.nodes.get_mut(h.index).ok_or(Error::ForeignInstance) + } + fn create( + &mut self, + map: &mut AttributeMap<Key, Handle>, + key: Option<Key>, + ) -> Result<Option<Handle>, Error> { + let Some(key) = key else { + return Ok(None); + }; + let Some(base) = self.base(&key) else { + return Ok(None); + }; + let definition = self.catalog.attribute(key.id); + let mut source = Instance::new(definition.definition); + // Registered suppliers have no modifiers. Preserve exported base bits + // rather than invoking an equality-short-circuiting setter here. + source.base = base; + let mut value = Instance::new(definition.definition); + let handle = Handle { + owner: self.owner.clone(), + index: self.nodes.len(), + hash: (self.next_identity)(), + }; + let mut observer = Dirty { + map, + handle: handle.clone(), + syncable: definition.syncable, + }; + value + .replace_from(&source, &mut observer) + .map_err(convert_error)?; + self.nodes.push(Node { + key, + handle: handle.clone(), + value, + }); + Ok(Some(handle)) + } + fn edit<R>( + &mut self, + map: &mut AttributeMap<Key, Handle>, + handle: &Handle, + edit: impl FnOnce(&mut Instance, &mut Dirty<'_>) -> Result<R, AttributeError<Infallible>>, + ) -> Result<R, Error> { + let node = self.node_mut(handle)?; + let syncable = node.key.catalog.attribute(node.key.id).syncable; + let mut observer = Dirty { + map, + handle: handle.clone(), + syncable, + }; + edit(&mut node.value, &mut observer).map_err(convert_error) + } +} +fn convert_error(error: AttributeError<Infallible>) -> Error { + match error { + AttributeError::DuplicateModifier(id) => Error::DuplicateModifier(id), + AttributeError::Observer(e) => match e {}, + } +} +impl<G: FnMut() -> i32> QueryWorld<Key, Handle> for Data<G> { + type Error = Error; + fn supplier_has_attribute( + &mut self, + _: &mut AttributeMap<Key, Handle>, + key: Option<Key>, + ) -> Result<bool, Error> { + Ok(key.is_some_and(|k| self.base(&k).is_some())) + } + fn supplier_has_modifier( + &mut self, + _: &mut AttributeMap<Key, Handle>, + _: Option<Key>, + _: &str, + ) -> Result<bool, Error> { + Ok(false) + } + fn supplier_value( + &mut self, + _: &mut AttributeMap<Key, Handle>, + key: Option<Key>, + kind: ValueKind, + ) -> Result<f64, Error> { + let key = key.ok_or(Error::NullAttribute)?; + let base = self.base(&key).ok_or(Error::MissingAttribute)?; + Ok(match kind { + ValueKind::Base => base, + ValueKind::Computed => self.catalog.attribute(key.id).definition.sanitize(base), + }) + } + fn supplier_modifier_value( + &mut self, + _: &mut AttributeMap<Key, Handle>, + key: Option<Key>, + _: &str, + ) -> Result<f64, Error> { + let key = key.ok_or(Error::NullAttribute)?; + self.base(&key).ok_or(Error::MissingAttribute)?; + Err(Error::MissingModifier) + } + fn instance_value( + &mut self, + _: &mut AttributeMap<Key, Handle>, + h: Handle, + kind: ValueKind, + ) -> Result<f64, Error> { + let value = &mut self.node_mut(&h)?.value; + Ok(match kind { + ValueKind::Computed => value.value(), + ValueKind::Base => value.base_value(), + }) + } + fn instance_modifier( + &mut self, + _: &mut AttributeMap<Key, Handle>, + h: Handle, + id: &str, + ) -> Result<Option<f64>, Error> { + Ok(self.node(&h)?.value.modifier(id).map(|m| m.amount())) + } + fn set_instance_base( + &mut self, + map: &mut AttributeMap<Key, Handle>, + h: Handle, + value: f64, + ) -> Result<(), Error> { + self.edit(map, &h, |a, o| a.set_base_value(value, o)) + } +} +impl<G: FnMut() -> i32> AttributeAccess<Key, Handle> for Data<G> { + type Error = Error; + fn create_instance( + &mut self, + _: &mut Definitions<Key>, + map: &mut AttributeMap<Key, Handle>, + key: Option<Key>, + ) -> Result<Option<Handle>, Error> { + self.create(map, key) + } + fn remove_modifier( + &mut self, + _: &mut Definitions<Key>, + map: &mut AttributeMap<Key, Handle>, + h: &Handle, + id: &str, + ) -> Result<(), Error> { + self.edit(map, h, |a, o| a.remove(id, o)).map(|_| ()) + } + fn add_permanent( + &mut self, + _: &mut Definitions<Key>, + map: &mut AttributeMap<Key, Handle>, + h: &Handle, + modifier: Modifier, + ) -> Result<(), Error> { + self.edit(map, h, |a, o| a.add_permanent(modifier, o)) + } +} +/// Owns an entity's instances and pending queues. Holder hashes come from the +/// registry runtime; instance hashes come from the supplied identity allocator. +/// Supplying oracle hashes permits reproducible JVM-order differential checks. +pub struct LiveAttributes<G> { + map: AttributeMap<Key, Handle>, + data: Data<G>, +} +impl<G: FnMut() -> i32> LiveAttributes<G> { + pub fn new( + catalog: Arc<Catalog>, + entity: &str, + holder_hashes: &[i32], + next_identity: G, + ) -> Result<Self, Error> { + let bases = catalog.default_bases(entity).ok_or(Error::UnknownEntity)?; + if holder_hashes.len() != bases.len() { + return Err(Error::InvalidHolderHashes); + } + let keys = catalog + .attributes() + .map(|(id, _)| Key { + catalog: catalog.clone(), + id, + hash: holder_hashes[id.index()], + }) + .collect(); + Ok(Self { + map: AttributeMap::default(), + data: Data { + catalog, + bases, + keys, + owner: Arc::new(()), + nodes: Vec::new(), + next_identity, + }, + }) + } + pub fn catalog(&self) -> &Arc<Catalog> { + &self.data.catalog + } + pub fn key(&self, name: &str) -> Option<Key> { + self.data + .catalog + .id(name) + .map(|id| self.data.keys[id.index()].clone()) + } + pub fn keys(&self) -> &[Key] { + &self.data.keys + } + pub fn lookup(&self, key: Option<&Key>) -> Option<Handle> { + self.map.instances.get(key) + } + pub fn get_instance(&mut self, key: Option<Key>) -> Result<Option<Handle>, Error> { + self.map + .get_instance(key, |map, key| self.data.create(map, key)) + } + pub fn has_attribute(&mut self, key: Option<Key>) -> Result<bool, Error> { + self.map.has_attribute(key, &mut self.data) + } + pub fn has_modifier(&mut self, key: Option<Key>, id: &str) -> Result<bool, Error> { + self.map.has_modifier(key, id, &mut self.data) + } + pub fn value(&mut self, key: Option<Key>, kind: ValueKind) -> Result<f64, Error> { + self.map.value(key, kind, &mut self.data) + } + pub fn modifier_value(&mut self, key: Option<Key>, id: &str) -> Result<f64, Error> { + self.map + .modifier_value(key, id, &mut self.data) + .map_err(|e| match e { + ModifierValueError::World(e) => e, + ModifierValueError::MissingInstanceModifier => Error::MissingInstanceModifier, + }) + } + pub fn reset_base(&mut self, key: Option<Key>) -> Result<bool, Error> { + self.map.reset_base(key, &mut self.data) + } + pub fn instance(&self, handle: &Handle) -> Result<&Instance, Error> { + self.data.node(handle).map(|n| &n.value) + } + pub fn attribute(&self, handle: &Handle) -> Result<&Key, Error> { + self.data.node(handle).map(|n| &n.key) + } + pub fn instances(&self) -> impl Iterator<Item = (&Handle, &Key, &Instance)> { + self.data + .nodes + .iter() + .map(|n| (&n.handle, &n.key, &n.value)) + } + pub fn entries(&self) -> Vec<(Option<Key>, Option<Handle>)> { + self.map.instances.entries() + } + pub fn updates(&self) -> &ObjectOpenSet<Handle> { + &self.map.updates + } + pub fn updates_mut(&mut self) -> &mut ObjectOpenSet<Handle> { + &mut self.map.updates + } + pub fn sync(&self) -> &ObjectOpenSet<Handle> { + &self.map.sync + } + pub fn sync_mut(&mut self) -> &mut ObjectOpenSet<Handle> { + &mut self.map.sync + } + pub fn edit<R>( + &mut self, + handle: &Handle, + edit: impl FnOnce(&mut Instance, &mut Dirty<'_>) -> Result<R, AttributeError<Infallible>>, + ) -> Result<R, Error> { + self.data.edit(&mut self.map, handle, edit) + } + pub fn add_effect_modifiers( + &mut self, + definitions: &mut Definitions<Key>, + amplifier: i32, + ) -> Result<(), effects::Error<Error>> { + stored::add(definitions, &mut self.map, &mut self.data, amplifier) + } + pub fn remove_effect_modifiers( + &mut self, + definitions: &mut Definitions<Key>, + ) -> Result<(), effects::Error<Error>> { + stored::remove(definitions, &mut self.map, &mut self.data) + } +} diff --git a/crates/horizon-world/src/attributes/mod.rs b/crates/horizon-world/src/attributes/mod.rs new file mode 100644 index 000000000..6778db429 --- /dev/null +++ b/crates/horizon-world/src/attributes/mod.rs @@ -0,0 +1,350 @@ +//! Ordered attribute modifiers, native cache invalidation and permanent state. +use crate::compression::invalid; +use std::{fmt, io, sync::Arc}; +pub mod entity; +pub mod live; +mod operation_map; +use operation_map::OperationMap; +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum Operation { + AddValue, + AddMultipliedBase, + AddMultipliedTotal, +} +impl Operation { + pub const ALL: [Self; 3] = [ + Self::AddValue, + Self::AddMultipliedBase, + Self::AddMultipliedTotal, + ]; +} +#[derive(Debug)] +struct ModifierData { + id: String, + hash: u32, + amount: f64, + operation: Operation, +} +/// Clones retain native modifier reference identity. Reconstructing an equal +/// modifier creates a distinct reference for add-or-update dirty notifications. +#[derive(Clone, Debug)] +pub struct Modifier(Arc<ModifierData>); +impl Modifier { + pub fn new(id: &str, amount: f64, operation: Operation) -> io::Result<Self> { + let (namespace, path) = id.split_once(':').unwrap_or(("minecraft", id)); + let namespace = if namespace.is_empty() { + "minecraft" + } else { + namespace + }; + let valid = |c: u8| c.is_ascii_lowercase() || c.is_ascii_digit() || b"_.-".contains(&c); + if !namespace.bytes().all(valid) || !path.bytes().all(|c| valid(c) || c == b'/') { + return Err(invalid("invalid attribute modifier identifier")); + } + let hash = |s: &str| { + s.bytes() + .fold(0u32, |h, b| h.wrapping_mul(31).wrapping_add(u32::from(b))) + }; + Ok(Self(Arc::new(ModifierData { + id: format!("{namespace}:{path}"), + hash: hash(namespace).wrapping_mul(31).wrapping_add(hash(path)), + amount, + operation, + }))) + } + pub fn id(&self) -> &str { + &self.0.id + } + pub fn amount(&self) -> f64 { + self.0.amount + } + pub fn operation(&self) -> Operation { + self.0.operation + } + pub fn same_identity(&self, other: &Self) -> bool { + Arc::ptr_eq(&self.0, &other.0) + } +} +#[derive(Clone, Copy, Debug)] +pub struct Definition { + default: f64, + range: Option<(f64, f64)>, +} +impl Definition { + pub fn basic(default: f64) -> Self { + Self { + default, + range: None, + } + } + pub fn ranged(default: f64, min: f64, max: f64) -> io::Result<Self> { + if min > max || default < min || default > max { + return Err(invalid("invalid ranged attribute bounds/default")); + } + Ok(Self { + default, + range: Some((min, max)), + }) + } + pub fn default_value(self) -> f64 { + self.default + } + pub fn sanitize(self, value: f64) -> f64 { + let Some((min, max)) = self.range else { + return value; + }; + if value.is_nan() || value < min { + min + } else if max.is_nan() { + max + } else if value == 0.0 && max == 0.0 { + f64::from_bits(value.to_bits() | max.to_bits()) + } else { + value.min(max) + } + } +} +pub trait Observer { + type Error; + /// Called after dirty=true and preceding writes. Reading the value here can + /// clear the dirty flag, and an error preserves all writes already made. + fn dirty(&mut self, attribute: &mut Instance) -> Result<(), Self::Error>; +} +#[derive(Debug)] +pub enum AttributeError<E> { + DuplicateModifier(String), + Observer(E), +} +impl<E: fmt::Display> fmt::Display for AttributeError<E> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::DuplicateModifier(id) => write!(f, "attribute modifier already applied: {id}"), + Self::Observer(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for AttributeError<E> {} +#[derive(Clone, Debug)] +pub struct Packed { + pub base: f64, + pub modifiers: Vec<Modifier>, +} +#[derive(Clone, Debug)] +pub struct Instance { + definition: Definition, + base: f64, + dirty: bool, + cached: f64, + by_id: Vec<Modifier>, + permanent: Vec<Modifier>, + operations: [Option<OperationMap>; 3], +} +impl Instance { + pub fn new(definition: Definition) -> Self { + Self { + definition, + base: definition.default, + dirty: true, + cached: 0.0, + by_id: Vec::new(), + permanent: Vec::new(), + operations: [None, None, None], + } + } + pub fn base_value(&self) -> f64 { + self.base + } + pub fn is_dirty(&self) -> bool { + self.dirty + } + pub fn cached_value(&self) -> f64 { + self.cached + } + pub fn modifiers(&self) -> &[Modifier] { + &self.by_id + } + pub fn permanent_modifiers(&self) -> &[Modifier] { + &self.permanent + } + pub fn modifier(&self, id: &str) -> Option<&Modifier> { + self.by_id.iter().find(|m| m.id() == id) + } + pub fn operation_modifiers(&self, op: Operation) -> impl Iterator<Item = &Modifier> { + self.operations[op as usize].iter().flat_map(|m| m.values()) + } + fn mark_dirty<O: Observer>( + &mut self, + observer: &mut O, + ) -> Result<(), AttributeError<O::Error>> { + self.dirty = true; + observer.dirty(self).map_err(AttributeError::Observer) + } + pub fn set_base_value<O: Observer>( + &mut self, + value: f64, + observer: &mut O, + ) -> Result<(), AttributeError<O::Error>> { + if value == self.base { + return Ok(()); + } + self.base = value; + self.mark_dirty(observer) + } + fn insert_operation(&mut self, m: Modifier) { + self.operations[m.operation() as usize] + .get_or_insert_with(OperationMap::default) + .put(m); + } + pub fn add_transient<O: Observer>( + &mut self, + m: Modifier, + observer: &mut O, + ) -> Result<(), AttributeError<O::Error>> { + if self.modifier(m.id()).is_some() { + return Err(AttributeError::DuplicateModifier(m.id().into())); + } + self.by_id.push(m.clone()); + self.insert_operation(m); + self.mark_dirty(observer) + } + pub fn add_or_update_transient<O: Observer>( + &mut self, + m: Modifier, + observer: &mut O, + ) -> Result<(), AttributeError<O::Error>> { + let old = array_put(&mut self.by_id, m.clone()); + if old.is_some_and(|old| m.same_identity(&old)) { + return Ok(()); + } + // Native replacement retains an older operation bucket for the same ID. + self.insert_operation(m); + self.mark_dirty(observer) + } + pub fn add_permanent<O: Observer>( + &mut self, + m: Modifier, + observer: &mut O, + ) -> Result<(), AttributeError<O::Error>> { + self.add_transient(m.clone(), observer)?; + array_put(&mut self.permanent, m); + Ok(()) + } + pub fn add_or_replace_permanent<O: Observer>( + &mut self, + m: Modifier, + observer: &mut O, + ) -> Result<(), AttributeError<O::Error>> { + self.remove(m.id(), observer)?; + self.add_permanent(m, observer) + } + pub fn add_permanent_many<O: Observer>( + &mut self, + mods: impl IntoIterator<Item = Modifier>, + observer: &mut O, + ) -> Result<(), AttributeError<O::Error>> { + for m in mods { + self.add_permanent(m, observer)?; + } + Ok(()) + } + pub fn remove<O: Observer>( + &mut self, + id: &str, + observer: &mut O, + ) -> Result<bool, AttributeError<O::Error>> { + let Some(index) = self.by_id.iter().position(|m| m.id() == id) else { + return Ok(false); + }; + let old = self.by_id.remove(index); + self.operations[old.operation() as usize] + .get_or_insert_with(OperationMap::default) + .remove(&old); + if let Some(i) = self.permanent.iter().position(|m| m.id() == id) { + self.permanent.remove(i); + } + self.mark_dirty(observer)?; + Ok(true) + } + pub fn remove_all<O: Observer>( + &mut self, + observer: &mut O, + ) -> Result<(), AttributeError<O::Error>> { + let snapshot = self.by_id.clone(); + for m in snapshot { + self.remove(m.id(), observer)?; + } + Ok(()) + } + pub fn value(&mut self) -> f64 { + if self.dirty { + let mut base = self.base; + for m in self.operation_modifiers(Operation::AddValue) { + base += m.amount(); + } + let mut value = base; + for m in self.operation_modifiers(Operation::AddMultipliedBase) { + value += base * m.amount(); + } + for m in self.operation_modifiers(Operation::AddMultipliedTotal) { + value *= 1.0 + m.amount(); + } + self.cached = self.definition.sanitize(value); + self.dirty = false; + } + self.cached + } + pub fn replace_from<O: Observer>( + &mut self, + source: &Self, + observer: &mut O, + ) -> Result<(), AttributeError<O::Error>> { + self.base = source.base; + self.by_id = source.by_id.clone(); + self.permanent = source.permanent.clone(); + self.operations = std::array::from_fn(|i| { + source.operations[i] + .as_ref() + .map(OperationMap::copy_for_replace) + }); + self.mark_dirty(observer) + } + /// Java's replaceFrom(this) clears all three maps before copying them. + pub fn replace_from_self<O: Observer>( + &mut self, + observer: &mut O, + ) -> Result<(), AttributeError<O::Error>> { + self.by_id.clear(); + self.permanent.clear(); + self.operations = [None, None, None]; + self.mark_dirty(observer) + } + pub fn pack(&self) -> Packed { + Packed { + base: self.base, + modifiers: self.permanent.clone(), + } + } + /// Packed data merges into existing maps; it does not clear transient state. + pub fn apply<O: Observer>( + &mut self, + packed: &Packed, + observer: &mut O, + ) -> Result<(), AttributeError<O::Error>> { + self.base = packed.base; + for m in &packed.modifiers { + array_put(&mut self.by_id, m.clone()); + self.insert_operation(m.clone()); + array_put(&mut self.permanent, m.clone()); + } + self.mark_dirty(observer) + } +} +fn array_put(map: &mut Vec<Modifier>, m: Modifier) -> Option<Modifier> { + if let Some(old) = map.iter_mut().find(|v| v.id() == m.id()) { + Some(std::mem::replace(old, m)) + } else { + map.push(m); + None + } +} diff --git a/crates/horizon-world/src/attributes/operation_map.rs b/crates/horizon-world/src/attributes/operation_map.rs new file mode 100644 index 000000000..faa152094 --- /dev/null +++ b/crates/horizon-world/src/attributes/operation_map.rs @@ -0,0 +1,104 @@ +//! The pinned operation buckets use open-addressed maps. Preserve their slot +//! iteration order because reassociating floating-point modifiers changes values. +use super::Modifier; +#[derive(Clone, Debug)] +pub(super) struct OperationMap { + slots: Vec<Option<Modifier>>, + len: usize, +} +impl Default for OperationMap { + fn default() -> Self { + Self { + slots: vec![None; 32], + len: 0, + } + } +} +fn mixed(m: &Modifier) -> usize { + let h = m.0.hash.wrapping_mul(0x9e37_79b9); + (h ^ (h >> 16)) as usize +} +fn capacity(len: usize) -> usize { + ((len as f64 / 0.75).ceil() as usize) + .max(2) + .next_power_of_two() +} +impl OperationMap { + pub(super) fn values(&self) -> impl Iterator<Item = &Modifier> { + self.slots.iter().rev().filter_map(Option::as_ref) + } + fn max_fill(&self) -> usize { + self.slots.len() * 3 / 4 + } + fn find(&self, m: &Modifier) -> usize { + let mask = self.slots.len() - 1; + let mut p = mixed(m) & mask; + while self.slots[p].as_ref().is_some_and(|old| old.id() != m.id()) { + p = (p + 1) & mask; + } + p + } + pub(super) fn put(&mut self, m: Modifier) { + let p = self.find(&m); + let new = self.slots[p].is_none(); + self.slots[p] = Some(m); + if new { + let old = self.len; + self.len += 1; + if old >= self.max_fill() { + self.rehash(capacity(self.len + 1)); + } + } + } + fn rehash(&mut self, n: usize) { + let old = std::mem::replace(&mut self.slots, vec![None; n]); + for m in old.into_iter().rev().flatten() { + let p = self.find(&m); + self.slots[p] = Some(m); + } + } + pub(super) fn remove(&mut self, m: &Modifier) { + let p = self.find(m); + if self.slots[p].is_none() { + return; + } + self.len -= 1; + let mask = self.slots.len() - 1; + let mut hole = p; + loop { + let mut p = (hole + 1) & mask; + loop { + let Some(key) = self.slots[p].as_ref() else { + self.slots[hole] = None; + if self.slots.len() > 32 && self.len < self.max_fill() / 4 { + self.rehash(self.slots.len() / 2); + } + return; + }; + let home = mixed(key) & mask; + let moves = if hole <= p { + hole >= home || home > p + } else { + hole >= home && home > p + }; + if moves { + break; + } + p = (p + 1) & mask; + } + self.slots[hole] = self.slots[p].take(); + hole = p; + } + } + pub(super) fn copy_for_replace(&self) -> Self { + let mut result = Self::default(); + let n = capacity(self.len); + if n > result.slots.len() { + result.rehash(n); + } + for m in self.values() { + result.put(m.clone()); + } + result + } +} diff --git a/crates/horizon-world/src/bin/worldgen_parity.rs b/crates/horizon-world/src/bin/worldgen_parity.rs new file mode 100644 index 000000000..eaf585023 --- /dev/null +++ b/crates/horizon-world/src/bin/worldgen_parity.rs @@ -0,0 +1,915 @@ +//! Original transport for version-specific JSON decoding comparisons. +use horizon_core::{ + density::{ + SamplerContext, + graph::{DensityCompiler, FunctionId}, + }, + noise::DensityVolume, + noise::{Noise, NormalNoise}, + random::{LegacyRandom, RandomSource, XoroshiroRandom}, +}; +use horizon_world::worldgen::{ + decode_noise, + density::DensityRegistry, + router::{NoiseRouter, RouterField}, +}; +use std::io::{self, BufRead, Write}; + +fn bits(value: f32) -> u32 { + if value.is_nan() { + 0x7fc0_0000 + } else { + value.to_bits() + } +} +fn probe( + noise: &NormalNoise, + random: &mut impl RandomSource, + nether: bool, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let sampler = match if nether { + noise.create_for_legacy_nether_biome(random) + } else { + noise.create(random) + } { + Ok(sampler) => sampler, + Err(_) => { + writeln!(out, "sample error {}", random.next_long())?; + return Ok(()); + } + }; + for [x, y, z] in [ + [0., 0., 0.], + [-17.25, 64.125, 32.5], + [30e6, -64., -30e6], + [1.25, -0.5, -3.75], + [33554432., -2048., -33554433.], + ] { + writeln!( + out, + "query {} {}", + bits(sampler.get2(x, z)), + bits(sampler.get3(x, y, z)) + )?; + } + writeln!(out, "parent {}", random.next_long())?; + Ok(()) +} +fn registry_probe( + path: &str, + seed: i64, + legacy: bool, + optimized: bool, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let bundle: std::collections::BTreeMap<String, std::collections::BTreeMap<String, String>> = + serde_json::from_str(&std::fs::read_to_string(path)?)?; + let registry = DensityRegistry::from_json(&bundle["noises"], &bundle["densities"])?; + let entries: Vec<_> = registry + .entries() + .map(|(name, id)| (name.to_owned(), id)) + .collect(); + let mut compiler = DensityCompiler::new_seeded(registry.into_graph(), seed, legacy); + writeln!(out, "registry {}", entries.len())?; + for (name, id) in entries { + sample_root( + &mut compiler, + id, + &name, + optimized, + false, + &mut SamplerContext::cached(), + out, + )?; + } + Ok(()) +} +fn sample_root( + compiler: &mut DensityCompiler, + id: FunctionId, + name: &str, + optimized: bool, + router: bool, + context: &mut SamplerContext, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let range = compiler.graph().range(id)?; + writeln!( + out, + "entry {name} {} {} {}", + bits(range.min()), + bits(range.max()), + compiler.graph().domain_axes(id)? + )?; + let sampler = match if optimized { + compiler.get_sampler(id) + } else { + compiler.compile_raw(id) + } { + Ok(sampler) => sampler, + Err(_) => { + writeln!(out, "compile error")?; + return Ok(()); + } + }; + writeln!(out, "compile ok {}", compiler.cache_count())?; + for position in [ + [0, 0, 0], + [-17, -64, 32], + [30000000, 319, -30000000], + [1, -1, -1], + ] { + writeln!( + out, + "density {}", + bits(sampler.sample_value(context, position)?) + )?; + } + let mut volumes = vec![ + ([2, 9, 2], [-17, -64, 32], [1, 1, 1]), + ([2, 9, 2], [-16, -64, 32], [4, 8, 4]), + ]; + if router { + volumes.push(([3, 1, 2], [-17, 0, 32], [4, 1, 4])); + } + for (extents, minimum, steps) in volumes { + let volume = DensityVolume::new(extents, minimum, steps)?; + let mut buffer = vec![0.; volume.size()]; + for _ in 0..2 { + let result = sampler.sample_volume(context, &mut buffer, volume); + writeln!( + out, + "volume {}", + if result.is_ok() { "ok" } else { "error" } + )?; + for value in &buffer { + writeln!(out, "cell {}", bits(*value))?; + } + } + } + Ok(()) +} +fn router_probe( + path: &str, + setting: &str, + seed: i64, + legacy: bool, + optimized: bool, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + let bundle: std::collections::BTreeMap<String, std::collections::BTreeMap<String, String>> = + serde_json::from_str(&std::fs::read_to_string(path)?)?; + let mut registry = DensityRegistry::from_json(&bundle["noises"], &bundle["densities"])?; + let settings: std::collections::BTreeMap<String, Box<serde_json::value::RawValue>> = + serde_json::from_str(&bundle["settings"][setting])?; + let router = NoiseRouter::from_json(settings["noise_router"].get(), &mut registry)?; + let mut compiler = DensityCompiler::new_seeded(registry.into_graph(), seed, legacy); + let mut context = SamplerContext::cached(); + writeln!(out, "router {setting} 8")?; + for field in RouterField::ALL { + sample_root( + &mut compiler, + router.function(field), + field.name(), + optimized, + true, + &mut context, + out, + )?; + } + let climate = router.compile_climate(&mut compiler)?; + writeln!(out, "climate caches {}", compiler.cache_count())?; + for position in [ + [0, 0, 0], + [-5, -16, 8], + [7500000, 79, -7500000], + [i32::MIN, i32::MAX, -1], + [536870912, -536870913, 17], + [-4, 0, 8], + ] { + write!(out, "climate")?; + for value in climate.sample(&mut context, position)?.parameters() { + write!(out, " {value}")?; + } + writeln!(out)?; + } + for (preset, json) in &bundle["presets"] { + let source = + horizon_world::worldgen::biome::MultiNoiseBiomeSource::from_quantized_json(json)?; + writeln!( + out, + "biomes {preset} {}", + source.parameters().entries().len() + )?; + let mut resolver = source.resolver(&climate); + for position in [ + [0, 0, 0], + [-5, -16, 8], + [7500000, 79, -7500000], + [i32::MIN, i32::MAX, -1], + [536870912, -536870913, 17], + [-4, 0, 8], + ] { + writeln!(out, "biome {}", resolver.sample(&mut context, position)?)?; + } + for (minimum, extents) in [ + ([-5, -16, 8], [3, 4, 2]), + ([-4, -16, 8], [3, 4, 2]), + ([i32::MAX - 1, i32::MIN, -1], [2, 2, 2]), + ] { + let volume = resolver.prepare_volume(&mut context, minimum, extents)?; + let mut positions = Vec::new(); + for z in 0..extents[2] { + for x in 0..extents[0] { + for y in 0..extents[1] { + positions.push([ + minimum[0].wrapping_add(x), + minimum[1].wrapping_add(y), + minimum[2].wrapping_add(z), + ]); + } + } + } + for position in positions + .iter() + .chain(positions.iter().rev()) + .chain(positions.iter().take(3)) + { + writeln!( + out, + "biomecell {}", + resolver.sample_prepared(&volume, *position)? + )?; + } + } + } + Ok(()) +} +fn index_probe( + branching: usize, + json: &str, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + use horizon_world::worldgen::climate::{ClimateIndex, Parameter, ParameterPoint, TargetPoint}; + let input: serde_json::Value = serde_json::from_str(json)?; + let mut entries = Vec::new(); + for (id, entry) in input["entries"] + .as_array() + .ok_or("entries")? + .iter() + .enumerate() + { + let coords = entry["coordinates"].as_array().ok_or("coordinates")?; + let mut coordinates = [Parameter::new(0, 0); 6]; + for (coordinate, value) in coordinates.iter_mut().zip(coords) { + *coordinate = Parameter::new( + value[0].as_i64().ok_or("minimum")?, + value[1].as_i64().ok_or("maximum")?, + ); + } + entries.push(( + ParameterPoint { + coordinates, + offset: entry["offset"].as_i64().ok_or("offset")?, + }, + id, + )); + } + let index = match ClimateIndex::with_branching(entries, branching) { + Ok(index) => index, + Err(_) => { + writeln!(out, "index error")?; + return Ok(()); + } + }; + writeln!(out, "index ok {}", index.entries().len())?; + for id in index.leaf_order() { + writeln!(out, "leaf {id}")?; + } + let mut cached = index.searcher(); + for target in input["targets"].as_array().ok_or("targets")? { + let values = target.as_array().ok_or("target")?; + let point = TargetPoint { + temperature: values[0].as_i64().ok_or("temperature")?, + humidity: values[1].as_i64().ok_or("humidity")?, + continentalness: values[2].as_i64().ok_or("continentalness")?, + erosion: values[3].as_i64().ok_or("erosion")?, + depth: values[4].as_i64().ok_or("depth")?, + weirdness: values[5].as_i64().ok_or("weirdness")?, + }; + let brute = index.brute_force(point); + writeln!( + out, + "brute {brute} {}", + index.entries()[*brute].0.fitness(point) + )?; + for (label, result) in [ + ("cached", cached.find(point)), + ("fresh", index.searcher().find(point)), + ] { + match result { + Ok(id) => writeln!( + out, + "{label} {id} {}", + index.entries()[*id].0.fitness(point) + )?, + Err(_) => writeln!(out, "{label} error")?, + } + } + } + Ok(()) +} +fn settings_probe( + settings: horizon_world::worldgen::settings::NoiseSettings, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + writeln!(out, "settings {} {}", settings.min_y, settings.height)?; + for (minimum, height) in [ + (-64, 384), + (0, 128), + (-2032, 4064), + (17, 15), + (2048, 16), + (i32::MAX, 1), + (i32::MIN, i32::MAX), + ] { + let clamped = settings.clamp_to_height(minimum, height); + writeln!(out, "clamped {} {}", clamped.min_y, clamped.height)?; + } + Ok(()) +} +fn aquifer_probe(line: &str, out: &mut impl Write) -> Result<(), Box<dyn std::error::Error>> { + use horizon_world::{ + registry::BlockStateId, + worldgen::aquifer::{DisabledAquifer, FluidPicker, FluidStatus, GlobalFluidPicker}, + }; + use std::sync::atomic::{AtomicUsize, Ordering}; + #[derive(Debug)] + struct Counted { + picker: GlobalFluidPicker, + calls: AtomicUsize, + } + impl FluidPicker for Counted { + fn compute(&self, position: [i32; 3]) -> FluidStatus { + self.calls.fetch_add(1, Ordering::Relaxed); + self.picker.compute(position) + } + } + let args: Vec<_> = line.split_whitespace().collect(); + let sea = args[1].parse::<i32>()?; + let fluid = BlockStateId(args[2].parse::<u32>()?); + let position = [args[3].parse()?, args[4].parse()?, args[5].parse()?]; + let density = f64::from_bits(u64::from_str_radix(args[6], 16)?); + // Local labels correspond to actual reference default block states. They + // exercise identity-based selection independently of numeric registry IDs. + let picker = GlobalFluidPicker::new(sea, fluid, BlockStateId(1), BlockStateId(2)); + let status = picker.compute(position); + writeln!( + out, + "fluid {} {} {}", + status.level, + status.state.0, + status.at(position[1], BlockStateId(2)).0 + )?; + let counted = Counted { + picker, + calls: AtomicUsize::new(0), + }; + let aquifer = DisabledAquifer::new(&counted, BlockStateId(2)); + let substance = aquifer.compute_substance(position, density); + let label = substance.map_or_else(|| "default_solid".to_string(), |id| id.0.to_string()); + writeln!( + out, + "substance {label} {} {}", + aquifer.should_schedule_fluid_update(), + counted.calls.load(Ordering::Relaxed) + )?; + Ok(()) +} +fn noise_aquifer_probe(line: &str, out: &mut impl Write) -> Result<(), Box<dyn std::error::Error>> { + use horizon_core::{ + density::{ConstantSampler, DensitySampler, SampleError}, + random::PositionalRandom, + }; + use horizon_world::{ + registry::BlockStateId, + worldgen::aquifer::{ + AquiferBlockStates, AquiferConfig, AquiferField, AquiferSamplers, FluidPicker, + FluidStatus, GlobalFluidPicker, NoiseBasedAquifer, + }, + }; + use std::sync::{Arc, Mutex}; + #[derive(Debug)] + struct Traced { + sampler: Arc<dyn DensitySampler>, + field: usize, + events: Arc<Mutex<Vec<String>>>, + calls: Mutex<usize>, + fail: Option<usize>, + } + impl Traced { + fn enter(&self, event: String) -> Result<(), SampleError> { + self.events.lock().unwrap().push(event); + let mut calls = self.calls.lock().unwrap(); + *calls += 1; + if self.fail == Some(*calls) { + self.events + .lock() + .unwrap() + .push(format!("sample failure {}", self.field)); + Err(SampleError::ZeroGradientPeriod) + } else { + Ok(()) + } + } + } + impl DensitySampler for Traced { + fn sample_value( + &self, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f32, SampleError> { + self.enter(format!( + "sample {} value {} {} {}", + self.field, position[0], position[1], position[2] + ))?; + let result = self.sampler.sample_value(context, position); + self.events.lock().unwrap().push(match result { + Ok(value) => format!("value {}", bits(value)), + Err(_) => "value error".into(), + }); + result + } + fn sample_volume( + &self, + context: &mut SamplerContext, + buffer: &mut [f32], + volume: DensityVolume, + ) -> Result<(), SampleError> { + let size = volume.sizes(); + let min = volume.minimum(); + let steps = volume.steps(); + self.enter(format!( + "sample {} volume {} {} {} {} {} {} {} {} {}", + self.field, + size[0], + size[1], + size[2], + min[0], + min[1], + min[2], + steps[0], + steps[1], + steps[2] + ))?; + let result = self.sampler.sample_volume(context, buffer, volume); + let mut events = self.events.lock().unwrap(); + events.push(format!( + "sample volume {}", + if result.is_ok() { "ok" } else { "error" } + )); + events.extend( + buffer + .iter() + .map(|value| format!("sample cell {}", bits(*value))), + ); + result + } + } + #[derive(Debug)] + struct Picker { + inner: GlobalFluidPicker, + events: Arc<Mutex<Vec<String>>>, + } + impl FluidPicker for Picker { + fn compute(&self, position: [i32; 3]) -> FluidStatus { + let status = self.inner.compute(position); + self.events.lock().unwrap().push(format!( + "pick {} {} {} {} {}", + position[0], position[1], position[2], status.level, status.state.0 + )); + status + } + } + struct Blocks; + impl AquiferBlockStates for Blocks { + fn air(&self) -> BlockStateId { + BlockStateId(2) + } + fn lava(&self) -> BlockStateId { + BlockStateId(1) + } + fn is_air(&self, s: BlockStateId) -> bool { + matches!(s.0, 2 | 4 | 5) + } + fn is_lava(&self, s: BlockStateId) -> bool { + matches!(s.0, 1 | 7) + } + fn is_water(&self, s: BlockStateId) -> bool { + matches!(s.0, 0 | 6) + } + } + fn flush(events: &Mutex<Vec<String>>, out: &mut impl Write) -> io::Result<()> { + for event in events.lock().unwrap().drain(..) { + writeln!(out, "{event}")?; + } + Ok(()) + } + fn run<F: PositionalRandom>( + samplers: AquiferSamplers, + picker: Picker, + random: F, + volume: DensityVolume, + queries: &serde_json::Value, + events: Arc<Mutex<Vec<String>>>, + out: &mut impl Write, + ) -> Result<(), Box<dyn std::error::Error>> { + let mut context = SamplerContext::cached(); + let created = + NoiseBasedAquifer::new(samplers, picker, random, Blocks, volume, &mut context); + flush(&events, out)?; + let mut aquifer = match created { + Ok(value) => value, + Err(_) => { + writeln!(out, "aquifer create error")?; + return Ok(()); + } + }; + writeln!(out, "aquifer ready {}", aquifer.skip_sampling_above_y())?; + for query in queries.as_array().ok_or("queries")? { + let position = [ + query[0].as_i64().ok_or("x")? as i32, + query[1].as_i64().ok_or("y")? as i32, + query[2].as_i64().ok_or("z")? as i32, + ]; + let density = f64::from_bits(u64::from_str_radix( + query[3].as_str().ok_or("density")?, + 16, + )?); + let result = aquifer.compute_substance(&mut context, position, density); + flush(&events, out)?; + let result = match result { + Ok(Some(state)) => state.0.to_string(), + Ok(None) => "default_solid".into(), + Err(_) => "error".into(), + }; + writeln!( + out, + "aquifer result {result} {}", + aquifer.should_schedule_fluid_update() + )?; + } + for (index, (location, status)) in aquifer.cached_cells().enumerate() { + let status = status.map_or("none".into(), |s| format!("{} {}", s.level, s.state.0)); + writeln!(out, "aquifer cell {index} {location} {status}")?; + } + let mut surfaces: Vec<_> = aquifer.cached_surfaces().collect(); + surfaces.sort_by_key(|entry| entry.0); + for (key, value) in surfaces { + writeln!(out, "aquifer surface {key} {value}")?; + } + Ok(()) + } + let fields: Vec<_> = line.splitn(6, ' ').collect(); + let seed: i64 = fields[1].parse()?; + let legacy = fields[2] == "1"; + let bundle: std::collections::BTreeMap<String, std::collections::BTreeMap<String, String>> = + serde_json::from_str(&std::fs::read_to_string(fields[3])?)?; + let fixture: serde_json::Value = serde_json::from_str(fields[5])?; + let mut registry = DensityRegistry::from_json(&bundle["noises"], &bundle["densities"])?; + let settings: std::collections::BTreeMap<String, Box<serde_json::value::RawValue>> = + serde_json::from_str(&bundle["settings"][fields[4]])?; + let config_text = fixture + .get("config") + .map(|c| c.as_str().ok_or("config string")) + .transpose()? + .unwrap_or_else(|| settings.get("aquifers").map_or("null", |v| v.get())); + let config = match AquiferConfig::from_json(config_text, &mut registry) { + Ok(config) => config, + Err(_) => { + writeln!(out, "aquifer config error")?; + return Ok(()); + } + }; + let mut compiler = DensityCompiler::new_seeded(registry.into_graph(), seed, legacy); + let samplers = match config.compile(&mut compiler) { + Ok(s) => s, + Err(_) => { + writeln!(out, "aquifer compile error")?; + return Ok(()); + } + }; + writeln!(out, "aquifer compile ok {}", compiler.cache_count())?; + let events = Arc::new(Mutex::new(Vec::new())); + let mut traced = Vec::new(); + for field in AquiferField::ALL { + let i = field as usize; + let sampler = if let Some(value) = fixture + .get("overrides") + .and_then(|v| v.get(i)) + .and_then(|v| v.as_str()) + { + Arc::new(ConstantSampler(f32::from_bits(u32::from_str_radix( + value, 16, + )?))) as Arc<dyn DensitySampler> + } else { + samplers.get(field).clone() + }; + let fail = fixture + .get("fail") + .filter(|f| f[0].as_u64() == Some(i as u64)) + .and_then(|f| f[1].as_u64()) + .map(|n| n as usize); + traced.push(Arc::new(Traced { + sampler, + field: i, + events: events.clone(), + calls: Mutex::new(0), + fail, + }) as Arc<dyn DensitySampler>); + } + let samplers = AquiferSamplers::new(traced.try_into().unwrap()); + let array = |name: &str| -> Result<[i32; 3], Box<dyn std::error::Error>> { + Ok(std::array::from_fn(|i| { + fixture[name][i].as_i64().unwrap() as i32 + })) + }; + let volume = DensityVolume::new(array("sizes")?, array("minimum")?, array("steps")?)?; + let picker = Picker { + inner: GlobalFluidPicker::new( + fixture["sea"].as_i64().ok_or("sea")? as i32, + BlockStateId(fixture["fluid"].as_u64().ok_or("fluid")? as u32), + BlockStateId(1), + BlockStateId(2), + ), + events: events.clone(), + }; + if legacy { + let random = LegacyRandom::new(seed) + .fork_positional() + .from_hash_of("minecraft:aquifer") + .fork_positional(); + run( + samplers, + picker, + random, + volume, + &fixture["queries"], + events, + out, + ) + } else { + let random = XoroshiroRandom::new(seed) + .fork_positional() + .from_hash_of("minecraft:aquifer") + .fork_positional(); + run( + samplers, + picker, + random, + volume, + &fixture["queries"], + events, + out, + ) + } +} + +fn tags_probe( + fixture: &serde_json::Value, + out: &mut impl Write, +) -> Result<(), Box<dyn std::error::Error>> { + use horizon_world::worldgen::tags::TagDefinitions; + writeln!( + out, + "tags resources {}", + fixture["files"].as_array().ok_or("files")?.len() + )?; + let mut definitions = TagDefinitions::default(); + for file in fixture["files"].as_array().ok_or("files")? { + let name = file[0].as_str().ok_or("name")?; + let source = file[1].as_str().ok_or("source")?; + if definitions + .apply_json(name, source, file[2].as_str().ok_or("json")?) + .is_err() + { + // Fixture names are valid. Codec errors can introduce empty tags. + let canonical = definitions + .definitions() + .keys() + .find(|key| key.as_str() == name || key.as_str() == format!("minecraft:{name}")) + .ok_or("tag name")?; + writeln!(out, "tag resource error {canonical} {source}")?; + } + } + let mut trace = Vec::new(); + let result = definitions.build(|id, required| { + trace.push(format!("tag lookup {id} {required}")); + fixture["elements"] + .get(id) + .and_then(|v| v.as_str()) + .map(str::to_owned) + })?; + for event in trace { + writeln!(out, "{event}")?; + } + writeln!(out, "tags built {}", result.tags.len())?; + for (name, values) in result.tags { + writeln!(out, "tag members {name} {}", values.len())?; + for value in values { + writeln!(out, "tag member {value}")?; + } + } + for name in result.missing.keys() { + writeln!(out, "tag missing {name}")?; + } + Ok(()) +} +fn tag_registry_probe(path: &str, out: &mut impl Write) -> Result<(), Box<dyn std::error::Error>> { + let bundle: std::collections::BTreeMap<String, std::collections::BTreeMap<String, String>> = + serde_json::from_str(&std::fs::read_to_string(path)?)?; + let files: Vec<_> = bundle["tags"] + .iter() + .map(|(name, json)| serde_json::json!([name, "vanilla", json])) + .collect(); + tags_probe( + &serde_json::json!({"files":files,"elements":bundle["block_elements"]}), + out, + ) +} + +fn main() -> Result<(), Box<dyn std::error::Error>> { + let mut out = io::BufWriter::new(io::stdout().lock()); + for line in io::stdin().lock().lines() { + let line = line?; + let mut args = line.splitn(5, ' '); + let command = args.next().ok_or("command")?; + if command == "tag_entry" { + match horizon_world::worldgen::tags::TagEntry::from_json( + line.strip_prefix("tag_entry ").ok_or("entry")?, + ) { + Ok(e) => writeln!(out, "tag entry {}", e.display())?, + Err(_) => writeln!(out, "tag entry error")?, + } + continue; + } + if command == "tag_file" { + match horizon_world::worldgen::tags::TagFile::from_json( + line.strip_prefix("tag_file ").ok_or("file")?, + ) { + Ok(file) => { + writeln!(out, "tag file {} {}", file.replace, file.entries.len())?; + for e in file.entries { + writeln!(out, "tag entry {}", e.display())?; + } + } + Err(_) => writeln!(out, "tag file error")?, + } + continue; + } + if command == "tag_registry" { + tag_registry_probe( + line.strip_prefix("tag_registry ").ok_or("registry")?, + &mut out, + )?; + continue; + } + if command == "tags" { + tags_probe( + &serde_json::from_str(line.strip_prefix("tags ").ok_or("tags")?)?, + &mut out, + )?; + continue; + } + if command == "noise_aquifer" { + noise_aquifer_probe(&line, &mut out)?; + continue; + } + if command == "aquifer" { + aquifer_probe(&line, &mut out)?; + continue; + } + if command == "noise_settings" { + match horizon_world::worldgen::settings::NoiseSettings::from_json( + line.strip_prefix("noise_settings ") + .ok_or("settings json")?, + ) { + Ok(settings) => settings_probe(settings, &mut out)?, + Err(_) => writeln!(out, "settings error")?, + } + continue; + } + if command == "settings_create" { + let values: Vec<i32> = line + .split_whitespace() + .skip(1) + .map(str::parse) + .collect::<Result<_, _>>()?; + match horizon_world::worldgen::settings::NoiseSettings::create(values[0], values[1]) { + Ok(settings) => settings_probe(settings, &mut out)?, + Err(_) => writeln!(out, "settings error")?, + } + continue; + } + if command == "climate_parameter" { + match horizon_world::worldgen::climate::decode_parameter( + line.strip_prefix("climate_parameter ") + .ok_or("parameter json")?, + ) { + Ok(p) => writeln!(out, "parameter {} {}", p.min, p.max)?, + Err(_) => writeln!(out, "parameter error")?, + } + continue; + } + if command == "climate_point" { + match horizon_world::worldgen::climate::decode_parameter_point( + line.strip_prefix("climate_point ").ok_or("point json")?, + ) { + Ok(p) => { + write!(out, "parameterpoint")?; + for coordinate in p.coordinates { + write!(out, " {} {}", coordinate.min, coordinate.max)?; + } + writeln!(out, " {}", p.offset)?; + } + Err(_) => writeln!(out, "parameterpoint error")?, + } + continue; + } + if command == "index" { + let mut args = line.splitn(3, ' '); + args.next(); + let branching = args.next().ok_or("branching")?.parse::<usize>()?; + index_probe(branching, args.next().ok_or("index json")?, &mut out)?; + continue; + } + if command == "quantize" { + let mut values = line.split_whitespace().skip(1); + write!(out, "quantized")?; + for _ in 0..6 { + let value = f32::from_bits(u32::from_str_radix(values.next().ok_or("float")?, 16)?); + write!( + out, + " {}", + horizon_world::worldgen::climate::quantize(value) + )?; + } + writeln!(out)?; + let value = values.next().ok_or("long")?.parse::<i64>()?; + writeln!( + out, + "unquantized {}", + bits(horizon_world::worldgen::climate::unquantize(value)) + )?; + continue; + } + let seed = args.next().ok_or("seed")?.parse::<i64>()?; + let legacy = args.next().ok_or("stream")? == "1"; + let nether = args.next().ok_or("nether")? == "1"; + let json = args.next().ok_or("json")?; + if command == "router" { + let (path, setting) = json.split_once(' ').ok_or("router setting")?; + router_probe(path, setting, seed, legacy, nether, &mut out)?; + continue; + } + if command == "registry" { + registry_probe(json, seed, legacy, nether, &mut out)?; + continue; + } + if command != "noise" { + return Err("unknown command".into()); + } + let noise = match decode_noise(json) { + Ok(noise) => noise, + Err(_) => { + writeln!(out, "decode error")?; + continue; + } + }; + let [min, max] = noise.range(); + writeln!( + out, + "decode {} {} {} {}", + noise.octaves().len(), + noise.normalization_factor().to_bits(), + bits(min), + bits(max) + )?; + for octave in noise.octaves() { + writeln!( + out, + "octave {} {} {}", + octave.octave_index, + octave.frequency.to_bits(), + octave.amplitude.to_bits() + )?; + } + if legacy { + probe(&noise, &mut LegacyRandom::new(seed), nether, &mut out)?; + } else { + probe(&noise, &mut XoroshiroRandom::new(seed), nether, &mut out)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/src/block_collision.rs b/crates/horizon-world/src/block_collision.rs new file mode 100644 index 000000000..73617de71 --- /dev/null +++ b/crates/horizon-world/src/block_collision.rs @@ -0,0 +1,254 @@ +//! Cached/dynamic no-context collision queries and explicit contextual block rules. +//! Context-sensitive families override the no-context cache explicitly. +use crate::{ + block_collision_scan::CollisionBlock, + collision::CachedCollisionRegistry, + collision_context::CollisionContext, + dynamic_support::{DynamicSupport, DynamicSupportError, DynamicSupportWorld}, + liquid_collision::{LiquidCollision, LiquidCollisionWorld}, + powder_snow_collision::{PowderSnowWorld, powder_snow_collision_shape}, + registry::{BlockRegistry, BlockStateId}, +}; +use horizon_core::geometry::{Aabb, Axis, Direction, Vec3, VoxelShape}; +use std::{collections::HashMap, io, sync::Arc}; + +#[derive(Clone, Copy, Debug)] +pub struct ShulkerCollisionState { + pub previous_progress: f32, + pub progress: f32, +} +impl ShulkerCollisionState { + pub fn bounding_box(self, direction: Direction) -> Aabb { + // Native getProgress(1) retains this interpolation, including rounding. + let progress = 0.5f32 * (self.previous_progress + (self.progress - self.previous_progress)); + let maximum = if progress.is_nan() { + progress + } else { + (-1.0f32).max(progress) + } as f64; + let minimum = if progress.is_nan() { + progress + } else { + (-1.0f32).min(progress) + } as f64; + let [x, y, z] = direction.normal(); + Aabb::new(Vec3::new(-0.5, 0.0, -0.5), Vec3::new(0.5, 1.0, 0.5)) + .expand_towards(Vec3::new( + f64::from(x) * maximum, + f64::from(y) * maximum, + f64::from(z) * maximum, + )) + .contract(Vec3::new( + f64::from(-x) * (1.0 + minimum), + f64::from(-y) * (1.0 + minimum), + f64::from(-z) * (1.0 + minimum), + )) + .move_by(Vec3::new(0.5, 0.0, 0.5)) + } +} + +pub trait DynamicCollisionWorld: DynamicSupportWorld { + /// One block-entity lookup. None denotes absence or another entity type. + fn shulker_collision_state( + &mut self, + position: [i32; 3], + ) -> Result<Option<ShulkerCollisionState>, Self::Error>; +} + +#[derive(Debug)] +pub enum CollisionQueryError<E> { + Data(io::Error), + Dynamic(DynamicSupportError<E>), + Context(E), + Unsupported(BlockStateId), +} +impl<E: std::fmt::Display> std::fmt::Display for CollisionQueryError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Data(error) => error.fmt(f), + Self::Dynamic(error) => error.fmt(f), + Self::Context(error) => error.fmt(f), + Self::Unsupported(state) => write!(f, "unsupported block collision state {}", state.0), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for CollisionQueryError<E> {} + +pub struct BlockCollisionRegistry<'r> { + cached: Arc<CachedCollisionRegistry<'r>>, + dynamic: HashMap<BlockStateId, DynamicSupport>, + contextual: HashMap<BlockStateId, ContextualRule>, + scan_flags: Vec<u8>, +} +enum ContextualRule { + Scaffolding(ScaffoldingCollision), + Liquid(LiquidCollision), + PowderSnow, +} +impl<'r> BlockCollisionRegistry<'r> { + pub fn new(cached: Arc<CachedCollisionRegistry<'r>>) -> io::Result<Self> { + let mut dynamic = HashMap::new(); + let mut contextual = HashMap::new(); + let mut scan_flags = Vec::with_capacity(cached.registry().len()); + for index in 0..cached.registry().len() { + let id = BlockStateId(index as u32); + let state = cached.registry().state(id).unwrap(); + let large = cached.cached_shape(id)?.is_none_or(|shape| { + Axis::ALL + .into_iter() + .any(|axis| shape.min(axis) < 0.0 || shape.max(axis) > 1.0) + }); + scan_flags + .push(u8::from(large) | (u8::from(state.name == "minecraft:moving_piston") << 1)); + if let Some(rule) = ScaffoldingCollision::from_state(state)? { + contextual.insert(id, ContextualRule::Scaffolding(rule)); + } else if let Some(rule) = LiquidCollision::from_state(state)? { + contextual.insert(id, ContextualRule::Liquid(rule)); + } else if state.name == "minecraft:powder_snow" { + contextual.insert(id, ContextualRule::PowderSnow); + } + if cached.cached_shape(id)?.is_none() { + if let Some(rule) = + DynamicSupport::from_state(cached.registry().state(id).unwrap())? + { + dynamic.insert(id, rule); + } + } + } + Ok(Self { + cached, + dynamic, + contextual, + scan_flags, + }) + } + pub fn registry(&self) -> &'r BlockRegistry { + self.cached.registry() + } + pub fn cached_shapes(&self) -> &CachedCollisionRegistry<'r> { + &self.cached + } + /// Immutable cursor-filter metadata, prepared once for this registry. + pub fn collision_block(&self, state: BlockStateId) -> io::Result<CollisionBlock> { + let flags = *self + .scan_flags + .get(state.0 as usize) + .ok_or_else(|| crate::compression::invalid("collision scan state outside registry"))?; + Ok(CollisionBlock { + state, + large_collision_shape: flags & 1 != 0, + moving_piston: flags & 2 != 0, + }) + } + pub fn collision_shape<W: DynamicCollisionWorld>( + &self, + world: &mut W, + state: BlockStateId, + position: [i32; 3], + ) -> Result<VoxelShape, CollisionQueryError<W::Error>> { + if let Some(shape) = self + .cached + .cached_shape(state) + .map_err(CollisionQueryError::Data)? + { + return Ok(shape.clone()); + } + self.dynamic + .get(&state) + .ok_or(CollisionQueryError::Unsupported(state))? + .collision_shape(world, position) + .map_err(CollisionQueryError::Dynamic) + } + + /// Ordinary entity/position/placement contexts. The remaining pinned block + /// families share their no-context geometry; the native registry audit checks + /// cached states with rejecting context/world providers before using that path. + /// Experimental minecart position exclusions are a separate context layer. + pub fn collision_shape_with_context<W, E>( + &self, + world: &mut W, + state: BlockStateId, + position: horizon_core::position::BlockPos, + context: &CollisionContext<'_>, + ) -> Result<VoxelShape, CollisionQueryError<E>> + where + W: DynamicCollisionWorld<Error = E> + + LiquidCollisionWorld<Error = E> + + PowderSnowWorld<Error = E>, + { + match self.contextual.get(&state) { + Some(ContextualRule::Scaffolding(rule)) => Ok(rule.shape(context, position)), + Some(ContextualRule::Liquid(rule)) => rule + .shape(world, position, context) + .map_err(CollisionQueryError::Context), + Some(ContextualRule::PowderSnow) => { + powder_snow_collision_shape(world, position, context) + .map_err(CollisionQueryError::Context) + } + None => self.collision_shape(world, state, [position.x, position.y, position.z]), + } + } +} + +/// Entity-context scaffold selection, independent of world queries. Construction +/// validates the descriptor so missing properties cannot silently change behavior. +#[derive(Clone, Copy, Debug)] +pub struct ScaffoldingCollision { + supported: bool, + bottom: bool, +} +impl ScaffoldingCollision { + pub fn from_state(state: &crate::chunk::BlockState) -> io::Result<Option<Self>> { + if state.name != "minecraft:scaffolding" { + return Ok(None); + } + let distance = state + .properties + .get("distance") + .and_then(|v| crate::registry::java_integer(v)) + .filter(|v| (0..=7).contains(v)) + .ok_or_else(|| crate::compression::invalid("invalid scaffold distance"))?; + let bottom = match state.properties.get("bottom").map(String::as_str) { + Some("true") => true, + Some("false") => false, + _ => return Err(crate::compression::invalid("invalid scaffold bottom")), + }; + Ok(Some(Self { + supported: distance == 0, + bottom, + })) + } + + pub fn shape( + &self, + context: &crate::collision_context::CollisionContext<'_>, + position: horizon_core::position::BlockPos, + ) -> VoxelShape { + use std::sync::OnceLock; + if context.is_placement() { + return VoxelShape::empty(); + } + if context.is_above(&VoxelShape::block(), position, true) && !context.is_descending() { + return crate::dynamic_support::scaffolding_stable_shape(); + } + if !self.supported && self.bottom { + static BELOW: OnceLock<VoxelShape> = OnceLock::new(); + let below = BELOW.get_or_init(|| { + VoxelShape::block() + .moved(Vec3::new(0.0, -1.0, 0.0)) + .optimized() + .expect("bounded scaffold below shape") + }); + if context.is_above(below, position, true) { + static BOTTOM: OnceLock<VoxelShape> = OnceLock::new(); + return BOTTOM + .get_or_init(|| { + VoxelShape::from_box(Aabb::new(Vec3::ZERO, Vec3::new(1.0, 0.125, 1.0))) + .expect("bounded scaffold bottom") + }) + .clone(); + } + } + VoxelShape::empty() + } +} diff --git a/crates/horizon-world/src/block_collision_scan.rs b/crates/horizon-world/src/block_collision_scan.rs new file mode 100644 index 000000000..3b03a64ab --- /dev/null +++ b/crates/horizon-world/src/block_collision_scan.rs @@ -0,0 +1,237 @@ +//! Lazy block collision selection in vanilla cursor/query order. Providers own +//! chunk availability, state metadata, suffocation predicates and context dispatch. +use crate::{collision_context::CollisionContext, registry::BlockStateId}; +use horizon_core::{ + geometry::{Aabb, ShapeError, ShapeOp, Vec3, VoxelShape}, + position::{BlockPos, ChunkPos}, +}; + +#[derive(Clone, Copy, Debug)] +pub struct CollisionBlock { + pub state: BlockStateId, + pub large_collision_shape: bool, + pub moving_piston: bool, +} + +pub trait BlockCollisionWorld { + type Error; + type Chunk: Copy; + /// None is a missing collision chunk; native iteration retries missing chunks. + fn collision_chunk(&mut self, position: ChunkPos) -> Result<Option<Self::Chunk>, Self::Error>; + fn collision_block( + &mut self, + chunk: Self::Chunk, + position: BlockPos, + ) -> Result<CollisionBlock, Self::Error>; + fn is_suffocating( + &mut self, + chunk: Self::Chunk, + block: CollisionBlock, + position: BlockPos, + ) -> Result<bool, Self::Error>; + /// Query against the global collision world, not the cached chunk provider. + /// Shapes must preserve canonical block identity (including imported shapes). + fn context_shape( + &mut self, + block: CollisionBlock, + position: BlockPos, + context: &CollisionContext<'_>, + ) -> Result<VoxelShape, Self::Error>; +} + +#[derive(Debug)] +pub enum CollisionScanError<E> { + InvalidBounds, + TooLarge, + VisitBudget, + World(E), + Shape(ShapeError), +} +impl<E: std::fmt::Display> std::fmt::Display for CollisionScanError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::InvalidBounds => f.write_str("collision scan bounds must be finite"), + Self::TooLarge => { + f.write_str("collision scan exceeds the positive Java-int cursor domain") + } + Self::VisitBudget => f.write_str("collision scan candidate budget exhausted"), + Self::World(error) => error.fmt(f), + Self::Shape(error) => error.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for CollisionScanError<E> {} + +#[derive(Debug)] +pub struct BlockCollisionHit { + pub position: BlockPos, + pub shape: VoxelShape, +} + +pub struct BlockCollisionScan<'w, 'c, W: BlockCollisionWorld> { + world: &'w mut W, + context: CollisionContext<'c>, + bounds: Aabb, + entity_shape: VoxelShape, + only_suffocating: bool, + start: BlockPos, + sizes: [usize; 3], + index: usize, + count: usize, + budget: usize, + chunk: Option<(ChunkPos, W::Chunk)>, + failed: bool, +} +impl<'w, 'c, W: BlockCollisionWorld> BlockCollisionScan<'w, 'c, W> { + /// Finite bounds and a positive-Java-int candidate volume are supported. + /// Budget counts every cursor cell, including skipped corners. After an error + /// iteration terminates; already performed queries are not rolled back. + pub fn new( + world: &'w mut W, + context: CollisionContext<'c>, + bounds: Aabb, + only_suffocating: bool, + candidate_budget: usize, + ) -> Result<Self, CollisionScanError<W::Error>> { + let min = bounds.min_position(); + let max = bounds.max_position(); + if !min.is_finite() || !max.is_finite() { + return Err(CollisionScanError::InvalidBounds); + } + let start = BlockPos::containing(Vec3::new(min.x - 1.0e-7, min.y - 1.0e-7, min.z - 1.0e-7)) + .offset(-1, -1, -1); + let end = BlockPos::containing(Vec3::new(max.x + 1.0e-7, max.y + 1.0e-7, max.z + 1.0e-7)) + .offset(1, 1, 1); + let sizes = [ + end.x.wrapping_sub(start.x).wrapping_add(1), + end.y.wrapping_sub(start.y).wrapping_add(1), + end.z.wrapping_sub(start.z).wrapping_add(1), + ]; + if sizes.iter().any(|size| *size <= 0) { + return Err(CollisionScanError::TooLarge); + } + let count = sizes + .into_iter() + .try_fold(1u64, |n, size| { + n.checked_mul(size as u64).filter(|n| *n <= i32::MAX as u64) + }) + .ok_or(CollisionScanError::TooLarge)? as usize; + Ok(Self { + world, + context, + bounds, + entity_shape: VoxelShape::from_box(bounds).map_err(CollisionScanError::Shape)?, + only_suffocating, + start, + sizes: sizes.map(|s| s as usize), + index: 0, + count, + budget: candidate_budget, + chunk: None, + failed: false, + }) + } + + fn find_next(&mut self) -> Result<Option<BlockCollisionHit>, CollisionScanError<W::Error>> { + while self.index < self.count { + if self.index >= self.budget { + return Err(CollisionScanError::VisitBudget); + } + let [width, height, _] = self.sizes; + let relative = [ + self.index % width, + self.index / width % height, + self.index / width / height, + ]; + self.index += 1; + let kind = relative + .into_iter() + .zip(self.sizes) + .filter(|(p, size)| *p == 0 || *p == size - 1) + .count(); + if kind == 3 { + continue; + } + let p = self + .start + .offset(relative[0] as i32, relative[1] as i32, relative[2] as i32); + let chunk_position = p.chunk(); + let chunk = match self.chunk { + Some((at, chunk)) if at == chunk_position => Some(chunk), + _ => { + let chunk = self + .world + .collision_chunk(chunk_position) + .map_err(CollisionScanError::World)?; + self.chunk = chunk.map(|chunk| (chunk_position, chunk)); + chunk + } + }; + let Some(chunk) = chunk else { + continue; + }; + let block = self + .world + .collision_block(chunk, p) + .map_err(CollisionScanError::World)?; + if self.only_suffocating + && !self + .world + .is_suffocating(chunk, block, p) + .map_err(CollisionScanError::World)? + { + continue; + } + if kind == 1 && !block.large_collision_shape || kind == 2 && !block.moving_piston { + continue; + } + let shape = self + .world + .context_shape(block, p, &self.context) + .map_err(CollisionScanError::World)?; + let offset = Vec3::new(f64::from(p.x), f64::from(p.y), f64::from(p.z)); + let moved = if shape.same_identity(&VoxelShape::block()) { + // Native adds one in floating point, including at i32::MAX. + let unit = Aabb::new( + offset, + Vec3::new(offset.x + 1.0, offset.y + 1.0, offset.z + 1.0), + ); + if !self.bounds.intersects(unit) { + continue; + } + shape.moved(offset) + } else { + let moved = shape.moved(offset); + if moved.is_empty() + || !moved + .join_is_not_empty(&self.entity_shape, ShapeOp::AND) + .map_err(CollisionScanError::Shape)? + { + continue; + } + moved + }; + return Ok(Some(BlockCollisionHit { + position: p, + shape: moved, + })); + } + Ok(None) + } +} +impl<W: BlockCollisionWorld> Iterator for BlockCollisionScan<'_, '_, W> { + type Item = Result<BlockCollisionHit, CollisionScanError<W::Error>>; + fn next(&mut self) -> Option<Self::Item> { + if self.failed { + return None; + } + match self.find_next() { + Ok(hit) => hit.map(Ok), + Err(error) => { + self.failed = true; + Some(Err(error)) + } + } + } +} +impl<W: BlockCollisionWorld> std::iter::FusedIterator for BlockCollisionScan<'_, '_, W> {} diff --git a/crates/horizon-world/src/block_entities.rs b/crates/horizon-world/src/block_entities.rs new file mode 100644 index 000000000..22a2bc959 --- /dev/null +++ b/crates/horizon-world/src/block_entities.rs @@ -0,0 +1,102 @@ +//! Proto-chunk block-entity storage. Active payloads are caller-owned runtime +//! types; this module does not create entities or execute their behavior. +use crate::{compression::invalid, nbt::Tag}; +use horizon_core::position::{BlockPos, ChunkPos}; +use std::{ + collections::{HashMap, HashSet}, + io, +}; + +/// Resolve native block-entity coordinates, relocating mismatched X/Z into the +/// owning chunk while retaining local offsets and the full Y coordinate. The +/// supplied tag is not rewritten. NumericTag float/double reads use Mth.floor. +pub fn position_from_tag(chunk: ChunkPos, tag: &Tag) -> io::Result<BlockPos> { + if !matches!(tag, Tag::Compound(_)) { + return Err(invalid("block entity is not a compound")); + } + let read = |name| match tag.get(name) { + Some(Tag::Byte(v)) => i32::from(*v), + Some(Tag::Short(v)) => i32::from(*v), + Some(Tag::Int(v)) => *v, + Some(Tag::Long(v)) => *v as i32, + Some(Tag::Float(bits)) => f64::from(f32::from_bits(*bits)).floor() as i32, + Some(Tag::Double(bits)) => f64::from_bits(*bits).floor() as i32, + _ => 0, + }; + let (mut x, y, mut z) = (read("x"), read("y"), read("z")); + if x >> 4 != chunk.x || z >> 4 != chunk.z { + x = chunk.x.wrapping_shl(4).wrapping_add(x & 15); + z = chunk.z.wrapping_shl(4).wrapping_add(z & 15); + } + Ok(BlockPos::new(x, y, z)) +} + +pub struct ProtoBlockEntities<E> { + position: ChunkPos, + pending: HashMap<BlockPos, Tag>, + active: HashMap<BlockPos, E>, +} +impl<E> ProtoBlockEntities<E> { + pub fn new(position: ChunkPos) -> Self { + Self { + position, + pending: HashMap::new(), + active: HashMap::new(), + } + } + /// Ignore a pending record when an active entity already owns its resolved + /// position. Inserting an active entity removes any earlier pending record. + pub fn set_pending(&mut self, tag: Tag) -> io::Result<()> { + let position = position_from_tag(self.position, &tag)?; + if !self.active.contains_key(&position) { + self.pending.insert(position, tag); + } + Ok(()) + } + /// Position must be the payload's immutable world position, as supplied by + /// the runtime's block-entity constructor. No chunk/build-height gate applies. + pub fn set_active(&mut self, position: BlockPos, entity: E) -> Option<E> { + self.pending.remove(&position); + self.active.insert(position, entity) + } + pub fn active(&self, position: BlockPos) -> Option<&E> { + self.active.get(&position) + } + pub fn active_mut(&mut self, position: BlockPos) -> Option<&mut E> { + self.active.get_mut(&position) + } + pub fn pending(&self, position: BlockPos) -> Option<&Tag> { + self.pending.get(&position) + } + /// Mutating coordinate fields does not re-key an existing pending entry. + pub fn pending_mut(&mut self, position: BlockPos) -> Option<&mut Tag> { + self.pending.get_mut(&position) + } + pub fn pending_entries(&self) -> &HashMap<BlockPos, Tag> { + &self.pending + } + pub fn positions(&self) -> HashSet<BlockPos> { + self.pending + .keys() + .chain(self.active.keys()) + .copied() + .collect() + } + pub fn remove(&mut self, position: BlockPos) -> Option<E> { + self.pending.remove(&position); + self.active.remove(&position) + } + /// Serialize an active entity when present, otherwise clone its pending tag. + /// The caller supplies runtime serialization; this does not instantiate NBT. + pub fn for_saving<T>( + &self, + position: BlockPos, + serialize: impl FnOnce(&E) -> Result<Tag, T>, + ) -> Result<Option<Tag>, T> { + if let Some(entity) = self.active.get(&position) { + serialize(entity).map(Some) + } else { + Ok(self.pending.get(&position).cloned()) + } + } +} diff --git a/crates/horizon-world/src/block_entity_push.rs b/crates/horizon-world/src/block_entity_push.rs new file mode 100644 index 000000000..986d12b65 --- /dev/null +++ b/crates/horizon-world/src/block_entity_push.rs @@ -0,0 +1,75 @@ +//! Block.pushEntitiesUp when replacement collision geometry adds occupied space. +use crate::{entity_obstruction::EntityIdentity, registry::BlockStateId}; +use horizon_core::{ + geometry::{Aabb, Axis, ShapeError, ShapeOp, Vec3, VoxelShape}, + position::BlockPos, +}; + +pub trait BlockPushWorld { + type Error; + /// Native no-context block collision query, first old state, then new state. + fn collision_shape( + &mut self, + state: BlockStateId, + position: BlockPos, + ) -> Result<VoxelShape, Self::Error>; + /// Return the native-selected nonspectator entities in query order. Selection + /// excludes no entity and uses the added shape's bounds, not exact overlap. + fn entities(&mut self, bounds: Aabb) -> Result<Vec<EntityIdentity>, Self::Error>; + /// Read each current box just before its teleport: an earlier teleport can + /// change later entities. Handles must remain valid throughout this call. + fn entity_bounds(&self, entity: EntityIdentity) -> Aabb; + fn teleport_relative( + &mut self, + entity: EntityIdentity, + movement: Vec3, + ) -> Result<(), Self::Error>; +} +#[derive(Debug)] +pub enum BlockPushError<E> { + World(E), + Shape(ShapeError), +} +impl<E: std::fmt::Display> std::fmt::Display for BlockPushError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Shape(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for BlockPushError<E> {} +pub fn push_entities_up<W: BlockPushWorld>( + world: &mut W, + old: BlockStateId, + new: BlockStateId, + position: BlockPos, +) -> Result<BlockStateId, BlockPushError<W::Error>> { + let old_shape = world + .collision_shape(old, position) + .map_err(BlockPushError::World)?; + let new_shape = world + .collision_shape(new, position) + .map_err(BlockPushError::World)?; + let added = old_shape + .join_unoptimized(&new_shape, ShapeOp::ONLY_SECOND) + .map_err(BlockPushError::Shape)? + .moved(Vec3::new( + f64::from(position.x), + f64::from(position.y), + f64::from(position.z), + )); + if let Some(bounds) = added.bounds() { + let entities = world.entities(bounds).map_err(BlockPushError::World)?; + for entity in entities { + let bounds = world + .entity_bounds(entity) + .move_by(Vec3::new(0.0, 1.0, 0.0)); + let dy = added.collide(Axis::Y, bounds, -1.0); + world + .teleport_relative(entity, Vec3::new(0.0, 1.0 + dy, 0.0)) + .map_err(BlockPushError::World)?; + } + } + Ok(new) +} diff --git a/crates/horizon-world/src/block_landing.rs b/crates/horizon-world/src/block_landing.rs new file mode 100644 index 000000000..ebcd78e29 --- /dev/null +++ b/crates/horizon-world/src/block_landing.rs @@ -0,0 +1,437 @@ +//! Registered block landing/bounce reactions and their ordered world effects. +use crate::{ + block_entity_push::{BlockPushError, BlockPushWorld, push_entities_up}, + compression::invalid, + movement_properties::MovementProperties, + registry::BlockStateId, +}; +use horizon_core::position::BlockPos; +use std::{collections::BTreeMap, fmt, io}; +#[derive(Clone, Debug)] +pub enum FallDefinition { + Default, + Hay, + Honey { volume: f32, pitch: f32 }, + Slime, + PowderSnow, + PointedDripstone, + Farmland { base_block: String }, + TurtleEgg, +} +#[derive(Clone, Debug)] +pub struct LandingDefinition { + pub fall: FallDefinition, + pub shelf_mushroom_bounce: bool, +} +#[derive(Clone, Copy, Debug)] +enum Rule { + Default, + Hay, + Honey { volume: f32, pitch: f32 }, + Slime, + PowderSnow, + DripstoneTip, + Farmland { base: BlockStateId }, + TurtleEgg { remaining: Option<BlockStateId> }, +} +#[derive(Clone, Copy, Debug)] +struct State { + rule: Rule, + reduction: f32, + shelf_mushroom_bounce: bool, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LandingEntityKind { + Other, + Living, + Player, + Zombie, + Turtle, + Bat, + Item, + PrimedTnt, +} +impl LandingEntityKind { + fn living(self) -> bool { + matches!( + self, + Self::Living | Self::Player | Self::Zombie | Self::Turtle | Self::Bat + ) + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LandingSound { + HoneySlide, + HoneyFall, + TurtleEggBreak, + ShelfMushroomBounce, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LandingDamage { + Fall, + Stalagmite, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DamageSourceOwner { + Entity, + Level, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LandingEvent { + BlockChange, + BlockDestroy, +} + +pub trait BlockLandingWorld: BlockPushWorld { + type DamageSource: Copy; + type Sound: Copy; + fn is_server_level(&self) -> bool; + fn is_client_side(&mut self) -> Result<bool, Self::Error>; + fn random_float(&mut self) -> Result<f32, Self::Error>; + fn random_int(&mut self, bound: i32) -> Result<i32, Self::Error>; + fn under_spawn_protection(&mut self, position: BlockPos) -> Result<bool, Self::Error>; + fn mob_griefing(&mut self) -> Result<bool, Self::Error>; + fn entity_dimensions(&self) -> (f32, f32); + fn suppressing_bounce(&mut self) -> Result<bool, Self::Error>; + fn damage_source( + &mut self, + owner: DamageSourceOwner, + kind: LandingDamage, + ) -> Result<Self::DamageSource, Self::Error>; + fn cause_fall_damage( + &mut self, + distance: f64, + multiplier: f32, + source: Self::DamageSource, + ) -> Result<bool, Self::Error>; + fn known_sound(&self, sound: LandingSound) -> Self::Sound; + fn living_fall_sound(&mut self, big: bool) -> Result<Self::Sound, Self::Error>; + fn entity_sound( + &mut self, + sound: Self::Sound, + volume: f32, + pitch: f32, + ) -> Result<(), Self::Error>; + /// Sound source BLOCKS, with no excluded/source entity. + fn block_sound( + &mut self, + position: BlockPos, + sound: Self::Sound, + volume: f32, + pitch: f32, + ) -> Result<(), Self::Error>; + fn broadcast_entity_event(&mut self, event: u8) -> Result<(), Self::Error>; + fn destroy_block(&mut self, position: BlockPos, drops: bool) -> Result<bool, Self::Error>; + fn set_block( + &mut self, + position: BlockPos, + state: BlockStateId, + flags: u32, + ) -> Result<bool, Self::Error>; + fn block_event( + &mut self, + event: LandingEvent, + position: BlockPos, + state: BlockStateId, + with_entity: bool, + ) -> Result<(), Self::Error>; + fn level_event(&mut self, event: i32, position: BlockPos, data: i32) + -> Result<(), Self::Error>; +} +#[derive(Debug)] +pub enum LandingError<E> { + Data(io::Error), + World(E), + Push(BlockPushError<E>), +} +impl<E: fmt::Display> fmt::Display for LandingError<E> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::Data(e) => e.fmt(f), + Self::World(e) => e.fmt(f), + Self::Push(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for LandingError<E> {} +pub struct BlockLandingRegistry { + states: Vec<State>, +} +impl BlockLandingRegistry { + pub fn new( + properties: &MovementProperties<'_>, + definitions: &BTreeMap<String, LandingDefinition>, + ) -> io::Result<Self> { + let registry = properties.registry(); + if definitions + .keys() + .any(|name| registry.default_state(name).is_none()) + { + return Err(invalid("unknown landing definition")); + } + let mut states = Vec::with_capacity(registry.len()); + for index in 0..registry.len() { + let id = BlockStateId(index as u32); + let state = registry.state(id).unwrap(); + let definition = definitions + .get(&state.name) + .ok_or_else(|| invalid("missing landing definition"))?; + let rule = match &definition.fall { + FallDefinition::Default => Rule::Default, + FallDefinition::Hay => Rule::Hay, + FallDefinition::Honey { volume, pitch } => Rule::Honey { + volume: *volume, + pitch: *pitch, + }, + FallDefinition::Slime => Rule::Slime, + FallDefinition::PowderSnow => Rule::PowderSnow, + FallDefinition::PointedDripstone => { + let direction = state + .properties + .get("vertical_direction") + .map(String::as_str); + let thickness = state.properties.get("thickness").map(String::as_str); + if !matches!(direction, Some("up" | "down")) + || !matches!( + thickness, + Some("tip" | "tip_merge" | "frustum" | "middle" | "base") + ) + { + return Err(invalid("invalid landing dripstone state")); + } + if direction == Some("up") && thickness == Some("tip") { + Rule::DripstoneTip + } else { + Rule::Default + } + } + FallDefinition::Farmland { base_block } => Rule::Farmland { + base: registry + .default_state(base_block) + .ok_or_else(|| invalid("unknown farmland base block"))?, + }, + FallDefinition::TurtleEgg => { + let eggs = state + .properties + .get("eggs") + .and_then(|s| s.parse::<i32>().ok()) + .filter(|v| (1..=4).contains(v)) + .ok_or_else(|| invalid("invalid landing egg count"))?; + let remaining = if eggs == 1 { + None + } else { + let mut next = state.clone(); + next.properties + .insert("eggs".into(), (eggs - 1).to_string()); + Some( + registry + .id(&next) + .ok_or_else(|| invalid("missing decremented egg state"))?, + ) + }; + Rule::TurtleEgg { remaining } + } + }; + states.push(State { + rule, + reduction: properties.coefficients(id)?.fall_distance_reduction, + shelf_mushroom_bounce: definition.shelf_mushroom_bounce, + }); + } + Ok(Self { states }) + } + fn state<E>(&self, id: BlockStateId) -> Result<State, LandingError<E>> { + self.states + .get(id.0 as usize) + .copied() + .ok_or_else(|| LandingError::Data(invalid("landing state outside registry"))) + } + pub fn bounce_on<W: BlockLandingWorld>( + &self, + world: &mut W, + state: BlockStateId, + position: BlockPos, + entity: LandingEntityKind, + ) -> Result<(), LandingError<W::Error>> { + if self.state(state)?.shelf_mushroom_bounce + && !matches!( + entity, + LandingEntityKind::Item | LandingEntityKind::PrimedTnt + ) + { + let sound = world.known_sound(LandingSound::ShelfMushroomBounce); + world + .block_sound(position, sound, 1.0, 1.0) + .map_err(LandingError::World)?; + } + Ok(()) + } + pub fn fall_on<W: BlockLandingWorld>( + &self, + world: &mut W, + state: BlockStateId, + position: BlockPos, + entity: LandingEntityKind, + distance: f64, + ) -> Result<(), LandingError<W::Error>> { + let data = self.state(state)?; + match data.rule { + Rule::Default => {} + Rule::Hay => { + cause( + world, + DamageSourceOwner::Level, + LandingDamage::Fall, + distance, + 0.2, + )?; + return Ok(()); + } + Rule::Honey { volume, pitch } => { + let sound = world.known_sound(LandingSound::HoneySlide); + world + .entity_sound(sound, 1.0, 1.0) + .map_err(LandingError::World)?; + if !world.is_client_side().map_err(LandingError::World)? { + world + .broadcast_entity_event(54) + .map_err(LandingError::World)?; + } + if cause( + world, + DamageSourceOwner::Level, + LandingDamage::Fall, + distance, + 0.2, + )? { + let sound = world.known_sound(LandingSound::HoneyFall); + world + .entity_sound(sound, volume * 0.5, pitch * 0.75) + .map_err(LandingError::World)?; + } + return Ok(()); + } + Rule::Slime => { + if !world.suppressing_bounce().map_err(LandingError::World)? { + cause( + world, + DamageSourceOwner::Level, + LandingDamage::Fall, + distance, + 0.0, + )?; + } + return Ok(()); + } + Rule::PowderSnow => { + if (distance >= 4.0 || distance.is_nan()) && entity.living() { + let sound = world + .living_fall_sound(distance >= 7.0 || distance.is_nan()) + .map_err(LandingError::World)?; + world + .entity_sound(sound, 1.0, 1.0) + .map_err(LandingError::World)?; + } + return Ok(()); + } + Rule::DripstoneTip => { + cause( + world, + DamageSourceOwner::Level, + LandingDamage::Stalagmite, + distance + 2.5, + 2.0, + )?; + return Ok(()); + } + Rule::Farmland { base } => { + if world.is_server_level() + && f64::from(world.random_float().map_err(LandingError::World)?) + < distance - 0.5 + && entity.living() + { + let allowed = if entity == LandingEntityKind::Player { + !world + .under_spawn_protection(position) + .map_err(LandingError::World)? + } else { + world.mob_griefing().map_err(LandingError::World)? + }; + if allowed { + let (width, height) = world.entity_dimensions(); + if width * width * height > 0.512f32 { + let next = push_entities_up(world, state, base, position) + .map_err(LandingError::Push)?; + world + .set_block(position, next, 3) + .map_err(LandingError::World)?; + world + .block_event(LandingEvent::BlockChange, position, next, true) + .map_err(LandingError::World)?; + } + } + } + } + Rule::TurtleEgg { remaining } => { + if !matches!( + entity, + LandingEntityKind::Zombie | LandingEntityKind::Turtle | LandingEntityKind::Bat + ) && world.is_server_level() + { + let allowed = if entity == LandingEntityKind::Player { + !world + .under_spawn_protection(position) + .map_err(LandingError::World)? + } else { + entity.living() && world.mob_griefing().map_err(LandingError::World)? + }; + if allowed && world.random_int(3).map_err(LandingError::World)? == 0 { + let sound = world.known_sound(LandingSound::TurtleEggBreak); + let pitch = + 0.9f32 + world.random_float().map_err(LandingError::World)? * 0.2f32; + world + .block_sound(position, sound, 0.7, pitch) + .map_err(LandingError::World)?; + if let Some(next) = remaining { + world + .set_block(position, next, 2) + .map_err(LandingError::World)?; + world + .block_event(LandingEvent::BlockDestroy, position, state, false) + .map_err(LandingError::World)?; + world + .level_event(2001, position, state.0 as i32) + .map_err(LandingError::World)?; + } else { + world + .destroy_block(position, false) + .map_err(LandingError::World)?; + } + } + } + } + } + cause( + world, + DamageSourceOwner::Entity, + LandingDamage::Fall, + distance * f64::from(1.0f32 - data.reduction), + 1.0, + )?; + Ok(()) + } +} +fn cause<W: BlockLandingWorld>( + world: &mut W, + owner: DamageSourceOwner, + kind: LandingDamage, + distance: f64, + multiplier: f32, +) -> Result<bool, LandingError<W::Error>> { + let source = world + .damage_source(owner, kind) + .map_err(LandingError::World)?; + world + .cause_fall_damage(distance, multiplier, source) + .map_err(LandingError::World) +} diff --git a/crates/horizon-world/src/block_placement.rs b/crates/horizon-world/src/block_placement.rs new file mode 100644 index 000000000..cb18e55f5 --- /dev/null +++ b/crates/horizon-world/src/block_placement.rs @@ -0,0 +1,376 @@ +//! Block placement operations used by the simple-block world-generation feature. +use crate::{ + block_properties::{BlockPropertiesRegistry, BlockProperty, BoundBlockProperty}, + compression::invalid, + fluid::FluidStateTable, + registry::{BlockRegistry, BlockStateId}, + worldgen::{ + feature::FeatureWorld, + placement::{PlacementContext, PlacementQueryError}, + }, +}; +use horizon_core::geometry::Direction; +use std::{collections::BTreeSet, io, sync::Arc}; + +const HORIZONTAL: [Direction; 4] = [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, +]; +const SIDE_NAMES: [&str; 4] = ["north", "east", "south", "west"]; + +#[derive(Clone, Copy, Debug)] +enum Placement { + Single, + Double(usize), + Moss, +} +#[derive(Clone, Copy, Debug)] +struct DoublePlant { + halves: [[BlockStateId; 2]; 2], + waterlogged: bool, +} +#[derive(Clone, Copy, Debug)] +struct Moss { + bottom: bool, + sides: [u8; 4], +} +impl Moss { + fn code(self) -> usize { + self.sides + .into_iter() + .fold(usize::from(self.bottom), |code, side| { + code * 3 + usize::from(side) + }) + } + fn has_faces(self) -> bool { + self.bottom || self.sides.into_iter().any(|side| side != 0) + } +} +#[derive(Debug)] +pub enum BlockPlacementError<E> { + World(E), + Registry(io::Error), + Query(PlacementQueryError), +} +impl<E: std::fmt::Display> std::fmt::Display for BlockPlacementError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(error) => error.fmt(f), + Self::Registry(error) => error.fmt(f), + Self::Query(error) => error.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for BlockPlacementError<E> {} + +pub struct BlockPlacementBindings<'r> { + registry: &'r BlockRegistry, + operations: Arc<BlockPlacement>, +} +/// Precompiled transitions shared by decoded features in one registry snapshot. +#[derive(Debug)] +pub struct BlockPlacement { + kinds: Vec<Placement>, + doubles: Vec<DoublePlant>, + replaceable: BoundBlockProperty, + fluids: FluidStateTable, + air: [BlockStateId; 3], + defaults: Vec<BlockStateId>, + moss: Vec<Option<Moss>>, + moss_ids: [BlockStateId; 162], + moss_default: BlockStateId, +} +impl<'r> BlockPlacementBindings<'r> { + pub fn new( + registry: &'r BlockRegistry, + properties: &BlockPropertiesRegistry<'r>, + double_plants: &BTreeSet<String>, + mossy_carpets: &BTreeSet<String>, + ) -> io::Result<Self> { + if !std::ptr::eq(registry, properties.registry()) { + return Err(invalid("placement properties use another registry")); + } + for name in double_plants.iter().chain(mossy_carpets) { + if registry.default_state(name).is_none() { + return Err(invalid("unknown placement definition")); + } + } + let default = |name: &str| { + registry + .default_state(name) + .ok_or_else(|| invalid("missing placement block")) + }; + let mut kinds = Vec::with_capacity(registry.len()); + let mut doubles = Vec::new(); + let mut defaults = Vec::new(); + let mut moss = Vec::new(); + let mut moss_ids = [None; 162]; + for index in 0..registry.len() { + let id = BlockStateId(index as u32); + let state = registry.state(id).unwrap(); + defaults.push(default(&state.name)?); + let kind = if double_plants.contains(&state.name) { + let waterlogged = state.properties.contains_key("waterlogged"); + let mut halves = [[id; 2]; 2]; + for (half, values) in halves.iter_mut().enumerate() { + for (water, target) in values.iter_mut().enumerate() { + let mut descriptor = state.clone(); + descriptor.properties.insert( + "half".into(), + if half == 0 { "lower" } else { "upper" }.into(), + ); + if waterlogged { + descriptor.properties.insert( + "waterlogged".into(), + if water == 0 { "false" } else { "true" }.into(), + ); + } + *target = registry + .id(&descriptor) + .ok_or_else(|| invalid("missing double-plant transition"))?; + } + } + let selected = doubles.len(); + doubles.push(DoublePlant { + halves, + waterlogged, + }); + Placement::Double(selected) + } else if mossy_carpets.contains(&state.name) { + Placement::Moss + } else { + Placement::Single + }; + kinds.push(kind); + let value = if state.name == "minecraft:pale_moss_carpet" { + let bottom = match state.properties.get("bottom").map(String::as_str) { + Some("true") => true, + Some("false") => false, + _ => return Err(invalid("invalid moss bottom")), + }; + let mut sides = [0; 4]; + for (slot, name) in sides.iter_mut().zip(SIDE_NAMES) { + *slot = match state.properties.get(name).map(String::as_str) { + Some("none") => 0, + Some("low") => 1, + Some("tall") => 2, + _ => return Err(invalid("invalid moss side")), + }; + } + let value = Moss { bottom, sides }; + if moss_ids[value.code()].replace(id).is_some() { + return Err(invalid("ambiguous moss state")); + } + Some(value) + } else { + None + }; + moss.push(value); + } + let moss_ids = moss_ids + .into_iter() + .collect::<Option<Vec<_>>>() + .ok_or_else(|| invalid("incomplete moss states"))? + .try_into() + .map_err(|_| invalid("invalid moss state count"))?; + Ok(Self { + registry, + operations: Arc::new(BlockPlacement { + kinds, + doubles, + replaceable: properties.bind(BlockProperty::Replaceable), + fluids: FluidStateTable::new(registry)?, + air: [ + default("minecraft:air")?, + default("minecraft:cave_air")?, + default("minecraft:void_air")?, + ], + defaults, + moss, + moss_ids, + moss_default: default("minecraft:pale_moss_carpet")?, + }), + }) + } + pub fn registry(&self) -> &'r BlockRegistry { + self.registry + } + pub fn operations(&self) -> Arc<BlockPlacement> { + self.operations.clone() + } +} +impl BlockPlacement { + fn read<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + position: [i32; 3], + ) -> Result<BlockStateId, BlockPlacementError<W::Error>> { + let state = world.block(position).map_err(BlockPlacementError::World)?; + if state.0 as usize >= self.kinds.len() { + return Err(BlockPlacementError::Registry(invalid( + "unregistered placement world state", + ))); + } + Ok(state) + } + fn moss_state(&self, state: BlockStateId) -> Option<Moss> { + self.moss[state.0 as usize] + } + fn updated_moss<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + state: Moss, + position: [i32; 3], + force: bool, + ) -> Result<Moss, BlockPlacementError<W::Error>> { + let force = force | state.bottom; + let mut result = state; + let mut above = None; + let mut below = None; + for (index, direction) in HORIZONTAL.into_iter().enumerate() { + let mut side = if world + .attachment_at(position, direction) + .map_err(BlockPlacementError::Query)? + { + if force { 1 } else { state.sides[index] } + } else { + 0 + }; + if side == 1 { + let upper = match above { + Some(id) => id, + None => { + let id = self.read(world, relative(position, Direction::Up))?; + above = Some(id); + id + } + }; + if self + .moss_state(upper) + .is_some_and(|value| !value.bottom && value.sides[index] != 0) + { + side = 2; + } + if !state.bottom { + let lower = match below { + Some(id) => id, + None => { + let id = self.read(world, relative(position, Direction::Down))?; + below = Some(id); + id + } + }; + if self + .moss_state(lower) + .is_some_and(|value| value.sides[index] == 0) + { + side = 0; + } + } + } + result.sides[index] = side; + } + Ok(result) + } + fn topper<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + position: [i32; 3], + ) -> Result<Option<BlockStateId>, BlockPlacementError<W::Error>> { + let above = relative(position, Direction::Up); + let current = self.read(world, above)?; + if self.moss_state(current).is_some_and(|value| value.bottom) + || (self.moss_state(current).is_none() && !self.replaceable.contains(current)) + { + return Ok(None); + } + let mut state = self.moss_state(self.moss_default).unwrap(); + state.bottom = false; + state = self.updated_moss(world, state, above, true)?; + for side in &mut state.sides { + if *side != 0 + && !world + .next_world_boolean() + .map_err(BlockPlacementError::Query)? + { + *side = 0; + } + } + let id = self.moss_ids[state.code()]; + Ok((state.has_faces() && id != current).then_some(id)) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + state: BlockStateId, + position: [i32; 3], + flags: i32, + ) -> Result<bool, BlockPlacementError<W::Error>> { + let kind = *self.kinds.get(state.0 as usize).ok_or_else(|| { + BlockPlacementError::Registry(invalid("unregistered placement candidate")) + })?; + match kind { + Placement::Single => { + world + .set_block(position, state, flags) + .map_err(BlockPlacementError::World)?; + } + Placement::Double(index) => { + let above = relative(position, Direction::Up); + let current = self.read(world, above)?; + if !self.air.contains(¤t) + && (self.fluids.get(state) != self.fluids.get(current) + || !self.replaceable.contains(current)) + { + return Ok(false); + } + let plant = self.doubles[index]; + for (half, at) in [position, above].into_iter().enumerate() { + let water = plant.waterlogged + && world.water_at(at).map_err(BlockPlacementError::Query)?; + world + .set_block(at, plant.halves[half][usize::from(water)], flags) + .map_err(BlockPlacementError::World)?; + } + } + Placement::Moss => { + let lower = self.updated_moss( + world, + self.moss_state(self.moss_default).unwrap(), + position, + true, + )?; + world + .set_block(position, self.moss_ids[lower.code()], flags) + .map_err(BlockPlacementError::World)?; + if let Some(top) = self.topper(world, position)? { + world + .set_block(relative(position, Direction::Up), top, flags) + .map_err(BlockPlacementError::World)?; + let lower = self.updated_moss(world, lower, position, true)?; + world + .set_block(position, self.moss_ids[lower.code()], flags) + .map_err(BlockPlacementError::World)?; + } + } + } + Ok(true) + } + pub fn schedule_tick<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + position: [i32; 3], + delay: i32, + ) -> Result<(), BlockPlacementError<W::Error>> { + let state = self.read(world, position)?; + world + .schedule_block_tick(position, self.defaults[state.0 as usize], delay) + .map_err(BlockPlacementError::Query) + } +} +fn relative(position: [i32; 3], direction: Direction) -> [i32; 3] { + let step = direction.normal(); + std::array::from_fn(|i| position[i].wrapping_add(step[i])) +} diff --git a/crates/horizon-world/src/block_properties.rs b/crates/horizon-world/src/block_properties.rs new file mode 100644 index 000000000..2a463b9e3 --- /dev/null +++ b/crates/horizon-world/src/block_properties.rs @@ -0,0 +1,230 @@ +//! Immutable block-definition flags and legacy solidity calculated from cached +//! collision shapes. Replacement with an item/fluid context is separate behavior. +use crate::{ + DATA_VERSION, + chunk::BlockState, + collision::CachedCollisionRegistry, + compression::invalid, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, +}; +use horizon_core::geometry::{Direction, ShapeError, ShapeOp, VoxelShape}; +use std::{ + collections::{BTreeMap, HashMap}, + io, + sync::Arc, +}; + +#[derive(Clone, Copy, Debug)] +pub struct BlockDefinitionProperties { + pub force_solid_on: bool, + pub force_solid_off: bool, + pub replaceable: bool, + pub liquid: bool, + pub can_occlude: bool, +} +impl BlockDefinitionProperties { + pub fn calculate_full_occlusion_faces(self, occlusion: &VoxelShape) -> Result<u8, ShapeError> { + let mut mask = 0; + if self.can_occlude { + for direction in Direction::ALL { + if !occlusion + .face_shape(direction)? + .join_is_not_empty(&VoxelShape::block(), ShapeOp::XOR)? + { + mask |= 1 << direction as u8; + } + } + } + Ok(mask) + } + pub fn calculate_solid_render(self, occlusion: &VoxelShape) -> Result<bool, ShapeError> { + Ok(self.can_occlude && !occlusion.join_is_not_empty(&VoxelShape::block(), ShapeOp::XOR)?) + } + + /// Force-on wins even if both definition flags are set. A missing cache + /// counts as non-solid; it is distinct from a missing collision implementation. + pub fn calculate_solid(self, cached_shape: Option<&VoxelShape>) -> bool { + if self.force_solid_on { + return true; + } + if self.force_solid_off { + return false; + } + cached_shape + .and_then(VoxelShape::bounds) + .is_some_and(|bounds| { + bounds.average_size() >= 0.7291666666666666 || bounds.size().y >= 1.0 + }) + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BlockProperty { + Solid, + Replaceable, + Liquid, + SolidRender, +} +impl BlockProperty { + fn mask(self) -> u8 { + match self { + Self::Solid => 1, + Self::Replaceable => 2, + Self::Liquid => 4, + Self::SolidRender => 8, + } + } +} +/// An immutable property selection, shared by decoded block predicates. +#[derive(Clone, Debug)] +pub struct BoundBlockProperty { + states: Arc<[u8]>, + property: BlockProperty, +} +impl BoundBlockProperty { + pub fn contains(&self, id: BlockStateId) -> bool { + self.states + .get(id.0 as usize) + .is_some_and(|flags| flags & self.property.mask() != 0) + } +} + +/// Immutable FULL face-occlusion results, independent of support/collision. +#[derive(Clone, Debug)] +pub struct BoundOcclusionFaces { + states: Arc<[u8]>, +} +impl BoundOcclusionFaces { + pub fn is_full(&self, state: BlockStateId, direction: Direction) -> io::Result<bool> { + self.states + .get(state.0 as usize) + .map(|mask| mask & (1 << direction as u8) != 0) + .ok_or_else(|| invalid("unknown occlusion state ID")) + } +} + +pub struct BlockPropertiesRegistry<'r> { + registry: &'r BlockRegistry, + definitions: BTreeMap<String, BlockDefinitionProperties>, + states: Arc<[u8]>, + occlusion_faces: BoundOcclusionFaces, +} +impl<'r> BlockPropertiesRegistry<'r> { + pub fn from_nbt(tag: &Tag, collisions: &CachedCollisionRegistry<'r>) -> io::Result<Self> { + let registry = collisions.registry(); + if tag.get("DataVersion") != Some(&Tag::Int(DATA_VERSION)) { + return Err(invalid("block properties DataVersion mismatch")); + } + let Some(Tag::List(states)) = tag.get("states") else { + return Err(invalid("missing block property state identities")); + }; + if states.len() != registry.len() { + return Err(invalid("block property registry size mismatch")); + } + for (id, state) in states.iter().enumerate() { + if registry.state(BlockStateId(id as u32)) != Some(&BlockState::from_nbt(state)?) { + return Err(invalid("block property state identities differ")); + } + } + let Some(Tag::Compound(blocks)) = tag.get("blocks") else { + return Err(invalid("missing block definition properties")); + }; + let mut definitions = BTreeMap::new(); + for (name, flags) in blocks { + let name = name.to_string().map_err(|e| invalid(e.to_string()))?; + let Tag::Byte(flags @ 0..=31) = flags else { + return Err(invalid("invalid block definition flags")); + }; + if registry.default_state(&name).is_none() { + return Err(invalid("unknown block definition properties")); + } + definitions.insert( + name, + BlockDefinitionProperties { + force_solid_on: flags & 1 != 0, + force_solid_off: flags & 2 != 0, + replaceable: flags & 4 != 0, + liquid: flags & 8 != 0, + can_occlude: flags & 16 != 0, + }, + ); + } + let occlusion = CachedCollisionRegistry::from_nbt( + tag.get("occlusion") + .ok_or_else(|| invalid("missing block occlusion shapes"))?, + registry, + )?; + let mut result = Vec::with_capacity(registry.len()); + let mut faces = Vec::with_capacity(registry.len()); + let mut face_cache = HashMap::new(); + for id in 0..registry.len() { + let id = BlockStateId(id as u32); + let state = registry.state(id).unwrap(); + let properties = definitions + .get(&state.name) + .ok_or_else(|| invalid("missing block definition properties"))?; + let shape = occlusion + .cached_shape(id)? + .ok_or_else(|| invalid("missing block occlusion shape"))?; + let mask = if properties.can_occlude { + let key = std::ptr::from_ref(shape); + if let Some(mask) = face_cache.get(&key) { + *mask + } else { + let mask = properties + .calculate_full_occlusion_faces(shape) + .map_err(|e| invalid(e.to_string()))?; + face_cache.insert(key, mask); + mask + } + } else { + 0 + }; + faces.push(mask); + result.push( + u8::from(properties.calculate_solid(collisions.cached_shape(id)?)) + | (u8::from(properties.replaceable) << 1) + | (u8::from(properties.liquid) << 2) + | (u8::from( + properties + .calculate_solid_render( + occlusion + .cached_shape(id)? + .ok_or_else(|| invalid("missing block occlusion shape"))?, + ) + .map_err(|error| invalid(error.to_string()))?, + ) << 3), + ); + } + Ok(Self { + registry, + definitions, + states: result.into(), + occlusion_faces: BoundOcclusionFaces { + states: faces.into(), + }, + }) + } + pub fn bind_occlusion_faces(&self) -> BoundOcclusionFaces { + self.occlusion_faces.clone() + } + pub fn registry(&self) -> &'r BlockRegistry { + self.registry + } + pub fn definition(&self, name: &str) -> Option<BlockDefinitionProperties> { + self.definitions.get(name).copied() + } + pub fn property(&self, id: BlockStateId, property: BlockProperty) -> io::Result<bool> { + self.states + .get(id.0 as usize) + .map(|flags| flags & property.mask() != 0) + .ok_or_else(|| invalid("block property state outside registry")) + } + pub fn bind(&self, property: BlockProperty) -> BoundBlockProperty { + BoundBlockProperty { + states: Arc::clone(&self.states), + property, + } + } +} diff --git a/crates/horizon-world/src/block_render.rs b/crates/horizon-world/src/block_render.rs new file mode 100644 index 000000000..2d3932c81 --- /dev/null +++ b/crates/horizon-world/src/block_render.rs @@ -0,0 +1,218 @@ +//! Neighbor face visibility over immutable block definitions and occlusion grids. +//! This decides whether a culled model face is emitted; it does not shade it or +//! implement translucent sorting, fluid meshing, or block updates. +use crate::{ + collision::CachedCollisionRegistry, + compression::invalid, + fluid::{FluidKind, FluidState}, + registry::BlockStateId, +}; +use horizon_core::geometry::{Direction, ShapeOp, VoxelShape}; +use std::{ + collections::{BTreeMap, HashMap}, + io, +}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SkipRendering { + Never, + SameBlock, + Bars, + Leaves, + Liquid, + MangroveRoots, +} +#[derive(Clone, Copy, Debug)] +pub struct RenderDefinition { + pub skip: SkipRendering, + pub can_occlude: bool, + pub bars_tag: bool, +} +#[derive(Clone, Copy)] +struct State { + block: BlockStateId, + faces: [u32; 6], + definition: RenderDefinition, + connections: u8, + connection_properties: u8, + fluid: FluidKind, +} +/// Prepared face geometry and a bounded cache shared across state pairs. Geometry +/// is deduplicated by the imported immutable shape, not copied for every state. +#[derive(Clone)] +pub struct FaceVisibility { + states: Vec<State>, + faces: Vec<VoxelShape>, + cache: HashMap<(u32, u32), bool>, +} +impl FaceVisibility { + pub fn new( + occlusion: &CachedCollisionRegistry<'_>, + definitions: &BTreeMap<String, RenderDefinition>, + ) -> io::Result<Self> { + let registry = occlusion.registry(); + let mut states = Vec::with_capacity(registry.len()); + // IDs 0 and 1 represent the canonical empty/full face singletons used + // by BlockState.initCache; other empty-like shapes retain their identity. + let mut faces = vec![VoxelShape::empty(), VoxelShape::block()]; + let mut shape_faces = HashMap::new(); + for id in 0..registry.len() { + let id = BlockStateId(id as u32); + let state = registry + .state(id) + .ok_or_else(|| invalid("unknown render state"))?; + let definition = *definitions + .get(&state.name) + .ok_or_else(|| invalid("missing render definition"))?; + let shape = occlusion + .cached_shape(id)? + .ok_or_else(|| invalid("missing occlusion geometry"))?; + let face_ids = if !definition.can_occlude || shape.is_empty() { + [0; 6] + } else if let Some(ids) = shape_faces.get(&std::ptr::from_ref(shape)) { + *ids + } else { + let mut ids = [1; 6]; + if shape + .join_is_not_empty(&faces[1], ShapeOp::XOR) + .map_err(|e| invalid(e.to_string()))? + { + for direction in Direction::ALL { + let face = shape + .face_shape(direction) + .map_err(|e| invalid(e.to_string()))?; + ids[direction as usize] = if face.same_identity(&faces[0]) { + 0 + } else if face.same_identity(&faces[1]) { + 1 + } else { + let id = faces.len() as u32; + faces.push(face); + id + }; + } + } + shape_faces.insert(std::ptr::from_ref(shape), ids); + ids + }; + let mut connections = 0; + let mut connection_properties = 0; + for (name, direction) in [ + ("north", Direction::North), + ("south", Direction::South), + ("west", Direction::West), + ("east", Direction::East), + ] { + if let Some(value @ ("false" | "true")) = + state.properties.get(name).map(String::as_str) + { + connection_properties |= 1 << direction as u8; + if value == "true" { + connections |= 1 << direction as u8; + } + } + } + if definition.skip == SkipRendering::Bars && connection_properties != 0b111100 { + return Err(invalid("bars rendering requires four boolean connections")); + } + states.push(State { + block: registry + .default_state(&state.name) + .ok_or_else(|| invalid("missing render block identity"))?, + faces: face_ids, + definition, + connections, + connection_properties, + fluid: FluidState::from_block(state)?.kind(), + }); + } + Ok(Self { + states, + faces, + cache: HashMap::new(), + }) + } + fn state(&self, id: BlockStateId) -> io::Result<State> { + self.states + .get(id.0 as usize) + .copied() + .ok_or_else(|| invalid("unknown render state ID")) + } + fn skips(a: State, b: State, direction: Direction, cutout_leaves: bool) -> bool { + let vertical = matches!(direction, Direction::Down | Direction::Up); + let bit = 1 << direction as u8; + let opposite = 1 << direction.opposite() as u8; + match a.definition.skip { + SkipRendering::Never => false, + SkipRendering::SameBlock => a.block == b.block, + SkipRendering::Leaves => !cutout_leaves && b.definition.skip == SkipRendering::Leaves, + SkipRendering::Liquid => a.fluid.same_family(b.fluid), + SkipRendering::MangroveRoots => a.block == b.block && vertical, + SkipRendering::Bars => { + (a.block == b.block + || (a.definition.bars_tag + && b.definition.bars_tag + && b.connection_properties & opposite != 0)) + && (vertical || (a.connections & bit != 0 && b.connections & opposite != 0)) + } + } + } + /// Whether the state's occlusion face toward `direction` is the full square. + pub fn full_face(&self, state: BlockStateId, direction: Direction) -> bool { + self.states + .get(state.0 as usize) + .is_some_and(|s| s.faces[direction as usize] == 1) + } + /// Whether the state's occlusion face toward `direction` is empty. + pub fn empty_face(&self, state: BlockStateId, direction: Direction) -> bool { + self.states + .get(state.0 as usize) + .is_none_or(|s| s.faces[direction as usize] == 0) + } + pub fn skip_rendering( + &self, + state: BlockStateId, + neighbor: BlockStateId, + direction: Direction, + cutout_leaves: bool, + ) -> io::Result<bool> { + Ok(Self::skips( + self.state(state)?, + self.state(neighbor)?, + direction, + cutout_leaves, + )) + } + pub fn should_render_face( + &mut self, + state: BlockStateId, + neighbor: BlockStateId, + direction: Direction, + cutout_leaves: bool, + ) -> io::Result<bool> { + let a = self.state(state)?; + let b = self.state(neighbor)?; + let neighbor_face = b.faces[direction.opposite() as usize]; + if neighbor_face == 1 || Self::skips(a, b, direction, cutout_leaves) { + return Ok(false); + } + let own_face = a.faces[direction as usize]; + if neighbor_face == 0 || own_face == 0 { + return Ok(true); + } + let key = (own_face, neighbor_face); + if let Some(value) = self.cache.get(&key) { + return Ok(*value); + } + let visible = self.faces[own_face as usize] + .join_is_not_empty(&self.faces[neighbor_face as usize], ShapeOp::ONLY_FIRST) + .map_err(|e| invalid(e.to_string()))?; + // Cache policy affects speed only. Keep bounded memory while retaining + // more shared face pairs than the native 256-entry per-thread cache. + if self.cache.len() == 4096 { + self.cache.clear(); + } + self.cache.insert(key, visible); + Ok(visible) + } +} diff --git a/crates/horizon-world/src/block_support.rs b/crates/horizon-world/src/block_support.rs new file mode 100644 index 000000000..2c7a9aecc --- /dev/null +++ b/crates/horizon-world/src/block_support.rs @@ -0,0 +1,221 @@ +//! Native support tests over an already-selected block support shape. Selecting +//! that shape from block/world/entity behavior is the caller's responsibility. +use horizon_core::geometry::{Aabb, Direction, ShapeError, ShapeOp, Vec3, VoxelShape}; +use std::sync::OnceLock; +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SupportType { + Full, + Center, + Rigid, +} +impl SupportType { + pub fn is_supporting( + self, + shape: &VoxelShape, + direction: Direction, + ) -> Result<bool, ShapeError> { + let face = shape.face_shape(direction)?; + let (required, operation) = match self { + Self::Full => (VoxelShape::block(), ShapeOp::XOR), + Self::Center => { + static CENTER: OnceLock<VoxelShape> = OnceLock::new(); + ( + CENTER + .get_or_init(|| { + VoxelShape::from_box(Aabb::new( + Vec3::new(0.4375, 0.0, 0.4375), + Vec3::new(0.5625, 0.625, 0.5625), + )) + .expect("valid support shape") + }) + .clone(), + ShapeOp::ONLY_SECOND, + ) + } + Self::Rigid => { + static RIGID: OnceLock<VoxelShape> = OnceLock::new(); + ( + RIGID + .get_or_init(|| { + VoxelShape::block() + .join( + &VoxelShape::from_box(Aabb::new( + Vec3::new(0.125, 0.0, 0.125), + Vec3::new(0.875, 1.0, 0.875), + )) + .expect("valid support inset"), + ShapeOp::ONLY_FIRST, + ) + .expect("valid support ring") + }) + .clone(), + ShapeOp::ONLY_SECOND, + ) + } + }; + Ok(!face.join_is_not_empty(&required, operation)?) + } +} + +use crate::{ + collision::CachedCollisionRegistry, + compression::invalid, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, +}; +use std::{collections::HashMap, io}; +/// Cached branch of BlockState.isFaceSturdy. Dynamic support-shape selection +/// stays explicit as None, even when a context-free approximation looks obvious. +pub struct CachedBlockSupportRegistry<'r> { + shapes: CachedCollisionRegistry<'r>, + states: Vec<Option<[u8; 3]>>, +} +impl<'r> CachedBlockSupportRegistry<'r> { + pub fn from_nbt(tag: &Tag, registry: &'r BlockRegistry) -> io::Result<Self> { + if tag.get("Kind") != Some(&Tag::String("block_support".into())) { + return Err(invalid("wrong cached support data kind")); + } + let shapes = CachedCollisionRegistry::from_nbt(tag, registry)?; + let mut cache = HashMap::new(); + let mut states = Vec::with_capacity(registry.len()); + for id in 0..registry.len() { + let Some(shape) = shapes.cached_shape(BlockStateId(id as u32))? else { + states.push(None); + continue; + }; + let identity = std::ptr::from_ref(shape); + let flags = if let Some(flags) = cache.get(&identity) { + *flags + } else { + let mut flags = [0; 3]; + for (i, support) in [SupportType::Full, SupportType::Center, SupportType::Rigid] + .into_iter() + .enumerate() + { + for direction in Direction::ALL { + if support + .is_supporting(shape, direction) + .map_err(|e| invalid(e.to_string()))? + { + flags[i] |= 1 << direction as u8; + } + } + } + cache.insert(identity, flags); + flags + }; + states.push(Some(flags)); + } + Ok(Self { shapes, states }) + } + pub fn registry(&self) -> &'r BlockRegistry { + self.shapes.registry() + } + pub fn cached_state_count(&self) -> usize { + self.shapes.cached_state_count() + } + pub fn cached_shape(&self, state: BlockStateId) -> io::Result<Option<&VoxelShape>> { + self.shapes.cached_shape(state) + } + pub fn is_face_sturdy( + &self, + state: BlockStateId, + direction: Direction, + support: SupportType, + ) -> io::Result<Option<bool>> { + let flags = self + .states + .get(state.0 as usize) + .ok_or_else(|| invalid("support state outside registry"))?; + Ok(flags.map(|flags| { + flags[match support { + SupportType::Full => 0, + SupportType::Center => 1, + SupportType::Rigid => 2, + }] & (1 << direction as u8) + != 0 + })) + } +} + +use crate::dynamic_support::{DynamicSupport, DynamicSupportError, DynamicSupportWorld}; +/// Unified cached/dynamic support dispatch. Block-entity queries remain owned by +/// the world, including the moving-piston entity's collision calculation. +pub struct BlockSupportRegistry<'r> { + cached: CachedBlockSupportRegistry<'r>, + dynamic: HashMap<BlockStateId, DynamicSupport>, +} +#[derive(Debug)] +pub enum SupportQueryError<E> { + Data(io::Error), + Dynamic(DynamicSupportError<E>), + Unsupported(BlockStateId), +} +impl<E: std::fmt::Display> std::fmt::Display for SupportQueryError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Data(e) => e.fmt(f), + Self::Dynamic(e) => e.fmt(f), + Self::Unsupported(state) => write!(f, "unsupported block support state {}", state.0), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for SupportQueryError<E> {} +impl<'r> BlockSupportRegistry<'r> { + pub fn from_nbt(tag: &Tag, registry: &'r BlockRegistry) -> io::Result<Self> { + let cached = CachedBlockSupportRegistry::from_nbt(tag, registry)?; + let mut dynamic = HashMap::new(); + for id in 0..registry.len() { + let id = BlockStateId(id as u32); + if cached.cached_shape(id)?.is_none() { + if let Some(behavior) = DynamicSupport::from_state(registry.state(id).unwrap())? { + dynamic.insert(id, behavior); + } + } + } + Ok(Self { cached, dynamic }) + } + pub fn registry(&self) -> &'r BlockRegistry { + self.cached.registry() + } + pub fn support_shape<W: DynamicSupportWorld>( + &self, + world: &mut W, + state: BlockStateId, + position: [i32; 3], + ) -> Result<VoxelShape, SupportQueryError<W::Error>> { + if let Some(shape) = self + .cached + .cached_shape(state) + .map_err(SupportQueryError::Data)? + { + return Ok(shape.clone()); + } + self.dynamic + .get(&state) + .ok_or(SupportQueryError::Unsupported(state))? + .shape(world, position) + .map_err(SupportQueryError::Dynamic) + } + pub fn is_face_sturdy<W: DynamicSupportWorld>( + &self, + world: &mut W, + state: BlockStateId, + position: [i32; 3], + direction: Direction, + support: SupportType, + ) -> Result<bool, SupportQueryError<W::Error>> { + if let Some(result) = self + .cached + .is_face_sturdy(state, direction, support) + .map_err(SupportQueryError::Data)? + { + return Ok(result); + } + self.dynamic + .get(&state) + .ok_or(SupportQueryError::Unsupported(state))? + .is_face_sturdy(world, position, direction, support) + .map_err(SupportQueryError::Dynamic) + } +} diff --git a/crates/horizon-world/src/block_survival.rs b/crates/horizon-world/src/block_survival.rs new file mode 100644 index 000000000..bb21f46df --- /dev/null +++ b/crates/horizon-world/src/block_survival.rs @@ -0,0 +1,1228 @@ +//! Initial block-survival rules over version-bound definitions and world queries. +//! Unsupported definitions remain explicit; survival is not inferred from shape. +use crate::{ + block_collision::{BlockCollisionRegistry, CollisionQueryError, DynamicCollisionWorld}, + block_properties::{BlockPropertiesRegistry, BlockProperty, BoundBlockProperty}, + block_support::{BlockSupportRegistry, SupportQueryError, SupportType}, + compression::invalid, + fluid::{FluidKind, FluidState}, + registry::{BlockRegistry, BlockStateId}, +}; +use horizon_core::geometry::Direction; +use std::{ + collections::{BTreeMap, BTreeSet}, + io, + sync::Arc, +}; +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum SurvivalRule { + Fire, + Cactus, + Path, + Mushroom, + Multiface, + Vine, + HangingMoss, + SnowLayer, + SeaPickle, + Bell, + GrowingPlant, + MangrovePropagule, + Speleothem, + Scaffolding, + PistonHead, + ChorusPlant, + ChorusFlower, + PitcherCrop, + SugarCane, + LilyPad, + Frogspawn, + SporeBlossom, + SmallDripleaf, + TallSeagrass, + BigDripleaf, + BigDripleafStem, + Farmland, + Cocoa, + Crop, + DoublePlant, + Door, + TagBelow(String), + CactusFlower, + Seagrass, + BubbleColumn, + RedstoneWire, + Always, + SolidBelow, + SolidBehind, + NonAirBelow, + MossCarpet, + CenterBelow, + Lantern, + FullAbove, + FullBehind, + RigidOrCenterBelow, + RigidBelow, + FullBelow, + CenterAbove, + FaceAttached, + SupportsBamboo, +} +/// Version-specific definition inputs, independent of evaluated survival results. +#[derive(Clone, Debug, Default)] +pub struct SurvivalDefinitions { + pub rules: BTreeMap<String, SurvivalRule>, + pub ignition_odds: BTreeMap<String, i32>, + pub fence_gates: BTreeSet<String>, +} +#[derive(Clone, Copy)] +enum Rule { + Fire, + Cactus, + Path, + Mushroom, + Multiface(u8), + Vine(u8), + HangingMoss, + SnowLayer, + SeaPickle, + GrowingPlant { + head: BlockStateId, + body: BlockStateId, + direction: Direction, + kelp: bool, + }, + MangrovePropagule(bool), + Speleothem(Direction), + Scaffolding, + PistonHead { + direction: Direction, + sticky: bool, + }, + ChorusPlant, + ChorusFlower, + PitcherCrop(bool), + SugarCane, + LilyPad, + Frogspawn, + SporeBlossom, + SmallDripleaf(bool), + TallSeagrass(bool), + BigDripleaf, + BigDripleafStem, + Farmland, + Cocoa(Direction), + Crop, + DoublePlant(bool), + Door(bool), + TagBelow(usize), + CactusFlower, + Seagrass, + BubbleColumn, + RedstoneWire, + Always, + Solid(Direction), + NonAirBelow, + MossCarpet(bool), + Support { + face: Direction, + kind: SupportType, + center_restriction: bool, + }, + RigidOrCenterBelow, + SupportsBamboo, +} +pub trait SurvivalWorld: DynamicCollisionWorld { + fn fluid_state(&mut self, position: [i32; 3]) -> Result<FluidState, Self::Error>; + fn raw_brightness(&mut self, position: [i32; 3], sky_darken: i32) -> Result<i32, Self::Error>; + fn block_state(&mut self, position: [i32; 3]) -> Result<BlockStateId, Self::Error>; +} +#[derive(Debug)] +pub enum SurvivalError<E> { + World(E), + Support(SupportQueryError<E>), + Collision(CollisionQueryError<E>), + Registry(io::Error), + Unsupported(BlockStateId), +} +impl<E: std::fmt::Display> std::fmt::Display for SurvivalError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Support(e) => e.fmt(f), + Self::Collision(e) => e.fmt(f), + Self::Registry(e) => e.fmt(f), + Self::Unsupported(id) => write!(f, "unsupported block survival state {}", id.0), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for SurvivalError<E> {} +pub struct BlockSurvivalRegistry<'r> { + registry: &'r BlockRegistry, + support: Arc<BlockSupportRegistry<'r>>, + collision: Arc<BlockCollisionRegistry<'r>>, + solid: BoundBlockProperty, + liquid: BoundBlockProperty, + solid_render: BoundBlockProperty, + flammable: BTreeSet<BlockStateId>, + fence_gates: BTreeSet<BlockStateId>, + cactus_support: BTreeSet<BlockStateId>, + mushroom_light_override: BTreeSet<BlockStateId>, + rules: Vec<Option<Rule>>, + unstable_bottom_center: BTreeSet<BlockStateId>, + supports_bamboo: BTreeSet<BlockStateId>, + bound_tags: Vec<BTreeSet<BlockStateId>>, + cactus_flower: BTreeSet<BlockStateId>, + no_seagrass: BTreeSet<BlockStateId>, + vegetation: BTreeSet<BlockStateId>, + dripleaf: BTreeSet<BlockStateId>, + maintains_farmland: BTreeSet<BlockStateId>, + cocoa: BTreeSet<BlockStateId>, + crops: BTreeSet<BlockStateId>, + no_snow: BTreeSet<BlockStateId>, + snow_override: BTreeSet<BlockStateId>, + mangrove: BTreeSet<BlockStateId>, + hanging_mangrove: BTreeSet<BlockStateId>, + no_kelp: BTreeSet<BlockStateId>, + chorus_plant: BTreeSet<BlockStateId>, + chorus_flower: BTreeSet<BlockStateId>, + lily_pad: BTreeSet<BlockStateId>, + frogspawn: BTreeSet<BlockStateId>, + small_dripleaf: BTreeSet<BlockStateId>, + sugar_cane: BTreeSet<BlockStateId>, + sugar_cane_adjacent: BTreeSet<BlockStateId>, + fluid_tags: [u8; 5], + bubble_up: BTreeSet<BlockStateId>, + bubble_down: BTreeSet<BlockStateId>, +} +impl<'r> BlockSurvivalRegistry<'r> { + pub fn new( + registry: &'r BlockRegistry, + properties: &BlockPropertiesRegistry<'r>, + support: Arc<BlockSupportRegistry<'r>>, + collision: Arc<BlockCollisionRegistry<'r>>, + definitions: &SurvivalDefinitions, + tags: &BTreeMap<String, Vec<String>>, + fluid_tags: &BTreeMap<String, Vec<String>>, + ) -> io::Result<Self> { + if !std::ptr::eq(registry, properties.registry()) + || !std::ptr::eq(registry, support.registry()) + || !std::ptr::eq(registry, collision.registry()) + { + return Err(invalid("survival inputs use different registries")); + } + for name in definitions + .rules + .keys() + .chain(definitions.ignition_odds.keys()) + .chain(definitions.fence_gates.iter()) + { + if registry.default_state(name).is_none() { + return Err(invalid("unknown block survival definition")); + } + } + let mut rules = Vec::with_capacity(registry.len()); + let mut tag_names = Vec::<String>::new(); + let mut tag_indices = BTreeMap::<String, usize>::new(); + for id in 0..registry.len() { + let state = registry.state(BlockStateId(id as u32)).unwrap(); + let Some(rule) = definitions.rules.get(&state.name) else { + rules.push(None); + continue; + }; + let property = |name: &str| { + state + .properties + .get(name) + .map(String::as_str) + .ok_or_else(|| invalid("missing survival property")) + }; + let facing = || -> io::Result<Direction> { + match property("facing")? { + "down" => Ok(Direction::Down), + "up" => Ok(Direction::Up), + "north" => Ok(Direction::North), + "south" => Ok(Direction::South), + "west" => Ok(Direction::West), + "east" => Ok(Direction::East), + _ => Err(invalid("invalid survival facing")), + } + }; + let boolean = |name: &str| -> io::Result<bool> { + match property(name)? { + "true" => Ok(true), + "false" => Ok(false), + _ => Err(invalid("invalid survival boolean")), + } + }; + let upper_half = || -> io::Result<bool> { + match property("half")? { + "upper" => Ok(true), + "lower" => Ok(false), + _ => Err(invalid("invalid survival half")), + } + }; + let full = |face| Rule::Support { + face, + kind: SupportType::Full, + center_restriction: false, + }; + let faces = || -> io::Result<u8> { + let mut mask = 0; + for direction in Direction::ALL { + if state.properties.contains_key(direction_name(direction)) + && boolean(direction_name(direction))? + { + mask |= 1 << direction as u8; + } + } + Ok(mask) + }; + rules.push(Some(match rule { + SurvivalRule::Fire => Rule::Fire, + SurvivalRule::Cactus => Rule::Cactus, + SurvivalRule::Path => Rule::Path, + SurvivalRule::Mushroom => Rule::Mushroom, + SurvivalRule::Multiface => Rule::Multiface(faces()?), + SurvivalRule::Vine => Rule::Vine(faces()?), + SurvivalRule::HangingMoss => Rule::HangingMoss, + SurvivalRule::SnowLayer => Rule::SnowLayer, + SurvivalRule::SeaPickle => Rule::SeaPickle, + SurvivalRule::Bell => { + let (face, kind, center_restriction) = match property("attachment")? { + "floor" => (Direction::Up, SupportType::Full, false), + "ceiling" => (Direction::Down, SupportType::Center, true), + "single_wall" | "double_wall" => { + (facing()?.opposite(), SupportType::Full, false) + } + _ => return Err(invalid("invalid bell attachment")), + }; + Rule::Support { + face, + kind, + center_restriction, + } + } + SurvivalRule::GrowingPlant => { + let (head, body, direction, kelp) = match state.name.as_str() { + "minecraft:kelp" | "minecraft:kelp_plant" => ( + "minecraft:kelp", + "minecraft:kelp_plant", + Direction::Up, + true, + ), + "minecraft:cave_vines" | "minecraft:cave_vines_plant" => ( + "minecraft:cave_vines", + "minecraft:cave_vines_plant", + Direction::Down, + false, + ), + "minecraft:twisting_vines" | "minecraft:twisting_vines_plant" => ( + "minecraft:twisting_vines", + "minecraft:twisting_vines_plant", + Direction::Up, + false, + ), + "minecraft:weeping_vines" | "minecraft:weeping_vines_plant" => ( + "minecraft:weeping_vines", + "minecraft:weeping_vines_plant", + Direction::Down, + false, + ), + _ => return Err(invalid("unknown growing plant family")), + }; + Rule::GrowingPlant { + head: registry + .default_state(head) + .ok_or_else(|| invalid("missing growing plant head"))?, + body: registry + .default_state(body) + .ok_or_else(|| invalid("missing growing plant body"))?, + direction, + kelp, + } + } + SurvivalRule::MangrovePropagule => Rule::MangrovePropagule(boolean("hanging")?), + SurvivalRule::Speleothem => { + Rule::Speleothem(match property("vertical_direction")? { + "up" => Direction::Up, + "down" => Direction::Down, + _ => return Err(invalid("invalid speleothem direction")), + }) + } + SurvivalRule::Scaffolding => Rule::Scaffolding, + SurvivalRule::PistonHead => Rule::PistonHead { + direction: facing()?, + sticky: match property("type")? { + "normal" => false, + "sticky" => true, + _ => return Err(invalid("invalid piston head type")), + }, + }, + SurvivalRule::ChorusPlant => Rule::ChorusPlant, + SurvivalRule::ChorusFlower => Rule::ChorusFlower, + SurvivalRule::PitcherCrop => Rule::PitcherCrop(upper_half()?), + SurvivalRule::SugarCane => Rule::SugarCane, + SurvivalRule::LilyPad => Rule::LilyPad, + SurvivalRule::Frogspawn => Rule::Frogspawn, + SurvivalRule::SporeBlossom => Rule::SporeBlossom, + SurvivalRule::SmallDripleaf => Rule::SmallDripleaf(upper_half()?), + SurvivalRule::TallSeagrass => Rule::TallSeagrass(upper_half()?), + SurvivalRule::BigDripleaf => Rule::BigDripleaf, + SurvivalRule::BigDripleafStem => Rule::BigDripleafStem, + SurvivalRule::Farmland => Rule::Farmland, + SurvivalRule::Cocoa => Rule::Cocoa(facing()?), + SurvivalRule::Crop => Rule::Crop, + SurvivalRule::DoublePlant => Rule::DoublePlant(upper_half()?), + SurvivalRule::Door => Rule::Door(upper_half()?), + SurvivalRule::TagBelow(name) => { + Rule::TagBelow(*tag_indices.entry(name.clone()).or_insert_with(|| { + let index = tag_names.len(); + tag_names.push(name.clone()); + index + })) + } + SurvivalRule::CactusFlower => Rule::CactusFlower, + SurvivalRule::Seagrass => Rule::Seagrass, + SurvivalRule::BubbleColumn => Rule::BubbleColumn, + SurvivalRule::RedstoneWire => Rule::RedstoneWire, + SurvivalRule::Always => Rule::Always, + SurvivalRule::SolidBelow => Rule::Solid(Direction::Down), + SurvivalRule::SolidBehind => Rule::Solid(facing()?.opposite()), + SurvivalRule::NonAirBelow => Rule::NonAirBelow, + SurvivalRule::MossCarpet => Rule::MossCarpet(boolean("bottom")?), + SurvivalRule::CenterBelow => Rule::Support { + face: Direction::Up, + kind: SupportType::Center, + center_restriction: true, + }, + SurvivalRule::Lantern => Rule::Support { + face: if boolean("hanging")? { + Direction::Down + } else { + Direction::Up + }, + kind: SupportType::Center, + center_restriction: true, + }, + SurvivalRule::FullAbove => full(Direction::Down), + SurvivalRule::FullBehind => full(facing()?), + SurvivalRule::RigidOrCenterBelow => Rule::RigidOrCenterBelow, + SurvivalRule::RigidBelow => Rule::Support { + face: Direction::Up, + kind: SupportType::Rigid, + center_restriction: false, + }, + SurvivalRule::FullBelow => full(Direction::Up), + SurvivalRule::CenterAbove => Rule::Support { + face: Direction::Down, + kind: SupportType::Center, + center_restriction: false, + }, + SurvivalRule::FaceAttached => full(match property("face")? { + "floor" => Direction::Up, + "ceiling" => Direction::Down, + "wall" => facing()?, + _ => return Err(invalid("invalid attachment face")), + }), + SurvivalRule::SupportsBamboo => Rule::SupportsBamboo, + })); + } + let tag_states = |name: &str| -> io::Result<BTreeSet<BlockStateId>> { + let names = tags + .get(name) + .into_iter() + .flatten() + .collect::<BTreeSet<_>>(); + for name in &names { + if registry.default_state(name).is_none() { + return Err(invalid("unknown survival tag member")); + } + } + Ok((0..registry.len()) + .map(|i| BlockStateId(i as u32)) + .filter(|id| names.contains(®istry.state(*id).unwrap().name)) + .collect()) + }; + let fluid_tag = |name: &str| -> io::Result<u8> { + fluid_tags + .get(name) + .into_iter() + .flatten() + .try_fold(0, |mask, name| { + Ok(mask + | FluidKind::from_name(name) + .ok_or_else(|| invalid("unknown survival fluid tag member"))? + .mask()) + }) + }; + Ok(Self { + registry, + support, + collision, + solid: properties.bind(BlockProperty::Solid), + liquid: properties.bind(BlockProperty::Liquid), + solid_render: properties.bind(BlockProperty::SolidRender), + flammable: (0..registry.len()) + .map(|i| BlockStateId(i as u32)) + .filter(|id| { + let state = registry.state(*id).unwrap(); + definitions + .ignition_odds + .get(&state.name) + .is_some_and(|value| *value > 0) + && !state + .properties + .get("waterlogged") + .is_some_and(|value| value == "true") + }) + .collect(), + fence_gates: (0..registry.len()) + .map(|i| BlockStateId(i as u32)) + .filter(|id| { + definitions + .fence_gates + .contains(®istry.state(*id).unwrap().name) + }) + .collect(), + cactus_support: tag_states("minecraft:supports_cactus")?, + mushroom_light_override: tag_states("minecraft:overrides_mushroom_light_requirement")?, + rules, + unstable_bottom_center: tag_states("minecraft:unstable_bottom_center")?, + supports_bamboo: tag_states("minecraft:supports_bamboo")?, + bound_tags: tag_names + .iter() + .map(|name| tag_states(name)) + .collect::<io::Result<_>>()?, + cactus_flower: tag_states("minecraft:support_override_cactus_flower")?, + no_seagrass: tag_states("minecraft:cannot_support_seagrass")?, + vegetation: tag_states("minecraft:supports_vegetation")?, + dripleaf: tag_states("minecraft:supports_big_dripleaf")?, + maintains_farmland: tag_states("minecraft:maintains_farmland")?, + cocoa: tag_states("minecraft:supports_cocoa")?, + crops: tag_states("minecraft:supports_crops")?, + no_snow: tag_states("minecraft:cannot_support_snow_layer")?, + snow_override: tag_states("minecraft:support_override_snow_layer")?, + mangrove: tag_states("minecraft:supports_mangrove_propagule")?, + hanging_mangrove: tag_states("minecraft:supports_hanging_mangrove_propagule")?, + no_kelp: tag_states("minecraft:cannot_support_kelp")?, + chorus_plant: tag_states("minecraft:supports_chorus_plant")?, + chorus_flower: tag_states("minecraft:supports_chorus_flower")?, + lily_pad: tag_states("minecraft:supports_lily_pad")?, + frogspawn: tag_states("minecraft:supports_frogspawn")?, + small_dripleaf: tag_states("minecraft:supports_small_dripleaf")?, + sugar_cane: tag_states("minecraft:supports_sugar_cane")?, + sugar_cane_adjacent: tag_states("minecraft:supports_sugar_cane_adjacently")?, + fluid_tags: [ + fluid_tag("minecraft:water")?, + fluid_tag("minecraft:supports_lily_pad")?, + fluid_tag("minecraft:supports_frogspawn")?, + fluid_tag("minecraft:supports_sugar_cane_adjacently")?, + fluid_tag("minecraft:lava")?, + ], + bubble_up: tag_states("minecraft:enables_bubble_column_push_up")?, + bubble_down: tag_states("minecraft:enables_bubble_column_drag_down")?, + }) + } + pub fn supported_states(&self) -> usize { + self.rules.iter().filter(|r| r.is_some()).count() + } + pub fn supports_state(&self, state: BlockStateId) -> bool { + self.rules + .get(state.0 as usize) + .is_some_and(Option::is_some) + } + fn read<W: SurvivalWorld>( + &self, + world: &mut W, + position: [i32; 3], + ) -> Result<BlockStateId, SurvivalError<W::Error>> { + let state = world.block_state(position).map_err(SurvivalError::World)?; + if self.registry.state(state).is_none() { + return Err(SurvivalError::Registry(invalid( + "world survival state outside registry", + ))); + } + Ok(state) + } + fn support<W: SurvivalWorld>( + &self, + world: &mut W, + position: [i32; 3], + face: Direction, + kind: SupportType, + center_restriction: bool, + ) -> Result<bool, SurvivalError<W::Error>> { + let state = self.read(world, position)?; + if center_restriction + && face == Direction::Down + && self.unstable_bottom_center.contains(&state) + { + return Ok(false); + } + self.support + .is_face_sturdy(world, state, position, face, kind) + .map_err(SurvivalError::Support) + } + fn is_air(&self, state: BlockStateId) -> bool { + matches!( + self.registry.state(state).unwrap().name.as_str(), + "minecraft:air" | "minecraft:cave_air" | "minecraft:void_air" + ) + } + fn face_property(&self, state: BlockStateId, direction: Direction) -> bool { + self.registry + .state(state) + .unwrap() + .properties + .get(direction_name(direction)) + .is_some_and(|value| value == "true") + } + /// Native multiface attachment at a candidate position, testing support + /// first and then empty-context collision on the neighbor's opposite face. + pub fn can_attach_to<W: SurvivalWorld>( + &self, + world: &mut W, + position: [i32; 3], + direction: Direction, + ) -> Result<bool, SurvivalError<W::Error>> { + let step = direction.normal(); + let at = std::array::from_fn(|i| position[i].wrapping_add(step[i])); + let neighbor = self.read(world, at)?; + self.can_attach(world, neighbor, at, direction) + } + fn can_attach<W: SurvivalWorld>( + &self, + world: &mut W, + neighbor: BlockStateId, + at: [i32; 3], + direction: Direction, + ) -> Result<bool, SurvivalError<W::Error>> { + let face = direction.opposite(); + if self + .support + .is_face_sturdy(world, neighbor, at, face, SupportType::Full) + .map_err(SurvivalError::Support)? + { + return Ok(true); + } + let shape = self + .collision + .collision_shape(world, neighbor, at) + .map_err(SurvivalError::Collision)?; + SupportType::Full + .is_supporting(&shape, face) + .map_err(|error| SurvivalError::Registry(invalid(error.to_string()))) + } + fn is_named(&self, state: BlockStateId, name: &str) -> bool { + self.registry.state(state).unwrap().name == name + } + fn same_block(&self, first: BlockStateId, second: BlockStateId) -> bool { + self.registry.state(first).unwrap().name == self.registry.state(second).unwrap().name + } + fn scaffold_distance(&self, state: BlockStateId) -> io::Result<Option<i32>> { + if !self.is_named(state, "minecraft:scaffolding") { + return Ok(None); + } + self.registry + .state(state) + .unwrap() + .properties + .get("distance") + .and_then(|v| v.parse::<i32>().ok()) + .filter(|v| (0..=7).contains(v)) + .map(Some) + .ok_or_else(|| invalid("invalid scaffolding distance")) + } + fn is_lower_half(&self, below: BlockStateId, candidate: BlockStateId) -> bool { + let neighbor = self.registry.state(below).unwrap(); + neighbor.name == self.registry.state(candidate).unwrap().name + && neighbor + .properties + .get("half") + .is_some_and(|v| v == "lower") + } + fn fluid_matches(&self, tag: usize, fluid: FluidState) -> bool { + self.fluid_tags[tag] & fluid.kind().mask() != 0 + } + pub fn can_survive<W: SurvivalWorld>( + &self, + world: &mut W, + state: BlockStateId, + position: [i32; 3], + ) -> Result<bool, SurvivalError<W::Error>> { + let rule = self + .rules + .get(state.0 as usize) + .ok_or_else(|| SurvivalError::Registry(invalid("survival candidate outside registry")))? + .ok_or(SurvivalError::Unsupported(state))?; + match rule { + Rule::Fire => { + let below = relative(position, Direction::Down); + let neighbor = self.read(world, below)?; + if self + .support + .is_face_sturdy(world, neighbor, below, Direction::Up, SupportType::Full) + .map_err(SurvivalError::Support)? + { + return Ok(true); + } + for direction in Direction::ALL { + let neighbor = self.read(world, relative(position, direction))?; + if self.flammable.contains(&neighbor) { + return Ok(true); + } + } + Ok(false) + } + Rule::Cactus => { + for direction in [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, + ] { + let at = relative(position, direction); + let neighbor = self.read(world, at)?; + if self.solid.contains(neighbor) + || self + .fluid_matches(4, world.fluid_state(at).map_err(SurvivalError::World)?) + { + return Ok(false); + } + } + let neighbor = self.read(world, relative(position, Direction::Down))?; + if !self.same_block(neighbor, state) && !self.cactus_support.contains(&neighbor) { + return Ok(false); + } + let above = self.read(world, relative(position, Direction::Up))?; + Ok(!self.liquid.contains(above)) + } + Rule::Path => { + let above = self.read(world, relative(position, Direction::Up))?; + Ok(!self.solid.contains(above) || self.fence_gates.contains(&above)) + } + Rule::Mushroom => { + let below = self.read(world, relative(position, Direction::Down))?; + if self.mushroom_light_override.contains(&below) { + return Ok(true); + } + Ok(world + .raw_brightness(position, 0) + .map_err(SurvivalError::World)? + < 13 + && self.solid_render.contains(below)) + } + Rule::Multiface(faces) => { + for direction in Direction::ALL { + if faces & (1 << direction as u8) != 0 { + let at = relative(position, direction); + let neighbor = self.read(world, at)?; + if !self.can_attach(world, neighbor, at, direction)? { + return Ok(false); + } + } + } + Ok(faces != 0) + } + Rule::HangingMoss => { + let at = relative(position, Direction::Up); + let neighbor = self.read(world, at)?; + Ok(self.can_attach(world, neighbor, at, Direction::Up)? + || self.same_block(neighbor, state)) + } + Rule::Vine(faces) => { + let above = relative(position, Direction::Up); + let mut any = false; + let mut cached_above = None; + if faces & (1 << Direction::Up as u8) != 0 { + let neighbor = self.read(world, above)?; + // getUpdatedState passes DOWN here, unlike canSupportAtFace. + any = self.can_attach(world, neighbor, above, Direction::Down)?; + } + for direction in [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, + ] { + if faces & (1 << direction as u8) == 0 { + continue; + } + let at = relative(position, direction); + let neighbor = self.read(world, at)?; + let mut valid = self.can_attach(world, neighbor, at, direction)?; + if !valid { + let neighbor = self.read(world, above)?; + valid = self.same_block(neighbor, state) + && self.face_property(neighbor, direction); + } + if !valid { + let neighbor = match cached_above { + Some(neighbor) => neighbor, + None => { + let neighbor = self.read(world, above)?; + cached_above = Some(neighbor); + neighbor + } + }; + valid = self.same_block(neighbor, state) + && self.face_property(neighbor, direction); + } + any |= valid; + } + Ok(any) + } + Rule::SnowLayer => { + let at = relative(position, Direction::Down); + let neighbor = self.read(world, at)?; + if self.no_snow.contains(&neighbor) { + return Ok(false); + } + if self.snow_override.contains(&neighbor) { + return Ok(true); + } + let shape = self + .collision + .collision_shape(world, neighbor, at) + .map_err(SurvivalError::Collision)?; + Ok(SupportType::Full + .is_supporting(&shape, Direction::Up) + .map_err(|error| SurvivalError::Registry(invalid(error.to_string())))? + || (self.same_block(neighbor, state) + && self + .registry + .state(neighbor) + .unwrap() + .properties + .get("layers") + .is_some_and(|value| value == "8"))) + } + Rule::SeaPickle => { + let at = relative(position, Direction::Down); + let neighbor = self.read(world, at)?; + let shape = self + .collision + .collision_shape(world, neighbor, at) + .map_err(SurvivalError::Collision)?; + Ok(!shape + .face_shape(Direction::Up) + .map_err(|error| SurvivalError::Registry(invalid(error.to_string())))? + .is_empty() + || self + .support + .is_face_sturdy(world, neighbor, at, Direction::Up, SupportType::Full) + .map_err(SurvivalError::Support)?) + } + Rule::GrowingPlant { + head, + body, + direction, + kelp, + } => { + let at = relative(position, direction.opposite()); + let neighbor = self.read(world, at)?; + if kelp && self.no_kelp.contains(&neighbor) { + return Ok(false); + } + Ok(self.same_block(neighbor, head) + || self.same_block(neighbor, body) + || self + .support + .is_face_sturdy(world, neighbor, at, direction, SupportType::Full) + .map_err(SurvivalError::Support)?) + } + Rule::MangrovePropagule(hanging) => { + let neighbor = self.read( + world, + relative( + position, + if hanging { + Direction::Up + } else { + Direction::Down + }, + ), + )?; + Ok(if hanging { + self.hanging_mangrove.contains(&neighbor) + } else { + self.mangrove.contains(&neighbor) + }) + } + Rule::Speleothem(direction) => { + let at = relative(position, direction.opposite()); + let neighbor = self.read(world, at)?; + Ok(self + .support + .is_face_sturdy(world, neighbor, at, direction, SupportType::Full) + .map_err(SurvivalError::Support)? + || (self.same_block(neighbor, state) + && self + .registry + .state(neighbor) + .unwrap() + .properties + .get("vertical_direction") + == self + .registry + .state(state) + .unwrap() + .properties + .get("vertical_direction"))) + } + Rule::Scaffolding => { + let below = relative(position, Direction::Down); + let neighbor = self.read(world, below)?; + let mut distance = if let Some(distance) = self + .scaffold_distance(neighbor) + .map_err(SurvivalError::Registry)? + { + distance + } else { + if self + .support + .is_face_sturdy(world, neighbor, below, Direction::Up, SupportType::Full) + .map_err(SurvivalError::Support)? + { + return Ok(true); + } + 7 + }; + for direction in [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, + ] { + let neighbor = self.read(world, relative(position, direction))?; + if let Some(adjacent) = self + .scaffold_distance(neighbor) + .map_err(SurvivalError::Registry)? + { + distance = distance.min(adjacent + 1); + if distance == 1 { + break; + } + } + } + Ok(distance < 7) + } + Rule::PistonHead { direction, sticky } => { + let neighbor = self.read(world, relative(position, direction.opposite()))?; + let definition = self.registry.state(neighbor).unwrap(); + let base = if sticky { + "minecraft:sticky_piston" + } else { + "minecraft:piston" + }; + Ok(((definition.name == base + && definition + .properties + .get("extended") + .is_some_and(|v| v == "true")) + || definition.name == "minecraft:moving_piston") + && definition.properties.get("facing") + == self.registry.state(state).unwrap().properties.get("facing")) + } + Rule::ChorusPlant => { + let below = self.read(world, relative(position, Direction::Down))?; + let above = self.read(world, relative(position, Direction::Up))?; + let crowded = !self.is_air(above) && !self.is_air(below); + for direction in [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, + ] { + let at = relative(position, direction); + let neighbor = self.read(world, at)?; + if self.same_block(neighbor, state) { + if crowded { + return Ok(false); + } + let support = self.read(world, relative(at, Direction::Down))?; + if self.same_block(support, state) || self.chorus_plant.contains(&support) { + return Ok(true); + } + } + } + Ok(self.same_block(below, state) || self.chorus_plant.contains(&below)) + } + Rule::ChorusFlower => { + let below = self.read(world, relative(position, Direction::Down))?; + if self.is_named(below, "minecraft:chorus_plant") + || self.chorus_flower.contains(&below) + { + return Ok(true); + } + if !self.is_air(below) { + return Ok(false); + } + let mut found = false; + for direction in [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, + ] { + let neighbor = self.read(world, relative(position, direction))?; + if self.is_named(neighbor, "minecraft:chorus_plant") { + if found { + return Ok(false); + } + found = true; + } else if !self.is_air(neighbor) { + return Ok(false); + } + } + Ok(found) + } + Rule::PitcherCrop(upper) => { + if !upper + && world + .raw_brightness(position, 0) + .map_err(SurvivalError::World)? + < 8 + { + return Ok(false); + } + let below = self.read(world, relative(position, Direction::Down))?; + Ok(if upper { + self.is_lower_half(below, state) + } else { + self.crops.contains(&below) + }) + } + Rule::SugarCane => { + let below = relative(position, Direction::Down); + let neighbor = self.read(world, below)?; + if self.registry.state(neighbor).unwrap().name + == self.registry.state(state).unwrap().name + { + return Ok(true); + } + if !self.sugar_cane.contains(&neighbor) { + return Ok(false); + } + for direction in [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, + ] { + let at = relative(below, direction); + let adjacent = self.read(world, at)?; + let fluid = world.fluid_state(at).map_err(SurvivalError::World)?; + if self.fluid_matches(3, fluid) || self.sugar_cane_adjacent.contains(&adjacent) + { + return Ok(true); + } + } + Ok(false) + } + Rule::LilyPad => { + let below = relative(position, Direction::Down); + let neighbor = self.read(world, below)?; + let fluid_below = world.fluid_state(below).map_err(SurvivalError::World)?; + let fluid_here = world.fluid_state(position).map_err(SurvivalError::World)?; + Ok( + (self.fluid_matches(1, fluid_below) || self.lily_pad.contains(&neighbor)) + && fluid_here.kind() == FluidKind::Empty, + ) + } + Rule::Frogspawn => { + let below = relative(position, Direction::Down); + let fluid_below = world.fluid_state(below).map_err(SurvivalError::World)?; + let fluid_here = world.fluid_state(position).map_err(SurvivalError::World)?; + Ok((self.fluid_matches(2, fluid_below) + || self.frogspawn.contains(&self.read(world, below)?)) + && fluid_here.kind() == FluidKind::Empty) + } + Rule::SporeBlossom => Ok(self.support( + world, + relative(position, Direction::Up), + Direction::Down, + SupportType::Center, + true, + )? && !self.fluid_matches( + 0, + world.fluid_state(position).map_err(SurvivalError::World)?, + )), + Rule::SmallDripleaf(upper) => { + let neighbor = self.read(world, relative(position, Direction::Down))?; + if upper { + return Ok(self.is_lower_half(neighbor, state)); + } + Ok(self.small_dripleaf.contains(&neighbor) + || (world + .fluid_state(position) + .map_err(SurvivalError::World)? + .kind() + == FluidKind::Water + && self.vegetation.contains(&neighbor))) + } + Rule::TallSeagrass(upper) => { + let below = relative(position, Direction::Down); + if upper { + return Ok(self.is_lower_half(self.read(world, below)?, state)); + } + let fluid = world.fluid_state(position).map_err(SurvivalError::World)?; + let neighbor = self.read(world, below)?; + Ok(self + .support + .is_face_sturdy(world, neighbor, below, Direction::Up, SupportType::Full) + .map_err(SurvivalError::Support)? + && !self.no_seagrass.contains(&neighbor) + && self.fluid_matches(0, fluid) + && fluid.is_full()) + } + Rule::BigDripleaf => { + let below = self.read(world, relative(position, Direction::Down))?; + Ok(matches!( + self.registry.state(below).unwrap().name.as_str(), + "minecraft:big_dripleaf" | "minecraft:big_dripleaf_stem" + ) || self.dripleaf.contains(&below)) + } + Rule::BigDripleafStem => { + let below = self.read(world, relative(position, Direction::Down))?; + let above = self.read(world, relative(position, Direction::Up))?; + Ok( + (self.registry.state(below).unwrap().name == "minecraft:big_dripleaf_stem" + || self.dripleaf.contains(&below)) + && matches!( + self.registry.state(above).unwrap().name.as_str(), + "minecraft:big_dripleaf" | "minecraft:big_dripleaf_stem" + ), + ) + } + Rule::Farmland => { + let above = relative(position, Direction::Up); + Ok(!self.solid.contains(self.read(world, above)?) + || self.maintains_farmland.contains(&self.read(world, above)?)) + } + Rule::Cocoa(direction) => Ok(self + .cocoa + .contains(&self.read(world, relative(position, direction))?)), + Rule::Crop => Ok(world + .raw_brightness(position, 0) + .map_err(SurvivalError::World)? + >= 8 + && self + .crops + .contains(&self.read(world, relative(position, Direction::Down))?)), + Rule::DoublePlant(upper) => { + let below = self.read(world, relative(position, Direction::Down))?; + if !upper { + return Ok(self.vegetation.contains(&below)); + } + let neighbor = self.registry.state(below).unwrap(); + Ok(neighbor.name == self.registry.state(state).unwrap().name + && neighbor + .properties + .get("half") + .is_some_and(|v| v == "lower")) + } + Rule::Door(upper) => { + let below = relative(position, Direction::Down); + let neighbor = self.read(world, below)?; + if upper { + return Ok(self.registry.state(neighbor).unwrap().name + == self.registry.state(state).unwrap().name); + } + self.support + .is_face_sturdy(world, neighbor, below, Direction::Up, SupportType::Full) + .map_err(SurvivalError::Support) + } + Rule::TagBelow(index) => Ok(self.bound_tags[index] + .contains(&self.read(world, relative(position, Direction::Down))?)), + Rule::CactusFlower => { + let below = relative(position, Direction::Down); + self.read(world, below)?; + let neighbor = self.read(world, below)?; + Ok(self.cactus_flower.contains(&neighbor) + || self + .support + .is_face_sturdy(world, neighbor, below, Direction::Up, SupportType::Center) + .map_err(SurvivalError::Support)?) + } + Rule::Seagrass => { + let below = relative(position, Direction::Down); + let neighbor = self.read(world, below)?; + Ok(self + .support + .is_face_sturdy(world, neighbor, below, Direction::Up, SupportType::Full) + .map_err(SurvivalError::Support)? + && !self.no_seagrass.contains(&neighbor)) + } + Rule::BubbleColumn => { + let below = self.read(world, relative(position, Direction::Down))?; + Ok(self.registry.state(below).unwrap().name + == self.registry.state(state).unwrap().name + || self.bubble_up.contains(&below) + || self.bubble_down.contains(&below)) + } + Rule::RedstoneWire => { + let below = relative(position, Direction::Down); + let neighbor = self.read(world, below)?; + Ok(self + .support + .is_face_sturdy(world, neighbor, below, Direction::Up, SupportType::Full) + .map_err(SurvivalError::Support)? + || self.registry.state(neighbor).unwrap().name == "minecraft:hopper") + } + Rule::Always => Ok(true), + Rule::Solid(direction) => Ok(self + .solid + .contains(self.read(world, relative(position, direction))?)), + Rule::NonAirBelow => { + Ok(!self.is_air(self.read(world, relative(position, Direction::Down))?)) + } + Rule::MossCarpet(base) => { + let below = self.read(world, relative(position, Direction::Down))?; + if base { + return Ok(!self.is_air(below)); + } + let below = self.registry.state(below).unwrap(); + Ok(below.name == self.registry.state(state).unwrap().name + && below.properties.get("bottom").is_some_and(|v| v == "true")) + } + Rule::Support { + face, + kind, + center_restriction, + } => self.support( + world, + relative(position, face.opposite()), + face, + kind, + center_restriction, + ), + Rule::RigidOrCenterBelow => { + let below = relative(position, Direction::Down); + Ok( + self.support(world, below, Direction::Up, SupportType::Rigid, false)? + || self.support(world, below, Direction::Up, SupportType::Center, true)?, + ) + } + Rule::SupportsBamboo => Ok(self + .supports_bamboo + .contains(&self.read(world, relative(position, Direction::Down))?)), + } + } +} +fn relative(position: [i32; 3], direction: Direction) -> [i32; 3] { + let normal = direction.normal(); + std::array::from_fn(|i| position[i].wrapping_add(normal[i])) +} + +fn direction_name(direction: Direction) -> &'static str { + match direction { + Direction::Down => "down", + Direction::Up => "up", + Direction::North => "north", + Direction::South => "south", + Direction::West => "west", + Direction::East => "east", + } +} diff --git a/crates/horizon-world/src/blocking_item_damage.rs b/crates/horizon-world/src/blocking_item_damage.rs new file mode 100644 index 000000000..466532f87 --- /dev/null +++ b/crates/horizon-world/src/blocking_item_damage.rs @@ -0,0 +1,40 @@ +//! Blocking-component durability dispatch bound to stored item durability. +use crate::{ + blocking_rules::ItemDamageFunction, + item_durability::{self, DurabilityWorld}, +}; + +pub trait BlockingItemDamageWorld: DurabilityWorld { + type Level: Copy; + fn is_player(&self) -> bool; + fn is_server_player(&self) -> bool; + fn level_is_client( + &mut self, + stack: &mut Self::Stack, + level: Self::Level, + ) -> Result<bool, Self::Error>; + /// Implementations capture the stack's current item type before awarding it. + fn award_item_used(&mut self, stack: &mut Self::Stack) -> Result<(), Self::Error>; + fn entity_level_is_server(&mut self, stack: &mut Self::Stack) -> Result<bool, Self::Error>; +} + +pub fn hurt<W: BlockingItemDamageWorld>( + stack: &mut W::Stack, + world: &mut W, + level: W::Level, + damage: f32, + rule: ItemDamageFunction, +) -> Result<(), W::Error> { + if !world.is_player() { + return Ok(()); + } + if !world.level_is_client(stack, level)? { + world.award_item_used(stack)?; + } + let amount = rule.apply(damage); + if amount > 0 && world.entity_level_is_server(stack)? { + let player = world.is_server_player(); + item_durability::hurt_and_break(stack, world, amount, player)?; + } + Ok(()) +} diff --git a/crates/horizon-world/src/blocking_rules.rs b/crates/horizon-world/src/blocking_rules.rs new file mode 100644 index 000000000..c990b991a --- /dev/null +++ b/crates/horizon-world/src/blocking_rules.rs @@ -0,0 +1,95 @@ +//! Blocks-attacks scalar reduction, delay/cooldown and item-damage rules. +//! Direction calculation, component codecs, equipment mutation and sounds are +//! separate services; angles here are the native caller's radians. +pub trait TypeMatchWorld { + type Error; + type Set: Copy; + fn source_in_set(&mut self, set: Self::Set) -> Result<bool, Self::Error>; +} +#[derive(Clone, Copy, Debug)] +pub struct DamageReduction<S> { + pub horizontal_angle: f32, + pub types: Option<S>, + pub base: f32, + pub factor: f32, +} +fn min(a: f32, b: f32) -> f32 { + if a.is_nan() || b.is_nan() { + f32::NAN + } else if a == 0.0 && b == 0.0 { + f32::from_bits(a.to_bits() | b.to_bits()) + } else { + a.min(b) + } +} +fn clamp(value: f32, damage: f32) -> f32 { + if value < 0.0 { 0.0 } else { min(value, damage) } +} +fn round(value: f32) -> i32 { + (f64::from(value) + 0.5).floor() as i32 +} +impl<S: Copy> DamageReduction<S> { + pub fn resolve<W: TypeMatchWorld<Set = S>>( + &self, + world: &mut W, + damage: f32, + angle: f64, + ) -> Result<f32, W::Error> { + if angle > f64::from(0.017_453_292_f32 * self.horizontal_angle) { + return Ok(0.0); + } + if let Some(set) = self.types { + if !world.source_in_set(set)? { + return Ok(0.0); + } + } + Ok(clamp(self.base + self.factor * damage, damage)) + } +} +#[derive(Clone, Copy, Debug)] +pub struct ItemDamageFunction { + pub threshold: f32, + pub base: f32, + pub factor: f32, +} +impl ItemDamageFunction { + pub fn apply(self, damage: f32) -> i32 { + if damage < self.threshold { + 0 + } else { + (self.base + self.factor * damage).floor() as i32 + } + } +} +#[derive(Clone, Debug)] +pub struct BlockingRules<S> { + pub delay_seconds: f32, + pub disable_scale: f32, + pub reductions: Vec<DamageReduction<S>>, + pub item_damage: ItemDamageFunction, +} +impl<S: Copy> BlockingRules<S> { + pub fn delay_ticks(&self) -> i32 { + round(self.delay_seconds * 20.0) + } + pub fn disable_ticks(&self, seconds: f32) -> i32 { + let duration = seconds * self.disable_scale; + if duration > 0.0 { + round(duration * 20.0) + } else { + 0 + } + } + pub fn resolve<W: TypeMatchWorld<Set = S>>( + &self, + world: &mut W, + damage: f32, + angle: f64, + ) -> Result<f32, W::Error> { + let mut blocked = 0.0; + for reduction in &self.reductions { + blocked += reduction.resolve(world, damage, angle)?; + } + Ok(clamp(blocked, damage)) + } +} diff --git a/crates/horizon-world/src/bundle_weight.rs b/crates/horizon-world/src/bundle_weight.rs new file mode 100644 index 000000000..cf8715676 --- /dev/null +++ b/crates/horizon-world/src/bundle_weight.rs @@ -0,0 +1,191 @@ +//! Bundle weight arithmetic and lazy caching. The checked integer operations +//! retain the pinned Fraction behavior, including intermediate overflow errors. +use std::{cell::OnceCell, rc::Rc}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct Fraction { + numerator: i32, + denominator: i32, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct ExcessiveWeight; +fn gcd(a: i32, b: i32) -> i32 { + let (mut a, mut b) = (i64::from(a).abs(), i64::from(b).abs()); + while b != 0 { + (a, b) = (b, a % b); + } + // Every call has a positive, representable denominator as one operand. + a as i32 +} +impl Fraction { + pub fn numerator(self) -> i32 { + self.numerator + } + pub fn denominator(self) -> i32 { + self.denominator + } + pub const ZERO: Self = Self { + numerator: 0, + denominator: 1, + }; + pub const ONE: Self = Self { + numerator: 1, + denominator: 1, + }; + pub fn new(mut numerator: i32, mut denominator: i32) -> Result<Self, ExcessiveWeight> { + if denominator == 0 { + return Err(ExcessiveWeight); + } + if denominator < 0 { + numerator = numerator.checked_neg().ok_or(ExcessiveWeight)?; + denominator = denominator.checked_neg().ok_or(ExcessiveWeight)?; + } + Ok(Self { + numerator, + denominator, + }) + } + pub fn checked_add(self, other: Self) -> Result<Self, ExcessiveWeight> { + if self.numerator == 0 { + return Ok(other); + } + if other.numerator == 0 { + return Ok(self); + } + let d1 = gcd(self.denominator, other.denominator); + if d1 == 1 { + let a = self + .numerator + .checked_mul(other.denominator) + .ok_or(ExcessiveWeight)?; + let b = other + .numerator + .checked_mul(self.denominator) + .ok_or(ExcessiveWeight)?; + Ok(Self { + numerator: a.checked_add(b).ok_or(ExcessiveWeight)?, + denominator: self + .denominator + .checked_mul(other.denominator) + .ok_or(ExcessiveWeight)?, + }) + } else { + // Native uses BigInteger here. Products and their sum fit i64 for + // i32 numerators and positive i32 denominators. + let t = i64::from(self.numerator) * i64::from(other.denominator / d1) + + i64::from(other.numerator) * i64::from(self.denominator / d1); + let residue = t.rem_euclid(i64::from(d1)) as i32; + let d2 = if residue == 0 { d1 } else { gcd(residue, d1) }; + Ok(Self { + numerator: i32::try_from(t / i64::from(d2)).map_err(|_| ExcessiveWeight)?, + denominator: (self.denominator / d1) + .checked_mul(other.denominator / d2) + .ok_or(ExcessiveWeight)?, + }) + } + } + pub fn checked_multiply(self, other: Self) -> Result<Self, ExcessiveWeight> { + if self.numerator == 0 || other.numerator == 0 { + return Ok(Self::ZERO); + } + let d1 = gcd(self.numerator, other.denominator); + let d2 = gcd(other.numerator, self.denominator); + let numerator = (self.numerator / d1) + .checked_mul(other.numerator / d2) + .ok_or(ExcessiveWeight)?; + let denominator = (self.denominator / d2) + .checked_mul(other.denominator / d1) + .ok_or(ExcessiveWeight)?; + let d = gcd(numerator, denominator); + Ok(Self { + numerator: numerator / d, + denominator: denominator / d, + }) + } +} +#[derive(Debug)] +struct Data<T> { + items: Vec<T>, + weight: OnceCell<Result<Fraction, ExcessiveWeight>>, +} +#[derive(Debug)] +pub struct BundleWeight<T>(Rc<Data<T>>); +impl<T> Clone for BundleWeight<T> { + fn clone(&self) -> Self { + Self(self.0.clone()) + } +} +pub trait ItemWeights<T> { + fn count(&self, item: &T) -> i32; + fn max_stack_size(&self, item: &T) -> i32; + fn has_bees(&self, item: &T) -> bool; + fn bundle(&self, item: &T) -> Option<BundleWeight<T>>; +} +impl<T> BundleWeight<T> { + pub fn new(items: Vec<T>) -> Self { + Self(Rc::new(Data { + items, + weight: OnceCell::new(), + })) + } + pub fn items(&self) -> &[T] { + &self.0.items + } + pub fn weight(&self, view: &impl ItemWeights<T>) -> Result<Fraction, ExcessiveWeight> { + *self.0.weight.get_or_init(|| self.compute(view)) + } + fn compute(&self, view: &impl ItemWeights<T>) -> Result<Fraction, ExcessiveWeight> { + let mut total = Fraction::ZERO; + for item in self.items() { + let weight = if let Some(bundle) = view.bundle(item) { + bundle.weight(view)?.checked_add(Fraction { + numerator: 1, + denominator: 16, + })? + } else if view.has_bees(item) { + Fraction::ONE + } else { + Fraction::new(1, view.max_stack_size(item))? + }; + let count = Fraction::new(view.count(item), 1)?; + total = total.checked_add(weight.checked_multiply(count)?)?; + } + Ok(total) + } +} + +/// Contained stack sizes are checked without recursively validating their +/// components. Bundle weight is evaluated only after all its item sizes pass. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ContentsError { + Size { count: i32, maximum: i32 }, + Weight(ExcessiveWeight), +} +pub fn validate_sizes<T>(items: &[T], view: &impl ItemWeights<T>) -> Result<(), ContentsError> { + for item in items { + let count = view.count(item); + let maximum = view.max_stack_size(item); + if count > maximum { + return Err(ContentsError::Size { count, maximum }); + } + } + Ok(()) +} +pub fn validate_contents<T>( + container: Option<&[T]>, + bundle: Option<&BundleWeight<T>>, + projectiles: Option<&[T]>, + view: &impl ItemWeights<T>, +) -> Result<(), ContentsError> { + if let Some(items) = container { + validate_sizes(items, view)?; + } + if let Some(bundle) = bundle { + validate_sizes(bundle.items(), view)?; + bundle.weight(view).map_err(ContentsError::Weight)?; + } + if let Some(items) = projectiles { + validate_sizes(items, view)?; + } + Ok(()) +} diff --git a/crates/horizon-world/src/chunk.rs b/crates/horizon-world/src/chunk.rs new file mode 100644 index 000000000..f4341c92f --- /dev/null +++ b/crates/horizon-world/src/chunk.rs @@ -0,0 +1,588 @@ +//! Saved section palettes and storage-level chunk access. Changes here do not +//! run block behavior, lighting, heightmaps, neighbor updates or scheduled ticks. +use crate::{ + DATA_VERSION, + compression::invalid, + nbt::{Compound, JavaString, NamedTag, Tag}, + registry::{BlockRegistry, BlockStateId}, + tick_data::{self, TickKind}, +}; +use horizon_core::{ + position::{BlockPos, ChunkPos}, + storage::PackedStorage, + ticks::{ChunkTicks, SavedTick, TickTypeId}, +}; +use std::{collections::BTreeMap, io}; + +fn key(value: &str) -> JavaString { + JavaString::from(value) +} +fn bits_for_palette(len: usize, min: u8) -> u8 { + if len <= 1 { + 0 + } else { + ((usize::BITS - (len - 1).leading_zeros()) as u8).max(min) + } +} + +#[derive(Clone, Debug)] +pub struct PalettedContainer { + palette: Vec<Tag>, + storage: Option<PackedStorage>, + entries: usize, + min_bits: u8, + extra: Compound, +} +impl PalettedContainer { + pub fn uniform(value: Tag, entries: usize, min_bits: u8) -> io::Result<Self> { + if entries == 0 || !(1..=32).contains(&min_bits) { + return Err(invalid("invalid palette dimensions")); + } + if matches!(value, Tag::End) { + return Err(invalid("End cannot be a palette entry")); + } + Ok(Self { + palette: vec![value], + storage: None, + entries, + min_bits, + extra: Compound::new(), + }) + } + + pub fn from_nbt(tag: &Tag, entries: usize, min_bits: u8) -> io::Result<Self> { + let Tag::Compound(map) = tag else { + return Err(invalid("palette container is not a compound")); + }; + let Some(Tag::List(palette)) = map.get(&key("palette")) else { + return Err(invalid("missing palette list")); + }; + let first = palette.first().ok_or_else(|| invalid("empty palette"))?; + let mut result = Self::uniform(first.clone(), entries, min_bits)?; + if palette.len() > i32::MAX as usize || palette.iter().any(|t| matches!(t, Tag::End)) { + return Err(invalid("invalid palette")); + } + result.palette = palette.clone(); + let bits = bits_for_palette(palette.len(), min_bits); + if bits > 0 { + let Some(Tag::LongArray(words)) = map.get(&key("data")) else { + return Err(invalid("nonuniform palette is missing data")); + }; + let storage = + PackedStorage::from_words(bits, entries, words.iter().map(|&w| w as u64).collect()) + .map_err(|e| invalid(e.to_string()))?; + for index in 0..entries { + if storage.get(index).unwrap() as usize >= palette.len() { + return Err(invalid("palette index outside palette")); + } + } + result.storage = Some(storage); + } + result.extra = map.clone(); + result.extra.remove(&key("palette")); + result.extra.remove(&key("data")); + Ok(result) + } + + pub fn bits(&self) -> u8 { + self.storage.as_ref().map_or(0, PackedStorage::bits) + } + pub fn palette_len(&self) -> usize { + self.palette.len() + } + pub fn get(&self, index: usize) -> io::Result<&Tag> { + if index >= self.entries { + return Err(invalid("section index out of bounds")); + } + let palette_index = self.storage.as_ref().map_or(0, |s| s.get(index).unwrap()) as usize; + Ok(&self.palette[palette_index]) + } + + pub fn set(&mut self, index: usize, value: Tag) -> io::Result<Tag> { + let old = self.get(index)?.clone(); + if matches!(value, Tag::End) { + return Err(invalid("End cannot be a palette entry")); + } + let id = if let Some(id) = self.palette.iter().position(|v| *v == value) { + id + } else { + if self.palette.len() >= i32::MAX as usize { + return Err(invalid("palette too large")); + } + let next_bits = bits_for_palette(self.palette.len() + 1, self.min_bits); + if next_bits != self.bits() { + let mut next = PackedStorage::new(next_bits, self.entries) + .map_err(|e| invalid(e.to_string()))?; + if let Some(previous) = &self.storage { + for i in 0..self.entries { + next.set(i, previous.get(i).unwrap()).unwrap(); + } + } + self.storage = Some(next); + } + self.palette.push(value); + self.palette.len() - 1 + }; + if let Some(storage) = &mut self.storage { + storage + .set(index, id as u32) + .map_err(|e| invalid(e.to_string()))?; + } + Ok(old) + } + + /// Rebuild a minimal palette in first-use order, preserving every entry. + pub fn compact(&mut self) -> io::Result<()> { + let values = (0..self.entries) + .map(|i| self.get(i).cloned()) + .collect::<io::Result<Vec<_>>>()?; + let mut compact = Self::uniform(values[0].clone(), self.entries, self.min_bits)?; + for (i, value) in values.into_iter().enumerate() { + compact.set(i, value)?; + } + compact.extra = std::mem::take(&mut self.extra); + *self = compact; + Ok(()) + } + + pub fn to_nbt(&self) -> Tag { + let mut map = self.extra.clone(); + map.insert(key("palette"), Tag::List(self.palette.clone())); + if let Some(storage) = &self.storage { + map.insert( + key("data"), + Tag::LongArray(storage.words().iter().map(|&v| v as i64).collect()), + ); + } + Tag::Compound(map) + } +} + +#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] +pub struct BlockState { + pub name: String, + pub properties: BTreeMap<String, String>, +} +impl BlockState { + pub fn to_nbt(&self) -> Tag { + let mut map = Compound::new(); + map.insert(key("id"), Tag::String(key(&self.name))); + if !self.properties.is_empty() { + map.insert( + key("properties"), + Tag::Compound( + self.properties + .iter() + .map(|(k, v)| (key(k), Tag::String(key(v)))) + .collect(), + ), + ); + } + Tag::Compound(map) + } + pub fn from_nbt(tag: &Tag) -> io::Result<Self> { + if let Tag::String(name) = tag { + return Ok(Self { + name: name.to_string().map_err(|e| invalid(e.to_string()))?, + properties: BTreeMap::new(), + }); + } + let Some(Tag::String(name)) = tag.get("id") else { + return Err(invalid("block state is missing id")); + }; + let mut properties = BTreeMap::new(); + if let Some(tag) = tag.get("properties") { + let Tag::Compound(map) = tag else { + return Err(invalid("block properties are not a compound")); + }; + for (k, v) in map { + let Tag::String(v) = v else { + return Err(invalid("block property is not a string")); + }; + properties.insert( + k.to_string().map_err(|e| invalid(e.to_string()))?, + v.to_string().map_err(|e| invalid(e.to_string()))?, + ); + } + } + Ok(Self { + name: name.to_string().map_err(|e| invalid(e.to_string()))?, + properties, + }) + } +} + +#[derive(Clone, Debug)] +pub struct ChunkData { + root: NamedTag, + position: ChunkPos, +} +impl ChunkData { + pub fn new(root: NamedTag) -> io::Result<Self> { + let Some(Tag::Int(x)) = root.tag.get("xPos") else { + return Err(invalid("chunk is missing xPos")); + }; + let Some(Tag::Int(z)) = root.tag.get("zPos") else { + return Err(invalid("chunk is missing zPos")); + }; + let position = ChunkPos::new(*x, *z); + let Some(Tag::Int(version)) = root.tag.get("DataVersion") else { + return Err(invalid("chunk is missing DataVersion")); + }; + if *version != DATA_VERSION { + return Err(invalid(format!( + "expected DataVersion {DATA_VERSION}, got {version}; data fixing is not implemented" + ))); + } + let Some(Tag::List(sections)) = root.tag.get("sections") else { + return Err(invalid("chunk is missing sections")); + }; + let mut seen = std::collections::BTreeSet::new(); + for section in sections { + let Some(Tag::Byte(y)) = section.get("Y") else { + return Err(invalid("section is missing byte Y")); + }; + if !seen.insert(*y) { + return Err(invalid("duplicate section Y")); + } + } + Ok(Self { root, position }) + } + pub fn position(&self) -> ChunkPos { + self.position + } + pub fn into_nbt(self) -> NamedTag { + self.root + } + pub fn root(&self) -> &NamedTag { + &self.root + } + + pub fn saved_ticks( + &self, + kind: TickKind, + resolve: impl FnMut(&str) -> Option<TickTypeId>, + ) -> io::Result<ChunkTicks> { + let Some(tag) = self.root.tag.get(kind.field()) else { + return Ok(ChunkTicks::default()); + }; + let mut ticks = tick_data::read_list(tag, resolve)?; + ticks.retain(|tick| tick.pos.chunk() == self.position); + Ok(ChunkTicks::from_saved(ticks)) + } + + pub fn set_saved_ticks( + &mut self, + kind: TickKind, + ticks: &[SavedTick], + name: impl FnMut(TickTypeId) -> Option<String>, + ) -> io::Result<()> { + if ticks.iter().any(|tick| tick.pos.chunk() != self.position) { + return Err(invalid("saved tick is outside this chunk")); + } + let tag = tick_data::write_list(ticks, name)?; + let Tag::Compound(map) = &mut self.root.tag else { + unreachable!() + }; + map.insert(key(kind.field()), tag); + Ok(()) + } + + fn section_index(&self, block: BlockPos) -> io::Result<Option<usize>> { + if block.chunk() != self.position { + return Err(invalid("block is outside this chunk")); + } + let section_y = i8::try_from(block.y >> 4) + .map_err(|_| invalid("block height outside saved section range"))?; + let Tag::List(sections) = self.root.tag.get("sections").unwrap() else { + unreachable!() + }; + Ok(sections + .iter() + .position(|s| s.get("Y") == Some(&Tag::Byte(section_y)))) + } + + pub fn block(&self, block: BlockPos) -> io::Result<Option<BlockState>> { + let Some(index) = self.section_index(block)? else { + return Ok(None); + }; + let Tag::List(sections) = self.root.tag.get("sections").unwrap() else { + unreachable!() + }; + let Some(container) = sections[index].get("block_states") else { + return Ok(None); + }; + let palette = PalettedContainer::from_nbt(container, 4096, 4)?; + Ok(Some(BlockState::from_nbt( + palette.get(block.section_index())?, + )?)) + } + + pub fn load_block_section<'r>( + &self, + block: BlockPos, + registry: &'r BlockRegistry, + ) -> io::Result<Option<BlockSection<'r>>> { + let Some(index) = self.section_index(block)? else { + return Ok(None); + }; + let Tag::List(sections) = self.root.tag.get("sections").unwrap() else { + unreachable!() + }; + sections[index] + .get("block_states") + .map(|tag| BlockSection::from_nbt(tag, registry)) + .transpose() + } + + /// Storage-only mutation. The caller must arrange simulation-derived updates + /// before treating this as a gameplay block placement. + pub fn set_block_data(&mut self, block: BlockPos, state: BlockState) -> io::Result<BlockState> { + let index = self + .section_index(block)? + .ok_or_else(|| invalid("section is not present"))?; + let Tag::List(sections) = self.root.tag.get_mut("sections").unwrap() else { + unreachable!() + }; + let container = sections[index] + .get_mut("block_states") + .ok_or_else(|| invalid("section has no block-state data"))?; + let mut palette = PalettedContainer::from_nbt(container, 4096, 4)?; + let old = BlockState::from_nbt(palette.get(block.section_index())?)?; + palette.set(block.section_index(), state.to_nbt())?; + *container = palette.to_nbt(); + Ok(old) + } +} + +/// Resident section: 4,096 blocks stored as numeric palette entries. Uniform +/// sections have no word array; property strings live in the shared registry. +/// Multiplicative hash for dense state IDs; section palettes are hashed on +/// every block write, where SipHash dominated generation profiles. +#[derive(Default)] +struct StateIdHasher(u64); +impl std::hash::Hasher for StateIdHasher { + fn finish(&self) -> u64 { + self.0 + } + fn write(&mut self, bytes: &[u8]) { + for &b in bytes { + self.0 = (self.0.rotate_left(8) ^ u64::from(b)).wrapping_mul(0x9e37_79b9_7f4a_7c15); + } + } + fn write_u32(&mut self, value: u32) { + self.0 = (self.0 ^ u64::from(value)).wrapping_mul(0x9e37_79b9_7f4a_7c15); + } +} +type LocalIds = + std::collections::HashMap<BlockStateId, u32, std::hash::BuildHasherDefault<StateIdHasher>>; +fn local_ids(state: BlockStateId) -> LocalIds { + let mut ids = LocalIds::default(); + ids.insert(state, 0); + ids +} +pub struct BlockSection<'r> { + palette: Vec<BlockStateId>, + local_ids: LocalIds, + counts: Vec<u16>, + free: Vec<u32>, + storage: Option<PackedStorage>, + registry: &'r BlockRegistry, + extra: Compound, +} +impl<'r> BlockSection<'r> { + pub fn registry(&self) -> &'r BlockRegistry { + self.registry + } + pub fn uniform(state: BlockStateId, registry: &'r BlockRegistry) -> io::Result<Self> { + if registry.state(state).is_none() { + return Err(invalid("state ID outside registry")); + } + Ok(Self { + palette: vec![state], + local_ids: local_ids(state), + counts: vec![4096], + free: Vec::new(), + storage: None, + registry, + extra: Compound::new(), + }) + } + pub fn from_nbt(tag: &Tag, registry: &'r BlockRegistry) -> io::Result<Self> { + let container = PalettedContainer::from_nbt(tag, 4096, 4)?; + let resolved = container + .palette + .iter() + .map(|tag| registry.resolve(&BlockState::from_nbt(tag)?)) + .collect::<io::Result<Vec<_>>>()?; + let first_index = container.storage.as_ref().map_or(0, |s| s.get(0).unwrap()) as usize; + let mut section = Self::uniform(resolved[first_index], registry)?; + for index in 0..4096 { + let id = container + .storage + .as_ref() + .map_or(0, |s| s.get(index).unwrap()) as usize; + section.set(index, resolved[id])?; + } + section.extra = container.extra; + Ok(section) + } + /// Test current distinct states without unpacking all 4,096 cells. The + /// predicate should be pure; unused palette slots are intentionally skipped. + pub fn any_state(&self, mut predicate: impl FnMut(BlockStateId) -> bool) -> bool { + self.palette + .iter() + .zip(&self.counts) + .any(|(&state, &count)| count != 0 && predicate(state)) + } + pub fn bits(&self) -> u8 { + self.storage.as_ref().map_or(0, PackedStorage::bits) + } + pub fn get(&self, index: usize) -> io::Result<BlockStateId> { + if index >= 4096 { + return Err(invalid("section index out of bounds")); + } + let id = self.storage.as_ref().map_or(0, |s| s.get(index).unwrap()); + Ok(self.palette[id as usize]) + } + pub fn set(&mut self, index: usize, state: BlockStateId) -> io::Result<BlockStateId> { + let old = self.get(index)?; + if state.0 as usize >= self.registry.len() { + return Err(invalid("state ID outside registry")); + } + if old == state { + return Ok(old); + } + let old_id = self.local_ids[&old]; + if self.counts[old_id as usize] == 1 && !self.local_ids.contains_key(&state) { + // Replacing the last occurrence can reuse its slot without repacking. + self.palette[old_id as usize] = state; + self.local_ids.remove(&old); + self.local_ids.insert(state, old_id); + return Ok(old); + } + let id = if let Some(id) = self.local_ids.get(&state) { + *id + } else if let Some(id) = self.free.pop() { + self.palette[id as usize] = state; + self.local_ids.insert(state, id); + id + } else { + let id = self.palette.len() as u32; + let next_bits = bits_for_palette(self.palette.len() + 1, 4); + if next_bits != self.bits() { + let mut storage = + PackedStorage::new(next_bits, 4096).map_err(|e| invalid(e.to_string()))?; + if let Some(old) = &self.storage { + for i in 0..4096 { + storage.set(i, old.get(i).unwrap()).unwrap(); + } + } + self.storage = Some(storage); + } + self.palette.push(state); + self.counts.push(0); + self.local_ids.insert(state, id); + id + }; + self.storage + .as_mut() + .unwrap() + .set(index, id) + .map_err(|e| invalid(e.to_string()))?; + self.counts[old_id as usize] -= 1; + self.counts[id as usize] += 1; + if self.counts[old_id as usize] == 0 { + self.local_ids.remove(&old); + self.free.push(old_id); + } + if self.counts[id as usize] == 4096 { + self.palette = vec![state]; + self.local_ids = local_ids(state); + self.counts = vec![4096]; + self.free.clear(); + self.storage = None; + } + Ok(old) + } + pub fn compact(&mut self) -> io::Result<()> { + let values: Vec<_> = (0..4096).map(|i| self.get(i).unwrap()).collect(); + self.palette.clear(); + self.local_ids.clear(); + self.counts.clear(); + self.free.clear(); + for state in &values { + if !self.local_ids.contains_key(state) { + self.local_ids.insert(*state, self.palette.len() as u32); + self.palette.push(*state); + self.counts.push(0); + } + self.counts[self.local_ids[state] as usize] += 1; + } + let bits = bits_for_palette(self.palette.len(), 4); + self.storage = if bits == 0 { + None + } else { + let mut storage = PackedStorage::new(bits, 4096).map_err(|e| invalid(e.to_string()))?; + for (i, state) in values.iter().enumerate() { + storage.set(i, self.local_ids[state]).unwrap(); + } + Some(storage) + }; + Ok(()) + } + pub fn to_nbt(&self) -> io::Result<Tag> { + let mut map = self.extra.clone(); + let palette = self + .palette + .iter() + .map(|id| { + self.registry + .state(*id) + .map(BlockState::to_nbt) + .ok_or_else(|| invalid("state ID outside registry")) + }) + .collect::<io::Result<Vec<_>>>()?; + map.insert(key("palette"), Tag::List(palette)); + if let Some(storage) = &self.storage { + map.insert( + key("data"), + Tag::LongArray(storage.words().iter().map(|&w| w as i64).collect()), + ); + } + Ok(Tag::Compound(map)) + } +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn palette_grows_across_word_widths_and_compacts_to_uniform() { + let mut palette = PalettedContainer::uniform(Tag::Int(0), 4096, 4).unwrap(); + for i in 0..4096 { + palette.set(i, Tag::Int(i as i32)).unwrap(); + } + assert_eq!(palette.bits(), 12); + let mut loaded = PalettedContainer::from_nbt(&palette.to_nbt(), 4096, 4).unwrap(); + for i in 0..4096 { + assert_eq!(loaded.get(i).unwrap(), &Tag::Int(i as i32)); + loaded.set(i, Tag::Int(7)).unwrap(); + } + loaded.compact().unwrap(); + assert_eq!(loaded.bits(), 0); + assert_eq!(loaded.palette_len(), 1); + assert!(loaded.to_nbt().get("data").is_none()); + assert_eq!(loaded.get(4095).unwrap(), &Tag::Int(7)); + } + #[test] + fn invalid_palette_data_fails_before_access() { + let mut tag = Tag::compound([("palette", Tag::List(vec![Tag::Int(0), Tag::Int(1)]))]); + assert!(PalettedContainer::from_nbt(&tag, 4096, 4).is_err()); + let Tag::Compound(map) = &mut tag else { + unreachable!() + }; + map.insert(key("data"), Tag::LongArray(vec![-1; 256])); + assert!(PalettedContainer::from_nbt(&tag, 4096, 4).is_err()); + } +} diff --git a/crates/horizon-world/src/chunk_status.rs b/crates/horizon-world/src/chunk_status.rs new file mode 100644 index 000000000..69ed42385 --- /dev/null +++ b/crates/horizon-world/src/chunk_status.rs @@ -0,0 +1,100 @@ +//! Pinned generation-status identities and ordering. A status describes progress; +//! assigning one does not execute its generation task or implement lighting. +use crate::{compression::invalid, heightmap::HeightmapType, nbt::Tag}; +use std::io; + +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[repr(u8)] +pub enum ChunkStatus { + #[default] + Empty, + StructureStarts, + StructureReferences, + Biomes, + Terrain, + Features, + InitializeLight, + Light, + Spawn, + Full, +} +impl ChunkStatus { + pub const MAX_STRUCTURE_DISTANCE: i32 = 8; + pub const FINAL_HEIGHTMAPS: [HeightmapType; 4] = [ + HeightmapType::WorldSurface, + HeightmapType::OceanFloor, + HeightmapType::MotionBlocking, + HeightmapType::MotionBlockingNoLeaves, + ]; + pub const ALL: [Self; 10] = [ + Self::Empty, + Self::StructureStarts, + Self::StructureReferences, + Self::Biomes, + Self::Terrain, + Self::Features, + Self::InitializeLight, + Self::Light, + Self::Spawn, + Self::Full, + ]; + pub fn index(self) -> usize { + self as usize + } + pub fn parent(self) -> Self { + Self::ALL[self.index().saturating_sub(1)] + } + pub fn name(self) -> &'static str { + match self { + Self::Empty => "minecraft:empty", + Self::StructureStarts => "minecraft:structure_starts", + Self::StructureReferences => "minecraft:structure_references", + Self::Biomes => "minecraft:biomes", + Self::Terrain => "minecraft:terrain", + Self::Features => "minecraft:features", + Self::InitializeLight => "minecraft:initialize_light", + Self::Light => "minecraft:light", + Self::Spawn => "minecraft:spawn", + Self::Full => "minecraft:full", + } + } + /// Registry-codec lookup: unknown or invalid identifiers are errors. + pub fn parse(name: &str) -> io::Result<Self> { + let path = match name.split_once(':') { + Some(("" | "minecraft", path)) => path, + None => name, + _ => return Err(invalid("unknown chunk status namespace")), + }; + Self::ALL + .into_iter() + .find(|status| status.name().strip_prefix("minecraft:") == Some(path)) + .ok_or_else(|| invalid("unknown chunk status")) + } + /// Direct native byName lookup uses the registry's empty-status fallback. + pub fn by_name(name: &str) -> Self { + Self::parse(name).unwrap_or_default() + } + pub fn from_nbt(tag: &Tag) -> io::Result<Self> { + let Tag::String(name) = tag else { + return Err(invalid("chunk status is not a string")); + }; + Self::parse( + &name + .to_string() + .map_err(|error| invalid(error.to_string()))?, + ) + } + pub fn to_nbt(self) -> Tag { + Tag::String(self.name().into()) + } + pub fn is_level_chunk(self) -> bool { + self == Self::Full + } + pub fn heightmaps(self) -> &'static [HeightmapType] { + if self >= Self::Terrain { + &Self::FINAL_HEIGHTMAPS + } else { + &[HeightmapType::WorldSurfaceWg, HeightmapType::OceanFloorWg] + } + } +} diff --git a/crates/horizon-world/src/climbing.rs b/crates/horizon-world/src/climbing.rs new file mode 100644 index 000000000..d0af2e1d5 --- /dev/null +++ b/crates/horizon-world/src/climbing.rs @@ -0,0 +1,137 @@ +//! Registered climbing tags and trapdoor/ladder support with entity state order. +use crate::{ + compression::invalid, + registry::{BlockRegistry, BlockStateId}, +}; +use horizon_core::position::BlockPos; +use std::{collections::BTreeSet, fmt, io}; +#[derive(Clone, Copy)] +struct State { + climbable: bool, + glide_through: bool, + open_trapdoor: Option<u8>, + ladder: Option<u8>, +} +pub struct ClimbingRegistry<'r> { + registry: &'r BlockRegistry, + states: Vec<State>, +} +impl<'r> ClimbingRegistry<'r> { + /// Trapdoor names are imported class identities, not inferred from spelling. + /// Rebuild this immutable snapshot when either resolved block tag reloads. + pub fn new( + registry: &'r BlockRegistry, + trapdoors: &BTreeSet<String>, + climbable: &BTreeSet<String>, + glide_through: &BTreeSet<String>, + ) -> io::Result<Self> { + for names in [trapdoors, climbable, glide_through] { + if names.iter().any(|n| registry.default_state(n).is_none()) { + return Err(invalid("unknown climbing block member")); + } + } + let mut states = Vec::with_capacity(registry.len()); + for i in 0..registry.len() { + let s = registry.state(BlockStateId(i as u32)).unwrap(); + let facing = || -> io::Result<u8> { + match s.properties.get("facing").map(String::as_str) { + Some("north") => Ok(0), + Some("south") => Ok(1), + Some("west") => Ok(2), + Some("east") => Ok(3), + _ => Err(invalid("invalid climbing facing")), + } + }; + let open_trapdoor = if trapdoors.contains(&s.name) { + let f = facing()?; + match s.properties.get("open").map(String::as_str) { + Some("true") => Some(f), + Some("false") => None, + _ => return Err(invalid("invalid trapdoor open state")), + } + } else { + None + }; + states.push(State { + climbable: climbable.contains(&s.name), + glide_through: glide_through.contains(&s.name), + open_trapdoor, + ladder: if s.name == "minecraft:ladder" { + Some(facing()?) + } else { + None + }, + }); + } + Ok(Self { registry, states }) + } + pub fn registry(&self) -> &'r BlockRegistry { + self.registry + } + fn state(&self, id: BlockStateId) -> io::Result<State> { + self.states + .get(id.0 as usize) + .copied() + .ok_or_else(|| invalid("climbing state outside registry")) + } + pub fn is_climbable_tag(&self, id: BlockStateId) -> io::Result<bool> { + Ok(self.state(id)?.climbable) + } +} +pub trait ClimbingWorld { + type Error; + fn is_spectator(&mut self) -> Result<bool, Self::Error>; + fn block_position(&mut self) -> Result<BlockPos, Self::Error>; + fn in_block_state(&mut self) -> Result<BlockStateId, Self::Error>; + fn is_fall_flying(&mut self) -> Result<bool, Self::Error>; + fn block_state(&mut self, position: BlockPos) -> Result<BlockStateId, Self::Error>; + fn set_last_climbable_position(&mut self, position: BlockPos); +} +#[derive(Debug)] +pub enum ClimbingError<E> { + Data(io::Error), + World(E), +} +impl<E: fmt::Display> fmt::Display for ClimbingError<E> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::Data(e) => e.fmt(f), + Self::World(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for ClimbingError<E> {} +/// Failed/negative queries retain the existing last-climbable position. Only a +/// positive result overwrites it, using the position captured before state reads. +pub fn on_climbable<W: ClimbingWorld>( + world: &mut W, + registry: &ClimbingRegistry<'_>, +) -> Result<bool, ClimbingError<W::Error>> { + use ClimbingError::{Data, World}; + if world.is_spectator().map_err(World)? { + return Ok(false); + } + let position = world.block_position().map_err(World)?; + let state = registry + .state(world.in_block_state().map_err(World)?) + .map_err(Data)?; + if world.is_fall_flying().map_err(World)? && state.glide_through { + return Ok(false); + } + let climbable = if state.climbable { + true + } else if let Some(facing) = state.open_trapdoor { + let below = BlockPos::new(position.x, position.y.wrapping_sub(1), position.z); + registry + .state(world.block_state(below).map_err(World)?) + .map_err(Data)? + .ladder + == Some(facing) + } else { + false + }; + if climbable { + world.set_last_climbable_position(position); + } + Ok(climbable) +} diff --git a/crates/horizon-world/src/collision.rs b/crates/horizon-world/src/collision.rs new file mode 100644 index 000000000..694264a5e --- /dev/null +++ b/crates/horizon-world/src/collision.rs @@ -0,0 +1,239 @@ +//! Version-pinned cached block collision data, without entity-context behavior. +//! +//! Java's no-context BlockState.getCollisionShape uses its cache when present. +//! The overload taking CollisionContext always calls block behavior instead. +//! This module covers the cached branch only; uncached states remain explicit. +use crate::{ + DATA_VERSION, + chunk::{BlockSection, BlockState}, + compression::invalid, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, +}; +use horizon_core::geometry::{Axis, VoxelShape}; +use std::{collections::HashMap, io}; + +#[derive(PartialEq, Eq, Hash)] +struct GridKey { + coords: [Vec<u64>; 3], + occupied: Vec<u8>, + cube: bool, + axes: u8, + min: [i32; 3], + max: [i32; 3], +} + +pub struct CachedCollisionRegistry<'r> { + registry: &'r BlockRegistry, + shapes: Vec<VoxelShape>, + state_shapes: Vec<i32>, + grid_count: usize, + canonical_identities: bool, +} +impl<'r> CachedCollisionRegistry<'r> { + pub fn registry(&self) -> &'r BlockRegistry { + self.registry + } + pub fn from_nbt(tag: &Tag, registry: &'r BlockRegistry) -> io::Result<Self> { + if tag.get("DataVersion") != Some(&Tag::Int(DATA_VERSION)) { + return Err(invalid("collision DataVersion mismatch")); + } + let Some(Tag::List(states)) = tag.get("states") else { + return Err(invalid("missing collision state identities")); + }; + if states.len() != registry.len() { + return Err(invalid("collision registry size mismatch")); + } + for (id, state) in states.iter().enumerate() { + if registry.state(BlockStateId(id as u32)) != Some(&BlockState::from_nbt(state)?) { + return Err(invalid("collision state identities differ")); + } + } + let Some(Tag::List(entries)) = tag.get("shapes") else { + return Err(invalid("missing collision shapes")); + }; + if entries.len() > registry.len() { + return Err(invalid("too many cached collision shapes")); + } + let mut shapes = Vec::with_capacity(entries.len()); + let mut canonical_identities = true; + let mut seen_canonical = [false; 3]; + let mut grids = HashMap::<GridKey, VoxelShape>::new(); + for entry in entries { + let canonical = match entry.get("canonical") { + None => { + canonical_identities = false; + 0 + } + Some(Tag::Byte(value @ 0..=2)) => *value as usize, + _ => return Err(invalid("invalid canonical collision identity")), + }; + if canonical != 0 { + if seen_canonical[canonical] { + return Err(invalid("duplicate canonical collision identity")); + } + seen_canonical[canonical] = true; + } + let mut coords: [Vec<f64>; 3] = std::array::from_fn(|_| Vec::new()); + for (i, axis) in ["x", "y", "z"].into_iter().enumerate() { + let Some(Tag::LongArray(bits)) = entry.get(axis) else { + return Err(invalid("missing collision coordinates")); + }; + coords[i] = bits.iter().map(|b| f64::from_bits(*b as u64)).collect(); + } + let Some(Tag::ByteArray(bits)) = entry.get("occupied") else { + return Err(invalid("missing collision occupancy")); + }; + if bits.iter().any(|b| *b != 0 && *b != 1) { + return Err(invalid("invalid collision occupancy")); + } + let occupied = bits.iter().map(|b| *b != 0).collect::<Vec<_>>(); + let Some(Tag::Byte(cube_axes)) = entry.get("cube_axes") else { + return Err(invalid("missing cube-coordinate metadata")); + }; + if *cube_axes < 0 || *cube_axes > 7 { + return Err(invalid("invalid cube-coordinate metadata")); + } + let coordinate_cubes = [cube_axes & 1 != 0, cube_axes & 2 != 0, cube_axes & 4 != 0]; + let discrete_bounds = |name| -> io::Result<[i32; 3]> { + let Some(Tag::IntArray(values)) = entry.get(name) else { + return Err(invalid("missing collision discrete extrema")); + }; + values + .as_slice() + .try_into() + .map_err(|_| invalid("invalid collision discrete extrema length")) + }; + let min = discrete_bounds("discrete_min")?; + let max = discrete_bounds("discrete_max")?; + let cube = match entry.get("cube") { + Some(Tag::Byte(0)) => false, + Some(Tag::Byte(1)) => true, + _ => return Err(invalid("invalid collision cube flag")), + }; + let key = GridKey { + coords: std::array::from_fn(|i| coords[i].iter().map(|v| v.to_bits()).collect()), + occupied: bits.clone(), + cube, + axes: *cube_axes as u8, + min, + max, + }; + let shape = if let Some(existing) = grids.get(&key) { + existing.fresh_identity() + } else { + match entry.get("cube") { + Some(Tag::Byte(0)) => { + VoxelShape::from_mixed_grid(coords, &occupied, coordinate_cubes) + } + Some(Tag::Byte(1)) => { + if *cube_axes != 7 { + return Err(invalid("cube shape has array-coordinate metadata")); + } + let sizes = std::array::from_fn(|i| coords[i].len().saturating_sub(1)); + let shape = VoxelShape::from_cube(sizes, &occupied) + .map_err(|e| invalid(e.to_string()))?; + for axis in Axis::ALL { + if shape + .coordinates(axis) + .iter() + .map(|v| v.to_bits()) + .ne(coords[axis as usize].iter().map(|v| v.to_bits())) + { + return Err(invalid("cube collision coordinates differ")); + } + } + Ok(shape) + } + _ => return Err(invalid("invalid collision cube flag")), + } + .map_err(|e| invalid(e.to_string()))? + .with_discrete_bounds(min, max) + .map_err(|e| invalid(e.to_string()))? + }; + let shape = if canonical == 0 { + shape + } else { + let reference = if canonical == 1 { + VoxelShape::empty() + } else { + VoxelShape::block() + }; + let expected_count = usize::from(canonical == 2); + if cube != reference.is_cube() + || coordinate_cubes != reference.cube_coordinate_axes() + || occupied != vec![true; expected_count] + || min != [0; 3] + || max != [expected_count as i32; 3] + || Axis::ALL.into_iter().any(|axis| { + key.coords[axis as usize] + .iter() + .copied() + .ne(reference.coordinates(axis).iter().map(|v| v.to_bits())) + }) + { + return Err(invalid( + "canonical collision identity has different geometry", + )); + } + reference + }; + grids.entry(key).or_insert_with(|| shape.clone()); + shapes.push(shape); + } + let Some(Tag::IntArray(state_shapes)) = tag.get("cached_shapes") else { + return Err(invalid("missing cached shape mapping")); + }; + if state_shapes.len() != registry.len() + || state_shapes + .iter() + .any(|id| *id < -1 || *id >= shapes.len() as i32) + { + return Err(invalid("invalid cached shape mapping")); + } + Ok(Self { + registry, + shapes, + state_shapes: state_shapes.clone(), + grid_count: grids.len(), + canonical_identities, + }) + } + /// Older exports omit native canonical identities. Such imports retain their + /// local alias graph but cannot support identity-dependent world iteration. + pub fn has_canonical_identities(&self) -> bool { + self.canonical_identities + } + pub fn shape_count(&self) -> usize { + self.shapes.len() + } + pub fn unique_grid_count(&self) -> usize { + self.grid_count + } + pub fn cached_state_count(&self) -> usize { + self.state_shapes.iter().filter(|id| **id >= 0).count() + } + /// None means vanilla must call block behavior for this state. It does not + /// mean air, an empty shape, or permission to ignore a collision. + pub fn cached_shape(&self, state: BlockStateId) -> io::Result<Option<&VoxelShape>> { + let id = *self + .state_shapes + .get(state.0 as usize) + .ok_or_else(|| invalid("collision state outside registry"))?; + Ok(if id < 0 { + None + } else { + Some(&self.shapes[id as usize]) + }) + } + pub fn section_shape( + &self, + section: &BlockSection<'_>, + index: usize, + ) -> io::Result<Option<&VoxelShape>> { + if !std::ptr::eq(section.registry(), self.registry) { + return Err(invalid("section uses a different collision registry")); + } + self.cached_shape(section.get(index)?) + } +} diff --git a/crates/horizon-world/src/collision_context.rs b/crates/horizon-world/src/collision_context.rs new file mode 100644 index 000000000..70362f3bb --- /dev/null +++ b/crates/horizon-world/src/collision_context.rs @@ -0,0 +1,163 @@ +//! Collision queries over a captured entity state. Entity lifecycle, mutable +//! inventory ownership and experimental minecart contexts are supplied separately. +use crate::{entity_obstruction::EntityIdentity, fluid::FluidState}; +use horizon_core::{ + geometry::{Axis, VoxelShape}, + position::BlockPos, +}; + +/// A main-hand stack snapshot. Item names must be canonical registry identifiers. +#[derive(Clone, Copy, Debug)] +pub struct CollisionItem<'a> { + pub item: &'a str, + pub count: i32, +} +impl CollisionItem<'_> { + pub const EMPTY: Self = Self { + item: "minecraft:air", + count: 0, + }; + + pub fn is_item(self, item: &str) -> bool { + // ItemStack.typeHolder substitutes AIR for every empty stack, including + // stacks whose stored item is non-air but whose count is nonpositive. + let held = if self.count <= 0 { + "minecraft:air" + } else { + self.item + }; + held == item + } +} + +#[derive(Clone, Copy, Debug)] +pub struct CollisionEntity<'a> { + pub identity: EntityIdentity, + /// Entity.getY(), not the minimum Y of its bounding box. + pub y: f64, + pub descending: bool, + /// None for nonliving entities; Some(EMPTY) for an empty-handed living one. + pub main_hand: Option<CollisionItem<'a>>, +} + +#[derive(Clone, Copy, Debug)] +enum Height { + Default, + Bottom(f64), +} + +#[derive(Clone, Copy, Debug)] +pub struct CollisionContext<'a> { + height: Height, + descending: bool, + placement: bool, + always_fluid: bool, + held: CollisionItem<'a>, + entity: Option<EntityIdentity>, + living: bool, + position_only: bool, +} +impl<'a> CollisionContext<'a> { + pub const fn empty(always_fluid: bool) -> Self { + Self { + height: Height::Default, + descending: false, + placement: false, + always_fluid, + held: CollisionItem::EMPTY, + entity: None, + living: false, + position_only: false, + } + } + + pub const fn position(y: f64) -> Self { + Self { + height: Height::Bottom(y), + position_only: true, + ..Self::empty(false) + } + } + + /// Ordinary EntityCollisionContext. The native factory overload taking an + /// explicit fluid flag also uses this path for experimental minecarts. + pub fn for_entity(entity: CollisionEntity<'a>, always_fluid: bool) -> Self { + Self { + height: Height::Bottom(entity.y), + descending: entity.descending, + placement: false, + always_fluid, + held: entity.main_hand.unwrap_or(CollisionItem::EMPTY), + entity: Some(entity.identity), + living: entity.main_hand.is_some(), + position_only: false, + } + } + + /// `player`, when present, must describe a player (and thus a living entity). + pub fn placement(player: Option<CollisionEntity<'a>>) -> Self { + let y = player.map_or(-f64::MAX, |player| player.y); + Self::with_position(player, y) + } + + /// Native withPosition is a placement context. A missing entity ignores y. + pub fn with_position(entity: Option<CollisionEntity<'a>>, y: f64) -> Self { + let mut context = entity.map_or_else( + || Self { + height: Height::Bottom(-f64::MAX), + ..Self::empty(false) + }, + |entity| Self { + height: Height::Bottom(y), + ..Self::for_entity(entity, false) + }, + ); + context.placement = true; + context + } + + pub fn entity(&self) -> Option<EntityIdentity> { + self.entity + } + pub fn living_entity(&self) -> Option<EntityIdentity> { + self.entity.filter(|_| self.living) + } + pub fn is_descending(&self) -> bool { + self.descending + } + pub fn is_placement(&self) -> bool { + self.placement + } + pub fn always_collide_with_fluid(&self) -> bool { + self.always_fluid + } + pub fn is_holding_item(&self, item: &str) -> bool { + !self.position_only && self.held.is_item(item) + } + + pub fn is_above(&self, shape: &VoxelShape, position: BlockPos, default: bool) -> bool { + match self.height { + Height::Default => default, + Height::Bottom(bottom) => { + bottom > (f64::from(position.y) + shape.max(Axis::Y) - f64::from(1.0e-5f32)) + } + } + } + + /// The living-entity callback receives the second fluid even when both fluid + /// types belong to the same family. Preserve its side effects and failures. + pub fn can_stand_on_fluid<E>( + &self, + first: FluidState, + second: FluidState, + mut entity_can_stand: impl FnMut(EntityIdentity, FluidState) -> Result<bool, E>, + ) -> Result<bool, E> { + if !self.living { + return Ok(false); + } + Ok( + entity_can_stand(self.entity.expect("living context has an entity"), second)? + && !first.kind().same_family(second.kind()), + ) + } +} diff --git a/crates/horizon-world/src/combat_rules.rs b/crates/horizon-world/src/combat_rules.rs new file mode 100644 index 000000000..4d8aa424f --- /dev/null +++ b/crates/horizon-world/src/combat_rules.rs @@ -0,0 +1,51 @@ +//! Native armor/toughness and enchantment-protection damage arithmetic. +fn clamp(value: f32, min: f32, max: f32) -> f32 { + if value < min { + min + } else if value.is_nan() || max.is_nan() { + f32::NAN + } else if value == 0.0 && max == 0.0 { + f32::from_bits(value.to_bits() | max.to_bits()) + } else { + value.min(max) + } +} +pub trait ArmorWorld { + type Error; + type Weapon: Copy; + type ServerLevel: Copy; + fn weapon(&mut self) -> Result<Option<Self::Weapon>, Self::Error>; + fn server_level(&mut self) -> Result<Option<Self::ServerLevel>, Self::Error>; + /// Called only with a nonnull weapon and a server level. Implementations + /// apply the weapon's actual armor-effectiveness enchantment components. + fn modify_armor_effectiveness( + &mut self, + level: Self::ServerLevel, + weapon: Self::Weapon, + effectiveness: f32, + ) -> Result<f32, Self::Error>; +} +pub fn after_armor<W: ArmorWorld>( + world: &mut W, + damage: f32, + armor: f32, + toughness: f32, +) -> Result<f32, W::Error> { + let divisor = 2.0 + toughness / 4.0; + let protection = clamp(armor - damage / divisor, armor * 0.2, 20.0); + let mut effectiveness = protection / 25.0; + if let Some(weapon) = world.weapon()? { + if let Some(level) = world.server_level()? { + effectiveness = clamp( + world.modify_armor_effectiveness(level, weapon, effectiveness)?, + 0.0, + 1.0, + ); + } + } + Ok(damage * (1.0 - effectiveness)) +} +pub fn after_magic(damage: f32, protection: f32) -> f32 { + let protection = clamp(protection, 0.0, 20.0); + damage * (1.0 - protection / 25.0) +} diff --git a/crates/horizon-world/src/component_durability.rs b/crates/horizon-world/src/component_durability.rs new file mode 100644 index 000000000..15237133b --- /dev/null +++ b/crates/horizon-world/src/component_durability.rs @@ -0,0 +1,193 @@ +//! Durability backed by native-style component prototypes and patches. +//! Other item components and item identity are supplied by the containing stack. +use crate::{ + component_patch::{ComponentMap, MissingPrototype, Patch, Prototype}, + item_durability::DurabilityStorage, + item_use_catalog::UseComponents, +}; +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Key { + MaxDamage, + Damage, + Unbreakable, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Change { + MaxDamage(Option<i32>), + Damage(Option<i32>), + Unbreakable(bool), +} +impl Change { + fn parts(self) -> (Key, Option<i32>) { + match self { + Self::MaxDamage(v) => (Key::MaxDamage, v), + Self::Damage(v) => (Key::Damage, v), + Self::Unbreakable(v) => (Key::Unbreakable, v.then_some(0)), + } + } + fn from_parts(key: Key, v: Option<i32>) -> Self { + match key { + Key::MaxDamage => Self::MaxDamage(v), + Key::Damage => Self::Damage(v), + Key::Unbreakable => Self::Unbreakable(v.is_some()), + } + } +} +#[derive(Clone, Debug)] +pub struct DurabilityPrototype(Prototype<Key, i32>); +impl DurabilityPrototype { + pub fn new(changes: impl IntoIterator<Item = Change>) -> Self { + let mut entries = Vec::new(); + for change in changes { + let (k, v) = change.parts(); + let i = entries.iter().position(|(key, _)| *key == k); + match (v, i) { + (Some(v), Some(i)) => entries[i] = (k, v), + (Some(v), None) => entries.push((k, v)), + (None, Some(i)) => { + entries.remove(i); + } + (None, None) => {} + } + } + Self(Prototype::new(entries)) + } + pub fn from_defaults(defaults: &UseComponents) -> Self { + Self::new([ + Change::MaxDamage(defaults.max_damage), + Change::Damage(defaults.damage), + Change::Unbreakable(defaults.unbreakable), + ]) + } +} +#[derive(Clone, Debug)] +pub struct DurabilityPatch(Patch<Key, i32>); +impl DurabilityPatch { + pub fn new(changes: impl IntoIterator<Item = Change>) -> Self { + Self(Patch::new(changes.into_iter().map(Change::parts))) + } + pub fn changes(&self) -> impl Iterator<Item = Change> + '_ { + self.0 + .entries() + .iter() + .map(|(k, v)| Change::from_parts(*k, *v)) + } +} +#[derive(Clone, Debug)] +pub struct ComponentDurability { + pub count: i32, + pub air: bool, + components: ComponentMap<Key, i32>, +} +impl ComponentDurability { + pub fn new(prototype: &DurabilityPrototype, count: i32, air: bool) -> Self { + Self { + count, + air, + components: ComponentMap::new(prototype.0.clone()), + } + } + pub fn from_patch( + prototype: &DurabilityPrototype, + patch: &DurabilityPatch, + count: i32, + air: bool, + ) -> Self { + Self { + count, + air, + components: ComponentMap::from_patch(prototype.0.clone(), &patch.0), + } + } + pub fn is_empty(&self) -> bool { + self.air || self.count <= 0 + } + pub fn count(&self) -> i32 { + if self.is_empty() { 0 } else { self.count } + } + /// Raw storage remains present while the containing item stack is empty. + pub fn raw_component(&self, key: Key) -> Option<i32> { + self.components.get(&key).copied() + } + pub fn set(&mut self, change: Change) -> Result<Option<Change>, MissingPrototype> { + let (k, v) = change.parts(); + self.components + .set(k, v) + .map(|old| old.map(|v| Change::from_parts(k, Some(v)))) + } + pub fn remove(&mut self, key: Key) -> Option<Change> { + self.components + .remove(key) + .map(|v| Change::from_parts(key, Some(v))) + } + pub fn apply_patch(&mut self, patch: &DurabilityPatch) { + self.components.apply_patch(&patch.0); + } + pub fn restore_patch(&mut self, patch: &DurabilityPatch) { + self.components.restore_patch(&patch.0); + } + pub fn as_patch(&self) -> DurabilityPatch { + DurabilityPatch(self.components.as_patch()) + } + pub fn max_damage(&self) -> i32 { + if self.is_empty() { + 0 + } else { + self.raw_component(Key::MaxDamage).unwrap_or(0) + } + } + pub fn damage(&self) -> i32 { + let value = if self.is_empty() { + 0 + } else { + self.raw_component(Key::Damage).unwrap_or(0) + }; + value.max(0).min(self.max_damage()) + } + pub fn set_damage(&mut self, value: i32) -> Result<(), MissingPrototype> { + self.set(Change::Damage(Some(value.max(0).min(self.max_damage())))) + .map(|_| ()) + } + pub fn is_damageable(&self) -> bool { + !self.is_empty() + && self.raw_component(Key::MaxDamage).is_some() + && self.raw_component(Key::Unbreakable).is_none() + && self.raw_component(Key::Damage).is_some() + } + pub fn is_damaged(&self) -> bool { + self.is_damageable() && self.damage() > 0 + } + pub fn is_broken(&self) -> bool { + self.is_damageable() && self.damage() >= self.max_damage() + } + pub fn next_damage_will_break(&self) -> bool { + self.is_damageable() && self.damage() >= self.max_damage().wrapping_sub(1) + } + pub fn grow(&mut self, amount: i32) { + self.count = self.count().wrapping_add(amount); + } + pub fn shrink(&mut self, amount: i32) { + self.grow(amount.wrapping_neg()); + } +} +impl DurabilityStorage for ComponentDurability { + type Error = MissingPrototype; + fn is_damageable(&self) -> bool { + self.is_damageable() + } + fn damage(&self) -> i32 { + self.damage() + } + fn max_damage(&self) -> i32 { + self.max_damage() + } + fn set_damage(&mut self, value: i32) -> Result<(), Self::Error> { + self.set_damage(value) + } + fn is_broken(&self) -> bool { + self.is_broken() + } + fn shrink(&mut self, amount: i32) { + self.shrink(amount); + } +} diff --git a/crates/horizon-world/src/component_patch.rs b/crates/horizon-world/src/component_patch.rs new file mode 100644 index 000000000..675ddce1d --- /dev/null +++ b/crates/horizon-world/src/component_patch.rs @@ -0,0 +1,196 @@ +//! Shared immutable prototypes with ordered, copy-on-write component patches. +//! Keys stand for stable component-type identities. Callers supply prototype +//! iteration order and values whose equality matches their native component. +use std::{fmt, sync::Arc}; +#[derive(Clone, Debug)] +pub struct Prototype<K, V>(Arc<Vec<(K, V)>>); +#[derive(Clone, Debug)] +pub struct Patch<K, V>(Arc<Vec<(K, Option<V>)>>); +#[derive(Clone, Debug)] +pub struct ComponentMap<K, V> { + prototype: Prototype<K, V>, + patch: Patch<K, V>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct MissingPrototype; +impl fmt::Display for MissingPrototype { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.write_str("removed component has no prototype value") + } +} +impl std::error::Error for MissingPrototype {} +fn index<K: Eq, V>(entries: &[(K, V)], key: &K) -> Option<usize> { + entries.iter().position(|(k, _)| k == key) +} +fn put<K: Eq, V>(entries: &mut Vec<(K, V)>, key: K, value: V) -> Option<V> { + if let Some(i) = index(entries, &key) { + Some(std::mem::replace(&mut entries[i].1, value)) + } else { + entries.push((key, value)); + None + } +} +fn remove<K: Eq, V>(entries: &mut Vec<(K, V)>, key: &K) -> Option<V> { + index(entries, key).map(|i| entries.remove(i).1) +} +fn map_equal<K: Eq, V: PartialEq>(a: &[(K, V)], b: &[(K, V)]) -> bool { + a.len() == b.len() + && a.iter() + .all(|(k, v)| index(b, k).is_some_and(|i| b[i].1 == *v)) +} +impl<K: Clone + Eq, V: Clone + PartialEq> Prototype<K, V> { + pub fn new(entries: impl IntoIterator<Item = (K, V)>) -> Self { + let mut values = Vec::new(); + for (k, v) in entries { + put(&mut values, k, v); + } + Self(Arc::new(values)) + } + pub fn get(&self, key: &K) -> Option<&V> { + index(&self.0, key).map(|i| &self.0[i].1) + } + pub fn entries(&self) -> &[(K, V)] { + &self.0 + } +} +impl<K: Clone + Eq, V: Clone + PartialEq> Patch<K, V> { + /// None is an explicit removal, distinct from a missing patch entry. + pub fn new(entries: impl IntoIterator<Item = (K, Option<V>)>) -> Self { + let mut values = Vec::new(); + for (k, v) in entries { + put(&mut values, k, v); + } + Self(Arc::new(values)) + } + pub fn entries(&self) -> &[(K, Option<V>)] { + &self.0 + } +} +impl<K: Clone + Eq, V: Clone + PartialEq> ComponentMap<K, V> { + pub fn new(prototype: Prototype<K, V>) -> Self { + Self { + prototype, + patch: Patch(Arc::new(Vec::new())), + } + } + pub fn from_patch(prototype: Prototype<K, V>, patch: &Patch<K, V>) -> Self { + let sanitized = patch.0.iter().all(|(k, v)| match v { + Some(v) => Some(v) != prototype.get(k), + None => prototype.get(k).is_some(), + }); + if sanitized { + Self { + prototype, + patch: patch.clone(), + } + } else { + let mut result = Self::new(prototype); + result.apply_patch(patch); + result + } + } + pub fn prototype(&self) -> &Prototype<K, V> { + &self.prototype + } + pub fn get(&self, key: &K) -> Option<&V> { + match index(&self.patch.0, key) { + Some(i) => self.patch.0[i].1.as_ref(), + None => self.prototype.get(key), + } + } + pub fn has_non_default(&self, key: &K) -> bool { + index(&self.patch.0, key).is_some() + } + /// Vanilla set returns the prototype value for an earlier removal marker. + /// An unsanitized removal with no prototype causes an error after mutation. + pub fn set(&mut self, key: K, value: Option<V>) -> Result<Option<V>, MissingPrototype> { + let base = self.prototype.get(&key).cloned(); + let entries = Arc::make_mut(&mut self.patch.0); + let previous = if value == base { + remove(entries, &key) + } else { + put(entries, key, value) + }; + match previous { + Some(Some(v)) => Ok(Some(v)), + Some(None) => base.map(Some).ok_or(MissingPrototype), + None => Ok(base), + } + } + pub fn remove(&mut self, key: K) -> Option<V> { + let base = self.prototype.get(&key).cloned(); + let entries = Arc::make_mut(&mut self.patch.0); + let previous = if base.is_some() { + put(entries, key, None) + } else { + remove(entries, &key) + }; + previous.unwrap_or(base) + } + pub fn apply_patch(&mut self, patch: &Patch<K, V>) { + let entries = Arc::make_mut(&mut self.patch.0); + for (k, v) in patch.0.iter() { + if v.as_ref() == self.prototype.get(k) { + remove(entries, k); + } else { + put(entries, k.clone(), v.clone()); + } + } + } + /// Restore preserves redundant values and removals, unlike apply_patch. + pub fn restore_patch(&mut self, patch: &Patch<K, V>) { + self.patch = patch.clone(); + } + pub fn clear_patch(&mut self) { + self.patch = Patch(Arc::new(Vec::new())); + } + pub fn as_patch(&self) -> Patch<K, V> { + self.patch.clone() + } + pub fn len(&self) -> usize { + self.entries().count() + } + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + /// Patched values precede untouched prototype values; removed keys vanish. + pub fn entries(&self) -> impl Iterator<Item = (&K, &V)> { + self.patch + .0 + .iter() + .filter_map(|(k, v)| v.as_ref().map(|v| (k, v))) + .chain( + self.prototype + .0 + .iter() + .filter(|(k, _)| !self.has_non_default(k)) + .map(|(k, v)| (k, v)), + ) + } + /// Key-set order instead starts with prototype keys, then applies the patch. + pub fn keys(&self) -> Vec<K> { + let mut keys: Vec<_> = self.prototype.0.iter().map(|(k, _)| k.clone()).collect(); + for (k, v) in self.patch.0.iter() { + let i = keys.iter().position(|key| key == k); + if v.is_some() { + if i.is_none() { + keys.push(k.clone()); + } + } else if let Some(i) = i { + keys.remove(i); + } + } + keys + } +} +impl<K: Eq, V: PartialEq> PartialEq for ComponentMap<K, V> { + fn eq(&self, other: &Self) -> bool { + map_equal(&self.prototype.0, &other.prototype.0) && map_equal(&self.patch.0, &other.patch.0) + } +} + +impl<K: Eq, V: PartialEq> PartialEq for Patch<K, V> { + fn eq(&self, other: &Self) -> bool { + map_equal(&self.0, &other.0) + } +} diff --git a/crates/horizon-world/src/compression.rs b/crates/horizon-world/src/compression.rs new file mode 100644 index 000000000..0bdfb6091 --- /dev/null +++ b/crates/horizon-world/src/compression.rs @@ -0,0 +1,227 @@ +//! Region codecs, including lz4-java's block framing (not the LZ4 frame format). +use flate2::{Compression as Level, Decompress, FlushDecompress, Status}; +use std::io::{self, Read, Write}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum Compression { + Gzip = 1, + Zlib = 2, + None = 3, + Lz4 = 4, +} + +pub(crate) fn invalid(message: impl Into<String>) -> io::Error { + io::Error::new(io::ErrorKind::InvalidData, message.into()) +} + +impl TryFrom<u8> for Compression { + type Error = io::Error; + fn try_from(value: u8) -> io::Result<Self> { + match value { + 1 => Ok(Self::Gzip), + 2 => Ok(Self::Zlib), + 3 => Ok(Self::None), + 4 => Ok(Self::Lz4), + _ => Err(invalid(format!( + "unsupported region compression ID {value}" + ))), + } + } +} + +impl Compression { + pub fn decode(self, bytes: &[u8], max_output: usize) -> io::Result<Vec<u8>> { + match self { + Self::None => { + if bytes.len() > max_output { + return Err(invalid("decompression limit exceeded")); + } + Ok(bytes.to_vec()) + } + Self::Gzip => { + let decoder = flate2::read::MultiGzDecoder::new(bytes); + let mut output = Vec::new(); + decoder + .take((max_output as u64).saturating_add(1)) + .read_to_end(&mut output)?; + if output.len() > max_output { + return Err(invalid("decompression limit exceeded")); + } + Ok(output) + } + Self::Zlib => { + let mut decoder = Decompress::new(true); + let mut output = Vec::new(); + let mut block = [0; 8192]; + loop { + let before_in = decoder.total_in(); + let before_out = decoder.total_out(); + let status = decoder + .decompress( + &bytes[before_in as usize..], + &mut block, + FlushDecompress::None, + ) + .map_err(|e| invalid(e.to_string()))?; + let produced = (decoder.total_out() - before_out) as usize; + if produced > max_output.saturating_sub(output.len()) { + return Err(invalid("decompression limit exceeded")); + } + output.extend_from_slice(&block[..produced]); + if status == Status::StreamEnd { + return Ok(output); + } + if decoder.total_in() == before_in && produced == 0 { + return Err(invalid("truncated zlib stream")); + } + } + } + Self::Lz4 => decode_lz4(bytes, max_output), + } + } + + pub fn encode(self, bytes: &[u8]) -> io::Result<Vec<u8>> { + match self { + Self::None => Ok(bytes.to_vec()), + Self::Gzip => { + let mut encoder = flate2::write::GzEncoder::new(Vec::new(), Level::default()); + encoder.write_all(bytes)?; + encoder.finish() + } + Self::Zlib => { + let mut encoder = flate2::write::ZlibEncoder::new(Vec::new(), Level::default()); + encoder.write_all(bytes)?; + encoder.finish() + } + Self::Lz4 => Ok(encode_lz4(bytes)), + } + } +} + +const MAGIC: &[u8; 8] = b"LZ4Block"; +fn checksum(bytes: &[u8]) -> u32 { + // The Checksum adapter used by the pinned Java library masks to 28 bits. + xxhash_rust::xxh32::xxh32(bytes, 0x9747_b28c) & 0x0fff_ffff +} + +fn decode_lz4(mut bytes: &[u8], max_output: usize) -> io::Result<Vec<u8>> { + let mut output = Vec::new(); + loop { + let header = bytes + .get(..21) + .ok_or_else(|| invalid("truncated LZ4 header"))?; + if &header[..8] != MAGIC { + return Err(invalid("invalid LZ4 block magic")); + } + let method = header[8] & 0xf0; + if !matches!(method, 0x10 | 0x20) { + return Err(invalid("invalid LZ4 block method")); + } + let compressed = u32::from_le_bytes(header[9..13].try_into().unwrap()) as usize; + let raw = u32::from_le_bytes(header[13..17].try_into().unwrap()) as usize; + let expected = u32::from_le_bytes(header[17..21].try_into().unwrap()); + if raw > (1 << (10 + (header[8] & 15))) + || (raw == 0) != (compressed == 0) + || (method == 0x10 && raw != compressed) + { + return Err(invalid("invalid LZ4 block lengths")); + } + bytes = &bytes[21..]; + if raw == 0 { + if expected != 0 { + return Err(invalid("invalid LZ4 terminator checksum")); + } + return Ok(output); + } + if raw > max_output.saturating_sub(output.len()) { + return Err(invalid("decompression limit exceeded")); + } + let block = bytes + .get(..compressed) + .ok_or_else(|| invalid("truncated LZ4 payload"))?; + let start = output.len(); + if method == 0x10 { + output.extend_from_slice(block); + } else { + output.resize(start + raw, 0); + let actual = lz4_flex::block::decompress_into(block, &mut output[start..]) + .map_err(|e| invalid(e.to_string()))?; + if actual != raw { + return Err(invalid("LZ4 decoded length mismatch")); + } + } + if checksum(&output[start..]) != expected { + return Err(invalid("LZ4 checksum mismatch")); + } + bytes = &bytes[compressed..]; + } +} + +fn encode_lz4(bytes: &[u8]) -> Vec<u8> { + let mut output = Vec::new(); + for block in bytes.chunks(65536) { + let compressed = lz4_flex::block::compress(block); + let (token, payload) = if compressed.len() < block.len() { + (0x26, compressed.as_slice()) + } else { + (0x16, block) + }; + output.extend_from_slice(MAGIC); + output.push(token); + output.extend_from_slice(&(payload.len() as u32).to_le_bytes()); + output.extend_from_slice(&(block.len() as u32).to_le_bytes()); + output.extend_from_slice(&checksum(block).to_le_bytes()); + output.extend_from_slice(payload); + } + output.extend_from_slice(MAGIC); + output.push(0x16); + output.extend_from_slice(&[0; 12]); + output +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn all_codecs_roundtrip_and_enforce_limits() { + for codec in [ + Compression::Gzip, + Compression::Zlib, + Compression::None, + Compression::Lz4, + ] { + for bytes in [ + vec![], + vec![0; 131073], + (0..262144).map(|i| (i * 37) as u8).collect(), + ] { + let encoded = codec.encode(&bytes).unwrap(); + assert_eq!(codec.decode(&encoded, bytes.len()).unwrap(), bytes); + if !bytes.is_empty() { + assert!(codec.decode(&encoded, bytes.len() - 1).is_err()); + } + if codec != Compression::None { + assert!( + codec + .decode(&encoded[..encoded.len() - 1], bytes.len()) + .is_err() + ); + } + } + } + } + #[test] + fn checksums_reject_corruption() { + for codec in [Compression::Gzip, Compression::Zlib, Compression::Lz4] { + let mut encoded = codec.encode(b"Horizon world data").unwrap(); + let i = if codec == Compression::Lz4 { + 17 + } else { + encoded.len() - 5 + }; + encoded[i] ^= 1; + assert!(codec.decode(&encoded, 1000).is_err()); + } + } +} diff --git a/crates/horizon-world/src/consumable.rs b/crates/horizon-world/src/consumable.rs new file mode 100644 index 000000000..1e504afbe --- /dev/null +++ b/crates/horizon-world/src/consumable.rs @@ -0,0 +1,208 @@ +//! Consumable component timing and ordered particle/sound emission. +use horizon_core::random::RandomSource; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum UseAnimation { + None, + Eat, + Drink, + Block, + Bow, + Trident, + Crossbow, + Spyglass, + TootHorn, + Brush, + Bundle, + Spear, +} + +#[derive(Clone, Debug)] +pub struct Consumable<S, E = ()> { + pub seconds: f32, + pub animation: UseAnimation, + pub sound: S, + pub particles: bool, + pub effects: Vec<E>, +} +impl<S: PartialEq, E: PartialEq> PartialEq for Consumable<S, E> { + fn eq(&self, other: &Self) -> bool { + let bits = |v: f32| if v.is_nan() { 0x7fc00000 } else { v.to_bits() }; + bits(self.seconds) == bits(other.seconds) + && self.animation == other.animation + && self.sound == other.sound + && self.particles == other.particles + && self.effects == other.effects + } +} + +pub trait EmissionWorld { + type Error; + type Stack: Clone; + type Sound: Clone; + type Random: Copy; + type Source: RandomSource; + /// This is the supplied random source, which may differ from the actor's + /// direct field used inside spawn_item_particles. + fn random_source(&mut self, random: Self::Random) -> &mut Self::Source; + fn spawn_item_particles(&mut self, stack: Self::Stack, count: i32) -> Result<(), Self::Error>; + /// Native class/interface membership, not a virtual actor call. + fn overrides_consume_sound(&self) -> bool; + fn consume_sound(&mut self, stack: Self::Stack) -> Result<Self::Sound, Self::Error>; + fn play_sound( + &mut self, + sound: Self::Sound, + volume: f32, + pitch: f32, + ) -> Result<(), Self::Error>; +} +impl<S, E> Consumable<S, E> { + pub fn ticks(&self) -> i32 { + (self.seconds * 20.0) as i32 + } + pub fn should_emit(&self, remaining: i32) -> bool { + let elapsed = self.ticks().wrapping_sub(remaining); + let threshold = (self.ticks() as f32 * 0.21875) as i32; + elapsed > threshold && remaining % 4 == 0 + } +} +impl<S: Clone, E> Consumable<S, E> { + pub fn emit<W: EmissionWorld<Sound = S>>( + &self, + world: &mut W, + random: W::Random, + stack: W::Stack, + count: i32, + ) -> Result<(), W::Error> { + let source = world.random_source(random); + let eat_volume = if source.next_boolean() { 0.5 } else { 1.0 }; + let eat_pitch = source.triangle_float(1.0, 0.2); + let drink_pitch = 0.9f32 + source.next_float() * (1.0f32 - 0.9f32); + let (volume, pitch) = if self.animation == UseAnimation::Drink { + (0.5, drink_pitch) + } else { + (eat_volume, eat_pitch) + }; + if self.particles { + world.spawn_item_particles(stack.clone(), count)?; + } + let sound = if world.overrides_consume_sound() { + world.consume_sound(stack)? + } else { + self.sound.clone() + }; + world.play_sound(sound, volume, pitch) + } +} + +use crate::{food_properties::FoodProperties, item_stack_refs::StackRef}; + +/// Actor and component services used around the concrete emission and stack +/// kernels. Listener enumeration must retain the component map's native order. +pub trait ConsumptionWorld<I, K, V, E>: EmissionWorld<Stack = StackRef<I, K, V>> { + type Level: Copy; + type Hand; + fn food(&self, stack: &StackRef<I, K, V>) -> Option<FoodProperties>; + fn is_player(&self) -> bool; + fn can_eat(&mut self, always: bool) -> Result<bool, Self::Error>; + fn start_using(&mut self, hand: Self::Hand) -> Result<(), Self::Error>; + fn level(&mut self) -> Result<Self::Level, Self::Error>; + fn get_random(&mut self) -> Result<Self::Random, Self::Error>; + fn is_server_player(&self) -> bool; + fn award_item_used(&mut self, item: I) -> Result<(), Self::Error>; + fn consume_criterion(&mut self, stack: StackRef<I, K, V>) -> Result<(), Self::Error>; + fn consume_listeners( + &mut self, + level: Self::Level, + stack: StackRef<I, K, V>, + component: &Consumable<Self::Sound, E>, + ) -> Result<(), Self::Error>; + fn is_client(&mut self, level: Self::Level) -> Result<bool, Self::Error>; + fn apply_effect( + &mut self, + effect: &E, + level: Self::Level, + stack: StackRef<I, K, V>, + ) -> Result<bool, Self::Error>; + fn consume_event(&mut self, drink: bool) -> Result<(), Self::Error>; + fn infinite_materials(&mut self) -> Result<bool, Self::Error>; +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum ConsumeResult<T> { + Fail, + /// Native CONSUME uses no swing; timed use has no transformed stack. + Consume { + transformed: Option<T>, + }, +} +impl<S: Clone, E> Consumable<S, E> { + pub fn can_consume<I, K, V, W: ConsumptionWorld<I, K, V, E, Sound = S>>( + &self, + world: &mut W, + stack: &StackRef<I, K, V>, + ) -> Result<bool, W::Error> { + let food = world.food(stack); + if let Some(food) = food { + if world.is_player() { + return world.can_eat(food.can_always_eat); + } + } + Ok(true) + } + pub fn start< + I: Copy + Eq, + K: Clone + Eq, + V: Clone + PartialEq, + W: ConsumptionWorld<I, K, V, E, Sound = S>, + >( + &self, + world: &mut W, + stack: StackRef<I, K, V>, + hand: W::Hand, + ) -> Result<ConsumeResult<StackRef<I, K, V>>, W::Error> { + if !self.can_consume(world, &stack)? { + return Ok(ConsumeResult::Fail); + } + if self.ticks() > 0 { + world.start_using(hand)?; + Ok(ConsumeResult::Consume { transformed: None }) + } else { + let level = world.level()?; + let stack = self.on_consume(world, level, stack)?; + Ok(ConsumeResult::Consume { + transformed: Some(stack), + }) + } + } + pub fn on_consume< + I: Copy + Eq, + K: Clone + Eq, + V: Clone + PartialEq, + W: ConsumptionWorld<I, K, V, E, Sound = S>, + >( + &self, + world: &mut W, + level: W::Level, + stack: StackRef<I, K, V>, + ) -> Result<StackRef<I, K, V>, W::Error> { + let random = world.get_random()?; + self.emit(world, random, stack.clone(), 16)?; + if world.is_server_player() { + let item = stack.read().item(); + world.award_item_used(item)?; + world.consume_criterion(stack.clone())?; + } + world.consume_listeners(level, stack.clone(), self)?; + if !world.is_client(level)? { + for effect in &self.effects { + let _ = world.apply_effect(effect, level, stack.clone())?; + } + } + world.consume_event(self.animation == UseAnimation::Drink)?; + if !world.infinite_materials()? { + stack.write().shrink(1); + } + Ok(stack) + } +} diff --git a/crates/horizon-world/src/consume_effect.rs b/crates/horizon-world/src/consume_effect.rs new file mode 100644 index 000000000..8f0bdd4a7 --- /dev/null +++ b/crates/horizon-world/src/consume_effect.rs @@ -0,0 +1,107 @@ +//! Concrete non-teleport consume effects. Actor status storage and sound +//! delivery are supplied by the world; effect instance copies are native copies. +use crate::status_effect::EffectInstance; +use horizon_core::{position::BlockPos, random::RandomSource}; + +#[derive(Clone, Debug)] +pub enum ConsumeEffect<H, S, Set = Vec<H>> { + ApplyStatus { + effects: Vec<EffectInstance<H>>, + probability: f32, + }, + RemoveStatus(Set), + ClearStatus, + PlaySound(S), +} +impl<H: PartialEq, S: PartialEq, Set: PartialEq> PartialEq for ConsumeEffect<H, S, Set> { + fn eq(&self, other: &Self) -> bool { + match (self, other) { + ( + Self::ApplyStatus { + effects: a, + probability: p, + }, + Self::ApplyStatus { + effects: b, + probability: q, + }, + ) => { + let bits = |v: f32| if v.is_nan() { 0x7fc00000 } else { v.to_bits() }; + a == b && bits(*p) == bits(*q) + } + (Self::RemoveStatus(a), Self::RemoveStatus(b)) => a == b, + (Self::ClearStatus, Self::ClearStatus) => true, + (Self::PlaySound(a), Self::PlaySound(b)) => a == b, + _ => false, + } + } +} +pub trait EffectWorld<H, S, Set> { + type Error; + type Level: Copy; + type Random: Copy; + type Source: RandomSource; + type SoundCategory; + fn get_random(&mut self) -> Result<Self::Random, Self::Error>; + fn random_source(&mut self, random: Self::Random) -> &mut Self::Source; + fn add_effect(&mut self, effect: EffectInstance<H>) -> Result<bool, Self::Error>; + /// Resolve direct or named holder sets when execution begins. Native tag + /// rebinding replaces the list; the current iteration retains its list. + fn effect_set(&self, set: &Set) -> Vec<H>; + fn remove_effect(&mut self, effect: H) -> Result<bool, Self::Error>; + fn remove_all_effects(&mut self) -> Result<bool, Self::Error>; + fn block_position(&mut self) -> Result<BlockPos, Self::Error>; + fn sound_category(&mut self) -> Result<Self::SoundCategory, Self::Error>; + /// Excluded entity is null; volume and pitch are both one. + fn play_sound( + &mut self, + level: Self::Level, + position: BlockPos, + sound: S, + category: Self::SoundCategory, + ) -> Result<(), Self::Error>; +} +impl<H: Clone, S: Clone, Set> ConsumeEffect<H, S, Set> { + pub fn apply<W: EffectWorld<H, S, Set>>( + &self, + world: &mut W, + level: W::Level, + ) -> Result<bool, W::Error> { + match self { + Self::ApplyStatus { + effects, + probability, + } => { + let random = world.get_random()?; + if world.random_source(random).next_float() >= *probability { + return Ok(false); + } + let mut changed = false; + for effect in effects { + if world.add_effect(effect.copy_instance())? { + changed = true; + } + } + Ok(changed) + } + Self::RemoveStatus(effects) => { + let effects = world.effect_set(effects); + let mut changed = false; + for effect in effects { + if world.remove_effect(effect)? { + changed = true; + } + } + Ok(changed) + } + Self::ClearStatus => world.remove_all_effects(), + Self::PlaySound(sound) => { + let position = world.block_position()?; + let sound = sound.clone(); + let category = world.sound_category()?; + world.play_sound(level, position, sound, category)?; + Ok(true) + } + } + } +} diff --git a/crates/horizon-world/src/damage_immunity.rs b/crates/horizon-world/src/damage_immunity.rs new file mode 100644 index 000000000..c71be64da --- /dev/null +++ b/crates/horizon-world/src/damage_immunity.rs @@ -0,0 +1,73 @@ +//! Entity, living and player damage-immunity predicate ordering. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ImmunityTag { + BypassesInvulnerability, + Fire, + Fall, + Drowning, + Freezing, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DamageRule { + Drowning, + Fall, + Fire, + Freeze, +} +pub trait ImmunityWorld { + type Error; + fn removed(&self) -> bool; + fn permanently_invulnerable(&mut self) -> Result<bool, Self::Error>; + fn temporarily_invulnerable(&mut self) -> Result<bool, Self::Error>; + fn invulnerable(&mut self) -> Result<bool, Self::Error> { + entity_invulnerable(self) + } + fn tag(&mut self, tag: ImmunityTag) -> Result<bool, Self::Error>; + fn creative_source(&mut self) -> Result<bool, Self::Error>; + fn fire_immune(&mut self) -> Result<bool, Self::Error>; + fn fall_immune(&mut self) -> Result<bool, Self::Error>; + fn enchantment_immunity(&mut self) -> Result<bool, Self::Error>; + fn damage_rule(&mut self, rule: DamageRule) -> Result<bool, Self::Error>; + fn changing_dimension(&mut self) -> Result<bool, Self::Error>; + fn ender_pearl(&mut self) -> Result<bool, Self::Error>; + fn client_loaded(&mut self) -> Result<bool, Self::Error>; +} +pub fn entity_invulnerable<W: ImmunityWorld + ?Sized>(w: &mut W) -> Result<bool, W::Error> { + Ok(w.permanently_invulnerable()? || w.temporarily_invulnerable()?) +} +pub fn base_immunity<W: ImmunityWorld + ?Sized>(w: &mut W) -> Result<bool, W::Error> { + if w.removed() { + return Ok(true); + } + if w.invulnerable()? && !w.tag(ImmunityTag::BypassesInvulnerability)? && !w.creative_source()? { + return Ok(true); + } + if w.tag(ImmunityTag::Fire)? && w.fire_immune()? { + return Ok(true); + } + Ok(w.tag(ImmunityTag::Fall)? && w.fall_immune()?) +} +pub fn living_immunity<W: ImmunityWorld + ?Sized>(w: &mut W) -> Result<bool, W::Error> { + Ok(base_immunity(w)? || w.enchantment_immunity()?) +} +pub fn player_immunity<W: ImmunityWorld + ?Sized>(w: &mut W) -> Result<bool, W::Error> { + if living_immunity(w)? { + return Ok(true); + } + for (tag, rule) in [ + (ImmunityTag::Drowning, DamageRule::Drowning), + (ImmunityTag::Fall, DamageRule::Fall), + (ImmunityTag::Fire, DamageRule::Fire), + (ImmunityTag::Freezing, DamageRule::Freeze), + ] { + if w.tag(tag)? { + return Ok(!w.damage_rule(rule)?); + } + } + Ok(false) +} +pub fn server_player_immunity<W: ImmunityWorld + ?Sized>(w: &mut W) -> Result<bool, W::Error> { + Ok(player_immunity(w)? + || (w.changing_dimension()? && !w.ender_pearl()?) + || !w.client_loaded()?) +} diff --git a/crates/horizon-world/src/damage_reduction.rs b/crates/horizon-world/src/damage_reduction.rs new file mode 100644 index 000000000..0bcfce5dd --- /dev/null +++ b/crates/horizon-world/src/damage_reduction.rs @@ -0,0 +1,78 @@ +//! Living damage-source bypass, armor and resistance/protection dispatch. +use crate::{ + combat_rules::{self, ArmorWorld}, + living_damage::{STAT_LIMIT, positive, stat_amount}, +}; +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Bypass { + Armor, + Effects, + Resistance, + Enchantments, +} +pub trait DamageReductionWorld: ArmorWorld { + fn bypasses(&mut self, kind: Bypass) -> Result<bool, Self::Error>; + fn hurt_armor(&mut self, damage: f32) -> Result<(), Self::Error>; + fn armor_value(&mut self) -> Result<i32, Self::Error>; + fn toughness_attribute(&mut self) -> Result<f64, Self::Error>; + fn has_resistance(&mut self) -> Result<bool, Self::Error>; + fn resistance_amplifier(&mut self) -> Result<i32, Self::Error>; + fn victim_is_server_player(&self) -> bool; + fn award_resisted(&mut self, amount: i32) -> Result<(), Self::Error>; + fn attacker_is_server_player(&mut self) -> Result<bool, Self::Error>; + /// Performs the second native attacker lookup before awarding its stat. + fn award_dealt_resisted(&mut self, amount: i32) -> Result<(), Self::Error>; + fn damage_protection(&mut self, level: Self::ServerLevel) -> Result<f32, Self::Error>; +} +pub fn armor_from_attribute(value: f64) -> i32 { + value.floor() as i32 +} +pub fn after_armor<W: DamageReductionWorld>(world: &mut W, damage: f32) -> Result<f32, W::Error> { + if world.bypasses(Bypass::Armor)? { + return Ok(damage); + } + world.hurt_armor(damage)?; + let armor = world.armor_value()? as f32; + let toughness = world.toughness_attribute()? as f32; + combat_rules::after_armor(world, damage, armor, toughness) +} +pub fn after_magic<W: DamageReductionWorld>( + world: &mut W, + mut damage: f32, +) -> Result<f32, W::Error> { + if world.bypasses(Bypass::Effects)? { + return Ok(damage); + } + if world.has_resistance()? && !world.bypasses(Bypass::Resistance)? { + let reduction = world + .resistance_amplifier()? + .wrapping_add(1) + .wrapping_mul(5); + let remainder = 25i32.wrapping_sub(reduction); + let original = damage; + damage = positive((damage * remainder as f32) / 25.0); + let resisted = original - damage; + if resisted > 0.0 && resisted < STAT_LIMIT { + if world.victim_is_server_player() { + world.award_resisted(stat_amount(resisted))?; + } else if world.attacker_is_server_player()? { + world.award_dealt_resisted(stat_amount(resisted))?; + } + } + } + if damage <= 0.0 { + return Ok(0.0); + } + if world.bypasses(Bypass::Enchantments)? { + return Ok(damage); + } + let protection = if let Some(level) = world.server_level()? { + world.damage_protection(level)? + } else { + 0.0 + }; + if protection > 0.0 { + damage = combat_rules::after_magic(damage, protection); + } + Ok(damage) +} diff --git a/crates/horizon-world/src/damage_source.rs b/crates/horizon-world/src/damage_source.rs new file mode 100644 index 000000000..6af30f736 --- /dev/null +++ b/crates/horizon-world/src/damage_source.rs @@ -0,0 +1,286 @@ +//! Version-checked damage definitions/tags and ordinary source identity queries. +//! Catalogs are immutable snapshots; runtime registry reload and wire IDs remain +//! separate from these local definition indices. +use crate::{ + DATA_VERSION, + compression::invalid, + worldgen::tags::{TagDefinitions, identifier}, +}; +use serde_json::Value; +use std::{ + collections::{BTreeMap, BTreeSet}, + io, +}; +#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct DamageTypeId(usize); +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Scaling { + Never, + LivingNonPlayer, + Always, +} +impl Scaling { + pub fn name(self) -> &'static str { + match self { + Self::Never => "never", + Self::LivingNonPlayer => "when_caused_by_living_non_player", + Self::Always => "always", + } + } +} +#[derive(Debug)] +pub struct Definition { + pub name: String, + pub message_id: String, + pub exhaustion: f32, + pub scaling: Scaling, + pub effects: String, + pub death_message_type: String, +} +#[derive(Debug)] +pub struct Catalog { + definitions: Vec<Definition>, + ids: BTreeMap<String, DamageTypeId>, + tags: BTreeMap<String, BTreeSet<DamageTypeId>>, +} +fn string(v: &Value) -> io::Result<&str> { + v.as_str() + .ok_or_else(|| invalid("expected damage catalog string")) +} +impl Catalog { + /// Imports native decoded definitions and resolves raw tag resources with + /// the shared tag implementation. No data-pack or network IDs are invented. + pub fn from_json(v: &Value, resources: &Value) -> io::Result<Self> { + if v["data_version"].as_i64() != Some(i64::from(DATA_VERSION)) { + return Err(invalid("damage catalog data version mismatch")); + } + let mut definitions = Vec::new(); + let mut ids = BTreeMap::new(); + for d in v["types"] + .as_array() + .ok_or_else(|| invalid("missing damage definitions"))? + { + let name = string(&d["id"])?; + if identifier(name).map_err(|e| invalid(e.to_string()))? != name + || ids + .insert(name.into(), DamageTypeId(definitions.len())) + .is_some() + { + return Err(invalid("noncanonical or duplicate damage type")); + } + let bits = string(&d["exhaustion"])?; + if bits.len() != 8 { + return Err(invalid("expected damage exhaustion float bits")); + } + let exhaustion = + f32::from_bits(u32::from_str_radix(bits, 16).map_err(|e| invalid(e.to_string()))?); + let scaling = match string(&d["scaling"])? { + "never" => Scaling::Never, + "when_caused_by_living_non_player" => Scaling::LivingNonPlayer, + "always" => Scaling::Always, + _ => return Err(invalid("unknown damage scaling")), + }; + let effects = string(&d["effects"])?; + if ![ + "hurt", "thorns", "drowning", "burning", "poking", "freezing", + ] + .contains(&effects) + { + return Err(invalid("unknown damage effects")); + } + let death = string(&d["death_message_type"])?; + if !["default", "fall_variants", "intentional_game_design"].contains(&death) { + return Err(invalid("unknown death message type")); + } + definitions.push(Definition { + name: name.into(), + message_id: string(&d["message_id"])?.into(), + exhaustion, + scaling, + effects: effects.into(), + death_message_type: death.into(), + }); + } + let mut tags = TagDefinitions::default(); + for (id, json) in resources + .as_object() + .ok_or_else(|| invalid("expected damage tag resources"))? + { + tags.apply_json(id, "vanilla", string(json)?) + .map_err(|e| invalid(e.to_string()))?; + } + let tags = tags + .build(|id, _| ids.get(id).copied()) + .map_err(|e| invalid(e.to_string()))?; + if !tags.missing.is_empty() { + return Err(invalid("unresolved required damage tag references")); + } + Ok(Self { + definitions, + ids, + tags: tags + .tags + .into_iter() + .map(|(id, v)| (id, v.into_iter().collect())) + .collect(), + }) + } + pub fn id(&self, name: &str) -> Option<DamageTypeId> { + self.ids.get(name).copied() + } + pub fn definition(&self, id: DamageTypeId) -> Option<&Definition> { + self.definitions.get(id.0) + } + pub fn entries(&self) -> impl Iterator<Item = (DamageTypeId, &Definition)> { + self.definitions + .iter() + .enumerate() + .map(|(i, d)| (DamageTypeId(i), d)) + } + pub fn tags(&self) -> impl Iterator<Item = &str> { + self.tags.keys().map(String::as_str) + } + pub fn in_tag(&self, id: DamageTypeId, tag: &str) -> bool { + self.tags.get(tag).is_some_and(|v| v.contains(&id)) + } + pub fn source<E: Copy + Eq>( + &self, + id: DamageTypeId, + direct: Option<E>, + causing: Option<E>, + position: Option<[f64; 3]>, + ) -> Option<DamageSource<'_, E>> { + self.definition(id)?; + Some(DamageSource { + catalog: self, + id, + direct, + causing, + position, + }) + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EntityKind { + Other, + Living, + Player, +} +pub trait SourceWorld { + type Error; + type Entity: Copy + Eq; + type Weapon; + fn kind(&self, entity: Self::Entity) -> EntityKind; + fn weapon(&mut self, entity: Self::Entity) -> Result<Option<Self::Weapon>, Self::Error>; + fn position(&mut self, entity: Self::Entity) -> Result<[f64; 3], Self::Error>; + /// Virtual getEntity dispatch is used by the creative-source predicate; + /// difficulty scaling deliberately reads the stored causing entity instead. + fn causing_entity( + &mut self, + stored: Option<Self::Entity>, + ) -> Result<Option<Self::Entity>, Self::Error>; + fn instabuild(&mut self, player: Self::Entity) -> Result<bool, Self::Error>; +} +#[derive(Clone, Copy, Debug)] +pub struct DamageSource<'a, E> { + catalog: &'a Catalog, + id: DamageTypeId, + direct: Option<E>, + causing: Option<E>, + position: Option<[f64; 3]>, +} +impl<E: Copy + Eq> DamageSource<'_, E> { + pub fn definition(&self) -> &Definition { + &self.catalog.definitions[self.id.0] + } + pub fn type_id(&self) -> DamageTypeId { + self.id + } + pub fn is_type(&self, name: &str) -> bool { + self.definition().name == name + } + pub fn in_tag(&self, tag: &str) -> bool { + self.catalog.in_tag(self.id, tag) + } + pub fn bypasses(&self, kind: crate::damage_reduction::Bypass) -> bool { + use crate::damage_reduction::Bypass; + self.in_tag(match kind { + Bypass::Armor => "minecraft:bypasses_armor", + Bypass::Effects => "minecraft:bypasses_effects", + Bypass::Resistance => "minecraft:bypasses_resistance", + Bypass::Enchantments => "minecraft:bypasses_enchantments", + }) + } + pub fn hurt_tag(&self, tag: crate::living_hurt::HurtTag) -> bool { + use crate::living_hurt::HurtTag; + self.in_tag(match tag { + HurtTag::Fire => "minecraft:is_fire", + HurtTag::Freezing => "minecraft:is_freezing", + HurtTag::DamagesHelmet => "minecraft:damages_helmet", + HurtTag::BypassesCooldown => "minecraft:bypasses_cooldown", + HurtTag::NoImpact => "minecraft:no_impact", + HurtTag::NoKnockback => "minecraft:no_knockback", + }) + } + pub fn immunity_tag(&self, tag: crate::damage_immunity::ImmunityTag) -> bool { + use crate::damage_immunity::ImmunityTag; + self.in_tag(match tag { + ImmunityTag::BypassesInvulnerability => "minecraft:bypasses_invulnerability", + ImmunityTag::Fire => "minecraft:is_fire", + ImmunityTag::Fall => "minecraft:is_fall", + ImmunityTag::Drowning => "minecraft:is_drowning", + ImmunityTag::Freezing => "minecraft:is_freezing", + }) + } + pub fn direct_entity(&self) -> Option<E> { + self.direct + } + pub fn causing_entity(&self) -> Option<E> { + self.causing + } + pub fn is_direct(&self) -> bool { + self.direct == self.causing + } + pub fn position_raw(&self) -> Option<[f64; 3]> { + self.position + } + pub fn food_exhaustion(&self) -> f32 { + self.definition().exhaustion + } + pub fn scales_with_difficulty<W: SourceWorld<Entity = E>>(&self, w: &W) -> bool { + match self.definition().scaling { + Scaling::Never => false, + Scaling::Always => true, + Scaling::LivingNonPlayer => self + .causing + .is_some_and(|e| w.kind(e) == EntityKind::Living), + } + } + pub fn weapon<W: SourceWorld<Entity = E>>( + &self, + w: &mut W, + ) -> Result<Option<W::Weapon>, W::Error> { + match self.direct { + Some(e) => w.weapon(e), + None => Ok(None), + } + } + pub fn position<W: SourceWorld<Entity = E>>( + &self, + w: &mut W, + ) -> Result<Option<[f64; 3]>, W::Error> { + if let Some(p) = self.position { + return Ok(Some(p)); + } + match self.direct { + Some(e) => w.position(e).map(Some), + None => Ok(None), + } + } + pub fn creative_player<W: SourceWorld<Entity = E>>(&self, w: &mut W) -> Result<bool, W::Error> { + match w.causing_entity(self.causing)? { + Some(e) if w.kind(e) == EntityKind::Player => w.instabuild(e), + _ => Ok(false), + } + } +} diff --git a/crates/horizon-world/src/dynamic_support.rs b/crates/horizon-world/src/dynamic_support.rs new file mode 100644 index 000000000..5a3e12afd --- /dev/null +++ b/crates/horizon-world/src/dynamic_support.rs @@ -0,0 +1,254 @@ +//! Uncached support-shape selection. Block entities are queried through snapshots; +//! their lifecycle and active moving-piston collision generation are separate. +use crate::{block_support::SupportType, chunk::BlockState, compression::invalid}; +use horizon_core::{ + geometry::{Aabb, Direction, ShapeError, ShapeOp, Vec3, VoxelShape}, + position::BlockPos, + random::position_seed, +}; +use std::{io, sync::OnceLock}; + +pub trait DynamicSupportWorld { + type Error; + /// None represents a missing block entity or a different block-entity type. + fn shulker_is_closed(&mut self, position: [i32; 3]) -> Result<Option<bool>, Self::Error>; + /// Invoke the active moving-piston entity's collision calculation when it + /// exists. None represents a missing entity or a different entity type. + fn moving_piston_shape( + &mut self, + position: [i32; 3], + ) -> Result<Option<VoxelShape>, Self::Error>; +} +#[derive(Debug)] +pub enum DynamicSupportError<E> { + World(E), + Shape(ShapeError), +} +impl<E: std::fmt::Display> std::fmt::Display for DynamicSupportError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Shape(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for DynamicSupportError<E> {} +#[derive(Clone, Debug)] +pub struct DynamicSupport { + kind: Kind, +} +#[derive(Clone, Debug)] +enum Kind { + Bamboo, + Speleothem(usize), + Scaffolding, + PowderSnow, + Shulker(Direction), + MovingPiston, +} +impl DynamicSupport { + /// Select behavior from a validated registry descriptor. None requests a + /// different implementation (usually the immutable cached-support branch). + pub fn from_state(state: &BlockState) -> io::Result<Option<Self>> { + let property = |name: &str| { + state + .properties + .get(name) + .map(String::as_str) + .ok_or_else(|| invalid("missing dynamic support property")) + }; + let kind = match state.name.as_str() { + "minecraft:bamboo" => Kind::Bamboo, + "minecraft:pointed_dripstone" | "minecraft:sulfur_spike" => { + let down = match property("vertical_direction")? { + "down" => true, + "up" => false, + _ => return Err(invalid("invalid speleothem direction")), + }; + let shape = match property("thickness")? { + "tip_merge" => 0, + "tip" => { + if down { + 2 + } else { + 1 + } + } + "frustum" => 3, + "middle" => 4, + "base" => 5, + _ => return Err(invalid("invalid speleothem thickness")), + }; + Kind::Speleothem(shape) + } + "minecraft:scaffolding" => Kind::Scaffolding, + "minecraft:powder_snow" => Kind::PowderSnow, + "minecraft:moving_piston" => Kind::MovingPiston, + name if shulker(name) => Kind::Shulker(match property("facing")? { + "down" => Direction::Down, + "up" => Direction::Up, + "north" => Direction::North, + "south" => Direction::South, + "west" => Direction::West, + "east" => Direction::East, + _ => return Err(invalid("invalid shulker facing")), + }), + _ => return Ok(None), + }; + Ok(Some(Self { kind })) + } + pub fn offset(&self, position: [i32; 3]) -> Vec3 { + let maximum = match self.kind { + Kind::Bamboo => 0.25f32, + Kind::Speleothem(_) => 0.125f32, + _ => return Vec3::ZERO, + }; + let seed = position_seed(BlockPos::new(position[0], 0, position[2])); + let component = |shift: u32| { + let fraction = ((seed >> shift) & 15i64) as f32 / 15.0f32; + ((f64::from(fraction) - 0.5) * 0.5).clamp(-f64::from(maximum), f64::from(maximum)) + }; + Vec3::new(component(0), 0.0, component(8)) + } + pub fn shape<W: DynamicSupportWorld>( + &self, + world: &mut W, + position: [i32; 3], + ) -> Result<VoxelShape, DynamicSupportError<W::Error>> { + Ok(match self.kind { + Kind::Bamboo => { + static SHAPE: OnceLock<VoxelShape> = OnceLock::new(); + SHAPE + .get_or_init(|| column(3.0, 0.0, 16.0)) + .moved(self.offset(position)) + } + Kind::Speleothem(index) => { + static SHAPES: OnceLock<[VoxelShape; 6]> = OnceLock::new(); + SHAPES.get_or_init(|| { + [ + column(6.0, 0.0, 16.0), + column(6.0, 0.0, 11.0), + column(6.0, 5.0, 16.0), + column(8.0, 0.0, 16.0), + column(10.0, 0.0, 16.0), + column(12.0, 0.0, 16.0), + ] + })[index] + .moved(self.offset(position)) + } + Kind::Scaffolding => scaffolding_stable_shape(), + Kind::PowderSnow => VoxelShape::empty(), + Kind::Shulker(facing) => { + if world + .shulker_is_closed(position) + .map_err(DynamicSupportError::World)? + == Some(false) + { + static SHAPES: OnceLock<[VoxelShape; 6]> = OnceLock::new(); + SHAPES.get_or_init(|| { + Direction::ALL.map(|direction| { + let mut min = [0.0; 3]; + let mut max = [1.0; 3]; + for (i, n) in direction.normal().into_iter().enumerate() { + if n < 0 { + max[i] = 0.0625; + } else if n > 0 { + min[i] = 0.9375; + } + } + box_shape(min, max) + }) + })[facing.opposite() as usize] + .clone() + } else { + VoxelShape::block() + } + } + Kind::MovingPiston => world + .moving_piston_shape(position) + .map_err(DynamicSupportError::World)? + .unwrap_or_else(VoxelShape::empty), + }) + } + pub fn collision_shape<W: crate::block_collision::DynamicCollisionWorld>( + &self, + world: &mut W, + position: [i32; 3], + ) -> Result<VoxelShape, DynamicSupportError<W::Error>> { + if let Kind::Shulker(direction) = self.kind { + return match world + .shulker_collision_state(position) + .map_err(DynamicSupportError::World)? + { + Some(snapshot) => VoxelShape::from_box(snapshot.bounding_box(direction)) + .map_err(DynamicSupportError::Shape), + None => Ok(VoxelShape::block()), + }; + } + // Empty collision context uses the stable scaffolding shape, empty + // powder snow, and the same bamboo/speleothem/piston geometry as support. + self.shape(world, position) + } + pub fn is_face_sturdy<W: DynamicSupportWorld>( + &self, + world: &mut W, + position: [i32; 3], + direction: Direction, + support: SupportType, + ) -> Result<bool, DynamicSupportError<W::Error>> { + support + .is_supporting(&self.shape(world, position)?, direction) + .map_err(DynamicSupportError::Shape) + } +} +/// Shared no-context support and context-selected stable scaffold geometry. +pub(crate) fn scaffolding_stable_shape() -> VoxelShape { + static SHAPE: OnceLock<VoxelShape> = OnceLock::new(); + SHAPE + .get_or_init(|| { + let mut legs = VoxelShape::empty(); + for [x, z] in [[0.0, 0.0], [0.875, 0.0], [0.875, 0.875], [0.0, 0.875]] { + let leg = box_shape([x, 0.0, z], [x + 0.125, 1.0, z + 0.125]); + legs = legs.join(&leg, ShapeOp::OR).expect("bounded scaffold legs"); + } + column(16.0, 14.0, 16.0) + .join(&legs, ShapeOp::OR) + .expect("bounded scaffold support") + }) + .clone() +} + +fn box_shape(min: [f64; 3], max: [f64; 3]) -> VoxelShape { + VoxelShape::from_box(Aabb::new( + Vec3::new(min[0], min[1], min[2]), + Vec3::new(max[0], max[1], max[2]), + )) + .expect("bounded support shape") +} +fn column(width: f64, min_y: f64, max_y: f64) -> VoxelShape { + let min = (8.0 - width / 2.0) / 16.0; + let max = (8.0 + width / 2.0) / 16.0; + box_shape([min, min_y / 16.0, min], [max, max_y / 16.0, max]) +} +fn shulker(name: &str) -> bool { + matches!( + name, + "minecraft:shulker_box" + | "minecraft:white_shulker_box" + | "minecraft:orange_shulker_box" + | "minecraft:magenta_shulker_box" + | "minecraft:light_blue_shulker_box" + | "minecraft:yellow_shulker_box" + | "minecraft:lime_shulker_box" + | "minecraft:pink_shulker_box" + | "minecraft:gray_shulker_box" + | "minecraft:light_gray_shulker_box" + | "minecraft:cyan_shulker_box" + | "minecraft:purple_shulker_box" + | "minecraft:blue_shulker_box" + | "minecraft:brown_shulker_box" + | "minecraft:green_shulker_box" + | "minecraft:red_shulker_box" + | "minecraft:black_shulker_box" + ) +} diff --git a/crates/horizon-world/src/edge_backoff.rs b/crates/horizon-world/src/edge_backoff.rs new file mode 100644 index 000000000..7299d8c14 --- /dev/null +++ b/crates/horizon-world/src/edge_backoff.rs @@ -0,0 +1,108 @@ +//! Player crouching edge backoff and its lazy collision-free probes. +use horizon_core::geometry::{Aabb, Vec3}; + +pub trait EdgeBackoffWorld { + type Error; + fn max_up_step(&mut self) -> Result<f32, Self::Error>; + fn staying_on_ground_surface(&mut self) -> Result<bool, Self::Error>; + fn on_ground(&mut self) -> Result<bool, Self::Error>; + fn no_collision(&mut self, bounds: Aabb) -> Result<bool, Self::Error>; +} +pub struct EdgeBackoffInput { + pub movement: Vec3, + pub bounds: Aabb, + pub flying: bool, + /// True only for native SELF and PLAYER mover types. + pub self_or_player: bool, + pub fall_distance: f64, + pub query_budget: usize, +} +#[derive(Debug)] +pub enum EdgeBackoffError<E> { + World(E), + QueryBudget, +} +impl<E: std::fmt::Display> std::fmt::Display for EdgeBackoffError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::QueryBudget => f.write_str("edge backoff collision query budget exhausted"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for EdgeBackoffError<E> {} +fn signum(v: f64) -> f64 { + if v == 0.0 || v.is_nan() { + v + } else { + v.signum() + } +} +fn decrease(v: f64, step: f64) -> f64 { + if v.abs() <= 0.05 { 0.0 } else { v - step } +} +/// The budget bounds pathological/nonconverging motion. Exhaustion is an error, +/// never a successful clamped displacement; earlier provider effects remain. +pub fn back_off_from_edge<W: EdgeBackoffWorld>( + world: &mut W, + input: EdgeBackoffInput, +) -> Result<Vec3, EdgeBackoffError<W::Error>> { + let step = f64::from(world.max_up_step().map_err(EdgeBackoffError::World)?); + if input.flying + || input.movement.y > 0.0 + || !input.self_or_player + || !world + .staying_on_ground_surface() + .map_err(EdgeBackoffError::World)? + { + return Ok(input.movement); + } + let grounded = world.on_ground().map_err(EdgeBackoffError::World)?; + let mut queries = 0usize; + let mut can_fall = + |dx: f64, dz: f64, amount: f64| -> Result<bool, EdgeBackoffError<W::Error>> { + if queries == input.query_budget { + return Err(EdgeBackoffError::QueryBudget); + } + queries += 1; + let min = input.bounds.min_position(); + let max = input.bounds.max_position(); + let bounds = Aabb::new( + Vec3::new( + min.x + 1.0e-7 + dx, + min.y - amount - 1.0e-7, + min.z + 1.0e-7 + dz, + ), + Vec3::new(max.x - 1.0e-7 + dx, min.y, max.z - 1.0e-7 + dz), + ); + world.no_collision(bounds).map_err(EdgeBackoffError::World) + }; + if !grounded + && !(input.fall_distance < step && !can_fall(0.0, 0.0, step - input.fall_distance)?) + { + return Ok(input.movement); + } + let mut x = input.movement.x; + let mut z = input.movement.z; + let dx = signum(x) * 0.05; + let dz = signum(z) * 0.05; + while x != 0.0 && can_fall(x, 0.0, step)? { + if x.abs() <= 0.05 { + x = 0.0; + break; + } + x -= dx; + } + while z != 0.0 && can_fall(0.0, z, step)? { + if z.abs() <= 0.05 { + z = 0.0; + break; + } + z -= dz; + } + while x != 0.0 && z != 0.0 && can_fall(x, z, step)? { + x = decrease(x, dx); + z = decrease(z, dz); + } + Ok(Vec3::new(x, input.movement.y, z)) +} diff --git a/crates/horizon-world/src/effect_attribute_modifiers.rs b/crates/horizon-world/src/effect_attribute_modifiers.rs new file mode 100644 index 000000000..53aaac162 --- /dev/null +++ b/crates/horizon-world/src/effect_attribute_modifiers.rs @@ -0,0 +1,139 @@ +//! MobEffect attribute templates and native modifier traversal/evaluation order. +use crate::{ + attributes::{Modifier, Operation}, + object_open_map::{ObjectOpenMap, TraversalError}, + object_open_set::{CursorError, ObjectKey}, +}; +use std::io; + +/// A validated modifier definition. Each creation produces a fresh identity. +#[derive(Clone, Debug)] +pub struct Template(Modifier); +impl Template { + pub fn new(id: &str, amount: f64, operation: Operation) -> io::Result<Self> { + Modifier::new(id, amount, operation).map(Self) + } + pub fn id(&self) -> &str { + self.0.id() + } + pub fn amount(&self) -> f64 { + self.0.amount() + } + pub fn operation(&self) -> Operation { + self.0.operation() + } + pub fn create(&self, amplifier: i32) -> Modifier { + Modifier::new( + self.id(), + self.amount() * f64::from(amplifier.wrapping_add(1)), + self.operation(), + ) + .expect("template identifier already validated") + } +} +pub type Definitions<H> = ObjectOpenMap<H, Template>; + +#[derive(Debug)] +pub enum Error<E> { + Cursor(CursorError), + MissingTemplate, + World(E), +} +impl<E> From<CursorError> for Error<E> { + fn from(value: CursorError) -> Self { + Self::Cursor(value) + } +} +/// Virtual attribute methods may mutate the effect's definitions. Their +/// captured attribute-map receiver belongs to this world for the whole call. +pub trait ModifierWorld<H> { + type Instance; + type Error; + fn get_instance( + &mut self, + definitions: &mut Definitions<H>, + attribute: Option<H>, + ) -> Result<Option<Self::Instance>, Self::Error>; + fn remove_modifier( + &mut self, + definitions: &mut Definitions<H>, + instance: &Self::Instance, + id: &str, + ) -> Result<(), Self::Error>; + fn add_permanent( + &mut self, + definitions: &mut Definitions<H>, + instance: &Self::Instance, + modifier: Modifier, + ) -> Result<(), Self::Error>; +} +pub fn add_definition<H: ObjectKey + Clone>( + definitions: &mut Definitions<H>, + attribute: Option<H>, + template: Template, +) { + definitions.put(attribute, Some(template)); +} +pub fn remove_modifiers<H: ObjectKey + Clone, W: ModifierWorld<H>>( + definitions: &mut Definitions<H>, + world: &mut W, +) -> Result<(), Error<W::Error>> { + let mut cursor = definitions.cursor(); + while cursor.has_next() { + let entry = definitions.next_entry(&mut cursor)?; + let key = definitions.entry_key(&entry)?; + if let Some(instance) = world.get_instance(definitions, key).map_err(Error::World)? { + let template = definitions + .entry_value(&entry)? + .ok_or(Error::MissingTemplate)?; + world + .remove_modifier(definitions, &instance, template.id()) + .map_err(Error::World)?; + } + } + Ok(()) +} +pub fn add_modifiers<H: ObjectKey + Clone, W: ModifierWorld<H>>( + definitions: &mut Definitions<H>, + world: &mut W, + amplifier: i32, +) -> Result<(), Error<W::Error>> { + let mut cursor = definitions.cursor(); + while cursor.has_next() { + let entry = definitions.next_entry(&mut cursor)?; + let key = definitions.entry_key(&entry)?; + if let Some(instance) = world.get_instance(definitions, key).map_err(Error::World)? { + let template = definitions + .entry_value(&entry)? + .ok_or(Error::MissingTemplate)?; + world + .remove_modifier(definitions, &instance, template.id()) + .map_err(Error::World)?; + // removeModifier can invoke dirty callbacks that replace/rehash the + // definitions. The indexed entry is read again afterwards. + let template = definitions + .entry_value(&entry)? + .ok_or(Error::MissingTemplate)?; + let modifier = template.create(amplifier); + world + .add_permanent(definitions, &instance, modifier) + .map_err(Error::World)?; + } + } + Ok(()) +} +pub fn create_modifiers<H: ObjectKey + Clone, E>( + definitions: &mut Definitions<H>, + amplifier: i32, + mut consumer: impl FnMut(&mut Definitions<H>, Option<H>, Modifier) -> Result<(), E>, +) -> Result<(), Error<E>> { + definitions + .for_each(|definitions, key, template| { + let modifier = template.ok_or(Error::MissingTemplate)?.create(amplifier); + consumer(definitions, key, modifier).map_err(Error::World) + }) + .map_err(|error| match error { + TraversalError::Cursor(e) => Error::Cursor(e), + TraversalError::Callback(e) => e, + }) +} diff --git a/crates/horizon-world/src/effect_notifications.rs b/crates/horizon-world/src/effect_notifications.rs new file mode 100644 index 000000000..cea64b21d --- /dev/null +++ b/crates/horizon-world/src/effect_notifications.rs @@ -0,0 +1,246 @@ +//! Base LivingEntity effect eligibility, attribute refresh and passenger updates. +use crate::{ + active_effects::{ActiveEffects, EffectHooks}, + java_hash_map::JavaKey, + object_open_set::{CursorError, ObjectKey, ObjectOpenSet}, + status_effect::EffectInstance, +}; +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ImmunityTag { + Infested, + Oozing, + PoisonAndRegeneration, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RestrictedEffect { + Infested, + Oozing, + Regeneration, + Poison, +} +pub trait EligibilityWorld<H> { + type Error; + fn has_immunity_tag( + &mut self, + storage: &mut ActiveEffects<H>, + tag: ImmunityTag, + ) -> Result<bool, Self::Error>; + fn is_restricted_effect(&self, effect: &H, kind: RestrictedEffect) -> bool; +} +pub fn can_be_affected<H, W: EligibilityWorld<H>>( + storage: &mut ActiveEffects<H>, + instance: &EffectInstance<H>, + world: &mut W, +) -> Result<bool, W::Error> { + // These branches are exclusive, even when the actor belongs to several tags. + if world.has_immunity_tag(storage, ImmunityTag::Infested)? { + Ok(!world.is_restricted_effect(&instance.read().effect, RestrictedEffect::Infested)) + } else if world.has_immunity_tag(storage, ImmunityTag::Oozing)? { + Ok(!world.is_restricted_effect(&instance.read().effect, RestrictedEffect::Oozing)) + } else if world.has_immunity_tag(storage, ImmunityTag::PoisonAndRegeneration)? { + let data = instance.read(); + Ok( + !world.is_restricted_effect(&data.effect, RestrictedEffect::Regeneration) + && !world.is_restricted_effect(&data.effect, RestrictedEffect::Poison), + ) + } else { + Ok(true) + } +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum EffectPacket<H> { + Update { + entity: i32, + effect: H, + amplifier: i32, + duration: i32, + flags: u8, + }, + Remove { + entity: i32, + effect: H, + }, +} +impl<H: Clone> EffectPacket<H> { + pub fn update(entity: i32, instance: &EffectInstance<H>, blend: bool) -> Self { + let data = instance.read(); + Self::Update { + entity, + effect: data.effect.clone(), + amplifier: data.details.amplifier, + duration: data.details.duration, + flags: u8::from(data.details.ambient) + | (u8::from(data.details.visible) << 1) + | (u8::from(data.details.show_icon) << 2) + | (u8::from(blend) << 3), + } + } +} +/// Attribute maps, pending-update sets and connections are stable handles. A +/// callback may switch the actor's current handle without changing a captured one. +pub trait NotificationWorld<H: JavaKey + Clone>: EffectHooks<H> { + type Attributes: Copy; + type UpdateSet: Copy; + type AttributeInstance: ObjectKey + Clone; + type Attribute; + type Passenger: Copy; + type Connection: Copy; + fn attributes( + &mut self, + storage: &mut ActiveEffects<H>, + ) -> Result<Self::Attributes, Self::Error>; + fn add_modifiers( + &mut self, + storage: &mut ActiveEffects<H>, + effect: H, + attributes: Self::Attributes, + amplifier: i32, + ) -> Result<(), Self::Error>; + fn remove_modifiers( + &mut self, + storage: &mut ActiveEffects<H>, + effect: H, + attributes: Self::Attributes, + ) -> Result<(), Self::Error>; + fn pending_updates( + &mut self, + storage: &mut ActiveEffects<H>, + attributes: Self::Attributes, + ) -> Result<Self::UpdateSet, Self::Error>; + fn update_set(&self, set: Self::UpdateSet) -> &ObjectOpenSet<Self::AttributeInstance>; + fn update_set_mut( + &mut self, + set: Self::UpdateSet, + ) -> &mut ObjectOpenSet<Self::AttributeInstance>; + fn iterator_error(error: CursorError) -> Self::Error; + /// None preserves a native null member's failure at getAttribute. + fn attribute_of( + &mut self, + storage: &mut ActiveEffects<H>, + instance: Option<Self::AttributeInstance>, + ) -> Result<Self::Attribute, Self::Error>; + fn attribute_updated( + &mut self, + storage: &mut ActiveEffects<H>, + attribute: Self::Attribute, + ) -> Result<(), Self::Error>; + /// Entity.getPassengers is final and returns its current immutable list. + fn passengers(&self) -> Vec<Self::Passenger>; + fn is_server_player(&self, passenger: Self::Passenger) -> bool; + /// Direct ServerPlayer.connection field access before the virtual getId call. + fn connection(&self, passenger: Self::Passenger) -> Self::Connection; + fn entity_id(&mut self, storage: &mut ActiveEffects<H>) -> Result<i32, Self::Error>; + fn send_packet( + &mut self, + storage: &mut ActiveEffects<H>, + connection: Self::Connection, + packet: EffectPacket<H>, + ) -> Result<(), Self::Error>; + fn send_effect_to_passengers( + &mut self, + storage: &mut ActiveEffects<H>, + instance: &EffectInstance<H>, + ) -> Result<(), Self::Error> + where + Self: Sized, + { + send_to_passengers(storage, instance, self) + } +} +pub fn send_to_passengers<H: JavaKey + Clone, W: NotificationWorld<H>>( + storage: &mut ActiveEffects<H>, + instance: &EffectInstance<H>, + world: &mut W, +) -> Result<(), W::Error> { + for passenger in world.passengers() { + if world.is_server_player(passenger) { + let connection = world.connection(passenger); + let entity = world.entity_id(storage)?; + let packet = EffectPacket::update(entity, instance, false); + world.send_packet(storage, connection, packet)?; + } + } + Ok(()) +} +pub fn refresh_attributes<H: JavaKey + Clone, W: NotificationWorld<H>>( + storage: &mut ActiveEffects<H>, + world: &mut W, +) -> Result<(), W::Error> { + let attributes = world.attributes(storage)?; + let updates = world.pending_updates(storage, attributes)?; + let mut cursor = world.update_set(updates).cursor(); + while cursor.has_next() { + let instance = world + .update_set(updates) + .next(&mut cursor) + .map_err(W::iterator_error)?; + let attribute = world.attribute_of(storage, instance)?; + world.attribute_updated(storage, attribute)?; + } + world.update_set_mut(updates).clear(); + Ok(()) +} +pub fn on_added<H: JavaKey + Clone, W: NotificationWorld<H>>( + storage: &mut ActiveEffects<H>, + instance: &EffectInstance<H>, + world: &mut W, +) -> Result<(), W::Error> { + let level = world.level(storage)?; + if !world.is_client(storage, level)? { + storage.dirty = true; + let effect = instance.read().effect.clone(); + let attributes = world.attributes(storage)?; + let amplifier = instance.read().details.amplifier; + world.add_modifiers(storage, effect, attributes, amplifier)?; + world.send_effect_to_passengers(storage, instance)?; + } + Ok(()) +} +pub fn on_updated<H: JavaKey + Clone, W: NotificationWorld<H>>( + storage: &mut ActiveEffects<H>, + instance: &EffectInstance<H>, + reapply: bool, + world: &mut W, +) -> Result<(), W::Error> { + let level = world.level(storage)?; + if world.is_client(storage, level)? { + return Ok(()); + } + storage.dirty = true; + if reapply { + let effect = instance.read().effect.clone(); + let attributes = world.attributes(storage)?; + world.remove_modifiers(storage, effect.clone(), attributes)?; + let attributes = world.attributes(storage)?; + let amplifier = instance.read().details.amplifier; + world.add_modifiers(storage, effect, attributes, amplifier)?; + refresh_attributes(storage, world)?; + } + world.send_effect_to_passengers(storage, instance) +} +pub fn on_removed<H: JavaKey + Clone, W: NotificationWorld<H>>( + storage: &mut ActiveEffects<H>, + instances: &[EffectInstance<H>], + world: &mut W, +) -> Result<(), W::Error> { + let level = world.level(storage)?; + if world.is_client(storage, level)? { + return Ok(()); + } + storage.dirty = true; + for instance in instances { + let effect = instance.read().effect.clone(); + let attributes = world.attributes(storage)?; + world.remove_modifiers(storage, effect, attributes)?; + for passenger in world.passengers() { + if world.is_server_player(passenger) { + let connection = world.connection(passenger); + let entity = world.entity_id(storage)?; + let effect = instance.read().effect.clone(); + world.send_packet(storage, connection, EffectPacket::Remove { entity, effect })?; + } + } + } + refresh_attributes(storage, world) +} diff --git a/crates/horizon-world/src/effect_particles.rs b/crates/horizon-world/src/effect_particles.rs new file mode 100644 index 000000000..60494dcf0 --- /dev/null +++ b/crates/horizon-world/src/effect_particles.rs @@ -0,0 +1,125 @@ +//! Pinned registered MobEffect particle factories and native option identity. +use crate::{DATA_VERSION, compression::invalid, synced_values::SyncedValue}; +use serde_json::Value; +use std::{collections::BTreeMap, io, sync::Arc}; + +pub const AMBIENT_ALPHA: u8 = 38; + +#[derive(Debug)] +pub struct ParticleData { + pub kind: String, + pub color: Option<u32>, +} +/// ColorParticleOption and SimpleParticleType use object equality. Cloning an +/// option retains that object; constructing a color option creates a new one. +#[derive(Clone, Debug)] +pub struct Particle(Arc<ParticleData>); +impl Particle { + pub fn data(&self) -> &ParticleData { + &self.0 + } + pub fn same_reference(&self, other: &Self) -> bool { + Arc::ptr_eq(&self.0, &other.0) + } +} +impl PartialEq for Particle { + fn eq(&self, other: &Self) -> bool { + self.same_reference(other) + } +} +impl Eq for Particle {} + +enum Factory { + Color(u32), + Constant(Particle), +} +pub struct Catalog { + effects: BTreeMap<String, Factory>, +} +impl Catalog { + /// The native exporter verifies inherited factories, captured arguments, + /// option classes and identity. No recovered game assets are embedded here. + pub fn from_json(value: &Value) -> io::Result<Self> { + if value["data_version"].as_i64() != Some(i64::from(DATA_VERSION)) + || value["ambient_alpha"].as_u64() != Some(u64::from(AMBIENT_ALPHA)) + { + return Err(invalid("effect particle catalog version mismatch")); + } + let mut effects = BTreeMap::new(); + let mut simple = BTreeMap::<String, Particle>::new(); + for item in value["effects"] + .as_array() + .ok_or_else(|| invalid("missing effects"))? + { + let id = identifier(&item["id"])?; + let factory = match item["factory"].as_str() { + Some("color") => Factory::Color(color(&item["color"])?), + Some("constant") => { + let p = &item["particle"]; + let kind = identifier(&p["type"])?; + if !p["color"].is_null() { + return Err(invalid("expected registered simple constant particle")); + } + let particle = simple + .entry(kind.clone()) + .or_insert_with(|| Particle(Arc::new(ParticleData { kind, color: None }))) + .clone(); + Factory::Constant(particle) + } + _ => return Err(invalid("unknown registered particle factory")), + }; + if effects.insert(id, factory).is_some() { + return Err(invalid("duplicate effect particle definition")); + } + } + Ok(Self { effects }) + } + pub fn contains(&self, effect: &str) -> bool { + self.effects.contains_key(effect) + } + /// Actual registered factories are pure: only the ambient flag changes a + /// colored option. Constant options retain their registry object identity. + pub fn create(&self, effect: &str, ambient: bool) -> Option<Particle> { + Some(match self.effects.get(effect)? { + Factory::Color(color) => Particle(Arc::new(ParticleData { + kind: "minecraft:entity_effect".into(), + color: Some( + (u32::from(if ambient { AMBIENT_ALPHA } else { 255 }) << 24) + | (color & 0xffffff), + ), + })), + Factory::Constant(particle) => particle.clone(), + }) + } +} +fn identifier(value: &Value) -> io::Result<String> { + let name = value + .as_str() + .ok_or_else(|| invalid("expected particle identifier"))?; + let canonical = + crate::identifier::Identifier::parse(name).map_err(|e| invalid(format!("{e:?}")))?; + if canonical.to_string() != name { + return Err(invalid("noncanonical particle identifier")); + } + Ok(name.into()) +} +fn color(value: &Value) -> io::Result<u32> { + value + .as_u64() + .and_then(|v| u32::try_from(v).ok()) + .ok_or_else(|| invalid("invalid particle color")) +} + +/// The three synchronized value kinds used for living effect presentation. +/// Lists compare element object identity, including repeated fresh colors. +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum EffectValue { + Flags(u8), + Ambient(bool), + Particles(Arc<[Particle]>), +} +impl SyncedValue for EffectValue { + fn native_equal(&self, other: &Self) -> bool { + self == other + } +} diff --git a/crates/horizon-world/src/effect_sync.rs b/crates/horizon-world/src/effect_sync.rs new file mode 100644 index 000000000..50d8c6134 --- /dev/null +++ b/crates/horizon-world/src/effect_sync.rs @@ -0,0 +1,208 @@ +//! Living effect particle, invisibility and glowing synchronization. +use crate::{active_effects::ActiveEffects, effect_particles::Particle, java_hash_map::JavaKey}; +use std::sync::Arc; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Presence { + Invisibility, + Glowing, +} + +pub trait EffectSyncWorld<H: JavaKey + Clone> { + type Error; + type Data: Copy; + type Level: Copy; + /// Direct entityData field access, retaining the selected object. + fn data(&self) -> Self::Data; + fn store_particles( + &mut self, + effects: &mut ActiveEffects<H>, + data: Self::Data, + particles: Arc<[Particle]>, + ) -> Result<(), Self::Error>; + fn store_ambient( + &mut self, + effects: &mut ActiveEffects<H>, + data: Self::Data, + ambient: bool, + ) -> Result<(), Self::Error>; + /// Actual registered factories are pure and cannot mutate the active map. + fn particle(&self, effect: &H, ambient: bool) -> Result<Particle, Self::Error>; + fn has_effect( + &mut self, + effects: &mut ActiveEffects<H>, + kind: Presence, + ) -> Result<bool, Self::Error>; + fn level(&mut self, effects: &mut ActiveEffects<H>) -> Result<Self::Level, Self::Error>; + fn is_client( + &mut self, + effects: &mut ActiveEffects<H>, + level: Self::Level, + ) -> Result<bool, Self::Error>; + fn glowing_tag(&self) -> bool; + fn write_glowing_tag(&mut self, value: bool); + fn read_flags(&self, data: Self::Data) -> Result<u8, Self::Error>; + fn write_flags( + &mut self, + effects: &mut ActiveEffects<H>, + data: Self::Data, + flags: u8, + ) -> Result<(), Self::Error>; + fn get_flag(&mut self, _: &mut ActiveEffects<H>, bit: i32) -> Result<bool, Self::Error> + where + Self: Sized, + { + shared_flag(self, bit) + } + fn set_flag( + &mut self, + effects: &mut ActiveEffects<H>, + bit: i32, + value: bool, + ) -> Result<(), Self::Error> + where + Self: Sized, + { + set_shared_flag(effects, self, bit, value) + } + fn set_invisible( + &mut self, + effects: &mut ActiveEffects<H>, + value: bool, + ) -> Result<(), Self::Error> + where + Self: Sized, + { + self.set_flag(effects, 5, value) + } + fn currently_glowing(&mut self, effects: &mut ActiveEffects<H>) -> Result<bool, Self::Error> + where + Self: Sized, + { + currently_glowing(effects, self) + } + fn remove_particles(&mut self, effects: &mut ActiveEffects<H>) -> Result<(), Self::Error> + where + Self: Sized, + { + remove_particles(effects, self) + } + fn update_invisibility(&mut self, effects: &mut ActiveEffects<H>) -> Result<(), Self::Error> + where + Self: Sized, + { + update_invisibility(effects, self) + } +} +pub fn all_ambient<H: JavaKey + Clone>(effects: &ActiveEffects<H>) -> bool { + effects.entries.entries().all(|(_, e)| { + let e = e.read(); + !e.details.visible || e.details.ambient + }) +} +pub fn synchronize_particles<H: JavaKey + Clone, W: EffectSyncWorld<H>>( + effects: &mut ActiveEffects<H>, + world: &mut W, +) -> Result<(), W::Error> { + // Registered factories have no world/map access. Their native stream pass + // therefore preserves this order without a structural mutation callback. + let particles = effects + .entries + .entries() + .filter_map(|(_, e)| { + let e = e.read(); + e.details + .visible + .then(|| world.particle(&e.effect, e.details.ambient)) + }) + .collect::<Result<Arc<[_]>, _>>()?; + let data = world.data(); + world.store_particles(effects, data, particles)?; + let data = world.data(); + let ambient = all_ambient(effects); + world.store_ambient(effects, data, ambient) +} +pub fn remove_particles<H: JavaKey + Clone, W: EffectSyncWorld<H>>( + effects: &mut ActiveEffects<H>, + world: &mut W, +) -> Result<(), W::Error> { + let data = world.data(); + world.store_particles(effects, data, Arc::from([])) +} +pub fn update_invisibility<H: JavaKey + Clone, W: EffectSyncWorld<H>>( + effects: &mut ActiveEffects<H>, + world: &mut W, +) -> Result<(), W::Error> { + if effects.entries.is_empty() { + world.remove_particles(effects)?; + return world.set_invisible(effects, false); + } + let invisible = world.has_effect(effects, Presence::Invisibility)?; + world.set_invisible(effects, invisible)?; + synchronize_particles(effects, world) +} +pub fn shared_flag<H: JavaKey + Clone, W: EffectSyncWorld<H>>( + world: &W, + bit: i32, +) -> Result<bool, W::Error> { + let flags = i32::from(world.read_flags(world.data())? as i8); + Ok(flags & 1i32.wrapping_shl(bit as u32) != 0) +} +pub fn set_shared_flag<H: JavaKey + Clone, W: EffectSyncWorld<H>>( + effects: &mut ActiveEffects<H>, + world: &mut W, + bit: i32, + value: bool, +) -> Result<(), W::Error> { + let flags = i32::from(world.read_flags(world.data())? as i8); + let mask = 1i32.wrapping_shl(bit as u32); + let value = if value { flags | mask } else { flags & !mask } as u8; + let data = world.data(); + world.write_flags(effects, data, value) +} +pub fn currently_glowing<H: JavaKey + Clone, W: EffectSyncWorld<H>>( + effects: &mut ActiveEffects<H>, + world: &mut W, +) -> Result<bool, W::Error> { + let level = world.level(effects)?; + if !world.is_client(effects, level)? && world.has_effect(effects, Presence::Glowing)? { + return Ok(true); + } + // Entity's base body repeats the virtual level/client lookups. + let level = world.level(effects)?; + if world.is_client(effects, level)? { + world.get_flag(effects, 6) + } else { + Ok(world.glowing_tag()) + } +} +pub fn set_glowing_tag<H: JavaKey + Clone, W: EffectSyncWorld<H>>( + effects: &mut ActiveEffects<H>, + world: &mut W, + value: bool, +) -> Result<(), W::Error> { + world.write_glowing_tag(value); + let glowing = world.currently_glowing(effects)?; + world.set_flag(effects, 6, glowing) +} +pub fn update_glowing<H: JavaKey + Clone, W: EffectSyncWorld<H>>( + effects: &mut ActiveEffects<H>, + world: &mut W, +) -> Result<(), W::Error> { + let glowing = world.currently_glowing(effects)?; + if world.get_flag(effects, 6)? != glowing { + world.set_flag(effects, 6, glowing)?; + } + Ok(()) +} +pub fn update_dirty<H: JavaKey + Clone, W: EffectSyncWorld<H>>( + effects: &mut ActiveEffects<H>, + world: &mut W, +) -> Result<(), W::Error> { + if effects.dirty { + world.update_invisibility(effects)?; + update_glowing(effects, world)?; + effects.dirty = false; + } + Ok(()) +} diff --git a/crates/horizon-world/src/entity_collision.rs b/crates/horizon-world/src/entity_collision.rs new file mode 100644 index 000000000..8ef42b648 --- /dev/null +++ b/crates/horizon-world/src/entity_collision.rs @@ -0,0 +1,77 @@ +//! EntityGetter collision shape selection over an ordered entity snapshot. +use crate::entity_obstruction::EntityIdentity; +use horizon_core::geometry::{Aabb, ShapeError, Vec3, VoxelShape}; + +#[derive(Clone, Copy, Debug)] +pub struct CollisionCandidate { + pub identity: EntityIdentity, + pub bounds: Aabb, + pub spectator: bool, +} +pub trait EntityCollisionWorld { + type Error; + /// Query the inflated bounds, preserving native entity iteration order. + /// The implementation may return a broad-phase superset. Snapshot entities + /// must remain available for the following collision-policy callbacks. + fn collision_candidates( + &mut self, + source: Option<EntityIdentity>, + bounds: Aabb, + ) -> Result<Vec<CollisionCandidate>, Self::Error>; + /// With a source, invoke source.canCollideWith(candidate). Without one, + /// invoke candidate.canBeCollidedWith(null). Entity-specific policies and + /// vehicle relationships belong to the provider, and run only after filters. + fn can_collide( + &mut self, + source: Option<EntityIdentity>, + candidate: EntityIdentity, + ) -> Result<bool, Self::Error>; +} +#[derive(Debug)] +pub enum EntityCollisionError<E> { + World(E), + Shape(ShapeError), +} +impl<E: std::fmt::Display> std::fmt::Display for EntityCollisionError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Shape(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for EntityCollisionError<E> {} + +pub fn entity_collision_shapes<W: EntityCollisionWorld>( + world: &mut W, + source: Option<EntityIdentity>, + bounds: Aabb, +) -> Result<Vec<VoxelShape>, EntityCollisionError<W::Error>> { + let size = bounds.size(); + if (size.x + size.y + size.z) / 3.0 < 1.0e-7 { + return Ok(Vec::new()); + } + let query = bounds.inflate(Vec3::new(1.0e-7, 1.0e-7, 1.0e-7)); + let candidates = world + .collision_candidates(source, query) + .map_err(EntityCollisionError::World)?; + let mut selected = Vec::new(); + for candidate in candidates { + if source == Some(candidate.identity) + || !candidate.bounds.intersects(query) + || candidate.spectator + { + continue; + } + if world + .can_collide(source, candidate.identity) + .map_err(EntityCollisionError::World)? + { + selected.push(candidate.bounds); + } + } + selected + .into_iter() + .map(|bounds| VoxelShape::from_box(bounds).map_err(EntityCollisionError::Shape)) + .collect() +} diff --git a/crates/horizon-world/src/entity_fluid.rs b/crates/horizon-world/src/entity_fluid.rs new file mode 100644 index 000000000..e3eae3c4b --- /dev/null +++ b/crates/horizon-world/src/entity_fluid.rs @@ -0,0 +1,337 @@ +//! Entity fluid immersion trackers and current accumulation across update ticks. +use crate::fluid::{FluidKind, FluidState}; +use horizon_core::{ + geometry::{Aabb, Vec3}, + position::BlockPos, +}; +use std::fmt; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct FluidTagId(pub u32); +pub trait FluidMembership { + fn fluid_in_tag(&self, fluid: FluidKind, tag: FluidTagId) -> bool; +} +#[derive(Clone, Copy, Debug)] +pub struct FluidTracker { + pub fluid: FluidKind, + pub height: f64, + pub eyes_inside: bool, +} +#[derive(Clone, Copy, Debug)] +pub struct CurrentAccumulator { + pub height: f64, + pub accumulated: Vec3, + pub count: i32, +} +impl Default for CurrentAccumulator { + fn default() -> Self { + Self { + height: 0.0, + accumulated: Vec3::ZERO, + count: 0, + } + } +} +pub trait CurrentTarget { + type Error; + fn is_player_class(&self) -> bool; + fn velocity(&mut self) -> Result<Vec3, Self::Error>; + /// Entity.addDeltaMovement, including finite-addition filtering and a fresh + /// velocity read. Entity-specific overrides remain the provider's dispatch. + fn add_delta_movement(&mut self, delta: Vec3) -> Result<(), Self::Error>; +} +impl CurrentAccumulator { + pub fn reset(&mut self) { + *self = Self::default(); + } + pub fn accumulate(&mut self, current: Vec3) { + self.accumulated = add(self.accumulated, current); + self.count = self.count.wrapping_add(1); + } + pub fn apply_to<W: CurrentTarget>(&self, world: &mut W, speed: f64) -> Result<(), W::Error> { + if self.count == 0 || self.accumulated.length_squared() < f64::from(1.0e-5f32) { + return Ok(()); + } + let mut current = if world.is_player_class() { + self.accumulated.scale(1.0 / f64::from(self.count)) + } else { + self.accumulated.normalize() + }; + let velocity = world.velocity()?; + current = current.scale(speed); + if velocity.x.abs() < 0.003 + && velocity.z.abs() < 0.003 + && current.length() < 0.0045000000000000005 + { + current = current.normalize().scale(0.0045000000000000005); + } + world.add_delta_movement(current) + } +} +pub struct FluidSections<'a> { + pub minimum_section_y: i32, + pub has_fluid: &'a [bool], +} +pub trait FluidInteractionWorld: FluidMembership { + type Error; + type Chunk: Copy; + fn interaction_box(&mut self) -> Result<Option<Aabb>, Self::Error>; + /// FULL chunk lookup without generating/loading absent chunks. + fn loaded_chunk(&mut self, x: i32, z: i32) -> Result<Option<Self::Chunk>, Self::Error>; + fn chunk_sections(&mut self, chunk: Self::Chunk) -> Result<FluidSections<'_>, Self::Error>; + fn bounding_box_min_y(&self) -> f64; + fn block_x(&self) -> i32; + fn eye_y(&mut self) -> Result<f64, Self::Error>; + fn block_z(&self) -> i32; + fn fluid_state(&mut self, position: BlockPos) -> Result<FluidState, Self::Error>; + fn fluid_height(&mut self, state: FluidState, position: BlockPos) -> Result<f32, Self::Error>; + fn camera_height(&mut self, state: FluidState, position: BlockPos) -> Result<f32, Self::Error>; + fn flow(&mut self, state: FluidState, position: BlockPos) -> Result<Vec3, Self::Error>; +} +#[derive(Debug)] +pub enum FluidInteractionError<E> { + World(E), + NonFiniteBounds, + BudgetExceeded, +} +impl<E: fmt::Display> fmt::Display for FluidInteractionError<E> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::NonFiniteBounds => f.write_str("nonfinite immersion bounds"), + Self::BudgetExceeded => f.write_str("immersion query budget exceeded"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for FluidInteractionError<E> {} +fn spend<E>(budget: &mut usize) -> Result<(), FluidInteractionError<E>> { + if *budget == 0 { + return Err(FluidInteractionError::BudgetExceeded); + } + *budget -= 1; + Ok(()) +} +fn add(a: Vec3, b: Vec3) -> Vec3 { + Vec3::new(a.x + b.x, a.y + b.y, a.z + b.z) +} +fn java_max(a: f64, b: f64) -> f64 { + if a.is_nan() { + a + } else if b.is_nan() { + b + } else if a == 0.0 && b == 0.0 { + f64::from_bits(a.to_bits() & b.to_bits()) + } else { + a.max(b) + } +} +/// Every required chunk must be loaded, even after a wet section is found. +/// Chunk order is Z then X; section order is ascending Y without early success. +pub fn has_fluid_and_loaded<W: FluidInteractionWorld>( + world: &mut W, + min: BlockPos, + max: BlockPos, + budget: &mut usize, +) -> Result<bool, FluidInteractionError<W::Error>> { + let mut present = false; + for z in (min.z >> 4)..=(max.z >> 4) { + for x in (min.x >> 4)..=(max.x >> 4) { + spend(budget)?; + let Some(chunk) = world + .loaded_chunk(x, z) + .map_err(FluidInteractionError::World)? + else { + return Ok(false); + }; + let sections = world + .chunk_sections(chunk) + .map_err(FluidInteractionError::World)?; + for y in (min.y >> 4)..=(max.y >> 4) { + spend(budget)?; + let index = y.wrapping_sub(sections.minimum_section_y); + if index >= 0 && (index as usize) < sections.has_fluid.len() { + present |= sections.has_fluid[index as usize]; + } + } + } + } + Ok(present) +} +#[derive(Default)] +pub struct EntityFluidInteraction { + trackers: Vec<FluidTracker>, + currents: Vec<(FluidTagId, CurrentAccumulator)>, +} +impl EntityFluidInteraction { + /// Preserve the caller's tag-set iteration order: a fluid's current belongs + /// to the first matching tag, even when several tags contain that fluid. + pub fn new(tags: impl IntoIterator<Item = FluidTagId>) -> Self { + let mut state = Self::default(); + for tag in tags { + if !state.currents.iter().any(|(t, _)| *t == tag) { + state.currents.push((tag, CurrentAccumulator::default())); + } + } + state + } + pub fn trackers(&self) -> &[FluidTracker] { + &self.trackers + } + pub fn currents(&self) -> &[(FluidTagId, CurrentAccumulator)] { + &self.currents + } + pub fn fluid_height<W: FluidMembership>(&self, tags: &W, tag: FluidTagId) -> f64 { + let mut height = 0.0; + for t in &self.trackers { + if t.height > height && tags.fluid_in_tag(t.fluid, tag) { + height = t.height; + } + } + height + } + pub fn is_in_fluid<W: FluidMembership>(&self, tags: &W, tag: FluidTagId) -> bool { + self.fluid_height(tags, tag) > 0.0 + } + pub fn is_eye_in_fluid<W: FluidMembership>(&self, tags: &W, tag: FluidTagId) -> bool { + self.trackers + .iter() + .any(|t| t.eyes_inside && tags.fluid_in_tag(t.fluid, tag)) + } + pub fn apply_current<W: CurrentTarget>( + &self, + world: &mut W, + tag: FluidTagId, + speed: f64, + ) -> Result<(), W::Error> { + if let Some((_, current)) = self.currents.iter().find(|(t, _)| *t == tag) { + current.apply_to(world, speed)?; + } + Ok(()) + } + /// Reset previous tick state before any query. Provider failures and budget + /// exhaustion retain all preceding tracker/current writes. + pub fn update<W: FluidInteractionWorld>( + &mut self, + world: &mut W, + ignore_current: bool, + mut budget: usize, + ) -> Result<bool, FluidInteractionError<W::Error>> { + self.trackers.retain_mut(|t| { + if t.height == 0.0 && !t.eyes_inside { + return false; + } + t.height = 0.0; + t.eyes_inside = false; + true + }); + for (_, c) in &mut self.currents { + c.reset(); + } + let Some(bounds) = world + .interaction_box() + .map_err(FluidInteractionError::World)? + else { + return Ok(false); + }; + let a = bounds.min_position(); + let b = bounds.max_position(); + if [a.x, a.y, a.z, b.x, b.y, b.z] + .iter() + .any(|v| !v.is_finite()) + { + return Err(FluidInteractionError::NonFiniteBounds); + } + let low = BlockPos::new(a.x.floor() as i32, a.y.floor() as i32, a.z.floor() as i32); + let high = BlockPos::new( + (b.x.ceil() as i32).wrapping_sub(1), + (b.y.ceil() as i32).wrapping_sub(1), + (b.z.ceil() as i32).wrapping_sub(1), + ); + if !has_fluid_and_loaded( + world, + BlockPos::new(low.x.wrapping_sub(1), low.y, low.z.wrapping_sub(1)), + BlockPos::new(high.x.wrapping_add(1), high.y, high.z.wrapping_add(1)), + &mut budget, + )? { + return Ok(false); + } + let base_y = world.bounding_box_min_y(); + let block_x = world.block_x(); + let eye = world.eye_y().map_err(FluidInteractionError::World)?; + let block_z = world.block_z(); + let mut last: Option<(FluidKind, usize, Option<usize>)> = None; + for x in low.x..=high.x { + for y in low.y..=high.y { + for z in low.z..=high.z { + spend(&mut budget)?; + let p = BlockPos::new(x, y, z); + let state = world.fluid_state(p).map_err(FluidInteractionError::World)?; + if state.kind() == FluidKind::Empty { + continue; + } + let surface = f64::from(y) + + f64::from( + world + .fluid_height(state, p) + .map_err(FluidInteractionError::World)?, + ); + if surface < a.y { + continue; + } + let kind = state.kind(); + let (_, index, current) = if let Some(last) = + last.filter(|(k, _, _)| *k == kind) + { + last + } else { + let index = + if let Some(i) = self.trackers.iter().position(|t| t.fluid == kind) { + i + } else { + self.trackers.push(FluidTracker { + fluid: kind, + height: 0.0, + eyes_inside: false, + }); + self.trackers.len() - 1 + }; + let current = if ignore_current { + None + } else { + self.currents + .iter() + .position(|(tag, _)| world.fluid_in_tag(kind, *tag)) + }; + let entry = (kind, index, current); + last = Some(entry); + entry + }; + if x == block_x && z == block_z && eye >= f64::from(y) { + let top = f64::from(y) + + f64::from( + world + .camera_height(state, p) + .map_err(FluidInteractionError::World)?, + ); + if eye <= top { + self.trackers[index].eyes_inside = true; + } + } + self.trackers[index].height = + java_max(surface - base_y, self.trackers[index].height); + if let Some(i) = current { + let mut flow = + world.flow(state, p).map_err(FluidInteractionError::World)?; + let c = &mut self.currents[i].1; + c.height = java_max(self.trackers[index].height, c.height); + if c.height < 0.4 { + flow = flow.scale(c.height); + } + c.accumulate(flow); + } + } + } + } + Ok(last.is_some()) + } +} diff --git a/crates/horizon-world/src/entity_fluid_tick.rs b/crates/horizon-world/src/entity_fluid_tick.rs new file mode 100644 index 000000000..22e6fd4d2 --- /dev/null +++ b/crates/horizon-world/src/entity_fluid_tick.rs @@ -0,0 +1,62 @@ +//! Entity water-entry effects and current forces around immersion updates. +use crate::entity_fluid::{ + CurrentTarget, EntityFluidInteraction, FluidInteractionError, FluidInteractionWorld, FluidTagId, +}; +type WorldError<W> = <W as FluidInteractionWorld>::Error; +pub trait EntityFluidTickWorld: + FluidInteractionWorld + CurrentTarget<Error = WorldError<Self>> +{ + fn is_pushed_by_fluid(&mut self) -> Result<bool, WorldError<Self>>; + fn reset_fall_distance(&mut self) -> Result<(), WorldError<Self>>; + fn was_touching_water(&self) -> bool; + fn first_tick(&self) -> bool; + fn water_splash(&mut self) -> Result<(), WorldError<Self>>; + fn set_was_touching_water(&mut self, value: bool); + fn fast_lava(&mut self) -> Result<bool, WorldError<Self>>; +} +/// The push predicate is queried twice: before resetting immersion state and +/// after water-entry effects. Water/lava membership is captured before effects. +pub fn update<W: EntityFluidTickWorld>( + interaction: &mut EntityFluidInteraction, + world: &mut W, + water: FluidTagId, + lava: FluidTagId, + budget: usize, +) -> Result<bool, FluidInteractionError<WorldError<W>>> { + let ignore = !world + .is_pushed_by_fluid() + .map_err(FluidInteractionError::World)?; + let changed = interaction.update(world, ignore, budget)?; + let in_water = interaction.is_in_fluid(world, water); + let in_lava = interaction.is_in_fluid(world, lava); + if in_water { + world + .reset_fall_distance() + .map_err(FluidInteractionError::World)?; + if !world.was_touching_water() && !world.first_tick() { + world.water_splash().map_err(FluidInteractionError::World)?; + } + } + world.set_was_touching_water(in_water); + if world + .is_pushed_by_fluid() + .map_err(FluidInteractionError::World)? + { + if in_water { + interaction + .apply_current(world, water, 0.014) + .map_err(FluidInteractionError::World)?; + } + if in_lava { + let speed = if world.fast_lava().map_err(FluidInteractionError::World)? { + 0.007 + } else { + 0.0023333333333333335 + }; + interaction + .apply_current(world, lava, speed) + .map_err(FluidInteractionError::World)?; + } + } + Ok(changed) +} diff --git a/crates/horizon-world/src/entity_move.rs b/crates/horizon-world/src/entity_move.rs new file mode 100644 index 000000000..b3b189df0 --- /dev/null +++ b/crates/horizon-world/src/entity_move.rs @@ -0,0 +1,217 @@ +//! Entity.move ordering around collision, support, landing and movement effects. +use crate::{movement_emission::MovementEmission, registry::BlockStateId}; +use horizon_core::{geometry::Vec3, position::BlockPos}; +use std::collections::VecDeque; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum MoverType { + SelfMovement, + Player, + Piston, + ShulkerBox, + Shulker, +} +#[derive(Clone, Copy, Debug, Default)] +pub struct CollisionFlags { + pub horizontal: bool, + pub vertical: bool, + pub below: bool, + pub minor: bool, +} +#[derive(Clone, Copy, Debug)] +pub struct MovementRecord { + pub from: Vec3, + pub to: Vec3, + pub original: Option<Vec3>, +} +#[derive(Clone, Debug, Default)] +pub struct MovementHistory { + records: VecDeque<MovementRecord>, +} +impl MovementHistory { + pub fn records(&self) -> &VecDeque<MovementRecord> { + &self.records + } + pub fn add(&mut self, record: MovementRecord) { + if self.records.len() >= 100 { + let first = self.records.pop_front().unwrap(); + let second = self.records.pop_front().unwrap(); + self.records.push_front(MovementRecord { + from: first.from, + to: second.to, + original: None, + }); + } + self.records.push_back(record); + } + pub fn remove_latest(&mut self) { + self.records.pop_back(); + } + pub fn clear(&mut self) { + self.records.clear(); + } +} +/// The provider retains entity fields so callbacks can mutate them. Hooks below +/// are native phase boundaries; bind collision, support, landing, restitution +/// and emission hooks to their corresponding world modules. +pub trait EntityMoveWorld { + type Error; + fn no_physics(&self) -> bool; + fn position(&self) -> Vec3; + fn set_position(&mut self, position: Vec3) -> Result<(), Self::Error>; + fn record_movement(&mut self, mover: MoverType, movement: Vec3) -> Result<(), Self::Error>; + fn collision_flags(&self) -> CollisionFlags; + fn set_collision_flags(&mut self, flags: CollisionFlags); + fn limit_piston_movement(&mut self, movement: Vec3) -> Result<Vec3, Self::Error>; + fn stuck_multiplier(&self) -> Vec3; + fn set_stuck_multiplier(&mut self, value: Vec3); + fn velocity(&mut self) -> Result<Vec3, Self::Error>; + fn set_velocity(&mut self, value: Vec3) -> Result<(), Self::Error>; + fn back_off_edge(&mut self, movement: Vec3, mover: MoverType) -> Result<Vec3, Self::Error>; + fn collide(&mut self, movement: Vec3) -> Result<Vec3, Self::Error>; + fn fall_distance(&self) -> f64; + /// FALLDAMAGE_RESETTING blocks and WATER fluids, entity collision context. + /// Return true for a non-MISS hit. + fn fall_reset_clip(&mut self, from: Vec3, to: Vec3) -> Result<bool, Self::Error>; + fn reset_fall_distance(&mut self) -> Result<(), Self::Error>; + fn movement_history(&mut self) -> &mut MovementHistory; + fn locally_authoritative(&mut self) -> Result<bool, Self::Error>; + fn set_on_ground_with_movement( + &mut self, + below: bool, + horizontal: bool, + movement: Vec3, + ) -> Result<(), Self::Error>; + fn minor_horizontal_collision(&mut self, movement: Vec3) -> Result<bool, Self::Error>; + fn legacy_on_position(&mut self) -> Result<BlockPos, Self::Error>; + fn block_state(&mut self, p: BlockPos) -> Result<BlockStateId, Self::Error>; + fn on_ground(&mut self) -> Result<bool, Self::Error>; + fn check_fall_damage( + &mut self, + dy: f64, + on_ground: bool, + state: BlockStateId, + p: BlockPos, + ) -> Result<(), Self::Error>; + fn removed(&mut self) -> Result<bool, Self::Error>; + fn can_simulate(&mut self) -> Result<bool, Self::Error>; + fn restitute( + &mut self, + state: BlockStateId, + collided_x: bool, + collided_z: bool, + resolved: Vec3, + ) -> Result<(), Self::Error>; + fn client_side(&mut self) -> Result<bool, Self::Error>; + fn movement_emission(&mut self) -> Result<MovementEmission, Self::Error>; + fn passenger(&mut self) -> Result<bool, Self::Error>; + fn apply_movement_emission( + &mut self, + emission: MovementEmission, + resolved: Vec3, + p: BlockPos, + state: BlockStateId, + ) -> Result<(), Self::Error>; + fn block_speed_factor(&mut self) -> Result<f32, Self::Error>; +} +fn java_zero(v: Vec3) -> bool { + v.x.to_bits() == 0 && v.y.to_bits() == 0 && v.z.to_bits() == 0 +} +fn different(a: f64, b: f64) -> bool { + let delta = (b - a).abs(); + delta >= f64::from(1.0e-5f32) || delta.is_nan() +} +/// Release behavior; native IDE-only invalid-simulation assertions and profiler +/// callbacks do not form part of this gameplay transition. +pub fn move_entity<W: EntityMoveWorld>( + world: &mut W, + mover: MoverType, + mut movement: Vec3, +) -> Result<(), W::Error> { + if world.no_physics() { + world.set_position(world.position().add_vector(movement))?; + world.record_movement(mover, movement)?; + world.set_collision_flags(CollisionFlags::default()); + return Ok(()); + } + if mover == MoverType::Piston { + movement = world.limit_piston_movement(movement)?; + if java_zero(movement) { + return Ok(()); + } + } + let stuck = world.stuck_multiplier(); + if stuck.length_squared() > 1.0e-7 { + if mover != MoverType::Piston { + movement = movement.multiply(stuck); + } + world.set_stuck_multiplier(Vec3::ZERO); + world.set_velocity(Vec3::ZERO)?; + } + movement = world.back_off_edge(movement, mover)?; + let resolved = world.collide(movement)?; + let length = resolved.length_squared(); + if length > 1.0e-7 || movement.length_squared() - length < 1.0e-7 { + if world.fall_distance() != 0.0 && length >= 1.0 { + let distance = resolved.length().min(8.0); + let from = world.position(); + let to = from.add_vector(resolved.normalize().scale(distance)); + if world.fall_reset_clip(from, to)? { + world.reset_fall_distance()?; + } + } + let from = world.position(); + let to = from.add_vector(resolved); + world.movement_history().add(MovementRecord { + from, + to, + original: Some(movement), + }); + world.set_position(to)?; + world.record_movement(mover, resolved)?; + } + let x = different(movement.x, resolved.x); + let z = different(movement.z, resolved.z); + let mut flags = world.collision_flags(); + flags.horizontal = x || z; + world.set_collision_flags(flags); + let nonzero_y = movement.y.abs() > 0.0; + if nonzero_y || world.locally_authoritative()? { + flags = world.collision_flags(); + flags.vertical = movement.y != resolved.y; + flags.below = flags.vertical && movement.y < 0.0; + world.set_collision_flags(flags); + world.set_on_ground_with_movement(flags.below, flags.horizontal, resolved)?; + } + let minor = if world.collision_flags().horizontal { + world.minor_horizontal_collision(resolved)? + } else { + false + }; + flags = world.collision_flags(); + flags.minor = minor; + world.set_collision_flags(flags); + let p = world.legacy_on_position()?; + let state = world.block_state(p)?; + if world.locally_authoritative()? { + let grounded = world.on_ground()?; + world.check_fall_damage(resolved.y, grounded, state, p)?; + } + if world.removed()? { + return Ok(()); + } + if world.can_simulate()? + && (nonzero_y && world.collision_flags().vertical || world.collision_flags().horizontal) + { + world.restitute(state, x, z, resolved)?; + } + if !world.client_side()? || world.locally_authoritative()? { + let emission = world.movement_emission()?; + if emission.anything() && !world.passenger()? { + world.apply_movement_emission(emission, resolved, p, state)?; + } + } + let factor = f64::from(world.block_speed_factor()?); + let velocity = world.velocity()?.multiply(Vec3::new(factor, 1.0, factor)); + world.set_velocity(velocity) +} diff --git a/crates/horizon-world/src/entity_obstruction.rs b/crates/horizon-world/src/entity_obstruction.rs new file mode 100644 index 000000000..89f7f586b --- /dev/null +++ b/crates/horizon-world/src/entity_obstruction.rs @@ -0,0 +1,89 @@ +//! Entity obstruction against a voxel shape. Entity storage, lifecycle and +//! vehicle-tree maintenance supply the immutable candidate snapshots here. +use horizon_core::geometry::{Aabb, ShapeError, ShapeOp, VoxelShape}; + +/// Object identity within the caller's entity snapshot, including its generation. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct EntityIdentity(pub u64); +#[derive(Clone, Copy, Debug)] +pub struct ObstructionEntity { + pub identity: EntityIdentity, + pub root_vehicle: EntityIdentity, + pub bounds: Aabb, + pub removed: bool, + pub spectator: bool, + pub blocks_building: bool, +} +pub trait EntityObstructionWorld { + type Error; + /// Preserve native query order. Implementations may return a broad-phase + /// superset: exclusion, spectator and exact AABB filters are enforced below. + fn obstruction_candidates( + &mut self, + excluded: Option<EntityIdentity>, + bounds: Aabb, + ) -> Result<Vec<ObstructionEntity>, Self::Error>; +} +#[derive(Debug)] +pub enum ObstructionError<E> { + World(E), + Shape(ShapeError), +} +impl<E: std::fmt::Display> std::fmt::Display for ObstructionError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Shape(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for ObstructionError<E> {} + +pub fn is_unobstructed<W: EntityObstructionWorld>( + world: &mut W, + excluded: Option<&ObstructionEntity>, + shape: &VoxelShape, +) -> Result<bool, ObstructionError<W::Error>> { + let Some(bounds) = shape.bounds() else { + return Ok(true); + }; + let candidates = world + .obstruction_candidates(excluded.map(|e| e.identity), bounds) + .map_err(ObstructionError::World)?; + for entity in candidates { + if excluded.is_some_and(|e| e.identity == entity.identity) + || entity.spectator + || !entity.bounds.intersects(bounds) + { + continue; + } + if entity.removed + || !entity.blocks_building + || excluded.is_some_and(|e| e.root_vehicle == entity.root_vehicle) + { + continue; + } + let other = VoxelShape::from_box(entity.bounds).map_err(ObstructionError::Shape)?; + if shape + .join_is_not_empty(&other, ShapeOp::AND) + .map_err(ObstructionError::Shape)? + { + return Ok(false); + } + } + Ok(true) +} + +/// Entity obstruction for the unit cube used by the vanilla block predicate. +/// Translate the voxel shape in floating point: integer MAX + 1 must not wrap. +pub fn is_block_unobstructed<W: EntityObstructionWorld>( + world: &mut W, + position: [i32; 3], +) -> Result<bool, ObstructionError<W::Error>> { + let shape = VoxelShape::block().moved(horizon_core::geometry::Vec3::new( + f64::from(position[0]), + f64::from(position[1]), + f64::from(position[2]), + )); + is_unobstructed(world, None, &shape) +} diff --git a/crates/horizon-world/src/extra_items.rs b/crates/horizon-world/src/extra_items.rs new file mode 100644 index 000000000..69c2f0492 --- /dev/null +++ b/crates/horizon-world/src/extra_items.rs @@ -0,0 +1,26 @@ +//! Server-player delivery of extra items created by consuming an item. +use crate::{ + inventory_pickup::{self, PickupError, PickupHooks}, + item_stack_refs::StackRef, + player_inventory::PlayerInventory, +}; +pub trait ExtraItemHooks<I, K, V>: PickupHooks<I, K, V> { + /// Native drop uses throwRandomly=false and Prediction::PREDICTED. + fn drop_predicted( + &mut self, + inventory: &mut PlayerInventory<I, K, V>, + stack: StackRef<I, K, V>, + ) -> Result<(), Self::Error>; +} +pub fn deliver<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq, H: ExtraItemHooks<I, K, V>>( + inventory: &mut PlayerInventory<I, K, V>, + stack: StackRef<I, K, V>, + hooks: &mut H, +) -> Result<(), PickupError<H::Error>> { + if !inventory_pickup::add(inventory, -1, &stack, hooks)? { + hooks + .drop_predicted(inventory, stack) + .map_err(PickupError::Callback)?; + } + Ok(()) +} diff --git a/crates/horizon-world/src/fall_damage.rs b/crates/horizon-world/src/fall_damage.rs new file mode 100644 index 000000000..d3a1dca42 --- /dev/null +++ b/crates/horizon-world/src/fall_damage.rs @@ -0,0 +1,49 @@ +//! Base Entity fall-distance accumulation and landing callback ordering. +use horizon_core::{geometry::Vec3, position::BlockPos}; + +pub trait FallDamageWorld { + type Error; + type State: Copy; + fn is_in_water(&mut self) -> Result<bool, Self::Error>; + fn fall_distance(&self) -> f64; + fn set_fall_distance(&mut self, distance: f64); + fn fall_on( + &mut self, + state: Self::State, + position: BlockPos, + distance: f64, + ) -> Result<(), Self::Error>; + fn position(&self) -> Vec3; + fn supporting_block(&self) -> Option<BlockPos>; + fn block_state(&mut self, position: BlockPos) -> Result<Self::State, Self::Error>; + fn hit_ground(&mut self, position: Vec3, state: Self::State) -> Result<(), Self::Error>; + fn reset_fall_distance(&mut self) -> Result<(), Self::Error>; +} +/// LivingEntity's fluid update, landing particles and other overrides wrap this +/// base method separately. Errors preserve prior field changes and callbacks. +pub fn check_fall_damage<W: FallDamageWorld>( + world: &mut W, + dy: f64, + on_ground: bool, + state: W::State, + position: BlockPos, +) -> Result<(), W::Error> { + if !world.is_in_water()? && dy < 0.0 { + world.set_fall_distance(world.fall_distance() - f64::from(dy as f32)); + } + if on_ground { + if world.fall_distance() > 0.0 { + world.fall_on(state, position, world.fall_distance())?; + // Landing callbacks may move the entity or replace its support. + let position = world.position(); + let state = if let Some(support) = world.supporting_block() { + world.block_state(support)? + } else { + state + }; + world.hit_ground(position, state)?; + } + world.reset_fall_distance()?; + } + Ok(()) +} diff --git a/crates/horizon-world/src/fluid.rs b/crates/horizon-world/src/fluid.rs new file mode 100644 index 000000000..4a89764a8 --- /dev/null +++ b/crates/horizon-world/src/fluid.rs @@ -0,0 +1,329 @@ +//! Fluid states carried by the pinned vanilla block-state registry. +//! Flow updates, spreading and entity interaction are separate simulation work. +use crate::{ + chunk::BlockState, + compression::invalid, + registry::{BlockRegistry, BlockStateId}, +}; +use std::io; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum FluidKind { + Empty, + FlowingWater, + Water, + FlowingLava, + Lava, +} +impl FluidKind { + pub const ALL: [Self; 5] = [ + Self::Empty, + Self::FlowingWater, + Self::Water, + Self::FlowingLava, + Self::Lava, + ]; + pub const fn name(self) -> &'static str { + match self { + Self::Empty => "minecraft:empty", + Self::FlowingWater => "minecraft:flowing_water", + Self::Water => "minecraft:water", + Self::FlowingLava => "minecraft:flowing_lava", + Self::Lava => "minecraft:lava", + } + } + pub fn from_name(name: &str) -> Option<Self> { + Self::ALL.into_iter().find(|kind| kind.name() == name) + } + pub const fn same_family(self, other: Self) -> bool { + matches!( + (self, other), + (Self::Empty, Self::Empty) + | ( + Self::Water | Self::FlowingWater, + Self::Water | Self::FlowingWater + ) + | ( + Self::Lava | Self::FlowingLava, + Self::Lava | Self::FlowingLava + ) + ) + } + pub const fn mask(self) -> u8 { + 1 << self as u8 + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct FluidState { + kind: FluidKind, + amount: u8, + falling: bool, +} +impl FluidState { + /// Native fluid states require an object; properties decode leniently. + pub fn from_json(json: &str) -> io::Result<Self> { + let value: serde_json::Value = + serde_json::from_str(json).map_err(|e| invalid(e.to_string()))?; + let name = value + .get("id") + .and_then(serde_json::Value::as_str) + .ok_or_else(|| invalid("missing fluid identifier"))?; + let (namespace, path) = name.split_once(':').unwrap_or(("minecraft", name)); + let name = format!( + "{}:{path}", + if namespace.is_empty() { + "minecraft" + } else { + namespace + } + ); + let kind = + FluidKind::from_name(&name).ok_or_else(|| invalid("unknown fluid identifier"))?; + if kind == FluidKind::Empty { + return Ok(Self::EMPTY); + } + let flowing = matches!(kind, FluidKind::FlowingWater | FluidKind::FlowingLava); + let mut state = Self { + kind, + amount: if flowing { 1 } else { 8 }, + falling: true, + }; + if let Some(properties) = value + .get("properties") + .and_then(serde_json::Value::as_object) + { + if let Some(value) = properties + .get("falling") + .and_then(serde_json::Value::as_str) + { + match value { + "true" => state.falling = true, + "false" => state.falling = false, + _ => {} + } + } + if flowing { + if let Some(value) = properties + .get("level") + .and_then(serde_json::Value::as_str) + .and_then(crate::registry::java_integer) + .filter(|v| (1..=8).contains(v)) + { + state.amount = value as u8; + } + } + } + Ok(state) + } + pub fn to_json(self) -> io::Result<String> { + let mut value = serde_json::json!({"id": self.kind.name()}); + if self.kind != FluidKind::Empty { + let mut properties = serde_json::json!({"falling": self.falling.to_string()}); + if !self.is_source() { + properties["level"] = self.amount.to_string().into(); + } + value["properties"] = properties; + } + serde_json::to_string(&value).map_err(|e| invalid(e.to_string())) + } + /// A fluid state from its parts; the empty fluid ignores amount and falling. + pub const fn new(kind: FluidKind, amount: u8, falling: bool) -> Self { + if matches!(kind, FluidKind::Empty) { + return Self::EMPTY; + } + Self { + kind, + amount, + falling, + } + } + pub const EMPTY: Self = Self { + kind: FluidKind::Empty, + amount: 0, + falling: false, + }; + pub const WATER: Self = Self { + kind: FluidKind::Water, + amount: 8, + falling: false, + }; + pub const fn kind(self) -> FluidKind { + self.kind + } + pub const fn amount(self) -> u8 { + self.amount + } + pub const fn falling(self) -> bool { + self.falling + } + pub const fn is_source(self) -> bool { + matches!(self.kind, FluidKind::Water | FluidKind::Lava) + } + pub const fn is_full(self) -> bool { + self.amount == 8 + } + pub fn height_at<W: FluidHeightWorld>( + self, + world: &mut W, + position: [i32; 3], + ) -> Result<f32, W::Error> { + if self.kind == FluidKind::Empty { + return Ok(0.0); + } + let above = [position[0], position[1].wrapping_add(1), position[2]]; + Ok(if self.kind.same_family(world.fluid(above)?.kind) { + 1.0 + } else { + self.own_height() + }) + } + pub fn camera_height_at<W: FluidHeightWorld>( + self, + world: &mut W, + position: [i32; 3], + ) -> Result<f32, W::Error> { + if self.is_source() { + let above = [position[0], position[1].wrapping_add(1), position[2]]; + if world.sturdy_down(above)? { + return Ok(1.0); + } + } + self.height_at(world, position) + } + pub fn own_height(self) -> f32 { + f32::from(self.amount) / 9.0 + } + pub fn from_block(state: &BlockState) -> io::Result<Self> { + let water = state.name == "minecraft:water"; + if water || state.name == "minecraft:lava" { + let level = state + .properties + .get("level") + .and_then(|v| v.parse::<u8>().ok()) + .filter(|v| *v <= 15) + .ok_or_else(|| invalid("invalid liquid block level"))?; + let kind = match (water, level == 0) { + (true, true) => FluidKind::Water, + (true, false) => FluidKind::FlowingWater, + (false, true) => FluidKind::Lava, + (false, false) => FluidKind::FlowingLava, + }; + return Ok(Self { + kind, + amount: if level == 0 || level >= 8 { + 8 + } else { + 8 - level + }, + falling: level >= 8, + }); + } + if matches!( + state.name.as_str(), + "minecraft:kelp" + | "minecraft:kelp_plant" + | "minecraft:seagrass" + | "minecraft:tall_seagrass" + | "minecraft:bubble_column" + ) { + return Ok(Self::WATER); + } + match state.properties.get("waterlogged").map(String::as_str) { + Some("true") => { + // The pinned copper-grate blocks use falling source water. + let falling = matches!( + state.name.as_str(), + "minecraft:copper_grate" + | "minecraft:exposed_copper_grate" + | "minecraft:weathered_copper_grate" + | "minecraft:oxidized_copper_grate" + | "minecraft:waxed_copper_grate" + | "minecraft:waxed_exposed_copper_grate" + | "minecraft:waxed_weathered_copper_grate" + | "minecraft:waxed_oxidized_copper_grate" + ); + Ok(Self { + falling, + ..Self::WATER + }) + } + None | Some("false") => Ok(Self::EMPTY), + _ => Err(invalid("invalid waterlogged block property")), + } + } +} +/// Queries required by fluid surface height and camera immersion. The caller +/// owns block shape/support behavior and world-query failures. +pub trait FluidHeightWorld { + type Error; + fn fluid(&mut self, position: [i32; 3]) -> Result<FluidState, Self::Error>; + fn sturdy_down(&mut self, position: [i32; 3]) -> Result<bool, Self::Error>; +} +#[derive(Debug)] +pub struct FluidStateTable(Vec<FluidState>); +impl FluidStateTable { + pub fn new(registry: &BlockRegistry) -> io::Result<Self> { + (0..registry.len()) + .map(|i| FluidState::from_block(registry.state(BlockStateId(i as u32)).unwrap())) + .collect::<io::Result<Vec<_>>>() + .map(Self) + } + pub fn get(&self, state: BlockStateId) -> Option<FluidState> { + self.0.get(state.0 as usize).copied() + } + pub fn matching_states(&self, mask: u8) -> impl Iterator<Item = BlockStateId> + '_ { + self.0 + .iter() + .enumerate() + .filter(move |(_, state)| state.kind.mask() & mask != 0) + .map(|(i, _)| BlockStateId(i as u32)) + } +} + +/// Bound identities for converting fluid states into their legacy liquid blocks. +pub struct FluidBlockBindings { + air: BlockStateId, + water: [BlockStateId; 16], + lava: [BlockStateId; 16], +} +impl FluidBlockBindings { + pub fn new(registry: &BlockRegistry) -> io::Result<Self> { + let levels = |name: &str| -> io::Result<[BlockStateId; 16]> { + let default = registry + .default_state(name) + .ok_or_else(|| invalid("missing liquid block"))?; + let mut state = registry.state(default).unwrap().clone(); + let mut result = [default; 16]; + for (level, id) in result.iter_mut().enumerate() { + state.properties.insert("level".into(), level.to_string()); + *id = registry + .id(&state) + .ok_or_else(|| invalid("missing liquid block level"))?; + } + Ok(result) + }; + Ok(Self { + air: registry + .default_state("minecraft:air") + .ok_or_else(|| invalid("missing air block"))?, + water: levels("minecraft:water")?, + lava: levels("minecraft:lava")?, + }) + } + pub fn block(&self, state: FluidState) -> BlockStateId { + if state.kind == FluidKind::Empty { + return self.air; + } + let level = if state.is_source() { + 0 + } else { + 8 - state.amount.min(8) + if state.falling { 8 } else { 0 } + } as usize; + if state.kind.same_family(FluidKind::Water) { + self.water[level] + } else { + self.lava[level] + } + } +} diff --git a/crates/horizon-world/src/fluid_box.rs b/crates/horizon-world/src/fluid_box.rs new file mode 100644 index 000000000..150bd6133 --- /dev/null +++ b/crates/horizon-world/src/fluid_box.rs @@ -0,0 +1,54 @@ +//! Entity fluid scan bounds and the boat passenger waterline restriction. +use horizon_core::geometry::{Aabb, Vec3}; +pub trait FluidBoxWorld { + type Error; + type Vehicle: Copy; + fn bounding_box(&self) -> Aabb; + fn vehicle(&mut self) -> Result<Option<Self::Vehicle>, Self::Error>; + fn modify_passenger_box( + &mut self, + vehicle: Self::Vehicle, + bounds: Aabb, + ) -> Result<Option<Aabb>, Self::Error>; +} +pub fn interaction_box<W: FluidBoxWorld>(world: &mut W) -> Result<Option<Aabb>, W::Error> { + let bounds = world.bounding_box().deflate(Vec3::new(0.001, 0.001, 0.001)); + match world.vehicle()? { + None => Ok(Some(bounds)), + Some(vehicle) => world.modify_passenger_box(vehicle, bounds), + } +} +pub trait BoatFluidBoxWorld { + type Error; + fn is_under_water(&mut self) -> Result<bool, Self::Error>; + fn boat_bounds(&self) -> Aabb; +} +/// Submerged boats preserve the passenger bounds. Otherwise only the part +/// strictly above the boat's top can interact with fluid; it may be absent. +pub fn boat_passenger_box<W: BoatFluidBoxWorld>( + world: &mut W, + bounds: Aabb, +) -> Result<Option<Aabb>, W::Error> { + if world.is_under_water()? { + return Ok(Some(bounds)); + } + let boat_top = world.boat_bounds().max_position().y; + let mut min = bounds.min_position(); + let max = bounds.max_position(); + if boat_top >= max.y { + return Ok(None); + } + min.y = java_max(min.y, boat_top); + Ok(Some(Aabb::new(min, max))) +} +fn java_max(a: f64, b: f64) -> f64 { + if a.is_nan() { + a + } else if b.is_nan() { + b + } else if a == 0.0 && b == 0.0 { + f64::from_bits(a.to_bits() & b.to_bits()) + } else { + a.max(b) + } +} diff --git a/crates/horizon-world/src/fluid_flow.rs b/crates/horizon-world/src/fluid_flow.rs new file mode 100644 index 000000000..272a51dae --- /dev/null +++ b/crates/horizon-world/src/fluid_flow.rs @@ -0,0 +1,108 @@ +//! Neighbor-derived water/lava currents and falling-fluid wall deflection. +use crate::fluid::{FluidKind, FluidState}; +use horizon_core::{ + geometry::{Direction, Vec3}, + position::BlockPos, +}; + +pub trait FluidFlowWorld { + type Error; + type Block: Copy; + fn fluid(&mut self, position: BlockPos) -> Result<FluidState, Self::Error>; + fn block(&mut self, position: BlockPos) -> Result<Self::Block, Self::Error>; + /// Resolved BLOCKS_FLUID_FLOW tag membership for the captured state. + fn blocks_fluid_flow(&self, state: Self::Block) -> bool; + /// Actual IceBlock class membership, including its subclasses. + fn is_ice_class(&self, state: Self::Block) -> bool; + fn is_face_sturdy( + &mut self, + state: Self::Block, + position: BlockPos, + direction: Direction, + ) -> Result<bool, Self::Error>; +} +/// Native wall test reads both block and fluid before any early return. The +/// supplied face is the scan direction, rather than its opposite. +pub fn solid_face<W: FluidFlowWorld>( + world: &mut W, + kind: FluidKind, + position: BlockPos, + direction: Direction, +) -> Result<bool, W::Error> { + let block = world.block(position)?; + let fluid = world.fluid(position)?; + if fluid.kind().same_family(kind) { + return Ok(false); + } + if direction == Direction::Up { + return Ok(true); + } + if world.is_ice_class(block) { + return Ok(false); + } + world.is_face_sturdy(block, position, direction) +} +fn affects_flow(kind: FluidKind, neighbor: FluidState) -> bool { + neighbor.kind() == FluidKind::Empty || neighbor.kind().same_family(kind) +} +const HORIZONTAL: [Direction; 4] = [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, +]; +/// The height differences and directional products round as f32 before being +/// accumulated in f64. Falling currents normalize before and after the Y push. +pub fn flow_at<W: FluidFlowWorld>( + world: &mut W, + state: FluidState, + position: BlockPos, +) -> Result<Vec3, W::Error> { + if state.kind() == FluidKind::Empty { + return Ok(Vec3::ZERO); + } + let mut x = 0.0; + let mut z = 0.0; + for direction in HORIZONTAL { + let [dx, dy, dz] = direction.normal(); + let p = position.offset(dx, dy, dz); + let neighbor = world.fluid(p)?; + if !affects_flow(state.kind(), neighbor) { + continue; + } + let mut height = neighbor.own_height(); + let mut difference = 0.0f32; + if height == 0.0 { + let block = world.block(p)?; + if !world.blocks_fluid_flow(block) { + let below = world.fluid(p.offset(0, -1, 0))?; + if affects_flow(state.kind(), below) { + height = below.own_height(); + if height > 0.0 { + difference = state.own_height() - (height - 0.8888889f32); + } + } + } + } else if height > 0.0 { + difference = state.own_height() - height; + } + if difference != 0.0 { + x += f64::from(dx as f32 * difference); + z += f64::from(dz as f32 * difference); + } + } + let mut result = Vec3::new(x, 0.0, z); + if state.falling() { + for direction in HORIZONTAL { + let [dx, dy, dz] = direction.normal(); + let p = position.offset(dx, dy, dz); + if solid_face(world, state.kind(), p, direction)? + || solid_face(world, state.kind(), p.offset(0, 1, 0), direction)? + { + result = result.normalize().add_vector(Vec3::new(0.0, -6.0, 0.0)); + break; + } + } + } + Ok(result.normalize()) +} diff --git a/crates/horizon-world/src/fluid_occupancy.rs b/crates/horizon-world/src/fluid_occupancy.rs new file mode 100644 index 000000000..4432eca3b --- /dev/null +++ b/crates/horizon-world/src/fluid_occupancy.rs @@ -0,0 +1,140 @@ +//! Native section-ordered liquid occupancy over resident registered block states. +use crate::{ + chunk::BlockSection, + compression::invalid, + fluid::FluidState, + registry::{BlockRegistry, BlockStateId}, +}; +use horizon_core::{geometry::Aabb, position::BlockPos}; +use std::{fmt, io}; + +pub struct FluidPresence<'r> { + registry: &'r BlockRegistry, + present: Vec<bool>, +} +impl<'r> FluidPresence<'r> { + pub fn new(registry: &'r BlockRegistry) -> io::Result<Self> { + let present = (0..registry.len()) + .map(|i| { + FluidState::from_block(registry.state(BlockStateId(i as u32)).unwrap()) + .map(|f| f != FluidState::EMPTY) + }) + .collect::<io::Result<Vec<_>>>()?; + Ok(Self { registry, present }) + } + pub fn registry(&self) -> &'r BlockRegistry { + self.registry + } + pub fn has_fluid(&self, state: BlockStateId) -> io::Result<bool> { + self.present + .get(state.0 as usize) + .copied() + .ok_or_else(|| invalid("fluid presence state outside registry")) + } +} +pub trait FluidOccupancyWorld { + type Error; + type Chunk: Copy; + fn minimum_section_y(&mut self) -> Result<i32, Self::Error>; + fn maximum_section_y(&mut self) -> Result<i32, Self::Error>; + /// Native getChunk, including calls when the requested Y interval is empty. + fn chunk(&mut self, x: i32, z: i32) -> Result<Self::Chunk, Self::Error>; + fn section(&mut self, chunk: Self::Chunk, y: i32) -> Result<&BlockSection<'_>, Self::Error>; + fn minimum_y(&mut self) -> Result<i32, Self::Error>; + fn maximum_y(&mut self) -> Result<i32, Self::Error>; +} +#[derive(Debug)] +pub enum FluidOccupancyError<E> { + World(E), + Data(io::Error), + NonFiniteBounds, + BudgetExceeded, +} +impl<E: fmt::Display> fmt::Display for FluidOccupancyError<E> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Data(e) => e.fmt(f), + Self::NonFiniteBounds => f.write_str("nonfinite fluid query bounds"), + Self::BudgetExceeded => f.write_str("fluid query budget exceeded"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for FluidOccupancyError<E> {} +fn spend<E>(budget: &mut usize) -> Result<(), FluidOccupancyError<E>> { + if *budget == 0 { + return Err(FluidOccupancyError::BudgetExceeded); + } + *budget -= 1; + Ok(()) +} +/// Inclusive floored AABB endpoints, as in LevelReader.findBlocksIn. Budget +/// counts chunk requests, section requests and inspected cells. Exhaustion is an +/// explicit error, never an empty-world result. Dry palettes avoid cell scans. +pub fn contains_any_liquid<W: FluidOccupancyWorld>( + world: &mut W, + registry: &FluidPresence<'_>, + bounds: Aabb, + mut budget: usize, +) -> Result<bool, FluidOccupancyError<W::Error>> { + use FluidOccupancyError::{Data, World}; + let a = bounds.min_position(); + let b = bounds.max_position(); + if [a.x, a.y, a.z, b.x, b.y, b.z] + .iter() + .any(|v| !v.is_finite()) + { + return Err(FluidOccupancyError::NonFiniteBounds); + } + let a = BlockPos::new(a.x.floor() as i32, a.y.floor() as i32, a.z.floor() as i32); + let b = BlockPos::new(b.x.floor() as i32, b.y.floor() as i32, b.z.floor() as i32); + let low = BlockPos::new(a.x.min(b.x), a.y.min(b.y), a.z.min(b.z)); + let high = BlockPos::new(a.x.max(b.x), a.y.max(b.y), a.z.max(b.z)); + let min_y = world.minimum_section_y().map_err(World)?.max(low.y >> 4); + let max_y = world.maximum_section_y().map_err(World)?.min(high.y >> 4); + for x in (low.x >> 4)..=(high.x >> 4) { + for z in (low.z >> 4)..=(high.z >> 4) { + spend(&mut budget)?; + let chunk = world.chunk(x, z).map_err(World)?; + for y in min_y..=max_y { + spend(&mut budget)?; + let section = world.section(chunk, y).map_err(World)?; + if !std::ptr::eq(section.registry(), registry.registry) { + return Err(Data(invalid("fluid query section registry mismatch"))); + } + if !section.any_state(|id| registry.present[id.0 as usize]) { + continue; + } + let origin = BlockPos::new(x.wrapping_shl(4), y.wrapping_shl(4), z.wrapping_shl(4)); + let min = BlockPos::new( + origin.x.max(low.x) & 15, + origin.y.max(low.y) & 15, + origin.z.max(low.z) & 15, + ); + let max = BlockPos::new( + origin.x.wrapping_add(15).min(high.x) & 15, + origin.y.wrapping_add(15).min(high.y) & 15, + origin.z.wrapping_add(15).min(high.z) & 15, + ); + for sy in min.y..=max.y { + for sz in min.z..=max.z { + for sx in min.x..=max.x { + spend(&mut budget)?; + let id = section + .get((sy * 256 + sz * 16 + sx) as usize) + .map_err(Data)?; + if registry.present[id.0 as usize] { + return Ok(true); + } + } + } + } + } + } + } + // Native scans outside world height only if the predicate accepts air. It + // still evaluates both height guards; the liquid predicate rejects air. + world.minimum_y().map_err(World)?; + world.maximum_y().map_err(World)?; + Ok(false) +} diff --git a/crates/horizon-world/src/fluid_shape.rs b/crates/horizon-world/src/fluid_shape.rs new file mode 100644 index 000000000..7df0a3b2d --- /dev/null +++ b/crates/horizon-world/src/fluid_shape.rs @@ -0,0 +1,47 @@ +//! Persistent pinned-fluid collision/ray shapes, including first-query caching. +use crate::fluid::{FluidHeightWorld, FluidKind, FluidState}; +use horizon_core::{ + geometry::{Aabb, Vec3, VoxelShape}, + position::BlockPos, +}; + +/// Share this cache across world views using the same fluid registry, as native +/// registered Fluid instances retain their shape maps across world queries. +/// The pinned registry has no amount-nine state; amounts are zero through eight. +pub struct FluidShapeCache { + shapes: Vec<Option<VoxelShape>>, +} +impl Default for FluidShapeCache { + fn default() -> Self { + Self { + shapes: vec![None; 5 * 18], + } + } +} +impl FluidShapeCache { + pub fn cached_states(&self) -> usize { + self.shapes.iter().filter(|v| v.is_some()).count() + } + pub fn shape<W: FluidHeightWorld>( + &mut self, + world: &mut W, + state: FluidState, + position: BlockPos, + ) -> Result<VoxelShape, W::Error> { + if state.kind() == FluidKind::Empty { + return Ok(VoxelShape::empty()); + } + let index = state.kind() as usize * 18 + + usize::from(state.falling()) * 9 + + usize::from(state.amount()); + if let Some(shape) = &self.shapes[index] { + return Ok(shape.clone()); + } + let height = f64::from(state.height_at(world, [position.x, position.y, position.z])?); + // FluidState validates all amounts and height_at returns [0,1]. + let shape = VoxelShape::from_box(Aabb::new(Vec3::ZERO, Vec3::new(1.0, height, 1.0))) + .expect("validated pinned fluid height"); + self.shapes[index] = Some(shape.clone()); + Ok(shape) + } +} diff --git a/crates/horizon-world/src/food.rs b/crates/horizon-world/src/food.rs new file mode 100644 index 000000000..77c931d6f --- /dev/null +++ b/crates/horizon-world/src/food.rs @@ -0,0 +1,135 @@ +//! Hunger, saturation, exhaustion and server-side natural regeneration. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Difficulty { + Peaceful, + Easy, + Normal, + Hard, +} +#[derive(Clone, Copy, Debug)] +pub struct FoodData { + pub food: i32, + pub saturation: f32, + pub exhaustion: f32, + pub timer: i32, +} +impl Default for FoodData { + fn default() -> Self { + Self { + food: 20, + saturation: 5.0, + exhaustion: 0.0, + timer: 0, + } + } +} +fn min(a: f32, b: f32) -> f32 { + if a.is_nan() || b.is_nan() { + f32::NAN + } else if a == 0.0 && b == 0.0 { + f32::from_bits(a.to_bits() | b.to_bits()) + } else { + a.min(b) + } +} +fn max(a: f32, b: f32) -> f32 { + if a.is_nan() || b.is_nan() { + f32::NAN + } else if a == 0.0 && b == 0.0 { + f32::from_bits(a.to_bits() & b.to_bits()) + } else { + a.max(b) + } +} +fn clamp(v: f32, lo: f32, hi: f32) -> f32 { + if v < lo { lo } else { min(v, hi) } +} +impl FoodData { + pub fn eat(&mut self, nutrition: i32, saturation_modifier: f32) { + self.eat_properties(nutrition, nutrition as f32 * saturation_modifier * 2.0); + } + pub fn eat_properties(&mut self, nutrition: i32, saturation: f32) { + self.food = nutrition.wrapping_add(self.food).clamp(0, 20); + self.saturation = clamp(saturation + self.saturation, 0.0, self.food as f32); + } + pub fn add_exhaustion(&mut self, value: f32) { + self.exhaustion = min(self.exhaustion + value, 40.0); + } + pub fn has_enough_food(&self) -> bool { + self.food as f32 > 6.0 + } + pub fn needs_food(&self) -> bool { + self.food < 20 + } + pub fn tick<W: FoodWorld>(&mut self, world: &mut W) -> Result<(), W::Error> { + let level = world.level(self)?; + let difficulty = world.difficulty(level, self)?; + if self.exhaustion > 4.0 { + self.exhaustion -= 4.0; + if self.saturation > 0.0 { + self.saturation = max(self.saturation - 1.0, 0.0); + } else if difficulty != Difficulty::Peaceful { + self.food = self.food.wrapping_sub(1).max(0); + } + } + let regenerate = world.natural_regeneration(level, self)?; + if regenerate && self.saturation > 0.0 && world.is_hurt(self)? && self.food >= 20 { + self.timer = self.timer.wrapping_add(1); + if self.timer >= 10 { + let amount = min(self.saturation, 6.0); + world.heal(self, amount / 6.0)?; + self.add_exhaustion(amount); + self.timer = 0; + } + } else if regenerate && self.food >= 18 && world.is_hurt(self)? { + self.timer = self.timer.wrapping_add(1); + if self.timer >= 80 { + world.heal(self, 1.0)?; + self.add_exhaustion(6.0); + self.timer = 0; + } + } else if self.food <= 0 { + self.timer = self.timer.wrapping_add(1); + if self.timer >= 80 { + if world.health(self)? > 10.0 + || difficulty == Difficulty::Hard + || (world.health(self)? > 1.0 && difficulty == Difficulty::Normal) + { + world.hurt_starvation(level, self, 1.0)?; + } + self.timer = 0; + } + } else { + self.timer = 0; + } + Ok(()) + } +} +/// World hooks preserve short-circuit query order. Callbacks can mutate food +/// state; errors retain earlier writes and effects. The level is captured once. +pub trait FoodWorld { + type Error; + type Level: Copy; + fn level(&mut self, food: &mut FoodData) -> Result<Self::Level, Self::Error>; + fn difficulty( + &mut self, + level: Self::Level, + food: &mut FoodData, + ) -> Result<Difficulty, Self::Error>; + fn natural_regeneration( + &mut self, + level: Self::Level, + food: &mut FoodData, + ) -> Result<bool, Self::Error>; + fn is_hurt(&mut self, food: &mut FoodData) -> Result<bool, Self::Error>; + fn heal(&mut self, food: &mut FoodData, amount: f32) -> Result<(), Self::Error>; + fn health(&mut self, food: &mut FoodData) -> Result<f32, Self::Error>; + /// Resolve the player's starvation damage source and dispatch hurtServer on + /// the captured level; the native boolean hurt result is ignored. + fn hurt_starvation( + &mut self, + level: Self::Level, + food: &mut FoodData, + amount: f32, + ) -> Result<(), Self::Error>; +} diff --git a/crates/horizon-world/src/food_properties.rs b/crates/horizon-world/src/food_properties.rs new file mode 100644 index 000000000..284179237 --- /dev/null +++ b/crates/horizon-world/src/food_properties.rs @@ -0,0 +1,86 @@ +//! Food component listener: consumption sounds, stored hunger and burp ordering. +use crate::food::FoodData; +use horizon_core::{geometry::Vec3, random::RandomSource}; +#[derive(Clone, Copy, Debug)] +pub struct FoodProperties { + pub nutrition: i32, + pub saturation: f32, + pub can_always_eat: bool, +} +impl PartialEq for FoodProperties { + fn eq(&self, other: &Self) -> bool { + let bits = |f: f32| if f.is_nan() { 0x7fc00000 } else { f.to_bits() }; + self.nutrition == other.nutrition + && bits(self.saturation) == bits(other.saturation) + && self.can_always_eat == other.can_always_eat + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum SoundCategory { + Neutral, + Players, +} +pub struct ConsumptionSound<L, S> { + pub level: L, + pub position: Vec3, + pub sound: S, + pub category: SoundCategory, + pub volume: f32, + pub pitch: f32, +} +pub trait FoodConsumptionWorld { + type Error; + type Level: Copy; + type Sound: Clone; + type Random: Copy; + type Source: RandomSource; + fn get_random(&mut self) -> Result<Self::Random, Self::Error>; + fn random_source(&mut self, random: Self::Random) -> &mut Self::Source; + /// Entity coordinate getters read its position field directly. + fn position(&self) -> Vec3; + fn is_player(&self) -> bool; + /// The virtual player getter may change which stored FoodData is returned. + fn food_data(&mut self) -> Result<&mut FoodData, Self::Error>; + /// Native level sound call excludes no source entity (source argument null). + fn play_sound( + &mut self, + sound: ConsumptionSound<Self::Level, Self::Sound>, + ) -> Result<(), Self::Error>; +} +impl FoodProperties { + pub fn on_consume<W: FoodConsumptionWorld>( + &self, + world: &mut W, + level: W::Level, + consume_sound: W::Sound, + burp_sound: W::Sound, + ) -> Result<(), W::Error> { + let random = world.get_random()?; + let position = world.position(); + let pitch = world.random_source(random).triangle_float(1.0, 0.4); + world.play_sound(ConsumptionSound { + level, + position, + sound: consume_sound, + category: SoundCategory::Neutral, + volume: 1.0, + pitch, + })?; + if world.is_player() { + world + .food_data()? + .eat_properties(self.nutrition, self.saturation); + let position = world.position(); + let pitch = 0.9f32 + world.random_source(random).next_float() * (1.0f32 - 0.9f32); + world.play_sound(ConsumptionSound { + level, + position, + sound: burp_sound, + category: SoundCategory::Players, + volume: 0.5, + pitch, + })?; + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/food_storage.rs b/crates/horizon-world/src/food_storage.rs new file mode 100644 index 000000000..0401e8158 --- /dev/null +++ b/crates/horizon-world/src/food_storage.rs @@ -0,0 +1,47 @@ +//! FoodData fields in a vanilla player NBT compound. +use crate::{ + food::FoodData, + nbt::{Compound, JavaString, Tag}, +}; +fn int(tag: Option<&Tag>, default: i32) -> i32 { + match tag { + Some(Tag::Byte(v)) => i32::from(*v), + Some(Tag::Short(v)) => i32::from(*v), + Some(Tag::Int(v)) => *v, + Some(Tag::Long(v)) => *v as i32, + Some(Tag::Float(v)) => f32::from_bits(*v).floor() as i32, + Some(Tag::Double(v)) => f64::from_bits(*v).floor() as i32, + _ => default, + } +} +fn float(tag: Option<&Tag>, default: f32) -> f32 { + match tag { + Some(Tag::Byte(v)) => f32::from(*v), + Some(Tag::Short(v)) => f32::from(*v), + Some(Tag::Int(v)) => *v as f32, + Some(Tag::Long(v)) => *v as f32, + Some(Tag::Float(v)) => f32::from_bits(*v), + Some(Tag::Double(v)) => f64::from_bits(*v) as f32, + _ => default, + } +} +impl FoodData { + /// Missing or nonnumeric values reset each field to its native default. + /// Numeric values are converted without clamping the resulting food state. + pub fn read_nbt(&mut self, tag: &Compound) { + let get = |s: &str| tag.get(&JavaString::from(s)); + self.food = int(get("foodLevel"), 20); + self.timer = int(get("foodTickTimer"), 0); + self.saturation = float(get("foodSaturationLevel"), 5.0); + self.exhaustion = float(get("foodExhaustionLevel"), 0.0); + } + /// Writes these four fields while preserving other player data. Java float + /// tag factories normalize both signed zeros to the shared positive zero. + pub fn write_nbt(&self, tag: &mut Compound) { + let float = |v: f32| Tag::Float(if v == 0.0 { 0 } else { v.to_bits() }); + tag.insert("foodLevel".into(), Tag::Int(self.food)); + tag.insert("foodTickTimer".into(), Tag::Int(self.timer)); + tag.insert("foodSaturationLevel".into(), float(self.saturation)); + tag.insert("foodExhaustionLevel".into(), float(self.exhaustion)); + } +} diff --git a/crates/horizon-world/src/free_space.rs b/crates/horizon-world/src/free_space.rs new file mode 100644 index 000000000..0d0b48d0f --- /dev/null +++ b/crates/horizon-world/src/free_space.rs @@ -0,0 +1,43 @@ +//! Entity.isFree: offset collision clearance followed by resident liquid checks. +use crate::{ + block_collision_scan::{BlockCollisionWorld, CollisionScanError}, + fluid_occupancy::{ + FluidOccupancyError, FluidOccupancyWorld, FluidPresence, contains_any_liquid, + }, + world_movement::{CollisionCheckRequest, EntityMovementWorld, no_world_collision}, +}; +use horizon_core::geometry::Vec3; +use std::fmt; +#[derive(Debug)] +pub enum FreeSpaceError<E> { + Collision(CollisionScanError<E>), + Fluid(FluidOccupancyError<E>), +} +impl<E: fmt::Display> fmt::Display for FreeSpaceError<E> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::Collision(e) => e.fmt(f), + Self::Fluid(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for FreeSpaceError<E> {} +pub fn offset_is_free<W, E>( + world: &mut W, + fluids: &FluidPresence<'_>, + mut request: CollisionCheckRequest<'_>, + offset: Vec3, + fluid_budget: usize, +) -> Result<bool, FreeSpaceError<E>> +where + W: BlockCollisionWorld<Error = E> + + EntityMovementWorld<Error = E> + + FluidOccupancyWorld<Error = E>, +{ + request.bounds = request.bounds.move_by(offset); + let bounds = request.bounds; + if !no_world_collision(world, request).map_err(FreeSpaceError::Collision)? { + return Ok(false); + } + Ok(!contains_any_liquid(world, fluids, bounds, fluid_budget).map_err(FreeSpaceError::Fluid)?) +} diff --git a/crates/horizon-world/src/ground_support.rs b/crates/horizon-world/src/ground_support.rs new file mode 100644 index 000000000..123332f0a --- /dev/null +++ b/crates/horizon-world/src/ground_support.rs @@ -0,0 +1,97 @@ +//! Supporting-block selection and Entity ground-state transitions. +use crate::{ + block_collision_scan::{BlockCollisionScan, BlockCollisionWorld, CollisionScanError}, + collision_context::CollisionContext, +}; +use horizon_core::{ + geometry::{Aabb, Axis, Vec3}, + position::BlockPos, +}; + +fn compare_positions(left: BlockPos, right: BlockPos) -> i32 { + // Vec3i.compareTo uses signed wrapping subtraction in Y/Z/X order. + if left.y != right.y { + left.y.wrapping_sub(right.y) + } else if left.z != right.z { + left.z.wrapping_sub(right.z) + } else { + left.x.wrapping_sub(right.x) + } +} +pub fn find_supporting_block<W: BlockCollisionWorld>( + world: &mut W, + context: CollisionContext<'_>, + entity_position: Vec3, + bounds: Aabb, + candidate_budget: usize, +) -> Result<Option<BlockPos>, CollisionScanError<W::Error>> { + let mut selected = None; + let mut closest = f64::MAX; + for hit in BlockCollisionScan::new(world, context, bounds, false, candidate_budget)? { + let p = hit?.position; + let dx = f64::from(p.x) + 0.5 - entity_position.x; + let dy = f64::from(p.y) + 0.5 - entity_position.y; + let dz = f64::from(p.z) + 0.5 - entity_position.z; + let distance = dx * dx + dy * dy + dz * dz; + if distance < closest + || distance == closest && selected.is_none_or(|old| compare_positions(old, p) < 0) + { + selected = Some(p); + closest = distance; + } + } + Ok(selected) +} +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +pub struct GroundState { + pub on_ground: bool, + pub horizontal_collision: bool, + pub on_ground_no_blocks: bool, + pub supporting_block: Option<BlockPos>, +} +impl GroundState { + /// Entity.setOnGroundWithMovement writes these flags before support queries. + /// A failed query preserves any earlier writes, as in the native method. + pub fn set_with_movement<E>( + &mut self, + on_ground: bool, + horizontal_collision: bool, + bounds: Aabb, + movement: Option<Vec3>, + find: impl FnMut(Aabb) -> Result<Option<BlockPos>, E>, + ) -> Result<(), E> { + self.on_ground = on_ground; + self.horizontal_collision = horizontal_collision; + self.check_support(on_ground, bounds, movement, find) + } + /// The optional movement is native's nullable movement argument. When the + /// first query misses, it can retry at the pre-horizontal-movement footprint. + pub fn check_support<E>( + &mut self, + on_ground: bool, + bounds: Aabb, + movement: Option<Vec3>, + mut find: impl FnMut(Aabb) -> Result<Option<BlockPos>, E>, + ) -> Result<(), E> { + if on_ground { + let min = bounds.min_position(); + let max = bounds.max_position(); + let foot = Aabb::new( + Vec3::new(min.x, min.y - 1.0e-6, min.z), + Vec3::new(max.x, bounds.min(Axis::Y), max.z), + ); + let mut found = find(foot)?; + if found.is_some() || self.on_ground_no_blocks { + self.supporting_block = found; + } else if let Some(movement) = movement { + found = find(foot.move_by(Vec3::new(-movement.x, 0.0, -movement.z)))?; + self.supporting_block = found; + } + self.on_ground_no_blocks = found.is_none(); + } else { + self.on_ground_no_blocks = false; + self.supporting_block = None; + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/heightmap.rs b/crates/horizon-world/src/heightmap.rs new file mode 100644 index 000000000..4cc7df058 --- /dev/null +++ b/crates/horizon-world/src/heightmap.rs @@ -0,0 +1,249 @@ +//! Packed column heights and the six Java 26.3 heightmap predicates. +//! +//! Block behavior supplies air/fluid facts and resolved block-tag membership. +//! Heightmaps do not infer those facts from collision shapes or block names. +use horizon_core::storage::{PackedStorage, StorageError}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum HeightmapType { + WorldSurfaceWg, + WorldSurface, + OceanFloorWg, + OceanFloor, + MotionBlocking, + MotionBlockingNoLeaves, +} + +impl HeightmapType { + pub const ALL: [Self; 6] = [ + Self::WorldSurfaceWg, + Self::WorldSurface, + Self::OceanFloorWg, + Self::OceanFloor, + Self::MotionBlocking, + Self::MotionBlockingNoLeaves, + ]; + + pub fn name(self) -> &'static str { + match self { + Self::WorldSurfaceWg => "WORLD_SURFACE_WG", + Self::WorldSurface => "WORLD_SURFACE", + Self::OceanFloorWg => "OCEAN_FLOOR_WG", + Self::OceanFloor => "OCEAN_FLOOR", + Self::MotionBlocking => "MOTION_BLOCKING", + Self::MotionBlockingNoLeaves => "MOTION_BLOCKING_NO_LEAVES", + } + } + + pub fn send_to_client(self) -> bool { + matches!( + self, + Self::WorldSurface | Self::MotionBlocking | Self::MotionBlockingNoLeaves + ) + } + + pub fn keep_after_worldgen(self) -> bool { + !matches!(self, Self::WorldSurfaceWg | Self::OceanFloorWg) + } + + pub fn is_opaque(self, state: impl HeightmapState) -> bool { + match self { + Self::WorldSurfaceWg | Self::WorldSurface => !state.is_air(), + Self::OceanFloorWg | Self::OceanFloor => state.blocks_motion_in_heightmap(), + Self::MotionBlocking => state.blocks_motion_in_heightmap() || state.has_fluid(), + Self::MotionBlockingNoLeaves => { + state.blocks_motion_in_heightmap_no_leaves() || state.has_fluid() + } + } + } +} + +pub trait HeightmapState: Copy { + fn is_air(self) -> bool; + /// Exact AIR block identity, distinct from cave/void air. + fn is_air_block(self) -> bool; + fn has_fluid(self) -> bool; + fn blocks_motion_in_heightmap(self) -> bool; + fn blocks_motion_in_heightmap_no_leaves(self) -> bool; +} + +pub trait HeightmapChunk { + type State: HeightmapState; + fn min_y(&self) -> i32; + fn height(&self) -> i32; + fn highest_section_y(&self) -> i32; + fn block_state(&self, x: i32, y: i32, z: i32) -> Self::State; +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum HeightmapError { + InvalidBounds, + MismatchedChunk, + Storage(StorageError), +} +impl From<StorageError> for HeightmapError { + fn from(value: StorageError) -> Self { + Self::Storage(value) + } +} +impl std::fmt::Display for HeightmapError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{self:?}") + } +} +impl std::error::Error for HeightmapError {} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Heightmap { + kind: HeightmapType, + min_y: i32, + height: i32, + data: PackedStorage, +} + +impl Heightmap { + /// Bounded to the vanilla codec's positive, aligned vertical ranges. + pub fn new(kind: HeightmapType, min_y: i32, height: i32) -> Result<Self, HeightmapError> { + if !(-2032..=2031).contains(&min_y) + || !(16..=4064).contains(&height) + || min_y % 16 != 0 + || height % 16 != 0 + || min_y + height > 2032 + { + return Err(HeightmapError::InvalidBounds); + } + let bits = (32 - (height as u32).leading_zeros()) as u8; + Ok(Self { + kind, + min_y, + height, + data: PackedStorage::new(bits, 256)?, + }) + } + + pub fn kind(&self) -> HeightmapType { + self.kind + } + pub fn raw_data(&self) -> &[u64] { + self.data.words() + } + + fn index(x: i32, z: i32) -> usize { + x.wrapping_add(z.wrapping_mul(16)) as usize + } + + pub fn first_available(&self, x: i32, z: i32) -> Result<i32, HeightmapError> { + Ok((self.data.get(Self::index(x, z))? as i32).wrapping_add(self.min_y)) + } + + pub fn highest_taken(&self, x: i32, z: i32) -> Result<i32, HeightmapError> { + Ok(self.first_available(x, z)?.wrapping_sub(1)) + } + + fn set_height(&mut self, x: i32, z: i32, y: i32) -> Result<(), HeightmapError> { + self.data + .set(Self::index(x, z), y.wrapping_sub(self.min_y) as u32)?; + Ok(()) + } + + fn check_chunk(&self, chunk: &impl HeightmapChunk) -> Result<(), HeightmapError> { + if chunk.min_y() != self.min_y || chunk.height() != self.height { + return Err(HeightmapError::MismatchedChunk); + } + Ok(()) + } + + /// The caller writes the new state to the chunk before updating its maps. + pub fn update<C: HeightmapChunk>( + &mut self, + chunk: &C, + x: i32, + y: i32, + z: i32, + state: C::State, + ) -> Result<bool, HeightmapError> { + self.check_chunk(chunk)?; + let first = self.first_available(x, z)?; + if y <= first.wrapping_sub(2) { + return Ok(false); + } + if self.kind.is_opaque(state) { + if y >= first { + self.set_height(x, z, y.wrapping_add(1))?; + return Ok(true); + } + } else if y == first.wrapping_sub(1) { + let mut scan_y = y.wrapping_sub(1); + while scan_y >= self.min_y { + if self.kind.is_opaque(chunk.block_state(x, scan_y, z)) { + self.set_height(x, z, scan_y.wrapping_add(1))?; + return Ok(true); + } + scan_y -= 1; + } + self.set_height(x, z, self.min_y)?; + return Ok(true); + } + Ok(false) + } + + /// Matching lengths preserve all bits, including padding and unused slots. + /// A length mismatch primes this registered map from the chunk instead. + pub fn set_raw_data( + &mut self, + chunk: &impl HeightmapChunk, + words: &[u64], + ) -> Result<(), HeightmapError> { + self.check_chunk(chunk)?; + if words.len() == self.data.words().len() { + self.data = PackedStorage::from_words(self.data.bits(), 256, words.to_vec())?; + Ok(()) + } else { + Self::prime(chunk, &mut [self]) + } + } + + /// Preserves caller map order and scans X, then Z, then descending Y. + /// An unfound column retains its previous value, including during re-priming. + pub fn prime( + chunk: &impl HeightmapChunk, + maps: &mut [&mut Self], + ) -> Result<(), HeightmapError> { + if maps.is_empty() { + return Ok(()); + } + for map in maps.iter() { + map.check_chunk(chunk)?; + } + let upper = chunk.highest_section_y().wrapping_add(16); + let mut remaining = Vec::with_capacity(maps.len()); + for x in 0..16 { + for z in 0..16 { + remaining.clear(); + remaining.extend(0..maps.len()); + let mut y = upper.wrapping_sub(1); + while y >= chunk.min_y() { + let state = chunk.block_state(x, y, z); + if !state.is_air_block() { + let mut i = 0; + while i < remaining.len() { + let map = &mut maps[remaining[i]]; + if map.kind.is_opaque(state) { + map.set_height(x, z, y.wrapping_add(1))?; + remaining.remove(i); + } else { + i += 1; + } + } + if remaining.is_empty() { + break; + } + } + y -= 1; + } + } + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/identifier.rs b/crates/horizon-world/src/identifier.rs new file mode 100644 index 000000000..cd47a984a --- /dev/null +++ b/crates/horizon-world/src/identifier.rs @@ -0,0 +1,95 @@ +//! Validated resource identifiers, with Java hashing and path-first ordering. +use crate::java_hash_map::JavaKey; +use std::{cmp::Ordering, fmt, sync::Arc}; +#[derive(Debug, PartialEq, Eq)] +struct Data { + namespace: Box<str>, + path: Box<str>, + hash: i32, +} +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Identifier(Arc<Data>); +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IdentifierError { + Namespace, + Path, +} +impl fmt::Display for IdentifierError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.write_str(match self { + Self::Namespace => "invalid identifier namespace", + Self::Path => "invalid identifier path", + }) + } +} +impl std::error::Error for IdentifierError {} +fn valid(c: u8) -> bool { + c.is_ascii_lowercase() || c.is_ascii_digit() || b"_.-".contains(&c) +} +fn hash(s: &str) -> i32 { + s.bytes() + .fold(0i32, |h, c| h.wrapping_mul(31).wrapping_add(i32::from(c))) +} +impl Identifier { + pub fn from_parts(namespace: &str, path: &str) -> Result<Self, IdentifierError> { + if !namespace.bytes().all(valid) { + return Err(IdentifierError::Namespace); + } + if !path.bytes().all(|c| valid(c) || c == b'/') { + return Err(IdentifierError::Path); + } + Ok(Self(Arc::new(Data { + namespace: namespace.into(), + path: path.into(), + hash: hash(namespace).wrapping_mul(31).wrapping_add(hash(path)), + }))) + } + pub fn parse(text: &str) -> Result<Self, IdentifierError> { + let (namespace, path) = text.split_once(':').unwrap_or(("minecraft", text)); + Self::from_parts( + if namespace.is_empty() { + "minecraft" + } else { + namespace + }, + path, + ) + } + pub fn namespace(&self) -> &str { + &self.0.namespace + } + pub fn path(&self) -> &str { + &self.0.path + } + pub fn hash_code(&self) -> i32 { + self.0.hash + } +} +impl Ord for Identifier { + fn cmp(&self, other: &Self) -> Ordering { + self.path() + .cmp(other.path()) + .then_with(|| self.namespace().cmp(other.namespace())) + } +} +impl PartialOrd for Identifier { + fn partial_cmp(&self, other: &Self) -> Option<Ordering> { + Some(self.cmp(other)) + } +} +impl fmt::Display for Identifier { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}:{}", self.namespace(), self.path()) + } +} +impl JavaKey for Identifier { + fn java_hash(&self) -> i32 { + self.hash_code() + } + fn comparable_compare(&self, other: &Self) -> Option<std::cmp::Ordering> { + Some(self.cmp(other)) + } + fn tie_break(&self, other: &Self) -> std::cmp::Ordering { + self.cmp(other) + } +} diff --git a/crates/horizon-world/src/interaction_shapes.rs b/crates/horizon-world/src/interaction_shapes.rs new file mode 100644 index 000000000..faf7b84a3 --- /dev/null +++ b/crates/horizon-world/src/interaction_shapes.rs @@ -0,0 +1,36 @@ +//! Complete registry-bound interaction shapes for ray-face overrides. +use crate::{ + collision::CachedCollisionRegistry, + compression::invalid, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, +}; +use horizon_core::geometry::VoxelShape; +use std::io; +/// The pinned implementation audit establishes that every interaction shape is +/// static per state. The import retains native alias/canonical shape identity. +pub struct InteractionShapes<'r> { + shapes: CachedCollisionRegistry<'r>, +} +impl<'r> InteractionShapes<'r> { + pub fn from_nbt(tag: &Tag, registry: &'r BlockRegistry) -> io::Result<Self> { + if tag.get("kind") != Some(&Tag::String("interaction".into())) { + return Err(invalid("not an interaction shape table")); + } + let shapes = CachedCollisionRegistry::from_nbt(tag, registry)?; + if !shapes.has_canonical_identities() || shapes.cached_state_count() != registry.len() { + return Err(invalid( + "interaction shape table must bind every state with canonical identities", + )); + } + Ok(Self { shapes }) + } + pub fn registry(&self) -> &'r BlockRegistry { + self.shapes.registry() + } + pub fn shape(&self, state: BlockStateId) -> io::Result<&VoxelShape> { + self.shapes + .cached_shape(state)? + .ok_or_else(|| invalid("missing interaction shape")) + } +} diff --git a/crates/horizon-world/src/inventory_pickup.rs b/crates/horizon-world/src/inventory_pickup.rs new file mode 100644 index 000000000..8d9545cd3 --- /dev/null +++ b/crates/horizon-world/src/inventory_pickup.rs @@ -0,0 +1,159 @@ +//! Player inventory resource insertion. The source stack is consumed in place; +//! callbacks can mutate aliased stacks or inventory slots at native boundaries. +use crate::{ + item_stack_refs::StackRef, + player_inventory::{InventoryError, InventoryRules, PlayerInventory}, +}; +#[derive(Debug)] +pub enum PickupError<E> { + Inventory(InventoryError), + Callback(E), +} +pub trait PickupHooks<I, K, V>: InventoryRules<I, K, V> { + type Error; + fn item_max_stack_size(&self, stack: &StackRef<I, K, V>) -> i32; + fn max_stack_size( + &mut self, + inventory: &mut PlayerInventory<I, K, V>, + ) -> Result<i32, Self::Error>; + fn infinite_materials( + &mut self, + inventory: &mut PlayerInventory<I, K, V>, + ) -> Result<bool, Self::Error>; +} +fn limit<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq, H: PickupHooks<I, K, V>>( + inv: &mut PlayerInventory<I, K, V>, + stack: &StackRef<I, K, V>, + hooks: &mut H, +) -> Result<i32, PickupError<H::Error>> { + let max = hooks.max_stack_size(inv).map_err(PickupError::Callback)?; + Ok(max.min(hooks.item_max_stack_size(stack))) +} +fn remaining<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq, H: PickupHooks<I, K, V>>( + inv: &mut PlayerInventory<I, K, V>, + target: &StackRef<I, K, V>, + stack: &StackRef<I, K, V>, + hooks: &mut H, +) -> Result<bool, PickupError<H::Error>> { + if target.read().is_empty() + || !target.read().same_item_components(&stack.read()) + || hooks.item_max_stack_size(target) <= 1 + || hooks.is_damaged(target) + { + return Ok(false); + } + let count = target.read().count(); + Ok(count < limit(inv, target, hooks)?) +} +pub fn slot_with_space< + I: Copy + Eq, + K: Clone + Eq, + V: Clone + PartialEq, + H: PickupHooks<I, K, V>, +>( + inv: &mut PlayerInventory<I, K, V>, + stack: &StackRef<I, K, V>, + hooks: &mut H, +) -> Result<i32, PickupError<H::Error>> { + let target = inv.selected_item(); + if remaining(inv, &target, stack, hooks)? { + return Ok(inv.selected() as i32); + } + let target = inv.get(40).expect("offhand"); + if remaining(inv, &target, stack, hooks)? { + return Ok(40); + } + for i in 0..36 { + let target = inv.get(i).expect("valid slot"); + if remaining(inv, &target, stack, hooks)? { + return Ok(i); + } + } + Ok(-1) +} +fn add_resource<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq, H: PickupHooks<I, K, V>>( + inv: &mut PlayerInventory<I, K, V>, + index: i32, + stack: &StackRef<I, K, V>, + hooks: &mut H, +) -> Result<i32, PickupError<H::Error>> { + let count = stack.read().count(); + let mut target = inv.get(index).map_err(PickupError::Inventory)?; + if target.read().is_empty() { + target = inv.stacks().resolve(stack.read().copy_with_count(0)); + inv.set(index, target.clone()) + .map_err(PickupError::Inventory)?; + } + let max = limit(inv, &target, hooks)?; + let amount = count.min(max.wrapping_sub(target.read().count())); + if amount == 0 { + return Ok(count); + } + let count = count.wrapping_sub(amount); + target.write().grow(amount); + target.write().pop_time = 5; + Ok(count) +} +pub fn add<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq, H: PickupHooks<I, K, V>>( + inv: &mut PlayerInventory<I, K, V>, + mut index: i32, + stack: &StackRef<I, K, V>, + hooks: &mut H, +) -> Result<bool, PickupError<H::Error>> { + if stack.read().is_empty() { + return Ok(false); + } + if hooks.is_damaged(stack) { + if index == -1 { + index = inv.free_slot(); + } + if index >= 0 { + // copyAndClear is evaluated before List.set validates its index. + let copy = inv.stacks().resolve(stack.write().copy_and_clear()); + inv.set_non_equipment(index, copy) + .map_err(PickupError::Inventory)?; + inv.get(index) + .expect("validated ordinary slot") + .write() + .pop_time = 5; + return Ok(true); + } + if hooks + .infinite_materials(inv) + .map_err(PickupError::Callback)? + { + stack.write().count = 0; + return Ok(true); + } + return Ok(false); + } + let before = loop { + let before = stack.read().count(); + let left = if index == -1 { + let mut slot = slot_with_space(inv, stack, hooks)?; + if slot == -1 { + slot = inv.free_slot(); + } + if slot == -1 { + stack.read().count() + } else { + add_resource(inv, slot, stack, hooks)? + } + } else { + add_resource(inv, index, stack, hooks)? + }; + stack.write().count = left; + if stack.read().is_empty() || stack.read().count() >= before { + break before; + } + }; + if stack.read().count() == before + && hooks + .infinite_materials(inv) + .map_err(PickupError::Callback)? + { + stack.write().count = 0; + return Ok(true); + } + Ok(stack.read().count() < before) +} diff --git a/crates/horizon-world/src/inventory_tick.rs b/crates/horizon-world/src/inventory_tick.rs new file mode 100644 index 000000000..aaa75a639 --- /dev/null +++ b/crates/horizon-world/src/inventory_tick.rs @@ -0,0 +1,87 @@ +//! Inventory/equipment ticking composed with ItemStack's pop-time update and +//! server-only item dispatch. All references are captured at native boundaries. +use crate::{ + item_stack_refs::StackRef, + player_inventory::{EquipmentSlot, PlayerInventory}, +}; +pub trait InventoryTickWorld<I, K, V> { + type Error; + type Level: Copy; + fn level( + &mut self, + inventory: &mut PlayerInventory<I, K, V>, + ) -> Result<Self::Level, Self::Error>; + /// This is a ServerLevel type test, not Level.isClientSide(). + fn is_server_level(&self, level: Self::Level) -> bool; + fn item_tick( + &mut self, + inventory: &mut PlayerInventory<I, K, V>, + item: I, + stack: StackRef<I, K, V>, + level: Self::Level, + slot: Option<EquipmentSlot>, + ) -> Result<(), Self::Error>; +} +pub fn tick_stack< + I: Copy + Eq, + K: Clone + Eq, + V: Clone + PartialEq, + W: InventoryTickWorld<I, K, V>, +>( + w: &mut W, + inventory: &mut PlayerInventory<I, K, V>, + stack: StackRef<I, K, V>, + level: W::Level, + slot: Option<EquipmentSlot>, +) -> Result<(), W::Error> { + { + let mut data = stack.write(); + if data.pop_time > 0 { + data.pop_time = data.pop_time.wrapping_sub(1); + } + } + if w.is_server_level(level) { + let item = stack.read().item(); + w.item_tick(inventory, item, stack, level, slot)?; + } + Ok(()) +} +pub fn tick_inventory< + I: Copy + Eq, + K: Clone + Eq, + V: Clone + PartialEq, + W: InventoryTickWorld<I, K, V>, +>( + w: &mut W, + inventory: &mut PlayerInventory<I, K, V>, +) -> Result<(), W::Error> { + for index in 0..36 { + let stack = inventory.get(index).expect("ordinary slot"); + if !stack.read().is_empty() { + let level = w.level(inventory)?; + let slot = (index as usize == inventory.selected()).then_some(EquipmentSlot::MainHand); + tick_stack(w, inventory, stack, level, slot)?; + } + } + Ok(()) +} +pub fn tick_equipment< + I: Copy + Eq, + K: Clone + Eq, + V: Clone + PartialEq, + W: InventoryTickWorld<I, K, V>, +>( + w: &mut W, + inventory: &mut PlayerInventory<I, K, V>, +) -> Result<(), W::Error> { + // EnumMap iteration is weakly consistent. Read each entry when reached so + // writes to later slots during a callback are visible in this same tick. + for slot in EquipmentSlot::ALL { + let stack = inventory.equipment().get(slot); + if !stack.read().is_empty() { + let level = w.level(inventory)?; + tick_stack(w, inventory, stack, level, Some(slot))?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/src/inventory_use.rs b/crates/horizon-world/src/inventory_use.rs new file mode 100644 index 000000000..d37ea341a --- /dev/null +++ b/crates/horizon-world/src/inventory_use.rs @@ -0,0 +1,485 @@ +//! Living item-use lifecycle bound to player inventory, shared stack identity +//! and synchronized using/offhand bytes. Item effects and level services remain +//! explicit so their callbacks can observe or mutate the same stored state. +use crate::{ + item_stack_refs::StackRef, + item_use_lifecycle::{UseLifecycleWorld, UseState}, + living_use_flags, + player_equipment::{self, InteractionHand}, + player_inventory::{EquipmentSlot, PlayerInventory}, + synced_values::{DataError, DataValue, Observer, SyncedValues}, +}; +pub type ActiveStack<I, K, V> = UseState<StackRef<I, K, V>>; +pub struct UseView<'a, I, K, V> { + pub inventory: &'a mut PlayerInventory<I, K, V>, + pub flags: &'a mut SyncedValues<u8>, +} +impl<I, K, V> UseView<'_, I, K, V> { + pub fn reborrow(&mut self) -> UseView<'_, I, K, V> { + UseView { + inventory: self.inventory, + flags: self.flags, + } + } +} +pub trait UseServices<I, K, V> { + type Error; + type Level: Copy; + fn level( + &mut self, + view: UseView<'_, I, K, V>, + state: &mut ActiveStack<I, K, V>, + ) -> Result<Self::Level, Self::Error>; + fn is_client( + &mut self, + view: UseView<'_, I, K, V>, + state: &mut ActiveStack<I, K, V>, + level: Self::Level, + ) -> Result<bool, Self::Error>; + fn remaining_ticks( + &mut self, + _view: UseView<'_, I, K, V>, + state: &mut ActiveStack<I, K, V>, + ) -> Result<i32, Self::Error> { + Ok(state.remaining) + } + fn item_tick( + &mut self, + view: UseView<'_, I, K, V>, + state: &mut ActiveStack<I, K, V>, + item: StackRef<I, K, V>, + level: Self::Level, + remaining: i32, + ) -> Result<(), Self::Error>; + fn use_on_release( + &mut self, + view: UseView<'_, I, K, V>, + state: &mut ActiveStack<I, K, V>, + item: StackRef<I, K, V>, + ) -> Result<bool, Self::Error>; + fn release_item( + &mut self, + view: UseView<'_, I, K, V>, + state: &mut ActiveStack<I, K, V>, + item: StackRef<I, K, V>, + level: Self::Level, + remaining: i32, + ) -> Result<(), Self::Error>; + fn finish_item( + &mut self, + view: UseView<'_, I, K, V>, + state: &mut ActiveStack<I, K, V>, + item: StackRef<I, K, V>, + level: Self::Level, + ) -> Result<StackRef<I, K, V>, Self::Error>; + fn finish_vibration( + &mut self, + view: UseView<'_, I, K, V>, + state: &mut ActiveStack<I, K, V>, + item: StackRef<I, K, V>, + ) -> Result<(), Self::Error>; + fn on_equip( + &mut self, + view: UseView<'_, I, K, V>, + state: &mut ActiveStack<I, K, V>, + slot: EquipmentSlot, + old: StackRef<I, K, V>, + new: StackRef<I, K, V>, + ) -> Result<(), Self::Error>; + fn on_synced( + &mut self, + view: UseView<'_, I, K, V>, + state: &mut ActiveStack<I, K, V>, + id: u8, + ) -> Result<(), Self::Error>; +} +pub struct InventoryUse<I, K, V, S> { + pub inventory: PlayerInventory<I, K, V>, + pub flags: SyncedValues<u8>, + pub services: S, + empty: StackRef<I, K, V>, +} +impl<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq, S> InventoryUse<I, K, V, S> { + pub fn new( + inventory: PlayerInventory<I, K, V>, + flags: SyncedValues<u8>, + services: S, + ) -> Result<Self, u8> { + flags.get(living_use_flags::FLAGS_ID)?; + let empty = inventory.stacks().empty(); + Ok(Self { + inventory, + flags, + services, + empty, + }) + } +} +struct FlagObserver<'a, I, K, V, S> { + inventory: &'a mut PlayerInventory<I, K, V>, + state: &'a mut ActiveStack<I, K, V>, + services: &'a mut S, +} +impl<I, K, V, S: UseServices<I, K, V>> Observer<u8> for FlagObserver<'_, I, K, V, S> { + type Error = S::Error; + fn updated(&mut self, flags: &mut SyncedValues<u8>, id: u8) -> Result<(), Self::Error> { + self.services.on_synced( + UseView { + inventory: self.inventory, + flags, + }, + self.state, + id, + ) + } +} +impl<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq, S: UseServices<I, K, V>> UseLifecycleWorld + for InventoryUse<I, K, V, S> +{ + type Error = S::Error; + type Item = StackRef<I, K, V>; + type Hand = InteractionHand; + type Level = S::Level; + fn empty_item(&self) -> Self::Item { + self.empty.clone() + } + fn is_empty(&self, item: Self::Item) -> bool { + item.read().is_empty() + } + fn same_item_type(&self, a: Self::Item, b: Self::Item) -> bool { + a.read().same_item(&b.read()) + } + fn using_item(&mut self, _: &mut ActiveStack<I, K, V>) -> Result<bool, Self::Error> { + Ok(living_use_flags::using_item(&self.flags).expect("validated flags")) + } + fn used_hand(&mut self, _: &mut ActiveStack<I, K, V>) -> Result<InteractionHand, Self::Error> { + Ok(living_use_flags::used_hand(&self.flags).expect("validated flags")) + } + fn hand_item( + &mut self, + _: &mut ActiveStack<I, K, V>, + hand: InteractionHand, + ) -> Result<Self::Item, Self::Error> { + Ok(player_equipment::get_hand(&self.inventory, hand)) + } + fn set_hand_item( + &mut self, + state: &mut ActiveStack<I, K, V>, + hand: InteractionHand, + item: Self::Item, + ) -> Result<(), Self::Error> { + let old = player_equipment::set(&mut self.inventory, hand.slot(), item.clone()); + self.services.on_equip( + UseView { + inventory: &mut self.inventory, + flags: &mut self.flags, + }, + state, + hand.slot(), + old, + item, + ) + } + fn level(&mut self, state: &mut ActiveStack<I, K, V>) -> Result<Self::Level, Self::Error> { + self.services.level( + UseView { + inventory: &mut self.inventory, + flags: &mut self.flags, + }, + state, + ) + } + fn is_client( + &mut self, + state: &mut ActiveStack<I, K, V>, + level: Self::Level, + ) -> Result<bool, Self::Error> { + self.services.is_client( + UseView { + inventory: &mut self.inventory, + flags: &mut self.flags, + }, + state, + level, + ) + } + fn remaining_ticks(&mut self, state: &mut ActiveStack<I, K, V>) -> Result<i32, Self::Error> { + self.services.remaining_ticks( + UseView { + inventory: &mut self.inventory, + flags: &mut self.flags, + }, + state, + ) + } + fn item_tick( + &mut self, + state: &mut ActiveStack<I, K, V>, + item: Self::Item, + level: Self::Level, + remaining: i32, + ) -> Result<(), Self::Error> { + self.services.item_tick( + UseView { + inventory: &mut self.inventory, + flags: &mut self.flags, + }, + state, + item, + level, + remaining, + ) + } + fn use_on_release( + &mut self, + state: &mut ActiveStack<I, K, V>, + item: Self::Item, + ) -> Result<bool, Self::Error> { + self.services.use_on_release( + UseView { + inventory: &mut self.inventory, + flags: &mut self.flags, + }, + state, + item, + ) + } + fn release_item( + &mut self, + state: &mut ActiveStack<I, K, V>, + item: Self::Item, + level: Self::Level, + remaining: i32, + ) -> Result<(), Self::Error> { + self.services.release_item( + UseView { + inventory: &mut self.inventory, + flags: &mut self.flags, + }, + state, + item, + level, + remaining, + ) + } + fn finish_item( + &mut self, + state: &mut ActiveStack<I, K, V>, + item: Self::Item, + level: Self::Level, + ) -> Result<Self::Item, Self::Error> { + self.services.finish_item( + UseView { + inventory: &mut self.inventory, + flags: &mut self.flags, + }, + state, + item, + level, + ) + } + fn set_using_flag( + &mut self, + state: &mut ActiveStack<I, K, V>, + using: bool, + ) -> Result<(), Self::Error> { + let mut observer = FlagObserver { + inventory: &mut self.inventory, + state, + services: &mut self.services, + }; + living_use_flags::set_flag(&mut self.flags, 1, using, &mut observer).map_err(|error| { + match error { + DataError::Observer(e) => e, + DataError::UnknownId(_) => unreachable!("validated flags"), + } + }) + } + fn finish_vibration( + &mut self, + state: &mut ActiveStack<I, K, V>, + item: Self::Item, + ) -> Result<(), Self::Error> { + self.services.finish_vibration( + UseView { + inventory: &mut self.inventory, + flags: &mut self.flags, + }, + state, + item, + ) + } +} + +/// Duration dispatch used when client synchronization discovers a newly held +/// active stack. Implementations retain the captured stack across callbacks. +pub trait DurationServices<I, K, V>: UseServices<I, K, V> { + fn duration( + &mut self, + view: UseView<'_, I, K, V>, + state: &mut ActiveStack<I, K, V>, + item: StackRef<I, K, V>, + ) -> Result<i32, Self::Error>; +} +/// LivingEntity's reaction to DATA_LIVING_ENTITY_FLAGS after Entity's observer +/// has run. Other synchronized keys (pose, sleeping position, etc.) are separate. +pub fn flags_updated< + I: Copy + Eq, + K: Clone + Eq, + V: Clone + PartialEq, + S: DurationServices<I, K, V>, +>( + services: &mut S, + mut view: UseView<'_, I, K, V>, + state: &mut ActiveStack<I, K, V>, +) -> Result<(), S::Error> { + let level = services.level(view.reborrow(), state)?; + if !services.is_client(view.reborrow(), state, level)? { + return Ok(()); + } + if living_use_flags::using_item(view.flags).expect("validated flags") + && state.item.read().is_empty() + { + let hand = living_use_flags::used_hand(view.flags).expect("validated flags"); + state.item = player_equipment::get_hand(view.inventory, hand); + if !state.item.read().is_empty() { + let item = state.item.clone(); + state.remaining = services.duration(view, state, item)?; + } + } else if !living_use_flags::using_item(view.flags).expect("validated flags") + && !state.item.read().is_empty() + { + state.item = view.inventory.stacks().empty(); + state.remaining = 0; + } + Ok(()) +} +impl<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq, S: UseServices<I, K, V>> + InventoryUse<I, K, V, S> +{ + pub fn assign_flags( + &mut self, + state: &mut ActiveStack<I, K, V>, + values: &[DataValue<u8>], + ) -> Result<(), DataError<S::Error>> { + let mut observer = FlagObserver { + inventory: &mut self.inventory, + state, + services: &mut self.services, + }; + self.flags.assign(values, &mut observer) + } + pub fn set_flag( + &mut self, + state: &mut ActiveStack<I, K, V>, + mask: i32, + value: bool, + ) -> Result<(), DataError<S::Error>> { + let mut observer = FlagObserver { + inventory: &mut self.inventory, + state, + services: &mut self.services, + }; + living_use_flags::set_flag(&mut self.flags, mask, value, &mut observer) + } +} + +/// Services needed by startUsingItem in addition to the stored lifecycle. +pub trait StartServices<I, K, V>: DurationServices<I, K, V> { + fn synchronize_equipment( + &mut self, + view: UseView<'_, I, K, V>, + state: &mut ActiveStack<I, K, V>, + level: Self::Level, + hand: InteractionHand, + item: StackRef<I, K, V>, + ) -> Result<(), Self::Error>; + fn start_vibration( + &mut self, + view: UseView<'_, I, K, V>, + state: &mut ActiveStack<I, K, V>, + item: StackRef<I, K, V>, + ) -> Result<(), Self::Error>; + fn has_kinetic_weapon(&self, item: &StackRef<I, K, V>) -> bool; + /// The caller owns the actual enemy map. Reset it at this native point. + fn reset_recent_kinetic_enemies( + &mut self, + view: UseView<'_, I, K, V>, + state: &mut ActiveStack<I, K, V>, + ); +} +impl<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq, S: StartServices<I, K, V>> + crate::item_use_start::StartUseWorld for InventoryUse<I, K, V, S> +{ + fn duration( + &mut self, + state: &mut ActiveStack<I, K, V>, + item: StackRef<I, K, V>, + ) -> Result<i32, Self::Error> { + self.services.duration( + UseView { + inventory: &mut self.inventory, + flags: &mut self.flags, + }, + state, + item, + ) + } + fn synchronize_equipment( + &mut self, + state: &mut ActiveStack<I, K, V>, + level: Self::Level, + hand: InteractionHand, + item: StackRef<I, K, V>, + ) -> Result<(), Self::Error> { + self.services.synchronize_equipment( + UseView { + inventory: &mut self.inventory, + flags: &mut self.flags, + }, + state, + level, + hand, + item, + ) + } + fn is_off_hand(&self, hand: InteractionHand) -> bool { + hand == InteractionHand::Off + } + fn set_off_hand_flag( + &mut self, + state: &mut ActiveStack<I, K, V>, + off: bool, + ) -> Result<(), Self::Error> { + self.set_flag(state, 2, off).map_err(|error| match error { + DataError::Observer(e) => e, + DataError::UnknownId(_) => unreachable!("validated flags"), + }) + } + fn start_vibration( + &mut self, + state: &mut ActiveStack<I, K, V>, + item: StackRef<I, K, V>, + ) -> Result<(), Self::Error> { + self.services.start_vibration( + UseView { + inventory: &mut self.inventory, + flags: &mut self.flags, + }, + state, + item, + ) + } + fn has_kinetic_weapon(&self, item: StackRef<I, K, V>) -> bool { + self.services.has_kinetic_weapon(&item) + } + fn reset_recent_kinetic_enemies(&mut self, state: &mut ActiveStack<I, K, V>) { + self.services.reset_recent_kinetic_enemies( + UseView { + inventory: &mut self.inventory, + flags: &mut self.flags, + }, + state, + ) + } +} diff --git a/crates/horizon-world/src/item_after_use.rs b/crates/horizon-world/src/item_after_use.rs new file mode 100644 index 000000000..01b4d84df --- /dev/null +++ b/crates/horizon-world/src/item_after_use.rs @@ -0,0 +1,69 @@ +//! ItemStack finish-use component effects over shared stack storage. The copy +//! captured before the item handler determines both remainder and cooldown. +use crate::{ + component_patch::Prototype, + item_cooldowns::UseCooldown, + item_stack_refs::{ItemStacks, StackRef}, + item_stack_storage::ItemStackData, + item_template::{ItemTemplate, ValidationRules}, + use_remainder, +}; +pub trait AfterUseWorld<I, K, V>: ValidationRules<I, K, V> { + type Error; + type Level; + type Group; + fn remainder(&self, stack: &ItemStackData<I, K, V>) -> Option<ItemTemplate<I, K, V>>; + fn cooldown(&self, stack: &ItemStackData<I, K, V>) -> Option<UseCooldown<Self::Group>>; + fn prototype(&self, item: I) -> Prototype<K, V>; + fn finish_item( + &mut self, + stack: StackRef<I, K, V>, + level: Self::Level, + ) -> Result<StackRef<I, K, V>, Self::Error>; + fn infinite_materials(&mut self) -> Result<bool, Self::Error>; + fn extra_item(&mut self, stack: StackRef<I, K, V>) -> Result<(), Self::Error>; + fn apply_cooldown( + &mut self, + component: UseCooldown<Self::Group>, + original: StackRef<I, K, V>, + ) -> Result<(), Self::Error>; +} +pub fn finish<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq, W: AfterUseWorld<I, K, V>>( + stacks: &ItemStacks<I, K, V>, + world: &mut W, + stack: StackRef<I, K, V>, + level: W::Level, +) -> Result<StackRef<I, K, V>, W::Error> { + let original = stacks.copy(&stack); + let result = world.finish_item(stack, level)?; + after_use(stacks, world, result, original) +} +pub fn after_use<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq, W: AfterUseWorld<I, K, V>>( + stacks: &ItemStacks<I, K, V>, + world: &mut W, + mut result: StackRef<I, K, V>, + original: StackRef<I, K, V>, +) -> Result<StackRef<I, K, V>, W::Error> { + let remainder = world.remainder(&original.read()); + let cooldown = world.cooldown(&original.read()); + let count = original.read().count(); + if let Some(template) = remainder { + let infinite = world.infinite_materials()?; + result = use_remainder::convert_with( + world, + result, + count, + infinite, + |world| { + template + .create(stacks, world.prototype(template.item()), world) + .0 + }, + |world, extra| world.extra_item(extra), + )?; + } + if let Some(cooldown) = cooldown { + world.apply_cooldown(cooldown, original)?; + } + Ok(result) +} diff --git a/crates/horizon-world/src/item_blocking.rs b/crates/horizon-world/src/item_blocking.rs new file mode 100644 index 000000000..d2561df5e --- /dev/null +++ b/crates/horizon-world/src/item_blocking.rs @@ -0,0 +1,83 @@ +//! Living item-blocking dispatch around direction and component reductions. +use crate::view_direction; +use horizon_core::geometry::Vec3; +pub trait ItemBlockingWorld { + type Error; + type Item: Copy; + type Component: Copy; + type Entity: Copy; + type Level: Copy; + type Hand: Copy; + fn blocking_item(&mut self) -> Result<Option<Self::Item>, Self::Error>; + fn component(&mut self, item: Self::Item) -> Option<Self::Component>; + fn bypasses_component(&mut self, component: Self::Component) -> Result<bool, Self::Error>; + fn direct_entity(&mut self) -> Result<Option<Self::Entity>, Self::Error>; + fn is_arrow(&self, entity: Self::Entity) -> bool; + fn pierce_level(&mut self, arrow: Self::Entity) -> Result<i8, Self::Error>; + fn source_position(&mut self) -> Result<Option<Vec3>, Self::Error>; + fn head_yaw(&mut self) -> Result<f32, Self::Error>; + fn position(&mut self) -> Result<Vec3, Self::Error>; + fn resolve( + &mut self, + component: Self::Component, + damage: f32, + angle: f64, + ) -> Result<f32, Self::Error>; + fn level(&mut self) -> Result<Self::Level, Self::Error>; + fn used_hand(&mut self) -> Result<Self::Hand, Self::Error>; + fn hurt_blocking_item( + &mut self, + component: Self::Component, + level: Self::Level, + item: Self::Item, + hand: Self::Hand, + blocked: f32, + ) -> Result<(), Self::Error>; + fn source_is_projectile(&mut self) -> Result<bool, Self::Error>; + fn is_living(&self, entity: Self::Entity) -> bool; + /// Uses the original server-level argument, not the later virtual level. + fn block_using_item( + &mut self, + attacker: Self::Entity, + damage: f32, + fully_blocked: bool, + ) -> Result<(), Self::Error>; +} +pub fn apply<W: ItemBlockingWorld>(world: &mut W, damage: f32) -> Result<f32, W::Error> { + if damage <= 0.0 { + return Ok(0.0); + } + let Some(item) = world.blocking_item()? else { + return Ok(0.0); + }; + let Some(component) = world.component(item) else { + return Ok(0.0); + }; + if world.bypasses_component(component)? { + return Ok(0.0); + } + if let Some(entity) = world.direct_entity()? { + if world.is_arrow(entity) && world.pierce_level(entity)? > 0 { + return Ok(0.0); + } + } + let angle = if let Some(source) = world.source_position()? { + let yaw = world.head_yaw()?; + let position = world.position()?; + view_direction::blocking_angle(source, position, yaw) + } else { + view_direction::BLOCKING_FALLBACK_ANGLE + }; + let blocked = world.resolve(component, damage, angle)?; + let level = world.level()?; + let hand = world.used_hand()?; + world.hurt_blocking_item(component, level, item, hand, blocked)?; + if blocked > 0.0 && !world.source_is_projectile()? { + if let Some(entity) = world.direct_entity()? { + if world.is_living(entity) { + world.block_using_item(entity, damage, blocked >= damage)?; + } + } + } + Ok(blocked) +} diff --git a/crates/horizon-world/src/item_cooldowns.rs b/crates/horizon-world/src/item_cooldowns.rs new file mode 100644 index 000000000..6f2785c32 --- /dev/null +++ b/crates/horizon-world/src/item_cooldowns.rs @@ -0,0 +1,136 @@ +//! Item cooldown storage with native hash-map expiry order and callback prefixes. +use crate::java_hash_map::{CursorError, JavaHashMap, JavaKey}; +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct CooldownInstance { + pub start: i32, + pub end: i32, +} +pub struct ItemCooldowns<K> { + pub tick_count: i32, + entries: JavaHashMap<K, CooldownInstance>, +} +pub trait Observer<K: JavaKey + Clone> { + type Error; + fn started( + &mut self, + cooldowns: &mut ItemCooldowns<K>, + group: K, + duration: i32, + ) -> Result<(), Self::Error>; + fn ended(&mut self, cooldowns: &mut ItemCooldowns<K>, group: K) -> Result<(), Self::Error>; +} +#[derive(Debug)] +pub enum TickError<E> { + Iterator(CursorError), + Observer(E), +} +impl<K: JavaKey + Clone> Default for ItemCooldowns<K> { + fn default() -> Self { + Self { + tick_count: 0, + entries: JavaHashMap::default(), + } + } +} +impl<K: JavaKey + Clone> ItemCooldowns<K> { + pub fn entries(&self) -> impl Iterator<Item = (&K, &CooldownInstance)> { + self.entries.entries() + } + pub fn percent(&self, group: &K, partial_tick: f32) -> f32 { + let Some(instance) = self.entries.get(group) else { + return 0.0; + }; + let duration = instance.end.wrapping_sub(instance.start) as f32; + let remaining = instance.end as f32 - (self.tick_count as f32 + partial_tick); + (remaining / duration).clamp(0.0, 1.0) + } + pub fn is_on_cooldown(&self, group: &K) -> bool { + self.percent(group, 0.0) > 0.0 + } + pub fn add<O: Observer<K>>( + &mut self, + group: K, + duration: i32, + observer: &mut O, + ) -> Result<(), O::Error> { + self.entries.put( + group.clone(), + CooldownInstance { + start: self.tick_count, + end: self.tick_count.wrapping_add(duration), + }, + ); + observer.started(self, group, duration) + } + pub fn remove<O: Observer<K>>(&mut self, group: K, observer: &mut O) -> Result<(), O::Error> { + self.entries.remove(&group); + observer.ended(self, group) + } + pub fn tick<O: Observer<K>>(&mut self, observer: &mut O) -> Result<(), TickError<O::Error>> { + self.tick_count = self.tick_count.wrapping_add(1); + let mut cursor = self.entries.cursor(); + while cursor.has_next() { + let (key, instance) = self + .entries + .next_entry(&mut cursor) + .map_err(TickError::Iterator)? + .unwrap(); + if instance.end <= self.tick_count { + let key = key.clone(); + self.entries + .remove_current(&mut cursor) + .map_err(TickError::Iterator)?; + observer.ended(self, key).map_err(TickError::Observer)?; + } + } + Ok(()) + } +} +#[derive(Clone, Debug)] +pub struct UseCooldown<K> { + pub seconds: f32, + pub group: Option<K>, +} +impl<K: PartialEq> PartialEq for UseCooldown<K> { + fn eq(&self, other: &Self) -> bool { + let bits = |v: f32| if v.is_nan() { 0x7fc00000 } else { v.to_bits() }; + bits(self.seconds) == bits(other.seconds) && self.group == other.group + } +} +impl<K> UseCooldown<K> { + pub fn ticks(&self) -> i32 { + (self.seconds * 20.0) as i32 + } +} +/// The registered item identifier is fetched even when the component has a group. +pub fn group<K: Clone>( + component: Option<&UseCooldown<K>>, + item_identifier: impl FnOnce() -> K, +) -> K { + let item = item_identifier(); + component.and_then(|c| c.group.clone()).unwrap_or(item) +} + +/// The player query is a class test; retrieving its cooldown manager is virtual. +pub trait CooldownUser { + type Error; + type Stack; + type Manager; + fn is_player(&self) -> bool; + fn cooldowns(&mut self) -> Result<Self::Manager, Self::Error>; + fn add_cooldown( + &mut self, + manager: Self::Manager, + stack: Self::Stack, + ticks: i32, + ) -> Result<(), Self::Error>; +} +impl<K> UseCooldown<K> { + pub fn apply<W: CooldownUser>(&self, user: &mut W, stack: W::Stack) -> Result<(), W::Error> { + if user.is_player() { + let manager = user.cooldowns()?; + user.add_cooldown(manager, stack, self.ticks())?; + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/item_durability.rs b/crates/horizon-world/src/item_durability.rs new file mode 100644 index 000000000..9f48955fc --- /dev/null +++ b/crates/horizon-world/src/item_durability.rs @@ -0,0 +1,191 @@ +//! Item-stack durability storage and mutation ordering. This is the durability +//! projection of a stack, not a replacement for its complete component map. +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct DurabilityStack { + pub count: i32, + pub air: bool, + pub max_damage: Option<i32>, + pub damage: Option<i32>, + pub unbreakable: bool, +} + +impl DurabilityStack { + pub fn is_empty(&self) -> bool { + self.air || self.count <= 0 + } + pub fn count(&self) -> i32 { + if self.is_empty() { 0 } else { self.count } + } + pub fn max_damage(&self) -> i32 { + if self.is_empty() { + 0 + } else { + self.max_damage.unwrap_or(0) + } + } + pub fn damage(&self) -> i32 { + let value = if self.is_empty() { + 0 + } else { + self.damage.unwrap_or(0) + }; + value.max(0).min(self.max_damage()) + } + pub fn set_damage(&mut self, value: i32) { + self.damage = Some(value.max(0).min(self.max_damage())); + } + pub fn is_damageable(&self) -> bool { + !self.is_empty() && self.max_damage.is_some() && !self.unbreakable && self.damage.is_some() + } + pub fn is_damaged(&self) -> bool { + self.is_damageable() && self.damage() > 0 + } + pub fn is_broken(&self) -> bool { + self.is_damageable() && self.damage() >= self.max_damage() + } + pub fn next_damage_will_break(&self) -> bool { + self.is_damageable() && self.damage() >= self.max_damage().wrapping_sub(1) + } + pub fn grow(&mut self, amount: i32) { + self.count = self.count().wrapping_add(amount); + } + pub fn shrink(&mut self, amount: i32) { + self.grow(amount.wrapping_neg()); + } +} + +/// Storage operations used by the native durability algorithm. Component-backed +/// implementations can preserve patch mutations and errors at each write. +pub trait DurabilityStorage: Clone { + type Error; + fn is_damageable(&self) -> bool; + fn damage(&self) -> i32; + fn max_damage(&self) -> i32; + fn set_damage(&mut self, value: i32) -> Result<(), Self::Error>; + fn is_broken(&self) -> bool; + fn shrink(&mut self, amount: i32); +} +impl DurabilityStorage for DurabilityStack { + type Error = std::convert::Infallible; + fn is_damageable(&self) -> bool { + self.is_damageable() + } + fn damage(&self) -> i32 { + self.damage() + } + fn max_damage(&self) -> i32 { + self.max_damage() + } + fn set_damage(&mut self, value: i32) -> Result<(), Self::Error> { + self.set_damage(value); + Ok(()) + } + fn is_broken(&self) -> bool { + self.is_broken() + } + fn shrink(&mut self, amount: i32) { + self.shrink(amount); + } +} +pub trait DurabilityWorld { + type Error; + type Stack: DurabilityStorage; + fn storage_error(error: <Self::Stack as DurabilityStorage>::Error) -> Self::Error; + fn infinite_materials(&mut self, stack: &mut Self::Stack) -> Result<bool, Self::Error>; + /// Positive durability changes pass through the enchantment float pipeline, + /// including when the stack has no enchantments. + fn process_enchantments( + &mut self, + stack: &mut Self::Stack, + amount: i32, + ) -> Result<i32, Self::Error>; + fn durability_changed( + &mut self, + stack: &mut Self::Stack, + damage: i32, + ) -> Result<(), Self::Error>; + /// Called after shrinking the original stack, with the pre-shrink copy. + fn broken(&mut self, stack: &mut Self::Stack, copy: Self::Stack) -> Result<(), Self::Error>; +} + +pub fn unenchanted_change(amount: i32) -> i32 { + (amount as f32) as i32 +} + +pub fn process_change<W: DurabilityWorld>( + stack: &mut W::Stack, + world: &mut W, + amount: i32, + server_player: bool, +) -> Result<i32, W::Error> { + if !stack.is_damageable() || (server_player && world.infinite_materials(stack)?) { + return Ok(0); + } + if amount > 0 { + world.process_enchantments(stack, amount) + } else { + Ok(amount) + } +} + +pub fn apply_damage<W: DurabilityWorld>( + stack: &mut W::Stack, + world: &mut W, + damage: i32, + server_player: bool, +) -> Result<(), W::Error> { + apply_damage_with_break_callback(stack, world, damage, server_player, true) +} + +fn apply_damage_with_break_callback<W: DurabilityWorld>( + stack: &mut W::Stack, + world: &mut W, + damage: i32, + server_player: bool, + notify_break: bool, +) -> Result<(), W::Error> { + if server_player { + world.durability_changed(stack, damage)?; + } + stack.set_damage(damage).map_err(W::storage_error)?; + if stack.is_broken() { + let copy = stack.clone(); + stack.shrink(1); + if notify_break { + world.broken(stack, copy)?; + } + } + Ok(()) +} + +/// The server-level overload; callers supply the already selected player kind. +pub fn hurt_and_break<W: DurabilityWorld>( + stack: &mut W::Stack, + world: &mut W, + amount: i32, + server_player: bool, +) -> Result<(), W::Error> { + let amount = process_change(stack, world, amount, server_player)?; + if amount != 0 { + let damage = stack.damage().wrapping_add(amount); + apply_damage(stack, world, damage, server_player)?; + } + Ok(()) +} + +/// The body after the server-player/level checks of hurtWithoutBreaking. +pub fn hurt_without_breaking<W: DurabilityWorld>( + stack: &mut W::Stack, + world: &mut W, + amount: i32, +) -> Result<(), W::Error> { + let amount = process_change(stack, world, amount, true)?; + if amount != 0 { + let damage = stack + .damage() + .wrapping_add(amount) + .min(stack.max_damage().wrapping_sub(1)); + apply_damage_with_break_callback(stack, world, damage, true, false)?; + } + Ok(()) +} diff --git a/crates/horizon-world/src/item_particles.rs b/crates/horizon-world/src/item_particles.rs new file mode 100644 index 000000000..70a9e0f6b --- /dev/null +++ b/crates/horizon-world/src/item_particles.rs @@ -0,0 +1,73 @@ +//! Eating particles retain one item template while reading live actor state. +use crate::{ + item_stack_refs::StackRef, + item_template::{ItemTemplate, TemplateError}, +}; +use horizon_core::{ + geometry::{Vec3, trig::DEG_TO_RAD}, + random::RandomSource, +}; + +pub trait ItemParticleWorld<I, K, V> { + type Error; + type Level; + type Source: RandomSource; + /// The actor's direct random field, not its virtual getRandom result. + fn random(&mut self) -> &mut Self::Source; + fn pitch(&mut self) -> Result<f32, Self::Error>; + fn yaw(&mut self) -> Result<f32, Self::Error>; + fn position(&self) -> Vec3; + fn eye_y(&mut self) -> Result<f64, Self::Error>; + fn level(&mut self) -> Result<Self::Level, Self::Error>; + fn add_particle( + &mut self, + level: Self::Level, + item: &ItemTemplate<I, K, V>, + position: Vec3, + velocity: Vec3, + ) -> Result<(), Self::Error>; +} + +#[derive(Debug)] +pub enum ParticleError<E> { + Template(TemplateError), + World(E), +} + +pub fn spawn<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq, W: ItemParticleWorld<I, K, V>>( + world: &mut W, + stack: &StackRef<I, K, V>, + air: I, + count: i32, +) -> Result<(), ParticleError<W::Error>> { + let template = { + let stack = stack.read(); + if stack.is_empty() { + return Ok(()); + } + ItemTemplate::from_non_empty_stack(&stack, air).map_err(ParticleError::Template)? + }; + for _ in 0..count { + let mut velocity = Vec3::new( + (f64::from(world.random().next_float()) - 0.5) * 0.1, + f64::from(world.random().next_float()) * 0.1 + 0.1, + 0.0, + ); + velocity = velocity.rotate_x(-world.pitch().map_err(ParticleError::World)? * DEG_TO_RAD); + velocity = velocity.rotate_y(-world.yaw().map_err(ParticleError::World)? * DEG_TO_RAD); + let y = f64::from(-world.random().next_float()) * 0.6 - 0.3; + let mut position = Vec3::new((f64::from(world.random().next_float()) - 0.5) * 0.3, y, 0.6); + position = position.rotate_x(-world.pitch().map_err(ParticleError::World)? * DEG_TO_RAD); + position = position.rotate_y(-world.yaw().map_err(ParticleError::World)? * DEG_TO_RAD); + let x = world.position().x; + let eye_y = world.eye_y().map_err(ParticleError::World)?; + let z = world.position().z; + position = position.add_vector(Vec3::new(x, eye_y, z)); + let level = world.level().map_err(ParticleError::World)?; + velocity.y += 0.05; + world + .add_particle(level, &template, position, velocity) + .map_err(ParticleError::World)?; + } + Ok(()) +} diff --git a/crates/horizon-world/src/item_stack_refs.rs b/crates/horizon-world/src/item_stack_refs.rs new file mode 100644 index 000000000..a516c93d6 --- /dev/null +++ b/crates/horizon-world/src/item_stack_refs.rs @@ -0,0 +1,72 @@ +//! Shared stack identity for inventories. Cloning a reference retains the same +//! stack; `ItemStacks::copy` copies its value with copy-on-write components. +//! These references belong to the simulation thread and release unreachable +//! stacks automatically. No borrow is held across a container callback. +use crate::{ + component_patch::Prototype, + item_stack_storage::{CopyResult, ItemStackData}, +}; +use std::{ + cell::{Ref, RefCell, RefMut}, + rc::Rc, +}; +#[derive(Debug)] +pub struct StackRef<I, K, V>(Rc<RefCell<ItemStackData<I, K, V>>>); +impl<I, K, V> Clone for StackRef<I, K, V> { + fn clone(&self) -> Self { + Self(self.0.clone()) + } +} +// Native ItemStack object equality is reference identity. Value comparisons +// remain explicit on ItemStackData (same_item_components/matches). +impl<I, K, V> PartialEq for StackRef<I, K, V> { + fn eq(&self, other: &Self) -> bool { + self.same_reference(other) + } +} +impl<I, K, V> Eq for StackRef<I, K, V> {} +impl<I, K, V> StackRef<I, K, V> { + pub fn new(data: ItemStackData<I, K, V>) -> Self { + Self(Rc::new(RefCell::new(data))) + } + pub fn read(&self) -> Ref<'_, ItemStackData<I, K, V>> { + self.0.borrow() + } + pub fn write(&self) -> RefMut<'_, ItemStackData<I, K, V>> { + self.0.borrow_mut() + } + pub fn same_reference(&self, other: &Self) -> bool { + Rc::ptr_eq(&self.0, &other.0) + } +} +#[derive(Clone, Debug)] +pub struct ItemStacks<I, K, V> { + air: I, + empty: StackRef<I, K, V>, +} +impl<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq> ItemStacks<I, K, V> { + pub fn new(air: I) -> Self { + Self { + air, + empty: StackRef::new(ItemStackData::new(air, air, 0, Prototype::new([]))), + } + } + pub fn empty(&self) -> StackRef<I, K, V> { + self.empty.clone() + } + pub fn create(&self, item: I, count: i32, prototype: Prototype<K, V>) -> StackRef<I, K, V> { + StackRef::new(ItemStackData::new(item, self.air, count, prototype)) + } + pub fn resolve(&self, copy: CopyResult<ItemStackData<I, K, V>>) -> StackRef<I, K, V> { + match copy { + CopyResult::Empty => self.empty(), + CopyResult::Stack(data) => StackRef::new(data), + } + } + pub fn copy(&self, stack: &StackRef<I, K, V>) -> StackRef<I, K, V> { + self.resolve(stack.read().copy()) + } + pub fn split(&self, stack: &StackRef<I, K, V>, amount: i32) -> StackRef<I, K, V> { + self.resolve(stack.write().split(amount)) + } +} diff --git a/crates/horizon-world/src/item_stack_storage.rs b/crates/horizon-world/src/item_stack_storage.rs new file mode 100644 index 000000000..8b5092a62 --- /dev/null +++ b/crates/horizon-world/src/item_stack_storage.rs @@ -0,0 +1,142 @@ +//! Item-stack data kernels over component storage. Stable object identity belongs +//! to the containing item store; CopyResult::Empty means its canonical EMPTY. +use crate::component_patch::{ComponentMap, Patch, Prototype}; +#[derive(Clone, Debug)] +pub struct ItemStackData<I, K, V> { + item: I, + air: I, + pub count: i32, + pub pop_time: i32, + pub components: ComponentMap<K, V>, +} +#[derive(Clone, Debug)] +pub enum CopyResult<T> { + Empty, + Stack(T), +} +impl<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq> ItemStackData<I, K, V> { + pub fn new(item: I, air: I, count: i32, prototype: Prototype<K, V>) -> Self { + Self { + item, + air, + count, + pop_time: 0, + components: ComponentMap::new(prototype), + } + } + pub fn is_empty(&self) -> bool { + self.item == self.air || self.count <= 0 + } + pub fn stored_item(&self) -> I { + self.item + } + pub fn item(&self) -> I { + if self.is_empty() { self.air } else { self.item } + } + pub fn count(&self) -> i32 { + if self.is_empty() { 0 } else { self.count } + } + pub fn component(&self, key: &K) -> Option<&V> { + if self.is_empty() { + None + } else { + self.components.get(key) + } + } + pub fn visible_patch(&self) -> Patch<K, V> { + if self.is_empty() { + Patch::new([]) + } else { + self.components.as_patch() + } + } + pub fn copy(&self) -> CopyResult<Self> { + if self.is_empty() { + CopyResult::Empty + } else { + CopyResult::Stack(self.clone()) + } + } + pub fn copy_with_count(&self, count: i32) -> CopyResult<Self> { + match self.copy() { + CopyResult::Empty => CopyResult::Empty, + CopyResult::Stack(mut s) => { + s.count = count; + CopyResult::Stack(s) + } + } + } + pub fn copy_and_clear(&mut self) -> CopyResult<Self> { + if self.is_empty() { + return CopyResult::Empty; + } + let copy = self.copy(); + self.count = 0; + copy + } + pub fn grow(&mut self, amount: i32) { + self.count = self.count().wrapping_add(amount); + } + pub fn shrink(&mut self, amount: i32) { + self.grow(amount.wrapping_neg()); + } + pub fn limit_size(&mut self, limit: i32) { + if !self.is_empty() && self.count() > limit { + self.count = limit; + } + } + pub fn split(&mut self, amount: i32) -> CopyResult<Self> { + let amount = amount.min(self.count()); + let copy = self.copy_with_count(amount); + self.shrink(amount); + copy + } + pub fn transmute_copy( + &self, + item: I, + prototype: Prototype<K, V>, + count: i32, + ) -> CopyResult<Self> { + if self.is_empty() { + return CopyResult::Empty; + } + CopyResult::Stack(Self { + item, + air: self.air, + count, + pop_time: 0, + components: ComponentMap::from_patch(prototype, &self.components.as_patch()), + }) + } + pub fn same_item(&self, other: &Self) -> bool { + self.item() == other.item() + } + pub fn same_item_components(&self, other: &Self) -> bool { + self.same_item(other) + && ((self.is_empty() && other.is_empty()) || self.components == other.components) + } + pub fn matches(&self, other: &Self) -> bool { + self.count() == other.count() && self.same_item_components(other) + } + pub fn consume<E>( + &mut self, + amount: i32, + has_actor: bool, + infinite: impl FnOnce(&mut Self) -> Result<bool, E>, + ) -> Result<(), E> { + if !has_actor || !infinite(self)? { + self.shrink(amount); + } + Ok(()) + } + pub fn consume_and_return<E>( + &mut self, + amount: i32, + has_actor: bool, + infinite: impl FnOnce(&mut Self) -> Result<bool, E>, + ) -> Result<CopyResult<Self>, E> { + let copy = self.copy_with_count(amount); + self.consume(amount, has_actor, infinite)?; + Ok(copy) + } +} diff --git a/crates/horizon-world/src/item_template.rs b/crates/horizon-world/src/item_template.rs new file mode 100644 index 000000000..b623b8c4c --- /dev/null +++ b/crates/horizon-world/src/item_template.rs @@ -0,0 +1,196 @@ +//! Immutable item templates and strict stack validation. Template component +//! patches are interpreted against the current item prototype when used. +//! Component schemas supply typed size queries and contained-item validation. +use crate::{ + component_patch::{Patch, Prototype}, + item_stack_refs::{ItemStacks, StackRef}, + item_stack_storage::ItemStackData, +}; +use std::{fmt, rc::Rc}; + +pub trait ValidationRules<I, K, V> { + type ContentsError; + fn has_max_damage(&self, stack: &ItemStackData<I, K, V>) -> bool; + /// The component default is one, including on an empty stack. + fn max_stack_size(&self, stack: &ItemStackData<I, K, V>) -> i32; + /// Validate container sizes, then bundle sizes and weight, then charged + /// projectile sizes. Only the immediate contained sizes are checked. + fn validate_contents(&self, stack: &ItemStackData<I, K, V>) -> Result<(), Self::ContentsError>; +} +pub type Creation<I, K, V, E> = (StackRef<I, K, V>, Option<ValidationError<E>>); +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum ValidationError<E> { + StackableDamageable, + Contents(E), + TooManyItems { count: i32, maximum: i32 }, +} +pub fn validate_strict< + I: Copy + Eq, + K: Clone + Eq, + V: Clone + PartialEq, + R: ValidationRules<I, K, V>, +>( + stack: &ItemStackData<I, K, V>, + rules: &R, +) -> Result<(), ValidationError<R::ContentsError>> { + if rules.has_max_damage(stack) && rules.max_stack_size(stack) > 1 { + return Err(ValidationError::StackableDamageable); + } + rules + .validate_contents(stack) + .map_err(ValidationError::Contents)?; + let count = stack.count(); + let maximum = rules.max_stack_size(stack); + if count > maximum { + return Err(ValidationError::TooManyItems { count, maximum }); + } + Ok(()) +} +/// A rejected patch restores the original raw patch, including redundant entries. +/// The error is returned for the caller's diagnostic logger. +pub fn apply_validated< + I: Copy + Eq, + K: Clone + Eq, + V: Clone + PartialEq, + R: ValidationRules<I, K, V>, +>( + stack: &mut ItemStackData<I, K, V>, + patch: &Patch<K, V>, + rules: &R, +) -> Result<(), ValidationError<R::ContentsError>> { + let previous = stack.components.as_patch(); + stack.components.apply_patch(patch); + let result = validate_strict(stack, rules); + if result.is_err() { + stack.components.restore_patch(&previous); + } + result +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TemplateError { + EmptyItem, + EmptyStack, +} +impl fmt::Display for TemplateError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.write_str(match self { + Self::EmptyItem => "Item must be non-empty", + Self::EmptyStack => "Stack must be non-empty", + }) + } +} +impl std::error::Error for TemplateError {} +#[derive(Debug)] +struct Data<I, K, V> { + item: I, + air: I, + count: i32, + patch: Patch<K, V>, +} +#[derive(Debug)] +pub struct ItemTemplate<I, K, V>(Rc<Data<I, K, V>>); +impl<I, K, V> Clone for ItemTemplate<I, K, V> { + fn clone(&self) -> Self { + Self(self.0.clone()) + } +} +impl<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq> ItemTemplate<I, K, V> { + /// The native constructor rejects zero, but permits negative counts. + pub fn new(item: I, air: I, count: i32, patch: Patch<K, V>) -> Result<Self, TemplateError> { + if item == air || count == 0 { + return Err(TemplateError::EmptyItem); + } + Ok(Self(Rc::new(Data { + item, + air, + count, + patch, + }))) + } + pub fn from_stack(stack: &ItemStackData<I, K, V>, air: I) -> Result<Self, TemplateError> { + Self::new(stack.item(), air, stack.count(), stack.visible_patch()) + } + pub fn from_non_empty_stack( + stack: &ItemStackData<I, K, V>, + air: I, + ) -> Result<Self, TemplateError> { + if stack.is_empty() { + return Err(TemplateError::EmptyStack); + } + Self::from_stack(stack, air) + } + pub fn from_non_empty_stack_with_count( + stack: &ItemStackData<I, K, V>, + air: I, + count: i32, + ) -> Result<Self, TemplateError> { + if stack.is_empty() || count <= 0 { + return Err(TemplateError::EmptyStack); + } + Self::new(stack.item(), air, count, stack.visible_patch()) + } + pub fn same_reference(&self, other: &Self) -> bool { + Rc::ptr_eq(&self.0, &other.0) + } + pub fn item(&self) -> I { + self.0.item + } + pub fn count(&self) -> i32 { + self.0.count + } + pub fn patch(&self) -> &Patch<K, V> { + &self.0.patch + } + pub fn with_count(&self, count: i32) -> Result<Self, TemplateError> { + if count == self.count() { + return Ok(self.clone()); + } + Self::new(self.item(), self.0.air, count, self.0.patch.clone()) + } + pub fn component<'a>(&'a self, prototype: &'a Prototype<K, V>, key: &K) -> Option<&'a V> { + match self.0.patch.entries().iter().find(|(k, _)| k == key) { + Some((_, value)) => value.as_ref(), + None => prototype.get(key), + } + } + /// Invalid creations return the store's canonical EMPTY. The optional error + /// lets the caller log the rejected template without changing game behavior. + pub fn create<R: ValidationRules<I, K, V>>( + &self, + stacks: &ItemStacks<I, K, V>, + prototype: Prototype<K, V>, + rules: &R, + ) -> Creation<I, K, V, R::ContentsError> { + self.apply(stacks, prototype, self.count(), &Patch::new([]), rules) + } + /// The supplied patch is the base; this template's patch takes precedence. + pub fn apply<R: ValidationRules<I, K, V>>( + &self, + stacks: &ItemStacks<I, K, V>, + prototype: Prototype<K, V>, + count: i32, + base: &Patch<K, V>, + rules: &R, + ) -> Creation<I, K, V, R::ContentsError> { + let stack = stacks.create(self.item(), count, prototype); + { + let mut data = stack.write(); + data.components.apply_patch(base); + data.components.apply_patch(self.patch()); + } + let error = validate_strict(&stack.read(), rules).err(); + if error.is_some() { + (stacks.empty(), error) + } else { + (stack, None) + } + } +} + +impl<I: PartialEq, K: Eq, V: PartialEq> PartialEq for ItemTemplate<I, K, V> { + fn eq(&self, other: &Self) -> bool { + self.0.item == other.0.item + && self.0.count == other.0.count + && self.0.patch == other.0.patch + } +} diff --git a/crates/horizon-world/src/item_use.rs b/crates/horizon-world/src/item_use.rs new file mode 100644 index 000000000..2ffef560f --- /dev/null +++ b/crates/horizon-world/src/item_use.rs @@ -0,0 +1,62 @@ +//! Living blocking-item eligibility retains the component's delay, but rereads +//! use-item storage and remaining ticks around the virtual item-duration query. +pub trait ItemUseWorld { + type Error; + type Item: Clone; + type ItemType: Copy; + fn using_item(&mut self) -> Result<bool, Self::Error>; + fn use_item(&self) -> Self::Item; + fn blocking_delay(&self, item: Self::Item) -> Option<i32>; + fn item_type(&self, item: Self::Item) -> Self::ItemType; + fn use_duration( + &mut self, + item_type: Self::ItemType, + item: Self::Item, + ) -> Result<i32, Self::Error>; + fn remaining_ticks(&self) -> i32; + fn remaining_ticks_virtual(&mut self) -> Result<i32, Self::Error>; + fn query_blocking_item(&mut self) -> Result<Option<Self::Item>, Self::Error> + where + Self: Sized, + { + blocking_item(self) + } + fn query_ticks_using_item(&mut self) -> Result<i32, Self::Error> + where + Self: Sized, + { + ticks_using_item(self) + } +} +pub fn blocking_item<W: ItemUseWorld>(w: &mut W) -> Result<Option<W::Item>, W::Error> { + if !w.using_item()? { + return Ok(None); + } + let Some(delay) = w.blocking_delay(w.use_item()) else { + return Ok(None); + }; + let item_type = w.item_type(w.use_item()); + let item = w.use_item(); + let duration = w.use_duration(item_type, item)?; + let elapsed = duration.wrapping_sub(w.remaining_ticks()); + Ok((elapsed >= delay).then(|| w.use_item())) +} + +pub fn is_blocking<W: ItemUseWorld>(w: &mut W) -> Result<bool, W::Error> { + Ok(w.query_blocking_item()?.is_some()) +} +pub fn ticks_using_item<W: ItemUseWorld>(w: &mut W) -> Result<i32, W::Error> { + if !w.using_item()? { + return Ok(0); + } + let item = w.use_item(); + let item_type = w.item_type(item.clone()); + let duration = w.use_duration(item_type, item)?; + Ok(duration.wrapping_sub(w.remaining_ticks_virtual()?)) +} +pub fn ticks_using_item_partial<W: ItemUseWorld>(w: &mut W, partial: f32) -> Result<f32, W::Error> { + if !w.using_item()? { + return Ok(0.0); + } + Ok(w.query_ticks_using_item()? as f32 + partial) +} diff --git a/crates/horizon-world/src/item_use_catalog.rs b/crates/horizon-world/src/item_use_catalog.rs new file mode 100644 index 000000000..943099692 --- /dev/null +++ b/crates/horizon-world/src/item_use_catalog.rs @@ -0,0 +1,239 @@ +//! Version-pinned registered item identities and the component projection used +//! by duration/durability queries. Unrepresented components remain outside this +//! catalog; importing defaults does not implement their gameplay or codecs. +use crate::{DATA_VERSION, compression::invalid, item_durability::DurabilityStack}; +use serde_json::Value; +use std::{collections::BTreeMap, io}; +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct ItemId(u32); +impl ItemId { + pub fn raw(self) -> u32 { + self.0 + } +} +#[derive(Clone, Copy, Debug)] +enum Duration { + Components, + Constant(i32), + Instrument, +} +#[derive(Clone, Copy, Debug)] +pub struct UseComponents { + pub max_stack_size: Option<i32>, + pub max_damage: Option<i32>, + pub damage: Option<i32>, + pub unbreakable: bool, + pub consume_seconds: Option<f32>, + pub block_delay_seconds: Option<f32>, + pub kinetic_weapon: bool, + pub instrument_seconds: Option<f32>, +} +#[derive(Debug)] +pub struct ItemDefinition { + id: ItemId, + name: String, + duration: Duration, + crossbow_release: bool, + pub defaults: UseComponents, +} +impl ItemDefinition { + pub fn id(&self) -> ItemId { + self.id + } + pub fn name(&self) -> &str { + &self.name + } + pub fn stack(&self, count: i32) -> ItemUseStack<'_> { + ItemUseStack { + definition: self, + count, + components: self.defaults, + } + } +} +#[derive(Clone, Debug)] +pub struct ItemUseStack<'a> { + definition: &'a ItemDefinition, + pub count: i32, + pub components: UseComponents, +} +impl ItemUseStack<'_> { + pub fn definition(&self) -> &ItemDefinition { + self.definition + } + pub fn is_empty(&self) -> bool { + self.count <= 0 || self.definition.name == "minecraft:air" + } + pub fn max_stack_size(&self) -> i32 { + if self.is_empty() { + 1 + } else { + self.components.max_stack_size.unwrap_or(1) + } + } + pub fn durability(&self) -> DurabilityStack { + DurabilityStack { + count: self.count, + air: self.definition.name == "minecraft:air", + max_damage: self.components.max_damage, + damage: self.components.damage, + unbreakable: self.components.unbreakable, + } + } + pub fn is_stackable(&self) -> bool { + let d = self.durability(); + self.max_stack_size() > 1 && (!d.is_damageable() || !d.is_damaged()) + } + pub fn use_duration(&self) -> i32 { + if self.is_empty() { + return 0; + } + match self.definition.duration { + Duration::Constant(value) => value, + Duration::Instrument => self + .components + .instrument_seconds + .map_or(0, |v| (v * 20.0).floor() as i32), + Duration::Components => { + if let Some(seconds) = self.components.consume_seconds { + (seconds * 20.0) as i32 + } else if self.components.block_delay_seconds.is_some() + || self.components.kinetic_weapon + { + 72000 + } else { + 0 + } + } + } + } + pub fn use_on_release(&self) -> bool { + !self.is_empty() && self.definition.crossbow_release + } +} +#[derive(Debug)] +pub struct ItemUseCatalog { + items: Vec<ItemDefinition>, + names: BTreeMap<String, ItemId>, +} +fn string<'a>(v: &'a Value, key: &str) -> io::Result<&'a str> { + v[key] + .as_str() + .ok_or_else(|| invalid(format!("missing item export string {key}"))) +} +fn optional_int(v: &Value, key: &str) -> io::Result<Option<i32>> { + v.get(key) + .map(|v| { + v.as_i64() + .and_then(|n| i32::try_from(n).ok()) + .ok_or_else(|| invalid(format!("invalid item integer {key}"))) + }) + .transpose() +} +fn number(v: &Value, key: &str, default: f32) -> io::Result<f32> { + v.get(key).map_or(Ok(default), |v| { + v.as_f64() + .map(|n| n as f32) + .ok_or_else(|| invalid(format!("invalid item number {key}"))) + }) +} +impl ItemUseCatalog { + pub fn from_json(value: &Value) -> io::Result<Self> { + if value["schema"].as_i64() != Some(1) + || value["DataVersion"].as_i64() != Some(i64::from(DATA_VERSION)) + { + return Err(invalid("item catalog version mismatch")); + } + let rows = value["items"] + .as_array() + .ok_or_else(|| invalid("missing item catalog entries"))?; + let instruments = value["instruments"] + .as_object() + .ok_or_else(|| invalid("missing item instruments"))?; + let mut items = Vec::with_capacity(rows.len()); + let mut names = BTreeMap::new(); + for (index, row) in rows.iter().enumerate() { + let raw = u32::try_from(index).map_err(|_| invalid("item catalog too large"))?; + if row["id"].as_u64() != Some(u64::from(raw)) { + return Err(invalid("non-contiguous item catalog ID")); + } + let name = string(row, "name")?; + if crate::worldgen::tags::identifier(name).ok().as_deref() != Some(name) { + return Err(invalid("noncanonical item identifier")); + } + let id = ItemId(raw); + if names.insert(name.to_owned(), id).is_some() { + return Err(invalid("duplicate item identifier")); + } + let duration = match string(row, "duration_impl")? { + "Item" => Duration::Components, + "BowItem" | "CrossbowItem" | "TridentItem" => Duration::Constant(72000), + "BundleItem" | "BrushItem" => Duration::Constant(200), + "SpyglassItem" => Duration::Constant(1200), + "EnderEyeItem" => Duration::Constant(0), + "InstrumentItem" => Duration::Instrument, + _ => return Err(invalid("unsupported item duration implementation")), + }; + let crossbow_release = match string(row, "release_impl")? { + "Item" => false, + "CrossbowItem" => true, + _ => return Err(invalid("unsupported release implementation")), + }; + let c = row + .get("components") + .filter(|c| c.is_object()) + .ok_or_else(|| invalid("missing item component defaults"))?; + let instrument_seconds = c + .get("minecraft:instrument") + .map(|v| { + let name = v + .as_str() + .ok_or_else(|| invalid("expected exported instrument reference"))?; + let bits = instruments + .get(name) + .and_then(Value::as_str) + .ok_or_else(|| invalid("unknown item instrument"))?; + u32::from_str_radix(bits, 16) + .map(f32::from_bits) + .map_err(|_| invalid("invalid instrument duration bits")) + }) + .transpose()?; + let defaults = UseComponents { + max_stack_size: optional_int(c, "minecraft:max_stack_size")?, + max_damage: optional_int(c, "minecraft:max_damage")?, + damage: optional_int(c, "minecraft:damage")?, + unbreakable: c.get("minecraft:unbreakable").is_some(), + consume_seconds: c + .get("minecraft:consumable") + .map(|v| number(v, "consume_seconds", 1.6)) + .transpose()?, + block_delay_seconds: c + .get("minecraft:blocks_attacks") + .map(|v| number(v, "block_delay_seconds", 0.0)) + .transpose()?, + kinetic_weapon: c.get("minecraft:kinetic_weapon").is_some(), + instrument_seconds, + }; + items.push(ItemDefinition { + id, + name: name.to_owned(), + duration, + crossbow_release, + defaults, + }); + } + if items.first().is_none_or(|i| i.name != "minecraft:air") { + return Err(invalid("item registry must start with air")); + } + Ok(Self { items, names }) + } + pub fn get(&self, id: ItemId) -> Option<&ItemDefinition> { + self.items.get(id.0 as usize) + } + pub fn by_name(&self, name: &str) -> Option<&ItemDefinition> { + self.get(*self.names.get(name)?) + } + pub fn items(&self) -> &[ItemDefinition] { + &self.items + } +} diff --git a/crates/horizon-world/src/item_use_lifecycle.rs b/crates/horizon-world/src/item_use_lifecycle.rs new file mode 100644 index 000000000..f0f15096f --- /dev/null +++ b/crates/horizon-world/src/item_use_lifecycle.rs @@ -0,0 +1,172 @@ +//! Living item-use lifecycle ordering over stable item-stack handles. +#[derive(Clone, Copy, Debug)] +pub struct UseState<I> { + pub item: I, + pub remaining: i32, + pub has_recent_kinetic_enemies: bool, +} +pub trait UseLifecycleWorld: Sized { + type Error; + type Item: Clone + Eq; + type Hand: Copy; + type Level: Copy; + fn empty_item(&self) -> Self::Item; + fn is_empty(&self, item: Self::Item) -> bool; + fn same_item_type(&self, a: Self::Item, b: Self::Item) -> bool; + fn using_item(&mut self, s: &mut UseState<Self::Item>) -> Result<bool, Self::Error>; + fn used_hand(&mut self, s: &mut UseState<Self::Item>) -> Result<Self::Hand, Self::Error>; + fn hand_item( + &mut self, + s: &mut UseState<Self::Item>, + hand: Self::Hand, + ) -> Result<Self::Item, Self::Error>; + fn set_hand_item( + &mut self, + s: &mut UseState<Self::Item>, + hand: Self::Hand, + item: Self::Item, + ) -> Result<(), Self::Error>; + fn level(&mut self, s: &mut UseState<Self::Item>) -> Result<Self::Level, Self::Error>; + fn is_client( + &mut self, + s: &mut UseState<Self::Item>, + level: Self::Level, + ) -> Result<bool, Self::Error>; + fn remaining_ticks(&mut self, s: &mut UseState<Self::Item>) -> Result<i32, Self::Error>; + fn item_tick( + &mut self, + s: &mut UseState<Self::Item>, + item: Self::Item, + level: Self::Level, + remaining: i32, + ) -> Result<(), Self::Error>; + fn use_on_release( + &mut self, + s: &mut UseState<Self::Item>, + item: Self::Item, + ) -> Result<bool, Self::Error>; + fn release_item( + &mut self, + s: &mut UseState<Self::Item>, + item: Self::Item, + level: Self::Level, + remaining: i32, + ) -> Result<(), Self::Error>; + fn finish_item( + &mut self, + s: &mut UseState<Self::Item>, + item: Self::Item, + level: Self::Level, + ) -> Result<Self::Item, Self::Error>; + fn set_using_flag( + &mut self, + s: &mut UseState<Self::Item>, + using: bool, + ) -> Result<(), Self::Error>; + fn finish_vibration( + &mut self, + s: &mut UseState<Self::Item>, + item: Self::Item, + ) -> Result<(), Self::Error>; + fn update_using_item( + &mut self, + s: &mut UseState<Self::Item>, + item: Self::Item, + ) -> Result<(), Self::Error> { + update(self, s, item) + } + fn complete_using_item(&mut self, s: &mut UseState<Self::Item>) -> Result<(), Self::Error> { + complete(self, s) + } + fn release_using_item(&mut self, s: &mut UseState<Self::Item>) -> Result<(), Self::Error> { + release(self, s) + } + fn stop_using_item(&mut self, s: &mut UseState<Self::Item>) -> Result<(), Self::Error> { + stop(self, s) + } +} +pub fn tick<W: UseLifecycleWorld>(w: &mut W, s: &mut UseState<W::Item>) -> Result<(), W::Error> { + if w.using_item(s)? { + let hand = w.used_hand(s)?; + let held = w.hand_item(s, hand)?; + if w.same_item_type(held.clone(), s.item.clone()) { + let hand = w.used_hand(s)?; + s.item = w.hand_item(s, hand)?; + w.update_using_item(s, s.item.clone())?; + } else { + w.stop_using_item(s)?; + } + } + Ok(()) +} +pub fn update<W: UseLifecycleWorld>( + w: &mut W, + s: &mut UseState<W::Item>, + item: W::Item, +) -> Result<(), W::Error> { + let level = w.level(s)?; + let remaining = w.remaining_ticks(s)?; + w.item_tick(s, item.clone(), level, remaining)?; + s.remaining = s.remaining.wrapping_sub(1); + if s.remaining == 0 { + let level = w.level(s)?; + if !w.is_client(s, level)? && !w.use_on_release(s, item)? { + w.complete_using_item(s)?; + } + } + Ok(()) +} +pub fn complete<W: UseLifecycleWorld>( + w: &mut W, + s: &mut UseState<W::Item>, +) -> Result<(), W::Error> { + let level = w.level(s)?; + if w.is_client(s, level)? && !w.using_item(s)? { + return Ok(()); + } + let hand = w.used_hand(s)?; + let original = s.item.clone(); + if original != w.hand_item(s, hand)? { + w.release_using_item(s)?; + return Ok(()); + } + if !w.is_empty(s.item.clone()) && w.using_item(s)? { + let item = s.item.clone(); + let level = w.level(s)?; + let result = w.finish_item(s, item, level)?; + if result != s.item { + w.set_hand_item(s, hand, result)?; + } + w.stop_using_item(s)?; + } + Ok(()) +} +pub fn release<W: UseLifecycleWorld>(w: &mut W, s: &mut UseState<W::Item>) -> Result<(), W::Error> { + let hand = w.used_hand(s)?; + let held = w.hand_item(s, hand)?; + if !w.is_empty(s.item.clone()) && w.same_item_type(held.clone(), s.item.clone()) { + s.item = held; + let item = s.item.clone(); + let level = w.level(s)?; + let remaining = w.remaining_ticks(s)?; + w.release_item(s, item, level, remaining)?; + if w.use_on_release(s, s.item.clone())? { + tick(w, s)?; + } + } + w.stop_using_item(s) +} +pub fn stop<W: UseLifecycleWorld>(w: &mut W, s: &mut UseState<W::Item>) -> Result<(), W::Error> { + let level = w.level(s)?; + if !w.is_client(s, level)? { + let using = w.using_item(s)?; + s.has_recent_kinetic_enemies = false; + w.set_using_flag(s, false)?; + if using { + w.finish_vibration(s, s.item.clone())?; + } + } + s.item = w.empty_item(); + s.remaining = 0; + Ok(()) +} diff --git a/crates/horizon-world/src/item_use_start.rs b/crates/horizon-world/src/item_use_start.rs new file mode 100644 index 000000000..376b1d257 --- /dev/null +++ b/crates/horizon-world/src/item_use_start.rs @@ -0,0 +1,54 @@ +//! Begin using a held stack, retaining native callback and flag ordering. +use crate::item_use_lifecycle::{UseLifecycleWorld, UseState}; +pub trait StartUseWorld: UseLifecycleWorld { + fn duration( + &mut self, + s: &mut UseState<Self::Item>, + item: Self::Item, + ) -> Result<i32, Self::Error>; + fn synchronize_equipment( + &mut self, + s: &mut UseState<Self::Item>, + level: Self::Level, + hand: Self::Hand, + item: Self::Item, + ) -> Result<(), Self::Error>; + fn is_off_hand(&self, hand: Self::Hand) -> bool; + fn set_off_hand_flag( + &mut self, + s: &mut UseState<Self::Item>, + off: bool, + ) -> Result<(), Self::Error>; + fn start_vibration( + &mut self, + s: &mut UseState<Self::Item>, + item: Self::Item, + ) -> Result<(), Self::Error>; + fn has_kinetic_weapon(&self, item: Self::Item) -> bool; + fn reset_recent_kinetic_enemies(&mut self, s: &mut UseState<Self::Item>); +} +pub fn start<W: StartUseWorld>( + w: &mut W, + s: &mut UseState<W::Item>, + hand: W::Hand, +) -> Result<(), W::Error> { + let item = w.hand_item(s, hand)?; + if w.is_empty(item.clone()) || w.using_item(s)? { + return Ok(()); + } + s.item = item.clone(); + s.remaining = w.duration(s, item)?; + let level = w.level(s)?; + if !w.is_client(s, level)? { + let level = w.level(s)?; + w.synchronize_equipment(s, level, hand, s.item.clone())?; + w.set_using_flag(s, true)?; + let off = w.is_off_hand(hand); + w.set_off_hand_flag(s, off)?; + w.start_vibration(s, s.item.clone())?; + if w.has_kinetic_weapon(s.item.clone()) { + w.reset_recent_kinetic_enemies(s); + } + } + Ok(()) +} diff --git a/crates/horizon-world/src/java_hash_map.rs b/crates/horizon-world/src/java_hash_map.rs new file mode 100644 index 000000000..fc580706b --- /dev/null +++ b/crates/horizon-world/src/java_hash_map.rs @@ -0,0 +1,791 @@ +//! Java HashMap traversal for non-null keys with pure hash/equality/order +//! operations. Tree bins preserve native linked iteration order. +//! This is the storage/iterator subset needed by simulation callback lifecycles. +use std::{cmp::Ordering, sync::Arc}; +pub trait JavaKey: Eq { + fn java_hash(&self) -> i32; + /// Comparable comparison when both keys have the appropriate same Java + /// class. None and Equal both require subtree searches for unequal keys. + fn comparable_compare(&self, _other: &Self) -> Option<Ordering> { + None + } + /// Native class-name ordering, then identity-hash ordering. Equal identity + /// hashes break to Less, even for two different objects. Never return Equal. + fn tie_break(&self, other: &Self) -> Ordering; +} +type Link = Option<usize>; +struct Node<K, V> { + key: K, + value: V, + hash: i32, + next: Link, + prev: Link, + parent: Link, + left: Link, + right: Link, + red: bool, + tree: bool, +} +pub struct JavaHashMap<K, V> { + table: Vec<Link>, + nodes: Vec<Option<Node<K, V>>>, + free: Vec<usize>, + size: usize, + threshold: usize, + modification: u32, + owner: Arc<()>, +} +pub struct Cursor { + next: Link, + current: Link, + bucket: usize, + expected: u32, + owner: Arc<()>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CursorError { + ConcurrentModification, + NoCurrentEntry, + WrongMap, +} +impl Cursor { + pub fn has_next(&self) -> bool { + self.next.is_some() + } +} +impl<K: JavaKey, V> Default for JavaHashMap<K, V> { + fn default() -> Self { + Self { + table: Vec::new(), + nodes: Vec::new(), + free: Vec::new(), + size: 0, + threshold: 0, + modification: 0, + owner: Arc::new(()), + } + } +} +impl<K: JavaKey, V> JavaHashMap<K, V> { + fn node(&self, i: usize) -> &Node<K, V> { + self.nodes[i].as_ref().unwrap() + } + fn node_mut(&mut self, i: usize) -> &mut Node<K, V> { + self.nodes[i].as_mut().unwrap() + } + fn parent(&self, i: Link) -> Link { + i.and_then(|i| self.node(i).parent) + } + fn left(&self, i: Link) -> Link { + i.and_then(|i| self.node(i).left) + } + fn right(&self, i: Link) -> Link { + i.and_then(|i| self.node(i).right) + } + fn red(&self, i: Link) -> bool { + i.is_some_and(|i| self.node(i).red) + } + fn color(&mut self, i: Link, red: bool) { + if let Some(i) = i { + self.node_mut(i).red = red; + } + } + fn hash(key: &K) -> i32 { + let h = key.java_hash() as u32; + (h ^ (h >> 16)) as i32 + } + fn allocate(&mut self, key: K, value: V, hash: i32) -> usize { + let node = Some(Node { + key, + value, + hash, + next: None, + prev: None, + parent: None, + left: None, + right: None, + red: false, + tree: false, + }); + if let Some(i) = self.free.pop() { + self.nodes[i] = node; + i + } else { + self.nodes.push(node); + self.nodes.len() - 1 + } + } + pub fn len(&self) -> usize { + self.size + } + pub fn is_empty(&self) -> bool { + self.size == 0 + } + fn find(&self, key: &K) -> Link { + if self.table.is_empty() { + return None; + } + let h = Self::hash(key); + let mut p = self.table[h as usize & (self.table.len() - 1)]; + if let Some(first) = p.filter(|i| self.node(*i).tree) { + return self.find_tree(Some(self.root(first)), h, key); + } + while let Some(i) = p { + let n = self.node(i); + if n.hash == h && n.key == *key { + return Some(i); + } + p = n.next; + } + None + } + fn find_tree(&self, mut p: Link, hash: i32, key: &K) -> Link { + while let Some(i) = p { + let node = self.node(i); + if hash < node.hash { + p = node.left; + } else if hash > node.hash { + p = node.right; + } else if key == &node.key { + return Some(i); + } else if node.left.is_none() { + p = node.right; + } else if node.right.is_none() { + p = node.left; + } else { + match key.comparable_compare(&node.key) { + Some(Ordering::Less) => p = node.left, + Some(Ordering::Greater) => p = node.right, + _ => { + if let Some(found) = self.find_tree(node.right, hash, key) { + return Some(found); + } + p = node.left; + } + } + } + } + None + } + /// Native new HashMap(source), including sizing before entry insertion. + /// Values are cloned according to their storage semantics (shared handles + /// retain identity). This may change bucket order relative to the source. + pub fn copied(&self) -> Self + where + K: Clone, + V: Clone, + { + let mut result = Self::default(); + if self.size > 0 { + let capacity = ((self.size as f64 / 0.75).ceil() as usize).min(1 << 30); + result.threshold = capacity.next_power_of_two(); + for (key, value) in self.entries() { + result.put(key.clone(), value.clone()); + } + } + result + } + pub fn get(&self, key: &K) -> Option<&V> { + self.find(key).map(|i| &self.node(i).value) + } + pub fn entries(&self) -> impl Iterator<Item = (&K, &V)> { + self.table + .iter() + .flat_map(|first| std::iter::successors(*first, |i| self.node(*i).next)) + .map(|i| { + let n = self.node(i); + (&n.key, &n.value) + }) + } + fn root(&self, mut p: usize) -> usize { + while let Some(parent) = self.node(p).parent { + p = parent; + } + p + } + fn compare(&self, a: usize, b: usize) -> Ordering { + self.node(a).hash.cmp(&self.node(b).hash).then_with(|| { + let a = &self.node(a).key; + let b = &self.node(b).key; + a.comparable_compare(b) + .filter(|v| *v != Ordering::Equal) + .unwrap_or_else(|| a.tie_break(b)) + }) + } + fn rotate_left(&mut self, mut root: usize, p: usize) -> usize { + let Some(r) = self.node(p).right else { + return root; + }; + let rl = self.node(r).left; + self.node_mut(p).right = rl; + if let Some(rl) = rl { + self.node_mut(rl).parent = Some(p); + } + let pp = self.node(p).parent; + self.node_mut(r).parent = pp; + if let Some(pp) = pp { + if self.node(pp).left == Some(p) { + self.node_mut(pp).left = Some(r); + } else { + self.node_mut(pp).right = Some(r); + } + } else { + root = r; + self.node_mut(r).red = false; + } + self.node_mut(r).left = Some(p); + self.node_mut(p).parent = Some(r); + root + } + fn rotate_right(&mut self, mut root: usize, p: usize) -> usize { + let Some(l) = self.node(p).left else { + return root; + }; + let lr = self.node(l).right; + self.node_mut(p).left = lr; + if let Some(lr) = lr { + self.node_mut(lr).parent = Some(p); + } + let pp = self.node(p).parent; + self.node_mut(l).parent = pp; + if let Some(pp) = pp { + if self.node(pp).right == Some(p) { + self.node_mut(pp).right = Some(l); + } else { + self.node_mut(pp).left = Some(l); + } + } else { + root = l; + self.node_mut(l).red = false; + } + self.node_mut(l).right = Some(p); + self.node_mut(p).parent = Some(l); + root + } + fn balance_insert(&mut self, mut root: usize, mut x: usize) -> usize { + self.node_mut(x).red = true; + loop { + let Some(mut p) = self.node(x).parent else { + self.node_mut(x).red = false; + return x; + }; + let Some(mut g) = self.node(p).parent else { + return root; + }; + if !self.node(p).red { + return root; + } + let left = self.node(g).left == Some(p); + let uncle = if left { + self.node(g).right + } else { + self.node(g).left + }; + if self.red(uncle) { + self.color(uncle, false); + self.node_mut(p).red = false; + self.node_mut(g).red = true; + x = g; + continue; + } + if (if left { + self.node(p).right + } else { + self.node(p).left + }) == Some(x) + { + x = p; + root = if left { + self.rotate_left(root, x) + } else { + self.rotate_right(root, x) + }; + p = self.node(x).parent.unwrap(); + g = self.node(p).parent.unwrap(); + } + self.node_mut(p).red = false; + self.node_mut(g).red = true; + root = if left { + self.rotate_right(root, g) + } else { + self.rotate_left(root, g) + }; + } + } + fn front(&mut self, bucket: usize, root: usize) { + let first = self.table[bucket]; + if first == Some(root) { + return; + } + let (prev, next) = (self.node(root).prev, self.node(root).next); + if let Some(next) = next { + self.node_mut(next).prev = prev; + } + if let Some(prev) = prev { + self.node_mut(prev).next = next; + } + if let Some(first) = first { + self.node_mut(first).prev = Some(root); + } + self.node_mut(root).next = first; + self.node_mut(root).prev = None; + self.table[bucket] = Some(root); + } + fn treeify(&mut self, bucket: usize) { + let mut current = self.table[bucket]; + let mut root = None; + while let Some(x) = current { + current = self.node(x).next; + { + let n = self.node_mut(x); + n.tree = true; + n.left = None; + n.right = None; + n.parent = None; + n.red = false; + } + if let Some(r) = root { + let mut p = r; + loop { + let left = self.compare(x, p) != Ordering::Greater; + let child = if left { + self.node(p).left + } else { + self.node(p).right + }; + if let Some(c) = child { + p = c; + } else { + self.node_mut(x).parent = Some(p); + if left { + self.node_mut(p).left = Some(x); + } else { + self.node_mut(p).right = Some(x); + } + root = Some(self.balance_insert(r, x)); + break; + } + } + } else { + root = Some(x); + } + } + if let Some(root) = root { + self.front(bucket, root); + } + } + fn untreeify(&mut self, mut p: Link) { + while let Some(i) = p { + let n = self.node_mut(i); + n.tree = false; + n.parent = None; + n.left = None; + n.right = None; + n.red = false; + p = n.next; + } + } + fn resize(&mut self) { + let old_len = self.table.len(); + if old_len >= 1 << 30 { + self.threshold = i32::MAX as usize; + return; + } + let new_len = if old_len == 0 { + if self.threshold > 0 { + self.threshold + } else { + 16 + } + } else { + old_len * 2 + }; + let old = std::mem::replace(&mut self.table, vec![None; new_len]); + self.threshold = new_len * 3 / 4; + for (bucket, first) in old.into_iter().enumerate() { + let Some(first) = first else { + continue; + }; + let tree = self.node(first).tree; + let mut groups = [Vec::new(), Vec::new()]; + let mut p = Some(first); + while let Some(i) = p { + p = self.node(i).next; + groups[usize::from((self.node(i).hash as usize & old_len) != 0)].push(i); + } + for side in 0..2 { + let group = &groups[side]; + if group.is_empty() { + continue; + } + let at = bucket + side * old_len; + self.table[at] = Some(group[0]); + for (j, &i) in group.iter().enumerate() { + let n = self.node_mut(i); + n.prev = j.checked_sub(1).map(|j| group[j]); + n.next = group.get(j + 1).copied(); + } + if tree { + if group.len() <= 6 { + self.untreeify(Some(group[0])); + } else if !groups[1 - side].is_empty() { + self.treeify(at); + } + } + } + } + } + pub fn put(&mut self, key: K, value: V) -> Option<V> { + if let Some(i) = self.find(&key) { + return Some(std::mem::replace(&mut self.node_mut(i).value, value)); + } + if self.table.is_empty() { + self.resize(); + } + let hash = Self::hash(&key); + let bucket = hash as usize & (self.table.len() - 1); + let x = self.allocate(key, value, hash); + if let Some(first) = self.table[bucket] { + if self.node(first).tree { + self.node_mut(x).tree = true; + let root = self.root(first); + let mut p = root; + loop { + let left = self.compare(x, p) != Ordering::Greater; + let child = if left { + self.node(p).left + } else { + self.node(p).right + }; + if let Some(child) = child { + p = child; + } else { + let next = self.node(p).next; + { + let n = self.node_mut(x); + n.parent = Some(p); + n.prev = Some(p); + n.next = next; + } + if let Some(next) = next { + self.node_mut(next).prev = Some(x); + } + self.node_mut(p).next = Some(x); + if left { + self.node_mut(p).left = Some(x); + } else { + self.node_mut(p).right = Some(x); + } + let root = self.balance_insert(root, x); + self.front(bucket, root); + break; + } + } + } else { + let mut tail = first; + let mut count = 1; + while let Some(next) = self.node(tail).next { + tail = next; + count += 1; + } + self.node_mut(tail).next = Some(x); + self.node_mut(x).prev = Some(tail); + if count >= 8 { + if self.table.len() < 64 { + self.resize(); + } else { + self.treeify(bucket); + } + } + } + } else { + self.table[bucket] = Some(x); + } + self.size += 1; + self.modification = self.modification.wrapping_add(1); + if self.size > self.threshold { + self.resize(); + } + None + } + fn balance_delete(&mut self, mut root: usize, mut x: Link) -> usize { + loop { + let Some(xi) = x else { + return root; + }; + if xi == root { + return root; + } + let Some(p) = self.parent(x) else { + self.color(x, false); + return xi; + }; + if self.red(x) { + self.color(x, false); + return root; + } + let left = self.left(Some(p)) == x; + let mut sibling = if left { + self.right(Some(p)) + } else { + self.left(Some(p)) + }; + if self.red(sibling) { + self.color(sibling, false); + self.color(Some(p), true); + root = if left { + self.rotate_left(root, p) + } else { + self.rotate_right(root, p) + }; + let parent = self.parent(x); + sibling = if left { + self.right(parent) + } else { + self.left(parent) + }; + } + let parent = self.parent(x); + let Some(s) = sibling else { + x = parent; + continue; + }; + let near = if left { + self.left(sibling) + } else { + self.right(sibling) + }; + let far = if left { + self.right(sibling) + } else { + self.left(sibling) + }; + if !self.red(near) && !self.red(far) { + self.color(sibling, true); + x = parent; + continue; + } + if !self.red(far) { + self.color(near, false); + self.color(sibling, true); + root = if left { + self.rotate_right(root, s) + } else { + self.rotate_left(root, s) + }; + let parent = self.parent(x); + sibling = if left { + self.right(parent) + } else { + self.left(parent) + }; + } + let parent = self.parent(x); + self.color(sibling, self.red(parent)); + let far = if left { + self.right(sibling) + } else { + self.left(sibling) + }; + self.color(far, false); + self.color(parent, false); + if let Some(parent) = parent { + root = if left { + self.rotate_left(root, parent) + } else { + self.rotate_right(root, parent) + }; + } + x = Some(root); + } + } + fn remove_tree(&mut self, bucket: usize, p: usize, movable: bool) { + let first = self.table[bucket].unwrap(); + let mut root = self.root(first); + let (prev, next) = (self.node(p).prev, self.node(p).next); + if let Some(prev) = prev { + self.node_mut(prev).next = next; + } else { + self.table[bucket] = next; + } + if let Some(next) = next { + self.node_mut(next).prev = prev; + } + if self.table[bucket].is_none() { + return; + } + if movable && (self.node(root).right.is_none() || self.left(self.node(root).left).is_none()) + { + self.untreeify(self.table[bucket]); + return; + } + let (left, right) = (self.node(p).left, self.node(p).right); + let replacement; + if let (Some(left), Some(right)) = (left, right) { + let mut successor = right; + while let Some(l) = self.node(successor).left { + successor = l; + } + let red = self.node(successor).red; + self.node_mut(successor).red = self.node(p).red; + self.node_mut(p).red = red; + let sr = self.node(successor).right; + let pp = self.node(p).parent; + if successor == right { + self.node_mut(p).parent = Some(successor); + self.node_mut(successor).right = Some(p); + } else { + let sp = self.node(successor).parent; + self.node_mut(p).parent = sp; + if let Some(sp) = sp { + if self.node(sp).left == Some(successor) { + self.node_mut(sp).left = Some(p); + } else { + self.node_mut(sp).right = Some(p); + } + } + self.node_mut(successor).right = Some(right); + self.node_mut(right).parent = Some(successor); + } + self.node_mut(p).left = None; + self.node_mut(p).right = sr; + if let Some(sr) = sr { + self.node_mut(sr).parent = Some(p); + } + self.node_mut(successor).left = Some(left); + self.node_mut(left).parent = Some(successor); + self.node_mut(successor).parent = pp; + if let Some(pp) = pp { + if self.node(pp).left == Some(p) { + self.node_mut(pp).left = Some(successor); + } else { + self.node_mut(pp).right = Some(successor); + } + } else { + root = successor; + } + replacement = sr.unwrap_or(p); + } else { + replacement = left.or(right).unwrap_or(p); + } + if replacement != p { + let pp = self.node(p).parent; + self.node_mut(replacement).parent = pp; + if let Some(pp) = pp { + if self.node(pp).left == Some(p) { + self.node_mut(pp).left = Some(replacement); + } else { + self.node_mut(pp).right = Some(replacement); + } + } else { + root = replacement; + self.node_mut(replacement).red = false; + } + let n = self.node_mut(p); + n.left = None; + n.right = None; + n.parent = None; + } + if !self.node(p).red { + root = self.balance_delete(root, Some(replacement)); + } + if replacement == p { + if let Some(pp) = self.node(p).parent { + self.node_mut(p).parent = None; + if self.node(pp).left == Some(p) { + self.node_mut(pp).left = None; + } else if self.node(pp).right == Some(p) { + self.node_mut(pp).right = None; + } + } + } + if movable { + self.front(bucket, root); + } + } + fn remove_node(&mut self, i: usize, movable: bool) -> V { + let bucket = self.node(i).hash as usize & (self.table.len() - 1); + if self.node(i).tree { + self.remove_tree(bucket, i, movable); + } else { + let (prev, next) = (self.node(i).prev, self.node(i).next); + if let Some(prev) = prev { + self.node_mut(prev).next = next; + } else { + self.table[bucket] = next; + } + if let Some(next) = next { + self.node_mut(next).prev = prev; + } + } + self.size -= 1; + self.modification = self.modification.wrapping_add(1); + let n = self.nodes[i].take().unwrap(); + self.free.push(i); + n.value + } + pub fn remove(&mut self, key: &K) -> Option<V> { + self.find(key).map(|i| self.remove_node(i, true)) + } + pub fn clear(&mut self) { + self.modification = self.modification.wrapping_add(1); + if self.size != 0 { + self.table.fill(None); + self.nodes.clear(); + self.free.clear(); + self.size = 0; + } + } + pub fn cursor(&self) -> Cursor { + let mut c = Cursor { + next: None, + current: None, + bucket: 0, + expected: self.modification, + owner: self.owner.clone(), + }; + self.advance_bucket(&mut c); + c + } + fn advance_bucket(&self, c: &mut Cursor) { + while c.next.is_none() && c.bucket < self.table.len() { + c.next = self.table[c.bucket]; + c.bucket += 1; + } + } + fn check_cursor(&self, c: &Cursor) -> Result<(), CursorError> { + if !Arc::ptr_eq(&self.owner, &c.owner) { + Err(CursorError::WrongMap) + } else if self.modification != c.expected { + Err(CursorError::ConcurrentModification) + } else { + Ok(()) + } + } + /// Call while has_next is true. The returned values reflect replacements made + /// after iterator creation; structural changes are rejected before access. + pub fn next_entry(&self, c: &mut Cursor) -> Result<Option<(&K, &V)>, CursorError> { + self.check_cursor(c)?; + let Some(i) = c.next else { + return Ok(None); + }; + c.current = Some(i); + c.next = self.node(i).next; + self.advance_bucket(c); + let n = self.node(i); + Ok(Some((&n.key, &n.value))) + } + pub fn remove_current(&mut self, c: &mut Cursor) -> Result<(), CursorError> { + if !Arc::ptr_eq(&self.owner, &c.owner) { + return Err(CursorError::WrongMap); + } + let Some(i) = c.current else { + return Err(CursorError::NoCurrentEntry); + }; + self.check_cursor(c)?; + c.current = None; + self.remove_node(i, false); + c.expected = self.modification; + Ok(()) + } +} diff --git a/crates/horizon-world/src/level/classes.rs b/crates/horizon-world/src/level/classes.rs new file mode 100644 index 000000000..9540a5a47 --- /dev/null +++ b/crates/horizon-world/src/level/classes.rs @@ -0,0 +1,341 @@ +//! Vanilla block classes recognised by Horizon's behaviour port. +//! +//! Each block's exported class chain (most derived first) is matched against +//! this list: `class` is the most derived recognised class (it selects the +//! ported overrides), and `instance_of` answers Java `instanceof` checks such +//! as `state.getBlock() instanceof LeavesBlock` for any recognised ancestor. + +macro_rules! classes { + ($($name:ident = $java:literal,)*) => { + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] + #[repr(u16)] + pub enum Class { $($name,)* } + impl Class { + pub const ALL: &'static [Class] = &[$(Class::$name,)*]; + pub fn from_java(name: &str) -> Option<Self> { + match name { $($java => Some(Class::$name),)* _ => None } + } + pub const fn java_name(self) -> &'static str { + match self { $(Class::$name => $java,)* } + } + } + }; +} + +classes! { + Block = "Block", + Air = "AirBlock", + AmethystCluster = "AmethystClusterBlock", + Anvil = "AnvilBlock", + AttachedStem = "AttachedStemBlock", + Azalea = "AzaleaBlock", + BambooSapling = "BambooSaplingBlock", + BambooStalk = "BambooStalkBlock", + AbstractBanner = "AbstractBannerBlock", + Banner = "BannerBlock", + WallBanner = "WallBannerBlock", + Barrel = "BarrelBlock", + BaseCoralPlantType = "BaseCoralPlantTypeBlock", + BaseCoralPlant = "BaseCoralPlantBlock", + BaseCoralFan = "BaseCoralFanBlock", + BaseCoralWallFan = "BaseCoralWallFanBlock", + CoralPlant = "CoralPlantBlock", + CoralFan = "CoralFanBlock", + CoralWallFan = "CoralWallFanBlock", + Coral = "CoralBlock", + BaseEntity = "BaseEntityBlock", + BaseFire = "BaseFireBlock", + Fire = "FireBlock", + SoulFire = "SoulFireBlock", + BasePressurePlate = "BasePressurePlateBlock", + PressurePlate = "PressurePlateBlock", + WeightedPressurePlate = "WeightedPressurePlateBlock", + BaseRail = "BaseRailBlock", + Rail = "RailBlock", + PoweredRail = "PoweredRailBlock", + DetectorRail = "DetectorRailBlock", + BaseTorch = "BaseTorchBlock", + Torch = "TorchBlock", + WallTorch = "WallTorchBlock", + RedstoneTorch = "RedstoneTorchBlock", + RedstoneWallTorch = "RedstoneWallTorchBlock", + AbstractBed = "AbstractBedBlock", + Bed = "BedBlock", + StrawBed = "StrawBedBlock", + Beehive = "BeehiveBlock", + Beetroot = "BeetrootBlock", + Bell = "BellBlock", + BigDripleaf = "BigDripleafBlock", + BigDripleafStem = "BigDripleafStemBlock", + BonemealableFeaturePlacer = "BonemealableFeaturePlacerBlock", + BubbleColumn = "BubbleColumnBlock", + BuddingAmethyst = "BuddingAmethystBlock", + Bush = "BushBlock", + Button = "ButtonBlock", + Cactus = "CactusBlock", + CactusFlower = "CactusFlowerBlock", + Cake = "CakeBlock", + Campfire = "CampfireBlock", + AbstractCandle = "AbstractCandleBlock", + Candle = "CandleBlock", + CandleCake = "CandleCakeBlock", + Carpet = "CarpetBlock", + WoolCarpet = "WoolCarpetBlock", + MossyCarpet = "MossyCarpetBlock", + Carrot = "CarrotBlock", + CarvedPumpkin = "CarvedPumpkinBlock", + AbstractCauldron = "AbstractCauldronBlock", + Cauldron = "CauldronBlock", + LavaCauldron = "LavaCauldronBlock", + LayeredCauldron = "LayeredCauldronBlock", + GrowingPlant = "GrowingPlantBlock", + GrowingPlantHead = "GrowingPlantHeadBlock", + GrowingPlantBody = "GrowingPlantBodyBlock", + CaveVines = "CaveVinesBlock", + CaveVinesPlant = "CaveVinesPlantBlock", + Kelp = "KelpBlock", + KelpPlant = "KelpPlantBlock", + TwistingVines = "TwistingVinesBlock", + TwistingVinesPlant = "TwistingVinesPlantBlock", + WeepingVines = "WeepingVinesBlock", + WeepingVinesPlant = "WeepingVinesPlantBlock", + Sign = "SignBlock", + StandingSign = "StandingSignBlock", + WallSign = "WallSignBlock", + CeilingHangingSign = "CeilingHangingSignBlock", + WallHangingSign = "WallHangingSignBlock", + RotatedPillar = "RotatedPillarBlock", + Chain = "ChainBlock", + AbstractChest = "AbstractChestBlock", + Chest = "ChestBlock", + TrappedChest = "TrappedChestBlock", + CopperChest = "CopperChestBlock", + EnderChest = "EnderChestBlock", + ChiseledBookShelf = "ChiseledBookShelfBlock", + ChorusFlower = "ChorusFlowerBlock", + ChorusPlant = "ChorusPlantBlock", + Pipe = "PipeBlock", + Cocoa = "CocoaBlock", + FallingBlock = "FallingBlock", + ColoredFalling = "ColoredFallingBlock", + Sand = "SandBlock", + ConcretePowder = "ConcretePowderBlock", + DragonEgg = "DragonEggBlock", + Comparator = "ComparatorBlock", + Repeater = "RepeaterBlock", + Diode = "DiodeBlock", + Composter = "ComposterBlock", + CopperBulb = "CopperBulbBlock", + Crafter = "CrafterBlock", + CraftingTable = "CraftingTableBlock", + CreakingHeart = "CreakingHeartBlock", + Crop = "CropBlock", + CrossCollision = "CrossCollisionBlock", + DaylightDetector = "DaylightDetectorBlock", + DecoratedPot = "DecoratedPotBlock", + Directional = "DirectionalBlock", + Dispenser = "DispenserBlock", + Dropper = "DropperBlock", + Door = "DoorBlock", + DoublePlant = "DoublePlantBlock", + DriedGhast = "DriedGhastBlock", + DropExperience = "DropExperienceBlock", + DryVegetation = "DryVegetationBlock", + ShortDryGrass = "ShortDryGrassBlock", + TallDryGrass = "TallDryGrassBlock", + EndPortalFrame = "EndPortalFrameBlock", + Rod = "RodBlock", + EndRod = "EndRodBlock", + LightningRod = "LightningRodBlock", + Flower = "FlowerBlock", + Eyeblossom = "EyeblossomBlock", + WitherRose = "WitherRoseBlock", + FaceAttachedHorizontalDirectional = "FaceAttachedHorizontalDirectionalBlock", + Farmland = "FarmlandBlock", + Fence = "FenceBlock", + FenceGate = "FenceGateBlock", + FireflyBush = "FireflyBushBlock", + FlowerBed = "FlowerBedBlock", + FlowerPot = "FlowerPotBlock", + Frogspawn = "FrogspawnBlock", + Ice = "IceBlock", + FrostedIce = "FrostedIceBlock", + AbstractFurnace = "AbstractFurnaceBlock", + GlazedTerracotta = "GlazedTerracottaBlock", + Multiface = "MultifaceBlock", + MultifaceSpreadeable = "MultifaceSpreadeableBlock", + GlowLichen = "GlowLichenBlock", + SculkVein = "SculkVeinBlock", + Snowy = "SnowyBlock", + SpreadingSnowy = "SpreadingSnowyBlock", + Grass = "GrassBlock", + Mycelium = "MyceliumBlock", + Grindstone = "GrindstoneBlock", + HalfTransparent = "HalfTransparentBlock", + HangingMoss = "HangingMossBlock", + HangingRoots = "HangingRootsBlock", + Hay = "HayBlock", + Hopper = "HopperBlock", + HorizontalDirectional = "HorizontalDirectionalBlock", + HugeMushroom = "HugeMushroomBlock", + Infested = "InfestedBlock", + InfestedRotatedPillar = "InfestedRotatedPillarBlock", + IronBars = "IronBarsBlock", + StainedGlassPane = "StainedGlassPaneBlock", + Jukebox = "JukeboxBlock", + Ladder = "LadderBlock", + Lantern = "LanternBlock", + LeafLitter = "LeafLitterBlock", + Leaves = "LeavesBlock", + MangroveLeaves = "MangroveLeavesBlock", + Lectern = "LecternBlock", + Lever = "LeverBlock", + Light = "LightBlock", + LilyPad = "LilyPadBlock", + Liquid = "LiquidBlock", + Loom = "LoomBlock", + Magma = "MagmaBlock", + MangrovePropagule = "MangrovePropaguleBlock", + MangroveRoots = "MangroveRootsBlock", + MovingPiston = "MovingPistonBlock", + Mud = "MudBlock", + Mushroom = "MushroomBlock", + NetherFungus = "NetherFungusBlock", + NetherPortal = "NetherPortalBlock", + NetherRoots = "NetherRootsBlock", + NetherSprouts = "NetherSproutsBlock", + NetherWart = "NetherWartBlock", + Note = "NoteBlock", + Nylium = "NyliumBlock", + Observer = "ObserverBlock", + Path = "PathBlock", + AbstractSkull = "AbstractSkullBlock", + Skull = "SkullBlock", + WallSkull = "WallSkullBlock", + PistonBase = "PistonBaseBlock", + PistonHead = "PistonHeadBlock", + PitcherCrop = "PitcherCropBlock", + Speleothem = "SpeleothemBlock", + PointedDripstone = "PointedDripstoneBlock", + SulfurSpike = "SulfurSpikeBlock", + Potato = "PotatoBlock", + PowderSnow = "PowderSnowBlock", + Powered = "PoweredBlock", + Pumpkin = "PumpkinBlock", + RedStoneOre = "RedStoneOreBlock", + RedstoneLamp = "RedstoneLampBlock", + RedstoneWire = "RedstoneWireBlock", + RespawnAnchor = "RespawnAnchorBlock", + RootedDirt = "RootedDirtBlock", + Sapling = "SaplingBlock", + Scaffolding = "ScaffoldingBlock", + SculkSensor = "SculkSensorBlock", + CalibratedSculkSensor = "CalibratedSculkSensorBlock", + SculkShrieker = "SculkShriekerBlock", + SeaPickle = "SeaPickleBlock", + Seagrass = "SeagrassBlock", + Shelf = "ShelfBlock", + ShelfMushroom = "ShelfMushroomBlock", + ShulkerBox = "ShulkerBoxBlock", + Slab = "SlabBlock", + SmallDripleaf = "SmallDripleafBlock", + SnifferEgg = "SnifferEggBlock", + SnowLayer = "SnowLayerBlock", + SoulSand = "SoulSandBlock", + Sponge = "SpongeBlock", + WetSponge = "WetSpongeBlock", + SporeBlossom = "SporeBlossomBlock", + Stair = "StairBlock", + Stem = "StemBlock", + Stonecutter = "StonecutterBlock", + SugarCane = "SugarCaneBlock", + SweetBerryBush = "SweetBerryBushBlock", + TallFlower = "TallFlowerBlock", + TallGrass = "TallGrassBlock", + TallSeagrass = "TallSeagrassBlock", + Target = "TargetBlock", + Tnt = "TntBlock", + TorchflowerCrop = "TorchflowerCropBlock", + TrapDoor = "TrapDoorBlock", + TripWire = "TripWireBlock", + TripWireHook = "TripWireHookBlock", + TurtleEgg = "TurtleEggBlock", + Vegetation = "VegetationBlock", + Vine = "VineBlock", + Wall = "WallBlock", + WaterloggedTransparent = "WaterloggedTransparentBlock", + WeatheringCopperFull = "WeatheringCopperFullBlock", + Web = "WebBlock", + CopperGolemStatue = "CopperGolemStatueBlock", + Beacon = "BeaconBlock", + BrewingStand = "BrewingStandBlock", + Brushable = "BrushableBlock", + Conduit = "ConduitBlock", + EnchantingTable = "EnchantingTableBlock", + EndGateway = "EndGatewayBlock", + EndPortal = "EndPortalBlock", + Spawner = "SpawnerBlock", + TrialSpawner = "TrialSpawnerBlock", + Vault = "VaultBlock", + Barrier = "BarrierBlock", + StructureVoid = "StructureVoidBlock", + Command = "CommandBlock", + Structure = "StructureBlock", + Jigsaw = "JigsawBlock", + SmithingTable = "SmithingTableBlock", + CartographyTable = "CartographyTableBlock", + Netherrack = "NetherrackBlock", + Sculk = "SculkBlock", + SculkCatalyst = "SculkCatalystBlock", + PotentSulfur = "PotentSulfurBlock", + Honey = "HoneyBlock", + Slime = "SlimeBlock", + HeavyCore = "HeavyCoreBlock", + CryingObsidian = "CryingObsidianBlock", +} + +/// Java interfaces Horizon's port consults through `instanceof`. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(u8)] +pub enum Interface { + SimpleWaterlogged, + LiquidBlockContainer, + BucketPickup, + Bonemealable, + Fallable, + Entity, + WeatheringCopper, + CaveVines, +} +impl Interface { + pub fn from_java(name: &str) -> Option<Self> { + Some(match name { + "SimpleWaterloggedBlock" => Self::SimpleWaterlogged, + "LiquidBlockContainer" => Self::LiquidBlockContainer, + "BucketPickup" => Self::BucketPickup, + "BonemealableBlock" => Self::Bonemealable, + "Fallable" => Self::Fallable, + "EntityBlock" => Self::Entity, + "WeatheringCopper" => Self::WeatheringCopper, + "CaveVines" => Self::CaveVines, + _ => return None, + }) + } + pub const fn mask(self) -> u16 { + 1 << self as u8 + } +} + +/// Set of recognised classes in one block's chain. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +pub struct ClassSet([u64; 5]); +impl ClassSet { + pub fn insert(&mut self, class: Class) { + let i = class as usize; + self.0[i / 64] |= 1 << (i % 64); + } + pub fn contains(self, class: Class) -> bool { + let i = class as usize; + self.0[i / 64] & (1 << (i % 64)) != 0 + } +} diff --git a/crates/horizon-world/src/level/data.rs b/crates/horizon-world/src/level/data.rs new file mode 100644 index 000000000..854248aa7 --- /dev/null +++ b/crates/horizon-world/src/level/data.rs @@ -0,0 +1,1129 @@ +//! Behaviour tables built once from the pinned client resources. +use super::{ + Behaviours, + classes::{Class, ClassSet, Interface}, + states::{BlockId, PropKey, StateTable}, +}; +use crate::{ + collision::CachedCollisionRegistry, + compression::invalid, + fluid::{FluidBlockBindings, FluidKind, FluidState}, + nbt::{self, Limits}, + registry::{BlockRegistry, BlockStateId}, + worldgen::tags::TagDefinitions, +}; +use horizon_core::geometry::{Aabb, Direction, ShapeOp, Vec3, VoxelShape}; +use serde_json::Value; +use std::{ + collections::HashMap, + fs::{self, File}, + io::{self, BufReader}, + path::Path, + sync::Arc, +}; + +/// Per-state flags read from vanilla accessors over an empty level. +pub mod state_flags { + pub const SOLID: u32 = 1; + pub const AIR: u32 = 1 << 1; + pub const CONDUCTOR: u32 = 1 << 2; + pub const SIGNAL_SOURCE: u32 = 1 << 3; + pub const ANALOG_OUTPUT: u32 = 1 << 4; + pub const COLLISION_EMPTY: u32 = 1 << 5; + pub const SUFFOCATING: u32 = 1 << 6; + pub const REPLACEABLE: u32 = 1 << 7; + pub const RANDOM_TICKS: u32 = 1 << 8; + pub const SOLID_RENDER: u32 = 1 << 9; + pub const LIQUID: u32 = 1 << 10; + pub const BLOCK_ENTITY: u32 = 1 << 11; + pub const IGNITED_BY_LAVA: u32 = 1 << 12; + pub const CAN_OCCLUDE: u32 = 1 << 13; + pub const FULL_COLLISION: u32 = 1 << 14; + pub const SKYLIGHT_DOWN: u32 = 1 << 15; + pub const REQUIRES_TOOL: u32 = 1 << 16; + pub const SHAPE_OCCLUSION: u32 = 1 << 17; +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PushReaction { + PushPull, + Push, + Popped, + Immoveable, + IgnoreEntity, +} + +#[derive(Clone, Copy, Debug)] +pub struct StateFacts { + pub flags: u32, + /// isFaceSturdy bits: support type (FULL, CENTER, RIGID) * 6 + direction. + pub sturdy: u32, + /// getSignal / getDirectSignal over an empty level, 4 bits per direction. + pub weak: u32, + pub strong: u32, + pub fluid: FluidState, + pub emission: u8, + pub dampening: u8, + pub hardness: f32, + pub push: PushReaction, + pub instrument: u8, + /// Index into `Behaviours::shapes`, or -1 for an uncached (dynamic) shape. + pub shape: i32, +} + +#[derive(Clone, Debug)] +pub struct SetType { + pub name: Box<str>, + pub can_open_by_hand: bool, + pub can_open_by_wind_charge: bool, + pub arrows: bool, + /// true: MOBS sensitivity (living entities only); false: EVERYTHING. + pub mobs_only: bool, + pub door_open: Arc<str>, + pub door_close: Arc<str>, + pub trapdoor_open: Arc<str>, + pub trapdoor_close: Arc<str>, + pub plate_on: Arc<str>, + pub plate_off: Arc<str>, + pub button_on: Arc<str>, + pub button_off: Arc<str>, +} + +#[derive(Clone, Debug)] +pub struct Sounds { + pub volume: f32, + pub pitch: f32, + pub place: Arc<str>, + pub break_: Arc<str>, + pub fall: Arc<str>, +} + +/// Precomputed queries over one cached collision shape. +#[derive(Clone, Copy, Debug, Default)] +pub struct ShapeInfo { + /// `Block.isFaceFull(shape, direction)` per direction bit. + pub full_faces: u8, + /// `!shape.getFaceShape(direction).isEmpty()` per direction bit. + pub nonempty_faces: u8, + /// WallBlock `isCovered(shape.getFaceShape(DOWN), test)` for the post (bit 0) + /// and the north/east/south/west wall tests (bits 1..=4). + pub wall_cover: u8, +} + +pub(crate) fn analyse_shape(shape: &VoxelShape) -> io::Result<ShapeInfo> { + let err = |e: horizon_core::geometry::ShapeError| invalid(e.to_string()); + let mut info = ShapeInfo::default(); + let block = VoxelShape::block(); + for direction in Direction::ALL { + let face = shape.face_shape(direction).map_err(err)?; + if !block.join_is_not_empty(&face, ShapeOp::XOR).map_err(err)? { + info.full_faces |= 1 << direction as u8; + } + if !face.is_empty() { + info.nonempty_faces |= 1 << direction as u8; + } + } + let above = shape.face_shape(Direction::Down).map_err(err)?; + let px = |v: f64| v / 16.0; + let tests = [ + (7.0, 7.0, 9.0, 9.0), + (7.0, 0.0, 9.0, 9.0), + (7.0, 7.0, 16.0, 9.0), + (7.0, 7.0, 9.0, 16.0), + (0.0, 7.0, 9.0, 9.0), + ]; + for (bit, (x0, z0, x1, z1)) in tests.into_iter().enumerate() { + let test = VoxelShape::from_box(Aabb::new( + Vec3::new(px(x0), 0.0, px(z0)), + Vec3::new(px(x1), 1.0, px(z1)), + )) + .map_err(err)?; + if !test + .join_is_not_empty(&above, ShapeOp::ONLY_FIRST) + .map_err(err)? + { + info.wall_cover |= 1 << bit; + } + } + Ok(info) +} + +/// Fluid tags as masks over `FluidKind::mask`. +#[derive(Clone, Copy, Debug, Default)] +pub struct FluidTags { + pub water: u8, + pub lava: u8, + pub supports_frogspawn: u8, + pub supports_lily_pad: u8, + pub supports_sugar_cane_adjacently: u8, + pub bubble_column_can_occupy: u8, +} + +/// A set of blocks (a resolved block tag). +#[derive(Clone, Debug, Default)] +pub struct BlockSet(Vec<u64>); +impl BlockSet { + pub fn with_capacity(blocks: usize) -> Self { + Self(vec![0; blocks.div_ceil(64)]) + } + pub fn insert(&mut self, block: BlockId) { + let i = block.0 as usize; + if i / 64 >= self.0.len() { + self.0.resize(i / 64 + 1, 0); + } + self.0[i / 64] |= 1 << (i % 64); + } + pub fn contains(&self, block: BlockId) -> bool { + let i = block.0 as usize; + self.0.get(i / 64).is_some_and(|w| w & (1 << (i % 64)) != 0) + } +} + +#[derive(Clone, Debug)] +pub struct BlockData { + pub class: Class, + /// Recognised classes of the Java class chain, most derived first; ported + /// overrides dispatch along it so `super` calls reach the next override. + pub chain: Vec<Class>, + pub classes: ClassSet, + pub interfaces: u16, + pub set_type: Option<Arc<SetType>>, + pub gate_open: Option<Arc<str>>, + pub gate_close: Option<Arc<str>>, + pub open_sound: Option<Arc<str>>, + pub close_sound: Option<Arc<str>>, + pub ticks_to_stay_pressed: i32, + pub max_weight: i32, + /// Block-valued configuration: concrete (powder), fruit (stems), potted + /// content, dead coral, stair base, candle (candle cakes), required nylium. + pub link: Option<BlockId>, + /// Second block link: attached stem (stems) or stem (attached stems). + pub link2: Option<BlockId>, + pub support_tag: Option<Arc<BlockSet>>, + pub support_tag2: Option<Arc<BlockSet>>, + pub feature: Option<Arc<str>>, + pub grow_probability: f64, + pub growth_direction: Direction, + pub schedule_fluid_ticks: bool, + pub weather: u8, + pub ignite_odds: i32, + pub burn_odds: i32, + pub sounds: Arc<Sounds>, + pub item: Arc<str>, + pub dynamic_shape: bool, +} +impl BlockData { + pub fn is(&self, class: Class) -> bool { + self.class == class || self.classes.contains(class) + } + pub fn implements(&self, interface: Interface) -> bool { + self.interfaces & interface.mask() != 0 + } +} + +/// Item-to-block placement bindings (BlockItem and its subclasses). +#[derive(Clone, Debug)] +pub struct ItemBinding { + pub block: BlockId, + pub wall_block: Option<BlockId>, + /// StandingAndWallBlockItem.attachmentDirection (DOWN for torches/signs, UP for hanging signs). + pub attachment: Option<Direction>, + pub kind: ItemKind, + /// GameMasterBlockItem (command/structure/jigsaw blocks): only placeable + /// by players that can use game master blocks. + pub game_master: bool, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ItemKind { + Block, + DoubleHigh, + StandingAndWall, + Scaffolding, + PlaceOnWater, + HangingSign, + SolidBucket, + Other, +} + +macro_rules! named_blocks { + ($($field:ident = $name:literal,)*) => { + /// Blocks referenced by identity in vanilla code (`Blocks.X`). + #[derive(Clone, Copy, Debug)] + pub struct Named { $(pub $field: BlockId,)* } + impl Named { + fn resolve(table: &StateTable) -> io::Result<Self> { + Ok(Self { $($field: table.block_by_name(concat!("minecraft:", $name)).ok_or_else(|| invalid(concat!("missing block ", $name)))?,)* }) + } + } + }; +} +named_blocks! { + air = "air", + cave_air = "cave_air", + void_air = "void_air", + water = "water", + lava = "lava", + stone = "stone", + cobblestone = "cobblestone", + obsidian = "obsidian", + basalt = "basalt", + soul_soil = "soul_soil", + blue_ice = "blue_ice", + ice = "ice", + frosted_ice = "frosted_ice", + snow = "snow", + snow_block = "snow_block", + powder_snow = "powder_snow", + dirt = "dirt", + grass_block = "grass_block", + mycelium = "mycelium", + podzol = "podzol", + farmland = "farmland", + dirt_path = "dirt_path", + mud = "mud", + clay = "clay", + sponge = "sponge", + wet_sponge = "wet_sponge", + fire = "fire", + soul_fire = "soul_fire", + redstone_wire = "redstone_wire", + comparator = "comparator", + repeater = "repeater", + redstone_torch = "redstone_torch", + redstone_wall_torch = "redstone_wall_torch", + redstone_block = "redstone_block", + redstone_lamp = "redstone_lamp", + observer = "observer", + piston = "piston", + sticky_piston = "sticky_piston", + piston_head = "piston_head", + moving_piston = "moving_piston", + tnt = "tnt", + magma_block = "magma_block", + soul_sand = "soul_sand", + bubble_column = "bubble_column", + kelp = "kelp", + kelp_plant = "kelp_plant", + seagrass = "seagrass", + tall_seagrass = "tall_seagrass", + cactus = "cactus", + cactus_flower = "cactus_flower", + sugar_cane = "sugar_cane", + bamboo = "bamboo", + bamboo_sapling = "bamboo_sapling", + scaffolding = "scaffolding", + melon = "melon", + pumpkin = "pumpkin", + carved_pumpkin = "carved_pumpkin", + jack_o_lantern = "jack_o_lantern", + barrier = "barrier", + cake = "cake", + flower_pot = "flower_pot", + cauldron = "cauldron", + water_cauldron = "water_cauldron", + lava_cauldron = "lava_cauldron", + powder_snow_cauldron = "powder_snow_cauldron", + dragon_egg = "dragon_egg", + tripwire = "tripwire", + tripwire_hook = "tripwire_hook", + slime_block = "slime_block", + honey_block = "honey_block", + hopper = "hopper", + note_block = "note_block", + chorus_plant = "chorus_plant", + chorus_flower = "chorus_flower", + end_stone = "end_stone", + vine = "vine", + lily_pad = "lily_pad", + small_dripleaf = "small_dripleaf", + big_dripleaf = "big_dripleaf", + big_dripleaf_stem = "big_dripleaf_stem", + pointed_dripstone = "pointed_dripstone", + ladder = "ladder", + sweet_berry_bush = "sweet_berry_bush", + torchflower = "torchflower", + pitcher_plant = "pitcher_plant", + pitcher_crop = "pitcher_crop", + moss_block = "moss_block", + short_grass = "short_grass", + tall_grass = "tall_grass", + fern = "fern", + large_fern = "large_fern", + dead_bush = "dead_bush", + netherrack = "netherrack", + soul_campfire = "soul_campfire", + campfire = "campfire", + light = "light", + sculk_sensor = "sculk_sensor", + lectern = "lectern", + target = "target", + daylight_detector = "daylight_detector", + lever = "lever", + beehive = "beehive", + bee_nest = "bee_nest", + composter = "composter", + respawn_anchor = "respawn_anchor", + end_portal_frame = "end_portal_frame", + crafter = "crafter", + copper_bulb = "copper_bulb", + glow_lichen = "glow_lichen", + hanging_roots = "hanging_roots", + mangrove_roots = "mangrove_roots", + big_dripleaf_fallback = "big_dripleaf", + nether_portal = "nether_portal", + frogspawn = "frogspawn", + turtle_egg = "turtle_egg", + sniffer_egg = "sniffer_egg", + sea_pickle = "sea_pickle", + coarse_dirt = "coarse_dirt", + rooted_dirt = "rooted_dirt", + crimson_nylium = "crimson_nylium", + warped_nylium = "warped_nylium", +} + +macro_rules! tags { + ($($field:ident = $name:literal,)*) => { + /// Block tags consulted by ported behaviour. + #[derive(Clone, Debug, Default)] + pub struct Tags { $(pub $field: Arc<BlockSet>,)* } + impl Tags { + fn resolve(all: &HashMap<String, Arc<BlockSet>>) -> Self { + Self { $($field: all.get(concat!("minecraft:", $name)).cloned().unwrap_or_default(),)* } + } + } + }; +} +tags! { + leaves = "leaves", + logs = "logs", + prevents_nearby_leaf_decay = "prevents_nearby_leaf_decay", + walls = "walls", + fences = "fences", + wooden_fences = "wooden_fences", + fence_gates = "fence_gates", + stairs = "stairs", + slabs = "slabs", + doors = "doors", + trapdoors = "trapdoors", + rails = "rails", + beds = "beds", + wall_post_override = "wall_post_override", + replaceable = "replaceable", + dirt = "dirt", + sand = "sand", + ice = "ice", + snow = "snow", + infiniburn_overworld = "infiniburn_overworld", + infiniburn_nether = "infiniburn_nether", + infiniburn_end = "infiniburn_end", + soul_fire_base_blocks = "soul_fire_base_blocks", + washed_away_by_fluids = "washed_away_by_fluids", + blocks_fluid_flow = "blocks_fluid_flow", + blocks_motion = "blocks_motion", + unstable_bottom_center = "unstable_bottom_center", + cannot_support_snow_layer = "cannot_support_snow_layer", + support_override_snow_layer = "support_override_snow_layer", + maintains_farmland = "maintains_farmland", + supports_vegetation = "supports_vegetation", + supports_crops = "supports_crops", + supports_cactus = "supports_cactus", + supports_sugar_cane = "supports_sugar_cane", + supports_sugar_cane_adjacently = "supports_sugar_cane_adjacently", + supports_bamboo = "supports_bamboo", + supports_cocoa = "supports_cocoa", + supports_azalea = "supports_azalea", + supports_dry_vegetation = "supports_dry_vegetation", + supports_nether_sprouts = "supports_nether_sprouts", + supports_nether_wart = "supports_nether_wart", + supports_wither_rose = "supports_wither_rose", + supports_lily_pad = "supports_lily_pad", + supports_frogspawn = "supports_frogspawn", + supports_big_dripleaf = "supports_big_dripleaf", + supports_small_dripleaf = "supports_small_dripleaf", + supports_mangrove_propagule = "supports_mangrove_propagule", + supports_hanging_mangrove_propagule = "supports_hanging_mangrove_propagule", + supports_chorus_plant = "supports_chorus_plant", + supports_chorus_flower = "supports_chorus_flower", + support_override_cactus_flower = "support_override_cactus_flower", + cannot_support_seagrass = "cannot_support_seagrass", + cannot_support_kelp = "cannot_support_kelp", + overrides_mushroom_light_requirement = "overrides_mushroom_light_requirement", + enables_bubble_column_push_up = "enables_bubble_column_push_up", + enables_bubble_column_drag_down = "enables_bubble_column_drag_down", + shulker_boxes = "shulker_boxes", + convertible_to_mud = "convertible_to_mud", + grows_crops = "grows_crops", + candles = "candles", + candle_cakes = "candle_cakes", + campfires = "campfires", + buttons = "buttons", + pressure_plates = "pressure_plates", + wool = "wool", + crops = "crops", + small_flowers = "small_flowers", + flowers = "flowers", + saplings = "saplings", + anvil = "anvil", + lanterns = "lanterns", + climbable = "climbable", + nylium = "nylium", + mushroom_grow_block = "mushroom_grow_block", + guarded_by_piglins = "guarded_by_piglins", + copper = "copper", +} + +/// Property keys interned at load. +macro_rules! props { + ($($field:ident = $name:literal,)*) => { + #[derive(Clone, Copy, Debug)] + pub struct Props { $(pub $field: PropKey,)* } + impl Props { + fn resolve(table: &mut StateTable) -> Self { + Self { $($field: table.key($name),)* } + } + } + }; +} +props! { + waterlogged = "waterlogged", + facing = "facing", + half = "half", + shape = "shape", + open = "open", + powered = "powered", + hinge = "hinge", + in_wall = "in_wall", + axis = "axis", + age = "age", + level = "level", + layers = "layers", + snowy = "snowy", + north = "north", + south = "south", + east = "east", + west = "west", + up = "up", + down = "down", + distance = "distance", + persistent = "persistent", + moisture = "moisture", + face = "face", + lit = "lit", + power = "power", + delay = "delay", + locked = "locked", + mode = "mode", + triggered = "triggered", + extended = "extended", + kind = "type", + part = "part", + occupied = "occupied", + hanging = "hanging", + attached = "attached", + candles = "candles", + pickles = "pickles", + eggs = "eggs", + hatch = "hatch", + note = "note", + instrument = "instrument", + bites = "bites", + rotation = "rotation", + stage = "stage", + leaves = "leaves", + bottom = "bottom", + falling = "falling", + drag = "drag", + tilt = "tilt", + attachment = "attachment", + vertical_direction = "vertical_direction", + thickness = "thickness", + berries = "berries", + flower_amount = "flower_amount", + segment_amount = "segment_amount", + charges = "charges", + eye = "eye", + has_bottle_0 = "has_bottle_0", + disarmed = "disarmed", + inverted = "inverted", + enabled = "enabled", + conditional = "conditional", + short = "short", + unstable = "unstable", + tip = "tip", + honey_level = "honey_level", + bloom = "bloom", + natural = "natural", + cracked = "cracked", + has_book = "has_book", + signal_fire = "signal_fire", + orientation = "orientation", + crafting = "crafting", + side_chain = "side_chain", + copper_golem_pose = "copper_golem_pose", + sculk_sensor_phase = "sculk_sensor_phase", + potent_sulfur_state = "potent_sulfur_state", +} + +fn fail(message: &str) -> io::Error { + invalid(message) +} + +fn read_json(path: &Path) -> io::Result<Value> { + serde_json::from_reader(BufReader::new(File::open(path)?)).map_err(|e| invalid(e.to_string())) +} + +fn interned(cache: &mut HashMap<String, Arc<str>>, text: &str) -> Arc<str> { + cache + .entry(text.to_owned()) + .or_insert_with(|| Arc::from(text)) + .clone() +} + +fn set_type(value: &Value, cache: &mut HashMap<String, Arc<str>>) -> Option<SetType> { + let text = |key: &str| value.get(key).and_then(Value::as_str).unwrap_or(""); + Some(SetType { + name: value.get("name")?.as_str()?.into(), + can_open_by_hand: value.get("canOpenByHand")?.as_bool()?, + can_open_by_wind_charge: value.get("canOpenByWindCharge")?.as_bool()?, + arrows: value.get("canButtonBeActivatedByArrows")?.as_bool()?, + mobs_only: value.get("pressurePlateSensitivity")?.as_str()? == "MOBS", + door_open: interned(cache, text("doorOpen")), + door_close: interned(cache, text("doorClose")), + trapdoor_open: interned(cache, text("trapdoorOpen")), + trapdoor_close: interned(cache, text("trapdoorClose")), + plate_on: interned(cache, text("pressurePlateClickOn")), + plate_off: interned(cache, text("pressurePlateClickOff")), + button_on: interned(cache, text("buttonClickOn")), + button_off: interned(cache, text("buttonClickOff")), + }) +} + +/// Build the block-state registry from the resources' `facts.json` (the +/// same source the native client uses). +pub fn load_registry(root: &Path) -> io::Result<BlockRegistry> { + use crate::{DATA_VERSION, nbt::Tag}; + fn tag(value: &Value) -> io::Result<Tag> { + Ok(match value { + Value::String(value) => Tag::String(value.as_str().into()), + Value::Number(value) => Tag::Int( + value + .as_i64() + .and_then(|v| i32::try_from(v).ok()) + .ok_or_else(|| fail("invalid registry number"))?, + ), + Value::Array(values) => Tag::List(values.iter().map(tag).collect::<io::Result<_>>()?), + Value::Object(values) => Tag::Compound( + values + .iter() + .map(|(name, value)| Ok((name.as_str().into(), tag(value)?))) + .collect::<io::Result<_>>()?, + ), + _ => return Err(fail("unsupported registry value")), + }) + } + let facts = read_json(&root.join("facts.json"))?; + let states = facts["states"] + .as_array() + .ok_or_else(|| fail("missing registry state facts"))?; + BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ( + "states", + Tag::List( + states + .iter() + .map(|state| tag(&state[4])) + .collect::<io::Result<_>>()?, + ), + ), + ("defaults", tag(&facts["defaults"])?), + ])) +} + +pub(super) fn load(registry: &BlockRegistry, root: &Path) -> io::Result<Behaviours> { + let mut table = StateTable::new(registry)?; + let props = Props::resolve(&mut table); + let named = Named::resolve(&table)?; + let behaviour = read_json(&root.join("block-behaviours.json"))?; + let gameplay = read_json(&root.join("gameplay-facts.json"))?; + let blocks_json = behaviour["blocks"] + .as_array() + .ok_or_else(|| fail("missing behaviour blocks"))?; + let states_json = behaviour["states"] + .as_array() + .ok_or_else(|| fail("missing behaviour states"))?; + let gameplay_states = gameplay["states"] + .as_array() + .ok_or_else(|| fail("missing gameplay states"))?; + if blocks_json.len() != table.block_count() + || states_json.len() != table.state_count() + || gameplay_states.len() != table.state_count() + { + return Err(fail("behaviour exports do not match the block registry")); + } + // Fluid registry order fixes the fluid tick type IDs. + let fluids: Vec<&str> = behaviour["fluids"] + .as_array() + .ok_or_else(|| fail("missing fluid registry"))? + .iter() + .filter_map(Value::as_str) + .collect(); + if fluids + .iter() + .copied() + .ne(FluidKind::ALL.iter().map(|k| k.name())) + { + return Err(fail("fluid registry order differs from Horizon's")); + } + + // Tags. + let bundle = read_json(&root.join("block-tags.json"))?; + let mut definitions = TagDefinitions::default(); + for (name, text) in bundle + .as_object() + .ok_or_else(|| fail("invalid block tag bundle"))? + { + definitions + .apply_json( + name, + "vanilla", + text.as_str() + .ok_or_else(|| fail("invalid block tag text"))?, + ) + .map_err(|e| invalid(e.to_string()))?; + } + let built = definitions + .build(|name, _| table.block_by_name(name).map(|_| name.to_owned())) + .map_err(|e| invalid(e.to_string()))?; + let mut all_tags = HashMap::new(); + for (name, members) in &built.tags { + let mut set = BlockSet::with_capacity(table.block_count()); + for member in members { + if let Some(block) = table.block_by_name(member) { + set.insert(block); + } + } + all_tags.insert(name.clone(), Arc::new(set)); + } + let tags = Tags::resolve(&all_tags); + let tag = |name: &str| -> Option<Arc<BlockSet>> { + all_tags + .get(name.strip_prefix('#').unwrap_or(name)) + .cloned() + }; + + // Collision shapes. + let collision_tag = nbt::read_named( + &fs::read(root.join("cached-collision.nbt"))?, + Limits::default(), + ) + .map_err(|e| invalid(e.to_string()))? + .0 + .tag; + let cached = CachedCollisionRegistry::from_nbt(&collision_tag, registry)?; + let mut shapes: Vec<VoxelShape> = Vec::new(); + let mut shape_ids = Vec::with_capacity(table.state_count()); + for id in 0..table.state_count() { + let Some(shape) = cached.cached_shape(BlockStateId(id as u32))? else { + shape_ids.push(-1); + continue; + }; + let index = match shapes.iter().position(|s| s.same_identity(shape)) { + Some(index) => index, + None => { + shapes.push(shape.clone()); + shapes.len() - 1 + } + }; + shape_ids.push(index as i32); + } + + let shape_info = shapes + .iter() + .map(analyse_shape) + .collect::<io::Result<Vec<_>>>()?; + + // Fluid tags. + let mut fluid_definitions = TagDefinitions::default(); + let fluid_dir = root.join("data/minecraft/tags/fluid"); + for entry in fs::read_dir(&fluid_dir)? { + let path = entry?.path(); + let Some(stem) = path.file_stem().and_then(|s| s.to_str()) else { + continue; + }; + fluid_definitions + .apply_json( + &format!("minecraft:{stem}"), + "vanilla", + &fs::read_to_string(&path)?, + ) + .map_err(|e| invalid(e.to_string()))?; + } + let fluid_built = fluid_definitions + .build(|name, _| FluidKind::from_name(name).map(|kind| kind as u8)) + .map_err(|e| invalid(e.to_string()))?; + let fluid_mask = |name: &str| -> u8 { + fluid_built + .tags + .get(name) + .into_iter() + .flatten() + .fold(0, |mask, kind| mask | 1 << kind) + }; + let fluid_tags = FluidTags { + water: fluid_mask("minecraft:water"), + lava: fluid_mask("minecraft:lava"), + supports_frogspawn: fluid_mask("minecraft:supports_frogspawn"), + supports_lily_pad: fluid_mask("minecraft:supports_lily_pad"), + supports_sugar_cane_adjacently: fluid_mask("minecraft:supports_sugar_cane_adjacently"), + bubble_column_can_occupy: fluid_mask("minecraft:bubble_column_can_occupy"), + }; + + // Per-state facts. + let mut facts = Vec::with_capacity(table.state_count()); + for (id, (exported, game)) in states_json.iter().zip(gameplay_states).enumerate() { + let row = exported + .as_array() + .ok_or_else(|| fail("invalid behaviour state row"))?; + let int = |i: usize| row.get(i).and_then(Value::as_i64).unwrap_or(0); + let gb = |key: &str| game.get(key).and_then(Value::as_bool).unwrap_or(false); + let mut flags = int(1) as u32 & 0x7f; + for (key, bit) in [ + ("replaceable", state_flags::REPLACEABLE), + ("random_ticks", state_flags::RANDOM_TICKS), + ("solid_render", state_flags::SOLID_RENDER), + ("liquid", state_flags::LIQUID), + ("block_entity", state_flags::BLOCK_ENTITY), + ("ignited_by_lava", state_flags::IGNITED_BY_LAVA), + ("can_occlude", state_flags::CAN_OCCLUDE), + ("full_collision", state_flags::FULL_COLLISION), + ("skylight_down", state_flags::SKYLIGHT_DOWN), + ("requires_tool", state_flags::REQUIRES_TOOL), + ("shape_occlusion", state_flags::SHAPE_OCCLUSION), + ] { + if gb(key) { + flags |= bit; + } + } + let fluid_kind = FluidKind::ALL + .get(int(2) as usize) + .copied() + .ok_or_else(|| fail("invalid exported fluid"))?; + let fluid = FluidState::new( + fluid_kind, + int(3) as u8, + row.get(4).and_then(Value::as_bool).unwrap_or(false), + ); + facts.push(StateFacts { + flags, + sturdy: int(0) as u32, + weak: int(5) as u32, + strong: int(6) as u32, + fluid, + emission: game.get("emission").and_then(Value::as_u64).unwrap_or(0) as u8, + dampening: game.get("dampening").and_then(Value::as_u64).unwrap_or(0) as u8, + hardness: game.get("hardness").and_then(Value::as_f64).unwrap_or(0.0) as f32, + push: match game + .get("push") + .and_then(Value::as_str) + .unwrap_or("PUSH_PULL") + { + "PUSH" => PushReaction::Push, + "POPPED" => PushReaction::Popped, + "IMMOVEABLE" => PushReaction::Immoveable, + "IGNORE_ENTITY" => PushReaction::IgnoreEntity, + _ => PushReaction::PushPull, + }, + instrument: instrument_index(row.get(8).and_then(Value::as_str).unwrap_or("HARP")), + shape: shape_ids[id], + }); + } + + // Per-block data. + let fire = &behaviour["fire"]; + let odds = |key: &str, name: &str| -> i32 { + fire.get(key) + .and_then(|m| m.get(name)) + .and_then(Value::as_i64) + .unwrap_or(0) as i32 + }; + let mut strings = HashMap::new(); + let mut blocks = Vec::with_capacity(table.block_count()); + for (index, json) in blocks_json.iter().enumerate() { + let block = BlockId(index as u16); + let name = json["name"] + .as_str() + .ok_or_else(|| fail("block without name"))?; + if name != &*table.info(block).name { + return Err(fail("behaviour block order differs from registry")); + } + let mut classes = ClassSet::default(); + let mut chain = Vec::new(); + for java in json["class"] + .as_array() + .into_iter() + .flatten() + .filter_map(Value::as_str) + { + if let Some(c) = Class::from_java(java) { + classes.insert(c); + chain.push(c); + } + } + let class = chain.first().copied().unwrap_or(Class::Block); + let mut interfaces = 0; + for java in json["interfaces"] + .as_array() + .into_iter() + .flatten() + .filter_map(Value::as_str) + { + if let Some(i) = Interface::from_java(java) { + interfaces |= i.mask(); + } + } + let fields = &json["fields"]; + let field = |key: &str| fields.get(key); + let block_field = |key: &str| { + field(key) + .and_then(Value::as_str) + .and_then(|n| table.block_by_name(n)) + }; + let wood = field("type").filter(|t| t.get("setType").is_some()); + let set_type = match wood { + Some(wood) => set_type(&wood["setType"], &mut strings), + None => field("type").and_then(|t| set_type(t, &mut strings)), + } + .map(Arc::new); + let text = |value: Option<&Value>, strings: &mut HashMap<String, Arc<str>>| { + value.and_then(Value::as_str).map(|s| interned(strings, s)) + }; + let gate_open = text(wood.and_then(|w| w.get("fenceGateOpen")), &mut strings); + let gate_close = text(wood.and_then(|w| w.get("fenceGateClose")), &mut strings); + let open_sound = text(field("openSound"), &mut strings); + let close_sound = text(field("closeSound"), &mut strings); + let link = [ + "concrete", + "fruit", + "potted", + "deadBlock", + "base", + "candleBlock", + "requiredBlock", + "baseBlock", + ] + .into_iter() + .find_map(block_field) + .or_else(|| { + let state = field("blockToGrowOn")?.get("state")?.as_u64()?; + (state < table.state_count() as u64).then(|| table.block(BlockStateId(state as u32))) + }); + let link2 = ["attachedStem", "stem"].into_iter().find_map(block_field); + let support_tag = ["stemSupportBlocks", "supportBlocks"] + .into_iter() + .find_map(|k| field(k).and_then(Value::as_str)) + .and_then(tag); + let support_tag2 = field("fruitSupportBlocks") + .and_then(Value::as_str) + .and_then(tag); + let feature = field("feature") + .and_then(Value::as_str) + .or_else(|| { + field("treeGrower") + .and_then(|g| g.get("name")) + .and_then(Value::as_str) + }) + .map(|s| interned(&mut strings, s)); + let growth_direction = match field("growthDirection").and_then(Value::as_str) { + Some("DOWN") => Direction::Down, + _ => Direction::Up, + }; + let default = table.default_state(block); + let sound = &gameplay_states[default.0 as usize]["sound"]; + let sound_id = |key: &str, strings: &mut HashMap<String, Arc<str>>| { + interned( + strings, + sound + .get(key) + .and_then(|s| s.get("id")) + .and_then(Value::as_str) + .unwrap_or(""), + ) + }; + let sounds = Arc::new(Sounds { + volume: sound.get("volume").and_then(Value::as_f64).unwrap_or(1.0) as f32, + pitch: sound.get("pitch").and_then(Value::as_f64).unwrap_or(1.0) as f32, + place: sound_id("place", &mut strings), + break_: sound_id("break", &mut strings), + fall: sound_id("fall", &mut strings), + }); + blocks.push(BlockData { + class, + chain, + classes, + interfaces, + set_type, + gate_open, + gate_close, + open_sound, + close_sound, + ticks_to_stay_pressed: field("ticksToStayPressed") + .and_then(Value::as_i64) + .unwrap_or(0) as i32, + max_weight: field("maxWeight").and_then(Value::as_i64).unwrap_or(0) as i32, + link, + link2, + support_tag, + support_tag2, + feature, + grow_probability: field("growPerTickProbability") + .and_then(Value::as_f64) + .unwrap_or(0.0), + growth_direction, + schedule_fluid_ticks: field("scheduleFluidTicks") + .and_then(Value::as_bool) + .unwrap_or(false), + weather: match field("weatherState").and_then(Value::as_str) { + Some("EXPOSED") => 1, + Some("WEATHERED") => 2, + Some("OXIDIZED") => 3, + _ => 0, + }, + ignite_odds: odds("igniteOdds", name), + burn_odds: odds("burnOdds", name), + sounds, + item: interned( + &mut strings, + json["item"].as_str().unwrap_or("minecraft:air"), + ), + dynamic_shape: json["dynamic_shape"].as_bool().unwrap_or(false), + }); + } + + // Item bindings. + let mut items = HashMap::new(); + for (item, binding) in behaviour["items"] + .as_object() + .ok_or_else(|| fail("missing item bindings"))? + { + let fields = &binding["fields"]; + let Some(block) = fields + .get("block") + .and_then(Value::as_str) + .and_then(|n| table.block_by_name(n)) + else { + continue; + }; + let classes: Vec<&str> = binding["class"] + .as_array() + .into_iter() + .flatten() + .filter_map(Value::as_str) + .collect(); + let has = |name: &str| classes.contains(&name); + let kind = if has("HangingSignItem") { + ItemKind::HangingSign + } else if has("StandingAndWallBlockItem") { + ItemKind::StandingAndWall + } else if has("DoubleHighBlockItem") { + ItemKind::DoubleHigh + } else if has("ScaffoldingBlockItem") { + ItemKind::Scaffolding + } else if has("PlaceOnWaterBlockItem") { + ItemKind::PlaceOnWater + } else if has("SolidBucketItem") { + ItemKind::SolidBucket + } else if has("BlockItem") { + ItemKind::Block + } else { + ItemKind::Other + }; + items.insert( + item.clone(), + ItemBinding { + block, + wall_block: fields + .get("wallBlock") + .and_then(Value::as_str) + .and_then(|n| table.block_by_name(n)), + attachment: match fields.get("attachmentDirection").and_then(Value::as_str) { + Some("UP") => Some(Direction::Up), + Some("DOWN") => Some(Direction::Down), + _ => None, + }, + kind, + game_master: has("GameMasterBlockItem"), + }, + ); + } + + let liquid_blocks = FluidBlockBindings::new(registry)?; + let mut dynamic = HashMap::new(); + for (id, fact) in facts.iter().enumerate() { + if fact.shape < 0 { + let state = BlockStateId(id as u32); + if let Some(support) = + crate::dynamic_support::DynamicSupport::from_state(registry.state(state).unwrap())? + { + dynamic.insert(state, support); + } + } + } + Ok(Behaviours { + table, + props, + named, + tags, + all_tags, + facts, + shapes, + shape_info, + fluid_tags, + blocks, + items, + liquid_blocks, + dynamic, + occlusion_cache: Default::default(), + }) +} + +/// `NoteBlockInstrument` serialized names in declaration order. +pub const INSTRUMENTS: [&str; 27] = [ + "harp", + "basedrum", + "snare", + "hat", + "bass", + "flute", + "bell", + "guitar", + "chime", + "xylophone", + "iron_xylophone", + "cow_bell", + "didgeridoo", + "bit", + "banjo", + "pling", + "trumpet", + "trumpet_exposed", + "trumpet_oxidized", + "trumpet_weathered", + "zombie", + "skeleton", + "creeper", + "dragon", + "wither_skeleton", + "piglin", + "custom_head", +]; +/// `NoteBlockInstrument.worksAboveNoteBlock` (mob heads and custom heads). +pub fn instrument_works_above(index: u8) -> bool { + index >= 20 +} +fn instrument_index(name: &str) -> u8 { + INSTRUMENTS + .iter() + .position(|n| n.eq_ignore_ascii_case(name)) + .map_or(0, |i| i as u8) +} diff --git a/crates/horizon-world/src/level/falling.rs b/crates/horizon-world/src/level/falling.rs new file mode 100644 index 000000000..c2b9c9bde --- /dev/null +++ b/crates/horizon-world/src/level/falling.rs @@ -0,0 +1,133 @@ +//! Gravity blocks: `FallingBlock.tick`, `FallingBlockEntity.fall` and the +//! landing branch of `FallingBlockEntity.tick`. The falling entity itself +//! (motion, collision, entity damage) is simulated by the caller. +use super::{Behaviours, LevelAccess, LevelEvent, Sim, Ticks, classes::Class, update::below}; +use crate::registry::BlockStateId; +use horizon_core::{geometry::Direction, position::BlockPos}; + +/// Outcome of [`Behaviours::falling_block_landed`]. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Landing { + /// The block was placed at the position (concrete powder may have + /// solidified); discard the entity. + Placed(BlockStateId), + /// The block could not be placed: discard the entity and, if the entity + /// drops items, spawn the block's item (vanilla `spawnAtLocation`). + Broken, + /// The landing position holds a moving piston: keep falling. + Continue, +} + +impl<L: LevelAccess + ?Sized> Sim<'_, L> { + /// `FallingBlockEntity.fall`. + pub(crate) fn falling_block_fall(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let carried = b + .table + .with_bool(state, b.props.waterlogged, false) + .unwrap_or(state); + let legacy = b.legacy_block(b.fluid(state)); + self.set_block_and_update(pos, legacy); + self.emit(LevelEvent::FallingBlock { + pos, + state: carried, + }); + } + /// `FallingBlock.tick` (and `SpeleothemBlock`'s falling stalactites). + pub(crate) fn falling_block_tick(&mut self, pos: BlockPos, state: BlockStateId) { + if self.is_free(self.below_state(pos)) && pos.y >= self.level.min_y() { + self.falling_block_fall(pos, state); + } + } + /// `SpeleothemBlock.spawnFallingStalactite`. + pub(crate) fn spawn_falling_stalactite(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let p = b.props; + let is_stalactite = |s: BlockStateId| { + b.tag("minecraft:speleothems") + .is_some_and(|tag| b.in_set(s, tag)) + && b.table.dir(s, p.vertical_direction) == Some(Direction::Down) + }; + let mut fall_pos = pos; + let mut fall_state = state; + while is_stalactite(fall_state) { + self.falling_block_fall(fall_pos, fall_state); + let thickness = b.table.text(fall_state, p.thickness); + if thickness == "tip" || thickness == "tip_merge" { + break; + } + fall_pos = below(fall_pos); + fall_state = self.state(fall_pos); + } + } +} + +impl Behaviours { + /// The landing branch of `FallingBlockEntity.tick`, called by the caller's + /// falling-block entity once it is on the ground (or stuck in water as + /// concrete powder). `state` is the carried block state. + pub fn falling_block_landed<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + pos: BlockPos, + state: BlockStateId, + stuck_in_water: bool, + ) -> Landing { + let mut sim = self.sim(level, ticks); + let current = sim.state(pos); + if self.is_block(current, self.named.moving_piston) { + return Landing::Continue; + } + let concrete = self.instance_of(state, Class::ConcretePowder); + // DirectionalPlaceContext(level, pos, DOWN, ItemStack.EMPTY, UP). + let ctx = super::place::Ctx { + pos, + hit_pos: pos, + face: Direction::Up, + hit: horizon_core::geometry::Vec3::new( + f64::from(pos.x) + 0.5, + f64::from(pos.y), + f64::from(pos.z) + 0.5, + ), + inside: false, + yaw: 0.0, + pitch: 90.0, + sneaking: false, + item: String::new(), + replace_clicked: true, + }; + let may_replace = sim.can_be_replaced(current, &ctx); + let would_continue = sim.is_free(sim.below_state(pos)) && (!concrete || !stuck_in_water); + let would_survive = sim.can_survive(state, pos) && !would_continue; + if !(may_replace && would_survive) { + if self.instance_of(state, Class::Anvil) { + sim.level_event(1029, pos, 0); + } + return Landing::Broken; + } + let mut placed = state; + if self.table.has(placed, self.props.waterlogged) + && self.is_water_fluid(sim.fluid_at(pos).kind()) + { + placed = self.table.set_bool(placed, self.props.waterlogged, true); + } + if !sim.set_block_and_update(pos, placed) { + if self.instance_of(state, Class::Anvil) { + sim.level_event(1029, pos, 0); + } + return Landing::Broken; + } + // Fallable.onLand + if concrete { + if self.is_water_fluid(self.fluid(current).kind()) || sim.concrete_touches_liquid(pos) { + if let Some(solid) = self.data(state).link { + sim.set_block_and_update(pos, self.default_of(solid)); + } + } + } else if self.instance_of(state, Class::Anvil) { + sim.level_event(1031, pos, 0); + } + Landing::Placed(sim.state(pos)) + } +} diff --git a/crates/horizon-world/src/level/fluids.rs b/crates/horizon-world/src/level/fluids.rs new file mode 100644 index 000000000..d1017fb34 --- /dev/null +++ b/crates/horizon-world/src/level/fluids.rs @@ -0,0 +1,745 @@ +//! `FlowingFluid` (water and lava) ticking and spreading, `LiquidBlock` +//! interactions, liquid containers (waterlogging) and bucket pickup. +use super::{ + Dimension, LevelAccess, Sim, + classes::{Class, Interface}, + update::{HORIZONTAL, above, below, rel}, +}; +use crate::{ + fluid::{FluidKind, FluidState}, + registry::BlockStateId, +}; +use horizon_core::{ + geometry::{Axis, Direction, ShapeOp, VoxelShape}, + position::BlockPos, + random::RandomSource, +}; +use std::collections::HashMap; + +/// `LiquidBlock.POSSIBLE_FLOW_DIRECTIONS`. +const POSSIBLE_FLOW_DIRECTIONS: [Direction; 5] = [ + Direction::Down, + Direction::South, + Direction::North, + Direction::East, + Direction::West, +]; + +fn is_water(kind: FluidKind) -> bool { + matches!(kind, FluidKind::Water | FluidKind::FlowingWater) +} +fn source_of(kind: FluidKind) -> FluidKind { + if is_water(kind) { + FluidKind::Water + } else { + FluidKind::Lava + } +} +fn flowing_of(kind: FluidKind) -> FluidKind { + if is_water(kind) { + FluidKind::FlowingWater + } else { + FluidKind::FlowingLava + } +} + +/// `FlowingFluid.SpreadContext`: per-spread caches keyed by horizontal offset. +struct SpreadContext { + origin: BlockPos, + states: HashMap<i16, BlockStateId>, + holes: HashMap<i16, bool>, +} +impl SpreadContext { + fn key(&self, pos: BlockPos) -> i16 { + let x = pos.x.wrapping_sub(self.origin.x).wrapping_add(128) & 0xff; + let z = pos.z.wrapping_sub(self.origin.z).wrapping_add(128) & 0xff; + ((x << 8) | z) as i16 + } +} + +impl<L: LevelAccess + ?Sized> Sim<'_, L> { + fn fast_lava(&self) -> bool { + self.level.dimension() == Dimension::Nether + } + /// `Fluid.getTickDelay`. + pub(crate) fn fluid_tick_delay(&self, kind: FluidKind) -> i32 { + match kind { + FluidKind::Empty => 0, + FluidKind::Water | FluidKind::FlowingWater => 5, + _ => { + if self.fast_lava() { + 10 + } else { + 30 + } + } + } + } + fn drop_off(&self, kind: FluidKind) -> i32 { + if is_water(kind) || self.fast_lava() { + 1 + } else { + 2 + } + } + fn slope_find_distance(&self, kind: FluidKind) -> i32 { + if is_water(kind) || self.fast_lava() { + 4 + } else { + 2 + } + } + fn can_convert_to_source(&self, kind: FluidKind) -> bool { + let rules = self.level.game_rules(); + if is_water(kind) { + rules.water_source_conversion + } else { + rules.lava_source_conversion + } + } + fn fluid_height(&self, fluid: FluidState, pos: BlockPos) -> f32 { + if fluid.kind() == FluidKind::Empty { + return 0.0; + } + if fluid.kind().same_family(self.fluid_at(above(pos)).kind()) { + 1.0 + } else { + fluid.own_height() + } + } + /// `FluidState.canBeReplacedWith(level, pos, other, direction)`. + fn can_be_replaced_with( + &self, + fluid: FluidState, + pos: BlockPos, + other: FluidKind, + direction: Direction, + ) -> bool { + match fluid.kind() { + FluidKind::Empty => true, + FluidKind::Water | FluidKind::FlowingWater => { + direction == Direction::Down && !is_water(other) + } + _ => self.fluid_height(fluid, pos) >= 0.444_444_45 && is_water(other), + } + } + + // ---- shape occlusion ---- + + fn collision_or_empty(&self, state: BlockStateId) -> (i32, VoxelShape) { + let index = self.b.facts(state).shape; + match self.b.collision_shape(state) { + Some(shape) => (index, shape.clone()), + None => (-1, VoxelShape::empty()), + } + } + /// `FlowingFluid.canPassThroughWall`. + fn can_pass_through_wall( + &self, + direction: Direction, + source: BlockStateId, + target: BlockStateId, + ) -> bool { + let (target_index, target_shape) = self.collision_or_empty(target); + let block = VoxelShape::block(); + if target_shape.same_identity(&block) { + return false; + } + let (source_index, source_shape) = self.collision_or_empty(source); + if source_shape.same_identity(&block) { + return false; + } + let empty = VoxelShape::empty(); + if source_shape.same_identity(&empty) && target_shape.same_identity(&empty) { + return true; + } + let cacheable = source_index >= 0 && target_index >= 0; + let key = (source_index, target_index, direction as u8); + if cacheable { + if let Some(result) = self + .b + .occlusion_cache + .lock() + .ok() + .and_then(|cache| cache.get(&key).copied()) + { + return result; + } + } + let result = !merged_face_occludes(&source_shape, &target_shape, direction); + if cacheable { + if let Ok(mut cache) = self.b.occlusion_cache.lock() { + cache.insert(key, result); + } + } + result + } + + // ---- liquid containers ---- + + /// `LiquidBlockContainer` membership (`canHoldAnyFluid` first clause). + fn is_liquid_container(&self, state: BlockStateId) -> bool { + self.b.implements(state, Interface::LiquidBlockContainer) + || self.b.implements(state, Interface::SimpleWaterlogged) + } + /// `LiquidBlockContainer.canPlaceLiquid(null, level, pos, state, fluid)`. + pub(crate) fn can_place_liquid(&self, state: BlockStateId, fluid: FluidKind) -> bool { + let b = self.b; + let data = b.data(state); + if data.is(Class::Kelp) + || data.is(Class::KelpPlant) + || data.is(Class::Seagrass) + || data.is(Class::TallSeagrass) + || data.is(Class::Barrier) + { + return false; + } + if data.is(Class::Slab) && b.table.text(state, b.props.kind) == "double" { + return false; + } + fluid == FluidKind::Water + } + /// `LiquidBlockContainer.placeLiquid`. + pub(crate) fn place_liquid( + &mut self, + pos: BlockPos, + state: BlockStateId, + fluid: FluidState, + ) -> bool { + let b = self.b; + if !self.can_place_liquid(state, fluid.kind()) + || fluid.kind() != FluidKind::Water + || !b.table.has(state, b.props.waterlogged) + { + return false; + } + if b.is_waterlogged(state) { + return false; + } + let mut next = b.table.set_bool(state, b.props.waterlogged, true); + let data = b.data(state); + if (data.is(Class::Candle) || data.is(Class::Campfire)) && b.table.bool(state, b.props.lit) + { + next = b.table.set_bool(next, b.props.lit, false); + if data.is(Class::Campfire) { + self.emit(super::LevelEvent::Sound { + pos, + sound: "minecraft:block.generic.extinguish_fire".into(), + volume: 1.0, + pitch: 1.0, + }); + } else { + self.emit(super::LevelEvent::Sound { + pos, + sound: "minecraft:block.candle.extinguish".into(), + volume: 1.0, + pitch: 1.0, + }); + } + } + self.set_block_and_update(pos, next); + let delay = self.fluid_tick_delay(fluid.kind()); + self.schedule_fluid_tick(pos, fluid.kind(), delay); + true + } + /// `BucketPickup.pickupBlock`: true when a fluid was taken. + pub(crate) fn pickup_block(&mut self, pos: BlockPos, state: BlockStateId) -> bool { + let b = self.b; + if b.instance_of(state, Class::Liquid) { + if b.table.int(state, b.props.level) == 0 { + self.set_block(pos, b.air(), 11); + return true; + } + return false; + } + if b.implements(state, Interface::SimpleWaterlogged) + && b.table.has(state, b.props.waterlogged) + { + if b.is_waterlogged(state) { + self.set_block_and_update(pos, b.table.set_bool(state, b.props.waterlogged, false)); + if !self.can_survive(state, pos) { + self.destroy_block(pos, true, 512); + } + return true; + } + return false; + } + if b.is_block(state, b.named.powder_snow) { + self.set_block(pos, b.air(), 11); + return true; + } + false + } + fn can_hold_any_fluid(&self, state: BlockStateId) -> bool { + self.is_liquid_container(state) || self.b.in_set(state, &self.b.tags.washed_away_by_fluids) + } + fn can_hold_specific_fluid(&self, state: BlockStateId, fluid: FluidKind) -> bool { + if self.is_liquid_container(state) { + self.can_place_liquid(state, fluid) + } else { + true + } + } + fn can_hold_fluid(&self, state: BlockStateId, fluid: FluidKind) -> bool { + self.can_hold_any_fluid(state) && self.can_hold_specific_fluid(state, fluid) + } + + // ---- FlowingFluid ---- + + fn is_source_of(&self, kind: FluidKind, fluid: FluidState) -> bool { + fluid.kind().same_family(kind) && fluid.is_source() + } + /// `FlowingFluid.getNewLiquid`. + fn new_liquid(&self, kind: FluidKind, pos: BlockPos, state: BlockStateId) -> FluidState { + let b = self.b; + let mut highest = 0; + let mut sources = 0; + for direction in HORIZONTAL { + let neighbour = self.rel_state(pos, direction); + let fluid = b.fluid(neighbour); + if fluid.kind().same_family(kind) + && self.can_pass_through_wall(direction, state, neighbour) + { + if fluid.is_source() { + sources += 1; + } + highest = highest.max(i32::from(fluid.amount())); + } + } + if sources >= 2 && self.can_convert_to_source(kind) { + let below_state = self.below_state(pos); + if b.is_solid(below_state) || self.is_source_of(kind, b.fluid(below_state)) { + return FluidState::new(source_of(kind), 8, false); + } + } + let above_state = self.above_state(pos); + let above_fluid = b.fluid(above_state); + if above_fluid.kind() != FluidKind::Empty + && above_fluid.kind().same_family(kind) + && self.can_pass_through_wall(Direction::Up, state, above_state) + { + return FluidState::new(flowing_of(kind), 8, true); + } + let amount = highest - self.drop_off(kind); + if amount <= 0 { + FluidState::EMPTY + } else { + FluidState::new(flowing_of(kind), amount as u8, false) + } + } + fn is_water_hole(&self, kind: FluidKind, top: BlockStateId, bottom: BlockStateId) -> bool { + if !self.can_pass_through_wall(Direction::Down, top, bottom) { + return false; + } + if self.b.fluid(bottom).kind().same_family(kind) { + true + } else { + self.can_hold_fluid(bottom, flowing_of(kind)) + } + } + fn can_maybe_pass_through( + &self, + kind: FluidKind, + source: BlockStateId, + direction: Direction, + test: BlockStateId, + test_fluid: FluidState, + ) -> bool { + !self.is_source_of(kind, test_fluid) + && self.can_hold_any_fluid(test) + && self.can_pass_through_wall(direction, source, test) + } + fn can_pass_through( + &self, + kind: FluidKind, + source: BlockStateId, + direction: Direction, + test: BlockStateId, + test_fluid: FluidState, + ) -> bool { + self.can_maybe_pass_through(kind, source, direction, test, test_fluid) + && self.can_hold_specific_fluid(test, flowing_of(kind)) + } + fn context_state(&self, context: &mut SpreadContext, pos: BlockPos) -> BlockStateId { + let key = context.key(pos); + if let Some(state) = context.states.get(&key) { + return *state; + } + let state = self.state(pos); + context.states.insert(key, state); + state + } + fn context_is_hole(&self, kind: FluidKind, context: &mut SpreadContext, pos: BlockPos) -> bool { + let key = context.key(pos); + if let Some(hole) = context.holes.get(&key) { + return *hole; + } + let state = self.context_state(context, pos); + let below_state = self.below_state(pos); + let hole = self.is_water_hole(kind, state, below_state); + context.holes.insert(key, hole); + hole + } + fn slope_distance( + &self, + kind: FluidKind, + pos: BlockPos, + pass: i32, + from: Direction, + state: BlockStateId, + context: &mut SpreadContext, + ) -> i32 { + let mut lowest = 1000; + for direction in HORIZONTAL { + if direction == from { + continue; + } + let test_pos = rel(pos, direction); + let test_state = self.context_state(context, test_pos); + let test_fluid = self.b.fluid(test_state); + if self.can_pass_through(kind, state, direction, test_state, test_fluid) { + if self.context_is_hole(kind, context, test_pos) { + return pass; + } + if pass < self.slope_find_distance(kind) { + let distance = self.slope_distance( + kind, + test_pos, + pass + 1, + direction.opposite(), + test_state, + context, + ); + lowest = lowest.min(distance); + } + } + } + lowest + } + /// `FlowingFluid.getSpread` (EnumMap: iteration in Direction order). + fn spread_targets( + &self, + kind: FluidKind, + pos: BlockPos, + state: BlockStateId, + ) -> Vec<(Direction, FluidState)> { + let mut lowest = 1000; + let mut result: Vec<(Direction, FluidState)> = Vec::new(); + let mut context: Option<SpreadContext> = None; + for direction in HORIZONTAL { + let test_pos = rel(pos, direction); + let test_state = self.state(test_pos); + let test_fluid = self.b.fluid(test_state); + if !self.can_maybe_pass_through(kind, state, direction, test_state, test_fluid) { + continue; + } + let new_fluid = self.new_liquid(kind, test_pos, test_state); + if !self.can_hold_specific_fluid(test_state, new_fluid.kind()) { + continue; + } + let context = context.get_or_insert_with(|| SpreadContext { + origin: pos, + states: HashMap::new(), + holes: HashMap::new(), + }); + let distance = if self.context_is_hole(kind, context, test_pos) { + 0 + } else { + self.slope_distance(kind, test_pos, 1, direction.opposite(), test_state, context) + }; + if distance < lowest { + result.clear(); + } + if distance <= lowest { + if self.can_be_replaced_with(test_fluid, test_pos, new_fluid.kind(), direction) { + result.push((direction, new_fluid)); + } + lowest = distance; + } + } + result.sort_by_key(|(direction, _)| *direction as u8); + result + } + fn source_neighbour_count(&self, kind: FluidKind, pos: BlockPos) -> i32 { + HORIZONTAL + .into_iter() + .filter(|d| self.is_source_of(kind, self.fluid_at(rel(pos, *d)))) + .count() as i32 + } + /// `FlowingFluid.spreadTo` (with LavaFluid's water-to-stone override). + fn spread_to( + &mut self, + kind: FluidKind, + pos: BlockPos, + state: BlockStateId, + direction: Direction, + target: FluidState, + ) { + let b = self.b; + if !is_water(kind) + && direction == Direction::Down + && b.is_water_fluid(self.fluid_at(pos).kind()) + { + if b.instance_of(state, Class::Liquid) { + self.set_block_and_update(pos, b.default_of(b.named.stone)); + } + self.level_event(1501, pos, 0); + return; + } + if self.is_liquid_container(state) { + self.place_liquid(pos, state, target); + } else { + if !b.is_air(state) { + if is_water(kind) { + self.drop_resources(state, pos); + } else { + self.level_event(1501, pos, 0); + } + } + let legacy = b.legacy_block(target); + self.set_block_and_update(pos, legacy); + } + } + fn spread_to_sides( + &mut self, + kind: FluidKind, + pos: BlockPos, + fluid: FluidState, + state: BlockStateId, + ) { + let mut neighbour = i32::from(fluid.amount()) - self.drop_off(kind); + if fluid.falling() { + neighbour = 7; + } + if neighbour > 0 { + for (direction, new_fluid) in self.spread_targets(kind, pos, state) { + let neighbour_pos = rel(pos, direction); + let neighbour_state = self.state(neighbour_pos); + self.spread_to(kind, neighbour_pos, neighbour_state, direction, new_fluid); + } + } + } + /// `FlowingFluid.spread`. + fn spread(&mut self, kind: FluidKind, pos: BlockPos, state: BlockStateId, fluid: FluidState) { + if fluid.kind() == FluidKind::Empty { + return; + } + let below_pos = below(pos); + let below_state = self.state(below_pos); + let below_fluid = self.b.fluid(below_state); + if self.can_maybe_pass_through(kind, state, Direction::Down, below_state, below_fluid) { + let new_below = self.new_liquid(kind, below_pos, below_state); + if self.can_be_replaced_with(below_fluid, below_pos, new_below.kind(), Direction::Down) + && self.can_hold_specific_fluid(below_state, new_below.kind()) + { + self.spread_to(kind, below_pos, below_state, Direction::Down, new_below); + if self.source_neighbour_count(kind, pos) >= 3 { + self.spread_to_sides(kind, pos, fluid, state); + } + return; + } + } + if fluid.is_source() || !self.is_water_hole(kind, state, below_state) { + self.spread_to_sides(kind, pos, fluid, state); + } + } + /// `FlowingFluid.tick` for the fluid at `pos`. + pub(crate) fn fluid_tick(&mut self, pos: BlockPos) { + let mut state = self.state(pos); + let mut fluid = self.b.fluid(state); + let kind = fluid.kind(); + if kind == FluidKind::Empty { + return; + } + if !fluid.is_source() { + let new_fluid = self.new_liquid(kind, pos, state); + let delay = self.spread_delay(kind, pos, fluid, new_fluid); + if new_fluid.kind() == FluidKind::Empty { + fluid = new_fluid; + state = self.b.air(); + self.set_block_and_update(pos, state); + } else if new_fluid != fluid { + fluid = new_fluid; + state = self.b.legacy_block(fluid); + self.set_block_and_update(pos, state); + self.schedule_fluid_tick(pos, fluid.kind(), delay); + } + } + self.spread(kind, pos, state, fluid); + } + fn spread_delay( + &mut self, + kind: FluidKind, + pos: BlockPos, + old: FluidState, + new: FluidState, + ) -> i32 { + let delay = self.fluid_tick_delay(kind); + if is_water(kind) { + return delay; + } + if old.kind() != FluidKind::Empty + && new.kind() != FluidKind::Empty + && !old.falling() + && !new.falling() + && self.fluid_height(new, pos) > self.fluid_height(old, pos) + && self.random().next_int_bound(4).unwrap_or(0) != 0 + { + delay * 4 + } else { + delay + } + } + + // ---- LiquidBlock ---- + + /// `LiquidBlock.shouldSpreadLiquid`, including lava's conversions. + pub(crate) fn should_spread_liquid(&mut self, pos: BlockPos, state: BlockStateId) -> bool { + let b = self.b; + if !b.is_lava_fluid(b.fluid(state).kind()) { + return true; + } + let over_soul_soil = b.is_block(self.below_state(pos), b.named.soul_soil); + for direction in POSSIBLE_FLOW_DIRECTIONS { + let neighbour = rel(pos, direction.opposite()); + if b.is_water_fluid(self.fluid_at(neighbour).kind()) { + let block = if self.fluid_at(pos).is_source() { + b.named.obsidian + } else { + b.named.cobblestone + }; + self.set_block_and_update(pos, b.default_of(block)); + self.level_event(1501, pos, 0); + return false; + } + if over_soul_soil && b.is_block(self.state(neighbour), b.named.blue_ice) { + self.set_block_and_update(pos, b.default_of(b.named.basalt)); + self.level_event(1501, pos, 0); + return false; + } + } + true + } + /// `LiquidBlock.onPlace` / `neighborChanged`. + pub(crate) fn liquid_block_changed(&mut self, pos: BlockPos, state: BlockStateId) { + if self.should_spread_liquid(pos, state) { + let kind = self.b.fluid(state).kind(); + let delay = self.fluid_tick_delay(kind); + self.schedule_fluid_tick(pos, kind, delay); + } + if self.should_bubble_column_occupy(state) { + let below_state = self.below_state(pos); + let block = self.b.block(state); + self.try_schedule_bubble_column(pos, below_state, block); + } + } + + /// `LavaFluid.randomTick`. + pub(crate) fn lava_random_tick(&mut self, pos: BlockPos) { + if !self.level.can_spread_fire_around(pos) { + return; + } + let passes = self.random().next_int_bound(3).unwrap_or(0); + if passes > 0 { + let mut test = pos; + for _ in 0..passes { + let dx = self.random().next_int_bound(3).unwrap_or(0) - 1; + let dz = self.random().next_int_bound(3).unwrap_or(0) - 1; + test = test.offset(dx, 1, dz); + if !self.level.is_loaded(test) { + return; + } + let state = self.state(test); + if self.b.is_air(state) { + if Direction::ALL + .into_iter() + .any(|d| self.lava_flammable(rel(test, d))) + { + let fire = self.fire_state_for(test); + self.set_block_and_update(test, fire); + return; + } + } else if self + .b + .tag("minecraft:blocks_lava_fire_spread") + .is_some_and(|tag| self.b.in_set(state, tag)) + { + return; + } + } + } else { + for _ in 0..3 { + let dx = self.random().next_int_bound(3).unwrap_or(0) - 1; + let dz = self.random().next_int_bound(3).unwrap_or(0) - 1; + let test = pos.offset(dx, 0, dz); + if !self.level.is_loaded(test) { + return; + } + if self.is_empty_block(above(test)) && self.lava_flammable(test) { + let fire = self.fire_state_for(test); + self.set_block_and_update(above(test), fire); + } + } + } + } + fn lava_flammable(&self, pos: BlockPos) -> bool { + if self.is_inside_build_height(pos.y) && !self.level.is_loaded(pos) { + return false; + } + self.b + .has_flag(self.state(pos), super::data::state_flags::IGNITED_BY_LAVA) + } +} + +/// `Shapes.mergedFaceOccludes(shape, occluder, direction)`. +pub(crate) fn merged_face_occludes( + shape: &VoxelShape, + occluder: &VoxelShape, + direction: Direction, +) -> bool { + let block = VoxelShape::block(); + if shape.same_identity(&block) || occluder.same_identity(&block) { + return true; + } + let positive = matches!( + direction, + Direction::Up | Direction::South | Direction::East + ); + let axis = match direction { + Direction::West | Direction::East => Axis::X, + Direction::Down | Direction::Up => Axis::Y, + _ => Axis::Z, + }; + let (first, second) = if positive { + (shape, occluder) + } else { + (occluder, shape) + }; + let max_face = match axis { + Axis::X => Direction::East, + Axis::Y => Direction::Up, + Axis::Z => Direction::South, + }; + let empty = VoxelShape::empty(); + // SliceShape(first, axis, last layer) / SliceShape(second, axis, 0): the face + // shapes sample the same boundary layers when the shapes touch the face. + let first_slice = if !first.is_empty() && (first.max(axis) - 1.0).abs() <= 1.0e-7 { + first.face_shape(max_face).unwrap_or_else(|_| empty.clone()) + } else { + empty.clone() + }; + let second_slice = if !second.is_empty() && second.min(axis).abs() <= 1.0e-7 { + second + .face_shape(max_face.opposite()) + .unwrap_or_else(|_| empty.clone()) + } else { + empty.clone() + }; + let union = match first_slice.join(&second_slice, ShapeOp::OR) { + Ok(shape) => shape, + Err(_) => return false, + }; + !block + .join_is_not_empty(&union, ShapeOp::ONLY_FIRST) + .unwrap_or(true) +} diff --git a/crates/horizon-world/src/level/hooks.rs b/crates/horizon-world/src/level/hooks.rs new file mode 100644 index 000000000..a56e42738 --- /dev/null +++ b/crates/horizon-world/src/level/hooks.rs @@ -0,0 +1,538 @@ +//! `neighborChanged`, `onPlace`, `affectNeighborsAfterRemoval` and +//! `updateIndirectNeighbourShapes` for the overriding vanilla classes. +use super::{ + LevelAccess, Sim, + classes::Class, + states::BlockId, + update::{below, rel}, +}; +use crate::registry::BlockStateId; +use horizon_core::{geometry::Direction, position::BlockPos, random::RandomSource}; + +impl<L: LevelAccess + ?Sized> Sim<'_, L> { + /// `BlockState.handleNeighborChanged`. + pub fn neighbor_changed( + &mut self, + state: BlockStateId, + pos: BlockPos, + changed: BlockId, + moved: bool, + ) { + let b = self.b; + let block = b.block(state); + let chain = &b.data(state).chain; + for &class in chain.iter() { + match class { + Class::AbstractSkull => self.skull_neighbor_changed(pos, state), + Class::BaseRail => self.rail_neighbor_changed(pos, state, changed, moved), + Class::Bell => self.bell_neighbor_changed(pos, state), + Class::BigDripleaf => { + if self.has_neighbor_signal(pos) { + self.big_dripleaf_reset_tilt(pos, state); + } + } + Class::CopperBulb => self.copper_bulb_check(pos, state), + Class::Crafter => self.crafter_neighbor_changed(pos, state), + Class::Diode => self.diode_neighbor_changed(pos, state), + Class::Dispenser => self.dispenser_neighbor_changed(pos, state), + Class::Door => self.door_neighbor_changed(pos, state, changed), + Class::FenceGate => self.gate_neighbor_changed(pos, state), + Class::FrostedIce => { + if b.block_data(changed).is(Class::FrostedIce) + && self.frosted_ice_fewer_neighbours_than(pos, 2) + { + self.frosted_ice_melt(pos, state); + } + } + Class::Hopper => self.hopper_check_powered(pos, state), + Class::Liquid => self.liquid_block_changed(pos, state), + Class::Note => self.note_neighbor_changed(pos, state), + Class::PistonBase => self.piston_check_if_extend(pos, state), + Class::PistonHead => { + if self.piston_head_can_survive(state, pos) { + let base = rel(pos, b.facing(state).opposite()); + self.neighbor_changed_at(base, changed); + } + } + Class::RedstoneLamp => self.lamp_neighbor_changed(pos, state), + Class::RedstoneTorch => self.torch_neighbor_changed(pos, state), + Class::RedstoneWire => { + if self.can_survive(state, pos) { + self.wire_update_power(pos, state); + } else { + self.drop_resources(state, pos); + self.remove_block(pos, false); + } + } + Class::Sponge => self.sponge_try_absorb(pos), + Class::Tnt => self.tnt_check(pos), + Class::TrapDoor => self.trapdoor_neighbor_changed(pos, state), + _ => continue, + } + let _ = block; + return; + } + } + + /// `BlockState.onPlace`. + pub fn on_place(&mut self, state: BlockStateId, pos: BlockPos, old: BlockStateId, moved: bool) { + let b = self.b; + let block = b.block(state); + let same = b.block(old) == block; + let chain = &b.data(state).chain; + for &class in chain.iter() { + match class { + Class::Fire => { + self.base_fire_on_place(pos, state, same); + let delay = 30 + self.random().next_int_bound(10).unwrap_or(0); + self.schedule_tick(pos, block, delay); + } + Class::BaseFire => self.base_fire_on_place(pos, state, same), + Class::DetectorRail | Class::BaseRail => { + if !same { + self.rail_update_state(pos, state, moved); + } + } + Class::Brushable => { + self.schedule_tick(pos, block, 2); + } + Class::Composter => { + if b.table.int(state, b.props.level) == 7 { + self.schedule_tick(pos, block, 20); + } + } + Class::CopperBulb => { + if !same { + self.copper_bulb_check(pos, state); + } + } + Class::CoralFan | Class::CoralPlant | Class::CoralWallFan => { + self.coral_try_schedule_die_tick(state, pos) + } + Class::Diode => self.diode_update_neighbors_in_front(pos, state), + Class::FallingBlock => { + let delay = if b.data(state).is(Class::DragonEgg) { + 5 + } else { + 2 + }; + self.schedule_tick(pos, block, delay); + } + Class::Frogspawn => { + let delay = self.random().next_int_between(3600, 12000).unwrap_or(3600); + self.schedule_tick(pos, block, delay); + } + Class::FrostedIce => { + let delay = self + .random() + .next_int_between_inclusive(60, 120) + .unwrap_or(60); + self.schedule_tick(pos, block, delay); + } + Class::Hopper => { + if !same { + self.hopper_check_powered(pos, state); + } + } + Class::LightningRod => { + if !same + && b.table.bool(state, b.props.powered) + && !self.ticks.has_block_tick(pos, block) + { + self.schedule_tick(pos, block, 8); + } + } + Class::Liquid => self.liquid_block_changed(pos, state), + Class::PistonBase => { + if !same && self.moving_piston(pos).is_none() { + self.piston_check_if_extend(pos, state); + } + } + Class::Observer => { + if !same + && b.table.bool(state, b.props.powered) + && !self.ticks.has_block_tick(pos, block) + { + let next = b.table.set_bool(state, b.props.powered, false); + self.set_block(pos, next, 18); + self.observer_update_in_front(pos, next); + } + } + Class::RedstoneTorch => self.torch_notify_neighbors(pos, state), + Class::RedstoneWire => { + if !same { + self.wire_update_power(pos, state); + for direction in [Direction::Up, Direction::Down] { + self.update_neighbors_at(rel(pos, direction), block); + } + self.wire_update_neighbors_of_neighboring_wires(pos); + } + } + Class::Scaffolding => { + self.schedule_tick(pos, block, 1); + } + Class::SculkSensor => { + if !same + && b.table.int(state, b.props.power) > 0 + && !self.ticks.has_block_tick(pos, block) + { + self.set_block(pos, b.table.set_int(state, b.props.power, 0), 18); + } + } + Class::Sponge => { + if !same { + self.sponge_try_absorb(pos); + } + } + Class::WetSponge => { + if self.level.dimension() == super::Dimension::Nether { + self.set_block_and_update(pos, b.default_of(b.named.sponge)); + self.level_event(2009, pos, 0); + let pitch = (1.0 + self.random().next_float() * 0.2) * 0.7; + self.emit(super::LevelEvent::Sound { + pos, + sound: "minecraft:block.wet_sponge.dries".into(), + volume: 1.0, + pitch, + }); + } + } + Class::Target => { + if !same + && b.table.int(state, b.props.power) > 0 + && !self.ticks.has_block_tick(pos, block) + { + self.set_block(pos, b.table.set_int(state, b.props.power, 0), 18); + } + } + Class::Tnt => { + if !same { + self.tnt_check(pos); + } + } + Class::TripWire => { + if !same { + self.tripwire_update_source(pos, state); + } + } + Class::TurtleEgg => { + if b.in_set(self.below_state(pos), &b.tags.sand) { + self.level_event(2012, pos, 15); + } + } + _ => continue, + } + return; + } + } + + /// `BlockState.affectNeighborsAfterRemoval`. + pub fn affect_neighbors_after_removal( + &mut self, + state: BlockStateId, + pos: BlockPos, + moved: bool, + ) { + let b = self.b; + let block = b.block(state); + let chain = &b.data(state).chain; + for &class in chain.iter() { + match class { + Class::AbstractFurnace + | Class::Barrel + | Class::BrewingStand + | Class::Chest + | Class::ChiseledBookShelf + | Class::Crafter + | Class::CreakingHeart + | Class::DecoratedPot + | Class::Dispenser + | Class::Hopper + | Class::Jukebox + | Class::ShulkerBox + | Class::CopperGolemStatue => self.update_neighbour_for_output_signal(pos, block), + Class::Shelf => self.update_neighbour_for_output_signal(pos, block), + Class::BasePressurePlate => { + if !moved && self.plate_signal_for_state(state) > 0 { + self.plate_update_neighbours(pos, block); + } + } + Class::BaseRail => { + if !moved { + if self.rail_shape(state).starts_with("ascending") { + self.update_neighbors_at(super::update::above(pos), block); + } + if !b.data(state).is(Class::Rail) { + self.update_neighbors_at(pos, block); + self.update_neighbors_at(below(pos), block); + } + } + } + Class::Button | Class::Lever => { + if !moved && b.table.bool(state, b.props.powered) { + self.attached_update_neighbours(pos, state); + } + } + Class::LightningRod => { + if b.table.bool(state, b.props.powered) { + let facing = b.facing(state); + self.update_neighbors_at(rel(pos, facing.opposite()), block); + } + } + Class::PistonHead => { + let base_pos = rel(pos, b.facing(state).opposite()); + let base = self.state(base_pos); + if self.piston_head_fitting_base(state, base) { + self.destroy_block(base_pos, true, super::flags::UPDATE_LIMIT); + } + } + Class::Lectern => { + if b.table.bool(state, b.props.powered) { + self.update_neighbors_at(below(pos), block); + } + } + Class::Diode => { + if !moved { + self.diode_update_neighbors_in_front(pos, state); + } + } + Class::Observer => { + if b.table.bool(state, b.props.powered) && self.ticks.has_block_tick(pos, block) + { + let off = b.table.set_bool(state, b.props.powered, false); + self.observer_update_in_front(pos, off); + } + } + Class::RedstoneTorch => { + if !moved { + self.torch_notify_neighbors(pos, state); + } + } + Class::RedstoneWire => { + if !moved { + for direction in Direction::ALL { + self.update_neighbors_at(rel(pos, direction), block); + } + self.wire_update_power(pos, state); + self.wire_update_neighbors_of_neighboring_wires(pos); + } + } + Class::SculkSensor => { + if b.table.text(state, b.table_phase_key()) == "active" { + self.update_neighbors_at(pos, block); + self.update_neighbors_at(below(pos), block); + } + } + Class::TripWire => { + if !moved { + let powered = b.table.set_bool(state, b.props.powered, true); + self.tripwire_update_source(pos, powered); + } + } + Class::TripWireHook => { + if !moved { + self.tripwire_hook_removed(pos, state); + } + } + _ => continue, + } + return; + } + } + + /// `BlockState.updateIndirectNeighbourShapes` (only redstone wire overrides it). + pub fn update_indirect_neighbour_shapes( + &mut self, + state: BlockStateId, + pos: BlockPos, + flags: i32, + limit: i32, + ) { + if self.b.is_block(state, self.b.named.redstone_wire) { + self.wire_update_indirect(state, pos, flags, limit); + } + } + + /// `ServerPlayerGameMode.destroyBlock`: `playerWillDestroy` then + /// `removeBlock`. Drops are the caller's (tool-dependent loot). + pub(crate) fn player_destroy(&mut self, pos: BlockPos, creative: bool) -> bool { + let b = self.b; + let p = b.props; + let state = self.state(pos); + if b.is_air(state) { + return false; + } + let data = b.data(state); + if creative + && (data.is(Class::DoublePlant) || data.is(Class::Door)) + && b.table.text(state, p.half) == "upper" + { + let bottom = below(pos); + let bottom_state = self.state(bottom); + if b.is_block(bottom_state, b.block(state)) + && b.table.text(bottom_state, p.half) == "lower" + { + let replacement = if b.is_water_fluid(b.fluid(bottom_state).kind()) { + b.default_of(b.named.water) + } else { + b.air() + }; + self.set_block(bottom, replacement, 35); + self.level_event(2001, bottom, bottom_state.0 as i32); + } + } + if creative && data.is(Class::AbstractBed) && b.table.text(state, p.part) == "foot" { + let head_pos = rel(pos, b.facing(state)); + let head = self.state(head_pos); + if b.is_block(head, b.block(state)) && b.table.text(head, p.part) == "head" { + self.set_block(head_pos, b.air(), 35); + self.level_event(2001, head_pos, head.0 as i32); + } + } + self.level_event(2001, pos, state.0 as i32); + self.game_event(pos, "minecraft:block_destroy"); + self.remove_block(pos, false) + } + /// `entityInside` for entity-sensing blocks. + pub(crate) fn entity_inside(&mut self, pos: BlockPos) { + let b = self.b; + let state = self.state(pos); + let data = b.data(state); + if data.is(Class::BasePressurePlate) { + let signal = self.plate_signal_for_state(state); + if signal == 0 { + self.plate_check_pressed(pos, state, signal); + } + } else if data.is(Class::TripWire) + && !b.table.bool(state, b.props.powered) + && !self.ticks.has_block_tick(pos, b.block(state)) + { + self.tripwire_check_pressed(pos); + } + } + + // ---- misc helpers ---- + + /// `BaseFireBlock.onPlace` (portal ignition is not modelled). + fn base_fire_on_place(&mut self, pos: BlockPos, state: BlockStateId, same: bool) { + if !same && !self.can_survive(state, pos) { + self.remove_block(pos, false); + } + } + /// `SpongeBlock.tryAbsorbWater`. + pub(crate) fn sponge_try_absorb(&mut self, start: BlockPos) { + if self.sponge_remove_water(start) { + let b = self.b; + self.set_block(start, b.default_of(b.named.wet_sponge), 2); + self.emit(super::LevelEvent::Sound { + pos: start, + sound: "minecraft:block.sponge.absorb".into(), + volume: 1.0, + pitch: 1.0, + }); + } + } + fn sponge_remove_water(&mut self, start: BlockPos) -> bool { + use std::collections::{HashSet, VecDeque}; + let b = self.b; + let mut queue = VecDeque::from([(start, 0)]); + let mut visited = HashSet::new(); + let mut count = 0; + while let Some((pos, depth)) = queue.pop_front() { + if !visited.insert(pos) { + continue; + } + let accept = if pos == start { + true + } else { + let state = self.state(pos); + if !b.is_water_fluid(self.fluid_at(pos).kind()) { + false + } else if self.pickup_block(pos, state) { + true + } else { + if b.instance_of(state, Class::Liquid) { + self.set_block_and_update(pos, b.air()); + } else { + let n = b.named; + let block = b.block(state); + if block != n.kelp + && block != n.kelp_plant + && block != n.seagrass + && block != n.tall_seagrass + { + continue; + } + self.drop_resources(state, pos); + self.set_block_and_update(pos, b.air()); + } + true + } + }; + if !accept { + continue; + } + count += 1; + if count >= 65 { + return count > 1; + } + if depth < 6 { + for direction in Direction::ALL { + queue.push_back((rel(pos, direction), depth + 1)); + } + } + } + count > 1 + } + fn frosted_ice_fewer_neighbours_than(&self, pos: BlockPos, limit: i32) -> bool { + let mut count = 0; + for direction in Direction::ALL { + if self + .b + .data(self.rel_state(pos, direction)) + .is(Class::FrostedIce) + { + count += 1; + if count >= limit { + return false; + } + } + } + true + } + /// `FrostedIceBlock.melt` → `IceBlock.melt`. + pub(crate) fn frosted_ice_melt(&mut self, pos: BlockPos, _state: BlockStateId) { + self.ice_melt(pos); + } + /// `IceBlock.melt`. + pub(crate) fn ice_melt(&mut self, pos: BlockPos) { + let b = self.b; + if self.level.dimension() == super::Dimension::Nether { + self.remove_block(pos, false); + } else { + let water = b.default_of(b.named.water); + self.set_block_and_update(pos, water); + self.neighbor_changed_at(pos, b.named.water); + } + } + fn big_dripleaf_reset_tilt(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let next = b.table.set_text(state, b.props.tilt, "none"); + self.set_block(pos, next, 2); + if b.table.text(state, b.props.tilt) != "none" { + let pitch = self.random().next_float() * 0.4 + 0.8; + self.emit(super::LevelEvent::Sound { + pos, + sound: "minecraft:block.big_dripleaf.tilt_up".into(), + volume: 1.0, + pitch, + }); + } + } +} + +impl super::Behaviours { + pub(crate) fn table_phase_key(&self) -> super::states::PropKey { + self.props.sculk_sensor_phase + } +} diff --git a/crates/horizon-world/src/level/interact.rs b/crates/horizon-world/src/level/interact.rs new file mode 100644 index 000000000..0c888bb77 --- /dev/null +++ b/crates/horizon-world/src/level/interact.rs @@ -0,0 +1,485 @@ +//! `BlockBehaviour.useWithoutItem` (right-click with an empty hand or an item +//! that does not handle the block itself). +use super::{ + Behaviours, LevelAccess, LevelEvent, Sim, Ticks, classes::Class, query::axis_of, update::below, +}; +use crate::registry::BlockStateId; +use horizon_core::{ + geometry::{Axis, Direction, Vec3}, + position::BlockPos, + random::RandomSource, +}; +use std::sync::Arc; + +/// `InteractionResult` as seen by the server. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum InteractionResult { + Success, + Consume, + Pass, +} +impl InteractionResult { + pub fn consumes_action(self) -> bool { + !matches!(self, Self::Pass) + } +} + +/// The interacting player, as far as block behaviour needs it. +#[derive(Clone, Copy, Debug)] +pub struct PlayerContext { + /// View rotation in degrees. + pub yaw: f32, + pub pitch: f32, + /// `Abilities.mayBuild` (false in adventure mode). + pub may_build: bool, + /// `Player.canEat(false)` (hunger below max, or creative). + pub can_eat: bool, + /// `Player.canUseGameMasterBlocks` (creative operator). + pub game_master: bool, +} + +/// Player-side effects of an interaction, reported through +/// [`LevelEvent::Player`]; block changes are already applied. +#[derive(Clone, Debug, PartialEq)] +pub enum PlayerEffect { + /// Open the block's menu (crafting table, furnace, chest, sign editor, ...). + OpenMenu, + /// `CakeBlock.eat`: the player eats a slice (food 2, saturation 0.1). + EatCake, + /// Give the item to the player (dropping it when the inventory is full). + GiveItem(Arc<str>), + /// Pop the item at the block (composter bone meal). + DropItem(Arc<str>), + /// Evaluate the block-interaction loot table and pop the results. + InteractLoot(&'static str), + /// Try to sleep in the bed whose head is at the event position. + Sleep, + /// Respawn anchor: set the respawn point (or explode outside the Nether). + RespawnAnchor, +} + +impl<L: LevelAccess + ?Sized> Sim<'_, L> { + fn player_effect(&mut self, pos: BlockPos, state: BlockStateId, effect: PlayerEffect) { + self.emit(LevelEvent::Player { pos, state, effect }); + } + + pub(crate) fn use_without_item( + &mut self, + pos: BlockPos, + face: Direction, + hit: Vec3, + player: PlayerContext, + ) -> InteractionResult { + let b = self.b; + let p = b.props; + let table = &b.table; + let state = self.state(pos); + let data = b.data(state); + let block = b.block(state); + use InteractionResult::*; + for &class in data.chain.iter() { + return match class { + Class::Door => { + if !data.set_type.as_ref().is_some_and(|s| s.can_open_by_hand) { + return Pass; + } + let next = table.cycle(state, p.open); + self.set_block(pos, next, 10); + let open = table.bool(next, p.open); + self.door_sound(pos, next, open); + self.game_event( + pos, + if open { + "minecraft:block_open" + } else { + "minecraft:block_close" + }, + ); + Success + } + Class::TrapDoor => { + if !data.set_type.as_ref().is_some_and(|s| s.can_open_by_hand) { + return Pass; + } + let next = table.cycle(state, p.open); + self.set_block(pos, next, 2); + if b.is_waterlogged(next) { + self.schedule_water_tick(pos); + } + self.trapdoor_sound(pos, next, table.bool(next, p.open)); + Success + } + Class::FenceGate => { + let next = if table.bool(state, p.open) { + table.set_bool(state, p.open, false) + } else { + let direction = super::place::from_y_rot(f64::from(player.yaw)); + let mut next = state; + if b.facing(state) == direction.opposite() { + next = table.set_dir(next, p.facing, direction); + } + table.set_bool(next, p.open, true) + }; + self.set_block(pos, next, 10); + let opens = table.bool(next, p.open); + let sound = if opens { + data.gate_open.clone() + } else { + data.gate_close.clone() + }; + let pitch = self.random().next_float() * 0.1 + 0.9; + if let Some(sound) = sound { + self.sound(pos, &sound, 1.0, pitch); + } + self.game_event( + pos, + if opens { + "minecraft:block_open" + } else { + "minecraft:block_close" + }, + ); + Success + } + Class::Button => { + if table.bool(state, p.powered) { + return Consume; + } + self.button_press(pos, state); + Success + } + Class::Lever => { + self.lever_pull(pos, state); + Success + } + Class::Repeater => { + if !player.may_build { + return Pass; + } + self.set_block_and_update(pos, table.cycle(state, p.delay)); + Success + } + Class::Comparator => { + if !player.may_build { + return Pass; + } + let next = table.cycle(state, p.mode); + let pitch = if table.text(next, p.mode) == "subtract" { + 0.55 + } else { + 0.5 + }; + self.emit(LevelEvent::Sound { + pos, + sound: "minecraft:block.comparator.click".into(), + volume: 0.3, + pitch, + }); + self.set_block(pos, next, 2); + if b.is_block(self.state(pos), block) { + self.comparator_refresh(pos, next); + } + Success + } + Class::Note => { + let next = table.cycle(state, p.note); + self.set_block_and_update(pos, next); + self.note_play(pos, next); + Success + } + Class::RedstoneWire => self.wire_use(pos, state, player), + Class::DaylightDetector => { + if !player.may_build { + return Pass; + } + let next = table.cycle(state, p.inverted); + self.set_block(pos, next, 2); + self.game_event(pos, "minecraft:block_change"); + Success + } + Class::Cake => { + if !player.can_eat { + return Pass; + } + self.player_effect(pos, state, PlayerEffect::EatCake); + self.game_event(pos, "minecraft:eat"); + let bites = table.int(state, p.bites); + if bites < 6 { + self.set_block_and_update(pos, table.set_int(state, p.bites, bites + 1)); + } else { + self.remove_block(pos, false); + self.game_event(pos, "minecraft:block_destroy"); + } + Success + } + Class::CandleCake => { + if !player.can_eat { + return Pass; + } + self.player_effect(pos, state, PlayerEffect::EatCake); + self.game_event(pos, "minecraft:eat"); + let cake = b.default_of(b.named.cake); + self.set_block_and_update(pos, table.set_int(cake, p.bites, 1)); + self.drop_resources(state, pos); + Success + } + Class::Composter => { + if table.int(state, p.level) != 8 { + return Pass; + } + self.player_effect( + pos, + state, + PlayerEffect::DropItem("minecraft:bone_meal".into()), + ); + self.set_block_and_update(pos, table.set_int(state, p.level, 0)); + self.game_event(pos, "minecraft:block_change"); + self.emit(LevelEvent::Sound { + pos, + sound: "minecraft:block.composter.empty".into(), + volume: 1.0, + pitch: 1.0, + }); + Success + } + Class::CaveVines | Class::CaveVinesPlant => { + if !table.bool(state, p.berries) { + return Pass; + } + self.player_effect( + pos, + state, + PlayerEffect::InteractLoot("minecraft:harvest/cave_vine"), + ); + let pitch = self.random().next_float() * 0.4 + 0.8; + self.emit(LevelEvent::Sound { + pos, + sound: "minecraft:block.cave_vines.pick_berries".into(), + volume: 1.0, + pitch, + }); + let next = table.set_bool(state, p.berries, false); + self.set_block(pos, next, 2); + self.game_event(pos, "minecraft:block_change"); + Success + } + Class::SweetBerryBush => { + if table.int(state, p.age) <= 1 { + return Pass; + } + self.player_effect( + pos, + state, + PlayerEffect::InteractLoot("minecraft:harvest/sweet_berry_bush"), + ); + let pitch = 0.8 + self.random().next_float() * 0.4; + self.emit(LevelEvent::Sound { + pos, + sound: "minecraft:block.sweet_berry_bush.pick_berries".into(), + volume: 1.0, + pitch, + }); + self.set_block(pos, table.set_int(state, p.age, 1), 2); + self.game_event(pos, "minecraft:block_change"); + Success + } + Class::FlowerPot => { + let Some(potted) = data.link else { + return Consume; + }; + if b.is_air(b.default_of(potted)) { + return Consume; + } + let item = b.block_data(potted).item.clone(); + self.player_effect(pos, state, PlayerEffect::GiveItem(item)); + self.set_block_and_update(pos, b.default_of(b.named.flower_pot)); + self.game_event(pos, "minecraft:block_change"); + Success + } + Class::DragonEgg => { + self.dragon_egg_teleport(pos, state); + Success + } + Class::AbstractBed => { + let part = table.text(state, p.part).to_owned(); + let facing = b.facing(state); + let other_dir = if part == "foot" { + facing + } else { + facing.opposite() + }; + let other = self.state(super::update::rel(pos, other_dir)); + if b.is_block(other, block) && table.text(other, p.part) != part { + let head = if part == "head" { + pos + } else { + super::update::rel(pos, facing) + }; + let head_state = self.state(head); + self.player_effect(head, head_state, PlayerEffect::Sleep); + Success + } else { + Consume + } + } + Class::RespawnAnchor => { + if table.int(state, p.charges) == 0 { + return Pass; + } + self.player_effect(pos, state, PlayerEffect::RespawnAnchor); + Success + } + Class::Light => { + if player.game_master { + self.set_block(pos, table.cycle(state, p.level), 2); + Success + } else { + Consume + } + } + Class::Bell => { + let click_y = hit.y - f64::from(pos.y); + let proper = axis_of(face) != Axis::Y && click_y <= 0.8124 && { + let facing_axis = axis_of(b.facing(state)); + match table.text(state, p.attachment) { + "floor" => facing_axis == axis_of(face), + "single_wall" | "double_wall" => facing_axis != axis_of(face), + "ceiling" => true, + _ => false, + } + }; + if proper { + self.emit(LevelEvent::Sound { + pos, + sound: "minecraft:block.bell.use".into(), + volume: 2.0, + pitch: 1.0, + }); + self.game_event(pos, "minecraft:block_change"); + Success + } else { + Pass + } + } + Class::AbstractFurnace + | Class::Anvil + | Class::Barrel + | Class::Beacon + | Class::BrewingStand + | Class::CartographyTable + | Class::Chest + | Class::Crafter + | Class::CraftingTable + | Class::Dispenser + | Class::EnchantingTable + | Class::EnderChest + | Class::Grindstone + | Class::Hopper + | Class::Loom + | Class::ShulkerBox + | Class::Sign + | Class::SmithingTable + | Class::Stonecutter + | Class::Lectern => { + self.player_effect(pos, state, PlayerEffect::OpenMenu); + Success + } + Class::Command | Class::Structure | Class::Jigsaw => { + if player.game_master { + self.player_effect(pos, state, PlayerEffect::OpenMenu); + Success + } else { + Pass + } + } + _ => continue, + }; + } + let _ = below; + Pass + } + + /// `RedstoneWireBlock.useWithoutItem`: toggle between dot and cross. + fn wire_use( + &mut self, + pos: BlockPos, + state: BlockStateId, + player: PlayerContext, + ) -> InteractionResult { + let b = self.b; + if !player.may_build { + return InteractionResult::Pass; + } + let connected = |s: BlockStateId, d: Direction| b.table.text(s, b.dir_prop(d)) != "none"; + let horizontal = super::update::HORIZONTAL; + let cross = horizontal.into_iter().all(|d| connected(state, d)); + let dot = !horizontal.into_iter().any(|d| connected(state, d)); + if !(cross || dot) { + return InteractionResult::Pass; + } + let power = b.table.int(state, b.props.power); + let base = if cross { + b.table + .set_int(b.default_of(b.named.redstone_wire), b.props.power, power) + } else { + self.wire_cross_state(power) + }; + let next = self.wire_connection_state(base, pos); + if next == state { + return InteractionResult::Pass; + } + self.set_block_and_update(pos, next); + for direction in horizontal { + let relative = super::update::rel(pos, direction); + if connected(state, direction) != connected(next, direction) + && self.is_redstone_conductor(self.state(relative), relative) + { + let block = b.block(next); + self.update_neighbors_at_except(relative, block, direction.opposite()); + } + } + InteractionResult::Success + } + + /// `DragonEggBlock.teleport`. + fn dragon_egg_teleport(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + for _ in 0..1000 { + let dx = self.random().next_int_bound(16).unwrap_or(0) + - self.random().next_int_bound(16).unwrap_or(0); + let dy = self.random().next_int_bound(8).unwrap_or(0) + - self.random().next_int_bound(8).unwrap_or(0); + let dz = self.random().next_int_bound(16).unwrap_or(0) + - self.random().next_int_bound(16).unwrap_or(0); + let test = pos.offset(dx, dy, dz); + if b.is_air(self.state(test)) + && !b.is_air(self.below_state(test)) + && self.is_inside_build_height(test.y) + { + // BlockUtil.packDifferenceInPosition(pos, test, 16, 8, 16) + let packed = ((dx + 16) << 16) | ((dy + 8) << 8) | (dz + 16); + self.level_event(2015, pos, packed); + self.set_block(test, state, 2); + self.remove_block(pos, false); + return; + } + } + } +} + +impl Behaviours { + /// `BlockState.useWithoutItem` for a right-click on `pos` (hit face and + /// absolute hit location as in `BlockHitResult`). + pub fn use_without_item<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + pos: BlockPos, + face: Direction, + hit: Vec3, + player: PlayerContext, + ) -> InteractionResult { + self.sim(level, ticks) + .use_without_item(pos, face, hit, player) + } +} diff --git a/crates/horizon-world/src/level/mod.rs b/crates/horizon-world/src/level/mod.rs new file mode 100644 index 000000000..ee7dca6b9 --- /dev/null +++ b/crates/horizon-world/src/level/mod.rs @@ -0,0 +1,591 @@ +//! Server-side vanilla block behaviour: `Level.setBlock` with neighbour and +//! shape-update propagation, scheduled block/fluid ticks, random ticks, +//! placement (`getStateForPlacement`) and interaction (`useWithoutItem`). +//! +//! The library is client-agnostic. A game owns its chunk storage and exposes +//! it through [`LevelAccess`]; it also owns one [`Ticks`] per level (scheduled +//! tick queues, the in-flight neighbour-update queue and the random-tick LCG). +//! [`Behaviours`] holds immutable tables loaded once from the pinned client +//! resources (`block-behaviours.json`, `gameplay-facts.json`, +//! `block-tags.json`, `cached-collision.nbt`; see +//! `tools/prepare_native_client.py`). +//! +//! # Driving a level +//! +//! Per server tick, in vanilla order (`ServerLevel.tick`): +//! 1. [`Behaviours::tick_scheduled`] runs due block ticks then fluid ticks +//! (`blockTicks.tick(time, 65536, ...)`, then `fluidTicks`). +//! 2. For every ticking chunk, [`Behaviours::tick_chunk_random`] performs +//! `ServerLevel.tickChunk`'s random ticks: for each non-empty section, +//! `randomTickSpeed` (game rule, default 3) positions are drawn with +//! `Level.getBlockRandomPos` and randomly-ticking block and fluid states are +//! ticked. The caller decides which sections are randomly ticking (vanilla +//! counts randomly-ticking states per section); [`Behaviours::random_tick`] +//! ticks a single position. +//! 3. [`Behaviours::run_block_events`] runs queued block events (pistons), +//! then (after entities) [`Behaviours::tick_block_entities`] advances +//! moving pistons ([`Ticks::moving_pistons`]). +//! 4. Player actions call [`Behaviours::place_block`] / +//! [`Behaviours::use_without_item`] / [`Behaviours::destroy_block`]. +//! +//! Every block mutation goes through [`Behaviours::set_block`] with vanilla's +//! update flags ([`flags`]). The library writes storage only through +//! [`LevelAccess::set_raw`]; the caller updates heightmaps, light, block +//! entities and render meshes for the written position. +//! +//! Side effects the library cannot perform (sounds, particles, item drops, +//! spawning falling-block or TNT entities, growing trees) are reported as +//! [`LevelEvent`]s through [`LevelAccess::emit`], in vanilla call order. +//! +//! Randomness is drawn from [`LevelAccess::random`] (vanilla `level.random`, a +//! `LegacyRandomSource`) in the same order as vanilla. +//! +//! # Integration sketch +//! +//! ```ignore +//! use horizon_world::level::{self, Behaviours, LevelAccess, LevelEvent, PlaceContext, Ticks, flags}; +//! +//! struct GameLevel { chunks: Chunks, random: LegacyRandom, time: i64, events: Vec<LevelEvent> } +//! impl LevelAccess for GameLevel { +//! fn block_state(&self, pos: BlockPos) -> BlockStateId { self.chunks.get(pos) } +//! fn set_raw(&mut self, pos: BlockPos, state: BlockStateId) -> Option<BlockStateId> { +//! let old = self.chunks.set(pos, state)?; // also mark light/heightmap/mesh dirty +//! Some(old) +//! } +//! fn is_loaded(&self, pos: BlockPos) -> bool { self.chunks.contains(pos.chunk()) } +//! fn random(&mut self) -> &mut LegacyRandom { &mut self.random } +//! fn game_time(&self) -> i64 { self.time } +//! fn block_light(&self, pos: BlockPos) -> i32 { self.chunks.block_light(pos) } +//! fn sky_light(&self, pos: BlockPos) -> i32 { self.chunks.sky_light(pos) } +//! fn emit(&mut self, event: LevelEvent) { self.events.push(event) } +//! } +//! +//! let registry = level::data::load_registry(&resources)?; +//! let behaviours = Behaviours::load(®istry, &resources)?; +//! let mut ticks = Ticks::new(seed as i32); +//! ticks.add_empty_chunk(chunk_pos)?; // when a chunk loads (remove_chunk on unload) +//! +//! // Every server tick: +//! level.time += 1; +//! behaviours.tick_scheduled(&mut level, &mut ticks); +//! for chunk in ticking_chunks { +//! behaviours.tick_chunk_random(&mut level, &mut ticks, chunk, randomly_ticking_section_min_ys(chunk)); +//! } +//! behaviours.run_block_events(&mut level, &mut ticks); +//! /* tick entities */ +//! behaviours.tick_block_entities(&mut level, &mut ticks); +//! for event in level.events.drain(..) { /* play sounds, spawn drops/falling blocks, grow trees */ } +//! +//! // Player actions: +//! behaviours.place_block(&mut level, &mut ticks, &PlaceContext { clicked_pos, face, hit, inside: false, +//! yaw, pitch, sneaking, item: "minecraft:oak_stairs".into(), can_use_game_master_blocks: false }); +//! behaviours.use_without_item(&mut level, &mut ticks, pos, face, hit, player_context); +//! behaviours.player_destroy_block(&mut level, &mut ticks, pos, creative); +//! // Falling-block entity landed: +//! behaviours.falling_block_landed(&mut level, &mut ticks, landing_pos, carried_state, false); +//! ``` +use crate::{ + fluid::{FluidBlockBindings, FluidKind, FluidState}, + registry::{BlockRegistry, BlockStateId}, +}; +use horizon_core::{ + geometry::{Aabb, Direction, VoxelShape}, + position::{BlockPos, ChunkPos}, + random::LegacyRandom, +}; +use std::{collections::HashMap, io, path::Path, sync::Arc, sync::Mutex}; + +pub mod classes; +pub mod data; +pub mod states; +pub mod ticks; + +mod falling; +mod fluids; +mod hooks; +mod interact; +pub mod pistons; +mod place; +mod query; +mod rails; +mod redstone; +mod shapes; +mod speleothem; +mod survive; +mod tick; +mod update; + +#[cfg(test)] +mod tests; + +pub use data::{BlockData, ItemBinding, ItemKind, Named, Props, PushReaction, StateFacts, Tags}; +pub use falling::Landing; +pub use interact::{InteractionResult, PlayerContext, PlayerEffect}; +pub use pistons::{BlockEventData, MovingPiston}; +pub use place::{PlaceContext, PlaceOutcome}; +pub use states::{BlockId, PropKey, StateTable}; +pub use tick::{Precipitation, PrecipitationKind}; +pub use ticks::Ticks; + +/// `Block.UPDATE_*` flags accepted by [`Behaviours::set_block`]. +pub mod flags { + pub const UPDATE_NEIGHBORS: i32 = 1; + pub const UPDATE_CLIENTS: i32 = 2; + pub const UPDATE_INVISIBLE: i32 = 4; + pub const UPDATE_IMMEDIATE: i32 = 8; + pub const UPDATE_KNOWN_SHAPE: i32 = 16; + pub const UPDATE_SUPPRESS_DROPS: i32 = 32; + pub const UPDATE_MOVE_BY_PISTON: i32 = 64; + pub const UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE: i32 = 128; + pub const UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS: i32 = 256; + pub const UPDATE_SKIP_ON_PLACE: i32 = 512; + pub const UPDATE_NONE: i32 = 260; + pub const UPDATE_ALL: i32 = 3; + pub const UPDATE_ALL_IMMEDIATE: i32 = 11; + pub const UPDATE_SKIP_ALL_SIDEEFFECTS: i32 = 816; + /// `Block.UPDATE_LIMIT`, the recursion budget of shape updates. + pub const UPDATE_LIMIT: i32 = 512; +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Dimension { + Overworld, + Nether, + End, +} + +/// Game rules consulted by block behaviour (vanilla defaults). +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct GameRules { + pub water_source_conversion: bool, + pub lava_source_conversion: bool, + pub random_tick_speed: i32, + pub block_drops: bool, + pub mob_griefing: bool, + pub max_snow_accumulation_height: i32, +} +impl Default for GameRules { + fn default() -> Self { + Self { + water_source_conversion: true, + lava_source_conversion: false, + random_tick_speed: 3, + block_drops: true, + mob_griefing: true, + max_snow_accumulation_height: 1, + } + } +} + +/// Entity filters for the entity-sensing blocks (pressure plates, tripwire). +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum EntityQuery { + /// Any entity that does not ignore block triggers (wooden plates, tripwire). + Everything, + /// Living entities only (stone plates). + Mobs, +} + +/// Side effects reported to the caller, in vanilla call order. +#[derive(Clone, Debug, PartialEq)] +pub enum LevelEvent { + /// `Level.levelEvent(type, pos, data)`, using vanilla's numeric event IDs + /// (e.g. 2001 block destroyed with `data` = state ID, 1501 lava + /// extinguished, 1009 fire extinguished, 1502 redstone torch burnout, + /// 2009 dripping water/sponge, 1033/1034 ... per `LevelEvent.java`). + LevelEvent { id: i32, pos: BlockPos, data: i32 }, + /// `Level.playSound(null, pos, sound, BLOCKS, volume, pitch)`. + Sound { + pos: BlockPos, + sound: Arc<str>, + volume: f32, + pitch: f32, + }, + /// `Block.dropResources(state, level, pos)`: the caller evaluates the + /// block's loot table (no tool, no breaker) and pops the items. + DropResources { pos: BlockPos, state: BlockStateId }, + /// `FallingBlockEntity.fall`: the block at `pos` was already replaced by its + /// fluid's legacy block; the caller spawns and simulates a falling-block + /// entity carrying `state` and calls [`Behaviours::falling_block_landed`] + /// (or drops the item) when it lands. + FallingBlock { pos: BlockPos, state: BlockStateId }, + /// A sapling reached stage 1 and tried to grow (`TreeGrower.growTree`). + /// The caller runs the grower's configured feature and, on success, + /// replaces the sapling (vanilla leaves the sapling on failure). + GrowTree { + pos: BlockPos, + state: BlockStateId, + grower: Arc<str>, + }, + /// A configured feature placement request from a bonemealed or random-ticked + /// block (huge mushrooms, fungi). The block was already removed when vanilla + /// does so before placing; on failure the caller restores `state`. + PlaceFeature { + pos: BlockPos, + state: BlockStateId, + feature: Arc<str>, + }, + /// `TntBlock.prime`: the TNT block is removed; spawn primed TNT. + PrimeTnt { pos: BlockPos }, + /// Block-entity or entity side effects the caller implements: `"dispense"` + /// (dispenser/dropper/crafter scheduled tick), `"hatch"` (frogspawn + /// hatched into tadpoles; the block is already destroyed). + BlockEvent { + pos: BlockPos, + state: BlockStateId, + kind: &'static str, + }, + /// A player-side effect of [`Behaviours::use_without_item`]. + Player { + pos: BlockPos, + state: BlockStateId, + effect: PlayerEffect, + }, + /// `Level.gameEvent` (vibration system), by vanilla identifier. + GameEvent { pos: BlockPos, event: &'static str }, +} + +/// The world as seen by block behaviour. Implemented by the game and tests. +pub trait LevelAccess { + /// `getBlockState`. Unloaded or out-of-bounds positions read as air. + fn block_state(&self, pos: BlockPos) -> BlockStateId; + /// Storage write (`LevelChunkSection.setBlockState`). Returns the previous + /// state, or None when nothing could be stored (unloaded chunk). + fn set_raw(&mut self, pos: BlockPos, state: BlockStateId) -> Option<BlockStateId>; + fn is_loaded(&self, pos: BlockPos) -> bool; + /// Inclusive minimum and exclusive maximum build height. + fn min_y(&self) -> i32 { + -64 + } + fn max_y(&self) -> i32 { + 320 + } + /// Vanilla `level.random` (a `LegacyRandomSource`). + fn random(&mut self) -> &mut LegacyRandom; + fn game_time(&self) -> i64; + fn block_light(&self, _pos: BlockPos) -> i32 { + 0 + } + fn sky_light(&self, _pos: BlockPos) -> i32 { + 15 + } + /// `Level.getSkyDarken` (0 at noon, up to 11 at night). + fn sky_darken(&self) -> i32 { + 0 + } + fn is_raining(&self) -> bool { + false + } + fn is_thundering(&self) -> bool { + false + } + fn is_raining_at(&self, _pos: BlockPos) -> bool { + false + } + fn dimension(&self) -> Dimension { + Dimension::Overworld + } + fn game_rules(&self) -> GameRules { + GameRules::default() + } + /// `Difficulty.getId()` (peaceful 0 .. hard 3). + fn difficulty(&self) -> i32 { + 2 + } + /// `ServerLevel.canSpreadFireAround` (fire-spread radius around players). + fn can_spread_fire_around(&self, _pos: BlockPos) -> bool { + true + } + /// `Level.isUnobstructed(state, pos, context)`: whether the state's + /// collision shape at `pos` would intersect an entity. + fn is_unobstructed(&self, _pos: BlockPos, _state: BlockStateId) -> bool { + true + } + /// Comparator input from a block entity (`getAnalogOutputSignal` of + /// containers, jukeboxes, lecterns, ...). State-only sources (cake, + /// composter, cauldrons, beehives, ...) are evaluated by the library. + fn block_entity_analog_signal( + &self, + _pos: BlockPos, + _state: BlockStateId, + _direction: Direction, + ) -> i32 { + 0 + } + /// Weak/strong signal of a block-entity-driven source (trapped chest + /// openers); other sources are evaluated by the library. + fn block_entity_signal( + &self, + _pos: BlockPos, + _state: BlockStateId, + _direction: Direction, + ) -> i32 { + 0 + } + /// Biome answers for a precipitation tick at the column of `pos` (see + /// [`Precipitation`]); None skips snow/ice formation and cauldron filling. + fn precipitation(&self, _pos: BlockPos) -> Option<Precipitation> { + None + } + /// Count of entities intersecting `area` that trigger pressure plates or + /// tripwires under `query`. + fn count_entities(&self, _area: Aabb, _query: EntityQuery) -> usize { + 0 + } + /// `ServerLevel.isPositionTickingWithEntitiesLoaded` for scheduled ticks. + fn is_ticking_chunk(&self, _chunk: ChunkPos) -> bool { + true + } + fn emit(&mut self, _event: LevelEvent) {} +} + +/// Raw brightness as `Level.getRawBrightness(pos, skyDarken)`. +pub fn raw_brightness<L: LevelAccess + ?Sized>(level: &L, pos: BlockPos, sky_darken: i32) -> i32 { + (level.sky_light(pos) - sky_darken).max(level.block_light(pos)) +} + +/// Immutable vanilla block-behaviour tables. Build once with [`Behaviours::load`]. +pub struct Behaviours { + pub table: StateTable, + pub props: Props, + pub named: Named, + pub tags: Tags, + all_tags: HashMap<String, Arc<data::BlockSet>>, + facts: Vec<StateFacts>, + shapes: Vec<VoxelShape>, + shape_info: Vec<data::ShapeInfo>, + pub fluid_tags: data::FluidTags, + blocks: Vec<BlockData>, + items: HashMap<String, ItemBinding>, + liquid_blocks: FluidBlockBindings, + /// Uncached (position- or block-entity-dependent) collision shapes. + dynamic: HashMap<BlockStateId, crate::dynamic_support::DynamicSupport>, + occlusion_cache: Mutex<HashMap<(i32, i32, u8), bool>>, +} + +impl Behaviours { + /// Load from a prepared client resource directory (`.local/horizon-client/<version>`). + pub fn load(registry: &BlockRegistry, resources_dir: &Path) -> io::Result<Self> { + data::load(registry, resources_dir) + } + pub fn facts(&self, state: BlockStateId) -> &StateFacts { + &self.facts[state.0 as usize] + } + pub fn block_data(&self, block: BlockId) -> &BlockData { + &self.blocks[block.0 as usize] + } + pub fn data(&self, state: BlockStateId) -> &BlockData { + self.block_data(self.table.block(state)) + } + pub fn block(&self, state: BlockStateId) -> BlockId { + self.table.block(state) + } + pub fn item_binding(&self, item: &str) -> Option<&ItemBinding> { + self.items.get(item) + } + pub fn tag(&self, name: &str) -> Option<&data::BlockSet> { + self.all_tags.get(name).map(|s| &**s) + } + pub fn fluid(&self, state: BlockStateId) -> FluidState { + self.facts(state).fluid + } + /// `FluidState.createLegacyBlock`. + pub fn legacy_block(&self, fluid: FluidState) -> BlockStateId { + self.liquid_blocks.block(fluid) + } + /// Cached collision shape (`getCollisionShape(level, pos)` for states whose + /// shape does not depend on the world); None for dynamic shapes. + pub fn collision_shape(&self, state: BlockStateId) -> Option<&VoxelShape> { + let index = self.facts(state).shape; + (index >= 0).then(|| &self.shapes[index as usize]) + } + /// Precomputed shape queries; dynamic shapes read as empty. + pub fn shape_info(&self, state: BlockStateId) -> data::ShapeInfo { + let index = self.facts(state).shape; + if index < 0 { + data::ShapeInfo::default() + } else { + self.shape_info[index as usize] + } + } + pub(crate) fn has_flag(&self, state: BlockStateId, flag: u32) -> bool { + self.facts(state).flags & flag != 0 + } + pub fn is_air(&self, state: BlockStateId) -> bool { + self.has_flag(state, data::state_flags::AIR) + } + pub fn is_solid(&self, state: BlockStateId) -> bool { + self.has_flag(state, data::state_flags::SOLID) + } + pub fn is_replaceable(&self, state: BlockStateId) -> bool { + self.has_flag(state, data::state_flags::REPLACEABLE) + } + pub fn is_randomly_ticking(&self, state: BlockStateId) -> bool { + self.has_flag(state, data::state_flags::RANDOM_TICKS) + } + /// `isFaceSturdy(level, pos, direction, FULL)` from the empty-level cache. + pub fn is_face_sturdy(&self, state: BlockStateId, direction: Direction) -> bool { + self.facts(state).sturdy & (1 << direction as u32) != 0 + } + pub fn is_face_sturdy_center(&self, state: BlockStateId, direction: Direction) -> bool { + self.facts(state).sturdy & (1 << (6 + direction as u32)) != 0 + } + pub fn is_face_sturdy_rigid(&self, state: BlockStateId, direction: Direction) -> bool { + self.facts(state).sturdy & (1 << (12 + direction as u32)) != 0 + } + /// Tick type ID of a fluid for [`Ticks::schedule_fluid`]. + pub fn fluid_kind(&self, state: BlockStateId) -> FluidKind { + self.fluid(state).kind() + } +} + +/// Level mutation entry points (all keep vanilla update semantics). +impl Behaviours { + /// `Level.setBlock(pos, state, flags)` with vanilla's update limit (512). + /// Returns false when nothing was written (unloaded, out of bounds, or + /// the state was already present). + pub fn set_block<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + pos: BlockPos, + state: BlockStateId, + flags: i32, + ) -> bool { + self.sim(level, ticks).set_block(pos, state, flags) + } + /// `Level.removeBlock(pos, movedByPiston)`: replace with the fluid's block. + pub fn remove_block<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + pos: BlockPos, + moved_by_piston: bool, + ) -> bool { + self.sim(level, ticks).remove_block(pos, moved_by_piston) + } + /// `Level.destroyBlock(pos, dropResources)`: destroy particles (2001), + /// optional drops, and replacement by the block's fluid. + pub fn destroy_block<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + pos: BlockPos, + drop: bool, + ) -> bool { + self.sim(level, ticks) + .destroy_block(pos, drop, flags::UPDATE_LIMIT) + } + /// A player breaking a block (`playerWillDestroy` + `Level.destroyBlock` + /// without drops; the caller handles the player's loot/tool). Double + /// blocks (doors, tall plants, beds) remove their other half as vanilla. + pub fn player_destroy_block<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + pos: BlockPos, + creative: bool, + ) -> bool { + self.sim(level, ticks).player_destroy(pos, creative) + } + /// `BlockState.canSurvive(level, pos)`. + pub fn can_survive<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + pos: BlockPos, + state: BlockStateId, + ) -> bool { + self.sim(level, ticks).can_survive(state, pos) + } + /// `BlockState.updateShape(level, ticks, pos, direction, neighbourPos, + /// neighbourState, random)`: the state `state` at `pos` would take after its + /// neighbour in `direction` became `neighbour` (ticks it requests are queued). + #[allow(clippy::too_many_arguments)] + pub fn update_shape<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + state: BlockStateId, + pos: BlockPos, + direction: Direction, + neighbour_pos: BlockPos, + neighbour: BlockStateId, + ) -> BlockStateId { + self.sim(level, ticks) + .update_shape(state, pos, direction, neighbour_pos, neighbour) + } + /// `Block.updateFromNeighbourShapes`: a state adjusted to its neighbours. + pub fn update_from_neighbour_shapes<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + pos: BlockPos, + state: BlockStateId, + ) -> BlockStateId { + self.sim(level, ticks) + .update_from_neighbour_shapes(state, pos) + } + /// `Level.updateNeighborsAt(pos, block)`: notify the six neighbours. + pub fn update_neighbors_at<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + pos: BlockPos, + block: BlockId, + ) { + self.sim(level, ticks).update_neighbors_at(pos, block); + } + /// Entity collision with a block (`entityInside`) for the entity-sensing + /// blocks: pressure plates, tripwires and buttons hit by arrows are + /// re-evaluated through [`LevelAccess::count_entities`]. + pub fn entity_inside<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + pos: BlockPos, + ) { + self.sim(level, ticks).entity_inside(pos); + } + /// Redstone signal queries (`SignalGetter`). + pub fn has_neighbor_signal<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + pos: BlockPos, + ) -> bool { + self.sim(level, ticks).has_neighbor_signal(pos) + } + pub fn best_neighbor_signal<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + pos: BlockPos, + ) -> i32 { + self.sim(level, ticks).best_neighbor_signal(pos) + } +} + +/// One mutable view used by the ported behaviour code. +pub(crate) struct Sim<'a, L: LevelAccess + ?Sized> { + pub b: &'a Behaviours, + pub level: &'a mut L, + pub ticks: &'a mut Ticks, + /// `RedstoneWireBlock.shouldSignal` is false while a wire samples its + /// neighbours (`getBlockSignal`). + pub wire_signal_off: std::cell::Cell<bool>, +} +impl Behaviours { + pub(crate) fn sim<'a, L: LevelAccess + ?Sized>( + &'a self, + level: &'a mut L, + ticks: &'a mut Ticks, + ) -> Sim<'a, L> { + Sim { + b: self, + level, + ticks, + wire_signal_off: std::cell::Cell::new(false), + } + } +} diff --git a/crates/horizon-world/src/level/pistons.rs b/crates/horizon-world/src/level/pistons.rs new file mode 100644 index 000000000..0beb512c8 --- /dev/null +++ b/crates/horizon-world/src/level/pistons.rs @@ -0,0 +1,761 @@ +//! Pistons: `PistonBaseBlock` (signal checks, block events, `moveBlocks`), +//! `PistonStructureResolver`, `PistonHeadBlock`, and the +//! `PistonMovingBlockEntity` progress ticking, plus the level's block-event +//! queue (`ServerLevel.blockEvent` / `runBlockEvents`). +//! +//! Entity pushing by moving blocks is the caller's (see `piston_movement`). +use super::{ + Behaviours, LevelAccess, LevelEvent, Sim, Ticks, + data::PushReaction, + states::BlockId, + update::{above, rel}, +}; +use crate::{ + java_hash_map::{JavaHashMap, JavaKey}, + registry::BlockStateId, +}; +use horizon_core::{geometry::Direction, position::BlockPos, random::RandomSource}; +use std::cmp::Ordering; + +/// `PistonMovingBlockEntity` state, owned by [`Ticks::moving_pistons`]. +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct MovingPiston { + pub moved_state: BlockStateId, + pub direction: Direction, + pub extending: bool, + pub source: bool, + pub progress: f32, + pub progress_o: f32, + pub last_ticked: i64, + /// Identity of this block entity (a replaced entity is a new ticker). + pub id: u64, +} +impl MovingPiston { + pub fn movement_direction(&self) -> Direction { + if self.extending { + self.direction + } else { + self.direction.opposite() + } + } +} + +/// `BlockEventData`. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct BlockEventData { + pub pos: BlockPos, + pub block: BlockId, + pub param_a: i32, + pub param_b: i32, +} + +#[derive(PartialEq, Eq)] +struct PosKey(BlockPos); +impl JavaKey for PosKey { + fn java_hash(&self) -> i32 { + (self.0.y.wrapping_add(self.0.z.wrapping_mul(31))) + .wrapping_mul(31) + .wrapping_add(self.0.x) + } + fn comparable_compare(&self, other: &Self) -> Option<Ordering> { + // Vec3i implements Comparable: y, then z, then x. + Some( + self.0 + .y + .cmp(&other.0.y) + .then(self.0.z.cmp(&other.0.z)) + .then(self.0.x.cmp(&other.0.x)), + ) + } + fn tie_break(&self, _other: &Self) -> Ordering { + Ordering::Less + } +} + +struct Resolver { + piston_pos: BlockPos, + extending: bool, + start: BlockPos, + push_direction: Direction, + piston_direction: Direction, + to_push: Vec<BlockPos>, + to_destroy: Vec<BlockPos>, +} + +fn rel_n(pos: BlockPos, direction: Direction, n: i32) -> BlockPos { + let [x, y, z] = direction.normal(); + pos.offset(x * n, y * n, z * n) +} + +impl<L: LevelAccess + ?Sized> Sim<'_, L> { + // ---- block events ---- + pub(crate) fn block_event( + &mut self, + pos: BlockPos, + block: BlockId, + param_a: i32, + param_b: i32, + ) { + let event = BlockEventData { + pos, + block, + param_a, + param_b, + }; + if !self.ticks.block_events.contains(&event) { + self.ticks.block_events.push(event); + } + } + /// `BlockState.triggerEvent`. + fn trigger_event(&mut self, state: BlockStateId, pos: BlockPos, a: i32, b: i32) -> bool { + let data = self.b.data(state); + if data.is(super::classes::Class::PistonBase) { + self.piston_trigger_event(pos, state, a, b) + } else { + false + } + } + + // ---- moving piston block entities ---- + pub(crate) fn moving_piston(&self, pos: BlockPos) -> Option<MovingPiston> { + self.ticks + .moving_pistons + .iter() + .find(|(p, _)| *p == pos) + .map(|(_, m)| *m) + } + fn set_moving_piston(&mut self, pos: BlockPos, mut piston: MovingPiston) { + self.ticks.moving_pistons.retain(|(p, _)| *p != pos); + self.ticks.next_block_entity_id += 1; + piston.id = self.ticks.next_block_entity_id; + self.ticks.moving_pistons.push((pos, piston)); + } + pub(crate) fn remove_moving_piston(&mut self, pos: BlockPos) -> Option<MovingPiston> { + let index = self + .ticks + .moving_pistons + .iter() + .position(|(p, _)| *p == pos)?; + Some(self.ticks.moving_pistons.remove(index).1) + } + /// `PistonMovingBlockEntity.finalTick`. + fn moving_piston_final_tick(&mut self, pos: BlockPos) { + let Some(piston) = self.moving_piston(pos) else { + return; + }; + if piston.progress_o >= 1.0 { + return; + } + self.remove_moving_piston(pos); + let b = self.b; + if b.is_block(self.state(pos), b.named.moving_piston) { + let new = if piston.source { + b.air() + } else { + self.update_from_neighbour_shapes(piston.moved_state, pos) + }; + self.set_block_and_update(pos, new); + let block = b.block(new); + self.neighbor_changed_at(pos, block); + } + } + /// `PistonMovingBlockEntity.tick` (entity pushing excluded). + fn moving_piston_tick(&mut self, pos: BlockPos) { + let Some(mut piston) = self.moving_piston(pos) else { + return; + }; + let b = self.b; + piston.last_ticked = self.level.game_time(); + piston.progress_o = piston.progress; + if piston.progress_o >= 1.0 { + self.remove_moving_piston(pos); + if b.is_block(self.state(pos), b.named.moving_piston) { + let mut new = self.update_from_neighbour_shapes(piston.moved_state, pos); + if b.is_air(new) { + self.set_block(pos, piston.moved_state, 340); + self.update_or_destroy( + piston.moved_state, + new, + pos, + 3, + super::flags::UPDATE_LIMIT, + ); + } else { + if b.is_waterlogged(new) { + new = b.table.set_bool(new, b.props.waterlogged, false); + } + self.set_block(pos, new, 67); + let block = b.block(new); + self.neighbor_changed_at(pos, block); + } + } + } else { + piston.progress = (piston.progress + 0.5).min(1.0); + if let Some(entry) = self + .ticks + .moving_pistons + .iter_mut() + .find(|(p, _)| *p == pos) + { + entry.1 = piston; + } + } + } + + // ---- PistonBaseBlock ---- + fn is_sticky_piston(&self, state: BlockStateId) -> bool { + self.b.is_block(state, self.b.named.sticky_piston) + } + fn piston_neighbor_signal(&self, pos: BlockPos, push: Direction) -> bool { + for direction in Direction::ALL { + if direction != push && self.has_signal(rel(pos, direction), direction) { + return true; + } + } + if self.has_signal(pos, Direction::Down) { + return true; + } + let up = above(pos); + Direction::ALL.into_iter().any(|direction| { + direction != Direction::Down && self.has_signal(rel(up, direction), direction) + }) + } + /// `PistonBaseBlock.checkIfExtend`. + pub(crate) fn piston_check_if_extend(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let direction = b.facing(state); + let extend = self.piston_neighbor_signal(pos, direction); + let extended = b.table.bool(state, b.props.extended); + let block = b.block(state); + if extend && !extended { + if self.piston_resolve(pos, direction, true).is_some() { + self.block_event(pos, block, 0, direction as i32); + } + } else if !extend && extended { + let pushed_pos = rel_n(pos, direction, 2); + let pushed = self.state(pushed_pos); + let mut event = 1; + if b.is_block(pushed, b.named.moving_piston) && b.facing(pushed) == direction { + if let Some(piston) = self.moving_piston(pushed_pos) { + if piston.extending + && (piston.progress_o < 0.5 + || self.level.game_time() == piston.last_ticked + || self.ticks.handling_tick) + { + event = 2; + } + } + } + self.block_event(pos, block, event, direction as i32); + } + } + /// `PistonBaseBlock.isPushable`. + fn is_pushable( + &self, + state: BlockStateId, + pos: BlockPos, + direction: Direction, + allow_destroyable: bool, + connection: Direction, + ) -> bool { + let b = self.b; + let (min_y, max_y) = (self.level.min_y(), self.level.max_y() - 1); + if pos.y < min_y || pos.y > max_y { + return false; + } + if b.is_air(state) { + return true; + } + if direction == Direction::Down && pos.y == min_y { + return false; + } + if direction == Direction::Up && pos.y == max_y { + return false; + } + let is_piston = + b.is_block(state, b.named.piston) || b.is_block(state, b.named.sticky_piston); + if !is_piston { + if b.facts(state).hardness == -1.0 { + return false; + } + match b.facts(state).push { + PushReaction::Immoveable => return false, + PushReaction::Popped => return allow_destroyable, + PushReaction::Push => return direction == connection, + _ => {} + } + } else if b.table.bool(state, b.props.extended) { + return false; + } + !b.has_flag(state, super::data::state_flags::BLOCK_ENTITY) + } + fn is_slime_or_honey(&self, state: BlockStateId) -> bool { + self.b.is_block(state, self.b.named.slime_block) + || self.b.is_block(state, self.b.named.honey_block) + } + fn can_stick(&self, first: BlockStateId, second: BlockStateId) -> bool { + let n = self.b.named; + let (honey1, slime1) = ( + self.b.is_block(first, n.honey_block), + self.b.is_block(first, n.slime_block), + ); + let (honey2, slime2) = ( + self.b.is_block(second, n.honey_block), + self.b.is_block(second, n.slime_block), + ); + if (honey1 && slime2) || (slime1 && honey2) { + return false; + } + self.is_slime_or_honey(first) || self.is_slime_or_honey(second) + } + /// `PistonStructureResolver.resolve`; None when the structure cannot move. + fn piston_resolve( + &self, + piston_pos: BlockPos, + direction: Direction, + extending: bool, + ) -> Option<(Vec<BlockPos>, Vec<BlockPos>, Direction)> { + let mut r = Resolver { + piston_pos, + extending, + start: if extending { + rel(piston_pos, direction) + } else { + rel_n(piston_pos, direction, 2) + }, + push_direction: if extending { + direction + } else { + direction.opposite() + }, + piston_direction: direction, + to_push: Vec::new(), + to_destroy: Vec::new(), + }; + let next = self.state(r.start); + if !self.is_pushable(next, r.start, r.push_direction, false, r.piston_direction) { + if r.extending && self.b.facts(next).push == PushReaction::Popped { + r.to_destroy.push(r.start); + return Some((r.to_push, r.to_destroy, r.push_direction)); + } + return None; + } + let start = r.start; + let push = r.push_direction; + if !self.add_block_line(&mut r, start, push) { + return None; + } + let mut i = 0; + while i < r.to_push.len() { + let pos = r.to_push[i]; + if self.is_slime_or_honey(self.state(pos)) && !self.add_branching_blocks(&mut r, pos) { + return None; + } + i += 1; + } + Some((r.to_push, r.to_destroy, r.push_direction)) + } + fn add_block_line(&self, r: &mut Resolver, start: BlockPos, direction: Direction) -> bool { + let mut next = self.state(start); + if self.b.is_air(next) { + return true; + } + if !self.is_pushable(next, start, r.push_direction, false, direction) + || start == r.piston_pos + || r.to_push.contains(&start) + { + return true; + } + let mut count = 1; + if count + r.to_push.len() > 12 { + return false; + } + while self.is_slime_or_honey(next) { + let pos = rel_n(start, r.push_direction.opposite(), count as i32); + let previous = next; + next = self.state(pos); + if self.b.is_air(next) + || !self.can_stick(previous, next) + || !self.is_pushable( + next, + pos, + r.push_direction, + false, + r.push_direction.opposite(), + ) + || pos == r.piston_pos + { + break; + } + count += 1; + if count + r.to_push.len() > 12 { + return false; + } + } + let mut added = 0; + for i in (0..count).rev() { + r.to_push + .push(rel_n(start, r.push_direction.opposite(), i as i32)); + added += 1; + } + let mut i = 1; + loop { + let pos = rel_n(start, r.push_direction, i); + if let Some(collision) = r.to_push.iter().position(|p| *p == pos) { + self.reorder_at_collision(r, added, collision); + for j in 0..=collision + added { + let block_pos = r.to_push[j]; + if self.is_slime_or_honey(self.state(block_pos)) + && !self.add_branching_blocks(r, block_pos) + { + return false; + } + } + return true; + } + next = self.state(pos); + if self.b.is_air(next) { + return true; + } + if !self.is_pushable(next, pos, r.push_direction, true, r.push_direction) + || pos == r.piston_pos + { + return false; + } + if self.b.facts(next).push == PushReaction::Popped { + r.to_destroy.push(pos); + return true; + } + if r.to_push.len() >= 12 { + return false; + } + r.to_push.push(pos); + added += 1; + i += 1; + } + } + fn reorder_at_collision(&self, r: &mut Resolver, added: usize, collision: usize) { + let len = r.to_push.len(); + let head: Vec<BlockPos> = r.to_push[..collision].to_vec(); + let last_line: Vec<BlockPos> = r.to_push[len - added..].to_vec(); + let middle: Vec<BlockPos> = r.to_push[collision..len - added].to_vec(); + r.to_push.clear(); + r.to_push.extend(head); + r.to_push.extend(last_line); + r.to_push.extend(middle); + } + fn add_branching_blocks(&self, r: &mut Resolver, from: BlockPos) -> bool { + let from_state = self.state(from); + for direction in Direction::ALL { + if super::query::axis_of(direction) != super::query::axis_of(r.push_direction) { + let neighbour = rel(from, direction); + let neighbour_state = self.state(neighbour); + if self.can_stick(neighbour_state, from_state) + && !self.add_block_line(r, neighbour, direction) + { + return false; + } + } + } + true + } + fn moving_piston_state(&self, direction: Direction, sticky: bool) -> BlockStateId { + let b = self.b; + let state = b.table.set_dir( + b.default_of(b.named.moving_piston), + b.props.facing, + direction, + ); + b.table.set_text( + state, + b.props.kind, + if sticky { "sticky" } else { "normal" }, + ) + } + /// `PistonBaseBlock.moveBlocks`. + fn piston_move_blocks( + &mut self, + piston_pos: BlockPos, + direction: Direction, + extending: bool, + sticky: bool, + ) -> bool { + let b = self.b; + let arm = rel(piston_pos, direction); + if !extending && b.is_block(self.state(arm), b.named.piston_head) { + self.set_block(arm, b.air(), 276); + } + let Some((to_push, to_destroy, push_direction)) = + self.piston_resolve(piston_pos, direction, extending) + else { + return false; + }; + let mut delete_after: JavaHashMap<PosKey, BlockStateId> = JavaHashMap::default(); + let mut shapes = Vec::with_capacity(to_push.len()); + for pos in &to_push { + let state = self.state(*pos); + shapes.push(state); + delete_after.put(PosKey(*pos), state); + } + let mut to_update = Vec::with_capacity(to_push.len() + to_destroy.len()); + let move_direction = if extending { + direction + } else { + direction.opposite() + }; + for pos in to_destroy.iter().rev() { + let state = self.state(*pos); + self.drop_resources(state, *pos); + self.set_block(*pos, b.air(), 18); + self.game_event(*pos, "minecraft:block_destroy"); + to_update.push(state); + } + for (i, pos) in to_push.iter().enumerate().rev() { + let state = self.state(*pos); + let target = rel(*pos, move_direction); + delete_after.remove(&PosKey(target)); + let moving = b.table.set_dir( + b.default_of(b.named.moving_piston), + b.props.facing, + direction, + ); + self.set_block(target, moving, 324); + self.set_moving_piston( + target, + MovingPiston { + moved_state: shapes[i], + direction, + extending, + source: false, + progress: 0.0, + progress_o: 0.0, + last_ticked: 0, + id: 0, + }, + ); + to_update.push(state); + } + if extending { + let head = b.table.set_text( + b.table + .set_dir(b.default_of(b.named.piston_head), b.props.facing, direction), + b.props.kind, + if sticky { "sticky" } else { "normal" }, + ); + let moving = self.moving_piston_state(direction, sticky); + delete_after.remove(&PosKey(arm)); + self.set_block(arm, moving, 324); + self.set_moving_piston( + arm, + MovingPiston { + moved_state: head, + direction, + extending: true, + source: true, + progress: 0.0, + progress_o: 0.0, + last_ticked: 0, + id: 0, + }, + ); + } + let air = b.air(); + let entries: Vec<(BlockPos, BlockStateId)> = + delete_after.entries().map(|(k, v)| (k.0, *v)).collect(); + for (pos, _) in &entries { + self.set_block(*pos, air, 82); + } + for (pos, old) in &entries { + self.update_indirect_neighbour_shapes(*old, *pos, 2, super::flags::UPDATE_LIMIT); + self.update_neighbour_shapes(air, *pos, 2, super::flags::UPDATE_LIMIT); + self.update_indirect_neighbour_shapes(air, *pos, 2, super::flags::UPDATE_LIMIT); + } + let mut index = 0; + for pos in to_destroy.iter().rev() { + let state = to_update[index]; + index += 1; + self.affect_neighbors_after_removal(state, *pos, false); + self.update_indirect_neighbour_shapes(state, *pos, 2, super::flags::UPDATE_LIMIT); + let block = b.block(state); + self.update_neighbors_at(*pos, block); + } + for pos in to_push.iter().rev() { + let block = b.block(to_update[index]); + index += 1; + self.update_neighbors_at(*pos, block); + } + if extending { + self.update_neighbors_at(arm, b.named.piston_head); + } + let _ = push_direction; + true + } + /// `PistonBaseBlock.triggerEvent`. + fn piston_trigger_event( + &mut self, + pos: BlockPos, + state: BlockStateId, + a: i32, + param_b: i32, + ) -> bool { + let b = self.b; + let p = b.props; + let direction = b.facing(state); + let extended_state = b.table.set_bool(state, p.extended, true); + let sticky = self.is_sticky_piston(state); + let extend = self.piston_neighbor_signal(pos, direction); + if extend && (a == 1 || a == 2) { + self.set_block(pos, extended_state, 2); + return false; + } + if !extend && a == 0 { + return false; + } + if a == 0 { + if !self.piston_move_blocks(pos, direction, true, sticky) { + return false; + } + self.set_block(pos, extended_state, 67); + let pitch = self.random().next_float() * 0.25 + 0.6; + self.emit(LevelEvent::Sound { + pos, + sound: "minecraft:block.piston.extend".into(), + volume: 0.5, + pitch, + }); + self.game_event(pos, "minecraft:block_activate"); + } else if a == 1 || a == 2 { + self.moving_piston_final_tick(rel(pos, direction)); + let moving = self.moving_piston_state(direction, sticky); + self.set_block(pos, moving, 276); + let piston_default = b.table.set_dir( + b.default_of(b.block(state)), + p.facing, + Direction::ALL[(param_b & 7).min(5) as usize], + ); + self.set_moving_piston( + pos, + MovingPiston { + moved_state: piston_default, + direction, + extending: false, + source: true, + progress: 0.0, + progress_o: 0.0, + last_ticked: 0, + id: 0, + }, + ); + self.update_neighbors_at(pos, b.named.moving_piston); + self.update_neighbour_shapes(moving, pos, 2, super::flags::UPDATE_LIMIT); + if sticky { + let two = rel_n(pos, direction, 2); + let moving_state = self.state(two); + let mut piston_piece = false; + if b.is_block(moving_state, b.named.moving_piston) { + if let Some(entity) = self.moving_piston(two) { + if entity.direction == direction && entity.extending { + self.moving_piston_final_tick(two); + piston_piece = true; + } + } + } + if !piston_piece { + let is_piston = b.is_block(moving_state, b.named.piston) + || b.is_block(moving_state, b.named.sticky_piston); + if a != 1 + || b.is_air(moving_state) + || !self.is_pushable( + moving_state, + two, + direction.opposite(), + false, + direction, + ) + || (b.facts(moving_state).push != PushReaction::PushPull && !is_piston) + { + self.remove_block(rel(pos, direction), false); + } else { + self.piston_move_blocks(pos, direction, false, sticky); + } + } + } else { + self.remove_block(rel(pos, direction), false); + } + let pitch = self.random().next_float() * 0.15 + 0.6; + self.emit(LevelEvent::Sound { + pos, + sound: "minecraft:block.piston.contract".into(), + volume: 0.5, + pitch, + }); + self.game_event(pos, "minecraft:block_deactivate"); + } + true + } + + // ---- PistonHeadBlock ---- + pub(crate) fn piston_head_fitting_base(&self, head: BlockStateId, base: BlockStateId) -> bool { + let b = self.b; + let expected = if b.table.text(head, b.props.kind) == "sticky" { + b.named.sticky_piston + } else { + b.named.piston + }; + b.is_block(base, expected) + && b.table.bool(base, b.props.extended) + && b.facing(base) == b.facing(head) + } + pub(crate) fn piston_head_can_survive(&self, head: BlockStateId, pos: BlockPos) -> bool { + let b = self.b; + let base = self.rel_state(pos, b.facing(head).opposite()); + self.piston_head_fitting_base(head, base) + || (b.is_block(base, b.named.moving_piston) && b.facing(base) == b.facing(head)) + } +} + +impl Behaviours { + /// `ServerLevel.runBlockEvents`: run queued block events (piston moves). + /// Call once per tick after scheduled and random ticks. + pub fn run_block_events<L: LevelAccess + ?Sized>(&self, level: &mut L, ticks: &mut Ticks) { + let mut reschedule = Vec::new(); + while !ticks.block_events.is_empty() { + let event = ticks.block_events.remove(0); + if !level.is_ticking_chunk(event.pos.chunk()) { + reschedule.push(event); + continue; + } + let mut sim = self.sim(level, ticks); + let state = sim.state(event.pos); + if self.block(state) == event.block { + sim.trigger_event(state, event.pos, event.param_a, event.param_b); + } + } + for event in reschedule { + if !ticks.block_events.contains(&event) { + ticks.block_events.push(event); + } + } + } + /// `Level.tickBlockEntities` for moving pistons (the only block entities + /// whose ticking changes blocks). Entries added during the pass wait for + /// the next tick, as vanilla's pending tickers do. + pub fn tick_block_entities<L: LevelAccess + ?Sized>(&self, level: &mut L, ticks: &mut Ticks) { + let tickers: Vec<(BlockPos, u64)> = ticks + .moving_pistons + .iter() + .map(|(p, m)| (*p, m.id)) + .collect(); + for (pos, id) in tickers { + if !level.is_ticking_chunk(pos.chunk()) + || !ticks + .moving_pistons + .iter() + .any(|(p, m)| *p == pos && m.id == id) + { + continue; + } + self.sim(level, ticks).moving_piston_tick(pos); + } + } +} diff --git a/crates/horizon-world/src/level/place.rs b/crates/horizon-world/src/level/place.rs new file mode 100644 index 000000000..01e9527c2 --- /dev/null +++ b/crates/horizon-world/src/level/place.rs @@ -0,0 +1,1634 @@ +//! Block placement: `BlockItem.place`, `BlockPlaceContext`, +//! `canBeReplaced(state, context)` and `getStateForPlacement` for every +//! overriding class. +use super::{ + Behaviours, LevelAccess, LevelEvent, Sim, Ticks, + classes::Class, + data::ItemKind, + query::{axis_of, clockwise, counter_clockwise, is_horizontal}, + states::BlockId, + update::{HORIZONTAL, above, below, rel}, +}; +use crate::{fluid::FluidState, registry::BlockStateId}; +use horizon_core::{ + geometry::{Axis, Direction, Vec3, trig}, + position::BlockPos, + random::RandomSource, +}; + +/// A player's use-item-on-block action (`UseOnContext` inputs). +#[derive(Clone, Debug)] +pub struct PlaceContext { + /// The block that was hit (`BlockHitResult.getBlockPos`). + pub clicked_pos: BlockPos, + /// The face that was hit. + pub face: Direction, + /// Absolute hit location. + pub hit: Vec3, + /// `BlockHitResult.isInside`. + pub inside: bool, + /// Player view rotation in degrees (`getYRot`, `getXRot`). + pub yaw: f32, + pub pitch: f32, + /// `isSecondaryUseActive` (sneaking). + pub sneaking: bool, + /// The item in hand (registry name, e.g. `minecraft:oak_stairs`). + pub item: String, + /// `Player.canUseGameMasterBlocks` (creative operator); gates command, + /// structure, jigsaw and test blocks. + pub can_use_game_master_blocks: bool, +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PlaceOutcome { + /// The block was placed (the caller consumes the item). + Placed { pos: BlockPos, state: BlockStateId }, + /// `InteractionResult.FAIL`. + Failed, +} + +/// `BlockPlaceContext` after resolving the replaced position. +#[derive(Clone, Debug)] +pub(crate) struct Ctx { + pub pos: BlockPos, + pub hit_pos: BlockPos, + pub face: Direction, + pub hit: Vec3, + pub inside: bool, + pub yaw: f32, + pub pitch: f32, + pub sneaking: bool, + pub item: String, + pub replace_clicked: bool, +} + +/// `Direction.orderedByNearest(entity)`. +pub(crate) fn ordered_by_nearest(yaw: f32, pitch: f32) -> [Direction; 6] { + let pitch_rad = pitch * (std::f32::consts::PI / 180.0); + let yaw_rad = -yaw * (std::f32::consts::PI / 180.0); + let pitch_sin = trig::sin(f64::from(pitch_rad)); + let pitch_cos = trig::cos(f64::from(pitch_rad)); + let yaw_sin = trig::sin(f64::from(yaw_rad)); + let yaw_cos = trig::cos(f64::from(yaw_rad)); + let x_pos = yaw_sin > 0.0; + let y_pos = pitch_sin < 0.0; + let z_pos = yaw_cos > 0.0; + let x_yaw = if x_pos { yaw_sin } else { -yaw_sin }; + let y_mag = if y_pos { -pitch_sin } else { pitch_sin }; + let z_yaw = if z_pos { yaw_cos } else { -yaw_cos }; + let x_mag = x_yaw * pitch_cos; + let z_mag = z_yaw * pitch_cos; + let ax = if x_pos { + Direction::East + } else { + Direction::West + }; + let ay = if y_pos { + Direction::Up + } else { + Direction::Down + }; + let az = if z_pos { + Direction::South + } else { + Direction::North + }; + let make = |a: Direction, b: Direction, c: Direction| { + [a, b, c, c.opposite(), b.opposite(), a.opposite()] + }; + if x_yaw > z_yaw { + if y_mag > x_mag { + make(ay, ax, az) + } else if z_mag > y_mag { + make(ax, az, ay) + } else { + make(ax, ay, az) + } + } else if y_mag > z_mag { + make(ay, az, ax) + } else if x_mag > y_mag { + make(az, ax, ay) + } else { + make(az, ay, ax) + } +} + +/// `Direction.fromYRot`. +pub(crate) fn from_y_rot(yaw: f64) -> Direction { + let value = ((yaw / 90.0 + 0.5).floor() as i64 & 3) as i32; + super::query::from_2d(value) +} + +/// `RotationSegment.convertToSegment(float)`. +pub(crate) fn rotation_segment(degrees: f32) -> i32 { + ((degrees * (16.0 / 360.0) + 0.5).floor() as i32) & 15 +} +/// `RotationSegment.convertToSegment(Direction)`. +fn rotation_segment_of(direction: Direction) -> i32 { + if !is_horizontal(direction) { + 0 + } else { + super::query::data_2d(direction) << 2 + } +} + +impl Ctx { + fn horizontal_direction(&self) -> Direction { + from_y_rot(f64::from(self.yaw)) + } + fn nearest_looking_directions(&self) -> [Direction; 6] { + let mut directions = ordered_by_nearest(self.yaw, self.pitch); + if self.replace_clicked { + return directions; + } + let target = self.face.opposite(); + if let Some(index) = directions.iter().position(|d| *d == target) { + if index > 0 { + directions.copy_within(0..index, 1); + directions[0] = target; + } + } + directions + } + fn nearest_looking_direction(&self) -> Direction { + ordered_by_nearest(self.yaw, self.pitch)[0] + } + fn nearest_looking_vertical(&self) -> Direction { + if self.pitch < 0.0 { + Direction::Up + } else { + Direction::Down + } + } + fn click_y(&self) -> f64 { + self.hit.y - f64::from(self.pos.y) + } + /// `UseOnContext.getClickedPos` vs `BlockPlaceContext.getClickedPos`. + fn half_from_click(&self) -> bool { + // true = bottom + self.face != Direction::Down && (self.face == Direction::Up || self.click_y() <= 0.5) + } +} + +impl<L: LevelAccess + ?Sized> Sim<'_, L> { + fn item_is(&self, ctx: &Ctx, block: BlockId) -> bool { + !ctx.item.is_empty() && *self.b.block_data(block).item == *ctx.item + } + /// `BlockState.canBeReplaced(BlockPlaceContext)`. + pub(crate) fn can_be_replaced(&self, state: BlockStateId, ctx: &Ctx) -> bool { + let b = self.b; + let p = b.props; + let block = b.block(state); + let data = b.data(state); + let default = |sim: &Self| { + b.is_replaceable(state) && (ctx.item.is_empty() || !sim.item_is(ctx, block)) + }; + for class in &data.chain { + return match class { + Class::Candle => { + (!ctx.sneaking && self.item_is(ctx, block) && b.table.int(state, p.candles) < 4) + || default(self) + } + Class::SeaPickle => { + (!ctx.sneaking && self.item_is(ctx, block) && b.table.int(state, p.pickles) < 4) + || default(self) + } + Class::TurtleEgg => { + (!ctx.sneaking && self.item_is(ctx, block) && b.table.int(state, p.eggs) < 4) + || default(self) + } + Class::FlowerBed => { + (!ctx.sneaking + && self.item_is(ctx, block) + && b.table.int(state, p.flower_amount) < 4) + || default(self) + } + Class::LeafLitter => { + (!ctx.sneaking + && self.item_is(ctx, block) + && b.table.int(state, p.segment_amount) < 4) + || default(self) + } + Class::GrowingPlantBody => { + let (head, _) = self.growing_plant_pair(block); + default(self) && !self.item_is(ctx, head) + } + Class::Multiface => { + !self.item_is(ctx, block) + || Direction::ALL + .into_iter() + .any(|d| !self.multiface_has_face(state, d)) + } + Class::PitcherCrop => false, + Class::Scaffolding => self.item_is(ctx, block), + Class::Slab => { + let kind = b.table.text(state, p.kind); + if kind == "double" || !self.item_is(ctx, block) { + false + } else if ctx.replace_clicked { + let above = ctx.hit.y - f64::from(ctx.hit_pos.y) > 0.5; + if kind == "bottom" { + ctx.face == Direction::Up || (above && is_horizontal(ctx.face)) + } else { + ctx.face == Direction::Down || (!above && is_horizontal(ctx.face)) + } + } else { + true + } + } + Class::SnowLayer => { + let layers = b.table.int(state, p.layers); + if !self.item_is(ctx, block) || layers >= 8 { + layers == 1 + } else if ctx.replace_clicked { + ctx.face == Direction::Up + } else { + true + } + } + Class::Vine => { + let clicked = self.state(ctx.pos); + if b.is_block(clicked, block) { + self.vine_count_faces(clicked) < 5 + } else { + default(self) + } + } + _ => continue, + }; + } + default(self) + } + + fn fluid_is_water_source(&self, pos: BlockPos) -> bool { + self.fluid_at(pos) == FluidState::WATER || { + let f = self.fluid_at(pos); + f.kind() == crate::fluid::FluidKind::Water + } + } + + /// `Block.getStateForPlacement(context)` for `block`. + pub(crate) fn state_for_placement( + &mut self, + block: BlockId, + ctx: &Ctx, + ) -> Option<BlockStateId> { + self.placement_at(block, 0, ctx) + } + + fn placement_at(&mut self, block: BlockId, depth: usize, ctx: &Ctx) -> Option<BlockStateId> { + let b = self.b; + let chain = &b.block_data(block).chain; + for (index, class) in chain.iter().copied().enumerate().skip(depth) { + if let Some(result) = self.placement_class(class, index, block, ctx) { + return result; + } + } + Some(self.b.default_of(block)) + } + + #[allow(clippy::option_option)] + fn placement_class( + &mut self, + class: Class, + depth: usize, + block: BlockId, + ctx: &Ctx, + ) -> Option<Option<BlockStateId>> { + let b = self.b; + let p = b.props; + let t = &b.tags; + let n = b.named; + let table = &b.table; + let default = b.default_of(block); + let pos = ctx.pos; + let water_source = self.fluid_is_water_source(pos); + let wl = |state: BlockStateId| table.set_bool(state, p.waterlogged, water_source); + macro_rules! sup { + () => { + self.placement_at(block, depth + 1, ctx) + }; + } + let horizontal = ctx.horizontal_direction(); + Some(match class { + Class::AbstractBed => { + let relative = rel(pos, horizontal); + if self.can_be_replaced(self.state(relative), ctx) { + Some(table.set_dir(default, p.facing, horizontal)) + } else { + None + } + } + Class::AbstractFurnace + | Class::Beehive + | Class::CarvedPumpkin + | Class::ChiseledBookShelf + | Class::Diode + | Class::GlazedTerracotta + | Class::Loom + | Class::Stonecutter + | Class::Vault => Some(table.set_dir(default, p.facing, horizontal.opposite())), + Class::Repeater => { + let state = sup!()?; + let locked = self.diode_is_locked(pos, state); + Some(table.set_bool(state, p.locked, locked)) + } + Class::EndPortalFrame => Some(table.set_bool( + table.set_dir(default, p.facing, horizontal.opposite()), + p.eye, + false, + )), + Class::Lectern => Some(table.set_bool( + table.set_dir(default, p.facing, horizontal.opposite()), + p.has_book, + false, + )), + Class::AbstractSkull => { + let signal = self.has_neighbor_signal(pos); + Some(table.set_bool(default, p.powered, signal)) + } + Class::Skull => { + let state = sup!()?; + Some(table.set_int(state, p.rotation, rotation_segment(ctx.yaw))) + } + Class::WallSkull => { + let mut state = sup!()?; + for direction in ctx.nearest_looking_directions() { + if is_horizontal(direction) { + state = table.set_dir(state, p.facing, direction.opposite()); + if !self.can_be_replaced(self.state(rel(pos, direction)), ctx) { + return Some(Some(state)); + } + } + } + None + } + Class::AmethystCluster => Some(table.set_dir(wl(default), p.facing, ctx.face)), + Class::Anvil => Some(table.set_dir(default, p.facing, clockwise(horizontal))), + Class::BambooStalk => { + if self.fluid_at(pos).kind() != crate::fluid::FluidKind::Empty { + return Some(None); + } + let below_state = self.below_state(pos); + if !b.in_set(below_state, &t.supports_bamboo) { + None + } else if b.is_block(below_state, n.bamboo_sapling) { + Some(table.set_int(default, p.age, 0)) + } else if b.is_block(below_state, n.bamboo) { + let age = if table.int(below_state, p.age) > 0 { + 1 + } else { + 0 + }; + Some(table.set_int(default, p.age, age)) + } else { + let above_state = self.above_state(pos); + if b.is_block(above_state, n.bamboo) { + Some(table.set_int(default, p.age, table.int(above_state, p.age))) + } else { + Some(b.default_of(n.bamboo_sapling)) + } + } + } + Class::Banner => { + Some(table.set_int(default, p.rotation, rotation_segment(ctx.yaw + 180.0))) + } + Class::StandingSign => Some(wl(table.set_int( + default, + p.rotation, + rotation_segment(ctx.yaw + 180.0), + ))), + Class::Barrel | Class::Command | Class::Dispenser => Some(table.set_dir( + default, + p.facing, + ctx.nearest_looking_direction().opposite(), + )), + Class::Observer => { + Some(table.set_dir(default, p.facing, ctx.nearest_looking_direction())) + } + Class::PistonBase => Some(table.set_bool( + table.set_dir( + default, + p.facing, + ctx.nearest_looking_direction().opposite(), + ), + p.extended, + false, + )), + Class::Barrier + | Class::HeavyCore + | Class::SculkSensor + | Class::SculkShrieker + | Class::Chain + | Class::MangroveRoots + | Class::WaterloggedTransparent => { + let state = if class == Class::Chain + || class == Class::MangroveRoots + || class == Class::WaterloggedTransparent + { + sup!()? + } else { + default + }; + Some(wl(state)) + } + Class::CalibratedSculkSensor => { + let state = sup!()?; + Some(table.set_dir(state, p.facing, horizontal)) + } + Class::BaseCoralPlantType | Class::Conduit => { + let fluid = self.fluid_at(pos); + Some(table.set_bool( + default, + p.waterlogged, + b.is_water_fluid(fluid.kind()) && fluid.is_full(), + )) + } + Class::BaseCoralWallFan + | Class::WallBanner + | Class::WallSign + | Class::WallTorch + | Class::ShelfMushroom + | Class::TripWireHook + | Class::Ladder + | Class::Cocoa => { + if class == Class::Ladder && !ctx.replace_clicked { + let behind = self.state(rel(pos, ctx.face.opposite())); + if b.is_block(behind, block) && b.facing(behind) == ctx.face { + return Some(None); + } + } + let mut state = match class { + Class::BaseCoralWallFan => sup!()?, + Class::TripWireHook => { + table.set_bool(table.set_bool(default, p.powered, false), p.attached, false) + } + _ => default, + }; + for direction in ctx.nearest_looking_directions() { + if is_horizontal(direction) { + let facing = if class == Class::Cocoa { + direction + } else { + direction.opposite() + }; + state = table.set_dir(state, p.facing, facing); + if self.can_survive(state, pos) { + return Some(Some(match class { + Class::WallSign | Class::Ladder => wl(state), + _ => state, + })); + } + } + } + None + } + Class::RedstoneWallTorch => { + let wall = b.default_of(table.block_by_name("minecraft:wall_torch")?); + let mut found = None; + for direction in ctx.nearest_looking_directions() { + if is_horizontal(direction) { + let state = table.set_dir(wall, p.facing, direction.opposite()); + if self.can_survive(state, pos) { + found = Some(state); + break; + } + } + } + found.map(|state| table.set_dir(default, p.facing, b.facing(state))) + } + Class::WallHangingSign => { + let mut state = default; + for direction in ctx.nearest_looking_directions() { + if is_horizontal(direction) && axis_of(direction) != axis_of(ctx.face) { + state = table.set_dir(state, p.facing, direction.opposite()); + if self.can_survive(state, pos) + && self.wall_hanging_sign_can_place(state, pos) + { + return Some(Some(wl(state))); + } + } + } + None + } + Class::CeilingHangingSign => { + let above_pos = above(pos); + let above_state = self.state(above_pos); + let below_hanging = b + .tag("minecraft:all_hanging_signs") + .is_some_and(|tag| b.in_set(above_state, tag)); + let direction = from_y_rot(f64::from(ctx.yaw)); + let mut attached_to_middle = + !b.collision_face_full(above_state, Direction::Down) || ctx.sneaking; + if below_hanging && !ctx.sneaking { + if b.instance_of(above_state, Class::WallHangingSign) { + if axis_of(b.facing(above_state)) == axis_of(direction) { + attached_to_middle = false; + } + } else if table.has(above_state, p.rotation) { + let segment = table.int(above_state, p.rotation); + let above_direction = match segment { + 0 => Some(Direction::North), + 4 => Some(Direction::East), + 8 => Some(Direction::South), + 12 => Some(Direction::West), + _ => None, + }; + if above_direction.is_some_and(|d| axis_of(d) == axis_of(direction)) { + attached_to_middle = false; + } + } + } + let segment = if !attached_to_middle { + rotation_segment_of(direction.opposite()) + } else { + rotation_segment(ctx.yaw + 180.0) + }; + Some(wl(table.set_int( + table.set_bool(default, p.attached, attached_to_middle), + p.rotation, + segment, + ))) + } + Class::BaseFire | Class::Fire | Class::SoulFire => Some(self.fire_state_for(pos)), + Class::BaseRail => { + let east_west = matches!(horizontal, Direction::East | Direction::West); + let shape = if east_west { + "east_west" + } else { + "north_south" + }; + Some(wl(table.set_text(default, p.shape, shape))) + } + Class::Bell => { + let face = ctx.face; + if axis_of(face) == Axis::Y { + let attachment = if face == Direction::Down { + "ceiling" + } else { + "floor" + }; + let state = table.set_dir( + table.set_text(default, p.attachment, attachment), + p.facing, + horizontal, + ); + if self.can_survive(state, pos) { + Some(state) + } else { + None + } + } else { + let double = match axis_of(face) { + Axis::X => { + self.sturdy(rel(pos, Direction::West), Direction::East) + && self.sturdy(rel(pos, Direction::East), Direction::West) + } + _ => { + self.sturdy(rel(pos, Direction::North), Direction::South) + && self.sturdy(rel(pos, Direction::South), Direction::North) + } + }; + let mut state = table.set_text( + table.set_dir(default, p.facing, face.opposite()), + p.attachment, + if double { "double_wall" } else { "single_wall" }, + ); + if self.can_survive(state, pos) { + return Some(Some(state)); + } + let floor = self.sturdy(below(pos), Direction::Up); + state = table.set_text( + state, + p.attachment, + if floor { "floor" } else { "ceiling" }, + ); + if self.can_survive(state, pos) { + Some(state) + } else { + None + } + } + } + Class::BigDripleaf => { + let below_state = self.below_state(pos); + let dripleaf_part = b.is_block(below_state, n.big_dripleaf) + || b.is_block(below_state, n.big_dripleaf_stem); + let facing = if dripleaf_part { + b.facing(below_state) + } else { + horizontal.opposite() + }; + let source = self.fluid_at(pos) == FluidState::WATER; + Some(table.set_dir( + table.set_bool(default, p.waterlogged, source), + p.facing, + facing, + )) + } + Class::Campfire => { + let water = self.fluid_at(pos).kind() == crate::fluid::FluidKind::Water; + let hay = table + .block_by_name("minecraft:hay_block") + .is_some_and(|hay| b.is_block(self.below_state(pos), hay)); + let state = table.set_bool(default, p.waterlogged, water); + let state = table.set_bool(state, p.signal_fire, hay); + let state = table.set_bool(state, p.lit, !water); + Some(table.set_dir(state, p.facing, horizontal)) + } + Class::Candle => { + let current = self.state(pos); + if b.is_block(current, block) { + Some(table.cycle(current, p.candles)) + } else { + let state = sup!()?; + Some(wl(state)) + } + } + Class::SeaPickle => { + let current = self.state(pos); + if b.is_block(current, block) { + Some(table.set_int( + current, + p.pickles, + (table.int(current, p.pickles) + 1).min(4), + )) + } else { + let state = sup!()?; + Some(wl(state)) + } + } + Class::TurtleEgg => { + let current = self.state(pos); + if b.is_block(current, block) { + Some(table.set_int(current, p.eggs, (table.int(current, p.eggs) + 1).min(4))) + } else { + sup!() + } + } + Class::SnowLayer => { + let current = self.state(pos); + if b.is_block(current, block) { + Some(table.set_int( + current, + p.layers, + (table.int(current, p.layers) + 1).min(8), + )) + } else { + sup!() + } + } + Class::FlowerBed | Class::LeafLitter => { + let current = self.state(pos); + let key = if class == Class::FlowerBed { + p.flower_amount + } else { + p.segment_amount + }; + if b.is_block(current, block) { + Some(table.set_int(current, key, (table.int(current, key) + 1).min(4))) + } else { + Some(table.set_dir(default, p.facing, horizontal.opposite())) + } + } + Class::Chest => { + let mut kind = "single"; + let mut facing = horizontal.opposite(); + let face = ctx.face; + if is_horizontal(face) && ctx.sneaking { + if let Some(neighbour_facing) = + self.chest_candidate_partner_facing(default, pos, face.opposite()) + { + if axis_of(neighbour_facing) != axis_of(face) { + facing = neighbour_facing; + kind = if counter_clockwise(facing) == face.opposite() { + "right" + } else { + "left" + }; + } + } + } + if kind == "single" && !ctx.sneaking { + if self.chest_candidate_partner_facing(default, pos, clockwise(facing)) + == Some(facing) + { + kind = "left"; + } else if self.chest_candidate_partner_facing( + default, + pos, + counter_clockwise(facing), + ) == Some(facing) + { + kind = "right"; + } + } + Some(wl(table.set_text( + table.set_dir(default, p.facing, facing), + p.kind, + kind, + ))) + } + Class::ChorusPlant => Some(self.chorus_plant_with_connections(pos, default)), + Class::ConcretePowder => { + let replaced = self.state(pos); + if b.is_water_fluid(b.fluid(replaced).kind()) || self.concrete_touches_liquid(pos) { + Some(b.data(default).link.map_or(default, |c| b.default_of(c))) + } else { + sup!() + } + } + Class::CopperGolemStatue | Class::EnderChest | Class::Shelf => { + let mut state = wl(table.set_dir(default, p.facing, horizontal.opposite())); + if class == Class::Shelf { + let signal = self.has_neighbor_signal(pos); + state = table.set_bool(state, p.powered, signal); + } + Some(state) + } + Class::Coral => { + if !self.coral_scan_for_water(pos) { + let delay = 60 + self.random().next_int_bound(40).unwrap_or(0); + self.schedule_tick(pos, block, delay); + } + Some(default) + } + Class::Crafter => { + let front = ctx.nearest_looking_direction().opposite(); + let top = match front { + Direction::Down => horizontal.opposite(), + Direction::Up => horizontal, + _ => Direction::Up, + }; + let orientation = format!( + "{}_{}", + super::states::direction_name(front), + super::states::direction_name(top) + ); + let signal = self.has_neighbor_signal(pos); + Some(table.set_bool( + table.set_text(default, p.orientation, &orientation), + p.triggered, + signal, + )) + } + Class::Jigsaw => { + let front = ctx.face; + let top = if axis_of(front) == Axis::Y { + horizontal.opposite() + } else { + Direction::Up + }; + let orientation = format!( + "{}_{}", + super::states::direction_name(front), + super::states::direction_name(top) + ); + Some(table.set_text(default, p.orientation, &orientation)) + } + Class::CreakingHeart | Class::RotatedPillar | Class::InfestedRotatedPillar => { + Some(table.set_text(default, p.axis, super::states::axis_name(axis_of(ctx.face)))) + } + Class::DecoratedPot => { + let state = table.set_dir(default, p.facing, horizontal); + Some(table.set_bool(wl(state), p.cracked, false)) + } + Class::Door => { + if pos.y < self.level.max_y() - 1 + && self.can_be_replaced(self.state(above(pos)), ctx) + { + let powered = + self.has_neighbor_signal(pos) || self.has_neighbor_signal(above(pos)); + let hinge = self.door_hinge(ctx); + let state = table.set_dir(default, p.facing, horizontal); + let state = table.set_text(state, p.hinge, hinge); + let state = + table.set_bool(table.set_bool(state, p.powered, powered), p.open, powered); + Some(table.set_text(state, p.half, "lower")) + } else { + None + } + } + Class::DoublePlant => { + if pos.y < self.level.max_y() - 1 + && self.can_be_replaced(self.state(above(pos)), ctx) + { + sup!() + } else { + None + } + } + Class::PitcherCrop => Some(default), + Class::SmallDripleaf => { + let state = sup!()?; + let state = table.set_dir(state, p.facing, horizontal.opposite()); + let water = self.is_water_at(pos); + Some( + table + .with_bool(state, p.waterlogged, water) + .unwrap_or(state), + ) + } + Class::TallSeagrass => { + let state = sup!()?; + let fluid = self.fluid_at(above(pos)); + if b.is_water_fluid(fluid.kind()) && fluid.is_full() { + Some(state) + } else { + None + } + } + Class::DriedGhast => { + let state = sup!()?; + Some(table.set_dir(wl(state), p.facing, horizontal.opposite())) + } + Class::EndRod => { + let behind = self.state(rel(pos, ctx.face.opposite())); + if b.is_block(behind, block) && b.facing(behind) == ctx.face { + Some(table.set_dir(default, p.facing, ctx.face.opposite())) + } else { + Some(table.set_dir(default, p.facing, ctx.face)) + } + } + Class::LightningRod => Some(wl(table.set_dir(default, p.facing, ctx.face))), + Class::ShulkerBox => Some(table.set_dir(default, p.facing, ctx.face)), + Class::FaceAttachedHorizontalDirectional => { + for direction in ctx.nearest_looking_directions() { + let state = if axis_of(direction) == Axis::Y { + let face = if direction == Direction::Up { + "ceiling" + } else { + "floor" + }; + table.set_dir(table.set_text(default, p.face, face), p.facing, horizontal) + } else { + table.set_dir( + table.set_text(default, p.face, "wall"), + p.facing, + direction.opposite(), + ) + }; + if self.can_survive(state, pos) { + return Some(Some(state)); + } + } + None + } + Class::Farmland => { + if !self.can_survive(default, pos) { + Some(b.default_of(b.data(default).link.unwrap_or(n.dirt))) + } else { + sup!() + } + } + Class::Path => { + if !self.can_survive(default, pos) { + Some(b.default_of(n.dirt)) + } else { + sup!() + } + } + Class::Fence => { + let mut state = sup!()?; + for direction in HORIZONTAL { + let neighbour = self.rel_state(pos, direction); + let sturdy = b.is_face_sturdy(neighbour, direction.opposite()); + let connect = + self.fence_connects_to(default, neighbour, sturdy, direction.opposite()); + state = table.set_bool(state, self.direction_prop(direction), connect); + } + Some(wl(state)) + } + Class::IronBars => { + let mut state = default; + for direction in [ + Direction::North, + Direction::South, + Direction::West, + Direction::East, + ] { + let neighbour = self.rel_state(pos, direction); + let sturdy = b.is_face_sturdy(neighbour, direction.opposite()); + state = table.set_bool( + state, + self.direction_prop(direction), + self.bars_attach_to(neighbour, sturdy), + ); + } + Some(wl(state)) + } + Class::Wall => { + let sides = [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, + ] + .map(|direction| { + let neighbour = self.rel_state(pos, direction); + self.wall_connects_to( + neighbour, + b.is_face_sturdy(neighbour, direction.opposite()), + direction.opposite(), + ) + }); + let top_pos = above(pos); + let top = self.state(top_pos); + Some(self.wall_shape(wl(default), top_pos, top, sides)) + } + Class::FenceGate => { + let open = self.has_neighbor_signal(pos); + let wall = |sim: &Self, d: Direction| b.in_set(sim.rel_state(pos, d), &t.walls); + let in_wall = match axis_of(horizontal) { + Axis::Z => wall(self, Direction::West) || wall(self, Direction::East), + _ => wall(self, Direction::North) || wall(self, Direction::South), + }; + let state = table.set_dir(default, p.facing, horizontal); + let state = table.set_bool(table.set_bool(state, p.open, open), p.powered, open); + Some(table.set_bool(state, p.in_wall, in_wall)) + } + Class::GrowingPlant => { + let growth = b.block_data(block).growth_direction; + let (head, body) = self.growing_plant_pair(block); + let next = self.rel_state(pos, growth); + if !b.is_block(next, head) && !b.is_block(next, body) { + if b.block_data(block).is(Class::GrowingPlantHead) { + let age = self.random().next_int_bound(25).unwrap_or(0); + Some(table.set_int(default, p.age, age)) + } else { + Some(default) + } + } else { + Some(b.default_of(body)) + } + } + Class::Kelp => { + let fluid = self.fluid_at(pos); + if b.is_water_fluid(fluid.kind()) && fluid.is_full() { + sup!() + } else { + None + } + } + Class::Seagrass => { + let fluid = self.fluid_at(pos); + if b.is_water_fluid(fluid.kind()) && fluid.is_full() { + sup!() + } else { + None + } + } + Class::HangingRoots => { + let state = sup!()?; + Some(wl(state)) + } + Class::Hopper => { + let direction = ctx.face.opposite(); + let facing = if axis_of(direction) == Axis::Y { + Direction::Down + } else { + direction + }; + Some(table.set_bool(table.set_dir(default, p.facing, facing), p.enabled, true)) + } + Class::HugeMushroom => { + let mut state = default; + for direction in Direction::ALL { + let same = b.is_block(self.rel_state(pos, direction), block); + state = table.set_bool(state, self.direction_prop(direction), !same); + } + Some(state) + } + Class::Lantern => { + for direction in ctx.nearest_looking_directions() { + if axis_of(direction) == Axis::Y { + let state = table.set_bool(default, p.hanging, direction == Direction::Up); + if self.can_survive(state, pos) { + return Some(Some(wl(state))); + } + } + } + None + } + Class::Leaves => { + let state = wl(table.set_bool(default, p.persistent, true)); + let mut distance = 7; + for direction in Direction::ALL { + distance = + distance.min(self.leaf_distance_at(self.rel_state(pos, direction)) + 1); + if distance == 1 { + break; + } + } + Some(table.set_int(state, p.distance, distance)) + } + Class::MangrovePropagule => { + let state = sup!()?; + Some(table.set_int(wl(state), p.age, 4)) + } + Class::MossyCarpet => Some(self.mossy_carpet_updated_state(default, pos, true)), + Class::Multiface => { + let old = self.state(pos); + for direction in ctx.nearest_looking_directions() { + if let Some(state) = self.multiface_placement(block, old, pos, direction) { + return Some(Some(state)); + } + } + None + } + Class::Note => Some(self.note_block_instrument(pos, default)), + Class::RedstoneLamp => { + let signal = self.has_neighbor_signal(pos); + Some(table.set_bool(default, p.lit, signal)) + } + Class::RedstoneWire => { + let cross = self.wire_cross_state(0); + Some(self.wire_connection_state(cross, pos)) + } + Class::Scaffolding => { + let distance = self.scaffolding_distance(pos); + let bottom = self.scaffolding_is_bottom(pos, distance); + let water = self.fluid_at(pos).kind() == crate::fluid::FluidKind::Water; + let state = table.set_bool(default, p.waterlogged, water); + Some(table.set_bool(table.set_int(state, p.distance, distance), p.bottom, bottom)) + } + Class::Slab => { + let replaced = self.state(pos); + if b.is_block(replaced, block) { + return Some(Some(table.set_bool( + table.set_text(replaced, p.kind, "double"), + p.waterlogged, + false, + ))); + } + let result = wl(table.set_text(default, p.kind, "bottom")); + if ctx.half_from_click() { + Some(result) + } else { + Some(table.set_text(result, p.kind, "top")) + } + } + Class::Stair => { + let half = if ctx.half_from_click() { + "bottom" + } else { + "top" + }; + let state = + wl(table.set_text(table.set_dir(default, p.facing, horizontal), p.half, half)); + let shape = self.stairs_shape(state, pos); + Some(table.set_text(state, p.shape, shape)) + } + Class::TrapDoor => { + let mut state = if !ctx.replace_clicked && is_horizontal(ctx.face) { + let top = ctx.hit.y - f64::from(pos.y) > 0.5; + table.set_text( + table.set_dir(default, p.facing, ctx.face), + p.half, + if top { "top" } else { "bottom" }, + ) + } else { + let half = if ctx.face == Direction::Up { + "bottom" + } else { + "top" + }; + table.set_text( + table.set_dir(default, p.facing, horizontal.opposite()), + p.half, + half, + ) + }; + if self.has_neighbor_signal(pos) { + state = table.set_bool(table.set_bool(state, p.open, true), p.powered, true); + } + Some(wl(state)) + } + Class::Snowy => { + let snowy = b.in_set(self.above_state(pos), &t.snow); + Some(table.set_bool(default, p.snowy, snowy)) + } + Class::Speleothem => { + let default_tip = ctx.nearest_looking_vertical().opposite(); + let tip = if self.is_valid_speleothem_placement(block, pos, default_tip) { + default_tip + } else if self.is_valid_speleothem_placement(block, pos, default_tip.opposite()) { + default_tip.opposite() + } else { + return Some(None); + }; + let thickness = self.speleothem_thickness_for(block, pos, tip, !ctx.sneaking); + let state = table.set_dir(default, p.vertical_direction, tip); + Some(wl(table.set_text(state, p.thickness, thickness))) + } + Class::TripWire => { + let mut state = default; + for direction in HORIZONTAL { + let connect = + self.tripwire_should_connect_to(self.rel_state(pos, direction), direction); + state = table.set_bool(state, self.direction_prop(direction), connect); + } + Some(state) + } + Class::Vine => { + let clicked = self.state(pos); + let clicked_vine = b.is_block(clicked, block); + let result = if clicked_vine { clicked } else { default }; + for direction in ctx.nearest_looking_directions() { + if direction != Direction::Down { + let key = self.direction_prop(direction); + let occupied = clicked_vine && table.bool(clicked, key); + if !occupied && self.vine_can_support_at(result, pos, direction) { + return Some(Some(table.set_bool(result, key, true))); + } + } + } + if clicked_vine { Some(result) } else { None } + } + Class::PotentSulfur => Some(self.potent_sulfur_state(default, pos)), + Class::Nylium => sup!(), + _ => return None, + }) + } + + fn chest_candidate_partner_facing( + &self, + chest: BlockStateId, + pos: BlockPos, + direction: Direction, + ) -> Option<Direction> { + let state = self.rel_state(pos, direction); + if self.chest_can_connect_to(chest, state) + && self.b.table.text(state, self.b.props.kind) == "single" + { + Some(self.b.facing(state)) + } else { + None + } + } + /// `ChorusPlantBlock.getStateWithConnections`. + pub(crate) fn chorus_plant_with_connections( + &self, + pos: BlockPos, + state: BlockStateId, + ) -> BlockStateId { + let b = self.b; + let block = b.block(state); + let flower = b.named.chorus_flower; + let mut result = state; + for direction in Direction::ALL { + let neighbour = self.rel_state(pos, direction); + let mut connect = b.is_block(neighbour, block) || b.is_block(neighbour, flower); + if direction == Direction::Down { + connect |= b.in_set(neighbour, &b.tags.supports_chorus_plant); + } + result = b + .table + .with_bool(result, self.direction_prop(direction), connect) + .unwrap_or(result); + } + result + } + fn wall_hanging_sign_can_place(&self, state: BlockStateId, pos: BlockPos) -> bool { + let b = self.b; + let facing = b.facing(state); + let attach = |side: Direction, face: Direction| { + let attach_state = self.rel_state(pos, side); + if b.tag("minecraft:wall_hanging_signs") + .is_some_and(|tag| b.in_set(attach_state, tag)) + { + axis_of(b.facing(attach_state)) == axis_of(facing) + } else { + b.is_face_sturdy(attach_state, face) + } + }; + attach(clockwise(facing), counter_clockwise(facing)) + || attach(counter_clockwise(facing), clockwise(facing)) + } + fn multiface_placement( + &self, + block: BlockId, + old: BlockStateId, + pos: BlockPos, + direction: Direction, + ) -> Option<BlockStateId> { + let b = self.b; + if b.is_block(old, block) && self.multiface_has_face(old, direction) { + return None; + } + if !b.multiface_can_attach(self.rel_state(pos, direction), direction) { + return None; + } + let state = if b.is_block(old, block) { + old + } else if b.fluid(old) == FluidState::WATER { + b.table + .set_bool(b.default_of(block), b.props.waterlogged, true) + } else { + b.default_of(block) + }; + Some( + b.table + .set_bool(state, self.direction_prop(direction), true), + ) + } + fn vine_can_support_at(&self, vine: BlockStateId, pos: BlockPos, direction: Direction) -> bool { + let b = self.b; + if direction == Direction::Down { + return false; + } + if b.multiface_can_attach(self.rel_state(pos, direction), direction) { + return true; + } + if direction == Direction::Up { + return false; + } + let above_state = self.above_state(pos); + b.is_block(above_state, b.block(vine)) + && b.table.bool(above_state, self.direction_prop(direction)) + } + fn speleothem_thickness_for( + &self, + block: BlockId, + pos: BlockPos, + tip: Direction, + merge: bool, + ) -> &'static str { + let b = self.b; + let p = b.props; + let base = tip.opposite(); + let is_with = |state: BlockStateId, direction: Direction| { + b.tag("minecraft:speleothems") + .is_some_and(|tag| b.in_set(state, tag)) + && b.table.dir(state, p.vertical_direction) == Some(direction) + }; + let front = self.rel_state(pos, tip); + if is_with(front, base) && b.is_block(front, block) { + if !merge && b.table.text(front, p.thickness) != "tip_merge" { + "tip" + } else { + "tip_merge" + } + } else if !is_with(front, tip) { + "tip" + } else { + let thickness = b.table.text(front, p.thickness); + if thickness != "tip" && thickness != "tip_merge" { + if !is_with(self.rel_state(pos, base), tip) { + "base" + } else { + "middle" + } + } else { + "frustum" + } + } + } + /// `DoorBlock.getHinge`. + fn door_hinge(&self, ctx: &Ctx) -> &'static str { + let b = self.b; + let pos = ctx.pos; + let place = ctx.horizontal_direction(); + let above_pos = above(pos); + let left = counter_clockwise(place); + let right = clockwise(place); + let left_state = self.rel_state(pos, left); + let left_above = self.rel_state(above_pos, left); + let right_state = self.rel_state(pos, right); + let right_above = self.rel_state(above_pos, right); + let full = |s: BlockStateId| b.full_collision(s); + let balance = -i32::from(full(left_state)) - i32::from(full(left_above)) + + i32::from(full(right_state)) + + i32::from(full(right_above)); + let lower_door = |s: BlockStateId| { + b.instance_of(s, Class::Door) && b.table.text(s, b.props.half) == "lower" + }; + let door_left = lower_door(left_state); + let door_right = lower_door(right_state); + if (door_left && !door_right) || balance > 0 { + return "right"; + } + if (door_right && !door_left) || balance < 0 { + return "left"; + } + let step_x = place.normal()[0]; + let step_z = place.normal()[2]; + let click_x = ctx.hit.x - f64::from(pos.x); + let click_z = ctx.hit.z - f64::from(pos.z); + if (step_x >= 0 || click_z >= 0.5) + && (step_x <= 0 || click_z <= 0.5) + && (step_z >= 0 || click_x <= 0.5) + && (step_z <= 0 || click_x >= 0.5) + { + "left" + } else { + "right" + } + } + + /// `Block.setPlacedBy` for the blocks that place companions. + fn set_placed_by(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let p = b.props; + let data = b.data(state); + let block = b.block(state); + if data.is(Class::AbstractBed) { + let other = rel(pos, b.facing(state)); + self.set_block_and_update(other, b.table.set_text(state, p.part, "head")); + } else if data.is(Class::Crafter) { + if b.table.bool(state, p.triggered) { + self.schedule_tick(pos, block, 4); + } + } else if data.is(Class::Diode) { + if self.diode_should_turn_on(pos, state) { + self.schedule_tick(pos, block, 1); + } + } else if data.is(Class::Door) { + self.set_block_and_update(above(pos), b.table.set_text(state, p.half, "upper")); + } else if data.is(Class::PitcherCrop) { + } else if data.is(Class::SmallDripleaf) { + let above_pos = above(pos); + let upper = b.table.set_dir( + b.table.set_text(b.default_of(block), p.half, "upper"), + p.facing, + b.facing(state), + ); + let water = self.is_water_at(above_pos); + let upper = b + .table + .with_bool(upper, p.waterlogged, water) + .unwrap_or(upper); + self.set_block_and_update(above_pos, upper); + } else if data.is(Class::DoublePlant) { + let above_pos = above(pos); + let upper = b.table.set_text(b.default_of(block), p.half, "upper"); + let water = self.is_water_at(above_pos); + let upper = b + .table + .with_bool(upper, p.waterlogged, water) + .unwrap_or(upper); + self.set_block_and_update(above_pos, upper); + } else if data.is(Class::PistonBase) { + self.piston_check_if_extend(pos, state); + } else if data.is(Class::TripWireHook) { + self.tripwire_hook_calculate(pos, state, false, false, -1, None); + } else if data.is(Class::MossyCarpet) { + let topper = self.mossy_carpet_topper(pos); + if !b.is_air(topper) { + self.set_block_and_update(above(pos), topper); + } + } + } + /// `MossyCarpetBlock.createTopperWithSideChance(level, pos, random::nextBoolean)`. + fn mossy_carpet_topper(&mut self, pos: BlockPos) -> BlockStateId { + let b = self.b; + let p = b.props; + let block = b.block(self.state(pos)); + let above_pos = above(pos); + let above_state = self.state(above_pos); + let is_carpet = b.is_block(above_state, block); + if (!is_carpet || !b.table.bool(above_state, p.bottom)) + && (is_carpet || b.is_replaceable(above_state)) + { + let carpet = b.table.set_bool(b.default_of(block), p.bottom, false); + let updated = self.mossy_carpet_updated_state(carpet, above_pos, true); + let mut result = updated; + for direction in HORIZONTAL { + let key = self.direction_prop(direction); + if b.table.text(result, key) != "none" && !self.random().next_boolean() { + result = b.table.set_text(result, key, "none"); + } + } + if self.mossy_carpet_has_faces(result) && result != above_state { + return result; + } + } + b.air() + } + + /// `BlockItem.place` (and its subclasses' overrides). + /// `BlockPlaceContext` resolution, `updatePlacementContext` and the item's + /// `getPlacementState` (survival and obstruction checks included). + pub(crate) fn placement( + &mut self, + input: &PlaceContext, + ) -> Option<(Ctx, super::data::ItemBinding, BlockStateId)> { + let b = self.b; + let binding = b.item_binding(&input.item).cloned()?; + let mut ctx = Ctx { + pos: input.clicked_pos, + hit_pos: input.clicked_pos, + face: input.face, + hit: input.hit, + inside: input.inside, + yaw: input.yaw, + pitch: input.pitch, + sneaking: input.sneaking, + item: input.item.clone(), + replace_clicked: true, + }; + ctx.replace_clicked = self.can_be_replaced(self.state(input.clicked_pos), &ctx); + if !ctx.replace_clicked { + ctx.pos = rel(input.clicked_pos, input.face); + } + if !ctx.replace_clicked && !self.can_be_replaced(self.state(ctx.pos), &ctx) { + return None; + } + if binding.kind == ItemKind::Scaffolding { + ctx = self.scaffolding_update_context(&ctx, binding.block)?; + } + if binding.game_master && !input.can_use_game_master_blocks { + return None; + } + let state = match binding.kind { + ItemKind::StandingAndWall | ItemKind::HangingSign => { + let wall = binding + .wall_block + .and_then(|wall| self.state_for_placement(wall, &ctx)); + let attachment = binding.attachment.unwrap_or(Direction::Down); + let mut chosen = None; + for direction in ctx.nearest_looking_directions() { + if direction == attachment.opposite() { + continue; + } + let candidate = if direction == attachment { + self.state_for_placement(binding.block, &ctx) + } else { + wall + }; + if let Some(candidate) = candidate { + let hanging_ok = binding.kind != ItemKind::HangingSign + || !b.instance_of(candidate, Class::WallHangingSign) + || self.wall_hanging_sign_can_place(candidate, ctx.pos); + if hanging_ok && self.can_survive(candidate, ctx.pos) { + chosen = Some(candidate); + break; + } + } + } + chosen.filter(|state| self.level.is_unobstructed(ctx.pos, *state)) + } + _ => { + let must_survive = binding.kind != ItemKind::Scaffolding; + self.state_for_placement(binding.block, &ctx) + .filter(|state| { + (!must_survive || self.can_survive(*state, ctx.pos)) + && self.level.is_unobstructed(ctx.pos, *state) + }) + } + }; + state.map(|state| (ctx, binding, state)) + } + + /// `BlockItem.place` (and its subclasses' overrides). + pub(crate) fn place(&mut self, input: &PlaceContext) -> PlaceOutcome { + let b = self.b; + let Some((ctx, binding, state)) = self.placement(input) else { + return PlaceOutcome::Failed; + }; + if !self.is_in_valid_bounds(ctx.pos) { + return PlaceOutcome::Failed; + } + + if binding.kind == ItemKind::DoubleHigh { + let above_pos = above(ctx.pos); + let replacement = if self.is_water_at(above_pos) { + b.default_of(b.named.water) + } else { + b.air() + }; + self.set_block(above_pos, replacement, 27); + } + if !self.set_block(ctx.pos, state, 11) { + return PlaceOutcome::Failed; + } + let placed = self.state(ctx.pos); + if b.block(placed) == b.block(state) { + self.set_placed_by(ctx.pos, placed); + } + let placed = self.state(ctx.pos); + let sounds = b.data(placed).sounds.clone(); + self.emit(LevelEvent::Sound { + pos: ctx.pos, + sound: sounds.place.clone(), + volume: (sounds.volume + 1.0) / 2.0, + pitch: sounds.pitch * 0.8, + }); + self.game_event(ctx.pos, "minecraft:block_place"); + PlaceOutcome::Placed { + pos: ctx.pos, + state: placed, + } + } + /// `ScaffoldingBlockItem.updatePlacementContext`. + fn scaffolding_update_context(&self, ctx: &Ctx, block: BlockId) -> Option<Ctx> { + let b = self.b; + let pos = ctx.pos; + if !b.is_block(self.state(pos), block) { + return if self.scaffolding_distance(pos) == 7 { + None + } else { + Some(ctx.clone()) + }; + } + let direction = if ctx.sneaking { + if ctx.inside { + ctx.face.opposite() + } else { + ctx.face + } + } else if ctx.face == Direction::Up { + ctx.horizontal_direction() + } else { + Direction::Up + }; + let mut horizontal_distance = 0; + let mut placement = rel(pos, direction); + while horizontal_distance < 7 { + if !self.is_in_valid_bounds(placement) { + break; + } + let replaced = self.state(placement); + if !b.is_block(replaced, block) { + if self.can_be_replaced(replaced, ctx) { + let [dx, dy, dz] = direction.normal(); + return Some(Ctx { + pos: placement, + hit_pos: placement, + face: direction, + hit: Vec3::new( + f64::from(placement.x) + 0.5 + f64::from(dx) * 0.5, + f64::from(placement.y) + 0.5 + f64::from(dy) * 0.5, + f64::from(placement.z) + 0.5 + f64::from(dz) * 0.5, + ), + inside: false, + replace_clicked: true, + ..ctx.clone() + }); + } + break; + } + placement = rel(placement, direction); + if is_horizontal(direction) { + horizontal_distance += 1; + } + } + None + } +} + +impl Behaviours { + /// `BlockItem.place` for the item in `ctx`: resolves the replaced + /// position, computes `getStateForPlacement`, checks survival and entity + /// obstruction, writes the block (flags 11), runs `setPlacedBy` (second + /// halves of doors, beds, tall plants) and reports the place sound. + pub fn place_block<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + ctx: &PlaceContext, + ) -> PlaceOutcome { + self.sim(level, ticks).place(ctx) + } + /// The position and state `BlockItem.place` would place for `ctx`, without + /// writing anything (None when vanilla's placement fails). + pub fn placement_state<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + ctx: &PlaceContext, + ) -> Option<(BlockPos, BlockStateId)> { + self.sim(level, ticks) + .placement(ctx) + .map(|(ctx, _, state)| (ctx.pos, state)) + } + /// `getStateForPlacement` of `block` for `ctx` without placing anything + /// (`None` when vanilla refuses the placement). The position is resolved + /// as `BlockPlaceContext` does. + pub fn state_for_placement<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + block: BlockId, + input: &PlaceContext, + ) -> Option<BlockStateId> { + let mut sim = self.sim(level, ticks); + let mut ctx = Ctx { + pos: input.clicked_pos, + hit_pos: input.clicked_pos, + face: input.face, + hit: input.hit, + inside: input.inside, + yaw: input.yaw, + pitch: input.pitch, + sneaking: input.sneaking, + item: input.item.clone(), + replace_clicked: true, + }; + ctx.replace_clicked = sim.can_be_replaced(sim.state(input.clicked_pos), &ctx); + if !ctx.replace_clicked { + ctx.pos = rel(input.clicked_pos, input.face); + } + sim.state_for_placement(block, &ctx) + } +} diff --git a/crates/horizon-world/src/level/query.rs b/crates/horizon-world/src/level/query.rs new file mode 100644 index 000000000..f10bd158a --- /dev/null +++ b/crates/horizon-world/src/level/query.rs @@ -0,0 +1,235 @@ +//! Block-state queries shared by the ported behaviour (`BlockStateBase` +//! accessors and `Block` static helpers). +use super::{ + Behaviours, LevelAccess, Sim, + classes::{Class, Interface}, + data::{BlockSet, state_flags}, + states::{BlockId, PropKey}, + update::{above, below, rel}, +}; +use crate::{fluid::FluidKind, registry::BlockStateId}; +use horizon_core::{geometry::Direction, position::BlockPos}; + +pub(crate) const fn clockwise(direction: Direction) -> Direction { + match direction { + Direction::North => Direction::East, + Direction::East => Direction::South, + Direction::South => Direction::West, + Direction::West => Direction::North, + other => other, + } +} +pub(crate) const fn counter_clockwise(direction: Direction) -> Direction { + match direction { + Direction::North => Direction::West, + Direction::West => Direction::South, + Direction::South => Direction::East, + Direction::East => Direction::North, + other => other, + } +} +pub(crate) const fn is_horizontal(direction: Direction) -> bool { + !matches!(direction, Direction::Up | Direction::Down) +} +pub(crate) fn axis_of(direction: Direction) -> horizon_core::geometry::Axis { + use horizon_core::geometry::Axis; + match direction { + Direction::West | Direction::East => Axis::X, + Direction::Up | Direction::Down => Axis::Y, + Direction::North | Direction::South => Axis::Z, + } +} +/// `Direction.from2DDataValue` (S, W, N, E). +pub(crate) fn from_2d(value: i32) -> Direction { + [ + Direction::South, + Direction::West, + Direction::North, + Direction::East, + ][value.rem_euclid(4) as usize] +} +pub(crate) fn data_2d(direction: Direction) -> i32 { + match direction { + Direction::South => 0, + Direction::West => 1, + Direction::North => 2, + Direction::East => 3, + _ => -1, + } +} + +impl Behaviours { + pub(crate) fn in_set(&self, state: BlockStateId, set: &BlockSet) -> bool { + set.contains(self.table.block(state)) + } + pub(crate) fn is_block(&self, state: BlockStateId, block: BlockId) -> bool { + self.table.is(state, block) + } + pub(crate) fn instance_of(&self, state: BlockStateId, class: Class) -> bool { + self.data(state).is(class) + } + pub(crate) fn implements(&self, state: BlockStateId, interface: Interface) -> bool { + self.data(state).implements(interface) + } + pub(crate) fn fluid_in(&self, kind: FluidKind, mask: u8) -> bool { + mask & (1 << kind as u8) != 0 + } + pub(crate) fn is_water_fluid(&self, kind: FluidKind) -> bool { + self.fluid_in(kind, self.fluid_tags.water) + } + pub(crate) fn is_lava_fluid(&self, kind: FluidKind) -> bool { + self.fluid_in(kind, self.fluid_tags.lava) + } + pub(crate) fn liquid(&self, state: BlockStateId) -> bool { + self.has_flag(state, state_flags::LIQUID) + } + pub(crate) fn solid_render(&self, state: BlockStateId) -> bool { + self.has_flag(state, state_flags::SOLID_RENDER) + } + pub(crate) fn full_collision(&self, state: BlockStateId) -> bool { + self.has_flag(state, state_flags::FULL_COLLISION) + } + /// `Block.isFaceFull(state.getCollisionShape(level, pos), direction)`. + pub(crate) fn collision_face_full(&self, state: BlockStateId, direction: Direction) -> bool { + self.shape_info(state).full_faces & (1 << direction as u8) != 0 + } + /// `MultifaceBlock.canAttachTo(level, direction, neighbourPos, neighbourState)`. + pub(crate) fn multiface_can_attach( + &self, + neighbour: BlockStateId, + direction: Direction, + ) -> bool { + let face = direction.opposite(); + self.is_face_sturdy(neighbour, face) || self.collision_face_full(neighbour, face) + } + /// `Block.isExceptionForConnection`. + pub(crate) fn is_exception_for_connection(&self, state: BlockStateId) -> bool { + let n = &self.named; + let block = self.table.block(state); + self.instance_of(state, Class::Leaves) + || block == n.barrier + || block == n.carved_pumpkin + || block == n.jack_o_lantern + || block == n.melon + || block == n.pumpkin + || self.tags.shulker_boxes.contains(block) + } + pub(crate) fn is_waterlogged(&self, state: BlockStateId) -> bool { + self.table.bool(state, self.props.waterlogged) + } + pub(crate) fn facing(&self, state: BlockStateId) -> Direction { + self.table + .dir(state, self.props.facing) + .unwrap_or(Direction::North) + } + /// The boolean/enum property named after `direction` (`north`, `up`, ...). + pub(crate) fn dir_prop(&self, direction: Direction) -> PropKey { + let p = &self.props; + match direction { + Direction::Down => p.down, + Direction::Up => p.up, + Direction::North => p.north, + Direction::South => p.south, + Direction::West => p.west, + Direction::East => p.east, + } + } + pub(crate) fn default_of(&self, block: BlockId) -> BlockStateId { + self.table.default_state(block) + } + pub(crate) fn air(&self) -> BlockStateId { + self.table.default_state(self.named.air) + } +} + +/// Block-entity lookups for dynamic shapes: Horizon's level keeps no shulker +/// box animation state, so boxes read as closed (a full cube). +struct NoBlockEntities; +impl crate::dynamic_support::DynamicSupportWorld for NoBlockEntities { + type Error = std::convert::Infallible; + fn shulker_is_closed(&mut self, _position: [i32; 3]) -> Result<Option<bool>, Self::Error> { + Ok(None) + } + fn moving_piston_shape( + &mut self, + _position: [i32; 3], + ) -> Result<Option<horizon_core::geometry::VoxelShape>, Self::Error> { + Ok(None) + } +} +impl crate::block_collision::DynamicCollisionWorld for NoBlockEntities { + fn shulker_collision_state( + &mut self, + _position: [i32; 3], + ) -> Result<Option<crate::block_collision::ShulkerCollisionState>, Self::Error> { + Ok(None) + } +} + +impl<L: LevelAccess + ?Sized> Sim<'_, L> { + /// Shape queries over `getCollisionShape(level, pos)`, including the + /// position-dependent shapes (bamboo, speleothems, shulker boxes). + pub(crate) fn shape_info_at( + &self, + state: BlockStateId, + pos: BlockPos, + ) -> super::data::ShapeInfo { + if self.b.facts(state).shape >= 0 { + return self.b.shape_info(state); + } + match self.b.dynamic.get(&state) { + Some(support) => support + .collision_shape(&mut NoBlockEntities, [pos.x, pos.y, pos.z]) + .ok() + .and_then(|shape| super::data::analyse_shape(&shape).ok()) + .unwrap_or_default(), + None => super::data::ShapeInfo::default(), + } + } + pub fn sturdy(&self, pos: BlockPos, direction: Direction) -> bool { + self.b.is_face_sturdy(self.state(pos), direction) + } + /// `Block.canSupportRigidBlock(level, below)`. + pub fn can_support_rigid_block(&self, pos: BlockPos) -> bool { + self.b.is_face_sturdy_rigid(self.state(pos), Direction::Up) + } + /// `Block.canSupportCenter(level, pos, direction)`. + pub fn can_support_center(&self, pos: BlockPos, direction: Direction) -> bool { + let state = self.state(pos); + if direction == Direction::Down && self.b.in_set(state, &self.b.tags.unstable_bottom_center) + { + return false; + } + self.b.is_face_sturdy_center(state, direction) + } + pub fn is_empty_block(&self, pos: BlockPos) -> bool { + self.b.is_air(self.state(pos)) + } + /// `LevelReader.isWaterAt`: the fluid at `pos` is in the water tag. + pub fn is_water_at(&self, pos: BlockPos) -> bool { + self.b.is_water_fluid(self.fluid_at(pos).kind()) + } + /// `Level.getRawBrightness(pos, darken)`. + pub fn raw_brightness(&self, pos: BlockPos, darken: i32) -> i32 { + super::raw_brightness(self.level, pos, darken) + } + /// `LevelReader.getMaxLocalRawBrightness(pos)`. + pub fn max_local_raw_brightness(&self, pos: BlockPos) -> i32 { + self.raw_brightness(pos, self.level.sky_darken()) + } + pub fn is_redstone_conductor(&self, state: BlockStateId, _pos: BlockPos) -> bool { + self.b.has_flag(state, state_flags::CONDUCTOR) + } + pub(crate) fn above_state(&self, pos: BlockPos) -> BlockStateId { + self.state(above(pos)) + } + pub(crate) fn below_state(&self, pos: BlockPos) -> BlockStateId { + self.state(below(pos)) + } + pub(crate) fn rel_state(&self, pos: BlockPos, direction: Direction) -> BlockStateId { + self.state(rel(pos, direction)) + } + pub(crate) fn is_inside_build_height(&self, y: i32) -> bool { + y >= self.level.min_y() && y < self.level.max_y() + } +} diff --git a/crates/horizon-world/src/level/rails.rs b/crates/horizon-world/src/level/rails.rs new file mode 100644 index 000000000..b5a784796 --- /dev/null +++ b/crates/horizon-world/src/level/rails.rs @@ -0,0 +1,721 @@ +//! Rails (`BaseRailBlock`, `RailState`, powered/activator rails) and +//! tripwires (`TripWireBlock`, `TripWireHookBlock`). +use super::{ + LevelAccess, LevelEvent, Sim, + classes::Class, + states::BlockId, + update::{above, below, rel}, +}; +use crate::registry::BlockStateId; +use horizon_core::{ + geometry::{Aabb, Direction, Vec3}, + position::BlockPos, + random::RandomSource, +}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +enum RailShape { + NorthSouth, + EastWest, + AscendingEast, + AscendingWest, + AscendingNorth, + AscendingSouth, + SouthEast, + SouthWest, + NorthWest, + NorthEast, +} +impl RailShape { + fn parse(text: &str) -> Self { + match text { + "east_west" => Self::EastWest, + "ascending_east" => Self::AscendingEast, + "ascending_west" => Self::AscendingWest, + "ascending_north" => Self::AscendingNorth, + "ascending_south" => Self::AscendingSouth, + "south_east" => Self::SouthEast, + "south_west" => Self::SouthWest, + "north_west" => Self::NorthWest, + "north_east" => Self::NorthEast, + _ => Self::NorthSouth, + } + } + fn name(self) -> &'static str { + match self { + Self::NorthSouth => "north_south", + Self::EastWest => "east_west", + Self::AscendingEast => "ascending_east", + Self::AscendingWest => "ascending_west", + Self::AscendingNorth => "ascending_north", + Self::AscendingSouth => "ascending_south", + Self::SouthEast => "south_east", + Self::SouthWest => "south_west", + Self::NorthWest => "north_west", + Self::NorthEast => "north_east", + } + } + fn is_slope(self) -> bool { + matches!( + self, + Self::AscendingEast | Self::AscendingWest | Self::AscendingNorth | Self::AscendingSouth + ) + } +} + +/// `RailState`. +struct Rail { + pos: BlockPos, + state: BlockStateId, + straight: bool, + connections: Vec<BlockPos>, +} + +impl<L: LevelAccess + ?Sized> Sim<'_, L> { + pub(crate) fn rail_shape(&self, state: BlockStateId) -> &str { + self.b.table.text(state, self.b.props.shape) + } + fn is_rail(&self, state: BlockStateId) -> bool { + self.b.in_set(state, &self.b.tags.rails) && self.b.instance_of(state, Class::BaseRail) + } + fn is_rail_at(&self, pos: BlockPos) -> bool { + self.is_rail(self.state(pos)) + } + fn rail_connections(pos: BlockPos, shape: RailShape) -> Vec<BlockPos> { + let (n, s, w, e) = ( + rel(pos, Direction::North), + rel(pos, Direction::South), + rel(pos, Direction::West), + rel(pos, Direction::East), + ); + match shape { + RailShape::NorthSouth => vec![n, s], + RailShape::EastWest => vec![w, e], + RailShape::AscendingEast => vec![w, above(e)], + RailShape::AscendingWest => vec![above(w), e], + RailShape::AscendingNorth => vec![above(n), s], + RailShape::AscendingSouth => vec![n, above(s)], + RailShape::SouthEast => vec![e, s], + RailShape::SouthWest => vec![w, s], + RailShape::NorthWest => vec![w, n], + RailShape::NorthEast => vec![e, n], + } + } + fn rail_new(&self, pos: BlockPos, state: BlockStateId) -> Rail { + let shape = RailShape::parse(self.rail_shape(state)); + Rail { + pos, + state, + straight: !self.b.data(state).is(Class::Rail), + connections: Self::rail_connections(pos, shape), + } + } + fn rail_get(&self, pos: BlockPos) -> Option<Rail> { + for test in [pos, above(pos), below(pos)] { + let state = self.state(test); + if self.is_rail(state) { + return Some(self.rail_new(test, state)); + } + } + None + } + fn rail_has_connection(rail: &Rail, pos: BlockPos) -> bool { + rail.connections + .iter() + .any(|c| c.x == pos.x && c.z == pos.z) + } + fn rail_remove_soft_connections(&self, rail: &mut Rail) { + let mut i = 0; + while i < rail.connections.len() { + match self.rail_get(rail.connections[i]) { + Some(other) if Self::rail_has_connection(&other, rail.pos) => { + rail.connections[i] = other.pos; + i += 1; + } + _ => { + rail.connections.remove(i); + } + } + } + } + fn rail_can_connect_to(rail: &Rail, other: &Rail) -> bool { + Self::rail_has_connection(rail, other.pos) || rail.connections.len() != 2 + } + fn rail_has_neighbor_rail(&self, rail: &Rail, pos: BlockPos) -> bool { + match self.rail_get(pos) { + Some(mut neighbour) => { + self.rail_remove_soft_connections(&mut neighbour); + Self::rail_can_connect_to(&neighbour, rail) + } + None => false, + } + } + fn rail_count_potential_connections(&self, pos: BlockPos) -> i32 { + super::update::HORIZONTAL + .into_iter() + .filter(|d| { + let p = rel(pos, *d); + self.is_rail_at(p) || self.is_rail_at(above(p)) || self.is_rail_at(below(p)) + }) + .count() as i32 + } + fn rail_slopes(&self, pos: BlockPos, shape: Option<RailShape>) -> Option<RailShape> { + let (n, s, w, e) = ( + rel(pos, Direction::North), + rel(pos, Direction::South), + rel(pos, Direction::West), + rel(pos, Direction::East), + ); + let mut shape = shape; + if shape == Some(RailShape::NorthSouth) { + if self.is_rail_at(above(n)) { + shape = Some(RailShape::AscendingNorth); + } + if self.is_rail_at(above(s)) { + shape = Some(RailShape::AscendingSouth); + } + } + if shape == Some(RailShape::EastWest) { + if self.is_rail_at(above(e)) { + shape = Some(RailShape::AscendingEast); + } + if self.is_rail_at(above(w)) { + shape = Some(RailShape::AscendingWest); + } + } + shape + } + fn rail_set_shape(&self, state: BlockStateId, shape: RailShape) -> BlockStateId { + self.b + .table + .set_text(state, self.b.props.shape, shape.name()) + } + fn rail_connect_to(&mut self, rail: &mut Rail, other_pos: BlockPos) { + rail.connections.push(other_pos); + let pos = rail.pos; + let n = Self::rail_has_connection(rail, rel(pos, Direction::North)); + let s = Self::rail_has_connection(rail, rel(pos, Direction::South)); + let w = Self::rail_has_connection(rail, rel(pos, Direction::West)); + let e = Self::rail_has_connection(rail, rel(pos, Direction::East)); + let mut shape = None; + if n || s { + shape = Some(RailShape::NorthSouth); + } + if w || e { + shape = Some(RailShape::EastWest); + } + if !rail.straight { + if s && e && !n && !w { + shape = Some(RailShape::SouthEast); + } + if s && w && !n && !e { + shape = Some(RailShape::SouthWest); + } + if n && w && !s && !e { + shape = Some(RailShape::NorthWest); + } + if n && e && !s && !w { + shape = Some(RailShape::NorthEast); + } + } + let shape = self + .rail_slopes(pos, shape) + .unwrap_or(RailShape::NorthSouth); + rail.state = self.rail_set_shape(rail.state, shape); + self.set_block_and_update(pos, rail.state); + } + /// `RailState.place`; returns the resulting state. + fn rail_place( + &mut self, + pos: BlockPos, + state: BlockStateId, + has_signal: bool, + first: bool, + default: RailShape, + ) -> BlockStateId { + let mut rail = self.rail_new(pos, state); + let n = self.rail_has_neighbor_rail(&rail, rel(pos, Direction::North)); + let s = self.rail_has_neighbor_rail(&rail, rel(pos, Direction::South)); + let w = self.rail_has_neighbor_rail(&rail, rel(pos, Direction::West)); + let e = self.rail_has_neighbor_rail(&rail, rel(pos, Direction::East)); + let mut shape = None; + let ns = n || s; + let we = w || e; + if ns && !we { + shape = Some(RailShape::NorthSouth); + } + if we && !ns { + shape = Some(RailShape::EastWest); + } + let (se, sw, ne, nw) = (s && e, s && w, n && e, n && w); + if !rail.straight { + if se && !n && !w { + shape = Some(RailShape::SouthEast); + } + if sw && !n && !e { + shape = Some(RailShape::SouthWest); + } + if nw && !s && !e { + shape = Some(RailShape::NorthWest); + } + if ne && !s && !w { + shape = Some(RailShape::NorthEast); + } + } + if shape.is_none() { + if ns && we { + shape = Some(default); + } else if ns { + shape = Some(RailShape::NorthSouth); + } else if we { + shape = Some(RailShape::EastWest); + } + if !rail.straight { + if has_signal { + for (cond, s) in [ + (se, RailShape::SouthEast), + (sw, RailShape::SouthWest), + (ne, RailShape::NorthEast), + (nw, RailShape::NorthWest), + ] { + if cond { + shape = Some(s); + } + } + } else { + for (cond, s) in [ + (nw, RailShape::NorthWest), + (ne, RailShape::NorthEast), + (sw, RailShape::SouthWest), + (se, RailShape::SouthEast), + ] { + if cond { + shape = Some(s); + } + } + } + } + } + let shape = self.rail_slopes(pos, shape).unwrap_or(default); + rail.connections = Self::rail_connections(pos, shape); + rail.state = self.rail_set_shape(rail.state, shape); + if first || self.state(pos) != rail.state { + self.set_block_and_update(pos, rail.state); + for i in 0..rail.connections.len() { + if let Some(mut neighbour) = self.rail_get(rail.connections[i]) { + self.rail_remove_soft_connections(&mut neighbour); + if Self::rail_can_connect_to(&neighbour, &rail) { + self.rail_connect_to(&mut neighbour, rail.pos); + } + } + } + } + rail.state + } + fn rail_update_dir(&mut self, pos: BlockPos, state: BlockStateId, first: bool) -> BlockStateId { + let current = RailShape::parse(self.rail_shape(state)); + let signal = self.has_neighbor_signal(pos); + self.rail_place(pos, state, signal, first, current) + } + /// `BaseRailBlock.updateState(state, level, pos, movedByPiston)`. + pub(crate) fn rail_update_state( + &mut self, + pos: BlockPos, + state: BlockStateId, + moved: bool, + ) -> BlockStateId { + let state = self.rail_update_dir(pos, state, true); + if !self.b.data(state).is(Class::Rail) { + let block = self.b.block(state); + self.neighbor_changed_full(state, pos, block, moved); + } + state + } + pub(crate) fn rail_neighbor_changed( + &mut self, + pos: BlockPos, + state: BlockStateId, + changed: BlockId, + moved: bool, + ) { + let b = self.b; + if !b.is_block(self.state(pos), b.block(state)) { + return; + } + let shape = RailShape::parse(self.rail_shape(state)); + let support = |sim: &Self, p: BlockPos| sim.can_support_rigid_block(p); + let remove = !support(self, below(pos)) + || match shape { + RailShape::AscendingEast => !support(self, rel(pos, Direction::East)), + RailShape::AscendingWest => !support(self, rel(pos, Direction::West)), + RailShape::AscendingNorth => !support(self, rel(pos, Direction::North)), + RailShape::AscendingSouth => !support(self, rel(pos, Direction::South)), + _ => false, + }; + if remove { + self.drop_resources(state, pos); + self.remove_block(pos, moved); + return; + } + let data = b.data(state); + if data.is(Class::PoweredRail) { + self.powered_rail_update(pos, state); + } else if data.is(Class::Rail) { + let changed_default = b.default_of(changed); + if self.is_signal_source_default(changed_default) + && self.rail_count_potential_connections(pos) == 3 + { + self.rail_update_dir(pos, state, false); + } + } + } + fn is_signal_source_default(&self, state: BlockStateId) -> bool { + self.b + .has_flag(state, super::data::state_flags::SIGNAL_SOURCE) + } + fn powered_rail_update(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let powered = b.table.bool(state, b.props.powered); + let should = self.has_neighbor_signal(pos) + || self.powered_rail_find(pos, state, true, 0) + || self.powered_rail_find(pos, state, false, 0); + if should != powered { + self.set_block_and_update(pos, b.table.set_bool(state, b.props.powered, should)); + let block = b.block(state); + self.update_neighbors_at(below(pos), block); + if RailShape::parse(self.rail_shape(state)).is_slope() { + self.update_neighbors_at(above(pos), block); + } + } + } + fn powered_rail_find( + &self, + pos: BlockPos, + state: BlockStateId, + forward: bool, + depth: i32, + ) -> bool { + if depth >= 8 { + return false; + } + let (mut x, mut y, mut z) = (pos.x, pos.y, pos.z); + let mut check_below = true; + let mut shape = RailShape::parse(self.rail_shape(state)); + match shape { + RailShape::NorthSouth => z += if forward { 1 } else { -1 }, + RailShape::EastWest => x += if forward { -1 } else { 1 }, + RailShape::AscendingEast => { + if forward { + x -= 1; + } else { + x += 1; + y += 1; + check_below = false; + } + shape = RailShape::EastWest; + } + RailShape::AscendingWest => { + if forward { + x -= 1; + y += 1; + check_below = false; + } else { + x += 1; + } + shape = RailShape::EastWest; + } + RailShape::AscendingNorth => { + if forward { + z += 1; + } else { + z -= 1; + y += 1; + check_below = false; + } + shape = RailShape::NorthSouth; + } + RailShape::AscendingSouth => { + if forward { + z += 1; + y += 1; + check_below = false; + } else { + z -= 1; + } + shape = RailShape::NorthSouth; + } + _ => {} + } + let block = self.b.block(state); + self.powered_rail_same_with_power(BlockPos::new(x, y, z), block, forward, depth, shape) + || (check_below + && self.powered_rail_same_with_power( + BlockPos::new(x, y - 1, z), + block, + forward, + depth, + shape, + )) + } + fn powered_rail_same_with_power( + &self, + pos: BlockPos, + block: BlockId, + forward: bool, + depth: i32, + dir: RailShape, + ) -> bool { + let b = self.b; + let state = self.state(pos); + if !b.is_block(state, block) { + return false; + } + let mine = RailShape::parse(self.rail_shape(state)); + if dir == RailShape::EastWest + && matches!( + mine, + RailShape::NorthSouth | RailShape::AscendingNorth | RailShape::AscendingSouth + ) + { + return false; + } + if dir == RailShape::NorthSouth + && matches!( + mine, + RailShape::EastWest | RailShape::AscendingEast | RailShape::AscendingWest + ) + { + return false; + } + if !b.table.bool(state, b.props.powered) { + return false; + } + self.has_neighbor_signal(pos) || self.powered_rail_find(pos, state, forward, depth + 1) + } + + // ---- tripwire ---- + + /// `TripWireBlock.updateSource`. + pub(crate) fn tripwire_update_source(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + for direction in [Direction::South, Direction::West] { + for i in 1..42 { + let [dx, dy, dz] = direction.normal(); + let test = pos.offset(dx * i, dy * i, dz * i); + let block = self.state(test); + if b.is_block(block, b.named.tripwire_hook) { + if b.facing(block) == direction.opposite() { + self.tripwire_hook_calculate(test, block, false, true, i, Some(state)); + } + break; + } + if !b.is_block(block, b.named.tripwire) { + break; + } + } + } + } + pub(crate) fn tripwire_tick(&mut self, pos: BlockPos) { + let b = self.b; + let state = self.state(pos); + if b.table.bool(state, b.props.powered) { + self.tripwire_check_pressed(pos); + } + } + /// `TripWireBlock.checkPressed` with the entities currently inside. + pub(crate) fn tripwire_check_pressed(&mut self, pos: BlockPos) { + let b = self.b; + let state = self.state(pos); + let was = b.table.bool(state, b.props.powered); + let top = if b.table.bool(state, b.props.attached) { + 2.5 / 16.0 + } else { + 8.0 / 16.0 + }; + let area = Aabb::new( + Vec3::new( + f64::from(pos.x), + f64::from(pos.y) + 1.0 / 16.0, + f64::from(pos.z), + ), + Vec3::new( + f64::from(pos.x) + 1.0, + f64::from(pos.y) + top, + f64::from(pos.z) + 1.0, + ), + ); + let pressed = self + .level + .count_entities(area, super::EntityQuery::Everything) + > 0; + let block = b.block(state); + if pressed != was { + let next = b.table.set_bool(state, b.props.powered, pressed); + self.set_block_and_update(pos, next); + self.tripwire_update_source(pos, next); + } + if pressed { + self.schedule_tick(pos, block, 10); + } else if was { + self.schedule_tick(pos, block, 1); + } + } + fn tripwire_hook_notify(&mut self, block: BlockId, pos: BlockPos, direction: Direction) { + let front = direction.opposite(); + self.update_neighbors_at(pos, block); + self.update_neighbors_at(rel(pos, front), block); + } + fn tripwire_emit( + &mut self, + pos: BlockPos, + attached: bool, + powered: bool, + was_attached: bool, + was_powered: bool, + ) { + let (sound, volume, pitch, event) = if powered && !was_powered { + ( + "minecraft:block.tripwire.click_on", + 0.4, + 0.6, + "minecraft:block_activate", + ) + } else if !powered && was_powered { + ( + "minecraft:block.tripwire.click_off", + 0.4, + 0.5, + "minecraft:block_deactivate", + ) + } else if attached && !was_attached { + ( + "minecraft:block.tripwire.attach", + 0.4, + 0.7, + "minecraft:block_attach", + ) + } else if !attached && was_attached { + let pitch = 1.2 / (self.random().next_float() * 0.2 + 0.9); + ( + "minecraft:block.tripwire.detach", + 0.4, + pitch, + "minecraft:block_detach", + ) + } else { + return; + }; + self.emit(LevelEvent::Sound { + pos, + sound: sound.into(), + volume, + pitch, + }); + self.game_event(pos, event); + } + /// `TripWireHookBlock.calculateState`. + pub(crate) fn tripwire_hook_calculate( + &mut self, + pos: BlockPos, + state: BlockStateId, + destroyed: bool, + can_update: bool, + wire_source: i32, + wire_source_state: Option<BlockStateId>, + ) { + let b = self.b; + let p = b.props; + let Some(direction) = b.table.dir(state, p.facing) else { + return; + }; + let was_attached = b.table.bool(state, p.attached); + let was_powered = b.table.bool(state, p.powered); + let block = b.block(state); + let mut attached = !destroyed; + let mut powered = false; + let mut receiver = 0; + let mut wires: Vec<Option<BlockStateId>> = vec![None; 42]; + let [dx, dy, dz] = direction.normal(); + for i in 1..42 { + let test = pos.offset(dx * i, dy * i, dz * i); + let mut wire = self.state(test); + if b.is_block(wire, b.named.tripwire_hook) { + if b.facing(wire) == direction.opposite() { + receiver = i; + } + break; + } + if !b.is_block(wire, b.named.tripwire) && i != wire_source { + wires[i as usize] = None; + attached = false; + } else { + if i == wire_source { + wire = wire_source_state.unwrap_or(wire); + } + let armed = !b.table.bool(wire, p.disarmed); + let wire_powered = b.table.bool(wire, p.powered); + powered |= armed && wire_powered; + wires[i as usize] = Some(wire); + if i == wire_source { + self.schedule_tick(pos, block, 10); + attached &= armed; + } + } + } + attached &= receiver > 1; + powered &= attached; + let new_state = b.table.set_bool( + b.table.set_bool(b.default_of(block), p.attached, attached), + p.powered, + powered, + ); + if receiver > 0 { + let test = pos.offset(dx * receiver, dy * receiver, dz * receiver); + let opposite = direction.opposite(); + self.set_block_and_update(test, b.table.set_dir(new_state, p.facing, opposite)); + self.tripwire_hook_notify(block, test, opposite); + if !b.is_block(self.state(pos), b.named.tripwire_hook) { + self.tripwire_hook_removed(pos, new_state); + return; + } + self.tripwire_emit(test, attached, powered, was_attached, was_powered); + } + self.tripwire_emit(pos, attached, powered, was_attached, was_powered); + if !destroyed { + self.set_block_and_update(pos, b.table.set_dir(new_state, p.facing, direction)); + if can_update { + self.tripwire_hook_notify(block, pos, direction); + } + } + if was_attached != attached { + for i in 1..receiver { + let test = pos.offset(dx * i, dy * i, dz * i); + if let Some(wire) = wires[i as usize] { + let current = self.state(test); + if b.is_block(current, b.named.tripwire) + || b.is_block(current, b.named.tripwire_hook) + { + let next = b + .table + .with_bool(wire, p.attached, attached) + .unwrap_or(wire); + self.set_block_and_update(test, next); + } + } + } + } + } + /// `TripWireHookBlock.onRemoved`. + pub(crate) fn tripwire_hook_removed(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let attached = b.table.bool(state, b.props.attached); + let powered = b.table.bool(state, b.props.powered); + if attached || powered { + self.tripwire_hook_calculate(pos, state, true, false, -1, None); + } + if powered { + let facing = b.facing(state); + self.tripwire_hook_notify(b.block(state), pos, facing); + } + } +} diff --git a/crates/horizon-world/src/level/redstone.rs b/crates/horizon-world/src/level/redstone.rs new file mode 100644 index 000000000..ea3440842 --- /dev/null +++ b/crates/horizon-world/src/level/redstone.rs @@ -0,0 +1,1201 @@ +//! Redstone: `SignalGetter`, redstone wire (default evaluator), torches, +//! diodes (repeaters, comparators), observers, lamps and the power-driven +//! responses of doors, trapdoors, gates and other consumers. +use super::{ + LevelAccess, LevelEvent, Sim, + classes::Class, + data::state_flags, + query::{clockwise, counter_clockwise}, + states::BlockId, + update::{HORIZONTAL, above, below, rel}, +}; +use crate::registry::BlockStateId; +use horizon_core::{ + geometry::Direction, position::BlockPos, random::RandomSource, ticks::TickPriority, +}; + +const SIGNAL_ORDER: [Direction; 6] = [ + Direction::Down, + Direction::Up, + Direction::North, + Direction::South, + Direction::West, + Direction::East, +]; + +impl<L: LevelAccess + ?Sized> Sim<'_, L> { + fn nibble(word: u32, direction: Direction) -> i32 { + ((word >> (4 * direction as u32)) & 15) as i32 + } + pub(crate) fn is_signal_source(&self, state: BlockStateId) -> bool { + if self.b.is_block(state, self.b.named.redstone_wire) { + return !self.wire_signal_off.get(); + } + self.b.has_flag(state, state_flags::SIGNAL_SOURCE) + } + /// `BlockState.getSignal(level, pos, direction)`. + pub(crate) fn state_signal( + &self, + state: BlockStateId, + pos: BlockPos, + direction: Direction, + ) -> i32 { + let b = self.b; + if !b.has_flag(state, state_flags::SIGNAL_SOURCE) { + return 0; + } + let data = b.data(state); + match data.class { + Class::RedstoneWire => self.wire_signal(state, pos, direction), + Class::Comparator => { + if b.facing(state) == direction && b.table.bool(state, b.props.powered) { + self.comparator_output(pos) + } else { + 0 + } + } + Class::TrappedChest => self.level.block_entity_signal(pos, state, direction), + _ => Self::nibble(b.facts(state).weak, direction), + } + } + /// `BlockState.getDirectSignal(level, pos, direction)`. + pub(crate) fn state_direct_signal( + &self, + state: BlockStateId, + pos: BlockPos, + direction: Direction, + ) -> i32 { + let b = self.b; + if !b.has_flag(state, state_flags::SIGNAL_SOURCE) { + return 0; + } + match b.data(state).class { + Class::RedstoneWire => { + if self.wire_signal_off.get() { + 0 + } else { + self.wire_signal(state, pos, direction) + } + } + Class::Comparator => self.state_signal(state, pos, direction), + Class::TrappedChest => { + if direction == Direction::Up { + self.level.block_entity_signal(pos, state, direction) + } else { + 0 + } + } + _ => Self::nibble(b.facts(state).strong, direction), + } + } + pub(crate) fn comparator_output(&self, pos: BlockPos) -> i32 { + self.ticks + .comparator_outputs + .get(&pos) + .copied() + .unwrap_or(0) + } + fn wire_signal(&self, state: BlockStateId, pos: BlockPos, direction: Direction) -> i32 { + if self.wire_signal_off.get() || direction == Direction::Down { + return 0; + } + let power = self.b.table.int(state, self.b.props.power); + if power == 0 { + return 0; + } + if direction != Direction::Up { + let connected = self.wire_connection_state(state, pos); + if self + .b + .table + .text(connected, self.direction_prop(direction.opposite())) + == "none" + { + return 0; + } + } + power + } + /// `SignalGetter.getDirectSignal(pos, direction)`. + pub fn direct_signal(&self, pos: BlockPos, direction: Direction) -> i32 { + self.state_direct_signal(self.state(pos), pos, direction) + } + /// `SignalGetter.getDirectSignalTo`. + pub fn direct_signal_to(&self, pos: BlockPos) -> i32 { + let mut result = 0; + for direction in SIGNAL_ORDER { + result = result.max(self.direct_signal(rel(pos, direction), direction)); + if result >= 15 { + return result; + } + } + result + } + /// `SignalGetter.getSignal(pos, direction)`. + pub fn signal(&self, pos: BlockPos, direction: Direction) -> i32 { + let state = self.state(pos); + let signal = self.state_signal(state, pos, direction); + if self.is_redstone_conductor(state, pos) { + signal.max(self.direct_signal_to(pos)) + } else { + signal + } + } + pub fn has_signal(&self, pos: BlockPos, direction: Direction) -> bool { + self.signal(pos, direction) > 0 + } + /// `SignalGetter.hasNeighborSignal`. + pub fn has_neighbor_signal(&self, pos: BlockPos) -> bool { + SIGNAL_ORDER + .into_iter() + .any(|direction| self.signal(rel(pos, direction), direction) > 0) + } + /// `SignalGetter.getBestNeighborSignal`. + pub fn best_neighbor_signal(&self, pos: BlockPos) -> i32 { + let mut best = 0; + for direction in SIGNAL_ORDER { + let signal = self.signal(rel(pos, direction), direction); + if signal >= 15 { + return 15; + } + best = best.max(signal); + } + best + } + /// `SignalGetter.getControlInputSignal`. + fn control_input_signal(&self, pos: BlockPos, direction: Direction, only_diodes: bool) -> i32 { + let b = self.b; + let state = self.state(pos); + if only_diodes { + if b.instance_of(state, Class::Diode) { + self.direct_signal(pos, direction) + } else { + 0 + } + } else if b.is_block(state, b.named.redstone_block) { + 15 + } else if b.is_block(state, b.named.redstone_wire) { + b.table.int(state, b.props.power) + } else if self.is_signal_source(state) { + self.direct_signal(pos, direction) + } else { + 0 + } + } + + // ---- redstone wire ---- + + fn should_wire_connect_to(&self, state: BlockStateId, direction: Option<Direction>) -> bool { + let b = self.b; + match b.data(state).class { + Class::RedstoneWire => true, + Class::Observer => direction == Some(b.facing(state)), + Class::Repeater => { + let facing = b.facing(state); + direction == Some(facing) || direction == Some(facing.opposite()) + } + _ => self.is_signal_source(state) && direction.is_some(), + } + } + fn wire_can_survive_on(&self, state: BlockStateId) -> bool { + self.b.is_face_sturdy(state, Direction::Up) || self.b.is_block(state, self.b.named.hopper) + } + fn wire_connecting_side( + &self, + pos: BlockPos, + direction: Direction, + can_connect_up: bool, + ) -> &'static str { + let b = self.b; + let relative_pos = rel(pos, direction); + let relative = self.state(relative_pos); + if can_connect_up { + let placeable_above = + b.instance_of(relative, Class::TrapDoor) || self.wire_can_survive_on(relative); + if placeable_above && self.should_wire_connect_to(self.state(above(relative_pos)), None) + { + return if b.is_face_sturdy(relative, direction.opposite()) { + "up" + } else { + "side" + }; + } + } + if !self.should_wire_connect_to(relative, Some(direction)) + && (self.is_redstone_conductor(relative, relative_pos) + || !self.should_wire_connect_to(self.state(below(relative_pos)), None)) + { + "none" + } else { + "side" + } + } + fn wire_can_connect_up(&self, pos: BlockPos) -> bool { + !self.is_redstone_conductor(self.above_state(pos), pos) + } + fn wire_connected(&self, state: BlockStateId, direction: Direction) -> bool { + self.b.table.text(state, self.direction_prop(direction)) != "none" + } + fn wire_is_cross(&self, state: BlockStateId) -> bool { + HORIZONTAL + .into_iter() + .all(|d| self.wire_connected(state, d)) + } + fn wire_is_dot(&self, state: BlockStateId) -> bool { + !HORIZONTAL + .into_iter() + .any(|d| self.wire_connected(state, d)) + } + pub(crate) fn wire_cross_state(&self, power: i32) -> BlockStateId { + let b = self.b; + let mut state = b.default_of(b.named.redstone_wire); + for direction in HORIZONTAL { + state = b + .table + .set_text(state, self.direction_prop(direction), "side"); + } + b.table.set_int(state, b.props.power, power) + } + /// `RedstoneWireBlock.getConnectionState`. + pub(crate) fn wire_connection_state(&self, state: BlockStateId, pos: BlockPos) -> BlockStateId { + let b = self.b; + let table = &b.table; + let was_dot = self.wire_is_dot(state); + let mut result = table.set_int( + b.default_of(b.named.redstone_wire), + b.props.power, + table.int(state, b.props.power), + ); + let can_up = self.wire_can_connect_up(pos); + for direction in HORIZONTAL { + if !self.wire_connected(result, direction) { + let side = self.wire_connecting_side(pos, direction, can_up); + result = table.set_text(result, self.direction_prop(direction), side); + } + } + if was_dot && self.wire_is_dot(result) { + return result; + } + let north = self.wire_connected(result, Direction::North); + let south = self.wire_connected(result, Direction::South); + let east = self.wire_connected(result, Direction::East); + let west = self.wire_connected(result, Direction::West); + let ns_empty = !north && !south; + let ew_empty = !east && !west; + if !west && ns_empty { + result = table.set_text(result, b.props.west, "side"); + } + if !east && ns_empty { + result = table.set_text(result, b.props.east, "side"); + } + if !north && ew_empty { + result = table.set_text(result, b.props.north, "side"); + } + if !south && ew_empty { + result = table.set_text(result, b.props.south, "side"); + } + result + } + pub(crate) fn redstone_wire_update_shape( + &self, + state: BlockStateId, + pos: BlockPos, + direction: Direction, + _npos: BlockPos, + neighbour: BlockStateId, + ) -> BlockStateId { + let b = self.b; + match direction { + Direction::Down => { + if self.wire_can_survive_on(neighbour) { + state + } else { + b.air() + } + } + Direction::Up => self.wire_connection_state(state, pos), + _ => { + let side = self.wire_connecting_side(pos, direction, self.wire_can_connect_up(pos)); + let key = self.direction_prop(direction); + if (side != "none") == self.wire_connected(state, direction) + && !self.wire_is_cross(state) + { + b.table.set_text(state, key, side) + } else { + let power = b.table.int(state, b.props.power); + let cross = b.table.set_text(self.wire_cross_state(power), key, side); + self.wire_connection_state(cross, pos) + } + } + } + } + /// `RedstoneWireBlock.updateIndirectNeighbourShapes`. + pub(crate) fn wire_update_indirect( + &mut self, + state: BlockStateId, + pos: BlockPos, + flags: i32, + limit: i32, + ) { + let b = self.b; + let wire = b.named.redstone_wire; + for direction in HORIZONTAL { + if b.table.text(state, self.direction_prop(direction)) != "none" + && !b.is_block(self.rel_state(pos, direction), wire) + { + let down = below(rel(pos, direction)); + if b.is_block(self.state(down), wire) { + let neighbour = rel(down, direction.opposite()); + let neighbour_state = self.state(neighbour); + self.neighbor_shape_changed( + direction.opposite(), + down, + neighbour, + neighbour_state, + flags, + limit, + ); + } + let up = above(rel(pos, direction)); + if b.is_block(self.state(up), wire) { + let neighbour = rel(up, direction.opposite()); + let neighbour_state = self.state(neighbour); + self.neighbor_shape_changed( + direction.opposite(), + up, + neighbour, + neighbour_state, + flags, + limit, + ); + } + } + } + } + fn wire_block_signal(&self, pos: BlockPos) -> i32 { + self.wire_signal_off.set(true); + let signal = self.best_neighbor_signal(pos); + self.wire_signal_off.set(false); + signal + } + fn wire_power_of(&self, state: BlockStateId) -> i32 { + if self.b.is_block(state, self.b.named.redstone_wire) { + self.b.table.int(state, self.b.props.power) + } else { + 0 + } + } + fn wire_incoming_signal(&self, pos: BlockPos) -> i32 { + let mut signal = 0; + for direction in HORIZONTAL { + let neighbour_pos = rel(pos, direction); + let neighbour = self.state(neighbour_pos); + signal = signal.max(self.wire_power_of(neighbour)); + let above_pos = above(pos); + if self.is_redstone_conductor(neighbour, neighbour_pos) + && !self.is_redstone_conductor(self.state(above_pos), above_pos) + { + signal = signal.max(self.wire_power_of(self.state(above(neighbour_pos)))); + } else if !self.is_redstone_conductor(neighbour, neighbour_pos) { + signal = signal.max(self.wire_power_of(self.state(below(neighbour_pos)))); + } + } + (signal - 1).max(0) + } + /// `DefaultRedstoneWireEvaluator.updatePowerStrength`. + pub(crate) fn wire_update_power(&mut self, pos: BlockPos, state: BlockStateId) { + let block_signal = self.wire_block_signal(pos); + let target = if block_signal == 15 { + 15 + } else { + block_signal.max(self.wire_incoming_signal(pos)) + }; + if self.b.table.int(state, self.b.props.power) != target { + if self.state(pos) == state { + let next = self.b.table.set_int(state, self.b.props.power, target); + self.set_block(pos, next, 2); + } + // Vanilla iterates a HashSet of the position and its six + // neighbours; BlockPos hash order is reproduced below. + let wire = self.b.named.redstone_wire; + let mut targets: Vec<BlockPos> = std::iter::once(pos) + .chain(Direction::ALL.map(|d| rel(pos, d))) + .collect(); + java_hash_set_order(&mut targets); + for target_pos in targets { + self.update_neighbors_at(target_pos, wire); + } + } + } + fn wire_check_corner(&mut self, pos: BlockPos) { + let wire = self.b.named.redstone_wire; + if self.b.is_block(self.state(pos), wire) { + self.update_neighbors_at(pos, wire); + for direction in Direction::ALL { + self.update_neighbors_at(rel(pos, direction), wire); + } + } + } + pub(crate) fn wire_update_neighbors_of_neighboring_wires(&mut self, pos: BlockPos) { + for direction in HORIZONTAL { + self.wire_check_corner(rel(pos, direction)); + } + for direction in HORIZONTAL { + let target = rel(pos, direction); + if self.is_redstone_conductor(self.state(target), target) { + self.wire_check_corner(above(target)); + } else { + self.wire_check_corner(below(target)); + } + } + } + + // ---- diodes ---- + + pub(crate) fn diode_delay(&self, state: BlockStateId) -> i32 { + if self.b.instance_of(state, Class::Repeater) { + self.b.table.int(state, self.b.props.delay) * 2 + } else { + 2 + } + } + pub(crate) fn diode_is_locked(&self, pos: BlockPos, state: BlockStateId) -> bool { + self.b.instance_of(state, Class::Repeater) && self.diode_alternate_signal(pos, state) > 0 + } + fn diode_alternate_signal(&self, pos: BlockPos, state: BlockStateId) -> i32 { + let facing = self.b.facing(state); + let only_diodes = self.b.instance_of(state, Class::Repeater); + let cw = clockwise(facing); + let ccw = counter_clockwise(facing); + self.control_input_signal(rel(pos, cw), cw, only_diodes) + .max(self.control_input_signal(rel(pos, ccw), ccw, only_diodes)) + } + fn diode_input_signal(&self, pos: BlockPos, state: BlockStateId) -> i32 { + let b = self.b; + let facing = b.facing(state); + let target = rel(pos, facing); + let input = self.signal(target, facing); + let mut result = if input >= 15 { + input + } else { + let target_state = self.state(target); + input.max(self.wire_power_of(target_state)) + }; + if b.instance_of(state, Class::Comparator) { + let target_state = self.state(target); + if b.has_flag(target_state, state_flags::ANALOG_OUTPUT) { + result = self.analog_output(target_state, target, facing.opposite()); + } else if result < 15 && self.is_redstone_conductor(target_state, target) { + let further = rel(target, facing); + let further_state = self.state(further); + if b.has_flag(further_state, state_flags::ANALOG_OUTPUT) { + result = self.analog_output(further_state, further, facing.opposite()); + } + } + } + result + } + pub(crate) fn diode_should_turn_on(&self, pos: BlockPos, state: BlockStateId) -> bool { + if self.b.instance_of(state, Class::Comparator) { + let input = self.diode_input_signal(pos, state); + if input == 0 { + return false; + } + let side = self.diode_alternate_signal(pos, state); + input > side + || (input == side && self.b.table.text(state, self.b.props.mode) == "compare") + } else { + self.diode_input_signal(pos, state) > 0 + } + } + fn diode_should_prioritize(&self, pos: BlockPos, state: BlockStateId) -> bool { + let direction = self.b.facing(state).opposite(); + let opposite = self.rel_state(pos, direction); + self.b.instance_of(opposite, Class::Diode) && self.b.facing(opposite) != direction + } + pub(crate) fn diode_update_neighbors_in_front(&mut self, pos: BlockPos, state: BlockStateId) { + let direction = self.b.facing(state); + let opposite_pos = rel(pos, direction.opposite()); + let block = self.b.block(state); + self.neighbor_changed_at(opposite_pos, block); + self.update_neighbors_at_except(opposite_pos, block, direction); + } + fn comparator_calculate_output(&self, pos: BlockPos, state: BlockStateId) -> i32 { + let input = self.diode_input_signal(pos, state); + if input == 0 { + return 0; + } + let alternate = self.diode_alternate_signal(pos, state); + if alternate > input { + 0 + } else if self.b.table.text(state, self.b.props.mode) == "subtract" { + input - alternate + } else { + input + } + } + /// `DiodeBlock.checkTickOnNeighbor` (and the comparator override). + pub(crate) fn diode_check_tick_on_neighbor(&mut self, pos: BlockPos, state: BlockStateId) { + let block = self.b.block(state); + if self.b.instance_of(state, Class::Comparator) { + if !self.ticks.will_block_tick_this_tick(pos, block) { + let output = self.comparator_calculate_output(pos, state); + let old = self.comparator_output(pos); + if output != old + || self.b.table.bool(state, self.b.props.powered) + != self.diode_should_turn_on(pos, state) + { + let priority = if self.diode_should_prioritize(pos, state) { + TickPriority::High + } else { + TickPriority::Normal + }; + self.schedule_tick_priority(pos, block, 2, priority); + } + } + return; + } + if self.diode_is_locked(pos, state) { + return; + } + let on = self.b.table.bool(state, self.b.props.powered); + let should = self.diode_should_turn_on(pos, state); + if on != should && !self.ticks.will_block_tick_this_tick(pos, block) { + let priority = if self.diode_should_prioritize(pos, state) { + TickPriority::ExtremelyHigh + } else if on { + TickPriority::VeryHigh + } else { + TickPriority::High + }; + let delay = self.diode_delay(state); + self.schedule_tick_priority(pos, block, delay, priority); + } + } + /// `DiodeBlock.tick` / `ComparatorBlock.tick`. + pub(crate) fn diode_tick(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + if b.instance_of(state, Class::Comparator) { + self.comparator_refresh(pos, state); + return; + } + if self.diode_is_locked(pos, state) { + return; + } + let on = b.table.bool(state, b.props.powered); + let should = self.diode_should_turn_on(pos, state); + if on && !should { + self.set_block(pos, b.table.set_bool(state, b.props.powered, false), 2); + } else if !on { + self.set_block(pos, b.table.set_bool(state, b.props.powered, true), 2); + if !should { + let delay = self.diode_delay(state); + self.schedule_tick_priority(pos, b.block(state), delay, TickPriority::VeryHigh); + } + } + } + pub(crate) fn comparator_refresh(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let output = self.comparator_calculate_output(pos, state); + let old = self + .ticks + .comparator_outputs + .insert(pos, output) + .unwrap_or(0); + if old != output || b.table.text(state, b.props.mode) == "compare" { + let should = self.diode_should_turn_on(pos, state); + let on = b.table.bool(state, b.props.powered); + if on && !should { + self.set_block(pos, b.table.set_bool(state, b.props.powered, false), 2); + } else if !on && should { + self.set_block(pos, b.table.set_bool(state, b.props.powered, true), 2); + } + self.diode_update_neighbors_in_front(pos, state); + } + } + /// `DiodeBlock.neighborChanged`. + pub(crate) fn diode_neighbor_changed(&mut self, pos: BlockPos, state: BlockStateId) { + let block = self.b.block(state); + if !self.b.is_block(self.state(pos), block) { + return; + } + if self.can_survive(state, pos) { + self.diode_check_tick_on_neighbor(pos, state); + } else { + self.drop_resources(state, pos); + self.remove_block(pos, false); + for direction in Direction::ALL { + self.update_neighbors_at(rel(pos, direction), block); + } + } + } + + /// `getAnalogOutputSignal` for state-only sources; others ask the caller. + pub(crate) fn analog_output( + &self, + state: BlockStateId, + pos: BlockPos, + direction: Direction, + ) -> i32 { + let b = self.b; + let p = b.props; + match b.data(state).class { + Class::Beehive => b.table.int(state, p.honey_level), + Class::Cake => (7 - b.table.int(state, p.bites)) * 2, + Class::CandleCake => 14, + Class::Composter | Class::LayeredCauldron => b.table.int(state, p.level), + Class::CopperBulb => { + if b.table.bool(self.state(pos), p.lit) { + 15 + } else { + 0 + } + } + Class::EndPortalFrame => { + if b.table.bool(state, p.eye) { + 15 + } else { + 0 + } + } + Class::LavaCauldron => 3, + Class::RespawnAnchor => { + let charges = b.table.int(state, p.charges); + (charges as f32 / 4.0 * 15.0).floor() as i32 + } + Class::CopperGolemStatue => { + let pose = b.table.text(state, p.copper_golem_pose); + ["standing", "sitting", "running", "star"] + .iter() + .position(|p| *p == pose) + .map_or(1, |i| i as i32 + 1) + } + _ => self.level.block_entity_analog_signal(pos, state, direction), + } + } + + // ---- torches ---- + + fn torch_has_neighbor_signal(&self, pos: BlockPos, state: BlockStateId) -> bool { + if self.b.instance_of(state, Class::RedstoneWallTorch) { + let opposite = self.b.facing(state).opposite(); + self.has_signal(rel(pos, opposite), opposite) + } else { + self.has_signal(below(pos), Direction::Down) + } + } + pub(crate) fn torch_notify_neighbors(&mut self, pos: BlockPos, state: BlockStateId) { + let block = self.b.block(state); + for direction in Direction::ALL { + self.update_neighbors_at(rel(pos, direction), block); + } + } + pub(crate) fn torch_neighbor_changed(&mut self, pos: BlockPos, state: BlockStateId) { + let block = self.b.block(state); + if self.b.table.bool(state, self.b.props.lit) == self.torch_has_neighbor_signal(pos, state) + && !self.ticks.will_block_tick_this_tick(pos, block) + { + self.schedule_tick(pos, block, 2); + } + } + fn torch_toggled_too_frequently(&mut self, pos: BlockPos, add: bool) -> bool { + if add { + let time = self.level.game_time(); + self.ticks.torch_toggles.push((pos, time)); + } + self.ticks + .torch_toggles + .iter() + .filter(|(p, _)| *p == pos) + .take(8) + .count() + >= 8 + } + pub(crate) fn torch_tick(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let signal = self.torch_has_neighbor_signal(pos, state); + let time = self.level.game_time(); + while self + .ticks + .torch_toggles + .first() + .is_some_and(|(_, when)| time - when > 60) + { + self.ticks.torch_toggles.remove(0); + } + if b.table.bool(state, b.props.lit) { + if signal { + self.set_block_and_update(pos, b.table.set_bool(state, b.props.lit, false)); + if self.torch_toggled_too_frequently(pos, true) { + self.level_event(1502, pos, 0); + let block = b.block(self.state(pos)); + self.schedule_tick(pos, block, 160); + } + } + } else if !signal && !self.torch_toggled_too_frequently(pos, false) { + self.set_block_and_update(pos, b.table.set_bool(state, b.props.lit, true)); + } + } + + // ---- observers ---- + + pub(crate) fn observer_start_signal(&mut self, pos: BlockPos, block: BlockId) { + if !self.ticks.has_block_tick(pos, block) { + self.schedule_tick(pos, block, 2); + } + } + pub(crate) fn observer_update_in_front(&mut self, pos: BlockPos, state: BlockStateId) { + let direction = self.b.facing(state); + let opposite = rel(pos, direction.opposite()); + let block = self.b.block(state); + self.neighbor_changed_at(opposite, block); + self.update_neighbors_at_except(opposite, block, direction); + } + pub(crate) fn observer_tick(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + if b.table.bool(state, b.props.powered) { + self.set_block(pos, b.table.set_bool(state, b.props.powered, false), 2); + } else { + self.set_block(pos, b.table.set_bool(state, b.props.powered, true), 2); + self.schedule_tick(pos, b.block(state), 2); + } + self.observer_update_in_front(pos, state); + } + + // ---- buttons, levers, plates ---- + + /// `ButtonBlock/LeverBlock.updateNeighbours`. + pub(crate) fn attached_update_neighbours(&mut self, pos: BlockPos, state: BlockStateId) { + let front = self.face_attached_connected(state).opposite(); + let block = self.b.block(state); + self.update_neighbors_at(pos, block); + self.update_neighbors_at(rel(pos, front), block); + } + pub(crate) fn plate_update_neighbours(&mut self, pos: BlockPos, block: BlockId) { + self.update_neighbors_at(pos, block); + self.update_neighbors_at(below(pos), block); + } + pub(crate) fn plate_signal_for_state(&self, state: BlockStateId) -> i32 { + let b = self.b; + if b.instance_of(state, Class::WeightedPressurePlate) { + b.table.int(state, b.props.power) + } else if b.table.bool(state, b.props.powered) { + 15 + } else { + 0 + } + } + fn plate_signal_strength(&self, pos: BlockPos, state: BlockStateId) -> i32 { + use horizon_core::geometry::{Aabb, Vec3}; + let b = self.b; + let area = Aabb::new( + Vec3::new( + f64::from(pos.x) + 0.0625, + f64::from(pos.y), + f64::from(pos.z) + 0.0625, + ), + Vec3::new( + f64::from(pos.x) + 0.9375, + f64::from(pos.y) + 0.25, + f64::from(pos.z) + 0.9375, + ), + ); + let data = b.data(state); + if data.is(Class::WeightedPressurePlate) { + let max = data.max_weight.max(1); + let count = (self + .level + .count_entities(area, super::EntityQuery::Everything) + as i32) + .min(max); + if count > 0 { + (count.min(max) as f32 / max as f32 * 15.0).ceil() as i32 + } else { + 0 + } + } else { + let query = if data.set_type.as_ref().is_some_and(|s| s.mobs_only) { + super::EntityQuery::Mobs + } else { + super::EntityQuery::Everything + }; + if self.level.count_entities(area, query) > 0 { + 15 + } else { + 0 + } + } + } + /// `BasePressurePlateBlock.checkPressed`. + pub(crate) fn plate_check_pressed( + &mut self, + pos: BlockPos, + state: BlockStateId, + old_signal: i32, + ) { + let b = self.b; + let signal = self.plate_signal_strength(pos, state); + let was = old_signal > 0; + let is = signal > 0; + let block = b.block(state); + if old_signal != signal { + let new = if b.instance_of(state, Class::WeightedPressurePlate) { + b.table.set_int(state, b.props.power, signal) + } else { + b.table.set_bool(state, b.props.powered, signal > 0) + }; + self.set_block(pos, new, 2); + self.plate_update_neighbours(pos, block); + } + if let Some(set) = b.data(state).set_type.clone() { + if !is && was { + self.sound(pos, &set.plate_off, 1.0, 1.0); + self.game_event(pos, "minecraft:block_deactivate"); + } else if is && !was { + self.sound(pos, &set.plate_on, 1.0, 1.0); + self.game_event(pos, "minecraft:block_activate"); + } + } + if is { + let delay = if b.instance_of(state, Class::WeightedPressurePlate) { + 10 + } else { + 20 + }; + self.schedule_tick(pos, block, delay); + } + } + /// `ButtonBlock.press`. + pub(crate) fn button_press(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + self.set_block_and_update(pos, b.table.set_bool(state, b.props.powered, true)); + self.attached_update_neighbours(pos, state); + let data = b.data(state); + self.schedule_tick(pos, b.block(state), data.ticks_to_stay_pressed); + if let Some(set) = data.set_type.clone() { + self.sound(pos, &set.button_on, 1.0, 1.0); + } + self.game_event(pos, "minecraft:block_activate"); + } + /// `ButtonBlock.checkPressed` with no arrows present. + pub(crate) fn button_tick(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + if !b.table.bool(state, b.props.powered) { + return; + } + self.set_block_and_update(pos, b.table.set_bool(state, b.props.powered, false)); + self.attached_update_neighbours(pos, state); + if let Some(set) = b.data(state).set_type.clone() { + self.sound(pos, &set.button_off, 1.0, 1.0); + } + self.game_event(pos, "minecraft:block_deactivate"); + } + /// `LeverBlock.pull`. + pub(crate) fn lever_pull(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let state = b.table.cycle(state, b.props.powered); + self.set_block_and_update(pos, state); + self.attached_update_neighbours(pos, state); + let powered = b.table.bool(state, b.props.powered); + self.emit(LevelEvent::Sound { + pos, + sound: "minecraft:block.lever.click".into(), + volume: 0.3, + pitch: if powered { 0.6 } else { 0.5 }, + }); + self.game_event( + pos, + if powered { + "minecraft:block_activate" + } else { + "minecraft:block_deactivate" + }, + ); + } + + // ---- consumers ---- + + pub(crate) fn door_neighbor_changed( + &mut self, + pos: BlockPos, + state: BlockStateId, + changed: BlockId, + ) { + let b = self.b; + let p = b.props; + let other = if b.table.text(state, p.half) == "lower" { + Direction::Up + } else { + Direction::Down + }; + let signal = self.has_neighbor_signal(pos) || self.has_neighbor_signal(rel(pos, other)); + if b.block(state) != changed && signal != b.table.bool(state, p.powered) { + if signal != b.table.bool(state, p.open) { + self.door_sound(pos, state, signal); + self.game_event( + pos, + if signal { + "minecraft:block_open" + } else { + "minecraft:block_close" + }, + ); + } + let next = b + .table + .set_bool(b.table.set_bool(state, p.powered, signal), p.open, signal); + self.set_block(pos, next, 2); + } + } + pub(crate) fn door_sound(&mut self, pos: BlockPos, state: BlockStateId, open: bool) { + if let Some(set) = self.b.data(state).set_type.clone() { + let pitch = self.random().next_float() * 0.1 + 0.9; + let sound = if open { + set.door_open.clone() + } else { + set.door_close.clone() + }; + self.sound(pos, &sound, 1.0, pitch); + } + } + pub(crate) fn trapdoor_sound(&mut self, pos: BlockPos, state: BlockStateId, open: bool) { + if let Some(set) = self.b.data(state).set_type.clone() { + let pitch = self.random().next_float() * 0.1 + 0.9; + let sound = if open { + set.trapdoor_open.clone() + } else { + set.trapdoor_close.clone() + }; + self.sound(pos, &sound, 1.0, pitch); + self.game_event( + pos, + if open { + "minecraft:block_open" + } else { + "minecraft:block_close" + }, + ); + } + } + pub(crate) fn trapdoor_neighbor_changed(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let p = b.props; + let signal = self.has_neighbor_signal(pos); + if signal != b.table.bool(state, p.powered) { + let mut state = state; + if b.table.bool(state, p.open) != signal { + state = b.table.set_bool(state, p.open, signal); + self.trapdoor_sound(pos, state, signal); + } + self.set_block(pos, b.table.set_bool(state, p.powered, signal), 2); + if b.is_waterlogged(state) { + self.schedule_water_tick(pos); + } + } + } + pub(crate) fn gate_neighbor_changed(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let p = b.props; + let power = self.has_neighbor_signal(pos); + if b.table.bool(state, p.powered) != power { + let next = b + .table + .set_bool(b.table.set_bool(state, p.powered, power), p.open, power); + self.set_block(pos, next, 2); + if b.table.bool(state, p.open) != power { + let data = b.data(state); + let sound = if power { + data.gate_open.clone() + } else { + data.gate_close.clone() + }; + let pitch = self.random().next_float() * 0.1 + 0.9; + if let Some(sound) = sound { + self.sound(pos, &sound, 1.0, pitch); + } + self.game_event( + pos, + if power { + "minecraft:block_open" + } else { + "minecraft:block_close" + }, + ); + } + } + } + pub(crate) fn lamp_neighbor_changed(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let lit = b.table.bool(state, b.props.lit); + if lit != self.has_neighbor_signal(pos) { + if lit { + self.schedule_tick(pos, b.block(state), 4); + } else { + self.set_block(pos, b.table.cycle(state, b.props.lit), 2); + } + } + } + pub(crate) fn lamp_tick(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + if b.table.bool(state, b.props.lit) && !self.has_neighbor_signal(pos) { + self.set_block(pos, b.table.cycle(state, b.props.lit), 2); + } + } + /// `CopperBulbBlock.checkAndFlip`. + pub(crate) fn copper_bulb_check(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let p = b.props; + let signal = self.has_neighbor_signal(pos); + if signal != b.table.bool(state, p.powered) { + let mut next = state; + if !b.table.bool(state, p.powered) { + next = b.table.cycle(next, p.lit); + let sound = if b.table.bool(next, p.lit) { + "minecraft:block.copper_bulb.turn_on" + } else { + "minecraft:block.copper_bulb.turn_off" + }; + self.emit(LevelEvent::Sound { + pos, + sound: sound.into(), + volume: 1.0, + pitch: 1.0, + }); + } + self.set_block(pos, b.table.set_bool(next, p.powered, signal), 3); + } + } + /// `NoteBlock.playNote` (block event; instrument pitch from `note`). + pub(crate) fn note_play(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let instrument = b.table.text(state, b.props.instrument).to_owned(); + let mob_head = super::data::INSTRUMENTS + .iter() + .position(|n| *n == instrument) + .is_some_and(|i| super::data::instrument_works_above(i as u8)); + if mob_head || b.is_air(self.above_state(pos)) { + let note = b.table.int(state, b.props.note); + let pitch = if mob_head { + 1.0 + } else { + 2f64.powf(f64::from(note - 12) / 12.0) as f32 + }; + let sound = match instrument.as_str() { + "custom_head" => "minecraft:ui.button.click".to_owned(), + "dragon" => "minecraft:block.note_block.imitate.ender_dragon".to_owned(), + name if mob_head => format!("minecraft:block.note_block.imitate.{name}"), + name => format!("minecraft:block.note_block.{name}"), + }; + self.emit(LevelEvent::Sound { + pos, + sound: sound.into(), + volume: 3.0, + pitch, + }); + self.game_event(pos, "minecraft:note_block_play"); + } + } + pub(crate) fn note_neighbor_changed(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let signal = self.has_neighbor_signal(pos); + if signal != b.table.bool(state, b.props.powered) { + if signal { + self.note_play(pos, state); + } + self.set_block_and_update(pos, b.table.set_bool(state, b.props.powered, signal)); + } + } + /// `TntBlock.prime` then `removeBlock`. + pub(crate) fn tnt_check(&mut self, pos: BlockPos) { + if self.has_neighbor_signal(pos) { + self.emit(LevelEvent::PrimeTnt { pos }); + self.remove_block(pos, false); + } + } + pub(crate) fn dispenser_neighbor_changed(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let trigger = self.has_neighbor_signal(pos) || self.has_neighbor_signal(above(pos)); + let triggered = b.table.bool(state, b.props.triggered); + if trigger && !triggered { + self.schedule_tick(pos, b.block(state), 4); + self.set_block(pos, b.table.set_bool(state, b.props.triggered, true), 2); + } else if !trigger && triggered { + self.set_block(pos, b.table.set_bool(state, b.props.triggered, false), 2); + } + } + pub(crate) fn hopper_check_powered(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let enabled = !self.has_neighbor_signal(pos); + if enabled != b.table.bool(state, b.props.enabled) { + self.set_block(pos, b.table.set_bool(state, b.props.enabled, enabled), 2); + } + } + pub(crate) fn skull_neighbor_changed(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let signal = self.has_neighbor_signal(pos); + if signal != b.table.bool(state, b.props.powered) { + self.set_block(pos, b.table.set_bool(state, b.props.powered, signal), 2); + } + } + pub(crate) fn bell_neighbor_changed(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let signal = self.has_neighbor_signal(pos); + if signal != b.table.bool(state, b.props.powered) { + if signal { + self.emit(LevelEvent::Sound { + pos, + sound: "minecraft:block.bell.use".into(), + volume: 2.0, + pitch: 1.0, + }); + self.game_event(pos, "minecraft:block_change"); + } + self.set_block_and_update(pos, b.table.set_bool(state, b.props.powered, signal)); + } + } + pub(crate) fn crafter_neighbor_changed(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let trigger = self.has_neighbor_signal(pos); + let triggered = b.table.bool(state, b.props.triggered); + if trigger && !triggered { + self.schedule_tick(pos, b.block(state), 4); + self.set_block(pos, b.table.set_bool(state, b.props.triggered, true), 2); + } else if !trigger && triggered { + let next = b.table.set_bool( + b.table.set_bool(state, b.props.triggered, false), + b.props.crafting, + false, + ); + self.set_block(pos, next, 2); + } + } +} + +/// Order `positions` as a `java.util.HashSet<BlockPos>` of capacity 16 would +/// iterate them (bucket index of the spread hash, then insertion order). +fn java_hash_set_order(positions: &mut Vec<BlockPos>) { + fn hash(pos: BlockPos) -> i32 { + // Vec3i.hashCode: (y + z * 31) * 31 + x + (pos.y.wrapping_add(pos.z.wrapping_mul(31))) + .wrapping_mul(31) + .wrapping_add(pos.x) + } + let mut unique: Vec<BlockPos> = Vec::new(); + for pos in positions.iter() { + if !unique.contains(pos) { + unique.push(*pos); + } + } + let buckets = 16; + let bucket = |pos: BlockPos| { + let h = hash(pos); + ((h ^ ((h as u32) >> 16) as i32) & (buckets - 1)) as usize + }; + let mut ordered: Vec<(usize, usize, BlockPos)> = unique + .iter() + .enumerate() + .map(|(i, p)| (bucket(*p), i, *p)) + .collect(); + ordered.sort_by_key(|(b, i, _)| (*b, *i)); + *positions = ordered.into_iter().map(|(_, _, p)| p).collect(); +} diff --git a/crates/horizon-world/src/level/shapes.rs b/crates/horizon-world/src/level/shapes.rs new file mode 100644 index 000000000..6b9399346 --- /dev/null +++ b/crates/horizon-world/src/level/shapes.rs @@ -0,0 +1,1251 @@ +//! `BlockBehaviour.updateShape` for every overriding vanilla class. +//! +//! Dispatch walks the block's class chain; a handler returning `None` defers +//! to the next class (the Java `super` call), the end of the chain returns the +//! state unchanged (`BlockBehaviour.updateShape`). +use super::{ + LevelAccess, Sim, + classes::Class, + query::{axis_of, clockwise, counter_clockwise, is_horizontal}, + states::BlockId, + update::{above, below, rel}, +}; +use crate::{fluid::FluidKind, registry::BlockStateId}; +use horizon_core::{geometry::Direction, position::BlockPos, random::RandomSource}; + +impl<L: LevelAccess + ?Sized> Sim<'_, L> { + /// `BlockState.updateShape(level, ticks, pos, direction, neighbourPos, neighbourState, random)`. + pub fn update_shape( + &mut self, + state: BlockStateId, + pos: BlockPos, + direction: Direction, + neighbour_pos: BlockPos, + neighbour: BlockStateId, + ) -> BlockStateId { + self.update_shape_at(0, state, pos, direction, neighbour_pos, neighbour) + } + + pub(crate) fn schedule_water_tick(&mut self, pos: BlockPos) { + self.schedule_fluid_tick(pos, FluidKind::Water, 5); + } + fn waterlogged_tick(&mut self, state: BlockStateId, pos: BlockPos) { + if self.b.is_waterlogged(state) { + self.schedule_water_tick(pos); + } + } + + fn update_shape_at( + &mut self, + depth: usize, + state: BlockStateId, + pos: BlockPos, + direction: Direction, + neighbour_pos: BlockPos, + neighbour: BlockStateId, + ) -> BlockStateId { + let chain_len = self.b.data(state).chain.len(); + for index in depth..chain_len { + let class = self.b.data(state).chain[index]; + if let Some(result) = self.update_shape_class( + class, + index, + state, + pos, + direction, + neighbour_pos, + neighbour, + ) { + return result; + } + } + state + } + + #[allow(clippy::too_many_arguments)] + fn update_shape_class( + &mut self, + class: Class, + depth: usize, + state: BlockStateId, + pos: BlockPos, + dir: Direction, + npos: BlockPos, + nstate: BlockStateId, + ) -> Option<BlockStateId> { + let b = self.b; + let p = b.props; + let t = &b.tags; + let n = b.named; + let table = &b.table; + let air = b.air(); + let block = b.block(state); + macro_rules! sup { + () => { + self.update_shape_at(depth + 1, state, pos, dir, npos, nstate) + }; + } + // `dir == X && !canSurvive ? AIR : super`. + macro_rules! survive_or_air { + ($cond:expr) => {{ + if $cond && !self.can_survive(state, pos) { + air + } else { + sup!() + } + }}; + } + Some(match class { + Class::AbstractBed => { + if dir == self.bed_neighbour_direction(state) { + if b.is_block(nstate, block) + && table.text(nstate, p.part) != table.text(state, p.part) + { + table.set_bool(state, p.occupied, table.bool(nstate, p.occupied)) + } else { + air + } + } else { + sup!() + } + } + Class::AmethystCluster | Class::ShelfMushroom => { + if class == Class::AmethystCluster { + self.waterlogged_tick(state, pos); + } + survive_or_air!(dir == b.facing(state).opposite()) + } + Class::AttachedStem => { + if !b + .data(state) + .link + .is_some_and(|fruit| b.is_block(nstate, fruit)) + && dir == b.facing(state) + { + if let Some(stem) = b.data(state).link2 { + return Some(table.set_int(b.default_of(stem), p.age, 7)); + } + } + sup!() + } + Class::BambooSapling => { + if !self.can_survive(state, pos) { + air + } else if dir == Direction::Up && b.is_block(nstate, n.bamboo) { + b.default_of(n.bamboo) + } else { + sup!() + } + } + Class::BambooStalk => { + if !self.can_survive(state, pos) { + self.schedule_tick(pos, block, 1); + } + if dir == Direction::Up + && b.is_block(nstate, n.bamboo) + && table.int(nstate, p.age) > table.int(state, p.age) + { + table.cycle(state, p.age) + } else { + sup!() + } + } + Class::Banner + | Class::BasePressurePlate + | Class::BaseTorch + | Class::Cake + | Class::CandleCake + | Class::FlowerPot + | Class::StandingSign => survive_or_air!(dir == Direction::Down), + Class::Barrier + | Class::BaseRail + | Class::Candle + | Class::Chain + | Class::Conduit + | Class::CopperGolemStatue + | Class::DecoratedPot + | Class::DriedGhast + | Class::EnderChest + | Class::HeavyCore + | Class::Light + | Class::LightningRod + | Class::MangroveRoots + | Class::SculkSensor + | Class::SculkShrieker + | Class::Shelf + | Class::Sign + | Class::Slab + | Class::SmallDripleaf + | Class::TrapDoor + | Class::WaterloggedTransparent => { + self.waterlogged_tick(state, pos); + sup!() + } + Class::BaseCoralPlantType => { + self.waterlogged_tick(state, pos); + survive_or_air!(dir == Direction::Down) + } + Class::BaseCoralWallFan => { + self.waterlogged_tick(state, pos); + if dir.opposite() == b.facing(state) && !self.can_survive(state, pos) { + air + } else { + state + } + } + Class::Beehive => sup!(), + Class::Bell => { + let attachment = table.text(state, p.attachment); + let connected = self.bell_connected_direction(state).opposite(); + if connected == dir && !self.can_survive(state, pos) && attachment != "double_wall" + { + return Some(air); + } + if axis_of(dir) == axis_of(b.facing(state)) { + if attachment == "double_wall" && !b.is_face_sturdy(nstate, dir) { + let single = table.set_text(state, p.attachment, "single_wall"); + return Some(table.set_dir(single, p.facing, dir.opposite())); + } + if attachment == "single_wall" + && connected.opposite() == dir + && b.is_face_sturdy(nstate, b.facing(state)) + { + return Some(table.set_text(state, p.attachment, "double_wall")); + } + } + sup!() + } + Class::BigDripleaf => { + if dir == Direction::Down && !self.can_survive(state, pos) { + return Some(air); + } + self.waterlogged_tick(state, pos); + if dir == Direction::Up && b.is_block(nstate, block) { + table.with_properties_of(n.big_dripleaf_stem, state) + } else { + sup!() + } + } + Class::BigDripleafStem => { + if matches!(dir, Direction::Down | Direction::Up) && !self.can_survive(state, pos) { + self.schedule_tick(pos, block, 1); + } + self.waterlogged_tick(state, pos); + sup!() + } + Class::Brushable => { + self.schedule_tick(pos, block, 2); + sup!() + } + Class::BubbleColumn => { + self.schedule_water_tick(pos); + if !self.can_survive(state, pos) + || dir == Direction::Down + || (dir == Direction::Up + && !b.is_block(nstate, block) + && self.bubble_column_can_occupy(nstate)) + { + self.schedule_tick(pos, block, 5); + } + sup!() + } + Class::Cactus | Class::SugarCane => { + if !self.can_survive(state, pos) { + self.schedule_tick(pos, block, 1); + } + sup!() + } + Class::Campfire => { + self.waterlogged_tick(state, pos); + if dir == Direction::Down { + let hay = table.block_by_name("minecraft:hay_block"); + table.set_bool( + state, + p.signal_fire, + hay.is_some_and(|hay| b.is_block(nstate, hay)), + ) + } else { + sup!() + } + } + Class::Carpet | Class::SnowLayer | Class::Vegetation | Class::Frogspawn => { + survive_or_air!(true) + } + Class::SeaPickle => { + if !self.can_survive(state, pos) { + return Some(air); + } + self.waterlogged_tick(state, pos); + sup!() + } + Class::CeilingHangingSign | Class::SporeBlossom => { + survive_or_air!(dir == Direction::Up) + } + Class::Chest => { + self.waterlogged_tick(state, pos); + if self.chest_can_connect_to(state, nstate) && is_horizontal(dir) { + let neighbour_type = table.text(nstate, p.kind); + if table.text(state, p.kind) == "single" + && neighbour_type != "single" + && b.facing(state) == b.facing(nstate) + && self.chest_connected_direction(nstate) == dir.opposite() + { + let opposite = if neighbour_type == "left" { + "right" + } else { + "left" + }; + return Some(table.set_text(state, p.kind, opposite)); + } + } else if self.chest_connected_direction(state) == dir { + return Some(table.set_text(state, p.kind, "single")); + } + sup!() + } + Class::CopperChest => { + let result = sup!(); + if self.chest_can_connect_to(state, nstate) + && table.text(result, p.kind) != "single" + && self.chest_connected_direction(result) == dir + { + return Some(table.with_properties_of(b.block(nstate), result)); + } + result + } + Class::ChorusFlower => { + if dir != Direction::Up && !self.can_survive(state, pos) { + self.schedule_tick(pos, block, 1); + } + sup!() + } + Class::ChorusPlant => { + if !self.can_survive(state, pos) { + self.schedule_tick(pos, block, 1); + sup!() + } else { + let connect = b.is_block(nstate, block) + || b.is_block(nstate, n.chorus_flower) + || (dir == Direction::Down && b.in_set(nstate, &t.supports_chorus_plant)); + table.set_bool(state, self.direction_prop(dir), connect) + } + } + Class::Cocoa => survive_or_air!(dir == b.facing(state)), + Class::Comparator => { + if dir == Direction::Down && !b.is_face_sturdy_rigid(nstate, Direction::Up) { + air + } else { + sup!() + } + } + Class::ConcretePowder => { + if self.concrete_touches_liquid(pos) { + b.data(state) + .link + .map_or(state, |concrete| b.default_of(concrete)) + } else { + sup!() + } + } + Class::Coral => { + if !self.coral_scan_for_water(pos) { + let delay = 60 + self.random().next_int_bound(40).unwrap_or(0); + self.schedule_tick(pos, block, delay); + } + sup!() + } + Class::CoralFan | Class::CoralPlant => { + if dir == Direction::Down && !self.can_survive(state, pos) { + return Some(air); + } + self.coral_try_schedule_die_tick(state, pos); + self.waterlogged_tick(state, pos); + sup!() + } + Class::CoralWallFan => { + if dir.opposite() == b.facing(state) && !self.can_survive(state, pos) { + return Some(air); + } + self.waterlogged_tick(state, pos); + self.coral_try_schedule_die_tick(state, pos); + sup!() + } + Class::CreakingHeart => { + self.schedule_tick(pos, block, 1); + sup!() + } + Class::Door => { + let lower = table.text(state, p.half) == "lower"; + if dir.normal()[1] == 0 || lower != (dir == Direction::Up) { + if lower && dir == Direction::Down && !self.can_survive(state, pos) { + air + } else { + sup!() + } + } else if b.instance_of(nstate, Class::Door) + && table.text(nstate, p.half) != table.text(state, p.half) + { + table.set_text(nstate, p.half, table.text(state, p.half)) + } else { + air + } + } + Class::DoublePlant => { + let half = table.text(state, p.half); + let lower = half == "lower"; + if dir.normal()[1] == 0 + || lower != (dir == Direction::Up) + || (b.is_block(nstate, block) && table.text(nstate, p.half) != half) + { + if lower && dir == Direction::Down && !self.can_survive(state, pos) { + air + } else { + sup!() + } + } else { + air + } + } + Class::PitcherCrop => { + if table.int(state, p.age) >= 3 { + sup!() + } else if self.can_survive(state, pos) { + state + } else { + air + } + } + Class::FaceAttachedHorizontalDirectional | Class::Lantern => { + if class == Class::Lantern { + self.waterlogged_tick(state, pos); + let connected = if table.bool(state, p.hanging) { + Direction::Down + } else { + Direction::Up + }; + survive_or_air!(connected.opposite() == dir) + } else { + survive_or_air!(self.face_attached_connected(state).opposite() == dir) + } + } + Class::FallingBlock => { + let delay = if class_is(b, block, Class::DragonEgg) { + 5 + } else { + 2 + }; + self.schedule_tick(pos, block, delay); + sup!() + } + Class::Farmland | Class::Path => { + if dir == Direction::Up && !self.can_survive(state, pos) { + self.schedule_tick(pos, block, 1); + } + sup!() + } + Class::Fence => { + self.waterlogged_tick(state, pos); + if is_horizontal(dir) { + let sturdy = b.is_face_sturdy(nstate, dir.opposite()); + table.set_bool( + state, + self.direction_prop(dir), + self.fence_connects_to(state, nstate, sturdy, dir.opposite()), + ) + } else { + sup!() + } + } + Class::IronBars => { + self.waterlogged_tick(state, pos); + if is_horizontal(dir) { + let sturdy = b.is_face_sturdy(nstate, dir.opposite()); + table.set_bool( + state, + self.direction_prop(dir), + self.bars_attach_to(nstate, sturdy), + ) + } else { + sup!() + } + } + Class::FenceGate => { + if axis_of(clockwise(b.facing(state))) != axis_of(dir) { + sup!() + } else { + let other = self.rel_state(pos, dir.opposite()); + let in_wall = b.in_set(nstate, &t.walls) || b.in_set(other, &t.walls); + table.set_bool(state, p.in_wall, in_wall) + } + } + Class::Fire => { + if self.can_survive(state, pos) { + let age = table.int(state, p.age); + self.fire_state_with_age(pos, age) + } else { + air + } + } + Class::SoulFire => { + if self.can_survive(state, pos) { + b.default_of(block) + } else { + air + } + } + Class::GrowingPlantBody => { + let growth = b.data(state).growth_direction; + if dir == growth.opposite() && !self.can_survive(state, pos) { + self.schedule_tick(pos, block, 1); + } + let (head, _) = self.growing_plant_pair(block); + if dir == growth && !b.is_block(nstate, block) && !b.is_block(nstate, head) { + let age = self.random().next_int_bound(25).unwrap_or(0); + let head_state = table.set_int(b.default_of(head), p.age, age); + return Some(if class_is(b, block, Class::CaveVinesPlant) { + table.set_bool(head_state, p.berries, table.bool(state, p.berries)) + } else { + head_state + }); + } + if b.data(state).schedule_fluid_ticks { + self.schedule_water_tick(pos); + } + sup!() + } + Class::GrowingPlantHead => { + let growth = b.data(state).growth_direction; + let (_, body) = self.growing_plant_pair(block); + let to_body = |sim: &Self| { + let body_state = b.default_of(body); + if class_is(b, block, Class::CaveVines) { + sim.b + .table + .set_bool(body_state, p.berries, table.bool(state, p.berries)) + } else { + body_state + } + }; + if dir == growth.opposite() { + if !self.can_survive(state, pos) { + self.schedule_tick(pos, block, 1); + } else { + let next = self.rel_state(pos, growth); + if b.is_block(next, block) || b.is_block(next, body) { + return Some(to_body(self)); + } + } + } + if dir != growth || (!b.is_block(nstate, block) && !b.is_block(nstate, body)) { + if b.data(state).schedule_fluid_ticks { + self.schedule_water_tick(pos); + } + sup!() + } else { + to_body(self) + } + } + Class::HangingMoss => { + let above_state = self.above_state(pos); + if !(b.multiface_can_attach(above_state, Direction::Up) + || b.is_block(above_state, block)) + { + self.schedule_tick(pos, block, 1); + } + table.set_bool(state, p.tip, !b.is_block(self.below_state(pos), block)) + } + Class::HangingRoots => { + if dir == Direction::Up && !self.can_survive(state, pos) { + return Some(air); + } + self.waterlogged_tick(state, pos); + sup!() + } + Class::HugeMushroom => { + if b.is_block(nstate, block) { + table.set_bool(state, self.direction_prop(dir), false) + } else { + sup!() + } + } + Class::Ladder => { + if dir.opposite() == b.facing(state) && !self.can_survive(state, pos) { + return Some(air); + } + self.waterlogged_tick(state, pos); + sup!() + } + Class::Leaves => { + self.waterlogged_tick(state, pos); + let distance = self.leaf_distance_at(nstate) + 1; + if distance != 1 || table.int(state, p.distance) != distance { + self.schedule_tick(pos, block, 1); + } + state + } + Class::Liquid => { + let fluid = b.fluid(state); + if fluid.is_source() || b.fluid(nstate).is_source() { + let delay = self.fluid_tick_delay(fluid.kind()); + self.schedule_fluid_tick(pos, fluid.kind(), delay); + } + if dir == Direction::Down && self.should_bubble_column_occupy(state) { + self.try_schedule_bubble_column(pos, nstate, block); + } + sup!() + } + Class::MangrovePropagule => { + self.waterlogged_tick(state, pos); + survive_or_air!(dir == Direction::Up) + } + Class::MossyCarpet => { + if !self.can_survive(state, pos) { + return Some(air); + } + let updated = self.mossy_carpet_updated_state(state, pos, false); + if self.mossy_carpet_has_faces(updated) { + updated + } else { + air + } + } + Class::Multiface => { + self.waterlogged_tick(state, pos); + if !Direction::ALL + .into_iter() + .any(|d| self.multiface_has_face(state, d)) + { + air + } else if self.multiface_has_face(state, dir) + && !b.multiface_can_attach(nstate, dir) + { + let removed = table.set_bool(state, self.direction_prop(dir), false); + if Direction::ALL + .into_iter() + .any(|d| self.multiface_has_face(removed, d)) + { + removed + } else { + air + } + } else { + state + } + } + Class::PistonHead => survive_or_air!(dir.opposite() == b.facing(state)), + Class::Note => { + if dir.normal()[1] != 0 { + self.note_block_instrument(pos, state) + } else { + sup!() + } + } + Class::Observer => { + if b.facing(state) == dir && !table.bool(state, p.powered) { + self.observer_start_signal(pos, block); + } + sup!() + } + Class::RedstoneWallTorch + | Class::WallTorch + | Class::TripWireHook + | Class::WallBanner + | Class::WallSign => { + let attached = dir.opposite() == b.facing(state); + let fails = attached && !self.can_survive(state, pos); + match class { + Class::RedstoneWallTorch | Class::WallTorch => { + if fails { + air + } else { + state + } + } + _ => { + if fails { + air + } else { + sup!() + } + } + } + } + Class::RedstoneWire => self.redstone_wire_update_shape(state, pos, dir, npos, nstate), + Class::Repeater => { + if dir == Direction::Down && !b.is_face_sturdy_rigid(nstate, Direction::Up) { + air + } else if axis_of(dir) != axis_of(b.facing(state)) { + let locked = self.diode_is_locked(pos, state); + table.set_bool(state, p.locked, locked) + } else { + sup!() + } + } + Class::Scaffolding => { + self.waterlogged_tick(state, pos); + self.schedule_tick(pos, block, 1); + state + } + Class::Seagrass => { + let result = sup!(); + if !b.is_air(result) { + self.schedule_water_tick(pos); + } + result + } + Class::Snowy => { + if dir == Direction::Up { + table.set_bool(state, p.snowy, b.in_set(nstate, &t.snow)) + } else { + sup!() + } + } + Class::Speleothem => { + self.waterlogged_tick(state, pos); + if !matches!(dir, Direction::Up | Direction::Down) { + return Some(state); + } + let tip = table + .dir(state, p.vertical_direction) + .unwrap_or(Direction::Up); + if tip == Direction::Down && self.ticks.has_block_tick(pos, block) { + return Some(state); + } + if dir == tip.opposite() && !self.can_survive(state, pos) { + self.schedule_tick(pos, block, if tip == Direction::Down { 2 } else { 1 }); + state + } else { + let merge = table.text(state, p.thickness) == "tip_merge"; + let thickness = self.speleothem_thickness(pos, tip, merge); + table.set_text(state, p.thickness, thickness) + } + } + Class::Stair => { + self.waterlogged_tick(state, pos); + if is_horizontal(dir) { + let shape = self.stairs_shape(state, pos); + table.set_text(state, p.shape, shape) + } else { + sup!() + } + } + Class::TripWire => { + if is_horizontal(dir) { + let connect = self.tripwire_should_connect_to(nstate, dir); + table.set_bool(state, self.direction_prop(dir), connect) + } else { + sup!() + } + } + Class::Vine => { + if dir == Direction::Down { + sup!() + } else { + let updated = self.vine_updated_state(state, pos); + if self.vine_count_faces(updated) == 0 { + air + } else { + updated + } + } + } + Class::Wall => { + self.waterlogged_tick(state, pos); + match dir { + Direction::Down => sup!(), + Direction::Up => { + let sides = [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, + ] + .map(|d| table.text(state, self.direction_prop(d)) != "none"); + self.wall_shape(state, npos, nstate, sides) + } + _ => { + let opposite = dir.opposite(); + let sides = [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, + ] + .map(|d| { + if d == dir { + self.wall_connects_to( + nstate, + b.is_face_sturdy(nstate, opposite), + opposite, + ) + } else { + table.text(state, self.direction_prop(d)) != "none" + } + }); + let above_pos = above(pos); + let above_state = self.state(above_pos); + self.wall_shape(state, above_pos, above_state, sides) + } + } + } + Class::WallHangingSign => { + survive_or_air!(axis_of(dir) == axis_of(clockwise(b.facing(state)))) + } + Class::PotentSulfur => self.potent_sulfur_state(state, pos), + Class::NetherPortal => sup!(), + _ => return None, + }) + } + + // ---- family helpers ---- + + /// `PotentSulfurBlock.validBlockState` (the geyser block-entity countdown + /// reset is the caller's). + pub(crate) fn potent_sulfur_state(&self, state: BlockStateId, pos: BlockPos) -> BlockStateId { + let b = self.b; + let key = b.props.potent_sulfur_state; + if self.fluid_at(above(pos)).kind() != FluidKind::Water { + return b.table.set_text(state, key, "dry"); + } + let below_state = self.below_state(pos); + let fluid = b.fluid(below_state); + let source_if_fluid = fluid.kind() == FluidKind::Empty || fluid.is_source(); + let tagged = |name: &str| b.tag(name).is_some_and(|tag| b.in_set(below_state, tag)); + if tagged("minecraft:causes_continuous_geyser_eruptions") && source_if_fluid { + return b.table.set_text(state, key, "continuous"); + } + if tagged("minecraft:causes_periodic_geyser_eruptions") && source_if_fluid { + if b.table.text(state, key) == "erupting" { + state + } else { + b.table.set_text(state, key, "dormant") + } + } else { + b.table.set_text(state, key, "wet") + } + } + + fn bed_neighbour_direction(&self, state: BlockStateId) -> Direction { + let facing = self.b.facing(state); + if self.b.table.text(state, self.b.props.part) == "foot" { + facing + } else { + facing.opposite() + } + } + pub(crate) fn chest_can_connect_to(&self, state: BlockStateId, other: BlockStateId) -> bool { + let b = self.b; + if b.instance_of(state, Class::CopperChest) { + b.tag("minecraft:copper_chests") + .is_some_and(|tag| b.in_set(other, tag)) + && b.table.has(other, b.props.kind) + } else { + b.block(state) == b.block(other) + } + } + /// `ChestBlock.getConnectedDirection`. + pub(crate) fn chest_connected_direction(&self, state: BlockStateId) -> Direction { + let facing = self.b.facing(state); + if self.b.table.text(state, self.b.props.kind) == "left" { + clockwise(facing) + } else { + counter_clockwise(facing) + } + } + /// `FenceBlock.connectsTo`. + pub(crate) fn fence_connects_to( + &self, + fence: BlockStateId, + state: BlockStateId, + face_solid: bool, + direction: Direction, + ) -> bool { + let b = self.b; + let t = &b.tags; + let same_fence = b.in_set(state, &t.fences) + && b.in_set(state, &t.wooden_fences) == b.in_set(fence, &t.wooden_fences); + let gate = b.instance_of(state, Class::FenceGate) + && axis_of(b.facing(state)) == axis_of(clockwise(direction)); + (!b.is_exception_for_connection(state) && face_solid) || same_fence || gate + } + /// `IronBarsBlock.attachsTo`. + pub(crate) fn bars_attach_to(&self, state: BlockStateId, face_solid: bool) -> bool { + let b = self.b; + (!b.is_exception_for_connection(state) && face_solid) + || b.instance_of(state, Class::IronBars) + || b.in_set(state, &b.tags.walls) + } + /// `WallBlock.connectsTo`. + pub(crate) fn wall_connects_to( + &self, + state: BlockStateId, + face_solid: bool, + direction: Direction, + ) -> bool { + let b = self.b; + let gate = b.instance_of(state, Class::FenceGate) + && axis_of(b.facing(state)) == axis_of(clockwise(direction)); + b.in_set(state, &b.tags.walls) + || (!b.is_exception_for_connection(state) && face_solid) + || b.instance_of(state, Class::IronBars) + || gate + } + /// `WallBlock.updateShape(level, state, topPos, topNeighbour, n, e, s, w)`. + pub(crate) fn wall_shape( + &self, + state: BlockStateId, + top_pos: BlockPos, + top: BlockStateId, + sides: [bool; 4], + ) -> BlockStateId { + let b = self.b; + let table = &b.table; + let cover = self.shape_info_at(top, top_pos).wall_cover; + let mut result = state; + let directions = [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, + ]; + for (i, direction) in directions.into_iter().enumerate() { + let value = if !sides[i] { + "none" + } else if cover & (1 << (i + 1)) != 0 { + "tall" + } else { + "low" + }; + result = table.set_text(result, self.direction_prop(direction), value); + } + // shouldRaisePost + let side = |d: Direction| table.text(result, self.direction_prop(d)).to_owned(); + let (north, south, east, west) = ( + side(Direction::North), + side(Direction::South), + side(Direction::East), + side(Direction::West), + ); + let raise = if b.instance_of(top, Class::Wall) && table.bool(top, b.props.up) { + true + } else { + let (nn, sn, en, wn) = ( + north == "none", + south == "none", + east == "none", + west == "none", + ); + if (nn && sn && wn && en) || nn != sn || wn != en { + true + } else if (north == "tall" && south == "tall") || (east == "tall" && west == "tall") { + false + } else { + b.in_set(top, &b.tags.wall_post_override) || cover & 1 != 0 + } + }; + table.set_bool(result, b.props.up, raise) + } + /// `StairBlock.getStairsShape`. + pub(crate) fn stairs_shape(&self, state: BlockStateId, pos: BlockPos) -> &'static str { + let b = self.b; + let p = b.props; + let table = &b.table; + let facing = b.facing(state); + let half = table.text(state, p.half); + let behind = self.rel_state(pos, facing); + if b.instance_of(behind, Class::Stair) && table.text(behind, p.half) == half { + let behind_facing = b.facing(behind); + if axis_of(behind_facing) != axis_of(facing) + && self.stairs_can_take_shape(state, pos, behind_facing.opposite()) + { + return if behind_facing == counter_clockwise(facing) { + "outer_left" + } else { + "outer_right" + }; + } + } + let front = self.rel_state(pos, facing.opposite()); + if b.instance_of(front, Class::Stair) && table.text(front, p.half) == half { + let front_facing = b.facing(front); + if axis_of(front_facing) != axis_of(facing) + && self.stairs_can_take_shape(state, pos, front_facing) + { + return if front_facing == counter_clockwise(facing) { + "inner_left" + } else { + "inner_right" + }; + } + } + "straight" + } + fn stairs_can_take_shape( + &self, + state: BlockStateId, + pos: BlockPos, + direction: Direction, + ) -> bool { + let b = self.b; + let neighbour = self.rel_state(pos, direction); + !b.instance_of(neighbour, Class::Stair) + || b.facing(neighbour) != b.facing(state) + || b.table.text(neighbour, b.props.half) != b.table.text(state, b.props.half) + } + /// `TripWireBlock.shouldConnectTo`. + pub(crate) fn tripwire_should_connect_to( + &self, + state: BlockStateId, + direction: Direction, + ) -> bool { + let b = self.b; + if b.is_block(state, b.named.tripwire_hook) { + b.facing(state) == direction.opposite() + } else { + b.is_block(state, b.named.tripwire) + } + } + /// `LeavesBlock.getDistanceAt`. + pub(crate) fn leaf_distance_at(&self, state: BlockStateId) -> i32 { + let b = self.b; + if b.in_set(state, &b.tags.prevents_nearby_leaf_decay) { + 0 + } else if b.table.has(state, b.props.distance) { + b.table.int(state, b.props.distance) + } else { + 7 + } + } + /// `ConcretePowderBlock.touchesLiquid`. + pub(crate) fn concrete_touches_liquid(&self, pos: BlockPos) -> bool { + let b = self.b; + let solidifies = |state: BlockStateId| b.is_water_fluid(b.fluid(state).kind()); + let mut test = pos; + for direction in Direction::ALL { + let current = self.state(test); + if direction != Direction::Down || solidifies(current) { + test = rel(pos, direction); + let state = self.state(test); + if solidifies(state) && !b.is_face_sturdy(state, direction.opposite()) { + return true; + } + } + } + false + } + pub(crate) fn coral_scan_for_water(&self, pos: BlockPos) -> bool { + Direction::ALL + .into_iter() + .any(|d| self.b.is_water_fluid(self.fluid_at(rel(pos, d)).kind())) + } + /// `BaseCoralPlantTypeBlock.scanForWater(state, level, pos)`. + pub(crate) fn coral_plant_scan_for_water(&self, state: BlockStateId, pos: BlockPos) -> bool { + if self.b.is_waterlogged(state) { + return true; + } + self.coral_scan_for_water(pos) + } + /// `BaseCoralPlantTypeBlock.tryScheduleDieTick`. + pub(crate) fn coral_try_schedule_die_tick(&mut self, state: BlockStateId, pos: BlockPos) { + if !self.coral_plant_scan_for_water(state, pos) { + let delay = 60 + self.random().next_int_bound(40).unwrap_or(0); + let block = self.b.block(state); + self.schedule_tick(pos, block, delay); + } + } + /// `BubbleColumnBlock.canOccupy`. + pub(crate) fn bubble_column_can_occupy(&self, state: BlockStateId) -> bool { + let b = self.b; + let fluid = b.fluid(state); + b.is_block(state, b.named.bubble_column) + || (b.fluid_in(fluid.kind(), b.fluid_tags.bubble_column_can_occupy) + && b.instance_of(state, Class::Liquid) + && fluid.is_source() + && fluid.amount() >= 8) + } + pub(crate) fn should_bubble_column_occupy(&self, state: BlockStateId) -> bool { + let fluid = self.b.fluid(state); + self.b + .fluid_in(fluid.kind(), self.b.fluid_tags.bubble_column_can_occupy) + && fluid.is_source() + && fluid.is_full() + } + pub(crate) fn try_schedule_bubble_column( + &mut self, + pos: BlockPos, + below_state: BlockStateId, + block: BlockId, + ) { + let t = &self.b.tags; + if self + .b + .in_set(below_state, &t.enables_bubble_column_drag_down) + || self.b.in_set(below_state, &t.enables_bubble_column_push_up) + { + self.schedule_tick(pos, block, 20); + } + } + /// `NoteBlock.setInstrument`. + pub(crate) fn note_block_instrument(&self, pos: BlockPos, state: BlockStateId) -> BlockStateId { + let b = self.b; + let above = b.facts(self.above_state(pos)).instrument; + let name = if super::data::instrument_works_above(above) { + above + } else { + let below = b.facts(self.below_state(pos)).instrument; + if super::data::instrument_works_above(below) { + 0 + } else { + below + } + }; + b.table.set_text( + state, + b.props.instrument, + super::data::INSTRUMENTS[name as usize], + ) + } + /// `SpeleothemBlock.calculateSpeleothemThickness`. + pub(crate) fn speleothem_thickness( + &self, + pos: BlockPos, + tip: Direction, + merge: bool, + ) -> &'static str { + let b = self.b; + let p = b.props; + let base = tip.opposite(); + let is_with = |state: BlockStateId, direction: Direction| { + b.tag("minecraft:speleothems") + .is_some_and(|tag| b.in_set(state, tag)) + && b.table.dir(state, p.vertical_direction) == Some(direction) + }; + let front = self.rel_state(pos, tip); + let block = b.block(self.state(pos)); + if is_with(front, base) && b.is_block(front, block) { + if !merge && b.table.text(front, p.thickness) != "tip_merge" { + "tip" + } else { + "tip_merge" + } + } else if !is_with(front, tip) { + "tip" + } else { + let front_thickness = b.table.text(front, p.thickness); + if front_thickness != "tip" && front_thickness != "tip_merge" { + let behind = self.rel_state(pos, base); + if !is_with(behind, tip) { + "base" + } else { + "middle" + } + } else { + "frustum" + } + } + } + /// `FireBlock.getStateWithAge` via `BaseFireBlock.getState`. + pub(crate) fn fire_state_with_age(&self, pos: BlockPos, age: i32) -> BlockStateId { + let b = self.b; + let placement = self.fire_state_for(pos); + if b.is_block(placement, b.named.fire) { + b.table.set_int(placement, b.props.age, age) + } else { + placement + } + } + /// `BaseFireBlock.getState(level, pos)`. + pub(crate) fn fire_state_for(&self, pos: BlockPos) -> BlockStateId { + let b = self.b; + let below_pos = below(pos); + let below_state = self.state(below_pos); + if b.in_set(below_state, &b.tags.soul_fire_base_blocks) { + return b.default_of(b.named.soul_fire); + } + let fire = b.default_of(b.named.fire); + if !self.can_burn(below_state) && !b.is_face_sturdy(below_state, Direction::Up) { + let mut result = fire; + for direction in Direction::ALL { + if direction == Direction::Down { + continue; + } + let burn = self.can_burn(self.rel_state(pos, direction)); + result = b + .table + .set_bool(result, self.direction_prop(direction), burn); + } + result + } else { + fire + } + } + /// `MossyCarpetBlock.getUpdatedState`. + pub(crate) fn mossy_carpet_updated_state( + &self, + mut state: BlockStateId, + pos: BlockPos, + create_sides: bool, + ) -> BlockStateId { + let b = self.b; + let table = &b.table; + let block = b.block(state); + let base = table.bool(state, b.props.bottom); + let create_sides = create_sides || base; + let mut above_state = None; + let mut below_state = None; + for direction in [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, + ] { + let key = self.direction_prop(direction); + let supported = b.multiface_can_attach(self.rel_state(pos, direction), direction); + let mut side = if supported { + if create_sides { + "low" + } else { + table.text(state, key) + } + } else { + "none" + }; + if side == "low" { + let above = *above_state.get_or_insert_with(|| self.above_state(pos)); + if b.is_block(above, block) + && table.text(above, key) != "none" + && !table.bool(above, b.props.bottom) + { + side = "tall"; + } + if !base { + let below = *below_state.get_or_insert_with(|| self.below_state(pos)); + if b.is_block(below, block) && table.text(below, key) == "none" { + side = "none"; + } + } + } + let side = side.to_owned(); + state = table.set_text(state, key, &side); + } + state + } + pub(crate) fn mossy_carpet_has_faces(&self, state: BlockStateId) -> bool { + let b = self.b; + table_bool(b, state) + || [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, + ] + .into_iter() + .any(|d| b.table.text(state, self.direction_prop(d)) != "none") + } +} + +fn table_bool(b: &super::Behaviours, state: BlockStateId) -> bool { + b.table.bool(state, b.props.bottom) +} +fn class_is(b: &super::Behaviours, block: BlockId, class: Class) -> bool { + b.block_data(block).is(class) +} diff --git a/crates/horizon-world/src/level/speleothem.rs b/crates/horizon-world/src/level/speleothem.rs new file mode 100644 index 000000000..60059cfe9 --- /dev/null +++ b/crates/horizon-world/src/level/speleothem.rs @@ -0,0 +1,369 @@ +//! `SpeleothemBlock` growth (pointed dripstone, sulfur spikes) and +//! `PointedDripstoneBlock` fluid transfer into cauldrons and mud. +use super::{ + LevelAccess, Sim, + classes::Class, + states::BlockId, + update::{above, below, rel}, +}; +use crate::{fluid::FluidKind, registry::BlockStateId}; +use horizon_core::{geometry::Direction, position::BlockPos, random::RandomSource}; + +impl<L: LevelAccess + ?Sized> Sim<'_, L> { + fn speleothem_tag(&self, state: BlockStateId) -> bool { + self.b + .tag("minecraft:speleothems") + .is_some_and(|tag| self.b.in_set(state, tag)) + } + fn speleothem_with(&self, state: BlockStateId, direction: Direction) -> bool { + self.speleothem_tag(state) + && self.b.table.dir(state, self.b.props.vertical_direction) == Some(direction) + } + fn speleothem_is_tip(&self, state: BlockStateId, include_merged: bool) -> bool { + if !self.speleothem_tag(state) { + return false; + } + let thickness = self.b.table.text(state, self.b.props.thickness); + thickness == "tip" || (include_merged && thickness == "tip_merge") + } + fn is_free_hanging_stalactite(&self, state: BlockStateId) -> bool { + self.speleothem_with(state, Direction::Down) + && self.b.table.text(state, self.b.props.thickness) == "tip" + && !self.b.is_waterlogged(state) + } + /// `SpeleothemBlock.findBlockVertical`. + fn find_block_vertical( + &self, + pos: BlockPos, + up: bool, + path: impl Fn(&Self, BlockPos, BlockStateId) -> bool, + target: impl Fn(&Self, BlockStateId) -> bool, + max_steps: i32, + ) -> Option<BlockPos> { + let mut current = pos; + for _ in 1..max_steps { + current = if up { above(current) } else { below(current) }; + let state = self.state(current); + if target(self, state) { + return Some(current); + } + if !self.is_inside_build_height(current.y) || !path(self, current, state) { + return None; + } + } + None + } + fn speleothem_find_tip( + &self, + state: BlockStateId, + pos: BlockPos, + max: i32, + include_merged: bool, + ) -> Option<BlockPos> { + if self.speleothem_is_tip(state, include_merged) { + return Some(pos); + } + let b = self.b; + let direction = b + .table + .dir(state, b.props.vertical_direction) + .unwrap_or(Direction::Up); + let block = b.block(state); + self.find_block_vertical( + pos, + direction == Direction::Up, + |sim, _, s| { + sim.b.is_block(s, block) + && sim.b.table.dir(s, sim.b.props.vertical_direction) == Some(direction) + }, + |sim, s| sim.speleothem_is_tip(s, include_merged), + max, + ) + } + /// `SpeleothemBlock.randomTick` (+ `PointedDripstoneBlock.maybeTransferFluid`). + pub(crate) fn speleothem_random_tick(&mut self, state: BlockStateId, pos: BlockPos) { + let b = self.b; + if b.instance_of(state, Class::PointedDripstone) { + let value = self.random().next_float(); + self.dripstone_transfer_fluid(state, pos, value); + } + let start = self.speleothem_with(state, Direction::Down) + && !b.is_block(self.above_state(pos), b.block(state)); + if self.random().next_float() < 0.011_377_778 && start { + self.speleothem_grow(state, pos); + } + } + fn speleothem_grow(&mut self, state: BlockStateId, pos: BlockPos) { + let b = self.b; + let block = b.block(state); + let data = b.data(state); + let mut can_grow = data + .link + .is_some_and(|grow_on| b.is_block(self.above_state(pos), grow_on)); + if data.is(Class::PointedDripstone) { + let fluid = b.fluid(self.state(pos.offset(0, 2, 0))); + can_grow &= fluid.kind() == FluidKind::Water; + } + if !can_grow { + return; + } + let max = if data.is(Class::SulfurSpike) { 2 } else { 7 }; + let Some(tip_pos) = self.speleothem_find_tip(state, pos, max, false) else { + return; + }; + let tip = self.state(tip_pos); + if self.is_free_hanging_stalactite(tip) && self.speleothem_can_tip_grow(block, tip, tip_pos) + { + if self.random().next_boolean() { + self.speleothem_grow_to(block, tip_pos, Direction::Down); + } else { + self.speleothem_grow_stalagmite_below(block, tip_pos); + } + } + } + fn speleothem_unmerged_tip( + &self, + block: BlockId, + state: BlockStateId, + direction: Direction, + ) -> bool { + self.speleothem_is_tip(state, false) + && self.b.table.dir(state, self.b.props.vertical_direction) == Some(direction) + && self.b.is_block(state, block) + } + fn speleothem_can_tip_grow( + &self, + block: BlockId, + tip: BlockStateId, + tip_pos: BlockPos, + ) -> bool { + let direction = self + .b + .table + .dir(tip, self.b.props.vertical_direction) + .unwrap_or(Direction::Up); + let grow = self.rel_state(tip_pos, direction); + if self.b.fluid(grow).kind() != FluidKind::Empty { + false + } else { + self.b.is_air(grow) || self.speleothem_unmerged_tip(block, grow, direction.opposite()) + } + } + fn speleothem_create( + &mut self, + block: BlockId, + pos: BlockPos, + direction: Direction, + thickness: &str, + ) { + let b = self.b; + let state = b + .table + .set_dir(b.default_of(block), b.props.vertical_direction, direction); + let state = b.table.set_text(state, b.props.thickness, thickness); + let water = self.fluid_at(pos) == crate::fluid::FluidState::WATER + || self.fluid_at(pos).kind() == FluidKind::Water; + self.set_block_and_update(pos, b.table.set_bool(state, b.props.waterlogged, water)); + } + fn speleothem_grow_to(&mut self, block: BlockId, from: BlockPos, direction: Direction) { + let b = self.b; + let target = rel(from, direction); + let existing = self.state(target); + if self.speleothem_unmerged_tip(block, existing, direction.opposite()) { + let (stalactite, stalagmite) = + if b.table.dir(existing, b.props.vertical_direction) == Some(Direction::Up) { + (above(target), target) + } else { + (target, below(target)) + }; + self.speleothem_create(block, stalactite, Direction::Down, "tip_merge"); + self.speleothem_create(block, stalagmite, Direction::Up, "tip_merge"); + } else if b.is_air(existing) || b.is_block(existing, b.named.water) { + self.speleothem_create(block, target, direction, "tip"); + } + } + fn speleothem_grow_stalagmite_below(&mut self, block: BlockId, from: BlockPos) { + let b = self.b; + let mut pos = from; + for _ in 0..10 { + pos = below(pos); + let state = self.state(pos); + if b.fluid(state).kind() != FluidKind::Empty { + return; + } + if self.speleothem_unmerged_tip(block, state, Direction::Up) + && self.speleothem_can_tip_grow(block, state, pos) + { + self.speleothem_grow_to(block, pos, Direction::Up); + return; + } + if self.is_valid_speleothem_placement(block, pos, Direction::Up) + && !self.is_water_at(below(pos)) + { + self.speleothem_grow_to(block, below(pos), Direction::Up); + return; + } + if b.data(b.default_of(block)).is(Class::PointedDripstone) + && !self.dripstone_can_drip_through(state) + { + return; + } + } + } + /// `PointedDripstoneBlock.canDripThrough`. + fn dripstone_can_drip_through(&self, state: BlockStateId) -> bool { + let b = self.b; + if b.is_air(state) { + return true; + } + if b.solid_render(state) || b.fluid(state).kind() != FluidKind::Empty { + return false; + } + // REQUIRED_SPACE_TO_DRIP_THROUGH_NON_SOLID_BLOCK = column(4, 0, 16). + match b.collision_shape(state) { + None => true, + Some(shape) => { + let column = horizon_core::geometry::VoxelShape::from_box( + horizon_core::geometry::Aabb::new( + horizon_core::geometry::Vec3::new(0.375, 0.0, 0.375), + horizon_core::geometry::Vec3::new(0.625, 1.0, 0.625), + ), + ); + column.is_ok_and(|column| { + !column + .join_is_not_empty(shape, horizon_core::geometry::ShapeOp::AND) + .unwrap_or(true) + }) + } + } + } + /// `PointedDripstoneBlock.getFluidAboveStalactite`: (position above the + /// root, fluid, state there). + fn dripstone_fluid_above( + &self, + state: BlockStateId, + pos: BlockPos, + ) -> Option<(BlockPos, FluidKind, BlockStateId)> { + let b = self.b; + if !self.speleothem_with(state, Direction::Down) { + return None; + } + let block = b.block(state); + let direction = Direction::Down; + let root = self.find_block_vertical( + pos, + true, + |sim, _, s| { + sim.b.is_block(s, block) + && sim.b.table.dir(s, sim.b.props.vertical_direction) == Some(direction) + }, + |sim, s| !sim.b.is_block(s, block), + 11, + )?; + let above_pos = above(root); + let above_state = self.state(above_pos); + let fluid = if b.is_block(above_state, b.named.mud) + && self.level.dimension() != super::Dimension::Nether + { + FluidKind::Water + } else { + b.fluid(above_state).kind() + }; + Some((above_pos, fluid, above_state)) + } + fn dripstone_transfer_fluid(&mut self, state: BlockStateId, pos: BlockPos, value: f32) { + let b = self.b; + if value > 0.175_781_25 { + return; + } + if !(self.speleothem_with(state, Direction::Down) + && !b.is_block(self.above_state(pos), b.block(state))) + { + return; + } + let Some((source_pos, fluid, source_state)) = self.dripstone_fluid_above(state, pos) else { + return; + }; + let probability = match fluid { + FluidKind::Water => 0.175_781_25, + FluidKind::Lava => 0.058_593_75, + _ => return, + }; + if value >= probability { + return; + } + let Some(tip) = self.speleothem_find_tip(state, pos, 11, false) else { + return; + }; + if b.is_block(source_state, b.named.mud) && fluid == FluidKind::Water { + self.set_block_and_update(source_pos, b.default_of(b.named.clay)); + self.game_event(source_pos, "minecraft:block_change"); + self.level_event(1504, tip, 0); + } else if let Some(cauldron) = self.dripstone_find_cauldron(tip, fluid) { + self.level_event(1504, tip, 0); + let delay = 50 + tip.y - cauldron.y; + let block = b.block(self.state(cauldron)); + self.schedule_tick(cauldron, block, delay); + } + } + fn cauldron_can_receive(&self, state: BlockStateId, fluid: FluidKind) -> bool { + let b = self.b; + let data = b.data(state); + if data.is(Class::Cauldron) { + true + } else if data.is(Class::LayeredCauldron) { + fluid == FluidKind::Water && b.is_block(state, b.named.water_cauldron) + } else { + false + } + } + fn dripstone_find_cauldron(&self, tip: BlockPos, fluid: FluidKind) -> Option<BlockPos> { + self.find_block_vertical( + tip, + false, + |sim, _, s| sim.dripstone_can_drip_through(s), + |sim, s| sim.cauldron_can_receive(s, fluid), + 11, + ) + } + /// `AbstractCauldronBlock.tick`: receive a drip from a stalactite above. + pub(crate) fn cauldron_tick(&mut self, state: BlockStateId, pos: BlockPos) { + let b = self.b; + let Some(tip) = self.find_block_vertical( + pos, + true, + |sim, _, s| sim.dripstone_can_drip_through(s), + |sim, s| sim.is_free_hanging_stalactite(s), + 11, + ) else { + return; + }; + let tip_state = self.state(tip); + let fluid = self + .dripstone_fluid_above(tip_state, tip) + .map(|(_, f, _)| f) + .filter(|f| matches!(f, FluidKind::Water | FluidKind::Lava)) + .unwrap_or(FluidKind::Empty); + if fluid == FluidKind::Empty || !self.cauldron_can_receive(state, fluid) { + return; + } + let data = b.data(state); + if data.is(Class::Cauldron) { + let (next, event) = if fluid == FluidKind::Water { + (b.named.water_cauldron, 1047) + } else { + (b.named.lava_cauldron, 1046) + }; + self.set_block_and_update(pos, b.default_of(next)); + self.game_event(pos, "minecraft:block_change"); + self.level_event(event, pos, 0); + } else if data.is(Class::LayeredCauldron) { + let level = b.table.int(state, b.props.level); + if level < 3 { + self.set_block_and_update(pos, b.table.set_int(state, b.props.level, level + 1)); + self.game_event(pos, "minecraft:block_change"); + self.level_event(1047, pos, 0); + } + } + } +} diff --git a/crates/horizon-world/src/level/states.rs b/crates/horizon-world/src/level/states.rs new file mode 100644 index 000000000..abe6c08cf --- /dev/null +++ b/crates/horizon-world/src/level/states.rs @@ -0,0 +1,353 @@ +//! O(1) block-state property access over the pinned registry. +//! +//! Vanilla's `StateDefinition` enumerates a block's states as the cartesian +//! product of its properties sorted by name, the last property varying fastest, +//! and the global state registry lists every block's states contiguously. The +//! table below derives each property's stride from that layout and verifies it +//! against every registry descriptor at load, so `setValue` is arithmetic. +use crate::{ + compression::invalid, + registry::{BlockRegistry, BlockStateId}, +}; +use horizon_core::geometry::{Axis, Direction}; +use std::{collections::HashMap, io}; + +/// Registry-order block index; equals vanilla's `Block` registry ID. +#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct BlockId(pub u16); + +/// Interned property name (`facing`, `waterlogged`, ...), shared by all blocks. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub struct PropKey(pub u16); + +#[derive(Clone, Debug)] +pub struct PropValue { + pub text: Box<str>, + pub int: Option<i32>, + pub boolean: Option<bool>, + pub direction: Option<Direction>, +} +impl PropValue { + fn new(text: &str) -> Self { + Self { + int: text.parse().ok(), + boolean: match text { + "true" => Some(true), + "false" => Some(false), + _ => None, + }, + direction: direction_from_name(text), + text: text.into(), + } + } +} + +#[derive(Clone, Debug)] +struct Slot { + key: PropKey, + stride: u32, + values: Vec<PropValue>, +} + +#[derive(Clone, Debug)] +pub struct BlockInfo { + pub name: Box<str>, + pub base: BlockStateId, + pub count: u32, + pub default: BlockStateId, + slots: Vec<Slot>, +} + +pub struct StateTable { + blocks: Vec<BlockInfo>, + state_block: Vec<u16>, + keys: HashMap<String, PropKey>, + key_names: Vec<String>, + by_name: HashMap<Box<str>, BlockId>, +} + +pub fn direction_from_name(name: &str) -> Option<Direction> { + Some(match name { + "down" => Direction::Down, + "up" => Direction::Up, + "north" => Direction::North, + "south" => Direction::South, + "west" => Direction::West, + "east" => Direction::East, + _ => return None, + }) +} +pub const fn direction_name(direction: Direction) -> &'static str { + match direction { + Direction::Down => "down", + Direction::Up => "up", + Direction::North => "north", + Direction::South => "south", + Direction::West => "west", + Direction::East => "east", + } +} +pub const fn axis_name(axis: Axis) -> &'static str { + match axis { + Axis::X => "x", + Axis::Y => "y", + Axis::Z => "z", + } +} + +impl StateTable { + pub fn new(registry: &BlockRegistry) -> io::Result<Self> { + let mut table = Self { + blocks: Vec::new(), + state_block: Vec::with_capacity(registry.len()), + keys: HashMap::new(), + key_names: Vec::new(), + by_name: HashMap::new(), + }; + let mut index = 0; + while index < registry.len() { + let first = registry.state(BlockStateId(index as u32)).unwrap(); + let mut end = index + 1; + while end < registry.len() + && registry.state(BlockStateId(end as u32)).unwrap().name == first.name + { + end += 1; + } + let count = (end - index) as u32; + let names: Vec<&String> = first.properties.keys().collect(); + let mut slots = Vec::with_capacity(names.len()); + let mut stride = count; + for name in &names { + let mut values = Vec::new(); + // Values of this property cycle with period (stride / len); the + // first states with stride steps give each value in order. + let mut seen = Vec::<&str>::new(); + for offset in 0..count { + let value = registry + .state(BlockStateId(index as u32 + offset)) + .unwrap() + .properties[*name] + .as_str(); + if !seen.contains(&value) { + seen.push(value); + } + } + stride /= seen.len() as u32; + for value in seen { + values.push(PropValue::new(value)); + } + let key = table.key_or_insert(name); + slots.push(Slot { + key, + stride, + values, + }); + } + if stride != 1 { + return Err(invalid("block state count is not a property product")); + } + // Order of values: derive from the states at multiples of stride. + for slot in &mut slots { + let len = slot.values.len() as u32; + let name = &table.key_names[slot.key.0 as usize]; + slot.values = (0..len) + .map(|i| { + PropValue::new( + ®istry + .state(BlockStateId(index as u32 + i * slot.stride)) + .unwrap() + .properties[name], + ) + }) + .collect(); + } + let block = + BlockId(u16::try_from(table.blocks.len()).map_err(|_| invalid("too many blocks"))?); + let default = registry + .default_state(&first.name) + .ok_or_else(|| invalid("block without default state"))?; + let info = BlockInfo { + name: first.name.as_str().into(), + base: BlockStateId(index as u32), + count, + default, + slots, + }; + for offset in 0..count { + let state = registry.state(BlockStateId(index as u32 + offset)).unwrap(); + for slot in &info.slots { + let value = + &slot.values[((offset / slot.stride) % slot.values.len() as u32) as usize]; + if *value.text != *state.properties[&table.key_names[slot.key.0 as usize]] { + return Err(invalid( + "registry state order differs from vanilla's state definition", + )); + } + } + table.state_block.push(block.0); + } + if table.by_name.insert(info.name.clone(), block).is_some() { + return Err(invalid("block states are not contiguous")); + } + table.blocks.push(info); + index = end; + } + Ok(table) + } + fn key_or_insert(&mut self, name: &str) -> PropKey { + if let Some(key) = self.keys.get(name) { + return *key; + } + let key = PropKey(self.key_names.len() as u16); + self.key_names.push(name.to_owned()); + self.keys.insert(name.to_owned(), key); + key + } + /// Property keys absent from every block resolve to an unused key, so + /// lookups through them simply report "no such property". + pub fn key(&mut self, name: &str) -> PropKey { + self.key_or_insert(name) + } + pub fn state_count(&self) -> usize { + self.state_block.len() + } + pub fn block_count(&self) -> usize { + self.blocks.len() + } + pub fn block(&self, state: BlockStateId) -> BlockId { + BlockId(self.state_block[state.0 as usize]) + } + pub fn info(&self, block: BlockId) -> &BlockInfo { + &self.blocks[block.0 as usize] + } + pub fn name(&self, state: BlockStateId) -> &str { + &self.info(self.block(state)).name + } + pub fn block_by_name(&self, name: &str) -> Option<BlockId> { + self.by_name.get(name).copied() + } + pub fn default_state(&self, block: BlockId) -> BlockStateId { + self.info(block).default + } + pub fn is(&self, state: BlockStateId, block: BlockId) -> bool { + self.state_block[state.0 as usize] == block.0 + } + fn slot(&self, state: BlockStateId, key: PropKey) -> Option<&Slot> { + self.info(self.block(state)) + .slots + .iter() + .find(|slot| slot.key == key) + } + pub fn has(&self, state: BlockStateId, key: PropKey) -> bool { + self.slot(state, key).is_some() + } + fn index_in(&self, state: BlockStateId, slot: &Slot) -> u32 { + let base = self.info(self.block(state)).base.0; + ((state.0 - base) / slot.stride) % slot.values.len() as u32 + } + pub fn value(&self, state: BlockStateId, key: PropKey) -> Option<&PropValue> { + let slot = self.slot(state, key)?; + Some(&slot.values[self.index_in(state, slot) as usize]) + } + pub fn text(&self, state: BlockStateId, key: PropKey) -> &str { + self.value(state, key).map_or("", |v| &v.text) + } + /// Missing boolean properties read as false. + pub fn bool(&self, state: BlockStateId, key: PropKey) -> bool { + self.value(state, key) + .and_then(|v| v.boolean) + .unwrap_or(false) + } + /// Missing integer properties read as 0. + pub fn int(&self, state: BlockStateId, key: PropKey) -> i32 { + self.value(state, key).and_then(|v| v.int).unwrap_or(0) + } + pub fn dir(&self, state: BlockStateId, key: PropKey) -> Option<Direction> { + self.value(state, key).and_then(|v| v.direction) + } + /// Number of values and minimum/maximum for integer properties. + pub fn int_range(&self, state: BlockStateId, key: PropKey) -> Option<(i32, i32)> { + let slot = self.slot(state, key)?; + let ints = slot.values.iter().filter_map(|v| v.int); + Some((ints.clone().min()?, ints.max()?)) + } + pub fn values(&self, block: BlockId, key: PropKey) -> impl Iterator<Item = &PropValue> { + self.info(block) + .slots + .iter() + .filter(move |slot| slot.key == key) + .flat_map(|slot| slot.values.iter()) + } + fn with_index(&self, state: BlockStateId, slot: &Slot, index: u32) -> BlockStateId { + let current = self.index_in(state, slot); + BlockStateId(state.0 - current * slot.stride + index * slot.stride) + } + /// `setValue` by text; None if the block lacks the property or value. + pub fn with_text(&self, state: BlockStateId, key: PropKey, text: &str) -> Option<BlockStateId> { + let slot = self.slot(state, key)?; + let index = slot.values.iter().position(|v| &*v.text == text)?; + Some(self.with_index(state, slot, index as u32)) + } + pub fn with_int(&self, state: BlockStateId, key: PropKey, value: i32) -> Option<BlockStateId> { + let slot = self.slot(state, key)?; + let index = slot.values.iter().position(|v| v.int == Some(value))?; + Some(self.with_index(state, slot, index as u32)) + } + pub fn with_bool( + &self, + state: BlockStateId, + key: PropKey, + value: bool, + ) -> Option<BlockStateId> { + let slot = self.slot(state, key)?; + let index = slot.values.iter().position(|v| v.boolean == Some(value))?; + Some(self.with_index(state, slot, index as u32)) + } + pub fn with_dir( + &self, + state: BlockStateId, + key: PropKey, + value: Direction, + ) -> Option<BlockStateId> { + self.with_text(state, key, direction_name(value)) + } + /// Vanilla `setValue` callers always pass legal values; when Horizon's port + /// would compute an illegal one the state is returned unchanged. + pub fn set_text(&self, state: BlockStateId, key: PropKey, text: &str) -> BlockStateId { + self.with_text(state, key, text).unwrap_or(state) + } + pub fn set_int(&self, state: BlockStateId, key: PropKey, value: i32) -> BlockStateId { + self.with_int(state, key, value).unwrap_or(state) + } + pub fn set_bool(&self, state: BlockStateId, key: PropKey, value: bool) -> BlockStateId { + self.with_bool(state, key, value).unwrap_or(state) + } + pub fn set_dir(&self, state: BlockStateId, key: PropKey, value: Direction) -> BlockStateId { + self.with_dir(state, key, value).unwrap_or(state) + } + /// `cycle`: the next value in definition order, wrapping around. + pub fn cycle(&self, state: BlockStateId, key: PropKey) -> BlockStateId { + let Some(slot) = self.slot(state, key) else { + return state; + }; + let next = (self.index_in(state, slot) + 1) % slot.values.len() as u32; + self.with_index(state, slot, next) + } + /// `Block.withPropertiesOf`: copy every property the target block shares. + pub fn with_properties_of(&self, target: BlockId, source: BlockStateId) -> BlockStateId { + let mut result = self.default_state(target); + for slot in &self.info(self.block(source)).slots { + let value = &slot.values[self.index_in(source, slot) as usize]; + if let Some(next) = self.with_text(result, slot.key, &value.text) { + result = next; + } + } + result + } + pub fn property_names(&self, block: BlockId) -> impl Iterator<Item = &str> { + self.info(block) + .slots + .iter() + .map(|slot| self.key_names[slot.key.0 as usize].as_str()) + } +} diff --git a/crates/horizon-world/src/level/survive.rs b/crates/horizon-world/src/level/survive.rs new file mode 100644 index 000000000..0feda8c7c --- /dev/null +++ b/crates/horizon-world/src/level/survive.rs @@ -0,0 +1,589 @@ +//! `canSurvive` and `VegetationBlock.mayPlaceOn` for every overriding class. +//! Rules mirror the natively-validated `block_survival` port; dispatch follows +//! the Java class chain so `super.canSurvive` reaches the next override. +use super::{ + LevelAccess, Sim, + classes::Class, + query::is_horizontal, + update::{HORIZONTAL, above, below, rel}, +}; +use crate::registry::BlockStateId; +use horizon_core::{geometry::Direction, position::BlockPos}; + +impl<L: LevelAccess + ?Sized> Sim<'_, L> { + /// `BlockState.canSurvive(level, pos)`. + pub fn can_survive(&self, state: BlockStateId, pos: BlockPos) -> bool { + self.can_survive_at(0, state, pos) + } + fn can_survive_at(&self, depth: usize, state: BlockStateId, pos: BlockPos) -> bool { + let chain = &self.b.data(state).chain; + for (index, class) in chain.iter().enumerate().skip(depth) { + if let Some(result) = self.can_survive_class(*class, index, state, pos) { + return result; + } + } + true + } + fn can_survive_class( + &self, + class: Class, + depth: usize, + state: BlockStateId, + pos: BlockPos, + ) -> Option<bool> { + let b = self.b; + let p = &b.props; + let t = &b.tags; + let n = &b.named; + let block = b.block(state); + Some(match class { + Class::AmethystCluster | Class::ShelfMushroom | Class::BaseCoralWallFan => { + let facing = b.facing(state); + self.sturdy(rel(pos, facing.opposite()), facing) + } + Class::BambooSapling | Class::BambooStalk => { + b.in_set(self.below_state(pos), &t.supports_bamboo) + } + Class::Banner | Class::Cake | Class::CandleCake | Class::StandingSign => { + b.is_solid(self.below_state(pos)) + } + Class::BaseCoralPlantType | Class::LeafLitter => self.sturdy(below(pos), Direction::Up), + Class::BasePressurePlate => { + let below = below(pos); + self.can_support_rigid_block(below) || self.can_support_center(below, Direction::Up) + } + Class::BaseRail => self.can_support_rigid_block(below(pos)), + Class::BaseTorch | Class::Candle => self.can_support_center(below(pos), Direction::Up), + Class::Bell => { + let connection = self.bell_connected_direction(state).opposite(); + if connection == Direction::Up { + self.can_support_center(above(pos), Direction::Down) + } else { + self.sturdy(rel(pos, connection), connection.opposite()) + } + } + Class::BigDripleaf => { + let below = self.below_state(pos); + b.is_block(below, block) + || b.is_block(below, n.big_dripleaf_stem) + || b.in_set(below, &t.supports_big_dripleaf) + } + Class::BigDripleafStem => { + let below = self.below_state(pos); + let above = self.above_state(pos); + (b.is_block(below, block) || b.in_set(below, &t.supports_big_dripleaf)) + && (b.is_block(above, block) || b.is_block(above, n.big_dripleaf)) + } + Class::BubbleColumn => { + let below = self.below_state(pos); + b.is_block(below, block) + || b.in_set(below, &t.enables_bubble_column_push_up) + || b.in_set(below, &t.enables_bubble_column_drag_down) + } + Class::Cactus => { + for direction in HORIZONTAL { + let at = rel(pos, direction); + if b.is_solid(self.state(at)) || b.is_lava_fluid(self.fluid_at(at).kind()) { + return Some(false); + } + } + let below = self.below_state(pos); + (b.is_block(below, block) || b.in_set(below, &t.supports_cactus)) + && !b.liquid(self.above_state(pos)) + } + Class::Carpet => !self.is_empty_block(below(pos)), + Class::CeilingHangingSign => { + b.is_face_sturdy_center(self.above_state(pos), Direction::Down) + } + Class::ChorusFlower => { + let below = self.below_state(pos); + if b.is_block(below, n.chorus_plant) || b.in_set(below, &t.supports_chorus_flower) { + return Some(true); + } + if !b.is_air(below) { + return Some(false); + } + let mut one = false; + for direction in HORIZONTAL { + let neighbour = self.rel_state(pos, direction); + if b.is_block(neighbour, n.chorus_plant) { + if one { + return Some(false); + } + one = true; + } else if !b.is_air(neighbour) { + return Some(false); + } + } + one + } + Class::ChorusPlant => { + let below_state = self.below_state(pos); + let vertical = !b.is_air(self.above_state(pos)) && !b.is_air(below_state); + for direction in HORIZONTAL { + let neighbour_pos = rel(pos, direction); + if b.is_block(self.state(neighbour_pos), block) { + if vertical { + return Some(false); + } + let under = self.below_state(neighbour_pos); + if b.is_block(under, block) || b.in_set(under, &t.supports_chorus_plant) { + return Some(true); + } + } + } + b.is_block(below_state, block) || b.in_set(below_state, &t.supports_chorus_plant) + } + Class::Cocoa => b.in_set(self.rel_state(pos, b.facing(state)), &t.supports_cocoa), + Class::Crop => { + self.raw_brightness(pos, 0) >= 8 && self.can_survive_at(depth + 1, state, pos) + } + Class::Diode => b.is_face_sturdy_rigid(self.below_state(pos), Direction::Up), + Class::Door => { + let below_state = self.below_state(pos); + if b.table.text(state, p.half) == "lower" { + b.is_face_sturdy(below_state, Direction::Up) + } else { + b.is_block(below_state, block) + } + } + Class::DoublePlant => { + if b.table.text(state, p.half) != "upper" { + return Some(self.can_survive_at(depth + 1, state, pos)); + } + let below_state = self.below_state(pos); + b.is_block(below_state, block) && b.table.text(below_state, p.half) == "lower" + } + Class::SmallDripleaf => { + if b.table.text(state, p.half) == "upper" { + return Some(self.can_survive_at(depth + 1, state, pos)); + } + let below = below(pos); + self.may_place_on(state, self.state(below), below) + } + Class::TallSeagrass => { + if b.table.text(state, p.half) == "upper" { + let below_state = self.below_state(pos); + return Some( + b.is_block(below_state, block) + && b.table.text(below_state, p.half) == "lower", + ); + } + let fluid = self.fluid_at(pos); + self.can_survive_at(depth + 1, state, pos) + && b.is_water_fluid(fluid.kind()) + && fluid.is_full() + } + Class::PitcherCrop => { + let lower = + b.is_block(state, n.pitcher_crop) && b.table.text(state, p.half) == "lower"; + if lower && self.raw_brightness(pos, 0) < 8 { + false + } else { + self.can_survive_at(depth + 1, state, pos) + } + } + Class::FaceAttachedHorizontalDirectional => { + let direction = self.face_attached_connected(state).opposite(); + self.sturdy(rel(pos, direction), direction.opposite()) + } + Class::Grindstone => true, + Class::PistonHead => self.piston_head_can_survive(state, pos), + Class::Farmland => { + let above = self.above_state(pos); + !b.is_solid(above) || b.in_set(above, &t.maintains_farmland) + } + Class::Fire => { + self.sturdy(below(pos), Direction::Up) || self.is_valid_fire_location(pos) + } + Class::SoulFire => b.in_set(self.below_state(pos), &t.soul_fire_base_blocks), + Class::Frogspawn => self.frogspawn_may_place_on(below(pos)), + Class::GrowingPlant => { + let data = b.data(state); + let growth = data.growth_direction; + let attached_pos = rel(pos, growth.opposite()); + let attached = self.state(attached_pos); + if !self.growing_plant_can_attach_to(state, attached) { + return Some(false); + } + let (head, body) = self.growing_plant_pair(block); + b.is_block(attached, head) + || b.is_block(attached, body) + || b.is_face_sturdy(attached, growth) + } + Class::HangingMoss => { + let neighbour = self.above_state(pos); + b.multiface_can_attach(neighbour, Direction::Up) || b.is_block(neighbour, block) + } + Class::HangingRoots => self.sturdy(above(pos), Direction::Down), + Class::Ladder => { + let facing = b.facing(state); + self.sturdy(rel(pos, facing.opposite()), facing) + } + Class::Lantern => { + let direction = if b.table.bool(state, p.hanging) { + Direction::Up + } else { + Direction::Down + }; + self.can_support_center(rel(pos, direction), direction.opposite()) + } + Class::MangrovePropagule => { + if b.table.bool(state, p.hanging) { + b.in_set( + self.above_state(pos), + &t.supports_hanging_mangrove_propagule, + ) + } else { + self.can_survive_at(depth + 1, state, pos) + } + } + Class::MossyCarpet => { + let below_state = self.below_state(pos); + if b.table.bool(state, p.bottom) { + !b.is_air(below_state) + } else { + b.is_block(below_state, block) && b.table.bool(below_state, p.bottom) + } + } + Class::Multiface => { + let mut any = false; + for direction in Direction::ALL { + if self.multiface_has_face(state, direction) { + if !b.multiface_can_attach(self.rel_state(pos, direction), direction) { + return Some(false); + } + any = true; + } + } + any + } + Class::Mushroom => { + let below_pos = below(pos); + let below_state = self.state(below_pos); + if b.in_set(below_state, &t.overrides_mushroom_light_requirement) { + true + } else { + self.raw_brightness(pos, 0) < 13 + && self.may_place_on(state, below_state, below_pos) + } + } + Class::Path => { + let above = self.above_state(pos); + !b.is_solid(above) || b.instance_of(above, Class::FenceGate) + } + Class::RedstoneWallTorch | Class::WallTorch => { + let facing = b.facing(state); + self.sturdy(rel(pos, facing.opposite()), facing) + } + Class::RedstoneWire => { + let below_state = self.below_state(pos); + b.is_face_sturdy(below_state, Direction::Up) || b.is_block(below_state, n.hopper) + } + Class::Scaffolding => self.scaffolding_distance(pos) < 7, + Class::SeaPickle => { + let below = below(pos); + self.may_place_on(state, self.state(below), below) + } + Class::SnowLayer => { + let below_state = self.below_state(pos); + if b.in_set(below_state, &t.cannot_support_snow_layer) { + false + } else if b.in_set(below_state, &t.support_override_snow_layer) { + true + } else { + self.shape_info_at(below_state, below(pos)).full_faces + & (1 << Direction::Up as u8) + != 0 + || (b.is_block(below_state, block) + && b.table.int(below_state, p.layers) == 8) + } + } + Class::Speleothem => { + let tip = b + .table + .dir(state, p.vertical_direction) + .unwrap_or(Direction::Up); + self.is_valid_speleothem_placement(block, pos, tip) + } + Class::SporeBlossom => { + self.can_support_center(above(pos), Direction::Down) && !self.is_water_at(pos) + } + Class::SugarCane => { + let below_state = self.below_state(pos); + if b.is_block(below_state, block) { + return Some(true); + } + if b.in_set(below_state, &t.supports_sugar_cane) { + let below = below(pos); + for direction in HORIZONTAL { + let at = rel(below, direction); + let fluid = self.fluid_at(at); + if b.fluid_in(fluid.kind(), b.fluid_tags.supports_sugar_cane_adjacently) + || b.in_set(self.state(at), &t.supports_sugar_cane_adjacently) + { + return Some(true); + } + } + } + false + } + Class::TripWireHook => { + let facing = b.facing(state); + is_horizontal(facing) && self.sturdy(rel(pos, facing.opposite()), facing) + } + Class::Vegetation => { + let below = below(pos); + self.may_place_on(state, self.state(below), below) + } + Class::Vine => { + let updated = self.vine_updated_state(state, pos); + self.vine_count_faces(updated) > 0 + } + Class::WallBanner | Class::WallSign => { + b.is_solid(self.rel_state(pos, b.facing(state).opposite())) + } + _ => return None, + }) + } + + /// `VegetationBlock.mayPlaceOn` (virtual) for `state`'s block. + pub fn may_place_on( + &self, + state: BlockStateId, + ground: BlockStateId, + ground_pos: BlockPos, + ) -> bool { + let b = self.b; + let t = &b.tags; + let data = b.data(state); + for class in &data.chain { + let result = match class { + Class::AttachedStem | Class::NetherFungus | Class::NetherRoots | Class::Stem => { + data.support_tag + .as_ref() + .is_some_and(|tag| b.in_set(ground, tag)) + } + Class::Azalea => b.in_set(ground, &t.supports_azalea), + Class::CactusFlower => { + let below = self.state(ground_pos); + b.in_set(below, &t.support_override_cactus_flower) + || b.is_face_sturdy_center(below, Direction::Up) + } + Class::Crop | Class::PitcherCrop => b.in_set(ground, &t.supports_crops), + Class::DryVegetation => b.in_set(ground, &t.supports_dry_vegetation), + Class::LilyPad => { + let fluid = self.fluid_at(ground_pos); + let above = self.fluid_at(above(ground_pos)); + (b.fluid_in(fluid.kind(), b.fluid_tags.supports_lily_pad) + || b.in_set(ground, &t.supports_lily_pad)) + && above.kind() == crate::fluid::FluidKind::Empty + } + Class::MangrovePropagule => b.in_set(ground, &t.supports_mangrove_propagule), + Class::Mushroom => b.solid_render(ground), + Class::NetherSprouts => b.in_set(ground, &t.supports_nether_sprouts), + Class::NetherWart => b.in_set(ground, &t.supports_nether_wart), + Class::SeaPickle => { + self.shape_info_at(ground, ground_pos).nonempty_faces + & (1 << Direction::Up as u8) + != 0 + || b.is_face_sturdy(ground, Direction::Up) + } + Class::Seagrass | Class::TallSeagrass => { + b.is_face_sturdy(ground, Direction::Up) + && !b.in_set(ground, &t.cannot_support_seagrass) + } + Class::SmallDripleaf => { + b.in_set(ground, &t.supports_small_dripleaf) + || (self.fluid_at(above(ground_pos)) == crate::fluid::FluidState::WATER + && b.in_set(ground, &t.supports_vegetation)) + } + Class::WitherRose => b.in_set(ground, &t.supports_wither_rose), + Class::Vegetation => b.in_set(ground, &t.supports_vegetation), + _ => continue, + }; + return result; + } + false + } + + fn frogspawn_may_place_on(&self, pos: BlockPos) -> bool { + let b = self.b; + let fluid = self.fluid_at(pos); + let above = self.fluid_at(above(pos)); + (b.fluid_in(fluid.kind(), b.fluid_tags.supports_frogspawn) + || b.in_set(self.state(pos), &b.tags.supports_frogspawn)) + && above.kind() == crate::fluid::FluidKind::Empty + } + + pub(crate) fn bell_connected_direction(&self, state: BlockStateId) -> Direction { + match self.b.table.text(state, self.b.props.attachment) { + "floor" => Direction::Up, + "ceiling" => Direction::Down, + _ => self.b.facing(state).opposite(), + } + } + /// `FaceAttachedHorizontalDirectionalBlock.getConnectedDirection`. + pub(crate) fn face_attached_connected(&self, state: BlockStateId) -> Direction { + match self.b.table.text(state, self.b.props.face) { + "ceiling" => Direction::Down, + "floor" => Direction::Up, + _ => self.b.facing(state), + } + } + pub(crate) fn multiface_has_face(&self, state: BlockStateId, direction: Direction) -> bool { + self.b.table.bool(state, self.direction_prop(direction)) + } + pub(crate) fn direction_prop(&self, direction: Direction) -> super::states::PropKey { + let p = &self.b.props; + match direction { + Direction::Down => p.down, + Direction::Up => p.up, + Direction::North => p.north, + Direction::South => p.south, + Direction::West => p.west, + Direction::East => p.east, + } + } + /// Head and body blocks of a growing-plant family. + pub(crate) fn growing_plant_pair( + &self, + block: super::states::BlockId, + ) -> (super::states::BlockId, super::states::BlockId) { + let name = &*self.b.table.info(block).name; + let head = name.strip_suffix("_plant").unwrap_or(name); + let head = self.b.table.block_by_name(head).unwrap_or(block); + let body = self + .b + .table + .block_by_name(&format!("{}_plant", &*self.b.table.info(head).name)) + .unwrap_or(block); + (head, body) + } + /// `GrowingPlantBlock.canAttachTo` (kelp refuses `cannot_support_kelp`). + fn growing_plant_can_attach_to(&self, state: BlockStateId, attached: BlockStateId) -> bool { + let b = self.b; + if b.instance_of(state, Class::Kelp) || b.instance_of(state, Class::KelpPlant) { + !b.in_set(attached, &b.tags.cannot_support_kelp) + } else { + true + } + } + /// `FireBlock.isValidFireLocation`. + pub(crate) fn is_valid_fire_location(&self, pos: BlockPos) -> bool { + Direction::ALL + .into_iter() + .any(|direction| self.can_burn(self.rel_state(pos, direction))) + } + /// `FireBlock.canBurn`: ignite odds above zero (waterlogged states never burn). + pub(crate) fn can_burn(&self, state: BlockStateId) -> bool { + self.ignite_odds(state) > 0 + } + pub(crate) fn ignite_odds(&self, state: BlockStateId) -> i32 { + if self.b.is_waterlogged(state) { + 0 + } else { + self.b.data(state).ignite_odds + } + } + pub(crate) fn burn_odds(&self, state: BlockStateId) -> i32 { + if self.b.is_waterlogged(state) { + 0 + } else { + self.b.data(state).burn_odds + } + } + /// `ScaffoldingBlock.getDistance`. + pub(crate) fn scaffolding_distance(&self, pos: BlockPos) -> i32 { + let b = self.b; + let below_pos = below(pos); + let below_state = self.state(below_pos); + let mut distance = 7; + if b.is_block(below_state, b.named.scaffolding) { + distance = b.table.int(below_state, b.props.distance); + } else if b.is_face_sturdy(below_state, Direction::Up) { + return 0; + } + for direction in HORIZONTAL { + let neighbour = self.rel_state(pos, direction); + if b.is_block(neighbour, b.named.scaffolding) { + distance = distance.min(b.table.int(neighbour, b.props.distance) + 1); + if distance == 1 { + break; + } + } + } + distance + } + /// `SpeleothemBlock.isValidSpeleothemPlacement`. + pub(crate) fn is_valid_speleothem_placement( + &self, + block: super::states::BlockId, + pos: BlockPos, + tip: Direction, + ) -> bool { + let behind_pos = rel(pos, tip.opposite()); + let behind = self.state(behind_pos); + self.b.is_face_sturdy(behind, tip) + || (self.b.is_block(behind, block) + && self.b.table.dir(behind, self.b.props.vertical_direction) == Some(tip)) + } + /// `VineBlock.getUpdatedState`. + pub(crate) fn vine_updated_state( + &self, + mut state: BlockStateId, + pos: BlockPos, + ) -> BlockStateId { + let b = self.b; + let p = &b.props; + let above_pos = above(pos); + if b.table.bool(state, p.up) { + let accept = b.multiface_can_attach(self.state(above_pos), Direction::Down); + state = b.table.set_bool(state, p.up, accept); + } + let mut above_state = None; + for direction in HORIZONTAL { + let key = self.direction_prop(direction); + if b.table.bool(state, key) { + let mut support = self.vine_can_support_at_face(state, pos, direction); + if !support { + let above = *above_state.get_or_insert_with(|| self.state(above_pos)); + support = b.is_block(above, b.block(state)) && b.table.bool(above, key); + } + state = b.table.set_bool(state, key, support); + } + } + state + } + fn vine_can_support_at_face( + &self, + state: BlockStateId, + pos: BlockPos, + direction: Direction, + ) -> bool { + let b = self.b; + if direction == Direction::Down { + return false; + } + if b.multiface_can_attach(self.rel_state(pos, direction), direction) { + return true; + } + if direction == Direction::Up { + return false; + } + let above = self.above_state(pos); + b.is_block(above, b.block(state)) && b.table.bool(above, self.direction_prop(direction)) + } + pub(crate) fn vine_count_faces(&self, state: BlockStateId) -> usize { + [ + Direction::Up, + Direction::North, + Direction::East, + Direction::South, + Direction::West, + ] + .into_iter() + .filter(|d| self.b.table.bool(state, self.direction_prop(*d))) + .count() + } +} diff --git a/crates/horizon-world/src/level/tests.rs b/crates/horizon-world/src/level/tests.rs new file mode 100644 index 000000000..c1ffce5a1 --- /dev/null +++ b/crates/horizon-world/src/level/tests.rs @@ -0,0 +1,919 @@ +//! Behaviour tests over an in-memory level. They need the prepared client +//! resources (`HORIZON_RESOURCES`, or `.local/horizon-client/26.3` at the +//! repository root) and are skipped when those are absent. +use super::*; +use crate::chunk::BlockState; +use std::{ + collections::{BTreeMap, HashMap}, + path::PathBuf, + sync::OnceLock, +}; + +struct Fixture { + registry: BlockRegistry, + behaviours: Behaviours, +} + +fn fixture() -> Option<&'static Fixture> { + static FIXTURE: OnceLock<Option<Fixture>> = OnceLock::new(); + FIXTURE + .get_or_init(|| { + let root = std::env::var_os("HORIZON_RESOURCES") + .map(PathBuf::from) + .unwrap_or_else(|| { + PathBuf::from(env!("CARGO_MANIFEST_DIR")) + .join("../../.local/horizon-client/26.3") + }); + if !root.join("block-behaviours.json").exists() { + eprintln!("skipping level tests: no resources at {}", root.display()); + return None; + } + let registry = data::load_registry(&root).expect("registry"); + let behaviours = Behaviours::load(®istry, &root).expect("behaviours"); + Some(Fixture { + registry, + behaviours, + }) + }) + .as_ref() +} + +pub(crate) struct TestLevel { + blocks: HashMap<BlockPos, BlockStateId>, + air: BlockStateId, + random: LegacyRandom, + pub time: i64, + pub events: Vec<LevelEvent>, + pub block_light: HashMap<BlockPos, i32>, +} +impl TestLevel { + fn new(b: &Behaviours) -> Self { + Self { + blocks: HashMap::new(), + air: b.air(), + random: LegacyRandom::new(42), + time: 0, + events: Vec::new(), + block_light: HashMap::new(), + } + } +} +impl LevelAccess for TestLevel { + fn block_state(&self, pos: BlockPos) -> BlockStateId { + self.blocks.get(&pos).copied().unwrap_or(self.air) + } + fn set_raw(&mut self, pos: BlockPos, state: BlockStateId) -> Option<BlockStateId> { + Some(self.blocks.insert(pos, state).unwrap_or(self.air)) + } + fn is_loaded(&self, _pos: BlockPos) -> bool { + true + } + fn random(&mut self) -> &mut LegacyRandom { + &mut self.random + } + fn game_time(&self) -> i64 { + self.time + } + fn block_light(&self, pos: BlockPos) -> i32 { + self.block_light.get(&pos).copied().unwrap_or(0) + } + fn emit(&mut self, event: LevelEvent) { + self.events.push(event); + } +} + +struct World<'f> { + f: &'f Fixture, + level: TestLevel, + ticks: Ticks, +} +impl<'f> World<'f> { + fn new(f: &'f Fixture) -> Self { + let mut ticks = Ticks::new(0); + for x in -4..4 { + for z in -4..4 { + ticks.add_empty_chunk(ChunkPos::new(x, z)).unwrap(); + } + } + Self { + level: TestLevel::new(&f.behaviours), + f, + ticks, + } + } + fn b(&self) -> &'f Behaviours { + &self.f.behaviours + } + fn id(&self, name: &str, props: &[(&str, &str)]) -> BlockStateId { + let state = BlockState { + name: format!("minecraft:{name}"), + properties: props + .iter() + .map(|(k, v)| (k.to_string(), v.to_string())) + .collect::<BTreeMap<_, _>>(), + }; + self.f + .registry + .resolve(&state) + .unwrap_or_else(|_| panic!("unknown state {name} {props:?}")) + } + fn set(&mut self, pos: BlockPos, state: BlockStateId) -> bool { + self.f.behaviours.set_block( + &mut self.level, + &mut self.ticks, + pos, + state, + flags::UPDATE_ALL, + ) + } + /// Raw storage write without updates (world generation). + fn put(&mut self, pos: BlockPos, state: BlockStateId) { + self.level.blocks.insert(pos, state); + } + fn get(&self, pos: BlockPos) -> BlockStateId { + self.level.block_state(pos) + } + fn name(&self, pos: BlockPos) -> String { + let state = self.f.registry.state(self.get(pos)).unwrap(); + let props: Vec<String> = state + .properties + .iter() + .map(|(k, v)| format!("{k}={v}")) + .collect(); + format!( + "{}[{}]", + state.name.trim_start_matches("minecraft:"), + props.join(",") + ) + } + fn prop(&self, pos: BlockPos, key: &str) -> String { + self.f + .registry + .state(self.get(pos)) + .unwrap() + .properties + .get(key) + .cloned() + .unwrap_or_default() + } + fn tick(&mut self) { + self.level.time += 1; + self.f + .behaviours + .tick_scheduled(&mut self.level, &mut self.ticks); + } + /// Scheduled ticks, block events and block entities, as `ServerLevel.tick`. + fn full_tick(&mut self) { + self.tick(); + self.f + .behaviours + .run_block_events(&mut self.level, &mut self.ticks); + self.f + .behaviours + .tick_block_entities(&mut self.level, &mut self.ticks); + } + fn floor(&mut self, y: i32, radius: i32, block: &str) { + let state = self.id(block, &[]); + for x in -radius..=radius { + for z in -radius..=radius { + self.put(BlockPos::new(x, y, z), state); + } + } + } +} + +macro_rules! world { + () => {{ + let Some(f) = fixture() else { + return; + }; + World::new(f) + }}; +} + +#[test] +fn state_table_matches_registry() { + let Some(f) = fixture() else { + return; + }; + let t = &f.behaviours.table; + assert_eq!(t.state_count(), f.registry.len()); + let stairs = f.registry.default_state("minecraft:oak_stairs").unwrap(); + let key = f.behaviours.props.facing; + let east = t.with_text(stairs, key, "east").unwrap(); + assert_eq!(f.registry.state(east).unwrap().properties["facing"], "east"); + assert_eq!(t.text(east, f.behaviours.props.half), "bottom"); + assert!(classes::Class::ALL.len() <= 320); +} + +#[test] +fn fences_connect_and_disconnect() { + let mut w = world!(); + let fence = w.id("oak_fence", &[]); + let a = BlockPos::new(0, 1, 0); + let c = BlockPos::new(1, 1, 0); + w.set(a, fence); + w.set(c, fence); + assert_eq!(w.prop(a, "east"), "true"); + assert_eq!(w.prop(c, "west"), "true"); + let stone = w.id("stone", &[]); + w.set(BlockPos::new(0, 1, -1), stone); + assert_eq!(w.prop(a, "north"), "true", "fences connect to sturdy faces"); + let air = w.b().air(); + w.set(c, air); + assert_eq!(w.prop(a, "east"), "false"); +} + +#[test] +fn walls_and_panes_connect() { + let mut w = world!(); + let wall = w.id("cobblestone_wall", &[]); + let pane = w.id("glass_pane", &[]); + w.set(BlockPos::new(0, 1, 0), wall); + w.set(BlockPos::new(0, 1, 1), wall); + w.set(BlockPos::new(0, 1, 2), wall); + assert_eq!(w.prop(BlockPos::new(0, 1, 1), "north"), "low"); + assert_eq!(w.prop(BlockPos::new(0, 1, 1), "south"), "low"); + assert_eq!( + w.prop(BlockPos::new(0, 1, 1), "up"), + "false", + "straight wall drops its post" + ); + let stone = w.id("stone", &[]); + w.set(BlockPos::new(0, 2, 1), stone); + assert_eq!(w.prop(BlockPos::new(0, 1, 1), "north"), "tall"); + w.set(BlockPos::new(5, 1, 0), pane); + w.set(BlockPos::new(6, 1, 0), pane); + assert_eq!(w.prop(BlockPos::new(5, 1, 0), "east"), "true"); +} + +#[test] +fn stairs_form_corners() { + let mut w = world!(); + let north = w.id("oak_stairs", &[("facing", "north")]); + let east = w.id("oak_stairs", &[("facing", "east")]); + w.set(BlockPos::new(0, 1, 0), north); + w.set(BlockPos::new(0, 1, -1), east); + // The north-facing stair has an east-facing stair behind it. + assert_eq!(w.prop(BlockPos::new(0, 1, 0), "shape"), "outer_right"); +} + +#[test] +fn torch_and_door_halves_break_with_support() { + let mut w = world!(); + w.floor(0, 3, "stone"); + let torch = w.id("torch", &[]); + w.set(BlockPos::new(1, 1, 1), torch); + let door = w.id("oak_door", &[("half", "lower")]); + let upper = w.id("oak_door", &[("half", "upper")]); + w.set(BlockPos::new(0, 1, 0), door); + w.set(BlockPos::new(0, 2, 0), upper); + let air = w.b().air(); + w.set(BlockPos::new(1, 0, 1), air); + assert_eq!( + w.get(BlockPos::new(1, 1, 1)), + air, + "torch pops without support" + ); + assert!( + w.level + .events + .iter() + .any(|e| matches!(e, LevelEvent::DropResources { .. })) + ); + w.set(BlockPos::new(0, 1, 0), air); + assert_eq!( + w.get(BlockPos::new(0, 2, 0)), + air, + "upper door half goes with the lower" + ); +} + +#[test] +fn snowy_grass_and_chests_pair() { + let mut w = world!(); + let grass = w.id("grass_block", &[]); + w.set(BlockPos::new(0, 0, 0), grass); + let snow = w.id("snow", &[]); + w.set(BlockPos::new(0, 1, 0), snow); + assert_eq!(w.prop(BlockPos::new(0, 0, 0), "snowy"), "true"); + // A left chest's partner sits clockwise of its facing; removing the + // partner makes it single again. + let left = w.id("chest", &[("facing", "north"), ("type", "left")]); + let right = w.id("chest", &[("facing", "north"), ("type", "right")]); + w.set(BlockPos::new(3, 1, 0), left); + w.set(BlockPos::new(4, 1, 0), right); + let air = w.b().air(); + w.set(BlockPos::new(4, 1, 0), air); + assert_eq!(w.prop(BlockPos::new(3, 1, 0), "type"), "single"); +} + +#[test] +fn sand_falls_and_concrete_solidifies() { + let mut w = world!(); + let sand = w.id("sand", &[]); + w.set(BlockPos::new(0, 5, 0), sand); + w.tick(); + w.tick(); + assert_eq!(w.get(BlockPos::new(0, 5, 0)), w.b().air()); + assert!( + w.level + .events + .iter() + .any(|e| matches!(e, LevelEvent::FallingBlock { state, .. } if *state == sand)) + ); + w.floor(0, 2, "stone"); + let water = w.id("water", &[]); + w.put(BlockPos::new(1, 1, 0), water); + let powder = w.id("white_concrete_powder", &[]); + let landing = w.b().falling_block_landed( + &mut w.level, + &mut w.ticks, + BlockPos::new(0, 1, 0), + powder, + false, + ); + assert_eq!( + landing, + falling::Landing::Placed(w.id("white_concrete", &[])) + ); +} + +#[test] +fn water_spreads_on_a_floor() { + let mut w = world!(); + w.floor(0, 10, "stone"); + let water = w.id("water", &[]); + w.set(BlockPos::new(0, 1, 0), water); + for _ in 0..60 { + w.tick(); + } + for d in 1..=7 { + let pos = BlockPos::new(d, 1, 0); + assert_eq!( + w.prop(pos, "level"), + d.to_string(), + "flow at distance {d}: {}", + w.name(pos) + ); + } + assert_eq!(w.get(BlockPos::new(8, 1, 0)), w.b().air()); + // Diagonals follow Manhattan distance. + assert_eq!(w.prop(BlockPos::new(2, 1, 2), "level"), "4"); +} + +#[test] +fn water_falls_and_makes_sources() { + let mut w = world!(); + w.floor(0, 4, "stone"); + let water = w.id("water", &[]); + w.set(BlockPos::new(0, 4, 0), water); + for _ in 0..30 { + w.tick(); + } + assert_eq!( + w.prop(BlockPos::new(0, 3, 0), "level"), + "8", + "falling water" + ); + assert_eq!(w.prop(BlockPos::new(0, 1, 0), "level"), "8"); + // Two sources make a third (no holes within slope distance, so the + // sources spread in every direction). + let mut w = world!(); + w.floor(0, 12, "stone"); + w.set(BlockPos::new(0, 1, 0), water); + w.set(BlockPos::new(2, 1, 0), water); + for _ in 0..20 { + w.tick(); + } + assert_eq!(w.get(BlockPos::new(1, 1, 0)), water); + // On a small platform the water instead seeks the nearest edges. + let mut w = world!(); + w.floor(0, 4, "stone"); + w.set(BlockPos::new(0, 1, 0), water); + w.set(BlockPos::new(2, 1, 0), water); + for _ in 0..20 { + w.tick(); + } + assert_eq!(w.get(BlockPos::new(1, 1, 0)), w.b().air()); + assert_eq!(w.prop(BlockPos::new(-1, 1, 0), "level"), "1"); +} + +#[test] +fn lava_meets_water() { + let mut w = world!(); + w.floor(0, 4, "stone"); + let lava = w.id("lava", &[]); + let water = w.id("water", &[]); + w.set(BlockPos::new(0, 1, 0), lava); + w.set(BlockPos::new(1, 1, 0), water); + assert_eq!(w.get(BlockPos::new(0, 1, 0)), w.id("obsidian", &[])); + let mut w = world!(); + w.floor(0, 4, "stone"); + w.set(BlockPos::new(0, 1, 0), lava); + for _ in 0..40 { + w.tick(); + } + w.set(BlockPos::new(1, 2, 0), water); + for _ in 0..40 { + w.tick(); + } + assert_eq!( + w.get(BlockPos::new(1, 1, 0)), + w.id("cobblestone", &[]), + "{}", + w.name(BlockPos::new(1, 1, 0)) + ); +} + +#[test] +fn waterlogged_blocks_schedule_water() { + let mut w = world!(); + w.floor(0, 4, "stone"); + let slab = w.id("oak_slab", &[("waterlogged", "true")]); + w.set(BlockPos::new(0, 1, 0), slab); + // A neighbour shape update schedules the slab's water tick. + let stone = w.id("stone", &[]); + w.set(BlockPos::new(0, 1, 1), stone); + for _ in 0..20 { + w.tick(); + } + assert_eq!(w.prop(BlockPos::new(1, 1, 0), "level"), "1"); +} + +#[test] +fn redstone_lever_wire_and_lamp() { + let mut w = world!(); + w.floor(0, 20, "stone"); + let wire = w.id("redstone_wire", &[]); + let lamp = w.id("redstone_lamp", &[]); + let lever = w.id("lever", &[("face", "floor"), ("facing", "north")]); + for x in 1..=5 { + w.set(BlockPos::new(x, 1, 0), wire); + } + w.set(BlockPos::new(6, 1, 0), lamp); + w.set(BlockPos::new(0, 1, 0), lever); + let lever_on = w + .b() + .table + .set_bool(w.get(BlockPos::new(0, 1, 0)), w.b().props.powered, true); + w.set(BlockPos::new(0, 1, 0), lever_on); + assert_eq!(w.prop(BlockPos::new(1, 1, 0), "power"), "15"); + assert_eq!(w.prop(BlockPos::new(5, 1, 0), "power"), "11"); + assert_eq!(w.prop(BlockPos::new(6, 1, 0), "lit"), "true"); + let lever_off = w.b().table.set_bool(lever_on, w.b().props.powered, false); + w.set(BlockPos::new(0, 1, 0), lever_off); + assert_eq!(w.prop(BlockPos::new(3, 1, 0), "power"), "0"); + for _ in 0..5 { + w.tick(); + } + assert_eq!(w.prop(BlockPos::new(6, 1, 0), "lit"), "false"); +} + +#[test] +fn repeater_delays_and_torch_inverts() { + let mut w = world!(); + w.floor(0, 10, "stone"); + let block = w.id("redstone_block", &[]); + // A repeater takes its input from the side it faces. + let repeater = w.id("repeater", &[("facing", "west")]); + w.set(BlockPos::new(1, 1, 0), repeater); + w.set(BlockPos::new(0, 1, 0), block); + assert_eq!(w.prop(BlockPos::new(1, 1, 0), "powered"), "false"); + w.tick(); + w.tick(); + assert_eq!(w.prop(BlockPos::new(1, 1, 0), "powered"), "true"); + let torch = w.id("redstone_torch", &[]); + let stone = w.id("stone", &[]); + w.set(BlockPos::new(5, 1, 0), stone); + w.set(BlockPos::new(5, 2, 0), torch); + // A redstone block only weakly powers the stone: the torch stays lit. + w.set(BlockPos::new(6, 1, 0), block); + w.tick(); + w.tick(); + assert_eq!(w.prop(BlockPos::new(5, 2, 0), "lit"), "true"); + // A lever on the stone strongly powers it. + let air = w.b().air(); + w.set(BlockPos::new(6, 1, 0), air); + let lever = w.id( + "lever", + &[("face", "wall"), ("facing", "east"), ("powered", "true")], + ); + w.set(BlockPos::new(6, 1, 0), lever); + // LeverBlock.pull notifies the attached block's neighbours. + let lever_block = w.b().block(lever); + w.b().update_neighbors_at( + &mut w.level, + &mut w.ticks, + BlockPos::new(5, 1, 0), + lever_block, + ); + w.tick(); + w.tick(); + assert_eq!(w.prop(BlockPos::new(5, 2, 0), "lit"), "false"); +} + +#[test] +fn crops_grow_and_leaves_decay() { + let mut w = world!(); + let farmland = w.id("farmland", &[("moisture", "7")]); + let wheat = w.id("wheat", &[]); + w.put(BlockPos::new(0, 0, 0), farmland); + w.put(BlockPos::new(0, 1, 0), wheat); + for _ in 0..400 { + w.b() + .random_tick(&mut w.level, &mut w.ticks, BlockPos::new(0, 1, 0)); + } + assert_eq!(w.prop(BlockPos::new(0, 1, 0), "age"), "7"); + let leaves = w.id("oak_leaves", &[("distance", "7")]); + w.put(BlockPos::new(5, 5, 5), leaves); + w.b() + .random_tick(&mut w.level, &mut w.ticks, BlockPos::new(5, 5, 5)); + assert_eq!(w.get(BlockPos::new(5, 5, 5)), w.b().air()); + let log = w.id("oak_log", &[]); + let leaf = w.id("oak_leaves", &[]); + w.set(BlockPos::new(9, 5, 5), leaf); + w.set(BlockPos::new(8, 5, 5), log); + w.tick(); + assert_eq!(w.prop(BlockPos::new(9, 5, 5), "distance"), "1"); +} + +impl World<'_> { + /// Right-click `item` on the `face` of `clicked`, hitting the face centre + /// (offset vertically by `dy`), looking with `yaw`/`pitch`. + fn place( + &mut self, + item: &str, + clicked: BlockPos, + face: Direction, + yaw: f32, + pitch: f32, + dy: f64, + ) -> PlaceOutcome { + let [nx, ny, nz] = face.normal(); + let hit = horizon_core::geometry::Vec3::new( + f64::from(clicked.x) + 0.5 + f64::from(nx) * 0.5, + f64::from(clicked.y) + 0.5 + f64::from(ny) * 0.5 + dy, + f64::from(clicked.z) + 0.5 + f64::from(nz) * 0.5, + ); + let ctx = PlaceContext { + clicked_pos: clicked, + face, + hit, + inside: false, + yaw, + pitch, + sneaking: false, + item: format!("minecraft:{item}"), + can_use_game_master_blocks: false, + }; + self.f + .behaviours + .place_block(&mut self.level, &mut self.ticks, &ctx) + } + fn use_block(&mut self, pos: BlockPos) -> InteractionResult { + let player = PlayerContext { + yaw: 0.0, + pitch: 0.0, + may_build: true, + can_eat: true, + game_master: false, + }; + let hit = horizon_core::geometry::Vec3::new( + f64::from(pos.x) + 0.5, + f64::from(pos.y) + 0.5, + f64::from(pos.z), + ); + self.f.behaviours.use_without_item( + &mut self.level, + &mut self.ticks, + pos, + Direction::North, + hit, + player, + ) + } +} + +#[test] +fn placement_orients_blocks() { + let mut w = world!(); + w.floor(0, 6, "stone"); + let ground = BlockPos::new(0, 0, 0); + // Looking north (yaw 180) at the top of the floor. + w.place("oak_stairs", ground, Direction::Up, 180.0, 30.0, 0.0); + assert_eq!( + w.name(BlockPos::new(0, 1, 0)), + "oak_stairs[facing=north,half=bottom,shape=straight,waterlogged=false]" + ); + w.place( + "oak_log", + BlockPos::new(1, 0, 0), + Direction::Up, + 0.0, + 0.0, + 0.0, + ); + w.place( + "oak_log", + BlockPos::new(1, 1, 0), + Direction::East, + 0.0, + 0.0, + 0.0, + ); + assert_eq!(w.prop(BlockPos::new(2, 1, 0), "axis"), "x"); + // Torch against the log's east face becomes a wall torch facing east. + w.place( + "torch", + BlockPos::new(2, 1, 0), + Direction::East, + 270.0, + 0.0, + 0.0, + ); + assert_eq!(w.name(BlockPos::new(3, 1, 0)), "wall_torch[facing=east]"); + // Furnaces face the player; observers face where the player looks. + w.place( + "furnace", + BlockPos::new(-2, 0, 0), + Direction::Up, + 0.0, + 0.0, + 0.0, + ); + assert_eq!(w.prop(BlockPos::new(-2, 1, 0), "facing"), "north"); + w.place( + "observer", + BlockPos::new(-3, 0, 0), + Direction::Up, + 0.0, + 0.0, + 0.0, + ); + assert_eq!(w.prop(BlockPos::new(-3, 1, 0), "facing"), "south"); +} + +#[test] +fn placement_merges_slabs_and_stacks() { + let mut w = world!(); + w.floor(0, 4, "stone"); + let ground = BlockPos::new(0, 0, 0); + w.place("oak_slab", ground, Direction::Up, 0.0, 60.0, 0.0); + assert_eq!(w.prop(BlockPos::new(0, 1, 0), "type"), "bottom"); + w.place( + "oak_slab", + BlockPos::new(0, 1, 0), + Direction::Up, + 0.0, + 60.0, + -0.5, + ); + assert_eq!(w.prop(BlockPos::new(0, 1, 0), "type"), "double"); + // Clicking the upper half of a side face places a top slab. + w.place( + "oak_slab", + BlockPos::new(0, 1, 0), + Direction::East, + 0.0, + 0.0, + 0.25, + ); + assert_eq!(w.prop(BlockPos::new(1, 1, 0), "type"), "top"); + w.place( + "snow", + BlockPos::new(3, 0, 0), + Direction::Up, + 0.0, + 60.0, + 0.0, + ); + w.place( + "snow", + BlockPos::new(3, 1, 0), + Direction::Up, + 0.0, + 60.0, + -0.375, + ); + assert_eq!(w.prop(BlockPos::new(3, 1, 0), "layers"), "2"); + w.place( + "candle", + BlockPos::new(-3, 0, 0), + Direction::Up, + 0.0, + 60.0, + 0.0, + ); + w.place( + "candle", + BlockPos::new(-3, 1, 0), + Direction::Up, + 0.0, + 60.0, + -0.4, + ); + assert_eq!(w.prop(BlockPos::new(-3, 1, 0), "candles"), "2"); +} + +#[test] +fn doors_beds_and_plants_place_both_halves() { + let mut w = world!(); + w.floor(0, 6, "grass_block"); + let ground = BlockPos::new(0, 0, 0); + w.place("oak_door", ground, Direction::Up, 180.0, 30.0, 0.0); + assert_eq!(w.prop(BlockPos::new(0, 1, 0), "half"), "lower"); + assert_eq!(w.prop(BlockPos::new(0, 2, 0), "half"), "upper"); + assert_eq!( + w.use_block(BlockPos::new(0, 1, 0)), + InteractionResult::Success + ); + assert_eq!(w.prop(BlockPos::new(0, 1, 0), "open"), "true"); + assert_eq!( + w.prop(BlockPos::new(0, 2, 0), "open"), + "true", + "the upper half follows" + ); + w.place( + "red_bed", + BlockPos::new(3, 0, 0), + Direction::Up, + 180.0, + 30.0, + 0.0, + ); + assert_eq!(w.prop(BlockPos::new(3, 1, 0), "part"), "foot"); + assert_eq!(w.prop(BlockPos::new(3, 1, -1), "part"), "head"); + w.place( + "sunflower", + BlockPos::new(-3, 0, 0), + Direction::Up, + 0.0, + 30.0, + 0.0, + ); + assert_eq!(w.prop(BlockPos::new(-3, 2, 0), "half"), "upper"); + // Iron doors cannot be opened by hand. + w.place( + "iron_door", + BlockPos::new(5, 0, 0), + Direction::Up, + 180.0, + 30.0, + 0.0, + ); + assert_eq!(w.use_block(BlockPos::new(5, 1, 0)), InteractionResult::Pass); + // A placement into a solid block fails. + assert_eq!( + w.place( + "stone", + BlockPos::new(0, 0, 0), + Direction::West, + 0.0, + 0.0, + 0.0 + ), + PlaceOutcome::Failed + ); +} + +#[test] +fn levers_power_wire_through_interaction() { + let mut w = world!(); + w.floor(0, 8, "stone"); + w.place( + "lever", + BlockPos::new(0, 0, 0), + Direction::Up, + 0.0, + 60.0, + 0.0, + ); + for x in 1..=3 { + w.place( + "redstone", + BlockPos::new(x, 0, 0), + Direction::Up, + 0.0, + 60.0, + 0.0, + ); + } + assert_eq!( + w.use_block(BlockPos::new(0, 1, 0)), + InteractionResult::Success + ); + assert_eq!(w.prop(BlockPos::new(0, 1, 0), "powered"), "true"); + assert_eq!(w.prop(BlockPos::new(3, 1, 0), "power"), "13"); + w.use_block(BlockPos::new(0, 1, 0)); + assert_eq!(w.prop(BlockPos::new(1, 1, 0), "power"), "0"); + // Buttons release after their pressed time. + w.place( + "stone_button", + BlockPos::new(5, 0, 0), + Direction::Up, + 0.0, + 60.0, + 0.0, + ); + w.use_block(BlockPos::new(5, 1, 0)); + assert_eq!(w.prop(BlockPos::new(5, 1, 0), "powered"), "true"); + for _ in 0..20 { + w.tick(); + } + assert_eq!(w.prop(BlockPos::new(5, 1, 0), "powered"), "false"); +} + +#[test] +fn pistons_push_and_sticky_pistons_pull() { + let mut w = world!(); + w.floor(0, 10, "stone"); + let piston = w.id("sticky_piston", &[("facing", "east")]); + let block = w.id("redstone_block", &[]); + let dirt = w.id("dirt", &[]); + let air = w.b().air(); + w.set(BlockPos::new(0, 1, 0), piston); + w.set(BlockPos::new(1, 1, 0), dirt); + w.set(BlockPos::new(-1, 1, 0), block); + for _ in 0..4 { + w.full_tick(); + } + assert_eq!(w.prop(BlockPos::new(0, 1, 0), "extended"), "true"); + assert_eq!( + w.name(BlockPos::new(1, 1, 0)), + "piston_head[facing=east,short=false,type=sticky]" + ); + assert_eq!(w.get(BlockPos::new(2, 1, 0)), dirt); + assert!(w.ticks.moving_pistons.is_empty()); + w.set(BlockPos::new(-1, 1, 0), air); + for _ in 0..4 { + w.full_tick(); + } + assert_eq!(w.prop(BlockPos::new(0, 1, 0), "extended"), "false"); + assert_eq!( + w.get(BlockPos::new(1, 1, 0)), + dirt, + "the sticky piston pulled the block back" + ); + assert_eq!(w.get(BlockPos::new(2, 1, 0)), air); +} + +#[test] +fn pistons_pop_fragile_blocks_and_refuse_obsidian() { + let mut w = world!(); + w.floor(0, 10, "stone"); + let piston = w.id("piston", &[("facing", "east")]); + let block = w.id("redstone_block", &[]); + let torch = w.id("torch", &[]); + let obsidian = w.id("obsidian", &[]); + w.set(BlockPos::new(0, 1, 0), piston); + w.set(BlockPos::new(1, 1, 0), torch); + w.set(BlockPos::new(-1, 1, 0), block); + for _ in 0..4 { + w.full_tick(); + } + assert_eq!( + w.name(BlockPos::new(1, 1, 0)), + "piston_head[facing=east,short=false,type=normal]" + ); + assert!( + w.level + .events + .iter() + .any(|e| matches!(e, LevelEvent::DropResources { state, .. } if *state == torch)) + ); + let mut w = world!(); + w.floor(0, 10, "stone"); + w.set(BlockPos::new(0, 1, 0), piston); + w.set(BlockPos::new(1, 1, 0), obsidian); + w.set(BlockPos::new(-1, 1, 0), block); + for _ in 0..4 { + w.full_tick(); + } + assert_eq!(w.prop(BlockPos::new(0, 1, 0), "extended"), "false"); + assert_eq!(w.get(BlockPos::new(1, 1, 0)), obsidian); +} + +#[test] +fn dripstone_fills_cauldrons() { + let mut w = world!(); + let block = w.id("dripstone_block", &[]); + let water = w.id("water", &[]); + let tip = w.id( + "pointed_dripstone", + &[("vertical_direction", "down"), ("thickness", "tip")], + ); + let cauldron = w.id("cauldron", &[]); + w.put(BlockPos::new(0, 11, 0), water); + w.put(BlockPos::new(0, 10, 0), block); + w.put(BlockPos::new(0, 9, 0), tip); + w.put(BlockPos::new(0, 5, 0), cauldron); + for _ in 0..100 { + w.b() + .random_tick(&mut w.level, &mut w.ticks, BlockPos::new(0, 9, 0)); + } + for _ in 0..80 { + w.tick(); + } + assert_eq!(w.name(BlockPos::new(0, 5, 0)), "water_cauldron[level=1]"); +} diff --git a/crates/horizon-world/src/level/tick.rs b/crates/horizon-world/src/level/tick.rs new file mode 100644 index 000000000..555ba2a85 --- /dev/null +++ b/crates/horizon-world/src/level/tick.rs @@ -0,0 +1,1571 @@ +//! Scheduled block ticks (`BlockBehaviour.tick`), random ticks +//! (`BlockBehaviour.randomTick`) and the per-tick drivers. +use super::{ + Behaviours, LevelAccess, LevelEvent, Sim, Ticks, + classes::Class, + data::state_flags, + update::{HORIZONTAL, above, below, rel}, +}; +use crate::{fluid::FluidKind, registry::BlockStateId}; +use horizon_core::{ + geometry::Direction, + position::{BlockPos, ChunkPos}, + random::RandomSource, + ticks::TickTypeId, +}; + +impl<L: LevelAccess + ?Sized> Sim<'_, L> { + fn rand_int(&mut self, bound: i32) -> i32 { + self.random().next_int_bound(bound).unwrap_or(0) + } + + /// `BlockState.tick` (scheduled block tick). + pub fn tick_block(&mut self, state: BlockStateId, pos: BlockPos) { + let b = self.b; + let p = b.props; + let block = b.block(state); + let chain = &b.data(state).chain; + for &class in chain.iter() { + match class { + Class::BambooStalk + | Class::BigDripleafStem + | Class::Cactus + | Class::ChorusFlower + | Class::ChorusPlant + | Class::GrowingPlant + | Class::SugarCane => { + if !self.can_survive(state, pos) { + self.destroy_block(pos, true, 512); + } + } + Class::HangingMoss => { + let above_state = self.above_state(pos); + if !(b.multiface_can_attach(above_state, Direction::Up) + || b.is_block(above_state, block)) + { + self.destroy_block(pos, true, 512); + } + } + Class::BasePressurePlate => { + let signal = self.plate_signal_for_state(state); + if signal > 0 { + self.plate_check_pressed(pos, state, signal); + } + } + Class::BigDripleaf => self.big_dripleaf_tick(pos, state), + Class::AbstractCauldron => self.cauldron_tick(state, pos), + Class::BubbleColumn => { + let below_state = self.below_state(pos); + self.bubble_column_update(pos, state, below_state); + } + Class::Button => self.button_tick(pos, state), + Class::Diode => self.diode_tick(pos, state), + Class::Composter => { + if b.table.int(state, p.level) == 7 { + self.set_block_and_update(pos, b.table.cycle(state, p.level)); + self.emit(LevelEvent::Sound { + pos, + sound: "minecraft:block.composter.ready".into(), + volume: 1.0, + pitch: 1.0, + }); + } + } + Class::Coral => { + if !self.coral_scan_for_water(pos) { + if let Some(dead) = b.data(state).link { + self.set_block(pos, b.default_of(dead), 2); + } + } + } + Class::CoralFan | Class::CoralPlant | Class::CoralWallFan => { + if !self.coral_plant_scan_for_water(state, pos) { + if let Some(dead) = b.data(state).link { + let mut next = + b.table.set_bool(b.default_of(dead), p.waterlogged, false); + if class == Class::CoralWallFan { + next = b.table.set_dir(next, p.facing, b.facing(state)); + } + self.set_block(pos, next, 2); + } + } + } + Class::Dispenser | Class::Crafter => { + self.emit(LevelEvent::BlockEvent { + pos, + state, + kind: "dispense", + }); + } + Class::FallingBlock => self.falling_block_tick(pos, state), + Class::Brushable => { + if self.is_free(self.below_state(pos)) && pos.y >= self.level.min_y() { + self.falling_block_fall(pos, state); + } + } + Class::Farmland => { + if !self.can_survive(state, pos) { + self.turn_to_base_block(pos, state); + } + } + Class::Path => self.turn_to_base_block(pos, state), + Class::Fire => self.fire_tick(pos, state), + Class::Frogspawn => { + if !self.can_survive(state, pos) { + self.destroy_block(pos, false, 512); + } else { + self.emit(LevelEvent::BlockEvent { + pos, + state, + kind: "hatch", + }); + self.destroy_block(pos, false, 512); + } + } + Class::FrostedIce => self.frosted_ice_tick(pos, state), + Class::Leaves => { + let next = self.leaves_update_distance(state, pos); + self.set_block_and_update(pos, next); + } + Class::LightningRod => { + self.set_block_and_update(pos, b.table.set_bool(state, p.powered, false)); + let facing = b.facing(state); + self.update_neighbors_at(rel(pos, facing.opposite()), block); + } + Class::Liquid => { + if self.should_bubble_column_occupy(state) { + let below_state = self.below_state(pos); + let column = b.named.bubble_column; + self.bubble_column_update_for(column, pos, state, below_state); + } + } + Class::Observer => self.observer_tick(pos, state), + Class::RedstoneLamp => self.lamp_tick(pos, state), + Class::RedstoneTorch => self.torch_tick(pos, state), + Class::Scaffolding => self.scaffolding_tick(pos, state), + Class::Speleothem => { + let tip = b.table.dir(state, p.vertical_direction); + if tip == Some(Direction::Up) && !self.can_survive(state, pos) { + self.destroy_block(pos, true, 512); + } else { + self.spawn_falling_stalactite(pos, state); + } + } + Class::Target => { + if b.table.int(state, p.power) != 0 { + self.set_block_and_update(pos, b.table.set_int(state, p.power, 0)); + } + } + Class::TripWire => self.tripwire_tick(pos), + Class::TripWireHook => { + self.tripwire_hook_calculate(pos, state, false, true, -1, None) + } + _ => continue, + } + return; + } + } + + /// `BlockState.randomTick` followed by the fluid's random tick. + pub fn random_tick_at(&mut self, pos: BlockPos) { + let state = self.state(pos); + if self.b.is_randomly_ticking(state) { + self.random_tick_block(state, pos); + } + // Only lava's fluid state ticks randomly. A lava block is ticked twice + // (LiquidBlock.randomTick, then FluidState.randomTick), as in vanilla. + let fluid = self.b.fluid(state).kind(); + if matches!(fluid, FluidKind::Lava | FluidKind::FlowingLava) { + self.lava_random_tick(pos); + } + } + + pub fn random_tick_block(&mut self, state: BlockStateId, pos: BlockPos) { + let b = self.b; + let p = b.props; + let block = b.block(state); + let data = b.data(state); + let chain = &data.chain; + for class in chain.iter().copied() { + match class { + Class::BambooSapling => { + if self.rand_int(3) == 0 + && self.is_empty_block(above(pos)) + && self.raw_brightness(above(pos), 0) >= 9 + { + self.bamboo_sapling_grow(pos); + } + } + Class::BambooStalk => { + if b.table.int(state, p.stage) == 0 + && self.rand_int(3) == 0 + && self.is_empty_block(above(pos)) + && self.raw_brightness(above(pos), 0) >= 9 + { + let height = self.bamboo_height_below(pos) + 1; + if height < 16 { + self.bamboo_grow(state, pos, height); + } + } + } + Class::Beetroot | Class::TorchflowerCrop => { + if self.rand_int(3) != 0 { + self.crop_random_tick(state, pos); + } + } + Class::Crop => self.crop_random_tick(state, pos), + Class::BuddingAmethyst => self.budding_amethyst_tick(pos), + Class::Cactus => self.cactus_random_tick(state, pos), + Class::ChorusFlower => self.chorus_flower_random_tick(state, pos), + Class::Cocoa => { + if self.rand_int(5) == 0 { + let age = b.table.int(state, p.age); + if age < 2 { + self.set_block(pos, b.table.set_int(state, p.age, age + 1), 2); + } + } + } + Class::Farmland => self.farmland_random_tick(state, pos), + Class::GrowingPlantHead => { + if b.table.int(state, p.age) < 25 + && self.random().next_double() < data.grow_probability + { + let growth = rel(pos, data.growth_direction); + if self.growing_plant_can_grow_into(state, self.state(growth)) { + let next = self.growing_plant_grow_into_state(state); + self.set_block_and_update(growth, next); + } + } + } + Class::Ice => { + if self.level.block_light(pos) > 11 - i32::from(b.facts(state).dampening) { + self.ice_melt(pos); + } + } + Class::Leaves => { + if !b.table.bool(state, p.persistent) && b.table.int(state, p.distance) == 7 { + self.drop_resources(state, pos); + self.remove_block(pos, false); + } + } + Class::Liquid => { + if matches!( + b.fluid(state).kind(), + FluidKind::Lava | FluidKind::FlowingLava + ) { + self.lava_random_tick(pos); + } + } + Class::MangrovePropagule => { + if !b.table.bool(state, p.hanging) { + if self.rand_int(7) == 0 { + self.sapling_advance_tree(pos, state); + } + } else if b.table.int(state, p.age) != 4 { + self.set_block(pos, b.table.cycle(state, p.age), 2); + } + } + Class::Sapling => { + if self.max_local_raw_brightness(above(pos)) >= 9 && self.rand_int(7) == 0 { + self.sapling_advance_tree(pos, state); + } + } + Class::Mushroom => self.mushroom_random_tick(state, pos), + Class::NetherWart => { + let age = b.table.int(state, p.age); + if age < 3 && self.rand_int(10) == 0 { + self.set_block(pos, b.table.set_int(state, p.age, age + 1), 2); + } + } + Class::Nylium => { + if !self.can_be_nylium(state, pos) { + self.set_block_and_update(pos, b.default_of(b.named.netherrack)); + } + } + Class::PitcherCrop => { + let speed = self.crop_growth_speed(block, pos); + if self.rand_int((25.0 / speed) as i32 + 1) == 0 { + self.pitcher_grow(state, pos, 1); + } + } + Class::Speleothem => self.speleothem_random_tick(state, pos), + Class::RedStoneOre => { + if b.table.bool(state, p.lit) { + self.set_block_and_update(pos, b.table.set_bool(state, p.lit, false)); + } + } + Class::SnowLayer => { + if self.level.block_light(pos) > 11 { + self.drop_resources(state, pos); + self.remove_block(pos, false); + self.game_event(pos, "minecraft:block_destroy"); + } + } + Class::SpreadingSnowy => self.spreading_snowy_tick(state, pos), + Class::Stem => self.stem_random_tick(state, pos), + Class::SugarCane => { + if self.is_empty_block(above(pos)) { + let mut height = 1; + while b.is_block(self.state(pos.offset(0, -height, 0)), block) { + height += 1; + } + if height < 3 { + let age = b.table.int(state, p.age); + if age == 15 { + self.set_block_and_update(above(pos), b.default_of(block)); + self.set_block(pos, b.table.set_int(state, p.age, 0), 260); + } else { + self.set_block(pos, b.table.set_int(state, p.age, age + 1), 260); + } + } + } + } + Class::SweetBerryBush => { + let age = b.table.int(state, p.age); + if age < 3 && self.rand_int(5) == 0 && self.raw_brightness(above(pos), 0) >= 9 { + let next = b.table.set_int(state, p.age, age + 1); + self.set_block(pos, next, 2); + self.game_event(pos, "minecraft:block_change"); + } + } + Class::Vine => self.vine_random_tick(state, pos), + Class::WeatheringCopperFull => self.copper_change_over_time(state, pos), + _ => continue, + } + return; + } + if data.implements(super::classes::Interface::WeatheringCopper) { + let upper_door = data.is(Class::Door) && b.table.text(state, p.half) == "upper"; + let right_chest = data.is(Class::Chest) && b.table.text(state, p.kind) == "right"; + if !upper_door && !right_chest { + self.copper_change_over_time(state, pos); + } + } + } + + // ---- helpers ---- + + pub(crate) fn turn_to_base_block(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let base = b.data(state).link.unwrap_or(b.named.dirt); + self.set_block_and_update(pos, b.default_of(base)); + self.game_event(pos, "minecraft:block_change"); + } + /// `FallingBlock.isFree`. + pub(crate) fn is_free(&self, state: BlockStateId) -> bool { + let b = self.b; + b.is_air(state) + || b.tag("minecraft:fire") + .is_some_and(|tag| b.in_set(state, tag)) + || b.liquid(state) + || b.is_replaceable(state) + } + fn leaves_update_distance(&self, state: BlockStateId, pos: BlockPos) -> BlockStateId { + let mut distance = 7; + for direction in Direction::ALL { + distance = distance.min(self.leaf_distance_at(self.rel_state(pos, direction)) + 1); + if distance == 1 { + break; + } + } + self.b.table.set_int(state, self.b.props.distance, distance) + } + fn bubble_column_update( + &mut self, + pos: BlockPos, + state: BlockStateId, + below_state: BlockStateId, + ) { + let column = self.b.block(state); + self.bubble_column_update_for(column, pos, state, below_state); + } + /// `BubbleColumnBlock.updateColumn(column, level, pos, occupyState, belowState)`. + pub(crate) fn bubble_column_update_for( + &mut self, + column: super::states::BlockId, + pos: BlockPos, + occupy: BlockStateId, + below_state: BlockStateId, + ) { + let b = self.b; + if !self.bubble_column_can_occupy(occupy) { + return; + } + let column_state = if b.is_block(below_state, column) { + below_state + } else if b.in_set(below_state, &b.tags.enables_bubble_column_push_up) { + b.table.set_bool(b.default_of(column), b.props.drag, false) + } else if b.in_set(below_state, &b.tags.enables_bubble_column_drag_down) { + b.table.set_bool(b.default_of(column), b.props.drag, true) + } else if b.is_block(occupy, column) { + b.default_of(b.named.water) + } else { + occupy + }; + self.set_block(pos, column_state, 2); + let mut up = above(pos); + while self.bubble_column_can_occupy(self.state(up)) { + if !self.set_block(up, column_state, 2) { + return; + } + up = above(up); + } + } + fn big_dripleaf_tick(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + if self.has_neighbor_signal(pos) { + let next = b.table.set_text(state, b.props.tilt, "none"); + self.set_block(pos, next, 2); + if b.table.text(state, b.props.tilt) != "none" { + let pitch = self.random().next_float() * 0.4 + 0.8; + self.emit(LevelEvent::Sound { + pos, + sound: "minecraft:block.big_dripleaf.tilt_up".into(), + volume: 1.0, + pitch, + }); + } + return; + } + let (next, delay) = match b.table.text(state, b.props.tilt) { + "unstable" => ("partial", Some(10)), + "partial" => ("full", Some(100)), + "full" => ("none", None), + _ => return, + }; + let next_state = b.table.set_text(state, b.props.tilt, next); + self.set_block(pos, next_state, 2); + if next != "none" { + self.game_event(pos, "minecraft:block_change"); + } + let pitch = self.random().next_float() * 0.4 + 0.8; + let sound = if next == "none" { + "minecraft:block.big_dripleaf.tilt_up" + } else { + "minecraft:block.big_dripleaf.tilt_down" + }; + self.emit(LevelEvent::Sound { + pos, + sound: sound.into(), + volume: 1.0, + pitch, + }); + if let Some(delay) = delay { + self.schedule_tick(pos, b.block(state), delay); + } + } + fn scaffolding_tick(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let distance = self.scaffolding_distance(pos); + let bottom = self.scaffolding_is_bottom(pos, distance); + let next = b.table.set_bool( + b.table.set_int(state, b.props.distance, distance), + b.props.bottom, + bottom, + ); + if distance == 7 { + if b.table.int(state, b.props.distance) == 7 { + self.falling_block_fall(pos, next); + } else { + self.destroy_block(pos, true, 512); + } + } else if state != next { + self.set_block_and_update(pos, next); + } + } + /// `ScaffoldingBlock.isBottom`. + pub(crate) fn scaffolding_is_bottom(&self, pos: BlockPos, distance: i32) -> bool { + let b = self.b; + distance > 0 && !b.is_block(self.below_state(pos), b.named.scaffolding) + } + fn fire_tick(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let p = b.props; + let block = b.block(state); + let delay = 30 + self.rand_int(10); + self.schedule_tick(pos, block, delay); + if !self.level.can_spread_fire_around(pos) { + return; + } + if !self.can_survive(state, pos) { + self.remove_block(pos, false); + } + let below_state = self.below_state(pos); + let infiniburn = match self.level.dimension() { + super::Dimension::Overworld => &b.tags.infiniburn_overworld, + super::Dimension::Nether => &b.tags.infiniburn_nether, + super::Dimension::End => &b.tags.infiniburn_end, + }; + let infini = b.in_set(below_state, infiniburn); + let age = b.table.int(state, p.age); + let raining = self.level.is_raining(); + if !infini + && raining + && self.fire_near_rain(pos) + && self.random().next_float() < 0.2 + age as f32 * 0.03 + { + self.remove_block(pos, false); + return; + } + let new_age = 15.min(age + self.rand_int(3) / 2); + let mut state = state; + if age != new_age { + state = b.table.set_int(state, p.age, new_age); + self.set_block(pos, state, 260); + } + if !infini { + if !self.is_valid_fire_location(pos) { + if !self.sturdy(below(pos), Direction::Up) || age > 3 { + self.remove_block(pos, false); + } + return; + } + if age == 15 && self.rand_int(4) == 0 && !self.can_burn(self.below_state(pos)) { + self.remove_block(pos, false); + return; + } + } + let burnout = self.level.dimension() == super::Dimension::Nether && false; + let extra = if burnout { -50 } else { 0 }; + for (direction, chance) in [ + (Direction::East, 300), + (Direction::West, 300), + (Direction::Down, 250), + (Direction::Up, 250), + (Direction::North, 300), + (Direction::South, 300), + ] { + self.fire_check_burn_out(rel(pos, direction), chance + extra, age); + } + for xx in -1..=1 { + for zz in -1..=1 { + for yy in -1..=4 { + if xx == 0 && yy == 0 && zz == 0 { + continue; + } + let mut rate = 100; + if yy > 1 { + rate += (yy - 1) * 100; + } + let test = pos.offset(xx, yy, zz); + let ignite = self.fire_ignite_odds_at(test); + if ignite > 0 { + let mut odds = (ignite + 40 + self.level.difficulty() * 7) / (age + 30); + if burnout { + odds /= 2; + } + if odds > 0 + && self.rand_int(rate) <= odds + && (!self.level.is_raining() || !self.fire_near_rain(test)) + { + let spread_age = 15.min(age + self.rand_int(5) / 4); + let next = self.fire_state_with_age(test, spread_age); + self.set_block_and_update(test, next); + } + } + } + } + } + } + /// `FireBlock.getIgniteOdds(level, pos)`: only for air with flammable neighbours. + fn fire_ignite_odds_at(&self, pos: BlockPos) -> i32 { + if !self.is_empty_block(pos) { + return 0; + } + Direction::ALL + .into_iter() + .map(|d| self.ignite_odds(self.rel_state(pos, d))) + .max() + .unwrap_or(0) + } + fn fire_near_rain(&self, pos: BlockPos) -> bool { + self.level.is_raining_at(pos) + || self.level.is_raining_at(rel(pos, Direction::West)) + || self.level.is_raining_at(rel(pos, Direction::East)) + || self.level.is_raining_at(rel(pos, Direction::North)) + || self.level.is_raining_at(rel(pos, Direction::South)) + } + fn fire_check_burn_out(&mut self, pos: BlockPos, chance: i32, age: i32) { + let b = self.b; + let odds = self.burn_odds(self.state(pos)); + if self.rand_int(chance) < odds { + let old = self.state(pos); + if self.rand_int(age + 10) < 5 && !self.level.is_raining_at(pos) { + let new_age = (age + self.rand_int(5) / 4).min(15); + let next = self.fire_state_with_age(pos, new_age); + self.set_block_and_update(pos, next); + } else { + self.remove_block(pos, false); + } + if b.instance_of(old, Class::Tnt) { + self.emit(LevelEvent::PrimeTnt { pos }); + } + } + } + fn frosted_ice_tick(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + let block = b.block(state); + let fewer = |sim: &Self, at: BlockPos, limit: i32| { + let mut count = 0; + for d in Direction::ALL { + if sim.b.is_block(sim.rel_state(at, d), block) { + count += 1; + if count >= limit { + return false; + } + } + } + true + }; + if self.rand_int(3) == 0 || fewer(self, pos, 4) { + let brightness = if self.level.dimension() == super::Dimension::End { + self.level.block_light(pos) + } else { + self.max_local_raw_brightness(pos) + }; + let age = b.table.int(state, b.props.age); + if brightness > 11 - age - i32::from(b.facts(state).dampening) + && self.frosted_slightly_melt(pos, state) + { + for direction in Direction::ALL { + let neighbour_pos = rel(pos, direction); + let neighbour = self.state(neighbour_pos); + if b.is_block(neighbour, block) + && !self.frosted_slightly_melt(neighbour_pos, neighbour) + { + let delay = self + .random() + .next_int_between_inclusive(20, 40) + .unwrap_or(20); + self.schedule_tick(neighbour_pos, block, delay); + } + } + return; + } + } + let delay = self + .random() + .next_int_between_inclusive(20, 40) + .unwrap_or(20); + self.schedule_tick(pos, block, delay); + } + fn frosted_slightly_melt(&mut self, pos: BlockPos, state: BlockStateId) -> bool { + let b = self.b; + let age = b.table.int(state, b.props.age); + if age < 3 { + self.set_block(pos, b.table.set_int(state, b.props.age, age + 1), 2); + false + } else { + self.ice_melt(pos); + true + } + } + + // ---- crops and plants ---- + + /// `CropBlock.getGrowthSpeed`. + pub(crate) fn crop_growth_speed(&self, block: super::states::BlockId, pos: BlockPos) -> f32 { + let b = self.b; + let mut speed = 1.0f32; + let under = below(pos); + for xx in -1..=1 { + for zz in -1..=1 { + let mut block_speed = 0.0f32; + let state = self.state(under.offset(xx, 0, zz)); + if b.in_set(state, &b.tags.grows_crops) { + block_speed = 1.0; + if b.table.int(state, b.props.moisture) > 0 { + block_speed = 3.0; + } + } + if xx != 0 || zz != 0 { + block_speed /= 4.0; + } + speed += block_speed; + } + } + let is = |at: BlockPos| b.is_block(self.state(at), block); + let (n, s, w, e) = ( + rel(pos, Direction::North), + rel(pos, Direction::South), + rel(pos, Direction::West), + rel(pos, Direction::East), + ); + let horizontal = is(w) || is(e); + let vertical = is(n) || is(s); + let diagonal = is(rel(w, Direction::North)) + || is(rel(e, Direction::North)) + || is(rel(e, Direction::South)) + || is(rel(w, Direction::South)); + if (horizontal && vertical) || diagonal { + speed /= 2.0; + } + speed + } + fn crop_random_tick(&mut self, state: BlockStateId, pos: BlockPos) { + let b = self.b; + if self.raw_brightness(pos, 0) < 9 { + return; + } + let age = b.table.int(state, b.props.age); + let max = b.table.int_range(state, b.props.age).map_or(7, |r| r.1); + if age < max { + let speed = self.crop_growth_speed(b.block(state), pos); + if self.rand_int((25.0 / speed) as i32 + 1) == 0 { + self.set_block(pos, b.table.set_int(state, b.props.age, age + 1), 2); + } + } + } + fn stem_random_tick(&mut self, state: BlockStateId, pos: BlockPos) { + let b = self.b; + if self.raw_brightness(pos, 0) < 9 { + return; + } + let speed = self.crop_growth_speed(b.block(state), pos); + if self.rand_int((25.0 / speed) as i32 + 1) != 0 { + return; + } + let age = b.table.int(state, b.props.age); + if age < 7 { + self.set_block(pos, b.table.set_int(state, b.props.age, age + 1), 2); + return; + } + let direction = HORIZONTAL[self.rand_int(4) as usize]; + let relative = rel(pos, direction); + let data = b.data(state); + let below_state = self.below_state(relative); + if b.is_air(self.state(relative)) + && data + .support_tag2 + .as_ref() + .is_some_and(|tag| b.in_set(below_state, tag)) + { + if let (Some(fruit), Some(stem)) = (data.link, data.link2) { + self.set_block_and_update(relative, b.default_of(fruit)); + self.set_block_and_update( + pos, + b.table + .set_dir(b.default_of(stem), b.props.facing, direction), + ); + } + } + } + /// `PitcherCropBlock.grow`. + pub(crate) fn pitcher_grow(&mut self, state: BlockStateId, pos: BlockPos, increase: i32) { + let b = self.b; + let p = b.props; + let (lower_pos, lower) = if b.table.text(state, p.half) == "upper" { + let below_pos = below(pos); + let below_state = self.state(below_pos); + if !b.is_block(below_state, b.named.pitcher_crop) + || b.table.text(below_state, p.half) != "lower" + { + return; + } + (below_pos, below_state) + } else { + (pos, state) + }; + let new_age = b.table.int(lower, p.age) + increase; + let can_grow = b.table.int(lower, p.age) < 4 + && self.raw_brightness(lower_pos, 0) >= 8 + && self.is_inside_build_height(lower_pos.y + 1) + && (new_age < 3 || { + let upper = self.state(above(lower_pos)); + b.is_air(upper) || b.is_block(upper, b.named.pitcher_crop) + }); + if !can_grow { + return; + } + let grown = b.table.set_int(lower, p.age, new_age); + self.set_block(lower_pos, grown, 2); + if new_age >= 3 { + let upper_pos = above(lower_pos); + let upper = b.table.set_text(grown, p.half, "upper"); + let upper = b + .table + .with_bool(upper, p.waterlogged, self.is_water_at(upper_pos)) + .unwrap_or(upper); + self.set_block(upper_pos, upper, 3); + } + } + fn growing_plant_can_grow_into(&self, plant: BlockStateId, state: BlockStateId) -> bool { + let b = self.b; + let data = b.data(plant); + if data.is(Class::Kelp) { + b.is_block(state, b.named.water) && b.fluid(state).amount() == 8 + } else { + // NetherVines.isValidGrowthState / CaveVines: air only. + b.is_air(state) + } + } + fn growing_plant_grow_into_state(&mut self, state: BlockStateId) -> BlockStateId { + let b = self.b; + let next = b.table.cycle(state, b.props.age); + if b.instance_of(state, Class::CaveVines) { + let berries = self.random().next_float() < 0.11; + return b.table.set_bool(next, b.props.berries, berries); + } + next + } + fn cactus_random_tick(&mut self, state: BlockStateId, pos: BlockPos) { + let b = self.b; + let block = b.block(state); + let above_pos = above(pos); + if !self.is_empty_block(above_pos) { + return; + } + let mut height = 1; + let age = b.table.int(state, b.props.age); + while b.is_block(self.state(pos.offset(0, -height, 0)), block) { + height += 1; + if height == 3 && age == 15 { + return; + } + } + if age == 8 && self.can_survive(b.default_of(block), above_pos) { + let chance = if height >= 3 { 0.25 } else { 0.1 }; + if self.random().next_double() <= chance { + self.set_block_and_update(above_pos, b.default_of(b.named.cactus_flower)); + } + } else if age == 15 && height < 3 { + self.set_block_and_update(above_pos, b.default_of(block)); + let reset = b.table.set_int(state, b.props.age, 0); + self.set_block(pos, reset, 260); + self.neighbor_changed_full(reset, above_pos, block, false); + } + if age < 15 { + self.set_block(pos, b.table.set_int(state, b.props.age, age + 1), 260); + } + } + fn farmland_random_tick(&mut self, state: BlockStateId, pos: BlockPos) { + let b = self.b; + let moisture = b.table.int(state, b.props.moisture); + let mut near_water = false; + 'search: for x in -4..=4 { + for y in 0..=1 { + for z in -4..=4 { + if b.is_water_fluid(self.fluid_at(pos.offset(x, y, z)).kind()) { + near_water = true; + break 'search; + } + } + } + } + if !near_water && !self.level.is_raining_at(above(pos)) { + if moisture > 0 { + self.set_block( + pos, + b.table.set_int(state, b.props.moisture, moisture - 1), + 2, + ); + } else if !b.in_set(self.above_state(pos), &b.tags.maintains_farmland) { + self.turn_to_base_block(pos, state); + } + } else if moisture < 7 { + self.set_block(pos, b.table.set_int(state, b.props.moisture, 7), 2); + } + } + /// `SaplingBlock.advanceTree`. + pub(crate) fn sapling_advance_tree(&mut self, pos: BlockPos, state: BlockStateId) { + let b = self.b; + if b.table.int(state, b.props.stage) == 0 { + self.set_block(pos, b.table.cycle(state, b.props.stage), 260); + } else if let Some(grower) = b.data(state).feature.clone() { + self.emit(LevelEvent::GrowTree { pos, state, grower }); + } + } + fn mushroom_random_tick(&mut self, state: BlockStateId, mut pos: BlockPos) { + let b = self.b; + if self.rand_int(25) != 0 { + return; + } + // canSpread: at most four of this mushroom within a 9x3x9 box. + let block = b.block(state); + let mut max = 5; + for x in -4..=4 { + for y in -1..=1 { + for z in -4..=4 { + if b.is_block(self.state(pos.offset(x, y, z)), block) { + max -= 1; + if max <= 0 { + return; + } + } + } + } + } + let mut offset = self.mushroom_offset(pos); + for _ in 0..4 { + if self.is_empty_block(offset) && self.can_survive(state, offset) { + pos = offset; + } + offset = self.mushroom_offset(pos); + } + if self.is_empty_block(offset) && self.can_survive(state, offset) { + self.set_block(offset, state, 2); + } + } + fn mushroom_offset(&mut self, pos: BlockPos) -> BlockPos { + let x = self.rand_int(3) - 1; + let y = self.rand_int(2) - self.rand_int(2); + let z = self.rand_int(3) - 1; + pos.offset(x, y, z) + } + /// `LightEngine.getLightDampeningInto(state, above, UP, above.dampening) < 15`. + fn top_face_lets_light(&self, state: BlockStateId, above_state: BlockStateId) -> bool { + let b = self.b; + let occluding = |s: BlockStateId| { + b.has_flag(s, state_flags::CAN_OCCLUDE) + && b.has_flag(s, super::data::state_flags::SHAPE_OCCLUSION) + }; + let dampening = i32::from(b.facts(above_state).dampening); + let from_full = occluding(state) && b.collision_face_full(state, Direction::Up); + let to_full = occluding(above_state) && b.collision_face_full(above_state, Direction::Down); + let into = if !occluding(state) && !occluding(above_state) { + dampening + } else if from_full || to_full { + 16 + } else { + dampening + }; + into < 15 + } + fn can_be_nylium(&self, state: BlockStateId, pos: BlockPos) -> bool { + self.top_face_lets_light(state, self.above_state(pos)) + } + fn snowy_can_stay_alive(&self, state: BlockStateId, pos: BlockPos) -> bool { + let b = self.b; + let above_state = self.above_state(pos); + if b.is_block(above_state, b.named.snow) && b.table.int(above_state, b.props.layers) == 1 { + return true; + } + if b.fluid(above_state).is_full() { + return false; + } + self.top_face_lets_light(state, above_state) + } + fn spreading_snowy_tick(&mut self, state: BlockStateId, pos: BlockPos) { + let b = self.b; + let base = b.data(state).link.unwrap_or(b.named.dirt); + if !self.snowy_can_stay_alive(state, pos) { + self.set_block_and_update(pos, b.default_of(base)); + return; + } + if self.max_local_raw_brightness(above(pos)) < 9 { + return; + } + let default = b.default_of(b.block(state)); + for _ in 0..4 { + let x = self.rand_int(3) - 1; + let y = self.rand_int(5) - 3; + let z = self.rand_int(3) - 1; + let test = pos.offset(x, y, z); + if b.is_block(self.state(test), base) + && self.snowy_can_stay_alive(default, test) + && !b.is_water_fluid(self.fluid_at(above(test)).kind()) + { + let snowy = b.in_set(self.above_state(test), &b.tags.snow); + self.set_block_and_update(test, b.table.set_bool(default, b.props.snowy, snowy)); + } + } + } + fn budding_amethyst_tick(&mut self, pos: BlockPos) { + let b = self.b; + if self.rand_int(5) != 0 { + return; + } + let direction = Direction::ALL[self.rand_int(6) as usize]; + let grow = rel(pos, direction); + let relative = self.state(grow); + let name = |n: &str| b.table.block_by_name(n); + let stages = [ + "minecraft:small_amethyst_bud", + "minecraft:medium_amethyst_bud", + "minecraft:large_amethyst_bud", + "minecraft:amethyst_cluster", + ]; + let fluid = b.fluid(relative); + let can_cluster_grow = + b.is_air(relative) || (b.is_block(relative, b.named.water) && fluid.amount() == 8); + let next = if can_cluster_grow { + name(stages[0]) + } else { + let mut found = None; + for i in 0..3 { + if name(stages[i]).is_some_and(|s| b.is_block(relative, s)) + && b.facing(relative) == direction + { + found = name(stages[i + 1]); + } + } + found + }; + if let Some(next) = next { + let state = b + .table + .set_dir(b.default_of(next), b.props.facing, direction); + let state = b.table.set_bool( + state, + b.props.waterlogged, + fluid == crate::fluid::FluidState::WATER, + ); + self.set_block_and_update(grow, state); + } + } + fn bamboo_sapling_grow(&mut self, pos: BlockPos) { + let b = self.b; + let bamboo = b.default_of(b.named.bamboo); + let state = b.table.set_text(bamboo, b.props.leaves, "small"); + self.set_block(above(pos), state, 3); + } + fn bamboo_height_below(&self, pos: BlockPos) -> i32 { + let mut height = 0; + while height < 16 + && self.b.is_block( + self.state(pos.offset(0, -(height + 1), 0)), + self.b.named.bamboo, + ) + { + height += 1; + } + height + } + fn bamboo_height_above(&self, pos: BlockPos) -> i32 { + let mut height = 0; + while height < 16 + && self.b.is_block( + self.state(pos.offset(0, height + 1, 0)), + self.b.named.bamboo, + ) + { + height += 1; + } + height + } + /// `BambooStalkBlock.growBamboo`. + fn bamboo_grow(&mut self, state: BlockStateId, pos: BlockPos, height: i32) { + let b = self.b; + let p = b.props; + let below_state = self.below_state(pos); + let below_two = pos.offset(0, -2, 0); + let below_two_state = self.state(below_two); + let mut leaves = "none"; + if height >= 1 { + if !b.is_block(below_state, b.named.bamboo) + || b.table.text(below_state, p.leaves) == "none" + { + leaves = "small"; + } else if b.is_block(below_state, b.named.bamboo) + && b.table.text(below_state, p.leaves) != "none" + { + leaves = "large"; + if b.is_block(below_two_state, b.named.bamboo) { + self.set_block( + below(pos), + b.table.set_text(below_state, p.leaves, "small"), + 3, + ); + self.set_block( + below_two, + b.table.set_text(below_two_state, p.leaves, "none"), + 3, + ); + } + } + } + let age = if b.table.int(state, p.age) != 1 && !b.is_block(below_two_state, b.named.bamboo) + { + 0 + } else { + 1 + }; + let stage = if (height < 11 || self.random().next_float() >= 0.25) && height != 15 { + 0 + } else { + 1 + }; + let next = b.table.set_int( + b.table.set_int( + b.table + .set_text(b.default_of(b.named.bamboo), p.leaves, leaves), + p.age, + age, + ), + p.stage, + stage, + ); + let _ = self.bamboo_height_above(pos); + self.set_block(above(pos), next, 3); + } + /// `VineBlock.randomTick`. + fn vine_random_tick(&mut self, state: BlockStateId, pos: BlockPos) { + let b = self.b; + let p = b.props; + let block = b.block(state); + if self.rand_int(4) != 0 { + return; + } + let direction = Direction::ALL[self.rand_int(6) as usize]; + let above_pos = above(pos); + let default = b.default_of(block); + if super::query::is_horizontal(direction) + && !b.table.bool(state, self.direction_prop(direction)) + { + if !self.vine_can_spread(pos, block) { + return; + } + let test = rel(pos, direction); + let edge = self.state(test); + if b.is_air(edge) { + let cw = super::query::clockwise(direction); + let ccw = super::query::counter_clockwise(direction); + let cw_face = b.table.bool(state, self.direction_prop(cw)); + let ccw_face = b.table.bool(state, self.direction_prop(ccw)); + let cw_test = rel(test, cw); + let ccw_test = rel(test, ccw); + if cw_face && b.multiface_can_attach(self.state(cw_test), cw) { + self.set_block( + test, + b.table.set_bool(default, self.direction_prop(cw), true), + 2, + ); + } else if ccw_face && b.multiface_can_attach(self.state(ccw_test), ccw) { + self.set_block( + test, + b.table.set_bool(default, self.direction_prop(ccw), true), + 2, + ); + } else { + let opposite = direction.opposite(); + if cw_face + && self.is_empty_block(cw_test) + && b.multiface_can_attach(self.rel_state(pos, cw), opposite) + { + self.set_block( + cw_test, + b.table + .set_bool(default, self.direction_prop(opposite), true), + 2, + ); + } else if ccw_face + && self.is_empty_block(ccw_test) + && b.multiface_can_attach(self.rel_state(pos, ccw), opposite) + { + self.set_block( + ccw_test, + b.table + .set_bool(default, self.direction_prop(opposite), true), + 2, + ); + } else if self.random().next_float() < 0.05 + && b.multiface_can_attach(self.state(above(test)), Direction::Up) + { + self.set_block(test, b.table.set_bool(default, p.up, true), 2); + } + } + } else if b.multiface_can_attach(edge, direction) { + self.set_block( + pos, + b.table + .set_bool(state, self.direction_prop(direction), true), + 2, + ); + } + return; + } + if direction == Direction::Up && pos.y < self.level.max_y() - 1 { + if b.multiface_can_attach(self.state(above_pos), Direction::Up) { + self.set_block(pos, b.table.set_bool(state, p.up, true), 2); + return; + } + if self.is_empty_block(above_pos) { + if !self.vine_can_spread(pos, block) { + return; + } + let mut above_state = state; + for d in HORIZONTAL { + if self.random().next_boolean() + || !b.multiface_can_attach(self.state(rel(above_pos, d)), d) + { + above_state = b.table.set_bool(above_state, self.direction_prop(d), false); + } + } + if HORIZONTAL + .into_iter() + .any(|d| b.table.bool(above_state, self.direction_prop(d))) + { + self.set_block(above_pos, above_state, 2); + } + return; + } + } + if pos.y > self.level.min_y() { + let below_pos = below(pos); + let below_state = self.state(below_pos); + if b.is_air(below_state) || b.is_block(below_state, block) { + let before = if b.is_air(below_state) { + default + } else { + below_state + }; + let mut after = before; + for d in HORIZONTAL { + if self.random().next_boolean() && b.table.bool(state, self.direction_prop(d)) { + after = b.table.set_bool(after, self.direction_prop(d), true); + } + } + if before != after + && HORIZONTAL + .into_iter() + .any(|d| b.table.bool(after, self.direction_prop(d))) + { + self.set_block(below_pos, after, 2); + } + } + } + } + fn vine_can_spread(&self, pos: BlockPos, block: super::states::BlockId) -> bool { + let mut max = 5; + for x in -4..=4 { + for y in -1..=1 { + for z in -4..=4 { + if self.b.is_block(self.state(pos.offset(x, y, z)), block) { + max -= 1; + if max <= 0 { + return false; + } + } + } + } + } + true + } + /// `ChorusFlowerBlock.randomTick`. + fn chorus_flower_random_tick(&mut self, state: BlockStateId, pos: BlockPos) { + let b = self.b; + let p = b.props; + let block = b.block(state); + let plant = b.named.chorus_plant; + let above_pos = above(pos); + if !self.is_empty_block(above_pos) || above_pos.y > self.level.max_y() - 1 { + return; + } + let age = b.table.int(state, p.age); + if age >= 5 { + return; + } + let mut grow_up = false; + let mut pillar_on_support = false; + let below_state = self.below_state(pos); + if b.in_set(below_state, &b.tags.supports_chorus_flower) { + grow_up = true; + } else if b.is_block(below_state, plant) { + let mut height = 1; + for _ in 0..4 { + let test = self.state(pos.offset(0, -(height + 1), 0)); + if !b.is_block(test, plant) { + if b.in_set(test, &b.tags.supports_chorus_flower) { + pillar_on_support = true; + } + break; + } + height += 1; + } + if height < 2 || height <= self.rand_int(if pillar_on_support { 5 } else { 4 }) { + grow_up = true; + } + } else if b.is_air(below_state) { + grow_up = true; + } + let all_empty = |sim: &Self, at: BlockPos, ignore: Option<Direction>| { + HORIZONTAL + .into_iter() + .all(|d| Some(d) == ignore || sim.is_empty_block(rel(at, d))) + }; + let plant_state = b.default_of(plant); + if grow_up && all_empty(self, above_pos, None) && self.is_empty_block(pos.offset(0, 2, 0)) { + let connected = self.chorus_plant_with_connections(pos, plant_state); + self.set_block(pos, connected, 2); + self.set_block( + above_pos, + b.table.set_int(b.default_of(block), p.age, age), + 2, + ); + self.level_event(1033, above_pos, 0); + } else if age < 4 { + let mut attempts = self.rand_int(4); + if pillar_on_support { + attempts += 1; + } + let mut branched = false; + for _ in 0..attempts { + let direction = HORIZONTAL[self.rand_int(4) as usize]; + let target = rel(pos, direction); + if self.is_empty_block(target) + && self.is_empty_block(below(target)) + && all_empty(self, target, Some(direction.opposite())) + { + self.set_block( + target, + b.table.set_int(b.default_of(block), p.age, age + 1), + 2, + ); + self.level_event(1033, target, 0); + branched = true; + } + } + if branched { + let connected = self.chorus_plant_with_connections(pos, plant_state); + self.set_block(pos, connected, 2); + } else { + self.set_block(pos, b.table.set_int(state, p.age, 5), 2); + self.level_event(1034, pos, 0); + } + } else { + self.set_block(pos, b.table.set_int(state, p.age, 5), 2); + self.level_event(1034, pos, 0); + } + } + /// `ServerLevel.tickPrecipitation` at a column whose top (motion-blocking + /// heightmap) position and biome answers are supplied by the caller. + pub(crate) fn precipitation_tick(&mut self, info: Precipitation) { + let b = self.b; + let p = b.props; + let top = info.top; + let below_pos = below(top); + if info.freezes_below { + self.set_block_and_update(below_pos, b.default_of(b.named.ice)); + } + if !self.level.is_raining() { + return; + } + let max_height = self.level.game_rules().max_snow_accumulation_height; + if max_height > 0 && info.snows_at_top { + let state = self.state(top); + if b.is_block(state, b.named.snow) { + let layers = b.table.int(state, p.layers); + if layers < max_height.min(8) { + self.set_block_and_update(top, b.table.set_int(state, p.layers, layers + 1)); + } + } else { + self.set_block_and_update(top, b.default_of(b.named.snow)); + } + } + if info.kind != PrecipitationKind::None { + let below_state = self.state(below_pos); + let data = b.data(below_state); + let chance = match info.kind { + PrecipitationKind::Rain => 0.05, + PrecipitationKind::Snow => 0.1, + PrecipitationKind::None => 0.0, + }; + if data.is(Class::Cauldron) { + if self.random().next_float() < chance { + let next = if info.kind == PrecipitationKind::Rain { + b.named.water_cauldron + } else { + b.named.powder_snow_cauldron + }; + self.set_block_and_update(below_pos, b.default_of(next)); + self.game_event(below_pos, "minecraft:block_change"); + } + } else if data.is(Class::LayeredCauldron) && self.random().next_float() < chance { + let matches = (info.kind == PrecipitationKind::Rain + && b.is_block(below_state, b.named.water_cauldron)) + || (info.kind == PrecipitationKind::Snow + && b.is_block(below_state, b.named.powder_snow_cauldron)); + if b.table.int(below_state, p.level) != 3 && matches { + self.set_block_and_update(below_pos, b.table.cycle(below_state, p.level)); + self.game_event(below_pos, "minecraft:block_change"); + } + } + } + } + /// `ChangeOverTimeBlock.changeOverTime` for weathering copper. + fn copper_change_over_time(&mut self, state: BlockStateId, pos: BlockPos) { + if self.random().next_float() >= 0.056_888_89 { + return; + } + let b = self.b; + let own = b.data(state).weather; + let (mut same, mut older) = (0, 0); + for x in -4i32..=4 { + for y in -4i32..=4 { + for z in -4i32..=4 { + if x.abs() + y.abs() + z.abs() > 4 || (x == 0 && y == 0 && z == 0) { + continue; + } + let other = self.state(pos.offset(x, y, z)); + let data = b.data(other); + if !data.implements(super::classes::Interface::WeatheringCopper) { + continue; + } + match data.weather.cmp(&own) { + std::cmp::Ordering::Less => return, + std::cmp::Ordering::Greater => older += 1, + std::cmp::Ordering::Equal => same += 1, + } + } + } + } + let chance = (older + 1) as f32 / (older + same + 1) as f32; + let modifier = if own == 0 { 0.75 } else { 1.0 }; + if self.random().next_float() < chance * chance * modifier { + if let Some(next) = self.copper_next(state) { + self.set_block_and_update(pos, next); + } + } + } + /// `WeatheringCopper.getNext` by registry naming. + pub(crate) fn copper_next(&self, state: BlockStateId) -> Option<BlockStateId> { + let b = self.b; + let name = &*b.table.info(b.block(state)).name; + let path = name.strip_prefix("minecraft:")?; + let next = if path == "copper_block" { + "exposed_copper".to_owned() + } else if let Some(rest) = path.strip_prefix("exposed_") { + format!("weathered_{rest}") + } else if let Some(rest) = path.strip_prefix("weathered_") { + format!("oxidized_{rest}") + } else if path.starts_with("oxidized_") || path.starts_with("waxed_") { + return None; + } else { + format!("exposed_{path}") + }; + let block = b.table.block_by_name(&format!("minecraft:{next}"))?; + Some(b.table.with_properties_of(block, state)) + } +} + +/// `Biome.Precipitation` at a position. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum PrecipitationKind { + None, + Rain, + Snow, +} +/// Biome answers for one precipitation tick (`ServerLevel.tickPrecipitation`). +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct Precipitation { + /// `getHeightmapPos(MOTION_BLOCKING, pos)`. + pub top: BlockPos, + /// `biome.shouldFreeze(level, top.below())`. + pub freezes_below: bool, + /// `biome.shouldSnow(level, top)`. + pub snows_at_top: bool, + /// `biome.getPrecipitationAt(top.below(), seaLevel)`. + pub kind: PrecipitationKind, +} + +impl Behaviours { + /// Run due scheduled ticks for the level's current game time, in vanilla + /// order: block ticks then fluid ticks (65536 each at most). + pub fn tick_scheduled<L: LevelAccess + ?Sized>(&self, level: &mut L, ticks: &mut Ticks) { + let time = level.game_time(); + ticks.handling_tick = true; + { + let level_ref: &L = level; + if ticks + .blocks + .begin_tick(time, 65536, |chunk: ChunkPos| { + level_ref.is_ticking_chunk(chunk) + }) + .is_err() + { + ticks.handling_tick = false; + return; + } + } + while let Ok(Some(tick)) = ticks.blocks.next_tick() { + let mut sim = self.sim(level, ticks); + let state = sim.state(tick.pos); + if u32::from(self.block(state).0) == tick.kind.0 { + sim.tick_block(state, tick.pos); + } + } + let _ = ticks.blocks.finish_tick(); + { + let level_ref: &L = level; + if ticks + .fluids + .begin_tick(time, 65536, |chunk: ChunkPos| { + level_ref.is_ticking_chunk(chunk) + }) + .is_err() + { + ticks.handling_tick = false; + return; + } + } + while let Ok(Some(tick)) = ticks.fluids.next_tick() { + let mut sim = self.sim(level, ticks); + let fluid = self.fluid(sim.state(tick.pos)).kind(); + if TickTypeId(fluid as u32) == tick.kind { + sim.fluid_tick(tick.pos); + } + } + let _ = ticks.fluids.finish_tick(); + ticks.handling_tick = false; + } + /// Random-tick one chunk (`ServerLevel.tickChunk` block part). `sections` + /// yields the minimum block Y of every section the caller considers + /// randomly ticking (vanilla: sections containing randomly-ticking states), + /// in ascending order. Draws `randomTickSpeed` positions per section. + pub fn tick_chunk_random<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + chunk: ChunkPos, + sections: impl IntoIterator<Item = i32>, + ) { + let speed = level.game_rules().random_tick_speed; + if speed <= 0 { + return; + } + let (min_x, min_z) = (chunk.x * 16, chunk.z * 16); + for _ in 0..speed { + if level.random().next_int_bound(48).unwrap_or(1) == 0 { + let pos = ticks.block_random_pos(min_x, 0, min_z, 15); + if let Some(info) = level.precipitation(pos) { + self.sim(level, ticks).precipitation_tick(info); + } + } + } + for min_y in sections { + for _ in 0..speed { + let pos = ticks.block_random_pos(min_x, min_y, min_z, 15); + self.sim(level, ticks).random_tick_at(pos); + } + } + } + /// Random-tick a single position (block then fluid), as `tickChunk` does. + pub fn random_tick<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + pos: BlockPos, + ) { + self.sim(level, ticks).random_tick_at(pos); + } + /// Run one scheduled block tick at `pos` immediately (no queue check). + pub fn scheduled_block_tick<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + pos: BlockPos, + ) { + let mut sim = self.sim(level, ticks); + let state = sim.state(pos); + sim.tick_block(state, pos); + } + /// Run one scheduled fluid tick at `pos` immediately. + pub fn scheduled_fluid_tick<L: LevelAccess + ?Sized>( + &self, + level: &mut L, + ticks: &mut Ticks, + pos: BlockPos, + ) { + self.sim(level, ticks).fluid_tick(pos); + } +} diff --git a/crates/horizon-world/src/level/ticks.rs b/crates/horizon-world/src/level/ticks.rs new file mode 100644 index 000000000..c6be4282f --- /dev/null +++ b/crates/horizon-world/src/level/ticks.rs @@ -0,0 +1,141 @@ +//! Per-level mutable simulation state: scheduled block and fluid ticks plus the +//! in-flight neighbour-update queue and the random-tick position generator. +use super::{states::BlockId, update::NeighborUpdater}; +use crate::fluid::FluidKind; +use horizon_core::{ + position::{BlockPos, ChunkPos}, + ticks::{ + ChunkTicks, LevelTicks, ScheduleResult, ScheduledTick, TickError, TickPriority, TickTypeId, + }, +}; + +/// Owned by the caller next to its chunk storage. Chunks must be registered +/// with [`Ticks::add_chunk`] before ticks can be scheduled in them, mirroring +/// vanilla's `LevelTicks.allContainers` (scheduling elsewhere is dropped). +pub struct Ticks { + /// Block ticks keyed by `BlockId` (vanilla Block registry ID). + pub blocks: LevelTicks, + /// Fluid ticks keyed by vanilla Fluid registry ID (`FluidKind as u32`). + pub fluids: LevelTicks, + sub_tick: i64, + /// `Level.randValue`, the LCG behind `getBlockRandomPos`. + pub random_tick_value: i32, + pub(crate) updater: NeighborUpdater, + /// `ComparatorBlockEntity.output` per comparator position (block-entity + /// state owned by the level; persist it with the chunk if desired). + pub comparator_outputs: std::collections::HashMap<BlockPos, i32>, + /// `RedstoneTorchBlock.RECENT_TOGGLES` (position, game time). + pub torch_toggles: Vec<(BlockPos, i64)>, + /// Moving-piston block entities in ticker order (render and collide + /// moving blocks from these; see `piston_shape`). + pub moving_pistons: Vec<(BlockPos, super::pistons::MovingPiston)>, + pub(crate) next_block_entity_id: u64, + /// `ServerLevel.blockEvents`, run by `Behaviours::run_block_events`. + pub block_events: Vec<super::pistons::BlockEventData>, + /// `ServerLevel.isHandlingTick` (true while scheduled ticks run). + pub(crate) handling_tick: bool, +} +impl Default for Ticks { + fn default() -> Self { + Self::new(0) + } +} +impl Ticks { + /// `random_tick_seed` seeds `Level.randValue` (vanilla draws it from a + /// thread-local random at level construction). + pub fn new(random_tick_seed: i32) -> Self { + Self { + blocks: LevelTicks::default(), + fluids: LevelTicks::default(), + sub_tick: 0, + random_tick_value: random_tick_seed, + updater: NeighborUpdater::default(), + comparator_outputs: Default::default(), + torch_toggles: Vec::new(), + moving_pistons: Vec::new(), + next_block_entity_id: 0, + block_events: Vec::new(), + handling_tick: false, + } + } + /// Register a loaded chunk's saved block and fluid ticks. + pub fn add_chunk( + &mut self, + pos: ChunkPos, + blocks: ChunkTicks, + fluids: ChunkTicks, + ) -> Result<(), TickError> { + self.blocks.add_chunk(pos, blocks)?; + self.fluids.add_chunk(pos, fluids) + } + /// Register a chunk without saved ticks. + pub fn add_empty_chunk(&mut self, pos: ChunkPos) -> Result<(), TickError> { + self.add_chunk(pos, ChunkTicks::default(), ChunkTicks::default()) + } + pub fn remove_chunk(&mut self, pos: ChunkPos) -> (Option<ChunkTicks>, Option<ChunkTicks>) { + (self.blocks.remove_chunk(pos), self.fluids.remove_chunk(pos)) + } + /// `ServerLevel.nextSubTickCount`, shared by block and fluid ticks. + pub fn next_sub_tick(&mut self) -> i64 { + let value = self.sub_tick; + self.sub_tick = self.sub_tick.wrapping_add(1); + value + } + pub fn schedule_block( + &mut self, + game_time: i64, + pos: BlockPos, + block: BlockId, + delay: i32, + priority: TickPriority, + ) -> ScheduleResult { + let tick = ScheduledTick { + kind: TickTypeId(u32::from(block.0)), + pos, + trigger_tick: game_time.wrapping_add(i64::from(delay)), + priority, + sub_tick_order: self.next_sub_tick(), + }; + self.blocks.schedule(tick) + } + pub fn schedule_fluid( + &mut self, + game_time: i64, + pos: BlockPos, + fluid: FluidKind, + delay: i32, + ) -> ScheduleResult { + let tick = ScheduledTick { + kind: TickTypeId(fluid as u32), + pos, + trigger_tick: game_time.wrapping_add(i64::from(delay)), + priority: TickPriority::Normal, + sub_tick_order: self.next_sub_tick(), + }; + self.fluids.schedule(tick) + } + pub fn has_block_tick(&self, pos: BlockPos, block: BlockId) -> bool { + self.blocks + .has_scheduled(pos, TickTypeId(u32::from(block.0))) + } + pub fn has_fluid_tick(&self, pos: BlockPos, fluid: FluidKind) -> bool { + self.fluids.has_scheduled(pos, TickTypeId(fluid as u32)) + } + pub fn will_block_tick_this_tick(&mut self, pos: BlockPos, block: BlockId) -> bool { + self.blocks + .will_tick_this_tick(pos, TickTypeId(u32::from(block.0))) + } + /// `Level.getBlockRandomPos`. + pub fn block_random_pos(&mut self, x: i32, y: i32, z: i32, y_mask: i32) -> BlockPos { + self.random_tick_value = self + .random_tick_value + .wrapping_mul(3) + .wrapping_add(1_013_904_223); + let value = self.random_tick_value >> 2; + BlockPos::new( + x + (value & 15), + y + ((value >> 16) & y_mask), + z + ((value >> 8) & 15), + ) + } +} diff --git a/crates/horizon-world/src/level/update.rs b/crates/horizon-world/src/level/update.rs new file mode 100644 index 000000000..b981e1a6f --- /dev/null +++ b/crates/horizon-world/src/level/update.rs @@ -0,0 +1,547 @@ +//! `Level.setBlock`, `LevelChunk.setBlockState` and the +//! `CollectingNeighborUpdater` that orders neighbour and shape updates. +use super::{LevelAccess, LevelEvent, Sim, flags, states::BlockId}; +use crate::{fluid::FluidState, registry::BlockStateId}; +use horizon_core::{ + geometry::Direction, + position::BlockPos, + random::LegacyRandom, + ticks::{ScheduleResult, TickPriority}, +}; + +/// `NeighborUpdater.UPDATE_ORDER`. +pub(crate) const UPDATE_ORDER: [Direction; 6] = [ + Direction::West, + Direction::East, + Direction::Down, + Direction::Up, + Direction::North, + Direction::South, +]; +/// `BlockBehaviour.UPDATE_SHAPE_ORDER`. +pub(crate) const UPDATE_SHAPE_ORDER: [Direction; 6] = [ + Direction::West, + Direction::East, + Direction::North, + Direction::South, + Direction::Down, + Direction::Up, +]; +pub(crate) const HORIZONTAL: [Direction; 4] = [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, +]; + +/// `MinecraftServer.getMaxChainedNeighborUpdates` default. +const MAX_CHAINED_NEIGHBOR_UPDATES: i32 = 1_000_000; + +pub(crate) fn rel(pos: BlockPos, direction: Direction) -> BlockPos { + let [x, y, z] = direction.normal(); + pos.offset(x, y, z) +} +pub(crate) fn above(pos: BlockPos) -> BlockPos { + pos.offset(0, 1, 0) +} +pub(crate) fn below(pos: BlockPos) -> BlockPos { + pos.offset(0, -1, 0) +} + +#[derive(Clone, Copy, Debug)] +enum Update { + Shape { + direction: Direction, + neighbor_state: BlockStateId, + pos: BlockPos, + neighbor_pos: BlockPos, + flags: i32, + limit: i32, + }, + Simple { + pos: BlockPos, + block: BlockId, + }, + Full { + state: BlockStateId, + pos: BlockPos, + block: BlockId, + moved: bool, + }, + Multi { + source: BlockPos, + block: BlockId, + skip: Option<Direction>, + index: usize, + }, +} + +enum Step { + Shape { + direction: Direction, + neighbor_state: BlockStateId, + pos: BlockPos, + neighbor_pos: BlockPos, + flags: i32, + limit: i32, + }, + Neighbor { + state: Option<BlockStateId>, + pos: BlockPos, + block: BlockId, + moved: bool, + }, +} + +#[derive(Default)] +pub(crate) struct NeighborUpdater { + stack: Vec<Update>, + added: Vec<Update>, + count: i32, +} + +impl Update { + /// `runNext`: the update to execute now and whether more remain. + fn next(&mut self) -> (Step, bool) { + match *self { + Self::Shape { + direction, + neighbor_state, + pos, + neighbor_pos, + flags, + limit, + } => ( + Step::Shape { + direction, + neighbor_state, + pos, + neighbor_pos, + flags, + limit, + }, + false, + ), + Self::Simple { pos, block } => ( + Step::Neighbor { + state: None, + pos, + block, + moved: false, + }, + false, + ), + Self::Full { + state, + pos, + block, + moved, + } => ( + Step::Neighbor { + state: Some(state), + pos, + block, + moved, + }, + false, + ), + Self::Multi { + source, + block, + skip, + ref mut index, + } => { + let direction = UPDATE_ORDER[*index]; + *index += 1; + if *index < UPDATE_ORDER.len() && Some(UPDATE_ORDER[*index]) == skip { + *index += 1; + } + ( + Step::Neighbor { + state: None, + pos: rel(source, direction), + block, + moved: false, + }, + *index < UPDATE_ORDER.len(), + ) + } + } + } +} + +impl<L: LevelAccess + ?Sized> Sim<'_, L> { + pub fn state(&self, pos: BlockPos) -> BlockStateId { + self.level.block_state(pos) + } + pub fn fluid_at(&self, pos: BlockPos) -> FluidState { + self.b.fluid(self.state(pos)) + } + pub fn random(&mut self) -> &mut LegacyRandom { + self.level.random() + } + pub fn emit(&mut self, event: LevelEvent) { + self.level.emit(event); + } + pub fn level_event(&mut self, id: i32, pos: BlockPos, data: i32) { + self.level.emit(LevelEvent::LevelEvent { id, pos, data }); + } + pub fn sound(&mut self, pos: BlockPos, sound: &std::sync::Arc<str>, volume: f32, pitch: f32) { + self.level.emit(LevelEvent::Sound { + pos, + sound: sound.clone(), + volume, + pitch, + }); + } + pub fn game_event(&mut self, pos: BlockPos, event: &'static str) { + self.level.emit(LevelEvent::GameEvent { pos, event }); + } + pub fn block_of(&self, state: BlockStateId) -> BlockId { + self.b.table.block(state) + } + pub fn is_in_valid_bounds(&self, pos: BlockPos) -> bool { + pos.y >= self.level.min_y() + && pos.y < self.level.max_y() + && (-30_000_000..30_000_000).contains(&pos.x) + && (-30_000_000..30_000_000).contains(&pos.z) + } + + // ---- scheduled ticks ---- + pub fn schedule_tick(&mut self, pos: BlockPos, block: BlockId, delay: i32) -> ScheduleResult { + self.schedule_tick_priority(pos, block, delay, TickPriority::Normal) + } + pub fn schedule_tick_priority( + &mut self, + pos: BlockPos, + block: BlockId, + delay: i32, + priority: TickPriority, + ) -> ScheduleResult { + let time = self.level.game_time(); + self.ticks.schedule_block(time, pos, block, delay, priority) + } + pub fn schedule_fluid_tick( + &mut self, + pos: BlockPos, + fluid: crate::fluid::FluidKind, + delay: i32, + ) -> ScheduleResult { + let time = self.level.game_time(); + self.ticks.schedule_fluid(time, pos, fluid, delay) + } + + // ---- Level.setBlock ---- + pub fn set_block(&mut self, pos: BlockPos, state: BlockStateId, flags: i32) -> bool { + self.set_block_limit(pos, state, flags, flags::UPDATE_LIMIT) + } + pub fn set_block_and_update(&mut self, pos: BlockPos, state: BlockStateId) -> bool { + self.set_block(pos, state, flags::UPDATE_ALL) + } + pub fn set_block_limit( + &mut self, + pos: BlockPos, + state: BlockStateId, + update_flags: i32, + limit: i32, + ) -> bool { + if !self.is_in_valid_bounds(pos) || !self.level.is_loaded(pos) { + return false; + } + let Some(old) = self.chunk_set_block_state(pos, state, update_flags) else { + return false; + }; + let new = self.state(pos); + if new == state { + if update_flags & flags::UPDATE_NEIGHBORS != 0 { + let old_block = self.block_of(old); + self.update_neighbors_at(pos, old_block); + if self + .b + .has_flag(state, super::data::state_flags::ANALOG_OUTPUT) + { + let block = self.block_of(state); + self.update_neighbour_for_output_signal(pos, block); + } + } + if update_flags & flags::UPDATE_KNOWN_SHAPE == 0 && limit > 0 { + let neighbour_flags = + update_flags & !(flags::UPDATE_NEIGHBORS | flags::UPDATE_SUPPRESS_DROPS); + self.update_indirect_neighbour_shapes(old, pos, neighbour_flags, limit - 1); + self.update_neighbour_shapes(state, pos, neighbour_flags, limit - 1); + self.update_indirect_neighbour_shapes(state, pos, neighbour_flags, limit - 1); + } + } + true + } + /// `LevelChunk.setBlockState`: the previous state when the write happened. + fn chunk_set_block_state( + &mut self, + pos: BlockPos, + state: BlockStateId, + update_flags: i32, + ) -> Option<BlockStateId> { + let current = self.state(pos); + if current == state { + return None; + } + let old = self.level.set_raw(pos, state)?; + if old == state { + return None; + } + let new_block = self.block_of(state); + let block_changed = self.block_of(old) != new_block; + if block_changed && self.block_of(old) == self.b.named.moving_piston { + // PistonMovingBlockEntity.preRemoveSideEffects -> finalTick; the + // block is already replaced, so only the entity goes away. + self.remove_moving_piston(pos); + } + let moved = update_flags & flags::UPDATE_MOVE_BY_PISTON != 0; + if (block_changed + || self + .b + .block_data(new_block) + .is(super::classes::Class::BaseRail)) + && (update_flags & flags::UPDATE_NEIGHBORS != 0 || moved) + { + self.affect_neighbors_after_removal(old, pos, moved); + } + if self.block_of(self.state(pos)) != new_block { + return None; + } + if update_flags & flags::UPDATE_SKIP_ON_PLACE == 0 { + self.on_place(state, pos, old, moved); + } + Some(old) + } + /// `Level.removeBlock`. + pub fn remove_block(&mut self, pos: BlockPos, moved_by_piston: bool) -> bool { + let fluid = self.fluid_at(pos); + let legacy = self.b.legacy_block(fluid); + self.set_block(pos, legacy, 3 | if moved_by_piston { 64 } else { 0 }) + } + /// `Level.destroyBlock(pos, dropResources, null, limit)`. + pub fn destroy_block(&mut self, pos: BlockPos, drop: bool, limit: i32) -> bool { + let state = self.state(pos); + if self.b.is_air(state) { + return false; + } + self.level_event(2001, pos, state.0 as i32); + if drop { + self.drop_resources(state, pos); + } + let fluid = self.fluid_at(pos); + let legacy = self.b.legacy_block(fluid); + let destroyed = self.set_block_limit(pos, legacy, 3, limit); + if destroyed { + self.game_event(pos, "minecraft:block_destroy"); + } + destroyed + } + pub fn drop_resources(&mut self, state: BlockStateId, pos: BlockPos) { + if self.level.game_rules().block_drops { + self.emit(LevelEvent::DropResources { pos, state }); + } + } + /// `Block.updateOrDestroy`. + pub fn update_or_destroy( + &mut self, + old: BlockStateId, + new: BlockStateId, + pos: BlockPos, + update_flags: i32, + limit: i32, + ) { + if new != old { + if self.b.is_air(new) { + self.destroy_block(pos, update_flags & flags::UPDATE_SUPPRESS_DROPS == 0, limit); + } else { + self.set_block_limit( + pos, + new, + update_flags & !flags::UPDATE_SUPPRESS_DROPS, + limit, + ); + } + } + } + /// `Block.updateFromNeighbourShapes`. + pub fn update_from_neighbour_shapes( + &mut self, + state: BlockStateId, + pos: BlockPos, + ) -> BlockStateId { + let mut new = state; + for direction in UPDATE_SHAPE_ORDER { + let neighbour = rel(pos, direction); + let neighbour_state = self.state(neighbour); + new = self.update_shape(new, pos, direction, neighbour, neighbour_state); + } + new + } + /// `BlockStateBase.updateNeighbourShapes`. + pub fn update_neighbour_shapes( + &mut self, + state: BlockStateId, + pos: BlockPos, + update_flags: i32, + limit: i32, + ) { + for direction in UPDATE_SHAPE_ORDER { + let neighbour = rel(pos, direction); + self.neighbor_shape_changed( + direction.opposite(), + neighbour, + pos, + state, + update_flags, + limit, + ); + } + } + + // ---- neighbour updater ---- + pub fn update_neighbors_at(&mut self, pos: BlockPos, block: BlockId) { + self.add_and_run(Update::Multi { + source: pos, + block, + skip: None, + index: 0, + }); + } + pub fn update_neighbors_at_except(&mut self, pos: BlockPos, block: BlockId, skip: Direction) { + let index = usize::from(UPDATE_ORDER[0] == skip); + self.add_and_run(Update::Multi { + source: pos, + block, + skip: Some(skip), + index, + }); + } + pub fn neighbor_changed_at(&mut self, pos: BlockPos, block: BlockId) { + self.add_and_run(Update::Simple { pos, block }); + } + pub fn neighbor_changed_full( + &mut self, + state: BlockStateId, + pos: BlockPos, + block: BlockId, + moved: bool, + ) { + self.add_and_run(Update::Full { + state, + pos, + block, + moved, + }); + } + pub fn neighbor_shape_changed( + &mut self, + direction: Direction, + pos: BlockPos, + neighbor_pos: BlockPos, + neighbor_state: BlockStateId, + update_flags: i32, + limit: i32, + ) { + self.add_and_run(Update::Shape { + direction, + neighbor_state, + pos, + neighbor_pos, + flags: update_flags, + limit, + }); + } + fn add_and_run(&mut self, update: Update) { + let updater = &mut self.ticks.updater; + let running = updater.count > 0; + let too_many = updater.count >= MAX_CHAINED_NEIGHBOR_UPDATES; + updater.count += 1; + if !too_many { + if running { + updater.added.push(update); + } else { + updater.stack.push(update); + } + } + if !running { + self.run_updates(); + } + } + fn run_updates(&mut self) { + loop { + let updater = &mut self.ticks.updater; + if updater.stack.is_empty() && updater.added.is_empty() { + break; + } + while let Some(update) = updater.added.pop() { + updater.stack.push(update); + } + while let Some(top) = self.ticks.updater.stack.last_mut() { + let (step, more) = top.next(); + self.execute(step); + if !more { + self.ticks.updater.stack.pop(); + break; + } + if !self.ticks.updater.added.is_empty() { + break; + } + } + } + let updater = &mut self.ticks.updater; + updater.stack.clear(); + updater.added.clear(); + updater.count = 0; + } + fn execute(&mut self, step: Step) { + match step { + Step::Shape { + direction, + neighbor_state, + pos, + neighbor_pos, + flags: update_flags, + limit, + } => { + let current = self.state(pos); + if update_flags & flags::UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE == 0 + || !self.b.table.is(current, self.b.named.redstone_wire) + { + let new = + self.update_shape(current, pos, direction, neighbor_pos, neighbor_state); + self.update_or_destroy(current, new, pos, update_flags, limit); + } + } + Step::Neighbor { + state, + pos, + block, + moved, + } => { + let state = state.unwrap_or_else(|| self.state(pos)); + self.neighbor_changed(state, pos, block, moved); + } + } + } + /// `Level.updateNeighbourForOutputSignal`. + pub fn update_neighbour_for_output_signal(&mut self, pos: BlockPos, block: BlockId) { + for direction in super::update::HORIZONTAL { + let mut relative = rel(pos, direction); + if !self.level.is_loaded(relative) { + continue; + } + let mut state = self.state(relative); + if self.b.table.is(state, self.b.named.comparator) { + self.neighbor_changed_full(state, relative, block, false); + } else if self.is_redstone_conductor(state, relative) { + relative = rel(relative, direction); + state = self.state(relative); + if self.b.table.is(state, self.b.named.comparator) { + self.neighbor_changed_full(state, relative, block, false); + } + } + } + } +} diff --git a/crates/horizon-world/src/lib.rs b/crates/horizon-world/src/lib.rs new file mode 100644 index 000000000..bf49481b1 --- /dev/null +++ b/crates/horizon-world/src/lib.rs @@ -0,0 +1,140 @@ +//! Vanilla-compatible world data for Horizon. This crate does not run gameplay. +#![forbid(unsafe_code)] + +pub mod active_effect_tick; +pub mod active_effects; +pub mod attribute_health; +pub mod attribute_map; +pub mod attribute_updates; +pub mod attributes; +pub mod block_collision; +pub mod block_collision_scan; +pub mod block_entities; +pub mod block_entity_push; +pub mod block_landing; +pub mod block_placement; +pub mod block_properties; +pub mod block_render; +pub mod block_support; +pub mod block_survival; +pub mod blocking_item_damage; +pub mod blocking_rules; +pub mod bundle_weight; +pub mod chunk; +pub mod chunk_status; +pub mod climbing; +pub mod collision; +pub mod collision_context; +pub mod combat_rules; +pub mod component_durability; +pub mod component_patch; +pub mod compression; +pub mod consumable; +pub mod consume_effect; +pub mod damage_immunity; +pub mod damage_reduction; +pub mod damage_source; +pub mod dynamic_support; +pub mod edge_backoff; +pub mod effect_attribute_modifiers; +pub mod effect_notifications; +pub mod effect_particles; +pub mod effect_sync; +pub mod entity_collision; +pub mod entity_fluid; +pub mod entity_fluid_tick; +pub mod entity_move; +pub mod entity_obstruction; +pub mod extra_items; +pub mod fall_damage; +pub mod fluid; +pub mod fluid_box; +pub mod fluid_flow; +pub mod fluid_occupancy; +pub mod fluid_shape; +pub mod food; +pub mod food_properties; +pub mod food_storage; +pub mod free_space; +pub mod ground_support; +pub mod heightmap; +pub mod identifier; +pub mod interaction_shapes; +pub mod item_after_use; +pub mod item_blocking; +pub mod item_cooldowns; +pub mod item_durability; +pub mod item_particles; +pub mod item_stack_storage; +pub mod item_template; +pub mod item_use; +pub mod item_use_catalog; +pub mod item_use_lifecycle; +pub mod item_use_start; +pub mod java_hash_map; +pub mod level; +pub mod liquid_collision; +pub mod live_attribute_updates; +pub mod living_air; +pub mod living_damage; +pub mod living_fall; +pub mod living_fluid; +pub mod living_health; +pub mod living_hurt; +pub mod living_landing; +pub mod living_motion; +pub mod movement_emission; +pub mod movement_properties; +pub mod movement_restitution; +pub mod movement_statistics; +pub mod movement_support; +pub mod nbt; +pub mod object_open_map; +pub mod object_open_set; +pub mod piston_movement; +pub mod piston_shape; +pub mod player_food; +pub mod player_health; +pub mod player_hurt; +pub mod player_travel; +pub mod powder_snow_collision; +pub mod region; +pub mod registry; +pub mod registry_collision_scan; +pub mod registry_fall_ray; +pub mod registry_fluid; +pub mod retrogen; +pub mod server_player_combat; +pub mod server_player_damage; +pub mod stored_consume; +pub mod stored_effect_attributes; +pub mod suffocation; +pub mod swimming; +pub mod synced_floats; +pub mod teleport_consume; +pub mod tick_data; +pub mod use_remainder; +pub mod view_direction; +pub mod water_splash; +pub mod world_movement; +pub mod world_ray; +pub mod worldgen; + +pub const DATA_VERSION: i32 = 5023; + +pub mod item_stack_refs; +pub mod simple_container; + +pub mod player_inventory; + +pub mod inventory_pickup; + +pub mod inventory_tick; + +pub mod player_equipment; + +pub mod living_use_flags; +pub mod status_effect; +pub mod synced_values; + +pub mod inventory_use; diff --git a/crates/horizon-world/src/liquid_collision.rs b/crates/horizon-world/src/liquid_collision.rs new file mode 100644 index 000000000..89bc88f62 --- /dev/null +++ b/crates/horizon-world/src/liquid_collision.rs @@ -0,0 +1,63 @@ +//! Contextual water/lava collision selection. Fluid simulation and entity-specific +//! standing shapes are supplied by the caller; no-context caches are not used. +use crate::{ + chunk::BlockState, collision_context::CollisionContext, entity_obstruction::EntityIdentity, + fluid::FluidState, +}; +use horizon_core::{geometry::VoxelShape, position::BlockPos}; +use std::io; + +pub trait LiquidCollisionWorld { + type Error; + fn entity_liquid_shape(&mut self, entity: EntityIdentity) -> Result<VoxelShape, Self::Error>; + fn fluid(&mut self, position: BlockPos) -> Result<FluidState, Self::Error>; + fn entity_can_stand( + &mut self, + entity: EntityIdentity, + fluid: FluidState, + ) -> Result<bool, Self::Error>; +} + +#[derive(Clone, Copy, Debug)] +pub struct LiquidCollision { + fluid: FluidState, +} +impl LiquidCollision { + pub fn from_state(state: &BlockState) -> io::Result<Option<Self>> { + if !matches!(state.name.as_str(), "minecraft:water" | "minecraft:lava") { + return Ok(None); + } + Ok(Some(Self { + fluid: FluidState::from_block(state)?, + })) + } + + pub fn shape<W: LiquidCollisionWorld>( + &self, + world: &mut W, + position: BlockPos, + context: &CollisionContext<'_>, + ) -> Result<VoxelShape, W::Error> { + if context.always_collide_with_fluid() { + return Ok(VoxelShape::block()); + } + if !self.fluid.is_source() { + return Ok(VoxelShape::empty()); + } + let Some(entity) = context.living_entity() else { + return Ok(VoxelShape::empty()); + }; + let shape = world.entity_liquid_shape(entity)?; + if context.is_above(&shape, position, true) { + // The above-block query precedes the entity callback, even if the + // candidate shape is empty or the two fluid types are equivalent. + let above = world.fluid(position.offset(0, 1, 0))?; + if context.can_stand_on_fluid(above, self.fluid, |entity, fluid| { + world.entity_can_stand(entity, fluid) + })? { + return Ok(shape); + } + } + Ok(VoxelShape::empty()) + } +} diff --git a/crates/horizon-world/src/live_attribute_updates.rs b/crates/horizon-world/src/live_attribute_updates.rs new file mode 100644 index 000000000..632a41438 --- /dev/null +++ b/crates/horizon-world/src/live_attribute_updates.rs @@ -0,0 +1,85 @@ +//! LivingEntity query/refresh dispatch over registered live attribute storage. +use crate::{ + attribute_map::ValueKind, + attribute_updates::{self, UpdateWorld, UpdatedAttribute}, + attributes::live::{Error, Handle, Key, LiveAttributes}, + object_open_set::CursorError, +}; + +/// Entity handles keep a captured map alive even if a callback changes the +/// entity's current attributes. Map and instance accessors are direct storage +/// reads; virtual entity methods remain explicit dispatch points. +pub trait LiveAttributeWorld: UpdateWorld<Key> { + type Identity: FnMut() -> i32; + fn get_attributes(&mut self) -> Result<Self::Attributes, Self::Error>; + fn live_attributes(&self, map: Self::Attributes) -> &LiveAttributes<Self::Identity>; + fn live_attributes_mut(&mut self, map: Self::Attributes) + -> &mut LiveAttributes<Self::Identity>; + /// Resolve the queued instance itself, including an instance from another + /// map if a caller has explicitly placed it in this map's pending set. + fn instance_attribute(&self, instance: Option<Handle>) -> Result<Key, Self::Error>; + fn attribute_error(error: Error) -> Self::Error; + fn cursor_error(error: CursorError) -> Self::Error; + fn dispatch_attribute_updated(&mut self, attribute: Key) -> Result<(), Self::Error> + where + Self: Sized, + { + attribute_updates::updated(self, attribute) + } +} + +/// Registered holder names are unique in a catalog. This classifier is for +/// registered attributes; custom holder dispatch can implement UpdateWorld. +pub fn kind(attribute: &Key) -> UpdatedAttribute { + match attribute.name() { + "minecraft:max_health" => UpdatedAttribute::MaxHealth, + "minecraft:max_absorption" => UpdatedAttribute::MaxAbsorption, + "minecraft:scale" => UpdatedAttribute::Scale, + "minecraft:waypoint_transmit_range" => UpdatedAttribute::WaypointRange, + _ => UpdatedAttribute::Other, + } +} + +/// Base body of getAttributeValue/getAttributeBaseValue, including the virtual +/// getAttributes call. Querying defaults does not create instances. +pub fn value<W: LiveAttributeWorld>( + world: &mut W, + attribute: Option<Key>, + kind: ValueKind, +) -> Result<f64, W::Error> { + let map = world.get_attributes()?; + value_in(world, map, attribute, kind) +} + +/// Query an already captured map, as used by waypoint updates after their +/// direct attributes-field read. This does not call virtual getAttributes. +pub fn value_in<W: LiveAttributeWorld>( + world: &mut W, + map: W::Attributes, + attribute: Option<Key>, + kind: ValueKind, +) -> Result<f64, W::Error> { + world + .live_attributes_mut(map) + .value(attribute, kind) + .map_err(W::attribute_error) +} + +/// Base private refresh body for concrete registered AttributeMaps. Callbacks +/// may change map selection or mutate the captured pending set. Clear that set +/// only after the live cursor and every attribute callback finish successfully. +pub fn refresh<W: LiveAttributeWorld>(world: &mut W) -> Result<(), W::Error> { + let map = world.get_attributes()?; + let mut cursor = world.live_attributes(map).updates().cursor(); + while cursor.has_next() { + let instance = world + .live_attributes(map) + .updates() + .next(&mut cursor) + .map_err(W::cursor_error)?; + let attribute = world.instance_attribute(instance)?; + world.dispatch_attribute_updated(attribute)?; + } + world.live_attributes_mut(map).updates_mut().clear(); + Ok(()) +} diff --git a/crates/horizon-world/src/living_air.rs b/crates/horizon-world/src/living_air.rs new file mode 100644 index 000000000..dec52f4bc --- /dev/null +++ b/crates/horizon-world/src/living_air.rs @@ -0,0 +1,171 @@ +//! LivingEntity walking, climbing and airborne velocity integration. +use horizon_core::{ + geometry::{Vec3, trig}, + position::BlockPos, +}; + +pub trait LivingAirWorld { + type Error; + fn movement_support_position(&mut self) -> Result<BlockPos, Self::Error>; + fn on_ground(&mut self) -> Result<bool, Self::Error>; + fn block_friction(&mut self, position: BlockPos) -> Result<f32, Self::Error>; + fn friction_modifier(&mut self) -> Result<f64, Self::Error>; + fn speed(&mut self) -> Result<f32, Self::Error>; + /// Includes entity-type overrides (notably Player). + fn flying_speed(&mut self) -> Result<f32, Self::Error>; + fn yaw(&mut self) -> Result<f32, Self::Error>; + fn velocity(&self) -> Vec3; + fn set_velocity(&mut self, velocity: Vec3) -> Result<(), Self::Error>; + fn on_climbable(&mut self) -> Result<bool, Self::Error>; + fn reset_fall_distance(&mut self) -> Result<(), Self::Error>; + fn in_scaffolding(&mut self) -> Result<bool, Self::Error>; + fn suppressing_ladder_slide(&mut self) -> Result<bool, Self::Error>; + fn is_player_class(&self) -> bool; + /// Bind to Entity.move(SELF, movement), including collision and landing. + fn move_self(&mut self, movement: Vec3) -> Result<(), Self::Error>; + fn horizontal_collision(&self) -> bool; + fn jumping(&self) -> bool; + fn was_in_powder_snow(&self) -> bool; + fn can_walk_powder_snow(&mut self) -> Result<bool, Self::Error>; + fn levitation_amplifier(&mut self) -> Result<Option<i32>, Self::Error>; + fn is_client_side(&mut self) -> Result<bool, Self::Error>; + fn has_chunk_at(&mut self, position: BlockPos) -> Result<bool, Self::Error>; + fn effective_gravity(&mut self) -> Result<f64, Self::Error>; + fn y(&self) -> f64; + fn minimum_y(&mut self) -> Result<i32, Self::Error>; + fn discard_friction(&mut self) -> Result<bool, Self::Error>; + fn air_drag_modifier(&mut self) -> Result<f64, Self::Error>; + fn omnidirectional_air_mover(&mut self) -> Result<bool, Self::Error>; +} + +pub fn modified_friction(friction: f32, modifier: f32) -> f32 { + (1.0 - (1.0 - friction) * modifier).clamp(0.0, 1.0) +} +/// Entity.getInputVector: normalize only above unit length, then rotate using +/// the native float-angle sine table. Tiny input returns canonical positive zero. +pub fn input_vector(input: Vec3, speed: f32, yaw: f32) -> Vec3 { + let length = input.length_squared(); + if length < 1.0e-7 { + return Vec3::ZERO; + } + let input = if length > 1.0 { + input.normalize() + } else { + input + }; + let input = input.scale(f64::from(speed)); + let angle = f64::from(yaw * trig::DEG_TO_RAD); + let sin = f64::from(trig::sin(angle)); + let cos = f64::from(trig::cos(angle)); + Vec3::new( + input.x * cos - input.z * sin, + input.y, + input.z * cos + input.x * sin, + ) +} +pub fn move_relative<W: LivingAirWorld>( + world: &mut W, + input: Vec3, + speed: f32, +) -> Result<(), W::Error> { + let input = input_vector(input, speed, world.yaw()?); + let old = world.velocity(); + world.set_velocity(Vec3::new(old.x + input.x, old.y + input.y, old.z + input.z)) +} +pub fn handle_on_climbable<W: LivingAirWorld>( + world: &mut W, + mut velocity: Vec3, +) -> Result<Vec3, W::Error> { + if world.on_climbable()? { + world.reset_fall_distance()?; + let limit = f64::from(0.15f32); + velocity.x = velocity.x.clamp(-limit, limit); + velocity.z = velocity.z.clamp(-limit, limit); + // Math.max must propagate NaN. + if !velocity.y.is_nan() { + velocity.y = velocity.y.max(-limit); + } + if velocity.y < 0.0 + && !world.in_scaffolding()? + && world.suppressing_ladder_slide()? + && world.is_player_class() + { + velocity.y = 0.0; + } + } + Ok(velocity) +} +pub fn friction_influenced_speed<W: LivingAirWorld>( + world: &mut W, + friction: f32, +) -> Result<f32, W::Error> { + if world.on_ground()? { + let speed = world.speed()?; + if f64::from(friction) > 0.6 { + Ok(speed * (0.21600002f32 / (friction * friction * friction))) + } else { + Ok(speed) + } + } else { + world.flying_speed() + } +} +pub fn relative_friction_movement<W: LivingAirWorld>( + world: &mut W, + input: Vec3, + friction: f32, +) -> Result<Vec3, W::Error> { + let speed = friction_influenced_speed(world, friction)?; + move_relative(world, input, speed)?; + let velocity = handle_on_climbable(world, world.velocity())?; + world.set_velocity(velocity)?; + world.move_self(world.velocity())?; + let mut velocity = world.velocity(); + if (world.horizontal_collision() || world.jumping()) + && (world.on_climbable()? + || (world.was_in_powder_snow() && world.can_walk_powder_snow()?)) + { + velocity.y = 0.2; + } + Ok(velocity) +} +/// Ground friction is captured before movement; drag and gravity are queried +/// afterwards. This distinction preserves movement callbacks' field changes. +pub fn travel_in_air<W: LivingAirWorld>(world: &mut W, input: Vec3) -> Result<(), W::Error> { + let support = world.movement_support_position()?; + let friction = if world.on_ground()? { + let friction = world.block_friction(support)?; + modified_friction(friction, world.friction_modifier()? as f32) + } else { + 1.0 + }; + let mut velocity = relative_friction_movement(world, input, friction)?; + if let Some(amplifier) = world.levitation_amplifier()? { + velocity.y += (0.05 * f64::from(amplifier.wrapping_add(1)) - velocity.y) * 0.2; + } else if !world.is_client_side()? || world.has_chunk_at(support)? { + velocity.y -= world.effective_gravity()?; + } else { + let y = world.y(); + velocity.y = if y > f64::from(world.minimum_y()?) { + -0.1 + } else { + 0.0 + }; + } + if !world.discard_friction()? { + let modifier = world.air_drag_modifier()? as f32; + let drag = modified_friction(0.91, modifier); + let horizontal = friction * drag; + let vertical = if world.omnidirectional_air_mover()? { + drag + } else { + modified_friction(0.98, modifier) + }; + velocity = Vec3::new( + velocity.x * f64::from(horizontal), + velocity.y * f64::from(vertical), + velocity.z * f64::from(horizontal), + ); + } + world.set_velocity(velocity) +} diff --git a/crates/horizon-world/src/living_damage.rs b/crates/horizon-world/src/living_damage.rs new file mode 100644 index 000000000..9abf38199 --- /dev/null +++ b/crates/horizon-world/src/living_damage.rs @@ -0,0 +1,104 @@ +//! Inner living/player damage application after the outer hurt gates. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum DamageStat { + Absorbed, + DealtAbsorbed, + Taken, +} +pub trait DamageWorld { + type Error; + type Attacker: Copy; + fn invulnerable(&mut self) -> Result<bool, Self::Error>; + fn after_armor(&mut self, damage: f32) -> Result<f32, Self::Error>; + fn after_magic(&mut self, damage: f32) -> Result<f32, Self::Error>; + fn absorption(&mut self) -> Result<f32, Self::Error>; + fn set_absorption(&mut self, value: f32) -> Result<(), Self::Error>; + fn server_player_attacker(&mut self) -> Result<Option<Self::Attacker>, Self::Error>; + fn award_attacker( + &mut self, + attacker: Self::Attacker, + stat: DamageStat, + amount: i32, + ) -> Result<(), Self::Error>; + fn award_self(&mut self, stat: DamageStat, amount: i32) -> Result<(), Self::Error>; + fn source_food_exhaustion(&mut self) -> Result<f32, Self::Error>; + fn cause_food_exhaustion(&mut self, amount: f32) -> Result<(), Self::Error>; + fn record_damage(&mut self, amount: f32) -> Result<(), Self::Error>; + fn health(&mut self) -> Result<f32, Self::Error>; + fn set_health(&mut self, value: f32) -> Result<(), Self::Error>; + fn damage_event(&mut self) -> Result<(), Self::Error>; +} +pub(crate) fn positive(value: f32) -> f32 { + if value.is_nan() { + value + } else if value <= 0.0 { + 0.0 + } else { + value + } +} +pub(crate) fn stat_amount(value: f32) -> i32 { + let value = value * 10.0; + // Java Math.round(float), including negative ties and integer saturation. + let bits = value.to_bits() as i32; + let shift = 149 - ((bits >> 23) & 0xff); + if (0..32).contains(&shift) { + let mut significand = (bits & 0x7f_ffff) | 0x80_0000; + if bits < 0 { + significand = -significand; + } + ((significand >> shift) + 1) >> 1 + } else { + value as i32 + } +} +pub(crate) const STAT_LIMIT: f32 = 3.402_823_5e37; +pub fn actually_hurt<W: DamageWorld>( + world: &mut W, + damage: f32, + player: bool, +) -> Result<(), W::Error> { + if world.invulnerable()? { + return Ok(()); + } + actually_hurt_after_immunity_check(world, damage, player) +} +/// Caller must have performed this hit's native invulnerability query. +pub(crate) fn actually_hurt_after_immunity_check<W: DamageWorld>( + world: &mut W, + damage: f32, + player: bool, +) -> Result<(), W::Error> { + let damage = world.after_armor(damage)?; + let damage = world.after_magic(damage)?; + let remaining = positive(damage - world.absorption()?); + let absorption = world.absorption()? - (damage - remaining); + world.set_absorption(absorption)?; + let absorbed = damage - remaining; + if absorbed > 0.0 && absorbed < STAT_LIMIT { + if player { + world.award_self(DamageStat::Absorbed, stat_amount(absorbed))?; + } else if let Some(attacker) = world.server_player_attacker()? { + world.award_attacker(attacker, DamageStat::DealtAbsorbed, stat_amount(absorbed))?; + } + } + if remaining == 0.0 { + return Ok(()); + } + if player { + let exhaustion = world.source_food_exhaustion()?; + world.cause_food_exhaustion(exhaustion)?; + } + world.record_damage(remaining)?; + let health = world.health()?; + world.set_health(health - remaining)?; + if player { + if remaining < STAT_LIMIT { + world.award_self(DamageStat::Taken, stat_amount(remaining))?; + } + } else { + let absorption = world.absorption()?; + world.set_absorption(absorption - remaining)?; + } + world.damage_event() +} diff --git a/crates/horizon-world/src/living_fall.rs b/crates/horizon-world/src/living_fall.rs new file mode 100644 index 000000000..7a650239a --- /dev/null +++ b/crates/horizon-world/src/living_fall.rs @@ -0,0 +1,115 @@ +//! Living-entity fall damage calculation, impulse exemption and callback order. +use horizon_core::geometry::Vec3; + +#[derive(Clone, Copy, Debug, Default, PartialEq)] +pub struct ImpulseContext { + pub reset_grace_time: i32, + pub impact_position: Option<Vec3>, +} +impl ImpulseContext { + pub fn set_ignore_fall_damage(&mut self, ignore: bool, position: Option<Vec3>) { + if ignore { + self.apply_grace_time(40); + self.impact_position = position; + } else { + self.reset_grace_time = 0; + } + } + pub fn apply_grace_time(&mut self, ticks: i32) { + self.reset_grace_time = self.reset_grace_time.max(ticks); + } + pub fn reset(&mut self) { + self.reset_grace_time = 0; + self.impact_position = None; + } + pub fn try_reset(&mut self) { + if self.reset_grace_time == 0 { + self.reset(); + } + } + pub fn is_in_grace_time(&self) -> bool { + self.reset_grace_time > 0 + } + pub fn ignores_fall_damage(&self) -> bool { + self.impact_position.is_some() + } +} +pub trait LivingFallWorld { + type Error; + type Sound: Copy; + fn impact_position(&self) -> Option<Vec3>; + fn y(&self) -> f64; + fn reset_impulse(&mut self) -> Result<(), Self::Error>; + fn try_reset_impulse(&mut self) -> Result<(), Self::Error>; + fn immune_to_fall_damage(&mut self) -> Result<bool, Self::Error>; + fn propagate_fall_to_passengers( + &mut self, + distance: f64, + multiplier: f32, + ) -> Result<(), Self::Error>; + fn safe_fall_distance(&mut self) -> Result<f64, Self::Error>; + fn fall_damage_multiplier(&mut self) -> Result<f64, Self::Error>; + /// Select the entity type's small/big fall sound. Big applies above four. + fn fall_sound(&mut self, big: bool) -> Result<Self::Sound, Self::Error>; + fn play_fall_sound(&mut self, sound: Self::Sound) -> Result<(), Self::Error>; + fn play_block_fall_sound(&mut self) -> Result<(), Self::Error>; + /// Dispatch native Entity.hurt semantics (server-only), preserving its source. + fn hurt(&mut self, damage: f32) -> Result<(), Self::Error>; +} +pub fn calculate_fall_damage<W: LivingFallWorld>( + world: &mut W, + distance: f64, + multiplier: f32, +) -> Result<i32, W::Error> { + if world.immune_to_fall_damage()? { + return Ok(0); + } + let power = distance + 1.0e-6 - world.safe_fall_distance()?; + Ok((power * f64::from(multiplier) * world.fall_damage_multiplier()?).floor() as i32) +} +fn java_min(a: f64, b: f64) -> f64 { + if a.is_nan() { + a + } else if b.is_nan() { + b + } else if a == 0.0 && b == 0.0 { + f64::from_bits(a.to_bits() | b.to_bits()) + } else { + a.min(b) + } +} +/// Default LivingEntity and Entity fall behavior. Entity-type overrides of the +/// calculation/parent method are a separate dispatch layer. The same damage +/// source must be retained by the provider for riders and the final hurt call. +pub fn cause_living_fall_damage<W: LivingFallWorld>( + world: &mut W, + distance: f64, + multiplier: f32, +) -> Result<bool, W::Error> { + let distance = if let Some(impact) = world.impact_position() { + let distance = java_min(distance, impact.y - world.y()); + if distance <= 0.0 { + world.reset_impulse()?; + } else { + world.try_reset_impulse()?; + } + distance + } else { + distance + }; + // Base Entity.causeFallDamage returns false, even after notifying riders. + if !world.immune_to_fall_damage()? { + world.propagate_fall_to_passengers(distance, multiplier)?; + } + let damage = calculate_fall_damage(world, distance, multiplier)?; + if damage > 0 { + world.reset_impulse()?; + let sound = world.fall_sound(damage > 4)?; + world.play_fall_sound(sound)?; + world.play_block_fall_sound()?; + world.hurt(damage as f32)?; + Ok(true) + } else { + Ok(false) + } +} diff --git a/crates/horizon-world/src/living_fluid.rs b/crates/horizon-world/src/living_fluid.rs new file mode 100644 index 000000000..44cf7be24 --- /dev/null +++ b/crates/horizon-world/src/living_fluid.rs @@ -0,0 +1,154 @@ +//! LivingEntity water/lava travel and fluid escape/buoyancy velocity updates. +use crate::living_air::{LivingAirWorld, move_relative}; +use horizon_core::geometry::Vec3; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TravelFluidTag { + Lava, + EntityFloatable, +} +pub trait LivingFluidWorld: LivingAirWorld { + fn in_water(&mut self) -> Result<bool, Self::Error>; + fn sprinting(&mut self) -> Result<bool, Self::Error>; + fn water_slow_down(&mut self) -> Result<f32, Self::Error>; + fn water_movement_efficiency(&mut self) -> Result<f64, Self::Error>; + fn dolphins_grace(&mut self) -> Result<bool, Self::Error>; + fn fluid_height(&mut self, tag: TravelFluidTag) -> Result<f64, Self::Error>; + fn fluid_jump_threshold(&mut self) -> Result<f64, Self::Error>; + fn is_free(&mut self, offset: Vec3) -> Result<bool, Self::Error>; + fn is_vehicle(&mut self) -> Result<bool, Self::Error>; + fn can_float_while_ridden(&mut self) -> Result<bool, Self::Error>; +} + +pub fn fluid_falling_adjusted_movement<W: LivingFluidWorld>( + world: &mut W, + gravity: f64, + falling: bool, + mut velocity: Vec3, +) -> Result<Vec3, W::Error> { + if gravity != 0.0 && !world.sprinting()? { + velocity.y = if falling + && (velocity.y - 0.005).abs() >= 0.003 + && (velocity.y - gravity / 16.0).abs() < 0.003 + { + -0.003 + } else { + velocity.y - gravity / 16.0 + }; + } + Ok(velocity) +} +pub fn jump_out_of_fluid<W: LivingFluidWorld>(world: &mut W, old_y: f64) -> Result<(), W::Error> { + let mut velocity = world.velocity(); + if world.horizontal_collision() { + let probe = Vec3::new( + velocity.x, + velocity.y + f64::from(0.6f32) - world.y() + old_y, + velocity.z, + ); + if world.is_free(probe)? { + velocity.y = f64::from(0.3f32); + world.set_velocity(velocity)?; + } + } + Ok(()) +} +pub fn travel_in_water<W: LivingFluidWorld>( + world: &mut W, + input: Vec3, + gravity: f64, + falling: bool, + old_y: f64, +) -> Result<(), W::Error> { + let mut slowdown = if world.sprinting()? { + 0.9f32 + } else { + world.water_slow_down()? + }; + let mut speed = 0.02f32; + let mut efficiency = world.water_movement_efficiency()? as f32; + if !world.on_ground()? { + efficiency *= 0.5; + } + if efficiency > 0.0 { + slowdown += (0.54600006f32 - slowdown) * efficiency; + speed += (world.speed()? - speed) * efficiency; + } + if world.dolphins_grace()? { + slowdown = 0.96; + } + move_relative(world, input, speed)?; + world.move_self(world.velocity())?; + let mut velocity = world.velocity(); + if world.horizontal_collision() && world.on_climbable()? { + velocity.y = 0.2; + } + velocity = Vec3::new( + velocity.x * f64::from(slowdown), + velocity.y * f64::from(0.8f32), + velocity.z * f64::from(slowdown), + ); + let velocity = fluid_falling_adjusted_movement(world, gravity, falling, velocity)?; + world.set_velocity(velocity)?; + jump_out_of_fluid(world, old_y) +} +pub fn travel_in_lava<W: LivingFluidWorld>( + world: &mut W, + input: Vec3, + gravity: f64, + falling: bool, + old_y: f64, +) -> Result<(), W::Error> { + move_relative(world, input, 0.02)?; + world.move_self(world.velocity())?; + let height = world.fluid_height(TravelFluidTag::Lava)?; + if height <= world.fluid_jump_threshold()? { + let velocity = world.velocity(); + world.set_velocity(Vec3::new( + velocity.x * 0.5, + velocity.y * f64::from(0.8f32), + velocity.z * 0.5, + ))?; + let velocity = fluid_falling_adjusted_movement(world, gravity, falling, world.velocity())?; + world.set_velocity(velocity)?; + } else { + world.set_velocity(world.velocity().scale(0.5))?; + } + if gravity != 0.0 { + let velocity = world.velocity(); + world.set_velocity(Vec3::new( + velocity.x + 0.0, + velocity.y + -gravity / 4.0, + velocity.z + 0.0, + ))?; + } + jump_out_of_fluid(world, old_y) +} +pub fn float_in_liquid_while_ridden<W: LivingFluidWorld>( + world: &mut W, + tag: TravelFluidTag, +) -> Result<(), W::Error> { + if world.is_vehicle()? && world.can_float_while_ridden()? { + let threshold = world.fluid_jump_threshold()?; + if world.fluid_height(tag)? > threshold { + let velocity = world.velocity(); + world.set_velocity(Vec3::new( + velocity.x + 0.0, + velocity.y + f64::from(0.04f32), + velocity.z + 0.0, + ))?; + } + } + Ok(()) +} +pub fn travel_in_fluid<W: LivingFluidWorld>(world: &mut W, input: Vec3) -> Result<(), W::Error> { + let falling = world.velocity().y <= 0.0; + let old_y = world.y(); + let gravity = world.effective_gravity()?; + if world.in_water()? { + travel_in_water(world, input, gravity, falling, old_y)?; + } else { + travel_in_lava(world, input, gravity, falling, old_y)?; + } + float_in_liquid_while_ridden(world, TravelFluidTag::EntityFloatable) +} diff --git a/crates/horizon-world/src/living_health.rs b/crates/horizon-world/src/living_health.rs new file mode 100644 index 000000000..5b071e93f --- /dev/null +++ b/crates/horizon-world/src/living_health.rs @@ -0,0 +1,110 @@ +//! Living health/absorption limits and healing/query dispatch order. +pub trait HealthWorld { + type Error; + type Data: Copy; + fn health(&mut self) -> Result<f32, Self::Error>; + /// Captures the current synchronized-data object before attribute lookup. + fn health_data(&self) -> Self::Data; + fn max_health_attribute(&mut self) -> Result<f64, Self::Error>; + fn max_absorption_attribute(&mut self) -> Result<f64, Self::Error>; + fn store_health(&mut self, data: Self::Data, value: f32) -> Result<(), Self::Error>; + fn store_absorption(&mut self, value: f32) -> Result<(), Self::Error>; + fn dead_flag(&self) -> bool; + fn dispatch_set_health(&mut self, value: f32) -> Result<(), Self::Error>; +} +fn clamp(value: f32, max: f32) -> f32 { + if value < 0.0 { + 0.0 + } else if value.is_nan() || max.is_nan() { + f32::NAN + } else if value == 0.0 && max == 0.0 { + f32::from_bits(value.to_bits() | max.to_bits()) + } else { + value.min(max) + } +} +pub fn set_health<W: HealthWorld>(world: &mut W, value: f32) -> Result<(), W::Error> { + let data = world.health_data(); + let maximum = world.max_health_attribute()? as f32; + world.store_health(data, clamp(value, maximum)) +} +pub fn set_absorption<W: HealthWorld>(world: &mut W, value: f32) -> Result<(), W::Error> { + let maximum = world.max_absorption_attribute()? as f32; + world.store_absorption(clamp(value, maximum)) +} +pub fn heal<W: HealthWorld>(world: &mut W, amount: f32) -> Result<(), W::Error> { + let health = world.health()?; + if health > 0.0 { + world.dispatch_set_health(health + amount)?; + } + Ok(()) +} +pub fn is_hurt<W: HealthWorld>(world: &mut W) -> Result<bool, W::Error> { + Ok(world.health()? > 0.0 && world.health()? < world.max_health_attribute()? as f32) +} +pub fn is_dead_or_dying<W: HealthWorld>(world: &mut W) -> Result<bool, W::Error> { + Ok(world.health()? <= 0.0 || world.dead_flag()) +} +/// One synchronized Float data item, using Java boxed-float equality. The native +/// callback observes the new value before dirty flags are set. Exceptions leave +/// that value changed without newly marking it dirty. +#[derive(Clone, Copy, Debug)] +pub struct SyncedFloat { + initial: f32, + value: f32, + item_dirty: bool, + dirty: bool, +} +fn equal(a: f32, b: f32) -> bool { + a.to_bits() == b.to_bits() || (a.is_nan() && b.is_nan()) +} +impl SyncedFloat { + pub fn new(value: f32) -> Self { + Self { + initial: value, + value, + item_dirty: false, + dirty: false, + } + } + pub fn value(&self) -> f32 { + self.value + } + pub fn is_dirty(&self) -> bool { + self.dirty + } + pub fn item_dirty(&self) -> bool { + self.item_dirty + } + pub fn is_default(&self) -> bool { + equal(self.initial, self.value) + } + pub fn set<E>( + &mut self, + value: f32, + force: bool, + updated: impl FnOnce(&mut Self) -> Result<(), E>, + ) -> Result<(), E> { + if force || !equal(value, self.value) { + self.value = value; + updated(self)?; + self.item_dirty = true; + self.dirty = true; + } + Ok(()) + } + /// Extracts this single item's update. Multi-item synchronized storage and + /// network serialization are separate concerns. + pub fn take_dirty(&mut self) -> Option<f32> { + if !self.dirty { + return None; + } + self.dirty = false; + if self.item_dirty { + self.item_dirty = false; + Some(self.value) + } else { + None + } + } +} diff --git a/crates/horizon-world/src/living_hurt.rs b/crates/horizon-world/src/living_hurt.rs new file mode 100644 index 000000000..8dfc5ba69 --- /dev/null +++ b/crates/horizon-world/src/living_hurt.rs @@ -0,0 +1,201 @@ +//! Outer living damage dispatch, cooldown writes and post-hit service ordering. +use crate::living_damage::{STAT_LIMIT, stat_amount}; +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum HurtTag { + Fire, + Freezing, + DamagesHelmet, + BypassesCooldown, + NoImpact, + NoKnockback, +} +#[derive(Clone, Debug)] +pub struct HurtState<S> { + pub no_action_time: i32, + pub cooldown: i32, + pub last_hurt: f32, + pub hurt_duration: i32, + pub hurt_time: i32, + pub last_source: Option<S>, + pub last_stamp: i64, +} +/// One invocation retains the same incoming source and server level. Services +/// receive live state so reentrant callbacks preserve native write ordering. +pub trait HurtWorld { + type Error; + type Source: Copy; + type UseItem: Copy; + type Blocking: Copy; + type Sound: Copy; + fn source(&self) -> Self::Source; + fn is_server_player(&self) -> bool; + fn invulnerable(&mut self, s: &mut HurtState<Self::Source>) -> Result<bool, Self::Error>; + fn dead_or_dying(&mut self, s: &mut HurtState<Self::Source>) -> Result<bool, Self::Error>; + fn tag(&mut self, s: &mut HurtState<Self::Source>, tag: HurtTag) -> Result<bool, Self::Error>; + fn fire_resistance(&mut self, s: &mut HurtState<Self::Source>) -> Result<bool, Self::Error>; + fn sleeping(&mut self, s: &mut HurtState<Self::Source>) -> Result<bool, Self::Error>; + fn stop_sleeping(&mut self, s: &mut HurtState<Self::Source>) -> Result<(), Self::Error>; + fn use_item(&mut self, s: &mut HurtState<Self::Source>) -> Result<Self::UseItem, Self::Error>; + fn apply_blocking( + &mut self, + s: &mut HurtState<Self::Source>, + damage: f32, + ) -> Result<f32, Self::Error>; + fn freeze_hurts_extra(&mut self, s: &mut HurtState<Self::Source>) -> Result<bool, Self::Error>; + fn helmet_empty(&mut self, s: &mut HurtState<Self::Source>) -> Result<bool, Self::Error>; + fn hurt_helmet( + &mut self, + s: &mut HurtState<Self::Source>, + damage: f32, + ) -> Result<(), Self::Error>; + fn actually_hurt( + &mut self, + s: &mut HurtState<Self::Source>, + damage: f32, + ) -> Result<(), Self::Error>; + fn resolve_mob(&mut self, s: &mut HurtState<Self::Source>) -> Result<(), Self::Error>; + fn resolve_player(&mut self, s: &mut HurtState<Self::Source>) -> Result<(), Self::Error>; + fn blocking_component(&mut self, item: Self::UseItem) -> Option<Self::Blocking>; + fn on_blocked( + &mut self, + s: &mut HurtState<Self::Source>, + block: Self::Blocking, + ) -> Result<(), Self::Error>; + fn broadcast_damage(&mut self, s: &mut HurtState<Self::Source>) -> Result<(), Self::Error>; + fn mark_hurt(&mut self, s: &mut HurtState<Self::Source>) -> Result<(), Self::Error>; + fn knockback( + &mut self, + s: &mut HurtState<Self::Source>, + damage: f32, + blocked: bool, + ) -> Result<(), Self::Error>; + fn death_protection(&mut self, s: &mut HurtState<Self::Source>) -> Result<bool, Self::Error>; + fn death_sound(&mut self, s: &mut HurtState<Self::Source>) -> Result<Self::Sound, Self::Error>; + fn make_sound( + &mut self, + s: &mut HurtState<Self::Source>, + sound: Self::Sound, + ) -> Result<(), Self::Error>; + fn secondary_sound(&mut self, s: &mut HurtState<Self::Source>) -> Result<(), Self::Error>; + fn die(&mut self, s: &mut HurtState<Self::Source>) -> Result<(), Self::Error>; + fn hurt_sound(&mut self, s: &mut HurtState<Self::Source>) -> Result<(), Self::Error>; + fn game_time(&mut self, s: &mut HurtState<Self::Source>) -> Result<i64, Self::Error>; + fn effects_on_hurt( + &mut self, + s: &mut HurtState<Self::Source>, + damage: f32, + ) -> Result<(), Self::Error>; + fn player_hurt_criterion( + &mut self, + s: &mut HurtState<Self::Source>, + original: f32, + damage: f32, + blocked: bool, + ) -> Result<(), Self::Error>; + fn award_blocked( + &mut self, + s: &mut HurtState<Self::Source>, + amount: i32, + ) -> Result<(), Self::Error>; + /// Looks up the attacker, then dispatches its criterion if a server player. + fn attacker_criterion( + &mut self, + s: &mut HurtState<Self::Source>, + original: f32, + damage: f32, + blocked: bool, + ) -> Result<(), Self::Error>; +} +pub fn hurt_server<W: HurtWorld>( + s: &mut HurtState<W::Source>, + w: &mut W, + mut damage: f32, +) -> Result<bool, W::Error> { + if w.invulnerable(s)? || w.dead_or_dying(s)? { + return Ok(false); + } + if w.tag(s, HurtTag::Fire)? && w.fire_resistance(s)? { + return Ok(false); + } + if w.sleeping(s)? { + w.stop_sleeping(s)?; + } + s.no_action_time = 0; + if damage < 0.0 { + damage = 0.0; + } + let original = damage; + let item = w.use_item(s)?; + let blocked_amount = w.apply_blocking(s, damage)?; + damage -= blocked_amount; + let blocked = blocked_amount > 0.0; + if w.tag(s, HurtTag::Freezing)? && w.freeze_hurts_extra(s)? { + damage *= 5.0; + } + if w.tag(s, HurtTag::DamagesHelmet)? && !w.helmet_empty(s)? { + w.hurt_helmet(s, damage)?; + damage *= 0.75; + } + if !damage.is_finite() { + damage = f32::MAX; + } + let fresh = if s.cooldown as f32 > 10.0 && !w.tag(s, HurtTag::BypassesCooldown)? { + if damage <= s.last_hurt { + return Ok(false); + } + w.actually_hurt(s, damage - s.last_hurt)?; + s.last_hurt = damage; + false + } else { + s.last_hurt = damage; + s.cooldown = 20; + w.actually_hurt(s, damage)?; + s.hurt_duration = 10; + s.hurt_time = s.hurt_duration; + true + }; + w.resolve_mob(s)?; + w.resolve_player(s)?; + if fresh { + let component = w.blocking_component(item); + if let Some(component) = component.filter(|_| blocked) { + w.on_blocked(s, component)?; + } else { + w.broadcast_damage(s)?; + } + if !w.tag(s, HurtTag::NoImpact)? && (!blocked || damage > 0.0) { + w.mark_hurt(s)?; + } + let fully_blocked = blocked && damage <= 0.0; + if !w.tag(s, HurtTag::NoKnockback)? && !fully_blocked { + w.knockback(s, damage, blocked)?; + } + } + if w.dead_or_dying(s)? { + if !w.death_protection(s)? { + if fresh { + let sound = w.death_sound(s)?; + w.make_sound(s, sound)?; + w.secondary_sound(s)?; + } + w.die(s)?; + } + } else if fresh { + w.hurt_sound(s)?; + w.secondary_sound(s)?; + } + let accepted = !blocked || damage > 0.0; + if accepted { + s.last_source = Some(w.source()); + s.last_stamp = w.game_time(s)?; + w.effects_on_hurt(s, damage)?; + } + if w.is_server_player() { + w.player_hurt_criterion(s, original, damage, blocked)?; + if blocked_amount > 0.0 && blocked_amount < STAT_LIMIT { + w.award_blocked(s, stat_amount(blocked_amount))?; + } + } + w.attacker_criterion(s, original, damage, blocked)?; + Ok(accepted) +} diff --git a/crates/horizon-world/src/living_landing.rs b/crates/horizon-world/src/living_landing.rs new file mode 100644 index 000000000..cb28df84c --- /dev/null +++ b/crates/horizon-world/src/living_landing.rs @@ -0,0 +1,69 @@ +//! LivingEntity's fluid refresh and landing effects around base fall handling. +use crate::fall_damage::{FallDamageWorld, check_fall_damage}; +use horizon_core::{geometry::Vec3, position::BlockPos}; + +pub trait LivingLandingWorld: FallDamageWorld { + fn update_fluid_interaction(&mut self) -> Result<bool, Self::Error>; + /// Native level type identity, independent of its client-side flag. + fn is_server_level(&self) -> bool; + fn on_changed_block(&mut self, position: BlockPos) -> Result<(), Self::Error>; + fn safe_fall_distance(&mut self) -> Result<f64, Self::Error>; + fn state_is_air(&mut self, state: Self::State) -> Result<bool, Self::Error>; + fn block_position(&mut self) -> Result<BlockPos, Self::Error>; + /// Dispatch BLOCK particles with zero axis spread and the supplied speed. + fn landing_particles( + &mut self, + state: Self::State, + position: Vec3, + count: i32, + speed: f64, + ) -> Result<(), Self::Error>; + fn clear_last_climbable_position(&mut self); +} + +/// Preserve callbacks' field mutations and partial state on failure. The +/// landing position and state are the original movement phase's arguments. +pub fn check_living_fall_damage<W: LivingLandingWorld>( + world: &mut W, + dy: f64, + on_ground: bool, + state: W::State, + landing: BlockPos, +) -> Result<(), W::Error> { + if !world.is_in_water()? { + world.update_fluid_interaction()?; + } + if world.is_server_level() && on_ground && world.fall_distance() > 0.0 { + world.on_changed_block(landing)?; + let power = world.fall_distance() + 1.0e-6 - world.safe_fall_distance()?; + let power = f64::from((power.floor() as i32).max(0)); + if power > 0.0 && !world.state_is_air(state)? { + let mut position = world.position(); + let current = world.block_position()?; + if landing.x != current.x || landing.z != current.z { + let dx = position.x - f64::from(landing.x) - 0.5; + let dz = position.z - f64::from(landing.z) - 0.5; + // Math.max propagates NaN; Rust's max selects the other operand. + let scale = if dx.is_nan() || dz.is_nan() { + f64::NAN + } else { + dx.abs().max(dz.abs()) + }; + position.x = f64::from(landing.x) + 0.5 + dx / scale * 0.5; + position.z = f64::from(landing.z) + 0.5 + dz / scale * 0.5; + } + let magnitude = (f64::from(0.2f32) + power / 15.0).min(2.5); + world.landing_particles( + state, + position, + (150.0 * magnitude) as i32, + f64::from(0.15f32), + )?; + } + } + check_fall_damage(world, dy, on_ground, state, landing)?; + if on_ground { + world.clear_last_climbable_position(); + } + Ok(()) +} diff --git a/crates/horizon-world/src/living_motion.rs b/crates/horizon-world/src/living_motion.rs new file mode 100644 index 000000000..b44da8b7b --- /dev/null +++ b/crates/horizon-world/src/living_motion.rs @@ -0,0 +1,124 @@ +//! Default living jump, gravity, flight-speed and air-drag calculations. +use crate::living_air::modified_friction; +use horizon_core::geometry::{Vec3, trig}; + +pub trait LivingMotionWorld { + type Error; + fn velocity(&self) -> Vec3; + fn set_velocity(&mut self, velocity: Vec3) -> Result<(), Self::Error>; + fn jump_strength(&mut self) -> Result<f64, Self::Error>; + fn block_jump_factor(&mut self) -> Result<f32, Self::Error>; + fn has_jump_boost(&mut self) -> Result<bool, Self::Error>; + fn jump_boost_amplifier(&mut self) -> Result<i32, Self::Error>; + fn sprinting(&mut self) -> Result<bool, Self::Error>; + fn yaw(&mut self) -> Result<f32, Self::Error>; + fn mark_needs_sync(&mut self); + fn no_gravity(&mut self) -> Result<bool, Self::Error>; + fn gravity_attribute(&mut self) -> Result<f64, Self::Error>; + fn has_slow_falling(&mut self) -> Result<bool, Self::Error>; + fn controlling_passenger_is_player(&mut self) -> Result<bool, Self::Error>; + fn speed(&mut self) -> Result<f32, Self::Error>; + fn omnidirectional_air_mover(&mut self) -> Result<bool, Self::Error>; + fn air_drag_modifier(&mut self) -> Result<f64, Self::Error>; +} +pub fn jump_boost_power<W: LivingMotionWorld>(world: &mut W) -> Result<f32, W::Error> { + Ok(if world.has_jump_boost()? { + 0.1f32 * (world.jump_boost_amplifier()? as f32 + 1.0) + } else { + 0.0 + }) +} +pub fn jump_power<W: LivingMotionWorld>(world: &mut W, scale: f32) -> Result<f32, W::Error> { + let strength = world.jump_strength()? as f32 * scale; + let strength = strength * world.block_jump_factor()?; + Ok(strength + jump_boost_power(world)?) +} +/// Native addDeltaMovement ignores nonfinite additions, but does not reject +/// a nonfinite existing velocity or overflow in the resulting sum. +pub fn add_delta_movement<W: LivingMotionWorld>( + world: &mut W, + delta: Vec3, +) -> Result<(), W::Error> { + if delta.x.is_finite() && delta.y.is_finite() && delta.z.is_finite() { + let old = world.velocity(); + world.set_velocity(Vec3::new(old.x + delta.x, old.y + delta.y, old.z + delta.z))?; + } + Ok(()) +} +pub fn jump_from_ground<W: LivingMotionWorld>(world: &mut W) -> Result<(), W::Error> { + let power = jump_power(world, 1.0)?; + if power <= 1.0e-5f32 { + return Ok(()); + } + let mut velocity = world.velocity(); + velocity.y = if power.is_nan() || velocity.y.is_nan() { + f64::NAN + } else { + f64::from(power).max(velocity.y) + }; + world.set_velocity(velocity)?; + if world.sprinting()? { + let angle = f64::from(world.yaw()? * trig::DEG_TO_RAD); + add_delta_movement( + world, + Vec3::new( + f64::from(-trig::sin(angle)) * 0.2, + 0.0, + f64::from(trig::cos(angle)) * 0.2, + ), + )?; + } + world.mark_needs_sync(); + Ok(()) +} +pub fn gravity<W: LivingMotionWorld>(world: &mut W) -> Result<f64, W::Error> { + if world.no_gravity()? { + Ok(0.0) + } else { + world.gravity_attribute() + } +} +pub fn effective_gravity<W: LivingMotionWorld>(world: &mut W) -> Result<f64, W::Error> { + if world.velocity().y <= 0.0 && world.has_slow_falling()? { + let gravity = gravity(world)?; + Ok(if gravity.is_nan() { + gravity + } else { + gravity.min(0.01) + }) + } else { + gravity(world) + } +} +pub fn apply_gravity<W: LivingMotionWorld>(world: &mut W) -> Result<(), W::Error> { + let gravity = gravity(world)?; + if gravity != 0.0 { + let old = world.velocity(); + world.set_velocity(Vec3::new(old.x + 0.0, old.y - gravity, old.z + 0.0))?; + } + Ok(()) +} +pub fn swim_vertical<W: LivingMotionWorld>(world: &mut W, up: bool) -> Result<(), W::Error> { + let old = world.velocity(); + let amount = f64::from(0.04f32); + world.set_velocity(Vec3::new( + old.x + 0.0, + old.y + if up { amount } else { -amount }, + old.z + 0.0, + )) +} +pub fn default_flying_speed<W: LivingMotionWorld>(world: &mut W) -> Result<f32, W::Error> { + if world.controlling_passenger_is_player()? { + Ok(world.speed()? * 0.1f32) + } else { + Ok(0.02) + } +} +pub fn air_drag<W: LivingMotionWorld>(world: &mut W) -> Result<f32, W::Error> { + let drag = if world.omnidirectional_air_mover()? { + 0.91 + } else { + 0.98 + }; + Ok(modified_friction(drag, world.air_drag_modifier()? as f32)) +} diff --git a/crates/horizon-world/src/living_use_flags.rs b/crates/horizon-world/src/living_use_flags.rs new file mode 100644 index 000000000..ae1ecb31e --- /dev/null +++ b/crates/horizon-world/src/living_use_flags.rs @@ -0,0 +1,26 @@ +//! Pinned living-entity use flags backed by synchronized byte storage. +use crate::{ + player_equipment::InteractionHand, + synced_values::{DataError, Observer, SyncedValues}, +}; +pub const FLAGS_ID: u8 = 8; +pub fn using_item(data: &SyncedValues<u8>) -> Result<bool, u8> { + Ok(data.get(FLAGS_ID)? & 1 != 0) +} +pub fn used_hand(data: &SyncedValues<u8>) -> Result<InteractionHand, u8> { + Ok(if data.get(FLAGS_ID)? & 2 != 0 { + InteractionHand::Off + } else { + InteractionHand::Main + }) +} +pub fn set_flag<O: Observer<u8>>( + data: &mut SyncedValues<u8>, + mask: i32, + value: bool, + observer: &mut O, +) -> Result<(), DataError<O::Error>> { + let old = i32::from(data.get(FLAGS_ID).map_err(DataError::UnknownId)? as i8); + let next = if value { old | mask } else { old & !mask }; + data.set(FLAGS_ID, next as u8, false, observer) +} diff --git a/crates/horizon-world/src/main.rs b/crates/horizon-world/src/main.rs new file mode 100644 index 000000000..ff61c99dd --- /dev/null +++ b/crates/horizon-world/src/main.rs @@ -0,0 +1,197 @@ +use horizon_core::position::BlockPos; +use horizon_world::{ + chunk::{BlockState, ChunkData}, + compression::Compression, + nbt::{self, Limits}, + region::{ChunkRecord, RegionFile, RegionWriter}, +}; +use std::{ + collections::BTreeMap, + error::Error, + fs::{File, OpenOptions}, + io::{Read, Write}, + path::Path, +}; + +fn codec(name: &str) -> Result<Compression, Box<dyn Error>> { + match name { + "gzip" | "1" => Ok(Compression::Gzip), + "zlib" | "2" => Ok(Compression::Zlib), + "none" | "3" => Ok(Compression::None), + "lz4" | "4" => Ok(Compression::Lz4), + _ => Err(format!("unknown codec {name}; choose gzip, zlib, none or lz4").into()), + } +} + +fn read_bounded(path: &str) -> Result<Vec<u8>, Box<dyn Error>> { + let max = Limits::default().max_bytes; + let mut bytes = Vec::new(); + File::open(path)? + .take((max + 1) as u64) + .read_to_end(&mut bytes)?; + if bytes.len() > max { + return Err("input exceeds 64 MiB limit".into()); + } + Ok(bytes) +} + +fn write_new(path: &str, bytes: &[u8]) -> Result<(), Box<dyn Error>> { + let mut file = OpenOptions::new().write(true).create_new(true).open(path)?; + if let Err(error) = file.write_all(bytes).and_then(|_| file.sync_all()) { + drop(file); + let _ = std::fs::remove_file(path); + return Err(error.into()); + } + Ok(()) +} + +fn run(args: &[String]) -> Result<(), Box<dyn Error>> { + let Some(command) = args.first().map(String::as_str) else { + return Err("use --help for commands".into()); + }; + match command { + "--help" | "-h" if args.len() == 1 => println!( + "Horizon world data tools — Java Edition 26.3\n\ + inspect <region.mca>\n\ + copy-region <source.mca> <new-directory/r.x.z.mca> [gzip|zlib|none|lz4]\n\ + get-block <region.mca> <x> <y> <z>\n\ + edit-block-data <source.mca> <new-directory/r.x.z.mca> <x> <y> <z> <name> [property=value ...]\n\ + nbt-copy <input> <new-output> <input-codec> <output-codec>\n\ + nbt-network-copy <input> <new-output> <input-codec> <output-codec>\n\ + Existing output files are refused. edit-block-data changes saved block data only;\n\ + it does not run lighting, heightmaps, ticks or neighbor updates." + ), + "nbt-copy" | "nbt-network-copy" if args.len() == 5 => { + let bytes = + codec(&args[3])?.decode(&read_bounded(&args[1])?, Limits::default().max_bytes)?; + let encoded = if command == "nbt-copy" { + let (root, used) = nbt::read_named(&bytes, Limits::default())?; + if used != bytes.len() { + return Err("trailing bytes after NBT root".into()); + } + nbt::write_named(&root, Limits::default())? + } else { + let (root, used) = nbt::read_network(&bytes, Limits::default())?; + if used != bytes.len() { + return Err("trailing bytes after NBT root".into()); + } + nbt::write_network(&root, Limits::default())? + }; + write_new(&args[2], &codec(&args[4])?.encode(&encoded)?)?; + println!("Wrote {}", args[2]); + } + "inspect" if args.len() == 2 => { + let mut region = RegionFile::open(&args[1])?; + let chunks: Vec<_> = region.chunks().collect(); + println!( + "Horizon region {},{}: {} chunks", + region.position().x, + region.position().z, + chunks.len() + ); + for (pos, timestamp) in chunks { + let record = region.read(pos)?.unwrap(); + let root = record.nbt(Limits::default())?; + println!( + "chunk {},{} timestamp={} codec={:?} compressed={} root_type={}", + pos.x, + pos.z, + timestamp, + record.compression, + record.compressed.len(), + root.tag.id() + ); + } + } + "copy-region" if args.len() == 3 || args.len() == 4 => { + let mut region = RegionFile::open(&args[1])?; + if args.len() == 3 { + region.export(&args[2], &[])?; + } else { + let compression = codec(&args[3])?; + if horizon_world::region::position_from_path(Path::new(&args[2]))? + != region.position() + { + return Err("export region coordinates differ".into()); + } + let mut writer = RegionWriter::create(&args[2])?; + let positions: Vec<_> = region.chunks().map(|(p, _)| p).collect(); + for pos in positions { + let old = region.read(pos)?.unwrap(); + let record = ChunkRecord::from_nbt( + &old.nbt(Limits::default())?, + compression, + old.timestamp, + Limits::default(), + )?; + writer.write(pos, &record)?; + } + writer.finish()?; + } + println!("Wrote {}", args[2]); + } + "get-block" if args.len() == 5 => { + let block = BlockPos::new(args[2].parse()?, args[3].parse()?, args[4].parse()?); + let record = RegionFile::open(&args[1])? + .read(block.chunk())? + .ok_or("chunk is absent")?; + let chunk = ChunkData::new(record.nbt(Limits::default())?)?; + let state = chunk + .block(block)? + .ok_or("section has no block-state data")?; + print!("{}", state.name); + for (name, value) in state.properties { + print!(" {name}={value}"); + } + println!(); + } + "edit-block-data" if args.len() >= 7 => { + let block = BlockPos::new(args[3].parse()?, args[4].parse()?, args[5].parse()?); + let mut properties = BTreeMap::new(); + for arg in &args[7..] { + let (key, value) = arg.split_once('=').ok_or("expected property=value")?; + if key.is_empty() + || value.is_empty() + || properties + .insert(key.to_owned(), value.to_owned()) + .is_some() + { + return Err("invalid or duplicate block property".into()); + } + } + let mut region = RegionFile::open(&args[1])?; + let old = region.read(block.chunk())?.ok_or("chunk is absent")?; + let mut chunk = ChunkData::new(old.nbt(Limits::default())?)?; + chunk.set_block_data( + block, + BlockState { + name: args[6].clone(), + properties, + }, + )?; + let timestamp = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH)? + .as_secs() as u32; + let next = ChunkRecord::from_nbt( + &chunk.into_nbt(), + old.compression, + timestamp, + Limits::default(), + )?; + region.export(&args[2], &[(block.chunk(), Some(next))])?; + println!( + "Wrote saved block data to {}; simulation-derived data has not been updated.", + args[2] + ); + } + _ => return Err("invalid command or arguments; use --help".into()), + } + Ok(()) +} + +fn main() { + if let Err(error) = run(&std::env::args().skip(1).collect::<Vec<_>>()) { + eprintln!("Horizon: {error}"); + std::process::exit(2); + } +} diff --git a/crates/horizon-world/src/movement_emission.rs b/crates/horizon-world/src/movement_emission.rs new file mode 100644 index 000000000..f762ced22 --- /dev/null +++ b/crates/horizon-world/src/movement_emission.rs @@ -0,0 +1,158 @@ +//! Movement distances, footsteps, swimming and flapping event dispatch. +use horizon_core::{geometry::Vec3, position::BlockPos}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum MovementEmission { + None, + Sounds, + Events, + All, +} +impl MovementEmission { + pub fn sounds(self) -> bool { + matches!(self, Self::Sounds | Self::All) + } + pub fn events(self) -> bool { + matches!(self, Self::Events | Self::All) + } + pub fn anything(self) -> bool { + self != Self::None + } +} +#[derive(Clone, Copy, Debug, Default)] +pub struct MovementDistances { + pub movement: f32, + pub flight: f32, + pub next_step: f32, +} +impl MovementDistances { + /// Java narrows to int, adds with wrapping overflow, then widens to float. + pub fn next_step(&self) -> f32 { + (self.movement as i32).wrapping_add(1) as f32 + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum MovementEvent { + Step, + Swim, + Flap, +} +pub trait MovementEmissionWorld { + type Error; + type State: Copy; + fn distances(&self) -> MovementDistances; + fn set_movement_distance(&mut self, value: f32); + fn set_flight_distance(&mut self, value: f32); + fn set_next_step(&mut self, value: f32); + fn on_position(&mut self) -> Result<BlockPos, Self::Error>; + fn block_state(&mut self, p: BlockPos) -> Result<Self::State, Self::Error>; + fn is_air(&mut self, s: Self::State) -> Result<bool, Self::Error>; + fn climbable_tag(&mut self, s: Self::State) -> Result<bool, Self::Error>; + fn is_powder_snow(&mut self, s: Self::State) -> Result<bool, Self::Error>; + fn on_ground(&mut self) -> Result<bool, Self::Error>; + fn crouching(&mut self) -> Result<bool, Self::Error>; + fn on_rails(&mut self) -> Result<bool, Self::Error>; + fn swimming(&mut self) -> Result<bool, Self::Error>; + fn in_water(&mut self) -> Result<bool, Self::Error>; + fn walking_step_sound(&mut self, p: BlockPos, s: Self::State) -> Result<(), Self::Error>; + /// STEP uses current entity position and a context including this state. + fn step_event(&mut self, s: Self::State) -> Result<(), Self::Error>; + fn next_step(&mut self) -> Result<f32, Self::Error>; + fn water_swim_sound(&mut self) -> Result<(), Self::Error>; + fn entity_event(&mut self, event: MovementEvent) -> Result<(), Self::Error>; + fn flapping(&mut self) -> Result<bool, Self::Error>; + fn on_flap(&mut self) -> Result<(), Self::Error>; + fn movement_emission(&mut self) -> Result<MovementEmission, Self::Error>; +} +fn climbable<W: MovementEmissionWorld>(world: &mut W, state: W::State) -> Result<bool, W::Error> { + Ok(world.climbable_tag(state)? || world.is_powder_snow(state)?) +} +pub fn block_movement_effects<W: MovementEmissionWorld>( + world: &mut W, + p: BlockPos, + state: W::State, + sounds: bool, + events: bool, + movement: Vec3, +) -> Result<bool, W::Error> { + if world.is_air(state)? { + return Ok(false); + } + let climbable = climbable(world, state)?; + if (world.on_ground()? + || climbable + || world.crouching()? && movement.y == 0.0 + || world.on_rails()?) + && !world.swimming()? + { + if sounds { + world.walking_step_sound(p, state)?; + } + if events { + world.step_event(state)?; + } + Ok(true) + } else { + Ok(false) + } +} +pub fn process_flapping_movement<W: MovementEmissionWorld>(world: &mut W) -> Result<(), W::Error> { + if world.flapping()? { + world.on_flap()?; + if world.movement_emission()?.events() { + world.entity_event(MovementEvent::Flap)?; + } + } + Ok(()) +} +/// The caller applies Entity.move's authority, emission and passenger guards. +/// Provider callbacks can change distance fields; subsequent reads see changes. +pub fn apply_movement_emission<W: MovementEmissionWorld>( + world: &mut W, + emission: MovementEmission, + movement: Vec3, + legacy_position: BlockPos, + legacy_state: W::State, +) -> Result<(), W::Error> { + let full = (movement.length() * f64::from(0.6f32)) as f32; + let horizontal = + ((movement.x * movement.x + movement.z * movement.z).sqrt() * f64::from(0.6f32)) as f32; + let p = world.on_position()?; + let state = world.block_state(p)?; + let climbable = climbable(world, state)?; + world.set_movement_distance( + world.distances().movement + if climbable { full } else { horizontal }, + ); + world.set_flight_distance(world.distances().flight + full); + if world.distances().movement > world.distances().next_step && !world.is_air(state)? { + let same = p == legacy_position; + // The native legacy call uses `same` for events even for sound-only emission. + let mut emitted = block_movement_effects( + world, + legacy_position, + legacy_state, + emission.sounds(), + same, + movement, + )?; + if !same { + emitted |= block_movement_effects(world, p, state, false, emission.events(), movement)?; + } + if emitted { + let next = world.next_step()?; + world.set_next_step(next); + } else if world.in_water()? { + let next = world.next_step()?; + world.set_next_step(next); + if emission.sounds() { + world.water_swim_sound()?; + } + if emission.events() { + world.entity_event(MovementEvent::Swim)?; + } + } + } else if world.is_air(state)? { + process_flapping_movement(world)?; + } + Ok(()) +} diff --git a/crates/horizon-world/src/movement_properties.rs b/crates/horizon-world/src/movement_properties.rs new file mode 100644 index 000000000..84cafae1e --- /dev/null +++ b/crates/horizon-world/src/movement_properties.rs @@ -0,0 +1,213 @@ +//! Registry-bound block movement coefficients, identities and reloadable tags. +use crate::{ + DATA_VERSION, + chunk::BlockState, + compression::invalid, + movement_support::MovementBlockWorld, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, +}; +use horizon_core::position::BlockPos; +use std::{ + collections::{BTreeMap, BTreeSet}, + fmt, io, +}; + +#[derive(Clone, Copy, Debug)] +pub struct MovementCoefficients { + pub friction: f32, + pub speed_factor: f32, + pub jump_factor: f32, + pub bounce_restitution: f32, + pub fall_distance_reduction: f32, + pub fence_gate: bool, +} +#[derive(Clone, Copy, Debug)] +pub struct MovementBlock { + pub coefficients: MovementCoefficients, + pub fence: bool, + pub wall: bool, + pub suppresses_bounce: bool, + pub water: bool, + pub bubble_column: bool, +} +#[derive(Default)] +pub struct MovementTags { + pub fences: BTreeSet<String>, + pub walls: BTreeSet<String>, + pub suppresses_bounce: BTreeSet<String>, +} +/// Definitions are private version-specific data; no runtime Java is required. +pub struct MovementProperties<'r> { + registry: &'r BlockRegistry, + definitions: BTreeMap<String, MovementCoefficients>, +} +impl<'r> MovementProperties<'r> { + pub fn registry(&self) -> &'r BlockRegistry { + self.registry + } + pub fn coefficients(&self, state: BlockStateId) -> io::Result<MovementCoefficients> { + let state = self + .registry + .state(state) + .ok_or_else(|| invalid("movement state outside registry"))?; + Ok(self.definitions[&state.name]) + } + + pub fn from_nbt(tag: &Tag, registry: &'r BlockRegistry) -> io::Result<Self> { + if tag.get("DataVersion") != Some(&Tag::Int(DATA_VERSION)) { + return Err(invalid("movement properties DataVersion mismatch")); + } + let Some(Tag::List(states)) = tag.get("states") else { + return Err(invalid("missing movement state identities")); + }; + if states.len() != registry.len() { + return Err(invalid("movement registry size mismatch")); + } + for (id, state) in states.iter().enumerate() { + if registry.state(BlockStateId(id as u32)) != Some(&BlockState::from_nbt(state)?) { + return Err(invalid("movement state identities differ")); + } + } + let Some(Tag::Compound(blocks)) = tag.get("blocks") else { + return Err(invalid("missing movement definitions")); + }; + let mut definitions = BTreeMap::new(); + for (name, properties) in blocks { + let name = name.to_string().map_err(|e| invalid(e.to_string()))?; + if registry.default_state(&name).is_none() { + return Err(invalid("unknown movement definition")); + } + let float = |key: &str| -> io::Result<f32> { + match properties.get(key) { + Some(Tag::Float(bits)) => Ok(f32::from_bits(*bits)), + _ => Err(invalid(format!("missing or invalid movement {key}"))), + } + }; + let fence_gate = match properties.get("fenceGate") { + Some(Tag::Byte(0)) => false, + Some(Tag::Byte(1)) => true, + _ => return Err(invalid("invalid movement gate identity")), + }; + definitions.insert( + name, + MovementCoefficients { + friction: float("friction")?, + speed_factor: float("speedFactor")?, + jump_factor: float("jumpFactor")?, + bounce_restitution: float("bounceRestitution")?, + fall_distance_reduction: float("fallDistanceReduction")?, + fence_gate, + }, + ); + } + for id in 0..registry.len() { + if !definitions.contains_key(®istry.state(BlockStateId(id as u32)).unwrap().name) { + return Err(invalid("missing movement definition")); + } + } + Ok(Self { + registry, + definitions, + }) + } + /// Bind again when tags reload; existing bindings retain their old snapshot. + pub fn bind(&self, tags: &MovementTags) -> io::Result<BoundMovementProperties> { + for name in tags + .fences + .iter() + .chain(&tags.walls) + .chain(&tags.suppresses_bounce) + { + if self.registry.default_state(name).is_none() { + return Err(invalid("unknown movement tag member")); + } + } + let states = (0..self.registry.len()) + .map(|id| { + let name = &self.registry.state(BlockStateId(id as u32)).unwrap().name; + MovementBlock { + coefficients: self.definitions[name], + fence: tags.fences.contains(name), + wall: tags.walls.contains(name), + suppresses_bounce: tags.suppresses_bounce.contains(name), + water: name == "minecraft:water", + bubble_column: name == "minecraft:bubble_column", + } + }) + .collect(); + Ok(BoundMovementProperties { states }) + } +} +pub struct BoundMovementProperties { + states: Vec<MovementBlock>, +} +impl BoundMovementProperties { + pub fn get(&self, state: BlockStateId) -> io::Result<MovementBlock> { + self.states + .get(state.0 as usize) + .copied() + .ok_or_else(|| invalid("movement state outside registry")) + } +} +pub trait MovementBlockProvider { + type Error; + fn movement_block_state(&mut self, position: BlockPos) -> Result<BlockStateId, Self::Error>; +} +#[derive(Debug)] +pub enum MovementBlockError<E> { + Data(io::Error), + World(E), +} +impl<E: fmt::Display> fmt::Display for MovementBlockError<E> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::Data(e) => e.fmt(f), + Self::World(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for MovementBlockError<E> { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { + Some(match self { + Self::Data(e) => e, + Self::World(e) => e, + }) + } +} +pub struct RegistryMovementWorld<'a, W> { + pub properties: &'a BoundMovementProperties, + pub world: &'a mut W, +} +impl<W: MovementBlockProvider> MovementBlockWorld for RegistryMovementWorld<'_, W> { + type Error = MovementBlockError<W::Error>; + type State = MovementBlock; + fn block_state(&mut self, p: BlockPos) -> Result<MovementBlock, Self::Error> { + let state = self + .world + .movement_block_state(p) + .map_err(MovementBlockError::World)?; + self.properties.get(state).map_err(MovementBlockError::Data) + } + fn is_fence(&mut self, s: MovementBlock) -> Result<bool, Self::Error> { + Ok(s.fence) + } + fn is_wall(&mut self, s: MovementBlock) -> Result<bool, Self::Error> { + Ok(s.wall) + } + fn is_fence_gate(&mut self, s: MovementBlock) -> Result<bool, Self::Error> { + Ok(s.coefficients.fence_gate) + } + fn is_water(&mut self, s: MovementBlock) -> Result<bool, Self::Error> { + Ok(s.water) + } + fn is_bubble_column(&mut self, s: MovementBlock) -> Result<bool, Self::Error> { + Ok(s.bubble_column) + } + fn jump_factor(&mut self, s: MovementBlock) -> Result<f32, Self::Error> { + Ok(s.coefficients.jump_factor) + } + fn speed_factor(&mut self, s: MovementBlock) -> Result<f32, Self::Error> { + Ok(s.coefficients.speed_factor) + } +} diff --git a/crates/horizon-world/src/movement_restitution.rs b/crates/horizon-world/src/movement_restitution.rs new file mode 100644 index 000000000..f994548ff --- /dev/null +++ b/crates/horizon-world/src/movement_restitution.rs @@ -0,0 +1,100 @@ +//! Native post-collision restitution, including lazy bounce queries and effects. +use crate::registry::BlockStateId; +use horizon_core::{geometry::Vec3, position::BlockPos}; + +pub struct RestitutionInput { + pub block: BlockStateId, + pub collided_x: bool, + pub collided_z: bool, + pub vertical_collision: bool, + pub collision_below: bool, + pub living: bool, + pub resolved_movement: Vec3, + pub fall_distance: f64, +} +pub trait RestitutionWorld { + type Error; + fn suppressing_bounce(&mut self) -> Result<bool, Self::Error>; + fn entity_bounciness(&mut self) -> Result<f64, Self::Error>; + fn velocity(&mut self) -> Result<Vec3, Self::Error>; + fn effective_gravity(&mut self) -> Result<f64, Self::Error>; + fn block_suppresses_bounce(&mut self, block: BlockStateId) -> Result<bool, Self::Error>; + fn block_bounce_restitution(&mut self, block: BlockStateId) -> Result<f32, Self::Error>; + fn air_drag(&mut self) -> Result<f32, Self::Error>; + fn movement_support_position(&mut self) -> Result<BlockPos, Self::Error>; + fn bounce_on( + &mut self, + block: BlockStateId, + position: BlockPos, + fall_distance: f64, + ) -> Result<(), Self::Error>; + fn bounce_event(&mut self) -> Result<(), Self::Error>; + /// Native field write after bounce callbacks and before setting velocity. + fn mark_position_for_sync(&mut self); + fn set_velocity(&mut self, velocity: Vec3) -> Result<(), Self::Error>; +} +fn java_max(a: f64, b: f64) -> f64 { + if a.is_nan() { + a + } else if b.is_nan() { + b + } else if a == 0.0 && b == 0.0 { + f64::from_bits(a.to_bits() & b.to_bits()) + } else { + a.max(b) + } +} +/// Provider errors preserve already performed effects; no rollback is attempted. +/// Call only when Entity.move's simulation/collision guards request restitution. +pub fn restitute_movement<W: RestitutionWorld>( + world: &mut W, + input: RestitutionInput, +) -> Result<(), W::Error> { + let mut bounce = if world.suppressing_bounce()? { + 0.0 + } else { + world.entity_bounciness()? + }; + let old = world.velocity()?; + let mut velocity = old; + if input.collided_x { + velocity.x = -old.x * bounce; + } + if input.collided_z { + velocity.z = -old.z * bounce; + } + let mut emit = bounce > 0.0 && (input.collided_x || input.collided_z); + if input.vertical_collision { + if input.collision_below { + if -old.y <= world.effective_gravity()? + || world.suppressing_bounce()? + || world.block_suppresses_bounce(input.block)? + { + bounce = 0.0; + } else { + let mut block = world.block_bounce_restitution(input.block)?; + if !input.living { + block *= 0.8f32; + } + bounce = java_max(bounce, f64::from(block)); + } + } + let (gravity, drag) = if bounce > 0.0 { + let fraction = input.resolved_movement.y / old.y; + let gravity = fraction * world.effective_gravity()?; + let drag = 1.0 + fraction * (f64::from(world.air_drag()?) - 1.0); + emit = true; + (gravity, drag) + } else { + (0.0, 1.0) + }; + velocity.y = (gravity - old.y) * drag * bounce; + } + if emit { + let position = world.movement_support_position()?; + world.bounce_on(input.block, position, input.fall_distance)?; + world.bounce_event()?; + world.mark_position_for_sync(); + } + world.set_velocity(velocity) +} diff --git a/crates/horizon-world/src/movement_statistics.rs b/crates/horizon-world/src/movement_statistics.rs new file mode 100644 index 000000000..39385cc18 --- /dev/null +++ b/crates/horizon-world/src/movement_statistics.rs @@ -0,0 +1,128 @@ +//! ServerPlayer.checkMovementStatistics. Called for accepted movement, separately +//! from Entity.move/travel: the packet listener owns that boundary in vanilla. +use horizon_core::geometry::Vec3; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum MovementStat { + Swim, + WalkUnderWater, + WalkOnWater, + Climb, + Sprint, + Crouch, + Walk, + Aviate, + Fly, +} +impl MovementStat { + pub fn name(self) -> &'static str { + match self { + Self::Swim => "swim_one_cm", + Self::WalkUnderWater => "walk_under_water_one_cm", + Self::WalkOnWater => "walk_on_water_one_cm", + Self::Climb => "climb_one_cm", + Self::Sprint => "sprint_one_cm", + Self::Crouch => "crouch_one_cm", + Self::Walk => "walk_one_cm", + Self::Aviate => "aviate_one_cm", + Self::Fly => "fly_one_cm", + } + } +} +pub trait MovementStatisticsWorld { + type Error; + fn passenger(&mut self) -> Result<bool, Self::Error>; + fn swimming(&mut self) -> Result<bool, Self::Error>; + fn eyes_in_water(&mut self) -> Result<bool, Self::Error>; + fn in_water(&mut self) -> Result<bool, Self::Error>; + fn on_climbable(&mut self) -> Result<bool, Self::Error>; + fn on_ground(&mut self) -> Result<bool, Self::Error>; + fn sprinting(&mut self) -> Result<bool, Self::Error>; + fn crouching(&mut self) -> Result<bool, Self::Error>; + fn fall_flying(&mut self) -> Result<bool, Self::Error>; + fn award(&mut self, stat: MovementStat, amount: i32) -> Result<(), Self::Error>; + fn exhaust(&mut self, amount: f32) -> Result<(), Self::Error>; +} +fn round_float(value: f32) -> i32 { + let bits = value.to_bits() as i32; + let shift = 149 - ((bits >> 23) & 0xff); + if (0..32).contains(&shift) { + let mut significand = (bits & 0x7f_ffff) | 0x80_0000; + if bits < 0 { + significand = -significand; + } + ((significand >> shift) + 1) >> 1 + } else { + value as i32 + } +} +fn round_double(value: f64) -> i64 { + let bits = value.to_bits() as i64; + let shift = 1074 - ((bits >> 52) & 0x7ff); + if (0..64).contains(&shift) { + let mut significand = (bits & 0xf_ffff_ffff_ffff) | 0x10_0000_0000_0000; + if bits < 0 { + significand = -significand; + } + ((significand >> shift) + 1) >> 1 + } else { + value as i64 + } +} +fn centimeters(squared: f64) -> i32 { + // Java narrows the square root BEFORE multiplying by 100f and rounding. + round_float(squared.sqrt() as f32 * 100.0) +} +fn distance_with_exhaustion<W: MovementStatisticsWorld>( + world: &mut W, + stat: MovementStat, + cm: i32, + rate: f32, +) -> Result<(), W::Error> { + if cm > 0 { + world.award(stat, cm)?; + world.exhaust(rate * cm as f32 * 0.01)?; + } + Ok(()) +} +pub fn check<W: MovementStatisticsWorld>(world: &mut W, delta: Vec3) -> Result<(), W::Error> { + if world.passenger()? || (delta.x == 0.0 && delta.y == 0.0 && delta.z == 0.0) { + return Ok(()); + } + let distance_3d = || centimeters(delta.x * delta.x + delta.y * delta.y + delta.z * delta.z); + let horizontal = || centimeters(delta.x * delta.x + delta.z * delta.z); + if world.swimming()? { + distance_with_exhaustion(world, MovementStat::Swim, distance_3d(), 0.01) + } else if world.eyes_in_water()? { + distance_with_exhaustion(world, MovementStat::WalkUnderWater, distance_3d(), 0.01) + } else if world.in_water()? { + distance_with_exhaustion(world, MovementStat::WalkOnWater, horizontal(), 0.01) + } else if world.on_climbable()? { + if delta.y > 0.0 { + // The native double round returns long; l2i then wraps, not saturates. + world.award(MovementStat::Climb, round_double(delta.y * 100.0) as i32)?; + } + Ok(()) + } else if world.on_ground()? { + let cm = horizontal(); + if cm > 0 { + let (stat, rate) = if world.sprinting()? { + (MovementStat::Sprint, 0.1) + } else if world.crouching()? { + (MovementStat::Crouch, 0.0) + } else { + (MovementStat::Walk, 0.0) + }; + distance_with_exhaustion(world, stat, cm, rate)?; + } + Ok(()) + } else if world.fall_flying()? { + world.award(MovementStat::Aviate, distance_3d()) + } else { + let cm = horizontal(); + if cm > 25 { + world.award(MovementStat::Fly, cm)?; + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/movement_support.rs b/crates/horizon-world/src/movement_support.rs new file mode 100644 index 000000000..d42f5d008 --- /dev/null +++ b/crates/horizon-world/src/movement_support.rs @@ -0,0 +1,95 @@ +//! Support-dependent block positions and Entity movement factors. +use horizon_core::{geometry::Vec3, position::BlockPos}; + +pub const LEGACY_SUPPORT_OFFSET: f32 = 0.2; +pub const MOVEMENT_SUPPORT_OFFSET: f32 = 0.500001; +pub const ON_SUPPORT_OFFSET: f32 = 1.0e-5; + +/// State handles must remain valid for the duration of a query. Tag predicates +/// are separate to preserve native short circuits and reloadable tag membership. +pub trait MovementBlockWorld { + type Error; + type State: Copy; + fn block_state(&mut self, position: BlockPos) -> Result<Self::State, Self::Error>; + fn is_fence(&mut self, state: Self::State) -> Result<bool, Self::Error>; + fn is_wall(&mut self, state: Self::State) -> Result<bool, Self::Error>; + fn is_fence_gate(&mut self, state: Self::State) -> Result<bool, Self::Error>; + fn is_water(&mut self, state: Self::State) -> Result<bool, Self::Error>; + fn is_bubble_column(&mut self, state: Self::State) -> Result<bool, Self::Error>; + fn jump_factor(&mut self, state: Self::State) -> Result<f32, Self::Error>; + fn speed_factor(&mut self, state: Self::State) -> Result<f32, Self::Error>; +} +#[derive(Clone, Copy, Debug)] +pub struct MovementLocation { + pub position: Vec3, + /// Entity.blockPosition's captured value; do not recompute it here. + pub block_position: BlockPos, + pub supporting_block: Option<BlockPos>, +} +/// Entity.getOnPos(float). The offset is a float widened before subtraction. +pub fn support_position<W: MovementBlockWorld>( + world: &mut W, + position: Vec3, + supporting_block: Option<BlockPos>, + offset: f32, +) -> Result<BlockPos, W::Error> { + if let Some(support) = supporting_block { + if offset > ON_SUPPORT_OFFSET { + let block = world.block_state(support)?; + if (f64::from(offset) <= 0.5 && world.is_fence(block)?) + || world.is_wall(block)? + || world.is_fence_gate(block)? + { + return Ok(support); + } + Ok(BlockPos::new( + support.x, + (position.y - f64::from(offset)).floor() as i32, + support.z, + )) + } else { + Ok(support) + } + } else { + Ok(BlockPos::new( + position.x.floor() as i32, + (position.y - f64::from(offset)).floor() as i32, + position.z.floor() as i32, + )) + } +} +fn below<W: MovementBlockWorld>( + world: &mut W, + location: MovementLocation, +) -> Result<W::State, W::Error> { + let position = support_position( + world, + location.position, + location.supporting_block, + MOVEMENT_SUPPORT_OFFSET, + )?; + world.block_state(position) +} +pub fn block_jump_factor<W: MovementBlockWorld>( + world: &mut W, + location: MovementLocation, +) -> Result<f32, W::Error> { + let current = world.block_state(location.block_position)?; + let current = world.jump_factor(current)?; + // Native always evaluates the lower block, even if current is not one. + let lower = below(world, location)?; + let lower = world.jump_factor(lower)?; + Ok(if current == 1.0 { lower } else { current }) +} +pub fn block_speed_factor<W: MovementBlockWorld>( + world: &mut W, + location: MovementLocation, +) -> Result<f32, W::Error> { + let current = world.block_state(location.block_position)?; + let factor = world.speed_factor(current)?; + if world.is_water(current)? || world.is_bubble_column(current)? || factor != 1.0 { + return Ok(factor); + } + let lower = below(world, location)?; + world.speed_factor(lower) +} diff --git a/crates/horizon-world/src/nbt.rs b/crates/horizon-world/src/nbt.rs new file mode 100644 index 000000000..b271c6567 --- /dev/null +++ b/crates/horizon-world/src/nbt.rs @@ -0,0 +1,606 @@ +//! Java Edition NBT with lossless UTF-16 strings and 26.3 mixed-list wrappers. +use std::collections::BTreeMap; + +/// Java strings can contain unpaired surrogates, which Rust UTF-8 strings cannot. +#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct JavaString(pub Vec<u16>); + +impl From<&str> for JavaString { + fn from(value: &str) -> Self { + Self(value.encode_utf16().collect()) + } +} +impl JavaString { + pub fn to_string(&self) -> Result<String, std::string::FromUtf16Error> { + String::from_utf16(&self.0) + } + pub fn to_string_lossy(&self) -> String { + String::from_utf16_lossy(&self.0) + } +} + +pub type Compound = BTreeMap<JavaString, Tag>; + +/// Float and double variants hold their IEEE bit patterns. Java canonicalizes +/// NaNs on binary output. Loading, like vanilla's valueOf factories, normalizes +/// negative zero to positive zero. +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum Tag { + End, + Byte(i8), + Short(i16), + Int(i32), + Long(i64), + Float(u32), + Double(u64), + ByteArray(Vec<u8>), + String(JavaString), + List(Vec<Tag>), + Compound(Compound), + IntArray(Vec<i32>), + LongArray(Vec<i64>), +} + +impl Tag { + pub fn id(&self) -> u8 { + match self { + Self::End => 0, + Self::Byte(_) => 1, + Self::Short(_) => 2, + Self::Int(_) => 3, + Self::Long(_) => 4, + Self::Float(_) => 5, + Self::Double(_) => 6, + Self::ByteArray(_) => 7, + Self::String(_) => 8, + Self::List(_) => 9, + Self::Compound(_) => 10, + Self::IntArray(_) => 11, + Self::LongArray(_) => 12, + } + } + pub fn get(&self, key: &str) -> Option<&Tag> { + match self { + Self::Compound(map) => map.get(&JavaString::from(key)), + _ => None, + } + } + pub fn get_mut(&mut self, key: &str) -> Option<&mut Tag> { + match self { + Self::Compound(map) => map.get_mut(&JavaString::from(key)), + _ => None, + } + } + pub fn compound(entries: impl IntoIterator<Item = (impl Into<JavaString>, Tag)>) -> Self { + Self::Compound(entries.into_iter().map(|(k, v)| (k.into(), v)).collect()) + } +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct NamedTag { + pub name: JavaString, + pub tag: Tag, +} + +#[derive(Clone, Copy, Debug)] +pub struct Limits { + pub max_bytes: usize, + pub max_nodes: usize, + pub max_depth: usize, +} +impl Default for Limits { + fn default() -> Self { + Self { + max_bytes: 64 * 1024 * 1024, + max_nodes: 1_000_000, + max_depth: 512, + } + } +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Error { + pub offset: usize, + pub reason: &'static str, +} +impl std::fmt::Display for Error { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "NBT at byte {}: {}", self.offset, self.reason) + } +} +impl std::error::Error for Error {} + +struct Reader<'a> { + bytes: &'a [u8], + offset: usize, + limits: Limits, + nodes: usize, +} +impl<'a> Reader<'a> { + fn error(&self, reason: &'static str) -> Error { + Error { + offset: self.offset, + reason, + } + } + fn take(&mut self, len: usize) -> Result<&'a [u8], Error> { + let end = self + .offset + .checked_add(len) + .ok_or_else(|| self.error("length overflow"))?; + if end > self.limits.max_bytes { + return Err(self.error("byte limit exceeded")); + } + let value = self + .bytes + .get(self.offset..end) + .ok_or_else(|| self.error("truncated input"))?; + self.offset = end; + Ok(value) + } + fn number<const N: usize>(&mut self) -> Result<[u8; N], Error> { + Ok(self.take(N)?.try_into().unwrap()) + } + fn byte(&mut self) -> Result<u8, Error> { + Ok(self.take(1)?[0]) + } + fn count(&mut self, element_bytes: usize) -> Result<usize, Error> { + let count = i32::from_be_bytes(self.number()?); + if count < 0 { + return Err(self.error("negative collection length")); + } + let count = count as usize; + let size = count + .checked_mul(element_bytes) + .ok_or_else(|| self.error("length overflow"))?; + if size > self.bytes.len().saturating_sub(self.offset) + || size > self.limits.max_bytes.saturating_sub(self.offset) + { + return Err(self.error("collection exceeds available bytes")); + } + Ok(count) + } + fn string(&mut self) -> Result<JavaString, Error> { + let len = u16::from_be_bytes(self.number()?) as usize; + let bytes = self.take(len)?; + let mut units = Vec::with_capacity(len); + let mut i = 0; + while i < bytes.len() { + let b = bytes[i]; + let (unit, size) = match b { + 0..=127 => (u16::from(b), 1), + 192..=223 if i + 1 < len && bytes[i + 1] & 0xc0 == 0x80 => { + ((u16::from(b & 31) << 6) | u16::from(bytes[i + 1] & 63), 2) + } + 224..=239 + if i + 2 < len + && bytes[i + 1] & 0xc0 == 0x80 + && bytes[i + 2] & 0xc0 == 0x80 => + { + ( + (u16::from(b & 15) << 12) + | (u16::from(bytes[i + 1] & 63) << 6) + | u16::from(bytes[i + 2] & 63), + 3, + ) + } + _ => return Err(self.error("invalid Java modified UTF-8")), + }; + // Match DataInput.readUTF, including accepted overlong sequences. + units.push(unit); + i += size; + } + Ok(JavaString(units)) + } + fn payload(&mut self, id: u8, depth: usize) -> Result<Tag, Error> { + if self.nodes >= self.limits.max_nodes { + return Err(self.error("node limit exceeded")); + } + self.nodes += 1; + if matches!(id, 9 | 10) && depth >= self.limits.max_depth { + return Err(self.error("depth limit exceeded")); + } + Ok(match id { + 0 => Tag::End, + 1 => Tag::Byte(self.byte()? as i8), + 2 => Tag::Short(i16::from_be_bytes(self.number()?)), + 3 => Tag::Int(i32::from_be_bytes(self.number()?)), + 4 => Tag::Long(i64::from_be_bytes(self.number()?)), + 5 => { + let bits = u32::from_be_bytes(self.number()?); + Tag::Float(if f32::from_bits(bits) == 0.0 { 0 } else { bits }) + } + 6 => { + let bits = u64::from_be_bytes(self.number()?); + Tag::Double(if f64::from_bits(bits) == 0.0 { 0 } else { bits }) + } + 7 => { + let len = self.count(1)?; + Tag::ByteArray(self.take(len)?.to_vec()) + } + 8 => Tag::String(self.string()?), + 9 => { + let element_id = self.byte()?; + let len = self.count(0)?; + if len > 0 && (element_id == 0 || element_id > 12) { + return Err(self.error("invalid list element type")); + } + if len > self.limits.max_nodes.saturating_sub(self.nodes) { + return Err(self.error("node limit exceeded")); + } + // At least one byte per valid non-End payload; do not allocate from an unchecked count. + if len > self.bytes.len().saturating_sub(self.offset) { + return Err(self.error("truncated list")); + } + let mut values = Vec::with_capacity(len); + for _ in 0..len { + let mut value = self.payload(element_id, depth + 1)?; + if let Tag::Compound(map) = &mut value { + if map.len() == 1 && map.contains_key(&JavaString::default()) { + value = map.remove(&JavaString::default()).unwrap(); + } + } + values.push(value); + } + Tag::List(values) + } + 10 => { + let mut map = Compound::new(); + loop { + let id = self.byte()?; + if id == 0 { + break; + } + let name = self.string()?; + let value = self.payload(id, depth + 1)?; + map.insert(name, value); // Java maps retain the last duplicate key. + } + Tag::Compound(map) + } + 11 => { + let len = self.count(4)?; + let mut values = Vec::with_capacity(len); + for _ in 0..len { + values.push(i32::from_be_bytes(self.number()?)); + } + Tag::IntArray(values) + } + 12 => { + let len = self.count(8)?; + let mut values = Vec::with_capacity(len); + for _ in 0..len { + values.push(i64::from_be_bytes(self.number()?)); + } + Tag::LongArray(values) + } + _ => return Err(self.error("unknown tag type")), + }) + } +} + +/// Read a file root (type, modified-UTF name, payload), returning bytes consumed. +pub fn read_named(bytes: &[u8], limits: Limits) -> Result<(NamedTag, usize), Error> { + let mut reader = Reader { + bytes, + offset: 0, + limits, + nodes: 0, + }; + let id = reader.byte()?; + let name = if id == 0 { + JavaString::default() + } else { + reader.string()? + }; + let tag = reader.payload(id, 0)?; + Ok((NamedTag { name, tag }, reader.offset)) +} + +/// Read a network root (type and payload, without the file name field). +pub fn read_network(bytes: &[u8], limits: Limits) -> Result<(Tag, usize), Error> { + let mut reader = Reader { + bytes, + offset: 0, + limits, + nodes: 0, + }; + let id = reader.byte()?; + let tag = reader.payload(id, 0)?; + Ok((tag, reader.offset)) +} + +struct Writer { + bytes: Vec<u8>, + limits: Limits, + nodes: usize, +} +impl Writer { + fn error(&self, reason: &'static str) -> Error { + Error { + offset: self.bytes.len(), + reason, + } + } + fn put(&mut self, bytes: &[u8]) -> Result<(), Error> { + if bytes.len() > self.limits.max_bytes.saturating_sub(self.bytes.len()) { + return Err(self.error("byte limit exceeded")); + } + self.bytes.extend_from_slice(bytes); + Ok(()) + } + fn count(&mut self, len: usize) -> Result<(), Error> { + let len = i32::try_from(len).map_err(|_| self.error("collection too long"))?; + self.put(&len.to_be_bytes()) + } + fn string(&mut self, string: &JavaString) -> Result<(), Error> { + let len: usize = string + .0 + .iter() + .map(|&c| match c { + 1..=127 => 1, + 0..=2047 => 2, + _ => 3, + }) + .sum(); + let len = + u16::try_from(len).map_err(|_| self.error("modified UTF-8 exceeds 65535 bytes"))?; + self.put(&len.to_be_bytes())?; + for &c in &string.0 { + match c { + 1..=127 => self.put(&[c as u8])?, + 0..=2047 => self.put(&[0xc0 | (c >> 6) as u8, 0x80 | (c & 63) as u8])?, + _ => self.put(&[ + 0xe0 | (c >> 12) as u8, + 0x80 | ((c >> 6) & 63) as u8, + 0x80 | (c & 63) as u8, + ])?, + } + } + Ok(()) + } + fn payload(&mut self, tag: &Tag, depth: usize) -> Result<(), Error> { + if self.nodes >= self.limits.max_nodes { + return Err(self.error("node limit exceeded")); + } + self.nodes += 1; + if matches!(tag, Tag::List(_) | Tag::Compound(_)) && depth >= self.limits.max_depth { + return Err(self.error("depth limit exceeded")); + } + match tag { + Tag::End => {} + Tag::Byte(v) => self.put(&[*v as u8])?, + Tag::Short(v) => self.put(&v.to_be_bytes())?, + Tag::Int(v) => self.put(&v.to_be_bytes())?, + Tag::Long(v) => self.put(&v.to_be_bytes())?, + Tag::Float(v) => self.put( + &if f32::from_bits(*v).is_nan() { + 0x7fc0_0000_u32 + } else { + *v + } + .to_be_bytes(), + )?, + Tag::Double(v) => self.put( + &if f64::from_bits(*v).is_nan() { + 0x7ff8_0000_0000_0000_u64 + } else { + *v + } + .to_be_bytes(), + )?, + Tag::ByteArray(v) => { + self.count(v.len())?; + self.put(v)?; + } + Tag::String(v) => self.string(v)?, + Tag::List(values) => { + if values.iter().any(|v| matches!(v, Tag::End)) { + return Err(self.error("End cannot be a list element")); + } + let first = values.first().map_or(0, Tag::id); + let id = if values.iter().any(|v| v.id() != first) { + 10 + } else { + first + }; + self.put(&[id])?; + self.count(values.len())?; + for value in values { + let wrapper = matches!(value, Tag::Compound(c) if c.len() == 1 && c.contains_key(&JavaString::default())); + if id == 10 && (value.id() != 10 || wrapper) { + // Emit one synthetic compound layer without cloning the tree. + if depth + 1 >= self.limits.max_depth { + return Err(self.error("depth limit exceeded")); + } + if self.nodes >= self.limits.max_nodes { + return Err(self.error("node limit exceeded")); + } + self.nodes += 1; + self.put(&[value.id()])?; + self.string(&JavaString::default())?; + self.payload(value, depth + 2)?; + self.put(&[0])?; + } else { + self.payload(value, depth + 1)?; + } + } + } + Tag::Compound(values) => { + for (name, value) in values { + if matches!(value, Tag::End) { + return Err(self.error("End cannot be a named value")); + } + self.put(&[value.id()])?; + self.string(name)?; + self.payload(value, depth + 1)?; + } + self.put(&[0])?; + } + Tag::IntArray(v) => { + self.count(v.len())?; + for item in v { + self.put(&item.to_be_bytes())?; + } + } + Tag::LongArray(v) => { + self.count(v.len())?; + for item in v { + self.put(&item.to_be_bytes())?; + } + } + } + Ok(()) + } +} + +pub fn write_named(root: &NamedTag, limits: Limits) -> Result<Vec<u8>, Error> { + let mut writer = Writer { + bytes: Vec::new(), + limits, + nodes: 0, + }; + writer.put(&[root.tag.id()])?; + if root.tag.id() != 0 { + writer.string(&root.name)?; + } + writer.payload(&root.tag, 0)?; + Ok(writer.bytes) +} + +pub fn write_network(tag: &Tag, limits: Limits) -> Result<Vec<u8>, Error> { + let mut writer = Writer { + bytes: Vec::new(), + limits, + nodes: 0, + }; + writer.put(&[tag.id()])?; + writer.payload(tag, 0)?; + Ok(writer.bytes) +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn wire_node_budget_includes_mixed_list_wrappers() { + let tag = Tag::List(vec![Tag::Int(1), Tag::Byte(2)]); + let limits = Limits { + max_nodes: 5, + ..Limits::default() + }; + let bytes = write_network(&tag, limits).unwrap(); + assert_eq!(read_network(&bytes, limits).unwrap().0, tag); + let limits = Limits { + max_nodes: 4, + ..limits + }; + assert!(write_network(&tag, limits).is_err()); + assert!(read_network(&bytes, limits).is_err()); + } + #[test] + fn depth_boundary_and_every_truncated_prefix() { + let mut tag = Tag::Int(1); + for _ in 0..512 { + tag = Tag::List(vec![tag]); + } + let bytes = write_network(&tag, Limits::default()).unwrap(); + assert_eq!(read_network(&bytes, Limits::default()).unwrap().0, tag); + tag = Tag::List(vec![tag]); + assert!(write_network(&tag, Limits::default()).is_err()); + let deeper = write_network( + &tag, + Limits { + max_depth: 513, + ..Limits::default() + }, + ) + .unwrap(); + assert!(read_network(&deeper, Limits::default()).is_err()); + let short = Tag::compound([( + "list", + Tag::List(vec![Tag::Long(42), Tag::ByteArray(vec![1, 2, 3])]), + )]); + let bytes = write_network(&short, Limits::default()).unwrap(); + for end in 0..bytes.len() { + assert!(read_network(&bytes[..end], Limits::default()).is_err()); + } + } + #[test] + fn modified_utf_and_mixed_lists_preserve_java_values() { + let tag = Tag::List(vec![ + Tag::Int(3), + Tag::String(JavaString(vec![0, 0xd800, 0xdc00, 0xdfff])), + Tag::compound([("", Tag::Int(9))]), + Tag::compound([("x", Tag::Byte(1))]), + ]); + let data = write_network(&tag, Limits::default()).unwrap(); + assert_eq!(data[1], 10); + assert_eq!( + read_network(&data, Limits::default()).unwrap(), + (tag, data.len()) + ); + } + #[test] + fn malformed_lengths_truncation_limits_and_utf_are_rejected() { + for data in [ + &[7, 0xff, 0xff, 0xff, 0xff][..], + &[9, 0, 0, 0, 0, 1], + &[8, 0, 1, 0xc0], + &[13], + &[4, 0], + ] { + assert!(read_network(data, Limits::default()).is_err()); + } + let tag = Tag::List(vec![Tag::List(vec![Tag::Int(1)])]); + let bytes = write_network(&tag, Limits::default()).unwrap(); + assert!( + read_network( + &bytes, + Limits { + max_depth: 1, + ..Limits::default() + } + ) + .is_err() + ); + assert!( + read_network( + &bytes, + Limits { + max_nodes: 2, + ..Limits::default() + } + ) + .is_err() + ); + assert!( + read_network( + &bytes, + Limits { + max_bytes: bytes.len() - 1, + ..Limits::default() + } + ) + .is_err() + ); + assert!( + write_network(&Tag::String(JavaString(vec![0; 32768])), Limits::default()).is_err() + ); + } + #[test] + fn duplicate_keys_last_wins_and_nan_output_is_canonical() { + let bytes = [10, 1, 0, 1, b'x', 1, 1, 0, 1, b'x', 2, 0]; + assert_eq!( + read_network(&bytes, Limits::default()).unwrap().0.get("x"), + Some(&Tag::Byte(2)) + ); + assert_eq!( + write_network(&Tag::Float(0xff80_0001), Limits::default()).unwrap(), + [5, 0x7f, 0xc0, 0, 0] + ); + assert_eq!( + write_network(&Tag::Double((-0.0_f64).to_bits()), Limits::default()).unwrap()[1], + 0x80 + ); + } +} diff --git a/crates/horizon-world/src/object_open_map.rs b/crates/horizon-world/src/object_open_map.rs new file mode 100644 index 000000000..f39a48b10 --- /dev/null +++ b/crates/horizon-world/src/object_open_map.rs @@ -0,0 +1,376 @@ +//! Default fastutil object map with live indexed entries and native traversal. +use crate::object_open_set::{CursorError, ObjectKey}; +use std::{ + cell::{Cell, RefCell}, + rc::Rc, +}; +struct Table<K, V> { + keys: Vec<Option<K>>, + values: Vec<Option<V>>, +} +impl<K, V> Table<K, V> { + fn new(n: usize) -> Self { + Self { + keys: std::iter::repeat_with(|| None).take(n + 1).collect(), + values: std::iter::repeat_with(|| None).take(n + 1).collect(), + } + } +} +/// An entry retains its array index, not a copy of its key/value. Clones share +/// invalidation when its entry iterator removes that entry. +#[derive(Clone)] +pub struct Entry(Rc<Cell<i32>>); +pub struct Cursor<K> { + position: i32, + last: i32, + remaining: i32, + null: bool, + wrapped: Option<Vec<Option<K>>>, + entry: Option<Entry>, +} +impl<K> Cursor<K> { + pub fn has_next(&self) -> bool { + self.remaining != 0 + } +} +#[derive(Debug)] +pub enum TraversalError<E> { + Cursor(CursorError), + Callback(E), +} +pub struct ObjectOpenMap<K, V> { + table: Rc<RefCell<Table<K, V>>>, + size: i32, + null: bool, +} +impl<K, V> Default for ObjectOpenMap<K, V> { + fn default() -> Self { + Self { + table: Rc::new(RefCell::new(Table::new(32))), + size: 0, + null: false, + } + } +} +fn mixed(hash: i32) -> usize { + let h = (hash as u32).wrapping_mul(0x9e3779b9); + (h ^ (h >> 16)) as usize +} +impl<K: ObjectKey + Clone, V: Clone> ObjectOpenMap<K, V> { + pub fn len(&self) -> i32 { + self.size + } + pub fn is_empty(&self) -> bool { + self.size == 0 + } + fn n(&self) -> usize { + self.table.borrow().keys.len() - 1 + } + fn max_fill(&self) -> i32 { + (self.n() * 3 / 4) as i32 + } + fn find(&self, key: &K) -> usize { + let table = self.table.borrow(); + let mask = table.keys.len() - 2; + let mut p = mixed(key.object_hash()) & mask; + while table.keys[p].as_ref().is_some_and(|k| k != key) { + p = (p + 1) & mask; + } + p + } + pub fn contains_key(&self, key: Option<&K>) -> bool { + key.map_or(self.null, |k| { + self.table.borrow().keys[self.find(k)].is_some() + }) + } + pub fn get(&self, key: Option<&K>) -> Option<V> { + let p = key.map_or(self.n(), |k| self.find(k)); + let table = self.table.borrow(); + if key.map_or(self.null, |_| table.keys[p].is_some()) { + table.values[p].clone() + } else { + None + } + } + pub fn entries(&self) -> Vec<(Option<K>, Option<V>)> { + let table = self.table.borrow(); + let n = table.keys.len() - 1; + let mut entries = Vec::new(); + if self.null { + entries.push((None, table.values[n].clone())); + } + for p in (0..n).rev() { + if table.keys[p].is_some() { + entries.push((table.keys[p].clone(), table.values[p].clone())); + } + } + entries + } + pub fn put(&mut self, key: Option<K>, value: Option<V>) -> Option<V> { + let p = key.as_ref().map_or(self.n(), |k| self.find(k)); + let existing = if key.is_some() { + self.table.borrow().keys[p].is_some() + } else { + self.null + }; + let previous = std::mem::replace(&mut self.table.borrow_mut().values[p], value); + if existing { + return previous; + } + if key.is_none() { + self.null = true; + } + self.table.borrow_mut().keys[p] = key; + let old = self.size; + self.size = self.size.wrapping_add(1); + if old >= self.max_fill() { + self.rehash( + (((self.size + 1) as f64 / 0.75).ceil() as usize) + .max(2) + .next_power_of_two(), + ); + } + None + } + fn rehash(&mut self, n: usize) { + let old = self.table.borrow(); + let old_n = old.keys.len() - 1; + let mut table = Table::new(n); + for p in (0..old_n).rev() { + if let Some(key) = &old.keys[p] { + let mut dest = mixed(key.object_hash()) & (n - 1); + while table.keys[dest].is_some() { + dest = (dest + 1) & (n - 1); + } + table.keys[dest] = Some(key.clone()); + table.values[dest] = old.values[p].clone(); + } + } + table.values[n] = old.values[old_n].clone(); + drop(old); + self.table = Rc::new(RefCell::new(table)); + } + fn shift( + &mut self, + mut hole: usize, + mut cursor: Option<&mut Cursor<K>>, + ) -> Result<(), CursorError> { + let mut table = self.table.borrow_mut(); + let mask = table.keys.len() - 2; + loop { + let mut p = (hole + 1) & mask; + loop { + let Some(key) = &table.keys[p] else { + *table + .keys + .get_mut(hole) + .ok_or(CursorError::IndexOutOfBounds)? = None; + table.values[hole] = None; + return Ok(()); + }; + let home = mixed(key.object_hash()) & mask; + if if hole <= p { + hole >= home || home > p + } else { + hole >= home && home > p + } { + break; + } + p = (p + 1) & mask; + } + if p < hole { + if let Some(c) = &mut cursor { + c.wrapped + .get_or_insert_with(Vec::new) + .push(table.keys[p].clone()); + } + } + let key = table.keys[p].clone(); + let value = table.values[p].clone(); + *table + .keys + .get_mut(hole) + .ok_or(CursorError::IndexOutOfBounds)? = key; + table.values[hole] = value; + hole = p; + } + } + pub fn remove(&mut self, key: Option<&K>) -> Option<V> { + if !self.contains_key(key) { + return None; + } + let p = key.map_or(self.n(), |k| self.find(k)); + let old = self.table.borrow().values[p].clone(); + self.size = self.size.wrapping_sub(1); + if key.is_none() { + self.null = false; + let mut table = self.table.borrow_mut(); + table.keys[p] = None; + table.values[p] = None; + } else { + self.shift(p, None).unwrap(); + } + if self.n() > 32 && self.size < self.max_fill() / 4 { + self.rehash(self.n() / 2); + } + old + } + pub fn clear(&mut self) { + if self.size == 0 { + return; + } + self.size = 0; + self.null = false; + let mut table = self.table.borrow_mut(); + table.keys.fill(None); + table.values.fill(None); + } + pub fn cursor(&self) -> Cursor<K> { + Cursor { + position: self.n() as i32, + last: -1, + remaining: self.size, + null: self.null, + wrapped: None, + entry: None, + } + } + pub fn next_entry(&self, c: &mut Cursor<K>) -> Result<Entry, CursorError> { + if !c.has_next() { + return Err(CursorError::NoSuchElement); + } + c.remaining = c.remaining.wrapping_sub(1); + let index = if c.null { + c.null = false; + c.last = self.n() as i32; + c.last + } else { + loop { + c.position = c.position.wrapping_sub(1); + if c.position < 0 { + c.last = i32::MIN; + let key = c + .wrapped + .as_ref() + .ok_or(CursorError::MissingWrapped)? + .get(c.position.wrapping_neg().wrapping_sub(1) as usize) + .ok_or(CursorError::IndexOutOfBounds)? + .as_ref() + .ok_or(CursorError::MissingWrapped)?; + let p = self.find(key); + // Deleting a wrapped member externally can make native iteration + // nonterminating. Such invalidated wrapped iterators are excluded. + if self.table.borrow().keys[p].is_none() { + return Err(CursorError::MissingWrapped); + } + break p as i32; + } + if self + .table + .borrow() + .keys + .get(c.position as usize) + .ok_or(CursorError::IndexOutOfBounds)? + .is_some() + { + c.last = c.position; + break c.position; + } + } + }; + let entry = Entry(Rc::new(Cell::new(index))); + c.entry = Some(entry.clone()); + Ok(entry) + } + pub fn entry_key(&self, e: &Entry) -> Result<Option<K>, CursorError> { + self.table + .borrow() + .keys + .get(e.0.get() as usize) + .cloned() + .ok_or(CursorError::IndexOutOfBounds) + } + pub fn entry_value(&self, e: &Entry) -> Result<Option<V>, CursorError> { + self.table + .borrow() + .values + .get(e.0.get() as usize) + .cloned() + .ok_or(CursorError::IndexOutOfBounds) + } + pub fn set_entry_value( + &mut self, + e: &Entry, + value: Option<V>, + ) -> Result<Option<V>, CursorError> { + Ok(std::mem::replace( + self.table + .borrow_mut() + .values + .get_mut(e.0.get() as usize) + .ok_or(CursorError::IndexOutOfBounds)?, + value, + )) + } + pub fn remove_current(&mut self, c: &mut Cursor<K>) -> Result<(), CursorError> { + if c.last == -1 { + return Err(CursorError::NoCurrentEntry); + } + if c.last == self.n() as i32 { + self.null = false; + let mut t = self.table.borrow_mut(); + let n = t.keys.len() - 1; + t.keys[n] = None; + t.values[n] = None; + } else if c.position >= 0 { + self.shift(c.last as usize, Some(c))?; + } else { + let key = c + .wrapped + .as_mut() + .ok_or(CursorError::MissingWrapped)? + .get_mut(c.position.wrapping_neg().wrapping_sub(1) as usize) + .ok_or(CursorError::IndexOutOfBounds)? + .take(); + self.remove(key.as_ref()); + c.last = -1; + if let Some(e) = &c.entry { + e.0.set(-1); + } + return Ok(()); + } + self.size = self.size.wrapping_sub(1); + c.last = -1; + if let Some(e) = &c.entry { + e.0.set(-1); + } + Ok(()) + } + pub fn for_each<E>( + &mut self, + mut action: impl FnMut(&mut Self, Option<K>, Option<V>) -> Result<(), E>, + ) -> Result<(), TraversalError<E>> { + if self.null { + let value = self.table.borrow().values[self.n()].clone(); + action(self, None, value).map_err(TraversalError::Callback)?; + } + // Keys are captured after the null callback. Values remain live even if + // a callback rehashes the map and replaces both native arrays. + let keys = self.table.clone(); + let n = self.n(); + for p in (0..n).rev() { + let key = keys.borrow().keys[p].clone(); + if key.is_some() { + let value = self + .table + .borrow() + .values + .get(p) + .cloned() + .ok_or(TraversalError::Cursor(CursorError::IndexOutOfBounds))?; + action(self, key, value).map_err(TraversalError::Callback)?; + } + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/object_open_set.rs b/crates/horizon-world/src/object_open_set.rs new file mode 100644 index 000000000..0068c9d8a --- /dev/null +++ b/crates/horizon-world/src/object_open_set.rs @@ -0,0 +1,242 @@ +//! Default fastutil ObjectOpenHashSet storage and live iterator semantics. +//! Key hashing/equality must be pure; null is represented by None. +pub trait ObjectKey: Eq { + fn object_hash(&self) -> i32; +} +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum CursorError { + NoSuchElement, + NoCurrentEntry, + MissingWrapped, + IndexOutOfBounds, +} +pub struct Cursor<K> { + position: i32, + last: i32, + remaining: i32, + null: bool, + wrapped: Option<Vec<Option<K>>>, +} +impl<K> Cursor<K> { + pub fn has_next(&self) -> bool { + self.remaining != 0 + } +} +pub struct ObjectOpenSet<K> { + slots: Vec<Option<K>>, + size: i32, + null: bool, +} +impl<K> Default for ObjectOpenSet<K> { + fn default() -> Self { + Self { + slots: std::iter::repeat_with(|| None).take(33).collect(), + size: 0, + null: false, + } + } +} +fn mixed(hash: i32) -> usize { + let h = (hash as u32).wrapping_mul(0x9e3779b9); + (h ^ (h >> 16)) as usize +} +impl<K: ObjectKey + Clone> ObjectOpenSet<K> { + pub fn len(&self) -> i32 { + self.size + } + pub fn is_empty(&self) -> bool { + self.size == 0 + } + fn n(&self) -> usize { + self.slots.len() - 1 + } + fn max_fill(&self) -> i32 { + (self.n() * 3 / 4) as i32 + } + fn find(&self, key: &K) -> usize { + let mask = self.n() - 1; + let mut p = mixed(key.object_hash()) & mask; + while self.slots[p].as_ref().is_some_and(|old| old != key) { + p = (p + 1) & mask; + } + p + } + pub fn contains(&self, key: Option<&K>) -> bool { + key.map_or(self.null, |key| self.slots[self.find(key)].is_some()) + } + pub fn get(&self, key: &K) -> Option<&K> { + self.slots[self.find(key)].as_ref() + } + pub fn values(&self) -> impl Iterator<Item = Option<&K>> { + self.null.then_some(None).into_iter().chain( + self.slots[..self.n()] + .iter() + .rev() + .filter_map(|v| v.as_ref().map(Some)), + ) + } + pub fn add(&mut self, key: Option<K>) -> bool { + if let Some(key) = key { + let p = self.find(&key); + if self.slots[p].is_some() { + return false; + } + self.slots[p] = Some(key); + } else { + if self.null { + return false; + } + self.null = true; + } + let old = self.size; + self.size = self.size.wrapping_add(1); + if old >= self.max_fill() { + self.rehash( + (((self.size + 1) as f64 / 0.75).ceil() as usize) + .max(2) + .next_power_of_two(), + ); + } + true + } + fn rehash(&mut self, capacity: usize) { + let old = std::mem::replace(&mut self.slots, vec![None; capacity + 1]); + for key in old.into_iter().rev().flatten() { + let p = self.find(&key); + self.slots[p] = Some(key); + } + } + fn shift( + &mut self, + mut hole: usize, + mut cursor: Option<&mut Cursor<K>>, + ) -> Result<(), CursorError> { + let mask = self.n() - 1; + loop { + let mut p = (hole + 1) & mask; + loop { + let Some(key) = &self.slots[p] else { + *self + .slots + .get_mut(hole) + .ok_or(CursorError::IndexOutOfBounds)? = None; + return Ok(()); + }; + let home = mixed(key.object_hash()) & mask; + if if hole <= p { + hole >= home || home > p + } else { + hole >= home && home > p + } { + break; + } + p = (p + 1) & mask; + } + if p < hole { + if let Some(cursor) = &mut cursor { + cursor + .wrapped + .get_or_insert_with(Vec::new) + .push(self.slots[p].clone()); + } + } + let key = self.slots[p].clone(); + *self + .slots + .get_mut(hole) + .ok_or(CursorError::IndexOutOfBounds)? = key; + hole = p; + } + } + pub fn remove(&mut self, key: Option<&K>) -> bool { + if let Some(key) = key { + let p = self.find(key); + if self.slots[p].is_none() { + return false; + } + self.size = self.size.wrapping_sub(1); + self.shift(p, None).unwrap(); + } else { + if !self.null { + return false; + } + self.null = false; + self.size = self.size.wrapping_sub(1); + } + if self.n() > 32 && self.size < self.max_fill() / 4 { + self.rehash(self.n() / 2); + } + true + } + pub fn clear(&mut self) { + if self.size == 0 { + return; + } + self.size = 0; + self.null = false; + self.slots.fill(None); + } + pub fn cursor(&self) -> Cursor<K> { + Cursor { + position: self.n() as i32, + last: -1, + remaining: self.size, + null: self.null, + wrapped: None, + } + } + /// The cursor reads the live slot array. Unlike HashMap it has no + /// modification counter, including when callbacks clear or resize the set. + pub fn next(&self, cursor: &mut Cursor<K>) -> Result<Option<K>, CursorError> { + if !cursor.has_next() { + return Err(CursorError::NoSuchElement); + } + cursor.remaining = cursor.remaining.wrapping_sub(1); + if cursor.null { + cursor.null = false; + cursor.last = self.n() as i32; + return Ok(None); + } + loop { + cursor.position = cursor.position.wrapping_sub(1); + if cursor.position < 0 { + cursor.last = i32::MIN; + let wrapped = cursor.wrapped.as_ref().ok_or(CursorError::MissingWrapped)?; + return wrapped + .get(cursor.position.wrapping_neg().wrapping_sub(1) as usize) + .cloned() + .ok_or(CursorError::IndexOutOfBounds); + } + let key = self + .slots + .get(cursor.position as usize) + .ok_or(CursorError::IndexOutOfBounds)?; + if key.is_some() { + cursor.last = cursor.position; + return Ok(key.clone()); + } + } + } + pub fn remove_current(&mut self, cursor: &mut Cursor<K>) -> Result<(), CursorError> { + if cursor.last == -1 { + return Err(CursorError::NoCurrentEntry); + } + if cursor.last == self.n() as i32 { + self.null = false; + } else if cursor.position >= 0 { + self.shift(cursor.last as usize, Some(cursor))?; + } else { + let wrapped = cursor.wrapped.as_mut().ok_or(CursorError::MissingWrapped)?; + let key = wrapped + .get_mut(cursor.position.wrapping_neg().wrapping_sub(1) as usize) + .ok_or(CursorError::IndexOutOfBounds)? + .take(); + self.remove(key.as_ref()); + cursor.last = -1; + return Ok(()); + } + self.size = self.size.wrapping_sub(1); + cursor.last = -1; + Ok(()) + } +} diff --git a/crates/horizon-world/src/piston_movement.rs b/crates/horizon-world/src/piston_movement.rs new file mode 100644 index 000000000..bf94ff87b --- /dev/null +++ b/crates/horizon-world/src/piston_movement.rs @@ -0,0 +1,50 @@ +//! Per-tick Entity piston movement accumulation and displacement limiting. +use horizon_core::geometry::Vec3; + +#[derive(Clone, Copy, Debug, Default, PartialEq)] +pub struct PistonMovement { + pub game_time: i64, + pub deltas: [f64; 3], +} +impl PistonMovement { + /// Native queries game time only after the length threshold. A failed time + /// query leaves this accumulator unchanged. Tiny motion passes + /// through before either the query or per-tick reset. + pub fn limit<E>( + &mut self, + movement: Vec3, + game_time: impl FnOnce() -> Result<i64, E>, + ) -> Result<Vec3, E> { + let length = movement.x * movement.x + movement.y * movement.y + movement.z * movement.z; + if length <= 1.0e-7 { + return Ok(movement); + } + let time = game_time()?; + if self.game_time != time { + self.deltas = [0.0; 3]; + self.game_time = time; + } + for (axis, value) in [movement.x, movement.y, movement.z].into_iter().enumerate() { + if value != 0.0 { + let sum = value + self.deltas[axis]; + // Math.min in native Mth.clamp preserves NaN. + let next = if sum < -0.51 { + -0.51 + } else if sum.is_nan() { + sum + } else { + sum.min(0.51) + }; + let change = next - self.deltas[axis]; + self.deltas[axis] = next; + if change.abs() <= f64::from(1.0e-5f32) { + return Ok(Vec3::new(0.0, 0.0, 0.0)); + } + let mut result = [0.0; 3]; + result[axis] = change; + return Ok(Vec3::new(result[0], result[1], result[2])); + } + } + Ok(Vec3::new(0.0, 0.0, 0.0)) + } +} diff --git a/crates/horizon-world/src/piston_shape.rs b/crates/horizon-world/src/piston_shape.rs new file mode 100644 index 000000000..d14f8f301 --- /dev/null +++ b/crates/horizon-world/src/piston_shape.rs @@ -0,0 +1,196 @@ +//! Moving-piston collision selection and interpolation over immutable state IDs. +//! Tick progression, entity pushing and world mutation belong to the world loop. +use crate::{ + compression::invalid, + registry::{BlockRegistry, BlockStateId}, +}; +use horizon_core::geometry::{Direction, ShapeError, ShapeOp, Vec3, VoxelShape}; +use std::{collections::BTreeMap, io}; +#[derive(Clone, Copy, Debug)] +pub struct MovingPistonState { + pub moved_state: BlockStateId, + pub direction: Direction, + pub extending: bool, + pub source: bool, + pub progress: f32, + pub previous_progress: f32, +} +impl MovingPistonState { + pub fn movement_direction(self) -> Direction { + if self.extending { + self.direction + } else { + self.direction.opposite() + } + } + pub fn interpolated_progress(self, partial: f32) -> f32 { + let partial = if partial > 1.0 { 1.0 } else { partial }; + self.previous_progress + partial * (self.progress - self.previous_progress) + } + pub fn interpolated_offset(self, partial: f32) -> [f32; 3] { + self.offset(self.interpolated_progress(partial)) + } + fn offset(self, progress: f32) -> [f32; 3] { + let extended = if self.extending { + progress - 1.0 + } else { + 1.0 - progress + }; + self.direction.normal().map(|step| step as f32 * extended) + } +} +pub trait PistonCollisionWorld { + type Error; + /// The no-entity-context BlockState collision query at the supplied position. + fn collision_shape( + &mut self, + state: BlockStateId, + position: [i32; 3], + ) -> Result<VoxelShape, Self::Error>; +} +#[derive(Debug)] +pub enum PistonShapeError<E> { + World(E), + Shape(ShapeError), + Registry(io::Error), +} +impl<E: std::fmt::Display> std::fmt::Display for PistonShapeError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Shape(e) => e.fmt(f), + Self::Registry(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for PistonShapeError<E> {} +struct Base { + extended: BlockStateId, + facing: Direction, + sticky: bool, +} +pub struct PistonBlockBindings<'r> { + registry: &'r BlockRegistry, + bases: BTreeMap<BlockStateId, Base>, + heads: [[[BlockStateId; 2]; 6]; 2], +} +const DIRECTION_NAMES: [&str; 6] = ["down", "up", "north", "south", "west", "east"]; +impl<'r> PistonBlockBindings<'r> { + pub fn new(registry: &'r BlockRegistry) -> io::Result<Self> { + let mut bases = BTreeMap::new(); + for id in 0..registry.len() { + let id = BlockStateId(id as u32); + let state = registry.state(id).unwrap(); + if !matches!( + state.name.as_str(), + "minecraft:piston" | "minecraft:sticky_piston" + ) { + continue; + } + let facing = state + .properties + .get("facing") + .and_then(|name| DIRECTION_NAMES.iter().position(|v| v == name)) + .ok_or_else(|| invalid("invalid piston facing"))?; + let mut extended = state.clone(); + extended.properties.insert("extended".into(), "true".into()); + bases.insert( + id, + Base { + extended: registry + .id(&extended) + .ok_or_else(|| invalid("missing extended piston state"))?, + facing: Direction::ALL[facing], + sticky: state.name == "minecraft:sticky_piston", + }, + ); + } + let default = registry + .default_state("minecraft:piston_head") + .and_then(|id| registry.state(id)) + .ok_or_else(|| invalid("missing piston head"))?; + let mut heads = [[[BlockStateId(0); 2]; 6]; 2]; + for (kind, type_heads) in heads.iter_mut().enumerate() { + for (direction, variants) in type_heads.iter_mut().enumerate() { + for (short, id) in variants.iter_mut().enumerate() { + let mut state = default.clone(); + state.properties.insert( + "type".into(), + if kind == 0 { "normal" } else { "sticky" }.into(), + ); + state + .properties + .insert("facing".into(), DIRECTION_NAMES[direction].into()); + state + .properties + .insert("short".into(), (short != 0).to_string()); + *id = registry + .id(&state) + .ok_or_else(|| invalid("missing piston head variant"))?; + } + } + } + Ok(Self { + registry, + bases, + heads, + }) + } + fn validate(&self, state: BlockStateId) -> io::Result<()> { + if self.registry.state(state).is_none() { + Err(invalid("piston moved state outside registry")) + } else { + Ok(()) + } + } + /// The collision-related state used by the native entity-pushing path. + /// Its sticky/short/facing rules differ from the entity's own collision head. + pub fn collision_related_state(&self, piston: MovingPistonState) -> io::Result<BlockStateId> { + self.validate(piston.moved_state)?; + if !piston.extending && piston.source { + if let Some(base) = self.bases.get(&piston.moved_state) { + return Ok(self.heads[usize::from(base.sticky)][base.facing as usize] + [usize::from(piston.progress > 0.25)]); + } + } + Ok(piston.moved_state) + } + pub fn collision_shape<W: PistonCollisionWorld>( + &self, + world: &mut W, + position: [i32; 3], + piston: MovingPistonState, + noclip: Option<Direction>, + ) -> Result<VoxelShape, PistonShapeError<W::Error>> { + self.validate(piston.moved_state) + .map_err(PistonShapeError::Registry)?; + let base = if !piston.extending && piston.source { + if let Some(base) = self.bases.get(&piston.moved_state) { + world + .collision_shape(base.extended, position) + .map_err(PistonShapeError::World)? + } else { + VoxelShape::empty() + } + } else { + VoxelShape::empty() + }; + // The stationary base is queried before this native noclip shortcut. + if piston.progress < 1.0 && noclip == Some(piston.movement_direction()) { + return Ok(base); + } + let state = if piston.source { + let short = piston.extending != (1.0f32 - piston.progress < 0.25f32); + self.heads[0][piston.direction as usize][usize::from(short)] + } else { + piston.moved_state + }; + let offset = piston.offset(piston.progress).map(f64::from); + let moving = world + .collision_shape(state, position) + .map_err(PistonShapeError::World)? + .moved(Vec3::new(offset[0], offset[1], offset[2])); + base.join(&moving, ShapeOp::OR) + .map_err(PistonShapeError::Shape) + } +} diff --git a/crates/horizon-world/src/player_equipment.rs b/crates/horizon-world/src/player_equipment.rs new file mode 100644 index 000000000..7e9c9b95f --- /dev/null +++ b/crates/horizon-world/src/player_equipment.rs @@ -0,0 +1,83 @@ +//! Player hand access through the selected inventory slot and shared equipment. +//! Equipping writes storage before invoking LivingEntity's onEquipItem hook. +use crate::{ + item_stack_refs::StackRef, + player_inventory::{EquipmentSlot, PlayerInventory}, +}; +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum InteractionHand { + Main, + Off, +} +impl InteractionHand { + pub fn slot(self) -> EquipmentSlot { + match self { + Self::Main => EquipmentSlot::MainHand, + Self::Off => EquipmentSlot::OffHand, + } + } +} +pub fn get<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq>( + inv: &PlayerInventory<I, K, V>, + slot: EquipmentSlot, +) -> StackRef<I, K, V> { + if slot == EquipmentSlot::MainHand { + inv.selected_item() + } else { + inv.equipment().get(slot) + } +} +pub fn set<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq>( + inv: &mut PlayerInventory<I, K, V>, + slot: EquipmentSlot, + stack: StackRef<I, K, V>, +) -> StackRef<I, K, V> { + if slot == EquipmentSlot::MainHand { + inv.set_selected_item(stack) + } else { + inv.equipment().set(slot, stack) + } +} +pub fn is_empty<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq>( + inv: &PlayerInventory<I, K, V>, +) -> bool { + inv.selected_item().read().is_empty() + && inv + .equipment() + .entries() + .iter() + .all(|(_, s)| s.read().is_empty()) +} +pub trait EquipWorld<I, K, V> { + type Error; + fn on_equip( + &mut self, + inv: &mut PlayerInventory<I, K, V>, + slot: EquipmentSlot, + old: StackRef<I, K, V>, + new: StackRef<I, K, V>, + ) -> Result<(), Self::Error>; +} +pub fn set_item_slot<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq, W: EquipWorld<I, K, V>>( + w: &mut W, + inv: &mut PlayerInventory<I, K, V>, + slot: EquipmentSlot, + stack: StackRef<I, K, V>, +) -> Result<(), W::Error> { + let old = set(inv, slot, stack.clone()); + w.on_equip(inv, slot, old, stack) +} +pub fn get_hand<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq>( + inv: &PlayerInventory<I, K, V>, + hand: InteractionHand, +) -> StackRef<I, K, V> { + get(inv, hand.slot()) +} +pub fn set_hand<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq, W: EquipWorld<I, K, V>>( + w: &mut W, + inv: &mut PlayerInventory<I, K, V>, + hand: InteractionHand, + stack: StackRef<I, K, V>, +) -> Result<(), W::Error> { + set_item_slot(w, inv, hand.slot(), stack) +} diff --git a/crates/horizon-world/src/player_food.rs b/crates/horizon-world/src/player_food.rs new file mode 100644 index 000000000..c7869799a --- /dev/null +++ b/crates/horizon-world/src/player_food.rs @@ -0,0 +1,54 @@ +//! Player-specific hunger guards and virtual/direct state access distinctions. +use crate::food::FoodData; +pub trait PlayerFoodWorld { + type Error; + /// Reads the abilities field directly, not the virtual getAbilities method. + fn invulnerable_direct(&self) -> bool; + fn level_is_client(&mut self) -> Result<bool, Self::Error>; + fn add_exhaustion_direct(&mut self, value: f32) -> Result<(), Self::Error>; + fn needs_food_direct(&mut self) -> Result<bool, Self::Error>; + fn enough_food_virtual(&mut self) -> Result<bool, Self::Error>; + fn may_fly_virtual(&mut self) -> Result<bool, Self::Error>; +} +pub fn cause_exhaustion<W: PlayerFoodWorld>(world: &mut W, value: f32) -> Result<(), W::Error> { + if !world.invulnerable_direct() && !world.level_is_client()? { + world.add_exhaustion_direct(value)?; + } + Ok(()) +} +pub fn can_eat<W: PlayerFoodWorld>(world: &mut W, always_edible: bool) -> Result<bool, W::Error> { + Ok(world.invulnerable_direct() || always_edible || world.needs_food_direct()?) +} +pub fn enough_food_for_manoeuvres<W: PlayerFoodWorld>(world: &mut W) -> Result<bool, W::Error> { + Ok(world.enough_food_virtual()? || world.may_fly_virtual()?) +} +/// Binding for ordinary stored player state. Specialized entity implementations +/// can supply their own virtual food/ability lookups through PlayerFoodWorld. +pub struct StoredPlayerFood<'a> { + pub food: &'a mut FoodData, + pub invulnerable: bool, + pub client_side: bool, + pub may_fly: bool, +} +impl PlayerFoodWorld for StoredPlayerFood<'_> { + type Error = std::convert::Infallible; + fn invulnerable_direct(&self) -> bool { + self.invulnerable + } + fn level_is_client(&mut self) -> Result<bool, Self::Error> { + Ok(self.client_side) + } + fn add_exhaustion_direct(&mut self, value: f32) -> Result<(), Self::Error> { + self.food.add_exhaustion(value); + Ok(()) + } + fn needs_food_direct(&mut self) -> Result<bool, Self::Error> { + Ok(self.food.needs_food()) + } + fn enough_food_virtual(&mut self) -> Result<bool, Self::Error> { + Ok(self.food.has_enough_food()) + } + fn may_fly_virtual(&mut self) -> Result<bool, Self::Error> { + Ok(self.may_fly) + } +} diff --git a/crates/horizon-world/src/player_health.rs b/crates/horizon-world/src/player_health.rs new file mode 100644 index 000000000..b64f545cb --- /dev/null +++ b/crates/horizon-world/src/player_health.rs @@ -0,0 +1,157 @@ +//! Player absorption uses virtual synchronized-data access, unlike base living +//! absorption field storage. Health keeps its direct synchronized-data access. +use crate::{ + attribute_health::HealthAttributes, + attributes::entity::{EntityAttributes, LookupError}, + compression::invalid, + living_health::{self, HealthWorld}, + synced_floats::{DataError, Observer, SyncedFloats}, +}; +use std::{fmt, io}; +pub trait PlayerHealthWorld: HealthWorld { + fn entity_data(&mut self) -> Result<Self::Data, Self::Error>; + fn read_absorption(&mut self, data: Self::Data) -> Result<f32, Self::Error>; + fn write_absorption(&mut self, data: Self::Data, value: f32) -> Result<(), Self::Error>; +} +pub fn absorption<W: PlayerHealthWorld>(world: &mut W) -> Result<f32, W::Error> { + let data = world.entity_data()?; + world.read_absorption(data) +} +pub fn internal_set_absorption<W: PlayerHealthWorld>( + world: &mut W, + value: f32, +) -> Result<(), W::Error> { + let data = world.entity_data()?; + world.write_absorption(data, value) +} +#[derive(Clone, Copy, Debug)] +pub struct PlayerFloatIds { + pub health: u8, + pub absorption: u8, +} +#[derive(Debug)] +pub enum PlayerHealthError<E, A = LookupError> { + Attribute(A), + Data(DataError<E>), +} +impl<E: fmt::Display, A: fmt::Debug> fmt::Display for PlayerHealthError<E, A> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::Attribute(e) => write!(f, "player health attribute lookup: {e:?}"), + Self::Data(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static, A: fmt::Debug> std::error::Error for PlayerHealthError<E, A> {} +/// Ordinary registered-player state, borrowing its actual float table. IDs come +/// from the pinned entity-data schema; construction does not invent spawn state. +pub struct PlayerAttributeHealth<'a, O, A: HealthAttributes = EntityAttributes> { + attributes: &'a mut A, + data: &'a mut SyncedFloats, + ids: PlayerFloatIds, + max_health: A::Key, + max_absorption: A::Key, + dead: bool, + observer: &'a mut O, +} +impl<'a, O: Observer, A: HealthAttributes> PlayerAttributeHealth<'a, O, A> { + pub fn new( + attributes: &'a mut A, + data: &'a mut SyncedFloats, + ids: PlayerFloatIds, + dead: bool, + observer: &'a mut O, + ) -> io::Result<Self> { + if ids.health == ids.absorption + || data.get(ids.health).is_err() + || data.get(ids.absorption).is_err() + { + return Err(invalid("missing or aliased player float fields")); + } + let max_health = attributes + .health_attribute_key("minecraft:max_health") + .ok_or_else(|| invalid("missing MAX_HEALTH definition"))?; + let max_absorption = attributes + .health_attribute_key("minecraft:max_absorption") + .ok_or_else(|| invalid("missing MAX_ABSORPTION definition"))?; + Ok(Self { + attributes, + data, + ids, + max_health, + max_absorption, + dead, + observer, + }) + } + pub fn heal(&mut self, amount: f32) -> Result<(), PlayerHealthError<O::Error, A::Error>> { + living_health::heal(self, amount) + } + pub fn set_health(&mut self, value: f32) -> Result<(), PlayerHealthError<O::Error, A::Error>> { + living_health::set_health(self, value) + } + pub fn set_absorption( + &mut self, + value: f32, + ) -> Result<(), PlayerHealthError<O::Error, A::Error>> { + living_health::set_absorption(self, value) + } + pub fn absorption(&mut self) -> Result<f32, PlayerHealthError<O::Error, A::Error>> { + absorption(self) + } + pub fn is_hurt(&mut self) -> Result<bool, PlayerHealthError<O::Error, A::Error>> { + living_health::is_hurt(self) + } + pub fn is_dead_or_dying(&mut self) -> Result<bool, PlayerHealthError<O::Error, A::Error>> { + living_health::is_dead_or_dying(self) + } +} +impl<O: Observer, A: HealthAttributes> HealthWorld for PlayerAttributeHealth<'_, O, A> { + type Error = PlayerHealthError<O::Error, A::Error>; + type Data = (); + fn health(&mut self) -> Result<f32, Self::Error> { + self.data + .get(self.ids.health) + .map_err(|id| PlayerHealthError::Data(DataError::UnknownId(id))) + } + fn health_data(&self) {} + fn max_health_attribute(&mut self) -> Result<f64, Self::Error> { + self.attributes + .health_attribute_value(self.max_health.clone()) + .map_err(PlayerHealthError::Attribute) + } + fn max_absorption_attribute(&mut self) -> Result<f64, Self::Error> { + self.attributes + .health_attribute_value(self.max_absorption.clone()) + .map_err(PlayerHealthError::Attribute) + } + fn store_health(&mut self, _: (), value: f32) -> Result<(), Self::Error> { + self.data + .set(self.ids.health, value, false, self.observer) + .map_err(PlayerHealthError::Data) + } + fn store_absorption(&mut self, value: f32) -> Result<(), Self::Error> { + internal_set_absorption(self, value) + } + fn dead_flag(&self) -> bool { + self.dead + } + fn dispatch_set_health(&mut self, value: f32) -> Result<(), Self::Error> { + living_health::set_health(self, value) + } +} +impl<O: Observer, A: HealthAttributes> PlayerHealthWorld for PlayerAttributeHealth<'_, O, A> { + fn entity_data(&mut self) -> Result<(), Self::Error> { + Ok(()) + } + fn read_absorption(&mut self, _: ()) -> Result<f32, Self::Error> { + self.data + .get(self.ids.absorption) + .map_err(|id| PlayerHealthError::Data(DataError::UnknownId(id))) + } + fn write_absorption(&mut self, _: (), value: f32) -> Result<(), Self::Error> { + self.data + .set(self.ids.absorption, value, false, self.observer) + .map_err(PlayerHealthError::Data) + } +} diff --git a/crates/horizon-world/src/player_hurt.rs b/crates/horizon-world/src/player_hurt.rs new file mode 100644 index 000000000..bdaa8992d --- /dev/null +++ b/crates/horizon-world/src/player_hurt.rs @@ -0,0 +1,108 @@ +//! Player difficulty/ability gates and server PvP dispatch before living hurt. +use crate::{ + food::Difficulty, + living_hurt::{self, HurtState, HurtWorld}, +}; +pub trait PlayerHurtWorld: HurtWorld { + fn ability_invulnerable(&self) -> bool; + fn bypasses_invulnerability( + &mut self, + s: &mut HurtState<Self::Source>, + ) -> Result<bool, Self::Error>; + fn remove_shoulders(&mut self, s: &mut HurtState<Self::Source>) -> Result<(), Self::Error>; + fn scales_with_difficulty( + &mut self, + s: &mut HurtState<Self::Source>, + ) -> Result<bool, Self::Error>; + fn difficulty(&mut self, s: &mut HurtState<Self::Source>) -> Result<Difficulty, Self::Error>; +} +fn min(a: f32, b: f32) -> f32 { + if a.is_nan() || b.is_nan() { + f32::NAN + } else if a == 0.0 && b == 0.0 { + f32::from_bits(a.to_bits() | b.to_bits()) + } else { + a.min(b) + } +} +pub fn player_hurt_server<W: PlayerHurtWorld>( + s: &mut HurtState<W::Source>, + w: &mut W, + mut damage: f32, +) -> Result<bool, W::Error> { + if w.invulnerable(s)? { + return Ok(false); + } + if w.ability_invulnerable() && !w.bypasses_invulnerability(s)? { + return Ok(false); + } + s.no_action_time = 0; + if w.dead_or_dying(s)? { + return Ok(false); + } + w.remove_shoulders(s)?; + if w.scales_with_difficulty(s)? { + if w.difficulty(s)? == Difficulty::Peaceful { + damage = 0.0; + } + if w.difficulty(s)? == Difficulty::Easy { + damage = min(damage / 2.0 + 1.0, damage); + } + if w.difficulty(s)? == Difficulty::Hard { + damage = damage * 3.0 / 2.0; + } + } + if damage == 0.0 { + return Ok(false); + } + living_hurt::hurt_server(s, w, damage) +} +#[derive(Clone, Copy, Debug)] +pub enum CausingEntity<P, A> { + Other, + Player(P), + Arrow(A), +} +pub trait ServerPlayerHurtWorld: PlayerHurtWorld { + type Player: Copy; + type Arrow: Copy; + fn causing_entity( + &mut self, + s: &mut HurtState<Self::Source>, + ) -> Result<CausingEntity<Self::Player, Self::Arrow>, Self::Error>; + fn arrow_player_owner( + &mut self, + s: &mut HurtState<Self::Source>, + arrow: Self::Arrow, + ) -> Result<Option<Self::Player>, Self::Error>; + fn can_harm_player( + &mut self, + s: &mut HurtState<Self::Source>, + player: Self::Player, + ) -> Result<bool, Self::Error>; +} +pub fn server_player_hurt_server<W: ServerPlayerHurtWorld>( + s: &mut HurtState<W::Source>, + w: &mut W, + damage: f32, +) -> Result<bool, W::Error> { + if w.invulnerable(s)? { + return Ok(false); + } + match w.causing_entity(s)? { + CausingEntity::Player(p) => { + if !w.can_harm_player(s, p)? { + return Ok(false); + } + } + CausingEntity::Arrow(a) => { + if let Some(p) = w.arrow_player_owner(s, a)? { + if !w.can_harm_player(s, p)? { + return Ok(false); + } + } + } + CausingEntity::Other => {} + } + player_hurt_server(s, w, damage) +} diff --git a/crates/horizon-world/src/player_inventory.rs b/crates/horizon-world/src/player_inventory.rs new file mode 100644 index 000000000..189662aa5 --- /dev/null +++ b/crates/horizon-world/src/player_inventory.rs @@ -0,0 +1,351 @@ +//! Player inventory storage and selection. Equipment is shared with its entity; +//! stack references preserve aliases across inventories and external callers. +//! Pickup, ticking, menus and persistence are implemented separately. +use crate::item_stack_refs::{ItemStacks, StackRef}; +use std::{cell::RefCell, rc::Rc}; +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(usize)] +pub enum EquipmentSlot { + MainHand, + OffHand, + Feet, + Legs, + Chest, + Head, + Body, + Saddle, +} +impl EquipmentSlot { + pub const ALL: [Self; 8] = [ + Self::MainHand, + Self::OffHand, + Self::Feet, + Self::Legs, + Self::Chest, + Self::Head, + Self::Body, + Self::Saddle, + ]; + pub fn inventory_slot(self) -> Option<usize> { + match self { + Self::MainHand => None, + Self::OffHand => Some(40), + Self::Feet => Some(36), + Self::Legs => Some(37), + Self::Chest => Some(38), + Self::Head => Some(39), + Self::Body => Some(41), + Self::Saddle => Some(42), + } + } + pub fn from_inventory_slot(index: i32) -> Option<Self> { + match index { + 36 => Some(Self::Feet), + 37 => Some(Self::Legs), + 38 => Some(Self::Chest), + 39 => Some(Self::Head), + 40 => Some(Self::OffHand), + 41 => Some(Self::Body), + 42 => Some(Self::Saddle), + _ => None, + } + } +} +type EquipmentItems<I, K, V> = [Option<StackRef<I, K, V>>; 8]; +#[derive(Debug)] +pub struct EntityEquipment<I, K, V> { + items: Rc<RefCell<EquipmentItems<I, K, V>>>, + empty: StackRef<I, K, V>, +} +impl<I, K, V> Clone for EntityEquipment<I, K, V> { + fn clone(&self) -> Self { + Self { + items: self.items.clone(), + empty: self.empty.clone(), + } + } +} +impl<I, K, V> EntityEquipment<I, K, V> { + pub fn new(empty: StackRef<I, K, V>) -> Self { + Self { + items: Rc::new(RefCell::new(std::array::from_fn(|_| None))), + empty, + } + } + pub fn get(&self, slot: EquipmentSlot) -> StackRef<I, K, V> { + self.items.borrow()[slot as usize] + .clone() + .unwrap_or_else(|| self.empty.clone()) + } + pub fn set(&self, slot: EquipmentSlot, stack: StackRef<I, K, V>) -> StackRef<I, K, V> { + self.items.borrow_mut()[slot as usize] + .replace(stack) + .unwrap_or_else(|| self.empty.clone()) + } + /// Native clear preserves which enum-map entries have been populated. + pub fn clear(&self) { + for s in self.items.borrow_mut().iter_mut().flatten() { + *s = self.empty.clone(); + } + } + pub fn entries(&self) -> Vec<(EquipmentSlot, StackRef<I, K, V>)> { + let items = self.items.borrow(); + EquipmentSlot::ALL + .into_iter() + .filter_map(|s| items[s as usize].clone().map(|v| (s, v))) + .collect() + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum InventoryError { + Index, + Selection, +} +pub trait InventoryRules<I, K, V> { + fn is_enchanted(&self, stack: &StackRef<I, K, V>) -> bool; + fn is_damaged(&self, stack: &StackRef<I, K, V>) -> bool; + fn has_custom_name(&self, stack: &StackRef<I, K, V>) -> bool; +} +#[derive(Debug)] +pub struct PlayerInventory<I, K, V> { + items: [StackRef<I, K, V>; 36], + equipment: EntityEquipment<I, K, V>, + stacks: ItemStacks<I, K, V>, + selected: usize, + pub times_changed: i32, +} +impl<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq> PlayerInventory<I, K, V> { + pub fn new(stacks: ItemStacks<I, K, V>, equipment: EntityEquipment<I, K, V>) -> Self { + Self { + items: std::array::from_fn(|_| stacks.empty()), + equipment, + stacks, + selected: 0, + times_changed: 0, + } + } + pub(crate) fn stacks(&self) -> &ItemStacks<I, K, V> { + &self.stacks + } + pub(crate) fn set_non_equipment( + &mut self, + index: i32, + stack: StackRef<I, K, V>, + ) -> Result<(), InventoryError> { + let index = usize::try_from(index) + .ok() + .filter(|i| *i < 36) + .ok_or(InventoryError::Index)?; + self.items[index] = stack; + Ok(()) + } + pub fn items(&self) -> &[StackRef<I, K, V>; 36] { + &self.items + } + pub fn equipment(&self) -> &EntityEquipment<I, K, V> { + &self.equipment + } + pub fn selected(&self) -> usize { + self.selected + } + pub fn set_selected(&mut self, selected: i32) -> Result<(), InventoryError> { + if !(0..9).contains(&selected) { + return Err(InventoryError::Selection); + } + self.selected = selected as usize; + Ok(()) + } + pub fn selected_item(&self) -> StackRef<I, K, V> { + self.items[self.selected].clone() + } + pub fn set_selected_item(&mut self, stack: StackRef<I, K, V>) -> StackRef<I, K, V> { + std::mem::replace(&mut self.items[self.selected], stack) + } + pub fn get(&self, index: i32) -> Result<StackRef<I, K, V>, InventoryError> { + if index < 0 { + return Err(InventoryError::Index); + } + Ok(if index < 36 { + self.items[index as usize].clone() + } else { + EquipmentSlot::from_inventory_slot(index) + .map_or_else(|| self.stacks.empty(), |s| self.equipment.get(s)) + }) + } + pub fn set(&mut self, index: i32, stack: StackRef<I, K, V>) -> Result<(), InventoryError> { + if index < 0 { + return Err(InventoryError::Index); + } + if index < 36 { + self.items[index as usize] = stack; + } else if let Some(s) = EquipmentSlot::from_inventory_slot(index) { + self.equipment.set(s, stack); + } + Ok(()) + } + pub fn remove(&mut self, index: i32, amount: i32) -> StackRef<I, K, V> { + if index < 0 || (index < 36 && amount <= 0) { + return self.stacks.empty(); + } + let s = self.get(index).expect("nonnegative index"); + if s.read().is_empty() { + self.stacks.empty() + } else { + self.stacks.split(&s, amount) + } + } + pub fn remove_no_update(&mut self, index: i32) -> Result<StackRef<I, K, V>, InventoryError> { + if index < 0 { + return Err(InventoryError::Index); + } + Ok(if index < 36 { + std::mem::replace(&mut self.items[index as usize], self.stacks.empty()) + } else { + EquipmentSlot::from_inventory_slot(index).map_or_else( + || self.stacks.empty(), + |s| self.equipment.set(s, self.stacks.empty()), + ) + }) + } + /// The native Map.of equipment iteration order varies by JVM. The caller + /// supplies its pinned runtime order when reference aliases span equipment. + pub fn remove_reference( + &mut self, + stack: &StackRef<I, K, V>, + equipment_order: &[EquipmentSlot; 7], + ) { + for s in &mut self.items { + if s.same_reference(stack) { + *s = self.stacks.empty(); + return; + } + } + for slot in equipment_order { + if self.equipment.get(*slot).same_reference(stack) { + self.equipment.set(*slot, self.stacks.empty()); + return; + } + } + } + pub fn free_slot(&self) -> i32 { + self.items + .iter() + .position(|s| s.read().is_empty()) + .map_or(-1, |i| i as i32) + } + pub fn find_matching(&self, stack: &StackRef<I, K, V>) -> i32 { + self.items + .iter() + .position(|s| !s.read().is_empty() && stack.read().same_item_components(&s.read())) + .map_or(-1, |i| i as i32) + } + pub fn contains(&self, stack: &StackRef<I, K, V>) -> bool { + (0..43).any(|i| { + let s = self.get(i).expect("valid slot"); + !s.read().is_empty() && s.read().same_item_components(&stack.read()) + }) + } + pub fn count_item(&self, item: I) -> i32 { + (0..43).fold(0_i32, |n, i| { + let s = self.get(i).expect("valid slot"); + let s = s.read(); + if s.item() == item { + n.wrapping_add(s.count()) + } else { + n + } + }) + } + pub fn suitable_hotbar<R: InventoryRules<I, K, V>>(&self, rules: &R) -> usize { + for delta in 0..9 { + let i = (self.selected + delta) % 9; + if self.items[i].read().is_empty() { + return i; + } + } + for delta in 0..9 { + let i = (self.selected + delta) % 9; + if !rules.is_enchanted(&self.items[i]) { + return i; + } + } + self.selected + } + pub fn find_crafting<R: InventoryRules<I, K, V>>( + &self, + item: I, + stack: &StackRef<I, K, V>, + rules: &R, + ) -> i32 { + self.items + .iter() + .position(|s| { + !s.read().is_empty() + && s.read().item() == item + && !rules.is_damaged(s) + && !rules.is_enchanted(s) + && !rules.has_custom_name(s) + && (stack.read().is_empty() || stack.read().same_item_components(&s.read())) + }) + .map_or(-1, |i| i as i32) + } + pub fn add_and_pick<R: InventoryRules<I, K, V>>( + &mut self, + stack: StackRef<I, K, V>, + rules: &R, + ) { + self.selected = self.suitable_hotbar(rules); + if !self.items[self.selected].read().is_empty() { + let free = self.free_slot(); + if free >= 0 { + self.items[free as usize] = self.items[self.selected].clone(); + } + } + self.items[self.selected] = stack; + } + pub fn pick_slot<R: InventoryRules<I, K, V>>( + &mut self, + index: i32, + rules: &R, + ) -> Result<(), InventoryError> { + self.selected = self.suitable_hotbar(rules); + // Selection changes even when the following list access fails. + let index = usize::try_from(index) + .ok() + .filter(|i| *i < 36) + .ok_or(InventoryError::Index)?; + self.items.swap(self.selected, index); + Ok(()) + } + pub fn remove_selected(&mut self, all: bool) -> StackRef<I, K, V> { + let s = self.selected_item(); + if s.read().is_empty() { + return self.stacks.empty(); + } + let amount = if all { s.read().count() } else { 1 }; + self.remove(self.selected as i32, amount) + } + pub fn changed(&mut self) { + self.times_changed = self.times_changed.wrapping_add(1); + } + pub fn clear(&mut self) { + self.items.fill(self.stacks.empty()); + self.equipment.clear(); + } + pub fn is_empty(&self) -> bool { + (0..43).all(|i| self.get(i).expect("valid slot").read().is_empty()) + } + pub fn replace_self(&mut self) { + for i in 0..43 { + self.set(i, self.get(i).expect("valid slot")) + .expect("valid slot"); + } + } + pub fn replace_with(&mut self, other: &Self) { + for i in 0..43 { + self.set(i, other.get(i).expect("valid slot")) + .expect("valid slot"); + } + self.selected = other.selected; + } +} diff --git a/crates/horizon-world/src/player_travel.rs b/crates/horizon-world/src/player_travel.rs new file mode 100644 index 000000000..31fa31fd8 --- /dev/null +++ b/crates/horizon-world/src/player_travel.rs @@ -0,0 +1,71 @@ +//! Player-specific swimming and ability-flight behavior around living travel. +use horizon_core::{geometry::Vec3, position::BlockPos}; +pub trait PlayerTravelWorld { + type Error; + fn is_passenger(&mut self) -> Result<bool, Self::Error>; + fn is_swimming(&mut self) -> Result<bool, Self::Error>; + fn look_angle(&mut self) -> Result<Vec3, Self::Error>; + fn jumping(&self) -> bool; + fn position(&self) -> Vec3; + fn fluid_is_empty(&mut self, position: BlockPos) -> Result<bool, Self::Error>; + fn velocity(&self) -> Vec3; + fn set_velocity(&mut self, velocity: Vec3) -> Result<(), Self::Error>; + /// Virtual getAbilities(), as distinct from direct abilities-field reads. + fn query_flying_ability(&mut self) -> Result<bool, Self::Error>; + fn flying_ability(&self) -> bool; + fn ability_flying_speed(&mut self) -> Result<f32, Self::Error>; + fn sprinting(&mut self) -> Result<bool, Self::Error>; + fn living_travel(&mut self, input: Vec3) -> Result<(), Self::Error>; +} +pub fn travel<W: PlayerTravelWorld>(world: &mut W, input: Vec3) -> Result<(), W::Error> { + if world.is_passenger()? { + return world.living_travel(input); + } + if world.is_swimming()? { + let look_y = world.look_angle()?.y; + let scale = if look_y < -0.2 { 0.085 } else { 0.06 }; + let apply = if look_y <= 0.0 || world.jumping() { + true + } else { + let p = world.position(); + !world.fluid_is_empty(BlockPos::new( + p.x.floor() as i32, + (p.y + 1.0 - 0.1).floor() as i32, + p.z.floor() as i32, + ))? + }; + if apply { + let v = world.velocity(); + world.set_velocity(Vec3::new( + v.x + 0.0, + v.y + (look_y - v.y) * scale, + v.z + 0.0, + ))?; + } + } + if world.query_flying_ability()? { + let y = world.velocity().y; + world.living_travel(input)?; + let v = world.velocity(); + world.set_velocity(Vec3::new(v.x, y * 0.6, v.z))?; + } else { + world.living_travel(input)?; + } + Ok(()) +} +pub fn flying_speed<W: PlayerTravelWorld>(world: &mut W) -> Result<f32, W::Error> { + if world.flying_ability() && !world.is_passenger()? { + let sprinting = world.sprinting()?; + let speed = world.ability_flying_speed()?; + Ok(if sprinting { speed * 2.0 } else { speed }) + } else { + Ok(if world.sprinting()? { + 0.025999999f32 + } else { + 0.02 + }) + } +} +pub fn affected_by_fluids<W: PlayerTravelWorld>(world: &W) -> bool { + !world.flying_ability() +} diff --git a/crates/horizon-world/src/powder_snow_collision.rs b/crates/horizon-world/src/powder_snow_collision.rs new file mode 100644 index 000000000..f9098e6f8 --- /dev/null +++ b/crates/horizon-world/src/powder_snow_collision.rs @@ -0,0 +1,74 @@ +//! Powder snow collision over entity metadata and lazily queried walkability. +use crate::{collision_context::CollisionContext, entity_obstruction::EntityIdentity}; +use horizon_core::{ + geometry::{Aabb, Vec3, VoxelShape}, + position::BlockPos, +}; +use std::sync::OnceLock; + +#[derive(Clone, Copy, Debug)] +pub struct PowderSnowEntity { + pub fall_distance: f64, + pub falling_block: bool, +} + +pub trait PowderSnowWorld { + type Error; + /// Snapshot of the entity's fallDistance field and FallingBlockEntity type. + fn powder_snow_entity( + &mut self, + entity: EntityIdentity, + ) -> Result<PowderSnowEntity, Self::Error>; + fn powder_snow_walkable_tag(&mut self, entity: EntityIdentity) -> Result<bool, Self::Error>; + /// Invoke only for a living entity; item identity follows ItemStack.is, + /// including its empty-stack normalization. + fn feet_are_leather_boots(&mut self, entity: EntityIdentity) -> Result<bool, Self::Error>; +} + +pub fn can_walk_on_powder_snow<W: PowderSnowWorld>( + world: &mut W, + entity: EntityIdentity, + living: bool, +) -> Result<bool, W::Error> { + if world.powder_snow_walkable_tag(entity)? { + return Ok(true); + } + if living { + return world.feet_are_leather_boots(entity); + } + Ok(false) +} + +pub fn powder_snow_collision_shape<W: PowderSnowWorld>( + world: &mut W, + position: BlockPos, + context: &CollisionContext<'_>, +) -> Result<VoxelShape, W::Error> { + if context.is_placement() { + return Ok(VoxelShape::empty()); + } + let Some(entity) = context.entity() else { + return Ok(VoxelShape::empty()); + }; + let snapshot = world.powder_snow_entity(entity)?; + if snapshot.fall_distance > 2.5 { + static FALLING: OnceLock<VoxelShape> = OnceLock::new(); + return Ok(FALLING + .get_or_init(|| { + VoxelShape::from_box(Aabb::new( + Vec3::ZERO, + Vec3::new(1.0, f64::from(0.9f32), 1.0), + )) + .expect("bounded falling powder snow shape") + }) + .clone()); + } + if snapshot.falling_block + || (can_walk_on_powder_snow(world, entity, context.living_entity().is_some())? + && context.is_above(&VoxelShape::block(), position, false) + && !context.is_descending()) + { + return Ok(VoxelShape::block()); + } + Ok(VoxelShape::empty()) +} diff --git a/crates/horizon-world/src/region.rs b/crates/horizon-world/src/region.rs new file mode 100644 index 000000000..48b6e132e --- /dev/null +++ b/crates/horizon-world/src/region.rs @@ -0,0 +1,376 @@ +//! Anvil region reading and export to a new region. Existing files are never +//! overwritten. Use a separate directory for offline edits and copied .mcc data. +use crate::{ + compression::{Compression, invalid}, + nbt::{self, Limits, NamedTag}, +}; +use horizon_core::position::ChunkPos; +use std::{ + fs::{self, File, OpenOptions}, + io::{self, Read, Seek, SeekFrom, Write}, + path::{Path, PathBuf}, + sync::atomic::{AtomicU64, Ordering}, +}; + +const SECTOR: usize = 4096; +const HEADER: usize = SECTOR * 2; +const MAX_COMPRESSED: usize = 64 * 1024 * 1024; + +#[derive(Clone, Debug)] +pub struct ChunkRecord { + pub compression: Compression, + pub compressed: Vec<u8>, + pub timestamp: u32, +} +impl ChunkRecord { + pub fn from_nbt( + root: &NamedTag, + compression: Compression, + timestamp: u32, + limits: Limits, + ) -> io::Result<Self> { + let bytes = nbt::write_named(root, limits).map_err(|e| invalid(e.to_string()))?; + Ok(Self { + compression, + compressed: compression.encode(&bytes)?, + timestamp, + }) + } + pub fn nbt(&self, limits: Limits) -> io::Result<NamedTag> { + let bytes = self + .compression + .decode(&self.compressed, limits.max_bytes)?; + let (root, used) = nbt::read_named(&bytes, limits).map_err(|e| invalid(e.to_string()))?; + if used != bytes.len() { + return Err(invalid("trailing bytes after region chunk NBT")); + } + Ok(root) + } +} + +pub struct RegionFile { + file: File, + path: PathBuf, + position: ChunkPos, + offsets: [u32; 1024], + timestamps: [u32; 1024], +} + +pub fn position_from_path(path: &Path) -> io::Result<ChunkPos> { + let name = path + .file_name() + .and_then(|s| s.to_str()) + .ok_or_else(|| invalid("invalid region filename"))?; + let parts: Vec<_> = name.split('.').collect(); + if parts.len() != 4 || parts[0] != "r" || parts[3] != "mca" { + return Err(invalid("expected r.<x>.<z>.mca")); + } + let x: i32 = parts[1] + .parse() + .map_err(|_| invalid("invalid region x coordinate"))?; + let z: i32 = parts[2] + .parse() + .map_err(|_| invalid("invalid region z coordinate"))?; + // Regions outside this range cannot be addressed with signed chunk coordinates. + if !(-67_108_864..=67_108_863).contains(&x) || !(-67_108_864..=67_108_863).contains(&z) { + return Err(invalid("region coordinate outside chunk coordinate range")); + } + Ok(ChunkPos::new(x, z)) +} + +fn slot(region: ChunkPos, chunk: ChunkPos) -> io::Result<usize> { + if chunk.region() != region { + return Err(invalid("chunk does not belong to this region")); + } + let (x, z) = chunk.region_local(); + Ok(usize::from(x) + usize::from(z) * 32) +} +fn position(region: ChunkPos, index: usize) -> ChunkPos { + ChunkPos::new( + region.x * 32 + (index % 32) as i32, + region.z * 32 + (index / 32) as i32, + ) +} +fn external_path(directory: &Path, chunk: ChunkPos) -> PathBuf { + directory.join(format!("c.{}.{}.mcc", chunk.x, chunk.z)) +} + +impl RegionFile { + pub fn position(&self) -> ChunkPos { + self.position + } + pub fn open(path: impl AsRef<Path>) -> io::Result<Self> { + let path = path.as_ref().to_owned(); + let position = position_from_path(&path)?; + let mut file = File::open(&path)?; + let len = file.metadata()?.len(); + if len < HEADER as u64 { + return Err(invalid("truncated region header")); + } + let mut header = [0; HEADER]; + file.read_exact(&mut header)?; + let mut offsets = [0; 1024]; + let mut timestamps = [0; 1024]; + let mut ranges = Vec::new(); + for i in 0..1024 { + offsets[i] = u32::from_be_bytes(header[i * 4..i * 4 + 4].try_into().unwrap()); + timestamps[i] = u32::from_be_bytes( + header[SECTOR + i * 4..SECTOR + i * 4 + 4] + .try_into() + .unwrap(), + ); + if offsets[i] == 0 { + continue; + } + let start = offsets[i] >> 8; + let count = offsets[i] & 255; + if start < 2 || count == 0 || u64::from(start + count) > len.div_ceil(SECTOR as u64) { + return Err(invalid(format!( + "invalid sector allocation at region slot {i}" + ))); + } + ranges.push((start, start + count)); + } + ranges.sort_unstable(); + if ranges.windows(2).any(|r| r[0].1 > r[1].0) { + return Err(invalid("overlapping region sector allocations")); + } + Ok(Self { + file, + path, + position, + offsets, + timestamps, + }) + } + + pub fn chunks(&self) -> impl Iterator<Item = (ChunkPos, u32)> + '_ { + self.offsets + .iter() + .enumerate() + .filter(|(_, value)| **value != 0) + .map(|(i, _)| (position(self.position, i), self.timestamps[i])) + } + + pub fn read(&mut self, chunk: ChunkPos) -> io::Result<Option<ChunkRecord>> { + let i = slot(self.position, chunk)?; + let offset = self.offsets[i]; + if offset == 0 { + return Ok(None); + } + self.file + .seek(SeekFrom::Start(u64::from(offset >> 8) * SECTOR as u64))?; + let mut header = [0; 5]; + self.file.read_exact(&mut header)?; + let len = u32::from_be_bytes(header[..4].try_into().unwrap()) as usize; + if len < 1 || len as u64 + 4 > (u64::from(offset & 255) * SECTOR as u64) { + return Err(invalid("invalid chunk payload length")); + } + let compression = Compression::try_from(header[4] & 127)?; + let compressed = if header[4] & 128 != 0 { + if len != 1 { + return Err(invalid("external chunk stub has inline data")); + } + let path = external_path(self.path.parent().unwrap_or(Path::new(".")), chunk); + let file = File::open(path)?; + let mut data = Vec::new(); + file.take((MAX_COMPRESSED + 1) as u64) + .read_to_end(&mut data)?; + if data.len() > MAX_COMPRESSED { + return Err(invalid("external chunk compressed limit exceeded")); + } + data + } else { + let mut data = vec![0; len - 1]; + self.file.read_exact(&mut data)?; + data + }; + Ok(Some(ChunkRecord { + compression, + compressed, + timestamp: self.timestamps[i], + })) + } + + /// Export all chunks, preserving untouched compressed bytes and timestamps. + /// Overrides are keyed by chunk position; None deletes a chunk in the export. + pub fn export( + &mut self, + destination: impl AsRef<Path>, + changes: &[(ChunkPos, Option<ChunkRecord>)], + ) -> io::Result<()> { + let destination = destination.as_ref(); + if position_from_path(destination)? != self.position { + return Err(invalid("export region coordinates differ")); + } + let mut replacements = BTreeChanges::new(); + for (chunk, record) in changes { + let i = slot(self.position, *chunk)?; + if replacements.insert(i, record.as_ref()).is_some() { + return Err(invalid("duplicate chunk override")); + } + } + let mut writer = RegionWriter::create(destination)?; + for i in 0..1024 { + let chunk = position(self.position, i); + if let Some(record) = replacements.get(&i) { + if let Some(record) = record { + writer.write(chunk, record)?; + } + } else if let Some(record) = self.read(chunk)? { + writer.write(chunk, &record)?; + } + } + writer.finish() + } +} +type BTreeChanges<'a> = std::collections::BTreeMap<usize, Option<&'a ChunkRecord>>; + +static NEXT_TEMP: AtomicU64 = AtomicU64::new(0); + +/// Writes a complete new region to a temporary sibling, then publishes it with +/// an atomic, non-overwriting hard link. Drop rolls back unpublished files. +pub struct RegionWriter { + file: File, + temporary: PathBuf, + destination: PathBuf, + position: ChunkPos, + offsets: [u32; 1024], + timestamps: [u32; 1024], + next_sector: u32, + externals: Vec<PathBuf>, + committed: bool, + failed: bool, +} +impl RegionWriter { + pub fn create(destination: impl AsRef<Path>) -> io::Result<Self> { + let destination = destination.as_ref().to_owned(); + let position = position_from_path(&destination)?; + if destination.try_exists()? { + return Err(io::Error::new( + io::ErrorKind::AlreadyExists, + "destination region already exists", + )); + } + let parent = destination + .parent() + .filter(|p| !p.as_os_str().is_empty()) + .unwrap_or(Path::new(".")); + fs::create_dir_all(parent)?; + let (temporary, file) = loop { + let path = parent.join(format!( + ".horizon-{}-{}.tmp", + std::process::id(), + NEXT_TEMP.fetch_add(1, Ordering::Relaxed) + )); + match OpenOptions::new() + .read(true) + .write(true) + .create_new(true) + .open(&path) + { + Ok(file) => break (path, file), + Err(e) if e.kind() == io::ErrorKind::AlreadyExists => continue, + Err(e) => return Err(e), + } + }; + let mut writer = Self { + file, + temporary, + destination, + position, + offsets: [0; 1024], + timestamps: [0; 1024], + next_sector: 2, + externals: Vec::new(), + committed: false, + failed: false, + }; + writer.file.write_all(&[0; HEADER])?; + Ok(writer) + } + + pub fn write(&mut self, chunk: ChunkPos, record: &ChunkRecord) -> io::Result<()> { + if self.failed { + return Err(invalid("region writer failed previously")); + } + let result = self.write_record(chunk, record); + if result.is_err() { + self.failed = true; + } + result + } + + fn write_record(&mut self, chunk: ChunkPos, record: &ChunkRecord) -> io::Result<()> { + let i = slot(self.position, chunk)?; + if self.offsets[i] != 0 { + return Err(invalid("chunk already written")); + } + if record.compressed.len() > MAX_COMPRESSED { + return Err(invalid("compressed chunk limit exceeded")); + } + let required = (record.compressed.len() + 5).div_ceil(SECTOR); + let external = required >= 256; + let sectors = if external { 1 } else { required as u32 }; + if self.next_sector + sectors > 0x100_0000 { + return Err(invalid("region sector address limit exceeded")); + } + if external { + let path = external_path(self.destination.parent().unwrap_or(Path::new(".")), chunk); + let mut file = OpenOptions::new() + .write(true) + .create_new(true) + .open(&path)?; + self.externals.push(path); + file.write_all(&record.compressed)?; + file.sync_all()?; + } + self.file + .seek(SeekFrom::Start(u64::from(self.next_sector) * SECTOR as u64))?; + let len = if external { + 1 + } else { + record.compressed.len() as u32 + 1 + }; + self.file.write_all(&len.to_be_bytes())?; + self.file + .write_all(&[record.compression as u8 | if external { 128 } else { 0 }])?; + if !external { + self.file.write_all(&record.compressed)?; + } + self.offsets[i] = self.next_sector << 8 | sectors; + self.timestamps[i] = record.timestamp; + self.next_sector += sectors; + Ok(()) + } + + pub fn finish(mut self) -> io::Result<()> { + if self.failed { + return Err(invalid("cannot publish a failed region writer")); + } + self.file + .set_len(u64::from(self.next_sector) * SECTOR as u64)?; + self.file.seek(SeekFrom::Start(0))?; + for value in self.offsets { + self.file.write_all(&value.to_be_bytes())?; + } + for value in self.timestamps { + self.file.write_all(&value.to_be_bytes())?; + } + self.file.sync_all()?; + // Hard-link publication fails atomically if another writer won the name. + fs::hard_link(&self.temporary, &self.destination)?; + self.committed = true; + Ok(()) + } +} +impl Drop for RegionWriter { + fn drop(&mut self) { + let _ = fs::remove_file(&self.temporary); + if !self.committed { + for path in &self.externals { + let _ = fs::remove_file(path); + } + } + } +} diff --git a/crates/horizon-world/src/registry.rs b/crates/horizon-world/src/registry.rs new file mode 100644 index 000000000..30367e251 --- /dev/null +++ b/crates/horizon-world/src/registry.rs @@ -0,0 +1,107 @@ +//! Runtime block-state IDs imported from a version-pinned registry data export. +//! This supplies identities and default properties, not block behavior. +mod json; +use crate::{DATA_VERSION, chunk::BlockState, compression::invalid, nbt::Tag}; +pub use json::BlockStateJsonCodec; +pub(crate) use json::java_integer; +use std::{ + collections::{BTreeMap, BTreeSet}, + io, +}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct BlockStateId(pub u32); + +pub struct BlockRegistry { + states: Vec<BlockState>, + ids: BTreeMap<BlockState, BlockStateId>, + defaults: BTreeMap<String, BlockStateId>, +} +impl BlockRegistry { + pub fn from_nbt(tag: &Tag) -> io::Result<Self> { + if tag.get("DataVersion") != Some(&Tag::Int(DATA_VERSION)) { + return Err(invalid("block registry DataVersion mismatch")); + } + let Some(Tag::List(entries)) = tag.get("states") else { + return Err(invalid("missing registry states")); + }; + let Some(Tag::Compound(defaults)) = tag.get("defaults") else { + return Err(invalid("missing registry defaults")); + }; + if entries.is_empty() || entries.len() > i32::MAX as usize { + return Err(invalid("invalid registry size")); + } + let mut result = Self { + states: Vec::with_capacity(entries.len()), + ids: BTreeMap::new(), + defaults: BTreeMap::new(), + }; + for (i, entry) in entries.iter().enumerate() { + let state = BlockState::from_nbt(entry)?; + if result + .ids + .insert(state.clone(), BlockStateId(i as u32)) + .is_some() + { + return Err(invalid("duplicate block registry state")); + } + result.states.push(state); + } + for (name, id) in defaults { + let name = name.to_string().map_err(|e| invalid(e.to_string()))?; + let Tag::Int(id) = id else { + return Err(invalid("default state ID is not an int")); + }; + if *id < 0 + || result + .states + .get(*id as usize) + .is_none_or(|s| s.name != name) + { + return Err(invalid("invalid default block state ID")); + } + result.defaults.insert(name, BlockStateId(*id as u32)); + } + let names: BTreeSet<_> = result.states.iter().map(|s| &s.name).collect(); + if names.len() != result.defaults.len() + || names + .iter() + .any(|name| !result.defaults.contains_key(*name)) + { + return Err(invalid("registry is missing block defaults")); + } + Ok(result) + } + pub fn len(&self) -> usize { + self.states.len() + } + pub fn is_empty(&self) -> bool { + self.states.is_empty() + } + pub fn state(&self, id: BlockStateId) -> Option<&BlockState> { + self.states.get(id.0 as usize) + } + pub fn id(&self, state: &BlockState) -> Option<BlockStateId> { + self.ids.get(state).copied() + } + pub fn default_state(&self, name: &str) -> Option<BlockStateId> { + self.defaults.get(name).copied() + } + + /// Resolve a saved descriptor, supplying omitted default properties. Unlike + /// vanilla's lenient logging paths, invalid properties return a typed error. + pub fn resolve(&self, descriptor: &BlockState) -> io::Result<BlockStateId> { + let default = self + .default_state(&descriptor.name) + .ok_or_else(|| invalid("unknown block name"))?; + let mut state = self.state(default).unwrap().clone(); + for (key, value) in &descriptor.properties { + if !state.properties.contains_key(key) { + return Err(invalid("unknown block property")); + } + state.properties.insert(key.clone(), value.clone()); + } + self.id(&state) + .ok_or_else(|| invalid("invalid block property value")) + } +} diff --git a/crates/horizon-world/src/registry/json.rs b/crates/horizon-world/src/registry/json.rs new file mode 100644 index 000000000..21bbba562 --- /dev/null +++ b/crates/horizon-world/src/registry/json.rs @@ -0,0 +1,106 @@ +//! Java 26.3 compact/full block-state JSON codecs over a pinned registry. +use super::{BlockRegistry, BlockStateId}; +use crate::compression::invalid; +use serde_json::Value; +use std::{ + collections::{BTreeMap, BTreeSet}, + io, +}; + +/// Property kinds accompany the imported state registry. Integer properties +/// parse Java decimal strings; enum and boolean properties use exact names. +pub struct BlockStateJsonCodec<'a> { + registry: &'a BlockRegistry, + integers: BTreeSet<(String, String)>, + counts: BTreeMap<String, usize>, +} +impl<'a> BlockStateJsonCodec<'a> { + pub fn new( + registry: &'a BlockRegistry, + integers: BTreeSet<(String, String)>, + ) -> io::Result<Self> { + for (block, property) in &integers { + let state = registry + .default_state(block) + .and_then(|id| registry.state(id)); + if !state.is_some_and(|state| state.properties.contains_key(property)) { + return Err(invalid("integer property is absent from block registry")); + } + } + let mut counts = BTreeMap::new(); + for state in ®istry.states { + *counts.entry(state.name.clone()).or_insert(0) += 1; + } + Ok(Self { + registry, + integers, + counts, + }) + } + /// `full` selects FULL_CODEC, which requires the object representation. + /// Invalid/missing properties keep their defaults, as vanilla's codec does. + pub fn decode(&self, json: &str, full: bool) -> io::Result<BlockStateId> { + let value: Value = serde_json::from_str(json).map_err(|e| invalid(e.to_string()))?; + let name = if !full && value.is_string() { + value.as_str() + } else { + value.get("id").and_then(Value::as_str) + } + .ok_or_else(|| invalid("missing block identifier"))?; + let (namespace, path) = name.split_once(':').unwrap_or(("minecraft", name)); + let name = format!( + "{}:{path}", + if namespace.is_empty() { + "minecraft" + } else { + namespace + } + ); + let default = self + .registry + .default_state(&name) + .ok_or_else(|| invalid("unknown block identifier"))?; + let mut state = self.registry.state(default).unwrap().clone(); + if let Some(properties) = value.get("properties").and_then(Value::as_object) { + for (key, raw) in properties { + if !state.properties.contains_key(key) { + continue; + } + let Some(value) = raw.as_str() else { + continue; + }; + let candidate = if self.integers.contains(&(name.clone(), key.clone())) { + let Some(value) = java_integer(value) else { + continue; + }; + value.to_string() + } else { + value.to_owned() + }; + let previous = state.properties.insert(key.clone(), candidate).unwrap(); + if self.registry.id(&state).is_none() { + state.properties.insert(key.clone(), previous); + } + } + } + self.registry + .id(&state) + .ok_or_else(|| invalid("block state is absent from registry")) + } + pub fn encode(&self, id: BlockStateId, full: bool) -> io::Result<String> { + let state = self + .registry + .state(id) + .ok_or_else(|| invalid("unknown block state ID"))?; + let value = if !full && self.registry.default_state(&state.name) == Some(id) { + Value::String(state.name.clone()) + } else if self.counts[&state.name] == 1 { + serde_json::json!({"id":state.name}) + } else { + serde_json::json!({"id":state.name,"properties":state.properties}) + }; + serde_json::to_string(&value).map_err(|e| invalid(e.to_string())) + } +} + +pub(crate) use horizon_core::text::parse_java_integer as java_integer; diff --git a/crates/horizon-world/src/registry_collision_scan.rs b/crates/horizon-world/src/registry_collision_scan.rs new file mode 100644 index 000000000..ebc70a2e2 --- /dev/null +++ b/crates/horizon-world/src/registry_collision_scan.rs @@ -0,0 +1,161 @@ +//! Bind the native cursor to actual registry behavior and chunk providers. +use crate::{ + block_collision::{CollisionQueryError, DynamicCollisionWorld}, + block_collision_scan::{BlockCollisionWorld, CollisionBlock}, + collision_context::CollisionContext, + liquid_collision::LiquidCollisionWorld, + powder_snow_collision::PowderSnowWorld, + registry::BlockStateId, + suffocation::SuffocationRegistry, +}; +use horizon_core::{ + geometry::VoxelShape, + position::{BlockPos, ChunkPos}, +}; + +/// A collision world's resident chunk access. State IDs must belong to the +/// binding's registry. Handles remain valid for the +/// duration of a scan. The chunk-local block-entity provider is deliberately +/// distinct from the global world used for contextual collision shapes. +pub trait CollisionChunks: DynamicCollisionWorld { + type Chunk: Copy; + type ChunkWorld: DynamicCollisionWorld<Error = Self::Error>; + fn collision_chunk(&mut self, position: ChunkPos) -> Result<Option<Self::Chunk>, Self::Error>; + fn block_state( + &mut self, + chunk: Self::Chunk, + position: BlockPos, + ) -> Result<BlockStateId, Self::Error>; + /// Borrowing the provider must not perform a world query. Constant + /// suffocation predicates do not read any block entity. + fn chunk_world(&mut self, chunk: Self::Chunk) -> &mut Self::ChunkWorld; +} + +pub struct RegistryCollisionWorld<'a, 'r, W> { + binding: &'a SuffocationRegistry<'r>, + world: &'a mut W, +} +impl<'a, 'r, W> RegistryCollisionWorld<'a, 'r, W> { + pub fn new(binding: &'a SuffocationRegistry<'r>, world: &'a mut W) -> std::io::Result<Self> { + if !binding + .collisions() + .cached_shapes() + .has_canonical_identities() + { + return Err(crate::compression::invalid( + "collision scanning requires canonical shape identities", + )); + } + Ok(Self { binding, world }) + } +} +impl<W, E> BlockCollisionWorld for RegistryCollisionWorld<'_, '_, W> +where + W: CollisionChunks<Error = E> + LiquidCollisionWorld<Error = E> + PowderSnowWorld<Error = E>, +{ + type Error = CollisionQueryError<E>; + type Chunk = W::Chunk; + fn collision_chunk(&mut self, position: ChunkPos) -> Result<Option<Self::Chunk>, Self::Error> { + self.world + .collision_chunk(position) + .map_err(CollisionQueryError::Context) + } + fn collision_block( + &mut self, + chunk: Self::Chunk, + position: BlockPos, + ) -> Result<CollisionBlock, Self::Error> { + let state = self + .world + .block_state(chunk, position) + .map_err(CollisionQueryError::Context)?; + self.binding + .collisions() + .collision_block(state) + .map_err(CollisionQueryError::Data) + } + fn is_suffocating( + &mut self, + chunk: Self::Chunk, + block: CollisionBlock, + position: BlockPos, + ) -> Result<bool, Self::Error> { + self.binding.is_suffocating( + self.world.chunk_world(chunk), + block.state, + [position.x, position.y, position.z], + ) + } + fn context_shape( + &mut self, + block: CollisionBlock, + position: BlockPos, + context: &CollisionContext<'_>, + ) -> Result<VoxelShape, Self::Error> { + self.binding.collisions().collision_shape_with_context( + self.world, + block.state, + position, + context, + ) + } +} + +impl<W: crate::world_movement::EntityMovementWorld> crate::world_movement::EntityMovementWorld + for RegistryCollisionWorld<'_, '_, W> +{ + type Error = CollisionQueryError<W::Error>; + fn entity_collisions( + &mut self, + entity: crate::entity_obstruction::EntityIdentity, + bounds: horizon_core::geometry::Aabb, + ) -> Result<Vec<VoxelShape>, Self::Error> { + self.world + .entity_collisions(entity, bounds) + .map_err(CollisionQueryError::Context) + } + fn movement_border( + &mut self, + entity: crate::entity_obstruction::EntityIdentity, + bounds: horizon_core::geometry::Aabb, + ) -> Result<Option<VoxelShape>, Self::Error> { + self.world + .movement_border(entity, bounds) + .map_err(CollisionQueryError::Context) + } +} + +impl<W: crate::fluid_occupancy::FluidOccupancyWorld> crate::fluid_occupancy::FluidOccupancyWorld + for RegistryCollisionWorld<'_, '_, W> +{ + type Error = CollisionQueryError<W::Error>; + type Chunk = W::Chunk; + fn minimum_section_y(&mut self) -> Result<i32, Self::Error> { + self.world + .minimum_section_y() + .map_err(CollisionQueryError::Context) + } + fn maximum_section_y(&mut self) -> Result<i32, Self::Error> { + self.world + .maximum_section_y() + .map_err(CollisionQueryError::Context) + } + fn chunk(&mut self, x: i32, z: i32) -> Result<Self::Chunk, Self::Error> { + self.world.chunk(x, z).map_err(CollisionQueryError::Context) + } + fn section( + &mut self, + chunk: Self::Chunk, + y: i32, + ) -> Result<&crate::chunk::BlockSection<'_>, Self::Error> { + self.world + .section(chunk, y) + .map_err(CollisionQueryError::Context) + } + fn minimum_y(&mut self) -> Result<i32, Self::Error> { + self.world.minimum_y().map_err(CollisionQueryError::Context) + } + fn maximum_y(&mut self) -> Result<i32, Self::Error> { + self.world.maximum_y().map_err(CollisionQueryError::Context) + } +} diff --git a/crates/horizon-world/src/registry_fall_ray.rs b/crates/horizon-world/src/registry_fall_ray.rs new file mode 100644 index 000000000..f78c4dfe6 --- /dev/null +++ b/crates/horizon-world/src/registry_fall_ray.rs @@ -0,0 +1,216 @@ +//! Fall-reset rays bound to registered interactions, fluid states and live queries. +use crate::{ + compression::invalid, + entity_obstruction::EntityIdentity, + fluid::{FluidHeightWorld, FluidKind, FluidState}, + fluid_shape::FluidShapeCache, + interaction_shapes::InteractionShapes, + registry::BlockStateId, + world_ray::{ + self, FallResetWorld, RayBlockMode, RayError, RayFluidMode, RayResult, RayWorld, + ResetPortal, + }, +}; +use horizon_core::{ + geometry::{Vec3, VoxelShape}, + position::BlockPos, +}; +use std::{collections::BTreeSet, fmt, io}; +#[derive(Clone, Copy)] +struct State { + reset: bool, + portal: Option<ResetPortal>, + fluid: FluidState, +} +pub struct FallRayRegistry<'s, 'r> { + interactions: &'s InteractionShapes<'r>, + states: Vec<State>, + water_mask: u8, +} +impl<'s, 'r> FallRayRegistry<'s, 'r> { + /// Tags are resolved snapshots; build a new binding after a tag reload. + pub fn new( + interactions: &'s InteractionShapes<'r>, + reset_blocks: &BTreeSet<String>, + water_fluids: &BTreeSet<String>, + ) -> io::Result<Self> { + let registry = interactions.registry(); + if reset_blocks + .iter() + .any(|name| registry.default_state(name).is_none()) + { + return Err(invalid("unknown fall-reset block tag member")); + } + let mut water_mask = 0; + for name in water_fluids { + water_mask |= FluidKind::from_name(name) + .ok_or_else(|| invalid("unknown water fluid tag member"))? + .mask(); + } + let mut states = Vec::with_capacity(registry.len()); + for i in 0..registry.len() { + let state = registry.state(BlockStateId(i as u32)).unwrap(); + states.push(State { + reset: reset_blocks.contains(&state.name), + portal: match state.name.as_str() { + "minecraft:end_gateway" => Some(ResetPortal::EndGateway), + "minecraft:end_portal" => Some(ResetPortal::EndPortal), + "minecraft:nether_portal" => Some(ResetPortal::NetherPortal), + _ => None, + }, + fluid: FluidState::from_block(state)?, + }); + } + Ok(Self { + interactions, + states, + water_mask, + }) + } + fn state(&self, id: BlockStateId) -> io::Result<State> { + self.states + .get(id.0 as usize) + .copied() + .ok_or_else(|| invalid("ray block state outside registry")) + } + pub fn fluid_for_block(&self, id: BlockStateId) -> io::Result<FluidState> { + Ok(self.state(id)?.fluid) + } +} +pub trait FallRayWorld { + type Error; + fn block_state(&mut self, p: BlockPos) -> Result<BlockStateId, Self::Error>; + fn fluid_state(&mut self, p: BlockPos) -> Result<FluidState, Self::Error>; + fn is_server_level(&self) -> bool; + fn entity_is_player(&mut self, e: EntityIdentity) -> Result<bool, Self::Error>; + fn players_nether_portal_delay(&mut self) -> Result<i32, Self::Error>; +} +#[derive(Debug)] +pub enum FallRayError<E> { + Data(io::Error), + World(E), +} +impl<E: fmt::Display> fmt::Display for FallRayError<E> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::Data(e) => e.fmt(f), + Self::World(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for FallRayError<E> {} +struct Bound<'a, 's, 'r, W> { + registry: &'a FallRayRegistry<'s, 'r>, + cache: &'a mut FluidShapeCache, + entity: Option<EntityIdentity>, + world: &'a mut W, +} +impl<W: FallRayWorld> FallResetWorld for Bound<'_, '_, '_, W> { + type Error = FallRayError<W::Error>; + type Block = BlockStateId; + fn fall_reset_tag(&mut self, s: BlockStateId) -> Result<bool, Self::Error> { + Ok(self.registry.state(s).map_err(FallRayError::Data)?.reset) + } + fn entity_is_player(&mut self, e: EntityIdentity) -> Result<bool, Self::Error> { + self.world.entity_is_player(e).map_err(FallRayError::World) + } + fn is_portal(&mut self, s: BlockStateId, p: ResetPortal) -> Result<bool, Self::Error> { + Ok(self.registry.state(s).map_err(FallRayError::Data)?.portal == Some(p)) + } + fn is_server_level(&self) -> bool { + self.world.is_server_level() + } + fn players_nether_portal_delay(&mut self) -> Result<i32, Self::Error> { + self.world + .players_nether_portal_delay() + .map_err(FallRayError::World) + } +} +struct Height<'a, W>(&'a mut W); +impl<W: FallRayWorld> FluidHeightWorld for Height<'_, W> { + type Error = FallRayError<W::Error>; + fn fluid(&mut self, p: [i32; 3]) -> Result<FluidState, Self::Error> { + self.0 + .fluid_state(BlockPos::new(p[0], p[1], p[2])) + .map_err(FallRayError::World) + } + fn sturdy_down(&mut self, _: [i32; 3]) -> Result<bool, Self::Error> { + Err(FallRayError::Data(invalid( + "camera support is outside a fluid shape query", + ))) + } +} +impl<W: FallRayWorld> RayWorld for Bound<'_, '_, '_, W> { + type Error = FallRayError<W::Error>; + type Block = BlockStateId; + type Fluid = FluidState; + fn block_state(&mut self, p: BlockPos) -> Result<BlockStateId, Self::Error> { + let state = self.world.block_state(p).map_err(FallRayError::World)?; + self.registry.state(state).map_err(FallRayError::Data)?; + Ok(state) + } + fn fluid_state(&mut self, p: BlockPos) -> Result<FluidState, Self::Error> { + self.world.fluid_state(p).map_err(FallRayError::World) + } + fn block_shape( + &mut self, + s: BlockStateId, + _: BlockPos, + mode: RayBlockMode, + ) -> Result<VoxelShape, Self::Error> { + if mode != RayBlockMode::FallDamageResetting { + return Err(FallRayError::Data(invalid("fall ray block mode mismatch"))); + } + let entity = self.entity; + world_ray::fall_reset_shape(self, s, entity) + } + fn interaction_shape( + &mut self, + s: BlockStateId, + _: BlockPos, + ) -> Result<VoxelShape, Self::Error> { + Ok(self + .registry + .interactions + .shape(s) + .map_err(FallRayError::Data)? + .clone()) + } + fn fluid_is_source(&mut self, s: FluidState) -> Result<bool, Self::Error> { + Ok(s.is_source()) + } + fn fluid_is_empty(&mut self, s: FluidState) -> Result<bool, Self::Error> { + Ok(s.kind() == FluidKind::Empty) + } + fn fluid_is_water(&mut self, s: FluidState) -> Result<bool, Self::Error> { + Ok(self.registry.water_mask & s.kind().mask() != 0) + } + fn fluid_shape(&mut self, s: FluidState, p: BlockPos) -> Result<VoxelShape, Self::Error> { + self.cache.shape(&mut Height(self.world), s, p) + } +} +/// `entity` represents the optional entity in a native EntityCollisionContext. +/// Keep the cache shared across calls to preserve native first-query behavior. +pub fn fall_reset_ray<W: FallRayWorld>( + world: &mut W, + registry: &FallRayRegistry<'_, '_>, + cache: &mut FluidShapeCache, + entity: Option<EntityIdentity>, + from: Vec3, + to: Vec3, + max_visits: usize, +) -> Result<RayResult, RayError<FallRayError<W::Error>>> { + world_ray::clip_world( + &mut Bound { + world, + registry, + cache, + entity, + }, + from, + to, + RayBlockMode::FallDamageResetting, + RayFluidMode::Water, + max_visits, + ) +} diff --git a/crates/horizon-world/src/registry_fluid.rs b/crates/horizon-world/src/registry_fluid.rs new file mode 100644 index 000000000..eb0f4ffe0 --- /dev/null +++ b/crates/horizon-world/src/registry_fluid.rs @@ -0,0 +1,212 @@ +//! Registered fluid contents, flow tags and native block support composition. +use crate::{ + block_support::{BlockSupportRegistry, SupportQueryError, SupportType}, + compression::invalid, + dynamic_support::DynamicSupportWorld, + fluid::{FluidHeightWorld, FluidState}, + fluid_flow::FluidFlowWorld, + registry::{BlockRegistry, BlockStateId}, +}; +use horizon_core::{geometry::Direction, position::BlockPos}; +use std::{collections::BTreeSet, fmt, io}; +#[derive(Clone, Copy)] +pub struct FluidBlock { + id: BlockStateId, + fluid: FluidState, + blocks_flow: bool, + ice: bool, +} +pub struct FluidRegistry<'r> { + registry: &'r BlockRegistry, + states: Vec<FluidBlock>, +} +impl<'r> FluidRegistry<'r> { + /// Rebuild on BLOCKS_FLUID_FLOW tag reload. Ice names come from actual class + /// membership; name suffixes do not distinguish ice from packed/blue ice. + pub fn new( + registry: &'r BlockRegistry, + blocks_flow: &BTreeSet<String>, + ice: &BTreeSet<String>, + ) -> io::Result<Self> { + for names in [blocks_flow, ice] { + if names.iter().any(|n| registry.default_state(n).is_none()) { + return Err(invalid("unknown fluid block member")); + } + } + let states = (0..registry.len()) + .map(|i| { + let id = BlockStateId(i as u32); + let s = registry.state(id).unwrap(); + Ok(FluidBlock { + id, + fluid: FluidState::from_block(s)?, + blocks_flow: blocks_flow.contains(&s.name), + ice: ice.contains(&s.name), + }) + }) + .collect::<io::Result<Vec<_>>>()?; + Ok(Self { registry, states }) + } + pub fn registry(&self) -> &'r BlockRegistry { + self.registry + } + fn state(&self, id: BlockStateId) -> io::Result<FluidBlock> { + self.states + .get(id.0 as usize) + .copied() + .ok_or_else(|| invalid("fluid block state outside registry")) + } + pub fn fluid(&self, id: BlockStateId) -> io::Result<FluidState> { + Ok(self.state(id)?.fluid) + } + pub fn blocks_flow(&self, id: BlockStateId) -> io::Result<bool> { + Ok(self.state(id)?.blocks_flow) + } + pub fn is_ice(&self, id: BlockStateId) -> io::Result<bool> { + Ok(self.state(id)?.ice) + } +} +/// Both queries return state IDs from the same registry. Separate entry points +/// preserve native world dispatch when reading a block versus its fluid cell. +pub trait FluidBlockWorld: DynamicSupportWorld { + fn block_state(&mut self, position: BlockPos) -> Result<BlockStateId, Self::Error>; + fn fluid_block_state(&mut self, position: BlockPos) -> Result<BlockStateId, Self::Error>; +} +#[derive(Debug)] +pub enum FluidQueryError<E> { + World(E), + Data(io::Error), + Support(SupportQueryError<E>), +} +impl<E: fmt::Display> fmt::Display for FluidQueryError<E> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Data(e) => e.fmt(f), + Self::Support(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for FluidQueryError<E> {} +pub struct RegistryFluidWorld<'a, 'r, W> { + registry: &'a FluidRegistry<'r>, + support: &'a BlockSupportRegistry<'r>, + world: &'a mut W, +} +impl<'a, 'r, W> RegistryFluidWorld<'a, 'r, W> { + pub fn new( + registry: &'a FluidRegistry<'r>, + support: &'a BlockSupportRegistry<'r>, + world: &'a mut W, + ) -> io::Result<Self> { + if !std::ptr::eq(registry.registry(), support.registry()) { + return Err(invalid("fluid and support registry identities differ")); + } + Ok(Self { + registry, + support, + world, + }) + } +} +impl<W: FluidBlockWorld> FluidFlowWorld for RegistryFluidWorld<'_, '_, W> { + type Error = FluidQueryError<W::Error>; + type Block = FluidBlock; + fn fluid(&mut self, p: BlockPos) -> Result<FluidState, Self::Error> { + let id = self + .world + .fluid_block_state(p) + .map_err(FluidQueryError::World)?; + self.registry.fluid(id).map_err(FluidQueryError::Data) + } + fn block(&mut self, p: BlockPos) -> Result<FluidBlock, Self::Error> { + let id = self.world.block_state(p).map_err(FluidQueryError::World)?; + self.registry.state(id).map_err(FluidQueryError::Data) + } + fn blocks_fluid_flow(&self, s: FluidBlock) -> bool { + s.blocks_flow + } + fn is_ice_class(&self, s: FluidBlock) -> bool { + s.ice + } + fn is_face_sturdy( + &mut self, + s: FluidBlock, + p: BlockPos, + d: Direction, + ) -> Result<bool, Self::Error> { + self.support + .is_face_sturdy(self.world, s.id, [p.x, p.y, p.z], d, SupportType::Full) + .map_err(FluidQueryError::Support) + } +} +impl<W: FluidBlockWorld> FluidHeightWorld for RegistryFluidWorld<'_, '_, W> { + type Error = FluidQueryError<W::Error>; + fn fluid(&mut self, p: [i32; 3]) -> Result<FluidState, Self::Error> { + FluidFlowWorld::fluid(self, BlockPos::new(p[0], p[1], p[2])) + } + fn sturdy_down(&mut self, p: [i32; 3]) -> Result<bool, Self::Error> { + let p = BlockPos::new(p[0], p[1], p[2]); + let s = FluidFlowWorld::block(self, p)?; + self.is_face_sturdy(s, p, Direction::Down) + } +} + +use crate::entity_fluid::{FluidInteractionWorld, FluidMembership, FluidSections, FluidTagId}; +use horizon_core::geometry::{Aabb, Vec3}; +/// Entity fields and loaded chunk views needed by the registered immersion scan. +/// Cell height/current behavior comes from this module's registry/support binding. +pub trait FluidEntityWorld: FluidBlockWorld + FluidMembership { + type Chunk: Copy; + fn interaction_box(&mut self) -> Result<Option<Aabb>, Self::Error>; + fn loaded_chunk(&mut self, x: i32, z: i32) -> Result<Option<Self::Chunk>, Self::Error>; + fn chunk_sections(&mut self, chunk: Self::Chunk) -> Result<FluidSections<'_>, Self::Error>; + fn bounding_box_min_y(&self) -> f64; + fn block_x(&self) -> i32; + fn eye_y(&mut self) -> Result<f64, Self::Error>; + fn block_z(&self) -> i32; +} +impl<W: FluidMembership> FluidMembership for RegistryFluidWorld<'_, '_, W> { + fn fluid_in_tag(&self, fluid: crate::fluid::FluidKind, tag: FluidTagId) -> bool { + self.world.fluid_in_tag(fluid, tag) + } +} +impl<W: FluidEntityWorld> FluidInteractionWorld for RegistryFluidWorld<'_, '_, W> { + type Error = FluidQueryError<W::Error>; + type Chunk = W::Chunk; + fn interaction_box(&mut self) -> Result<Option<Aabb>, Self::Error> { + self.world.interaction_box().map_err(FluidQueryError::World) + } + fn loaded_chunk(&mut self, x: i32, z: i32) -> Result<Option<Self::Chunk>, Self::Error> { + self.world + .loaded_chunk(x, z) + .map_err(FluidQueryError::World) + } + fn chunk_sections(&mut self, c: Self::Chunk) -> Result<FluidSections<'_>, Self::Error> { + self.world.chunk_sections(c).map_err(FluidQueryError::World) + } + fn bounding_box_min_y(&self) -> f64 { + self.world.bounding_box_min_y() + } + fn block_x(&self) -> i32 { + self.world.block_x() + } + fn eye_y(&mut self) -> Result<f64, Self::Error> { + self.world.eye_y().map_err(FluidQueryError::World) + } + fn block_z(&self) -> i32 { + self.world.block_z() + } + fn fluid_state(&mut self, p: BlockPos) -> Result<FluidState, Self::Error> { + FluidFlowWorld::fluid(self, p) + } + fn fluid_height(&mut self, s: FluidState, p: BlockPos) -> Result<f32, Self::Error> { + s.height_at(self, [p.x, p.y, p.z]) + } + fn camera_height(&mut self, s: FluidState, p: BlockPos) -> Result<f32, Self::Error> { + s.camera_height_at(self, [p.x, p.y, p.z]) + } + fn flow(&mut self, s: FluidState, p: BlockPos) -> Result<Vec3, Self::Error> { + crate::fluid_flow::flow_at(self, s, p) + } +} diff --git a/crates/horizon-world/src/retrogen.rs b/crates/horizon-world/src/retrogen.rs new file mode 100644 index 000000000..fc9f450bf --- /dev/null +++ b/crates/horizon-world/src/retrogen.rs @@ -0,0 +1,180 @@ +//! Below-zero upgrade metadata and resident block transformations. +//! Generation scheduling remains owned by the caller. +use crate::{chunk_status::ChunkStatus, compression::invalid, nbt::Tag}; +use std::io; + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct BelowZeroRetrogen { + target: ChunkStatus, + missing_bedrock: Vec<u64>, +} +impl BelowZeroRetrogen { + pub fn new(target: ChunkStatus, mut missing_bedrock: Vec<u64>) -> io::Result<Self> { + if target == ChunkStatus::Empty { + return Err(invalid("retrogen target status cannot be empty")); + } + while missing_bedrock.last() == Some(&0) { + missing_bedrock.pop(); + } + Ok(Self { + target, + missing_bedrock, + }) + } + pub fn target_status(&self) -> ChunkStatus { + self.target + } + pub fn has_bedrock_holes(&self) -> bool { + !self.missing_bedrock.is_empty() + } + pub fn has_bedrock_hole(&self, x: i32, z: i32) -> bool { + let index = ((z & 15) * 16 + (x & 15)) as usize; + self.missing_bedrock + .get(index / 64) + .is_some_and(|word| word & (1_u64 << (index % 64)) != 0) + } + pub fn missing_bedrock_words(&self) -> &[u64] { + &self.missing_bedrock + } + pub fn from_nbt(tag: &Tag) -> io::Result<Self> { + if !matches!(tag, Tag::Compound(_)) { + return Err(invalid("retrogen is not a compound")); + } + let target = ChunkStatus::from_nbt( + tag.get("target_status") + .ok_or_else(|| invalid("missing retrogen target status"))?, + )?; + // The native optional field is lenient: an invalid stream is absent. + let words = tag + .get("missing_bedrock") + .and_then(long_stream) + .unwrap_or_default(); + Self::new(target, words) + } + pub fn to_nbt(&self) -> Tag { + let mut fields = vec![("target_status", self.target.to_nbt())]; + if self.has_bedrock_holes() { + fields.push(( + "missing_bedrock", + Tag::LongArray( + self.missing_bedrock + .iter() + .map(|word| *word as i64) + .collect(), + ), + )); + } + Tag::compound(fields) + } +} +fn long_stream(tag: &Tag) -> Option<Vec<u64>> { + match tag { + Tag::LongArray(words) => Some(words.iter().map(|v| *v as u64).collect()), + Tag::IntArray(words) => Some(words.iter().map(|v| i64::from(*v) as u64).collect()), + Tag::ByteArray(words) => Some(words.iter().map(|v| i64::from(*v as i8) as u64).collect()), + Tag::List(words) => words + .iter() + .map(|word| { + Some(match word { + Tag::Byte(v) => i64::from(*v) as u64, + Tag::Short(v) => i64::from(*v) as u64, + Tag::Int(v) => i64::from(*v) as u64, + Tag::Long(v) => *v as u64, + Tag::Float(v) => (f32::from_bits(*v) as i64) as u64, + Tag::Double(v) => (f64::from_bits(*v) as i64) as u64, + _ => return None, + }) + }) + .collect(), + _ => None, + } +} + +impl BelowZeroRetrogen { + /// Replace the legacy five-layer bedrock band in a resident proto-chunk. + /// Local X/Z positions and native X-fastest traversal preserve write order. + pub fn replace_old_bedrock<B: crate::worldgen::terrain::TerrainBlockStates>( + chunk: &mut crate::worldgen::terrain::TerrainChunk<'_, B>, + ) -> Result<(), crate::worldgen::terrain::TerrainError> { + use crate::worldgen::terrain::TerrainError; + let bedrock = chunk + .registry() + .default_state("minecraft:bedrock") + .ok_or(TerrainError::InvalidState)?; + let deepslate = chunk + .registry() + .default_state("minecraft:deepslate") + .ok_or(TerrainError::InvalidState)?; + for z in 0..16 { + for y in 0..5 { + for x in 0..16 { + if chunk.same_block(chunk.block(x, y, z), bedrock) { + chunk.set_block_worldgen(x, y, z, deepslate)?; + } + } + } + } + Ok(()) + } + /// Clear marked columns through the supplied chunk's current generation + /// height. The installed upgrade and this mask need not be the same object. + pub fn apply_bedrock_mask<B: crate::worldgen::terrain::TerrainBlockStates>( + &self, + chunk: &mut crate::worldgen::terrain::TerrainChunk<'_, B>, + ) -> Result<(), crate::worldgen::terrain::TerrainError> { + use crate::worldgen::terrain::TerrainError; + let air = chunk + .registry() + .default_state("minecraft:air") + .ok_or(TerrainError::MissingAir)?; + let (min_y, height) = chunk.height_for_generation(); + let max_y = min_y.wrapping_add(height).wrapping_sub(1); + for x in 0..16 { + for z in 0..16 { + if self.has_bedrock_hole(x, z) { + for y in min_y..=max_y { + chunk.set_block_worldgen(x, y, z, air)?; + } + } + } + } + Ok(()) + } +} + +/// The native decoration decision is captured when the resolver is created. +/// Removing upgrade metadata afterwards does not unwrap an existing resolver. +/// Candidate sampling runs before deciding whether to read an old column biome. +pub struct RetrogenBiomeResolver<F> { + upgrading: bool, + resolve: F, +} +impl<F> RetrogenBiomeResolver<F> { + pub fn new<T, E>(upgrading: bool, resolve: F) -> Self + where + F: FnMut([i32; 3]) -> Result<T, E>, + { + Self { upgrading, resolve } + } + pub fn sample<T, E>( + &mut self, + quart: [i32; 3], + biome_key: impl FnOnce(&T) -> Option<&str>, + old_biome: impl FnOnce([i32; 3]) -> Result<T, E>, + ) -> Result<T, E> + where + F: FnMut([i32; 3]) -> Result<T, E>, + { + let candidate = (self.resolve)(quart)?; + if !self.upgrading + || matches!( + biome_key(&candidate), + Some("minecraft:lush_caves" | "minecraft:dripstone_caves" | "minecraft:deep_dark") + ) + { + Ok(candidate) + } else { + old_biome([quart[0], 0, quart[2]]) + } + } +} diff --git a/crates/horizon-world/src/server_player_combat.rs b/crates/horizon-world/src/server_player_combat.rs new file mode 100644 index 000000000..d187583f6 --- /dev/null +++ b/crates/horizon-world/src/server_player_combat.rs @@ -0,0 +1,315 @@ +//! Server-player outer hurt composed with registered attributes and player storage. +use crate::{ + attribute_health::HealthAttributes, + attributes::entity::EntityAttributes, + combat_rules::ArmorWorld, + damage_immunity::{self, ImmunityWorld}, + food::{Difficulty, FoodData}, + living_hurt::{HurtState, HurtTag, HurtWorld}, + player_health::PlayerFloatIds, + player_hurt::{ + CausingEntity, PlayerHurtWorld, ServerPlayerHurtWorld, server_player_hurt_server, + }, + server_player_damage::{ServerDamageEnvironment, ServerDamageError, ServerPlayerDamage}, + synced_floats::{DataError, SyncedFloats}, +}; +use std::io; +type Error<E> = <E as ArmorWorld>::Error; +pub trait CombatEnvironment<A: HealthAttributes = EntityAttributes>: + ServerDamageEnvironment<A> + + ServerPlayerHurtWorld<Error = <Self as ArmorWorld>::Error> + + ImmunityWorld<Error = <Self as ArmorWorld>::Error> +{ + /// Direct death flag, read only after health fails the native <= zero test. + fn dead_flag(&self) -> bool; +} +pub struct ServerPlayerCombat<'a, E, A: HealthAttributes = EntityAttributes> { + attributes: &'a mut A, + data: &'a mut SyncedFloats, + food: &'a mut FoodData, + ids: PlayerFloatIds, + environment: &'a mut E, +} +impl<'a, A: HealthAttributes, E: CombatEnvironment<A>> ServerPlayerCombat<'a, E, A> { + pub fn new( + attributes: &'a mut A, + data: &'a mut SyncedFloats, + food: &'a mut FoodData, + ids: PlayerFloatIds, + environment: &'a mut E, + ) -> io::Result<Self> { + ServerPlayerDamage::new(attributes, data, food, ids, environment)?; + Ok(Self { + attributes, + data, + food, + ids, + environment, + }) + } + pub fn hurt( + &mut self, + state: &mut HurtState<E::Source>, + damage: f32, + ) -> Result<bool, ServerDamageError<Error<E>, A::Error>> { + server_player_hurt_server(state, self, damage) + } +} +impl<A: HealthAttributes, E: CombatEnvironment<A>> HurtWorld for ServerPlayerCombat<'_, E, A> { + type Error = ServerDamageError<Error<E>, A::Error>; + type Source = E::Source; + type UseItem = E::UseItem; + type Blocking = E::Blocking; + type Sound = E::Sound; + fn source(&self) -> Self::Source { + self.environment.source() + } + fn is_server_player(&self) -> bool { + true + } + fn dead_or_dying(&mut self, _: &mut HurtState<Self::Source>) -> Result<bool, Self::Error> { + let health = self + .data + .get(self.ids.health) + .map_err(|id| ServerDamageError::Data(DataError::UnknownId(id)))?; + Ok(health <= 0.0 || self.environment.dead_flag()) + } + fn actually_hurt( + &mut self, + _: &mut HurtState<Self::Source>, + damage: f32, + ) -> Result<(), Self::Error> { + if damage_immunity::server_player_immunity(self.environment) + .map_err(ServerDamageError::Environment)? + { + return Ok(()); + } + ServerPlayerDamage::new( + self.attributes, + self.data, + self.food, + self.ids, + self.environment, + ) + .expect("validated immutable player schema") + .apply_after_immunity_check(damage) + } + fn blocking_component(&mut self, item: Self::UseItem) -> Option<Self::Blocking> { + self.environment.blocking_component(item) + } + fn invulnerable(&mut self, _: &mut HurtState<Self::Source>) -> Result<bool, Self::Error> { + damage_immunity::server_player_immunity(self.environment) + .map_err(ServerDamageError::Environment) + } + fn tag( + &mut self, + state: &mut HurtState<Self::Source>, + tag: HurtTag, + ) -> Result<bool, Self::Error> { + HurtWorld::tag(self.environment, state, tag).map_err(ServerDamageError::Environment) + } + fn fire_resistance( + &mut self, + state: &mut HurtState<Self::Source>, + ) -> Result<bool, Self::Error> { + HurtWorld::fire_resistance(self.environment, state).map_err(ServerDamageError::Environment) + } + fn sleeping(&mut self, state: &mut HurtState<Self::Source>) -> Result<bool, Self::Error> { + HurtWorld::sleeping(self.environment, state).map_err(ServerDamageError::Environment) + } + fn stop_sleeping(&mut self, state: &mut HurtState<Self::Source>) -> Result<(), Self::Error> { + HurtWorld::stop_sleeping(self.environment, state).map_err(ServerDamageError::Environment) + } + fn use_item( + &mut self, + state: &mut HurtState<Self::Source>, + ) -> Result<Self::UseItem, Self::Error> { + HurtWorld::use_item(self.environment, state).map_err(ServerDamageError::Environment) + } + fn apply_blocking( + &mut self, + state: &mut HurtState<Self::Source>, + damage: f32, + ) -> Result<f32, Self::Error> { + HurtWorld::apply_blocking(self.environment, state, damage) + .map_err(ServerDamageError::Environment) + } + fn freeze_hurts_extra( + &mut self, + state: &mut HurtState<Self::Source>, + ) -> Result<bool, Self::Error> { + HurtWorld::freeze_hurts_extra(self.environment, state) + .map_err(ServerDamageError::Environment) + } + fn helmet_empty(&mut self, state: &mut HurtState<Self::Source>) -> Result<bool, Self::Error> { + HurtWorld::helmet_empty(self.environment, state).map_err(ServerDamageError::Environment) + } + fn hurt_helmet( + &mut self, + state: &mut HurtState<Self::Source>, + damage: f32, + ) -> Result<(), Self::Error> { + HurtWorld::hurt_helmet(self.environment, state, damage) + .map_err(ServerDamageError::Environment) + } + fn resolve_mob(&mut self, state: &mut HurtState<Self::Source>) -> Result<(), Self::Error> { + HurtWorld::resolve_mob(self.environment, state).map_err(ServerDamageError::Environment) + } + fn resolve_player(&mut self, state: &mut HurtState<Self::Source>) -> Result<(), Self::Error> { + HurtWorld::resolve_player(self.environment, state).map_err(ServerDamageError::Environment) + } + fn on_blocked( + &mut self, + state: &mut HurtState<Self::Source>, + block: Self::Blocking, + ) -> Result<(), Self::Error> { + HurtWorld::on_blocked(self.environment, state, block) + .map_err(ServerDamageError::Environment) + } + fn broadcast_damage(&mut self, state: &mut HurtState<Self::Source>) -> Result<(), Self::Error> { + HurtWorld::broadcast_damage(self.environment, state).map_err(ServerDamageError::Environment) + } + fn mark_hurt(&mut self, state: &mut HurtState<Self::Source>) -> Result<(), Self::Error> { + HurtWorld::mark_hurt(self.environment, state).map_err(ServerDamageError::Environment) + } + fn knockback( + &mut self, + state: &mut HurtState<Self::Source>, + damage: f32, + blocked: bool, + ) -> Result<(), Self::Error> { + HurtWorld::knockback(self.environment, state, damage, blocked) + .map_err(ServerDamageError::Environment) + } + fn death_protection( + &mut self, + state: &mut HurtState<Self::Source>, + ) -> Result<bool, Self::Error> { + HurtWorld::death_protection(self.environment, state).map_err(ServerDamageError::Environment) + } + fn death_sound( + &mut self, + state: &mut HurtState<Self::Source>, + ) -> Result<Self::Sound, Self::Error> { + HurtWorld::death_sound(self.environment, state).map_err(ServerDamageError::Environment) + } + fn make_sound( + &mut self, + state: &mut HurtState<Self::Source>, + sound: Self::Sound, + ) -> Result<(), Self::Error> { + HurtWorld::make_sound(self.environment, state, sound) + .map_err(ServerDamageError::Environment) + } + fn secondary_sound(&mut self, state: &mut HurtState<Self::Source>) -> Result<(), Self::Error> { + HurtWorld::secondary_sound(self.environment, state).map_err(ServerDamageError::Environment) + } + fn die(&mut self, state: &mut HurtState<Self::Source>) -> Result<(), Self::Error> { + HurtWorld::die(self.environment, state).map_err(ServerDamageError::Environment) + } + fn hurt_sound(&mut self, state: &mut HurtState<Self::Source>) -> Result<(), Self::Error> { + HurtWorld::hurt_sound(self.environment, state).map_err(ServerDamageError::Environment) + } + fn game_time(&mut self, state: &mut HurtState<Self::Source>) -> Result<i64, Self::Error> { + HurtWorld::game_time(self.environment, state).map_err(ServerDamageError::Environment) + } + fn effects_on_hurt( + &mut self, + state: &mut HurtState<Self::Source>, + damage: f32, + ) -> Result<(), Self::Error> { + HurtWorld::effects_on_hurt(self.environment, state, damage) + .map_err(ServerDamageError::Environment) + } + fn player_hurt_criterion( + &mut self, + state: &mut HurtState<Self::Source>, + original: f32, + damage: f32, + blocked: bool, + ) -> Result<(), Self::Error> { + HurtWorld::player_hurt_criterion(self.environment, state, original, damage, blocked) + .map_err(ServerDamageError::Environment) + } + fn award_blocked( + &mut self, + state: &mut HurtState<Self::Source>, + amount: i32, + ) -> Result<(), Self::Error> { + HurtWorld::award_blocked(self.environment, state, amount) + .map_err(ServerDamageError::Environment) + } + fn attacker_criterion( + &mut self, + state: &mut HurtState<Self::Source>, + original: f32, + damage: f32, + blocked: bool, + ) -> Result<(), Self::Error> { + HurtWorld::attacker_criterion(self.environment, state, original, damage, blocked) + .map_err(ServerDamageError::Environment) + } +} +impl<A: HealthAttributes, E: CombatEnvironment<A>> PlayerHurtWorld + for ServerPlayerCombat<'_, E, A> +{ + fn ability_invulnerable(&self) -> bool { + ServerDamageEnvironment::ability_invulnerable(self.environment) + } + fn bypasses_invulnerability( + &mut self, + state: &mut HurtState<Self::Source>, + ) -> Result<bool, Self::Error> { + PlayerHurtWorld::bypasses_invulnerability(self.environment, state) + .map_err(ServerDamageError::Environment) + } + fn remove_shoulders(&mut self, state: &mut HurtState<Self::Source>) -> Result<(), Self::Error> { + PlayerHurtWorld::remove_shoulders(self.environment, state) + .map_err(ServerDamageError::Environment) + } + fn scales_with_difficulty( + &mut self, + state: &mut HurtState<Self::Source>, + ) -> Result<bool, Self::Error> { + PlayerHurtWorld::scales_with_difficulty(self.environment, state) + .map_err(ServerDamageError::Environment) + } + fn difficulty( + &mut self, + state: &mut HurtState<Self::Source>, + ) -> Result<Difficulty, Self::Error> { + PlayerHurtWorld::difficulty(self.environment, state).map_err(ServerDamageError::Environment) + } +} +impl<A: HealthAttributes, E: CombatEnvironment<A>> ServerPlayerHurtWorld + for ServerPlayerCombat<'_, E, A> +{ + type Player = E::Player; + type Arrow = E::Arrow; + fn causing_entity( + &mut self, + state: &mut HurtState<Self::Source>, + ) -> Result<CausingEntity<Self::Player, Self::Arrow>, Self::Error> { + self.environment + .causing_entity(state) + .map_err(ServerDamageError::Environment) + } + fn arrow_player_owner( + &mut self, + state: &mut HurtState<Self::Source>, + arrow: Self::Arrow, + ) -> Result<Option<Self::Player>, Self::Error> { + self.environment + .arrow_player_owner(state, arrow) + .map_err(ServerDamageError::Environment) + } + fn can_harm_player( + &mut self, + state: &mut HurtState<Self::Source>, + player: Self::Player, + ) -> Result<bool, Self::Error> { + self.environment + .can_harm_player(state, player) + .map_err(ServerDamageError::Environment) + } +} diff --git a/crates/horizon-world/src/server_player_damage.rs b/crates/horizon-world/src/server_player_damage.rs new file mode 100644 index 000000000..6b3ff6088 --- /dev/null +++ b/crates/horizon-world/src/server_player_damage.rs @@ -0,0 +1,285 @@ +//! Compose ordinary server-player inner damage with registered attributes, +//! synchronized health/absorption and stored hunger. Outer hurt gates stay with +//! the caller; equipment, effect, statistic and combat services stay explicit. +use crate::{ + attribute_health::HealthAttributes, + attributes::entity::{EntityAttributes, LookupError}, + combat_rules::ArmorWorld, + compression::invalid, + damage_reduction::{self, Bypass, DamageReductionWorld}, + food::FoodData, + living_damage::{self, DamageStat, DamageWorld}, + player_health::{PlayerAttributeHealth, PlayerFloatIds, PlayerHealthError}, + synced_floats::{DataError, Observer, SyncedFloats}, +}; +use std::{fmt, io}; +type EnvError<E> = <E as ArmorWorld>::Error; +#[derive(Debug)] +pub enum ServerDamageError<E, A = LookupError> { + Attribute(A), + Data(DataError<E>), + Environment(E), +} +impl<E: fmt::Display, A: fmt::Debug> fmt::Display for ServerDamageError<E, A> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::Attribute(e) => write!(f, "damage attribute lookup: {e:?}"), + Self::Data(e) => e.fmt(f), + Self::Environment(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static, A: fmt::Debug> std::error::Error for ServerDamageError<E, A> {} +fn health_error<E, A>(e: PlayerHealthError<E, A>) -> ServerDamageError<E, A> { + match e { + PlayerHealthError::Attribute(e) => ServerDamageError::Attribute(e), + PlayerHealthError::Data(e) => ServerDamageError::Data(e), + } +} +pub trait ServerDamageEnvironment<A: HealthAttributes = EntityAttributes>: + ArmorWorld + Observer<Error = <Self as ArmorWorld>::Error> +{ + type Attacker: Copy; + fn invulnerable(&mut self) -> Result<bool, EnvError<Self>>; + fn bypasses(&mut self, kind: Bypass) -> Result<bool, EnvError<Self>>; + /// Equipment breakage may update the live attribute map before armor and + /// toughness are queried by the rest of this hit. + fn hurt_armor(&mut self, attributes: &mut A, damage: f32) -> Result<(), EnvError<Self>>; + fn has_resistance(&mut self) -> Result<bool, EnvError<Self>>; + fn resistance_amplifier(&mut self) -> Result<i32, EnvError<Self>>; + fn award_resisted(&mut self, amount: i32) -> Result<(), EnvError<Self>>; + fn attacker(&mut self) -> Result<Option<Self::Attacker>, EnvError<Self>>; + fn award_dealt_resisted(&mut self, amount: i32) -> Result<(), EnvError<Self>>; + fn damage_protection(&mut self, level: Self::ServerLevel) -> Result<f32, EnvError<Self>>; + fn award_self(&mut self, stat: DamageStat, amount: i32) -> Result<(), EnvError<Self>>; + fn award_attacker( + &mut self, + attacker: Self::Attacker, + stat: DamageStat, + amount: i32, + ) -> Result<(), EnvError<Self>>; + fn source_food_exhaustion(&mut self) -> Result<f32, EnvError<Self>>; + fn ability_invulnerable(&self) -> bool; + fn level_is_client(&mut self) -> Result<bool, EnvError<Self>>; + fn record_damage(&mut self, amount: f32) -> Result<(), EnvError<Self>>; + fn damage_event(&mut self) -> Result<(), EnvError<Self>>; +} +pub struct ServerPlayerDamage<'a, E, A: HealthAttributes = EntityAttributes> { + attributes: &'a mut A, + data: &'a mut SyncedFloats, + food: &'a mut FoodData, + ids: PlayerFloatIds, + armor: A::Key, + toughness: A::Key, + environment: &'a mut E, +} +impl<'a, A: HealthAttributes, E: ServerDamageEnvironment<A>> ServerPlayerDamage<'a, E, A> { + pub fn new( + attributes: &'a mut A, + data: &'a mut SyncedFloats, + food: &'a mut FoodData, + ids: PlayerFloatIds, + environment: &'a mut E, + ) -> io::Result<Self> { + let armor = attributes + .health_attribute_key("minecraft:armor") + .ok_or_else(|| invalid("missing ARMOR definition"))?; + let toughness = attributes + .health_attribute_key("minecraft:armor_toughness") + .ok_or_else(|| invalid("missing ARMOR_TOUGHNESS definition"))?; + PlayerAttributeHealth::new(attributes, data, ids, false, environment)?; + Ok(Self { + attributes, + data, + food, + ids, + armor, + toughness, + environment, + }) + } + fn health_binding(&mut self) -> PlayerAttributeHealth<'_, E, A> { + PlayerAttributeHealth::new( + self.attributes, + self.data, + self.ids, + false, + self.environment, + ) + .expect("validated immutable player float schema") + } + pub fn apply(&mut self, damage: f32) -> Result<(), ServerDamageError<EnvError<E>, A::Error>> { + living_damage::actually_hurt(self, damage, true) + } + pub(crate) fn apply_after_immunity_check( + &mut self, + damage: f32, + ) -> Result<(), ServerDamageError<EnvError<E>, A::Error>> { + living_damage::actually_hurt_after_immunity_check(self, damage, true) + } +} +impl<A: HealthAttributes, E: ServerDamageEnvironment<A>> ArmorWorld + for ServerPlayerDamage<'_, E, A> +{ + type Error = ServerDamageError<EnvError<E>, A::Error>; + type Weapon = E::Weapon; + type ServerLevel = E::ServerLevel; + fn weapon(&mut self) -> Result<Option<Self::Weapon>, Self::Error> { + self.environment + .weapon() + .map_err(ServerDamageError::Environment) + } + fn server_level(&mut self) -> Result<Option<Self::ServerLevel>, Self::Error> { + self.environment + .server_level() + .map_err(ServerDamageError::Environment) + } + fn modify_armor_effectiveness( + &mut self, + l: Self::ServerLevel, + w: Self::Weapon, + v: f32, + ) -> Result<f32, Self::Error> { + self.environment + .modify_armor_effectiveness(l, w, v) + .map_err(ServerDamageError::Environment) + } +} +impl<A: HealthAttributes, E: ServerDamageEnvironment<A>> DamageReductionWorld + for ServerPlayerDamage<'_, E, A> +{ + fn bypasses(&mut self, b: Bypass) -> Result<bool, Self::Error> { + self.environment + .bypasses(b) + .map_err(ServerDamageError::Environment) + } + fn hurt_armor(&mut self, v: f32) -> Result<(), Self::Error> { + self.environment + .hurt_armor(self.attributes, v) + .map_err(ServerDamageError::Environment) + } + fn armor_value(&mut self) -> Result<i32, Self::Error> { + self.attributes + .health_attribute_value(self.armor.clone()) + .map(damage_reduction::armor_from_attribute) + .map_err(ServerDamageError::Attribute) + } + fn toughness_attribute(&mut self) -> Result<f64, Self::Error> { + self.attributes + .health_attribute_value(self.toughness.clone()) + .map_err(ServerDamageError::Attribute) + } + fn has_resistance(&mut self) -> Result<bool, Self::Error> { + self.environment + .has_resistance() + .map_err(ServerDamageError::Environment) + } + fn resistance_amplifier(&mut self) -> Result<i32, Self::Error> { + self.environment + .resistance_amplifier() + .map_err(ServerDamageError::Environment) + } + fn victim_is_server_player(&self) -> bool { + true + } + fn award_resisted(&mut self, v: i32) -> Result<(), Self::Error> { + self.environment + .award_resisted(v) + .map_err(ServerDamageError::Environment) + } + fn attacker_is_server_player(&mut self) -> Result<bool, Self::Error> { + self.environment + .attacker() + .map(|v| v.is_some()) + .map_err(ServerDamageError::Environment) + } + fn award_dealt_resisted(&mut self, v: i32) -> Result<(), Self::Error> { + self.environment + .award_dealt_resisted(v) + .map_err(ServerDamageError::Environment) + } + fn damage_protection(&mut self, l: Self::ServerLevel) -> Result<f32, Self::Error> { + self.environment + .damage_protection(l) + .map_err(ServerDamageError::Environment) + } +} +impl<A: HealthAttributes, E: ServerDamageEnvironment<A>> DamageWorld + for ServerPlayerDamage<'_, E, A> +{ + type Error = ServerDamageError<EnvError<E>, A::Error>; + type Attacker = E::Attacker; + fn invulnerable(&mut self) -> Result<bool, Self::Error> { + self.environment + .invulnerable() + .map_err(ServerDamageError::Environment) + } + fn after_armor(&mut self, v: f32) -> Result<f32, Self::Error> { + damage_reduction::after_armor(self, v) + } + fn after_magic(&mut self, v: f32) -> Result<f32, Self::Error> { + damage_reduction::after_magic(self, v) + } + fn absorption(&mut self) -> Result<f32, Self::Error> { + self.health_binding().absorption().map_err(health_error) + } + fn set_absorption(&mut self, v: f32) -> Result<(), Self::Error> { + self.health_binding() + .set_absorption(v) + .map_err(health_error) + } + fn server_player_attacker(&mut self) -> Result<Option<Self::Attacker>, Self::Error> { + self.environment + .attacker() + .map_err(ServerDamageError::Environment) + } + fn award_attacker( + &mut self, + a: Self::Attacker, + s: DamageStat, + v: i32, + ) -> Result<(), Self::Error> { + self.environment + .award_attacker(a, s, v) + .map_err(ServerDamageError::Environment) + } + fn award_self(&mut self, s: DamageStat, v: i32) -> Result<(), Self::Error> { + self.environment + .award_self(s, v) + .map_err(ServerDamageError::Environment) + } + fn source_food_exhaustion(&mut self) -> Result<f32, Self::Error> { + self.environment + .source_food_exhaustion() + .map_err(ServerDamageError::Environment) + } + fn cause_food_exhaustion(&mut self, v: f32) -> Result<(), Self::Error> { + if !self.environment.ability_invulnerable() + && !self + .environment + .level_is_client() + .map_err(ServerDamageError::Environment)? + { + self.food.add_exhaustion(v); + } + Ok(()) + } + fn record_damage(&mut self, v: f32) -> Result<(), Self::Error> { + self.environment + .record_damage(v) + .map_err(ServerDamageError::Environment) + } + fn health(&mut self) -> Result<f32, Self::Error> { + self.data + .get(self.ids.health) + .map_err(|id| ServerDamageError::Data(DataError::UnknownId(id))) + } + fn set_health(&mut self, v: f32) -> Result<(), Self::Error> { + self.health_binding().set_health(v).map_err(health_error) + } + fn damage_event(&mut self) -> Result<(), Self::Error> { + self.environment + .damage_event() + .map_err(ServerDamageError::Environment) + } +} diff --git a/crates/horizon-world/src/simple_container.rs b/crates/horizon-world/src/simple_container.rs new file mode 100644 index 000000000..b0e4a7ba0 --- /dev/null +++ b/crates/horizon-world/src/simple_container.rs @@ -0,0 +1,220 @@ +//! SimpleContainer storage and transfers using shared stack references. +//! Item component semantics and the virtual size/change hooks are supplied by +//! the caller. Menu transactions, persistence and recipe accounting are separate. +use crate::{ + component_patch::Prototype, + item_stack_refs::{ItemStacks, StackRef}, +}; +#[derive(Debug)] +pub enum ContainerError<E> { + Index, + Callback(E), +} +pub type ContainerResult<T, E> = Result<T, ContainerError<E>>; +#[derive(Debug)] +pub struct SimpleContainer<I, K, V> { + items: Vec<StackRef<I, K, V>>, + stacks: ItemStacks<I, K, V>, +} +pub trait ContainerHooks<I, K, V> { + type Error; + /// Native getMaxStackSize(), normally 99; called before the item's limit. + fn max_stack_size( + &mut self, + container: &mut SimpleContainer<I, K, V>, + ) -> Result<i32, Self::Error>; + fn item_max_stack_size(&self, stack: &StackRef<I, K, V>) -> i32; + fn changed(&mut self, container: &mut SimpleContainer<I, K, V>) -> Result<(), Self::Error>; +} +impl<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq> SimpleContainer<I, K, V> { + pub fn new(size: usize, stacks: ItemStacks<I, K, V>) -> Self { + Self { + items: vec![stacks.empty(); size], + stacks, + } + } + /// Like the native varargs constructor, this retains aliases without limits. + pub fn from_items(items: Vec<StackRef<I, K, V>>, stacks: ItemStacks<I, K, V>) -> Self { + Self { items, stacks } + } + pub fn items(&self) -> &[StackRef<I, K, V>] { + &self.items + } + pub fn items_mut(&mut self) -> &mut [StackRef<I, K, V>] { + &mut self.items + } + pub fn size(&self) -> usize { + self.items.len() + } + pub fn is_empty(&self) -> bool { + self.items.iter().all(|s| s.read().is_empty()) + } + pub fn get(&self, index: i32) -> StackRef<I, K, V> { + usize::try_from(index) + .ok() + .and_then(|i| self.items.get(i)) + .cloned() + .unwrap_or_else(|| self.stacks.empty()) + } + pub fn count_item(&self, item: I) -> i32 { + self.items.iter().fold(0_i32, |total, s| { + let s = s.read(); + if s.item() == item { + total.wrapping_add(s.count()) + } else { + total + } + }) + } + pub fn can_add<H: ContainerHooks<I, K, V>>( + &self, + stack: &StackRef<I, K, V>, + hooks: &H, + ) -> bool { + self.items.iter().any(|s| { + s.read().is_empty() + || (s.read().same_item_components(&stack.read()) + && s.read().count() < hooks.item_max_stack_size(s)) + }) + } + fn limit<H: ContainerHooks<I, K, V>>( + &mut self, + stack: &StackRef<I, K, V>, + hooks: &mut H, + ) -> Result<i32, ContainerError<H::Error>> { + let container = hooks + .max_stack_size(self) + .map_err(ContainerError::Callback)?; + Ok(container.min(hooks.item_max_stack_size(stack))) + } + pub fn set<H: ContainerHooks<I, K, V>>( + &mut self, + index: i32, + stack: StackRef<I, K, V>, + hooks: &mut H, + ) -> Result<(), ContainerError<H::Error>> { + let slot = usize::try_from(index) + .ok() + .and_then(|i| self.items.get_mut(i)) + .ok_or(ContainerError::Index)?; + *slot = stack.clone(); + let limit = self.limit(&stack, hooks)?; + stack.write().limit_size(limit); + hooks.changed(self).map_err(ContainerError::Callback) + } + pub fn remove<H: ContainerHooks<I, K, V>>( + &mut self, + index: i32, + amount: i32, + hooks: &mut H, + ) -> Result<StackRef<I, K, V>, ContainerError<H::Error>> { + let s = self.get(index); + let result = if amount > 0 && !s.read().is_empty() { + self.stacks.split(&s, amount) + } else { + self.stacks.empty() + }; + if !result.read().is_empty() { + hooks.changed(self).map_err(ContainerError::Callback)?; + } + Ok(result) + } + pub fn remove_no_update<E>( + &mut self, + index: i32, + ) -> Result<StackRef<I, K, V>, ContainerError<E>> { + let slot = usize::try_from(index) + .ok() + .and_then(|i| self.items.get_mut(i)) + .ok_or(ContainerError::Index)?; + if slot.read().is_empty() { + Ok(self.stacks.empty()) + } else { + Ok(std::mem::replace(slot, self.stacks.empty())) + } + } + pub fn remove_type<H: ContainerHooks<I, K, V>>( + &mut self, + item: I, + prototype: Prototype<K, V>, + amount: i32, + hooks: &mut H, + ) -> Result<StackRef<I, K, V>, ContainerError<H::Error>> { + let result = self.stacks.create(item, 0, prototype); + for index in (0..self.size()).rev() { + let s = self.items[index].clone(); + if s.read().item() == item { + let wanted = amount.wrapping_sub(result.read().count()); + let removed = self.stacks.split(&s, wanted); + result.write().grow(removed.read().count()); + if result.read().count() == amount { + break; + } + } + } + if !result.read().is_empty() { + hooks.changed(self).map_err(ContainerError::Callback)?; + } + Ok(result) + } + pub fn clear<H: ContainerHooks<I, K, V>>( + &mut self, + hooks: &mut H, + ) -> Result<(), ContainerError<H::Error>> { + self.items.fill(self.stacks.empty()); + hooks.changed(self).map_err(ContainerError::Callback) + } + pub fn remove_all<H: ContainerHooks<I, K, V>>( + &mut self, + hooks: &mut H, + ) -> ContainerResult<Vec<StackRef<I, K, V>>, H::Error> { + let result = self + .items + .iter() + .filter(|s| !s.read().is_empty()) + .cloned() + .collect(); + self.clear(hooks)?; + Ok(result) + } + pub fn add<H: ContainerHooks<I, K, V>>( + &mut self, + stack: &StackRef<I, K, V>, + hooks: &mut H, + ) -> Result<StackRef<I, K, V>, ContainerError<H::Error>> { + if stack.read().is_empty() { + return Ok(self.stacks.empty()); + } + let remainder = self.stacks.copy(stack); + for index in 0..self.size() { + let target = self.items[index].clone(); + if target.read().same_item_components(&remainder.read()) { + let limit = self.limit(&target, hooks)?; + let amount = remainder + .read() + .count() + .min(limit.wrapping_sub(target.read().count())); + if amount > 0 { + target.write().grow(amount); + remainder.write().shrink(amount); + hooks.changed(self).map_err(ContainerError::Callback)?; + } + if remainder.read().is_empty() { + return Ok(self.stacks.empty()); + } + } + } + for index in 0..self.size() { + if self.items[index].read().is_empty() { + let moved = self.stacks.resolve(remainder.write().copy_and_clear()); + self.set(index as i32, moved, hooks)?; + break; + } + } + if remainder.read().is_empty() { + Ok(self.stacks.empty()) + } else { + Ok(remainder) + } + } +} diff --git a/crates/horizon-world/src/status_effect.rs b/crates/horizon-world/src/status_effect.rs new file mode 100644 index 000000000..bd0495874 --- /dev/null +++ b/crates/horizon-world/src/status_effect.rs @@ -0,0 +1,309 @@ +//! Shared status-effect instances. Cloning retains identity; copy_instance +//! implements the native copy constructor, excluding hidden effects and blend. +use std::{ + cell::{Ref, RefCell, RefMut}, + rc::Rc, +}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct Details { + pub duration: i32, + pub amplifier: i32, + pub ambient: bool, + pub visible: bool, + pub show_icon: bool, +} +#[derive(Clone, Copy, Debug, Default)] +pub struct BlendState { + pub factor: f32, + pub previous: f32, +} +#[derive(Debug)] +pub struct EffectData<H> { + pub effect: H, + pub details: Details, + pub hidden: Option<EffectInstance<H>>, + pub blend: BlendState, +} +#[derive(Debug)] +pub struct EffectInstance<H>(Rc<RefCell<EffectData<H>>>); +impl<H> Clone for EffectInstance<H> { + fn clone(&self) -> Self { + Self(self.0.clone()) + } +} +impl<H> EffectInstance<H> { + pub fn new(effect: H, mut details: Details, hidden: Option<Self>) -> Self { + details.amplifier = details.amplifier.clamp(0, 255); + Self(Rc::new(RefCell::new(EffectData { + effect, + details, + hidden, + blend: BlendState::default(), + }))) + } + pub fn read(&self) -> Ref<'_, EffectData<H>> { + self.0.borrow() + } + pub fn write(&self) -> RefMut<'_, EffectData<H>> { + self.0.borrow_mut() + } + pub fn same_reference(&self, other: &Self) -> bool { + Rc::ptr_eq(&self.0, &other.0) + } + pub fn infinite(&self) -> bool { + self.read().details.duration == -1 + } + pub fn ends_within(&self, duration: i32) -> bool { + !self.infinite() && self.read().details.duration <= duration + } + pub fn has_remaining(&self) -> bool { + self.infinite() || self.read().details.duration > 0 + } + fn shorter_than(&self, other: &Self) -> bool { + !self.infinite() + && (self.read().details.duration < other.read().details.duration || other.infinite()) + } + pub fn map_duration<T>(&self, mapper: impl FnOnce(i32) -> Result<i32, T>) -> Result<i32, T> { + let duration = self.read().details.duration; + if duration == -1 || duration == 0 { + Ok(duration) + } else { + mapper(duration) + } + } + pub fn copy_blend_from(&self, other: &Self) { + let blend = other.read().blend; + self.write().blend = blend; + } +} +impl<H: Clone> EffectInstance<H> { + pub fn copy_instance(&self) -> Self { + let data = self.read(); + Self(Rc::new(RefCell::new(EffectData { + effect: data.effect.clone(), + details: data.details, + hidden: None, + blend: BlendState::default(), + }))) + } + pub fn scaled(&self, factor: f32) -> Self { + let result = self.copy_instance(); + let duration = result + .map_duration::<std::convert::Infallible>(|duration| { + let v = duration as f32 * factor; + let floor = f64::from(v).floor() as i32; + Ok(floor.max(1)) + }) + .unwrap(); + result.write().details.duration = duration; + result + } + /// Updates details and the shared hidden chain. As in vanilla, differing + /// effect holders do not prevent an update; diagnostic logging is external. + pub fn update(&self, incoming: &Self) -> bool { + let mut changed = false; + if incoming.read().details.amplifier > self.read().details.amplifier { + if incoming.shorter_than(self) { + let old_hidden = self.read().hidden.clone(); + let hidden = self.copy_instance(); + hidden.write().hidden = old_hidden; + self.write().hidden = Some(hidden); + } + let source = incoming.read().details; + let mut data = self.write(); + data.details.amplifier = source.amplifier; + data.details.duration = source.duration; + changed = true; + } else if self.shorter_than(incoming) { + if incoming.read().details.amplifier == self.read().details.amplifier { + let duration = incoming.read().details.duration; + self.write().details.duration = duration; + changed = true; + } else { + let hidden = self.read().hidden.clone(); + if let Some(hidden) = hidden { + hidden.update(incoming); + } else { + self.write().hidden = Some(incoming.copy_instance()); + } + } + } + let incoming = incoming.read().details; + let mut data = self.write(); + if (!incoming.ambient && data.details.ambient) || changed { + data.details.ambient = incoming.ambient; + changed = true; + } + if incoming.visible != data.details.visible { + data.details.visible = incoming.visible; + changed = true; + } + if incoming.show_icon != data.details.show_icon { + data.details.show_icon = incoming.show_icon; + changed = true; + } + changed + } +} +impl<H: PartialEq> PartialEq for EffectInstance<H> { + fn eq(&self, other: &Self) -> bool { + let a = self.read(); + let b = other.read(); + a.effect == b.effect && a.details == b.details + } +} +impl<H: Eq> Eq for EffectInstance<H> {} + +pub trait TickWorld<H> { + type Error; + type Level: Copy; + fn actor_tick_count(&self) -> i32; + fn should_apply( + &mut self, + effect: H, + time: i32, + amplifier: i32, + instance: &EffectInstance<H>, + ) -> Result<bool, Self::Error>; + fn apply_tick( + &mut self, + effect: H, + level: Self::Level, + amplifier: i32, + instance: &EffectInstance<H>, + ) -> Result<bool, Self::Error>; + fn downgraded(&mut self, instance: &EffectInstance<H>) -> Result<(), Self::Error>; +} +pub trait BlendWorld<H> { + type Error; + fn advance_ticks( + &mut self, + effect: H, + instance: &EffectInstance<H>, + ) -> Result<i32, Self::Error>; + fn duration_ticks( + &mut self, + effect: H, + blending_in: bool, + instance: &EffectInstance<H>, + ) -> Result<i32, Self::Error>; +} +fn float_clamp(v: f32, lo: f32, hi: f32) -> f32 { + if v < lo { + lo + } else if v.is_nan() || hi.is_nan() { + f32::NAN + } else if v == 0.0 && hi == 0.0 { + f32::from_bits(v.to_bits() | hi.to_bits()) + } else { + v.min(hi) + } +} +impl<H> EffectInstance<H> { + fn tick_down(&self) { + let hidden = self.read().hidden.clone(); + if let Some(hidden) = hidden { + hidden.tick_down(); + } + let mut data = self.write(); + if data.details.duration != -1 && data.details.duration != 0 { + data.details.duration = data.details.duration.wrapping_sub(1); + } + } + fn downgrade(&self) -> bool { + if self.read().details.duration != 0 { + return false; + } + let hidden = self.read().hidden.clone(); + if let Some(hidden) = hidden { + let details = hidden.read().details; + let next = hidden.read().hidden.clone(); + let mut data = self.write(); + data.details = details; + data.hidden = next; + true + } else { + false + } + } + /// Entity.isRemoved is a final field-based query. Removal snaps the + /// previous factor before interpolation, including for non-finite partials. + pub fn blend_factor(&self, partial: f32, actor_removed: bool) -> f32 { + let mut data = self.write(); + if actor_removed { + data.blend.previous = data.blend.factor; + } + data.blend.previous + partial * (data.blend.factor - data.blend.previous) + } +} +impl<H: Clone> EffectInstance<H> { + pub fn tick_server<W: TickWorld<H>>( + &self, + world: &mut W, + level: W::Level, + ) -> Result<bool, W::Error> { + if !self.has_remaining() { + return Ok(false); + } + let time = if self.infinite() { + world.actor_tick_count() + } else { + self.read().details.duration + }; + let effect = self.read().effect.clone(); + let amplifier = self.read().details.amplifier; + if world.should_apply(effect, time, amplifier, self)? { + let effect = self.read().effect.clone(); + let amplifier = self.read().details.amplifier; + if !world.apply_tick(effect, level, amplifier, self)? { + return Ok(false); + } + } + self.tick_down(); + if self.downgrade() { + world.downgraded(self)?; + } + Ok(self.has_remaining()) + } + fn blend_has_effect<W: BlendWorld<H>>(&self, world: &mut W) -> Result<bool, W::Error> { + let effect = self.read().effect.clone(); + let advance = world.advance_ticks(effect, self)?; + Ok(!self.ends_within(advance)) + } + pub fn skip_blending<W: BlendWorld<H>>(&self, world: &mut W) -> Result<(), W::Error> { + let target = if self.blend_has_effect(world)? { + 1.0 + } else { + 0.0 + }; + self.write().blend = BlendState { + factor: target, + previous: target, + }; + Ok(()) + } + pub fn tick_client<W: BlendWorld<H>>(&self, world: &mut W) -> Result<(), W::Error> { + if self.has_remaining() { + self.tick_down(); + self.downgrade(); + } + let previous = self.read().blend.factor; + self.write().blend.previous = previous; + let has_effect = self.blend_has_effect(world)?; + let target = if has_effect { 1.0 } else { 0.0 }; + if self.read().blend.factor == target { + return Ok(()); + } + let effect = self.read().effect.clone(); + let ticks = world.duration_ticks(effect, has_effect, self)?; + if ticks == 0 { + self.write().blend.factor = target; + } else { + let step = 1.0 / ticks as f32; + let mut data = self.write(); + data.blend.factor += float_clamp(target - data.blend.factor, -step, step); + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/stored_consume.rs b/crates/horizon-world/src/stored_consume.rs new file mode 100644 index 000000000..19d168a61 --- /dev/null +++ b/crates/horizon-world/src/stored_consume.rs @@ -0,0 +1,83 @@ +//! Consume effects bound to an entity's shared active-effect storage. +use crate::{ + active_effects::{ActiveEffects, EffectHooks}, + consume_effect::EffectWorld, + java_hash_map::JavaKey, + status_effect::EffectInstance, +}; +use horizon_core::{position::BlockPos, random::RandomSource}; + +/// Actor and level services used alongside concrete status storage. Callbacks +/// receive the live storage so reentrant mutations remain visible to the next +/// operation. Random handles identify streams independently of actor changes. +pub trait ConsumeHooks<H: JavaKey + Clone, S, Set>: EffectHooks<H> { + type Random: Copy; + type Rng: RandomSource; + type SoundCategory; + fn get_random(&mut self, storage: &mut ActiveEffects<H>) -> Result<Self::Random, Self::Error>; + fn random_source(&mut self, random: Self::Random) -> &mut Self::Rng; + fn effect_set(&self, set: &Set) -> Vec<H>; + fn block_position(&mut self, storage: &mut ActiveEffects<H>) -> Result<BlockPos, Self::Error>; + fn sound_category( + &mut self, + storage: &mut ActiveEffects<H>, + ) -> Result<Self::SoundCategory, Self::Error>; + /// The native call excludes no entity and uses unit volume and pitch. + fn play_sound( + &mut self, + storage: &mut ActiveEffects<H>, + level: Self::Level, + position: BlockPos, + sound: S, + category: Self::SoundCategory, + ) -> Result<(), Self::Error>; +} + +pub struct StoredConsume<'a, H, W> { + pub effects: &'a mut ActiveEffects<H>, + pub world: &'a mut W, +} +impl<H: JavaKey + Clone, S, Set, W: ConsumeHooks<H, S, Set>> EffectWorld<H, S, Set> + for StoredConsume<'_, H, W> +{ + type Error = W::Error; + type Level = W::Level; + type Random = W::Random; + type Source = W::Rng; + type SoundCategory = W::SoundCategory; + + fn get_random(&mut self) -> Result<Self::Random, Self::Error> { + self.world.get_random(self.effects) + } + fn random_source(&mut self, random: Self::Random) -> &mut Self::Source { + self.world.random_source(random) + } + fn add_effect(&mut self, effect: EffectInstance<H>) -> Result<bool, Self::Error> { + self.effects.add(effect, None, self.world) + } + fn effect_set(&self, set: &Set) -> Vec<H> { + self.world.effect_set(set) + } + fn remove_effect(&mut self, effect: H) -> Result<bool, Self::Error> { + self.effects.remove(&effect, self.world) + } + fn remove_all_effects(&mut self) -> Result<bool, Self::Error> { + self.effects.remove_all(self.world) + } + fn block_position(&mut self) -> Result<BlockPos, Self::Error> { + self.world.block_position(self.effects) + } + fn sound_category(&mut self) -> Result<Self::SoundCategory, Self::Error> { + self.world.sound_category(self.effects) + } + fn play_sound( + &mut self, + level: Self::Level, + position: BlockPos, + sound: S, + category: Self::SoundCategory, + ) -> Result<(), Self::Error> { + self.world + .play_sound(self.effects, level, position, sound, category) + } +} diff --git a/crates/horizon-world/src/stored_effect_attributes.rs b/crates/horizon-world/src/stored_effect_attributes.rs new file mode 100644 index 000000000..ac8338c94 --- /dev/null +++ b/crates/horizon-world/src/stored_effect_attributes.rs @@ -0,0 +1,95 @@ +//! Effect modifier dispatch bound to a captured attribute map and its instances. +use crate::{ + attribute_map::AttributeMap, + attributes::Modifier, + effect_attribute_modifiers::{self as effects, Definitions, ModifierWorld}, + object_open_set::ObjectKey, +}; + +pub trait AttributeAccess<H: ObjectKey + Clone, I: ObjectKey + Clone> { + type Error; + /// Supplier creation receives the actual map, including pending queues, + /// before the new instance is inserted into its lookup collection. + fn create_instance( + &mut self, + definitions: &mut Definitions<H>, + map: &mut AttributeMap<H, I>, + attribute: Option<H>, + ) -> Result<Option<I>, Self::Error>; + fn get_instance( + &mut self, + definitions: &mut Definitions<H>, + map: &mut AttributeMap<H, I>, + attribute: Option<H>, + ) -> Result<Option<I>, Self::Error> { + map.get_instance(attribute, |map, key| { + self.create_instance(definitions, map, key) + }) + } + fn remove_modifier( + &mut self, + definitions: &mut Definitions<H>, + map: &mut AttributeMap<H, I>, + instance: &I, + id: &str, + ) -> Result<(), Self::Error>; + fn add_permanent( + &mut self, + definitions: &mut Definitions<H>, + map: &mut AttributeMap<H, I>, + instance: &I, + modifier: Modifier, + ) -> Result<(), Self::Error>; +} +/// The caller captures this map before dispatching the effect's modifier body. +/// Instance methods continue to receive it after lookup membership changes. +pub struct StoredAttributes<'a, H, I, W> { + pub map: &'a mut AttributeMap<H, I>, + pub world: &'a mut W, +} +impl<H: ObjectKey + Clone, I: ObjectKey + Clone, W: AttributeAccess<H, I>> ModifierWorld<H> + for StoredAttributes<'_, H, I, W> +{ + type Instance = I; + type Error = W::Error; + fn get_instance( + &mut self, + definitions: &mut Definitions<H>, + attribute: Option<H>, + ) -> Result<Option<I>, Self::Error> { + self.world.get_instance(definitions, self.map, attribute) + } + fn remove_modifier( + &mut self, + definitions: &mut Definitions<H>, + instance: &I, + id: &str, + ) -> Result<(), Self::Error> { + self.world + .remove_modifier(definitions, self.map, instance, id) + } + fn add_permanent( + &mut self, + definitions: &mut Definitions<H>, + instance: &I, + modifier: Modifier, + ) -> Result<(), Self::Error> { + self.world + .add_permanent(definitions, self.map, instance, modifier) + } +} +pub fn add<H: ObjectKey + Clone, I: ObjectKey + Clone, W: AttributeAccess<H, I>>( + definitions: &mut Definitions<H>, + map: &mut AttributeMap<H, I>, + world: &mut W, + amplifier: i32, +) -> Result<(), effects::Error<W::Error>> { + effects::add_modifiers(definitions, &mut StoredAttributes { map, world }, amplifier) +} +pub fn remove<H: ObjectKey + Clone, I: ObjectKey + Clone, W: AttributeAccess<H, I>>( + definitions: &mut Definitions<H>, + map: &mut AttributeMap<H, I>, + world: &mut W, +) -> Result<(), effects::Error<W::Error>> { + effects::remove_modifiers(definitions, &mut StoredAttributes { map, world }) +} diff --git a/crates/horizon-world/src/suffocation.rs b/crates/horizon-world/src/suffocation.rs new file mode 100644 index 000000000..bb5fa9b71 --- /dev/null +++ b/crates/horizon-world/src/suffocation.rs @@ -0,0 +1,120 @@ +//! Native suffocation predicates bound to a registry and a resolved block-tag set. +use crate::{ + block_collision::{BlockCollisionRegistry, CollisionQueryError, DynamicCollisionWorld}, + compression::invalid, + registry::BlockStateId, +}; +use horizon_core::geometry::{ShapeOp, VoxelShape}; +use std::{ + collections::{BTreeMap, BTreeSet, HashMap}, + io, + sync::Arc, +}; + +#[derive(Clone, Copy, Debug)] +pub enum SuffocationDefinition { + TaggedFullCollision, + Always, + Never, + NotExtendedPiston, + ClosedShulker, +} +#[derive(Clone, Copy, Debug)] +enum Rule { + Constant(bool), + DynamicFull, + Shulker, +} + +pub struct SuffocationRegistry<'r> { + collisions: Arc<BlockCollisionRegistry<'r>>, + rules: Vec<Rule>, +} +impl<'r> SuffocationRegistry<'r> { + pub fn collisions(&self) -> &BlockCollisionRegistry<'r> { + &self.collisions + } + + /// Rebind after the causes_suffocation tag changes. Definition keys and tag + /// members are canonical block identifiers from the same pinned registry. + pub fn new( + collisions: Arc<BlockCollisionRegistry<'r>>, + definitions: &BTreeMap<String, SuffocationDefinition>, + causes_suffocation: &BTreeSet<String>, + ) -> io::Result<Self> { + let registry = collisions.registry(); + if definitions + .keys() + .chain(causes_suffocation) + .any(|name| registry.default_state(name).is_none()) + { + return Err(invalid("unknown suffocation definition or tag member")); + } + let mut full_shapes = HashMap::new(); + let mut rules = Vec::with_capacity(registry.len()); + for index in 0..registry.len() { + let id = BlockStateId(index as u32); + let state = registry.state(id).unwrap(); + let definition = definitions + .get(&state.name) + .ok_or_else(|| invalid("missing suffocation definition"))?; + let rule = match definition { + SuffocationDefinition::Always => Rule::Constant(true), + SuffocationDefinition::Never => Rule::Constant(false), + SuffocationDefinition::NotExtendedPiston => { + Rule::Constant(match state.properties.get("extended").map(String::as_str) { + Some("false") => true, + Some("true") => false, + _ => return Err(invalid("invalid piston suffocation property")), + }) + } + SuffocationDefinition::ClosedShulker => Rule::Shulker, + SuffocationDefinition::TaggedFullCollision => { + if !causes_suffocation.contains(&state.name) { + Rule::Constant(false) + } else if let Some(shape) = collisions.cached_shapes().cached_shape(id)? { + let identity = std::ptr::from_ref(shape); + let full = if let Some(full) = full_shapes.get(&identity) { + *full + } else { + let full = !shape + .join_is_not_empty(&VoxelShape::block(), ShapeOp::XOR) + .map_err(|e| invalid(e.to_string()))?; + full_shapes.insert(identity, full); + full + }; + Rule::Constant(full) + } else { + Rule::DynamicFull + } + } + }; + rules.push(rule); + } + Ok(Self { collisions, rules }) + } + + pub fn is_suffocating<W: DynamicCollisionWorld>( + &self, + world: &mut W, + state: BlockStateId, + position: [i32; 3], + ) -> Result<bool, CollisionQueryError<W::Error>> { + let rule = self.rules.get(state.0 as usize).ok_or_else(|| { + CollisionQueryError::Data(invalid("suffocation state outside registry")) + })?; + match rule { + Rule::Constant(value) => Ok(*value), + Rule::Shulker => world + .shulker_is_closed(position) + .map(|closed| closed != Some(false)) + .map_err(CollisionQueryError::Context), + Rule::DynamicFull => self + .collisions + .collision_shape(world, state, position)? + .join_is_not_empty(&VoxelShape::block(), ShapeOp::XOR) + .map(|different| !different) + .map_err(|error| CollisionQueryError::Data(invalid(error.to_string()))), + } + } +} diff --git a/crates/horizon-world/src/swimming.rs b/crates/horizon-world/src/swimming.rs new file mode 100644 index 000000000..107ca14f0 --- /dev/null +++ b/crates/horizon-world/src/swimming.rs @@ -0,0 +1,50 @@ +//! Entity swimming state transitions and the player's flying-ability guard. +use horizon_core::position::BlockPos; +pub trait SwimmingWorld { + type Error; + fn is_swimming(&mut self) -> Result<bool, Self::Error>; + fn is_sprinting(&mut self) -> Result<bool, Self::Error>; + fn is_in_water(&mut self) -> Result<bool, Self::Error>; + fn is_under_water(&mut self) -> Result<bool, Self::Error>; + fn is_passenger(&mut self) -> Result<bool, Self::Error>; + fn was_eye_in_water(&self) -> bool; + /// Direct blockPosition field, captured after preceding virtual queries. + fn block_position(&self) -> BlockPos; + fn water_at(&mut self, position: BlockPos) -> Result<bool, Self::Error>; + fn set_swimming(&mut self, value: bool) -> Result<(), Self::Error>; +} +pub trait PlayerSwimmingWorld: SwimmingWorld { + /// Direct abilities.flying field; do not dispatch getAbilities here. + fn flying_ability(&self) -> bool; +} +pub fn under_water<W: SwimmingWorld>(world: &mut W) -> Result<bool, W::Error> { + Ok(world.was_eye_in_water() && world.is_in_water()?) +} +pub fn shallow_water<W: SwimmingWorld>(world: &mut W) -> Result<bool, W::Error> { + Ok(world.is_in_water()? && !world.is_under_water()?) +} +pub fn update<W: SwimmingWorld>(world: &mut W) -> Result<(), W::Error> { + let next = if world.is_swimming()? { + world.is_sprinting()? && world.is_in_water()? && !world.is_passenger()? + } else { + world.is_sprinting()? + && world.is_under_water()? + && !world.is_passenger()? + && world.water_at(world.block_position())? + }; + world.set_swimming(next) +} +pub fn update_player<W: PlayerSwimmingWorld>(world: &mut W) -> Result<(), W::Error> { + if world.flying_ability() { + world.set_swimming(false) + } else { + update(world) + } +} +pub fn fluid_jump_threshold(eye_height: f32) -> f64 { + if f64::from(eye_height) < 0.4 { + 0.0 + } else { + 0.4 + } +} diff --git a/crates/horizon-world/src/synced_floats.rs b/crates/horizon-world/src/synced_floats.rs new file mode 100644 index 000000000..54aa541c9 --- /dev/null +++ b/crates/horizon-world/src/synced_floats.rs @@ -0,0 +1,6 @@ +//! Synchronized float storage using boxed Java Float equality. +//! The scalar implementation also supports bytes; full entity schemas and +//! heterogeneous serializer storage remain separate. +pub use crate::synced_values::{DataError, Observer}; +pub type FloatValue = crate::synced_values::DataValue<f32>; +pub type SyncedFloats = crate::synced_values::SyncedValues<f32>; diff --git a/crates/horizon-world/src/synced_values.rs b/crates/horizon-world/src/synced_values.rs new file mode 100644 index 000000000..28ae91a5d --- /dev/null +++ b/crates/horizon-world/src/synced_values.rs @@ -0,0 +1,167 @@ +//! Synchronized typed values with native callback/dirty ordering. +//! Serializer codecs and complete entity schemas are separate. +use crate::compression::invalid; +use std::{fmt, io}; +#[derive(Clone, Copy, Debug)] +pub struct DataValue<T> { + pub id: u8, + pub value: T, +} +#[derive(Clone, Copy, Debug)] +struct Entry<T> { + id: u8, + initial: T, + value: T, + dirty: bool, +} +#[derive(Clone, Debug)] +pub struct SyncedValues<T> { + entries: Vec<Entry<T>>, + dirty: bool, +} +#[derive(Debug)] +pub enum DataError<E> { + UnknownId(u8), + Observer(E), +} +impl<E: fmt::Display> fmt::Display for DataError<E> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::UnknownId(id) => write!(f, "unknown synchronized field ID {id}"), + Self::Observer(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for DataError<E> {} +pub trait Observer<T: SyncedValue = f32> { + type Error; + fn updated(&mut self, data: &mut SyncedValues<T>, id: u8) -> Result<(), Self::Error>; + fn assigned( + &mut self, + _data: &mut SyncedValues<T>, + _values: &[DataValue<T>], + ) -> Result<(), Self::Error> { + Ok(()) + } +} +/// Equality used by the corresponding boxed native serializer value. +pub trait SyncedValue: Clone { + fn native_equal(&self, other: &Self) -> bool; +} +impl SyncedValue for f32 { + fn native_equal(&self, other: &Self) -> bool { + self.to_bits() == other.to_bits() || (self.is_nan() && other.is_nan()) + } +} +impl SyncedValue for u8 { + fn native_equal(&self, other: &Self) -> bool { + self == other + } +} +impl SyncedValue for bool { + fn native_equal(&self, other: &Self) -> bool { + self == other + } +} +impl<T: SyncedValue> SyncedValues<T> { + pub fn new(values: &[DataValue<T>]) -> io::Result<Self> { + let mut entries = values + .iter() + .map(|v| Entry { + id: v.id, + initial: v.value.clone(), + value: v.value.clone(), + dirty: false, + }) + .collect::<Vec<_>>(); + entries.sort_unstable_by_key(|e| e.id); + if entries.iter().any(|e| e.id == 255) || entries.windows(2).any(|e| e[0].id == e[1].id) { + return Err(invalid("duplicate or reserved synchronized field ID")); + } + Ok(Self { + entries, + dirty: false, + }) + } + fn index(&self, id: u8) -> Result<usize, u8> { + self.entries + .binary_search_by_key(&id, |e| e.id) + .map_err(|_| id) + } + pub fn get(&self, id: u8) -> Result<T, u8> { + Ok(self.entries[self.index(id)?].value.clone()) + } + pub fn is_dirty(&self) -> bool { + self.dirty + } + pub fn item_dirty(&self, id: u8) -> Result<bool, u8> { + Ok(self.entries[self.index(id)?].dirty) + } + pub fn is_default(&self, id: u8) -> Result<bool, u8> { + let e = &self.entries[self.index(id)?]; + Ok(e.initial.native_equal(&e.value)) + } + pub fn set<O: Observer<T>>( + &mut self, + id: u8, + value: T, + force: bool, + observer: &mut O, + ) -> Result<(), DataError<O::Error>> { + let index = self.index(id).map_err(DataError::UnknownId)?; + if force || !value.native_equal(&self.entries[index].value) { + self.entries[index].value = value; + observer.updated(self, id).map_err(DataError::Observer)?; + self.entries[index].dirty = true; + self.dirty = true; + } + Ok(()) + } + /// Received values always notify, even when equal, and do not set/clear dirty + /// flags. A failure preserves earlier entries and skips later/batch callbacks. + pub fn assign<O: Observer<T>>( + &mut self, + values: &[DataValue<T>], + observer: &mut O, + ) -> Result<(), DataError<O::Error>> { + for v in values { + let index = self.index(v.id).map_err(DataError::UnknownId)?; + self.entries[index].value = v.value.clone(); + observer.updated(self, v.id).map_err(DataError::Observer)?; + } + observer.assigned(self, values).map_err(DataError::Observer) + } + pub fn take_dirty(&mut self) -> Option<Vec<DataValue<T>>> { + if !self.dirty { + return None; + } + self.dirty = false; + let mut values = Vec::new(); + for e in &mut self.entries { + if e.dirty { + e.dirty = false; + values.push(DataValue { + id: e.id, + value: e.value.clone(), + }); + } + } + Some(values) + } + pub fn non_default(&self) -> Option<Vec<DataValue<T>>> { + let values: Vec<_> = self + .entries + .iter() + .filter(|e| !e.initial.native_equal(&e.value)) + .map(|e| DataValue { + id: e.id, + value: e.value.clone(), + }) + .collect(); + if values.is_empty() { + None + } else { + Some(values) + } + } +} diff --git a/crates/horizon-world/src/teleport_consume.rs b/crates/horizon-world/src/teleport_consume.rs new file mode 100644 index 000000000..bc4a74aba --- /dev/null +++ b/crates/horizon-world/src/teleport_consume.rs @@ -0,0 +1,118 @@ +//! Random teleport consumable: candidate draws, bounds and success effects. +use horizon_core::{geometry::Vec3, position::BlockPos, random::RandomSource}; +#[derive(Clone, Copy, Debug)] +pub struct TeleportConsume { + pub diameter: f32, + pub directional_particles: bool, +} +impl PartialEq for TeleportConsume { + fn eq(&self, other: &Self) -> bool { + let bits = |v: f32| if v.is_nan() { 0x7fc00000 } else { v.to_bits() }; + bits(self.diameter) == bits(other.diameter) + && self.directional_particles == other.directional_particles + } +} +pub trait TeleportConsumeWorld { + type Error; + type Level: Copy; + type Random: Copy; + type Source: RandomSource; + fn position_field(&self) -> Vec3; + fn get_random(&mut self) -> Result<Self::Random, Self::Error>; + fn random_source(&mut self, random: Self::Random) -> &mut Self::Source; + fn min_y(&mut self, level: Self::Level) -> Result<i32, Self::Error>; + /// Native execution casts the supplied level to ServerLevel here. + fn logical_height(&mut self, level: Self::Level) -> Result<i32, Self::Error>; + fn is_passenger(&mut self) -> Result<bool, Self::Error>; + fn stop_riding(&mut self) -> Result<(), Self::Error>; + fn position(&mut self) -> Result<Vec3, Self::Error>; + /// showParticles=true and forbidden tag=CONSUMABLE_DOES_NOT_TELEPORT_TO. + fn random_teleport(&mut self, position: Vec3) -> Result<bool, Self::Error>; + /// Level TELEPORT event, old position, context containing this actor. + fn teleport_event(&mut self, level: Self::Level, old_position: Vec3) + -> Result<(), Self::Error>; + fn is_fox(&self) -> bool; + /// Fox sound/NEUTRAL when fox=true; chorus-fruit sound/PLAYERS otherwise. + /// Native excluded entity is null and default volume/pitch are one. + fn teleport_sound( + &mut self, + level: Self::Level, + position: Vec3, + fox: bool, + ) -> Result<(), Self::Error>; + fn block_position(&mut self) -> Result<BlockPos, Self::Error>; + /// Native level event 2017, at the origin, carrying the packed offset. + fn directional_particles( + &mut self, + level: Self::Level, + origin: BlockPos, + offset: i32, + ) -> Result<(), Self::Error>; + fn reset_fall_distance(&mut self) -> Result<(), Self::Error>; + fn reset_impulse(&mut self) -> Result<(), Self::Error>; +} +fn clamp(v: f64, low: f64, high: f64) -> f64 { + if v < low { + low + } else if v.is_nan() || high.is_nan() { + f64::NAN + } else if v == 0.0 && high == 0.0 { + f64::from_bits(v.to_bits() | high.to_bits()) + } else { + v.min(high) + } +} +fn packed_offset(a: BlockPos, b: BlockPos) -> i32 { + let axis = |a: i32, b: i32| b.wrapping_sub(a).clamp(-127, 127) + 127; + (axis(a.x, b.x) << 16) | (axis(a.y, b.y) << 8) | axis(a.z, b.z) +} +impl TeleportConsume { + pub fn apply<W: TeleportConsumeWorld>( + &self, + world: &mut W, + level: W::Level, + ) -> Result<bool, W::Error> { + for _ in 0..16 { + let x = world.position_field().x; + let r = world.get_random()?; + let x = x + (world.random_source(r).next_double() - 0.5) * f64::from(self.diameter); + let y = world.position_field().y; + let r = world.get_random()?; + let y = y + (world.random_source(r).next_double() - 0.5) * f64::from(self.diameter); + let low = world.min_y(level)?; + let min = world.min_y(level)?; + let height = world.logical_height(level)?; + let high = min.wrapping_add(height).wrapping_sub(1); + let y = clamp(y, f64::from(low), f64::from(high)); + let z = world.position_field().z; + let r = world.get_random()?; + let z = z + (world.random_source(r).next_double() - 0.5) * f64::from(self.diameter); + if world.is_passenger()? { + world.stop_riding()?; + } + let old = world.position()?; + if world.random_teleport(Vec3::new(x, y, z))? { + world.teleport_event(level, old)?; + let fox = world.is_fox(); + world.teleport_sound(level, world.position_field(), fox)?; + if self.directional_particles { + let origin = BlockPos::new( + old.x.floor() as i32, + old.y.floor() as i32, + old.z.floor() as i32, + ); + let destination = world.block_position()?; + world.directional_particles( + level, + origin, + packed_offset(origin, destination), + )?; + } + world.reset_fall_distance()?; + world.reset_impulse()?; + return Ok(true); + } + } + Ok(false) + } +} diff --git a/crates/horizon-world/src/tick_data.rs b/crates/horizon-world/src/tick_data.rs new file mode 100644 index 000000000..e316f7a79 --- /dev/null +++ b/crates/horizon-world/src/tick_data.rs @@ -0,0 +1,81 @@ +//! Save-format bridge for scheduled block/fluid ticks. Registry identity is +//! supplied by the caller; this module does not implement either type's behavior. +use crate::{compression::invalid, nbt::Tag}; +use horizon_core::{ + position::BlockPos, + ticks::{SavedTick, TickPriority, TickTypeId}, +}; +use std::io; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TickKind { + Block, + Fluid, +} +impl TickKind { + pub const fn field(self) -> &'static str { + match self { + Self::Block => "block_ticks", + Self::Fluid => "fluid_ticks", + } + } +} + +pub fn read_list( + tag: &Tag, + mut resolve: impl FnMut(&str) -> Option<TickTypeId>, +) -> io::Result<Vec<SavedTick>> { + let Tag::List(entries) = tag else { + return Err(invalid("saved ticks are not a list")); + }; + entries + .iter() + .map(|entry| { + let Some(Tag::String(name)) = entry.get("i") else { + return Err(invalid("saved tick is missing type name")); + }; + let name = name.to_string().map_err(|e| invalid(e.to_string()))?; + let kind = resolve(&name).ok_or_else(|| invalid("unknown saved tick type"))?; + let int = |key| { + // NbtOps/Codec.INT use Number.intValue, including narrowing + // longs and Java's saturating float conversion. + match entry.get(key) { + Some(Tag::Byte(v)) => Ok(i32::from(*v)), + Some(Tag::Short(v)) => Ok(i32::from(*v)), + Some(Tag::Int(v)) => Ok(*v), + Some(Tag::Long(v)) => Ok(*v as i32), + Some(Tag::Float(v)) => Ok(f32::from_bits(*v) as i32), + Some(Tag::Double(v)) => Ok(f64::from_bits(*v) as i32), + _ => Err(invalid(format!("saved tick is missing number {key}"))), + } + }; + Ok(SavedTick { + kind, + pos: BlockPos::new(int("x")?, int("y")?, int("z")?), + delay: int("t")?, + priority: TickPriority::by_value(int("p")?), + }) + }) + .collect() +} + +pub fn write_list( + ticks: &[SavedTick], + mut name: impl FnMut(TickTypeId) -> Option<String>, +) -> io::Result<Tag> { + let entries = ticks + .iter() + .map(|tick| { + let name = name(tick.kind).ok_or_else(|| invalid("unknown saved tick type ID"))?; + Ok(Tag::compound([ + ("i", Tag::String(name.as_str().into())), + ("x", Tag::Int(tick.pos.x)), + ("y", Tag::Int(tick.pos.y)), + ("z", Tag::Int(tick.pos.z)), + ("t", Tag::Int(tick.delay)), + ("p", Tag::Int(tick.priority as i32)), + ])) + }) + .collect::<io::Result<Vec<_>>>()?; + Ok(Tag::List(entries)) +} diff --git a/crates/horizon-world/src/use_remainder.rs b/crates/horizon-world/src/use_remainder.rs new file mode 100644 index 000000000..357896b19 --- /dev/null +++ b/crates/horizon-world/src/use_remainder.rs @@ -0,0 +1,40 @@ +//! Use-remainder conversion preserves stack identity and only creates a +//! remainder after an actual count decrease for a finite-material actor. +use crate::item_stack_refs::StackRef; + +pub fn convert<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq, E>( + stack: StackRef<I, K, V>, + original_count: i32, + infinite_materials: bool, + create: impl FnOnce() -> StackRef<I, K, V>, + extra: impl FnOnce(StackRef<I, K, V>) -> Result<(), E>, +) -> Result<StackRef<I, K, V>, E> { + convert_with( + &mut (), + stack, + original_count, + infinite_materials, + |()| create(), + |(), remainder| extra(remainder), + ) +} +/// Variant for creation and extra-item effects that share one mutable world. +/// The world is borrowed only for the current callback. +pub fn convert_with<I: Copy + Eq, K: Clone + Eq, V: Clone + PartialEq, E, W>( + world: &mut W, + stack: StackRef<I, K, V>, + original_count: i32, + infinite_materials: bool, + create: impl FnOnce(&mut W) -> StackRef<I, K, V>, + extra: impl FnOnce(&mut W, StackRef<I, K, V>) -> Result<(), E>, +) -> Result<StackRef<I, K, V>, E> { + if infinite_materials || stack.read().count() >= original_count { + return Ok(stack); + } + let remainder = create(world); + if stack.read().is_empty() { + return Ok(remainder); + } + extra(world, remainder)?; + Ok(stack) +} diff --git a/crates/horizon-world/src/view_direction.rs b/crates/horizon-world/src/view_direction.rs new file mode 100644 index 000000000..d33a14289 --- /dev/null +++ b/crates/horizon-world/src/view_direction.rs @@ -0,0 +1,24 @@ +//! Native float-table view direction and horizontal blocking angle arithmetic. +use horizon_core::geometry::{Vec3, trig}; +pub fn view_vector(pitch: f32, yaw: f32) -> Vec3 { + let pitch = pitch * trig::DEG_TO_RAD; + let yaw = -yaw * trig::DEG_TO_RAD; + let cy = trig::cos(f64::from(yaw)); + let sy = trig::sin(f64::from(yaw)); + let cp = trig::cos(f64::from(pitch)); + let sp = trig::sin(f64::from(pitch)); + Vec3::new(f64::from(sy * cp), f64::from(-sp), f64::from(cy * cp)) +} +/// Java Math.acos comparisons use the pinned pure-Rust implementation. The +/// platform C-library acos is not bit-identical to the reference JVM. +pub fn acos(value: f64) -> f64 { + libm::acos(value) +} +pub fn blocking_angle(source: Vec3, position: Vec3, head_yaw: f32) -> f64 { + let view = view_vector(0.0, head_yaw); + let delta = source.subtract(position); + let horizontal = Vec3::new(delta.x, 0.0, delta.z).normalize(); + acos(horizontal.dot(view)) +} +/// Native no-source-position fallback widens the float PI constant to double. +pub const BLOCKING_FALLBACK_ANGLE: f64 = std::f32::consts::PI as f64; diff --git a/crates/horizon-world/src/water_splash.rs b/crates/horizon-world/src/water_splash.rs new file mode 100644 index 000000000..fd6b023bd --- /dev/null +++ b/crates/horizon-world/src/water_splash.rs @@ -0,0 +1,115 @@ +//! Water-entry sound, particles and game event, with native random draw order. +use horizon_core::geometry::Vec3; +use std::fmt; +#[derive(Clone, Copy, Debug)] +pub enum SplashParticle { + Bubble, + Splash, +} +pub trait WaterSplashWorld { + type Error; + type Entity: Copy + PartialEq; + type Sound: Copy; + fn this_entity(&self) -> Self::Entity; + fn controlling_passenger(&mut self) -> Result<Option<Self::Entity>, Self::Error>; + fn velocity(&mut self, entity: Self::Entity) -> Result<Vec3, Self::Error>; + fn splash_sound(&mut self, high_speed: bool) -> Result<Self::Sound, Self::Error>; + fn random_float(&mut self) -> Result<f32, Self::Error>; + fn random_double(&mut self) -> Result<f64, Self::Error>; + fn play_sound( + &mut self, + sound: Self::Sound, + volume: f32, + pitch: f32, + ) -> Result<(), Self::Error>; + fn position(&self) -> Vec3; + fn width(&self) -> f32; + fn particle( + &mut self, + kind: SplashParticle, + position: Vec3, + velocity: Vec3, + ) -> Result<(), Self::Error>; + fn splash_event(&mut self) -> Result<(), Self::Error>; +} +#[derive(Debug)] +pub enum SplashError<E> { + World(E), + BudgetExceeded, +} +impl<E: fmt::Display> fmt::Display for SplashError<E> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::BudgetExceeded => f.write_str("water splash particle budget exceeded"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for SplashError<E> {} +pub fn water_splash<W: WaterSplashWorld>( + world: &mut W, + mut budget: usize, +) -> Result<(), SplashError<W::Error>> { + let source = world + .controlling_passenger() + .map_err(SplashError::World)? + .unwrap_or(world.this_entity()); + let scale = if source == world.this_entity() { + 0.2f32 + } else { + 0.9f32 + }; + let velocity = world.velocity(source).map_err(SplashError::World)?; + let energy = velocity.x * velocity.x * f64::from(0.2f32) + + velocity.y * velocity.y + + velocity.z * velocity.z * f64::from(0.2f32); + let volume = energy.sqrt() as f32 * scale; + let volume = if volume.is_nan() { + volume + } else { + 1.0f32.min(volume) + }; + let sound = world + .splash_sound(volume.is_nan() || volume >= 0.25) + .map_err(SplashError::World)?; + let pitch = 1.0 + + (world.random_float().map_err(SplashError::World)? + - world.random_float().map_err(SplashError::World)?) + * 0.4; + world + .play_sound(sound, volume, pitch) + .map_err(SplashError::World)?; + let surface = world.position().y.floor() as i32 as f32; + for kind in [SplashParticle::Bubble, SplashParticle::Splash] { + let mut i = 0i32; + while (i as f32) < 1.0 + world.width() * 20.0 { + if budget == 0 { + return Err(SplashError::BudgetExceeded); + } + budget -= 1; + let dx = (world.random_double().map_err(SplashError::World)? * 2.0 - 1.0) + * f64::from(world.width()); + let dz = (world.random_double().map_err(SplashError::World)? * 2.0 - 1.0) + * f64::from(world.width()); + let position = Vec3::new( + world.position().x + dx, + f64::from(surface + 1.0), + world.position().z + dz, + ); + let particle_velocity = match kind { + SplashParticle::Bubble => Vec3::new( + velocity.x, + velocity.y + - world.random_double().map_err(SplashError::World)? * f64::from(0.2f32), + velocity.z, + ), + SplashParticle::Splash => velocity, + }; + world + .particle(kind, position, particle_velocity) + .map_err(SplashError::World)?; + i = i.wrapping_add(1); + } + } + world.splash_event().map_err(SplashError::World) +} diff --git a/crates/horizon-world/src/world_movement.rs b/crates/horizon-world/src/world_movement.rs new file mode 100644 index 000000000..c925203d7 --- /dev/null +++ b/crates/horizon-world/src/world_movement.rs @@ -0,0 +1,128 @@ +//! Entity.collide collection order and step resolution over a collision world. +//! Travel, velocity, grounded flags and inside-block effects remain caller work. +use crate::{ + block_collision_scan::{BlockCollisionScan, BlockCollisionWorld, CollisionScanError}, + collision_context::CollisionContext, + entity_obstruction::EntityIdentity, +}; +use horizon_core::geometry::{ + Aabb, Vec3, VoxelShape, entity_collision_bounds, try_resolve_step_movement, +}; + +pub trait EntityMovementWorld { + type Error; + /// Return native-selected entity shapes in query order. Selection occurs + /// once, even for zero movement, and the list is reused during stepping. + fn entity_collisions( + &mut self, + entity: EntityIdentity, + bounds: Aabb, + ) -> Result<Vec<VoxelShape>, Self::Error>; + /// Obtain the border, check isInsideCloseToBorder and fetch its shape only + /// when applicable. Called before block iteration for each collision query. + fn movement_border( + &mut self, + entity: EntityIdentity, + bounds: Aabb, + ) -> Result<Option<VoxelShape>, Self::Error>; +} + +pub struct MovementRequest<'a> { + pub entity: EntityIdentity, + /// Captured context for this entity. Experimental minecart exclusions need + /// their separate context layer; ordinary captured contexts are supported. + pub context: CollisionContext<'a>, + pub bounds: Aabb, + pub movement: Vec3, + pub max_step: f32, + pub on_ground: bool, + /// Per block scan, including skipped cursor cells. + pub candidate_budget: usize, +} + +pub fn resolve_world_movement<W, E>( + world: &mut W, + request: MovementRequest<'_>, +) -> Result<Vec3, CollisionScanError<E>> +where + W: BlockCollisionWorld<Error = E> + EntityMovementWorld<Error = E>, +{ + let entities = world + .entity_collisions( + request.entity, + entity_collision_bounds(request.movement, request.bounds, request.max_step), + ) + .map_err(CollisionScanError::World)?; + try_resolve_step_movement( + request.movement, + request.bounds, + request.max_step, + request.on_ground, + |bounds| { + let mut shapes = entities.clone(); + if let Some(border) = world + .movement_border(request.entity, bounds) + .map_err(CollisionScanError::World)? + { + shapes.push(border); + } + for hit in BlockCollisionScan::new( + world, + request.context, + bounds, + false, + request.candidate_budget, + )? { + shapes.push(hit?.shape); + } + Ok(shapes) + }, + ) +} + +/// Entity-bearing CollisionGetter.noCollision, with block/context selection +/// supplied by the caller (including an always-fluid context when requested). +/// Native short-circuits blocks, then entity selection, then border geometry. +pub struct CollisionCheckRequest<'a> { + pub entity: EntityIdentity, + pub context: CollisionContext<'a>, + pub bounds: Aabb, + pub candidate_budget: usize, +} +pub fn no_world_collision<W, E>( + world: &mut W, + request: CollisionCheckRequest<'_>, +) -> Result<bool, CollisionScanError<E>> +where + W: BlockCollisionWorld<Error = E> + EntityMovementWorld<Error = E>, +{ + for hit in BlockCollisionScan::new( + world, + request.context, + request.bounds, + false, + request.candidate_budget, + )? { + if !hit?.shape.is_empty() { + return Ok(false); + } + } + if !world + .entity_collisions(request.entity, request.bounds) + .map_err(CollisionScanError::World)? + .is_empty() + { + return Ok(false); + } + if let Some(border) = world + .movement_border(request.entity, request.bounds) + .map_err(CollisionScanError::World)? + { + let entity = VoxelShape::from_box(request.bounds).map_err(CollisionScanError::Shape)?; + return border + .join_is_not_empty(&entity, horizon_core::geometry::ShapeOp::AND) + .map(|overlap| !overlap) + .map_err(CollisionScanError::Shape); + } + Ok(true) +} diff --git a/crates/horizon-world/src/world_ray.rs b/crates/horizon-world/src/world_ray.rs new file mode 100644 index 000000000..302f043d6 --- /dev/null +++ b/crates/horizon-world/src/world_ray.rs @@ -0,0 +1,194 @@ +//! BlockGetter clipping: ordered block/fluid queries and interaction-face override. +use crate::entity_obstruction::EntityIdentity; +use horizon_core::{ + geometry::{BlockHit, Direction, TraversalError, Vec3, VoxelShape, traverse_blocks}, + position::BlockPos, +}; +use std::fmt; +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RayBlockMode { + Collider, + Outline, + Visual, + FallDamageResetting, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum RayFluidMode { + None, + SourceOnly, + Any, + Water, +} +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct RayResult { + pub hit: BlockHit, + pub miss: bool, +} +#[derive(Debug)] +pub enum RayError<E> { + Traversal(TraversalError), + World(E), +} +impl<E: fmt::Display> fmt::Display for RayError<E> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::Traversal(e) => e.fmt(f), + Self::World(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for RayError<E> {} +/// Block/shape providers retain the captured collision context for the query. +/// State handles must remain valid when later provider calls change the world. +pub trait RayWorld { + type Error; + type Block: Copy; + type Fluid: Copy; + fn block_state(&mut self, p: BlockPos) -> Result<Self::Block, Self::Error>; + fn fluid_state(&mut self, p: BlockPos) -> Result<Self::Fluid, Self::Error>; + fn block_shape( + &mut self, + state: Self::Block, + p: BlockPos, + mode: RayBlockMode, + ) -> Result<VoxelShape, Self::Error>; + fn interaction_shape( + &mut self, + state: Self::Block, + p: BlockPos, + ) -> Result<VoxelShape, Self::Error>; + fn fluid_is_source(&mut self, state: Self::Fluid) -> Result<bool, Self::Error>; + fn fluid_is_empty(&mut self, state: Self::Fluid) -> Result<bool, Self::Error>; + fn fluid_is_water(&mut self, state: Self::Fluid) -> Result<bool, Self::Error>; + fn fluid_shape(&mut self, state: Self::Fluid, p: BlockPos) -> Result<VoxelShape, Self::Error>; +} +pub fn clip_with_interaction<W: RayWorld>( + world: &mut W, + start: Vec3, + end: Vec3, + p: BlockPos, + shape: &VoxelShape, + state: W::Block, +) -> Result<Option<BlockHit>, W::Error> { + let mut hit = shape.clip(start, end, p); + if let Some(hit) = &mut hit { + if let Some(interaction) = world.interaction_shape(state, p)?.clip(start, end, p) { + if interaction.location.subtract(start).length_squared() + < hit.location.subtract(start).length_squared() + { + hit.direction = interaction.direction; + } + } + } + Ok(hit) +} +fn pick_fluid<W: RayWorld>( + world: &mut W, + state: W::Fluid, + mode: RayFluidMode, +) -> Result<bool, W::Error> { + match mode { + RayFluidMode::None => Ok(false), + RayFluidMode::SourceOnly => world.fluid_is_source(state), + RayFluidMode::Any => Ok(!world.fluid_is_empty(state)?), + RayFluidMode::Water => world.fluid_is_water(state), + } +} +/// Finite rays only, with an explicit traversal budget. Budget/provider failures +/// preserve preceding queries and return an error rather than a fabricated miss. +pub fn clip_world<W: RayWorld>( + world: &mut W, + start: Vec3, + end: Vec3, + blocks: RayBlockMode, + fluids: RayFluidMode, + max_visits: usize, +) -> Result<RayResult, RayError<W::Error>> { + let result = traverse_blocks(start, end, max_visits, |p| { + let mut query = || -> Result<Option<BlockHit>, W::Error> { + let block = world.block_state(p)?; + let fluid = world.fluid_state(p)?; + let shape = world.block_shape(block, p, blocks)?; + let solid = clip_with_interaction(world, start, end, p, &shape, block)?; + let liquid = if pick_fluid(world, fluid, fluids)? { + world.fluid_shape(fluid, p)?.clip(start, end, p) + } else { + None + }; + let solid_distance = solid.map_or(f64::MAX, |h| start.distance_squared(h.location)); + let liquid_distance = liquid.map_or(f64::MAX, |h| start.distance_squared(h.location)); + Ok(if solid_distance <= liquid_distance { + solid + } else { + liquid + }) + }; + match query() { + Ok(Some(hit)) => Some(Ok(hit)), + Ok(None) => None, + Err(e) => Some(Err(e)), + } + }) + .map_err(RayError::Traversal)?; + match result { + Some(hit) => Ok(RayResult { + hit: hit.map_err(RayError::World)?, + miss: false, + }), + None => Ok(RayResult { + hit: BlockHit { + location: end, + direction: Direction::approximate_nearest(start.subtract(end)), + block: BlockPos::new( + end.x.floor() as i32, + end.y.floor() as i32, + end.z.floor() as i32, + ), + inside: false, + }, + miss: true, + }), + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum ResetPortal { + EndGateway, + EndPortal, + NetherPortal, +} +pub trait FallResetWorld { + type Error; + type Block: Copy; + fn fall_reset_tag(&mut self, state: Self::Block) -> Result<bool, Self::Error>; + fn entity_is_player(&mut self, entity: EntityIdentity) -> Result<bool, Self::Error>; + fn is_portal(&mut self, state: Self::Block, portal: ResetPortal) -> Result<bool, Self::Error>; + fn is_server_level(&self) -> bool; + fn players_nether_portal_delay(&mut self) -> Result<i32, Self::Error>; +} +/// Supply an entity only when the native context is an EntityCollisionContext +/// containing one. Player testing is entity type identity, not a class check. +pub fn fall_reset_shape<W: FallResetWorld>( + world: &mut W, + state: W::Block, + entity: Option<EntityIdentity>, +) -> Result<VoxelShape, W::Error> { + if world.fall_reset_tag(state)? { + return Ok(VoxelShape::block()); + } + if let Some(entity) = entity { + if world.entity_is_player(entity)? { + if world.is_portal(state, ResetPortal::EndGateway)? + || world.is_portal(state, ResetPortal::EndPortal)? + { + return Ok(VoxelShape::block()); + } + if world.is_server_level() + && world.is_portal(state, ResetPortal::NetherPortal)? + && world.players_nether_portal_delay()? == 0 + { + return Ok(VoxelShape::block()); + } + } + } + Ok(VoxelShape::empty()) +} diff --git a/crates/horizon-world/src/worldgen.rs b/crates/horizon-world/src/worldgen.rs new file mode 100644 index 000000000..ec7eeda6f --- /dev/null +++ b/crates/horizon-world/src/worldgen.rs @@ -0,0 +1,295 @@ +//! Version-specific noise, density registry and terrain-router JSON decoding. +//! Complete terrain generation remains pending. +pub mod anchor; +pub mod aquifer; +pub mod bamboo; +pub mod biome; +pub mod biome_chunk; +pub mod biome_predicate; +pub mod biome_source; +pub mod biome_temperature; +pub mod biome_weather; +pub mod block_blob; +pub mod block_column; +pub mod block_feature; +pub mod block_pile; +pub mod block_predicate; +pub mod blue_ice; +pub mod bonus_chest; +pub mod bulk_section; +pub mod carver; +pub mod carving; +pub mod cave; +pub mod chorus_plant; +pub mod climate; +pub mod decoration; +pub mod delta; +pub mod density; +pub mod disk; +pub mod dripstone; +pub mod end_gateway; +pub mod end_podium; +pub mod end_spike; +pub mod feature; +pub mod feature_catalog; +pub mod feature_graph; +pub mod feature_region; +pub mod feature_sort; +pub mod fluid_predicate; +pub mod fungus; +pub mod generator; +mod generator_blocks; +mod generator_decoration; +mod generator_structures; +pub mod height_provider; +pub mod iceberg; +pub mod material_condition; +pub mod material_extensions; +pub mod material_stage; +pub mod material_surface; +pub mod ore_feature; +pub mod placement; +pub mod projected; +pub mod replace_blobs; +pub mod root_system; +pub mod router; +pub mod rule_test; +pub mod sculk; +pub mod settings; +pub mod simple_block; +pub mod snow_freeze; +pub mod speleothem; +pub mod spike; +pub mod spring; +pub mod state_provider; +pub mod structure; +pub mod tags; +pub mod terrain; +pub mod tree; +pub(crate) mod tree_blocks; +pub mod underwater_magma; +pub mod value_provider; +pub mod vegetation; +pub mod vines; +pub mod weighted; +pub mod write_zone; +use horizon_core::noise::{NoiseBuildError, NormalNoise, Normalization}; +use serde_json::value::RawValue; +use std::collections::BTreeMap; + +#[derive(Debug)] +pub enum DecodeError { + Json(serde_json::Error), + Field(&'static str), + Noise(NoiseBuildError), + Graph(horizon_core::density::graph::CompileError), + Sample(horizon_core::density::SampleError), + Registry(String), +} +impl std::fmt::Display for DecodeError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Json(error) => error.fmt(f), + Self::Field(field) => write!(f, "invalid world generation field: {field}"), + Self::Noise(error) => error.fmt(f), + Self::Graph(error) => error.fmt(f), + Self::Sample(error) => error.fmt(f), + Self::Registry(error) => f.write_str(error), + } + } +} +impl std::error::Error for DecodeError {} +impl From<serde_json::Error> for DecodeError { + fn from(value: serde_json::Error) -> Self { + Self::Json(value) + } +} +impl From<NoiseBuildError> for DecodeError { + fn from(value: NoiseBuildError) -> Self { + Self::Noise(value) + } +} + +impl From<horizon_core::density::graph::CompileError> for DecodeError { + fn from(value: horizon_core::density::graph::CompileError) -> Self { + Self::Graph(value) + } +} + +impl From<horizon_core::density::SampleError> for DecodeError { + fn from(value: horizon_core::density::SampleError) -> Self { + Self::Sample(value) + } +} + +type Object = BTreeMap<String, Box<RawValue>>; +fn optional<'a>(object: &'a Object, name: &str) -> Option<&'a RawValue> { + object + .get(name) + .map(AsRef::as_ref) + .filter(|raw| raw.get() != "null") +} +fn required<'a>(object: &'a Object, name: &'static str) -> Result<&'a RawValue, DecodeError> { + optional(object, name).ok_or(DecodeError::Field(name)) +} +fn number_text(raw: &RawValue) -> Result<&str, DecodeError> { + let text = raw.get(); + if text.starts_with('-') || text.starts_with(|c: char| c.is_ascii_digit()) { + Ok(text) + } else { + Err(DecodeError::Field("number")) + } +} +fn double(raw: &RawValue) -> Result<f64, DecodeError> { + number_text(raw)? + .parse() + .map_err(|_| DecodeError::Field("number")) +} + +// Gson's lazily parsed numbers use BigDecimal.intValue for decimal/exponent +// forms: truncate toward zero, then retain the low 32 bits. Converting through +// f64 would both round large integers and saturate rather than wrap. +fn integer(raw: &RawValue) -> Result<i32, DecodeError> { + let text = number_text(raw)?; + let negative = text.starts_with('-'); + let text = text.strip_prefix('-').unwrap_or(text); + let (mantissa, exponent) = match text.split_once(['e', 'E']) { + Some((mantissa, exponent)) => ( + mantissa, + exponent + .parse::<i32>() + .map_err(|_| DecodeError::Field("integer exponent"))? as i64, + ), + None => (text, 0), + }; + let (whole, fraction) = mantissa.split_once('.').unwrap_or((mantissa, "")); + let digits = whole.bytes().chain(fraction.bytes()); + let length = whole.len() as i64 + exponent; + if length <= 0 { + return Ok(0); + } + let available = whole.len() as i64 + fraction.len() as i64; + let zeroes = (length - available).max(0); + if zeroes >= 32 { + return Ok(0); + } + let mut result = 0u32; + for digit in digits.take(length as usize) { + result = result + .wrapping_mul(10) + .wrapping_add(u32::from(digit - b'0')); + } + for _ in 0..zeroes { + result = result.wrapping_mul(10); + } + Ok(if negative { + result.wrapping_neg() + } else { + result + } as i32) +} +fn int_range(raw: &RawValue, name: &'static str, low: i32, high: i32) -> Result<i32, DecodeError> { + let value = integer(raw)?; + if (low..=high).contains(&value) { + Ok(value) + } else { + Err(DecodeError::Field(name)) + } +} +fn double_range( + raw: &RawValue, + name: &'static str, + low: f64, + high: f64, +) -> Result<f64, DecodeError> { + let value = double(raw)?; + if value.total_cmp(&low).is_ge() && value.total_cmp(&high).is_le() { + Ok(value) + } else { + Err(DecodeError::Field(name)) + } +} + +/// Decode Java Edition 26.3's direct normal-noise parameters from strict JSON. +/// Numeric tokens retain their decimal text; all rounding occurs at the target +/// numeric width. Unknown object fields are ignored, as in vanilla's codec. +pub fn decode_noise(json: &str) -> Result<NormalNoise, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let base = int_range(required(&object, "base_octave")?, "base_octave", -32, 32)?; + let count = optional(&object, "octave_count") + .map(|raw| int_range(raw, "octave_count", 1, 32)) + .transpose()? + .unwrap_or(1); + let amplitude = optional(&object, "base_amplitude") + .map(|raw| double_range(raw, "base_amplitude", 1e-5f32 as f64, 1e6)) + .transpose()? + .unwrap_or(1.0); + let normalize = match optional(&object, "normalize") { + None => Normalization::Enabled, + Some(raw) => match raw.get() { + "true" => Normalization::Enabled, + "false" => Normalization::Disabled, + text if text.starts_with('"') && serde_json::from_str::<String>(text)? == "legacy" => { + Normalization::Legacy + } + _ => return Err(DecodeError::Field("normalize")), + }, + }; + let modifiers: Vec<Box<RawValue>> = optional(&object, "amplitude_modifiers") + .map(|raw| serde_json::from_str(raw.get())) + .transpose()? + .unwrap_or_default(); + if modifiers.len() > 32 || (!modifiers.is_empty() && modifiers.len() != count as usize) { + return Err(DecodeError::Field("amplitude_modifiers")); + } + let mut builder = NormalNoise::builder(); + builder + .set_base_octave(base) + .set_base_amplitude(amplitude) + .set_normalization(normalize); + builder.set_octave_count(count)?; + for (index, modifier) in modifiers.iter().enumerate() { + builder.set_amplitude_modifier( + index as i32, + double_range(modifier, "amplitude_modifiers", 0.0, 1e6)?, + )?; + } + Ok(builder.build()?) +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn decimal_integers_wrap_without_floating_point_conversion() { + for (text, expected) in [ + ("4294967295", -1), + ("4294967296.5", 0), + ("-4294967297.9", -1), + ("1.9999999999999999999", 1), + ("12e1", 120), + ("123e-1", 12), + ("-123e-3", 0), + ("123e99", 0), + ] { + let raw: Box<RawValue> = serde_json::from_str(text).unwrap(); + assert_eq!(integer(&raw).unwrap(), expected, "{text}"); + } + } + #[test] + fn codec_defaults_and_empty_modifiers_match_explicit_parameters() { + let a = decode_noise(r#"{"base_octave":-7}"#).unwrap(); + let b = decode_noise(r#"{"base_octave":-7,"base_amplitude":1,"octave_count":1,"normalize":true,"amplitude_modifiers":[],"unknown":42}"#).unwrap(); + assert_eq!(a.range(), b.range()); + assert_eq!(a.normalization_factor(), b.normalization_factor()); + assert_eq!(a.octaves().len(), b.octaves().len()); + assert!(decode_noise(r#"{"base_octave":-7,"octave_count":0}"#).is_err()); + assert!(decode_noise(r#"{"base_octave":-7,"normalize":0}"#).is_err()); + assert!(decode_noise(r#"{"base_octave":-7,"amplitude_modifiers":[-0]}"#).is_err()); + assert!(decode_noise(r#"{"base_octave":-7,"amplitude_modifiers":[-0.0]}"#).is_err()); + assert!( + decode_noise(r#"{"base_octave":-7,"octave_count":2,"amplitude_modifiers":[1]}"#) + .is_err() + ); + } +} diff --git a/crates/horizon-world/src/worldgen/anchor.rs b/crates/horizon-world/src/worldgen/anchor.rs new file mode 100644 index 000000000..741a57dd0 --- /dev/null +++ b/crates/horizon-world/src/worldgen/anchor.rs @@ -0,0 +1,102 @@ +//! Vertical anchors and their generation bounds in Java Edition 26.3. +use super::{DecodeError, Object, int_range, required}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct WorldGenerationContext { + pub min_y: i32, + pub height: i32, + pub sea_level: i32, +} +impl WorldGenerationContext { + pub const fn new(min_y: i32, height: i32, sea_level: i32) -> Self { + Self { + min_y, + height, + sea_level, + } + } + + /// Vanilla combines the two minima and heights independently. This is + /// deliberately different from intersecting the two vertical intervals. + pub fn with_generator( + level_min: i32, + level_height: i32, + generator_min: i32, + generator_height: i32, + generator_sea_level: i32, + ) -> Self { + Self::new( + level_min.max(generator_min), + level_height.min(generator_height), + generator_sea_level, + ) + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum VerticalAnchor { + Absolute(i32), + AboveBottom(i32), + BelowTop(i32), + RelativeToSeaLevel(i32), +} +impl VerticalAnchor { + pub const BOTTOM: Self = Self::AboveBottom(0); + pub const TOP: Self = Self::BelowTop(0); + pub const SEA_LEVEL: Self = Self::RelativeToSeaLevel(0); + + /// Runtime anchors accept every signed integer, with Java wrapping. + pub fn resolve(self, context: WorldGenerationContext) -> i32 { + match self { + Self::Absolute(y) => y, + Self::AboveBottom(offset) => context.min_y.wrapping_add(offset), + Self::BelowTop(offset) => context + .height + .wrapping_sub(1) + .wrapping_add(context.min_y) + .wrapping_sub(offset), + Self::RelativeToSeaLevel(offset) => context.sea_level.wrapping_add(offset), + } + } + + pub fn from_json(json: &str) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let field = |name| { + required(&object, name) + .and_then(|raw| int_range(raw, name, -2032, 2031)) + .ok() + }; + // The codec nests exclusive alternatives. An ambiguous inner choice + // fails that branch, allowing a valid outer branch to succeed. + let exclusive = |left, right| match (left, right) { + (Some(value), None) | (None, Some(value)) => Some(value), + _ => None, + }; + exclusive( + field("absolute").map(Self::Absolute), + exclusive( + field("above_bottom").map(Self::AboveBottom), + exclusive( + field("below_top").map(Self::BelowTop), + field("relative_to_sea_level").map(Self::RelativeToSeaLevel), + ), + ), + ) + .ok_or(DecodeError::Field("vertical anchor")) + } + + /// Encode through the same field bounds as the vanilla codec. Constructed + /// runtime anchors can resolve successfully while failing this validation. + pub fn to_json(self) -> Result<String, DecodeError> { + let (name, value) = match self { + Self::Absolute(y) => ("absolute", y), + Self::AboveBottom(offset) => ("above_bottom", offset), + Self::BelowTop(offset) => ("below_top", offset), + Self::RelativeToSeaLevel(offset) => ("relative_to_sea_level", offset), + }; + if !(-2032..=2031).contains(&value) { + return Err(DecodeError::Field("vertical anchor")); + } + Ok(format!("{{\"{name}\":{value}}}")) + } +} diff --git a/crates/horizon-world/src/worldgen/aquifer.rs b/crates/horizon-world/src/worldgen/aquifer.rs new file mode 100644 index 000000000..2b4f6e7c3 --- /dev/null +++ b/crates/horizon-world/src/worldgen/aquifer.rs @@ -0,0 +1,100 @@ +//! Global fluid selection and the 26.3 aquifer terrain paths. +mod config; +mod noise_based; +use crate::registry::BlockStateId; +pub use config::{AquiferConfig, AquiferField, AquiferSamplers}; +pub use noise_based::{ + AquiferBlockStates, AquiferError, NoiseBasedAquifer, RegistryAquiferBlockStates, +}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct FluidStatus { + pub level: i32, + pub state: BlockStateId, +} +impl FluidStatus { + pub const fn at(self, y: i32, air: BlockStateId) -> BlockStateId { + if y < self.level { self.state } else { air } + } +} +pub trait FluidPicker: std::fmt::Debug + Send + Sync { + fn compute(&self, position: [i32; 3]) -> FluidStatus; +} +impl<P: FluidPicker + ?Sized> FluidPicker for &P { + fn compute(&self, position: [i32; 3]) -> FluidStatus { + P::compute(self, position) + } +} +/// State IDs must come from one immutable block registry. Default fluid can be +/// any registered block state; vanilla does not validate its material here. +#[derive(Clone, Copy, Debug)] +pub struct GlobalFluidPicker { + sea_level: i32, + default_fluid: BlockStateId, + lava: BlockStateId, + air: BlockStateId, + disabled: bool, +} +impl GlobalFluidPicker { + pub const fn new( + sea_level: i32, + default_fluid: BlockStateId, + lava: BlockStateId, + air: BlockStateId, + ) -> Self { + Self { + sea_level, + default_fluid, + lava, + air, + disabled: false, + } + } + /// Matches the vanilla developer flag. Regular gameplay keeps this false. + pub const fn with_disabled(mut self, disabled: bool) -> Self { + self.disabled = disabled; + self + } +} +impl FluidPicker for GlobalFluidPicker { + fn compute(&self, [_, y, _]: [i32; 3]) -> FluidStatus { + if self.disabled { + FluidStatus { + level: -4064, + state: self.air, + } + } else if y < (-54).min(self.sea_level) { + FluidStatus { + level: -54, + state: self.lava, + } + } else { + FluidStatus { + level: self.sea_level, + state: self.default_fluid, + } + } + } +} +#[derive(Debug)] +pub struct DisabledAquifer<P> { + picker: P, + air: BlockStateId, +} +impl<P: FluidPicker> DisabledAquifer<P> { + pub const fn new(picker: P, air: BlockStateId) -> Self { + Self { picker, air } + } + /// None selects the generator's default solid block. Java DCMPL treats NaN + /// as -1, so NaN and density <= zero call the picker; density > zero does not. + pub fn compute_substance(&self, position: [i32; 3], density: f64) -> Option<BlockStateId> { + if density > 0. { + None + } else { + Some(self.picker.compute(position).at(position[1], self.air)) + } + } + pub const fn should_schedule_fluid_update(&self) -> bool { + false + } +} diff --git a/crates/horizon-world/src/worldgen/aquifer/config.rs b/crates/horizon-world/src/worldgen/aquifer/config.rs new file mode 100644 index 000000000..984fe59e8 --- /dev/null +++ b/crates/horizon-world/src/worldgen/aquifer/config.rs @@ -0,0 +1,127 @@ +//! The six density roots in the 26.3 aquifer configuration. +use super::super::{DecodeError, Object, density::DensityRegistry, required}; +use horizon_core::density::{ + DensitySampler, + graph::{CompileError, DensityCompiler, FunctionId}, +}; +use std::sync::Arc; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(usize)] +pub enum AquiferField { + Barrier, + Floodedness, + Spread, + Lava, + Exclusion, + SurfaceLevel, +} +impl AquiferField { + pub const ALL: [Self; 6] = [ + Self::Barrier, + Self::Floodedness, + Self::Spread, + Self::Lava, + Self::Exclusion, + Self::SurfaceLevel, + ]; + pub const fn name(self) -> &'static str { + match self { + Self::Barrier => "barrier", + Self::Floodedness => "fluid_level_floodedness", + Self::Spread => "fluid_level_spread", + Self::Lava => "lava", + Self::Exclusion => "exclusion", + Self::SurfaceLevel => "surface_level", + } + } +} +#[derive(Clone, Copy, Debug)] +pub struct AquiferConfig { + functions: [FunctionId; 6], +} +impl AquiferConfig { + /// Decode all roots atomically into the caller's registry graph. + pub fn from_json(json: &str, registry: &mut DensityRegistry) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let inputs = AquiferField::ALL + .iter() + .map(|f| required(&object, f.name()).map(|v| v.get())) + .collect::<Result<Vec<_>, _>>()?; + let functions = registry + .decode_functions(&inputs)? + .try_into() + .map_err(|_| DecodeError::Field("aquifer field count"))?; + Ok(Self { functions }) + } + pub fn function(self, field: AquiferField) -> FunctionId { + self.functions[field as usize] + } + /// Preserve vanilla's binding order and the shared compiler cache namespace. + pub fn compile(self, compiler: &mut DensityCompiler) -> Result<AquiferSamplers, CompileError> { + let samplers = self + .functions + .iter() + .map(|id| compiler.get_sampler(*id)) + .collect::<Result<Vec<_>, _>>()? + .try_into() + .expect("six aquifer roots"); + Ok(AquiferSamplers { samplers }) + } +} +#[derive(Debug)] +pub struct AquiferSamplers { + samplers: [Arc<dyn DensitySampler>; 6], +} +impl AquiferSamplers { + /// Bind already compiled roots in AquiferField::ALL order. + pub fn new(samplers: [Arc<dyn DensitySampler>; 6]) -> Self { + Self { samplers } + } + pub fn get(&self, field: AquiferField) -> &Arc<dyn DensitySampler> { + &self.samplers[field as usize] + } +} + +#[cfg(test)] +mod tests { + use super::*; + use horizon_core::density::{SamplerContext, graph::GraphNode}; + use std::collections::BTreeMap; + #[test] + fn bindings_share_named_cache_and_failed_decode_is_atomic() { + let mut registry = DensityRegistry::from_json(&BTreeMap::new(), &BTreeMap::from([("minecraft:shared".into(), r#"{"type":"cache","input":{"type":"gradient","axis":"x","from_coordinate":0,"to_coordinate":16,"from_value":0,"to_value":1}}"#.into())])).unwrap(); + let roots: BTreeMap<_, _> = AquiferField::ALL + .iter() + .map(|f| (f.name(), "minecraft:shared")) + .collect(); + let json = serde_json::to_string(&roots).unwrap(); + let expected = registry + .graph() + .clone() + .insert(GraphNode::Constant(123.)) + .unwrap(); + let invalid = json + .replace("\"barrier\":\"minecraft:shared\"", "\"barrier\":123") + .replace( + "\"surface_level\":\"minecraft:shared\"", + "\"surface_level\":{}", + ); + assert!(AquiferConfig::from_json(&invalid, &mut registry).is_err()); + assert_eq!(registry.decode_functions(&["123"]).unwrap()[0], expected); + let config = AquiferConfig::from_json(&json, &mut registry).unwrap(); + let mut compiler = DensityCompiler::new_seeded(registry.into_graph(), 0, false); + let samplers = config.compile(&mut compiler).unwrap(); + assert_eq!(compiler.cache_count(), 1); + let mut context = SamplerContext::cached(); + for field in AquiferField::ALL { + assert_eq!( + samplers + .get(field) + .sample_value(&mut context, [4, -54, 0]) + .unwrap(), + 0.25 + ); + } + } +} diff --git a/crates/horizon-world/src/worldgen/aquifer/noise_based.rs b/crates/horizon-world/src/worldgen/aquifer/noise_based.rs new file mode 100644 index 000000000..30181686b --- /dev/null +++ b/crates/horizon-world/src/worldgen/aquifer/noise_based.rs @@ -0,0 +1,578 @@ +//! Stateful 26.3 underground fluid and pressure selection. +use super::{AquiferField, AquiferSamplers, FluidPicker, FluidStatus}; +use crate::registry::{BlockRegistry, BlockStateId}; +use horizon_core::{ + density::{SampleError, SamplerContext}, + noise::{DensityError, DensityVolume}, + position::{BlockPos, ChunkPos}, + random::{PositionalRandom, RandomSource}, +}; +use std::collections::HashMap; + +const WAY_BELOW_MIN_Y: i32 = -32512; +const FLOWING_UPDATE_SIMILARITY: f64 = 1.0 - 44.0 / 25.0; +const SURFACE_OFFSETS: [[i32; 2]; 13] = [ + [0, 0], + [-2, -1], + [-1, -1], + [0, -1], + [1, -1], + [-3, 0], + [-2, 0], + [-1, 0], + [1, 0], + [-2, 1], + [-1, 1], + [0, 1], + [1, 1], +]; + +/// All IDs and block classifications must refer to the same immutable registry. +/// Lava/water tests classify the block, whereas default-lava equality tests the +/// exact state. Air tests include cave air and void air. +pub trait AquiferBlockStates { + fn air(&self) -> BlockStateId; + fn lava(&self) -> BlockStateId; + fn is_air(&self, state: BlockStateId) -> bool; + fn is_lava(&self, state: BlockStateId) -> bool; + fn is_water(&self, state: BlockStateId) -> bool; +} +pub struct RegistryAquiferBlockStates<'a> { + registry: &'a BlockRegistry, + air: BlockStateId, + lava: BlockStateId, +} +impl<'a> RegistryAquiferBlockStates<'a> { + pub fn new(registry: &'a BlockRegistry) -> Result<Self, AquiferError> { + Ok(Self { + registry, + air: registry + .default_state("minecraft:air") + .ok_or(AquiferError::MissingBlock)?, + lava: registry + .default_state("minecraft:lava") + .ok_or(AquiferError::MissingBlock)?, + }) + } + fn name(&self, state: BlockStateId) -> Option<&str> { + self.registry.state(state).map(|s| s.name.as_str()) + } +} +impl AquiferBlockStates for RegistryAquiferBlockStates<'_> { + fn air(&self) -> BlockStateId { + self.air + } + fn lava(&self) -> BlockStateId { + self.lava + } + fn is_air(&self, state: BlockStateId) -> bool { + matches!( + self.name(state), + Some("minecraft:air" | "minecraft:cave_air" | "minecraft:void_air") + ) + } + fn is_lava(&self, state: BlockStateId) -> bool { + self.name(state) == Some("minecraft:lava") + } + fn is_water(&self, state: BlockStateId) -> bool { + self.name(state) == Some("minecraft:water") + } +} +#[derive(Debug)] +pub enum AquiferError { + Sample(SampleError), + InvalidGrid, + OutsideGrid, + Allocation, + MissingBlock, +} +impl From<SampleError> for AquiferError { + fn from(value: SampleError) -> Self { + Self::Sample(value) + } +} +impl From<DensityError> for AquiferError { + fn from(value: DensityError) -> Self { + Self::Sample(value.into()) + } +} +impl std::fmt::Display for AquiferError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Sample(e) => e.fmt(f), + Self::InvalidGrid => f.write_str("aquifer grid is invalid or exceeds 16777216 cells"), + Self::OutsideGrid => f.write_str("aquifer query lies outside its grid"), + Self::Allocation => f.write_str("aquifer allocation failed"), + Self::MissingBlock => f.write_str("aquifer registry lacks default air or lava"), + } + } +} +impl std::error::Error for AquiferError {} + +pub struct NoiseBasedAquifer<P, F, B> { + samplers: AquiferSamplers, + picker: P, + random: F, + blocks: B, + minimum: [i32; 3], + size_x: i32, + size_z: i32, + statuses: Vec<Option<FluidStatus>>, + locations: Vec<i64>, + surfaces: HashMap<i64, i32>, + skip_above_y: i32, + schedule: bool, +} +impl<P: FluidPicker, F: PositionalRandom, B: AquiferBlockStates> NoiseBasedAquifer<P, F, B> { + /// The positional factory is the caller's aquifer factory, not the world's + /// unmodified factory. Every sampler uses the caller's shared context. + pub fn new( + samplers: AquiferSamplers, + picker: P, + random: F, + blocks: B, + volume: DensityVolume, + context: &mut SamplerContext, + ) -> Result<Self, AquiferError> { + let low = volume.minimum(); + let high = volume.maximum(); + let minimum = [ + low[0].wrapping_sub(5) >> 4, + low[1].wrapping_add(1).div_euclid(12).wrapping_sub(1), + low[2].wrapping_sub(5) >> 4, + ]; + let maximum = [ + (high[0].wrapping_sub(5) >> 4).wrapping_add(1), + high[1].wrapping_add(1).div_euclid(12).wrapping_add(1), + (high[2].wrapping_sub(5) >> 4).wrapping_add(1), + ]; + let sizes: [i32; 3] = + std::array::from_fn(|i| maximum[i].wrapping_sub(minimum[i]).wrapping_add(1)); + let count = sizes + .into_iter() + .try_fold(1usize, |n, s| { + if s > 0 { + n.checked_mul(s as usize) + } else { + None + } + }) + .filter(|n| *n <= 16_777_216) + .ok_or(AquiferError::InvalidGrid)?; + let mut statuses = Vec::new(); + statuses + .try_reserve_exact(count) + .map_err(|_| AquiferError::Allocation)?; + statuses.resize(count, None); + let mut locations = Vec::new(); + locations + .try_reserve_exact(count) + .map_err(|_| AquiferError::Allocation)?; + locations.resize(count, i64::MAX); + let mut result = Self { + samplers, + picker, + random, + blocks, + minimum, + size_x: sizes[0], + size_z: sizes[2], + statuses, + locations, + surfaces: HashMap::new(), + skip_above_y: 0, + schedule: false, + }; + let max_surface = result + .max_surface_level( + context, + [minimum[0].wrapping_shl(4), minimum[2].wrapping_shl(4)], + [ + maximum[0].wrapping_shl(4).wrapping_add(9), + maximum[2].wrapping_shl(4).wrapping_add(9), + ], + )? + .wrapping_add(8); + let skip_grid = max_surface.wrapping_add(12).div_euclid(12).wrapping_add(1); + result.skip_above_y = skip_grid.wrapping_mul(12).wrapping_add(11).wrapping_sub(1); + Ok(result) + } + /// Read-only diagnostic state; enumeration never populates a cache. + pub fn cached_cells(&self) -> impl Iterator<Item = (i64, Option<FluidStatus>)> + '_ { + self.locations + .iter() + .copied() + .zip(self.statuses.iter().copied()) + } + pub fn cached_surfaces(&self) -> impl Iterator<Item = (i64, i32)> + '_ { + self.surfaces.iter().map(|(key, value)| (*key, *value)) + } + pub fn should_schedule_fluid_update(&self) -> bool { + self.schedule + } + pub fn skip_sampling_above_y(&self) -> i32 { + self.skip_above_y + } + fn sample( + &self, + field: AquiferField, + context: &mut SamplerContext, + position: [i32; 3], + ) -> Result<f64, AquiferError> { + Ok(self.samplers.get(field).sample_value(context, position)? as f64) + } + fn surface_level( + &mut self, + context: &mut SamplerContext, + x: i32, + z: i32, + ) -> Result<i32, AquiferError> { + let x = (x >> 2).wrapping_shl(2); + let z = (z >> 2).wrapping_shl(2); + let key = ChunkPos::new(x, z).pack(); + if let Some(level) = self.surfaces.get(&key) { + return Ok(*level); + } + let level = self + .sample(AquiferField::SurfaceLevel, context, [x, 0, z])? + .floor() as i32; + self.surfaces.insert(key, level); + Ok(level) + } + fn max_surface_level( + &mut self, + context: &mut SamplerContext, + minimum: [i32; 2], + maximum: [i32; 2], + ) -> Result<i32, AquiferError> { + let low = minimum.map(|v| v >> 2); + let high = maximum.map(|v| v >> 2); + let sizes: [i32; 2] = std::array::from_fn(|i| high[i].wrapping_sub(low[i]).wrapping_add(1)); + let volume = DensityVolume::new( + [sizes[0], 1, sizes[1]], + [low[0].wrapping_shl(2), 0, low[1].wrapping_shl(2)], + [4, 1, 4], + )?; + if volume.size() > 2_097_152 { + return Err(AquiferError::InvalidGrid); + } + let mut buffer = Vec::new(); + buffer + .try_reserve_exact(volume.size()) + .map_err(|_| AquiferError::Allocation)?; + buffer.resize(volume.size(), 0.); + self.samplers + .get(AquiferField::SurfaceLevel) + .sample_volume(context, &mut buffer, volume)?; + self.surfaces + .try_reserve(volume.size()) + .map_err(|_| AquiferError::Allocation)?; + let mut maximum = i32::MIN; + let mut index = 0; + for z in 0..sizes[1] { + for x in 0..sizes[0] { + let value = (buffer[index] as f64).floor() as i32; + index += 1; + self.surfaces.insert( + ChunkPos::new( + low[0].wrapping_add(x).wrapping_shl(2), + low[1].wrapping_add(z).wrapping_shl(2), + ) + .pack(), + value, + ); + maximum = maximum.max(value); + } + } + Ok(maximum) + } + fn grid_index(&self, position: [i32; 3]) -> Result<usize, AquiferError> { + let relative: [i32; 3] = std::array::from_fn(|i| position[i].wrapping_sub(self.minimum[i])); + // Vanilla checks the final array index, rather than each coordinate. + let index = relative[1] + .wrapping_mul(self.size_z) + .wrapping_add(relative[2]) + .wrapping_mul(self.size_x) + .wrapping_add(relative[0]); + if index < 0 || index as usize >= self.locations.len() { + return Err(AquiferError::OutsideGrid); + } + Ok(index as usize) + } + fn status( + &mut self, + context: &mut SamplerContext, + index: usize, + ) -> Result<FluidStatus, AquiferError> { + if let Some(status) = self.statuses[index] { + return Ok(status); + } + let pos = BlockPos::unpack(self.locations[index]); + let status = self.compute_fluid(context, [pos.x, pos.y, pos.z])?; + self.statuses[index] = Some(status); + Ok(status) + } + fn compute_fluid( + &mut self, + context: &mut SamplerContext, + [x, y, z]: [i32; 3], + ) -> Result<FluidStatus, AquiferError> { + let global = self.picker.compute([x, y, z]); + let upper = y.wrapping_add(12); + let lower = y.wrapping_sub(12); + let mut minimum = i32::MAX; + let mut center_fluid = false; + for [dx, dz] in SURFACE_OFFSETS { + let sx = x.wrapping_add(dx.wrapping_mul(16)); + let sz = z.wrapping_add(dz.wrapping_mul(16)); + let surface = self.surface_level(context, sx, sz)?; + let adjusted = surface.wrapping_add(8); + let center = dx == 0 && dz == 0; + if center && lower > adjusted { + return Ok(global); + } + let above = upper > adjusted; + if above || center { + let status = self.picker.compute([sx, adjusted, sz]); + if !self.blocks.is_air(status.at(adjusted, self.blocks.air())) { + if center { + center_fluid = true; + } + if above { + return Ok(status); + } + } + } + minimum = minimum.min(surface); + } + let level = + self.compute_surface_level(context, [x, y, z], global, minimum, center_fluid)?; + let mut state = global.state; + if level <= -10 + && level != WAY_BELOW_MIN_Y + && state != self.blocks.lava() + && self + .sample( + AquiferField::Lava, + context, + [x.div_euclid(64), y.div_euclid(40), z.div_euclid(64)], + )? + .abs() + > 0.3 + { + state = self.blocks.lava(); + } + Ok(FluidStatus { level, state }) + } + fn compute_surface_level( + &self, + context: &mut SamplerContext, + position: [i32; 3], + global: FluidStatus, + minimum: i32, + center_fluid: bool, + ) -> Result<i32, AquiferError> { + let [x, y, z] = position; + let (dry, flooded) = if self.sample(AquiferField::Exclusion, context, position)? > 0. { + (-1., -1.) + } else { + let distance = minimum.wrapping_add(8).wrapping_sub(y); + let factor = if center_fluid { + let alpha = (distance as f64 - 0.) / (64. - 0.); + if alpha < 0. { + 1. + } else if alpha > 1. { + 0. + } else { + 1. + alpha * (0. - 1.) + } + } else { + 0. + }; + let value = self + .sample(AquiferField::Floodedness, context, position)? + .clamp(-1., 1.); + let alpha = (factor - 1.) / (0. - 1.); + let threshold_flooded = -0.3 + alpha * (0.8 - -0.3); + let threshold_dry = -0.8 + alpha * (0.4 - -0.8); + (value - threshold_dry, value - threshold_flooded) + }; + if flooded > 0. { + return Ok(global.level); + } + if dry > 0. { + let spread = self.samplers.get(AquiferField::Spread).sample_value( + context, + [x.div_euclid(16), y.div_euclid(40), z.div_euclid(16)], + )? * 10.; + let offset = ((spread as f64 / 3.).floor() as i32).wrapping_mul(3); + return Ok(minimum.min( + y.div_euclid(40) + .wrapping_mul(40) + .wrapping_add(20) + .wrapping_add(offset), + )); + } + Ok(WAY_BELOW_MIN_Y) + } + fn pressure( + &self, + context: &mut SamplerContext, + position: [i32; 3], + memo: &mut f64, + a: FluidStatus, + b: FluidStatus, + ) -> Result<f64, AquiferError> { + let y = position[1]; + let sa = a.at(y, self.blocks.air()); + let sb = b.at(y, self.blocks.air()); + if (self.blocks.is_lava(sa) && self.blocks.is_water(sb)) + || (self.blocks.is_water(sa) && self.blocks.is_lava(sb)) + { + return Ok(2.); + } + let gap = a.level.wrapping_sub(b.level).wrapping_abs(); + if gap == 0 { + return Ok(0.); + } + let midpoint = 0.5 * a.level.wrapping_add(b.level) as f64; + let dy = y as f64 + 0.5 - midpoint; + let edge = gap as f64 / 2. - dy.abs(); + let q = if dy > 0. { + let n = 0. + edge; + if n > 0. { n / 1.5 } else { n / 2.5 } + } else { + let n = 3. + edge; + if n > 0. { n / 3. } else { n / 10. } + }; + let barrier = if q < -2. || q > 2. { + 0. + } else { + if memo.is_nan() { + *memo = self.sample(AquiferField::Barrier, context, position)?; + } + *memo + }; + Ok(2. * (barrier + q)) + } + pub fn compute_substance( + &mut self, + context: &mut SamplerContext, + [x, y, z]: [i32; 3], + density: f64, + ) -> Result<Option<BlockStateId>, AquiferError> { + if density > 0. { + self.schedule = false; + return Ok(None); + } + let global = self.picker.compute([x, y, z]); + if y > self.skip_above_y { + self.schedule = false; + return Ok(Some(global.at(y, self.blocks.air()))); + } + if self.blocks.is_lava(global.at(y, self.blocks.air())) { + self.schedule = false; + return Ok(Some(self.blocks.lava())); + } + let grid = [ + x.wrapping_sub(5) >> 4, + y.wrapping_add(1).div_euclid(12), + z.wrapping_sub(5) >> 4, + ]; + let mut distances = [i32::MAX; 4]; + let mut indices = [0usize; 4]; + for dx in 0..=1i32 { + for dy in -1..=1i32 { + for dz in 0..=1i32 { + let cell = [ + grid[0].wrapping_add(dx), + grid[1].wrapping_add(dy), + grid[2].wrapping_add(dz), + ]; + let index = self.grid_index(cell)?; + if self.locations[index] == i64::MAX { + let mut random = self.random.at(BlockPos::new(cell[0], cell[1], cell[2])); + let px = cell[0] + .wrapping_shl(4) + .wrapping_add(random.next_int_bound(10).expect("positive bound")); + let py = cell[1] + .wrapping_mul(12) + .wrapping_add(random.next_int_bound(9).expect("positive bound")); + let pz = cell[2] + .wrapping_shl(4) + .wrapping_add(random.next_int_bound(10).expect("positive bound")); + self.locations[index] = BlockPos::new(px, py, pz).pack(); + } + let point = BlockPos::unpack(self.locations[index]); + let ax = point.x.wrapping_sub(x); + let ay = point.y.wrapping_sub(y); + let az = point.z.wrapping_sub(z); + let distance = ax + .wrapping_mul(ax) + .wrapping_add(ay.wrapping_mul(ay)) + .wrapping_add(az.wrapping_mul(az)); + if let Some(slot) = distances.iter().position(|old| distance <= *old) { + for i in (slot + 1..4).rev() { + distances[i] = distances[i - 1]; + indices[i] = indices[i - 1]; + } + distances[slot] = distance; + indices[slot] = index; + } + } + } + } + let a = self.status(context, indices[0])?; + let s01 = similarity(distances[0], distances[1]); + let candidate = a.at(y, self.blocks.air()); + if s01 <= 0. { + self.schedule = if s01 >= FLOWING_UPDATE_SIMILARITY { + a != self.status(context, indices[1])? + } else { + false + }; + return Ok(Some(candidate)); + } + if self.blocks.is_water(candidate) + && self.blocks.is_lava( + self.picker + .compute([x, y.wrapping_sub(1), z]) + .at(y.wrapping_sub(1), self.blocks.air()), + ) + { + self.schedule = true; + return Ok(Some(candidate)); + } + let mut memo = f64::NAN; + let b = self.status(context, indices[1])?; + if density + s01 * self.pressure(context, [x, y, z], &mut memo, a, b)? > 0. { + self.schedule = false; + return Ok(None); + } + let c = self.status(context, indices[2])?; + let s02 = similarity(distances[0], distances[2]); + if s02 > 0. + && density + s01 * s02 * self.pressure(context, [x, y, z], &mut memo, a, c)? > 0. + { + self.schedule = false; + return Ok(None); + } + let s12 = similarity(distances[1], distances[2]); + if s12 > 0. + && density + s01 * s12 * self.pressure(context, [x, y, z], &mut memo, b, c)? > 0. + { + self.schedule = false; + return Ok(None); + } + self.schedule = a != b + || (s12 >= FLOWING_UPDATE_SIMILARITY && b != c) + || (s02 >= FLOWING_UPDATE_SIMILARITY && a != c) + || (s02 >= FLOWING_UPDATE_SIMILARITY + && similarity(distances[0], distances[3]) >= FLOWING_UPDATE_SIMILARITY + && a != self.status(context, indices[3])?); + Ok(Some(candidate)) + } +} +fn similarity(a: i32, b: i32) -> f64 { + 1. - b.wrapping_sub(a) as f64 / 25. +} diff --git a/crates/horizon-world/src/worldgen/bamboo.rs b/crates/horizon-world/src/worldgen/bamboo.rs new file mode 100644 index 000000000..ca63d9d85 --- /dev/null +++ b/crates/horizon-world/src/worldgen/bamboo.rs @@ -0,0 +1,156 @@ +//! Bamboo stalks, podzol patches and ordered cap overwrites. +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + feature::FeatureWorld, + number_text, + placement::{PlacementContext, PlacementQueryError}, + required, +}; +use crate::{heightmap::HeightmapType, registry::BlockStateId}; +use horizon_core::random::{InvalidBound, RandomSource}; +use std::{collections::BTreeSet, sync::Arc}; +#[derive(Clone, Debug)] +pub struct BambooFeature { + probability: f32, + air: [BlockStateId; 3], + bamboo: BlockStateId, + trunk: BlockStateId, + caps: [BlockStateId; 3], + podzol: BlockStateId, + replaceable: Arc<BTreeSet<BlockStateId>>, +} +#[derive(Debug)] +pub enum BambooError<E> { + World(E), + Query(PlacementQueryError), + Random(InvalidBound), + WorkLimit, +} +impl<E: std::fmt::Display> std::fmt::Display for BambooError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Query(e) => e.fmt(f), + Self::Random(e) => e.fmt(f), + Self::WorkLimit => f.write_str("bamboo work limit exceeded"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for BambooError<E> {} +impl BambooFeature { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let probability = number_text(required(&object, "probability")?)? + .parse::<f64>() + .map_err(|_| DecodeError::Field("bamboo probability"))? + as f32; + if !(0.0..=1.0).contains(&probability) || probability.is_sign_negative() { + return Err(DecodeError::Field("bamboo probability")); + } + let state = |leaves, stage| { + bindings.codec.decode(&format!(r#"{{"id":"bamboo","properties":{{"age":"1","leaves":"{leaves}","stage":"{stage}"}}}}"#),false).map_err(|e|DecodeError::Registry(e.to_string())) + }; + let get = |name| { + bindings + .registry() + .default_state(name) + .ok_or_else(|| DecodeError::Registry(format!("unknown bamboo block {name}"))) + }; + Ok(Self { + probability, + air: bindings.air, + bamboo: get("minecraft:bamboo")?, + trunk: state("none", 0)?, + caps: [state("large", 1)?, state("large", 0)?, state("small", 0)?], + podzol: get("minecraft:podzol")?, + replaceable: bindings + .tags + .get("minecraft:beneath_bamboo_podzol_replaceable") + .cloned() + .unwrap_or_default(), + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + ) -> Result<bool, BambooError<W::Error>> { + if !self + .air + .contains(&world.block(origin).map_err(BambooError::World)?) + { + return Ok(false); + } + // Native success records the air-origin attempt, even if survival fails. + if !world + .block_survives(self.bamboo, origin) + .map_err(BambooError::Query)? + { + return Ok(true); + } + let height = random.next_int_bound(12).map_err(BambooError::Random)? + 5; + if random.next_float() < self.probability { + let radius = random.next_int_bound(4).map_err(BambooError::Random)? + 1; + let mut x = origin[0].wrapping_sub(radius); + let max_x = origin[0].wrapping_add(radius); + let mut remaining = 1_048_576; + while x <= max_x { + let mut z = origin[2].wrapping_sub(radius); + let max_z = origin[2].wrapping_add(radius); + while z <= max_z { + if remaining == 0 { + return Err(BambooError::WorkLimit); + } + remaining -= 1; + let dx = x.wrapping_sub(origin[0]); + let dz = z.wrapping_sub(origin[2]); + if dx.wrapping_mul(dx).wrapping_add(dz.wrapping_mul(dz)) <= radius * radius { + let y = world + .height(HeightmapType::WorldSurface, x, z) + .map_err(BambooError::Query)? + .wrapping_sub(1); + let p = [x, y, z]; + if self + .replaceable + .contains(&world.block(p).map_err(BambooError::World)?) + { + world + .set_block(p, self.podzol, 2) + .map_err(BambooError::World)?; + } + } + z = z.wrapping_add(1); + } + // Also bound overflow loops when the inner range is empty. + if remaining == 0 { + return Err(BambooError::WorkLimit); + } + remaining -= 1; + x = x.wrapping_add(1); + } + } + let mut p = origin; + for _ in 0..height { + if !self + .air + .contains(&world.block(p).map_err(BambooError::World)?) + { + break; + } + world + .set_block(p, self.trunk, 2) + .map_err(BambooError::World)?; + p[1] = p[1].wrapping_add(1); + } + if p[1].wrapping_sub(origin[1]) >= 3 { + // The first cap occupies the stopping position, including an obstacle. + for state in self.caps { + world.set_block(p, state, 2).map_err(BambooError::World)?; + p[1] = p[1].wrapping_sub(1); + } + } + Ok(true) + } +} diff --git a/crates/horizon-world/src/worldgen/biome.rs b/crates/horizon-world/src/worldgen/biome.rs new file mode 100644 index 000000000..7847d679b --- /dev/null +++ b/crates/horizon-world/src/worldgen/biome.rs @@ -0,0 +1,153 @@ +//! Multi-noise biome resolution over an imported immutable parameter table. +//! Vanilla biome JSON codecs and built-in preset builders remain separate work. +use super::{ + DecodeError, + climate::{ + ClimateIndex, ClimateSampler, ClimateSearch, ClimateVolume, IndexError, Parameter, + ParameterPoint, + }, + density::identifier, +}; +use horizon_core::density::{SampleError, SamplerContext}; + +/// Identity within an immutable biome registry snapshot. +#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct BiomeId(pub u32); + +#[derive(Debug)] +pub enum BiomeError { + Decode(DecodeError), + Index(IndexError), + Sample(SampleError), + OutsideVolume, +} +impl std::fmt::Display for BiomeError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Decode(e) => e.fmt(f), + Self::Index(e) => e.fmt(f), + Self::Sample(e) => e.fmt(f), + Self::OutsideVolume => f.write_str("biome query is outside the prepared quart volume"), + } + } +} +impl std::error::Error for BiomeError {} +impl From<DecodeError> for BiomeError { + fn from(e: DecodeError) -> Self { + Self::Decode(e) + } +} +impl From<IndexError> for BiomeError { + fn from(e: IndexError) -> Self { + Self::Index(e) + } +} +impl From<SampleError> for BiomeError { + fn from(e: SampleError) -> Self { + Self::Sample(e) + } +} + +#[derive(Debug)] +pub struct MultiNoiseBiomeSource { + parameters: ClimateIndex<String>, +} +impl MultiNoiseBiomeSource { + pub fn new(entries: Vec<(ParameterPoint, String)>) -> Result<Self, BiomeError> { + let entries = entries + .into_iter() + .map(|(point, name)| Ok((point, identifier(&name)?))) + .collect::<Result<_, DecodeError>>()?; + Ok(Self { + parameters: ClimateIndex::new(entries)?, + }) + } + /// Horizon's quantized import format, not the vanilla biome definition + /// codec: [{"coordinates":[[min,max]; six],"offset":long,"biome":id}]. + /// Built-in numeric tables stay private and are authenticated by the runner. + pub fn from_quantized_json(json: &str) -> Result<Self, BiomeError> { + let input: serde_json::Value = serde_json::from_str(json).map_err(DecodeError::from)?; + let mut entries = Vec::new(); + for entry in input + .as_array() + .ok_or(DecodeError::Field("biome parameter list"))? + { + let raw = entry["coordinates"] + .as_array() + .filter(|v| v.len() == 6) + .ok_or(DecodeError::Field("climate coordinates"))?; + let mut coordinates = [Parameter::new(0, 0); 6]; + for (coordinate, raw) in coordinates.iter_mut().zip(raw) { + let raw = raw + .as_array() + .filter(|v| v.len() == 2) + .ok_or(DecodeError::Field("climate interval"))?; + *coordinate = Parameter::new( + raw[0] + .as_i64() + .ok_or(DecodeError::Field("climate minimum"))?, + raw[1] + .as_i64() + .ok_or(DecodeError::Field("climate maximum"))?, + ); + } + let offset = entry["offset"] + .as_i64() + .ok_or(DecodeError::Field("climate offset"))?; + let biome = entry["biome"] + .as_str() + .ok_or(DecodeError::Field("biome identifier"))?; + entries.push(( + ParameterPoint { + coordinates, + offset, + }, + biome.to_owned(), + )); + } + Self::new(entries) + } + pub fn parameters(&self) -> &ClimateIndex<String> { + &self.parameters + } + pub fn resolver<'a>(&'a self, climate: &'a ClimateSampler) -> BiomeResolver<'a> { + BiomeResolver { + climate, + search: self.parameters.searcher(), + } + } +} +#[derive(Debug)] +pub struct BiomeResolver<'a> { + climate: &'a ClimateSampler, + search: ClimateSearch<'a, String>, +} +impl<'a> BiomeResolver<'a> { + pub fn sample( + &mut self, + context: &mut SamplerContext, + quart: [i32; 3], + ) -> Result<&'a str, BiomeError> { + Ok(self + .search + .find(self.climate.sample(context, quart)?)? + .as_str()) + } + pub fn prepare_volume( + &self, + context: &mut SamplerContext, + minimum: [i32; 3], + extents: [i32; 3], + ) -> Result<ClimateVolume, BiomeError> { + Ok(self.climate.sample_volume(context, minimum, extents)?) + } + /// Query order shares the same previous-leaf state as scalar resolution. + pub fn sample_prepared( + &mut self, + volume: &ClimateVolume, + quart: [i32; 3], + ) -> Result<&'a str, BiomeError> { + let target = volume.target(quart).ok_or(BiomeError::OutsideVolume)?; + Ok(self.search.find(target)?.as_str()) + } +} diff --git a/crates/horizon-world/src/worldgen/biome_chunk.rs b/crates/horizon-world/src/worldgen/biome_chunk.rs new file mode 100644 index 000000000..a9ddd5e70 --- /dev/null +++ b/crates/horizon-world/src/worldgen/biome_chunk.rs @@ -0,0 +1,202 @@ +//! Quart-resolution biome storage and section-atomic noise-biome filling. +use crate::heightmap::{Heightmap, HeightmapError, HeightmapType}; +use horizon_core::{ + biome::BiomeZoom, + position::{BlockPos, ChunkPos}, +}; +use std::collections::{BTreeMap, BTreeSet}; + +#[derive(Clone, Debug)] +pub struct BiomeChunk<T> { + position: ChunkPos, + min_y: i32, + height: i32, + sections: Vec<[T; 64]>, +} +#[derive(Debug, PartialEq, Eq)] +pub enum BiomeFillError<E> { + InvalidBounds, + Resolve(E), +} +impl<E: std::fmt::Display> std::fmt::Display for BiomeFillError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::InvalidBounds => f.write_str("biome generation bounds are outside the chunk"), + Self::Resolve(error) => error.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for BiomeFillError<E> {} +impl<T: Clone> BiomeChunk<T> { + /// A chunk's biome values use the same supported vertical bounds as terrain. + /// Each section stores a dense 4×4×4 array; palette/network codecs are separate. + pub fn new( + position: ChunkPos, + min_y: i32, + height: i32, + default: T, + ) -> Result<Self, HeightmapError> { + Heightmap::new(HeightmapType::WorldSurfaceWg, min_y, height)?; + Ok(Self { + position, + min_y, + height, + sections: (0..height / 16) + .map(|_| std::array::from_fn(|_| default.clone())) + .collect(), + }) + } + pub fn section(&self, index: usize) -> Option<&[T; 64]> { + self.sections.get(index) + } + /// Vanilla clamps quart Y to the chunk and wraps X/Z to the local 4×4 grid. + /// The caller is responsible for selecting the chunk containing X/Z. + pub fn noise_biome(&self, quart: [i32; 3]) -> &T { + let bottom = self.min_y >> 2; + let y = quart[1].clamp(bottom, bottom + (self.height >> 2) - 1); + let section = ((y - bottom) >> 2) as usize; + &self.sections[section][index(quart[0], y, quart[2])] + } + /// Fill the sections intersecting inclusive generation bounds. Sections are + /// visited bottom to top; each resolver sees X/Y/Z loop order. A failed + /// section retains its previous values while earlier sections stay committed. + /// This does not decorate the resolver with blending or below-zero retrogen. + pub fn fill<E>( + &mut self, + min_y: i32, + max_y: i32, + mut resolve: impl FnMut([i32; 3]) -> Result<T, E>, + ) -> Result<(), BiomeFillError<E>> { + self.fill_using_chunk(min_y, max_y, |quart, _| resolve(quart)) + } + /// Decorate candidate sampling with the pinned below-zero biome policy. + /// `upgrading` is captured once for this fill, as at native resolver creation. + /// Keys describe holder identity; unkeyed/direct values must return `None`. + pub fn fill_with_retrogen<E>( + &mut self, + min_y: i32, + max_y: i32, + upgrading: bool, + resolve: impl FnMut([i32; 3]) -> Result<T, E>, + biome_key: impl Fn(&T) -> Option<&str>, + ) -> Result<(), BiomeFillError<E>> { + let mut resolver = crate::retrogen::RetrogenBiomeResolver::new(upgrading, resolve); + self.fill_using_chunk(min_y, max_y, |quart, chunk| { + resolver.sample(quart, &biome_key, |old| Ok(chunk.noise_biome(old).clone())) + }) + } + fn fill_using_chunk<E>( + &mut self, + min_y: i32, + max_y: i32, + mut resolve: impl FnMut([i32; 3], &Self) -> Result<T, E>, + ) -> Result<(), BiomeFillError<E>> { + if min_y < self.min_y || max_y >= self.min_y + self.height || min_y > max_y { + return Err(BiomeFillError::InvalidBounds); + } + let x = self.position.x.wrapping_shl(4) >> 2; + let z = self.position.z.wrapping_shl(4) >> 2; + for section_y in (min_y >> 4)..=(max_y >> 4) { + let section = (section_y - (self.min_y >> 4)) as usize; + let mut values = self.sections[section].clone(); + for dx in 0..4 { + for dy in 0..4 { + for dz in 0..4 { + let quart = [ + x.wrapping_add(dx), + section_y.wrapping_shl(2).wrapping_add(dy), + z.wrapping_add(dz), + ]; + values[index(dx, dy, dz)] = + resolve(quart, self).map_err(BiomeFillError::Resolve)?; + } + } + } + self.sections[section] = values; + } + Ok(()) + } +} +fn index(x: i32, y: i32, z: i32) -> usize { + (((y & 3) << 4) | ((z & 3) << 2) | (x & 3)) as usize +} + +/// Resident biome sections shared by decoration selection and block biome zoom. +/// The seed is already obfuscated, as for `BiomeZoom` and the client protocol. +pub struct BiomeRegion<T> { + chunks: BTreeMap<(i32, i32), BiomeChunk<T>>, + zoom: BiomeZoom, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum BiomeRegionError { + InvalidChunks, + MissingChunk(ChunkPos), +} +impl std::fmt::Display for BiomeRegionError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{self:?}") + } +} +impl std::error::Error for BiomeRegionError {} +impl<T: Clone> BiomeRegion<T> { + pub fn new(chunks: Vec<BiomeChunk<T>>, obfuscated_seed: i64) -> Result<Self, BiomeRegionError> { + if chunks.is_empty() || chunks.len() > 4096 { + return Err(BiomeRegionError::InvalidChunks); + } + let min = chunks[0].min_y; + let height = chunks[0].height; + let mut stored = BTreeMap::new(); + for chunk in chunks { + if chunk.min_y != min || chunk.height != height { + return Err(BiomeRegionError::InvalidChunks); + } + if stored + .insert((chunk.position.x, chunk.position.z), chunk) + .is_some() + { + return Err(BiomeRegionError::InvalidChunks); + } + } + Ok(Self { + chunks: stored, + zoom: BiomeZoom::new(obfuscated_seed), + }) + } + pub fn chunk(&self, p: ChunkPos) -> Result<&BiomeChunk<T>, BiomeRegionError> { + self.chunks + .get(&(p.x, p.z)) + .ok_or(BiomeRegionError::MissingChunk(p)) + } + pub fn chunk_mut(&mut self, p: ChunkPos) -> Result<&mut BiomeChunk<T>, BiomeRegionError> { + self.chunks + .get_mut(&(p.x, p.z)) + .ok_or(BiomeRegionError::MissingChunk(p)) + } + pub fn noise_biome(&self, quart: [i32; 3]) -> Result<&T, BiomeRegionError> { + Ok(self + .chunk(ChunkPos::new(quart[0] >> 2, quart[2] >> 2))? + .noise_biome(quart)) + } + pub fn biome(&self, block: BlockPos) -> Result<&T, BiomeRegionError> { + self.noise_biome(self.zoom.quart_at_block(block)) + } + pub fn quart_at_block(&self, block: BlockPos) -> [i32; 3] { + self.zoom.quart_at_block(block) + } + /// Distinct values currently stored anywhere in the chunk. The result is + /// sorted by biome identity; callers must not use this order as registry order. + pub fn present_in_chunk(&self, p: ChunkPos) -> Result<Vec<T>, BiomeRegionError> + where + T: Ord, + { + Ok(self + .chunk(p)? + .sections + .iter() + .flatten() + .cloned() + .collect::<BTreeSet<_>>() + .into_iter() + .collect()) + } +} diff --git a/crates/horizon-world/src/worldgen/biome_predicate.rs b/crates/horizon-world/src/worldgen/biome_predicate.rs new file mode 100644 index 000000000..46554e1a9 --- /dev/null +++ b/crates/horizon-world/src/worldgen/biome_predicate.rs @@ -0,0 +1,81 @@ +//! Immutable biome identities and resolved holder sets for world predicates. +use super::{DecodeError, biome::BiomeId, density::identifier}; +use std::{ + collections::{BTreeMap, BTreeSet}, + sync::Arc, +}; +pub struct BiomePredicateBindings { + names: BTreeMap<String, BiomeId>, + tags: BTreeMap<String, Arc<BTreeSet<BiomeId>>>, +} +impl BiomePredicateBindings { + /// IDs must belong to the same registry snapshot as the world's biome query. + pub fn new( + names: &BTreeMap<String, BiomeId>, + tags: &BTreeMap<String, Vec<String>>, + ) -> Result<Self, DecodeError> { + if names.len() > 8192 || tags.len() > 8192 { + return Err(DecodeError::Field("predicate biome registry size")); + } + let mut canonical = BTreeMap::new(); + let mut ids = BTreeSet::new(); + for (name, id) in names { + if canonical.insert(identifier(name)?, *id).is_some() || !ids.insert(*id) { + return Err(DecodeError::Field("duplicate predicate biome identity")); + } + } + let mut bound_tags = BTreeMap::new(); + for (name, entries) in tags { + if entries.len() > 8192 { + return Err(DecodeError::Field("predicate biome tag size")); + } + let values = entries + .iter() + .map(|entry| { + canonical + .get(&identifier(entry)?) + .copied() + .ok_or_else(|| DecodeError::Registry(format!("unknown biome {entry}"))) + }) + .collect::<Result<BTreeSet<_>, _>>()?; + if bound_tags + .insert(super::tags::identifier(name)?, Arc::new(values)) + .is_some() + { + return Err(DecodeError::Field("duplicate predicate biome tag")); + } + } + Ok(Self { + names: canonical, + tags: bound_tags, + }) + } + pub fn resolve(&self, json: &str) -> Result<Arc<BTreeSet<BiomeId>>, DecodeError> { + if let Ok(name) = serde_json::from_str::<String>(json) { + if let Some(tag) = name.strip_prefix('#') { + return self + .tags + .get(&super::tags::identifier(tag)?) + .cloned() + .ok_or_else(|| DecodeError::Registry(format!("unknown biome tag {tag}"))); + } + return Ok(Arc::new(BTreeSet::from([self.biome(&name)?]))); + } + let names: Vec<String> = serde_json::from_str(json)?; + if names.len() > 8192 { + return Err(DecodeError::Field("predicate biome holder list")); + } + Ok(Arc::new( + names + .iter() + .map(|name| self.biome(name)) + .collect::<Result<_, _>>()?, + )) + } + fn biome(&self, name: &str) -> Result<BiomeId, DecodeError> { + self.names + .get(&identifier(name)?) + .copied() + .ok_or_else(|| DecodeError::Registry(format!("unknown biome {name}"))) + } +} diff --git a/crates/horizon-world/src/worldgen/biome_source.rs b/crates/horizon-world/src/worldgen/biome_source.rs new file mode 100644 index 000000000..bb2cf8990 --- /dev/null +++ b/crates/horizon-world/src/worldgen/biome_source.rs @@ -0,0 +1,92 @@ +//! Fixed, checkerboard and End biome-source queries. Registry codecs are separate. +mod codec; +mod runtime; +pub use codec::{BiomeSet, BiomeSourceCatalog, BiomeSourceDefinition}; +use horizon_core::density::{DensitySampler, SampleError, SamplerContext}; +pub use runtime::{BiomeSourceError, BiomeSourceResolver, ResolvedBiomeSource}; + +#[derive(Clone, Debug)] +pub struct FixedBiomeSource<T> { + pub biome: T, +} +impl<T> FixedBiomeSource<T> { + pub fn noise_biome(&self, _quart: [i32; 3]) -> &T { + &self.biome + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum CheckerboardError { + TooManyBiomes, + EmptyBiomes, +} +impl std::fmt::Display for CheckerboardError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{self:?}") + } +} +impl std::error::Error for CheckerboardError {} +#[derive(Clone, Debug)] +pub struct CheckerboardBiomeSource<T> { + biomes: Vec<T>, + scale: i32, +} +impl<T> CheckerboardBiomeSource<T> { + /// Runtime scale is unrestricted, including Java's masked shift distances. + /// The vanilla JSON codec separately limits scale to 0..=62. + pub fn new(biomes: Vec<T>, scale: i32) -> Result<Self, CheckerboardError> { + if biomes.len() > 8192 { + return Err(CheckerboardError::TooManyBiomes); + } + Ok(Self { biomes, scale }) + } + pub fn noise_biome(&self, quart: [i32; 3]) -> Result<&T, CheckerboardError> { + if self.biomes.is_empty() { + return Err(CheckerboardError::EmptyBiomes); + } + let shift = self.scale.wrapping_add(2) as u32; + let cell = quart[0] + .wrapping_shr(shift) + .wrapping_add(quart[2].wrapping_shr(shift)); + Ok(&self.biomes[cell.rem_euclid(self.biomes.len() as i32) as usize]) + } +} +#[derive(Clone, Debug)] +pub struct EndBiomeSource<T> { + pub center: T, + pub highlands: T, + pub midlands: T, + pub islands: T, + pub barrens: T, +} +impl<T> EndBiomeSource<T> { + /// The central 64-chunk circle bypasses erosion. Outside it, sample erosion + /// at the containing chunk's center with the original wrapped block Y. + pub fn noise_biome( + &self, + quart: [i32; 3], + erosion: &dyn DensitySampler, + context: &mut SamplerContext, + ) -> Result<&T, SampleError> { + let block = quart.map(|v| v.wrapping_shl(2)); + let x = block[0] >> 4; + let z = block[2] >> 4; + if i64::from(x) * i64::from(x) + i64::from(z) * i64::from(z) <= 4096 { + return Ok(&self.center); + } + let position = [ + x.wrapping_mul(2).wrapping_add(1).wrapping_mul(8), + block[1], + z.wrapping_mul(2).wrapping_add(1).wrapping_mul(8), + ]; + let value = erosion.sample_value(context, position)?; + Ok(if value > 0.25 { + &self.highlands + } else if value >= -0.0625 { + &self.midlands + } else if value < -0.21875 { + &self.islands + } else { + &self.barrens + }) + } +} diff --git a/crates/horizon-world/src/worldgen/biome_source/codec.rs b/crates/horizon-world/src/worldgen/biome_source/codec.rs new file mode 100644 index 000000000..ab78f4588 --- /dev/null +++ b/crates/horizon-world/src/worldgen/biome_source/codec.rs @@ -0,0 +1,262 @@ +//! Registry-bound biome-source definitions. Inline full biome objects are separate. +use crate::worldgen::{ + DecodeError, Object, RawValue, + climate::{ParameterPoint, decode_parameter_point, unquantize}, + density::identifier, + int_range, optional, required, +}; +use std::collections::{BTreeMap, BTreeSet}; + +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum BiomeSet { + Direct(Vec<String>), + Tag { name: String, members: Vec<String> }, +} +impl BiomeSet { + pub fn members(&self) -> &[String] { + match self { + Self::Direct(values) => values, + Self::Tag { members, .. } => members, + } + } +} +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum BiomeSourceDefinition { + Fixed(String), + Checkerboard { biomes: BiomeSet, scale: i32 }, + End, + MultiNoise(Vec<(ParameterPoint, String)>), + Preset { name: String, inline: bool }, +} +#[derive(Clone, Debug)] +pub struct BiomeSourceCatalog { + biomes: BTreeSet<String>, + tags: BTreeMap<String, Vec<String>>, + presets: BTreeSet<String>, +} +impl BiomeSourceCatalog { + pub fn new( + biomes: &BTreeSet<String>, + tags: &BTreeMap<String, Vec<String>>, + presets: &BTreeSet<String>, + ) -> Result<Self, DecodeError> { + if biomes.len() > 8192 + || tags.len() > 8192 + || presets.len() > 8192 + || tags.values().map(Vec::len).sum::<usize>() > 65536 + { + return Err(DecodeError::Field("biome source catalog size")); + } + let biomes = biomes + .iter() + .map(|v| identifier(v)) + .collect::<Result<BTreeSet<_>, _>>()?; + let presets = presets + .iter() + .map(|v| identifier(v)) + .collect::<Result<BTreeSet<_>, _>>()?; + let mut resolved = BTreeMap::new(); + for (name, members) in tags { + let members = members + .iter() + .map(|v| identifier(v)) + .collect::<Result<Vec<_>, _>>()?; + if members.iter().any(|v| !biomes.contains(v)) { + return Err(DecodeError::Field("unknown biome tag member")); + } + if resolved.insert(identifier(name)?, members).is_some() { + return Err(DecodeError::Field("duplicate biome tag")); + } + } + Ok(Self { + biomes, + tags: resolved, + presets, + }) + } + fn biome(&self, raw: &RawValue) -> Result<String, DecodeError> { + let name = identifier(&serde_json::from_str::<String>(raw.get())?)?; + if !self.biomes.contains(&name) { + return Err(DecodeError::Field("unknown biome")); + } + Ok(name) + } + fn set(&self, raw: &RawValue) -> Result<BiomeSet, DecodeError> { + if raw.get().starts_with('"') { + let name: String = serde_json::from_str(raw.get())?; + if let Some(name) = name.strip_prefix('#') { + let name = identifier(name)?; + let members = self + .tags + .get(&name) + .ok_or(DecodeError::Field("unknown biome tag"))? + .clone(); + return Ok(BiomeSet::Tag { name, members }); + } + return Ok(BiomeSet::Direct(vec![self.biome(raw)?])); + } + let values: Vec<Box<RawValue>> = serde_json::from_str(raw.get())?; + if values.len() > 8192 { + return Err(DecodeError::Field("biome holder set size")); + } + Ok(BiomeSet::Direct( + values + .iter() + .map(|v| self.biome(v)) + .collect::<Result<_, _>>()?, + )) + } + fn inline(&self, raw: &RawValue) -> Result<BiomeSourceDefinition, DecodeError> { + let entries: Vec<Object> = serde_json::from_str(raw.get())?; + if entries.is_empty() || entries.len() > 65536 { + return Err(DecodeError::Field("multi-noise entry count")); + } + let mut result = Vec::with_capacity(entries.len()); + for entry in entries { + result.push(( + decode_parameter_point(required(&entry, "parameters")?.get())?, + self.biome(required(&entry, "biome")?)?, + )); + } + Ok(BiomeSourceDefinition::MultiNoise(result)) + } + pub fn decode(&self, json: &str) -> Result<BiomeSourceDefinition, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let kind = identifier(&serde_json::from_str::<String>( + required(&object, "type")?.get(), + )?)?; + Ok(match kind.as_str() { + "minecraft:fixed" => { + BiomeSourceDefinition::Fixed(self.biome(required(&object, "biome")?)?) + } + "minecraft:checkerboard" => BiomeSourceDefinition::Checkerboard { + biomes: self.set(required(&object, "biomes")?)?, + scale: optional(&object, "scale") + .map_or(Ok(2), |v| int_range(v, "biome scale", 0, 62))?, + }, + "minecraft:the_end" => { + for name in [ + "the_end", + "end_highlands", + "end_midlands", + "small_end_islands", + "end_barrens", + ] { + if !self.biomes.contains(&format!("minecraft:{name}")) { + return Err(DecodeError::Field("missing End biome")); + } + } + BiomeSourceDefinition::End + } + "minecraft:multi_noise" => { + // mapEither prefers a successful inline list, then tries preset. + if let Some(raw) = optional(&object, "biomes") { + if let Ok(value) = self.inline(raw) { + return Ok(value); + } + } + let raw = required(&object, "preset")?; + if raw.get().starts_with('"') { + let name = identifier(&serde_json::from_str::<String>(raw.get())?)?; + if !self.presets.contains(&name) { + return Err(DecodeError::Field("unknown biome preset holder")); + } + BiomeSourceDefinition::Preset { + name, + inline: false, + } + } else { + let preset: Object = serde_json::from_str(raw.get())?; + let name = identifier(&serde_json::from_str::<String>( + required(&preset, "preset")?.get(), + )?)?; + if !matches!(name.as_str(), "minecraft:overworld" | "minecraft:nether") { + return Err(DecodeError::Field("unknown built-in biome preset")); + } + BiomeSourceDefinition::Preset { name, inline: true } + } + } + _ => return Err(DecodeError::Field("unknown biome source")), + }) + } + /// Encode definitions in the vanilla canonical shape; decoding the result + /// validates registry references and bounds before publishing JSON. + pub fn encode(&self, definition: &BiomeSourceDefinition) -> Result<String, DecodeError> { + let (kind, fields) = match definition { + BiomeSourceDefinition::Fixed(name) => ("fixed", format!(",\"biome\":{}", quoted(name))), + BiomeSourceDefinition::End => ("the_end", String::new()), + BiomeSourceDefinition::Checkerboard { biomes, scale } => { + let values = match biomes { + BiomeSet::Tag { name, .. } => quoted(&format!("#{name}")), + BiomeSet::Direct(values) if values.len() == 1 => quoted(&values[0]), + BiomeSet::Direct(values) => serde_json::to_string(values)?, + }; + ( + "checkerboard", + format!( + ",\"biomes\":{values}{}", + if *scale == 2 { + String::new() + } else { + format!(",\"scale\":{scale}") + } + ), + ) + } + BiomeSourceDefinition::MultiNoise(entries) => { + let values = entries + .iter() + .map(|(point, name)| { + format!( + "{{\"parameters\":{},\"biome\":{}}}", + point_json(point), + quoted(name) + ) + }) + .collect::<Vec<_>>() + .join(","); + ("multi_noise", format!(",\"biomes\":[{values}]")) + } + BiomeSourceDefinition::Preset { name, inline } => { + let value = if *inline { + format!("{{\"preset\":{}}}", quoted(name)) + } else { + quoted(name) + }; + ("multi_noise", format!(",\"preset\":{value}")) + } + }; + let json = format!("{{\"type\":\"minecraft:{kind}\"{fields}}}"); + self.decode(&json)?; + Ok(json) + } +} +fn quoted(value: &str) -> String { + serde_json::to_string(value).expect("string serializes") +} +fn point_json(point: &ParameterPoint) -> String { + let names = [ + "temperature", + "humidity", + "continentalness", + "erosion", + "depth", + "weirdness", + ]; + let mut fields = Vec::with_capacity(7); + for (name, p) in names.into_iter().zip(point.coordinates) { + let min = serde_json::to_string(&unquantize(p.min)).expect("finite coordinate"); + let max = serde_json::to_string(&unquantize(p.max)).expect("finite coordinate"); + let value = if min == max { + min + } else { + format!("[{min},{max}]") + }; + fields.push(format!("{}:{value}", quoted(name))); + } + fields.push(format!( + "\"offset\":{}", + serde_json::to_string(&unquantize(point.offset)).expect("finite offset") + )); + format!("{{{}}}", fields.join(",")) +} diff --git a/crates/horizon-world/src/worldgen/biome_source/runtime.rs b/crates/horizon-world/src/worldgen/biome_source/runtime.rs new file mode 100644 index 000000000..5d78fd835 --- /dev/null +++ b/crates/horizon-world/src/worldgen/biome_source/runtime.rs @@ -0,0 +1,170 @@ +//! World-bound biome sources and per-worker resolver state. +use super::{ + BiomeSourceDefinition, CheckerboardBiomeSource, CheckerboardError, EndBiomeSource, + FixedBiomeSource, +}; +use crate::worldgen::{ + DecodeError, + biome::{BiomeError, BiomeResolver, MultiNoiseBiomeSource}, + climate::{ClimateSampler, ClimateVolume}, +}; +use horizon_core::density::{DensitySampler, SampleError, SamplerContext}; +use std::collections::{BTreeMap, BTreeSet}; + +#[derive(Debug)] +pub enum BiomeSourceError { + Decode(DecodeError), + Biome(BiomeError), + Checkerboard(CheckerboardError), + Sample(SampleError), + MissingPreset, +} +impl std::fmt::Display for BiomeSourceError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{self:?}") + } +} +impl std::error::Error for BiomeSourceError {} +impl From<DecodeError> for BiomeSourceError { + fn from(e: DecodeError) -> Self { + Self::Decode(e) + } +} +impl From<BiomeError> for BiomeSourceError { + fn from(e: BiomeError) -> Self { + Self::Biome(e) + } +} +impl From<CheckerboardError> for BiomeSourceError { + fn from(e: CheckerboardError) -> Self { + Self::Checkerboard(e) + } +} +impl From<SampleError> for BiomeSourceError { + fn from(e: SampleError) -> Self { + Self::Sample(e) + } +} + +#[derive(Debug)] +pub enum ResolvedBiomeSource { + Fixed(FixedBiomeSource<String>), + Checkerboard(CheckerboardBiomeSource<String>), + End(EndBiomeSource<String>), + MultiNoise(MultiNoiseBiomeSource), +} +impl BiomeSourceDefinition { + /// Resolve a decoded definition using immutable, authenticated quantized + /// preset tables. This does not execute vanilla's built-in preset builders. + pub fn resolve( + &self, + presets: &BTreeMap<String, String>, + ) -> Result<ResolvedBiomeSource, BiomeSourceError> { + Ok(match self { + Self::Fixed(biome) => ResolvedBiomeSource::Fixed(FixedBiomeSource { + biome: biome.clone(), + }), + Self::Checkerboard { biomes, scale } => ResolvedBiomeSource::Checkerboard( + CheckerboardBiomeSource::new(biomes.members().to_vec(), *scale)?, + ), + Self::End => ResolvedBiomeSource::End(EndBiomeSource { + center: "minecraft:the_end".into(), + highlands: "minecraft:end_highlands".into(), + midlands: "minecraft:end_midlands".into(), + islands: "minecraft:small_end_islands".into(), + barrens: "minecraft:end_barrens".into(), + }), + Self::MultiNoise(entries) => { + ResolvedBiomeSource::MultiNoise(MultiNoiseBiomeSource::new(entries.clone())?) + } + Self::Preset { name, .. } => { + ResolvedBiomeSource::MultiNoise(MultiNoiseBiomeSource::from_quantized_json( + presets.get(name).ok_or(BiomeSourceError::MissingPreset)?, + )?) + } + }) + } +} +impl ResolvedBiomeSource { + pub fn possible_biomes(&self) -> BTreeSet<&str> { + match self { + Self::Fixed(source) => [source.biome.as_str()].into(), + Self::Checkerboard(source) => source.biomes.iter().map(String::as_str).collect(), + Self::End(source) => [ + source.center.as_str(), + source.highlands.as_str(), + source.midlands.as_str(), + source.islands.as_str(), + source.barrens.as_str(), + ] + .into(), + Self::MultiNoise(source) => source + .parameters() + .entries() + .iter() + .map(|(_, name)| name.as_str()) + .collect(), + } + } + /// Keep one resolver per worker to retain native previous-leaf tie behavior. + /// Climate and erosion roots must share the worker's compiler/context namespace. + pub fn resolver<'a>( + &'a self, + climate: &'a ClimateSampler, + erosion: &'a dyn DensitySampler, + ) -> BiomeSourceResolver<'a> { + match self { + Self::Fixed(source) => BiomeSourceResolver::Fixed(source), + Self::Checkerboard(source) => BiomeSourceResolver::Checkerboard(source), + Self::End(source) => BiomeSourceResolver::End(source, erosion), + Self::MultiNoise(source) => BiomeSourceResolver::MultiNoise(source.resolver(climate)), + } + } +} +#[derive(Debug)] +pub enum BiomeSourceResolver<'a> { + Fixed(&'a FixedBiomeSource<String>), + Checkerboard(&'a CheckerboardBiomeSource<String>), + End(&'a EndBiomeSource<String>, &'a dyn DensitySampler), + MultiNoise(BiomeResolver<'a>), +} +impl<'a> BiomeSourceResolver<'a> { + pub fn sample( + &mut self, + context: &mut SamplerContext, + quart: [i32; 3], + ) -> Result<&'a str, BiomeSourceError> { + Ok(match self { + Self::Fixed(source) => source.biome.as_str(), + Self::Checkerboard(source) => source.noise_biome(quart)?.as_str(), + Self::End(source, erosion) => source.noise_biome(quart, *erosion, context)?.as_str(), + Self::MultiNoise(source) => source.sample(context, quart)?, + }) + } + /// Native fixed/checkerboard/End sources do not pre-sample a climate volume. + /// Multi-noise preparation samples the full supplied quart extent once. + pub fn prepare_volume( + &self, + context: &mut SamplerContext, + minimum: [i32; 3], + extents: [i32; 3], + ) -> Result<Option<ClimateVolume>, BiomeSourceError> { + match self { + Self::MultiNoise(source) => Ok(Some(source.prepare_volume(context, minimum, extents)?)), + _ => Ok(None), + } + } + pub fn sample_prepared( + &mut self, + context: &mut SamplerContext, + volume: Option<&ClimateVolume>, + quart: [i32; 3], + ) -> Result<&'a str, BiomeSourceError> { + if let Self::MultiNoise(source) = self { + if let Some(volume) = volume { + return Ok(source.sample_prepared(volume, quart)?); + } + } + self.sample(context, quart) + } +} diff --git a/crates/horizon-world/src/worldgen/biome_temperature.rs b/crates/horizon-world/src/worldgen/biome_temperature.rs new file mode 100644 index 000000000..c7e22c985 --- /dev/null +++ b/crates/horizon-world/src/worldgen/biome_temperature.rs @@ -0,0 +1,193 @@ +//! Biome temperature sampling and a worker-local vanilla temperature cache. +use super::{DecodeError, Object, number_text, optional, required}; +use horizon_core::{ + noise::{Noise, NoiseStack, SimplexNoise}, + position::BlockPos, + random::LegacyRandom, +}; +use std::{ + collections::{HashMap, VecDeque, hash_map::Entry}, + sync::{Arc, OnceLock}, +}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TemperatureModifier { + None, + Frozen, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Precipitation { + None, + Rain, + Snow, +} +#[derive(Clone, Copy, Debug)] +pub struct BiomeTemperatureSettings { + pub base_temperature: f32, + pub modifier: TemperatureModifier, + pub has_precipitation: bool, + pub downfall: f32, +} +struct TemperatureNoises { + height: SimplexNoise, + frozen: NoiseStack, + info: SimplexNoise, +} +fn noises() -> &'static TemperatureNoises { + static NOISES: OnceLock<TemperatureNoises> = OnceLock::new(); + NOISES.get_or_init(|| { + let mut random = LegacyRandom::new(3456); + let mut frozen = NoiseStack::builder(); + for (frequency, amplitude) in [ + (1.0, 1.0f32 / 7.0), + (0.5, 2.0f32 / 7.0), + (0.25, 4.0f32 / 7.0), + ] { + frozen.add( + Arc::new(SimplexNoise::with_skipped_offsets(&mut random, true)), + frequency, + amplitude, + ); + } + TemperatureNoises { + height: SimplexNoise::with_skipped_offsets(&mut LegacyRandom::new(1234), true), + frozen: frozen.build().expect("fixed finite noise layers"), + info: SimplexNoise::with_skipped_offsets(&mut LegacyRandom::new(2345), true), + } + }) +} +impl TemperatureModifier { + pub fn modify(self, position: BlockPos, base: f32) -> f32 { + if self == Self::Frozen { + let sources = noises(); + let x = f64::from(position.x); + let z = f64::from(position.z); + let frozen = f64::from(sources.frozen.get2(x * 0.05, z * 0.05) * 7.0); + let info = f64::from(sources.info.get2(x * 0.2, z * 0.2)); + if frozen + info < 0.3 && f64::from(sources.info.get2(x * 0.09, z * 0.09)) < 0.8 { + return 0.2; + } + } + base + } +} +impl BiomeTemperatureSettings { + /// Decode the climate fields of a biome. Other biome fields are ignored, + /// matching the native ClimateSettings map codec rather than the full biome. + pub fn from_json(json: &str) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let float = |name| { + number_text(required(&object, name)?)? + .parse::<f32>() + .map_err(|_| DecodeError::Field(name)) + }; + let modifier = match optional(&object, "temperature_modifier") { + None => TemperatureModifier::None, + Some(raw) => match serde_json::from_str::<String>(raw.get())?.as_str() { + "none" => TemperatureModifier::None, + "frozen" => TemperatureModifier::Frozen, + _ => return Err(DecodeError::Field("temperature_modifier")), + }, + }; + Ok(Self { + base_temperature: float("temperature")?, + downfall: float("downfall")?, + has_precipitation: serde_json::from_str(required(&object, "has_precipitation")?.get())?, + modifier, + }) + } + + pub fn height_adjusted(self, position: BlockPos, sea_level: i32) -> f32 { + let base = self.modifier.modify(position, self.base_temperature); + let start = sea_level.wrapping_add(17); + if position.y > start { + let variation = noises().height.get2( + f64::from(position.x as f32 / 8.0), + f64::from(position.z as f32 / 8.0), + ) * 8.0; + base - ((variation + position.y as f32 - start as f32) * 0.05 / 40.0) + } else { + base + } + } +} + +/// Keep one instance per biome per worker, matching vanilla's thread-local map. +/// Hits do not reorder entries. The packed-position key deliberately omits sea +/// level, so a cached value survives queries with a different sea level. +#[derive(Debug)] +pub struct BiomeTemperature { + settings: BiomeTemperatureSettings, + values: HashMap<i64, f32>, + order: VecDeque<i64>, +} +impl BiomeTemperature { + pub fn new(settings: BiomeTemperatureSettings) -> Self { + Self { + settings, + values: HashMap::with_capacity(1024), + order: VecDeque::with_capacity(1024), + } + } + pub fn settings(&self) -> BiomeTemperatureSettings { + self.settings + } + pub fn temperature(&mut self, position: BlockPos, sea_level: i32) -> f32 { + let key = position.pack(); + if let Some(value) = self + .values + .get(&key) + .copied() + .filter(|value| !value.is_nan()) + { + return value; + } + let value = self.settings.height_adjusted(position, sea_level); + // NaN is both the missing-value sentinel and a possible stored value. + // Recomputing an existing NaN at capacity still evicts the oldest key. + if self.values.len() == 1024 { + let first = self.order.pop_front().expect("full cache has entries"); + self.values.remove(&first); + } + match self.values.entry(key) { + Entry::Occupied(mut entry) => { + entry.insert(value); + } + Entry::Vacant(entry) => { + entry.insert(value); + self.order.push_back(key); + } + } + value + } + pub fn warm_enough_to_rain(&mut self, position: BlockPos, sea_level: i32) -> bool { + self.temperature(position, sea_level) >= 0.15 + } + pub fn cold_enough_to_snow(&mut self, position: BlockPos, sea_level: i32) -> bool { + !self.warm_enough_to_rain(position, sea_level) + } + pub fn should_melt_frozen_ocean_iceberg_slightly( + &mut self, + position: BlockPos, + sea_level: i32, + ) -> bool { + self.temperature(position, sea_level) > 0.1 + } + pub fn precipitation_at(&mut self, position: BlockPos, sea_level: i32) -> Precipitation { + if !self.settings.has_precipitation { + Precipitation::None + } else if self.cold_enough_to_snow(position, sea_level) { + Precipitation::Snow + } else { + Precipitation::Rain + } + } + pub fn cached_temperatures(&self) -> impl ExactSizeIterator<Item = (i64, f32)> + '_ { + self.order.iter().map(|key| (*key, self.values[key])) + } +} + +/// Fixed biome-information noise shared by temperature and placement rules. +pub fn biome_info_noise(x: f64, z: f64) -> f32 { + noises().info.get2(x, z) +} diff --git a/crates/horizon-world/src/worldgen/biome_weather.rs b/crates/horizon-world/src/worldgen/biome_weather.rs new file mode 100644 index 000000000..7c58b4d23 --- /dev/null +++ b/crates/horizon-world/src/worldgen/biome_weather.rs @@ -0,0 +1,94 @@ +//! Registry-bound freezing and snow-placement eligibility using biome temperature. +use super::{ + DecodeError, + biome_temperature::{BiomeTemperature, Precipitation}, + block_feature::FeatureBlockBindings, + placement::{PlacementContext, PlacementQueryError}, +}; +use crate::{fluid::FluidKind, registry::BlockStateId}; +use horizon_core::position::BlockPos; +use std::{collections::BTreeSet, sync::Arc}; +#[derive(Clone, Debug)] +pub struct BiomeWeatherBindings { + liquid_blocks: Arc<BTreeSet<BlockStateId>>, + snow_states: Arc<BTreeSet<BlockStateId>>, + snow: BlockStateId, + air: [BlockStateId; 3], +} +impl BiomeWeatherBindings { + pub fn new(bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + let mut liquids = BTreeSet::new(); + // WATER and LAVA are the pinned vanilla registry's LiquidBlock instances. + for name in ["minecraft:water", "minecraft:lava"] { + liquids.extend( + bindings + .blocks + .get(name) + .ok_or(DecodeError::Field("weather liquid blocks"))? + .iter() + .copied(), + ); + } + Ok(Self { + liquid_blocks: Arc::new(liquids), + snow_states: bindings + .blocks + .get("minecraft:snow") + .cloned() + .ok_or(DecodeError::Field("weather snow states"))?, + snow: bindings + .registry() + .default_state("minecraft:snow") + .ok_or(DecodeError::Field("weather snow state"))?, + air: bindings.air, + }) + } + pub fn should_freeze( + &self, + world: &mut impl PlacementContext, + temperature: &mut BiomeTemperature, + p: [i32; 3], + require_edge: bool, + ) -> Result<bool, PlacementQueryError> { + if temperature.warm_enough_to_rain(BlockPos::new(p[0], p[1], p[2]), world.sea_level()?) { + return Ok(false); + } + if !world.inside_build_height(p)? || world.block_brightness(p)? >= 10 { + return Ok(false); + } + let state = world.block_state(p)?; + let fluid = world.fluid_state(p)?; + if fluid.kind() != FluidKind::Water || !self.liquid_blocks.contains(&state) { + return Ok(false); + } + if !require_edge { + return Ok(true); + } + for d in [[-1, 0, 0], [1, 0, 0], [0, 0, -1], [0, 0, 1]] { + if !world.water_at(std::array::from_fn(|i| p[i].wrapping_add(d[i])))? { + return Ok(true); + } + } + Ok(false) + } + pub fn should_snow( + &self, + world: &mut impl PlacementContext, + temperature: &mut BiomeTemperature, + p: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + if temperature.precipitation_at(BlockPos::new(p[0], p[1], p[2]), world.sea_level()?) + != Precipitation::Snow + { + return Ok(false); + } + if !world.inside_build_height(p)? || world.block_brightness(p)? >= 10 { + return Ok(false); + } + let state = world.block_state(p)?; + if !self.air.contains(&state) && !self.snow_states.contains(&state) { + return Ok(false); + } + world.block_survives(self.snow, p) + } +} diff --git a/crates/horizon-world/src/worldgen/block_blob.rs b/crates/horizon-world/src/worldgen/block_blob.rs new file mode 100644 index 000000000..ad866b8d5 --- /dev/null +++ b/crates/horizon-world/src/worldgen/block_blob.rs @@ -0,0 +1,140 @@ +//! Descending support search and three overlapping randomized block blobs. +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + block_predicate::BlockPredicate, + feature::FeatureWorld, + placement::{PlacementContext, PlacementQueryError}, + required, +}; +use crate::registry::BlockStateId; +use horizon_core::random::{InvalidBound, RandomSource}; +#[derive(Clone, Debug)] +pub struct BlockBlobFeature { + state: BlockStateId, + can_place_on: BlockPredicate, +} +#[derive(Debug)] +pub enum BlockBlobError<E> { + Random(InvalidBound), + Query(PlacementQueryError), + World(E), + WorkLimit, +} +impl<E: std::fmt::Display> std::fmt::Display for BlockBlobError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Random(e) => e.fmt(f), + Self::Query(e) => e.fmt(f), + Self::World(e) => e.fmt(f), + Self::WorkLimit => f.write_str("block blob work limit exceeded"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for BlockBlobError<E> {} +impl BlockBlobFeature { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + Self::decode(json, bindings, 0, &mut 65536) + } + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + if depth > 128 || *remaining == 0 { + return Err(DecodeError::Field("block blob depth or work")); + } + *remaining -= 1; + let object: Object = serde_json::from_str(json)?; + Ok(Self { + state: bindings + .codec + .decode(required(&object, "state")?.get(), false) + .map_err(|e| DecodeError::Registry(e.to_string()))?, + can_place_on: BlockPredicate::decode_with_blocks( + required(&object, "can_place_on")?.get(), + depth + 1, + remaining, + Some(bindings), + )?, + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + mut origin: [i32; 3], + ) -> Result<bool, BlockBlobError<W::Error>> { + let mut remaining = 1_048_576; + while origin[1] + > world + .min_y() + .map_err(BlockBlobError::Query)? + .wrapping_add(3) + { + spend(&mut remaining)?; + let below = [origin[0], origin[1].wrapping_sub(1), origin[2]]; + if self + .can_place_on + .test(world, below) + .map_err(BlockBlobError::Query)? + { + break; + } + origin = below; + } + if origin[1] + <= world + .min_y() + .map_err(BlockBlobError::Query)? + .wrapping_add(3) + { + return Ok(false); + } + for _ in 0..3 { + let rx = random.next_int_bound(2).map_err(BlockBlobError::Random)?; + let ry = random.next_int_bound(2).map_err(BlockBlobError::Random)?; + let rz = random.next_int_bound(2).map_err(BlockBlobError::Random)?; + let radius = (rx + ry + rz) as f32 * 0.333 + 0.5; + let offset = [rx, ry, rz]; + let a: [i32; 3] = std::array::from_fn(|i| origin[i].wrapping_sub(offset[i])); + let b: [i32; 3] = std::array::from_fn(|i| origin[i].wrapping_add(offset[i])); + let min: [i32; 3] = std::array::from_fn(|i| a[i].min(b[i])); + let sizes: [i32; 3] = + std::array::from_fn(|i| a[i].max(b[i]).wrapping_sub(min[i]).wrapping_add(1)); + let count = sizes[0].wrapping_mul(sizes[1]).wrapping_mul(sizes[2]); + let mut index: i32 = 0; + while index != count { + spend(&mut remaining)?; + let quotient = index / sizes[0]; + let p = [ + min[0].wrapping_add(index % sizes[0]), + min[1].wrapping_add(quotient % sizes[1]), + min[2].wrapping_add(quotient / sizes[1]), + ]; + index = index.wrapping_add(1); + let d: [f64; 3] = std::array::from_fn(|i| f64::from(p[i]) - f64::from(origin[i])); + if d[0] * d[0] + d[1] * d[1] + d[2] * d[2] <= f64::from(radius * radius) { + world + .set_block(p, self.state, 3) + .map_err(BlockBlobError::World)?; + } + } + origin[0] = origin[0] + .wrapping_add(-1 + random.next_int_bound(2).map_err(BlockBlobError::Random)?); + origin[1] = + origin[1].wrapping_sub(random.next_int_bound(2).map_err(BlockBlobError::Random)?); + origin[2] = origin[2] + .wrapping_add(-1 + random.next_int_bound(2).map_err(BlockBlobError::Random)?); + } + Ok(true) + } +} +fn spend<E>(remaining: &mut usize) -> Result<(), BlockBlobError<E>> { + if *remaining == 0 { + return Err(BlockBlobError::WorkLimit); + } + *remaining -= 1; + Ok(()) +} diff --git a/crates/horizon-world/src/worldgen/block_column.rs b/crates/horizon-world/src/worldgen/block_column.rs new file mode 100644 index 000000000..72a95c73c --- /dev/null +++ b/crates/horizon-world/src/worldgen/block_column.rs @@ -0,0 +1,186 @@ +//! Ordered column obstruction checks, layer truncation and provider writes. +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + block_predicate::BlockPredicate, + feature::FeatureWorld, + placement::{PlacementContext, PlacementQueryError}, + required, + state_provider::{BlockStateProvider, StateProviderError}, + value_provider::IntProvider, +}; +use horizon_core::{ + geometry::Direction, + random::{InvalidBound, RandomSource}, +}; +use serde_json::value::RawValue; + +#[derive(Clone, Debug)] +struct Layer { + height: IntProvider, + provider: BlockStateProvider, +} +#[derive(Clone, Debug)] +pub struct BlockColumnFeature { + layers: Vec<Layer>, + direction: Direction, + allowed: BlockPredicate, + prioritize_tip: bool, +} +#[derive(Debug)] +pub enum BlockColumnError<E> { + Random(InvalidBound), + Provider(StateProviderError<E>), + Query(PlacementQueryError), + World(E), + WorkLimit, +} +impl<E: std::fmt::Display> std::fmt::Display for BlockColumnError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Random(e) => e.fmt(f), + Self::Provider(e) => e.fmt(f), + Self::Query(e) => e.fmt(f), + Self::World(e) => e.fmt(f), + Self::WorkLimit => f.write_str("block column work limit exceeded"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for BlockColumnError<E> {} +impl BlockColumnFeature { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + Self::decode(json, bindings, 0, &mut 65536) + } + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + if depth > 128 || *remaining == 0 { + return Err(DecodeError::Field("block column depth or work")); + } + *remaining -= 1; + let object: Object = serde_json::from_str(json)?; + let values: Vec<Box<RawValue>> = serde_json::from_str(required(&object, "layers")?.get())?; + if values.len() > 8192 { + return Err(DecodeError::Field("block column layer count")); + } + let mut layers = Vec::with_capacity(values.len()); + for raw in values { + let layer: Object = serde_json::from_str(raw.get())?; + let height = IntProvider::decode(required(&layer, "height")?, depth + 1, remaining)?; + if height.bounds()[0] < 0 { + return Err(DecodeError::Field("negative block column height")); + } + let (providers, catalog, _) = bindings + .simple_blocks + .as_ref() + .ok_or(DecodeError::Field("block column provider bindings"))?; + let provider = catalog.provider_with_budget( + required(&layer, "provider")?.get(), + providers, + depth + 1, + remaining, + )?; + layers.push(Layer { height, provider }); + } + let name: String = serde_json::from_str(required(&object, "direction")?.get())?; + let direction = match name.as_str() { + "down" => Direction::Down, + "up" => Direction::Up, + "north" => Direction::North, + "south" => Direction::South, + "west" => Direction::West, + "east" => Direction::East, + _ => return Err(DecodeError::Field("block column direction")), + }; + let allowed = BlockPredicate::decode_with_blocks( + required(&object, "allowed_placement")?.get(), + depth + 1, + remaining, + Some(bindings), + )?; + let prioritize_tip = serde_json::from_str(required(&object, "prioritize_tip")?.get())?; + Ok(Self { + layers, + direction, + allowed, + prioritize_tip, + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + ) -> Result<bool, BlockColumnError<W::Error>> { + let mut heights = Vec::with_capacity(self.layers.len()); + let mut total = 0_i32; + for layer in &self.layers { + let height = layer + .height + .sample(random) + .map_err(BlockColumnError::Random)?; + total = total.wrapping_add(height); + heights.push(height); + } + if total == 0 { + return Ok(false); + } + let step = self.direction.normal(); + let advance = |p: [i32; 3]| std::array::from_fn(|i| p[i].wrapping_add(step[i])); + let mut query_position = advance(origin); + let mut budget = 1_048_576_usize; + for index in 0..total { + spend(&mut budget)?; + if !self + .allowed + .test(world, query_position) + .map_err(BlockColumnError::Query)? + { + truncate(&mut heights, total, index, self.prioritize_tip); + break; + } + query_position = advance(query_position); + } + let mut position = origin; + for (layer, height) in self.layers.iter().zip(heights) { + for _ in 0..height { + spend(&mut budget)?; + let state = layer + .provider + .get_state(world, random, position) + .map_err(BlockColumnError::Provider)?; + world + .set_block(position, state, 2) + .map_err(BlockColumnError::World)?; + position = advance(position); + } + } + Ok(true) + } +} +fn spend<E>(budget: &mut usize) -> Result<(), BlockColumnError<E>> { + if *budget == 0 { + return Err(BlockColumnError::WorkLimit); + } + *budget -= 1; + Ok(()) +} +fn truncate(heights: &mut [i32], total: i32, allowed: i32, prioritize_tip: bool) { + let mut remove = total.wrapping_sub(allowed); + for offset in 0..heights.len() { + if remove <= 0 { + break; + } + let index = if prioritize_tip { + offset + } else { + heights.len() - 1 - offset + }; + let count = heights[index].min(remove); + remove = remove.wrapping_sub(count); + heights[index] = heights[index].wrapping_sub(count); + } +} diff --git a/crates/horizon-world/src/worldgen/block_feature.rs b/crates/horizon-world/src/worldgen/block_feature.rs new file mode 100644 index 000000000..a901a583d --- /dev/null +++ b/crates/horizon-world/src/worldgen/block_feature.rs @@ -0,0 +1,385 @@ +//! Registry-bound block-writing features and their state codec bindings. +use super::{ + DecodeError, Object, + density::identifier, + feature::FeatureWorld, + int_range, + placement::{PlacementContext, PlacementQueryError}, + required, +}; +use crate::block_properties::{BlockPropertiesRegistry, BlockProperty, BoundBlockProperty}; +use crate::registry::{BlockRegistry, BlockStateId, BlockStateJsonCodec}; +use std::{ + collections::{BTreeMap, BTreeSet}, + sync::Arc, +}; + +pub struct FeatureBlockBindings<'r> { + registry: &'r BlockRegistry, + pub(crate) simple_blocks: Option<( + super::state_provider::StateProviderBindings<'r>, + super::state_provider::StateProviderCatalog, + crate::block_placement::BlockPlacementBindings<'r>, + )>, + physical_properties: Option<[BoundBlockProperty; 4]>, + pub(crate) occlusion_faces: Option<crate::block_properties::BoundOcclusionFaces>, + biomes: Option<Arc<super::biome_predicate::BiomePredicateBindings>>, + pub(crate) fluids: super::fluid_predicate::FluidPredicateBindings, + pub(crate) codec: BlockStateJsonCodec<'r>, + pub(crate) blocks: BTreeMap<String, Arc<BTreeSet<BlockStateId>>>, + pub(crate) tags: BTreeMap<String, Arc<BTreeSet<BlockStateId>>>, + pub(crate) air: [BlockStateId; 3], + tree_blocks: std::sync::OnceLock<Arc<super::tree_blocks::TreeBlocks>>, + pub(crate) structures: Option<Arc<super::structure::StructureResources>>, +} +impl<'r> FeatureBlockBindings<'r> { + /// Shared tree/vegetation classifications, built on first use. Requires + /// state-provider and block-property bindings. + /// Bind structure templates and processor lists for template features. + pub fn with_structures( + mut self, + structures: Arc<super::structure::StructureResources>, + ) -> Self { + self.structures = Some(structures); + self + } + pub(crate) fn tree_blocks(&self) -> Result<Arc<super::tree_blocks::TreeBlocks>, DecodeError> { + if let Some(blocks) = self.tree_blocks.get() { + return Ok(blocks.clone()); + } + let blocks = Arc::new(super::tree_blocks::TreeBlocks::build(self)?); + Ok(self.tree_blocks.get_or_init(|| blocks).clone()) + } + pub fn registry(&self) -> &'r BlockRegistry { + self.registry + } + + /// Bind provider resources and precompiled placement operations to this registry. + pub fn with_state_providers( + mut self, + providers: super::state_provider::StateProviderBindings<'r>, + catalog: super::state_provider::StateProviderCatalog, + placement: crate::block_placement::BlockPlacementBindings<'r>, + ) -> Result<Self, DecodeError> { + if !std::ptr::eq(self.registry, providers.registry()) + || !std::ptr::eq(self.registry, placement.registry()) + { + return Err(DecodeError::Field( + "feature provider/placement registry identity", + )); + } + self.simple_blocks = Some((providers, catalog, placement)); + Ok(self) + } + + pub fn with_block_properties( + mut self, + properties: &BlockPropertiesRegistry<'r>, + ) -> Result<Self, DecodeError> { + if !std::ptr::eq(self.registry, properties.registry()) { + return Err(DecodeError::Field( + "block properties use a different registry", + )); + } + self.physical_properties = Some([ + properties.bind(BlockProperty::Solid), + properties.bind(BlockProperty::Replaceable), + properties.bind(BlockProperty::Liquid), + properties.bind(BlockProperty::SolidRender), + ]); + self.occlusion_faces = Some(properties.bind_occlusion_faces()); + Ok(self) + } + pub fn with_biomes( + mut self, + biomes: Arc<super::biome_predicate::BiomePredicateBindings>, + ) -> Self { + self.biomes = Some(biomes); + self + } + + pub fn with_fluid_tags( + mut self, + tags: &BTreeMap<String, Vec<String>>, + ) -> Result<Self, DecodeError> { + self.fluids = self.fluids.with_resolved_tags(tags)?; + Ok(self) + } + pub fn new( + registry: &'r BlockRegistry, + integers: BTreeSet<(String, String)>, + ) -> Result<Self, DecodeError> { + Self::with_tags(registry, integers, &BTreeMap::new()) + } + /// Bind an immutable snapshot of already-resolved block tags. + pub fn with_tags( + registry: &'r BlockRegistry, + integers: BTreeSet<(String, String)>, + tags: &BTreeMap<String, Vec<String>>, + ) -> Result<Self, DecodeError> { + let codec = BlockStateJsonCodec::new(registry, integers) + .map_err(|e| DecodeError::Registry(e.to_string()))?; + let mut blocks = BTreeMap::<String, BTreeSet<BlockStateId>>::new(); + for id in 0..registry.len() { + let id = BlockStateId(id as u32); + blocks + .entry(registry.state(id).unwrap().name.clone()) + .or_default() + .insert(id); + } + let mut bound_tags = BTreeMap::new(); + for (name, entries) in tags { + let mut states = BTreeSet::new(); + for name in entries { + states.extend( + blocks + .get(&identifier(name)?) + .ok_or_else(|| DecodeError::Registry(format!("unknown block {name}")))?, + ); + } + if bound_tags + .insert(super::tags::identifier(name)?, Arc::new(states)) + .is_some() + { + return Err(DecodeError::Field("duplicate block tag")); + } + } + let get = |name| { + registry + .default_state(name) + .ok_or_else(|| DecodeError::Registry(format!("unknown air block {name}"))) + }; + Ok(Self { + registry, + simple_blocks: None, + codec, + biomes: None, + physical_properties: None, + occlusion_faces: None, + fluids: super::fluid_predicate::FluidPredicateBindings::new(registry)?, + blocks: blocks + .into_iter() + .map(|(name, states)| (name, Arc::new(states))) + .collect(), + tags: bound_tags, + tree_blocks: std::sync::OnceLock::new(), + structures: None, + air: [ + get("minecraft:air")?, + get("minecraft:cave_air")?, + get("minecraft:void_air")?, + ], + }) + } +} +impl super::block_predicate::PredicateBlockResolver for FeatureBlockBindings<'_> { + fn predicate_state(&self, json: &str) -> Result<BlockStateId, DecodeError> { + self.codec + .decode(json, false) + .map_err(|e| DecodeError::Registry(e.to_string())) + } + fn predicate_property( + &self, + property: BlockProperty, + ) -> Result<BoundBlockProperty, DecodeError> { + let values = self + .physical_properties + .as_ref() + .ok_or(DecodeError::Field("predicate block property registry"))?; + Ok(values[match property { + BlockProperty::Solid => 0, + BlockProperty::Replaceable => 1, + BlockProperty::Liquid => 2, + BlockProperty::SolidRender => 3, + }] + .clone()) + } + fn predicate_biome_set( + &self, + json: &str, + ) -> Result<Arc<BTreeSet<super::biome::BiomeId>>, DecodeError> { + self.biomes + .as_ref() + .ok_or(DecodeError::Field("predicate biome registry"))? + .resolve(json) + } + + fn predicate_fluid_set( + &self, + json: &str, + ) -> Result<super::fluid_predicate::BoundFluidSet, DecodeError> { + self.fluids.resolve(json) + } + fn predicate_block_set(&self, json: &str) -> Result<Arc<BTreeSet<BlockStateId>>, DecodeError> { + if let Ok(name) = serde_json::from_str::<String>(json) { + if let Some(tag) = name.strip_prefix('#') { + return self + .tags + .get(&super::tags::identifier(tag)?) + .cloned() + .ok_or_else(|| { + DecodeError::Registry(format!("unknown predicate block tag {tag}")) + }); + } + return self + .blocks + .get(&identifier(&name)?) + .cloned() + .ok_or_else(|| DecodeError::Registry(format!("unknown predicate block {name}"))); + } + let names: Vec<String> = serde_json::from_str(json)?; + if names.len() > 8192 { + return Err(DecodeError::Field("predicate block list size")); + } + let mut states = BTreeSet::new(); + for name in names { + states.extend( + self.blocks + .get(&identifier(&name)?) + .ok_or_else(|| { + DecodeError::Registry(format!("unknown predicate block {name}")) + })? + .iter() + .copied(), + ); + } + Ok(Arc::new(states)) + } +} +#[derive(Clone, Debug)] +pub struct FillLayerFeature { + height: i32, + state: BlockStateId, + air: [BlockStateId; 3], +} +#[derive(Debug)] +pub enum BlockFeatureError<E> { + World(E), + Query(PlacementQueryError), +} +impl<E: std::fmt::Display> std::fmt::Display for BlockFeatureError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Query(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for BlockFeatureError<E> {} +impl FillLayerFeature { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let kind = identifier(&serde_json::from_str::<String>( + required(&object, "type")?.get(), + )?)?; + if kind != "minecraft:fill_layer" { + return Err(DecodeError::Field("fill-layer feature type")); + } + Ok(Self { + height: int_range(required(&object, "height")?, "fill-layer height", 0, 4064)?, + state: bindings + .codec + .decode(required(&object, "state")?.get(), false) + .map_err(|e| DecodeError::Registry(e.to_string()))?, + air: bindings.air, + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + origin: [i32; 3], + ) -> Result<bool, BlockFeatureError<W::Error>> { + for dx in 0..16 { + for dz in 0..16 { + // Vanilla re-queries the world minimum for each column. + let y = world + .min_y() + .map_err(BlockFeatureError::Query)? + .wrapping_add(self.height); + let position = [origin[0].wrapping_add(dx), y, origin[2].wrapping_add(dz)]; + let state = world.block(position).map_err(BlockFeatureError::World)?; + if self.air.contains(&state) { + world + .set_block(position, self.state, 2) + .map_err(BlockFeatureError::World)?; + } + } + } + Ok(true) + } +} + +#[derive(Clone, Debug)] +pub struct ReplaceBlockFeature { + targets: Vec<(super::rule_test::RuleTest, BlockStateId)>, +} +impl ReplaceBlockFeature { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + Self::decode(json, bindings, 0, &mut 65536) + } + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let kind = identifier(&serde_json::from_str::<String>( + required(&object, "type")?.get(), + )?)?; + if kind != "minecraft:replace_single_block" { + return Err(DecodeError::Field("replace-block feature type")); + } + let targets = decode_targets(&object, bindings, depth, remaining)?; + Ok(Self { targets }) + } + pub fn place<W: FeatureWorld>( + &self, + world: &mut W, + random: &mut impl horizon_core::random::RandomSource, + origin: [i32; 3], + ) -> Result<bool, BlockFeatureError<W::Error>> { + for (rule, state) in &self.targets { + let current = world.block(origin).map_err(BlockFeatureError::World)?; + if rule.test(current, origin, random) { + world + .set_block(origin, *state, 2) + .map_err(BlockFeatureError::World)?; + break; + } + } + Ok(true) + } +} + +pub(crate) type BlockReplacements = Vec<(super::rule_test::RuleTest, BlockStateId)>; +pub(crate) fn decode_targets( + object: &Object, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, +) -> Result<BlockReplacements, DecodeError> { + let values: Vec<Box<serde_json::value::RawValue>> = + serde_json::from_str(required(object, "targets")?.get())?; + if values.len() > 8192 { + return Err(DecodeError::Field("replacement targets")); + } + values + .iter() + .map(|value| { + let object: Object = serde_json::from_str(value.get())?; + Ok(( + super::rule_test::RuleTest::decode( + required(&object, "target")?.get(), + bindings, + depth + 1, + remaining, + )?, + bindings + .codec + .decode(required(&object, "state")?.get(), false) + .map_err(|e| DecodeError::Registry(e.to_string()))?, + )) + }) + .collect::<Result<_, DecodeError>>() +} diff --git a/crates/horizon-world/src/worldgen/block_pile.rs b/crates/horizon-world/src/worldgen/block_pile.rs new file mode 100644 index 000000000..2db19f9b4 --- /dev/null +++ b/crates/horizon-world/src/worldgen/block_pile.rs @@ -0,0 +1,160 @@ +//! Randomized two-layer piles, with native support checks and write flags. +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + block_predicate::PredicateBlockResolver, + feature::FeatureWorld, + placement::{PlacementContext, PlacementQueryError}, + required, + state_provider::{BlockStateProvider, StateProviderError}, +}; +use crate::registry::BlockStateId; +use horizon_core::{ + geometry::Direction, + random::{InvalidBound, RandomSource}, +}; +use std::{collections::BTreeSet, sync::Arc}; + +#[derive(Clone, Debug)] +pub struct BlockPileFeature { + provider: BlockStateProvider, + air: [BlockStateId; 3], + paths: Arc<BTreeSet<BlockStateId>>, +} +#[derive(Debug)] +pub enum BlockPileError<E> { + Random(InvalidBound), + Provider(StateProviderError<E>), + Query(PlacementQueryError), + World(E), + WorkLimit, +} +impl<E: std::fmt::Display> std::fmt::Display for BlockPileError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Random(e) => e.fmt(f), + Self::Provider(e) => e.fmt(f), + Self::Query(e) => e.fmt(f), + Self::World(e) => e.fmt(f), + Self::WorkLimit => f.write_str("block pile work limit exceeded"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for BlockPileError<E> {} +impl BlockPileFeature { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + Self::decode(json, bindings, 0, &mut 65536) + } + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + if depth > 128 || *remaining == 0 { + return Err(DecodeError::Field("block pile depth or work")); + } + *remaining -= 1; + let object: Object = serde_json::from_str(json)?; + let (providers, catalog, _) = bindings + .simple_blocks + .as_ref() + .ok_or(DecodeError::Field("block pile provider bindings"))?; + Ok(Self { + provider: catalog.provider_with_budget( + required(&object, "state_provider")?.get(), + providers, + depth + 1, + remaining, + )?, + air: bindings.air, + paths: bindings.predicate_block_set(r#""minecraft:dirt_path""#)?, + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + ) -> Result<bool, BlockPileError<W::Error>> { + if origin[1] + < world + .min_y() + .map_err(BlockPileError::Query)? + .wrapping_add(5) + { + return Ok(false); + } + let rx = 2 + random.next_int_bound(2).map_err(BlockPileError::Random)?; + let rz = 2 + random.next_int_bound(2).map_err(BlockPileError::Random)?; + let a = [ + origin[0].wrapping_sub(rx), + origin[1], + origin[2].wrapping_sub(rz), + ]; + let b = [ + origin[0].wrapping_add(rx), + origin[1].wrapping_add(1), + origin[2].wrapping_add(rz), + ]; + let min: [i32; 3] = std::array::from_fn(|i| a[i].min(b[i])); + let sizes: [i32; 3] = + std::array::from_fn(|i| a[i].max(b[i]).wrapping_sub(min[i]).wrapping_add(1)); + let count = sizes[0].wrapping_mul(sizes[1]).wrapping_mul(sizes[2]); + let mut index: i32 = 0; + // Native betweenClosed stops on equality, including overflowed counts. + // Ordinary piles visit at most 98 cells; pathological boxes are bounded. + while index != count { + if index == 1_048_576 { + return Err(BlockPileError::WorkLimit); + } + let quotient = index / sizes[0]; + let p = [ + min[0].wrapping_add(index % sizes[0]), + min[1].wrapping_add(quotient % sizes[1]), + min[2].wrapping_add(quotient / sizes[1]), + ]; + index += 1; + let dx = origin[0].wrapping_sub(p[0]); + let dz = origin[2].wrapping_sub(p[2]); + let distance = dx.wrapping_mul(dx).wrapping_add(dz.wrapping_mul(dz)) as f32; + let threshold = random.next_float() * 10.0 - random.next_float() * 6.0; + if distance <= threshold || f64::from(random.next_float()) < 0.031 { + self.try_place(world, random, p)?; + } + } + Ok(true) + } + fn try_place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + p: [i32; 3], + ) -> Result<(), BlockPileError<W::Error>> { + if !self + .air + .contains(&world.block(p).map_err(BlockPileError::World)?) + { + return Ok(()); + } + let below = [p[0], p[1].wrapping_sub(1), p[2]]; + let support = world.block(below).map_err(BlockPileError::World)?; + let allowed = if self.paths.contains(&support) { + random.next_boolean() + } else { + world + .state_face_sturdy(support, below, Direction::Up) + .map_err(BlockPileError::Query)? + }; + if allowed { + let state = self + .provider + .get_state(world, random, p) + .map_err(BlockPileError::Provider)?; + world + .set_block(p, state, 260) + .map_err(BlockPileError::World)?; + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/worldgen/block_predicate.rs b/crates/horizon-world/src/worldgen/block_predicate.rs new file mode 100644 index 000000000..a4709abc2 --- /dev/null +++ b/crates/horizon-world/src/worldgen/block_predicate.rs @@ -0,0 +1,360 @@ +//! Initial world-position predicates with ordered short-circuit evaluation. +use super::anchor::VerticalAnchor; +use super::placement::{PlacementContext, PlacementQueryError}; +use super::{DecodeError, Object, density::identifier, integer, optional, required}; +use crate::{ + block_properties::{BlockProperty, BoundBlockProperty}, + registry::BlockStateId, +}; +use horizon_core::geometry::Direction; +use serde_json::value::RawValue; +use std::{collections::BTreeSet, sync::Arc}; + +/// Resolve a block holder set against the same immutable registry used by world +/// queries. Unknown blocks/tags fail during decoding, even in unused branches. +pub trait PredicateBlockResolver { + fn predicate_state(&self, _json: &str) -> Result<BlockStateId, DecodeError> { + Err(DecodeError::Field("predicate block state registry")) + } + fn predicate_property( + &self, + _property: BlockProperty, + ) -> Result<BoundBlockProperty, DecodeError> { + Err(DecodeError::Field("predicate block property registry")) + } + fn predicate_biome_set( + &self, + _json: &str, + ) -> Result<Arc<BTreeSet<super::biome::BiomeId>>, DecodeError> { + Err(DecodeError::Field("predicate biome registry")) + } + fn predicate_fluid_set( + &self, + _json: &str, + ) -> Result<super::fluid_predicate::BoundFluidSet, DecodeError> { + Err(DecodeError::Field("predicate fluid registry")) + } + fn predicate_block_set(&self, json: &str) -> Result<Arc<BTreeSet<BlockStateId>>, DecodeError>; +} + +#[derive(Clone, Debug)] +pub enum BlockPredicate { + True, + Unobstructed, + WouldSurvive { + state: BlockStateId, + offset: [i32; 3], + }, + HasSturdyFace { + direction: Direction, + offset: [i32; 3], + }, + Property { + property: BoundBlockProperty, + offset: [i32; 3], + }, + MatchingBiomes(Arc<BTreeSet<super::biome::BiomeId>>), + MatchingFluids { + fluids: super::fluid_predicate::BoundFluidSet, + offset: [i32; 3], + }, + MatchingBlocks { + states: Arc<BTreeSet<BlockStateId>>, + offset: [i32; 3], + }, + MatchingBlockTag { + tag: String, + offset: [i32; 3], + }, + HeightRange { + min: VerticalAnchor, + max: VerticalAnchor, + }, + Volume { + min: [i32; 3], + max: [i32; 3], + predicate: Box<Self>, + }, + Not(Box<Self>), + All(Vec<Self>), + Any(Vec<Self>), + InsideWorldBounds([i32; 3]), +} +impl BlockPredicate { + pub fn from_json(json: &str) -> Result<Self, DecodeError> { + Self::decode(json, 0, &mut 65536) + } + pub(crate) fn decode( + json: &str, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + Self::decode_with_blocks(json, depth, remaining, None) + } + pub fn from_json_with_blocks( + json: &str, + blocks: &impl PredicateBlockResolver, + ) -> Result<Self, DecodeError> { + Self::decode_with_blocks(json, 0, &mut 65536, Some(blocks)) + } + pub(crate) fn decode_with_blocks( + json: &str, + depth: usize, + remaining: &mut usize, + blocks: Option<&dyn PredicateBlockResolver>, + ) -> Result<Self, DecodeError> { + if depth > 256 || *remaining == 0 { + return Err(DecodeError::Field("block predicate depth or node count")); + } + *remaining -= 1; + let object: Object = serde_json::from_str(json)?; + let kind = identifier(&serde_json::from_str::<String>( + required(&object, "type")?.get(), + )?)?; + match kind.as_str() { + "minecraft:would_survive" => Ok(Self::WouldSurvive { + state: blocks + .ok_or(DecodeError::Field("predicate block state registry"))? + .predicate_state(required(&object, "state")?.get())?, + offset: optional(&object, "offset") + .map(offset) + .transpose()? + .unwrap_or([0; 3]), + }), + "minecraft:has_sturdy_face" => { + let name: String = serde_json::from_str(required(&object, "direction")?.get())?; + let direction = match name.as_str() { + "down" => Direction::Down, + "up" => Direction::Up, + "north" => Direction::North, + "south" => Direction::South, + "west" => Direction::West, + "east" => Direction::East, + _ => return Err(DecodeError::Field("predicate direction")), + }; + Ok(Self::HasSturdyFace { + direction, + offset: optional(&object, "offset") + .map(offset) + .transpose()? + .unwrap_or([0; 3]), + }) + } + + "minecraft:solid" | "minecraft:replaceable" => Ok(Self::Property { + property: blocks + .ok_or(DecodeError::Field("predicate block property registry"))? + .predicate_property(if kind == "minecraft:solid" { + BlockProperty::Solid + } else { + BlockProperty::Replaceable + })?, + offset: optional(&object, "offset") + .map(offset) + .transpose()? + .unwrap_or([0; 3]), + }), + "minecraft:unobstructed" => { + if let Some(raw) = optional(&object, "offset") { + vector(raw)?; + } + // The pinned evaluator deliberately ignores its decoded offset. + Ok(Self::Unobstructed) + } + "minecraft:matching_biomes" => Ok(Self::MatchingBiomes( + blocks + .ok_or(DecodeError::Field("predicate biome registry"))? + .predicate_biome_set(required(&object, "biomes")?.get())?, + )), + "minecraft:matching_fluids" => Ok(Self::MatchingFluids { + fluids: blocks + .ok_or(DecodeError::Field("predicate fluid registry"))? + .predicate_fluid_set(required(&object, "fluids")?.get())?, + offset: optional(&object, "offset") + .map(offset) + .transpose()? + .unwrap_or([0; 3]), + }), + "minecraft:matching_blocks" => Ok(Self::MatchingBlocks { + states: blocks + .ok_or(DecodeError::Field("predicate block registry"))? + .predicate_block_set(required(&object, "blocks")?.get())?, + offset: optional(&object, "offset") + .map(offset) + .transpose()? + .unwrap_or([0; 3]), + }), + "minecraft:matching_block_tag" => Ok(Self::MatchingBlockTag { + tag: super::tags::identifier(&serde_json::from_str::<String>( + required(&object, "tag")?.get(), + )?)?, + offset: optional(&object, "offset") + .map(offset) + .transpose()? + .unwrap_or([0; 3]), + }), + "minecraft:height_range" => Ok(Self::HeightRange { + min: VerticalAnchor::from_json(required(&object, "min_inclusive")?.get())?, + max: VerticalAnchor::from_json(required(&object, "max_inclusive")?.get())?, + }), + "minecraft:volume_match" => { + let min = offset(required(&object, "min")?)?; + let max = offset(required(&object, "max")?)?; + if (0..3).any(|i| min[i] > max[i]) { + return Err(DecodeError::Field("predicate volume bounds")); + } + Ok(Self::Volume { + min, + max, + predicate: Box::new(Self::decode_with_blocks( + required(&object, "match")?.get(), + depth + 1, + remaining, + blocks, + )?), + }) + } + "minecraft:true" => Ok(Self::True), + "minecraft:not" => Ok(Self::Not(Box::new(Self::decode_with_blocks( + required(&object, "predicate")?.get(), + depth + 1, + remaining, + blocks, + )?))), + "minecraft:all_of" | "minecraft:any_of" => { + let values: Vec<Box<RawValue>> = + serde_json::from_str(required(&object, "predicates")?.get())?; + if values.len() > 8192 { + return Err(DecodeError::Field("predicate list")); + } + let values = values + .iter() + .map(|v| Self::decode_with_blocks(v.get(), depth + 1, remaining, blocks)) + .collect::<Result<_, _>>()?; + Ok(if kind == "minecraft:all_of" { + Self::All(values) + } else { + Self::Any(values) + }) + } + "minecraft:inside_world_bounds" => Ok(Self::InsideWorldBounds( + optional(&object, "offset") + .map(offset) + .transpose()? + .unwrap_or([0; 3]), + )), + _ => Err(DecodeError::Field("block predicate type")), + } + } + pub fn test( + &self, + world: &mut impl PlacementContext, + position: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + self.test_inner(world, position, 0, &mut 65536) + } + pub(crate) fn test_inner( + &self, + world: &mut impl PlacementContext, + position: [i32; 3], + depth: usize, + remaining: &mut usize, + ) -> Result<bool, PlacementQueryError> { + if depth > 256 || *remaining == 0 { + return Err(PlacementQueryError::WorkLimit); + } + *remaining -= 1; + match self { + Self::WouldSurvive { state, offset } => world.block_survives( + *state, + std::array::from_fn(|i| position[i].wrapping_add(offset[i])), + ), + Self::Property { property, offset } => { + let state = world + .block_state(std::array::from_fn(|i| position[i].wrapping_add(offset[i])))?; + Ok(property.contains(state)) + } + Self::HasSturdyFace { direction, offset } => world.face_sturdy( + std::array::from_fn(|i| position[i].wrapping_add(offset[i])), + *direction, + ), + Self::Unobstructed => world.unobstructed_block(position), + Self::MatchingBiomes(biomes) => Ok(biomes.contains(&world.biome_identity(position)?)), + Self::MatchingFluids { fluids, offset } => { + let state = world + .block_state(std::array::from_fn(|i| position[i].wrapping_add(offset[i])))?; + Ok(fluids.contains(state)) + } + Self::MatchingBlocks { states, offset } => { + let state = world + .block_state(std::array::from_fn(|i| position[i].wrapping_add(offset[i])))?; + Ok(states.contains(&state)) + } + Self::MatchingBlockTag { tag, offset } => world.block_matches_tag( + std::array::from_fn(|i| position[i].wrapping_add(offset[i])), + tag, + ), + Self::HeightRange { min, max } => { + let context = world.predicate_generation()?; + let min = min.resolve(context); + let max = max.resolve(context); + Ok(position[1] >= min && position[1] <= max) + } + Self::Volume { + min, + max, + predicate, + } => { + // Native order is X, Z, Y. Each child shares the evaluation + // budget, including nested volumes and early-failing queries. + for x in min[0]..=max[0] { + for z in min[2]..=max[2] { + for y in min[1]..=max[1] { + let offset = [x, y, z]; + let p = std::array::from_fn(|i| position[i].wrapping_add(offset[i])); + if !predicate.test_inner(world, p, depth + 1, remaining)? { + return Ok(false); + } + } + } + } + Ok(true) + } + Self::True => Ok(true), + Self::Not(value) => Ok(!value.test_inner(world, position, depth + 1, remaining)?), + Self::All(values) | Self::Any(values) => { + let all = matches!(self, Self::All(_)); + for value in values { + let result = value.test_inner(world, position, depth + 1, remaining)?; + if result != all { + return Ok(result); + } + } + Ok(all) + } + Self::InsideWorldBounds(offset) => world + .inside_build_height(std::array::from_fn(|i| position[i].wrapping_add(offset[i]))), + } + } +} + +fn vector(raw: &RawValue) -> Result<[i32; 3], DecodeError> { + let values: Vec<Box<RawValue>> = serde_json::from_str(raw.get())?; + if values.len() != 3 { + return Err(DecodeError::Field("predicate offset")); + } + let mut result = [0; 3]; + for (out, value) in result.iter_mut().zip(values.iter()) { + *out = integer(value)?; + } + Ok(result) +} + +fn offset(raw: &RawValue) -> Result<[i32; 3], DecodeError> { + let result = vector(raw)?; + // Native Math.abs(MIN_VALUE) wraps and passes this codec. + if result.iter().any(|v| v.wrapping_abs() > 16) { + return Err(DecodeError::Field("predicate offset")); + } + Ok(result) +} diff --git a/crates/horizon-world/src/worldgen/blue_ice.rs b/crates/horizon-world/src/worldgen/blue_ice.rs new file mode 100644 index 000000000..e3b2e3f0c --- /dev/null +++ b/crates/horizon-world/src/worldgen/blue_ice.rs @@ -0,0 +1,156 @@ +//! Packed-ice seeding and 200 ordered blue-ice growth attempts. +use super::{ + DecodeError, + block_feature::FeatureBlockBindings, + block_predicate::PredicateBlockResolver, + feature::FeatureWorld, + placement::{PlacementContext, PlacementQueryError}, +}; +use crate::registry::BlockStateId; +use horizon_core::{ + geometry::Direction, + random::{InvalidBound, RandomSource}, +}; +use std::{collections::BTreeSet, sync::Arc}; +#[derive(Clone, Debug)] +pub struct BlueIceFeature { + water: Arc<BTreeSet<BlockStateId>>, + packed: Arc<BTreeSet<BlockStateId>>, + blue: Arc<BTreeSet<BlockStateId>>, + replaceable: BTreeSet<BlockStateId>, + output: BlockStateId, +} +#[derive(Debug)] +pub enum BlueIceError<E> { + World(E), + Query(PlacementQueryError), + Random(InvalidBound), +} +impl<E: std::fmt::Display> std::fmt::Display for BlueIceError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Query(e) => e.fmt(f), + Self::Random(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for BlueIceError<E> {} +impl BlueIceFeature { + pub fn new(bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + let water = bindings.predicate_block_set(r#""minecraft:water""#)?; + let packed = bindings.predicate_block_set(r#""minecraft:packed_ice""#)?; + let blue = bindings.predicate_block_set(r#""minecraft:blue_ice""#)?; + let mut replaceable: BTreeSet<_> = bindings.air.into_iter().collect(); + replaceable.extend(water.iter().copied()); + replaceable.extend(packed.iter().copied()); + replaceable.extend( + bindings + .predicate_block_set(r#""minecraft:ice""#)? + .iter() + .copied(), + ); + Ok(Self { + water, + packed, + blue, + replaceable, + output: bindings + .registry() + .default_state("minecraft:blue_ice") + .ok_or(DecodeError::Field("blue ice block"))?, + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + ) -> Result<bool, BlueIceError<W::Error>> { + if origin[1] + > world + .sea_level() + .map_err(BlueIceError::Query)? + .wrapping_sub(1) + { + return Ok(false); + } + if !self + .water + .contains(&world.block(origin).map_err(BlueIceError::World)?) + && !self.water.contains( + &world + .block([origin[0], origin[1].wrapping_sub(1), origin[2]]) + .map_err(BlueIceError::World)?, + ) + { + return Ok(false); + } + let mut nearby = false; + for direction in Direction::ALL { + if direction == Direction::Down { + continue; + } + let at = offset(origin, direction.normal()); + if self + .packed + .contains(&world.block(at).map_err(BlueIceError::World)?) + { + nearby = true; + break; + } + } + if !nearby { + return Ok(false); + } + world + .set_block(origin, self.output, 2) + .map_err(BlueIceError::World)?; + for _ in 0..200 { + let dy = random.next_int_bound(5).map_err(BlueIceError::Random)? + - random.next_int_bound(6).map_err(BlueIceError::Random)?; + let mut radius = 3; + if dy < 2 { + radius += dy / 2; + } + if radius < 1 { + continue; + } + let dx = random + .next_int_bound(radius) + .map_err(BlueIceError::Random)? + - random + .next_int_bound(radius) + .map_err(BlueIceError::Random)?; + let dz = random + .next_int_bound(radius) + .map_err(BlueIceError::Random)? + - random + .next_int_bound(radius) + .map_err(BlueIceError::Random)?; + let p = offset(origin, [dx, dy, dz]); + if !self + .replaceable + .contains(&world.block(p).map_err(BlueIceError::World)?) + { + continue; + } + for direction in Direction::ALL { + if self.blue.contains( + &world + .block(offset(p, direction.normal())) + .map_err(BlueIceError::World)?, + ) { + world + .set_block(p, self.output, 2) + .map_err(BlueIceError::World)?; + break; + } + } + } + Ok(true) + } +} +fn offset(p: [i32; 3], d: [i32; 3]) -> [i32; 3] { + std::array::from_fn(|i| p[i].wrapping_add(d[i])) +} diff --git a/crates/horizon-world/src/worldgen/bonus_chest.rs b/crates/horizon-world/src/worldgen/bonus_chest.rs new file mode 100644 index 000000000..ce3d399d0 --- /dev/null +++ b/crates/horizon-world/src/worldgen/bonus_chest.rs @@ -0,0 +1,102 @@ +//! Spawn bonus chest search, loot-table assignment and surrounding torches. +use super::{ + DecodeError, + block_feature::FeatureBlockBindings, + feature::FeatureWorld, + placement::{PlacementContext, PlacementQueryError}, +}; +use crate::{heightmap::HeightmapType, registry::BlockStateId}; +use horizon_core::random::{InvalidBound, RandomSource}; +#[derive(Clone, Debug)] +pub struct BonusChestFeature { + air: [BlockStateId; 3], + chest: BlockStateId, + torch: BlockStateId, +} +#[derive(Debug)] +pub enum BonusChestError<E> { + World(E), + Query(PlacementQueryError), + Random(InvalidBound), +} +impl<E: std::fmt::Display> std::fmt::Display for BonusChestError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Query(e) => e.fmt(f), + Self::Random(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for BonusChestError<E> {} +impl BonusChestFeature { + pub fn new(bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + let get = |name| { + bindings + .registry() + .default_state(name) + .ok_or_else(|| DecodeError::Registry(format!("unknown bonus chest block {name}"))) + }; + Ok(Self { + air: bindings.air, + chest: get("minecraft:chest")?, + torch: get("minecraft:torch")?, + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + ) -> Result<bool, BonusChestError<W::Error>> { + let mut xs: [i32; 16] = std::array::from_fn(|i| (origin[0] & !15).wrapping_add(i as i32)); + let mut zs: [i32; 16] = std::array::from_fn(|i| (origin[2] & !15).wrapping_add(i as i32)); + for values in [&mut xs, &mut zs] { + for end in (2..=16).rev() { + let other = random + .next_int_bound(end as i32) + .map_err(BonusChestError::Random)? as usize; + values.swap(end - 1, other); + } + } + for x in xs { + for z in zs { + let y = world + .height(HeightmapType::MotionBlockingNoLeaves, x, z) + .map_err(BonusChestError::Query)?; + let p = [x, y, z]; + if !self + .air + .contains(&world.block(p).map_err(BonusChestError::World)?) + { + let state = world.block(p).map_err(BonusChestError::World)?; + if !world + .state_collision_empty(state, p) + .map_err(BonusChestError::Query)? + { + continue; + } + } + world + .set_block(p, self.chest, 2) + .map_err(BonusChestError::World)?; + world + .set_block_entity_loot_table(p, "minecraft:chests/spawn_bonus_chest", random) + .map_err(BonusChestError::Query)?; + for [dx, dz] in [[0, -1], [1, 0], [0, 1], [-1, 0]] { + let at = [x.wrapping_add(dx), y, z.wrapping_add(dz)]; + if world + .block_survives(self.torch, at) + .map_err(BonusChestError::Query)? + { + world + .set_block(at, self.torch, 2) + .map_err(BonusChestError::World)?; + } + } + return Ok(true); + } + } + Ok(false) + } +} diff --git a/crates/horizon-world/src/worldgen/bulk_section.rs b/crates/horizon-world/src/worldgen/bulk_section.rs new file mode 100644 index 000000000..9628ac510 --- /dev/null +++ b/crates/horizon-world/src/worldgen/bulk_section.rs @@ -0,0 +1,113 @@ +//! Exclusive bulk access to resident sections, bypassing chunk heightmap writes. +use super::{ + feature_region::{RegionError, TerrainRegion}, + placement::{PlacementContext, PlacementQueryError}, + terrain::{TerrainBlockStates, TerrainError}, +}; +use crate::{heightmap::HeightmapType, registry::BlockStateId}; +use horizon_core::position::{BlockPos, SectionPos}; +use std::collections::BTreeMap; + +pub struct TerrainBulkAccess<'a, 'r, B: TerrainBlockStates> { + region: &'a mut TerrainRegion<'r, B>, + min_section: i32, + section_count: i32, + air: BlockStateId, + acquired: BTreeMap<i64, SectionPos>, + last: Option<(i64, SectionPos)>, +} +impl<'a, 'r, B: TerrainBlockStates> TerrainBulkAccess<'a, 'r, B> { + pub fn new(region: &'a mut TerrainRegion<'r, B>) -> Result<Self, RegionError> { + let first = region.chunks().next().ok_or(RegionError::InvalidChunks)?; + let min_section = first.min_y() >> 4; + let section_count = first.height() / 16; + let air = first + .registry() + .default_state("minecraft:air") + .ok_or(RegionError::InvalidChunks)?; + Ok(Self { + region, + min_section, + section_count, + air, + acquired: BTreeMap::new(), + last: None, + }) + } + fn resolve(&mut self, p: [i32; 3]) -> Result<Option<SectionPos>, RegionError> { + let section = BlockPos::new(p[0], p[1], p[2]).section(); + let index = section.y.wrapping_sub(self.min_section); + if index < 0 || index >= self.section_count { + return Ok(None); + } + let key = section.pack(); + if let Some((last, section)) = self.last { + if last == key { + return Ok(Some(section)); + } + } + let cached = if let Some(cached) = self.acquired.get(&key) { + *cached + } else { + // Missing chunks do not enter the cache. Preserve packed-key aliasing + // at coordinates beyond the signed section-coordinate bit width. + self.region.chunk(section.x, section.z)?; + self.acquired.insert(key, section); + section + }; + self.last = Some((key, cached)); + Ok(Some(cached)) + } + pub fn has_section(&mut self, position: [i32; 3]) -> Result<bool, RegionError> { + Ok(self.resolve(position)?.is_some()) + } + pub fn acquired_section_count(&self) -> usize { + self.acquired.len() + } + /// Direct section reads retain cave/void air in otherwise all-air sections. + /// Positions outside the vertical range return AIR without a chunk lookup. + pub fn block(&mut self, position: [i32; 3]) -> Result<BlockStateId, RegionError> { + let Some(section) = self.resolve(position)? else { + return Ok(self.air); + }; + let index = section.y.wrapping_sub(self.min_section) as usize; + let p = BlockPos::new(position[0], position[1], position[2]); + self.region + .chunk(section.x, section.z)? + .section(index) + .ok_or(RegionError::InvalidChunks)? + .get(p.section_index()) + .map_err(|e| TerrainError::from(e).into()) + } + /// Raw section mutation: no chunk heightmap, POI, light or neighbor effects. + /// The caller is responsible for checking the region's write permissions. + pub fn set_block( + &mut self, + position: [i32; 3], + state: BlockStateId, + ) -> Result<Option<BlockStateId>, RegionError> { + let Some(section) = self.resolve(position)? else { + return Ok(None); + }; + let y = section.y.wrapping_shl(4).wrapping_add(position[1] & 15); + Ok(Some( + self.region.chunk_mut(section.x, section.z)?.set_block_raw( + position[0], + y, + position[2], + state, + )?, + )) + } + pub fn world_block(&self, position: [i32; 3]) -> Result<BlockStateId, RegionError> { + self.region.block(position) + } + pub fn height( + &mut self, + kind: HeightmapType, + x: i32, + z: i32, + ) -> Result<i32, PlacementQueryError> { + self.region.height(kind, x, z) + } +} diff --git a/crates/horizon-world/src/worldgen/carver.rs b/crates/horizon-world/src/worldgen/carver.rs new file mode 100644 index 000000000..6ca5feb3e --- /dev/null +++ b/crates/horizon-world/src/worldgen/carver.rs @@ -0,0 +1,296 @@ +//! Seeded carver paths using pinned scalar providers and shared mask geometry. +mod canyon; +mod generation; +use super::{ + DecodeError, Object, + anchor::WorldGenerationContext, + density::identifier, + height_provider::HeightProvider, + number_text, optional, required, + value_provider::{FloatProvider, IntProvider}, +}; +pub use canyon::{CanyonCarver, CanyonShape}; +pub use generation::{ + CarverCatalog, MaskGenerationError, WorldCarver, generate_carving_mask, large_feature_random, +}; +use horizon_core::{ + carving::{CarveError, CarverOutput, can_reach, carve_ellipsoid_with_budget}, + geometry::trig::{cos, sin}, + position::ChunkPos, + random::{InvalidBound, LegacyRandom, RandomSource}, +}; + +#[derive(Clone, Debug)] +pub struct CaveCarver { + pub probability: f32, + pub y: HeightProvider, + pub count: IntProvider, + pub thickness: FloatProvider, + pub weird_thickness_bias: bool, + pub room_vertical_radius_multiplier: FloatProvider, + pub horizontal_radius_multiplier: FloatProvider, + pub vertical_radius_multiplier: FloatProvider, + pub start_vertical_radius_multiplier: FloatProvider, + pub floor_level: FloatProvider, +} +#[derive(Debug)] +pub enum CarverError<E> { + Random(InvalidBound), + Geometry(CarveError<E>), + IterationLimit, + InvalidBounds, +} +impl<E: std::fmt::Display> std::fmt::Display for CarverError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Random(e) => e.fmt(f), + Self::Geometry(e) => e.fmt(f), + Self::IterationLimit => f.write_str("carver work limit exceeded"), + Self::InvalidBounds => f.write_str("carver output or generation bounds are invalid"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for CarverError<E> {} +impl<E> From<InvalidBound> for CarverError<E> { + fn from(e: InvalidBound) -> Self { + Self::Random(e) + } +} +impl<E> From<CarveError<E>> for CarverError<E> { + fn from(e: CarveError<E>) -> Self { + Self::Geometry(e) + } +} +impl CaveCarver { + pub fn from_json(json: &str) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let kind = identifier(&serde_json::from_str::<String>( + required(&object, "type")?.get(), + )?)?; + if kind != "minecraft:cave" { + return Err(DecodeError::Field("cave carver type")); + } + let probability: f32 = number_text(required(&object, "probability")?)? + .parse() + .map_err(|_| DecodeError::Field("carver probability"))?; + if !(0.0..=1.0).contains(&probability) || probability.is_sign_negative() { + return Err(DecodeError::Field("carver probability")); + } + let count = IntProvider::from_json(required(&object, "count")?.get())?; + if count.bounds()[0] < 0 { + return Err(DecodeError::Field("carver count")); + } + let provider = |name| FloatProvider::from_json(required(&object, name)?.get()); + let thickness = provider("thickness")?; + if thickness.bounds()[0] < 0. { + return Err(DecodeError::Field("carver thickness")); + } + let floor_level = provider("floor_level")?; + if floor_level.bounds()[0] < -1. || floor_level.bounds()[1] > 1. { + return Err(DecodeError::Field("carver floor")); + } + Ok(Self { + probability, + y: HeightProvider::from_json(required(&object, "y")?.get())?, + count, + thickness, + weird_thickness_bias: optional(&object, "weird_thickness_bias") + .map(|v| serde_json::from_str(v.get())) + .transpose()? + .unwrap_or(false), + room_vertical_radius_multiplier: provider("room_vertical_radius_multiplier")?, + horizontal_radius_multiplier: provider("horizontal_radius_multiplier")?, + vertical_radius_multiplier: provider("vertical_radius_multiplier")?, + start_vertical_radius_multiplier: optional(&object, "start_vertical_radius_multiplier") + .map(|v| FloatProvider::from_json(v.get())) + .transpose()? + .unwrap_or(FloatProvider::Constant(1.)), + floor_level, + }) + } + pub fn is_start_chunk(&self, random: &mut impl RandomSource) -> bool { + random.next_float() <= self.probability + } + /// Carve one origin chunk's paths into the target output. The caller performs + /// start-chunk selection separately. Local tunnel RNGs always use the legacy + /// algorithm, regardless of the caller's RNG. At most 4096 starts and 2^24 + /// candidate cells are allowed; errors preserve random draws and prior output. + pub fn carve<O: CarverOutput>( + &self, + context: WorldGenerationContext, + random: &mut impl RandomSource, + target: ChunkPos, + origin: ChunkPos, + output: &mut O, + ) -> Result<bool, CarverError<O::Error>> { + let count = self.count.sample(random)?; + if count > 4096 { + return Err(CarverError::IterationLimit); + } + let mut budget = 1 << 24; + for _ in 0..count { + let x = f64::from( + origin + .x + .wrapping_shl(4) + .wrapping_add(random.next_int_bound(16)?), + ); + let y = f64::from(self.y.sample(random, context)?); + let z = f64::from( + origin + .z + .wrapping_shl(4) + .wrapping_add(random.next_int_bound(16)?), + ); + let horizontal = f64::from(self.horizontal_radius_multiplier.sample(random)); + let vertical = f64::from(self.vertical_radius_multiplier.sample(random)); + let start_vertical = f64::from(self.start_vertical_radius_multiplier.sample(random)); + let floor = f64::from(self.floor_level.sample(random)); + let mut run = CaveRun { + target, + output, + budget: &mut budget, + horizontal, + vertical, + floor, + }; + let mut tunnels = 1; + if random.next_int_bound(4)? == 0 { + let multiplier = f64::from(self.room_vertical_radius_multiplier.sample(random)); + let thickness = 1. + random.next_float() * 6.; + let radius = + 1.5 + f64::from(sin(f64::from(std::f32::consts::FRAC_PI_2)) * thickness); + run.ellipsoid([x + 1., y, z], radius, radius * multiplier)?; + tunnels += random.next_int_bound(4)?; + } + for _ in 0..tunnels { + let yaw = random.next_float() * std::f32::consts::TAU; + let pitch = (random.next_float() - 0.5) / 4.; + let mut thickness = self.thickness.sample(random); + if self.weird_thickness_bias && random.next_int_bound(10)? == 0 { + thickness *= random.next_float() * random.next_float() * 3. + 1.; + } + let end = 112 - random.next_int_bound(28)?; + run.tunnel(Tunnel { + seed: random.next_long(), + position: [x, y, z], + thickness, + yaw, + pitch, + start: 0, + end, + vertical_scale: start_vertical, + })?; + } + } + Ok(true) + } +} +struct CaveRun<'a, O: CarverOutput> { + target: ChunkPos, + output: &'a mut O, + budget: &'a mut usize, + horizontal: f64, + vertical: f64, + floor: f64, +} +#[derive(Clone, Copy)] +struct Tunnel { + seed: i64, + position: [f64; 3], + thickness: f32, + yaw: f32, + pitch: f32, + start: i32, + end: i32, + vertical_scale: f64, +} +impl<O: CarverOutput> CaveRun<'_, O> { + fn ellipsoid( + &mut self, + position: [f64; 3], + horizontal: f64, + vertical: f64, + ) -> Result<(), CarverError<O::Error>> { + let floor = self.floor; + Ok(carve_ellipsoid_with_budget( + self.target, + position, + horizontal, + vertical, + self.output, + |[x, y, z], _| y <= floor || x * x + y * y + z * z >= 1., + self.budget, + )?) + } + fn tunnel(&mut self, mut path: Tunnel) -> Result<(), CarverError<O::Error>> { + let mut random = LegacyRandom::new(path.seed); + let split = random.next_int_bound(path.end / 2)? + path.end / 4; + let gentle = random.next_int_bound(6)? == 0; + let (mut yaw_change, mut pitch_change) = (0f32, 0f32); + for step in path.start..path.end { + let radius = 1.5 + + f64::from( + sin(f64::from( + std::f32::consts::PI * step as f32 / path.end as f32, + )) * path.thickness, + ); + let vertical = radius * path.vertical_scale; + let cos_pitch = cos(f64::from(path.pitch)); + path.position[0] += f64::from(cos(f64::from(path.yaw)) * cos_pitch); + path.position[1] += f64::from(sin(f64::from(path.pitch))); + path.position[2] += f64::from(sin(f64::from(path.yaw)) * cos_pitch); + path.pitch *= if gentle { 0.92 } else { 0.7 }; + path.pitch += pitch_change * 0.1; + path.yaw += yaw_change * 0.1; + pitch_change *= 0.9; + yaw_change *= 0.75; + pitch_change += (random.next_float() - random.next_float()) * random.next_float() * 2.; + yaw_change += (random.next_float() - random.next_float()) * random.next_float() * 4.; + if step == split && path.thickness > 1. { + let seed = random.next_long(); + let thickness = random.next_float() * 0.5 + 0.5; + self.tunnel(Tunnel { + seed, + thickness, + yaw: path.yaw - std::f32::consts::FRAC_PI_2, + pitch: path.pitch / 3., + start: step, + vertical_scale: 1., + ..path + })?; + let seed = random.next_long(); + let thickness = random.next_float() * 0.5 + 0.5; + self.tunnel(Tunnel { + seed, + thickness, + yaw: path.yaw + std::f32::consts::FRAC_PI_2, + pitch: path.pitch / 3., + start: step, + vertical_scale: 1., + ..path + })?; + return Ok(()); + } + if random.next_int_bound(4)? == 0 { + continue; + } + if !can_reach( + self.target, + path.position[0], + path.position[2], + step, + path.end, + path.thickness, + ) { + return Ok(()); + } + self.ellipsoid( + path.position, + radius * self.horizontal, + vertical * self.vertical, + )?; + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/worldgen/carver/canyon.rs b/crates/horizon-world/src/worldgen/carver/canyon.rs new file mode 100644 index 000000000..33f745f54 --- /dev/null +++ b/crates/horizon-world/src/worldgen/carver/canyon.rs @@ -0,0 +1,161 @@ +use super::*; +use crate::worldgen::int_range; + +#[derive(Clone, Debug)] +pub struct CanyonShape { + pub distance_factor: FloatProvider, + pub thickness: FloatProvider, + pub width_smoothness: i32, + pub horizontal_radius_factor: FloatProvider, + pub vertical_radius_default_factor: f32, + pub vertical_radius_center_factor: f32, + pub y_scale: FloatProvider, +} +#[derive(Clone, Debug)] +pub struct CanyonCarver { + pub probability: f32, + pub y: HeightProvider, + pub vertical_rotation: FloatProvider, + pub shape: CanyonShape, +} +impl CanyonCarver { + pub fn from_json(json: &str) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let kind = identifier(&serde_json::from_str::<String>( + required(&object, "type")?.get(), + )?)?; + if kind != "minecraft:canyon" { + return Err(DecodeError::Field("canyon carver type")); + } + let probability = scalar(&object, "probability")?; + if !(0.0..=1.0).contains(&probability) || probability.is_sign_negative() { + return Err(DecodeError::Field("carver probability")); + } + let shape: Object = serde_json::from_str(required(&object, "shape")?.get())?; + let provider = |name| FloatProvider::from_json(required(&shape, name)?.get()); + Ok(Self { + probability, + y: HeightProvider::from_json(required(&object, "y")?.get())?, + vertical_rotation: FloatProvider::from_json( + required(&object, "vertical_rotation")?.get(), + )?, + shape: CanyonShape { + distance_factor: provider("distance_factor")?, + thickness: provider("thickness")?, + width_smoothness: int_range( + required(&shape, "width_smoothness")?, + "width_smoothness", + 1, + i32::MAX, + )?, + horizontal_radius_factor: provider("horizontal_radius_factor")?, + vertical_radius_default_factor: scalar(&shape, "vertical_radius_default_factor")?, + vertical_radius_center_factor: scalar(&shape, "vertical_radius_center_factor")?, + y_scale: provider("y_scale")?, + }, + }) + } + pub fn is_start_chunk(&self, random: &mut impl RandomSource) -> bool { + random.next_float() <= self.probability + } + /// Generate a canyon from one origin chunk. Width factors cover the entire + /// generation height and use a separate legacy random stream. Output bounds + /// must lie within that height; paths are bounded to 4096 steps, 4064 width + /// entries and 2^24 candidate cells. Earlier output survives errors. + pub fn carve<O: CarverOutput>( + &self, + context: WorldGenerationContext, + random: &mut impl RandomSource, + target: ChunkPos, + origin: ChunkPos, + output: &mut O, + ) -> Result<bool, CarverError<O::Error>> { + let mut x = f64::from( + origin + .x + .wrapping_shl(4) + .wrapping_add(random.next_int_bound(16)?), + ); + let mut y = f64::from(self.y.sample(random, context)?); + let mut z = f64::from( + origin + .z + .wrapping_shl(4) + .wrapping_add(random.next_int_bound(16)?), + ); + let mut yaw = random.next_float() * std::f32::consts::TAU; + let mut pitch = self.vertical_rotation.sample(random); + let y_scale = f64::from(self.shape.y_scale.sample(random)); + let thickness = self.shape.thickness.sample(random); + let end = (112f32 * self.shape.distance_factor.sample(random)) as i32; + let mut local = LegacyRandom::new(random.next_long()); + if !(1..=4064).contains(&context.height) + || output.min_y() < context.min_y + || i64::from(output.max_y()) > i64::from(context.min_y) + i64::from(context.height) + { + return Err(CarverError::InvalidBounds); + } + if end > 4096 { + return Err(CarverError::IterationLimit); + } + let mut width = Vec::with_capacity(context.height as usize); + let mut factor = 1f32; + for index in 0..context.height { + if index == 0 || local.next_int_bound(self.shape.width_smoothness)? == 0 { + factor = 1. + local.next_float() * local.next_float(); + } + width.push(factor * factor); + } + let (mut yaw_change, mut pitch_change) = (0f32, 0f32); + let mut budget = 1 << 24; + for step in 0..end { + let mut horizontal = 1.5 + + f64::from( + sin(f64::from(step as f32 * std::f32::consts::PI / end as f32)) * thickness, + ); + let mut vertical = horizontal * y_scale; + horizontal *= f64::from(self.shape.horizontal_radius_factor.sample(&mut local)); + let center = 1. - (0.5 - step as f32 / end as f32).abs() * 2.; + let multiplier = self.shape.vertical_radius_default_factor + + self.shape.vertical_radius_center_factor * center; + vertical = (f64::from(multiplier) * vertical) + * f64::from(local.next_float() * (1. - 0.75) + 0.75); + let cos_pitch = cos(f64::from(pitch)); + let sin_pitch = sin(f64::from(pitch)); + x += f64::from(cos(f64::from(yaw)) * cos_pitch); + y += f64::from(sin_pitch); + z += f64::from(sin(f64::from(yaw)) * cos_pitch); + pitch *= 0.7; + pitch += pitch_change * 0.05; + yaw += yaw_change * 0.05; + pitch_change *= 0.8; + yaw_change *= 0.5; + pitch_change += (local.next_float() - local.next_float()) * local.next_float() * 2.; + yaw_change += (local.next_float() - local.next_float()) * local.next_float() * 4.; + if local.next_int_bound(4)? == 0 { + continue; + } + if !can_reach(target, x, z, step, end, thickness) { + return Ok(true); + } + carve_ellipsoid_with_budget( + target, + [x, y, z], + horizontal, + vertical, + output, + |[nx, ny, nz], by| { + let factor = width[by.wrapping_sub(context.min_y).wrapping_sub(1) as usize]; + (nx * nx + nz * nz) * f64::from(factor) + ny * ny / 6. >= 1. + }, + &mut budget, + )?; + } + Ok(true) + } +} +fn scalar(object: &Object, name: &'static str) -> Result<f32, DecodeError> { + number_text(required(object, name)?)? + .parse() + .map_err(|_| DecodeError::Field(name)) +} diff --git a/crates/horizon-world/src/worldgen/carver/generation.rs b/crates/horizon-world/src/worldgen/carver/generation.rs new file mode 100644 index 000000000..40cd5cfd3 --- /dev/null +++ b/crates/horizon-world/src/worldgen/carver/generation.rs @@ -0,0 +1,167 @@ +//! Biome-selected neighboring carvers and their per-entry legacy seeds. +use super::{CanyonCarver, CarverError, CaveCarver}; +use crate::worldgen::{ + DecodeError, Object, anchor::WorldGenerationContext, density::identifier, required, +}; +use horizon_core::{ + carving::{CarverOutput, CarvingMask, CarvingMaskError}, + position::ChunkPos, + random::{LegacyRandom, RandomSource}, +}; +use std::{collections::BTreeMap, sync::Arc}; + +#[derive(Clone, Debug)] +pub enum WorldCarver { + Cave(CaveCarver), + Canyon(CanyonCarver), +} +impl WorldCarver { + pub fn from_json(json: &str) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + match identifier(&serde_json::from_str::<String>( + required(&object, "type")?.get(), + )?)? + .as_str() + { + "minecraft:cave" => Ok(Self::Cave(CaveCarver::from_json(json)?)), + "minecraft:canyon" => Ok(Self::Canyon(CanyonCarver::from_json(json)?)), + _ => Err(DecodeError::Field("world carver type")), + } + } + pub fn is_start_chunk(&self, random: &mut impl RandomSource) -> bool { + match self { + Self::Cave(c) => c.is_start_chunk(random), + Self::Canyon(c) => c.is_start_chunk(random), + } + } + pub fn carve<O: CarverOutput>( + &self, + context: WorldGenerationContext, + random: &mut impl RandomSource, + target: ChunkPos, + origin: ChunkPos, + output: &mut O, + ) -> Result<bool, CarverError<O::Error>> { + match self { + Self::Cave(c) => c.carve(context, random, target, origin, output), + Self::Canyon(c) => c.carve(context, random, target, origin, output), + } + } +} +/// Immutable named carvers. Inline definitions and direct holder lists are +/// supported; tagged sets and live registry reloads remain separate work. +pub struct CarverCatalog { + definitions: BTreeMap<String, Arc<WorldCarver>>, +} +impl CarverCatalog { + pub fn from_json(definitions: &BTreeMap<String, String>) -> Result<Self, DecodeError> { + if definitions.len() > 8192 { + return Err(DecodeError::Field("carver registry size")); + } + let mut result = BTreeMap::new(); + for (name, json) in definitions { + let name = identifier(name)?; + if result + .insert(name, Arc::new(WorldCarver::from_json(json)?)) + .is_some() + { + return Err(DecodeError::Field("duplicate carver name")); + } + } + Ok(Self { + definitions: result, + }) + } + pub fn decode_set(&self, json: &str) -> Result<Vec<Arc<WorldCarver>>, DecodeError> { + use serde_json::value::RawValue; + let raw: Box<RawValue> = serde_json::from_str(json)?; + let entries: Vec<Box<RawValue>> = if raw.get().starts_with('[') { + serde_json::from_str(raw.get())? + } else { + vec![raw] + }; + if entries.len() > 1024 { + return Err(DecodeError::Field("biome carver count")); + } + entries + .iter() + .map(|raw| { + if let Ok(name) = serde_json::from_str::<String>(raw.get()) { + let name = identifier(&name)?; + self.definitions + .get(&name) + .cloned() + .ok_or_else(|| DecodeError::Registry(format!("unknown carver {name}"))) + } else { + Ok(Arc::new(WorldCarver::from_json(raw.get())?)) + } + }) + .collect() + } +} +#[derive(Debug)] +pub enum MaskGenerationError<E> { + Source(E), + Mask(CarvingMaskError), + Carver(CarverError<CarvingMaskError>), + TooManyCarvers, +} +impl<E: std::fmt::Display> std::fmt::Display for MaskGenerationError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Source(e) => e.fmt(f), + Self::Mask(e) => e.fmt(f), + Self::Carver(e) => e.fmt(f), + Self::TooManyCarvers => f.write_str("biome carver count exceeds 1024"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for MaskGenerationError<E> {} + +/// Build the union mask from a 17×17 origin neighborhood, X then Z. The provider +/// selects each origin's ordered biome carvers using its uncached biome resolver +/// at the origin's minimum quart X/Z and quart Y=0. Repeated entries keep their +/// individual ordinal seeds. The caller applies a successfully returned mask. +pub fn generate_carving_mask<'a, E>( + world_seed: i64, + target: ChunkPos, + context: WorldGenerationContext, + upgrading: bool, + mut carvers: impl FnMut(ChunkPos) -> Result<&'a [Arc<WorldCarver>], E>, +) -> Result<CarvingMask, MaskGenerationError<E>> { + let min = context.min_y.wrapping_add(1); + let max = context + .min_y + .wrapping_add(context.height) + .wrapping_sub(1) + .wrapping_sub(if upgrading { 0 } else { 7 }); + let mut mask = CarvingMask::new(min, max).map_err(MaskGenerationError::Mask)?; + for dx in -8..=8 { + for dz in -8..=8 { + let origin = ChunkPos::new(target.x.wrapping_add(dx), target.z.wrapping_add(dz)); + let selected = carvers(origin).map_err(MaskGenerationError::Source)?; + if selected.len() > 1024 { + return Err(MaskGenerationError::TooManyCarvers); + } + for (index, carver) in selected.iter().enumerate() { + let mut random = + large_feature_random(world_seed.wrapping_add(index as i64), origin); + if carver.is_start_chunk(&mut random) { + carver + .carve(context, &mut random, target, origin, &mut mask) + .map_err(MaskGenerationError::Carver)?; + } + } + } + } + Ok(mask) +} +/// The legacy `WorldgenRandom.setLargeFeatureSeed` stream used by carving. +pub fn large_feature_random(seed: i64, origin: ChunkPos) -> LegacyRandom { + let mut random = LegacyRandom::new(seed); + let x = random.next_long(); + let z = random.next_long(); + random + .set_seed(i64::from(origin.x).wrapping_mul(x) ^ i64::from(origin.z).wrapping_mul(z) ^ seed); + random +} diff --git a/crates/horizon-world/src/worldgen/carving.rs b/crates/horizon-world/src/worldgen/carving.rs new file mode 100644 index 000000000..bb19df9d3 --- /dev/null +++ b/crates/horizon-world/src/worldgen/carving.rs @@ -0,0 +1,122 @@ +//! Apply ordered carving-mask intervals to pre-lighting terrain. +use super::{ + material_condition::{MaterialRule, MaterialSurfaceQueries}, + material_stage::{SurfaceError, TopMaterialInputs, top_material}, + terrain::{TerrainAquifer, TerrainBlockStates, TerrainChunk, TerrainError}, +}; +use crate::{ + heightmap::HeightmapState, + registry::{BlockRegistry, BlockStateId}, +}; +use horizon_core::{carving::CarvingMask, position::BlockPos, random::RandomSource}; +use std::collections::BTreeSet; + +/// Per-state predicates resolved once from the world's block registry and +/// `minecraft:uncarvable` tag. Keep these bound to the same registry as the chunk. +pub struct CarvingBlocks { + flags: Vec<u8>, +} +impl CarvingBlocks { + pub fn from_registry( + registry: &BlockRegistry, + uncarvable: &BTreeSet<String>, + ) -> Result<Self, TerrainError> { + for name in uncarvable.iter().map(String::as_str).chain([ + "minecraft:grass_block", + "minecraft:mycelium", + "minecraft:dirt", + ]) { + if registry.default_state(name).is_none() { + return Err(TerrainError::InvalidState); + } + } + let flags = (0..registry.len()) + .map(|index| { + let name = ®istry.state(BlockStateId(index as u32)).unwrap().name; + u8::from(uncarvable.contains(name)) + | (u8::from(matches!( + name.as_str(), + "minecraft:grass_block" | "minecraft:mycelium" + )) << 1) + | (u8::from(name == "minecraft:dirt") << 2) + }) + .collect(); + Ok(Self { flags }) + } + fn flags(&self, state: BlockStateId) -> Result<u8, TerrainError> { + self.flags + .get(state.0 as usize) + .copied() + .ok_or(TerrainError::InvalidState) + } +} + +/// Visit mask runs in packed order and each interval top to bottom. The filter +/// receives local X/Z and absolute Y before any block or aquifer lookup. A run +/// remembers grass/mycelium even if its aquifer returns no replacement. Exposed +/// dirt below subsequent carved cells is restored through `top_material`. +/// Earlier writes, aquifer state and fluid postprocessing survive later errors. +pub fn apply_carving_mask<R: RandomSource, S: MaterialSurfaceQueries, B: TerrainBlockStates>( + chunk: &mut TerrainChunk<'_, B>, + mask: &CarvingMask, + rule: MaterialRule, + mut inputs: TopMaterialInputs<'_, R, S>, + aquifer: &mut (impl TerrainAquifer + ?Sized), + blocks: &CarvingBlocks, + mut filter: impl FnMut([i32; 3]) -> bool, +) -> Result<(), SurfaceError> +where + R::Positional: Clone, +{ + let cx = chunk.position().x.wrapping_shl(4); + let cz = chunk.position().z.wrapping_shl(4); + for column in mask.columns() { + let mut found_surface = false; + let x = cx.wrapping_add(column.x); + let z = cz.wrapping_add(column.z); + for y in (column.min_y..=column.max_y).rev() { + if !filter([column.x, y, column.z]) { + continue; + } + let flags = blocks.flags(chunk.block(x, y, z))?; + if flags & 1 != 0 { + continue; + } + found_surface |= flags & 2 != 0; + let Some(state) = aquifer + .compute_substance(inputs.density_context, [x, y, z], 0.) + .map_err(TerrainError::from)? + else { + continue; + }; + chunk.set_block_worldgen(x, y, z, state)?; + if aquifer.should_schedule_fluid_update() && chunk.block_properties(state).has_fluid() { + chunk.mark_postprocessing(x, y, z); + } + let below = y.wrapping_sub(1); + if found_surface && blocks.flags(chunk.block(x, below, z))? & 4 != 0 { + let submerged = chunk.block_properties(state).has_fluid(); + let replacement = top_material( + chunk, + rule.clone(), + TopMaterialInputs::<R, _> { + generation: inputs.generation, + root: inputs.root.clone(), + surface: &mut inputs.surface, + preliminary_surface: inputs.preliminary_surface.clone(), + density_context: inputs.density_context, + }, + BlockPos::new(x, below, z), + submerged, + )?; + if let Some(replacement) = replacement { + chunk.set_block_worldgen(x, below, z, replacement)?; + if chunk.block_properties(replacement).has_fluid() { + chunk.mark_postprocessing(x, below, z); + } + } + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/src/worldgen/cave.rs b/crates/horizon-world/src/worldgen/cave.rs new file mode 100644 index 000000000..18b06f9da --- /dev/null +++ b/crates/horizon-world/src/worldgen/cave.rs @@ -0,0 +1,700 @@ +//! Underground structures expressed as features: lakes, monster rooms +//! (dungeons) and geodes. +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + block_predicate::BlockPredicate, + double_range, + feature::FeatureWorld, + feature_graph::FeatureExecutionError, + int_range, optional, + placement::{PlacementContext, PlacementQueryError}, + required, + state_provider::BlockStateProvider, + tree::{TreeDecoder, TreeResult, kind, read, sample_state, write}, + tree_blocks::{self as tb, TreeBlocks}, + value_provider::IntProvider, +}; +use crate::registry::BlockStateId; +use horizon_core::{ + geometry::Direction, + noise::{Noise, NormalNoise}, + random::{LegacyRandom, RandomSource}, +}; +use std::{collections::BTreeSet, sync::Arc}; + +fn query<E>(error: PlacementQueryError) -> FeatureExecutionError<E> { + FeatureExecutionError::Query(error) +} +fn state<E>(blocks: &TreeBlocks, name: &str) -> TreeResult<BlockStateId, E> { + blocks + .default_state(name) + .ok_or(FeatureExecutionError::InvalidState) +} +/// Feature.safeSetBlock. +fn safe_set<W: FeatureWorld>( + world: &mut W, + p: [i32; 3], + value: BlockStateId, + cannot_replace: impl Fn(BlockStateId) -> bool, +) -> TreeResult<(), W::Error> { + if !cannot_replace(read(world, p)?) { + write(world, p, value, 2)?; + } + Ok(()) +} +/// Feature.markAboveForPostProcessing. +fn mark_above<W: FeatureWorld + PlacementContext>( + world: &mut W, + blocks: &TreeBlocks, + p: [i32; 3], +) -> TreeResult<(), W::Error> { + let mut above = p; + for _ in 0..2 { + above = tb::offset(above, 0, 1, 0); + if blocks.is_air(read(world, above)?) { + return Ok(()); + } + world.mark_postprocessing(above).map_err(query)?; + } + Ok(()) +} + +#[derive(Clone, Debug)] +pub struct LakeFeature { + fluid: BlockStateProvider, + barrier: BlockStateProvider, + can_place: BlockPredicate, + can_replace_air_or_fluid: BlockPredicate, + can_replace_barrier: BlockPredicate, + blocks: Arc<TreeBlocks>, +} +impl LakeFeature { + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + if kind(&object)? != "minecraft:lake" { + return Err(DecodeError::Field("lake type")); + } + let blocks = bindings.tree_blocks()?; + let mut decoder = TreeDecoder { + bindings, + depth, + remaining, + }; + let fluid = decoder.provider(required(&object, "fluid")?)?; + let barrier = decoder.provider(required(&object, "barrier")?)?; + let mut predicate = |name: &'static str| { + BlockPredicate::decode_with_blocks( + required(&object, name)?.get(), + depth + 1, + decoder.remaining, + Some(bindings), + ) + }; + Ok(Self { + fluid, + barrier, + can_place: predicate("can_place_feature")?, + can_replace_air_or_fluid: predicate("can_replace_with_air_or_fluid")?, + can_replace_barrier: predicate("can_replace_with_barrier")?, + blocks, + }) + } + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + ) -> TreeResult<bool, W::Error> { + if origin[1] <= world.min_y().map_err(query)?.wrapping_add(4) { + return Ok(false); + } + let origin = tb::offset(origin, -8, -4, -8); + let mut grid = [false; 2048]; + let spots = random.next_int_bound(4)? + 4; + for _ in 0..spots { + let xr = random.next_double() * 6.0 + 3.0; + let yr = random.next_double() * 4.0 + 2.0; + let zr = random.next_double() * 6.0 + 3.0; + let xp = random.next_double() * (16.0 - xr - 2.0) + 1.0 + xr / 2.0; + let yp = random.next_double() * (8.0 - yr - 4.0) + 2.0 + yr / 2.0; + let zp = random.next_double() * (16.0 - zr - 2.0) + 1.0 + zr / 2.0; + for xx in 1..15 { + for zz in 1..15 { + for yy in 1..7 { + let xd = (f64::from(xx) - xp) / (xr / 2.0); + let yd = (f64::from(yy) - yp) / (yr / 2.0); + let zd = (f64::from(zz) - zp) / (zr / 2.0); + if xd * xd + yd * yd + zd * zd < 1.0 { + grid[((xx * 16 + zz) * 8 + yy) as usize] = true; + } + } + } + } + } + let at = |x: i32, y: i32, z: i32| grid[((x * 16 + z) * 8 + y) as usize]; + let edge = |x: i32, y: i32, z: i32| { + !at(x, y, z) + && ((x < 15 && at(x + 1, y, z)) + || (x > 0 && at(x - 1, y, z)) + || (z < 15 && at(x, y, z + 1)) + || (z > 0 && at(x, y, z - 1)) + || (y < 7 && at(x, y + 1, z)) + || (y > 0 && at(x, y - 1, z))) + }; + let fluid = sample_state(&self.fluid, world, random, origin)?; + for xx in 0..16 { + for zz in 0..16 { + for yy in 0..8 { + if edge(xx, yy, zz) { + let p = tb::offset(origin, xx, yy, zz); + let state = read(world, p)?; + if yy >= 4 && self.blocks.has(state, tb::LIQUID) { + return Ok(false); + } + if yy < 4 && !self.blocks.has(state, tb::SOLID) && state != fluid { + return Ok(false); + } + if !self.can_place.test(world, p).map_err(query)? { + return Ok(false); + } + } + } + } + } + let cave_air = state(&self.blocks, "minecraft:cave_air")?; + for xx in 0..16 { + for zz in 0..16 { + for yy in 0..8 { + if at(xx, yy, zz) { + let p = tb::offset(origin, xx, yy, zz); + if self + .can_replace_air_or_fluid + .test(world, p) + .map_err(query)? + { + let air = yy >= 4; + write(world, p, if air { cave_air } else { fluid }, 2)?; + if air { + world.schedule_block_tick(p, cave_air, 0).map_err(query)?; + mark_above(world, &self.blocks, p)?; + } + } + } + } + } + } + let barrier = sample_state(&self.barrier, world, random, origin)?; + if !self.blocks.is_air(barrier) { + for xx in 0..16 { + for zz in 0..16 { + for yy in 0..8 { + if edge(xx, yy, zz) && (yy < 4 || random.next_int_bound(2)? != 0) { + let p = tb::offset(origin, xx, yy, zz); + let state = read(world, p)?; + if self.blocks.has(state, tb::SOLID) + && self.can_replace_barrier.test(world, p).map_err(query)? + { + write(world, p, barrier, 2)?; + mark_above(world, &self.blocks, p)?; + } + } + } + } + } + } + if self.blocks.has(fluid, tb::WATER_FLUID) { + let ice = state(&self.blocks, "minecraft:ice")?; + for xx in 0..16 { + for zz in 0..16 { + let p = tb::offset(origin, xx, 4, zz); + let biome = world.biome_identity(p).map_err(query)?; + if world.biome_should_freeze(biome, p, false).map_err(query)? + && self + .can_replace_air_or_fluid + .test(world, p) + .map_err(query)? + { + write(world, p, ice, 2)?; + } + } + } + } + Ok(true) + } +} + +const DUNGEON_MOBS: [&str; 4] = [ + "minecraft:skeleton", + "minecraft:zombie", + "minecraft:zombie", + "minecraft:spider", +]; +#[derive(Clone, Debug)] +pub struct MonsterRoomFeature { + blocks: Arc<TreeBlocks>, +} +impl MonsterRoomFeature { + pub(crate) fn new(bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + Ok(Self { + blocks: bindings.tree_blocks()?, + }) + } + fn solid<W: FeatureWorld>(&self, world: &mut W, p: [i32; 3]) -> TreeResult<bool, W::Error> { + Ok(self.blocks.has(read(world, p)?, tb::SOLID)) + } + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let blocks = &*self.blocks; + let cannot = |s: BlockStateId| blocks.has(s, tb::FEATURES_CANNOT_REPLACE); + let xr = random.next_int_bound(2)? + 2; + let (min_x, max_x) = (-xr - 1, xr + 1); + let zr = random.next_int_bound(2)? + 2; + let (min_z, max_z) = (-zr - 1, zr + 1); + let mut holes = 0; + for dx in min_x..=max_x { + for dy in -1..=4 { + for dz in min_z..=max_z { + let p = tb::offset(origin, dx, dy, dz); + let solid = self.solid(world, p)?; + if (dy == -1 || dy == 4) && !solid { + return Ok(false); + } + if (dx == min_x || dx == max_x || dz == min_z || dz == max_z) + && dy == 0 + && blocks.is_air(read(world, p)?) + && blocks.is_air(read(world, tb::offset(p, 0, 1, 0))?) + { + holes += 1; + } + } + } + } + if !(1..=5).contains(&holes) { + return Ok(false); + } + let cave_air = state(blocks, "minecraft:cave_air")?; + let cobble = state(blocks, "minecraft:cobblestone")?; + let mossy = state(blocks, "minecraft:mossy_cobblestone")?; + let min_y = world.min_y().map_err(query)?; + for dx in min_x..=max_x { + for dy in (-1..=3).rev() { + for dz in min_z..=max_z { + let p = tb::offset(origin, dx, dy, dz); + let wall = read(world, p)?; + if dx == min_x + || dy == -1 + || dz == min_z + || dx == max_x + || dy == 4 + || dz == max_z + { + if p[1] >= min_y && !self.solid(world, tb::offset(p, 0, -1, 0))? { + write(world, p, cave_air, 2)?; + } else if blocks.has(wall, tb::SOLID) && !blocks.has(wall, tb::CHEST) { + let value = if dy == -1 && random.next_int_bound(4)? != 0 { + mossy + } else { + cobble + }; + safe_set(world, p, value, cannot)?; + } + } else if !blocks.has(wall, tb::CHEST | tb::SPAWNER) { + safe_set(world, p, cave_air, cannot)?; + } + } + } + } + let chest = state(blocks, "minecraft:chest")?; + for _ in 0..2 { + for _ in 0..3 { + let x = origin[0] + .wrapping_add(random.next_int_bound(xr * 2 + 1)?) + .wrapping_sub(xr); + let z = origin[2] + .wrapping_add(random.next_int_bound(zr * 2 + 1)?) + .wrapping_sub(zr); + let p = [x, origin[1], z]; + if !blocks.is_air(read(world, p)?) { + continue; + } + let mut walls = 0; + for direction in tb::HORIZONTAL { + if self.solid(world, tb::relative(p, direction, 1))? { + walls += 1; + } + } + if walls == 1 { + let oriented = self.reorient(world, p, chest)?; + safe_set(world, p, oriented, cannot)?; + world + .set_block_entity_loot_table(p, "minecraft:chests/simple_dungeon", random) + .map_err(query)?; + break; + } + } + } + let spawner = state(blocks, "minecraft:spawner")?; + safe_set(world, origin, spawner, cannot)?; + if read(world, origin)? == spawner { + let mob = DUNGEON_MOBS[random.next_int_bound(4)? as usize]; + world.configure_spawner(origin, mob).map_err(query)?; + } + Ok(true) + } + /// StructurePiece.reorient for the chest's horizontal facing. + fn reorient<W: FeatureWorld>( + &self, + world: &mut W, + p: [i32; 3], + chest: BlockStateId, + ) -> TreeResult<BlockStateId, W::Error> { + let blocks = &*self.blocks; + let mut solid_neighbor = None; + for direction in tb::HORIZONTAL { + let state = read(world, tb::relative(p, direction, 1))?; + if blocks.has(state, tb::CHEST) { + return Ok(chest); + } + if blocks.has(state, tb::SOLID_RENDER) { + if solid_neighbor.is_some() { + solid_neighbor = None; + break; + } + solid_neighbor = Some(direction); + } + } + let facing = |d: Direction| { + blocks + .with(chest, "facing", tb::direction_name(d)) + .ok_or(FeatureExecutionError::InvalidState) + }; + if let Some(direction) = solid_neighbor { + return facing(direction.opposite()); + } + let mut lock = blocks + .properties + .value(chest, "facing") + .and_then(|v| tb::decode_direction(v).ok()) + .ok_or(FeatureExecutionError::InvalidState)?; + let mut rel = tb::relative(p, lock, 1); + if blocks.has(read(world, rel)?, tb::SOLID_RENDER) { + lock = lock.opposite(); + rel = tb::relative(p, lock, 1); + } + if blocks.has(read(world, rel)?, tb::SOLID_RENDER) { + lock = tb::clockwise(lock); + rel = tb::relative(p, lock, 1); + } + if blocks.has(read(world, rel)?, tb::SOLID_RENDER) { + lock = lock.opposite(); + } + facing(lock) + } +} + +#[derive(Clone, Debug)] +pub struct GeodeFeature { + filling: BlockStateProvider, + inner: BlockStateProvider, + alternate_inner: BlockStateProvider, + middle: BlockStateProvider, + outer: BlockStateProvider, + inner_placements: Vec<BlockStateId>, + cannot_replace: Arc<BTreeSet<BlockStateId>>, + invalid_blocks: Arc<BTreeSet<BlockStateId>>, + layers: [f64; 4], + crack_chance: f64, + base_crack_size: f64, + crack_point_offset: i32, + potential_chance: f64, + alternate_chance: f64, + require_alternate: bool, + outer_wall_distance: IntProvider, + distribution_points: IntProvider, + point_offset: IntProvider, + min_gen_offset: i32, + max_gen_offset: i32, + noise_multiplier: f64, + invalid_threshold: i32, + noise: NormalNoise, + blocks: Arc<TreeBlocks>, +} +fn chance(object: &Object, name: &'static str, default: f64) -> Result<f64, DecodeError> { + optional(object, name) + .map(|raw| double_range(raw, name, 0.0, 1.0)) + .transpose() + .map(|v| v.unwrap_or(default)) +} +impl GeodeFeature { + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + if kind(&object)? != "minecraft:geode" { + return Err(DecodeError::Field("geode type")); + } + let blocks = bindings.tree_blocks()?; + let mut decoder = TreeDecoder { + bindings, + depth, + remaining, + }; + let settings: Object = serde_json::from_str(required(&object, "blocks")?.get())?; + let placements: Vec<Box<serde_json::value::RawValue>> = + serde_json::from_str(required(&settings, "inner_placements")?.get())?; + if placements.is_empty() || placements.len() > 8192 { + return Err(DecodeError::Field("geode inner placements")); + } + let inner_placements = placements + .iter() + .map(|raw| { + bindings + .codec + .decode(raw.get(), false) + .map_err(|e| DecodeError::Registry(e.to_string())) + }) + .collect::<Result<_, _>>()?; + let layers: Object = serde_json::from_str(required(&object, "layers")?.get())?; + let layer = |name: &'static str, default: f64| { + optional(&layers, name) + .map(|raw| double_range(raw, name, 0.01, 50.0)) + .transpose() + .map(|v| v.unwrap_or(default)) + }; + let crack: Object = serde_json::from_str(required(&object, "crack")?.get())?; + let mut provider = + |name: &'static str, default: [i32; 2], low: i32, high: i32| match optional( + &object, name, + ) { + Some(raw) => decoder.int_provider(raw, low, high), + None => Ok(IntProvider::Uniform { + min: default[0], + max: default[1], + }), + }; + let outer_wall_distance = provider("outer_wall_distance", [4, 5], 1, 20)?; + let distribution_points = provider("distribution_points", [3, 4], 1, 20)?; + let point_offset = provider("point_offset", [1, 2], 0, 10)?; + let int_or = |name: &'static str, default: i32| { + optional(&object, name) + .map(super::integer) + .transpose() + .map(|v| v.unwrap_or(default)) + }; + Ok(Self { + filling: decoder.provider(required(&settings, "filling_provider")?)?, + inner: decoder.provider(required(&settings, "inner_layer_provider")?)?, + alternate_inner: decoder + .provider(required(&settings, "alternate_inner_layer_provider")?)?, + middle: decoder.provider(required(&settings, "middle_layer_provider")?)?, + outer: decoder.provider(required(&settings, "outer_layer_provider")?)?, + inner_placements, + cannot_replace: decoder.block_set(required(&settings, "cannot_replace")?)?, + invalid_blocks: decoder.block_set(required(&settings, "invalid_blocks")?)?, + layers: [ + layer("filling", 1.7)?, + layer("inner_layer", 2.2)?, + layer("middle_layer", 3.2)?, + layer("outer_layer", 4.2)?, + ], + crack_chance: chance(&crack, "generate_crack_chance", 1.0)?, + base_crack_size: optional(&crack, "base_crack_size") + .map(|raw| double_range(raw, "base_crack_size", 0.0, 5.0)) + .transpose()? + .unwrap_or(2.0), + crack_point_offset: optional(&crack, "crack_point_offset") + .map(|raw| int_range(raw, "crack_point_offset", 0, 10)) + .transpose()? + .unwrap_or(2), + potential_chance: chance(&object, "use_potential_placements_chance", 0.35)?, + alternate_chance: chance(&object, "use_alternate_layer0_chance", 0.0)?, + require_alternate: optional(&object, "placements_require_layer0_alternate") + .map(|raw| serde_json::from_str::<bool>(raw.get())) + .transpose()? + .unwrap_or(true), + outer_wall_distance, + distribution_points, + point_offset, + min_gen_offset: int_or("min_gen_offset", -16)?, + max_gen_offset: int_or("max_gen_offset", 16)?, + noise_multiplier: chance(&object, "noise_multiplier", 0.05)?, + invalid_threshold: super::integer(required(&object, "invalid_blocks_threshold")?)?, + noise: NormalNoise::create_parity(-4, &[1.0])?, + blocks, + }) + } + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let blocks = &*self.blocks; + let cannot = |s: BlockStateId| self.cannot_replace.contains(&s); + let num_points = self.distribution_points.sample(random)?; + let seed = world.world_seed().map_err(query)?; + let noise = self + .noise + .create(&mut LegacyRandom::new(seed)) + .map_err(|_| FeatureExecutionError::InvalidState)?; + let crack_adjust = f64::from(num_points) / f64::from(self.outer_wall_distance.bounds()[1]); + let [filling, inner, middle, outer] = self.layers; + let inner_air = 1.0 / filling.sqrt(); + let innermost = 1.0 / (inner + crack_adjust).sqrt(); + let inner_crust = 1.0 / (middle + crack_adjust).sqrt(); + let outer_crust = 1.0 / (outer + crack_adjust).sqrt(); + let crack_size = 1.0 + / (self.base_crack_size + + random.next_double() / 2.0 + + if num_points > 3 { crack_adjust } else { 0.0 }) + .sqrt(); + let crack = f64::from(random.next_float()) < self.crack_chance; + let mut invalid = 0; + let mut points = Vec::new(); + for _ in 0..num_points { + let x = self.outer_wall_distance.sample(random)?; + let y = self.outer_wall_distance.sample(random)?; + let z = self.outer_wall_distance.sample(random)?; + let p = tb::offset(origin, x, y, z); + let state = read(world, p)?; + if blocks.is_air(state) || self.invalid_blocks.contains(&state) { + invalid += 1; + if invalid > self.invalid_threshold { + return Ok(false); + } + } + points.push((p, self.point_offset.sample(random)?)); + } + let mut crack_points = Vec::new(); + if crack { + let index = random.next_int_bound(4)?; + let o = num_points * 2 + 1; + let (cx, cz) = match index { + 0 => (o, 0), + 1 => (0, o), + 2 => (o, o), + _ => (0, 0), + }; + for y in [7, 5, 1] { + crack_points.push(tb::offset(origin, cx, y, cz)); + } + } + let dist_sqr = |a: [i32; 3], b: [i32; 3]| -> f64 { + (0..3) + .map(|i| { + let d = f64::from(a[i]) - f64::from(b[i]); + d * d + }) + .sum() + }; + let mut potential = Vec::new(); + let air_state = blocks + .default_state("minecraft:air") + .ok_or(FeatureExecutionError::InvalidState)?; + let (lo, hi) = (self.min_gen_offset, self.max_gen_offset); + // BlockPos.betweenClosed iterates x fastest, then y, then z. + for dz in lo..=hi { + for dy in lo..=hi { + for dx in lo..=hi { + let p = tb::offset(origin, dx, dy, dz); + let noise_offset = + f64::from(noise.get3(f64::from(p[0]), f64::from(p[1]), f64::from(p[2]))) + * self.noise_multiplier; + let mut shell = 0.0; + for (point, offset) in &points { + shell += + 1.0 / (dist_sqr(p, *point) + f64::from(*offset)).sqrt() + noise_offset; + } + if shell < outer_crust { + continue; + } + if shell >= inner_air { + let value = sample_state(&self.filling, world, random, p)?; + safe_set(world, p, value, cannot)?; + continue; + } + let mut crack_sum = 0.0; + for point in &crack_points { + crack_sum += 1.0 + / (dist_sqr(p, *point) + f64::from(self.crack_point_offset)).sqrt() + + noise_offset; + } + if crack && crack_sum >= crack_size { + safe_set(world, p, air_state, cannot)?; + for direction in Direction::ALL { + let q = tb::relative(p, direction, 1); + let fluid = world.fluid_state(q).map_err(query)?; + if fluid.kind() != crate::fluid::FluidKind::Empty { + world + .schedule_fluid_tick(q, fluid.kind(), 0) + .map_err(query)?; + } + } + } else if shell >= innermost { + let alternate = f64::from(random.next_float()) < self.alternate_chance; + let provider = if alternate { + &self.alternate_inner + } else { + &self.inner + }; + let value = sample_state(provider, world, random, p)?; + safe_set(world, p, value, cannot)?; + if (!self.require_alternate || alternate) + && f64::from(random.next_float()) < self.potential_chance + { + potential.push(p); + } + } else if shell >= inner_crust { + let value = sample_state(&self.middle, world, random, p)?; + safe_set(world, p, value, cannot)?; + } else if shell >= outer_crust { + let value = sample_state(&self.outer, world, random, p)?; + safe_set(world, p, value, cannot)?; + } + } + } + } + for crystal in potential { + let index = random.next_int_bound(self.inner_placements.len() as i32)? as usize; + let mut state = self.inner_placements[index]; + for direction in Direction::ALL { + if blocks + .properties + .values(state, "facing") + .is_some_and(|v| v.len() == 6) + { + state = blocks + .with(state, "facing", tb::direction_name(direction)) + .ok_or(FeatureExecutionError::InvalidState)?; + } + let target = tb::relative(crystal, direction, 1); + let existing = read(world, target)?; + if blocks.has(state, tb::WATERLOGGABLE) { + state = blocks.waterlogged(state, blocks.has(existing, tb::FLUID_SOURCE)); + } + // BuddingAmethystBlock.canClusterGrowAtState. + if blocks.is_air(existing) + || (blocks.has(existing, tb::WATER_BLOCK) + && blocks.has(existing, tb::FLUID_FULL)) + { + safe_set(world, target, state, cannot)?; + break; + } + } + } + Ok(true) + } +} diff --git a/crates/horizon-world/src/worldgen/chorus_plant.rs b/crates/horizon-world/src/worldgen/chorus_plant.rs new file mode 100644 index 000000000..54ca29b90 --- /dev/null +++ b/crates/horizon-world/src/worldgen/chorus_plant.rs @@ -0,0 +1,204 @@ +//! Bounded recursive chorus generation with native connection-state refreshes. +use super::{DecodeError, block_feature::FeatureBlockBindings, feature::FeatureWorld}; +use crate::registry::BlockStateId; +use horizon_core::random::{InvalidBound, RandomSource}; +use std::{collections::BTreeSet, sync::Arc}; +const HORIZONTAL: [[i32; 3]; 4] = [[0, 0, -1], [1, 0, 0], [0, 0, 1], [-1, 0, 0]]; +const NEIGHBORS: [[i32; 3]; 6] = [ + [0, -1, 0], + [0, 1, 0], + [0, 0, -1], + [1, 0, 0], + [0, 0, 1], + [-1, 0, 0], +]; +fn offset(p: [i32; 3], d: [i32; 3]) -> [i32; 3] { + std::array::from_fn(|i| p[i].wrapping_add(d[i])) +} +#[derive(Clone, Debug)] +pub struct ChorusPlantFeature { + air: [BlockStateId; 3], + support: Arc<BTreeSet<BlockStateId>>, + connectors: BTreeSet<BlockStateId>, + plant: [BlockStateId; 64], + flower: BlockStateId, +} +#[derive(Debug)] +pub enum ChorusPlantError<E> { + World(E), + Random(InvalidBound), +} +impl<E: std::fmt::Display> std::fmt::Display for ChorusPlantError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Random(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for ChorusPlantError<E> {} +impl ChorusPlantFeature { + pub fn new(bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + let registry = bindings.registry(); + let get = |name| { + registry + .default_state(name) + .ok_or_else(|| DecodeError::Registry(format!("unknown chorus block {name}"))) + }; + let default = get("minecraft:chorus_plant")?; + let mut plant = [default; 64]; + for (mask, id) in plant.iter_mut().enumerate() { + let mut state = registry.state(default).unwrap().clone(); + for (i, name) in ["down", "up", "north", "east", "south", "west"] + .into_iter() + .enumerate() + { + state + .properties + .insert(name.into(), (mask & (1 << i) != 0).to_string()); + } + *id = registry + .id(&state) + .ok_or(DecodeError::Field("chorus connections"))?; + } + let mut flower = registry + .state(get("minecraft:chorus_flower")?) + .unwrap() + .clone(); + flower.properties.insert("age".into(), "5".into()); + let flower = registry + .id(&flower) + .ok_or(DecodeError::Field("chorus flower age"))?; + let mut connectors = BTreeSet::new(); + for name in ["minecraft:chorus_plant", "minecraft:chorus_flower"] { + connectors.extend( + bindings + .blocks + .get(name) + .ok_or(DecodeError::Field("chorus identity"))? + .iter() + .copied(), + ); + } + Ok(Self { + air: bindings.air, + support: bindings + .tags + .get("minecraft:supports_chorus_plant") + .cloned() + .unwrap_or_default(), + connectors, + plant, + flower, + }) + } + pub fn place<W: FeatureWorld>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + ) -> Result<bool, ChorusPlantError<W::Error>> { + if !self.empty(world, origin)? + || !self.support.contains( + &world + .block(offset(origin, [0, -1, 0])) + .map_err(ChorusPlantError::World)?, + ) + { + return Ok(false); + } + self.connect(world, origin)?; + self.grow(world, random, origin, origin, 0)?; + Ok(true) + } + fn empty<W: FeatureWorld>( + &self, + world: &mut W, + p: [i32; 3], + ) -> Result<bool, ChorusPlantError<W::Error>> { + Ok(self + .air + .contains(&world.block(p).map_err(ChorusPlantError::World)?)) + } + fn neighbors_empty<W: FeatureWorld>( + &self, + world: &mut W, + p: [i32; 3], + except: Option<usize>, + ) -> Result<bool, ChorusPlantError<W::Error>> { + for (i, d) in HORIZONTAL.into_iter().enumerate() { + if except != Some(i) && !self.empty(world, offset(p, d))? { + return Ok(false); + } + } + Ok(true) + } + fn connect<W: FeatureWorld>( + &self, + world: &mut W, + p: [i32; 3], + ) -> Result<(), ChorusPlantError<W::Error>> { + let mut mask = 0; + for (i, d) in NEIGHBORS.into_iter().enumerate() { + let state = world.block(offset(p, d)).map_err(ChorusPlantError::World)?; + if self.connectors.contains(&state) || i == 0 && self.support.contains(&state) { + mask |= 1 << i; + } + } + world + .set_block(p, self.plant[mask], 2) + .map_err(ChorusPlantError::World)?; + Ok(()) + } + fn grow<W: FeatureWorld>( + &self, + world: &mut W, + random: &mut impl RandomSource, + p: [i32; 3], + root: [i32; 3], + depth: u8, + ) -> Result<(), ChorusPlantError<W::Error>> { + let height = random.next_int_bound(4).map_err(ChorusPlantError::Random)? + + 1 + + if depth == 0 { 1 } else { 0 }; + for step in 1..=height { + let above = offset(p, [0, step, 0]); + if !self.neighbors_empty(world, above, None)? { + return Ok(()); + } + self.connect(world, above)?; + self.connect(world, offset(above, [0, -1, 0]))?; + } + let mut branched = false; + if depth < 4 { + let attempts = random.next_int_bound(4).map_err(ChorusPlantError::Random)? + + if depth == 0 { 1 } else { 0 }; + for _ in 0..attempts { + let direction = + random.next_int_bound(4).map_err(ChorusPlantError::Random)? as usize; + let branch = offset(offset(p, [0, height, 0]), HORIZONTAL[direction]); + if branch[0].wrapping_sub(root[0]).wrapping_abs() >= 8 + || branch[2].wrapping_sub(root[2]).wrapping_abs() >= 8 + { + continue; + } + let opposite = (direction + 2) % 4; + if self.empty(world, branch)? + && self.empty(world, offset(branch, [0, -1, 0]))? + && self.neighbors_empty(world, branch, Some(opposite))? + { + branched = true; + self.connect(world, branch)?; + self.connect(world, offset(branch, HORIZONTAL[opposite]))?; + self.grow(world, random, branch, root, depth + 1)?; + } + } + } + if !branched { + world + .set_block(offset(p, [0, height, 0]), self.flower, 2) + .map_err(ChorusPlantError::World)?; + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/worldgen/climate.rs b/crates/horizon-world/src/worldgen/climate.rs new file mode 100644 index 000000000..92c8bb080 --- /dev/null +++ b/crates/horizon-world/src/worldgen/climate.rs @@ -0,0 +1,118 @@ +//! Climate coordinates derived from the six terrain-router climate fields. +use horizon_core::density::{DensitySampler, SampleError, SamplerContext}; +use horizon_core::noise::DensityVolume; +use std::sync::Arc; +mod codec; +mod index; +pub use codec::{decode_parameter, decode_parameter_point}; +pub use index::{ClimateIndex, ClimateSearch, IndexError, Parameter, ParameterPoint}; + +/// Vanilla multiplies in float precision before the saturating Java long cast. +pub fn quantize(value: f32) -> i64 { + (value * 10_000.0) as i64 +} +pub fn unquantize(value: i64) -> f32 { + value as f32 / 10_000.0 +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct TargetPoint { + pub temperature: i64, + pub humidity: i64, + pub continentalness: i64, + pub erosion: i64, + pub depth: i64, + pub weirdness: i64, +} +impl TargetPoint { + pub fn from_values(values: [f32; 6]) -> Self { + let [ + temperature, + humidity, + continentalness, + erosion, + depth, + weirdness, + ] = values.map(quantize); + Self { + temperature, + humidity, + continentalness, + erosion, + depth, + weirdness, + } + } + /// The seventh parameter is the zero offset used by biome nearest searches. + pub const fn parameters(self) -> [i64; 7] { + [ + self.temperature, + self.humidity, + self.continentalness, + self.erosion, + self.depth, + self.weirdness, + 0, + ] + } +} +#[derive(Clone, Debug)] +pub struct ClimateSampler { + samplers: [Arc<dyn DensitySampler>; 6], +} +impl ClimateSampler { + /// Temperature, humidity, continentalness, erosion, depth, weirdness. + pub fn new(samplers: [Arc<dyn DensitySampler>; 6]) -> Self { + Self { samplers } + } + /// Coordinates are biome quart positions, converted with wrapped << 2. + /// Every child uses the same context and runs in field declaration order. + pub fn sample( + &self, + context: &mut SamplerContext, + quart: [i32; 3], + ) -> Result<TargetPoint, SampleError> { + let position = quart.map(|coordinate| coordinate.wrapping_shl(2)); + let mut values = [0.; 6]; + for (sampler, value) in self.samplers.iter().zip(&mut values) { + *value = sampler.sample_value(context, position)?; + } + Ok(TargetPoint::from_values(values)) + } + /// Prepare all six field buffers in declaration order on the quart lattice. + /// Lookup quantizes the retained bulk values rather than resampling scalars. + pub fn sample_volume( + &self, + context: &mut SamplerContext, + quart_minimum: [i32; 3], + extents: [i32; 3], + ) -> Result<ClimateVolume, SampleError> { + let volume = DensityVolume::new(extents, quart_minimum.map(|v| v.wrapping_shl(2)), [4; 3])?; + let mut fields = std::array::from_fn(|_| vec![0.; volume.size()]); + for (sampler, field) in self.samplers.iter().zip(&mut fields) { + sampler.sample_volume(context, field, volume)?; + } + Ok(ClimateVolume { + quart_minimum, + volume, + fields, + }) + } +} +#[derive(Debug)] +pub struct ClimateVolume { + quart_minimum: [i32; 3], + volume: DensityVolume, + fields: [Vec<f32>; 6], +} +impl ClimateVolume { + /// Coordinates must be inside the prepared quart volume. The bounded Rust + /// API rejects invalid coordinates instead of Java's unchecked buffer alias. + pub fn target(&self, quart: [i32; 3]) -> Option<TargetPoint> { + let relative = + std::array::from_fn(|i| quart[i].wrapping_sub(self.quart_minimum[i]) as usize); + let index = self.volume.index(relative)?; + Some(TargetPoint::from_values(std::array::from_fn(|i| { + self.fields[i][index] + }))) + } +} diff --git a/crates/horizon-world/src/worldgen/climate/codec.rs b/crates/horizon-world/src/worldgen/climate/codec.rs new file mode 100644 index 000000000..8ea0d00d6 --- /dev/null +++ b/crates/horizon-world/src/worldgen/climate/codec.rs @@ -0,0 +1,59 @@ +use super::super::{DecodeError, Object, RawValue, number_text, required}; +use super::{Parameter, ParameterPoint, quantize}; + +fn float(raw: &RawValue, min: f32, max: f32) -> Result<f32, DecodeError> { + let value: f32 = number_text(raw)? + .parse() + .map_err(|_| DecodeError::Field("climate float"))?; + if value.total_cmp(&min).is_lt() || value.total_cmp(&max).is_gt() { + return Err(DecodeError::Field("climate float bounds")); + } + Ok(value) +} +fn parameter(raw: &RawValue) -> Result<Parameter, DecodeError> { + let (min, max) = if raw.get().starts_with('[') { + let values: Vec<Box<RawValue>> = serde_json::from_str(raw.get())?; + if values.len() != 2 { + return Err(DecodeError::Field("climate interval length")); + } + (float(&values[0], -2., 2.)?, float(&values[1], -2., 2.)?) + } else if raw.get().starts_with('{') { + let object: Object = serde_json::from_str(raw.get())?; + ( + float(required(&object, "min")?, -2., 2.)?, + float(required(&object, "max")?, -2., 2.)?, + ) + } else { + let value = float(raw, -2., 2.)?; + (value, value) + }; + if min.total_cmp(&max).is_gt() { + return Err(DecodeError::Field("climate interval order")); + } + Ok(Parameter::new(quantize(min), quantize(max))) +} +/// Vanilla's scalar, two-element list or min/max object climate interval codec. +pub fn decode_parameter(json: &str) -> Result<Parameter, DecodeError> { + let raw: Box<RawValue> = serde_json::from_str(json)?; + parameter(&raw) +} +/// Six required climate intervals and a required offset in [0,1]. +pub fn decode_parameter_point(json: &str) -> Result<ParameterPoint, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let mut coordinates = [Parameter::new(0, 0); 6]; + for (coordinate, name) in coordinates.iter_mut().zip([ + "temperature", + "humidity", + "continentalness", + "erosion", + "depth", + "weirdness", + ]) { + *coordinate = parameter(required(&object, name)?)?; + } + let offset = quantize(float(required(&object, "offset")?, 0., 1.)?); + Ok(ParameterPoint { + coordinates, + offset, + }) +} diff --git a/crates/horizon-world/src/worldgen/climate/index.rs b/crates/horizon-world/src/worldgen/climate/index.rs new file mode 100644 index 000000000..3e9b50f51 --- /dev/null +++ b/crates/horizon-world/src/worldgen/climate/index.rs @@ -0,0 +1,325 @@ +//! Immutable climate search tree with an explicit per-worker previous result. +use super::{TargetPoint, quantize}; +use std::cmp::Ordering; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct Parameter { + pub min: i64, + pub max: i64, +} +impl Parameter { + /// The record constructor does not validate endpoint order. + pub const fn new(min: i64, max: i64) -> Self { + Self { min, max } + } + pub fn point(value: f32) -> Self { + let value = quantize(value); + Self::new(value, value) + } + pub fn span(min: f32, max: f32) -> Result<Self, IndexError> { + if min > max { + return Err(IndexError::InvertedSpan); + } + Ok(Self::new(quantize(min), quantize(max))) + } + pub fn distance(self, value: i64) -> i64 { + let above = value.wrapping_sub(self.max); + if above > 0 { + above + } else { + self.min.wrapping_sub(value).max(0) + } + } + fn union(self, other: Self) -> Self { + Self::new(self.min.min(other.min), self.max.max(other.max)) + } + fn center(self) -> i64 { + self.min.wrapping_add(self.max) / 2 + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct ParameterPoint { + /// Temperature, humidity, continentalness, erosion, depth, weirdness. + pub coordinates: [Parameter; 6], + pub offset: i64, +} +impl ParameterPoint { + pub fn fitness(self, target: TargetPoint) -> i64 { + self.coordinates.iter().zip(target.parameters()).fold( + self.offset.wrapping_mul(self.offset), + |sum, (parameter, value)| { + let distance = parameter.distance(value); + sum.wrapping_add(distance.wrapping_mul(distance)) + }, + ) + } + pub fn parameter_space(self) -> [Parameter; 7] { + std::array::from_fn(|i| { + if i < 6 { + self.coordinates[i] + } else { + Parameter::new(self.offset, self.offset) + } + }) + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum IndexError { + Empty, + TooManyEntries, + InvalidBranching, + InvertedSpan, + NoSplit, + NoResult, +} +impl std::fmt::Display for IndexError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str(match self { + Self::Empty => "climate search requires at least one entry", + Self::TooManyEntries => "climate search is limited to 65536 entries", + Self::InvalidBranching => "climate branching must be in 2..=32", + Self::InvertedSpan => "climate interval endpoints are inverted", + Self::NoSplit => "climate tree could not select a split", + Self::NoResult => "climate search found no result", + }) + } +} +impl std::error::Error for IndexError {} + +#[derive(Debug)] +enum Children { + Leaf(usize), + Branch(Vec<usize>), +} +#[derive(Debug)] +struct Node { + space: [Parameter; 7], + children: Children, +} +fn distance(space: &[Parameter; 7], values: &[i64; 7]) -> i64 { + space + .iter() + .zip(values) + .fold(0i64, |sum, (parameter, value)| { + let distance = parameter.distance(*value); + sum.wrapping_add(distance.wrapping_mul(distance)) + }) +} +fn compare_space(a: &[Parameter; 7], b: &[Parameter; 7], axis: usize, absolute: bool) -> Ordering { + for i in 0..7 { + let coordinate = (axis + i) % 7; + let key = |p: Parameter| { + if absolute { + p.center().wrapping_abs() + } else { + p.center() + } + }; + let result = key(a[coordinate]).cmp(&key(b[coordinate])); + if result != Ordering::Equal { + return result; + } + } + Ordering::Equal +} +#[derive(Debug)] +struct Bucket { + space: [Parameter; 7], + children: Vec<usize>, +} +fn space(nodes: &[Node], children: &[usize]) -> [Parameter; 7] { + let mut space = nodes[children[0]].space; + for child in &children[1..] { + for (parameter, other) in space.iter_mut().zip(nodes[*child].space) { + *parameter = parameter.union(other); + } + } + space +} +fn build( + nodes: &mut Vec<Node>, + mut children: Vec<usize>, + branching: usize, +) -> Result<usize, IndexError> { + if children.len() == 1 { + return Ok(children[0]); + } + if children.len() <= branching { + // Stable sorting matters when centers and total center distance tie. + children.sort_by_key(|id| { + nodes[*id] + .space + .iter() + .fold(0i64, |sum, p| sum.wrapping_add(p.center().wrapping_abs())) + }); + } else { + // For this bounded domain this is the same bucket size as vanilla's + // pow(branching,floor(log(length-0.01)/log(branching))). Integer powers + // avoid depending on platform double logarithms during construction. + let mut bucket_size = 1; + while bucket_size * branching < children.len() { + bucket_size *= branching; + } + let mut best_cost = i64::MAX; + let mut best = None; + for axis in 0..7 { + children.sort_by(|a, b| compare_space(&nodes[*a].space, &nodes[*b].space, axis, false)); + let buckets: Vec<_> = children + .chunks(bucket_size) + .map(|children| Bucket { + space: space(nodes, children), + children: children.to_vec(), + }) + .collect(); + let cost = buckets.iter().fold(0i64, |sum, bucket| { + bucket.space.iter().fold(sum, |sum, p| { + sum.wrapping_add(p.max.wrapping_sub(p.min).wrapping_abs()) + }) + }); + if best_cost > cost { + best_cost = cost; + best = Some((axis, buckets)); + } + } + let (axis, mut buckets) = best.ok_or(IndexError::NoSplit)?; + buckets.sort_by(|a, b| compare_space(&a.space, &b.space, axis, true)); + children = buckets + .into_iter() + .map(|bucket| build(nodes, bucket.children, branching)) + .collect::<Result<_, _>>()?; + } + let space = space(nodes, &children); + let id = nodes.len(); + nodes.push(Node { + space, + children: Children::Branch(children), + }); + Ok(id) +} + +/// The index is immutable and can be shared; each searcher owns its cache. +/// Entry count and branching are explicit limits of this bounded Rust API. +#[derive(Debug)] +pub struct ClimateIndex<T> { + entries: Vec<(ParameterPoint, T)>, + nodes: Vec<Node>, + root: usize, +} +impl<T> ClimateIndex<T> { + pub fn new(entries: Vec<(ParameterPoint, T)>) -> Result<Self, IndexError> { + Self::with_branching(entries, 19) + } + pub fn with_branching( + entries: Vec<(ParameterPoint, T)>, + branching: usize, + ) -> Result<Self, IndexError> { + if entries.is_empty() { + return Err(IndexError::Empty); + } + if entries.len() > 65536 { + return Err(IndexError::TooManyEntries); + } + if !(2..=32).contains(&branching) { + return Err(IndexError::InvalidBranching); + } + let mut nodes: Vec<_> = entries + .iter() + .enumerate() + .map(|(id, (point, _))| Node { + space: point.parameter_space(), + children: Children::Leaf(id), + }) + .collect(); + let children = (0..nodes.len()).collect(); + let root = build(&mut nodes, children, branching)?; + Ok(Self { + entries, + nodes, + root, + }) + } + pub fn entries(&self) -> &[(ParameterPoint, T)] { + &self.entries + } + pub fn searcher(&self) -> ClimateSearch<'_, T> { + ClimateSearch { + index: self, + last: None, + } + } + /// Vanilla's separate reference path: ties retain input-list order and do + /// not consult or update the searcher's previous indexed result. + pub fn brute_force(&self, target: TargetPoint) -> &T { + let mut best = 0; + let mut fitness = self.entries[0].0.fitness(target); + for (id, (point, _)) in self.entries.iter().enumerate().skip(1) { + let next = point.fitness(target); + if next < fitness { + fitness = next; + best = id; + } + } + &self.entries[best].1 + } + /// Preorder leaf entry indices expose stable tree layout for comparison. + pub fn leaf_order(&self) -> Vec<usize> { + fn walk(nodes: &[Node], id: usize, out: &mut Vec<usize>) { + match &nodes[id].children { + Children::Leaf(entry) => out.push(*entry), + Children::Branch(children) => { + for child in children { + walk(nodes, *child, out); + } + } + } + } + let mut result = Vec::with_capacity(self.entries.len()); + walk(&self.nodes, self.root, &mut result); + result + } + fn search( + &self, + id: usize, + values: &[i64; 7], + previous: Option<usize>, + ) -> Result<usize, IndexError> { + let Children::Branch(children) = &self.nodes[id].children else { + return Ok(id); + }; + let mut best = previous; + let mut fitness = previous.map_or(i64::MAX, |id| distance(&self.nodes[id].space, values)); + for child in children { + let lower = distance(&self.nodes[*child].space, values); + if fitness > lower { + let result = self.search(*child, values, best)?; + let next = if result == *child { + lower + } else { + distance(&self.nodes[result].space, values) + }; + if fitness > next { + fitness = next; + best = Some(result); + } + } + } + best.ok_or(IndexError::NoResult) + } +} +#[derive(Debug)] +pub struct ClimateSearch<'a, T> { + index: &'a ClimateIndex<T>, + last: Option<usize>, +} +impl<'a, T> ClimateSearch<'a, T> { + pub fn find(&mut self, target: TargetPoint) -> Result<&'a T, IndexError> { + let result = self + .index + .search(self.index.root, &target.parameters(), self.last)?; + self.last = Some(result); + let Children::Leaf(entry) = self.index.nodes[result].children else { + unreachable!("search returns a leaf"); + }; + Ok(&self.index.entries[entry].1) + } +} diff --git a/crates/horizon-world/src/worldgen/decoration.rs b/crates/horizon-world/src/worldgen/decoration.rs new file mode 100644 index 000000000..901a19f53 --- /dev/null +++ b/crates/horizon-world/src/worldgen/decoration.rs @@ -0,0 +1,172 @@ +//! Biome-selected feature scheduling. Structure decoration is a separate stage. +use super::{ + feature_sort::{FeatureIdentity, FeatureSortError, StepFeatureData, build_features_per_step}, + placement::FeaturePlacer, +}; +use horizon_core::{ + position::ChunkPos, + random::{WorldgenRandom, XoroshiroRandom}, +}; +use std::collections::{BTreeMap, BTreeSet}; + +pub use super::biome::BiomeId as DecorationBiome; + +/// Transport for resident section palettes and generation progress. +pub trait DecorationWorld { + type Error; + fn min_section_y(&mut self) -> Result<i32, Self::Error>; + /// Return values present in every section's biome palette, including values + /// outside the generator's possible-biome set. Duplicates are allowed. + fn chunk_biomes(&mut self, chunk: ChunkPos) -> Result<Vec<DecorationBiome>, Self::Error>; + fn set_currently_generating( + &mut self, + feature: Option<FeatureIdentity>, + ) -> Result<(), Self::Error>; +} + +#[derive(Debug)] +pub enum DecorationError<E> { + World(E), + Feature { feature: FeatureIdentity, error: E }, + WorkLimit, +} +impl<E: std::fmt::Display> std::fmt::Display for DecorationError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Feature { feature, error } => write!(f, "feature {}: {error}", feature.0), + Self::WorkLimit => f.write_str("decoration work limit exceeded"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for DecorationError<E> {} + +#[derive(Clone, Debug)] +pub struct FeatureDecorationPlan { + biomes: BTreeMap<DecorationBiome, Vec<Vec<FeatureIdentity>>>, + steps: Vec<StepFeatureData>, +} +impl FeatureDecorationPlan { + /// The list must preserve the generator's possible-biome encounter order. + /// Each biome identity occurs once; feature identity is allocation identity. + pub fn new( + biomes: Vec<(DecorationBiome, Vec<Vec<FeatureIdentity>>)>, + ) -> Result<Self, FeatureSortError> { + let ordered = biomes + .iter() + .map(|(_, steps)| steps.clone()) + .collect::<Vec<_>>(); + let steps = build_features_per_step(&ordered)?; + let count = biomes.len(); + let biomes = biomes.into_iter().collect::<BTreeMap<_, _>>(); + if biomes.len() != count { + return Err(FeatureSortError::DuplicateBiome); + } + Ok(Self { biomes, steps }) + } + + /// Execute the feature branch of chunk decoration with structures disabled. + /// The callback must place the identified root with a biome-check context. + /// It receives one shared placer and the correctly reseeded random stream; + /// false results are ignored. Errors stop immediately without clearing the + /// current-feature marker. A subsequent call starts with fresh placer state. + pub fn decorate_features<W: DecorationWorld>( + &self, + world: &mut W, + chunk: ChunkPos, + world_seed: i64, + place: impl FnMut( + &mut W, + &mut FeaturePlacer, + &mut WorldgenRandom<XoroshiroRandom>, + FeatureIdentity, + [i32; 3], + ) -> Result<bool, W::Error>, + ) -> Result<(), DecorationError<W::Error>> { + self.decorate(world, chunk, world_seed, 0, |_, _, _, _| Ok(()), place) + } + + /// Like `decorate_features`, running `structures` at the start of each of + /// `max(structure_steps, feature steps)` steps, before that step's + /// features (vanilla applyBiomeDecoration). It receives the shared random + /// and decoration seed; it seeds per structure itself. + pub fn decorate<W: DecorationWorld>( + &self, + world: &mut W, + chunk: ChunkPos, + world_seed: i64, + structure_steps: usize, + mut structures: impl FnMut( + &mut W, + &mut WorldgenRandom<XoroshiroRandom>, + i64, + usize, + ) -> Result<(), W::Error>, + mut place: impl FnMut( + &mut W, + &mut FeaturePlacer, + &mut WorldgenRandom<XoroshiroRandom>, + FeatureIdentity, + [i32; 3], + ) -> Result<bool, W::Error>, + ) -> Result<(), DecorationError<W::Error>> { + let origin = [ + chunk.x.wrapping_shl(4), + world + .min_section_y() + .map_err(DecorationError::World)? + .wrapping_shl(4), + chunk.z.wrapping_shl(4), + ]; + let mut random = WorldgenRandom::new(XoroshiroRandom::new(0)); + let seed = random.set_decoration_seed(world_seed, origin[0], origin[2]); + // ChunkPos.rangeClosed overflows into a huge reversed traversal at the + // extreme i32 chunk coordinates. Bound that unsupported work explicitly. + if [chunk.x, chunk.z] + .iter() + .any(|v| *v == i32::MIN || *v == i32::MAX) + { + return Err(DecorationError::WorkLimit); + } + let mut present = BTreeSet::new(); + for z in chunk.z - 1..=chunk.z + 1 { + for x in chunk.x - 1..=chunk.x + 1 { + let values = world + .chunk_biomes(ChunkPos::new(x, z)) + .map_err(DecorationError::World)?; + if values.len() > 65536 { + return Err(DecorationError::WorkLimit); + } + present.extend(values.into_iter().filter(|id| self.biomes.contains_key(id))); + } + } + let mut placer = FeaturePlacer::new(); + for step in 0..structure_steps.max(self.steps.len()) { + structures(world, &mut random, seed, step).map_err(DecorationError::World)?; + let Some(data) = self.steps.get(step) else { + continue; + }; + let mut selected = BTreeSet::new(); + for biome in &present { + if let Some(features) = self.biomes[biome].get(step) { + selected.extend(features.iter().map(|feature| { + data.index(*feature) + .expect("plan owns complete biome feature lists") + })); + } + } + for index in selected { + let feature = data.features()[index]; + random.set_feature_seed(seed, index as i32, step as i32); + world + .set_currently_generating(Some(feature)) + .map_err(|error| DecorationError::Feature { feature, error })?; + place(world, &mut placer, &mut random, feature, origin) + .map_err(|error| DecorationError::Feature { feature, error })?; + } + } + world + .set_currently_generating(None) + .map_err(DecorationError::World) + } +} diff --git a/crates/horizon-world/src/worldgen/delta.rs b/crates/horizon-world/src/worldgen/delta.rs new file mode 100644 index 000000000..884a103bd --- /dev/null +++ b/crates/horizon-world/src/worldgen/delta.rs @@ -0,0 +1,202 @@ +//! Nether delta patches with ordered rims, shifted contents and cavity checks. +use super::{ + DecodeError, Object, block_feature::FeatureBlockBindings, feature::FeatureWorld, required, + value_provider::IntProvider, +}; +use crate::registry::BlockStateId; +use horizon_core::{ + geometry::Direction, + random::{InvalidBound, RandomSource}, +}; +use std::{collections::BTreeSet, sync::Arc}; +#[derive(Clone, Debug)] +pub struct DeltaFeature { + contents: BlockStateId, + rim: BlockStateId, + size: IntProvider, + rim_size: IntProvider, + blocked: Arc<BTreeSet<BlockStateId>>, + air: [BlockStateId; 3], +} +#[derive(Debug)] +pub enum DeltaError<E> { + World(E), + Random(InvalidBound), +} +impl<E: std::fmt::Display> std::fmt::Display for DeltaError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Random(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for DeltaError<E> {} +impl DeltaFeature { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + Self::decode(json, bindings, 0, &mut 65536) + } + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + if depth > 128 || *remaining == 0 { + return Err(DecodeError::Field("delta depth or work")); + } + *remaining -= 1; + let object: Object = serde_json::from_str(json)?; + let state = |name| { + required(&object, name).and_then(|v| { + bindings + .codec + .decode(v.get(), false) + .map_err(|e| DecodeError::Registry(e.to_string())) + }) + }; + let contents = state("contents")?; + let rim = state("rim")?; + let mut provider = |name| { + let p = IntProvider::decode(required(&object, name)?, depth + 1, remaining)?; + let [min, max] = p.bounds(); + if min < 0 || max > 16 { + return Err(DecodeError::Field("delta size bounds")); + } + Ok(p) + }; + let size = provider("size")?; + let rim_size = provider("rim_size")?; + let contents_name = &bindings + .registry() + .state(contents) + .ok_or(DecodeError::Field("delta contents"))? + .name; + let mut blocked = BTreeSet::new(); + for name in [ + "minecraft:bedrock", + "minecraft:nether_bricks", + "minecraft:nether_brick_fence", + "minecraft:nether_brick_stairs", + "minecraft:nether_wart", + "minecraft:chest", + "minecraft:spawner", + contents_name.as_str(), + ] { + blocked.extend( + bindings + .blocks + .get(name) + .ok_or_else(|| DecodeError::Registry(format!("unknown delta block {name}")))? + .iter() + .copied(), + ); + } + Ok(Self { + contents, + rim, + size, + rim_size, + blocked: Arc::new(blocked), + air: bindings.air, + }) + } + pub fn place<W: FeatureWorld>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + ) -> Result<bool, DeltaError<W::Error>> { + let draw_rim = random.next_double() < 0.9; + let rim_x = if draw_rim { + self.rim_size.sample(random).map_err(DeltaError::Random)? + } else { + 0 + }; + let rim_z = if draw_rim { + self.rim_size.sample(random).map_err(DeltaError::Random)? + } else { + 0 + }; + let rim = draw_rim && rim_x != 0 && rim_z != 0; + let rx = self.size.sample(random).map_err(DeltaError::Random)?; + let rz = self.size.sample(random).map_err(DeltaError::Random)?; + let mut any = false; + for depth in 0..=rx.max(rz) { + let max_x = rx.min(depth); + for x in -max_x..=max_x { + let z = depth - x.abs(); + if z > rz { + continue; + } + self.place_at( + world, + offset(origin, [x, 0, z]), + [rim_x, 0, rim_z], + rim, + &mut any, + )?; + if z != 0 { + self.place_at( + world, + offset(origin, [x, 0, -z]), + [rim_x, 0, rim_z], + rim, + &mut any, + )?; + } + } + } + Ok(any) + } + fn place_at<W: FeatureWorld>( + &self, + world: &mut W, + p: [i32; 3], + shift: [i32; 3], + rim: bool, + any: &mut bool, + ) -> Result<(), DeltaError<W::Error>> { + if !self.is_clear(world, p)? { + return Ok(()); + } + if rim { + world.set_block(p, self.rim, 3).map_err(DeltaError::World)?; + *any = true; + } + let shifted = offset(p, shift); + if self.is_clear(world, shifted)? { + world + .set_block(shifted, self.contents, 3) + .map_err(DeltaError::World)?; + *any = true; + } + Ok(()) + } + fn is_clear<W: FeatureWorld>( + &self, + world: &mut W, + p: [i32; 3], + ) -> Result<bool, DeltaError<W::Error>> { + if self + .blocked + .contains(&world.block(p).map_err(DeltaError::World)?) + { + return Ok(false); + } + for direction in Direction::ALL { + let air = self.air.contains( + &world + .block(offset(p, direction.normal())) + .map_err(DeltaError::World)?, + ); + if air != (direction == Direction::Up) { + return Ok(false); + } + } + Ok(true) + } +} +fn offset(p: [i32; 3], d: [i32; 3]) -> [i32; 3] { + std::array::from_fn(|i| p[i].wrapping_add(d[i])) +} diff --git a/crates/horizon-world/src/worldgen/density.rs b/crates/horizon-world/src/worldgen/density.rs new file mode 100644 index 000000000..6cd2c7df7 --- /dev/null +++ b/crates/horizon-world/src/worldgen/density.rs @@ -0,0 +1,578 @@ +//! Bounded decoding of density registries into the immutable core graph. +//! Named registry holders and raw numeric tokens preserve compilation behavior. +use super::*; +use horizon_core::{ + density::{ + BlendedNoise, CubicSpline, DistanceMetric, RoundMode, ShiftNoiseKind, SplinePoint, + TilingMode, WorldField, + graph::{DensityGraph, FunctionId, GraphBinary, GraphNode, GraphUnary, NoiseId}, + }, + geometry::Axis, +}; +use std::{collections::BTreeSet, sync::Arc}; + +pub(super) fn identifier(name: &str) -> Result<String, DecodeError> { + let (namespace, path) = name.split_once(':').unwrap_or(("minecraft", name)); + let namespace = if namespace.is_empty() { + "minecraft" + } else { + namespace + }; + let valid = |c: u8| c.is_ascii_lowercase() || c.is_ascii_digit() || b"_.-".contains(&c); + if !namespace.bytes().all(valid) + || !path.bytes().all(|c| valid(c) || c == b'/') + || path.is_empty() + { + return Err(DecodeError::Registry(format!( + "invalid registry identifier: {name}" + ))); + } + Ok(format!("{namespace}:{path}")) +} +fn string(raw: &RawValue) -> Result<String, DecodeError> { + Ok(serde_json::from_str(raw.get())?) +} +fn float(raw: &RawValue) -> Result<f32, DecodeError> { + number_text(raw)? + .parse() + .map_err(|_| DecodeError::Field("float")) +} +fn noise_value(raw: &RawValue) -> Result<f32, DecodeError> { + let value = float(raw)?; + if (-1e6..=1e6).contains(&value) { + Ok(value) + } else { + Err(DecodeError::Field("density value")) + } +} +fn axis(raw: &RawValue) -> Result<Axis, DecodeError> { + match string(raw)?.as_str() { + "x" => Ok(Axis::X), + "y" => Ok(Axis::Y), + "z" => Ok(Axis::Z), + _ => Err(DecodeError::Field("axis")), + } +} + +/// All entries are loaded atomically. Named child references resolve through +/// distinct registry holders; returned entry values are their direct graphs. +#[derive(Debug)] +pub struct DensityRegistry { + graph: DensityGraph, + values: BTreeMap<String, FunctionId>, + noises: BTreeMap<String, NoiseId>, +} +impl DensityRegistry { + /// Input keys are registry identifiers, and values contain original JSON. + /// This API accepts acyclic registries, at most 256 nested graph levels and + /// at most 256 interval branches. Inline noise holders are not yet supported. + pub fn from_json( + noises: &BTreeMap<String, String>, + densities: &BTreeMap<String, String>, + ) -> Result<Self, DecodeError> { + let mut loader = Loader { + graph: DensityGraph::new(), + noises: BTreeMap::new(), + definitions: BTreeMap::new(), + values: BTreeMap::new(), + active: BTreeSet::new(), + }; + for (name, json) in noises { + let name = identifier(name)?; + let noise = loader + .graph + .register_noise(name.clone(), decode_noise(json)?)?; + loader.noises.insert(name, noise); + } + for (name, json) in densities { + let name = identifier(name)?; + let raw: Box<RawValue> = serde_json::from_str(json)?; + if loader.definitions.insert(name.clone(), raw).is_some() { + return Err(DecodeError::Registry(format!( + "duplicate density identifier: {name}" + ))); + } + } + let names: Vec<_> = loader.definitions.keys().cloned().collect(); + for name in names { + loader.resolve(&name, 0)?; + } + Ok(Self { + graph: loader.graph, + values: loader.values, + noises: loader.noises, + }) + } + pub fn graph(&self) -> &DensityGraph { + &self.graph + } + pub fn into_graph(self) -> DensityGraph { + self.graph + } + pub fn entries(&self) -> impl Iterator<Item = (&str, FunctionId)> { + self.values.iter().map(|(name, id)| (name.as_str(), *id)) + } + pub fn value(&self, name: &str) -> Option<FunctionId> { + self.values.get(name).copied() + } + pub fn reference(&self, name: &str) -> Option<FunctionId> { + self.graph.function(name) + } + /// Decode direct roots against this registry, retaining shared named holders. + /// All roots are added atomically; a failure leaves existing IDs and graphs + /// intact. Roots are not registered as additional named density entries. + pub fn decode_functions(&mut self, json: &[&str]) -> Result<Vec<FunctionId>, DecodeError> { + let mut loader = Loader { + graph: self.graph.clone(), + noises: self.noises.clone(), + definitions: BTreeMap::new(), + values: BTreeMap::new(), + active: BTreeSet::new(), + }; + let roots = json + .iter() + .map(|json| { + let raw: Box<RawValue> = serde_json::from_str(json)?; + loader.decode(&raw, 0) + }) + .collect::<Result<_, _>>()?; + self.graph = loader.graph; + Ok(roots) + } +} +struct Loader { + graph: DensityGraph, + noises: BTreeMap<String, NoiseId>, + definitions: BTreeMap<String, Box<RawValue>>, + values: BTreeMap<String, FunctionId>, + active: BTreeSet<String>, +} +impl Loader { + fn resolve(&mut self, name: &str, depth: usize) -> Result<FunctionId, DecodeError> { + if let Some(id) = self.graph.function(name) { + return Ok(id); + } + if depth > 256 { + return Err(DecodeError::Field("density nesting")); + } + if !self.active.insert(name.to_owned()) { + return Err(DecodeError::Registry(format!( + "cyclic density reference: {name}" + ))); + } + let raw = self + .definitions + .get(name) + .ok_or_else(|| DecodeError::Registry(format!("unknown density reference: {name}")))? + .clone(); + let value = self.decode(&raw, depth + 1)?; + let reference = self.graph.register_function(name.to_owned(), value)?; + self.values.insert(name.to_owned(), value); + self.active.remove(name); + Ok(reference) + } + fn input( + &mut self, + object: &Object, + name: &'static str, + depth: usize, + ) -> Result<FunctionId, DecodeError> { + self.decode(required(object, name)?, depth + 1) + } + fn optional_input( + &mut self, + object: &Object, + name: &'static str, + fallback: f32, + depth: usize, + ) -> Result<FunctionId, DecodeError> { + match optional(object, name) { + Some(raw) => self.decode(raw, depth + 1), + None => Ok(self.graph.insert(GraphNode::Constant(fallback))?), + } + } + fn noise(&self, object: &Object) -> Result<NoiseId, DecodeError> { + let raw = required(object, "noise")?; + if !raw.get().starts_with('"') { + return Err(DecodeError::Field("inline noise holder unsupported")); + } + let name = identifier(&string(raw)?)?; + self.noises + .get(&name) + .copied() + .ok_or_else(|| DecodeError::Registry(format!("unknown noise reference: {name}"))) + } + fn decode(&mut self, raw: &RawValue, depth: usize) -> Result<FunctionId, DecodeError> { + if depth > 256 { + return Err(DecodeError::Field("density nesting")); + } + if raw.get().starts_with('"') { + return self.resolve(&identifier(&string(raw)?)?, depth); + } + if !raw.get().starts_with('{') { + return Ok(self.graph.insert(GraphNode::Constant(noise_value(raw)?))?); + } + let object: Object = serde_json::from_str(raw.get())?; + let kind = identifier(&string(required(&object, "type")?)?)?; + let unary = match kind.as_str() { + "minecraft:abs" => Some(GraphUnary::Abs), + "minecraft:square" => Some(GraphUnary::Square), + "minecraft:cube" => Some(GraphUnary::Cube), + "minecraft:sqrt" => Some(GraphUnary::Sqrt), + "minecraft:half_negative" => Some(GraphUnary::HalfNegative), + "minecraft:quarter_negative" => Some(GraphUnary::QuarterNegative), + "minecraft:reciprocal" => Some(GraphUnary::Reciprocal), + "minecraft:negate" => Some(GraphUnary::Negate), + "minecraft:squeeze" => Some(GraphUnary::Squeeze), + "minecraft:log" => Some(GraphUnary::Log), + "minecraft:sign" => Some(GraphUnary::Sign), + _ => None, + }; + let binary = match kind.as_str() { + "minecraft:add" => Some(GraphBinary::Add), + "minecraft:sub" => Some(GraphBinary::Subtract), + "minecraft:mul" => Some(GraphBinary::Multiply), + "minecraft:div" => Some(GraphBinary::Divide), + "minecraft:min" => Some(GraphBinary::Minimum), + "minecraft:max" => Some(GraphBinary::Maximum), + _ => None, + }; + let node = if let Some(kind) = unary { + GraphNode::Unary { + kind, + input: self.input(&object, "input", depth)?, + } + } else if let Some(kind) = binary { + GraphNode::Binary { + kind, + left: self.input(&object, "left", depth)?, + right: self.input(&object, "right", depth)?, + } + } else { + match kind.as_str() { + "minecraft:constant" => { + GraphNode::Constant(noise_value(required(&object, "value")?)?) + } + "minecraft:blend_alpha" => GraphNode::WorldField(WorldField::BlendAlpha), + "minecraft:blend_offset" => GraphNode::WorldField(WorldField::BlendOffset), + "minecraft:beardifier" => GraphNode::WorldField(WorldField::Beardifier), + "minecraft:end_outer_islands" => GraphNode::EndIslands, + "minecraft:cache" => GraphNode::Cache(self.input(&object, "input", depth)?), + "minecraft:blend_density" => { + GraphNode::BlendDensity(self.input(&object, "input", depth)?) + } + "minecraft:pow" => GraphNode::Power { + base: self.input(&object, "base", depth)?, + exponent: self.input(&object, "exponent", depth)?, + }, + "minecraft:floor" | "minecraft:round" | "minecraft:ceil" | "minecraft:truncate" => { + GraphNode::Round { + mode: match kind.as_str() { + "minecraft:floor" => RoundMode::Floor, + "minecraft:round" => RoundMode::Round, + "minecraft:ceil" => RoundMode::Ceil, + _ => RoundMode::Truncate, + }, + input: self.input(&object, "input", depth)?, + multiple: self.optional_input(&object, "multiple", 1.0, depth)?, + } + } + "minecraft:gradient" => { + let from = integer(required(&object, "from_coordinate")?)?; + let to = integer(required(&object, "to_coordinate")?)?; + if from == to { + return Err(DecodeError::Field("gradient coordinates")); + } + GraphNode::Gradient { + axis: axis(required(&object, "axis")?)?, + tiling: match optional(&object, "tiling") + .map(string) + .transpose()? + .as_deref() + .unwrap_or("clamp_to_edge") + { + "clamp_to_edge" => TilingMode::ClampToEdge, + "repeat" => TilingMode::Repeat, + "mirrored_repeat" => TilingMode::MirroredRepeat, + _ => return Err(DecodeError::Field("tiling")), + }, + from, + to, + low: noise_value(required(&object, "from_value")?)?, + high: noise_value(required(&object, "to_value")?)?, + } + } + "minecraft:noise" => GraphNode::Noise { + noise: self.noise(&object)?, + xz_scale: double(required(&object, "xz_scale")?)?, + y_scale: double(required(&object, "y_scale")?)?, + shift_x: self.optional_input(&object, "shift_x", 0.0, depth)?, + shift_y: self.optional_input(&object, "shift_y", 0.0, depth)?, + shift_z: self.optional_input(&object, "shift_z", 0.0, depth)?, + }, + "minecraft:shift" | "minecraft:shift_a" | "minecraft:shift_b" => { + GraphNode::OffsetNoise { + noise: self.noise(&object)?, + kind: match kind.as_str() { + "minecraft:shift" => ShiftNoiseKind::Shift, + "minecraft:shift_a" => ShiftNoiseKind::ShiftA, + _ => ShiftNoiseKind::ShiftB, + }, + } + } + "minecraft:old_blended_noise" => GraphNode::BlendedNoise(BlendedNoise { + xz_scale: double_range( + required(&object, "xz_scale")?, + "xz_scale", + 0.001, + 1000.0, + )?, + y_scale: double_range(required(&object, "y_scale")?, "y_scale", 0.001, 1000.0)?, + xz_factor: double_range( + required(&object, "xz_factor")?, + "xz_factor", + 0.001, + 1000.0, + )?, + y_factor: double_range( + required(&object, "y_factor")?, + "y_factor", + 0.001, + 1000.0, + )?, + smear_scale_multiplier: double_range( + required(&object, "smear_scale_multiplier")?, + "smear_scale_multiplier", + 1.0, + 8.0, + )?, + }), + "minecraft:slice" => GraphNode::Slice { + axis: axis(required(&object, "axis")?)?, + coordinate: integer(required(&object, "coordinate")?)?, + input: self.input(&object, "input", depth)?, + }, + "minecraft:interpolated" => GraphNode::Interpolated { + input: self.input(&object, "input", depth)?, + xz: int_range( + required(&object, "cell_size_xz")?, + "cell_size_xz", + 1, + i32::MAX, + )?, + y: int_range( + required(&object, "cell_size_y")?, + "cell_size_y", + 1, + i32::MAX, + )?, + }, + "minecraft:find_top_surface" => GraphNode::Surface { + density: self.input(&object, "density", depth)?, + upper: self.input(&object, "upper_bound", depth)?, + lower: int_range( + required(&object, "lower_bound")?, + "lower_bound", + -4064, + 4062, + )?, + height: int_range( + required(&object, "cell_height")?, + "cell_height", + 1, + i32::MAX, + )?, + }, + "minecraft:clamp" => { + let min = noise_value(required(&object, "min")?)?; + let max = noise_value(required(&object, "max")?)?; + if max < min { + return Err(DecodeError::Field("clamp bounds")); + } + GraphNode::Clamp { + input: self.input(&object, "input", depth)?, + min, + max, + } + } + "minecraft:range_choice" => GraphNode::Choice { + input: self.input(&object, "input", depth)?, + min: noise_value(required(&object, "min_inclusive")?)?, + max: noise_value(required(&object, "max_exclusive")?)?, + inside: self.input(&object, "when_in_range", depth)?, + outside: self.input(&object, "when_out_of_range", depth)?, + }, + "minecraft:lerp" => GraphNode::Lerp { + alpha: self.input(&object, "alpha", depth)?, + first: self.input(&object, "first", depth)?, + second: self.input(&object, "second", depth)?, + }, + "minecraft:interval_select" => { + let thresholds: Vec<Box<RawValue>> = + serde_json::from_str(required(&object, "thresholds")?.get())?; + let thresholds: Vec<f32> = thresholds + .iter() + .map(|raw| noise_value(raw)) + .collect::<Result<_, _>>()?; + let functions: Vec<Box<RawValue>> = + serde_json::from_str(required(&object, "functions")?.get())?; + if functions.len() < 2 + || functions.len() > 256 + || functions.len() != thresholds.len() + 1 + || thresholds + .windows(2) + .any(|pair| pair[0].total_cmp(&pair[1]).is_gt()) + { + return Err(DecodeError::Field("interval selection")); + } + let input = self.input(&object, "input", depth)?; + let branches = functions + .iter() + .map(|raw| self.decode(raw, depth + 1)) + .collect::<Result<_, _>>()?; + GraphNode::IntervalSelect { + input, + thresholds: Arc::from(thresholds), + branches, + } + } + "minecraft:distance_to_point" => { + let raw: Vec<Box<RawValue>> = + serde_json::from_str(required(&object, "point")?.get())?; + if raw.len() != 3 { + return Err(DecodeError::Field("point")); + } + let point = [integer(&raw[0])?, integer(&raw[1])?, integer(&raw[2])?]; + let metric = match string(required(&object, "metric")?)?.as_str() { + "euclidean" => DistanceMetric::Euclidean, + "euclidean_squared" => DistanceMetric::EuclideanSquared, + "manhattan" => DistanceMetric::Manhattan, + "chebyshev" => DistanceMetric::Chebyshev, + _ => return Err(DecodeError::Field("metric")), + }; + GraphNode::DistanceToPoint { point, metric } + } + "minecraft:spline" => { + GraphNode::Spline(self.spline(required(&object, "spline")?, depth + 1)?) + } + _ => { + return Err(DecodeError::Registry(format!( + "unknown density type: {kind}" + ))); + } + } + }; + Ok(self.graph.insert(node)?) + } + fn spline( + &mut self, + raw: &RawValue, + depth: usize, + ) -> Result<CubicSpline<FunctionId>, DecodeError> { + if depth > 256 { + return Err(DecodeError::Field("spline nesting")); + } + if !raw.get().starts_with('{') { + return Ok(CubicSpline::Constant(float(raw)?)); + } + let object: Object = serde_json::from_str(raw.get())?; + let coordinate = self.input(&object, "coordinate", depth)?; + let points: Vec<Box<RawValue>> = serde_json::from_str(required(&object, "points")?.get())?; + let points = points + .iter() + .map(|raw| { + let point: Object = serde_json::from_str(raw.get())?; + Ok(SplinePoint { + location: float(required(&point, "location")?)?, + derivative: float(required(&point, "derivative")?)?, + value: self.spline(required(&point, "value")?, depth + 1)?, + }) + }) + .collect::<Result<_, DecodeError>>()?; + CubicSpline::multipoint(coordinate, points) + .map_err(|error| DecodeError::Graph(error.into())) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use horizon_core::density::{SamplerContext, graph::DensityCompiler}; + #[test] + fn numeric_tokens_keep_negative_zero_and_avoid_double_rounding() { + let densities = BTreeMap::from([ + ("minecraft:negative_zero".into(), "-0".into()), + ( + "minecraft:rounded".into(), + "1.0000000596046447753906250000000001".into(), + ), + ]); + let registry = DensityRegistry::from_json(&BTreeMap::new(), &densities).unwrap(); + let zero = registry.value("minecraft:negative_zero").unwrap(); + let rounded = registry.value("minecraft:rounded").unwrap(); + let compiler = DensityCompiler::new(registry.into_graph()); + let mut context = SamplerContext::default(); + assert_eq!( + compiler + .compile_raw(zero) + .unwrap() + .sample_value(&mut context, [0; 3]) + .unwrap() + .to_bits(), + 0x8000_0000 + ); + assert_eq!( + compiler + .compile_raw(rounded) + .unwrap() + .sample_value(&mut context, [0; 3]) + .unwrap() + .to_bits(), + 0x3f80_0001 + ); + } + #[test] + fn forward_references_share_named_holders_and_reject_cycles_or_missing_values() { + let mut densities = BTreeMap::from([ + ( + "minecraft:a".into(), + r#"{"type":"add","left":"z","right":"minecraft:z"}"#.into(), + ), + ("minecraft:z".into(), "0.5".into()), + ]); + let registry = DensityRegistry::from_json(&BTreeMap::new(), &densities).unwrap(); + let root = registry.value("minecraft:a").unwrap(); + let compiler = DensityCompiler::new(registry.into_graph()); + assert_eq!( + compiler + .compile_raw(root) + .unwrap() + .sample_value(&mut SamplerContext::default(), [0; 3]) + .unwrap(), + 1.0 + ); + densities.insert("minecraft:z".into(), r#""a""#.into()); + assert!(DensityRegistry::from_json(&BTreeMap::new(), &densities).is_err()); + densities.remove("minecraft:z"); + assert!(DensityRegistry::from_json(&BTreeMap::new(), &densities).is_err()); + } + #[test] + fn codec_validation_rejects_invalid_gradients_intervals_and_splines() { + for json in [ + r#"{"type":"gradient","axis":"y","from_coordinate":0,"to_coordinate":0,"from_value":0,"to_value":1}"#, + r#"{"type":"interval_select","input":0,"thresholds":[0,-0],"functions":[0,1,2]}"#, + r#"{"type":"interpolated","input":0,"cell_size_xz":0,"cell_size_y":8}"#, + r#"{"type":"spline","spline":{"coordinate":0,"points":[]}}"#, + r#"{"type":"clamp","input":0,"min":1,"max":-1}"#, + ] { + assert!( + DensityRegistry::from_json( + &BTreeMap::new(), + &BTreeMap::from([("minecraft:a".into(), json.into())]) + ) + .is_err(), + "{json}" + ); + } + } +} diff --git a/crates/horizon-world/src/worldgen/disk.rs b/crates/horizon-world/src/worldgen/disk.rs new file mode 100644 index 000000000..f088c616f --- /dev/null +++ b/crates/horizon-world/src/worldgen/disk.rs @@ -0,0 +1,168 @@ +//! Circular descending replacement columns and postprocessing above each run. +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + block_predicate::BlockPredicate, + feature::FeatureWorld, + int_range, + placement::{PlacementContext, PlacementQueryError}, + required, + state_provider::{BlockStateProvider, StateProviderError}, + value_provider::IntProvider, +}; +use crate::registry::BlockStateId; +use horizon_core::random::{InvalidBound, RandomSource}; +#[derive(Clone, Debug)] +pub struct DiskFeature { + provider: BlockStateProvider, + target: BlockPredicate, + radius: IntProvider, + half_height: i32, + air: [BlockStateId; 3], +} +#[derive(Debug)] +pub enum DiskError<E> { + Random(InvalidBound), + Provider(StateProviderError<E>), + Query(PlacementQueryError), + World(E), + WorkLimit, +} +impl<E: std::fmt::Display> std::fmt::Display for DiskError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Random(e) => e.fmt(f), + Self::Provider(e) => e.fmt(f), + Self::Query(e) => e.fmt(f), + Self::World(e) => e.fmt(f), + Self::WorkLimit => f.write_str("disk feature work limit exceeded"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for DiskError<E> {} +impl DiskFeature { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + Self::decode(json, bindings, 0, &mut 65536) + } + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + if depth > 128 || *remaining == 0 { + return Err(DecodeError::Field("disk depth or work")); + } + *remaining -= 1; + let object: Object = serde_json::from_str(json)?; + let (providers, catalog, _) = bindings + .simple_blocks + .as_ref() + .ok_or(DecodeError::Field("disk provider bindings"))?; + let provider = catalog.provider_with_budget( + required(&object, "state_provider")?.get(), + providers, + depth + 1, + remaining, + )?; + let target = BlockPredicate::decode_with_blocks( + required(&object, "target")?.get(), + depth + 1, + remaining, + Some(bindings), + )?; + let radius = IntProvider::decode(required(&object, "radius")?, depth + 1, remaining)?; + if radius.bounds()[0] < 0 || radius.bounds()[1] > 8 { + return Err(DecodeError::Field("disk radius range")); + } + let half_height = int_range(required(&object, "half_height")?, "disk half height", 0, 4)?; + Ok(Self { + provider, + target, + radius, + half_height, + air: bindings.air, + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + ) -> Result<bool, DiskError<W::Error>> { + let top = origin[1].wrapping_add(self.half_height); + let bottom = origin[1].wrapping_sub(self.half_height).wrapping_sub(1); + let radius = self.radius.sample(random).map_err(DiskError::Random)?; + let x0 = origin[0].wrapping_sub(radius); + let x1 = origin[0].wrapping_add(radius); + let z0 = origin[2].wrapping_sub(radius); + let z1 = origin[2].wrapping_add(radius); + let min_x = x0.min(x1); + let min_z = z0.min(z1); + let width = x0.max(x1).wrapping_sub(min_x).wrapping_add(1); + let depth = z0.max(z1).wrapping_sub(min_z).wrapping_add(1); + let count = width.wrapping_mul(depth); + let mut index = 0; + let mut remaining = 1_048_576; + let mut any = false; + while index != count { + spend(&mut remaining)?; + let x = min_x.wrapping_add(index % width); + let z = min_z.wrapping_add(index / width); + index = index.wrapping_add(1); + let dx = x.wrapping_sub(origin[0]); + let dz = z.wrapping_sub(origin[2]); + if dx.wrapping_mul(dx).wrapping_add(dz.wrapping_mul(dz)) > radius.wrapping_mul(radius) { + continue; + } + let mut y = top; + let mut previous_placed = false; + while y > bottom { + spend(&mut remaining)?; + let p = [x, y, z]; + if self.target.test(world, p).map_err(DiskError::Query)? { + if let Some(state) = self + .provider + .get_optional_state(world, random, p) + .map_err(DiskError::Provider)? + { + world.set_block(p, state, 2).map_err(DiskError::World)?; + if !previous_placed { + self.mark_above(world, p)?; + } + any = true; + previous_placed = true; + } + } else { + previous_placed = false; + } + y = y.wrapping_sub(1); + } + } + Ok(any) + } + fn mark_above<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + mut p: [i32; 3], + ) -> Result<(), DiskError<W::Error>> { + for _ in 0..2 { + p[1] = p[1].wrapping_add(1); + if self + .air + .contains(&world.block(p).map_err(DiskError::World)?) + { + break; + } + world.mark_postprocessing(p).map_err(DiskError::Query)?; + } + Ok(()) + } +} +fn spend<E>(remaining: &mut usize) -> Result<(), DiskError<E>> { + if *remaining == 0 { + return Err(DiskError::WorkLimit); + } + *remaining -= 1; + Ok(()) +} diff --git a/crates/horizon-world/src/worldgen/dripstone.rs b/crates/horizon-world/src/worldgen/dripstone.rs new file mode 100644 index 000000000..2358bd723 --- /dev/null +++ b/crates/horizon-world/src/worldgen/dripstone.rs @@ -0,0 +1,803 @@ +//! `minecraft:speleothem_cluster` and `minecraft:large_dripstone` +//! (SpeleothemClusterFeature, LargeDripstoneFeature and SpeleothemUtils). +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + feature::FeatureWorld, + feature_graph::FeatureExecutionError, + int_range, number_text, optional, + placement::{PlacementContext, PlacementQueryError}, + required, + tree::{TreeDecoder, TreeResult, kind, read, unit_float, write}, + tree_blocks::{self as tb, TreeBlocks}, + value_provider::{FloatProvider, IntProvider}, +}; +use crate::{heightmap::HeightmapType, registry::BlockStateId}; +use horizon_core::{geometry::trig, random::RandomSource}; +use std::{collections::BTreeSet, sync::Arc}; + +fn query<E>(error: PlacementQueryError) -> FeatureExecutionError<E> { + FeatureExecutionError::Query(error) +} +/// Column.scan result: optional floor and ceiling edge heights. +#[derive(Clone, Copy, Debug)] +struct Column { + floor: Option<i32>, + ceiling: Option<i32>, +} +impl Column { + fn height(&self) -> Option<i32> { + match (self.floor, self.ceiling) { + (Some(floor), Some(ceiling)) => Some(ceiling - floor - 1), + _ => None, + } + } +} + +/// Shared speleothem block classification. +#[derive(Clone, Debug)] +struct Speleothem { + base: BlockStateId, + pointed: BlockStateId, + replaceable: Arc<BTreeSet<BlockStateId>>, + lava: BlockStateId, + blocks: Arc<TreeBlocks>, +} +impl Speleothem { + fn new( + bindings: &FeatureBlockBindings<'_>, + base: BlockStateId, + pointed: BlockStateId, + replaceable: Arc<BTreeSet<BlockStateId>>, + ) -> Result<Self, DecodeError> { + let registry = bindings.registry(); + let default = |state: BlockStateId| { + registry + .default_state(®istry.state(state).unwrap().name) + .ok_or(DecodeError::Field("speleothem block")) + }; + Ok(Self { + base: default(base)?, + pointed: default(pointed)?, + replaceable, + lava: registry + .default_state("minecraft:lava") + .ok_or(DecodeError::Field("lava"))?, + blocks: bindings.tree_blocks()?, + }) + } + fn empty_or_water(&self, s: BlockStateId) -> bool { + self.blocks.is_air(s) || self.blocks.has(s, tb::WATER_BLOCK) + } + fn empty_water_or_lava(&self, s: BlockStateId) -> bool { + self.empty_or_water(s) || self.blocks.same_block(s, self.lava) + } + fn is_base(&self, s: BlockStateId) -> bool { + self.blocks.same_block(s, self.base) || self.replaceable.contains(&s) + } + fn scan<W: FeatureWorld>( + &self, + world: &mut W, + pos: [i32; 3], + range: i32, + edge: impl Fn(&Self, BlockStateId) -> bool, + ) -> TreeResult<Option<Column>, W::Error> { + if !self.empty_or_water(read(world, pos)?) { + return Ok(None); + } + let mut scan = |step: i32| -> TreeResult<Option<i32>, W::Error> { + let mut p = pos; + let mut i = 1; + while i < range && self.empty_or_water(read(world, p)?) { + p[1] = p[1].wrapping_add(step); + i += 1; + } + Ok(edge(self, read(world, p)?).then_some(p[1])) + }; + let ceiling = scan(1)?; + let floor = scan(-1)?; + Ok(Some(Column { floor, ceiling })) + } + fn pointed_state(&self, up: bool, thickness: &str) -> Option<BlockStateId> { + let state = self.blocks.with( + self.pointed, + "vertical_direction", + if up { "up" } else { "down" }, + )?; + self.blocks.with(state, "thickness", thickness) + } + /// SpeleothemUtils.growSpeleothem. + #[allow(clippy::too_many_arguments)] + fn grow<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + start: [i32; 3], + up: bool, + height: i32, + merged: bool, + ) -> TreeResult<(), W::Error> { + let step = if up { 1 } else { -1 }; + if !self.is_base(read(world, tb::offset(start, 0, -step, 0))?) { + return Ok(()); + } + let mut sequence = Vec::new(); + if height >= 3 { + sequence.push("base"); + sequence.extend(std::iter::repeat_n("middle", (height - 3) as usize)); + } + if height >= 2 { + sequence.push("frustum"); + } + if height >= 1 { + sequence.push(if merged { "tip_merge" } else { "tip" }); + } + let mut p = start; + for thickness in sequence { + let mut state = self + .pointed_state(up, thickness) + .ok_or(FeatureExecutionError::InvalidState)?; + let water = self.blocks.has(read(world, p)?, tb::WATER_FLUID); + state = self.blocks.waterlogged(state, water); + write(world, p, state, 2)?; + p[1] = p[1].wrapping_add(step); + } + Ok(()) + } + fn place_base_if_possible<W: FeatureWorld>( + &self, + world: &mut W, + p: [i32; 3], + ) -> TreeResult<bool, W::Error> { + if self.replaceable.contains(&read(world, p)?) { + write(world, p, self.base, 2)?; + return Ok(true); + } + Ok(false) + } +} + +fn float_provider( + raw: &serde_json::value::RawValue, + low: f32, + high: f32, +) -> Result<FloatProvider, DecodeError> { + let value = FloatProvider::from_json(raw.get())?; + let [min, max] = value.bounds(); + if min < low || max > high { + return Err(DecodeError::Field("float provider bounds")); + } + Ok(value) +} +fn float_range( + raw: &serde_json::value::RawValue, + name: &'static str, + low: f32, + high: f32, +) -> Result<f32, DecodeError> { + let value: f32 = number_text(raw)? + .parse() + .map_err(|_| DecodeError::Field(name))?; + if !(low..=high).contains(&value) { + return Err(DecodeError::Field(name)); + } + Ok(value) +} +fn block_state( + bindings: &FeatureBlockBindings<'_>, + raw: &serde_json::value::RawValue, +) -> Result<BlockStateId, DecodeError> { + bindings + .codec + .decode(raw.get(), false) + .map_err(|e| DecodeError::Registry(e.to_string())) +} +fn clamped_lerp(factor: f64, min: f64, max: f64) -> f64 { + if factor < 0.0 { + min + } else if factor > 1.0 { + max + } else { + min + factor * (max - min) + } +} +fn clamped_lerp_f32(factor: f32, min: f32, max: f32) -> f32 { + if factor < 0.0 { + min + } else if factor > 1.0 { + max + } else { + min + factor * (max - min) + } +} + +#[derive(Clone, Debug)] +pub struct SpeleothemClusterFeature { + speleothem: Speleothem, + search_range: i32, + height: IntProvider, + radius: IntProvider, + max_height_diff: i32, + height_deviation: i32, + layer_thickness: IntProvider, + density: FloatProvider, + wetness: FloatProvider, + chance_at_max_distance: f32, + max_distance_from_edge: i32, + max_distance_from_center: i32, +} +impl SpeleothemClusterFeature { + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + if kind(&object)? != "minecraft:speleothem_cluster" { + return Err(DecodeError::Field("speleothem cluster type")); + } + let mut decoder = TreeDecoder { + bindings, + depth, + remaining, + }; + let int = |name: &'static str, low: i32, high: i32| { + int_range(required(&object, name)?, name, low, high) + }; + Ok(Self { + speleothem: Speleothem::new( + bindings, + block_state(bindings, required(&object, "base_block")?)?, + block_state(bindings, required(&object, "pointed_block")?)?, + decoder.block_set(required(&object, "replaceable_blocks")?)?, + )?, + search_range: int("floor_to_ceiling_search_range", 1, 512)?, + height: decoder.int_provider(required(&object, "height")?, 1, 128)?, + radius: decoder.int_provider(required(&object, "radius")?, 1, 128)?, + max_height_diff: int("max_stalagmite_stalactite_height_diff", 0, 64)?, + height_deviation: int("height_deviation", 1, 64)?, + layer_thickness: decoder.int_provider( + required(&object, "speleothem_block_layer_thickness")?, + 0, + 128, + )?, + density: float_provider(required(&object, "density")?, 0.0, 2.0)?, + wetness: float_provider(required(&object, "wetness")?, 0.0, 2.0)?, + chance_at_max_distance: unit_float( + required(&object, "chance_of_speleothem_at_max_distance_from_center")?, + "chance_of_speleothem_at_max_distance_from_center", + )?, + max_distance_from_edge: int( + "max_distance_from_edge_affecting_chance_of_speleothem", + 1, + 64, + )?, + max_distance_from_center: int("max_distance_from_center_affecting_height_bias", 1, 64)?, + }) + } + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + ) -> TreeResult<bool, W::Error> { + if !self.speleothem.empty_or_water(read(world, origin)?) { + return Ok(false); + } + let height = self.height.sample(random)?; + let wetness = self.wetness.sample(random); + let density = self.density.sample(random); + let x_radius = self.radius.sample(random)?; + let z_radius = self.radius.sample(random)?; + for dx in -x_radius..=x_radius { + for dz in -z_radius..=z_radius { + let distance = (x_radius - dx.abs()).min(z_radius - dz.abs()); + let chance = f64::from(clamped_lerp_f32( + (distance as f32 - 0.0) / (self.max_distance_from_edge as f32 - 0.0), + self.chance_at_max_distance, + 1.0, + )); + let p = tb::offset(origin, dx, 0, dz); + self.column(world, random, p, dx, dz, wetness, chance, height, density)?; + } + } + Ok(true) + } + #[allow(clippy::too_many_arguments)] + fn column<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + pos: [i32; 3], + dx: i32, + dz: i32, + chance_of_water: f32, + chance: f64, + cluster_height: i32, + density: f32, + ) -> TreeResult<(), W::Error> { + let s = &self.speleothem; + let Some(base_column) = + s.scan(world, pos, self.search_range, |s, st| !s.empty_or_water(st))? + else { + return Ok(()); + }; + let ceiling = base_column.ceiling; + let base_floor = base_column.floor; + if ceiling.is_none() && base_floor.is_none() { + return Ok(()); + } + let want_pool = random.next_float() < chance_of_water; + let column = match base_floor { + Some(floor_y) + if want_pool && self.can_place_pool(world, [pos[0], floor_y, pos[2]])? => + { + let water = s + .blocks + .default_state("minecraft:water") + .ok_or(FeatureExecutionError::InvalidState)?; + write(world, [pos[0], floor_y, pos[2]], water, 2)?; + Column { + floor: Some(floor_y - 1), + ceiling, + } + } + _ => base_column, + }; + let floor = column.floor; + let want_stalactite = random.next_double() < chance; + let stalactite_height = match ceiling { + Some(c) + if want_stalactite + && !s + .blocks + .same_block(read(world, [pos[0], c, pos[2]])?, s.lava) => + { + let thickness = self.layer_thickness.sample(random)?; + self.replace_with_base(world, [pos[0], c, pos[2]], thickness, 1)?; + let max = match floor { + Some(f) => cluster_height.min(c - f), + None => cluster_height, + }; + self.speleothem_height(random, dx, dz, density, max)? + } + _ => 0, + }; + let want_stalagmite = random.next_double() < chance; + let stalagmite_height = match floor { + Some(f) + if want_stalagmite + && !s + .blocks + .same_block(read(world, [pos[0], f, pos[2]])?, s.lava) => + { + let thickness = self.layer_thickness.sample(random)?; + self.replace_with_base(world, [pos[0], f, pos[2]], thickness, -1)?; + if ceiling.is_some() { + let diff = self.max_height_diff; + 0.max(stalactite_height + random.next_int_bound(diff * 2 + 1)? - diff) + } else { + self.speleothem_height(random, dx, dz, density, cluster_height)? + } + } + _ => 0, + }; + let (actual_stalactite, actual_stalagmite) = match (ceiling, floor) { + (Some(c), Some(f)) if c - stalactite_height <= f + stalagmite_height => { + let lowest_bottom = (c - stalactite_height).max(f + 1); + let highest_top = (f + stalagmite_height).min(c - 1); + let bottom = + random.next_int_bound(highest_top + 1 - lowest_bottom + 1)? + lowest_bottom; + (c - bottom, bottom - 1 - f) + } + _ => (stalactite_height, stalagmite_height), + }; + let merge = random.next_boolean() + && actual_stalactite > 0 + && actual_stalagmite > 0 + && column + .height() + .is_some_and(|h| actual_stalactite + actual_stalagmite == h); + if let Some(c) = ceiling { + s.grow( + world, + [pos[0], c - 1, pos[2]], + false, + actual_stalactite, + merge, + )?; + } + if let Some(f) = floor { + s.grow( + world, + [pos[0], f + 1, pos[2]], + true, + actual_stalagmite, + merge, + )?; + } + Ok(()) + } + fn speleothem_height<E>( + &self, + random: &mut impl RandomSource, + dx: i32, + dz: i32, + density: f32, + max_height: i32, + ) -> TreeResult<i32, E> { + if random.next_float() > density { + return Ok(0); + } + let distance = dx.abs() + dz.abs(); + let mean = clamped_lerp( + (f64::from(distance) - 0.0) / (f64::from(self.max_distance_from_center) - 0.0), + f64::from(max_height) / 2.0, + 0.0, + ) as f32; + let value = mean + random.next_gaussian() as f32 * self.height_deviation as f32; + let clamped = if value < 0.0 { + 0.0 + } else { + value.min(max_height as f32) + }; + Ok(clamped as i32) + } + fn can_place_pool<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + p: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let s = &self.speleothem; + let state = read(world, p)?; + if s.blocks.has(state, tb::WATER_BLOCK) + || s.blocks.same_block(state, s.base) + || s.blocks.same_block(state, s.pointed) + { + return Ok(false); + } + if s.blocks + .has(read(world, tb::offset(p, 0, 1, 0))?, tb::WATER_FLUID) + { + return Ok(false); + } + for direction in tb::HORIZONTAL { + if !self.adjacent_ok(world, tb::relative(p, direction, 1))? { + return Ok(false); + } + } + self.adjacent_ok(world, tb::offset(p, 0, -1, 0)) + } + fn adjacent_ok<W: FeatureWorld>( + &self, + world: &mut W, + p: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let state = read(world, p)?; + let b = &self.speleothem.blocks; + Ok(b.has(state, tb::BASE_STONE_OVERWORLD) || b.has(state, tb::WATER_FLUID)) + } + fn replace_with_base<W: FeatureWorld>( + &self, + world: &mut W, + first: [i32; 3], + count: i32, + step: i32, + ) -> TreeResult<(), W::Error> { + let mut p = first; + for _ in 0..count { + if !self.speleothem.place_base_if_possible(world, p)? { + return Ok(()); + } + p[1] = p[1].wrapping_add(step); + } + Ok(()) + } +} + +#[derive(Clone, Debug)] +pub struct LargeDripstoneFeature { + speleothem: Speleothem, + search_range: i32, + column_radius: IntProvider, + height_scale: FloatProvider, + max_radius_ratio: f32, + stalactite_bluntness: FloatProvider, + stalagmite_bluntness: FloatProvider, + wind_speed: FloatProvider, + min_radius_for_wind: i32, + min_bluntness_for_wind: f32, +} +struct LargeDripstone { + root: [i32; 3], + up: bool, + radius: i32, + bluntness: f64, + scale: f64, +} +#[derive(Clone, Copy)] +struct Wind { + origin_y: i32, + speed: Option<[f64; 3]>, + max_offset: i32, +} +impl Wind { + fn offset(&self, p: [i32; 3]) -> [i32; 3] { + let Some(speed) = self.speed else { + return p; + }; + let dy = f64::from(self.origin_y.wrapping_sub(p[1])); + let clamp = |v: f64| { + let v = v.floor() as i32; + if v < -self.max_offset { + -self.max_offset + } else { + v.min(self.max_offset) + } + }; + tb::offset(p, clamp(speed[0] * dy), 0, clamp(speed[2] * dy)) + } +} +fn speleothem_height(distance: f64, radius: f64, scale: f64, bluntness: f64) -> f64 { + let distance = if distance < bluntness { + bluntness + } else { + distance + }; + let r = distance / radius * 0.384; + let part1 = 0.75 * r.powf(1.3333333333333333); + let part2 = r.powf(0.6666666666666666); + let part3 = 0.3333333333333333 * r.ln(); + let height = (scale * (part1 - part2 - part3)).max(0.0); + height / 0.384 * radius +} +impl LargeDripstone { + fn height_at(&self, radius: f32) -> i32 { + speleothem_height( + f64::from(radius), + f64::from(self.radius), + self.scale, + self.bluntness, + ) as i32 + } +} +impl LargeDripstoneFeature { + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + if kind(&object)? != "minecraft:large_dripstone" { + return Err(DecodeError::Field("large dripstone type")); + } + let registry = bindings.registry(); + let dripstone = registry + .default_state("minecraft:dripstone_block") + .ok_or(DecodeError::Field("dripstone block"))?; + let pointed = registry + .default_state("minecraft:pointed_dripstone") + .ok_or(DecodeError::Field("pointed dripstone"))?; + let mut decoder = TreeDecoder { + bindings, + depth, + remaining, + }; + Ok(Self { + speleothem: Speleothem::new( + bindings, + dripstone, + pointed, + decoder.block_set(required(&object, "replaceable_blocks")?)?, + )?, + search_range: optional(&object, "floor_to_ceiling_search_range") + .map(|raw| int_range(raw, "floor_to_ceiling_search_range", 1, 512)) + .transpose()? + .unwrap_or(30), + column_radius: decoder.int_provider(required(&object, "column_radius")?, 1, 16)?, + height_scale: float_provider(required(&object, "height_scale")?, 0.0, 20.0)?, + max_radius_ratio: float_range( + required(&object, "max_column_radius_to_cave_height_ratio")?, + "max_column_radius_to_cave_height_ratio", + 0.1, + 1.0, + )?, + stalactite_bluntness: float_provider( + required(&object, "stalactite_bluntness")?, + 0.1, + 10.0, + )?, + stalagmite_bluntness: float_provider( + required(&object, "stalagmite_bluntness")?, + 0.1, + 10.0, + )?, + wind_speed: float_provider(required(&object, "wind_speed")?, 0.0, 2.0)?, + min_radius_for_wind: int_range( + required(&object, "min_radius_for_wind")?, + "min_radius_for_wind", + 0, + 100, + )?, + min_bluntness_for_wind: float_range( + required(&object, "min_bluntness_for_wind")?, + "min_bluntness_for_wind", + 0.0, + 5.0, + )?, + }) + } + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let s = &self.speleothem; + if !s.empty_or_water(read(world, origin)?) { + return Ok(false); + } + let Some(column) = s.scan(world, origin, self.search_range, |s, st| { + s.is_base(st) || s.blocks.same_block(st, s.lava) + })? + else { + return Ok(false); + }; + let (Some(floor), Some(ceiling)) = (column.floor, column.ceiling) else { + return Ok(false); + }; + let height = ceiling - floor - 1; + if height < 4 { + return Ok(false); + } + let by_height = (height as f32 * self.max_radius_ratio) as i32; + let [min_r, max_r] = self.column_radius.bounds(); + let max_radius = if by_height < min_r { + min_r + } else { + by_height.min(max_r) + }; + let radius = random.next_int_bound(max_radius - min_r + 1)? + min_r; + let mut stalactite = LargeDripstone { + root: [origin[0], ceiling - 1, origin[2]], + up: false, + radius, + bluntness: f64::from(self.stalactite_bluntness.sample(random)), + scale: f64::from(self.height_scale.sample(random)), + }; + let mut stalagmite = LargeDripstone { + root: [origin[0], floor + 1, origin[2]], + up: true, + radius, + bluntness: f64::from(self.stalagmite_bluntness.sample(random)), + scale: f64::from(self.height_scale.sample(random)), + }; + let suitable = |d: &LargeDripstone| { + d.radius >= self.min_radius_for_wind + && d.bluntness >= f64::from(self.min_bluntness_for_wind) + }; + let wind = if suitable(&stalactite) && suitable(&stalagmite) { + let speed = self.wind_speed.sample(random); + let direction = random.next_float() * (std::f32::consts::PI - 0.0) + 0.0; + Wind { + origin_y: origin[1], + speed: Some([ + f64::from(trig::cos(f64::from(direction)) * speed), + 0.0, + f64::from(trig::sin(f64::from(direction)) * speed), + ]), + max_offset: 16 - radius, + } + } else { + Wind { + origin_y: 0, + speed: None, + max_offset: 0, + } + }; + let top = self.move_back(world, &mut stalactite, wind)?; + let bottom = self.move_back(world, &mut stalagmite, wind)?; + if top { + self.place_blocks(world, random, &stalactite, wind)?; + } + if bottom { + self.place_blocks(world, random, &stalagmite, wind)?; + } + Ok(true) + } + fn move_back<W: FeatureWorld>( + &self, + world: &mut W, + d: &mut LargeDripstone, + wind: Wind, + ) -> TreeResult<bool, W::Error> { + let s = &self.speleothem; + while d.radius > 1 { + let mut root = d.root; + let tries = 10.min(d.height_at(0.0)); + for _ in 0..tries { + if s.blocks.same_block(read(world, root)?, s.lava) { + return Ok(false); + } + if self.circle_embedded(world, wind.offset(root), d.radius)? { + d.root = root; + return Ok(true); + } + root[1] = root[1].wrapping_add(if d.up { -1 } else { 1 }); + } + d.radius /= 2; + } + Ok(false) + } + fn circle_embedded<W: FeatureWorld>( + &self, + world: &mut W, + center: [i32; 3], + radius: i32, + ) -> TreeResult<bool, W::Error> { + let s = &self.speleothem; + if s.empty_water_or_lava(read(world, center)?) { + return Ok(false); + } + let increment = 6.0f32 / radius as f32; + let mut angle = 0.0f32; + while angle < (std::f64::consts::PI * 2.0) as f32 { + let dx = (trig::cos(f64::from(angle)) * radius as f32) as i32; + let dz = (trig::sin(f64::from(angle)) * radius as f32) as i32; + if s.empty_water_or_lava(read(world, tb::offset(center, dx, 0, dz))?) { + return Ok(false); + } + angle += increment; + } + Ok(true) + } + fn place_blocks<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + d: &LargeDripstone, + wind: Wind, + ) -> TreeResult<(), W::Error> { + let s = &self.speleothem; + for dx in -d.radius..=d.radius { + for dz in -d.radius..=d.radius { + let current = ((dx * dx + dz * dz) as f32).sqrt(); + if current > d.radius as f32 { + continue; + } + let mut height = d.height_at(current); + if height <= 0 { + continue; + } + if f64::from(random.next_float()) < 0.2 { + let factor = random.next_float() * (1.0f32 - 0.8f32) + 0.8f32; + height = (height as f32 * factor) as i32; + } + let mut pos = tb::offset(d.root, dx, 0, dz); + let mut out_of_stone = false; + let max_y = if d.up { + world + .height(HeightmapType::WorldSurfaceWg, pos[0], pos[2]) + .map_err(query)? + } else { + i32::MAX + }; + let mut i = 0; + while i < height && pos[1] < max_y { + let adjusted = wind.offset(pos); + let state = read(world, adjusted)?; + if s.empty_water_or_lava(state) { + out_of_stone = true; + write(world, adjusted, s.base, 2)?; + } else if out_of_stone && s.blocks.has(state, tb::BASE_STONE_OVERWORLD) { + break; + } + pos[1] = pos[1].wrapping_add(if d.up { 1 } else { -1 }); + i += 1; + } + } + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/worldgen/end_gateway.rs b/crates/horizon-world/src/worldgen/end_gateway.rs new file mode 100644 index 000000000..b1c11f21b --- /dev/null +++ b/crates/horizon-world/src/worldgen/end_gateway.rs @@ -0,0 +1,123 @@ +//! End gateway structure placement and conditional block-entity configuration. +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + feature::FeatureWorld, + integer, optional, + placement::{PlacementContext, PlacementQueryError}, + required, +}; +use crate::registry::BlockStateId; +use serde_json::value::RawValue; + +#[derive(Clone, Debug)] +pub struct EndGatewayFeature { + exit: Option<[i32; 3]>, + exact: bool, + air: BlockStateId, + bedrock: BlockStateId, + gateway: BlockStateId, +} +#[derive(Debug)] +pub enum EndGatewayError<E> { + World(E), + Query(PlacementQueryError), + WorkLimit, +} +impl<E: std::fmt::Display> std::fmt::Display for EndGatewayError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Query(e) => e.fmt(f), + Self::WorkLimit => f.write_str("end gateway work limit exceeded"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for EndGatewayError<E> {} +impl EndGatewayFeature { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let exact = serde_json::from_str(required(&object, "exact")?.get())?; + let exit = optional(&object, "exit") + .map(|raw| { + let values: Vec<Box<RawValue>> = serde_json::from_str(raw.get())?; + if values.len() != 3 { + return Err(DecodeError::Field("gateway exit")); + } + Ok([ + integer(&values[0])?, + integer(&values[1])?, + integer(&values[2])?, + ]) + }) + .transpose()?; + let get = |name| { + bindings + .registry() + .default_state(name) + .ok_or_else(|| DecodeError::Registry(format!("unknown gateway block {name}"))) + }; + Ok(Self { + exit, + exact, + air: get("minecraft:air")?, + bedrock: get("minecraft:bedrock")?, + gateway: get("minecraft:end_gateway")?, + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + origin: [i32; 3], + ) -> Result<bool, EndGatewayError<W::Error>> { + let offset = + |d: [i32; 3]| -> [i32; 3] { std::array::from_fn(|i| origin[i].wrapping_add(d[i])) }; + let a = offset([-1, -2, -1]); + let b = offset([1, 2, 1]); + let min: [i32; 3] = std::array::from_fn(|i| a[i].min(b[i])); + let sizes: [i32; 3] = + std::array::from_fn(|i| a[i].max(b[i]).wrapping_sub(min[i]).wrapping_add(1)); + let count = sizes[0].wrapping_mul(sizes[1]).wrapping_mul(sizes[2]); + let mut index: i32 = 0; + let mut remaining = 1_048_576; + while index != count { + if remaining == 0 { + return Err(EndGatewayError::WorkLimit); + } + remaining -= 1; + let quotient = index / sizes[0]; + let p = [ + min[0].wrapping_add(index % sizes[0]), + min[1].wrapping_add(quotient % sizes[1]), + min[2].wrapping_add(quotient / sizes[1]), + ]; + index = index.wrapping_add(1); + let x = p[0] == origin[0]; + let y = p[1] == origin[1]; + let z = p[2] == origin[2]; + let cap = p[1].wrapping_sub(origin[1]).wrapping_abs() == 2; + let center = x && y && z; + let state = if center { + self.gateway + } else if y { + self.air + } else if cap && x && z || !cap && (x || z) { + self.bedrock + } else { + self.air + }; + world + .set_block(p, state, 3) + .map_err(EndGatewayError::World)?; + if center { + if let Some(exit) = self.exit { + // Native code looks up the entity even when the write returned false. + world + .configure_end_gateway(p, exit, self.exact) + .map_err(EndGatewayError::Query)?; + } + } + } + Ok(true) + } +} diff --git a/crates/horizon-world/src/worldgen/end_podium.rs b/crates/horizon-world/src/worldgen/end_podium.rs new file mode 100644 index 000000000..3fafc591c --- /dev/null +++ b/crates/horizon-world/src/worldgen/end_podium.rs @@ -0,0 +1,174 @@ +//! End exit podium construction and active-portal replacement requests. +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + feature::FeatureWorld, + optional, + placement::{PlacementContext, PlacementQueryError}, +}; +use crate::registry::BlockStateId; +use std::{collections::BTreeSet, sync::Arc}; +#[derive(Clone, Debug)] +pub struct EndPodiumFeature { + active: bool, + bedrock: BlockStateId, + air: BlockStateId, + end_stone: BlockStateId, + portal: BlockStateId, + torches: [BlockStateId; 4], + same_blocks: [Arc<BTreeSet<BlockStateId>>; 3], +} +#[derive(Debug)] +pub enum EndPodiumError<E> { + World(E), + Query(PlacementQueryError), + WorkLimit, +} +impl<E: std::fmt::Display> std::fmt::Display for EndPodiumError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Query(e) => e.fmt(f), + Self::WorkLimit => f.write_str("end podium work limit exceeded"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for EndPodiumError<E> {} +impl EndPodiumFeature { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let active = optional(&object, "active") + .map(|v| serde_json::from_str(v.get())) + .transpose()? + .unwrap_or(false); + let get = |name| { + bindings + .registry() + .default_state(name) + .ok_or_else(|| DecodeError::Registry(format!("unknown podium block {name}"))) + }; + let torches = ["north", "east", "south", "west"].map(|direction| { + bindings + .codec + .decode( + &format!(r#"{{"id":"wall_torch","properties":{{"facing":"{direction}"}}}}"#), + false, + ) + .map_err(|e| DecodeError::Registry(e.to_string())) + }); + let [north, east, south, west] = torches; + let same_blocks = [ + "minecraft:end_stone", + "minecraft:air", + "minecraft:end_portal", + ] + .map(|name| { + bindings + .blocks + .get(name) + .cloned() + .ok_or_else(|| DecodeError::Registry(format!("unknown podium block {name}"))) + }); + let [end_stone, air, portal] = same_blocks; + Ok(Self { + active, + bedrock: get("minecraft:bedrock")?, + air: get("minecraft:air")?, + end_stone: get("minecraft:end_stone")?, + portal: get("minecraft:end_portal")?, + torches: [north?, east?, south?, west?], + same_blocks: [end_stone?, air?, portal?], + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + origin: [i32; 3], + ) -> Result<bool, EndPodiumError<W::Error>> { + let a = offset(origin, [-4, -1, -4]); + let b = offset(origin, [4, 32, 4]); + let min: [i32; 3] = std::array::from_fn(|i| a[i].min(b[i])); + let sizes: [i32; 3] = + std::array::from_fn(|i| a[i].max(b[i]).wrapping_sub(min[i]).wrapping_add(1)); + let count = sizes[0].wrapping_mul(sizes[1]).wrapping_mul(sizes[2]); + let mut index: i32 = 0; + let mut remaining = 1_048_576; + while index != count { + if remaining == 0 { + return Err(EndPodiumError::WorkLimit); + } + remaining -= 1; + let quotient = index / sizes[0]; + let p = [ + min[0].wrapping_add(index % sizes[0]), + min[1].wrapping_add(quotient % sizes[1]), + min[2].wrapping_add(quotient / sizes[1]), + ]; + index = index.wrapping_add(1); + let d: [f64; 3] = std::array::from_fn(|i| f64::from(p[i]) - f64::from(origin[i])); + let distance = d[0] * d[0] + d[1] * d[1] + d[2] * d[2]; + let inner = distance < 2.5 * 2.5; + if !inner && distance >= 3.5 * 3.5 { + continue; + } + if p[1] < origin[1] { + if inner { + world + .set_block(p, self.bedrock, 3) + .map_err(EndPodiumError::World)?; + } else { + self.replace(world, p, self.end_stone, 0)?; + } + } else if p[1] > origin[1] { + self.replace(world, p, self.air, 1)?; + } else if !inner { + world + .set_block(p, self.bedrock, 3) + .map_err(EndPodiumError::World)?; + } else if self.active { + self.replace(world, p, self.portal, 2)?; + } else { + world + .set_block(p, self.air, 3) + .map_err(EndPodiumError::World)?; + } + } + for y in 0..4 { + world + .set_block(offset(origin, [0, y, 0]), self.bedrock, 3) + .map_err(EndPodiumError::World)?; + } + for (delta, state) in [[0, 2, -1], [1, 2, 0], [0, 2, 1], [-1, 2, 0]] + .into_iter() + .zip(self.torches) + { + world + .set_block(offset(origin, delta), state, 3) + .map_err(EndPodiumError::World)?; + } + Ok(true) + } + fn replace<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + p: [i32; 3], + state: BlockStateId, + kind: usize, + ) -> Result<(), EndPodiumError<W::Error>> { + if self.active { + if self.same_blocks[kind].contains(&world.block(p).map_err(EndPodiumError::World)?) { + return Ok(()); + } + world + .destroy_block_without_entity(p, true) + .map_err(EndPodiumError::Query)?; + } + world + .set_block(p, state, 3) + .map_err(EndPodiumError::World)?; + Ok(()) + } +} +fn offset(p: [i32; 3], d: [i32; 3]) -> [i32; 3] { + std::array::from_fn(|i| p[i].wrapping_add(d[i])) +} diff --git a/crates/horizon-world/src/worldgen/end_spike.rs b/crates/horizon-world/src/worldgen/end_spike.rs new file mode 100644 index 000000000..a2c00ee08 --- /dev/null +++ b/crates/horizon-world/src/worldgen/end_spike.rs @@ -0,0 +1,243 @@ +//! `minecraft:end_spike`: the obsidian pillars around the main End island. +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + feature::FeatureWorld, + feature_graph::FeatureExecutionError, + integer, optional, + placement::{PlacementContext, PlacementQueryError}, + required, + tree::{TreeResult, kind, write}, + tree_blocks::{self as tb, TreeBlocks}, +}; +use crate::registry::BlockStateId; +use horizon_core::random::{LegacyRandom, RandomSource}; +use std::sync::Arc; + +fn query<E>(error: PlacementQueryError) -> FeatureExecutionError<E> { + FeatureExecutionError::Query(error) +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct EndSpike { + pub center_x: i32, + pub center_z: i32, + pub radius: i32, + pub height: i32, + pub guarded: bool, +} +/// EndSpikeFeature.getSpikesForLevel (SpikeCacheLoader), from the world seed. +pub fn spikes_for_seed(seed: i64) -> Vec<EndSpike> { + let key = LegacyRandom::new(seed).next_long() & 65535; + let mut random = LegacyRandom::new(key); + let mut sizes: Vec<i32> = (0..10).collect(); + tb::shuffle(&mut sizes, &mut random).expect("positive shuffle bounds"); + (0..10) + .map(|i| { + let angle = + 2.0 * (-std::f64::consts::PI + (std::f64::consts::PI / 10.0) * f64::from(i)); + let size = sizes[i as usize]; + EndSpike { + center_x: (42.0 * angle.cos()).floor() as i32, + center_z: (42.0 * angle.sin()).floor() as i32, + radius: 2 + size / 3, + height: 76 + size * 3, + guarded: size == 1 || size == 2, + } + }) + .collect() +} + +#[derive(Clone, Debug)] +pub struct EndSpikeFeature { + spikes: Vec<EndSpike>, + crystal_invulnerable: bool, + beam_target: Option<[i32; 3]>, + obsidian: BlockStateId, + air: BlockStateId, + iron_bars: BlockStateId, + bedrock: BlockStateId, + fire: BlockStateId, + blocks: Arc<TreeBlocks>, +} +impl EndSpikeFeature { + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + if kind(&object)? != "minecraft:end_spike" { + return Err(DecodeError::Field("end spike type")); + } + let raw: Vec<Object> = serde_json::from_str(required(&object, "spikes")?.get())?; + let int = |o: &Object, name: &str| -> Result<i32, DecodeError> { + optional(o, name) + .map(integer) + .transpose() + .map(|v| v.unwrap_or(0)) + }; + let spikes = raw + .iter() + .map(|o| { + Ok(EndSpike { + center_x: int(o, "centerX")?, + center_z: int(o, "centerZ")?, + radius: int(o, "radius")?, + height: int(o, "height")?, + guarded: optional(o, "guarded") + .map(|v| serde_json::from_str::<bool>(v.get())) + .transpose()? + .unwrap_or(false), + }) + }) + .collect::<Result<_, DecodeError>>()?; + let beam_target = optional(&object, "crystal_beam_target") + .map(|raw| -> Result<[i32; 3], DecodeError> { + let v: Vec<Box<serde_json::value::RawValue>> = serde_json::from_str(raw.get())?; + if v.len() != 3 { + return Err(DecodeError::Field("beam target")); + } + Ok([integer(&v[0])?, integer(&v[1])?, integer(&v[2])?]) + }) + .transpose()?; + let registry = bindings.registry(); + let default = |name: &str| { + registry + .default_state(name) + .ok_or_else(|| DecodeError::Registry(format!("missing spike block {name}"))) + }; + Ok(Self { + spikes, + crystal_invulnerable: optional(&object, "crystal_invulnerable") + .map(|v| serde_json::from_str::<bool>(v.get())) + .transpose()? + .unwrap_or(false), + beam_target, + obsidian: default("minecraft:obsidian")?, + air: default("minecraft:air")?, + iron_bars: default("minecraft:iron_bars")?, + bedrock: default("minecraft:bedrock")?, + fire: default("minecraft:fire")?, + blocks: bindings.tree_blocks()?, + }) + } + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let spikes = if self.spikes.is_empty() { + spikes_for_seed(world.world_seed().map_err(query)?) + } else { + self.spikes.clone() + }; + for spike in spikes { + if origin[0] >> 4 == spike.center_x >> 4 && origin[2] >> 4 == spike.center_z >> 4 { + self.place_spike(world, random, spike)?; + } + } + Ok(true) + } + fn bars<E>( + &self, + north: bool, + south: bool, + west: bool, + east: bool, + ) -> TreeResult<BlockStateId, E> { + let mut state = self.iron_bars; + for (name, value) in [ + ("north", north), + ("south", south), + ("west", west), + ("east", east), + ] { + state = self + .blocks + .with(state, name, if value { "true" } else { "false" }) + .ok_or(FeatureExecutionError::InvalidState)?; + } + Ok(state) + } + fn place_spike<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + spike: EndSpike, + ) -> TreeResult<(), W::Error> { + let r = spike.radius; + let min_y = world.min_y().map_err(query)?; + let (cx, cz) = (spike.center_x, spike.center_z); + for z in cz - r..=cz + r { + for y in min_y..=spike.height + 10 { + for x in cx - r..=cx + r { + let dx = f64::from(x) - f64::from(cx); + let dz = f64::from(z) - f64::from(cz); + let p = [x, y, z]; + if dx * dx + dz * dz <= f64::from(r * r + 1) && y < spike.height { + write(world, p, self.obsidian, 3)?; + } else if y > 65 { + write(world, p, self.air, 3)?; + } + } + } + } + if spike.guarded { + for dx in -2i32..=2 { + for dz in -2i32..=2 { + for dy in 0..=3 { + let x_side = dx.abs() == 2; + let z_side = dz.abs() == 2; + let top = dy == 3; + if x_side || z_side || top { + let x_edge = dx == -2 || dx == 2 || top; + let z_edge = dz == -2 || dz == 2 || top; + let state = self.bars( + x_edge && dz != -2, + x_edge && dz != 2, + z_edge && dx != -2, + z_edge && dx != 2, + )?; + write(world, [cx + dx, spike.height + dy, cz + dz], state, 3)?; + } + } + } + } + } + let yaw = random.next_float() * 360.0; + world + .spawn_end_crystal( + [ + f64::from(cx) + 0.5, + f64::from(spike.height + 1), + f64::from(cz) + 0.5, + ], + yaw, + self.beam_target, + self.crystal_invulnerable, + ) + .map_err(query)?; + let crystal = [cx, spike.height + 1, cz]; + write(world, tb::offset(crystal, 0, -1, 0), self.bedrock, 3)?; + // FireBlock.getState above sturdy bedrock is the plain fire default. + write(world, crystal, self.fire, 3)?; + Ok(()) + } +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn spike_layout_is_a_permutation_of_sizes() { + let spikes = spikes_for_seed(0); + assert_eq!(spikes.len(), 10); + let mut heights: Vec<i32> = spikes.iter().map(|s| s.height).collect(); + heights.sort_unstable(); + assert_eq!(heights, (0..10).map(|s| 76 + s * 3).collect::<Vec<_>>()); + assert_eq!(spikes.iter().filter(|s| s.guarded).count(), 2); + assert_eq!((spikes[0].center_x, spikes[0].center_z), (42, 0)); + assert_eq!(spikes_for_seed(0), spikes_for_seed(0)); + } +} diff --git a/crates/horizon-world/src/worldgen/feature.rs b/crates/horizon-world/src/worldgen/feature.rs new file mode 100644 index 000000000..1dac307e8 --- /dev/null +++ b/crates/horizon-world/src/worldgen/feature.rs @@ -0,0 +1,162 @@ +//! Initial block-writing features. Full feature registries and block behavior +//! remain separate work; world access supplies mutation and update semantics. +use super::{DecodeError, Object, density::identifier, required}; +use crate::registry::{BlockRegistry, BlockStateId}; +use horizon_core::random::{InvalidBound, RandomSource}; +#[derive(Clone, Copy, Debug)] +pub struct FeatureBlocks { + pub air: BlockStateId, + pub stone: BlockStateId, + pub cobblestone: BlockStateId, + pub end_stone: BlockStateId, + pub obsidian: BlockStateId, +} +impl FeatureBlocks { + pub fn from_registry(registry: &BlockRegistry) -> Result<Self, DecodeError> { + let get = |name| { + registry + .default_state(name) + .ok_or_else(|| DecodeError::Registry(format!("unknown feature block {name}"))) + }; + Ok(Self { + air: get("minecraft:air")?, + stone: get("minecraft:stone")?, + cobblestone: get("minecraft:cobblestone")?, + end_stone: get("minecraft:end_stone")?, + obsidian: get("minecraft:obsidian")?, + }) + } +} +pub trait FeatureWorld { + type Error; + fn block(&mut self, position: [i32; 3]) -> Result<BlockStateId, Self::Error>; + fn set_block( + &mut self, + position: [i32; 3], + state: BlockStateId, + flags: i32, + ) -> Result<bool, Self::Error>; +} +#[derive(Debug)] +pub enum FeatureError<E> { + Random(InvalidBound), + World(E), +} +impl<E: std::fmt::Display> std::fmt::Display for FeatureError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Random(e) => e.fmt(f), + Self::World(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for FeatureError<E> {} +impl<E> From<InvalidBound> for FeatureError<E> { + fn from(e: InvalidBound) -> Self { + Self::Random(e) + } +} +#[derive(Clone, Copy, Debug)] +pub enum BasicFeature { + VoidStartPlatform, + EndIsland, + EndPlatform, +} +impl BasicFeature { + pub fn from_json(json: &str) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + match identifier(&serde_json::from_str::<String>( + required(&object, "type")?.get(), + )?)? + .as_str() + { + "minecraft:void_start_platform" => Ok(Self::VoidStartPlatform), + "minecraft:end_island" => Ok(Self::EndIsland), + "minecraft:end_platform" => Ok(Self::EndPlatform), + _ => Err(DecodeError::Field("basic feature type")), + } + } + pub fn place<W: FeatureWorld>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + blocks: FeatureBlocks, + ) -> Result<bool, FeatureError<W::Error>> { + let [x, y, z] = origin; + match self { + Self::VoidStartPlatform => { + let (cx, cz) = (x >> 4, z >> 4); + if cx.wrapping_abs().max(cz.wrapping_abs()) > 1 { + return Ok(true); + } + let y = y.wrapping_add(3); + for z in cz.wrapping_shl(4)..=cz.wrapping_shl(4).wrapping_add(15) { + for x in cx.wrapping_shl(4)..=cx.wrapping_shl(4).wrapping_add(15) { + if 8_i32 + .wrapping_sub(x) + .wrapping_abs() + .max(8_i32.wrapping_sub(z).wrapping_abs()) + <= 16 + { + let state = if x == 8 && z == 8 { + blocks.cobblestone + } else { + blocks.stone + }; + world + .set_block([x, y, z], state, 2) + .map_err(FeatureError::World)?; + } + } + } + } + Self::EndIsland => { + let mut radius = random.next_int_bound(3)? as f32 + 4.; + let mut dy = 0_i32; + while radius > 0.5 { + let low = (-radius).floor() as i32; + let high = radius.ceil() as i32; + for dx in low..=high { + for dz in low..=high { + if (dx * dx + dz * dz) as f32 <= (radius + 1.) * (radius + 1.) { + world + .set_block( + [ + x.wrapping_add(dx), + y.wrapping_add(dy), + z.wrapping_add(dz), + ], + blocks.end_stone, + 3, + ) + .map_err(FeatureError::World)?; + } + } + } + radius -= random.next_int_bound(2)? as f32 + 0.5; + dy -= 1; + } + } + Self::EndPlatform => { + for dz in -2..=2 { + for dx in -2..=2 { + for dy in -1..3 { + let p = [x.wrapping_add(dx), y.wrapping_add(dy), z.wrapping_add(dz)]; + let state = if dy == -1 { + blocks.obsidian + } else { + blocks.air + }; + // Both target blocks have one state in the pinned registry. + if world.block(p).map_err(FeatureError::World)? != state { + world.set_block(p, state, 3).map_err(FeatureError::World)?; + } + } + } + } + } + } + Ok(true) + } +} diff --git a/crates/horizon-world/src/worldgen/feature_catalog.rs b/crates/horizon-world/src/worldgen/feature_catalog.rs new file mode 100644 index 000000000..0b8d56cc4 --- /dev/null +++ b/crates/horizon-world/src/worldgen/feature_catalog.rs @@ -0,0 +1,304 @@ +//! Immutable feature resource snapshots. Requested roots resolve named feature +//! and placed-feature holders and tags into bounded executable inline trees. +//! This is not a complete datapack registry loader or live-reload implementation. +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + density::identifier, + feature_graph::{FeatureDefinition, PlacedFeatureDefinition}, + required, + tags::TagDefinitions, +}; +use serde_json::value::RawValue; +use std::collections::{BTreeMap, BTreeSet}; + +pub struct FeatureCatalog { + features: BTreeMap<String, Box<RawValue>>, + placed: BTreeMap<String, Box<RawValue>>, + tags: BTreeMap<String, Vec<String>>, + empty_tags: BTreeSet<String>, +} +struct Expansion { + remaining: usize, + active: Vec<(bool, String)>, +} +impl Expansion { + fn visit(&mut self, depth: usize) -> Result<(), DecodeError> { + if depth > 128 || self.remaining == 0 { + return Err(DecodeError::Field("feature resource expansion limit")); + } + self.remaining -= 1; + Ok(()) + } +} +fn resources( + source: &BTreeMap<String, String>, +) -> Result<BTreeMap<String, Box<RawValue>>, DecodeError> { + if source.len() > 8192 { + return Err(DecodeError::Field("feature resource count")); + } + let mut result = BTreeMap::new(); + for (name, json) in source { + if result + .insert(identifier(name)?, serde_json::from_str(json)?) + .is_some() + { + return Err(DecodeError::Field("duplicate feature resource")); + } + } + Ok(result) +} +fn raw(json: String) -> Result<Box<RawValue>, DecodeError> { + Ok(RawValue::from_string(json)?) +} +fn entries(value: &RawValue) -> Result<Vec<Box<RawValue>>, DecodeError> { + let values: Vec<Box<RawValue>> = serde_json::from_str(value.get())?; + if values.len() > 8192 { + return Err(DecodeError::Field("feature resource list")); + } + Ok(values) +} +impl FeatureCatalog { + /// Stores source JSON without validating unused feature algorithms. Resolving + /// a root validates its entire reachable tree, including unselected children. + pub fn from_resources( + features: &BTreeMap<String, String>, + placed: &BTreeMap<String, String>, + tags: &TagDefinitions, + ) -> Result<Self, DecodeError> { + let features = resources(features)?; + let placed = resources(placed)?; + let built = tags + .build(|name, _| placed.contains_key(name).then(|| name.to_owned())) + .map_err(|e| DecodeError::Registry(e.to_string()))?; + Ok(Self { + features, + placed, + empty_tags: built + .tags + .iter() + .filter_map(|(name, values)| values.is_empty().then_some(name.clone())) + .collect(), + tags: built.tags, + }) + } + pub fn feature(&self, json: &str) -> Result<FeatureDefinition, DecodeError> { + self.feature_with_optional_blocks(json, None) + } + pub fn feature_with_blocks( + &self, + json: &str, + blocks: &FeatureBlockBindings<'_>, + ) -> Result<FeatureDefinition, DecodeError> { + self.feature_with_optional_blocks(json, Some(blocks)) + } + fn feature_with_optional_blocks( + &self, + json: &str, + blocks: Option<&FeatureBlockBindings<'_>>, + ) -> Result<FeatureDefinition, DecodeError> { + let value: Box<RawValue> = serde_json::from_str(json)?; + let expanded = self.expand_feature( + &value, + 0, + &mut Expansion { + remaining: 65536, + active: vec![], + }, + )?; + FeatureDefinition::from_catalog_json(&expanded, &self.empty_tags, blocks) + } + pub fn placed_feature(&self, json: &str) -> Result<PlacedFeatureDefinition, DecodeError> { + self.placed_with_optional_blocks(json, None) + } + pub fn placed_feature_with_blocks( + &self, + json: &str, + blocks: &FeatureBlockBindings<'_>, + ) -> Result<PlacedFeatureDefinition, DecodeError> { + self.placed_with_optional_blocks(json, Some(blocks)) + } + fn placed_with_optional_blocks( + &self, + json: &str, + blocks: Option<&FeatureBlockBindings<'_>>, + ) -> Result<PlacedFeatureDefinition, DecodeError> { + let value: Box<RawValue> = serde_json::from_str(json)?; + let expanded = self.expand_placed( + &value, + 0, + &mut Expansion { + remaining: 65536, + active: vec![], + }, + )?; + PlacedFeatureDefinition::from_catalog_json(&expanded, &self.empty_tags, blocks) + } + fn named( + &self, + name: &str, + placed: bool, + depth: usize, + work: &mut Expansion, + ) -> Result<String, DecodeError> { + let name = identifier(name)?; + let key = (placed, name.clone()); + if work.active.contains(&key) { + return Err(DecodeError::Registry(format!( + "cyclic feature reference {name}" + ))); + } + let value = if placed { &self.placed } else { &self.features } + .get(&name) + .ok_or_else(|| DecodeError::Registry(format!("unknown feature reference {name}")))?; + work.active.push(key); + let result = if placed { + self.expand_placed(value, depth + 1, work) + } else { + self.expand_feature(value, depth + 1, work) + }; + work.active.pop(); + result + } + fn expand_placed( + &self, + value: &RawValue, + depth: usize, + work: &mut Expansion, + ) -> Result<String, DecodeError> { + work.visit(depth)?; + if let Ok(name) = serde_json::from_str::<String>(value.get()) { + return self.named(&name, true, depth, work); + } + let mut object: Object = serde_json::from_str(value.get())?; + let feature = self.expand_feature(required(&object, "feature")?, depth + 1, work)?; + object.insert("feature".into(), raw(feature)?); + Ok(serde_json::to_string(&object)?) + } + fn expand_set( + &self, + value: &RawValue, + depth: usize, + work: &mut Expansion, + ) -> Result<String, DecodeError> { + let values = if let Ok(name) = serde_json::from_str::<String>(value.get()) { + if let Some(tag) = name.strip_prefix('#') { + let tag = identifier(tag)?; + let names = self.tags.get(&tag).ok_or_else(|| { + DecodeError::Registry(format!("unknown placed-feature tag {tag}")) + })?; + // Native nonEmptyHolderSet validates direct lists, but permits + // a named tag whose bound contents are empty. + if names.is_empty() { + return Ok(serde_json::to_string(&format!("#{tag}"))?); + } + if names.len() > 8192 { + return Err(DecodeError::Field("placed-feature tag size")); + } + names + .iter() + .map(|name| raw(serde_json::to_string(name)?)) + .collect::<Result<Vec<_>, DecodeError>>()? + } else { + vec![value.to_owned()] + } + } else if value.get().trim_start().starts_with('[') { + entries(value)? + } else { + vec![value.to_owned()] + }; + let expanded = values + .iter() + .map(|v| raw(self.expand_placed(v, depth + 1, work)?)) + .collect::<Result<Vec<_>, _>>()?; + Ok(serde_json::to_string(&expanded)?) + } + fn expand_feature( + &self, + value: &RawValue, + depth: usize, + work: &mut Expansion, + ) -> Result<String, DecodeError> { + work.visit(depth)?; + if let Ok(name) = serde_json::from_str::<String>(value.get()) { + return self.named(&name, false, depth, work); + } + let mut object: Object = serde_json::from_str(value.get())?; + let kind = identifier(&serde_json::from_str::<String>( + required(&object, "type")?.get(), + )?)?; + match kind.as_str() { + "minecraft:single_block_pillar" => { + if let Some(value) = super::optional(&object, "cap_feature") { + let expanded = self.expand_placed(value, depth + 1, work)?; + object.insert("cap_feature".into(), raw(expanded)?); + } + } + "minecraft:vegetation_patch" | "minecraft:waterlogged_vegetation_patch" => { + let expanded = + self.expand_placed(required(&object, "vegetation_feature")?, depth + 1, work)?; + object.insert("vegetation_feature".into(), raw(expanded)?); + } + "minecraft:coral_tree" | "minecraft:coral_claw" | "minecraft:root_system" => { + let expanded = + self.expand_placed(required(&object, "feature")?, depth + 1, work)?; + object.insert("feature".into(), raw(expanded)?); + } + "minecraft:tree" => { + // PaleMossDecorator places the registry's pale_moss_patch by key. + let pale_moss = super::optional(&object, "decorators") + .map(|raw| serde_json::from_str::<Vec<Object>>(raw.get())) + .transpose()? + .unwrap_or_default() + .iter() + .any(|d| { + d.get("type").is_some_and(|t| { + serde_json::from_str::<String>(t.get()) + .ok() + .and_then(|t| identifier(&t).ok()) + .as_deref() + == Some("minecraft:pale_moss") + }) + }); + const PATCH: &str = "minecraft:pale_moss_patch"; + if pale_moss && self.features.contains_key(PATCH) { + let expanded = self.named(PATCH, false, depth, work)?; + object.insert(super::tree::GROUND_FEATURE_KEY.into(), raw(expanded)?); + } + } + "minecraft:sequence" | "minecraft:overlay" | "minecraft:simple_random_selector" => { + let expanded = self.expand_set(required(&object, "features")?, depth + 1, work)?; + object.insert("features".into(), raw(expanded)?); + } + "minecraft:random_boolean_selector" => { + for name in ["feature_true", "feature_false"] { + let expanded = self.expand_placed(required(&object, name)?, depth + 1, work)?; + object.insert(name.into(), raw(expanded)?); + } + } + "minecraft:random_selector" | "minecraft:weighted_random_selector" => { + let key = if kind == "minecraft:random_selector" { + "feature" + } else { + "data" + }; + let values = entries(required(&object, "features")?)?; + let mut expanded = Vec::with_capacity(values.len()); + for value in values { + let mut entry: Object = serde_json::from_str(value.get())?; + let child = self.expand_placed(required(&entry, key)?, depth + 1, work)?; + entry.insert(key.into(), raw(child)?); + expanded.push(entry); + } + object.insert("features".into(), raw(serde_json::to_string(&expanded)?)?); + if kind == "minecraft:random_selector" { + let child = + self.expand_placed(required(&object, "default")?, depth + 1, work)?; + object.insert("default".into(), raw(child)?); + } + } + _ => {} + } + Ok(serde_json::to_string(&object)?) + } +} diff --git a/crates/horizon-world/src/worldgen/feature_graph.rs b/crates/horizon-world/src/worldgen/feature_graph.rs new file mode 100644 index 000000000..014ea3f42 --- /dev/null +++ b/crates/horizon-world/src/worldgen/feature_graph.rs @@ -0,0 +1,1106 @@ +//! Inline feature composition. Named holders, tags and registry reloads remain +//! separate from this bounded executable tree. +use super::block_predicate::PredicateBlockResolver; +use super::{ + DecodeError, Object, + block_feature::{ + BlockFeatureError, FeatureBlockBindings, FillLayerFeature, ReplaceBlockFeature, + }, + density::identifier, + feature::{BasicFeature, FeatureBlocks, FeatureError, FeatureWorld}, + number_text, + ore_feature::ScatteredOreFeature, + placement::{ + FeaturePlacementError, FeaturePlacer, PlacementContext, PlacementModifier, + PlacementQueryError, + }, + required, + weighted::OptionalWeightedList, +}; +use horizon_core::random::{InvalidBound, RandomSource}; +use serde_json::value::RawValue; +use std::{cell::Cell, collections::BTreeSet}; + +#[derive(Clone, Debug)] +pub struct PlacedFeatureDefinition { + pub feature: Box<FeatureDefinition>, + pub placement: Vec<PlacementModifier>, +} +#[derive(Clone, Debug)] +pub enum FeatureDefinition { + Basic(BasicFeature), + NeighborSpread { + provider: super::state_provider::BlockStateProvider, + neighbors: std::sync::Arc<std::collections::BTreeSet<crate::registry::BlockStateId>>, + can_replace: super::block_predicate::BlockPredicate, + attempts: super::value_provider::IntProvider, + xz_offset: super::value_provider::IntProvider, + y_offset: super::value_provider::IntProvider, + }, + Pillar { + provider: super::state_provider::BlockStateProvider, + can_replace: super::block_predicate::BlockPredicate, + direction: horizon_core::geometry::Direction, + chance: f32, + cap: Option<Box<PlacedFeatureDefinition>>, + }, + BlockColumn(super::block_column::BlockColumnFeature), + BlockPile(super::block_pile::BlockPileFeature), + Disk(super::disk::DiskFeature), + Spring(super::spring::SpringFeature), + Vines(super::vines::VinesFeature), + SnowAndFreeze(super::snow_freeze::SnowAndFreezeFeature), + Delta(super::delta::DeltaFeature), + Bamboo(super::bamboo::BambooFeature), + ReplaceBlobs(super::replace_blobs::ReplaceBlobsFeature), + EndPodium(super::end_podium::EndPodiumFeature), + EndGateway(super::end_gateway::EndGatewayFeature), + BonusChest(super::bonus_chest::BonusChestFeature), + ChorusPlant(super::chorus_plant::ChorusPlantFeature), + Speleothem(super::speleothem::SpeleothemFeature), + Spike(super::spike::SpikeFeature), + BlueIce(super::blue_ice::BlueIceFeature), + UnderwaterMagma(super::underwater_magma::UnderwaterMagmaFeature), + BlockBlob(super::block_blob::BlockBlobFeature), + SimpleBlock(super::simple_block::SimpleBlockFeature), + FillLayer(FillLayerFeature), + ReplaceBlock(ReplaceBlockFeature), + ScatteredOre(ScatteredOreFeature), + Ore(super::ore_feature::OreFeature), + Tree(Box<super::tree::TreeFeature>), + VegetationPatch(Box<super::vegetation::VegetationPatchFeature>), + Coral(Box<super::vegetation::CoralFeature>), + HugeMushroom(Box<super::vegetation::HugeMushroomFeature>), + MultifaceGrowth(Box<super::vegetation::MultifaceGrowthFeature>), + Lake(Box<super::cave::LakeFeature>), + MonsterRoom(Box<super::cave::MonsterRoomFeature>), + Geode(Box<super::cave::GeodeFeature>), + Iceberg(Box<super::iceberg::IcebergFeature>), + RootSystem(Box<super::root_system::RootSystemFeature>), + SpeleothemCluster(Box<super::dripstone::SpeleothemClusterFeature>), + LargeDripstone(Box<super::dripstone::LargeDripstoneFeature>), + HugeFungus(Box<super::fungus::HugeFungusFeature>), + SculkPatch(Box<super::sculk::SculkPatchFeature>), + EndSpike(Box<super::end_spike::EndSpikeFeature>), + ProjectedPatchySquare(Box<super::projected::ProjectedPatchySquareFeature>), + SteppedColumnCluster(Box<super::projected::SteppedColumnClusterFeature>), + FallenTree(Box<super::tree::FallenTreeFeature>), + NoOp, + Template(Box<super::structure::features::TemplateFeature>), + Fossil(Box<super::structure::features::FossilFeature>), + WeightedChoice(OptionalWeightedList<PlacedFeatureDefinition>), + Sequence(Vec<PlacedFeatureDefinition>), + Overlay(Vec<PlacedFeatureDefinition>), + BooleanChoice(Box<[PlacedFeatureDefinition; 2]>), + RandomChoice(Vec<PlacedFeatureDefinition>), + ChanceChoice { + features: Vec<(f32, PlacedFeatureDefinition)>, + fallback: Box<PlacedFeatureDefinition>, + }, +} +#[derive(Debug)] +pub enum FeatureExecutionError<E> { + Basic(FeatureError<E>), + Provider(super::state_provider::StateProviderError<E>), + BlockColumn(super::block_column::BlockColumnError<E>), + BlockPile(super::block_pile::BlockPileError<E>), + Disk(super::disk::DiskError<E>), + BlockBlob(super::block_blob::BlockBlobError<E>), + SnowAndFreeze(super::snow_freeze::SnowAndFreezeError<E>), + Delta(super::delta::DeltaError<E>), + Bamboo(super::bamboo::BambooError<E>), + ReplaceBlobs(super::replace_blobs::ReplaceBlobsError<E>), + EndPodium(super::end_podium::EndPodiumError<E>), + EndGateway(super::end_gateway::EndGatewayError<E>), + BonusChest(super::bonus_chest::BonusChestError<E>), + ChorusPlant(super::chorus_plant::ChorusPlantError<E>), + Speleothem(super::speleothem::SpeleothemError<E>), + Spike(super::spike::SpikeError<E>), + BlueIce(super::blue_ice::BlueIceError<E>), + UnderwaterMagma(super::underwater_magma::UnderwaterMagmaError<E>), + SimpleBlock(super::simple_block::SimpleBlockError<E>), + Random(InvalidBound), + Query(PlacementQueryError), + WorkLimit, + InvalidPendingIndex, + /// A block-state transition required by a feature is absent from the registry. + InvalidState, +} +impl<E: std::fmt::Display> std::fmt::Display for FeatureExecutionError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Basic(e) => e.fmt(f), + Self::Provider(e) => e.fmt(f), + Self::BlockColumn(e) => e.fmt(f), + Self::BlockPile(e) => e.fmt(f), + Self::Disk(e) => e.fmt(f), + Self::BlockBlob(e) => e.fmt(f), + Self::SnowAndFreeze(e) => e.fmt(f), + Self::Delta(e) => e.fmt(f), + Self::Bamboo(e) => e.fmt(f), + Self::ReplaceBlobs(e) => e.fmt(f), + Self::EndPodium(e) => e.fmt(f), + Self::EndGateway(e) => e.fmt(f), + Self::BonusChest(e) => e.fmt(f), + Self::ChorusPlant(e) => e.fmt(f), + Self::Speleothem(e) => e.fmt(f), + Self::Spike(e) => e.fmt(f), + Self::BlueIce(e) => e.fmt(f), + Self::UnderwaterMagma(e) => e.fmt(f), + Self::SimpleBlock(e) => e.fmt(f), + Self::Random(e) => e.fmt(f), + Self::Query(e) => e.fmt(f), + Self::WorkLimit => f.write_str("feature graph work limit exceeded"), + Self::InvalidPendingIndex => f.write_str("invalid pending modifier index"), + Self::InvalidState => f.write_str("feature block state outside registry"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for FeatureExecutionError<E> {} +impl<E> From<InvalidBound> for FeatureExecutionError<E> { + fn from(error: InvalidBound) -> Self { + Self::Random(error) + } +} +impl<E> From<FeaturePlacementError<Self>> for FeatureExecutionError<E> { + fn from(error: FeaturePlacementError<Self>) -> Self { + match error { + FeaturePlacementError::Feature(e) => e, + FeaturePlacementError::Random(e) => Self::Random(e), + FeaturePlacementError::World(e) => Self::Query(e), + FeaturePlacementError::WorkLimit => Self::WorkLimit, + FeaturePlacementError::InvalidPendingIndex => Self::InvalidPendingIndex, + } + } +} +struct Run { + blocks: FeatureBlocks, + depth: Cell<usize>, + remaining: Cell<usize>, +} +fn visit(depth: usize, remaining: &mut usize) -> Result<(), DecodeError> { + if depth > 128 || *remaining == 0 { + return Err(DecodeError::Field("feature graph depth or node count")); + } + *remaining -= 1; + Ok(()) +} +fn list(raw: &RawValue) -> Result<Vec<Box<RawValue>>, DecodeError> { + let values: Vec<Box<RawValue>> = serde_json::from_str(raw.get())?; + if values.len() > 8192 { + return Err(DecodeError::Field("feature list")); + } + Ok(values) +} +impl PlacedFeatureDefinition { + pub fn from_json(json: &str) -> Result<Self, DecodeError> { + Self::decode(json, 0, &mut 65536, &BTreeSet::new(), None) + } + pub fn from_json_with_blocks( + json: &str, + blocks: &FeatureBlockBindings<'_>, + ) -> Result<Self, DecodeError> { + Self::decode(json, 0, &mut 65536, &BTreeSet::new(), Some(blocks)) + } + pub(crate) fn from_catalog_json( + json: &str, + empty_tags: &BTreeSet<String>, + blocks: Option<&FeatureBlockBindings<'_>>, + ) -> Result<Self, DecodeError> { + Self::decode(json, 0, &mut 65536, empty_tags, blocks) + } + fn decode( + json: &str, + depth: usize, + remaining: &mut usize, + empty_tags: &BTreeSet<String>, + blocks: Option<&FeatureBlockBindings<'_>>, + ) -> Result<Self, DecodeError> { + visit(depth, remaining)?; + let object: Object = serde_json::from_str(json)?; + let feature = Box::new(FeatureDefinition::decode( + required(&object, "feature")?.get(), + depth + 1, + remaining, + empty_tags, + blocks, + )?); + let values = list(required(&object, "placement")?)?; + if values.len() > 1024 { + return Err(DecodeError::Field("feature modifier chain")); + } + let placement = values + .iter() + .map(|raw| { + PlacementModifier::decode_with_blocks( + raw.get(), + depth + 1, + remaining, + blocks.map(|b| b as &dyn super::block_predicate::PredicateBlockResolver), + ) + }) + .collect::<Result<_, _>>()?; + Ok(Self { feature, placement }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + blocks: FeatureBlocks, + ) -> Result<bool, FeatureExecutionError<W::Error>> { + self.place_in( + &mut FeaturePlacer::new(), + world, + random, + origin, + &Run { + blocks, + depth: Cell::new(0), + remaining: Cell::new(65536), + }, + ) + } + fn place_in<W: FeatureWorld + PlacementContext>( + &self, + placer: &mut FeaturePlacer, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + run: &Run, + ) -> Result<bool, FeatureExecutionError<W::Error>> { + if run.remaining.get() == 0 { + return Err(FeatureExecutionError::WorkLimit); + } + run.remaining.set(run.remaining.get() - 1); + Ok(placer.place_with_budget( + &self.placement, + world, + random, + origin, + &run.remaining, + |world, random, p| self.feature.place_inner(world, random, p, run), + )?) + } +} +impl FeatureDefinition { + pub fn from_json(json: &str) -> Result<Self, DecodeError> { + Self::decode(json, 0, &mut 65536, &BTreeSet::new(), None) + } + pub fn from_json_with_blocks( + json: &str, + blocks: &FeatureBlockBindings<'_>, + ) -> Result<Self, DecodeError> { + Self::decode(json, 0, &mut 65536, &BTreeSet::new(), Some(blocks)) + } + pub(crate) fn from_catalog_json( + json: &str, + empty_tags: &BTreeSet<String>, + blocks: Option<&FeatureBlockBindings<'_>>, + ) -> Result<Self, DecodeError> { + Self::decode(json, 0, &mut 65536, empty_tags, blocks) + } + fn decode( + json: &str, + depth: usize, + remaining: &mut usize, + empty_tags: &BTreeSet<String>, + blocks: Option<&FeatureBlockBindings<'_>>, + ) -> Result<Self, DecodeError> { + visit(depth, remaining)?; + let object: Object = serde_json::from_str(json)?; + let kind = identifier(&serde_json::from_str::<String>( + required(&object, "type")?.get(), + )?)?; + match kind.as_str() { + "minecraft:no_op" => Ok(Self::NoOp), + "minecraft:template" => super::structure::features::TemplateFeature::decode( + json, + blocks.ok_or(DecodeError::Field("template bindings"))?, + ) + .map(|f| Self::Template(Box::new(f))), + "minecraft:fossil" => super::structure::features::FossilFeature::decode( + json, + blocks.ok_or(DecodeError::Field("fossil bindings"))?, + ) + .map(|f| Self::Fossil(Box::new(f))), + "minecraft:freeze_top_layer" => super::snow_freeze::SnowAndFreezeFeature::new( + blocks.ok_or(DecodeError::Field("snow and freeze bindings"))?, + ) + .map(Self::SnowAndFreeze), + "minecraft:delta_feature" => super::delta::DeltaFeature::decode( + json, + blocks.ok_or(DecodeError::Field("delta bindings"))?, + depth + 1, + remaining, + ) + .map(Self::Delta), + "minecraft:bamboo" => super::bamboo::BambooFeature::from_json( + json, + blocks.ok_or(DecodeError::Field("bamboo bindings"))?, + ) + .map(Self::Bamboo), + "minecraft:netherrack_replace_blobs" => { + super::replace_blobs::ReplaceBlobsFeature::decode( + json, + blocks.ok_or(DecodeError::Field("replace blobs bindings"))?, + depth + 1, + remaining, + ) + .map(Self::ReplaceBlobs) + } + "minecraft:speleothem" => super::speleothem::SpeleothemFeature::from_json( + json, + blocks.ok_or(DecodeError::Field("speleothem bindings"))?, + ) + .map(Self::Speleothem), + "minecraft:chorus_plant" => super::chorus_plant::ChorusPlantFeature::new( + blocks.ok_or(DecodeError::Field("chorus plant bindings"))?, + ) + .map(Self::ChorusPlant), + "minecraft:bonus_chest" => super::bonus_chest::BonusChestFeature::new( + blocks.ok_or(DecodeError::Field("bonus chest bindings"))?, + ) + .map(Self::BonusChest), + "minecraft:end_gateway" => super::end_gateway::EndGatewayFeature::from_json( + json, + blocks.ok_or(DecodeError::Field("end gateway bindings"))?, + ) + .map(Self::EndGateway), + "minecraft:end_podium" => super::end_podium::EndPodiumFeature::from_json( + json, + blocks.ok_or(DecodeError::Field("end podium bindings"))?, + ) + .map(Self::EndPodium), + "minecraft:spike" => super::spike::SpikeFeature::decode( + json, + blocks.ok_or(DecodeError::Field("spike bindings"))?, + depth + 1, + remaining, + ) + .map(Self::Spike), + "minecraft:blue_ice" => super::blue_ice::BlueIceFeature::new( + blocks.ok_or(DecodeError::Field("blue ice bindings"))?, + ) + .map(Self::BlueIce), + "minecraft:underwater_magma" => { + super::underwater_magma::UnderwaterMagmaFeature::from_json( + json, + blocks.ok_or(DecodeError::Field("underwater magma bindings"))?, + ) + .map(Self::UnderwaterMagma) + } + "minecraft:vines" => super::vines::VinesFeature::new( + blocks.ok_or(DecodeError::Field("vine feature bindings"))?, + ) + .map(Self::Vines), + "minecraft:spring_feature" => super::spring::SpringFeature::from_json( + json, + blocks.ok_or(DecodeError::Field("spring bindings"))?, + ) + .map(Self::Spring), + "minecraft:block_blob" => super::block_blob::BlockBlobFeature::decode( + json, + blocks.ok_or(DecodeError::Field("block blob bindings"))?, + depth, + remaining, + ) + .map(Self::BlockBlob), + "minecraft:disk" => super::disk::DiskFeature::decode( + json, + blocks.ok_or(DecodeError::Field("disk bindings"))?, + depth, + remaining, + ) + .map(Self::Disk), + "minecraft:block_pile" => super::block_pile::BlockPileFeature::decode( + json, + blocks.ok_or(DecodeError::Field("block pile bindings"))?, + depth, + remaining, + ) + .map(Self::BlockPile), + "minecraft:random_neighbor_spread" => { + let bindings = + blocks.ok_or(DecodeError::Field("neighbor spread block bindings"))?; + let (providers, catalog, _) = bindings + .simple_blocks + .as_ref() + .ok_or(DecodeError::Field("neighbor spread provider bindings"))?; + let provider = catalog.provider_with_budget( + required(&object, "block")?.get(), + providers, + depth + 1, + remaining, + )?; + let neighbors = + bindings.predicate_block_set(required(&object, "accepted_neighbors")?.get())?; + let can_replace = super::block_predicate::BlockPredicate::decode_with_blocks( + required(&object, "can_replace")?.get(), + depth + 1, + remaining, + Some(bindings), + )?; + let mut integer = |name, low, high| { + let value = super::value_provider::IntProvider::decode( + required(&object, name)?, + depth + 1, + remaining, + )?; + let bounds = value.bounds(); + if bounds[0] < low || bounds[1] > high { + return Err(DecodeError::Field("neighbor spread integer range")); + } + Ok(value) + }; + let attempts = integer("attempts", 1, 3000)?; + let xz_offset = integer("xz_offset", -16, 16)?; + let y_offset = integer("y_offset", -16, 16)?; + Ok(Self::NeighborSpread { + provider, + neighbors, + can_replace, + attempts, + xz_offset, + y_offset, + }) + } + "minecraft:single_block_pillar" => { + let bindings = + blocks.ok_or(DecodeError::Field("pillar block bindings unavailable"))?; + let (providers, catalog, _) = bindings + .simple_blocks + .as_ref() + .ok_or(DecodeError::Field("pillar provider bindings unavailable"))?; + let provider = catalog.provider_with_budget( + required(&object, "block")?.get(), + providers, + depth + 1, + remaining, + )?; + let can_replace = match super::optional(&object, "can_replace") { + Some(raw) => super::block_predicate::BlockPredicate::decode_with_blocks( + raw.get(), + depth + 1, + remaining, + Some(bindings), + )?, + None => { + super::block_predicate::BlockPredicate::from_json(r#"{"type":"true"}"#)? + } + }; + let direction = + match serde_json::from_str::<String>(required(&object, "direction")?.get())? + .as_str() + { + "up" => horizon_core::geometry::Direction::Up, + "down" => horizon_core::geometry::Direction::Down, + _ => return Err(DecodeError::Field("pillar vertical direction")), + }; + let chance = match super::optional(&object, "chance_to_continue") { + Some(raw) => number_text(raw)? + .parse::<f64>() + .map_err(|_| DecodeError::Field("pillar chance"))? + as f32, + None => 1.0, + }; + if !(0.0..=1.0).contains(&chance) || chance.is_sign_negative() { + return Err(DecodeError::Field("pillar chance")); + } + let cap = super::optional(&object, "cap_feature") + .map(|raw| { + PlacedFeatureDefinition::decode( + raw.get(), + depth + 1, + remaining, + empty_tags, + blocks, + ) + .map(Box::new) + }) + .transpose()?; + Ok(Self::Pillar { + provider, + can_replace, + direction, + chance, + cap, + }) + } + "minecraft:block_column" => super::block_column::BlockColumnFeature::decode( + json, + blocks.ok_or(DecodeError::Field("block column bindings unavailable"))?, + depth, + remaining, + ) + .map(Self::BlockColumn), + "minecraft:simple_block" => { + let (providers, catalog, placement) = blocks + .and_then(|blocks| blocks.simple_blocks.as_ref()) + .ok_or(DecodeError::Field("simple block bindings unavailable"))?; + super::simple_block::SimpleBlockFeature::decode( + json, providers, catalog, placement, depth, remaining, + ) + .map(Self::SimpleBlock) + } + "minecraft:fill_layer" => FillLayerFeature::from_json( + json, + blocks.ok_or_else(|| { + DecodeError::Registry("feature block bindings unavailable".into()) + })?, + ) + .map(Self::FillLayer), + "minecraft:replace_single_block" => ReplaceBlockFeature::decode( + json, + blocks.ok_or_else(|| { + DecodeError::Registry("feature block bindings unavailable".into()) + })?, + depth, + remaining, + ) + .map(Self::ReplaceBlock), + "minecraft:ore" => super::ore_feature::OreFeature::decode( + json, + blocks.ok_or_else(|| { + DecodeError::Registry("feature block bindings unavailable".into()) + })?, + depth, + remaining, + ) + .map(Self::Ore), + "minecraft:scattered_ore" => ScatteredOreFeature::decode( + json, + blocks.ok_or_else(|| { + DecodeError::Registry("feature block bindings unavailable".into()) + })?, + depth, + remaining, + ) + .map(Self::ScatteredOre), + "minecraft:vegetation_patch" | "minecraft:waterlogged_vegetation_patch" => { + let bindings = blocks.ok_or(DecodeError::Field("vegetation patch bindings"))?; + let nested = |json: &str, depth: usize, remaining: &mut usize| { + PlacedFeatureDefinition::decode(json, depth, remaining, empty_tags, blocks) + }; + super::vegetation::VegetationPatchFeature::decode( + json, bindings, depth, remaining, &nested, + ) + .map(|f| Self::VegetationPatch(Box::new(f))) + } + "minecraft:root_system" => { + let bindings = blocks.ok_or(DecodeError::Field("root system bindings"))?; + let nested = |json: &str, depth: usize, remaining: &mut usize| { + PlacedFeatureDefinition::decode(json, depth, remaining, empty_tags, blocks) + }; + super::root_system::RootSystemFeature::decode( + json, bindings, depth, remaining, &nested, + ) + .map(|f| Self::RootSystem(Box::new(f))) + } + "minecraft:coral_tree" | "minecraft:coral_claw" => { + let nested = |json: &str, depth: usize, remaining: &mut usize| { + PlacedFeatureDefinition::decode(json, depth, remaining, empty_tags, blocks) + }; + super::vegetation::CoralFeature::decode(json, depth, remaining, &nested) + .map(|f| Self::Coral(Box::new(f))) + } + "minecraft:huge_red_mushroom" | "minecraft:huge_brown_mushroom" => { + super::vegetation::HugeMushroomFeature::decode( + json, + blocks.ok_or(DecodeError::Field("huge mushroom bindings"))?, + depth, + remaining, + ) + .map(|f| Self::HugeMushroom(Box::new(f))) + } + "minecraft:lake" => super::cave::LakeFeature::decode( + json, + blocks.ok_or(DecodeError::Field("lake bindings"))?, + depth, + remaining, + ) + .map(|f| Self::Lake(Box::new(f))), + "minecraft:monster_room" => super::cave::MonsterRoomFeature::new( + blocks.ok_or(DecodeError::Field("monster room bindings"))?, + ) + .map(|f| Self::MonsterRoom(Box::new(f))), + "minecraft:geode" => super::cave::GeodeFeature::decode( + json, + blocks.ok_or(DecodeError::Field("geode bindings"))?, + depth, + remaining, + ) + .map(|f| Self::Geode(Box::new(f))), + "minecraft:speleothem_cluster" => super::dripstone::SpeleothemClusterFeature::decode( + json, + blocks.ok_or(DecodeError::Field("speleothem cluster bindings"))?, + depth, + remaining, + ) + .map(|f| Self::SpeleothemCluster(Box::new(f))), + "minecraft:large_dripstone" => super::dripstone::LargeDripstoneFeature::decode( + json, + blocks.ok_or(DecodeError::Field("large dripstone bindings"))?, + depth, + remaining, + ) + .map(|f| Self::LargeDripstone(Box::new(f))), + "minecraft:projected_random_patchy_square" => { + super::projected::ProjectedPatchySquareFeature::decode( + json, + blocks.ok_or(DecodeError::Field("patchy square bindings"))?, + depth, + remaining, + ) + .map(|f| Self::ProjectedPatchySquare(Box::new(f))) + } + "minecraft:stepped_column_cluster" => { + super::projected::SteppedColumnClusterFeature::decode( + json, + blocks.ok_or(DecodeError::Field("column cluster bindings"))?, + depth, + remaining, + ) + .map(|f| Self::SteppedColumnCluster(Box::new(f))) + } + "minecraft:end_spike" => super::end_spike::EndSpikeFeature::decode( + json, + blocks.ok_or(DecodeError::Field("end spike bindings"))?, + ) + .map(|f| Self::EndSpike(Box::new(f))), + "minecraft:sculk_patch" => super::sculk::SculkPatchFeature::decode( + json, + blocks.ok_or(DecodeError::Field("sculk patch bindings"))?, + ) + .map(|f| Self::SculkPatch(Box::new(f))), + "minecraft:huge_fungus" => super::fungus::HugeFungusFeature::decode( + json, + blocks.ok_or(DecodeError::Field("huge fungus bindings"))?, + depth, + remaining, + ) + .map(|f| Self::HugeFungus(Box::new(f))), + "minecraft:iceberg" => super::iceberg::IcebergFeature::decode( + json, + blocks.ok_or(DecodeError::Field("iceberg bindings"))?, + ) + .map(|f| Self::Iceberg(Box::new(f))), + "minecraft:multiface_growth" => super::vegetation::MultifaceGrowthFeature::decode( + json, + blocks.ok_or(DecodeError::Field("multiface bindings"))?, + ) + .map(|f| Self::MultifaceGrowth(Box::new(f))), + "minecraft:tree" | "minecraft:fallen_tree" => { + let bindings = blocks.ok_or(DecodeError::Field("tree bindings"))?; + let nested = |json: &str, depth: usize, remaining: &mut usize| { + Self::decode(json, depth, remaining, empty_tags, blocks) + }; + if kind == "minecraft:tree" { + super::tree::TreeFeature::decode(json, bindings, depth, remaining, &nested) + .map(|t| Self::Tree(Box::new(t))) + } else { + super::tree::FallenTreeFeature::decode( + json, bindings, depth, remaining, &nested, + ) + .map(|t| Self::FallenTree(Box::new(t))) + } + } + "minecraft:weighted_random_selector" => Ok(Self::WeightedChoice( + OptionalWeightedList::decode(required(&object, "features")?, |raw| { + PlacedFeatureDefinition::decode( + raw.get(), + depth + 1, + remaining, + empty_tags, + blocks, + ) + })?, + )), + "minecraft:sequence" | "minecraft:overlay" | "minecraft:simple_random_selector" => { + let raw = required(&object, "features")?; + let name = serde_json::from_str::<String>(raw.get()).ok(); + let named_empty = name + .as_deref() + .and_then(|s| s.strip_prefix('#')) + .map(identifier) + .transpose()? + .is_some_and(|name| empty_tags.contains(&name)); + if named_empty { + return Ok(match kind.as_str() { + "minecraft:sequence" => Self::Sequence(vec![]), + "minecraft:overlay" => Self::Overlay(vec![]), + _ => Self::RandomChoice(vec![]), + }); + } + let values = if raw.get().trim_start().starts_with('[') { + list(raw)? + } else { + vec![raw.to_owned()] + }; + if values.is_empty() { + return Err(DecodeError::Field("empty feature list")); + } + let features = values + .iter() + .map(|raw| { + PlacedFeatureDefinition::decode( + raw.get(), + depth + 1, + remaining, + empty_tags, + blocks, + ) + }) + .collect::<Result<_, _>>()?; + Ok(match kind.as_str() { + "minecraft:sequence" => Self::Sequence(features), + "minecraft:overlay" => Self::Overlay(features), + _ => Self::RandomChoice(features), + }) + } + "minecraft:random_boolean_selector" => Ok(Self::BooleanChoice(Box::new([ + PlacedFeatureDefinition::decode( + required(&object, "feature_true")?.get(), + depth + 1, + remaining, + empty_tags, + blocks, + )?, + PlacedFeatureDefinition::decode( + required(&object, "feature_false")?.get(), + depth + 1, + remaining, + empty_tags, + blocks, + )?, + ]))), + "minecraft:random_selector" => { + let values = list(required(&object, "features")?)?; + let mut features = Vec::with_capacity(values.len()); + for raw in values { + let entry: Object = serde_json::from_str(raw.get())?; + let feature = PlacedFeatureDefinition::decode( + required(&entry, "feature")?.get(), + depth + 1, + remaining, + empty_tags, + blocks, + )?; + let chance: f32 = number_text(required(&entry, "chance")?)? + .parse() + .map_err(|_| DecodeError::Field("feature chance"))?; + if !(0. ..=1.).contains(&chance) || chance.is_sign_negative() { + return Err(DecodeError::Field("feature chance")); + } + features.push((chance, feature)); + } + Ok(Self::ChanceChoice { + features, + fallback: Box::new(PlacedFeatureDefinition::decode( + required(&object, "default")?.get(), + depth + 1, + remaining, + empty_tags, + blocks, + )?), + }) + } + _ => BasicFeature::from_json(json).map(Self::Basic), + } + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + blocks: FeatureBlocks, + ) -> Result<bool, FeatureExecutionError<W::Error>> { + self.place_inner( + world, + random, + origin, + &Run { + blocks, + depth: Cell::new(0), + remaining: Cell::new(65536), + }, + ) + } + fn place_inner<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + run: &Run, + ) -> Result<bool, FeatureExecutionError<W::Error>> { + if run.depth.get() >= 128 || run.remaining.get() == 0 { + return Err(FeatureExecutionError::WorkLimit); + } + run.depth.set(run.depth.get() + 1); + run.remaining.set(run.remaining.get() - 1); + let result = self.evaluate(world, random, origin, run); + run.depth.set(run.depth.get() - 1); + result + } + fn evaluate<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + run: &Run, + ) -> Result<bool, FeatureExecutionError<W::Error>> { + let mut placer = FeaturePlacer::new(); + match self { + Self::Basic(feature) => feature + .place(world, random, origin, run.blocks) + .map_err(FeatureExecutionError::Basic), + Self::NoOp => Ok(true), + Self::Template(feature) => feature + .place(world, random, origin) + .map_err(FeatureExecutionError::Query), + Self::Fossil(feature) => feature + .place(world, random, origin) + .map_err(FeatureExecutionError::Query), + Self::SnowAndFreeze(feature) => feature + .place(world, origin) + .map_err(FeatureExecutionError::SnowAndFreeze), + Self::Delta(feature) => feature + .place(world, random, origin) + .map_err(FeatureExecutionError::Delta), + Self::Bamboo(feature) => feature + .place(world, random, origin) + .map_err(FeatureExecutionError::Bamboo), + Self::ReplaceBlobs(feature) => feature + .place(world, random, origin) + .map_err(FeatureExecutionError::ReplaceBlobs), + Self::Speleothem(feature) => feature + .place(world, random, origin) + .map_err(FeatureExecutionError::Speleothem), + Self::ChorusPlant(feature) => feature + .place(world, random, origin) + .map_err(FeatureExecutionError::ChorusPlant), + Self::BonusChest(feature) => feature + .place(world, random, origin) + .map_err(FeatureExecutionError::BonusChest), + Self::EndGateway(feature) => feature + .place(world, origin) + .map_err(FeatureExecutionError::EndGateway), + Self::EndPodium(feature) => feature + .place(world, origin) + .map_err(FeatureExecutionError::EndPodium), + Self::Spike(feature) => feature + .place(world, random, origin) + .map_err(FeatureExecutionError::Spike), + Self::BlueIce(feature) => feature + .place(world, random, origin) + .map_err(FeatureExecutionError::BlueIce), + Self::UnderwaterMagma(feature) => feature + .place(world, random, origin) + .map_err(FeatureExecutionError::UnderwaterMagma), + Self::Vines(feature) => feature.place(world, origin).map_err(|e| match e { + BlockFeatureError::World(e) => FeatureExecutionError::Basic(FeatureError::World(e)), + BlockFeatureError::Query(e) => FeatureExecutionError::Query(e), + }), + Self::Spring(feature) => feature.place(world, origin).map_err(|e| match e { + BlockFeatureError::World(e) => FeatureExecutionError::Basic(FeatureError::World(e)), + BlockFeatureError::Query(e) => FeatureExecutionError::Query(e), + }), + Self::BlockBlob(feature) => feature + .place(world, random, origin) + .map_err(FeatureExecutionError::BlockBlob), + Self::Disk(feature) => feature + .place(world, random, origin) + .map_err(FeatureExecutionError::Disk), + Self::BlockPile(feature) => feature + .place(world, random, origin) + .map_err(FeatureExecutionError::BlockPile), + Self::NeighborSpread { + provider, + neighbors, + can_replace, + attempts, + xz_offset, + y_offset, + } => { + let state = provider + .get_state(world, random, origin) + .map_err(FeatureExecutionError::Provider)?; + world + .set_block(origin, state, 2) + .map_err(|e| FeatureExecutionError::Basic(FeatureError::World(e)))?; + let count = attempts.sample(random)?; + for _ in 0..count { + if run.remaining.get() == 0 { + return Err(FeatureExecutionError::WorkLimit); + } + run.remaining.set(run.remaining.get() - 1); + let dx = xz_offset.sample(random)?; + let dy = y_offset.sample(random)?; + let dz = xz_offset.sample(random)?; + let position = [ + origin[0].wrapping_add(dx), + origin[1].wrapping_add(dy), + origin[2].wrapping_add(dz), + ]; + if !can_replace + .test(world, position) + .map_err(FeatureExecutionError::Query)? + { + continue; + } + let mut found = 0; + for direction in horizon_core::geometry::Direction::ALL { + let step = direction.normal(); + let neighbor = std::array::from_fn(|i| position[i].wrapping_add(step[i])); + let state = world + .block(neighbor) + .map_err(|e| FeatureExecutionError::Basic(FeatureError::World(e)))?; + found += i32::from(neighbors.contains(&state)); + if found > 1 { + break; + } + } + if found == 1 { + let state = provider + .get_state(world, random, position) + .map_err(FeatureExecutionError::Provider)?; + world + .set_block(position, state, 2) + .map_err(|e| FeatureExecutionError::Basic(FeatureError::World(e)))?; + } + } + Ok(true) + } + Self::Pillar { + provider, + can_replace, + direction, + chance, + cap, + } => { + let mut position = origin; + let step = direction.normal(); + loop { + if run.remaining.get() == 0 { + return Err(FeatureExecutionError::WorkLimit); + } + run.remaining.set(run.remaining.get() - 1); + if !can_replace + .test(world, position) + .map_err(FeatureExecutionError::Query)? + { + break; + } + if random.next_float() >= *chance { + break; + } + if world + .outside_build_height(position[1]) + .map_err(FeatureExecutionError::Query)? + { + break; + } + let state = provider + .get_state(world, random, position) + .map_err(FeatureExecutionError::Provider)?; + world + .set_block(position, state, 2) + .map_err(|e| FeatureExecutionError::Basic(FeatureError::World(e)))?; + position = std::array::from_fn(|i| position[i].wrapping_add(step[i])); + } + position = std::array::from_fn(|i| position[i].wrapping_sub(step[i])); + if let Some(cap) = cap { + cap.place_in(&mut placer, world, random, position, run)?; + } + Ok(true) + } + Self::BlockColumn(feature) => feature + .place(world, random, origin) + .map_err(FeatureExecutionError::BlockColumn), + Self::SimpleBlock(feature) => feature + .place(world, random, origin) + .map_err(FeatureExecutionError::SimpleBlock), + Self::ScatteredOre(feature) => feature + .place(world, random, origin) + .map_err(FeatureExecutionError::Basic), + Self::Ore(feature) => feature.place(world, random, origin), + Self::VegetationPatch(feature) => { + feature.place(world, random, origin, &mut |f, w, r, p| { + f.place_in(&mut placer, w, r, p, run) + }) + } + Self::Coral(feature) => feature.place(world, random, origin, &mut |f, w, r, p| { + f.place_in(&mut placer, w, r, p, run) + }), + Self::HugeMushroom(feature) => feature.place(world, random, origin), + Self::MultifaceGrowth(feature) => feature.place(world, random, origin), + Self::Lake(feature) => feature.place(world, random, origin), + Self::MonsterRoom(feature) => feature.place(world, random, origin), + Self::Geode(feature) => feature.place(world, random, origin), + Self::Iceberg(feature) => feature.place(world, random, origin), + Self::SpeleothemCluster(feature) => feature.place(world, random, origin), + Self::LargeDripstone(feature) => feature.place(world, random, origin), + Self::HugeFungus(feature) => feature.place(world, random, origin), + Self::SculkPatch(feature) => feature.place(world, random, origin), + Self::EndSpike(feature) => feature.place(world, random, origin), + Self::ProjectedPatchySquare(feature) => feature.place(world, random, origin), + Self::SteppedColumnCluster(feature) => feature.place(world, random, origin), + Self::RootSystem(feature) => feature.place(world, random, origin, &mut |f, w, r, p| { + f.place_in(&mut placer, w, r, p, run) + }), + Self::Tree(feature) => feature.place(world, random, origin, &mut |f, w, r, p| { + f.place_inner(w, r, p, run) + }), + Self::FallenTree(feature) => feature.place(world, random, origin, &mut |f, w, r, p| { + f.place_inner(w, r, p, run) + }), + Self::FillLayer(feature) => feature.place(world, origin).map_err(|e| match e { + BlockFeatureError::World(e) => FeatureExecutionError::Basic(FeatureError::World(e)), + BlockFeatureError::Query(e) => FeatureExecutionError::Query(e), + }), + Self::ReplaceBlock(feature) => { + feature.place(world, random, origin).map_err(|e| match e { + BlockFeatureError::World(e) => { + FeatureExecutionError::Basic(FeatureError::World(e)) + } + BlockFeatureError::Query(e) => FeatureExecutionError::Query(e), + }) + } + Self::WeightedChoice(features) => match features.sample(random)? { + Some(feature) => feature.place_in(&mut placer, world, random, origin, run), + None => Ok(false), + }, + Self::Sequence(features) => { + for feature in features { + if !feature.place_in(&mut placer, world, random, origin, run)? { + return Ok(false); + } + } + Ok(true) + } + Self::Overlay(features) => { + let mut any = false; + for feature in features { + any |= feature.place_in(&mut placer, world, random, origin, run)?; + } + Ok(any) + } + Self::BooleanChoice(features) => { + let index = if random.next_boolean() { 0 } else { 1 }; + features[index].place_in(&mut placer, world, random, origin, run) + } + Self::RandomChoice(features) => { + let index = random.next_int_bound(features.len() as i32)? as usize; + features[index].place_in(&mut placer, world, random, origin, run) + } + Self::ChanceChoice { features, fallback } => { + for (chance, feature) in features { + if random.next_float() < *chance { + return feature.place_in(&mut placer, world, random, origin, run); + } + } + fallback.place_in(&mut placer, world, random, origin, run) + } + } + } +} diff --git a/crates/horizon-world/src/worldgen/feature_region.rs b/crates/horizon-world/src/worldgen/feature_region.rs new file mode 100644 index 000000000..46eaf4be7 --- /dev/null +++ b/crates/horizon-world/src/worldgen/feature_region.rs @@ -0,0 +1,597 @@ +//! Resident pre-light chunks shared by modifier queries and feature mutations. +//! The caller supplies world write policy/effects; storage alone cannot implement +//! neighbor updates, block entities, POIs or lighting. +use super::{ + anchor::WorldGenerationContext, + biome_chunk::{BiomeRegion, BiomeRegionError}, + feature::FeatureWorld, + placement::{LayerBlock, PlacementContext, PlacementQueryError}, + terrain::{TerrainBlockStates, TerrainChunk, TerrainError}, +}; +use crate::{ + fluid::FluidKind, + heightmap::{HeightmapState, HeightmapType}, + registry::BlockStateId, + tick_data::TickKind, +}; +use horizon_core::{ + position::BlockPos, + ticks::{ + ProtoChunkTicks, ScheduledTick, TickPriority, TickTypeId, WorldGenTickAccess, + WorldGenTickContainers, + }, +}; +use std::{ + collections::{BTreeMap, BTreeSet}, + sync::Arc, +}; + +struct RegionBlockQueries { + fluids: super::fluid_predicate::FluidPredicateBindings, + tags: BTreeMap<String, Arc<BTreeSet<BlockStateId>>>, +} + +#[derive(Debug)] +pub enum RegionError { + InvalidChunks, + InvalidBindings, + InvalidTickState(BlockStateId), + MissingChunk([i32; 2]), + Terrain(TerrainError), + Biome(BiomeRegionError), + BiomesNotGenerated([i32; 2]), +} +impl std::fmt::Display for RegionError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{self:?}") + } +} +impl std::error::Error for RegionError {} +impl From<TerrainError> for RegionError { + fn from(error: TerrainError) -> Self { + Self::Terrain(error) + } +} +impl From<RegionError> for PlacementQueryError { + fn from(error: RegionError) -> Self { + Self::Failed(error.to_string()) + } +} +pub struct TerrainRegion<'r, B: TerrainBlockStates> { + chunks: BTreeMap<(i32, i32), TerrainChunk<'r, B>>, + min_y: i32, + height: i32, + generation: WorldGenerationContext, + sea_level: i32, + game_time: i64, + next_tick_order: i64, + block_queries: Option<RegionBlockQueries>, + world_seed: Option<i64>, +} +impl<'r, B: TerrainBlockStates> TerrainRegion<'r, B> { + pub fn new( + chunks: Vec<TerrainChunk<'r, B>>, + generator: WorldGenerationContext, + ) -> Result<Self, RegionError> { + if chunks.is_empty() || chunks.len() > 4096 { + return Err(RegionError::InvalidChunks); + } + let first = &chunks[0]; + let (min_y, height, registry) = (first.min_y(), first.height(), first.registry()); + if chunks.iter().any(|c| { + c.min_y() != min_y || c.height() != height || !std::ptr::eq(c.registry(), registry) + }) { + return Err(RegionError::InvalidChunks); + } + let mut stored = BTreeMap::new(); + for chunk in chunks { + let p = chunk.position(); + if stored.insert((p.x, p.z), chunk).is_some() { + return Err(RegionError::InvalidChunks); + } + } + Ok(Self { + chunks: stored, + sea_level: generator.sea_level, + game_time: 0, + next_tick_order: 0, + block_queries: None, + world_seed: None, + min_y, + height, + generation: WorldGenerationContext::with_generator( + min_y, + height, + generator.min_y, + generator.height, + generator.sea_level, + ), + }) + } + /// Bind an immutable snapshot of fluid states and resolved block/fluid tags. + /// Tables are shared with configured features; registry identities must match. + pub fn with_block_bindings( + mut self, + bindings: &super::block_feature::FeatureBlockBindings<'r>, + ) -> Result<Self, RegionError> { + if !std::ptr::eq( + self.chunks.first_key_value().unwrap().1.registry(), + bindings.registry(), + ) { + return Err(RegionError::InvalidBindings); + } + self.block_queries = Some(RegionBlockQueries { + fluids: bindings.fluids.clone(), + tags: bindings.tags.clone(), + }); + Ok(self) + } + /// Supply the world seed (WorldGenLevel.getSeed) for seed-derived features. + pub fn with_world_seed(mut self, seed: i64) -> Self { + self.world_seed = Some(seed); + self + } + /// Supply the owning world's current time and region-local next tick order. + pub fn with_tick_clock(mut self, game_time: i64, next_tick_order: i64) -> Self { + self.game_time = game_time; + self.next_tick_order = next_tick_order; + self + } + pub fn tick_clock(&self) -> (i64, i64) { + (self.game_time, self.next_tick_order) + } + pub fn set_game_time(&mut self, game_time: i64) { + self.game_time = game_time; + } + /// Raw tick identities are default block-state IDs for block ticks and + /// `FluidKind` discriminants for fluid ticks, in separate namespaces. + pub fn schedule_tick( + &mut self, + kind: TickKind, + tick: ScheduledTick, + ) -> Result<bool, RegionError> { + WorldGenTickAccess::new(RegionTickContainers { region: self, kind }).schedule(tick) + } + pub fn has_scheduled_tick( + &mut self, + kind: TickKind, + position: BlockPos, + tick_type: TickTypeId, + ) -> Result<bool, RegionError> { + WorldGenTickAccess::new(RegionTickContainers { region: self, kind }) + .has_scheduled(position, tick_type) + } + fn request_tick( + &mut self, + kind: TickKind, + position: [i32; 3], + tick_type: TickTypeId, + delay: i32, + ) -> Result<(), RegionError> { + let tick = ScheduledTick { + kind: tick_type, + pos: BlockPos::new(position[0], position[1], position[2]), + trigger_tick: self.game_time.wrapping_add(i64::from(delay)), + priority: TickPriority::Normal, + sub_tick_order: self.next_tick_order, + }; + self.next_tick_order = self.next_tick_order.wrapping_add(1); + self.schedule_tick(kind, tick)?; + Ok(()) + } + /// Override world sea level without changing generator placement anchors. + pub fn with_world_sea_level(mut self, sea_level: i32) -> Self { + self.sea_level = sea_level; + self + } + /// Release the resident chunks, ordered by X then Z; match them by position. + pub fn into_chunks(self) -> Vec<TerrainChunk<'r, B>> { + self.chunks.into_values().collect() + } + pub fn chunks(&self) -> impl Iterator<Item = &TerrainChunk<'r, B>> { + self.chunks.values() + } + pub fn chunk(&self, x: i32, z: i32) -> Result<&TerrainChunk<'r, B>, RegionError> { + self.chunks + .get(&(x, z)) + .ok_or(RegionError::MissingChunk([x, z])) + } + pub fn chunk_mut(&mut self, x: i32, z: i32) -> Result<&mut TerrainChunk<'r, B>, RegionError> { + self.chunks + .get_mut(&(x, z)) + .ok_or(RegionError::MissingChunk([x, z])) + } + pub fn block(&self, [x, y, z]: [i32; 3]) -> Result<BlockStateId, RegionError> { + Ok(self.chunk(x >> 4, z >> 4)?.block(x, y, z)) + } + /// Level-style biome lookup checks the selected chunk's generation status + /// before reading its palette. Raw biome storage remains independently + /// accessible for generation itself. Retained upgrade status permits reading + /// old biomes before the new generation reaches the biome stage. + pub fn biome_at<'b, T: Clone>( + &self, + biomes: &'b BiomeRegion<T>, + position: BlockPos, + ) -> Result<&'b T, RegionError> { + self.noise_biome(biomes, biomes.quart_at_block(position)) + } + pub fn noise_biome<'b, T: Clone>( + &self, + biomes: &'b BiomeRegion<T>, + quart: [i32; 3], + ) -> Result<&'b T, RegionError> { + let chunk = self.chunk(quart[0] >> 2, quart[2] >> 2)?; + if chunk.highest_generated_status() < crate::chunk_status::ChunkStatus::Biomes { + return Err(RegionError::BiomesNotGenerated([ + quart[0] >> 2, + quart[2] >> 2, + ])); + } + biomes.noise_biome(quart).map_err(RegionError::Biome) + } + /// Storage mutation only. World code must apply its write permissions, + /// block-entity/POI effects and postprocessing around this operation. + pub fn set_block_worldgen( + &mut self, + [x, y, z]: [i32; 3], + state: BlockStateId, + ) -> Result<BlockStateId, RegionError> { + Ok(self + .chunk_mut(x >> 4, z >> 4)? + .set_block_worldgen(x, y, z, state)?) + } +} +struct RegionTickContainers<'a, 'r, B: TerrainBlockStates> { + region: &'a mut TerrainRegion<'r, B>, + kind: TickKind, +} +impl<B: TerrainBlockStates> WorldGenTickContainers for RegionTickContainers<'_, '_, B> { + type Container = ProtoChunkTicks; + type Error = RegionError; + fn container_at(&mut self, p: BlockPos) -> Result<&mut ProtoChunkTicks, RegionError> { + let chunk = self.region.chunk_mut(p.x >> 4, p.z >> 4)?; + Ok(match self.kind { + TickKind::Block => chunk.block_ticks_mut(), + TickKind::Fluid => chunk.fluid_ticks_mut(), + }) + } +} +impl<B: TerrainBlockStates> PlacementContext for TerrainRegion<'_, B> { + fn fluid_state( + &mut self, + position: [i32; 3], + ) -> Result<crate::fluid::FluidState, PlacementQueryError> { + let queries = self + .block_queries + .as_ref() + .ok_or(PlacementQueryError::Unavailable)?; + let state = self.block(position)?; + queries + .fluids + .state(state) + .ok_or_else(|| PlacementQueryError::Failed("fluid state outside bound registry".into())) + } + fn water_at(&mut self, position: [i32; 3]) -> Result<bool, PlacementQueryError> { + let queries = self + .block_queries + .as_ref() + .ok_or(PlacementQueryError::Unavailable)?; + Ok(queries + .fluids + .state_matches_tag(self.block(position)?, "minecraft:water")) + } + fn block_matches_tag( + &mut self, + position: [i32; 3], + tag: &str, + ) -> Result<bool, PlacementQueryError> { + let queries = self + .block_queries + .as_ref() + .ok_or(PlacementQueryError::Unavailable)?; + let state = self.block(position)?; + Ok(queries + .tags + .get(tag) + .is_some_and(|states| states.contains(&state))) + } + + fn schedule_block_tick( + &mut self, + position: [i32; 3], + block: BlockStateId, + delay: i32, + ) -> Result<(), PlacementQueryError> { + let registry = self + .chunks + .first_key_value() + .expect("nonempty region") + .1 + .registry(); + let state = registry + .state(block) + .ok_or(RegionError::InvalidTickState(block))?; + // Default state IDs provide one identity per block, separate from fluids. + let block = registry + .default_state(&state.name) + .ok_or(RegionError::InvalidTickState(block))?; + self.request_tick(TickKind::Block, position, TickTypeId(block.0), delay) + .map_err(Into::into) + } + fn schedule_fluid_tick( + &mut self, + position: [i32; 3], + fluid: FluidKind, + delay: i32, + ) -> Result<(), PlacementQueryError> { + self.request_tick(TickKind::Fluid, position, TickTypeId(fluid as u32), delay) + .map_err(Into::into) + } + + fn sea_level(&mut self) -> Result<i32, PlacementQueryError> { + Ok(self.sea_level) + } + fn world_seed(&mut self) -> Result<i64, PlacementQueryError> { + self.world_seed.ok_or(PlacementQueryError::Unavailable) + } + + fn mark_postprocessing(&mut self, [x, y, z]: [i32; 3]) -> Result<(), PlacementQueryError> { + self.chunk_mut(x >> 4, z >> 4)?.mark_postprocessing(x, y, z); + Ok(()) + } + fn generation(&self) -> WorldGenerationContext { + self.generation + } + fn block_state(&mut self, position: [i32; 3]) -> Result<BlockStateId, PlacementQueryError> { + self.block(position).map_err(Into::into) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(self.min_y) + } + fn max_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(self.min_y.wrapping_add(self.height).wrapping_sub(1)) + } + fn height(&mut self, kind: HeightmapType, x: i32, z: i32) -> Result<i32, PlacementQueryError> { + let chunk = self.chunk_mut(x >> 4, z >> 4)?; + if chunk.heightmap(kind).is_none() { + chunk.prime_heightmaps(&[kind]).map_err(RegionError::from)?; + } + chunk + .heightmap(kind) + .unwrap() + .first_available(x & 15, z & 15) + .map_err(|e| RegionError::from(TerrainError::from(e)).into()) + } + fn layer_block(&mut self, position: [i32; 3]) -> Result<LayerBlock, PlacementQueryError> { + let chunk = self.chunk(position[0] >> 4, position[2] >> 4)?; + let state = chunk.block(position[0], position[1], position[2]); + let name = &chunk + .registry() + .state(state) + .expect("registered chunk state") + .name; + Ok( + if chunk.block_properties(state).is_air() + || name == "minecraft:water" + || name == "minecraft:lava" + { + LayerBlock::Empty + } else if name == "minecraft:bedrock" { + LayerBlock::Bedrock + } else { + LayerBlock::Ground + }, + ) + } +} +/// Gives feature algorithms and placement queries one region. All update flags +/// reach the supplied write function, which owns world mutation policy/effects. +pub struct TerrainFeatureAccess<'a, 'r, B: TerrainBlockStates, F> { + region: &'a mut TerrainRegion<'r, B>, + write: F, + write_zone: Option<super::write_zone::GenerationWriteZone>, + upgrade_height: UpgradeHeightPolicy, +} +enum UpgradeHeightPolicy { + Unrestricted, + Fixed(super::write_zone::UpgradeWriteHeight), + Center(horizon_core::position::ChunkPos), +} +impl<'a, 'r, B: TerrainBlockStates, F> TerrainFeatureAccess<'a, 'r, B, F> { + pub fn new(region: &'a mut TerrainRegion<'r, B>, write: F) -> Self { + Self { + region, + write, + write_zone: None, + upgrade_height: UpgradeHeightPolicy::Unrestricted, + } + } + /// Apply the horizontal write radius before invoking mutation policy/effects. + pub fn with_write_zone(mut self, zone: super::write_zone::GenerationWriteZone) -> Self { + self.write_zone = Some(zone); + self + } + /// Use an explicit height interval. For live generation lifecycle state, + /// prefer `with_upgrade_center`, which observes changes made by callbacks. + pub fn with_upgrade_height(mut self, height: super::write_zone::UpgradeWriteHeight) -> Self { + self.upgrade_height = UpgradeHeightPolicy::Fixed(height); + self + } + /// Read the resident center chunk's upgrade state before each write. The + /// target chunk's upgrade state does not select the region's write height. + /// Horizontal write radius is configured independently with `with_write_zone`. + pub fn with_upgrade_center( + mut self, + center: horizon_core::position::ChunkPos, + ) -> Result<Self, RegionError> { + self.region.chunk(center.x, center.z)?; + self.upgrade_height = UpgradeHeightPolicy::Center(center); + Ok(self) + } +} +impl<'r, B: TerrainBlockStates, F> TerrainFeatureAccess<'_, 'r, B, F> +where + F: FnMut(&mut TerrainRegion<'r, B>, [i32; 3], BlockStateId, i32) -> Result<bool, RegionError>, +{ + fn write_block( + &mut self, + position: [i32; 3], + state: BlockStateId, + flags: i32, + ) -> Result<bool, RegionError> { + if !self.can_write(position)? { + return Ok(false); + } + (self.write)(self.region, position, state, flags) + } +} +impl<'r, B: TerrainBlockStates, F> TerrainFeatureAccess<'_, 'r, B, F> { + /// WorldGenRegion.ensureCanWrite without its diagnostic logging. + fn can_write(&mut self, position: [i32; 3]) -> Result<bool, RegionError> { + if self.write_zone.is_some_and(|zone| { + !zone.contains_block(BlockPos::new(position[0], position[1], position[2])) + }) { + return Ok(false); + } + let height = match self.upgrade_height { + UpgradeHeightPolicy::Unrestricted => None, + UpgradeHeightPolicy::Fixed(height) => Some(height), + UpgradeHeightPolicy::Center(center) => { + let chunk = self.region.chunk(center.x, center.z)?; + chunk.is_upgrading().then(|| { + let (min_y, height) = chunk.height_for_generation(); + super::write_zone::UpgradeWriteHeight::new(min_y, height) + }) + } + }; + Ok(!height.is_some_and(|height| !height.contains(position[1]))) + } +} +impl<'r, B: TerrainBlockStates, F> PlacementContext for TerrainFeatureAccess<'_, 'r, B, F> +where + F: FnMut(&mut TerrainRegion<'r, B>, [i32; 3], BlockStateId, i32) -> Result<bool, RegionError>, +{ + fn destroy_block_without_entity( + &mut self, + position: [i32; 3], + _drop_resources: bool, + ) -> Result<bool, PlacementQueryError> { + // WorldGenRegion destruction is an air replacement through its write + // policy. It does not evaluate drops, unlike live-level destruction. + let chunk = self.region.chunk(position[0] >> 4, position[2] >> 4)?; + let state = chunk.block(position[0], position[1], position[2]); + if chunk.block_properties(state).is_air() { + return Ok(false); + } + let air = chunk + .registry() + .default_state("minecraft:air") + .expect("validated air state"); + self.write_block(position, air, 3).map_err(Into::into) + } + + fn fluid_state( + &mut self, + position: [i32; 3], + ) -> Result<crate::fluid::FluidState, PlacementQueryError> { + self.region.fluid_state(position) + } + fn ensure_can_write(&mut self, position: [i32; 3]) -> Result<bool, PlacementQueryError> { + self.can_write(position).map_err(Into::into) + } + fn section_block( + &mut self, + position: [i32; 3], + ) -> Result<Option<BlockStateId>, PlacementQueryError> { + if position[1] < self.region.min_y + || position[1] >= self.region.min_y.wrapping_add(self.region.height) + { + return Ok(None); + } + self.region.block(position).map(Some).map_err(Into::into) + } + fn set_section_block( + &mut self, + [x, y, z]: [i32; 3], + state: BlockStateId, + ) -> Result<(), PlacementQueryError> { + self.region + .chunk_mut(x >> 4, z >> 4)? + .set_block_raw(x, y, z, state) + .map_err(RegionError::from)?; + Ok(()) + } + fn water_at(&mut self, position: [i32; 3]) -> Result<bool, PlacementQueryError> { + self.region.water_at(position) + } + fn block_matches_tag( + &mut self, + position: [i32; 3], + tag: &str, + ) -> Result<bool, PlacementQueryError> { + self.region.block_matches_tag(position, tag) + } + + fn schedule_block_tick( + &mut self, + position: [i32; 3], + block: BlockStateId, + delay: i32, + ) -> Result<(), PlacementQueryError> { + self.region.schedule_block_tick(position, block, delay) + } + fn schedule_fluid_tick( + &mut self, + position: [i32; 3], + fluid: FluidKind, + delay: i32, + ) -> Result<(), PlacementQueryError> { + self.region.schedule_fluid_tick(position, fluid, delay) + } + + fn sea_level(&mut self) -> Result<i32, PlacementQueryError> { + self.region.sea_level() + } + fn world_seed(&mut self) -> Result<i64, PlacementQueryError> { + self.region.world_seed() + } + + fn mark_postprocessing(&mut self, position: [i32; 3]) -> Result<(), PlacementQueryError> { + self.region.mark_postprocessing(position) + } + fn generation(&self) -> WorldGenerationContext { + self.region.generation() + } + fn block_state(&mut self, position: [i32; 3]) -> Result<BlockStateId, PlacementQueryError> { + self.region.block_state(position) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + self.region.min_y() + } + fn max_y(&mut self) -> Result<i32, PlacementQueryError> { + self.region.max_y() + } + fn height(&mut self, kind: HeightmapType, x: i32, z: i32) -> Result<i32, PlacementQueryError> { + self.region.height(kind, x, z) + } + fn layer_block(&mut self, position: [i32; 3]) -> Result<LayerBlock, PlacementQueryError> { + self.region.layer_block(position) + } +} +impl<'r, B: TerrainBlockStates, F> FeatureWorld for TerrainFeatureAccess<'_, 'r, B, F> +where + F: FnMut(&mut TerrainRegion<'r, B>, [i32; 3], BlockStateId, i32) -> Result<bool, RegionError>, +{ + type Error = RegionError; + fn block(&mut self, position: [i32; 3]) -> Result<BlockStateId, Self::Error> { + self.region.block(position) + } + fn set_block( + &mut self, + position: [i32; 3], + state: BlockStateId, + flags: i32, + ) -> Result<bool, Self::Error> { + self.write_block(position, state, flags) + } +} diff --git a/crates/horizon-world/src/worldgen/feature_sort.rs b/crates/horizon-world/src/worldgen/feature_sort.rs new file mode 100644 index 000000000..82d4ef6a0 --- /dev/null +++ b/crates/horizon-world/src/worldgen/feature_sort.rs @@ -0,0 +1,116 @@ +//! Deterministic feature ordering across biome generation steps. +use std::collections::{BTreeMap, BTreeSet}; + +/// A placed-feature object identity, assigned by the owning registry snapshot. +/// Structurally equal but separately allocated features need distinct IDs. +#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct FeatureIdentity(pub u32); + +#[derive(Clone, Debug)] +pub struct StepFeatureData { + features: Vec<FeatureIdentity>, + indices: BTreeMap<FeatureIdentity, usize>, +} +impl StepFeatureData { + pub fn features(&self) -> &[FeatureIdentity] { + &self.features + } + pub fn index(&self, feature: FeatureIdentity) -> Option<usize> { + self.indices.get(&feature).copied() + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FeatureSortError { + Cycle, + WorkLimit, + DuplicateBiome, +} +impl std::fmt::Display for FeatureSortError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str(match self { + Self::Cycle => "feature order cycle found", + Self::WorkLimit => "feature ordering input limit exceeded", + Self::DuplicateBiome => "duplicate biome identity in decoration plan", + }) + } +} +impl std::error::Error for FeatureSortError {} + +/// Inputs preserve biome order, step order and each holder set's encounter order. +pub fn build_features_per_step( + biomes: &[Vec<Vec<FeatureIdentity>>], +) -> Result<Vec<StepFeatureData>, FeatureSortError> { + if biomes.len() > 8192 { + return Err(FeatureSortError::WorkLimit); + } + type Node = (usize, usize); // Native comparator: step, then first identity index. + let mut identities = BTreeMap::new(); + let mut encountered = Vec::new(); + let mut graph = BTreeMap::<Node, BTreeSet<Node>>::new(); + let mut steps = 0; + let mut remaining = 65536usize; + for biome in biomes { + if biome.len() > 8192 { + return Err(FeatureSortError::WorkLimit); + } + steps = steps.max(biome.len()); + let mut previous = None; + for (step, features) in biome.iter().enumerate() { + remaining = remaining + .checked_sub(1) + .ok_or(FeatureSortError::WorkLimit)?; + for feature in features { + remaining = remaining + .checked_sub(1) + .ok_or(FeatureSortError::WorkLimit)?; + let index = *identities.entry(*feature).or_insert_with(|| { + encountered.push(*feature); + encountered.len() - 1 + }); + let node = (step, index); + graph.entry(node).or_default(); + if let Some(previous) = previous { + graph.entry(previous).or_default().insert(node); + } + previous = Some(node); + } + } + } + let mut colors = BTreeMap::<Node, u8>::new(); + let mut ordered = Vec::with_capacity(graph.len()); + let mut stack = Vec::new(); + for &root in graph.keys() { + if colors.get(&root) == Some(&2) { + continue; + } + stack.push((root, false)); + while let Some((node, finish)) = stack.pop() { + if finish { + colors.insert(node, 2); + ordered.push(node); + continue; + } + match colors.get(&node) { + Some(2) => continue, + Some(1) => return Err(FeatureSortError::Cycle), + _ => {} + } + colors.insert(node, 1); + stack.push((node, true)); + stack.extend(graph[&node].iter().rev().map(|&next| (next, false))); + } + } + let mut result = (0..steps) + .map(|_| StepFeatureData { + features: Vec::new(), + indices: BTreeMap::new(), + }) + .collect::<Vec<_>>(); + for (step, index) in ordered.into_iter().rev() { + let feature = encountered[index]; + let data = &mut result[step]; + data.indices.insert(feature, data.features.len()); + data.features.push(feature); + } + Ok(result) +} diff --git a/crates/horizon-world/src/worldgen/fluid_predicate.rs b/crates/horizon-world/src/worldgen/fluid_predicate.rs new file mode 100644 index 000000000..d8bcb10ab --- /dev/null +++ b/crates/horizon-world/src/worldgen/fluid_predicate.rs @@ -0,0 +1,104 @@ +//! Resolved fluid holder sets bound to immutable vanilla block-state identities. +use super::{DecodeError, density::identifier}; +use crate::{ + fluid::{FluidKind, FluidStateTable}, + registry::{BlockRegistry, BlockStateId}, +}; +use std::{collections::BTreeMap, sync::Arc}; +#[derive(Clone)] +pub struct FluidPredicateBindings { + table: Arc<FluidStateTable>, + tags: BTreeMap<String, u8>, +} +impl FluidPredicateBindings { + pub fn new(registry: &BlockRegistry) -> Result<Self, DecodeError> { + Ok(Self { + table: Arc::new( + FluidStateTable::new(registry).map_err(|e| DecodeError::Registry(e.to_string()))?, + ), + tags: BTreeMap::new(), + }) + } + pub fn with_resolved_tags( + mut self, + tags: &BTreeMap<String, Vec<String>>, + ) -> Result<Self, DecodeError> { + if tags.len() > 8192 { + return Err(DecodeError::Field("fluid tag count")); + } + let mut resolved = BTreeMap::new(); + for (tag, names) in tags { + if names.len() > 8192 { + return Err(DecodeError::Field("fluid tag size")); + } + let mut mask = 0; + for name in names { + mask |= fluid(name)?.mask(); + } + if resolved + .insert(super::tags::identifier(tag)?, mask) + .is_some() + { + return Err(DecodeError::Field("duplicate fluid tag")); + } + } + self.tags = resolved; + Ok(self) + } + pub fn state(&self, block: BlockStateId) -> Option<crate::fluid::FluidState> { + self.table.get(block) + } + /// Missing tags have no members, as for a native tag-key membership query. + pub fn state_matches_tag(&self, block: BlockStateId, tag: &str) -> bool { + self.table.get(block).is_some_and(|state| { + self.tags + .get(tag) + .is_some_and(|mask| state.kind().mask() & mask != 0) + }) + } + pub fn resolve(&self, json: &str) -> Result<BoundFluidSet, DecodeError> { + let mask = if let Ok(name) = serde_json::from_str::<String>(json) { + if let Some(tag) = name.strip_prefix('#') { + *self + .tags + .get(&super::tags::identifier(tag)?) + .ok_or_else(|| DecodeError::Registry(format!("unknown fluid tag {tag}")))? + } else { + fluid(&name)?.mask() + } + } else { + let names: Vec<String> = serde_json::from_str(json)?; + if names.len() > 8192 { + return Err(DecodeError::Field("fluid holder list")); + } + let mut mask = 0; + for name in names { + mask |= fluid(&name)?.mask(); + } + mask + }; + Ok(BoundFluidSet { + table: self.table.clone(), + mask, + }) + } +} +fn fluid(name: &str) -> Result<FluidKind, DecodeError> { + FluidKind::from_name(&identifier(name)?) + .ok_or_else(|| DecodeError::Registry(format!("unknown fluid {name}"))) +} + +/// A fluid-family mask over one shared immutable state table. Membership needs +/// one indexed lookup and avoids allocating large sets of equivalent states. +#[derive(Clone, Debug)] +pub struct BoundFluidSet { + table: Arc<FluidStateTable>, + mask: u8, +} +impl BoundFluidSet { + pub fn contains(&self, state: BlockStateId) -> bool { + self.table + .get(state) + .is_some_and(|value| value.kind().mask() & self.mask != 0) + } +} diff --git a/crates/horizon-world/src/worldgen/fungus.rs b/crates/horizon-world/src/worldgen/fungus.rs new file mode 100644 index 000000000..d560b41b5 --- /dev/null +++ b/crates/horizon-world/src/worldgen/fungus.rs @@ -0,0 +1,300 @@ +//! `minecraft:huge_fungus` (crimson and warped fungi, natural and planted). +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + block_predicate::BlockPredicate, + feature::FeatureWorld, + feature_graph::FeatureExecutionError, + optional, + placement::{PlacementContext, PlacementQueryError}, + required, + tree::{TreeResult, kind, read, write}, + tree_blocks::{self as tb, TreeBlocks}, +}; +use crate::registry::BlockStateId; +use horizon_core::random::RandomSource; +use std::sync::Arc; + +fn query<E>(error: PlacementQueryError) -> FeatureExecutionError<E> { + FeatureExecutionError::Query(error) +} +/// Mth.nextInt(random, min, max). +fn next_int<E>(random: &mut impl RandomSource, min: i32, max: i32) -> TreeResult<i32, E> { + if min >= max { + Ok(min) + } else { + Ok(random.next_int_bound(max - min + 1)? + min) + } +} + +#[derive(Clone, Debug)] +pub struct HugeFungusFeature { + valid_base: BlockStateId, + stem: BlockStateId, + hat: BlockStateId, + decor: BlockStateId, + replaceable: BlockPredicate, + planted: bool, + air: BlockStateId, + weeping_vines: BlockStateId, + weeping_vines_plant: BlockStateId, + nether_wart_block: BlockStateId, + blocks: Arc<TreeBlocks>, +} +impl HugeFungusFeature { + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + if kind(&object)? != "minecraft:huge_fungus" { + return Err(DecodeError::Field("huge fungus type")); + } + let state = |name: &'static str| { + bindings + .codec + .decode(required(&object, name)?.get(), false) + .map_err(|e| DecodeError::Registry(e.to_string())) + }; + let registry = bindings.registry(); + let default = |name: &str| { + registry + .default_state(name) + .ok_or_else(|| DecodeError::Registry(format!("missing fungus block {name}"))) + }; + Ok(Self { + valid_base: state("valid_base_block")?, + stem: state("stem_state")?, + hat: state("hat_state")?, + decor: state("decor_state")?, + replaceable: BlockPredicate::decode_with_blocks( + required(&object, "replaceable_blocks")?.get(), + depth + 1, + remaining, + Some(bindings), + )?, + planted: optional(&object, "planted") + .map(|raw| serde_json::from_str::<bool>(raw.get())) + .transpose()? + .unwrap_or(false), + air: default("minecraft:air")?, + weeping_vines: default("minecraft:weeping_vines")?, + weeping_vines_plant: default("minecraft:weeping_vines_plant")?, + nether_wart_block: default("minecraft:nether_wart_block")?, + blocks: bindings.tree_blocks()?, + }) + } + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let below = read(world, tb::offset(origin, 0, -1, 0))?; + if !self.blocks.same_block(below, self.valid_base) { + return Ok(false); + } + let mut height = next_int(random, 4, 13)?; + if random.next_int_bound(12)? == 0 { + height *= 2; + } + if !self.planted { + // ChunkGenerator.getGenDepth, compared against the absolute Y. + let depth = world.generation().height; + if origin[1].wrapping_add(height).wrapping_add(1) >= depth { + return Ok(false); + } + } + let huge = !self.planted && random.next_float() < 0.06; + write(world, origin, self.air, 260)?; + self.stem(world, random, origin, height, huge)?; + self.hat(world, random, origin, height, huge)?; + Ok(true) + } + fn replaceable<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + p: [i32; 3], + plants: bool, + ) -> TreeResult<bool, W::Error> { + if self.blocks.has(read(world, p)?, tb::REPLACEABLE) { + return Ok(true); + } + if plants { + return self.replaceable.test(world, p).map_err(query); + } + Ok(false) + } + fn stem<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + height: i32, + huge: bool, + ) -> TreeResult<(), W::Error> { + let r = i32::from(huge); + for dx in -r..=r { + for dz in -r..=r { + let corner = huge && dx.abs() == r && dz.abs() == r; + for dy in 0..height { + let p = tb::offset(origin, dx, dy, dz); + if !self.replaceable(world, p, true)? { + continue; + } + if self.planted { + if !self.blocks.is_air(read(world, tb::offset(p, 0, -1, 0))?) { + world.destroy_block_without_entity(p, true).map_err(query)?; + } + write(world, p, self.stem, 3)?; + } else if corner { + if random.next_float() < 0.1 { + write(world, p, self.stem, 3)?; + } + } else { + write(world, p, self.stem, 3)?; + } + } + } + } + Ok(()) + } + fn hat<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + height: i32, + huge: bool, + ) -> TreeResult<(), W::Error> { + let vines = self.blocks.same_block(self.hat, self.nether_wart_block); + let hat_height = (random.next_int_bound(1 + height / 3)? + 5).min(height); + let start = height - hat_height; + for dy in start..=height { + let mut radius = if dy < height - random.next_int_bound(3)? { + 2 + } else { + 1 + }; + if hat_height > 8 && dy < start + 4 { + radius = 3; + } + if huge { + radius += 1; + } + for dx in -radius..=radius { + for dz in -radius..=radius { + let edge_x = dx == -radius || dx == radius; + let edge_z = dz == -radius || dz == radius; + let inside = !edge_x && !edge_z && dy != height; + let corner = edge_x && edge_z; + let bottom = dy < start + 3; + let p = tb::offset(origin, dx, dy, dz); + if !self.replaceable(world, p, false)? { + continue; + } + if self.planted && !self.blocks.is_air(read(world, tb::offset(p, 0, -1, 0))?) { + world.destroy_block_without_entity(p, true).map_err(query)?; + } + if bottom { + if !inside { + self.hat_drop(world, random, p, vines)?; + } + } else if inside { + self.hat_block(world, random, p, 0.1, 0.2, if vines { 0.1 } else { 0.0 })?; + } else if corner { + self.hat_block( + world, + random, + p, + 0.01, + 0.7, + if vines { 0.083 } else { 0.0 }, + )?; + } else { + self.hat_block( + world, + random, + p, + 5.0e-4, + 0.98, + if vines { 0.07 } else { 0.0 }, + )?; + } + } + } + } + Ok(()) + } + #[allow(clippy::too_many_arguments)] + fn hat_block<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + p: [i32; 3], + decor: f32, + hat: f32, + vines: f32, + ) -> TreeResult<(), W::Error> { + if random.next_float() < decor { + write(world, p, self.decor, 3)?; + } else if random.next_float() < hat { + write(world, p, self.hat, 3)?; + if random.next_float() < vines { + self.weeping_vines(world, random, p)?; + } + } + Ok(()) + } + fn hat_drop<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + p: [i32; 3], + vines: bool, + ) -> TreeResult<(), W::Error> { + let below = read(world, tb::offset(p, 0, -1, 0))?; + if self.blocks.same_block(below, self.hat) { + write(world, p, self.hat, 3)?; + } else if f64::from(random.next_float()) < 0.15 { + write(world, p, self.hat, 3)?; + if vines && random.next_int_bound(11)? == 0 { + self.weeping_vines(world, random, p)?; + } + } + Ok(()) + } + fn weeping_vines<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + hat: [i32; 3], + ) -> TreeResult<(), W::Error> { + let mut p = tb::offset(hat, 0, -1, 0); + if !self.blocks.is_air(read(world, p)?) { + return Ok(()); + } + let mut goal = next_int(random, 1, 5)?; + if random.next_int_bound(7)? == 0 { + goal *= 2; + } + for height in 0..=goal { + if self.blocks.is_air(read(world, p)?) { + if height == goal || !self.blocks.is_air(read(world, tb::offset(p, 0, -1, 0))?) { + let age = next_int(random, 23, 25)?; + let state = self + .blocks + .with(self.weeping_vines, "age", &age.to_string()) + .ok_or(FeatureExecutionError::InvalidState)?; + write(world, p, state, 2)?; + break; + } + write(world, p, self.weeping_vines_plant, 2)?; + } + p = tb::offset(p, 0, -1, 0); + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/worldgen/generator.rs b/crates/horizon-world/src/worldgen/generator.rs new file mode 100644 index 000000000..bd3f482fd --- /dev/null +++ b/crates/horizon-world/src/worldgen/generator.rs @@ -0,0 +1,1556 @@ +//! Production noise-chunk generation for one dimension of a world preset. +//! +//! `GeneratorData` holds seed-independent resources parsed once from a bundle +//! directory (see `GeneratorData::load`). `OverworldGenerator` binds a world seed +//! and is shared across threads; each thread owns a `GeneratorWorker`. +//! `generate_proto` runs vanilla's BIOMES and TERRAIN statuses (noise fill with +//! aquifers, material surface, carvers) and primes the post-terrain heightmaps. +//! `decorate` runs the FEATURES status for the center of a 3×3 neighborhood with +//! whatever feature algorithms are implemented; structures are not generated. +use super::{ + DecodeError, + anchor::WorldGenerationContext, + aquifer::{ + AquiferConfig, AquiferField, AquiferSamplers, DisabledAquifer, GlobalFluidPicker, + NoiseBasedAquifer, RegistryAquiferBlockStates, + }, + biome::BiomeId, + biome_chunk::{BiomeChunk, BiomeRegion}, + biome_source::{BiomeSourceCatalog, ResolvedBiomeSource}, + biome_temperature::{BiomeTemperature, BiomeTemperatureSettings}, + carver::{CarverCatalog, WorldCarver, generate_carving_mask}, + carving::{CarvingBlocks, apply_carving_mask}, + climate::{ClimateSampler, quantize}, + decode_noise, + density::DensityRegistry, + material_condition::{ + MaterialConditionRegistry, MaterialRule, MaterialRuleError, MaterialRuleLibrary, + MaterialSurfaceQueries, + }, + material_extensions::{ExtensionBlocks, ExtensionNoises, MaterialExtensions}, + material_stage::{SurfaceInputs, TopMaterialInputs, build_surface}, + material_surface::{ClayBandBlocks, MaterialSurface}, + router::{NoiseRouter, RouterField, RouterSamplers}, + tags::TagDefinitions, + terrain::{PreLightChunkStage, TerrainAquifer, TerrainBlockStates, TerrainChunk, fill_noise}, +}; +use crate::{ + heightmap::{HeightmapState, HeightmapType}, + registry::{BlockRegistry, BlockStateId}, +}; +use horizon_core::{ + biome::{BiomeZoom, obfuscate_seed}, + density::{DensitySampler, SamplerContext}, + noise::{DensityVolume, Noise}, + position::{BlockPos, ChunkPos}, + random::{LegacyRandom, PositionalRandom, RandomSource, XoroshiroRandom}, +}; +use serde_json::Value; +use std::{ + collections::{BTreeMap, BTreeSet, HashMap}, + fs, io, + path::Path, + sync::{Arc, Mutex}, +}; + +#[derive(Debug)] +pub enum GeneratorError { + Io(io::Error), + Decode(DecodeError), + /// A resource is missing or inconsistent with the block registry. + Resource(String), + /// A generation stage failed; the chunk is incomplete. + Stage(&'static str, String), +} +impl std::fmt::Display for GeneratorError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Io(e) => e.fmt(f), + Self::Decode(e) => e.fmt(f), + Self::Resource(e) => write!(f, "invalid generator resources: {e}"), + Self::Stage(stage, e) => write!(f, "{stage} failed: {e}"), + } + } +} +impl std::error::Error for GeneratorError {} +impl From<io::Error> for GeneratorError { + fn from(e: io::Error) -> Self { + Self::Io(e) + } +} +impl From<DecodeError> for GeneratorError { + fn from(e: DecodeError) -> Self { + Self::Decode(e) + } +} +impl From<serde_json::Error> for GeneratorError { + fn from(e: serde_json::Error) -> Self { + Self::Decode(e.into()) + } +} +fn stage<E: std::fmt::Display>(name: &'static str) -> impl FnOnce(E) -> GeneratorError { + move |e| GeneratorError::Stage(name, e.to_string()) +} +fn resource(message: impl Into<String>) -> GeneratorError { + GeneratorError::Resource(message.into()) +} + +/// Heightmap-relevant block behavior, one entry per registry state. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +pub struct GenBlockState { + pub air: bool, + pub air_block: bool, + pub fluid: bool, + pub motion: bool, + pub no_leaves: bool, +} +impl HeightmapState for GenBlockState { + fn is_air(self) -> bool { + self.air + } + fn is_air_block(self) -> bool { + self.air_block + } + fn has_fluid(self) -> bool { + self.fluid + } + fn blocks_motion_in_heightmap(self) -> bool { + self.motion + } + fn blocks_motion_in_heightmap_no_leaves(self) -> bool { + self.no_leaves + } +} +/// Shared, cheaply cloned state table bound into every generated chunk. +#[derive(Clone, Debug)] +pub struct GenBlockStates(Arc<[GenBlockState]>); +impl GenBlockStates { + pub fn get(&self, id: BlockStateId) -> GenBlockState { + self.0.get(id.0 as usize).copied().unwrap_or_default() + } +} +impl TerrainBlockStates for GenBlockStates { + type State = GenBlockState; + fn heightmap_state(&self, id: BlockStateId) -> GenBlockState { + self.get(id) + } +} + +/// Feature resources for the FEATURES status, keyed by resource identifier. +pub(super) struct FeatureResources { + pub(super) features: BTreeMap<String, String>, + pub(super) placed: BTreeMap<String, String>, + pub(super) feature_tags: BTreeMap<String, String>, + pub(super) fluid_tags: BTreeMap<String, Vec<String>>, + pub(super) state_providers: BTreeMap<String, String>, + /// Block properties, support, collision and survival for placement checks. + pub(super) blocks: Option<super::generator_blocks::BlockBehavior>, +} + +/// Raw structure, structure-set and template-pool resources. +pub(super) struct StructureBundles { + pub(super) structures: BTreeMap<String, String>, + pub(super) sets: BTreeMap<String, String>, + pub(super) pools: BTreeMap<String, String>, +} + +/// Seed-independent generation resources, loaded once and shared by every +/// generator. Biome identities are indices into the sorted biome registry. +pub struct GeneratorData { + registry: &'static BlockRegistry, + states: GenBlockStates, + integers: BTreeSet<(String, String)>, + noises: BTreeMap<String, String>, + densities: BTreeMap<String, String>, + rules: BTreeMap<String, String>, + settings: BTreeMap<String, String>, + presets: BTreeMap<String, String>, + world_presets: BTreeMap<String, String>, + conditions: MaterialConditionRegistry, + source_catalog: BiomeSourceCatalog, + biome_names: Vec<Arc<str>>, + biome_ids: BTreeMap<String, BiomeId>, + biome_json: Vec<String>, + temperatures: Vec<BiomeTemperatureSettings>, + biome_carvers: Vec<Vec<Arc<WorldCarver>>>, + carving_blocks: CarvingBlocks, + pub(super) block_tags: BTreeMap<String, Vec<String>>, + pub(super) biome_tags: BTreeMap<String, Vec<String>>, + pub(super) feature_resources: Option<FeatureResources>, + /// Templates, processor lists and per-state template transforms. + pub(super) structures: Option<Arc<super::structure::StructureResources>>, + pub(super) structure_resources: Option<StructureBundles>, +} +type Bundle = BTreeMap<String, String>; +fn read_bundle(dir: &Path, name: &str) -> Result<Bundle, GeneratorError> { + let path = dir.join(format!("{name}.json")); + let text = + fs::read_to_string(&path).map_err(|e| resource(format!("{}: {e}", path.display())))?; + Ok(serde_json::from_str(&text)?) +} +fn read_optional_bundle(dir: &Path, name: &str) -> Result<Option<Bundle>, GeneratorError> { + if dir.join(format!("{name}.json")).exists() { + read_bundle(dir, name).map(Some) + } else { + Ok(None) + } +} +fn build_tags( + raw: &Bundle, + known: impl Fn(&str) -> bool, +) -> Result<BTreeMap<String, Vec<String>>, GeneratorError> { + let mut definitions = TagDefinitions::default(); + for (name, json) in raw { + definitions.apply_json(name, "vanilla", json)?; + } + let built = definitions + .build(|id, _| known(id).then(|| id.to_owned())) + .map_err(|e| resource(format!("tags: {e:?}")))?; + if !built.missing.is_empty() { + return Err(resource(format!( + "unresolved tag entries in {:?}", + built.missing.keys().collect::<Vec<_>>() + ))); + } + Ok(built.tags) +} +/// Convert a data-generator `biome_parameters` report into the quantized +/// preset table format, using vanilla's float `quantizeCoord`. +fn quantize_parameter_report(json: &str) -> Result<String, GeneratorError> { + let report: Value = serde_json::from_str(json)?; + let float = |v: &Value| -> Result<i64, GeneratorError> { + let text = v.to_string(); + text.parse::<f32>() + .map(quantize) + .map_err(|_| resource("biome parameter value")) + }; + let mut entries = Vec::new(); + for entry in report["biomes"] + .as_array() + .ok_or_else(|| resource("biome parameter report"))? + { + let parameters = &entry["parameters"]; + let mut coordinates = Vec::new(); + for key in [ + "temperature", + "humidity", + "continentalness", + "erosion", + "depth", + "weirdness", + ] { + let value = ¶meters[key]; + coordinates.push(match value.as_array() { + Some(range) if range.len() == 2 => { + serde_json::json!([float(&range[0])?, float(&range[1])?]) + } + None if value.is_number() => { + let v = float(value)?; + serde_json::json!([v, v]) + } + _ => return Err(resource("biome parameter interval")), + }); + } + entries.push(serde_json::json!({ + "coordinates": coordinates, + "offset": float(¶meters["offset"])?, + "biome": entry["biome"], + })); + } + Ok(Value::Array(entries).to_string()) +} +impl GeneratorData { + /// Load a worldgen bundle directory. Required files are JSON objects mapping + /// resource identifiers to the resource's JSON text: `noises`, `densities`, + /// `rules` (material rules), `conditions` (material conditions), `settings` + /// (noise settings), `carvers`, `biomes`, `biome_tags`, `block_tags`, + /// `world_presets`; `block_flags.json` is an array of `[is_air, has_fluid]` + /// per registry state. Multi-noise tables come from `presets.json` + /// (quantized) or `biome_parameters/<name>.json` data-generator reports. + /// Optional decoration inputs: `features`, `placed_features`, + /// `feature_tags`, `fluid_tags`, `state_providers` and the Java-exported + /// block behavior files in `blocks/` (see `generator_blocks`). Integer block properties are derived from + /// the registry: properties whose every value is a decimal integer. + pub fn load(dir: &Path, registry: &'static BlockRegistry) -> Result<Arc<Self>, GeneratorError> { + let flags: Vec<(bool, bool)> = + serde_json::from_str(&fs::read_to_string(dir.join("block_flags.json"))?)?; + if flags.len() != registry.len() { + return Err(resource("block_flags.json does not match the registry")); + } + let block_tags = build_tags(&read_bundle(dir, "block_tags")?, |id| { + registry.default_state(id).is_some() + })?; + let tag_set = |name: &str| -> Result<BTreeSet<&str>, GeneratorError> { + Ok(block_tags + .get(name) + .ok_or_else(|| resource(format!("missing block tag {name}")))? + .iter() + .map(String::as_str) + .collect()) + }; + let motion = tag_set("minecraft:blocks_motion_in_heightmap")?; + let no_leaves = tag_set("minecraft:blocks_motion_in_heightmap_no_leaves")?; + let mut values = BTreeMap::<(String, String), bool>::new(); + let states = (0..registry.len()) + .map(|i| { + let state = registry.state(BlockStateId(i as u32)).unwrap(); + for (key, value) in &state.properties { + let integer = !value.is_empty() + && value + .trim_start_matches('-') + .bytes() + .all(|b| b.is_ascii_digit()); + *values + .entry((state.name.clone(), key.clone())) + .or_insert(true) &= integer; + } + GenBlockState { + air: flags[i].0, + air_block: state.name == "minecraft:air", + fluid: flags[i].1, + motion: motion.contains(state.name.as_str()), + no_leaves: no_leaves.contains(state.name.as_str()), + } + }) + .collect::<Vec<_>>(); + let integers = values + .into_iter() + .filter_map(|(key, integer)| integer.then_some(key)) + .collect(); + let biomes = read_bundle(dir, "biomes")?; + let biome_tags = build_tags(&read_bundle(dir, "biome_tags")?, |id| { + biomes.contains_key(id) + })?; + let biome_set = biomes.keys().cloned().collect::<BTreeSet<_>>(); + let conditions = MaterialConditionRegistry::from_json_with_biome_tags( + &read_bundle(dir, "conditions")?, + &biome_set, + &biome_tags, + )?; + let mut presets = read_optional_bundle(dir, "presets")?.unwrap_or_default(); + let reports = dir.join("biome_parameters"); + if reports.is_dir() { + for entry in fs::read_dir(&reports)? { + let path = entry?.path(); + let Some(stem) = path + .file_stem() + .and_then(|s| s.to_str()) + .filter(|_| path.extension().is_some_and(|e| e == "json")) + else { + continue; + }; + presets + .entry(format!("minecraft:{stem}")) + .or_insert(quantize_parameter_report(&fs::read_to_string(&path)?)?); + } + } + let source_catalog = + BiomeSourceCatalog::new(&biome_set, &biome_tags, &presets.keys().cloned().collect())?; + let carvers = CarverCatalog::from_json(&read_bundle(dir, "carvers")?)?; + let mut biome_names = Vec::new(); + let mut biome_ids = BTreeMap::new(); + let mut biome_json = Vec::new(); + let mut temperatures = Vec::new(); + let mut biome_carvers = Vec::new(); + for (name, json) in &biomes { + biome_ids.insert(name.clone(), BiomeId(biome_names.len() as u32)); + biome_names.push(Arc::<str>::from(name.as_str())); + temperatures.push(BiomeTemperatureSettings::from_json(json)?); + let value: Value = serde_json::from_str(json)?; + biome_carvers.push(carvers.decode_set(&value["carvers"].to_string())?); + biome_json.push(json.clone()); + } + let carving_blocks = CarvingBlocks::from_registry( + registry, + &tag_set("minecraft:uncarvable")? + .into_iter() + .map(str::to_owned) + .collect(), + ) + .map_err(|e| resource(format!("carving blocks: {e}")))?; + let feature_resources = match ( + read_optional_bundle(dir, "features")?, + read_optional_bundle(dir, "placed_features")?, + ) { + (Some(features), Some(placed)) => { + let fluid_tags = match read_optional_bundle(dir, "fluid_tags")? { + Some(raw) => build_tags(&raw, |id| { + matches!( + id, + "minecraft:water" + | "minecraft:flowing_water" + | "minecraft:lava" + | "minecraft:flowing_lava" + | "minecraft:empty" + ) + })?, + None => BTreeMap::new(), + }; + Some(FeatureResources { + features, + placed, + feature_tags: read_optional_bundle(dir, "feature_tags")?.unwrap_or_default(), + blocks: super::generator_blocks::BlockBehavior::load( + &dir.join("blocks"), + registry, + &block_tags, + &fluid_tags, + )?, + fluid_tags, + state_providers: read_optional_bundle(dir, "state_providers")? + .unwrap_or_default(), + }) + } + _ => None, + }; + let structures = match fs::read_to_string(dir.join("blocks/structure-blocks.json")) { + Ok(json) => Some(Arc::new(super::structure::StructureResources::new( + registry, + super::structure::StateTransforms::from_json(&json, registry.len())?, + &dir.join("structure"), + read_optional_bundle(dir, "processor_lists")?.unwrap_or_default(), + &block_tags, + ))), + Err(_) => None, + }; + let structure_resources = match ( + read_optional_bundle(dir, "structures")?, + read_optional_bundle(dir, "structure_sets")?, + read_optional_bundle(dir, "template_pools")?, + ) { + (Some(structures), Some(sets), Some(pools)) => Some(StructureBundles { + structures, + sets, + pools, + }), + _ => None, + }; + Ok(Arc::new(Self { + structure_resources, + structures, + registry, + states: GenBlockStates(states.into()), + integers, + noises: read_bundle(dir, "noises")?, + densities: read_bundle(dir, "densities")?, + rules: read_bundle(dir, "rules")?, + settings: read_bundle(dir, "settings")?, + world_presets: read_bundle(dir, "world_presets")?, + presets, + conditions, + source_catalog, + biome_names, + biome_ids, + biome_json, + temperatures, + biome_carvers, + carving_blocks, + block_tags, + biome_tags, + feature_resources, + })) + } + pub fn registry(&self) -> &'static BlockRegistry { + self.registry + } + pub fn block_states(&self) -> &GenBlockStates { + &self.states + } + /// Biome identifiers in registry (identifier-sorted) order. + pub fn biome_names(&self) -> &[Arc<str>] { + &self.biome_names + } + pub fn biome_name(&self, id: BiomeId) -> &str { + &self.biome_names[id.0 as usize] + } + pub fn biome_id(&self, name: &str) -> Option<BiomeId> { + self.biome_ids.get(name).copied() + } + /// The biome's resource JSON (climate, effects such as water/sky/foliage + /// colors, attributes, carvers and features). + pub fn biome_json(&self, id: BiomeId) -> &str { + &self.biome_json[id.0 as usize] + } + pub(super) fn integers(&self) -> &BTreeSet<(String, String)> { + &self.integers + } +} + +/// A generated chunk with its quart biomes. Blocks and heightmaps live in +/// `terrain`; after `generate_proto` it is at the TERRAIN status with the +/// WORLD_SURFACE(_WG), OCEAN_FLOOR(_WG) and MOTION_BLOCKING(_NO_LEAVES) +/// heightmaps primed. Fluid positions scheduled for postprocessing are kept in +/// `terrain.postprocessing()`. +pub struct ProtoChunk { + pub terrain: TerrainChunk<'static, GenBlockStates>, + biomes: BiomeChunk<BiomeId>, + data: Arc<GeneratorData>, + decorated: bool, + /// Block-entity data placed by structures and template features, in + /// placement order (positions are absolute block coordinates). + pub block_entities: Vec<([i32; 3], crate::nbt::Compound)>, + /// Structure starts referencing this chunk (STRUCTURE_REFERENCES). + pub(super) structure_starts: Vec<Arc<super::structure::start::StructureStart>>, +} +impl ProtoChunk { + pub fn position(&self) -> ChunkPos { + self.terrain.position() + } + pub fn block(&self, x: i32, y: i32, z: i32) -> BlockStateId { + self.terrain.block(x, y, z) + } + pub fn block_name(&self, x: i32, y: i32, z: i32) -> &str { + &self + .data + .registry + .state(self.block(x, y, z)) + .expect("registered state") + .name + } + /// Stored quart biome (4×4×4 cell) containing this block, without the + /// client's biome zoom. X/Z wrap to this chunk; Y clamps to its range. + pub fn biome_id_at(&self, x: i32, y: i32, z: i32) -> BiomeId { + *self.biomes.noise_biome([x >> 2, y >> 2, z >> 2]) + } + pub fn biome_at(&self, x: i32, y: i32, z: i32) -> &str { + self.data.biome_name(self.biome_id_at(x, y, z)) + } + pub fn biomes(&self) -> &BiomeChunk<BiomeId> { + &self.biomes + } + pub fn data(&self) -> &Arc<GeneratorData> { + &self.data + } + /// Structure starts referencing this chunk: (structure id, start chunk, + /// inclusive bounding box min/max). + pub fn structures(&self) -> Vec<(&str, ChunkPos, [i32; 3], [i32; 3])> { + self.structure_starts + .iter() + .map(|s| { + ( + s.name.as_str(), + s.chunk, + s.bounding_box.min, + s.bounding_box.max, + ) + }) + .collect() + } + pub fn is_decorated(&self) -> bool { + self.decorated + } + pub(super) fn set_decorated(&mut self) { + self.decorated = true; + } + /// Highest non-air block + 1 in the column (WORLD_SURFACE). + pub fn surface_height(&self, x: i32, z: i32) -> i32 { + self.terrain + .heightmap(HeightmapType::WorldSurface) + .and_then(|map| map.first_available(x & 15, z & 15).ok()) + .unwrap_or(self.terrain.min_y()) + } +} + +/// Per-noise-settings values resolved from the dimension's generator JSON. +struct Settings { + min_y: i32, + height: i32, + sea_level: i32, + default_block: BlockStateId, + default_fluid: BlockStateId, + legacy: bool, +} + +/// The seed-bound pipeline for one random-source kind. +struct Pipeline<R: RandomSource> { + data: Arc<GeneratorData>, + seed: i64, + settings: Settings, + root: R::Positional, + router: RouterSamplers, + climate: ClimateSampler, + aquifer: Option<[Arc<dyn DensitySampler>; 6]>, + rule: MaterialRule, + preliminary: Arc<dyn DensitySampler>, + source: ResolvedBiomeSource, + surface: MaterialSurface<R::Positional>, + noises: BTreeMap<String, Arc<dyn Noise>>, + extensions: MaterialExtensions<R::Positional>, + picker: GlobalFluidPicker, + zoom: BiomeZoom, + biome_cache: BiomeCache, + carver_cache: Mutex<HashMap<(i32, i32), BiomeId>>, + pub(super) decoration: Option<super::generator_decoration::Decoration>, + pub(super) structures: Option<super::generator_structures::StructureState>, +} +const CACHE_LIMIT: usize = 16384; +type BiomeCache = Mutex<HashMap<(i32, i32), Arc<BiomeChunk<BiomeId>>>>; + +fn state(registry: &BlockRegistry, raw: &Value) -> Result<BlockStateId, GeneratorError> { + let name = raw + .get("Name") + .and_then(Value::as_str) + .or_else(|| raw.as_str()) + .ok_or_else(|| resource("block state"))?; + let properties = raw.get("Properties").and_then(Value::as_object); + match properties { + Some(properties) if !properties.is_empty() => { + let descriptor = crate::chunk::BlockState { + name: super::tags::identifier(name)?, + properties: properties + .iter() + .map(|(k, v)| (k.clone(), v.as_str().unwrap_or_default().to_owned())) + .collect(), + }; + registry + .resolve(&descriptor) + .map_err(|e| resource(format!("block state {name}: {e}"))) + } + _ => registry + .default_state(&super::tags::identifier(name)?) + .ok_or_else(|| resource(format!("unknown block {name}"))), + } +} + +impl<R: RandomSource> Pipeline<R> +where + R::Positional: Clone + Send + Sync, +{ + fn new( + data: Arc<GeneratorData>, + seed: i64, + mut random: R, + generator: &Value, + settings_json: &Value, + with_structures: bool, + ) -> Result<Self, GeneratorError> { + let registry = data.registry; + let noise = &settings_json["noise"]; + let settings = Settings { + min_y: noise["min_y"] + .as_i64() + .ok_or_else(|| resource("noise min_y"))? as i32, + height: noise["height"] + .as_i64() + .ok_or_else(|| resource("noise height"))? as i32, + sea_level: settings_json["sea_level"] + .as_i64() + .ok_or_else(|| resource("sea_level"))? as i32, + default_block: state(registry, &settings_json["default_block"])?, + default_fluid: state(registry, &settings_json["default_fluid"])?, + legacy: settings_json["legacy_random_source"] + .as_bool() + .unwrap_or(false), + }; + let root = random.fork_positional(); + let codec = crate::registry::BlockStateJsonCodec::new(registry, data.integers.clone()) + .map_err(|e| resource(e.to_string()))?; + let mut densities = DensityRegistry::from_json(&data.noises, &data.densities)?; + let router = + NoiseRouter::from_json(&settings_json["noise_router"].to_string(), &mut densities)?; + let aquifers = settings_json + .get("aquifers") + .filter(|v| !v.is_null()) + .map(|v| AquiferConfig::from_json(&v.to_string(), &mut densities)) + .transpose()?; + let mut library = MaterialRuleLibrary::from_json( + &data.rules, + &data.conditions, + &codec, + densities, + seed, + settings.legacy, + )?; + let router = library.compile_router(router)?; + let aquifer = aquifers + .map(|config| library.compile_aquifer(config)) + .transpose()? + .map(|samplers| AquiferField::ALL.map(|field| samplers.get(field).clone())); + let rule_name = settings_json["material_rule"] + .as_str() + .ok_or_else(|| resource("material_rule"))?; + let rule = library.rule(rule_name)?; + let preliminary = router.get(RouterField::ChunkSurfaceLevel).clone(); + let source = data + .source_catalog + .decode(&generator["biome_source"].to_string())? + .resolve(&data.presets) + .map_err(|e| resource(format!("biome source: {e}")))?; + let climate = router.climate_sampler(); + let mut noises = BTreeMap::new(); + for (name, json) in &data.noises { + let noise: Arc<dyn Noise> = Arc::new( + decode_noise(json)? + .create(&mut root.from_hash_of(name)) + .map_err(DecodeError::from)?, + ); + noises.insert(name.clone(), noise); + } + let noise = |name: &str| -> Result<Arc<dyn Noise>, GeneratorError> { + noises + .get(name) + .cloned() + .ok_or_else(|| resource(format!("missing noise {name}"))) + }; + let surface = MaterialSurface::new( + root.clone(), + ClayBandBlocks::from_registry(registry).ok_or_else(|| resource("clay bands"))?, + noise("minecraft:clay_bands_offset")?, + noise("minecraft:surface")?, + noise("minecraft:surface_secondary")?, + ); + let default = |name: &str| { + registry + .default_state(name) + .ok_or_else(|| resource(format!("missing block {name}"))) + }; + let extensions = MaterialExtensions::new( + root.clone(), + ExtensionBlocks { + default: settings.default_block, + water: default("minecraft:water")?, + packed_ice: default("minecraft:packed_ice")?, + snow: default("minecraft:snow_block")?, + }, + ExtensionNoises { + badlands_surface: noise("minecraft:badlands_surface")?, + badlands_pillar: noise("minecraft:badlands_pillar")?, + badlands_roof: noise("minecraft:badlands_pillar_roof")?, + iceberg_surface: noise("minecraft:iceberg_surface")?, + iceberg_pillar: noise("minecraft:iceberg_pillar")?, + iceberg_roof: noise("minecraft:iceberg_pillar_roof")?, + }, + settings.sea_level, + ); + let picker = GlobalFluidPicker::new( + settings.sea_level, + settings.default_fluid, + default("minecraft:lava")?, + default("minecraft:air")?, + ); + let mut pipeline = Self { + zoom: BiomeZoom::new(obfuscate_seed(seed)), + data, + seed, + settings, + root, + router, + climate, + aquifer, + rule, + preliminary, + source, + surface, + noises, + extensions, + picker, + biome_cache: Mutex::new(HashMap::new()), + carver_cache: Mutex::new(HashMap::new()), + decoration: None, + structures: None, + }; + pipeline.decoration = + super::generator_decoration::Decoration::new(&pipeline.data, &pipeline.source)?; + if with_structures { + let possible = pipeline + .source + .possible_biomes() + .into_iter() + .filter_map(|name| pipeline.data.biome_id(name)) + .collect(); + pipeline.structures = + super::generator_structures::StructureState::new(&pipeline.data, &possible)?; + } + Ok(pipeline) + } + fn generation(&self) -> WorldGenerationContext { + WorldGenerationContext::new( + self.settings.min_y, + self.settings.height, + self.settings.sea_level, + ) + } + fn biome_chunk( + &self, + worker: &mut WorkerState, + pos: ChunkPos, + ) -> Result<Arc<BiomeChunk<BiomeId>>, GeneratorError> { + if let Some(chunk) = self.biome_cache.lock().unwrap().get(&(pos.x, pos.z)) { + return Ok(chunk.clone()); + } + let (min, height) = (self.settings.min_y, self.settings.height); + let mut chunk = BiomeChunk::new(pos, min, height, BiomeId(0)).map_err(stage("biomes"))?; + let mut resolver = self.source.resolver( + &self.climate, + self.router.get(RouterField::Erosion).as_ref(), + ); + let context = &mut worker.biome_context; + let volume = resolver + .prepare_volume( + context, + [ + pos.x.wrapping_shl(4) >> 2, + min >> 2, + pos.z.wrapping_shl(4) >> 2, + ], + [4, height >> 2, 4], + ) + .map_err(stage("biomes"))?; + let ids = &self.data.biome_ids; + chunk + .fill(min, min + height - 1, |quart| { + resolver + .sample_prepared(context, volume.as_ref(), quart) + .map_err(|e| e.to_string()) + .and_then(|name| ids.get(name).copied().ok_or_else(|| name.to_owned())) + }) + .map_err(stage("biomes"))?; + let chunk = Arc::new(chunk); + let mut cache = self.biome_cache.lock().unwrap(); + if cache.len() >= CACHE_LIMIT { + cache.clear(); + } + cache.insert((pos.x, pos.z), chunk.clone()); + Ok(chunk) + } + fn carver_biome(&self, worker: &mut WorkerState, origin: ChunkPos) -> Result<BiomeId, String> { + if let Some(id) = self.carver_cache.lock().unwrap().get(&(origin.x, origin.z)) { + return Ok(*id); + } + let mut resolver = self.source.resolver( + &self.climate, + self.router.get(RouterField::Erosion).as_ref(), + ); + let quart = [ + origin.x.wrapping_shl(4) >> 2, + 0, + origin.z.wrapping_shl(4) >> 2, + ]; + let name = resolver + .sample(&mut worker.carver_context, quart) + .map_err(|e| e.to_string())?; + let id = self.data.biome_id(name).ok_or_else(|| name.to_owned())?; + let mut cache = self.carver_cache.lock().unwrap(); + if cache.len() >= CACHE_LIMIT * 4 { + cache.clear(); + } + cache.insert((origin.x, origin.z), id); + Ok(id) + } + fn generate( + &self, + worker: &mut WorkerState, + pos: ChunkPos, + ) -> Result<ProtoChunk, GeneratorError> { + let data = &self.data; + let (min, height, sea) = ( + self.settings.min_y, + self.settings.height, + self.settings.sea_level, + ); + let mut clock = std::time::Instant::now(); + let mut neighbors = Vec::with_capacity(9); + let mut possible = BTreeSet::new(); + for dz in -1..=1 { + for dx in -1..=1 { + let chunk = self.biome_chunk( + worker, + ChunkPos::new(pos.x.wrapping_add(dx), pos.z.wrapping_add(dz)), + )?; + for section in 0..(height / 16) as usize { + possible.extend(chunk.section(section).unwrap().iter().copied()); + } + neighbors.push((*chunk).clone()); + } + } + let center = neighbors[4].clone(); + let biomes = + BiomeRegion::new(neighbors, obfuscate_seed(self.seed)).map_err(stage("biomes"))?; + let possible = possible + .into_iter() + .map(|id| data.biome_name(id).to_owned()) + .collect(); + worker.timings.biomes += lap(&mut clock); + let mut chunk = TerrainChunk::new(pos, min, height, data.registry, data.states.clone()) + .map_err(stage("noise"))?; + chunk.set_generation_stage(PreLightChunkStage::Biomes); + let references = match &self.structures { + Some(structures) => structures.references( + &mut StructureQueries { + pipeline: self, + worker, + valid: BTreeSet::new(), + }, + pos, + ), + None => Vec::new(), + }; + let mut context = SamplerContext::cached(); + if let Some(beard) = self + .structures + .as_ref() + .and_then(|s| s.beardifier(&references, pos)) + { + context = context.with_world_fields( + horizon_core::density::WorldFields::default().with_field( + horizon_core::density::WorldField::Beardifier, + Arc::new(beard), + ), + ); + } + worker.timings.structures += lap(&mut clock); + let volume = DensityVolume::new( + [16, height, 16], + [pos.x.wrapping_shl(4), min, pos.z.wrapping_shl(4)], + [1; 3], + ) + .map_err(stage("noise"))?; + worker.timings.noise += lap(&mut clock); + let mut aquifer: Box<dyn TerrainAquifer> = match &self.aquifer { + Some(samplers) => Box::new( + NoiseBasedAquifer::new( + AquiferSamplers::new(samplers.clone()), + self.picker, + self.root + .from_hash_of("minecraft:aquifer") + .fork_positional(), + RegistryAquiferBlockStates::new(data.registry).map_err(stage("aquifer"))?, + volume, + &mut context, + ) + .map_err(stage("aquifer"))?, + ), + None => Box::new(DisabledAquifer::new( + self.picker, + data.registry.default_state("minecraft:air").unwrap(), + )), + }; + worker.timings.noise += lap(&mut clock); + fill_noise( + &mut chunk, + volume, + self.router.get(RouterField::FinalDensity).as_ref(), + &mut context, + aquifer.as_mut(), + self.settings.default_block, + ) + .map_err(stage("noise"))?; + let generation = self.generation(); + worker.timings.noise += lap(&mut clock); + build_surface( + &mut chunk, + self.rule.clone(), + SurfaceInputs::<R, _> { + generation, + noise_volume: volume, + root: self.root.clone(), + surface: SurfaceQueries { + pipeline: self, + temperatures: &mut worker.temperatures, + biome: Biomes::Region(&biomes), + possible: Some(possible), + }, + preliminary_surface: self.preliminary.clone(), + density_context: &mut context, + write_min_y: min, + write_max_y: min + height - 1, + }, + &self.extensions, + ) + .map_err(stage("surface"))?; + worker.timings.surface += lap(&mut clock); + let carvers = &data.biome_carvers; + let mask = generate_carving_mask(self.seed, pos, generation, false, |origin| { + self.carver_biome(worker, origin) + .map(|id| carvers[id.0 as usize].as_slice()) + }) + .map_err(stage("carvers"))?; + worker.timings.carvers += lap(&mut clock); + if !mask.is_empty() { + let mut resolver = self.source.resolver( + &self.climate, + self.router.get(RouterField::Erosion).as_ref(), + ); + let mut biome_context = SamplerContext::default(); + apply_carving_mask( + &mut chunk, + &mask, + self.rule.clone(), + TopMaterialInputs::<R, _> { + generation, + root: self.root.clone(), + surface: SurfaceQueries { + pipeline: self, + temperatures: &mut worker.temperatures, + biome: Biomes::Resolver(&mut resolver, &mut biome_context), + possible: None, + }, + preliminary_surface: self.preliminary.clone(), + density_context: &mut context, + }, + aquifer.as_mut(), + &data.carving_blocks, + |_| true, + ) + .map_err(stage("carvers"))?; + } + worker.timings.carvers += lap(&mut clock); + chunk + .prime_heightmaps(&[ + HeightmapType::MotionBlocking, + HeightmapType::MotionBlockingNoLeaves, + HeightmapType::OceanFloor, + HeightmapType::WorldSurface, + ]) + .map_err(stage("heightmaps"))?; + chunk.set_generation_stage(PreLightChunkStage::Terrain); + let _ = sea; + Ok(ProtoChunk { + terrain: chunk, + biomes: center, + data: data.clone(), + decorated: false, + block_entities: Vec::new(), + structure_starts: references, + }) + } +} + +impl<R: RandomSource> Pipeline<R> +where + R::Positional: Clone + Send + Sync, +{ + /// ChunkGenerator.getBaseHeight: the first free Y above the noise column + /// (with aquifers, without terrain adaptation) for a heightmap type. + fn base_height(&self, x: i32, z: i32, kind: HeightmapType) -> i32 { + let min = self.settings.min_y; + let mut found = min; + self.noise_column(x, z, &mut |y, state| { + if kind.is_opaque(self.data.states.get(state)) { + found = y + 1; + return true; + } + false + }); + found + } + /// ChunkGenerator.getBaseColumn: opacity of each noise-column state for + /// a heightmap type, indexed from the minimum Y. + fn base_column(&self, x: i32, z: i32, kind: HeightmapType) -> Vec<bool> { + let (min, height) = (self.settings.min_y, self.settings.height); + let mut column = vec![false; height as usize]; + self.noise_column(x, z, &mut |y, state| { + column[(y - min) as usize] = kind.is_opaque(self.data.states.get(state)); + false + }); + column + } + /// iterateNoiseColumn from the top down until `visit` returns true. + fn noise_column(&self, x: i32, z: i32, visit: &mut dyn FnMut(i32, BlockStateId) -> bool) { + let (min, height) = (self.settings.min_y, self.settings.height); + let Ok(volume) = DensityVolume::new([1, height, 1], [x, min, z], [1; 3]) else { + return; + }; + let mut context = SamplerContext::cached(); + let mut aquifer: Box<dyn TerrainAquifer> = match &self.aquifer { + Some(samplers) => match RegistryAquiferBlockStates::new(self.data.registry) + .ok() + .and_then(|blocks| { + NoiseBasedAquifer::new( + AquiferSamplers::new(samplers.clone()), + self.picker, + self.root + .from_hash_of("minecraft:aquifer") + .fork_positional(), + blocks, + volume, + &mut context, + ) + .ok() + }) { + Some(aquifer) => Box::new(aquifer), + None => return, + }, + None => Box::new(DisabledAquifer::new( + self.picker, + self.data.registry.default_state("minecraft:air").unwrap(), + )), + }; + let mut density = vec![0.; height as usize]; + if self + .router + .get(RouterField::FinalDensity) + .sample_volume(&mut context, &mut density, volume) + .is_err() + { + return; + } + for y in (0..height).rev() { + let state = aquifer + .compute_substance( + &mut context, + [x, min + y, z], + f64::from(density[y as usize]), + ) + .ok() + .flatten() + .unwrap_or(self.settings.default_block); + if visit(min + y, state) { + return; + } + } + } +} +/// Biome and height queries for structure generation on one worker. +pub(super) struct StructureQueries<'a, R: RandomSource> { + pipeline: &'a Pipeline<R>, + worker: &'a mut WorkerState, + valid: BTreeSet<BiomeId>, +} +impl<R: RandomSource> super::structure::jigsaw::JigsawContext for StructureQueries<'_, R> +where + R::Positional: Clone + Send + Sync, +{ + fn min_y(&self) -> i32 { + self.pipeline.settings.min_y + } + fn max_y(&self) -> i32 { + self.pipeline.settings.min_y + self.pipeline.settings.height - 1 + } + fn base_height(&mut self, x: i32, z: i32, kind: HeightmapType) -> i32 { + if let Some(h) = self.worker.heights.get(&(x, z, kind as u8)) { + return *h; + } + let h = self.pipeline.base_height(x, z, kind); + if self.worker.heights.len() > 65536 { + self.worker.heights.clear(); + } + self.worker.heights.insert((x, z, kind as u8), h); + h + } + fn column_has_valid_biome(&mut self, x: i32, z: i32, min_y: i32, max_y: i32) -> bool { + use super::structure::start::StartContext; + ((min_y >> 2)..=(max_y >> 2)).any(|qy| { + let id = self.noise_biome([x >> 2, qy, z >> 2]); + self.valid.contains(&id) + }) + } +} +impl<R: RandomSource> super::structure::start::StartContext for StructureQueries<'_, R> +where + R::Positional: Clone + Send + Sync, +{ + fn seed(&self) -> i64 { + self.pipeline.seed + } + fn sea_level(&self) -> i32 { + self.pipeline.settings.sea_level + } + fn base_column(&mut self, x: i32, z: i32, kind: HeightmapType) -> Vec<bool> { + self.pipeline.base_column(x, z, kind) + } + fn cold_enough_to_snow(&mut self, biome: BiomeId, pos: [i32; 3]) -> bool { + let sea = self.pipeline.settings.sea_level; + self.worker.temperatures[biome.0 as usize] + .cold_enough_to_snow(BlockPos::new(pos[0], pos[1], pos[2]), sea) + } + fn generation(&self) -> WorldGenerationContext { + self.pipeline.generation() + } + fn noise_biome(&mut self, quart: [i32; 3]) -> BiomeId { + let mut resolver = self.pipeline.source.resolver( + &self.pipeline.climate, + self.pipeline.router.get(RouterField::Erosion).as_ref(), + ); + resolver + .sample(&mut self.worker.carver_context, quart) + .ok() + .and_then(|name| self.pipeline.data.biome_id(name)) + .unwrap_or(BiomeId(0)) + } + fn set_valid_biomes(&mut self, biomes: &BTreeSet<BiomeId>) { + self.valid = biomes.clone(); + } +} + +enum Biomes<'a, 'b> { + Region(&'a BiomeRegion<BiomeId>), + Resolver( + &'a mut super::biome_source::BiomeSourceResolver<'b>, + &'a mut SamplerContext, + ), +} +/// Material-rule world queries for one chunk: shared seed-bound noises, the +/// worker's temperature caches and either stored or raw-resolver biomes. +struct SurfaceQueries<'a, 'b, R: RandomSource> { + pipeline: &'a Pipeline<R>, + temperatures: &'a mut [BiomeTemperature], + biome: Biomes<'a, 'b>, + possible: Option<BTreeSet<String>>, +} +impl<R: RandomSource> SurfaceQueries<'_, '_, R> { + fn temperature(&mut self, name: &str) -> Result<&mut BiomeTemperature, MaterialRuleError> { + let id = self + .pipeline + .data + .biome_id(name) + .ok_or(MaterialRuleError::MissingBiome)?; + Ok(&mut self.temperatures[id.0 as usize]) + } +} +impl<R: RandomSource> MaterialSurfaceQueries for SurfaceQueries<'_, '_, R> { + fn surface_depth(&mut self, x: i32, z: i32) -> i32 { + self.pipeline.surface.surface_depth(x, z) + } + fn surface_secondary(&mut self, x: i32, z: i32) -> f64 { + self.pipeline.surface.surface_secondary(x, z) + } + fn band(&mut self, p: BlockPos) -> Result<BlockStateId, MaterialRuleError> { + self.pipeline + .surface + .band([p.x, p.y, p.z]) + .ok_or(MaterialRuleError::InvalidBandIndex) + } + fn bind_noise(&mut self, name: &str) -> Result<Arc<dyn Noise>, DecodeError> { + self.pipeline + .noises + .get(&super::tags::identifier(name)?) + .cloned() + .ok_or(DecodeError::Field("unknown material noise")) + } + fn possible_biomes(&self) -> Option<BTreeSet<String>> { + self.possible.clone() + } + fn biome(&mut self, p: BlockPos) -> Result<Option<Arc<str>>, MaterialRuleError> { + let data = &self.pipeline.data; + let id = match &mut self.biome { + Biomes::Region(region) => *region + .biome(p) + .map_err(|_| MaterialRuleError::MissingBiome)?, + Biomes::Resolver(resolver, context) => { + let name = resolver + .sample(context, self.pipeline.zoom.quart_at_block(p)) + .map_err(|_| MaterialRuleError::BiomeQueryFailed)?; + data.biome_id(name).ok_or(MaterialRuleError::MissingBiome)? + } + }; + Ok(Some(data.biome_names[id.0 as usize].clone())) + } + fn cold_enough_to_snow( + &mut self, + name: &str, + p: BlockPos, + sea: i32, + ) -> Result<bool, MaterialRuleError> { + Ok(self.temperature(name)?.cold_enough_to_snow(p, sea)) + } + fn melts_frozen_ocean( + &mut self, + name: &str, + p: BlockPos, + sea: i32, + ) -> Result<bool, MaterialRuleError> { + Ok(self + .temperature(name)? + .should_melt_frozen_ocean_iceberg_slightly(p, sea)) + } +} + +fn lap(clock: &mut std::time::Instant) -> std::time::Duration { + let now = std::time::Instant::now(); + let elapsed = now - *clock; + *clock = now; + elapsed +} +/// Cumulative wall time spent by one worker in each proto-chunk stage. +#[derive(Clone, Copy, Debug, Default)] +pub struct StageTimings { + pub chunks: u64, + pub biomes: std::time::Duration, + /// Noise fill including aquifer setup. + pub noise: std::time::Duration, + pub surface: std::time::Duration, + /// Structure starts/references and terrain adaptation. + pub structures: std::time::Duration, + /// Carving mask generation/application and final heightmap priming. + pub carvers: std::time::Duration, +} +/// Worker-owned mutable caches. Biome temperature caches mirror vanilla's +/// thread-local caches and never change results. +pub(super) struct WorkerState { + pub(super) temperatures: Vec<BiomeTemperature>, + biome_context: SamplerContext, + carver_context: SamplerContext, + timings: StageTimings, + heights: HashMap<(i32, i32, u8), i32>, +} + +trait SeededPipeline: Send + Sync { + fn generate( + &self, + worker: &mut WorkerState, + pos: ChunkPos, + ) -> Result<ProtoChunk, GeneratorError>; + fn decorate( + &self, + worker: &mut WorkerState, + region: &mut [ProtoChunk; 9], + ) -> Result<DecorateStats, GeneratorError>; + fn data(&self) -> &Arc<GeneratorData>; + fn sea_level(&self) -> i32; + fn structure_starts( + &self, + worker: &mut WorkerState, + pos: ChunkPos, + ) -> Vec<Arc<super::structure::start::StructureStart>>; + fn unsupported_features(&self) -> Vec<(String, String)>; +} +impl<R: RandomSource + 'static> SeededPipeline for Pipeline<R> +where + R::Positional: Clone + Send + Sync, +{ + fn generate( + &self, + worker: &mut WorkerState, + pos: ChunkPos, + ) -> Result<ProtoChunk, GeneratorError> { + Pipeline::generate(self, worker, pos) + } + fn decorate( + &self, + worker: &mut WorkerState, + region: &mut [ProtoChunk; 9], + ) -> Result<DecorateStats, GeneratorError> { + match &self.decoration { + Some(decoration) => { + let center = region[4].position(); + // WorldGenRegion's level random, positioned at the center chunk. + let mut random = self + .root + .from_hash_of("minecraft:worldgen_region_random") + .fork_positional() + .at(BlockPos::new( + center.x.wrapping_shl(4), + 0, + center.z.wrapping_shl(4), + )); + decoration.decorate( + &self.data, + self.seed, + self.generation(), + worker, + region, + &mut random, + self.structures.as_ref(), + ) + } + None => Err(resource("decoration resources were not loaded")), + } + } + fn data(&self) -> &Arc<GeneratorData> { + &self.data + } + fn sea_level(&self) -> i32 { + self.settings.sea_level + } + fn structure_starts( + &self, + worker: &mut WorkerState, + pos: ChunkPos, + ) -> Vec<Arc<super::structure::start::StructureStart>> { + match &self.structures { + Some(structures) => structures + .starts_at( + &mut StructureQueries { + pipeline: self, + worker, + valid: BTreeSet::new(), + }, + pos, + ) + .to_vec(), + None => Vec::new(), + } + } + fn unsupported_features(&self) -> Vec<(String, String)> { + self.decoration + .as_ref() + .map(super::generator_decoration::Decoration::unsupported) + .unwrap_or_default() + } +} + +/// Counters from one FEATURES pass. +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub struct DecorateStats { + /// Placed-feature roots executed (including those that placed nothing). + pub placed: usize, + /// Roots skipped because their algorithm or bindings are not implemented. + pub unsupported: usize, + /// Roots that started but failed on an unavailable world query or error. + /// Their partial writes are kept, as each root reseeds its own random. + pub failed: usize, + /// Identifiers of skipped or failed roots, for diagnostics. + pub skipped: BTreeSet<String>, +} + +/// A seed-bound generator for one dimension, shareable across worker threads. +#[derive(Clone)] +pub struct OverworldGenerator { + pipeline: Arc<dyn SeededPipeline>, +} +impl OverworldGenerator { + /// The `minecraft:overworld` dimension of the `minecraft:normal` world preset. + pub fn new(data: Arc<GeneratorData>, seed: i64) -> Result<Self, GeneratorError> { + Self::for_dimension(data, seed, "minecraft:normal", "minecraft:overworld") + } + /// The overworld without structures (no starts, terrain adaptation or + /// structure pieces), as in a world with structure generation disabled. + pub fn without_structures(data: Arc<GeneratorData>, seed: i64) -> Result<Self, GeneratorError> { + Self::build(data, seed, "minecraft:normal", "minecraft:overworld", false) + } + /// Any noise-generator dimension of a bundled world preset. + pub fn for_dimension( + data: Arc<GeneratorData>, + seed: i64, + preset: &str, + dimension: &str, + ) -> Result<Self, GeneratorError> { + Self::build(data, seed, preset, dimension, true) + } + fn build( + data: Arc<GeneratorData>, + seed: i64, + preset: &str, + dimension: &str, + with_structures: bool, + ) -> Result<Self, GeneratorError> { + let preset_json: Value = serde_json::from_str( + data.world_presets + .get(preset) + .ok_or_else(|| resource(format!("missing world preset {preset}")))?, + )?; + let generator = preset_json["dimensions"][dimension]["generator"].clone(); + if generator["type"].as_str() != Some("minecraft:noise") { + return Err(resource(format!("{dimension} is not a noise generator"))); + } + let settings_json: Value = match &generator["settings"] { + Value::String(name) => serde_json::from_str( + data.settings + .get(name) + .ok_or_else(|| resource(format!("missing noise settings {name}")))?, + )?, + inline => inline.clone(), + }; + let pipeline: Arc<dyn SeededPipeline> = if settings_json["legacy_random_source"] + .as_bool() + .unwrap_or(false) + { + Arc::new(Pipeline::new( + data, + seed, + LegacyRandom::new(seed), + &generator, + &settings_json, + with_structures, + )?) + } else { + Arc::new(Pipeline::new( + data, + seed, + XoroshiroRandom::new(seed), + &generator, + &settings_json, + with_structures, + )?) + }; + Ok(Self { pipeline }) + } + pub fn data(&self) -> &Arc<GeneratorData> { + self.pipeline.data() + } + pub fn sea_level(&self) -> i32 { + self.pipeline.sea_level() + } + /// Placed features of this dimension's biomes that decoration skips because + /// their algorithm or bindings are not implemented, with the decode error. + pub fn unsupported_features(&self) -> Vec<(String, String)> { + self.pipeline.unsupported_features() + } + /// Create per-thread state. Workers are cheap; keep one per thread. + pub fn worker(&self) -> GeneratorWorker { + let data = self.pipeline.data(); + GeneratorWorker { + pipeline: self.pipeline.clone(), + state: WorkerState { + temperatures: data + .temperatures + .iter() + .map(|s| BiomeTemperature::new(*s)) + .collect(), + biome_context: SamplerContext::cached(), + carver_context: SamplerContext::default(), + timings: StageTimings::default(), + heights: HashMap::new(), + }, + } + } +} + +/// Per-thread generation state. +pub struct GeneratorWorker { + pipeline: Arc<dyn SeededPipeline>, + state: WorkerState, +} +impl GeneratorWorker { + /// Biomes, noise fill and aquifers, material surface and carvers: the + /// vanilla statuses up to TERRAIN. Independent of neighbor chunks' state. + pub fn generate_proto(&mut self, pos: ChunkPos) -> Result<ProtoChunk, GeneratorError> { + let result = self.pipeline.generate(&mut self.state, pos); + self.state.timings.chunks += 1; + result + } + /// STRUCTURE_STARTS: the structure starts owned by a chunk (cached). + pub fn structure_starts( + &mut self, + pos: ChunkPos, + ) -> Vec<Arc<super::structure::start::StructureStart>> { + self.pipeline.structure_starts(&mut self.state, pos) + } + pub fn stage_timings(&self) -> StageTimings { + self.state.timings + } + /// FEATURES status for `region[4]`. The region is a 3×3 neighborhood in + /// row-major order: index `(dz + 1) * 3 + (dx + 1)` around the center. + /// Writes may reach the neighbors, as in vanilla. Unsupported features are + /// skipped and counted. On error, chunks keep partial writes. + pub fn decorate( + &mut self, + region: &mut [ProtoChunk; 9], + ) -> Result<DecorateStats, GeneratorError> { + self.pipeline.decorate(&mut self.state, region) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn parameter_reports_quantize_like_vanilla() { + let report = r#"{"biomes":[{"biome":"minecraft:plains","parameters":{ + "temperature":[-0.45,-0.15],"humidity":[-1.0,-0.35],"continentalness":[-0.11,0.03], + "erosion":[0.45,0.55],"depth":0.0,"weirdness":[-0.2633,-0.05],"offset":0.0}}]}"#; + let table: Value = + serde_json::from_str(&quantize_parameter_report(report).unwrap()).unwrap(); + assert_eq!( + table, + serde_json::json!([{"coordinates":[[-4500,-1500],[-10000,-3500],[-1100,300], + [4500,5500],[0,0],[-2633,-500]],"offset":0,"biome":"minecraft:plains"}]) + ); + assert!( + quantize_parameter_report(r#"{"biomes":[{"parameters":{"temperature":"x"}}]}"#) + .is_err() + ); + } +} diff --git a/crates/horizon-world/src/worldgen/generator_blocks.rs b/crates/horizon-world/src/worldgen/generator_blocks.rs new file mode 100644 index 000000000..390fb338c --- /dev/null +++ b/crates/horizon-world/src/worldgen/generator_blocks.rs @@ -0,0 +1,163 @@ +//! Optional block-behavior registries used by feature placement: physical +//! properties, face support, collision and survival rules. Loaded from the +//! bundle's `blocks/` directory (Java-exported, see prepare_native_client.py). +use super::generator::GeneratorError; +use crate::{ + block_collision::BlockCollisionRegistry, + block_properties::BlockPropertiesRegistry, + block_support::BlockSupportRegistry, + block_survival::{BlockSurvivalRegistry, SurvivalDefinitions, SurvivalRule}, + collision::CachedCollisionRegistry, + nbt::{self, Limits, Tag}, + registry::BlockRegistry, +}; +use serde_json::Value; +use std::{ + collections::{BTreeMap, BTreeSet}, + fs, + path::Path, + sync::Arc, +}; + +pub(super) struct BlockBehavior { + pub(super) properties: BlockPropertiesRegistry<'static>, + pub(super) support: Arc<BlockSupportRegistry<'static>>, + pub(super) collision: Arc<BlockCollisionRegistry<'static>>, + pub(super) survival: BlockSurvivalRegistry<'static>, + pub(super) double_plants: BTreeSet<String>, + pub(super) mossy_carpets: BTreeSet<String>, +} +fn resource(message: impl Into<String>) -> GeneratorError { + GeneratorError::Resource(message.into()) +} +fn rule(name: &str) -> Option<SurvivalRule> { + use SurvivalRule::*; + if let Some(tag) = name.strip_prefix("TagBelow:") { + return Some(TagBelow(tag.to_owned())); + } + Some(match name { + "CactusFlower" => CactusFlower, + "Seagrass" => Seagrass, + "BubbleColumn" => BubbleColumn, + "RedstoneWire" => RedstoneWire, + "DoublePlant" => DoublePlant, + "Door" => Door, + "BigDripleaf" => BigDripleaf, + "BigDripleafStem" => BigDripleafStem, + "Farmland" => Farmland, + "Cocoa" => Cocoa, + "Crop" => Crop, + "GrowingPlant" => GrowingPlant, + "MangrovePropagule" => MangrovePropagule, + "Speleothem" => Speleothem, + "Scaffolding" => Scaffolding, + "PistonHead" => PistonHead, + "ChorusPlant" => ChorusPlant, + "ChorusFlower" => ChorusFlower, + "PitcherCrop" => PitcherCrop, + "Multiface" => Multiface, + "Vine" => Vine, + "HangingMoss" => HangingMoss, + "SnowLayer" => SnowLayer, + "SeaPickle" => SeaPickle, + "Fire" => Fire, + "Cactus" => Cactus, + "Path" => Path, + "Mushroom" => Mushroom, + "Bell" => Bell, + "SugarCane" => SugarCane, + "LilyPad" => LilyPad, + "Frogspawn" => Frogspawn, + "SporeBlossom" => SporeBlossom, + "SmallDripleaf" => SmallDripleaf, + "TallSeagrass" => TallSeagrass, + "Always" => Always, + "SolidBelow" => SolidBelow, + "SolidBehind" => SolidBehind, + "NonAirBelow" => NonAirBelow, + "MossCarpet" => MossCarpet, + "CenterBelow" => CenterBelow, + "Lantern" => Lantern, + "FullAbove" => FullAbove, + "FullBehind" => FullBehind, + "RigidOrCenterBelow" => RigidOrCenterBelow, + "RigidBelow" => RigidBelow, + "FullBelow" => FullBelow, + "CenterAbove" => CenterAbove, + "FaceAttached" => FaceAttached, + "SupportsBamboo" => SupportsBamboo, + _ => return None, + }) +} +impl BlockBehavior { + /// Files: `block-properties.nbt`, `cached-collision.nbt`, + /// `cached-support.nbt`, `survival-rules.json`, + /// `survival-extra-definitions.json` and `placement-definitions.json`. + pub(super) fn load( + dir: &Path, + registry: &'static BlockRegistry, + tags: &BTreeMap<String, Vec<String>>, + fluid_tags: &BTreeMap<String, Vec<String>>, + ) -> Result<Option<Self>, GeneratorError> { + if !dir.join("block-properties.nbt").exists() { + return Ok(None); + } + let read = |name: &str| -> Result<Tag, GeneratorError> { + let limits = Limits { + max_bytes: 1 << 28, + ..Limits::default() + }; + Ok(nbt::read_named(&fs::read(dir.join(name))?, limits) + .map_err(|e| resource(format!("{name}: {e:?}")))? + .0 + .tag) + }; + let json = |name: &str| -> Result<Value, GeneratorError> { + Ok(serde_json::from_str(&fs::read_to_string(dir.join(name))?)?) + }; + let collisions = + CachedCollisionRegistry::from_nbt(&read("cached-collision.nbt")?, registry)?; + let properties = + BlockPropertiesRegistry::from_nbt(&read("block-properties.nbt")?, &collisions)?; + let support = Arc::new(BlockSupportRegistry::from_nbt( + &read("cached-support.nbt")?, + registry, + )?); + let collision = Arc::new(BlockCollisionRegistry::new(Arc::new(collisions))?); + let rules = json("survival-rules.json")? + .as_object() + .ok_or_else(|| resource("survival rules"))? + .iter() + .map(|(name, value)| { + let text = value.as_str().unwrap_or_default(); + rule(text) + .map(|rule| (name.clone(), rule)) + .ok_or_else(|| resource(format!("unknown survival rule {text}"))) + }) + .collect::<Result<_, _>>()?; + let extra = json("survival-extra-definitions.json")?; + let definitions = SurvivalDefinitions { + rules, + ignition_odds: serde_json::from_value(extra["ignition_odds"].clone())?, + fence_gates: serde_json::from_value(extra["fence_gates"].clone())?, + }; + let survival = BlockSurvivalRegistry::new( + registry, + &properties, + support.clone(), + collision.clone(), + &definitions, + tags, + fluid_tags, + )?; + let placement = json("placement-definitions.json")?; + Ok(Some(Self { + double_plants: serde_json::from_value(placement["double_plants"].clone())?, + mossy_carpets: serde_json::from_value(placement["mossy_carpets"].clone())?, + properties, + support, + collision, + survival, + })) + } +} diff --git a/crates/horizon-world/src/worldgen/generator_decoration.rs b/crates/horizon-world/src/worldgen/generator_decoration.rs new file mode 100644 index 000000000..504cd831d --- /dev/null +++ b/crates/horizon-world/src/worldgen/generator_decoration.rs @@ -0,0 +1,773 @@ +//! FEATURES status over a 3×3 neighborhood of generated chunks. +//! +//! Placed features are resolved by name from the bundled feature registries. +//! Roots whose algorithm or bindings are not implemented are left out of +//! execution (but keep their place in vanilla's per-step feature ordering, so +//! decoration seeds of the remaining features are unchanged). +use super::structure::{ + BoundingBox, + start::{STEPS, place_in_chunk}, +}; +use super::{ + anchor::WorldGenerationContext, + biome::BiomeId, + biome_chunk::BiomeRegion, + biome_predicate::BiomePredicateBindings, + biome_source::ResolvedBiomeSource, + biome_temperature::BiomeTemperature, + biome_weather::BiomeWeatherBindings, + block_feature::FeatureBlockBindings, + decoration::{DecorationWorld, FeatureDecorationPlan}, + feature::{FeatureBlocks, FeatureWorld}, + feature_catalog::FeatureCatalog, + feature_graph::PlacedFeatureDefinition, + feature_region::{RegionError, TerrainRegion}, + feature_sort::FeatureIdentity, + generator::{ + DecorateStats, GenBlockStates, GeneratorData, GeneratorError, ProtoChunk, WorkerState, + }, + placement::{LayerBlock, PlacementContext, PlacementQueryError}, + tags::TagDefinitions, + terrain::PreLightChunkStage, + write_zone::GenerationWriteZone, +}; +use super::{ + generator_blocks::BlockBehavior, + state_provider::{StateProviderBindings, StateProviderCatalog}, +}; +use crate::{ + block_collision::{DynamicCollisionWorld, ShulkerCollisionState}, + block_placement::BlockPlacementBindings, + block_support::SupportType, + block_survival::SurvivalWorld, + dynamic_support::DynamicSupportWorld, + fluid::{FluidKind, FluidState}, + heightmap::{HeightmapState, HeightmapType}, + registry::BlockStateId, +}; +use horizon_core::random::{WorldgenRandom, XoroshiroRandom}; +use horizon_core::{ + biome::obfuscate_seed, + geometry::{Axis, Direction, VoxelShape}, + position::{BlockPos, ChunkPos}, +}; +use serde_json::Value; +use std::collections::HashMap; +use std::{ + collections::{BTreeMap, BTreeSet}, + sync::Arc, +}; + +pub(super) struct Decoration { + plan: FeatureDecorationPlan, + names: Vec<String>, + /// Executable roots by identity, or why the root cannot be executed. + features: Vec<Result<PlacedFeatureDefinition, String>>, + /// Placed features of each biome's generation settings, by BiomeId. + biome_features: Vec<BTreeSet<FeatureIdentity>>, + bindings: FeatureBlockBindings<'static>, + weather: Option<BiomeWeatherBindings>, + blocks: FeatureBlocks, + catalog: FeatureCatalog, + /// Placed features referenced by name (feature pool elements), decoded lazily. + named: std::sync::Mutex<HashMap<String, Option<Arc<PlacedFeatureDefinition>>>>, +} +fn resource(message: impl Into<String>) -> GeneratorError { + GeneratorError::Resource(message.into()) +} +/// Biomes in vanilla's possible-biome encounter order for this source. +fn possible_biomes(source: &ResolvedBiomeSource) -> Vec<String> { + let mut seen = BTreeSet::new(); + let ordered: Vec<String> = match source { + ResolvedBiomeSource::MultiNoise(source) => source + .parameters() + .entries() + .iter() + .map(|(_, name)| name.clone()) + .collect(), + ResolvedBiomeSource::End(source) => [ + &source.center, + &source.highlands, + &source.midlands, + &source.islands, + &source.barrens, + ] + .into_iter() + .cloned() + .collect(), + other => other + .possible_biomes() + .into_iter() + .map(str::to_owned) + .collect(), + }; + ordered + .into_iter() + .filter(|name| seen.insert(name.clone())) + .collect() +} +impl Decoration { + pub(super) fn new( + data: &Arc<GeneratorData>, + source: &ResolvedBiomeSource, + ) -> Result<Option<Self>, GeneratorError> { + let Some(resources) = &data.feature_resources else { + return Ok(None); + }; + let registry = data.registry(); + let mut feature_tags = TagDefinitions::default(); + for (name, json) in &resources.feature_tags { + feature_tags.apply_json(name, "vanilla", json)?; + } + let catalog = + FeatureCatalog::from_resources(&resources.features, &resources.placed, &feature_tags)?; + let biomes = Arc::new(BiomePredicateBindings::new( + &data + .biome_names() + .iter() + .enumerate() + .map(|(i, name)| (name.to_string(), BiomeId(i as u32))) + .collect(), + &data.biome_tags, + )?); + let mut bindings = + FeatureBlockBindings::with_tags(registry, data.integers().clone(), &data.block_tags)? + .with_fluid_tags(&resources.fluid_tags)? + .with_biomes(biomes.clone()); + if let Some(structures) = &data.structures { + bindings = bindings.with_structures(structures.clone()); + } + if let Some(blocks) = &resources.blocks { + bindings = bindings + .with_block_properties(&blocks.properties)? + .with_state_providers( + StateProviderBindings::new( + registry, + data.integers().clone(), + &data.block_tags, + )? + .with_block_properties(&blocks.properties)? + .with_fluid_tags(&resources.fluid_tags)? + .with_biomes(biomes), + StateProviderCatalog::from_resources(&resources.state_providers)?, + BlockPlacementBindings::new( + registry, + &blocks.properties, + &blocks.double_plants, + &blocks.mossy_carpets, + )?, + )?; + } + let tags = feature_tags + .build(|name, _| resources.placed.contains_key(name).then(|| name.to_owned())) + .map_err(|e| resource(format!("feature tags: {e:?}")))? + .tags; + let mut ids = BTreeMap::<String, FeatureIdentity>::new(); + let mut names = Vec::new(); + let mut features = Vec::new(); + let mut identity = |name: &str| -> FeatureIdentity { + *ids.entry(name.to_owned()).or_insert_with(|| { + let id = FeatureIdentity(names.len() as u32); + names.push(name.to_owned()); + features.push( + catalog + .placed_feature_with_blocks(&Value::from(name).to_string(), &bindings) + .map_err(|e| e.to_string()), + ); + id + }) + }; + let mut biome_features = vec![BTreeSet::new(); data.biome_names().len()]; + let mut plan = Vec::new(); + for name in possible_biomes(source) { + let id = data + .biome_id(&name) + .ok_or_else(|| resource(format!("unknown biome {name}")))?; + let json: Value = serde_json::from_str(data.biome_json(id))?; + let mut steps = Vec::new(); + for step in json["features"].as_array().into_iter().flatten() { + let mut list = Vec::new(); + let entries = match step { + Value::String(tag) if tag.starts_with('#') => tags + .get(&super::tags::identifier(&tag[1..])?) + .cloned() + .ok_or_else(|| resource(format!("unknown feature tag {tag}")))?, + Value::String(name) => vec![name.clone()], + Value::Array(values) => values + .iter() + .map(|v| { + v.as_str() + .map(str::to_owned) + .ok_or_else(|| resource("inline placed feature in biome")) + }) + .collect::<Result<_, _>>()?, + _ => return Err(resource("biome feature step")), + }; + for entry in entries { + let feature = identity(&super::tags::identifier(&entry)?); + list.push(feature); + biome_features[id.0 as usize].insert(feature); + } + steps.push(list); + } + plan.push((id, steps)); + } + let plan = FeatureDecorationPlan::new(plan).map_err(|e| resource(e.to_string()))?; + let weather = BiomeWeatherBindings::new(&bindings).ok(); + Ok(Some(Self { + plan, + names, + features, + biome_features, + weather, + blocks: FeatureBlocks::from_registry(registry)?, + bindings, + catalog, + named: std::sync::Mutex::new(HashMap::new()), + })) + } + fn named_feature(&self, name: &str) -> Option<Arc<PlacedFeatureDefinition>> { + let mut named = self.named.lock().unwrap(); + named + .entry(name.to_owned()) + .or_insert_with(|| { + self.catalog + .placed_feature_with_blocks(&Value::from(name).to_string(), &self.bindings) + .ok() + .map(Arc::new) + }) + .clone() + } + /// Placed-feature roots that cannot run, with their decode errors. + pub(super) fn unsupported(&self) -> Vec<(String, String)> { + self.names + .iter() + .zip(&self.features) + .filter_map(|(name, feature)| feature.as_ref().err().map(|e| (name.clone(), e.clone()))) + .collect() + } + #[allow(clippy::too_many_arguments)] + pub(super) fn decorate( + &self, + data: &Arc<GeneratorData>, + seed: i64, + generation: WorldGenerationContext, + worker: &mut WorkerState, + region: &mut [ProtoChunk; 9], + level_random: &mut dyn super::structure::legacy::PieceRandom, + structures: Option<&super::generator_structures::StructureState>, + ) -> Result<DecorateStats, GeneratorError> { + let center = region[4].position(); + for (i, chunk) in region.iter().enumerate() { + let expected = ChunkPos::new( + center.x.wrapping_add(i as i32 % 3 - 1), + center.z.wrapping_add(i as i32 / 3 - 1), + ); + if chunk.position() != expected { + return Err(resource("decoration region is not a 3×3 neighborhood")); + } + if (chunk.terrain.generation_stage() as u8) < PreLightChunkStage::Terrain as u8 { + return Err(resource("decoration requires terrain-stage chunks")); + } + } + if region[4].is_decorated() { + return Ok(DecorateStats::default()); + } + let mut chunks = Vec::with_capacity(9); + let mut biomes = Vec::with_capacity(9); + let (min_y, height) = (region[4].terrain.min_y(), region[4].terrain.height()); + for chunk in region.iter_mut() { + let empty = super::terrain::TerrainChunk::new( + chunk.position(), + min_y, + height, + data.registry(), + data.block_states().clone(), + ) + .map_err(|e| resource(e.to_string()))?; + chunks.push(std::mem::replace(&mut chunk.terrain, empty)); + biomes.push(chunk.biomes().clone()); + } + let terrain = TerrainRegion::new(chunks, generation) + .and_then(|region| region.with_block_bindings(&self.bindings)) + .map(|region| region.with_world_seed(seed)); + let terrain = match terrain { + Ok(terrain) => terrain, + Err(e) => return Err(resource(e.to_string())), + }; + let mut block_entities = Vec::new(); + for chunk in region.iter_mut() { + block_entities.append(&mut chunk.block_entities); + } + let mut world = World { + block_entities, + level_random, + blocks: data + .feature_resources + .as_ref() + .and_then(|r| r.blocks.as_ref()), + region: terrain, + biomes: BiomeRegion::new(biomes, obfuscate_seed(seed)) + .map_err(|e| resource(e.to_string()))?, + zone: GenerationWriteZone::new(center, 1), + decoration: self, + temperatures: &mut worker.temperatures, + }; + let mut stats = DecorateStats::default(); + let blocks = self.blocks; + let references = region[4].structure_starts.clone(); + let chunk_box = BoundingBox::new( + [center.x * 16, generation.min_y + 1, center.z * 16], + [ + center.x * 16 + 15, + generation.min_y + generation.height - 1, + center.z * 16 + 15, + ], + ); + let mut structure_errors = 0; + let result = self.plan.decorate( + &mut world, + center, + seed, + STEPS.len(), + |world, random, decoration_seed, step| { + let Some(structures) = structures else { + return Ok(()); + }; + let Some(in_step) = structures.by_step.get(step) else { + return Ok(()); + }; + for (index, &structure) in in_step.iter().enumerate() { + random.set_feature_seed(decoration_seed, index as i32, step as i32); + for start in references.iter().filter(|s| s.structure == structure) { + let mut place_feature = + |world: &mut World<'_>, + random: &mut WorldgenRandom<XoroshiroRandom>, + name: &str, + pos: [i32; 3]| { + match self.named_feature(name) { + Some(feature) => feature + .place(world, random, pos, blocks) + .map_err(|e| PlacementQueryError::Failed(e.to_string())), + None => Ok(false), + } + }; + if place_in_chunk( + start, + world, + &structures.resources, + random, + chunk_box, + &mut place_feature, + ) + .is_err() + { + structure_errors += 1; + } + } + } + Ok(()) + }, + |world, placer, random, id, origin| { + let Ok(feature) = &self.features[id.0 as usize] else { + stats.unsupported += 1; + stats.skipped.insert(self.names[id.0 as usize].clone()); + return Ok(false); + }; + stats.placed += 1; + let placed = placer.place_with_biome_check( + &feature.placement, + world, + random, + origin, + id, + |world, random, p| feature.feature.place(world, random, p, blocks), + ); + if placed.is_err() { + stats.failed += 1; + stats.skipped.insert(self.names[id.0 as usize].clone()); + } + Ok(placed.unwrap_or(false)) + }, + ); + for (pos, nbt) in std::mem::take(&mut world.block_entities) { + let index = ((pos[2] >> 4).wrapping_sub(center.z) + 1) * 3 + + (pos[0] >> 4).wrapping_sub(center.x) + + 1; + if let Some(chunk) = usize::try_from(index).ok().and_then(|i| region.get_mut(i)) { + chunk.block_entities.push((pos, nbt)); + } + } + for terrain in world.region.into_chunks() { + let p = terrain.position(); + let index = (p.z.wrapping_sub(center.z) + 1) * 3 + p.x.wrapping_sub(center.x) + 1; + region[index as usize].terrain = terrain; + } + result.map_err(|e| GeneratorError::Stage("features", e.to_string()))?; + stats.failed += structure_errors; + region[4] + .terrain + .set_generation_stage(PreLightChunkStage::Features); + region[4].set_decorated(); + Ok(stats) + } +} + +/// WorldGenRegion-style view: reads anywhere in the 3×3 region, writes within +/// the FEATURES step's write radius, biome lookups through the biome zoom. +struct World<'a> { + block_entities: Vec<([i32; 3], crate::nbt::Compound)>, + level_random: &'a mut dyn super::structure::legacy::PieceRandom, + blocks: Option<&'a BlockBehavior>, + region: TerrainRegion<'static, GenBlockStates>, + biomes: BiomeRegion<BiomeId>, + zone: GenerationWriteZone, + decoration: &'a Decoration, + temperatures: &'a mut [BiomeTemperature], +} +impl DecorationWorld for World<'_> { + type Error = RegionError; + fn min_section_y(&mut self) -> Result<i32, RegionError> { + Ok(self + .region + .min_y() + .map_err(|_| RegionError::InvalidChunks)? + >> 4) + } + fn chunk_biomes(&mut self, chunk: ChunkPos) -> Result<Vec<BiomeId>, RegionError> { + self.biomes + .present_in_chunk(chunk) + .map_err(RegionError::Biome) + } + fn set_currently_generating(&mut self, _: Option<FeatureIdentity>) -> Result<(), RegionError> { + Ok(()) + } +} +impl FeatureWorld for World<'_> { + type Error = RegionError; + fn block(&mut self, position: [i32; 3]) -> Result<BlockStateId, RegionError> { + self.region.block(position) + } + fn set_block( + &mut self, + position: [i32; 3], + state: BlockStateId, + _flags: i32, + ) -> Result<bool, RegionError> { + if !self + .zone + .contains_block(BlockPos::new(position[0], position[1], position[2])) + { + return Ok(false); + } + self.region.set_block_worldgen(position, state)?; + self.block_entities.retain(|(p, _)| *p != position); + Ok(true) + } +} +fn query(e: impl std::fmt::Display) -> PlacementQueryError { + PlacementQueryError::Failed(e.to_string()) +} +impl<'a> World<'a> { + fn blocks(&self) -> Result<&'a BlockBehavior, PlacementQueryError> { + self.blocks.ok_or(PlacementQueryError::Unavailable) + } +} +/// Proto chunks hold no block entities, so dynamic shapes resolve to absent. +impl DynamicSupportWorld for World<'_> { + type Error = PlacementQueryError; + fn shulker_is_closed(&mut self, _: [i32; 3]) -> Result<Option<bool>, PlacementQueryError> { + Ok(None) + } + fn moving_piston_shape( + &mut self, + _: [i32; 3], + ) -> Result<Option<VoxelShape>, PlacementQueryError> { + Ok(None) + } +} +impl DynamicCollisionWorld for World<'_> { + fn shulker_collision_state( + &mut self, + _: [i32; 3], + ) -> Result<Option<ShulkerCollisionState>, PlacementQueryError> { + Ok(None) + } +} +impl SurvivalWorld for World<'_> { + fn fluid_state(&mut self, position: [i32; 3]) -> Result<FluidState, PlacementQueryError> { + self.region.fluid_state(position) + } + /// Unlit generation chunks report no sky or block light. + fn raw_brightness(&mut self, _: [i32; 3], _: i32) -> Result<i32, PlacementQueryError> { + Ok(0) + } + fn block_state(&mut self, position: [i32; 3]) -> Result<BlockStateId, PlacementQueryError> { + self.region.block_state(position) + } +} +impl PlacementContext for World<'_> { + fn state_collision_empty( + &mut self, + state: BlockStateId, + position: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + let collision = self.blocks()?.collision.clone(); + collision + .collision_shape(self, state, position) + .map(|shape| shape.is_empty()) + .map_err(query) + } + /// Block entities are not stored in proto chunks; loot tables are no-ops. + fn set_block_entity_loot_table( + &mut self, + _: [i32; 3], + _: &str, + _: &mut impl horizon_core::random::RandomSource, + ) -> Result<(), PlacementQueryError> { + Ok(()) + } + fn attachment_at( + &mut self, + position: [i32; 3], + direction: Direction, + ) -> Result<bool, PlacementQueryError> { + let blocks = self.blocks()?; + blocks + .survival + .can_attach_to(self, position, direction) + .map_err(query) + } + fn next_world_boolean(&mut self) -> Result<bool, PlacementQueryError> { + Ok(self.level_random.boolean()) + } + fn next_world_float(&mut self) -> Result<f32, PlacementQueryError> { + Ok(self.level_random.float()) + } + fn next_world_int(&mut self, bound: i32) -> Result<i32, PlacementQueryError> { + Ok(self.level_random.int(bound)) + } + fn block_survives( + &mut self, + state: BlockStateId, + position: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + let blocks = self.blocks()?; + blocks + .survival + .can_survive(self, state, position) + .map_err(query) + } + fn face_sturdy( + &mut self, + position: [i32; 3], + direction: Direction, + ) -> Result<bool, PlacementQueryError> { + let state = self.region.block_state(position)?; + self.state_face_sturdy(state, position, direction) + } + fn state_face_sturdy( + &mut self, + state: BlockStateId, + position: [i32; 3], + direction: Direction, + ) -> Result<bool, PlacementQueryError> { + let support = self.blocks()?.support.clone(); + support + .is_face_sturdy(self, state, position, direction, SupportType::Full) + .map_err(query) + } + fn center_sturdy( + &mut self, + position: [i32; 3], + direction: Direction, + ) -> Result<bool, PlacementQueryError> { + let state = self.region.block_state(position)?; + let support = self.blocks()?.support.clone(); + support + .is_face_sturdy(self, state, position, direction, SupportType::Center) + .map_err(query) + } + fn collision_full_block( + &mut self, + state: BlockStateId, + position: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + let collision = self.blocks()?.collision.clone(); + let shape = collision + .collision_shape(self, state, position) + .map_err(query)?; + let [nx, ny, nz] = shape.sizes(); + Ok(!shape.is_empty() + && [Axis::X, Axis::Y, Axis::Z] + .into_iter() + .all(|axis| shape.min(axis) == 0.0 && shape.max(axis) == 1.0) + && (0..nx).all(|x| { + (0..ny).all(|y| (0..nz).all(|z| shape.is_full(x as i32, y as i32, z as i32))) + })) + } + fn set_block_entity( + &mut self, + position: [i32; 3], + nbt: crate::nbt::Compound, + ) -> Result<(), PlacementQueryError> { + self.block_entities.retain(|(p, _)| *p != position); + self.block_entities.push((position, nbt)); + Ok(()) + } + fn world_seed(&mut self) -> Result<i64, PlacementQueryError> { + self.region.world_seed() + } + fn ensure_can_write(&mut self, position: [i32; 3]) -> Result<bool, PlacementQueryError> { + Ok(self + .zone + .contains_block(BlockPos::new(position[0], position[1], position[2]))) + } + /// BulkSectionAccess write: section storage only, no heightmap updates. + fn set_section_block( + &mut self, + [x, y, z]: [i32; 3], + state: BlockStateId, + ) -> Result<(), PlacementQueryError> { + self.region + .chunk_mut(x >> 4, z >> 4)? + .set_block_raw(x, y, z, state) + .map_err(|e| query(format!("{e:?}")))?; + Ok(()) + } + /// Generation regions contain no entities. + fn unobstructed_block(&mut self, _: [i32; 3]) -> Result<bool, PlacementQueryError> { + Ok(true) + } + fn destroy_block_without_entity( + &mut self, + position: [i32; 3], + _drop_resources: bool, + ) -> Result<bool, PlacementQueryError> { + let chunk = self.region.chunk(position[0] >> 4, position[2] >> 4)?; + let state = chunk.block(position[0], position[1], position[2]); + if chunk.block_properties(state).is_air() { + return Ok(false); + } + let air = self + .decoration + .bindings + .registry() + .default_state("minecraft:air") + .ok_or(PlacementQueryError::Unavailable)?; + self.set_block(position, air, 3).map_err(query) + } + fn biome_should_freeze( + &mut self, + biome: BiomeId, + position: [i32; 3], + require_edge: bool, + ) -> Result<bool, PlacementQueryError> { + let weather = self + .decoration + .weather + .clone() + .ok_or(PlacementQueryError::Unavailable)?; + let settings = self.temperatures[biome.0 as usize].settings(); + let mut temperature = std::mem::replace( + &mut self.temperatures[biome.0 as usize], + BiomeTemperature::new(settings), + ); + let result = weather.should_freeze(self, &mut temperature, position, require_edge); + self.temperatures[biome.0 as usize] = temperature; + result + } + fn biome_should_snow( + &mut self, + biome: BiomeId, + position: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + let weather = self + .decoration + .weather + .clone() + .ok_or(PlacementQueryError::Unavailable)?; + let settings = self.temperatures[biome.0 as usize].settings(); + let mut temperature = std::mem::replace( + &mut self.temperatures[biome.0 as usize], + BiomeTemperature::new(settings), + ); + let result = weather.should_snow(self, &mut temperature, position); + self.temperatures[biome.0 as usize] = temperature; + result + } + /// Lighting has not run during FEATURES; block light reads zero. + fn block_brightness(&mut self, _: [i32; 3]) -> Result<i32, PlacementQueryError> { + Ok(0) + } + fn fluid_state(&mut self, position: [i32; 3]) -> Result<FluidState, PlacementQueryError> { + self.region.fluid_state(position) + } + fn sea_level(&mut self) -> Result<i32, PlacementQueryError> { + self.region.sea_level() + } + fn schedule_fluid_tick( + &mut self, + position: [i32; 3], + fluid: FluidKind, + delay: i32, + ) -> Result<(), PlacementQueryError> { + self.region.schedule_fluid_tick(position, fluid, delay) + } + fn mark_postprocessing(&mut self, position: [i32; 3]) -> Result<(), PlacementQueryError> { + self.region.mark_postprocessing(position) + } + fn water_at(&mut self, position: [i32; 3]) -> Result<bool, PlacementQueryError> { + self.region.water_at(position) + } + fn schedule_block_tick( + &mut self, + position: [i32; 3], + block: BlockStateId, + delay: i32, + ) -> Result<(), PlacementQueryError> { + self.region.schedule_block_tick(position, block, delay) + } + fn biome_identity(&mut self, position: [i32; 3]) -> Result<BiomeId, PlacementQueryError> { + self.region + .biome_at( + &self.biomes, + BlockPos::new(position[0], position[1], position[2]), + ) + .copied() + .map_err(Into::into) + } + fn biome_allows_feature( + &mut self, + position: [i32; 3], + feature: FeatureIdentity, + ) -> Result<bool, PlacementQueryError> { + let biome = self.biome_identity(position)?; + Ok(self.decoration.biome_features[biome.0 as usize].contains(&feature)) + } + fn block_state(&mut self, position: [i32; 3]) -> Result<BlockStateId, PlacementQueryError> { + self.region.block_state(position) + } + fn block_matches_tag( + &mut self, + position: [i32; 3], + tag: &str, + ) -> Result<bool, PlacementQueryError> { + self.region.block_matches_tag(position, tag) + } + fn max_y(&mut self) -> Result<i32, PlacementQueryError> { + self.region.max_y() + } + fn layer_block(&mut self, position: [i32; 3]) -> Result<LayerBlock, PlacementQueryError> { + self.region.layer_block(position) + } + fn generation(&self) -> WorldGenerationContext { + self.region.generation() + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + self.region.min_y() + } + fn height(&mut self, kind: HeightmapType, x: i32, z: i32) -> Result<i32, PlacementQueryError> { + self.region.height(kind, x, z) + } +} diff --git a/crates/horizon-world/src/worldgen/generator_structures.rs b/crates/horizon-world/src/worldgen/generator_structures.rs new file mode 100644 index 000000000..2f32e0120 --- /dev/null +++ b/crates/horizon-world/src/worldgen/generator_structures.rs @@ -0,0 +1,160 @@ +//! STRUCTURE_STARTS / STRUCTURE_REFERENCES for the chunk generator. +use super::{ + biome::BiomeId, + block_feature::FeatureBlockBindings, + generator::{GeneratorData, GeneratorError}, + structure::{ + StructureResources, + start::{Rings, StructureRegistry, StructureStart, beardifier, create_starts}, + }, +}; +use horizon_core::{density::Beardifier, position::ChunkPos}; +use serde_json::Value; +use std::{ + collections::{BTreeSet, HashMap}, + sync::{Arc, Mutex, OnceLock}, +}; + +pub(super) type Starts = Arc<Vec<Arc<StructureStart>>>; +pub(super) struct StructureState { + pub(super) registry: StructureRegistry, + pub(super) resources: Arc<StructureResources>, + pub(super) bindings: FeatureBlockBindings<'static>, + possible_sets: Vec<usize>, + /// Structure indices of each decoration step, in registry order. + pub(super) by_step: Vec<Vec<usize>>, + starts: Mutex<HashMap<(i32, i32), Starts>>, + /// Concentric ring positions, computed on first use. + rings: OnceLock<Rings>, +} +const START_CACHE_LIMIT: usize = 65536; + +fn biome_set(data: &GeneratorData, value: &Value) -> Result<BTreeSet<BiomeId>, super::DecodeError> { + let names: Vec<&str> = match value { + Value::String(s) => vec![s.as_str()], + Value::Array(a) => a.iter().filter_map(Value::as_str).collect(), + _ => Vec::new(), + }; + let mut out = BTreeSet::new(); + for name in names { + match name.strip_prefix('#') { + Some(tag) => { + for biome in data.biome_tags.get(tag).into_iter().flatten() { + out.extend(data.biome_id(biome)); + } + } + None => out.extend(data.biome_id(name)), + } + } + Ok(out) +} +impl StructureState { + pub(super) fn new( + data: &Arc<GeneratorData>, + possible_biomes: &BTreeSet<BiomeId>, + ) -> Result<Option<Self>, GeneratorError> { + let (Some(resources), Some(raw)) = (&data.structures, &data.structure_resources) else { + return Ok(None); + }; + let registry = + StructureRegistry::new(&raw.structures, &raw.sets, raw.pools.clone(), &|value| { + biome_set(data, value) + })?; + let possible_sets = registry + .sets + .iter() + .enumerate() + .filter(|(_, set)| { + set.structures + .iter() + .any(|(s, _)| !registry.structures[*s].biomes.is_disjoint(possible_biomes)) + }) + .map(|(i, _)| i) + .collect(); + let mut by_step = vec![Vec::new(); super::structure::start::STEPS.len()]; + for (i, def) in registry.structures.iter().enumerate() { + by_step[def.step].push(i); + } + let bindings = FeatureBlockBindings::with_tags( + data.registry(), + data.integers().clone(), + &data.block_tags, + )?; + Ok(Some(Self { + registry, + resources: resources.clone(), + bindings, + possible_sets, + by_step, + starts: Mutex::new(HashMap::new()), + rings: OnceLock::new(), + })) + } + /// The (cached) structure starts owned by a chunk. + pub(super) fn starts_at( + &self, + context: &mut impl super::structure::start::StartContext, + chunk: ChunkPos, + ) -> Starts { + if let Some(found) = self.starts.lock().unwrap().get(&(chunk.x, chunk.z)) { + return found.clone(); + } + let rings = self.rings.get_or_init(|| { + let seed = context.seed(); + self.registry + .ring_positions(&self.possible_sets, seed, &mut |q| context.noise_biome(q)) + }); + let starts: Starts = Arc::new( + create_starts( + &self.registry, + &self.resources, + &self.bindings, + context, + &self.possible_sets, + rings, + chunk, + ) + .into_iter() + .map(Arc::new) + .collect(), + ); + let mut cache = self.starts.lock().unwrap(); + if cache.len() >= START_CACHE_LIMIT { + cache.clear(); + } + cache.insert((chunk.x, chunk.z), starts.clone()); + starts + } + /// ChunkGenerator.createReferences: starts within 8 chunks whose box + /// intersects this chunk's column. + pub(super) fn references( + &self, + context: &mut impl super::structure::start::StartContext, + chunk: ChunkPos, + ) -> Vec<Arc<StructureStart>> { + let (bx, bz) = (chunk.x * 16, chunk.z * 16); + let mut out = Vec::new(); + for sx in chunk.x - 8..=chunk.x + 8 { + for sz in chunk.z - 8..=chunk.z + 8 { + for start in self.starts_at(context, ChunkPos::new(sx, sz)).iter() { + let b = start.bounding_box; + if b.max[0] >= bx + && b.min[0] <= bx + 15 + && b.max[2] >= bz + && b.min[2] <= bz + 15 + { + out.push(start.clone()); + } + } + } + } + out + } + pub(super) fn beardifier( + &self, + references: &[Arc<StructureStart>], + chunk: ChunkPos, + ) -> Option<Beardifier> { + beardifier(&self.registry, references, chunk) + } +} diff --git a/crates/horizon-world/src/worldgen/height_provider.rs b/crates/horizon-world/src/worldgen/height_provider.rs new file mode 100644 index 000000000..6849f3a3a --- /dev/null +++ b/crates/horizon-world/src/worldgen/height_provider.rs @@ -0,0 +1,149 @@ +//! Anchored scalar height distributions used by cave and canyon generation. +//! Codec encoding remains separate work. +use super::{ + DecodeError, Object, + anchor::{VerticalAnchor, WorldGenerationContext}, + density::identifier, + int_range, integer, optional, required, + weighted::WeightedList, +}; +use horizon_core::random::{InvalidBound, RandomSource}; + +#[derive(Clone, Debug)] +pub enum HeightProvider { + Weighted(WeightedList<Self>), + Constant(VerticalAnchor), + Uniform { + min: VerticalAnchor, + max: VerticalAnchor, + }, + BiasedToBottom { + min: VerticalAnchor, + max: VerticalAnchor, + inner: i32, + }, + VeryBiasedToBottom { + min: VerticalAnchor, + max: VerticalAnchor, + inner: i32, + }, + Trapezoid { + min: VerticalAnchor, + max: VerticalAnchor, + plateau: i32, + }, +} +impl HeightProvider { + pub fn from_json(json: &str) -> Result<Self, DecodeError> { + Self::decode(json, 0, &mut 65536) + } + fn decode(json: &str, depth: usize, remaining: &mut usize) -> Result<Self, DecodeError> { + if depth > 256 || *remaining == 0 { + return Err(DecodeError::Field("height provider depth or node count")); + } + *remaining -= 1; + if let Ok(anchor) = VerticalAnchor::from_json(json) { + return Ok(Self::Constant(anchor)); + } + let object: Object = serde_json::from_str(json)?; + let kind = identifier(&serde_json::from_str::<String>( + required(&object, "type")?.get(), + )?)?; + let anchor = |name| VerticalAnchor::from_json(required(&object, name)?.get()); + if kind == "minecraft:constant" { + return Ok(Self::Constant(anchor("value")?)); + } + if kind == "minecraft:weighted_list" { + return Ok(Self::Weighted(WeightedList::decode( + required(&object, "distribution")?, + |raw| Self::decode(raw.get(), depth + 1, remaining), + )?)); + } + let min = anchor("min_inclusive")?; + let max = anchor("max_inclusive")?; + match kind.as_str() { + "minecraft:uniform" => Ok(Self::Uniform { min, max }), + "minecraft:biased_to_bottom" | "minecraft:very_biased_to_bottom" => { + let inner = optional(&object, "inner") + .map(|raw| int_range(raw, "inner", 1, i32::MAX)) + .transpose()? + .unwrap_or(1); + Ok(if kind == "minecraft:biased_to_bottom" { + Self::BiasedToBottom { min, max, inner } + } else { + Self::VeryBiasedToBottom { min, max, inner } + }) + } + "minecraft:trapezoid" => Ok(Self::Trapezoid { + min, + max, + plateau: optional(&object, "plateau") + .map(integer) + .transpose()? + .unwrap_or(0), + }), + _ => Err(DecodeError::Field("height provider type")), + } + } + pub fn sample( + &self, + random: &mut impl RandomSource, + context: WorldGenerationContext, + ) -> Result<i32, InvalidBound> { + let (min, max) = match self { + Self::Weighted(list) => return list.sample(random)?.sample(random, context), + Self::Constant(anchor) => return Ok(anchor.resolve(context)), + Self::Uniform { min, max } + | Self::BiasedToBottom { min, max, .. } + | Self::VeryBiasedToBottom { min, max, .. } + | Self::Trapezoid { min, max, .. } => (min.resolve(context), max.resolve(context)), + }; + match self { + Self::Constant(_) | Self::Weighted(_) => unreachable!(), + Self::Uniform { .. } => { + if min > max { + Ok(min) + } else { + random.next_int_between_inclusive(min, max) + } + } + Self::BiasedToBottom { inner, .. } | Self::VeryBiasedToBottom { inner, .. } => { + let range = max.wrapping_sub(min).wrapping_sub(*inner).wrapping_add(1); + if range <= 0 { + return Ok(min); + } + if matches!(self, Self::BiasedToBottom { .. }) { + let first = random.next_int_bound(range)?; + Ok(random + .next_int_bound(first.wrapping_add(*inner))? + .wrapping_add(min)) + } else { + let first = next_int(random, min.wrapping_add(*inner), max)?; + let second = next_int(random, min, first.wrapping_sub(1))?; + next_int(random, min, second.wrapping_sub(1).wrapping_add(*inner)) + } + } + Self::Trapezoid { plateau, .. } => { + if min > max { + return Ok(min); + } + let range = max.wrapping_sub(min); + if *plateau >= range { + return random.next_int_between_inclusive(min, max); + } + let slope = range.wrapping_sub(*plateau) / 2; + let middle = range.wrapping_sub(slope); + let left = random.next_int_between_inclusive(0, middle)?; + let right = random.next_int_between_inclusive(0, slope)?; + Ok(min.wrapping_add(left).wrapping_add(right)) + } + } + } +} +fn next_int(random: &mut impl RandomSource, min: i32, max: i32) -> Result<i32, InvalidBound> { + if min >= max { + Ok(min) + } else { + random.next_int_between_inclusive(min, max) + } +} diff --git a/crates/horizon-world/src/worldgen/iceberg.rs b/crates/horizon-world/src/worldgen/iceberg.rs new file mode 100644 index 000000000..e4370e71d --- /dev/null +++ b/crates/horizon-world/src/worldgen/iceberg.rs @@ -0,0 +1,385 @@ +//! Vanilla `minecraft:iceberg`, with native float/double rounding and the +//! short-circuited random draws of IcebergFeature. +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + feature::FeatureWorld, + placement::PlacementContext, + required, + tree::{TreeResult, kind, read, write}, + tree_blocks::{self as tb, TreeBlocks}, +}; +use crate::registry::BlockStateId; +use horizon_core::random::RandomSource; +use std::sync::Arc; + +#[derive(Clone, Debug)] +pub struct IcebergFeature { + state: BlockStateId, + blocks: Arc<TreeBlocks>, + air: BlockStateId, + water: BlockStateId, + snow_block: BlockStateId, + ice: BlockStateId, + packed_ice: BlockStateId, + blue_ice: BlockStateId, + snow: BlockStateId, +} +fn ceil(v: f32) -> i32 { + f64::from(v).ceil() as i32 +} +fn pow2(v: i32) -> f64 { + f64::from(v).powf(2.0) +} +impl IcebergFeature { + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + if kind(&object)? != "minecraft:iceberg" { + return Err(DecodeError::Field("iceberg type")); + } + let state = bindings + .codec + .decode(required(&object, "state")?.get(), false) + .map_err(|e| DecodeError::Registry(e.to_string()))?; + let registry = bindings.registry(); + let get = |name: &str| { + registry + .default_state(name) + .ok_or_else(|| DecodeError::Registry(format!("missing iceberg block {name}"))) + }; + Ok(Self { + state, + blocks: bindings.tree_blocks()?, + air: get("minecraft:air")?, + water: get("minecraft:water")?, + snow_block: get("minecraft:snow_block")?, + ice: get("minecraft:ice")?, + packed_ice: get("minecraft:packed_ice")?, + blue_ice: get("minecraft:blue_ice")?, + snow: get("minecraft:snow")?, + }) + } + fn is(&self, a: BlockStateId, b: BlockStateId) -> bool { + self.blocks.same_block(a, b) + } + fn iceberg_state(&self, s: BlockStateId) -> bool { + self.is(s, self.packed_ice) || self.is(s, self.snow_block) || self.is(s, self.blue_ice) + } + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let origin = [origin[0], world.generation().sea_level, origin[2]]; + let snow_on_top = random.next_double() > 0.7; + let angle = random.next_double() * 2.0 * std::f64::consts::PI; + let ellipse_a = 11 - random.next_int_bound(5)?; + let ellipse_c = 3 + random.next_int_bound(3)?; + let is_ellipse = random.next_double() > 0.7; + let mut over = if is_ellipse { + random.next_int_bound(6)? + 6 + } else { + random.next_int_bound(15)? + 3 + }; + if !is_ellipse && random.next_double() > 0.9 { + over += random.next_int_bound(19)? + 7; + } + let under = (over + random.next_int_bound(11)?).min(18); + let width = (over + random.next_int_bound(7)? - random.next_int_bound(5)?).min(11); + let a = if is_ellipse { ellipse_a } else { 11 }; + for xo in -a..a { + for zo in -a..a { + for y in 0..over { + let radius = if is_ellipse { + let scale = + (1.0f32 - pow2(y) as f32 / (over as f32 * 1.0f32)) * width as f32; + ceil(scale / 2.0) + } else { + self.radius_round(random, y, over, width)? + }; + if is_ellipse || xo < radius { + self.generate_block( + world, + random, + origin, + over, + xo, + y, + zo, + radius, + a, + is_ellipse, + ellipse_c, + angle, + snow_on_top, + )?; + } + } + } + } + self.smooth(world, origin, width, over, is_ellipse, ellipse_a)?; + for xo in -a..a { + for zo in -a..a { + let mut y = -1; + while y > -under { + let new_a = if is_ellipse { + ceil(a as f32 * (1.0f32 - pow2(y) as f32 / (under as f32 * 8.0f32))) + } else { + a + }; + let radius = self.radius_steep(random, -y, under, width)?; + if xo < radius { + self.generate_block( + world, + random, + origin, + under, + xo, + y, + zo, + radius, + new_a, + is_ellipse, + ellipse_c, + angle, + snow_on_top, + )?; + } + y -= 1; + } + } + } + let cut_out = if is_ellipse { + random.next_double() > 0.1 + } else { + random.next_double() > 0.7 + }; + if cut_out { + self.cut_out( + world, random, width, over, origin, is_ellipse, ellipse_a, angle, ellipse_c, + )?; + } + Ok(true) + } + #[allow(clippy::too_many_arguments)] + fn cut_out<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + width: i32, + height: i32, + origin: [i32; 3], + is_ellipse: bool, + ellipse_a: i32, + angle: f64, + ellipse_c: i32, + ) -> TreeResult<(), W::Error> { + let sign_x = if random.next_boolean() { -1 } else { 1 }; + let sign_z = if random.next_boolean() { -1 } else { 1 }; + let mut x_off = random.next_int_bound((width / 2 - 2).max(1))?; + if random.next_boolean() { + x_off = width / 2 + 1 - random.next_int_bound((width - width / 2 - 1).max(1))?; + } + let mut z_off = random.next_int_bound((width / 2 - 2).max(1))?; + if random.next_boolean() { + z_off = width / 2 + 1 - random.next_int_bound((width - width / 2 - 1).max(1))?; + } + if is_ellipse { + x_off = random.next_int_bound((ellipse_a - 5).max(1))?; + z_off = x_off; + } + let local = [sign_x * x_off, 0, sign_z * z_off]; + let angle = if is_ellipse { + angle + std::f64::consts::FRAC_PI_2 + } else { + random.next_double() * 2.0 * std::f64::consts::PI + }; + for y in 0..height - 3 { + let radius = self.radius_round(random, y, height, width)?; + self.carve( + world, radius, y, origin, false, angle, local, ellipse_a, ellipse_c, + )?; + } + let mut y = -1; + while y > -height + random.next_int_bound(5)? { + let radius = self.radius_steep(random, -y, height, width)?; + self.carve( + world, radius, y, origin, true, angle, local, ellipse_a, ellipse_c, + )?; + y -= 1; + } + Ok(()) + } + #[allow(clippy::too_many_arguments)] + fn carve<W: FeatureWorld>( + &self, + world: &mut W, + radius: i32, + y: i32, + origin: [i32; 3], + under_water: bool, + angle: f64, + local: [i32; 3], + ellipse_a: i32, + ellipse_c: i32, + ) -> TreeResult<(), W::Error> { + let a = radius + 1 + ellipse_a / 3; + let c = (radius - 3).min(3) + ellipse_c / 2 - 1; + for xo in -a..a { + for zo in -a..a { + if signed_ellipse(xo, zo, local, a, c, angle) < 0.0 { + let p = tb::offset(origin, xo, y, zo); + let state = read(world, p)?; + if self.iceberg_state(state) || self.is(state, self.snow_block) { + if under_water { + write(world, p, self.water, 3)?; + } else { + write(world, p, self.air, 3)?; + let above = tb::offset(p, 0, 1, 0); + if self.is(read(world, above)?, self.snow) { + write(world, above, self.air, 3)?; + } + } + } + } + } + } + Ok(()) + } + #[allow(clippy::too_many_arguments)] + fn generate_block<W: FeatureWorld, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + height: i32, + xo: i32, + y: i32, + zo: i32, + radius: i32, + a: i32, + is_ellipse: bool, + ellipse_c: i32, + angle: f64, + snow_on_top: bool, + ) -> TreeResult<(), W::Error> { + let signed = if is_ellipse { + let mut c = ellipse_c; + if y > 0 && height - y <= 3 { + c -= 4 - (height - y); + } + signed_ellipse(xo, zo, [0; 3], a, c, angle) + } else { + let off = 10.0f32 * random.next_float().clamp(0.2, 0.8) / radius as f32; + f64::from(off) + pow2(xo) + pow2(zo) - pow2(radius) + }; + if signed >= 0.0 { + return Ok(()); + } + let p = tb::offset(origin, xo, y, zo); + let compare = if is_ellipse { + -0.5 + } else { + f64::from(-6 - random.next_int_bound(3)?) + }; + if signed > compare && random.next_double() > 0.9 { + return Ok(()); + } + let h_diff = height - y; + let state = read(world, p)?; + if self.blocks.is_air(state) + || self.is(state, self.snow_block) + || self.is(state, self.ice) + || self.is(state, self.water) + { + let randomness = !is_ellipse || random.next_double() > 0.05; + let divisor = if is_ellipse { 3 } else { 2 }; + let snow = snow_on_top + && !self.is(state, self.water) + && f64::from(h_diff) + <= f64::from(random.next_int_bound((height / divisor).max(1))?) + + f64::from(height) * 0.6 + && randomness; + write(world, p, if snow { self.snow_block } else { self.state }, 3)?; + } + Ok(()) + } + fn radius_round<R: RandomSource, E>( + &self, + random: &mut R, + y: i32, + height: i32, + width: i32, + ) -> TreeResult<i32, E> { + let k = 3.5f32 - random.next_float(); + let mut scale = (1.0f32 - pow2(y) as f32 / (height as f32 * k)) * width as f32; + if height > 15 + random.next_int_bound(5)? { + let temp = if y < 3 + random.next_int_bound(6)? { + y / 2 + } else { + y + }; + scale = (1.0f32 - temp as f32 / (height as f32 * k * 0.4f32)) * width as f32; + } + Ok(ceil(scale / 2.0)) + } + fn radius_steep<R: RandomSource, E>( + &self, + random: &mut R, + y: i32, + height: i32, + width: i32, + ) -> TreeResult<i32, E> { + let k = 1.0f32 + random.next_float() / 2.0; + let scale = (1.0f32 - y as f32 / (height as f32 * k)) * width as f32; + Ok(ceil(scale / 2.0)) + } + fn smooth<W: FeatureWorld>( + &self, + world: &mut W, + origin: [i32; 3], + width: i32, + height: i32, + is_ellipse: bool, + ellipse_a: i32, + ) -> TreeResult<(), W::Error> { + let a = if is_ellipse { ellipse_a } else { width / 2 }; + for x in -a..=a { + for z in -a..=a { + for y in 0..=height { + let p = tb::offset(origin, x, y, z); + let state = read(world, p)?; + if !(self.iceberg_state(state) || self.is(state, self.snow)) { + continue; + } + if self.blocks.is_air(read(world, tb::offset(p, 0, -1, 0))?) { + write(world, p, self.air, 3)?; + write(world, tb::offset(p, 0, 1, 0), self.air, 3)?; + } else if self.iceberg_state(state) { + let mut counter = 0; + for (dx, dz) in [(-1, 0), (1, 0), (0, -1), (0, 1)] { + if !self.iceberg_state(read(world, tb::offset(p, dx, 0, dz))?) { + counter += 1; + } + } + if counter >= 3 { + write(world, p, self.air, 3)?; + } + } + } + } + } + Ok(()) + } +} +fn signed_ellipse(xo: i32, zo: i32, origin: [i32; 3], a: i32, c: i32, angle: f64) -> f64 { + let dx = f64::from(xo - origin[0]); + let dz = f64::from(zo - origin[2]); + ((dx * angle.cos() - dz * angle.sin()) / f64::from(a)).powf(2.0) + + ((dx * angle.sin() + dz * angle.cos()) / f64::from(c)).powf(2.0) + - 1.0 +} diff --git a/crates/horizon-world/src/worldgen/material_condition.rs b/crates/horizon-world/src/worldgen/material_condition.rs new file mode 100644 index 000000000..30eb26ec8 --- /dev/null +++ b/crates/horizon-world/src/worldgen/material_condition.rs @@ -0,0 +1,611 @@ +//! Numeric material conditions and their column/block evaluation caches. +//! +//! This worker owns its condition caches so they cannot be reused accidentally +//! against a different column context. +mod codec; +mod density; +mod library; +mod noise; +mod rule; +use super::{ + DecodeError, + anchor::{VerticalAnchor, WorldGenerationContext}, + material_surface::MaterialSurface, +}; +use crate::registry::BlockStateId; +pub use codec::{MaterialBiomeTag, MaterialConditionReference, MaterialConditionRegistry}; +pub use density::MaterialDensitySources; +use horizon_core::noise::Noise; +use horizon_core::{ + position::BlockPos, + random::{PositionalRandom, RandomSource}, +}; +pub use library::MaterialRuleLibrary; +pub use noise::MaterialNoiseSources; +use rule::CompiledRule; +pub use rule::{MaterialRule, MaterialRuleError}; +use std::{ + collections::{BTreeMap, BTreeSet}, + sync::Arc, +}; + +/// Surface inputs come from the material system. Implementations should keep +/// world configuration fixed for the lifetime of a condition worker. +pub trait MaterialSurfaceQueries { + /// Bind a compiled density root, optionally sampling the expected chunk now. + fn bind_density( + &mut self, + _sampler: Arc<dyn horizon_core::density::DensitySampler>, + _eager: bool, + ) -> Result<usize, DecodeError> { + Err(DecodeError::Field("missing material density provider")) + } + fn density(&mut self, _index: usize, _position: BlockPos) -> Result<f32, MaterialRuleError> { + Err(MaterialRuleError::MissingDensityProvider) + } + fn preliminary_surface(&mut self, _position: BlockPos) -> Result<f32, MaterialRuleError> { + Err(MaterialRuleError::MissingDensityProvider) + } + fn possible_biomes(&self) -> Option<BTreeSet<String>> { + None + } + fn biome(&mut self, _position: BlockPos) -> Result<Option<Arc<str>>, MaterialRuleError> { + Err(MaterialRuleError::MissingBiomeProvider) + } + fn melts_frozen_ocean( + &mut self, + _biome: &str, + _position: BlockPos, + _sea_level: i32, + ) -> Result<bool, MaterialRuleError> { + Err(MaterialRuleError::MissingBiomeProvider) + } + fn cold_enough_to_snow( + &mut self, + _biome: &str, + _position: BlockPos, + _sea_level: i32, + ) -> Result<bool, MaterialRuleError> { + Err(MaterialRuleError::MissingBiomeProvider) + } + fn bind_noise(&mut self, _name: &str) -> Result<Arc<dyn Noise>, DecodeError> { + Err(DecodeError::Field("missing material noise provider")) + } + fn surface_depth(&mut self, x: i32, z: i32) -> i32; + fn surface_secondary(&mut self, x: i32, z: i32) -> f64; + fn band(&mut self, _position: BlockPos) -> Result<BlockStateId, MaterialRuleError> { + Err(MaterialRuleError::MissingBandProvider) + } +} +impl<T: MaterialSurfaceQueries + ?Sized> MaterialSurfaceQueries for &mut T { + fn bind_density( + &mut self, + sampler: Arc<dyn horizon_core::density::DensitySampler>, + eager: bool, + ) -> Result<usize, DecodeError> { + (**self).bind_density(sampler, eager) + } + fn density(&mut self, index: usize, position: BlockPos) -> Result<f32, MaterialRuleError> { + (**self).density(index, position) + } + fn preliminary_surface(&mut self, position: BlockPos) -> Result<f32, MaterialRuleError> { + (**self).preliminary_surface(position) + } + fn possible_biomes(&self) -> Option<BTreeSet<String>> { + (**self).possible_biomes() + } + fn biome(&mut self, position: BlockPos) -> Result<Option<Arc<str>>, MaterialRuleError> { + (**self).biome(position) + } + fn cold_enough_to_snow( + &mut self, + biome: &str, + position: BlockPos, + sea: i32, + ) -> Result<bool, MaterialRuleError> { + (**self).cold_enough_to_snow(biome, position, sea) + } + fn melts_frozen_ocean( + &mut self, + biome: &str, + position: BlockPos, + sea: i32, + ) -> Result<bool, MaterialRuleError> { + (**self).melts_frozen_ocean(biome, position, sea) + } + fn bind_noise(&mut self, name: &str) -> Result<Arc<dyn Noise>, DecodeError> { + (**self).bind_noise(name) + } + fn surface_depth(&mut self, x: i32, z: i32) -> i32 { + (**self).surface_depth(x, z) + } + fn surface_secondary(&mut self, x: i32, z: i32) -> f64 { + (**self).surface_secondary(x, z) + } + fn band(&mut self, position: BlockPos) -> Result<BlockStateId, MaterialRuleError> { + (**self).band(position) + } +} +impl<P: PositionalRandom> MaterialSurfaceQueries for MaterialSurface<P> { + fn band(&mut self, position: BlockPos) -> Result<BlockStateId, MaterialRuleError> { + MaterialSurface::band(self, [position.x, position.y, position.z]) + .ok_or(MaterialRuleError::InvalidBandIndex) + } + fn surface_depth(&mut self, x: i32, z: i32) -> i32 { + MaterialSurface::surface_depth(self, x, z) + } + fn surface_secondary(&mut self, x: i32, z: i32) -> f64 { + MaterialSurface::surface_secondary(self, x, z) + } +} + +#[derive(Clone, Debug)] +pub enum MaterialCondition { + Hole, + Steep, + Biome(Vec<String>), + BiomeTag(MaterialBiomeTag), + Temperature, + AbovePreliminarySurface, + NoiseThreshold { + noise: String, + min: f64, + max: f64, + is_3d: bool, + }, + YAbove { + anchor: VerticalAnchor, + surface_depth_multiplier: i32, + add_stone_depth: bool, + }, + Water { + offset: i32, + surface_depth_multiplier: i32, + add_stone_depth: bool, + }, + StoneDepth { + offset: i32, + add_surface_depth: bool, + secondary_depth_range: i32, + ceiling: bool, + }, + VerticalGradient { + random_name: String, + true_at_and_below: VerticalAnchor, + false_at_and_above: VerticalAnchor, + }, + Not(Box<MaterialCondition>), + Reference(MaterialConditionReference), +} + +struct Context<S> { + surface: S, + generation: WorldGenerationContext, + column_revision: i64, + block_revision: i64, + position: BlockPos, + gradient: [i32; 2], + depth: i32, + water_height: i32, + stone_above: i32, + stone_below: i32, + secondary_revision: i64, + secondary: f64, + minimum_revision: i64, + minimum: i32, + noises: Vec<CachedNoise>, + noise_indices: BTreeMap<(String, bool), usize>, + possible_biomes: Option<BTreeSet<String>>, + biome: Option<Arc<str>>, +} +struct CachedNoise { + sampler: Arc<dyn Noise>, + is_3d: bool, + revision: i64, + value: f64, +} +impl<S: MaterialSurfaceQueries> Context<S> { + fn minimum_surface_level(&mut self) -> Result<i32, MaterialRuleError> { + if self.minimum_revision != self.column_revision { + // Vanilla stamps before sampling, including when sampling fails. + self.minimum_revision = self.column_revision; + let value = self.surface.preliminary_surface(BlockPos::new( + self.position.x, + 0, + self.position.z, + ))?; + // 26.3 floors before the saturating Java numeric conversion. + let floor = value.floor() as i32; + self.minimum = floor.wrapping_add(self.depth).wrapping_sub(8); + } + Ok(self.minimum) + } + fn biome(&mut self) -> Result<Option<Arc<str>>, MaterialRuleError> { + if self.biome.is_none() { + self.biome = self.surface.biome(self.position)?; + } + Ok(self.biome.clone()) + } + fn bind_noise(&mut self, name: &str, is_3d: bool) -> Result<usize, DecodeError> { + let key = (name.to_owned(), is_3d); + if let Some(index) = self.noise_indices.get(&key) { + return Ok(*index); + } + let sampler = self.surface.bind_noise(name)?; + let index = self.noises.len(); + self.noises.push(CachedNoise { + sampler, + is_3d, + revision: if is_3d { + self.block_revision + } else { + self.column_revision + } + .wrapping_sub(1), + value: 0.0, + }); + self.noise_indices.insert(key, index); + Ok(index) + } + fn noise(&mut self, index: usize) -> f64 { + let noise = &mut self.noises[index]; + let revision = if noise.is_3d { + self.block_revision + } else { + self.column_revision + }; + if noise.revision != revision { + noise.value = f64::from(noise.sampler.get3( + f64::from(self.position.x), + if noise.is_3d { + f64::from(self.position.y) + } else { + 0.0 + }, + f64::from(self.position.z), + )); + noise.revision = revision; + } + noise.value + } + fn secondary(&mut self) -> f64 { + if self.secondary_revision != self.column_revision { + self.secondary_revision = self.column_revision; + self.secondary = self + .surface + .surface_secondary(self.position.x, self.position.z); + } + self.secondary + } +} +struct Compiled<R: RandomSource> { + kind: Kind<R>, + revision: i64, + result: Option<bool>, +} +enum Kind<R: RandomSource> { + Simple(MaterialCondition), + Biome(BTreeSet<String>), + Constant(bool), + Noise { + sampler: usize, + min: f64, + max: f64, + }, + Gradient { + low: i32, + high: i32, + random: R::Positional, + }, + Not(Box<Compiled<R>>), +} +impl<R: RandomSource> Compiled<R> { + fn compile<S: MaterialSurfaceQueries>( + condition: MaterialCondition, + root: &R::Positional, + context: &mut Context<S>, + depth: usize, + ) -> Result<Self, DecodeError> { + if depth >= 256 { + return Err(DecodeError::Field("material condition depth")); + } + let column = matches!( + condition, + MaterialCondition::Hole | MaterialCondition::Steep + ); + let kind = match condition { + MaterialCondition::BiomeTag(tag) => { + return Self::compile( + MaterialCondition::Biome(tag.members().to_vec()), + root, + context, + depth + 1, + ); + } + MaterialCondition::Biome(names) => { + if names.len() > 8192 { + return Err(DecodeError::Field("biome condition size")); + } + let names = names + .iter() + .map(|name| codec::identifier(name)) + .collect::<Result<BTreeSet<_>, _>>()?; + match &context.possible_biomes { + Some(possible) if names.is_disjoint(possible) => Kind::Constant(false), + Some(possible) if possible.is_subset(&names) => Kind::Constant(true), + _ => Kind::Biome(names), + } + } + MaterialCondition::NoiseThreshold { + noise, + min, + max, + is_3d, + } => Kind::Noise { + sampler: context.bind_noise(&codec::identifier(&noise)?, is_3d)?, + min, + max, + }, + MaterialCondition::Reference(reference) => { + return Self::compile(reference.value().clone(), root, context, depth + 1); + } + MaterialCondition::Not(child) => { + Kind::Not(Box::new(Self::compile(*child, root, context, depth + 1)?)) + } + MaterialCondition::VerticalGradient { + random_name, + true_at_and_below, + false_at_and_above, + } => { + let random_name = codec::identifier(&random_name)?; + Kind::Gradient { + low: true_at_and_below.resolve(context.generation), + high: false_at_and_above.resolve(context.generation), + random: root.from_hash_of(&random_name).fork_positional(), + } + } + other => Kind::Simple(other), + }; + Ok(Self { + kind, + revision: if column { + context.column_revision + } else { + context.block_revision + } + .wrapping_sub(1), + result: None, + }) + } + fn test<S: MaterialSurfaceQueries>( + &mut self, + context: &mut Context<S>, + ) -> Result<bool, MaterialRuleError> { + if let Kind::Constant(value) = self.kind { + return Ok(value); + } + if matches!( + self.kind, + Kind::Simple(MaterialCondition::AbovePreliminarySurface) + ) { + return Ok(context.position.y >= context.minimum_surface_level()?); + } + if matches!(self.kind, Kind::Simple(MaterialCondition::Temperature)) { + let biome = context.biome()?.ok_or(MaterialRuleError::MissingBiome)?; + return context.surface.cold_enough_to_snow( + &biome, + context.position, + context.generation.sea_level, + ); + } + if let Kind::Noise { sampler, min, max } = &self.kind { + let value = context.noise(*sampler); + return Ok(value >= *min && value <= *max); + } + if let Kind::Not(child) = &mut self.kind { + return child.test(context).map(|value| !value); + } + let column = matches!( + self.kind, + Kind::Simple(MaterialCondition::Hole | MaterialCondition::Steep) + ); + let revision = if column { + context.column_revision + } else { + context.block_revision + }; + if self.revision == revision { + return self + .result + .ok_or(MaterialRuleError::CachedConditionUnavailable); + } + self.revision = revision; + let result = match &self.kind { + Kind::Biome(names) => names.contains( + context + .biome()? + .ok_or(MaterialRuleError::MissingBiome)? + .as_ref(), + ), + Kind::Simple(MaterialCondition::Hole) => context.depth <= 0, + Kind::Simple(MaterialCondition::Steep) => { + context.gradient[0] <= -4 || context.gradient[1] >= 4 + } + Kind::Simple(MaterialCondition::YAbove { + anchor, + surface_depth_multiplier, + add_stone_depth, + }) => { + let y = context.position.y.wrapping_add(if *add_stone_depth { + context.stone_above + } else { + 0 + }); + y >= anchor + .resolve(context.generation) + .wrapping_add(context.depth.wrapping_mul(*surface_depth_multiplier)) + } + Kind::Simple(MaterialCondition::Water { + offset, + surface_depth_multiplier, + add_stone_depth, + }) => { + context.water_height == i32::MIN + || context.position.y.wrapping_add(if *add_stone_depth { + context.stone_above + } else { + 0 + }) >= context + .water_height + .wrapping_add(*offset) + .wrapping_add(context.depth.wrapping_mul(*surface_depth_multiplier)) + } + Kind::Simple(MaterialCondition::StoneDepth { + offset, + add_surface_depth, + secondary_depth_range, + ceiling, + }) => { + let stone = if *ceiling { + context.stone_below + } else { + context.stone_above + }; + let surface = if *add_surface_depth { context.depth } else { 0 }; + let secondary = if *secondary_depth_range == 0 { + 0 + } else { + (0.0 + ((context.secondary() - -1.0) / (1.0 - -1.0)) + * (f64::from(*secondary_depth_range) - 0.0)) as i32 + }; + stone + <= 1i32 + .wrapping_add(*offset) + .wrapping_add(surface) + .wrapping_add(secondary) + } + Kind::Gradient { low, high, random } => { + let y = context.position.y; + if y <= *low { + true + } else if y >= *high { + false + } else { + let probability = 1.0 + + ((f64::from(y) - f64::from(*low)) / (f64::from(*high) - f64::from(*low))) + * (0.0 - 1.0); + f64::from(random.at(context.position).next_float()) < probability + } + } + _ => unreachable!("all recursive and gradient definitions are compiled"), + }; + self.result = Some(result); + Ok(result) + } +} + +/// A thread-local material-condition worker. Surface state and evaluations are +/// owned together; updates invalidate exactly the corresponding vanilla caches. +pub struct MaterialConditions<R: RandomSource, S: MaterialSurfaceQueries> { + root: R::Positional, + context: Context<S>, + conditions: Vec<Compiled<R>>, + rules: Vec<CompiledRule<R>>, +} +impl<R: RandomSource, S: MaterialSurfaceQueries> MaterialConditions<R, S> { + pub fn new(generation: WorldGenerationContext, root: R::Positional, surface: S) -> Self { + let possible_biomes = surface.possible_biomes(); + Self::with_possible_biomes(generation, root, surface, possible_biomes) + } + pub(crate) fn with_possible_biomes( + generation: WorldGenerationContext, + root: R::Positional, + surface: S, + possible_biomes: Option<BTreeSet<String>>, + ) -> Self { + Self { + root, + context: Context { + surface, + generation, + column_revision: i64::MIN + 1, + block_revision: i64::MIN + 1, + position: BlockPos::new(0, 0, 0), + gradient: [0, 0], + depth: 0, + water_height: 0, + stone_above: 0, + stone_below: 0, + secondary_revision: i64::MIN, + secondary: 0.0, + minimum_revision: i64::MIN, + minimum: 0, + noises: Vec::new(), + noise_indices: BTreeMap::new(), + possible_biomes, + biome: None, + }, + conditions: Vec::new(), + rules: Vec::new(), + } + } + /// Compile a condition at the current context revision. Gradient bounds and + /// named random factories are bound now, before the first evaluation. + pub fn add(&mut self, condition: MaterialCondition) -> Result<usize, DecodeError> { + if self.conditions.len() >= 8192 { + return Err(DecodeError::Field("material condition count")); + } + let compiled = Compiled::compile(condition, &self.root, &mut self.context, 0)?; + let index = self.conditions.len(); + self.conditions.push(compiled); + Ok(index) + } + pub fn update_xz(&mut self, x: i32, z: i32, gradient_x: i32, gradient_z: i32) { + self.context.column_revision = self.context.column_revision.wrapping_add(1); + self.context.block_revision = self.context.block_revision.wrapping_add(1); + self.context.position.x = x; + self.context.position.z = z; + self.context.gradient = [gradient_x, gradient_z]; + self.context.depth = self.context.surface.surface_depth(x, z); + } + pub fn update_y(&mut self, stone_above: i32, stone_below: i32, water_height: i32, y: i32) { + self.context.block_revision = self.context.block_revision.wrapping_add(1); + self.context.biome = None; + self.context.position.y = y; + self.context.stone_above = stone_above; + self.context.stone_below = stone_below; + self.context.water_height = water_height; + } + pub fn test(&mut self, index: usize) -> Result<bool, MaterialRuleError> { + self.conditions + .get_mut(index) + .ok_or(MaterialRuleError::UnknownCondition)? + .test(&mut self.context) + } + /// Direct biome lookup for the outer column scan, independent of condition caching. + pub fn biome_at(&mut self, position: BlockPos) -> Result<Option<Arc<str>>, MaterialRuleError> { + self.context.surface.biome(position) + } + pub fn melts_frozen_ocean( + &mut self, + biome: &str, + position: BlockPos, + sea_level: i32, + ) -> Result<bool, MaterialRuleError> { + self.context + .surface + .melts_frozen_ocean(biome, position, sea_level) + } + pub fn minimum_surface_level(&mut self) -> Result<i32, MaterialRuleError> { + self.context.minimum_surface_level() + } + pub fn into_surface(self) -> S { + self.context.surface + } + pub fn surface_depth(&self) -> i32 { + self.context.depth + } + pub fn surface_secondary(&mut self) -> f64 { + self.context.secondary() + } +} diff --git a/crates/horizon-world/src/worldgen/material_condition/codec.rs b/crates/horizon-world/src/worldgen/material_condition/codec.rs new file mode 100644 index 000000000..ec646697e --- /dev/null +++ b/crates/horizon-world/src/worldgen/material_condition/codec.rs @@ -0,0 +1,474 @@ +//! Bounded numeric-condition registry loading and direct/holder JSON codecs. +use super::MaterialCondition; +use crate::worldgen::{ + DecodeError, Object, anchor::VerticalAnchor, double, int_range, integer, optional, required, +}; +use serde_json::{Value, value::RawValue}; +use std::{ + collections::{BTreeMap, BTreeSet}, + sync::Arc, +}; + +pub(super) fn identifier(name: &str) -> Result<String, DecodeError> { + let (namespace, path) = name.split_once(':').unwrap_or(("minecraft", name)); + let namespace = if namespace.is_empty() { + "minecraft" + } else { + namespace + }; + let valid = |c: u8| c.is_ascii_lowercase() || c.is_ascii_digit() || b"_.-".contains(&c); + if !namespace.bytes().all(valid) || !path.bytes().all(|c| valid(c) || c == b'/') { + return Err(DecodeError::Field("material identifier")); + } + Ok(format!("{namespace}:{path}")) +} +#[derive(Clone, Debug)] +pub struct MaterialConditionReference { + name: String, + value: Arc<MaterialCondition>, +} +impl MaterialConditionReference { + pub fn name(&self) -> &str { + &self.name + } + pub fn value(&self) -> &MaterialCondition { + &self.value + } +} +/// A named biome-tag snapshot for a fixed world-generation configuration. +#[derive(Clone, Debug)] +pub struct MaterialBiomeTag { + name: String, + members: Arc<[String]>, +} +impl MaterialBiomeTag { + pub fn name(&self) -> &str { + &self.name + } + pub fn members(&self) -> &[String] { + &self.members + } +} +#[derive(Debug)] +struct BiomeCatalog { + names: BTreeSet<String>, + tags: BTreeMap<String, Arc<[String]>>, +} +#[derive(Clone, Debug, Default)] +pub struct MaterialConditionRegistry { + values: BTreeMap<String, Arc<MaterialCondition>>, + biomes: Option<Arc<BiomeCatalog>>, +} +impl MaterialConditionRegistry { + /// Load an immutable set atomically, including forward references. Cycles, + /// unresolved references and resource-limit violations are typed errors. + pub fn from_json(definitions: &BTreeMap<String, String>) -> Result<Self, DecodeError> { + Self::load(definitions, None) + } + pub fn from_json_with_biomes( + definitions: &BTreeMap<String, String>, + biomes: &BTreeSet<String>, + ) -> Result<Self, DecodeError> { + Self::from_json_with_biome_tags(definitions, biomes, &BTreeMap::new()) + } + /// Bind resolved biome tags, such as `TagDefinitions::build().tags`. + /// Names and memberships remain immutable for the lifetime of this registry. + pub fn from_json_with_biome_tags( + definitions: &BTreeMap<String, String>, + biomes: &BTreeSet<String>, + tags: &BTreeMap<String, Vec<String>>, + ) -> Result<Self, DecodeError> { + if biomes.len() > 8192 || tags.len() > 8192 { + return Err(DecodeError::Field("material biome catalog size")); + } + let names: BTreeSet<_> = biomes + .iter() + .map(|name| identifier(name)) + .collect::<Result<_, _>>()?; + let mut values = BTreeMap::new(); + let mut count = 0usize; + for (name, members) in tags { + count = count.saturating_add(members.len()); + if count > 65536 { + return Err(DecodeError::Field("material biome tag size")); + } + let mut bound = Vec::with_capacity(members.len()); + for member in members { + let member = identifier(member)?; + if !names.contains(&member) { + return Err(DecodeError::Field("unknown tagged biome")); + } + bound.push(member); + } + if values.insert(identifier(name)?, Arc::from(bound)).is_some() { + return Err(DecodeError::Field("duplicate biome tag")); + } + } + Self::load( + definitions, + Some(Arc::new(BiomeCatalog { + names, + tags: values, + })), + ) + } + fn load( + definitions: &BTreeMap<String, String>, + biomes: Option<Arc<BiomeCatalog>>, + ) -> Result<Self, DecodeError> { + if definitions.len() > 8192 { + return Err(DecodeError::Field("material registry size")); + } + let mut loader = Loader { + biomes, + ..Loader::default() + }; + for (name, json) in definitions { + if loader + .definitions + .insert(identifier(name)?, serde_json::from_str(json)?) + .is_some() + { + return Err(DecodeError::Field("duplicate material condition")); + } + } + let names: Vec<_> = loader.definitions.keys().cloned().collect(); + for name in names { + loader.resolve(&name, 0)?; + } + Ok(Self { + values: loader.values, + biomes: loader.biomes, + }) + } + pub fn decode(&self, json: &str) -> Result<MaterialCondition, DecodeError> { + let raw: Box<RawValue> = serde_json::from_str(json)?; + Loader { + values: self.values.clone(), + biomes: self.biomes.clone(), + ..Loader::default() + } + .node(&raw, 0) + } + pub fn get(&self, name: &str) -> Option<MaterialConditionReference> { + let name = identifier(name).ok()?; + self.values + .get(&name) + .map(|value| MaterialConditionReference { + name, + value: value.clone(), + }) + } + pub fn entries(&self) -> impl Iterator<Item = (&str, &MaterialCondition)> { + self.values + .iter() + .map(|(name, value)| (name.as_str(), value.as_ref())) + } +} +#[derive(Default)] +struct Loader { + definitions: BTreeMap<String, Box<RawValue>>, + values: BTreeMap<String, Arc<MaterialCondition>>, + active: BTreeSet<String>, + biomes: Option<Arc<BiomeCatalog>>, + nodes: usize, +} +impl Loader { + fn resolve(&mut self, name: &str, depth: usize) -> Result<Arc<MaterialCondition>, DecodeError> { + if depth >= 256 { + return Err(DecodeError::Field("material condition depth")); + } + if let Some(value) = self.values.get(name) { + return Ok(value.clone()); + } + if !self.active.insert(name.to_owned()) { + return Err(DecodeError::Field("cyclic material condition")); + } + let json = self + .definitions + .get(name) + .ok_or(DecodeError::Field("missing material condition"))? + .clone(); + if !json.get().starts_with('{') { + return Err(DecodeError::Field("material definition must be direct")); + } + let value = Arc::new(self.node(&json, depth + 1)?); + self.active.remove(name); + self.values.insert(name.to_owned(), value.clone()); + Ok(value) + } + fn node(&mut self, raw: &RawValue, depth: usize) -> Result<MaterialCondition, DecodeError> { + self.nodes += 1; + if depth >= 256 || self.nodes > 65536 { + return Err(DecodeError::Field("material condition size")); + } + if raw.get().starts_with('"') { + let name = identifier(&serde_json::from_str::<String>(raw.get())?)?; + let value = self.resolve(&name, depth + 1)?; + return Ok(MaterialCondition::Reference(MaterialConditionReference { + name, + value, + })); + } + let object: Object = serde_json::from_str(raw.get())?; + let kind = identifier(&serde_json::from_str::<String>( + required(&object, "type")?.get(), + )?)?; + let number = |name| integer(required(&object, name)?); + let boolean = |name| { + serde_json::from_str::<bool>(required(&object, name)?.get()).map_err(DecodeError::from) + }; + let anchor = |name| VerticalAnchor::from_json(required(&object, name)?.get()); + let multiplier = || { + int_range( + required(&object, "surface_depth_multiplier")?, + "surface_depth_multiplier", + -20, + 20, + ) + }; + Ok(match kind.as_str() { + "minecraft:noise_threshold" => MaterialCondition::NoiseThreshold { + noise: identifier(&serde_json::from_str::<String>( + required(&object, "noise")?.get(), + )?)?, + min: double(required(&object, "min_threshold")?)?, + max: double(required(&object, "max_threshold")?)?, + is_3d: optional(&object, "is_3d") + .map(|raw| serde_json::from_str(raw.get())) + .transpose()? + .unwrap_or(false), + }, + "minecraft:temperature" => MaterialCondition::Temperature, + "minecraft:above_preliminary_surface" => MaterialCondition::AbovePreliminarySurface, + "minecraft:biome" => { + let catalog = self + .biomes + .as_ref() + .ok_or(DecodeError::Field("missing biome catalog"))?; + let raw = required(&object, "biome_is")?; + let names: Vec<String> = if raw.get().starts_with('"') { + let name: String = serde_json::from_str(raw.get())?; + if let Some(tag) = name.strip_prefix('#') { + let name = identifier(tag)?; + let members = catalog + .tags + .get(&name) + .ok_or(DecodeError::Field("unknown biome tag"))? + .clone(); + return Ok(MaterialCondition::BiomeTag(MaterialBiomeTag { + name, + members, + })); + } + vec![name] + } else { + serde_json::from_str(raw.get())? + }; + if names.len() > 8192 { + return Err(DecodeError::Field("biome condition size")); + } + let mut resolved = Vec::with_capacity(names.len()); + for name in names { + let name = identifier(&name)?; + if !catalog.names.contains(&name) { + return Err(DecodeError::Field("unknown material biome")); + } + resolved.push(name); + } + MaterialCondition::Biome(resolved) + } + "minecraft:hole" => MaterialCondition::Hole, + "minecraft:steep" => MaterialCondition::Steep, + "minecraft:y_above" => MaterialCondition::YAbove { + anchor: anchor("anchor")?, + surface_depth_multiplier: multiplier()?, + add_stone_depth: boolean("add_stone_depth")?, + }, + "minecraft:water" => MaterialCondition::Water { + offset: number("offset")?, + surface_depth_multiplier: multiplier()?, + add_stone_depth: boolean("add_stone_depth")?, + }, + "minecraft:stone_depth" => { + let surface: String = + serde_json::from_str(required(&object, "surface_type")?.get())?; + let ceiling = match surface.as_str() { + "ceiling" => true, + "floor" => false, + _ => return Err(DecodeError::Field("surface_type")), + }; + MaterialCondition::StoneDepth { + offset: number("offset")?, + add_surface_depth: boolean("add_surface_depth")?, + secondary_depth_range: number("secondary_depth_range")?, + ceiling, + } + } + "minecraft:vertical_gradient" => MaterialCondition::VerticalGradient { + random_name: identifier(&serde_json::from_str::<String>( + required(&object, "random_name")?.get(), + )?)?, + true_at_and_below: anchor("true_at_and_below")?, + false_at_and_above: anchor("false_at_and_above")?, + }, + "minecraft:not" => MaterialCondition::Not(Box::new( + self.node(required(&object, "invert")?, depth + 1)?, + )), + _ => return Err(DecodeError::Field("unsupported material condition type")), + }) + } +} +impl MaterialCondition { + pub fn from_json(json: &str) -> Result<Self, DecodeError> { + MaterialConditionRegistry::default().decode(json) + } + /// Encode the vanilla codec value. Nonfinite double thresholds use the + /// same NaN/Infinity tokens as Gson; strict JSON decoding rejects those tokens. + pub fn to_json(&self) -> Result<String, DecodeError> { + self.encoded(0) + } + fn encoded(&self, depth: usize) -> Result<String, DecodeError> { + if depth >= 256 { + return Err(DecodeError::Field("material condition depth")); + } + match self { + Self::Not(child) => Ok(format!( + "{{\"type\":\"minecraft:not\",\"invert\":{}}}", + child.encoded(depth + 1)? + )), + Self::NoiseThreshold { + noise, + min, + max, + is_3d, + } => { + let number = |v: f64| { + if v.is_nan() { + "NaN".to_owned() + } else if v == f64::INFINITY { + "Infinity".to_owned() + } else if v == f64::NEG_INFINITY { + "-Infinity".to_owned() + } else { + serde_json::to_string(&v).unwrap() + } + }; + Ok(format!( + "{{\"type\":\"minecraft:noise_threshold\",\"noise\":{},\"min_threshold\":{},\"max_threshold\":{}{}}}", + serde_json::to_string(&identifier(noise)?)?, + number(*min), + number(*max), + if *is_3d { ",\"is_3d\":true" } else { "" } + )) + } + _ => Ok(serde_json::to_string(&self.json_value(depth)?)?), + } + } + fn json_value(&self, depth: usize) -> Result<Value, DecodeError> { + if depth >= 256 { + return Err(DecodeError::Field("material condition depth")); + } + let multiplier = |value: i32| { + if (-20..=20).contains(&value) { + Ok(value) + } else { + Err(DecodeError::Field("surface_depth_multiplier")) + } + }; + let anchor = |value: VerticalAnchor| -> Result<Value, DecodeError> { + Ok(serde_json::from_str(&value.to_json()?)?) + }; + Ok(match self { + Self::Temperature => serde_json::json!({"type":"minecraft:temperature"}), + Self::AbovePreliminarySurface => { + serde_json::json!({"type":"minecraft:above_preliminary_surface"}) + } + Self::BiomeTag(tag) => { + serde_json::json!({"type":"minecraft:biome","biome_is":format!("#{}",tag.name)}) + } + Self::Biome(names) => { + let names = names + .iter() + .map(|name| identifier(name)) + .collect::<Result<Vec<_>, _>>()?; + let value = if names.len() == 1 { + Value::String(names[0].clone()) + } else { + serde_json::to_value(names)? + }; + serde_json::json!({"type":"minecraft:biome","biome_is":value}) + } + Self::Hole => serde_json::json!({"type":"minecraft:hole"}), + Self::Steep => serde_json::json!({"type":"minecraft:steep"}), + Self::YAbove { + anchor: a, + surface_depth_multiplier, + add_stone_depth, + } => { + serde_json::json!({"type":"minecraft:y_above","anchor":anchor(*a)?,"surface_depth_multiplier":multiplier(*surface_depth_multiplier)?,"add_stone_depth":add_stone_depth}) + } + Self::Water { + offset, + surface_depth_multiplier, + add_stone_depth, + } => { + serde_json::json!({"type":"minecraft:water","offset":offset,"surface_depth_multiplier":multiplier(*surface_depth_multiplier)?,"add_stone_depth":add_stone_depth}) + } + Self::StoneDepth { + offset, + add_surface_depth, + secondary_depth_range, + ceiling, + } => { + serde_json::json!({"type":"minecraft:stone_depth","offset":offset,"add_surface_depth":add_surface_depth,"secondary_depth_range":secondary_depth_range,"surface_type":if *ceiling{"ceiling"}else{"floor"}}) + } + Self::VerticalGradient { + random_name, + true_at_and_below, + false_at_and_above, + } => { + serde_json::json!({"type":"minecraft:vertical_gradient","random_name":identifier(random_name)?,"true_at_and_below":anchor(*true_at_and_below)?,"false_at_and_above":anchor(*false_at_and_above)?}) + } + Self::Not(_) | Self::NoiseThreshold { .. } => { + return Err(DecodeError::Field("condition requires direct encoding")); + } + Self::Reference(reference) => Value::String(reference.name.clone()), + }) + } +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn forward_references_are_stable_and_invalid_graphs_fail_atomically() { + let definitions = BTreeMap::from([ + ("a".to_owned(), r#"{"type":"not","invert":"z"}"#.to_owned()), + ("z".to_owned(), r#"{"type":"hole"}"#.to_owned()), + ]); + let registry = MaterialConditionRegistry::from_json(&definitions).unwrap(); + let reference = registry.decode(r#""a""#).unwrap(); + assert_eq!(reference.to_json().unwrap(), r#""minecraft:a""#); + assert!( + registry + .decode(r#"{"type":"not","invert":"missing"}"#) + .is_err() + ); + assert_eq!(registry.entries().count(), 2); + assert_eq!( + registry.get("z").unwrap().value().to_json().unwrap(), + r#"{"type":"minecraft:hole"}"# + ); + let mut cyclic = definitions.clone(); + cyclic.insert("z".to_owned(), r#"{"type":"not","invert":"a"}"#.to_owned()); + assert!(MaterialConditionRegistry::from_json(&cyclic).is_err()); + let mut alias = definitions.clone(); + alias.insert("z".to_owned(), r#""a""#.to_owned()); + assert!(MaterialConditionRegistry::from_json(&alias).is_err()); + let mut duplicate = definitions; + duplicate.insert("minecraft:z".to_owned(), r#"{"type":"steep"}"#.to_owned()); + assert!(MaterialConditionRegistry::from_json(&duplicate).is_err()); + assert_eq!(reference.to_json().unwrap(), r#""minecraft:a""#); + } +} diff --git a/crates/horizon-world/src/worldgen/material_condition/density.rs b/crates/horizon-world/src/worldgen/material_condition/density.rs new file mode 100644 index 000000000..5c98c75e0 --- /dev/null +++ b/crates/horizon-world/src/worldgen/material_condition/density.rs @@ -0,0 +1,147 @@ +//! Preliminary surface density sampling scoped to one material context. +use super::{MaterialRuleError, MaterialSurfaceQueries}; +use crate::{registry::BlockStateId, worldgen::DecodeError}; +use horizon_core::{ + density::{DensitySampler, SamplerContext}, + noise::{DensityVolume, Noise}, + position::BlockPos, +}; +use std::{collections::BTreeSet, sync::Arc}; + +/// A lazy unit-spaced XZ plane and scalar fallback for preliminary heights. +/// Construct a fresh provider for each material context, with that world's +/// compiled preliminary-surface density root and bound sampler context. +pub struct MaterialDensitySources<S: MaterialSurfaceQueries> { + surface: S, + expected: DensityVolume, + densities: Vec<BoundDensity>, + retained_samples: usize, + plane: DensityVolume, + sampler: Arc<dyn DensitySampler>, + context: SamplerContext, + buffer: Option<Vec<f32>>, +} +struct BoundDensity { + sampler: Arc<dyn DensitySampler>, + buffer: Option<Vec<f32>>, +} +impl<S: MaterialSurfaceQueries> MaterialDensitySources<S> { + pub fn sampler_context_mut(&mut self) -> &mut SamplerContext { + &mut self.context + } + pub fn into_parts(self) -> (S, SamplerContext) { + (self.surface, self.context) + } + pub fn new( + surface: S, + expected: DensityVolume, + sampler: Arc<dyn DensitySampler>, + context: SamplerContext, + ) -> Result<Self, DecodeError> { + let [sx, _, sz] = expected.sizes(); + // Bound retained allocation. Normal chunk planes contain 256 samples. + if sx * sz > 1 << 20 { + return Err(DecodeError::Field("material preliminary plane size")); + } + let [x, _, z] = expected.minimum(); + let plane = DensityVolume::new([sx as i32, 1, sz as i32], [x, 0, z], [1; 3]) + .map_err(|_| DecodeError::Field("material preliminary plane"))?; + Ok(Self { + surface, + expected, + densities: Vec::new(), + retained_samples: 0, + plane, + sampler, + context, + buffer: None, + }) + } +} +impl<S: MaterialSurfaceQueries> MaterialSurfaceQueries for MaterialDensitySources<S> { + fn bind_density( + &mut self, + sampler: Arc<dyn DensitySampler>, + eager: bool, + ) -> Result<usize, DecodeError> { + if self.densities.len() >= 32768 + || (eager + && (self.expected.size() > 1 << 20 + || self.retained_samples + self.expected.size() > 1 << 24)) + { + return Err(DecodeError::Field("material density storage bound")); + } + let buffer = if eager { + let mut buffer = vec![0.0; self.expected.size()]; + sampler.sample_volume(&mut self.context, &mut buffer, self.expected)?; + self.retained_samples += buffer.len(); + Some(buffer) + } else { + None + }; + let index = self.densities.len(); + self.densities.push(BoundDensity { sampler, buffer }); + Ok(index) + } + fn density(&mut self, index: usize, position: BlockPos) -> Result<f32, MaterialRuleError> { + let source = self + .densities + .get(index) + .ok_or(MaterialRuleError::MissingDensityProvider)?; + let position = [position.x, position.y, position.z]; + if let Some(buffer) = &source.buffer { + if let Some(index) = self.expected.index_of_block(position) { + return Ok(buffer[index]); + } + } + Ok(source.sampler.sample_value(&mut self.context, position)?) + } + fn preliminary_surface(&mut self, position: BlockPos) -> Result<f32, MaterialRuleError> { + let position = [position.x, 0, position.z]; + if let Some(index) = self.plane.index_of_block(position) { + if self.buffer.is_none() { + // Retain the allocation and partial writes if sampling fails. + let buffer = self.buffer.insert(vec![0.0; self.plane.size()]); + self.sampler + .sample_volume(&mut self.context, buffer, self.plane)?; + } + Ok(self.buffer.as_ref().unwrap()[index]) + } else { + Ok(self.sampler.sample_value(&mut self.context, position)?) + } + } + fn possible_biomes(&self) -> Option<BTreeSet<String>> { + self.surface.possible_biomes() + } + fn biome(&mut self, position: BlockPos) -> Result<Option<Arc<str>>, MaterialRuleError> { + self.surface.biome(position) + } + fn melts_frozen_ocean( + &mut self, + biome: &str, + position: BlockPos, + sea_level: i32, + ) -> Result<bool, MaterialRuleError> { + self.surface.melts_frozen_ocean(biome, position, sea_level) + } + fn cold_enough_to_snow( + &mut self, + biome: &str, + position: BlockPos, + sea_level: i32, + ) -> Result<bool, MaterialRuleError> { + self.surface.cold_enough_to_snow(biome, position, sea_level) + } + fn bind_noise(&mut self, name: &str) -> Result<Arc<dyn Noise>, DecodeError> { + self.surface.bind_noise(name) + } + fn surface_depth(&mut self, x: i32, z: i32) -> i32 { + self.surface.surface_depth(x, z) + } + fn surface_secondary(&mut self, x: i32, z: i32) -> f64 { + self.surface.surface_secondary(x, z) + } + fn band(&mut self, position: BlockPos) -> Result<BlockStateId, MaterialRuleError> { + self.surface.band(position) + } +} diff --git a/crates/horizon-world/src/worldgen/material_condition/library.rs b/crates/horizon-world/src/worldgen/material_condition/library.rs new file mode 100644 index 000000000..9debd7307 --- /dev/null +++ b/crates/horizon-world/src/worldgen/material_condition/library.rs @@ -0,0 +1,359 @@ +//! Immutable material-rule definitions with a world-seeded density compiler. +use super::{MaterialCondition, MaterialConditionRegistry, MaterialRule, codec::identifier}; +use crate::{ + registry::{BlockStateId, BlockStateJsonCodec}, + worldgen::{ + DecodeError, Object, + aquifer::{AquiferConfig, AquiferSamplers}, + density::DensityRegistry, + number_text, required, + router::{NoiseRouter, RouterSamplers}, + }, +}; +use horizon_core::density::{ + DensitySampler, + graph::{DensityCompiler, FunctionId}, +}; +use serde_json::value::RawValue; +use std::{ + collections::{BTreeMap, BTreeSet}, + sync::Arc, +}; + +#[derive(Debug)] +enum Definition { + Block(BlockStateId), + Bandlands, + Sequence(Vec<Arc<Self>>), + Condition(MaterialCondition, Arc<Self>), + Reference(Arc<Self>), + Ore { + blocks: [BlockStateId; 3], + chance: f32, + roots: [usize; 3], + }, +} + +/// Definitions are decoded atomically. Density samplers are compiled lazily for +/// this world's seed; create workers with the same seed/random mode and a fresh +/// cached SamplerContext per worker. The library does not own mutable chunk data. +#[derive(Debug)] +pub struct MaterialRuleLibrary { + definitions: BTreeMap<String, Arc<Definition>>, + roots: Vec<FunctionId>, + compiler: DensityCompiler, + compiled: BTreeMap<usize, Arc<MaterialRule>>, +} +impl MaterialRuleLibrary { + pub fn from_json( + definitions: &BTreeMap<String, String>, + conditions: &MaterialConditionRegistry, + blocks: &BlockStateJsonCodec<'_>, + mut densities: DensityRegistry, + seed: i64, + legacy: bool, + ) -> Result<Self, DecodeError> { + if definitions.len() > 8192 { + return Err(DecodeError::Field("material rule registry size")); + } + let mut raw = BTreeMap::new(); + for (name, json) in definitions { + let value: Box<RawValue> = serde_json::from_str(json)?; + if raw.insert(identifier(name)?, value).is_some() { + return Err(DecodeError::Field("duplicate material rule")); + } + } + let mut loader = Loader { + raw, + values: BTreeMap::new(), + active: BTreeSet::new(), + conditions, + blocks, + roots: Vec::new(), + nodes: 0, + }; + for name in loader.raw.keys().cloned().collect::<Vec<_>>() { + loader.resolve(&name, 0)?; + } + let roots = densities + .decode_functions(&loader.roots.iter().map(String::as_str).collect::<Vec<_>>())?; + Ok(Self { + definitions: loader.values, + roots, + compiler: DensityCompiler::new_seeded(densities.into_graph(), seed, legacy), + compiled: BTreeMap::new(), + }) + } + pub fn names(&self) -> impl Iterator<Item = &str> { + self.definitions.keys().map(String::as_str) + } + /// Resolve a named rule without sampling chunk densities yet. Binding the + /// returned rule to MaterialConditions performs eager per-chunk sampling. + pub fn rule(&mut self, name: &str) -> Result<MaterialRule, DecodeError> { + let definition = self + .definitions + .get(&identifier(name)?) + .ok_or(DecodeError::Field("unknown material rule"))? + .clone(); + Ok(MaterialRule::Reference(self.compile(&definition)?)) + } + /// Share this compiler's cache namespace with preliminary surface sampling. + pub fn named_density(&mut self, name: &str) -> Result<Arc<dyn DensitySampler>, DecodeError> { + let id = self + .compiler + .graph() + .function(&identifier(name)?) + .ok_or(DecodeError::Field("unknown material density"))?; + Ok(self.compiler.get_sampler(id)?) + } + /// Compile a router decoded into the density registry passed to `from_json`. + /// Its roots share cache IDs with all material and aquifer samplers. + pub fn compile_router(&mut self, router: NoiseRouter) -> Result<RouterSamplers, DecodeError> { + Ok(router.compile(&mut self.compiler)?) + } + /// Compile an aquifer decoded into the same density registry as this library. + /// Reuse the returned roots and the router in one worker's sampler context. + pub fn compile_aquifer( + &mut self, + config: AquiferConfig, + ) -> Result<AquiferSamplers, DecodeError> { + Ok(config.compile(&mut self.compiler)?) + } + fn compile(&mut self, definition: &Arc<Definition>) -> Result<Arc<MaterialRule>, DecodeError> { + let key = Arc::as_ptr(definition) as usize; + if let Some(value) = self.compiled.get(&key) { + return Ok(value.clone()); + } + let value = Arc::new(match definition.as_ref() { + Definition::Block(id) => MaterialRule::Block(*id), + Definition::Bandlands => MaterialRule::Bandlands, + Definition::Reference(value) => MaterialRule::Reference(self.compile(value)?), + Definition::Sequence(children) => MaterialRule::Sequence( + children + .iter() + .map(|child| self.compile(child).map(MaterialRule::Reference)) + .collect::<Result<_, _>>()?, + ), + Definition::Condition(condition, child) => MaterialRule::Condition { + if_true: condition.clone(), + then_run: Box::new(MaterialRule::Reference(self.compile(child)?)), + }, + Definition::Ore { + blocks, + chance, + roots, + } => MaterialRule::OreVein { + ore: blocks[0], + raw_ore: blocks[1], + filler: blocks[2], + raw_ore_chance: *chance, + density: self.compiler.get_sampler(self.roots[roots[0]])?, + richness: self.compiler.get_sampler(self.roots[roots[1]])?, + filler_gap: self.compiler.get_sampler(self.roots[roots[2]])?, + }, + }); + self.compiled.insert(key, value.clone()); + Ok(value) + } +} +struct Loader<'a, 'b> { + raw: BTreeMap<String, Box<RawValue>>, + values: BTreeMap<String, Arc<Definition>>, + active: BTreeSet<String>, + conditions: &'a MaterialConditionRegistry, + blocks: &'a BlockStateJsonCodec<'b>, + roots: Vec<String>, + nodes: usize, +} +impl Loader<'_, '_> { + fn resolve(&mut self, name: &str, depth: usize) -> Result<Arc<Definition>, DecodeError> { + if depth >= 256 { + return Err(DecodeError::Field("material rule depth")); + } + if let Some(value) = self.values.get(name) { + return Ok(value.clone()); + } + if !self.active.insert(name.to_owned()) { + return Err(DecodeError::Field("cyclic material rule")); + } + let raw = self + .raw + .get(name) + .ok_or(DecodeError::Field("missing material rule"))? + .clone(); + if !raw.get().starts_with('{') { + return Err(DecodeError::Field( + "material rule definition must be direct", + )); + } + let value = self.node(&raw, depth + 1)?; + self.active.remove(name); + self.values.insert(name.to_owned(), value.clone()); + Ok(value) + } + fn node(&mut self, raw: &RawValue, depth: usize) -> Result<Arc<Definition>, DecodeError> { + self.nodes += 1; + if depth >= 256 || self.nodes > 65536 { + return Err(DecodeError::Field("material rule size")); + } + if raw.get().starts_with('"') { + let name = identifier(&serde_json::from_str::<String>(raw.get())?)?; + return Ok(Arc::new(Definition::Reference( + self.resolve(&name, depth + 1)?, + ))); + } + let object: Object = serde_json::from_str(raw.get())?; + let kind = identifier(&serde_json::from_str::<String>( + required(&object, "type")?.get(), + )?)?; + let block = |name| { + self.blocks + .decode(required(&object, name)?.get(), false) + .map_err(|e| DecodeError::Registry(e.to_string())) + }; + let value = match kind.as_str() { + "minecraft:block" => Definition::Block(block("result_state")?), + "minecraft:bandlands" => Definition::Bandlands, + "minecraft:sequence" => { + let children: Vec<Box<RawValue>> = + serde_json::from_str(required(&object, "sequence")?.get())?; + Definition::Sequence( + children + .iter() + .map(|child| self.node(child, depth + 1)) + .collect::<Result<_, _>>()?, + ) + } + "minecraft:condition" => Definition::Condition( + self.conditions + .decode(required(&object, "if_true")?.get())?, + self.node(required(&object, "then_run")?, depth + 1)?, + ), + "minecraft:ore_vein" => { + let blocks = [ + block("ore_block")?, + block("raw_ore_block")?, + block("filler_block")?, + ]; + let chance = number_text(required(&object, "raw_ore_chance")?)? + .parse::<f32>() + .map_err(|_| DecodeError::Field("raw ore chance"))?; + if !(0.0..=1.0).contains(&chance) { + return Err(DecodeError::Field("raw ore chance")); + } + let base = self.roots.len(); + for name in ["density", "richness", "filler_gap"] { + self.roots.push(required(&object, name)?.get().to_owned()); + } + Definition::Ore { + blocks, + chance, + roots: [base, base + 1, base + 2], + } + } + _ => return Err(DecodeError::Field("material rule type")), + }; + Ok(Arc::new(value)) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::{ + DATA_VERSION, + nbt::Tag, + registry::BlockRegistry, + worldgen::{ + anchor::WorldGenerationContext, + material_condition::{MaterialConditions, MaterialSurfaceQueries}, + }, + }; + use horizon_core::{ + position::BlockPos, + random::{LegacyRandom, RandomSource}, + }; + struct Surface; + impl MaterialSurfaceQueries for Surface { + fn surface_depth(&mut self, _: i32, _: i32) -> i32 { + 0 + } + fn surface_secondary(&mut self, _: i32, _: i32) -> f64 { + 0.0 + } + } + #[test] + fn forward_rule_holders_and_invalid_graphs_are_atomic() { + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ( + "states", + Tag::List(vec![Tag::compound([( + "id", + Tag::String("minecraft:stone".into()), + )])]), + ), + ( + "defaults", + Tag::compound([("minecraft:stone", Tag::Int(0))]), + ), + ])) + .unwrap(); + let blocks = BlockStateJsonCodec::new(®istry, BTreeSet::new()).unwrap(); + let conditions = MaterialConditionRegistry::default(); + let definitions = BTreeMap::from([ + ( + "horizon:a".to_owned(), + r#"{"type":"condition","if_true":{"type":"hole"},"then_run":"horizon:z"}"# + .to_owned(), + ), + ( + "horizon:z".to_owned(), + r#"{"type":"block","result_state":"stone"}"#.to_owned(), + ), + ]); + let load = |definitions: &BTreeMap<String, String>| { + MaterialRuleLibrary::from_json( + definitions, + &conditions, + &blocks, + DensityRegistry::from_json(&BTreeMap::new(), &BTreeMap::new()).unwrap(), + 0, + false, + ) + }; + let mut valid = load(&definitions).unwrap(); + for bad in [ + r#"{"type":"condition","if_true":{"type":"hole"},"then_run":"horizon:a"}"#, + r#"{"type":"condition","if_true":{"type":"hole"},"then_run":"horizon:missing"}"#, + r#""horizon:z""#, + r#"{"type":"ore_vein","ore_block":"stone","raw_ore_block":"stone","filler_block":"stone","raw_ore_chance":0.1,"density":"horizon:missing","richness":0,"filler_gap":0}"#, + ] { + let mut invalid = definitions.clone(); + invalid.insert("horizon:z".to_owned(), bad.to_owned()); + assert!(load(&invalid).is_err()); + } + let mut duplicate = definitions; + duplicate.insert("z".to_owned(), r#"{"type":"bandlands"}"#.to_owned()); + duplicate.insert( + "minecraft:z".to_owned(), + r#"{"type":"bandlands"}"#.to_owned(), + ); + assert!(load(&duplicate).is_err()); + assert_eq!( + valid.names().collect::<Vec<_>>(), + vec!["horizon:a", "horizon:z"] + ); + let mut random = LegacyRandom::new(0); + let mut worker = MaterialConditions::<LegacyRandom, _>::new( + WorldGenerationContext::new(-64, 384, 63), + random.fork_positional(), + Surface, + ); + let index = worker.add_rule(valid.rule("horizon:a").unwrap()).unwrap(); + assert_eq!( + worker.try_apply(index, BlockPos::new(0, 64, 0)).unwrap(), + Some(BlockStateId(0)) + ); + } +} diff --git a/crates/horizon-world/src/worldgen/material_condition/noise.rs b/crates/horizon-world/src/worldgen/material_condition/noise.rs new file mode 100644 index 000000000..9ec6a4074 --- /dev/null +++ b/crates/horizon-world/src/worldgen/material_condition/noise.rs @@ -0,0 +1,112 @@ +//! Named material-noise sources derived from the world's positional factory. +use super::{MaterialRuleError, MaterialSurfaceQueries, codec::identifier}; +use crate::{ + registry::BlockStateId, + worldgen::{DecodeError, decode_noise}, +}; +use horizon_core::{ + noise::{Noise, NormalNoise}, + position::BlockPos, + random::PositionalRandom, +}; +use std::{ + collections::{BTreeMap, BTreeSet}, + sync::Arc, +}; + +/// Add lazy, shared named noise sources to a material surface provider. +/// Both providers must be configured for the same world seed and random mode. +pub struct MaterialNoiseSources<P: PositionalRandom, S: MaterialSurfaceQueries> { + root: P, + surface: S, + definitions: BTreeMap<String, NormalNoise>, + samplers: BTreeMap<String, Arc<dyn Noise>>, +} +impl<P: PositionalRandom, S: MaterialSurfaceQueries> MaterialNoiseSources<P, S> { + pub fn from_json( + root: P, + surface: S, + definitions: &BTreeMap<String, String>, + ) -> Result<Self, DecodeError> { + if definitions.len() > 8192 { + return Err(DecodeError::Field("material noise registry size")); + } + let mut noises = BTreeMap::new(); + for (name, json) in definitions { + if noises + .insert(identifier(name)?, decode_noise(json)?) + .is_some() + { + return Err(DecodeError::Field("duplicate material noise")); + } + } + Ok(Self { + root, + surface, + definitions: noises, + samplers: BTreeMap::new(), + }) + } +} +impl<P: PositionalRandom, S: MaterialSurfaceQueries> MaterialSurfaceQueries + for MaterialNoiseSources<P, S> +{ + fn bind_density( + &mut self, + sampler: Arc<dyn horizon_core::density::DensitySampler>, + eager: bool, + ) -> Result<usize, DecodeError> { + self.surface.bind_density(sampler, eager) + } + fn density(&mut self, index: usize, position: BlockPos) -> Result<f32, MaterialRuleError> { + self.surface.density(index, position) + } + fn preliminary_surface(&mut self, position: BlockPos) -> Result<f32, MaterialRuleError> { + self.surface.preliminary_surface(position) + } + fn possible_biomes(&self) -> Option<BTreeSet<String>> { + self.surface.possible_biomes() + } + fn biome(&mut self, position: BlockPos) -> Result<Option<Arc<str>>, MaterialRuleError> { + self.surface.biome(position) + } + fn melts_frozen_ocean( + &mut self, + biome: &str, + position: BlockPos, + sea_level: i32, + ) -> Result<bool, MaterialRuleError> { + self.surface.melts_frozen_ocean(biome, position, sea_level) + } + fn cold_enough_to_snow( + &mut self, + biome: &str, + position: BlockPos, + sea_level: i32, + ) -> Result<bool, MaterialRuleError> { + self.surface.cold_enough_to_snow(biome, position, sea_level) + } + fn surface_depth(&mut self, x: i32, z: i32) -> i32 { + self.surface.surface_depth(x, z) + } + fn surface_secondary(&mut self, x: i32, z: i32) -> f64 { + self.surface.surface_secondary(x, z) + } + fn band(&mut self, position: BlockPos) -> Result<BlockStateId, MaterialRuleError> { + self.surface.band(position) + } + fn bind_noise(&mut self, name: &str) -> Result<Arc<dyn Noise>, DecodeError> { + let name = identifier(name)?; + if let Some(noise) = self.samplers.get(&name) { + return Ok(noise.clone()); + } + let definition = self + .definitions + .get(&name) + .ok_or(DecodeError::Field("unknown material noise"))?; + let noise: Arc<dyn Noise> = + Arc::new(definition.create(&mut self.root.from_hash_of(&name))?); + self.samplers.insert(name, noise.clone()); + Ok(noise) + } +} diff --git a/crates/horizon-world/src/worldgen/material_condition/rule.rs b/crates/horizon-world/src/worldgen/material_condition/rule.rs new file mode 100644 index 000000000..9dfc2ff1e --- /dev/null +++ b/crates/horizon-world/src/worldgen/material_condition/rule.rs @@ -0,0 +1,222 @@ +//! Compiled material rule composition, sharing the condition worker's context. +use super::{Compiled, Context, MaterialCondition, MaterialConditions, MaterialSurfaceQueries}; +use crate::{registry::BlockStateId, worldgen::DecodeError}; +use horizon_core::{ + density::DensitySampler, + position::BlockPos, + random::{PositionalRandom, RandomSource}, +}; +use std::sync::Arc; + +#[derive(Clone, Debug)] +pub enum MaterialRule { + Block(BlockStateId), + Reference(Arc<MaterialRule>), + /// Density roots must be compiled for the same world and sampler context. + OreVein { + ore: BlockStateId, + raw_ore: BlockStateId, + filler: BlockStateId, + raw_ore_chance: f32, + density: Arc<dyn DensitySampler>, + richness: Arc<dyn DensitySampler>, + filler_gap: Arc<dyn DensitySampler>, + }, + Sequence(Vec<MaterialRule>), + Condition { + if_true: MaterialCondition, + then_run: Box<MaterialRule>, + }, + /// Vanilla calls this rule "bandlands"; it queries terracotta bands. + Bandlands, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum MaterialRuleError { + UnknownRule, + UnknownCondition, + MissingBiomeProvider, + BiomeQueryFailed, + MissingBiome, + CachedConditionUnavailable, + MissingBandProvider, + MissingDensityProvider, + Density(horizon_core::density::SampleError), + InvalidBandIndex, +} +impl std::fmt::Display for MaterialRuleError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + if let Self::Density(error) = self { + return error.fmt(f); + } + f.write_str(match self { + Self::Density(_) => unreachable!(), + Self::MissingDensityProvider => "missing material density provider", + Self::UnknownRule => "unknown material rule", + Self::UnknownCondition => "unknown material condition", + Self::MissingBiomeProvider => "missing material biome provider", + Self::BiomeQueryFailed => "material biome lookup failed", + Self::MissingBiome => "material position has no biome", + Self::CachedConditionUnavailable => "condition was updated without a cached result", + Self::MissingBandProvider => "missing material band provider", + Self::InvalidBandIndex => "negative material band index", + }) + } +} +impl std::error::Error for MaterialRuleError {} +impl From<horizon_core::density::SampleError> for MaterialRuleError { + fn from(error: horizon_core::density::SampleError) -> Self { + Self::Density(error) + } +} + +pub(super) enum CompiledRule<R: RandomSource> { + Block(BlockStateId), + OreVein { + blocks: [BlockStateId; 3], + raw_ore_chance: f32, + densities: [usize; 3], + random: R::Positional, + }, + Sequence(Vec<Self>), + Condition { + condition: Compiled<R>, + rule: Box<Self>, + }, + Bandlands, +} +impl<R: RandomSource> CompiledRule<R> { + fn compile<S: MaterialSurfaceQueries>( + rule: MaterialRule, + root: &R::Positional, + context: &mut Context<S>, + depth: usize, + nodes: &mut usize, + ) -> Result<Self, DecodeError> { + *nodes += 1; + if depth >= 256 || *nodes > 65536 { + return Err(DecodeError::Field("material rule size")); + } + Ok(match rule { + MaterialRule::Block(block) => Self::Block(block), + MaterialRule::Reference(value) => { + return Self::compile((*value).clone(), root, context, depth + 1, nodes); + } + MaterialRule::OreVein { + ore, + raw_ore, + filler, + raw_ore_chance, + density, + richness, + filler_gap, + } => { + let density = context.surface.bind_density(density, true)?; + let richness = context.surface.bind_density(richness, true)?; + let gap = context.surface.bind_density(filler_gap, false)?; + let random = root.from_hash_of("minecraft:ore").fork_positional(); + Self::OreVein { + blocks: [ore, raw_ore, filler], + raw_ore_chance, + densities: [density, richness, gap], + random, + } + } + MaterialRule::Bandlands => Self::Bandlands, + MaterialRule::Condition { if_true, then_run } => { + // Compile the predicate before the nested rule, regardless of + // whether the predicate will match any subsequent position. + let condition = Compiled::compile(if_true, root, context, depth + 1)?; + let rule = Box::new(Self::compile(*then_run, root, context, depth + 1, nodes)?); + Self::Condition { condition, rule } + } + MaterialRule::Sequence(mut children) => { + if children.len() == 1 { + return Self::compile(children.pop().unwrap(), root, context, depth + 1, nodes); + } + let mut result = Vec::with_capacity(children.len()); + for child in children { + result.push(Self::compile(child, root, context, depth + 1, nodes)?); + } + Self::Sequence(result) + } + }) + } + fn apply<S: MaterialSurfaceQueries>( + &mut self, + position: BlockPos, + context: &mut Context<S>, + ) -> Result<Option<BlockStateId>, MaterialRuleError> { + match self { + Self::Block(block) => Ok(Some(*block)), + Self::OreVein { + blocks, + raw_ore_chance, + densities, + random, + } => { + // Densities use the context; randomness uses application coordinates. + let density = context.surface.density(densities[0], context.position)?; + if density <= 0.0 { + return Ok(None); + } + let mut random = random.at(position); + if random.next_float() > density { + return Ok(None); + } + let richness = context.surface.density(densities[1], context.position)?; + if random.next_float() < richness + && context.surface.density(densities[2], context.position)? < 0.0 + { + Ok(Some(if random.next_float() < *raw_ore_chance { + blocks[1] + } else { + blocks[0] + })) + } else { + Ok(Some(blocks[2])) + } + } + Self::Bandlands => context.surface.band(position).map(Some), + Self::Condition { condition, rule } => { + if condition.test(context)? { + rule.apply(position, context) + } else { + Ok(None) + } + } + Self::Sequence(children) => { + for child in children { + if let Some(block) = child.apply(position, context)? { + return Ok(Some(block)); + } + } + Ok(None) + } + } + } +} +impl<R: RandomSource, S: MaterialSurfaceQueries> MaterialConditions<R, S> { + /// Compile all children in order, even after an unconditional block rule. + /// Failed compilation never adds a partial rule to this worker. + pub fn add_rule(&mut self, rule: MaterialRule) -> Result<usize, DecodeError> { + if self.rules.len() >= 8192 { + return Err(DecodeError::Field("material rule count")); + } + let compiled = CompiledRule::compile(rule, &self.root, &mut self.context, 0, &mut 0)?; + let index = self.rules.len(); + self.rules.push(compiled); + Ok(index) + } + /// Predicates read the worker's updated context. Position arguments are + /// forwarded to block-producing rules independently, as in vanilla. + pub fn try_apply( + &mut self, + index: usize, + position: BlockPos, + ) -> Result<Option<BlockStateId>, MaterialRuleError> { + self.rules + .get_mut(index) + .ok_or(MaterialRuleError::UnknownRule)? + .apply(position, &mut self.context) + } +} diff --git a/crates/horizon-world/src/worldgen/material_extensions.rs b/crates/horizon-world/src/worldgen/material_extensions.rs new file mode 100644 index 000000000..8fb5735ac --- /dev/null +++ b/crates/horizon-world/src/worldgen/material_extensions.rs @@ -0,0 +1,229 @@ +//! Eroded-badlands pillars and frozen-ocean icebergs, before chunk integration. +use super::biome_temperature::BiomeTemperature; +use crate::registry::BlockStateId; +use horizon_core::{ + noise::Noise, + position::BlockPos, + random::{PositionalRandom, RandomSource}, +}; +use std::sync::Arc; + +/// Reads and writes retain provider order. The chunk adapter supplies vanilla +/// out-of-height reads and generation-height write clipping. +pub trait MaterialColumn { + type Error; + fn block(&mut self, y: i32) -> Result<BlockStateId, Self::Error>; + fn set_block(&mut self, y: i32, state: BlockStateId) -> Result<(), Self::Error>; + fn is_air(&self, state: BlockStateId) -> bool; + fn same_block(&self, left: BlockStateId, right: BlockStateId) -> bool; +} +#[derive(Clone, Copy, Debug)] +pub struct ExtensionBlocks { + pub default: BlockStateId, + pub water: BlockStateId, + pub packed_ice: BlockStateId, + pub snow: BlockStateId, +} +#[derive(Clone, Debug)] +pub struct ExtensionNoises { + pub badlands_surface: Arc<dyn Noise>, + pub badlands_pillar: Arc<dyn Noise>, + pub badlands_roof: Arc<dyn Noise>, + pub iceberg_surface: Arc<dyn Noise>, + pub iceberg_pillar: Arc<dyn Noise>, + pub iceberg_roof: Arc<dyn Noise>, +} +#[derive(Debug)] +pub enum ExtensionError<E> { + Column(E), + IterationLimit, +} +impl<E: std::fmt::Display> std::fmt::Display for ExtensionError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Column(error) => error.fmt(f), + Self::IterationLimit => f.write_str("material column iteration bound exceeded"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for ExtensionError<E> {} +impl<E> From<E> for ExtensionError<E> { + fn from(error: E) -> Self { + Self::Column(error) + } +} + +/// Random is the world's root positional factory. Noises and biome temperatures +/// must be configured for the same immutable world-generation settings. +pub struct MaterialExtensions<P> { + random: P, + blocks: ExtensionBlocks, + noises: ExtensionNoises, + sea_level: i32, +} +impl<P: PositionalRandom> MaterialExtensions<P> { + pub fn new( + random: P, + blocks: ExtensionBlocks, + noises: ExtensionNoises, + sea_level: i32, + ) -> Self { + Self { + random, + blocks, + noises, + sea_level, + } + } + pub fn eroded_badlands<C: MaterialColumn>( + &self, + column: &mut C, + x: i32, + z: i32, + surface_y: i32, + min_y: i32, + ) -> Result<(), ExtensionError<C::Error>> { + let x = f64::from(x); + let z = f64::from(z); + let amplitude = java_min( + (f64::from(self.noises.badlands_surface.get3(x, 0.0, z)) * 8.25).abs(), + f64::from(self.noises.badlands_pillar.get3(x * 0.2, 0.0, z * 0.2) * 15.0), + ); + if amplitude <= 0.0 { + return Ok(()); + } + let roof = (f64::from(self.noises.badlands_roof.get3(x * 0.75, 0.0, z * 0.75)) * 1.5).abs(); + let top = (64.0 + java_min(amplitude * amplitude * 2.5, (roof * 50.0).ceil() + 24.0)) + .floor() as i32; + if surface_y > top { + return Ok(()); + } + let mut budget = 1 << 20; + let mut y = top; + while y >= min_y { + tick(&mut budget)?; + let state = column.block(y)?; + if column.same_block(state, self.blocks.default) { + break; + } + if column.same_block(state, self.blocks.water) { + return Ok(()); + } + y = y.wrapping_sub(1); + } + y = top; + while y >= min_y { + tick(&mut budget)?; + let state = column.block(y)?; + if !column.is_air(state) { + break; + } + column.set_block(y, self.blocks.default)?; + y = y.wrapping_sub(1); + } + Ok(()) + } + pub fn frozen_ocean<C: MaterialColumn>( + &self, + column: &mut C, + biome: &mut BiomeTemperature, + position: [i32; 2], + surface_y: i32, + minimum_surface_y: i32, + ) -> Result<(), ExtensionError<C::Error>> { + self.frozen_ocean_with_melt( + column, + position, + surface_y, + minimum_surface_y, + |position, sea| Ok(biome.should_melt_frozen_ocean_iceberg_slightly(position, sea)), + ) + } + /// Defer the biome lookup until the native noise/height checks reach it. + pub fn frozen_ocean_with_melt<C: MaterialColumn>( + &self, + column: &mut C, + position: [i32; 2], + surface_y: i32, + minimum_surface_y: i32, + melt: impl FnOnce(BlockPos, i32) -> Result<bool, C::Error>, + ) -> Result<(), ExtensionError<C::Error>> { + let [x, z] = position; + let dx = f64::from(x); + let dz = f64::from(z); + let amplitude = java_min( + (f64::from(self.noises.iceberg_surface.get3(dx, 0.0, dz)) * 8.25).abs(), + f64::from(self.noises.iceberg_pillar.get3(dx * 1.28, 0.0, dz * 1.28) * 15.0), + ); + if amplitude <= 1.8 { + return Ok(()); + } + let roof = + (f64::from(self.noises.iceberg_roof.get3(dx * 1.17, 0.0, dz * 1.17)) * 1.5).abs(); + let mut height = java_min(amplitude * amplitude * 1.2, (roof * 40.0).ceil() + 14.0); + if melt(BlockPos::new(x, self.sea_level, z), self.sea_level)? { + height -= 2.0; + } + if height <= 2.0 { + return Ok(()); + } + let bottom = f64::from(self.sea_level) - height - 7.0; + let top = height + f64::from(self.sea_level); + let mut random = self.random.at(BlockPos::new(x, 0, z)); + let snow_limit = 2 + random.next_int_bound(4).unwrap(); + let snow_height = self + .sea_level + .wrapping_add(18) + .wrapping_add(random.next_int_bound(10).unwrap()); + let mut snow_count = 0; + let mut y = surface_y.max((top as i32).wrapping_add(1)); + let mut budget = 1 << 20; + while y >= minimum_surface_y { + tick(&mut budget)?; + let state = column.block(y)?; + let air = column.is_air(state) && y < (top as i32) && random.next_double() > 0.01; + let fill = if air { + true + } else { + // The second getBlock is observable even when the first read + // found air but failed its height or random test. + let state = column.block(y)?; + column.same_block(state, self.blocks.water) + && y > (bottom as i32) + && y < self.sea_level + && random.next_double() > 0.15 + }; + if fill { + let state = if snow_count <= snow_limit && y > snow_height { + snow_count += 1; + self.blocks.snow + } else { + self.blocks.packed_ice + }; + column.set_block(y, state)?; + } + y = y.wrapping_sub(1); + } + Ok(()) + } +} +fn tick<E>(remaining: &mut usize) -> Result<(), ExtensionError<E>> { + if *remaining == 0 { + return Err(ExtensionError::IterationLimit); + } + *remaining -= 1; + Ok(()) +} +fn java_min(a: f64, b: f64) -> f64 { + if a.is_nan() { + a + } else if b.is_nan() { + b + } else if a == 0.0 && b == 0.0 { + f64::from_bits(a.to_bits() | b.to_bits()) + } else if a <= b { + a + } else { + b + } +} diff --git a/crates/horizon-world/src/worldgen/material_stage.rs b/crates/horizon-world/src/worldgen/material_stage.rs new file mode 100644 index 000000000..0763c4e63 --- /dev/null +++ b/crates/horizon-world/src/worldgen/material_stage.rs @@ -0,0 +1,351 @@ +//! Surface-stage column traversal and pre-lighting chunk writes. +use super::{ + DecodeError, + anchor::WorldGenerationContext, + material_condition::{ + MaterialConditions, MaterialDensitySources, MaterialRule, MaterialRuleError, + MaterialSurfaceQueries, + }, + material_extensions::{ExtensionError, MaterialColumn, MaterialExtensions}, + terrain::{TerrainBlockStates, TerrainChunk, TerrainError}, +}; +use crate::{ + heightmap::{HeightmapState, HeightmapType}, + registry::BlockStateId, +}; +use horizon_core::{ + density::{DensitySampler, SamplerContext}, + noise::DensityVolume, + position::BlockPos, + random::RandomSource, +}; +use std::sync::Arc; + +pub struct SurfaceInputs<'a, R: RandomSource, S: MaterialSurfaceQueries> { + pub generation: WorldGenerationContext, + pub noise_volume: DensityVolume, + pub root: R::Positional, + pub surface: S, + pub preliminary_surface: Arc<dyn DensitySampler>, + pub density_context: &'a mut SamplerContext, + /// Inclusive generation write bounds, contained within the chunk. + pub write_min_y: i32, + pub write_max_y: i32, +} +pub struct TopMaterialInputs<'a, R: RandomSource, S: MaterialSurfaceQueries> { + pub generation: WorldGenerationContext, + pub root: R::Positional, + pub surface: S, + pub preliminary_surface: Arc<dyn DensitySampler>, + pub density_context: &'a mut SamplerContext, +} +#[derive(Debug)] +pub enum SurfaceError { + Terrain(TerrainError), + Rule(MaterialRuleError), + Decode(DecodeError), + InvalidBounds, + InvalidVolume, + IterationLimit, +} +impl std::fmt::Display for SurfaceError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{self:?}") + } +} +impl std::error::Error for SurfaceError {} +impl From<TerrainError> for SurfaceError { + fn from(e: TerrainError) -> Self { + Self::Terrain(e) + } +} +impl From<MaterialRuleError> for SurfaceError { + fn from(e: MaterialRuleError) -> Self { + Self::Rule(e) + } +} +impl From<DecodeError> for SurfaceError { + fn from(e: DecodeError) -> Self { + Self::Decode(e) + } +} +impl From<ExtensionError<SurfaceError>> for SurfaceError { + fn from(e: ExtensionError<SurfaceError>) -> Self { + match e { + ExtensionError::Column(e) => e, + ExtensionError::IterationLimit => Self::IterationLimit, + } + } +} + +struct Column<'a, 'r, B: TerrainBlockStates> { + chunk: &'a mut TerrainChunk<'r, B>, + x: i32, + z: i32, + min: i32, + max: i32, +} +impl<B: TerrainBlockStates> MaterialColumn for Column<'_, '_, B> { + type Error = SurfaceError; + fn block(&mut self, y: i32) -> Result<BlockStateId, SurfaceError> { + Ok(self.chunk.block(self.x, y, self.z)) + } + fn set_block(&mut self, y: i32, state: BlockStateId) -> Result<(), SurfaceError> { + if y >= self.min && y <= self.max { + self.chunk.set_block_worldgen(self.x, y, self.z, state)?; + if self.chunk.block_properties(state).has_fluid() { + self.chunk.mark_postprocessing(self.x, y, self.z); + } + } + Ok(()) + } + fn is_air(&self, state: BlockStateId) -> bool { + self.chunk.block_properties(state).is_air() + } + fn same_block(&self, left: BlockStateId, right: BlockStateId) -> bool { + self.chunk.same_block(left, right) + } +} +fn first_available<B: TerrainBlockStates>( + chunk: &mut TerrainChunk<'_, B>, + x: i32, + z: i32, +) -> Result<i32, SurfaceError> { + if chunk.heightmap(HeightmapType::WorldSurfaceWg).is_none() { + chunk.prime_heightmaps(&[HeightmapType::WorldSurfaceWg])?; + } + chunk + .heightmap(HeightmapType::WorldSurfaceWg) + .unwrap() + .first_available(x, z) + .map_err(TerrainError::from) + .map_err(SurfaceError::from) +} +fn tick(remaining: &mut usize) -> Result<(), SurfaceError> { + if *remaining == 0 { + return Err(SurfaceError::IterationLimit); + } + *remaining -= 1; + Ok(()) +} + +/// Evaluate the replacement surface under a carved block. Each call binds a +/// fresh one-cell material context, without restricting possible biomes, and +/// uses one stone block above/below. The caller applies the returned state. +/// Required heightmaps may be primed; block values are not changed here. +/// The caller's density context is retained on successful and failed evaluation. +pub fn top_material<R: RandomSource, S: MaterialSurfaceQueries, B: TerrainBlockStates>( + chunk: &mut TerrainChunk<'_, B>, + rule: MaterialRule, + inputs: TopMaterialInputs<'_, R, S>, + position: BlockPos, + submerged: bool, +) -> Result<Option<BlockStateId>, SurfaceError> { + let volume = DensityVolume::new([1; 3], [position.x, position.y, position.z], [1; 3]) + .map_err(|_| SurfaceError::InvalidVolume)?; + let mut sources = MaterialDensitySources::new( + inputs.surface, + volume, + inputs.preliminary_surface, + SamplerContext::default(), + )?; + std::mem::swap(sources.sampler_context_mut(), inputs.density_context); + let mut worker = MaterialConditions::<R, _>::with_possible_biomes( + inputs.generation, + inputs.root, + sources, + None, + ); + let result = (|| { + let rule = worker.add_rule(rule)?; + let (lx, lz) = (position.x & 15, position.z & 15); + let gx = first_available(chunk, (lx + 1).min(15), lz)?.wrapping_sub(first_available( + chunk, + (lx - 1).max(0), + lz, + )?); + let gz = first_available(chunk, lx, (lz + 1).min(15))?.wrapping_sub(first_available( + chunk, + lx, + (lz - 1).max(0), + )?); + worker.update_xz(position.x, position.z, gx, gz); + worker.update_y( + 1, + 1, + if submerged { + position.y.wrapping_add(1) + } else { + i32::MIN + }, + position.y, + ); + worker.try_apply(rule, position).map_err(SurfaceError::from) + })(); + let (_, mut context) = worker.into_surface().into_parts(); + std::mem::swap(&mut context, inputs.density_context); + result +} + +/// Build one chunk's surface in vanilla X/Z/descending-Y order. Required heightmaps +/// are updated during writes, so later columns observe earlier modifications. +/// Providers, rule roots, extensions and random settings must belong to one world. +/// Failures retain prior chunk writes and fluid postprocessing entries. +pub fn build_surface<R: RandomSource, S: MaterialSurfaceQueries, B: TerrainBlockStates>( + chunk: &mut TerrainChunk<'_, B>, + rule: MaterialRule, + inputs: SurfaceInputs<'_, R, S>, + extensions: &MaterialExtensions<R::Positional>, +) -> Result<(), SurfaceError> { + let min = chunk.min_y(); + let max = min + chunk.height() - 1; + if inputs.write_min_y < min + || inputs.write_max_y > max + || inputs.write_min_y > inputs.write_max_y + { + return Err(SurfaceError::InvalidBounds); + } + let highest = chunk + .highest_filled_section_index() + .map_or(min - 1, |i| min + (i as i32) * 16 + 15); + let sizes = inputs.noise_volume.sizes(); + let origin = inputs.noise_volume.minimum(); + let height = highest.wrapping_sub(origin[1]).wrapping_add(1).max(1); + let expected = DensityVolume::new([sizes[0] as i32, height, sizes[2] as i32], origin, [1; 3]) + .map_err(|_| SurfaceError::InvalidVolume)?; + let mut sources = MaterialDensitySources::new( + inputs.surface, + expected, + inputs.preliminary_surface, + SamplerContext::default(), + )?; + std::mem::swap(sources.sampler_context_mut(), inputs.density_context); + let mut worker = MaterialConditions::<R, _>::new(inputs.generation, inputs.root, sources); + let result = build_columns( + chunk, + rule, + &mut worker, + extensions, + inputs.write_min_y, + inputs.write_max_y, + ); + let (_, mut context) = worker.into_surface().into_parts(); + std::mem::swap(&mut context, inputs.density_context); + result +} +fn build_columns<R: RandomSource, S: MaterialSurfaceQueries, B: TerrainBlockStates>( + chunk: &mut TerrainChunk<'_, B>, + rule: MaterialRule, + worker: &mut MaterialConditions<R, S>, + extensions: &MaterialExtensions<R::Positional>, + write_min_y: i32, + write_max_y: i32, +) -> Result<(), SurfaceError> { + let min = chunk.min_y(); + let rule = worker.add_rule(rule)?; + let cx = chunk.position().x.wrapping_shl(4); + let cz = chunk.position().z.wrapping_shl(4); + for lx in 0..16 { + for lz in 0..16 { + let x = cx.wrapping_add(lx); + let z = cz.wrapping_add(lz); + let original_top = first_available(chunk, lx, lz)?; + let biome = worker + .biome_at(BlockPos::new(x, original_top, z))? + .ok_or(MaterialRuleError::MissingBiome)?; + if biome.as_ref() == "minecraft:eroded_badlands" { + extensions.eroded_badlands( + &mut Column { + chunk, + x, + z, + min: write_min_y, + max: write_max_y, + }, + x, + z, + original_top, + min, + )?; + } + let top = first_available(chunk, lx, lz)?; + let gx = first_available(chunk, (lx + 1).min(15), lz)?.wrapping_sub(first_available( + chunk, + (lx - 1).max(0), + lz, + )?); + let gz = first_available(chunk, lx, (lz + 1).min(15))?.wrapping_sub(first_available( + chunk, + lx, + (lz - 1).max(0), + )?); + worker.update_xz(x, z, gx, gz); + let mut above = 0i32; + let mut water = i32::MIN; + let mut bottom = i32::MAX; + let mut y = top; + let mut budget = 1 << 20; + let mut column = Column { + chunk, + x, + z, + min: write_min_y, + max: write_max_y, + }; + while y >= min { + tick(&mut budget)?; + let state = column.block(y)?; + let properties = column.chunk.block_properties(state); + if properties.is_air() { + above = 0; + water = i32::MIN; + } else if properties.has_fluid() { + if water == i32::MIN { + water = y.wrapping_add(1); + } + } else { + if bottom >= y { + bottom = -32512; // DimensionType.MIN_Y << 4 for 26.3. + let mut below = y.wrapping_sub(1); + while below >= min - 1 { + tick(&mut budget)?; + let state = column.block(below)?; + let properties = column.chunk.block_properties(state); + if properties.is_air() || properties.has_fluid() { + bottom = below.wrapping_add(1); + break; + } + below = below.wrapping_sub(1); + } + } + above = above.wrapping_add(1); + worker.update_y(above, y.wrapping_sub(bottom).wrapping_add(1), water, y); + if y >= write_min_y && y <= write_max_y { + if let Some(state) = worker.try_apply(rule, BlockPos::new(x, y, z))? { + column.set_block(y, state)?; + } + } + } + y = y.wrapping_sub(1); + } + if matches!( + biome.as_ref(), + "minecraft:frozen_ocean" | "minecraft:deep_frozen_ocean" + ) { + let minimum = worker.minimum_surface_level()?; + extensions.frozen_ocean_with_melt( + &mut column, + [x, z], + original_top, + minimum, + |position, sea| { + worker + .melts_frozen_ocean(&biome, position, sea) + .map_err(SurfaceError::from) + }, + )?; + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/src/worldgen/material_surface.rs b/crates/horizon-world/src/worldgen/material_surface.rs new file mode 100644 index 000000000..c463ec063 --- /dev/null +++ b/crates/horizon-world/src/worldgen/material_surface.rs @@ -0,0 +1,142 @@ +//! Seeded terracotta bands and the material system's surface-noise queries. +use crate::registry::{BlockRegistry, BlockStateId}; +use horizon_core::{ + noise::Noise, + random::{PositionalRandom, RandomSource}, +}; +use std::sync::Arc; + +#[derive(Clone, Copy, Debug)] +pub struct ClayBandBlocks { + pub terracotta: BlockStateId, + pub orange: BlockStateId, + pub yellow: BlockStateId, + pub brown: BlockStateId, + pub red: BlockStateId, + pub white: BlockStateId, + pub light_gray: BlockStateId, +} +impl ClayBandBlocks { + pub fn from_registry(registry: &BlockRegistry) -> Option<Self> { + Some(Self { + terracotta: registry.default_state("minecraft:terracotta")?, + orange: registry.default_state("minecraft:orange_terracotta")?, + yellow: registry.default_state("minecraft:yellow_terracotta")?, + brown: registry.default_state("minecraft:brown_terracotta")?, + red: registry.default_state("minecraft:red_terracotta")?, + white: registry.default_state("minecraft:white_terracotta")?, + light_gray: registry.default_state("minecraft:light_gray_terracotta")?, + }) + } +} +#[derive(Clone, Debug)] +pub struct ClayBands([BlockStateId; 192]); +impl ClayBands { + /// The input is MaterialSystem's clay_bands child stream. Every conditional + /// random draw and overwrite retains vanilla order. + pub fn generate(random: &mut impl RandomSource, blocks: ClayBandBlocks) -> Self { + let mut bands = [blocks.terracotta; 192]; + let mut i = 0; + while i < bands.len() { + i += random.next_int_bound(5).unwrap() as usize + 1; + if i < bands.len() { + bands[i] = blocks.orange; + } + i += 1; + } + Self::make_bands(random, &mut bands, 1, blocks.yellow); + Self::make_bands(random, &mut bands, 2, blocks.brown); + Self::make_bands(random, &mut bands, 1, blocks.red); + let count = random.next_int_between_inclusive(9, 15).unwrap(); + let mut position = 0; + for _ in 0..count { + if position >= bands.len() { + break; + } + bands[position] = blocks.white; + if position > 1 && random.next_boolean() { + bands[position - 1] = blocks.light_gray; + } + if position + 1 < bands.len() && random.next_boolean() { + bands[position + 1] = blocks.light_gray; + } + position += random.next_int_bound(16).unwrap() as usize + 4; + } + Self(bands) + } + fn make_bands( + random: &mut impl RandomSource, + bands: &mut [BlockStateId; 192], + base_width: usize, + state: BlockStateId, + ) { + let count = random.next_int_between_inclusive(6, 15).unwrap(); + for _ in 0..count { + let width = base_width + random.next_int_bound(3).unwrap() as usize; + let start = random.next_int_bound(192).unwrap() as usize; + let end = (start + width).min(bands.len()); + bands[start..end].fill(state); + } + } + pub fn states(&self) -> &[BlockStateId; 192] { + &self.0 + } + /// Preserve Java's signed remainder. Extreme or unsupported negative heights + /// can produce an invalid index, which returns None instead of an exception. + pub fn at_noise(&self, y: i32, noise: f32) -> Option<BlockStateId> { + let offset = round_float(noise * 4.); + let index = y.wrapping_add(offset).wrapping_add(192) % 192; + self.0.get(index as usize).copied() + } +} +fn round_float(value: f32) -> i32 { + // f64 retains every relevant half-integer boundary of a float that fits an + // int. Rust's cast supplies Java's NaN-to-zero and saturating endpoints. + (f64::from(value) + 0.5).floor() as i32 +} +#[derive(Debug)] +pub struct MaterialSurface<P> { + bands: ClayBands, + random: P, + clay_offset: Arc<dyn Noise>, + surface: Arc<dyn Noise>, + secondary: Arc<dyn Noise>, +} +impl<P: PositionalRandom> MaterialSurface<P> { + /// `random` is the world's root positional factory, not a surface child. + pub fn new( + random: P, + blocks: ClayBandBlocks, + clay_offset: Arc<dyn Noise>, + surface: Arc<dyn Noise>, + secondary: Arc<dyn Noise>, + ) -> Self { + let bands = ClayBands::generate(&mut random.from_hash_of("minecraft:clay_bands"), blocks); + Self { + bands, + random, + clay_offset, + surface, + secondary, + } + } + pub fn bands(&self) -> &ClayBands { + &self.bands + } + pub fn band(&self, [x, y, z]: [i32; 3]) -> Option<BlockStateId> { + self.bands + .at_noise(y, self.clay_offset.get3(f64::from(x), 0., f64::from(z))) + } + pub fn surface_depth(&self, x: i32, z: i32) -> i32 { + let noise = f64::from(self.surface.get3(f64::from(x), 0., f64::from(z))); + ((noise * 2.75 + 3.) + + self + .random + .at(horizon_core::position::BlockPos::new(x, 0, z)) + .next_double() + * 0.25) as i32 + } + pub fn surface_secondary(&self, x: i32, z: i32) -> f64 { + f64::from(self.secondary.get3(f64::from(x), 0., f64::from(z))) + } +} diff --git a/crates/horizon-world/src/worldgen/ore_feature.rs b/crates/horizon-world/src/worldgen/ore_feature.rs new file mode 100644 index 000000000..c4cbe447e --- /dev/null +++ b/crates/horizon-world/src/worldgen/ore_feature.rs @@ -0,0 +1,346 @@ +//! Ore placement with ordered replacement rules and air-exposure checks. +use super::{ + DecodeError, Object, + block_feature::{BlockReplacements, FeatureBlockBindings, decode_targets}, + density::identifier, + feature::{FeatureError, FeatureWorld}, + feature_graph::FeatureExecutionError, + int_range, number_text, + placement::PlacementContext, + required, +}; +use crate::heightmap::HeightmapType; +use crate::registry::BlockStateId; +use horizon_core::{geometry::Direction, random::RandomSource}; + +#[derive(Clone, Debug)] +pub struct ScatteredOreFeature { + targets: BlockReplacements, + size: i32, + discard: f32, + air: [BlockStateId; 3], +} +impl ScatteredOreFeature { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + Self::decode(json, bindings, 0, &mut 65536) + } + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let kind = identifier(&serde_json::from_str::<String>( + required(&object, "type")?.get(), + )?)?; + if kind != "minecraft:scattered_ore" { + return Err(DecodeError::Field("scattered ore type")); + } + let targets = decode_targets(&object, bindings, depth, remaining)?; + let size = int_range(required(&object, "size")?, "ore size", 0, 64)?; + let discard: f32 = number_text(required(&object, "discard_chance_on_air_exposure")?)? + .parse() + .map_err(|_| DecodeError::Field("ore air exposure"))?; + if !(0.0..=1.0).contains(&discard) || discard.is_sign_negative() { + return Err(DecodeError::Field("ore air exposure")); + } + Ok(Self { + targets, + size, + discard, + air: bindings.air, + }) + } + pub fn place<W: FeatureWorld>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + ) -> Result<bool, FeatureError<W::Error>> { + let count = random + .next_int_bound(self.size + 1) + .map_err(FeatureError::Random)?; + for attempt in 0..count { + let spread = attempt.min(7) as f32; + let position = origin.map(|component| { + let offset = (random.next_float() - random.next_float()) * spread; + // Widen before adding 0.5 so a float just below a tie cannot + // round up during addition. Values are bounded by +/-7. + let offset = (f64::from(offset) + 0.5).floor() as i32; + component.wrapping_add(offset) + }); + let current = world.block(position).map_err(FeatureError::World)?; + for (rule, state) in &self.targets { + if !rule.test(current, position, random) { + continue; + } + let skip_air = self.discard <= 0.0 + || (self.discard < 1.0 && random.next_float() >= self.discard); + if !skip_air { + let mut exposed = false; + for direction in Direction::ALL { + let delta = direction.normal(); + let neighbor = std::array::from_fn(|i| position[i].wrapping_add(delta[i])); + if self + .air + .contains(&world.block(neighbor).map_err(FeatureError::World)?) + { + exposed = true; + break; + } + } + if exposed { + continue; + } + } + world + .set_block(position, *state, 2) + .map_err(FeatureError::World)?; + break; + } + } + Ok(true) + } +} + +/// Vanilla `minecraft:ore`: an interpolated chain of spheres written straight +/// into chunk sections (BulkSectionAccess), bypassing block update effects. +#[derive(Clone, Debug)] +pub struct OreFeature { + targets: BlockReplacements, + size: i32, + discard: f32, + air: [BlockStateId; 3], +} +impl OreFeature { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + Self::decode(json, bindings, 0, &mut 65536) + } + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let kind = identifier(&serde_json::from_str::<String>( + required(&object, "type")?.get(), + )?)?; + if kind != "minecraft:ore" { + return Err(DecodeError::Field("ore type")); + } + let targets = decode_targets(&object, bindings, depth, remaining)?; + let size = int_range(required(&object, "size")?, "ore size", 0, 64)?; + let discard: f32 = number_text(required(&object, "discard_chance_on_air_exposure")?)? + .parse() + .map_err(|_| DecodeError::Field("ore air exposure"))?; + if !(0.0..=1.0).contains(&discard) || discard.is_sign_negative() { + return Err(DecodeError::Field("ore air exposure")); + } + Ok(Self { + targets, + size, + discard, + air: bindings.air, + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + ) -> Result<bool, FeatureExecutionError<W::Error>> { + let dir = random.next_float() * std::f32::consts::PI; + let spread_xy = self.size as f32 / 8.0; + let max_radius = ((self.size as f32 / 16.0 * 2.0 + 1.0) / 2.0).ceil() as i32; + let (ox, oz) = (f64::from(origin[0]), f64::from(origin[2])); + let (sin, cos) = (f64::from(dir).sin(), f64::from(dir).cos()); + let spread = f64::from(spread_xy); + let x0 = ox + sin * spread; + let x1 = ox - sin * spread; + let z0 = oz + cos * spread; + let z1 = oz - cos * spread; + let y0 = f64::from( + origin[1] + .wrapping_add(random.next_int_bound(3)?) + .wrapping_sub(2), + ); + let y1 = f64::from( + origin[1] + .wrapping_add(random.next_int_bound(3)?) + .wrapping_sub(2), + ); + let spread_ceil = spread.ceil() as i32; + let x_start = origin[0].wrapping_sub(spread_ceil).wrapping_sub(max_radius); + let y_start = origin[1].wrapping_sub(2).wrapping_sub(max_radius); + let z_start = origin[2].wrapping_sub(spread_ceil).wrapping_sub(max_radius); + let size_xz = 2 * (spread_ceil + max_radius); + let size_y = 2 * (2 + max_radius); + for x in 0..=size_xz { + for z in 0..=size_xz { + let (px, pz) = (x_start.wrapping_add(x), z_start.wrapping_add(z)); + let floor = world + .height(HeightmapType::OceanFloorWg, px, pz) + .map_err(FeatureExecutionError::Query)?; + if y_start <= floor { + return self.do_place( + world, + random, + [x0, x1, z0, z1, y0, y1], + [x_start, y_start, z_start], + size_xz, + size_y, + ); + } + } + } + Ok(false) + } + fn do_place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + [x0, x1, z0, z1, y0, y1]: [f64; 6], + [x_start, y_start, z_start]: [i32; 3], + size_xz: i32, + size_y: i32, + ) -> Result<bool, FeatureExecutionError<W::Error>> { + let size = self.size as usize; + let mut data = vec![[0f64; 4]; size]; + for (i, entry) in data.iter_mut().enumerate() { + let step = i as f32 / self.size as f32; + let step64 = f64::from(step); + let xx = x0 + step64 * (x1 - x0); + let yy = y0 + step64 * (y1 - y0); + let zz = z0 + step64 * (z1 - z0); + let ss = random.next_double() * f64::from(self.size) / 16.0; + let sine = horizon_core::geometry::trig::sin(f64::from(std::f32::consts::PI * step)); + let r = (f64::from(sine + 1.0) * ss + 1.0) / 2.0; + *entry = [xx, yy, zz, r]; + } + for i1 in 0..size.saturating_sub(1) { + if data[i1][3] <= 0.0 { + continue; + } + for i2 in i1 + 1..size { + if data[i2][3] <= 0.0 { + continue; + } + let dx = data[i1][0] - data[i2][0]; + let dy = data[i1][1] - data[i2][1]; + let dz = data[i1][2] - data[i2][2]; + let dr = data[i1][3] - data[i2][3]; + if dr * dr > dx * dx + dy * dy + dz * dz { + if dr > 0.0 { + data[i2][3] = -1.0; + } else { + data[i1][3] = -1.0; + } + } + } + } + let mut tested = vec![false; (size_xz as usize) * (size_y as usize) * (size_xz as usize)]; + let mut placed = 0; + for [xx, yy, zz, r] in data { + if r < 0.0 { + continue; + } + let x_min = ((xx - r).floor() as i32).max(x_start); + let y_min = ((yy - r).floor() as i32).max(y_start); + let z_min = ((zz - r).floor() as i32).max(z_start); + let x_max = ((xx + r).floor() as i32).max(x_min); + let y_max = ((yy + r).floor() as i32).max(y_min); + let z_max = ((zz + r).floor() as i32).max(z_min); + for x in x_min..=x_max { + let xd = (f64::from(x) + 0.5 - xx) / r; + if xd * xd >= 1.0 { + continue; + } + for y in y_min..=y_max { + let yd = (f64::from(y) + 0.5 - yy) / r; + if xd * xd + yd * yd >= 1.0 { + continue; + } + for z in z_min..=z_max { + let zd = (f64::from(z) + 0.5 - zz) / r; + if xd * xd + yd * yd + zd * zd >= 1.0 + || world + .outside_build_height(y) + .map_err(FeatureExecutionError::Query)? + { + continue; + } + let index = i64::from(x.wrapping_sub(x_start)) + + i64::from(y.wrapping_sub(y_start)) * i64::from(size_xz) + + i64::from(z.wrapping_sub(z_start)) + * i64::from(size_xz) + * i64::from(size_y); + // The sphere bounds keep indices inside the native BitSet. + let Some(bit) = usize::try_from(index) + .ok() + .and_then(|index| tested.get_mut(index)) + else { + return Err(FeatureExecutionError::WorkLimit); + }; + if *bit { + continue; + } + *bit = true; + let p = [x, y, z]; + if !world + .ensure_can_write(p) + .map_err(FeatureExecutionError::Query)? + { + continue; + } + let Some(state) = world + .section_block(p) + .map_err(FeatureExecutionError::Query)? + else { + continue; + }; + for (rule, target) in &self.targets { + if !rule.test(state, p, random) { + continue; + } + if !skip_air_check(random, self.discard) { + let mut exposed = false; + for direction in Direction::ALL { + let n = direction.normal(); + let q = std::array::from_fn(|i| p[i].wrapping_add(n[i])); + let neighbor = world + .section_block(q) + .map_err(FeatureExecutionError::Query)? + .unwrap_or(self.air[0]); + if self.air.contains(&neighbor) { + exposed = true; + break; + } + } + if exposed { + continue; + } + } + world + .set_section_block(p, *target) + .map_err(FeatureExecutionError::Query)?; + placed += 1; + break; + } + } + } + } + } + Ok(placed > 0) + } +} +fn skip_air_check(random: &mut impl RandomSource, discard: f32) -> bool { + if discard <= 0.0 { + true + } else if discard >= 1.0 { + false + } else { + random.next_float() >= discard + } +} diff --git a/crates/horizon-world/src/worldgen/placement.rs b/crates/horizon-world/src/worldgen/placement.rs new file mode 100644 index 000000000..0c4ed8223 --- /dev/null +++ b/crates/horizon-world/src/worldgen/placement.rs @@ -0,0 +1,505 @@ +//! Placement modifiers that depend on random state and generation bounds. +//! Block-query modifiers and actual configured features remain separate work. +mod chain; +mod layer; +use super::block_predicate::{BlockPredicate, PredicateBlockResolver}; +use super::{ + DecodeError, Object, anchor::WorldGenerationContext, biome_temperature::biome_info_noise, + density::identifier, double, height_provider::HeightProvider, int_range, integer, number_text, + optional, required, value_provider::IntProvider, +}; +use crate::heightmap::HeightmapType; +pub use chain::{FeaturePlacementError, FeaturePlacer}; +use horizon_core::random::{InvalidBound, RandomSource}; +use serde_json::value::RawValue; +mod context; +pub use context::{LayerBlock, PlacementContext, PlacementQueryError}; + +#[derive(Clone, Debug)] +pub enum PlacementModifier { + Biome, + BlockPredicate(BlockPredicate), + EnvironmentScan { + upwards: bool, + target: BlockPredicate, + allowed: BlockPredicate, + max_steps: i32, + }, + Heightmap(HeightmapType), + SurfaceRelative { + heightmap: HeightmapType, + min: i32, + max: i32, + }, + SurfaceWaterDepth(i32), + Count(IntProvider), + CountOnEveryLayer(IntProvider), + NoiseBasedCount { + ratio: i32, + factor: f64, + offset: f64, + }, + NoiseThresholdCount { + level: f64, + below: i32, + above: i32, + }, + InSquare, + Cuboid { + xz_size: IntProvider, + y_size: IntProvider, + include_edges: bool, + include_interior: bool, + }, + Offset([IntProvider; 3]), + HeightRange(HeightProvider), + Rarity(i32), + RandomChance(f32), + Fixed(Vec<[i32; 3]>), + RandomlySelected(Vec<Self>), +} +#[derive(Debug)] +pub enum PlacementError<E> { + Random(InvalidBound), + World(PlacementQueryError), + Output(E), + WorkLimit, +} +impl<E: std::fmt::Display> std::fmt::Display for PlacementError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Random(e) => e.fmt(f), + Self::World(e) => e.fmt(f), + Self::Output(e) => e.fmt(f), + Self::WorkLimit => f.write_str("placement work limit exceeded"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for PlacementError<E> {} +impl<E> From<InvalidBound> for PlacementError<E> { + fn from(value: InvalidBound) -> Self { + Self::Random(value) + } +} +impl<E> From<PlacementQueryError> for PlacementError<E> { + fn from(value: PlacementQueryError) -> Self { + Self::World(value) + } +} +impl PlacementModifier { + pub fn from_json(json: &str) -> Result<Self, DecodeError> { + Self::decode(json, 0, &mut 65536) + } + pub(crate) fn decode( + json: &str, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + Self::decode_with_blocks(json, depth, remaining, None) + } + pub fn from_json_with_blocks( + json: &str, + blocks: &impl PredicateBlockResolver, + ) -> Result<Self, DecodeError> { + Self::decode_with_blocks(json, 0, &mut 65536, Some(blocks)) + } + pub(crate) fn decode_with_blocks( + json: &str, + depth: usize, + remaining: &mut usize, + blocks: Option<&dyn PredicateBlockResolver>, + ) -> Result<Self, DecodeError> { + if depth > 256 || *remaining == 0 { + return Err(DecodeError::Field("placement depth or node count")); + } + *remaining -= 1; + let object: Object = serde_json::from_str(json)?; + let kind = identifier(&serde_json::from_str::<String>( + required(&object, "type")?.get(), + )?)?; + let provider = |name, min, max| { + let value = IntProvider::from_json(required(&object, name)?.get())?; + let bounds = value.bounds(); + if bounds[0] < min || bounds[1] > max { + return Err(DecodeError::Field("placement provider bounds")); + } + Ok(value) + }; + let heightmap = || { + let name: String = serde_json::from_str(required(&object, "heightmap")?.get())?; + HeightmapType::ALL + .into_iter() + .find(|kind| kind.name() == name) + .ok_or(DecodeError::Field("heightmap")) + }; + match kind.as_str() { + "minecraft:biome" => Ok(Self::Biome), + "minecraft:block_predicate_filter" => { + Ok(Self::BlockPredicate(BlockPredicate::decode_with_blocks( + required(&object, "predicate")?.get(), + depth + 1, + remaining, + blocks, + )?)) + } + "minecraft:environment_scan" => { + let direction: String = + serde_json::from_str(required(&object, "direction_of_search")?.get())?; + let upwards = match direction.as_str() { + "up" => true, + "down" => false, + _ => return Err(DecodeError::Field("scan direction")), + }; + Ok(Self::EnvironmentScan { + upwards, + target: BlockPredicate::decode_with_blocks( + required(&object, "target_condition")?.get(), + depth + 1, + remaining, + blocks, + )?, + allowed: optional(&object, "allowed_search_condition") + .map(|v| { + BlockPredicate::decode_with_blocks( + v.get(), + depth + 1, + remaining, + blocks, + ) + }) + .transpose()? + .unwrap_or(BlockPredicate::True), + max_steps: int_range(required(&object, "max_steps")?, "scan steps", 1, 32)?, + }) + } + "minecraft:heightmap" => Ok(Self::Heightmap(heightmap()?)), + "minecraft:surface_relative_threshold_filter" => Ok(Self::SurfaceRelative { + heightmap: heightmap()?, + min: optional(&object, "min_inclusive") + .map(integer) + .transpose()? + .unwrap_or(i32::MIN), + max: optional(&object, "max_inclusive") + .map(integer) + .transpose()? + .unwrap_or(i32::MAX), + }), + "minecraft:surface_water_depth_filter" => Ok(Self::SurfaceWaterDepth(integer( + required(&object, "max_water_depth")?, + )?)), + "minecraft:noise_based_count" => Ok(Self::NoiseBasedCount { + ratio: integer(required(&object, "noise_to_count_ratio")?)?, + factor: double(required(&object, "noise_factor")?)?, + offset: optional(&object, "noise_offset") + .map(double) + .transpose()? + .unwrap_or(0.), + }), + "minecraft:noise_threshold_count" => Ok(Self::NoiseThresholdCount { + level: double(required(&object, "noise_level")?)?, + below: integer(required(&object, "below_noise")?)?, + above: integer(required(&object, "above_noise")?)?, + }), + "minecraft:count_on_every_layer" => { + Ok(Self::CountOnEveryLayer(provider("count", 0, 256)?)) + } + "minecraft:count" => Ok(Self::Count(provider("count", 0, 4096)?)), + "minecraft:in_square" => Ok(Self::InSquare), + "minecraft:cuboid" => Ok(Self::Cuboid { + xz_size: provider("xz_size", 1, 16)?, + y_size: provider("y_size", 1, 16)?, + include_edges: optional(&object, "include_edges") + .map(|raw| serde_json::from_str(raw.get())) + .transpose()? + .unwrap_or(true), + include_interior: optional(&object, "include_interior") + .map(|raw| serde_json::from_str(raw.get())) + .transpose()? + .unwrap_or(true), + }), + "minecraft:offset" => Ok(Self::Offset([ + provider("x", -16, 16)?, + provider("y", -16, 16)?, + provider("z", -16, 16)?, + ])), + "minecraft:height_range" => Ok(Self::HeightRange(HeightProvider::from_json( + required(&object, "height")?.get(), + )?)), + "minecraft:rarity_filter" => Ok(Self::Rarity(int_range( + required(&object, "chance")?, + "chance", + 1, + i32::MAX, + )?)), + "minecraft:random_chance" => { + let chance: f32 = number_text(required(&object, "chance")?)? + .parse() + .map_err(|_| DecodeError::Field("chance"))?; + if !(0. ..=1.).contains(&chance) || chance.is_sign_negative() { + return Err(DecodeError::Field("chance")); + } + Ok(Self::RandomChance(chance)) + } + "minecraft:fixed_placement" => { + let values: Vec<Box<RawValue>> = + serde_json::from_str(required(&object, "positions")?.get())?; + if values.len() > 8192 { + return Err(DecodeError::Field("fixed positions")); + } + let mut positions = Vec::with_capacity(values.len()); + for raw in values { + let coords: Vec<Box<RawValue>> = serde_json::from_str(raw.get())?; + if coords.len() != 3 { + return Err(DecodeError::Field("block position")); + } + positions.push([ + integer(&coords[0])?, + integer(&coords[1])?, + integer(&coords[2])?, + ]); + } + Ok(Self::Fixed(positions)) + } + "minecraft:randomly_selected" => { + let values: Vec<Box<RawValue>> = + serde_json::from_str(required(&object, "placements")?.get())?; + if values.is_empty() || values.len() > 8192 { + return Err(DecodeError::Field("selected placements")); + } + Ok(Self::RandomlySelected( + values + .iter() + .map(|v| Self::decode_with_blocks(v.get(), depth + 1, remaining, blocks)) + .collect::<Result<_, _>>()?, + )) + } + _ => Err(DecodeError::Field("placement modifier type")), + } + } + /// Return the count for repeating modifiers without allocating or emitting + /// positions. Sampling still consumes the count provider's random draws. + pub fn repetitions( + &self, + random: &mut impl RandomSource, + position: [i32; 3], + ) -> Result<Option<i32>, InvalidBound> { + let [x, _, z] = position; + Ok(match self { + Self::Count(provider) => Some(provider.sample(random)?), + Self::NoiseBasedCount { + ratio, + factor, + offset, + } => { + let noise = f64::from(biome_info_noise( + f64::from(x) / factor, + f64::from(z) / factor, + )); + Some(((noise + offset) * f64::from(*ratio)).ceil() as i32) + } + Self::NoiseThresholdCount { + level, + below, + above, + } => { + let noise = f64::from(biome_info_noise(f64::from(x) / 200., f64::from(z) / 200.)); + Some(if noise < *level { *below } else { *above }) + } + _ => None, + }) + } + /// Emit positions in native callback order. The callback shares the random + /// stream; failures retain prior emissions and consumed draws. + pub fn modify<R: RandomSource, E>( + &self, + mut context: WorldGenerationContext, + random: &mut R, + position: [i32; 3], + emit: impl FnMut(&mut R, [i32; 3]) -> Result<(), E>, + ) -> Result<(), PlacementError<E>> { + self.modify_in(&mut context, random, position, emit) + } + pub fn modify_in<R: RandomSource, E>( + &self, + context: &mut impl PlacementContext, + random: &mut R, + position: [i32; 3], + mut emit: impl FnMut(&mut R, [i32; 3]) -> Result<(), E>, + ) -> Result<(), PlacementError<E>> { + self.modify_inner(context, random, position, &mut emit, &mut 65536) + } + fn modify_inner<R: RandomSource, E>( + &self, + context: &mut impl PlacementContext, + random: &mut R, + position: [i32; 3], + emit: &mut impl FnMut(&mut R, [i32; 3]) -> Result<(), E>, + remaining: &mut usize, + ) -> Result<(), PlacementError<E>> { + if *remaining == 0 { + return Err(PlacementError::WorkLimit); + } + *remaining -= 1; + let [x, y, z] = position; + match self { + Self::Biome => { + let feature = context + .top_feature() + .ok_or(PlacementQueryError::Unavailable)?; + if context.biome_allows_feature(position, feature)? { + emit(random, position).map_err(PlacementError::Output)?; + } + } + Self::BlockPredicate(predicate) => { + if predicate.test_inner(context, position, 0, remaining)? { + emit(random, position).map_err(PlacementError::Output)?; + } + } + Self::EnvironmentScan { + upwards, + target, + allowed, + max_steps, + } => { + let mut position = position; + if !allowed.test_inner(context, position, 0, remaining)? { + return Ok(()); + } + for _ in 0..*max_steps { + if target.test_inner(context, position, 0, remaining)? { + return emit(random, position).map_err(PlacementError::Output); + } + position[1] = position[1].wrapping_add(if *upwards { 1 } else { -1 }); + if context.outside_build_height(position[1])? { + return Ok(()); + } + if !allowed.test_inner(context, position, 0, remaining)? { + break; + } + } + if target.test_inner(context, position, 0, remaining)? { + emit(random, position).map_err(PlacementError::Output)?; + } + } + Self::CountOnEveryLayer(count) => { + layer::modify(count, context, random, position, emit, remaining)? + } + Self::Heightmap(kind) => { + let height = context.height(*kind, x, z)?; + if height > context.min_y()? { + emit(random, [x, height, z]).map_err(PlacementError::Output)?; + } + } + Self::SurfaceRelative { + heightmap, + min, + max, + } => { + let height = i64::from(context.height(*heightmap, x, z)?); + if height + i64::from(*min) <= i64::from(y) + && i64::from(y) <= height + i64::from(*max) + { + emit(random, position).map_err(PlacementError::Output)?; + } + } + Self::SurfaceWaterDepth(max) => { + let floor = context.height(HeightmapType::OceanFloor, x, z)?; + let surface = context.height(HeightmapType::WorldSurface, x, z)?; + if surface.wrapping_sub(floor) <= *max { + emit(random, position).map_err(PlacementError::Output)?; + } + } + Self::Count(_) | Self::NoiseBasedCount { .. } | Self::NoiseThresholdCount { .. } => { + let count = self + .repetitions(random, position)? + .expect("repeating modifier"); + if count > 4096 { + return Err(PlacementError::WorkLimit); + } + for _ in 0..count { + emit(random, position).map_err(PlacementError::Output)?; + } + } + Self::Cuboid { + xz_size, + y_size, + include_edges, + include_interior, + } => { + let ny = y_size.sample(random)?; + let nx = xz_size.sample(random)?; + let nz = xz_size.sample(random)?; + if nx < 0 || ny < 0 || nz < 0 { + return Ok(()); + } + for dx in 0..=nx { + for dy in 0..=ny { + for dz in 0..=nz { + if *remaining == 0 { + return Err(PlacementError::WorkLimit); + } + *remaining -= 1; + let bx = dx == 0 || dx == nx; + let by = dy == 0 || dy == ny; + let bz = dz == 0 || dz == nz; + if !include_edges && (u8::from(bx) + u8::from(by) + u8::from(bz)) >= 2 { + continue; + } + if !include_interior && !(bx || by || bz) { + continue; + } + emit( + random, + [x.wrapping_add(dx), y.wrapping_add(dy), z.wrapping_add(dz)], + ) + .map_err(PlacementError::Output)?; + } + } + } + } + Self::InSquare => { + let x = x.wrapping_add(random.next_int_bound(16)?); + let z = z.wrapping_add(random.next_int_bound(16)?); + emit(random, [x, y, z]).map_err(PlacementError::Output)?; + } + Self::Offset(offsets) => { + let x = x.wrapping_add(offsets[0].sample(random)?); + let y = y.wrapping_add(offsets[1].sample(random)?); + let z = z.wrapping_add(offsets[2].sample(random)?); + emit(random, [x, y, z]).map_err(PlacementError::Output)?; + } + Self::HeightRange(height) => { + let y = height.sample(random, context.generation())?; + emit(random, [x, y, z]).map_err(PlacementError::Output)?; + } + Self::Rarity(chance) => { + if random.next_float() < 1. / *chance as f32 { + emit(random, position).map_err(PlacementError::Output)?; + } + } + Self::RandomChance(chance) => { + if random.next_float() < *chance { + emit(random, position).map_err(PlacementError::Output)?; + } + } + Self::Fixed(positions) => { + if positions.len() > 8192 { + return Err(PlacementError::WorkLimit); + } + for p in positions { + if p[0] >> 4 == x >> 4 && p[2] >> 4 == z >> 4 { + emit(random, *p).map_err(PlacementError::Output)?; + } + } + } + Self::RandomlySelected(placements) => { + if placements.len() > 8192 { + return Err(PlacementError::WorkLimit); + } + let index = random.next_int_bound(placements.len() as i32)? as usize; + placements[index].modify_inner(context, random, position, emit, remaining)?; + } + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/worldgen/placement/chain.rs b/crates/horizon-world/src/worldgen/placement/chain.rs new file mode 100644 index 000000000..63d526256 --- /dev/null +++ b/crates/horizon-world/src/worldgen/placement/chain.rs @@ -0,0 +1,270 @@ +//! Ordered modifier-chain execution with reusable native-style pending buffers. +use super::{PlacementContext, PlacementError, PlacementModifier, PlacementQueryError}; +use crate::worldgen::anchor::WorldGenerationContext; +use crate::{heightmap::HeightmapType, worldgen::feature_sort::FeatureIdentity}; +use horizon_core::random::{InvalidBound, RandomSource}; +use std::cell::Cell; + +struct Queries<'a, C> { + world: &'a mut C, + top: Option<FeatureIdentity>, +} +impl<C: PlacementContext> PlacementContext for Queries<'_, C> { + fn block_survives( + &mut self, + state: crate::registry::BlockStateId, + position: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + self.world.block_survives(state, position) + } + fn face_sturdy( + &mut self, + position: [i32; 3], + direction: horizon_core::geometry::Direction, + ) -> Result<bool, PlacementQueryError> { + self.world.face_sturdy(position, direction) + } + fn unobstructed_block(&mut self, position: [i32; 3]) -> Result<bool, PlacementQueryError> { + self.world.unobstructed_block(position) + } + fn biome_identity( + &mut self, + position: [i32; 3], + ) -> Result<crate::worldgen::biome::BiomeId, PlacementQueryError> { + self.world.biome_identity(position) + } + fn top_feature(&self) -> Option<FeatureIdentity> { + self.top + } + fn biome_allows_feature( + &mut self, + p: [i32; 3], + feature: FeatureIdentity, + ) -> Result<bool, PlacementQueryError> { + self.world.biome_allows_feature(p, feature) + } + fn generation(&self) -> WorldGenerationContext { + self.world.generation() + } + fn predicate_generation(&mut self) -> Result<WorldGenerationContext, PlacementQueryError> { + self.world.predicate_generation() + } + fn block_state( + &mut self, + position: [i32; 3], + ) -> Result<crate::registry::BlockStateId, PlacementQueryError> { + self.world.block_state(position) + } + fn block_matches_tag( + &mut self, + position: [i32; 3], + tag: &str, + ) -> Result<bool, PlacementQueryError> { + self.world.block_matches_tag(position, tag) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + self.world.min_y() + } + fn max_y(&mut self) -> Result<i32, PlacementQueryError> { + self.world.max_y() + } + fn height(&mut self, kind: HeightmapType, x: i32, z: i32) -> Result<i32, PlacementQueryError> { + self.world.height(kind, x, z) + } + fn layer_block(&mut self, p: [i32; 3]) -> Result<super::LayerBlock, PlacementQueryError> { + self.world.layer_block(p) + } + fn inside_build_height(&mut self, p: [i32; 3]) -> Result<bool, PlacementQueryError> { + self.world.inside_build_height(p) + } + fn outside_build_height(&mut self, y: i32) -> Result<bool, PlacementQueryError> { + self.world.outside_build_height(y) + } +} + +#[derive(Debug)] +pub enum FeaturePlacementError<E> { + Random(InvalidBound), + World(PlacementQueryError), + Feature(E), + WorkLimit, + InvalidPendingIndex, +} +impl<E: std::fmt::Display> std::fmt::Display for FeaturePlacementError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Random(e) => e.fmt(f), + Self::World(e) => e.fmt(f), + Self::Feature(e) => e.fmt(f), + Self::WorkLimit => f.write_str("feature placement work limit exceeded"), + Self::InvalidPendingIndex => { + f.write_str("pending modifier index is outside the current chain") + } + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for FeaturePlacementError<E> {} + +/// Processes one modifier completely before running its descendants. Siblings +/// retain emitted order. The reusable buffers also retain partial state after +/// errors, like vanilla; a fresh placer starts without that state. +#[derive(Default, Debug)] +pub struct FeaturePlacer { + pending: Vec<([i32; 3], usize)>, + modified: Vec<[i32; 3]>, +} +impl FeaturePlacer { + pub fn new() -> Self { + Self::default() + } + pub fn place<R: RandomSource, E>( + &mut self, + modifiers: &[PlacementModifier], + mut context: WorldGenerationContext, + random: &mut R, + origin: [i32; 3], + feature: impl FnMut(&mut R, [i32; 3]) -> Result<bool, E>, + ) -> Result<bool, FeaturePlacementError<E>> { + self.place_in(modifiers, &mut context, random, origin, feature) + } + pub fn place_in<R: RandomSource, E>( + &mut self, + modifiers: &[PlacementModifier], + context: &mut impl PlacementContext, + random: &mut R, + origin: [i32; 3], + mut feature: impl FnMut(&mut R, [i32; 3]) -> Result<bool, E>, + ) -> Result<bool, FeaturePlacementError<E>> { + self.place_with_context(modifiers, context, random, origin, |_, random, position| { + feature(random, position) + }) + } + /// Shares the mutable world and random stream between modifier queries and + /// feature writes. Later siblings observe earlier feature mutations. + pub fn place_with_context<C: PlacementContext, R: RandomSource, E>( + &mut self, + modifiers: &[PlacementModifier], + context: &mut C, + random: &mut R, + origin: [i32; 3], + feature: impl FnMut(&mut C, &mut R, [i32; 3]) -> Result<bool, E>, + ) -> Result<bool, FeaturePlacementError<E>> { + self.place_with_budget( + modifiers, + context, + random, + origin, + &Cell::new(1 << 20), + feature, + ) + } + /// Set the root placed feature only for this invocation's modifier queries. + /// Nested feature callbacks receive the original world, so their own plain + /// placers do not inherit this root's biome-check context. + pub fn place_with_biome_check<C: PlacementContext, R: RandomSource, E>( + &mut self, + modifiers: &[PlacementModifier], + context: &mut C, + random: &mut R, + origin: [i32; 3], + top_feature: FeatureIdentity, + feature: impl FnMut(&mut C, &mut R, [i32; 3]) -> Result<bool, E>, + ) -> Result<bool, FeaturePlacementError<E>> { + self.place_control( + modifiers, + context, + random, + origin, + (&Cell::new(1 << 20), Some(top_feature)), + feature, + ) + } + pub(crate) fn place_with_budget<C: PlacementContext, R: RandomSource, E>( + &mut self, + modifiers: &[PlacementModifier], + context: &mut C, + random: &mut R, + origin: [i32; 3], + remaining: &Cell<usize>, + feature: impl FnMut(&mut C, &mut R, [i32; 3]) -> Result<bool, E>, + ) -> Result<bool, FeaturePlacementError<E>> { + self.place_control( + modifiers, + context, + random, + origin, + (remaining, None), + feature, + ) + } + fn place_control<C: PlacementContext, R: RandomSource, E>( + &mut self, + modifiers: &[PlacementModifier], + context: &mut C, + random: &mut R, + origin: [i32; 3], + control: (&Cell<usize>, Option<FeatureIdentity>), + mut feature: impl FnMut(&mut C, &mut R, [i32; 3]) -> Result<bool, E>, + ) -> Result<bool, FeaturePlacementError<E>> { + let (remaining, top) = control; + const LIMIT: usize = 1 << 20; + if modifiers.len() > 1024 || self.pending.len() >= LIMIT { + return Err(FeaturePlacementError::WorkLimit); + } + if modifiers.is_empty() { + return feature(context, random, origin).map_err(FeaturePlacementError::Feature); + } + self.pending.push((origin, 0)); + let mut any = false; + while let Some((position, index)) = self.pending.pop() { + if remaining.get() == 0 { + return Err(FeaturePlacementError::WorkLimit); + } + remaining.set(remaining.get() - 1); + let modifier = modifiers + .get(index) + .ok_or(FeaturePlacementError::InvalidPendingIndex)?; + modifier + .modify_in( + &mut Queries { + world: context, + top, + }, + random, + position, + |_, p| { + if self.modified.len() >= LIMIT { + return Err(()); + } + self.modified.push(p); + Ok(()) + }, + ) + .map_err(|e| match e { + PlacementError::Random(e) => FeaturePlacementError::Random(e), + PlacementError::World(e) => FeaturePlacementError::World(e), + PlacementError::Output(()) | PlacementError::WorkLimit => { + FeaturePlacementError::WorkLimit + } + })?; + let next = index + 1; + if next < modifiers.len() { + if self.pending.len() + self.modified.len() > LIMIT { + return Err(FeaturePlacementError::WorkLimit); + } + self.pending + .extend(self.modified.iter().rev().map(|p| (*p, next))); + } else { + for p in &self.modified { + if remaining.get() == 0 { + return Err(FeaturePlacementError::WorkLimit); + } + remaining.set(remaining.get() - 1); + any |= feature(context, random, *p).map_err(FeaturePlacementError::Feature)?; + } + } + self.modified.clear(); + } + Ok(any) + } +} diff --git a/crates/horizon-world/src/worldgen/placement/context.rs b/crates/horizon-world/src/worldgen/placement/context.rs new file mode 100644 index 000000000..227d890f1 --- /dev/null +++ b/crates/horizon-world/src/worldgen/placement/context.rs @@ -0,0 +1,335 @@ +//! Query interface for placement against a generated world. +use crate::worldgen::feature_sort::FeatureIdentity; +use crate::{heightmap::HeightmapType, worldgen::anchor::WorldGenerationContext}; +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum PlacementQueryError { + Unavailable, + WorkLimit, + Failed(String), +} +impl std::fmt::Display for PlacementQueryError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::WorkLimit => f.write_str("predicate work limit exceeded"), + Self::Unavailable => f.write_str("placement world query is unavailable"), + Self::Failed(message) => f.write_str(message), + } + } +} +impl std::error::Error for PlacementQueryError {} +/// Classification for layered placement: air states and exact WATER/LAVA blocks +/// are empty; exact BEDROCK is excluded from ground; every other block is ground. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum LayerBlock { + Empty, + Bedrock, + Ground, +} +pub trait PlacementContext { + /// StructureTemplate.updateShapeAtEdge for one outer face of a placed + /// voxel shape: update the state at `position` against its neighbor in + /// `direction`, then the neighbor against the (possibly new) state, writing + /// changes with `flags & !1`. Worlds without block shape-update behavior + /// accept this as a no-op. + fn update_shape_at_face( + &mut self, + _position: [i32; 3], + _direction: horizon_core::geometry::Direction, + _flags: i32, + ) -> Result<(), PlacementQueryError> { + Ok(()) + } + /// WorldGenRegion.ensureCanWrite: horizontal write radius and upgrade height. + fn ensure_can_write(&mut self, _position: [i32; 3]) -> Result<bool, PlacementQueryError> { + Ok(true) + } + /// BulkSectionAccess read: None outside the world's section range. + fn section_block( + &mut self, + position: [i32; 3], + ) -> Result<Option<crate::registry::BlockStateId>, PlacementQueryError> { + if self.outside_build_height(position[1])? { + return Ok(None); + } + self.block_state(position).map(Some) + } + /// Raw LevelChunkSection write: no heightmap, light, POI or neighbor effects. + fn set_section_block( + &mut self, + _position: [i32; 3], + _state: crate::registry::BlockStateId, + ) -> Result<(), PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + /// BlockState.isCollisionShapeFullBlock for an already-read state. + fn collision_full_block( + &mut self, + _state: crate::registry::BlockStateId, + _position: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + /// Add an End crystal entity (structure spawn) at an entity position. + fn spawn_end_crystal( + &mut self, + _position: [f64; 3], + _yaw: f32, + _beam_target: Option<[i32; 3]>, + _invulnerable: bool, + ) -> Result<(), PlacementQueryError> { + Ok(()) + } + /// WorldGenLevel.getSeed: the world seed for seed-derived feature noise. + fn world_seed(&mut self) -> Result<i64, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + /// Set the entity type of the spawner block entity at `position`, when one + /// exists. The caller has already drawn the native entity choice. + fn configure_spawner( + &mut self, + _position: [i32; 3], + _entity: &str, + ) -> Result<(), PlacementQueryError> { + Ok(()) + } + /// Store worldgen beehive occupants (ticks in hive per bee) in the nest + /// block entity at `position`. Worlds without block-entity storage drop them. + fn store_beehive_occupants( + &mut self, + _position: [i32; 3], + _ticks_in_hive: &[i32], + ) -> Result<(), PlacementQueryError> { + Ok(()) + } + /// Test the already-read state's collision shape in an empty entity context. + fn state_collision_empty( + &mut self, + _state: crate::registry::BlockStateId, + _position: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + /// Look up a randomizable container, then consume a loot seed only when one + /// exists. Missing or unrelated block entities are successful no-ops. + fn set_block_entity_loot_table( + &mut self, + _position: [i32; 3], + _table: &str, + _random: &mut impl horizon_core::random::RandomSource, + ) -> Result<(), PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + + /// Look up the block entity at this position and set its exit only if it is + /// an End gateway. Missing or other entities are successful no-ops. The + /// owning world applies the gateway's dirty notification after the update. + fn configure_end_gateway( + &mut self, + _position: [i32; 3], + _exit: [i32; 3], + _exact: bool, + ) -> Result<(), PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + + /// Use the previously resolved biome, retaining its temperature cache. + fn biome_should_freeze( + &mut self, + _biome: crate::worldgen::biome::BiomeId, + _position: [i32; 3], + _require_edge: bool, + ) -> Result<bool, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + fn biome_should_snow( + &mut self, + _biome: crate::worldgen::biome::BiomeId, + _position: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + + /// Block light only, independently of sky light and sky darkening. + fn block_brightness(&mut self, _position: [i32; 3]) -> Result<i32, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + fn fluid_state( + &mut self, + _position: [i32; 3], + ) -> Result<crate::fluid::FluidState, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + + /// Request destruction with no responsible entity. The world adapter owns + /// replacement, drops, block entities and updates; false is a rejected request. + fn destroy_block_without_entity( + &mut self, + _position: [i32; 3], + _drop_resources: bool, + ) -> Result<bool, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + + /// World sea level, independently of the generator's placement context. + fn sea_level(&mut self) -> Result<i32, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + fn schedule_fluid_tick( + &mut self, + _position: [i32; 3], + _fluid: crate::fluid::FluidKind, + _delay: i32, + ) -> Result<(), PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + /// Resolve the containing chunk and mark this position for postprocessing. + fn mark_postprocessing(&mut self, _position: [i32; 3]) -> Result<(), PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + /// Test the current fluid at this position against the world's water tag. + fn water_at(&mut self, _position: [i32; 3]) -> Result<bool, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + /// Multiface attachment: neighbor support, then empty-context collision. + fn attachment_at( + &mut self, + _position: [i32; 3], + _direction: horizon_core::geometry::Direction, + ) -> Result<bool, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + /// Draw from the world's random stream, independently of the feature RNG. + fn next_world_boolean(&mut self) -> Result<bool, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + fn next_world_float(&mut self) -> Result<f32, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + fn next_world_int(&mut self, _bound: i32) -> Result<i32, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + /// Schedule the block type identified by its registry default state. + fn schedule_block_tick( + &mut self, + _position: [i32; 3], + _block: crate::registry::BlockStateId, + _delay: i32, + ) -> Result<(), PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + + /// Evaluate this candidate state's survival without placing it. + fn block_survives( + &mut self, + _state: crate::registry::BlockStateId, + _position: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + /// Evaluate FULL support using an already-read state, without reading it again. + fn state_face_sturdy( + &mut self, + _state: crate::registry::BlockStateId, + _position: [i32; 3], + _direction: horizon_core::geometry::Direction, + ) -> Result<bool, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + /// Read the block state and evaluate FULL support on the requested face. + fn face_sturdy( + &mut self, + _position: [i32; 3], + _direction: horizon_core::geometry::Direction, + ) -> Result<bool, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + /// Block.canSupportCenter: CENTER support on the requested face. + fn center_sturdy( + &mut self, + _position: [i32; 3], + _direction: horizon_core::geometry::Direction, + ) -> Result<bool, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + /// Test entity obstruction of a unit-block shape with no excluded entity. + fn unobstructed_block(&mut self, _position: [i32; 3]) -> Result<bool, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + fn biome_identity( + &mut self, + _position: [i32; 3], + ) -> Result<crate::worldgen::biome::BiomeId, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + fn top_feature(&self) -> Option<FeatureIdentity> { + None + } + /// Resolve the biome at this position and test its generation settings for + /// the supplied placed feature. Registry equality/ownership belongs here. + fn biome_allows_feature( + &mut self, + _position: [i32; 3], + _feature: FeatureIdentity, + ) -> Result<bool, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + fn block_state( + &mut self, + _position: [i32; 3], + ) -> Result<crate::registry::BlockStateId, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + /// Read the state at the requested position and test its block-tag identity. + fn block_matches_tag( + &mut self, + _position: [i32; 3], + _tag: &str, + ) -> Result<bool, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + fn max_y(&mut self) -> Result<i32, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + fn inside_build_height(&mut self, position: [i32; 3]) -> Result<bool, PlacementQueryError> { + Ok(position[1] >= self.min_y()? && position[1] <= self.max_y()?) + } + fn outside_build_height(&mut self, y: i32) -> Result<bool, PlacementQueryError> { + Ok(y < self.min_y()? || y > self.max_y()?) + } + fn layer_block(&mut self, _position: [i32; 3]) -> Result<LayerBlock, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } + /// Store block-entity data loaded at a just-placed block (structure + /// templates). Worlds without block-entity storage drop it. + fn set_block_entity( + &mut self, + _position: [i32; 3], + _nbt: crate::nbt::Compound, + ) -> Result<(), PlacementQueryError> { + Ok(()) + } + fn generation(&self) -> WorldGenerationContext; + /// Recreate the generation bounds for a block-predicate invocation. World + /// adapters may perform fallible level/generator queries here; ordinary + /// placement retains its already-created immutable generation context. + fn predicate_generation(&mut self) -> Result<WorldGenerationContext, PlacementQueryError> { + Ok(self.generation()) + } + /// World minimum, which can differ from the generator's minimum. + fn min_y(&mut self) -> Result<i32, PlacementQueryError>; + fn height(&mut self, kind: HeightmapType, x: i32, z: i32) -> Result<i32, PlacementQueryError>; +} +impl PlacementContext for WorldGenerationContext { + fn max_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(self.min_y.wrapping_add(self.height).wrapping_sub(1)) + } + fn generation(&self) -> WorldGenerationContext { + *self + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(self.min_y) + } + fn height(&mut self, _: HeightmapType, _: i32, _: i32) -> Result<i32, PlacementQueryError> { + Err(PlacementQueryError::Unavailable) + } +} diff --git a/crates/horizon-world/src/worldgen/placement/layer.rs b/crates/horizon-world/src/worldgen/placement/layer.rs new file mode 100644 index 000000000..ac794bc55 --- /dev/null +++ b/crates/horizon-world/src/worldgen/placement/layer.rs @@ -0,0 +1,68 @@ +//! Layer scanning and its interleaved count-provider sampling. +use super::{LayerBlock, PlacementContext, PlacementError}; +use crate::{heightmap::HeightmapType, worldgen::value_provider::IntProvider}; +use horizon_core::random::RandomSource; + +pub(super) fn modify<R: RandomSource, E>( + count: &IntProvider, + context: &mut impl PlacementContext, + random: &mut R, + position: [i32; 3], + emit: &mut impl FnMut(&mut R, [i32; 3]) -> Result<(), E>, + remaining: &mut usize, +) -> Result<(), PlacementError<E>> { + let mut layer = 0_i32; + loop { + let mut found = false; + let mut attempt = 0_i32; + loop { + take(remaining)?; + // Native samples on every loop condition, including the final check. + if attempt >= count.sample(random)? { + break; + } + let x = position[0].wrapping_add(random.next_int_bound(16)?); + let z = position[2].wrapping_add(random.next_int_bound(16)?); + let y = context.height(HeightmapType::MotionBlocking, x, z)?; + if let Some(y) = ground(context, [x, y, z], layer, remaining)? { + emit(random, [x, y, z]).map_err(PlacementError::Output)?; + found = true; + } + attempt = attempt.wrapping_add(1); + } + layer = layer.wrapping_add(1); + if !found { + return Ok(()); + } + } +} +fn ground<E>( + context: &mut impl PlacementContext, + position: [i32; 3], + layer: i32, + remaining: &mut usize, +) -> Result<Option<i32>, PlacementError<E>> { + let [x, mut y, z] = position; + let mut above = context.layer_block(position)?; + let mut found = 0_i32; + while y >= context.min_y()?.wrapping_add(1) { + take(remaining)?; + let below = context.layer_block([x, y.wrapping_sub(1), z])?; + if below == LayerBlock::Ground && above == LayerBlock::Empty { + if found == layer { + return Ok((y != i32::MAX).then_some(y)); + } + found = found.wrapping_add(1); + } + above = below; + y = y.wrapping_sub(1); + } + Ok(None) +} +fn take<E>(remaining: &mut usize) -> Result<(), PlacementError<E>> { + if *remaining == 0 { + return Err(PlacementError::WorkLimit); + } + *remaining -= 1; + Ok(()) +} diff --git a/crates/horizon-world/src/worldgen/projected.rs b/crates/horizon-world/src/worldgen/projected.rs new file mode 100644 index 000000000..63be87cfb --- /dev/null +++ b/crates/horizon-world/src/worldgen/projected.rs @@ -0,0 +1,277 @@ +//! 26.3 projection-style features: `minecraft:projected_random_patchy_square` +//! and `minecraft:stepped_column_cluster` (basalt columns). +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + block_predicate::BlockPredicate, + feature::FeatureWorld, + feature_graph::FeatureExecutionError, + int_range, + placement::{PlacementContext, PlacementQueryError}, + required, + state_provider::BlockStateProvider, + tree::{TreeDecoder, TreeResult, kind, read, sample_optional, sample_state, write}, + tree_blocks::{self as tb, TreeBlocks}, + value_provider::IntProvider, +}; +use crate::registry::BlockStateId; +use horizon_core::random::RandomSource; +use std::{collections::BTreeSet, sync::Arc}; + +fn query<E>(error: PlacementQueryError) -> FeatureExecutionError<E> { + FeatureExecutionError::Query(error) +} +fn predicate( + object: &Object, + name: &'static str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, +) -> Result<BlockPredicate, DecodeError> { + BlockPredicate::decode_with_blocks( + required(object, name)?.get(), + depth + 1, + remaining, + Some(bindings), + ) +} + +#[derive(Clone, Debug)] +pub struct ProjectedPatchySquareFeature { + block: BlockStateProvider, + project_through: BlockPredicate, + size: IntProvider, + max_projection_height: i32, +} +impl ProjectedPatchySquareFeature { + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + if kind(&object)? != "minecraft:projected_random_patchy_square" { + return Err(DecodeError::Field("projected patchy square type")); + } + let mut decoder = TreeDecoder { + bindings, + depth, + remaining, + }; + let block = decoder.provider(required(&object, "block")?)?; + let size = decoder.int_provider(required(&object, "size")?, 1, 16)?; + Ok(Self { + block, + size, + project_through: predicate(&object, "project_through", bindings, depth, remaining)?, + max_projection_height: int_range( + required(&object, "max_projection_height")?, + "max_projection_height", + 0, + i32::MAX, + )?, + }) + } + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let size = self.size.sample(random)?; + let bound = size.wrapping_mul(size).wrapping_add(1); + for dx in -size..=size { + for dz in -size..=size { + let probability = dx.abs().wrapping_mul(dz.abs()); + if random.next_int_bound(bound)? < bound.wrapping_sub(probability) { + let mut base = tb::offset(origin, dx, 0, dz); + let mut drop = self.max_projection_height; + while self + .project_through + .test(world, tb::offset(base, 0, -1, 0)) + .map_err(query)? + { + base = tb::offset(base, 0, -1, 0); + drop -= 1; + if drop <= 0 { + break; + } + } + if let Some(state) = sample_optional(&self.block, world, random, base)? { + write(world, base, state, 2)?; + } + } + } + } + Ok(true) + } +} + +#[derive(Clone, Debug)] +pub struct SteppedColumnClusterFeature { + block: BlockStateProvider, + continue_through: BlockPredicate, + can_replace: BlockPredicate, + cannot_place_on: Arc<BTreeSet<BlockStateId>>, + cluster_reach: IntProvider, + column_count: IntProvider, + column_reach: IntProvider, + height: IntProvider, + blocks: Arc<TreeBlocks>, +} +impl SteppedColumnClusterFeature { + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + if kind(&object)? != "minecraft:stepped_column_cluster" { + return Err(DecodeError::Field("stepped column cluster type")); + } + let blocks = bindings.tree_blocks()?; + let mut decoder = TreeDecoder { + bindings, + depth, + remaining, + }; + let block = decoder.provider(required(&object, "block")?)?; + let cannot_place_on = decoder.block_set(required(&object, "cannot_place_on")?)?; + let cluster_reach = decoder.int_provider(required(&object, "cluster_reach")?, 0, 13)?; + let column_count = decoder.int_provider(required(&object, "column_count")?, 1, 150)?; + let column_reach = decoder.int_provider(required(&object, "column_reach")?, 0, 3)?; + let height = decoder.int_provider(required(&object, "height")?, 1, 10)?; + Ok(Self { + block, + continue_through: predicate(&object, "continue_through", bindings, depth, remaining)?, + can_replace: predicate(&object, "can_replace", bindings, depth, remaining)?, + cannot_place_on, + cluster_reach, + column_count, + column_reach, + height, + blocks, + }) + } + fn can_place_at<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + p: [i32; 3], + ) -> TreeResult<bool, W::Error> { + if !self.can_replace.test(world, p).map_err(query)? { + return Ok(false); + } + let below = read(world, tb::offset(p, 0, -1, 0))?; + Ok(!self.blocks.is_air(below) && !self.cannot_place_on.contains(&below)) + } + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + ) -> TreeResult<bool, W::Error> { + if !self.can_place_at(world, origin)? { + return Ok(false); + } + let column_height = self.height.sample(random)?; + let reach = column_height.min(self.cluster_reach.sample(random)?); + let count = self.column_count.sample(random)?; + let width = reach.wrapping_mul(2).wrapping_add(1); + let mut placed = false; + for _ in 0..count { + let x = origin[0] + .wrapping_sub(reach) + .wrapping_add(random.next_int_bound(width)?); + let y = origin[1].wrapping_add(random.next_int_bound(1)?); + let z = origin[2] + .wrapping_sub(reach) + .wrapping_add(random.next_int_bound(width)?); + let pos = [x, y, z]; + let blocks_y = column_height - tb::dist_manhattan(pos, origin); + if blocks_y >= 0 { + let column_reach = self.column_reach.sample(random)?; + placed |= self.place_column(world, random, pos, blocks_y, column_reach)?; + } + } + Ok(placed) + } + fn place_column<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + column_height: i32, + reach: i32, + ) -> TreeResult<bool, W::Error> { + let mut placed = false; + // BlockPos.betweenClosed over a single layer: x fastest, then z. + for dz in -reach..=reach { + for dx in -reach..=reach { + let pos = tb::offset(origin, dx, 0, dz); + let step_limit = tb::dist_manhattan(pos, origin); + let column = if self.can_replace.test(world, pos).map_err(query)? { + self.find_surface(world, pos, step_limit)? + } else { + self.find_air(world, pos, step_limit)? + }; + let Some(mut cursor) = column else { + continue; + }; + let mut blocks_y = column_height - step_limit / 2; + while blocks_y >= 0 { + if self.can_replace.test(world, cursor).map_err(query)? { + let state = sample_state(&self.block, world, random, cursor)?; + write(world, cursor, state, 3)?; + cursor = tb::offset(cursor, 0, 1, 0); + placed = true; + } else { + if !self.continue_through.test(world, cursor).map_err(query)? { + break; + } + cursor = tb::offset(cursor, 0, 1, 0); + } + blocks_y -= 1; + } + } + } + Ok(placed) + } + fn find_surface<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + mut cursor: [i32; 3], + mut limit: i32, + ) -> TreeResult<Option<[i32; 3]>, W::Error> { + let min_y = world.min_y().map_err(query)?; + while cursor[1] > min_y.wrapping_add(1) && limit > 0 { + limit -= 1; + if self.can_place_at(world, cursor)? { + return Ok(Some(cursor)); + } + cursor = tb::offset(cursor, 0, -1, 0); + } + Ok(None) + } + fn find_air<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + mut cursor: [i32; 3], + mut limit: i32, + ) -> TreeResult<Option<[i32; 3]>, W::Error> { + let max_y = world.max_y().map_err(query)?; + while cursor[1] <= max_y && limit > 0 { + limit -= 1; + let state = read(world, cursor)?; + if self.cannot_place_on.contains(&state) { + return Ok(None); + } + if self.blocks.is_air(state) { + return Ok(Some(cursor)); + } + cursor = tb::offset(cursor, 0, 1, 0); + } + Ok(None) + } +} diff --git a/crates/horizon-world/src/worldgen/replace_blobs.rs b/crates/horizon-world/src/worldgen/replace_blobs.rs new file mode 100644 index 000000000..96fbd9198 --- /dev/null +++ b/crates/horizon-world/src/worldgen/replace_blobs.rs @@ -0,0 +1,170 @@ +//! Block-identity replacement in clipped Manhattan shells around a ground target. +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + feature::FeatureWorld, + placement::{PlacementContext, PlacementQueryError}, + required, + value_provider::IntProvider, +}; +use crate::registry::BlockStateId; +use horizon_core::random::{InvalidBound, RandomSource}; +use std::{collections::BTreeSet, sync::Arc}; +#[derive(Clone, Debug)] +pub struct ReplaceBlobsFeature { + targets: Arc<BTreeSet<BlockStateId>>, + state: BlockStateId, + radius: IntProvider, +} +#[derive(Debug)] +pub enum ReplaceBlobsError<E> { + World(E), + Query(PlacementQueryError), + Random(InvalidBound), + WorkLimit, +} +impl<E: std::fmt::Display> std::fmt::Display for ReplaceBlobsError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Query(e) => e.fmt(f), + Self::Random(e) => e.fmt(f), + Self::WorkLimit => f.write_str("replace blobs work limit exceeded"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for ReplaceBlobsError<E> {} +impl ReplaceBlobsFeature { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + Self::decode(json, bindings, 0, &mut 65536) + } + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + if depth > 128 || *remaining == 0 { + return Err(DecodeError::Field("replace blobs depth or work")); + } + *remaining -= 1; + let object: Object = serde_json::from_str(json)?; + let state = |name| { + required(&object, name).and_then(|v| { + bindings + .codec + .decode(v.get(), false) + .map_err(|e| DecodeError::Registry(e.to_string())) + }) + }; + let target = state("target")?; + let name = &bindings + .registry() + .state(target) + .ok_or(DecodeError::Field("replace blobs target"))? + .name; + let targets = bindings + .blocks + .get(name) + .cloned() + .ok_or(DecodeError::Field("replace blobs target block"))?; + let radius = IntProvider::decode(required(&object, "radius")?, depth + 1, remaining)?; + let [min, max] = radius.bounds(); + if min < 0 || max > 12 { + return Err(DecodeError::Field("replace blobs radius bounds")); + } + Ok(Self { + targets, + state: state("state")?, + radius, + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + mut origin: [i32; 3], + ) -> Result<bool, ReplaceBlobsError<W::Error>> { + let min = world + .min_y() + .map_err(ReplaceBlobsError::Query)? + .wrapping_add(1); + let max = world.max_y().map_err(ReplaceBlobsError::Query)?; + // Match Mth.clamp, including inverted world bounds. + origin[1] = origin[1].max(min).min(max); + let mut remaining = 1_048_576; + loop { + if origin[1] + <= world + .min_y() + .map_err(ReplaceBlobsError::Query)? + .wrapping_add(1) + { + return Ok(false); + } + if remaining == 0 { + return Err(ReplaceBlobsError::WorkLimit); + } + remaining -= 1; + if self + .targets + .contains(&world.block(origin).map_err(ReplaceBlobsError::World)?) + { + break; + } + origin[1] = origin[1].wrapping_sub(1); + } + let rx = self + .radius + .sample(random) + .map_err(ReplaceBlobsError::Random)?; + let ry = self + .radius + .sample(random) + .map_err(ReplaceBlobsError::Random)?; + let rz = self + .radius + .sample(random) + .map_err(ReplaceBlobsError::Random)?; + let mut any = false; + // Native order is depth, ascending X, ascending Y, positive Z then its + // mirror. The feature stops before the first shell beyond max radius. + for depth in 0..=rx.max(ry).max(rz) { + let max_x = rx.min(depth); + for x in -max_x..=max_x { + let max_y = ry.min(depth - x.abs()); + for y in -max_y..=max_y { + let z = depth - x.abs() - y.abs(); + if z > rz { + continue; + } + self.replace(world, offset(origin, [x, y, z]), &mut any)?; + if z != 0 { + self.replace(world, offset(origin, [x, y, -z]), &mut any)?; + } + } + } + } + Ok(any) + } + fn replace<W: FeatureWorld>( + &self, + world: &mut W, + p: [i32; 3], + any: &mut bool, + ) -> Result<(), ReplaceBlobsError<W::Error>> { + if self + .targets + .contains(&world.block(p).map_err(ReplaceBlobsError::World)?) + { + world + .set_block(p, self.state, 3) + .map_err(ReplaceBlobsError::World)?; + *any = true; + } + Ok(()) + } +} +fn offset(p: [i32; 3], d: [i32; 3]) -> [i32; 3] { + std::array::from_fn(|i| p[i].wrapping_add(d[i])) +} diff --git a/crates/horizon-world/src/worldgen/root_system.rs b/crates/horizon-world/src/worldgen/root_system.rs new file mode 100644 index 000000000..38a9362ea --- /dev/null +++ b/crates/horizon-world/src/worldgen/root_system.rs @@ -0,0 +1,230 @@ +//! `minecraft:root_system`: a nested tree on a rooted-dirt column with +//! hanging roots below. +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + block_predicate::BlockPredicate, + feature::FeatureWorld, + feature_graph::{FeatureExecutionError, PlacedFeatureDefinition}, + int_range, + placement::{PlacementContext, PlacementQueryError}, + required, + state_provider::BlockStateProvider, + tree::{TreeDecoder, TreeResult, kind, read, sample_state, write}, + tree_blocks::{self as tb, TreeBlocks}, + vegetation::{PlacedDecoder, PlacedPlacer}, +}; +use crate::registry::BlockStateId; +use horizon_core::{geometry::Direction, random::RandomSource}; +use std::{collections::BTreeSet, sync::Arc}; + +fn query<E>(error: PlacementQueryError) -> FeatureExecutionError<E> { + FeatureExecutionError::Query(error) +} + +#[derive(Clone, Debug)] +pub struct RootSystemFeature { + tree: Box<PlacedFeatureDefinition>, + required_vertical_space: i32, + level_test_distance: i32, + max_level_deviation: i32, + root_radius: i32, + root_replaceable: Arc<BTreeSet<BlockStateId>>, + root_provider: BlockStateProvider, + root_attempts: i32, + root_column_max_height: i32, + hanging_radius: i32, + hanging_span: i32, + hanging_provider: BlockStateProvider, + hanging_attempts: i32, + allowed_water: i32, + allowed_tree_position: BlockPredicate, + blocks: Arc<TreeBlocks>, +} +impl RootSystemFeature { + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + nested: &PlacedDecoder<'_>, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + if kind(&object)? != "minecraft:root_system" { + return Err(DecodeError::Field("root system type")); + } + let blocks = bindings.tree_blocks()?; + let tree = nested(required(&object, "feature")?.get(), depth + 1, remaining)?; + let mut decoder = TreeDecoder { + bindings, + depth, + remaining, + }; + let int = |name: &'static str, low: i32, high: i32| { + int_range(required(&object, name)?, name, low, high) + }; + Ok(Self { + tree: Box::new(tree), + required_vertical_space: int("required_vertical_space_for_tree", 1, 64)?, + level_test_distance: int("level_test_distance", 0, 16)?, + max_level_deviation: int("max_level_deviation", 0, 64)?, + root_radius: int("root_radius", 1, 64)?, + root_replaceable: decoder.block_set(required(&object, "root_replaceable")?)?, + root_provider: decoder.provider(required(&object, "root_state_provider")?)?, + root_attempts: int("root_placement_attempts", 1, 256)?, + root_column_max_height: int("root_column_max_height", 1, 4096)?, + hanging_radius: int("hanging_root_radius", 1, 64)?, + hanging_span: int("hanging_roots_vertical_span", 1, 16)?, + hanging_provider: decoder + .provider(required(&object, "hanging_root_state_provider")?)?, + hanging_attempts: int("hanging_root_placement_attempts", 1, 256)?, + allowed_water: int("allowed_vertical_water_for_tree", 1, 64)?, + allowed_tree_position: BlockPredicate::decode_with_blocks( + required(&object, "allowed_tree_position")?.get(), + depth + 1, + decoder.remaining, + Some(bindings), + )?, + blocks, + }) + } + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + nested: &mut PlacedPlacer<'_, W, R>, + ) -> TreeResult<bool, W::Error> { + if !self.blocks.is_air(read(world, origin)?) { + return Ok(false); + } + if self.dirt_and_tree(world, random, origin, nested)? { + self.hanging_roots(world, random, origin)?; + } + Ok(true) + } + fn space_for_tree<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + pos: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let mut column = pos; + for i in 1..=self.required_vertical_space { + column = tb::offset(column, 0, 1, 0); + let state = read(world, column)?; + let allowed = self.blocks.is_air(state) + || (i < self.allowed_water && self.blocks.has(state, tb::WATER_FLUID)); + if !allowed { + return Ok(false); + } + } + if self.level_test_distance > 0 { + // Direction.from2DDataValue: SOUTH, WEST, NORTH, EAST. + for direction in [ + Direction::South, + Direction::West, + Direction::North, + Direction::East, + ] { + let corner = tb::relative(pos, direction, self.level_test_distance); + let below = read(world, tb::offset(corner, 0, -self.max_level_deviation, 0))?; + let above = read(world, tb::offset(corner, 0, self.max_level_deviation, 0))?; + if self.blocks.is_air(below) || !self.blocks.is_air(above) { + return Ok(false); + } + } + } + Ok(true) + } + fn dirt_and_tree<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + nested: &mut PlacedPlacer<'_, W, R>, + ) -> TreeResult<bool, W::Error> { + let mut working = origin; + for y in 0..self.root_column_max_height { + working = tb::offset(working, 0, 1, 0); + let surface = world + .height( + crate::heightmap::HeightmapType::WorldSurface, + working[0], + working[2], + ) + .map_err(query)?; + if surface < working[1] { + return Ok(false); + } + if self + .allowed_tree_position + .test(world, working) + .map_err(query)? + && self.space_for_tree(world, working)? + { + let below_state = read(world, tb::offset(working, 0, -1, 0))?; + if self.blocks.has(below_state, tb::LAVA_FLUID) + || !self.blocks.has(below_state, tb::SOLID) + { + return Ok(false); + } + if nested(&self.tree, world, random, working)? { + let target = origin[1].wrapping_add(y); + let mut level = origin[1]; + while level < target { + self.rooted_dirt(world, random, [origin[0], level, origin[2]])?; + level += 1; + } + return Ok(true); + } + } + } + Ok(false) + } + fn rooted_dirt<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + column: [i32; 3], + ) -> TreeResult<(), W::Error> { + let r = self.root_radius; + for _ in 0..self.root_attempts { + let dx = random.next_int_bound(r)? - random.next_int_bound(r)?; + let dz = random.next_int_bound(r)? - random.next_int_bound(r)?; + let p = tb::offset(column, dx, 0, dz); + if self.root_replaceable.contains(&read(world, p)?) { + let state = sample_state(&self.root_provider, world, random, p)?; + write(world, p, state, 2)?; + } + } + Ok(()) + } + fn hanging_roots<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + ) -> TreeResult<(), W::Error> { + let (r, span) = (self.hanging_radius, self.hanging_span); + for _ in 0..self.hanging_attempts { + let dx = random.next_int_bound(r)? - random.next_int_bound(r)?; + let dy = random.next_int_bound(span)? - random.next_int_bound(span)?; + let dz = random.next_int_bound(r)? - random.next_int_bound(r)?; + let p = tb::offset(origin, dx, dy, dz); + if !self.blocks.is_air(read(world, p)?) { + continue; + } + let state = sample_state(&self.hanging_provider, world, random, p)?; + if world.block_survives(state, p).map_err(query)? { + let above = read(world, tb::offset(p, 0, 1, 0))?; + if world + .state_face_sturdy(above, p, Direction::Down) + .map_err(query)? + { + write(world, p, state, 2)?; + } + } + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/worldgen/router.rs b/crates/horizon-world/src/worldgen/router.rs new file mode 100644 index 000000000..aed50353d --- /dev/null +++ b/crates/horizon-world/src/worldgen/router.rs @@ -0,0 +1,168 @@ +//! The eight terrain-router fields used by Java Edition 26.3. +use super::{DecodeError, Object, climate::ClimateSampler, density::DensityRegistry, required}; +use horizon_core::density::{ + DensitySampler, + graph::{CompileError, DensityCompiler, FunctionId}, +}; +use std::sync::Arc; + +/// Declaration and compilation order: the six climate fields, surface, density. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(usize)] +pub enum RouterField { + Temperature, + Vegetation, + Continents, + Erosion, + Depth, + Ridges, + ChunkSurfaceLevel, + FinalDensity, +} +impl RouterField { + pub const ALL: [Self; 8] = [ + Self::Temperature, + Self::Vegetation, + Self::Continents, + Self::Erosion, + Self::Depth, + Self::Ridges, + Self::ChunkSurfaceLevel, + Self::FinalDensity, + ]; + pub const fn name(self) -> &'static str { + match self { + Self::Temperature => "temperature", + Self::Vegetation => "vegetation", + Self::Continents => "continents", + Self::Erosion => "erosion", + Self::Depth => "depth", + Self::Ridges => "ridges", + Self::ChunkSurfaceLevel => "chunk_surface_level", + Self::FinalDensity => "final_density", + } + } +} + +/// Root IDs belong to the registry graph used to decode this router. +#[derive(Clone, Copy, Debug)] +pub struct NoiseRouter { + functions: [FunctionId; 8], +} +impl NoiseRouter { + /// Decode the router object itself. Noise settings, aquifer and material + /// configuration are separate codecs and are not parsed by this method. + /// Missing/null fields or any invalid root leave the registry unchanged. + pub fn from_json(json: &str, registry: &mut DensityRegistry) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let inputs = RouterField::ALL + .iter() + .map(|field| required(&object, field.name()).map(|raw| raw.get())) + .collect::<Result<Vec<_>, _>>()?; + let functions = registry + .decode_functions(&inputs)? + .try_into() + .map_err(|_| DecodeError::Field("router field count"))?; + Ok(Self { functions }) + } + pub fn function(self, field: RouterField) -> FunctionId { + self.functions[field as usize] + } + /// One compiler owns the cache namespace for every router field. Existing + /// compiler samplers and cache IDs are reused rather than reset per root. + pub fn compile(self, compiler: &mut DensityCompiler) -> Result<RouterSamplers, CompileError> { + let samplers = self + .functions + .iter() + .map(|id| compiler.get_sampler(*id)) + .collect::<Result<Vec<_>, _>>()? + .try_into() + .expect("one sampler for each of eight router fields"); + Ok(RouterSamplers { samplers }) + } + /// Compile only the six climate roots, in vanilla's sampler-binding order. + pub fn compile_climate( + self, + compiler: &mut DensityCompiler, + ) -> Result<ClimateSampler, CompileError> { + let samplers = self.functions[..6] + .iter() + .map(|id| compiler.get_sampler(*id)) + .collect::<Result<Vec<_>, _>>()? + .try_into() + .expect("one sampler for each of six climate fields"); + Ok(ClimateSampler::new(samplers)) + } +} +#[derive(Debug)] +pub struct RouterSamplers { + samplers: [Arc<dyn DensitySampler>; 8], +} +impl RouterSamplers { + pub fn get(&self, field: RouterField) -> &Arc<dyn DensitySampler> { + &self.samplers[field as usize] + } + pub fn climate_sampler(&self) -> ClimateSampler { + ClimateSampler::new(std::array::from_fn(|i| self.samplers[i].clone())) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use horizon_core::density::SamplerContext; + use std::collections::BTreeMap; + + #[test] + fn roots_share_holder_cache_and_failed_router_leaves_graph_unchanged() { + let mut registry = DensityRegistry::from_json( + &BTreeMap::new(), + &BTreeMap::from([( + "minecraft:shared".into(), + r#"{"type":"cache","input":{"type":"gradient","axis":"x","from_coordinate":0,"to_coordinate":16,"from_value":-1,"to_value":1}}"#.into(), + )]), + ) + .unwrap(); + let object: BTreeMap<_, _> = RouterField::ALL + .iter() + .map(|field| (field.name(), "minecraft:shared")) + .collect(); + let json = serde_json::to_string(&object).unwrap(); + let expected = registry + .graph() + .clone() + .insert(horizon_core::density::graph::GraphNode::Constant(123.0)) + .unwrap(); + let invalid = json + .replace( + "\"temperature\":\"minecraft:shared\"", + "\"temperature\":123", + ) + .replace( + "\"final_density\":\"minecraft:shared\"", + "\"final_density\":{\"type\":\"missing\"}", + ); + assert!(NoiseRouter::from_json(&invalid, &mut registry).is_err()); + assert_eq!(registry.decode_functions(&["123"]).unwrap()[0], expected); + let router = NoiseRouter::from_json(&json, &mut registry).unwrap(); + for field in RouterField::ALL { + assert_eq!( + router.function(field), + registry.reference("minecraft:shared").unwrap() + ); + } + let mut compiler = DensityCompiler::new_seeded(registry.into_graph(), 0, false); + let samplers = router.compile(&mut compiler).unwrap(); + assert_eq!(compiler.cache_count(), 1); + let mut context = SamplerContext::cached(); + for field in RouterField::ALL { + assert_eq!( + samplers + .get(field) + .sample_value(&mut context, [4, 99, -32]) + .unwrap(), + -0.5 + ); + } + } +} diff --git a/crates/horizon-world/src/worldgen/rule_test.rs b/crates/horizon-world/src/worldgen/rule_test.rs new file mode 100644 index 000000000..d9f836961 --- /dev/null +++ b/crates/horizon-world/src/worldgen/rule_test.rs @@ -0,0 +1,133 @@ +//! Registry-bound replacement predicates with ordered short-circuit evaluation. +use super::{ + DecodeError, Object, block_feature::FeatureBlockBindings, density::identifier, integer, + number_text, required, +}; +use crate::registry::BlockStateId; +use horizon_core::random::RandomSource; +use serde_json::value::RawValue; +use std::{collections::BTreeSet, sync::Arc}; + +#[derive(Clone, Debug)] +pub struct RuleTest(Node); +#[derive(Clone, Debug)] +enum Node { + True, + Not(Box<RuleTest>), + All(Vec<RuleTest>), + Any(Vec<RuleTest>), + States(Arc<BTreeSet<BlockStateId>>), + State(BlockStateId), + RandomStates(Arc<BTreeSet<BlockStateId>>, f32), + RandomState(BlockStateId, f32), + Height(i32, i32), +} +impl RuleTest { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + Self::decode(json, bindings, 0, &mut 65536) + } + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + if depth > 128 || *remaining == 0 { + return Err(DecodeError::Field("replacement rule depth or node count")); + } + *remaining -= 1; + let object: Object = serde_json::from_str(json)?; + let name = |field| -> Result<String, DecodeError> { + identifier(&serde_json::from_str::<String>( + required(&object, field)?.get(), + )?) + }; + let state = || { + bindings + .codec + .decode(required(&object, "block_state")?.get(), false) + .map_err(|e| DecodeError::Registry(e.to_string())) + }; + let block = || { + let name = name("block")?; + bindings + .blocks + .get(&name) + .cloned() + .ok_or_else(|| DecodeError::Registry(format!("unknown block {name}"))) + }; + // These native codecs use unrestricted FLOAT, including out-of-range + // probabilities. Matching the state still consumes a draw at zero/one. + let probability = || { + number_text(required(&object, "probability")?)? + .parse::<f32>() + .map_err(|_| DecodeError::Field("probability")) + }; + let node = match name("predicate_type")?.as_str() { + "minecraft:always_true" => Node::True, + "minecraft:block_match" => Node::States(block()?), + "minecraft:blockstate_match" => Node::State(state()?), + "minecraft:tag_match" => Node::States( + bindings + .tags + .get(&super::tags::identifier(&serde_json::from_str::<String>( + required(&object, "tag")?.get(), + )?)?) + .cloned() + .unwrap_or_default(), + ), + "minecraft:random_block_match" => Node::RandomStates(block()?, probability()?), + "minecraft:random_blockstate_match" => Node::RandomState(state()?, probability()?), + "minecraft:height_match" => Node::Height( + integer(required(&object, "min_inclusive")?)?, + integer(required(&object, "max_inclusive")?)?, + ), + "minecraft:not" => Node::Not(Box::new(Self::decode( + required(&object, "rule")?.get(), + bindings, + depth + 1, + remaining, + )?)), + kind @ ("minecraft:all_of" | "minecraft:any_of") => { + let values: Vec<Box<RawValue>> = + serde_json::from_str(required(&object, "rules")?.get())?; + if values.len() > 8192 { + return Err(DecodeError::Field("replacement rule list")); + } + let values = values + .iter() + .map(|v| Self::decode(v.get(), bindings, depth + 1, remaining)) + .collect::<Result<_, _>>()?; + if kind == "minecraft:all_of" { + Node::All(values) + } else { + Node::Any(values) + } + } + _ => return Err(DecodeError::Field("replacement rule type")), + }; + Ok(Self(node)) + } + pub fn test( + &self, + state: BlockStateId, + position: [i32; 3], + random: &mut impl RandomSource, + ) -> bool { + match &self.0 { + Node::True => true, + Node::Not(rule) => !rule.test(state, position, random), + Node::All(rules) => rules.iter().all(|rule| rule.test(state, position, random)), + Node::Any(rules) => rules.iter().any(|rule| rule.test(state, position, random)), + Node::States(states) => states.contains(&state), + Node::State(expected) => state == *expected, + Node::RandomStates(states, probability) => { + states.contains(&state) && random.next_float() < *probability + } + Node::RandomState(expected, probability) => { + state == *expected && random.next_float() < *probability + } + Node::Height(min, max) => *min <= position[1] && position[1] <= *max, + } + } +} diff --git a/crates/horizon-world/src/worldgen/sculk.rs b/crates/horizon-world/src/worldgen/sculk.rs new file mode 100644 index 000000000..79cbfb4e0 --- /dev/null +++ b/crates/horizon-world/src/worldgen/sculk.rs @@ -0,0 +1,727 @@ +//! `minecraft:sculk_patch`: the world-generation SculkSpreader with sculk, +//! sculk vein and default charge-cursor behaviours. +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + feature::FeatureWorld, + feature_graph::FeatureExecutionError, + int_range, + placement::{PlacementContext, PlacementQueryError}, + required, + tree::{TreeResult, kind, read, write}, + tree_blocks::{self as tb, TreeBlocks}, +}; +use crate::registry::BlockStateId; +use horizon_core::{geometry::Direction, random::RandomSource}; +use std::{collections::BTreeSet, sync::Arc}; + +fn query<E>(error: PlacementQueryError) -> FeatureExecutionError<E> { + FeatureExecutionError::Query(error) +} + +// Worldgen spreader constants (SculkSpreader.createWorldGenSpreader). +const GROWTH_SPAWN_COST: i32 = 50; +const NO_GROWTH_RADIUS: i32 = 1; +const CHARGE_DECAY_RATE: i32 = 5; +const ADDITIONAL_DECAY_RATE: i32 = 10; +const MAX_CURSORS: usize = 32; + +#[derive(Clone, Copy, PartialEq, Eq)] +enum Behaviour { + Default, + Sculk, + Vein, +} +#[derive(Clone, Copy)] +enum Spread { + SamePosition, + SamePlane, + WrapAround, +} +const ALL_SPREADS: [Spread; 3] = [Spread::SamePosition, Spread::SamePlane, Spread::WrapAround]; + +struct Cursor { + pos: [i32; 3], + charge: i32, + update_delay: i32, + decay_delay: i32, + facings: Option<Vec<Direction>>, +} + +#[derive(Clone, Debug)] +pub struct SculkPatchFeature { + charge_count: i32, + amount_per_charge: i32, + spread_attempts: i32, + growth_rounds: i32, + spread_rounds: i32, + sculk: BlockStateId, + vein: BlockStateId, + shrieker: BlockStateId, + sensor: BlockStateId, + water: BlockStateId, + air: BlockStateId, + replaceable_world_gen: Arc<BTreeSet<BlockStateId>>, + replaceable: Arc<BTreeSet<BlockStateId>>, + inhibitors: Arc<BTreeSet<BlockStateId>>, + blocks: Arc<TreeBlocks>, +} +impl SculkPatchFeature { + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + if kind(&object)? != "minecraft:sculk_patch" { + return Err(DecodeError::Field("sculk patch type")); + } + let int = |name: &'static str, low: i32, high: i32| { + int_range(required(&object, name)?, name, low, high) + }; + let registry = bindings.registry(); + let default = |name: &str| { + registry + .default_state(name) + .ok_or_else(|| DecodeError::Registry(format!("missing sculk block {name}"))) + }; + let tag = |name: &str| -> Arc<BTreeSet<BlockStateId>> { + bindings.tags.get(name).cloned().unwrap_or_default() + }; + let blocks = bindings.tree_blocks()?; + let shrieker = blocks + .with(default("minecraft:sculk_shrieker")?, "can_summon", "true") + .ok_or(DecodeError::Field("sculk shrieker summon state"))?; + Ok(Self { + charge_count: int("charge_count", 1, 32)?, + amount_per_charge: int("amount_per_charge", 1, 500)?, + spread_attempts: int("spread_attempts", 1, 64)?, + growth_rounds: int("growth_rounds", 0, 8)?, + spread_rounds: int("spread_rounds", 0, 8)?, + sculk: default("minecraft:sculk")?, + vein: default("minecraft:sculk_vein")?, + shrieker, + sensor: default("minecraft:sculk_sensor")?, + water: default("minecraft:water")?, + air: default("minecraft:air")?, + replaceable_world_gen: tag("minecraft:sculk_replaceable_world_gen"), + replaceable: tag("minecraft:sculk_replaceable"), + inhibitors: tag("minecraft:sculk_growth_inhibitors"), + blocks, + }) + } + fn behaviour(&self, state: BlockStateId) -> Behaviour { + if self.blocks.same_block(state, self.sculk) { + Behaviour::Sculk + } else if self.blocks.same_block(state, self.vein) { + Behaviour::Vein + } else { + Behaviour::Default + } + } + fn has_face(&self, state: BlockStateId, face: Direction) -> bool { + self.blocks + .properties + .value(state, tb::direction_name(face)) + == Some("true") + } + fn is_vein(&self, state: BlockStateId) -> bool { + self.blocks.same_block(state, self.vein) + } + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + ) -> TreeResult<bool, W::Error> { + if !self.can_spread_from(world, origin)? { + return Ok(false); + } + let mut cursors: Vec<Cursor> = Vec::new(); + for round in 0..self.spread_rounds + self.growth_rounds { + for _ in 0..self.charge_count { + let mut charge = self.amount_per_charge; + while charge > 0 { + let current = charge.min(1000); + if cursors.len() < MAX_CURSORS { + cursors.push(Cursor { + pos: origin, + charge: current, + update_delay: 0, + decay_delay: 1, + facings: None, + }); + } + charge -= current; + } + } + let spread_veins = round < self.spread_rounds; + for _ in 0..self.spread_attempts { + cursors = self.update_cursors(world, random, origin, cursors, spread_veins)?; + } + cursors.clear(); + } + Ok(true) + } + fn can_spread_from<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + origin: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let start = read(world, origin)?; + if self.behaviour(start) != Behaviour::Default { + return Ok(true); + } + let water_source = + self.blocks.has(start, tb::WATER_BLOCK) && self.blocks.has(start, tb::FLUID_SOURCE); + if !self.blocks.is_air(start) && !water_source { + return Ok(false); + } + for direction in Direction::ALL { + let p = tb::relative(origin, direction, 1); + let state = read(world, p)?; + if world.collision_full_block(state, p).map_err(query)? { + return Ok(true); + } + } + Ok(false) + } + fn update_cursors<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + cursors: Vec<Cursor>, + spread_veins: bool, + ) -> TreeResult<Vec<Cursor>, W::Error> { + let mut processed: Vec<Cursor> = Vec::new(); + // Mergeable cursor charge per position (index into `processed`). + let mut mergeable: Vec<([i32; 3], usize, i32)> = Vec::new(); + for mut cursor in cursors { + let distance = (0..3) + .map(|i| cursor.pos[i].wrapping_sub(origin[i]).wrapping_abs()) + .max() + .unwrap_or(0); + if distance > 1024 { + continue; + } + self.update(world, random, origin, &mut cursor, spread_veins)?; + if cursor.charge <= 0 { + continue; + } + match mergeable.iter_mut().find(|(p, _, _)| *p == cursor.pos) { + None => { + mergeable.push((cursor.pos, processed.len(), cursor.charge)); + processed.push(cursor); + } + Some(entry) => { + // World generation never merges cursors. + if cursor.charge < entry.2 { + *entry = (cursor.pos, processed.len(), cursor.charge); + } + processed.push(cursor); + } + } + } + Ok(processed) + } + fn update<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + cursor: &mut Cursor, + spread_veins: bool, + ) -> TreeResult<(), W::Error> { + if cursor.charge <= 0 { + return Ok(()); + } + if cursor.update_delay > 0 { + cursor.update_delay -= 1; + return Ok(()); + } + let mut state = read(world, cursor.pos)?; + let mut behaviour = self.behaviour(state); + if spread_veins + && self.attempt_spread_vein( + world, + behaviour, + cursor.pos, + state, + cursor.facings.as_deref(), + )? + && behaviour != Behaviour::Sculk + { + state = read(world, cursor.pos)?; + behaviour = self.behaviour(state); + } + cursor.charge = + self.attempt_use_charge(world, random, origin, behaviour, cursor, spread_veins)?; + if cursor.charge <= 0 { + self.on_discharged(world, behaviour, state, cursor.pos)?; + return Ok(()); + } + match self.valid_movement(world, random, cursor.pos, origin)? { + Some(target) => { + self.on_discharged(world, behaviour, state, cursor.pos)?; + cursor.pos = target; + state = read(world, target)?; + } + None => { + self.on_discharged(world, behaviour, state, cursor.pos)?; + cursor.charge = 0; + return Ok(()); + } + } + if self.behaviour(state) != Behaviour::Default { + cursor.facings = Some( + Direction::ALL + .into_iter() + .filter(|d| self.has_face(state, *d)) + .collect(), + ); + } + cursor.decay_delay = match behaviour { + Behaviour::Default => (cursor.decay_delay - 1).max(0), + _ => 1, + }; + cursor.update_delay = 1; + Ok(()) + } + fn attempt_spread_vein<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + behaviour: Behaviour, + pos: [i32; 3], + state: BlockStateId, + facings: Option<&[Direction]>, + ) -> TreeResult<bool, W::Error> { + if behaviour == Behaviour::Default { + match facings { + None => { + let current = read(world, pos)?; + return Ok(self.spread_all(world, current, pos, &[Spread::SamePosition])? > 0); + } + Some(faces) if !faces.is_empty() => { + let water_source = self.blocks.has(state, tb::WATER_SOURCE); + if !self.blocks.is_air(state) && !water_source { + return Ok(false); + } + return self.regrow(world, pos, state, faces); + } + Some(_) => {} + } + } + Ok(self.spread_all(world, state, pos, &ALL_SPREADS)? > 0) + } + fn regrow<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + pos: [i32; 3], + existing: BlockStateId, + faces: &[Direction], + ) -> TreeResult<bool, W::Error> { + let mut state = self.vein; + let mut any = false; + for &face in faces { + if world.attachment_at(pos, face).map_err(query)? { + state = self.with_face(state, face, true)?; + any = true; + } + } + if !any { + return Ok(false); + } + if self.blocks.has(existing, tb::ANY_FLUID) { + state = self.blocks.waterlogged(state, true); + } + write(world, pos, state, 3)?; + Ok(true) + } + fn with_face<E>( + &self, + state: BlockStateId, + face: Direction, + value: bool, + ) -> TreeResult<BlockStateId, E> { + self.blocks + .with( + state, + tb::direction_name(face), + if value { "true" } else { "false" }, + ) + .ok_or(FeatureExecutionError::InvalidState) + } + /// MultifaceSpreader.spreadAll with the sculk vein spreader configuration + /// (post-processing enabled for world generation). + fn spread_all<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + state: BlockStateId, + pos: [i32; 3], + types: &[Spread], + ) -> TreeResult<i64, W::Error> { + let other_source = !self.is_vein(state); + let mut count = 0; + for face in Direction::ALL { + if !(other_source || self.has_face(state, face)) { + continue; + } + for direction in Direction::ALL { + if tb::Axis::of(direction) == tb::Axis::of(face) { + continue; + } + if !(other_source + || (self.has_face(state, face) && !self.has_face(state, direction))) + { + continue; + } + let mut target = None; + for kind in types { + let candidate = match kind { + Spread::SamePosition => (pos, direction), + Spread::SamePlane => (tb::relative(pos, direction, 1), face), + Spread::WrapAround => ( + tb::relative(tb::relative(pos, direction, 1), face, 1), + direction.opposite(), + ), + }; + if self.can_spread_into(world, pos, candidate.0, candidate.1)? { + target = Some(candidate); + break; + } + } + let Some((target, face_to)) = target else { + continue; + }; + let old = read(world, target)?; + let Some(new) = self.state_for_placement(world, old, target, face_to)? else { + continue; + }; + world.mark_postprocessing(target).map_err(query)?; + if write(world, target, new, 2)? { + count += 1; + } + } + } + Ok(count) + } + fn valid_for_placement<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + old: BlockStateId, + pos: [i32; 3], + face: Direction, + ) -> TreeResult<bool, W::Error> { + if self.is_vein(old) && self.has_face(old, face) { + return Ok(false); + } + world.attachment_at(pos, face).map_err(query) + } + fn state_for_placement<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + old: BlockStateId, + pos: [i32; 3], + face: Direction, + ) -> TreeResult<Option<BlockStateId>, W::Error> { + if !self.valid_for_placement(world, old, pos, face)? { + return Ok(None); + } + let base = if self.is_vein(old) { + old + } else if self.blocks.has(old, tb::WATER_SOURCE) { + self.blocks.waterlogged(self.vein, true) + } else { + self.vein + }; + self.with_face(base, face, true).map(Some) + } + fn can_spread_into<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + source: [i32; 3], + target: [i32; 3], + face: Direction, + ) -> TreeResult<bool, W::Error> { + let existing = read(world, target)?; + let against = read(world, tb::relative(target, face, 1))?; + if self.blocks.has(against, tb::SCULK_BLOCKER) { + return Ok(false); + } + if tb::dist_manhattan(source, target) == 2 { + let neighbor = tb::relative(source, face.opposite(), 1); + let state = read(world, neighbor)?; + if world + .state_face_sturdy(state, neighbor, face) + .map_err(query)? + { + return Ok(false); + } + } + if self.blocks.has(existing, tb::ANY_FLUID) && !self.blocks.has(existing, tb::WATER_SOURCE) + { + return Ok(false); + } + if self.blocks.has(existing, tb::FIRE) { + return Ok(false); + } + let replaceable = self.blocks.has(existing, tb::REPLACEABLE) + || self.blocks.is_air(existing) + || self.is_vein(existing) + || (self.blocks.has(existing, tb::WATER_BLOCK) + && self.blocks.has(existing, tb::WATER_SOURCE)); + Ok(replaceable && self.valid_for_placement(world, existing, target, face)?) + } + fn attempt_use_charge<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + behaviour: Behaviour, + cursor: &Cursor, + spread_veins: bool, + ) -> TreeResult<i32, W::Error> { + let charge = cursor.charge; + match behaviour { + Behaviour::Default => Ok(if cursor.decay_delay > 0 { charge } else { 0 }), + Behaviour::Vein => { + if spread_veins && self.place_sculk(world, random, cursor.pos)? { + Ok(charge - 1) + } else if random.next_int_bound(CHARGE_DECAY_RATE)? == 0 { + Ok((charge as f32 * 0.5f32).floor() as i32) + } else { + Ok(charge) + } + } + Behaviour::Sculk => { + if charge == 0 || random.next_int_bound(CHARGE_DECAY_RATE)? != 0 { + return Ok(charge); + } + let pos = cursor.pos; + let dist_sqr: f64 = (0..3) + .map(|i| { + let d = f64::from(pos[i]) - f64::from(origin[i]); + d * d + }) + .sum(); + let close = dist_sqr < f64::from(NO_GROWTH_RADIUS * NO_GROWTH_RADIUS); + if !close && self.can_place_growth(world, pos)? { + if random.next_int_bound(GROWTH_SPAWN_COST)? < charge { + let above = tb::offset(pos, 0, 1, 0); + let mut growth = if random.next_int_bound(11)? == 0 { + self.shrieker + } else { + self.sensor + }; + if self.blocks.has(growth, tb::WATERLOGGABLE) + && self.blocks.has(read(world, above)?, tb::ANY_FLUID) + { + growth = self.blocks.waterlogged(growth, true); + } + write(world, above, growth, 3)?; + } + return Ok(0.max(charge - GROWTH_SPAWN_COST)); + } + if random.next_int_bound(ADDITIONAL_DECAY_RATE)? != 0 { + return Ok(charge); + } + let penalty = if close { + 1 + } else { + let outer = (dist_sqr.sqrt() as f32 - NO_GROWTH_RADIUS as f32).powi(2); + let reach = (24 - NO_GROWTH_RADIUS) * (24 - NO_GROWTH_RADIUS); + let factor = 1.0f32.min(outer / reach as f32); + 1.max((charge as f32 * factor * 0.5f32) as i32) + }; + Ok(charge - penalty) + } + } + } + fn can_place_growth<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + pos: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let above = read(world, tb::offset(pos, 0, 1, 0))?; + let open = self.blocks.is_air(above) + || (self.blocks.has(above, tb::WATER_BLOCK) + && self.blocks.has(above, tb::WATER_SOURCE)); + if !open { + return Ok(false); + } + let mut matched = 0; + // BoxBlockMatcher iterates BlockPos.betweenClosed (x, then y, then z). + for dz in -4..=4 { + for dy in 0..=2 { + for dx in -4..=4 { + if self + .inhibitors + .contains(&read(world, tb::offset(pos, dx, dy, dz))?) + { + matched += 1; + if matched >= 3 { + return Ok(false); + } + } + } + } + } + Ok(true) + } + fn place_sculk<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + pos: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let state = read(world, pos)?; + let mut directions = Direction::ALL; + tb::shuffle(&mut directions, random)?; + for support in directions { + if !self.has_face(state, support) { + continue; + } + let support_pos = tb::relative(pos, support, 1); + let support_state = read(world, support_pos)?; + if !self.replaceable_world_gen.contains(&support_state) { + continue; + } + write(world, support_pos, self.sculk, 3)?; + self.spread_all(world, self.sculk, support_pos, &ALL_SPREADS)?; + let skip = support.opposite(); + for direction in Direction::ALL { + if direction == skip { + continue; + } + let vein_pos = tb::relative(support_pos, direction, 1); + let possible = read(world, vein_pos)?; + if self.is_vein(possible) { + self.on_discharged(world, Behaviour::Vein, possible, vein_pos)?; + } + } + return Ok(true); + } + Ok(false) + } + fn on_discharged<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + behaviour: Behaviour, + state: BlockStateId, + pos: [i32; 3], + ) -> TreeResult<(), W::Error> { + if behaviour != Behaviour::Vein || !self.is_vein(state) { + return Ok(()); + } + let mut state = state; + for direction in Direction::ALL { + if self.has_face(state, direction) + && self + .blocks + .same_block(read(world, tb::relative(pos, direction, 1))?, self.sculk) + { + state = self.with_face(state, direction, false)?; + } + } + if !Direction::ALL.into_iter().any(|d| self.has_face(state, d)) { + let here = read(world, pos)?; + state = if self.blocks.has(here, tb::ANY_FLUID) { + self.water + } else { + self.air + }; + } + write(world, pos, state, 3)?; + Ok(()) + } + fn valid_movement<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + pos: [i32; 3], + origin: [i32; 3], + ) -> TreeResult<Option<[i32; 3]>, W::Error> { + // NON_CORNER_NEIGHBOURS in betweenClosed order (x, then y, then z). + let mut offsets = Vec::with_capacity(18); + for z in -1..=1 { + for y in -1..=1 { + for x in -1..=1 { + if (x == 0 || y == 0 || z == 0) && (x, y, z) != (0, 0, 0) { + offsets.push([x, y, z]); + } + } + } + } + tb::shuffle(&mut offsets, random)?; + let mut best = pos; + for o in offsets { + let neighbour = tb::offset(pos, o[0], o[1], o[2]); + let dx = origin[0].wrapping_sub(neighbour[0]); + let dz = origin[2].wrapping_sub(neighbour[2]); + if dx.wrapping_mul(dx).wrapping_add(dz.wrapping_mul(dz)) > 144 { + continue; + } + let transferee = read(world, neighbour)?; + if self.behaviour(transferee) == Behaviour::Default + || !self.unobstructed_move(world, pos, neighbour)? + { + continue; + } + best = neighbour; + if self.is_vein(transferee) { + let mut substrate = false; + for direction in Direction::ALL { + if self.has_face(transferee, direction) + && self + .replaceable + .contains(&read(world, tb::relative(neighbour, direction, 1))?) + { + substrate = true; + break; + } + } + if substrate { + break; + } + } + } + Ok((best != pos).then_some(best)) + } + fn unobstructed_move<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + from: [i32; 3], + to: [i32; 3], + ) -> TreeResult<bool, W::Error> { + if tb::dist_manhattan(from, to) == 1 { + return Ok(true); + } + let delta: [i32; 3] = std::array::from_fn(|i| to[i].wrapping_sub(from[i])); + let pick = |v: i32, negative: Direction, positive: Direction| { + if v < 0 { negative } else { positive } + }; + let dir_x = pick(delta[0], Direction::West, Direction::East); + let dir_y = pick(delta[1], Direction::Down, Direction::Up); + let dir_z = pick(delta[2], Direction::North, Direction::South); + let (a, b) = if delta[0] == 0 { + (dir_y, dir_z) + } else if delta[1] == 0 { + (dir_x, dir_z) + } else { + (dir_x, dir_y) + }; + Ok(self.unobstructed(world, from, a)? || self.unobstructed(world, from, b)?) + } + fn unobstructed<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + from: [i32; 3], + direction: Direction, + ) -> TreeResult<bool, W::Error> { + let test = tb::relative(from, direction, 1); + let state = read(world, test)?; + Ok(!world + .state_face_sturdy(state, test, direction.opposite()) + .map_err(query)?) + } +} diff --git a/crates/horizon-world/src/worldgen/settings.rs b/crates/horizon-world/src/worldgen/settings.rs new file mode 100644 index 000000000..770f12bd6 --- /dev/null +++ b/crates/horizon-world/src/worldgen/settings.rs @@ -0,0 +1,45 @@ +//! Vertical terrain bounds used by Java Edition 26.3. +use super::{DecodeError, Object, int_range, required}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct NoiseSettings { + pub min_y: i32, + pub height: i32, +} +impl NoiseSettings { + /// The record constructor itself does not check bounds or alignment. + pub const fn new(min_y: i32, height: i32) -> Self { + Self { min_y, height } + } + /// Vanilla's create helper checks the wrapped upper bound, then height + /// alignment, then minimum alignment. JSON adds stricter field bounds. + pub fn create(min_y: i32, height: i32) -> Result<Self, DecodeError> { + if min_y.wrapping_add(height) > 2032 { + return Err(DecodeError::Field("noise upper bound")); + } + if height % 16 != 0 { + return Err(DecodeError::Field("noise height alignment")); + } + if min_y % 16 != 0 { + return Err(DecodeError::Field("noise minimum alignment")); + } + Ok(Self::new(min_y, height)) + } + pub fn from_json(json: &str) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let min_y = int_range(required(&object, "min_y")?, "noise minimum", -2032, 2031)?; + let height = int_range(required(&object, "height")?, "noise height", 0, 4064)?; + Self::create(min_y, height) + } + /// Accessor maximum is minimum + height - 1 with Java integer wrapping. + /// Disjoint ranges can produce negative heights; vanilla does not clamp + /// those to zero or reapply codec alignment constraints to the result. + pub fn clamp_to_height(self, accessor_minimum: i32, accessor_height: i32) -> Self { + let min_y = self.min_y.max(accessor_minimum); + let upper = self + .min_y + .wrapping_add(self.height) + .min(accessor_minimum.wrapping_add(accessor_height)); + Self::new(min_y, upper.wrapping_sub(min_y)) + } +} diff --git a/crates/horizon-world/src/worldgen/simple_block.rs b/crates/horizon-world/src/worldgen/simple_block.rs new file mode 100644 index 000000000..a732765c5 --- /dev/null +++ b/crates/horizon-world/src/worldgen/simple_block.rs @@ -0,0 +1,109 @@ +//! Native simple-block feature selection, survival and ordered placement. +use super::feature::FeatureWorld; +use super::{ + DecodeError, Object, optional, + placement::{PlacementContext, PlacementQueryError}, + required, + state_provider::{ + BlockStateProvider, StateProviderBindings, StateProviderCatalog, StateProviderError, + }, +}; +use crate::block_placement::{BlockPlacement, BlockPlacementBindings, BlockPlacementError}; +use horizon_core::random::RandomSource; +use std::sync::Arc; + +/// Immutable state providers and placement transitions share one registry. +#[derive(Clone, Debug)] +pub struct SimpleBlockFeature { + provider: BlockStateProvider, + placement: Arc<BlockPlacement>, + schedule_tick: bool, +} +#[derive(Debug)] +pub enum SimpleBlockError<E> { + Provider(StateProviderError<E>), + Placement(BlockPlacementError<E>), + Query(PlacementQueryError), +} +impl<E: std::fmt::Display> std::fmt::Display for SimpleBlockError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Provider(e) => e.fmt(f), + Self::Placement(e) => e.fmt(f), + Self::Query(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for SimpleBlockError<E> {} +impl SimpleBlockFeature { + /// Decode the feature's map codec, including optional named providers. + pub fn from_json( + json: &str, + providers: &StateProviderBindings<'_>, + catalog: &StateProviderCatalog, + placement: &BlockPlacementBindings<'_>, + ) -> Result<Self, DecodeError> { + Self::decode(json, providers, catalog, placement, 0, &mut 65536) + } + pub(crate) fn decode( + json: &str, + providers: &StateProviderBindings<'_>, + catalog: &StateProviderCatalog, + placement: &BlockPlacementBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + if !std::ptr::eq(providers.registry(), placement.registry()) { + return Err(DecodeError::Field("simple block registry identity")); + } + let object: Object = serde_json::from_str(json)?; + let provider = catalog.provider_with_budget( + required(&object, "to_place")?.get(), + providers, + depth + 1, + remaining, + )?; + let schedule_tick = optional(&object, "schedule_tick") + .map(|v| serde_json::from_str::<bool>(v.get())) + .transpose()? + .unwrap_or(false); + Ok(Self { + provider, + placement: placement.operations(), + schedule_tick, + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + position: [i32; 3], + ) -> Result<bool, SimpleBlockError<W::Error>> { + let Some(state) = self + .provider + .get_optional_state(world, random, position) + .map_err(SimpleBlockError::Provider)? + else { + return Ok(false); + }; + if !world + .block_survives(state, position) + .map_err(SimpleBlockError::Query)? + { + return Ok(false); + } + if !self + .placement + .place(world, state, position, 2) + .map_err(SimpleBlockError::Placement)? + { + return Ok(false); + } + if self.schedule_tick { + self.placement + .schedule_tick(world, position, 1) + .map_err(SimpleBlockError::Placement)?; + } + Ok(true) + } +} diff --git a/crates/horizon-world/src/worldgen/snow_freeze.rs b/crates/horizon-world/src/worldgen/snow_freeze.rs new file mode 100644 index 000000000..776336925 --- /dev/null +++ b/crates/horizon-world/src/worldgen/snow_freeze.rs @@ -0,0 +1,115 @@ +//! Freeze exposed water and place snow across a 16-by-16 feature footprint. +use super::{ + DecodeError, + block_feature::FeatureBlockBindings, + feature::FeatureWorld, + placement::{PlacementContext, PlacementQueryError}, +}; +use crate::{heightmap::HeightmapType, registry::BlockStateId}; +use std::{collections::BTreeMap, sync::Arc}; +#[derive(Clone, Debug)] +pub struct SnowAndFreezeFeature { + ice: BlockStateId, + snow: BlockStateId, + snowy: Arc<BTreeMap<BlockStateId, BlockStateId>>, +} +#[derive(Debug)] +pub enum SnowAndFreezeError<E> { + World(E), + Query(PlacementQueryError), +} +impl<E: std::fmt::Display> std::fmt::Display for SnowAndFreezeError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Query(e) => e.fmt(f), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for SnowAndFreezeError<E> {} +impl SnowAndFreezeFeature { + pub fn new(bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + let registry = bindings.registry(); + let get = |name| { + registry + .default_state(name) + .ok_or_else(|| DecodeError::Registry(format!("unknown freezing block {name}"))) + }; + // These are the pinned registry's blocks with SnowyBlock.SNOWY. + let mut snowy = BTreeMap::new(); + for name in [ + "minecraft:grass_block", + "minecraft:podzol", + "minecraft:mycelium", + ] { + for state in bindings + .blocks + .get(name) + .ok_or(DecodeError::Field("snowy block"))? + .iter() + { + let mut descriptor = registry + .state(*state) + .ok_or(DecodeError::Field("snowy state"))? + .clone(); + descriptor + .properties + .insert("snowy".to_owned(), "true".to_owned()); + snowy.insert( + *state, + registry + .id(&descriptor) + .ok_or(DecodeError::Field("snowy true state"))?, + ); + } + } + Ok(Self { + ice: get("minecraft:ice")?, + snow: get("minecraft:snow")?, + snowy: Arc::new(snowy), + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + origin: [i32; 3], + ) -> Result<bool, SnowAndFreezeError<W::Error>> { + for dx in 0..16 { + for dz in 0..16 { + let x = origin[0].wrapping_add(dx); + let z = origin[2].wrapping_add(dz); + let y = world + .height(HeightmapType::MotionBlocking, x, z) + .map_err(SnowAndFreezeError::Query)?; + let top = [x, y, z]; + let below = [x, y.wrapping_sub(1), z]; + let biome = world + .biome_identity(top) + .map_err(SnowAndFreezeError::Query)?; + if world + .biome_should_freeze(biome, below, false) + .map_err(SnowAndFreezeError::Query)? + { + world + .set_block(below, self.ice, 2) + .map_err(SnowAndFreezeError::World)?; + } + if world + .biome_should_snow(biome, top) + .map_err(SnowAndFreezeError::Query)? + { + world + .set_block(top, self.snow, 2) + .map_err(SnowAndFreezeError::World)?; + let state = world.block(below).map_err(SnowAndFreezeError::World)?; + if let Some(state) = self.snowy.get(&state) { + world + .set_block(below, *state, 2) + .map_err(SnowAndFreezeError::World)?; + } + } + } + } + Ok(true) + } +} diff --git a/crates/horizon-world/src/worldgen/speleothem.rs b/crates/horizon-world/src/worldgen/speleothem.rs new file mode 100644 index 000000000..aeb114db3 --- /dev/null +++ b/crates/horizon-world/src/worldgen/speleothem.rs @@ -0,0 +1,210 @@ +//! Small pointed formations, base patches and contained-water placement. +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + block_predicate::PredicateBlockResolver, + feature::FeatureWorld, + number_text, optional, + placement::{PlacementContext, PlacementQueryError}, + required, +}; +use crate::registry::BlockStateId; +use horizon_core::{ + geometry::Direction, + random::{InvalidBound, RandomSource}, +}; +use std::{collections::BTreeSet, sync::Arc}; +#[derive(Clone, Debug)] +pub struct SpeleothemFeature { + base: BlockStateId, + base_states: Arc<BTreeSet<BlockStateId>>, + replace: Arc<BTreeSet<BlockStateId>>, + empty_or_water: BTreeSet<BlockStateId>, + // Direction (up/down), thickness (tip/frustum), waterlogged. Unsupported + // properties remain deferred placement failures, as in the native codec. + pointed: [[Option<[Option<BlockStateId>; 2]>; 2]; 2], + chances: [f32; 4], +} +#[derive(Debug)] +pub enum SpeleothemError<E> { + World(E), + Query(PlacementQueryError), + Random(InvalidBound), + InvalidPointedState, +} +impl<E: std::fmt::Display> std::fmt::Display for SpeleothemError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Query(e) => e.fmt(f), + Self::Random(e) => e.fmt(f), + Self::InvalidPointedState => f.write_str("pointed block lacks required properties"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for SpeleothemError<E> {} +impl SpeleothemFeature { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let registry = bindings.registry(); + let block = |field| -> Result<BlockStateId, DecodeError> { + let state = bindings + .codec + .decode(required(&object, field)?.get(), false) + .map_err(|e| DecodeError::Registry(e.to_string()))?; + registry + .default_state(®istry.state(state).unwrap().name) + .ok_or(DecodeError::Field("speleothem block identity")) + }; + let base = block("base_block")?; + let point = registry.state(block("pointed_block")?).unwrap(); + let mut pointed = [[None; 2]; 2]; + for (direction, row) in ["up", "down"].into_iter().zip(&mut pointed) { + for (thickness, entry) in ["tip", "frustum"].into_iter().zip(row) { + let mut state = point.clone(); + state + .properties + .insert("vertical_direction".into(), direction.into()); + state + .properties + .insert("thickness".into(), thickness.into()); + if registry.id(&state).is_some() { + *entry = Some([false, true].map(|water| { + let mut wet = state.clone(); + wet.properties + .insert("waterlogged".into(), water.to_string()); + registry.id(&wet) + })); + } + } + } + let mut chances = [0.2, 0.7, 0.5, 0.5]; + for (name, chance) in [ + "chance_of_taller_generation", + "chance_of_directional_spread", + "chance_of_spread_radius2", + "chance_of_spread_radius3", + ] + .into_iter() + .zip(&mut chances) + { + if let Some(raw) = optional(&object, name) { + *chance = number_text(raw)? + .parse::<f64>() + .map_err(|_| DecodeError::Field("speleothem chance"))? + as f32; + if !(0.0..=1.0).contains(chance) || chance.is_sign_negative() { + return Err(DecodeError::Field("speleothem chance")); + } + } + } + let mut empty_or_water = BTreeSet::from(bindings.air); + empty_or_water.extend( + bindings + .blocks + .get("minecraft:water") + .ok_or(DecodeError::Field("water bindings"))? + .iter() + .copied(), + ); + Ok(Self { + base, + base_states: bindings.blocks[®istry.state(base).unwrap().name].clone(), + replace: bindings + .predicate_block_set(required(&object, "replaceable_blocks")?.get())?, + empty_or_water, + pointed, + chances, + }) + } + fn is_base(&self, state: BlockStateId) -> bool { + self.base_states.contains(&state) || self.replace.contains(&state) + } + fn base_at<W: FeatureWorld>( + &self, + world: &mut W, + p: [i32; 3], + ) -> Result<(), SpeleothemError<W::Error>> { + if self + .replace + .contains(&world.block(p).map_err(SpeleothemError::World)?) + { + world + .set_block(p, self.base, 2) + .map_err(SpeleothemError::World)?; + } + Ok(()) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + ) -> Result<bool, SpeleothemError<W::Error>> { + let ceiling = self.is_base( + world + .block(offset(origin, [0, 1, 0])) + .map_err(SpeleothemError::World)?, + ); + let floor = self.is_base( + world + .block(offset(origin, [0, -1, 0])) + .map_err(SpeleothemError::World)?, + ); + let direction = match (ceiling, floor) { + (true, true) => { + if random.next_boolean() { + Direction::Down + } else { + Direction::Up + } + } + (true, false) => Direction::Down, + (false, true) => Direction::Up, + (false, false) => return Ok(false), + }; + let step = direction.normal(); + let base = offset(origin, step.map(|v| -v)); + self.base_at(world, base)?; + for d in [[0, 0, -1], [1, 0, 0], [0, 0, 1], [-1, 0, 0]] { + if random.next_float() > self.chances[1] { + continue; + } + let mut p = offset(base, d); + self.base_at(world, p)?; + for chance in &self.chances[2..] { + if random.next_float() > *chance { + break; + } + let d = Direction::ALL + [random.next_int_bound(6).map_err(SpeleothemError::Random)? as usize]; + p = offset(p, d.normal()); + self.base_at(world, p)?; + } + } + let tall = random.next_float() < self.chances[0] + && self.empty_or_water.contains( + &world + .block(offset(origin, step)) + .map_err(SpeleothemError::World)?, + ); + if self.is_base(world.block(base).map_err(SpeleothemError::World)?) { + let row = &self.pointed[usize::from(direction == Direction::Down)]; + let mut p = origin; + for thickness in if tall { &[1, 0][..] } else { &[0][..] } { + let variants = row[*thickness].ok_or(SpeleothemError::InvalidPointedState)?; + let water = world.water_at(p).map_err(SpeleothemError::Query)?; + let state = + variants[usize::from(water)].ok_or(SpeleothemError::InvalidPointedState)?; + world + .set_block(p, state, 2) + .map_err(SpeleothemError::World)?; + p = offset(p, step); + } + } + Ok(true) + } +} +fn offset(p: [i32; 3], d: [i32; 3]) -> [i32; 3] { + std::array::from_fn(|i| p[i].wrapping_add(d[i])) +} diff --git a/crates/horizon-world/src/worldgen/spike.rs b/crates/horizon-world/src/worldgen/spike.rs new file mode 100644 index 000000000..fd9cec614 --- /dev/null +++ b/crates/horizon-world/src/worldgen/spike.rs @@ -0,0 +1,187 @@ +//! Randomized tapered spikes, mirrored lower layers and discontinuous roots. +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + block_predicate::BlockPredicate, + feature::FeatureWorld, + placement::{PlacementContext, PlacementQueryError}, + required, +}; +use crate::registry::BlockStateId; +use horizon_core::random::{InvalidBound, RandomSource}; +#[derive(Clone, Debug)] +pub struct SpikeFeature { + state: BlockStateId, + can_place_on: BlockPredicate, + can_replace: BlockPredicate, + air: [BlockStateId; 3], +} +#[derive(Debug)] +pub enum SpikeError<E> { + World(E), + Query(PlacementQueryError), + Random(InvalidBound), + WorkLimit, +} +impl<E: std::fmt::Display> std::fmt::Display for SpikeError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Query(e) => e.fmt(f), + Self::Random(e) => e.fmt(f), + Self::WorkLimit => f.write_str("spike work limit exceeded"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for SpikeError<E> {} +impl SpikeFeature { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + Self::decode(json, bindings, 0, &mut 65536) + } + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + if depth > 128 || *remaining == 0 { + return Err(DecodeError::Field("spike depth or work")); + } + *remaining -= 1; + let object: Object = serde_json::from_str(json)?; + Ok(Self { + state: bindings + .codec + .decode(required(&object, "state")?.get(), false) + .map_err(|e| DecodeError::Registry(e.to_string()))?, + can_place_on: BlockPredicate::decode_with_blocks( + required(&object, "can_place_on")?.get(), + depth + 1, + remaining, + Some(bindings), + )?, + can_replace: BlockPredicate::decode_with_blocks( + required(&object, "can_replace")?.get(), + depth + 1, + remaining, + Some(bindings), + )?, + air: bindings.air, + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + mut origin: [i32; 3], + ) -> Result<bool, SpikeError<W::Error>> { + let mut budget = 1_048_576; + loop { + spend(&mut budget)?; + if !self + .air + .contains(&world.block(origin).map_err(SpikeError::World)?) + { + break; + } + if origin[1] <= world.min_y().map_err(SpikeError::Query)?.wrapping_add(2) { + break; + } + origin[1] = origin[1].wrapping_sub(1); + } + if !self + .can_place_on + .test(world, origin) + .map_err(SpikeError::Query)? + { + return Ok(false); + } + origin[1] = origin[1].wrapping_add(random.next_int_bound(4).map_err(SpikeError::Random)?); + let height = random.next_int_bound(4).map_err(SpikeError::Random)? + 7; + let base = height / 4 + random.next_int_bound(2).map_err(SpikeError::Random)?; + if base > 1 && random.next_int_bound(60).map_err(SpikeError::Random)? == 0 { + origin[1] = + origin[1].wrapping_add(10 + random.next_int_bound(30).map_err(SpikeError::Random)?); + } + for layer in 0..height { + let radius = (1.0 - layer as f32 / height as f32) * base as f32; + let ceil = radius.ceil() as i32; + for x in -ceil..=ceil { + let fx = x.abs() as f32 - 0.25; + for z in -ceil..=ceil { + let fz = z.abs() as f32 - 0.25; + if (x != 0 || z != 0) && fx * fx + fz * fz > radius * radius { + continue; + } + if (x == -ceil || x == ceil || z == -ceil || z == ceil) + && random.next_float() > 0.75 + { + continue; + } + self.place_part(world, offset(origin, [x, layer, z]))?; + if layer != 0 && ceil > 1 { + self.place_part(world, offset(origin, [x, -layer, z]))?; + } + } + } + } + let roots = (base - 1).clamp(0, 1); + for x in -roots..=roots { + for z in -roots..=roots { + let mut p = offset(origin, [x, -1, z]); + let mut remaining = 50; + if x.abs() == 1 && z.abs() == 1 { + remaining = random.next_int_bound(5).map_err(SpikeError::Random)?; + } + while p[1] > 50 { + spend(&mut budget)?; + let state = world.block(p).map_err(SpikeError::World)?; + if !self.air.contains(&state) + && !self.can_replace.test(world, p).map_err(SpikeError::Query)? + && state != self.state + { + break; + } + world + .set_block(p, self.state, 3) + .map_err(SpikeError::World)?; + p[1] = p[1].wrapping_sub(1); + remaining -= 1; + if remaining <= 0 { + p[1] = p[1].wrapping_sub( + random.next_int_bound(5).map_err(SpikeError::Random)? + 1, + ); + remaining = random.next_int_bound(5).map_err(SpikeError::Random)?; + } + } + } + } + Ok(true) + } + fn place_part<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + p: [i32; 3], + ) -> Result<(), SpikeError<W::Error>> { + if self + .air + .contains(&world.block(p).map_err(SpikeError::World)?) + || self.can_replace.test(world, p).map_err(SpikeError::Query)? + { + world + .set_block(p, self.state, 3) + .map_err(SpikeError::World)?; + } + Ok(()) + } +} +fn offset(p: [i32; 3], d: [i32; 3]) -> [i32; 3] { + std::array::from_fn(|i| p[i].wrapping_add(d[i])) +} +fn spend<E>(remaining: &mut usize) -> Result<(), SpikeError<E>> { + if *remaining == 0 { + return Err(SpikeError::WorkLimit); + } + *remaining -= 1; + Ok(()) +} diff --git a/crates/horizon-world/src/worldgen/spring.rs b/crates/horizon-world/src/worldgen/spring.rs new file mode 100644 index 000000000..9249b0448 --- /dev/null +++ b/crates/horizon-world/src/worldgen/spring.rs @@ -0,0 +1,116 @@ +//! Spring cavity checks, fluid block placement and immediate scheduled ticks. +use super::{ + DecodeError, Object, + block_feature::{BlockFeatureError, FeatureBlockBindings}, + block_predicate::PredicateBlockResolver, + feature::FeatureWorld, + integer, optional, + placement::PlacementContext, + required, +}; +use crate::{ + fluid::{FluidBlockBindings, FluidKind, FluidState}, + registry::BlockStateId, +}; +use std::{collections::BTreeSet, sync::Arc}; +#[derive(Clone, Debug)] +pub struct SpringFeature { + state: BlockStateId, + fluid: FluidKind, + requires_below: bool, + rocks: i32, + holes: i32, + valid: Arc<BTreeSet<BlockStateId>>, + air: [BlockStateId; 3], +} +impl SpringFeature { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let fluid = FluidState::from_json(required(&object, "state")?.get()) + .map_err(|e| DecodeError::Registry(e.to_string()))?; + let state = FluidBlockBindings::new(bindings.registry()) + .map_err(|e| DecodeError::Registry(e.to_string()))? + .block(fluid); + let requires_below = optional(&object, "requires_block_below") + .map(|v| serde_json::from_str(v.get())) + .transpose()? + .unwrap_or(true); + let rocks = optional(&object, "rock_count") + .map(integer) + .transpose()? + .unwrap_or(4); + let holes = optional(&object, "hole_count") + .map(integer) + .transpose()? + .unwrap_or(1); + Ok(Self { + state, + fluid: fluid.kind(), + requires_below, + rocks, + holes, + valid: bindings.predicate_block_set(required(&object, "valid_blocks")?.get())?, + air: bindings.air, + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + p: [i32; 3], + ) -> Result<bool, BlockFeatureError<W::Error>> { + let above = [p[0], p[1].wrapping_add(1), p[2]]; + let below = [p[0], p[1].wrapping_sub(1), p[2]]; + if !self + .valid + .contains(&world.block(above).map_err(BlockFeatureError::World)?) + { + return Ok(false); + } + if self.requires_below + && !self + .valid + .contains(&world.block(below).map_err(BlockFeatureError::World)?) + { + return Ok(false); + } + let state = world.block(p).map_err(BlockFeatureError::World)?; + if !self.air.contains(&state) && !self.valid.contains(&state) { + return Ok(false); + } + let neighbors = [ + [p[0].wrapping_sub(1), p[1], p[2]], + [p[0].wrapping_add(1), p[1], p[2]], + [p[0], p[1], p[2].wrapping_sub(1)], + [p[0], p[1], p[2].wrapping_add(1)], + below, + ]; + let mut rocks = 0; + for position in neighbors { + if self + .valid + .contains(&world.block(position).map_err(BlockFeatureError::World)?) + { + rocks += 1; + } + } + let mut holes = 0; + for position in neighbors { + if self + .air + .contains(&world.block(position).map_err(BlockFeatureError::World)?) + { + holes += 1; + } + } + if rocks != self.rocks || holes != self.holes { + return Ok(false); + } + world + .set_block(p, self.state, 2) + .map_err(BlockFeatureError::World)?; + world + .schedule_fluid_tick(p, self.fluid, 0) + .map_err(BlockFeatureError::Query)?; + Ok(true) + } +} diff --git a/crates/horizon-world/src/worldgen/state_provider.rs b/crates/horizon-world/src/worldgen/state_provider.rs new file mode 100644 index 000000000..37e9c866b --- /dev/null +++ b/crates/horizon-world/src/worldgen/state_provider.rs @@ -0,0 +1,604 @@ +//! Initial block-state providers, bound to immutable block and tag identities. +mod catalog; +mod noise; +pub use catalog::StateProviderCatalog; +pub(crate) mod properties; +use super::{ + DecodeError, Object, + block_predicate::{BlockPredicate, PredicateBlockResolver}, + density::identifier, + feature::FeatureWorld, + optional, + placement::{PlacementContext, PlacementQueryError}, + required, + value_provider::IntProvider, + weighted::WeightedList, +}; +use crate::block_properties::{BlockPropertiesRegistry, BlockProperty, BoundBlockProperty}; +use crate::registry::{BlockRegistry, BlockStateId, BlockStateJsonCodec}; +use horizon_core::random::{InvalidBound, RandomSource}; +use noise::NoiseProvider; +use properties::StateProperties; +use serde_json::value::RawValue; +use std::{ + collections::{BTreeMap, BTreeSet}, + sync::{Arc, OnceLock}, +}; +const DIRECTIONS: [&str; 6] = ["down", "up", "north", "south", "west", "east"]; +type Rotations = Arc<Vec<[BlockStateId; 6]>>; + +pub struct StateProviderBindings<'r> { + physical_properties: Option<[BoundBlockProperty; 4]>, + biomes: Option<Arc<super::biome_predicate::BiomePredicateBindings>>, + fluids: super::fluid_predicate::FluidPredicateBindings, + codec: BlockStateJsonCodec<'r>, + blocks: BTreeMap<String, BlockStateId>, + tags: BTreeMap<String, Arc<Vec<BlockStateId>>>, + registry: &'r BlockRegistry, + rotations: OnceLock<Result<Rotations, String>>, + integers: BTreeSet<(String, String)>, + properties: OnceLock<Result<Arc<StateProperties>, String>>, + predicate_states: OnceLock<BTreeMap<BlockStateId, Arc<BTreeSet<BlockStateId>>>>, +} +impl<'r> StateProviderBindings<'r> { + pub fn registry(&self) -> &'r BlockRegistry { + self.registry + } + pub fn with_block_properties( + mut self, + properties: &BlockPropertiesRegistry<'r>, + ) -> Result<Self, DecodeError> { + if !std::ptr::eq(self.registry, properties.registry()) { + return Err(DecodeError::Field( + "block properties use a different registry", + )); + } + self.physical_properties = Some([ + properties.bind(BlockProperty::Solid), + properties.bind(BlockProperty::Replaceable), + properties.bind(BlockProperty::Liquid), + properties.bind(BlockProperty::SolidRender), + ]); + Ok(self) + } + pub fn with_biomes( + mut self, + biomes: Arc<super::biome_predicate::BiomePredicateBindings>, + ) -> Self { + self.biomes = Some(biomes); + self + } + + pub fn with_fluid_tags( + mut self, + tags: &BTreeMap<String, Vec<String>>, + ) -> Result<Self, DecodeError> { + self.fluids = self.fluids.with_resolved_tags(tags)?; + Ok(self) + } + /// Resolved tag lists preserve holder order, including an empty named set. + pub fn new( + registry: &'r BlockRegistry, + integers: BTreeSet<(String, String)>, + tags: &BTreeMap<String, Vec<String>>, + ) -> Result<Self, DecodeError> { + let codec = BlockStateJsonCodec::new(registry, integers.clone()) + .map_err(|e| DecodeError::Registry(e.to_string()))?; + let mut blocks = BTreeMap::new(); + for index in 0..registry.len() { + let name = ®istry.state(BlockStateId(index as u32)).unwrap().name; + blocks + .entry(name.clone()) + .or_insert_with(|| registry.default_state(name).unwrap()); + } + let mut bound_tags = BTreeMap::new(); + for (name, entries) in tags { + if entries.len() > 8192 { + return Err(DecodeError::Field("provider tag size")); + } + let values = entries + .iter() + .map(|name| { + blocks + .get(&identifier(name)?) + .copied() + .ok_or_else(|| DecodeError::Registry(format!("unknown block {name}"))) + }) + .collect::<Result<Vec<_>, _>>()?; + if bound_tags + .insert(super::tags::identifier(name)?, Arc::new(values)) + .is_some() + { + return Err(DecodeError::Field("duplicate provider block tag")); + } + } + Ok(Self { + codec, + biomes: None, + physical_properties: None, + fluids: super::fluid_predicate::FluidPredicateBindings::new(registry)?, + blocks, + tags: bound_tags, + registry, + rotations: OnceLock::new(), + integers, + properties: OnceLock::new(), + predicate_states: OnceLock::new(), + }) + } + fn state(&self, json: &str, full: bool) -> Result<BlockStateId, DecodeError> { + self.codec + .decode(json, full) + .map_err(|e| DecodeError::Registry(e.to_string())) + } + fn rotations(&self) -> Result<Rotations, DecodeError> { + self.rotations + .get_or_init(|| rotation_table(self.registry)) + .clone() + .map_err(DecodeError::Registry) + } + pub(crate) fn properties(&self) -> Result<Arc<StateProperties>, DecodeError> { + self.properties + .get_or_init(|| StateProperties::build(self.registry, &self.integers).map(Arc::new)) + .clone() + .map_err(DecodeError::Registry) + } + fn block_set(&self, raw: &RawValue) -> Result<Arc<Vec<BlockStateId>>, DecodeError> { + if let Ok(name) = serde_json::from_str::<String>(raw.get()) { + if let Some(tag) = name.strip_prefix('#') { + return self + .tags + .get(&super::tags::identifier(tag)?) + .cloned() + .ok_or_else(|| { + DecodeError::Registry(format!("unknown provider block tag {tag}")) + }); + } + let state = self + .blocks + .get(&identifier(&name)?) + .copied() + .ok_or_else(|| DecodeError::Registry(format!("unknown block {name}")))?; + return Ok(Arc::new(vec![state])); + } + let names: Vec<String> = serde_json::from_str(raw.get())?; + if names.len() > 8192 { + return Err(DecodeError::Field("provider block list size")); + } + Ok(Arc::new( + names + .iter() + .map(|name| { + self.blocks + .get(&identifier(name)?) + .copied() + .ok_or_else(|| DecodeError::Registry(format!("unknown block {name}"))) + }) + .collect::<Result<Vec<_>, _>>()?, + )) + } +} +impl PredicateBlockResolver for StateProviderBindings<'_> { + fn predicate_state(&self, json: &str) -> Result<BlockStateId, DecodeError> { + self.state(json, false) + } + fn predicate_property( + &self, + property: BlockProperty, + ) -> Result<BoundBlockProperty, DecodeError> { + let values = self + .physical_properties + .as_ref() + .ok_or(DecodeError::Field("predicate block property registry"))?; + Ok(values[match property { + BlockProperty::Solid => 0, + BlockProperty::Replaceable => 1, + BlockProperty::Liquid => 2, + BlockProperty::SolidRender => 3, + }] + .clone()) + } + fn predicate_biome_set( + &self, + json: &str, + ) -> Result<Arc<BTreeSet<super::biome::BiomeId>>, DecodeError> { + self.biomes + .as_ref() + .ok_or(DecodeError::Field("predicate biome registry"))? + .resolve(json) + } + + fn predicate_fluid_set( + &self, + json: &str, + ) -> Result<super::fluid_predicate::BoundFluidSet, DecodeError> { + self.fluids.resolve(json) + } + fn predicate_block_set(&self, json: &str) -> Result<Arc<BTreeSet<BlockStateId>>, DecodeError> { + let raw: Box<RawValue> = serde_json::from_str(json)?; + let defaults = self.block_set(&raw)?; + let states = self.predicate_states.get_or_init(|| { + let mut states = BTreeMap::<BlockStateId, BTreeSet<BlockStateId>>::new(); + for id in 0..self.registry.len() { + let id = BlockStateId(id as u32); + let default = self.blocks[&self.registry.state(id).unwrap().name]; + states.entry(default).or_default().insert(id); + } + states + .into_iter() + .map(|(id, values)| (id, Arc::new(values))) + .collect() + }); + if defaults.len() == 1 { + return Ok(states[&defaults[0]].clone()); + } + Ok(Arc::new( + defaults + .iter() + .flat_map(|id| states[id].iter().copied()) + .collect(), + )) + } +} +#[derive(Clone, Debug)] +pub struct BlockStateProvider(Node); +#[derive(Clone, Debug)] +enum Node { + RuleBased { + fallback: Option<Box<BlockStateProvider>>, + rules: Vec<(BlockPredicate, BlockStateProvider)>, + }, + Noise(Box<NoiseProvider>), + Simple(BlockStateId), + Weighted(WeightedList<BlockStateId>), + RandomBlock(Arc<Vec<BlockStateId>>), + Rotated { + source: Box<BlockStateProvider>, + direction: Option<usize>, + rotations: Rotations, + }, + CopyProperties(Box<BlockStateProvider>, Arc<StateProperties>), + RandomizedInt { + source: Box<BlockStateProvider>, + property: String, + values: IntProvider, + properties: Arc<StateProperties>, + }, +} +#[derive(Debug)] +pub enum StateProviderError<E> { + Random(InvalidBound), + World(E), + Query(PlacementQueryError), + InvalidState, + InvalidPropertyValue, + EmptyNoiseSelection, +} +impl<E: std::fmt::Display> std::fmt::Display for StateProviderError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Random(e) => e.fmt(f), + Self::World(e) => e.fmt(f), + Self::Query(e) => e.fmt(f), + Self::InvalidState => f.write_str("unregistered provider source state"), + Self::InvalidPropertyValue => f.write_str("invalid randomized property value"), + Self::EmptyNoiseSelection => f.write_str("empty dual-noise state selection"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for StateProviderError<E> {} +impl<E> From<InvalidBound> for StateProviderError<E> { + fn from(e: InvalidBound) -> Self { + Self::Random(e) + } +} +impl BlockStateProvider { + /// Native DIRECT_CODEC is an exclusive choice: exactly one of a full state + /// object and a typed provider must decode. Compact state strings are not + /// direct providers; named provider holders are a separate registry layer. + pub fn from_json( + json: &str, + bindings: &StateProviderBindings<'_>, + ) -> Result<Self, DecodeError> { + Self::decode(json, bindings, 0, &mut 65536, None) + } + fn decode_holder( + json: &str, + bindings: &StateProviderBindings<'_>, + depth: usize, + remaining: &mut usize, + catalog: Option<&StateProviderCatalog>, + ) -> Result<Self, DecodeError> { + if depth > 128 || *remaining == 0 { + return Err(DecodeError::Field( + "state provider resource expansion limit", + )); + } + if let Ok(name) = serde_json::from_str::<String>(json) { + let name = identifier(&name)?; + let resource = catalog + .and_then(|c| c.lookup(&name)) + .ok_or_else(|| DecodeError::Registry(format!("unknown state provider {name}")))?; + *remaining -= 1; + Self::decode(resource, bindings, depth + 1, remaining, catalog) + } else { + Self::decode(json, bindings, depth, remaining, catalog) + } + } + fn decode( + json: &str, + bindings: &StateProviderBindings<'_>, + depth: usize, + remaining: &mut usize, + catalog: Option<&StateProviderCatalog>, + ) -> Result<Self, DecodeError> { + if depth > 128 || *remaining == 0 { + return Err(DecodeError::Field("state provider depth")); + } + match ( + bindings.state(json, true), + Self::decode_typed(json, bindings, depth, remaining, catalog), + ) { + (Ok(state), Err(_)) => Ok(Self(Node::Simple(state))), + (Err(_), Ok(provider)) => Ok(provider), + _ => Err(DecodeError::Field("exclusive state or provider")), + } + } + pub fn from_typed_json( + json: &str, + bindings: &StateProviderBindings<'_>, + ) -> Result<Self, DecodeError> { + Self::decode_typed(json, bindings, 0, &mut 65536, None) + } + fn decode_typed( + json: &str, + bindings: &StateProviderBindings<'_>, + depth: usize, + remaining: &mut usize, + catalog: Option<&StateProviderCatalog>, + ) -> Result<Self, DecodeError> { + if depth > 128 || *remaining == 0 { + return Err(DecodeError::Field("state provider depth")); + } + *remaining -= 1; + let object: Object = serde_json::from_str(json)?; + let kind = identifier(&serde_json::from_str::<String>( + required(&object, "type")?.get(), + )?)?; + Ok(Self(match kind.as_str() { + "minecraft:rule_based" => { + let fallback = optional(&object, "fallback") + .map(|raw| { + Self::decode_holder(raw.get(), bindings, depth + 1, remaining, catalog) + .map(Box::new) + }) + .transpose()?; + let raw_rules: Vec<Box<RawValue>> = + serde_json::from_str(required(&object, "rules")?.get())?; + if raw_rules.len() > 8192 { + return Err(DecodeError::Field("provider rule count")); + } + let mut rules = Vec::with_capacity(raw_rules.len()); + for raw in raw_rules { + if *remaining == 0 { + return Err(DecodeError::Field("provider node count")); + } + *remaining -= 1; + let rule: Object = serde_json::from_str(raw.get())?; + let predicate = BlockPredicate::decode_with_blocks( + required(&rule, "if_true")?.get(), + depth + 1, + remaining, + Some(bindings), + )?; + let provider = Self::decode_holder( + required(&rule, "then")?.get(), + bindings, + depth + 1, + remaining, + catalog, + )?; + rules.push((predicate, provider)); + } + Node::RuleBased { fallback, rules } + } + "minecraft:noise" | "minecraft:noise_threshold" | "minecraft:dual_noise" => { + Node::Noise(Box::new(NoiseProvider::decode(&object, bindings, &kind)?)) + } + "minecraft:simple" => { + Node::Simple(bindings.state(required(&object, "state")?.get(), false)?) + } + "minecraft:weighted" => { + Node::Weighted(WeightedList::decode(required(&object, "entries")?, |v| { + bindings.state(v.get(), false) + })?) + } + "minecraft:random_block" => { + Node::RandomBlock(bindings.block_set(required(&object, "blocks")?)?) + } + "minecraft:rotated" => { + let direction = optional(&object, "direction") + .map(|v| { + let name: String = serde_json::from_str(v.get())?; + DIRECTIONS + .iter() + .position(|v| *v == name) + .ok_or(DecodeError::Field("provider direction")) + }) + .transpose()?; + Node::Rotated { + source: Box::new(Self::decode_holder( + required(&object, "state")?.get(), + bindings, + depth + 1, + remaining, + catalog, + )?), + direction, + rotations: bindings.rotations()?, + } + } + "minecraft:copy_properties" => Node::CopyProperties( + Box::new(Self::decode_holder( + required(&object, "source")?.get(), + bindings, + depth + 1, + remaining, + catalog, + )?), + bindings.properties()?, + ), + "minecraft:randomized_int" => Node::RandomizedInt { + source: Box::new(Self::decode_holder( + required(&object, "source")?.get(), + bindings, + depth + 1, + remaining, + catalog, + )?), + property: serde_json::from_str(required(&object, "property")?.get())?, + values: IntProvider::decode(required(&object, "values")?, depth + 1, remaining)?, + properties: bindings.properties()?, + }, + _ => return Err(DecodeError::Field("block state provider type")), + })) + } + pub fn get_optional_state<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + position: [i32; 3], + ) -> Result<Option<BlockStateId>, StateProviderError<W::Error>> { + Ok(match &self.0 { + Node::RuleBased { fallback, rules } => { + for (predicate, provider) in rules { + if predicate + .test(world, position) + .map_err(StateProviderError::Query)? + { + if let Some(state) = provider.get_optional_state(world, random, position)? { + return Ok(Some(state)); + } + } + } + match fallback { + Some(provider) => provider.get_optional_state(world, random, position)?, + None => None, + } + } + Node::Noise(provider) => Some(provider.sample(random, position)?), + Node::Simple(state) => Some(*state), + Node::Weighted(states) => Some(*states.sample(random)?), + Node::RandomBlock(states) => { + if states.is_empty() { + None + } else { + Some(states[random.next_int_bound(states.len() as i32)? as usize]) + } + } + Node::Rotated { + source, + direction, + rotations, + } => { + // Native orientation selection precedes the nested state draw. + let direction = match direction { + Some(value) => *value, + None => random.next_int_bound(6)? as usize, + }; + let state = source.get_state(world, random, position)?; + Some( + rotations + .get(state.0 as usize) + .ok_or(StateProviderError::InvalidState)?[direction], + ) + } + Node::CopyProperties(source, properties) => { + let target = source.get_state(world, random, position)?; + let source = world.block(position).map_err(StateProviderError::World)?; + Some( + properties + .copy(target, source) + .ok_or(StateProviderError::InvalidState)?, + ) + } + Node::RandomizedInt { + source, + property, + values, + properties, + } => { + let state = source.get_state(world, random, position)?; + if properties + .has_integer(state, property) + .ok_or(StateProviderError::InvalidState)? + { + let value = values.sample(random)?; + Some( + properties + .set_integer(state, property, value) + .ok_or(StateProviderError::InvalidPropertyValue)?, + ) + } else { + Some(state) + } + } + }) + } + pub fn get_state<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + position: [i32; 3], + ) -> Result<BlockStateId, StateProviderError<W::Error>> { + match self.get_optional_state(world, random, position)? { + Some(state) => Ok(state), + None => world.block(position).map_err(StateProviderError::World), + } + } +} + +/// Bind the pinned registry's full-axis/full-facing/horizontal-facing property +/// families. A five-way facing or two-axis property is a different property and +/// is intentionally left unchanged. Unrelated properties retain their values. +fn rotation_table(registry: &BlockRegistry) -> Result<Rotations, String> { + let mut values = BTreeMap::<(String, String), BTreeSet<String>>::new(); + for index in 0..registry.len() { + let state = registry.state(BlockStateId(index as u32)).unwrap(); + for name in ["axis", "facing"] { + if let Some(value) = state.properties.get(name) { + values + .entry((state.name.clone(), name.into())) + .or_default() + .insert(value.clone()); + } + } + } + let axis = ["x", "y", "z"].map(str::to_owned).into_iter().collect(); + let facing = DIRECTIONS.map(str::to_owned).into_iter().collect(); + let horizontal = DIRECTIONS[2..].iter().map(|s| (*s).to_owned()).collect(); + let mut result = Vec::with_capacity(registry.len()); + for index in 0..registry.len() { + let state = registry.state(BlockStateId(index as u32)).unwrap(); + let full_axis = values.get(&(state.name.clone(), "axis".into())) == Some(&axis); + let directions = values.get(&(state.name.clone(), "facing".into())); + let mut rotated = [BlockStateId(index as u32); 6]; + for (direction, name) in DIRECTIONS.iter().enumerate() { + let mut value = state.clone(); + if full_axis { + value.properties.insert( + "axis".into(), + ["y", "y", "z", "z", "x", "x"][direction].into(), + ); + } + if directions == Some(&facing) || (direction >= 2 && directions == Some(&horizontal)) { + value.properties.insert("facing".into(), (*name).into()); + } + rotated[direction] = registry + .id(&value) + .ok_or_else(|| "incomplete rotation state registry".to_owned())?; + } + result.push(rotated); + } + Ok(Arc::new(result)) +} diff --git a/crates/horizon-world/src/worldgen/state_provider/catalog.rs b/crates/horizon-world/src/worldgen/state_provider/catalog.rs new file mode 100644 index 000000000..e8316713a --- /dev/null +++ b/crates/horizon-world/src/worldgen/state_provider/catalog.rs @@ -0,0 +1,64 @@ +//! Immutable resource snapshots for named state-provider holders. +use super::{BlockStateProvider, DecodeError, StateProviderBindings, identifier}; +use serde_json::value::RawValue; +use std::collections::BTreeMap; + +pub struct StateProviderCatalog { + resources: BTreeMap<String, Box<RawValue>>, +} +impl StateProviderCatalog { + /// Store resources without evaluating unused definitions. Resolving a root + /// validates its reachable providers, including branches not sampled at run + /// time. Cycles and excessive expansion fail the shared depth/work budget. + pub fn from_resources(resources: &BTreeMap<String, String>) -> Result<Self, DecodeError> { + if resources.len() > 8192 { + return Err(DecodeError::Field("state provider resource count")); + } + let mut result = BTreeMap::new(); + for (name, json) in resources { + if result + .insert(identifier(name)?, serde_json::from_str(json)?) + .is_some() + { + return Err(DecodeError::Field("duplicate state provider resource")); + } + } + Ok(Self { resources: result }) + } + pub(super) fn lookup(&self, name: &str) -> Option<&str> { + self.resources.get(name).map(|v| v.get()) + } + /// Decode the holder codec: an inline direct provider or a registry name. + pub fn provider( + &self, + json: &str, + bindings: &StateProviderBindings<'_>, + ) -> Result<BlockStateProvider, DecodeError> { + BlockStateProvider::decode_holder(json, bindings, 0, &mut 65536, Some(self)) + } + pub(crate) fn provider_with_budget( + &self, + json: &str, + bindings: &StateProviderBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<BlockStateProvider, DecodeError> { + BlockStateProvider::decode_holder(json, bindings, depth, remaining, Some(self)) + } + /// Decode DIRECT_CODEC while allowing nested named holder references. + pub fn direct_provider( + &self, + json: &str, + bindings: &StateProviderBindings<'_>, + ) -> Result<BlockStateProvider, DecodeError> { + BlockStateProvider::decode(json, bindings, 0, &mut 65536, Some(self)) + } + /// Decode TYPED_CODEC while allowing nested named holder references. + pub fn typed_provider( + &self, + json: &str, + bindings: &StateProviderBindings<'_>, + ) -> Result<BlockStateProvider, DecodeError> { + BlockStateProvider::decode_typed(json, bindings, 0, &mut 65536, Some(self)) + } +} diff --git a/crates/horizon-world/src/worldgen/state_provider/noise.rs b/crates/horizon-world/src/worldgen/state_provider/noise.rs new file mode 100644 index 000000000..ee8b7c460 --- /dev/null +++ b/crates/horizon-world/src/worldgen/state_provider/noise.rs @@ -0,0 +1,231 @@ +use super::{StateProviderBindings, StateProviderError}; +use crate::registry::BlockStateId; +use crate::worldgen::{ + DecodeError, Object, decode_noise, int_range, integer, number_text, required, +}; +use horizon_core::{ + noise::{Noise, NoiseStack}, + random::{LegacyRandom, RandomSource, WorldgenRandom}, +}; +use serde_json::value::RawValue; +#[derive(Clone, Debug)] +pub(super) struct NoiseProvider { + noise: NoiseStack, + scale: f32, + choice: Choice, +} +#[derive(Clone, Debug)] +enum Choice { + States(Vec<BlockStateId>), + Threshold { + threshold: f32, + chance: f32, + default: BlockStateId, + low: Vec<BlockStateId>, + high: Vec<BlockStateId>, + }, + Dual { + states: Vec<BlockStateId>, + variety: [i32; 2], + slow: NoiseStack, + scale: f32, + }, +} +impl NoiseProvider { + pub fn decode( + object: &Object, + bindings: &StateProviderBindings<'_>, + kind: &str, + ) -> Result<Self, DecodeError> { + let seed = long(required(object, "seed")?)?; + let noise = decode_noise(required(object, "noise")?.get())? + .create(&mut WorldgenRandom::new(LegacyRandom::new(seed)))?; + let scale = positive(required(object, "scale")?)?; + let choice = match kind { + "minecraft:noise" => Choice::States(states(required(object, "states")?, bindings)?), + "minecraft:noise_threshold" => Choice::Threshold { + threshold: range(required(object, "threshold")?, -1., 1.)?, + chance: range(required(object, "high_chance")?, 0., 1.)?, + default: bindings.state(required(object, "default_state")?.get(), false)?, + low: states(required(object, "low_states")?, bindings)?, + high: states(required(object, "high_states")?, bindings)?, + }, + "minecraft:dual_noise" => Choice::Dual { + states: states(required(object, "states")?, bindings)?, + variety: variety(required(object, "variety")?)?, + slow: decode_noise(required(object, "slow_noise")?.get())? + .create(&mut WorldgenRandom::new(LegacyRandom::new(seed)))?, + scale: positive(required(object, "slow_scale")?)?, + }, + _ => return Err(DecodeError::Field("noise state provider type")), + }; + Ok(Self { + noise, + scale, + choice, + }) + } + pub fn sample<E>( + &self, + random: &mut impl RandomSource, + p: [i32; 3], + ) -> Result<BlockStateId, StateProviderError<E>> { + let fast = || { + self.noise.get3( + f64::from(p[0]) * f64::from(self.scale), + f64::from(p[1]) * f64::from(self.scale), + f64::from(p[2]) * f64::from(self.scale), + ) + }; + Ok(match &self.choice { + Choice::States(states) => states[index(fast(), states.len())], + Choice::Threshold { + threshold, + chance, + default, + low, + high, + } => { + if fast() < *threshold { + low[random.next_int_bound(low.len() as i32)? as usize] + } else if random.next_float() < *chance { + high[random.next_int_bound(high.len() as i32)? as usize] + } else { + *default + } + } + Choice::Dual { + states, + variety, + slow, + scale, + } => { + // The slow path intentionally multiplies at float precision. + let sample = |p: [i32; 3]| { + slow.get3( + f64::from(p[0] as f32 * *scale), + f64::from(p[1] as f32 * *scale), + f64::from(p[2] as f32 * *scale), + ) + }; + let fraction = (f64::from(sample(p)) - -1.) / 2.; + let low = f64::from(variety[0]); + let high = f64::from(variety[1] + 1); + let count = (if fraction < 0. { + low + } else if fraction > 1. { + high + } else { + low + fraction * (high - low) + }) as i32; + if count <= 0 { + return Err(StateProviderError::EmptyNoiseSelection); + } + // Every candidate is a pure noise query. Compute just the one + // the final fast-noise lookup selects, avoiding a temporary list. + let selected = index(fast(), count as usize) as i32; + let offset = [ + p[0].wrapping_add(selected.wrapping_mul(54545)), + p[1], + p[2].wrapping_add(selected.wrapping_mul(34234)), + ]; + states[index(sample(offset), states.len())] + } + }) + } +} +fn index(noise: f32, count: usize) -> usize { + (((1.0f32 + noise) / 2.0f32).clamp(0., 0.9999) * count as f32) as usize +} +fn states( + raw: &RawValue, + bindings: &StateProviderBindings<'_>, +) -> Result<Vec<BlockStateId>, DecodeError> { + let values: Vec<Box<RawValue>> = serde_json::from_str(raw.get())?; + if values.is_empty() || values.len() > 8192 { + return Err(DecodeError::Field("noise provider states")); + } + values + .iter() + .map(|v| bindings.state(v.get(), false)) + .collect() +} +fn float(raw: &RawValue) -> Result<f32, DecodeError> { + number_text(raw)? + .parse() + .map_err(|_| DecodeError::Field("provider float")) +} +fn positive(raw: &RawValue) -> Result<f32, DecodeError> { + let value = float(raw)?; + if value > 0. && value <= f32::MAX { + Ok(value) + } else { + Err(DecodeError::Field("positive provider scale")) + } +} +fn range(raw: &RawValue, low: f32, high: f32) -> Result<f32, DecodeError> { + let value = float(raw)?; + if value.total_cmp(&low).is_ge() && value.total_cmp(&high).is_le() { + Ok(value) + } else { + Err(DecodeError::Field("provider float range")) + } +} +fn variety(raw: &RawValue) -> Result<[i32; 2], DecodeError> { + let range = if let Ok(value) = integer(raw) { + [value, value] + } else if let Ok(values) = serde_json::from_str::<Vec<Box<RawValue>>>(raw.get()) { + if values.len() != 2 { + return Err(DecodeError::Field("provider variety")); + } + [integer(&values[0])?, integer(&values[1])?] + } else { + let object: Object = serde_json::from_str(raw.get())?; + [ + int_range(required(&object, "min_inclusive")?, "variety", 1, 64)?, + int_range(required(&object, "max_inclusive")?, "variety", 1, 64)?, + ] + }; + if range[0] < 1 || range[1] > 64 || range[0] > range[1] { + Err(DecodeError::Field("provider variety")) + } else { + Ok(range) + } +} +// Gson's LONG codec truncates decimal tokens and retains the low 64 bits. +fn long(raw: &RawValue) -> Result<i64, DecodeError> { + let text = number_text(raw)?; + let negative = text.starts_with('-'); + let text = text.strip_prefix('-').unwrap_or(text); + let (mantissa, exponent) = match text.split_once(['e', 'E']) { + Some((m, e)) => ( + m, + e.parse::<i32>() + .map_err(|_| DecodeError::Field("long exponent"))? as i64, + ), + None => (text, 0), + }; + let (whole, fraction) = mantissa.split_once('.').unwrap_or((mantissa, "")); + let length = whole.len() as i64 + exponent; + if length <= 0 { + return Ok(0); + } + let zeroes = (length - (whole.len() + fraction.len()) as i64).max(0); + if zeroes >= 64 { + return Ok(0); + } + let mut result = 0u64; + for digit in whole.bytes().chain(fraction.bytes()).take(length as usize) { + result = result + .wrapping_mul(10) + .wrapping_add(u64::from(digit - b'0')); + } + for _ in 0..zeroes { + result = result.wrapping_mul(10); + } + Ok(if negative { + result.wrapping_neg() + } else { + result + } as i64) +} diff --git a/crates/horizon-world/src/worldgen/state_provider/properties.rs b/crates/horizon-world/src/worldgen/state_provider/properties.rs new file mode 100644 index 000000000..cac52e69e --- /dev/null +++ b/crates/horizon-world/src/worldgen/state_provider/properties.rs @@ -0,0 +1,206 @@ +//! Compact property transitions derived from the pinned Cartesian state tables. +use crate::registry::{BlockRegistry, BlockStateId}; +use std::collections::{BTreeMap, BTreeSet}; +#[derive(Clone, Copy, Debug)] +struct Address { + block: usize, + local: usize, +} +#[derive(Debug)] +struct Property { + identity: usize, + name: String, + values: Vec<String>, + lookup: BTreeMap<String, usize>, + numeric: Option<BTreeMap<i32, usize>>, + stride: usize, +} +#[derive(Debug)] +struct Block { + states: Vec<BlockStateId>, + properties: Vec<Property>, +} +#[derive(Debug)] +pub(crate) struct StateProperties { + blocks: Vec<Block>, + addresses: Vec<Address>, +} +impl StateProperties { + pub fn build( + registry: &BlockRegistry, + integers: &BTreeSet<(String, String)>, + ) -> Result<Self, String> { + let mut grouped = BTreeMap::<String, Vec<BlockStateId>>::new(); + for index in 0..registry.len() { + let id = BlockStateId(index as u32); + grouped + .entry(registry.state(id).unwrap().name.clone()) + .or_default() + .push(id); + } + let mut identities = BTreeMap::new(); + let mut result = Self { + blocks: Vec::new(), + addresses: vec![Address { block: 0, local: 0 }; registry.len()], + }; + for (name, states) in grouped { + let mut properties = Vec::new(); + let first = registry.state(states[0]).unwrap(); + for (property, initial) in &first.properties { + let mut values = Vec::new(); + let mut lookup = BTreeMap::new(); + let mut stride = None; + for (index, id) in states.iter().enumerate() { + let state = registry.state(*id).unwrap(); + if state.properties.len() != first.properties.len() { + return Err("inconsistent block properties".into()); + } + let value = state + .properties + .get(property) + .ok_or("missing block property")?; + if value != initial && stride.is_none() { + stride = Some(index); + } + if !lookup.contains_key(value) { + lookup.insert(value.clone(), values.len()); + values.push(value.clone()); + } + } + let stride = stride.unwrap_or(1); + for (index, id) in states.iter().enumerate() { + if registry.state(*id).unwrap().properties[property] + != values[(index / stride) % values.len()] + { + return Err("non-Cartesian property state order".into()); + } + } + let integer = integers.contains(&(name.clone(), property.clone())); + // In the pinned registry these signatures uniquely identify + // Java Property.equals families; the native harness checks this. + let signature = ( + property.clone(), + integer, + lookup.keys().cloned().collect::<Vec<_>>(), + ); + let next = identities.len(); + let identity = *identities.entry(signature).or_insert(next); + let numeric = if integer { + Some( + values + .iter() + .enumerate() + .map(|(i, s)| { + s.parse::<i32>() + .map(|v| (v, i)) + .map_err(|_| "invalid integer property".to_owned()) + }) + .collect::<Result<_, _>>()?, + ) + } else { + None + }; + properties.push(Property { + identity, + name: property.clone(), + values, + lookup, + numeric, + stride, + }); + } + let mut dimensions = properties + .iter() + .filter(|p| p.values.len() > 1) + .collect::<Vec<_>>(); + dimensions.sort_by_key(|p| p.stride); + let mut size = 1usize; + for p in dimensions { + if p.stride != size { + return Err("overlapping property state dimensions".into()); + } + size = size + .checked_mul(p.values.len()) + .ok_or("property state size overflow")?; + } + if size != states.len() { + return Err("incomplete Cartesian state table".into()); + } + for (local, id) in states.iter().enumerate() { + result.addresses[id.0 as usize] = Address { + block: result.blocks.len(), + local, + }; + } + result.blocks.push(Block { states, properties }); + } + Ok(result) + } + pub fn copy(&self, target: BlockStateId, source: BlockStateId) -> Option<BlockStateId> { + let mut target = *self.addresses.get(target.0 as usize)?; + let source = *self.addresses.get(source.0 as usize)?; + let block = &self.blocks[target.block]; + for source_property in &self.blocks[source.block].properties { + if let Some(property) = block + .properties + .iter() + .find(|p| p.identity == source_property.identity) + { + let value = &source_property.values + [(source.local / source_property.stride) % source_property.values.len()]; + let index = *property.lookup.get(value)?; + let previous = (target.local / property.stride) % property.values.len(); + target.local = target.local - previous * property.stride + index * property.stride; + } + } + block.states.get(target.local).copied() + } + pub fn has_integer(&self, state: BlockStateId, name: &str) -> Option<bool> { + let address = self.addresses.get(state.0 as usize)?; + Some( + self.blocks[address.block] + .properties + .iter() + .any(|p| p.name == name && p.numeric.is_some()), + ) + } + pub fn set_integer(&self, state: BlockStateId, name: &str, value: i32) -> Option<BlockStateId> { + let address = self.addresses.get(state.0 as usize)?; + let block = &self.blocks[address.block]; + let property = block.properties.iter().find(|p| p.name == name)?; + let index = property.numeric.as_ref()?.get(&value)?; + let previous = (address.local / property.stride) % property.values.len(); + block + .states + .get(address.local - previous * property.stride + index * property.stride) + .copied() + } + + fn property(&self, state: BlockStateId, name: &str) -> Option<(Address, &Property)> { + let address = *self.addresses.get(state.0 as usize)?; + let property = self.blocks[address.block] + .properties + .iter() + .find(|p| p.name == name)?; + Some((address, property)) + } + /// The state's value for a named property, or None when it has no such property. + pub fn value(&self, state: BlockStateId, name: &str) -> Option<&str> { + let (address, property) = self.property(state, name)?; + Some(&property.values[(address.local / property.stride) % property.values.len()]) + } + /// All values of the state's named property in registry encounter order. + pub fn values(&self, state: BlockStateId, name: &str) -> Option<&[String]> { + self.property(state, name).map(|(_, p)| p.values.as_slice()) + } + /// Replace one property value, or None for a missing property or value. + pub fn with_value(&self, state: BlockStateId, name: &str, value: &str) -> Option<BlockStateId> { + let (address, property) = self.property(state, name)?; + let index = *property.lookup.get(value)?; + let previous = (address.local / property.stride) % property.values.len(); + self.blocks[address.block] + .states + .get(address.local - previous * property.stride + index * property.stride) + .copied() + } +} diff --git a/crates/horizon-world/src/worldgen/structure.rs b/crates/horizon-world/src/worldgen/structure.rs new file mode 100644 index 000000000..1eeefecbb --- /dev/null +++ b/crates/horizon-world/src/worldgen/structure.rs @@ -0,0 +1,353 @@ +//! Structure templates, processors and placement shared by template features +//! and structure pieces. +pub mod features; +pub mod jigsaw; +pub mod mansion; +pub mod monument; +pub mod legacy; +pub mod mineshaft; +pub mod ocean_ruin; +pub mod processor; +pub mod ruined_portal; +pub mod simple; +pub mod start; +pub mod stronghold; +pub mod template; +pub mod temple; + +use crate::{ + nbt::{self, Limits}, + registry::{BlockRegistry, BlockStateId}, +}; +use horizon_core::geometry::Direction; +use processor::ProcessorList; +use std::{ + collections::{BTreeMap, BTreeSet, HashMap}, + io::Read, + path::{Path, PathBuf}, + sync::{Arc, RwLock}, +}; +pub use template::{BlockInfo, JigsawInfo, StructureTemplate}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub enum Rotation { + None, + Clockwise90, + Clockwise180, + Counterclockwise90, +} +impl Rotation { + pub const ALL: [Self; 4] = [ + Self::None, + Self::Clockwise90, + Self::Clockwise180, + Self::Counterclockwise90, + ]; + pub fn from_name(name: &str) -> Option<Self> { + Some(match name { + "none" => Self::None, + "clockwise_90" => Self::Clockwise90, + "180" => Self::Clockwise180, + "counterclockwise_90" => Self::Counterclockwise90, + _ => return None, + }) + } + /// Rotation.getRandom: one bounded draw over the four values. + pub fn random(random: &mut impl horizon_core::random::RandomSource) -> Self { + Self::ALL[random.next_int_bound(4).unwrap_or(0) as usize] + } + pub fn rotate_direction(self, direction: Direction) -> Direction { + if matches!(direction, Direction::Up | Direction::Down) { + return direction; + } + let order = [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, + ]; + let index = order.iter().position(|d| *d == direction).unwrap(); + order[(index + self as usize) % 4] + } + pub fn get_rotated(self, other: Self) -> Self { + Self::ALL[(self as usize + other as usize) % 4] + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub enum Mirror { + None, + LeftRight, + FrontBack, +} + +/// Inclusive integer box (vanilla BoundingBox). +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub struct BoundingBox { + pub min: [i32; 3], + pub max: [i32; 3], +} +impl BoundingBox { + pub fn new(min: [i32; 3], max: [i32; 3]) -> Self { + Self { min, max } + } + pub fn from_corners(a: [i32; 3], b: [i32; 3]) -> Self { + Self { + min: std::array::from_fn(|i| a[i].min(b[i])), + max: std::array::from_fn(|i| a[i].max(b[i])), + } + } + pub fn moved(self, d: [i32; 3]) -> Self { + Self { + min: std::array::from_fn(|i| self.min[i] + d[i]), + max: std::array::from_fn(|i| self.max[i] + d[i]), + } + } + pub fn is_inside(&self, p: [i32; 3]) -> bool { + (0..3).all(|i| p[i] >= self.min[i] && p[i] <= self.max[i]) + } + pub fn intersects(&self, other: &Self) -> bool { + (0..3).all(|i| self.max[i] >= other.min[i] && self.min[i] <= other.max[i]) + } + pub fn encapsulate(&mut self, other: &Self) { + for i in 0..3 { + self.min[i] = self.min[i].min(other.min[i]); + self.max[i] = self.max[i].max(other.max[i]); + } + } + pub fn inflated(self, xz: i32, y: i32) -> Self { + Self { + min: [self.min[0] - xz, self.min[1] - y, self.min[2] - xz], + max: [self.max[0] + xz, self.max[1] + y, self.max[2] + xz], + } + } + pub fn span(&self) -> [i32; 3] { + std::array::from_fn(|i| self.max[i] - self.min[i] + 1) + } + pub fn center(&self) -> [i32; 3] { + std::array::from_fn(|i| self.min[i] + (self.max[i] - self.min[i] + 1) / 2) + } + pub fn corners(&self) -> [[i32; 3]; 8] { + let (a, b) = (self.min, self.max); + [ + [a[0], a[1], a[2]], + [a[0], a[1], b[2]], + [a[0], b[1], a[2]], + [a[0], b[1], b[2]], + [b[0], a[1], a[2]], + [b[0], a[1], b[2]], + [b[0], b[1], a[2]], + [b[0], b[1], b[2]], + ] + } +} + +/// Per-state BlockState.rotate/mirror results and template ordering flags, +/// exported from vanilla (`blocks/structure-blocks.json`). +#[derive(Debug, Default)] +pub struct StateTransforms { + rotate: Vec<[u32; 3]>, + mirror: Vec<[u32; 2]>, + full: Vec<bool>, + loot: BTreeSet<BlockStateId>, +} +impl StateTransforms { + pub fn from_json(json: &str, states: usize) -> Result<Self, super::DecodeError> { + let value: serde_json::Value = serde_json::from_str(json)?; + let arr = |key: &'static str| { + value[key] + .as_array() + .cloned() + .ok_or(super::DecodeError::Field(key)) + }; + let ids = |v: &serde_json::Value| -> Vec<u32> { + v.as_array() + .map(|a| { + a.iter() + .filter_map(|x| x.as_u64()) + .map(|x| x as u32) + .collect() + }) + .unwrap_or_default() + }; + let rotate = arr("rotate")? + .iter() + .map(|v| { + let v = ids(v); + [v[0], v[1], v[2]] + }) + .collect::<Vec<_>>(); + let mirror = arr("mirror")? + .iter() + .map(|v| { + let v = ids(v); + [v[0], v[1]] + }) + .collect::<Vec<_>>(); + let full = arr("full_block")? + .iter() + .map(|v| v.as_bool().unwrap_or(false)) + .collect::<Vec<_>>(); + if rotate.len() != states || mirror.len() != states || full.len() != states { + return Err(super::DecodeError::Field("structure block table size")); + } + let loot = ids(&value["loot_containers"]) + .into_iter() + .map(BlockStateId) + .collect(); + Ok(Self { + rotate, + mirror, + full, + loot, + }) + } + pub fn rotate(&self, state: BlockStateId, rotation: Rotation) -> BlockStateId { + match rotation { + Rotation::None => state, + r => self + .rotate + .get(state.0 as usize) + .map_or(state, |t| BlockStateId(t[r as usize - 1])), + } + } + pub fn mirror(&self, state: BlockStateId, mirror: Mirror) -> BlockStateId { + match mirror { + Mirror::None => state, + m => self + .mirror + .get(state.0 as usize) + .map_or(state, |t| BlockStateId(t[m as usize - 1])), + } + } + pub fn full_block(&self, state: BlockStateId) -> bool { + self.full.get(state.0 as usize).copied().unwrap_or(false) + } + pub fn loot_container(&self, state: BlockStateId) -> bool { + self.loot.contains(&state) + } +} + +/// Lazily loaded templates (`structure/<namespace>/<path>.nbt`, gzip NBT) and +/// processor lists, shared by all generators of one resource bundle. +pub struct StructureResources { + pub registry: &'static BlockRegistry, + pub transforms: StateTransforms, + dir: PathBuf, + templates: RwLock<HashMap<String, Option<Arc<StructureTemplate>>>>, + pub processor_lists: BTreeMap<String, String>, + jigsaw_states: BTreeMap<BlockStateId, bool>, + pub(crate) waterlogged: HashMap<BlockStateId, BlockStateId>, + sources: BTreeSet<BlockStateId>, + /// Block names in each block tag, for processors matching tags by block. + pub block_tags: BTreeMap<String, BTreeSet<String>>, +} +impl std::fmt::Debug for StructureResources { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str("StructureResources") + } +} +impl StructureResources { + pub fn new( + registry: &'static BlockRegistry, + transforms: StateTransforms, + dir: &Path, + processor_lists: BTreeMap<String, String>, + block_tags: &BTreeMap<String, Vec<String>>, + ) -> Self { + let mut sources = BTreeSet::new(); + let fluids = crate::fluid::FluidStateTable::new(registry).ok(); + let mut jigsaw_states = BTreeMap::new(); + let mut waterlogged = HashMap::new(); + for id in 0..registry.len() { + let id = BlockStateId(id as u32); + let state = registry.state(id).unwrap(); + if state.name == "minecraft:jigsaw" { + let orientation = state + .properties + .get("orientation") + .cloned() + .unwrap_or_default(); + let front = orientation.split('_').next().unwrap_or(""); + jigsaw_states.insert(id, !matches!(front, "up" | "down")); + } + if fluids + .as_ref() + .and_then(|table| table.get(id)) + .is_some_and(|fluid| fluid.is_source()) + { + sources.insert(id); + } + if state.properties.get("waterlogged").map(String::as_str) == Some("false") { + let mut wet = state.clone(); + wet.properties.insert("waterlogged".into(), "true".into()); + if let Some(wet) = registry.id(&wet) { + waterlogged.insert(id, wet); + } + } + } + Self { + registry, + transforms, + dir: dir.to_owned(), + templates: RwLock::new(HashMap::new()), + processor_lists, + jigsaw_states, + waterlogged, + sources, + block_tags: block_tags + .iter() + .map(|(k, v)| (k.clone(), v.iter().cloned().collect())) + .collect(), + } + } + /// StructureTemplateManager.getOrCreate; missing templates are empty. + pub fn template(&self, id: &str) -> Option<Arc<StructureTemplate>> { + let id = if id.contains(':') { + id.to_owned() + } else { + format!("minecraft:{id}") + }; + if let Some(found) = self.templates.read().unwrap().get(&id) { + return found.clone(); + } + let (namespace, path) = id.split_once(':').unwrap(); + let file = self.dir.join(namespace).join(format!("{path}.nbt")); + let loaded = std::fs::read(&file).ok().and_then(|bytes| { + let mut raw = Vec::new(); + flate2::read::GzDecoder::new(bytes.as_slice()) + .read_to_end(&mut raw) + .ok()?; + let limits = Limits { + max_bytes: 1 << 28, + ..Limits::default() + }; + let tag = nbt::read_named(&raw, limits).ok()?.0.tag; + Some(Arc::new(StructureTemplate::from_nbt( + &tag, + self.registry, + &self.transforms, + ))) + }); + // StructureTemplateManager.getOrCreate: missing templates are empty. + let loaded = loaded.or_else(|| Some(Arc::new(StructureTemplate::empty()))); + self.templates.write().unwrap().insert(id, loaded.clone()); + loaded + } + /// Whether the state's fluid is a source (water/lava level 0, waterlogged). + pub fn source_fluid(&self, state: BlockStateId) -> bool { + self.sources.contains(&state) + } + pub fn jigsaw_horizontal(&self, state: BlockStateId) -> Option<bool> { + self.jigsaw_states.get(&state).copied() + } + pub fn processor_list( + &self, + json: &str, + bindings: &super::block_feature::FeatureBlockBindings<'_>, + ) -> Result<ProcessorList, super::DecodeError> { + ProcessorList::decode(json, self, bindings) + } + pub fn is_jigsaw(&self, state: BlockStateId) -> bool { + self.jigsaw_states.contains_key(&state) + } +} diff --git a/crates/horizon-world/src/worldgen/structure/features.rs b/crates/horizon-world/src/worldgen/structure/features.rs new file mode 100644 index 000000000..73eecc808 --- /dev/null +++ b/crates/horizon-world/src/worldgen/structure/features.rs @@ -0,0 +1,231 @@ +//! The `template` and `fossil` configured features. +use super::{ + BoundingBox, Mirror, Rotation, StructureResources, StructureTemplate, + processor::{PlaceSettings, ProcessorList, place_in_world}, +}; +use crate::{ + heightmap::HeightmapType, + worldgen::{ + DecodeError, + block_feature::FeatureBlockBindings, + feature::FeatureWorld, + placement::{PlacementContext, PlacementQueryError}, + weighted::WeightedList, + }, +}; +use horizon_core::random::RandomSource; +use serde_json::{Value, value::RawValue}; +use std::sync::Arc; + +fn resources(bindings: &FeatureBlockBindings<'_>) -> Result<Arc<StructureResources>, DecodeError> { + bindings + .structures + .clone() + .ok_or(DecodeError::Field("structure template bindings")) +} +fn template( + resources: &StructureResources, + id: &str, +) -> Result<Arc<StructureTemplate>, DecodeError> { + resources + .template(id) + .ok_or_else(|| DecodeError::Registry(format!("missing structure template {id}"))) +} + +#[derive(Clone, Debug)] +pub struct TemplateFeature { + templates: WeightedList<(Arc<StructureTemplate>, Vec<Rotation>)>, + processors: ProcessorList, + resources: Arc<StructureResources>, +} +impl TemplateFeature { + pub fn decode(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + let resources = resources(bindings)?; + let value: Value = serde_json::from_str(json)?; + let raw: Box<RawValue> = serde_json::from_str(&value["templates"].to_string())?; + let templates = WeightedList::decode(&raw, |entry| { + let entry: Value = serde_json::from_str(entry.get())?; + let id = entry["id"] + .as_str() + .ok_or(DecodeError::Field("template id"))?; + let rotations = match entry.get("rotations").and_then(Value::as_array) { + Some(list) => list + .iter() + .map(|r| { + r.as_str() + .and_then(Rotation::from_name) + .ok_or(DecodeError::Field("rotation")) + }) + .collect::<Result<Vec<_>, _>>()?, + None => Rotation::ALL.to_vec(), + }; + Ok((template(&resources, id)?, rotations)) + })?; + let processors = match value.get("processors") { + Some(p) => ProcessorList::decode(&p.to_string(), &resources, bindings)?, + None => ProcessorList::default(), + }; + Ok(Self { + templates, + processors, + resources, + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + let invalid = |_| PlacementQueryError::Failed("template weights".into()); + let (template, rotations) = self.templates.sample(random).map_err(invalid)?; + let rotation = rotations[random + .next_int_bound(rotations.len() as i32) + .map_err(invalid)? as usize]; + // rotation.rotate(axis.getNegative()) * (size along axis / 2), for X then Z. + let mut pos = origin; + for (axis, negative) in [ + (0, horizon_core::geometry::Direction::West), + (2, horizon_core::geometry::Direction::North), + ] { + let step = rotation.rotate_direction(negative).normal(); + let length = template.size[axis] / 2; + for i in 0..3 { + pos[i] += step[i] * length; + } + } + let mut settings = PlaceSettings::new(rotation).with_processors(&self.processors); + settings.random = Some(random); + place_in_world( + world, + &self.resources, + template, + pos, + pos, + &mut settings, + None, + 3, + ) + } +} + +#[derive(Clone, Debug)] +pub struct FossilFeature { + fossils: Vec<(Arc<StructureTemplate>, Arc<StructureTemplate>)>, + fossil_processors: ProcessorList, + overlay_processors: ProcessorList, + max_empty_corners: i32, + resources: Arc<StructureResources>, +} +impl FossilFeature { + pub fn decode(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + let resources = resources(bindings)?; + let value: Value = serde_json::from_str(json)?; + let list = |key: &'static str| -> Result<Vec<Arc<StructureTemplate>>, DecodeError> { + value[key] + .as_array() + .ok_or(DecodeError::Field(key))? + .iter() + .map(|id| template(&resources, id.as_str().unwrap_or_default())) + .collect() + }; + let (base, overlay) = (list("fossil_structures")?, list("overlay_structures")?); + if base.is_empty() || base.len() != overlay.len() { + return Err(DecodeError::Field("fossil structure lists")); + } + Ok(Self { + fossils: base.into_iter().zip(overlay).collect(), + fossil_processors: ProcessorList::decode( + &value["fossil_processors"].to_string(), + &resources, + bindings, + )?, + overlay_processors: ProcessorList::decode( + &value["overlay_processors"].to_string(), + &resources, + bindings, + )?, + max_empty_corners: value["max_empty_corners_allowed"].as_i64().unwrap_or(0) as i32, + resources, + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + ) -> Result<bool, PlacementQueryError> { + let invalid = |_| PlacementQueryError::Failed("fossil bounds".into()); + let rotation = Rotation::random(random); + let index = random + .next_int_bound(self.fossils.len() as i32) + .map_err(invalid)? as usize; + let (base, overlay) = &self.fossils[index]; + let (cx, cz) = (origin[0] >> 4, origin[2] >> 4); + let bounds = BoundingBox::new( + [cx * 16 - 16, world.min_y()?, cz * 16 - 16], + [cx * 16 + 15 + 16, world.max_y()?, cz * 16 + 15 + 16], + ); + let size = base.size(rotation); + let low = [origin[0] - size[0] / 2, 0, origin[2] - size[2] / 2]; + let mut lowest = origin[1]; + for x in 0..size[0] { + for z in 0..size[2] { + lowest = lowest.min(world.height( + HeightmapType::OceanFloorWg, + low[0] + x, + low[2] + z, + )?); + } + } + let y = + (lowest - 15 - random.next_int_bound(10).map_err(invalid)?).max(world.min_y()? + 10); + let target = StructureTemplate::zero_position_with_transform( + [low[0], y, low[2]], + Mirror::None, + rotation, + base.size[0], + base.size[2], + ); + let mut empty = 0; + for corner in base + .bounding_box(target, rotation, [0; 3], Mirror::None) + .corners() + { + let state = world.block_state(corner)?; + let name = &self.resources.registry.state(state).unwrap().name; + if matches!( + name.as_str(), + "minecraft:air" + | "minecraft:cave_air" + | "minecraft:void_air" + | "minecraft:lava" + | "minecraft:water" + ) { + empty += 1; + } + } + if empty > self.max_empty_corners { + return Ok(false); + } + for (template, processors) in [ + (base, &self.fossil_processors), + (overlay, &self.overlay_processors), + ] { + let mut settings = PlaceSettings::new(rotation).with_processors(processors); + settings.bounding_box = Some(bounds); + settings.random = Some(&mut *random); + place_in_world( + world, + &self.resources, + template, + target, + target, + &mut settings, + None, + 260, + )?; + } + Ok(true) + } +} diff --git a/crates/horizon-world/src/worldgen/structure/jigsaw.rs b/crates/horizon-world/src/worldgen/structure/jigsaw.rs new file mode 100644 index 000000000..d78c12f57 --- /dev/null +++ b/crates/horizon-world/src/worldgen/structure/jigsaw.rs @@ -0,0 +1,851 @@ +//! Template pools, pool elements and JigsawPlacement. +use super::{ + BoundingBox, Mirror, Rotation, StructureResources, StructureTemplate, + processor::{PlaceSettings, Processor, ProcessorList, place_in_world}, +}; +use crate::{ + heightmap::HeightmapType, + worldgen::{ + DecodeError, + block_feature::FeatureBlockBindings, + feature::FeatureWorld, + placement::{PlacementContext, PlacementQueryError}, + }, +}; +use horizon_core::{ + geometry::Direction, + position::BlockPos, + random::{LegacyRandom, RandomSource, position_seed}, +}; +use serde_json::Value; +use std::{ + cell::RefCell, + collections::{BTreeMap, HashMap, VecDeque}, + rc::Rc, + sync::{Arc, OnceLock, RwLock}, +}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Projection { + Rigid, + TerrainMatching, +} +#[derive(Debug)] +pub enum PoolElement { + Empty, + Single { + template: Arc<StructureTemplate>, + processors: ProcessorList, + legacy: bool, + projection: Projection, + waterlogging: Option<bool>, + }, + Feature { + feature: String, + projection: Projection, + }, + List { + elements: Vec<PoolElement>, + projection: Projection, + }, +} +#[derive(Clone, Debug)] +pub struct Jigsaw { + pub pos: [i32; 3], + pub front: Direction, + pub top: Direction, + pub rollable: bool, + pub name: Option<String>, + pub pool: String, + pub target: String, + pub placement_priority: i32, + pub selection_priority: i32, +} +fn direction(name: &str) -> Direction { + match name { + "down" => Direction::Down, + "up" => Direction::Up, + "north" => Direction::North, + "south" => Direction::South, + "west" => Direction::West, + _ => Direction::East, + } +} +fn opposite(d: Direction) -> Direction { + match d { + Direction::Down => Direction::Up, + Direction::Up => Direction::Down, + Direction::North => Direction::South, + Direction::South => Direction::North, + Direction::West => Direction::East, + Direction::East => Direction::West, + } +} +fn step(d: Direction) -> [i32; 3] { + let n = d.normal(); + [n[0], n[1], n[2]] +} +fn shuffle<T>(list: &mut [T], random: &mut impl RandomSource) { + for i in (2..=list.len()).rev() { + let swap = random.next_int_bound(i as i32).unwrap_or(0) as usize; + list.swap(i - 1, swap); + } +} +fn projection(value: &Value) -> Result<Projection, DecodeError> { + match value["projection"].as_str() { + Some("rigid") => Ok(Projection::Rigid), + Some("terrain_matching") => Ok(Projection::TerrainMatching), + _ => Err(DecodeError::Field("pool element projection")), + } +} +impl PoolElement { + fn decode( + value: &Value, + resources: &StructureResources, + bindings: &FeatureBlockBindings<'_>, + inherited: Option<Projection>, + ) -> Result<Self, DecodeError> { + let kind = value["element_type"].as_str().unwrap_or_default(); + let projection = || match inherited { + Some(p) => Ok(p), + None => projection(value), + }; + Ok(match kind { + "minecraft:empty_pool_element" => Self::Empty, + "minecraft:single_pool_element" | "minecraft:legacy_single_pool_element" => { + let location = value["location"] + .as_str() + .ok_or(DecodeError::Field("location"))?; + Self::Single { + template: resources.template(location).ok_or_else(|| { + DecodeError::Registry(format!("missing template {location}")) + })?, + processors: ProcessorList::decode( + &value["processors"].to_string(), + resources, + bindings, + )?, + legacy: kind == "minecraft:legacy_single_pool_element", + projection: projection()?, + waterlogging: match value + .get("override_liquid_settings") + .and_then(Value::as_str) + { + Some("apply_waterlogging") => Some(true), + Some("ignore_waterlogging") => Some(false), + _ => None, + }, + } + } + "minecraft:feature_pool_element" => Self::Feature { + feature: value["feature"].as_str().unwrap_or_default().to_owned(), + projection: projection()?, + }, + "minecraft:list_pool_element" => { + let p = projection()?; + Self::List { + elements: value["elements"] + .as_array() + .ok_or(DecodeError::Field("list elements"))? + .iter() + .map(|e| Self::decode(e, resources, bindings, Some(p))) + .collect::<Result<_, _>>()?, + projection: p, + } + } + _ => return Err(DecodeError::Field("pool element type")), + }) + } + pub fn projection(&self) -> Projection { + match self { + Self::Empty => Projection::TerrainMatching, + Self::Single { projection, .. } + | Self::Feature { projection, .. } + | Self::List { projection, .. } => *projection, + } + } + pub fn size(&self, rotation: Rotation) -> [i32; 3] { + match self { + Self::Empty | Self::Feature { .. } => [0; 3], + Self::Single { template, .. } => template.size(rotation), + Self::List { elements, .. } => elements.iter().fold([0; 3], |acc, e| { + let s = e.size(rotation); + std::array::from_fn(|i| acc[i].max(s[i])) + }), + } + } + pub fn bounding_box(&self, position: [i32; 3], rotation: Rotation) -> BoundingBox { + match self { + Self::Empty => BoundingBox::new(position, position), + Self::Feature { .. } => BoundingBox::new(position, position), + Self::Single { template, .. } => { + template.bounding_box(position, rotation, [0; 3], Mirror::None) + } + Self::List { elements, .. } => { + let mut boxes = elements + .iter() + .filter(|e| !matches!(e, Self::Empty)) + .map(|e| e.bounding_box(position, rotation)); + let mut first = boxes.next().unwrap_or(BoundingBox::new(position, position)); + for b in boxes { + first.encapsulate(&b); + } + first + } + } + } + /// getShuffledJigsawBlocks. + pub fn shuffled_jigsaws( + &self, + resources: &StructureResources, + position: [i32; 3], + rotation: Rotation, + random: &mut impl RandomSource, + ) -> Vec<Jigsaw> { + match self { + Self::Empty => Vec::new(), + Self::Feature { .. } => vec![Jigsaw { + pos: position, + front: Direction::Down, + top: Direction::South, + rollable: true, + name: None, + pool: "minecraft:empty".into(), + target: "minecraft:empty".into(), + placement_priority: 0, + selection_priority: 0, + }], + Self::List { elements, .. } => elements + .first() + .map(|e| e.shuffled_jigsaws(resources, position, rotation, random)) + .unwrap_or_default(), + Self::Single { template, .. } => { + let mut jigsaws = template_jigsaws(resources, template, position, rotation); + shuffle(&mut jigsaws, random); + jigsaws.sort_by_key(|j| std::cmp::Reverse(j.selection_priority)); + jigsaws + } + } + } + pub fn ground_level_delta(&self) -> i32 { + 1 + } +} +/// StructureTemplate.getJigsaws: palette chosen by a position-seeded random. +fn template_jigsaws( + resources: &StructureResources, + template: &StructureTemplate, + position: [i32; 3], + rotation: Rotation, +) -> Vec<Jigsaw> { + if template.palettes().is_empty() { + return Vec::new(); + } + let palette = LegacyRandom::new(position_seed(BlockPos::new( + position[0], + position[1], + position[2], + ))) + .next_int_bound(template.palettes().len() as i32) + .unwrap_or(0) as usize; + template + .jigsaws(palette, &|state| resources.jigsaw_horizontal(state)) + .iter() + .map(|j| { + let relative = StructureTemplate::transform(j.info.pos, Mirror::None, rotation, [0; 3]); + let state = resources.transforms.rotate(j.info.state, rotation); + let orientation = resources + .registry + .state(state) + .and_then(|s| s.properties.get("orientation").cloned()) + .unwrap_or_default(); + let (front, top) = orientation.split_once('_').unwrap_or(("north", "up")); + Jigsaw { + pos: std::array::from_fn(|i| relative[i] + position[i]), + front: direction(front), + top: direction(top), + rollable: j.rollable, + name: Some(j.name.clone()), + pool: j.pool.clone(), + target: j.target.clone(), + placement_priority: j.placement_priority, + selection_priority: j.selection_priority, + } + }) + .collect() +} +fn can_attach(source: &Jigsaw, target: &Jigsaw) -> bool { + source.front == opposite(target.front) + && (source.rollable || source.top == target.top) + && target + .name + .as_ref() + .is_none_or(|name| *name == source.target) +} + +#[derive(Debug)] +pub struct Pool { + templates: Vec<Arc<PoolElement>>, + fallback: String, + max_size: OnceLock<i32>, +} +impl Pool { + fn random_template(&self, random: &mut impl RandomSource) -> Arc<PoolElement> { + if self.templates.is_empty() { + return Arc::new(PoolElement::Empty); + } + self.templates[random + .next_int_bound(self.templates.len() as i32) + .unwrap_or(0) as usize] + .clone() + } + fn shuffled(&self, random: &mut impl RandomSource) -> Vec<Arc<PoolElement>> { + let mut copy = self.templates.clone(); + shuffle(&mut copy, random); + copy + } + fn max_size(&self) -> i32 { + *self.max_size.get_or_init(|| { + self.templates + .iter() + .filter(|t| !matches!(t.as_ref(), PoolElement::Empty)) + .map(|t| t.bounding_box([0; 3], Rotation::None).span()[1]) + .max() + .unwrap_or(0) + }) + } +} +/// Lazily decoded template pools. +pub struct Pools { + raw: BTreeMap<String, String>, + decoded: RwLock<HashMap<String, Option<Arc<Pool>>>>, +} +impl std::fmt::Debug for Pools { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str("Pools") + } +} +impl Pools { + pub fn new(raw: BTreeMap<String, String>) -> Self { + Self { + raw, + decoded: RwLock::new(HashMap::new()), + } + } + pub fn get( + &self, + name: &str, + resources: &StructureResources, + bindings: &FeatureBlockBindings<'_>, + ) -> Option<Arc<Pool>> { + if let Some(found) = self.decoded.read().unwrap().get(name) { + return found.clone(); + } + let pool = self.raw.get(name).and_then(|json| { + let value: Value = serde_json::from_str(json).ok()?; + let mut templates = Vec::new(); + for entry in value["elements"].as_array()? { + let element = + match PoolElement::decode(&entry["element"], resources, bindings, None) { + Ok(element) => Arc::new(element), + Err(error) => { + if std::env::var_os("HORIZON_JIGSAW_DEBUG").is_some() { + eprintln!("pool {name}: {error}"); + } + return None; + } + }; + for _ in 0..entry["weight"].as_i64().unwrap_or(1) { + templates.push(element.clone()); + } + } + Some(Arc::new(Pool { + templates, + fallback: value["fallback"] + .as_str() + .unwrap_or("minecraft:empty") + .to_owned(), + max_size: OnceLock::new(), + })) + }); + self.decoded + .write() + .unwrap() + .insert(name.to_owned(), pool.clone()); + pool + } +} + +#[derive(Clone, Copy, Debug)] +pub struct Junction { + pub source_x: i32, + pub source_ground_y: i32, + pub source_z: i32, +} +#[derive(Debug)] +pub struct PoolPiece { + pub element: Arc<PoolElement>, + pub position: [i32; 3], + pub ground_level_delta: i32, + pub rotation: Rotation, + pub bounding_box: BoundingBox, + pub junctions: Vec<Junction>, + pub waterlogging: bool, +} +impl PoolPiece { + fn moved(&mut self, dy: i32) { + self.position[1] += dy; + self.bounding_box = self.bounding_box.moved([0, dy, 0]); + } + /// PoolElementStructurePiece.postProcess. + #[allow(clippy::too_many_arguments)] + pub fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + resources: &StructureResources, + random: &mut R, + chunk_box: BoundingBox, + reference: [i32; 3], + place_feature: &mut PlaceFeature<'_, W, R>, + ) -> Result<bool, PlacementQueryError> { + place_element( + &self.element, + world, + resources, + random, + chunk_box, + self.position, + reference, + self.rotation, + self.waterlogging, + place_feature, + ) + } +} +static GRAVITY: OnceLock<Processor> = OnceLock::new(); +static IGNORE_STRUCTURE_BLOCK: OnceLock<Processor> = OnceLock::new(); +static IGNORE_STRUCTURE_AND_AIR: OnceLock<Processor> = OnceLock::new(); +#[allow(clippy::too_many_arguments)] +fn place_element<W: FeatureWorld + PlacementContext, R: RandomSource>( + element: &PoolElement, + world: &mut W, + resources: &StructureResources, + random: &mut R, + chunk_box: BoundingBox, + position: [i32; 3], + reference: [i32; 3], + rotation: Rotation, + waterlogging: bool, + place_feature: &mut PlaceFeature<'_, W, R>, +) -> Result<bool, PlacementQueryError> { + match element { + PoolElement::Empty => Ok(true), + PoolElement::Feature { feature, .. } => place_feature(world, random, feature, position), + PoolElement::List { elements, .. } => { + for e in elements { + if !place_element( + e, + world, + resources, + random, + chunk_box, + position, + reference, + rotation, + waterlogging, + place_feature, + )? { + return Ok(false); + } + } + Ok(true) + } + PoolElement::Single { + template, + processors, + legacy, + projection, + waterlogging: override_liquid, + } => { + let ignore = if *legacy { + IGNORE_STRUCTURE_AND_AIR.get_or_init(|| { + Processor::BlockIgnore( + [ + "minecraft:structure_block".to_owned(), + "minecraft:air".to_owned(), + ] + .into(), + ) + }) + } else { + IGNORE_STRUCTURE_BLOCK.get_or_init(|| { + Processor::BlockIgnore(["minecraft:structure_block".to_owned()].into()) + }) + }; + let mut settings = PlaceSettings::new(rotation); + settings.bounding_box = Some(chunk_box); + settings.waterlogging = override_liquid.unwrap_or(waterlogging); + settings.processors.push(ignore); + settings.processors.push(&Processor::JigsawReplacement); + settings.processors.extend(processors.0.iter()); + if *projection == Projection::TerrainMatching { + settings + .processors + .push(GRAVITY.get_or_init(|| Processor::Gravity { + heightmap: HeightmapType::WorldSurfaceWg, + offset: -1, + })); + } + place_in_world( + world, + resources, + template, + position, + reference, + &mut settings, + Some(random), + 18, + ) + } + } +} + +/// Places a named placed feature (feature pool elements) with the piece random. +pub type PlaceFeature<'a, W, R> = + dyn FnMut(&mut W, &mut R, &str, [i32; 3]) -> Result<bool, PlacementQueryError> + 'a; + +/// The world queries jigsaw assembly needs from the chunk generator. +pub trait JigsawContext { + fn min_y(&self) -> i32; + fn max_y(&self) -> i32; + /// ChunkGenerator.getBaseHeight (getFirstFreeHeight). + fn base_height(&mut self, x: i32, z: i32, kind: HeightmapType) -> i32; + /// couldStructureExistInColumn over inclusive block Y bounds. + fn column_has_valid_biome(&mut self, x: i32, z: i32, min_y: i32, max_y: i32) -> bool; +} +pub struct JigsawConfig<'a> { + pub start_pool: &'a str, + pub start_jigsaw: Option<&'a str>, + pub max_depth: i32, + pub use_expansion_hack: bool, + pub project_to: Option<HeightmapType>, + pub max_distance: [i32; 2], + pub aliases: &'a BTreeMap<String, String>, + pub padding: [i32; 2], + pub waterlogging: bool, +} + +/// Free space for children: an inclusive container box minus placed boxes. +#[derive(Debug)] +struct Free { + container: BoundingBox, + removed: Vec<BoundingBox>, +} +impl Free { + /// Whether every point of the (0.25-deflated) box lies in free space. + fn fits(&self, b: &BoundingBox) -> bool { + (0..3).all(|i| b.min[i] >= self.container.min[i] && b.max[i] <= self.container.max[i]) + && !self.removed.iter().any(|r| r.intersects(b)) + } +} +struct PieceState { + piece: usize, + free: Rc<RefCell<Free>>, + depth: i32, +} + +/// JigsawPlacement.addPieces. Returns the structure start position and the +/// pieces, or None when the start is invalid. +pub fn assemble( + config: &JigsawConfig<'_>, + context: &mut impl JigsawContext, + pools: &Pools, + resources: &StructureResources, + bindings: &FeatureBlockBindings<'_>, + random: &mut impl RandomSource, + position: [i32; 3], +) -> Option<([i32; 3], Vec<PoolPiece>)> { + let alias = |name: &str| { + config + .aliases + .get(name) + .cloned() + .unwrap_or_else(|| name.to_owned()) + }; + let rotation = Rotation::random(random); + let center_pool = pools.get(&alias(config.start_pool), resources, bindings)?; + let element = center_pool.random_template(random); + if matches!(element.as_ref(), PoolElement::Empty) { + return None; + } + let anchored = match config.start_jigsaw { + Some(name) => { + element + .shuffled_jigsaws(resources, position, rotation, random) + .into_iter() + .find(|j| j.name.as_deref() == Some(name))? + .pos + } + None => position, + }; + let local: [i32; 3] = std::array::from_fn(|i| anchored[i] - position[i]); + let adjusted: [i32; 3] = std::array::from_fn(|i| position[i] - local[i]); + let mut center = PoolPiece { + bounding_box: element.bounding_box(adjusted, rotation), + ground_level_delta: element.ground_level_delta(), + element: element.clone(), + position: adjusted, + rotation, + junctions: Vec::new(), + waterlogging: config.waterlogging, + }; + let b = center.bounding_box; + let cx = (b.max[0] + b.min[0]) / 2; + let cz = (b.max[2] + b.min[2]) / 2; + let bottom = match config.project_to { + None => adjusted[1], + Some(kind) => { + if !context.column_has_valid_biome(cx, cz, context.min_y(), context.max_y()) { + return None; + } + position[1] + context.base_height(cx, cz, kind) + } + }; + let old_ground = b.min[1] + center.ground_level_delta; + center.moved(bottom - old_ground); + let b = center.bounding_box; + if config.padding != [0, 0] + && (b.min[1] < context.min_y() + config.padding[0] + || b.max[1] > context.max_y() - config.padding[1]) + { + return None; + } + let cy = bottom + local[1]; + let mut pieces = vec![center]; + if config.max_depth > 0 { + let [h, v] = config.max_distance; + let low_y = (cy - v).max(context.min_y() + config.padding[0]); + let high_y = (cy + v + 1).min(context.max_y() + 1 - config.padding[1]); + let free = Rc::new(RefCell::new(Free { + container: BoundingBox::new([cx - h, low_y, cz - h], [cx + h, high_y - 1, cz + h]), + removed: vec![pieces[0].bounding_box], + })); + let mut placer = Placer { + config, + pools, + resources, + bindings, + pieces: &mut pieces, + queue: BTreeMap::new(), + }; + placer.children(0, free, 0, context, random); + while let Some(state) = placer.next() { + placer.children(state.piece, state.free, state.depth, context, random); + } + } + Some(([cx, cy, cz], pieces)) +} +struct Placer<'a, 'p> { + config: &'a JigsawConfig<'a>, + pools: &'a Pools, + resources: &'a StructureResources, + bindings: &'a FeatureBlockBindings<'a>, + pieces: &'p mut Vec<PoolPiece>, + /// SequencedPriorityIterator: highest priority first, FIFO within one. + queue: BTreeMap<i32, VecDeque<PieceState>>, +} +impl Placer<'_, '_> { + fn next(&mut self) -> Option<PieceState> { + let mut entry = self.queue.last_entry()?; + let state = entry.get_mut().pop_front(); + if entry.get().is_empty() { + entry.remove(); + } + state + } + fn pool(&self, name: &str) -> Option<Arc<Pool>> { + let name = self.config.aliases.get(name).map_or(name, String::as_str); + self.pools.get(name, self.resources, self.bindings) + } + fn children( + &mut self, + source_index: usize, + context_free: Rc<RefCell<Free>>, + depth: i32, + context: &mut impl JigsawContext, + random: &mut impl RandomSource, + ) { + let (source_element, source_position, source_rotation, source_box, source_ground) = { + let s = &self.pieces[source_index]; + ( + s.element.clone(), + s.position, + s.rotation, + s.bounding_box, + s.ground_level_delta, + ) + }; + let source_rigid = source_element.projection() == Projection::Rigid; + let mut source_free: Option<Rc<RefCell<Free>>> = None; + let source_y = source_box.min[1]; + let jigsaws = source_element.shuffled_jigsaws( + self.resources, + source_position, + source_rotation, + random, + ); + 'jigsaws: for jigsaw in jigsaws { + let direction = jigsaw.front; + let s = step(direction); + let target_pos: [i32; 3] = std::array::from_fn(|i| jigsaw.pos[i] + s[i]); + let local_y = jigsaw.pos[1] - source_y; + let mut base_height = i32::MIN; + let Some(target_pool) = self.pool(&jigsaw.pool) else { + continue; + }; + if target_pool.templates.is_empty() && jigsaw.pool != "minecraft:empty" { + continue; + } + let Some(fallback) = self.pool(&target_pool.fallback) else { + continue; + }; + if fallback.templates.is_empty() && target_pool.fallback != "minecraft:empty" { + continue; + } + let children_free = if source_box.is_inside(target_pos) { + source_free + .get_or_insert_with(|| { + Rc::new(RefCell::new(Free { + container: source_box, + removed: Vec::new(), + })) + }) + .clone() + } else { + context_free.clone() + }; + let mut targets = Vec::new(); + if depth != self.config.max_depth { + targets.extend(target_pool.shuffled(random)); + } + targets.extend(fallback.shuffled(random)); + for target in targets { + if matches!(target.as_ref(), PoolElement::Empty) { + break; + } + let mut rotations = Rotation::ALL; + shuffle(&mut rotations, random); + for rotation in rotations { + let target_jigsaws = + target.shuffled_jigsaws(self.resources, [0; 3], rotation, random); + let hack_box = target.bounding_box([0; 3], rotation); + let expand_to = if self.config.use_expansion_hack && hack_box.span()[1] <= 16 { + target_jigsaws + .iter() + .map(|tj| { + let st = step(tj.front); + if !hack_box.is_inside(std::array::from_fn(|i| tj.pos[i] + st[i])) { + return 0; + } + let child = self.pool(&tj.pool); + let child_size = child.as_ref().map_or(0, |p| p.max_size()); + let fallback_size = child + .and_then(|p| self.pool(&p.fallback)) + .map_or(0, |p| p.max_size()); + child_size.max(fallback_size) + }) + .max() + .unwrap_or(0) + } else { + 0 + }; + for target_jigsaw in &target_jigsaws { + if !can_attach(&jigsaw, target_jigsaw) { + continue; + } + let target_local = target_jigsaw.pos; + let raw_position: [i32; 3] = + std::array::from_fn(|i| target_pos[i] - target_local[i]); + let raw_box = target.bounding_box(raw_position, rotation); + let raw_y = raw_box.min[1]; + let target_rigid = target.projection() == Projection::Rigid; + let target_local_y = target_local[1]; + let delta_y = local_y - target_local_y + step(jigsaw.front)[1]; + let target_y = if source_rigid && target_rigid { + source_y + delta_y + } else { + if base_height == i32::MIN { + base_height = context.base_height( + jigsaw.pos[0], + jigsaw.pos[2], + HeightmapType::WorldSurfaceWg, + ); + } + base_height - target_local_y + }; + let offset = target_y - raw_y; + let mut target_box = raw_box.moved([0, offset, 0]); + let target_position = + [raw_position[0], raw_position[1] + offset, raw_position[2]]; + if expand_to > 0 { + let size = (expand_to + 1).max(target_box.max[1] - target_box.min[1]); + target_box.max[1] = target_box.max[1].max(target_box.min[1] + size); + } + if !children_free.borrow().fits(&target_box) { + continue; + } + children_free.borrow_mut().removed.push(target_box); + let target_ground = if target_rigid { + source_ground - delta_y + } else { + target.ground_level_delta() + }; + let junction_y = if source_rigid { + source_y + local_y + } else if target_rigid { + target_y + target_local_y + } else { + if base_height == i32::MIN { + base_height = context.base_height( + jigsaw.pos[0], + jigsaw.pos[2], + HeightmapType::WorldSurfaceWg, + ); + } + base_height + delta_y / 2 + }; + self.pieces[source_index].junctions.push(Junction { + source_x: target_pos[0], + source_ground_y: junction_y - local_y + source_ground, + source_z: target_pos[2], + }); + self.pieces.push(PoolPiece { + element: target.clone(), + position: target_position, + ground_level_delta: target_ground, + rotation, + bounding_box: target_box, + junctions: vec![Junction { + source_x: jigsaw.pos[0], + source_ground_y: junction_y - target_local_y + target_ground, + source_z: jigsaw.pos[2], + }], + waterlogging: self.config.waterlogging, + }); + if depth < self.config.max_depth { + self.queue + .entry(jigsaw.placement_priority) + .or_default() + .push_back(PieceState { + piece: self.pieces.len() - 1, + free: children_free.clone(), + depth: depth + 1, + }); + } + continue 'jigsaws; + } + } + } + } + } +} diff --git a/crates/horizon-world/src/worldgen/structure/legacy.rs b/crates/horizon-world/src/worldgen/structure/legacy.rs new file mode 100644 index 000000000..abd011c51 --- /dev/null +++ b/crates/horizon-world/src/worldgen/structure/legacy.rs @@ -0,0 +1,891 @@ +//! Piece-based ("legacy") structure support: the StructurePiece helpers, +//! object-safe world/random access and template pieces. +use super::{ + BlockInfo, BoundingBox, Mirror, Rotation, StructureResources, StructureTemplate, + processor::{PlaceSettings, Processor, ProcessorList, ProcessorRandom, place_in_world}, +}; +use crate::{ + chunk::BlockState, + fluid::FluidState, + heightmap::HeightmapType, + nbt::{Compound, JavaString, Tag}, + registry::BlockStateId, + worldgen::{ + biome::BiomeId, + feature::FeatureWorld, + placement::{PlacementContext, PlacementQueryError}, + }, +}; +use horizon_core::{ + geometry::Direction, + position::{BlockPos, ChunkPos}, + random::{LegacyRandom, RandomSource, position_seed}, +}; +use std::sync::{Arc, Mutex}; + +pub type Result<T> = std::result::Result<T, PlacementQueryError>; +/// Data markers of a placed template: (metadata, absolute position). +pub type Markers = Vec<(String, [i32; 3])>; + +/// The random draws legacy pieces make. +pub trait PieceRandom: ProcessorRandom { + fn boolean(&mut self) -> bool; + fn double(&mut self) -> f64; +} +impl<R: RandomSource> PieceRandom for R { + fn boolean(&mut self) -> bool { + self.next_boolean() + } + fn double(&mut self) -> f64 { + self.next_double() + } +} + +/// Object-safe world access for piece post-processing. +pub trait PieceWorld { + fn block(&mut self, pos: [i32; 3]) -> Result<BlockStateId>; + fn set(&mut self, pos: [i32; 3], state: BlockStateId, flags: i32) -> Result<bool>; + fn fluid(&mut self, pos: [i32; 3]) -> Result<FluidState>; + fn height(&mut self, kind: HeightmapType, x: i32, z: i32) -> Result<i32>; + fn min_y(&mut self) -> Result<i32>; + fn max_y(&mut self) -> Result<i32>; + fn block_entity(&mut self, pos: [i32; 3], nbt: Compound) -> Result<()>; + fn post_process(&mut self, pos: [i32; 3]) -> Result<()>; + /// WorldGenLevel.getSeed. + fn seed(&mut self) -> Result<i64>; + /// Draws from WorldGenLevel.getRandom (the region random). + fn level_boolean(&mut self) -> Result<bool>; + fn level_float(&mut self) -> Result<f32>; + fn level_int(&mut self, bound: i32) -> Result<i32>; + fn sea_level(&mut self) -> Result<i32>; + /// Block.isFaceFull of the block's shape at `pos` on face `direction`. + fn face_full(&mut self, pos: [i32; 3], direction: Direction) -> Result<bool>; + fn face_sturdy(&mut self, pos: [i32; 3], face: Direction) -> Result<bool>; + fn center_sturdy(&mut self, pos: [i32; 3], face: Direction) -> Result<bool>; + /// WorldGenLevel.getBiome (zoomed). + fn biome(&mut self, pos: [i32; 3]) -> Result<BiomeId>; + #[allow(clippy::too_many_arguments)] + fn place_template( + &mut self, + resources: &StructureResources, + template: &StructureTemplate, + position: [i32; 3], + reference: [i32; 3], + settings: &mut PlaceSettings<'_>, + random: &mut dyn ProcessorRandom, + flags: i32, + ) -> Result<bool>; +} +impl<W: FeatureWorld + PlacementContext> PieceWorld for W { + fn block(&mut self, pos: [i32; 3]) -> Result<BlockStateId> { + self.block_state(pos) + } + fn set(&mut self, pos: [i32; 3], state: BlockStateId, flags: i32) -> Result<bool> { + self.set_block(pos, state, flags) + .map_err(|_| PlacementQueryError::Failed("piece write".into())) + } + fn fluid(&mut self, pos: [i32; 3]) -> Result<FluidState> { + self.fluid_state(pos) + } + fn height(&mut self, kind: HeightmapType, x: i32, z: i32) -> Result<i32> { + PlacementContext::height(self, kind, x, z) + } + fn min_y(&mut self) -> Result<i32> { + PlacementContext::min_y(self) + } + fn max_y(&mut self) -> Result<i32> { + PlacementContext::max_y(self) + } + fn block_entity(&mut self, pos: [i32; 3], nbt: Compound) -> Result<()> { + self.set_block_entity(pos, nbt) + } + fn post_process(&mut self, pos: [i32; 3]) -> Result<()> { + self.mark_postprocessing(pos) + } + fn seed(&mut self) -> Result<i64> { + self.world_seed() + } + fn level_boolean(&mut self) -> Result<bool> { + self.next_world_boolean() + } + fn level_float(&mut self) -> Result<f32> { + self.next_world_float() + } + fn level_int(&mut self, bound: i32) -> Result<i32> { + self.next_world_int(bound) + } + fn sea_level(&mut self) -> Result<i32> { + PlacementContext::sea_level(self) + } + fn face_full(&mut self, pos: [i32; 3], direction: Direction) -> Result<bool> { + self.attachment_at(offset(pos, direction, 1), opposite(direction)) + } + fn face_sturdy(&mut self, pos: [i32; 3], face: Direction) -> Result<bool> { + PlacementContext::face_sturdy(self, pos, face) + } + fn center_sturdy(&mut self, pos: [i32; 3], face: Direction) -> Result<bool> { + PlacementContext::center_sturdy(self, pos, face) + } + fn biome(&mut self, pos: [i32; 3]) -> Result<BiomeId> { + self.biome_identity(pos) + } + #[allow(clippy::too_many_arguments)] + fn place_template( + &mut self, + resources: &StructureResources, + template: &StructureTemplate, + position: [i32; 3], + reference: [i32; 3], + settings: &mut PlaceSettings<'_>, + random: &mut dyn ProcessorRandom, + flags: i32, + ) -> Result<bool> { + place_in_world( + self, + resources, + template, + position, + reference, + settings, + Some(random), + flags, + ) + } +} + +/// Everything a piece needs while post-processing one chunk. +pub struct PieceContext<'a> { + pub world: &'a mut dyn PieceWorld, + pub resources: &'a StructureResources, + pub random: &'a mut dyn PieceRandom, + pub chunk_box: BoundingBox, + pub chunk: ChunkPos, + pub reference: [i32; 3], +} +impl PieceContext<'_> { + pub fn state(&self, name: &str) -> BlockStateId { + state(self.resources, name, &[]) + } + pub fn state_with(&self, name: &str, properties: &[(&str, &str)]) -> BlockStateId { + state(self.resources, name, properties) + } + pub fn name(&self, state: BlockStateId) -> &str { + self.resources + .registry + .state(state) + .map(|s| s.name.as_str()) + .unwrap_or("") + } + pub fn is_block(&mut self, pos: [i32; 3], name: &str) -> Result<bool> { + let state = self.world.block(pos)?; + Ok(self.name(state) == name) + } + pub fn is_air(&self, state: BlockStateId) -> bool { + matches!( + self.name(state), + "minecraft:air" | "minecraft:cave_air" | "minecraft:void_air" + ) + } + /// BlockState.liquid(): water and lava blocks. + pub fn is_liquid(&self, state: BlockStateId) -> bool { + matches!(self.name(state), "minecraft:water" | "minecraft:lava") + } + pub fn property<'s>(&'s self, state: BlockStateId, key: &str) -> Option<&'s str> { + self.resources + .registry + .state(state) + .and_then(|s| s.properties.get(key)) + .map(String::as_str) + } + pub fn with_property(&self, state: BlockStateId, key: &str, value: &str) -> BlockStateId { + let Some(mut descriptor) = self.resources.registry.state(state).cloned() else { + return state; + }; + if let Some(slot) = descriptor.properties.get_mut(key) { + *slot = value.to_owned(); + } + self.resources.registry.id(&descriptor).unwrap_or(state) + } + /// Store a loot-table container's block entity (RandomizableContainer.setLootTable). + pub fn loot_table(&mut self, pos: [i32; 3], kind: &str, table: &str) -> Result<()> { + let seed = self.random.long(); + let mut nbt = Compound::new(); + nbt.insert("id".into(), Tag::String(kind.into())); + nbt.insert("LootTable".into(), Tag::String(table.into())); + nbt.insert("LootTableSeed".into(), Tag::Long(seed)); + self.world.block_entity(pos, nbt) + } + /// Place a spawner and set its entity (SpawnerBlockEntity.setEntityId). + pub fn spawner(&mut self, pos: [i32; 3], entity: &str) -> Result<()> { + self.world.set(pos, self.state("spawner"), 2)?; + let mut id = Compound::new(); + id.insert("id".into(), Tag::String(entity.into())); + let mut data = Compound::new(); + data.insert("entity".into(), Tag::Compound(id)); + let mut nbt = Compound::new(); + nbt.insert("id".into(), Tag::String("minecraft:mob_spawner".into())); + nbt.insert("SpawnData".into(), Tag::Compound(data)); + self.world.block_entity(pos, nbt) + } +} +/// A state by block name and properties (missing properties keep defaults). +pub fn state( + resources: &StructureResources, + name: &str, + properties: &[(&str, &str)], +) -> BlockStateId { + let registry = resources.registry; + let mut descriptor = BlockState { + name: if name.contains(':') { + name.to_owned() + } else { + format!("minecraft:{name}") + }, + properties: Default::default(), + }; + for (k, v) in properties { + descriptor + .properties + .insert((*k).to_owned(), (*v).to_owned()); + } + registry + .resolve(&descriptor) + .ok() + .or_else(|| registry.default_state(&descriptor.name)) + .unwrap_or_else(|| registry.default_state("minecraft:air").unwrap()) +} + +/// A placed structure piece. +pub trait LegacyPiece: std::fmt::Debug + Send + Sync { + fn bounding_box(&self) -> BoundingBox; + /// The vanilla StructurePieceType id, for diagnostics and comparisons. + fn type_name(&self) -> &'static str; + fn post_process(&self, context: &mut PieceContext<'_>) -> Result<()>; + /// Structure.afterPlace, run on the first piece once per chunk after all + /// pieces were placed, with every piece's current box. + fn after_place(&self, _context: &mut PieceContext<'_>, _pieces: &[BoundingBox]) -> Result<()> { + Ok(()) + } +} + +/// StructurePiece's orientation transform and block helpers. +#[derive(Clone, Copy, Debug)] +pub struct PieceFrame { + pub bounding_box: BoundingBox, + pub orientation: Option<Direction>, + pub mirror: Mirror, + pub rotation: Rotation, + /// Blocks placeBlock must not replace (StructurePiece.canBeReplaced). + pub keep: &'static [&'static str], +} +pub const HORIZONTAL: [Direction; 4] = [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, +]; +/// Direction.Plane.HORIZONTAL.getRandomDirection. +pub fn random_horizontal(random: &mut impl RandomSource) -> Direction { + HORIZONTAL[random.next_int_bound(4).unwrap_or(0) as usize] +} +pub fn make_bounding_box( + x: i32, + y: i32, + z: i32, + direction: Direction, + width: i32, + height: i32, + depth: i32, +) -> BoundingBox { + if matches!(direction, Direction::North | Direction::South) { + BoundingBox::new([x, y, z], [x + width - 1, y + height - 1, z + depth - 1]) + } else { + BoundingBox::new([x, y, z], [x + depth - 1, y + height - 1, z + width - 1]) + } +} +impl PieceFrame { + pub fn new(bounding_box: BoundingBox, orientation: Option<Direction>) -> Self { + let (mirror, rotation) = match orientation { + Some(Direction::South) => (Mirror::LeftRight, Rotation::None), + Some(Direction::West) => (Mirror::LeftRight, Rotation::Clockwise90), + Some(Direction::East) => (Mirror::None, Rotation::Clockwise90), + _ => (Mirror::None, Rotation::None), + }; + Self { + bounding_box, + orientation, + mirror, + rotation, + keep: &[], + } + } + pub fn world_x(&self, x: i32, z: i32) -> i32 { + match self.orientation { + Some(Direction::North | Direction::South) => self.bounding_box.min[0] + x, + Some(Direction::West) => self.bounding_box.max[0] - z, + Some(Direction::East) => self.bounding_box.min[0] + z, + _ => x, + } + } + pub fn world_y(&self, y: i32) -> i32 { + if self.orientation.is_none() { + y + } else { + y + self.bounding_box.min[1] + } + } + pub fn world_z(&self, x: i32, z: i32) -> i32 { + match self.orientation { + Some(Direction::North) => self.bounding_box.max[2] - z, + Some(Direction::South) => self.bounding_box.min[2] + z, + Some(Direction::West | Direction::East) => self.bounding_box.min[2] + x, + _ => z, + } + } + pub fn world_pos(&self, x: i32, y: i32, z: i32) -> [i32; 3] { + [self.world_x(x, z), self.world_y(y), self.world_z(x, z)] + } + /// StructurePiece.placeBlock (canBeReplaced is always true here). + pub fn place( + &self, + c: &mut PieceContext<'_>, + state: BlockStateId, + x: i32, + y: i32, + z: i32, + ) -> Result<()> { + let pos = self.world_pos(x, y, z); + if !c.chunk_box.is_inside(pos) { + return Ok(()); + } + if !self.keep.is_empty() { + let current = c.world.block(pos)?; + if self.keep.contains(&c.name(current)) { + return Ok(()); + } + } + let mut state = state; + if self.mirror != Mirror::None { + state = c.resources.transforms.mirror(state, self.mirror); + } + if self.rotation != Rotation::None { + state = c.resources.transforms.rotate(state, self.rotation); + } + c.world.set(pos, state, 2)?; + let fluid = c.world.fluid(pos)?; + if fluid.kind() != crate::fluid::FluidKind::Empty { + // scheduleTick(pos, fluid, 0) is a no-op for generation output. + } + if matches!( + c.name(state), + "minecraft:nether_brick_fence" + | "minecraft:torch" + | "minecraft:wall_torch" + | "minecraft:oak_fence" + | "minecraft:spruce_fence" + | "minecraft:dark_oak_fence" + | "minecraft:pale_oak_fence" + | "minecraft:acacia_fence" + | "minecraft:birch_fence" + | "minecraft:jungle_fence" + | "minecraft:ladder" + | "minecraft:iron_bars" + ) { + c.world.post_process(pos)?; + } + Ok(()) + } + pub fn get(&self, c: &mut PieceContext<'_>, x: i32, y: i32, z: i32) -> Result<BlockStateId> { + let pos = self.world_pos(x, y, z); + if c.chunk_box.is_inside(pos) { + c.world.block(pos) + } else { + Ok(c.state("air")) + } + } + pub fn is_interior(&self, c: &mut PieceContext<'_>, x: i32, y: i32, z: i32) -> Result<bool> { + let pos = self.world_pos(x, y + 1, z); + if !c.chunk_box.is_inside(pos) { + return Ok(false); + } + Ok(pos[1] + < c.world + .height(HeightmapType::OceanFloorWg, pos[0], pos[2])?) + } + #[allow(clippy::too_many_arguments)] + pub fn generate_box( + &self, + c: &mut PieceContext<'_>, + [x0, y0, z0]: [i32; 3], + [x1, y1, z1]: [i32; 3], + edge: BlockStateId, + fill: BlockStateId, + skip_air: bool, + ) -> Result<()> { + for y in y0..=y1 { + for x in x0..=x1 { + for z in z0..=z1 { + if skip_air { + let s = self.get(c, x, y, z)?; + if c.is_air(s) { + continue; + } + } + let interior = y != y0 && y != y1 && x != x0 && x != x1 && z != z0 && z != z1; + self.place(c, if interior { fill } else { edge }, x, y, z)?; + } + } + } + Ok(()) + } + /// generateBox with a block selector called as (random, x, y, z, edge). + pub fn generate_box_selector( + &self, + c: &mut PieceContext<'_>, + [x0, y0, z0]: [i32; 3], + [x1, y1, z1]: [i32; 3], + skip_air: bool, + selector: &mut dyn FnMut(&mut PieceContext<'_>, i32, i32, i32, bool) -> BlockStateId, + ) -> Result<()> { + for y in y0..=y1 { + for x in x0..=x1 { + for z in z0..=z1 { + if skip_air { + let s = self.get(c, x, y, z)?; + if c.is_air(s) { + continue; + } + } + let edge = y == y0 || y == y1 || x == x0 || x == x1 || z == z0 || z == z1; + let state = selector(c, x, y, z, edge); + self.place(c, state, x, y, z)?; + } + } + } + Ok(()) + } + #[allow(clippy::too_many_arguments)] + pub fn generate_maybe_box( + &self, + c: &mut PieceContext<'_>, + probability: f32, + [x0, y0, z0]: [i32; 3], + [x1, y1, z1]: [i32; 3], + edge: BlockStateId, + fill: BlockStateId, + skip_air: bool, + inside: bool, + ) -> Result<()> { + for y in y0..=y1 { + for x in x0..=x1 { + for z in z0..=z1 { + if c.random.float() > probability { + continue; + } + if skip_air { + let s = self.get(c, x, y, z)?; + if c.is_air(s) { + continue; + } + } + if inside && !self.is_interior(c, x, y, z)? { + continue; + } + let interior = y != y0 && y != y1 && x != x0 && x != x1 && z != z0 && z != z1; + self.place(c, if interior { fill } else { edge }, x, y, z)?; + } + } + } + Ok(()) + } + #[allow(clippy::too_many_arguments)] + pub fn maybe_block( + &self, + c: &mut PieceContext<'_>, + probability: f32, + x: i32, + y: i32, + z: i32, + state: BlockStateId, + ) -> Result<()> { + if c.random.float() < probability { + self.place(c, state, x, y, z)?; + } + Ok(()) + } + #[allow(clippy::too_many_arguments)] + pub fn upper_half_sphere( + &self, + c: &mut PieceContext<'_>, + [x0, y0, z0]: [i32; 3], + [x1, y1, z1]: [i32; 3], + fill: BlockStateId, + skip_air: bool, + ) -> Result<()> { + let dx = (x1 - x0 + 1) as f32; + let dy = (y1 - y0 + 1) as f32; + let dz = (z1 - z0 + 1) as f32; + let cx = x0 as f32 + dx / 2.; + let cz = z0 as f32 + dz / 2.; + for y in y0..=y1 { + let ny = (y - y0) as f32 / dy; + for x in x0..=x1 { + let nx = (x as f32 - cx) / (dx * 0.5); + for z in z0..=z1 { + let nz = (z as f32 - cz) / (dz * 0.5); + if skip_air { + let s = self.get(c, x, y, z)?; + if c.is_air(s) { + continue; + } + } + if nx * nx + ny * ny + nz * nz <= 1.05 { + self.place(c, fill, x, y, z)?; + } + } + } + } + Ok(()) + } + pub fn fill_column_down( + &self, + c: &mut PieceContext<'_>, + state: BlockStateId, + x: i32, + y: i32, + z: i32, + ) -> Result<()> { + let mut pos = self.world_pos(x, y, z); + if !c.chunk_box.is_inside(pos) { + return Ok(()); + } + let min = c.world.min_y()?; + loop { + let current = c.world.block(pos)?; + let replaceable = c.is_air(current) + || c.is_liquid(current) + || matches!( + c.name(current), + "minecraft:glow_lichen" | "minecraft:seagrass" | "minecraft:tall_seagrass" + ); + if !replaceable || pos[1] <= min + 1 { + break; + } + c.world.set(pos, state, 2)?; + pos[1] -= 1; + } + Ok(()) + } + /// StructurePiece.createChest at piece coordinates. + pub fn create_chest( + &self, + c: &mut PieceContext<'_>, + x: i32, + y: i32, + z: i32, + table: &str, + ) -> Result<bool> { + let pos = self.world_pos(x, y, z); + create_chest(c, pos, table, None) + } + #[allow(clippy::too_many_arguments)] + pub fn create_dispenser( + &self, + c: &mut PieceContext<'_>, + x: i32, + y: i32, + z: i32, + facing: Direction, + table: &str, + ) -> Result<bool> { + let pos = self.world_pos(x, y, z); + if !c.chunk_box.is_inside(pos) || c.is_block(pos, "minecraft:dispenser")? { + return Ok(false); + } + let state = c.state_with("dispenser", &[("facing", direction_name(facing))]); + self.place(c, state, x, y, z)?; + c.loot_table(pos, "minecraft:dispenser", table)?; + Ok(true) + } +} +pub fn direction_name(d: Direction) -> &'static str { + match d { + Direction::Down => "down", + Direction::Up => "up", + Direction::North => "north", + Direction::South => "south", + Direction::West => "west", + Direction::East => "east", + } +} +pub fn offset(pos: [i32; 3], d: Direction, n: i32) -> [i32; 3] { + let s = d.normal(); + [pos[0] + s[0] * n, pos[1] + s[1] * n, pos[2] + s[2] * n] +} +pub fn solid_render(c: &PieceContext<'_>, state: BlockStateId) -> bool { + c.resources.transforms.full_block(state) && !c.is_liquid(state) +} +/// StructurePiece.createChest with an absolute position. +pub fn create_chest( + c: &mut PieceContext<'_>, + pos: [i32; 3], + table: &str, + state: Option<BlockStateId>, +) -> Result<bool> { + if !c.chunk_box.is_inside(pos) || c.is_block(pos, "minecraft:chest")? { + return Ok(false); + } + let state = match state { + Some(s) => s, + None => reorient(c, pos, c.state("chest"))?, + }; + c.world.set(pos, state, 2)?; + c.loot_table(pos, "minecraft:chest", table)?; + Ok(true) +} +/// StructurePiece.reorient for chests (solid-render approximated by the +/// full collision cube of non-liquid blocks). +fn reorient(c: &mut PieceContext<'_>, pos: [i32; 3], state: BlockStateId) -> Result<BlockStateId> { + let mut solid: Option<Direction> = None; + for d in HORIZONTAL { + let n = c.world.block(offset(pos, d, 1))?; + if c.name(n) == "minecraft:chest" { + return Ok(state); + } + if solid_render(c, n) { + if solid.is_some() { + solid = None; + break; + } + solid = Some(d); + } + } + if let Some(d) = solid { + return Ok(c.with_property(state, "facing", direction_name(opposite(d)))); + } + let mut facing = match c.property(state, "facing") { + Some("south") => Direction::South, + Some("east") => Direction::East, + Some("west") => Direction::West, + _ => Direction::North, + }; + let solid_at = |c: &mut PieceContext<'_>, d: Direction| -> Result<bool> { + let s = c.world.block(offset(pos, d, 1))?; + Ok(solid_render(c, s)) + }; + if solid_at(c, facing)? { + facing = opposite(facing); + } + if solid_at(c, facing)? { + facing = clockwise(facing); + } + if solid_at(c, facing)? { + facing = opposite(facing); + } + Ok(c.with_property(state, "facing", direction_name(facing))) +} +pub fn opposite(d: Direction) -> Direction { + match d { + Direction::Down => Direction::Up, + Direction::Up => Direction::Down, + Direction::North => Direction::South, + Direction::South => Direction::North, + Direction::West => Direction::East, + Direction::East => Direction::West, + } +} +pub fn clockwise(d: Direction) -> Direction { + match d { + Direction::North => Direction::East, + Direction::East => Direction::South, + Direction::South => Direction::West, + Direction::West => Direction::North, + other => other, + } +} +pub fn counter_clockwise(d: Direction) -> Direction { + match d { + Direction::North => Direction::West, + Direction::West => Direction::South, + Direction::South => Direction::East, + Direction::East => Direction::North, + other => other, + } +} + +/// TemplateStructurePiece: one template with fixed settings; data markers +/// are handed to the owning structure. +#[derive(Debug)] +pub struct TemplatePiece { + pub type_name: &'static str, + pub template_name: String, + pub template: Arc<StructureTemplate>, + pub position: [i32; 3], + pub rotation: Rotation, + pub mirror: Mirror, + pub pivot: [i32; 3], + pub processors: Arc<ProcessorList>, + pub waterlogging: bool, + /// Ignore structure blocks (and air, for ocean ruins) before processors. + pub ignore: Vec<String>, + pub bounding_box: BoundingBox, + pub handler: TemplateHandler, + /// Per-piece state mutated by vanilla post-processing (e.g. ruined + /// portals record nothing; shipwrecks/igloos re-place at a height). + pub state: Mutex<Option<i32>>, +} +#[derive(Clone, Copy, Debug)] +pub enum TemplateHandler { + Igloo, + Shipwreck { + beached: bool, + }, + OceanRuin { + warm: bool, + large: bool, + integrity: f32, + }, + RuinedPortal(super::ruined_portal::PortalProps), + Mansion, + Plain, +} +impl TemplatePiece { + #[allow(clippy::too_many_arguments)] + pub fn new( + type_name: &'static str, + template_name: &str, + template: Arc<StructureTemplate>, + position: [i32; 3], + rotation: Rotation, + mirror: Mirror, + pivot: [i32; 3], + processors: Arc<ProcessorList>, + waterlogging: bool, + ignore: Vec<String>, + handler: TemplateHandler, + ) -> Self { + Self { + bounding_box: template.bounding_box(position, rotation, pivot, mirror), + type_name, + template_name: template_name.to_owned(), + template, + position, + rotation, + mirror, + pivot, + processors, + waterlogging, + ignore, + handler, + state: Mutex::new(None), + } + } + pub fn settings(&self) -> PlaceSettings<'_> { + let mut s = PlaceSettings::new(self.rotation); + s.mirror = self.mirror; + s.pivot = self.pivot; + s.waterlogging = self.waterlogging; + s + } + /// TemplateStructurePiece.postProcess at a (possibly shifted) position; + /// returns the data markers (metadata, absolute position) on success. + pub fn place_at( + &self, + c: &mut PieceContext<'_>, + position: [i32; 3], + extra: &[Processor], + ) -> Result<Option<Markers>> { + let ignore = Processor::BlockIgnore(self.ignore.iter().cloned().collect()); + let mut settings = self.settings(); + settings.bounding_box = Some(c.chunk_box); + settings.processors.push(&ignore); + settings.processors.extend(extra.iter()); + settings.processors.extend(self.processors.0.iter()); + let resources = c.resources; + let reference = c.reference; + if !c.world.place_template( + resources, + &self.template, + position, + reference, + &mut settings, + &mut *c.random, + 2, + )? { + return Ok(None); + } + let mut markers = Vec::new(); + let mut jigsaws = Vec::new(); + for info in filter_blocks(resources, &self.template, position, &settings) { + let name = c.name(info.state).to_owned(); + let Some(nbt) = &info.nbt else { continue }; + let text = |key: &str| match nbt.get(&JavaString::from(key)) { + Some(Tag::String(s)) => s.to_string_lossy(), + _ => String::new(), + }; + if name == "minecraft:structure_block" && text("mode").eq_ignore_ascii_case("data") { + markers.push((text("metadata"), info.pos)); + } else if name == "minecraft:jigsaw" { + let final_state = nbt + .get(&JavaString::from("final_state")) + .map(|_| text("final_state")) + .unwrap_or_else(|| "minecraft:air".into()); + jigsaws.push((info.pos, final_state)); + } + } + for (pos, final_state) in jigsaws { + let state = super::template::parse_state_string(resources.registry, &final_state) + .unwrap_or_else(|| c.state("air")); + c.world.set(pos, state, 3)?; + } + Ok(Some(markers)) + } +} +/// StructureTemplate.filterBlocks for structure and jigsaw blocks (palette +/// chosen by settings' random or a position seed), within the settings box. +fn filter_blocks( + resources: &StructureResources, + template: &StructureTemplate, + position: [i32; 3], + settings: &PlaceSettings<'_>, +) -> Vec<BlockInfo> { + if template.palettes().is_empty() { + return Vec::new(); + } + let palette = LegacyRandom::new(position_seed(BlockPos::new( + position[0], + position[1], + position[2], + ))) + .next_int_bound(template.palettes().len() as i32) + .unwrap_or(0) as usize; + template.palettes()[palette] + .blocks() + .iter() + .filter(|b| { + let name = resources + .registry + .state(b.state) + .map(|s| s.name.as_str()) + .unwrap_or(""); + name == "minecraft:structure_block" || name == "minecraft:jigsaw" + }) + .filter_map(|b| { + let relative = StructureTemplate::transform( + b.pos, + settings.mirror, + settings.rotation, + settings.pivot, + ); + let pos: [i32; 3] = std::array::from_fn(|i| relative[i] + position[i]); + settings + .bounding_box + .is_none_or(|bb| bb.is_inside(pos)) + .then(|| BlockInfo { + pos, + state: resources.transforms.rotate(b.state, settings.rotation), + nbt: b.nbt.clone(), + }) + }) + .collect() +} diff --git a/crates/horizon-world/src/worldgen/structure/mansion.rs b/crates/horizon-world/src/worldgen/structure/mansion.rs new file mode 100644 index 000000000..3d8f8a498 --- /dev/null +++ b/crates/horizon-world/src/worldgen/structure/mansion.rs @@ -0,0 +1,879 @@ +//! Woodland mansions (WoodlandMansionStructure, WoodlandMansionPieces). +use super::{ + BoundingBox, Mirror, Rotation, StructureResources, + legacy::{ + HORIZONTAL, PieceContext, Result, TemplateHandler, TemplatePiece, clockwise, + counter_clockwise, create_chest, direction_name, offset, opposite, + }, + processor::ProcessorList, +}; +use horizon_core::{geometry::Direction, random::RandomSource}; +use std::sync::Arc; + +const CORRIDOR_FLAG: i32 = 8_388_608; +const STAIRS_FLAG: i32 = 4_194_304; +const DOOR_FLAG: i32 = 2_097_152; +const ORIGIN_FLAG: i32 = 1_048_576; +const TYPE_MASK: i32 = 983_040; +const ID_MASK: i32 = 65_535; +const ROOM_1X1: i32 = 65_536; +const ROOM_1X2: i32 = 131_072; +const ROOM_2X2: i32 = 262_144; + +#[derive(Clone)] +struct Grid { + cells: Vec<i32>, + width: i32, + height: i32, + outside: i32, +} +impl Grid { + fn new(width: i32, height: i32, outside: i32) -> Self { + Self { + cells: vec![0; (width * height) as usize], + width, + height, + outside, + } + } + fn set(&mut self, x: i32, y: i32, value: i32) { + if x >= 0 && x < self.width && y >= 0 && y < self.height { + self.cells[(x * self.height + y) as usize] = value; + } + } + fn fill(&mut self, x0: i32, y0: i32, x1: i32, y1: i32, value: i32) { + for y in y0..=y1 { + for x in x0..=x1 { + self.set(x, y, value); + } + } + } + fn get(&self, x: i32, y: i32) -> i32 { + if x >= 0 && x < self.width && y >= 0 && y < self.height { + self.cells[(x * self.height + y) as usize] + } else { + self.outside + } + } + fn set_if(&mut self, x: i32, y: i32, if_value: i32, value: i32) { + if self.get(x, y) == if_value { + self.set(x, y, value); + } + } + fn edges_to(&self, x: i32, y: i32, value: i32) -> bool { + self.get(x - 1, y) == value + || self.get(x + 1, y) == value + || self.get(x, y + 1) == value + || self.get(x, y - 1) == value + } +} +fn is_house(grid: &Grid, x: i32, y: i32) -> bool { + matches!(grid.get(x, y), 1..=4) +} +fn step(d: Direction) -> (i32, i32) { + let n = d.normal(); + (n[0], n[2]) +} +fn from_2d(value: i32) -> Direction { + [ + Direction::South, + Direction::West, + Direction::North, + Direction::East, + ][value as usize & 3] +} +fn shuffle<T>(list: &mut [T], random: &mut impl RandomSource) { + for i in (2..=list.len()).rev() { + let j = random.next_int_bound(i as i32).unwrap_or(0) as usize; + list.swap(i - 1, j); + } +} + +struct MansionGrid { + base: Grid, + third: Grid, + rooms: [Grid; 3], + entrance_x: i32, + entrance_y: i32, +} +impl MansionGrid { + fn new(r: &mut impl RandomSource) -> Self { + let (ex, ey) = (7, 4); + let mut base = Grid::new(11, 11, 5); + base.fill(ex, ey, ex + 1, ey + 1, 3); + base.fill(ex - 1, ey, ex - 1, ey + 1, 2); + base.fill(ex + 2, ey - 2, ex + 3, ey + 3, 5); + base.fill(ex + 1, ey - 2, ex + 1, ey - 1, 1); + base.fill(ex + 1, ey + 2, ex + 1, ey + 3, 1); + base.set(ex - 1, ey - 1, 1); + base.set(ex - 1, ey + 2, 1); + base.fill(0, 0, 11, 1, 5); + base.fill(0, 9, 11, 11, 5); + corridor(&mut base, r, ex, ey - 2, Direction::West, 6); + corridor(&mut base, r, ex, ey + 3, Direction::West, 6); + corridor(&mut base, r, ex - 2, ey - 1, Direction::West, 3); + corridor(&mut base, r, ex - 2, ey + 2, Direction::West, 3); + while clean_edges(&mut base) {} + let mut rooms = [Grid::new(11, 11, 5), Grid::new(11, 11, 5), Grid::new(11, 11, 5)]; + identify_rooms(&base, &mut rooms[0], r); + identify_rooms(&base, &mut rooms[1], r); + rooms[0].fill(ex + 1, ey, ex + 1, ey + 1, CORRIDOR_FLAG); + rooms[1].fill(ex + 1, ey, ex + 1, ey + 1, CORRIDOR_FLAG); + let mut grid = Self { + third: Grid::new(base.width, base.height, 5), + base, + rooms, + entrance_x: ex, + entrance_y: ey, + }; + grid.setup_third_floor(r); + let mut third_rooms = std::mem::replace(&mut grid.rooms[2], Grid::new(0, 0, 0)); + identify_rooms(&grid.third, &mut third_rooms, r); + grid.rooms[2] = third_rooms; + grid + } + fn is_room_id(&self, x: i32, y: i32, floor: usize, id: i32) -> bool { + (self.rooms[floor].get(x, y) & ID_MASK) == id + } + fn room_direction_1x2(&self, x: i32, y: i32, floor: usize, id: i32) -> Option<Direction> { + HORIZONTAL.into_iter().find(|&d| { + let (dx, dz) = step(d); + self.is_room_id(x + dx, y + dz, floor, id) + }) + } + fn setup_third_floor(&mut self, r: &mut impl RandomSource) { + let mut potential = Vec::new(); + for y in 0..self.third.height { + for x in 0..self.third.width { + let data = self.rooms[1].get(x, y); + if data & TYPE_MASK == ROOM_1X2 && data & DOOR_FLAG == DOOR_FLAG { + potential.push((x, y)); + } + } + } + let (w, h) = (self.third.width, self.third.height); + if potential.is_empty() { + self.third.fill(0, 0, w, h, 5); + return; + } + let (rx, ry) = potential[r.next_int_bound(potential.len() as i32).unwrap_or(0) as usize]; + let data = self.rooms[1].get(rx, ry); + self.rooms[1].set(rx, ry, data | STAIRS_FLAG); + let Some(dir) = self.room_direction_1x2(rx, ry, 1, data & ID_MASK) else { + return; + }; + let (dx, dz) = step(dir); + let (ex, ey) = (rx + dx, ry + dz); + for y in 0..h { + for x in 0..w { + if !is_house(&self.base, x, y) { + self.third.set(x, y, 5); + } else if x == rx && y == ry { + self.third.set(x, y, 3); + } else if x == ex && y == ey { + self.third.set(x, y, 3); + self.rooms[2].set(x, y, CORRIDOR_FLAG); + } + } + } + let corridors: Vec<Direction> = HORIZONTAL + .into_iter() + .filter(|&d| { + let (dx, dz) = step(d); + self.third.get(ex + dx, ey + dz) == 0 + }) + .collect(); + if corridors.is_empty() { + self.third.fill(0, 0, w, h, 5); + self.rooms[1].set(rx, ry, data); + } else { + let d = corridors[r.next_int_bound(corridors.len() as i32).unwrap_or(0) as usize]; + let (dx, dz) = step(d); + corridor(&mut self.third, r, ex + dx, ey + dz, d, 4); + while clean_edges(&mut self.third) {} + } + } +} +fn corridor(g: &mut Grid, r: &mut impl RandomSource, x: i32, y: i32, heading: Direction, depth: i32) { + if depth <= 0 { + return; + } + let (hx, hz) = step(heading); + g.set(x, y, 1); + g.set_if(x + hx, y + hz, 0, 1); + for _ in 0..8 { + let next = from_2d(r.next_int_bound(4).unwrap_or(0)); + if next != opposite(heading) && (next != Direction::East || !r.next_boolean()) { + let (nx, ny) = (x + hx, y + hz); + let (dx, dz) = step(next); + if g.get(nx + dx, ny + dz) == 0 && g.get(nx + dx * 2, ny + dz * 2) == 0 { + corridor(g, r, x + hx + dx, y + hz + dz, next, depth - 1); + break; + } + } + } + let (cx, cz) = step(clockwise(heading)); + let (ax, az) = step(counter_clockwise(heading)); + g.set_if(x + cx, y + cz, 0, 2); + g.set_if(x + ax, y + az, 0, 2); + g.set_if(x + hx + cx, y + hz + cz, 0, 2); + g.set_if(x + hx + ax, y + hz + az, 0, 2); + g.set_if(x + hx * 2, y + hz * 2, 0, 2); + g.set_if(x + cx * 2, y + cz * 2, 0, 2); + g.set_if(x + ax * 2, y + az * 2, 0, 2); +} +fn clean_edges(g: &mut Grid) -> bool { + let mut touched = false; + for y in 0..g.height { + for x in 0..g.width { + if g.get(x, y) != 0 { + continue; + } + let house = |g: &Grid, x, y| i32::from(is_house(g, x, y)); + let direct = house(g, x + 1, y) + house(g, x - 1, y) + house(g, x, y + 1) + house(g, x, y - 1); + if direct >= 3 { + g.set(x, y, 2); + touched = true; + } else if direct == 2 { + let diagonal = house(g, x + 1, y + 1) + + house(g, x - 1, y + 1) + + house(g, x + 1, y - 1) + + house(g, x - 1, y - 1); + if diagonal <= 1 { + g.set(x, y, 2); + touched = true; + } + } + } + } + touched +} +fn identify_rooms(from: &Grid, rooms: &mut Grid, r: &mut impl RandomSource) { + let mut positions = Vec::new(); + for y in 0..from.height { + for x in 0..from.width { + if from.get(x, y) == 2 { + positions.push((x, y)); + } + } + } + shuffle(&mut positions, r); + let mut id = 10; + for (x, y) in positions { + if rooms.get(x, y) != 0 { + continue; + } + let (mut x0, mut x1, mut y0, mut y1) = (x, x, y, y); + let mut kind = ROOM_1X1; + let free = |dx: i32, dy: i32| rooms.get(x + dx, y + dy) == 0 && from.get(x + dx, y + dy) == 2; + if free(1, 0) && free(0, 1) && free(1, 1) { + x1 += 1; + y1 += 1; + kind = ROOM_2X2; + } else if free(-1, 0) && free(0, 1) && free(-1, 1) { + x0 -= 1; + y1 += 1; + kind = ROOM_2X2; + } else if free(-1, 0) && free(0, -1) && free(-1, -1) { + x0 -= 1; + y0 -= 1; + kind = ROOM_2X2; + } else if free(1, 0) { + x1 += 1; + kind = ROOM_1X2; + } else if free(0, 1) { + y1 += 1; + kind = ROOM_1X2; + } else if free(-1, 0) { + x0 -= 1; + kind = ROOM_1X2; + } else if free(0, -1) { + y0 -= 1; + kind = ROOM_1X2; + } + let mut door_x = if r.next_boolean() { x0 } else { x1 }; + let mut door_y = if r.next_boolean() { y0 } else { y1 }; + let mut door = DOOR_FLAG; + let swap = |v: i32, a: i32, b: i32| if v == a { b } else { a }; + if !from.edges_to(door_x, door_y, 1) { + door_x = swap(door_x, x0, x1); + door_y = swap(door_y, y0, y1); + if !from.edges_to(door_x, door_y, 1) { + door_y = swap(door_y, y0, y1); + if !from.edges_to(door_x, door_y, 1) { + door_x = swap(door_x, x0, x1); + door_y = swap(door_y, y0, y1); + if !from.edges_to(door_x, door_y, 1) { + door = 0; + door_x = x0; + door_y = y0; + } + } + } + } + for ry in y0..=y1 { + for rx in x0..=x1 { + if rx == door_x && ry == door_y { + rooms.set(rx, ry, ORIGIN_FLAG | door | kind | id); + } else { + rooms.set(rx, ry, kind | id); + } + } + } + id += 1; + } +} + +struct Piece { + name: String, + position: [i32; 3], + rotation: Rotation, + mirror: Mirror, +} +struct Placement { + position: [i32; 3], + rotation: Rotation, + wall: &'static str, +} +fn up(p: [i32; 3], n: i32) -> [i32; 3] { + [p[0], p[1] + n, p[2]] +} +fn rel(p: [i32; 3], rotation: Rotation, d: Direction, n: i32) -> [i32; 3] { + offset(p, rotation.rotate_direction(d), n) +} +/// One floor's room-template choices (First/Second/ThirdFloorRoomCollection). +fn room_name(floor: usize, kind: &str, r: &mut impl RandomSource, stairs: bool) -> String { + let mut n = |b: i32| r.next_int_bound(b).unwrap_or(0) + 1; + if floor == 0 { + match kind { + "1x1" => format!("1x1_a{}", n(5)), + "1x1s" => format!("1x1_as{}", n(4)), + "side" => format!("1x2_a{}", n(9)), + "front" => format!("1x2_b{}", n(5)), + "1x2s" => format!("1x2_s{}", n(2)), + "2x2" => format!("2x2_a{}", n(4)), + _ => "2x2_s1".into(), + } + } else { + match kind { + "1x1" => format!("1x1_b{}", n(5)), + "1x1s" => format!("1x1_as{}", n(4)), + "side" if stairs => "1x2_c_stairs".into(), + "side" => format!("1x2_c{}", n(4)), + "front" if stairs => "1x2_d_stairs".into(), + "front" => format!("1x2_d{}", n(5)), + "1x2s" => format!("1x2_se{}", n(1)), + "2x2" => format!("2x2_b{}", n(5)), + _ => "2x2_s1".into(), + } + } +} +struct Placer<'a, R: RandomSource> { + random: &'a mut R, + pieces: Vec<Piece>, + start_x: i32, + start_y: i32, +} +impl<R: RandomSource> Placer<'_, R> { + fn add(&mut self, name: impl Into<String>, position: [i32; 3], rotation: Rotation, mirror: Mirror) { + self.pieces.push(Piece { + name: name.into(), + position, + rotation, + mirror, + }); + } + fn grid_pos(&self, origin: [i32; 3], rotation: Rotation, x: i32, y: i32, east: i32) -> [i32; 3] { + let p = rel(origin, rotation, Direction::South, 8 + (y - self.start_y) * 8); + rel(p, rotation, Direction::East, east + (x - self.start_x) * 8) + } + fn create(&mut self, origin: [i32; 3], rotation: Rotation, mansion: &MansionGrid) { + let mut data = Placement { + position: origin, + rotation, + wall: "wall_flat", + }; + let west = rotation.rotate_direction(Direction::West); + self.add("entrance", offset(data.position, west, 9), rotation, Mirror::None); + data.position = rel(data.position, rotation, Direction::South, 16); + let mut second = Placement { + position: up(data.position, 8), + rotation: data.rotation, + wall: "wall_window", + }; + let (base, third) = (&mansion.base, &mansion.third); + self.start_x = mansion.entrance_x + 1; + self.start_y = mansion.entrance_y + 1; + let (end_x, end_y) = (mansion.entrance_x + 1, mansion.entrance_y); + let (sx, sy) = (self.start_x, self.start_y); + self.outer_walls(&mut data, base, Direction::South, sx, sy, end_x, end_y); + self.outer_walls(&mut second, base, Direction::South, sx, sy, end_x, end_y); + let mut third_data = Placement { + position: up(data.position, 19), + rotation: data.rotation, + wall: "wall_window", + }; + 'done: for y in 0..third.height { + for x in (0..third.width).rev() { + if is_house(third, x, y) { + third_data.position = self.grid_pos(third_data.position, rotation, x, y, 0); + self.wall_piece(&mut third_data); + self.outer_walls(&mut third_data, third, Direction::South, x, y, x, y); + break 'done; + } + } + } + self.roof(up(origin, 16), rotation, base, Some(third)); + self.roof(up(origin, 27), rotation, third, None); + for floor in 0..3 { + let floor_origin = up(origin, 8 * floor as i32 + if floor == 2 { 3 } else { 0 }); + let rooms = &mansion.rooms[floor]; + let grid = if floor == 2 { third } else { base }; + let south_piece = if floor == 0 { "carpet_south_1" } else { "carpet_south_2" }; + let west_piece = if floor == 0 { "carpet_west_1" } else { "carpet_west_2" }; + let corridor = |x, y| grid.get(x, y) == 1 || rooms.get(x, y) & CORRIDOR_FLAG == CORRIDOR_FLAG; + for y in 0..grid.height { + for x in 0..grid.width { + if grid.get(x, y) != 1 { + continue; + } + let pos = self.grid_pos(floor_origin, rotation, x, y, 0); + self.add("corridor_floor", pos, rotation, Mirror::None); + if corridor(x, y - 1) { + let p = up(rel(pos, rotation, Direction::East, 1), 1); + self.add("carpet_north", p, rotation, Mirror::None); + } + if corridor(x + 1, y) { + let p = rel(pos, rotation, Direction::South, 1); + let p = up(rel(p, rotation, Direction::East, 5), 1); + self.add("carpet_east", p, rotation, Mirror::None); + } + if corridor(x, y + 1) { + let p = rel(pos, rotation, Direction::South, 5); + let p = rel(p, rotation, Direction::West, 1); + self.add(south_piece, p, rotation, Mirror::None); + } + if corridor(x - 1, y) { + let p = rel(pos, rotation, Direction::West, 1); + let p = rel(p, rotation, Direction::North, 1); + self.add(west_piece, p, rotation, Mirror::None); + } + } + } + let wall = if floor == 0 { "indoors_wall_1" } else { "indoors_wall_2" }; + let door = if floor == 0 { "indoors_door_1" } else { "indoors_door_2" }; + for y in 0..grid.height { + for x in 0..grid.width { + let mut third_start = floor == 2 && grid.get(x, y) == 3; + if grid.get(x, y) != 2 && !third_start { + continue; + } + let data = rooms.get(x, y); + let kind = data & TYPE_MASK; + let id = data & ID_MASK; + third_start = third_start && data & CORRIDOR_FLAG == CORRIDOR_FLAG; + let mut doors = Vec::new(); + if data & DOOR_FLAG == DOOR_FLAG { + for d in HORIZONTAL { + let (dx, dz) = step(d); + if grid.get(x + dx, y + dz) == 1 { + doors.push(d); + } + } + } + let door_dir = if !doors.is_empty() { + Some(doors[self.random.next_int_bound(doors.len() as i32).unwrap_or(0) as usize]) + } else if data & ORIGIN_FLAG == ORIGIN_FLAG { + Some(Direction::Up) + } else { + None + }; + let room_pos = self.grid_pos(floor_origin, rotation, x, y, -1); + let pick = |d: Direction| if door_dir == Some(d) { door } else { wall }; + if is_house(grid, x - 1, y) && !mansion.is_room_id(x - 1, y, floor, id) { + self.add(pick(Direction::West), room_pos, rotation, Mirror::None); + } + if grid.get(x + 1, y) == 1 && !third_start { + let p = rel(room_pos, rotation, Direction::East, 8); + self.add(pick(Direction::East), p, rotation, Mirror::None); + } + let cw90 = rotation.get_rotated(Rotation::Clockwise90); + if is_house(grid, x, y + 1) && !mansion.is_room_id(x, y + 1, floor, id) { + let p = rel(room_pos, rotation, Direction::South, 7); + let p = rel(p, rotation, Direction::East, 7); + self.add(pick(Direction::South), p, cw90, Mirror::None); + } + if grid.get(x, y - 1) == 1 && !third_start { + let p = rel(room_pos, rotation, Direction::North, 1); + let p = rel(p, rotation, Direction::East, 7); + self.add(pick(Direction::North), p, cw90, Mirror::None); + } + if kind == ROOM_1X1 { + self.room_1x1(room_pos, rotation, door_dir, floor); + } else if kind == ROOM_1X2 && door_dir.is_some() { + let room_dir = mansion.room_direction_1x2(x, y, floor, id); + let stairs = data & STAIRS_FLAG == STAIRS_FLAG; + if let (Some(room_dir), Some(door_dir)) = (room_dir, door_dir) { + self.room_1x2(room_pos, rotation, room_dir, door_dir, floor, stairs); + } + } else if kind == ROOM_2X2 && door_dir.is_some_and(|d| d != Direction::Up) { + let door_dir = door_dir.unwrap(); + let mut room_dir = clockwise(door_dir); + let (dx, dz) = step(room_dir); + if !mansion.is_room_id(x + dx, y + dz, floor, id) { + room_dir = opposite(room_dir); + } + self.room_2x2(room_pos, rotation, room_dir, door_dir, floor); + } else if kind == ROOM_2X2 && door_dir == Some(Direction::Up) { + let name = room_name(floor, "2x2s", self.random, false); + let p = rel(room_pos, rotation, Direction::East, 1); + self.add(name, p, rotation, Mirror::None); + } + } + } + } + } + #[allow(clippy::too_many_arguments)] + fn outer_walls( + &mut self, + data: &mut Placement, + grid: &Grid, + direction: Direction, + start_x: i32, + start_y: i32, + end_x: i32, + end_y: i32, + ) { + let (mut gx, mut gy, mut dir) = (start_x, start_y, direction); + let start_dir = direction; + loop { + let (dx, dz) = step(dir); + if !is_house(grid, gx + dx, gy + dz) { + data.position = rel(data.position, data.rotation, Direction::South, -1); + self.add("wall_corner", data.position, data.rotation, Mirror::None); + data.position = rel(data.position, data.rotation, Direction::South, -7); + data.position = rel(data.position, data.rotation, Direction::West, -6); + data.rotation = data.rotation.get_rotated(Rotation::Clockwise90); + dir = clockwise(dir); + if gx != end_x || gy != end_y || start_dir != dir { + self.wall_piece(data); + } + } else if { + let (cx, cz) = step(counter_clockwise(dir)); + is_house(grid, gx + dx + cx, gy + dz + cz) + } { + data.position = rel(data.position, data.rotation, Direction::South, 6); + data.position = rel(data.position, data.rotation, Direction::East, 8); + data.rotation = data.rotation.get_rotated(Rotation::Counterclockwise90); + gx += dx; + gy += dz; + dir = counter_clockwise(dir); + } else { + gx += dx; + gy += dz; + if gx != end_x || gy != end_y || start_dir != dir { + self.wall_piece(data); + } + } + if gx == end_x && gy == end_y && start_dir == dir { + break; + } + } + } + fn wall_piece(&mut self, data: &mut Placement) { + let p = rel(data.position, data.rotation, Direction::East, 7); + self.add(data.wall, p, data.rotation, Mirror::None); + data.position = rel(data.position, data.rotation, Direction::South, 8); + } + fn roof(&mut self, origin: [i32; 3], rotation: Rotation, grid: &Grid, above: Option<&Grid>) { + use Direction::{East, North, South, West}; + let r = |rot: Rotation| rotation.get_rotated(rot); + let (cw90, cw180, ccw90) = ( + r(Rotation::Clockwise90), + r(Rotation::Clockwise180), + r(Rotation::Counterclockwise90), + ); + let none = Mirror::None; + for y in 0..grid.height { + for x in 0..grid.width { + let pos = self.grid_pos(origin, rotation, x, y, 0); + let is_above = above.is_some_and(|a| is_house(a, x, y)); + if !is_house(grid, x, y) || is_above { + continue; + } + self.add("roof", up(pos, 3), rotation, none); + if !is_house(grid, x + 1, y) { + self.add("roof_front", rel(pos, rotation, East, 6), rotation, none); + } + if !is_house(grid, x - 1, y) { + let p = rel(rel(pos, rotation, East, 0), rotation, South, 7); + self.add("roof_front", p, cw180, none); + } + if !is_house(grid, x, y - 1) { + self.add("roof_front", rel(pos, rotation, West, 1), ccw90, none); + } + if !is_house(grid, x, y + 1) { + let p = rel(rel(pos, rotation, East, 6), rotation, South, 6); + self.add("roof_front", p, cw90, none); + } + } + } + if let Some(above) = above { + for y in 0..grid.height { + for x in 0..grid.width { + let pos = self.grid_pos(origin, rotation, x, y, 0); + if !(is_house(grid, x, y) && is_house(above, x, y)) { + continue; + } + if !is_house(grid, x + 1, y) { + self.add("small_wall", rel(pos, rotation, East, 7), rotation, none); + } + if !is_house(grid, x - 1, y) { + let p = rel(rel(pos, rotation, West, 1), rotation, South, 6); + self.add("small_wall", p, cw180, none); + } + if !is_house(grid, x, y - 1) { + let p = rel(rel(pos, rotation, West, 0), rotation, North, 1); + self.add("small_wall", p, ccw90, none); + } + if !is_house(grid, x, y + 1) { + let p = rel(rel(pos, rotation, East, 6), rotation, South, 7); + self.add("small_wall", p, cw90, none); + } + if !is_house(grid, x + 1, y) { + if !is_house(grid, x, y - 1) { + let p = rel(rel(pos, rotation, East, 7), rotation, North, 2); + self.add("small_wall_corner", p, rotation, none); + } + if !is_house(grid, x, y + 1) { + let p = rel(rel(pos, rotation, East, 8), rotation, South, 7); + self.add("small_wall_corner", p, cw90, none); + } + } + if !is_house(grid, x - 1, y) { + if !is_house(grid, x, y - 1) { + let p = rel(rel(pos, rotation, West, 2), rotation, North, 1); + self.add("small_wall_corner", p, ccw90, none); + } + if !is_house(grid, x, y + 1) { + let p = rel(rel(pos, rotation, West, 1), rotation, South, 8); + self.add("small_wall_corner", p, cw180, none); + } + } + } + } + } + for y in 0..grid.height { + for x in 0..grid.width { + let pos = self.grid_pos(origin, rotation, x, y, 0); + let is_above = above.is_some_and(|a| is_house(a, x, y)); + if !is_house(grid, x, y) || is_above { + continue; + } + if !is_house(grid, x + 1, y) { + let p2 = rel(pos, rotation, East, 6); + if !is_house(grid, x, y + 1) { + self.add("roof_corner", rel(p2, rotation, South, 6), rotation, none); + } else if is_house(grid, x + 1, y + 1) { + self.add("roof_inner_corner", rel(p2, rotation, South, 5), rotation, none); + } + if !is_house(grid, x, y - 1) { + self.add("roof_corner", p2, ccw90, none); + } else if is_house(grid, x + 1, y - 1) { + let p3 = rel(rel(pos, rotation, East, 9), rotation, North, 2); + self.add("roof_inner_corner", p3, cw90, none); + } + } + if !is_house(grid, x - 1, y) { + let p2 = rel(rel(pos, rotation, East, 0), rotation, South, 0); + if !is_house(grid, x, y + 1) { + self.add("roof_corner", rel(p2, rotation, South, 6), cw90, none); + } else if is_house(grid, x - 1, y + 1) { + let p3 = rel(rel(p2, rotation, South, 8), rotation, West, 3); + self.add("roof_inner_corner", p3, ccw90, none); + } + if !is_house(grid, x, y - 1) { + self.add("roof_corner", p2, cw180, none); + } else if is_house(grid, x - 1, y - 1) { + self.add("roof_inner_corner", rel(p2, rotation, South, 1), cw180, none); + } + } + } + } + } + fn room_1x1(&mut self, room_pos: [i32; 3], rotation: Rotation, door: Option<Direction>, floor: usize) { + let mut piece_rot = Rotation::None; + let mut name = room_name(floor, "1x1", self.random, false); + if door != Some(Direction::East) { + match door { + Some(Direction::North) => piece_rot = Rotation::Counterclockwise90, + Some(Direction::West) => piece_rot = Rotation::Clockwise180, + Some(Direction::South) => piece_rot = Rotation::Clockwise90, + _ => name = room_name(floor, "1x1s", self.random, false), + } + } + let o = match piece_rot { + Rotation::Counterclockwise90 => [1, 0, 6], + Rotation::Clockwise90 => [7, 0, 0], + Rotation::Clockwise180 => [7, 0, 6], + Rotation::None => [1, 0, 0], + }; + let piece_rot = piece_rot.get_rotated(rotation); + let o = match rotation { + Rotation::Clockwise90 => [-o[2], o[1], o[0]], + Rotation::Clockwise180 => [-o[0], o[1], -o[2]], + Rotation::Counterclockwise90 => [o[2], o[1], -o[0]], + Rotation::None => o, + }; + let pos = [room_pos[0] + o[0], room_pos[1], room_pos[2] + o[2]]; + self.add(name, pos, piece_rot, Mirror::None); + } + fn room_1x2( + &mut self, + room_pos: [i32; 3], + rotation: Rotation, + room: Direction, + door: Direction, + floor: usize, + stairs: bool, + ) { + use Direction::{East, North, South, Up, West}; + let r = |rot: Rotation| rotation.get_rotated(rot); + let at = |east: i32, south: i32| { + rel(rel(room_pos, rotation, East, east), rotation, South, south) + }; + let (kind, pos, rot, mirror) = match (door, room) { + (East, South) => ("side", at(1, 0), rotation, Mirror::None), + (East, North) => ("side", at(1, 6), rotation, Mirror::LeftRight), + (West, North) => ("side", at(7, 6), r(Rotation::Clockwise180), Mirror::None), + (West, South) => ("side", at(7, 0), rotation, Mirror::FrontBack), + (South, East) => ("side", at(1, 0), r(Rotation::Clockwise90), Mirror::LeftRight), + (South, West) => ("side", at(7, 0), r(Rotation::Clockwise90), Mirror::None), + (North, West) => ("side", at(7, 6), r(Rotation::Clockwise90), Mirror::FrontBack), + (North, East) => ("side", at(1, 6), r(Rotation::Counterclockwise90), Mirror::None), + (South, North) => ("front", at(1, -8), rotation, Mirror::None), + (North, South) => ("front", at(7, 14), r(Rotation::Clockwise180), Mirror::None), + (West, East) => ("front", at(15, 0), r(Rotation::Clockwise90), Mirror::None), + (East, West) => ("front", at(-7, 6), r(Rotation::Counterclockwise90), Mirror::None), + (Up, East) => ("1x2s", at(15, 0), r(Rotation::Clockwise90), Mirror::None), + (Up, South) => ("1x2s", at(1, 0), rotation, Mirror::None), + _ => return, + }; + let name = room_name(floor, kind, self.random, stairs); + self.add(name, pos, rot, mirror); + } + fn room_2x2(&mut self, room_pos: [i32; 3], rotation: Rotation, room: Direction, door: Direction, floor: usize) { + use Direction::{East, North, South, West}; + let r = |rot: Rotation| rotation.get_rotated(rot); + let (east, south, rot, mirror) = match (door, room) { + (East, South) => (-7, 0, rotation, Mirror::None), + (East, North) => (-7, 6, rotation, Mirror::LeftRight), + (North, East) => (1, 14, r(Rotation::Counterclockwise90), Mirror::None), + (North, West) => (7, 14, r(Rotation::Counterclockwise90), Mirror::LeftRight), + (South, West) => (7, -8, r(Rotation::Clockwise90), Mirror::None), + (South, East) => (1, -8, r(Rotation::Clockwise90), Mirror::LeftRight), + (West, North) => (15, 6, r(Rotation::Clockwise180), Mirror::None), + (West, South) => (15, 0, rotation, Mirror::FrontBack), + _ => (0, 0, rotation, Mirror::None), + }; + let pos = rel(rel(room_pos, rotation, East, east), rotation, South, south); + let name = room_name(floor, "2x2", self.random, false); + self.add(name, pos, rot, mirror); + } +} + +/// WoodlandMansionPieces.generateMansion. +pub fn pieces( + resources: &StructureResources, + origin: [i32; 3], + rotation: Rotation, + random: &mut impl RandomSource, +) -> Option<Vec<TemplatePiece>> { + let grid = MansionGrid::new(random); + let mut placer = Placer { + random, + pieces: Vec::new(), + start_x: 0, + start_y: 0, + }; + placer.create(origin, rotation, &grid); + let processors = Arc::new(ProcessorList::default()); + placer + .pieces + .into_iter() + .map(|p| { + let name = format!("minecraft:woodland_mansion/{}", p.name); + Some(TemplatePiece::new( + "minecraft:wmp", + &name, + resources.template(&name)?, + p.position, + p.rotation, + p.mirror, + [0; 3], + processors.clone(), + true, + vec!["minecraft:structure_block".into()], + TemplateHandler::Mansion, + )) + }) + .collect() +} + +/// WoodlandMansionPiece.postProcess with its data markers. +pub fn post_process(piece: &TemplatePiece, c: &mut PieceContext<'_>) -> Result<()> { + let Some(markers) = piece.place_at(c, piece.position, &[])? else { + return Ok(()); + }; + for (marker, pos) in markers { + if marker.starts_with("Chest") { + let facing = match marker.as_str() { + "ChestWest" => Direction::West, + "ChestEast" => Direction::East, + "ChestSouth" => Direction::South, + _ => Direction::North, + }; + let facing = if marker == "Chest" { + Direction::North + } else { + piece.rotation.rotate_direction(facing) + }; + let state = c.state_with("chest", &[("facing", direction_name(facing))]); + create_chest(c, pos, "minecraft:chests/woodland_mansion", Some(state))?; + } else if matches!(marker.as_str(), "Mage" | "Warrior" | "Group of Allays") { + // Mobs are not spawned; the marker is cleared as after a spawn. + if marker == "Group of Allays" { + c.world.level_int(3)?; + } + c.world.set(pos, c.state("air"), 2)?; + } + } + Ok(()) +} + +/// WoodlandMansionStructure.afterPlace: cobblestone columns under the pieces. +pub fn after_place(c: &mut PieceContext<'_>, boxes: &[BoundingBox]) -> Result<()> { + let min_y = c.world.min_y()?; + let bb = super::temple::union(boxes); + let y_start = bb.min[1]; + let cobble = c.state("cobblestone"); + for x in c.chunk_box.min[0]..=c.chunk_box.max[0] { + for z in c.chunk_box.min[2]..=c.chunk_box.max[2] { + let pos = [x, y_start, z]; + let state = c.world.block(pos)?; + if c.is_air(state) || !bb.is_inside(pos) || !boxes.iter().any(|b| b.is_inside(pos)) { + continue; + } + let mut y = y_start - 1; + while y > min_y { + let state = c.world.block([x, y, z])?; + if !c.is_air(state) && !c.is_liquid(state) { + break; + } + c.world.set([x, y, z], cobble, 2)?; + y -= 1; + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/src/worldgen/structure/mineshaft.rs b/crates/horizon-world/src/worldgen/structure/mineshaft.rs new file mode 100644 index 000000000..5b6a306c3 --- /dev/null +++ b/crates/horizon-world/src/worldgen/structure/mineshaft.rs @@ -0,0 +1,743 @@ +//! Mineshafts: MineshaftStructure and MineshaftPieces. +use super::{ + BoundingBox, + legacy::{LegacyPiece, PieceContext, PieceFrame, Result, solid_render}, +}; +use crate::worldgen::biome::BiomeId; +use horizon_core::{geometry::Direction, random::RandomSource}; +use std::{ + collections::BTreeSet, + sync::{Arc, Mutex}, +}; + +/// MineshaftStructure.Type: wood, planks, fence, and the blocks pieces keep. +#[derive(Clone, Copy, Debug)] +pub struct Wood { + log: &'static str, + planks: &'static str, + fence: &'static str, + keep: &'static [&'static str], +} +pub const NORMAL: Wood = Wood { + log: "minecraft:oak_log", + planks: "minecraft:oak_planks", + fence: "minecraft:oak_fence", + keep: &[ + "minecraft:oak_planks", + "minecraft:oak_log", + "minecraft:oak_fence", + "minecraft:iron_chain", + ], +}; +pub const MESA: Wood = Wood { + log: "minecraft:dark_oak_log", + planks: "minecraft:dark_oak_planks", + fence: "minecraft:dark_oak_fence", + keep: &[ + "minecraft:dark_oak_planks", + "minecraft:dark_oak_log", + "minecraft:dark_oak_fence", + "minecraft:iron_chain", + ], +}; + +#[derive(Debug)] +enum Kind { + Room(Vec<BoundingBox>), + Corridor { + rails: bool, + spider: bool, + sections: i32, + placed_spider: Mutex<bool>, + }, + Crossing { + direction: Direction, + two_floored: bool, + }, + Stairs, +} +#[derive(Debug)] +pub struct MineshaftPiece { + kind: Kind, + frame: PieceFrame, + depth: i32, + wood: Wood, + blocking: Arc<BTreeSet<BiomeId>>, +} + +fn int(r: &mut impl RandomSource, bound: i32) -> i32 { + r.next_int_bound(bound).unwrap_or(0) +} +fn bb(a: [i32; 3], b: [i32; 3], at: [i32; 3]) -> BoundingBox { + BoundingBox::new(a, b).moved(at) +} + +struct Builder { + pieces: Vec<MineshaftPiece>, +} +impl Builder { + fn collides(&self, b: &BoundingBox) -> bool { + self.pieces + .iter() + .any(|p| p.frame.bounding_box.intersects(b)) + } + fn piece( + &self, + kind: Kind, + b: BoundingBox, + o: Option<Direction>, + depth: i32, + ) -> MineshaftPiece { + let start = &self.pieces[0]; + let mut frame = PieceFrame::new(b, o); + frame.keep = start.wood.keep; + MineshaftPiece { + kind, + frame, + depth, + wood: start.wood, + blocking: start.blocking.clone(), + } + } + /// MineshaftPieces.createRandomShaftPiece. + fn create( + &self, + r: &mut impl RandomSource, + at: [i32; 3], + d: Direction, + depth: i32, + ) -> Option<MineshaftPiece> { + let selection = int(r, 100); + if selection >= 80 { + let y1 = if int(r, 4) == 0 { 6 } else { 2 }; + let b = match d { + Direction::South => bb([-1, 0, 0], [3, y1, 4], at), + Direction::West => bb([-4, 0, -1], [0, y1, 3], at), + Direction::East => bb([0, 0, -1], [4, y1, 3], at), + _ => bb([-1, 0, -4], [3, y1, 0], at), + }; + if self.collides(&b) { + return None; + } + let kind = Kind::Crossing { + direction: d, + two_floored: b.span()[1] > 3, + }; + Some(self.piece(kind, b, None, depth)) + } else if selection >= 70 { + let b = match d { + Direction::South => bb([0, -5, 0], [2, 2, 8], at), + Direction::West => bb([-8, -5, 0], [0, 2, 2], at), + Direction::East => bb([0, -5, 0], [8, 2, 2], at), + _ => bb([0, -5, -8], [2, 2, 0], at), + }; + (!self.collides(&b)).then(|| self.piece(Kind::Stairs, b, Some(d), depth)) + } else { + let mut length = int(r, 3) + 2; + while length > 0 { + let l = length * 5 - 1; + let b = match d { + Direction::South => bb([0, 0, 0], [2, 2, l], at), + Direction::West => bb([-l, 0, 0], [0, 2, 2], at), + Direction::East => bb([0, 0, 0], [l, 2, 2], at), + _ => bb([0, 0, -l], [2, 2, 0], at), + }; + if !self.collides(&b) { + let rails = int(r, 3) == 0; + let spider = !rails && int(r, 23) == 0; + let axis = if matches!(d, Direction::North | Direction::South) { + 2 + } else { + 0 + }; + let kind = Kind::Corridor { + rails, + spider, + sections: b.span()[axis] / 5, + placed_spider: Mutex::new(false), + }; + return Some(self.piece(kind, b, Some(d), depth)); + } + length -= 1; + } + None + } + } + /// MineshaftPieces.generateAndAddPiece; returns the new piece's box. + fn add( + &mut self, + r: &mut impl RandomSource, + at: [i32; 3], + d: Direction, + depth: i32, + ) -> Option<BoundingBox> { + if depth > 8 { + return None; + } + let start = self.pieces[0].frame.bounding_box; + if (at[0] - start.min[0]).abs() > 80 || (at[2] - start.min[2]).abs() > 80 { + return None; + } + let piece = self.create(r, at, d, depth + 1)?; + let b = piece.frame.bounding_box; + self.pieces.push(piece); + self.add_children(r, self.pieces.len() - 1); + Some(b) + } + fn add_children(&mut self, r: &mut impl RandomSource, index: usize) { + let p = &self.pieces[index]; + let (b, depth, orientation) = (p.frame.bounding_box, p.depth, p.frame.orientation); + let ([x0, y0, z0], [x1, y1, z1]) = (b.min, b.max); + use Direction::*; + match &p.kind { + Kind::Room(_) => { + let height = (b.span()[1] - 4).max(1); + let [xs, _, zs] = b.span(); + for side in 0..4 { + let span = if side < 2 { xs } else { zs }; + let mut pos = 0; + while pos < span { + pos += int(r, span); + if pos + 3 > span { + break; + } + let y = y0 + int(r, height) + 1; + let (at, d) = match side { + 0 => ([x0 + pos, y, z0 - 1], North), + 1 => ([x0 + pos, y, z1 + 1], South), + 2 => ([x0 - 1, y, z0 + pos], West), + _ => ([x1 + 1, y, z0 + pos], East), + }; + if let Some(c) = self.add(r, at, d, depth) { + let entrance = match side { + 0 => BoundingBox::new( + [c.min[0], c.min[1], z0], + [c.max[0], c.max[1], z0 + 1], + ), + 1 => BoundingBox::new( + [c.min[0], c.min[1], z1 - 1], + [c.max[0], c.max[1], z1], + ), + 2 => BoundingBox::new( + [x0, c.min[1], c.min[2]], + [x0 + 1, c.max[1], c.max[2]], + ), + _ => BoundingBox::new( + [x1 - 1, c.min[1], c.min[2]], + [x1, c.max[1], c.max[2]], + ), + }; + if let Kind::Room(entrances) = &mut self.pieces[index].kind { + entrances.push(entrance); + } + } + pos += 4; + } + } + } + Kind::Corridor { .. } => { + let end = int(r, 4); + let o = orientation.unwrap_or(North); + let (forward, left, right) = match o { + South => ( + [x0, z1 + 1], + (West, [x0 - 1, z1 - 3]), + (East, [x1 + 1, z1 - 3]), + ), + West => ([x0 - 1, z0], (North, [x0, z0 - 1]), (South, [x0, z1 + 1])), + East => ( + [x1 + 1, z0], + (North, [x1 - 3, z0 - 1]), + (South, [x1 - 3, z1 + 1]), + ), + _ => ([x0, z0 - 1], (West, [x0 - 1, z0]), (East, [x1 + 1, z0])), + }; + let (d, [x, z]) = match end { + 0 | 1 => (o, forward), + 2 => left, + _ => right, + }; + let y = y0 - 1 + int(r, 3); + self.add(r, [x, y, z], d, depth); + if depth < 8 { + if o != North && o != South { + let mut x = x0 + 3; + while x + 3 <= x1 { + match int(r, 5) { + 0 => { + self.add(r, [x, y0, z0 - 1], North, depth + 1); + } + 1 => { + self.add(r, [x, y0, z1 + 1], South, depth + 1); + } + _ => {} + } + x += 5; + } + } else { + let mut z = z0 + 3; + while z + 3 <= z1 { + match int(r, 5) { + 0 => { + self.add(r, [x0 - 1, y0, z], West, depth + 1); + } + 1 => { + self.add(r, [x1 + 1, y0, z], East, depth + 1); + } + _ => {} + } + z += 5; + } + } + } + } + Kind::Crossing { + direction, + two_floored, + } => { + let two = *two_floored; + let n = ([x0 + 1, y0, z0 - 1], North); + let s = ([x0 + 1, y0, z1 + 1], South); + let w = ([x0 - 1, y0, z0 + 1], West); + let e = ([x1 + 1, y0, z0 + 1], East); + let order = match direction { + South => [s, w, e], + West => [n, s, w], + East => [n, s, e], + _ => [n, w, e], + }; + for (at, d) in order { + self.add(r, at, d, depth); + } + if two { + for (at, d) in [n, w, e, s] { + if r.next_boolean() { + self.add(r, [at[0], y0 + 4, at[2]], d, depth); + } + } + } + } + Kind::Stairs => { + let (at, d) = match orientation.unwrap_or(North) { + South => ([x0, y0, z1 + 1], South), + West => ([x0 - 1, y0, z0], West), + East => ([x1 + 1, y0, z0], East), + _ => ([x0, y0, z0 - 1], North), + }; + self.add(r, at, d, depth); + } + } + } +} + +/// MineshaftStructure.findGenerationPoint: the pieces and the start position. +pub fn generate( + r: &mut impl RandomSource, + chunk: [i32; 2], + mesa: bool, + blocking: Arc<BTreeSet<BiomeId>>, + sea_level: i32, + min_y: i32, + surface: &mut dyn FnMut(i32, i32) -> i32, +) -> ([i32; 3], Vec<MineshaftPiece>) { + r.next_double(); + let (west, north) = (chunk[0] * 16 + 2, chunk[1] * 16 + 2); + let room = BoundingBox::new( + [west, 50, north], + [west + 7 + int(r, 6), 54 + int(r, 6), north + 7 + int(r, 6)], + ); + let wood = if mesa { MESA } else { NORMAL }; + let mut frame = PieceFrame::new(room, None); + frame.keep = wood.keep; + let mut builder = Builder { + pieces: vec![MineshaftPiece { + kind: Kind::Room(Vec::new()), + frame, + depth: 0, + wood, + blocking, + }], + }; + builder.add_children(r, 0); + let mut all = builder.pieces[0].frame.bounding_box; + for p in &builder.pieces[1..] { + all.encapsulate(&p.frame.bounding_box); + } + let dy = if mesa { + let center = all.center(); + let height = surface(center[0], center[2]); + let target = if height <= sea_level { + sea_level + } else { + int(r, height - sea_level + 1) + sea_level + }; + target - center[1] + } else { + let max = sea_level - 10; + let mut y1 = all.span()[1] + min_y + 1; + if y1 < max { + y1 += int(r, max - y1); + } + y1 - all.max[1] + }; + for p in &mut builder.pieces { + p.frame.bounding_box = p.frame.bounding_box.moved([0, dy, 0]); + if let Kind::Room(entrances) = &mut p.kind { + for e in entrances { + *e = e.moved([0, dy, 0]); + } + } + } + ([chunk[0] * 16 + 8, 50 + dy, chunk[1] * 16], builder.pieces) +} + +fn replaceable(name: &str) -> bool { + matches!( + name, + "minecraft:air" + | "minecraft:cave_air" + | "minecraft:void_air" + | "minecraft:water" + | "minecraft:lava" + | "minecraft:glow_lichen" + | "minecraft:seagrass" + | "minecraft:tall_seagrass" + ) +} +fn falling(name: &str) -> bool { + matches!( + name, + "minecraft:sand" + | "minecraft:red_sand" + | "minecraft:gravel" + | "minecraft:anvil" + | "minecraft:chipped_anvil" + | "minecraft:damaged_anvil" + | "minecraft:dragon_egg" + ) || name.ends_with("_concrete_powder") +} + +impl MineshaftPiece { + fn invalid(&self, c: &mut PieceContext<'_>) -> Result<bool> { + let (b, k) = (self.frame.bounding_box, c.chunk_box); + let lo: [i32; 3] = std::array::from_fn(|i| (b.min[i] - 1).max(k.min[i])); + let hi: [i32; 3] = std::array::from_fn(|i| (b.max[i] + 1).min(k.max[i])); + let center = std::array::from_fn(|i| (lo[i] + hi[i]) / 2); + if self.blocking.contains(&c.world.biome(center)?) { + return Ok(true); + } + let liquid = |c: &mut PieceContext<'_>, p: [i32; 3]| -> Result<bool> { + let s = c.world.block(p)?; + Ok(c.is_liquid(s)) + }; + for x in lo[0]..=hi[0] { + for z in lo[2]..=hi[2] { + if liquid(c, [x, lo[1], z])? || liquid(c, [x, hi[1], z])? { + return Ok(true); + } + } + } + for x in lo[0]..=hi[0] { + for y in lo[1]..=hi[1] { + if liquid(c, [x, y, lo[2]])? || liquid(c, [x, y, hi[2]])? { + return Ok(true); + } + } + } + for z in lo[2]..=hi[2] { + for y in lo[1]..=hi[1] { + if liquid(c, [lo[0], y, z])? || liquid(c, [hi[0], y, z])? { + return Ok(true); + } + } + } + Ok(false) + } + fn set_planks(&self, c: &mut PieceContext<'_>, x: i32, y: i32, z: i32) -> Result<()> { + if self.frame.is_interior(c, x, y, z)? { + let pos = self.frame.world_pos(x, y, z); + if !c.world.face_sturdy(pos, Direction::Up)? { + c.world.set(pos, c.state(self.wood.planks), 2)?; + } + } + Ok(()) + } + fn air_box(&self, c: &mut PieceContext<'_>, a: [i32; 3], b: [i32; 3]) -> Result<()> { + let air = c.state("cave_air"); + self.frame.generate_box(c, a, b, air, air, false) + } + fn room(&self, c: &mut PieceContext<'_>, entrances: &[BoundingBox]) -> Result<()> { + let b = self.frame.bounding_box; + self.air_box( + c, + [b.min[0], b.min[1] + 1, b.min[2]], + [b.max[0], (b.min[1] + 3).min(b.max[1]), b.max[2]], + )?; + for e in entrances { + self.air_box(c, [e.min[0], e.max[1] - 2, e.min[2]], e.max)?; + } + let air = c.state("cave_air"); + self.frame + .upper_half_sphere(c, [b.min[0], b.min[1] + 4, b.min[2]], b.max, air, false) + } + fn crossing(&self, c: &mut PieceContext<'_>, two_floored: bool) -> Result<()> { + let ([x0, y0, z0], [x1, y1, z1]) = + (self.frame.bounding_box.min, self.frame.bounding_box.max); + if two_floored { + self.air_box(c, [x0 + 1, y0, z0], [x1 - 1, y0 + 2, z1])?; + self.air_box(c, [x0, y0, z0 + 1], [x1, y0 + 2, z1 - 1])?; + self.air_box(c, [x0 + 1, y1 - 2, z0], [x1 - 1, y1, z1])?; + self.air_box(c, [x0, y1 - 2, z0 + 1], [x1, y1, z1 - 1])?; + self.air_box(c, [x0 + 1, y0 + 3, z0 + 1], [x1 - 1, y0 + 3, z1 - 1])?; + } else { + self.air_box(c, [x0 + 1, y0, z0], [x1 - 1, y1, z1])?; + self.air_box(c, [x0, y0, z0 + 1], [x1, y1, z1 - 1])?; + } + let planks = c.state(self.wood.planks); + let air = c.state("cave_air"); + for (x, z) in [ + (x0 + 1, z0 + 1), + (x0 + 1, z1 - 1), + (x1 - 1, z0 + 1), + (x1 - 1, z1 - 1), + ] { + let above = self.frame.get(c, x, y1 + 1, z)?; + if !c.is_air(above) { + self.frame + .generate_box(c, [x, y0, z], [x, y1, z], planks, air, false)?; + } + } + for x in x0..=x1 { + for z in z0..=z1 { + self.set_planks(c, x, y0 - 1, z)?; + } + } + Ok(()) + } + fn stairs(&self, c: &mut PieceContext<'_>) -> Result<()> { + self.air_box(c, [0, 5, 0], [2, 7, 1])?; + self.air_box(c, [0, 0, 7], [2, 2, 8])?; + for i in 0..5 { + self.air_box(c, [0, 5 - i - i32::from(i < 4), 2 + i], [2, 7 - i, 2 + i])?; + } + Ok(()) + } + #[allow(clippy::too_many_arguments)] + fn corridor( + &self, + c: &mut PieceContext<'_>, + rails: bool, + spider: bool, + sections: i32, + placed_spider: &Mutex<bool>, + ) -> Result<()> { + let f = self.frame; + let length = sections * 5 - 1; + let air = c.state("cave_air"); + let web = c.state("cobweb"); + f.generate_box(c, [0, 0, 0], [2, 1, length], air, air, false)?; + f.generate_maybe_box(c, 0.8, [0, 2, 0], [2, 2, length], air, air, false, false)?; + if spider { + f.generate_maybe_box(c, 0.6, [0, 0, 0], [2, 1, length], web, air, false, true)?; + } + for section in 0..sections { + let z = 2 + section * 5; + self.support(c, z)?; + for (p, x, dz) in [ + (0.1, 0, -1), + (0.1, 2, -1), + (0.1, 0, 1), + (0.1, 2, 1), + (0.05, 0, -2), + (0.05, 2, -2), + (0.05, 0, 2), + (0.05, 2, 2), + ] { + if f.is_interior(c, x, 2, z + dz)? + && c.random.float() < p + && self.sturdy_neighbours(c, [x, 2, z + dz])? + { + f.place(c, web, x, 2, z + dz)?; + } + } + if c.random.int(100) == 0 { + self.minecart_chest(c, 2, 0, z - 1)?; + } + if c.random.int(100) == 0 { + self.minecart_chest(c, 0, 0, z + 1)?; + } + if spider && !*placed_spider.lock().unwrap() { + let nz = z - 1 + c.random.int(3); + let pos = f.world_pos(1, 0, nz); + if c.chunk_box.is_inside(pos) && f.is_interior(c, 1, 0, nz)? { + *placed_spider.lock().unwrap() = true; + c.spawner(pos, "minecraft:cave_spider")?; + } + } + } + for x in 0..=2 { + for z in 0..=length { + self.set_planks(c, x, -1, z)?; + } + } + self.double_support(c, 2)?; + if sections > 1 { + self.double_support(c, length - 2)?; + } + if rails { + let rail = c.state_with("rail", &[("shape", "north_south")]); + for z in 0..=length { + let floor = f.get(c, 1, -1, z)?; + if !c.is_air(floor) && solid_render(c, floor) { + let p = if f.is_interior(c, 1, 0, z)? { 0.7 } else { 0.9 }; + f.maybe_block(c, p, 1, 0, z, rail)?; + } + } + } + Ok(()) + } + /// MineShaftCorridor.createChest: a rail with a chest minecart. + fn minecart_chest(&self, c: &mut PieceContext<'_>, x: i32, y: i32, z: i32) -> Result<()> { + let pos = self.frame.world_pos(x, y, z); + if !c.chunk_box.is_inside(pos) { + return Ok(()); + } + let here = c.world.block(pos)?; + let below = c.world.block([pos[0], pos[1] - 1, pos[2]])?; + if c.is_air(here) && !c.is_air(below) { + let shape = if c.random.boolean() { + "north_south" + } else { + "east_west" + }; + let rail = c.state_with("rail", &[("shape", shape)]); + self.frame.place(c, rail, x, y, z)?; + // The chest minecart entity (loot table seed drawn here) is not + // stored: worldgen output carries no entities. + c.random.long(); + } + Ok(()) + } + /// MineShaftCorridor.placeSupport(x0 0, y0 0, z, y1 2, x1 2). + fn support(&self, c: &mut PieceContext<'_>, z: i32) -> Result<()> { + let f = self.frame; + for x in 0..=2 { + let above = f.get(c, x, 3, z)?; + if c.is_air(above) { + return Ok(()); + } + } + let air = c.state("cave_air"); + let planks = c.state(self.wood.planks); + let west = c.state_with(self.wood.fence, &[("west", "true")]); + let east = c.state_with(self.wood.fence, &[("east", "true")]); + f.generate_box(c, [0, 0, z], [0, 1, z], west, air, false)?; + f.generate_box(c, [2, 0, z], [2, 1, z], east, air, false)?; + if c.random.int(4) == 0 { + f.generate_box(c, [0, 2, z], [0, 2, z], planks, air, false)?; + f.generate_box(c, [2, 2, z], [2, 2, z], planks, air, false)?; + } else { + f.generate_box(c, [0, 2, z], [2, 2, z], planks, air, false)?; + let south = c.state_with("wall_torch", &[("facing", "south")]); + let north = c.state_with("wall_torch", &[("facing", "north")]); + f.maybe_block(c, 0.05, 1, 2, z - 1, south)?; + f.maybe_block(c, 0.05, 1, 2, z + 1, north)?; + } + Ok(()) + } + fn sturdy_neighbours(&self, c: &mut PieceContext<'_>, [x, y, z]: [i32; 3]) -> Result<bool> { + let pos = self.frame.world_pos(x, y, z); + let mut count = 0; + for d in Direction::ALL { + let n = super::legacy::offset(pos, d, 1); + if c.chunk_box.is_inside(n) && c.world.face_sturdy(n, d.opposite())? { + count += 1; + if count >= 2 { + return Ok(true); + } + } + } + Ok(false) + } + fn double_support(&self, c: &mut PieceContext<'_>, z: i32) -> Result<()> { + for x in [0, 2] { + let s = self.frame.get(c, x, -1, z)?; + if c.name(s) == self.wood.planks { + self.pillar_or_chain(c, x, -1, z)?; + } + } + Ok(()) + } + /// MineShaftCorridor.fillPillarDownOrChainUp. + fn pillar_or_chain(&self, c: &mut PieceContext<'_>, x: i32, y: i32, z: i32) -> Result<()> { + let [px, wy, pz] = self.frame.world_pos(x, y, z); + if !c.chunk_box.is_inside([px, wy, pz]) { + return Ok(()); + } + let (min, max) = (c.world.min_y()?, c.world.max_y()?); + let (mut below, mut above) = (true, true); + let mut distance = 1; + while below || above { + if below { + let p = [px, wy - distance, pz]; + let s = c.world.block(p)?; + let name = c.name(s).to_owned(); + let empty = replaceable(&name) && name != "minecraft:lava"; + if !empty && c.world.face_sturdy(p, Direction::Up)? { + let log = c.state(self.wood.log); + for py in wy - distance + 1..wy { + c.world.set([px, py, pz], log, 2)?; + } + return Ok(()); + } + below = distance <= 20 && empty && p[1] > min + 1; + } + if above { + let p = [px, wy + distance, pz]; + let s = c.world.block(p)?; + let name = c.name(s).to_owned(); + let empty = replaceable(&name); + if !empty && c.world.center_sturdy(p, Direction::Down)? && !falling(&name) { + c.world.set([px, wy + 1, pz], c.state(self.wood.fence), 2)?; + let chain = c.state("iron_chain"); + for py in wy + 2..wy + distance { + c.world.set([px, py, pz], chain, 2)?; + } + return Ok(()); + } + above = distance <= 50 && empty && p[1] < max; + } + distance += 1; + } + Ok(()) + } +} +impl LegacyPiece for MineshaftPiece { + fn bounding_box(&self) -> BoundingBox { + self.frame.bounding_box + } + fn type_name(&self) -> &'static str { + match self.kind { + Kind::Room(_) => "minecraft:msroom", + Kind::Corridor { .. } => "minecraft:mscorridor", + Kind::Crossing { .. } => "minecraft:mscrossing", + Kind::Stairs => "minecraft:msstairs", + } + } + fn post_process(&self, c: &mut PieceContext<'_>) -> Result<()> { + if self.invalid(c)? { + return Ok(()); + } + match &self.kind { + Kind::Room(entrances) => self.room(c, entrances), + Kind::Crossing { two_floored, .. } => self.crossing(c, *two_floored), + Kind::Stairs => self.stairs(c), + Kind::Corridor { + rails, + spider, + sections, + placed_spider, + } => self.corridor(c, *rails, *spider, *sections, placed_spider), + } + } +} diff --git a/crates/horizon-world/src/worldgen/structure/monument.rs b/crates/horizon-world/src/worldgen/structure/monument.rs new file mode 100644 index 000000000..f875a3ae3 --- /dev/null +++ b/crates/horizon-world/src/worldgen/structure/monument.rs @@ -0,0 +1,1368 @@ +//! Ocean monuments (OceanMonumentStructure, OceanMonumentPieces). +use super::{ + BoundingBox, + legacy::{LegacyPiece, PieceContext, PieceFrame, Result, make_bounding_box}, +}; +use crate::registry::BlockStateId; +use horizon_core::{geometry::Direction, random::RandomSource}; + +const DOWN: usize = 0; +const UP: usize = 1; +const NORTH: usize = 2; +const SOUTH: usize = 3; +const WEST: usize = 4; +const EAST: usize = 5; +const OPPOSITE: [usize; 6] = [UP, DOWN, SOUTH, NORTH, EAST, WEST]; +const STEPS: [[i32; 3]; 6] = [ + [0, -1, 0], + [0, 1, 0], + [0, 0, -1], + [0, 0, 1], + [-1, 0, 0], + [1, 0, 0], +]; + +#[derive(Clone, Debug)] +struct Room { + index: i32, + conn: [Option<usize>; 6], + open: [bool; 6], + claimed: bool, + source: bool, + scan: i32, +} +impl Room { + fn new(index: i32) -> Self { + Self { + index, + conn: [None; 6], + open: [false; 6], + claimed: false, + source: false, + scan: 0, + } + } +} +fn room_index(x: i32, y: i32, z: i32) -> i32 { + y * 25 + z * 5 + x +} +struct Graph { + rooms: Vec<Room>, +} +impl Graph { + fn connect(&mut self, a: usize, d: usize, b: usize) { + self.rooms[a].conn[d] = Some(b); + self.rooms[b].conn[OPPOSITE[d]] = Some(a); + } + fn update_openings(&mut self, a: usize) { + let conn = self.rooms[a].conn; + self.rooms[a].open = conn.map(|c| c.is_some()); + } + fn find_source(&mut self, a: usize, scan: i32) -> bool { + if self.rooms[a].source { + return true; + } + self.rooms[a].scan = scan; + for i in 0..6 { + if let Some(n) = self.rooms[a].conn[i] + && self.rooms[a].open[i] + && self.rooms[n].scan != scan + && self.find_source(n, scan) + { + return true; + } + } + false + } + fn conn(&self, a: usize, d: usize) -> usize { + self.rooms[a].conn[d].unwrap_or(a) + } + fn open(&self, a: usize, d: usize) -> bool { + self.rooms[a].open[d] + } + fn claim(&mut self, a: usize) { + self.rooms[a].claimed = true; + } +} + +#[derive(Clone, Copy, Debug)] +enum Kind { + Entry, + Core, + DoubleX, + DoubleXY, + DoubleY, + DoubleYZ, + DoubleZ, + Simple(i32), + SimpleTop, + Wing(i32), + Penthouse, +} +#[derive(Debug)] +struct Child { + kind: Kind, + frame: PieceFrame, + room: usize, +} + +#[derive(Debug)] +pub struct MonumentBuilding { + frame: PieceFrame, + rooms: Vec<Room>, + children: Vec<Child>, +} +fn room_box(direction: Direction, index: i32, w: i32, h: i32, d: i32) -> BoundingBox { + let (rx, rz, ry) = (index % 5, index / 5 % 5, index / 25); + let b = make_bounding_box(0, 0, 0, direction, w * 8, h * 4, d * 8); + b.moved(match direction { + Direction::North => [rx * 8, ry * 4, -(rz + d) * 8 + 1], + Direction::South => [rx * 8, ry * 4, rz * 8], + Direction::West => [-(rz + d) * 8 + 1, ry * 4, rx * 8], + _ => [rz * 8, ry * 4, rx * 8], + }) +} +impl MonumentBuilding { + pub fn new(random: &mut impl RandomSource, west: i32, north: i32, direction: Direction) -> Self { + let frame = PieceFrame::new( + make_bounding_box(west, 39, north, direction, 58, 23, 58), + Some(direction), + ); + let mut g = Graph { rooms: Vec::new() }; + let mut grid: [Option<usize>; 75] = [None; 75]; + let mut add = |g: &mut Graph, x: i32, y: i32, z: i32| { + let i = room_index(x, y, z); + grid[i as usize] = Some(g.rooms.len()); + g.rooms.push(Room::new(i)); + }; + for x in 0..5 { + for z in 0..4 { + add(&mut g, x, 0, z); + } + } + for x in 0..5 { + for z in 0..4 { + add(&mut g, x, 1, z); + } + } + for x in 1..4 { + for z in 0..2 { + add(&mut g, x, 2, z); + } + } + let source = grid[room_index(2, 0, 0) as usize].unwrap(); + for x in 0..5 { + for z in 0..5 { + for y in 0..3 { + let Some(a) = grid[room_index(x, y, z) as usize] else { + continue; + }; + for (d, s) in STEPS.iter().enumerate() { + let (nx, ny, nz) = (x + s[0], y + s[1], z + s[2]); + if !(0..5).contains(&nx) || !(0..5).contains(&nz) || !(0..3).contains(&ny) { + continue; + } + if let Some(b) = grid[room_index(nx, ny, nz) as usize] { + let dir = if nz == z { d } else { OPPOSITE[d] }; + g.connect(a, dir, b); + } + } + } + } + } + let roof = g.rooms.len(); + g.rooms.push(Room::new(1003)); + let left = g.rooms.len(); + g.rooms.push(Room::new(1001)); + let right = g.rooms.len(); + g.rooms.push(Room::new(1002)); + g.connect(grid[room_index(2, 2, 0) as usize].unwrap(), UP, roof); + g.connect(grid[room_index(0, 1, 0) as usize].unwrap(), SOUTH, left); + g.connect(grid[room_index(4, 1, 0) as usize].unwrap(), SOUTH, right); + g.claim(roof); + g.claim(left); + g.claim(right); + g.rooms[source].source = true; + let core = grid[room_index(random.next_int_bound(4).unwrap_or(0), 0, 2) as usize].unwrap(); + let (ce, cn, cu) = (g.conn(core, EAST), g.conn(core, NORTH), g.conn(core, UP)); + let cen = g.conn(ce, NORTH); + for r in [ + core, + ce, + cn, + cen, + cu, + g.conn(ce, UP), + g.conn(cn, UP), + g.conn(cen, UP), + ] { + g.claim(r); + } + let mut defs = Vec::new(); + for r in grid.iter().flatten() { + g.update_openings(*r); + defs.push(*r); + } + g.update_openings(roof); + for i in (2..=defs.len()).rev() { + let j = random.next_int_bound(i as i32).unwrap_or(0) as usize; + defs.swap(i - 1, j); + } + let mut scan = 1; + for &def in &defs { + let (mut closed, mut attempts) = (0, 0); + while closed < 2 && attempts < 5 { + attempts += 1; + let f = random.next_int_bound(6).unwrap_or(0) as usize; + if !g.rooms[def].open[f] { + continue; + } + let of = OPPOSITE[f]; + let other = g.conn(def, f); + g.rooms[def].open[f] = false; + g.rooms[other].open[of] = false; + let a = g.find_source(def, scan); + scan += 1; + let ok = a && { + let b = g.find_source(other, scan); + scan += 1; + b + }; + if ok { + closed += 1; + } else { + g.rooms[def].open[f] = true; + g.rooms[other].open[of] = true; + } + } + } + defs.extend([roof, left, right]); + g.claim(source); + let mut children = Vec::new(); + let child = |kind: Kind, room: usize, g: &Graph, w: i32, h: i32, d: i32| Child { + kind, + frame: PieceFrame::new(room_box(direction, g.rooms[room].index, w, h, d), Some(direction)), + room, + }; + children.push(child(Kind::Entry, source, &g, 1, 1, 1)); + children.push(child(Kind::Core, core, &g, 2, 2, 2)); + for def in defs { + if g.rooms[def].claimed || g.rooms[def].index >= 75 { + continue; + } + let free = |g: &Graph, r: usize, d: usize| g.open(r, d) && !g.rooms[g.conn(r, d)].claimed; + if free(&g, def, EAST) && free(&g, def, UP) && free(&g, g.conn(def, EAST), UP) { + let e = g.conn(def, EAST); + for r in [def, e, g.conn(def, UP), g.conn(e, UP)] { + g.claim(r); + } + children.push(child(Kind::DoubleXY, def, &g, 2, 2, 1)); + } else if free(&g, def, NORTH) && free(&g, def, UP) && free(&g, g.conn(def, NORTH), UP) { + let n = g.conn(def, NORTH); + for r in [def, n, g.conn(def, UP), g.conn(n, UP)] { + g.claim(r); + } + children.push(child(Kind::DoubleYZ, def, &g, 1, 2, 2)); + } else if free(&g, def, NORTH) { + g.claim(def); + g.claim(g.conn(def, NORTH)); + children.push(child(Kind::DoubleZ, def, &g, 1, 1, 2)); + } else if free(&g, def, EAST) { + g.claim(def); + g.claim(g.conn(def, EAST)); + children.push(child(Kind::DoubleX, def, &g, 2, 1, 1)); + } else if free(&g, def, UP) { + g.claim(def); + g.claim(g.conn(def, UP)); + children.push(child(Kind::DoubleY, def, &g, 1, 2, 1)); + } else if [WEST, EAST, NORTH, SOUTH, UP].iter().all(|&d| !g.open(def, d)) { + g.claim(def); + children.push(child(Kind::SimpleTop, def, &g, 1, 1, 1)); + } else { + g.claim(def); + let design = random.next_int_bound(3).unwrap_or(0); + children.push(child(Kind::Simple(design), def, &g, 1, 1, 1)); + } + } + let offset = frame.world_pos(9, 0, 22); + for c in &mut children { + c.frame.bounding_box = c.frame.bounding_box.moved(offset); + } + let corners = |a: [i32; 3], b: [i32; 3]| { + BoundingBox::from_corners( + frame.world_pos(a[0], a[1], a[2]), + frame.world_pos(b[0], b[1], b[2]), + ) + }; + let wing_random = random.next_int(); + for (i, b) in [ + corners([1, 1, 1], [23, 8, 21]), + corners([34, 1, 1], [56, 8, 21]), + ] + .into_iter() + .enumerate() + { + children.push(Child { + kind: Kind::Wing(wing_random.wrapping_add(i as i32) & 1), + frame: PieceFrame::new(b, Some(direction)), + room: source, + }); + } + children.push(Child { + kind: Kind::Penthouse, + frame: PieceFrame::new(corners([22, 13, 22], [35, 17, 35]), Some(direction)), + room: source, + }); + Self { + frame, + rooms: g.rooms, + children, + } + } +} + +/// OceanMonumentPiece helpers bound to one frame and chunk. +struct W<'x, 'c> { + f: PieceFrame, + c: &'x mut PieceContext<'c>, + sea: i32, + water: BlockStateId, +} +impl W<'_, '_> { + #[allow(clippy::too_many_arguments)] + fn bx(&mut self, x0: i32, y0: i32, z0: i32, x1: i32, y1: i32, z1: i32, s: BlockStateId) -> Result<()> { + self.f.generate_box(self.c, [x0, y0, z0], [x1, y1, z1], s, s, false) + } + fn put(&mut self, s: BlockStateId, x: i32, y: i32, z: i32) -> Result<()> { + self.f.place(self.c, s, x, y, z) + } + fn water(&mut self, x0: i32, y0: i32, z0: i32, x1: i32, y1: i32, z1: i32) -> Result<()> { + let air = self.c.state("air"); + for y in y0..=y1 { + for x in x0..=x1 { + for z in z0..=z1 { + let s = self.f.get(self.c, x, y, z)?; + if matches!( + self.c.name(s), + "minecraft:ice" | "minecraft:packed_ice" | "minecraft:blue_ice" | "minecraft:water" + ) { + continue; + } + let state = if self.f.world_y(y) >= self.sea && s != self.water { + air + } else { + self.water + }; + self.f.place(self.c, state, x, y, z)?; + } + } + } + Ok(()) + } + #[allow(clippy::too_many_arguments)] + fn fill_only(&mut self, x0: i32, y0: i32, z0: i32, x1: i32, y1: i32, z1: i32, s: BlockStateId) -> Result<()> { + for y in y0..=y1 { + for x in x0..=x1 { + for z in z0..=z1 { + if self.f.get(self.c, x, y, z)? == self.water { + self.f.place(self.c, s, x, y, z)?; + } + } + } + } + Ok(()) + } + fn floor(&mut self, xo: i32, zo: i32, down: bool) -> Result<()> { + let (g, l) = (self.c.state("prismarine"), self.c.state("prismarine_bricks")); + if down { + self.bx(xo, 0, zo, xo + 2, 0, zo + 7, g)?; + self.bx(xo + 5, 0, zo, xo + 7, 0, zo + 7, g)?; + self.bx(xo + 3, 0, zo, xo + 4, 0, zo + 2, g)?; + self.bx(xo + 3, 0, zo + 5, xo + 4, 0, zo + 7, g)?; + self.bx(xo + 3, 0, zo + 2, xo + 4, 0, zo + 2, l)?; + self.bx(xo + 3, 0, zo + 5, xo + 4, 0, zo + 5, l)?; + self.bx(xo + 2, 0, zo + 3, xo + 2, 0, zo + 4, l)?; + self.bx(xo + 5, 0, zo + 3, xo + 5, 0, zo + 4, l) + } else { + self.bx(xo, 0, zo, xo + 7, 0, zo + 7, g) + } + } + fn hits(&self, x0: i32, z0: i32, x1: i32, z1: i32) -> bool { + let (ax, az) = (self.f.world_x(x0, z0), self.f.world_z(x0, z0)); + let (bx, bz) = (self.f.world_x(x1, z1), self.f.world_z(x1, z1)); + let b = self.c.chunk_box; + b.max[0] >= ax.min(bx) && b.min[0] <= ax.max(bx) && b.max[2] >= az.min(bz) && b.min[2] <= az.max(bz) + } +} +struct Palette { + g: BlockStateId, + l: BlockStateId, + k: BlockStateId, + lamp: BlockStateId, +} + +impl LegacyPiece for MonumentBuilding { + fn bounding_box(&self) -> BoundingBox { + self.frame.bounding_box + } + fn type_name(&self) -> &'static str { + "minecraft:omb" + } + fn post_process(&self, c: &mut PieceContext<'_>) -> Result<()> { + let sea = c.world.sea_level()?; + let water = c.state("water"); + let p = Palette { + g: c.state("prismarine"), + l: c.state("prismarine_bricks"), + k: c.state("dark_prismarine"), + lamp: c.state("sea_lantern"), + }; + let mut w = W { + f: self.frame, + c, + sea, + water, + }; + let water_height = sea.max(64) - self.frame.bounding_box.min[1]; + w.water(0, 0, 0, 58, water_height, 58)?; + building(&mut w, &p)?; + let c = w.c; + for child in &self.children { + if child.frame.bounding_box.intersects(&c.chunk_box) { + let mut w = W { + f: child.frame, + c: &mut *c, + sea, + water, + }; + room(&mut w, &p, child, &self.rooms)?; + } + } + Ok(()) + } +} + +fn wing(w: &mut W<'_, '_>, p: &Palette, flipped: bool, xo: i32) -> Result<()> { + let (g, l) = (p.g, p.l); + if !w.hits(xo, 0, xo + 23, 20) { + return Ok(()); + } + w.bx(xo, 0, 0, xo + 24, 0, 20, g)?; + w.water(xo, 1, 0, xo + 24, 10, 20)?; + for i in 0..4 { + w.bx(xo + i, i + 1, i, xo + i, i + 1, 20, l)?; + w.bx(xo + i + 7, i + 5, i + 7, xo + i + 7, i + 5, 20, l)?; + w.bx(xo + 17 - i, i + 5, i + 7, xo + 17 - i, i + 5, 20, l)?; + w.bx(xo + 24 - i, i + 1, i, xo + 24 - i, i + 1, 20, l)?; + w.bx(xo + i + 1, i + 1, i, xo + 23 - i, i + 1, i, l)?; + w.bx(xo + i + 8, i + 5, i + 7, xo + 16 - i, i + 5, i + 7, l)?; + } + w.bx(xo + 4, 4, 4, xo + 6, 4, 20, g)?; + w.bx(xo + 7, 4, 4, xo + 17, 4, 6, g)?; + w.bx(xo + 18, 4, 4, xo + 20, 4, 20, g)?; + w.bx(xo + 11, 8, 11, xo + 13, 8, 20, g)?; + w.put(l, xo + 12, 9, 12)?; + w.put(l, xo + 12, 9, 15)?; + w.put(l, xo + 12, 9, 18)?; + let left = xo + if flipped { 19 } else { 5 }; + let right = xo + if flipped { 5 } else { 19 }; + for z in (5..=20).rev().step_by(3) { + w.put(l, left, 5, z)?; + } + for z in (7..=19).rev().step_by(3) { + w.put(l, right, 5, z)?; + } + for i in 0..4 { + let x = if flipped { + xo + 24 - (17 - i * 3) + } else { + xo + 17 - i * 3 + }; + w.put(l, x, 5, 5)?; + } + w.put(l, right, 5, 5)?; + w.bx(xo + 11, 1, 12, xo + 13, 7, 12, g)?; + w.bx(xo + 12, 1, 11, xo + 12, 7, 13, g) +} +/// MonumentBuilding.postProcess after the first water box (without children). +fn building(w: &mut W<'_, '_>, p: &Palette) -> Result<()> { + let (g, l, k, lamp) = (p.g, p.l, p.k, p.lamp); + wing(w, p, false, 0)?; + wing(w, p, true, 33)?; + if w.hits(22, 5, 35, 17) { + w.water(25, 0, 0, 32, 8, 20)?; + for i in 0..4 { + let z = 5 + i * 4; + w.bx(24, 2, z, 24, 4, z, l)?; + w.bx(22, 4, z, 23, 4, z, l)?; + w.put(l, 25, 5, z)?; + w.put(l, 26, 6, z)?; + w.put(lamp, 26, 5, z)?; + w.bx(33, 2, z, 33, 4, z, l)?; + w.bx(34, 4, z, 35, 4, z, l)?; + w.put(l, 32, 5, z)?; + w.put(l, 31, 6, z)?; + w.put(lamp, 31, 5, z)?; + w.bx(27, 6, z, 30, 6, z, g)?; + } + } + if w.hits(15, 20, 42, 21) { + w.bx(15, 0, 21, 42, 0, 21, g)?; + w.water(26, 1, 21, 31, 3, 21)?; + for [x0, y, x1] in [ + [21, 12, 36], + [17, 11, 40], + [16, 10, 41], + ] { + w.bx(x0, y, 21, x1, y, 21, g)?; + } + w.bx(15, 7, 21, 42, 9, 21, g)?; + for [x0, y, x1] in [ + [16, 6, 41], + [17, 5, 40], + [21, 4, 36], + [22, 3, 26], + [31, 3, 35], + [23, 2, 25], + [32, 2, 34], + ] { + w.bx(x0, y, 21, x1, y, 21, g)?; + } + w.bx(28, 4, 20, 29, 4, 21, l)?; + for [x, y] in [[27, 3], [30, 3], [26, 2], [31, 2], [25, 1], [32, 1]] { + w.put(l, x, y, 21)?; + } + for i in 0..7 { + w.put(k, 28 - i, 6 + i, 21)?; + w.put(k, 29 + i, 6 + i, 21)?; + } + for i in 0..4 { + w.put(k, 28 - i, 9 + i, 21)?; + w.put(k, 29 + i, 9 + i, 21)?; + } + w.put(k, 28, 12, 21)?; + w.put(k, 29, 12, 21)?; + for i in 0..3 { + w.put(k, 22 - i * 2, 8, 21)?; + w.put(k, 22 - i * 2, 9, 21)?; + w.put(k, 35 + i * 2, 8, 21)?; + w.put(k, 35 + i * 2, 9, 21)?; + } + w.water(15, 13, 21, 42, 15, 21)?; + for [x0, y1, x1] in [ + [15, 6, 15], + [16, 5, 16], + [17, 4, 20], + [21, 3, 21], + [22, 2, 22], + [23, 1, 24], + [42, 6, 42], + [41, 5, 41], + [37, 4, 40], + [36, 3, 36], + [33, 1, 34], + [35, 2, 35], + ] { + w.water(x0, 1, 21, x1, y1, 21)?; + } + } + if w.hits(21, 21, 36, 36) { + w.bx(21, 0, 22, 36, 0, 36, g)?; + w.water(21, 1, 22, 36, 23, 36)?; + for i in 0..4 { + w.bx(21 + i, 13 + i, 21 + i, 36 - i, 13 + i, 21 + i, l)?; + w.bx(21 + i, 13 + i, 36 - i, 36 - i, 13 + i, 36 - i, l)?; + w.bx(21 + i, 13 + i, 22 + i, 21 + i, 13 + i, 35 - i, l)?; + w.bx(36 - i, 13 + i, 22 + i, 36 - i, 13 + i, 35 - i, l)?; + } + w.bx(25, 16, 25, 32, 16, 32, g)?; + w.bx(25, 17, 25, 25, 19, 25, l)?; + w.bx(32, 17, 25, 32, 19, 25, l)?; + w.bx(25, 17, 32, 25, 19, 32, l)?; + w.bx(32, 17, 32, 32, 19, 32, l)?; + for [a, b, cx, cz] in [[26, 26, 27, 27], [26, 31, 27, 30], [31, 31, 30, 30], [31, 26, 30, 27]] { + w.put(l, a, 20, b)?; + w.put(l, cx, 21, cz)?; + w.put(lamp, cx, 20, cz)?; + } + w.bx(28, 21, 27, 29, 21, 27, g)?; + w.bx(27, 21, 28, 27, 21, 29, g)?; + w.bx(28, 21, 30, 29, 21, 30, g)?; + w.bx(30, 21, 28, 30, 21, 29, g)?; + } + // generateLowerWall + if w.hits(0, 21, 6, 58) { + w.bx(0, 0, 21, 6, 0, 57, g)?; + w.water(0, 1, 21, 6, 7, 57)?; + w.bx(4, 4, 21, 6, 4, 53, g)?; + for i in 0..4 { + w.bx(i, i + 1, 21, i, i + 1, 57 - i, l)?; + } + for z in (23..53).step_by(3) { + w.put(l, 5, 5, z)?; + } + w.put(l, 5, 5, 52)?; + for i in 0..4 { + w.bx(i, i + 1, 21, i, i + 1, 57 - i, l)?; + } + w.bx(4, 1, 52, 6, 3, 52, g)?; + w.bx(5, 1, 51, 5, 3, 53, g)?; + } + if w.hits(51, 21, 58, 58) { + w.bx(51, 0, 21, 57, 0, 57, g)?; + w.water(51, 1, 21, 57, 7, 57)?; + w.bx(51, 4, 21, 53, 4, 53, g)?; + for i in 0..4 { + w.bx(57 - i, i + 1, 21, 57 - i, i + 1, 57 - i, l)?; + } + for z in (23..53).step_by(3) { + w.put(l, 52, 5, z)?; + } + w.put(l, 52, 5, 52)?; + w.bx(51, 1, 52, 53, 3, 52, g)?; + w.bx(52, 1, 51, 52, 3, 53, g)?; + } + if w.hits(0, 51, 57, 57) { + w.bx(7, 0, 51, 50, 0, 57, g)?; + w.water(7, 1, 51, 50, 10, 57)?; + for i in 0..4 { + w.bx(i + 1, i + 1, 57 - i, 56 - i, i + 1, 57 - i, l)?; + } + } + // generateMiddleWall + if w.hits(7, 21, 13, 50) { + w.bx(7, 0, 21, 13, 0, 50, g)?; + w.water(7, 1, 21, 13, 10, 50)?; + w.bx(11, 8, 21, 13, 8, 53, g)?; + for i in 0..4 { + w.bx(i + 7, i + 5, 21, i + 7, i + 5, 54, l)?; + } + for z in (21..=45).step_by(3) { + w.put(l, 12, 9, z)?; + } + } + if w.hits(44, 21, 50, 54) { + w.bx(44, 0, 21, 50, 0, 50, g)?; + w.water(44, 1, 21, 50, 10, 50)?; + w.bx(44, 8, 21, 46, 8, 53, g)?; + for i in 0..4 { + w.bx(50 - i, i + 5, 21, 50 - i, i + 5, 54, l)?; + } + for z in (21..=45).step_by(3) { + w.put(l, 45, 9, z)?; + } + } + if w.hits(8, 44, 49, 54) { + w.bx(14, 0, 44, 43, 0, 50, g)?; + w.water(14, 1, 44, 43, 10, 50)?; + for x in (12..=45).step_by(3) { + w.put(l, x, 9, 45)?; + w.put(l, x, 9, 52)?; + if matches!(x, 12 | 18 | 24 | 33 | 39 | 45) { + for [y, z] in [ + [9, 47], + [9, 50], + [10, 45], + [10, 46], + [10, 51], + [10, 52], + [11, 47], + [11, 50], + [12, 48], + [12, 49], + ] { + w.put(l, x, y, z)?; + } + } + } + for i in 0..3 { + w.bx(8 + i, 5 + i, 54, 49 - i, 5 + i, 54, g)?; + } + w.bx(11, 8, 54, 46, 8, 54, l)?; + w.bx(14, 8, 44, 43, 8, 53, g)?; + } + // generateUpperWall + if w.hits(14, 21, 20, 43) { + w.bx(14, 0, 21, 20, 0, 43, g)?; + w.water(14, 1, 22, 20, 14, 43)?; + w.bx(18, 12, 22, 20, 12, 39, g)?; + w.bx(18, 12, 21, 20, 12, 21, l)?; + for i in 0..4 { + w.bx(i + 14, i + 9, 21, i + 14, i + 9, 43 - i, l)?; + } + for z in (23..=39).step_by(3) { + w.put(l, 19, 13, z)?; + } + } + if w.hits(37, 21, 43, 43) { + w.bx(37, 0, 21, 43, 0, 43, g)?; + w.water(37, 1, 22, 43, 14, 43)?; + w.bx(37, 12, 22, 39, 12, 39, g)?; + w.bx(37, 12, 21, 39, 12, 21, l)?; + for i in 0..4 { + w.bx(43 - i, i + 9, 21, 43 - i, i + 9, 43 - i, l)?; + } + for z in (23..=39).step_by(3) { + w.put(l, 38, 13, z)?; + } + } + if w.hits(15, 37, 42, 43) { + w.bx(21, 0, 37, 36, 0, 43, g)?; + w.water(21, 1, 37, 36, 14, 43)?; + w.bx(21, 12, 37, 36, 12, 39, g)?; + for i in 0..4 { + w.bx(15 + i, i + 9, 43 - i, 42 - i, i + 9, 43 - i, l)?; + } + for x in (21..=36).step_by(3) { + w.put(l, x, 13, 38)?; + } + } + for px in 0..7 { + let mut pz = 0; + while pz < 7 { + if pz == 0 && px == 3 { + pz = 6; + } + let (bx, bz) = (px * 9, pz * 9); + for dx in 0..4 { + for dz in 0..4 { + w.put(l, bx + dx, 0, bz + dz)?; + w.f.fill_column_down(w.c, l, bx + dx, -1, bz + dz)?; + } + } + pz += if px != 0 && px != 6 { 6 } else { 1 }; + } + } + for i in 0..5 { + w.water(-1 - i, i * 2, -1 - i, -1 - i, 23, 58 + i)?; + w.water(58 + i, i * 2, -1 - i, 58 + i, 23, 58 + i)?; + w.water(-i, i * 2, -1 - i, 57 + i, 23, -1 - i)?; + w.water(-i, i * 2, 58 + i, 57 + i, 23, 58 + i)?; + } + Ok(()) +} + +/// Openings of the doorways shared by the double rooms: (room, side, water box). +fn doorways(w: &mut W<'_, '_>, list: &[(bool, [i32; 6])]) -> Result<()> { + for (open, [x0, y0, z0, x1, y1, z1]) in list { + if *open { + w.water(*x0, *y0, *z0, *x1, *y1, *z1)?; + } + } + Ok(()) +} +fn room(w: &mut W<'_, '_>, p: &Palette, child: &Child, rooms: &[Room]) -> Result<()> { + let (g, l, k, lamp) = (p.g, p.l, p.k, p.lamp); + let r = &rooms[child.room]; + let conn = |a: &Room, d: usize| a.conn[d].map(|i| &rooms[i]); + let upper = r.index / 25 > 0; + match child.kind { + Kind::Core => { + w.fill_only(1, 8, 0, 14, 8, 14, g)?; + w.bx(0, 7, 0, 0, 7, 15, l)?; + w.bx(15, 7, 0, 15, 7, 15, l)?; + w.bx(1, 7, 0, 15, 7, 0, l)?; + w.bx(1, 7, 15, 14, 7, 15, l)?; + for y in 1..=6 { + let b = if y == 2 || y == 6 { g } else { l }; + for x in [0, 15] { + w.bx(x, y, 0, x, y, 1, b)?; + w.bx(x, y, 6, x, y, 9, b)?; + w.bx(x, y, 14, x, y, 15, b)?; + } + w.bx(1, y, 0, 1, y, 0, b)?; + w.bx(6, y, 0, 9, y, 0, b)?; + w.bx(14, y, 0, 14, y, 0, b)?; + w.bx(1, y, 15, 14, y, 15, b)?; + } + w.bx(6, 3, 6, 9, 6, 9, k)?; + let gold = w.c.state("gold_block"); + w.bx(7, 4, 7, 8, 5, 8, gold)?; + for y in [3, 6] { + for x in [6, 9] { + w.put(lamp, x, y, 6)?; + w.put(lamp, x, y, 9)?; + } + } + for [x0, y0, z0, x1, y1, z1] in [ + [5, 1, 6, 5, 2, 6], + [5, 1, 9, 5, 2, 9], + [10, 1, 6, 10, 2, 6], + [10, 1, 9, 10, 2, 9], + [6, 1, 5, 6, 2, 5], + [9, 1, 5, 9, 2, 5], + [6, 1, 10, 6, 2, 10], + [9, 1, 10, 9, 2, 10], + [5, 2, 5, 5, 6, 5], + [5, 2, 10, 5, 6, 10], + [10, 2, 5, 10, 6, 5], + [10, 2, 10, 10, 6, 10], + [5, 7, 1, 5, 7, 6], + [10, 7, 1, 10, 7, 6], + [5, 7, 9, 5, 7, 14], + [10, 7, 9, 10, 7, 14], + [1, 7, 5, 6, 7, 5], + [1, 7, 10, 6, 7, 10], + [9, 7, 5, 14, 7, 5], + [9, 7, 10, 14, 7, 10], + [2, 1, 2, 2, 1, 3], + [3, 1, 2, 3, 1, 2], + [13, 1, 2, 13, 1, 3], + [12, 1, 2, 12, 1, 2], + [2, 1, 12, 2, 1, 13], + [3, 1, 13, 3, 1, 13], + [13, 1, 12, 13, 1, 13], + [12, 1, 13, 12, 1, 13], + ] { + w.bx(x0, y0, z0, x1, y1, z1, l)?; + } + } + Kind::DoubleX => { + let east = conn(r, EAST).unwrap_or(r); + let west = r; + if upper { + w.floor(8, 0, east.open[DOWN])?; + w.floor(0, 0, west.open[DOWN])?; + } + if west.conn[UP].is_none() { + w.fill_only(1, 4, 1, 7, 4, 6, g)?; + } + if east.conn[UP].is_none() { + w.fill_only(8, 4, 1, 14, 4, 6, g)?; + } + for (y, b) in [(3, l), (2, g), (1, l)] { + w.bx(0, y, 0, 0, y, 7, b)?; + w.bx(15, y, 0, 15, y, 7, b)?; + w.bx(1, y, 0, 15, y, 0, b)?; + w.bx(1, y, 7, 14, y, 7, b)?; + } + w.bx(5, 1, 0, 10, 1, 4, l)?; + w.bx(6, 2, 0, 9, 2, 3, g)?; + w.bx(5, 3, 0, 10, 3, 4, l)?; + w.put(lamp, 6, 2, 3)?; + w.put(lamp, 9, 2, 3)?; + doorways( + w, + &[ + (west.open[SOUTH], [3, 1, 0, 4, 2, 0]), + (west.open[NORTH], [3, 1, 7, 4, 2, 7]), + (west.open[WEST], [0, 1, 3, 0, 2, 4]), + (east.open[SOUTH], [11, 1, 0, 12, 2, 0]), + (east.open[NORTH], [11, 1, 7, 12, 2, 7]), + (east.open[EAST], [15, 1, 3, 15, 2, 4]), + ], + )?; + } + Kind::DoubleXY => { + let east = conn(r, EAST).unwrap_or(r); + let west = r; + let west_up = conn(west, UP).unwrap_or(r); + let east_up = conn(east, UP).unwrap_or(r); + if upper { + w.floor(8, 0, east.open[DOWN])?; + w.floor(0, 0, west.open[DOWN])?; + } + if west_up.conn[UP].is_none() { + w.fill_only(1, 8, 1, 7, 8, 6, g)?; + } + if east_up.conn[UP].is_none() { + w.fill_only(8, 8, 1, 14, 8, 6, g)?; + } + for y in 1..=7 { + let b = if y == 2 || y == 6 { g } else { l }; + w.bx(0, y, 0, 0, y, 7, b)?; + w.bx(15, y, 0, 15, y, 7, b)?; + w.bx(1, y, 0, 15, y, 0, b)?; + w.bx(1, y, 7, 14, y, 7, b)?; + } + for [x0, y0, z0, x1, y1, z1] in [ + [2, 1, 3, 2, 7, 4], + [3, 1, 2, 4, 7, 2], + [3, 1, 5, 4, 7, 5], + [13, 1, 3, 13, 7, 4], + [11, 1, 2, 12, 7, 2], + [11, 1, 5, 12, 7, 5], + [5, 1, 3, 5, 3, 4], + [10, 1, 3, 10, 3, 4], + [5, 7, 2, 10, 7, 5], + [5, 5, 2, 5, 7, 2], + [10, 5, 2, 10, 7, 2], + [5, 5, 5, 5, 7, 5], + [10, 5, 5, 10, 7, 5], + ] { + w.bx(x0, y0, z0, x1, y1, z1, l)?; + } + w.put(l, 6, 6, 2)?; + w.put(l, 9, 6, 2)?; + w.put(l, 6, 6, 5)?; + w.put(l, 9, 6, 5)?; + w.bx(5, 4, 3, 6, 4, 4, l)?; + w.bx(9, 4, 3, 10, 4, 4, l)?; + w.put(lamp, 5, 4, 2)?; + w.put(lamp, 5, 4, 5)?; + w.put(lamp, 10, 4, 2)?; + w.put(lamp, 10, 4, 5)?; + doorways( + w, + &[ + (west.open[SOUTH], [3, 1, 0, 4, 2, 0]), + (west.open[NORTH], [3, 1, 7, 4, 2, 7]), + (west.open[WEST], [0, 1, 3, 0, 2, 4]), + (east.open[SOUTH], [11, 1, 0, 12, 2, 0]), + (east.open[NORTH], [11, 1, 7, 12, 2, 7]), + (east.open[EAST], [15, 1, 3, 15, 2, 4]), + (west_up.open[SOUTH], [3, 5, 0, 4, 6, 0]), + (west_up.open[NORTH], [3, 5, 7, 4, 6, 7]), + (west_up.open[WEST], [0, 5, 3, 0, 6, 4]), + (east_up.open[SOUTH], [11, 5, 0, 12, 6, 0]), + (east_up.open[NORTH], [11, 5, 7, 12, 6, 7]), + (east_up.open[EAST], [15, 5, 3, 15, 6, 4]), + ], + )?; + } + Kind::DoubleY => { + if upper { + w.floor(0, 0, r.open[DOWN])?; + } + let above = conn(r, UP).unwrap_or(r); + if above.conn[UP].is_none() { + w.fill_only(1, 8, 1, 6, 8, 6, g)?; + } + for [x0, z0, x1, z1] in [ + [0, 0, 0, 7], + [7, 0, 7, 7], + [1, 0, 6, 0], + [1, 7, 6, 7], + [2, 1, 2, 2], + [1, 2, 1, 2], + [5, 1, 5, 2], + [6, 2, 6, 2], + [2, 5, 2, 6], + [1, 5, 1, 5], + [5, 5, 5, 6], + [6, 5, 6, 5], + ] { + w.bx(x0, 4, z0, x1, 4, z1, l)?; + } + let mut def = r; + for y in [1, 5] { + for (side, z) in [(SOUTH, 0), (NORTH, 7)] { + if def.open[side] { + w.bx(2, y, z, 2, y + 2, z, l)?; + w.bx(5, y, z, 5, y + 2, z, l)?; + w.bx(3, y + 2, z, 4, y + 2, z, l)?; + } else { + w.bx(0, y, z, 7, y + 2, z, l)?; + w.bx(0, y + 1, z, 7, y + 1, z, g)?; + } + } + for (side, x) in [(WEST, 0), (EAST, 7)] { + if def.open[side] { + w.bx(x, y, 2, x, y + 2, 2, l)?; + w.bx(x, y, 5, x, y + 2, 5, l)?; + w.bx(x, y + 2, 3, x, y + 2, 4, l)?; + } else { + w.bx(x, y, 0, x, y + 2, 7, l)?; + w.bx(x, y + 1, 0, x, y + 1, 7, g)?; + } + } + def = above; + } + } + Kind::DoubleYZ => { + let north = conn(r, NORTH).unwrap_or(r); + let south = r; + let north_up = conn(north, UP).unwrap_or(r); + let south_up = conn(south, UP).unwrap_or(r); + if upper { + w.floor(0, 8, north.open[DOWN])?; + w.floor(0, 0, south.open[DOWN])?; + } + if south_up.conn[UP].is_none() { + w.fill_only(1, 8, 1, 6, 8, 7, g)?; + } + if north_up.conn[UP].is_none() { + w.fill_only(1, 8, 8, 6, 8, 14, g)?; + } + for y in 1..=7 { + let b = if y == 2 || y == 6 { g } else { l }; + w.bx(0, y, 0, 0, y, 15, b)?; + w.bx(7, y, 0, 7, y, 15, b)?; + w.bx(1, y, 0, 6, y, 0, b)?; + w.bx(1, y, 15, 6, y, 15, b)?; + } + for y in 1..=7 { + let b = if y == 2 || y == 6 { lamp } else { k }; + w.bx(3, y, 7, 4, y, 8, b)?; + } + doorways( + w, + &[ + (south.open[SOUTH], [3, 1, 0, 4, 2, 0]), + (south.open[EAST], [7, 1, 3, 7, 2, 4]), + (south.open[WEST], [0, 1, 3, 0, 2, 4]), + (north.open[NORTH], [3, 1, 15, 4, 2, 15]), + (north.open[WEST], [0, 1, 11, 0, 2, 12]), + (north.open[EAST], [7, 1, 11, 7, 2, 12]), + (south_up.open[SOUTH], [3, 5, 0, 4, 6, 0]), + ], + )?; + if south_up.open[EAST] { + w.water(7, 5, 3, 7, 6, 4)?; + w.bx(5, 4, 2, 6, 4, 5, l)?; + w.bx(6, 1, 2, 6, 3, 2, l)?; + w.bx(6, 1, 5, 6, 3, 5, l)?; + } + if south_up.open[WEST] { + w.water(0, 5, 3, 0, 6, 4)?; + w.bx(1, 4, 2, 2, 4, 5, l)?; + w.bx(1, 1, 2, 1, 3, 2, l)?; + w.bx(1, 1, 5, 1, 3, 5, l)?; + } + if north_up.open[NORTH] { + w.water(3, 5, 15, 4, 6, 15)?; + } + if north_up.open[WEST] { + w.water(0, 5, 11, 0, 6, 12)?; + w.bx(1, 4, 10, 2, 4, 13, l)?; + w.bx(1, 1, 10, 1, 3, 10, l)?; + w.bx(1, 1, 13, 1, 3, 13, l)?; + } + if north_up.open[EAST] { + w.water(7, 5, 11, 7, 6, 12)?; + w.bx(5, 4, 10, 6, 4, 13, l)?; + w.bx(6, 1, 10, 6, 3, 10, l)?; + w.bx(6, 1, 13, 6, 3, 13, l)?; + } + } + Kind::DoubleZ => { + let north = conn(r, NORTH).unwrap_or(r); + let south = r; + if upper { + w.floor(0, 8, north.open[DOWN])?; + w.floor(0, 0, south.open[DOWN])?; + } + if south.conn[UP].is_none() { + w.fill_only(1, 4, 1, 6, 4, 7, g)?; + } + if north.conn[UP].is_none() { + w.fill_only(1, 4, 8, 6, 4, 14, g)?; + } + for (y, b) in [(3, l), (2, g), (1, l)] { + w.bx(0, y, 0, 0, y, 15, b)?; + w.bx(7, y, 0, 7, y, 15, b)?; + w.bx(1, y, 0, 7, y, 0, b)?; + w.bx(1, y, 15, 6, y, 15, b)?; + } + for [x0, y0, z0, x1, y1, z1] in [ + [1, 1, 1, 1, 1, 2], + [6, 1, 1, 6, 1, 2], + [1, 3, 1, 1, 3, 2], + [6, 3, 1, 6, 3, 2], + [1, 1, 13, 1, 1, 14], + [6, 1, 13, 6, 1, 14], + [1, 3, 13, 1, 3, 14], + [6, 3, 13, 6, 3, 14], + [2, 1, 6, 2, 3, 6], + [5, 1, 6, 5, 3, 6], + [2, 1, 9, 2, 3, 9], + [5, 1, 9, 5, 3, 9], + [3, 2, 6, 4, 2, 6], + [3, 2, 9, 4, 2, 9], + [2, 2, 7, 2, 2, 8], + [5, 2, 7, 5, 2, 8], + ] { + w.bx(x0, y0, z0, x1, y1, z1, l)?; + } + for [x, z] in [[2, 5], [5, 5], [2, 10], [5, 10]] { + w.put(lamp, x, 2, z)?; + } + for [x, z] in [[2, 5], [5, 5], [2, 10], [5, 10]] { + w.put(l, x, 3, z)?; + } + doorways( + w, + &[ + (south.open[SOUTH], [3, 1, 0, 4, 2, 0]), + (south.open[EAST], [7, 1, 3, 7, 2, 4]), + (south.open[WEST], [0, 1, 3, 0, 2, 4]), + (north.open[NORTH], [3, 1, 15, 4, 2, 15]), + (north.open[WEST], [0, 1, 11, 0, 2, 12]), + (north.open[EAST], [7, 1, 11, 7, 2, 12]), + ], + )?; + } + Kind::Entry => { + for [x0, y0, z0, x1, y1, z1] in [ + [0, 3, 0, 2, 3, 7], + [5, 3, 0, 7, 3, 7], + [0, 2, 0, 1, 2, 7], + [6, 2, 0, 7, 2, 7], + [0, 1, 0, 0, 1, 7], + [7, 1, 0, 7, 1, 7], + [0, 1, 7, 7, 3, 7], + [1, 1, 0, 2, 3, 0], + [5, 1, 0, 6, 3, 0], + ] { + w.bx(x0, y0, z0, x1, y1, z1, l)?; + } + doorways( + w, + &[ + (r.open[NORTH], [3, 1, 7, 4, 2, 7]), + (r.open[WEST], [0, 1, 3, 1, 2, 4]), + (r.open[EAST], [6, 1, 3, 7, 2, 4]), + ], + )?; + } + Kind::Penthouse => { + w.bx(2, -1, 2, 11, -1, 11, l)?; + w.bx(0, -1, 0, 1, -1, 11, g)?; + w.bx(12, -1, 0, 13, -1, 11, g)?; + w.bx(2, -1, 0, 11, -1, 1, g)?; + w.bx(2, -1, 12, 11, -1, 13, g)?; + w.bx(0, 0, 0, 0, 0, 13, l)?; + w.bx(13, 0, 0, 13, 0, 13, l)?; + w.bx(1, 0, 0, 12, 0, 0, l)?; + w.bx(1, 0, 13, 12, 0, 13, l)?; + for i in (2..=11).step_by(3) { + w.put(lamp, 0, 0, i)?; + w.put(lamp, 13, 0, i)?; + w.put(lamp, i, 0, 0)?; + } + w.bx(2, 0, 3, 4, 0, 9, l)?; + w.bx(9, 0, 3, 11, 0, 9, l)?; + w.bx(4, 0, 9, 9, 0, 11, l)?; + w.put(l, 5, 0, 8)?; + w.put(l, 8, 0, 8)?; + w.put(l, 10, 0, 10)?; + w.put(l, 3, 0, 10)?; + w.bx(3, 0, 3, 3, 0, 7, k)?; + w.bx(10, 0, 3, 10, 0, 7, k)?; + w.bx(6, 0, 10, 7, 0, 10, k)?; + for x in [3, 10] { + for z in (2..=8).step_by(3) { + w.bx(x, 0, z, x, 2, z, l)?; + } + } + w.bx(5, 0, 10, 5, 2, 10, l)?; + w.bx(8, 0, 10, 8, 2, 10, l)?; + w.bx(6, -1, 7, 7, -1, 8, k)?; + w.water(6, -1, 3, 7, -1, 4)?; + // spawnElder: entities are not created. + } + Kind::Simple(design) => { + if upper { + w.floor(0, 0, r.open[DOWN])?; + } + if r.conn[UP].is_none() { + w.fill_only(1, 4, 1, 6, 4, 6, g)?; + } + let pillar = design != 0 + && w.c.random.boolean() + && !r.open[DOWN] + && !r.open[UP] + && r.open.iter().filter(|o| **o).count() > 1; + match design { + 0 => { + for (xa, xb, za, zb, gx, gz, lx, lz) in [ + (0, 2, 0, 2, [0, 0, 0, 2], [1, 2, 0, 0], 1, 1), + (5, 7, 0, 2, [7, 7, 0, 2], [5, 6, 0, 0], 6, 1), + (0, 2, 5, 7, [0, 0, 5, 7], [1, 2, 7, 7], 1, 6), + (5, 7, 5, 7, [7, 7, 5, 7], [5, 6, 7, 7], 6, 6), + ] { + w.bx(xa, 1, za, xb, 1, zb, l)?; + w.bx(xa, 3, za, xb, 3, zb, l)?; + w.bx(gx[0], 2, gx[2], gx[1], 2, gx[3], g)?; + w.bx(gz[0], 2, gz[2], gz[1], 2, gz[3], g)?; + w.put(lamp, lx, 2, lz)?; + } + if r.open[SOUTH] { + w.bx(3, 3, 0, 4, 3, 0, l)?; + } else { + w.bx(3, 3, 0, 4, 3, 1, l)?; + w.bx(3, 2, 0, 4, 2, 0, g)?; + w.bx(3, 1, 0, 4, 1, 1, l)?; + } + if r.open[NORTH] { + w.bx(3, 3, 7, 4, 3, 7, l)?; + } else { + w.bx(3, 3, 6, 4, 3, 7, l)?; + w.bx(3, 2, 7, 4, 2, 7, g)?; + w.bx(3, 1, 6, 4, 1, 7, l)?; + } + if r.open[WEST] { + w.bx(0, 3, 3, 0, 3, 4, l)?; + } else { + w.bx(0, 3, 3, 1, 3, 4, l)?; + w.bx(0, 2, 3, 0, 2, 4, g)?; + w.bx(0, 1, 3, 1, 1, 4, l)?; + } + if r.open[EAST] { + w.bx(7, 3, 3, 7, 3, 4, l)?; + } else { + w.bx(6, 3, 3, 7, 3, 4, l)?; + w.bx(7, 2, 3, 7, 2, 4, g)?; + w.bx(6, 1, 3, 7, 1, 4, l)?; + } + } + 1 => { + for [x, z] in [[2, 2], [2, 5], [5, 5], [5, 2]] { + w.bx(x, 1, z, x, 3, z, l)?; + } + for [x, z] in [[2, 2], [2, 5], [5, 5], [5, 2]] { + w.put(lamp, x, 2, z)?; + } + for [x0, z0, x1, z1] in [ + [0, 0, 1, 0], + [0, 1, 0, 1], + [0, 7, 1, 7], + [0, 6, 0, 6], + [6, 7, 7, 7], + [7, 6, 7, 6], + [6, 0, 7, 0], + [7, 1, 7, 1], + ] { + w.bx(x0, 1, z0, x1, 3, z1, l)?; + } + for [x, z] in [[1, 0], [0, 1], [1, 7], [0, 6], [6, 7], [7, 6], [6, 0], [7, 1]] { + w.put(g, x, 2, z)?; + } + for (side, [x0, z0, x1, z1]) in [ + (SOUTH, [1, 0, 6, 0]), + (NORTH, [1, 7, 6, 7]), + (WEST, [0, 1, 0, 6]), + (EAST, [7, 1, 7, 6]), + ] { + if !r.open[side] { + w.bx(x0, 3, z0, x1, 3, z1, l)?; + w.bx(x0, 2, z0, x1, 2, z1, g)?; + w.bx(x0, 1, z0, x1, 1, z1, l)?; + } + } + } + 2 => { + for (y, b) in [(1, l), (2, k), (3, l)] { + w.bx(0, y, 0, 0, y, 7, b)?; + w.bx(7, y, 0, 7, y, 7, b)?; + w.bx(1, y, 0, 6, y, 0, b)?; + w.bx(1, y, 7, 6, y, 7, b)?; + } + w.bx(0, 1, 3, 0, 2, 4, k)?; + w.bx(7, 1, 3, 7, 2, 4, k)?; + w.bx(3, 1, 0, 4, 2, 0, k)?; + w.bx(3, 1, 7, 4, 2, 7, k)?; + doorways( + w, + &[ + (r.open[SOUTH], [3, 1, 0, 4, 2, 0]), + (r.open[NORTH], [3, 1, 7, 4, 2, 7]), + (r.open[WEST], [0, 1, 3, 0, 2, 4]), + (r.open[EAST], [7, 1, 3, 7, 2, 4]), + ], + )?; + } + _ => {} + } + if pillar { + w.bx(3, 1, 3, 4, 1, 4, l)?; + w.bx(3, 2, 3, 4, 2, 4, g)?; + w.bx(3, 3, 3, 4, 3, 4, l)?; + } + } + Kind::SimpleTop => { + if upper { + w.floor(0, 0, r.open[DOWN])?; + } + if r.conn[UP].is_none() { + w.fill_only(1, 4, 1, 6, 4, 6, g)?; + } + let sponge = w.c.state("wet_sponge"); + for x in 1..=6 { + for z in 1..=6 { + if w.c.random.int(3) != 0 { + let y0 = 2 + if w.c.random.int(4) == 0 { 0 } else { 1 }; + w.bx(x, y0, z, x, 3, z, sponge)?; + } + } + } + for (y, b) in [(1, l), (2, k), (3, l)] { + w.bx(0, y, 0, 0, y, 7, b)?; + w.bx(7, y, 0, 7, y, 7, b)?; + w.bx(1, y, 0, 6, y, 0, b)?; + w.bx(1, y, 7, 6, y, 7, b)?; + } + w.bx(0, 1, 3, 0, 2, 4, k)?; + w.bx(7, 1, 3, 7, 2, 4, k)?; + w.bx(3, 1, 0, 4, 2, 0, k)?; + w.bx(3, 1, 7, 4, 2, 7, k)?; + if r.open[SOUTH] { + w.water(3, 1, 0, 4, 2, 0)?; + } + } + Kind::Wing(0) => { + for i in 0..4 { + w.bx(10 - i, 3 - i, 20 - i, 12 + i, 3 - i, 20, l)?; + } + for [x0, y0, z0, x1, y1, z1] in [ + [7, 0, 6, 15, 0, 16], + [6, 0, 6, 6, 3, 20], + [16, 0, 6, 16, 3, 20], + [7, 1, 7, 7, 1, 20], + [15, 1, 7, 15, 1, 20], + [7, 1, 6, 9, 3, 6], + [13, 1, 6, 15, 3, 6], + [8, 1, 7, 9, 1, 7], + [13, 1, 7, 14, 1, 7], + [9, 0, 5, 13, 0, 5], + ] { + w.bx(x0, y0, z0, x1, y1, z1, l)?; + } + w.bx(10, 0, 7, 12, 0, 7, k)?; + w.bx(8, 0, 10, 8, 0, 12, k)?; + w.bx(14, 0, 10, 14, 0, 12, k)?; + for z in (7..=18).rev().step_by(3) { + w.put(lamp, 6, 3, z)?; + w.put(lamp, 16, 3, z)?; + } + for [x, y, z] in [[10, 0, 10], [12, 0, 10], [10, 0, 12], [12, 0, 12], [8, 3, 6], [14, 3, 6]] { + w.put(lamp, x, y, z)?; + } + for [x, z] in [[4, 4], [18, 4], [4, 18], [18, 18]] { + w.put(l, x, 2, z)?; + w.put(lamp, x, 1, z)?; + w.put(l, x, 0, z)?; + } + w.put(l, 9, 7, 20)?; + w.put(l, 13, 7, 20)?; + w.bx(6, 0, 21, 7, 4, 21, l)?; + w.bx(15, 0, 21, 16, 4, 21, l)?; + } + Kind::Wing(_) => { + w.bx(9, 3, 18, 13, 3, 20, l)?; + w.bx(9, 0, 18, 9, 2, 18, l)?; + w.bx(13, 0, 18, 13, 2, 18, l)?; + for x in [9, 13] { + w.put(l, x, 6, 20)?; + w.put(lamp, x, 5, 20)?; + w.put(l, x, 4, 20)?; + } + w.bx(7, 3, 7, 15, 3, 14, l)?; + for x in [10, 12] { + w.bx(x, 0, 10, x, 6, 10, l)?; + w.bx(x, 0, 12, x, 6, 12, l)?; + w.put(lamp, x, 0, 10)?; + w.put(lamp, x, 0, 12)?; + w.put(lamp, x, 4, 10)?; + w.put(lamp, x, 4, 12)?; + } + for x in [8, 14] { + w.bx(x, 0, 7, x, 2, 7, l)?; + w.bx(x, 0, 14, x, 2, 14, l)?; + } + w.bx(8, 3, 8, 8, 3, 13, k)?; + w.bx(14, 3, 8, 14, 3, 13, k)?; + } + } + Ok(()) +} diff --git a/crates/horizon-world/src/worldgen/structure/ocean_ruin.rs b/crates/horizon-world/src/worldgen/structure/ocean_ruin.rs new file mode 100644 index 000000000..270c51633 --- /dev/null +++ b/crates/horizon-world/src/worldgen/structure/ocean_ruin.rs @@ -0,0 +1,353 @@ +//! Ocean ruins (OceanRuinPieces). +use super::{ + BoundingBox, Mirror, Rotation, StructureResources, StructureTemplate, + legacy::{PieceContext, Result, TemplateHandler, TemplatePiece}, + processor::ProcessorList, +}; +use crate::{ + fluid::FluidKind, + heightmap::HeightmapType, + worldgen::{DecodeError, block_feature::FeatureBlockBindings}, +}; +use horizon_core::random::RandomSource; +use std::sync::Arc; + +const WARM: [&str; 8] = [ + "warm_1", "warm_2", "warm_3", "warm_4", "warm_5", "warm_6", "warm_7", "warm_8", +]; +const BIG_WARM: [&str; 4] = ["big_warm_4", "big_warm_5", "big_warm_6", "big_warm_7"]; +const BRICK: [&str; 8] = [ + "brick_1", "brick_2", "brick_3", "brick_4", "brick_5", "brick_6", "brick_7", "brick_8", +]; +const CRACKED: [&str; 8] = [ + "cracked_1", + "cracked_2", + "cracked_3", + "cracked_4", + "cracked_5", + "cracked_6", + "cracked_7", + "cracked_8", +]; +const MOSSY: [&str; 8] = [ + "mossy_1", "mossy_2", "mossy_3", "mossy_4", "mossy_5", "mossy_6", "mossy_7", "mossy_8", +]; +const BIG_BRICK: [&str; 4] = ["big_brick_1", "big_brick_2", "big_brick_3", "big_brick_8"]; +const BIG_CRACKED: [&str; 4] = [ + "big_cracked_1", + "big_cracked_2", + "big_cracked_3", + "big_cracked_8", +]; +const BIG_MOSSY: [&str; 4] = ["big_mossy_1", "big_mossy_2", "big_mossy_3", "big_mossy_8"]; + +/// Mth.nextInt(random, min, max). +pub fn next_int(random: &mut impl RandomSource, min: i32, max: i32) -> i32 { + if min >= max { + min + } else { + random.next_int_bound(max - min + 1).unwrap_or(0) + min + } +} + +pub struct OceanRuinConfig { + pub warm: bool, + pub large_probability: f32, + pub cluster_probability: f32, +} +fn processors( + resources: &StructureResources, + bindings: &FeatureBlockBindings<'_>, + integrity: f32, + warm: bool, +) -> std::result::Result<Arc<ProcessorList>, DecodeError> { + let (candidate, replacement, table) = if warm { + ( + "minecraft:sand", + "minecraft:suspicious_sand", + "minecraft:archaeology/ocean_ruin_warm", + ) + } else { + ( + "minecraft:gravel", + "minecraft:suspicious_gravel", + "minecraft:archaeology/ocean_ruin_cold", + ) + }; + let json = serde_json::json!({"processors": [ + {"processor_type": "minecraft:block_rot", "integrity": integrity}, + {"processor_type": "minecraft:block_ignore", "blocks": [{"id": "minecraft:structure_block"}, {"id": "minecraft:air"}]}, + {"processor_type": "minecraft:capped", "limit": 5, "delegate": {"processor_type": "minecraft:rule", "rules": [{ + "input_predicate": {"predicate_type": "minecraft:block_match", "block": candidate}, + "location_predicate": {"predicate_type": "minecraft:always_true"}, + "output_state": {"id": replacement}, + "block_entity_modifier": {"type": "minecraft:append_loot", "loot_table": table} + }]}} + ]}); + Ok(Arc::new(ProcessorList::decode( + &json.to_string(), + resources, + bindings, + )?)) +} +#[allow(clippy::too_many_arguments)] +fn piece( + resources: &StructureResources, + bindings: &FeatureBlockBindings<'_>, + name: &str, + position: [i32; 3], + rotation: Rotation, + integrity: f32, + warm: bool, + large: bool, +) -> Option<TemplatePiece> { + let name = format!("minecraft:underwater_ruin/{name}"); + Some(TemplatePiece::new( + "minecraft:orp", + &name, + resources.template(&name)?, + position, + rotation, + Mirror::None, + [0; 3], + processors(resources, bindings, integrity, warm).ok()?, + true, + Vec::new(), + TemplateHandler::OceanRuin { + warm, + large, + integrity, + }, + )) +} +#[allow(clippy::too_many_arguments)] +fn add_piece( + out: &mut Vec<TemplatePiece>, + resources: &StructureResources, + bindings: &FeatureBlockBindings<'_>, + position: [i32; 3], + rotation: Rotation, + random: &mut impl RandomSource, + config: &OceanRuinConfig, + large: bool, + integrity: f32, +) -> Option<()> { + if config.warm { + let names: &[&str] = if large { &BIG_WARM } else { &WARM }; + let name = names[random.next_int_bound(names.len() as i32).ok()? as usize]; + out.push(piece( + resources, bindings, name, position, rotation, integrity, true, large, + )?); + } else { + let (bricks, cracked, mossy): (&[&str], &[&str], &[&str]) = if large { + (&BIG_BRICK, &BIG_CRACKED, &BIG_MOSSY) + } else { + (&BRICK, &CRACKED, &MOSSY) + }; + let idx = random.next_int_bound(bricks.len() as i32).ok()? as usize; + out.push(piece( + resources, + bindings, + bricks[idx], + position, + rotation, + integrity, + false, + large, + )?); + out.push(piece( + resources, + bindings, + cracked[idx], + position, + rotation, + 0.7, + false, + large, + )?); + out.push(piece( + resources, bindings, mossy[idx], position, rotation, 0.5, false, large, + )?); + } + Some(()) +} +/// OceanRuinPieces.addPieces. +pub fn pieces( + resources: &StructureResources, + bindings: &FeatureBlockBindings<'_>, + position: [i32; 3], + rotation: Rotation, + random: &mut impl RandomSource, + config: &OceanRuinConfig, +) -> Option<Vec<TemplatePiece>> { + let mut out = Vec::new(); + let large = random.next_float() <= config.large_probability; + let integrity = if large { 0.9 } else { 0.8 }; + add_piece( + &mut out, resources, bindings, position, rotation, random, config, large, integrity, + )?; + if large && random.next_float() <= config.cluster_probability { + let parent = [position[0], 90, position[2]]; + let corner = StructureTemplate::transform([15, 0, 15], Mirror::None, rotation, [0; 3]); + let corner = [ + corner[0] + parent[0], + corner[1] + parent[1], + corner[2] + parent[2], + ]; + let parent_box = BoundingBox::from_corners(parent, corner); + let origin = [ + parent[0].min(corner[0]), + parent[1], + parent[2].min(corner[2]), + ]; + let mut all = vec![ + [ + origin[0] - 16 + next_int(random, 1, 8), + origin[1], + origin[2] + 16 + next_int(random, 1, 7), + ], + [ + origin[0] - 16 + next_int(random, 1, 8), + origin[1], + origin[2] + next_int(random, 1, 7), + ], + [ + origin[0] - 16 + next_int(random, 1, 8), + origin[1], + origin[2] - 16 + next_int(random, 4, 8), + ], + [ + origin[0] + next_int(random, 1, 7), + origin[1], + origin[2] + 16 + next_int(random, 1, 7), + ], + [ + origin[0] + next_int(random, 1, 7), + origin[1], + origin[2] - 16 + next_int(random, 4, 6), + ], + [ + origin[0] + 16 + next_int(random, 1, 7), + origin[1], + origin[2] + 16 + next_int(random, 3, 8), + ], + [ + origin[0] + 16 + next_int(random, 1, 7), + origin[1], + origin[2] + next_int(random, 1, 7), + ], + [ + origin[0] + 16 + next_int(random, 1, 7), + origin[1], + origin[2] - 16 + next_int(random, 4, 8), + ], + ]; + let ruins = next_int(random, 4, 8); + for _ in 0..ruins { + if all.is_empty() { + continue; + } + let idx = random.next_int_bound(all.len() as i32).ok()? as usize; + let pos = all.remove(idx); + let next_rotation = Rotation::random(random); + let c = StructureTemplate::transform([5, 0, 6], Mirror::None, next_rotation, [0; 3]); + let next_box = + BoundingBox::from_corners(pos, [c[0] + pos[0], c[1] + pos[1], c[2] + pos[2]]); + if !next_box.intersects(&parent_box) { + add_piece( + &mut out, + resources, + bindings, + pos, + next_rotation, + random, + config, + false, + 0.8, + )?; + } + } + } + Some(out) +} + +fn is_water(c: &mut PieceContext<'_>, pos: [i32; 3]) -> Result<bool> { + Ok(matches!( + c.world.fluid(pos)?.kind(), + FluidKind::Water | FluidKind::FlowingWater + )) +} +/// OceanRuinPiece.postProcess. +pub fn post_process(piece: &TemplatePiece, c: &mut PieceContext<'_>) -> Result<()> { + let TemplateHandler::OceanRuin { large, .. } = piece.handler else { + return Ok(()); + }; + let [x, _, z] = piece.position; + let mut position = [x, c.world.height(HeightmapType::OceanFloorWg, x, z)?, z]; + let size = piece.template.size; + let r = StructureTemplate::transform( + [size[0] - 1, 0, size[2] - 1], + Mirror::None, + piece.rotation, + [0; 3], + ); + let corner = [r[0] + position[0], r[1] + position[1], r[2] + position[2]]; + // getHeight over the footprint. + let mut new_y = position[1]; + let mut min_y = 512; + let top_y = new_y - 1; + let mut area = 0; + let min_world = c.world.min_y()?; + for px in position[0].min(corner[0])..=position[0].max(corner[0]) { + for pz in position[2].min(corner[2])..=position[2].max(corner[2]) { + let mut floor = position[1] - 1; + loop { + let state = c.world.block([px, floor, pz])?; + let ice = c + .resources + .block_tags + .get("minecraft:ice") + .is_some_and(|t| t.contains(c.name(state))); + let open = c.is_air(state) || is_water(c, [px, floor, pz])? || ice; + if !(open && floor > min_world + 1) { + break; + } + floor -= 1; + } + min_y = min_y.min(floor); + if floor < top_y - 2 { + area += 1; + } + } + } + let width = (position[0] - corner[0]).abs(); + if top_y - min_y > 2 && area > width - 2 { + new_y = min_y + 1; + } + position[1] = new_y; + if let Some(markers) = piece.place_at(c, position, &[])? { + for (marker, pos) in markers { + if marker == "chest" { + let water = if is_water(c, pos)? { "true" } else { "false" }; + let chest = c.state_with("chest", &[("waterlogged", water)]); + c.world.set(pos, chest, 2)?; + let table = if large { + "minecraft:chests/underwater_ruin_big" + } else { + "minecraft:chests/underwater_ruin_small" + }; + c.loot_table(pos, "minecraft:chest", table)?; + } else if marker == "drowned" { + // The drowned entity is not created; its marker block is cleared. + let sea = 63; + let state = if pos[1] > sea { + c.state("air") + } else { + c.state("water") + }; + c.world.set(pos, state, 2)?; + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/src/worldgen/structure/processor.rs b/crates/horizon-world/src/worldgen/structure/processor.rs new file mode 100644 index 000000000..45fb5c36e --- /dev/null +++ b/crates/horizon-world/src/worldgen/structure/processor.rs @@ -0,0 +1,824 @@ +//! Structure processors (`worldgen/processor_list`) and template placement. +use super::{BlockInfo, BoundingBox, Mirror, Rotation, StructureResources, StructureTemplate}; +use crate::{ + fluid::FluidKind, + heightmap::HeightmapType, + nbt::{Compound, JavaString, Tag}, + registry::BlockStateId, + worldgen::{ + DecodeError, + block_feature::FeatureBlockBindings, + feature::FeatureWorld, + placement::{PlacementContext, PlacementQueryError}, + rule_test::RuleTest, + value_provider::IntProvider, + }, +}; +use horizon_core::{ + position::BlockPos, + random::{LegacyRandom, PositionalRandom, RandomSource, position_seed}, +}; +use serde_json::Value; +use std::{collections::BTreeSet, sync::Arc}; + +/// The draws processors make from StructurePlaceSettings' random. +pub trait ProcessorRandom { + fn float(&mut self) -> f32; + fn int(&mut self, bound: i32) -> i32; + fn long(&mut self) -> i64; +} +impl<R: RandomSource> ProcessorRandom for R { + fn float(&mut self) -> f32 { + self.next_float() + } + fn int(&mut self, bound: i32) -> i32 { + self.next_int_bound(bound).unwrap_or(0) + } + fn long(&mut self) -> i64 { + self.next_long() + } +} + +#[derive(Clone, Debug)] +enum PosRule { + Always, + Linear { + min_chance: f32, + max_chance: f32, + min_dist: i32, + max_dist: i32, + axis: Option<usize>, + }, +} +#[derive(Clone, Debug)] +enum Modifier { + Passthrough, + Clear, + AppendLoot(String), + AppendStatic(Compound), +} +#[derive(Clone, Debug)] +pub struct Rule { + input: RuleTest, + location: RuleTest, + position: PosRule, + output: BlockStateId, + modifier: Modifier, +} +#[derive(Clone, Debug)] +pub enum Processor { + Nop, + BlockIgnore(BTreeSet<String>), + BlockRot { + rottable: Option<Arc<BTreeSet<BlockStateId>>>, + integrity: f32, + }, + Gravity { + heightmap: HeightmapType, + offset: i32, + }, + Rule(Vec<Rule>), + Protected(Arc<BTreeSet<BlockStateId>>), + Capped { + delegate: Box<Processor>, + limit: IntProvider, + }, + JigsawReplacement, + BlockAge(f32), + LavaSubmerged, + BlackstoneReplace, +} +#[derive(Clone, Debug, Default)] +pub struct ProcessorList(pub Vec<Processor>); + +fn holder_set( + value: &Value, + bindings: &FeatureBlockBindings<'_>, +) -> Result<Arc<BTreeSet<BlockStateId>>, DecodeError> { + let names: Vec<&str> = match value { + Value::String(s) => vec![s.as_str()], + Value::Array(a) => a.iter().filter_map(Value::as_str).collect(), + _ => return Err(DecodeError::Field("block holder set")), + }; + let mut out = BTreeSet::new(); + for name in names { + if let Some(tag) = name.strip_prefix('#') { + let tag = super::super::tags::identifier(tag)?; + out.extend( + bindings + .tags + .get(&tag) + .map(|s| s.iter().copied()) + .into_iter() + .flatten(), + ); + } else { + let name = super::super::tags::identifier(name)?; + out.extend( + bindings + .blocks + .get(&name) + .ok_or_else(|| DecodeError::Registry(format!("unknown block {name}")))? + .iter() + .copied(), + ); + } + } + Ok(Arc::new(out)) +} +fn json_to_nbt(value: &Value) -> Tag { + match value { + Value::Bool(b) => Tag::Byte(i8::from(*b)), + Value::Number(n) => match n.as_i64() { + Some(i) if i32::try_from(i).is_ok() => Tag::Int(i as i32), + Some(i) => Tag::Long(i), + None => Tag::Double(n.as_f64().unwrap_or(0.).to_bits()), + }, + Value::String(s) => Tag::String(s.as_str().into()), + Value::Array(a) => Tag::List(a.iter().map(json_to_nbt).collect()), + Value::Object(o) => Tag::Compound( + o.iter() + .map(|(k, v)| (JavaString::from(k.as_str()), json_to_nbt(v))) + .collect(), + ), + Value::Null => Tag::End, + } +} +fn float(value: &Value, key: &'static str) -> Result<f32, DecodeError> { + value[key] + .as_f64() + .map(|v| v as f32) + .ok_or(DecodeError::Field(key)) +} +impl Processor { + fn decode( + value: &Value, + resources: &StructureResources, + bindings: &FeatureBlockBindings<'_>, + ) -> Result<Self, DecodeError> { + let kind = value["processor_type"] + .as_str() + .ok_or(DecodeError::Field("processor_type"))?; + let state = |v: &Value| -> Result<BlockStateId, DecodeError> { + bindings + .codec + .decode(&v.to_string(), false) + .map_err(|e| DecodeError::Registry(e.to_string())) + }; + Ok(match super::super::tags::identifier(kind)?.as_str() { + "minecraft:nop" => Self::Nop, + "minecraft:block_ignore" => Self::BlockIgnore( + value["blocks"] + .as_array() + .ok_or(DecodeError::Field("block_ignore blocks"))? + .iter() + .map(|b| state(b).map(|id| resources.registry.state(id).unwrap().name.clone())) + .collect::<Result<_, _>>()?, + ), + "minecraft:block_rot" => Self::BlockRot { + rottable: match value.get("rottable_blocks") { + Some(v) => Some(holder_set(v, bindings)?), + None => None, + }, + integrity: float(value, "integrity")?, + }, + "minecraft:gravity" => Self::Gravity { + heightmap: match value.get("heightmap").and_then(Value::as_str) { + Some(name) => HeightmapType::ALL + .into_iter() + .find(|k| k.name() == name) + .ok_or(DecodeError::Field("gravity heightmap"))?, + None => HeightmapType::WorldSurfaceWg, + }, + offset: value.get("offset").and_then(Value::as_i64).unwrap_or(0) as i32, + }, + "minecraft:protected_blocks" => Self::Protected(holder_set(&value["value"], bindings)?), + "minecraft:jigsaw_replacement" => Self::JigsawReplacement, + "minecraft:block_age" => Self::BlockAge(float(value, "mossiness")?), + "minecraft:lava_submerged_block" => Self::LavaSubmerged, + "minecraft:blackstone_replace" => Self::BlackstoneReplace, + "minecraft:capped" => Self::Capped { + delegate: Box::new(Self::decode(&value["delegate"], resources, bindings)?), + limit: IntProvider::from_json(&value["limit"].to_string())?, + }, + "minecraft:rule" => Self::Rule( + value["rules"] + .as_array() + .ok_or(DecodeError::Field("rules"))? + .iter() + .map(|rule| { + let test = |key| RuleTest::from_json(&rule[key].to_string(), bindings); + let position = match rule.get("position_predicate") { + Some(p) => match p["predicate_type"] + .as_str() + .unwrap_or("minecraft:always_true") + { + "minecraft:always_true" => PosRule::Always, + kind @ ("minecraft:linear_pos" + | "minecraft:axis_aligned_linear_pos") => PosRule::Linear { + min_chance: p + .get("min_chance") + .and_then(Value::as_f64) + .unwrap_or(0.) + as f32, + max_chance: p + .get("max_chance") + .and_then(Value::as_f64) + .unwrap_or(0.) + as f32, + min_dist: p.get("min_dist").and_then(Value::as_i64).unwrap_or(0) + as i32, + max_dist: p.get("max_dist").and_then(Value::as_i64).unwrap_or(0) + as i32, + axis: (kind == "minecraft:axis_aligned_linear_pos").then( + || match p.get("axis").and_then(Value::as_str) { + Some("x") => 0, + Some("z") => 2, + _ => 1, + }, + ), + }, + _ => return Err(DecodeError::Field("position predicate")), + }, + None => PosRule::Always, + }; + let modifier = match rule.get("block_entity_modifier") { + None => Modifier::Passthrough, + Some(m) => match m["type"].as_str().unwrap_or("") { + "minecraft:passthrough" => Modifier::Passthrough, + "minecraft:clear" => Modifier::Clear, + "minecraft:append_loot" => Modifier::AppendLoot( + m["loot_table"].as_str().unwrap_or_default().to_owned(), + ), + "minecraft:append_static" => match json_to_nbt(&m["data"]) { + Tag::Compound(c) => Modifier::AppendStatic(c), + _ => Modifier::AppendStatic(Compound::new()), + }, + _ => return Err(DecodeError::Field("block entity modifier")), + }, + }; + Ok(Rule { + input: test("input_predicate")?, + location: test("location_predicate")?, + position, + output: state(&rule["output_state"])?, + modifier, + }) + }) + .collect::<Result<_, DecodeError>>()?, + ), + _ => return Err(DecodeError::Field("structure processor type")), + }) + } + fn evaluates_entire_piece(&self) -> bool { + matches!(self, Self::Capped { .. }) + } +} +impl ProcessorList { + /// A processor list holder: a registry name, `{"processors": [...]}` or a list. + pub fn decode( + json: &str, + resources: &StructureResources, + bindings: &FeatureBlockBindings<'_>, + ) -> Result<Self, DecodeError> { + let value: Value = serde_json::from_str(json)?; + let value = match &value { + Value::String(name) => { + let name = super::super::tags::identifier(name)?; + let raw = resources.processor_lists.get(&name).ok_or_else(|| { + DecodeError::Registry(format!("unknown processor list {name}")) + })?; + serde_json::from_str(raw)? + } + other => other.clone(), + }; + let list = match &value { + Value::Array(a) => a.clone(), + Value::Object(_) => value["processors"].as_array().cloned().unwrap_or_default(), + _ => return Err(DecodeError::Field("processor list")), + }; + Ok(Self( + list.iter() + .map(|p| Processor::decode(p, resources, bindings)) + .collect::<Result<_, _>>()?, + )) + } +} + +/// StructurePlaceSettings without entity options. +pub struct PlaceSettings<'a> { + pub mirror: Mirror, + pub rotation: Rotation, + pub pivot: [i32; 3], + pub bounding_box: Option<BoundingBox>, + pub processors: Vec<&'a Processor>, + pub waterlogging: bool, + pub random: Option<&'a mut dyn ProcessorRandom>, +} +impl<'a> PlaceSettings<'a> { + pub fn new(rotation: Rotation) -> Self { + Self { + mirror: Mirror::None, + rotation, + pivot: [0; 3], + bounding_box: None, + processors: Vec::new(), + waterlogging: true, + random: None, + } + } + pub fn with_processors(mut self, list: &'a ProcessorList) -> Self { + self.processors.extend(list.0.iter()); + self + } + /// settings.getRandom(pos): the shared random, else a position-seeded one. + fn with_random<T>( + &mut self, + pos: [i32; 3], + f: impl FnOnce(&mut dyn ProcessorRandom) -> T, + ) -> T { + match self.random.as_deref_mut() { + Some(random) => f(random), + None => f(&mut LegacyRandom::new(position_seed(BlockPos::new( + pos[0], pos[1], pos[2], + )))), + } + } +} + +/// BlackstoneReplaceProcessor's block map. +fn blackstone(name: &str) -> Option<&'static str> { + Some(match name.strip_prefix("minecraft:")? { + "cobblestone" | "mossy_cobblestone" => "blackstone", + "stone" => "polished_blackstone", + "stone_bricks" | "mossy_stone_bricks" => "polished_blackstone_bricks", + "cobblestone_stairs" | "mossy_cobblestone_stairs" => "blackstone_stairs", + "stone_stairs" => "polished_blackstone_stairs", + "stone_brick_stairs" | "mossy_stone_brick_stairs" => "polished_blackstone_brick_stairs", + "cobblestone_slab" | "mossy_cobblestone_slab" => "blackstone_slab", + "smooth_stone_slab" | "stone_slab" => "polished_blackstone_slab", + "stone_brick_slab" | "mossy_stone_brick_slab" => "polished_blackstone_brick_slab", + "stone_brick_wall" | "mossy_stone_brick_wall" => "polished_blackstone_brick_wall", + "cobblestone_wall" | "mossy_cobblestone_wall" => "blackstone_wall", + "chiseled_stone_bricks" => "chiseled_polished_blackstone", + "cracked_stone_bricks" => "cracked_polished_blackstone_bricks", + "iron_bars" => "iron_chain", + _ => return None, + }) +} +type ProcessResult = Result<Option<BlockInfo>, PlacementQueryError>; +#[allow(clippy::too_many_arguments)] +fn process_block<W: PlacementContext>( + processor: &Processor, + world: &mut W, + resources: &StructureResources, + reference: [i32; 3], + relative: [i32; 3], + info: BlockInfo, + settings: &mut PlaceSettings<'_>, +) -> ProcessResult { + let registry = resources.registry; + let name = |id: BlockStateId| registry.state(id).map(|s| s.name.as_str()).unwrap_or(""); + Ok(match processor { + Processor::Nop => Some(info), + Processor::BlockIgnore(blocks) => (!blocks.contains(name(info.state))).then_some(info), + Processor::BlockRot { + rottable, + integrity, + } => { + let candidate = rottable + .as_ref() + .is_none_or(|set| set.contains(&info.state)); + let keep = settings.with_random(info.pos, |r| !candidate || r.float() <= *integrity); + keep.then_some(info) + } + Processor::Gravity { heightmap, offset } => { + let height = world.height(*heightmap, info.pos[0], info.pos[2])? + offset; + Some(BlockInfo { + pos: [info.pos[0], height + relative[1], info.pos[2]], + ..info + }) + } + Processor::Protected(set) => (!set.contains(&world.block_state(info.pos)?)).then_some(info), + Processor::JigsawReplacement => { + if !resources.is_jigsaw(info.state) { + return Ok(Some(info)); + } + let Some(nbt) = &info.nbt else { + return Ok(Some(info)); + }; + let text = match nbt.get(&JavaString::from("final_state")) { + Some(Tag::String(s)) => s.to_string_lossy(), + _ => "minecraft:air".to_owned(), + }; + let Some(state) = super::template::parse_state_string(registry, &text) else { + return Ok(None); + }; + (name(state) != "minecraft:structure_void").then_some(BlockInfo { + pos: info.pos, + state, + nbt: None, + }) + } + Processor::LavaSubmerged => { + let lava = name(world.block_state(info.pos)?) == "minecraft:lava"; + if lava && !resources.transforms.full_block(info.state) { + Some(BlockInfo { + state: registry.default_state("minecraft:lava").unwrap(), + ..info + }) + } else { + Some(info) + } + } + Processor::BlockAge(mossiness) => block_age(*mossiness, info, settings, resources), + Processor::BlackstoneReplace => { + let Some(target) = blackstone(name(info.state)) else { + return Ok(Some(info)); + }; + let old = registry.state(info.state); + let properties: Vec<(&str, &str)> = ["facing", "half", "type"] + .into_iter() + .filter_map(|k| Some((k, old?.properties.get(k)?.as_str()))) + .collect(); + Some(BlockInfo { + state: super::legacy::state(resources, target, &properties), + ..info + }) + } + Processor::Rule(rules) => { + let mut random = LegacyRandom::new(position_seed(BlockPos::new( + info.pos[0], + info.pos[1], + info.pos[2], + ))); + for rule in rules { + if !rule.input.test(info.state, info.pos, &mut random) { + continue; + } + let located = world.block_state(info.pos)?; + if !rule.location.test(located, info.pos, &mut random) { + continue; + } + let position_ok = match &rule.position { + PosRule::Always => true, + PosRule::Linear { + min_chance, + max_chance, + min_dist, + max_dist, + axis, + } => { + let dist = match axis { + None => (0..3) + .map(|i| (info.pos[i] - reference[i]).abs()) + .sum::<i32>(), + Some(a) => { + let d: [f32; 3] = std::array::from_fn(|i| { + if i == *a { + ((info.pos[i] - reference[i]) as f32).abs() + } else { + 0. + } + }); + (d[0] + d[1] + d[2]) as i32 + } + }; + let roll = random.next_float(); + let t = (dist - min_dist) as f32 / (max_dist - min_dist) as f32; + let chance = if t < 0. { + *min_chance + } else if t > 1. { + *max_chance + } else { + min_chance + t * (max_chance - min_chance) + }; + roll <= chance + } + }; + if !position_ok { + continue; + } + let nbt = match &rule.modifier { + Modifier::Passthrough => info.nbt.clone(), + Modifier::Clear => Some(Compound::new()), + Modifier::AppendLoot(table) => { + let mut nbt = info.nbt.clone().unwrap_or_default(); + nbt.insert("LootTable".into(), Tag::String(table.as_str().into())); + nbt.insert("LootTableSeed".into(), Tag::Long(random.next_long())); + Some(nbt) + } + Modifier::AppendStatic(data) => { + let mut nbt = info.nbt.clone().unwrap_or_default(); + nbt.extend(data.clone()); + Some(nbt) + } + }; + return Ok(Some(BlockInfo { + pos: info.pos, + state: rule.output, + nbt, + })); + } + Some(info) + } + Processor::Capped { .. } => Some(info), + }) +} +fn block_age( + mossiness: f32, + info: BlockInfo, + settings: &mut PlaceSettings<'_>, + resources: &StructureResources, +) -> Option<BlockInfo> { + let registry = resources.registry; + let state = registry.state(info.state)?.clone(); + let default = |n: &str| registry.default_state(n).unwrap(); + let with_props = |n: &str| { + let mut target = registry.state(default(n)).unwrap().clone(); + for (k, v) in &state.properties { + if target.properties.contains_key(k) { + target.properties.insert(k.clone(), v.clone()); + } + } + registry.id(&target).unwrap_or(default(n)) + }; + let random_stairs = |r: &mut dyn ProcessorRandom, n: &str| { + let facing = ["north", "east", "south", "west"][r.int(4) as usize]; + let half = ["top", "bottom"][r.int(2) as usize]; + let mut target = registry.state(default(n)).unwrap().clone(); + target.properties.insert("facing".into(), facing.into()); + target.properties.insert("half".into(), half.into()); + registry.id(&target).unwrap() + }; + let name = state.name.as_str(); + let is_tag = |tag: &str| { + // Tags are matched by block name through the template resources' bindings. + resources + .block_tags + .get(tag) + .is_some_and(|set| set.contains(name)) + }; + let new_state = settings.with_random(info.pos, |r| -> Option<BlockStateId> { + let pick = |r: &mut dyn ProcessorRandom, non: &[BlockStateId], mossy: &[BlockStateId]| { + if r.float() < mossiness { + mossy[r.int(mossy.len() as i32) as usize] + } else { + non[r.int(non.len() as i32) as usize] + } + }; + if matches!( + name, + "minecraft:stone_bricks" | "minecraft:stone" | "minecraft:chiseled_stone_bricks" + ) { + if r.float() >= 0.5 { + return None; + } + let non = [ + default("minecraft:cracked_stone_bricks"), + random_stairs(r, "minecraft:stone_brick_stairs"), + ]; + let mossy = [ + default("minecraft:mossy_stone_bricks"), + random_stairs(r, "minecraft:mossy_stone_brick_stairs"), + ]; + Some(pick(r, &non, &mossy)) + } else if is_tag("minecraft:stairs") { + if r.float() >= 0.5 { + return None; + } + let non = [ + default("minecraft:stone_slab"), + default("minecraft:stone_brick_slab"), + ]; + let mossy = [ + with_props("minecraft:mossy_stone_brick_stairs"), + default("minecraft:mossy_stone_brick_slab"), + ]; + Some(pick(r, &non, &mossy)) + } else if is_tag("minecraft:slabs") { + (r.float() < mossiness).then(|| with_props("minecraft:mossy_stone_brick_slab")) + } else if is_tag("minecraft:walls") { + (r.float() < mossiness).then(|| with_props("minecraft:mossy_stone_brick_wall")) + } else if name == "minecraft:obsidian" { + (r.float() < 0.15).then(|| default("minecraft:crying_obsidian")) + } else { + None + } + }); + Some(match new_state { + Some(state) => BlockInfo { state, ..info }, + None => info, + }) +} + +/// StructureTemplate.processBlockInfos. +fn process_infos<W: PlacementContext>( + world: &mut W, + resources: &StructureResources, + template: &StructureTemplate, + palette: usize, + position: [i32; 3], + reference: [i32; 3], + settings: &mut PlaceSettings<'_>, +) -> Result<Vec<BlockInfo>, PlacementQueryError> { + let whole = settings + .processors + .iter() + .any(|p| p.evaluates_entire_piece()); + let mut original = Vec::new(); + let mut processed = Vec::new(); + for info in template.palettes()[palette].blocks() { + let relative = StructureTemplate::transform( + info.pos, + settings.mirror, + settings.rotation, + settings.pivot, + ); + let pos = std::array::from_fn(|i| relative[i] + position[i]); + if !whole && settings.bounding_box.is_some_and(|b| !b.is_inside(pos)) { + continue; + } + let mut current = Some(BlockInfo { + pos, + state: info.state, + nbt: info.nbt.clone(), + }); + let processors = settings.processors.clone(); + for processor in processors { + let Some(value) = current.take() else { break }; + current = process_block( + processor, world, resources, reference, info.pos, value, settings, + )?; + } + if let Some(value) = current { + processed.push(value); + original.push(info.clone()); + } + } + let processors = settings.processors.clone(); + for processor in processors { + let Processor::Capped { delegate, limit } = processor else { + continue; + }; + if limit.bounds()[1] == 0 || processed.is_empty() || original.len() != processed.len() { + continue; + } + let seed = world.world_seed()?; + let mut random = LegacyRandom::new(seed).fork_positional().at(BlockPos::new( + position[0], + position[1], + position[2], + )); + let max = limit + .sample(&mut random) + .unwrap_or(0) + .min(processed.len() as i32); + if max < 1 { + continue; + } + let mut indices: Vec<usize> = (0..processed.len()).collect(); + for i in (2..=indices.len()).rev() { + let swap = random.next_int_bound(i as i32).unwrap_or(0) as usize; + indices.swap(i - 1, swap); + } + let mut replaced = 0; + for index in indices { + if replaced >= max { + break; + } + let before = processed[index].clone(); + let altered = process_block( + delegate, + world, + resources, + reference, + original[index].pos, + before.clone(), + settings, + )?; + if let Some(altered) = altered { + if altered != before { + replaced += 1; + processed[index] = altered; + } + } + } + } + Ok(processed) +} + +/// StructureTemplate.placeInWorld without entities or neighbor shape updates. +/// Returns false for empty templates. +#[allow(clippy::too_many_arguments)] +pub fn place_in_world<W: FeatureWorld + PlacementContext>( + world: &mut W, + resources: &StructureResources, + template: &StructureTemplate, + position: [i32; 3], + reference: [i32; 3], + settings: &mut PlaceSettings<'_>, + mut loot_random: Option<&mut dyn ProcessorRandom>, + flags: i32, +) -> Result<bool, PlacementQueryError> { + if template.palettes().is_empty() { + return Ok(false); + } + let palette = match settings.random.as_deref_mut() { + Some(r) => r.int(template.palettes().len() as i32) as usize, + None => LegacyRandom::new(position_seed(BlockPos::new( + position[0], + position[1], + position[2], + ))) + .next_int_bound(template.palettes().len() as i32) + .unwrap_or(0) as usize, + }; + if template.palettes()[palette].blocks().is_empty() || template.size.iter().any(|s| *s < 1) { + return Ok(false); + } + let infos = process_infos( + world, resources, template, palette, position, reference, settings, + )?; + let barrier = resources + .registry + .default_state("minecraft:barrier") + .unwrap(); + let mut to_fill = Vec::new(); + let mut locked = Vec::new(); + let world_err = |_| PlacementQueryError::Failed("template write".into()); + for info in infos { + if settings + .bounding_box + .is_some_and(|b| !b.is_inside(info.pos)) + { + continue; + } + let previous = if settings.waterlogging { + Some(world.fluid_state(info.pos)?) + } else { + None + }; + let state = resources.transforms.rotate( + resources.transforms.mirror(info.state, settings.mirror), + settings.rotation, + ); + if info.nbt.is_some() { + world.set_block(info.pos, barrier, 820).map_err(world_err)?; + } + if !world.set_block(info.pos, state, flags).map_err(world_err)? { + continue; + } + if let Some(mut nbt) = info.nbt { + if resources.transforms.loot_container(state) { + let seed = match loot_random.as_deref_mut() { + Some(random) => random.long(), + None => settings.random.as_deref_mut().map_or(0, |r| r.long()), + }; + nbt.insert("LootTableSeed".into(), Tag::Long(seed)); + } + world.set_block_entity(info.pos, nbt)?; + } + if let Some(previous) = previous { + if resources.source_fluid(state) { + locked.push(info.pos); + } else if let Some(wet) = resources.waterlogged.get(&state) { + if previous.kind() == FluidKind::Water { + world.set_block(info.pos, *wet, 3).map_err(world_err)?; + world.schedule_fluid_tick(info.pos, previous.kind(), 5).ok(); + } else if !previous.is_source() { + to_fill.push(info.pos); + } + } + } + } + let mut filled = true; + while filled && !to_fill.is_empty() { + filled = false; + let mut remaining = Vec::new(); + for pos in std::mem::take(&mut to_fill) { + let mut fluid = world.fluid_state(pos)?; + for d in [[0, 1, 0], [0, 0, -1], [1, 0, 0], [0, 0, 1], [-1, 0, 0]] { + if fluid.is_source() { + break; + } + let n = [pos[0] + d[0], pos[1] + d[1], pos[2] + d[2]]; + let neighbor = world.fluid_state(n)?; + if neighbor.is_source() && !locked.contains(&n) { + fluid = neighbor; + } + } + let state = world.block_state(pos)?; + match resources.waterlogged.get(&state) { + Some(wet) if fluid.is_source() && fluid.kind() == FluidKind::Water => { + world.set_block(pos, *wet, 3).map_err(world_err)?; + world.schedule_fluid_tick(pos, fluid.kind(), 5).ok(); + filled = true; + } + _ => remaining.push(pos), + } + } + to_fill = remaining; + } + Ok(true) +} diff --git a/crates/horizon-world/src/worldgen/structure/ruined_portal.rs b/crates/horizon-world/src/worldgen/structure/ruined_portal.rs new file mode 100644 index 000000000..b7a1f0064 --- /dev/null +++ b/crates/horizon-world/src/worldgen/structure/ruined_portal.rs @@ -0,0 +1,370 @@ +//! Ruined portals (RuinedPortalStructure, RuinedPortalPiece). +use super::{ + Mirror, Rotation, StructureResources, + legacy::{ + HORIZONTAL, PieceContext, Result, TemplateHandler, TemplatePiece, direction_name, offset, + opposite, + }, + processor::ProcessorList, + start::StartContext, +}; +use crate::{ + heightmap::HeightmapType, + registry::BlockStateId, + worldgen::block_feature::FeatureBlockBindings, +}; +use horizon_core::{geometry::Direction, position::ChunkPos, random::RandomSource}; +use serde_json::{Value, json}; +use std::sync::Arc; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Vertical { + OnLandSurface, + PartlyBuried, + OnOceanFloor, + InMountain, + Underground, + InNether, +} +impl Vertical { + fn heightmap(self) -> HeightmapType { + if self == Self::OnOceanFloor { + HeightmapType::OceanFloorWg + } else { + HeightmapType::WorldSurfaceWg + } + } +} +#[derive(Clone, Debug)] +pub struct Setup { + placement: Vertical, + air_pocket: f32, + mossiness: f32, + overgrown: bool, + vines: bool, + can_be_cold: bool, + blackstone: bool, + weight: f32, +} +impl Setup { + pub fn decode(v: &Value) -> Self { + let float = |k: &str| v[k].as_f64().unwrap_or(0.) as f32; + let flag = |k: &str| v[k].as_bool().unwrap_or(false); + Self { + placement: match v["placement"].as_str().unwrap_or_default() { + "partly_buried" => Vertical::PartlyBuried, + "on_ocean_floor" => Vertical::OnOceanFloor, + "in_mountain" => Vertical::InMountain, + "underground" => Vertical::Underground, + "in_nether" => Vertical::InNether, + _ => Vertical::OnLandSurface, + }, + air_pocket: float("air_pocket_probability"), + mossiness: float("mossiness"), + overgrown: flag("overgrown"), + vines: flag("vines"), + can_be_cold: flag("can_be_cold"), + blackstone: flag("replace_with_blackstone"), + weight: float("weight"), + } + } +} +#[derive(Clone, Copy, Debug)] +pub struct PortalProps { + placement: Vertical, + cold: bool, + overgrown: bool, + vines: bool, +} + +fn between(random: &mut impl RandomSource, min: i32, max: i32) -> i32 { + random.next_int_bound(max - min + 1).unwrap_or(0) + min +} +fn within(random: &mut impl RandomSource, min: i32, max: i32) -> i32 { + if min < max { + between(random, min, max) + } else { + max + } +} + +/// RuinedPortalStructure.findGenerationPoint: the start position and piece. +pub fn start( + context: &mut impl StartContext, + resources: &StructureResources, + bindings: &FeatureBlockBindings<'_>, + random: &mut impl RandomSource, + chunk: ChunkPos, + setups: &[Setup], +) -> Option<([i32; 3], TemplatePiece)> { + let setup = if setups.len() > 1 { + let total: f32 = setups.iter().map(|s| s.weight).sum(); + let mut pick = random.next_float(); + setups.iter().find(|s| { + pick -= s.weight / total; + pick < 0. + })? + } else { + setups.first()? + }; + let air_pocket = match setup.air_pocket { + 0. => false, + 1. => true, + p => random.next_float() < p, + }; + let name = if random.next_float() < 0.05 { + format!( + "minecraft:ruined_portal/giant_portal_{}", + random.next_int_bound(3).ok()? + 1 + ) + } else { + format!( + "minecraft:ruined_portal/portal_{}", + random.next_int_bound(10).ok()? + 1 + ) + }; + let template = resources.template(&name)?; + let rotation = Rotation::random(random); + let mirror = if random.next_float() < 0.5 { + Mirror::None + } else { + Mirror::FrontBack + }; + let pivot = [template.size[0] / 2, 0, template.size[2] / 2]; + let base = [chunk.x * 16, 0, chunk.z * 16]; + let b = template.bounding_box(base, rotation, pivot, mirror); + let center = b.center(); + let surface = context.base_height(center[0], center[2], setup.placement.heightmap()) - 1; + let span = b.span()[1]; + let min_y = context.min_y() + 15; + let new_y = match setup.placement { + Vertical::InNether => { + if air_pocket { + between(random, 32, 100) + } else if random.next_float() < 0.5 { + between(random, 27, 29) + } else { + between(random, 29, 100) + } + } + Vertical::InMountain => within(random, 70, surface - span), + Vertical::Underground => within(random, min_y, surface - span), + Vertical::PartlyBuried => surface - span + between(random, 2, 8), + _ => surface, + }; + let kind = setup.placement.heightmap(); + let columns: Vec<Vec<bool>> = [ + [b.min[0], b.min[2]], + [b.max[0], b.min[2]], + [b.min[0], b.max[2]], + [b.max[0], b.max[2]], + ] + .into_iter() + .map(|[x, z]| context.base_column(x, z, kind)) + .collect(); + let world_min = context.min_y(); + let mut y = new_y; + 'search: while y > min_y { + let mut solid = 0; + for column in &columns { + let index = y - world_min; + if index >= 0 && column.get(index as usize).copied().unwrap_or(false) { + solid += 1; + if solid == 3 { + break 'search; + } + } + } + y -= 1; + } + let origin = [base[0], y, base[2]]; + let cold = setup.can_be_cold && { + let biome = context.noise_biome(origin.map(|v| v >> 2)); + context.cold_enough_to_snow(biome, origin) + }; + let props = PortalProps { + placement: setup.placement, + cold, + overgrown: setup.overgrown, + vines: setup.vines, + }; + let rule = |source: &str, probability: Option<f32>, target: &str| { + let input = match probability { + Some(p) => json!({"predicate_type": "minecraft:random_block_match", "block": source, "probability": p}), + None => json!({"predicate_type": "minecraft:block_match", "block": source}), + }; + json!({"input_predicate": input, "location_predicate": {"predicate_type": "minecraft:always_true"}, "output_state": target}) + }; + let mut rules = vec![rule("minecraft:gold_block", Some(0.3), "minecraft:air")]; + rules.push(if setup.placement == Vertical::OnOceanFloor { + rule("minecraft:lava", None, "minecraft:magma_block") + } else if cold { + rule("minecraft:lava", None, "minecraft:netherrack") + } else { + rule("minecraft:lava", Some(0.2), "minecraft:magma_block") + }); + if !cold { + rules.push(rule("minecraft:netherrack", Some(0.07), "minecraft:magma_block")); + } + let mut list = vec![ + json!({"processor_type": "minecraft:rule", "rules": rules}), + json!({"processor_type": "minecraft:block_age", "mossiness": setup.mossiness}), + json!({"processor_type": "minecraft:protected_blocks", "value": "#minecraft:features_cannot_replace"}), + json!({"processor_type": "minecraft:lava_submerged_block"}), + ]; + if setup.blackstone { + list.push(json!({"processor_type": "minecraft:blackstone_replace"})); + } + let processors = + ProcessorList::decode(&json!({ "processors": list }).to_string(), resources, bindings) + .ok()?; + let mut ignore = vec!["minecraft:structure_block".to_owned()]; + if !air_pocket { + ignore.push("minecraft:air".into()); + } + let piece = TemplatePiece::new( + "minecraft:rupo", + &name, + template, + origin, + rotation, + mirror, + pivot, + Arc::new(processors), + true, + ignore, + TemplateHandler::RuinedPortal(props), + ); + Some((origin, piece)) +} + +const NETHERRACK_BY_DISTANCE: [f32; 14] = [ + 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.9, 0.9, 0.8, 0.7, 0.6, 0.4, 0.2, +]; +fn replaceable(c: &PieceContext<'_>, props: PortalProps, state: BlockStateId) -> bool { + let name = c.name(state); + name != "minecraft:air" + && name != "minecraft:obsidian" + && !c + .resources + .block_tags + .get("minecraft:features_cannot_replace") + .is_some_and(|t| t.contains(name)) + && (props.placement == Vertical::InNether || name != "minecraft:lava") +} +fn netherrack_or_magma(c: &mut PieceContext<'_>, props: PortalProps, pos: [i32; 3]) -> Result<()> { + let state = c.world.block(pos)?; + if replaceable(c, props, state) { + let block = if !props.cold && c.random.float() < 0.07 { + "magma_block" + } else { + "netherrack" + }; + c.world.set(pos, c.state(block), 3)?; + } + Ok(()) +} +fn drip_column(c: &mut PieceContext<'_>, props: PortalProps, mut pos: [i32; 3]) -> Result<()> { + netherrack_or_magma(c, props, pos)?; + let mut remaining = 8; + while remaining > 0 && c.random.float() < 0.5 { + pos[1] -= 1; + remaining -= 1; + netherrack_or_magma(c, props, pos)?; + } + Ok(()) +} +fn leaves_above(c: &mut PieceContext<'_>, pos: [i32; 3]) -> Result<()> { + if c.random.float() < 0.5 && c.is_block(pos, "minecraft:netherrack")? { + let above = [pos[0], pos[1] + 1, pos[2]]; + let state = c.world.block(above)?; + if c.is_air(state) { + let leaves = c.state_with("jungle_leaves", &[("persistent", "true")]); + c.world.set(above, leaves, 3)?; + } + } + Ok(()) +} +fn vines(c: &mut PieceContext<'_>, pos: [i32; 3]) -> Result<()> { + let state = c.world.block(pos)?; + if c.is_air(state) || c.name(state) == "minecraft:vine" { + return Ok(()); + } + let direction = random_horizontal_dyn(c); + let neighbour = offset(pos, direction, 1); + let n = c.world.block(neighbour)?; + if c.is_air(n) && c.world.face_full(pos, direction)? { + let vine = c.state_with("vine", &[(direction_name(opposite(direction)), "true")]); + c.world.set(neighbour, vine, 3)?; + } + Ok(()) +} +fn random_horizontal_dyn(c: &mut PieceContext<'_>) -> Direction { + HORIZONTAL[c.random.int(4) as usize] +} +/// RuinedPortalPiece.postProcess. +pub fn post_process(piece: &TemplatePiece, c: &mut PieceContext<'_>) -> Result<()> { + let TemplateHandler::RuinedPortal(props) = piece.handler else { + return Ok(()); + }; + let b = piece.bounding_box; + if !c.chunk_box.is_inside(b.center()) { + return Ok(()); + } + c.chunk_box.encapsulate(&b); + piece.place_at(c, piece.position, &[])?; + // spreadNetherrack + let follow = matches!( + props.placement, + Vertical::OnLandSurface | Vertical::OnOceanFloor + ); + let [cx, _, cz] = b.center(); + let max = NETHERRACK_BY_DISTANCE.len() as i32; + let [sx, _, sz] = b.span(); + let adjustment = c.random.int((8 - (sx + sz) / 2 / 2).max(1)); + for x in cx - max..=cx + max { + for z in cz - max..=cz + max { + let distance = (x - cx).abs() + (z - cz).abs(); + let adjusted = (distance + adjustment).max(0); + if adjusted >= max { + continue; + } + if c.random.double() < f64::from(NETHERRACK_BY_DISTANCE[adjusted as usize]) { + let surface = c.world.height(props.placement.heightmap(), x, z)? - 1; + let y = if follow { surface } else { b.min[1].min(surface) }; + let pos = [x, y, z]; + let state = c.world.block(pos)?; + if (y - b.min[1]).abs() <= 3 && replaceable(c, props, state) { + netherrack_or_magma(c, props, pos)?; + if props.overgrown { + leaves_above(c, pos)?; + } + drip_column(c, props, [x, y - 1, z])?; + } + } + } + } + // addNetherrackDripColumnsBelowPortal + for x in b.min[0] + 1..b.max[0] { + for z in b.min[2] + 1..b.max[2] { + if c.is_block([x, b.min[1], z], "minecraft:netherrack")? { + drip_column(c, props, [x, b.min[1] - 1, z])?; + } + } + } + if props.vines || props.overgrown { + for z in b.min[2]..=b.max[2] { + for y in b.min[1]..=b.max[1] { + for x in b.min[0]..=b.max[0] { + if props.vines { + vines(c, [x, y, z])?; + } + if props.overgrown { + leaves_above(c, [x, y, z])?; + } + } + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/src/worldgen/structure/simple.rs b/crates/horizon-world/src/worldgen/structure/simple.rs new file mode 100644 index 000000000..50a402cc3 --- /dev/null +++ b/crates/horizon-world/src/worldgen/structure/simple.rs @@ -0,0 +1,498 @@ +//! Small piece-based structures: buried treasure, igloo, swamp hut, shipwreck. +use super::{ + BoundingBox, Mirror, Rotation, StructureResources, StructureTemplate, + legacy::{ + LegacyPiece, PieceContext, PieceFrame, Result, TemplateHandler, TemplatePiece, + create_chest, make_bounding_box, offset, random_horizontal, + }, + processor::ProcessorList, +}; +use crate::heightmap::HeightmapType; +use horizon_core::{geometry::Direction, random::RandomSource}; +use std::sync::{Arc, Mutex}; + +fn empty_processors() -> Arc<ProcessorList> { + Arc::new(ProcessorList::default()) +} + +#[derive(Debug)] +pub struct BuriedTreasurePiece { + pub position: [i32; 3], +} +impl LegacyPiece for BuriedTreasurePiece { + fn bounding_box(&self) -> BoundingBox { + BoundingBox::new(self.position, self.position) + } + fn type_name(&self) -> &'static str { + "minecraft:btp" + } + fn post_process(&self, c: &mut PieceContext<'_>) -> Result<()> { + let [x, _, z] = self.position; + let mut pos = [x, c.world.height(HeightmapType::OceanFloorWg, x, z)?, z]; + let min = c.world.min_y()?; + while pos[1] > min { + let current = c.world.block(pos)?; + let below = c.world.block(offset(pos, Direction::Down, 1))?; + if matches!( + c.name(below), + "minecraft:sandstone" + | "minecraft:stone" + | "minecraft:andesite" + | "minecraft:granite" + | "minecraft:diorite" + ) { + let soft = if !c.is_air(current) && !c.is_liquid(current) { + current + } else { + c.state("sand") + }; + for d in Direction::ALL { + let relative = offset(pos, d, 1); + let state = c.world.block(relative)?; + if c.is_air(state) || c.is_liquid(state) { + let under = c.world.block(offset(relative, Direction::Down, 1))?; + if (c.is_air(under) || c.is_liquid(under)) && d != Direction::Up { + c.world.set(relative, below, 3)?; + } else { + c.world.set(relative, soft, 3)?; + } + } + } + create_chest(c, pos, "minecraft:chests/buried_treasure", None)?; + return Ok(()); + } + pos[1] -= 1; + } + Ok(()) + } +} + +pub const IGLOO_TOP: &str = "minecraft:igloo/top"; +const IGLOO_MIDDLE: &str = "minecraft:igloo/middle"; +const IGLOO_BOTTOM: &str = "minecraft:igloo/bottom"; +fn igloo_pivot(name: &str) -> [i32; 3] { + match name { + IGLOO_TOP => [3, 5, 5], + IGLOO_MIDDLE => [1, 3, 1], + _ => [3, 6, 7], + } +} +fn igloo_offset(name: &str) -> [i32; 3] { + match name { + IGLOO_TOP => [0, 0, 0], + IGLOO_MIDDLE => [2, -3, 4], + _ => [0, -3, -2], + } +} +/// IglooPieces.addPieces. +pub fn igloo_pieces( + resources: &StructureResources, + position: [i32; 3], + rotation: Rotation, + random: &mut impl RandomSource, +) -> Option<Vec<TemplatePiece>> { + let piece = |name: &str, depth: i32| -> Option<TemplatePiece> { + let o = igloo_offset(name); + Some(TemplatePiece::new( + "minecraft:iglu", + name, + resources.template(name)?, + [ + position[0] + o[0], + position[1] + o[1] - depth, + position[2] + o[2], + ], + rotation, + Mirror::None, + igloo_pivot(name), + empty_processors(), + false, + vec!["minecraft:structure_block".into()], + TemplateHandler::Igloo, + )) + }; + let mut pieces = Vec::new(); + if random.next_double() < 0.5 { + let depth = random.next_int_bound(8).unwrap_or(0) + 4; + pieces.push(piece(IGLOO_BOTTOM, depth * 3)?); + for i in 0..depth - 1 { + pieces.push(piece(IGLOO_MIDDLE, i * 3)?); + } + } + pieces.push(piece(IGLOO_TOP, 0)?); + Some(pieces) +} + +const SHIPWRECK_BEACHED: [&str; 11] = [ + "with_mast", + "sideways_full", + "sideways_fronthalf", + "sideways_backhalf", + "rightsideup_full", + "rightsideup_fronthalf", + "rightsideup_backhalf", + "with_mast_degraded", + "rightsideup_full_degraded", + "rightsideup_fronthalf_degraded", + "rightsideup_backhalf_degraded", +]; +const SHIPWRECK_OCEAN: [&str; 20] = [ + "with_mast", + "upsidedown_full", + "upsidedown_fronthalf", + "upsidedown_backhalf", + "sideways_full", + "sideways_fronthalf", + "sideways_backhalf", + "rightsideup_full", + "rightsideup_fronthalf", + "rightsideup_backhalf", + "with_mast_degraded", + "upsidedown_full_degraded", + "upsidedown_fronthalf_degraded", + "upsidedown_backhalf_degraded", + "sideways_full_degraded", + "sideways_fronthalf_degraded", + "sideways_backhalf_degraded", + "rightsideup_full_degraded", + "rightsideup_fronthalf_degraded", + "rightsideup_backhalf_degraded", +]; +/// ShipwreckPieces.addRandomPiece. +pub fn shipwreck_piece( + resources: &StructureResources, + position: [i32; 3], + rotation: Rotation, + random: &mut impl RandomSource, + beached: bool, +) -> Option<TemplatePiece> { + let names: &[&str] = if beached { + &SHIPWRECK_BEACHED + } else { + &SHIPWRECK_OCEAN + }; + let name = format!( + "minecraft:shipwreck/{}", + names[random.next_int_bound(names.len() as i32).ok()? as usize] + ); + Some(TemplatePiece::new( + "minecraft:shipwreck", + &name, + resources.template(&name)?, + position, + rotation, + Mirror::None, + [4, 0, 15], + empty_processors(), + true, + vec!["minecraft:structure_block".into(), "minecraft:air".into()], + TemplateHandler::Shipwreck { beached }, + )) +} +pub fn shipwreck_too_big(template: &StructureTemplate) -> bool { + template.size[0] > 32 || template.size[1] > 32 +} + +impl LegacyPiece for TemplatePiece { + fn bounding_box(&self) -> BoundingBox { + self.bounding_box + } + fn after_place(&self, c: &mut PieceContext<'_>, pieces: &[BoundingBox]) -> Result<()> { + match self.handler { + TemplateHandler::Mansion => super::mansion::after_place(c, pieces), + _ => Ok(()), + } + } + fn type_name(&self) -> &'static str { + self.type_name + } + fn post_process(&self, c: &mut PieceContext<'_>) -> Result<()> { + match self.handler { + TemplateHandler::Plain => { + self.place_at(c, self.position, &[])?; + } + TemplateHandler::Igloo => { + let o = igloo_offset(&self.template_name); + let entrance_relative = StructureTemplate::transform( + [3 - o[0], 0, -o[2]], + Mirror::None, + self.rotation, + self.pivot, + ); + let entrance = [ + self.position[0] + entrance_relative[0], + 0, + self.position[2] + entrance_relative[2], + ]; + let height = + c.world + .height(HeightmapType::WorldSurfaceWg, entrance[0], entrance[2])?; + let position = [ + self.position[0], + self.position[1] + height - 90 - 1, + self.position[2], + ]; + if let Some(markers) = self.place_at(c, position, &[])? { + for (marker, pos) in markers { + if marker == "chest" { + c.world.set(pos, c.state("air"), 3)?; + let below = offset(pos, Direction::Down, 1); + if c.is_block(below, "minecraft:chest")? { + c.loot_table( + below, + "minecraft:chest", + "minecraft:chests/igloo_chest", + )?; + } + } + } + } + if self.template_name == IGLOO_TOP { + let r = StructureTemplate::transform( + [3, 0, 5], + Mirror::None, + self.rotation, + self.pivot, + ); + let trapdoor = [position[0] + r[0], position[1] + r[1], position[2] + r[2]]; + let below = c.world.block(offset(trapdoor, Direction::Down, 1))?; + if !c.is_air(below) && c.name(below) != "minecraft:ladder" { + c.world.set(trapdoor, c.state("snow_block"), 3)?; + } + } + } + TemplateHandler::Shipwreck { beached } => { + let adjusted = *self.state.lock().unwrap(); + let y = match adjusted { + Some(y) => y, + None if shipwreck_too_big(&self.template) => self.position[1], + None => { + let kind = if beached { + HeightmapType::WorldSurfaceWg + } else { + HeightmapType::OceanFloorWg + }; + let size = self.template.size; + let mut min = c.world.max_y()? + 1; + let mut mean = 0; + let base = size[0] * size[2]; + if base == 0 { + mean = c.world.height(kind, self.position[0], self.position[2])?; + } else { + for x in self.position[0]..self.position[0] + size[0] { + for z in self.position[2]..self.position[2] + size[2] { + let h = c.world.height(kind, x, z)?; + mean += h; + min = min.min(h); + } + } + mean /= base; + } + let y = if beached { + min - size[1] / 2 - c.random.int(3) + } else { + mean + }; + *self.state.lock().unwrap() = Some(y); + y + } + }; + let position = [self.position[0], y, self.position[2]]; + if let Some(markers) = self.place_at(c, position, &[])? { + for (marker, pos) in markers { + let table = match marker.as_str() { + "map_chest" => "minecraft:chests/shipwreck_map", + "treasure_chest" => "minecraft:chests/shipwreck_treasure", + "supply_chest" => "minecraft:chests/shipwreck_supply", + _ => continue, + }; + let below = offset(pos, Direction::Down, 1); + let state = c.world.block(below)?; + if c.resources.transforms.loot_container(state) { + let kind = c.name(state).to_owned(); + c.loot_table(below, &kind, table)?; + } + } + } + } + TemplateHandler::OceanRuin { .. } => { + super::ocean_ruin::post_process(self, c)?; + } + TemplateHandler::RuinedPortal(_) => { + super::ruined_portal::post_process(self, c)?; + } + TemplateHandler::Mansion => { + super::mansion::post_process(self, c)?; + } + } + Ok(()) + } +} + +/// ScatteredFeaturePiece: an oriented box whose height is fixed on first use. +#[derive(Debug)] +pub struct Scattered { + pub frame: Mutex<PieceFrame>, + pub width: i32, + pub height: i32, + pub depth: i32, + pub height_position: Mutex<i32>, +} +impl Scattered { + pub fn new( + west: i32, + floor: i32, + north: i32, + width: i32, + height: i32, + depth: i32, + direction: Direction, + ) -> Self { + Self { + frame: Mutex::new(PieceFrame::new( + make_bounding_box(west, floor, north, direction, width, height, depth), + Some(direction), + )), + width, + height, + depth, + height_position: Mutex::new(-1), + } + } + pub fn frame(&self) -> PieceFrame { + *self.frame.lock().unwrap() + } + /// updateAverageGroundHeight over the part of the box inside the chunk. + pub fn average_ground(&self, c: &mut PieceContext<'_>, offset: i32) -> Result<bool> { + if *self.height_position.lock().unwrap() >= 0 { + return Ok(true); + } + let b = self.frame().bounding_box; + let (mut total, mut count) = (0, 0); + for z in b.min[2]..=b.max[2] { + for x in b.min[0]..=b.max[0] { + if c.chunk_box.is_inside([x, 64, z]) { + total += c + .world + .height(HeightmapType::MotionBlockingNoLeaves, x, z)?; + count += 1; + } + } + } + if count == 0 { + return Ok(false); + } + let h = total / count; + *self.height_position.lock().unwrap() = h; + let mut frame = self.frame.lock().unwrap(); + frame.bounding_box = + frame + .bounding_box + .moved([0, h - frame.bounding_box.min[1] + offset, 0]); + Ok(true) + } + /// updateHeightPositionToLowestGroundHeight over the whole box. + pub fn lowest_ground(&self, c: &mut PieceContext<'_>, offset: i32) -> Result<bool> { + if *self.height_position.lock().unwrap() >= 0 { + return Ok(true); + } + let b = self.frame().bounding_box; + let mut lowest = c.world.max_y()? + 1; + for z in b.min[2]..=b.max[2] { + for x in b.min[0]..=b.max[0] { + lowest = lowest.min( + c.world + .height(HeightmapType::MotionBlockingNoLeaves, x, z)?, + ); + } + } + *self.height_position.lock().unwrap() = lowest; + let mut frame = self.frame.lock().unwrap(); + frame.bounding_box = + frame + .bounding_box + .moved([0, lowest - frame.bounding_box.min[1] + offset, 0]); + Ok(true) + } +} + +#[derive(Debug)] +pub struct SwampHutPiece { + pub base: Scattered, +} +impl SwampHutPiece { + pub fn new(random: &mut impl RandomSource, west: i32, north: i32) -> Self { + let direction = random_horizontal(random); + Self { + base: Scattered::new(west, 64, north, 7, 7, 9, direction), + } + } +} +impl LegacyPiece for SwampHutPiece { + fn bounding_box(&self) -> BoundingBox { + self.base.frame().bounding_box + } + fn type_name(&self) -> &'static str { + "minecraft:tesh" + } + fn post_process(&self, c: &mut PieceContext<'_>) -> Result<()> { + if !self.base.average_ground(c, 0)? { + return Ok(()); + } + let f = self.base.frame(); + let planks = c.state("spruce_planks"); + let log = c.state("oak_log"); + for (a, b) in [ + ([1, 1, 1], [5, 1, 7]), + ([1, 4, 2], [5, 4, 7]), + ([2, 1, 0], [4, 1, 0]), + ([2, 2, 2], [3, 3, 2]), + ([1, 2, 3], [1, 3, 6]), + ([5, 2, 3], [5, 3, 6]), + ([2, 2, 7], [4, 3, 7]), + ] { + f.generate_box(c, a, b, planks, planks, false)?; + } + for (a, b) in [ + ([1, 0, 2], [1, 3, 2]), + ([5, 0, 2], [5, 3, 2]), + ([1, 0, 7], [1, 3, 7]), + ([5, 0, 7], [5, 3, 7]), + ] { + f.generate_box(c, a, b, log, log, false)?; + } + let fence = c.state("oak_fence"); + let air = c.state("air"); + f.place(c, fence, 2, 3, 2)?; + f.place(c, fence, 3, 3, 7)?; + f.place(c, air, 1, 3, 4)?; + f.place(c, air, 5, 3, 4)?; + f.place(c, air, 5, 3, 5)?; + f.place(c, c.state("potted_red_mushroom"), 1, 3, 5)?; + f.place(c, c.state("crafting_table"), 3, 2, 6)?; + f.place(c, c.state("cauldron"), 4, 2, 6)?; + f.place(c, fence, 1, 2, 1)?; + f.place(c, fence, 5, 2, 1)?; + let stairs = |c: &PieceContext<'_>, facing: &str, shape: &str| { + c.state_with("spruce_stairs", &[("facing", facing), ("shape", shape)]) + }; + let north = stairs(c, "north", "straight"); + let east = stairs(c, "east", "straight"); + let west = stairs(c, "west", "straight"); + let south = stairs(c, "south", "straight"); + f.generate_box(c, [0, 4, 1], [6, 4, 1], north, north, false)?; + f.generate_box(c, [0, 4, 2], [0, 4, 7], east, east, false)?; + f.generate_box(c, [6, 4, 2], [6, 4, 7], west, west, false)?; + f.generate_box(c, [0, 4, 8], [6, 4, 8], south, south, false)?; + f.place(c, stairs(c, "north", "outer_right"), 0, 4, 1)?; + f.place(c, stairs(c, "north", "outer_left"), 6, 4, 1)?; + f.place(c, stairs(c, "south", "outer_left"), 0, 4, 8)?; + f.place(c, stairs(c, "south", "outer_right"), 6, 4, 8)?; + for z in [2, 7] { + for x in [1, 5] { + f.fill_column_down(c, log, x, -1, z)?; + } + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/worldgen/structure/start.rs b/crates/horizon-world/src/worldgen/structure/start.rs new file mode 100644 index 000000000..e0eb5867f --- /dev/null +++ b/crates/horizon-world/src/worldgen/structure/start.rs @@ -0,0 +1,954 @@ +//! Structures, structure sets and their placements, structure starts, +//! references, terrain adaptation and per-chunk piece placement. +use super::{ + BoundingBox, StructureResources, + jigsaw::{JigsawConfig, JigsawContext, PlaceFeature, PoolPiece, Pools, Projection, assemble}, + legacy::{LegacyPiece, PieceContext}, +}; +use crate::{ + heightmap::HeightmapType, + worldgen::{ + DecodeError, + anchor::WorldGenerationContext, + biome::BiomeId, + block_feature::FeatureBlockBindings, + feature::FeatureWorld, + height_provider::HeightProvider, + placement::{PlacementContext, PlacementQueryError}, + weighted::WeightedList, + }, +}; +use horizon_core::{ + density::{Beardifier, JigsawJunction, RigidPiece, StructureBounds, TerrainAdjustment}, + position::{BlockPos, ChunkPos}, + random::{LegacyRandom, PositionalRandom, RandomSource, WorldgenRandom}, +}; +use serde_json::{Value, value::RawValue}; +use std::{ + collections::{BTreeMap, BTreeSet}, + sync::Arc, +}; + +pub const STEPS: [&str; 11] = [ + "raw_generation", + "lakes", + "local_modifications", + "underground_structures", + "surface_structures", + "strongholds", + "underground_ores", + "underground_decoration", + "fluid_springs", + "vegetal_decoration", + "top_layer_modification", +]; + +#[derive(Debug)] +pub struct JigsawDef { + start_pool: String, + start_jigsaw: Option<String>, + max_depth: i32, + start_height: HeightProvider, + use_expansion_hack: bool, + project_to: Option<HeightmapType>, + max_distance: [i32; 2], + aliases: Vec<Value>, + padding: [i32; 2], + waterlogging: bool, +} +#[derive(Debug)] +pub enum StructureKind { + Jigsaw(JigsawDef), + BuriedTreasure, + Igloo, + SwampHut, + DesertPyramid, + JungleTemple, + RuinedPortal(Vec<super::ruined_portal::Setup>), + Mansion, + /// The biomes allowed around a monument (#required_ocean_monument_surrounding). + Monument(BTreeSet<BiomeId>), + Shipwreck { + beached: bool, + }, + OceanRuin { + warm: bool, + large: f32, + cluster: f32, + }, + Mineshaft { + mesa: bool, + /// #minecraft:mineshaft_blocking + blocking: Arc<BTreeSet<BiomeId>>, + }, + Stronghold, + /// A structure type whose generator is not implemented yet. + Unsupported(String), +} +#[derive(Debug)] +pub struct StructureDef { + pub name: String, + pub kind: StructureKind, + pub biomes: BTreeSet<BiomeId>, + pub step: usize, + pub terrain: TerrainAdjustment, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +enum Reduction { + Default, + Legacy1, + Legacy2, + Legacy3, +} +#[derive(Debug)] +enum Placement { + RandomSpread { + spacing: i32, + separation: i32, + triangular: bool, + }, + ConcentricRings { + distance: i32, + spread: i32, + count: i32, + preferred: BTreeSet<BiomeId>, + }, + Unsupported, +} +/// Concentric ring chunk positions by structure set name. +pub type Rings = BTreeMap<String, Vec<ChunkPos>>; +#[derive(Debug)] +pub struct StructureSet { + pub name: String, + pub structures: Vec<(usize, i32)>, + placement: Placement, + salt: i32, + frequency: f32, + reduction: Reduction, + exclusion: Option<(String, i32)>, +} + +fn heightmap(name: &str) -> Option<HeightmapType> { + HeightmapType::ALL.into_iter().find(|k| k.name() == name) +} +fn terrain(name: Option<&str>) -> TerrainAdjustment { + match name { + Some("bury") => TerrainAdjustment::Bury, + Some("beard_thin") => TerrainAdjustment::BeardThin, + Some("beard_box") => TerrainAdjustment::BeardBox, + Some("encapsulate") => TerrainAdjustment::Encapsulate, + _ => TerrainAdjustment::None, + } +} +fn pair(value: Option<&Value>, a: &str, b: &str, default: i32) -> [i32; 2] { + match value { + Some(Value::Number(n)) => [n.as_i64().unwrap_or(0) as i32; 2], + Some(Value::Object(o)) => { + let get = |k: &str| o.get(k).and_then(Value::as_i64).unwrap_or(0) as i32; + let first = get(a); + [ + first, + o.get(b).and_then(Value::as_i64).map_or(first, |v| v as i32), + ] + } + _ => [default; 2], + } +} + +/// All structures and structure sets of a resource bundle, in registry +/// (identifier) order. +#[derive(Debug)] +pub struct StructureRegistry { + pub structures: Vec<StructureDef>, + pub sets: Vec<StructureSet>, + pub pools: Pools, +} +impl StructureRegistry { + pub fn new( + structures: &BTreeMap<String, String>, + sets: &BTreeMap<String, String>, + pools: BTreeMap<String, String>, + biome_set: &dyn Fn(&Value) -> Result<BTreeSet<BiomeId>, DecodeError>, + ) -> Result<Self, DecodeError> { + let mut defs = Vec::new(); + for (name, json) in structures { + let v: Value = serde_json::from_str(json)?; + let kind = match v["type"].as_str().unwrap_or_default() { + "minecraft:jigsaw" => StructureKind::Jigsaw(JigsawDef { + start_pool: v["start_pool"].as_str().unwrap_or_default().to_owned(), + start_jigsaw: v["start_jigsaw_name"].as_str().map(str::to_owned), + max_depth: v["size"].as_i64().unwrap_or(0) as i32, + start_height: HeightProvider::from_json(&v["start_height"].to_string())?, + use_expansion_hack: v["use_expansion_hack"].as_bool().unwrap_or(false), + project_to: v["project_start_to_heightmap"].as_str().and_then(heightmap), + max_distance: pair( + v.get("max_distance_from_center"), + "horizontal", + "vertical", + 80, + ), + aliases: v["pool_aliases"].as_array().cloned().unwrap_or_default(), + padding: pair(v.get("dimension_padding"), "bottom", "top", 0), + waterlogging: v["liquid_settings"].as_str() != Some("ignore_waterlogging"), + }), + "minecraft:buried_treasure" => StructureKind::BuriedTreasure, + "minecraft:igloo" => StructureKind::Igloo, + "minecraft:swamp_hut" => StructureKind::SwampHut, + "minecraft:desert_pyramid" => StructureKind::DesertPyramid, + "minecraft:jungle_temple" => StructureKind::JungleTemple, + "minecraft:woodland_mansion" => StructureKind::Mansion, + "minecraft:ocean_monument" => StructureKind::Monument(biome_set( + &serde_json::json!("#minecraft:required_ocean_monument_surrounding"), + )?), + "minecraft:ruined_portal" => StructureKind::RuinedPortal( + v["setups"] + .as_array() + .into_iter() + .flatten() + .map(super::ruined_portal::Setup::decode) + .collect(), + ), + "minecraft:shipwreck" => StructureKind::Shipwreck { + beached: v["is_beached"].as_bool().unwrap_or(false), + }, + "minecraft:ocean_ruin" => StructureKind::OceanRuin { + warm: v["biome_temp"].as_str() == Some("warm"), + large: v["large_probability"].as_f64().unwrap_or(0.) as f32, + cluster: v["cluster_probability"].as_f64().unwrap_or(0.) as f32, + }, + "minecraft:mineshaft" => StructureKind::Mineshaft { + mesa: v["mineshaft_type"].as_str() == Some("mesa"), + blocking: Arc::new(biome_set(&Value::String( + "#minecraft:mineshaft_blocking".into(), + ))?), + }, + "minecraft:stronghold" => StructureKind::Stronghold, + other => StructureKind::Unsupported(other.to_owned()), + }; + defs.push(StructureDef { + name: name.clone(), + kind, + biomes: biome_set(&v["biomes"])?, + step: STEPS + .iter() + .position(|s| Some(*s) == v["step"].as_str()) + .unwrap_or(4), + terrain: terrain(v["terrain_adaptation"].as_str()), + }); + } + let index = |name: &str| defs.iter().position(|d| d.name == name); + let mut out = Vec::new(); + for (name, json) in sets { + let v: Value = serde_json::from_str(json)?; + let p = &v["placement"]; + let placement = match p["type"].as_str().unwrap_or_default() { + "minecraft:random_spread" => Placement::RandomSpread { + spacing: p["spacing"].as_i64().unwrap_or(1) as i32, + separation: p["separation"].as_i64().unwrap_or(0) as i32, + triangular: p["spread_type"].as_str() == Some("triangular"), + }, + "minecraft:concentric_rings" => Placement::ConcentricRings { + distance: p["distance"].as_i64().unwrap_or(0) as i32, + spread: p["spread"].as_i64().unwrap_or(0) as i32, + count: p["count"].as_i64().unwrap_or(0) as i32, + preferred: biome_set(&p["preferred_biomes"])?, + }, + _ => Placement::Unsupported, + }; + out.push(StructureSet { + name: name.clone(), + structures: v["structures"] + .as_array() + .into_iter() + .flatten() + .filter_map(|e| { + Some(( + index(e["structure"].as_str()?)?, + e["weight"].as_i64().unwrap_or(1) as i32, + )) + }) + .collect(), + placement, + salt: p["salt"].as_i64().unwrap_or(0) as i32, + frequency: p["frequency"].as_f64().unwrap_or(1.) as f32, + reduction: match p["frequency_reduction_method"].as_str() { + Some("legacy_type_1") => Reduction::Legacy1, + Some("legacy_type_2") => Reduction::Legacy2, + Some("legacy_type_3") => Reduction::Legacy3, + _ => Reduction::Default, + }, + exclusion: p.get("exclusion_zone").map(|z| { + ( + z["other_set"].as_str().unwrap_or_default().to_owned(), + z["chunk_count"].as_i64().unwrap_or(0) as i32, + ) + }), + }); + } + Ok(Self { + structures: defs, + sets: out, + pools: Pools::new(pools), + }) + } + /// ChunkGeneratorStructureState ring positions of the concentric-ring + /// sets among `possible_sets`. + pub fn ring_positions( + &self, + possible_sets: &[usize], + seed: i64, + biome: &mut dyn FnMut([i32; 3]) -> BiomeId, + ) -> Rings { + let mut rings = Rings::new(); + for &i in possible_sets { + let set = &self.sets[i]; + if let Placement::ConcentricRings { + distance, + spread, + count, + preferred, + } = &set.placement + { + let positions = super::stronghold::ring_positions( + seed, *distance, *spread, *count, preferred, biome, + ); + rings.insert(set.name.clone(), positions); + } + } + rings + } + /// RandomSpreadStructurePlacement.getPotentialStructureChunk et al. + pub fn is_structure_chunk( + &self, + set: &StructureSet, + seed: i64, + x: i32, + z: i32, + rings: &Rings, + ) -> bool { + let placed = match set.placement { + Placement::RandomSpread { + spacing, + separation, + triangular, + } => { + let (gx, gz) = (x.div_euclid(spacing), z.div_euclid(spacing)); + let mut random = WorldgenRandom::new(LegacyRandom::new(0)); + random.set_large_feature_with_salt(seed, gx, gz, set.salt); + let limit = spacing - separation; + let spread = |r: &mut WorldgenRandom<LegacyRandom>| { + if triangular { + (r.next_int_bound(limit).unwrap_or(0) + + r.next_int_bound(limit).unwrap_or(0)) + / 2 + } else { + r.next_int_bound(limit).unwrap_or(0) + } + }; + let sx = spread(&mut random); + let sz = spread(&mut random); + gx * spacing + sx == x && gz * spacing + sz == z + } + Placement::ConcentricRings { .. } => rings + .get(&set.name) + .is_some_and(|r| r.contains(&ChunkPos::new(x, z))), + Placement::Unsupported => false, + }; + if !placed { + return false; + } + if set.frequency < 1. && !reduce(set.reduction, seed, set.salt, x, z, set.frequency) { + return false; + } + match &set.exclusion { + Some((other, range)) => { + let Some(other) = self.sets.iter().find(|s| s.name == *other) else { + return true; + }; + for tx in x - range..=x + range { + for tz in z - range..=z + range { + if self.is_structure_chunk(other, seed, tx, tz, rings) { + return false; + } + } + } + true + } + None => true, + } + } +} +fn reduce(method: Reduction, seed: i64, salt: i32, x: i32, z: i32, probability: f32) -> bool { + let mut random = WorldgenRandom::new(LegacyRandom::new(0)); + match method { + Reduction::Default => { + random.set_large_feature_with_salt(seed, salt, x, z); + random.next_float() < probability + } + Reduction::Legacy1 => { + let (cx, cz) = (x >> 4, z >> 4); + random.set_seed(i64::from(cx ^ (cz << 4)) ^ seed); + random.next_int(); + random + .next_int_bound((1. / probability) as i32) + .unwrap_or(1) + == 0 + } + Reduction::Legacy2 => { + random.set_large_feature_with_salt(seed, x, z, 10_387_320); + random.next_float() < probability + } + Reduction::Legacy3 => { + random.set_large_feature_seed(seed, x, z); + random.next_double() < f64::from(probability) + } + } +} + +#[derive(Debug)] +pub enum Piece { + Pool(PoolPiece), + Legacy(Box<dyn LegacyPiece>), +} +impl Piece { + pub fn bounding_box(&self) -> BoundingBox { + match self { + Self::Pool(p) => p.bounding_box, + Self::Legacy(p) => p.bounding_box(), + } + } + pub fn type_name(&self) -> &'static str { + match self { + Self::Pool(_) => "minecraft:jigsaw", + Self::Legacy(p) => p.type_name(), + } + } +} +fn legacy(pieces: Vec<impl LegacyPiece + 'static>) -> Vec<Piece> { + pieces + .into_iter() + .map(|p| Piece::Legacy(Box::new(p))) + .collect() +} +/// Structure.onTopOfChunkCenter: the start position, or None when no valid +/// biome can exist in the chunk-center column. +fn top_of_chunk_center( + context: &mut impl StartContext, + chunk: ChunkPos, + kind: HeightmapType, +) -> Option<[i32; 3]> { + let (x, z) = (chunk.x * 16 + 8, chunk.z * 16 + 8); + let (min, max) = (context.min_y(), context.max_y()); + if !context.column_has_valid_biome(x, z, min - 1, max) { + return None; + } + Some([x, context.base_height(x, z, kind) - 1, z]) +} +fn first_occupied(context: &mut impl StartContext, x: i32, z: i32) -> i32 { + context.base_height(x, z, HeightmapType::WorldSurfaceWg) - 1 +} +fn corner_heights(context: &mut impl StartContext, x: i32, sx: i32, z: i32, sz: i32) -> [i32; 4] { + [ + first_occupied(context, x, z), + first_occupied(context, x, z + sz), + first_occupied(context, x + sx, z), + first_occupied(context, x + sx, z + sz), + ] +} +#[derive(Debug)] +pub struct StructureStart { + pub structure: usize, + pub name: String, + pub chunk: ChunkPos, + pub pieces: Vec<Piece>, + /// Piece union, inflated by 12 for terrain-adapting structures. + pub bounding_box: BoundingBox, +} + +/// Biome and height queries for one structure generation attempt. +pub trait StartContext: JigsawContext { + fn seed(&self) -> i64; + fn sea_level(&self) -> i32; + /// ChunkGenerator.getBaseColumn as heightmap opacity, indexed from min_y. + fn base_column(&mut self, x: i32, z: i32, kind: HeightmapType) -> Vec<bool>; + /// Biome.coldEnoughToSnow at a position. + fn cold_enough_to_snow(&mut self, biome: BiomeId, pos: [i32; 3]) -> bool; + fn generation(&self) -> WorldGenerationContext; + /// Noise biome at a quart position (caching resolver, no zoom). + fn noise_biome(&mut self, quart: [i32; 3]) -> BiomeId; + fn set_valid_biomes(&mut self, biomes: &BTreeSet<BiomeId>); +} + +/// ChunkGenerator.createStructures for one chunk: the starts it owns. +pub fn create_starts( + registry: &StructureRegistry, + resources: &StructureResources, + bindings: &FeatureBlockBindings<'_>, + context: &mut impl StartContext, + possible_sets: &[usize], + rings: &Rings, + chunk: ChunkPos, +) -> Vec<StructureStart> { + let seed = context.seed(); + let mut starts = Vec::new(); + for &set_index in possible_sets { + let set = ®istry.sets[set_index]; + if !registry.is_structure_chunk(set, seed, chunk.x, chunk.z, rings) { + continue; + } + if set.structures.len() == 1 { + if let Some(start) = try_generate( + registry, + resources, + bindings, + context, + set.structures[0].0, + chunk, + ) { + starts.push(start); + } + continue; + } + let mut options = set.structures.clone(); + let mut random = WorldgenRandom::new(LegacyRandom::new(0)); + random.set_large_feature_seed(seed, chunk.x, chunk.z); + let mut total: i32 = options.iter().map(|o| o.1).sum(); + while !options.is_empty() { + let mut choice = random.next_int_bound(total).unwrap_or(0); + let mut index = 0; + for option in &options { + choice -= option.1; + if choice < 0 { + break; + } + index += 1; + } + let selected = options[index]; + if let Some(start) = + try_generate(registry, resources, bindings, context, selected.0, chunk) + { + starts.push(start); + break; + } + options.remove(index); + total -= selected.1; + } + } + starts +} +fn try_generate( + registry: &StructureRegistry, + resources: &StructureResources, + bindings: &FeatureBlockBindings<'_>, + context: &mut impl StartContext, + structure: usize, + chunk: ChunkPos, +) -> Option<StructureStart> { + let def = ®istry.structures[structure]; + context.set_valid_biomes(&def.biomes); + let seed = context.seed(); + let mut random = WorldgenRandom::new(LegacyRandom::new(0)); + random.set_large_feature_seed(seed, chunk.x, chunk.z); + let (position, pieces) = match &def.kind { + StructureKind::Jigsaw(jigsaw) => { + let height = jigsaw + .start_height + .sample(&mut random, context.generation()) + .ok()?; + let start = [chunk.x * 16, height, chunk.z * 16]; + let aliases = resolve_aliases(&jigsaw.aliases, start, seed); + let config = JigsawConfig { + start_pool: &jigsaw.start_pool, + start_jigsaw: jigsaw.start_jigsaw.as_deref(), + max_depth: jigsaw.max_depth, + use_expansion_hack: jigsaw.use_expansion_hack, + project_to: jigsaw.project_to, + max_distance: jigsaw.max_distance, + aliases: &aliases, + padding: jigsaw.padding, + waterlogging: jigsaw.waterlogging, + }; + let (position, mut pieces) = assemble( + &config, + context, + ®istry.pools, + resources, + bindings, + &mut random, + start, + )?; + if jigsaw.max_depth <= 0 { + pieces.clear(); + } + ( + position, + pieces.into_iter().map(Piece::Pool).collect::<Vec<_>>(), + ) + } + StructureKind::BuriedTreasure => { + let stub = top_of_chunk_center(context, chunk, HeightmapType::OceanFloorWg)?; + let piece = super::simple::BuriedTreasurePiece { + position: [chunk.x * 16 + 9, 90, chunk.z * 16 + 9], + }; + (stub, legacy(vec![piece])) + } + StructureKind::Igloo => { + let stub = top_of_chunk_center(context, chunk, HeightmapType::WorldSurfaceWg)?; + let rotation = super::Rotation::random(&mut random); + let pieces = super::simple::igloo_pieces( + resources, + [chunk.x * 16, 90, chunk.z * 16], + rotation, + &mut random, + )?; + (stub, legacy(pieces)) + } + StructureKind::SwampHut => { + let stub = top_of_chunk_center(context, chunk, HeightmapType::WorldSurfaceWg)?; + let piece = super::simple::SwampHutPiece::new(&mut random, chunk.x * 16, chunk.z * 16); + (stub, legacy(vec![piece])) + } + StructureKind::DesertPyramid | StructureKind::JungleTemple => { + let desert = matches!(def.kind, StructureKind::DesertPyramid); + let (width, depth) = if desert { (21, 21) } else { (12, 15) }; + let (x, z) = (chunk.x * 16, chunk.z * 16); + if !context.column_has_valid_biome(x + 8, z + 8, context.min_y() - 1, context.max_y()) { + return None; + } + let lowest = corner_heights(context, x, width, z, depth) + .into_iter() + .min() + .unwrap_or(0); + if lowest < context.sea_level() { + return None; + } + let stub = [x + 8, first_occupied(context, x + 8, z + 8), z + 8]; + let piece: Box<dyn LegacyPiece> = if desert { + Box::new(super::temple::DesertPyramidPiece::new(&mut random, x, z)) + } else { + Box::new(super::temple::JungleTemplePiece::new(&mut random, x, z)) + }; + (stub, vec![Piece::Legacy(piece)]) + } + StructureKind::Monument(surrounding) => { + let (x, z) = (chunk.x * 16 + 9, chunk.z * 16 + 9); + let (y, r) = (context.sea_level(), 29); + for qz in (z - r) >> 2..=(z + r) >> 2 { + for qx in (x - r) >> 2..=(x + r) >> 2 { + for qy in (y - r) >> 2..=(y + r) >> 2 { + if !surrounding.contains(&context.noise_biome([qx, qy, qz])) { + return None; + } + } + } + } + let stub = top_of_chunk_center(context, chunk, HeightmapType::OceanFloorWg)?; + let direction = super::legacy::random_horizontal(&mut random); + let piece = super::monument::MonumentBuilding::new( + &mut random, + chunk.x * 16 - 29, + chunk.z * 16 - 29, + direction, + ); + (stub, legacy(vec![piece])) + } + StructureKind::Mansion => { + let (x, z) = (chunk.x * 16 + 7, chunk.z * 16 + 7); + if !context.column_has_valid_biome(x, z, context.min_y() - 1, context.max_y()) { + return None; + } + let rotation = super::Rotation::random(&mut random); + let (sx, sz) = match rotation { + super::Rotation::None => (5, 5), + super::Rotation::Clockwise90 => (-5, 5), + super::Rotation::Clockwise180 => (-5, -5), + super::Rotation::Counterclockwise90 => (5, -5), + }; + let y = corner_heights(context, x, sx, z, sz).into_iter().min().unwrap_or(0); + if y < 60 { + return None; + } + let start = [x, y, z]; + let pieces = super::mansion::pieces(resources, start, rotation, &mut random)?; + (start, legacy(pieces)) + } + StructureKind::RuinedPortal(setups) => { + let (position, piece) = super::ruined_portal::start( + context, + resources, + bindings, + &mut random, + chunk, + setups, + )?; + (position, legacy(vec![piece])) + } + StructureKind::Shipwreck { beached } => { + let kind = if *beached { + HeightmapType::WorldSurfaceWg + } else { + HeightmapType::OceanFloorWg + }; + let stub = top_of_chunk_center(context, chunk, kind)?; + let rotation = super::Rotation::random(&mut random); + let piece = super::simple::shipwreck_piece( + resources, + [chunk.x * 16, 90, chunk.z * 16], + rotation, + &mut random, + *beached, + )?; + if super::simple::shipwreck_too_big(&piece.template) { + let b = piece.bounding_box; + let [sx, _, sz] = b.span(); + let heights = corner_heights(context, b.min[0], sx, b.min[2], sz); + let height = if *beached { + let min = heights.into_iter().min().unwrap_or(0); + min - piece.template.size[1] / 2 - random.next_int_bound(3).unwrap_or(0) + } else { + heights.iter().sum::<i32>() / 4 + }; + *piece.state.lock().unwrap() = Some(height); + } + (stub, legacy(vec![piece])) + } + StructureKind::OceanRuin { + warm, + large, + cluster, + } => { + let stub = top_of_chunk_center(context, chunk, HeightmapType::OceanFloorWg)?; + let rotation = super::Rotation::random(&mut random); + let config = super::ocean_ruin::OceanRuinConfig { + warm: *warm, + large_probability: *large, + cluster_probability: *cluster, + }; + let pieces = super::ocean_ruin::pieces( + resources, + bindings, + [chunk.x * 16, 90, chunk.z * 16], + rotation, + &mut random, + &config, + )?; + (stub, legacy(pieces)) + } + StructureKind::Mineshaft { mesa, blocking } => { + let (sea, min) = (context.sea_level(), context.min_y()); + let (position, pieces) = super::mineshaft::generate( + &mut random, + [chunk.x, chunk.z], + *mesa, + blocking.clone(), + sea, + min, + &mut |x, z| context.base_height(x, z, HeightmapType::WorldSurfaceWg), + ); + (position, legacy(pieces)) + } + StructureKind::Stronghold => { + let (sea, min) = (context.sea_level(), context.min_y()); + let pieces = + super::stronghold::generate(&mut random, seed, [chunk.x, chunk.z], sea, min); + ([chunk.x * 16, 0, chunk.z * 16], legacy(pieces)) + } + StructureKind::Unsupported(_) => return None, + }; + let quart = position.map(|v| v >> 2); + if !def.biomes.contains(&context.noise_biome(quart)) || pieces.is_empty() { + return None; + } + let mut bounding_box = pieces[0].bounding_box(); + for piece in &pieces[1..] { + bounding_box.encapsulate(&piece.bounding_box()); + } + if def.terrain != TerrainAdjustment::None { + bounding_box = bounding_box.inflated(12, 12); + } + Some(StructureStart { + structure, + name: def.name.clone(), + chunk, + pieces, + bounding_box, + }) +} +/// PoolAliasLookup.create. +fn resolve_aliases(bindings: &[Value], position: [i32; 3], seed: i64) -> BTreeMap<String, String> { + let mut map = BTreeMap::new(); + if bindings.is_empty() { + return map; + } + let mut random = LegacyRandom::new(seed).fork_positional().at(BlockPos::new( + position[0], + position[1], + position[2], + )); + fn visit(binding: &Value, random: &mut LegacyRandom, map: &mut BTreeMap<String, String>) { + let weighted = |key: &str| -> Option<WeightedList<Value>> { + let raw: Box<RawValue> = serde_json::from_str(&binding[key].to_string()).ok()?; + WeightedList::decode(&raw, |v| Ok(serde_json::from_str::<Value>(v.get())?)).ok() + }; + match binding["type"].as_str().unwrap_or_default() { + "minecraft:direct" => { + map.insert( + binding["alias"].as_str().unwrap_or_default().to_owned(), + binding["target"].as_str().unwrap_or_default().to_owned(), + ); + } + "minecraft:random" => { + if let Some(target) = + weighted("targets").and_then(|w| w.sample(random).ok().cloned()) + { + map.insert( + binding["alias"].as_str().unwrap_or_default().to_owned(), + target.as_str().unwrap_or_default().to_owned(), + ); + } + } + "minecraft:random_group" => { + if let Some(group) = weighted("groups").and_then(|w| w.sample(random).ok().cloned()) + { + for b in group.as_array().into_iter().flatten() { + visit(b, random, map); + } + } + } + _ => {} + } + } + for binding in bindings { + visit(binding, &mut random, &mut map); + } + map +} + +/// Beardifier.forStructuresInChunk over the starts referencing a chunk. +pub fn beardifier( + registry: &StructureRegistry, + starts: &[Arc<StructureStart>], + chunk: ChunkPos, +) -> Option<Beardifier> { + let (bx, bz) = (chunk.x * 16, chunk.z * 16); + let mut rigids = Vec::new(); + let mut junctions = Vec::new(); + let mut any: Option<BoundingBox> = None; + let include = |b: BoundingBox, any: &mut Option<BoundingBox>| match any { + Some(a) => a.encapsulate(&b), + None => *any = Some(b), + }; + for start in starts { + let adjustment = registry.structures[start.structure].terrain; + if adjustment == TerrainAdjustment::None { + continue; + } + for piece in &start.pieces { + let b = piece.bounding_box(); + let near = b.max[0] >= bx - 12 + && b.min[0] <= bx + 15 + 12 + && b.max[2] >= bz - 12 + && b.min[2] <= bz + 15 + 12; + if !near { + continue; + } + let Piece::Pool(pool) = piece else { + rigids.push(RigidPiece { + bounds: StructureBounds::new(b.min, b.max)?, + adjustment, + ground_level_delta: 0, + }); + include(b, &mut any); + continue; + }; + if pool.element.projection() == Projection::Rigid { + rigids.push(RigidPiece { + bounds: StructureBounds::new(b.min, b.max)?, + adjustment, + ground_level_delta: pool.ground_level_delta, + }); + include(b, &mut any); + } + for j in &pool.junctions { + if j.source_x > bx - 12 + && j.source_z > bz - 12 + && j.source_x < bx + 15 + 12 + && j.source_z < bz + 15 + 12 + { + junctions.push(JigsawJunction { + source_x: j.source_x, + source_ground_y: j.source_ground_y, + source_z: j.source_z, + }); + let p = [j.source_x, j.source_ground_y, j.source_z]; + include(BoundingBox::new(p, p), &mut any); + } + } + } + } + let any = any?; + let affected = any.inflated(24, 24); + Some(Beardifier::new( + rigids, + junctions, + StructureBounds::new(affected.min, affected.max), + )) +} + +/// StructureStart.placeInChunk for pieces intersecting the chunk's writable box. +#[allow(clippy::too_many_arguments)] +pub fn place_in_chunk<W: FeatureWorld + PlacementContext, R: RandomSource + 'static>( + start: &StructureStart, + world: &mut W, + resources: &StructureResources, + random: &mut R, + chunk_box: BoundingBox, + place_feature: &mut PlaceFeature<'_, W, R>, +) -> Result<(), PlacementQueryError> { + let Some(first) = start.pieces.first() else { + return Ok(()); + }; + let center_box = first.bounding_box(); + let center = center_box.center(); + let reference = [center[0], center_box.min[1], center[2]]; + for piece in &start.pieces { + if piece.bounding_box().intersects(&chunk_box) { + match piece { + Piece::Pool(p) => { + p.place( + world, + resources, + random, + chunk_box, + reference, + place_feature, + )?; + } + Piece::Legacy(p) => { + let mut context = PieceContext { + world, + resources, + random, + chunk_box, + chunk: ChunkPos::new(chunk_box.min[0] >> 4, chunk_box.min[2] >> 4), + reference, + }; + p.post_process(&mut context)?; + } + } + } + } + if let Piece::Legacy(p) = first { + let boxes: Vec<BoundingBox> = start.pieces.iter().map(Piece::bounding_box).collect(); + let mut context = PieceContext { + world, + resources, + random, + chunk_box, + chunk: ChunkPos::new(chunk_box.min[0] >> 4, chunk_box.min[2] >> 4), + reference, + }; + p.after_place(&mut context, &boxes)?; + } + Ok(()) +} diff --git a/crates/horizon-world/src/worldgen/structure/stronghold.rs b/crates/horizon-world/src/worldgen/structure/stronghold.rs new file mode 100644 index 000000000..3c612c087 --- /dev/null +++ b/crates/horizon-world/src/worldgen/structure/stronghold.rs @@ -0,0 +1,1060 @@ +//! Strongholds: StrongholdStructure, StrongholdPieces and the concentric +//! ring positions of ChunkGeneratorStructureState. +use super::{ + BoundingBox, + legacy::{LegacyPiece, PieceContext, PieceFrame, Result, make_bounding_box, random_horizontal}, +}; +use crate::{registry::BlockStateId, worldgen::biome::BiomeId}; +use horizon_core::{ + geometry::Direction, + position::ChunkPos, + random::{LegacyRandom, RandomSource, WorldgenRandom}, +}; +use std::{collections::BTreeSet, f64::consts::PI, sync::Mutex}; + +/// ChunkGeneratorStructureState.generateRingPositions with +/// BiomeSource.findBiomeHorizontal (radius 112, step 1, not closest). +pub fn ring_positions( + seed: i64, + distance: i32, + spread: i32, + count: i32, + preferred: &BTreeSet<BiomeId>, + biome: &mut dyn FnMut([i32; 3]) -> BiomeId, +) -> Vec<ChunkPos> { + let mut random = LegacyRandom::new(seed); + let mut angle = random.next_double() * PI * 2.0; + let (mut in_circle, mut circle, mut spread) = (0, 0, spread); + let mut out = Vec::with_capacity(count.max(0) as usize); + for i in 0..count { + let dist = f64::from(4 * distance + distance * circle * 6) + + (random.next_double() - 0.5) * (f64::from(distance) * 2.5); + let round = |v: f64| (v + 0.5).floor() as i64 as i32; + let (x, z) = (round(angle.cos() * dist), round(angle.sin() * dist)); + let mut search = random.fork(); + let (cx, cz) = ((x * 16 + 8) >> 2, (z * 16 + 8) >> 2); + let mut found = 0; + let mut result = None; + for dz in -28..=28 { + for dx in -28..=28 { + if preferred.contains(&biome([cx + dx, 0, cz + dz])) { + if result.is_none() || search.next_int_bound(found + 1).unwrap_or(1) == 0 { + result = Some(((cx + dx) << 2, (cz + dz) << 2)); + } + found += 1; + } + } + } + out.push(match result { + Some((bx, bz)) => ChunkPos::new(bx >> 4, bz >> 4), + None => ChunkPos::new(x, z), + }); + angle += PI * 2.0 / f64::from(spread); + in_circle += 1; + if in_circle == spread { + circle += 1; + in_circle = 0; + spread += 2 * spread / (circle + 1); + spread = spread.min(count - i); + angle += random.next_double() * PI * 2.0; + } + } + out +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +enum Door { + Opening, + Wood, + Grates, + Iron, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +enum Kind { + Straight, + PrisonHall, + LeftTurn, + RightTurn, + RoomCrossing, + StraightStairsDown, + StairsDown, + FiveCrossing, + ChestCorridor, + Library, + PortalRoom, + Filler, + Start, +} +/// STRONGHOLD_PIECE_WEIGHTS: kind, weight, max place count. +const WEIGHTS: [(Kind, i32, i32); 11] = [ + (Kind::Straight, 40, 0), + (Kind::PrisonHall, 5, 5), + (Kind::LeftTurn, 20, 0), + (Kind::RightTurn, 20, 0), + (Kind::RoomCrossing, 10, 6), + (Kind::StraightStairsDown, 5, 5), + (Kind::StairsDown, 5, 5), + (Kind::FiveCrossing, 5, 4), + (Kind::ChestCorridor, 5, 4), + (Kind::Library, 10, 2), + (Kind::PortalRoom, 20, 1), +]; + +#[derive(Debug)] +pub struct StrongholdPiece { + kind: Kind, + frame: PieceFrame, + depth: i32, + door: Door, + /// Straight: left, right; FiveCrossing: leftLow, leftHigh, rightLow, + /// rightHigh; Library: tall. + flags: [bool; 4], + /// RoomCrossing type or FillerCorridor steps. + value: i32, + /// ChestCorridor chest / PortalRoom spawner placed. + placed: Mutex<bool>, +} + +fn int(r: &mut impl RandomSource, bound: i32) -> i32 { + r.next_int_bound(bound).unwrap_or(0) +} +/// BoundingBox.orientBox. +#[allow(clippy::too_many_arguments)] +fn orient_box( + [x, y, z]: [i32; 3], + [ox, oy, oz]: [i32; 3], + [w, h, d]: [i32; 3], + direction: Direction, +) -> BoundingBox { + match direction { + Direction::North => BoundingBox::new( + [x + ox, y + oy, z - d + 1 + oz], + [x + w - 1 + ox, y + h - 1 + oy, z + oz], + ), + Direction::West => BoundingBox::new( + [x - d + 1 + oz, y + oy, z + ox], + [x + oz, y + h - 1 + oy, z + w - 1 + ox], + ), + Direction::East => BoundingBox::new( + [x + oz, y + oy, z + ox], + [x + d - 1 + oz, y + h - 1 + oy, z + w - 1 + ox], + ), + _ => BoundingBox::new( + [x + ox, y + oy, z + oz], + [x + w - 1 + ox, y + h - 1 + oy, z + d - 1 + oz], + ), + } +} +fn random_door(r: &mut impl RandomSource) -> Door { + match int(r, 5) { + 2 => Door::Wood, + 3 => Door::Grates, + 4 => Door::Iron, + _ => Door::Opening, + } +} + +struct Builder { + pieces: Vec<StrongholdPiece>, + weights: Vec<(Kind, i32, i32, i32)>, + imposed: Option<Kind>, + previous: Option<Kind>, + pending: Vec<usize>, + portal: bool, +} +impl Builder { + fn collides(&self, b: &BoundingBox) -> bool { + self.pieces + .iter() + .any(|p| p.frame.bounding_box.intersects(b)) + } + fn piece(kind: Kind, b: BoundingBox, d: Direction, depth: i32) -> StrongholdPiece { + StrongholdPiece { + kind, + frame: PieceFrame::new(b, Some(d)), + depth, + door: Door::Opening, + flags: [false; 4], + value: 0, + placed: Mutex::new(false), + } + } + /// StrongholdPieces.findAndCreatePieceFactory. + fn create( + &self, + kind: Kind, + r: &mut impl RandomSource, + foot: [i32; 3], + d: Direction, + depth: i32, + ) -> Option<StrongholdPiece> { + let ok = |b: &BoundingBox| b.min[1] > 10 && !self.collides(b); + let (offset, size) = match kind { + Kind::Straight | Kind::ChestCorridor => ([-1, -1, 0], [5, 5, 7]), + Kind::PrisonHall => ([-1, -1, 0], [9, 5, 11]), + Kind::LeftTurn | Kind::RightTurn => ([-1, -1, 0], [5, 5, 5]), + Kind::RoomCrossing => ([-4, -1, 0], [11, 7, 11]), + Kind::StraightStairsDown => ([-1, -7, 0], [5, 11, 8]), + Kind::StairsDown => ([-1, -7, 0], [5, 11, 5]), + Kind::FiveCrossing => ([-4, -3, 0], [10, 9, 11]), + Kind::Library => ([-4, -1, 0], [14, 11, 15]), + Kind::PortalRoom => ([-4, -1, 0], [11, 8, 16]), + Kind::Filler | Kind::Start => return None, + }; + let mut b = orient_box(foot, offset, size, d); + if !ok(&b) { + if kind != Kind::Library { + return None; + } + b = orient_box(foot, offset, [14, 6, 15], d); + if !ok(&b) { + return None; + } + } + let mut piece = Self::piece(kind, b, d, depth); + if kind != Kind::PortalRoom { + piece.door = random_door(r); + } + match kind { + Kind::Straight => { + piece.flags[0] = int(r, 2) == 0; + piece.flags[1] = int(r, 2) == 0; + } + Kind::RoomCrossing => piece.value = int(r, 5), + Kind::FiveCrossing => { + piece.flags[0] = r.next_boolean(); + piece.flags[1] = r.next_boolean(); + piece.flags[2] = r.next_boolean(); + piece.flags[3] = int(r, 3) > 0; + } + Kind::Library => piece.flags[0] = b.span()[1] > 6, + _ => {} + } + Some(piece) + } + /// StrongholdPieces.generatePieceFromSmallDoor. + fn from_small_door( + &mut self, + r: &mut impl RandomSource, + foot: [i32; 3], + d: Direction, + depth: i32, + ) -> Option<StrongholdPiece> { + let any = self.weights.iter().any(|w| w.2 > 0 && w.3 < w.2); + let total: i32 = self.weights.iter().map(|w| w.1).sum(); + if !any { + return None; + } + if let Some(kind) = self.imposed.take() { + if let Some(piece) = self.create(kind, r, foot, d, depth) { + return Some(piece); + } + } + for _ in 0..5 { + let mut selection = int(r, total); + for i in 0..self.weights.len() { + let (kind, weight, max, count) = self.weights[i]; + selection -= weight; + if selection < 0 { + let allowed = (max == 0 || count < max) + && match kind { + Kind::Library => depth > 4, + Kind::PortalRoom => depth > 5, + _ => true, + }; + if !allowed || self.previous == Some(kind) { + break; + } + if let Some(piece) = self.create(kind, r, foot, d, depth) { + self.weights[i].3 += 1; + self.previous = Some(kind); + if max != 0 && count + 1 >= max { + self.weights.remove(i); + } + return Some(piece); + } + } + } + } + let b = orient_box(foot, [-1, -1, 0], [5, 5, 4], d); + let collision = self + .pieces + .iter() + .find(|p| p.frame.bounding_box.intersects(&b))? + .frame + .bounding_box; + if collision.min[1] != b.min[1] { + return None; + } + for length in [2, 1] { + if !collision.intersects(&orient_box(foot, [-1, -1, 0], [5, 5, length], d)) { + let b = orient_box(foot, [-1, -1, 0], [5, 5, length + 1], d); + if b.min[1] <= 1 { + return None; + } + let mut piece = Self::piece(Kind::Filler, b, d, depth); + piece.value = b.span()[if matches!(d, Direction::North | Direction::South) { + 2 + } else { + 0 + }]; + return Some(piece); + } + } + None + } + /// StrongholdPieces.generateAndAddPiece. + fn add(&mut self, r: &mut impl RandomSource, foot: [i32; 3], d: Direction, depth: i32) { + if depth > 50 { + return; + } + let start = self.pieces[0].frame.bounding_box; + if (foot[0] - start.min[0]).abs() > 112 || (foot[2] - start.min[2]).abs() > 112 { + return; + } + if let Some(piece) = self.from_small_door(r, foot, d, depth + 1) { + self.pieces.push(piece); + self.pending.push(self.pieces.len() - 1); + } + } + fn forward(&mut self, r: &mut impl RandomSource, i: usize, x_off: i32, y_off: i32) { + let p = &self.pieces[i]; + let (b, depth) = (p.frame.bounding_box, p.depth); + let Some(o) = p.frame.orientation else { return }; + let y = b.min[1] + y_off; + let foot = match o { + Direction::North => [b.min[0] + x_off, y, b.min[2] - 1], + Direction::South => [b.min[0] + x_off, y, b.max[2] + 1], + Direction::West => [b.min[0] - 1, y, b.min[2] + x_off], + Direction::East => [b.max[0] + 1, y, b.min[2] + x_off], + _ => return, + }; + self.add(r, foot, o, depth); + } + fn side(&mut self, r: &mut impl RandomSource, i: usize, right: bool, y_off: i32, z_off: i32) { + let p = &self.pieces[i]; + let (b, depth) = (p.frame.bounding_box, p.depth); + let Some(o) = p.frame.orientation else { return }; + let y = b.min[1] + y_off; + let (foot, d) = match (o, right) { + (Direction::North | Direction::South, false) => { + ([b.min[0] - 1, y, b.min[2] + z_off], Direction::West) + } + (Direction::North | Direction::South, true) => { + ([b.max[0] + 1, y, b.min[2] + z_off], Direction::East) + } + (Direction::West | Direction::East, false) => { + ([b.min[0] + z_off, y, b.min[2] - 1], Direction::North) + } + (Direction::West | Direction::East, true) => { + ([b.min[0] + z_off, y, b.max[2] + 1], Direction::South) + } + _ => return, + }; + self.add(r, foot, d, depth); + } + fn add_children(&mut self, r: &mut impl RandomSource, i: usize) { + let p = &self.pieces[i]; + let (kind, flags, o) = (p.kind, p.flags, p.frame.orientation); + let north_or_east = matches!(o, Some(Direction::North | Direction::East)); + match kind { + Kind::Start | Kind::StairsDown => { + if kind == Kind::Start { + self.imposed = Some(Kind::FiveCrossing); + } + self.forward(r, i, 1, 1); + } + Kind::ChestCorridor | Kind::PrisonHall | Kind::StraightStairsDown => { + self.forward(r, i, 1, 1) + } + Kind::Straight => { + self.forward(r, i, 1, 1); + if flags[0] { + self.side(r, i, false, 1, 2); + } + if flags[1] { + self.side(r, i, true, 1, 2); + } + } + Kind::FiveCrossing => { + let (a, b) = if matches!(o, Some(Direction::West | Direction::North)) { + (5, 3) + } else { + (3, 5) + }; + self.forward(r, i, 5, 1); + if flags[0] { + self.side(r, i, false, a, 1); + } + if flags[1] { + self.side(r, i, false, b, 7); + } + if flags[2] { + self.side(r, i, true, a, 1); + } + if flags[3] { + self.side(r, i, true, b, 7); + } + } + Kind::LeftTurn => self.side(r, i, !north_or_east, 1, 1), + Kind::RightTurn => self.side(r, i, north_or_east, 1, 1), + Kind::RoomCrossing => { + self.forward(r, i, 4, 1); + self.side(r, i, false, 1, 4); + self.side(r, i, true, 1, 4); + } + Kind::PortalRoom => self.portal = true, + Kind::Library | Kind::Filler => {} + } + } +} + +/// StrongholdStructure.generatePieces: retried with seed + tries until a +/// portal room is placed. +pub fn generate( + random: &mut WorldgenRandom<LegacyRandom>, + seed: i64, + chunk: [i32; 2], + sea_level: i32, + min_y: i32, +) -> Vec<StrongholdPiece> { + let mut tries = 0i64; + loop { + random.set_large_feature_seed(seed.wrapping_add(tries), chunk[0], chunk[1]); + tries += 1; + let d = random_horizontal(random); + let b = make_bounding_box(chunk[0] * 16 + 2, 64, chunk[1] * 16 + 2, d, 5, 11, 5); + let mut g = Builder { + pieces: vec![Builder::piece(Kind::Start, b, d, 0)], + weights: WEIGHTS.iter().map(|&(k, w, m)| (k, w, m, 0)).collect(), + imposed: None, + previous: None, + pending: Vec::new(), + portal: false, + }; + g.add_children(random, 0); + while !g.pending.is_empty() { + let index = int(random, g.pending.len() as i32) as usize; + let next = g.pending.remove(index); + g.add_children(random, next); + } + let mut all = g.pieces[0].frame.bounding_box; + for p in &g.pieces[1..] { + all.encapsulate(&p.frame.bounding_box); + } + let max = sea_level - 10; + let mut y1 = all.span()[1] + min_y + 1; + if y1 < max { + y1 += int(random, max - y1); + } + let dy = y1 - all.max[1]; + for p in &mut g.pieces { + p.frame.bounding_box = p.frame.bounding_box.moved([0, dy, 0]); + } + if g.portal { + return g.pieces; + } + } +} + +fn smooth(c: &mut PieceContext<'_>, edge: bool) -> BlockStateId { + if !edge { + return c.state("cave_air"); + } + let s = c.random.float(); + c.state(if s < 0.2 { + "cracked_stone_bricks" + } else if s < 0.5 { + "mossy_stone_bricks" + } else if s < 0.55 { + "infested_stone_bricks" + } else { + "stone_bricks" + }) +} +impl StrongholdPiece { + fn smooth_box( + &self, + c: &mut PieceContext<'_>, + a: [i32; 3], + b: [i32; 3], + skip_air: bool, + ) -> Result<()> { + self.frame + .generate_box_selector(c, a, b, skip_air, &mut |c, _, _, _, edge| smooth(c, edge)) + } + fn fill( + &self, + c: &mut PieceContext<'_>, + a: [i32; 3], + b: [i32; 3], + state: BlockStateId, + ) -> Result<()> { + self.frame.generate_box(c, a, b, state, state, false) + } + fn air(&self, c: &mut PieceContext<'_>, a: [i32; 3], b: [i32; 3]) -> Result<()> { + let air = c.state("cave_air"); + self.fill(c, a, b, air) + } + fn put( + &self, + c: &mut PieceContext<'_>, + state: BlockStateId, + x: i32, + y: i32, + z: i32, + ) -> Result<()> { + self.frame.place(c, state, x, y, z) + } + fn small_door( + &self, + c: &mut PieceContext<'_>, + door: Door, + x: i32, + y: i32, + z: i32, + ) -> Result<()> { + let bricks = c.state("stone_bricks"); + let frame = [(0, 0), (0, 1), (0, 2), (1, 2), (2, 2), (2, 1), (2, 0)]; + match door { + Door::Opening => self.air(c, [x, y, z], [x + 2, y + 2, z])?, + Door::Wood | Door::Iron => { + for (dx, dy) in frame { + self.put(c, bricks, x + dx, y + dy, z)?; + } + let block = if door == Door::Wood { + "oak_door" + } else { + "iron_door" + }; + self.put(c, c.state(block), x + 1, y, z)?; + self.put( + c, + c.state_with(block, &[("half", "upper")]), + x + 1, + y + 1, + z, + )?; + if door == Door::Iron { + self.put( + c, + c.state_with("stone_button", &[("facing", "north")]), + x + 2, + y + 1, + z + 1, + )?; + self.put( + c, + c.state_with("stone_button", &[("facing", "south")]), + x + 2, + y + 1, + z - 1, + )?; + } + } + Door::Grates => { + let air = c.state("cave_air"); + let west = c.state_with("iron_bars", &[("west", "true")]); + let east = c.state_with("iron_bars", &[("east", "true")]); + let both = c.state_with("iron_bars", &[("east", "true"), ("west", "true")]); + self.put(c, air, x + 1, y, z)?; + self.put(c, air, x + 1, y + 1, z)?; + self.put(c, west, x, y, z)?; + self.put(c, west, x, y + 1, z)?; + self.put(c, both, x, y + 2, z)?; + self.put(c, both, x + 1, y + 2, z)?; + self.put(c, both, x + 2, y + 2, z)?; + self.put(c, east, x + 2, y + 1, z)?; + self.put(c, east, x + 2, y, z)?; + } + } + Ok(()) + } + fn torch(c: &PieceContext<'_>, facing: &str) -> BlockStateId { + c.state_with("wall_torch", &[("facing", facing)]) + } + fn chest_corridor(&self, c: &mut PieceContext<'_>) -> Result<()> { + self.smooth_box(c, [0, 0, 0], [4, 4, 6], true)?; + self.small_door(c, self.door, 1, 1, 0)?; + self.small_door(c, Door::Opening, 1, 1, 6)?; + let bricks = c.state("stone_bricks"); + self.fill(c, [3, 1, 2], [3, 1, 4], bricks)?; + let slab = c.state("stone_brick_slab"); + for (x, y, z) in [ + (3, 1, 1), + (3, 1, 5), + (3, 2, 2), + (3, 2, 4), + (2, 1, 2), + (2, 1, 3), + (2, 1, 4), + ] { + self.put(c, slab, x, y, z)?; + } + if !*self.placed.lock().unwrap() && c.chunk_box.is_inside(self.frame.world_pos(3, 2, 3)) { + *self.placed.lock().unwrap() = true; + self.frame + .create_chest(c, 3, 2, 3, "minecraft:chests/stronghold_corridor")?; + } + Ok(()) + } + fn filler(&self, c: &mut PieceContext<'_>) -> Result<()> { + let bricks = c.state("stone_bricks"); + let air = c.state("cave_air"); + for i in 0..self.value { + for x in 0..=4 { + self.put(c, bricks, x, 0, i)?; + } + for y in 1..=3 { + self.put(c, bricks, 0, y, i)?; + for x in 1..=3 { + self.put(c, air, x, y, i)?; + } + self.put(c, bricks, 4, y, i)?; + } + for x in 0..=4 { + self.put(c, bricks, x, 4, i)?; + } + } + Ok(()) + } + fn five_crossing(&self, c: &mut PieceContext<'_>) -> Result<()> { + let [left_low, left_high, right_low, right_high] = self.flags; + self.smooth_box(c, [0, 0, 0], [9, 8, 10], true)?; + self.small_door(c, self.door, 4, 3, 0)?; + if left_low { + self.air(c, [0, 3, 1], [0, 5, 3])?; + } + if right_low { + self.air(c, [9, 3, 1], [9, 5, 3])?; + } + if left_high { + self.air(c, [0, 5, 7], [0, 7, 9])?; + } + if right_high { + self.air(c, [9, 5, 7], [9, 7, 9])?; + } + self.air(c, [5, 1, 10], [7, 3, 10])?; + self.smooth_box(c, [1, 2, 1], [8, 2, 6], false)?; + self.smooth_box(c, [4, 1, 5], [4, 4, 9], false)?; + self.smooth_box(c, [8, 1, 5], [8, 4, 9], false)?; + self.smooth_box(c, [1, 4, 7], [3, 4, 9], false)?; + self.smooth_box(c, [1, 3, 5], [3, 3, 6], false)?; + let slab = c.state("smooth_stone_slab"); + self.fill(c, [1, 3, 4], [3, 3, 4], slab)?; + self.fill(c, [1, 4, 6], [3, 4, 6], slab)?; + self.smooth_box(c, [5, 1, 7], [7, 1, 8], false)?; + self.fill(c, [5, 1, 9], [7, 1, 9], slab)?; + self.fill(c, [5, 2, 7], [7, 2, 7], slab)?; + self.fill(c, [4, 5, 7], [4, 5, 9], slab)?; + self.fill(c, [8, 5, 7], [8, 5, 9], slab)?; + let double = c.state_with("smooth_stone_slab", &[("type", "double")]); + self.fill(c, [5, 5, 7], [7, 5, 9], double)?; + self.put(c, Self::torch(c, "south"), 6, 5, 6) + } + fn turn(&self, c: &mut PieceContext<'_>, left: bool) -> Result<()> { + self.smooth_box(c, [0, 0, 0], [4, 4, 4], true)?; + self.small_door(c, self.door, 1, 1, 0)?; + let north_or_east = matches!( + self.frame.orientation, + Some(Direction::North | Direction::East) + ); + if north_or_east == left { + self.air(c, [0, 1, 1], [0, 3, 3]) + } else { + self.air(c, [4, 1, 1], [4, 3, 3]) + } + } + fn library(&self, c: &mut PieceContext<'_>) -> Result<()> { + let tall = self.flags[0]; + let height = if tall { 11 } else { 6 }; + self.smooth_box(c, [0, 0, 0], [13, height - 1, 14], true)?; + self.small_door(c, self.door, 4, 1, 0)?; + let web = c.state("cobweb"); + self.frame + .generate_maybe_box(c, 0.07, [2, 1, 1], [11, 4, 13], web, web, false, false)?; + let planks = c.state("oak_planks"); + let shelf = c.state("bookshelf"); + for d in 1..=13 { + let block = if (d - 1) % 4 == 0 { planks } else { shelf }; + self.fill(c, [1, 1, d], [1, 4, d], block)?; + self.fill(c, [12, 1, d], [12, 4, d], block)?; + if block == planks { + self.put(c, Self::torch(c, "east"), 2, 3, d)?; + self.put(c, Self::torch(c, "west"), 11, 3, d)?; + } + if tall { + self.fill(c, [1, 6, d], [1, 9, d], block)?; + self.fill(c, [12, 6, d], [12, 9, d], block)?; + } + } + for d in (3..12).step_by(2) { + self.fill(c, [3, 1, d], [4, 3, d], shelf)?; + self.fill(c, [6, 1, d], [7, 3, d], shelf)?; + self.fill(c, [9, 1, d], [10, 3, d], shelf)?; + } + if tall { + self.fill(c, [1, 5, 1], [3, 5, 13], planks)?; + self.fill(c, [10, 5, 1], [12, 5, 13], planks)?; + self.fill(c, [4, 5, 1], [9, 5, 2], planks)?; + self.fill(c, [4, 5, 12], [9, 5, 13], planks)?; + self.put(c, planks, 9, 5, 11)?; + self.put(c, planks, 8, 5, 11)?; + self.put(c, planks, 9, 5, 10)?; + let fence = |c: &PieceContext<'_>, sides: &[&str]| { + let props: Vec<(&str, &str)> = sides.iter().map(|s| (*s, "true")).collect(); + c.state_with("oak_fence", &props) + }; + let we = fence(c, &["west", "east"]); + let ns = fence(c, &["north", "south"]); + self.fill(c, [3, 6, 3], [3, 6, 11], ns)?; + self.fill(c, [10, 6, 3], [10, 6, 9], ns)?; + self.fill(c, [4, 6, 2], [9, 6, 2], we)?; + self.fill(c, [4, 6, 12], [7, 6, 12], we)?; + self.put(c, fence(c, &["north", "east"]), 3, 6, 2)?; + self.put(c, fence(c, &["south", "east"]), 3, 6, 12)?; + self.put(c, fence(c, &["north", "west"]), 10, 6, 2)?; + for i in 0..=2 { + self.put(c, fence(c, &["south", "west"]), 8 + i, 6, 12 - i)?; + if i != 2 { + self.put(c, fence(c, &["north", "east"]), 8 + i, 6, 11 - i)?; + } + } + let ladder = c.state_with("ladder", &[("facing", "south")]); + for y in 1..=7 { + self.put(c, ladder, 10, y, 13)?; + } + let e = fence(c, &["east"]); + let w = fence(c, &["west"]); + self.put(c, e, 6, 9, 7)?; + self.put(c, w, 7, 9, 7)?; + self.put(c, e, 6, 8, 7)?; + self.put(c, w, 7, 8, 7)?; + let all = fence(c, &["north", "south", "west", "east"]); + self.put(c, all, 6, 7, 7)?; + self.put(c, all, 7, 7, 7)?; + self.put(c, e, 5, 7, 7)?; + self.put(c, w, 8, 7, 7)?; + self.put(c, fence(c, &["east", "north"]), 6, 7, 6)?; + self.put(c, fence(c, &["east", "south"]), 6, 7, 8)?; + self.put(c, fence(c, &["west", "north"]), 7, 7, 6)?; + self.put(c, fence(c, &["west", "south"]), 7, 7, 8)?; + let torch = c.state("torch"); + for (x, z) in [(5, 7), (8, 7), (6, 6), (6, 8), (7, 6), (7, 8)] { + self.put(c, torch, x, 8, z)?; + } + } + self.frame + .create_chest(c, 3, 3, 5, "minecraft:chests/stronghold_library")?; + if tall { + self.put(c, c.state("cave_air"), 12, 9, 1)?; + self.frame + .create_chest(c, 12, 8, 1, "minecraft:chests/stronghold_library")?; + } + Ok(()) + } + fn portal_room(&self, c: &mut PieceContext<'_>) -> Result<()> { + self.smooth_box(c, [0, 0, 0], [10, 7, 15], false)?; + self.small_door(c, Door::Grates, 4, 1, 0)?; + for (a, b) in [ + ([1, 6, 1], [1, 6, 14]), + ([9, 6, 1], [9, 6, 14]), + ([2, 6, 1], [8, 6, 2]), + ([2, 6, 14], [8, 6, 14]), + ([1, 1, 1], [2, 1, 4]), + ([8, 1, 1], [9, 1, 4]), + ] { + self.smooth_box(c, a, b, false)?; + } + let lava = c.state("lava"); + self.fill(c, [1, 1, 1], [1, 1, 3], lava)?; + self.fill(c, [9, 1, 1], [9, 1, 3], lava)?; + self.smooth_box(c, [3, 1, 8], [7, 1, 12], false)?; + self.fill(c, [4, 1, 9], [6, 1, 11], lava)?; + let ns = c.state_with("iron_bars", &[("north", "true"), ("south", "true")]); + let we = c.state_with("iron_bars", &[("west", "true"), ("east", "true")]); + for z in (3..14).step_by(2) { + self.fill(c, [0, 3, z], [0, 4, z], ns)?; + self.fill(c, [10, 3, z], [10, 4, z], ns)?; + } + for x in (2..9).step_by(2) { + self.fill(c, [x, 3, 15], [x, 4, 15], we)?; + } + let stairs = c.state_with("stone_brick_stairs", &[("facing", "north")]); + self.smooth_box(c, [4, 1, 5], [6, 1, 7], false)?; + self.smooth_box(c, [4, 2, 6], [6, 2, 7], false)?; + self.smooth_box(c, [4, 3, 7], [6, 3, 7], false)?; + for x in 4..=6 { + self.put(c, stairs, x, 1, 4)?; + self.put(c, stairs, x, 2, 5)?; + self.put(c, stairs, x, 3, 6)?; + } + let mut eyes = [false; 12]; + for e in &mut eyes { + *e = c.random.float() > 0.9; + } + let frames = [ + ("north", 4, 8), + ("north", 5, 8), + ("north", 6, 8), + ("south", 4, 12), + ("south", 5, 12), + ("south", 6, 12), + ("east", 3, 9), + ("east", 3, 10), + ("east", 3, 11), + ("west", 7, 9), + ("west", 7, 10), + ("west", 7, 11), + ]; + for (i, (facing, x, z)) in frames.into_iter().enumerate() { + let eye = if eyes[i] { "true" } else { "false" }; + let state = c.state_with("end_portal_frame", &[("facing", facing), ("eye", eye)]); + self.put(c, state, x, 3, z)?; + } + if eyes.iter().all(|e| *e) { + let portal = c.state("end_portal"); + for z in 9..=11 { + for x in 4..=6 { + self.put(c, portal, x, 3, z)?; + } + } + } + if !*self.placed.lock().unwrap() { + let pos = self.frame.world_pos(5, 3, 6); + if c.chunk_box.is_inside(pos) { + *self.placed.lock().unwrap() = true; + c.spawner(pos, "minecraft:silverfish")?; + } + } + Ok(()) + } + fn prison_hall(&self, c: &mut PieceContext<'_>) -> Result<()> { + self.smooth_box(c, [0, 0, 0], [8, 4, 10], true)?; + self.small_door(c, self.door, 1, 1, 0)?; + self.air(c, [1, 1, 10], [3, 3, 10])?; + for z in [1, 3, 7, 9] { + self.smooth_box(c, [4, 1, z], [4, 3, z], false)?; + } + let ns = c.state_with("iron_bars", &[("north", "true"), ("south", "true")]); + let nse = c.state_with( + "iron_bars", + &[("north", "true"), ("south", "true"), ("east", "true")], + ); + let we = c.state_with("iron_bars", &[("west", "true"), ("east", "true")]); + for y in 1..=3 { + self.put(c, ns, 4, y, 4)?; + self.put(c, nse, 4, y, 5)?; + self.put(c, ns, 4, y, 6)?; + self.put(c, we, 5, y, 5)?; + self.put(c, we, 6, y, 5)?; + self.put(c, we, 7, y, 5)?; + } + self.put(c, ns, 4, 3, 2)?; + self.put(c, ns, 4, 3, 8)?; + let bottom = c.state_with("iron_door", &[("facing", "west")]); + let top = c.state_with("iron_door", &[("facing", "west"), ("half", "upper")]); + for z in [2, 8] { + self.put(c, bottom, 4, 1, z)?; + self.put(c, top, 4, 2, z)?; + } + Ok(()) + } + fn room_crossing(&self, c: &mut PieceContext<'_>) -> Result<()> { + self.smooth_box(c, [0, 0, 0], [10, 6, 10], true)?; + self.small_door(c, self.door, 4, 1, 0)?; + self.air(c, [4, 1, 10], [6, 3, 10])?; + self.air(c, [0, 1, 4], [0, 3, 6])?; + self.air(c, [10, 1, 4], [10, 3, 6])?; + let bricks = c.state("stone_bricks"); + match self.value { + 0 => { + for y in 1..=3 { + self.put(c, bricks, 5, y, 5)?; + } + self.put(c, Self::torch(c, "west"), 4, 3, 5)?; + self.put(c, Self::torch(c, "east"), 6, 3, 5)?; + self.put(c, Self::torch(c, "south"), 5, 3, 4)?; + self.put(c, Self::torch(c, "north"), 5, 3, 6)?; + let slab = c.state("smooth_stone_slab"); + for (x, z) in [ + (4, 4), + (4, 5), + (4, 6), + (6, 4), + (6, 5), + (6, 6), + (5, 4), + (5, 6), + ] { + self.put(c, slab, x, 1, z)?; + } + } + 1 => { + for i in 0..5 { + self.put(c, bricks, 3, 1, 3 + i)?; + self.put(c, bricks, 7, 1, 3 + i)?; + self.put(c, bricks, 3 + i, 1, 3)?; + self.put(c, bricks, 3 + i, 1, 7)?; + } + for y in 1..=3 { + self.put(c, bricks, 5, y, 5)?; + } + self.put(c, c.state("water"), 5, 4, 5)?; + } + 2 => { + let cobble = c.state("cobblestone"); + for z in 1..=9 { + self.put(c, cobble, 1, 3, z)?; + self.put(c, cobble, 9, 3, z)?; + } + for x in 1..=9 { + self.put(c, cobble, x, 3, 1)?; + self.put(c, cobble, x, 3, 9)?; + } + for (x, y, z) in [ + (5, 1, 4), + (5, 1, 6), + (5, 3, 4), + (5, 3, 6), + (4, 1, 5), + (6, 1, 5), + (4, 3, 5), + (6, 3, 5), + ] { + self.put(c, cobble, x, y, z)?; + } + for y in 1..=3 { + self.put(c, cobble, 4, y, 4)?; + self.put(c, cobble, 6, y, 4)?; + self.put(c, cobble, 4, y, 6)?; + self.put(c, cobble, 6, y, 6)?; + } + self.put(c, c.state("wall_torch"), 5, 3, 5)?; + let planks = c.state("oak_planks"); + for z in 2..=8 { + self.put(c, planks, 2, 3, z)?; + self.put(c, planks, 3, 3, z)?; + if z <= 3 || z >= 7 { + self.put(c, planks, 4, 3, z)?; + self.put(c, planks, 5, 3, z)?; + self.put(c, planks, 6, 3, z)?; + } + self.put(c, planks, 7, 3, z)?; + self.put(c, planks, 8, 3, z)?; + } + let ladder = c.state_with("ladder", &[("facing", "west")]); + for y in 1..=3 { + self.put(c, ladder, 9, y, 3)?; + } + self.frame + .create_chest(c, 3, 4, 8, "minecraft:chests/stronghold_crossing")?; + } + _ => {} + } + Ok(()) + } + fn stairs_down(&self, c: &mut PieceContext<'_>) -> Result<()> { + self.smooth_box(c, [0, 0, 0], [4, 10, 4], true)?; + self.small_door(c, self.door, 1, 7, 0)?; + self.small_door(c, Door::Opening, 1, 1, 4)?; + let bricks = c.state("stone_bricks"); + let slab = c.state("smooth_stone_slab"); + for (state, x, y, z) in [ + (bricks, 2, 6, 1), + (bricks, 1, 5, 1), + (slab, 1, 6, 1), + (bricks, 1, 5, 2), + (bricks, 1, 4, 3), + (slab, 1, 5, 3), + (bricks, 2, 4, 3), + (bricks, 3, 3, 3), + (slab, 3, 4, 3), + (bricks, 3, 3, 2), + (bricks, 3, 2, 1), + (slab, 3, 3, 1), + (bricks, 2, 2, 1), + (bricks, 1, 1, 1), + (slab, 1, 2, 1), + (bricks, 1, 1, 2), + (slab, 1, 1, 3), + ] { + self.put(c, state, x, y, z)?; + } + Ok(()) + } + fn straight(&self, c: &mut PieceContext<'_>) -> Result<()> { + self.smooth_box(c, [0, 0, 0], [4, 4, 6], true)?; + self.small_door(c, self.door, 1, 1, 0)?; + self.small_door(c, Door::Opening, 1, 1, 6)?; + let east = Self::torch(c, "east"); + let west = Self::torch(c, "west"); + self.frame.maybe_block(c, 0.1, 1, 2, 1, east)?; + self.frame.maybe_block(c, 0.1, 3, 2, 1, west)?; + self.frame.maybe_block(c, 0.1, 1, 2, 5, east)?; + self.frame.maybe_block(c, 0.1, 3, 2, 5, west)?; + if self.flags[0] { + self.air(c, [0, 1, 2], [0, 3, 4])?; + } + if self.flags[1] { + self.air(c, [4, 1, 2], [4, 3, 4])?; + } + Ok(()) + } + fn straight_stairs_down(&self, c: &mut PieceContext<'_>) -> Result<()> { + self.smooth_box(c, [0, 0, 0], [4, 10, 7], true)?; + self.small_door(c, self.door, 1, 7, 0)?; + self.small_door(c, Door::Opening, 1, 1, 7)?; + let stairs = c.state_with("cobblestone_stairs", &[("facing", "south")]); + let bricks = c.state("stone_bricks"); + for i in 0..6 { + for x in 1..=3 { + self.put(c, stairs, x, 6 - i, 1 + i)?; + } + if i < 5 { + for x in 1..=3 { + self.put(c, bricks, x, 5 - i, 1 + i)?; + } + } + } + Ok(()) + } +} +impl LegacyPiece for StrongholdPiece { + fn bounding_box(&self) -> BoundingBox { + self.frame.bounding_box + } + fn type_name(&self) -> &'static str { + match self.kind { + Kind::Straight => "minecraft:shs", + Kind::PrisonHall => "minecraft:shph", + Kind::LeftTurn => "minecraft:shlt", + Kind::RightTurn => "minecraft:shrt", + Kind::RoomCrossing => "minecraft:shrc", + Kind::StraightStairsDown => "minecraft:shssd", + Kind::StairsDown => "minecraft:shsd", + Kind::FiveCrossing => "minecraft:sh5c", + Kind::ChestCorridor => "minecraft:shcc", + Kind::Library => "minecraft:shli", + Kind::PortalRoom => "minecraft:shpr", + Kind::Filler => "minecraft:shfc", + Kind::Start => "minecraft:shstart", + } + } + fn post_process(&self, c: &mut PieceContext<'_>) -> Result<()> { + match self.kind { + Kind::Straight => self.straight(c), + Kind::PrisonHall => self.prison_hall(c), + Kind::LeftTurn => self.turn(c, true), + Kind::RightTurn => self.turn(c, false), + Kind::RoomCrossing => self.room_crossing(c), + Kind::StraightStairsDown => self.straight_stairs_down(c), + Kind::StairsDown | Kind::Start => self.stairs_down(c), + Kind::FiveCrossing => self.five_crossing(c), + Kind::ChestCorridor => self.chest_corridor(c), + Kind::Library => self.library(c), + Kind::PortalRoom => self.portal_room(c), + Kind::Filler => self.filler(c), + } + } +} diff --git a/crates/horizon-world/src/worldgen/structure/template.rs b/crates/horizon-world/src/worldgen/structure/template.rs new file mode 100644 index 000000000..c4e9b4f9f --- /dev/null +++ b/crates/horizon-world/src/worldgen/structure/template.rs @@ -0,0 +1,312 @@ +//! StructureTemplate: NBT loading, palettes, transforms and bounding boxes. +use super::{BoundingBox, Mirror, Rotation, StateTransforms}; +use crate::{ + chunk::BlockState, + nbt::{Compound, Tag}, + registry::{BlockRegistry, BlockStateId}, +}; +use std::sync::OnceLock; + +#[derive(Clone, Debug, PartialEq)] +pub struct BlockInfo { + pub pos: [i32; 3], + pub state: BlockStateId, + pub nbt: Option<Compound>, +} +#[derive(Clone, Debug)] +pub struct JigsawInfo { + pub info: BlockInfo, + pub rollable: bool, + pub name: String, + pub pool: String, + pub target: String, + pub placement_priority: i32, + pub selection_priority: i32, +} +#[derive(Debug)] +pub struct Palette { + blocks: Vec<BlockInfo>, + jigsaws: OnceLock<Vec<JigsawInfo>>, +} +impl Palette { + pub fn blocks(&self) -> &[BlockInfo] { + &self.blocks + } +} +#[derive(Debug)] +pub struct StructureTemplate { + pub size: [i32; 3], + palettes: Vec<Palette>, +} + +fn int_list(tag: Option<&Tag>) -> [i32; 3] { + let mut out = [0; 3]; + if let Some(Tag::List(values)) = tag { + for (slot, value) in out.iter_mut().zip(values) { + if let Tag::Int(v) = value { + *slot = *v; + } + } + } + out +} +fn string(tag: Option<&Tag>) -> Option<String> { + match tag { + Some(Tag::String(s)) => Some(s.to_string_lossy()), + _ => None, + } +} +fn get<'a>(compound: &'a Compound, key: &str) -> Option<&'a Tag> { + compound.get(&crate::nbt::JavaString::from(key)) +} +/// NbtUtils.readBlockState: unknown blocks read as air; missing or invalid +/// properties keep the block's defaults. +pub(super) fn read_state(registry: &BlockRegistry, tag: &Tag) -> BlockStateId { + let air = registry.default_state("minecraft:air").expect("air"); + let Tag::Compound(compound) = tag else { + return air; + }; + // 26.3 writes `id`/`properties`; older templates use `Name`/`Properties`. + let Some(name) = string(get(compound, "id")).or_else(|| string(get(compound, "Name"))) else { + return air; + }; + let Some(default) = registry.default_state(&name) else { + return air; + }; + let mut state = registry.state(default).unwrap().clone(); + if let Some(Tag::Compound(properties)) = + get(compound, "properties").or_else(|| get(compound, "Properties")) + { + for (key, value) in properties { + let (Tag::String(value), key) = (value, key.to_string_lossy()) else { + continue; + }; + let value = value.to_string_lossy(); + if let Some(slot) = state.properties.get_mut(&key) { + let previous = std::mem::replace(slot, value); + if registry.id(&state).is_none() { + *state.properties.get_mut(&key).unwrap() = previous; + } + } + } + } + registry.id(&state).unwrap_or(default) +} +/// Parse `name[key=value,...]` (BlockStateParser without NBT); None if invalid. +pub(super) fn parse_state_string(registry: &BlockRegistry, text: &str) -> Option<BlockStateId> { + let text = text.split('{').next().unwrap_or(text).trim(); + let (name, properties) = match text.split_once('[') { + Some((name, rest)) => (name, rest.strip_suffix(']')?), + None => (text, ""), + }; + let name = if name.contains(':') { + name.to_owned() + } else { + format!("minecraft:{name}") + }; + let mut descriptor = BlockState { + name, + properties: Default::default(), + }; + for pair in properties.split(',').filter(|p| !p.trim().is_empty()) { + let (k, v) = pair.split_once('=')?; + descriptor + .properties + .insert(k.trim().to_owned(), v.trim().to_owned()); + } + registry.resolve(&descriptor).ok() +} + +impl StructureTemplate { + /// A new, never-loaded template: zero size and no palettes. + pub fn empty() -> Self { + Self { + size: [0; 3], + palettes: Vec::new(), + } + } + /// StructureTemplate.load. Blocks are ordered as vanilla orders them: + /// full collision blocks, then other blocks, then block entities, each + /// sorted by Y, X, Z. + pub fn from_nbt(tag: &Tag, registry: &BlockRegistry, transforms: &StateTransforms) -> Self { + let empty = Compound::new(); + let root = match tag { + Tag::Compound(c) => c, + _ => &empty, + }; + let size = int_list(get(root, "size")); + let blocks = match get(root, "blocks") { + Some(Tag::List(list)) => list.as_slice(), + _ => &[], + }; + let mut palettes = Vec::new(); + let mut load = |palette: &[Tag]| { + let states: Vec<BlockStateId> = + palette.iter().map(|t| read_state(registry, t)).collect(); + let air = registry.default_state("minecraft:air").unwrap(); + let mut lists: [Vec<BlockInfo>; 3] = Default::default(); + for block in blocks { + let Tag::Compound(block) = block else { + continue; + }; + let index = match get(block, "state") { + Some(Tag::Int(i)) => *i, + _ => 0, + }; + let state = usize::try_from(index) + .ok() + .and_then(|i| states.get(i)) + .copied() + .unwrap_or(air); + let nbt = match get(block, "nbt") { + Some(Tag::Compound(c)) => Some(c.clone()), + _ => None, + }; + let class = if nbt.is_some() { + 2 + } else if transforms.full_block(state) { + 0 + } else { + 1 + }; + lists[class].push(BlockInfo { + pos: int_list(get(block, "pos")), + state, + nbt, + }); + } + let mut result = Vec::with_capacity(blocks.len()); + for mut list in lists { + list.sort_by_key(|b| (b.pos[1], b.pos[0], b.pos[2])); + result.extend(list); + } + palettes.push(Palette { + blocks: result, + jigsaws: OnceLock::new(), + }); + }; + match get(root, "palettes") { + Some(Tag::List(lists)) => { + for list in lists { + match list { + Tag::List(p) => load(p), + _ => load(&[]), + } + } + } + _ => match get(root, "palette") { + Some(Tag::List(p)) => load(p), + _ => load(&[]), + }, + } + Self { size, palettes } + } + pub fn palettes(&self) -> &[Palette] { + &self.palettes + } + pub fn size(&self, rotation: Rotation) -> [i32; 3] { + match rotation { + Rotation::Clockwise90 | Rotation::Counterclockwise90 => { + [self.size[2], self.size[1], self.size[0]] + } + _ => self.size, + } + } + pub fn transform( + pos: [i32; 3], + mirror: Mirror, + rotation: Rotation, + pivot: [i32; 3], + ) -> [i32; 3] { + let [mut x, y, mut z] = pos; + match mirror { + Mirror::LeftRight => z = z.wrapping_neg(), + Mirror::FrontBack => x = x.wrapping_neg(), + Mirror::None => {} + } + let (px, pz) = (pivot[0], pivot[2]); + match rotation { + Rotation::Counterclockwise90 => [px - pz + z, y, px + pz - x], + Rotation::Clockwise90 => [px + pz - z, y, pz - px + x], + Rotation::Clockwise180 => [px + px - x, y, pz + pz - z], + Rotation::None => [x, y, z], + } + } + pub fn zero_position_with_transform( + zero: [i32; 3], + mirror: Mirror, + rotation: Rotation, + size_x: i32, + size_z: i32, + ) -> [i32; 3] { + let (sx, sz) = (size_x - 1, size_z - 1); + let mx = if mirror == Mirror::FrontBack { sx } else { 0 }; + let mz = if mirror == Mirror::LeftRight { sz } else { 0 }; + let d = match rotation { + Rotation::Counterclockwise90 => [mz, 0, sx - mx], + Rotation::Clockwise90 => [sz - mz, 0, mx], + Rotation::Clockwise180 => [sx - mx, 0, sz - mz], + Rotation::None => [mx, 0, mz], + }; + [zero[0] + d[0], zero[1], zero[2] + d[2]] + } + pub fn bounding_box( + &self, + position: [i32; 3], + rotation: Rotation, + pivot: [i32; 3], + mirror: Mirror, + ) -> BoundingBox { + let delta = [self.size[0] - 1, self.size[1] - 1, self.size[2] - 1]; + let a = Self::transform([0; 3], mirror, rotation, pivot); + let b = Self::transform(delta, mirror, rotation, pivot); + BoundingBox::from_corners(a, b).moved(position) + } + /// The palette selected by StructurePlaceSettings.getRandomPalette. + pub fn palette_index(&self, random: &mut impl horizon_core::random::RandomSource) -> usize { + random + .next_int_bound(self.palettes.len().max(1) as i32) + .unwrap_or(0) as usize + } + /// Jigsaw blocks of a palette, parsed from their block-entity data. + pub fn jigsaws( + &self, + palette: usize, + jigsaw_states: &dyn Fn(BlockStateId) -> Option<bool>, + ) -> &[JigsawInfo] { + let Some(palette) = self.palettes.get(palette) else { + return &[]; + }; + palette.jigsaws.get_or_init(|| { + palette + .blocks + .iter() + .filter_map(|info| { + let horizontal = jigsaw_states(info.state)?; + let nbt = info.nbt.clone().unwrap_or_default(); + let joint = string(get(&nbt, "joint")); + let text = |key: &str, default: &str| { + string(get(&nbt, key)).unwrap_or_else(|| default.to_owned()) + }; + let int = |key: &str| match get(&nbt, key) { + Some(Tag::Int(v)) => *v, + _ => 0, + }; + Some(JigsawInfo { + rollable: match joint.as_deref() { + Some("rollable") => true, + Some("aligned") => false, + _ => !horizontal, + }, + name: text("name", "minecraft:empty"), + pool: text("pool", "minecraft:empty"), + target: text("target", "minecraft:empty"), + placement_priority: int("placement_priority"), + selection_priority: int("selection_priority"), + info: info.clone(), + }) + }) + .collect() + }) + } +} diff --git a/crates/horizon-world/src/worldgen/structure/temple.rs b/crates/horizon-world/src/worldgen/structure/temple.rs new file mode 100644 index 000000000..8bf9ebe95 --- /dev/null +++ b/crates/horizon-world/src/worldgen/structure/temple.rs @@ -0,0 +1,572 @@ +//! Desert pyramids and jungle temples (DesertPyramidPiece, JungleTemplePiece). +use super::{ + BoundingBox, + legacy::{HORIZONTAL, LegacyPiece, PieceContext, Result, random_horizontal}, + simple::Scattered, +}; +use crate::nbt::{Compound, Tag}; +use horizon_core::{ + geometry::Direction, + position::BlockPos, + random::{LegacyRandom, PositionalRandom, RandomSource}, +}; +use std::sync::Mutex; + +#[derive(Debug)] +pub struct DesertPyramidPiece { + pub base: Scattered, + placed_chest: Mutex<[bool; 4]>, +} +impl DesertPyramidPiece { + pub fn new(random: &mut impl RandomSource, west: i32, north: i32) -> Self { + let direction = random_horizontal(random); + Self { + base: Scattered::new(west, 64, north, 21, 15, 21, direction), + placed_chest: Mutex::new([false; 4]), + } + } + /// getPotentialSuspiciousSandWorldPositions, in placement order. + fn sand_positions(&self) -> Vec<[i32; 3]> { + let f = self.base.frame(); + let (x, y, z) = (16, -4, 13); + let mut out = Vec::new(); + for py in y + 1..=y + 3 { + for px in x - 2..=x + 2 { + for pz in z - 2..=z + 2 { + out.push(f.world_pos(px, py, pz)); + } + } + } + for [px, pz] in [[x + 3, z], [x - 3, z], [x, z + 3], [x, z - 3]] { + out.push(f.world_pos(px, y + 1, pz)); + out.push(f.world_pos(px, y + 2, pz)); + } + out + } + fn collapsed_roof(&self, seed: i64) -> [i32; 3] { + let f = self.base.frame(); + let [x0, y0, z0] = f.world_pos(14, 0, 11); + let mut random = LegacyRandom::new(seed) + .fork_positional() + .at(BlockPos::new(x0, y0, z0)); + let rx = 14 + random.next_int_bound(5).unwrap_or(0); + let rz = 11 + random.next_int_bound(5).unwrap_or(0); + f.world_pos(rx, 0, rz) + } +} +pub fn union(boxes: &[BoundingBox]) -> BoundingBox { + let mut out = boxes[0]; + for b in &boxes[1..] { + out.encapsulate(b); + } + out +} +fn suspicious_sand(c: &mut PieceContext<'_>, pos: [i32; 3]) -> Result<()> { + if c.chunk_box.is_inside(pos) { + c.world.set(pos, c.state("suspicious_sand"), 2)?; + let mut nbt = Compound::new(); + nbt.insert("id".into(), Tag::String("minecraft:brushable_block".into())); + nbt.insert( + "LootTable".into(), + Tag::String("minecraft:archaeology/desert_pyramid".into()), + ); + nbt.insert( + "LootTableSeed".into(), + Tag::Long(BlockPos::new(pos[0], pos[1], pos[2]).pack()), + ); + c.world.block_entity(pos, nbt)?; + } + Ok(()) +} +impl LegacyPiece for DesertPyramidPiece { + fn bounding_box(&self) -> BoundingBox { + self.base.frame().bounding_box + } + fn type_name(&self) -> &'static str { + "minecraft:tedp" + } + fn post_process(&self, c: &mut PieceContext<'_>) -> Result<()> { + let offset = -c.random.int(3); + if !self.base.lowest_ground(c, offset)? { + return Ok(()); + } + let f = self.base.frame(); + let (w, d) = (21, 21); + let sandstone = c.state("sandstone"); + let cut = c.state("cut_sandstone"); + let chiseled = c.state("chiseled_sandstone"); + let air = c.state("air"); + let orange = c.state("orange_terracotta"); + let blue = c.state("blue_terracotta"); + let stairs = |c: &PieceContext<'_>, facing: &str| { + c.state_with("sandstone_stairs", &[("facing", facing)]) + }; + let north = stairs(c, "north"); + let south = stairs(c, "south"); + let east = stairs(c, "east"); + let west = stairs(c, "west"); + f.generate_box(c, [0, -4, 0], [w - 1, 0, d - 1], sandstone, sandstone, false)?; + for p in 1..=9 { + f.generate_box(c, [p, p, p], [w - 1 - p, p, d - 1 - p], sandstone, sandstone, false)?; + f.generate_box(c, [p + 1, p, p + 1], [w - 2 - p, p, d - 2 - p], air, air, false)?; + } + for x in 0..w { + for z in 0..d { + f.fill_column_down(c, sandstone, x, -5, z)?; + } + } + f.generate_box(c, [0, 0, 0], [4, 9, 4], sandstone, air, false)?; + f.generate_box(c, [1, 10, 1], [3, 10, 3], sandstone, sandstone, false)?; + f.place(c, north, 2, 10, 0)?; + f.place(c, south, 2, 10, 4)?; + f.place(c, east, 0, 10, 2)?; + f.place(c, west, 4, 10, 2)?; + f.generate_box(c, [w - 5, 0, 0], [w - 1, 9, 4], sandstone, air, false)?; + f.generate_box(c, [w - 4, 10, 1], [w - 2, 10, 3], sandstone, sandstone, false)?; + f.place(c, north, w - 3, 10, 0)?; + f.place(c, south, w - 3, 10, 4)?; + f.place(c, east, w - 5, 10, 2)?; + f.place(c, west, w - 1, 10, 2)?; + f.generate_box(c, [8, 0, 0], [12, 4, 4], sandstone, air, false)?; + f.generate_box(c, [9, 1, 0], [11, 3, 4], air, air, false)?; + for [x, y] in [[9, 1], [9, 2], [9, 3], [10, 3], [11, 3], [11, 2], [11, 1]] { + f.place(c, cut, x, y, 1)?; + } + f.generate_box(c, [4, 1, 1], [8, 3, 3], sandstone, air, false)?; + f.generate_box(c, [4, 1, 2], [8, 2, 2], air, air, false)?; + f.generate_box(c, [12, 1, 1], [16, 3, 3], sandstone, air, false)?; + f.generate_box(c, [12, 1, 2], [16, 2, 2], air, air, false)?; + f.generate_box(c, [5, 4, 5], [w - 6, 4, d - 6], sandstone, sandstone, false)?; + f.generate_box(c, [9, 4, 9], [11, 4, 11], air, air, false)?; + for [x, z] in [[8, 8], [12, 8], [8, 12], [12, 12]] { + f.generate_box(c, [x, 1, z], [x, 3, z], cut, cut, false)?; + } + f.generate_box(c, [1, 1, 5], [4, 4, 11], sandstone, sandstone, false)?; + f.generate_box(c, [w - 5, 1, 5], [w - 2, 4, 11], sandstone, sandstone, false)?; + f.generate_box(c, [6, 7, 9], [6, 7, 11], sandstone, sandstone, false)?; + f.generate_box(c, [w - 7, 7, 9], [w - 7, 7, 11], sandstone, sandstone, false)?; + f.generate_box(c, [5, 5, 9], [5, 7, 11], cut, cut, false)?; + f.generate_box(c, [w - 6, 5, 9], [w - 6, 7, 11], cut, cut, false)?; + f.place(c, air, 5, 5, 10)?; + f.place(c, air, 5, 6, 10)?; + f.place(c, air, 6, 6, 10)?; + f.place(c, air, w - 6, 5, 10)?; + f.place(c, air, w - 6, 6, 10)?; + f.place(c, air, w - 7, 6, 10)?; + f.generate_box(c, [2, 4, 4], [2, 6, 4], air, air, false)?; + f.generate_box(c, [w - 3, 4, 4], [w - 3, 6, 4], air, air, false)?; + f.place(c, north, 2, 4, 5)?; + f.place(c, north, 2, 3, 4)?; + f.place(c, north, w - 3, 4, 5)?; + f.place(c, north, w - 3, 3, 4)?; + f.generate_box(c, [1, 1, 3], [2, 2, 3], sandstone, sandstone, false)?; + f.generate_box(c, [w - 3, 1, 3], [w - 2, 2, 3], sandstone, sandstone, false)?; + f.place(c, sandstone, 1, 1, 2)?; + f.place(c, sandstone, w - 2, 1, 2)?; + let slab = c.state("sandstone_slab"); + f.place(c, slab, 1, 2, 2)?; + f.place(c, slab, w - 2, 2, 2)?; + f.place(c, west, 2, 1, 2)?; + f.place(c, east, w - 3, 1, 2)?; + f.generate_box(c, [4, 3, 5], [4, 3, 17], sandstone, sandstone, false)?; + f.generate_box(c, [w - 5, 3, 5], [w - 5, 3, 17], sandstone, sandstone, false)?; + f.generate_box(c, [3, 1, 5], [4, 2, 16], air, air, false)?; + f.generate_box(c, [w - 6, 1, 5], [w - 5, 2, 16], air, air, false)?; + for z in (5..=17).step_by(2) { + f.place(c, cut, 4, 1, z)?; + f.place(c, chiseled, 4, 2, z)?; + f.place(c, cut, w - 5, 1, z)?; + f.place(c, chiseled, w - 5, 2, z)?; + } + for [x, z] in [ + [10, 7], + [10, 8], + [9, 9], + [11, 9], + [8, 10], + [12, 10], + [7, 10], + [13, 10], + [9, 11], + [11, 11], + [10, 12], + [10, 13], + ] { + f.place(c, orange, x, 0, z)?; + } + f.place(c, blue, 10, 0, 10)?; + // Rows of the corner towers (y 2..=8, three blocks each). + let rows = [ + [cut, orange, cut], + [cut, orange, cut], + [orange, chiseled, orange], + [cut, orange, cut], + [orange, chiseled, orange], + [orange, orange, orange], + [cut, cut, cut], + ]; + for x in [0, w - 1] { + for (i, row) in rows.iter().enumerate() { + for (j, &state) in row.iter().enumerate() { + f.place(c, state, x, 2 + i as i32, 1 + j as i32)?; + } + } + } + for x in [2, w - 3] { + for (i, row) in rows.iter().enumerate() { + for (j, &state) in row.iter().enumerate() { + f.place(c, state, x - 1 + j as i32, 2 + i as i32, 0)?; + } + } + } + f.generate_box(c, [8, 4, 0], [12, 6, 0], cut, cut, false)?; + f.place(c, air, 8, 6, 0)?; + f.place(c, air, 12, 6, 0)?; + f.place(c, orange, 9, 5, 0)?; + f.place(c, chiseled, 10, 5, 0)?; + f.place(c, orange, 11, 5, 0)?; + f.generate_box(c, [8, -14, 8], [12, -11, 12], cut, cut, false)?; + f.generate_box(c, [8, -10, 8], [12, -10, 12], chiseled, chiseled, false)?; + f.generate_box(c, [8, -9, 8], [12, -9, 12], cut, cut, false)?; + f.generate_box(c, [8, -8, 8], [12, -1, 12], sandstone, sandstone, false)?; + f.generate_box(c, [9, -11, 9], [11, -1, 11], air, air, false)?; + f.place(c, c.state("stone_pressure_plate"), 10, -11, 10)?; + f.generate_box(c, [9, -13, 9], [11, -13, 11], c.state("tnt"), air, false)?; + for [x, z, ox, oz] in [[8, 10, 7, 10], [12, 10, 13, 10], [10, 8, 10, 7], [10, 12, 10, 13]] { + f.place(c, air, x, -11, z)?; + f.place(c, air, x, -10, z)?; + f.place(c, chiseled, ox, -10, oz)?; + f.place(c, cut, ox, -11, oz)?; + } + for (i, d) in HORIZONTAL.into_iter().enumerate() { + if !self.placed_chest.lock().unwrap()[i] { + let s = d.normal(); + let placed = f.create_chest( + c, + 10 + s[0] * 2, + -11, + 10 + s[2] * 2, + "minecraft:chests/desert_pyramid", + )?; + self.placed_chest.lock().unwrap()[i] = placed; + } + } + // addCellar: stairs, then the room. + let (x, y, z) = (16, -4, 13); + let ccw = stairs(c, "west"); + f.place(c, ccw, 13, -1, 17)?; + f.place(c, ccw, 14, -2, 17)?; + f.place(c, ccw, 15, -3, 17)?; + let sand = c.state("sand"); + let variant = c.world.level_boolean()?; + for dx in -4..=0 { + f.place(c, sand, x + dx, y + 4, z + 4)?; + } + f.place(c, sand, x - 2, y + 3, z + 4)?; + f.place(c, if variant { sand } else { sandstone }, x - 1, y + 3, z + 4)?; + f.place(c, if variant { sandstone } else { sand }, x, y + 3, z + 4)?; + f.place(c, sand, x - 1, y + 2, z + 4)?; + f.place(c, sandstone, x, y + 2, z + 4)?; + f.place(c, sand, x, y + 1, z + 4)?; + for (state, yy) in [(cut, y + 1), (chiseled, y + 2), (cut, -1)] { + f.generate_box(c, [x - 3, yy, z - 3], [x - 3, yy, z + 2], state, state, true)?; + f.generate_box(c, [x + 3, yy, z - 3], [x + 3, yy, z + 2], state, state, true)?; + f.generate_box(c, [x - 3, yy, z - 3], [x + 3, yy, z - 2], state, state, true)?; + f.generate_box(c, [x - 3, yy, z + 3], [x + 3, yy, z + 3], state, state, true)?; + } + for px in x - 2..=x + 2 { + for pz in z - 2..=z + 2 { + let state = if c.world.level_float()? < 0.33 { + sandstone + } else { + sand + }; + f.place(c, state, px, y + 4, pz)?; + } + } + f.place(c, blue, x, y, z)?; + for [dx, dz] in [[1, -1], [1, 1], [-1, -1], [-1, 1], [2, 0], [-2, 0], [0, 2], [0, -2]] { + f.place(c, orange, x + dx, y, z + dz)?; + } + f.place(c, orange, x + 3, y, z)?; + f.place(c, cut, x + 4, y + 1, z)?; + f.place(c, chiseled, x + 4, y + 2, z)?; + f.place(c, orange, x - 3, y, z)?; + f.place(c, cut, x - 4, y + 1, z)?; + f.place(c, chiseled, x - 4, y + 2, z)?; + f.place(c, orange, x, y, z + 3)?; + f.place(c, orange, x, y, z - 3)?; + f.place(c, cut, x, y + 1, z - 4)?; + f.place(c, chiseled, x, -2, z - 4)?; + Ok(()) + } + /// DesertPyramidStructure.afterPlace. + fn after_place(&self, c: &mut PieceContext<'_>, pieces: &[BoundingBox]) -> Result<()> { + if *self.base.height_position.lock().unwrap() < 0 { + return Ok(()); + } + let seed = c.world.seed()?; + let mut positions = self.sand_positions(); + positions.sort_by_key(|p| (p[1], p[2], p[0])); + positions.dedup(); + suspicious_sand(c, self.collapsed_roof(seed))?; + let center = union(pieces).center(); + let mut random = LegacyRandom::new(seed) + .fork_positional() + .at(BlockPos::new(center[0], center[1], center[2])); + for i in (2..=positions.len()).rev() { + let j = random.next_int_bound(i as i32).unwrap_or(0) as usize; + positions.swap(i - 1, j); + } + let mut remaining = (positions.len() as i32).min(5 + random.next_int_bound(3).unwrap_or(0)); + let sand = c.state("sand"); + for pos in positions { + if remaining > 0 { + remaining -= 1; + suspicious_sand(c, pos)?; + } else if c.chunk_box.is_inside(pos) { + c.world.set(pos, sand, 2)?; + } + } + Ok(()) + } +} + +#[derive(Debug)] +pub struct JungleTemplePiece { + pub base: Scattered, + /// placedMainChest, placedHiddenChest, placedTrap1, placedTrap2. + placed: Mutex<[bool; 4]>, +} +impl JungleTemplePiece { + pub fn new(random: &mut impl RandomSource, west: i32, north: i32) -> Self { + let direction = random_horizontal(random); + Self { + base: Scattered::new(west, 64, north, 12, 10, 15, direction), + placed: Mutex::new([false; 4]), + } + } +} +impl LegacyPiece for JungleTemplePiece { + fn bounding_box(&self) -> BoundingBox { + self.base.frame().bounding_box + } + fn type_name(&self) -> &'static str { + "minecraft:tejp" + } + fn post_process(&self, c: &mut PieceContext<'_>) -> Result<()> { + if !self.base.average_ground(c, 0)? { + return Ok(()); + } + let f = self.base.frame(); + let cobble = c.state("cobblestone"); + let mossy = c.state("mossy_cobblestone"); + let air = c.state("air"); + let stone = |c: &mut PieceContext<'_>, a: [i32; 3], b: [i32; 3]| { + f.generate_box_selector(c, a, b, false, &mut |c, _, _, _, _| { + if c.random.float() < 0.4 { cobble } else { mossy } + }) + }; + stone(c, [0, -4, 0], [11, 0, 14])?; + for (a, b) in [ + ([2, 1, 2], [9, 2, 2]), + ([2, 1, 12], [9, 2, 12]), + ([2, 1, 3], [2, 2, 11]), + ([9, 1, 3], [9, 2, 11]), + ([1, 3, 1], [10, 6, 1]), + ([1, 3, 13], [10, 6, 13]), + ([1, 3, 2], [1, 6, 12]), + ([10, 3, 2], [10, 6, 12]), + ([2, 3, 2], [9, 3, 12]), + ([2, 6, 2], [9, 6, 12]), + ([3, 7, 3], [8, 7, 11]), + ([4, 8, 4], [7, 8, 10]), + ] { + stone(c, a, b)?; + } + for (a, b) in [ + ([3, 1, 3], [8, 2, 11]), + ([4, 3, 6], [7, 3, 9]), + ([2, 4, 2], [9, 5, 12]), + ([4, 6, 5], [7, 6, 9]), + ([5, 7, 6], [6, 7, 8]), + ([5, 1, 2], [6, 2, 2]), + ([5, 2, 12], [6, 2, 12]), + ([5, 5, 1], [6, 5, 1]), + ([5, 5, 13], [6, 5, 13]), + ] { + f.generate_box(c, a, b, air, air, false)?; + } + f.place(c, air, 1, 5, 5)?; + f.place(c, air, 10, 5, 5)?; + f.place(c, air, 1, 5, 9)?; + f.place(c, air, 10, 5, 9)?; + for z in [0, 14] { + for x in [2, 4, 7, 9] { + stone(c, [x, 4, z], [x, 5, z])?; + } + } + stone(c, [5, 6, 0], [6, 6, 0])?; + for x in [0, 11] { + for z in (2..=12).step_by(2) { + stone(c, [x, 4, z], [x, 5, z])?; + } + stone(c, [x, 6, 5], [x, 6, 5])?; + stone(c, [x, 6, 9], [x, 6, 9])?; + } + for (a, b) in [ + ([2, 7, 2], [2, 9, 2]), + ([9, 7, 2], [9, 9, 2]), + ([2, 7, 12], [2, 9, 12]), + ([9, 7, 12], [9, 9, 12]), + ([4, 9, 4], [4, 9, 4]), + ([7, 9, 4], [7, 9, 4]), + ([4, 9, 10], [4, 9, 10]), + ([7, 9, 10], [7, 9, 10]), + ([5, 9, 7], [6, 9, 7]), + ] { + stone(c, a, b)?; + } + let stairs = + |c: &PieceContext<'_>, facing: &str| c.state_with("cobblestone_stairs", &[("facing", facing)]); + let east = stairs(c, "east"); + let west = stairs(c, "west"); + let south = stairs(c, "south"); + let north = stairs(c, "north"); + f.place(c, north, 5, 9, 6)?; + f.place(c, north, 6, 9, 6)?; + f.place(c, south, 5, 9, 8)?; + f.place(c, south, 6, 9, 8)?; + for [x, y, z] in [ + [4, 0, 0], + [5, 0, 0], + [6, 0, 0], + [7, 0, 0], + [4, 1, 8], + [4, 2, 9], + [4, 3, 10], + [7, 1, 8], + [7, 2, 9], + [7, 3, 10], + ] { + f.place(c, north, x, y, z)?; + } + stone(c, [4, 1, 9], [4, 1, 9])?; + stone(c, [7, 1, 9], [7, 1, 9])?; + stone(c, [4, 1, 10], [7, 2, 10])?; + stone(c, [5, 4, 5], [6, 4, 5])?; + f.place(c, east, 4, 4, 5)?; + f.place(c, west, 7, 4, 5)?; + for i in 0..4 { + f.place(c, south, 5, -i, 6 + i)?; + f.place(c, south, 6, -i, 6 + i)?; + f.generate_box(c, [5, -i, 7 + i], [6, -i, 9 + i], air, air, false)?; + } + f.generate_box(c, [1, -3, 12], [10, -1, 13], air, air, false)?; + f.generate_box(c, [1, -3, 1], [3, -1, 13], air, air, false)?; + f.generate_box(c, [1, -3, 1], [9, -1, 5], air, air, false)?; + for z in (1..=13).step_by(2) { + stone(c, [1, -3, z], [1, -2, z])?; + } + for z in (2..=12).step_by(2) { + stone(c, [1, -1, z], [3, -1, z])?; + } + stone(c, [2, -2, 1], [5, -2, 1])?; + stone(c, [7, -2, 1], [9, -2, 1])?; + stone(c, [6, -3, 1], [6, -3, 1])?; + stone(c, [6, -1, 1], [6, -1, 1])?; + let hook = |c: &PieceContext<'_>, facing: &str| { + c.state_with("tripwire_hook", &[("facing", facing), ("attached", "true")]) + }; + let wire = |c: &PieceContext<'_>, a: &str, b: &str| { + c.state_with("tripwire", &[(a, "true"), (b, "true"), ("attached", "true")]) + }; + let redstone = |c: &PieceContext<'_>, sides: &[(&str, &str)]| c.state_with("redstone_wire", sides); + f.place(c, hook(c, "east"), 1, -3, 8)?; + f.place(c, hook(c, "west"), 4, -3, 8)?; + f.place(c, wire(c, "east", "west"), 2, -3, 8)?; + f.place(c, wire(c, "east", "west"), 3, -3, 8)?; + let ns = redstone(c, &[("north", "side"), ("south", "side")]); + for z in (2..=7).rev() { + f.place(c, ns, 5, -3, z)?; + } + f.place(c, redstone(c, &[("north", "side"), ("west", "side")]), 5, -3, 1)?; + f.place(c, redstone(c, &[("east", "side"), ("west", "side")]), 4, -3, 1)?; + f.place(c, mossy, 3, -3, 1)?; + let dispenser = "minecraft:chests/jungle_temple_dispenser"; + if !self.placed.lock().unwrap()[2] { + let placed = f.create_dispenser(c, 3, -2, 1, Direction::North, dispenser)?; + self.placed.lock().unwrap()[2] = placed; + } + f.place(c, c.state_with("vine", &[("south", "true")]), 3, -2, 2)?; + f.place(c, hook(c, "north"), 7, -3, 1)?; + f.place(c, hook(c, "south"), 7, -3, 5)?; + for z in 2..=4 { + f.place(c, wire(c, "north", "south"), 7, -3, z)?; + } + f.place(c, redstone(c, &[("east", "side"), ("west", "side")]), 8, -3, 6)?; + f.place(c, redstone(c, &[("west", "side"), ("south", "side")]), 9, -3, 6)?; + f.place(c, redstone(c, &[("north", "side"), ("south", "up")]), 9, -3, 5)?; + f.place(c, mossy, 9, -3, 4)?; + f.place(c, ns, 9, -2, 4)?; + if !self.placed.lock().unwrap()[3] { + let placed = f.create_dispenser(c, 9, -2, 3, Direction::West, dispenser)?; + self.placed.lock().unwrap()[3] = placed; + } + let vine_east = c.state_with("vine", &[("east", "true")]); + f.place(c, vine_east, 8, -1, 3)?; + f.place(c, vine_east, 8, -2, 3)?; + if !self.placed.lock().unwrap()[0] { + let placed = f.create_chest(c, 8, -3, 3, "minecraft:chests/jungle_temple")?; + self.placed.lock().unwrap()[0] = placed; + } + for [x, y, z] in [ + [9, -3, 2], + [8, -3, 1], + [4, -3, 5], + [5, -2, 5], + [5, -1, 5], + [6, -3, 5], + [7, -2, 5], + [7, -1, 5], + [8, -3, 5], + ] { + f.place(c, mossy, x, y, z)?; + } + stone(c, [9, -1, 1], [9, -1, 5])?; + f.generate_box(c, [8, -3, 8], [10, -1, 10], air, air, false)?; + let chiseled = c.state("chiseled_stone_bricks"); + let lever = c.state_with("lever", &[("facing", "north"), ("face", "wall")]); + for x in 8..=10 { + f.place(c, chiseled, x, -2, 11)?; + } + for x in 8..=10 { + f.place(c, lever, x, -2, 12)?; + } + stone(c, [8, -3, 8], [8, -3, 10])?; + stone(c, [10, -3, 8], [10, -3, 10])?; + f.place(c, mossy, 10, -2, 9)?; + f.place(c, ns, 8, -2, 9)?; + f.place(c, ns, 8, -2, 10)?; + f.place( + c, + redstone( + c, + &[("north", "side"), ("south", "side"), ("east", "side"), ("west", "side")], + ), + 10, + -1, + 9, + )?; + f.place(c, c.state_with("sticky_piston", &[("facing", "up")]), 9, -2, 8)?; + let piston_west = c.state_with("sticky_piston", &[("facing", "west")]); + f.place(c, piston_west, 10, -2, 8)?; + f.place(c, piston_west, 10, -1, 8)?; + f.place(c, c.state_with("repeater", &[("facing", "north")]), 10, -2, 10)?; + if !self.placed.lock().unwrap()[1] { + let placed = f.create_chest(c, 9, -3, 10, "minecraft:chests/jungle_temple")?; + self.placed.lock().unwrap()[1] = placed; + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/worldgen/tags.rs b/crates/horizon-world/src/worldgen/tags.rs new file mode 100644 index 000000000..9c22abc76 --- /dev/null +++ b/crates/horizon-world/src/worldgen/tags.rs @@ -0,0 +1,369 @@ +//! Version-pinned tag codecs, resource-stack merging and dependency resolution. +use super::{DecodeError, Object, optional, required}; +use horizon_core::random::java_string_hash; +use serde_json::value::RawValue; +use std::collections::{BTreeMap, BTreeSet}; + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct TagEntry { + pub id: String, + pub tag: bool, + pub required: bool, +} +impl TagEntry { + pub fn from_json(json: &str) -> Result<Self, DecodeError> { + let raw: Box<RawValue> = serde_json::from_str(json)?; + let (name, mandatory) = if raw.get().starts_with('"') { + (serde_json::from_str::<String>(raw.get())?, true) + } else { + let object: Object = serde_json::from_str(raw.get())?; + ( + serde_json::from_str(required(&object, "id")?.get())?, + optional(&object, "required") + .map(|v| serde_json::from_str(v.get())) + .transpose()? + .unwrap_or(true), + ) + }; + let (tag, name) = name + .strip_prefix('#') + .map_or((false, name.as_str()), |s| (true, s)); + Ok(Self { + id: identifier(name)?, + tag, + required: mandatory, + }) + } + pub fn display(&self) -> String { + format!( + "{}{}{}", + if self.tag { "#" } else { "" }, + self.id, + if self.required { "" } else { "?" } + ) + } +} +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct TagFile { + pub entries: Vec<TagEntry>, + pub replace: bool, +} +impl TagFile { + pub fn from_json(json: &str) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let values: Vec<Box<RawValue>> = serde_json::from_str(required(&object, "values")?.get())?; + let entries = values + .iter() + .map(|v| TagEntry::from_json(v.get())) + .collect::<Result<_, _>>()?; + let replace = optional(&object, "replace") + .map(|v| serde_json::from_str(v.get())) + .transpose()? + .unwrap_or(false); + Ok(Self { entries, replace }) + } +} +// Identifier.CODEC permits the empty path as well as an omitted namespace. +pub(crate) fn identifier(name: &str) -> Result<String, DecodeError> { + let (namespace, path) = name.split_once(':').unwrap_or(("minecraft", name)); + let namespace = if namespace.is_empty() { + "minecraft" + } else { + namespace + }; + let valid = |c: u8| c.is_ascii_lowercase() || c.is_ascii_digit() || b"_.-".contains(&c); + if !namespace.bytes().all(valid) || !path.bytes().all(|c| valid(c) || c == b'/') { + return Err(DecodeError::Registry(format!( + "invalid tag identifier: {name}" + ))); + } + Ok(format!("{namespace}:{path}")) +} +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct TagEntryWithSource { + pub entry: TagEntry, + pub source: String, +} +#[derive(Clone, Debug, Default)] +pub struct TagDefinitions { + entries: BTreeMap<String, Vec<TagEntryWithSource>>, + insertion_order: Vec<String>, +} +#[derive(Clone, Debug)] +pub struct BuiltTags<T> { + pub tags: BTreeMap<String, Vec<T>>, + pub missing: BTreeMap<String, Vec<TagEntryWithSource>>, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TagBuildError { + TooManyTags, + DependencyDepth, + HashTreeBucket, +} +impl std::fmt::Display for TagBuildError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str(match self { + Self::TooManyTags => "tag definitions exceed 8192 entries", + Self::DependencyDepth => { + "tag dependency depth exceeds 256 or cyclic reachability does not terminate" + } + Self::HashTreeBucket => "tag identifiers require an unsupported Java hash tree bucket", + }) + } +} +impl std::error::Error for TagBuildError {} +impl TagDefinitions { + /// Apply resources in their pack priority order. A successfully decoded + /// replace file clears earlier entries; a rejected file changes nothing. + pub fn add(&mut self, name: &str, source: &str, file: TagFile) -> Result<(), DecodeError> { + let name = identifier(name)?; + if !self.entries.contains_key(&name) { + self.insertion_order.push(name.clone()); + } + let entries = self.entries.entry(name).or_default(); + if file.replace { + entries.clear(); + } + entries.extend(file.entries.into_iter().map(|entry| TagEntryWithSource { + entry, + source: source.into(), + })); + Ok(()) + } + /// A valid JSON resource with a codec error still creates an empty tag in + /// vanilla's resource loader; existing entries are retained on that error. + pub fn apply_json(&mut self, name: &str, source: &str, json: &str) -> Result<(), DecodeError> { + let _: Box<RawValue> = serde_json::from_str(json)?; + let name = identifier(name)?; + if !self.entries.contains_key(&name) { + self.insertion_order.push(name.clone()); + self.entries.insert(name.clone(), Vec::new()); + } + self.add(&name, source, TagFile::from_json(json)?) + } + pub fn definitions(&self) -> &BTreeMap<String, Vec<TagEntryWithSource>> { + &self.entries + } + /// Missing required references invalidate their own tags, not unrelated tags. + /// Element lookup receives the entry's required flag, as in vanilla. + pub fn build<T: Clone + Ord>( + &self, + mut lookup: impl FnMut(&str, bool) -> Option<T>, + ) -> Result<BuiltTags<T>, TagBuildError> { + if self.entries.len() > 8192 { + return Err(TagBuildError::TooManyTags); + } + // DependencySorter owns a fresh default-sized HashMap. Required edges + // are inserted for every tag before any optional edge is considered. + // The resource loader creates keys with HashMap.computeIfAbsent, + // which inserts at the head of a bucket. DependencySorter then copies + // that map with put (tail insertion), retaining the reversed order of + // colliding resource keys. Resizing preserves each split chain's order. + let order = java_bucket_order(self.insertion_order.iter().rev().map(String::as_str), 16)?; + let mut edges: BTreeMap<&str, Vec<&str>> = BTreeMap::new(); + for mandatory in [true, false] { + for &name in &order { + for entry in &self.entries[name] { + let e = &entry.entry; + if e.tag && e.required == mandatory && !reaches(&edges, &e.id, name, 0)? { + let children = edges.entry(name).or_default(); + if !children.contains(&e.id.as_str()) { + children.push(&e.id); + } + } + } + } + } + // Guava HashMultimap value sets start with capacity four (two expected + // values). Their native bucket order matters when cycles are pruned. + let edges = edges + .into_iter() + .map(|(key, children)| Ok((key, java_bucket_order(children, 4)?))) + .collect::<Result<BTreeMap<_, _>, TagBuildError>>()?; + let mut visited = BTreeSet::new(); + let mut sorted = Vec::new(); + for name in order { + visit(name, &edges, &mut visited, &mut sorted, 0)?; + } + let mut result: BuiltTags<T> = BuiltTags { + tags: BTreeMap::new(), + missing: BTreeMap::new(), + }; + for name in sorted { + let Some(entries) = self.entries.get(name) else { + continue; + }; + let mut seen = BTreeSet::new(); + let mut values = Vec::new(); + let mut missing = Vec::new(); + for sourced in entries { + let entry = &sourced.entry; + if entry.tag { + if let Some(children) = result.tags.get(&entry.id) { + for value in children { + if seen.insert(value.clone()) { + values.push(value.clone()); + } + } + } else if entry.required { + missing.push(sourced.clone()); + } + } else if let Some(value) = lookup(&entry.id, entry.required) { + if seen.insert(value.clone()) { + values.push(value); + } + } else if entry.required { + missing.push(sourced.clone()); + } + } + if missing.is_empty() { + result.tags.insert(name.into(), values); + } else { + result.missing.insert(name.into(), missing); + } + } + Ok(result) + } +} +fn reaches( + edges: &BTreeMap<&str, Vec<&str>>, + from: &str, + target: &str, + depth: usize, +) -> Result<bool, TagBuildError> { + if depth > 256 { + return Err(TagBuildError::DependencyDepth); + } + if let Some(children) = edges.get(from) { + if children.contains(&target) { + return Ok(true); + } + for child in children { + if reaches(edges, child, target, depth + 1)? { + return Ok(true); + } + } + } + Ok(false) +} +fn visit<'a>( + name: &'a str, + edges: &BTreeMap<&'a str, Vec<&'a str>>, + visited: &mut BTreeSet<&'a str>, + sorted: &mut Vec<&'a str>, + depth: usize, +) -> Result<(), TagBuildError> { + if !visited.insert(name) { + return Ok(()); + } + if depth > 256 { + return Err(TagBuildError::DependencyDepth); + } + if let Some(children) = edges.get(name) { + for child in children { + visit(child, edges, visited, sorted, depth + 1)?; + } + } + sorted.push(name); + Ok(()) +} +fn hash(name: &str) -> u32 { + let (namespace, path) = name.split_once(':').expect("canonical tag identifier"); + let raw = java_string_hash(namespace.encode_utf16()) + .wrapping_mul(31) + .wrapping_add(java_string_hash(path.encode_utf16())) as u32; + raw ^ (raw >> 16) +} +fn java_bucket_order<'a>( + names: impl IntoIterator<Item = &'a str>, + initial: usize, +) -> Result<Vec<&'a str>, TagBuildError> { + let names: Vec<_> = names.into_iter().collect(); + let mut capacity = initial; + for count in 1..=names.len() { + let bucket = hash(names[count - 1]) as usize & (capacity - 1); + let collisions = names[..count] + .iter() + .filter(|name| hash(name) as usize & (capacity - 1) == bucket) + .count(); + if collisions >= 9 { + if capacity < 64 { + capacity *= 2; + } else { + return Err(TagBuildError::HashTreeBucket); + } + } + if count > capacity * 3 / 4 { + capacity *= 2; + } + } + let mut ordered = names; + ordered.sort_by_key(|name| hash(name) as usize & (capacity - 1)); + Ok(ordered) +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn invalid_replacement_keeps_entries_and_codec_error_can_create_empty_tag() { + let mut definitions = TagDefinitions::default(); + definitions + .apply_json("a", "first", r##"{"values":["one","two","one"]}"##) + .unwrap(); + assert!( + definitions + .apply_json("a", "bad", r##"{"replace":true,"values":[false]}"##) + .is_err() + ); + assert!(definitions.apply_json("empty", "bad", "{}").is_err()); + assert!(definitions.apply_json("syntax", "bad", "{").is_err()); + let built = definitions.build(|id, _| Some(id.to_owned())).unwrap(); + assert_eq!( + built.tags["minecraft:a"], + vec!["minecraft:one", "minecraft:two"] + ); + assert_eq!(built.tags["minecraft:empty"], Vec::<String>::new()); + assert!(!built.tags.contains_key("minecraft:syntax")); + definitions + .apply_json( + "a", + "replacement", + r##"{"replace":true,"values":["three"]}"##, + ) + .unwrap(); + let built = definitions.build(|id, _| Some(id.to_owned())).unwrap(); + assert_eq!(built.tags["minecraft:a"], vec!["minecraft:three"]); + } + #[test] + fn required_edges_precede_optional_edges_and_missing_tags_do_not_poison_siblings() { + let mut definitions = TagDefinitions::default(); + for (name, json) in [ + ("a", r##"{"values":[{"id":"#b","required":false},"one"]}"##), + ("b", r##"{"values":["#a","two"]}"##), + ("bad", r##"{"values":["absent","also_absent"]}"##), + ( + "c", + r##"{"values":[{"id":"#bad","required":false},"two"]}"##, + ), + ] { + definitions.apply_json(name, "fixture", json).unwrap(); + } + let built = definitions + .build(|id, _| (!id.ends_with("absent")).then(|| id.to_owned())) + .unwrap(); + assert_eq!(built.tags["minecraft:a"], vec!["minecraft:one"]); + assert_eq!( + built.tags["minecraft:b"], + vec!["minecraft:one", "minecraft:two"] + ); + assert_eq!(built.tags["minecraft:c"], vec!["minecraft:two"]); + assert_eq!( + built.missing["minecraft:bad"] + .iter() + .map(|e| e.entry.id.as_str()) + .collect::<Vec<_>>(), + vec!["minecraft:absent", "minecraft:also_absent"] + ); + } +} diff --git a/crates/horizon-world/src/worldgen/terrain.rs b/crates/horizon-world/src/worldgen/terrain.rs new file mode 100644 index 000000000..a9b7ed349 --- /dev/null +++ b/crates/horizon-world/src/worldgen/terrain.rs @@ -0,0 +1,529 @@ +//! Noise-stage chunk filling. Material rules, structures and chunk lifecycle are +//! separate stages; this module does not produce a complete generated chunk. +use super::aquifer::{ + AquiferBlockStates, AquiferError, DisabledAquifer, FluidPicker, NoiseBasedAquifer, +}; +use crate::{ + chunk::BlockSection, + heightmap::{Heightmap, HeightmapChunk, HeightmapError, HeightmapState, HeightmapType}, + registry::{BlockRegistry, BlockStateId}, +}; +use horizon_core::{ + density::{DensitySampler, SampleError, SamplerContext}, + noise::DensityVolume, + position::ChunkPos, + random::PositionalRandom, + ticks::ProtoChunkTicks, +}; +use std::io; + +/// Behavior and resolved tags for every state in the chunk's immutable registry. +pub trait TerrainBlockStates { + type State: HeightmapState; + fn heightmap_state(&self, id: BlockStateId) -> Self::State; +} + +pub trait TerrainAquifer { + fn compute_substance( + &mut self, + context: &mut SamplerContext, + position: [i32; 3], + density: f64, + ) -> Result<Option<BlockStateId>, AquiferError>; + fn should_schedule_fluid_update(&self) -> bool; +} +impl<P: FluidPicker> TerrainAquifer for DisabledAquifer<P> { + fn compute_substance( + &mut self, + _: &mut SamplerContext, + position: [i32; 3], + density: f64, + ) -> Result<Option<BlockStateId>, AquiferError> { + Ok(DisabledAquifer::compute_substance(self, position, density)) + } + fn should_schedule_fluid_update(&self) -> bool { + false + } +} +impl<P: FluidPicker, F: PositionalRandom, B: AquiferBlockStates> TerrainAquifer + for NoiseBasedAquifer<P, F, B> +{ + fn compute_substance( + &mut self, + context: &mut SamplerContext, + position: [i32; 3], + density: f64, + ) -> Result<Option<BlockStateId>, AquiferError> { + NoiseBasedAquifer::compute_substance(self, context, position, density) + } + fn should_schedule_fluid_update(&self) -> bool { + NoiseBasedAquifer::should_schedule_fluid_update(self) + } +} + +#[derive(Debug)] +pub enum TerrainError { + Storage(io::Error), + Heightmap(HeightmapError), + Sample(SampleError), + Aquifer(AquiferError), + MissingAir, + InvalidState, + InvalidVolume, + OutsideBuildHeight, +} +impl std::fmt::Display for TerrainError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{self:?}") + } +} +impl std::error::Error for TerrainError {} +impl From<io::Error> for TerrainError { + fn from(value: io::Error) -> Self { + Self::Storage(value) + } +} +impl From<HeightmapError> for TerrainError { + fn from(value: HeightmapError) -> Self { + Self::Heightmap(value) + } +} +impl From<SampleError> for TerrainError { + fn from(value: SampleError) -> Self { + Self::Sample(value) + } +} +impl From<AquiferError> for TerrainError { + fn from(value: AquiferError) -> Self { + Self::Aquifer(value) + } +} + +/// Resident registry-backed sections, optional heightmaps and ordered per-section +/// fluid postprocessing offsets for the noise and surface generation stages. +pub struct TerrainChunk<'r, B: TerrainBlockStates> { + stage: PreLightChunkStage, + below_zero_retrogen: Option<crate::retrogen::BelowZeroRetrogen>, + position: ChunkPos, + blocks: TerrainBlocks<'r, B>, + heightmaps: [Option<Heightmap>; 6], + postprocessing: Vec<Vec<u16>>, + block_ticks: ProtoChunkTicks, + fluid_ticks: ProtoChunkTicks, +} +/// The persisted generation statuses before lighting initialization. This models +/// status-dependent storage and upgrade cleanup, not scheduling, lighting or +/// save-dirty notifications. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +pub enum PreLightChunkStage { + #[default] + Empty, + StructureStarts, + StructureReferences, + Biomes, + Terrain, + Features, +} +impl PreLightChunkStage { + pub const ALL: [Self; 6] = [ + Self::Empty, + Self::StructureStarts, + Self::StructureReferences, + Self::Biomes, + Self::Terrain, + Self::Features, + ]; + pub fn status(self) -> crate::chunk_status::ChunkStatus { + crate::chunk_status::ChunkStatus::ALL[self as usize] + } + pub fn name(self) -> &'static str { + self.status().name().strip_prefix("minecraft:").unwrap() + } + pub fn heightmaps(self) -> &'static [HeightmapType] { + self.status().heightmaps() + } +} +struct TerrainBlocks<'r, B: TerrainBlockStates> { + min_y: i32, + height: i32, + sections: Vec<BlockSection<'r>>, + non_air: Vec<u16>, + registry: &'r BlockRegistry, + properties: B, + air: BlockStateId, + void_air: BlockStateId, +} +impl<B: TerrainBlockStates> HeightmapChunk for TerrainBlocks<'_, B> { + type State = B::State; + fn min_y(&self) -> i32 { + self.min_y + } + fn height(&self) -> i32 { + self.height + } + fn highest_section_y(&self) -> i32 { + self.non_air + .iter() + .rposition(|&count| count != 0) + .map_or(self.min_y, |i| self.min_y + i as i32 * 16) + } + fn block_state(&self, x: i32, y: i32, z: i32) -> B::State { + self.properties.heightmap_state(self.block(x, y, z)) + } +} +impl<B: TerrainBlockStates> TerrainBlocks<'_, B> { + fn section_index(&self, y: i32) -> Option<usize> { + let dy = i64::from(y) - i64::from(self.min_y); + (dy >= 0 && dy < i64::from(self.height)).then_some((dy >> 4) as usize) + } + fn block(&self, x: i32, y: i32, z: i32) -> BlockStateId { + let Some(section) = self.section_index(y) else { + return self.void_air; + }; + if self.non_air[section] == 0 { + return self.air; + } + self.sections[section] + .get(local_index(x, y, z)) + .expect("valid section coordinates") + } +} +fn local_index(x: i32, y: i32, z: i32) -> usize { + (((y & 15) << 8) | ((z & 15) << 4) | (x & 15)) as usize +} + +impl<'r, B: TerrainBlockStates> TerrainChunk<'r, B> { + pub fn new( + position: ChunkPos, + min_y: i32, + height: i32, + registry: &'r BlockRegistry, + properties: B, + ) -> Result<Self, TerrainError> { + // Share the heightmap's supported range and fail before allocating sections. + Heightmap::new(HeightmapType::WorldSurfaceWg, min_y, height)?; + let air = registry + .default_state("minecraft:air") + .ok_or(TerrainError::MissingAir)?; + let void_air = registry + .default_state("minecraft:void_air") + .ok_or(TerrainError::MissingAir)?; + let section_count = (height / 16) as usize; + let sections = (0..section_count) + .map(|_| BlockSection::uniform(air, registry)) + .collect::<io::Result<Vec<_>>>()?; + Ok(Self { + stage: PreLightChunkStage::Empty, + below_zero_retrogen: None, + position, + blocks: TerrainBlocks { + min_y, + height, + sections, + non_air: vec![0; section_count], + registry, + properties, + air, + void_air, + }, + heightmaps: std::array::from_fn(|_| None), + postprocessing: vec![Vec::new(); section_count], + block_ticks: ProtoChunkTicks::default(), + fluid_ticks: ProtoChunkTicks::default(), + }) + } + pub(crate) fn registry(&self) -> &BlockRegistry { + self.blocks.registry + } + pub fn highest_filled_section_index(&self) -> Option<usize> { + self.blocks.non_air.iter().rposition(|&count| count != 0) + } + pub fn block_properties(&self, state: BlockStateId) -> B::State { + self.blocks.properties.heightmap_state(state) + } + pub fn same_block(&self, left: BlockStateId, right: BlockStateId) -> bool { + self.blocks + .registry + .state(left) + .zip(self.blocks.registry.state(right)) + .is_some_and(|(left, right)| left.name == right.name) + } + pub fn generation_stage(&self) -> PreLightChunkStage { + self.stage + } + /// Retained old terrain may already have completed stages that the new + /// below-zero generation has not reached. Biome reads use this status. + pub fn highest_generated_status(&self) -> crate::chunk_status::ChunkStatus { + self.below_zero_retrogen + .as_ref() + .map_or(self.stage.status(), |data| { + self.stage.status().max(data.target_status()) + }) + } + /// Changing status alone does not prime or clear any heightmaps. Native + /// persisted-status assignment also permits earlier statuses. Reaching an + /// installed upgrade target clears its metadata; save-dirty tracking is separate. + pub fn set_generation_stage(&mut self, stage: PreLightChunkStage) { + self.stage = stage; + if self + .below_zero_retrogen + .as_ref() + .is_some_and(|data| stage.status() >= data.target_status()) + { + self.below_zero_retrogen = None; + } + } + pub fn below_zero_retrogen(&self) -> Option<&crate::retrogen::BelowZeroRetrogen> { + self.below_zero_retrogen.as_ref() + } + /// Installation alone does not compare the target with the current status. + /// A subsequent persisted-stage assignment performs completion cleanup. + pub fn set_below_zero_retrogen(&mut self, data: Option<crate::retrogen::BelowZeroRetrogen>) { + self.below_zero_retrogen = data; + } + pub fn is_upgrading(&self) -> bool { + self.below_zero_retrogen.is_some() + } + /// Generation minimum Y and height. Storage bounds remain unchanged. + pub fn height_for_generation(&self) -> (i32, i32) { + if self.is_upgrading() { + (-64, 64) + } else { + (self.min_y(), self.height()) + } + } + /// ProtoChunk writes before lighting. The current stage selects heightmaps; + /// missing maps are primed after existing maps are updated. + pub fn set_block_worldgen( + &mut self, + x: i32, + y: i32, + z: i32, + state: BlockStateId, + ) -> Result<BlockStateId, TerrainError> { + let Some(section) = self.blocks.section_index(y) else { + return Ok(self.blocks.void_air); + }; + if self.blocks.non_air[section] == 0 && state == self.blocks.air { + return Ok(state); + } + let previous = self.set_block_raw(x, y, z, state)?; + let mut missing = Vec::new(); + for &kind in self.stage.heightmaps() { + if self.heightmap(kind).is_some() { + self.update_heightmap(kind, x & 15, y, z & 15, state)?; + } else { + missing.push(kind); + } + } + if !missing.is_empty() { + self.prime_heightmaps(&missing)?; + } + Ok(previous) + } + pub fn position(&self) -> ChunkPos { + self.position + } + pub fn min_y(&self) -> i32 { + self.blocks.min_y + } + pub fn height(&self) -> i32 { + self.blocks.height + } + pub fn highest_section_y(&self) -> i32 { + self.blocks.highest_section_y() + } + /// ProtoChunk reads collapse an all-air section to its default AIR state. + pub fn block(&self, x: i32, y: i32, z: i32) -> BlockStateId { + self.blocks.block(x, y, z) + } + pub fn section(&self, index: usize) -> Option<&BlockSection<'r>> { + self.blocks.sections.get(index) + } + pub fn heightmap(&self, kind: HeightmapType) -> Option<&Heightmap> { + self.heightmaps[kind as usize].as_ref() + } + pub fn block_ticks(&self) -> &ProtoChunkTicks { + &self.block_ticks + } + pub fn block_ticks_mut(&mut self) -> &mut ProtoChunkTicks { + &mut self.block_ticks + } + pub fn fluid_ticks(&self) -> &ProtoChunkTicks { + &self.fluid_ticks + } + pub fn fluid_ticks_mut(&mut self) -> &mut ProtoChunkTicks { + &mut self.fluid_ticks + } + pub fn postprocessing(&self) -> &[Vec<u16>] { + &self.postprocessing + } + + pub fn ensure_heightmap(&mut self, kind: HeightmapType) -> &mut Heightmap { + self.heightmaps[kind as usize].get_or_insert_with(|| { + Heightmap::new(kind, self.blocks.min_y, self.blocks.height) + .expect("validated chunk range") + }) + } + /// Section write only. The caller chooses which generation-stage maps to update. + pub fn set_block_raw( + &mut self, + x: i32, + y: i32, + z: i32, + state: BlockStateId, + ) -> Result<BlockStateId, TerrainError> { + let section = self + .blocks + .section_index(y) + .ok_or(TerrainError::OutsideBuildHeight)?; + let old = self.blocks.sections[section].set(local_index(x, y, z), state)?; + let old_air = self.blocks.properties.heightmap_state(old).is_air(); + let new_air = self.blocks.properties.heightmap_state(state).is_air(); + if old_air && !new_air { + self.blocks.non_air[section] += 1; + } else if !old_air && new_air { + self.blocks.non_air[section] -= 1; + } + Ok(old) + } + pub fn update_heightmap( + &mut self, + kind: HeightmapType, + x: i32, + y: i32, + z: i32, + state: BlockStateId, + ) -> Result<bool, TerrainError> { + if self.blocks.registry.state(state).is_none() { + return Err(TerrainError::InvalidState); + } + self.ensure_heightmap(kind); + let state = self.blocks.properties.heightmap_state(state); + Ok(self.heightmaps[kind as usize] + .as_mut() + .unwrap() + .update(&self.blocks, x, y, z, state)?) + } + pub fn prime_heightmaps(&mut self, kinds: &[HeightmapType]) -> Result<(), TerrainError> { + let mut order = Vec::new(); + for &kind in kinds { + self.ensure_heightmap(kind); + if !order.contains(&(kind as usize)) { + order.push(kind as usize); + } + } + // Split references preserve the supplied set's iteration order. + let mut maps: Vec<_> = self + .heightmaps + .iter_mut() + .enumerate() + .filter_map(|(i, map)| { + order + .iter() + .position(|&key| key == i) + .map(|position| (position, map.as_mut().unwrap())) + }) + .collect(); + maps.sort_by_key(|(position, _)| *position); + Heightmap::prime( + &self.blocks, + &mut maps.into_iter().map(|(_, map)| map).collect::<Vec<_>>(), + )?; + Ok(()) + } + pub fn set_heightmap_raw( + &mut self, + kind: HeightmapType, + words: &[u64], + ) -> Result<(), TerrainError> { + self.ensure_heightmap(kind); + self.heightmaps[kind as usize] + .as_mut() + .unwrap() + .set_raw_data(&self.blocks, words)?; + Ok(()) + } + /// Preserves duplicates and insertion order, as ProtoChunk does. + pub fn mark_postprocessing(&mut self, x: i32, y: i32, z: i32) { + if let Some(section) = self.blocks.section_index(y) { + self.postprocessing[section] + .push(((x & 15) | ((y & 15) << 4) | ((z & 15) << 8)) as u16); + } + } +} + +/// Evaluate final density in bulk before writes, then visit Z/X/descending Y. +/// The aquifer and final density must share this already prepared sampler context. +/// Failures retain earlier writes and aquifer/cache state; there is no rollback. +/// Regular gameplay only: developer preliminary-surface markers are not applied. +pub fn fill_noise<B: TerrainBlockStates>( + chunk: &mut TerrainChunk<'_, B>, + volume: DensityVolume, + final_density: &dyn DensitySampler, + context: &mut SamplerContext, + aquifer: &mut (impl TerrainAquifer + ?Sized), + default_block: BlockStateId, +) -> Result<(), TerrainError> { + let [sx, sy, sz] = volume.sizes(); + let [bx, by, bz] = volume.minimum(); + if sx != 16 + || sz != 16 + || volume.steps() != [1; 3] + || bx != chunk.position.x.wrapping_shl(4) + || bz != chunk.position.z.wrapping_shl(4) + || by < chunk.min_y() + || i64::from(by) + sy as i64 > i64::from(chunk.min_y()) + i64::from(chunk.height()) + || chunk.blocks.registry.state(default_block).is_none() + { + return Err(TerrainError::InvalidVolume); + } + chunk.ensure_heightmap(HeightmapType::OceanFloorWg); + chunk.ensure_heightmap(HeightmapType::WorldSurfaceWg); + let mut density = vec![0.; volume.size()]; + final_density.sample_volume(context, &mut density, volume)?; + const MAPS: [HeightmapType; 2] = [HeightmapType::OceanFloorWg, HeightmapType::WorldSurfaceWg]; + for z in 0..sz { + let world_z = bz.wrapping_add(z as i32); + for x in 0..sx { + let world_x = bx.wrapping_add(x as i32); + // Heightmap updates at or below first-available - 2 are no-ops; the + // bound only changes through an update, so skip those calls. + let mut settled = MAPS.map(|kind| { + chunk.heightmaps[kind as usize] + .as_ref() + .expect("ensured heightmap") + .first_available(x as i32, z as i32) + .map(|first| first.wrapping_sub(2)) + }); + for y in (0..sy).rev() { + let world_y = by.wrapping_add(y as i32); + let value = density[volume.index([x, y, z]).expect("valid density coordinates")]; + let state = aquifer + .compute_substance(context, [world_x, world_y, world_z], f64::from(value))? + .unwrap_or(default_block); + if state == chunk.blocks.air { + continue; + } + chunk.set_block_raw(x as i32, world_y, z as i32, state)?; + for (kind, settled) in MAPS.into_iter().zip(&mut settled) { + if matches!(settled, Ok(bound) if world_y <= *bound) { + continue; + } + chunk.update_heightmap(kind, x as i32, world_y, z as i32, state)?; + *settled = chunk.heightmaps[kind as usize] + .as_ref() + .expect("ensured heightmap") + .first_available(x as i32, z as i32) + .map(|first| first.wrapping_sub(2)); + } + if aquifer.should_schedule_fluid_update() + && chunk.blocks.properties.heightmap_state(state).has_fluid() + { + chunk.mark_postprocessing(world_x, world_y, world_z); + } + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/src/worldgen/tree.rs b/crates/horizon-world/src/worldgen/tree.rs new file mode 100644 index 000000000..25526bb62 --- /dev/null +++ b/crates/horizon-world/src/worldgen/tree.rs @@ -0,0 +1,832 @@ +//! Vanilla 26.3 `minecraft:tree` and `minecraft:fallen_tree` features: trunk, +//! foliage and root placers, decorators, minimum-size clipping and the native +//! leaf-distance pass. Native HashSet iteration order is reproduced wherever it +//! feeds random draws. Neighbor shape updates at the tree's outer faces are +//! delegated to `PlacementContext::update_shape_at_face`. +mod decorator; +mod fallen; +mod foliage; +mod trunk; +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + density::identifier, + feature::{FeatureError, FeatureWorld}, + feature_graph::{FeatureDefinition, FeatureExecutionError}, + int_range, number_text, optional, + placement::PlacementContext, + required, + state_provider::BlockStateProvider, + tree_blocks::{self as tb, PosSet, TreeBlocks}, + value_provider::IntProvider, +}; +use crate::registry::BlockStateId; +pub(crate) use decorator::GROUND_FEATURE_KEY; +use decorator::TreeDecorator; +pub use fallen::FallenTreeFeature; +use foliage::{FoliageAttachment, FoliagePlacer}; +use horizon_core::{geometry::Direction, random::RandomSource}; +use serde_json::value::RawValue; +use std::{collections::BTreeSet, sync::Arc}; +use trunk::TrunkPlacer; + +pub(crate) type TreeResult<T, E> = Result<T, FeatureExecutionError<E>>; +/// Places a nested configured feature (the pale-moss ground patch). +pub(crate) type NestedPlacer<'a, W, R> = dyn FnMut( + &FeatureDefinition, + &mut W, + &mut R, + [i32; 3], + ) -> TreeResult<bool, <W as FeatureWorld>::Error> + + 'a; + +pub(crate) fn world_error<E>(error: E) -> FeatureExecutionError<E> { + FeatureExecutionError::Basic(FeatureError::World(error)) +} +pub(crate) fn read<W: FeatureWorld>( + world: &mut W, + position: [i32; 3], +) -> TreeResult<BlockStateId, W::Error> { + world.block(position).map_err(world_error) +} +pub(crate) fn write<W: FeatureWorld>( + world: &mut W, + position: [i32; 3], + state: BlockStateId, + flags: i32, +) -> TreeResult<bool, W::Error> { + world.set_block(position, state, flags).map_err(world_error) +} +pub(crate) fn sample_state<W: FeatureWorld + PlacementContext>( + provider: &BlockStateProvider, + world: &mut W, + random: &mut impl RandomSource, + position: [i32; 3], +) -> TreeResult<BlockStateId, W::Error> { + provider + .get_state(world, random, position) + .map_err(FeatureExecutionError::Provider) +} +pub(crate) fn sample_optional<W: FeatureWorld + PlacementContext>( + provider: &BlockStateProvider, + world: &mut W, + random: &mut impl RandomSource, + position: [i32; 3], +) -> TreeResult<Option<BlockStateId>, W::Error> { + provider + .get_optional_state(world, random, position) + .map_err(FeatureExecutionError::Provider) +} + +/// Decoding context shared by every tree component. +pub(crate) struct TreeDecoder<'a, 'r> { + pub bindings: &'a FeatureBlockBindings<'r>, + pub depth: usize, + pub remaining: &'a mut usize, +} +impl TreeDecoder<'_, '_> { + pub fn provider(&mut self, raw: &RawValue) -> Result<BlockStateProvider, DecodeError> { + let (providers, catalog, _) = self + .bindings + .simple_blocks + .as_ref() + .ok_or(DecodeError::Field("tree provider bindings"))?; + catalog.provider_with_budget(raw.get(), providers, self.depth + 1, self.remaining) + } + pub fn int_provider( + &mut self, + raw: &RawValue, + low: i32, + high: i32, + ) -> Result<IntProvider, DecodeError> { + let value = IntProvider::decode(raw, self.depth + 1, self.remaining)?; + let [min, max] = value.bounds(); + if min < low || max > high { + return Err(DecodeError::Field("tree integer provider bounds")); + } + Ok(value) + } + pub fn block_set(&self, raw: &RawValue) -> Result<Arc<BTreeSet<BlockStateId>>, DecodeError> { + super::block_predicate::PredicateBlockResolver::predicate_block_set( + self.bindings, + raw.get(), + ) + } +} +pub(crate) fn unit_float(raw: &RawValue, name: &'static str) -> Result<f32, DecodeError> { + let value: f32 = number_text(raw)? + .parse() + .map_err(|_| DecodeError::Field(name))?; + if !(0.0..=1.0).contains(&value) { + return Err(DecodeError::Field(name)); + } + Ok(value) +} +pub(crate) fn kind(object: &Object) -> Result<String, DecodeError> { + identifier(&serde_json::from_str::<String>( + required(object, "type")?.get(), + )?) +} +fn optional_int( + object: &Object, + name: &'static str, + default: i32, + low: i32, + high: i32, +) -> Result<i32, DecodeError> { + optional(object, name) + .map(|raw| int_range(raw, name, low, high)) + .transpose() + .map(|v| v.unwrap_or(default)) +} + +#[derive(Clone, Debug)] +enum FeatureSize { + TwoLayers { + limit: i32, + lower: i32, + upper: i32, + }, + ThreeLayers { + limit: i32, + upper_limit: i32, + lower: i32, + middle: i32, + upper: i32, + }, +} +impl FeatureSize { + fn decode(raw: &RawValue) -> Result<(Self, Option<i32>), DecodeError> { + let object: Object = serde_json::from_str(raw.get())?; + let clipped = optional(&object, "min_clipped_height") + .map(|raw| int_range(raw, "min_clipped_height", 0, 80)) + .transpose()?; + let size = match kind(&object)?.as_str() { + "minecraft:two_layers_feature_size" => Self::TwoLayers { + limit: optional_int(&object, "limit", 1, 0, 81)?, + lower: optional_int(&object, "lower_size", 0, 0, 16)?, + upper: optional_int(&object, "upper_size", 1, 0, 16)?, + }, + "minecraft:three_layers_feature_size" => Self::ThreeLayers { + limit: optional_int(&object, "limit", 1, 0, 80)?, + upper_limit: optional_int(&object, "upper_limit", 1, 0, 80)?, + lower: optional_int(&object, "lower_size", 0, 0, 16)?, + middle: optional_int(&object, "middle_size", 1, 0, 16)?, + upper: optional_int(&object, "upper_size", 1, 0, 16)?, + }, + _ => return Err(DecodeError::Field("feature size type")), + }; + Ok((size, clipped)) + } + fn size_at_height(&self, tree_height: i32, yo: i32) -> i32 { + match *self { + Self::TwoLayers { + limit, + lower, + upper, + } => { + if yo < limit { + lower + } else { + upper + } + } + Self::ThreeLayers { + limit, + upper_limit, + lower, + middle, + upper, + } => { + if yo < limit { + lower + } else if yo >= tree_height.wrapping_sub(upper_limit) { + upper + } else { + middle + } + } + } + } +} + +#[derive(Clone, Debug)] +struct MangroveRoots { + can_grow_through: Arc<BTreeSet<BlockStateId>>, + muddy_roots_in: Arc<BTreeSet<BlockStateId>>, + muddy_roots_provider: BlockStateProvider, + max_root_width: i32, + max_root_length: i32, + random_skew_chance: f32, +} +#[derive(Clone, Debug)] +struct RootPlacer { + trunk_offset_y: IntProvider, + root_provider: BlockStateProvider, + above: Option<(BlockStateProvider, f32)>, + mangrove: MangroveRoots, +} +impl RootPlacer { + fn decode(raw: &RawValue, decoder: &mut TreeDecoder<'_, '_>) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(raw.get())?; + if kind(&object)? != "minecraft:mangrove_root_placer" { + return Err(DecodeError::Field("root placer type")); + } + let trunk_offset_y = IntProvider::decode( + required(&object, "trunk_offset_y")?, + decoder.depth + 1, + decoder.remaining, + )?; + let root_provider = decoder.provider(required(&object, "root_provider")?)?; + let above = optional(&object, "above_root_placement") + .map(|raw| -> Result<_, DecodeError> { + let above: Object = serde_json::from_str(raw.get())?; + Ok(( + decoder.provider(required(&above, "above_root_provider")?)?, + unit_float( + required(&above, "above_root_placement_chance")?, + "above_root_placement_chance", + )?, + )) + }) + .transpose()?; + let placement: Object = + serde_json::from_str(required(&object, "mangrove_root_placement")?.get())?; + let mangrove = MangroveRoots { + can_grow_through: decoder.block_set(required(&placement, "can_grow_through")?)?, + muddy_roots_in: decoder.block_set(required(&placement, "muddy_roots_in")?)?, + muddy_roots_provider: decoder + .provider(required(&placement, "muddy_roots_provider")?)?, + max_root_width: int_range( + required(&placement, "max_root_width")?, + "max_root_width", + 1, + 12, + )?, + max_root_length: int_range( + required(&placement, "max_root_length")?, + "max_root_length", + 1, + 64, + )?, + random_skew_chance: unit_float( + required(&placement, "random_skew_chance")?, + "random_skew_chance", + )?, + }; + Ok(Self { + trunk_offset_y, + root_provider, + above, + mangrove, + }) + } + fn can_place_root<W: FeatureWorld, R>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + position: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let state = read(run.world, position)?; + Ok(tree.blocks.valid_tree_pos(state) || self.mangrove.can_grow_through.contains(&state)) + } + fn waterlogged<W: FeatureWorld>( + tree: &TreeFeature, + world: &mut W, + position: [i32; 3], + state: BlockStateId, + ) -> TreeResult<BlockStateId, W::Error> { + if tree.blocks.has(state, tb::WATERLOGGABLE) { + let here = read(world, position)?; + Ok(tree + .blocks + .waterlogged(state, tree.blocks.has(here, tb::WATER_FLUID))) + } else { + Ok(state) + } + } + fn place_root<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + position: [i32; 3], + ) -> TreeResult<(), W::Error> { + let here = read(run.world, position)?; + if self.mangrove.muddy_roots_in.contains(&here) { + let state = sample_state( + &self.mangrove.muddy_roots_provider, + run.world, + run.random, + position, + )?; + let state = Self::waterlogged(tree, run.world, position, state)?; + return run.set(Layer::Root, position, state); + } + if !self.can_place_root(run, tree, position)? { + return Ok(()); + } + let state = sample_state(&self.root_provider, run.world, run.random, position)?; + let state = Self::waterlogged(tree, run.world, position, state)?; + run.set(Layer::Root, position, state)?; + if let Some((provider, chance)) = &self.above { + let above = tb::offset(position, 0, 1, 0); + if run.random.next_float() < *chance && tree.blocks.is_air(read(run.world, above)?) { + let state = sample_state(provider, run.world, run.random, above)?; + let state = Self::waterlogged(tree, run.world, above, state)?; + run.set(Layer::Root, above, state)?; + } + } + Ok(()) + } + fn place_roots<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + origin: [i32; 3], + trunk_origin: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let mut column = origin; + while column[1] < trunk_origin[1] { + if !self.can_place_root(run, tree, column)? { + return Ok(false); + } + column[1] = column[1].wrapping_add(1); + } + let mut roots = vec![tb::offset(trunk_origin, 0, -1, 0)]; + for direction in tb::HORIZONTAL { + let start = tb::relative(trunk_origin, direction, 1); + let mut positions = Vec::new(); + if !self.simulate(run, tree, start, direction, trunk_origin, &mut positions, 0)? { + return Ok(false); + } + roots.extend(positions); + roots.push(start); + } + for root in roots { + self.place_root(run, tree, root)?; + } + Ok(true) + } + #[allow(clippy::too_many_arguments)] + fn simulate<W: FeatureWorld, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + position: [i32; 3], + direction: Direction, + origin: [i32; 3], + positions: &mut Vec<[i32; 3]>, + layer: i32, + ) -> TreeResult<bool, W::Error> { + let max = self.mangrove.max_root_length; + if layer == max || positions.len() as i64 > i64::from(max) { + return Ok(false); + } + for next in self.potential(run.random, position, direction, origin)? { + if self.can_place_root(run, tree, next)? { + positions.push(next); + if !self.simulate(run, tree, next, direction, origin, positions, layer + 1)? { + return Ok(false); + } + } + } + Ok(true) + } + #[allow(clippy::if_same_then_else)] // Native branch order controls random draws. + fn potential<E>( + &self, + random: &mut impl RandomSource, + position: [i32; 3], + direction: Direction, + origin: [i32; 3], + ) -> TreeResult<Vec<[i32; 3]>, E> { + let below = tb::offset(position, 0, -1, 0); + let next_to = tb::relative(position, direction, 1); + let width = tb::dist_manhattan(position, origin); + let max = self.mangrove.max_root_width; + let skew = self.mangrove.random_skew_chance; + Ok(if width > max - 3 && width <= max { + if random.next_float() < skew { + vec![below, tb::offset(next_to, 0, -1, 0)] + } else { + vec![below] + } + } else if width > max { + vec![below] + } else if random.next_float() < skew { + vec![below] + } else if random.next_boolean() { + vec![next_to] + } else { + vec![below] + }) + } +} + +#[derive(Clone, Debug)] +pub struct TreeFeature { + trunk_provider: BlockStateProvider, + trunk_placer: TrunkPlacer, + foliage_provider: BlockStateProvider, + foliage_placer: FoliagePlacer, + root_placer: Option<RootPlacer>, + minimum_size: FeatureSize, + min_clipped_height: Option<i32>, + decorators: Vec<TreeDecorator>, + ignore_vines: bool, + below_trunk_provider: BlockStateProvider, + blocks: Arc<TreeBlocks>, +} + +#[derive(Clone, Copy, PartialEq, Eq)] +pub(crate) enum Layer { + Root, + Trunk, + Foliage, + Decoration, +} +#[derive(Default)] +pub(crate) struct Sets { + roots: PosSet, + trunks: PosSet, + foliage: PosSet, + decorations: PosSet, +} +pub(crate) struct Run<'a, W, R> { + pub world: &'a mut W, + pub random: &'a mut R, + sets: Sets, + /// Fallen trees write decorations without recording them. + track: bool, +} +impl<W: FeatureWorld, R> Run<'_, W, R> { + pub(crate) fn set( + &mut self, + layer: Layer, + position: [i32; 3], + state: BlockStateId, + ) -> TreeResult<(), W::Error> { + if self.track { + match layer { + Layer::Root => self.sets.roots.insert(position), + Layer::Trunk => self.sets.trunks.insert(position), + Layer::Foliage => self.sets.foliage.insert(position), + Layer::Decoration => self.sets.decorations.insert(position), + }; + } + write(self.world, position, state, 19)?; + Ok(()) + } + pub(crate) fn foliage_contains(&self, position: [i32; 3]) -> bool { + self.sets.foliage.contains(position) + } +} + +impl TreeFeature { + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + nested: &decorator::NestedDecoder<'_>, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + if kind(&object)? != "minecraft:tree" { + return Err(DecodeError::Field("tree feature type")); + } + let blocks = bindings.tree_blocks()?; + let mut decoder = TreeDecoder { + bindings, + depth, + remaining, + }; + let trunk_provider = decoder.provider(required(&object, "trunk_provider")?)?; + let trunk_placer = TrunkPlacer::decode(required(&object, "trunk_placer")?, &mut decoder)?; + let foliage_provider = decoder.provider(required(&object, "foliage_provider")?)?; + let foliage_placer = + FoliagePlacer::decode(required(&object, "foliage_placer")?, &mut decoder)?; + let root_placer = optional(&object, "root_placer") + .map(|raw| RootPlacer::decode(raw, &mut decoder)) + .transpose()?; + let (minimum_size, min_clipped_height) = + FeatureSize::decode(required(&object, "minimum_size")?)?; + let decorators = TreeDecorator::decode_list( + required(&object, "decorators")?, + &mut decoder, + optional(&object, decorator::GROUND_FEATURE_KEY), + nested, + )?; + let ignore_vines = optional(&object, "ignore_vines") + .map(|raw| serde_json::from_str::<bool>(raw.get())) + .transpose()? + .unwrap_or(false); + let below_trunk_provider = decoder.provider(required(&object, "below_trunk_provider")?)?; + Ok(Self { + trunk_provider, + trunk_placer, + foliage_provider, + foliage_placer, + root_placer, + minimum_size, + min_clipped_height, + decorators, + ignore_vines, + below_trunk_provider, + blocks, + }) + } + + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + nested: &mut NestedPlacer<'_, W, R>, + ) -> TreeResult<bool, W::Error> { + let mut run = Run { + world, + random, + sets: Sets::default(), + track: true, + }; + let result = self.do_place(&mut run, origin)?; + if !result || (run.sets.trunks.is_empty() && run.sets.foliage.is_empty()) { + return Ok(false); + } + if !self.decorators.is_empty() { + let lists = decorator::Lists::new( + run.sets.trunks.to_vec(), + run.sets.foliage.to_vec(), + run.sets.roots.to_vec(), + ); + for decorator in &self.decorators { + decorator.place(&mut run, &self.blocks, &lists, nested)?; + } + } + let mut bounds: Option<([i32; 3], [i32; 3])> = None; + for set in [ + &run.sets.roots, + &run.sets.trunks, + &run.sets.foliage, + &run.sets.decorations, + ] { + for p in set.to_vec() { + bounds = Some(match bounds { + None => (p, p), + Some((lo, hi)) => ( + std::array::from_fn(|i| lo[i].min(p[i])), + std::array::from_fn(|i| hi[i].max(p[i])), + ), + }); + } + } + let Some((low, high)) = bounds else { + return Ok(false); + }; + let shape = update_leaves(&mut run, &self.blocks, low, high)?; + update_shape_at_edge(run.world, &shape, low, 3)?; + Ok(true) + } + + fn do_place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + origin: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let tree_height = self.trunk_placer.tree_height(run.random)?; + let foliage_height = self + .foliage_placer + .foliage_height(run.random, tree_height)?; + let trunk_height = tree_height.wrapping_sub(foliage_height); + let leaf_radius = self + .foliage_placer + .foliage_radius(run.random, trunk_height)?; + let trunk_origin = match &self.root_placer { + Some(root) => tb::offset(origin, 0, root.trunk_offset_y.sample(run.random)?, 0), + None => origin, + }; + let min_y = origin[1].min(trunk_origin[1]); + let max_y = origin[1] + .max(trunk_origin[1]) + .wrapping_add(tree_height) + .wrapping_add(1); + let world_min = run.world.min_y().map_err(FeatureExecutionError::Query)?; + let world_max = run.world.max_y().map_err(FeatureExecutionError::Query)?; + if min_y < world_min.wrapping_add(1) || max_y > world_max.wrapping_add(1) { + return Ok(false); + } + let clipped = self.max_free_tree_height(run, tree_height, trunk_origin)?; + if clipped < tree_height && self.min_clipped_height.is_none_or(|min| clipped < min) { + return Ok(false); + } + if let Some(root) = &self.root_placer { + if !root.place_roots(run, self, origin, trunk_origin)? { + return Ok(false); + } + } + let attachments = self + .trunk_placer + .place_trunk(run, self, clipped, trunk_origin)?; + for attachment in attachments { + self.foliage_placer.create_foliage( + run, + self, + clipped, + attachment, + foliage_height, + leaf_radius, + )?; + } + Ok(true) + } + + fn max_free_tree_height<W: FeatureWorld, R>( + &self, + run: &mut Run<'_, W, R>, + max_tree_height: i32, + tree_pos: [i32; 3], + ) -> TreeResult<i32, W::Error> { + let mut y = 0; + while y <= max_tree_height.wrapping_add(1) { + let r = self.minimum_size.size_at_height(max_tree_height, y); + for x in -r..=r { + for z in -r..=r { + let p = tb::offset(tree_pos, x, y, z); + let state = read(run.world, p)?; + if !self.trunk_placer.is_free(&self.blocks, state) + || (!self.ignore_vines && self.blocks.has(state, tb::VINE)) + { + return Ok(y - 2); + } + } + } + y += 1; + } + Ok(max_tree_height) + } + + /// FoliagePlacer.tryPlaceLeaf. + pub(crate) fn try_place_leaf<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + position: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let here = read(run.world, position)?; + if self.blocks.has(here, tb::PERSISTENT) || !self.blocks.valid_tree_pos(here) { + return Ok(false); + } + let mut state = sample_state(&self.foliage_provider, run.world, run.random, position)?; + if self.blocks.has(state, tb::WATERLOGGABLE) { + let here = read(run.world, position)?; + state = self + .blocks + .waterlogged(state, self.blocks.has(here, tb::WATER_SOURCE)); + } + run.set(Layer::Foliage, position, state)?; + Ok(true) + } +} + +/// Voxel occupancy over the tree's bounding box. +pub(crate) struct Shape { + size: [i32; 3], + bits: Vec<bool>, +} +impl Shape { + fn new(size: [i32; 3]) -> Self { + let len = size.iter().map(|v| *v as usize).product(); + Self { + size, + bits: vec![false; len], + } + } + fn index(&self, [x, y, z]: [i32; 3]) -> usize { + ((x * self.size[1] + y) * self.size[2] + z) as usize + } + fn fill(&mut self, p: [i32; 3]) { + let i = self.index(p); + self.bits[i] = true; + } + fn full(&self, p: [i32; 3]) -> bool { + p.iter() + .zip(self.size) + .all(|(v, size)| (0..size).contains(v)) + && self.bits[self.index(p)] + } +} + +const MAX_TREE_SPAN: i64 = 512; +fn inside(low: [i32; 3], high: [i32; 3], p: [i32; 3]) -> bool { + (0..3).all(|i| p[i] >= low[i] && p[i] <= high[i]) +} + +/// TreeFeature.updateLeaves: native bucketed breadth-first distance pass. +fn update_leaves<W: FeatureWorld, R>( + run: &mut Run<'_, W, R>, + blocks: &TreeBlocks, + low: [i32; 3], + high: [i32; 3], +) -> TreeResult<Shape, W::Error> { + let span: [i64; 3] = std::array::from_fn(|i| i64::from(high[i]) - i64::from(low[i]) + 1); + if span.iter().any(|s| *s > MAX_TREE_SPAN) { + return Err(FeatureExecutionError::WorkLimit); + } + let mut shape = Shape::new(span.map(|v| v as i32)); + let local = |p: [i32; 3]| -> [i32; 3] { std::array::from_fn(|i| p[i].wrapping_sub(low[i])) }; + let mut fixed = run.sets.decorations.to_vec(); + fixed.extend(run.sets.roots.to_vec()); + for p in fixed { + if inside(low, high, p) { + shape.fill(local(p)); + } + } + let mut to_check: [PosSet; 7] = Default::default(); + for p in run.sets.trunks.to_vec() { + to_check[0].insert(p); + } + let mut smallest = 0usize; + loop { + while smallest >= 7 || !to_check[smallest].is_empty() { + if smallest >= 7 { + return Ok(shape); + } + let pos = to_check[smallest] + .pop_first() + .ok_or(FeatureExecutionError::InvalidState)?; + if !inside(low, high, pos) { + continue; + } + if smallest != 0 { + let state = read(run.world, pos)?; + let updated = blocks + .with(state, "distance", &smallest.to_string()) + .ok_or(FeatureExecutionError::InvalidState)?; + write(run.world, pos, updated, 19)?; + } + shape.fill(local(pos)); + for direction in Direction::ALL { + let neighbor = tb::relative(pos, direction, 1); + if !inside(low, high, neighbor) || shape.full(local(neighbor)) { + continue; + } + let state = read(run.world, neighbor)?; + if let Some(distance) = blocks.leaf_distance(state) { + let next = distance.min(smallest as i32 + 1); + if next < 7 { + to_check[next as usize].insert(neighbor); + smallest = smallest.min(next as usize); + } + } + } + } + smallest += 1; + } +} + +/// StructureTemplate.updateShapeAtEdge face traversal (DiscreteVoxelShape.forAllFaces). +pub(crate) fn update_shape_at_edge<W: FeatureWorld + PlacementContext>( + world: &mut W, + shape: &Shape, + start: [i32; 3], + flags: i32, +) -> TreeResult<(), W::Error> { + let [sx, sy, sz] = shape.size; + // (c-axis, a size, b size, mapping (a, b, c) -> (x, y, z)) + type Map = fn(i32, i32, i32) -> [i32; 3]; + let passes: [(Direction, Direction, i32, i32, i32, Map); 3] = [ + (Direction::North, Direction::South, sx, sy, sz, |a, b, c| { + [a, b, c] + }), + (Direction::Down, Direction::Up, sz, sx, sy, |a, b, c| { + [b, c, a] + }), + (Direction::West, Direction::East, sy, sz, sx, |a, b, c| { + [c, a, b] + }), + ]; + for (negative, positive, a_size, b_size, c_size, map) in passes { + for a in 0..a_size { + for b in 0..b_size { + let mut last = false; + for c in 0..=c_size { + let full = c != c_size && shape.full(map(a, b, c)); + let face = if !last && full { + Some((negative, map(a, b, c))) + } else if last && !full { + Some((positive, map(a, b, c - 1))) + } else { + None + }; + if let Some((direction, local)) = face { + let p = std::array::from_fn(|i| start[i].wrapping_add(local[i])); + world + .update_shape_at_face(p, direction, flags) + .map_err(FeatureExecutionError::Query)?; + } + last = full; + } + } + } + } + Ok(()) +} diff --git a/crates/horizon-world/src/worldgen/tree/decorator.rs b/crates/horizon-world/src/worldgen/tree/decorator.rs new file mode 100644 index 000000000..942372afc --- /dev/null +++ b/crates/horizon-world/src/worldgen/tree/decorator.rs @@ -0,0 +1,677 @@ +//! Tree decorators (TreeDecorator subclasses), in native random-draw order. +use super::{ + Layer, NestedPlacer, Run, TreeDecoder, TreeResult, kind, read, sample_optional, sample_state, + unit_float, +}; +use crate::heightmap::HeightmapType; +use crate::registry::BlockStateId; +use crate::worldgen::{ + DecodeError, Object, + feature::FeatureWorld, + feature_graph::{FeatureDefinition, FeatureExecutionError}, + int_range, optional, + placement::PlacementContext, + required, + state_provider::BlockStateProvider, + tree_blocks::{self as tb, TreeBlocks}, +}; +use horizon_core::{geometry::Direction, random::RandomSource}; +use serde_json::value::RawValue; +use std::collections::BTreeSet; + +/// Catalog-injected configured feature for the pale-moss ground patch, which +/// vanilla looks up by registry key during decoration. +pub(crate) const GROUND_FEATURE_KEY: &str = "horizon:pale_moss_patch"; + +/// Decorator context lists: set iteration order, stably sorted by Y. +pub(crate) struct Lists { + pub logs: Vec<[i32; 3]>, + pub leaves: Vec<[i32; 3]>, + pub roots: Vec<[i32; 3]>, +} +impl Lists { + pub(crate) fn new( + mut logs: Vec<[i32; 3]>, + mut leaves: Vec<[i32; 3]>, + mut roots: Vec<[i32; 3]>, + ) -> Self { + logs.sort_by_key(|p| p[1]); + leaves.sort_by_key(|p| p[1]); + roots.sort_by_key(|p| p[1]); + Self { + logs, + leaves, + roots, + } + } + /// TreeFeature.getLowestTrunkOrRootOfTree. + fn lowest(&self) -> Vec<[i32; 3]> { + if self.roots.is_empty() { + self.logs.clone() + } else if !self.logs.is_empty() && self.roots[0][1] == self.logs[0][1] { + let mut all = self.logs.clone(); + all.extend(&self.roots); + all + } else { + self.roots.clone() + } + } +} + +#[derive(Clone, Debug)] +pub(crate) enum TreeDecorator { + TrunkVine, + LeaveVine(f32), + Cocoa(f32), + Beehive(f32), + AlterGround(BlockStateProvider), + AttachedToLeaves { + probability: f32, + exclusion_xz: i32, + exclusion_y: i32, + provider: BlockStateProvider, + required_empty: i32, + directions: Vec<Direction>, + }, + AttachedToLogs { + probability: f32, + provider: BlockStateProvider, + directions: Vec<Direction>, + }, + CreakingHeart(f32), + PaleMoss { + leaves: f32, + trunk: f32, + ground: f32, + patch: Option<Box<FeatureDefinition>>, + }, + PlaceOnGround { + tries: i32, + radius: i32, + height: i32, + provider: BlockStateProvider, + }, + ShelfMushroom(f32), +} + +fn directions(raw: &RawValue) -> Result<Vec<Direction>, DecodeError> { + let names: Vec<String> = serde_json::from_str(raw.get())?; + if names.is_empty() || names.len() > 64 { + return Err(DecodeError::Field("decorator directions")); + } + names.iter().map(|n| tb::decode_direction(n)).collect() +} + +pub(crate) type NestedDecoder<'a> = + dyn Fn(&str, usize, &mut usize) -> Result<FeatureDefinition, DecodeError> + 'a; + +impl TreeDecorator { + pub(crate) fn decode_list( + raw: &RawValue, + decoder: &mut TreeDecoder<'_, '_>, + ground: Option<&RawValue>, + nested: &NestedDecoder<'_>, + ) -> Result<Vec<Self>, DecodeError> { + let values: Vec<Box<RawValue>> = serde_json::from_str(raw.get())?; + if values.len() > 256 { + return Err(DecodeError::Field("tree decorator count")); + } + values + .iter() + .map(|raw| Self::decode(raw, decoder, ground, nested)) + .collect() + } + fn decode( + raw: &RawValue, + decoder: &mut TreeDecoder<'_, '_>, + ground: Option<&RawValue>, + nested: &NestedDecoder<'_>, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(raw.get())?; + let probability = || unit_float(required(&object, "probability")?, "probability"); + Ok(match kind(&object)?.as_str() { + "minecraft:trunk_vine" => Self::TrunkVine, + "minecraft:leave_vine" => Self::LeaveVine(probability()?), + "minecraft:cocoa" => Self::Cocoa(probability()?), + "minecraft:beehive" => Self::Beehive(probability()?), + "minecraft:creaking_heart" => Self::CreakingHeart(probability()?), + "minecraft:shelf_mushroom" => Self::ShelfMushroom(probability()?), + "minecraft:alter_ground" => { + Self::AlterGround(decoder.provider(required(&object, "provider")?)?) + } + "minecraft:attached_to_leaves" => Self::AttachedToLeaves { + probability: probability()?, + exclusion_xz: int_range( + required(&object, "exclusion_radius_xz")?, + "exclusion_radius_xz", + 0, + 16, + )?, + exclusion_y: int_range( + required(&object, "exclusion_radius_y")?, + "exclusion_radius_y", + 0, + 16, + )?, + provider: decoder.provider(required(&object, "block_provider")?)?, + required_empty: int_range( + required(&object, "required_empty_blocks")?, + "required_empty_blocks", + 1, + 16, + )?, + directions: directions(required(&object, "directions")?)?, + }, + "minecraft:attached_to_logs" => Self::AttachedToLogs { + probability: probability()?, + provider: decoder.provider(required(&object, "block_provider")?)?, + directions: directions(required(&object, "directions")?)?, + }, + "minecraft:pale_moss" => Self::PaleMoss { + leaves: unit_float( + required(&object, "leaves_probability")?, + "leaves_probability", + )?, + trunk: unit_float(required(&object, "trunk_probability")?, "trunk_probability")?, + ground: unit_float( + required(&object, "ground_probability")?, + "ground_probability", + )?, + patch: ground + .map(|raw| nested(raw.get(), decoder.depth + 1, decoder.remaining)) + .transpose()? + .map(Box::new), + }, + "minecraft:place_on_ground" => Self::PlaceOnGround { + tries: optional(&object, "tries") + .map(|raw| int_range(raw, "tries", 1, i32::MAX)) + .transpose()? + .unwrap_or(128), + radius: optional(&object, "radius") + .map(|raw| int_range(raw, "radius", 0, i32::MAX)) + .transpose()? + .unwrap_or(2), + height: optional(&object, "height") + .map(|raw| int_range(raw, "height", 0, i32::MAX)) + .transpose()? + .unwrap_or(1), + provider: decoder.provider(required(&object, "block_state_provider")?)?, + }, + _ => return Err(DecodeError::Field("tree decorator type")), + }) + } + + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + blocks: &TreeBlocks, + lists: &Lists, + nested: &mut NestedPlacer<'_, W, R>, + ) -> TreeResult<(), W::Error> { + let mut d = Decorate { run, blocks }; + match self { + Self::TrunkVine => { + for &pos in &lists.logs { + for (direction, face) in [ + (Direction::West, "east"), + (Direction::East, "west"), + (Direction::North, "south"), + (Direction::South, "north"), + ] { + if d.run.random.next_int_bound(3)? > 0 { + let p = tb::relative(pos, direction, 1); + if d.is_air(p)? { + d.place_vine(p, face)?; + } + } + } + } + } + Self::LeaveVine(probability) => { + for &pos in &lists.leaves { + for (direction, face) in [ + (Direction::West, "east"), + (Direction::East, "west"), + (Direction::North, "south"), + (Direction::South, "north"), + ] { + if d.run.random.next_float() < *probability { + let p = tb::relative(pos, direction, 1); + if d.is_air(p)? { + d.place_vine(p, face)?; + let mut below = tb::offset(p, 0, -1, 0); + let mut remaining = 4; + while d.is_air(below)? && remaining > 0 { + d.place_vine(below, face)?; + below = tb::offset(below, 0, -1, 0); + remaining -= 1; + } + } + } + } + } + } + Self::Cocoa(probability) => { + if d.run.random.next_float() >= *probability { + return Ok(()); + } + let Some(first) = lists.logs.first() else { + return Ok(()); + }; + let tree_y = first[1]; + for &pos in lists.logs.iter().filter(|p| p[1].wrapping_sub(tree_y) <= 2) { + for direction in tb::HORIZONTAL { + if d.run.random.next_float() <= 0.25 { + let n = direction.opposite().normal(); + let p = tb::offset(pos, n[0], 0, n[2]); + if d.is_air(p)? { + let age = d.run.random.next_int_bound(3)?; + let state = d.default("minecraft:cocoa")?; + let state = d.with(state, "age", &age.to_string())?; + let state = + d.with(state, "facing", tb::direction_name(direction))?; + d.set(p, state)?; + } + } + } + } + } + Self::Beehive(probability) => d.beehive(lists, *probability)?, + Self::AlterGround(provider) => { + let positions = lists.lowest(); + let Some(first) = positions.first() else { + return Ok(()); + }; + let min_y = first[1]; + for &pos in positions.iter().filter(|p| p[1] == min_y) { + d.circle(provider, tb::offset(pos, -1, 0, -1))?; + d.circle(provider, tb::offset(pos, 2, 0, -1))?; + d.circle(provider, tb::offset(pos, -1, 0, 2))?; + d.circle(provider, tb::offset(pos, 2, 0, 2))?; + for _ in 0..5 { + let placement = d.run.random.next_int_bound(64)?; + let (xx, zz) = (placement % 8, placement / 8); + if xx == 0 || xx == 7 || zz == 0 || zz == 7 { + d.circle(provider, tb::offset(pos, -3 + xx, 0, -3 + zz))?; + } + } + } + } + Self::AttachedToLeaves { + probability, + exclusion_xz, + exclusion_y, + provider, + required_empty, + directions, + } => { + let mut blacklist = BTreeSet::new(); + let mut leaves = lists.leaves.clone(); + tb::shuffle(&mut leaves, d.run.random)?; + for leaf in leaves { + let direction = + directions[d.run.random.next_int_bound(directions.len() as i32)? as usize]; + let p = tb::relative(leaf, direction, 1); + if blacklist.contains(&p) || d.run.random.next_float() >= *probability { + continue; + } + let mut empty = true; + for i in 1..=*required_empty { + if !d.is_air(tb::relative(leaf, direction, i))? { + empty = false; + break; + } + } + if !empty { + continue; + } + for dx in -exclusion_xz..=*exclusion_xz { + for dy in -exclusion_y..=*exclusion_y { + for dz in -exclusion_xz..=*exclusion_xz { + blacklist.insert(tb::offset(p, dx, dy, dz)); + } + } + } + let state = sample_state(provider, d.run.world, d.run.random, p)?; + d.set(p, state)?; + } + } + Self::AttachedToLogs { + probability, + provider, + directions, + } => { + let mut logs = lists.logs.clone(); + tb::shuffle(&mut logs, d.run.random)?; + for log in logs { + let direction = + directions[d.run.random.next_int_bound(directions.len() as i32)? as usize]; + let p = tb::relative(log, direction, 1); + if d.run.random.next_float() <= *probability && d.is_air(p)? { + let state = sample_state(provider, d.run.world, d.run.random, p)?; + d.set(p, state)?; + } + } + } + Self::CreakingHeart(probability) => { + if lists.logs.is_empty() || d.run.random.next_float() >= *probability { + return Ok(()); + } + let mut candidates = lists.logs.clone(); + tb::shuffle(&mut candidates, d.run.random)?; + for pos in candidates { + let mut enclosed = true; + for direction in Direction::ALL { + let state = read(d.run.world, tb::relative(pos, direction, 1))?; + if !blocks.has(state, tb::LOGS) { + enclosed = false; + break; + } + } + if enclosed { + let state = d.default("minecraft:creaking_heart")?; + let state = d.with(state, "creaking_heart_state", "dormant")?; + let state = d.with(state, "natural", "true")?; + d.set(pos, state)?; + break; + } + } + } + Self::PaleMoss { + leaves, + trunk, + ground, + patch, + } => { + let mut logs = lists.logs.clone(); + tb::shuffle(&mut logs, d.run.random)?; + let Some(origin) = logs + .iter() + .copied() + .reduce(|best, p| if p[1] < best[1] { p } else { best }) + else { + return Ok(()); + }; + if d.run.random.next_float() < *ground { + if let Some(patch) = patch { + nested( + patch, + d.run.world, + d.run.random, + tb::offset(origin, 0, 1, 0), + )?; + } + } + for (positions, chance) in [(&lists.logs, *trunk), (&lists.leaves, *leaves)] { + for &pos in positions { + if d.run.random.next_float() < chance { + let down = tb::offset(pos, 0, -1, 0); + if d.is_air(down)? { + d.moss_hanger(down)?; + } + } + } + } + } + Self::PlaceOnGround { + tries, + radius, + height, + provider, + } => { + let positions = lists.lowest(); + let Some(&origin) = positions.first() else { + return Ok(()); + }; + let min_y = origin[1]; + let (mut min_x, mut max_x, mut min_z, mut max_z) = + (origin[0], origin[0], origin[2], origin[2]); + for p in positions.iter().filter(|p| p[1] == min_y) { + min_x = min_x.min(p[0]); + max_x = max_x.max(p[0]); + min_z = min_z.min(p[2]); + max_z = max_z.max(p[2]); + } + let low = [ + min_x.wrapping_sub(*radius), + min_y.wrapping_sub(*height), + min_z.wrapping_sub(*radius), + ]; + let high = [ + max_x.wrapping_add(*radius), + min_y.wrapping_add(*height), + max_z.wrapping_add(*radius), + ]; + for _ in 0..*tries { + let p = [ + d.run.random.next_int_between_inclusive(low[0], high[0])?, + d.run.random.next_int_between_inclusive(low[1], high[1])?, + d.run.random.next_int_between_inclusive(low[2], high[2])?, + ]; + let above = tb::offset(p, 0, 1, 0); + let above_state = read(d.run.world, above)?; + if !blocks.has(above_state, tb::AIR | tb::VINE) { + continue; + } + if !blocks.has(read(d.run.world, p)?, tb::SOLID_RENDER) { + continue; + } + let surface = d + .run + .world + .height(HeightmapType::MotionBlockingNoLeaves, p[0], p[2]) + .map_err(FeatureExecutionError::Query)?; + if surface <= above[1] { + let state = sample_state(provider, d.run.world, d.run.random, above)?; + d.set(above, state)?; + } + } + } + Self::ShelfMushroom(probability) => d.shelf_mushroom(lists, *probability)?, + } + Ok(()) + } +} + +struct Decorate<'a, 'b, 'w, W, R> { + run: &'a mut Run<'w, W, R>, + blocks: &'b TreeBlocks, +} +impl<W: FeatureWorld + PlacementContext, R: RandomSource> Decorate<'_, '_, '_, W, R> { + fn is_air(&mut self, p: [i32; 3]) -> TreeResult<bool, W::Error> { + Ok(self.blocks.is_air(read(self.run.world, p)?)) + } + fn has(&mut self, p: [i32; 3], flag: u32) -> TreeResult<bool, W::Error> { + Ok(self.blocks.has(read(self.run.world, p)?, flag)) + } + fn set(&mut self, p: [i32; 3], state: BlockStateId) -> TreeResult<(), W::Error> { + self.run.set(Layer::Decoration, p, state) + } + fn default(&self, name: &str) -> TreeResult<BlockStateId, W::Error> { + self.blocks + .default_state(name) + .ok_or(FeatureExecutionError::InvalidState) + } + fn with( + &self, + state: BlockStateId, + name: &str, + value: &str, + ) -> TreeResult<BlockStateId, W::Error> { + self.blocks + .with(state, name, value) + .ok_or(FeatureExecutionError::InvalidState) + } + fn place_vine(&mut self, p: [i32; 3], face: &str) -> TreeResult<(), W::Error> { + let vine = self.default("minecraft:vine")?; + let state = self.with(vine, face, "true")?; + self.set(p, state) + } + fn circle( + &mut self, + provider: &BlockStateProvider, + center: [i32; 3], + ) -> TreeResult<(), W::Error> { + for xx in -2i32..=2 { + for zz in -2i32..=2 { + if xx.abs() != 2 || zz.abs() != 2 { + let column = tb::offset(center, xx, 0, zz); + for dy in (-3..=2).rev() { + let cursor = tb::offset(column, 0, dy, 0); + if let Some(state) = + sample_optional(provider, self.run.world, self.run.random, cursor)? + { + self.set(cursor, state)?; + break; + } + if !self.is_air(cursor)? && dy < 0 { + break; + } + } + } + } + } + Ok(()) + } + fn moss_hanger(&mut self, mut p: [i32; 3]) -> TreeResult<(), W::Error> { + let moss = self.default("minecraft:pale_hanging_moss")?; + let middle = self.with(moss, "tip", "false")?; + let tip = self.with(moss, "tip", "true")?; + while self.is_air(tb::offset(p, 0, -1, 0))? && self.run.random.next_float() >= 0.5 { + self.set(p, middle)?; + p = tb::offset(p, 0, -1, 0); + } + self.set(p, tip) + } + fn beehive(&mut self, lists: &Lists, probability: f32) -> TreeResult<(), W::Error> { + let (Some(first_log), Some(last_log)) = (lists.logs.first(), lists.logs.last()) else { + return Ok(()); + }; + if self.run.random.next_float() >= probability { + return Ok(()); + } + let hive_y = match lists.leaves.first() { + Some(leaf) => (leaf[1] - 1).max(first_log[1] + 1), + None => (first_log[1] + 1 + self.run.random.next_int_bound(3)?).min(last_log[1]), + }; + let mut placements: Vec<[i32; 3]> = lists + .logs + .iter() + .filter(|p| p[1] == hive_y) + .flat_map(|p| { + [Direction::East, Direction::South, Direction::West].map(|d| tb::relative(*p, d, 1)) + }) + .collect(); + if placements.is_empty() { + return Ok(()); + } + tb::shuffle(&mut placements, self.run.random)?; + for p in placements { + if self.is_air(p)? && self.is_air(tb::relative(p, Direction::South, 1))? { + let nest = self.default("minecraft:bee_nest")?; + let nest = self.with(nest, "facing", "south")?; + self.set(p, nest)?; + // Occupants exist only when the write produced the nest block entity. + if read(self.run.world, p)? == nest { + let count = 2 + self.run.random.next_int_bound(2)?; + let mut ticks = Vec::with_capacity(count as usize); + for _ in 0..count { + ticks.push(self.run.random.next_int_bound(599)?); + } + self.run + .world + .store_beehive_occupants(p, &ticks) + .map_err(FeatureExecutionError::Query)?; + } + break; + } + } + Ok(()) + } + fn shelf_mushroom(&mut self, lists: &Lists, probability: f32) -> TreeResult<(), W::Error> { + if self.run.random.next_float() >= probability { + return Ok(()); + } + let (Some(first), Some(last)) = (lists.logs.first(), lists.logs.last()) else { + return Ok(()); + }; + if first[1] == last[1] { + let facings = if first[0] != last[0] { + [Direction::North, Direction::South] + } else { + [Direction::East, Direction::West] + }; + for &log in &lists.logs { + for facing in facings { + if self.run.random.next_float() <= 0.25 { + let p = mushroom_pos(log, facing); + if self.mushroom_replaceable(p)? + && !self.adjacent_mushroom(p)? + && !self.adjacent_mushroom(log)? + { + self.place_mushroom(p, facing)?; + } + } + } + } + } else { + let a = tb::HORIZONTAL[self.run.random.next_int_bound(4)? as usize]; + let facings = [a, tb::clockwise(a)]; + let base = first[1]; + for &log in &lists.logs { + let dy = log[1].wrapping_sub(base); + if !(1..=4).contains(&dy) { + continue; + } + for facing in facings { + if self.run.random.next_float() <= 0.25 { + let p = mushroom_pos(log, facing); + if self.mushroom_replaceable(p)? + && !self.has(tb::offset(p, 0, -1, 0), tb::SHELF_MUSHROOM)? + { + self.place_mushroom(p, facing)?; + break; + } + } + } + } + } + Ok(()) + } + fn mushroom_replaceable(&mut self, p: [i32; 3]) -> TreeResult<bool, W::Error> { + if !self.has(p, tb::REPLACEABLE)? { + return Ok(false); + } + for q in [ + p, + tb::offset(p, 1, 0, 0), + tb::offset(p, -1, 0, 0), + tb::offset(p, 0, 0, -1), + tb::offset(p, 0, 0, 1), + ] { + if self.has(q, tb::WATER_BLOCK)? { + return Ok(false); + } + } + Ok(true) + } + fn adjacent_mushroom(&mut self, p: [i32; 3]) -> TreeResult<bool, W::Error> { + for direction in tb::HORIZONTAL { + if self.has(tb::relative(p, direction, 1), tb::SHELF_MUSHROOM)? { + return Ok(true); + } + } + Ok(false) + } + fn place_mushroom(&mut self, p: [i32; 3], facing: Direction) -> TreeResult<(), W::Error> { + let age = self.run.random.next_int_bound(2)?; + let state = self.default("minecraft:shelf_mushroom")?; + let state = self.with(state, "age", &age.to_string())?; + let state = self.with(state, "facing", tb::direction_name(facing))?; + self.set(p, state) + } +} +fn mushroom_pos(log: [i32; 3], facing: Direction) -> [i32; 3] { + let n = facing.normal(); + tb::offset(log, n[0], 0, n[2]) +} diff --git a/crates/horizon-world/src/worldgen/tree/fallen.rs b/crates/horizon-world/src/worldgen/tree/fallen.rs new file mode 100644 index 000000000..ac4ba25ec --- /dev/null +++ b/crates/horizon-world/src/worldgen/tree/fallen.rs @@ -0,0 +1,182 @@ +//! `minecraft:fallen_tree`: a stump and an optional fallen log with decorators. +use super::{ + NestedPlacer, Run, Sets, TreeDecoder, TreeResult, decorator::Lists, decorator::NestedDecoder, + decorator::TreeDecorator, kind, read, sample_state, write, +}; +use crate::worldgen::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + feature::FeatureWorld, + feature_graph::FeatureExecutionError, + placement::PlacementContext, + required, + state_provider::BlockStateProvider, + tree_blocks::{self as tb, Axis, PosSet, TreeBlocks}, + value_provider::IntProvider, +}; +use horizon_core::{geometry::Direction, random::RandomSource}; +use std::sync::Arc; + +#[derive(Clone, Debug)] +pub struct FallenTreeFeature { + trunk_provider: BlockStateProvider, + log_length: IntProvider, + stump_decorators: Vec<TreeDecorator>, + log_decorators: Vec<TreeDecorator>, + blocks: Arc<TreeBlocks>, +} +impl FallenTreeFeature { + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + nested: &NestedDecoder<'_>, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + if kind(&object)? != "minecraft:fallen_tree" { + return Err(DecodeError::Field("fallen tree feature type")); + } + let blocks = bindings.tree_blocks()?; + let mut decoder = TreeDecoder { + bindings, + depth, + remaining, + }; + Ok(Self { + trunk_provider: decoder.provider(required(&object, "trunk_provider")?)?, + log_length: decoder.int_provider(required(&object, "log_length")?, 0, 16)?, + stump_decorators: TreeDecorator::decode_list( + required(&object, "stump_decorators")?, + &mut decoder, + None, + nested, + )?, + log_decorators: TreeDecorator::decode_list( + required(&object, "log_decorators")?, + &mut decoder, + None, + nested, + )?, + blocks, + }) + } + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + nested: &mut NestedPlacer<'_, W, R>, + ) -> TreeResult<bool, W::Error> { + let mut run = Run { + world, + random, + sets: Sets::default(), + track: false, + }; + let stump = self.place_log(&mut run, origin, None)?; + self.decorate(&mut run, &[stump], &self.stump_decorators, nested)?; + let direction = tb::HORIZONTAL[run.random.next_int_bound(4)? as usize]; + let length = self.log_length.sample(run.random)? - 2; + let mut start = tb::relative(origin, direction, 2 + run.random.next_int_bound(2)?); + start = tb::offset(start, 0, 1, 0); + for _ in 0..6 { + if self.may_place_on(&mut run, start)? { + break; + } + start = tb::offset(start, 0, -1, 0); + } + if self.can_place_log(&mut run, length, start, direction)? { + let mut logs = PosSet::default(); + let mut p = start; + for _ in 0..length { + logs.insert(self.place_log(&mut run, p, Some(Axis::of(direction)))?); + p = tb::relative(p, direction, 1); + } + self.decorate(&mut run, &logs.to_vec(), &self.log_decorators, nested)?; + } + Ok(true) + } + fn decorate<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + logs: &[[i32; 3]], + decorators: &[TreeDecorator], + nested: &mut NestedPlacer<'_, W, R>, + ) -> TreeResult<(), W::Error> { + if decorators.is_empty() { + return Ok(()); + } + let lists = Lists::new(logs.to_vec(), vec![], vec![]); + for decorator in decorators { + decorator.place(run, &self.blocks, &lists, nested)?; + } + Ok(()) + } + fn place_log<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + p: [i32; 3], + axis: Option<Axis>, + ) -> TreeResult<[i32; 3], W::Error> { + let mut state = sample_state(&self.trunk_provider, run.world, run.random, p)?; + if let Some(axis) = axis { + state = self.blocks.try_axis(state, axis); + } + write(run.world, p, state, 3)?; + // Feature.markAboveForPostProcessing. + let mut above = p; + for _ in 0..2 { + above = tb::offset(above, 0, 1, 0); + if self.blocks.is_air(read(run.world, above)?) { + break; + } + run.world + .mark_postprocessing(above) + .map_err(FeatureExecutionError::Query)?; + } + Ok(p) + } + fn over_solid_ground<W: FeatureWorld + PlacementContext, R>( + &self, + run: &mut Run<'_, W, R>, + p: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let below = read(run.world, tb::offset(p, 0, -1, 0))?; + run.world + .state_face_sturdy(below, p, Direction::Up) + .map_err(FeatureExecutionError::Query) + } + fn may_place_on<W: FeatureWorld + PlacementContext, R>( + &self, + run: &mut Run<'_, W, R>, + p: [i32; 3], + ) -> TreeResult<bool, W::Error> { + Ok(self.blocks.valid_tree_pos(read(run.world, p)?) && self.over_solid_ground(run, p)?) + } + fn can_place_log<W: FeatureWorld + PlacementContext, R>( + &self, + run: &mut Run<'_, W, R>, + length: i32, + start: [i32; 3], + direction: Direction, + ) -> TreeResult<bool, W::Error> { + let mut gap = 0; + let mut p = start; + for _ in 0..length { + if !self.blocks.valid_tree_pos(read(run.world, p)?) { + return Ok(false); + } + if !self.over_solid_ground(run, p)? { + gap += 1; + if gap > 2 { + return Ok(false); + } + } else { + gap = 0; + } + p = tb::relative(p, direction, 1); + } + Ok(true) + } +} diff --git a/crates/horizon-world/src/worldgen/tree/foliage.rs b/crates/horizon-world/src/worldgen/tree/foliage.rs new file mode 100644 index 000000000..74028ab9e --- /dev/null +++ b/crates/horizon-world/src/worldgen/tree/foliage.rs @@ -0,0 +1,631 @@ +//! Foliage placers (FoliagePlacer subclasses), in native random-draw order. +use super::{ + Layer, Run, TreeDecoder, TreeFeature, TreeResult, kind, read, sample_state, unit_float, +}; +use crate::worldgen::{ + DecodeError, Object, + feature::FeatureWorld, + int_range, + placement::PlacementContext, + required, + tree_blocks::{self as tb, Axis}, + value_provider::IntProvider, +}; +use horizon_core::{geometry::Direction, random::RandomSource}; +use serde_json::value::RawValue; + +#[derive(Clone, Copy, Debug)] +pub(crate) struct FoliageAttachment { + pub pos: [i32; 3], + pub radius_offset: i32, + pub height_offset: i32, + size: [i32; 2], +} +impl FoliageAttachment { + pub(crate) fn new(pos: [i32; 3], radius_offset: i32, double_trunk: bool) -> Self { + let size = if double_trunk { 2 } else { 1 }; + Self { + pos, + radius_offset, + height_offset: 0, + size: [size; 2], + } + } + fn double_trunk(&self) -> bool { + self.size == [2, 2] + } +} + +#[derive(Clone, Debug)] +enum Kind { + Blob(i32), + Fancy(i32), + Bush(i32), + Acacia, + Spruce(IntProvider), + Pine(IntProvider), + MegaPine(IntProvider), + MegaJungle(i32), + DarkOak, + RandomSpread { + foliage_height: IntProvider, + attempts: i32, + }, + Cherry { + height: IntProvider, + wide_bottom_hole: f32, + corner_hole: f32, + hanging: f32, + hanging_extension: f32, + }, + Poplar { + height: IntProvider, + side_hole: f32, + }, +} +#[derive(Clone, Debug)] +pub(super) struct FoliagePlacer { + radius: IntProvider, + offset: IntProvider, + kind: Kind, +} + +fn abs(v: i32) -> i32 { + v.wrapping_abs() +} + +impl FoliagePlacer { + pub(super) fn decode( + raw: &RawValue, + decoder: &mut TreeDecoder<'_, '_>, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(raw.get())?; + let radius = decoder.int_provider(required(&object, "radius")?, 0, 16)?; + let offset = decoder.int_provider(required(&object, "offset")?, 0, 16)?; + let fixed_height = || int_range(required(&object, "height")?, "foliage height", 0, 16); + let chance = |name: &'static str| unit_float(required(&object, name)?, name); + let kind = match kind(&object)?.as_str() { + "minecraft:blob_foliage_placer" => Kind::Blob(fixed_height()?), + "minecraft:fancy_foliage_placer" => Kind::Fancy(fixed_height()?), + "minecraft:bush_foliage_placer" => Kind::Bush(fixed_height()?), + "minecraft:jungle_foliage_placer" => Kind::MegaJungle(fixed_height()?), + "minecraft:acacia_foliage_placer" => Kind::Acacia, + "minecraft:dark_oak_foliage_placer" => Kind::DarkOak, + "minecraft:spruce_foliage_placer" => { + Kind::Spruce(decoder.int_provider(required(&object, "trunk_height")?, 0, 24)?) + } + "minecraft:pine_foliage_placer" => { + Kind::Pine(decoder.int_provider(required(&object, "height")?, 0, 24)?) + } + "minecraft:mega_pine_foliage_placer" => { + Kind::MegaPine(decoder.int_provider(required(&object, "crown_height")?, 0, 24)?) + } + "minecraft:random_spread_foliage_placer" => Kind::RandomSpread { + foliage_height: decoder.int_provider( + required(&object, "foliage_height")?, + 1, + 512, + )?, + attempts: int_range( + required(&object, "leaf_placement_attempts")?, + "leaf_placement_attempts", + 0, + 256, + )?, + }, + "minecraft:cherry_foliage_placer" => Kind::Cherry { + height: decoder.int_provider(required(&object, "height")?, 4, 16)?, + wide_bottom_hole: chance("wide_bottom_layer_hole_chance")?, + corner_hole: chance("corner_hole_chance")?, + hanging: chance("hanging_leaves_chance")?, + hanging_extension: chance("hanging_leaves_extension_chance")?, + }, + "minecraft:poplar_foliage_placer" => Kind::Poplar { + height: decoder.int_provider(required(&object, "height")?, 5, 16)?, + side_hole: chance("side_hole_chance")?, + }, + _ => return Err(DecodeError::Field("foliage placer type")), + }; + Ok(Self { + radius, + offset, + kind, + }) + } + pub(super) fn foliage_height<E>( + &self, + random: &mut impl RandomSource, + tree_height: i32, + ) -> TreeResult<i32, E> { + Ok(match &self.kind { + Kind::Blob(h) | Kind::Fancy(h) | Kind::Bush(h) | Kind::MegaJungle(h) => *h, + Kind::Acacia => 0, + Kind::DarkOak => 4, + Kind::Spruce(trunk) => 4.max(tree_height - trunk.sample(random)?), + Kind::Pine(h) | Kind::MegaPine(h) => h.sample(random)?, + Kind::RandomSpread { foliage_height, .. } => foliage_height.sample(random)?, + Kind::Cherry { height, .. } | Kind::Poplar { height, .. } => height.sample(random)?, + }) + } + pub(super) fn foliage_radius<E>( + &self, + random: &mut impl RandomSource, + trunk_height: i32, + ) -> TreeResult<i32, E> { + let radius = self.radius.sample(random)?; + if matches!(self.kind, Kind::Pine(_)) { + return Ok(radius + random.next_int_bound(trunk_height.wrapping_add(1).max(1))?); + } + Ok(radius) + } + + /// shouldSkipLocation with already-unsigned offsets. + fn skip( + &self, + random: &mut impl RandomSource, + dx: i32, + y: i32, + dz: i32, + r: i32, + double: bool, + ) -> Result<bool, horizon_core::random::InvalidBound> { + Ok(match &self.kind { + Kind::Blob(_) => dx == r && dz == r && (random.next_int_bound(2)? == 0 || y == 0), + Kind::Bush(_) => dx == r && dz == r && random.next_int_bound(2)? == 0, + Kind::Fancy(_) => { + let a = dx as f32 + 0.5; + let b = dz as f32 + 0.5; + a * a + b * b > r.wrapping_mul(r) as f32 + } + Kind::Acacia => { + if y == 0 { + (dx > 1 || dz > 1) && dx != 0 && dz != 0 + } else { + dx == r && dz == r && r > 0 + } + } + Kind::Spruce(_) | Kind::Pine(_) => dx == r && dz == r && r > 0, + Kind::MegaPine(_) | Kind::MegaJungle(_) => { + dx.wrapping_add(dz) >= 7 + || dx.wrapping_mul(dx).wrapping_add(dz.wrapping_mul(dz)) > r.wrapping_mul(r) + } + Kind::DarkOak => { + if y == -1 && !double { + dx == r && dz == r + } else if y == 1 { + dx.wrapping_add(dz) > r.wrapping_mul(2).wrapping_sub(2) + } else { + false + } + } + Kind::RandomSpread { .. } => false, + Kind::Cherry { + wide_bottom_hole, + corner_hole, + .. + } => { + if y == -1 && (dx == r || dz == r) && random.next_float() < *wide_bottom_hole { + return Ok(true); + } + let corner = dx == r && dz == r; + if r > 2 { + corner + || (dx.wrapping_add(dz) > r.wrapping_mul(2).wrapping_sub(2) + && random.next_float() < *corner_hole) + } else { + corner && random.next_float() < *corner_hole + } + } + Kind::Poplar { .. } => unreachable!("poplar uses its own row placement"), + }) + } + fn skip_signed( + &self, + random: &mut impl RandomSource, + dx: i32, + y: i32, + dz: i32, + r: i32, + double: bool, + ) -> Result<bool, horizon_core::random::InvalidBound> { + if matches!(self.kind, Kind::DarkOak) { + let defer = y != 0 + || !double + || (dx != r.wrapping_neg() && dx < r) + || (dz != r.wrapping_neg() && dz < r); + if !defer { + return Ok(true); + } + } + let (mx, mz) = if double { + ( + abs(dx).min(abs(dx.wrapping_sub(1))), + abs(dz).min(abs(dz.wrapping_sub(1))), + ) + } else { + (abs(dx), abs(dz)) + }; + self.skip(random, mx, y, mz, r, double) + } + #[allow(clippy::too_many_arguments)] + fn leaves_row<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + origin: [i32; 3], + r: i32, + y: i32, + double: bool, + ) -> TreeResult<(), W::Error> { + let offset = i32::from(double); + let mut dx = r.wrapping_neg(); + while dx <= r.wrapping_add(offset) { + let mut dz = r.wrapping_neg(); + while dz <= r.wrapping_add(offset) { + if !self.skip_signed(run.random, dx, y, dz, r, double)? { + tree.try_place_leaf(run, tb::offset(origin, dx, y, dz))?; + } + dz += 1; + } + dx += 1; + } + Ok(()) + } + #[allow(clippy::too_many_arguments)] + fn leaves_row_with_hanging<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + origin: [i32; 3], + r: i32, + y: i32, + double: bool, + chance: f32, + extension: f32, + ) -> TreeResult<(), W::Error> { + self.leaves_row(run, tree, origin, r, y, double)?; + let offset = i32::from(double); + let log = tb::offset(origin, 0, -1, 0); + for along in tb::HORIZONTAL { + let to_edge = tb::clockwise(along); + let positive = matches!(to_edge, Direction::East | Direction::South); + let to_edge_offset = if positive { r + offset } else { r }; + let mut pos = tb::relative( + tb::relative(tb::offset(origin, 0, y - 1, 0), to_edge, to_edge_offset), + along, + r.wrapping_neg(), + ); + let mut along_offset = r.wrapping_neg(); + while along_offset < r + offset { + let above = run.foliage_contains(tb::offset(pos, 0, 1, 0)); + if above && Self::try_extension(run, tree, chance, log, pos)? { + Self::try_extension(run, tree, extension, log, tb::offset(pos, 0, -1, 0))?; + } + along_offset += 1; + pos = tb::relative(pos, along, 1); + } + } + Ok(()) + } + fn try_extension<W: FeatureWorld + PlacementContext, R: RandomSource>( + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + chance: f32, + log: [i32; 3], + pos: [i32; 3], + ) -> TreeResult<bool, W::Error> { + if tb::dist_manhattan(pos, log) >= 7 { + return Ok(false); + } + if run.random.next_float() > chance { + return Ok(false); + } + tree.try_place_leaf(run, pos) + } + + pub(super) fn create_foliage<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + _tree_height: i32, + attachment: FoliageAttachment, + foliage_height: i32, + leaf_radius: i32, + ) -> TreeResult<(), W::Error> { + let offset = self.offset.sample(run.random)?; + let double = attachment.double_trunk(); + let pos = attachment.pos; + let with_offset = foliage_height + attachment.height_offset; + match &self.kind { + Kind::Blob(_) => { + let mut yo = offset; + while yo >= offset - with_offset { + let r = 0.max(leaf_radius + attachment.radius_offset - 1 - yo / 2); + self.leaves_row(run, tree, pos, r, yo, double)?; + yo -= 1; + } + } + Kind::Fancy(_) => { + let mut yo = offset; + while yo >= offset - foliage_height { + let r = leaf_radius + i32::from(yo != offset && yo != offset - foliage_height); + self.leaves_row(run, tree, pos, r, yo, double)?; + yo -= 1; + } + } + Kind::Bush(_) => { + let mut yo = offset; + while yo >= offset - with_offset { + let r = leaf_radius + attachment.radius_offset - 1 - yo; + self.leaves_row(run, tree, pos, r, yo, double)?; + yo -= 1; + } + } + Kind::Acacia => { + let p = tb::offset(pos, 0, offset, 0); + self.leaves_row( + run, + tree, + p, + leaf_radius + attachment.radius_offset, + -1 - with_offset, + double, + )?; + self.leaves_row(run, tree, p, leaf_radius - 1, -with_offset, double)?; + self.leaves_row( + run, + tree, + p, + leaf_radius + attachment.radius_offset - 1, + 0, + double, + )?; + } + Kind::Spruce(_) => { + let mut r = run.random.next_int_bound(2)?; + let mut max_r = 1; + let mut min_r = 0; + let mut yo = offset; + while yo >= -with_offset { + self.leaves_row(run, tree, pos, r, yo, double)?; + if r >= max_r { + r = min_r; + min_r = 1; + max_r = (max_r + 1).min(leaf_radius + attachment.radius_offset); + } else { + r += 1; + } + yo -= 1; + } + } + Kind::Pine(_) => { + let mut r = 0; + let mut yo = offset; + while yo >= offset - with_offset { + self.leaves_row(run, tree, pos, r, yo, double)?; + if r >= 1 && yo == offset - with_offset + 1 { + r -= 1; + } else if r < leaf_radius + attachment.radius_offset { + r += 1; + } + yo -= 1; + } + } + Kind::MegaPine(_) => { + let mut previous = 0; + let mut yy = pos[1] - with_offset + offset; + while yy <= pos[1] + offset { + let yo = pos[1] - yy; + let smooth = leaf_radius + .wrapping_add(attachment.radius_offset) + .wrapping_add((yo as f32 / with_offset as f32 * 3.5f32).floor() as i32); + let jagged = if yo > 0 && smooth == previous && (yy & 1) == 0 { + smooth.wrapping_add(1) + } else { + smooth + }; + self.leaves_row(run, tree, [pos[0], yy, pos[2]], jagged, 0, double)?; + previous = smooth; + yy += 1; + } + } + Kind::MegaJungle(_) => { + let leaf_height = (if double { + foliage_height + } else { + 1 + run.random.next_int_bound(2)? + }) + attachment.height_offset; + let mut yo = offset; + while yo >= offset - leaf_height { + let r = leaf_radius + attachment.radius_offset + 1 - yo; + self.leaves_row(run, tree, pos, r, yo, double)?; + yo -= 1; + } + } + Kind::DarkOak => { + let p = tb::offset(pos, 0, offset, 0); + if double { + self.leaves_row(run, tree, p, leaf_radius + 2, -1, double)?; + self.leaves_row(run, tree, p, leaf_radius + 3, 0, double)?; + self.leaves_row(run, tree, p, leaf_radius + 2, 1, double)?; + if run.random.next_boolean() { + self.leaves_row(run, tree, p, leaf_radius, 2, double)?; + } + } else { + self.leaves_row(run, tree, p, leaf_radius + 2, -1, double)?; + self.leaves_row(run, tree, p, leaf_radius + 1, 0, double)?; + } + } + Kind::RandomSpread { attempts, .. } => { + for _ in 0..*attempts { + let dx = run.random.next_int_bound(leaf_radius)? + - run.random.next_int_bound(leaf_radius)?; + let dy = run.random.next_int_bound(foliage_height)? + - run.random.next_int_bound(foliage_height)?; + let dz = run.random.next_int_bound(leaf_radius)? + - run.random.next_int_bound(leaf_radius)?; + tree.try_place_leaf(run, tb::offset(pos, dx, dy, dz))?; + } + } + Kind::Cherry { + hanging, + hanging_extension, + .. + } => { + let p = tb::offset(pos, 0, offset, 0); + let r = leaf_radius + attachment.radius_offset - 1; + self.leaves_row(run, tree, p, r - 2, with_offset - 3, double)?; + self.leaves_row(run, tree, p, r - 1, with_offset - 4, double)?; + let mut y = with_offset - 5; + while y >= 0 { + self.leaves_row(run, tree, p, r, y, double)?; + y -= 1; + } + self.leaves_row_with_hanging( + run, + tree, + p, + r, + -1, + double, + *hanging, + *hanging_extension, + )?; + self.leaves_row_with_hanging( + run, + tree, + p, + r - 1, + -2, + double, + *hanging, + *hanging_extension, + )?; + } + Kind::Poplar { side_hole, .. } => { + let poplar = Poplar { + side_hole: *side_hole, + flip: run.random.next_boolean(), + height: with_offset, + double, + }; + let p = tb::offset(pos, 0, offset, 0); + let r = leaf_radius + attachment.radius_offset - 1; + poplar.row(run, tree, p, r - 2, with_offset - 1)?; + poplar.row(run, tree, p, r - 1, with_offset - 2)?; + poplar.row(run, tree, p, r - 1, with_offset - 3)?; + let mut y = with_offset - 4; + while y >= 1 { + poplar.row(run, tree, p, r, y)?; + y -= 1; + } + poplar.replace_with_log(run, tree, p, r, with_offset - 4)?; + poplar.row(run, tree, p, r - 1, 0)?; + poplar.row(run, tree, p, (r - 2).clamp(1, 2), -1)?; + } + } + Ok(()) + } +} + +struct Poplar { + side_hole: f32, + flip: bool, + height: i32, + double: bool, +} +impl Poplar { + fn partial_row(&self, y: i32) -> bool { + self.height - 1 == y || self.height - 2 == y + } + fn corner_cut(&self, dx: i32, dz: i32, r: i32, partial: bool) -> i32 { + let small = if self.flip { + (dx > 0 && dz > 0) || (dz < 0 && dx < 0) + } else { + (dx > 0 && dz < 0) || (dz > 0 && dx < 0) + }; + if small { + r - 1 + } else if partial { + r + 1 + } else { + r + } + } + fn within(r: i32, adx: i32, adz: i32, cut: i32, extra: i32) -> bool { + adx.wrapping_add(adz) <= r.wrapping_mul(2).wrapping_sub(cut.wrapping_add(extra)) + } + fn skip( + &self, + random: &mut impl RandomSource, + dx: i32, + y: i32, + dz: i32, + r: i32, + ) -> Result<bool, horizon_core::random::InvalidBound> { + let partial = self.partial_row(y); + let cut = self.corner_cut(dx, dz, r, partial); + let (adx, adz) = (abs(dx), abs(dz)); + if partial && (adx == r || adz == r) { + return Ok(true); + } + let extra = i32::from(random.next_float() <= self.side_hole); + Ok(!Self::within(r, adx, adz, cut, extra)) + } + fn row<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + origin: [i32; 3], + r: i32, + y: i32, + ) -> TreeResult<(), W::Error> { + let offset = i32::from(self.double); + let mut dx = r.wrapping_neg(); + while dx <= r + offset { + let mut dz = r.wrapping_neg(); + while dz <= r + offset { + if !self.skip(run.random, dx, y, dz, r)? { + tree.try_place_leaf(run, tb::offset(origin, dx, y, dz))?; + } + dz += 1; + } + dx += 1; + } + Ok(()) + } + fn replace_with_log<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + origin: [i32; 3], + r: i32, + y: i32, + ) -> TreeResult<(), W::Error> { + let offset = i32::from(self.double); + let mut dx = r.wrapping_neg(); + while dx <= r + offset { + let mut dz = r.wrapping_neg(); + while dz <= r + offset { + let (adx, adz) = (abs(dx), abs(dz)); + let cut = self.corner_cut(dx, dz, r, self.partial_row(y)); + if Self::within(r, adx, adz, cut, 2) + && ((adz == 0 && r - adx >= 4) || (adx == 0 && r - adz >= 4)) + { + let pos = tb::offset(origin, dx, y, dz); + let axis = if adz == 0 { Axis::X } else { Axis::Z }; + // The comparison state is sampled from the foliage provider. + let here = read(run.world, pos)?; + let foliage = sample_state(&tree.foliage_provider, run.world, run.random, pos)?; + if here == foliage { + let log = sample_state(&tree.trunk_provider, run.world, run.random, pos)?; + run.set(Layer::Foliage, pos, tree.blocks.try_axis(log, axis))?; + } + } + dz += 1; + } + dx += 1; + } + Ok(()) + } +} diff --git a/crates/horizon-world/src/worldgen/tree/trunk.rs b/crates/horizon-world/src/worldgen/tree/trunk.rs new file mode 100644 index 000000000..b88e88bfc --- /dev/null +++ b/crates/horizon-world/src/worldgen/tree/trunk.rs @@ -0,0 +1,810 @@ +//! Trunk placers (TrunkPlacer subclasses), in native random-draw order. +use super::{ + FoliageAttachment, Layer, Run, TreeDecoder, TreeFeature, TreeResult, kind, read, + sample_optional, sample_state, unit_float, +}; +use crate::registry::BlockStateId; +use crate::worldgen::{ + DecodeError, Object, + feature::FeatureWorld, + int_range, optional, + placement::PlacementContext, + required, + tree_blocks::{self as tb, Axis, TreeBlocks}, + value_provider::IntProvider, +}; +use horizon_core::{geometry::Direction, random::RandomSource}; +use serde_json::value::RawValue; +use std::{collections::BTreeSet, sync::Arc}; + +#[derive(Clone, Debug)] +enum Kind { + Straight, + Forking, + Giant, + MegaJungle, + DarkOak, + Fancy, + Bending { + min_height_for_leaves: i32, + bend_length: IntProvider, + }, + UpwardsBranching { + extra_branch_steps: IntProvider, + branch_probability: f32, + extra_branch_length: IntProvider, + can_grow_through: Arc<BTreeSet<BlockStateId>>, + }, + Cherry { + branch_count: IntProvider, + branch_horizontal_length: IntProvider, + branch_start: [i32; 2], + branch_end_offset: IntProvider, + }, + Poplar { + trunk_height_above_branches: IntProvider, + branch_amount: IntProvider, + }, +} +#[derive(Clone, Debug)] +pub(super) struct TrunkPlacer { + base_height: i32, + height_rand_a: i32, + height_rand_b: i32, + kind: Kind, +} + +fn random_horizontal( + random: &mut impl RandomSource, +) -> Result<Direction, horizon_core::random::InvalidBound> { + Ok(tb::HORIZONTAL[random.next_int_bound(4)? as usize]) +} + +impl TrunkPlacer { + pub(super) fn decode( + raw: &RawValue, + decoder: &mut TreeDecoder<'_, '_>, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(raw.get())?; + let base_height = int_range(required(&object, "base_height")?, "base_height", 0, 32)?; + let height_rand_a = int_range(required(&object, "height_rand_a")?, "height_rand_a", 0, 24)?; + let height_rand_b = int_range(required(&object, "height_rand_b")?, "height_rand_b", 0, 24)?; + let kind = match kind(&object)?.as_str() { + "minecraft:straight_trunk_placer" => Kind::Straight, + "minecraft:forking_trunk_placer" => Kind::Forking, + "minecraft:giant_trunk_placer" => Kind::Giant, + "minecraft:mega_jungle_trunk_placer" => Kind::MegaJungle, + "minecraft:dark_oak_trunk_placer" => Kind::DarkOak, + "minecraft:fancy_trunk_placer" => Kind::Fancy, + "minecraft:bending_trunk_placer" => Kind::Bending { + min_height_for_leaves: optional(&object, "min_height_for_leaves") + .map(|raw| int_range(raw, "min_height_for_leaves", 1, i32::MAX)) + .transpose()? + .unwrap_or(1), + bend_length: decoder.int_provider(required(&object, "bend_length")?, 1, 64)?, + }, + "minecraft:upwards_branching_trunk_placer" => Kind::UpwardsBranching { + extra_branch_steps: decoder.int_provider( + required(&object, "extra_branch_steps")?, + 1, + i32::MAX, + )?, + branch_probability: unit_float( + required(&object, "place_branch_per_log_probability")?, + "place_branch_per_log_probability", + )?, + extra_branch_length: decoder.int_provider( + required(&object, "extra_branch_length")?, + 0, + i32::MAX, + )?, + can_grow_through: decoder.block_set(required(&object, "can_grow_through")?)?, + }, + "minecraft:cherry_trunk_placer" => { + let start: Object = + serde_json::from_str(required(&object, "branch_start_offset_from_top")?.get())?; + if let Some(kind) = optional(&start, "type") { + if serde_json::from_str::<String>(kind.get())? != "minecraft:uniform" { + return Err(DecodeError::Field("cherry branch start type")); + } + } + let min = int_range(required(&start, "min_inclusive")?, "branch start", -16, 0)?; + let max = int_range(required(&start, "max_inclusive")?, "branch start", -16, 0)?; + if max - min < 1 { + return Err(DecodeError::Field("cherry branch start variation")); + } + Kind::Cherry { + branch_count: decoder.int_provider(required(&object, "branch_count")?, 1, 3)?, + branch_horizontal_length: decoder.int_provider( + required(&object, "branch_horizontal_length")?, + 2, + 16, + )?, + branch_start: [min, max], + branch_end_offset: decoder.int_provider( + required(&object, "branch_end_offset_from_top")?, + -16, + 16, + )?, + } + } + "minecraft:poplar_trunk_placer" => Kind::Poplar { + trunk_height_above_branches: decoder.int_provider( + required(&object, "trunk_height_above_branches")?, + 0, + 8, + )?, + branch_amount: decoder.int_provider(required(&object, "branch_amount")?, 1, 4)?, + }, + _ => return Err(DecodeError::Field("trunk placer type")), + }; + Ok(Self { + base_height, + height_rand_a, + height_rand_b, + kind, + }) + } + pub(super) fn tree_height<E>(&self, random: &mut impl RandomSource) -> TreeResult<i32, E> { + let a = random.next_int_bound(self.height_rand_a + 1)?; + let b = random.next_int_bound(self.height_rand_b + 1)?; + Ok(self.base_height + a + b) + } + /// Virtual TrunkPlacer.validTreePos. + fn valid_tree_pos(&self, blocks: &TreeBlocks, state: BlockStateId) -> bool { + blocks.valid_tree_pos(state) + || matches!(&self.kind, Kind::UpwardsBranching { can_grow_through, .. } if can_grow_through.contains(&state)) + } + pub(super) fn is_free(&self, blocks: &TreeBlocks, state: BlockStateId) -> bool { + self.valid_tree_pos(blocks, state) || blocks.has(state, tb::LOGS) + } + fn place_log<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + position: [i32; 3], + axis: Option<Axis>, + ) -> TreeResult<bool, W::Error> { + let here = read(run.world, position)?; + if !self.valid_tree_pos(&tree.blocks, here) { + return Ok(false); + } + let mut state = sample_state(&tree.trunk_provider, run.world, run.random, position)?; + if let Some(axis) = axis { + state = tree.blocks.try_axis(state, axis); + } + run.set(Layer::Trunk, position, state)?; + Ok(true) + } + fn place_log_if_free<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + position: [i32; 3], + ) -> TreeResult<(), W::Error> { + let here = read(run.world, position)?; + if self.is_free(&tree.blocks, here) { + self.place_log(run, tree, position, None)?; + } + Ok(()) + } + fn place_below_trunk<W: FeatureWorld + PlacementContext, R: RandomSource>( + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + position: [i32; 3], + ) -> TreeResult<(), W::Error> { + if let Some(state) = + sample_optional(&tree.below_trunk_provider, run.world, run.random, position)? + { + run.set(Layer::Trunk, position, state)?; + } + Ok(()) + } + pub(super) fn place_trunk<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + tree_height: i32, + origin: [i32; 3], + ) -> TreeResult<Vec<FoliageAttachment>, W::Error> { + let below = tb::offset(origin, 0, -1, 0); + match &self.kind { + Kind::Straight => { + Self::place_below_trunk(run, tree, below)?; + for y in 0..tree_height { + self.place_log(run, tree, tb::offset(origin, 0, y, 0), None)?; + } + Ok(vec![FoliageAttachment::new( + tb::offset(origin, 0, tree_height, 0), + 0, + false, + )]) + } + Kind::Forking => self.forking(run, tree, tree_height, origin), + Kind::Giant => self.giant(run, tree, tree_height, origin), + Kind::MegaJungle => { + let mut attachments = self.giant(run, tree, tree_height, origin)?; + let mut branch_height = tree_height - 2 - run.random.next_int_bound(4)?; + while branch_height > tree_height / 2 { + let angle = run.random.next_float() * (std::f64::consts::PI * 2.0) as f32; + let (mut bx, mut bz) = (0, 0); + for b in 0..5 { + bx = (1.5f32 + + horizon_core::geometry::trig::cos(f64::from(angle)) * b as f32) + as i32; + bz = (1.5f32 + + horizon_core::geometry::trig::sin(f64::from(angle)) * b as f32) + as i32; + let p = tb::offset(origin, bx, branch_height - 3 + b / 2, bz); + self.place_log(run, tree, p, None)?; + } + attachments.push(FoliageAttachment::new( + tb::offset(origin, bx, branch_height, bz), + -2, + false, + )); + branch_height -= 2 + run.random.next_int_bound(4)?; + } + Ok(attachments) + } + Kind::DarkOak => self.dark_oak(run, tree, tree_height, origin), + Kind::Fancy => self.fancy(run, tree, tree_height, origin), + Kind::Bending { + min_height_for_leaves, + bend_length, + } => { + let direction = random_horizontal(run.random)?; + let log_height = tree_height - 1; + let mut pos = origin; + Self::place_below_trunk(run, tree, below)?; + let mut points = Vec::new(); + for i in 0..=log_height { + if i + 1 >= log_height + run.random.next_int_bound(2)? { + pos = tb::relative(pos, direction, 1); + } + if tree.blocks.valid_tree_pos(read(run.world, pos)?) { + self.place_log(run, tree, pos, None)?; + } + if i >= *min_height_for_leaves { + points.push(FoliageAttachment::new(pos, 0, false)); + } + pos = tb::offset(pos, 0, 1, 0); + } + let length = bend_length.sample(run.random)?; + for _ in 0..=length { + if tree.blocks.valid_tree_pos(read(run.world, pos)?) { + self.place_log(run, tree, pos, None)?; + } + points.push(FoliageAttachment::new(pos, 0, false)); + pos = tb::relative(pos, direction, 1); + } + Ok(points) + } + Kind::UpwardsBranching { + extra_branch_steps, + branch_probability, + extra_branch_length, + .. + } => { + let mut attachments = Vec::new(); + for height in 0..tree_height { + let current = origin[1].wrapping_add(height); + let log = [origin[0], current, origin[2]]; + if self.place_log(run, tree, log, None)? + && height < tree_height - 1 + && run.random.next_float() < *branch_probability + { + let direction = random_horizontal(run.random)?; + let length = extra_branch_length.sample(run.random)?; + let branch_pos = + 0.max(length - extra_branch_length.sample(run.random)? - 1); + let steps = extra_branch_steps.sample(run.random)?; + self.upwards_branch( + run, + tree, + tree_height, + &mut attachments, + log, + current, + direction, + branch_pos, + steps, + )?; + } + if height == tree_height - 1 { + attachments.push(FoliageAttachment::new( + [origin[0], current.wrapping_add(1), origin[2]], + 0, + false, + )); + } + } + Ok(attachments) + } + Kind::Cherry { .. } => self.cherry(run, tree, tree_height, origin), + Kind::Poplar { + trunk_height_above_branches, + branch_amount, + } => { + Self::place_below_trunk(run, tree, below)?; + let up_to_branches = + tree_height - trunk_height_above_branches.sample(run.random)?; + for y in 0..tree_height { + let log = tb::offset(origin, 0, y, 0); + self.place_log(run, tree, log, None)?; + let mut all = Direction::ALL; + tb::shuffle(&mut all, run.random)?; + let directions: Vec<Direction> = all + .into_iter() + .filter(|d| !matches!(d, Direction::Up | Direction::Down)) + .collect(); + if up_to_branches - 1 == y { + let branches = branch_amount.sample(run.random)?; + for direction in directions.iter().take(branches.max(0) as usize) { + self.place_log( + run, + tree, + tb::relative(log, *direction, 1), + Some(Axis::of(*direction)), + )?; + } + } + } + Ok(vec![FoliageAttachment::new( + tb::offset(origin, 0, up_to_branches, 0), + 0, + false, + )]) + } + } + } + + fn forking<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + tree_height: i32, + origin: [i32; 3], + ) -> TreeResult<Vec<FoliageAttachment>, W::Error> { + Self::place_below_trunk(run, tree, tb::offset(origin, 0, -1, 0))?; + let mut attachments = Vec::new(); + let lean = random_horizontal(run.random)?; + let lean_height = tree_height - run.random.next_int_bound(4)? - 1; + let mut lean_steps = 3 - run.random.next_int_bound(3)?; + let (mut tx, mut tz) = (origin[0], origin[2]); + let mut ey = None; + for yo in 0..tree_height { + let yy = origin[1].wrapping_add(yo); + if yo >= lean_height && lean_steps > 0 { + let n = lean.normal(); + tx = tx.wrapping_add(n[0]); + tz = tz.wrapping_add(n[2]); + lean_steps -= 1; + } + if self.place_log(run, tree, [tx, yy, tz], None)? { + ey = Some(yy.wrapping_add(1)); + } + } + if let Some(ey) = ey { + attachments.push(FoliageAttachment::new([tx, ey, tz], 1, false)); + } + tx = origin[0]; + tz = origin[2]; + let branch = random_horizontal(run.random)?; + if branch != lean { + let branch_pos = lean_height - run.random.next_int_bound(2)? - 1; + let mut steps = 1 + run.random.next_int_bound(3)?; + let mut ey = None; + let mut yo = branch_pos; + while yo < tree_height && steps > 0 { + if yo >= 1 { + let yy = origin[1].wrapping_add(yo); + let n = branch.normal(); + tx = tx.wrapping_add(n[0]); + tz = tz.wrapping_add(n[2]); + if self.place_log(run, tree, [tx, yy, tz], None)? { + ey = Some(yy.wrapping_add(1)); + } + } + yo += 1; + steps -= 1; + } + if let Some(ey) = ey { + attachments.push(FoliageAttachment::new([tx, ey, tz], 0, false)); + } + } + Ok(attachments) + } + + fn giant<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + tree_height: i32, + origin: [i32; 3], + ) -> TreeResult<Vec<FoliageAttachment>, W::Error> { + let below = tb::offset(origin, 0, -1, 0); + Self::place_below_trunk(run, tree, below)?; + Self::place_below_trunk(run, tree, tb::offset(below, 1, 0, 0))?; + Self::place_below_trunk(run, tree, tb::offset(below, 0, 0, 1))?; + Self::place_below_trunk(run, tree, tb::offset(below, 1, 0, 1))?; + for hh in 0..tree_height { + self.place_log_if_free(run, tree, tb::offset(origin, 0, hh, 0))?; + if hh < tree_height - 1 { + self.place_log_if_free(run, tree, tb::offset(origin, 1, hh, 0))?; + self.place_log_if_free(run, tree, tb::offset(origin, 1, hh, 1))?; + self.place_log_if_free(run, tree, tb::offset(origin, 0, hh, 1))?; + } + } + Ok(vec![FoliageAttachment::new( + tb::offset(origin, 0, tree_height, 0), + 0, + true, + )]) + } + + fn dark_oak<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + tree_height: i32, + origin: [i32; 3], + ) -> TreeResult<Vec<FoliageAttachment>, W::Error> { + let mut attachments = Vec::new(); + let below = tb::offset(origin, 0, -1, 0); + Self::place_below_trunk(run, tree, below)?; + Self::place_below_trunk(run, tree, tb::offset(below, 1, 0, 0))?; + Self::place_below_trunk(run, tree, tb::offset(below, 0, 0, 1))?; + Self::place_below_trunk(run, tree, tb::offset(below, 1, 0, 1))?; + let lean = random_horizontal(run.random)?; + let lean_height = tree_height - run.random.next_int_bound(4)?; + let mut lean_steps = 2 - run.random.next_int_bound(3)?; + let [x, y, z] = origin; + let (mut tx, mut tz) = (x, z); + let ey = y.wrapping_add(tree_height).wrapping_sub(1); + for dy in 0..tree_height { + if dy >= lean_height && lean_steps > 0 { + let n = lean.normal(); + tx = tx.wrapping_add(n[0]); + tz = tz.wrapping_add(n[2]); + lean_steps -= 1; + } + let p = [tx, y.wrapping_add(dy), tz]; + let here = read(run.world, p)?; + if tree.blocks.has(here, tb::AIR | tb::LEAVES) { + self.place_log(run, tree, p, None)?; + self.place_log(run, tree, tb::offset(p, 1, 0, 0), None)?; + self.place_log(run, tree, tb::offset(p, 0, 0, 1), None)?; + self.place_log(run, tree, tb::offset(p, 1, 0, 1), None)?; + } + } + attachments.push(FoliageAttachment::new([tx, ey, tz], 0, true)); + for ox in -1..=2 { + for oz in -1..=2 { + if (!(0..=1).contains(&ox) || !(0..=1).contains(&oz)) + && run.random.next_int_bound(3)? <= 0 + { + let length = run.random.next_int_bound(3)? + 2; + for branch_y in 0..length { + self.place_log( + run, + tree, + [ + x.wrapping_add(ox), + ey.wrapping_sub(branch_y).wrapping_sub(1), + z.wrapping_add(oz), + ], + None, + )?; + } + attachments.push(FoliageAttachment::new( + [x.wrapping_add(ox), ey, z.wrapping_add(oz)], + 0, + false, + )); + } + } + } + Ok(attachments) + } + + #[allow(clippy::too_many_arguments)] + fn upwards_branch<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + tree_height: i32, + attachments: &mut Vec<FoliageAttachment>, + log: [i32; 3], + current_height: i32, + direction: Direction, + branch_pos: i32, + mut steps: i32, + ) -> TreeResult<(), W::Error> { + let mut height_along = current_height.wrapping_add(branch_pos); + let (mut lx, mut lz) = (log[0], log[2]); + let mut index = branch_pos; + let n = direction.normal(); + while index < tree_height && steps > 0 { + if index >= 1 { + let placement = current_height.wrapping_add(index); + lx = lx.wrapping_add(n[0]); + lz = lz.wrapping_add(n[2]); + height_along = placement; + let log = [lx, placement, lz]; + if self.place_log(run, tree, log, None)? { + height_along = height_along.wrapping_add(1); + } + attachments.push(FoliageAttachment::new(log, 0, false)); + } + index += 1; + steps -= 1; + } + if height_along.wrapping_sub(current_height) > 1 { + let foliage = [lx, height_along, lz]; + attachments.push(FoliageAttachment::new(foliage, 0, false)); + attachments.push(FoliageAttachment::new( + tb::offset(foliage, 0, -2, 0), + 0, + false, + )); + } + Ok(()) + } + + fn cherry<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + tree_height: i32, + origin: [i32; 3], + ) -> TreeResult<Vec<FoliageAttachment>, W::Error> { + let Kind::Cherry { + branch_count, + branch_horizontal_length, + branch_start: [start_min, start_max], + branch_end_offset, + } = &self.kind + else { + unreachable!("cherry trunk kind"); + }; + Self::place_below_trunk(run, tree, tb::offset(origin, 0, -1, 0))?; + let first = 0.max( + tree_height - 1 + + run + .random + .next_int_between_inclusive(*start_min, *start_max)?, + ); + let mut second = 0.max( + tree_height - 1 + + run + .random + .next_int_between_inclusive(*start_min, start_max - 1)?, + ); + if second >= first { + second += 1; + } + let count = branch_count.sample(run.random)?; + let middle = count == 3; + let both = count >= 2; + let trunk_height = if middle { + tree_height + } else if both { + first.max(second) + 1 + } else { + first + 1 + }; + for y in 0..trunk_height { + self.place_log(run, tree, tb::offset(origin, 0, y, 0), None)?; + } + let mut attachments = Vec::new(); + if middle { + attachments.push(FoliageAttachment::new( + tb::offset(origin, 0, trunk_height, 0), + 0, + false, + )); + } + let direction = random_horizontal(run.random)?; + let sideways = Axis::of(direction); + let generate = |this: &Self, + run: &mut Run<'_, W, R>, + branch_direction: Direction, + offset: i32, + middle_continues: bool| + -> TreeResult<FoliageAttachment, W::Error> { + let mut log = tb::offset(origin, 0, offset, 0); + let end_offset = tree_height - 1 + branch_end_offset.sample(run.random)?; + let extend = middle_continues || end_offset < offset; + let distance = branch_horizontal_length.sample(run.random)? + i32::from(extend); + let end = tb::offset( + tb::relative(origin, branch_direction, distance), + 0, + end_offset, + 0, + ); + let steps = if extend { 2 } else { 1 }; + for _ in 0..steps { + log = tb::relative(log, branch_direction, 1); + this.place_log(run, tree, log, Some(sideways))?; + } + let vertical = if end[1] > log[1] { + Direction::Up + } else { + Direction::Down + }; + loop { + let distance = tb::dist_manhattan(log, end); + if distance == 0 { + return Ok(FoliageAttachment::new(tb::offset(end, 0, 1, 0), 0, false)); + } + let chance = end[1].wrapping_sub(log[1]).wrapping_abs() as f32 / distance as f32; + let grow_vertically = run.random.next_float() < chance; + log = tb::relative( + log, + if grow_vertically { + vertical + } else { + branch_direction + }, + 1, + ); + this.place_log( + run, + tree, + log, + if grow_vertically { + None + } else { + Some(sideways) + }, + )?; + } + }; + attachments.push(generate( + self, + run, + direction, + first, + first < trunk_height - 1, + )?); + if both { + attachments.push(generate( + self, + run, + direction.opposite(), + second, + second < trunk_height - 1, + )?); + } + Ok(attachments) + } + + fn fancy<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + tree_height: i32, + origin: [i32; 3], + ) -> TreeResult<Vec<FoliageAttachment>, W::Error> { + let height = tree_height + 2; + let trunk_height = (f64::from(height) * 0.618).floor() as i32; + Self::place_below_trunk(run, tree, tb::offset(origin, 0, -1, 0))?; + let clusters_per_y = + 1.min((1.382 + (1.0 * f64::from(height) / 13.0).powf(2.0)).floor() as i32); + let trunk_top = origin[1].wrapping_add(trunk_height); + let mut relative_y = height - 5; + // (attachment position, branch base y) + let mut coords = vec![(tb::offset(origin, 0, relative_y, 0), trunk_top)]; + while relative_y >= 0 { + let shape = tree_shape(height, relative_y); + // tree_shape never returns NaN. + if shape >= 0.0 { + for _ in 0..clusters_per_y { + let radius = + 1.0 * f64::from(shape) * (f64::from(run.random.next_float()) + 0.328); + let angle = f64::from(run.random.next_float() * 2.0f32) * std::f64::consts::PI; + let x = radius * angle.sin() + 0.5; + let z = radius * angle.cos() + 0.5; + let check_start = + tb::offset(origin, x.floor() as i32, relative_y - 1, z.floor() as i32); + let check_end = tb::offset(check_start, 0, 5, 0); + if self.make_limb(run, tree, check_start, check_end, false)? { + let dx = origin[0].wrapping_sub(check_start[0]); + let dz = origin[2].wrapping_sub(check_start[2]); + let branch_height = f64::from(check_start[1]) + - f64::from(dx.wrapping_mul(dx).wrapping_add(dz.wrapping_mul(dz))) + .sqrt() + * 0.381; + let branch_top = if branch_height > f64::from(trunk_top) { + trunk_top + } else { + branch_height as i32 + }; + let base = [origin[0], branch_top, origin[2]]; + if self.make_limb(run, tree, base, check_start, false)? { + coords.push((check_start, base[1])); + } + } + } + } + relative_y -= 1; + } + self.make_limb( + run, + tree, + origin, + tb::offset(origin, 0, trunk_height, 0), + true, + )?; + for (end, branch_base) in &coords { + let base = [origin[0], *branch_base, origin[2]]; + if base != *end && trim_branches(height, branch_base.wrapping_sub(origin[1])) { + self.make_limb(run, tree, base, *end, true)?; + } + } + Ok(coords + .into_iter() + .filter(|(_, base)| trim_branches(height, base.wrapping_sub(origin[1]))) + .map(|(p, _)| FoliageAttachment::new(p, 0, false)) + .collect()) + } + + fn make_limb<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + run: &mut Run<'_, W, R>, + tree: &TreeFeature, + start: [i32; 3], + end: [i32; 3], + place: bool, + ) -> TreeResult<bool, W::Error> { + if !place && start == end { + return Ok(true); + } + let delta: [i32; 3] = std::array::from_fn(|i| end[i].wrapping_sub(start[i])); + let steps = delta[0] + .wrapping_abs() + .max(delta[1].wrapping_abs().max(delta[2].wrapping_abs())); + let step: [f32; 3] = delta.map(|d| d as f32 / steps as f32); + for i in 0..=steps { + let p: [i32; 3] = std::array::from_fn(|axis| { + start[axis].wrapping_add((0.5f32 + i as f32 * step[axis]).floor() as i32) + }); + if place { + let axis = log_axis(start, p); + self.place_log(run, tree, p, Some(axis))?; + } else if !self.is_free(&tree.blocks, read(run.world, p)?) { + return Ok(false); + } + } + Ok(true) + } +} + +fn log_axis(start: [i32; 3], p: [i32; 3]) -> Axis { + let xdiff = p[0].wrapping_sub(start[0]).wrapping_abs(); + let zdiff = p[2].wrapping_sub(start[2]).wrapping_abs(); + let max = xdiff.max(zdiff); + if max > 0 { + if xdiff == max { Axis::X } else { Axis::Z } + } else { + Axis::Y + } +} +fn trim_branches(height: i32, local_y: i32) -> bool { + f64::from(local_y) >= f64::from(height) * 0.2 +} +fn tree_shape(height: i32, y: i32) -> f32 { + if (y as f32) < height as f32 * 0.3f32 { + return -1.0; + } + let radius = height as f32 / 2.0; + let adjacent = radius - y as f32; + let mut distance = (radius * radius - adjacent * adjacent).sqrt(); + if adjacent == 0.0 { + distance = radius; + } else if adjacent.abs() >= radius { + return 0.0; + } + distance * 0.5 +} diff --git a/crates/horizon-world/src/worldgen/tree_blocks.rs b/crates/horizon-world/src/worldgen/tree_blocks.rs new file mode 100644 index 000000000..cffbf0d0e --- /dev/null +++ b/crates/horizon-world/src/worldgen/tree_blocks.rs @@ -0,0 +1,471 @@ +//! Registry-bound block classifications and property transitions shared by tree, +//! fallen-tree and other vegetation features. Built once per binding snapshot. +use super::{ + DecodeError, block_feature::FeatureBlockBindings, state_provider::properties::StateProperties, +}; +use crate::{ + block_properties::BlockProperty, + fluid::FluidKind, + registry::{BlockRegistry, BlockStateId}, +}; +use horizon_core::geometry::Direction; +use std::{collections::BTreeMap, sync::Arc}; + +pub(crate) const AIR: u32 = 1; +pub(crate) const LEAVES: u32 = 1 << 1; +pub(crate) const REPLACEABLE_BY_TREES: u32 = 1 << 2; +pub(crate) const LOGS: u32 = 1 << 3; +pub(crate) const PREVENTS_LEAF_DECAY: u32 = 1 << 4; +pub(crate) const VINE: u32 = 1 << 5; +pub(crate) const WATER_BLOCK: u32 = 1 << 6; +pub(crate) const WATER_SOURCE: u32 = 1 << 7; +pub(crate) const WATER_FLUID: u32 = 1 << 8; +pub(crate) const REPLACEABLE: u32 = 1 << 9; +pub(crate) const SOLID_RENDER: u32 = 1 << 10; +pub(crate) const SHELF_MUSHROOM: u32 = 1 << 11; +pub(crate) const PERSISTENT: u32 = 1 << 12; +pub(crate) const WATERLOGGABLE: u32 = 1 << 13; +pub(crate) const SOLID: u32 = 1 << 14; +pub(crate) const LAVA_FLUID: u32 = 1 << 15; +pub(crate) const ANY_FLUID: u32 = 1 << 16; +pub(crate) const FULL_AXIS: u32 = 1 << 17; +pub(crate) const MUSHROOM_REPLACEABLE: u32 = 1 << 18; +pub(crate) const FIRE: u32 = 1 << 19; +pub(crate) const SCULK_BLOCKER: u32 = 1 << 20; +pub(crate) const SCULK_VEIN: u32 = 1 << 21; +pub(crate) const LIQUID: u32 = 1 << 22; +pub(crate) const FEATURES_CANNOT_REPLACE: u32 = 1 << 23; +pub(crate) const CHEST: u32 = 1 << 24; +pub(crate) const SPAWNER: u32 = 1 << 25; +/// Any source fluid state (water or lava), including waterlogged blocks. +pub(crate) const FLUID_SOURCE: u32 = 1 << 26; +/// Fluid amount 8 (sources and falling fluids). +pub(crate) const FLUID_FULL: u32 = 1 << 27; +pub(crate) const BASE_STONE_OVERWORLD: u32 = 1 << 28; + +/// Immutable per-state facts. Missing tags or blocks are empty classifications. +pub struct TreeBlocks { + flags: Vec<u32>, + /// Native LeavesBlock DISTANCE (1..=7) values; 0 when absent. + distance: Vec<u8>, + /// Block identity (index of the block name) per state. + block: Vec<u32>, + pub(crate) properties: Arc<StateProperties>, + defaults: BTreeMap<String, BlockStateId>, +} +impl std::fmt::Debug for TreeBlocks { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("TreeBlocks") + .field("states", &self.flags.len()) + .finish_non_exhaustive() + } +} +const DEFAULTS: [&str; 20] = [ + "minecraft:cobblestone", + "minecraft:mossy_cobblestone", + "minecraft:chest", + "minecraft:spawner", + "minecraft:ice", + "minecraft:packed_ice", + "minecraft:glow_lichen", + "minecraft:sculk_vein", + "minecraft:vine", + "minecraft:cocoa", + "minecraft:bee_nest", + "minecraft:creaking_heart", + "minecraft:pale_hanging_moss", + "minecraft:shelf_mushroom", + "minecraft:water", + "minecraft:lava", + "minecraft:air", + "minecraft:cave_air", + "minecraft:dirt", + "minecraft:mud", +]; +impl TreeBlocks { + pub(crate) fn build(bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + let registry: &BlockRegistry = bindings.registry(); + let (providers, _, _) = bindings + .simple_blocks + .as_ref() + .ok_or(DecodeError::Field("tree state provider bindings"))?; + let properties = providers.properties()?; + let replaceable = super::block_predicate::PredicateBlockResolver::predicate_property( + bindings, + BlockProperty::Replaceable, + )?; + let solid_render = super::block_predicate::PredicateBlockResolver::predicate_property( + bindings, + BlockProperty::SolidRender, + )?; + let solid = super::block_predicate::PredicateBlockResolver::predicate_property( + bindings, + BlockProperty::Solid, + )?; + let liquid = super::block_predicate::PredicateBlockResolver::predicate_property( + bindings, + BlockProperty::Liquid, + )?; + let mut flags = vec![0u32; registry.len()]; + let mut distance = vec![0u8; registry.len()]; + let mark_tag = |tag: &str, flag: u32, flags: &mut Vec<u32>| { + if let Some(states) = bindings.tags.get(tag) { + for state in states.iter() { + flags[state.0 as usize] |= flag; + } + } + }; + mark_tag("minecraft:leaves", LEAVES, &mut flags); + mark_tag( + "minecraft:replaceable_by_trees", + REPLACEABLE_BY_TREES, + &mut flags, + ); + mark_tag("minecraft:logs", LOGS, &mut flags); + mark_tag( + "minecraft:prevents_nearby_leaf_decay", + PREVENTS_LEAF_DECAY, + &mut flags, + ); + mark_tag( + "minecraft:replaceable_by_mushrooms", + MUSHROOM_REPLACEABLE, + &mut flags, + ); + mark_tag("minecraft:fire", FIRE, &mut flags); + mark_tag( + "minecraft:base_stone_overworld", + BASE_STONE_OVERWORLD, + &mut flags, + ); + mark_tag( + "minecraft:features_cannot_replace", + FEATURES_CANNOT_REPLACE, + &mut flags, + ); + for (name, flag) in [ + ("minecraft:vine", VINE), + ("minecraft:water", WATER_BLOCK), + ("minecraft:shelf_mushroom", SHELF_MUSHROOM), + ("minecraft:sculk", SCULK_BLOCKER), + ("minecraft:sculk_catalyst", SCULK_BLOCKER), + ("minecraft:moving_piston", SCULK_BLOCKER), + ("minecraft:sculk_vein", SCULK_VEIN), + ("minecraft:chest", CHEST), + ("minecraft:spawner", SPAWNER), + ] { + if let Some(states) = bindings.blocks.get(name) { + for state in states.iter() { + flags[state.0 as usize] |= flag; + } + } + } + for air in bindings.air { + flags[air.0 as usize] |= AIR; + } + for index in 0..registry.len() { + let id = BlockStateId(index as u32); + let flag = &mut flags[index]; + if replaceable.contains(id) { + *flag |= REPLACEABLE; + } + if solid_render.contains(id) { + *flag |= SOLID_RENDER; + } + if solid.contains(id) { + *flag |= SOLID; + } + if liquid.contains(id) { + *flag |= LIQUID; + } + if let Some(fluid) = bindings.fluids.state(id) { + match fluid.kind() { + FluidKind::Water => *flag |= WATER_SOURCE | WATER_FLUID | ANY_FLUID, + FluidKind::FlowingWater => *flag |= WATER_FLUID | ANY_FLUID, + FluidKind::Lava | FluidKind::FlowingLava => *flag |= LAVA_FLUID | ANY_FLUID, + FluidKind::Empty => {} + } + if fluid.is_source() { + *flag |= FLUID_SOURCE; + } + if fluid.amount() == 8 { + *flag |= FLUID_FULL; + } + } + if properties.value(id, "persistent") == Some("true") { + *flag |= PERSISTENT; + } + if properties + .values(id, "waterlogged") + .is_some_and(|v| v.len() == 2) + { + *flag |= WATERLOGGABLE; + } + if properties.values(id, "axis").is_some_and(|values| { + values.len() == 3 + && ["x", "y", "z"] + .iter() + .all(|a| values.iter().any(|v| v == a)) + }) { + *flag |= FULL_AXIS; + } + if let Some(values) = properties.values(id, "distance") { + let native = values.len() == 7 + && (1..=7).all(|n| values.iter().any(|v| *v == n.to_string())); + if native { + distance[index] = properties + .value(id, "distance") + .and_then(|v| v.parse().ok()) + .unwrap_or(0); + } + } + } + let mut names = BTreeMap::new(); + let block = (0..registry.len()) + .map(|i| { + let name = ®istry.state(BlockStateId(i as u32)).unwrap().name; + let next = names.len() as u32; + *names.entry(name.clone()).or_insert(next) + }) + .collect(); + let defaults = DEFAULTS + .iter() + .filter_map(|name| { + registry + .default_state(name) + .map(|id| ((*name).to_owned(), id)) + }) + .collect(); + Ok(Self { + flags, + distance, + block, + properties, + defaults, + }) + } + pub(crate) fn has(&self, state: BlockStateId, flag: u32) -> bool { + self.flags + .get(state.0 as usize) + .is_some_and(|value| value & flag != 0) + } + /// BlockState.is(Block): same block, any properties. + pub(crate) fn same_block(&self, a: BlockStateId, b: BlockStateId) -> bool { + self.block.get(a.0 as usize) == self.block.get(b.0 as usize) + } + pub(crate) fn is_air(&self, state: BlockStateId) -> bool { + self.has(state, AIR) + } + /// TreeFeature.validTreePos: air or replaceable by trees. + pub(crate) fn valid_tree_pos(&self, state: BlockStateId) -> bool { + self.has(state, AIR | REPLACEABLE_BY_TREES) + } + /// LeavesBlock.getOptionalDistanceAt. + pub(crate) fn leaf_distance(&self, state: BlockStateId) -> Option<i32> { + if self.has(state, PREVENTS_LEAF_DECAY) { + return Some(0); + } + match self.distance.get(state.0 as usize) { + Some(0) | None => None, + Some(d) => Some(i32::from(*d)), + } + } + pub(crate) fn default_state(&self, name: &str) -> Option<BlockStateId> { + self.defaults.get(name).copied() + } + pub(crate) fn with( + &self, + state: BlockStateId, + name: &str, + value: &str, + ) -> Option<BlockStateId> { + self.properties.with_value(state, name, value) + } + /// BlockState.trySetValue(RotatedPillarBlock.AXIS, axis). + pub(crate) fn try_axis(&self, state: BlockStateId, axis: Axis) -> BlockStateId { + if self.has(state, FULL_AXIS) { + self.with(state, "axis", axis.name()).unwrap_or(state) + } else { + state + } + } + /// Set WATERLOGGED when the state has that property; otherwise unchanged. + pub(crate) fn waterlogged(&self, state: BlockStateId, value: bool) -> BlockStateId { + if self.has(state, WATERLOGGABLE) { + self.with(state, "waterlogged", if value { "true" } else { "false" }) + .unwrap_or(state) + } else { + state + } + } +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub(crate) enum Axis { + X, + Y, + Z, +} +impl Axis { + pub(crate) fn name(self) -> &'static str { + match self { + Self::X => "x", + Self::Y => "y", + Self::Z => "z", + } + } + pub(crate) fn of(direction: Direction) -> Self { + match direction { + Direction::West | Direction::East => Self::X, + Direction::Down | Direction::Up => Self::Y, + Direction::North | Direction::South => Self::Z, + } + } +} + +/// Direction.Plane.HORIZONTAL order. +pub(crate) const HORIZONTAL: [Direction; 4] = [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, +]; +pub(crate) fn clockwise(direction: Direction) -> Direction { + match direction { + Direction::North => Direction::East, + Direction::East => Direction::South, + Direction::South => Direction::West, + Direction::West => Direction::North, + other => other, + } +} +pub(crate) fn direction_name(direction: Direction) -> &'static str { + match direction { + Direction::Down => "down", + Direction::Up => "up", + Direction::North => "north", + Direction::South => "south", + Direction::West => "west", + Direction::East => "east", + } +} +pub(crate) fn decode_direction(name: &str) -> Result<Direction, DecodeError> { + Direction::ALL + .into_iter() + .find(|d| direction_name(*d) == name) + .ok_or(DecodeError::Field("direction")) +} +pub(crate) fn offset(p: [i32; 3], dx: i32, dy: i32, dz: i32) -> [i32; 3] { + [ + p[0].wrapping_add(dx), + p[1].wrapping_add(dy), + p[2].wrapping_add(dz), + ] +} +pub(crate) fn relative(p: [i32; 3], direction: Direction, distance: i32) -> [i32; 3] { + let n = direction.normal(); + offset( + p, + n[0].wrapping_mul(distance), + n[1].wrapping_mul(distance), + n[2].wrapping_mul(distance), + ) +} +/// Vec3i.distManhattan, including its float accumulation. +pub(crate) fn dist_manhattan(a: [i32; 3], b: [i32; 3]) -> i32 { + let d = |i: usize| b[i].wrapping_sub(a[i]).wrapping_abs() as f32; + (d(0) + d(1) + d(2)) as i32 +} + +/// Java HashSet<BlockPos> with native bucket iteration order. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub(crate) struct JavaPos(pub [i32; 3]); +impl crate::java_hash_map::JavaKey for JavaPos { + fn java_hash(&self) -> i32 { + let [x, y, z] = self.0; + y.wrapping_add(z.wrapping_mul(31)) + .wrapping_mul(31) + .wrapping_add(x) + } + fn tie_break(&self, other: &Self) -> std::cmp::Ordering { + // BlockPos is not self-Comparable for HashMap; vanilla falls back to + // identity hashes, which are not reproducible. Any total order works. + let key = |p: &Self| (p.0[1], p.0[2], p.0[0]); + match key(self).cmp(&key(other)) { + std::cmp::Ordering::Equal => std::cmp::Ordering::Less, + ordering => ordering, + } + } +} +#[derive(Default)] +pub(crate) struct PosSet(crate::java_hash_map::JavaHashMap<JavaPos, ()>); +impl PosSet { + pub(crate) fn insert(&mut self, p: [i32; 3]) -> bool { + self.0.put(JavaPos(p), ()).is_none() + } + pub(crate) fn contains(&self, p: [i32; 3]) -> bool { + self.0.get(&JavaPos(p)).is_some() + } + pub(crate) fn is_empty(&self) -> bool { + self.0.is_empty() + } + /// Iteration order of the native set. + pub(crate) fn to_vec(&self) -> Vec<[i32; 3]> { + self.0.entries().map(|(k, _)| k.0).collect() + } + /// iterator().next() followed by iterator.remove(). + pub(crate) fn pop_first(&mut self) -> Option<[i32; 3]> { + let mut cursor = self.0.cursor(); + let first = self.0.next_entry(&mut cursor).ok().flatten()?.0.0; + self.0.remove_current(&mut cursor).ok()?; + Some(first) + } +} + +/// Util.shuffle (Fisher-Yates from the end with nextInt(i)). +pub(crate) fn shuffle<T>( + values: &mut [T], + random: &mut impl horizon_core::random::RandomSource, +) -> Result<(), horizon_core::random::InvalidBound> { + for i in (2..=values.len()).rev() { + let swap = random.next_int_bound(i as i32)? as usize; + values.swap(i - 1, swap); + } + Ok(()) +} + +#[cfg(test)] +mod tests { + use super::*; + use horizon_core::random::{LegacyRandom, RandomSource}; + #[test] + fn pos_set_iterates_in_java_hash_bucket_order() { + let mut set = PosSet::default(); + let inserted = [[0, 64, 1], [1, 64, 0], [0, 65, 0], [0, 64, 0]]; + for p in inserted { + set.insert(p); + } + // BlockPos.hashCode spread by h ^ (h >>> 16) into 16 buckets; ties keep + // insertion order within a bucket. + let mut expected = inserted.to_vec(); + expected.sort_by_key(|p| { + let h = crate::java_hash_map::JavaKey::java_hash(&JavaPos(*p)) as u32; + (h ^ (h >> 16)) & 15 + }); + assert_eq!(set.to_vec(), expected); + assert_eq!(set.pop_first(), Some(expected[0])); + assert!(!set.contains(expected[0])); + } + #[test] + fn fisher_yates_matches_native_draw_order() { + let mut values = [0, 1, 2, 3]; + shuffle(&mut values, &mut LegacyRandom::new(42)).unwrap(); + let mut reference = [0, 1, 2, 3]; + let mut random = LegacyRandom::new(42); + for i in (2..=4).rev() { + let j = random.next_int_bound(i).unwrap() as usize; + reference.swap(i as usize - 1, j); + } + assert_eq!(values, reference); + } +} diff --git a/crates/horizon-world/src/worldgen/underwater_magma.rs b/crates/horizon-world/src/worldgen/underwater_magma.rs new file mode 100644 index 000000000..0729fa3f0 --- /dev/null +++ b/crates/horizon-world/src/worldgen/underwater_magma.rs @@ -0,0 +1,187 @@ +//! Water-column floor scans and randomized magma replacement in occluded cells. +use super::{ + DecodeError, Object, block_feature::FeatureBlockBindings, + block_predicate::PredicateBlockResolver, feature::FeatureWorld, int_range, number_text, + required, +}; +use crate::{block_properties::BoundOcclusionFaces, registry::BlockStateId}; +use horizon_core::{geometry::Direction, random::RandomSource}; +use std::{collections::BTreeSet, sync::Arc}; +#[derive(Clone, Debug)] +pub struct UnderwaterMagmaFeature { + search: i32, + radius: i32, + probability: f32, + water: Arc<BTreeSet<BlockStateId>>, + air: [BlockStateId; 3], + magma: BlockStateId, + faces: BoundOcclusionFaces, +} +#[derive(Debug)] +pub enum UnderwaterMagmaError<E> { + World(E), + Registry(std::io::Error), + InvalidColumn, + WorkLimit, +} +impl<E: std::fmt::Display> std::fmt::Display for UnderwaterMagmaError<E> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::World(e) => e.fmt(f), + Self::Registry(e) => e.fmt(f), + Self::InvalidColumn => f.write_str("negative scanned column height"), + Self::WorkLimit => f.write_str("magma placement work limit exceeded"), + } + } +} +impl<E: std::error::Error + 'static> std::error::Error for UnderwaterMagmaError<E> {} +impl UnderwaterMagmaFeature { + pub fn from_json(json: &str, bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let probability = number_text(required( + &object, + "placement_probability_per_valid_position", + )?)? + .parse::<f64>() + .map_err(|_| DecodeError::Field("magma probability"))? as f32; + if !(0.0..=1.0).contains(&probability) || probability.is_sign_negative() { + return Err(DecodeError::Field("magma probability")); + } + Ok(Self { + search: int_range( + required(&object, "floor_search_range")?, + "magma floor range", + 0, + 512, + )?, + radius: int_range( + required(&object, "placement_radius_around_floor")?, + "magma radius", + 0, + 64, + )?, + probability, + water: bindings.predicate_block_set(r#""minecraft:water""#)?, + air: bindings.air, + magma: bindings + .registry() + .default_state("minecraft:magma_block") + .ok_or(DecodeError::Field("magma block"))?, + faces: bindings + .occlusion_faces + .clone() + .ok_or(DecodeError::Field("magma occlusion bindings"))?, + }) + } + pub fn place<W: FeatureWorld>( + &self, + world: &mut W, + random: &mut impl RandomSource, + origin: [i32; 3], + ) -> Result<bool, UnderwaterMagmaError<W::Error>> { + if !self + .water + .contains(&world.block(origin).map_err(UnderwaterMagmaError::World)?) + { + return Ok(false); + } + let ceiling = self.scan(world, origin, 1)?; + let floor = self.scan(world, origin, -1)?; + if let (Some(floor), Some(ceiling)) = (floor, ceiling) { + if ceiling.wrapping_sub(floor).wrapping_sub(1) < 0 { + return Err(UnderwaterMagmaError::InvalidColumn); + } + } + let Some(y) = floor else { + return Ok(false); + }; + let center = [origin[0], y, origin[2]]; + let a: [i32; 3] = std::array::from_fn(|i| center[i].wrapping_sub(self.radius)); + let b: [i32; 3] = std::array::from_fn(|i| center[i].wrapping_add(self.radius)); + let min: [i32; 3] = std::array::from_fn(|i| a[i].min(b[i])); + let sizes: [i32; 3] = + std::array::from_fn(|i| a[i].max(b[i]).wrapping_sub(min[i]).wrapping_add(1)); + let count = sizes[0].wrapping_mul(sizes[1]).wrapping_mul(sizes[2]); + let mut index: i32 = 0; + let mut any = false; + while index != count { + // Includes the full valid radius-64 cube (2,146,689 positions). + if index == 8_388_608 { + return Err(UnderwaterMagmaError::WorkLimit); + } + let quotient = index / sizes[0]; + let p = [ + min[0].wrapping_add(index % sizes[0]), + min[1].wrapping_add(quotient % sizes[1]), + min[2].wrapping_add(quotient / sizes[1]), + ]; + index += 1; + if random.next_float() < self.probability && self.valid(world, p)? { + world + .set_block(p, self.magma, 2) + .map_err(UnderwaterMagmaError::World)?; + any = true; + } + } + Ok(any) + } + fn scan<W: FeatureWorld>( + &self, + world: &mut W, + mut p: [i32; 3], + step: i32, + ) -> Result<Option<i32>, UnderwaterMagmaError<W::Error>> { + let mut distance = 1; + while distance < self.search { + if !self + .water + .contains(&world.block(p).map_err(UnderwaterMagmaError::World)?) + { + break; + } + p[1] = p[1].wrapping_add(step); + distance += 1; + } + Ok((!self + .water + .contains(&world.block(p).map_err(UnderwaterMagmaError::World)?)) + .then_some(p[1])) + } + fn valid<W: FeatureWorld>( + &self, + world: &mut W, + p: [i32; 3], + ) -> Result<bool, UnderwaterMagmaError<W::Error>> { + let state = world.block(p).map_err(UnderwaterMagmaError::World)?; + if self.water.contains(&state) || self.air.contains(&state) { + return Ok(false); + } + if !self.occluded(world, [p[0], p[1].wrapping_sub(1), p[2]], Direction::Up)? { + return Ok(false); + } + for direction in [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, + ] { + let step = direction.normal(); + let at = std::array::from_fn(|i| p[i].wrapping_add(step[i])); + if !self.occluded(world, at, direction.opposite())? { + return Ok(false); + } + } + Ok(true) + } + fn occluded<W: FeatureWorld>( + &self, + world: &mut W, + p: [i32; 3], + direction: Direction, + ) -> Result<bool, UnderwaterMagmaError<W::Error>> { + let state = world.block(p).map_err(UnderwaterMagmaError::World)?; + self.faces + .is_full(state, direction) + .map_err(UnderwaterMagmaError::Registry) + } +} diff --git a/crates/horizon-world/src/worldgen/value_provider.rs b/crates/horizon-world/src/worldgen/value_provider.rs new file mode 100644 index 000000000..ba081e3e9 --- /dev/null +++ b/crates/horizon-world/src/worldgen/value_provider.rs @@ -0,0 +1,275 @@ +//! Scalar distributions used by cave/canyon definitions. Gaussian providers +//! remain separate work; this module does not yet cover every provider. +use super::weighted::WeightedList; +use super::{DecodeError, Object, density::identifier, integer, number_text, required}; +use horizon_core::random::{InvalidBound, RandomSource}; +use serde_json::value::RawValue; + +#[derive(Clone, Debug)] +pub enum FloatProvider { + Constant(f32), + Uniform { + min: f32, + max: f32, + }, + Trapezoid { + min: f32, + max: f32, + plateau: f32, + }, + ClampedNormal { + mean: f32, + deviation: f32, + min: f32, + max: f32, + }, +} +impl FloatProvider { + pub fn from_json(json: &str) -> Result<Self, DecodeError> { + let raw: Box<RawValue> = serde_json::from_str(json)?; + if let Ok(value) = float(&raw) { + return Ok(Self::Constant(if value == 0. { 0. } else { value })); + } + let object: Object = serde_json::from_str(raw.get())?; + let field = |name| required(&object, name).and_then(float); + match kind(&object)?.as_str() { + "minecraft:constant" => { + let value = field("value")?; + Ok(Self::Constant(if value == 0. { 0. } else { value })) + } + "minecraft:uniform" => { + let (min, max) = (field("min_inclusive")?, field("max_exclusive")?); + if max <= min { + return Err(DecodeError::Field("uniform float bounds")); + } + Ok(Self::Uniform { min, max }) + } + "minecraft:trapezoid" => { + let (min, max, plateau) = (field("min")?, field("max")?, field("plateau")?); + if max < min || plateau > max - min { + return Err(DecodeError::Field("trapezoid float bounds")); + } + Ok(Self::Trapezoid { min, max, plateau }) + } + "minecraft:clamped_normal" => { + let (min, max) = (field("min")?, field("max")?); + if max < min { + return Err(DecodeError::Field("clamped normal float bounds")); + } + Ok(Self::ClampedNormal { + mean: field("mean")?, + deviation: field("deviation")?, + min, + max, + }) + } + _ => Err(DecodeError::Field("float provider type")), + } + } + pub fn bounds(&self) -> [f32; 2] { + match *self { + Self::Constant(value) => [value; 2], + Self::Uniform { min, max } + | Self::Trapezoid { min, max, .. } + | Self::ClampedNormal { min, max, .. } => [min, max], + } + } + pub fn sample(&self, random: &mut impl RandomSource) -> f32 { + match *self { + Self::Constant(value) => value, + Self::Uniform { min, max } => random.next_float() * (max - min) + min, + Self::Trapezoid { min, max, plateau } => { + let range = max - min; + let slope = (range - plateau) / 2.; + let middle = range - slope; + (min + random.next_float() * middle) + random.next_float() * slope + } + Self::ClampedNormal { + mean, + deviation, + min, + max, + } => { + let value = mean + random.next_gaussian() as f32 * deviation; + if value < min { min } else { value.min(max) } + } + } + } +} + +#[derive(Clone, Debug)] +pub enum IntProvider { + Weighted(WeightedList<Self>), + Constant(i32), + Uniform { + min: i32, + max: i32, + }, + BiasedToBottom { + min: i32, + max: i32, + }, + VeryBiasedToBottom { + min: i32, + max: i32, + }, + Trapezoid { + min: i32, + max: i32, + plateau: i32, + }, + Clamped { + source: Box<Self>, + min: i32, + max: i32, + }, + ClampedNormal { + mean: f32, + deviation: f32, + min: i32, + max: i32, + }, +} +impl IntProvider { + pub fn from_json(json: &str) -> Result<Self, DecodeError> { + let raw: Box<RawValue> = serde_json::from_str(json)?; + Self::decode(&raw, 0, &mut 65536) + } + pub(crate) fn decode( + raw: &RawValue, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + if depth > 256 || *remaining == 0 { + return Err(DecodeError::Field("integer provider depth")); + } + *remaining -= 1; + if let Ok(value) = integer(raw) { + return Ok(Self::Constant(value)); + } + let object: Object = serde_json::from_str(raw.get())?; + let kind = kind(&object)?; + let field = |name| required(&object, name).and_then(integer); + if kind == "minecraft:constant" { + return Ok(Self::Constant(field("value")?)); + } + if kind == "minecraft:weighted_list" { + return Ok(Self::Weighted(WeightedList::decode( + required(&object, "distribution")?, + |raw| Self::decode(raw, depth + 1, remaining), + )?)); + } + let trapezoid = kind == "minecraft:trapezoid"; + let min = field(if trapezoid { "min" } else { "min_inclusive" })?; + let max = field(if trapezoid { "max" } else { "max_inclusive" })?; + if max < min { + return Err(DecodeError::Field("integer provider bounds")); + } + match kind.as_str() { + "minecraft:uniform" => Ok(Self::Uniform { min, max }), + "minecraft:biased_to_bottom" => Ok(Self::BiasedToBottom { min, max }), + "minecraft:very_biased_to_bottom" => Ok(Self::VeryBiasedToBottom { min, max }), + "minecraft:trapezoid" => { + let plateau = field("plateau")?; + if plateau > max.wrapping_sub(min) { + return Err(DecodeError::Field("integer provider plateau")); + } + Ok(Self::Trapezoid { min, max, plateau }) + } + "minecraft:clamped_normal" => Ok(Self::ClampedNormal { + mean: required(&object, "mean").and_then(float)?, + deviation: required(&object, "deviation").and_then(float)?, + min, + max, + }), + "minecraft:clamped" => Ok(Self::Clamped { + source: Box::new(Self::decode( + required(&object, "source")?, + depth + 1, + remaining, + )?), + min, + max, + }), + _ => Err(DecodeError::Field("integer provider type")), + } + } + pub fn bounds(&self) -> [i32; 2] { + match self { + Self::Weighted(list) => { + list.entries() + .iter() + .fold([i32::MAX, i32::MIN], |bounds, (provider, _)| { + let next = provider.bounds(); + [bounds[0].min(next[0]), bounds[1].max(next[1])] + }) + } + Self::Constant(value) => [*value; 2], + Self::Uniform { min, max } + | Self::BiasedToBottom { min, max } + | Self::VeryBiasedToBottom { min, max } + | Self::Trapezoid { min, max, .. } + | Self::ClampedNormal { min, max, .. } => [*min, *max], + Self::Clamped { source, min, max } => { + let bounds = source.bounds(); + [(*min).max(bounds[0]), (*max).min(bounds[1])] + } + } + } + pub fn sample(&self, random: &mut impl RandomSource) -> Result<i32, InvalidBound> { + match self { + Self::Weighted(list) => list.sample(random)?.sample(random), + Self::Constant(value) => Ok(*value), + Self::Uniform { min, max } => random.next_int_between_inclusive(*min, *max), + Self::BiasedToBottom { min, max } | Self::VeryBiasedToBottom { min, max } => { + let mut value = random.next_int_bound(max.wrapping_sub(*min).wrapping_add(1))?; + value = random.next_int_bound(value.wrapping_add(1))?; + if matches!(self, Self::VeryBiasedToBottom { .. }) { + value = random.next_int_bound(value.wrapping_add(1))?; + } + Ok(min.wrapping_add(value)) + } + Self::Trapezoid { min, max, plateau } => { + if *plateau == 0 && *max == min.wrapping_neg() { + let left = random.next_int_bound(max.wrapping_add(1))?; + let right = random.next_int_bound(max.wrapping_add(1))?; + return Ok(left.wrapping_sub(right)); + } + let range = max.wrapping_sub(*min); + if *plateau == range { + return random.next_int_between_inclusive(*min, *max); + } + let slope = range.wrapping_sub(*plateau) / 2; + let middle = range.wrapping_sub(slope); + let left = random.next_int_between_inclusive(0, middle)?; + let right = random.next_int_between_inclusive(0, slope)?; + Ok(min.wrapping_add(left).wrapping_add(right)) + } + Self::Clamped { source, min, max } => { + let value = source.sample(random)?; + Ok(if value < *min { *min } else { value.min(*max) }) + } + // Mth.normal, then float Mth.clamp and a saturating int cast. + Self::ClampedNormal { + mean, + deviation, + min, + max, + } => { + let value = mean + random.next_gaussian() as f32 * deviation; + let (min, max) = (*min as f32, *max as f32); + Ok((if value < min { min } else { value.min(max) }) as i32) + } + } + } +} +fn float(raw: &RawValue) -> Result<f32, DecodeError> { + number_text(raw)? + .parse() + .map_err(|_| DecodeError::Field("float provider number")) +} +fn kind(object: &Object) -> Result<String, DecodeError> { + identifier(&serde_json::from_str::<String>( + required(object, "type")?.get(), + )?) +} diff --git a/crates/horizon-world/src/worldgen/vegetation.rs b/crates/horizon-world/src/worldgen/vegetation.rs new file mode 100644 index 000000000..03685244a --- /dev/null +++ b/crates/horizon-world/src/worldgen/vegetation.rs @@ -0,0 +1,847 @@ +//! Vegetation and cave-decoration features: vegetation patches (plain and +//! waterlogged), coral trees/claws, huge mushrooms and multiface growth. +use super::{ + DecodeError, Object, + block_feature::FeatureBlockBindings, + block_predicate::BlockPredicate, + feature::FeatureWorld, + feature_graph::{FeatureExecutionError, PlacedFeatureDefinition}, + int_range, optional, + placement::PlacementContext, + required, + state_provider::BlockStateProvider, + tree::{TreeDecoder, TreeResult, kind, read, sample_state, unit_float, write}, + tree_blocks::{self as tb, PosSet, TreeBlocks}, + value_provider::IntProvider, +}; +use crate::registry::BlockStateId; +use horizon_core::{geometry::Direction, random::RandomSource}; +use std::{collections::BTreeSet, sync::Arc}; + +/// Places a nested placed feature with the caller's run budget. +pub(crate) type PlacedPlacer<'a, W, R> = dyn FnMut( + &PlacedFeatureDefinition, + &mut W, + &mut R, + [i32; 3], + ) -> TreeResult<bool, <W as FeatureWorld>::Error> + + 'a; +pub(crate) type PlacedDecoder<'a> = + dyn Fn(&str, usize, &mut usize) -> Result<PlacedFeatureDefinition, DecodeError> + 'a; + +fn query<E>(error: super::placement::PlacementQueryError) -> FeatureExecutionError<E> { + FeatureExecutionError::Query(error) +} + +#[derive(Clone, Debug)] +pub struct VegetationPatchFeature { + replaceable: Arc<BTreeSet<BlockStateId>>, + ground: BlockStateProvider, + vegetation: Box<PlacedFeatureDefinition>, + /// CaveSurface direction: DOWN for floor, UP for ceiling. + inwards: Direction, + depth: IntProvider, + extra_bottom: f32, + vertical_range: i32, + vegetation_chance: f32, + xz_radius: IntProvider, + extra_edge: f32, + waterlogged: bool, + blocks: Arc<TreeBlocks>, +} +impl VegetationPatchFeature { + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + nested: &PlacedDecoder<'_>, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let waterlogged = match kind(&object)?.as_str() { + "minecraft:vegetation_patch" => false, + "minecraft:waterlogged_vegetation_patch" => true, + _ => return Err(DecodeError::Field("vegetation patch type")), + }; + let blocks = bindings.tree_blocks()?; + let mut decoder = TreeDecoder { + bindings, + depth, + remaining, + }; + let surface: String = serde_json::from_str(required(&object, "surface")?.get())?; + let inwards = match surface.as_str() { + "floor" => Direction::Down, + "ceiling" => Direction::Up, + _ => return Err(DecodeError::Field("cave surface")), + }; + let vegetation = nested( + required(&object, "vegetation_feature")?.get(), + depth + 1, + decoder.remaining, + )?; + Ok(Self { + replaceable: decoder.block_set(required(&object, "replaceable")?)?, + ground: decoder.provider(required(&object, "ground_state")?)?, + vegetation: Box::new(vegetation), + inwards, + depth: decoder.int_provider(required(&object, "depth")?, 1, 128)?, + extra_bottom: unit_float( + required(&object, "extra_bottom_block_chance")?, + "extra_bottom_block_chance", + )?, + vertical_range: int_range( + required(&object, "vertical_range")?, + "vertical_range", + 1, + 256, + )?, + vegetation_chance: unit_float( + required(&object, "vegetation_chance")?, + "vegetation_chance", + )?, + xz_radius: IntProvider::decode( + required(&object, "xz_radius")?, + depth + 1, + decoder.remaining, + )?, + extra_edge: unit_float( + required(&object, "extra_edge_column_chance")?, + "extra_edge_column_chance", + )?, + waterlogged, + blocks, + }) + } + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + nested: &mut PlacedPlacer<'_, W, R>, + ) -> TreeResult<bool, W::Error> { + let x_radius = self.xz_radius.sample(random)?.wrapping_add(1); + let z_radius = self.xz_radius.sample(random)?.wrapping_add(1); + let mut surface = self.ground_patch(world, random, origin, x_radius, z_radius)?; + if self.waterlogged { + let mut water = PosSet::default(); + for p in surface.to_vec() { + let mut exposed = false; + for direction in [ + Direction::North, + Direction::East, + Direction::South, + Direction::West, + Direction::Down, + ] { + let q = tb::relative(p, direction, 1); + let state = read(world, q)?; + if !world + .state_face_sturdy(state, q, direction.opposite()) + .map_err(query)? + { + exposed = true; + break; + } + } + if !exposed { + water.insert(p); + } + } + let water_state = self + .blocks + .default_state("minecraft:water") + .ok_or(FeatureExecutionError::InvalidState)?; + for p in water.to_vec() { + write(world, p, water_state, 2)?; + } + surface = water; + } + let positions = surface.to_vec(); + for p in &positions { + if self.vegetation_chance > 0.0 && random.next_float() < self.vegetation_chance { + self.place_vegetation(world, random, *p, nested)?; + } + } + Ok(!positions.is_empty()) + } + fn place_vegetation<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + position: [i32; 3], + nested: &mut PlacedPlacer<'_, W, R>, + ) -> TreeResult<bool, W::Error> { + let outwards = self.inwards.opposite(); + if !self.waterlogged { + return nested( + &self.vegetation, + world, + random, + tb::relative(position, outwards, 1), + ); + } + // WaterloggedVegetationPatchFeature passes placementPos.below() to super. + let below = tb::offset(position, 0, -1, 0); + if nested( + &self.vegetation, + world, + random, + tb::relative(below, outwards, 1), + )? { + let placed = read(world, position)?; + if self.blocks.has(placed, tb::WATERLOGGABLE) + && self.blocks.properties.value(placed, "waterlogged") == Some("false") + { + write(world, position, self.blocks.waterlogged(placed, true), 2)?; + } + return Ok(true); + } + Ok(false) + } + fn ground_patch<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + x_radius: i32, + z_radius: i32, + ) -> TreeResult<PosSet, W::Error> { + let inwards = self.inwards; + let outwards = inwards.opposite(); + let mut surface = PosSet::default(); + let mut dx = x_radius.wrapping_neg(); + while dx <= x_radius { + let x_edge = dx == x_radius.wrapping_neg() || dx == x_radius; + let mut dz = z_radius.wrapping_neg(); + while dz <= z_radius { + let z_edge = dz == z_radius.wrapping_neg() || dz == z_radius; + let edge = x_edge || z_edge; + let corner = x_edge && z_edge; + let edge_not_corner = edge && !corner; + if !corner + && (!edge_not_corner + || (self.extra_edge != 0.0 && random.next_float() <= self.extra_edge)) + { + let mut pos = tb::offset(origin, dx, 0, dz); + let mut offset = 0; + while self.blocks.is_air(read(world, pos)?) && offset < self.vertical_range { + pos = tb::relative(pos, inwards, 1); + offset += 1; + } + let mut offset = 0; + while !self.blocks.is_air(read(world, pos)?) && offset < self.vertical_range { + pos = tb::relative(pos, outwards, 1); + offset += 1; + } + let below = tb::relative(pos, inwards, 1); + let below_state = read(world, below)?; + if self.blocks.is_air(read(world, pos)?) + && world + .state_face_sturdy(below_state, below, outwards) + .map_err(query)? + { + let depth = self.depth.sample(random)?.wrapping_add(i32::from( + self.extra_bottom > 0.0 && random.next_float() < self.extra_bottom, + )); + if self.place_ground(world, random, below, depth)? { + surface.insert(below); + } + } + } + dz += 1; + } + dx += 1; + } + Ok(surface) + } + fn place_ground<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + mut below: [i32; 3], + depth: i32, + ) -> TreeResult<bool, W::Error> { + for i in 0..depth { + let state = sample_state(&self.ground, world, random, below)?; + let existing = read(world, below)?; + if !self.blocks.same_block(state, existing) { + if !self.replaceable.contains(&existing) { + return Ok(i != 0); + } + write(world, below, state, 2)?; + below = tb::relative(below, self.inwards, 1); + } + } + Ok(true) + } +} + +#[derive(Clone, Debug)] +pub struct CoralFeature { + claw: bool, + feature: Box<PlacedFeatureDefinition>, +} +impl CoralFeature { + pub(crate) fn decode( + json: &str, + depth: usize, + remaining: &mut usize, + nested: &PlacedDecoder<'_>, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let claw = match kind(&object)?.as_str() { + "minecraft:coral_tree" => false, + "minecraft:coral_claw" => true, + _ => return Err(DecodeError::Field("coral feature type")), + }; + Ok(Self { + claw, + feature: Box::new(nested( + required(&object, "feature")?.get(), + depth + 1, + remaining, + )?), + }) + } + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + nested: &mut PlacedPlacer<'_, W, R>, + ) -> TreeResult<bool, W::Error> { + let feature = &*self.feature; + if !self.claw { + let mut pos = origin; + let trunk = random.next_int_bound(3)? + 1; + for _ in 0..trunk { + if !nested(feature, world, random, pos)? { + return Ok(true); + } + pos = tb::offset(pos, 0, 1, 0); + } + let top = pos; + let branches = random.next_int_bound(3)? + 2; + let mut directions = tb::HORIZONTAL; + tb::shuffle(&mut directions, random)?; + for &direction in directions.iter().take(branches as usize) { + let mut pos = tb::relative(top, direction, 1); + let height = random.next_int_bound(5)? + 2; + let mut segment = 0; + let mut j = 0; + while j < height && nested(feature, world, random, pos)? { + segment += 1; + pos = tb::offset(pos, 0, 1, 0); + if j == 0 || (segment >= 2 && random.next_float() < 0.25) { + pos = tb::relative(pos, direction, 1); + segment = 0; + } + j += 1; + } + } + return Ok(true); + } + if !nested(feature, world, random, origin)? { + return Ok(false); + } + let claw = tb::HORIZONTAL[random.next_int_bound(4)? as usize]; + let branches = random.next_int_bound(2)? + 2; + let mut possible = [claw, tb::clockwise(claw), counter_clockwise(claw)]; + tb::shuffle(&mut possible, random)?; + for &branch in possible.iter().take(branches as usize) { + let mut pos = origin; + let sideways = random.next_int_bound(2)? + 1; + pos = tb::relative(pos, branch, 1); + let (segment, inway) = if branch == claw { + (claw, random.next_int_bound(3)? + 2) + } else { + pos = tb::offset(pos, 0, 1, 0); + let options = [branch, Direction::Up]; + let segment = options[random.next_int_bound(2)? as usize]; + (segment, random.next_int_bound(3)? + 3) + }; + let mut i = 0; + while i < sideways && nested(feature, world, random, pos)? { + pos = tb::relative(pos, segment, 1); + i += 1; + } + pos = tb::relative(pos, segment.opposite(), 1); + pos = tb::offset(pos, 0, 1, 0); + for _ in 0..inway { + pos = tb::relative(pos, claw, 1); + if !nested(feature, world, random, pos)? { + break; + } + if random.next_float() < 0.25 { + pos = tb::offset(pos, 0, 1, 0); + } + } + } + Ok(true) + } +} +pub(crate) fn counter_clockwise(direction: Direction) -> Direction { + match direction { + Direction::North => Direction::West, + Direction::East => Direction::North, + Direction::South => Direction::East, + Direction::West => Direction::South, + other => other, + } +} + +#[derive(Clone, Debug)] +pub struct HugeMushroomFeature { + red: bool, + cap: BlockStateProvider, + stem: BlockStateProvider, + foliage_radius: i32, + can_place_on: BlockPredicate, + blocks: Arc<TreeBlocks>, +} +impl HugeMushroomFeature { + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + depth: usize, + remaining: &mut usize, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + let red = match kind(&object)?.as_str() { + "minecraft:huge_red_mushroom" => true, + "minecraft:huge_brown_mushroom" => false, + _ => return Err(DecodeError::Field("huge mushroom type")), + }; + let blocks = bindings.tree_blocks()?; + let mut decoder = TreeDecoder { + bindings, + depth, + remaining, + }; + let cap = decoder.provider(required(&object, "cap_provider")?)?; + let stem = decoder.provider(required(&object, "stem_provider")?)?; + let foliage_radius = optional(&object, "foliage_radius") + .map(super::integer) + .transpose()? + .unwrap_or(2); + let can_place_on = BlockPredicate::decode_with_blocks( + required(&object, "can_place_on")?.get(), + depth + 1, + decoder.remaining, + Some(bindings), + )?; + Ok(Self { + red, + cap, + stem, + foliage_radius, + can_place_on, + blocks, + }) + } + fn radius_for_height(&self, tree_height: i32, leaf_radius: i32, yo: i32) -> i32 { + if self.red { + if (yo < tree_height && yo >= tree_height - 3) || yo == tree_height { + leaf_radius + } else { + 0 + } + } else if yo <= 3 { + 0 + } else { + leaf_radius + } + } + fn place_block<W: FeatureWorld>( + &self, + world: &mut W, + p: [i32; 3], + state: BlockStateId, + ) -> TreeResult<(), W::Error> { + let current = read(world, p)?; + if self.blocks.has(current, tb::AIR | tb::MUSHROOM_REPLACEABLE) { + write(world, p, state, 3)?; + } + Ok(()) + } + fn faces(&self, state: BlockStateId, faces: &[(&str, bool)]) -> BlockStateId { + if faces + .iter() + .all(|(name, _)| self.blocks.properties.value(state, name).is_some()) + { + faces.iter().fold(state, |state, (name, value)| { + self.blocks + .with(state, name, if *value { "true" } else { "false" }) + .unwrap_or(state) + }) + } else { + state + } + } + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let mut height = random.next_int_bound(3)? + 4; + if random.next_int_bound(12)? == 0 { + height *= 2; + } + let y = origin[1]; + let min = world.min_y().map_err(query)?; + let max = world.max_y().map_err(query)?; + if y < min.wrapping_add(1) || y.wrapping_add(height).wrapping_add(1) > max { + return Ok(false); + } + if !self + .can_place_on + .test(world, tb::offset(origin, 0, -1, 0)) + .map_err(query)? + { + return Ok(false); + } + for dy in 0..=height { + let radius = self.radius_for_height(-1, self.foliage_radius, dy); + for dx in -radius..=radius { + for dz in -radius..=radius { + let state = read(world, tb::offset(origin, dx, dy, dz))?; + if !self.blocks.has(state, tb::AIR | tb::LEAVES) { + return Ok(false); + } + } + } + } + let r = self.foliage_radius; + if self.red { + for dy in height - 3..=height { + let radius = if dy < height { r } else { r - 1 }; + let center = r - 2; + for dx in -radius..=radius { + for dz in -radius..=radius { + let x_edge = dx == -radius || dx == radius; + let z_edge = dz == -radius || dz == radius; + if dy >= height || x_edge != z_edge { + let p = tb::offset(origin, dx, dy, dz); + let state = sample_state(&self.cap, world, random, origin)?; + let state = self.faces( + state, + &[ + ("west", dx < -center), + ("east", dx > center), + ("north", dz < -center), + ("south", dz > center), + ("up", dy >= height - 1), + ], + ); + self.place_block(world, p, state)?; + } + } + } + } + } else { + for dx in -r..=r { + for dz in -r..=r { + let (min_x, max_x, min_z, max_z) = (dx == -r, dx == r, dz == -r, dz == r); + let x_edge = min_x || max_x; + let z_edge = min_z || max_z; + if !x_edge || !z_edge { + let p = tb::offset(origin, dx, height, dz); + let west = min_x || (z_edge && dx == 1 - r); + let east = max_x || (z_edge && dx == r - 1); + let north = min_z || (x_edge && dz == 1 - r); + let south = max_z || (x_edge && dz == r - 1); + let state = sample_state(&self.cap, world, random, origin)?; + let state = self.faces( + state, + &[ + ("west", west), + ("east", east), + ("north", north), + ("south", south), + ], + ); + self.place_block(world, p, state)?; + } + } + } + } + for dy in 0..height { + let state = sample_state(&self.stem, world, random, origin)?; + self.place_block(world, tb::offset(origin, 0, dy, 0), state)?; + } + Ok(true) + } +} + +#[derive(Clone, Debug)] +pub struct MultifaceGrowthFeature { + block: BlockStateId, + sculk: bool, + search_range: i32, + directions: Vec<Direction>, + chance_of_spreading: f32, + can_be_placed_on: Arc<BTreeSet<BlockStateId>>, + blocks: Arc<TreeBlocks>, +} +#[derive(Clone, Copy)] +enum Spread { + SamePosition, + SamePlane, + WrapAround, +} +impl MultifaceGrowthFeature { + pub(crate) fn decode( + json: &str, + bindings: &FeatureBlockBindings<'_>, + ) -> Result<Self, DecodeError> { + let object: Object = serde_json::from_str(json)?; + if kind(&object)? != "minecraft:multiface_growth" { + return Err(DecodeError::Field("multiface growth type")); + } + let blocks = bindings.tree_blocks()?; + let name = super::density::identifier(&serde_json::from_str::<String>( + required(&object, "block")?.get(), + )?)?; + // The 26.3 MultifaceSpreadeableBlock subclasses. + let sculk = match name.as_str() { + "minecraft:glow_lichen" => false, + "minecraft:sculk_vein" => true, + _ => return Err(DecodeError::Field("multiface spreadeable block")), + }; + let block = blocks + .default_state(&name) + .ok_or(DecodeError::Field("multiface block"))?; + let flag = |key: &str| -> Result<bool, DecodeError> { + Ok(optional(&object, key) + .map(|raw| serde_json::from_str::<bool>(raw.get())) + .transpose()? + .unwrap_or(false)) + }; + let mut directions = Vec::new(); + if flag("can_place_on_ceiling")? { + directions.push(Direction::Up); + } + if flag("can_place_on_floor")? { + directions.push(Direction::Down); + } + if flag("can_place_on_wall")? { + directions.extend(tb::HORIZONTAL); + } + Ok(Self { + block, + sculk, + search_range: optional(&object, "search_range") + .map(|raw| int_range(raw, "search_range", 1, 64)) + .transpose()? + .unwrap_or(10), + directions, + chance_of_spreading: optional(&object, "chance_of_spreading") + .map(|raw| unit_float(raw, "chance_of_spreading")) + .transpose()? + .unwrap_or(0.5), + can_be_placed_on: super::block_predicate::PredicateBlockResolver::predicate_block_set( + bindings, + required(&object, "can_be_placed_on")?.get(), + )?, + blocks, + }) + } + fn air_or_water(&self, state: BlockStateId) -> bool { + self.blocks.has(state, tb::AIR | tb::WATER_BLOCK) + } + fn is_block(&self, state: BlockStateId) -> bool { + self.blocks.same_block(state, self.block) + } + fn has_face(&self, state: BlockStateId, face: Direction) -> bool { + self.blocks + .properties + .value(state, tb::direction_name(face)) + == Some("true") + } + pub(crate) fn place<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + origin: [i32; 3], + ) -> TreeResult<bool, W::Error> { + let here = read(world, origin)?; + if !self.air_or_water(here) { + return Ok(false); + } + let mut directions = self.directions.clone(); + tb::shuffle(&mut directions, random)?; + let here = read(world, origin)?; + if self.place_growth(world, random, origin, here, &directions)? { + return Ok(true); + } + for &search in &directions { + let mut placement: Vec<Direction> = self + .directions + .iter() + .copied() + .filter(|d| *d != search.opposite()) + .collect(); + tb::shuffle(&mut placement, random)?; + for _ in 0..self.search_range { + // Native setWithOffset(origin, ...) revisits the first neighbor. + let pos = tb::relative(origin, search, 1); + let state = read(world, pos)?; + if !self.air_or_water(state) && !self.is_block(state) { + break; + } + if self.place_growth(world, random, pos, state, &placement)? { + return Ok(true); + } + } + } + Ok(false) + } + fn place_growth<W: FeatureWorld + PlacementContext, R: RandomSource>( + &self, + world: &mut W, + random: &mut R, + pos: [i32; 3], + old: BlockStateId, + directions: &[Direction], + ) -> TreeResult<bool, W::Error> { + for &direction in directions { + let neighbor = read(world, tb::relative(pos, direction, 1))?; + if self.can_be_placed_on.contains(&neighbor) { + let Some(state) = self.state_for_placement(world, old, pos, direction)? else { + return Ok(false); + }; + write(world, pos, state, 3)?; + world.mark_postprocessing(pos).map_err(query)?; + if random.next_float() < self.chance_of_spreading { + let mut all = Direction::ALL; + tb::shuffle(&mut all, random)?; + for spread in all { + if self.spread(world, state, pos, direction, spread)? { + break; + } + } + } + return Ok(true); + } + } + Ok(false) + } + fn valid_for_placement<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + old: BlockStateId, + pos: [i32; 3], + direction: Direction, + ) -> TreeResult<bool, W::Error> { + if self.is_block(old) && self.has_face(old, direction) { + return Ok(false); + } + world.attachment_at(pos, direction).map_err(query) + } + fn state_for_placement<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + old: BlockStateId, + pos: [i32; 3], + direction: Direction, + ) -> TreeResult<Option<BlockStateId>, W::Error> { + if !self.valid_for_placement(world, old, pos, direction)? { + return Ok(None); + } + let state = if self.is_block(old) { + old + } else if self.blocks.has(old, tb::WATER_SOURCE) { + self.blocks.waterlogged(self.block, true) + } else { + self.block + }; + Ok(Some( + self.blocks + .with(state, tb::direction_name(direction), "true") + .ok_or(FeatureExecutionError::InvalidState)?, + )) + } + fn spread_types(&self) -> [Spread; 3] { + [Spread::SamePosition, Spread::SamePlane, Spread::WrapAround] + } + /// spreadFromFaceTowardDirection with postProcess = true. + fn spread<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + state: BlockStateId, + pos: [i32; 3], + from: Direction, + direction: Direction, + ) -> TreeResult<bool, W::Error> { + if tb::Axis::of(direction) == tb::Axis::of(from) { + return Ok(false); + } + let other_source = self.sculk && !self.blocks.has(state, tb::SCULK_VEIN); + if !(other_source || (self.has_face(state, from) && !self.has_face(state, direction))) { + return Ok(false); + } + for kind in self.spread_types() { + let (target, face) = match kind { + Spread::SamePosition => (pos, direction), + Spread::SamePlane => (tb::relative(pos, direction, 1), from), + Spread::WrapAround => ( + tb::relative(tb::relative(pos, direction, 1), from, 1), + direction.opposite(), + ), + }; + if self.can_spread_into(world, pos, target, face)? { + let old = read(world, target)?; + let Some(new) = self.state_for_placement(world, old, target, face)? else { + return Ok(false); + }; + world.mark_postprocessing(target).map_err(query)?; + return write(world, target, new, 2); + } + } + Ok(false) + } + fn can_spread_into<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + source: [i32; 3], + target: [i32; 3], + face: Direction, + ) -> TreeResult<bool, W::Error> { + let existing = read(world, target)?; + let replaceable = if self.sculk { + let against = read(world, tb::relative(target, face, 1))?; + if self.blocks.has(against, tb::SCULK_BLOCKER) { + false + } else { + let mut blocked = false; + if tb::dist_manhattan(source, target) == 2 { + let neighbor = tb::relative(source, face.opposite(), 1); + let state = read(world, neighbor)?; + blocked = world + .state_face_sturdy(state, neighbor, face) + .map_err(query)?; + } + if blocked + || (self.blocks.has(existing, tb::ANY_FLUID) + && !self.blocks.has(existing, tb::WATER_SOURCE)) + || self.blocks.has(existing, tb::FIRE) + { + false + } else { + self.blocks.has(existing, tb::REPLACEABLE) || self.default_replaceable(existing) + } + } + } else { + self.default_replaceable(existing) + }; + Ok(replaceable && self.valid_for_placement(world, existing, target, face)?) + } + fn default_replaceable(&self, existing: BlockStateId) -> bool { + self.blocks.is_air(existing) + || self.is_block(existing) + || (self.blocks.has(existing, tb::WATER_BLOCK) + && self.blocks.has(existing, tb::WATER_SOURCE)) + } +} diff --git a/crates/horizon-world/src/worldgen/vines.rs b/crates/horizon-world/src/worldgen/vines.rs new file mode 100644 index 000000000..5e5530ee9 --- /dev/null +++ b/crates/horizon-world/src/worldgen/vines.rs @@ -0,0 +1,68 @@ +//! One vine attachment in native direction priority order. +use super::{ + DecodeError, + block_feature::{BlockFeatureError, FeatureBlockBindings}, + feature::FeatureWorld, + placement::PlacementContext, +}; +use crate::registry::BlockStateId; +use horizon_core::geometry::Direction; +const DIRECTIONS: [Direction; 5] = [ + Direction::Up, + Direction::North, + Direction::South, + Direction::West, + Direction::East, +]; +#[derive(Clone, Debug)] +pub struct VinesFeature { + air: [BlockStateId; 3], + states: [BlockStateId; 5], +} +impl VinesFeature { + pub fn new(bindings: &FeatureBlockBindings<'_>) -> Result<Self, DecodeError> { + let registry = bindings.registry(); + let default = registry + .default_state("minecraft:vine") + .ok_or(DecodeError::Field("vine block missing"))?; + let mut states = [default; 5]; + for (i, name) in ["up", "north", "south", "west", "east"] + .into_iter() + .enumerate() + { + let mut state = registry.state(default).unwrap().clone(); + state.properties.insert(name.into(), "true".into()); + states[i] = registry + .id(&state) + .ok_or(DecodeError::Field("vine face missing"))?; + } + Ok(Self { + air: bindings.air, + states, + }) + } + pub fn place<W: FeatureWorld + PlacementContext>( + &self, + world: &mut W, + p: [i32; 3], + ) -> Result<bool, BlockFeatureError<W::Error>> { + if !self + .air + .contains(&world.block(p).map_err(BlockFeatureError::World)?) + { + return Ok(false); + } + for (direction, state) in DIRECTIONS.into_iter().zip(self.states) { + if world + .attachment_at(p, direction) + .map_err(BlockFeatureError::Query)? + { + world + .set_block(p, state, 2) + .map_err(BlockFeatureError::World)?; + return Ok(true); + } + } + Ok(false) + } +} diff --git a/crates/horizon-world/src/worldgen/weighted.rs b/crates/horizon-world/src/worldgen/weighted.rs new file mode 100644 index 000000000..c5149c8dc --- /dev/null +++ b/crates/horizon-world/src/worldgen/weighted.rs @@ -0,0 +1,105 @@ +//! Weighted choices with vanilla draw consumption and ordered entries. +use super::{DecodeError, Object, int_range, required}; +use horizon_core::random::{InvalidBound, RandomSource}; +use serde_json::value::RawValue; + +#[derive(Clone, Debug)] +pub struct WeightedList<T> { + entries: Vec<(T, i32)>, + cumulative: Vec<i32>, + total: i32, +} +impl<T> WeightedList<T> { + /// Zero weights are retained. A positive total no greater than i32::MAX is + /// required, and lists are bounded to 8192 entries. + pub fn new(entries: Vec<(T, i32)>) -> Result<Self, DecodeError> { + Self::build(entries, false) + } + fn build(entries: Vec<(T, i32)>, allow_empty: bool) -> Result<Self, DecodeError> { + if entries.len() > 8192 { + return Err(DecodeError::Field("weighted list size")); + } + let mut total = 0_i32; + let mut cumulative = Vec::with_capacity(entries.len()); + for (_, weight) in &entries { + if *weight < 0 { + return Err(DecodeError::Field("negative weight")); + } + total = total + .checked_add(*weight) + .ok_or(DecodeError::Field("total weight"))?; + cumulative.push(total); + } + if total == 0 && !allow_empty { + return Err(DecodeError::Field("empty weighted list")); + } + Ok(Self { + entries, + cumulative, + total, + }) + } + pub fn entries(&self) -> &[(T, i32)] { + &self.entries + } + pub fn sample(&self, random: &mut impl RandomSource) -> Result<&T, InvalidBound> { + // Even a singleton with total weight one consumes a bounded draw. + let index = random.next_int_bound(self.total)?; + let entry = self.cumulative.partition_point(|end| *end <= index); + Ok(&self.entries[entry].0) + } + pub(crate) fn decode( + raw: &RawValue, + decode: impl FnMut(&RawValue) -> Result<T, DecodeError>, + ) -> Result<Self, DecodeError> { + Self::decode_inner(raw, decode, false) + } + fn decode_inner( + raw: &RawValue, + mut decode: impl FnMut(&RawValue) -> Result<T, DecodeError>, + allow_empty: bool, + ) -> Result<Self, DecodeError> { + let entries: Vec<Box<RawValue>> = serde_json::from_str(raw.get())?; + if entries.len() > 8192 { + return Err(DecodeError::Field("weighted list size")); + } + Self::build( + entries + .iter() + .map(|raw| { + let object: Object = serde_json::from_str(raw.get())?; + let data = decode(required(&object, "data")?)?; + let weight = int_range(required(&object, "weight")?, "weight", 0, i32::MAX)?; + Ok((data, weight)) + }) + .collect::<Result<_, DecodeError>>()?, + allow_empty, + ) + } +} + +/// Optional choices preserve zero-weight entries without weakening the positive +/// total invariant required by integer and height providers. +#[derive(Clone, Debug)] +pub struct OptionalWeightedList<T>(WeightedList<T>); +impl<T> OptionalWeightedList<T> { + pub fn new(entries: Vec<(T, i32)>) -> Result<Self, DecodeError> { + WeightedList::build(entries, true).map(Self) + } + pub fn entries(&self) -> &[(T, i32)] { + self.0.entries() + } + pub fn sample(&self, random: &mut impl RandomSource) -> Result<Option<&T>, InvalidBound> { + if self.0.total == 0 { + Ok(None) + } else { + self.0.sample(random).map(Some) + } + } + pub(crate) fn decode( + raw: &RawValue, + decode: impl FnMut(&RawValue) -> Result<T, DecodeError>, + ) -> Result<Self, DecodeError> { + WeightedList::decode_inner(raw, decode, true).map(Self) + } +} diff --git a/crates/horizon-world/src/worldgen/write_zone.rs b/crates/horizon-world/src/worldgen/write_zone.rs new file mode 100644 index 000000000..6f5075d77 --- /dev/null +++ b/crates/horizon-world/src/worldgen/write_zone.rs @@ -0,0 +1,45 @@ +//! Horizontal generation write-zone predicate from the pinned chunk step. +use horizon_core::position::{BlockPos, ChunkPos}; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct GenerationWriteZone { + center: ChunkPos, + radius: i32, +} +impl GenerationWriteZone { + /// The caller supplies the center chunk and the generation step's write + /// radius. Negative radii and wrapped coordinates retain Java semantics. + pub fn new(center: ChunkPos, radius: i32) -> Self { + Self { center, radius } + } + pub fn contains_chunk(self, chunk: ChunkPos) -> bool { + self.center.x.wrapping_sub(chunk.x).wrapping_abs() <= self.radius + && self.center.z.wrapping_sub(chunk.z).wrapping_abs() <= self.radius + } + pub fn contains_block(self, position: BlockPos) -> bool { + self.contains_chunk(position.chunk()) + } +} + +/// The center chunk's generation height while an upgrade is active. Normal +/// generation has no vertical write-policy gate (storage bounds are separate). +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct UpgradeWriteHeight { + min_y: i32, + max_y: i32, +} +impl UpgradeWriteHeight { + pub const BELOW_ZERO: Self = Self { + min_y: -64, + max_y: -1, + }; + pub fn new(min_y: i32, height: i32) -> Self { + Self { + min_y, + max_y: min_y.wrapping_add(height).wrapping_sub(1), + } + } + pub fn contains(self, y: i32) -> bool { + y >= self.min_y && y <= self.max_y + } +} diff --git a/crates/horizon-world/tests/biome_data.rs b/crates/horizon-world/tests/biome_data.rs new file mode 100644 index 000000000..51be40cfc --- /dev/null +++ b/crates/horizon-world/tests/biome_data.rs @@ -0,0 +1,91 @@ +use horizon_core::{ + density::{ConstantSampler, DensitySampler, GradientSampler, SamplerContext, TilingMode}, + geometry::Axis, +}; +use horizon_world::worldgen::{ + biome::{BiomeError, MultiNoiseBiomeSource}, + climate::ClimateSampler, +}; +use std::sync::Arc; + +fn fixture() -> MultiNoiseBiomeSource { + MultiNoiseBiomeSource::from_quantized_json( + r#"[ + {"coordinates":[[-10,-10],[0,0],[0,0],[0,0],[0,0],[0,0]],"offset":0,"biome":"left"}, + {"coordinates":[[10,10],[0,0],[0,0],[0,0],[0,0],[0,0]],"offset":0,"biome":"right"} + ]"#, + ) + .unwrap() +} + +#[test] +fn scalar_and_prepared_queries_share_ties_and_reject_outside_volume() { + let fields: [Arc<dyn DensitySampler>; 6] = + std::array::from_fn(|i| -> Arc<dyn DensitySampler> { + if i == 0 { + Arc::new(GradientSampler::new( + Axis::X, + TilingMode::ClampToEdge, + -4, + 4, + -0.001, + 0.001, + )) + } else { + Arc::new(ConstantSampler(0.)) + } + }); + let climate = ClimateSampler::new(fields); + let source = fixture(); + let mut resolver = source.resolver(&climate); + let mut context = SamplerContext::cached(); + assert_eq!( + resolver.sample(&mut context, [1, 0, 0]).unwrap(), + "minecraft:right" + ); + let volume = resolver + .prepare_volume(&mut context, [-1, 0, 0], [3, 2, 2]) + .unwrap(); + assert_eq!( + resolver.sample_prepared(&volume, [0, 0, 0]).unwrap(), + "minecraft:right" + ); + assert_eq!( + source + .resolver(&climate) + .sample_prepared(&volume, [0, 0, 0]) + .unwrap(), + "minecraft:left" + ); + assert!(matches!( + resolver.sample_prepared(&volume, [-2, 1, 1]), + Err(BiomeError::OutsideVolume) + )); + assert!(matches!( + resolver.sample_prepared(&volume, [2, 0, 0]), + Err(BiomeError::OutsideVolume) + )); + assert_eq!( + resolver.sample_prepared(&volume, [-1, 1, 1]).unwrap(), + "minecraft:left" + ); + assert_eq!( + resolver.sample(&mut context, [0, 0, 0]).unwrap(), + "minecraft:left" + ); +} + +#[test] +fn quantized_import_rejects_malformed_dimensions_numbers_and_identifiers() { + for json in [ + "[]", + r#"[{"coordinates":[[0,0]],"offset":0,"biome":"left"}]"#, + r#"[{"coordinates":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"offset":0.5,"biome":"left"}]"#, + r#"[{"coordinates":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"offset":0,"biome":"UPPER"}]"#, + ] { + assert!( + MultiNoiseBiomeSource::from_quantized_json(json).is_err(), + "{json}" + ); + } +} diff --git a/crates/horizon-world/tests/biome_predicate_bounds.rs b/crates/horizon-world/tests/biome_predicate_bounds.rs new file mode 100644 index 000000000..5910ebbcf --- /dev/null +++ b/crates/horizon-world/tests/biome_predicate_bounds.rs @@ -0,0 +1,39 @@ +use horizon_world::worldgen::{biome::BiomeId, biome_predicate::BiomePredicateBindings}; +use std::collections::BTreeMap; +#[test] +fn biome_registry_identity_and_holder_set_bounds() { + let names = BTreeMap::from([ + ("minecraft:plains".into(), BiomeId(0)), + ("minecraft:desert".into(), BiomeId(1)), + ]); + let tags = BTreeMap::from([ + ("horizon:empty".into(), vec![]), + ( + "horizon:both".into(), + vec!["plains".into(), "desert".into(), "plains".into()], + ), + ]); + let bindings = BiomePredicateBindings::new(&names, &tags).unwrap(); + assert!( + bindings + .resolve(r##""#horizon:empty""##) + .unwrap() + .is_empty() + ); + assert_eq!(bindings.resolve(r##""#horizon:both""##).unwrap().len(), 2); + assert!(bindings.resolve(r##"["#horizon:both"]"##).is_err()); + assert!( + bindings + .resolve(&serde_json::to_string(&vec!["plains"; 8193]).unwrap()) + .is_err() + ); + let duplicate = BTreeMap::from([("plains".into(), BiomeId(0)), ("desert".into(), BiomeId(0))]); + assert!(BiomePredicateBindings::new(&duplicate, &tags).is_err()); + let duplicate = BTreeMap::from([ + ("plains".into(), BiomeId(0)), + ("minecraft:plains".into(), BiomeId(1)), + ]); + assert!(BiomePredicateBindings::new(&duplicate, &BTreeMap::new()).is_err()); + let unknown = BTreeMap::from([("tag".into(), vec!["missing".into()])]); + assert!(BiomePredicateBindings::new(&names, &unknown).is_err()); +} diff --git a/crates/horizon-world/tests/biome_region.rs b/crates/horizon-world/tests/biome_region.rs new file mode 100644 index 000000000..13afd9533 --- /dev/null +++ b/crates/horizon-world/tests/biome_region.rs @@ -0,0 +1,40 @@ +use horizon_core::position::ChunkPos; +use horizon_world::worldgen::biome_chunk::{BiomeChunk, BiomeRegion, BiomeRegionError}; +#[test] +fn resident_biomes_track_replacement_fills_and_reject_ambiguous_chunks() { + let p = ChunkPos::new(-1, 1); + let mut chunk = BiomeChunk::new(p, -64, 32, 7).unwrap(); + chunk + .fill(-64, -33, |[x, y, z]| { + Ok::<_, ()>(x.wrapping_add(y).wrapping_add(z).rem_euclid(3)) + }) + .unwrap(); + assert!(matches!( + BiomeRegion::new(vec![chunk.clone(), chunk.clone()], 0), + Err(BiomeRegionError::InvalidChunks) + )); + assert!(matches!( + BiomeRegion::new( + vec![ + chunk.clone(), + BiomeChunk::new(ChunkPos::new(0, 0), 0, 32, 0).unwrap() + ], + 0 + ), + Err(BiomeRegionError::InvalidChunks) + )); + let mut region = BiomeRegion::new(vec![chunk], 0).unwrap(); + assert_eq!(region.present_in_chunk(p).unwrap(), vec![0, 1, 2]); + region + .chunk_mut(p) + .unwrap() + .fill(-64, -33, |_| Ok::<_, ()>(9)) + .unwrap(); + assert_eq!(region.present_in_chunk(p).unwrap(), vec![9]); + assert_eq!(region.noise_biome([-1, i32::MIN, 4]).unwrap(), &9); + assert_eq!(region.noise_biome([-1, i32::MAX, 4]).unwrap(), &9); + assert!(matches!( + region.noise_biome([0, 0, 4]), + Err(BiomeRegionError::MissingChunk(_)) + )); +} diff --git a/crates/horizon-world/tests/block_collision_scan.rs b/crates/horizon-world/tests/block_collision_scan.rs new file mode 100644 index 000000000..d9f4a9fd5 --- /dev/null +++ b/crates/horizon-world/tests/block_collision_scan.rs @@ -0,0 +1,108 @@ +use horizon_core::{ + geometry::{Aabb, Vec3, VoxelShape}, + position::{BlockPos, ChunkPos}, +}; +use horizon_world::{ + block_collision_scan::{ + BlockCollisionScan, BlockCollisionWorld, CollisionBlock, CollisionScanError, + }, + collision_context::CollisionContext, +}; +use std::io; + +struct FailedChunk { + calls: usize, +} +impl BlockCollisionWorld for FailedChunk { + type Error = io::Error; + type Chunk = (); + fn collision_chunk(&mut self, _: ChunkPos) -> io::Result<Option<()>> { + self.calls += 1; + Err(io::Error::other("missing test provider")) + } + fn collision_block(&mut self, _: (), _: BlockPos) -> io::Result<CollisionBlock> { + unreachable!() + } + fn is_suffocating(&mut self, _: (), _: CollisionBlock, _: BlockPos) -> io::Result<bool> { + unreachable!() + } + fn context_shape( + &mut self, + _: CollisionBlock, + _: BlockPos, + _: &CollisionContext<'_>, + ) -> io::Result<VoxelShape> { + unreachable!() + } +} +fn bounds() -> Aabb { + Aabb::new(Vec3::ZERO, Vec3::new(1.0, 1.0, 1.0)) +} + +#[test] +fn budgets_include_skipped_corners_and_errors_fuse_iteration() { + for budget in [0, 1] { + let mut world = FailedChunk { calls: 0 }; + let mut scan = BlockCollisionScan::new( + &mut world, + CollisionContext::empty(false), + bounds(), + false, + budget, + ) + .unwrap(); + assert!(matches!( + scan.next(), + Some(Err(CollisionScanError::VisitBudget)) + )); + assert!(scan.next().is_none()); + drop(scan); + assert_eq!(world.calls, 0); + } + let mut world = FailedChunk { calls: 0 }; + let mut scan = BlockCollisionScan::new( + &mut world, + CollisionContext::empty(false), + bounds(), + false, + 1000, + ) + .unwrap(); + assert!(matches!( + scan.next(), + Some(Err(CollisionScanError::World(_))) + )); + assert!(scan.next().is_none()); + drop(scan); + assert_eq!(world.calls, 1); +} + +#[test] +fn invalid_or_excessive_domains_fail_before_world_queries() { + let mut world = FailedChunk { calls: 0 }; + for coordinate in [f64::NAN, f64::INFINITY, f64::NEG_INFINITY] { + let bounds = Aabb::new(Vec3::ZERO, Vec3::new(coordinate, 1.0, 1.0)); + assert!(matches!( + BlockCollisionScan::new( + &mut world, + CollisionContext::empty(false), + bounds, + false, + 1000 + ), + Err(CollisionScanError::InvalidBounds) + )); + } + let bounds = Aabb::new(Vec3::ZERO, Vec3::new(100000.0, 100000.0, 100000.0)); + assert!(matches!( + BlockCollisionScan::new( + &mut world, + CollisionContext::empty(false), + bounds, + false, + 1000 + ), + Err(CollisionScanError::TooLarge) + )); + assert_eq!(world.calls, 0); +} diff --git a/crates/horizon-world/tests/block_entities.rs b/crates/horizon-world/tests/block_entities.rs new file mode 100644 index 000000000..244c6f95f --- /dev/null +++ b/crates/horizon-world/tests/block_entities.rs @@ -0,0 +1,73 @@ +use horizon_core::position::{BlockPos, ChunkPos}; +use horizon_world::{block_entities::ProtoBlockEntities, nbt::Tag}; + +#[test] +fn invalid_pending_data_is_rejected_without_replacing_active_or_pending_entries() { + let mut store = ProtoBlockEntities::new(ChunkPos::new(0, 0)); + let active = BlockPos::new(0, 64, 0); + store.set_active(active, "active"); + let pending = Tag::compound([("x", Tag::Int(1)), ("y", Tag::Int(64)), ("z", Tag::Int(0))]); + store.set_pending(pending.clone()).unwrap(); + assert!(store.set_pending(Tag::String("invalid".into())).is_err()); + assert_eq!(store.active(active), Some(&"active")); + assert_eq!(store.pending(BlockPos::new(1, 64, 0)), Some(&pending)); +} + +#[test] +fn failed_active_serialization_never_falls_back_to_stale_pending_data() { + let p = BlockPos::new(-1, 64, -1); + let mut store = ProtoBlockEntities::new(ChunkPos::new(-1, -1)); + store + .set_pending(Tag::compound([ + ("x", Tag::Int(15)), + ("y", Tag::Int(64)), + ("z", Tag::Int(15)), + ])) + .unwrap(); + store.set_active(p, 42); + assert!(store.pending(p).is_none()); + let result = store.for_saving(p, |_| Err::<Tag, _>("serialization failed")); + assert_eq!(result, Err("serialization failed")); + assert_eq!(store.remove(p), Some(42)); + assert_eq!( + store.for_saving(p, |_| Err::<Tag, _>("must not run")), + Ok(None) + ); +} + +#[test] +fn pending_save_snapshot_is_independent_and_mutating_coordinates_keeps_the_key() { + let mut store = ProtoBlockEntities::<()>::new(ChunkPos::new(0, 0)); + let p = BlockPos::new(0, 0, 0); + store + .set_pending(Tag::compound([("payload", Tag::Long(42))])) + .unwrap(); + let snapshot = store.for_saving(p, |_| Err::<Tag, _>(())).unwrap().unwrap(); + let Some(Tag::Compound(tag)) = store.pending_mut(p) else { + panic!("pending") + }; + tag.insert("x".into(), Tag::Int(123)); + assert_eq!(snapshot.get("x"), None); + assert_eq!(store.pending(p).unwrap().get("x"), Some(&Tag::Int(123))); + assert!(store.pending(BlockPos::new(123, 0, 0)).is_none()); +} + +#[test] +fn floating_coordinates_floor_before_saturating_to_java_int() { + use horizon_world::block_entities::position_from_tag; + for (value, expected) in [ + (Tag::Float(0xcf000001), i32::MIN), + (Tag::Double(0xc1e0000000000001), i32::MIN), + (Tag::Float(f32::NEG_INFINITY.to_bits()), i32::MIN), + (Tag::Double(f64::INFINITY.to_bits()), i32::MAX), + (Tag::Double(f64::NAN.to_bits()), 0), + (Tag::Float((-1.5_f32).to_bits()), -2), + (Tag::Double((-1.5_f64).to_bits()), -2), + ] { + let tag = Tag::compound([("y", value)]); + assert_eq!( + position_from_tag(ChunkPos::new(0, 0), &tag).unwrap().y, + expected + ); + } +} diff --git a/crates/horizon-world/tests/block_predicate_bounds.rs b/crates/horizon-world/tests/block_predicate_bounds.rs new file mode 100644 index 000000000..fc7e07ef6 --- /dev/null +++ b/crates/horizon-world/tests/block_predicate_bounds.rs @@ -0,0 +1,92 @@ +use horizon_core::random::{LegacyRandom, RandomSource}; +use horizon_world::{ + heightmap::HeightmapType, + worldgen::{ + anchor::WorldGenerationContext, + block_predicate::BlockPredicate, + placement::{PlacementContext, PlacementError, PlacementModifier, PlacementQueryError}, + }, +}; +struct UnboundedWorld(usize); +impl PlacementContext for UnboundedWorld { + fn generation(&self) -> WorldGenerationContext { + WorldGenerationContext::new(0, 16, 8) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(i32::MIN) + } + fn max_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(i32::MAX) + } + fn height(&mut self, _: HeightmapType, _: i32, _: i32) -> Result<i32, PlacementQueryError> { + unreachable!() + } + fn outside_build_height(&mut self, _: i32) -> Result<bool, PlacementQueryError> { + self.0 += 1; + Ok(false) + } +} +#[test] +fn directly_constructed_scans_share_predicate_work_budget() { + let scan = PlacementModifier::EnvironmentScan { + upwards: true, + target: BlockPredicate::Not(Box::new(BlockPredicate::True)), + allowed: BlockPredicate::True, + max_steps: i32::MAX, + }; + let mut world = UnboundedWorld(0); + let mut random = LegacyRandom::new(1); + let mut expected = random.clone(); + let result = scan.modify_in( + &mut world, + &mut random, + [0, i32::MAX, 0], + |_, _| -> Result<(), ()> { panic!("false target must not emit") }, + ); + assert!(matches!( + result, + Err(PlacementError::World(PlacementQueryError::WorkLimit)) + )); + assert!(world.0 > 0 && world.0 < 65536); + assert_eq!(random.next_long(), expected.next_long()); +} +#[test] +fn predicate_trees_share_decode_and_evaluation_budgets() { + let leaf = r#"{"type":"true"}"#; + let branch = format!( + r#"{{"type":"all_of","predicates":[{}]}}"#, + vec![leaf; 256].join(",") + ); + let tree = format!( + r#"{{"type":"all_of","predicates":[{}]}}"#, + vec![branch; 256].join(",") + ); + assert!(BlockPredicate::from_json(&tree).is_err()); + let tree = BlockPredicate::All(vec![ + BlockPredicate::All(vec![BlockPredicate::True; 256]); + 256 + ]); + assert!(matches!( + tree.test(&mut UnboundedWorld(0), [0; 3]), + Err(PlacementQueryError::WorkLimit) + )); +} + +#[test] +fn oversized_volume_keeps_early_exit_and_bounds_total_work() { + let mut world = UnboundedWorld(0); + let volume = |predicate| BlockPredicate::Volume { + min: [i32::MIN; 3], + max: [i32::MAX; 3], + predicate: Box::new(predicate), + }; + assert!( + !volume(BlockPredicate::Not(Box::new(BlockPredicate::True))) + .test(&mut world, [0; 3]) + .unwrap() + ); + assert!(matches!( + volume(BlockPredicate::True).test(&mut world, [0; 3]), + Err(PlacementQueryError::WorkLimit) + )); +} diff --git a/crates/horizon-world/tests/carver_generation.rs b/crates/horizon-world/tests/carver_generation.rs new file mode 100644 index 000000000..688daea45 --- /dev/null +++ b/crates/horizon-world/tests/carver_generation.rs @@ -0,0 +1,89 @@ +use horizon_core::position::ChunkPos; +use horizon_world::worldgen::{ + anchor::WorldGenerationContext, + carver::{CarverCatalog, MaskGenerationError, generate_carving_mask}, +}; +use std::{collections::BTreeMap, sync::Arc}; + +#[test] +fn origin_order_wraps_coordinates_and_upgrading_changes_the_ceiling() { + let target = ChunkPos::new(i32::MAX, i32::MIN); + for upgrading in [false, true] { + let mut visited = Vec::new(); + let mask = generate_carving_mask( + 0, + target, + WorldGenerationContext::new(-64, 384, 63), + upgrading, + |origin| { + visited.push(origin); + Ok::<_, ()>(&[]) + }, + ) + .unwrap(); + assert!(mask.is_empty()); + assert_eq!(mask.min_y(), -63); + assert_eq!(mask.max_y(), if upgrading { 319 } else { 312 }); + let expected: Vec<_> = (-8..=8) + .flat_map(|dx| { + (-8..=8).map(move |dz| { + ChunkPos::new(target.x.wrapping_add(dx), target.z.wrapping_add(dz)) + }) + }) + .collect(); + assert_eq!(visited, expected); + } +} + +#[test] +fn invalid_bounds_skip_the_source_and_source_failures_stop_immediately() { + let target = ChunkPos::new(0, 0); + let invalid = generate_carving_mask( + 0, + target, + WorldGenerationContext::new(0, 8, 0), + false, + |_| -> Result<_, ()> { panic!("invalid bounds must precede biome queries") }, + ); + assert!(matches!(invalid, Err(MaskGenerationError::Mask(_)))); + let mut calls = 0; + let failed = generate_carving_mask( + 0, + target, + WorldGenerationContext::new(0, 16, 0), + false, + |_| { + calls += 1; + if calls == 19 { + Err("biome failure") + } else { + Ok(&[]) + } + }, + ); + assert!(matches!( + failed, + Err(MaskGenerationError::Source("biome failure")) + )); + assert_eq!(calls, 19); +} + +#[test] +fn holder_lists_preserve_duplicate_identity_and_reject_unknown_names() { + let definition = r#"{"type":"cave","probability":1,"y":{"absolute":8},"count":0,"thickness":1,"room_vertical_radius_multiplier":1,"horizontal_radius_multiplier":1,"vertical_radius_multiplier":1,"floor_level":-1}"#; + let catalog = + CarverCatalog::from_json(&BTreeMap::from([("test".into(), definition.into())])).unwrap(); + let entries = catalog.decode_set(r#"["test","minecraft:test"]"#).unwrap(); + assert_eq!(entries.len(), 2); + assert!(Arc::ptr_eq(&entries[0], &entries[1])); + assert_eq!(catalog.decode_set(definition).unwrap().len(), 1); + assert!(catalog.decode_set("[]").unwrap().is_empty()); + assert!(catalog.decode_set(r#"["test","missing"]"#).is_err()); + assert!( + CarverCatalog::from_json(&BTreeMap::from([ + ("test".into(), definition.into()), + ("minecraft:test".into(), definition.into()), + ])) + .is_err() + ); +} diff --git a/crates/horizon-world/tests/carving_stage.rs b/crates/horizon-world/tests/carving_stage.rs new file mode 100644 index 000000000..3af6d4570 --- /dev/null +++ b/crates/horizon-world/tests/carving_stage.rs @@ -0,0 +1,172 @@ +use horizon_core::{ + carving::CarvingMask, + density::{ConstantSampler, SamplerContext}, + position::ChunkPos, + random::{RandomSource, XoroshiroRandom}, +}; +use horizon_world::{ + DATA_VERSION, + heightmap::HeightmapState, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, + worldgen::{ + anchor::WorldGenerationContext, + aquifer::AquiferError, + carving::{CarvingBlocks, apply_carving_mask}, + material_condition::{MaterialRule, MaterialSurfaceQueries}, + material_stage::TopMaterialInputs, + terrain::{TerrainAquifer, TerrainBlockStates, TerrainChunk}, + }, +}; +use std::{collections::BTreeSet, sync::Arc}; +#[derive(Clone, Copy)] +struct State(u32); +impl HeightmapState for State { + fn is_air(self) -> bool { + self.0 < 2 + } + fn is_air_block(self) -> bool { + self.0 == 0 + } + fn has_fluid(self) -> bool { + self.0 == 3 + } + fn blocks_motion_in_heightmap(self) -> bool { + self.0 >= 2 && self.0 != 3 + } + fn blocks_motion_in_heightmap_no_leaves(self) -> bool { + self.blocks_motion_in_heightmap() + } +} +struct Properties; +impl TerrainBlockStates for Properties { + type State = State; + fn heightmap_state(&self, id: BlockStateId) -> State { + State(id.0) + } +} +struct Surface; +impl MaterialSurfaceQueries for Surface { + fn surface_depth(&mut self, _: i32, _: i32) -> i32 { + 1 + } + fn surface_secondary(&mut self, _: i32, _: i32) -> f64 { + 0. + } +} +struct Aquifer(Vec<i32>); +impl TerrainAquifer for Aquifer { + fn compute_substance( + &mut self, + _: &mut SamplerContext, + [_x, y, _z]: [i32; 3], + density: f64, + ) -> Result<Option<BlockStateId>, AquiferError> { + assert_eq!(density.to_bits(), 0); + self.0.push(y); + match y { + 8 => Ok(None), + 7 => Ok(Some(BlockStateId(0))), + _ => Err(AquiferError::OutsideGrid), + } + } + fn should_schedule_fluid_update(&self) -> bool { + false + } +} +fn registry() -> BlockRegistry { + let names = [ + "minecraft:air", + "minecraft:void_air", + "minecraft:stone", + "minecraft:water", + "minecraft:grass_block", + "minecraft:mycelium", + "minecraft:dirt", + ]; + BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ( + "states", + Tag::List( + names + .iter() + .map(|name| Tag::compound([("id", Tag::String((*name).into()))])) + .collect(), + ), + ), + ( + "defaults", + Tag::Compound( + names + .iter() + .enumerate() + .map(|(id, name)| ((*name).into(), Tag::Int(id as i32))) + .collect(), + ), + ), + ])) + .unwrap() +} +#[test] +fn filters_and_uncarvable_blocks_precede_aquifers_and_failures_keep_surface_restoration() { + let registry = registry(); + for scenario in 0..3 { + let uncarvable = if scenario == 2 { + BTreeSet::from(["minecraft:grass_block".to_owned()]) + } else { + BTreeSet::new() + }; + let blocks = CarvingBlocks::from_registry(®istry, &uncarvable).unwrap(); + let mut chunk = + TerrainChunk::new(ChunkPos::new(-1, 2), 0, 16, ®istry, Properties).unwrap(); + for (y, state) in [(8, 4), (7, 2), (6, 6)] { + chunk.set_block_raw(0, y, 0, BlockStateId(state)).unwrap(); + } + let mut mask = CarvingMask::new(0, 15).unwrap(); + for y in 6..=8 { + mask.carve(0, y, 0).unwrap(); + } + let mut context = SamplerContext::cached(); + let mut aquifer = Aquifer(Vec::new()); + let mut filtered = Vec::new(); + let result = apply_carving_mask( + &mut chunk, + &mask, + MaterialRule::Block(BlockStateId(3)), + TopMaterialInputs::<XoroshiroRandom, _> { + generation: WorldGenerationContext::new(0, 16, 8), + root: XoroshiroRandom::new(0).fork_positional(), + surface: Surface, + preliminary_surface: Arc::new(ConstantSampler(0.)), + density_context: &mut context, + }, + &mut aquifer, + &blocks, + |position| { + filtered.push(position); + scenario != 1 || position[1] != 8 + }, + ); + assert!(result.is_err()); + assert_eq!(filtered, [[0, 8, 0], [0, 7, 0], [0, 6, 0]]); + assert_eq!( + aquifer.0, + if scenario == 0 { + vec![8, 7, 6] + } else { + vec![7, 6] + } + ); + assert_eq!(chunk.block(0, 8, 0), BlockStateId(4)); + assert_eq!(chunk.block(0, 7, 0), BlockStateId(0)); + assert_eq!( + chunk.block(0, 6, 0), + BlockStateId(if scenario == 0 { 3 } else { 6 }) + ); + assert_eq!( + chunk.postprocessing()[0], + if scenario == 0 { vec![6 << 4] } else { vec![] } + ); + } +} diff --git a/crates/horizon-world/tests/collision_data.rs b/crates/horizon-world/tests/collision_data.rs new file mode 100644 index 000000000..3738edf1a --- /dev/null +++ b/crates/horizon-world/tests/collision_data.rs @@ -0,0 +1,269 @@ +use horizon_world::{ + DATA_VERSION, + chunk::BlockSection, + collision::CachedCollisionRegistry, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, +}; + +fn fixture() -> (Tag, Tag) { + let states = vec![ + Tag::String("minecraft:air".into()), + Tag::String("minecraft:stone".into()), + Tag::String("minecraft:context".into()), + ]; + let registry = Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ("states", Tag::List(states.clone())), + ( + "defaults", + Tag::compound([ + ("minecraft:air", Tag::Int(0)), + ("minecraft:stone", Tag::Int(1)), + ("minecraft:context", Tag::Int(2)), + ]), + ), + ]); + let empty = Tag::compound([ + ("x", Tag::LongArray(vec![0])), + ("y", Tag::LongArray(vec![0])), + ("z", Tag::LongArray(vec![0])), + ("occupied", Tag::ByteArray(vec![])), + ("cube", Tag::Byte(0)), + ("cube_axes", Tag::Byte(0)), + ("discrete_min", Tag::IntArray(vec![0; 3])), + ("discrete_max", Tag::IntArray(vec![0; 3])), + ]); + let coords = Tag::LongArray(vec![0, 1.0f64.to_bits() as i64]); + let block = Tag::compound([ + ("x", coords.clone()), + ("y", coords.clone()), + ("z", coords), + ("occupied", Tag::ByteArray(vec![1])), + ("cube", Tag::Byte(1)), + ("cube_axes", Tag::Byte(7)), + ("discrete_min", Tag::IntArray(vec![0; 3])), + ("discrete_max", Tag::IntArray(vec![1; 3])), + ]); + let collision = Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ("states", Tag::List(states)), + ("shapes", Tag::List(vec![empty, block])), + ("cached_shapes", Tag::IntArray(vec![0, 1, -1])), + ]); + (registry, collision) +} + +#[test] +fn empty_cached_and_context_states_are_distinct() { + let (registry_tag, collision_tag) = fixture(); + let registry = BlockRegistry::from_nbt(®istry_tag).unwrap(); + let collision = CachedCollisionRegistry::from_nbt(&collision_tag, ®istry).unwrap(); + assert_eq!(collision.cached_state_count(), 2); + assert_eq!(collision.shape_count(), 2); + assert!( + collision + .cached_shape(BlockStateId(0)) + .unwrap() + .unwrap() + .is_empty() + ); + assert!( + !collision + .cached_shape(BlockStateId(1)) + .unwrap() + .unwrap() + .is_empty() + ); + assert!(collision.cached_shape(BlockStateId(2)).unwrap().is_none()); + assert!(collision.cached_shape(BlockStateId(3)).is_err()); + let mut section = BlockSection::uniform(BlockStateId(0), ®istry).unwrap(); + section.set(4095, BlockStateId(1)).unwrap(); + assert!( + !collision + .section_shape(§ion, 4095) + .unwrap() + .unwrap() + .is_empty() + ); + assert!(collision.section_shape(§ion, 4096).is_err()); + let different = BlockRegistry::from_nbt(®istry_tag).unwrap(); + let foreign_section = BlockSection::uniform(BlockStateId(0), &different).unwrap(); + assert!(collision.section_shape(&foreign_section, 0).is_err()); +} + +#[test] +fn invalid_imports_fail_before_collision_queries() { + let (registry_tag, valid) = fixture(); + let registry = BlockRegistry::from_nbt(®istry_tag).unwrap(); + for (field, tag) in [ + ("DataVersion", Tag::Int(0)), + ("cached_shapes", Tag::IntArray(vec![0, 1])), + ("cached_shapes", Tag::IntArray(vec![0, 2, -1])), + ("cached_shapes", Tag::IntArray(vec![0, 1, -2])), + ] { + let mut bad = valid.clone(); + *bad.get_mut(field).unwrap() = tag; + assert!(CachedCollisionRegistry::from_nbt(&bad, ®istry).is_err()); + } + let mut bad = valid.clone(); + let Some(Tag::List(states)) = bad.get_mut("states") else { + unreachable!() + }; + states.swap(0, 1); + assert!(CachedCollisionRegistry::from_nbt(&bad, ®istry).is_err()); + for (field, tag) in [ + ("cube", Tag::Byte(2)), + ("cube_axes", Tag::Byte(8)), + ("cube_axes", Tag::Byte(0)), + ("occupied", Tag::ByteArray(vec![2])), + ("discrete_min", Tag::IntArray(vec![0, 0])), + ("discrete_min", Tag::IntArray(vec![-1, 0, 0])), + ("discrete_max", Tag::IntArray(vec![1, 0, 1])), + ("occupied", Tag::ByteArray(vec![])), + ("x", Tag::LongArray(vec![0, 0])), + ("x", Tag::LongArray(vec![0, f64::NAN.to_bits() as i64])), + ("x", Tag::LongArray(vec![0, 0.5f64.to_bits() as i64])), + ] { + let mut bad = valid.clone(); + let Some(Tag::List(shapes)) = bad.get_mut("shapes") else { + unreachable!() + }; + *shapes[1].get_mut(field).unwrap() = tag; + assert!(CachedCollisionRegistry::from_nbt(&bad, ®istry).is_err()); + } +} + +#[test] +fn equal_grids_share_storage_without_collapsing_shape_identities() { + let (registry_tag, mut collision_tag) = fixture(); + let registry = BlockRegistry::from_nbt(®istry_tag).unwrap(); + let Some(Tag::List(shapes)) = collision_tag.get_mut("shapes") else { + unreachable!() + }; + shapes.push(shapes[1].clone()); + *collision_tag.get_mut("cached_shapes").unwrap() = Tag::IntArray(vec![0, 1, 2]); + let collision = CachedCollisionRegistry::from_nbt(&collision_tag, ®istry).unwrap(); + assert_eq!(collision.shape_count(), 3); + assert_eq!(collision.unique_grid_count(), 2); + let first = collision.cached_shape(BlockStateId(1)).unwrap().unwrap(); + let second = collision.cached_shape(BlockStateId(2)).unwrap().unwrap(); + assert!(!first.same_identity(second)); + assert!(std::ptr::eq( + first.boxes().as_ptr(), + second.boxes().as_ptr() + )); + assert!(first.same_identity(collision.cached_shape(BlockStateId(1)).unwrap().unwrap())); +} + +fn canonical_marker(shape: &mut Tag, value: Tag) { + let Tag::Compound(fields) = shape else { + unreachable!() + }; + fields.insert("canonical".into(), value); +} + +#[test] +fn canonical_shapes_restore_global_identity_without_normalizing_equal_grids() { + use horizon_core::geometry::VoxelShape; + let (registry_tag, mut collision_tag) = fixture(); + let registry = BlockRegistry::from_nbt(®istry_tag).unwrap(); + assert!( + !CachedCollisionRegistry::from_nbt(&collision_tag, ®istry) + .unwrap() + .has_canonical_identities() + ); + let Some(Tag::List(shapes)) = collision_tag.get_mut("shapes") else { + unreachable!() + }; + canonical_marker(&mut shapes[0], Tag::Byte(1)); + canonical_marker(&mut shapes[1], Tag::Byte(2)); + let mut equal_block = shapes[1].clone(); + canonical_marker(&mut equal_block, Tag::Byte(0)); + shapes.push(equal_block); + *collision_tag.get_mut("cached_shapes").unwrap() = Tag::IntArray(vec![0, 1, 2]); + let collision = CachedCollisionRegistry::from_nbt(&collision_tag, ®istry).unwrap(); + assert!(collision.has_canonical_identities()); + assert_eq!(collision.unique_grid_count(), 2); + let empty = collision.cached_shape(BlockStateId(0)).unwrap().unwrap(); + let block = collision.cached_shape(BlockStateId(1)).unwrap().unwrap(); + let separate = collision.cached_shape(BlockStateId(2)).unwrap().unwrap(); + assert!(empty.same_identity(&VoxelShape::empty())); + assert!(block.same_identity(&VoxelShape::block())); + assert!(!separate.same_identity(&VoxelShape::block())); + assert_eq!(block.boxes(), separate.boxes()); + assert!(std::ptr::eq( + block.boxes().as_ptr(), + separate.boxes().as_ptr() + )); +} + +#[test] +fn canonical_identity_claims_require_exact_geometry_and_unique_exports() { + let (registry_tag, valid) = fixture(); + let registry = BlockRegistry::from_nbt(®istry_tag).unwrap(); + for (index, marker) in [ + (0, Tag::Byte(2)), + (1, Tag::Byte(1)), + (1, Tag::Byte(3)), + (1, Tag::Int(2)), + ] { + let mut data = valid.clone(); + let Some(Tag::List(shapes)) = data.get_mut("shapes") else { + unreachable!() + }; + canonical_marker(&mut shapes[index], marker); + assert!(CachedCollisionRegistry::from_nbt(&data, ®istry).is_err()); + } + let mut duplicate = valid.clone(); + let Some(Tag::List(shapes)) = duplicate.get_mut("shapes") else { + unreachable!() + }; + canonical_marker(&mut shapes[1], Tag::Byte(2)); + shapes.push(shapes[1].clone()); + assert!(CachedCollisionRegistry::from_nbt(&duplicate, ®istry).is_err()); + let mut noncanonical_zero = valid; + let Some(Tag::List(shapes)) = noncanonical_zero.get_mut("shapes") else { + unreachable!() + }; + canonical_marker(&mut shapes[1], Tag::Byte(2)); + let Some(Tag::LongArray(coords)) = shapes[1].get_mut("x") else { + unreachable!() + }; + coords[0] = (-0.0f64).to_bits() as i64; + assert!(CachedCollisionRegistry::from_nbt(&noncanonical_zero, ®istry).is_err()); +} + +#[test] +fn registry_scan_binding_requires_complete_canonical_metadata() { + use horizon_world::{ + block_collision::BlockCollisionRegistry, + registry_collision_scan::RegistryCollisionWorld, + suffocation::{SuffocationDefinition, SuffocationRegistry}, + }; + use std::{collections::BTreeSet, sync::Arc}; + let (registry_tag, mut collision_tag) = fixture(); + let registry = BlockRegistry::from_nbt(®istry_tag).unwrap(); + let definitions = ["minecraft:air", "minecraft:stone", "minecraft:context"] + .map(|name| (name.to_owned(), SuffocationDefinition::Never)) + .into_iter() + .collect(); + for marked in [false, true] { + if marked { + let Some(Tag::List(shapes)) = collision_tag.get_mut("shapes") else { + unreachable!() + }; + canonical_marker(&mut shapes[0], Tag::Byte(1)); + canonical_marker(&mut shapes[1], Tag::Byte(2)); + } + let cached = + Arc::new(CachedCollisionRegistry::from_nbt(&collision_tag, ®istry).unwrap()); + let collisions = Arc::new(BlockCollisionRegistry::new(cached).unwrap()); + assert!(collisions.collision_block(BlockStateId(3)).is_err()); + let binding = SuffocationRegistry::new(collisions, &definitions, &BTreeSet::new()).unwrap(); + assert_eq!( + RegistryCollisionWorld::new(&binding, &mut ()).is_ok(), + marked + ); + } +} diff --git a/crates/horizon-world/tests/decoration_bounds.rs b/crates/horizon-world/tests/decoration_bounds.rs new file mode 100644 index 000000000..2ba2eb885 --- /dev/null +++ b/crates/horizon-world/tests/decoration_bounds.rs @@ -0,0 +1,35 @@ +use horizon_core::position::ChunkPos; +use horizon_world::worldgen::{ + decoration::{DecorationBiome, DecorationError, DecorationWorld, FeatureDecorationPlan}, + feature_sort::{FeatureIdentity, FeatureSortError}, +}; +struct NoChunks; +impl DecorationWorld for NoChunks { + type Error = (); + fn min_section_y(&mut self) -> Result<i32, ()> { + Ok(-4) + } + fn chunk_biomes(&mut self, _: ChunkPos) -> Result<Vec<DecorationBiome>, ()> { + panic!("unbounded neighborhood must be rejected before reading chunks") + } + fn set_currently_generating(&mut self, _: Option<FeatureIdentity>) -> Result<(), ()> { + panic!("invalid neighborhood must not start or finish decoration") + } +} +#[test] +fn invalid_registry_identity_and_unbounded_neighborhood_are_rejected() { + assert!(matches!( + FeatureDecorationPlan::new(vec![ + (DecorationBiome(0), vec![]), + (DecorationBiome(0), vec![]) + ]), + Err(FeatureSortError::DuplicateBiome) + )); + let plan = FeatureDecorationPlan::new(vec![]).unwrap(); + for chunk in [ChunkPos::new(i32::MIN, 0), ChunkPos::new(0, i32::MAX)] { + let result = plan.decorate_features(&mut NoChunks, chunk, 0, |_, _, _, _, _| { + panic!("invalid neighborhood must not place features") + }); + assert!(matches!(result, Err(DecorationError::WorkLimit))); + } +} diff --git a/crates/horizon-world/tests/edge_backoff.rs b/crates/horizon-world/tests/edge_backoff.rs new file mode 100644 index 000000000..501bc625d --- /dev/null +++ b/crates/horizon-world/tests/edge_backoff.rs @@ -0,0 +1,62 @@ +use horizon_core::geometry::{Aabb, Vec3}; +use horizon_world::edge_backoff::{ + EdgeBackoffError, EdgeBackoffInput, EdgeBackoffWorld, back_off_from_edge, +}; +struct World { + calls: usize, +} +impl EdgeBackoffWorld for World { + type Error = std::convert::Infallible; + fn max_up_step(&mut self) -> Result<f32, Self::Error> { + Ok(0.6) + } + fn staying_on_ground_surface(&mut self) -> Result<bool, Self::Error> { + Ok(true) + } + fn on_ground(&mut self) -> Result<bool, Self::Error> { + Ok(true) + } + fn no_collision(&mut self, _: Aabb) -> Result<bool, Self::Error> { + self.calls += 1; + Ok(true) + } +} +fn input() -> EdgeBackoffInput { + EdgeBackoffInput { + movement: Vec3::new(f64::INFINITY, 0.0, 0.0), + bounds: Aabb::new(Vec3::new(-0.3, 1.0, -0.3), Vec3::new(0.3, 2.8, 0.3)), + flying: false, + self_or_player: true, + fall_distance: 0.0, + query_budget: 3, + } +} +#[test] +fn nonconverging_motion_exhausts_budget_without_successful_displacement() { + let mut world = World { calls: 0 }; + assert!(matches!( + back_off_from_edge(&mut world, input()), + Err(EdgeBackoffError::QueryBudget) + )); + assert_eq!(world.calls, 3); +} +#[test] +fn zero_budget_only_fails_when_a_probe_is_needed() { + let mut world = World { calls: 0 }; + let mut request = input(); + request.query_budget = 0; + request.flying = true; + assert!( + back_off_from_edge(&mut world, request) + .unwrap() + .x + .is_infinite() + ); + let mut request = input(); + request.query_budget = 0; + assert!(matches!( + back_off_from_edge(&mut world, request), + Err(EdgeBackoffError::QueryBudget) + )); + assert_eq!(world.calls, 0); +} diff --git a/crates/horizon-world/tests/feature_catalog.rs b/crates/horizon-world/tests/feature_catalog.rs new file mode 100644 index 000000000..769ce8bbe --- /dev/null +++ b/crates/horizon-world/tests/feature_catalog.rs @@ -0,0 +1,62 @@ +use horizon_world::worldgen::{feature_catalog::FeatureCatalog, tags::TagDefinitions}; +use std::collections::BTreeMap; +fn map(values: &[(&str, &str)]) -> BTreeMap<String, String> { + values + .iter() + .map(|(k, v)| (k.to_string(), v.to_string())) + .collect() +} +#[test] +fn canonical_duplicates_cycles_and_unknown_unselected_children_fail() { + let tags = TagDefinitions::default(); + assert!( + FeatureCatalog::from_resources( + &map(&[ + ("a", r#"{"type":"no_op"}"#), + ("minecraft:a", r#"{"type":"no_op"}"#) + ]), + &BTreeMap::new(), + &tags + ) + .is_err() + ); + let features = map(&[ + ( + "horizon:loop", + r#"{"type":"sequence","features":["horizon:loop"]}"#, + ), + ("horizon:unused", r#"{"type":"not_implemented"}"#), + ]); + let placed = map(&[( + "horizon:loop", + r#"{"feature":"horizon:loop","placement":[]}"#, + )]); + let catalog = FeatureCatalog::from_resources(&features, &placed, &tags).unwrap(); + assert!(catalog.feature(r#""horizon:loop""#).is_err()); + assert!(catalog.placed_feature(r#""horizon:loop""#).is_err()); + assert!(catalog.feature(r#"{"type":"no_op"}"#).is_ok()); + assert!(catalog.feature(r#"{"type":"weighted_random_selector","features":[{"data":"horizon:missing","weight":0}]}"#).is_err()); +} +#[test] +fn shared_reference_expansion_is_bounded_before_building_a_large_tree() { + let leaf = r#"{"feature":{"type":"no_op"},"placement":[]}"#; + let branch = format!( + r#"{{"type":"sequence","features":[{}]}}"#, + vec![r#""horizon:leaf""#; 8192].join(",") + ); + let features = BTreeMap::from([("horizon:branch".into(), branch)]); + let placed = map(&[ + ("horizon:leaf", leaf), + ( + "horizon:branch", + r#"{"feature":"horizon:branch","placement":[]}"#, + ), + ]); + let catalog = + FeatureCatalog::from_resources(&features, &placed, &TagDefinitions::default()).unwrap(); + let root = format!( + r#"{{"type":"sequence","features":[{}]}}"#, + [r#""horizon:branch""#; 9].join(",") + ); + assert!(catalog.feature(&root).is_err()); +} diff --git a/crates/horizon-world/tests/feature_graph_bounds.rs b/crates/horizon-world/tests/feature_graph_bounds.rs new file mode 100644 index 000000000..63da02b19 --- /dev/null +++ b/crates/horizon-world/tests/feature_graph_bounds.rs @@ -0,0 +1,89 @@ +use horizon_core::random::{LegacyRandom, RandomSource}; +use horizon_world::{ + heightmap::HeightmapType, + registry::BlockStateId, + worldgen::{ + anchor::WorldGenerationContext, + feature::{FeatureBlocks, FeatureWorld}, + feature_graph::{FeatureDefinition, FeatureExecutionError, PlacedFeatureDefinition}, + placement::{PlacementContext, PlacementQueryError}, + }, +}; +struct World; +impl PlacementContext for World { + fn generation(&self) -> WorldGenerationContext { + WorldGenerationContext::new(0, 16, 8) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(0) + } + fn height(&mut self, _: HeightmapType, _: i32, _: i32) -> Result<i32, PlacementQueryError> { + panic!("no-op graph queried height") + } +} +impl FeatureWorld for World { + type Error = std::convert::Infallible; + fn block(&mut self, _: [i32; 3]) -> Result<BlockStateId, Self::Error> { + panic!("no-op graph read blocks") + } + fn set_block(&mut self, _: [i32; 3], _: BlockStateId, _: i32) -> Result<bool, Self::Error> { + panic!("no-op graph wrote blocks") + } +} +fn blocks() -> FeatureBlocks { + FeatureBlocks { + air: BlockStateId(0), + stone: BlockStateId(1), + cobblestone: BlockStateId(2), + end_stone: BlockStateId(3), + obsidian: BlockStateId(4), + } +} +#[test] +fn large_graphs_fail_at_a_shared_visit_bound_without_drawing_randomness() { + let leaf = PlacedFeatureDefinition { + feature: Box::new(FeatureDefinition::NoOp), + placement: vec![], + }; + let branch = PlacedFeatureDefinition { + feature: Box::new(FeatureDefinition::Sequence(vec![leaf; 8192])), + placement: vec![], + }; + let tree = FeatureDefinition::Sequence(vec![branch; 9]); + let mut random = LegacyRandom::new(5); + let mut expected = random.clone(); + assert!(matches!( + tree.place(&mut World, &mut random, [0; 3], blocks()), + Err(FeatureExecutionError::WorkLimit) + )); + assert_eq!(random.next_long(), expected.next_long()); +} +#[test] +fn nested_inline_decoding_rejects_excessive_depth() { + let mut value = String::from(r#"{"type":"no_op"}"#); + for _ in 0..70 { + value = + format!(r#"{{"type":"sequence","features":[{{"feature":{value},"placement":[]}}]}}"#); + } + assert!(FeatureDefinition::from_json(&value).is_err()); +} + +#[test] +fn modifier_expansion_without_leaf_calls_uses_the_shared_graph_budget() { + use horizon_world::worldgen::{placement::PlacementModifier, value_provider::IntProvider}; + let feature = PlacedFeatureDefinition { + feature: Box::new(FeatureDefinition::NoOp), + placement: vec![ + PlacementModifier::Count(IntProvider::Constant(4096)), + PlacementModifier::Count(IntProvider::Constant(4096)), + PlacementModifier::Count(IntProvider::Constant(0)), + ], + }; + let mut random = LegacyRandom::new(5); + let mut expected = random.clone(); + assert!(matches!( + feature.place(&mut World, &mut random, [0; 3], blocks()), + Err(FeatureExecutionError::WorkLimit) + )); + assert_eq!(random.next_long(), expected.next_long()); +} diff --git a/crates/horizon-world/tests/feature_placement.rs b/crates/horizon-world/tests/feature_placement.rs new file mode 100644 index 000000000..8eb9c1af6 --- /dev/null +++ b/crates/horizon-world/tests/feature_placement.rs @@ -0,0 +1,41 @@ +use horizon_core::random::{LegacyRandom, RandomSource}; +use horizon_world::worldgen::{ + anchor::WorldGenerationContext, + placement::{FeaturePlacementError, FeaturePlacer, PlacementModifier}, + value_provider::IntProvider, +}; + +#[test] +fn oversized_chains_fail_before_random_draws_or_feature_calls() { + let mut random = LegacyRandom::new(17); + let mut expected = random.clone(); + let mut placer = FeaturePlacer::new(); + let result = placer.place( + &vec![PlacementModifier::InSquare; 1025], + WorldGenerationContext::new(-64, 384, 63), + &mut random, + [0, 0, 0], + |_, _| -> Result<bool, ()> { panic!("oversized chain reached feature") }, + ); + assert!(matches!(result, Err(FeaturePlacementError::WorkLimit))); + assert_eq!(random.next_long(), expected.next_long()); +} + +#[test] +fn multiplicative_counts_stop_at_the_shared_work_bound() { + let mut random = LegacyRandom::new(17); + let mut placer = FeaturePlacer::new(); + let mut calls = 0; + let result = placer.place( + &vec![PlacementModifier::Count(IntProvider::Constant(4096)); 2], + WorldGenerationContext::new(-64, 384, 63), + &mut random, + [0, 0, 0], + |_, _| { + calls += 1; + Ok::<_, ()>(true) + }, + ); + assert!(matches!(result, Err(FeaturePlacementError::WorkLimit))); + assert!(calls > 0 && calls < 1 << 20); +} diff --git a/crates/horizon-world/tests/feature_region.rs b/crates/horizon-world/tests/feature_region.rs new file mode 100644 index 000000000..c484393bf --- /dev/null +++ b/crates/horizon-world/tests/feature_region.rs @@ -0,0 +1,387 @@ +use horizon_core::position::ChunkPos; +use horizon_world::{ + DATA_VERSION, + heightmap::{HeightmapState, HeightmapType}, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, + worldgen::{ + anchor::WorldGenerationContext, + feature::FeatureWorld, + feature_region::{RegionError, TerrainFeatureAccess, TerrainRegion}, + placement::PlacementContext, + terrain::{PreLightChunkStage, TerrainBlockStates, TerrainChunk}, + }, +}; +#[derive(Clone, Copy)] +struct State(u32); +impl HeightmapState for State { + fn is_air(self) -> bool { + self.0 < 2 + } + fn is_air_block(self) -> bool { + self.0 == 0 + } + fn has_fluid(self) -> bool { + self.0 == 3 + } + fn blocks_motion_in_heightmap(self) -> bool { + self.0 >= 2 && self.0 != 3 + } + fn blocks_motion_in_heightmap_no_leaves(self) -> bool { + self.blocks_motion_in_heightmap() + } +} +struct Properties; +impl TerrainBlockStates for Properties { + type State = State; + fn heightmap_state(&self, id: BlockStateId) -> State { + State(id.0) + } +} +fn registry() -> BlockRegistry { + let names = [ + "minecraft:air", + "minecraft:void_air", + "minecraft:stone", + "minecraft:water", + "minecraft:grass_block", + "minecraft:mycelium", + "minecraft:dirt", + "minecraft:cave_air", + ]; + BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ( + "states", + Tag::List( + names + .iter() + .map(|name| { + let mut tag = Tag::compound([("id", Tag::String((*name).into()))]); + if *name == "minecraft:water" { + if let Tag::Compound(entries) = &mut tag { + entries.insert( + "properties".into(), + Tag::compound([("level", Tag::String("0".into()))]), + ); + } + } + tag + }) + .collect(), + ), + ), + ( + "defaults", + Tag::Compound( + names + .iter() + .enumerate() + .map(|(id, name)| ((*name).into(), Tag::Int(id as i32))) + .collect(), + ), + ), + ])) + .unwrap() +} +#[test] +fn rejects_incompatible_regions_and_routes_negative_chunk_coordinates() { + let other_registry = registry(); + let registry = registry(); + let context = WorldGenerationContext::new(0, 16, 8); + let chunk = + |x, min, reg| TerrainChunk::new(ChunkPos::new(x, 0), min, 16, reg, Properties).unwrap(); + assert!(TerrainRegion::<Properties>::new(vec![], context).is_err()); + assert!( + TerrainRegion::new( + vec![chunk(0, 0, ®istry), chunk(0, 0, ®istry)], + context + ) + .is_err() + ); + assert!( + TerrainRegion::new( + vec![chunk(0, 0, ®istry), chunk(1, 16, ®istry)], + context + ) + .is_err() + ); + assert!( + TerrainRegion::new( + vec![chunk(0, 0, ®istry), chunk(1, 0, &other_registry)], + context + ) + .is_err() + ); + let mut region = TerrainRegion::new( + vec![chunk(-1, 0, ®istry), chunk(0, 0, ®istry)], + context, + ) + .unwrap(); + region + .set_block_worldgen([-1, 7, 0], BlockStateId(2)) + .unwrap(); + assert_eq!(region.block([-1, 7, 0]).unwrap(), BlockStateId(2)); + assert_eq!(region.block([15, 7, 0]).unwrap(), BlockStateId(0)); + assert!(matches!( + region.set_block_worldgen([16, 7, 0], BlockStateId(2)), + Err(RegionError::MissingChunk([1, 0])) + )); + assert_eq!(region.block([0, 7, 0]).unwrap(), BlockStateId(0)); +} +#[test] +fn write_callback_controls_mutation_and_receives_all_flags() { + let registry = registry(); + let mut chunk = TerrainChunk::new(ChunkPos::new(0, 0), 0, 16, ®istry, Properties).unwrap(); + chunk.set_generation_stage(PreLightChunkStage::Terrain); + let mut region = + TerrainRegion::new(vec![chunk], WorldGenerationContext::new(-16, 32, 8)).unwrap(); + assert_eq!(region.generation(), WorldGenerationContext::new(0, 16, 8)); + assert_eq!(region.height(HeightmapType::WorldSurface, 0, 0).unwrap(), 0); + let mut flags = Vec::new(); + { + let mut world = TerrainFeatureAccess::new( + &mut region, + |region: &mut TerrainRegion<'_, Properties>, p, state, flag| { + flags.push(flag); + if flag == 2 { + return Ok(false); + } + region.set_block_worldgen(p, state)?; + Ok(true) + }, + ); + assert!(!world.set_block([0, 7, 0], BlockStateId(2), 2).unwrap()); + assert_eq!(world.height(HeightmapType::WorldSurface, 0, 0).unwrap(), 0); + assert!(world.set_block([0, 7, 0], BlockStateId(2), 3).unwrap()); + assert_eq!(world.height(HeightmapType::WorldSurface, 0, 0).unwrap(), 8); + } + assert_eq!(flags, [2, 3]); +} + +#[test] +fn postprocessing_routes_to_resident_chunks_and_preserves_partial_marks() { + let registry = registry(); + let chunk = TerrainChunk::new(ChunkPos::new(-1, 1), -16, 32, ®istry, Properties).unwrap(); + let mut region = + TerrainRegion::new(vec![chunk], WorldGenerationContext::new(-16, 32, 8)).unwrap(); + { + let mut world = TerrainFeatureAccess::new( + &mut region, + |_: &mut TerrainRegion<'_, Properties>, _: [i32; 3], _: BlockStateId, _: i32| { + Ok::<_, RegionError>(false) + }, + ); + world.mark_postprocessing([-1, -1, 16]).unwrap(); + world.mark_postprocessing([-1, -1, 16]).unwrap(); + world.mark_postprocessing([-16, 0, 31]).unwrap(); + world.mark_postprocessing([-1, -17, 16]).unwrap(); + world.mark_postprocessing([-1, 16, 16]).unwrap(); + assert!(world.mark_postprocessing([0, 0, 16]).is_err()); + } + assert_eq!( + region.chunk(-1, 1).unwrap().postprocessing(), + &[vec![255, 255], vec![3840]] + ); +} + +#[test] +fn query_bindings_reject_foreign_registries_and_preserve_resolved_tag_snapshot() { + use horizon_world::{ + fluid::FluidKind, + worldgen::{block_feature::FeatureBlockBindings, placement::PlacementQueryError}, + }; + use std::collections::{BTreeMap, BTreeSet}; + let foreign = registry(); + let registry = registry(); + let chunk = || TerrainChunk::new(ChunkPos::new(-1, 0), 0, 16, ®istry, Properties).unwrap(); + let context = WorldGenerationContext::new(0, 16, 8); + let bindings = FeatureBlockBindings::new(&foreign, BTreeSet::new()).unwrap(); + assert!(matches!( + TerrainRegion::new(vec![chunk()], context) + .unwrap() + .with_block_bindings(&bindings), + Err(RegionError::InvalidBindings) + )); + let mut region = TerrainRegion::new(vec![chunk()], context).unwrap(); + assert_eq!( + region.fluid_state([-1, 0, 0]), + Err(PlacementQueryError::Unavailable) + ); + let tags = BTreeMap::from([("horizon:ground".into(), vec!["minecraft:stone".into()])]); + // Deliberately make the water tag contain EMPTY, not water, to catch a + // hard-coded water-family check instead of resolved tag membership. + let fluids = BTreeMap::from([("minecraft:water".into(), vec!["minecraft:empty".into()])]); + let bindings = FeatureBlockBindings::with_tags(®istry, BTreeSet::new(), &tags) + .unwrap() + .with_fluid_tags(&fluids) + .unwrap(); + region = region.with_block_bindings(&bindings).unwrap(); + drop(bindings); + region + .set_block_worldgen([-1, 0, 0], BlockStateId(3)) + .unwrap(); + assert_eq!( + region.fluid_state([-1, 0, 0]).unwrap().kind(), + FluidKind::Water + ); + assert!(!region.water_at([-1, 0, 0]).unwrap()); + region + .set_block_worldgen([-1, 0, 0], BlockStateId(2)) + .unwrap(); + assert!( + region + .block_matches_tag([-1, 0, 0], "horizon:ground") + .unwrap() + ); + assert!( + !region + .block_matches_tag([-1, 0, 0], "horizon:missing") + .unwrap() + ); + assert!(region.water_at([-1, 0, 0]).unwrap()); + assert!(region.water_at([-1, 16, 0]).unwrap()); + assert!(region.fluid_state([0, 0, 0]).is_err()); +} + +#[test] +fn upgrade_height_rejects_mutations_before_callbacks_but_preserves_reads_and_ticks() { + use horizon_world::worldgen::write_zone::{GenerationWriteZone, UpgradeWriteHeight}; + use std::cell::Cell; + let registry = registry(); + let mut chunk = + TerrainChunk::new(ChunkPos::new(0, 0), -64, 128, ®istry, Properties).unwrap(); + let stone = registry.default_state("minecraft:stone").unwrap(); + chunk.set_block_worldgen(0, 0, 0, stone).unwrap(); + let mut region = + TerrainRegion::new(vec![chunk], WorldGenerationContext::new(-64, 128, 0)).unwrap(); + let calls = Cell::new(0); + { + let write = |region: &mut TerrainRegion<'_, Properties>, p, state, _| { + calls.set(calls.get() + 1); + region.set_block_worldgen(p, state)?; + Ok(true) + }; + let mut world = TerrainFeatureAccess::new(&mut region, write) + .with_write_zone(GenerationWriteZone::new(ChunkPos::new(0, 0), 0)) + .with_upgrade_height(UpgradeWriteHeight::BELOW_ZERO); + assert!(!world.set_block([0, 0, 0], stone, 2).unwrap()); + assert!(!world.destroy_block_without_entity([0, 0, 0], true).unwrap()); + assert!(!world.set_block([0, -65, 0], stone, 2).unwrap()); + assert!(!world.set_block([16, -1, 0], stone, 2).unwrap()); + assert_eq!(calls.get(), 0); + assert_eq!(world.block_state([0, 0, 0]).unwrap(), stone); + world.schedule_block_tick([0, 0, 0], stone, 1).unwrap(); + assert!(world.set_block([0, -1, 0], stone, 2).unwrap()); + assert!( + world + .destroy_block_without_entity([0, -1, 0], true) + .unwrap() + ); + assert_eq!(calls.get(), 2); + } + assert_eq!(region.block([0, 0, 0]).unwrap(), stone); + assert_eq!(region.chunk(0, 0).unwrap().block_ticks().count(), 1); + let write = |_: &mut TerrainRegion<'_, Properties>, _, _, _| { + calls.set(calls.get() + 1); + Ok(true) + }; + let mut world = TerrainFeatureAccess::new(&mut region, write); + assert!(world.set_block([0, i32::MAX, 0], stone, 2).unwrap()); + assert_eq!(calls.get(), 3); +} + +#[test] +fn live_center_upgrade_policy_observes_callback_transitions() { + use horizon_world::{chunk_status::ChunkStatus, retrogen::BelowZeroRetrogen}; + let registry = registry(); + let mut chunks = Vec::new(); + for x in 0..2 { + let mut chunk = + TerrainChunk::new(ChunkPos::new(x, 0), -64, 128, ®istry, Properties).unwrap(); + chunk.set_below_zero_retrogen(Some( + BelowZeroRetrogen::new(ChunkStatus::Features, vec![]).unwrap(), + )); + chunks.push(chunk); + } + let mut region = TerrainRegion::new(chunks, WorldGenerationContext::new(-64, 128, 0)).unwrap(); + let mut calls = Vec::new(); + { + let write = |region: &mut TerrainRegion<'_, Properties>, p, _, flags| { + calls.push((p, flags)); + let center = region.chunk_mut(0, 0)?; + match flags { + 1 => center.set_generation_stage(PreLightChunkStage::Features), + 2 => center.set_below_zero_retrogen(Some( + BelowZeroRetrogen::new(ChunkStatus::Full, vec![]).unwrap(), + )), + 3 => center.set_below_zero_retrogen(None), + _ => {} + } + Ok(true) + }; + let mut world = TerrainFeatureAccess::new(&mut region, write) + .with_upgrade_center(ChunkPos::new(0, 0)) + .unwrap(); + assert!(!world.set_block([16, 0, 0], BlockStateId(2), 1).unwrap()); + assert!(world.set_block([16, -1, 0], BlockStateId(2), 1).unwrap()); + // The neighbor remains upgrading, but only the center selects the gate. + assert!(world.set_block([16, 0, 0], BlockStateId(2), 2).unwrap()); + assert!(!world.set_block([16, 0, 0], BlockStateId(2), 3).unwrap()); + assert!(world.set_block([16, -64, 0], BlockStateId(2), 3).unwrap()); + assert!( + world + .set_block([16, i32::MAX, 0], BlockStateId(2), 0) + .unwrap() + ); + } + assert_eq!(calls.len(), 4); + assert!(!region.chunk(0, 0).unwrap().is_upgrading()); + assert!(region.chunk(1, 0).unwrap().is_upgrading()); + assert!( + TerrainFeatureAccess::new(&mut region, ()) + .with_upgrade_center(ChunkPos::new(2, 0)) + .is_err() + ); +} + +#[test] +fn retained_upgrade_status_allows_old_biome_reads() { + use horizon_world::{ + chunk_status::ChunkStatus, + retrogen::BelowZeroRetrogen, + worldgen::biome_chunk::{BiomeChunk, BiomeRegion}, + }; + let registry = registry(); + let position = ChunkPos::new(-1, 1); + let biomes = + BiomeRegion::new(vec![BiomeChunk::new(position, -64, 128, 7).unwrap()], 0).unwrap(); + for stage in PreLightChunkStage::ALL { + for target in ChunkStatus::ALL.into_iter().skip(1) { + let mut chunk = TerrainChunk::new(position, -64, 128, ®istry, Properties).unwrap(); + chunk.set_generation_stage(stage); + chunk.set_below_zero_retrogen(Some(BelowZeroRetrogen::new(target, vec![]).unwrap())); + let mut region = + TerrainRegion::new(vec![chunk], WorldGenerationContext::new(-64, 128, 0)).unwrap(); + for y in [i32::MIN, -16, 0, 15, i32::MAX] { + let result = region.noise_biome(&biomes, [-1, y, 4]); + if stage.status() >= ChunkStatus::Biomes || target >= ChunkStatus::Biomes { + assert_eq!(*result.unwrap(), 7); + } else { + assert!(matches!( + result, + Err(RegionError::BiomesNotGenerated([-1, 1])) + )); + } + } + region + .chunk_mut(-1, 1) + .unwrap() + .set_below_zero_retrogen(None); + assert_eq!( + region.noise_biome(&biomes, [-1, 0, 4]).is_ok(), + stage.status() >= ChunkStatus::Biomes + ); + } + } +} diff --git a/crates/horizon-world/tests/feature_sort_bounds.rs b/crates/horizon-world/tests/feature_sort_bounds.rs new file mode 100644 index 000000000..84bbfb05e --- /dev/null +++ b/crates/horizon-world/tests/feature_sort_bounds.rs @@ -0,0 +1,34 @@ +use horizon_world::worldgen::feature_sort::{ + FeatureIdentity, FeatureSortError, build_features_per_step, +}; + +#[test] +fn long_dependency_chains_use_bounded_iterative_traversal() { + let features = (0..50000).map(FeatureIdentity).collect::<Vec<_>>(); + let result = build_features_per_step(&[vec![features.clone()]]).unwrap(); + assert_eq!(result[0].features(), features); + assert_eq!(result[0].index(FeatureIdentity(49999)), Some(49999)); + assert_eq!(result[0].index(FeatureIdentity(50000)), None); + assert!(matches!( + build_features_per_step(&[vec![vec![FeatureIdentity(0); 65536]]]), + Err(FeatureSortError::WorkLimit) + )); +} + +#[test] +fn opposite_biome_orders_and_repeated_identity_form_cycles() { + let a = FeatureIdentity(91); + let b = FeatureIdentity(7); + assert!(matches!( + build_features_per_step(&[vec![vec![a, b]], vec![vec![b, a]]]), + Err(FeatureSortError::Cycle) + )); + assert!(matches!( + build_features_per_step(&[vec![vec![a, a]]]), + Err(FeatureSortError::Cycle) + )); + let result = build_features_per_step(&[vec![vec![a], vec![], vec![a, b]]]).unwrap(); + assert_eq!(result[0].features(), [a]); + assert!(result[1].features().is_empty()); + assert_eq!(result[2].features(), [a, b]); +} diff --git a/crates/horizon-world/tests/material_stage.rs b/crates/horizon-world/tests/material_stage.rs new file mode 100644 index 000000000..fa17bf0e9 --- /dev/null +++ b/crates/horizon-world/tests/material_stage.rs @@ -0,0 +1,295 @@ +use horizon_core::{ + density::{ + CachingDensitySampler, ConstantSampler, ContextBoundSampler, DensitySampler, SampleError, + SamplerContext, WorldField, WorldFields, + }, + noise::{DensityVolume, NanRange, Noise}, + position::{BlockPos, ChunkPos}, + random::{RandomSource, XoroshiroRandom}, +}; +use horizon_world::{ + DATA_VERSION, + heightmap::HeightmapState, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, + worldgen::{ + anchor::WorldGenerationContext, + material_condition::{ + MaterialCondition, MaterialRule, MaterialRuleError, MaterialSurfaceQueries, + }, + material_extensions::{ExtensionBlocks, ExtensionNoises, MaterialExtensions}, + material_stage::{SurfaceInputs, TopMaterialInputs, build_surface, top_material}, + terrain::{TerrainBlockStates, TerrainChunk}, + }, +}; +use std::sync::{ + Arc, + atomic::{AtomicUsize, Ordering}, +}; + +#[derive(Clone, Copy)] +struct State(u32); +impl HeightmapState for State { + fn is_air(self) -> bool { + self.0 < 2 + } + fn is_air_block(self) -> bool { + self.0 == 0 + } + fn has_fluid(self) -> bool { + self.0 == 3 + } + fn blocks_motion_in_heightmap(self) -> bool { + self.0 == 2 + } + fn blocks_motion_in_heightmap_no_leaves(self) -> bool { + self.0 == 2 + } +} +struct Properties; +impl TerrainBlockStates for Properties { + type State = State; + fn heightmap_state(&self, id: BlockStateId) -> State { + State(id.0) + } +} +#[derive(Debug)] +struct Zero; +impl Noise for Zero { + fn range(&self) -> Result<[f32; 2], NanRange> { + Ok([0.; 2]) + } + fn get2(&self, _: f64, _: f64) -> f32 { + 0. + } + fn get3(&self, _: f64, _: f64, _: f64) -> f32 { + 0. + } +} +struct Surface { + calls: usize, + fail_at: Option<usize>, +} +impl MaterialSurfaceQueries for Surface { + fn surface_depth(&mut self, _: i32, _: i32) -> i32 { + 1 + } + fn surface_secondary(&mut self, _: i32, _: i32) -> f64 { + 0. + } + fn biome(&mut self, _: BlockPos) -> Result<Option<Arc<str>>, MaterialRuleError> { + self.calls += 1; + if self.fail_at == Some(self.calls) { + Err(MaterialRuleError::MissingBiome) + } else { + Ok(Some(Arc::from("minecraft:plains"))) + } + } +} +#[derive(Debug)] +struct Count(Arc<AtomicUsize>); +impl DensitySampler for Count { + fn sample_value(&self, _: &mut SamplerContext, _: [i32; 3]) -> Result<f32, SampleError> { + self.0.fetch_add(1, Ordering::SeqCst); + Ok(42.) + } +} +#[derive(Debug)] +struct Fails; +impl DensitySampler for Fails { + fn sample_value(&self, _: &mut SamplerContext, _: [i32; 3]) -> Result<f32, SampleError> { + Err(SampleError::RecursiveCache) + } +} +fn registry() -> BlockRegistry { + let names = [ + "minecraft:air", + "minecraft:void_air", + "minecraft:stone", + "minecraft:water", + ]; + BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ( + "states", + Tag::List( + names + .iter() + .map(|name| Tag::compound([("id", Tag::String((*name).into()))])) + .collect(), + ), + ), + ( + "defaults", + Tag::Compound( + names + .iter() + .enumerate() + .map(|(id, name)| ((*name).into(), Tag::Int(id as i32))) + .collect(), + ), + ), + ])) + .unwrap() +} + +#[test] +fn density_context_survives_success_binding_failure_and_partial_chunk_failure() { + let registry = registry(); + for scenario in 0..3 { + let mut chunk = + TerrainChunk::new(ChunkPos::new(0, 0), 0, 16, ®istry, Properties).unwrap(); + chunk.set_block_raw(0, 5, 0, BlockStateId(2)).unwrap(); + chunk.set_block_raw(0, 5, 1, BlockStateId(2)).unwrap(); + let count = Arc::new(AtomicUsize::new(0)); + let cached = CachingDensitySampler::new(0, Arc::new(Count(count.clone()))).unwrap(); + let mut context = SamplerContext::cached().with_world_fields( + WorldFields::default() + .with_field(WorldField::BlendOffset, Arc::new(ConstantSampler(73.))), + ); + assert_eq!(cached.sample_value(&mut context, [100, 2, 3]).unwrap(), 42.); + let root = XoroshiroRandom::new(0).fork_positional(); + let extensions = MaterialExtensions::new( + root, + ExtensionBlocks { + default: BlockStateId(2), + water: BlockStateId(3), + packed_ice: BlockStateId(2), + snow: BlockStateId(2), + }, + ExtensionNoises { + badlands_surface: Arc::new(Zero), + badlands_pillar: Arc::new(Zero), + badlands_roof: Arc::new(Zero), + iceberg_surface: Arc::new(Zero), + iceberg_pillar: Arc::new(Zero), + iceberg_roof: Arc::new(Zero), + }, + 8, + ); + let mut surface = Surface { + calls: 0, + fail_at: (scenario == 1).then_some(2), + }; + let rule = if scenario == 2 { + MaterialRule::OreVein { + ore: BlockStateId(2), + raw_ore: BlockStateId(2), + filler: BlockStateId(2), + raw_ore_chance: 0.5, + density: Arc::new(Fails), + richness: Arc::new(ConstantSampler(1.)), + filler_gap: Arc::new(ConstantSampler(-1.)), + } + } else { + MaterialRule::Block(BlockStateId(3)) + }; + let result = build_surface( + &mut chunk, + rule, + SurfaceInputs::<XoroshiroRandom, _> { + generation: WorldGenerationContext::new(0, 16, 8), + noise_volume: DensityVolume::new([16; 3], [0; 3], [1; 3]).unwrap(), + root, + surface: &mut surface, + preliminary_surface: Arc::new(ConstantSampler(0.)), + density_context: &mut context, + write_min_y: 0, + write_max_y: 15, + }, + &extensions, + ); + assert_eq!(result.is_ok(), scenario == 0); + assert_eq!(cached.sample_value(&mut context, [100, 2, 3]).unwrap(), 42.); + assert_eq!( + count.load(Ordering::SeqCst), + 1, + "the caller's cache was lost" + ); + assert_eq!( + ContextBoundSampler::new(WorldField::BlendOffset) + .sample_value(&mut context, [0; 3]) + .unwrap(), + 73. + ); + assert_eq!( + chunk.block(0, 5, 0), + BlockStateId(if scenario == 2 { 2 } else { 3 }) + ); + assert_eq!( + chunk.block(0, 5, 1), + BlockStateId(if scenario == 0 { 3 } else { 2 }) + ); + assert_eq!(chunk.postprocessing()[0].len(), [2, 1, 0][scenario]); + assert_eq!(surface.calls, [256, 2, 0][scenario]); + } +} + +#[test] +fn top_material_retains_context_on_failure_and_ignores_possible_biome_shortcuts() { + struct Restricted(Surface); + impl MaterialSurfaceQueries for Restricted { + fn possible_biomes(&self) -> Option<std::collections::BTreeSet<String>> { + Some(std::collections::BTreeSet::new()) + } + fn surface_depth(&mut self, _: i32, _: i32) -> i32 { + 1 + } + fn surface_secondary(&mut self, _: i32, _: i32) -> f64 { + 0. + } + fn biome(&mut self, p: BlockPos) -> Result<Option<Arc<str>>, MaterialRuleError> { + self.0.biome(p) + } + } + let registry = registry(); + for fail in [false, true] { + let mut chunk = + TerrainChunk::new(ChunkPos::new(0, 0), 0, 16, ®istry, Properties).unwrap(); + chunk.set_block_raw(0, 5, 0, BlockStateId(2)).unwrap(); + let count = Arc::new(AtomicUsize::new(0)); + let cached = CachingDensitySampler::new(0, Arc::new(Count(count.clone()))).unwrap(); + let mut context = SamplerContext::cached().with_world_fields( + WorldFields::default() + .with_field(WorldField::BlendOffset, Arc::new(ConstantSampler(73.))), + ); + assert_eq!(cached.sample_value(&mut context, [100, 2, 3]).unwrap(), 42.); + let mut surface = Restricted(Surface { + calls: 0, + fail_at: fail.then_some(1), + }); + let rule = MaterialRule::Condition { + if_true: MaterialCondition::Biome(vec!["minecraft:plains".to_owned()]), + then_run: Box::new(MaterialRule::Block(BlockStateId(3))), + }; + let result = top_material( + &mut chunk, + rule, + TopMaterialInputs::<XoroshiroRandom, _> { + generation: WorldGenerationContext::new(0, 16, 8), + root: XoroshiroRandom::new(0).fork_positional(), + surface: &mut surface, + preliminary_surface: Arc::new(ConstantSampler(0.)), + density_context: &mut context, + }, + BlockPos::new(0, 5, 0), + true, + ); + if fail { + assert!(result.is_err()); + } else { + assert_eq!(result.unwrap(), Some(BlockStateId(3))); + } + assert_eq!(surface.0.calls, 1); + assert_eq!(cached.sample_value(&mut context, [100, 2, 3]).unwrap(), 42.); + assert_eq!(count.load(Ordering::SeqCst), 1); + assert_eq!( + ContextBoundSampler::new(WorldField::BlendOffset) + .sample_value(&mut context, [0; 3]) + .unwrap(), + 73. + ); + assert_eq!(chunk.block(0, 5, 0), BlockStateId(2)); + assert!(chunk.postprocessing()[0].is_empty()); + } +} diff --git a/crates/horizon-world/tests/movement_properties.rs b/crates/horizon-world/tests/movement_properties.rs new file mode 100644 index 000000000..e6e84bdc4 --- /dev/null +++ b/crates/horizon-world/tests/movement_properties.rs @@ -0,0 +1,144 @@ +use horizon_core::position::BlockPos; +use horizon_world::{ + DATA_VERSION, + movement_properties::{ + MovementBlockError, MovementBlockProvider, MovementProperties, MovementTags, + RegistryMovementWorld, + }, + movement_support::MovementBlockWorld, + nbt::Tag, + registry::{BlockRegistry, BlockStateId}, +}; +fn fixture() -> (Tag, Tag) { + let states = Tag::List(vec![ + Tag::String("minecraft:stone".into()), + Tag::String("minecraft:water".into()), + ]); + let registry = Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ("states", states.clone()), + ( + "defaults", + Tag::compound([ + ("minecraft:stone", Tag::Int(0)), + ("minecraft:water", Tag::Int(1)), + ]), + ), + ]); + let definition = Tag::compound([ + ("friction", Tag::Float(0.6f32.to_bits())), + ("speedFactor", Tag::Float((-0.0f32).to_bits())), + ("jumpFactor", Tag::Float(1f32.to_bits())), + ("bounceRestitution", Tag::Float(0)), + ("fallDistanceReduction", Tag::Float(0)), + ("fenceGate", Tag::Byte(0)), + ]); + let movement = Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ("states", states), + ( + "blocks", + Tag::compound([ + ("minecraft:stone", definition.clone()), + ("minecraft:water", definition), + ]), + ), + ]); + (registry, movement) +} +#[test] +fn rejects_foreign_incomplete_and_malformed_definitions() { + let (r, valid) = fixture(); + let registry = BlockRegistry::from_nbt(&r).unwrap(); + for (key, value) in [ + ("DataVersion", Tag::Int(0)), + ("states", Tag::List(vec![])), + ( + "states", + Tag::List(vec![ + Tag::String("minecraft:water".into()), + Tag::String("minecraft:stone".into()), + ]), + ), + ("blocks", Tag::compound([] as [(&str, Tag); 0])), + ] { + let mut bad = valid.clone(); + *bad.get_mut(key).unwrap() = value; + assert!(MovementProperties::from_nbt(&bad, ®istry).is_err()); + } + for (key, value) in [("friction", Tag::Int(1)), ("fenceGate", Tag::Byte(2))] { + let mut bad = valid.clone(); + *bad.get_mut("blocks") + .unwrap() + .get_mut("minecraft:stone") + .unwrap() + .get_mut(key) + .unwrap() = value; + assert!(MovementProperties::from_nbt(&bad, ®istry).is_err()); + } + let mut bad = valid.clone(); + let Tag::Compound(blocks) = bad.get_mut("blocks").unwrap() else { + unreachable!() + }; + blocks.insert( + "minecraft:unknown".into(), + blocks.values().next().unwrap().clone(), + ); + assert!(MovementProperties::from_nbt(&bad, ®istry).is_err()); +} +#[test] +fn reloaded_tags_preserve_previous_binding_and_coefficients() { + let (r, data) = fixture(); + let registry = BlockRegistry::from_nbt(&r).unwrap(); + let properties = MovementProperties::from_nbt(&data, ®istry).unwrap(); + let empty = properties.bind(&MovementTags::default()).unwrap(); + let mut tags = MovementTags::default(); + tags.fences.insert("minecraft:stone".into()); + tags.suppresses_bounce.insert("minecraft:water".into()); + let changed = properties.bind(&tags).unwrap(); + assert!(!empty.get(BlockStateId(0)).unwrap().fence); + assert!(changed.get(BlockStateId(0)).unwrap().fence); + let water = changed.get(BlockStateId(1)).unwrap(); + assert!(water.water && water.suppresses_bounce); + assert_eq!( + water.coefficients.speed_factor.to_bits(), + (-0.0f32).to_bits() + ); + tags.walls.insert("minecraft:missing".into()); + assert!(properties.bind(&tags).is_err()); + assert!(empty.get(BlockStateId(2)).is_err()); +} +#[test] +fn provider_errors_and_unknown_states_remain_distinct() { + struct Provider(bool); + impl MovementBlockProvider for Provider { + type Error = &'static str; + fn movement_block_state(&mut self, _: BlockPos) -> Result<BlockStateId, Self::Error> { + if self.0 { + Err("missing chunk") + } else { + Ok(BlockStateId(2)) + } + } + } + let (r, data) = fixture(); + let registry = BlockRegistry::from_nbt(&r).unwrap(); + let properties = MovementProperties::from_nbt(&data, ®istry) + .unwrap() + .bind(&MovementTags::default()) + .unwrap(); + let mut provider = Provider(true); + let mut world = RegistryMovementWorld { + properties: &properties, + world: &mut provider, + }; + assert!(matches!( + world.block_state(BlockPos::default()), + Err(MovementBlockError::World("missing chunk")) + )); + world.world.0 = false; + assert!(matches!( + world.block_state(BlockPos::default()), + Err(MovementBlockError::Data(_)) + )); +} diff --git a/crates/horizon-world/tests/placement_bounds.rs b/crates/horizon-world/tests/placement_bounds.rs new file mode 100644 index 000000000..ca9610ceb --- /dev/null +++ b/crates/horizon-world/tests/placement_bounds.rs @@ -0,0 +1,58 @@ +use horizon_core::random::LegacyRandom; +use horizon_world::{ + heightmap::HeightmapType, + worldgen::{ + anchor::WorldGenerationContext, + placement::{ + LayerBlock, PlacementContext, PlacementError, PlacementModifier, PlacementQueryError, + }, + value_provider::IntProvider, + }, +}; + +#[test] +fn negative_cuboid_extent_skips_empty_loops_even_with_huge_other_extents() { + let modifier = PlacementModifier::Cuboid { + xz_size: IntProvider::Constant(i32::MAX), + y_size: IntProvider::Constant(-1), + include_edges: true, + include_interior: true, + }; + let result = modifier.modify( + WorldGenerationContext::new(0, 16, 8), + &mut LegacyRandom::new(0), + [0, 0, 0], + |_, _| -> Result<(), ()> { panic!("empty cuboid emitted") }, + ); + assert!(result.is_ok()); +} +struct UnboundedColumn { + reads: usize, +} +impl PlacementContext for UnboundedColumn { + fn generation(&self) -> WorldGenerationContext { + WorldGenerationContext::new(-64, 384, 63) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + Ok(-64) + } + fn height(&mut self, _: HeightmapType, _: i32, _: i32) -> Result<i32, PlacementQueryError> { + Ok(i32::MAX) + } + fn layer_block(&mut self, _: [i32; 3]) -> Result<LayerBlock, PlacementQueryError> { + self.reads += 1; + Ok(LayerBlock::Empty) + } +} +#[test] +fn layered_scans_bound_work_when_world_queries_return_extreme_heights() { + let mut context = UnboundedColumn { reads: 0 }; + let result = PlacementModifier::CountOnEveryLayer(IntProvider::Constant(1)).modify_in( + &mut context, + &mut LegacyRandom::new(0), + [0, 0, 0], + |_, _| -> Result<(), ()> { panic!("empty column emitted") }, + ); + assert!(matches!(result, Err(PlacementError::WorkLimit))); + assert!(context.reads > 0 && context.reads <= 65536); +} diff --git a/crates/horizon-world/tests/placement_queries.rs b/crates/horizon-world/tests/placement_queries.rs new file mode 100644 index 000000000..e49bfd8ae --- /dev/null +++ b/crates/horizon-world/tests/placement_queries.rs @@ -0,0 +1,45 @@ +use horizon_core::random::{LegacyRandom, RandomSource}; +use horizon_world::{ + heightmap::HeightmapType, + worldgen::{ + anchor::WorldGenerationContext, + placement::{PlacementContext, PlacementError, PlacementModifier, PlacementQueryError}, + }, +}; +struct Context { + queries: Vec<HeightmapType>, +} +impl PlacementContext for Context { + fn generation(&self) -> WorldGenerationContext { + WorldGenerationContext::new(0, 16, 8) + } + fn min_y(&mut self) -> Result<i32, PlacementQueryError> { + panic!("water depth does not query the world minimum") + } + fn height(&mut self, kind: HeightmapType, _: i32, _: i32) -> Result<i32, PlacementQueryError> { + self.queries.push(kind); + if kind == HeightmapType::OceanFloor { + Ok(7) + } else { + Err(PlacementQueryError::Failed("surface unavailable".into())) + } + } +} +#[test] +fn second_height_query_failure_preserves_order_without_emission_or_random_draws() { + let mut context = Context { queries: vec![] }; + let mut random = LegacyRandom::new(17); + let mut expected = random.clone(); + let result = PlacementModifier::SurfaceWaterDepth(7).modify_in( + &mut context, + &mut random, + [1, 9, 2], + |_, _| -> Result<(), ()> { panic!("failed query emitted a position") }, + ); + assert!(matches!(result, Err(PlacementError::World(_)))); + assert_eq!( + context.queries, + [HeightmapType::OceanFloor, HeightmapType::WorldSurface] + ); + assert_eq!(random.next_long(), expected.next_long()); +} diff --git a/crates/horizon-world/tests/retrogen_biomes.rs b/crates/horizon-world/tests/retrogen_biomes.rs new file mode 100644 index 000000000..c83b77d93 --- /dev/null +++ b/crates/horizon-world/tests/retrogen_biomes.rs @@ -0,0 +1,117 @@ +use horizon_core::position::ChunkPos; +use horizon_world::{ + retrogen::RetrogenBiomeResolver, + worldgen::biome_chunk::{BiomeChunk, BiomeFillError}, +}; +use std::cell::RefCell; + +#[test] +fn candidates_precede_old_columns_and_errors_short_circuit() { + let events = RefCell::new(Vec::new()); + let mut resolver = RetrogenBiomeResolver::new(true, |p| { + events.borrow_mut().push(p); + if p[1] == 99 { + Err("candidate") + } else { + Ok("minecraft:plains") + } + }); + let old = |p| { + events.borrow_mut().push(p); + Ok("horizon:old") + }; + assert_eq!( + resolver.sample([-3, -15, 8], |v| Some(*v), old), + Ok("horizon:old") + ); + assert_eq!(*events.borrow(), [[-3, -15, 8], [-3, 0, 8]]); + events.borrow_mut().clear(); + assert_eq!( + resolver.sample([1, 99, 2], |v| Some(*v), old), + Err("candidate") + ); + assert_eq!(*events.borrow(), [[1, 99, 2]]); + assert_eq!( + resolver.sample([1, -1, 2], |v| Some(*v), |_| Err("old")), + Err("old") + ); + for name in [ + "minecraft:lush_caves", + "minecraft:dripstone_caves", + "minecraft:deep_dark", + ] { + let mut resolver = RetrogenBiomeResolver::new(true, |_| Ok::<_, ()>(name)); + assert_eq!( + resolver.sample( + [0, -1, 0], + |v| Some(*v), + |_| panic!("retained candidate must not read old column") + ), + Ok(name) + ); + assert_eq!( + resolver.sample([0, -1, 0], |_| None, |_| Ok("old")), + Ok("old") + ); + } + let mut normal = RetrogenBiomeResolver::new(false, |_| Ok::<_, ()>("candidate")); + assert_eq!( + normal.sample( + [0, 0, 0], + |_| panic!("normal resolver must not inspect keys"), + |_| panic!("normal resolver must not read old columns") + ), + Ok("candidate") + ); +} + +#[test] +fn upgrade_fill_preserves_columns_and_section_atomicity() { + let mut chunk = BiomeChunk::new(ChunkPos::new(-1, 2), -64, 128, String::new()).unwrap(); + chunk + .fill(-64, 63, |[x, y, z]| Ok::<_, ()>(format!("old:{x}:{y}:{z}"))) + .unwrap(); + let original = chunk.clone(); + let mut calls = 0; + let result = chunk.fill_with_retrogen( + -64, + -1, + true, + |_| { + calls += 1; + if calls == 66 { + Err("failure") + } else { + Ok("minecraft:plains".to_owned()) + } + }, + |name| Some(name), + ); + assert_eq!(result, Err(BiomeFillError::Resolve("failure"))); + for y in -16..-12 { + for x in -4..0 { + for z in 8..12 { + assert_eq!( + chunk.noise_biome([x, y, z]), + original.noise_biome([x, 0, z]) + ); + } + } + } + for section in 1..8 { + assert_eq!(chunk.section(section), original.section(section)); + } + chunk + .fill_with_retrogen( + -64, + -1, + true, + |_| Ok::<_, ()>("minecraft:lush_caves".to_owned()), + |name| Some(name), + ) + .unwrap(); + assert_eq!(chunk.noise_biome([-4, -16, 8]), "minecraft:lush_caves"); + for section in 4..8 { + assert_eq!(chunk.section(section), original.section(section)); + } +} diff --git a/crates/horizon-world/tests/rule_test_bounds.rs b/crates/horizon-world/tests/rule_test_bounds.rs new file mode 100644 index 000000000..de4862f54 --- /dev/null +++ b/crates/horizon-world/tests/rule_test_bounds.rs @@ -0,0 +1,69 @@ +use horizon_world::{ + DATA_VERSION, + nbt::Tag, + registry::BlockRegistry, + worldgen::{block_feature::FeatureBlockBindings, rule_test::RuleTest}, +}; +use std::collections::{BTreeMap, BTreeSet}; +fn registry() -> BlockRegistry { + let names = [ + "minecraft:air", + "minecraft:cave_air", + "minecraft:void_air", + "minecraft:stone", + ]; + BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ( + "states", + Tag::List( + names + .iter() + .map(|name| Tag::compound([("id", Tag::String((*name).into()))])) + .collect(), + ), + ), + ( + "defaults", + Tag::Compound( + names + .iter() + .enumerate() + .map(|(id, name)| ((*name).into(), Tag::Int(id as i32))) + .collect(), + ), + ), + ])) + .unwrap() +} +#[test] +fn rule_decoding_bounds_nested_and_branching_data() { + let registry = registry(); + let bindings = FeatureBlockBindings::new(®istry, BTreeSet::new()).unwrap(); + let leaf = r#"{"predicate_type":"always_true"}"#; + let mut nested = leaf.to_owned(); + for _ in 0..130 { + nested = format!(r#"{{"predicate_type":"not","rule":{nested}}}"#); + } + assert!(RuleTest::from_json(&nested, &bindings).is_err()); + let branch = format!( + r#"{{"predicate_type":"all_of","rules":[{}]}}"#, + vec![leaf; 8192].join(",") + ); + let tree = format!( + r#"{{"predicate_type":"all_of","rules":[{}]}}"#, + [branch.as_str(); 9].join(",") + ); + assert!(RuleTest::from_json(&tree, &bindings).is_err()); +} +#[test] +fn binding_rejects_unknown_tag_blocks_and_duplicate_canonical_tags() { + let registry = registry(); + let tags = BTreeMap::from([("horizon:test".into(), vec!["missing".into()])]); + assert!(FeatureBlockBindings::with_tags(®istry, BTreeSet::new(), &tags).is_err()); + let tags = BTreeMap::from([ + ("test".into(), vec!["stone".into()]), + ("minecraft:test".into(), vec!["air".into()]), + ]); + assert!(FeatureBlockBindings::with_tags(®istry, BTreeSet::new(), &tags).is_err()); +} diff --git a/crates/horizon-world/tests/state_provider_bounds.rs b/crates/horizon-world/tests/state_provider_bounds.rs new file mode 100644 index 000000000..033d4675c --- /dev/null +++ b/crates/horizon-world/tests/state_provider_bounds.rs @@ -0,0 +1,81 @@ +use horizon_world::{ + DATA_VERSION, + nbt::Tag, + registry::BlockRegistry, + worldgen::state_provider::{BlockStateProvider, StateProviderBindings, StateProviderCatalog}, +}; +use std::collections::{BTreeMap, BTreeSet}; +#[test] +fn bound_recursive_providers_and_registry_lists_before_sampling() { + let registry = BlockRegistry::from_nbt(&Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ( + "states", + Tag::List(vec![Tag::compound([( + "id", + Tag::String("minecraft:stone".into()), + )])]), + ), + ( + "defaults", + Tag::compound([("minecraft:stone", Tag::Int(0))]), + ), + ])) + .unwrap(); + let bindings = + StateProviderBindings::new(®istry, BTreeSet::new(), &BTreeMap::new()).unwrap(); + let mut source = r#"{"id":"stone"}"#.to_owned(); + for _ in 0..140 { + source = format!(r#"{{"type":"rotated","state":{source}}}"#); + } + assert!(BlockStateProvider::from_json(&source, &bindings).is_err()); + let source = serde_json::json!({"type":"random_block","blocks":vec!["stone";8193]}).to_string(); + assert!(BlockStateProvider::from_json(&source, &bindings).is_err()); + let rule = serde_json::json!({"if_true":{"type":"true"},"then":{"id":"stone"}}); + let valid = serde_json::json!({"type":"rule_based","rules":vec![rule.clone();8192]}); + assert!(BlockStateProvider::from_json(&valid.to_string(), &bindings).is_ok()); + let oversized = serde_json::json!({"type":"rule_based","rules":vec![rule;8193]}); + assert!(BlockStateProvider::from_json(&oversized.to_string(), &bindings).is_err()); + // Every individual list fits, but the aggregate predicate/provider tree + // must share a work budget rather than resetting it for each rule. + let branching = serde_json::json!({"if_true":{"type":"all_of","predicates":vec![serde_json::json!({"type":"true"});7]},"then":{"id":"stone"}}); + let oversized = serde_json::json!({"type":"rule_based","rules":vec![branching;8192]}); + assert!(BlockStateProvider::from_json(&oversized.to_string(), &bindings).is_err()); + let tags = BTreeMap::from([("horizon:oversized".into(), vec!["stone".into(); 8193])]); + assert!(StateProviderBindings::new(®istry, BTreeSet::new(), &tags).is_err()); + let tags = BTreeMap::from([("tag".into(), vec![]), ("minecraft:tag".into(), vec![])]); + assert!(StateProviderBindings::new(®istry, BTreeSet::new(), &tags).is_err()); + let definitions = BTreeMap::from([ + ( + "horizon:cycle".into(), + r#"{"type":"copy_properties","source":"horizon:cycle"}"#.into(), + ), + ("horizon:valid".into(), r#"{"id":"stone"}"#.into()), + ("horizon:invalid".into(), r#"{"type":"missing"}"#.into()), + ("horizon:alias".into(), r#""horizon:valid""#.into()), + ]); + let catalog = StateProviderCatalog::from_resources(&definitions).unwrap(); + assert!(catalog.provider(r#""horizon:valid""#, &bindings).is_ok()); + for name in [ + "horizon:cycle", + "horizon:invalid", + "horizon:alias", + "horizon:missing", + ] { + assert!( + catalog + .provider(&serde_json::to_string(name).unwrap(), &bindings) + .is_err() + ); + } + assert!( + catalog + .direct_provider(r#""horizon:valid""#, &bindings) + .is_err() + ); + let duplicate = BTreeMap::from([ + ("stone".into(), "{}".into()), + ("minecraft:stone".into(), "{}".into()), + ]); + assert!(StateProviderCatalog::from_resources(&duplicate).is_err()); +} diff --git a/crates/horizon-world/tests/tick_data.rs b/crates/horizon-world/tests/tick_data.rs new file mode 100644 index 000000000..7060b57a4 --- /dev/null +++ b/crates/horizon-world/tests/tick_data.rs @@ -0,0 +1,117 @@ +use horizon_core::{ + position::BlockPos, + ticks::{SavedTick, TickPriority, TickTypeId}, +}; +use horizon_world::{ + DATA_VERSION, + chunk::ChunkData, + nbt::{NamedTag, Tag}, + tick_data::{self, TickKind}, +}; + +fn saved(pos: BlockPos) -> SavedTick { + SavedTick { + kind: TickTypeId(7), + pos, + delay: -1, + priority: TickPriority::High, + } +} +fn root() -> NamedTag { + NamedTag { + name: "".into(), + tag: Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ("xPos", Tag::Int(-1)), + ("zPos", Tag::Int(-1)), + ("sections", Tag::List(vec![])), + ("unknown", Tag::Long(42)), + ]), + } +} +#[test] +fn numeric_codec_narrowing_and_malformed_data() { + let tag = Tag::List(vec![Tag::compound([ + ("i", Tag::String("minecraft:stone".into())), + ("x", Tag::Double((-1.5f64).to_bits())), + ("y", Tag::Float(f32::NAN.to_bits())), + ("z", Tag::Byte(-1)), + ("t", Tag::Long(i64::MAX)), + ("p", Tag::Double(f64::NEG_INFINITY.to_bits())), + ])]); + let ticks = tick_data::read_list(&tag, |_| Some(TickTypeId(7))).unwrap(); + assert_eq!( + ticks, + [SavedTick { + pos: BlockPos::new(-1, 0, -1), + priority: TickPriority::ExtremelyHigh, + ..saved(BlockPos::default()) + }] + ); + assert!(tick_data::read_list(&tag, |_| None).is_err()); + assert!(tick_data::read_list(&Tag::List(vec![Tag::Int(1)]), |_| Some(TickTypeId(0))).is_err()); + assert!(tick_data::read_list(&Tag::Int(0), |_| Some(TickTypeId(0))).is_err()); + assert!(tick_data::write_list(&ticks, |_| None).is_err()); +} +#[test] +fn saved_chunk_ticks_filter_coordinates_and_write_atomically() { + let mut root = root(); + let Tag::Compound(map) = &mut root.tag else { + unreachable!() + }; + map.insert( + "block_ticks".into(), + tick_data::write_list( + &[ + saved(BlockPos::new(-1, 64, -1)), + saved(BlockPos::new(0, 64, -1)), + ], + |_| Some("minecraft:stone".to_owned()), + ) + .unwrap(), + ); + let mut chunk = ChunkData::new(root).unwrap(); + let mut ticks = chunk + .saved_ticks(TickKind::Block, |_| Some(TickTypeId(7))) + .unwrap(); + assert_eq!(ticks.count(), 1); + assert!(ticks.has_scheduled(BlockPos::new(-1, 64, -1), TickTypeId(7))); + assert!(!ticks.has_scheduled(BlockPos::new(0, 64, -1), TickTypeId(7))); + assert!( + chunk + .saved_ticks(TickKind::Fluid, |_| None) + .unwrap() + .peek() + .is_none() + ); + ticks.unpack(100); + let packed = ticks.pack(100); + let before = chunk.root().clone(); + assert!( + chunk + .set_saved_ticks(TickKind::Block, &packed, |_| None) + .is_err() + ); + assert_eq!(chunk.root(), &before); + assert!( + chunk + .set_saved_ticks(TickKind::Block, &[saved(BlockPos::new(0, 64, -1))], |_| { + Some("minecraft:stone".to_owned()) + }) + .is_err() + ); + assert_eq!(chunk.root(), &before); + chunk + .set_saved_ticks(TickKind::Block, &packed, |_| { + Some("minecraft:stone".to_owned()) + }) + .unwrap(); + assert_eq!(chunk.root().tag.get("unknown"), Some(&Tag::Long(42))); + assert_eq!( + chunk + .saved_ticks(TickKind::Block, |_| Some(TickTypeId(7))) + .unwrap() + .count(), + 1 + ); +} diff --git a/crates/horizon-world/tests/weighted_provider.rs b/crates/horizon-world/tests/weighted_provider.rs new file mode 100644 index 000000000..574e1bb4c --- /dev/null +++ b/crates/horizon-world/tests/weighted_provider.rs @@ -0,0 +1,53 @@ +use horizon_world::worldgen::{ + height_provider::HeightProvider, value_provider::IntProvider, weighted::WeightedList, +}; + +#[test] +fn weighted_lists_reject_invalid_totals_and_bound_entry_allocations() { + assert!(WeightedList::<()>::new(vec![]).is_err()); + assert!(WeightedList::new(vec![((), 0)]).is_err()); + assert!(WeightedList::new(vec![((), -1), ((), 2)]).is_err()); + assert!(WeightedList::new(vec![((), i32::MAX), ((), 1)]).is_err()); + assert!(WeightedList::new(vec![((), i32::MAX)]).is_ok()); + assert!(WeightedList::new(vec![((), 1); 8192]).is_ok()); + assert!(WeightedList::new(vec![((), 1); 8193]).is_err()); +} + +#[test] +fn branching_provider_decoders_share_a_total_node_budget() { + for height in [false, true] { + let leaf = if height { r#"{"absolute":0}"# } else { "0" }; + let entry = format!(r#"{{"data":{leaf},"weight":1}}"#); + let branch = format!( + r#"{{"type":"weighted_list","distribution":[{}]}}"#, + vec![entry; 256].join(",") + ); + let entry = format!(r#"{{"data":{branch},"weight":1}}"#); + let tree = format!( + r#"{{"type":"weighted_list","distribution":[{}]}}"#, + vec![entry; 256].join(",") + ); + // Each list is below its own limit, but the whole tree exceeds 65536 nodes. + if height { + assert!(HeightProvider::from_json(&tree).is_err()); + } else { + assert!(IntProvider::from_json(&tree).is_err()); + } + } +} + +#[test] +fn optional_weighted_choices_retain_zero_entries_and_skip_empty_draws() { + use horizon_core::random::{LegacyRandom, RandomSource}; + use horizon_world::worldgen::weighted::OptionalWeightedList; + let mut random = LegacyRandom::new(12); + let mut expected = random.clone(); + let empty = OptionalWeightedList::<()>::new(vec![]).unwrap(); + assert_eq!(empty.sample(&mut random).unwrap(), None); + let zero = OptionalWeightedList::new(vec![(1, 0), (2, 0)]).unwrap(); + assert_eq!(zero.entries(), &[(1, 0), (2, 0)]); + assert_eq!(zero.sample(&mut random).unwrap(), None); + assert_eq!(random.next_long(), expected.next_long()); + assert!(WeightedList::new(vec![(1, 0), (2, 0)]).is_err()); + assert!(OptionalWeightedList::new(vec![(1, i32::MAX), (2, 1)]).is_err()); +} diff --git a/crates/horizon-world/tests/world_io.rs b/crates/horizon-world/tests/world_io.rs new file mode 100644 index 000000000..bbbfab360 --- /dev/null +++ b/crates/horizon-world/tests/world_io.rs @@ -0,0 +1,199 @@ +use horizon_core::position::{BlockPos, ChunkPos}; +use horizon_world::{ + DATA_VERSION, + chunk::{BlockState, ChunkData, PalettedContainer}, + compression::Compression, + nbt::{JavaString, Limits, NamedTag, Tag}, + region::{ChunkRecord, RegionFile, RegionWriter}, +}; +use std::{ + fs, + io::{Seek, SeekFrom, Write}, + path::{Path, PathBuf}, + sync::atomic::{AtomicU64, Ordering}, +}; + +static NEXT: AtomicU64 = AtomicU64::new(0); +struct Directory(PathBuf); +impl Directory { + fn new() -> Self { + let stamp = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap() + .as_nanos(); + let path = std::env::temp_dir().join(format!( + "horizon-world-test-{}-{stamp}-{}", + std::process::id(), + NEXT.fetch_add(1, Ordering::Relaxed) + )); + fs::create_dir(&path).unwrap(); + Self(path) + } + fn region(&self) -> PathBuf { + self.0.join("r.-1.0.mca") + } +} +impl Drop for Directory { + fn drop(&mut self) { + let _ = fs::remove_dir_all(&self.0); + } +} + +fn record(len: usize) -> ChunkRecord { + ChunkRecord { + compression: Compression::None, + compressed: vec![37; len], + timestamp: 0x8000_0001, + } +} + +#[test] +fn external_threshold_negative_coordinates_and_timestamps_roundtrip() { + let dir = Directory::new(); + let a = ChunkPos::new(-32, 0); + let b = ChunkPos::new(-1, 31); + let inline = record(255 * 4096 - 5); + let external = record(255 * 4096 - 4); + let mut writer = RegionWriter::create(dir.region()).unwrap(); + writer.write(a, &inline).unwrap(); + writer.write(b, &external).unwrap(); + writer.finish().unwrap(); + assert!(!dir.0.join("c.-32.0.mcc").exists()); + assert!(dir.0.join("c.-1.31.mcc").exists()); + let mut reader = RegionFile::open(dir.region()).unwrap(); + assert_eq!( + reader.chunks().collect::<Vec<_>>(), + [(a, inline.timestamp), (b, external.timestamp)] + ); + for (pos, expected) in [(a, inline), (b, external)] { + let actual = reader.read(pos).unwrap().unwrap(); + assert_eq!(actual.compressed, expected.compressed); + assert_eq!(actual.timestamp, expected.timestamp); + } + assert!(reader.read(ChunkPos::new(-31, 0)).unwrap().is_none()); + assert!(reader.read(ChunkPos::new(0, 0)).is_err()); +} + +#[test] +fn failed_writer_cannot_commit_and_removes_its_own_external_files() { + let dir = Directory::new(); + let mut writer = RegionWriter::create(dir.region()).unwrap(); + writer + .write(ChunkPos::new(-1, 0), &record(1_100_000)) + .unwrap(); + assert!(dir.0.join("c.-1.0.mcc").exists()); + assert!(writer.write(ChunkPos::new(0, 0), &record(4)).is_err()); + assert!(writer.finish().is_err()); + assert!(!dir.region().exists()); + assert_eq!(fs::read_dir(&dir.0).unwrap().count(), 0); +} + +#[test] +fn existing_external_and_concurrent_destination_are_preserved() { + let dir = Directory::new(); + let external = dir.0.join("c.-1.0.mcc"); + fs::write(&external, b"owned by someone else").unwrap(); + let mut writer = RegionWriter::create(dir.region()).unwrap(); + assert!( + writer + .write(ChunkPos::new(-1, 0), &record(1_100_000)) + .is_err() + ); + drop(writer); + assert_eq!(fs::read(&external).unwrap(), b"owned by someone else"); + let mut writer = RegionWriter::create(dir.region()).unwrap(); + writer.write(ChunkPos::new(-32, 0), &record(3)).unwrap(); + fs::write(dir.region(), b"another writer won").unwrap(); + assert!(writer.finish().is_err()); + assert_eq!(fs::read(dir.region()).unwrap(), b"another writer won"); + assert!(RegionWriter::create(dir.region()).is_err()); +} + +fn malformed_region(path: &Path, first: u32, second: u32, payload_len: u32, codec: u8) { + let mut file = fs::File::create(path).unwrap(); + file.set_len(12288).unwrap(); + file.write_all(&first.to_be_bytes()).unwrap(); + file.write_all(&second.to_be_bytes()).unwrap(); + file.seek(SeekFrom::Start(8192)).unwrap(); + file.write_all(&payload_len.to_be_bytes()).unwrap(); + file.write_all(&[codec]).unwrap(); +} + +#[test] +fn corrupt_allocations_lengths_codecs_and_missing_external_files_fail() { + let dir = Directory::new(); + for (first, second) in [(257, 0), (512, 0), (1025, 0), (513, 513)] { + malformed_region(&dir.region(), first, second, 1, 3); + assert!(RegionFile::open(dir.region()).is_err()); + } + for (len, codec) in [ + (0, 3), + (4093, 3), + (u32::MAX, 3), + (1, 127), + (2, 131), + (1, 131), + ] { + malformed_region(&dir.region(), 513, 0, len, codec); + let mut reader = RegionFile::open(dir.region()).unwrap(); + assert!(reader.read(ChunkPos::new(-32, 0)).is_err()); + } +} + +#[test] +fn chunk_storage_edit_preserves_unknown_fields_and_other_blocks() { + let palette = + PalettedContainer::uniform(Tag::String(JavaString::from("minecraft:air")), 4096, 4) + .unwrap(); + let root = NamedTag { + name: "".into(), + tag: Tag::compound([ + ("DataVersion", Tag::Int(DATA_VERSION)), + ("xPos", Tag::Int(-1)), + ("zPos", Tag::Int(-1)), + ("extra", Tag::ByteArray(vec![1, 2, 3])), + ( + "sections", + Tag::List(vec![Tag::compound([ + ("Y", Tag::Byte(-4)), + ("block_states", palette.to_nbt()), + ("unknown", Tag::Long(99)), + ])]), + ), + ]), + }; + let mut chunk = ChunkData::new(root).unwrap(); + let p = BlockPos::new(-1, -64, -1); + let state = BlockState { + name: "minecraft:oak_log".to_owned(), + properties: [("axis".to_owned(), "x".to_owned())].into(), + }; + assert_eq!( + chunk.set_block_data(p, state.clone()).unwrap().name, + "minecraft:air" + ); + assert_eq!(chunk.block(p).unwrap(), Some(state)); + assert_eq!( + chunk.block(p.offset(-1, 0, 0)).unwrap().unwrap().name, + "minecraft:air" + ); + assert!( + chunk + .set_block_data( + p.offset(1, 0, 0), + BlockState { + name: "minecraft:stone".into(), + properties: Default::default() + } + ) + .is_err() + ); + let root = chunk.into_nbt(); + assert_eq!(root.tag.get("extra"), Some(&Tag::ByteArray(vec![1, 2, 3]))); + let Some(Tag::List(sections)) = root.tag.get("sections") else { + panic!() + }; + assert_eq!(sections[0].get("unknown"), Some(&Tag::Long(99))); + let record = ChunkRecord::from_nbt(&root, Compression::Lz4, 17, Limits::default()).unwrap(); + assert_eq!(record.nbt(Limits::default()).unwrap(), root); +} diff --git a/crates/horizon-world/tests/world_ray_limits.rs b/crates/horizon-world/tests/world_ray_limits.rs new file mode 100644 index 000000000..cc999867b --- /dev/null +++ b/crates/horizon-world/tests/world_ray_limits.rs @@ -0,0 +1,101 @@ +use horizon_core::{ + geometry::{TraversalError, Vec3, VoxelShape}, + position::BlockPos, +}; +use horizon_world::world_ray::{RayBlockMode, RayError, RayFluidMode, RayWorld, clip_world}; +#[derive(Default)] +struct World { + reads: usize, + fail_fluid: bool, +} +impl RayWorld for World { + type Error = &'static str; + type Block = (); + type Fluid = (); + fn block_state(&mut self, _: BlockPos) -> Result<(), Self::Error> { + self.reads += 1; + Ok(()) + } + fn fluid_state(&mut self, _: BlockPos) -> Result<(), Self::Error> { + self.reads += 1; + if self.fail_fluid { + Err("fluid unavailable") + } else { + Ok(()) + } + } + fn block_shape( + &mut self, + _: (), + _: BlockPos, + _: RayBlockMode, + ) -> Result<VoxelShape, Self::Error> { + Ok(VoxelShape::empty()) + } + fn interaction_shape(&mut self, _: (), _: BlockPos) -> Result<VoxelShape, Self::Error> { + panic!("empty block cannot have interaction hit") + } + fn fluid_is_source(&mut self, _: ()) -> Result<bool, Self::Error> { + panic!("fluid mode is NONE") + } + fn fluid_is_empty(&mut self, _: ()) -> Result<bool, Self::Error> { + panic!("fluid mode is NONE") + } + fn fluid_is_water(&mut self, _: ()) -> Result<bool, Self::Error> { + panic!("fluid mode is NONE") + } + fn fluid_shape(&mut self, _: (), _: BlockPos) -> Result<VoxelShape, Self::Error> { + panic!("fluid mode is NONE") + } +} +#[test] +fn visit_limit_retains_queries_and_does_not_report_miss() { + let mut world = World::default(); + let result = clip_world( + &mut world, + Vec3::new(0.5, 0.5, 0.5), + Vec3::new(3.5, 0.5, 0.5), + RayBlockMode::Collider, + RayFluidMode::None, + 1, + ); + assert!(matches!( + result, + Err(RayError::Traversal(TraversalError::VisitLimit)) + )); + assert_eq!(world.reads, 2); +} +#[test] +fn nonfinite_ray_fails_before_world_reads() { + let mut world = World::default(); + let result = clip_world( + &mut world, + Vec3::ZERO, + Vec3::new(f64::INFINITY, 0., 0.), + RayBlockMode::Collider, + RayFluidMode::None, + 10, + ); + assert!(matches!( + result, + Err(RayError::Traversal(TraversalError::NonFinite)) + )); + assert_eq!(world.reads, 0); +} +#[test] +fn provider_failure_is_distinct_from_traversal_failure() { + let mut world = World { + fail_fluid: true, + ..Default::default() + }; + let result = clip_world( + &mut world, + Vec3::ZERO, + Vec3::new(1., 0., 0.), + RayBlockMode::Collider, + RayFluidMode::None, + 10, + ); + assert!(matches!(result, Err(RayError::World("fluid unavailable")))); + assert_eq!(world.reads, 2); +} diff --git a/docs/biome-lookup.md b/docs/biome-lookup.md new file mode 100644 index 000000000..abb527f65 --- /dev/null +++ b/docs/biome-lookup.md @@ -0,0 +1,161 @@ +# Biome lookup + +Horizon implements Java Edition **26.3** block-to-quart biome lookup. `BiomeZoom` +accepts the obfuscated biome seed and chooses among eight jittered quart corners +in vanilla order, retaining strict distance ties and signed coordinate wrapping. +The caller resolves the selected quart coordinate through its biome provider. +Direct noise-biome queries bypass this selection and shift block coordinates; +floating-point positions are floored with Java's saturating integer conversion. + +`obfuscate_seed` computes the vanilla SHA-256 transform of the little-endian world +seed and reads the first eight digest bytes as a little-endian signed long. The +core keeps a fixed-input implementation without adding runtime dependencies. + +Run `python3 tools/test_biome_zoom_parity.py`. The +[local report](../benchmarks/rust-biome-zoom-2026-10-06/scoped-parity.json) records +**256,933 matching lines per reference JAR**: **4,104 seed hashes**, **169,408 block +queries** and **83,421 floating-position queries**. Actual vanilla `BiomeManager` +methods call a traced resolver; the suite compares selected quart coordinates, +direct queries and source replacement retaining the same zoom seed. Seed hashes +also match Python `hashlib` independently. + +The corpus includes dense neighborhoods, negative quart boundaries, both signed +integer extremes, distant coordinates, randomized seeds/positions, and double +NaNs, infinities and subnormals. Source and fixture hashes are captured, changes +during validation invalidate the result, and reference artifacts stay private. +CI includes the comparison; remote outcomes have not been observed. + +This validates coordinate selection, not biome storage, biome-source generation, +chunk blending, or complete generated worlds. + + +## Chunk biome storage + +`BiomeChunk<T>` stores each section's 64 quart-resolution biome values. Reads clamp +quart Y to the chunk and wrap quart X/Z into its local grid. Fills visit sections +bottom to top and query each section in X/Y/Z order. Each completed section is +committed; a resolver failure retains the failing section's previous values. +Inclusive generation bounds select all intersecting sections. + +Run `python3 tools/test_biome_chunk_parity.py`. The +[local chunk report](../benchmarks/rust-biome-chunk-2026-10-06/scoped-parity.json) +records **478,340 matching lines per reference JAR** across **20 fixtures** and +**160 fills**, including **21,120 quart-biome queries**. Native `ProtoChunk` and +`LevelChunkSection` methods supply the reference behavior. Tests use synthetic +holder identities, up to 512 distinct values, repeated fills, provider failures +at calls 0/63/64/65, generation bounds cutting through sections, and the complete +supported aligned vertical range. The reference chunk is at BIOMES status. + +This storage uses dense arrays and compares biome values rather than vanilla's +internal palette layout. Packet/save integration and chunk lifecycle transitions +remain separate work. Clipped generation bounds must remain within the chunk; +invalid bounds return an error before mutation. + + +## Chunk biome generation + +The [generation report](../benchmarks/rust-biome-generation-2026-10-06/scoped-parity.json) +records **383,072 matching lines per JAR** across **252 fixtures**, **322 fills**, +**341,504 stored biome values** and **35,910 subsequent block-position lookups**. +Run `python3 tools/test_biome_generation_parity.py` to compare against actual +`ChunkGenerator.doCreateBiomes`, invoked through `NoiseBasedChunkGenerator`. + +Rust compiles the climate fields of all seven bundled terrain routers, samples +the chunk's quart volume, searches its multi-noise parameter table and fills +biome sections. The suite pairs each router with both Overworld and Nether +presets, both random modes and three seed/coordinate combinations. Repeated +fills create fresh density contexts while retaining nearest-search state. +Generation bounds also exercise omitted top and bottom sections. Subsequent +block lookups use seeded fuzzy selection and clamped chunk reads. + +Both JARs independently export the preset tables and must agree: **7,594 Overworld +entries** and **5 Nether entries**. Rust imports those quantized tables; preset +builders remain unported. Registry-bound source codecs are described below. Reference holders +supply identities without evaluating biome properties. That baseline uses empty +blending and no below-zero retrogen. An additional 168 fixtures generate chunks through fixed, checkerboard and End +sources using every bundled terrain router. They cover real seeded End erosion, +the central-island boundary and wrapped checkerboard shifts. The [surface-stage integration](material-surfaces.md#chunk-surface-stage) now +links a 3×3 biome neighborhood to terrain filling and surface application, using +stored neighbor biome lookups. Saved biome palettes and complete world generation +remain pending. + + +### Below-zero biome retention + +`RetrogenBiomeResolver` captures whether an upgrade is active when the resolver +is created. Later metadata changes do not add or remove its retention policy. +It always samples the candidate first. Keyed `lush_caves`, `dripstone_caves` and +`deep_dark` in the `minecraft` namespace are retained; other candidates read the +old biome at the same quart X/Z and quart Y = 0. Unkeyed holders do not qualify. + +`BiomeChunk::fill_with_retrogen` reads committed old sections while staging the +current section separately. A failure preserves that section's old values; +later sections can observe earlier completed writes. This matters when supplied +generation bounds overlap the section selected by the clamped old-column read. + +The [retention/fill report](../benchmarks/rust-retrogen-biome-fill-2026-10-06/scoped-parity.json) +records **593,152 matching lines per reference JAR**, with 40 fixtures, 740 fills +(560 decorated), and 2,800 direct resolver queries. It includes all activation +timings, keyed and direct holders, foreign namespace lookalikes, callback failures, +boundary sections and extreme coordinates. + +The expanded [generation report](../benchmarks/rust-retrogen-biome-generation-2026-10-06/scoped-parity.json) +records **834,080 matching lines per JAR** across **396 fixtures and 610 fills**. +Its 144 added upgrade fixtures use actual native below-zero metadata and generation +heights, patterned old biome columns, all source kinds, each retained cave biome, +four settings with below-zero storage, both random modes and repeated fills. +Every stored section and subsequent block-biome lookup is compared, including +unchanged data above Y = 0. Nonempty blending, preset builders, full terrain-stage +scheduling and complete saved-world integration remain pending. + +## Fixed, checkerboard and End sources + +`FixedBiomeSource` always returns its configured value. `CheckerboardBiomeSource` +preserves masked Java shifts, wrapped addition and floor-modulo selection, +including duplicate values and unrestricted constructor scales. It supports up to +8,192 values; an empty list returns a typed lookup error. Its vanilla JSON codec +has the narrower scale range 0–62, with a default of 2. + +`EndBiomeSource` returns the central biome without querying erosion inside the +64-chunk radius. Outside that circle it samples erosion at the containing chunk's +center and wrapped block Y, then applies vanilla's highlands/midlands/islands/ +barrens thresholds. Sampler errors propagate without substituting a biome. + +Run `python3 tools/test_biome_source_parity.py`. The +[local source report](../benchmarks/rust-biome-source-2026-10-06/scoped-parity.json) +records **1,306,096 matching lines per JAR**, covering **457 fixtures** and +**1,147,984 queries**. Actual native source methods supply the results. The corpus +includes all 63 codec-valid checkerboard scales, unrestricted runtime scales, +empty/duplicate/512-value lists, extreme coordinates, exact End threshold +neighbors, NaN/infinity samples and failing erosion providers. Ordered erosion +sampling coordinates are compared. This source-level suite supplies constant +End density values; seeded density and chunk generation are validated separately. + + +## Registry-bound source codecs + +`BiomeSourceCatalog` decodes and canonically encodes fixed, checkerboard, End and +multi-noise definitions against known biome, tag and preset registries. Named +biomes, direct or tagged biome sets, inline climate lists, and named or inline +preset holders retain vanilla selection and fallback behavior. The catalog +validates references before returning a definition. + +`BiomeSourceDefinition::resolve` builds a `ResolvedBiomeSource` using imported +quantized preset tables. A worker resolver retains multi-noise search state, +prepares climate volumes only for multi-noise sources, and exposes one query API +for all four source kinds. Chunk generation and the surface-stage neighborhood +now use this API; surface integration decodes the source configuration itself. + +Run `python3 tools/test_biome_source_codec_parity.py`. The +[local codec report](../benchmarks/rust-biome-source-codec-2026-10-06/scoped-parity.json) +records **363,121 matching lines per JAR** across **40,481 inputs**, using all +**67 biome definitions** and **86 biome tags**. The native `BiomeSource.CODEC` +supplies parsing, canonical encoding, possible-biome sets and queries at seven +positions. The corpus covers every quantized climate step from −2 to 2, scale +bounds and numeric narrowing, malformed fields, duplicate keys, holder sets, +and inline-list preference and fallback to presets. Encoding comparisons use +serialized JSON numeric values, rather than Java's widened float values. + +Full inline biome definitions, native preset builders, live registry ownership +and reloads, biome-search helpers, blending, and complete generated worlds remain +pending. The bounded catalog is not a complete registry lifecycle implementation. diff --git a/docs/biome-temperatures.md b/docs/biome-temperatures.md new file mode 100644 index 000000000..b27e91edc --- /dev/null +++ b/docs/biome-temperatures.md @@ -0,0 +1,33 @@ +# Biome temperatures + +Horizon implements Java Edition **26.3** biome temperature sampling, including the +frozen modifier, height adjustment, rain/snow thresholds, precipitation selection +and the small frozen-ocean iceberg melt predicate. The fixed seeded simplex and +noise-stack sources use the existing Rust noise implementation. + +`BiomeTemperatureSettings` supplies the immutable inputs. `BiomeTemperature` is a +per-biome, per-worker cache, corresponding to vanilla's thread-local cache. Its +1,024-entry insertion order does not change on hits. Keys use packed block +positions and omit sea level, preserving both coordinate aliases and cached +results across sea-level changes. NaN values are recomputed, including vanilla's +eviction behavior when a cached NaN is queried at capacity. + +Run `python3 tools/test_biome_temperature_parity.py`. The +[local report](../benchmarks/rust-biome-temperature-2026-10-06/scoped-parity.json) +records **836,659 matching output lines per reference JAR** over **387 fixtures**, +including **12 thread-isolation fixtures**. The original Java transport invokes +actual biome methods and inspects native ordered cache contents. Test inputs +include arbitrary base-temperature bits, threshold neighbors, both modifiers, +precipitation enabled/disabled, extreme coordinates, sea-level overflow, packed +aliases, cache hits/eviction and actual native threads with separate Rust workers. + +The oracle constructs native climate settings and biomes with only the fields +these methods use. Climate-setting parsing now covers all **67 bundled biome definitions** and +**183 codec inputs**, including float rounding, overflow, field validation and +modifier defaults. Full biome codecs, climate encoding, world-dependent snow/ice placement, +automatic thread-local ownership for a shared +Rust biome object remain pending. Source/fixture hashes guard the comparison; +raw reference artifacts stay private under `.local`. + +[Material temperature and biome conditions](material-conditions.md) now use these +climate settings and cached temperature calculations in a separate integration suite. diff --git a/docs/block-state-codecs.md b/docs/block-state-codecs.md new file mode 100644 index 000000000..f56e48403 --- /dev/null +++ b/docs/block-state-codecs.md @@ -0,0 +1,25 @@ +# Block-state JSON codecs + +`BlockStateJsonCodec` implements compact and full Java Edition **26.3** block-state +JSON forms over the imported `BlockRegistry`, with integer property kinds supplied +alongside the registry. Compact encoding uses a block name for the default state; +full encoding uses an `id` object and properties for blocks with multiple states. + +Missing or invalid properties retain their defaults. Unknown property names are +ignored. Integer properties accept Java decimal strings, including signs, leading +zeroes and JDK 25 BMP decimal digits; enum and boolean properties use exact names. +This codec is separate from `BlockRegistry::resolve`, whose descriptor validation +continues to reject invalid properties. + +Run `python3 tools/test_block_state_codec_parity.py`. The +[local report](../benchmarks/rust-block-state-codec-2026-10-06/scoped-parity.json) +records **221,261 matching output lines per reference JAR**, covering all +**35,723 states**, **1,286 blocks**, **146 integer properties** and **185,538 decoding +inputs**. Tests exercise default/full encoding, namespaces, invalid types, +property fallback, integer overflow and duplicate fields. + +The two authenticated JARs must export identical state metadata. Exports and raw +comparison traces remain private under `.local`. The public report contains +metadata and hashes. This validates codec behavior over imported identities; +block gameplay, registry lifecycle, warning messages and arbitrary malformed +JSON/unpaired-surrogate text remain outside the tested scope. diff --git a/docs/carving.md b/docs/carving.md new file mode 100644 index 000000000..9dfcde8e6 --- /dev/null +++ b/docs/carving.md @@ -0,0 +1,126 @@ +# Carving + +Horizon implements Java Edition **26.3** carving-mask storage and traversal. +`CarvingMask` packs cells in Y/Z/X order into 64-bit words. Its column iterator +finds contiguous marked runs and splits them into inclusive vertical intervals, +using word scans without allocating a list of individual cells or columns. + +`try_visit_mut` retains vanilla callback behavior: adding cells during traversal +changes subsequent run searches, while an already selected run keeps its original +boundaries. Callback failures stop immediately and retain prior mutations. +Coordinate arithmetic wraps like Java, including positive out-of-range aliases; +negative indices return an error. Rust bounds height to 1–4,064 and positive growth +to 2^24 bits. Invalid construction and allocation limits are explicit errors. + +Run `python3 tools/test_carving_mask_parity.py`. The +[local report](../benchmarks/rust-carving-mask-2026-10-06/scoped-parity.json) +records **45,742 matching output lines per reference JAR**, across **28 fixtures** +and **6,988 operations**. The native `CarvingMask` supplies all reference results. +The corpus includes sparse and fully filled masks, duplicate insertions, word and +column boundaries, extreme signed coordinates, positive aliases, negative-index +failures, and successful or failing callbacks that add cells during traversal. +All corpus indices remain below 2^20. Reference artifacts remain private and +source/fixture hashes guard validation. + +This comparison covers masks. The combined generation check below also covers +neighbor biome selection and carver seeding; complete generated worlds remain pending. + +## Applying masks to terrain + +`apply_carving_mask` traverses each marked interval from top to bottom, applying +an optional caller-supplied predicate before block or aquifer queries. The +resolved `minecraft:uncarvable` tag prevents replacement. Grass and mycelium mark +a surface encountered within the current interval, including when the aquifer +returns no replacement. Subsequent exposed dirt beneath carved cells is restored +through `top_material`. Block changes update WG heightmaps; fluid postprocessing +retains vanilla order and duplicates. Later errors preserve prior effects. + +The [combined surface-stage report](../benchmarks/rust-material-stage-2026-10-06/scoped-parity.json) +records **6,733,382 matching lines per JAR**, including **158 carving passes** and +**21,757,952 block values** across noise filling, surface building and carving. +Actual `NoiseBasedChunkGenerator.applyCarvingMask` supplies the reference results; +its existing aquifer is wrapped to trace ordered requests, results and fluid +scheduling decisions. The test applies explicit masks, filtered and unfiltered, +with grass/mycelium/dirt and uncarvable blocks, repeated writes and disjoint runs. +The filter is synthetic; native blending-filter generation remains pending. + +Run `python3 tools/test_material_stage_parity.py`. Unit tests additionally verify +that filters and uncarvable tags skip aquifer calls, a surface observation survives +an absent aquifer result, and later aquifer failure preserves earlier surface +restoration and its fluid postprocessing even when aquifer scheduling is disabled. + + + +## Shared shape primitives + +`carve_ellipsoid` visits candidate cells in X/Z/descending-Y order, retaining +vanilla's exclusive lower Y bound, Y−0.5 normalization, chunk clipping and ordered +skip callbacks. Output failures preserve earlier marked cells. `can_reach` uses +wrapped step differences and float-rounded thickness before double-distance math. +Traversal has a 2^24-candidate work bound. + +Run `python3 tools/test_carving_geometry_parity.py`. The +[geometry report](../benchmarks/rust-carving-geometry-2026-10-06/scoped-parity.json) +records **106,699 matching lines per JAR**, across **690 ellipsoids** and **5,536 +reachability queries**. Actual `WorldCarver.carveEllipsoid` and `canReach` supply +the reference results. Tests compare normalized skip inputs, marked-cell order, +partial failures and final mask intervals, with distant/overflowing coordinates, +clipped bounds, degenerate radii, NaNs, infinities and subnormals. NaN trace values +are canonicalized. The seeded cave/canyon paths below use these primitives. Gaussian provider codecs remain separate work. + + +## Seeded cave and canyon paths + +`CaveCarver` decodes cave definitions and reproduces start selection, rooms, +thickness bias, randomized tunnel movement and branching. `CanyonCarver` decodes +canyon definitions and reproduces height-dependent width factors, varying radii +and randomized path movement. Both preserve float/double operation order and +vanilla's quantized trigonometry. Their local path RNG is always the legacy +algorithm, independently of the caller's outer random mode. + +Run `python3 tools/test_cave_carver_parity.py` and +`python3 tools/test_canyon_carver_parity.py`. The +[cave report](../benchmarks/rust-cave-carver-2026-10-06/scoped-parity.json) records +**882,005 matching lines per JAR** across **415 fixtures** and **739 requested +carve invocations**. All three bundled cave definitions are independently +imported from both JARs. The +[canyon report](../benchmarks/rust-canyon-carver-2026-10-06/scoped-parity.json) +records **1,094,517 matching lines per JAR** for the bundled canyon and custom +shapes across four generation heights. + +The native `WorldCarver.DIRECT_CODEC` and actual cave/canyon methods supply +reference results. Comparisons include ordered cell writes with duplicates, +mask intervals, partial output failures and subsequent random longs. Both random +modes, repeated invocation, distant/overflowing coordinates and neighboring/far +origins are covered. Custom shapes force branching, floor and width variation, +degenerate radii and failure boundaries; malformed selected fields are tested. + +Rust bounds a cave call to 4,096 starts, a canyon to 4,096 steps and 4,064 width +entries, and either call to 2^24 candidate cells through a shared traversal budget. +Budget exhaustion retains prior mask writes. Gaussian provider codecs, +encoding, blending and complete worlds remain pending; these suites invoke +individual carvers directly. The combined stage check covers neighbor selection and seeding. + + +## Biome-selected neighboring carvers + +`CarverCatalog` resolves named and inline carvers while preserving ordered holder +lists and repeated references. `generate_carving_mask` visits the 17×17 origin +neighborhood in X/Z order. Each carver receives a legacy random stream initialized +from the world seed plus its list ordinal and the origin chunk coordinates, then +runs its native start-selection and shape path. The mask clips below the ceiling +with vanilla's seven-block allowance, or without that allowance for upgrading +chunks. Source errors stop generation before mask application. + +The combined stage report includes **42 procedural carving passes** through actual +`NoiseBasedChunkGenerator.generateCarvers`, after noise filling and surface work +and before the explicit-mask stress passes. Biome selection uses uncached quart +queries and retains the source's prior search state from biome filling. Carved +surface restoration switches fuzzy lookup to that raw source. All four bundled +carvers and all seven terrain settings are available to biome selection; the +native biome settings retain actual carver lists with empty placed-feature lists. + +Unit tests cover origin order with coordinate overflow, upgrading bounds, +invalid bounds before source calls, early source failure and duplicate holder +identity. Tagged carver sets, region-neighbor caching, nonempty blending, +retrogen integration, placed features and complete generated worlds remain pending. diff --git a/docs/collision-geometry.md b/docs/collision-geometry.md new file mode 100644 index 000000000..2ea44c5b1 --- /dev/null +++ b/docs/collision-geometry.md @@ -0,0 +1,2109 @@ +# Horizon collision geometry + +The version target is Minecraft Java Edition **26.3**. Geometry is a simulation +foundation; Horizon has a native client for inspecting a controlled block scene. +Live gameplay and entity simulation remain unfinished. + +`horizon-core::geometry` provides `Vec3`, `Aabb`, `Axis`, `Direction`, `BlockHit`, +and immutable `VoxelShape` values. Coordinates are doubles. Arithmetic keeps +vanilla's operation order, signed zero, NaN comparisons, normalization threshold, +and collision epsilon. It does not enable approximate or fused simulation math. + +Implemented vector operations include addition/subtraction, vector-to, component +products, scaling, normalization, dot/cross products, interpolation, projection, +distance/length, horizontal vectors and finite/equality checks. Rotations, look +directions, alignment, axis replacement, direction offsets, and pitch/yaw extraction +are also implemented. The full Vec3 API and entity integration remain absent. + +Trig uses vanilla's 65,536-entry float sine table with double angle scaling and +Java long narrowing. The table is generated from the pinned formula in Rust; +the geometry suite compares every generated entry against the runtime table. +Inverse trig narrows to float at vanilla's conversion points. These comparisons +validate the tested platform; other platforms need the same bit comparisons. + +Bounding boxes normalize endpoints with Java-compatible min/max. Queries include +half-open containment, strict intersection, transforms, distances, ray clipping, +block-coordinate construction with wrapping integer endpoints, setters, next-value +deflation, and swept-box collision tests. A disjoint `intersect` preserves vanilla's +constructor normalization rather than introducing a different empty-box rule. + +Shapes keep exact coordinate arrays and a packed occupancy grid. Greedy boxes are +cached once in vanilla order. Collision-distance queries use occupied grid cells; +ray and closest-point queries reuse the cached boxes. Column minima/maxima use +vanilla's cyclic perpendicular coordinates and infinity for empty/outside cells. +Cube shapes retain arithmetic +lookup; moved shapes use array lookup even for a zero offset. Ray hits preserve +face tie ordering, endpoint exclusion, tolerances, and the 0.001 inside-hit nudge. +Boolean shape joins and overlap predicates preserve cube, identical, +disjoint and epsilon-merger behavior. Shape operations reject truth tables that +fill two empty cells, as vanilla does. Per-axis cube-coordinate metadata survives +partial merges and is checked when importing cached shapes. Box construction +preserves thin-box rejection and up to 1/8 cube quantization. Optimized joins +reconstruct greedy boxes in vanilla order. Face extraction is implemented; edge extraction and shape rotations remain absent. + +Discrete axis extrema are retained separately from occupied cells. A box can +quantize to no occupied cells while retaining a finite minimum/maximum on other +axes. That state affects vanilla's lower-block floor-height lookup. Empty joins +also preserve their integer sentinel extrema; optimization and moving an empty +shape return the canonical empty shape. + +Shape clones preserve identity and share immutable coordinate, occupancy and box +storage. New shapes keep separate identities even when their grids are equal. +This preserves alias-sensitive join shortcuts and avoids copying large grids +when an operation returns an existing shape. The cache importer shares equal +grid storage while retaining the distinct vanilla shape identities. + +`resolve_shape_movement` ports vanilla's movement resolver over a supplied shape +list: Y first, then horizontal axes in movement-magnitude order, translating the +box by resolved motion before each axis query. `candidate_step_heights` preserves +float narrowing, duplicate identity, current-Y exclusion, and sorted candidate +heights. `resolve_step_movement` adds the initial collision and step-up decision, +including landing-height adjustment, a second collider query, and the first +candidate improving horizontal movement. `entity_collision_bounds` preserves +the initial entity query bounds. These helpers take caller-selected colliders; +they do not choose world/entity shapes, set grounding, change velocity, or apply +inside-block effects. + +The step-up corpus calls the actual private `Entity.collide` method for **17,680 +cases** per JAR. Reference fixtures supply entity inputs and controlled +block/entity/border shape lists; vanilla performs the movement decisions. Query +bounds and results are compared bit for bit. This verifies the decision with +those inputs, not live world selection or entity state transitions. + +`block_floor_height` returns the selected shape's maximum Y, or lazily queries +the lower shape only when the current one is empty. Its 12,000-case corpus also +checks the lower supplier's invocation count against `BlockGetter`. + +`traverse_blocks` visits blocks in vanilla ray order, including its endpoint nudge, +strict corner comparisons, early callback return, integer wrap and signed-zero +endpoint equality. It accepts finite rays and an explicit visit budget. Invalid +geometry or exceeding that budget returns a typed error; earlier callbacks remain +applied. Actual block/fluid ray selection is a separate integration task. + +Inclusive block-box iterators preserve X/Y/Z order, while directional iterators +preserve vanilla's movement-dependent axis order and corner signs. AABB iteration +includes floored maximum faces. They return independent position values and +reject true volumes above the positive Java-int domain, instead of reproducing +overflowed Java iteration counts. + +`sweep_intersected_blocks` ports movement-path visits from +`BlockGetter.forEachBlockIntersectedBetween`: tiny movement, the initial box, +ray-clipped footprints, packed-position deduplication, final box, step indices, +and early callback stops. Stationary/tiny movement avoids a deduplication-set +allocation. Inputs and computed geometry must be finite; a caller-selected work +budget counts ray steps and iterator candidates, including suppressed duplicates. +Earlier callbacks are not rolled back on an error. Block effects still need +their own implementations and integration with entity movement. + +`horizon-world::collision::CachedCollisionRegistry` imports a private local export +of vanilla cache data. The export includes DataVersion, all state descriptors, +deduplicated shapes, coordinate-kind metadata, discrete extrema, and a per-state +cache index. Import verifies every state ID +against the block registry. Section lookup also requires the same borrowed registry. +Imported nonempty extrema must agree with occupancy; empty extrema must be in +the grid's domain or match vanilla's empty-join sentinel triple. Extrema form part +of the grid-sharing key, so equal occupancy does not erase different metadata. +There is no fallback shape for an unsupported state: `None` means block behavior +must select it, while a cached empty shape is a valid `Some` value. + +This covers the cached branch of the **no-context** `BlockState.getCollisionShape` +method. Vanilla's overload taking `CollisionContext` always calls block behavior; +the cache cannot establish entity collision parity. Dynamic and ordinary entity-context selection are implemented as described below. +Experimental minecart contexts, world borders, movement integration, fluid +simulation, block effects and live collision broad-phase queries remain pending. + +Run the comparisons after preparing the pinned artifacts: + +```sh +python3 tools/test_geometry_parity.py +python3 tools/test_collision_parity.py +``` + +Both suites invoke actual vanilla methods from the authenticated client and server +JARs. They compare canonical double bits, including infinities/NaNs, rather than +using a numerical tolerance. The geometry corpus includes empty and sparse grids, +greedy decomposition, overlapping boxes, rays, tiny movements and IEEE boundaries. +It compares **1,320,187 output lines per JAR**, including **2,400 integer-box +iterator cases**, **2,400 AABB iterator cases**, and **9,022 movement-path traces**. +The registry suite exercises cached shape queries through resident section IDs, +translation at negative and world-border coordinates, and invalid import rejection. +Its export records **35,524 cached states**, **199 uncached states**, **6,093 +shape identities**, and **330 distinct grids**. The comparison runs **213,144 queries** plus state/box/identity checks, +producing **1,097,456 matching output lines per JAR**. These counts describe this +branch and corpus; they are not a gameplay coverage percentage. + +Raw grids admit at most 1,048,576 cells with strictly increasing, non-NaN +coordinates. Oversized or malformed imports/joins return typed errors. This +bounded library API does not reproduce Java's complete exception/object surface. + +All exported data, test inputs, reference output, and compiled adapters remain +under gitignored `.local/`. Success reports record exact sources, inputs, outputs, +and reference hashes. A runner removes its prior success report before running +and rejects edits to the captured sources during validation. Passing these suites +does not prove whole-game parity or any FPS/render-distance improvement. + +Checked-in [geometry metadata](../benchmarks/rust-geometry-2026-10-05/scoped-parity.json) +and [cached-collision metadata](../benchmarks/rust-collision-2026-10-05/scoped-parity.json) +identify their tested source versions. Reports cover their recorded snapshots; +later changes require fresh validation. + +Entity obstruction now evaluates ordered candidate snapshots, excluded entity +identity, spectator/removal/building flags, shared root-vehicle identity and +voxel-shape intersection. Empty shapes skip the query; candidate collection +finishes before obstruction evaluation. Unit-block queries translate in floating +point, including integer-coordinate boundaries. Run +`python3 tools/test_entity_obstruction_parity.py` to compare against the actual +vanilla `EntityGetter` default methods and entity metadata queries. + +The [entity-obstruction report](../benchmarks/rust-entity-obstruction-2026-10-06/scoped-parity.json) +records **15,121 matching output lines per JAR** over composite shapes, boundary +contacts, thin boxes, metadata filters, vehicle roots and injected query failures. +The Java fixture privately allocates entity snapshots without running their +constructors. Entity lifecycle, spatial indexing and vehicle-tree maintenance +remain separate implementation work. Workspace tests, warning-free Clippy and +**138 Python tests** passed at this snapshot. + +Legacy block solidity now uses explicit definition overrides and cached collision +bounds, with force-on precedence and native mean-size/height thresholds. The +no-context replaceable and liquid flags are kept independently. Solid rendering +uses the occlusion definition flag and a full-shape test over imported raw +occlusion geometry. Import validates the pinned +DataVersion, full state identities and complete block definitions before building +a shared property table. Predicates query this table in constant time. + +`python3 tools/test_block_properties_parity.py` compares all **35,723 states** and +**18,096 synthetic cache/flag/shape cases**, including adjacent floating-point values +around solidity thresholds and both occlusion flag values. The [block-properties report](../benchmarks/rust-block-properties-2026-10-06/scoped-parity.json) +records **197,180 matching lines per JAR**. Definition flags, collision and raw +occlusion data are private runtime inputs; Rust calculates solidity and solid +rendering and caches full-face occlusion masks. Every state and synthetic shape +is compared on all six faces; source and fixture hashes are recorded. +Item/fluid-context replacement and collision with live entities remain separate work. + +Face selection now preserves native cube-axis shortcuts, epsilon sample points, +slice coordinates and clamped parent extrema, including sparse slices whose +native bounds differ from occupied boxes. Repeated queries share face identities. +The FULL, CENTER and RIGID support tests execute against the selected shape. +`python3 tools/test_face_support_parity.py` compares **1,615 input shapes** and +nested faces, producing **595,686 matching lines per JAR** in the +[face-support report](../benchmarks/rust-face-support-2026-10-06/scoped-parity.json). +The [refreshed geometry report](../benchmarks/rust-geometry-2026-10-06/scoped-parity.json) +also retains **1,320,187 matching lines per JAR** after face slicing was added. +Block-specific support-shape selection is a separate layer. + +Registered support caches now derive FULL/CENTER/RIGID masks from privately +imported support geometry and share results by shape identity. The importer +checks the data kind and full state identities. `None` explicitly requests +uncached behavior; it never becomes an assumed unsupported face. +`python3 tools/test_block_support_parity.py` compares **35,524 cached states** +across six directions and three support kinds, while retaining **199 uncached +states**. The [cached-support report](../benchmarks/rust-block-support-2026-10-06/scoped-parity.json) +records **248,867 matching lines per JAR**. + +Face-cache storage is now lazy and attached to shape identity. Clones share it; +new identities and moved shapes start with an empty cache. A regression test +checks that cached faces do not retain their parent after it is dropped. The +face and geometry differential suites passed again after this allocation change, +as did workspace tests, Clippy and **140 Python tests**. No FPS claim is inferred +from these library checks. + +Dynamic support selection now handles bamboo collision offsets, dripstone and +sulfur-spike thickness/direction, the empty-context scaffolding support shape, +powder snow, and shulker animation-state support faces. Moving-piston lookup +preserves missing/wrong block-entity behavior and delegates active entity shape +calculation to the world. The [dynamic-support report](../benchmarks/rust-dynamic-support-2026-10-06/scoped-parity.json) +records **4,867,780 matching lines per JAR** over **107,308 fixtures** covering all +**199 uncached states**, coordinate boundaries, block-entity snapshots and query +failures. Run `python3 tools/test_dynamic_support_parity.py` to reproduce it. +The current suite also compares no-entity-context collision geometry in **60,161 +fixtures**, including **13,014 shulker progress fixtures**. Shulker collision +bounds retain native float interpolation and differ from animation-state support +faces. `BlockCollisionRegistry` dispatches cached and dynamic collision queries; +entity movement contexts and block-entity lifecycle remain separate work. +Workspace tests, warning-free Clippy and seven focused Python tests passed. + +Moving-piston collision now selects stationary extended bases and moving heads, +translates shapes using native float progress arithmetic, and honors the +movement-direction collision exclusion. Interpolation preserves float operation +order, including negative partial ticks and IEEE edge cases. The separate +collision-related state used for entity pushing retains its own sticky/head +rules; entity pushing itself is not implemented by this module. + +`python3 tools/test_piston_shape_parity.py` compares **102,315 fixtures**, +including every registered moved state and **10,000 raw float interpolation +cases**. The [piston-shape report](../benchmarks/rust-piston-shape-2026-10-06/scoped-parity.json) +records **1,096,811 matching lines per JAR**. This corpus uses absent block +entities for moved-block collision selection. Workspace tests, warning-free +Clippy and **142 Python tests** passed. Tick progression and live world mutation +remain separate work. + +The refreshed dynamic-support corpus also includes **9,216 active piston +snapshots**, composing block-entity lookup with piston collision generation and +all support tests. It compares extension/retraction, source heads, progress +boundaries, collision exclusions and query failures. These snapshots do not +exercise piston ticks, pushed entities or chunk updates. + +The archived block-survival snapshot executes 51 rule kinds with 63 distinct rule/tag +bindings over registry-bound solid flags, air identity, support tags and +FULL/CENTER/RIGID geometry and empty-context collision. The verified snapshot covers +**all 1,286 pinned block definitions and 35,723 states**. Candidate +properties select attachment direction, hanging state, door/plant halves and +pale moss carpet's serialized `bottom` property. Pressure plates and cactus +flowers preserve repeated neighbor reads. Downward center support applies the +unstable-bottom-center tag only where native helpers do. Upper doors require the +same block below; upper double plants also require its lower half. Crop survival +checks brightness against 8 before querying support; farmland preserves its +conditional second read above, and dripleaf stems read both neighbors. Sugar cane, +lily pads, frogspawn, spore blossoms, small dripleaves and tall seagrass preserve +their independent fluid queries, source/full-water requirements and tag checks. +Growing plants preserve head/body identity and kelp support restrictions. +Scaffolding recomputes neighbor distance in native order; chorus plants and flowers +preserve branching reads and early exits. Piston heads validate base type, facing +and extension. Mangrove propagules, speleothems, pitcher crops, bells and shelf +mushrooms use their version-specific attachment rules. Multiface blocks, vines, +hanging moss, snow layers and sea pickles preserve support/collision query order. +Fire uses imported ignition odds and waterlogging; cactus checks horizontal solids +and lava before its support and upper liquid state. Paths recognize fence gates, +and mushrooms preserve the light-override tag and solid-render requirement. + +Interrupted runs can be resumed with `python3 tools/test_block_survival_parity.py --resume`. +The runner verifies source, environment, fixture and compiled-artifact hashes +before reusing completed stages. A changed output is regenerated; changed inputs +require a fresh run without `--resume`. Checkpoints stay under `.local`, and +a parity report is written only after both native comparisons pass. + +`python3 tools/test_block_survival_parity.py` compares actual native `canSurvive` +calls in both pinned JARs. The [block-survival report](../benchmarks/rust-block-survival-2026-10-06/scoped-parity.json) +records **35,998,488 matching output lines per JAR** across **9,229,463 fixtures**. +Each supported candidate state is exercised; behavior representatives are tested +against every neighbor state, changing repeated reads, integer-coordinate +wrapping, absent/closed/open shulker snapshots and injected block/entity query +failures, plus light thresholds, independent fluid sequences and fluid-query +failures. Native method ownership +and support-tag fields supply private +definition metadata; survival results are calculated in Rust. Workspace tests, +Clippy and the **147-test Python suite** passed. This establishes the recorded +survival scope; full placement, neighbor updates, scheduled behavior and complete +block gameplay remain pending. + + +Collision contexts now preserve empty-context fallback heights, position-only +queries, and captured entity position, descending, main-hand and placement flags. +Height comparisons retain the native float epsilon widened to double. Null +placement factories use `-Double.MAX_VALUE`; `withPosition` sets the placement +flag and ignores the supplied height when the entity is absent. Empty item stacks +match AIR in entity/empty contexts, while position-only contexts never report a +held item. Living-entity fluid callbacks run before the same-family exclusion, +with the second fluid as their argument, and propagate failures. + +`python3 tools/test_collision_context_parity.py` exercises actual native factories +and queries over **8,338 context snapshots**, comparing **225,126 output lines per +JAR**. The [context report](../benchmarks/rust-collision-context-2026-10-06/scoped-parity.json) +records the pinned artifacts and exact source/input/output hashes. The corpus +includes adjacent representable values around height thresholds, empty shapes, +integer-coordinate extremes, NaN/infinity, null entities, item count boundaries, +all five fluid types and callback failures. Native entity and stack snapshots are +allocated privately without their constructors; this checks query behavior, not +entity construction or inventory lifecycle. Inventory changes after context +capture, experimental minecart contexts and live movement integration remain +pending. Contextual block-shape selection is being added separately. + + +`ScaffoldingCollision` now selects stable scaffold geometry, the unstable bottom +platform, or an empty shape using the collision context. Placement contexts are +always empty. Descending affects the top surface check; the bottom platform also +requires nonzero support distance, the bottom flag and the lower height check. +No-context support and contextual collision share the same immutable stable shape. + +`python3 tools/test_scaffolding_collision_parity.py` compares all **32 states** +across **56,448 fixtures**, producing **524,300 matching lines per JAR** in the +[scaffolding report](../benchmarks/rust-scaffolding-collision-2026-10-06/scoped-parity.json). +The native context dispatch executes against a world proxy that rejects all +queries. Full shape coordinates, bounds, ordered boxes and cube metadata match +for empty, position, entity and placement contexts, including adjacent doubles +at both height thresholds. Block placement, distance updates, collapse and live +entity motion through scaffolding are separate work. + + +`LiquidCollision` implements contextual water/lava collision selection. The +always-fluid flag returns a full cube before querying entities or neighbors. +Otherwise, flowing block levels and nonliving contexts return empty. Source +blocks request the living entity's standing shape, check its height, then read the +fluid above and invoke the entity's standing predicate. Empty candidate shapes +still follow those query rules. Above-block coordinates wrap as Java integers. + +`python3 tools/test_liquid_collision_parity.py` compares all **32 water/lava block +states**, all **33 possible above-block liquid/empty states**, full selected shape +data and ordered callback traces, including failures at each query. The +[liquid-collision report](../benchmarks/rust-liquid-collision-2026-10-06/scoped-parity.json) +records **571,179 matching lines per JAR**. Standing shapes and fluid abilities are +controlled inputs in this suite; each entity type still needs its implementation. +Fluid spreading, swimming, drowning and live movement remain pending. + + +Powder snow now selects the native `0.9f`-high falling shape when fall distance +exceeds 2.5, a full cube for falling-block entities, and a full cube for entities +that can walk on it, are above it and are not descending. Placement and absent +entity contexts are empty. Walkability checks the entity-type tag first, then +leather boots only for living entities; successful tags skip equipment queries. +The API takes current entity metadata and lazy tag/equipment providers. + +`python3 tools/test_powder_snow_collision_parity.py` compares **63,336 fixtures** +and **599,180 matching lines per JAR** in the +[powder-snow report](../benchmarks/rust-powder-snow-collision-2026-10-06/scoped-parity.json). +The native block method and walkability predicate execute over controlled entity +snapshots. The corpus covers fall-distance and top-height boundaries, nonfinite +values, falling-block instances, item counts, query failures and skipped queries. +Entity tag loading, freezing, sinking and live movement remain separate work. + + +`BlockCollisionRegistry::collision_shape_with_context` now combines the contextual +scaffolding, liquid and powder-snow rules with the existing cached/dynamic paths. +It dispatches these overrides before consulting cached geometry. The pinned +native audit checks **35,492 context-independent cached states** at seven positions +with both interface and entity contexts that reject every query: each returns the +identical cache object without world reads. The **32 cached liquid states** query +the context and take their separate behavior path. The **199 uncached states** +continue through explicit behavior implementations. + +`python3 tools/test_contextual_collision_parity.py` validates integrated dispatch +for all **35,723 states**, **11 contexts** and both fluid-flag inputs: +**785,906 fixtures** and **2,391,334 matching output lines per JAR** in the +[contextual-registry report](../benchmarks/rust-contextual-collision-2026-10-06/scoped-parity.json). +Outputs compare cache-relative shape equality or full uncached geometry, plus +ordered world/entity callbacks. This integration corpus supplies missing block +entities; active shulker and piston snapshots retain their separate suites. +These checks establish the recorded collision-query scope, not entity movement +or whole-game parity. + + +Private shape exports now carry explicit canonical-identity markers. The importer +restores the global empty/full-block shapes only when their complete grid metadata +matches, and rejects duplicate or malformed canonical claims. Equal unmarked +shapes keep distinct identities. Older exports remain readable and report +`has_canonical_identities() == false`; they cannot establish the canonical identity +needed by vanilla's block-collision iterator fast path. + +The [canonical-identity report](../benchmarks/rust-canonical-collision-2026-10-06/scoped-parity.json) +adds identity checks for every cached state: **5,566 canonical empty**, **3,348 +canonical full-block** and **26,610 other cached states**, with **1,132,980 matching +output lines per JAR**. The integrated contextual comparison also passes again +with **2,391,334 lines per JAR** in its +[regression report](../benchmarks/rust-canonical-collision-2026-10-06/contextual-regression.json). +Five import tests cover legacy data, equal-but-distinct grids, canonical restoration +and malformed identity metadata. Workspace Clippy passes without warnings. + + +`BlockCollisionScan` now implements lazy cursor selection around entity bounds. +It retains the native epsilon-expanded cursor, X/Y/Z visit order, skipped corners, +large-shape face filtering, moving-piston edge filtering and suffocation-before- +shape query order. Only successful chunk lookups are reused; absent chunks are +queried again. Shape selection uses the global collision world, while suffocation +uses the selected chunk. Canonical full blocks use native AABB intersection; +other shapes use moved voxel intersection. Returned positions are independent +values. Providers supply current block metadata and contextual shape selection. + +`python3 tools/test_block_collision_scan_parity.py` compares **4,176 fixtures** +and **517,820 matching lines per JAR** in the +[collision-scan report](../benchmarks/rust-block-collision-scan-2026-10-06/scoped-parity.json). +The native iterator runs over controlled metadata, shapes and chunk availability; +traces cover early termination, missing chunks, query failures, thin/zero-width +bounds, integer-coordinate wrapping and equal shapes with different canonical +identities. Two Rust API tests cover finite/bounded input requirements, cursor +visit budgets and termination after errors. Unsupported cursor volumes return +errors; Java's overflowing iteration counts are outside this bounded API. +Registry/world integration and live movement still need implementation. + + +`BlockCollisionRegistry` now prepares native cursor-filter flags for every state: +uncached shapes are large, while cached shapes are large when any axis extends +outside the unit block. Moving-piston identity is bound to the same registry. +`SuffocationRegistry` binds the native predicate definitions and resolved +`causes_suffocation` tag. Default predicates combine tag membership with full +collision geometry; overrides preserve piston extension, constant predicates and +lazy shulker block-entity checks. Missing or wrong-type shulker block entities +count as suffocating. Tag changes require rebinding the suffocation registry. + +`python3 tools/test_suffocation_parity.py` checks all **35,723 states** with natural, +empty and all-block tag bindings at four positions, including integer extremes. +Every shulker state also covers absent/wrong block entities, all animation states +and query failures. The [suffocation report](../benchmarks/rust-suffocation-2026-10-06/scoped-parity.json) +records **1,697,193 matching lines per JAR**, including scan flags and query traces. +These are registry predicates; live collision-world binding, movement and +suffocation damage remain separate integration work. +The [contextual regression](../benchmarks/rust-suffocation-2026-10-06/contextual-regression.json) +also passes again with **2,391,334 lines per JAR**, and its all-state native audit +now compares large-shape and moving-piston flags. Workspace Clippy passes. + + +`RegistryCollisionWorld` now binds `BlockCollisionScan` directly to registered +metadata, contextual shapes and suffocation rules. Chunk providers return current +state IDs and a chunk-local block-entity provider; contextual collision uses the +global world. Construction rejects legacy collision exports without complete +canonical identity metadata, because their unit-block fast paths can differ. + +`python3 tools/test_registry_collision_scan_parity.py` compares native +`BlockCollisions` over resident `ProtoChunk` sections with the Rust binding over +`TerrainChunk` sections. All registered states cover ordinary and suffocating-only +selection. Additional scenes cover partial/dynamic blocks, chunk and build-height +boundaries, missing chunks, replacements, early termination and query failures. +Shulker fixtures deliberately give the chunk and global providers different +entities to check routing. The [resident collision report](../benchmarks/rust-resident-collision-scan-2026-10-06/scoped-parity.json) +records **3,046,929 matching output lines per JAR**. Six collision import/binding +tests pass, including legacy-metadata rejection; workspace Clippy passes. +Live chunk loading, entity lifecycle, movement and the playable client remain +separate integration work. + + +`resolve_world_movement` now joins registry-backed block scanning to the native +step-up decision. It selects entity colliders once, including for zero/underflow +movement, then collects applicable border and block shapes in native order for +the initial and optional step query. `try_resolve_step_movement` accepts owned or +borrowed collider lists and propagates provider failures without returning a +partial displacement. The shared implementation avoids allocating reference +lists for owned shapes; existing borrowed callers retain the same API. + +`python3 tools/test_world_movement_parity.py` runs actual `Entity.collide` over +registered blocks and resident Java sections, comparing the Rust world collector +and step solver. Every registered state appears as an obstacle; additional cases +cover step heights, grounded/falling motion, ceilings, partial/dynamic blocks, +chunk boundaries, zero/underflow motion and failures during collection. The +[world movement report](../benchmarks/rust-world-movement-2026-10-07/scoped-parity.json) +records **7,062,798 matching lines per JAR**. Entity collider lists, border +proximity/shapes and collision contexts are controlled fixture inputs. Actual +entity selection, border state, travel/gravity/velocity, grounded side effects +and playable integration remain pending. + +The [geometry regression](../benchmarks/rust-world-movement-2026-10-07/geometry-regression.json) +passes again with **1,320,187 lines per JAR**, including the existing native step +fixtures. All six movement unit tests and workspace Clippy pass. New tests cover +owned-query failures during both initial and step collection and signed zero +preservation when collection is skipped. + + +`entity_collision_shapes` now implements `EntityGetter.getEntityCollisions` +selection over ordered entity snapshots: average-size short circuit, epsilon +inflation, exact bounds/excluded-identity filtering, spectator suppression and +lazy collision-policy callbacks. With a source entity it invokes that entity's +`canCollideWith`; without one it invokes each candidate's +`canBeCollidedWith(null)`. Selected bounds become shapes after policy evaluation. +Providers retain responsibility for live storage and each entity type's policy. + +`python3 tools/test_entity_collision_parity.py` compares the actual native getter, +default vehicle-root checks and controlled policy overrides, including failures +at query/callback boundaries. Tiny/zero-width and nonfinite query boxes, inflated +boundary contacts, spectators, shared vehicles, null sources and ordered shape +outputs are covered. The [entity collision report](../benchmarks/rust-entity-collision-2026-10-07/scoped-parity.json) +records **158,558 matching lines per JAR**. Workspace Clippy passes. This adds the +selection helper needed by movement; live entity indexing, lifecycle and +entity-type policy implementations remain pending. + + +`BorderGeometry` now models stationary and moving world-border extents, cached +stationary collision geometry, center/absolute-limit changes, tick progression, +partial-tick bounds and movement proximity. The pinned version decrements size +transition progress once per tick. Ordinary bounds and collision shapes use the +previous size while moving; completing the transition installs a stationary +extent at the target. Collision geometry subtracts the floor/ceil-rounded inner +column from the infinite outer shape. Boundary predicates retain their asymmetric +inclusive minimum/exclusive maximum tests and native floating-point order. + +`python3 tools/test_world_border_parity.py` compares actual `WorldBorder` mutation +sequences, extent metadata, complete shape geometry and proximity predicates. +The [border report](../benchmarks/rust-world-border-2026-10-07/scoped-parity.json) +records **1,138,830 matching lines per JAR**, including zero/large durations, +wrapping start timestamps, completion, retargeting, signed zero, extreme finite +centers/sizes and nonfinite query/interpolation inputs. The supported construction +and mutation domain requires finite nonnegative sizes, finite centers and +nonnegative absolute limits/durations. A unit test verifies invalid parameters +leave the existing extent unchanged; workspace Clippy passes. Saved-data codecs, +listeners, dirty-state events, damage, synchronization and live movement binding +remain separate work. + + +`restitute_movement` now implements the pinned post-collision velocity calculation +with lazy entity/block bounce queries, gravity thresholds, nonliving float +scaling and air-drag interpolation. It preserves horizontal/vertical collision +branches, callback ordering, the position-sync field write and final velocity +assignment. Errors retain already performed effects instead of rolling back the +world or returning a fabricated successful velocity. + +`python3 tools/test_restitution_parity.py` executes actual +`Entity.restituteMovementAfterCollisions` on living and nonliving snapshots with +controlled block restitution and suppression tags. The +[restitution report](../benchmarks/rust-restitution-2026-10-07/scoped-parity.json) +records **177,090 matching lines per JAR**. Fixtures cover changing lazy getter +values, signed zero/nonfinite arithmetic, bounce callbacks that alter velocity, +and failures before/after each side effect. Workspace Clippy passes. Registered +block property/tag provisioning, actual bounce sounds/events, `Entity.move` +guards, fall damage, grounding and full player simulation remain pending. + + +`find_supporting_block` now selects the nearest colliding block center using the +native distance arithmetic and wrapping Y/Z/X position tie-break. `GroundState` +implements the thin foot query, previous-horizontal-footprint fallback and both +ground/collision flag updates. Null movement preserves the prior support in the +native branch where no fallback query can run; query failures retain preceding +flag writes. + +`python3 tools/test_ground_support_parity.py` compares actual +`CollisionGetter.findSupportingBlock`, `Entity.checkSupportingBlock` and both +`setOnGroundWithMovement` overloads. The +[ground support report](../benchmarks/rust-ground-support-2026-10-07/scoped-parity.json) +records **342,709 selection lines and 151,444 state-transition lines per JAR**, +covering ties, nonfinite entity positions, missing chunks, query errors, nullable +movement and sequential changes of support. Shape/context snapshots are controlled; +registry-backed scanning has separate integration coverage. Workspace Clippy +passes. Full live entity movement, support-dependent effects and gameplay remain +pending. +The [shared scanner regression](../benchmarks/rust-ground-support-2026-10-07/scan-regression.json) +also passes with **517,820 matching lines per JAR** after extending its fixtures. + + +`movement_support` now implements support-dependent positions, the three public +offset variants and base-entity block jump/speed factors. It preserves the support +X/Z coordinates, conditional fence/wall/gate lookup, float-to-double offset +widening, cached entity block position and lazy block queries. Jump-factor lookup +always reads the lower block; speed lookup can short-circuit for water, bubble +columns or a non-unit current factor. + +`python3 tools/test_movement_support_parity.py` compares the actual native methods +with controlled state/tag/property snapshots. The +[movement support report](../benchmarks/rust-movement-support-2026-10-07/scoped-parity.json) +records **51,572 matching lines per JAR**, including float boundaries, nonfinite +positions/offsets/factors, tag/type short circuits and errors at every query. +Workspace Clippy passes. Registered movement-property provisioning, living-entity +efficiency and the full movement lifecycle remain pending. + + +`MovementProperties` imports version-bound raw friction, speed, jump, bounce and +fall-distance-reduction fields plus fence-gate type. `BoundMovementProperties` +binds resolved fence/wall/bounce-suppression tags; rebinding leaves previous +snapshots unchanged. `RegistryMovementWorld` connects real state IDs from a block +provider to the support-position and factor calculations, rejecting unknown IDs. + +`python3 tools/test_movement_registry_parity.py` independently checks native +property getters for every state, then runs actual entity support/factor queries +over all **35,723 states / 1,286 blocks** under normal, empty and universal tags. +Mixed-block scenes and failing providers check query order. The +[registered movement report](../benchmarks/rust-movement-registry-2026-10-07/scoped-parity.json) +records **2,300,888 matching lines per JAR**. Three import/binding tests and +workspace Clippy pass. This provisions movement data; full player travel, live +entity state and block bounce effects remain separate integration work. + + +`PistonMovement` now accumulates displacement per axis and resets it when the +game tick changes. It preserves the initial squared-length short circuit, lazy +time lookup, first nonzero axis, the +/-0.51 cumulative clamp and float-derived +small-displacement threshold. A failed time lookup leaves the accumulator intact. + +`python3 tools/test_piston_movement_parity.py` runs actual +`Entity.limitPistonMovement` across sequential tick/push inputs. The +[piston movement report](../benchmarks/rust-piston-movement-2026-10-07/scoped-parity.json) +records **325,197 matching lines per JAR**, including repeated/opposing pushes, +threshold neighbors, signed zero, nonfinite inputs and injected failures. +Workspace Clippy passes. Piston block events, entity pushing and the surrounding +`Entity.move` lifecycle remain pending. +The [registered movement regression](../benchmarks/rust-piston-movement-2026-10-07/movement-registry-regression.json) +passes again with **2,300,888 lines per JAR** on the integrated sources. + + +`no_world_collision` implements the entity-bearing collision-free query over the +registry-bound world. It consumes block collisions lazily, then checks whether +the selected entity list is empty, then tests applicable border geometry. Each +stage short-circuits the later providers; a nonempty entity list blocks the query +even if its supplied shape is empty. Collision contexts are supplied explicitly. + +`python3 tools/test_world_collision_check_parity.py` executes native +`CollisionGetter.noCollision` over registered blocks and resident Java sections. +The [world collision-check report](../benchmarks/rust-world-collision-check-2026-10-07/scoped-parity.json) +records **4,793,095 matching lines per JAR**. All states, context variants, empty +and disjoint controlled entity/border shapes, missing chunks, boundaries and +provider failures are covered. Workspace Clippy passes. Null-entity overloads, +actual entity-list/border providers and live player ledge behavior remain pending. +The [shared movement regression](../benchmarks/rust-world-collision-check-2026-10-07/movement-regression.json) +also passes with **7,062,798 matching lines per JAR**. + + +`back_off_from_edge` implements the player ledge guards, above-ground test and +X/Z/diagonal displacement reductions. It retains lazy step/staying/grounded +queries, float step widening, signed-zero behavior and the exact thin collision +probe arithmetic. A caller-supplied query budget bounds nonconverging inputs and +returns an error without fabricating a successful displacement. + +`python3 tools/test_edge_backoff_parity.py` executes actual player methods with +controlled collision-free query results. The +[edge backoff report](../benchmarks/rust-edge-backoff-2026-10-07/scoped-parity.json) +records **46,578 matching lines per JAR**, covering all mover types, flight/crouch +guards, fall/step and 0.05 thresholds, nonfinite values and query failures. Two +query-budget unit tests and workspace Clippy pass. Registered-world ledge probes, +live crouching/attribute state and the complete player movement loop are separate +integration work. + + +Registered-world ledge integration now runs `back_off_from_edge` through +`no_world_collision` and registry-bound resident chunk scans. The native side +executes actual `Player.maybeBackOffFromEdge` and its collision probes over +`ProtoChunk` sections. Every state is used as a supporting block, with additional +falling, step-height, chunk-edge, diagonal, dynamic-block and guard/error cases. + +`python3 tools/test_world_edge_backoff_parity.py` passes with +**27,109,699 matching lines per JAR** in the +[world ledge report](../benchmarks/rust-world-edge-backoff-2026-10-07/scoped-parity.json). +The shared fixture now supports player probes alongside direct movement and +collision checks; workspace Clippy passes. Entity lists, border applicability and +collision contexts remain controlled snapshots. A complete player movement/travel +loop and playable client remain pending. + + +`check_fall_damage` now implements base-entity fall-distance accumulation and +landing order. Downward displacement narrows to float before being subtracted +from the double fall distance. Grounded landings call the block, read the +possibly changed position/support, emit the ground event and reset fall distance. +Errors preserve completed field writes and callback effects. + +`python3 tools/test_fall_damage_parity.py` runs actual `Entity.checkFallDamage` +with controlled water, landing and event providers. The +[base fall report](../benchmarks/rust-fall-damage-2026-10-07/scoped-parity.json) +records **44,566 matching lines per JAR**, including nonfinite arithmetic, float +underflow, callback mutations and failures at every boundary. Workspace Clippy +passes. Living-entity fluid/particle behavior, registered block landing effects, +health/damage and full movement remain pending. + + +`living_fall` implements default living-entity fall power/damage calculation, +impulse-height exemption and landing damage callback order. It retains separate +immunity checks for passenger propagation and damage calculation, double/float +arithmetic and saturating floor-to-int conversion. Positive damage resets the +impulse context, selects the fall sound, plays block landing sound and dispatches +hurt. A rejected hurt callback does not change the native positive-damage result. +`ImpulseContext` also models setter, grace-extension and reset behavior; disabling +ignore clears grace time while retaining the impact position until a later reset. + +`python3 tools/test_living_fall_parity.py` compares actual living methods and +sequential impulse changes. The +[living fall report](../benchmarks/rust-living-fall-2026-10-07/scoped-parity.json) +records **153,025 matching lines per JAR**, including changing immunity, passenger +callback mutations, nonfinite arithmetic, sound threshold selection and failures +after partial state changes. Workspace Clippy passes. Attribute provisioning, +passenger storage/recursion, actual health processing, tick/save/network behavior +and the complete movement lifecycle remain pending. + + +`push_entities_up` implements the block-replacement push: query old/new shapes, +subtract old occupied space without optimizing the join, translate to world +coordinates and select entities using the added shape's bounds. It reads each +current entity box before calculating its upward displacement and invokes a +relative teleport even when that displacement is zero. + +`python3 tools/test_block_push_parity.py` compares actual `Block.pushEntitiesUp` +with controlled shapes and selected entity lists. The +[block push report](../benchmarks/rust-block-push-2026-10-07/scoped-parity.json) +records **101,006 matching lines per JAR**, including empty/redundant geometry, +partial shapes, large coordinates, nonfinite entity boxes, mutations of later +entities and failures after partial effects. Workspace Clippy passes. Registered +replacement dispatch, actual entity selection and teleport/network semantics +remain separate integration work. + + +`block_landing` binds audited native landing/bounce families to every registered +state. It implements fall-distance reduction, hay/honey damage multipliers, +slime suppression, powder-snow fall sounds, upward dripstone tips, farmland +replacement with occupant pushes, turtle-egg destruction/decrement and shelf +mushroom bounce sounds. Random draws, server-class checks, client flags, spawn +protection, mob griefing, sounds, writes and events retain native order. + +`python3 tools/test_block_landing_parity.py` invokes registered native methods for +all **35,723 states / 1,286 blocks** with eight entity class families. The +[registered landing report](../benchmarks/rust-block-landing-2026-10-07/scoped-parity.json) +records **3,524,267 matching lines per JAR**, including float/double boundaries, +NaN/infinity, failed writes, callback failures, egg hatch preservation and +farmland collision pushes. Targeted Clippy passes. Actual health, live entity +selection/storage, teleport/network behavior, audio playback and full movement +lifecycle integration remain separate work. + + +`movement_emission` accumulates native movement/flight distances, evaluates +climbable and powder-snow states, and dispatches step/swim/flap effects. Legacy +and current support blocks retain their separate sound/event rules. Threshold +updates use Java float-to-int saturation and wrapping integer addition, and +sound/event callbacks can change fields observed by subsequent operations. + +`python3 tools/test_movement_emission_parity.py` compares actual native movement +emission, block vibration dispatch, flapping and next-step arithmetic. The +[movement emission report](../benchmarks/rust-movement-emission-2026-10-07/scoped-parity.json) +records **598,611 matching lines per JAR** across **53,036 fixtures**, including +predicate combinations, sound/event modes, differing support blocks, nonfinite +numbers, mutations and provider failures. Targeted Clippy passes. Sound callbacks +are controlled and the crystal-sound predicate is false in this gate; registered +sound selection, audio playback and full movement integration remain pending. + + +`entity_move` sequences native movement phases: no-physics/piston early exits, +stuck multiplier reset, edge backoff, collision resolution, fall-reset clipping, +position/recording writes, collision/ground flags, landing, removal, restitution, +movement emission and block speed multiplication. `MovementHistory` retains at +most 100 records by merging the oldest pair and dropping their original-axis +movement metadata. Callbacks can change fields read by later phases. + +`python3 tools/test_entity_move_parity.py` invokes actual `Entity.move` with native +shape resolution and zero restitution. The +[movement lifecycle report](../benchmarks/rust-entity-move-2026-10-07/scoped-parity.json) +records **543,653 matching lines per JAR**, covering signed zero, tiny/nonfinite +movement, collisions, early exits, recording cap, authority guards, landing +mutations/removal and failures after partial writes. Targeted Clippy passes. +This gate controls piston/edge decisions, ground support, ray hits and landing +callbacks; step height is zero and non-passenger emission is tested separately. +Binding all phases to a live entity/world and player travel remains pending. + + +`world_ray` implements ordered block/fluid ray clipping, nearest-hit selection +with block precedence on ties, and interaction-shape overrides that replace only +the hit face. It also implements native fluid pick modes and fall-reset shape +selection, including player type identity, end portals/gateways and server-side +zero-delay Nether portals. Traversal limits and invalid geometry return errors. + +`python3 tools/test_world_ray_parity.py` compares actual `BlockGetter.clip` and +native `ClipContext` modes. The +[world ray report](../benchmarks/rust-world-ray-2026-10-07/scoped-parity.json) +records **248,725 matching lines per JAR**, including inside hits, ties, misses, +interaction geometry, short/signed-zero rays, lazy predicates/rules and provider +failures. Targeted Clippy passes. Separate limit tests distinguish a miss from +nonfinite geometry, exhausted traversal budget and failed world reads. Shapes +and state predicates are controlled; registered shape binding, actual fluid +shape caching and full entity/world integration remain pending. + + +`FluidShapeCache` matches native registered-fluid shape caching. The first +successful lookup of a nonempty fluid state samples the fluid above and retains +its resulting shape across later positions/world views. Failed reads leave the +state uncached. Empty and full cube shapes preserve canonical identity; distinct +noncanonical cached shapes retain their own identities. + +`python3 tools/test_fluid_shape_parity.py` runs every registered native fluid state +in changing query sequences. The +[fluid shape report](../benchmarks/rust-fluid-shape-2026-10-07/scoped-parity.json) +records **387,950 matching lines per JAR** across **5,181 sequences**, comparing +geometry, cache population, canonical/alias identities, query suppression and +failures. Targeted Clippy passes. The pinned registry has no amount-nine state; +unsupported custom fluid definitions are outside this module. Fluid propagation, +entity immersion and live world/ray integration remain pending. + + +`InteractionShapes` imports a complete state-bound table with a distinct table +kind and mandatory canonical identity metadata. The pinned owner audit finds +only default empty, cauldron, composter, hopper and scaffolding implementations; +all are static per state. Geometry uses the existing validated discrete shape +importer while preserving eight native shape identities. + +`python3 tools/test_interaction_shape_parity.py` compares every registered state +and actual native interaction-face overrides with supplied collision geometry. +The [interaction shape report](../benchmarks/rust-interaction-shape-2026-10-07/scoped-parity.json) +records **188,682 matching lines per JAR** across all **35,723 states**. Native +interaction-shape world queries are rejected by the fixture. Import checks reject +wrong table kind, partial mappings, missing canonical metadata, foreign state +ordering and invalid IDs. Targeted Clippy passes. Registered outline/visual +shapes, complete ray-world binding and gameplay integration remain pending. + + +`FallRayRegistry` binds fall-reset tags, portal identities, interaction geometry +and fluid states to the complete registered block-state table. `fall_reset_ray` +uses that binding with the shared fluid-shape cache and native water selection. +Tag reloads produce new validated registry snapshots; unknown tag members and +invalid state IDs are rejected. + +`python3 tools/test_registry_fall_ray_parity.py` compares actual registered +`BlockGetter.clip` behavior with native block/fluid tags and shape getters. The +[registered fall-ray report](../benchmarks/rust-registry-fall-ray-2026-10-07/scoped-parity.json) +records **3,024,623 matching lines per JAR** across **120,297 fixtures**, including +all **35,723 states**, tag reloads, server/client distinctions, player type checks, +portal delays, changing above-fluid states, shared cache reuse and failures. +Targeted Clippy passes. World storage is controlled; live entity movement and +complete player/world gameplay integration remain pending. + + +`living_landing` wraps base fall handling with fluid refresh, server-only changed +block notification and landing particles, followed by climbing-position cleanup. +Particle positions preserve the native support-block edge projection and capture +entity coordinates before later callbacks. Attribute, fluid, particle and block +callbacks can mutate fields; failures retain preceding writes. + +`python3 tools/test_living_landing_parity.py` invokes actual +`LivingEntity.checkFallDamage` and its base implementation. The +[living landing report](../benchmarks/rust-living-landing-2026-10-07/scoped-parity.json) +records **244,844 matching lines per JAR**, including server/nonserver levels, +water changes, numeric boundaries, particle locations/counts, callback failures, +field mutations and climbing cleanup. Targeted Clippy passes. Fluid immersion, +changed-block enchantments, particle rendering and live gameplay binding remain +pending; those providers are controlled by this gate. + + +`living_air` implements input normalization/rotation, friction-influenced speed, +ladder/scaffolding limits, relative movement, collision-triggered climbing and +air travel. Ground friction is captured before movement while levitation, +gravity and drag are sampled afterwards. Player class identity controls ladder +slide suppression. Native float arithmetic and quantized trigonometry are kept. + +`python3 tools/test_living_air_parity.py` invokes the actual native private air, +relative movement, climbing, speed, friction and input-vector methods. The +[air travel report](../benchmarks/rust-living-air-2026-10-07/scoped-parity.json) +records **443,554 matching lines per JAR**, including both player/nonplayer +classes, changed ground/climbing predicates, missing client chunks, levitation, +nonfinite boundaries, callback mutations and failures. Targeted Clippy passes. +Extreme effect amplifiers are injected directly for integer-boundary checks; +normal constructor clamping is outside this gate. Collision movement, gravity, +attributes and immersion remain controlled providers; live gameplay binding and +complete player travel are pending. + + +`living_fluid` adds native water/lava acceleration, slowdown, falling adjustment, +shallow-lava handling, collision escape and ridden buoyancy. It shares input +rotation with air movement. Fluid heights and escape queries remain lazy, with +movement mutations visible to subsequent velocity updates. + +`python3 tools/test_living_fluid_parity.py` compares the actual native travel and +fluid helper methods. The +[fluid travel report](../benchmarks/rust-living-fluid-2026-10-07/scoped-parity.json) +records **265,100 matching lines per JAR**, including sprint changes, movement +efficiency, dolphin effects, shallow-fluid boundaries, escape probes, ridden +float guards, nonfinite values, callback mutations and failures. Targeted Clippy +passes. Collision movement, immersion depths, free-space queries, attributes and +gravity are controlled; live fluid propagation and gameplay binding remain +pending. + + +`living_motion` implements default living jump strength/boost, sprint jump +impulses, gravity and slow falling, vertical liquid input, rider flight speed +and air drag. Native finite-addition filtering and delayed synchronization flags +preserve partial writes when providers fail. + +`python3 tools/test_living_motion_parity.py` compares the corresponding actual +living methods plus `Entity.applyGravity` and `addDeltaMovement`. The +[jump and gravity report](../benchmarks/rust-living-motion-2026-10-07/scoped-parity.json) +records **113,623 matching lines per JAR**, including float thresholds, extreme +raw effect amplifiers, signed zero/nonfinite values, rider classes, callback +mutations and failures. Targeted Clippy passes. Entity-type jump/flight overrides, +effect and attribute storage, registered jump-factor binding and live gameplay +integration remain pending. + + +`player_travel` wraps living travel with passenger bypass, swimming pitch +adjustment, head-fluid checks and preservation of creative-flight vertical +velocity. It also binds player flight speed to sprint/passenger/ability rules +and implements the flying ability's fluid-affection predicate. + +`python3 tools/test_player_travel_parity.py` invokes actual `Player.travel`, +`getFlyingSpeed` and `isAffectedByFluids`. The +[player travel report](../benchmarks/rust-player-travel-2026-10-07/scoped-parity.json) +records **120,933 matching lines per JAR**, including ability and velocity +mutations, callback failures, signed zero/nonfinite positions and the distinction +between direct ability fields and virtual ability access. Targeted Clippy passes. +Parent travel is selected through a controlled fluid callback; connecting the +verified living phases and collision movement to the live player/world remains +pending. + + +`ClimbingRegistry` binds resolved climbing/glide-through tags and actual trapdoor +class identities to all registered states. `on_climbable` preserves spectator +and gliding guards, open-trapdoor/ladder facing checks, wrapping below-position +arithmetic and last-climbable position writes. Negative or failed checks retain +the previous climbing position. Unknown members/properties and IDs are rejected. + +`python3 tools/test_climbing_parity.py` invokes actual registered +`LivingEntity.onClimbable` and trapdoor support checks. The +[climbing report](../benchmarks/rust-climbing-2026-10-07/scoped-parity.json) +records **3,820,054 matching lines per JAR** across all **35,723 states**, including +all trapdoor states against every registered ladder facing, tag reloads, +spectator/gliding guards, captured positions, mutations and failures. Targeted +Clippy passes. Entity/world storage is controlled; live movement binding and +equipment-based glide eligibility remain pending. + + +`fluid_occupancy` implements section-ordered liquid checks over resident block +sections with a complete registered fluid-presence table. `BlockSection.any_state` +checks active palette entries so dry sections skip cell unpacking. Bounds use +inclusive floored endpoints, and chunk requests retain native behavior even when +no requested vertical section is within world height. Invalid geometry, foreign +registries and query-budget exhaustion return explicit errors. + +`python3 tools/test_fluid_occupancy_parity.py` compares actual +`LevelReader.containsAnyLiquid`, `BoxBlockMatcher` and `BlockScanUtils` with +native ProtoChunk sections. The +[liquid occupancy report](../benchmarks/rust-fluid-occupancy-2026-10-07/scoped-parity.json) +records **116,664 matching lines per JAR**, including fluid presence for all +**35,723 states**, public chunk/section query order, height boundaries, palette +changes/compaction and failures. Rust-only checks verify typed budget, nonfinite +and registry errors. Targeted Clippy passes. Chunk snapshots repeat controlled +resident data; collision composition for `Entity.isFree` and live world binding +remain pending. No performance gain is claimed without measurement. + + +`free_space.offset_is_free` composes native offset bounds, registry-bound +block/entity/border collision clearance and resident liquid occupancy. The +liquid scan runs only after collision clearance succeeds. Both phases share +resident TerrainChunk storage through `RegistryCollisionWorld`; their typed +errors and separate query budgets remain visible to the caller. + +`python3 tools/test_free_space_parity.py` invokes actual `Entity.isFree`, native +collision iteration and liquid scanning on the corresponding resident ProtoChunk +storage. The [free-space report](../benchmarks/rust-free-space-2026-10-07/scoped-parity.json) +records **5,764,046 matching lines per JAR** across all **35,723 states**, offsets, +fluid/context variants, height boundaries, required missing chunks and failures. +Targeted Clippy passes. Entity lists, border applicability and collision contexts +are controlled; chunk generation, live entity indexing and full playable +integration remain pending. +The [collision-only regression](../benchmarks/rust-free-space-2026-10-07/collision-regression.json) +also passes **4,793,095 matching lines per JAR** after extending the shared +fixture and registry binding. + + +`entity_fluid` tracks body depth, eye immersion and current accumulation across +updates. It preserves one-tick tracker retention, missing-chunk preflight, +ordered cell scans, the first matching current tag, camera support checks and +partial writes on query failure. Current application distinguishes player +averaging from other entities' normalization and dispatches the final velocity +addition with its finite-input filter and fresh velocity read. + +`python3 tools/test_entity_fluid_parity.py` invokes actual +`EntityFluidInteraction` and `Entity.addDeltaMovement`. The +[entity fluid report](../benchmarks/rust-entity-fluid-2026-10-07/scoped-parity.json) +records **607,338 matching lines per JAR** with real ProtoChunk fluid-presence +sections, ordered/reloaded overlapping tags, wet/dry sequences, eye boundaries, +nonfinite heights/current arithmetic, mutations and injected failures. Rust-only +checks cover explicit query-budget/nonfinite errors and reset-before-error +behavior. Targeted Clippy passes. Fluid heights/flows and entity fields are +controlled here; neighboring-cell flow calculation, live world/entity binding +and full playable integration remain pending. Extreme-coordinate Java scans are +bounded by injected callback failures rather than allowed to traverse billions +of cells. + + +`fluid_flow` computes water/lava current vectors from ordered horizontal and +lower neighbors, preserving f32 height subtraction before f64 accumulation. +Falling fluids apply the native wall deflection, including the same-family, +upward-face and IceBlock guards, then normalize the resulting vector. + +`python3 tools/test_fluid_flow_parity.py` invokes actual registered +`FluidState.getFlow`, `FlowingFluid.getFlow` and its solid-face helper. The +[fluid flow report](../benchmarks/rust-fluid-flow-2026-10-07/scoped-parity.json) +records **1,051,071 matching lines per JAR** from **51,846 fixtures** covering all +registered fluid states, neighboring families/heights, per-face wall flags, +falling deflection, wrapping coordinates and query failures. Targeted Clippy +passes. Block tag/class flags and face support are controlled in this comparison; +binding those to registered block storage and support shapes, fluid spreading +and complete gameplay remain pending. + + +`registry_fluid` now binds contained fluid states, resolved flow-blocking tags and +actual IceBlock class membership to the full block registry. Its world adapter +composes current/height/camera queries with cached and dynamic support shapes. +Foreign registry identities, unknown tag members and invalid state IDs are +rejected explicitly; tag reloads use a new immutable binding. + +`python3 tools/test_registry_fluid_parity.py` compares actual registered height, +camera immersion, current vectors and solid-face queries. The +[registered fluid report](../benchmarks/rust-registry-fluid-2026-10-07/scoped-parity.json) +records **2,446,969 matching lines per JAR** from **409,389 fixtures**, covering all +**35,723 block states**, waterlogged contents, cached/dynamic support, natural and +reloaded tags, neighboring fluid families, coordinate wrapping and failures. +Targeted Clippy passes, including checks for typed invalid-ID and foreign-registry +errors. World cells are controlled and block entities are absent in this suite; +active block-entity lifecycle, live entity binding, fluid spreading and complete +playable integration remain pending. + + +`entity_fluid_tick` composes immersion updates with entity water-entry behavior +and current application. It captures water/lava membership before effects, +resets fall distance in water, dispatches a splash after the first tick when +newly entering water, updates the touching-water flag and queries the push +predicate again before applying forces. Lava uses the dimension's FAST_LAVA +attribute to select its current coefficient. + +`python3 tools/test_entity_fluid_tick_parity.py` invokes actual +`Entity.updateFluidInteraction` with native immersion and current application. +The [entity fluid tick report](../benchmarks/rust-entity-fluid-tick-2026-10-07/scoped-parity.json) +records **953,830 matching lines per JAR**, including changing push predicates, +first-tick/entry flags, simultaneous water/lava, attribute selection, nonfinite +arithmetic, callback mutations and failures around partial writes. The +[immersion regression](../benchmarks/rust-entity-fluid-tick-2026-10-07/immersion-regression.json) +also passes **607,338 lines per JAR** after extending the shared fixtures. +Targeted Clippy passes. Splash dispatch is controlled; audio/particle generation, +full live entity/world binding and playable integration remain pending. + + +`RegistryFluidWorld` now implements entity immersion queries through the bound +fluid contents, height calculations, camera support and neighbor-derived current +vectors. Entity fields and loaded chunk/section views remain supplied by the +world provider, preserving captured positions and partial-write order. + +`python3 tools/test_registered_entity_fluid_parity.py` invokes actual +`EntityFluidInteraction` with registered fluid and support behavior. The +[registered immersion report](../benchmarks/rust-registered-entity-fluid-2026-10-07/scoped-parity.json) +records **6,550,126 matching lines per JAR**, including all **35,723 states** in +immersed and above-eye cells, mixed water/lava neighborhoods, waterlogged blocks, +ordered/reloaded tags, current velocities, tracker retention and query failures. +Targeted Clippy passes. Shared-fixture regressions also pass: +[tick composition](../benchmarks/rust-registered-entity-fluid-2026-10-07/tick-regression.json) +(**953,830 lines per JAR**) and +[controlled immersion](../benchmarks/rust-registered-entity-fluid-2026-10-07/immersion-regression.json) +(**607,338 lines per JAR**). Chunk presence and section wet flags are controlled, +and block entities are absent here; full live chunk/entity lifecycle, fluid +propagation and playable gameplay remain pending. + + +`swimming` implements entity/player swimming transitions, underwater/shallow-water +predicates and the fluid jump threshold. The player flying ability disables +swimming directly. Other transitions preserve short-circuit query order, prior +eye-in-water state, passenger guards, captured block position and final state +writes only after all required queries succeed. + +`python3 tools/test_swimming_parity.py` compares actual Entity/Player methods. +The [swimming report](../benchmarks/rust-swimming-2026-10-07/scoped-parity.json) +records **191,142 matching lines per JAR**, including flag combinations, native +fluid tag membership, failures/mutations, and f32 eye-height boundaries/nonfinite +values. Targeted Clippy passes. Synchronized entity storage, full input/tick +integration and playable gameplay remain pending. + + +`fluid_box` implements default entity immersion bounds and boat passenger +waterline clipping. Entity bounds are deflated and captured before vehicle +lookup. Submerged boats retain those bounds; other boats restrict immersion to +the portion strictly above their top, returning no box when none remains. + +`python3 tools/test_fluid_box_parity.py` compares actual entity/boat methods. The +[fluid box report](../benchmarks/rust-fluid-box-2026-10-07/scoped-parity.json) +records **92,822 matching lines per JAR**, including actual boat status values, +virtual modifier dispatch, thin/inverted bounds, waterline boundaries, signed +zero/nonfinite values and mutations/failures. Targeted Clippy passes. Vehicle +snapshots are controlled; live passenger lifecycle and full gameplay remain +pending. + + +`water_splash` generates native water-entry sound, bubble/splash particle and game +event requests. It preserves controlling-passenger identity, captured velocity, +f32 volume/pitch arithmetic, float-rounded surface height, changing entity width, +and random draws before each emitted effect. A particle budget returns an +explicit error after preserving preceding effects and RNG consumption. + +`python3 tools/test_water_splash_parity.py` invokes actual +`Entity.doWaterSplashEffect` with native legacy and xoroshiro random generators. +The [water splash report](../benchmarks/rust-water-splash-2026-10-07/scoped-parity.json) +records **192,506 matching lines per JAR** across **7,840 fixtures**, including +sound thresholds, self/other passengers, particle positions/velocities, callback +mutations/failures, nonfinite arithmetic and the next RNG value after the effect. +A Rust-only budget check verifies that exhaustion preserves the two sound-pitch +random draws. Targeted Clippy passes. Sound identities and effect sinks are +controlled; audio playback, particle simulation/rendering and full gameplay +integration remain pending. + + +`attributes` implements basic/ranged attribute instances, ordered modifiers, +three-stage value calculation, cache invalidation and permanent-state packing. +Modifier clones retain reference identity for transient-update notifications. +Per-operation maps preserve native hash-table iteration, growth and deletion +order because modifier arithmetic is sensitive to floating-point association. +The implementation also retains native partial writes when a dirty observer +fails, stale operation entries after operation-changing updates, merge-on-apply +semantics and self-replacement behavior. + +`python3 tools/test_attribute_parity.py` compares actual `AttributeInstance` +methods using every registered attribute definition. The +[attribute report](../benchmarks/rust-attributes-2026-10-07/scoped-parity.json) +records **1,404,798 matching lines per JAR** across **2,391 fixtures**, including +collision clusters, resize/shrink boundaries, seeded operation sequences, +reference identity, observer cache reads/failures, nonfinite values and signed +zero. The adapter observes iterator order, as native calculation does; Java +stream traversal can differ. Targeted Clippy passes. Registry/entity/equipment +binding, packed data/network codecs and full gameplay integration remain pending. + + +`attributes::entity` imports version-checked attribute definitions and entity +supplier bases, and composes them with the attribute engine. Reads fall back to +the supplier without creating instances; first instance access schedules an +update and a sync for client-syncable attributes. Mutations retain those set +memberships until individually acknowledged. Base resets use the entity's +supplier value and do not instantiate absent entries. Missing attributes and +missing modifiers remain distinguishable, including lookup after instantiation. + +`python3 tools/test_entity_attribute_parity.py` compares actual `AttributeMap` +operations with **40 registered attributes** and **93 entity suppliers**. The +[entity attribute report](../benchmarks/rust-entity-attributes-2026-10-07/scoped-parity.json) +records **1,771,555 matching lines per JAR** across **4,720 fixtures**. Targeted +Clippy passes. The exporter asserts that registered default suppliers contain no +modifiers. Set membership is observed in registry order: this does not establish +JVM identity-hash collection order, cross-attribute bulk assignment/serialization, +custom suppliers, equipment integration or a live entity tick. + + +`food` implements eating, saturation, exhaustion, hunger predicates and the +server hunger tick. It retains the captured level/difficulty, short-circuit +player queries, fast/slow regeneration timers, starvation health/difficulty +guards, wrapping integer arithmetic, Java float edge behavior and partial state +writes when callbacks fail. Heal and starvation requests use explicit world +hooks, which can mutate food state before subsequent tick work. + +`python3 tools/test_food_parity.py` compares actual `FoodData` methods. The +[food report](../benchmarks/rust-food-2026-10-07/scoped-parity.json) records +**180,878 matching lines per JAR** across **15,211 fixtures**, including 240-tick +sequences, threshold boundaries, all difficulties, callback mutation/failure, +signed zero and nonfinite arithmetic. Targeted Clippy passes. World rules, +player health/healing and damage delivery are controlled; consumables, saved +hunger data and live survival gameplay integration remain pending. + + +`food_storage` reads/writes hunger state in player NBT compounds. Missing and +nonnumeric fields use native defaults; numeric tags retain vanilla coercions, +including floor-to-int for floats/doubles, truncation of long integer bits and +no post-load clamping. Writes replace the four hunger fields with native int/ +float types, normalize float signed zero and preserve unrelated player fields. + +`python3 tools/test_food_storage_parity.py` compares actual `FoodData` persistence +through `TagValueInput`/`TagValueOutput`. The +[food storage report](../benchmarks/rust-food-storage-2026-10-07/scoped-parity.json) +records **45,955 matching lines per JAR**, covering every NBT numeric type, +missing/wrong-type fields, conversion boundaries, nonfinite values and save/load +round trips. Targeted Clippy passes. ProblemReporter diagnostics and the complete +player save lifecycle remain pending; these results establish the four hunger +fields, not a playable save/load implementation. + + +`living_health` implements health/absorption clamping, healing dispatch, player +hurt and living dead-or-dying predicates. Health writes capture synchronized +storage before attribute lookup. `SyncedFloat` preserves Java boxed-float +equality, writes the value before the update callback, and marks dirty only +after that callback succeeds; it also supports default/dirty extraction for a +single float item. + +`python3 tools/test_living_health_parity.py` compares actual LivingEntity/Player +methods and actual `SynchedEntityData` float items. The +[living health report](../benchmarks/rust-living-health-2026-10-07/scoped-parity.json) +records **442,007 matching lines per JAR**, covering nonfinite values, signed +zeros/NaN equality, forced updates, dirty extraction, health-data replacement +during callbacks and partial effects after exceptions. Targeted Clippy passes. +Attribute values and the internal absorption sink are controlled. Player-specific +absorption synchronization, multiple synchronized items, registered attribute +binding, full damage processing and playable entities remain pending. + + +`attribute_health` binds the health engine to registered entity attributes and +mutable synchronized health. `AttributeHealth` borrows existing state, queries +actual modified MAX_HEALTH/MAX_ABSORPTION values and propagates observer errors +without losing partial health writes. Base living absorption uses field storage. + +`python3 tools/test_attribute_health_parity.py` composes actual registered +`AttributeMap`, LivingEntity/Player health methods, `SynchedEntityData` and +`FoodData`. The [composition report](../benchmarks/rust-attribute-health-2026-10-07/scoped-parity.json) +records **666,082 matching lines per JAR**, including all **93 entity suppliers**, +attribute base/modifier changes, real regeneration health writes, 100-tick hunger +sequences and failed synchronization callbacks. Targeted Clippy passes. The +internal absorption sink and starvation damage delivery are controlled; +player absorption synchronization, attribute-change refresh, full damage and +live gameplay integration remain pending. + + +Entity attribute storage now shares immutable supplier bases and allocates each +mutable instance only on first access. This retains dense lookup indices while +avoiding space for unused instance objects in every entity. + +`python3 tools/measure_attribute_memory.py --phase before|after` measures a Linux +release-process workload of 20,000 held-live zombie attribute maps, using five +fresh processes per case. Median process RSS changed from **175,820 to 12,848 +KiB** with defaults only, and **175,800 to 29,076 KiB** with four active attributes +per entity. Both cases retain the same health-read checksum. The +[before](../benchmarks/rust-attribute-memory-2026-10-07/before.json) and +[after](../benchmarks/rust-attribute-memory-2026-10-07/after.json) reports record +samples and source hashes; the baseline entity implementation is `fd185a6`. +RSS includes runtime, catalog and allocator overhead. This is not whole-game +memory, a timing benchmark or evidence of an FPS improvement. + +The optimized implementation passes both pinned JAR comparisons again: +[entity attributes](../benchmarks/rust-attribute-memory-2026-10-07/entity-regression.json) +(**1,771,555 lines per JAR**) and +[health/hunger composition](../benchmarks/rust-attribute-memory-2026-10-07/health-regression.json) +(**666,082 lines per JAR**). Targeted Clippy passes. + + +`combat_rules` implements armor/toughness and magic-protection damage arithmetic. +It preserves the nonnull-weapon/server-level guards and clamps modified armor +effectiveness only after the server enchantment hook. + +`python3 tools/test_combat_rules_parity.py` compares actual `CombatRules` methods. +The [combat rules report](../benchmarks/rust-combat-rules-2026-10-07/scoped-parity.json) +records **184,248 matching lines per JAR**, including armor/toughness boundaries, +random float bit patterns, nonfinite/signed-zero values, query mutations/failures, +null/empty/unenchanted weapons and server/nonserver branches. Native unenchanted +stacks have explicitly empty components. Targeted Clippy passes. Enchanted item +components, damage tags, armor durability and the complete damage pipeline remain +pending; the exposed enchantment hook is not an enchantment implementation. + + +`living_damage` implements the inner `actuallyHurt` sequence for base living +entities and players. It preserves invulnerability/armor/magic dispatch, both +absorption reads before the first write, guarded absorbed statistics, Java float +rounding, player exhaustion/taken statistics, base-living second absorption +writes, and combat/health/game-event ordering. Callback failures retain preceding +writes and effects. + +`python3 tools/test_living_damage_parity.py` compares actual LivingEntity/Player +methods with real final absorption clamping and controlled phase/storage sinks. +The [living damage report](../benchmarks/rust-living-damage-2026-10-07/scoped-parity.json) +records **161,198 matching lines per JAR**, including entity/player paths, attacker +types, stat limits/rounding, nonfinite values, mutations and failures at query +boundaries. Targeted Clippy passes. Armor/magic results, health storage, combat/ +stat sinks and exhaustion delivery are controlled. Outer hurt gates, resistance/ +equipment binding, combat tracking and playable damage integration remain pending. + + +`player_food` implements player exhaustion, eating eligibility and the hunger +threshold for exhaustive manoeuvres. Invulnerability reads the abilities field +directly. Exhaustion additionally checks the client/server side before updating +direct food storage; manoeuvre eligibility uses virtual food and ability lookups. +`StoredPlayerFood` binds these operations to ordinary mutable `FoodData` state. + +`python3 tools/test_player_food_parity.py` compares actual Player methods and +native FoodData. The [player food report](../benchmarks/rust-player-food-2026-10-07/scoped-parity.json) +records **32,723 matching lines per JAR**, covering direct/virtual distinctions, +captured food identity during mutations, guard short-circuiting, injected failures, +nonfinite exhaustion and integer hunger boundaries. The stored-state binding is +also compared. Targeted Clippy passes. Consumable components, full ability storage +and live player tick integration remain pending. + + +`damage_reduction` composes native armor/toughness arithmetic with living damage +bypass checks and armor-durability dispatch. Its magic-reduction path preserves +resistance amplifier overflow, reduced-damage clamping, resisted statistics, +repeated attacker lookup and the server-only enchantment protection query. +Armor attributes floor to Java's saturated integer range before float conversion. + +`python3 tools/test_damage_reduction_parity.py` compares actual living methods +for base entities and ServerPlayer receivers. The +[damage reduction report](../benchmarks/rust-damage-reduction-2026-10-07/scoped-parity.json) +records **78,069 matching lines per JAR**, covering bypass combinations, +resistance/stat boundaries, numeric edges, query failures/mutations and actual +empty-equipment protection iteration. Targeted Clippy passes. Equipment is empty; +enchanted components, actual armor durability, registered damage/effect bindings +and the full hurt sequence remain pending. + + +`synced_floats` stores multiple synchronized float fields. It preserves boxed +float equality, per-field/global dirty state, ascending-ID dirty/default lists, +received assignment without newly marking dirty, per-entry and batch callbacks, +and prefix effects when an observer or field lookup fails. Callbacks may reenter +the table to set/assign fields or drain existing dirty values. + +`python3 tools/test_synced_floats_parity.py` compares actual `SynchedEntityData`. +The [synchronized float report](../benchmarks/rust-synced-floats-2026-10-07/scoped-parity.json) +records **554,909 matching lines per JAR**, including forced/equal updates, +received duplicates, reentrant operations, missing IDs, callback failures and +NaN/signed-zero equality. Native gaps are untouched default float items; observed +keys are explicit configured IDs. Targeted Clippy passes. Other serializers, +serializer-mismatch errors, wire codecs and player absorption binding remain +pending. + + +`player_health` binds ordinary registered player attributes to health and +absorption in one synchronized float table. The player absorption getter and +internal setter use virtual data access; health retains its direct data access. +The final absorption setter still applies the registered maximum before writing. + +`python3 tools/test_player_health_parity.py` compares actual Player methods, +registered player attributes and `SynchedEntityData`, exporting the actual pinned +health/absorption field IDs. The +[player health report](../benchmarks/rust-player-health-2026-10-07/scoped-parity.json) +records **243,146 matching lines per JAR**, covering modified limits, healing, +absorption reads/writes, combined dirty/default lists, received assignments, +callback packet drains and failures. Targeted Clippy passes. Observer effects +are controlled; custom virtual data replacement, other synchronized serializers, +wire codecs and full player damage/tick integration remain pending. + + +`server_player_damage` composes ordinary server-player inner damage with +registered armor/toughness and health/absorption limits, shared synchronized +float storage and stored hunger. Armor break callbacks may change attributes +before the hit queries armor; received damage uses the actual reduction and +health modules, and player exhaustion retains its ability/client guards. + +`python3 tools/test_server_player_damage_parity.py` compares the native Player +inner damage method on ServerPlayer receivers, using actual native reduction, +registered modified attributes, synchronized data and FoodData. The +[server-player damage report](../benchmarks/rust-server-player-damage-2026-10-07/scoped-parity.json) +records **373,455 matching lines per JAR**, covering repeated hits, bypass flags, +resistance, numeric edges, armor attribute mutation, dirty packet drains and +callback failures. Targeted Clippy passes. Empty equipment and controlled +source/effect, durability, combat/stat/event services bound this scope; outer +hurt gates, enchanted equipment and the complete player lifecycle remain pending. + + +`living_hurt` implements the outer living hurt sequence: early rejection, +blocking/freezing/helmet dispatch, non-finite damage sanitization, repeated-hit +cooldowns, hurt-animation writes, attribution, impact/knockback, death/sound +branches, last-source timestamps, effect notifications and criterion dispatch. +Services receive live hurt state, including the distinct field writes before and +after the inner hit in fresh-hit and cooldown-difference branches. + +`python3 tools/test_living_hurt_parity.py` invokes the native LivingEntity method +directly on base and ServerPlayer receivers. The +[living hurt report](../benchmarks/rust-living-hurt-2026-10-07/scoped-parity.json) +records **441,413 matching lines per JAR**, including numeric edges, repeated +hits, callback mutations/failures, empty-hand death-protection lookup, native +soundless blocking components and victim criteria with no listeners. Targeted +Clippy passes. Inner damage, blocking amounts, sounds, knockback, death and +attribution/effect services are controlled. Successful totems, attacker-player +criteria, actual blocking reduction, full service bindings and player-specific +outer gates remain pending. + + +`player_hurt` adds the player ability/invulnerability gates, no-action reset, +shoulder removal, damage-source difficulty scaling and exact-zero rejection +before living hurt. The server-player wrapper first checks PvP permission for +player attackers and player owners of arrow attackers. Difficulty is queried +separately for the peaceful, easy and hard branches as in vanilla. + +`python3 tools/test_player_hurt_parity.py` compares actual Player and ServerPlayer +methods through the native living hurt sequence. The +[player hurt report](../benchmarks/rust-player-hurt-2026-10-07/scoped-parity.json) +records **410,880 matching lines per JAR**, including all three-query difficulty +combinations, player/arrow-owner PvP gates, repeated hits and callback failures. +Targeted Clippy passes. Native downstream living services retain the controlled +fixture scope above; invulnerability internals, rule/source registries, actual +team permissions, successful totems, attacker server-player criteria and complete +player lifecycle integration remain pending. + + +`damage_immunity` implements entity permanent/temporary invulnerability and base +source immunity, living enchantment dispatch, ordered player damage gamerules, +and server-player dimension-change/client-loading checks. It preserves early +returns and repeated source-tag queries across the inheritance layers. + +`python3 tools/test_damage_immunity_parity.py` compares each native layer on +ServerPlayer receivers, retaining native empty-equipment enchantment iteration. +The [damage immunity report](../benchmarks/rust-damage-immunity-2026-10-07/scoped-parity.json) +records **170,314 matching lines per JAR**, including mixed damage tags, rule +precedence, virtual flag mutations and callback failures. Targeted Clippy passes. +Source/rule queries and virtual flags are controlled; registered source/rule +bindings, nonempty enchantment immunity and full pipeline integration remain +pending. + + +`server_player_combat` binds server/player/living outer hurt to the checked +registered-attribute, synchronized-health/absorption and hunger inner damage +path. Dead-or-dying reads live health and the direct death flag; the outer +cooldown/animation state is shared across hits. PvP, blocking, effects, +attribution, knockback, death and other world services remain explicit. + +`python3 tools/test_server_player_combat_parity.py` compares the actual native +ServerPlayer hurt chain through actual inner reduction and player storage. The +[server-player combat report](../benchmarks/rust-server-player-combat-2026-10-07/scoped-parity.json) +records **561,528 matching lines per JAR**, including repeated hits, death +rejection, modified attributes, cooldown differences, packet drains, numeric +edges and failures after partial writes. Some fixtures explicitly reset cooldown +between hits; they do not claim entity-tick coverage. Targeted Clippy passes. +Invulnerability answers, blocking amounts, armor-durability callbacks, effects, +PvP permission, combat/event/knockback/death services and criterion listeners are +controlled. Enchanted items, registered sources, actual lifecycle services and +playable integration remain pending. + + +The stored-player combat binding now executes the verified server-player +invulnerability predicates at every outer and inner query. Its inner damage body +is shared with standalone living/player damage after the required predicate has +run. Native integration retains inherited Entity/LivingEntity/Player/ServerPlayer +immunity methods, including empty-equipment enchantment iteration, gamerule +precedence, dimension changes and client-loading guards. + +The [combat immunity integration report](../benchmarks/rust-server-player-combat-immunity-2026-10-07/scoped-parity.json) +records **1,176,994 matching lines per JAR**. The standalone inner-damage +[regression report](../benchmarks/rust-server-player-combat-immunity-2026-10-07/inner-damage-regression.json) +retains **161,198 matching lines per JAR** after extracting the shared body. +Targeted Clippy passes. Virtual flags, source tags/rule values and the other +world services listed above remain controlled; the fixture now executes the +immunity decisions themselves instead of supplying their final result. + + +`damage_source` imports version-checked native decoded damage definitions and +resolves their raw tag resources with the shared tag implementation. Sources +retain distinct direct/causing entities and optional explicit positions. Weapon +and fallback position queries use the direct entity; difficulty scaling uses +the stored causing entity, while creative-source detection dispatches virtual +causing-entity access before reading player abilities. + +`python3 tools/test_damage_source_parity.py` covers all **51 bundled damage +types and 36 damage-type tags**, using the actual native DamageType codec and +TagLoader. The [damage-source report](../benchmarks/rust-damage-source-2026-10-07/scoped-parity.json) +records **152,175 matching lines per JAR**, including constructor identities, +scaling, exhaustion, tag/type membership, position/weapon queries, virtual +causing-entity replacement, mutations and failures. Targeted Clippy passes. +Catalogs are immutable snapshots with local indices, not network IDs. Rust +DamageType codecs, runtime reload, death-message generation, full entity query +bindings and combat source integration remain pending. + + +Registered damage sources now drive a composed player-combat fixture. Source +helpers map the immunity, outer-hurt and reduction tag enums to the imported +vanilla tags. Native source methods supply exhaustion, difficulty scaling, +creative-source abilities and direct-entity weapon selection through the real +ServerPlayer hurt chain; thorns also follows its native secondary-sound branch. + +`python3 tools/test_registered_player_combat_parity.py` records **1,431,711 +matching lines per JAR** in the +[registered player-combat report](../benchmarks/rust-registered-player-combat-2026-10-07/scoped-parity.json), +covering all 51 damage types and 36 tags, direct/causing entity combinations, +repeated hits, health/absorption/hunger, cooldown state and callback failures. +Targeted Clippy passes. Equipment is unenchanted; virtual entity flags/rule +values, blocking amounts, durability, PvP permission, attribution, effects, +knockback/death services and empty criterion listeners remain controlled. +Complete entity lifecycle and playable game integration remain pending. + + +`blocking_rules` implements damage-reduction angle/type conditions, ordered +reduction sums and clamping, block delay/disable tick rounding and item-damage +threshold/floor arithmetic. Source type-set membership is queried only when its +entry's angle condition reaches that check. + +`python3 tools/test_blocking_rules_parity.py` compares native BlocksAttacks +records and direct holder-set membership. The +[blocking rules report](../benchmarks/rust-blocking-rules-2026-10-07/scoped-parity.json) +records **105,068 matching lines per JAR**, including exact angle boundaries, +NaN/infinity/signed zero, randomized float bits, source-type mutations and query +failures. Targeted Clippy passes. Angles are supplied in radians; direction/acos +calculation, component codecs, item durability, sounds and full blocking +integration remain pending. + + +`view_direction` implements native float-table pitch/yaw vectors and horizontal +blocking angles, using the pinned pure-Rust `libm` 0.2.16 inverse cosine. A local +203,072-input probe found 7,908 differences with the platform `acos`, versus none +with this pinned implementation, so platform math is not used for this path. + +`python3 tools/test_view_direction_parity.py` compares actual native view vectors +and Java Math.acos, plus the native view/subtract/normalize/dot/acos composition +used by blocking. The [view-direction report](../benchmarks/rust-view-direction-2026-10-07/scoped-parity.json) +records **226,459 matching lines per JAR**, including random doubles, inverse- +cosine boundaries, arbitrary float rotations, degenerate horizontal vectors and +the widened float-PI fallback. Targeted Clippy passes. Full item-blocking dispatch +and validation against JVMs on other platforms remain pending. This does not +resolve the separately tracked Math.cos/Gaussian portability differences. + + +`item_blocking` implements living blocking dispatch: item/component capture, +bypass and pierced-arrow rejection, source direction, component reduction, +blocking-item damage dispatch and the later non-projectile melee response. +The virtual level/used hand are queried after reduction; melee response retains +the original server-level argument and performs a fresh direct-entity lookup. + +`python3 tools/test_item_blocking_parity.py` compares actual LivingEntity +applyItemBlocking with native components on base and ServerPlayer receivers. +The [item-blocking report](../benchmarks/rust-item-blocking-2026-10-07/scoped-parity.json) +records **87,930 matching lines per JAR**, including callback mutations/failures, +captured items/components, piercing/bypass combinations, native direction/math, +client/stat guards and melee responses. Targeted Clippy passes. Native stacks +are explicitly undamageable; actual damageable-item mutation, blocking eligibility, +component codecs and complete combat/world integration remain pending. + + +`item_use` implements blocking-item eligibility and both elapsed-use timer +overloads. It retains the original blocking delay while rereading active-item +storage and remaining ticks after the virtual duration query; partial-tick +queries preserve the second virtual use-state check. + +`python3 tools/test_item_use_parity.py` compares the actual inherited native +methods with real blocking components and controlled virtual item durations. +The [item-use report](../benchmarks/rust-item-use-2026-10-07/scoped-parity.json) +records **108,690 matching lines per JAR**, covering wrapping tick arithmetic, +delay boundaries, absent components, empty stacks, shared item types, partial +float values and callback mutations/failures. Targeted Clippy passes. Full +item-use lifecycle, damageable-item storage and complete combat/world integration +remain pending. + + +`item_durability` stores the durability projection of an item stack, including +raw versus visible counts/components, clamped damage access, damageability/break +predicates and wrapping count changes. Server-level damage preserves creative +immunity, the positive float enchantment pipeline, advancement-before-write and +copy-before-shrink ordering. The non-breaking variant retains its native empty +break consumer, including unusual invalid component values. + +`python3 tools/test_item_durability_parity.py` compares actual unenchanted native +ItemStack operations. The [durability report](../benchmarks/rust-item-durability-2026-10-07/scoped-parity.json) +records **81,762 matching lines per JAR**, including absent components, empty/air +stacks, unbreakable flags, integer boundaries, callback mutations and failures. +Targeted Clippy passes. This is a durability projection, not complete item-stack +component storage. Enchantment effects, component codecs, equipment break +handling and full gameplay integration remain pending. + + +`blocking_item_damage` composes blocking-component item-damage arithmetic with +stored durability. It preserves player-only handling, the passed level's client +guard for item-use statistics, the later virtual entity-level check and the +server-player-only creative/advancement queries. Break callbacks receive the +pre-shrink stack copy and the caller's original equipment slot. + +`python3 tools/test_blocking_item_damage_parity.py` compares actual native +BlocksAttacks calls into ItemStack storage on non-player, Player and ServerPlayer +receivers. The [blocking durability report](../benchmarks/rust-blocking-item-damage-2026-10-07/scoped-parity.json) +records **71,800 matching lines per JAR**, including scalar float boundaries, +invalid/absent durability components, statistic item capture, callback mutations +and failures. Targeted Clippy passes. Stacks are unenchanted; full component +storage, equipment lifecycle and complete combat/world integration remain pending. + + +`item_use_lifecycle` implements living use ticks, per-item updates, completion, +release and stop ordering. Stable stack handles preserve type versus identity +checks, rereads after virtual hand queries, captured level/item arguments, +wrapping countdowns, returned-item placement and failure-visible state changes. + +`python3 tools/test_item_use_lifecycle_parity.py` compares actual inherited native +methods and ItemStack dispatch with controlled custom item handlers. The +[lifecycle report](../benchmarks/rust-item-use-lifecycle-2026-10-07/scoped-parity.json) +records **144,736 matching lines per JAR**, including empty stacks, changed +held/active items, shared item types, client/server queries, finish vibrations, +kinetic-map presence and callback mutation/failure ordering. Targeted Clippy +passes. Starting use, actual synchronized flags, consumable/kinetic effects, +remainder/cooldown components and full inventory/game-tick integration remain +pending. + + +`item_use_start` starts use from a captured held stack, writes the returned +duration after its callback, synchronizes equipment before changing using/offhand +flags, emits the component's start vibration and resets recent kinetic enemies +when the final active stack has a kinetic-weapon component. + +`python3 tools/test_item_use_start_parity.py` compares inherited native +startUsingItem and its private equipment packet construction. The +[start-use report](../benchmarks/rust-item-use-start-2026-10-07/scoped-parity.json) +records **84,873 matching lines per JAR**, including captured stack/level/hand +arguments, empty stacks, callback mutation/failure ordering, flag writes, native +UseEffects/KineticWeapon presence and clearing a populated kinetic-enemy map. +Targeted Clippy passes; all 20 existing horizon-world library tests pass with +these changes. Synchronized flag storage, packet encoding/delivery, kinetic +combat and complete inventory/game-tick integration remain pending. + + +`item_use_catalog` imports all 1,658 pinned item identities and a typed projection +of their default components for stack size, durability and use-duration/release +queries. Component-driven use preserves consumable precedence over blocking and +kinetic weapons. Registered duration overrides remain separate; consumables +truncate float ticks while instruments floor them. Empty stacks query air +behavior and hide their stored components. + +`python3 tools/test_item_use_catalog_parity.py` binds vanilla's actual component +initializers and confirms both JARs export equivalent defaults. The +[registered item-use report](../benchmarks/rust-item-use-catalog-2026-10-07/scoped-parity.json) +records **246,715 matching lines per JAR**, covering every item default, count +changes and component mutation sequences, override behavior, stackability, +durability and integer/float extremes. Targeted Clippy passes. The imported +projection does not implement all item components or their codecs; full inventory, +enchantment effects and stored gameplay integration remain pending. + + +`component_patch` stores shared immutable prototypes and ordered copy-on-write +patches. Set/remove return values, redundant-value sanitation, explicit removals, +unsanitized restoration, independent copies and saved patch snapshots retain +native behavior. Entry iteration emits patched values before untouched defaults; +key-set order instead applies the patch to the prototype's key sequence. + +`python3 tools/test_component_patch_parity.py` compares actual native patched +maps. The [component-patch report](../benchmarks/rust-component-patch-2026-10-07/scoped-parity.json) +records **622,680 matching lines per JAR**, including integer/boxed-float equality, +NaN/signed zero, copy isolation and mutation-before-error when a restored removal +has no prototype default. Targeted Clippy passes. Prototypes have at most seven +keys in this suite; callers supply prototype order and native value equality. +Native large-prototype identity-hash ordering, codecs, mutable payload aliases +and full item/inventory integration remain pending. + + +`component_durability` binds damage/count queries and mutations directly to +shared component prototypes and patches. The durability algorithm now accepts +`DurabilityStorage`, so writes and storage errors occur at their native points, +including before break callbacks. The earlier plain durability projection +remains supported through the same interface. + +`python3 tools/test_component_durability_parity.py` compares native ItemStack +operations with nonempty prototypes and observable patches at every callback. +The [component durability report](../benchmarks/rust-component-durability-2026-10-07/scoped-parity.json) +records **83,727 matching lines per JAR**, including original/copy independence +and mutation-before-error for unsanitized restored removals. Targeted Clippy +passes. The refactor also preserves both native regression suites: +[scalar durability](../benchmarks/rust-component-durability-2026-10-07/scalar-regression.json) +(**81,762 lines per JAR**) and +[blocking durability](../benchmarks/rust-component-durability-2026-10-07/blocking-regression.json) +(**71,800 lines per JAR**). Full component codecs, enchanted durability, equipment +and complete gameplay integration remain pending. + + +`item_stack_storage` implements stored item identity, count/pop-time storage, +component visibility, copying, splitting, transmutation and consumption. Copies +share component data until a write; canonical empty results are explicit so a +containing item store can preserve reference identity. Negative counts and +wrapping arithmetic follow the pinned methods, including mutations to an empty +stack and consumption callbacks that change or fail after a copy is captured. + +`python3 tools/test_item_stack_storage_parity.py` compares 7,856 fixtures with +actual native ItemStack methods and small bound integer-component prototypes. +The [storage report](../benchmarks/rust-item-stack-storage-2026-10-07/scoped-parity.json) +records **568,580 matching lines per JAR**. Comparisons include raw and visible +state, component patch order, stack identity and item/component/count equality. +Targeted Clippy passes. The fixture arena preserves canonical EMPTY aliases; +a production inventory, full component values/codecs and complete item-use, +equipment and game-tick integration remain pending. + + +`item_stack_refs` adds shared stack identity with automatic reference-counted +lifetime management on the simulation thread. `simple_container` uses these +references for get/set, merging, removals, reverse removal by type, clearing, +capacity checks and item counts. Copies retain independent component patches; +container slots and callers can deliberately share the same stack. + +`python3 tools/test_simple_container_parity.py` compares actual native container +and stack methods, including changes and failures in virtual size/change hooks. +The [container report](../benchmarks/rust-simple-container-2026-10-07/scoped-parity.json) +records **590,402 matching lines per JAR**. It checks alias identity, raw/visible +counts, empty-stack references, component-sensitive merging, overflow, invalid +indices and mutation prefixes on failure. In particular, native insertion into +the first empty slot clears the remainder before limiting the inserted copy. +Targeted Clippy passes. Player inventory, menus, crafting accounting, persistence, +arbitrary getItem/setItem overrides and complete gameplay integration remain +pending. Reference counting here has not been benchmarked as a performance gain. + + +`player_inventory` implements the 36 ordinary slots, seven mapped equipment +slots, shared entity equipment, selected hotbar slot, picking, matching/crafting +eligibility, removals, replacement, clearing and the change counter. Equipment +retains populated entries when cleared. Stack and equipment references can be +shared across inventories; replacing an inventory retains stack aliases. + +`python3 tools/test_player_inventory_parity.py` compares actual native Inventory, +EntityEquipment and ItemStack methods. The +[inventory report](../benchmarks/rust-player-inventory-2026-10-07/scoped-parity.json) +records **790,440 matching lines per JAR**, including invalid-index failure +prefixes, selected-slot changes, negative equipment removal amounts, ordinary +versus equipment identity, self-replacement and shared equipment clearing. +Components cover damage, unbreakable presence, a fixed enchantment and literal +custom names. Native Map.of iteration order varies by JVM; fixtures explicitly +supply equipment-map order to both sides when removing an aliased reference. +Targeted Clippy passes. Pickup, inventory/equipment ticks, menus, recipe +accounting, persistence, full component values and complete gameplay integration +remain pending. + + +`inventory_pickup` composes player slot search and insertion with shared stack +storage. Search checks the selected slot, offhand, then ordinary slots. Insertion +consumes its source, preserves component-sensitive merging and pop time, and +handles damaged stacks and creative fallback at their native callback points. + +`python3 tools/test_inventory_pickup_parity.py` compares actual native +Inventory.add/getSlotWithRemainingSpace, ItemStack operations and shared +equipment. The [pickup report](../benchmarks/rust-inventory-pickup-2026-10-07/scoped-parity.json) +records **424,282 matching lines per JAR**, including source/destination aliases, +callback mutations, failures, count overflow, invalid slots and the damaged +copy-and-clear that happens before slot validation. Targeted Clippy passes. +Native crash-report wrapping is represented as an error; diagnostic text is not +compared. Item-entity pickup events, networking, inventory ticks, menus, full +components and complete gameplay integration remain pending. + + +`inventory_tick` composes inventory/equipment iteration with ItemStack's pop-time +update and ServerLevel-only item dispatch. It retains stack arguments across +level callbacks, reads hotbar selection at the native point and observes changes +to later equipment entries during the same tick. Aliased stacks can be visited +more than once, with each visit updating their shared pop-time counter. + +`python3 tools/test_inventory_tick_parity.py` compares actual Inventory.tick, +EntityEquipment.tick and ItemStack.inventoryTick with custom item handlers. The +[tick report](../benchmarks/rust-inventory-tick-2026-10-07/scoped-parity.json) +records **195,957 matching lines per JAR**, including empty stacks, callbacks +that mutate later slots, weakly consistent equipment iteration and failure +prefixes. The client comparison uses an actual allocated ClientLevel for the +non-server branch; the dedicated JAR uses null because ClientLevel is absent. +Targeted Clippy passes. Registered items' individual tick effects, full entity +and world ticking and complete gameplay integration remain pending. + + +`player_equipment` binds the main hand to the selected inventory slot and other +equipment to the shared entity map. Hand/slot writes capture the previous item, +store the new reference and then invoke the equip callback. Clearing the base +equipment map does not clear the selected stack; clearing the inventory does. + +`python3 tools/test_player_equipment_parity.py` compares actual PlayerEquipment +and inherited LivingEntity hand/slot access over a real native Inventory. The +[equipment report](../benchmarks/rust-player-equipment-2026-10-07/scoped-parity.json) +records **408,852 matching lines per JAR**, including selection changes, callback +mutations/failures, old/new aliases, raw enum-map main-hand entries and the +selected main-hand override. Targeted Clippy passes. Full onEquipItem effects, +synchronized flags, active-use integration and complete gameplay integration +remain pending. + + +The item-use interfaces now accept cloned shared references as well as small +copyable handles. `StackRef` equality compares object identity; component/count +value comparisons remain explicit. Captured references stay alive through +callbacks that replace the active or held stack. The lifecycle fixture now uses +the production reference-counted stack implementation. + +The native regressions retain **144,736 lifecycle**, **84,873 start-use** and +**108,690 eligibility/timing** matching lines per JAR. Reports: +[lifecycle](../benchmarks/rust-shared-item-use-2026-10-07/item-use-lifecycle.json), +[start](../benchmarks/rust-shared-item-use-2026-10-07/item-use-start.json), +[eligibility](../benchmarks/rust-shared-item-use-2026-10-07/item-use.json). +Targeted Clippy and all 20 horizon-world library tests pass. Hand queries and +flags remain controlled in these fixtures; composing them with actual player +inventory, synchronized flags and full item effects remains pending. + + +`synced_values` shares the synchronized scalar algorithm between bytes and +floats, retaining Java boxed-float equality. `living_use_flags` binds the pinned +byte field to using-item/offhand queries and signed-mask flag writes. Flag writes +use the same write-before-callback, callback-before-dirty ordering as other +synchronized values. + +`python3 tools/test_synced_bytes_parity.py` compares actual byte SynchedEntityData +and inherited LivingEntity flag methods. The +[byte/flag report](../benchmarks/rust-synced-bytes-2026-10-07/scoped-parity.json) +records **572,100 matching lines per JAR**, covering all initial bytes, signed +masks, forced updates, assignments, reentrant callbacks, dirty packing and +failures. The [float regression](../benchmarks/rust-synced-bytes-2026-10-07/float-regression.json) +retains **554,909 matching lines per JAR**. Targeted Clippy passes. Mixed-serializer +storage, entity schemas, wire codecs and full item-use/gameplay integration remain +pending. + + +`inventory_use` binds living item-use ticks, completion, release and stop to +actual player inventory/hands, shared stack references and synchronized byte +flags. Equipment storage changes precede equip callbacks; synchronized flag +writes retain their value/callback/dirty ordering. Effects receive the same +mutable inventory, flag storage and active-use state. + +`python3 tools/test_inventory_use_parity.py` compares inherited native lifecycle +methods composed with real Inventory, PlayerEquipment and SynchedEntityData. The +[combined report](../benchmarks/rust-inventory-use-2026-10-07/scoped-parity.json) +records **349,310 matching lines per JAR**, including live count mutations, +selection/offhand changes, equipment callbacks, flag dirty prefixes, completion +replacement and failed callbacks. Targeted Clippy passes. Item/level effects and +the equip/synchronized observers are controlled; starting use, default observer +reactions, consumables, kinetic combat, remainders/cooldowns and complete gameplay +integration remain pending. + + +`inventory_use::flags_updated` implements LivingEntity's synchronized use-flag +reaction. On clients, a using flag can select the held stack and query its +duration; clearing use can clear the active stack and remaining time. Server +notifications leave active-use state unchanged. Received assignments notify even +when the byte value is unchanged, while ordinary unchanged writes do not. + +`python3 tools/test_use_flag_reaction_parity.py` invokes the inherited native +observer through actual synchronized writes/assignments, player inventory and +equipment. The [reaction report](../benchmarks/rust-use-flag-reaction-2026-10-07/scoped-parity.json) +records **366,331 matching lines per JAR**, including duration callbacks, +empty-but-distinct stack references, signed masks, repeated received values, +selection/count mutations and failures before dirty marking. Ordinary lifecycle +operations are also exercised with the real observer reaction. Targeted Clippy +passes. Other synchronized keys, start-use packet flow, full item/equip effects +and complete gameplay integration remain pending. + + +`inventory_use` now binds start-use to stored inventory, shared active stacks +and synchronized flag reactions. Server equipment synchronization precedes flag +writes, followed by start vibration and the kinetic-enemy reset service. Captured +stack/hand arguments and live state reads retain native callback ordering. + +`python3 tools/test_inventory_use_start_parity.py` exercises inherited native +start-use with actual Inventory, PlayerEquipment and synchronized storage. The +[start report](../benchmarks/rust-inventory-use-start-2026-10-07/scoped-parity.json) +records **9,506 fixtures and 223,004 matching lines per JAR**, including native +equipment packet construction, observer reactions, callback mutations/failures +and clearing a populated kinetic-enemy map. Targeted Clippy passes. Packet +encoding/delivery, the full kinetic-enemy map and combat, complete item/equip +effects and full gameplay integration remain pending. + + +`item_template` implements immutable template construction, conversion from +stacks, count replacement with native reference identity, current-prototype +component lookup, creation and patch precedence. Strict validation checks +damageable/stackable incompatibility before contained components and top-level +size. A required component-schema service handles contained validation. Rejected +creations return canonical EMPTY; rejected applied patches restore the exact +previous raw patch, including redundant entries. + +`python3 tools/test_item_template_parity.py` compares actual ItemStackTemplate +and ItemStack validation with scalar max-stack-size/max-damage/damage components. +The [template report](../benchmarks/rust-item-template-2026-10-07/scoped-parity.json) +records **518,556 matching lines per JAR**, covering zero/negative/overflow-edge +counts, changed prototypes, component removals, aliasing and validation rollback. +Targeted Clippy passes. Contained components and bundle-weight validation are +not exercised by this corpus; their schema implementation, codecs, use-remainder +integration and complete gameplay integration remain pending. + + +`use_remainder` converts a consumed stack using the validated item-template +factory. Infinite materials and unchanged visible counts retain the original +reference. An exhausted stack returns the created remainder; otherwise an extra +item callback runs and the captured original reference is returned. Callback +mutations and failures retain their native prefix. + +`python3 tools/test_use_remainder_parity.py` compares actual UseRemainder with +native template creation. The +[remainder report](../benchmarks/rust-use-remainder-2026-10-07/scoped-parity.json) +records **353,264 matching lines per JAR**, including canonical EMPTY creation, +empty-but-distinct inputs, reference replacement and callback failures. Targeted +Clippy passes. The concrete actor inventory/drop handler, contained-component +validation, finish-use side effects and complete gameplay integration remain +pending. + + +`bundle_weight` implements checked native fraction construction, addition and +multiplication, nested-bundle overhead, occupied-beehive weight and lazy caching +of successful and failed weight calculations. Contained validation checks +container sizes, then bundle sizes and weight, then charged projectile sizes. +It does not recursively apply full strict validation to each contained item. + +`python3 tools/test_bundle_weight_parity.py` compares pinned Fraction arithmetic, +actual BundleContents and ItemStack strict validation. The +[bundle report](../benchmarks/rust-bundle-weight-2026-10-07/scoped-parity.json) +records **137,332 matching lines per JAR**, including overflow, negative template +counts, changed prototypes, cached errors, nested bundles, bee presence, empty +component visibility and validation order. Targeted Clippy passes. Typed schema +adapters remain fixture-local; complete bundle inventory operations, codecs, +item-use integration and full gameplay integration remain pending. + + +`java_hash_map` supplies default-capacity storage for non-null keys with native +hash codes and a total comparable ordering consistent with equality. It retains +linked bucket traversal, tree-bin root movement, red/black insertion/deletion, +resize splits, iterator removal and structural-modification checks. Tree lookup +uses the ordered tree; removed arena slots are reused. + +`python3 tools/test_java_hash_map_parity.py` compares this API with the actual +JDK 25 HashMap used by vanilla cooldown storage. The +[map report](../benchmarks/rust-java-hash-map-2026-10-07/scoped-parity.json) records +**601,084 matching lines** for each pinned-game classpath run, including all-key +collisions, tree/list transitions, varied removal orders, iterator mutations +and clear-on-empty behavior. Both runs use the same installed JDK; this is a +collection comparison, not a gameplay parity claim. Targeted Clippy passes. +Null/non-comparable keys, alternate map constructors and unexposed Map methods +are outside this storage API. Concrete cooldown and gameplay integration remain +pending. + + +`item_cooldowns` composes cooldown entries with native hash-map ordering. Adds +store before start notifications; removals notify even for missing groups. Tick +expiry removes before end notifications, rereads the live clock and preserves +iterator invalidation after callback mutations. Percentages use native wrapping +integer differences and float arithmetic. `identifier` supplies validated names, +Java hashes and path-first ordering. UseCooldown converts seconds and retrieves +the player cooldown manager before adding through the stack's current group. + +`python3 tools/test_item_cooldowns_parity.py` compares actual ItemCooldowns and +UseCooldown over real stack components, with controlled player/start/end +callbacks. The +[cooldown report](../benchmarks/rust-item-cooldowns-2026-10-07/scoped-parity.json) +records **167,906 matching lines per JAR**, including colliding identifiers, +wrapping clocks, zero/negative durations, float edge cases, empty visibility, +reentrant ticks and mutation/failure prefixes. Targeted Clippy passes. Complete +item-finish integration, server cooldown packets and full gameplay remain +pending. + + +`item_after_use` composes shared stack copying, item completion, validated +remainder creation and cooldown application. The original stack is copied before +the item handler; remainder, cooldown and count are captured from that copy +before actor callbacks. The original copy reaches cooldown grouping even when +the item handler returns another stack. `use_remainder::convert_with` permits +creation and delivery to share the same mutable world without overlapping +borrows. Templates and component patches support structural value equality. + +`python3 tools/test_item_after_use_parity.py` invokes actual +ItemStack.finishUsingItem and native remainder/template/cooldown implementations. +The [completion report](../benchmarks/rust-item-after-use-2026-10-07/scoped-parity.json) +records **211,804 matching lines per JAR**, including prototype changes, original +copies, empty aliases and mutations/failures at each effect boundary. The +[remainder regression](../benchmarks/rust-item-after-use-2026-10-07/remainder-regression.json) +retains **353,264 matching lines per JAR**. Targeted Clippy passes. Item handlers +and actor extra-item delivery remain controlled; concrete consumables, full +inventory-use binding, contained schemas and complete gameplay remain pending. + + +`extra_items::deliver` connects server-player remainder delivery to actual +inventory pickup. Failed insertion reaches the predicted drop service with the +same remaining stack; successful insertion retains native count consumption and +slot aliases. The drop service represents throwRandomly=false and +Prediction::PREDICTED. + +`python3 tools/test_extra_items_parity.py` composes native item completion, +remainders and cooldowns with inherited ServerPlayer extra-item handling and +real Inventory/PlayerEquipment. The +[delivery report](../benchmarks/rust-extra-items-2026-10-07/scoped-parity.json) +records **272,124 matching lines per JAR**, including full/partially filled +inventories, offhand merging, aliased slots, creative material queries, partial +insertion and callback failures. Targeted Clippy passes. Drop arguments are +verified, but entity spawning remains controlled. Concrete item handlers, full +contained schemas, complete use lifecycle and full gameplay remain pending. + + +`food_properties` implements the food consumption listener with stored FoodData +and native random streams. It captures the actor's random source before the +first sound, updates hunger and saturation for players, then emits the burp +sound using the captured source and current position. + +`python3 tools/test_food_properties_parity.py` compares actual +FoodProperties.onConsume with real FoodData and both native random generators. +The [food listener report](../benchmarks/rust-food-properties-2026-10-07/scoped-parity.json) +records **70,632 matching lines per JAR**, including player/non-player actors, +sound arguments, subsequent random state, changed food stores and positions, +and callback mutation/failure prefixes. Targeted Clippy passes. Sound playback, +complete consumable dispatch, particles/effects and full gameplay integration +remain pending. + + +`item_particles` emits eating particles from one retained ItemStackTemplate. +Each iteration reads the actor's direct random field and current rotations; +eye-height and level callbacks preserve native evaluation order. Component +mutations after capture do not alter the particle template. + +`python3 tools/test_item_particles_parity.py` compares inherited +LivingEntity.spawnItemParticles with real templates and both native random +generators. The +[particle report](../benchmarks/rust-item-particles-2026-10-07/scoped-parity.json) +records **143,167 matching lines per JAR**, including exact position/velocity +bits, empty stacks, negative particle counts, snapshot identity, float edge +cases, random-source replacement and callback mutation/failure prefixes. +Targeted Clippy passes. The fixture uses scalar damage component patches and +controlled particle delivery; renderer enqueue, full consumable dispatch and +complete gameplay remain pending. + + +`consumable` supplies consumption timing and particle/sound dispatch. Both +eating and drinking pitch draws occur for every animation before particle +callbacks. Sound overrides run afterward; volume and pitch retain their +previously drawn values. Particle emission may use a different actor random +source from the one supplied for sound selection. + +`python3 tools/test_consumable_emission_parity.py` composes actual Consumable +emission with inherited LivingEntity particles and real item templates. The +[consumable emission report](../benchmarks/rust-consumable-emission-2026-10-07/scoped-parity.json) +records **124,732 matching lines per JAR**, covering all animations, timing +overflow and float edges, random-source aliases, optional particles, sound +overrides and callback mutation/failure prefixes. Targeted Clippy passes. Sound +playback, rendering, consumable completion/effects and full gameplay remain +pending. + + +`consumable` now also runs eligibility, immediate/timed start and completion. +Completion captures its random source before emission, selects the current item +for server statistics, dispatches live component listeners, then runs server +effects, the game event and finite-material stack shrink in native order. The +same input stack is returned even when callbacks empty it. Timed starts return +CONSUME without a transformed stack; immediate starts return that stack. + +`python3 tools/test_consumable_parity.py` compares actual Consumable methods +with concrete FoodProperties/FoodData, inherited particles, shared stacks and +both native random generators. The +[consumption report](../benchmarks/rust-consumable-2026-10-07/scoped-parity.json) +records **246,033 matching lines per JAR**, covering player/non-player/server +branches, food component changes, stat item selection, empty advancement trigger +storage, client/server effects, game events, creative material queries and +mutation/failure prefixes. Targeted Clippy passes. Eligibility and start-use +callbacks, statistics, effect bodies and event delivery remain controlled; +listener enumeration here binds the ordinary food schema. Full advancement +evaluation, potion effects, entity/world lifecycle integration and playable +gameplay remain pending. + + +`status_effect` stores shared MobEffectInstance identity, scalar details, hidden +chains and blend state. Native copies retain scalar details while omitting hidden +effects and resetting blend state. Stronger/longer effect updates preserve +hidden-chain aliases and native change flags. Duration mapping skips zero and +infinite durations; scaling uses the pinned version's floor and narrowing rules. + +`python3 tools/test_status_effect_parity.py` compares actual constructors, +copy/update operations, duration mapping/scaling, equality and blend copying. +The [status storage report](../benchmarks/rust-status-effect-2026-10-07/scoped-parity.json) +records **655,643 matching lines per JAR**, covering constructor clamping, raw +amplifiers, shared hidden chains, negative/overflow/infinite durations, float +edges and mapper mutation/failure behavior. Equality excludes hidden and blend +state as in vanilla. Mismatched-holder warning logs are outside the comparison. +Server/client ticking, concrete effect behavior, registries and full entity +integration remain pending. + + +`consume_effect` implements apply-status, remove-status, clear-status and sound +consumption effects. Applying status effects draws probability even for an empty +list, creates fresh native-style instance copies and visits every entry without +short-circuiting on success. Removal preserves holder order and duplicates; +sound playback captures block position before querying the actor's category. + +`python3 tools/test_consume_effect_parity.py` compares the four actual native +consume-effect classes with real effect instances and random generators. The +[consume-effect report](../benchmarks/rust-consume-effect-2026-10-07/scoped-parity.json) +records **184,437 matching lines per JAR**, including NaN/probability edges, +copy identity/details, hidden/blend resets, shared input mutation, return-value +aggregation, sound arguments and callback failure prefixes. Targeted Clippy +passes. Actor status add/remove/clear and sound delivery remain controlled; +named holder-set rebinding, teleport consumption and full gameplay integration +remain pending. + + +`teleport_consume` implements random-teleport consumption, including the +16-attempt limit, coordinate/random evaluation order, logical-height bounds, +dismounting and post-success effects. Successful teleports emit the game event, +class-specific sound and optional packed directional-particle event before +resetting fall distance and impulse context. + +`python3 tools/test_teleport_consume_parity.py` compares actual +TeleportRandomlyConsumeEffect with both native random generators, ordinary and +fox actor classes, native offset packing and fall/impulse reset bodies. The +[teleport consumption report](../benchmarks/rust-teleport-consume-2026-10-07/scoped-parity.json) +records **282,010 matching lines per JAR**, including exact candidates and +subsequent random state, height overflow, float edges, attempt exhaustion, +captured/live positions and callback mutation/failure prefixes. Targeted Clippy +passes. Destination validation and teleporting, passenger links and world event +delivery remain controlled services; full gameplay integration remains pending. + + +`status_effect` also implements server/client ticking and client blend updates. +Hidden instances count down with their parent. When the active duration reaches +zero, the hidden details are restored before the server downgrade callback. +Infinite effects use the actor's tick count for scheduling. Blend updates retain +native callback/read ordering, duration-dependent steps and interpolation. + +`python3 tools/test_status_tick_parity.py` compares actual MobEffectInstance +ticks, skipBlending and getBlendFactor with controlled MobEffect callbacks. The +[status tick report](../benchmarks/rust-status-tick-2026-10-07/scoped-parity.json) +records **412,552 matching lines per JAR**, including shared hidden chains, +zero/negative/infinite durations, raw amplifiers, early application failures, +downgrade notifications, blend float edge cases, removed actors and callback +mutation/failure prefixes. Targeted Clippy passes. Registered effect behaviors, +entity effect maps, UI rendering and full gameplay remain pending. + + +`java_hash_map` now supports non-comparable keys, unequal keys whose comparable +ordering returns zero, and the native map-copy constructor. Lookup searches +ambiguous tree branches; tree insertion uses class/identity tie-breaking. Copies +size their table from the source count before insertion, retaining shared values +while allowing the resulting bucket order to differ. + +`python3 tools/test_java_identity_map_parity.py` compares actual JDK 25 HashMap +operations and copies across mixed key classes. Each Java process exports its +actual identity hashes for Rust to use in that same scenario. The +[identity/copy report](../benchmarks/rust-java-identity-map-2026-10-07/scoped-parity.json) +records **577,200 matching lines per classpath run**. The +[ordered-key regression](../benchmarks/rust-java-identity-map-2026-10-07/ordered-map-regression.json) +retains **601,084 matching lines**, and the +[cooldown regression](../benchmarks/rust-java-identity-map-2026-10-07/cooldown-regression.json) +retains **167,906 matching lines per JAR**. Targeted Clippy passes. Map-only runs +use the same installed JDK; these comparisons do not assert gameplay parity or +equal identity hashes across processes. Keys must have pure operations; null +keys and other unexposed Map APIs remain outside this storage subset. + +`PlayerAttributeHealth`, `ServerPlayerDamage` and `ServerPlayerCombat` can now +borrow `LiveAttributes`, the same storage used by the resident moving player, +as well as `EntityAttributes`. Health limits and armor queries use the borrowed +store; equipment damage callbacks can update it before damage reduction reads +armor and toughness. Player absorption retains synchronized float storage. + +The [live player combat comparison](../benchmarks/rust-live-player-combat-2026-10-07/scoped-parity.json) +runs the identical corpus through both stores and matches 1,176,994 output lines +against each pinned Java reference. It covers repeated hits, cooldowns, health +and absorption writes, exhaustion, numeric edges, armor mutation during a hit +and callback failures. Equipment, attribution, death services and other world +consumers retain the controlled boundaries documented in the report. Connecting +this binding to the resident client landing consumer remains the next step. diff --git a/docs/compact-headers.md b/docs/compact-headers.md index f9601c5e0..932d90a0a 100644 --- a/docs/compact-headers.md +++ b/docs/compact-headers.md @@ -52,7 +52,7 @@ measurements yielded the same medians: | Plain `Object` | 16 | 8 | [Raw platform results](../benchmarks/object-headers-2026-10-03) come from -[CI run 37153955462](https://github.com/ludovic111/minecraft-optimization-lab/actions/runs/37153955462). +[CI run 37153955462](https://github.com/ludovic111/Horizon/actions/runs/37153955462). Each platform has nine measured batches per type/mode across three JVM forks. The hosted ARM Mac has three logical CPUs and is not the user's M2 Pro. diff --git a/docs/debounce-queue.md b/docs/debounce-queue.md index 1707957f3..a22760e0c 100644 --- a/docs/debounce-queue.md +++ b/docs/debounce-queue.md @@ -59,7 +59,7 @@ Hosted medians and nearest-rank p95 over 20 measured trials: The upstream Mac maximum was 108.892 ms; its requested 50 ms sleep overshot. The wakeable Mac maximum also shows scheduler variability. The hosted ARM Mac has three logical CPUs and is not the user's M2 Pro. [Raw trials](../benchmarks/idle-queue-2026-10-03) -are from [CI run 37155695460](https://github.com/ludovic111/minecraft-optimization-lab/actions/runs/37155695460). +are from [CI run 37155695460](https://github.com/ludovic111/Horizon/actions/runs/37155695460). This isolates idle wakeup, including enqueue/pop overhead. It does not simulate the existing 250 ms debounce, preprocessing, chunk generation, meshing, network diff --git a/docs/density-functions.md b/docs/density-functions.md new file mode 100644 index 000000000..5357abeb3 --- /dev/null +++ b/docs/density-functions.md @@ -0,0 +1,502 @@ +# Compiled density evaluation + +Horizon targets the repository-pinned Minecraft Java Edition **26.3**. The +`horizon_core::density` module implements selected compiled samplers and an initial +integrated graph compiler. Complete graph coverage and terrain generation remain pending. + +Implemented samplers: + +- Constants, including signed zero and nonfinite values. +- Context-bound blend alpha, blend offset and structure density; blend-density wrappers. +- Axis gradients with clamped, repeating and mirrored repeating coordinates. +- Unshifted noise and both XZ and XYZ shifted-noise specializations. +- Shift, shift-A and shift-B offset noise; old blended terrain noise; outer End + island density. +- Euclidean, squared Euclidean, Manhattan and Chebyshev distance metrics and + distance-to-point evaluation. +- X/Y/Z coordinate slices and the combined XZ bulk specialization. +- Coarse-grid interpolation with positive horizontal and vertical cell sizes. +- Surface-height searches and their compiled horizontal slice. +- Nested cubic splines, lazy coordinate evaluation and spline range analysis. +- Absolute value, negation, square, cube, square root, logarithm, reciprocal, sign, squeeze + and leaky ReLU. +- Floor, nearest, ceiling and truncation to integer or sampled multiples. +- Addition, subtraction, multiplication, division, minimum and maximum, including + their constant-operand specializations; clamping. +- Powers with general, constant-base and constant-exponent samplers. +- Range choice with general or constant branches, and linear interpolation with + general or constant endpoints; single- and multi-threshold interval selection. + +Immutable samplers share children and noise sources through `Arc`. A worker owns +its `SamplerContext`, which retains temporary vectors for nested bulk evaluation +and returns them on typed errors. `clear_scratch` releases the retained buffers. +This avoids allocating a temporary vector for each repeated evaluation after +warm-up; no whole-game performance improvement has been measured. + +## World fields and references + +`WorldFields` stores immutable sampler bindings for blend alpha, blend offset and +structure density, plus an optional `DensityBlender` provider. A worker attaches +these with `SamplerContext::with_world_fields`; changing them clears its cached +densities. Context-bound samplers resolve the binding on each scalar or bulk call +and delegate with the same context. Missing bindings use constants 1, 0 and 0, +respectively, including constant bulk tail writes. Custom fallbacks are supported. +Declared metadata remains independent of the bindings: alpha has range `[0,1]`, +offset and structure density have infinite ranges, and their axis masks are X/Z, +X/Z and X/Y/Z. Uniform-axis rewriting follows that metadata even for synthetic +bindings which vary along omitted axes. + +`BlendDensitySampler` evaluates its input first. Absent or empty providers return +that result unchanged; other providers transform the logical volume in Z/X/Y +order while preserving the input's tail writes. Graph range and axes come solely +from the input. Differential checks cover absent and actual vanilla EMPTY Blender +contexts. Provider delegation/order tests do **not** validate the still missing +nonempty old-world blending algorithm or structure-density producer. + +Direct reference holders compare by their value; registered holders compare by +holder identity. `register_function` creates an immutable named holder and +`function` retrieves it. Raw compilation delegates through its value. Optimization +inlines one holder layer before detecting cache nodes, preserving vanilla's +ordering and nested-wrapper behavior. A holder whose child changes during +rewriting is replaced by that child directly. These choices affect constant +specializations and cache allocation, and are checked against actual vanilla +holder records, named registries and the compiler. + +## Graph compilation + +`density::graph` defines immutable constants, gradients, eleven unary operations, +six binary operations, powers, rounding, clamps, range choices, lerps, interval selection, +distance-to-point, slices, caches, interpolation, surface searches, nested splines, +registered normal/shifted noise, offset noise, old blended noise and outer End +island density, context-bound world fields, blend-density wrappers and direct/named +reference holders. +Definitions reference earlier nodes in the same graph; +construction rejects nesting beyond 256 nodes. For ordinary float fields, +structural interning distinguishes signed zeros and canonicalizes NaN payloads, +matching Java record equality. +Precompiled input bindings carry caller-supplied ranges and axis dependencies; +the compiler trusts this metadata. Bindings have distinct identities. + +`DensityCompiler::get_sampler` prepares shared caches, slices uniform axes, then +compiles and memoizes the root. Cache IDs belong to that compiler: worker contexts +must not reuse cache cells across compiler instances. Failed preparation consumes +its allocated ID and retains any successfully prepared children; retrying a failed +root does not return a cached failure. `compile_raw` bypasses rewriting and rejects +unprepared cache definitions. + +Compilation integrates range propagation with min/max specialization and scalar +short-circuit bounds. Strictly disjoint min/max ranges can eliminate a sampler, +but both children compile before that decision. Touching ranges retain the branch. +Literal operands select dedicated arithmetic paths, including reciprocal +multiplication for a literal right-hand divisor. These choices affect float bits, +child evaluation and buffer tails. Uniform-axis rewriting introduces zero slices +in X/Z/Y order, combines adjacent X/Z slices, and reduces child volumes while +retaining coordinate strides. + +The differential suite compares these passes with vanilla's actual +`DensityFunctionCompiler` across 368 independent unseeded graphs, 64 mixed seeded +graphs and six seeded failure cases, with 18,282 successful root compilation +requests. It checks declared ranges and axes, structural equality, cache-ID counts, +memoized sampler identity, failure state, scalar/bulk values and child call counts. +Some bound inputs deliberately use synthetic metadata to exercise compiler +decisions; those cases do not validate terrain metadata or seeded terrain output. +Serialized codecs, concrete world-field producers and complete terrain integration +remain pending. + +`DensityCompiler::new_seeded` fixes the world seed and random algorithm for the +compiler's lifetime. Registered noise definitions use canonical namespaced registry +identifiers; duplicate names are rejected. Ordinary noise instances reuse a sampler +created from the world positional factory and the identifier's hash. The +`minecraft:nether/temperature` and `minecraft:nether/vegetation` keys bypass that +map and create legacy Nether biome samplers from the world seed and seed plus one, +respectively. The addition wraps as Java `long`. `get_noise_sampler` exposes this +lookup for callers needing the same registered sources. + +Old blended terrain noise uses the world seed directly in legacy mode and the +positional `minecraft:terrain` stream in modern mode. Noise compilation retains +literal positive-zero tests when choosing unshifted, XZ and XYZ implementations; +negative-zero shifts retain the shifted path. Shift functions compile in X/Z/Y +order, while the XYZ sampler evaluates them in X/Y/Z order. Declared noise ranges +come from their registered definitions; axis dependencies combine nonzero scales +with all shift functions. + +The seeded oracle constructs vanilla's actual `RandomState` with a frozen test +noise registry, then uses its compiler and compile context. Constructor-only +material inputs use zero-noise fixtures; this does not validate material rules or +surface generation. The corpus includes extreme signed seeds, both algorithms, +instance identity, special Nether failures, offsets, blended noise and mixed +cached/interpolated/spline graphs. The graph API still expects registered, +canonical identifiers. The [world-generation codec suite](world-generation.md) +now loads and compares all bundled noise and density registry definitions against +the actual registry-aware codecs. Complete chunk generation remains pending. + +`EndIslandSampler` uses a legacy stream initialized directly from the world seed, +regardless of the world noise algorithm. It discards 17,292 random draws before +constructing simplex noise with skipped offsets. The island search retains +vanilla's strict noise threshold, float arithmetic, integer wrapping and division +toward zero for negative coordinates. Its declared range is `[-0.84375, 0.5625]`, +and its dependency mask is X/Z. Bulk sampling computes each horizontal column +once, repeats the result over Y and preserves the output tail. The center island +is supplied by the surrounding terrain graph; this source supplies outer islands. + +Spline coordinates can reference graph functions directly through +`CubicSpline<FunctionId>`. Graph rewriting visits parent coordinates before nested +values, retaining repeated coordinate occurrences and point order. Compilation +shares structurally identical coordinate inputs, validates each unique coordinate +range immediately after compiling it, and then creates the existing spline +sampler. Graph range analysis remains lazy: a NaI coordinate can stop range lookup +before visiting a nested value even when compilation later rejects that value's +coordinate. Errors follow their respective traversal paths. Spline point arrays +use Java's bit-based equality, including canonical NaNs and distinct signed zeros. +The graph nesting bound includes paths through nested spline values and coordinate +definitions. + +Interval-selection definitions retain threshold order, duplicates and nonfinite +values. Their declared range covers all branches without asking for the selector's +range; their axis dependencies include both the selector and every branch. The +Rust definition API requires one more branch than thresholds and limits the list +to 256 branches. The JSON decoder separately requires ordered thresholds and a +minimum of two branches. Its ordering retains Java's float comparator, including +distinct signed zeros; equal consecutive thresholds are allowed. +Threshold lists retain vanilla's separate equality and hashing rules: opposite +zeros compare equal but hash differently; separate lists containing NaN compare +unequal. Thresholds use an immutable `Arc` so rewritten definitions preserve list +identity. Interning tracks equality classes and signed-zero hash differences, +including cancellation through parent definitions. `DensityGraph::java_equals` +exposes equality separately from interned IDs and compiler cache reuse. +Distance-to-point definitions declare all three axes and `[0, infinity]`, and +compile to the checked wrapping-coordinate metric sampler. + +## Scalar and bulk behavior + +Power graphs compile both children in base/exponent order before selecting a +specialization. A literal base takes precedence over a literal exponent. Otherwise, +literal exponents with absolute values one half, one, two or three select square +root, identity, square or cube. Negative exponents wrap those specialized samplers +in a reciprocal. Other exponents return directly from the fallback power sampler, +which uses the original signed exponent. These paths retain distinct float +arithmetic and signed-zero behavior. +General samplers evaluate both operands without zero/one shortcuts and retain +base writes if exponent evaluation fails. Constant-operand bulk samplers also +transform buffer tails. + +`RoundSampler` implements floor, nearest, ceiling and truncation to integer or +sampled multiples. Nearest uses Java's float-to-int rounding: ties go toward +positive infinity, NaNs become zero, and extreme values saturate to the signed +32-bit integer domain before conversion back to float. Floor, ceiling and +truncation retain nonfinite float values. A zero multiple returns the input, +preserving its signed zero and NaN behavior; the multiple still evaluates after +the input. Other multiples use float division, integer rounding and float +multiplication in that order. + +Only a literal-one graph multiple selects the integer specialization. It modifies +the input buffer, including its tail. A sampled multiple uses a volume-sized +temporary after the input and requires an exactly volume-sized output through +this Rust API. Failure in the multiple leaves input writes visible. Range +propagation evaluates the multiple's range first, divides the input range, maps +the rounding operation over the endpoints and multiplies by the multiple range. + +All densities are `f32`; noise coordinates and scales are `f64`. Gradient +coordinate arithmetic wraps as Java `int`, including overflow of the endpoint +difference and `MIN / -1`. Repeating gradients use floor division, not truncation. +A zero repeating period returns a typed error at evaluation time. Clamped +zero-width gradients retain the reference floating-point behavior. + +Scalar and bulk evaluation deliberately remain separate. Unshifted noise bulk +sampling calls the noise source's bulk kernel, whose arithmetic can differ from +scalar Perlin evaluation. Shifted noise evaluates child volumes first and then +samples its source using those values. XYZ evaluates shifts in X, Y, Z order; +XZ omits the Y addition entirely. Inserting a synthetic zero would change signed +zero behavior. + +Scalar multiplication and division return positive zero without evaluating the +right child when the left child is zero. Scalar minimum and maximum can skip the +right child using their supplied compiled range bounds. Bulk binary operations +evaluate both child volumes. Bulk minimum and maximum replace a value only on a +strict comparison; their handling of NaNs and equal signed zeros therefore differs +from scalar `Math.min` and `Math.max`. Constant-operand min/max retain that same +scalar/bulk distinction. Constant multiplication and division do not inherit the +generic scalar zero shortcut. + +Range choice samples its selector first and evaluates only the selected branch +for a scalar query. Bulk range choice evaluates the in-range branch first, then +the selector, then the out-of-range branch, retaining earlier output writes when +a later child fails. Interpolation evaluates only the selected endpoint at alpha +zero or one in scalar queries; bulk interpolation evaluates its dynamic endpoint +volumes before selecting or blending values. Constant endpoints avoid allocating +a scratch vector. Neither path clamps alpha to the unit interval. + +Interval selection preserves threshold order and chooses the first strictly +higher threshold, or the last branch. NaN comparisons fall through. Scalar +queries run only the selected branch; bulk queries evaluate the selector and +then every branch in order before replacing output values. A contiguous scratch +vector holds branch volumes, with an exact-volume slice passed to each child. +The Rust constructor requires one more branch than thresholds and caps the +number of branches at 256. The JSON decoder validates threshold order; it does +not sort the list. + +A slice's length is its logical density-buffer size. Constants fill that whole +slice. Unshifted noise clears it before accumulation. Gradients overwrite only +the volume's cells; shifted noise retains whatever its X child wrote outside the +volume. Unary operators transform the whole logical buffer after their child +returns. Binary, general range-choice, interval selection and interpolation bulk evaluation require exactly a volume-sized buffer, +matching the valid size of its temporary right-hand buffer. Horizon rejects an +oversized multi-input output before evaluating children; Java's accidental reads beyond +the temporary array and backing-pool capacity are outside this bounded API. +Short buffers are always rejected before writes. Errors from evaluated children +retain earlier writes, and scratch storage is returned for reuse. + +## Coordinate slicing + +`SliceSampler` fixes an X, Y or Z coordinate, or both X and Z. Scalar requests +replace those coordinates before calling the child. Bulk requests sample a +reduced volume once, then copy its samples into the repeated columns or planes. +The reduced descriptor retains the original steps on all axes, including fixed +axes, so cached children see the same descriptor as vanilla. Expansion uses +column copies or fills and does not repeat child sampling. + +When every fixed axis already has size one and the requested minimum coordinate, +the sampler passes the original output directly to its child. This distinction +preserves child writes outside the volume and partial writes on errors. Otherwise +the child receives scratch storage; its failure leaves the caller's output +untouched, and successful expansion writes only the volume's cells. Graph-level +slice insertion and combining adjacent X/Z slice definitions remain compiler work. +The corpus checks all four compiled forms, nested slices, cached children, +unchanged and reduced volumes, call counts, buffer tails and integer boundaries. + +## Grid interpolation + +`InterpolatedSampler` accepts positive XZ and Y cell sizes. A scalar request at +an exact grid point delegates to the child's scalar method. Other points sample +a `2 × 2 × 2` corner volume through the child's bulk method, then interpolate X, +Y and Z in that order. Negative positions use floor division and remainders; +corner coordinates retain Java integer wrapping. + +An aligned bulk volume whose steps equal the cell sizes delegates directly to +the child; size-one axes may have other steps. Other volumes sample a coarse +grid covering the requested block extent. The bulk path blends Z, then X, and +advances each Y column through repeated float additions. Scalar interpolation +uses division for its fractions; bulk interpolation uses precomputed reciprocal +multiplication. These differences can change low bits even with simple linear +input and are retained intentionally. End corners are clamped to the last coarse +sample when the output ends exactly on a grid point. + +For strided output, vanilla first evaluates a full block-resolution volume with +sizes equal to output sizes times steps, then selects the strided cells. Horizon +preserves that extent, including trailing blocks, the child's volume descriptor, +and the repeated-addition rounding. Scratch vectors are retained in the context. +The interpolating paths write only volume cells; direct delegation retains the +child's tail behavior. A failed coarse-grid child leaves the caller unchanged. +Invalid derived volumes are rejected through the bounded volume API; accidental +Java array behavior for overflowing or unallocatable extents is outside this +scope. The JSON decoder loads interpolation nodes with positive cell sizes. +Automatic insertion by the chunk-generation pipeline remains pending. + +## Surface-height search + +`FindTopSurfaceSampler` evaluates its upper bound, rounds it downward onto the +cell-height grid using the pinned float-to-integer floor behavior, then samples +density at descending grid heights. It returns the first strictly positive +sample, or the lower bound. Zero and NaN densities do not stop the search. When +the aligned upper height is at or below the lower bound, it returns immediately +without sampling density, including at the equal-height boundary. + +`compile_surface_search` adds the Y=0 slice used by vanilla's function compiler. +This forces the upper bound to be evaluated at Y=0 and repeats horizontal results +through the requested volume. The raw sampler accepts only one Y layer for bulk +requests. It first samples all upper bounds into the output, then searches columns +in Z/X order, replacing each successful result. A later child failure preserves +earlier results and the remaining upper-bound values. The surrounding slice can +instead isolate those partial writes in scratch storage. + +The constructor requires positive cell height. Manually constructed searches +whose descending height overflows return a typed error; wrapped nonterminating +searches are outside this bounded API. The differential corpus covers ordinary +finite bounds, exceptional float bounds with immediate crossings, grid alignment, +Y slicing, invalid multi-layer raw calls, cached children, NaN/zero crossings, +short circuits, buffer tails and child failures. + +## Cubic splines + +`CubicSpline` represents a constant or an immutable set of points. Each point has +a location, derivative and nested spline value. `SplineSampler::new` resolves +coordinate IDs against a density-sampler table and assigns compact local IDs in +parent-first traversal order. Repeated IDs share one coordinate cache. Structural +deduplication of equivalent density definitions remains graph-compiler work. + +Evaluation retains vanilla's binary interval search, including behavior for +manually supplied equal, unsorted or NaN locations. An endpoint extends linearly; +a zero derivative returns the endpoint value without multiplying a possibly +nonfinite coordinate. Interior evaluation samples the left nested value before +the right, then performs the float cubic correction in the reference order. +A constant NaN may occur as a nested value, but vanilla rejects it as the root of +a compiled constant sampler; Horizon preserves that distinction. + +Scalar queries compute coordinates lazily and retain non-NaN values for the +remainder of that query. NaN results are queried again when the same coordinate +is needed. Bulk evaluation walks output cells, evaluating a coordinate's entire +child volume only when a selected branch first needs it. Those buffers remain +available through the call, including NaN cells. Unselected coordinates are not +evaluated. A later lazy child failure retains completed output cells, and Horizon +returns acquired buffers to the context on both success and error. + +Constant roots fill the entire logical output slice. Nonconstant splines use an +exact-volume output; oversized output would read beyond coordinate buffers in +the reference and is rejected by the bounded Rust API. Spline nesting is bounded +to 256 levels, and empty point lists or unresolved coordinate IDs are rejected. + +Range analysis accepts coordinate ranges from the enclosing graph. It preserves +endpoint extension, child range evaluation order, all-point bounds and the +conservative derivative correction used by vanilla. A NaI coordinate stops +analysis before child ranges are evaluated. Invalid finite/nonfinite arithmetic +returns an interval error; the implementation does not substitute tighter bounds +or a numerically different cubic-extrema calculation. The JSON decoder loads +nested spline graphs, preserves their point order and requires explicit +derivatives. Spline builders and complete terrain integration remain pending. + +## Cached evaluation + +`SamplerContext::cached()` enables context-owned cache cells; the default context +continues to evaluate cache wrappers directly. `CachingDensitySampler` shares +immutable child samplers while keeping cached data in the context. IDs are +bounded to `0..=65535`, and the API rejects recursive evaluation of the same cache +cell. `DensityCompiler` allocates IDs for supported graph definitions. Callers +constructing cache samplers directly must supply consistent IDs themselves. + +A scalar request first checks its last-value cache, using vanilla's packed block +position as the key. This intentionally retains key collisions for coordinates +outside the packed domain. A NaN value is never a last-value hit. Next, a request +may read an exact lattice sample from the cached volume. Off-lattice positions +miss; lookup retains Java's wrapped relative coordinates and extent products. +A volume hit does not update the last scalar key, and replacing a volume does not +invalidate that scalar entry. These details matter because bulk noise can round +differently from a fresh scalar sample. + +A bulk request reuses its cached buffer when every volume descriptor field +matches. Otherwise it evaluates the child into a private retained buffer and +copies to the caller only on success. Vanilla installs that cache entry before +calling the child: a failed child can leave a partially written cached volume +that a later request reads without recomputation. Horizon preserves the writes +and the entry. Unwritten values are initialized to zero; failure comparisons use +a vanilla context with a zero-initializing arena. Unwritten data from vanilla's +global recycling pool is not claimed to match. Cached bulk output must have +exactly the volume's size; invalid lengths are rejected before child evaluation. +`clear_caches()` releases stored values and buffers for context lifecycle use. + +The differential corpus tests enabled and disabled caches, nested nodes, scalar +key collisions, NaN misses, repeated volumes, replacing volumes, on/off-lattice +queries and child failures. Counting wrappers report actual child scalar and +bulk calls as well as output bits, so a correct value produced through the wrong +cache path cannot silently pass the trace comparison. + +## Terrain noise composition + +The offset-noise compilers preserve the pinned version's evaluation paths. Shift +and shift-A use a noise sampler with quarter-scale coordinates followed by a +separate multiplication by four. Shift-A sets the vertical scale to zero. +Shift-B samples `(z / 4, x / 4, 0)` in scalar calls. Its bulk path constructs a +transposed horizontal plane, accumulates noise into that plane with amplitude +four, then repeats each result through its Y column. It leaves the output tail +untouched. These paths are checked with Perlin, simplex, smeared and modern +normal-noise stacks, from both random streams. + +`BlendedNoise` creates the minimum-limit, maximum-limit and main stacks in that +order from the caller's random stream. The two limit stacks contain 16 smeared +layers each; the main stack contains eight. Layers are created from high to low +frequency, retaining the version's double-precision amplitude calculation before +the float conversion. The compiled sampler adds `0.5` to the main result, clamps +it to `[0, 1]`, then interpolates the limit samplers. This composition reuses the +checked scalar/bulk sampler implementations, including their evaluation order. +Its declared range is computed separately from the limit-stack parameters. + +The public `create_blended_fbm` helper also supports first octaves from `-4095` +through zero. It rejects requests outside that work bound before consuming RNG +state. Invalid ranges are rejected at stack build time after layer construction, +matching vanilla's draw consumption within the supported bound. Serialized +parameter restrictions remain integration work; the graph compiler now supplies +the compile context's `terrain` seed lookup. The comparison corpus includes the bundled overworld/nether +and End parameter sets, valid random parameters, nonfinite inputs, constructor +failures, post-construction RNG state, octave metadata and scalar/bulk outputs. + +Distance-to-point evaluation subtracts coordinates as wrapping Java integers +before converting to floats. It retains the reference float arithmetic and +square-root conversion order, rather than using a double-precision hypot. +Metric tests also exercise arbitrary float inputs, including NaNs and infinities. + +## Interval analysis + +`Interval` implements checked exact, symmetric and general bounds; NaI and +infinite ranges; endpoint and interval hulls; addition, subtraction, +multiplication, division, min/max, reciprocal, absolute value, square, sign, +powers, logarithms, clamp, monotonic endpoint mapping and linear interpolation. + +Power propagation handles exact and interval exponents separately, including +signed-zero bases, negative bases with integer exponent bounds, infinite +exponents and NaI endpoint hulls. Negative-base ranges preserve vanilla's +floating-point neighbor checks when probing odd/even integer exponents. +Logarithmic ranges intersect the valid nonnegative domain before endpoint +mapping. A fully negative range becomes NaI. Square-root graph ranges use the +power interval with exponent one half, retaining valid endpoints even when +some input values produce NaN. + +These operations preserve vanilla's special rules. Multiplication treats a zero +bound times infinity as positive zero. The reciprocal of an exact zero interval +is NaI; an interval spanning both sides of zero maps to infinite bounds. Hulls +ignore NaI members unless all members are NaI. Monotonic mapping skips NaI and +otherwise evaluates both endpoints before rejecting a NaN result. It accepts a +caller-supplied transformation; neither implementation proves monotonicity. + +Interpolation range analysis has distinct finite- and infinite-endpoint paths. +It uses range-specific zero products and infinity handling, rather than calling +the scalar density interpolator. Interval construction also canonicalizes a +negative-zero lower bound when the upper bound is one, matching the reference's +cached `[0, 1]` instance. NaI compares equal to itself, and signed-zero endpoints +compare numerically equal. `java_hash_code` exposes vanilla's endpoint-bit hash +separately: implementing Rust `Hash` with that function would violate Rust's +requirement that equal keys have equal hashes for some signed-zero intervals. + +## Validation and limits + +Run `python3 tools/test_density_parity.py` after preparing the pinned artifacts +with `python3 tools/test_rust_parity.py --prepare`. The original Java adapter +instantiates the actual vanilla sampler classes; it does not duplicate their +arithmetic. Both the client and server JARs process the same deterministic corpus +as the release Rust binary. Reference artifacts are checksum-verified, and source +hashes must remain unchanged during a run. Finite outputs and signed zeros are +compared by bits, with NaNs canonicalized. + +The corpus includes all axes and tiling modes, raw floating-point inputs, +nonfinite values, overflowing block coordinates, both RNG streams, Perlin, +simplex and smeared noise, nested shift graphs, repeated bulk evaluations, +logical buffer tails, unary and binary combinations, scalar short circuits, +zero-period failures and partial writes. The runner removes an old success report +before artifact verification, so a failed run cannot retain a stale success. + +The [recorded local comparison](../benchmarks/rust-density-2026-10-05/scoped-parity.json) +matched **15,524,627 output lines per reference JAR**. + +The separate [float-log comparison](../benchmarks/rust-float-log-2026-10-05/scoped-parity.json) +exhaustively matched **all 4,294,967,296 float input bit patterns** for the compiled +scalar logarithm against both JARs on the recorded Linux/JDK runtime. Signed zeros, +subnormals, infinities and NaNs are included; NaN results use Java's canonical +`Float.floatToIntBits` representation. This does not establish double-precision +logarithm parity or other-platform math parity. Reproduce it with: + +```bash +python3 tools/test_float_log_parity.py --exhaustive +``` + +The default command checks 1,048,576 inputs around domain and rounding boundaries +and is configured in CI. The density suite covers bulk composition and graph +range propagation separately. + +Private inputs, output dumps and reference classes remain under +`.local/rust-density-parity/`. Only the metadata report belongs in +`benchmarks/rust-density-2026-10-05/`. Local results are Linux evidence; +configured Windows/macOS CI checks are not a claim that those remote jobs ran. + +Pending work includes remaining graph definitions, serialized graphs, +serialized registries, concrete structure-density and nonempty old-world blending +providers, and full seeded chunk generation. +This suite establishes only the operations and inputs it exercises; +it does not establish whole-game parity or an FPS/render-distance improvement. diff --git a/docs/dispatch-retry.md b/docs/dispatch-retry.md index 62e70865a..0ea8564b1 100644 --- a/docs/dispatch-retry.md +++ b/docs/dispatch-retry.md @@ -56,7 +56,7 @@ earlier patched return produce different caller durations; these measurements describe the rejected-submission path, not normal task throughput. Linux CI runs the applied hooks; Windows and ARM Mac CI compile the fixture and production mod. -In [Linux CI run 37158922187](https://github.com/ludovic111/minecraft-optimization-lab/actions/runs/37158922187), +In [Linux CI run 37158922187](https://github.com/ludovic111/Horizon/actions/runs/37158922187), [the raw fixture result](../benchmarks/dispatch-retry-2026-10-04/linux-applied-hooks.json) reported 216,987,192 caller allocation bytes and 63,790 rejections upstream, versus 103,384 caller bytes and 6 rejections with the hook. Caller wall times were diff --git a/docs/face-visibility.md b/docs/face-visibility.md new file mode 100644 index 000000000..093695af6 --- /dev/null +++ b/docs/face-visibility.md @@ -0,0 +1,41 @@ +# Neighboring model-face visibility + +`horizon-world::block_render::FaceVisibility` decides whether to emit a model +quad with a culling direction beside a neighboring block. It prepares immutable +face geometry from the pinned raw occlusion shapes, shares faces across states, +and caches shape-pair subtraction with bounded memory. The development client +now uses it for resident chunk model meshing, including cross-chunk neighbors. + +The decision preserves the native order: a canonical full neighbor face hides +the quad, block-specific suppression can hide it, canonical empty faces bypass +the shape comparison, and partial faces use `ONLY_FIRST` subtraction. Full +occlusion is computed from geometry, independently of collision or support. + +Block-specific suppression covers every method owner in the pinned registry: +ordinary blocks, same-block glass/ice and powder snow, bars/panes, leaves, +liquids, and mangrove roots. Bars respect the loaded bars tag, facing connections, +and the neighbor's boolean property availability. Leaf suppression is controlled +by the cutout-leaves setting. Liquids compare fluid families, including contained +water in waterlogged neighbors. Mangrove roots suppress vertical internal faces. + +The [native comparison](../benchmarks/rust-face-visibility-2026-10-06/scoped-parity.json) +calls actual `BlockState.skipRendering` and `Block.shouldRenderFace` with pinned +tags bound in both reference JARs. It covers all 35,723 states and 1,286 block +definitions: 1,441,816 ordered state pairs, six directions and two leaf settings +(17,301,792 direction/setting cases). Every overriding family has exhaustive +same-block state pairs; bars and panes also have exhaustive cross-material +connection pairs. Representative and seeded random neighbors exercise partial +occlusion across the rest of the registry. Both references match 2,883,632 output +lines, each containing suppression and visibility masks for all six directions. + +```sh +python3 tools/test_face_visibility_parity.py +cargo clippy --workspace --all-targets --locked -- -D warnings +``` + +The private imports contain raw shape grids, definition flags, class-rule +assignments and tag membership. Rust computes the behavior being compared. +Unknown state IDs produce errors. Native fixture files, reference JARs and traces +stay under ignored `.local/`; only hashed reports are committed. Lighting, +translucent sorting, fluid surfaces, GPU pixels and gameplay remain outside this +comparison. Native macOS and Windows runs are still required. diff --git a/docs/feature-placement.md b/docs/feature-placement.md new file mode 100644 index 000000000..3c65d395a --- /dev/null +++ b/docs/feature-placement.md @@ -0,0 +1,638 @@ +# Feature placement + +Horizon implements eighteen Java Edition **26.3** placement modifiers: count, +square spread, three-axis offset, height range, rarity filtering, random-chance +filtering, fixed positions, random selection among modifiers, heightmap positions, surface-relative +thresholds, water-depth filtering, both noise-based count forms, cuboid placement, +count-on-every-layer scans, predicate filtering, vertical environment scans and biome filtering. + +Placement preserves callback order, duplicate positions, wrapping coordinates, +provider sampling and random draw consumption. Fixed positions are filtered by +the origin's chunk X/Z. Random-choice nesting is bounded to depth 256 and 65,536 +modifier nodes; lists are bounded to 8,192 entries. Consumer failures retain +previous emissions and consumed draws. Probability-range decoding distinguishes +negative zero from positive zero, matching the native codec. + +Run `python3 tools/test_placement_parity.py`. The +[local report](../benchmarks/rust-placement-2026-10-06/scoped-parity.json) records +**1,268,600 matching lines per reference JAR**, across **520 definitions** and +**21,840 seeded fixtures**, with **70,080 requested modification calls** and **17,280 direct count queries**. Actual +`PlacementModifier.CODEC` and modifier callbacks supply the reference results. +The corpus tests both random modes, relative-height overflow, nested choices, +malformed fields, repeated calls, consumers that draw randomness and failures +before or after earlier emissions. + +This suite uses an actual placement context backed by a world proxy with traced synthetic heightmaps. +Additional block predicates, full feature registries, registry integration, +Gaussian providers, encoding and complete generated worlds remain pending. + + +## Modifier chains + +`FeaturePlacer` collects a modifier's outputs before processing its descendants, +preserving sibling order through a reusable pending stack. Actual feature callbacks +share the modifier random stream. Boolean results accumulate without skipping later +placements. An empty chain calls the feature directly. Errors retain pending and +modified-position buffers, matching vanilla when the same placer is used again. + +Run `python3 tools/test_feature_placement_parity.py`. The +[chain report](../benchmarks/rust-feature-placement-2026-10-06/scoped-parity.json) +records **548,461 matching lines per JAR**. Actual native `FeaturePlacer` executes +native modifiers and a synthetic feature sink, comparing emitted positions, +feature results, consumed randomness and repeated calls after failures. This tests +the execution machinery; the separate feature suite below connects it to initial block-writing algorithms. + +Rust bounds chains to 1,024 modifiers and per-call work/pending buffers to 2^20. +Unit tests reject oversized chains before feature calls or random draws and stop +multiplicative count expansion after bounded partial progress. + + +## Heightmap queries + +`PlacementContext` supplies generation bounds, the world minimum and heightmap +queries. These are separate: the world minimum can differ from the generator's +minimum. Heightmap placement emits only above the world minimum. Surface-relative +thresholds use 64-bit sums; water-depth subtraction retains Java integer wrapping. +Queries and emitted positions retain native order, and query errors stop the +current operation without drawing randomness or emitting a replacement position. + +Both suites include ordinary/extreme synthetic heights, all six map types, +distinct world/generator minima, default/reversed threshold ranges and injected +query failures. This validates how modifiers consume heightmaps; connecting +feature generation to complete world regions remains pending. + + +## Noise-based counts + +Noise-based and noise-threshold counts share vanilla's fixed biome-information +simplex noise. They preserve the float noise result before double arithmetic, +ceiling/narrowing behavior and strict threshold comparison. They consume no caller +random draws. `repetitions` exposes counts without expanding position lists. + +Primitive comparisons include extreme ratios, factors, offsets and thresholds, +including count-only queries that can return enormous counts safely. Chain tests +exercise ordinary noise counts together with other modifiers and feature callbacks. +Emitting repeating modifiers remains bounded to 4,096 repetitions in Rust. + + +Cuboid placement samples Y size, then independent X and Z sizes, before emitting +positions in X/Y/Z order. Its extents are inclusive. Edge and interior controls +are independent, and coordinates wrap. The suites cover all four control +combinations, provider variation, maximum decoded extents, consumer failures and +cuboids embedded in modifier chains. + + +## Layered placement + +Count-on-every-layer placement samples its count provider at every loop-condition +check, including the final check. Each attempt draws X/Z offsets, queries the +motion-blocking heightmap and scans down for the requested surface layer. Air +states and exact water/lava blocks count as empty. Bedrock is excluded as ground; +other blocks, including bubble columns, are potential ground. Emissions and count +sampling interleave, sharing the caller's random stream. + +The suites compare traced synthetic strata containing these block kinds, random +count providers, repeated passes and injected height/block/consumer failures. +`LayerBlock` is a query classification supplied by the world; complete block +behavior and region-backed feature generation remain pending. A shared 65,536-step +budget bounds scans, including when world queries supply extreme heights. + + +## Initial block-writing features + +`BasicFeature` implements the void start platform, End islands and the End +arrival platform. The world supplies block reads and mutations; required block +states bind through its registry. The algorithms preserve write order, update +flags, wrapped coordinates, ignored false mutation results and partial effects +when a world operation fails. End-island radius sampling retains native draw order. + +Run `python3 tools/test_basic_feature_parity.py`. The +[feature report](../benchmarks/rust-basic-feature-2026-10-06/scoped-parity.json) +records **1,820,614 matching lines per JAR**. Actual feature codecs and native place +methods operate on a mutable world proxy. Both random modes, multiple seeds, +nearby/far chunks, extreme coordinates, rejected writes, thrown failures and +repeated placements are compared, including complete accumulated stored states. +Native `setBlockAndUpdate` executes its actual default method, exposing its flags. +The suite also composes these features with modifier chains, sharing the mutable +world and random stream and reusing placer buffers after failures. +`place_with_context` gives feature callbacks the same world used by modifiers. + +This covers feature algorithms against a supplied mutation interface. Actual chunk +mutation, neighbor updates, lighting, entities/drops, complete feature registries +and generated worlds remain pending. The End-platform generation path does not +request the separate block-destruction/drop behavior used by portal recreation. + + +## Predicate filters and environment scans + +Logical predicates (`true`, `not`, `all_of`, `any_of`) preserve ordered +short-circuiting, including empty-list identities. Inside-world-bounds predicates +apply wrapping offsets before checking the world's inclusive height bounds. +Their offset codec retains Java's wrapping absolute-value behavior for the +minimum signed integer. These five predicate kinds also work inside filters and +vertical scans; state-dependent predicates remain pending. + +Environment scans check the initial allowed condition before the target, then +move one block at a time. They stop immediately outside build height. A failed +allowed condition after a move still permits the final target test at that +position. The codec limits scans to 1–32 steps; shared work and nesting budgets +also bound directly constructed predicates and scans. + +Both placement suites compare actual native codecs and predicate execution, +traced world-bound queries, short-circuiting, wrapped offsets, invalid directions, +step limits and query failures. Unit tests exercise oversized trees and scans +that would otherwise traverse billions of positions. + + +## Resident feature regions + +`TerrainRegion` routes block reads/writes by signed chunk coordinates and lazily +primes missing heightmaps. It requires consistent vertical bounds and registry +identity across resident chunks. Its placement context supplies generation bounds, +world bounds, heightmaps and layer classifications from those same chunks. +`TerrainFeatureAccess` shares that region with feature algorithms and forwards +all writes and flags to a caller-supplied mutation callback. + +Run `python3 tools/test_feature_region_parity.py`. The +[region report](../benchmarks/rust-feature-region-2026-10-06/scoped-parity.json) +records **28,922,634 matching lines per JAR** across 192 fixtures and 2,304 requested +placements. Actual native features and `FeaturePlacer` operate over a world proxy +backed by nine `ProtoChunk`s per fixture. The comparison includes both heightmap +groups, count/square/heightmap/layered chains, repeated writes, missing neighbors, +rejected writes, failures, update flags, random state, final raw sections and +packed heightmaps. + +The region corpus also runs a composed sequence of configured fill layers over +the same live chunks: water, horizontal logs, air and an out-of-height layer. +This connects block-state decoding, nested feature execution, shared placement +and chunk heightmap updates; the standalone fill-layer suite below covers +integer-property parsing and per-column query ordering in more detail. +Single-block replacement and scattered ore also execute against those resident +chunks, sharing the updated state, heightmaps, failure policy and random stream. + +The reference proxy supplies storage mutation. This verifies the connection +between features, placement queries and resident chunks; actual region write +zones, POIs, block entities, postprocessing, lighting and the full feature registry +remain pending. Unit tests check mixed-registry/bounds rejection, negative chunk +routing, missing-neighbor errors and mutation-callback flag/return handling. + + +## Inline feature composition + +`FeatureDefinition` and `PlacedFeatureDefinition` compose the initial block-writing +features with no-op, sequence, boolean choice, uniform choice, chance-based +choice, weighted-choice and overlay features. Overlays execute every child and +accumulate success. Sequences stop on the first false child. Selectors return the +chosen child's result directly. Child modifiers and features share world state +and randomness; each sequence uses one fresh placer across its children. +Native single-object holder-set shorthand is accepted for sequence/uniform lists. + +Run `python3 tools/test_feature_graph_parity.py`. The +[graph report](../benchmarks/rust-feature-graph-2026-10-06/scoped-parity.json) records +**1,146,057 matching lines per JAR** for actual native feature codecs and nested +placement. Cases include empty/malformed lists, singleton and nested choices, +zero/one probabilities, negative zero, false child results, partial writes, world +failures, repeated calls and top-level modifier chains. + +Decode depth, node count and list size are bounded. Feature/placed-feature visits +and nested modifier-chain execution share a runtime budget. Unit tests cover deep +decoding, large trees and modifier expansion that reaches no leaf features. +Weighted choices retain zero-weight children and return false without random draws +when their total weight is zero. Positive totals preserve the existing bounded +weighted draw algorithm. `OptionalWeightedList` keeps this behavior separate from +the nonempty weighted lists required by integer/height providers. The graph suite +covers empty/zero lists, integer narrowing, invalid/overflowing weights and nested +choices; both provider suites also pass after the shared implementation change. +The resource resolver below adds named holders and tags. Encoders and the full +feature registry remain pending. + + +## Named feature resources + +`FeatureCatalog` stores an immutable resource snapshot and resolves requested +feature or placed-feature roots. Named children, compact singleton holder sets, +mixed named/inline lists and ordered placed-feature tags expand into executable +trees. Resolution preserves numeric JSON fields, validates unselected children +and bounds dependency depth and expanded nodes. Duplicate canonical resource +names, missing dependencies and cycles return errors. + +Run `python3 tools/test_feature_catalog_parity.py`. The +[catalog report](../benchmarks/rust-feature-catalog-2026-10-06/scoped-parity.json) +records **2,528,704 matching lines per JAR** against actual registry-aware holder +codecs, registered feature snapshots and native `TagLoader`. It compares ten +named features, fifteen placed features, five tag files, nested/duplicate references, +optional/required missing tags, namespace shorthand and subsequent execution. +Configured fill layers, single-block replacements and scattered ore bind block-state +metadata through named roots, nested tags and modifier chains. Block-set +predicates execute through filters, ordered volumes and environment scans against +the mutable world, including repeated placement after earlier writes and flowing-water replacement +that changes later fluid-predicate results. + +Empty named tags retain a native distinction from empty inline lists: a sequence +can resolve an empty tag and succeed, an overlay returns false, while a uniform selector resolves it and +then fails its zero-bound random choice. The inline list codecs reject empty +lists during decoding. These cases and their random-state effects are compared. + +The resource API validates requested reachable roots, allowing unused unported +resources to remain in the snapshot. Complete datapack loading, live reloads, +registry ownership/identity semantics and all feature algorithms remain pending. + +## Configured fill layers + +`FeatureBlockBindings` binds block-state JSON against the pinned registry and its +integer-property metadata. `FillLayerFeature` visits 16 by 16 columns in native +X/Z order, queries the world minimum for each column and replaces only air states. +It preserves wrapping coordinates, write flags, ignored false write results and +early termination on world errors. Placement consumes no random draws. + +Run `python3 tools/test_fill_layer_parity.py`. The +[fill-layer report](../benchmarks/rust-fill-layer-2026-10-06/scoped-parity.json) +records **1,305,274 matching lines per JAR**, including codec inputs for all +35,723 pinned states, compact/full states, integer properties, invalid-property +defaults, height bounds, extreme coordinates, rejected writes and injected query, +read and write failures. Both random implementations retain matching subsequent +state. This comparison uses observable mutable storage; complete region effects +and full generated worlds remain pending. + +## Replacement rules + +`RuleTest` implements all ten pinned replacement-rule kinds: constant true, +negation, all/any, block identity, exact block state, block tags, inclusive height +range and the two random block/state matches. Logical rules preserve ordering and +short-circuiting. Random rules draw only after matching identity, including at +zero/one probability; their codecs allow probabilities outside that interval. + +Run `python3 tools/test_rule_test_parity.py`. The +[rule report](../benchmarks/rust-rule-test-2026-10-06/scoped-parity.json) records +**1,890,716 matching lines per JAR**, covering every block/state identity, all +300 bundled block tags, absent and empty-path tags, malformed inputs, reversed +height ranges, nested logic and subsequent draws from both random streams. +Decode depth, node count and list size are bounded, including branching inputs. + +Bindings share immutable sets of state IDs for blocks and resolved tags. +Native tag identifiers permit an empty path, which remains distinct from a +missing field. These predicates do not establish complete ore generation or +structure-processor behavior. + +## Single-block replacement + +`ReplaceBlockFeature` applies ordered rule/state pairs at an origin. It re-reads +the current state for each candidate and stops at the first match, regardless of +whether the write returns true. Empty or unmatched target lists still succeed; +read/write errors stop evaluation with the preceding mutations and RNG state +intact. Target decoding shares the graph's node budget when nested in a feature. + +Run `python3 tools/test_replace_block_parity.py`. The +[replacement report](../benchmarks/rust-replace-block-2026-10-06/scoped-parity.json) +records **303,678 matching lines per JAR** for actual native codecs and placement, +including rule ordering, shared random state, update flags, rejected writes, +partial failures, repeated mutations and invalid unselected targets. + +## Scattered ore + +`ScatteredOreFeature` samples the native attempt count, consumes six float draws +for each offset (including zero spread), rounds with Java's tie behavior and +captures the candidate state once per attempt. Matching target rules then apply +the configured air-exposure probability and ordered directional neighbor checks. +The first accepted target writes with flag 2; a false write result is ignored. + +Run `python3 tools/test_scattered_ore_parity.py`. The +[scattered-ore report](../benchmarks/rust-scattered-ore-2026-10-06/scoped-parity.json) +records **758,484 matching lines per JAR** across 11,544 fixtures and 23,088 +requested placements. Cases include size/discard codec boundaries, empty targets, +solid/mixed worlds, each of the six air-neighbor directions, wrapping positions, +partial failures, rejected writes and both shared random streams. + +Ordinary ore veins use a separate bulk-section mutation path and remain pending. +A private Linux/JDK 25 probe also found 4,935 bit differences among 2,581,112 +double sine/cosine results for sampled ore angles when using Rust platform math. +Those intermediates are not yet validated for vein geometry; no exact double-trig +parity is claimed. +This scoped feature comparison does not establish biome decoration or full +generated-world parity. + +## Bulk section access + +`TerrainBulkAccess` exclusively borrows resident chunks and caches sections by +vanilla's packed section key. Raw reads retain cave/void air even when normal +chunk reads collapse an all-air section to AIR. Outside-height reads return AIR +before resolving a chunk. Raw writes maintain section occupancy but leave chunk +heightmaps untouched; region write permissions remain the caller's responsibility. + +Run `python3 tools/test_bulk_section_parity.py`. The +[bulk report](../benchmarks/rust-bulk-section-2026-10-06/scoped-parity.json) records +**959,640 matching lines per JAR** against actual `BulkSectionAccess` and resident +`ProtoChunk`s. It covers every state, primed/lazy heightmaps, missing chunks, +vertical boundaries, packed-coordinate aliases, cache reset and complete final +section/heightmap data. The exclusive Rust borrow replaces Java's acquire/release +locks within this resident-region API; concurrent section ownership remains pending. + +## Biome feature ordering + +`build_features_per_step` combines ordered biome feature lists using placed-feature +object identities. It assigns encounter indices, orders graph traversal by step +and index, detects cycles and reverses DFS completion order to produce each step's +feature list and identity-to-index mapping. Equal feature payloads remain separate +when their identities differ. Traversal uses an explicit stack and bounded input +work; tests include a 50,000-feature dependency chain. + +Run `python3 tools/test_feature_sort_parity.py`. The +[ordering report](../benchmarks/rust-feature-sort-2026-10-06/scoped-parity.json) +records **411,751 matching lines per JAR** across 3,871 fixtures. Native +`FeatureSorter` receives identity-distinct dummy payloads for synthetic graphs and +the feature lists from all 67 bundled biomes, including shuffled/subset combinations. +Cycles, duplicate references, cross-step reuse, empty steps and index lookups are +compared. Cycle diagnostic minimization/text and complete decoration remain pending. + +## World-generation random streams + +`WorldgenRandom` applies vanilla's legacy bit-sampling interface to legacy or +xoroshiro sources. Longs and doubles retain their multi-draw assembly, bounded +integers retain legacy rejection and each bit request increments a wrapping count. +Reseeding preserves the counter. Forks and positional factories delegate to the +underlying source and return its normal draw behavior through a transparent variant. + +Run `python3 tools/test_worldgen_random_parity.py`. The +[random-adapter report](../benchmarks/rust-worldgen-random-2026-10-06/scoped-parity.json) +records **238,800 matching lines per JAR** for 119,100 operations in 300 fixtures. +It includes one to three nested wrappers, arbitrary signed bit-width shifts, +failed bounds, parent/child streams, positional UTF-16 hashes and decoration, +feature, large-feature, salted and slime-chunk seeds with int/long overflow. +Gaussian sampling, concurrent use and complete chunk decoration remain pending. + +## Biome placement filtering + +`Biome` requires the invocation's top placed feature before querying the biome and +its generation settings. `place_with_biome_check` establishes that context for +the current modifier chain; a nested ordinary placer starts without it. Biome +resolution and membership are supplied by the world. Native membership treats +structurally equal placed-feature copies as equal, while feature ordering uses +object identities. + +Run `python3 tools/test_biome_placement_parity.py`. The +[biome-filter report](../benchmarks/rust-biome-placement-2026-10-06/scoped-parity.json) +records **121,423 matching lines per JAR** for 27,456 requested placements across +9,152 fixtures. Actual `BiomeFilter` and `FeaturePlacer` compare missing roots, +equal copies, different features, ordered queries, nested ordinary placement, +injected failures and repeated calls with retained buffers. Both random sources +are tested directly and through `WorldgenRandom`. Complete registry membership, +biome sampling integration and chunk decoration remain pending. + +## Decoration feature scheduling + +`FeatureDecorationPlan` owns immutable biome generation lists and their globally +ordered step features. It reads the surrounding nine chunks in X-first order, +intersects their resident biomes with the generator's possible-biome set and +executes the sorted union of global feature indices for each step. Each root +receives its decoration/feature seed and a shared placer. False results do not +skip subsequent roots. Errors retain previous work and the current-feature +marker; successful completion clears the marker. + +Run `python3 tools/test_decoration_parity.py`. The +[decoration report](../benchmarks/rust-decoration-2026-10-06/scoped-parity.json) +records **337,398 matching lines per JAR** across 2,188 fixtures and 4,376 requested +decoration calls. Actual `ChunkGenerator.applyBiomeDecoration` runs with +structures disabled, resident `ProtoChunk` biome palettes and traced feature +sinks. All 67 bundled biome feature lists participate. Sparse selections, +excluded biomes, step gaps, cycles, coordinate overflow, biome-check modifiers, +false returns and query/placement/progress failures are compared. Rust bounds +extreme signed chunk neighborhoods and input work explicitly. Structure +decoration, real feature payloads in this suite and full chunk lifecycle remain +pending. + +## Decoration over resident chunks + +`BiomeRegion` connects quart biome sections to seeded block-position biome zoom. +`TerrainRegion::biome_at` checks the selected chunk's generation stage before +reading its biome. Premature reads fail even if raw palette values already exist; +decoration's initial palette collection can still inspect those raw values. + +Run `python3 tools/test_decoration_region_parity.py`. The +[resident decoration report](../benchmarks/rust-decoration-region-2026-10-06/scoped-parity.json) +records **36,173,951 matching lines per JAR** for 240 fixtures and 480 requested +decoration calls. Java's actual decoration entry point places three basic +features, configured fill-layer sequences, replacements and scattered ore into +nine `ProtoChunk`s. Uniform/mixed biome palettes, biome zoom, global scheduling, +feature seeds, biome filters, named biome-set and volume predicates, live +heightmaps, repeated decoration and rejected +or failed writes execute together. Every final raw block and heightmap word is +compared, including EMPTY, BIOMES and TERRAIN stage behavior. Workspace tests, +Clippy and 137 Python tests passed after this integration. + +The world transport supplies storage mutation. Actual `WorldGenRegion` write +zones, retrogen, POIs, block entities, postprocessing, lighting, structures and +the complete noise-to-decoration lifecycle remain pending. + +## Block-state providers + +`BlockStateProvider` supports simple states, weighted states, random blocks, +rotation, property copying, randomized integer properties, three noise-based +providers and rule-based selection. Direct decoding preserves the exclusive choice +between a full state object and a typed provider. Random block choices retain +holder/tag order and duplicates. Empty choices return no optional state, while +ordinary sampling reads the existing world state. Rotation chooses a direction +before sampling its nested provider, changes only compatible axis/facing +properties and preserves other properties. Fixed directions consume no direction +draw. Property copying preserves only compatible property families. Integer +sampling leaves states without the named integer property unchanged without +drawing a value; invalid sampled values fail after consuming the draw. Shared +compact state layouts avoid rebuilding property maps during these transforms. + +Noise providers use independently seeded legacy noise and preserve the native +float/double coordinate conversions. Threshold selection preserves conditional +random draws. Dual noise computes the selected candidate directly: the other +candidates are pure noise queries without random or world side effects. +Rule-based providers evaluate conditions in order, continue after empty optional +results and sample their fallback only after all rules are exhausted. Current +conditions cover true, not, all-of, any-of, world bounds, height ranges, block tags +volume matching and registry-bound block/fluid/biome sets. Height-range predicates reconstruct generation bounds per +evaluation; volume matching visits X, Z, then Y and stops on the first failure. +World adapters supply tag membership and fallible generation-bound queries. The +height-range comparison currently exercises ordinary LevelAccessor bounds; the +WorldGenLevel server/generator lookup branch is not covered by this fixture. + +Interrupted runs can be resumed with `python3 tools/test_state_provider_parity.py --resume`. +The runner verifies source, environment, fixture and compiled-artifact hashes +before reusing completed stages. A changed output is regenerated; changed inputs +require a fresh run without `--resume`. Checkpoints stay under `.local`, and +a parity report is written only after both native comparisons pass. + +Run `python3 tools/test_state_provider_parity.py`. The +[provider report](../benchmarks/rust-state-provider-2026-10-06/scoped-parity.json) +records **257,299,719 matching lines per JAR**, with 356,935 codec inputs +and 79,473,574 requested samples across ten provider kinds. Every pinned state is decoded and tested +under all six fixed rotations; random/nested rotations, both sampling methods, +empty tags, weighted boundaries, fallback query failures and four random-stream +combinations are compared. Every target state is also tested against +representatives of all compatible property values, including cross-block copies +and integer-property boundaries. The native harness verifies that the pinned +property-family signatures are unambiguous; Rust validates the Cartesian state +tables before binding their transitions. Noise cases include all eight bundled +provider definitions, coordinate boundaries, extreme scales, variety +selection and malformed codec inputs. Rule cases cover ordered empty results, +fallbacks, nested rules, bound-query failures and wrapping coordinates. Block-tag +cases cover every tag against all block defaults and the two bundled rule-based +definitions against every state. Volume comparisons include exact read order and +early exits, while Rust-only tests bound pathological nested evaluation work. Workspace +tests, Clippy and 137 Python tests passed at this stage. + +The unobstructed predicate validates its optional integer-vector offset but +ignores it during evaluation, matching the pinned Java implementation. The +comparison checks exact translated unit-block bounds, a null excluded entity, +true/false world results, nested volumes and query failures. + +`BiomePredicateBindings` resolves biome names and holder tags to IDs in the +world's owning registry snapshot. The comparison covers every pinned biome and +every bundled biome tag, empty sets, missing names, query failures and nested +volume/short-circuit conditions. Decoration shares the same `BiomeId` identity. + +`FluidStateTable` derives fluid identity, amount, falling/source flags and own +height from the pinned block descriptors. The harness compares every state, +including falling source water in all eight waterlogged copper grates. Fluid +predicates compare all five fluid kinds, holder lists and every bundled fluid tag +against every block state. This covers contained fluid state, not spreading or +entity interactions. + +`StateProviderCatalog` resolves named holder references from an immutable resource +snapshot. Holder, direct and typed entry points retain their distinct decoding +semantics, including ambiguous state/provider objects. The comparison registers +all eight bundled definitions plus nested fixture resources and checks missing +names, nested references and later random draws. Unused resources are not +evaluated; Rust tests reject reachable cycles, duplicate canonical names and +excessive expansion. Full datapack registry loading/reloading remains separate. + +Recursive provider decoding is bounded to depth 128 and shares a 65,536-node +budget with rules, predicates and integer providers; holder/rule lists are bounded +to 8,192 entries. Additional predicates, complete registry loading, block survival +and complete feature placement remain pending. + +Solid and replaceable predicates now bind immutable property tables to the same +block registry as provider and feature decoding. Their offsets, state reads, +short-circuit composition, empty optional-child fallthrough and read failures +are compared across the entire state registry. Together with the earlier kinds, +**14 block-predicate kinds** are covered in the state-provider report. Full +workspace tests, warning-free Clippy and **139 Python tests** passed at this +integration snapshot. Face support and block survival still need implementation. + +The has-sturdy-face predicate now decodes native directions and bounded offsets, +then delegates the ordered state/support query to its placement world. The +state-provider comparison covers all **35,524 cached states**, six directions, +read failures and composed predicates, bringing the scoped corpus to **15 +predicate kinds**. Dynamic state support is not established by this integration +report; unavailable world behavior remains an explicit query error. Workspace +tests, warning-free Clippy and **140 Python tests** passed at this snapshot. + +Unified block-support dispatch now extends that predicate corpus to all **35,723 +states**, including the **199 dynamic states** with absent block entities and +injected block-entity query failures. The updated provider report covers the +combined path. Shulker animation snapshots are covered separately by the dynamic +support suite; active moving-piston shape generation and block-entity lifecycle +remain outside this integration snapshot. Workspace tests, Clippy and **141 +Python tests** passed. + +The `would_survive` predicate now decodes a candidate block state and bounded +offset, then invokes survival at the translated position without placing it. +Both provider and feature bindings use the shared block-state codec; placement +chains forward the survival query. The refreshed provider report records +**257,299,719 matching lines per JAR**, **356,935 inputs**, **79,473,574 requested +samples** and **16 predicate kinds**. Its survival snapshot now covers all +**51 pinned survival families, 1,286 definitions and 35,723 states**. Behavior +representatives run against the entire neighbor-state registry, with malformed +definitions, wrapped offsets, brightness thresholds, short-circuit conditions, +optional-child fallthrough and query failures. Dynamic support and empty-context +collision use absent block entities in this integration corpus; animated shulker +and active-piston snapshots have separate geometry comparisons. This establishes +the recorded provider/predicate integration, while full block placement, updates +and gameplay remain pending. Workspace tests, warning-free Clippy and the +**147-test Python suite** passed. + + +## Simple-block placement + +`SimpleBlockFeature` combines holder-aware state providers, candidate survival, +precompiled placement transitions and optional scheduled ticks. Ordinary writes +retain native flags and ignore a rejected write's boolean result. Double plants +first check the block above for air or matching replaceable fluid, then copy +waterlogging independently into each half. Pale moss carpet derives side states +from support/collision queries, consumes the world's separate random stream for +its topper and recomputes lower sides after the upper write. Scheduled ticks use +the block actually stored after placement, including rejected writes. + +`FeatureBlockBindings::with_state_providers` binds these operations and provider +resources to the same registry. `FeatureDefinition` and `FeatureCatalog` compose +simple blocks with named holders, selectors, sequences and placement modifiers. +Provider decoding shares the enclosing graph's bounded work/depth budget; compiled +placement tables are shared by immutable reference-counted handles. + +Run `python3 tools/test_simple_block_parity.py` against the pinned JARs. The +[simple-block report](../benchmarks/rust-simple-block-2026-10-06/scoped-parity.json) +records **9,613,872 matching output lines per JAR** across **492,554 fixtures**. +It covers every candidate state, double-plant obstructions, waterlogging, moss +attachment/topper combinations, ordered reads/writes, both random streams, +rejected writes, partial failures, wrapped coordinates and nested composition. +Workspace tests and all-target Clippy passed. Native chunk updates, scheduled tick +execution and complete playable integration remain pending. + + +## Block columns + +`BlockColumnFeature` samples all layer heights before checking space. Its first +obstruction query is one step beyond the origin. It removes excess height from +the base or tip in native order, then evaluates providers while writing the +remaining layers from the original position. Empty optional providers use their +ordinary fallback read; rejected writes still advance the position. A completely +zero-height sample returns false, while obstruction that trims every layer to +zero still returns true. + +The [block-column report](../benchmarks/rust-block-column-2026-10-06/scoped-parity.json) +records **1,204,081 matching lines per JAR** over **64,120 fixtures**. Run +`python3 tools/test_block_column_parity.py` to compare all candidate descriptors, +six directions, both truncation priorities, provider and predicate composition, +wrapped coordinates, codec bounds and partial mutations. This uses the same +feature/catalog integration and mutable-world harness as simple-block placement. +Layer/decode limits and a million-operation runtime budget reject pathological +workloads explicitly; complete resident-world integration remains pending. + + +## Vertical pillars + +The single-block pillar feature checks its replacement predicate, consumes its +continuation draw, and then checks build height before evaluating and writing +each provider state. Its cap runs one step opposite the stopping position, +including when no pillar block was written. Rejected writes still advance the +pillar, and a cap's false result does not make the pillar return false. Named caps +and nested pillars use the same feature catalog and graph work budget. + +Run `python3 tools/test_pillar_parity.py`. The +[pillar report](../benchmarks/rust-pillar-2026-10-06/scoped-parity.json) records +**921,111 matching lines per JAR** across **41,746 fixtures**, including every +candidate descriptor, both vertical directions, continuation boundaries, +signed-zero probability rejection, replacement conditions, cap composition, +failures, rejected writes and random +stream tails. Workspace tests and all-target Clippy passed. Resident world +updates and complete generation/gameplay remain unfinished. + + +## Neighbor-based spreading + +The random-neighbor-spread feature evaluates and writes its origin provider before +sampling attempts or testing replacement. Each attempt samples X, Y and Z offsets +in order, checks replacement, then visits neighbors in native direction order. +Exactly one accepted neighbor allows placement; finding a second stops the scan. +Rejected writes preserve the same subsequent queries and random consumption. + +The [neighbor-spread report](../benchmarks/rust-neighbor-spread-2026-10-06/scoped-parity.json) +records **2,650,856 matching lines per JAR** across **79,580 fixtures**. Run +`python3 tools/test_neighbor_spread_parity.py` to compare all candidate and neighbor +states, all direction masks, bounded integer providers, named/empty holder sets, +mutable repeated attempts, partial failures and nested feature/modifier calls. +Workspace tests and all-target Clippy passed. These feature algorithms still +require complete chunk mutation, neighbor updates and gameplay integration. + +## Additional verified feature algorithms + +The executable feature graph also includes overlay composition, block piles, +disks, block blobs, springs, vines and underwater magma. Their version-specific +reports and remaining integration limits are recorded in [Rust rewrite status](rust-parity.md#overlay-feature-composition). +These comparisons cover ordered world requests; complete world updates and +playable gameplay remain pending. diff --git a/docs/heightmaps.md b/docs/heightmaps.md new file mode 100644 index 000000000..74d28b21c --- /dev/null +++ b/docs/heightmaps.md @@ -0,0 +1,57 @@ +# Heightmaps + +Horizon implements the six heightmap types in the pinned Minecraft Java Edition +**26.3**. Each map stores 256 relative column heights in padded 64-bit words. +World-surface predicates use `isAir`; ocean-floor predicates use the version's +`blocks_motion_in_heightmap` block tag. Motion-blocking maps also include nonempty +fluid states, with the separate no-leaves tag for that variant. + +`HeightmapState` supplies block behavior and tag membership. `HeightmapChunk` +supplies the vertical extent, highest occupied section and block reads. The map +owns its packed data and checks that a supplied chunk has the same bounds. Its +current constructor accepts positive, aligned ranges within the vanilla noise +settings codec domain; zero-height and arbitrary runtime accessors are outside +this bounded API. + +Updates retain the early return for blocks below the top two positions. Removing +a qualifying surface scans downward until another qualifying block is found. +Priming scans X, then Z, then descending Y, sharing each block read across the +selected maps. It skips exact AIR blocks and stops a column when all selected +maps have found a surface. If a column finds nothing, its existing value remains. +This also applies to re-priming after a raw-data length mismatch. + +Raw imports preserve every bit when the word count matches, including padding, +unused slots and values above the build height. Column addressing retains Java's +wrapped `x + z * 16` calculation; invalid final indices return typed errors. The +Rust API does not expose a mutable alias to its internal words. + +Run the differential suite with: + +```sh +python3 tools/test_heightmap_parity.py +``` + +The [local metadata report](../benchmarks/rust-heightmap-2026-10-06/scoped-parity.json) +records **1,671,668 matching output lines per reference JAR**, checked separately +against the authenticated client and server. It covers all **35,723 block states**, +all six predicate and persistence/client flags, and **100 chunk fixtures** with +86,806 state writes, 54,306 column queries, 516 priming calls, 378 raw-data loads +and additional update-only error cases. Selected fixtures compare exact ordered +block reads. Cases include section and vertical bounds, leaves, fluid-bearing +states, air variants, removal rescans, empty-column retention, packed padding, +invalid raw lengths and wrapped column indices. + +Air/fluid facts and state identities are exported independently from each JAR and +required to agree. These are private test inputs, not ports of block behavioral +methods. Rust resolves heightmap tag membership using its tag loader and the +300 bundled block-tag resources. The reference binds those resources to the +actual vanilla block registry and invokes `Heightmap` on `ProtoChunk` instances. +Only in-memory section storage is used; placeholder biome holders do not exercise +biome properties or section codecs. + +Source and fixture changes during a run invalidate its report. Raw resources, +state exports and comparison traces stay under ignored `.local`; the checked-in +report contains metadata and hashes. CI runs this suite on its configured +platforms; the local result does not establish those remote results. Chunk +lifecycle integration, generated terrain, lighting and playable gameplay remain +pending. diff --git a/docs/mac-first-test.md b/docs/mac-first-test.md index e361ac809..e5eaf47cf 100644 --- a/docs/mac-first-test.md +++ b/docs/mac-first-test.md @@ -7,7 +7,7 @@ The Linux software-rendering observations do not predict an M2 speedup. ## Import after installing Prism -1. Download [horizon-mac-starter-0.21.0.zip](https://github.com/ludovic111/minecraft-optimization-lab/releases/download/v0.21.0/horizon-mac-starter-0.21.0.zip) +1. Download [horizon-mac-starter-0.21.0.zip](https://github.com/ludovic111/Horizon/releases/download/v0.21.0/horizon-mac-starter-0.21.0.zip) and extract it in Finder. 2. In Prism, choose **Add Instance > Import**, then select `horizon-m2-balanced-0.21.0.mrpack` from the extracted folder. The individual diff --git a/docs/material-conditions.md b/docs/material-conditions.md new file mode 100644 index 000000000..044d9dd0b --- /dev/null +++ b/docs/material-conditions.md @@ -0,0 +1,88 @@ +# Numeric material conditions + +Horizon evaluates the pinned Java Edition **26.3** hole, steepness, height, +water, stone-depth, vertical-gradient, noise-threshold, biome-membership, temperature +preliminary-surface and negated material conditions. +`MaterialConditions` owns each worker's context and compiled conditions, keeping +cache lifetimes tied to that worker. Column updates invalidate both column and +block conditions; block updates leave column caches intact. Secondary surface +noise is shared and sampled lazily once per column revision. + +Height and layer arithmetic preserves signed integer wrapping. Vertical gradients +resolve anchors during compilation, derive named positional random factories and +preserve the boundary order even with equal or reversed bounds. Stone depth uses +the appropriate floor/ceiling depth and Java's floating-point mapping and casts. +`MaterialSurface` implements the surface input interface used by this worker. + +Run `python3 tools/test_material_condition_parity.py`. The +[local report](../benchmarks/rust-material-condition-2026-10-06/scoped-parity.json) +records **5,627,426 matching output lines per reference JAR** across **245 fixtures**, +**11,288 initially compiled conditions** and **217,969 context operations**. +The original Java transport constructs actual vanilla conditions and calls their +compiled evaluators against actual context updates. Secondary sampler queries +are traced to compare lazy evaluation and cache reuse. Tests include both random +algorithms, integer extremes, nonfinite secondary values, floor/ceiling selection, +reversed gradient bounds, repeated evaluations and late compilation. + +For isolation, the native context's surface depth is supplied after each column +update, and secondary noise comes from a traced constant sampler. Full seeded +surface queries have a [separate comparison](material-surfaces.md). Sources and +fixtures are authenticated, and raw reference artifacts stay under `.local`. + +The comparison also covers **8,609 codec inputs**, all **eight bundled material +condition definitions**, forward/nested references, canonical encoding and numeric +conversions. Immutable registry loading rejects missing/cyclic references and +duplicate canonical names without publishing partial results. + +This scope excludes live biome-tag reloads, registry-owner +validation and arbitrary provider failures. Chunk application has a +[separate comparison](material-surfaces.md#chunk-surface-stage). Runtime trees +are bounded to 256 levels and 8,192 registered conditions per worker; these limits +are explicit resource bounds, not vanilla gameplay claims. + +The same comparison now includes **6,271 initially compiled material rules**: +block results, ordered sequences, conditional rules and seeded terracotta bands. +It checks empty/singleton/nested sequences, first-match short circuiting, late +compilation, band-index failures and separate context/application coordinates. +[Bundled rule loading](material-rule-libraries.md) now integrates these runtime +rules; rule encoding remains pending. + +Noise thresholds share lazy suppliers by canonical noise name and dimension mode. +Column-only suppliers still call the three-coordinate sampler with Y fixed at +zero. The comparison includes all 64 bundled noises under both random algorithms, +traced mutable inputs, repeated updates, late binding and nonfinite thresholds. +`MaterialNoiseSources` supplies lazy named samplers from the world positional +factory. Encoded numeric values are compared as double bits to preserve values +independently of JSON number formatting, including Gson NaN/Infinity output. + +Biome membership and temperature checks use the climate fields of all 67 bundled +biomes. Tests cover possible-biome constant folding, shared biome lookup caches, +column/block updates, null lookups, thrown lookup failures and same-revision +retries that retain earlier condition results. A missing result after a failed +first evaluation remains an error. Worker condition evaluation returns typed errors. + +Named biome-tag conditions resolve all **86 bundled tags** through the tag loader +and retain their tag identity when encoded. Comparisons cover nested references, +optional missing members, duplicate entries, empty tags, namespace aliases, +possible-biome folding and conditional-rule application. Registry snapshots are +immutable; live tag reloads remain pending. + +Preliminary heights use a lazily populated unit-spaced XZ density plane, with +scalar sampling outside it. `MaterialDensitySources` accepts the compiled +preliminary-surface root and its world sampler context. The comparison checks +column minimum caching, Y-only updates, ignored original volume strides, partial +failed fills, retries, floor conversions, infinities/NaN and integer wrapping. +The preliminary plane is bounded to 1,048,576 samples. + +Ore-vein rules accept three compiled density roots. Density and richness fill +the expected chunk volume at compilation; gap sampling stays lazy. Cached +lookups require an exact lattice position. Density queries use the block context; +random choices use application coordinates and the seeded `minecraft:ore` stream. +Tests cover both random algorithms, draw order, repeated calls, independent +coordinates, nonfinite runtime values, raw-ore chances and failed compilation. +Debug ore-vein visualization flags are outside this gameplay scope. + +Material density storage is bounded to 32,768 bindings, 1,048,576 samples per +eager volume and 16,777,216 retained eager samples per context. Bundled rule +decoding has a [separate comparison](material-rule-libraries.md); rule encoding +remains pending. The surface-stage comparison integrates these density bindings. diff --git a/docs/material-rule-libraries.md b/docs/material-rule-libraries.md new file mode 100644 index 000000000..47a434d9f --- /dev/null +++ b/docs/material-rule-libraries.md @@ -0,0 +1,36 @@ +# Material-rule libraries + +`MaterialRuleLibrary` loads the pinned Java Edition **26.3** rule resources against +block-state, condition, noise and density registries. It supports block rules, +ordered sequences, conditional rules, terracotta bands, ore veins and nested named +rule references. Loading is atomic; missing references, cycles and duplicate +canonical names return errors. Limits are 8,192 registered definitions, 65,536 +parsed nodes and 256 nested levels. + +The library owns a density compiler configured for one world seed and random +mode. `rule(name)` resolves a runtime tree and lazily compiles its density roots. +Binding that tree to `MaterialConditions` performs per-chunk density sampling. +`named_density(name)` shares the compiler with preliminary-surface sampling. +`compile_router` and `compile_aquifer` bind configurations decoded into the same +density registry before it is passed to the library. Their samplers share the +material roots' cache namespace, so noise filling and surface application can +reuse a worker context. Workers need matching world random settings and separate +cached sampler contexts. + +Run `python3 tools/test_material_rule_library_parity.py`. The +[local report](../benchmarks/rust-material-rule-library-2026-10-06/scoped-parity.json) +records **678,174 matching output lines per reference JAR**, including **665,712 +rule applications** and **142 codec inputs** across 12 fixtures. The test loads all +**42 bundled rules**, **8 conditions**, **55 densities**, **64 noises**, **67 biome +climates** and **86 biome tags** from both authenticated reference JARs. It also +checks synthetic forward references and constant-density ore rules. + +Comparisons use actual seeded noise and ore densities, strided chunk caches, +scalar fallback, varying biomes/depths/heights, possible-biome sets and distinct +context/application coordinates. Surface depth and secondary noise are supplied +context inputs; preliminary density is zero to isolate rule evaluation. + +The [surface stage](material-surfaces.md#chunk-surface-stage) now applies these +rules to chunks. Rule/density encoding, live reload, registry-owner checks and +playable integration remain pending. The report establishes +this tested scope, not complete vanilla gameplay parity or an FPS improvement. diff --git a/docs/material-surfaces.md b/docs/material-surfaces.md new file mode 100644 index 000000000..2f8ad65b1 --- /dev/null +++ b/docs/material-surfaces.md @@ -0,0 +1,125 @@ +# Seeded material surfaces + +Horizon implements the pinned Java Edition **26.3** material system's terracotta +band generation, band lookup, surface depth and secondary surface-noise query. +These primitives now feed the [chunk surface stage](#chunk-surface-stage). + +`ClayBands` generates all 192 entries from the supplied clay-band random stream. +It preserves orange placement, colored-band widths and overwrites, white/gray +adjacency checks and conditional random draws. `MaterialSurface` derives that +stream from the world's root positional factory using `minecraft:clay_bands`. +Its surface-depth query uses a fresh position-derived random stream. + +Band lookup rounds the float noise offset with Java's tie and saturation rules, +then uses wrapped integer addition and signed remainder. A negative final index +returns `None`, corresponding to vanilla's array-index failure. Surface-depth +arithmetic promotes the sampled float to double before applying coefficients and +truncating to an integer. Secondary noise similarly retains the float-to-double +conversion. + +Run: + +```sh +python3 tools/test_material_surface_parity.py +``` + +The [local report](../benchmarks/rust-material-surface-2026-10-06/scoped-parity.json) +records **122,988 matching output lines per reference JAR**, covering **277 fixtures** +and **5,263 surface-query positions**. The original Java transport invokes actual +`MaterialSystem` methods and its real constructor. Comparisons include both random +algorithms, direct and derived streams, preconsumed random inputs, every band +entry, subsequent random draws, real bundled noise definitions and constant-noise +overrides for rounding boundaries, infinities, NaNs and extreme coordinates. + +Reference artifacts and noise resources are authenticated, source/fixture changes +invalidate the report, and raw inputs/outputs stay private under `.local`. CI +includes this comparison on its configured platforms; the local result does not +establish remote outcomes. Subsequent suites cover rule binding, biome-specific +extensions and chunk surface application. + +[Vertical anchors](vertical-anchors.md), used by material conditions, now have a +separate differential implementation and codec comparison. + +[Numeric material conditions](material-conditions.md) now evaluate surface inputs +with worker-owned caches. [Bundled rule libraries](material-rule-libraries.md) +bind the pinned material definitions and their ore-density samplers. + +## Biome-specific column extensions + +`MaterialExtensions` implements eroded-badlands pillars and frozen-ocean icebergs. +It preserves noise coordinate arithmetic, temperature-dependent melting, seeded +random draw order, repeated column reads and property-independent block identity. +The column provider controls out-of-height reads and write clipping; failed calls +retain earlier writes. Each extension call is bounded to 1,048,576 iterations. + +Run `python3 tools/test_material_extension_parity.py`. The +[local extension report](../benchmarks/rust-material-extension-2026-10-06/scoped-parity.json) +records **233,100 matching lines per JAR** across **410 fixtures** and **3,920 +extension calls**. It compares ordered noise/read/write traces and complete +columns, including both random modes, all 67 biome climates, actual seeded noises, +constant threshold/nonfinite inputs, air/water variants and provider failures. +The chunk surface stage integrates these extensions with heightmaps and fluid +postprocessing. + + +## Chunk surface stage + +`build_surface` traverses columns in vanilla X/Z order and scans down each column, +maintaining stone-depth and water-level counters. It applies bound material rules, +eroded-badlands pillars and frozen-ocean icebergs. Writes update both world-generation +heightmaps and append fluid-postprocessing offsets in order, including duplicates. +Generation bounds clip writes while scans retain the chunk's full height. The +worker returns its density context to the caller on success and typed failure; +previous writes remain visible after failure. + +Run `python3 tools/test_material_stage_parity.py`. The +[local stage report](../benchmarks/rust-material-stage-2026-10-06/scoped-parity.json) +records **6,733,382 matching output lines per reference JAR**, covering **79 fixtures**, +**42 terrain fills**, **42 procedural carving passes**, **106 surface builds** and **21,757,952 block values**. The reference invokes actual +`MaterialSystem.buildSurface` on vanilla `ProtoChunk` instances. Comparisons include +complete sections, packed heightmaps, ordered postprocessing and biome queries. +Fixtures exercise both random modes, the bundled rule registries, real seeded +noises, empty and populated chunks, cavities, nondefault solids, clipped writes, +primed and lazy heightmaps, and repeated builds sharing density contexts. +Generated fixtures run actual `NoiseBasedChunkGenerator.doFill` followed by surface +application on the same native noise chunk. Rust shares a compiler and worker +context across both stages. All seven bundled terrain routers and aquifer +configurations are tested with multiple seeds and distant positive/negative +coordinates, comparing full chunk state before and after surface application. + +Synthetic initial chunks use a supplied block-position biome resolver. Generated +terrain fixtures first generate a 3×3 biome neighborhood through actual +`ChunkGenerator.doCreateBiomes`, using multi-noise presets or the End source. +The comparison checks **378 biome chunks** and **400,896 biome cells**, then +performs seeded `BiomeManager` lookups against those stored neighbor biomes. +Both block and quart lookup traces are compared. Rust imports independently +authenticated preset tables; their builders remain separate work. +Generated fixtures additionally select and run biome carvers across the 17×17 +origin neighborhood, comparing uncached biome queries and the complete terrain +state after procedural carving. They then apply explicit masks twice as a stress +check. See [carving integration](carving.md#biome-selected-neighboring-carvers). +The neighborhood decodes its source JSON through the registry-bound biome-source +catalog and uses the shared resolved-source worker API. Block air/fluid metadata +is imported from both authenticated JARs. Native preset builders, full inline biome +codecs, feature/structure stages, nonempty blending, lighting +and complete generated worlds +remain pending. A separate Rust test verifies that successful builds, eager binding +failures and late biome-provider failures preserve density caches and world fields, +and that late failure retains prior chunk writes and fluid offsets. +CI includes the stage gate; remote results have not been observed. + + +## Surface material beneath carved blocks + +`top_material` binds a fresh one-cell material context at the supplied position, +using clamped neighboring heightmap gradients and one stone block above and below. +Submerged queries set water height to Y+1; dry queries use the vanilla sentinel. +Possible-biome restrictions are omitted, as in vanilla's method. The returned +state is left for the carving stage to apply. Both successful and failed queries +retain the caller's density context; the query itself does not change blocks. + +The surface-stage comparison includes **7,584 top-material queries** against +actual `MaterialSystem.topMaterial`, at column edges and interiors, around sea +level and immediately outside vertical bounds, in both dry and submerged contexts. +The latest combined report records **6,733,382 matching lines per JAR**. Unit tests +also check failure-state retention and the omission of possible-biome shortcuts. diff --git a/docs/native-client.md b/docs/native-client.md new file mode 100644 index 000000000..1bf41b10f --- /dev/null +++ b/docs/native-client.md @@ -0,0 +1,660 @@ +# Horizon native client + +`horizon-client` is the playable Rust client for Minecraft Java Edition 26.3. +It streams a world around the player on worker threads, renders every vanilla +block model with smooth lighting and biome tints, and runs the validated player +physics, health and hunger at 20 ticks per second. You can mine with vanilla +hardness/tool rules, collect drops from the block loot tables, place blocks, +craft in the 2x2 inventory grid or on a crafting table, and save and reload worlds +in vanilla's Anvil format. + +**Status:** playable, about 55% Java parity (see the README table). Worlds use the +Rust port of the vanilla overworld and Nether generators. Chests, furnaces, nine +mob types, fluids, redstone and crop growth run in the client. Multiplayer, the End, +most structures and mobs, and several containers are still missing. See +[Rust rewrite status](rust-parity.md). + +## Run from a checkout + +Use current stable Rust (1.90+), Python 3.10+ and JDK 25. Resource preparation +verifies the pinned game artifacts, runs vanilla's data generator and small +exporters against the reference jars, and extracts the jar's assets and data +into ignored `.local/horizon-client/26.3/`. Sounds come from Mojang's asset +index (about 380 MB). Prepared resources are private; never commit them. + +```sh +python3 tools/prepare_native_client.py --prepare +python3 tools/fetch_sounds.py +cargo run --release -p horizon-client -- --render-distance 12 +``` + +Development builds that link quickly: `cargo build --profile fast -p horizon-client`. + +| Option | Meaning | +| --- | --- | +| `--world NAME` | World folder under `saves/` (default "New World"); reopened if it exists | +| `--seed N` | Seed for a new world (numbers or text, like vanilla) | +| `--creative` | Creative mode (instant breaking, pick block) | +| `--render-distance N` | Chunks, 2..64 (default 12) | +| `--resources PATH` | Prepared resource directory | + +| Control | Action | +| --- | --- | +| Mouse | Look (vanilla default sensitivity) | +| WASD / Space / Left Shift / Left Ctrl | Move, jump, sneak, sprint | +| Left / right click | Break (hold) / place or use; right click opens crafting tables | +| Middle click | Pick block (creative) | +| 1–9, scroll | Select hotbar slot | +| E | Inventory and 2x2 crafting (shift-click to quick-move or craft all) | +| Q / Ctrl+Q | Drop one / drop stack | +| F3 | Debug overlay (position, chunk, light, biome, FPS) | +| Esc | Pause menu (Save and Quit) | + +Worlds autosave every 6000 ticks (5 minutes), when chunks unload and on quit. +On headless Linux use `vscreen start ./target/release/horizon-client` and +`vscreen shot`. + +### Drive the game from scripts (`horizon-ctl`) + +`--control` opens a local Unix socket (`$XDG_RUNTIME_DIR/horizon-control.sock`, +or `--control-socket PATH`). `horizon-ctl` sends it one command per line and +prints one JSON reply per command; the exit status is 1 when the reply holds an +`error`. Under control, losing window focus does not pause the game or release +held keys, so a script can play while you use other windows. + +```sh +cargo build --release -p horizon-client --bins +C=target/release/horizon-ctl +$C launch --world Bench --seed 12345 --render-distance 32 # starts the game, waits for the socket +$C wait-ready # player spawned, no chunks pending +$C look 90 10; $C hold w 2 # face west, walk for two seconds +$C screenshot /tmp/view.png # PNG of the next presented frame +$C bench 10 # avg/1%-low FPS and p50/p95/p99/max frame times +$C quit # save and exit +``` + +Other commands: `status`, `key KEY down|up|tap`, `mouse left|right|middle +down|up|click`, `turn`, `tp X Y Z`, `hotbar N`, `give ITEM [COUNT]`, +`render-distance N`, `time TICKS`, `resume`, `stats [reset]`, `open WORLD [SEED] +[creative]` and `save`; `horizon-ctl help` lists them from the running game. +`horizon-ctl -` reads a script from standard input, where `sleep S` waits locally. +Frame times include waits for presentation, so `bench` reports what is on screen. + +### Play on another of your machines + +Horizon targets Linux on ludodesktop (Ubuntu 26.04, RTX 4080); macOS and Windows +are out of scope. To play on another Linux machine +without Rust, JDK or prepared resources, package a release build where they exist: + +```sh +cargo build --release -p horizon-client +python3 tools/package_native_client.py --out ~/builds/horizon +``` + +The archive holds the binary, the prepared resources and `horizon.sh`. Copy it +to the target machine (same OS and architecture), unpack it and run +`horizon/horizon.sh`; `horizon.sh --install` adds an application menu entry. +Saves and `options.txt` go to `~/.local/share/horizon` (or `$HORIZON_HOME`), so +unpacking an update keeps them. The archive contains Mojang assets: keep it +private. + +## How it fits together + +- `streaming.rs`: worker pool that generates or loads, lights and meshes chunk + columns closest-first; stale results are discarded by sequence number. +- `light.rs`: vanilla sky/block light rules (sky sources down to the first + occluding edge, `max(1, dampening)` falloff) over a 3x3 chunk region. +- `mesher.rs`: blockstate models with neighbour culling, `ModelBlockRenderer` + smooth lighting/ambient occlusion, `BlockTintSources` tints with 5x5 biome + blending, and `FluidRenderer` water/lava surfaces. +- `gfx.rs` + `terrain.wgsl`: camera-relative section rendering with frustum + culling, the vanilla lightmap formula, timeline-driven sky/fog, and + solid/cutout/translucent passes; `entity.wgsl` draws dropped items. +- `environment.rs`: the data-driven day timeline (sky colour, light factor, + celestial angles) sampled with vanilla's keyframe/easing rules. +- `items.rs`, `crafting.rs`: item components from vanilla's reports, tool + mining rules, loot tables and crafting recipes from the data pack. +- `save.rs`: Anvil region files and `level.dat`. + +## Validation + +The client loads a separate, registry-checked collision-shape export alongside +render resources. `SceneCollisions` feeds its actual `TerrainChunk` instances +into registered shape selection, block scanning, world movement resolution and +occupancy checks. The scene has no other entities, block entities or border; +entity-dependent queries report an error until an entity runtime is supplied. +Camera collision uses a position context and disables stepping. The walking +binding uses the current pose bounds, descending input and registered step-height +attribute. Sneaking invokes ledge backoff before collision resolution. The +complete authoritative player tick remains unfinished. + +```sh +python3 tools/prepare_native_client.py +python3 tools/test_native_scene_collision.py +``` + +The [scene collision comparison](../benchmarks/rust-native-scene-collision-2026-10-07/scoped-parity.json) +checks **14,150 movement requests**, each with before/after occupancy queries, +against both pinned reference JARs. Native code independently builds the nine- +and twenty-five-chunk scenes and all sixteen gallery placements. Movement +components compare by exact double bits. Cases include partial blocks, pyramid +ledges, ceilings, initial overlaps, negative and missing chunk boundaries, tiny +and zero movement, and varied step heights. This verifies the scene adapter; +it does not establish player locomotion or complete gameplay parity. + +The movement binding stores a player's position, velocity, pose bounds, +ground/support state, collision flags, movement history and live registered +attributes. `MotionWorld` composes the existing air-travel, jumping, collision, +ground-support, restitution and block-coefficient code over the same scene. +The [stored-motion comparison](../benchmarks/rust-native-scene-motion-2026-10-07/scoped-parity.json) +checks 42,257 operations across 637 evolving scenarios against actual native +`Player.travel`, jumping and movement, using real native attributes and chunks. +It compares every resulting position, velocity and bounding-box component by +exact bits, along with support, climbing and collision state and both separate +velocity/position synchronization flags. + +The dry movement tick additionally binds small-velocity cleanup, float input +damping, held-jump delay and server frost-modifier removal. The expanded +[tick comparison](../benchmarks/rust-native-motion-tick-2026-10-07/scoped-parity.json) +checks 47,393 operations in 847 scenarios against both pinned JARs, including +direct calls to the actual `LivingEntity.aiStep` body. It compares lazy attribute +instance creation, stored base/cache/dirty state, modifier values and permanence, +and pending update/sync membership alongside the motion fields. Queue iteration +order depends on runtime identity hashes and is outside this scene comparison. +The test caught an omission where matching positions concealed a retained +powder-snow modifier and missing attribute notifications; dry ticks now remove +that modifier after travel, as vanilla does. + +The [walking movement comparison](../benchmarks/rust-native-walking-2026-10-07/scene-motion.json) +extends this to 65,893 operations in 947 scenarios, invoking actual +`Player.aiStep` with empty inventory/equipment and no nearby entities. It checks +head yaw, jump-trigger countdown and speed refresh after movement. Prepared +input is supplied at the native virtual input boundary. Separately, the +[local input comparison](../benchmarks/rust-native-walking-2026-10-07/local-input.json) +checks 13,988 cases against actual `KeyboardInput.tick` and +`LocalPlayer.modifyInput`, covering every key combination, diagonal adjustment, +item/riding/sneaking speed gates, signed zero and nonfinite values. This verifies +input arithmetic; the sprint and crouch integration checks below extend it. +The full `LocalPlayer` lifecycle remains unfinished. + +The fixed-rate driver limits work per rendered frame while retaining overdue +ticks. Clock tests cover varied frame schedules and long stalls. The development +focus pause is explicit; no vanilla pause-menu or multiplayer timing is claimed. +The [Linux walking smoke check](../benchmarks/rust-native-walking-2026-10-07/interactive-smoke.json) +enabled F5, landed at ground height 4, walked, jumped, switched modes and exited +with Ctrl+Q. Ground, moved and airborne screenshots were visually inspected; +the run recorded 207 movement ticks and finished grounded without an error. +The [renderer startup check](../benchmarks/rust-native-walking-2026-10-07/startup-smoke.json) +also passes after the movement integration. + +```sh +python3 tools/prepare_native_client.py +python3 tools/test_native_scene_motion.py +python3 tools/test_local_input_parity.py +``` + +This binding is not yet a complete player tick or input controller. Its current +domain is the dry resident scene with standing/crouching/crawling dimensions, +zero frozen ticks, empty inventory/equipment, and no entity interpolation, +vehicles or status effects. Selected `Player.aiStep` phases are bound; the full tick and local input +lifecycle remain unfinished. +Landing now accumulates and resets the stored fall distance, clears climbing +state on ground, and invokes registered block fall/bounce reactions. The +[composed landing comparison](../benchmarks/rust-native-landing-2026-10-07/scene-motion.json) +checks 73,025 operations in 1,449 scenarios against both pinned JARs. It compares +fall state, impulse exemptions, attributes and ordered damage, statistic, +particle, sound and hit-ground requests alongside the previous motion fields. +Actual native `LivingEntity.checkFallDamage`, registered block methods and +`Player`/`LivingEntity.causeFallDamage` execute in the reference harness. +The cases include hay, honey, slime, powder snow, pointed dripstone, farmland, +turtle eggs and shelf mushrooms, with seeded world randomness. Farmland pushes +the stored player and changes the resident block to dirt; repeated egg changes +preserve hatch state. The resulting block state is checked after each operation. + +The client refreshes its mesh after a resident block revision changes. This is +a complete scene rebuild for now, with no performance improvement claimed. +Damage requests are counted in runtime reports, and the health binding described +below applies them synchronously. Full death/respawn, audiovisual playback and +networking still need consumers. Block writes currently update +resident storage; neighbor updates, drops and block-entity lifecycle remain +unfinished. Block-inside effects such as cobweb slowdown and the full entity +lifecycle are also unfinished. The reference harness explicitly controls these +boundaries, which remain outside the comparison's scope. +The earlier [scene collision comparison](../benchmarks/rust-native-scene-motion-2026-10-07/collision-regression.json) +and [renderer startup](../benchmarks/rust-native-scene-motion-2026-10-07/startup-smoke.json) +also pass with this binding and the additional prepared movement resources. + +The accompanying [startup check](../benchmarks/rust-native-scene-collision-2026-10-07/startup-smoke.json) +passes after sharing scene loading between the GUI and headless collision probe. +An [interactive Linux check](../benchmarks/rust-native-scene-collision-2026-10-07/interactive-smoke.json) +enables F4, holds Shift to descend, verifies that the camera stops at the terrain +surface, and exits with Ctrl+Q. The window was visually inspected on Vulkan +llvmpipe; this is not a hardware performance measurement. + +The separate `horizon-assets` crate decodes the pinned 26.3 cuboid model format. +Its native comparison covers all **2,883 block-model JSON files** in the client +JAR plus **2,457 synthetic cases**: element bounds, optional geometry, nullable +children, face UVs and quarter turns, single-axis/Euler rotations, texture +references and translucency materials, light emission, display transforms and +inheritance markers. Floating-point fields compare by their exact bits. The +comparison also covers primitive coercion, integer truncation/wraparound and +selected strict-reader numeric/syntax limits. The numeric scanner also preserves +vanilla's rejection when its wrapping integer accumulator hits zero before +another digit, including in ignored fields. Twenty newly exposed acceptance +mismatches were corrected; the complete comparison now covers 5,340 models. +The [resolution](../benchmarks/rust-resource-number-scanner-2026-10-06/model-resolution.json), +[baking](../benchmarks/rust-resource-number-scanner-2026-10-06/model-baking.json) and +[animation](../benchmarks/rust-resource-number-scanner-2026-10-06/sprite-animation.json) +comparisons also pass with the shared scanner correction. + +```sh +python3 tools/test_cuboid_model_parity.py +``` + +The [archived decoder result](../benchmarks/rust-resource-number-scanner-2026-10-06/model-decoding.json) +records source, fixture and reference hashes. The oracle uses actual client +classes; those rendering APIs are absent from the server. The decoder, parent +resolver and baker now feed the development gallery. Blockstate selection, transformed +models and UV locking have the separate checks described below. Rendered +appearance still needs its own checks. + +`ModelLibrary` resolves parent geometry, ambient occlusion, GUI lighting and +each display context. It shares inherited elements rather than cloning them. +Texture aliases bind after child overrides are applied; successful and failed +alias walks are cached. Missing resources use the native missing-model cube; +parent cycles invalidate their descendants. The +[resolution comparison](../benchmarks/rust-model-resolution-2026-10-06/scoped-parity.json) +matches **5,648 requested roots across 439 graphs**, including the full bundled +block-model catalog, missing parents, 702 cyclic roots, 1,024-model parent chains, +512-slot alias chains, explicit empty geometry and identity/null transforms. +It calls native `ModelDiscovery`, `ResolvedModel` and `TextureSlots` APIs. + +```sh +python3 tools/test_model_resolution_parity.py +cargo +stable test --locked -p horizon-assets +``` + +Cuboid baking now produces positions in block units, normalized unit-atlas UVs, +face winding and facing, material references, tint indices, shade overrides and +light-emission metadata. It supports single-axis and Euler element rotations +with the pinned rescaling rule. The +[baking comparison](../benchmarks/rust-model-baking-2026-10-06/scoped-parity.json) +matches **7,100 roots across 440 graphs**, using native `FaceBakery` with a real +sprite and the default JOML math options. All bundled block models bake without +errors. Synthetic coverage includes reversed/degenerate bounds, signed zero, +arbitrary rotations, rescaling, null geometry children and parent cycles. +Position, UV and matrix fields compare by exact float bits for these fixtures. + +```sh +python3 tools/test_model_baking_parity.py +``` + +That comparison uses the identity blockstate transform. Atlas packing, +transparency classification, actual tint/light evaluation and GPU rendering +remain separate from the geometry result. Other operating systems still need +their native validation runs. + +`BlockModelTransform` now prepares all 64 XYZ quarter-turn combinations once +and shares them across baked models. It rotates geometry around the block center, +rotates culling directions and applies UV locking in the original face basis. +The [transformed baking comparison](../benchmarks/rust-blockstate-transforms-2026-10-06/scoped-parity.json) +checks every distinct model/rotation/UV-lock tuple in bundled blockstates and +all 128 rotation/lock combinations on 81 synthetic models, plus further arbitrary +element rotations. Positions, UVs and every orientation/inverse-face matrix +compare by exact float bits: 19,704 roots and 148,439 quads match, including +7,884 bundled model/transform tuples. Quaternion basis rounding and numeric identity +rechecking are retained. This remains geometry validation; atlas packing and pixel parity are separate work. + +```sh +python3 tools/test_blockstate_transform_parity.py +``` + +Blockstate resources now decode into ordered variant selectors and multipart +conditions. The [native blockstate comparison](../benchmarks/rust-blockstate-model-decoding-2026-10-06/scoped-parity.json) +covers all 1,288 bundled definitions and 1,351 synthetic cases (2,639 total, +468 expected rejections). It uses the same `StrictJsonParser` and +`BlockStateModelDispatcher.CODEC` as the pinned loader. The Rust representation +preserves single versus weighted variants, all three quarter-turn axes, UV-lock +flags, positive weights and total-weight limits, ordered selectors, nested +AND/OR conditions and per-term negation. + +```sh +python3 tools/test_blockstate_model_parity.py +``` + +Property binding now selects variant roots or multipart part indices for an +ordered native state list. The [binding comparison](../benchmarks/rust-blockstate-model-binding-2026-10-06/scoped-parity.json) +covers all 1,288 bundled definitions against 35,723 registered block states plus +the four special item-frame states, followed by synthetic overlap, malformed +selector and predicate cases: 3,802 definitions and 687,466 state results match, +with 220 expected binding errors. It checks the native replacement-before-abort +behavior for overlapping variants, eager multipart validation even when variants +cover every state, integer-property aliases, nested conditions and empty part +selections. The controlled chunk renderer now uses this binder for its model +catalog. + +The Java integer-property parser is shared by `horizon-core`, client binding and +world-state decoding. Its [codec regression](../benchmarks/rust-blockstate-model-binding-2026-10-06/shared-integer-codec.json) +matches 221,261 output lines against each authenticated client/server JAR. + +```sh +python3 tools/test_blockstate_binding_parity.py +``` + +`CompiledChoices` prepares cumulative weights once per definition and shares +those choices across bound states. Selecting an ordinary single variant consumes +no random draw; a weighted singleton still does. Multipart collection draws a +seed even for an empty subset and resets the same stream before each chosen +part. The [native choice comparison](../benchmarks/rust-blockstate-model-choice-2026-10-06/scoped-parity.json) +uses actual `WeightedVariants.collectParts` and `MultiPartModel.collectParts` +with inert observable leaves. All seven distinct bundled weight patterns, +synthetic large weights and random multipart graphs produce matching selections +and subsequent random values: 6,960 fixtures, 111,360 collections, both legacy +and xoroshiro streams. The development gallery now bakes and renders selected +models using the legacy stream and the default block position seed. Specialized +block seed callbacks remain separate work. + +```sh +python3 tools/test_model_choice_parity.py +``` + +The sprite animation module reproduces the pinned metadata codec's integer +conversion, strict primitive types, optional null fields and frame dimensions. +It preserves repeated frames, filters out-of-image frame indices, and treats +sequences with fewer than two valid entries as static physical frame zero. +Frame lookup uses cumulative durations and binary search, so skipped rendering +frames do not require replaying all elapsed animation ticks. The native oracle +also checks dirty flags, draw requirements and interpolation timing, including +transitions near the maximum Java integer duration. Interpolation pixel output +and resource-loader failure recovery are outside this comparison. + +```sh +python3 tools/test_sprite_animation_parity.py +``` + +The [animation comparison](../benchmarks/rust-sprite-animation-2026-10-06/scoped-parity.json) +records 907 fixtures and 258,996 native tick states from the actual client codec +and `SpriteContents.AnimationState.tick`, including all 63 bundled animated +texture metadata sections and synthetic boundary cases. The associated +[startup report](../benchmarks/rust-sprite-animation-2026-10-06/startup-smoke.json) +checks the renderer using this shared implementation. Images, input +fixtures and native traces stay private under `.local/`. + +```sh +cargo +stable test -p horizon-client +cargo +stable clippy --workspace --all-targets -- -D warnings +python3 tools/test_native_client.py +# Headless Linux alternative: +python3 tools/test_native_client.py --vscreen +``` + +The mesh tests compare expanded rectangles against independently enumerated +exposed voxel faces, including solid neighbors, cavities, material boundaries, +negative chunk origins and random surroundings. The startup runner launches a +nine-chunk scene, requires 30 presented frames and a clean exit, verifies 3,169 +greedy cube rectangles and 179 other model faces across 18 sprite layers, and writes GPU, +platform, binary and source information to ignored +`.local/horizon-client/startup-smoke.json`. It has an external timeout as well as +the application's frame deadline. These checks do not establish gameplay or +pixel parity with Java. Source and resource fingerprints must remain unchanged +during the run. An animation test covers duration boundaries, wrapping and +repeated physical frames independently of render frequency. + +Initial local validation uses Linux x86_64, a headless Wayland compositor and +Vulkan llvmpipe software rendering. Textured geometry and resizing were visually +inspected; movement, arrow rotation and Ctrl+Q were exercised using virtual +physical key codes. Captured relative mouse movement and Escape release were +exercised through a virtual pointer. Physical-GPU runtime tests on ludodesktop +(RTX 4080) remain pending. Software-renderer frame rates +are not evidence of a hardware speedup. + +The model gallery was also inspected at close range on Linux/Vulkan llvmpipe. +With the camera stationary, screenshot differences were confined to the lantern +as its frames changed. The [model-client startup report](../benchmarks/rust-native-model-client-2026-10-06/startup-smoke.json) +records the bounded presentation check and the scope of this visual inspection. + +The [blockstate-client report](../benchmarks/rust-native-blockstate-client-2026-10-06/startup-smoke.json) +also checks all 16 gallery placements against actual Java registry binding, root +baking and model collection using `state.getSeed(position)`. A tagged empty +geometry adapter identifies the 20 selected model parts and their transforms; +the separate baking gate covers actual quad geometry. Preparation exports typed +property domains and canonical state order, which the Rust loader checks against +its imported registry before binding. Each distinct transformed model is baked +once during gallery preparation and reused across positions. The selected state +IDs, properties, positions and models are recorded in the startup report. + +[Neighbor-face visibility](face-visibility.md) now has native client/server +coverage across all registered states and suppression-rule families. Integrating +that result with resident chunk model meshing is now covered by the scene check +below. + +The [resident-model report](../benchmarks/rust-native-chunk-models-2026-10-06/startup-smoke.json) +checks all 10,919 occupied cells in the bounded startup scene against a separately +constructed native scene. Actual Java state-model selection, parent geometry, +rotated culling directions and `Block.shouldRenderFace` produce the same 5,991 +visible and 59,636 culled model faces. The sixteen featured model selections also +retain their direct native comparison. Expanded greedy-rectangle tests cover +rotated and mirrored UV bases, texture and shade boundaries, negative origins, +neighbor seams and cavities; cube projection tests cover all XYZ quarter turns. +These checks cover CPU mesh behavior and GPU startup, not native shader pixels +or a hardware performance comparison. + +The [landing interactive smoke check](../benchmarks/rust-native-landing-2026-10-07/interactive-smoke.json) +exercises F5 walking from the initial camera position. The player lands at y=4, +resets fall distance and records one damage request of 9.0. That historical +checkpoint preceded the health integration below. The Linux window exits cleanly after visual inspection. + +The [health integration comparison](../benchmarks/rust-native-health-2026-10-07/scene-motion.json) +connects actual server-player hurt to the same live attributes, synchronized +health/absorption storage and hunger state used by the resident player. It checks +90,065 operations in 1,881 scenarios against both pinned JARs. Repeated hits, +absorption, armor/toughness, health limits, damage cooldown boundaries, lethal +hits and nonfinite incoming damage retain native results and event order. +Travel reads the live movement-speed attribute through the actual native player +getter, independently of the base-living stored speed field. This removes a +controlled getter from the older movement harness and corrects the runtime +query. Dead-or-dying state disables movement input and jumping. Server-player jumps now +add the native exhaustion amount and queue a jump statistic, including when +jump strength prevents upward motion. The damage-clock fields advance at 20 Hz; +clock operations in the comparison establish elapsed-time state rather than +invoking complete native tick methods. That checkpoint preceded the hunger +integration below. + +The scene loads native-decoded damage definitions, damage tags and health field +IDs from the pinned private resources. Statistics, combat records, sound, +network broadcasts and advancement criteria are queued service requests. The +death consumer marks the stored actor dead and queues a request; drops, removal, +respawn and the death screen are unfinished. F5 constructs a fresh development +actor when walking is enabled. This is not vanilla respawn behavior. + +The [health interactive smoke check](../benchmarks/rust-native-health-2026-10-07/interactive-smoke.json) +enables walking and F3 diagnostics, lands from the initial position, then walks +and jumps before exiting. Health falls from 20 to 11, matching the single damage +request of 9.0; the cooldown expires to zero. The final report is grounded at y=4 +with 110 movement ticks and no error. The ground view was visually inspected. +The [startup check](../benchmarks/rust-native-health-2026-10-07/startup-smoke.json) +also passes with the additional health resources. These are Linux development +checks, not release acceptance or a hardware performance comparison. + +The [hunger integration comparison](../benchmarks/rust-native-hunger-2026-10-07/scene-motion.json) +checks 196,489 operations in 2,837 scenarios against both pinned references. +The resident simulation now ticks hunger after movement. It binds actual food, +saturation, exhaustion and timer fields to the same live health and attribute +storage, including regeneration and starvation through registered damage sources. +The damage callback borrows the FoodData currently being ticked, so exhaustion +writes remain visible before its timer resets. Peaceful recovery also runs in +the native Player.aiStep phase before movement. Difficulty and natural +regeneration settings live with the resident world. + +The reference executes actual `FoodData.tick`, `ServerPlayer.tickRegeneration`, +health setters, armor/absorption and hurt methods. Cases cover all four +difficulties, starvation health limits, absorption during starvation, changing +regeneration rules, fast/slow healing timers, timer overflow, signed zero, +nonfinite food state and combined falling/movement/food ticks. Explicit clock +setup supplies elapsed-time fields; complete enclosing `tick`/`doTick` methods +remain outside this comparison. The default walking scene uses Normal +difficulty with natural regeneration enabled. At that checkpoint food item use, +movement-distance exhaustion, effect ticks, full death/respawn services and save integration remained +unfinished. + +The [interactive hunger check](../benchmarks/rust-native-hunger-2026-10-07/interactive-smoke.json) +enabled walking and F3 diagnostics on Linux. After one landing damage request +of 9, stored health recovered from 11 to 12.5 as saturation fell from 5 to 3; +food remained 20 and exhaustion ended at 1. The player remained alive and +grounded at `[25, 4, 25]`, with an expired hurt cooldown, after 42 movement ticks. +The ground view was visually inspected and the client exited without an error. +The development client pauses movement without focus, so wall time is not +simulation time. This checks the resident simulation and window, not full +gameplay, release acceptance or hardware performance. + +The [movement statistics comparison](../benchmarks/rust-native-movement-statistics-2026-10-07/scene-motion.json) +checks 215,204 operations in 5,510 scenarios against both pinned references. +The resident simulation now feeds the change in player position to the movement +statistics method after movement and before hunger ticking. Sprint distance +adds exhaustion to the same stored food state; ordinary walking adds zero. +Climbing and airborne distance also produce their native statistic requests. +Statistics persistence and scoreboard delivery remain unfinished. + +Vanilla invokes `ServerPlayer.checkMovementStatistics` from its packet listener +when accepting movement, separately from `Entity.move` and travel. The resident +scene directly accepts its resolved local displacement at this boundary; its +comparison invokes the actual native statistics method. It does not yet run the +packet listener's acceptance, rejection or scheduling logic. The shared kernel +also covers swimming, underwater walking, water-surface walking, crouching and +gliding. Direct method fixtures check all 512 overlapping query-flag combinations, +invulnerable abilities, float-versus-double centimeter rounding, integer overflow, +zero and nonfinite deltas. Those query overrides are restricted to statistics +fixtures; that checkpoint used dry, standing resident physics. Combined scenes exercise +repeated movement, sprint-state changes, jumps, hunger consumption and healing. +That checkpoint preceded the local sprint controls described below. + +The [Linux window check](../benchmarks/rust-native-movement-statistics-2026-10-07/interactive-smoke.json) +enabled walking, showed diagnostics and held W for 650 ms. The player moved from +`[25, 4, 25]` to `[23.12939004788537, 4, 23.12939004788537]`, remained grounded +and alive, and exited without an error after 82 movement ticks. Health recovered +to 14 after the initial fall. The ground view was visually inspected; this is a +client smoke check, while statistic amounts and exhaustion are checked by the +native comparisons above. + +The [sprint input comparison](../benchmarks/rust-native-sprint-2026-10-07/sprint-input.json) +checks 502,112 evolving steps in 146,648 scenarios. It executes the actual +`LocalPlayer.aiStep` prefix, including `KeyboardInput.tick` and the private +sprint eligibility and stop methods. A sentinel ends execution at the riding +boundary before parent movement. The fixtures supply environmental, effect, +vehicle and UI queries; actual food/ability storage and item `USE_EFFECTS` +components supply the remaining conditions. The comparison covers all combinations +of 17 condition flags, keyboard states and previous input, food thresholds, +timer boundaries, sprint windows from 0 to 10, and double-tap sequences. It +checks each ordered sprint setter request, including repeated requests. + +The [combined sprint scene](../benchmarks/rust-native-sprint-2026-10-07/sprint-scene.json) +then checks 13,387 operations in 419 scenarios. Its Java input actor shares the +native scene actor's food and collision state, and its sprint setters update +that actor's real attributes. Actual input preparation, movement, distance +exhaustion, hunger and healing follow. Snapshots compare the sprint timer and +previous input alongside position, velocity, modifiers and health/food fields. +Cases include collisions, releasing the sprint key while moving, double taps, +jumps, and hunger crossing the sprint threshold. The +[common scene check](../benchmarks/rust-native-sprint-2026-10-07/scene-motion.json) +also passes against both pinned references. + +The walking client now samples sprint input on each simulation tick and uses +the default seven-tick double-tap window. The live food and collision fields +control eligibility; sprint changes update the existing movement-speed +attribute. The F3 title shows sprint state, and exit reports include sprint +ticks and movement-distance counters. These counters are diagnostics, not saved +statistics. Fluid movement, vehicles, effects, item use, input remapping and the +complete client/server tick remain unfinished. The input comparison tests those +eligibility queries in isolation; the sprint checkpoint used dry, standing +actors with empty equipment. The crouch integration below extends that domain. + +```sh +python3 tools/test_sprint_input_parity.py +python3 tools/test_native_scene_motion.py --sprint-input +``` + +Linux window checks exercised both [Left Ctrl](../benchmarks/rust-native-sprint-2026-10-07/sprint-key-smoke.json) +and [double-tap W](../benchmarks/rust-native-sprint-2026-10-07/double-tap-smoke.json). +The Ctrl run recorded 71 sprint ticks and 1,948 sprint centimeters. The double-tap +run visibly showed `Sprint true` during the second press and `Sprint false` +after releasing W. Both runs ended grounded and alive without an error, and +their views were visually inspected. These are development client checks; +ludodesktop release acceptance and complete gameplay remain pending. + +## Crouching and dry pose transitions + +Left Shift now binds crouching to the resident player. Local crouch selection +uses the previous keyboard state before the new input is sampled; that local +state controls slowdown and sprint eligibility. The current Shift input controls +ledge backoff, descending collision context, bounce suppression and ladder +sliding. After movement, pose-fit checks choose standing, crouching or crawling +and refresh the cached bounds and eye height. Releasing Shift under a ceiling +does not force the actor into a standing volume that cannot fit. + +The [combined input scene](../benchmarks/rust-native-crouch-2026-10-07/input-scene.json) +checks 21,241 operations in 514 scenarios against the pinned client, including +the actual `LocalPlayer.aiStep` input prefix and `modifyInput`. The +[shared scene comparison](../benchmarks/rust-native-crouch-2026-10-07/scene-motion.json) +checks 223,645 operations in 5,605 scenarios against both pinned JARs. It invokes +actual native pose selection, dimension refresh and edge backoff. The new cases +include low ceilings, blocked pose changes, scale and sneaking-speed attributes, +diagonal ledges, step-height thresholds, jumping, release transitions and landing +on different materials. Seven output lines per operation compare motion, +attributes, events, health, hunger, input history and pose/dimension bits. +The existing [isolated sprint comparison](../benchmarks/rust-native-crouch-2026-10-07/sprint-input.json) +also passes after updating its scene controller. + +The native fixture controls pose storage and invokes the actual dimension-refresh +body when the pose changes. Full synchronized pose data and network notifications +remain unfinished. That checkpoint used explicit dimension refreshes; the +pending attribute integration below adds the simulation tick phase. Crawling here means dry collision +pose selection; swimming physics, sleeping, flight and death poses are unbound. + +The client camera follows the cached eye height with the inspected native float +smoothing arithmetic. Full camera behavior and pixel parity are not established. +The [Linux window check](../benchmarks/rust-native-crouch-2026-10-07/interactive-smoke.json) +visibly switched from crouching to standing after releasing Shift. It recorded +100 crouching ticks and 613 crouching centimeters, ending alive and grounded +without an error. Both views were inspected. The +[renderer startup check](../benchmarks/rust-native-crouch-2026-10-07/startup-smoke.json), +seven client tests and all-target client Clippy also passed. These checks do not +establish full vanilla gameplay or final Linux release acceptance on ludodesktop. + + +## Pending attribute updates + +The resident simulation now dispatches pending attribute callbacks after movement +and before pose selection, matching their position in `LivingEntity.tick` and +`Player.tick`. Reducing maximum health or absorption clamps the stored value; +changing scale rebuilds the cached player dimensions even when the pose stays +the same. The update set clears after the callbacks finish, while attribute +synchronization stays queued. Existing modifier, cache and dirty-state behavior +is preserved. + +The scene oracle invokes the actual private native refresh method and the +`ServerPlayer.onAttributeUpdated` override. Waypoint transmit/receive changes +produce ordered manager requests; waypoint management and network delivery remain +unbound. Health and absorption use the same synchronized float storage as damage +and hunger. The full enclosing player/entity tick is still incomplete. + +Callback order depends on native attribute-instance identity hashes. The oracle +now exports each reference process's holder and instance identities, and the Rust +probe replays them. The check compares ordered health/waypoint events and validates +that the same number of attribute instances is allocated. It does not sort those +events to conceal ordering differences. Registry snapshots still compare map and +modifier contents independently of iteration order. + +The [shared scene check](../benchmarks/rust-native-attribute-updates-2026-10-07/scene-motion.json) +passes 234,949 operations in 5,801 scenarios against both pinned JARs. The +[combined input scene](../benchmarks/rust-native-attribute-updates-2026-10-07/input-scene.json) +passes 30,025 operations in 710 scenarios against the client. New cases combine +health and absorption limits, scale, both waypoint ranges, permanent/transient +modifiers, repeated refreshes and nonfinite values. Low-tunnel histories exercise +movement, releasing Shift under a ceiling and changing scale between ticks. + +The [Linux walking check](../benchmarks/rust-native-attribute-updates-2026-10-07/interactive-smoke.json) +recorded 36 sprinting ticks and 36 crouching ticks, ending grounded and alive +without an error. Its view was inspected. The +[startup check](../benchmarks/rust-native-attribute-updates-2026-10-07/startup-smoke.json), +seven client tests and all-target client Clippy passed. Full gameplay parity and +playable Linux release acceptance on ludodesktop remain pending. diff --git a/docs/noise-generation.md b/docs/noise-generation.md new file mode 100644 index 000000000..055c32202 --- /dev/null +++ b/docs/noise-generation.md @@ -0,0 +1,96 @@ +# Horizon noise-generation scope + +The target is the repository-pinned Minecraft Java Edition **26.3**. The Rust +samplers live in `crates/horizon-core/src/noise/` and use the checked legacy or +xoroshiro streams. They are a world-generation foundation; Horizon does not yet +generate complete vanilla chunks or run a playable Rust game. + +## Implemented behavior + +- Gradient offsets and all 256 permutation entries, including the three random + draws consumed when simplex offsets are disabled. +- 26.3 Perlin 2D/3D sampling, single-precision interpolation and accumulation into + caller-supplied derivative arrays. Smeared Perlin uses its adjusted Y component + for gradient dots and the original component for interpolation. Its inherited + derivative method samples the unsmeared field. +- Simplex 2D/3D sampling with both offset modes, double-precision corner arithmetic + and single-precision return values. The second 2D coordinate uses the Y offset. +- Normal coordinate wrapping with the Far Lands debug flag disabled, including + the fast-path boundary immediately below 2^24. +- Positive strided density volumes with Z/X/Y flat ordering, Java-wrapping block + coordinates, bulk Perlin/smeared-Perlin gradient reuse, scalar simplex volumes, + repeated scaled accumulation and untouched buffer tails. +- Ordered noise stacks, nested sampling, flattened stack composition, layer + access and range arithmetic. Zero-amplitude layers are retained. Flattening + rescales each layer before sampling and can differ from a nested stack. +- Normal-noise octave selection, frequencies, amplitude modifiers, compensated + amplitude sums, enabled/disabled/legacy normalization and the parity factory. + Modern creation forks two positional factories and derives each octave from + its name, then interleaves the two sets of Perlin layers. +- Legacy Nether biome initialization, including reverse octave construction, + exactly 262 integer draws for skipped octaves, rejected positive octaves and + the RNG state left by initialization failures. Its two stacks are flattened in + sequence, preserving their distinct accumulation order. + +The bulk Perlin kernel adds X/Z gradient contributions before Y. Calling the +scalar sampler repeatedly would rearrange those operations and can change the +result. Rust preserves the bulk path and caches its eight gradients while the +Y cell remains unchanged. These are implementation choices checked for behavior; +no whole-game frame-rate or generation-speed improvement has been measured. + +## Validation + +After preparing the pinned artifacts with `python3 tools/lab.py prepare`, run: + +```sh +cargo test --workspace +cargo clippy --workspace --all-targets -- -D warnings +python3 tools/test_noise_parity.py +``` + +The original Java adapter invokes the actual downloaded classes on both client +and server JARs. It exposes offsets, permutations, octave parameters and layer +weights for comparison, and calls the reference scalar and bulk methods. +Artifacts and dependencies are authenticated against the repository lock and +the official bundled checksums. Generated corpus/output and compiled adapters +remain private under `.local/rust-noise-parity/`. + +The corpus covers both random streams; offset and lattice boundaries; very large +coordinates; signed zero, subnormals, infinities and NaNs; negative and zero +amplitudes; rejected ranges; nested and flattened stacks; octave gaps; all three +normalization modes; empty definitions; and modern/legacy RNG consumption. +Finite values and signed zeros are compared by bits. NaN payloads/signs are +canonicalized on both sides, matching Java's `floatToIntBits`/`doubleToLongBits`. + +The local run matches **1,443,539 output lines per reference JAR**. This is a +count of output records, including repeated checks, not distinct gameplay +behaviors or a coverage percentage. The metadata-only +[scoped report](../benchmarks/rust-noise-2026-10-05/scoped-parity.json) records +source/input/output hashes and reference identities. The runner removes a prior +success report before running and rejects source changes during validation. +CI includes the suite on Linux, Windows and Apple Silicon macOS; the recorded +local result is Linux, not proof that remote jobs or physical gameplay passed. + +## API limits and remaining integration + +Rust returns typed errors and uses immutable shared samplers. Density dimensions +and strides must be positive, total volume must fit a Java signed array index, +and a short output buffer is rejected before any writes. Vanilla can overflow +its volume-size arithmetic or partially write before an array exception; those +invalid-buffer behaviors are outside this bounded API. + +The normal-noise builder limits allocation to 4,096 octaves; the legacy +initializer also limits reverse construction to 4,096 octave steps. Requests +beyond these limits fail before RNG draws. Vanilla's serialized definition +codec limits octave count to 32. Rust's builder owns a snapshot of parameters; +Java object identity, mutable builder-list aliases, equality/hash methods and +the complete Java API surface are not reproduced. + +The direct normal-noise JSON codec is now implemented and checked against every +bundled noise definition in the [world-generation codec suite](world-generation.md). +The density registry loader is also compared against all bundled definitions. +Remaining noise initializers, complete terrain-router integration, +aquifers, surface rules, biome/feature/structure placement and complete chunk +generation still require implementation and integration evidence. Gaussian +sampling remains absent from the RNG API pending exact logarithm behavior. +No generated-world or full gameplay parity claim follows from this suite. diff --git a/docs/optimization-plan.md b/docs/optimization-plan.md index ff85fc316..eb860fa4e 100644 --- a/docs/optimization-plan.md +++ b/docs/optimization-plan.md @@ -8,6 +8,13 @@ Inspect both pinned game JARs locally, retain bytecode as the reference, and mea Whole-game translation is a long-term research objective. Decompiled Java is an inspection artifact, not the original source tree: build configuration, comments, tooling history, and some source-level constructs cannot be recovered faithfully. A mechanically translated Rust game would also have to preserve behavior, data formats, networking and rendering. An isolated hot-path replacement is a useful first experiment. +The Rust rewrite now has an original `horizon-core` foundation and a bytecode +differential runner for selected position, random-stream and packed-storage +operations. [Rust parity status](rust-parity.md) distinguishes that tested slice +from the unimplemented gameplay and renderer. This establishes compatibility +testing infrastructure; it does not select an FPS bottleneck or supply a playable +Rust client. + ## Local code map These entry points were verified present in the decompiled 26.3 client. Paths below are relative to `.local/minecraft/26.3/sources/client/net/minecraft/`; shared/server logic can also be inspected in the dedicated-server tree. diff --git a/docs/playable-validation.md b/docs/playable-validation.md index 159bcaace..22ebd53ab 100644 --- a/docs/playable-validation.md +++ b/docs/playable-validation.md @@ -5,7 +5,7 @@ Version 0.2.0 targets Minecraft 26.3 / Fabric 0.19.5 / Java 25. This is an initi ## Local checks - Official client runs through a Wayland virtual screen in built-in limited demo mode, without Microsoft credentials. Normal Mac play uses licensed Prism sign-in. -- Balanced stack (Sodium, Lithium, FerriteCore, ImmediatelyFast, EntityCulling, Distant Horizons, Fabric API, Horizon Lab) reaches the menu, loads the demo world, logs in locally, renders terrain, and saves/quits. +- Balanced stack (Sodium, Lithium, FerriteCore, ImmediatelyFast, EntityCulling, Distant Horizons, Fabric API, Horizon) reaches the menu, loads the demo world, logs in locally, renders terrain, and saves/quits. - DH generates and accepts the current configuration schema: 128-chunk LOD radius, two background threads at 0.5 run-time ratio, priority 3. No old-version guessed config keys. - A missing desktop AWT component in the local headless JRE initially caused a DH cloud-texture error. Installing the complete Java 25 runtime resolved it; this was an environment issue, not a packaged mod change. - Native libraries are chosen by OS and architecture, including ARM64 selection when the official manifest has OS-only rules. Builds use portable `/` ZIP paths on Windows too. @@ -156,7 +156,7 @@ software-renderer workload establish a real-hardware optimization result. The local Linux host uses **Mesa llvmpipe software rendering**. It is useful for mod/mixin/startup/report validation, not for predicting M2 Pro, Windows GPU or Linux discrete-GPU performance. Warm-up/world loading on this host is slow. Demo credentials produce expected unavailable account-properties/Realms logs, and chat availability can be restricted; the independent F8 measurement shortcut avoids relying on chat. -CI compiles/builds on Linux, Windows and Apple Silicon macOS. Successful compilation is not graphics, authentication, UI or Mac-driver runtime validation. macOS 27 and the user's actual M2 Pro have not been tested here. Optional cinematic shaders and Vulkan are experiments; the OpenGL balanced pack is the first manual test. +CI compiles/builds on Linux and Apple Silicon macOS (Windows was dropped from scope on 2026-10-08; earlier Windows results below are historical). Successful compilation is not graphics, authentication, UI or Mac-driver runtime validation. macOS 27 and the user's actual M2 Pro have not been tested here. Optional cinematic shaders and Vulkan are experiments; the OpenGL balanced pack is the first manual test. The [core comparison](core-performance.md) records numerical observations for matched software-rendered workloads. They do not establish a Mac or hardware-GPU @@ -167,4 +167,4 @@ terrain generation and steady-state rendering are separate workloads. ## Release content -Packs embed only the original MIT Horizon Lab JAR and config. Mod/game/library downloads retain upstream licenses and are checked against pinned hashes. No game JAR, class, decompiled source, asset, world or credential is committed or uploaded in a starter. The narrow publication allowance is for original Java under `dev/horizonlab`, and the built JAR checks its emitted class namespace. +Packs embed only the original MIT Horizon JAR and config. Mod/game/library downloads retain upstream licenses and are checked against pinned hashes. No game JAR, class, decompiled source, asset, world or credential is committed or uploaded in a starter. The narrow publication allowance is for original Java under `dev/horizonlab`, and the built JAR checks its emitted class namespace. diff --git a/docs/process-memory.md b/docs/process-memory.md index 64ff7aab3..1f4e7186a 100644 --- a/docs/process-memory.md +++ b/docs/process-memory.md @@ -1,6 +1,6 @@ # Measuring resident process memory -Horizon Lab 0.6.0 records process RSS alongside JVM heap and nonheap pools. RSS +Horizon 0.6.0 records process RSS alongside JVM heap and nonheap pools. RSS counts resident pages belonging to the Minecraft process, including native allocations and mapped pages. It helps detect cases where reducing heap use merely moves memory elsewhere. It is not unique physical-memory ownership or diff --git a/docs/rust-parity.md b/docs/rust-parity.md new file mode 100644 index 000000000..807b875cb --- /dev/null +++ b/docs/rust-parity.md @@ -0,0 +1,1290 @@ +# Horizon Rust rewrite status + +The behavior target is the repository's pinned **Minecraft Java Edition 26.3**. +One-to-one vanilla gameplay parity is the acceptance criterion. It has **not** +been reached, but the Rust game is now playable: the [native client](native-client.md) +has a title screen and world management. It generates vanilla terrain with +decoration and streams, lights and renders it. Survival play works: mining, +placing, crafting, chests and furnaces, items, mobs, combat, hunger, health, +sounds, and Anvil saves. +The Rust workspace implements core arithmetic/random streams, world data and +resident sections, scheduled tick ordering, geometry, contained fluid states, +noise/density evaluation, biome and terrain generation kernels, material rules, +and parts of feature placement and decoration. Movement/fluid interactions, +registered attributes, hunger storage/ticks, synchronized player health and +absorption, damage reduction, outer hurt gates, blocking-item damage, item +durability and item-use start/tick/release/completion have scoped native comparisons. +Shared inventory/equipment storage now binds item-use flags and lifecycle, while +item templates, remainders, checked bundle weights and cooldown expiry have +native comparisons. Item completion composes stack copies with remainder and +cooldown effects and server inventory delivery. Consumable start/completion now +composes food storage, native random streams and eating particles, with exact +sound parameters and effect ordering checked against both pinned JARs. Consume +effect bodies now cover status application/removal/clearing, sounds and random +teleport attempts. Shared status instances implement hidden-chain updates, +server/client countdown and client blending with native comparisons. Entity +effect storage now binds consumable status changes and the effect tick loop, +including expiration, periodic refresh and client particle selection. Registered +effect behavior, notification side effects and full entity/world lifecycle +bindings remain unfinished. All pinned block-survival +families now have native differential coverage. Full simulation callbacks, +complete chunk generation, entity behavior, networking, rendering and playable +integration remain unfinished. The linked subsystem documents and hashed reports +record the exact tested scope and remaining gaps. +The `horizon-assets` crate now decodes pinned cuboid models, with all 2,883 bundled +block-model JSON files and 2,457 synthetic cases compared against the actual +client parser. [Decoder scope and validation](native-client.md#validation) +also include parent/texture resolution over 5,648 roots and cuboid baking over +7,100 roots with identity blockstate transforms. Blockstate resource decoding now +matches all 1,288 bundled definitions and 1,351 synthetic cases; registry +binding now also matches native selection across registered and special +item-frame states. Weighted selection and multipart random draw consumption +also match native traces. Transformed baking now checks every bundled +model/rotation/UV-lock tuple and all XYZ quarter-turn combinations against native +geometry by exact float bits. The native renderer now draws its controlled +resident chunks from registry-bound, selected and transformed models, including binary +cutouts, multipart connections, weighted stone variants and stepped lantern +animation. All 16 scene selections match native model collection. These are not +yet simulated gameplay blocks. Resident chunk meshing now preserves weighted +variants and UV orientation when greedily merging matching cube faces, and uses +native-checked neighbor visibility. Full block-catalog material support, lighting +and chunk streaming remain unfinished. +[Neighbor face visibility](face-visibility.md) now matches both reference JARs +across 1,441,816 state pairs, including all pinned suppression-rule families. +Animation metadata, frame sequences and tick-state selection now have native +differential coverage, including all bundled animated texture metadata. GPU +interpolation and game-loop synchronization remain unfinished. +The playable Java performance packs remain available during development. + +## Completion criteria and playable builds + +The final deliverable is the complete Horizon Rust game with one-to-one parity +with pinned Java Edition 26.3, plus a playable **Linux** build that the user can +download and test. The only target machine is **ludodesktop**: Ubuntu 26.04, +Intel i7-13700KF, NVIDIA RTX 4080, GNOME on Wayland. macOS (including the M2 Pro +Mac) and Windows are out of scope. The build must include a packaged native +executable, required runtime resources, launch instructions, artifact checksums, +and the tested OS/CPU/GPU configuration. + +The build is complete only after its packaged Rust game is launched and tested on ludodesktop: +create/load a world, render terrain, use keyboard/mouse controls, move and interact, +break/place blocks, use inventory/crafting, save, quit and reload. These launch +checks accompany the full gameplay-parity suite; they do not replace it. Record +failures and test limits. Compiler success, library comparisons +and the existing Java packs do not establish a playable Rust build. + +Optimize FPS, frame pacing, memory use and render distance using matched scenes, +worlds, settings and hardware after behavior is validated. Package and test on +ludodesktop before declaring the rewrite complete. Commit and push +verified development checkpoints regularly. + +## Implemented foundation + +`crates/horizon-core` is a dependency-free Rust library with no unsafe code. +It uses small integer position values, exclusively owned RNG state, and packed +64-bit storage. These choices avoid Java object overhead in this slice; no +whole-game memory, FPS, or render-distance gain has been measured. + +| Area | Implemented and checked operations | Remaining scope | +| --- | --- | --- | +| Positions | Block, section, and chunk packing/unpacking; wrapping block offsets; block-to-section/chunk conversion; section-relative packet positions; block-state storage indices; region coordinates/local indices; bounded inclusive/directional block-box iteration | Remaining iterators, world bounds and entity/world integration | +| Simulation geometry | Selected Vec3 operations, quantized trig/rotations, normalized AABB bounds and transforms, finite block traversal/swept visitation, ray faces, immutable cube/array voxel grids, greedy boxes, collision distances, column heights, closest points, lazy floor height, box quantization and Boolean/optimized joins; movement resolution over supplied shapes, step candidates and step-up decisions/query bounds | Shape rotations/faces/edges, entity-context shape selection, full entity movement and side effects | +| Legacy random stream | Seeding/reseeding; int, bounded/inclusive/exclusive int, long, boolean, float, double; triangular float/double draws; fork; consume count; positional factories and Java UTF-16 string hashes | Gaussian sampling, threading-error behavior and remaining world-generation call sites | +| Xoroshiro random stream | 64-bit seed expansion; explicit 128-bit state including all-zero fallback; the same selected random operations as above; positional factories and MD5-derived seeds with Java UTF-8 surrogate handling | Gaussian sampling, serialization and remaining world-generation call sites | +| Noise generation | 26.3 Perlin/simplex/smeared Perlin; permutation construction and coordinate wrap; Perlin derivatives; cached/scalar density-volume accumulation; nested/flattened stacks; normal-noise octave weights and normalization; modern and legacy Nether seeding | Serialized noise definitions, density graphs, complete chunk generation, biome/feature/structure integration | +| Density evaluation | Compiled constants, clamped/repeating/mirrored gradients, unshifted and XZ/XYZ shifted noise; offset-noise variants, old blended noise, outer End islands and distance-to-point; all eleven unary operators, six binary operators, powers, rounding, constant-operand specializations, min/max, clamp, range choice, interval selection and linear interpolation; separate scalar/bulk paths, nested scratch buffers, context-bound blend alpha/offset/structure samplers, absent/empty blend-density wrappers, context-owned scalar/volume caches, coordinate slices, coarse-grid interpolation, surface searches and nested cubic splines | Codecs, structure-density producers, nonempty old-world blending and terrain integration | +| Density graph compilation | Immutable definitions for constants, gradients, arithmetic/selection operations, powers, rounding, distance-to-point, slices, caches, interpolation, surface search, nested splines, outer End islands and normal/offset/blended noise; context fields, blend-density wrappers, direct/named reference holders; range/axis metadata, constant and disjoint-range specialization, uniform-axis rewriting, cache-ID allocation/deduplication, memoized roots, spline coordinate sharing/validation, world-seed lookup and failure state | Codecs, concrete world-field producers and complete terrain integration | +| Density range analysis | Checked interval constructors, hulls, arithmetic/min/max, reciprocal, abs/square/sign, powers/logarithms, clamp, monotonic endpoint mapping, finite/infinite interpolation, predicates, equality and Java hashes; conservative spline range propagation; integration with supported graph definitions | Propagation through remaining graph definitions | +| Packed palette-index storage | Widths 1–32; allocation; imported raw words; reads; writes returning old values; unpack; fill; padding/tail preservation; invalid-write rejection | Remaining network container integration | +| World data | Named/network NBT, modified UTF-8, mixed lists; gzip/zlib/uncompressed/lz4-java codecs; region exports including external chunks; block/biome saved palettes | Complete save lifecycle, data fixing, concurrent saves and recovery | +| Resident block sections | Pinned block-state registry import, defaults, numeric IDs, uniform sections, packed palette growth, freed-slot reuse and compaction; cached collision shape lookup bound to the same registry | Block behavior, entity-context collision shapes, light and full chunk-lifecycle integration | +| Heightmaps | Six type predicates and flags, packed heights, updates/removal rescans, shared priming, raw imports and length-mismatch fallback; all pinned states and mutation fixtures compared | Block air/fluid behavior and chunk-lifecycle integration | +| Scheduled ticks | Chunk queues, level collection/drain ordering, duplicate suppression, seven priorities, saved delays, chunk eligibility, callback mutations, area removal/copying, saved block/fluid NBT | Actual block/fluid callbacks, neighbor updates, tick-time and chunk-lifecycle integration | + +Packet-relative positions use X/Z/Y ordering; block-state storage indices use +Y/Z/X ordering. Negative coordinate conversion must floor rather than truncate. +The legacy RNG must retain Java's signed-int arithmetic and rejection rules; +the xoroshiro RNG has a different bounded-int algorithm and bit selection. +Positional factories preserve signed coordinate hashing and each stream's distinct +seed derivation. The hash API accepts UTF-16 units so malformed surrogate sequences +retain Java's replacement behavior. Gaussian sampling is still absent: a private +probe found bit differences between Java `Math.log` and the platform logarithm, +which must be resolved before its values and cached-draw behavior can be claimed. +Storage entries never cross a word boundary. Vanilla's fill operation also +writes padding and unused tail bits; imported words retain their original bits +when a slot is changed. These details are covered by the differential corpus. + +Rust APIs return typed errors instead of Java exceptions. Storage lengths and +indices use `usize`; raw decoded values use `u32` bit patterns. Writes reject +values above the nonnegative Java-int domain, including at width 32. Test output +casts raw imported width-32 reads back to signed Java ints for comparison. +Negative lengths and the complete Java object/API surface are not supported. + +## Reproduce validation + +The core/world libraries require Rust 1.85 or newer; the native client's locked +dependencies require Rust 1.90 or newer. Use current stable Rust, Python 3.10 or +newer, and JDK 25 for the complete workspace. From the checkout: + +```sh +cargo test --workspace +cargo clippy --workspace --all-targets -- -D warnings +python3 tools/test_rust_parity.py --prepare +python3 tools/test_world_parity.py +python3 tools/test_tick_parity.py +python3 tools/test_geometry_parity.py +python3 tools/test_collision_parity.py +python3 tools/test_noise_parity.py +python3 tools/test_density_parity.py +python3 tools/test_worldgen_parity.py +python3 tools/test_heightmap_parity.py +python3 tools/test_terrain_parity.py +python3 tools/test_structure_density_parity.py +python3 tools/test_material_surface_parity.py +python3 tools/test_material_condition_parity.py +python3 tools/test_material_stage_parity.py +python3 tools/test_biome_zoom_parity.py +python3 tools/test_biome_chunk_parity.py +python3 tools/test_biome_generation_parity.py +python3 tools/test_biome_source_parity.py +python3 tools/test_anchor_parity.py +python3 tools/test_biome_temperature_parity.py +python3 tools/test_float_log_parity.py +``` + +`--prepare` regenerates the local reference artifacts from the existing lock; +omit it after preparation to run without downloads. The runner verifies the +official manifest and both game downloads, the server's inner game JAR, and each +server dependency against pinned/bundled hashes. The original Java test adapter +calls vanilla classes directly; it does not substitute a Java reimplementation +of the Rust algorithms. The same corpus runs against client and server code. +The fixtures need no display, account, assets, or world generation. + +The deterministic corpus contains coordinate extremes, all 4,096 local section +positions, 8,192 random coordinate/offset queries, boundary and random signed +seeds, mixed RNG operations, fork/reseed/consume checks, invalid bounds, and +all 32 storage widths at boundary and 4,096-entry sizes. It also imports words +containing all set bits and compares the raw padding and fill results. The +current run produces **1,634,520 matching output lines per reference JAR**. +It includes 4,400 positional-factory commands and 5,000 random-helper commands, +with overflowing integer intervals, hash padding boundaries and malformed UTF-16. +This count includes repeated checks and raw entries; it is not a count of +distinct vanilla behaviors or a percentage of game coverage. + +Artifacts remain gitignored under `.local/rust-parity/`: corpus, Rust output, +client/server output, compiled oracle, and `report.json`. The report records +source/input/output hashes, reference identities, tool versions, and matched +line counts. A prior success report is removed before a new run can fail. +CI runs the same comparison in addition to offline Rust and Python checks. +The checked-in [scoped validation report](../benchmarks/rust-core-2026-10-05/scoped-parity.json) +contains only metadata and digests from the local run, not game code or artifacts. + +The additional [world-data suite](world-data.md) checks NBT and region +interoperability, saved palettes, all 35,723 registered block-state IDs, and +resident sections after repeated mutation. The corresponding +[scoped report](../benchmarks/rust-world-2026-10-05/scoped-parity.json) +records client/server reference hashes and the tested source hashes. + +The [scheduled-tick suite](scheduled-ticks.md) adds 25,815 commands including +2,096 tick invocations, producing 97,776 matching output lines per reference. +It also verifies block/fluid tick save codecs and a persisted region chunk. +The [geometry and cached-collision suites](collision-geometry.md) check numerical +boundaries and runtime block-state shape data, with separate +[geometry](../benchmarks/rust-geometry-2026-10-05/scoped-parity.json) and +[cached-collision](../benchmarks/rust-collision-2026-10-05/scoped-parity.json) +metadata reports. All differential runners reject changed source hashes during a run before publishing +a success report. Historic reports describe their own recorded source versions. + +The [noise suite](noise-generation.md) checks base sampling, derivative and bulk +arithmetic, nested/flattened stacks, normal-noise normalization and both modern +and legacy Nether initialization. Its [scoped report](../benchmarks/rust-noise-2026-10-05/scoped-parity.json) +records the tested sources and both reference artifacts. + +The [density suite](density-functions.md) checks compiled scalar and bulk samplers, +including gradients, nested shifted noise, arithmetic, caching, axis slicing and +coarse-grid interpolation, surface searches and nested splines with range analysis; +it also compares the initial graph compiler with vanilla's compiler. Its +[scoped report](../benchmarks/rust-density-2026-10-05/scoped-parity.json) records +**15,524,627 matching output lines per reference JAR**. That suite constructs graphs through its transport. Serialized registry +comparisons are covered separately below; generated terrain remains pending. + +The [float-log report](../benchmarks/rust-float-log-2026-10-05/scoped-parity.json) +records exhaustive compiled scalar comparisons for all **4,294,967,296 float bit +patterns** against both JARs on the local Linux/JDK runtime, with canonical NaN +results. Double-precision logarithms and other-platform math remain separate +validation work. + +The [world-generation codec suite](world-generation.md) checks every bundled +normal-noise JSON definition and all 55 bundled density definitions against +vanilla's actual registry-aware codecs. It compares decoded octave metadata, +graph ranges and axes, raw and optimized compilation, cache allocation and +seeded scalar and strided bulk sampling. Its +[scoped report](../benchmarks/rust-worldgen-2026-10-06/scoped-parity.json) records +**961,693 matching output lines per reference JAR**. All seven bundled eight-field +routers and their climate samplers are also +compared, including quart-coordinate wrapping and float/long quantization. +Climate search-tree construction and warm/fresh ties are checked across the +bounded API. Scalar and prepared-volume multi-noise biome resolvers are implemented +using private imported built-in parameter tables and compared against vanilla +scalar and bulk biome resolvers. Climate parameter codecs, vertical terrain bounds and the global fluid picker/ +disabled-aquifer path are also compared. Noise-based aquifer configuration and +fluid-pressure selection are implemented, with differential checks for seeded +decisions, sampling order, caches and failure recovery. Tag codecs, stacked resource +replacement and bounded dependency resolution are compared across all 300 bundled +block tags and synthetic missing-reference/cycle fixtures. Complete terrain +integration remains pending. + +The [heightmap suite](heightmaps.md) records **1,671,668 matching output lines per +reference JAR** across all 35,723 block states and 100 chunk fixtures. Rust resolves +tag membership; block air/fluid facts are private, independently verified imports. +Actual vanilla heightmaps compare predicates, mutations, packed words, priming and +selected ordered block reads. Chunk-lifecycle integration remains pending. + +The [noise-fill suite](terrain-filling.md) now compares **7,950,873 output lines per +reference JAR** across 114 fixtures and 200 fills. Final density, aquifers, resident +sections, world-generation heightmaps and fluid postprocessing are integrated for +this stage. The surface stage has a separate comparison; biome, feature and +structure stages remain pending. + +The [structure-density sampler](structure-density.md) matches **1,360,095 output +lines per reference JAR**, including ordered rigid-piece/junction contributions +and scalar/bulk clipping. Live structure discovery and placement remain pending. + +The [vertical-anchor suite](vertical-anchors.md) matches **181,632 output lines per +reference JAR**, including four anchor codecs, runtime overflow, nested exclusive +fields and generation bounds. + +The [material-surface primitives](material-surfaces.md) match **122,988 output +lines per reference JAR** for seeded terracotta bands, band lookup and surface +noise queries. Subsequent suites cover rule evaluation and surface application. + +The [numeric material-condition suite](material-conditions.md) matches **5,627,426 +output lines per reference JAR** for eleven condition forms and their column/block +cache transitions, including codecs, all eight bundled condition definitions and +block/sequence/conditional/terracotta-band rule composition. +The chunk surface comparison below integrates these rules. + +The [biome-temperature suite](biome-temperatures.md) matches **836,659 output lines +per reference JAR** for temperature modifiers, precipitation decisions and ordered +cache behavior, including thread isolation and climate fields from all 67 bundled +biome definitions. Full weather placement remains pending. + +The [surface-extension suite](material-surfaces.md#biome-specific-column-extensions) +matches **233,100 output lines per reference JAR** for badlands pillars and +frozen-ocean icebergs, including ordered column reads/writes and both random modes. + +The [bundled material-rule suite](material-rule-libraries.md) matches **678,174 +output lines per reference JAR**, including 665,712 rule applications across all +42 bundled definitions and the pinned biome, noise and density registries. +The [chunk surface stage](material-surfaces.md#chunk-surface-stage) matches +**6,733,382 output lines per reference JAR** across 79 fixtures, 42 terrain fills +and 106 surface builds, followed by 158 carving-mask passes, including 21,757,952 block values, heightmaps, fluid +postprocessing and ordered biome queries. It tests all seven bundled terrain +settings through both stages with shared density contexts and vanilla fuzzy +biome lookup against 378 generated neighbor biome chunks (400,896 stored cells). +Preset builders and complete generated worlds remain pending. + +The [biome-lookup suite](biome-lookup.md) matches **256,933 output lines per +reference JAR** for seed obfuscation, eight-corner fuzzy selection, direct quart +queries and source replacement. Seed hashes also match an independent SHA-256 +implementation. [Chunk biome storage](biome-lookup.md#chunk-biome-storage) matches +**478,340 lines per JAR** across 160 fills, including section-atomic failure +behavior and clamped reads. [Chunk biome generation](biome-lookup.md#chunk-biome-generation) +matches **383,072 lines per JAR** across 322 fills, including both imported +multi-noise presets and fixed/checkerboard/End sources through all seven terrain +routers. Preset builders and complete world generation remain pending. + +The [fixed/checkerboard/End source suite](biome-lookup.md#fixed-checkerboard-and-end-sources) +matches **1,306,096 lines per JAR**, including 1,147,984 biome queries and ordered +End erosion sampling. [Registry-bound source codecs](biome-lookup.md#registry-bound-source-codecs) +match **363,121 lines per JAR** across 40,481 inputs, including canonical encoding, +possible-biome sets and resolved queries. Chunk generation and surface integration +share the resolved-source API. Inline biome definitions and complete registry +lifecycle behavior remain pending. + +The [carving-mask suite](carving.md) matches **45,742 lines per JAR** across +28 fixtures, including packed column ranges, coordinate wrapping and mutations +retained after failing traversal callbacks. Mask application is included in the +surface-stage suite. [Shared carving geometry](carving.md#shared-shape-primitives) +matches **106,699 lines per JAR**, including 690 ellipsoids and 5,536 reachability +queries. [Seeded cave/canyon paths](carving.md#seeded-cave-and-canyon-paths) match +**882,005** and **1,094,517 lines per JAR**, respectively. The combined stage suite +also covers 42 procedural carving passes, including neighboring biome selection +and ordinal carver seeds. Full-world integration remains pending. + +The [feature-placement primitives](feature-placement.md) match **1,268,600 lines per +JAR** across seventeen modifier kinds, including callback failures and shared random +state. [Modifier-chain execution](feature-placement.md#modifier-chains) matches +**548,461 lines per JAR**, including feature callback failures and reused pending +buffers. [Initial block-writing features](feature-placement.md#initial-block-writing-features) +match **1,820,614 lines per JAR** for the void platform, End islands and End arrival +platform. Remaining feature algorithms and complete world integration remain pending. + +The [scalar value-provider suite](value-providers.md) matches **429,920 lines per +JAR** across 504 definitions and 5,040 seeded fixtures, including exact random +stream consumption. [Anchored height providers](value-providers.md#anchored-height-providers) +match **507,660 lines per JAR**, including all four anchors and overflowing contexts. +Weighted lists include zero weights, nested choices and maximum totals. Gaussian +distributions and provider encoding remain pending. + +The [block-state JSON codec suite](block-state-codecs.md) matches **221,261 output +lines per reference JAR**, covering every registered state and compact/full +encoding plus malformed-property fallback. Block gameplay remains pending. + +## Work required for a playable rewrite + +| Subsystem | Current Rust status | Required parity evidence | +| --- | --- | --- | +| Registries, block states, items and data components | Block-state IDs, property descriptors and defaults imported and checked; items/components absent | Registry lifecycle, remaining registries, data components and behavior | +| World/chunk storage, NBT and region files | Bounded NBT, four codecs, region export, saved and resident section palettes | Generated-save integration, entity/POI integration, upgrades, live saves and crash recovery | +| Terrain, biomes, structures and lighting | Seeded noise/density graphs, bundled registry and router loading, climate sampling/search and imported-table multi-noise biome resolution, aquifer decisions, noise-stage filling and surface-stage application implemented; complete terrain generation absent | Remaining terrain/biome codecs and world fields, seeded generated-chunk comparisons, biome/feature/structure placement, chunk lifecycle and light propagation | +| Tick scheduling, blocks, fluids and redstone | Scheduled queues and saved ticks, block survival families, fluid geometry/flow and entity immersion kernels checked; complete live block/fluid/redstone simulation absent | Actual block/fluid state transitions, neighbor updates, world integration and end-to-end ordered traces | +| Entities, AI, movement and combat | Collision, movement/fluid kernels, registered attributes, damage reduction, hurt gates and immunity predicates checked; complete live entity simulation absent | Context-dependent collision/physics and tick traces, spawning, pathfinding, damage, equipment and lifecycle | +| Survival, inventory, crafting and progression | Hunger ticks/storage and synchronized health/absorption implemented and checked; inventory/crafting/progression absent | Recipes, item transitions, hunger/health, effects, experience and advancement behavior | +| Dimensions, portals, weather and game rules | Not implemented | Cross-dimension state, transitions, time/weather and rule-dependent behavior | +| Multiplayer, protocol, authentication and commands | Not implemented | Packet/codec fixtures, vanilla interoperability, reconnects and command behavior | +| Rendering, resources, sound, UI and input | Native inspection client with selected block models, neighbor visibility, greedy meshing and a free camera; gameplay rendering/audio/UI incomplete | Resource compatibility, render/culling correctness, controls and playable interaction tests | +| Performance and platform support | Registered-attribute allocation reduction measured on Linux; whole-game performance and playable platform packages pending | Repeated matched gameplay workloads, frame/tick distributions, memory and physical GPU tests | + +The next simulation milestone is integrating the checked scheduler and +registry-backed sections with actual block behavior and neighbor updates. World +generation now has noise-stage filling, aquifers and surface-stage application; +biome assignment and remaining generation stages need work, +followed by complete seeded-world comparisons. The inspection renderer needs +complete material/lighting support, chunk streaming and a simulated world. +Movement, health and combat kernels need shared live player/entity state and +world services. Scoped comparisons alone cannot establish complete gameplay parity. Performance tuning must preserve the +validated simulation and use measured workloads; changing render distance, +simulation distance or terrain detail invalidates an equal-workload speed claim. + +No finite corpus proves every vanilla behavior. Future milestones need broader +version-specific differential suites and playable integration checks. The +project will report implemented/validated scope rather than label a partial +port as 100% parity. + +The [pre-light chunk-stage comparison](terrain-filling.md#block-writes-across-generation-stages) +adds **8,090,090 matching lines per JAR** for stage-dependent block mutation and +heightmap selection, including insertion/removal of every pinned state. This does +not establish the complete chunk lifecycle or region integration. + +The [resident feature-region comparison](feature-placement.md#resident-feature-regions) +adds **28,922,634 matching lines per JAR** for basic features, configured fill layers, replacements and scattered ore sharing +modifier chains and resident neighboring chunks, including live heightmap updates. +World-region side effects and complete feature generation remain pending. + +The [inline feature-graph comparison](feature-placement.md#inline-feature-composition) +adds **1,146,057 matching lines per JAR** for nested sequences, overlays and random selectors, +including short-circuit results, shared randomness and partial mutations. + +The [named feature-resource comparison](feature-placement.md#named-feature-resources) +adds **2,528,704 matching lines per JAR** for registry-aware feature/placed-feature +holders, ordered tags and subsequent nested execution. Complete registry loading, +reloads and remaining feature algorithms are still pending. + +The [configured fill-layer comparison](feature-placement.md#configured-fill-layers) +adds **1,305,274 matching lines per JAR** for block-state binding and ordered +column placement, including decoding every pinned block state. Complete feature +generation and gameplay remain pending. + +The [replacement-rule comparison](feature-placement.md#replacement-rules) adds +**1,890,716 matching lines per JAR** for all ten native predicate kinds, bound +state/tag identities and ordered random evaluation. Complete ore and structure +generation remain pending. + +The [single-block replacement comparison](feature-placement.md#single-block-replacement) +adds **303,678 matching lines per JAR** for ordered rule-driven block mutations, +rejected writes, failures and subsequent random state. + +The [scattered-ore comparison](feature-placement.md#scattered-ore) adds +**758,484 matching lines per JAR** for attempt offsets, ordered air-exposure checks, +rule evaluation and block mutations. Ordinary ore veins and complete biome +decoration remain pending. + +The [bulk-section comparison](feature-placement.md#bulk-section-access) adds +**959,640 matching lines per JAR** for cached raw section access, every block state, +all-air reads and unchanged heightmaps. This supplies storage behavior needed by +ordinary ore generation; vein geometry and concurrent ownership remain pending. + +The [biome feature-order comparison](feature-placement.md#biome-feature-ordering) +adds **411,751 matching lines per JAR** for identity-based ordering, cycles and +step index mappings, including every bundled biome's feature lists. This does +not yet execute complete chunk decoration. + +The [world-generation random-adapter comparison](feature-placement.md#world-generation-random-streams) +adds **238,800 matching lines per JAR** for native bit sampling, counters, forks, +nested wrappers and decoration/feature seeding. Gaussian sampling and complete +chunk decoration remain pending. + +The [biome-placement comparison](feature-placement.md#biome-placement-filtering) +adds **121,423 matching lines per JAR** for top-feature contexts, native generation +settings membership, query order, nested ordinary placers and partial failures. +Complete biome sampling integration and chunk decoration remain pending. + +The [decoration scheduler comparison](feature-placement.md#decoration-feature-scheduling) +adds **337,398 matching lines per JAR** through the native chunk-decoration entry +point, with structures disabled and traced feature sinks. It covers resident +biome selection, global ordering, per-feature seeds and failure/progress state; +complete feature algorithms and chunk lifecycle remain pending. + +The [resident decoration comparison](feature-placement.md#decoration-over-resident-chunks) +adds **36,173,951 matching lines per JAR** for native chunk decoration combining +biome storage/zoom, generation-stage guards, scheduling, implemented feature +graphs, block writes and live heightmaps. It compares complete final resident +sections; structures, lighting and the full generation lifecycle remain pending. + +The [block-state provider comparison](feature-placement.md#block-state-providers) +adds **257,299,719 matching lines per JAR** for ten state-provider kinds, including +all eight bundled provider definitions. It includes every state under six +directions, property transforms, nested draw order and empty selections. Rule-based +selection includes twelve predicate kinds, ordered conditions, empty results and +query failures. Named holder references are resolved through immutable resource +snapshots. Additional predicates, complete registry loading and complete feature placement remain pending. + +The [contained-fluid comparison](world-data.md#contained-fluid-states) adds +**243,331 matching lines per JAR** for fluid-state mapping, liquid-block conversion +and surface/camera height queries. It covers every pinned block state and query +failures; fluid spreading, entity interactions and rendering remain pending. + +## Overlay feature composition + +The Rust overlay feature executes every child placed feature in order and +accumulates success, sharing the placer and random stream across siblings. +Named holders and placed-feature tags use the same catalog resolution as other +compositions. Empty named tags produce false; empty direct lists fail decoding. + +The expanded [inline graph comparison](../benchmarks/rust-feature-graph-2026-10-06/scoped-parity.json) +matches **1,146,057 output lines per reference JAR**, and the expanded +[named catalog comparison](../benchmarks/rust-feature-catalog-2026-10-06/scoped-parity.json) +matches **2,528,704 lines per reference JAR**. These include partial failures, +rejected writes, nested modifiers, repeated calls, random-stream tails and both +Java random modes. This verifies scoped composition behavior; complete chunk +generation and gameplay remain pending. Workspace tests and all-target Clippy +also pass for this implementation. + +## Block-pile placement + +Rust block piles preserve radius and sparse-candidate random draws, air checks, +dirt-path acceptance, state-aware FULL upper support, provider fallback reads, +and update flags 260. Previously read support states are evaluated without an +extra world read. The [native comparison](../benchmarks/rust-block-pile-2026-10-06/scoped-parity.json) +matches **11,995,254 lines per reference JAR**, covering every candidate and +supporting registry state, partial failures, rejected writes, repeated placement, +and overlay/modifier composition. Workspace tests and all-target Clippy pass. + +Ordinary piles visit at most 98 cells. Rust preserves wrapped native box traversal +but limits pathological iteration to 2^20 cells; negative-count overflow fixtures +compare failure-terminated prefixes. Dynamic block entities are absent in this +feature fixture, and resident-world block updates remain pending. + +## Disk replacement and postprocessing + +Disk features now decode bounded radii and half-heights, traverse circular +columns in native order, apply optional providers, and mark up to two non-air +blocks above each replacement run. Failed target predicates end a run; empty +optional providers preserve it. Postprocessing requests resolve the containing +resident chunk and retain duplicate marks and prior effects after a failure. + +The [disk comparison](../benchmarks/rust-disk-2026-10-06/scoped-parity.json) +matches **2,816,586 output lines per reference JAR** across **76,409 fixtures**. +Every candidate state and every possible above-state is covered, alongside +random providers, rejected writes, partial failures, wrapped coordinates and +composed placement. Chunk-resolution and native ProtoChunk mark calls are +traced; later chunk postprocessing execution is outside this comparison. +Workspace tests, all-target Clippy and all 149 Python tests pass. + +## Block-blob placement + +Block blobs descend until their support predicate accepts the block below, then +write three overlapping randomized shapes with flags 3. Radius calculations +retain native float precision while position distances use double precision; +even the last shape consumes its three origin-offset draws. + +The [block-blob comparison](../benchmarks/rust-block-blob-2026-10-06/scoped-parity.json) +matches **2,387,914 lines per reference JAR** over **77,686 fixtures**, including +every candidate/supporting state, repeated calls, early returns, failed queries, +rejected writes, partial failures and overlay/modifier composition. Workspace +tests and all-target Clippy pass. Rust bounds pathological traversal work; +resident-world update callbacks and full gameplay remain pending. + +## Fluid-state JSON codecs + +Fluid states now decode and encode native object-form identifiers and properties. +Missing properties retain the pinned defaults (`falling=true`, flowing level 1); +invalid property values are ignored, while unknown fluid identifiers fail. +Integer levels share the Java-compatible decimal parser with block properties. + +The expanded [fluid comparison](../benchmarks/rust-fluid-2026-10-06/scoped-parity.json) +matches **243,331 lines per reference JAR**, including all 37 fluid states, +2,432 codec fixtures, encoding, legacy block conversion, and the existing +contained-fluid/height tests. Workspace tests and all-target Clippy pass. +Fluid spreading, tick execution and entity interaction remain pending. + +## Spring features and fluid tick requests + +Spring features preserve above/below/origin gating, the separate west/east/north/ +south/below rock and air-count passes, fluid-to-block conversion, writes with +flags 2, and immediate fluid tick requests after accepted or rejected writes. +Fluid tick execution is still separate simulation work. + +The [spring comparison](../benchmarks/rust-spring-2026-10-06/scoped-parity.json) +matches **3,649,087 lines per reference JAR** across **172,141 fixtures**. It +covers every state in the gating and neighbor roles, all five-neighbor air/rock/ +other combinations and count pairs, all 37 fluid states, malformed fields, tags, +wrapped positions, partial failures and nested composition. Workspace tests and +all-target Clippy pass. Full fluid spreading and world updates remain pending. + +## Vine feature attachment + +Vine features require an air state at the origin and choose the first acceptable +attachment in Up/North/South/West/East order. They evaluate actual support and +collision shapes and return success after the write request, including when the +world rejects that write. Feature and world random streams are unchanged. + +The [vine comparison](../benchmarks/rust-vines-2026-10-06/scoped-parity.json) +matches **4,315,682 lines per reference JAR** across **224,743 fixtures**, covering +every origin state and every state on each candidate face, support combinations, +wrapped positions, partial failures and composed placement. Workspace tests and +all-target Clippy pass. Vine growth, block updates and complete gameplay remain +pending; this fixture uses absent dynamic block entities. + +## Full-face occlusion + +Block property bindings now cache six full-face occlusion results per state, +sharing calculations for identical imported shapes. These results use native +occlusion rules independently of collision or support geometry. Unknown state +IDs produce an error. + +The expanded [block-property comparison](../benchmarks/rust-block-properties-2026-10-06/scoped-parity.json) +matches **197,180 lines per reference JAR**, including all 35,723 states and +18,096 synthetic shape/flag combinations. Workspace tests and all-target Clippy +pass. Lighting and renderer integration remain separate work. + +## Underwater magma and probability decoding + +Underwater magma now performs native water-column scans, including the upper +scan before the lower scan and repeated boundary reads. Each cube position draws +a probability value before testing block identity and the five required full +occlusion faces. Rejected writes still count as successful placements. + +The [underwater magma comparison](../benchmarks/rust-underwater-magma-2026-10-06/scoped-parity.json) +matches **6,523,072 lines per reference JAR** over **253,252 fixtures**. Both RNG +modes cover the complete radius-64 cube, consuming **2,146,689 draws** with zero +placement probability. Every state in the origin/floor/neighbor roles, scan +limits, partial failures, wrapped radius-zero columns and composition are tested. + +The native comparison exposed signed-zero codec behavior: bounded probabilities +reject `-0.0`, including negative values that round to float zero. Magma and +pillar decoding now preserve this. The expanded pillar gate passes **921,111 +lines per JAR** over **41,746 fixtures**. Workspace tests and all-target Clippy +pass. World updates and magma/fluid gameplay remain pending. + +## Blue ice generation + +Blue ice features now preserve world sea-level gating, water and packed-ice +seeding checks, all 200 spreading attempts, signed vertical radius adjustment, +random draw order and six-direction adjacency. World sea level can differ from +the generation context's sea level. Rejected writes preserve native success and +subsequent attempts observe the actual mutable world. + +The [blue-ice comparison](../benchmarks/rust-blue-ice-2026-10-06/scoped-parity.json) +matches **8,954,666 lines per reference JAR** across **79,944 fixtures**, covering +every origin/candidate state through failure-terminated prefixes, full spreading +runs, all packed-ice neighbor masks, extreme sea levels, wrapped positions, +partial failures and composition. Workspace tests, all-target Clippy and all +149 Python tests pass. Ice gameplay and complete world generation remain pending. + +## Spike geometry and roots + +Spike features now implement descending air search, support predicates, randomized +height and radius, rare elevated spikes, float taper calculations and independent +upper/lower replacement tests. Roots retain the native fixed Y=50 boundary, +corner-specific random lengths, gaps, and exact-state replacement exception. + +The [spike comparison](../benchmarks/rust-spike-2026-10-06/scoped-parity.json) +matches **8,859,761 lines per reference JAR** over **113,127 fixtures**. Every +output/origin/candidate state is covered by failure-terminated prefixes; complete +runs include 1,024 seeds per RNG, replacement and support predicates, repeated +mutations, rejected writes, partial failures and composition. Workspace tests +and all-target Clippy pass. Complete world generation and block updates remain +pending. Pathological descent/root work is bounded to 2^20 visits. + +## End exit podium construction + +End podium features reproduce active/inactive construction, the native distance +cutoffs and box traversal, central bedrock pillar and ordered wall-torch facing. +Active replacement reads block identity, requests destruction with drops and no +responsible entity, then writes the replacement even if destruction was rejected. +Matching blocks skip both requests. + +The [End podium comparison](../benchmarks/rust-end-podium-2026-10-06/scoped-parity.json) +matches **3,309,219 lines per reference JAR** over **38,207 fixtures**. All states +reach active replacement prefixes; full runs cover representative blocks, repeated +construction, rejected destruction/writes, partial failures, composition and +nonoverflow extreme coordinates. Workspace tests, all-target Clippy and all +149 Python tests pass. The fixture controls destruction success and air +replacement; loot, block entities, updates, portal travel and dragon gameplay +remain pending. Pathological overflow-box work is bounded to 2^20 visits. + +## Replacement blobs + +The `netherrack_replace_blobs` feature now clamps the search origin to world +height, descends to a matching block, samples three independent radii and visits +clipped Manhattan shells in native order. Target matching uses block identity +regardless of state properties; rejected writes still produce success. + +The [replacement-blob comparison](../benchmarks/rust-replace-blobs-2026-10-06/scoped-parity.json) +matches **5,538,034 lines per reference JAR** over **109,003 fixtures**, including +every target/output state, all candidate states through failure-terminated +prefixes, every constant radius, six provider families, both RNGs, height +boundaries, wrapped X/Z coordinates, partial failures and composition. Workspace +tests and all-target Clippy pass. World updates and full generation remain +pending; pathological descent is bounded to 2^20 visits. + +## Bamboo and podzol patches + +Bamboo features preserve the initial air gate, real survival checks and native +attempt-success behavior when survival fails. Podzol patches use ordered surface +height requests and the native replacement tag. Stalks preserve random draws and +leaf states, including the first cap overwriting the stopping position when at +least three stalk positions were attempted. + +The [bamboo comparison](../benchmarks/rust-bamboo-2026-10-06/scoped-parity.json) +matches **3,485,027 lines per reference JAR** over **144,452 fixtures**. Every +origin/support/podzol state has a failure-terminated prefix; every obstacle state +has a complete no-podzol run. Tests include both RNGs, signed-zero decoding, +obstruction heights, rejected writes, repeated mutations, wrapped coordinates +and composition. Workspace tests and all-target Clippy pass. Fixture surface +heights are controlled; dynamic height updates, bamboo growth and full gameplay +remain pending. Pathological wrapped patch loops have a 2^20 work limit. + +## Nether delta patches + +Delta features now preserve the double-precision rim chance, conditional rim +offset draws, independent patch radius draws and Manhattan traversal. Placement +checks block identity and ordered air/nonair neighbors, writes the rim, then +checks shifted contents against the mutated world. A zero rim component still +shifts contents even when it disables the rim write. + +The [delta comparison](../benchmarks/rust-delta-2026-10-06/scoped-parity.json) +matches **13,418,994 lines per reference JAR** across **324,269 fixtures**, +covering every origin/content/rim state and all six neighbor roles, every air +mask, radius limits, six provider families, both RNGs, repeated mutations, +rejected writes, partial failures, wrapped positions and composition. Workspace +tests, all-target Clippy and all 149 Python tests pass. The fixture supplies a +flat ground/air boundary with mutable overrides; fluid behavior, world updates +and complete generation remain pending. + +## Biome freezing and snow eligibility + +Registry-bound weather predicates now use the native biome temperature cache, +precipitation selection, build-height and block-light gates. Freezing distinguishes +source water from flowing water, requires a liquid block and optionally checks +water neighbors in west/east/north/south order. Snow accepts air or existing snow +and evaluates the default snow state's actual survival rules. + +The [biome-weather comparison](../benchmarks/rust-biome-weather-2026-10-06/scoped-parity.json) +matches **4,071,594 lines per reference JAR** across **326,057 fixtures**, +covering all states in block/fluid/snow/support/neighbor roles, neighbor masks, +float thresholds and nonfinite temperatures, both temperature modifiers, light +and height boundaries, precipitation flags, repeated queries and partial failures. +Workspace tests and all-target Clippy pass. Native fixture temperature caches +are removed after each independent case to avoid retaining hundreds of thousands +of biomes; repeated queries within a case keep their cache. Dynamic block entities +are absent. Actual weather ticks, lighting propagation and world updates remain +pending. + +## Frozen top layers and snowy ground + +The `freeze_top_layer` feature now visits its 16×16 footprint in native column +order, queries motion-blocking height and retains the selected biome for both +weather checks. Ice is attempted before snow eligibility. Snow attempts are +followed by snowy ground-property updates even if the snow write was rejected. + +The [snow/freezing feature comparison](../benchmarks/rust-snow-freeze-2026-10-06/scoped-parity.json) +matches **7,764,082 lines per reference JAR** over **108,339 fixtures**. Every +ground/candidate/fluid state has a failure-terminated prefix; full runs cover +climate thresholds and NaN, both modifiers, precipitation, light gates, repeated +mutations, rejected writes, partial failures, extreme heights/sea levels, wrapped +coordinates and composition. Workspace tests and all-target Clippy pass. The +fixture uses controlled heights and one biome; lighting propagation, dynamic +biome selection, world updates and full generation remain pending. + +## Generation-stage tick containers + +Proto-chunk tick containers now keep the first type/position request in insertion +order. Newly scheduled ticks retain priority with zero delay; loaded entries +retain their saved delay. Generation tick access routes requests to the selected +container and reports no currently executing ticks or aggregate count. Snapshots +can be promoted into the existing level tick queue. + +The [generation-tick comparison](../benchmarks/rust-generation-ticks-2026-10-06/scoped-parity.json) +matches **101,784 lines per reference JAR**, covering duplicates, saved entries, +snapshot independence, mixed proto/level routing, lookup failures, promotion, +priority boundaries and integer/time extremes. Workspace tests, all-target Clippy +and all 149 Python tests pass. Rust exposes packed entries as an immutable +borrowed slice; mutating Java's returned list is outside this API. Feature-world +scheduling integration and block/fluid tick execution remain pending. + +## Resident generation tick queues + +Resident terrain chunks now own separate block and fluid proto-tick queues. +Feature-world scheduling normalizes block states to block identity, routes to the +chunk containing the original position and advances the region's tick order even +for duplicate requests or missing chunks. Time and order use Java wrapping rules. + +The [resident queue comparison](../benchmarks/rust-feature-region-ticks-2026-10-06/scoped-parity.json) +matches **28,985,883 lines per reference JAR** across **192 fixtures**, with nine +resident chunks each, **2,688 requested feature placements** and **14,784 direct +tick requests**. Both references agree on final sections, heightmaps and saved +ticks. Coverage includes spring scheduling, duplicate block identities, separate +fluid identities, missing chunks, out-of-height positions and time/order overflow. +Workspace tests and all-target Clippy pass. This connects generation-stage queues; +block/fluid tick execution, complete chunk persistence and full world-generation +effects remain pending. + +## Resident block and fluid queries + +Feature regions can bind an immutable snapshot of resolved block/fluid tags and +contained fluid states. The snapshot shares compiled tables with configured +features and rejects bindings from a different block registry. Feature access +forwards fluid, water-tag and block-tag queries against current resident storage. +Missing tags have no members; missing chunks remain query errors. + +The [resident query comparison](../benchmarks/rust-feature-region-queries-2026-10-06/scoped-parity.json) +matches **29,312,766 lines per reference JAR**, retaining the 192 multi-chunk +feature/tick fixtures and adding insertion/removal probes for **all 35,723 block +states**. Each probe checks fluid identity, amount, falling/source/full flags, +water membership and all 300 bundled block tags plus an absent tag. Negative +coordinates, chunk edges, outside-height reads and missing chunks are included. +Workspace tests and all-target Clippy pass; a separate regression covers foreign +registries, binding lifetime and a custom water tag. These queries do not execute +fluid spreading, block behavior or lighting. + +## End gateway structures and exit configuration + +The `end_gateway` feature now places its air, bedrock and gateway blocks in native +box order. A configured exit triggers a block-entity lookup even when the gateway +write was rejected. Missing or unrelated entities are no-ops; a gateway receives +its exit/exact fields before its dirty notification. + +The [gateway comparison](../benchmarks/rust-end-gateway-2026-10-06/scoped-parity.json) +matches **754,877 lines per reference JAR** across **5,820 fixtures**, including +every world-call failure boundary, rejected writes, repeated updates, both random +streams, placement composition, codec edge cases and bounded prefixes of wrapped +coordinate boxes. The reference invokes the actual gateway entity setter and +compares its fields after partial failures. Workspace tests, all-target Clippy and +all 149 Python tests pass. The Python checks also caught and repaired a shared +fixture dependency: decoration retains its six-feature corpus independently of +region spring/tick/query probes; regenerated inputs are byte-identical to their +validated corpora. Gateway entity creation/removal, dirty propagation, exit search +and teleportation remain pending. + +## Bonus chest placement and loot assignment + +Bonus chest generation now independently shuffles the chunk's X and Z columns, +searches motion-blocking-no-leaves heights and checks air or empty collision. +After a chest write it looks up a randomizable container, consuming a loot seed +only when one exists, then checks torch survival in native horizontal order. +Rejected writes retain the subsequent entity and torch operations. + +The [bonus-chest comparison](../benchmarks/rust-bonus-chest-2026-10-06/scoped-parity.json) +matches **1,505,542 lines per reference JAR** across **42,396 fixtures**. All +35,723 states participate in collision prefixes; complete searches cover both +random streams, missing/unrelated/chest entities, sole viable columns, exhausted +searches, repeated mutation, rejected writes, partial failures, extreme positions +and placement composition. Actual native chest loot-table and seed fields are +compared. Workspace tests and all-target Clippy pass. Heights and entity existence +are controlled by the fixture; inventory contents, loot generation, automatic +entity lifecycle and complete spawn generation remain pending. + +## Recursive chorus generation + +Chorus generation now checks its air origin and tagged support, builds and +refreshes connection states, branches recursively within the native depth and +distance bounds, and places age-five terminal flowers. Clearance checks exclude +the parent branch, and rejected writes retain native subsequent reads and draws. + +The [chorus comparison](../benchmarks/rust-chorus-plant-2026-10-06/scoped-parity.json) +matches **8,083,367 lines per reference JAR** across **254,296 fixtures**. Every +state participates in origin/support gates and five neighbor-connection prefixes. +Full growth covers 1,024 seeds per random generator, early failure boundaries, +rejected writes, repeated mutation, random obstacles, wrapped coordinates and +feature composition. Workspace tests and all-target Clippy pass. Neighbor-update +execution, random tick growth, drops, rendering and complete End generation remain +pending. + +## Small pointed formations + +The `speleothem` feature now chooses its growth direction from ceiling/floor +blocks, spreads a base patch, selects one- or two-block height, rechecks its base +and writes waterlogged tip/frustum states. Configured base and pointed states +select block identities; placement uses their defaults. Unsupported pointed-block +properties fail during placement after the preceding patch operations. + +The [speleothem comparison](../benchmarks/rust-speleothem-2026-10-06/scoped-parity.json) +matches **2,752,289 lines per reference JAR** across **145,473 fixtures**, including +all states in support, taller-growth and contained-fluid roles; optional float +defaults and boundaries; both random streams; rejected writes; partial failures; +repeated mutation; wrapped positions; and composition. Workspace tests and +all-target Clippy pass. Neighbor updates, falling behavior, fluid simulation, +larger clusters and complete cave generation remain pending. + +## Generation-time destruction on resident chunks + +Feature access now routes destruction through its supplied write callback using +air and update flags `3`. Air is an immediate false result. This follows +`WorldGenRegion.destroyBlock`, whose generation-time path does not evaluate drops; +live-level destruction remains separate work. + +The [resident destruction comparison](../benchmarks/rust-feature-region-destroy-2026-10-06/scoped-parity.json) +matches **29,502,523 lines per reference JAR** across **192 fixtures**, adding +active/inactive End podiums to the resident feature corpus. The reference invokes +the actual WorldGenRegion method through a subclass that transports reads/writes +to the existing chunk fixture. Final sections, heightmaps, ticks, tag/fluid probes, +rejected writes and partial failures still agree. Workspace tests, all-target +Clippy and all 149 Python tests pass. Write-zone policy, POIs, block entities, +postprocessing execution, lighting and live-world effects remain pending. + +## Generation write radii + +Feature access can now apply the generation step's horizontal write radius before +calling the mutation policy. Ordinary writes and destruction share the guard; +queries and tick scheduling retain their independent routing. The predicate uses +Java wrapping subtraction and absolute value, including integer-minimum cases. + +The [write-zone comparison](../benchmarks/rust-feature-region-write-zone-2026-10-06/scoped-parity.json) +matches **29,231,123 lines per reference JAR**. It adds **20,125 direct zone cases** +for both chunk and block coordinates, then exercises unrestricted, zero-radius, +shifted-center and negative-radius policies across the 192 resident fixtures. +Vanilla's actual public/private write-zone methods provide the reference. Workspace +tests, all-target Clippy and both focused fixture tests pass. The owning world +still supplies generation-step metadata and upgrading-world vertical restrictions; +full WorldGenRegion effects remain pending. + +## Proto-chunk block-entity storage + +Rust now stores pending NBT and caller-owned active block-entity payloads by full +block position. Active insertion removes pending data, later pending insertion +cannot overwrite an active entry, and removal clears both maps. Saving uses the +active serializer when present and otherwise returns a pending snapshot. Changing +pending coordinate fields retains the existing map key. Coordinate resolution +matches NumericTag integer narrowing and floating-point flooring before saturating +conversion, then relocates mismatched X/Z into the owning chunk. + +The [block-entity storage comparison](../benchmarks/rust-block-entity-storage-2026-10-06/scoped-parity.json) +matches **78,251 lines per reference JAR** across **28,511 commands**, using actual +native ProtoChunks and chest entities. Cases cover replacement, removal, position +unions, save selection, missing/nonnumeric coordinates, infinities/NaNs, integer +extremes and positions that alias when packed. Four focused Rust tests and +all-target Clippy pass. Collection order is normalized; Rust exposes borrowed or +owned data instead of unrestricted Java aliases. Entity construction from NBT, +complete serializers, active entity behavior and resident chunk lifecycle +integration remain pending. + +## Upgrading-world write heights + +Feature access can now enforce the upgrading center chunk's generation height +before invoking its write callback. Below-zero proto-chunk upgrades use Y = -64 +through -1, inclusive. Ordinary generation has no vertical policy gate; storage +bounds remain separate. Reads and tick scheduling keep their existing behavior, +and generation-time destruction shares the write guard. + +The [upgrade-height comparison](../benchmarks/rust-feature-region-upgrade-height-2026-10-06/scoped-parity.json) +matches **29,247,433 lines per reference JAR**, including **10,098 height cases**, +20,125 horizontal zone cases and all 192 resident fixtures. The reference calls +actual `WorldGenRegion.ensureCanWrite` with a native ProtoChunk before and after +installing below-zero upgrade data. Direct write probes cover boundary and extreme +heights, ordinary/upgrading modes and horizontal rejection. Five focused Rust +region tests, all-target Clippy and both Python fixture tests passed for that +checkpoint. Subsequent work below adds resident upgrade metadata, cleanup, +bedrock transformations and live center-chunk write policy. Automatic upgrade +activation, biome retention and the complete generation lifecycle remain pending. + +## Chunk-status identities and metadata + +Rust now represents all ten pinned chunk statuses, their ordering and parents, +proto/level chunk classification, structure-distance constant, and selected +heightmaps. Existing pre-light chunks use these definitions for their names and +heightmap groups. Direct name lookup retains vanilla's `empty` fallback; NBT +codec lookup rejects unknown names and writes canonical namespaced identifiers. + +The [chunk-status comparison](../benchmarks/rust-chunk-status-2026-10-06/scoped-parity.json) +matches **4,232 lines per reference JAR** across all 100 ordered status pairs and +**2,065 codec inputs**. Inputs include qualified/unqualified names, empty +namespaces, obsolete and malformed names, random strings and nonstring NBT. +World-crate tests and all-target Clippy pass. Codec error text is normalized. +Status identities do not execute generation tasks: scheduling, lighting, +post-light lifecycle transitions and the complete gameplay runtime remain pending. + +## Below-zero upgrade data and resident transformations + +Resident chunks now hold optional below-zero upgrade data. Installation alone +keeps the data even if the current stage already exceeds its target; assigning a +persisted stage at or beyond that target clears it. Upgrading chunks expose the +-64 through -1 generation interval independently of their storage bounds. + +The Rust upgrade codec validates nonempty target statuses, accepts vanilla's +lenient optional bedrock-hole mask, normalizes trailing zero words and omits an +empty mask when saving. Hole queries wrap local X/Z coordinates. Resident +transformations replace bedrock in the old Y = 0 through 4 band with default +deepslate and clear marked columns through the chunk's current generation height. + +The [upgrade-data comparison](../benchmarks/rust-retrogen-data-2026-10-06/scoped-parity.json) +matches **20,626 lines per reference JAR** across **5,114 codec inputs**, including +canonical output, all 256 column bits, out-of-footprint bits, signed numeric +streams, malformed optional fields and random masks. Codec error text is normalized. +The [resident upgrade comparison](../benchmarks/rust-retrogen-chunk-2026-10-06/scoped-parity.json) +matches **3,028,057 lines per reference JAR** across **138 fixtures**. It checks all +nine nonempty targets against the six pre-light stages, repeated/backward stage +assignments, complete stored sections and heightmap words after replacement and +masking, partial vertical overlap, empty sections and changed generation bounds. +World-crate tests and all-target Clippy pass. Save-dirty notifications, post-light +transitions, biome retention, structure restrictions, automatic generation +scheduling and full saved-world/gameplay integration remain pending. + +## Live upgrade permissions and retained biome status + +Feature access can bind a resident center chunk and read its upgrade state before +every write. Successful callbacks that complete, remove or reinstall an upgrade +affect the next write through the same access object. The destination chunk's +upgrade state does not select this region-wide height gate. Explicit fixed-height +policies remain available for callers that need a supplied interval. + +Resident chunks also expose vanilla's highest generated status: the later of +their current persisted stage and retained upgrade target. Region biome reads use +this status, allowing access to old biomes while below-zero regeneration is still +at an earlier stage. Removing upgrade metadata restores the persisted-stage gate. + +The [live region comparison](../benchmarks/rust-live-upgrade-region-2026-10-06/scoped-parity.json) +matches **29,248,297 lines per reference JAR**, extending the 192 resident fixtures +with **54 lifecycle cases**. It compares native write permission, highest status +and actual ProtoChunk biome-read availability across all six pre-light stages and +nine nonempty upgrade targets. The [retained-status comparison](../benchmarks/rust-retained-upgrade-status-2026-10-06/scoped-parity.json) +also matches **3,028,057 lines per JAR** across 138 upgrade fixtures. Seven focused +region tests, all-target Clippy and the region corpus test pass. These checks do +not yet cover the biome resolver's cave-biome retention, structure restrictions, +automatic scheduling or complete saved-world integration. + +## Retained biomes during below-zero generation + +The [biome-retention implementation](biome-lookup.md#below-zero-biome-retention) +now preserves the pinned three cave-biome candidates and otherwise reads the old +column at quart Y = 0. The resolver captures upgrade activation at construction; +candidate failures precede fallback reads. Section fills preserve native commit +ordering and partial-failure behavior while allowing access to old biome storage. + +The [retention/fill comparison](../benchmarks/rust-retrogen-biome-fill-2026-10-06/scoped-parity.json) +matches **593,152 lines per JAR** across 740 fills and 2,800 direct queries. The +[generation integration](../benchmarks/rust-retrogen-biome-generation-2026-10-06/scoped-parity.json) +matches **834,080 lines per JAR** across 396 fixtures and 610 fills, including 144 +upgrading chunks alongside the ordinary-generation cases. It executes actual +native `ChunkGenerator.doCreateBiomes`, including retained-status old biome reads, +native below-zero generation bounds, repeated fills and all biome-source kinds. +This closes the resolver gap described in the preceding checkpoint. Nonempty +blending, structure restrictions, automatic generation scheduling and complete +saved-world/gameplay integration remain pending. + +## Active status-effect storage and notifications + +Rust now composes shared status instances with native-order map storage for +entity effect addition, forced replacement, removal, clearing and blend lookup. +It preserves eligibility checks, source identity, hidden-chain updates, blend +transfer, callback order, and mutations made while callbacks are running. Clearing +copies the map before removing live entries and reports effects in the copied +map's iteration order. + +The [active-effect comparison](../benchmarks/rust-active-effects-2026-10-07/scoped-parity.json) +matches **535,063 lines per reference JAR** across **1,266 fixtures**, using actual +vanilla entity storage methods, status instances and JDK maps. Native holder hash +and identity-hash values are captured separately for each reference process. +World-library and fixture Clippy checks pass. Eligibility policy, attribute and +packet notifications, and registered effect behavior remain controlled in these +checks. Consumable integration, the entity effect tick loop and complete gameplay +remain pending; this is scoped evidence, not full-game parity. + +## Consumable effects bound to entity storage + +`StoredConsume` now binds concrete apply/remove/clear consume effects to the +entity's shared active-effect map. Consumable additions use a null source and +ordinary status-instance copies, then execute the entity's eligibility, update +and notification sequence. Sound and RNG services receive access to live storage +so callback mutations affect subsequent operations. + +The [combined comparison](../benchmarks/rust-stored-consume-2026-10-07/scoped-parity.json) +matches **1,214,124 lines per reference JAR**, executing actual native consume +effects and inherited entity storage together. It covers both random generators, +probability boundaries, duplicate inputs, hidden chains, colliding holder keys, +map-copy removal order, callback mutations and failure prefixes. World-library +and fixture Clippy checks pass. Eligibility policy, registered effect behavior, +attribute/packet notifications and sound delivery remain controlled. Named +holder-set binding, the full player consumption lifecycle and complete gameplay +remain pending. + +## Entity effect tick loop and client particles + +The Rust entity effect loop now iterates shared active storage, removes expired +effects before notifying observers, reports hidden-effect restoration, and +refreshes surviving effects on vanilla's 600-tick duration boundary. It uses the +actual level class distinction. Server iteration catches concurrent-modification +failures from map iteration or callbacks; the initial level query and client +iteration preserve their propagating failure behavior. Value replacement alone +does not invalidate iteration, and callbacks continue using captured instances. + +Client ticks advance each instance's duration and blend, then read synchronized +particle/ambience data, apply the invisibility-dependent random interval, and +select particles from the captured list. Position queries and the destination +level preserve native evaluation order. + +The [effect-loop comparison](../benchmarks/rust-active-effect-tick-2026-10-07/scoped-parity.json) +matches **1,732,406 client-JAR lines** and **1,732,849 server-JAR lines** across +**4,036 fixtures**. Each reference exports its own holder identity hashes; those +hashes can change iteration order and subsequent callback paths between JVMs. +The checks execute inherited native entity and instance methods, native maps, +synchronized data and both RNG implementations. Library and fixture Clippy pass. +Registered effect bodies, attribute/packet notification side effects and random +position methods are still controlled. Complete entity ticking, gameplay and +playable platform builds remain pending. + +## Pending-attribute set storage + +Rust now implements the default fastutil object set used by vanilla attribute +update and synchronization queues. It preserves null membership, retained key +identity, native slot order, growth/shrink behavior and iterator removal across +wrapped clusters. Iterators read the live slot array and retain their original +remaining count; external mutations have native failure prefixes rather than +HashMap-style concurrent-modification checks. + +The [set comparison](../benchmarks/rust-object-open-set-2026-10-07/scoped-parity.json) +matches **611,998 lines per reference classpath** against the pinned fastutil +8.5.18 library. Library and fixture Clippy pass. The gate covers default set +operations and live iteration; alternate constructors, bulk methods, and external +structural mutation followed by iterator removal remain outside its scope. +Binding this storage to attribute refresh and the complete entity lifecycle is +the next step; this collection comparison does not establish gameplay parity. + +## Effect eligibility and entity notification bodies + +Effect eligibility now follows vanilla's ordered immunity-tag branches. Entity +effect callbacks mark synchronization dirty, retain captured effect/map handles, +apply or remove modifiers, refresh pending attributes and construct passenger +update/removal packets in native order. New effect storage starts dirty, matching +the entity constructor. Attribute refresh reads its captured live fastutil set +and clears that same set only after every callback succeeds. Passenger lists +remain captured while later connection fields and packet data are read at their +native evaluation points. + +The [notification comparison](../benchmarks/rust-effect-notifications-2026-10-07/scoped-parity.json) +matches **1,667,616 lines per reference JAR**, exercising inherited native +eligibility, notification, refresh and passenger methods together with effect +storage. The fixtures use actual status instances, pending sets, immutable +passenger lists and packet constructors. Library and fixture Clippy pass. +Modifier bodies, attribute-update consequences and packet transport are still +controlled; their full bindings and complete gameplay remain unfinished. + +## Attribute-update consequences and health storage + +Pending attribute refresh now dispatches native max-health, max-absorption, +scale and waypoint-range consequences. Lowering a health limit compares against +the first captured maximum, then uses the ordinary setter and its fresh limit +lookup. Health synchronization retains its selected data object through later +callbacks. Waypoint changes capture the server manager before reading the +actor's direct attribute-map field, and track only a strictly positive range. + +The [combined attribute-update comparison](../benchmarks/rust-attribute-updates-2026-10-07/scoped-parity.json) +matches **3,111,429 lines per reference JAR**, including the notification corpus, +finite/nonfinite limits, signed zero, dirty health callbacks, map/manager changes +and failure prefixes. Actual native effect notifications, attribute-update +methods, health setters and synchronized Float storage execute together. Library +and fixture Clippy pass. Attribute values, dimension rebuilds and waypoint-manager +internals remain controlled. Registered modifier bodies, full player integration +and complete gameplay/platform builds are still unfinished. + +## Effect-modifier map storage + +The default fastutil object map now preserves native slot order, nullable keys +and values, growth/shrink behavior and live indexed entry handles. Entry +iterators invalidate their current handle on removal; older handles continue +reading the live arrays at their stored indexes. Callback traversal captures the +key array but reads values from the current array, including after a rehash. +Writes through a stale entry into an empty slot do not make that key present. + +The [map comparison](../benchmarks/rust-object-open-map-2026-10-07/scoped-parity.json) +matches **1,142,630 lines per reference classpath** against pinned fastutil +8.5.18. Library and fixture Clippy pass. The gate includes collision clusters, +equal-key identity retention, entry mutation/invalidation and traversal callback +failure prefixes. Alternate constructors, custom default return values, +compute/merge/bulk APIs and external structural mutation combined with iterator +removal remain outside this scope. Effect-modifier and full gameplay integration +remain unfinished. + +## Effect attribute templates and permanent modifiers + +Effect modifier definitions now scale their amount with vanilla's wrapping +amplifier addition and create a fresh modifier identity on each application. +Application looks up the attribute instance, removes the current definition's +modifier, then reads the indexed definition again before creating and adding a +permanent modifier. This preserves callback changes between those operations. +Missing attribute instances skip template access, and failures retain preceding +map and attribute writes. + +The [modifier comparison](../benchmarks/rust-effect-attribute-modifiers-2026-10-07/scoped-parity.json) +matches **1,421,730 lines per reference JAR** across **3,317 fixtures**. It executes +native effect modifier methods with real attribute instances, including cached +values, permanent membership, dirty observers, nonfinite arithmetic, identity, +map rehashes and callback failures. Library and fixture Clippy pass. The fixture +asserts actual holder hashes when constructing collision cases. Attribute-map +lookup and dirty callback receivers remain controlled. Registered effect +definitions, pending queue ownership, entity bindings and complete gameplay/ +platform builds remain unfinished. + +## Attribute-map creation and live queues + +Effect modifiers now have a concrete attribute-map storage path with separate +instance lookup, update and synchronization collections. Lazy creation copies +the supplier before inserting the instance into the lookup map. Its dirty +callback adds the update entry before checking synchronization eligibility, so +a failed creation can leave an instance queued without a lookup entry. Later +lookups can create a second instance while the first remains queued. Successful +creation uses an ordinary map insertion after the callback, preserving callback +replacement, resize and alias behavior. + +The [stored-attribute comparison](../benchmarks/rust-stored-effect-attributes-2026-10-07/scoped-parity.json) +matches **4,543,569 lines per reference JAR**. It combines actual native effect +modifier methods, attribute-map lookup, supplier creation, attribute-instance +replacement and permanent modifiers with real pending sets. Native instance +identity hashes are captured separately for each JVM and replayed in Rust. +Library and fixture Clippy pass. Basic-attribute default/synchronization methods +remain controlled callbacks; the fixture covers queue and lookup mutation but +not arbitrary recursive instance mutation. Registered definitions, entity +notification binding, bulk map methods and complete gameplay/platform builds +remain unfinished. + +## Entity notifications bound to stored attributes + +The stored-attribute adapter now connects effect modifier dispatch to a captured +attribute map, supplier creation and instance operations. Entity effect +notifications and pending refresh execute over the same concrete lookup and +update/synchronization sets, preserving queued instance identity after lookup +aliasing or removal. Refresh clears the pending update set only after every +attribute callback succeeds. + +The [combined notification comparison](../benchmarks/rust-stored-effect-notifications-2026-10-07/scoped-parity.json) +matches **21,117,051 lines per reference JAR**. It includes the full previous +stored-attribute corpus plus inherited native entity notification and private +refresh methods, client guards, dirty state, optional reapplication, empty +removal and callback failure/queue mutation. Library and both affected fixture +Clippy checks pass. Native JVM instance hashes are replayed separately per +reference. Attribute-update consequences and basic-attribute default/syncability +methods remain controlled; passenger lists are empty here, with packet behavior +covered separately. Registered attribute/effect definitions, combined health +and dimension consequences, complete entity gameplay and platform builds remain +unfinished. + +## Stored attribute queries and base reset + +Attribute-map queries now select the existing instance or supplier prototype +without creating an instance. Computed values preserve the selected object's +cache, and modifier queries distinguish missing cached modifiers from supplier +lookup failures. Base reset checks supplier membership before looking up the +current instance, then retains that instance across the supplier base lookup. +Resetting a supported attribute with no instance leaves it uncreated. + +The [query comparison](../benchmarks/rust-attribute-map-queries-2026-10-07/scoped-parity.json) +matches **34,531,715 lines per reference JAR**. It includes the full stored +notification corpus, actual native map query/reset methods, mutable supplier +prototypes, reference-sharing modifiers, alias/null lookup entries, prototype +and instance cache state, nonfinite arithmetic and dirty callback failures. +Library and fixture Clippy pass. Present supplier prototypes are non-null; +custom virtual prototype methods, registered ranged-attribute integration and +combined health/dimension consequences remain outside this gate. Complete +gameplay and playable platform builds remain unfinished. + +## Live registered attribute component + +Registered entity attributes now have a reusable component combining immutable +catalog defaults with lazy instances, effect modifiers and native-order lookup, +update and synchronization collections. Instance handles retain their identity +independently of pending queue membership. Queries and base resets leave absent +instances uncreated; effect application uses the same stored instance and queues +as direct edits. + +The [live attribute comparison](../benchmarks/rust-live-attributes-2026-10-07/scoped-parity.json) +matches **8,350,018 lines per reference JAR**. Client and server exports agree on +all **40 attributes and 93 entity suppliers**. The gate includes the previous +entity-attribute corpus, range boundaries, null lookups, modifier identities and +caches, nonfinite values, wrapping amplifiers and independent/bulk queue +acknowledgements. It replays each JVM's actual holder and instance hashes to +compare collection order. Library and fixture Clippy pass. + +This component assumes immutable registered defaults with no modifiers; the +exporter verifies that assumption. Mutable custom suppliers and their internal +caches use the separate generic storage interfaces. Combined entity health and +dimension consequences, full gameplay, save/network codecs and the playable native +Linux build remain unfinished. + +The production health binding now accepts the live component through computed +attribute queries. Healing, health and base absorption limits, synchronized +health storage and hunger regeneration therefore share its stored values and +modifier engine. The [health integration comparison](../benchmarks/rust-live-attribute-health-2026-10-07/scoped-parity.json) +matches **666,082 lines per reference JAR for each storage backend**, including +all 93 entity suppliers and observer failure prefixes. All `horizon-world` +targets compile, and library/affected fixture Clippy checks pass. This borrowed +binding keeps its selected attribute map fixed; entity virtual dispatch, +attribute refresh, player absorption synchronization and starvation damage +delivery still require their complete runtime integration. + +## Entity refresh over live registered attributes + +The live attribute bridge now connects virtual entity queries and pending +attribute refresh to registered storage and attribute-update dispatch. Refresh +retains its selected map through callbacks and clears that map's pending set +only on success. Health and absorption consequences read actual computed limits; +waypoint updates retain their manager before reading the direct attribute-map +field. Scale changes dispatch dimension refresh. + +The [combined live update comparison](../benchmarks/rust-live-attribute-updates-2026-10-07/scoped-parity.json) +matches **2,836,190 client-reference lines and 2,836,234 server-reference lines**. +It executes actual native notifications, modifier loops, registered attribute +queries, private refresh, health/absorption update bodies and synchronized Float +storage. Cases cover all registered attributes/default suppliers, selected and +captured map/data handles, callbacks changing limits or queues, null pending +members, client guards, empty removals and failures late in large refreshes. +Each reference uses its own JVM identity hashes, so callback-mutation paths can +produce different trace lengths between runs. Library and fixture Clippy pass. + +Dimension rebuilding and waypoint-manager internals remain controlled, and +passenger lists are empty in this combined fixture. Full active-effect lifecycle +and particle/invisibility synchronization, player absorption storage and complete +gameplay/platform integration remain unfinished. + +## Registered effect presentation synchronization + +Effect synchronization now builds the visible particle list in active-map order, +updates invisibility and ambient state, and preserves the server/client glowing +branches and shared flags. It retains each selected synchronized-data object and +clears effect dirtiness only after both visibility and glowing updates succeed. +Removing the particle list leaves the ambient field unchanged, matching vanilla. + +The registry exporter verifies all **40 effect factories**: **34** create fresh +colored options, while **six** return constant simple particles. Colored options +use native object identity, so equal colors in newly created lists still trigger +updates. Constant options retain identity. Synchronized storage now supports +shared list values as well as scalar fields, preserving callback and dirty-flag +ordering. + +The [effect synchronization comparison](../benchmarks/rust-effect-sync-2026-10-07/scoped-parity.json) +matches **2,754,744 lines per reference JAR**, including repeated updates, +ambient/visible combinations, callback map changes, captured data objects, +reentrant writes/packing and failure prefixes. The +[byte](../benchmarks/rust-effect-sync-2026-10-07/synced-bytes-regression.json) and +[float](../benchmarks/rust-effect-sync-2026-10-07/synced-floats-regression.json) +storage regressions also pass against both JARs. Library and affected fixture +Clippy checks pass, and all world targets compile. + +The registered factories have no world access; the exporter verifies their +inherited implementation and captured arguments. This permits an immutable map +traversal during particle creation. Custom impure factories remain outside this +binding. Rendering, transport, full entity lifecycle integration and playable +Linux gameplay remain unfinished. In this pinned version, +`LivingEntity.updateDataBeforeSync` invokes dirty effect synchronization; it is a +separate phase from `tickEffects`. diff --git a/docs/scheduled-ticks.md b/docs/scheduled-ticks.md new file mode 100644 index 000000000..e6faca658 --- /dev/null +++ b/docs/scheduled-ticks.md @@ -0,0 +1,136 @@ +# Horizon scheduled ticks + +The Rust scheduler targets the repository-pinned **Minecraft Java Edition +26.3**. It implements scheduled block/fluid queue mechanics and saved tick +lists. Actual block/fluid updates, random ticks, block events, neighbor updates, +redstone behavior and a running game world remain unimplemented. + +## Behavior + +`horizon_core::ticks` supplies `TickPriority`, `ScheduledTick`, `SavedTick`, +`ChunkTicks` and `LevelTicks`. A numeric `TickTypeId` represents a registry-owned +block or fluid type. Block and fluid scheduling use separate `LevelTicks` +instances. Callers supply identities, game time, sub-tick counters, eligibility, +per-call tick limits and behavior callbacks. + +The first request for a type and position wins, even if a duplicate has an +earlier trigger time or a higher priority. A chunk queue orders by signed +trigger time, then one of seven priorities, then signed sub-tick order. Once +heads are due, **different chunks compete by priority and sub-tick order**. +Consequently, globally sorting every tick by trigger time changes execution. +Within the selected chunk, draining stops when its next head loses to the +competing chunk head, exceeds the time bound, or exhausts the tick limit. + +Equal comparator keys follow the pinned Java array heap behavior. Deadline +traversal follows the pinned fastutil long-map layout, including resizing, +collision shifts and wrapped iterator removals. These details matter when +loaded ticks in different chunks share priority and negative sub-tick order. +They are covered by differential tests rather than replaced with a new tie +breaker. The heap stores tick records inline and retains collection capacity +between frames. Area operations probe small chunk grids directly and visit +only loaded chunks for large sparse areas, preserving X/Z traversal order. +No game FPS or memory gain has been measured. + +Collection happens before callbacks. A callback can schedule, query, clear, +copy, disable or unload chunks; newly scheduled ticks wait for the next +collection. `has_scheduled` covers container queues and pending saved ticks; +`will_tick_this_tick` covers the remaining collected queue. The current callback +has already moved to the already-run list. Vanilla's lazily built membership +set can remain stale after an area clear; that behavior is preserved until +cleanup. Area copying includes already-run, collected and queued ticks and +places copied sub-tick orders after the copied source range with wrapping +signed-long arithmetic. + +Disabled chunks retain due entries. Removing a container returns its queue +for saving or later reinsertion; collected callbacks still run. Scheduling into +an absent chunk returns `MissingChunk` and does not enqueue. The Rust API adds +invariant checks for duplicate chunk insertion, wrong-chunk contents and invalid +collection phase transitions. These checks differ from Java's unchecked API +and logging, while preserving the tested valid lifecycle. + +## Persistence and use + +Saved ticks hold a signed 32-bit relative delay. Packing narrows the wrapped +time difference as Java does and stably sorts active ticks by sub-tick order. +Pending saved entries precede active entries. Unpacking assigns orders from +`-saved_count` through `-1` and adds delays with signed-long wrapping. Vanilla +does not deduplicate a saved list during unpack; duplicate entries and their +membership behavior are retained. + +`horizon_world::tick_data` bridges the vanilla `i`, `x`, `y`, `z`, `t`, `p` +fields to type IDs through caller-supplied names. `ChunkData::saved_ticks` +loads a pending container and filters out positions belonging to other chunks; +`set_saved_ticks` writes packed entries while preserving unrelated root data. +The separate block/fluid name lookup is required because their IDs are not +the resident section's block-state IDs. + +```rust +use horizon_core::{position::ChunkPos, ticks::{LevelTicks, ScheduledTick}}; +use horizon_world::{chunk::ChunkData, tick_data::TickKind}; + +fn run_saved_blocks( + chunk: &mut ChunkData, + now: i64, + resolve: impl FnMut(&str) -> Option<horizon_core::ticks::TickTypeId>, + name: impl FnMut(horizon_core::ticks::TickTypeId) -> Option<String>, + run: impl FnMut(&mut LevelTicks, ScheduledTick), +) -> Result<(), Box<dyn std::error::Error>> { + let pos: ChunkPos = chunk.position(); + let mut pending = chunk.saved_ticks(TickKind::Block, resolve)?; + pending.unpack(now); + let mut level = LevelTicks::default(); + level.add_chunk(pos, pending)?; + level.tick(now, 65_536, |_| true, run)?; + let pending = level.remove_chunk(pos).unwrap(); + chunk.set_saved_ticks(TickKind::Block, &pending.pack(now), name)?; + Ok(()) +} +``` + +The caller supplies the behavior callback. A game integration must check the +current block/fluid type, invoke its actual behavior, +apply resulting state/neighbor/light changes, and persist remaining queues +through the chunk lifecycle. The scheduler alone does not provide gameplay. + +## Validation + +```sh +cargo test --workspace +cargo clippy --workspace --all-targets -- -D warnings +python3 tools/test_tick_parity.py --prepare +``` + +The runner authenticates both official reference JARs and dependencies against +the repository lock and bundled hashes. An original Java adapter invokes the +actual `LevelTicks`, `LevelChunkTicks`, `ScheduledTick`, `SavedTick` and +`TickPriority` classes; expected traces are not computed by another port. + +The corpus has **25,815 commands**, including **2,096 tick invocations**, and +produces **97,776 matching output lines per reference JAR**. It covers: + +- All priorities, overdue chunk competition, exact comparator ties, duplicate + requests and signed time/order extremes. +- Map growth/shrink, collisions crossing the table boundary, limited draining, + disabled chunks, unloading and restoration. +- Pending-list duplicates, save packing, negative load orders and repeated + save/reload with changed game time. +- Membership queries and rescheduling, clearing, copying, unloading or + disabling chunks during callbacks. +- Eight deterministic randomized scenarios with queue snapshots, saves, + eligibility changes and area operations. + +A separate adapter uses the actual block and fluid `SavedTick` registry codecs. +Rust loads, filters, unpacks, polls, reschedules and saves **251 block ticks and +251 fluid ticks**. Vanilla checks the resulting NBT and a Rust-written region +chunk. Fixtures include duplicate saved entries, out-of-chunk coordinates, +negative delays, overflowing times and numeric NBT coercions including NaNs, +infinities and narrowed longs. + +Offline tests cover phase guards, eligibility, callback deferral, ordering, +area membership, copying, invalid data and atomic saved-list updates. CI runs +this suite alongside core and world-data comparisons. Evidence stays under +`.local/rust-tick-parity/`; success reports are cleared before each run and +source hashes must remain unchanged during validation. The checked-in +[scoped report](../benchmarks/rust-ticks-2026-10-05/scoped-parity.json) contains +metadata and hashes only. Line counts are corpus observations, not gameplay +coverage percentages or proof of complete vanilla parity. diff --git a/docs/shader-world-smoke.md b/docs/shader-world-smoke.md index 6a8464212..c0277408e 100644 --- a/docs/shader-world-smoke.md +++ b/docs/shader-world-smoke.md @@ -54,7 +54,7 @@ snapshot. Waiting state contains only six booleans and a tick count; arbitrary screen names, messages and paths are excluded. An unsuccessful research run remains unsuccessful. Playable shader/backend defaults remain unchanged. -Diagnostic repeat [37199837867](https://github.com/ludovic111/minecraft-optimization-lab/actions/runs/37199837867) +Diagnostic repeat [37199837867](https://github.com/ludovic111/Horizon/actions/runs/37199837867) uses the richer diagnostics. Both cases again hit the 240-second timeout and require bounded termination. OpenGL initializes its device and loads a world with a player, no overlay, an active window and no pause; a screen remains diff --git a/docs/structure-density.md b/docs/structure-density.md new file mode 100644 index 000000000..448d462c9 --- /dev/null +++ b/docs/structure-density.md @@ -0,0 +1,43 @@ +# Structure terrain-adaptation density + +`horizon_core::density::Beardifier` implements the pinned Java Edition **26.3** +structure-density sampler from supplied ordered rigid pieces, jigsaw junctions +and an affected bounding box. It supports `NONE`, `BURY`, `BEARD_THIN`, `BEARD_BOX` +and `ENCAPSULATE` adjustments. Live structure discovery, filtering and placement +remain separate work. + +The sampler retains float accumulation order, wrapped coordinate arithmetic, +ground-level deltas, the 24-by-24-by-24 kernel and vanilla's inverse-square-root +approximation. Its kernel is computed once from the formula. No extracted vanilla +kernel data is stored in the source tree. The immutable sampler can be attached +to `WorldField::Beardifier` and shared between worker contexts. + +Scalar reads return zero outside the affected box. Bulk reads clear the entire +output, including an oversized tail, then scan the clipped strided volume. +Vanilla floors the lower clipping index rather than rounding it upward, so a +first bulk sample can be outside the scalar bounds. Horizon preserves this +scalar/bulk distinction. A missing affected box produces zero even if component +lists are nonempty. Bounds supplied to the Rust constructor must already be +normalized; short output buffers return a typed error before mutation. + +Run: + +```sh +python3 tools/test_structure_density_parity.py +``` + +The [local report](../benchmarks/rust-structure-density-2026-10-06/scoped-parity.json) +records **1,360,095 matching output lines per reference JAR** across **183 fixtures**, +**28,093 scalar queries** and **339 volumes**. The original Java adapter calls the +actual `Beardifier` constructor and samplers. Cases include every adjustment mode, +the full junction kernel neighborhood, ground offsets, overlapping components, +reversed accumulation order, null/empty bounds, floor clipping, output tails and +extreme wrapped coordinates. Float outputs are compared by raw bits with +canonical NaNs. + +The report records the authenticated JARs, source and fixture hashes. Raw outputs +stay private under `.local`. CI runs the comparison on its configured platforms; +the local `Math.pow`-derived kernel check does not establish cross-platform math +parity. The [noise-fill comparison](terrain-filling.md) also checks supplied structure +density through final-density and aquifer graphs. Structure-start selection, +invalid-box repair and complete structure terrain generation remain pending. diff --git a/docs/terrain-filling.md b/docs/terrain-filling.md new file mode 100644 index 000000000..8daf2804d --- /dev/null +++ b/docs/terrain-filling.md @@ -0,0 +1,88 @@ +# Noise-stage terrain filling + +Horizon now connects final-density sampling, aquifer selection, resident block +sections, world-generation heightmaps and fluid postprocessing for the pinned +Minecraft Java Edition **26.3**. This implements the initial noise fill, before +the [surface stage](material-surfaces.md#chunk-surface-stage), features and +structure placement. + +`TerrainChunk` owns registry-backed `BlockSection` palettes, non-air counts, +optional heightmaps and per-section postprocessing offsets. Raw section reads +retain stored cave/void air; chunk reads collapse an all-air section to AIR, as +vanilla `ProtoChunk` does. Block air/fluid behavior and tag membership come from a +`TerrainBlockStates` provider tied to the same immutable registry. + +`fill_noise` samples the entire final-density volume before writing blocks. It +then visits increasing Z, increasing X and decreasing Y. Aquifer results use the +default solid block when absent. Exact default AIR results skip writes, preserving +any prior block at that position. Other states are written before updating +`OCEAN_FLOOR_WG`, then `WORLD_SURFACE_WG`. A scheduled aquifer result with nonempty +fluid appends its packed offset; repeated offsets are retained in insertion order. + +The aquifer and final-density sampler share a context. The caller constructs the +aquifer first, then compiles final density through the same compiler. The Rust +fill API accepts a full 16-by-16 chunk footprint with unit steps and a positive +vertical subrange inside its bounded chunk. Typed failures retain earlier writes +and sampler/aquifer state. Developer diagnostic surface markers are outside this +regular-gameplay path. + +Run the differential comparison with: + +```sh +python3 tools/test_terrain_parity.py +``` + +The [local report](../benchmarks/rust-terrain-2026-10-06/scoped-parity.json) records +**7,950,873 matching output lines per reference JAR**, checked against both client +and server. **114 fixtures** perform **200 fills**; **61 fixtures** enable noise-based +aquifers. Cases include all seven bundled routers, their aquifer configurations, +both random algorithms, multiple seeds and positive/negative chunk coordinates, +synthetic density roots, nondefault fluid-bearing states, prefilled chunks, +partial-height fills and repeated fills using the same caches. An additional +24 fixtures bind rigid-piece and junction density through the actual noise chunk, +including synthetic final-density and aquifer roots that consume that field. + +After every fill, the suite compares every raw section state, both packed +heightmaps, the final fluid-scheduling flag and every ordered postprocessing +offset. The reference invokes actual vanilla `NoiseChunk` and +`NoiseBasedChunkGenerator.doFill`, with empty blending and empty or supplied structure-density fields. +Rust resolves bundled tags and compiles density and aquifer roots itself. +Block identities/properties and air/fluid facts are private exports, generated +independently by both authenticated JARs and required to agree. Importing these +facts does not implement the underlying block behaviors. Placeholder material +and biome holders are never evaluated in this fill-only comparison. + +Reports capture source and fixture hashes, and the runner rejects changes during +validation. CI includes the comparison on its configured platforms; the local +report does not establish remote results. Complete generated terrain still needs +biome assignment, structures, features, nonempty +blending and live structure discovery, lighting and chunk lifecycle integration. These +results do not establish a playable client or whole-game performance improvements. + +The [combined surface-stage suite](material-surfaces.md#chunk-surface-stage) now +checks noise filling followed by surface application through shared density +contexts for all seven bundled terrain settings. + + +## Block writes across generation stages + +`PreLightChunkStage` represents the six statuses from empty through features. +`TerrainChunk::set_block_worldgen` maintains the two world-generation maps through +biomes, then the four final maps at terrain/features. Assigning a stage alone +neither clears nor primes maps. Writes update existing selected maps first and +then prime missing selected maps; maps belonging to earlier stages retain their +stored values. This also preserves native behavior when an earlier stage is +assigned again. + +Run `python3 tools/test_chunk_stage_parity.py`. The +[stage report](../benchmarks/rust-chunk-stage-2026-10-06/scoped-parity.json) records +**8,090,090 matching lines per reference JAR** across 32 fixtures. Every pinned +block state is inserted and removed under both map groups. The comparison uses +actual `ProtoChunk.setBlockState` and persisted-status assignment, checking returned +old states, chunk reads, map presence/heights, packed map words and raw sections. +It also covers forward/backward transitions, explicit priming, empty-section AIR +writes, out-of-height writes and wrapping X/Z coordinates. + +This implements stage-dependent storage mutation. Scheduling, saved status +metadata, retrogen, lighting, block entities and complete region behavior remain +pending. diff --git a/docs/value-providers.md b/docs/value-providers.md new file mode 100644 index 000000000..dfca9216f --- /dev/null +++ b/docs/value-providers.md @@ -0,0 +1,63 @@ +# World-generation value providers + +Horizon implements the scalar distributions needed by the pinned Java Edition +**26.3** cave and canyon definitions. `FloatProvider` supports constant, uniform +and trapezoid distributions. `IntProvider` supports constant, uniform, biased and +very biased distributions, trapezoids, recursively clamped sources and weighted lists. + +Decoding retains vanilla numeric narrowing, field defaults and validation rules. +Sampling preserves float operation order, wrapping integer bounds and the number +of random draws. Symmetric integer trapezoids use vanilla's distinct two-draw +subtraction path. Constant float codecs normalize both signed zeros to positive +zero. Invalid random bounds return an error without silently replacing a result. + +Run `python3 tools/test_value_provider_parity.py`. The +[local report](../benchmarks/rust-value-provider-2026-10-06/scoped-parity.json) +records **429,920 matching lines per vanilla JAR**, across **504 definitions** and +**5,040 seeded fixtures**. The suite invokes actual provider codecs, reads declared +bounds and compares up to 64 samples per valid fixture. Every sample is followed +by a random long, checking draw consumption as well as output. Both random modes, +signed zeros, overflow, equal/reversed ranges, negative plateaus, malformed fields, +duplicate keys and sampling failures are covered. + +Gaussian providers and canonical provider encoding remain pending. A local +Gaussian-math probe found double-bit differences between the host Rust logarithm +and the pinned JVM; using the system logarithm directly would not establish exact +Gaussian parity. +This scoped comparison does not establish complete carver or world-generation +parity. Provider definitions use a bounded decoder; nested integer clamps are +limited to depth 256 and 65,536 total provider nodes. + + +## Anchored height providers + +`HeightProvider` supports constant, uniform, biased, very biased, trapezoid and weighted +heights using all four vertical-anchor kinds. Empty resolved ranges return the +vanilla fallback without drawing randomness. Very biased heights preserve the +guarded inclusive draws, while trapezoid heights retain their distinct sampling +behavior even for symmetric bounds. Anchor resolution and bound arithmetic wrap +as signed Java integers. + +Run `python3 tools/test_height_provider_parity.py`. The +[height-provider report](../benchmarks/rust-height-provider-2026-10-06/scoped-parity.json) +records **507,660 matching lines per JAR**. The suite compares actual +`HeightProvider.CODEC` parsing and up to 32 samples per valid definition/context, +with subsequent random longs. It covers all four anchors, ordinary and overflowing +generation contexts, empty/equal ranges, defaults and invalid inner/plateau fields, +and anchor-versus-dispatch preference. Warning logs are excluded. Height-provider encoding remains pending. + + +## Weighted choices + +Weighted integer and height providers retain entry order, nested providers and +zero-weight entries. Integer bounds include zero-weight entries even though they +cannot be selected. Every selection consumes one bounded draw, including a +singleton of weight one. Total weights must be positive and no greater than +2,147,483,647; native constructor rejections are recorded as decode errors. + +Rust stores cumulative weights and selects by binary search, avoiding allocation +proportional to total weight. The differential suites cover totals on either side +of vanilla's 64-weight selector threshold, maximum and overflowing totals, nested +choices, malformed entries and exact subsequent random state. Each list is bounded +to 8,192 entries, with a shared 65,536-node budget across nested provider decoding. +Unit tests check those allocation limits and reject oversized branching trees. diff --git a/docs/vertical-anchors.md b/docs/vertical-anchors.md new file mode 100644 index 000000000..ce743463a --- /dev/null +++ b/docs/vertical-anchors.md @@ -0,0 +1,22 @@ +# Vertical anchors + +Horizon implements the pinned Java Edition **26.3** vertical anchors: absolute, +above bottom, below top and relative to sea level. Runtime resolution preserves +signed integer wrapping. Codec parsing and encoding enforce the vanilla field +range, preserve decimal truncation and integer wrapping, and follow the nested +exclusive alternatives even when multiple fields appear in one object. + +`WorldGenerationContext` carries the minimum, height and sea level. Its generator +adapter chooses the larger minimum and smaller height independently, matching +vanilla; this differs from intersecting the vertical intervals. + +Run `python3 tools/test_anchor_parity.py`. The +[local report](../benchmarks/rust-anchor-2026-10-06/scoped-parity.json) records +**181,632 matching output lines per reference JAR**, across **192 fixtures**, +**74,112 codec inputs** and **107,328 runtime anchors**. The original Java +transport calls the actual codecs, helper constructors and generation context, +including the native noise-based chunk generator for bounds comparisons. + +Sources and fixtures are hash-checked before publishing results. Raw reference +output stays under `.local`. These tests cover anchor behavior and the three +context values, not complete material rules, level access or JSON diagnostic text. diff --git a/docs/worker-pacing.md b/docs/worker-pacing.md index d804b74a7..5b969dee8 100644 --- a/docs/worker-pacing.md +++ b/docs/worker-pacing.md @@ -67,7 +67,7 @@ terrain completion times alongside foreground performance and CPU use. ## Hosted executor measurements [Raw platform results](../benchmarks/worker-pacing-2026-10-03/) came from -[CI run 37147381649](https://github.com/ludovic111/minecraft-optimization-lab/actions/runs/37147381649), +[CI run 37147381649](https://github.com/ludovic111/Horizon/actions/runs/37147381649), using the 50,000-job workload and the revised overshoot credit. Median worker CPU seconds per elapsed second across three runs were: diff --git a/docs/world-data.md b/docs/world-data.md new file mode 100644 index 000000000..2aa84229e --- /dev/null +++ b/docs/world-data.md @@ -0,0 +1,148 @@ +# Horizon world data + +`crates/horizon-world` implements part of the Rust rewrite's storage layer for +the repository-pinned Java Edition **26.3**, data version **5023**. It reads and +exports region files and provides block-section access. Lighting, world generation, +networking and rendering remain unimplemented. Scheduled block/fluid queues now +integrate with saved tick lists, but their gameplay callbacks remain unimplemented. + +## Commands + +Build the standalone tools with `cargo build --release -p horizon-world`. +The binary is `target/release/horizon-world` (`.exe` on Windows). + +```sh +target/release/horizon-world inspect /path/to/world/region/r.0.0.mca +target/release/horizon-world get-block /path/to/world/region/r.0.0.mca 0 64 0 +target/release/horizon-world copy-region /path/to/world/region/r.0.0.mca /path/to/export/r.0.0.mca +target/release/horizon-world copy-region /path/to/world/region/r.0.0.mca /path/to/lz4-export/r.0.0.mca lz4 +target/release/horizon-world edit-block-data /path/to/world/region/r.0.0.mca /path/to/edited/r.0.0.mca 0 64 0 minecraft:oak_log axis=y +target/release/horizon-world nbt-copy /path/to/level.dat /path/to/level-uncompressed.nbt gzip none +target/release/horizon-world --help +``` + +Use offline input and a separate export directory. Output filenames must retain +the source region coordinates. Existing destination regions and external chunk +files are refused. An unchanged export preserves chunk payloads and timestamps; +an explicitly recompressed export preserves decoded NBT values, subject to +vanilla's canonicalization. Region allocation layout may change. + +`get-block` reports the stored descriptor; string descriptors can omit default +properties. `edit-block-data` changes an existing saved section's block data and +preserves other chunk fields. It does **not** perform a gameplay placement: +heightmaps, light, block entities, ticks and neighbor updates are not updated. +The raw command accepts descriptors without validating them against a loaded +registry. The library's `BlockRegistry::resolve` validates properties and +supplies defaults, and `BlockSection` uses that registry for resident storage. + +## Implementation + +NBT handles all tag types, named and unnamed network roots, Java modified UTF-8 +including unpaired UTF-16 surrogates, and 26.3 heterogeneous list wrappers. +Compound key order is not preserved; duplicate keys resolve to their last +value. Java's negative-zero normalization on loading and NaN canonicalization +on writing are reproduced. Defaults bound encoded/decoded NBT to 64 MiB, +one million wire nodes and 512 container levels. These are application limits, +not a reproduction of Java's allocation accounting or exception behavior. + +Region codecs are gzip, zlib, uncompressed and **lz4-java block framing**. +The latter includes the pinned library's 28-bit xxHash checksum adapter. +Region headers, chunk lengths, sector overlap and external `.mcc` chunks are +validated. Chunk coordinates use floor division at negative boundaries. + +Exports build a temporary region, sync file content, then publish using a +hard link that fails if the destination exists. Failed writers cannot publish; +normal error cleanup removes their temporary and newly created external files. +The filesystem must support hard links. This is an offline export mechanism: +concurrent source modification, crash recovery, directory fsync and in-place +save transactions are not implemented. + +Saved palettes support uniform zero-bit sections and padded packed words for +4,096 block entries or 64 biome entries. Resident `BlockSection` stores numeric +state IDs through a shared, borrowed registry. Uniform sections have no word +array. Changes reuse unused palette slots; replacing a unique value can update +its slot without repacking 4,096 entries. Width changes repack only when needed. +Explicit compaction removes unused slots and reduces the packed width. + +The registry loader checks data version, duplicate states, default IDs and +block-name coverage. The local oracle exports all 35,723 state identities and +defaults from vanilla. This imports identities, not block implementations, +shapes or behavior. Registry exports and game-derived fixtures stay in `.local/`. +Chunk access requires data version 5023; older saves need an unimplemented +data-fixing layer. `BlockRegistry::resolve` rejects invalid property descriptors. The separate +[block-state JSON codec](block-state-codecs.md) reproduces vanilla property +fallback for compact and full JSON forms. + +`ChunkData::saved_ticks` reads `block_ticks` or `fluid_ticks`, resolves type +identities through a caller-supplied registry lookup, and filters positions +outside the chunk as vanilla does. `set_saved_ticks` writes a queue's packed +relative delays while preserving other root fields. IDs here identify block or +fluid types, not block states. Missing tick lists are empty. Numeric fields use +vanilla's integer narrowing and floating-point conversion. Unknown types and +malformed entries return errors; vanilla's logging/partial-result paths are not +reproduced. [Scheduler integration and its separate suite](scheduled-ticks.md). + +## Validation + +```sh +cargo test --workspace +cargo clippy --workspace --all-targets -- -D warnings +python3 tools/test_rust_parity.py --prepare +python3 tools/test_world_parity.py +python3 tools/test_tick_parity.py +``` + +The world runner verifies the pinned artifacts, generates fixtures by invoking +actual vanilla classes, processes them with Rust, and reads the results with +both official client and server code. Each reference checks: + +- 32 NBT format/codec conversions covering every tag type, UTF-16 edge cases, + mixed lists, floating-point canonicalization and oversized byte arrays. +- 44 edited/compacted palette cases, comparing 123,776 individual values across + uniform, local and global vanilla palette transitions. +- 48 region chunk reads covering four codecs, copying, recompression, a stored + block edit, negative positions and oversized external chunks. +- All 35,723 exported block-state IDs and their serialized registry data. +- 8,192 resident values: a section with 4,096 distinct states, followed by the + result of 100,000 mixed block replacements checked against an independent + array of expected IDs. Rust additionally checks each returned old value, + periodic compaction, every registry ID through one slot, and uniform collapse. + +Offline tests cover malformed lengths, truncation, NBT limits, corrupt checksums, +invalid palette indices, sector corruption, the inline/external size boundary, +unknown-field preservation, failed-writer cleanup and destination collisions. +CI runs both differential suites. Run artifacts and logs stay under +`.local/rust-world-parity/`; a stale top-level success report is removed before +each run. The checked-in [report](../benchmarks/rust-world-2026-10-05/scoped-parity.json) +contains metadata and hashes only. + +These are synthetic storage fixtures, not a generated world's full save/load +lifecycle or playable integration test. They establish the reported tested +scope; they do not establish complete vanilla parity or any FPS improvement. + + +## Contained fluid states + +`FluidStateTable` derives the fluid carried by each pinned block state: empty, +water or lava, source/flowing identity, amount and falling status. Waterlogged +copper grates carry falling source water. `FluidBlockBindings` binds constant-time +conversion back to liquid block identities, including the collapse of liquid +levels 8–15 to their shared falling-fluid block representation. + +`FluidHeightWorld` supplies above-fluid and downward-face support queries. +Ordinary height returns a full block when matching fluid is above; camera height +first checks downward support above a source. Empty fluids skip world queries. +Coordinates wrap as Java integers, and query failures preserve evaluation order. +The adapter owns block-support geometry; this interface does not implement every +block's support shape. + +Run `python3 tools/test_fluid_parity.py`. The +[fluid report](../benchmarks/rust-fluid-2026-10-06/scoped-parity.json) records +**243,331 matching lines per JAR**. It compares all 35,723 block states, five fluid +identities, every fluid-family pair, own-height bits, source/falling/full flags and +legacy block conversion. An additional 2,432 fluid-state JSON fixtures compare +all 37 fluid states, native defaults, malformed properties and encoding. The 40,344 world fixtures request 80,688 surface/camera +height queries, including coordinate overflow and injected failures. The support +fixtures use actual vanilla stone and air states. Fluid spreading, scheduled +updates, entity interactions and rendering remain pending. Workspace tests +and all-target Clippy pass. diff --git a/docs/world-generation.md b/docs/world-generation.md new file mode 100644 index 000000000..f2d556727 --- /dev/null +++ b/docs/world-generation.md @@ -0,0 +1,192 @@ +# World generation + +Horizon targets the repository-pinned Minecraft Java Edition **26.3**. +`horizon_world::worldgen::decode_noise` implements its direct normal-noise JSON +codec. `DensityRegistry` decodes named density definitions and `NoiseRouter` +loads the eight router roots against the same graph. `AquiferConfig` binds the six +aquifer density roots, and `NoiseBasedAquifer` implements underground fluid and +pressure selection. Complete terrain generation remains pending. + +The decoder reads numeric tokens directly from `serde_json::value::RawValue`. +This preserves decimal precision and the sign of integer `-0`, avoiding a +double-precision intermediate before float density decoding. Integer +fields retain Gson's truncation toward zero and wrapping to the low 32 bits, +including decimal and exponent forms. + +Noise definitions require a base octave in `[-32,32]`. Defaults are one octave, +unit base amplitude, enabled normalization and an empty amplitude-modifier list. +Octave counts range from 1 to 32. Nonempty modifier lists must contain exactly +that many values. Amplitude bounds retain vanilla's floating-point comparator +ordering: negative zero is below the modifier lower bound of positive zero. +Normalization accepts booleans or the string `"legacy"`. Null optional fields +use their defaults; unknown keys are ignored and duplicate keys retain the last +value. + +The API accepts strict JSON. Gson's additional permissive syntax is outside this +decoder's scope. Construction failures return typed errors; comparison checks +classification and values rather than Java exception messages. + +After preparing the pinned artifacts, run: + +```sh +python3 tools/test_worldgen_parity.py +cargo test --workspace +cargo clippy --workspace --all-targets -- -D warnings +``` + +The original Java transport uses vanilla's actual `NormalNoise.DIRECT_CODEC`, +then its normal and legacy Nether initializers. The suite compares every bundled +noise resource, six world seeds, both random streams and both initialization +paths. Additional cases check codec defaults, normalization modes, field bounds, +invalid types, nulls, duplicate/unknown keys, decimal integer conversion, signed +zero and synthetic parameters. Comparisons include octave metadata, +normalization/range bits, scalar noise and parent random state after success or +failure. Raw registry contents and outputs remain private under `.local`. + +The density loader resolves forward references into distinct immutable named +holders. Numeric and object roots retain direct-value semantics. Its graph is +loaded atomically, with typed errors for missing references and cycles. It +implements the bundled function kinds, including nested splines, shifted noise, +interval selection, rounding, surface searches and context-bound fields. Graph +nesting and interval branches are bounded at 256; inline noise holders remain +pending. These bounds are explicit limits of the Rust API. + +The registry comparison decodes all **55 bundled density definitions** using +vanilla's actual registry-aware codecs and the **64 bundled noise resources**. +It compares ranges, axis dependencies, compilation failures, cache allocation, +seeded scalar values and repeated strided volumes in raw and optimized modes. +Density roots are checked through one compiler per seed and mode. Nonempty +blending and structure fields are outside these fixtures. + +The local run produced **961,693 matching output lines per reference JAR**. The +[metadata report](../benchmarks/rust-worldgen-2026-10-06/scoped-parity.json) records +source hashes, reference identities and resource digests. The runner authenticates +both artifacts, verifies that their registry resources agree, removes stale success +reports and rejects source or fixture changes during validation. CI includes the suite on +its configured platforms; the recorded local run does not establish remote +results or gameplay parity. + +The router loader requires all eight fields in vanilla declaration order. It +retains named holder identity and compiles every field through one shared cache +namespace. Failed router decoding leaves the registry graph intact. All seven +bundled preset routers now match the pinned JARs across six seeds, +both random algorithms and raw/optimized compilation. Single-layer surface +volumes and invalid multilayer surface requests are both checked. This API +decodes the router +object. The vertical `NoiseSettings` and optional `aquifers` members are also decoded; +complete generator settings and material configuration remain pending. + +`NoiseSettings` in 26.3 contains only minimum Y and height. Its JSON fields are +bounded to `[-2032,2031]` and `[0,4064]`. The guard checks the wrapped upper limit +first, then height alignment and minimum alignment to 16. The runtime create +helper applies those guards without the JSON field bounds. Height-accessor +clamping retains wrapped arithmetic, unaligned results and negative heights for +disjoint ranges. The suite compares bundled noise members, runtime and codec +construction, integer conversion and extreme accessor bounds. + +Climate sampling converts quart positions to block coordinates with wrapped +32-bit shifts, evaluates all six fields in order with the same context, and +quantizes using float multiplication followed by Java's saturating long cast. +The suite compares vanilla's actual climate sampler binding and 4,116 quantization +fixtures covering random float bits, subnormals, NaNs, infinities and saturation. +The climate parameter decoder accepts scalar intervals, two-element lists and +objects with `min`/`max` fields. Endpoints use directly parsed floats in `[-2,2]`, +with Java float comparator ordering before quantization. Parameter points require +all six coordinates and an offset in `[0,1]`; negative-zero offsets fail that +lower bound. Codec comparisons include precision-sensitive decimals, missing +fields, invalid types and duplicate keys. + +The immutable climate search tree now reproduces vanilla's stable construction +order, 19-child default, wrapped interval distance and squared fitness, pruning, +and previous-result tie handling. A searcher owns its previous leaf and borrows +one index, preventing cache reuse across unrelated indices. Indexed and brute +lookup intentionally retain their respective tie behavior. The suite compares +all supported branching values 2..32, sizes around branch powers, duplicate +entries, a 65,536-entry tree and extreme signed-long ranges/targets. The entry +bound and typed failures are explicit Rust API limits. + +`MultiNoiseBiomeSource` resolves biome identifiers through scalar climate sampling +and prepared quart volumes. Bulk preparation evaluates six fields in declaration +order and retains their float buffers; each query quantizes those stored values. +Scalar and bulk queries share one previous-result state, so their query order +retains vanilla's tie behavior. The bounded API rejects coordinates outside a +prepared volume. + +The runner exports built-in parameter tables independently from both authenticated +JARs, requires them to agree and keeps them private. These contain 7,594 Overworld +entries covering 56 biome identifiers and five Nether entries. Rust loads the +quantized tables using a Horizon import format. This is an import of built-in +data; the preset builders and vanilla biome codecs remain pending. The reference +uses actual `MultiNoiseBiomeSource` resolvers with keyed registration holders. +These checks resolve identities without evaluating biome properties or gameplay. +Both tables are exercised against every router, including cross-preset fixtures; +this does not establish End biome-source behavior. + +The report records table and fixture digests. Source or private fixture changes +during a comparison invalidate its success report. + +The global fluid picker and disabled-aquifer path are now implemented. Lava +selection uses Y below `min(-54, sea_level)`; other positions use the default +fluid status. Fluid status lookup returns its state only below its level. +Disabled aquifers use the default solid block for positive density; +nonpositive or NaN density calls the picker, and this path never schedules fluid +updates. The reference comparison uses the actual global picker lambda and +`Aquifer.createDisabled`, counting picker calls and checking default state +identities. Regular-mode fixtures cover sea-level cutoffs, extreme coordinates, +subnormal density, signed zeros, NaNs and infinities. Developer fluid-disable +behavior is outside this corpus. + +The noise-based aquifer implementation retains the six-field configuration's +binding order, seeded positional cell generation, nearest-cell ties, pressure +barriers, surface sampling, fluid levels and update scheduling. One context is +shared across all density roots. Cell locations and statuses belong to each +chunk aquifer; surface values are snapped to quart coordinates and cached. +Global fluid statuses use exact state identity where vanilla does, while lava, +water and air predicates classify blocks, including nondefault liquid states, +cave air and void air. Dry cells use the version's `WAY_BELOW_MIN_Y` value +`-32512`; this differs from the global developer-disable status's `-4064`. + +The Rust API limits grids to 16,777,216 cells and constructor surface volumes to +2,097,152 samples, checks array bounds and returns typed errors. It preserves +wrapped grid indexing within that domain, including vanilla's final-index +aliasing. Allocation failures and invalid oversized grids are outside the +comparison corpus. Read-only cache inspection does not populate caches. + +The noise-based comparison uses actual vanilla configuration decoding and aquifer +construction. It checks fluid states, scheduling flags, sampler call order and +values, global picker calls and final location/status/surface caches. Fixtures +include all bundled aquifer configurations, both seeded random factories, +strided volume extents, repeated/reversed queries, nonfinite density/sampler +values, malformed roots and injected failures followed by retries. The runner +requires every injected failure to occur. Developer fluid-disable behavior is +outside these regular-mode checks. This does not validate complete generated +chunks or the registry-backed block classification adapter independently. + +`TagDefinitions` decodes tag entries and files, applies resource-stack replacement, +and resolves required and optional dependencies before building ordered, deduplicated +memberships. Missing required references omit the affected tag while unrelated tags +remain available. Lookup order and required flags retain the pinned runtime's hash +bucket and dependency traversal behavior. A valid JSON resource that fails its tag +codec can introduce an empty tag; invalid replacement leaves earlier entries intact. + +The comparison checks all **300 bundled block-tag files** against **1,286 block +identifiers** exported independently from both JARs. Synthetic fixtures cover +replacement, malformed files, missing references, cycles, duplicate members and +lookup order. The API is bounded to 8,192 definitions and dependency depth 256; +Java hash-tree buckets and pathological self-recursive dependency searches remain +unsupported. These checks cover tag loading, not the gameplay behavior of members. + +The separate [heightmap implementation and comparison](heightmaps.md) now checks +all six types, packed data, updates and priming against actual vanilla chunks. + +The [noise-fill stage](terrain-filling.md) now integrates final density, aquifers, +registry-backed sections, world-generation heightmaps and fluid postprocessing. +Complete terrain still requires material and surface rules, nonempty world fields, +biome/feature/structure placement and complete generated-chunk validation. No rendering, frame-rate or complete gameplay claim follows from +these decoder checks. + + +Subsequent [biome lookup and chunk suites](biome-lookup.md) now validate fuzzy +block-to-quart selection, section-atomic biome fills and multi-noise chunk +assignment through actual `ChunkGenerator.doCreateBiomes`. The original report +above remains a record of its narrower tested source snapshot. diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/HorizonLab.java b/mods/horizon/src/main/java/dev/horizonlab/HorizonLab.java similarity index 97% rename from mods/horizon-lab/src/main/java/dev/horizonlab/HorizonLab.java rename to mods/horizon/src/main/java/dev/horizonlab/HorizonLab.java index e2fe279e4..b6933a07e 100644 --- a/mods/horizon-lab/src/main/java/dev/horizonlab/HorizonLab.java +++ b/mods/horizon/src/main/java/dev/horizonlab/HorizonLab.java @@ -39,7 +39,7 @@ public final class HorizonLab implements ModInitializer { return started ? 1 : 0; })))) .then(Commands.literal("stop").executes(command -> { finishTicks(); return 1; })))); - LOGGER.info("Horizon Lab ready. Simulation rules and tick rate are unchanged."); + LOGGER.info("Horizon ready. Simulation rules and tick rate are unchanged."); } public static synchronized boolean startTicks(String label, int seconds, Path output, String profile) { diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/budget/DebounceWait.java b/mods/horizon/src/main/java/dev/horizonlab/budget/DebounceWait.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/budget/DebounceWait.java rename to mods/horizon/src/main/java/dev/horizonlab/budget/DebounceWait.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/budget/DispatchRetry.java b/mods/horizon/src/main/java/dev/horizonlab/budget/DispatchRetry.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/budget/DispatchRetry.java rename to mods/horizon/src/main/java/dev/horizonlab/budget/DispatchRetry.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/budget/TerrainBudget.java b/mods/horizon/src/main/java/dev/horizonlab/budget/TerrainBudget.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/budget/TerrainBudget.java rename to mods/horizon/src/main/java/dev/horizonlab/budget/TerrainBudget.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/budget/TerrainReadWait.java b/mods/horizon/src/main/java/dev/horizonlab/budget/TerrainReadWait.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/budget/TerrainReadWait.java rename to mods/horizon/src/main/java/dev/horizonlab/budget/TerrainReadWait.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/budget/WakeableIdleWait.java b/mods/horizon/src/main/java/dev/horizonlab/budget/WakeableIdleWait.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/budget/WakeableIdleWait.java rename to mods/horizon/src/main/java/dev/horizonlab/budget/WakeableIdleWait.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/budget/WorkerPacer.java b/mods/horizon/src/main/java/dev/horizonlab/budget/WorkerPacer.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/budget/WorkerPacer.java rename to mods/horizon/src/main/java/dev/horizonlab/budget/WorkerPacer.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/client/DistantTerrainBudget.java b/mods/horizon/src/main/java/dev/horizonlab/client/DistantTerrainBudget.java similarity index 97% rename from mods/horizon-lab/src/main/java/dev/horizonlab/client/DistantTerrainBudget.java rename to mods/horizon/src/main/java/dev/horizonlab/client/DistantTerrainBudget.java index 4fa9430c2..c21e9688a 100644 --- a/mods/horizon-lab/src/main/java/dev/horizonlab/client/DistantTerrainBudget.java +++ b/mods/horizon/src/main/java/dev/horizonlab/client/DistantTerrainBudget.java @@ -46,7 +46,7 @@ final class DistantTerrainBudget { double next = policy.update(setting.getTrueValue(), totalNs / 1e6 / count, targetMs, late / (double) count, heap); if (owned == null || Math.abs(next - owned) > 0.0001) { - if (setting.setValue(next, "Horizon Lab adaptive budget")) { + if (setting.setValue(next, "Horizon adaptive budget")) { owned = next; changes++; HorizonLab.LOGGER.info("Adaptive terrain background runtime ratio: {}", next); diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/client/DistantTerrainSettings.java b/mods/horizon/src/main/java/dev/horizonlab/client/DistantTerrainSettings.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/client/DistantTerrainSettings.java rename to mods/horizon/src/main/java/dev/horizonlab/client/DistantTerrainSettings.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/client/HorizonClient.java b/mods/horizon/src/main/java/dev/horizonlab/client/HorizonClient.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/client/HorizonClient.java rename to mods/horizon/src/main/java/dev/horizonlab/client/HorizonClient.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/client/ShaderSettings.java b/mods/horizon/src/main/java/dev/horizonlab/client/ShaderSettings.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/client/ShaderSettings.java rename to mods/horizon/src/main/java/dev/horizonlab/client/ShaderSettings.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/geometry/RelativeTerrainPosition.java b/mods/horizon/src/main/java/dev/horizonlab/geometry/RelativeTerrainPosition.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/geometry/RelativeTerrainPosition.java rename to mods/horizon/src/main/java/dev/horizonlab/geometry/RelativeTerrainPosition.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/metrics/ProcessMemoryMonitor.java b/mods/horizon/src/main/java/dev/horizonlab/metrics/ProcessMemoryMonitor.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/metrics/ProcessMemoryMonitor.java rename to mods/horizon/src/main/java/dev/horizonlab/metrics/ProcessMemoryMonitor.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/metrics/Recording.java b/mods/horizon/src/main/java/dev/horizonlab/metrics/Recording.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/metrics/Recording.java rename to mods/horizon/src/main/java/dev/horizonlab/metrics/Recording.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/metrics/Reports.java b/mods/horizon/src/main/java/dev/horizonlab/metrics/Reports.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/metrics/Reports.java rename to mods/horizon/src/main/java/dev/horizonlab/metrics/Reports.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/metrics/ResidentMemory.java b/mods/horizon/src/main/java/dev/horizonlab/metrics/ResidentMemory.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/metrics/ResidentMemory.java rename to mods/horizon/src/main/java/dev/horizonlab/metrics/ResidentMemory.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/metrics/SampleStats.java b/mods/horizon/src/main/java/dev/horizonlab/metrics/SampleStats.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/metrics/SampleStats.java rename to mods/horizon/src/main/java/dev/horizonlab/metrics/SampleStats.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/metrics/ServerContext.java b/mods/horizon/src/main/java/dev/horizonlab/metrics/ServerContext.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/metrics/ServerContext.java rename to mods/horizon/src/main/java/dev/horizonlab/metrics/ServerContext.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/metrics/SoftwareContext.java b/mods/horizon/src/main/java/dev/horizonlab/metrics/SoftwareContext.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/metrics/SoftwareContext.java rename to mods/horizon/src/main/java/dev/horizonlab/metrics/SoftwareContext.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/metrics/TickState.java b/mods/horizon/src/main/java/dev/horizonlab/metrics/TickState.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/metrics/TickState.java rename to mods/horizon/src/main/java/dev/horizonlab/metrics/TickState.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/mixin/CullingEmptyWhitelistMixin.java b/mods/horizon/src/main/java/dev/horizonlab/mixin/CullingEmptyWhitelistMixin.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/mixin/CullingEmptyWhitelistMixin.java rename to mods/horizon/src/main/java/dev/horizonlab/mixin/CullingEmptyWhitelistMixin.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/mixin/CullingRayScratchMixin.java b/mods/horizon/src/main/java/dev/horizonlab/mixin/CullingRayScratchMixin.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/mixin/CullingRayScratchMixin.java rename to mods/horizon/src/main/java/dev/horizonlab/mixin/CullingRayScratchMixin.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/mixin/DhDebounceWaitMixin.java b/mods/horizon/src/main/java/dev/horizonlab/mixin/DhDebounceWaitMixin.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/mixin/DhDebounceWaitMixin.java rename to mods/horizon/src/main/java/dev/horizonlab/mixin/DhDebounceWaitMixin.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/mixin/DhPriorityDispatchMixin.java b/mods/horizon/src/main/java/dev/horizonlab/mixin/DhPriorityDispatchMixin.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/mixin/DhPriorityDispatchMixin.java rename to mods/horizon/src/main/java/dev/horizonlab/mixin/DhPriorityDispatchMixin.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/mixin/DhQuadReuseMixin.java b/mods/horizon/src/main/java/dev/horizonlab/mixin/DhQuadReuseMixin.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/mixin/DhQuadReuseMixin.java rename to mods/horizon/src/main/java/dev/horizonlab/mixin/DhQuadReuseMixin.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/mixin/DhRelativePositionMixin.java b/mods/horizon/src/main/java/dev/horizonlab/mixin/DhRelativePositionMixin.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/mixin/DhRelativePositionMixin.java rename to mods/horizon/src/main/java/dev/horizonlab/mixin/DhRelativePositionMixin.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/mixin/DhTerrainReadWaitMixin.java b/mods/horizon/src/main/java/dev/horizonlab/mixin/DhTerrainReadWaitMixin.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/mixin/DhTerrainReadWaitMixin.java rename to mods/horizon/src/main/java/dev/horizonlab/mixin/DhTerrainReadWaitMixin.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/mixin/DhTickDedupMixin.java b/mods/horizon/src/main/java/dev/horizonlab/mixin/DhTickDedupMixin.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/mixin/DhTickDedupMixin.java rename to mods/horizon/src/main/java/dev/horizonlab/mixin/DhTickDedupMixin.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/mixin/DhWorkerPacingMixin.java b/mods/horizon/src/main/java/dev/horizonlab/mixin/DhWorkerPacingMixin.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/mixin/DhWorkerPacingMixin.java rename to mods/horizon/src/main/java/dev/horizonlab/mixin/DhWorkerPacingMixin.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/mixin/FrameMixin.java b/mods/horizon/src/main/java/dev/horizonlab/mixin/FrameMixin.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/mixin/FrameMixin.java rename to mods/horizon/src/main/java/dev/horizonlab/mixin/FrameMixin.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/mixin/HorizonMixinPlugin.java b/mods/horizon/src/main/java/dev/horizonlab/mixin/HorizonMixinPlugin.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/mixin/HorizonMixinPlugin.java rename to mods/horizon/src/main/java/dev/horizonlab/mixin/HorizonMixinPlugin.java diff --git a/mods/horizon-lab/src/main/java/dev/horizonlab/mixin/ServerTickMixin.java b/mods/horizon/src/main/java/dev/horizonlab/mixin/ServerTickMixin.java similarity index 100% rename from mods/horizon-lab/src/main/java/dev/horizonlab/mixin/ServerTickMixin.java rename to mods/horizon/src/main/java/dev/horizonlab/mixin/ServerTickMixin.java diff --git a/mods/horizon-lab/src/main/resources/assets/horizonlab/lang/en_us.json b/mods/horizon/src/main/resources/assets/horizonlab/lang/en_us.json similarity index 100% rename from mods/horizon-lab/src/main/resources/assets/horizonlab/lang/en_us.json rename to mods/horizon/src/main/resources/assets/horizonlab/lang/en_us.json diff --git a/mods/horizon-lab/src/main/resources/fabric.mod.json b/mods/horizon/src/main/resources/fabric.mod.json similarity index 95% rename from mods/horizon-lab/src/main/resources/fabric.mod.json rename to mods/horizon/src/main/resources/fabric.mod.json index 6a5f561be..e9978939e 100644 --- a/mods/horizon-lab/src/main/resources/fabric.mod.json +++ b/mods/horizon/src/main/resources/fabric.mod.json @@ -2,7 +2,7 @@ "schemaVersion": 1, "id": "horizonlab", "version": "0.21.0", - "name": "Horizon Lab", + "name": "Horizon", "description": "Client frame pacing and server tick measurements for reproducible optimization experiments.", "authors": [ "Ludovic" diff --git a/mods/horizon-lab/src/main/resources/horizonlab.mixins.json b/mods/horizon/src/main/resources/horizonlab.mixins.json similarity index 100% rename from mods/horizon-lab/src/main/resources/horizonlab.mixins.json rename to mods/horizon/src/main/resources/horizonlab.mixins.json diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/budget/DebounceQueueBenchmark.java b/mods/horizon/src/test/java/dev/horizonlab/budget/DebounceQueueBenchmark.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/budget/DebounceQueueBenchmark.java rename to mods/horizon/src/test/java/dev/horizonlab/budget/DebounceQueueBenchmark.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/budget/DebounceWaitTest.java b/mods/horizon/src/test/java/dev/horizonlab/budget/DebounceWaitTest.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/budget/DebounceWaitTest.java rename to mods/horizon/src/test/java/dev/horizonlab/budget/DebounceWaitTest.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/budget/DispatchRetryTest.java b/mods/horizon/src/test/java/dev/horizonlab/budget/DispatchRetryTest.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/budget/DispatchRetryTest.java rename to mods/horizon/src/test/java/dev/horizonlab/budget/DispatchRetryTest.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/budget/IdleQueueBenchmark.java b/mods/horizon/src/test/java/dev/horizonlab/budget/IdleQueueBenchmark.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/budget/IdleQueueBenchmark.java rename to mods/horizon/src/test/java/dev/horizonlab/budget/IdleQueueBenchmark.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/budget/TerrainBudgetTest.java b/mods/horizon/src/test/java/dev/horizonlab/budget/TerrainBudgetTest.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/budget/TerrainBudgetTest.java rename to mods/horizon/src/test/java/dev/horizonlab/budget/TerrainBudgetTest.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/budget/WakeableIdleWaitTest.java b/mods/horizon/src/test/java/dev/horizonlab/budget/WakeableIdleWaitTest.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/budget/WakeableIdleWaitTest.java rename to mods/horizon/src/test/java/dev/horizonlab/budget/WakeableIdleWaitTest.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/budget/WorkerPacerTest.java b/mods/horizon/src/test/java/dev/horizonlab/budget/WorkerPacerTest.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/budget/WorkerPacerTest.java rename to mods/horizon/src/test/java/dev/horizonlab/budget/WorkerPacerTest.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/budget/WorkerPacingBenchmark.java b/mods/horizon/src/test/java/dev/horizonlab/budget/WorkerPacingBenchmark.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/budget/WorkerPacingBenchmark.java rename to mods/horizon/src/test/java/dev/horizonlab/budget/WorkerPacingBenchmark.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/client/DistantTerrainBudgetTest.java b/mods/horizon/src/test/java/dev/horizonlab/client/DistantTerrainBudgetTest.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/client/DistantTerrainBudgetTest.java rename to mods/horizon/src/test/java/dev/horizonlab/client/DistantTerrainBudgetTest.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/client/DistantTerrainSettingsTest.java b/mods/horizon/src/test/java/dev/horizonlab/client/DistantTerrainSettingsTest.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/client/DistantTerrainSettingsTest.java rename to mods/horizon/src/test/java/dev/horizonlab/client/DistantTerrainSettingsTest.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/CullingEmptyIntegration.java b/mods/horizon/src/test/java/dev/horizonlab/dispatch/CullingEmptyIntegration.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/CullingEmptyIntegration.java rename to mods/horizon/src/test/java/dev/horizonlab/dispatch/CullingEmptyIntegration.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/CullingRayIntegration.java b/mods/horizon/src/test/java/dev/horizonlab/dispatch/CullingRayIntegration.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/CullingRayIntegration.java rename to mods/horizon/src/test/java/dev/horizonlab/dispatch/CullingRayIntegration.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/DispatchIntegration.java b/mods/horizon/src/test/java/dev/horizonlab/dispatch/DispatchIntegration.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/DispatchIntegration.java rename to mods/horizon/src/test/java/dev/horizonlab/dispatch/DispatchIntegration.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/PositionIntegration.java b/mods/horizon/src/test/java/dev/horizonlab/dispatch/PositionIntegration.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/PositionIntegration.java rename to mods/horizon/src/test/java/dev/horizonlab/dispatch/PositionIntegration.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/QuadReuseIntegration.java b/mods/horizon/src/test/java/dev/horizonlab/dispatch/QuadReuseIntegration.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/QuadReuseIntegration.java rename to mods/horizon/src/test/java/dev/horizonlab/dispatch/QuadReuseIntegration.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/QuadSizeIntegration.java b/mods/horizon/src/test/java/dev/horizonlab/dispatch/QuadSizeIntegration.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/QuadSizeIntegration.java rename to mods/horizon/src/test/java/dev/horizonlab/dispatch/QuadSizeIntegration.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/TerrainReadIntegration.java b/mods/horizon/src/test/java/dev/horizonlab/dispatch/TerrainReadIntegration.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/TerrainReadIntegration.java rename to mods/horizon/src/test/java/dev/horizonlab/dispatch/TerrainReadIntegration.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/TickDedupIntegration.java b/mods/horizon/src/test/java/dev/horizonlab/dispatch/TickDedupIntegration.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/TickDedupIntegration.java rename to mods/horizon/src/test/java/dev/horizonlab/dispatch/TickDedupIntegration.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/fixture/CullingRayAccess.java b/mods/horizon/src/test/java/dev/horizonlab/dispatch/fixture/CullingRayAccess.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/fixture/CullingRayAccess.java rename to mods/horizon/src/test/java/dev/horizonlab/dispatch/fixture/CullingRayAccess.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/fixture/GraphicsBackendTraceMixin.java b/mods/horizon/src/test/java/dev/horizonlab/dispatch/fixture/GraphicsBackendTraceMixin.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/fixture/GraphicsBackendTraceMixin.java rename to mods/horizon/src/test/java/dev/horizonlab/dispatch/fixture/GraphicsBackendTraceMixin.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/geometry/RelativeTerrainPositionTest.java b/mods/horizon/src/test/java/dev/horizonlab/geometry/RelativeTerrainPositionTest.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/geometry/RelativeTerrainPositionTest.java rename to mods/horizon/src/test/java/dev/horizonlab/geometry/RelativeTerrainPositionTest.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/metrics/ClientGraphicsIntegration.java b/mods/horizon/src/test/java/dev/horizonlab/metrics/ClientGraphicsIntegration.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/metrics/ClientGraphicsIntegration.java rename to mods/horizon/src/test/java/dev/horizonlab/metrics/ClientGraphicsIntegration.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/metrics/MetricsTest.java b/mods/horizon/src/test/java/dev/horizonlab/metrics/MetricsTest.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/metrics/MetricsTest.java rename to mods/horizon/src/test/java/dev/horizonlab/metrics/MetricsTest.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/metrics/ObjectHeaderBenchmark.java b/mods/horizon/src/test/java/dev/horizonlab/metrics/ObjectHeaderBenchmark.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/metrics/ObjectHeaderBenchmark.java rename to mods/horizon/src/test/java/dev/horizonlab/metrics/ObjectHeaderBenchmark.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/metrics/ObjectSizeAgent.java b/mods/horizon/src/test/java/dev/horizonlab/metrics/ObjectSizeAgent.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/metrics/ObjectSizeAgent.java rename to mods/horizon/src/test/java/dev/horizonlab/metrics/ObjectSizeAgent.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/metrics/ResidentMemoryTest.java b/mods/horizon/src/test/java/dev/horizonlab/metrics/ResidentMemoryTest.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/metrics/ResidentMemoryTest.java rename to mods/horizon/src/test/java/dev/horizonlab/metrics/ResidentMemoryTest.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/metrics/ServerGraphicsIntegration.java b/mods/horizon/src/test/java/dev/horizonlab/metrics/ServerGraphicsIntegration.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/metrics/ServerGraphicsIntegration.java rename to mods/horizon/src/test/java/dev/horizonlab/metrics/ServerGraphicsIntegration.java diff --git a/mods/horizon-lab/src/test/java/dev/horizonlab/metrics/TickStateIntegration.java b/mods/horizon/src/test/java/dev/horizonlab/metrics/TickStateIntegration.java similarity index 100% rename from mods/horizon-lab/src/test/java/dev/horizonlab/metrics/TickStateIntegration.java rename to mods/horizon/src/test/java/dev/horizonlab/metrics/TickStateIntegration.java diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaActiveEffectTickOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaActiveEffectTickOracle.java new file mode 100644 index 000000000..b2863fad4 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaActiveEffectTickOracle.java @@ -0,0 +1,101 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.Holder;import net.minecraft.world.effect.*;import net.minecraft.world.entity.*;import net.minecraft.world.level.Level;import net.minecraft.server.level.ServerLevel; +import net.minecraft.core.BlockPos;import net.minecraft.core.HolderSet;import net.minecraft.world.item.ItemStack;import net.minecraft.world.item.consume_effects.*;import net.minecraft.sounds.*;import net.minecraft.util.RandomSource;import net.minecraft.world.level.levelgen.XoroshiroRandomSource; +import net.minecraft.network.syncher.*;import net.minecraft.core.particles.*; +/** Inherited entity effect ticking with shared status storage, real iterators and RNG. */ +public final class VanillaActiveEffectTickOracle { + static Object unsafe;static Method allocate;static Field duration,amplifier,ambient,visible,icon,hidden,blend,factor,previous,removed,activeEffects;static Data active;static List<ParticleOptions> particles;static Constructor<SynchedEntityData> dataCtor;static EntityDataAccessor<List<ParticleOptions>> particleKey;static EntityDataAccessor<Boolean> ambienceKey;static Field randomField,dataField; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static int n(JsonObject v,String k){return v.get(k).getAsInt();} + static float fl(JsonObject v,String k){return Float.intBitsToFloat((int)v.get(k).getAsLong());} + static long bits(float v){return Integer.toUnsignedLong(Float.floatToIntBits(v));} + static final class Stop extends RuntimeException{} + static final class Data {JsonObject f;PrintWriter out;RandomSource[] random;List<Holder<MobEffect>> keys=new ArrayList<>();MobEffectInstance[] pool;IdentityHashMap<MobEffectInstance,Integer> ids=new IdentityHashMap<>();Actor actor;Entity other;Level[] levels;SynchedEntityData.DataItem<List<ParticleOptions>> particleItem;SynchedEntityData.DataItem<Boolean> ambienceItem;int calls;boolean changed; + JsonObject config(){return f.getAsJsonObject(changed?"after":"initial");} + Map<Holder<MobEffect>,MobEffectInstance> map(){return actor.getActiveEffectsMap();} + int id(MobEffectInstance e){return ids.computeIfAbsent(e,k->ids.size());} + int key(Holder<MobEffect> h){return keys.indexOf(h);} + int source(Entity e){if(e==null)return -1;if(e==actor)return 0;if(e==other)return 1;throw new AssertionError();} + void reset(){try{var c=config();actor.tickCount=n(c,"tick");randomField.set(actor,random[n(c,"random")]);var selected=new ArrayList<ParticleOptions>();for(var v:c.getAsJsonArray("particles"))selected.add(particles.get(v.getAsInt()));particleItem.setValue(selected);ambienceItem.setValue(c.get("ambience").getAsBoolean());if(c.get("reseed").getAsBoolean())for(int i=0;i<2;i++)random[i].setSeed(c.getAsJsonArray("seeds").get(i).getAsLong());removed.set(actor,c.get("removed").getAsBoolean()?Entity.RemovalReason.DISCARDED:null);for(int i=0;i<pool.length;i++){var v=c.getAsJsonArray("states").get(i).getAsJsonObject();var e=pool[i];duration.setInt(e,n(v,"duration"));amplifier.setInt(e,n(v,"amplifier"));ambient.setBoolean(e,v.get("ambient").getAsBoolean());visible.setBoolean(e,v.get("visible").getAsBoolean());icon.setBoolean(e,v.get("icon").getAsBoolean());factor.setFloat(blend.get(e),fl(v,"factor"));previous.setFloat(blend.get(e),fl(v,"previous"));}}catch(Exception e){throw new AssertionError(e);}} + void all(){try{out.println("state "+calls+" "+changed);var roots=new ArrayList<MobEffectInstance>();var entries=new StringJoiner(",");for(var e:map().entrySet()){entries.add(key(e.getKey())+"="+id(e.getValue()));roots.add(e.getValue());}out.println("map "+entries);for(int i=0;i<pool.length;i++){out.println("pool "+i+" "+id(pool[i]));roots.add(pool[i]);}var seen=new IdentityHashMap<MobEffectInstance,Boolean>();for(int i=0;i<roots.size();i++){var e=roots.get(i);if(seen.put(e,true)!=null)continue;int id=id(e);var h=(MobEffectInstance)hidden.get(e);String hid="none";if(h!=null){roots.add(h);hid=Integer.toString(id(h));}var b=blend.get(e);out.println("node "+id+" "+key(e.getEffect())+" "+e.getDuration()+" "+e.getAmplifier()+" "+e.isAmbient()+" "+e.isVisible()+" "+e.showIcon()+" "+hid+" "+bits(factor.getFloat(b))+" "+bits(previous.getFloat(b)));}}catch(Exception e){throw new AssertionError(e);}} + void raw(JsonObject op){int a=n(op,"a"),b=n(op,"b");switch(op.get("op").getAsString()){case "put"->map().put(keys.get(a),pool[b]);case "drop"->map().remove(keys.get(a));case "clear"->map().clear();case "copy"->pool[b]=new MobEffectInstance(pool[a]);case "alias"->pool[b]=pool[a];default->throw new AssertionError();}} + void event(String name){out.println("event "+name);int i=calls++;all();if(i==n(f,"fail"))throw new Stop();if(i==n(f,"cme"))throw new ConcurrentModificationException();if(i==n(f,"mutate")){changed=true;reset();for(var op:f.getAsJsonArray("mutations"))raw(op.getAsJsonObject());}} + } + static final class Effect extends MobEffect {int id,hash;Effect(int id,int hash){super(MobEffectCategory.BENEFICIAL,0);this.id=id;this.hash=hash;}@Override public int hashCode(){return hash;} + @Override public boolean shouldApplyEffectTickThisTick(int time,int amp){active.event("should "+id+" "+time+" "+amp);return active.config().get("should").getAsBoolean();} + @Override public boolean applyEffectTick(ServerLevel level,LivingEntity actor,int amp){if(actor!=active.actor)throw new AssertionError();int l=level==active.levels[0]?0:level==active.levels[1]?1:-1;if(l<0)throw new AssertionError();active.event("apply "+id+" "+l+" "+amp);return active.config().get("apply").getAsBoolean();} + @Override public int getBlendOutAdvanceTicks(){active.event("advance "+id);return n(active.config(),"advance");} + @Override public int getBlendInDurationTicks(){active.event("blend-duration "+id+" true");return n(active.config(),"blend_in");} + @Override public int getBlendOutDurationTicks(){active.event("blend-duration "+id+" false");return n(active.config(),"blend_out");} + @Override public void onEffectAdded(LivingEntity actor,int amp){if(actor!=active.actor)throw new AssertionError();active.event("effect-added "+id+" "+amp);} + @Override public void onEffectStarted(LivingEntity actor,int amp){if(actor!=active.actor)throw new AssertionError();active.event("effect-started "+id+" "+amp);} + } + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Data d;Actor(){super(null,null);}void effectTick(){super.tickEffects();} + @Override public boolean isInvisible(){d.event("invisible");return d.config().get("invisible").getAsBoolean();} + @Override public double getRandomX(double scale){if(scale!=0.5)throw new AssertionError();d.event("x");return Double.longBitsToDouble(d.config().getAsJsonArray("coordinates").get(0).getAsLong());} + @Override public double getRandomY(){d.event("y");return Double.longBitsToDouble(d.config().getAsJsonArray("coordinates").get(1).getAsLong());} + @Override public double getRandomZ(double scale){if(scale!=0.5)throw new AssertionError();d.event("z");return Double.longBitsToDouble(d.config().getAsJsonArray("coordinates").get(2).getAsLong());} + @Override public RandomSource getRandom(){d.event("random");return d.random[n(d.config(),"random")];} + @Override public BlockPos blockPosition(){d.event("position");var p=d.config().getAsJsonArray("position");return new BlockPos(p.get(0).getAsInt(),p.get(1).getAsInt(),p.get(2).getAsInt());} + @Override public SoundSource getSoundSource(){d.event("category");return SoundSource.values()[n(d.config(),"category")];} + @Override public boolean canBeAffected(MobEffectInstance e){d.event("eligible "+d.id(e));return d.config().get("allow").getAsBoolean();} + @Override protected void onEffectAdded(MobEffectInstance e,Entity source){d.event("added "+d.id(e)+" "+d.source(source));} + @Override protected void onEffectUpdated(MobEffectInstance e,boolean reapply,Entity source){d.event("updated "+d.id(e)+" "+reapply+" "+d.source(source));} + @Override protected void onEffectsRemoved(Collection<MobEffectInstance> values){var ids=new StringJoiner(",");for(var e:values)ids.add(Integer.toString(d.id(e)));d.event("removed "+ids);} + @Override public Level level(){d.event("level");return d.levels[n(d.config(),"level")];} + @Override public MobEffectInstance getEffect(Holder<MobEffect> e){d.event("get "+d.key(e));return super.getEffect(e);} + } + static final class EffectLevel extends ServerLevel{Data d;int id;EffectLevel(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public void addParticle(ParticleOptions p,double x,double y,double z,double dx,double dy,double dz){if(dx!=1||dy!=1||dz!=1)throw new AssertionError();d.event("particle "+id+" "+particles.indexOf(p)+" "+Long.toUnsignedString(Double.doubleToLongBits(x))+" "+Long.toUnsignedString(Double.doubleToLongBits(y))+" "+Long.toUnsignedString(Double.doubleToLongBits(z)));} + @Override public void playSound(Entity excluded,BlockPos p,SoundEvent sound,SoundSource category,float volume,float pitch){if(excluded!=null||volume!=1||pitch!=1)throw new AssertionError();int s=sound==SoundEvents.GENERIC_EAT.value()?0:sound==SoundEvents.PLAYER_BURP?1:-1;if(s<0)throw new AssertionError();d.event("sound "+id+" "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+s+" "+category.ordinal());} + @Override public boolean isClientSide(){d.event("client "+id);return d.config().get("client").getAsBoolean();}} + static final class ClientEffectLevel extends Level {Data d;int id;ClientEffectLevel(){super(null,null,null,null,false,false,0L,0);} + @Override public void addParticle(ParticleOptions p,double x,double y,double z,double dx,double dy,double dz){if(dx!=1||dy!=1||dz!=1)throw new AssertionError();d.event("particle "+id+" "+particles.indexOf(p)+" "+Long.toUnsignedString(Double.doubleToLongBits(x))+" "+Long.toUnsignedString(Double.doubleToLongBits(y))+" "+Long.toUnsignedString(Double.doubleToLongBits(z)));} + @Override public void playSound(Entity excluded,BlockPos p,SoundEvent sound,SoundSource category,float volume,float pitch){if(excluded!=null||volume!=1||pitch!=1)throw new AssertionError();int s=sound==SoundEvents.GENERIC_EAT.value()?0:sound==SoundEvents.PLAYER_BURP?1:-1;if(s<0)throw new AssertionError();d.event("sound "+id+" "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+s+" "+category.ordinal());} + @Override public boolean isClientSide(){d.event("client "+id);return d.config().get("client").getAsBoolean();} +@Override public net.minecraft.world.clock.ClockManager clockManager(){throw new UnsupportedOperationException();} +@Override public void destroyBlockProgress(int p0,net.minecraft.core.BlockPos p1,int p2){throw new UnsupportedOperationException();} +@Override public java.util.Collection dragonParts(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.flag.FeatureFlagSet enabledFeatures(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.attribute.EnvironmentAttributeSystem environmentAttributes(){throw new UnsupportedOperationException();} +@Override public void explode(net.minecraft.world.entity.Entity p0,net.minecraft.world.damagesource.DamageSource p1,net.minecraft.world.level.ExplosionDamageCalculator p2,double p3,double p4,double p5,float p6,boolean p7,net.minecraft.world.level.Level.ExplosionInteraction p8,net.minecraft.core.particles.ParticleOptions p9,net.minecraft.core.particles.ParticleOptions p10,net.minecraft.util.random.WeightedList p11,net.minecraft.core.Holder p12){throw new UnsupportedOperationException();} +@Override public void gameEvent(net.minecraft.core.Holder p0,net.minecraft.world.phys.Vec3 p1,net.minecraft.world.level.gameevent.GameEvent.Context p2){throw new UnsupportedOperationException();} +@Override public java.lang.String gatherChunkSourceStats(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.ticks.LevelTickAccess getBlockTicks(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.chunk.ChunkSource getChunkSource(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.entity.LevelEntityGetter getEntities(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.entity.Entity getEntity(int p0){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.ticks.LevelTickAccess getFluidTicks(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.saveddata.maps.MapItemSavedData getMapData(net.minecraft.world.level.saveddata.maps.MapId p0){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.storage.LevelData.RespawnData getRespawnData(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.scores.Scoreboard getScoreboard(){throw new UnsupportedOperationException();} +@Override public int getSeaLevel(){throw new UnsupportedOperationException();} +@Override public net.minecraft.core.Holder getUncachedNoiseBiome(int p0,int p1,int p2){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.border.WorldBorder getWorldBorder(){throw new UnsupportedOperationException();} +@Override public void levelEvent(net.minecraft.world.entity.Entity p0,int p1,net.minecraft.core.BlockPos p2,int p3){throw new UnsupportedOperationException();} +@Override public void playSeededSound(net.minecraft.world.entity.Entity p0,net.minecraft.world.entity.Entity p1,net.minecraft.core.Holder p2,net.minecraft.sounds.SoundSource p3,float p4,float p5,long p6){throw new UnsupportedOperationException();} +@Override public void playSeededSound(net.minecraft.world.entity.Entity p0,double p1,double p2,double p3,net.minecraft.core.Holder p4,net.minecraft.sounds.SoundSource p5,float p6,float p7,long p8){throw new UnsupportedOperationException();} +@Override public java.util.List players(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.item.crafting.RecipeAccess recipeAccess(){throw new UnsupportedOperationException();} +@Override public void sendBlockUpdated(net.minecraft.core.BlockPos p0,net.minecraft.world.level.block.state.BlockState p1,net.minecraft.world.level.block.state.BlockState p2,int p3){throw new UnsupportedOperationException();} +@Override public void setRespawnData(net.minecraft.world.level.storage.LevelData.RespawnData p0){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.TickRateManager tickRateManager(){throw new UnsupportedOperationException();} + } + public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();particles=List.of(ParticleTypes.SMOKE,ParticleTypes.FLAME,ParticleTypes.HAPPY_VILLAGER);var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);activeEffects=field(LivingEntity.class,"activeEffects");removed=field(Entity.class,"removalReason");duration=field(MobEffectInstance.class,"duration");amplifier=field(MobEffectInstance.class,"amplifier");ambient=field(MobEffectInstance.class,"ambient");visible=field(MobEffectInstance.class,"visible");icon=field(MobEffectInstance.class,"showIcon");hidden=field(MobEffectInstance.class,"hiddenEffect");blend=field(MobEffectInstance.class,"blendState");factor=field(blend.getType(),"factor");previous=field(blend.getType(),"factorPreviousFrame");particleKey=(EntityDataAccessor<List<ParticleOptions>>)field(LivingEntity.class,"DATA_EFFECT_PARTICLES").get(null);ambienceKey=(EntityDataAccessor<Boolean>)field(LivingEntity.class,"DATA_EFFECT_AMBIENCE_ID").get(null);dataField=field(Entity.class,"entityData");randomField=field(Entity.class,"random");dataCtor=SynchedEntityData.class.getDeclaredConstructor(SyncedDataHolder.class,SynchedEntityData.DataItem[].class);dataCtor.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var enriched=new PrintWriter(Files.newBufferedWriter(dir.resolve("inputs-"+args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();active=d;d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.random=new RandomSource[2];for(int i=0;i<2;i++){long seed=d.f.getAsJsonArray("seeds").get(i).getAsLong();d.random[i]=d.f.get("xor").getAsBoolean()?new XoroshiroRandomSource(seed):RandomSource.create(seed);}var hashes=new JsonArray();var identities=new JsonArray();for(var hash:d.f.getAsJsonArray("hashes")){var h=Holder.<MobEffect>direct(new Effect(d.keys.size(),hash.getAsInt()));d.keys.add(h);hashes.add(h.hashCode());identities.add(System.identityHashCode(h));}d.f.add("hashes",hashes);d.f.add("identities",identities);enriched.println(d.f);d.actor=make(Actor.class);d.actor.d=d;d.other=make(net.minecraft.world.entity.decoration.ArmorStand.class);activeEffects.set(d.actor,new HashMap<Holder<MobEffect>,MobEffectInstance>());d.levels=new Level[2];for(int i=0;i<2;i++){if(d.f.getAsJsonArray("servers").get(i).getAsBoolean()){var l=make(EffectLevel.class);l.d=d;l.id=i;d.levels[i]=l;}else{var l=make(ClientEffectLevel.class);l.d=d;l.id=i;d.levels[i]=l;}}var dataItems=new SynchedEntityData.DataItem<?>[Math.max(particleKey.id(),ambienceKey.id())+1];for(int i=0;i<dataItems.length;i++)dataItems[i]=new SynchedEntityData.DataItem<Byte>(new EntityDataAccessor<Byte>(i,EntityDataSerializers.BYTE),(byte)0);d.particleItem=new SynchedEntityData.DataItem<>(particleKey,List.of());d.ambienceItem=new SynchedEntityData.DataItem<>(ambienceKey,false);dataItems[particleKey.id()]=d.particleItem;dataItems[ambienceKey.id()]=d.ambienceItem;dataField.set(d.actor,dataCtor.newInstance(d.actor,dataItems));var states=d.config().getAsJsonArray("states");d.pool=new MobEffectInstance[states.size()];for(int i=0;i<d.pool.length;i++){var v=states.get(i).getAsJsonObject();int h=n(v,"hidden");d.pool[i]=new MobEffectInstance(d.keys.get(n(v,"key")),n(v,"duration"),n(v,"amplifier"),v.get("ambient").getAsBoolean(),v.get("visible").getAsBoolean(),v.get("icon").getAsBoolean(),h<0?null:d.pool[h]);}d.reset();for(var op:d.f.getAsJsonArray("setup"))d.raw(op.getAsJsonObject());d.all(); + for(var value:d.f.getAsJsonArray("ops")){var op=value.getAsJsonObject();int a=n(op,"a"),b=n(op,"b"),source=n(op,"source");Entity src=source<0?null:source==0?d.actor:d.other;String result="ok";try{switch(op.get("op").getAsString()){ + case "tick"->d.actor.effectTick(); + case "apply-status","remove-status","clear-status","sound"->{var list=op.getAsJsonArray("list");ConsumeEffect effect;switch(op.get("op").getAsString()){ + case "apply-status"->{var selected=new ArrayList<MobEffectInstance>();for(var v:list)selected.add(d.pool[v.getAsInt()]);effect=new ApplyStatusEffectsConsumeEffect(selected,fl(op,"probability"));} + case "remove-status"->{var selected=new ArrayList<Holder<MobEffect>>();for(var v:list)selected.add(d.keys.get(v.getAsInt()));effect=new RemoveStatusEffectsConsumeEffect(HolderSet.direct(selected));} + case "clear-status"->effect=ClearAllStatusEffectsConsumeEffect.INSTANCE; + default->effect=new PlaySoundConsumeEffect(Holder.direct(n(op,"sound")==0?SoundEvents.GENERIC_EAT.value():SoundEvents.PLAYER_BURP)); + }result=Boolean.toString(effect.apply(d.levels[n(op,"level")],ItemStack.EMPTY,d.actor));} + case "add"->result=Boolean.toString(d.actor.addEffect(d.pool[a],src));case "force"->d.actor.forceAddEffect(d.pool[a],src);case "remove"->result=Boolean.toString(d.actor.removeEffect(d.keys.get(a)));case "remove-raw"->{var e=d.actor.removeEffectNoUpdate(d.keys.get(a));result=e==null?"none":Integer.toString(d.id(e));}case "all"->result=Boolean.toString(d.actor.removeAllEffects());case "has"->result=Boolean.toString(d.actor.hasEffect(d.keys.get(a)));case "get"->{var e=d.actor.getEffect(d.keys.get(a));result=e==null?"none":Integer.toString(d.id(e));}case "blend"->result=Long.toString(bits(d.actor.getEffectBlendFactor(d.keys.get(a),fl(op,"partial"))));case "put","drop","clear","copy","alias"->d.raw(op);default->throw new AssertionError(); + }}catch(Stop e){result="callback";}catch(ConcurrentModificationException e){result="concurrent";}out.println("result "+result);d.all();} + for(int i=0;i<2;i++)out.println("random "+i+" "+d.random[i].nextLong()+" "+d.random[i].nextLong()); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaActiveEffectsOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaActiveEffectsOracle.java new file mode 100644 index 000000000..0aa385cb0 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaActiveEffectsOracle.java @@ -0,0 +1,44 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.Holder;import net.minecraft.world.effect.*;import net.minecraft.world.entity.*;import net.minecraft.world.level.Level;import net.minecraft.server.level.ServerLevel; +/** Inherited LivingEntity effect storage with native instances and map copies. */ +public final class VanillaActiveEffectsOracle { + static Object unsafe;static Method allocate;static Field duration,amplifier,ambient,visible,icon,hidden,blend,factor,previous,removed,activeEffects;static Data active; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static int n(JsonObject v,String k){return v.get(k).getAsInt();} + static float fl(JsonObject v,String k){return Float.intBitsToFloat((int)v.get(k).getAsLong());} + static long bits(float v){return Integer.toUnsignedLong(Float.floatToIntBits(v));} + static final class Stop extends RuntimeException{} + static final class Data {JsonObject f;PrintWriter out;List<Holder<MobEffect>> keys=new ArrayList<>();MobEffectInstance[] pool;IdentityHashMap<MobEffectInstance,Integer> ids=new IdentityHashMap<>();Actor actor;Entity other;EffectLevel[] levels;int calls;boolean changed; + JsonObject config(){return f.getAsJsonObject(changed?"after":"initial");} + Map<Holder<MobEffect>,MobEffectInstance> map(){return actor.getActiveEffectsMap();} + int id(MobEffectInstance e){return ids.computeIfAbsent(e,k->ids.size());} + int key(Holder<MobEffect> h){return keys.indexOf(h);} + int source(Entity e){if(e==null)return -1;if(e==actor)return 0;if(e==other)return 1;throw new AssertionError();} + void reset(){try{var c=config();removed.set(actor,c.get("removed").getAsBoolean()?Entity.RemovalReason.DISCARDED:null);for(int i=0;i<pool.length;i++){var v=c.getAsJsonArray("states").get(i).getAsJsonObject();var e=pool[i];duration.setInt(e,n(v,"duration"));amplifier.setInt(e,n(v,"amplifier"));ambient.setBoolean(e,v.get("ambient").getAsBoolean());visible.setBoolean(e,v.get("visible").getAsBoolean());icon.setBoolean(e,v.get("icon").getAsBoolean());factor.setFloat(blend.get(e),fl(v,"factor"));previous.setFloat(blend.get(e),fl(v,"previous"));}}catch(Exception e){throw new AssertionError(e);}} + void all(){try{out.println("state "+calls+" "+changed);var roots=new ArrayList<MobEffectInstance>();var entries=new StringJoiner(",");for(var e:map().entrySet()){entries.add(key(e.getKey())+"="+id(e.getValue()));roots.add(e.getValue());}out.println("map "+entries);for(int i=0;i<pool.length;i++){out.println("pool "+i+" "+id(pool[i]));roots.add(pool[i]);}var seen=new IdentityHashMap<MobEffectInstance,Boolean>();for(int i=0;i<roots.size();i++){var e=roots.get(i);if(seen.put(e,true)!=null)continue;int id=id(e);var h=(MobEffectInstance)hidden.get(e);String hid="none";if(h!=null){roots.add(h);hid=Integer.toString(id(h));}var b=blend.get(e);out.println("node "+id+" "+key(e.getEffect())+" "+e.getDuration()+" "+e.getAmplifier()+" "+e.isAmbient()+" "+e.isVisible()+" "+e.showIcon()+" "+hid+" "+bits(factor.getFloat(b))+" "+bits(previous.getFloat(b)));}}catch(Exception e){throw new AssertionError(e);}} + void raw(JsonObject op){int a=n(op,"a"),b=n(op,"b");switch(op.get("op").getAsString()){case "put"->map().put(keys.get(a),pool[b]);case "drop"->map().remove(keys.get(a));case "clear"->map().clear();case "copy"->pool[b]=new MobEffectInstance(pool[a]);case "alias"->pool[b]=pool[a];default->throw new AssertionError();}} + void event(String name){out.println("event "+name);int i=calls++;all();if(i==n(f,"fail"))throw new Stop();if(i==n(f,"mutate")){changed=true;reset();for(var op:f.getAsJsonArray("mutations"))raw(op.getAsJsonObject());}} + } + static final class Effect extends MobEffect {int id,hash;Effect(int id,int hash){super(MobEffectCategory.BENEFICIAL,0);this.id=id;this.hash=hash;}@Override public int hashCode(){return hash;} + @Override public void onEffectAdded(LivingEntity actor,int amp){if(actor!=active.actor)throw new AssertionError();active.event("effect-added "+id+" "+amp);} + @Override public void onEffectStarted(LivingEntity actor,int amp){if(actor!=active.actor)throw new AssertionError();active.event("effect-started "+id+" "+amp);} + } + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Data d;Actor(){super(null,null);} + @Override public boolean canBeAffected(MobEffectInstance e){d.event("eligible "+d.id(e));return d.config().get("allow").getAsBoolean();} + @Override protected void onEffectAdded(MobEffectInstance e,Entity source){d.event("added "+d.id(e)+" "+d.source(source));} + @Override protected void onEffectUpdated(MobEffectInstance e,boolean reapply,Entity source){d.event("updated "+d.id(e)+" "+reapply+" "+d.source(source));} + @Override protected void onEffectsRemoved(Collection<MobEffectInstance> values){var ids=new StringJoiner(",");for(var e:values)ids.add(Integer.toString(d.id(e)));d.event("removed "+ids);} + @Override public Level level(){d.event("level");return d.levels[n(d.config(),"level")];} + @Override public MobEffectInstance getEffect(Holder<MobEffect> e){d.event("get "+d.key(e));return super.getEffect(e);} + } + static final class EffectLevel extends ServerLevel{Data d;int id;EffectLevel(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public boolean isClientSide(){d.event("client "+id);return d.config().get("client").getAsBoolean();}} + public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);activeEffects=field(LivingEntity.class,"activeEffects");removed=field(Entity.class,"removalReason");duration=field(MobEffectInstance.class,"duration");amplifier=field(MobEffectInstance.class,"amplifier");ambient=field(MobEffectInstance.class,"ambient");visible=field(MobEffectInstance.class,"visible");icon=field(MobEffectInstance.class,"showIcon");hidden=field(MobEffectInstance.class,"hiddenEffect");blend=field(MobEffectInstance.class,"blendState");factor=field(blend.getType(),"factor");previous=field(blend.getType(),"factorPreviousFrame");Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var enriched=new PrintWriter(Files.newBufferedWriter(dir.resolve("inputs-"+args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();active=d;d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;var hashes=new JsonArray();var identities=new JsonArray();for(var hash:d.f.getAsJsonArray("hashes")){var h=Holder.<MobEffect>direct(new Effect(d.keys.size(),hash.getAsInt()));d.keys.add(h);hashes.add(h.hashCode());identities.add(System.identityHashCode(h));}d.f.add("hashes",hashes);d.f.add("identities",identities);enriched.println(d.f);d.actor=make(Actor.class);d.actor.d=d;d.other=make(net.minecraft.world.entity.decoration.ArmorStand.class);activeEffects.set(d.actor,new HashMap<Holder<MobEffect>,MobEffectInstance>());d.levels=new EffectLevel[2];for(int i=0;i<2;i++){d.levels[i]=make(EffectLevel.class);d.levels[i].d=d;d.levels[i].id=i;}var states=d.config().getAsJsonArray("states");d.pool=new MobEffectInstance[states.size()];for(int i=0;i<d.pool.length;i++){var v=states.get(i).getAsJsonObject();int h=n(v,"hidden");d.pool[i]=new MobEffectInstance(d.keys.get(n(v,"key")),n(v,"duration"),n(v,"amplifier"),v.get("ambient").getAsBoolean(),v.get("visible").getAsBoolean(),v.get("icon").getAsBoolean(),h<0?null:d.pool[h]);}d.reset();for(var op:d.f.getAsJsonArray("setup"))d.raw(op.getAsJsonObject());d.all(); + for(var value:d.f.getAsJsonArray("ops")){var op=value.getAsJsonObject();int a=n(op,"a"),b=n(op,"b"),source=n(op,"source");Entity src=source<0?null:source==0?d.actor:d.other;String result="ok";try{switch(op.get("op").getAsString()){ + case "add"->result=Boolean.toString(d.actor.addEffect(d.pool[a],src));case "force"->d.actor.forceAddEffect(d.pool[a],src);case "remove"->result=Boolean.toString(d.actor.removeEffect(d.keys.get(a)));case "remove-raw"->{var e=d.actor.removeEffectNoUpdate(d.keys.get(a));result=e==null?"none":Integer.toString(d.id(e));}case "all"->result=Boolean.toString(d.actor.removeAllEffects());case "has"->result=Boolean.toString(d.actor.hasEffect(d.keys.get(a)));case "get"->{var e=d.actor.getEffect(d.keys.get(a));result=e==null?"none":Integer.toString(d.id(e));}case "blend"->result=Long.toString(bits(d.actor.getEffectBlendFactor(d.keys.get(a),fl(op,"partial"))));case "put","drop","clear","copy","alias"->d.raw(op);default->throw new AssertionError(); + }}catch(Stop e){result="callback";}out.println("result "+result);d.all();} + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAnchorOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAnchorOracle.java new file mode 100644 index 000000000..9d8c4ec70 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAnchorOracle.java @@ -0,0 +1,57 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.lang.reflect.Proxy; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.densityfunction.DensityFunctions; +import net.minecraft.world.level.levelgen.material.rule.BlockRule; + +/** Original transport for vertical anchor codecs and generation contexts. */ +public final class VanillaAnchorOracle { + private static WorldGenerationContext context(JsonObject f) { + var v=f.getAsJsonArray("context");int min=v.get(0).getAsInt(),height=v.get(1).getAsInt(),sea=v.get(2).getAsInt(); + if(f.has("generator")) { + var g=f.getAsJsonArray("generator");var zero=DensityFunctions.zero(); + var settings=new NoiseGeneratorSettings(new NoiseSettings(g.get(0).getAsInt(),g.get(1).getAsInt()),Blocks.STONE.defaultBlockState(),Blocks.WATER.defaultBlockState(),new NoiseRouter(zero,zero,zero,zero,zero,zero,zero,zero),Holder.direct(new BlockRule(Blocks.STONE.defaultBlockState())),List.of(),g.get(2).getAsInt(),false,Optional.empty(),false,NoiseGeneratorSettings.DebugFunctions.EMPTY); + var biome=Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},Biomes.PLAINS); + var generator=new NoiseBasedChunkGenerator(new FixedBiomeSource(biome),Holder.direct(settings)); + return new WorldGenerationContext(generator,LevelHeightAccessor.create(min,height)); + } + var accessor=(LevelAccessor)Proxy.newProxyInstance(LevelAccessor.class.getClassLoader(),new Class<?>[]{LevelAccessor.class},(proxy,method,args)->switch(method.getName()) { + case "getMinY"->min;case "getHeight"->height;case "getSeaLevel"->sea; + default->throw new AssertionError("unexpected accessor method "+method); + }); + return WorldGenerationContext.of(accessor); + } + private static void anchor(VerticalAnchor anchor,WorldGenerationContext context,PrintWriter out) { + var encoded=VerticalAnchor.CODEC.encodeStart(JsonOps.INSTANCE,anchor).result(); + out.println("anchor "+anchor.resolveY(context)+" "+encoded.map(Object::toString).orElse("error")); + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(String line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();var context=context(f); + out.println("context "+context.getMinGenY()+" "+context.getGenDepth()+" "+context.seaLevel()); + anchor(VerticalAnchor.bottom(),context,out);anchor(VerticalAnchor.top(),context,out);anchor(VerticalAnchor.seaLevel(),context,out); + for(var e:f.getAsJsonArray("values")) { + int value=e.getAsInt(); + for(var a:List.of(VerticalAnchor.absolute(value),VerticalAnchor.aboveBottom(value),VerticalAnchor.belowTop(value),VerticalAnchor.relativeToSeaLevel(value)))anchor(a,context,out); + } + for(var e:f.getAsJsonArray("json")) { + var result=VerticalAnchor.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(e.getAsString())).result(); + if(result.isPresent())anchor(result.get(),context,out);else out.println("error"); + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeHealthOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeHealthOracle.java new file mode 100644 index 000000000..18c14f659 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeHealthOracle.java @@ -0,0 +1,53 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.registries.*;import net.minecraft.resources.Identifier; +import net.minecraft.world.entity.*;import net.minecraft.world.entity.ai.attributes.*;import net.minecraft.server.level.*;import net.minecraft.network.syncher.*; +import net.minecraft.world.food.FoodData;import net.minecraft.world.Difficulty;import net.minecraft.world.damagesource.*;import net.minecraft.world.level.gamerules.*; +/** Actual registered attributes, synchronized health and hunger regeneration. */ +public final class VanillaAttributeHealthOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate;static EntityDataAccessor<Float> healthKey;static Field absorption,exhaustion,timer; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static String doubleBits(double v){return String.format("%016x",Double.doubleToLongBits(v));} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static final class Data {JsonObject f;PrintWriter out;Actor actor;Level level;Rules rules;Sources sources;AttributeMap attributes;FoodData food;int calls; + void effect(String s){out.println(s);if(calls++==f.get("fail").getAsInt())throw new Stop();}} + static final class Rules extends GameRules {Data d;Rules(){super(net.minecraft.world.flag.FeatureFlagSet.of());}@SuppressWarnings("unchecked")@Override public <T>T get(GameRule<T> r){if(r!=GameRules.NATURAL_HEALTH_REGENERATION)throw new AssertionError();return (T)Boolean.valueOf(d.f.get("regen").getAsBoolean());}} + static final class Sources extends DamageSources {DamageSource source;Sources(){super(null);}@Override public DamageSource starve(){return source;}} + static final class Level extends ServerLevel {Data d;Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public Difficulty getDifficulty(){return Difficulty.values()[d.f.get("difficulty").getAsInt()];}@Override public GameRules getGameRules(){return d.rules;}} + static final class Actor extends ServerPlayer {Data d;Actor(){super(null,null,null,null);} + @Override public ServerLevel level(){return d.level;} + @Override public double getAttributeValue(Holder<Attribute> a){return d.attributes.getValue(a);} + @Override public void onSyncedDataUpdated(EntityDataAccessor<?> a){if(a!=healthKey)throw new AssertionError();d.effect("updated "+bits(getHealth()));} + @Override protected void internalSetAbsorptionAmount(float v){try{absorption.setFloat(this,v);}catch(Exception e){throw new AssertionError(e);}} + @Override public DamageSources damageSources(){return d.sources;} + @Override public boolean hurtServer(ServerLevel l,DamageSource s,float v){if(l!=d.level||s!=d.sources.source)throw new AssertionError();d.effect("starve "+bits(v));return false;} + } + @SuppressWarnings("unchecked") public static void main(String[] args)throws Exception { + if(args[0].equals("export")){VanillaEntityAttributeOracle.main(args);return;} + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");var uf=u.getDeclaredField("theUnsafe");uf.setAccessible(true);unsafe=uf.get(null);allocate=u.getMethod("allocateInstance",Class.class);healthKey=(EntityDataAccessor<Float>)field(LivingEntity.class,"DATA_HEALTH_ID").get(null); + absorption=field(LivingEntity.class,"absorptionAmount");exhaustion=field(FoodData.class,"exhaustionLevel");timer=field(FoodData.class,"tickTimer");var entityData=field(Entity.class,"entityData");var dead=field(LivingEntity.class,"dead"); + var ctor=SynchedEntityData.class.getDeclaredConstructor(SyncedDataHolder.class,SynchedEntityData.DataItem[].class);ctor.setAccessible(true);var keys=List.of(Attributes.MAX_HEALTH,Attributes.MAX_ABSORPTION);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;d.actor=make(Actor.class);d.actor.d=d; + var type=BuiltInRegistries.ENTITY_TYPE.getValue(Identifier.parse(f.get("entity").getAsString()));d.attributes=new AttributeMap(VanillaEntityAttributeOracle.supplier(type));d.level=make(Level.class);d.level.d=d;d.rules=make(Rules.class);d.rules.d=d;d.sources=make(Sources.class);d.sources.source=make(DamageSource.class); + var items=new SynchedEntityData.DataItem<?>[healthKey.id()+1];for(int i=0;i<items.length;i++)items[i]=new SynchedEntityData.DataItem<Float>(new EntityDataAccessor<Float>(i,EntityDataSerializers.FLOAT),0f);var health=new SynchedEntityData.DataItem<Float>(healthKey,single(f.get("health")));items[healthKey.id()]=health;var data=ctor.newInstance(d.actor,items);entityData.set(d.actor,data);dead.setBoolean(d.actor,f.get("dead").getAsBoolean());absorption.setFloat(d.actor,single(f.get("absorption"))); + d.food=new FoodData();var food=f.getAsJsonObject("food");d.food.setFoodLevel(food.get("food").getAsInt());d.food.setSaturation(single(food.get("saturation")));exhaustion.setFloat(d.food,single(food.get("exhaustion")));timer.setInt(d.food,food.get("timer").getAsInt()); + for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonObject();var key=keys.get(op.get("attribute").getAsInt());float v=single(op.get("value"));try{switch(op.get("mode").getAsString()){ + case "base":d.attributes.getInstance(key).setBaseValue(number(op.get("amount")));break; + case "add":d.attributes.getInstance(key).addOrUpdateTransientModifier(new AttributeModifier(Identifier.parse(op.get("id").getAsString()),number(op.get("amount")),AttributeModifier.Operation.values()[op.get("operation").getAsInt()]));break; + case "remove":d.attributes.getInstance(key).removeModifier(Identifier.parse(op.get("id").getAsString()));break; + case "reset":d.attributes.resetBaseValue(key);break; + case "set":d.actor.setHealth(v);break;case "heal":d.actor.heal(v);break;case "absorption":d.actor.setAbsorptionAmount(v);break; + case "hurt":out.println("bool "+d.actor.isHurt());break;case "dead":out.println("bool "+d.actor.isDeadOrDying());break; + case "tick":d.food.tick(d.actor);break;case "eat":d.food.eat(op.get("nutrition").getAsInt(),v);break;case "exhaust":d.food.addExhaustion(v);break; + case "pack":{var p=data.packDirty();out.println("packed "+(p==null?"none":bits((Float)p.getFirst().value())));break;} + default:throw new AssertionError();}out.println("result ok");}catch(Stop e){out.println("result error");} + out.println("state "+bits(health.getValue())+" "+data.isDirty()+" "+health.isSetToDefault()+" "+bits(absorption.getFloat(d.actor))+" "+d.food.getFoodLevel()+" "+bits(d.food.getSaturationLevel())+" "+bits(exhaustion.getFloat(d.food))+" "+timer.getInt(d.food)+" "+d.calls); + out.println("limits "+doubleBits(d.attributes.getValue(keys.get(0)))+" "+doubleBits(d.attributes.getValue(keys.get(1)))); + } + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeMapQueriesOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeMapQueriesOracle.java new file mode 100644 index 000000000..085644cae --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeMapQueriesOracle.java @@ -0,0 +1,92 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.Holder;import net.minecraft.resources.Identifier;import net.minecraft.world.effect.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.ai.attributes.*;import net.minecraft.world.level.Level;import net.minecraft.server.level.ServerLevel;import com.google.common.collect.ImmutableList; +import static dev.horizonlab.parity.VanillaStoredEffectAttributesOracle.*; +/** Actual AttributeMap queries/reset with cached instances, mutable supplier prototypes and entity notifications. */ +public final class VanillaAttributeMapQueriesOracle { + static Field supplierField,prototypesField; + @SuppressWarnings("unchecked") static Map<Holder<Attribute>,AttributeInstance> prototypes(Data d)throws Exception { + return (Map<Holder<Attribute>,AttributeInstance>)prototypesField.get(supplierField.get(d.attributes)); + } + static void prototypeStates(Data d)throws Exception { + var prototypes=prototypes(d); + for(int id=0;id<d.keys.size();id++){ + var a=prototypes.get(d.keys.get(id)); + if(a==null){d.out.println("prototype "+id+" absent");continue;} + d.out.println("prototype "+id+" "+bits(a.getBaseValue())+" "+dirty.getBoolean(a)+" "+bits(cached.getDouble(a))+" | "+d.refs(a.getModifiers())+" | "+d.refs(a.getPermanentModifiers())); + } + } + static Object unsafe;static Method allocate,refresh;static Field effectDirty; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand { + Data d;EffectLevel level;Actor(){super(null,null);} + @Override public Level level(){d.event("level");return level;} + @Override public AttributeMap getAttributes(){d.event("attributes");return d.attributes;} + @Override protected void onAttributeUpdated(Holder<Attribute> h){d.event("updated "+d.keyDesc(h));} + void added(MobEffectInstance e){super.onEffectAdded(e,null);} + void updated(MobEffectInstance e,boolean reapply){super.onEffectUpdated(e,reapply,null);} + void removed(List<MobEffectInstance> es){super.onEffectsRemoved(es);} + } + static final class EffectLevel extends ServerLevel { + Data d;EffectLevel(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public boolean isClientSide(){d.event("client");return d.op.has("client")&&d.op.get("client").getAsBoolean();} + } + @SuppressWarnings("unchecked") + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + supplierField=field(AttributeMap.class,"supplier");prototypesField=field(AttributeSupplier.class,"instances"); + effectDirty=field(LivingEntity.class,"effectsDirty"); + refresh=LivingEntity.class.getDeclaredMethod("refreshDirtyAttributes");refresh.setAccessible(true); + var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class); + var passengers=field(Entity.class,"passengers"); + dirty=field(AttributeInstance.class,"dirty");cached=field(AttributeInstance.class,"cachedValue");mapField=field(AttributeMap.class,"attributes"); + modified=AttributeMap.class.getDeclaredMethod("onAttributeModified",AttributeInstance.class);modified.setAccessible(true); + supplierConstructor=AttributeSupplier.class.getDeclaredConstructor(Map.class);supplierConstructor.setAccessible(true); + Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"))); + var enriched=new PrintWriter(Files.newBufferedWriter(dir.resolve("inputs-"+args[0]+".txt"))); + var lines=Files.lines(dir.resolve("inputs.txt"))) { + for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.out=out;int n=f.getAsJsonArray("hashes").size(); + d.defaults=new double[n];d.syncable=new boolean[n];for(int i=0;i<n;i++){d.defaults[i]=number(f.getAsJsonArray("defaults").get(i));d.syncable[i]=f.getAsJsonArray("syncable").get(i).getAsBoolean();} + int componentsHash=Holder.direct(new Basic(d,0,0)).hashCode(); + for(int i=0;i<n;i++){int hash=f.getAsJsonArray("hashes").get(i).getAsInt();var key=Holder.<Attribute>direct(new Basic(d,i,(hash-componentsHash)*0xbdef7bdf));if(key.hashCode()!=hash)throw new AssertionError("holder hash");d.keys.add(key);} + var prototypes=new HashMap<Holder<Attribute>,AttributeInstance>(); + for(int i=0;i<n;i++){var base=f.getAsJsonArray("bases").get(i);if(!base.isJsonNull()){var a=new AttributeInstance(d.keys.get(i),ignored->{});a.setBaseValue(number(base));prototypes.put(d.keys.get(i),a);}} + d.attributes=new Attrs(d,supplierConstructor.newInstance(prototypes));d.map=(Map<Holder<Attribute>,AttributeInstance>)mapField.get(d.attributes); + for(var tv:f.getAsJsonArray("templates")){var t=tv.getAsJsonObject();d.templates.add(new Template(Identifier.parse(t.get("id").getAsString()),number(t.get("amount")),AttributeModifier.Operation.values()[t.get("operation").getAsInt()]));} + for(var ov:f.getAsJsonArray("definitions")){var op=ov.getAsJsonObject();var t=d.templates.get(op.get("template").getAsInt());d.effect.addAttributeModifier(d.key(op),t.id(),t.amount(),t.operation());} + var actor=make(Actor.class);actor.d=d;actor.level=make(EffectLevel.class);actor.level.d=d; + effectDirty.setBoolean(actor,true);passengers.set(actor,ImmutableList.of()); + var effect=Holder.<MobEffect>direct(d.effect); + for(var ov:f.getAsJsonArray("ops")){d.op=ov.getAsJsonObject();d.calls=0;d.changed=false;String result="ok"; + try{switch(d.op.get("op").getAsString()){ + case "attribute-has"->result=Boolean.toString(d.attributes.hasAttribute(d.key(d.op))); + case "modifier-has"->result=Boolean.toString(d.attributes.hasModifier(d.key(d.op),d.templates.get(d.op.get("template").getAsInt()).id())); + case "attribute-value"->result=bits(d.attributes.getValue(d.key(d.op))); + case "attribute-base"->result=bits(d.attributes.getBaseValue(d.key(d.op))); + case "modifier-value"->result=bits(d.attributes.getModifierValue(d.key(d.op),d.templates.get(d.op.get("template").getAsInt()).id())); + case "reset-base"->result=Boolean.toString(d.attributes.resetBaseValue(d.key(d.op))); + case "base"->d.handle(d.op.get("instance").getAsInt()).setBaseValue(number(d.op.get("value"))); + case "prototype-base"->Objects.requireNonNull(prototypes(d).get(d.key(d.op))).setBaseValue(number(d.op.get("value"))); + case "prototype-permanent"->{var t=d.templates.get(d.op.get("template").getAsInt());Objects.requireNonNull(prototypes(d).get(d.key(d.op))).addPermanentModifier(new AttributeModifier(t.id(),t.amount()*(double)(d.op.get("amplifier").getAsInt()+1),t.operation()));} + case "prototype-remove"->Objects.requireNonNull(prototypes(d).get(d.key(d.op))).removeModifier(d.templates.get(d.op.get("template").getAsInt()).id()); + case "dirty"->effectDirty.setBoolean(actor,d.op.get("flag").getAsBoolean()); + case "notify-add"->actor.added(new MobEffectInstance(effect,200,d.op.get("amplifier").getAsInt())); + case "notify-update"->actor.updated(new MobEffectInstance(effect,200,d.op.get("amplifier").getAsInt()),d.op.get("reapply").getAsBoolean()); + case "notify-remove"->actor.removed(Collections.nCopies(d.op.get("count").getAsInt(),new MobEffectInstance(effect,200,d.op.get("amplifier").getAsInt()))); + case "refresh"->{try{refresh.invoke(actor);}catch(InvocationTargetException e){if(e.getCause() instanceof RuntimeException x)throw x;throw new AssertionError(e.getCause());}} + case "get"->{var a=d.attributes.getInstance(d.key(d.op));d.track(a);result=d.reference(a);} + case "lookup"->result=d.reference(d.map.get(d.key(d.op))); + case "add"->d.effect.addAttributeModifiers(d.attributes,d.op.get("amplifier").getAsInt()); + case "remove"->d.effect.removeAttributeModifiers(d.attributes); + case "modified"->{try{modified.invoke(d.attributes,d.handle(d.op.get("instance").getAsInt()));}catch(InvocationTargetException e){if(e.getCause() instanceof RuntimeException x)throw x;throw new AssertionError(e.getCause());}} + case "value"->result=bits(d.handle(d.op.get("instance").getAsInt()).getValue()); + default->d.raw(d.op); + }}catch(Stop e){result="callback";}catch(NullPointerException e){result="null";}catch(IndexOutOfBoundsException e){result="bounds";}catch(IllegalArgumentException e){result="duplicate";} + out.println("result "+result);out.println("effect-dirty "+effectDirty.getBoolean(actor));d.state();prototypeStates(d); + } + var hashes=new JsonArray();for(var a:d.instances)hashes.add(System.identityHashCode(a));f.add("instance_hashes",hashes);enriched.println(f); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeOracle.java new file mode 100644 index 000000000..c10e9f8c4 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeOracle.java @@ -0,0 +1,43 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.registries.*;import net.minecraft.resources.Identifier;import net.minecraft.world.entity.ai.attributes.*; +/** Actual attribute modifier storage, evaluation order and dirty callbacks. */ +public final class VanillaAttributeOracle { + static final class Stop extends RuntimeException {} + static Field dirty,cached,operations; + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static String bits(double v){return String.format("%016x",Double.doubleToLongBits(v));} + static final class Basic extends Attribute {Basic(double value){super("horizon.fixture",value);}} + static final class Data {JsonObject op;PrintWriter out;int calls;AttributeInstance[] instances;AttributeModifier[] pool; + int identity(AttributeModifier m){if(m==null)return -1;for(int i=0;i<pool.length;i++)if(pool[i]==m)return i;throw new AssertionError("unknown modifier reference");} + String refs(Collection<AttributeModifier> values){var result=new StringJoiner(",");for(var m:values)result.add(Integer.toString(identity(m)));return result.length()==0?"-":result.toString();} + void changed(AttributeInstance a){try{int id=instances[0]==a?0:1;out.println("dirty "+id+" "+bits(a.getBaseValue())+" "+dirty.getBoolean(a)+" "+bits(cached.getDouble(a))+" "+a.getModifiers().size()+" "+a.getPermanentModifiers().size());if(calls++==op.get("fail").getAsInt())throw new Stop();if(op.get("read").getAsBoolean())out.println("observed "+bits(a.getValue()));}catch(IllegalAccessException e){throw new AssertionError(e);}} + @SuppressWarnings("unchecked") void state(int id)throws Exception{var a=instances[id];out.println("state "+id+" "+bits(a.getBaseValue())+" "+dirty.getBoolean(a)+" "+bits(cached.getDouble(a)));out.println("all "+refs(a.getModifiers()));out.println("permanent "+refs(a.getPermanentModifiers()));var map=(Map<AttributeModifier.Operation,Map<Identifier,AttributeModifier>>)operations.get(a);for(var operation:AttributeModifier.Operation.values()){var bucket=map.get(operation);out.println("operation "+operation.ordinal()+" "+(bucket==null?"-":refs(bucket.values())));}} + } + static Field field(Class<?> c,String name)throws Exception{var f=c.getDeclaredField(name);f.setAccessible(true);return f;} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]);if(args[0].equals("export")){var data=new JsonArray();for(var a:BuiltInRegistries.ATTRIBUTE){var f=new JsonObject();f.addProperty("id",BuiltInRegistries.ATTRIBUTE.getKey(a).toString());f.addProperty("default",bits(a.getDefaultValue()));if(a instanceof RangedAttribute r){f.addProperty("min",bits(r.getMinValue()));f.addProperty("max",bits(r.getMaxValue()));}data.add(f);}Files.writeString(dir.resolve("attributes.json"),data.toString());return;} + dirty=field(AttributeInstance.class,"dirty");cached=field(AttributeInstance.class,"cachedValue");operations=field(AttributeInstance.class,"modifiersByOperation"); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.out=out;var defs=f.getAsJsonArray("definitions");d.instances=new AttributeInstance[2];boolean invalid=false;for(int i=0;i<2;i++){var def=defs.get(i).getAsJsonObject();try{Attribute a=def.has("min")?new RangedAttribute("horizon.fixture",number(def.get("default")),number(def.get("min")),number(def.get("max"))):new Basic(number(def.get("default")));d.instances[i]=new AttributeInstance(Holder.direct(a),d::changed);}catch(IllegalArgumentException e){invalid=true;break;}}if(invalid){out.println("definition error");continue;} + var mods=f.getAsJsonArray("modifiers");d.pool=new AttributeModifier[mods.size()];for(int i=0;i<mods.size();i++){var m=mods.get(i).getAsJsonObject();d.pool[i]=new AttributeModifier(Identifier.parse(m.get("id").getAsString()),number(m.get("amount")),AttributeModifier.Operation.values()[m.get("operation").getAsInt()]);} + AttributeInstance.Packed packed=null; + for(var v:f.getAsJsonArray("ops")){var op=v.getAsJsonObject();d.op=op;d.calls=0;var a=d.instances[op.get("target").getAsInt()];try{switch(op.get("mode").getAsString()){ + case "base":a.setBaseValue(number(op.get("base")));break; + case "add":a.addTransientModifier(d.pool[op.get("modifier").getAsInt()]);break; + case "update":a.addOrUpdateTransientModifier(d.pool[op.get("modifier").getAsInt()]);break; + case "permanent":a.addPermanentModifier(d.pool[op.get("modifier").getAsInt()]);break; + case "replace":a.addOrReplacePermanentModifier(d.pool[op.get("modifier").getAsInt()]);break; + case "remove":out.println("removed "+a.removeModifier(d.pool[op.get("modifier").getAsInt()].id()));break; + case "clear":a.removeModifiers();break; + case "copy":a.replaceFrom(d.instances[op.get("source").getAsInt()]);break; + case "pack":packed=a.pack();out.println("packed "+bits(packed.baseValue())+" "+d.refs(packed.modifiers()));break; + case "unpack":a.apply(Objects.requireNonNull(packed));break; + case "apply":{var values=new ArrayList<AttributeModifier>();for(var m:op.getAsJsonArray("modifiers"))values.add(d.pool[m.getAsInt()]);a.apply(new AttributeInstance.Packed(d.instances[1-op.get("target").getAsInt()].getAttribute(),number(op.get("base")),values));break;} + case "many":{var values=new ArrayList<AttributeModifier>();for(var m:op.getAsJsonArray("modifiers"))values.add(d.pool[m.getAsInt()]);a.addPermanentModifiers(values);break;} + case "value":out.println("value "+bits(a.getValue()));break; + default:throw new AssertionError();}out.println("result ok");}catch(Stop e){out.println("error observer");}catch(IllegalArgumentException e){out.println("error duplicate");} + d.state(0);d.state(1);out.println("calls "+d.calls); + } + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeUpdatesOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeUpdatesOracle.java new file mode 100644 index 000000000..bfdc96dd6 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeUpdatesOracle.java @@ -0,0 +1,94 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.Holder;import net.minecraft.world.effect.*;import net.minecraft.world.entity.*;import net.minecraft.world.level.Level;import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.ai.attributes.*;import net.minecraft.server.level.ServerPlayer;import net.minecraft.server.network.ServerGamePacketListenerImpl;import net.minecraft.network.protocol.Packet;import net.minecraft.network.protocol.game.*;import net.minecraft.tags.*;import com.google.common.collect.ImmutableList;import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; +import net.minecraft.network.syncher.*;import net.minecraft.server.waypoints.ServerWaypointManager;import net.minecraft.world.waypoints.WaypointTransmitter; +/** Native attribute-update consequences composed with effect notifications and health storage. */ +public final class VanillaAttributeUpdatesOracle { + static Object unsafe;static Method allocate;static Field duration,amplifier,ambient,visible,icon,hidden,blend,factor,previous,removed,activeEffects;static Data active;static Field dirty,passengers;static Method refresh;static List<Holder<MobEffect>> known;static List<Holder<Attribute>> attributeHolders;static Field healthData,absorption,attributesField;static EntityDataAccessor<Float> healthKey;static Constructor<SynchedEntityData> dataCtor; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static int n(JsonObject v,String k){return v.get(k).getAsInt();} + static float fl(JsonObject v,String k){return Float.intBitsToFloat((int)v.get(k).getAsLong());} + static long bits(float v){return Integer.toUnsignedLong(Float.floatToIntBits(v));} + static final class Stop extends RuntimeException{} + static final class Data {JsonObject f;PrintWriter out;List<Holder<MobEffect>> keys=new ArrayList<>();MobEffectInstance[] pool;IdentityHashMap<MobEffectInstance,Integer> ids=new IdentityHashMap<>();Actor actor;Entity other;Level[] levels;SynchedEntityData[] healthStores;SynchedEntityData.DataItem<Float>[] healthItems;Manager[] managers;Attr[] attributeInstances;Attrs[] attributes;List<Set<AttributeInstance>> updates;ServerPlayer[] riders;Connection[] connections;int calls;boolean changed; + JsonObject config(){return f.getAsJsonObject(changed?"after":"initial");} + Map<Holder<MobEffect>,MobEffectInstance> map(){return actor.getActiveEffectsMap();} + int id(MobEffectInstance e){return ids.computeIfAbsent(e,k->ids.size());} + int key(Holder<MobEffect> h){return keys.indexOf(h);} + int source(Entity e){if(e==null)return -1;if(e==actor)return 0;if(e==other)return 1;throw new AssertionError();} + void reset(){try{var c=config();healthData.set(actor,healthStores[n(c,"data")]);attributesField.set(actor,attributes[n(c,"direct_attributes")]);if(!c.get("absorption").isJsonNull())absorption.setFloat(actor,fl(c,"absorption"));if(!c.get("dirty").isJsonNull())dirty.setBoolean(actor,c.get("dirty").getAsBoolean());for(int i=0;i<2;i++){int connection=c.getAsJsonArray("connections").get(i).getAsInt();riders[i].connection=connection<0?null:connections[connection];}var ps=new ArrayList<Entity>();for(var p:c.getAsJsonArray("passengers")){int id=p.getAsInt();ps.add(id<2?riders[id]:other);}passengers.set(actor,ImmutableList.copyOf(ps));removed.set(actor,c.get("removed").getAsBoolean()?Entity.RemovalReason.DISCARDED:null);for(int i=0;i<pool.length;i++){var v=c.getAsJsonArray("states").get(i).getAsJsonObject();var e=pool[i];duration.setInt(e,n(v,"duration"));amplifier.setInt(e,n(v,"amplifier"));ambient.setBoolean(e,v.get("ambient").getAsBoolean());visible.setBoolean(e,v.get("visible").getAsBoolean());icon.setBoolean(e,v.get("icon").getAsBoolean());factor.setFloat(blend.get(e),fl(v,"factor"));previous.setFloat(blend.get(e),fl(v,"previous"));}}catch(Exception e){throw new AssertionError(e);}} + void all(){try{out.println("state "+calls+" "+changed+" "+dirty.getBoolean(actor));for(int i=0;i<2;i++)out.println("health-data "+i+" "+bits(healthItems[i].getValue())+" "+healthStores[i].isDirty()+" "+healthItems[i].isDirty()+" "+healthItems[i].isSetToDefault());out.println("absorption-data "+bits(absorption.getFloat(actor)));for(int i=0;i<2;i++){var set=new StringJoiner(",");updates.get(i).forEach(v->set.add(v==null?"null":Integer.toString(((Attr)v).id)));out.println("updates "+i+" "+set);}var roots=new ArrayList<MobEffectInstance>();var entries=new StringJoiner(",");for(var e:map().entrySet()){entries.add(key(e.getKey())+"="+id(e.getValue()));roots.add(e.getValue());}out.println("map "+entries);for(int i=0;i<pool.length;i++){out.println("pool "+i+" "+id(pool[i]));roots.add(pool[i]);}var seen=new IdentityHashMap<MobEffectInstance,Boolean>();for(int i=0;i<roots.size();i++){var e=roots.get(i);if(seen.put(e,true)!=null)continue;int id=id(e);var h=(MobEffectInstance)hidden.get(e);String hid="none";if(h!=null){roots.add(h);hid=Integer.toString(id(h));}var b=blend.get(e);out.println("node "+id+" "+key(e.getEffect())+" "+e.getDuration()+" "+e.getAmplifier()+" "+e.isAmbient()+" "+e.isVisible()+" "+e.showIcon()+" "+hid+" "+bits(factor.getFloat(b))+" "+bits(previous.getFloat(b)));}}catch(Exception e){throw new AssertionError(e);}} + void raw(JsonObject op){int a=n(op,"a"),b=n(op,"b");switch(op.get("op").getAsString()){case "pending-add"->updates.get(a).add(b<0?null:attributeInstances[b]);case "pending-remove"->updates.get(a).remove(b<0?null:attributeInstances[b]);case "pending-clear"->updates.get(a).clear();case "put"->map().put(keys.get(a),pool[b]);case "drop"->map().remove(keys.get(a));case "clear"->map().clear();case "copy"->pool[b]=new MobEffectInstance(pool[a]);case "alias"->pool[b]=pool[a];default->throw new AssertionError();}} + void event(String name){out.println("event "+name);int i=calls++;all();if(i==n(f,"fail"))throw new Stop();if(i==n(f,"mutate")){changed=true;reset();for(var op:f.getAsJsonArray("mutations"))raw(op.getAsJsonObject());}} + } + static final class Effect extends MobEffect {int id,hash;Effect(int id,int hash){super(MobEffectCategory.BENEFICIAL,0);this.id=id;this.hash=hash;}@Override public int hashCode(){return hash;} + @Override public void addAttributeModifiers(AttributeMap attributes,int amp){active.event("add-modifiers "+id+" "+((Attrs)attributes).id+" "+amp);} + @Override public void removeAttributeModifiers(AttributeMap attributes){active.event("remove-modifiers "+id+" "+((Attrs)attributes).id);} + @Override public void onEffectAdded(LivingEntity actor,int amp){if(actor!=active.actor)throw new AssertionError();active.event("effect-added "+id+" "+amp);} + @Override public void onEffectStarted(LivingEntity actor,int amp){if(actor!=active.actor)throw new AssertionError();active.event("effect-started "+id+" "+amp);} + } + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Data d;Actor(){super(null,null);} + @Override public boolean is(TagKey<EntityType<?>> tag){int i=tag==EntityTypeTags.IMMUNE_TO_INFESTED?0:tag==EntityTypeTags.IMMUNE_TO_OOZING?1:tag==EntityTypeTags.IGNORES_POISON_AND_REGEN?2:-1;if(i<0)throw new AssertionError();d.event("tag "+i);return d.config().getAsJsonArray("tags").get(i).getAsBoolean();} + @Override public AttributeMap getAttributes(){d.event("attributes");return d.attributes[n(d.config(),"attributes")];} + void attributeUpdate(int id){super.onAttributeUpdated(attributeHolders.get(id));} + @Override public double getAttributeValue(Holder<Attribute> h){int i=h==Attributes.MAX_HEALTH?0:h==Attributes.MAX_ABSORPTION?1:-1;if(i<0)throw new AssertionError();d.event(i==0?"max-health":"max-absorption");return Double.longBitsToDouble(d.config().getAsJsonArray("maximums").get(i).getAsLong());} + @Override public float getHealth(){d.event("health");return super.getHealth();} + @Override public void setHealth(float v){d.event("set-health "+bits(v));super.setHealth(v);} + @Override public float getAbsorptionAmount(){d.event("absorption");return super.getAbsorptionAmount();} + @Override protected void internalSetAbsorptionAmount(float v){d.event("internal-absorption "+bits(v));super.internalSetAbsorptionAmount(v);} + @Override public void refreshDimensions(){d.event("dimensions");} + @Override public void onSyncedDataUpdated(EntityDataAccessor<?> key){if(key!=healthKey)throw new AssertionError();d.event("health-updated");} + @Override public int getId(){d.event("entity-id");return n(d.config(),"entity");} + void added(MobEffectInstance e){super.onEffectAdded(e,null);}void updated(MobEffectInstance e,boolean apply){super.onEffectUpdated(e,apply,null);}void removed(List<MobEffectInstance> es){super.onEffectsRemoved(es);} + @Override public Level level(){d.event("level");return d.levels[n(d.config(),"level")];} + @Override public MobEffectInstance getEffect(Holder<MobEffect> e){d.event("get "+d.key(e));return super.getEffect(e);} + } + static final class EffectLevel extends ServerLevel{Data d;int id;EffectLevel(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public ServerWaypointManager getWaypointManager(){d.event("manager "+id);return d.managers[d.config().getAsJsonArray("managers").get(id).getAsInt()];}@Override public boolean isClientSide(){d.event("client "+id);return d.config().get("client").getAsBoolean();}} + static final class Attr extends AttributeInstance {Data d;int id,hash;Attr(){super(null,null);}@Override public int hashCode(){return hash;}@Override public Holder<Attribute> getAttribute(){d.event("attribute "+id);return attributeHolders.get(d.config().getAsJsonArray("holders").get(id).getAsInt());}} + static final class Attrs extends AttributeMap {Data d;int id;Attrs(){super(null);}@Override public double getValue(Holder<Attribute> h){int a=attributeHolders.indexOf(h);d.event("value-in "+id+" "+a);return Double.longBitsToDouble(d.config().getAsJsonArray("values").get(id).getAsJsonArray().get(a).getAsLong());}@Override public Set<AttributeInstance> getAttributesToUpdate(){d.event("pending "+id);return d.updates.get(d.config().getAsJsonArray("routes").get(id).getAsInt());}} + static final class Connection extends ServerGamePacketListenerImpl {Data d;int id;Connection(){super(null,null,null,null);}@Override public void send(Packet<?> packet){String body;if(packet instanceof ClientboundUpdateMobEffectPacket p){int flags=(p.isEffectAmbient()?1:0)|(p.isEffectVisible()?2:0)|(p.effectShowsIcon()?4:0)|(p.shouldBlend()?8:0);body="update "+p.getEntityId()+" "+d.key(p.getEffect())+" "+p.getEffectAmplifier()+" "+p.getEffectDurationTicks()+" "+flags;}else if(packet instanceof ClientboundRemoveMobEffectPacket p){body="remove "+p.entityId()+" "+d.key(p.effect());}else throw new AssertionError();d.event("packet "+id+" "+body);}} + static final class ClientEffectLevel extends Level {Data d;int id;ClientEffectLevel(){super(null,null,null,null,false,false,0L,0);}@Override public boolean isClientSide(){d.event("client "+id);return d.config().get("client").getAsBoolean();} +@Override public net.minecraft.world.clock.ClockManager clockManager(){throw new UnsupportedOperationException();} +@Override public void destroyBlockProgress(int p0,net.minecraft.core.BlockPos p1,int p2){throw new UnsupportedOperationException();} +@Override public java.util.Collection dragonParts(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.flag.FeatureFlagSet enabledFeatures(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.attribute.EnvironmentAttributeSystem environmentAttributes(){throw new UnsupportedOperationException();} +@Override public void explode(net.minecraft.world.entity.Entity p0,net.minecraft.world.damagesource.DamageSource p1,net.minecraft.world.level.ExplosionDamageCalculator p2,double p3,double p4,double p5,float p6,boolean p7,net.minecraft.world.level.Level.ExplosionInteraction p8,net.minecraft.core.particles.ParticleOptions p9,net.minecraft.core.particles.ParticleOptions p10,net.minecraft.util.random.WeightedList p11,net.minecraft.core.Holder p12){throw new UnsupportedOperationException();} +@Override public void gameEvent(net.minecraft.core.Holder p0,net.minecraft.world.phys.Vec3 p1,net.minecraft.world.level.gameevent.GameEvent.Context p2){throw new UnsupportedOperationException();} +@Override public java.lang.String gatherChunkSourceStats(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.ticks.LevelTickAccess getBlockTicks(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.chunk.ChunkSource getChunkSource(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.entity.LevelEntityGetter getEntities(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.entity.Entity getEntity(int p0){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.ticks.LevelTickAccess getFluidTicks(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.saveddata.maps.MapItemSavedData getMapData(net.minecraft.world.level.saveddata.maps.MapId p0){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.storage.LevelData.RespawnData getRespawnData(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.scores.Scoreboard getScoreboard(){throw new UnsupportedOperationException();} +@Override public int getSeaLevel(){throw new UnsupportedOperationException();} +@Override public net.minecraft.core.Holder getUncachedNoiseBiome(int p0,int p1,int p2){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.border.WorldBorder getWorldBorder(){throw new UnsupportedOperationException();} +@Override public void levelEvent(net.minecraft.world.entity.Entity p0,int p1,net.minecraft.core.BlockPos p2,int p3){throw new UnsupportedOperationException();} +@Override public void playSeededSound(net.minecraft.world.entity.Entity p0,net.minecraft.world.entity.Entity p1,net.minecraft.core.Holder p2,net.minecraft.sounds.SoundSource p3,float p4,float p5,long p6){throw new UnsupportedOperationException();} +@Override public void playSeededSound(net.minecraft.world.entity.Entity p0,double p1,double p2,double p3,net.minecraft.core.Holder p4,net.minecraft.sounds.SoundSource p5,float p6,float p7,long p8){throw new UnsupportedOperationException();} +@Override public java.util.List players(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.item.crafting.RecipeAccess recipeAccess(){throw new UnsupportedOperationException();} +@Override public void sendBlockUpdated(net.minecraft.core.BlockPos p0,net.minecraft.world.level.block.state.BlockState p1,net.minecraft.world.level.block.state.BlockState p2,int p3){throw new UnsupportedOperationException();} +@Override public void setRespawnData(net.minecraft.world.level.storage.LevelData.RespawnData p0){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.TickRateManager tickRateManager(){throw new UnsupportedOperationException();} + } + static final class Manager extends ServerWaypointManager {Data d;int id;@Override public void trackWaypoint(WaypointTransmitter e){if(e!=d.actor)throw new AssertionError();d.event("waypoint "+id+" true");}@Override public void untrackWaypoint(WaypointTransmitter e){if(e!=d.actor)throw new AssertionError();d.event("waypoint "+id+" false");}} + public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();known=List.of(MobEffects.INFESTED,MobEffects.OOZING,MobEffects.REGENERATION,MobEffects.POISON);attributeHolders=List.of(Attributes.MAX_HEALTH,Attributes.MAX_ABSORPTION,Attributes.SCALE,Attributes.WAYPOINT_TRANSMIT_RANGE,Attributes.ATTACK_DAMAGE);dirty=field(LivingEntity.class,"effectsDirty");passengers=field(Entity.class,"passengers");refresh=LivingEntity.class.getDeclaredMethod("refreshDirtyAttributes");refresh.setAccessible(true);var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);activeEffects=field(LivingEntity.class,"activeEffects");removed=field(Entity.class,"removalReason");duration=field(MobEffectInstance.class,"duration");amplifier=field(MobEffectInstance.class,"amplifier");ambient=field(MobEffectInstance.class,"ambient");visible=field(MobEffectInstance.class,"visible");icon=field(MobEffectInstance.class,"showIcon");hidden=field(MobEffectInstance.class,"hiddenEffect");blend=field(MobEffectInstance.class,"blendState");factor=field(blend.getType(),"factor");previous=field(blend.getType(),"factorPreviousFrame");healthData=field(Entity.class,"entityData");absorption=field(LivingEntity.class,"absorptionAmount");attributesField=field(LivingEntity.class,"attributes");healthKey=(EntityDataAccessor<Float>)field(LivingEntity.class,"DATA_HEALTH_ID").get(null);dataCtor=SynchedEntityData.class.getDeclaredConstructor(SyncedDataHolder.class,SynchedEntityData.DataItem[].class);dataCtor.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var enriched=new PrintWriter(Files.newBufferedWriter(dir.resolve("inputs-"+args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();active=d;d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;var hashes=new JsonArray();var identities=new JsonArray();for(var hash:d.f.getAsJsonArray("hashes")){int id=d.keys.size();var h=id<4?known.get(id):Holder.<MobEffect>direct(new Effect(id,hash.getAsInt()));d.keys.add(h);hashes.add(h.hashCode());identities.add(System.identityHashCode(h));}d.f.add("hashes",hashes);d.f.add("identities",identities);enriched.println(d.f);d.actor=make(Actor.class);d.actor.d=d;dirty.setBoolean(d.actor,true);d.other=make(net.minecraft.world.entity.decoration.ArmorStand.class);activeEffects.set(d.actor,new HashMap<Holder<MobEffect>,MobEffectInstance>());d.levels=new Level[2];for(int i=0;i<2;i++){if(d.f.getAsJsonArray("servers").get(i).getAsBoolean()){var l=make(EffectLevel.class);l.d=d;l.id=i;d.levels[i]=l;}else{var l=make(ClientEffectLevel.class);l.d=d;l.id=i;d.levels[i]=l;}}var states=d.config().getAsJsonArray("states");d.pool=new MobEffectInstance[states.size()];for(int i=0;i<d.pool.length;i++){var v=states.get(i).getAsJsonObject();int h=n(v,"hidden");d.pool[i]=new MobEffectInstance(d.keys.get(n(v,"key")),n(v,"duration"),n(v,"amplifier"),v.get("ambient").getAsBoolean(),v.get("visible").getAsBoolean(),v.get("icon").getAsBoolean(),h<0?null:d.pool[h]);}d.connections=new Connection[2];d.riders=new ServerPlayer[2];d.attributes=new Attrs[2];d.updates=List.of(new ObjectOpenHashSet<>(),new ObjectOpenHashSet<>());for(int i=0;i<2;i++){d.connections[i]=make(Connection.class);d.connections[i].d=d;d.connections[i].id=i;d.riders[i]=make(ServerPlayer.class);d.attributes[i]=make(Attrs.class);d.attributes[i].d=d;d.attributes[i].id=i;}var ah=d.f.getAsJsonArray("attribute_hashes");d.attributeInstances=new Attr[ah.size()];for(int i=0;i<ah.size();i++){var at=make(Attr.class);at.d=d;at.id=i;at.hash=ah.get(i).getAsInt();d.attributeInstances[i]=at;}d.managers=new Manager[2];d.healthStores=new SynchedEntityData[2];d.healthItems=(SynchedEntityData.DataItem<Float>[])new SynchedEntityData.DataItem<?>[2];for(int i=0;i<2;i++){d.managers[i]=make(Manager.class);d.managers[i].d=d;d.managers[i].id=i;var entries=new SynchedEntityData.DataItem<?>[healthKey.id()+1];for(int j=0;j<entries.length;j++)entries[j]=new SynchedEntityData.DataItem<Float>(new EntityDataAccessor<Float>(j,EntityDataSerializers.FLOAT),0f);d.healthItems[i]=new SynchedEntityData.DataItem<Float>(healthKey,Float.intBitsToFloat((int)d.f.getAsJsonArray("health").get(i).getAsLong()));entries[healthKey.id()]=d.healthItems[i];d.healthStores[i]=dataCtor.newInstance(d.actor,entries);}d.reset();for(var op:d.f.getAsJsonArray("setup"))d.raw(op.getAsJsonObject());d.all(); + for(var value:d.f.getAsJsonArray("ops")){var op=value.getAsJsonObject();int a=n(op,"a"),b=n(op,"b"),source=n(op,"source");Entity src=source<0?null:source==0?d.actor:d.other;String result="ok";try{switch(op.get("op").getAsString()){ + case "attribute-update"->d.actor.attributeUpdate(a);case "pack"->{var packed=d.healthStores[a].packDirty();result=packed==null?"none":Long.toString(bits((Float)packed.getFirst().value()));} + case "eligible"->result=Boolean.toString(d.actor.canBeAffected(d.pool[a])); + case "notify-add"->d.actor.added(d.pool[a]);case "notify-update"->d.actor.updated(d.pool[a],op.get("reapply").getAsBoolean());case "notify-remove"->{var es=new ArrayList<MobEffectInstance>();for(var i:op.getAsJsonArray("list"))es.add(d.pool[i.getAsInt()]);d.actor.removed(es);} + case "send"->d.actor.sendEffectToPassengers(d.pool[a]);case "refresh"->{try{refresh.invoke(d.actor);}catch(InvocationTargetException ex){if(ex.getCause() instanceof RuntimeException e)throw e;throw new AssertionError(ex.getCause());}} + case "pending-add","pending-remove","pending-clear"->d.raw(op); + case "add"->result=Boolean.toString(d.actor.addEffect(d.pool[a],src));case "force"->d.actor.forceAddEffect(d.pool[a],src);case "remove"->result=Boolean.toString(d.actor.removeEffect(d.keys.get(a)));case "remove-raw"->{var e=d.actor.removeEffectNoUpdate(d.keys.get(a));result=e==null?"none":Integer.toString(d.id(e));}case "all"->result=Boolean.toString(d.actor.removeAllEffects());case "has"->result=Boolean.toString(d.actor.hasEffect(d.keys.get(a)));case "get"->{var e=d.actor.getEffect(d.keys.get(a));result=e==null?"none":Integer.toString(d.id(e));}case "blend"->result=Long.toString(bits(d.actor.getEffectBlendFactor(d.keys.get(a),fl(op,"partial"))));case "put","drop","clear","copy","alias"->d.raw(op);default->throw new AssertionError(); + }}catch(Stop e){result="callback";}catch(NullPointerException e){result="null";}catch(IndexOutOfBoundsException e){result="bounds";}catch(NoSuchElementException e){result="empty";}out.println("result "+result);d.all();} + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBasicFeatureOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBasicFeatureOracle.java new file mode 100644 index 000000000..1b566c2ae --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBasicFeatureOracle.java @@ -0,0 +1,78 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.lang.reflect.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; +import net.minecraft.world.level.levelgen.placement.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.WorldGenLevel; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.feature.Feature; + +/** Invokes native block-writing features through an observable mutable world. */ +public final class VanillaBasicFeatureOracle { + private static final class Stop extends RuntimeException {} + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + final Block[] BLOCKS={Blocks.AIR,Blocks.STONE,Blocks.COBBLESTONE,Blocks.END_STONE,Blocks.OBSIDIAN}; + if(args[0].equals("export")) { + var values=new JsonArray();for(var block:BLOCKS)values.add(Block.getId(block.defaultBlockState()));Files.writeString(Path.of(args[1]),values.toString());return; + } + Path dir=Path.of(args[1]); + var contextMethod=VanillaPlacementOracle.class.getDeclaredMethod("context",JsonObject.class);contextMethod.setAccessible(true); + var bounds=new JsonObject();bounds.add("context",JsonParser.parseString("[-64,384,63]")); + var generator=((PlacementContext)contextMethod.invoke(null,bounds)).generator(); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();long seed=f.get("seed").getAsLong(); + RandomSource random=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + var decoded=Feature.DIRECT_CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(f.get("definition").getAsString())).result(); + var modifiers=new ArrayList<PlacementModifier>();boolean valid=true; + if(f.has("placement"))for(var json:f.getAsJsonArray("placement")) { + try {var modifier=PlacementModifier.CODEC.parse(JsonOps.INSTANCE,json).result();if(modifier.isPresent())modifiers.add(modifier.get());else valid=false;} + catch(IllegalArgumentException error){valid=false;} + } + if(decoded.isEmpty()||!valid)out.println("decode error");else { + out.println("decode ok");int[] calls={0};int fail=f.get("fail").getAsInt(),reject=f.get("reject").getAsInt(); + var states=new TreeMap<BlockPos,BlockState>(Comparator.<BlockPos>comparingInt(BlockPos::getX).thenComparingInt(BlockPos::getY).thenComparingInt(BlockPos::getZ)); + var world=(WorldGenLevel)Proxy.newProxyInstance(WorldGenLevel.class.getClassLoader(),new Class<?>[]{WorldGenLevel.class},(proxy,method,values)->{ + if(method.getName().equals("getMinY"))return -64; + if(method.getName().equals("getHeight")&&(values==null||values.length==0))return 384; + if(method.getName().equals("getSeaLevel"))return 63; + if(method.getName().equals("setBlockAndUpdate"))return InvocationHandler.invokeDefault(proxy,method,values); + var p=((BlockPos)values[0]).immutable();int call=calls[0]++; + switch(method.getName()) { + case "getBlockState"->{ + out.println("get "+p.getX()+" "+p.getY()+" "+p.getZ());if(call==fail)throw new Stop(); + var state=states.getOrDefault(p,BLOCKS[Math.floorMod(p.getX()*31+p.getY()*7+p.getZ()*17,5)].defaultBlockState());out.println("state "+Block.getId(state));return state; + } + case "setBlock"->{ + var state=(BlockState)values[1];int flags=(Integer)values[2];out.println("set "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+Block.getId(state)+" "+flags);if(call==fail)throw new Stop(); + boolean result=reject==0||call%reject!=0;if(result)states.put(p,state);out.println("written "+result);return result; + } + default->throw new AssertionError("unexpected world method "+method); + } + }); + var p=f.getAsJsonArray("origin");var origin=new BlockPos(p.get(0).getAsInt(),p.get(1).getAsInt(),p.get(2).getAsInt()); + var placed=new PlacedFeature(Holder.direct(decoded.get()),modifiers);var placer=new FeaturePlacer(world,generator); + for(int repeat=0;repeat<f.get("repeats").getAsInt();repeat++) { + calls[0]=0; + try {out.println("place "+(f.has("placement")?placer.place(placed,random,origin):decoded.get().place(world,null,random,origin)));}catch(Stop|IllegalArgumentException error){out.println("place error");} + out.println("next "+random.nextLong()); + for(var entry:states.entrySet()){var q=entry.getKey();out.println("stored "+q.getX()+" "+q.getY()+" "+q.getZ()+" "+Block.getId(entry.getValue()));} + out.println("end"); + } + } + out.println("tail "+random.nextLong()); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeChunkOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeChunkOracle.java new file mode 100644 index 000000000..9c203bd2f --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeChunkOracle.java @@ -0,0 +1,69 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.resources.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.level.levelgen.BelowZeroRetrogen; +import com.mojang.serialization.JsonOps; + +/** Original transport calling vanilla section-atomic biome fill and chunk reads. */ +public final class VanillaBiomeChunkOracle { + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var ids=new IdMapper<Holder<Biome>>(); + for(int i=0;i<512;i++) { + String key=switch(i){case 0->"minecraft:lush_caves";case 1->"minecraft:dripstone_caves";case 2->"minecraft:deep_dark";case 3->"horizon:lush_caves";default->"horizon:biome_"+i;}; + // No biome properties are accessed; direct holders have no registry key. + ids.add(i==511?Holder.direct(null):Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},ResourceKey.create(Registries.BIOME,Identifier.parse(key)))); + } + var upgrade=BelowZeroRetrogen.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString("{\"target_status\":\"minecraft:features\"}")).getOrThrow(); + Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(String line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();int min=f.get("min").getAsInt(),height=f.get("height").getAsInt(); + var factory=new PalettedContainerFactory(Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY),Blocks.AIR.defaultBlockState(),null,Strategy.createForBiomes(ids),ids.byId(f.get("default").getAsInt()),null); + var bounds=new int[]{min,min+height-1}; + var chunk=new ProtoChunk(new ChunkPos(f.get("cx").getAsInt(),f.get("cz").getAsInt()),UpgradeData.EMPTY,LevelHeightAccessor.create(min,height),factory,null){@Override public LevelHeightAccessor getHeightAccessorForGeneration(){return LevelHeightAccessor.create(bounds[0],bounds[1]-bounds[0]+1);}}; + chunk.setPersistedStatus(net.minecraft.world.level.chunk.status.ChunkStatus.BIOMES); + for(var value:f.getAsJsonArray("ops")) { + var op=value.getAsJsonArray();bounds[0]=op.get(3).getAsInt();bounds[1]=op.get(4).getAsInt();var calls=new int[1];boolean ok=true; + try { BiomeResolver candidate=(x,y,z)->{ + out.println("resolve "+x+" "+y+" "+z);int previous=calls[0]++; + if(previous==op.get(2).getAsInt())throw new IllegalStateException("synthetic provider failure"); + return ids.byId(Math.floorMod(x*31+y*7+z*17+op.get(0).getAsInt(),op.get(1).getAsInt())); + }; + chunk.setBelowZeroRetrogen(op.size()>5&&op.get(5).getAsBoolean()?upgrade:null); + var resolver=BelowZeroRetrogen.getBiomeResolver(candidate,chunk); + chunk.setBelowZeroRetrogen(op.size()>6&&op.get(6).getAsBoolean()?upgrade:null); + chunk.fillBiomesFromNoise(resolver); + }catch(IllegalStateException error){ok=false;} + out.println("fill "+(ok?"ok":"error")+" "+calls[0]); + for(int section=0;section<height/16;section++) { + out.println("section "+section);var data=chunk.getSection(section); + for(int y=0;y<4;y++)for(int z=0;z<4;z++){out.print("biomes");for(int x=0;x<4;x++)out.print(" "+ids.getId(data.getNoiseBiome(x,y,z)));out.println();} + } + for(var q:f.getAsJsonArray("queries")){var a=q.getAsJsonArray();out.println("query "+ids.getId(chunk.getNoiseBiome(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt())));} + } + if(f.has("resolver_queries"))for(var value:f.getAsJsonArray("resolver_queries")) { + var q=value.getAsJsonArray(); + chunk.setBelowZeroRetrogen(q.get(4).getAsBoolean()?upgrade:null); + var resolver=BelowZeroRetrogen.getBiomeResolver((x,y,z)->{ + out.println("resolve_query "+x+" "+y+" "+z); + if(q.get(0).getAsInt()<0)throw new IllegalStateException("synthetic candidate failure"); + return ids.byId(q.get(0).getAsInt()); + },chunk); + chunk.setBelowZeroRetrogen(q.get(5).getAsBoolean()?upgrade:null); + try {out.println("resolver_query "+ids.getId(resolver.getNoiseBiome(q.get(1).getAsInt(),q.get(2).getAsInt(),q.get(3).getAsInt())));} + catch(IllegalStateException error){out.println("resolver_query error");} + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeExport.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeExport.java new file mode 100644 index 000000000..03718e6a1 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeExport.java @@ -0,0 +1,32 @@ +package dev.horizonlab.parity; + +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import net.minecraft.world.level.biome.Climate; +import net.minecraft.world.level.biome.MultiNoiseBiomeSourceParameterList; + +/** Original private-data transport; vanilla builds the preset parameter lists. */ +public final class VanillaBiomeExport { + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion(); + net.minecraft.server.Bootstrap.bootStrap(); + var result=new JsonObject(); + var presets=new java.util.TreeMap<String,Climate.ParameterList<net.minecraft.resources.ResourceKey<net.minecraft.world.level.biome.Biome>>>(); + MultiNoiseBiomeSourceParameterList.knownPresets().forEach((preset,list)->presets.put(preset.id().toString(),list)); + for(var preset:presets.entrySet()) { + var entries=new JsonArray(); + for(var value:preset.getValue().values()) { + var point=value.getFirst();var entry=new JsonObject();var coordinates=new JsonArray(); + for(var parameter:new Climate.Parameter[]{point.temperature(),point.humidity(),point.continentalness(),point.erosion(),point.depth(),point.weirdness()}) { + var interval=new JsonArray();interval.add(parameter.min());interval.add(parameter.max());coordinates.add(interval); + } + entry.add("coordinates",coordinates);entry.addProperty("offset",point.offset());entry.addProperty("biome",value.getSecond().identifier().toString());entries.add(entry); + } + result.addProperty(preset.getKey(),entries.toString()); + } + Files.writeString(Path.of(args[0]),result.toString(),StandardCharsets.UTF_8); + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeGenerationOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeGenerationOracle.java new file mode 100644 index 000000000..2246e960d --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeGenerationOracle.java @@ -0,0 +1,72 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.*; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.resources.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.blending.Blender; +import net.minecraft.world.level.levelgen.densityfunction.*; +import net.minecraft.world.level.levelgen.material.rule.MaterialRule; +import net.minecraft.world.level.levelgen.synth.NormalNoise; + +/** Original transport invoking actual ChunkGenerator.doCreateBiomes. */ +public final class VanillaBiomeGenerationOracle { + @SuppressWarnings("unchecked") + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + var bundle=JsonParser.parseString(Files.readString(dir.resolve("registries.json"))).getAsJsonObject(); + var noises=new MappedRegistry<NormalNoise>(Registries.NOISE,Lifecycle.stable());var densities=new MappedRegistry<DensityFunction>(Registries.DENSITY_FUNCTION,Lifecycle.stable()); + var noiseLookup=noises.createRegistrationLookup();var densityLookup=densities.createRegistrationLookup(); + var ops=RegistryOps.create(JsonOps.INSTANCE,new RegistryOps.RegistryInfoLookup(){public <T> Optional<HolderGetter<T>> lookup(ResourceKey<? extends Registry<? extends T>> key){ + if(key.equals(Registries.NOISE))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(noiseLookup); + if(key.equals(Registries.DENSITY_FUNCTION))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(densityLookup);return Optional.empty();}}); + for(var e:bundle.getAsJsonObject("noises").entrySet())noises.register(ResourceKey.create(Registries.NOISE,Identifier.parse(e.getKey())),NormalNoise.DIRECT_CODEC.parse(ops,JsonParser.parseString(e.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN);noises.freeze(); + for(var e:bundle.getAsJsonObject("densities").entrySet())densities.register(ResourceKey.create(Registries.DENSITY_FUNCTION,Identifier.parse(e.getKey())),DensityFunctions.DIRECT_CODEC.parse(ops,JsonParser.parseString(e.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN);densities.freeze(); + var presets=new TreeMap<String,Climate.ParameterList<ResourceKey<Biome>>>();MultiNoiseBiomeSourceParameterList.knownPresets().forEach((preset,list)->presets.put(preset.id().toString(),list)); + var ids=new IdMapper<Holder<Biome>>();var holders=new TreeMap<String,Holder<Biome>>(); + var keys=new TreeSet<String>();keys.add("minecraft:plains");keys.addAll(List.of("horizon:old_0","horizon:old_1","horizon:old_2"));keys.addAll(List.of("minecraft:the_end","minecraft:end_highlands","minecraft:end_midlands","minecraft:small_end_islands","minecraft:end_barrens"));for(var list:presets.values())for(var entry:list.values())keys.add(entry.getSecond().identifier().toString()); + for(var key:keys){var holder=Holder.Reference.<Biome>createStandAlone(new HolderOwner<Biome>(){},ResourceKey.create(Registries.BIOME,Identifier.parse(key)));holders.put(key,holder);ids.add(holder);} + var factory=new PalettedContainerFactory(Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY),Blocks.AIR.defaultBlockState(),null,Strategy.createForBiomes(ids),holders.get("minecraft:plains"),null); + var fill=ChunkGenerator.class.getDeclaredMethod("doCreateBiomes",Blender.class,RandomState.class,ChunkAccess.class);fill.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();int min=f.get("min").getAsInt(),height=f.get("height").getAsInt(),sea=63;long seed=f.get("seed").getAsLong();boolean legacy=f.get("legacy").getAsBoolean(); + var setting=JsonParser.parseString(bundle.getAsJsonObject("settings").get(f.get("setting").getAsString()).getAsString()).getAsJsonObject();var router=NoiseRouter.CODEC.parse(ops,setting.get("noise_router")).getOrThrow(); + var state=RandomState.create(noises,seed,legacy,Blocks.STONE.defaultBlockState(),sea,router); + var entries=new ArrayList<com.mojang.datafixers.util.Pair<Climate.ParameterPoint,Holder<Biome>>>(); + for(var entry:presets.get(f.get("preset").getAsString()).values())entries.add(com.mojang.datafixers.util.Pair.of(entry.getFirst(),holders.get(entry.getSecond().identifier().toString()))); + BiomeSource source=MultiNoiseBiomeSource.createFromList(new Climate.ParameterList<>(entries)); + if(f.has("source"))switch(f.get("source").getAsString()) { + case "fixed" -> source=new FixedBiomeSource(holders.get(f.has("fixed_biome")?f.get("fixed_biome").getAsString():"minecraft:plains")); + case "checkerboard" -> source=new CheckerboardColumnBiomeSource(HolderSet.direct(List.of(holders.get("minecraft:plains"),holders.get("minecraft:the_end"),holders.get("minecraft:nether_wastes"))),f.get("scale").getAsInt()); + case "end" -> {var constructor=TheEndBiomeSource.class.getDeclaredConstructor(Holder.class,Holder.class,Holder.class,Holder.class,Holder.class);constructor.setAccessible(true);source=constructor.newInstance(holders.get("minecraft:the_end"),holders.get("minecraft:end_highlands"),holders.get("minecraft:end_midlands"),holders.get("minecraft:small_end_islands"),holders.get("minecraft:end_barrens"));} + default -> throw new IllegalArgumentException("unknown source"); + } + var material=Holder.Reference.<MaterialRule>createStandAlone(new HolderOwner<MaterialRule>(){},ResourceKey.create(Registries.MATERIAL_RULE,Identifier.parse("horizon:unused"))); + var settings=new NoiseGeneratorSettings(NoiseSettings.create(min,height),Blocks.STONE.defaultBlockState(),Blocks.WATER.defaultBlockState(),router,material,List.of(),sea,false,Optional.empty(),legacy,NoiseGeneratorSettings.DebugFunctions.EMPTY); + var generator=new NoiseBasedChunkGenerator(source,Holder.direct(settings)); + var bounds=LevelHeightAccessor.create(f.get("write_min").getAsInt(),f.get("write_max").getAsInt()-f.get("write_min").getAsInt()+1); + var chunk=new ProtoChunk(new ChunkPos(f.get("cx").getAsInt(),f.get("cz").getAsInt()),UpgradeData.EMPTY,LevelHeightAccessor.create(min,height),factory,null){@Override public LevelHeightAccessor getHeightAccessorForGeneration(){return f.has("retrogen")&&f.get("retrogen").getAsBoolean()?super.getHeightAccessorForGeneration():bounds;}}; + if(f.has("retrogen")&&f.get("retrogen").getAsBoolean()) { + chunk.fillBiomesFromNoise((x,y,z)->holders.get("horizon:old_"+Math.floorMod(x*31+y*7+z*17,3))); + chunk.setBelowZeroRetrogen(BelowZeroRetrogen.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString("{\"target_status\":\"minecraft:full\"}")).getOrThrow()); + } else chunk.setPersistedStatus(net.minecraft.world.level.chunk.status.ChunkStatus.BIOMES); + for(int repeat=0;repeat<f.get("repeats").getAsInt();repeat++) { + fill.invoke(generator,Blender.empty(),state,chunk);out.println("fill "+repeat); + for(int section=0;section<height/16;section++){out.println("section "+section);var data=chunk.getSection(section);for(int y=0;y<4;y++)for(int z=0;z<4;z++)for(int x=0;x<4;x++)out.println("biome "+data.getNoiseBiome(x,y,z).unwrapKey().orElseThrow().identifier());} + var manager=new BiomeManager(chunk::getNoiseBiome,BiomeManager.obfuscateSeed(seed)); + for(var q:f.getAsJsonArray("queries")){var a=q.getAsJsonArray();out.println("query "+manager.getBiome(new BlockPos(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt())).unwrapKey().orElseThrow().identifier());} + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomePlacementOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomePlacementOracle.java new file mode 100644 index 000000000..c5cbf4f00 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomePlacementOracle.java @@ -0,0 +1,80 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.WorldGenLevel; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.chunk.ChunkGenerator; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.feature.Feature; +import net.minecraft.world.level.levelgen.placement.*; + +/** Native biome-filter queries and per-invocation placed-feature context. */ +public final class VanillaBiomePlacementOracle { + private static final class Stop extends RuntimeException {} + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + Path dir=Path.of(args[1]); + var contextMethod=VanillaPlacementOracle.class.getDeclaredMethod("context",JsonObject.class);contextMethod.setAccessible(true); + var constructor=BiomeGenerationSettings.class.getDeclaredConstructor(HolderSet.class,List.class);constructor.setAccessible(true); + var getter=ChunkGenerator.class.getDeclaredField("generationSettingsGetter");getter.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();long seed=f.get("seed").getAsLong(); + RandomSource random=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + if(f.get("worldgen").getAsBoolean())random=new WorldgenRandom(random); + var modifiers=new ArrayList<PlacementModifier>();for(var value:f.getAsJsonArray("placement"))modifiers.add(PlacementModifier.CODEC.parse(JsonOps.INSTANCE,value).getOrThrow()); + int[] queries={0},calls={0};int queryFail=f.get("query_fail").getAsInt(),featureFail=f.get("feature_fail").getAsInt(); + var bounds=new JsonObject();bounds.add("context",JsonParser.parseString("[-64,384,63]")); + var generator=((PlacementContext)contextMethod.invoke(null,bounds)).generator(); + var biomes=List.of(Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},ResourceKey.create(Registries.BIOME,Identifier.parse("horizon:a"))),Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},ResourceKey.create(Registries.BIOME,Identifier.parse("horizon:b")))); + var leaf=new Feature(){ + public MapCodec<? extends Feature> codec(){return MapCodec.unit(this);} + public boolean place(WorldGenLevel world,ChunkGenerator gen,RandomSource rng,BlockPos p){ + out.println("feature "+p.getX()+" "+p.getY()+" "+p.getZ()); + if(f.get("draw").getAsBoolean())out.println("draw "+rng.nextLong()); + if(calls[0]++==featureFail)throw new Stop(); + if(f.get("nested").getAsBoolean())return new FeaturePlacer(world,gen).place(new PlacedFeature(Holder.direct(this),List.of(BiomeFilter.biome())),rng,p); + return f.get("return_mode").getAsInt()==0||(f.get("return_mode").getAsInt()==2&&Math.floorMod(p.getX()+p.getY()+p.getZ(),2)==0); + } + }; + var root=new PlacedFeature(Holder.direct(leaf),modifiers); + var copy=new PlacedFeature(root.feature(),root.placement()); + var other=new PlacedFeature(Holder.direct(new Feature(){public MapCodec<? extends Feature> codec(){return MapCodec.unit(this);}public boolean place(WorldGenLevel w,ChunkGenerator g,RandomSource r,BlockPos p){return true;}}),modifiers); + var settings=new ArrayList<BiomeGenerationSettings>(); + for(var value:f.getAsJsonArray("membership")) { + int mode=value.getAsInt();var values=mode==0?List.<Holder<PlacedFeature>>of():List.of(Holder.direct(mode==1?root:mode==2?copy:other)); + settings.add(constructor.newInstance(HolderSet.direct(List.of()),List.of(HolderSet.direct(values)))); + } + getter.set(generator,(java.util.function.Function<Holder<Biome>,BiomeGenerationSettings>)(biome)->{ + int index=biome==biomes.get(0)?0:1;out.println("settings "+index);if(queries[0]++==queryFail)throw new Stop();return settings.get(index); + }); + var world=(WorldGenLevel)Proxy.newProxyInstance(WorldGenLevel.class.getClassLoader(),new Class<?>[]{WorldGenLevel.class},(proxy,method,values)->switch(method.getName()) { + case "getMinY"->-64;case "getHeight"->384;case "getSeaLevel"->63; + case "getBiome"->{var p=(BlockPos)values[0];out.println("biome "+p.getX()+" "+p.getY()+" "+p.getZ());if(queries[0]++==queryFail)throw new Stop();int index=Math.floorMod(p.getX()*31+p.getY()*7+p.getZ()*17,2);out.println("selected "+index);yield biomes.get(index);} + default->throw new AssertionError(method); + }); + var p=f.getAsJsonArray("origin");var origin=new BlockPos(p.get(0).getAsInt(),p.get(1).getAsInt(),p.get(2).getAsInt()); + boolean top=f.get("top").getAsBoolean(),direct=f.get("direct").getAsBoolean(); + var context=new PlacementContext(world,generator,top?Optional.of(root):Optional.empty());var placer=new FeaturePlacer(world,generator); + for(int repeat=0;repeat<3;repeat++) { + queries[0]=0;calls[0]=0; + try { + if(direct){final RandomSource rng=random;modifiers.get(0).modify(context,random,origin,q->leaf.place(world,generator,rng,q));out.println("place true");} + else out.println("place "+(top?placer.placeWithBiomeCheck(root,random,origin):placer.place(root,random,origin))); + } catch(Stop|IllegalStateException|IndexOutOfBoundsException error){out.println("place error");} + out.println("next "+random.nextLong()); + } + out.println("tail "+random.nextLong()); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeSourceCodecOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeSourceCodecOracle.java new file mode 100644 index 000000000..8e79ae905 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeSourceCodecOracle.java @@ -0,0 +1,47 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.*; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.resources.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.levelgen.densityfunction.*; + +/** Original transport using BiomeSource.CODEC and decoded vanilla resolvers. */ +public final class VanillaBiomeSourceCodecOracle { + private static JsonElement normalized(JsonElement value) { + if(value.isJsonArray()){var a=new JsonArray();for(var v:value.getAsJsonArray())a.add(normalized(v));return a;} + if(value.isJsonObject()){var a=new JsonObject();for(var key:new TreeSet<>(value.getAsJsonObject().keySet()))a.add(key,normalized(value.getAsJsonObject().get(key)));return a;} + if(value.isJsonPrimitive()&&value.getAsJsonPrimitive().isNumber()){var a=new JsonObject();a.addProperty("float64_bits",String.format("%016x",Double.doubleToRawLongBits(Double.parseDouble(value.toString()))));return a;} + return value; + } + @SuppressWarnings("unchecked") + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + var load=VanillaMaterialConditionOracle.class.getDeclaredMethod("loadBiomes",Path.class);load.setAccessible(true);load.invoke(null,dir); + var field=VanillaMaterialConditionOracle.class.getDeclaredField("biomes");field.setAccessible(true);var biomes=(MappedRegistry<Biome>)field.get(null); + var presets=new MappedRegistry<MultiNoiseBiomeSourceParameterList>(Registries.MULTI_NOISE_BIOME_SOURCE_PARAMETER_LIST,Lifecycle.stable()); + for(var preset:List.of(MultiNoiseBiomeSourceParameterList.Preset.OVERWORLD,MultiNoiseBiomeSourceParameterList.Preset.NETHER))presets.register(ResourceKey.create(Registries.MULTI_NOISE_BIOME_SOURCE_PARAMETER_LIST,preset.id()),new MultiNoiseBiomeSourceParameterList(preset,biomes),RegistrationInfo.BUILT_IN);presets.freeze(); + var ops=RegistryOps.create(JsonOps.INSTANCE,new RegistryOps.RegistryInfoLookup(){public <T> Optional<HolderGetter<T>> lookup(ResourceKey<? extends Registry<? extends T>> key){ + if(key.equals(Registries.BIOME))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(biomes); + if(key.equals(Registries.MULTI_NOISE_BIOME_SOURCE_PARAMETER_LIST))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(presets);return Optional.empty();}}); + var positions=JsonParser.parseString(Files.readString(dir.resolve("positions.json"))).getAsJsonArray(); + var zero=new DensitySampler(){public float sampleValue(SamplerContext c,int x,int y,int z){return 0;}public void sampleVolume(SamplerContext c,DensityBuffer b,DensityVolume v){b.fill(0);}}.bind(SamplerContext.builder().enableCaches().build()); + var climate=new Climate.Sampler(zero,zero,zero,zero,zero,zero); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var json:Files.readAllLines(dir.resolve("inputs.txt"))) { + Optional<BiomeSource> decoded; + try { decoded=BiomeSource.CODEC.parse(ops,JsonParser.parseString(json)).result(); }catch(IllegalArgumentException|IllegalStateException error){decoded=Optional.empty();} + if(decoded.isEmpty()){out.println("codec error");continue;} + var source=decoded.get();out.println("codec "+normalized(BiomeSource.CODEC.encodeStart(ops,source).getOrThrow())); + var names=new TreeSet<String>();for(var biome:source.possibleBiomes())names.add(biome.unwrapKey().orElseThrow().identifier().toString());out.println("possible "+new Gson().toJson(names)); + var resolver=source.createResolver(climate); + for(var p:positions){var q=p.getAsJsonArray();try{out.println("biome "+resolver.getNoiseBiome(q.get(0).getAsInt(),q.get(1).getAsInt(),q.get(2).getAsInt()).unwrapKey().orElseThrow().identifier());}catch(ArithmeticException|IllegalStateException error){out.println("biome error");}} + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeSourceOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeSourceOracle.java new file mode 100644 index 000000000..0432f22bb --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeSourceOracle.java @@ -0,0 +1,39 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.resources.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.levelgen.densityfunction.*; + +/** Original transport calling actual fixed/checkerboard/End biome resolvers. */ +public final class VanillaBiomeSourceOracle { + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var ids=new IdMapper<Holder<Biome>>();for(int i=0;i<512;i++)ids.add(Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},ResourceKey.create(Registries.BIOME,Identifier.parse("horizon:biome_"+i)))); + var constructor=TheEndBiomeSource.class.getDeclaredConstructor(Holder.class,Holder.class,Holder.class,Holder.class,Holder.class);constructor.setAccessible(true); + var end=constructor.newInstance(ids.byId(0),ids.byId(1),ids.byId(2),ids.byId(3),ids.byId(4)); + Path dir=Path.of(args[1]);try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();BiomeResolver resolver; + switch(f.get("kind").getAsString()) { + case "fixed" -> resolver=new FixedBiomeSource(ids.byId(7)).createResolver(null); + case "checkerboard" -> {var values=new ArrayList<Holder<Biome>>();for(var v:f.getAsJsonArray("biomes"))values.add(ids.byId(v.getAsInt()));resolver=new CheckerboardColumnBiomeSource(HolderSet.direct(values),f.get("scale").getAsInt()).createResolver(null);} + case "end" -> { + var sampler=new DensitySampler(){ + public float sampleValue(SamplerContext context,int x,int y,int z){out.println("sample "+x+" "+y+" "+z);if(f.get("fail").getAsBoolean())throw new IllegalStateException("synthetic sampler failure");return Float.intBitsToFloat(Integer.parseUnsignedInt(f.get("bits").getAsString(),16));} + public void sampleVolume(SamplerContext context,DensityBuffer buffer,DensityVolume volume){throw new AssertionError("unexpected bulk query");} + }.bind(SamplerContext.builder().enableCaches().build()); + resolver=end.createResolver(new Climate.Sampler(sampler,sampler,sampler,sampler,sampler,sampler)); + } + default -> throw new IllegalArgumentException("invalid source"); + } + for(var p:f.getAsJsonArray("positions")){var q=p.getAsJsonArray();try{out.println("biome "+ids.getId(resolver.getNoiseBiome(q.get(0).getAsInt(),q.get(1).getAsInt(),q.get(2).getAsInt())));}catch(ArithmeticException|IllegalStateException error){out.println("error");}} + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeTemperatureOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeTemperatureOracle.java new file mode 100644 index 000000000..bfe972b19 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeTemperatureOracle.java @@ -0,0 +1,69 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.concurrent.atomic.AtomicReference; +import it.unimi.dsi.fastutil.longs.Long2FloatLinkedOpenHashMap; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.biome.Biome; + +/** Original transport for native biome temperature methods and cache contents. */ +public final class VanillaBiomeTemperatureOracle { + private static Method adjusted,temperature; + private static Field cache; + private static Object climate(JsonObject f) throws Exception { + var type=Class.forName("net.minecraft.world.level.biome.Biome$ClimateSettings"); + if(f.has("json")) { + var field=type.getDeclaredField("CODEC");field.setAccessible(true); + var codec=(MapCodec<?>)field.get(null); + return codec.codec().parse(JsonOps.INSTANCE,JsonParser.parseString(f.get("json").getAsString())).result().orElse(null); + } + var constructor=type.getDeclaredConstructor(boolean.class,float.class,Biome.TemperatureModifier.class,float.class);constructor.setAccessible(true); + return constructor.newInstance(f.get("precipitation").getAsBoolean(),Float.intBitsToFloat(Integer.parseUnsignedInt(f.get("base").getAsString(),16)),Biome.TemperatureModifier.valueOf(f.get("modifier").getAsString()),f.has("downfall")?Float.intBitsToFloat(Integer.parseUnsignedInt(f.get("downfall").getAsString(),16)):0f); + } + private static Object field(Object value,String name) throws Exception { + var method=value.getClass().getDeclaredMethod(name);method.setAccessible(true);return method.invoke(value); + } + private static Biome make(Object climate) throws Exception { + var biome=Biome.class.getDeclaredConstructors()[0];biome.setAccessible(true);return (Biome)biome.newInstance(climate,null,null,null); + } + private static String bits(float value){return Integer.toUnsignedString(Float.floatToIntBits(value),16);} + private static void operations(Biome biome,JsonArray operations,PrintWriter out) throws Exception { + for(var item:operations) { + var op=item.getAsJsonArray();switch(op.get(0).getAsString()) { + case "query"->{ + var pos=new BlockPos(op.get(1).getAsInt(),op.get(2).getAsInt(),op.get(3).getAsInt());int sea=op.get(4).getAsInt(); + out.println("adjusted "+bits((Float)adjusted.invoke(biome,pos,sea))); + out.println("cached "+bits((Float)temperature.invoke(biome,pos,sea))); + out.println("weather "+biome.warmEnoughToRain(pos,sea)+" "+biome.coldEnoughToSnow(pos,sea)+" "+biome.shouldMeltFrozenOceanIcebergSlightly(pos,sea)+" "+biome.getPrecipitationAt(pos,sea)); + } + case "fill"->{for(int i=0;i<op.get(1).getAsInt();i++){var pos=new BlockPos(op.get(2).getAsInt()+i,i&255,i*31);out.println("fill "+bits((Float)temperature.invoke(biome,pos,op.get(3).getAsInt())));}} + case "dump"->{var map=(Long2FloatLinkedOpenHashMap)((ThreadLocal<?>)cache.get(biome)).get();out.println("cache "+map.size());for(var entry:map.long2FloatEntrySet())out.println(Long.toUnsignedString(entry.getLongKey(),16)+" "+bits(entry.getFloatValue()));} + case "thread"->{ + var failure=new AtomicReference<Throwable>(); + var thread=new Thread(()->{try{operations(biome,op.get(1).getAsJsonArray(),out);}catch(Throwable error){failure.set(error);}}); + thread.start();thread.join();if(failure.get()!=null)throw new AssertionError("temperature worker failed",failure.get()); + } + default->throw new AssertionError("unknown operation "+op); + } + } + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + adjusted=Biome.class.getDeclaredMethod("getHeightAdjustedTemperature",BlockPos.class,int.class);adjusted.setAccessible(true); + temperature=Biome.class.getDeclaredMethod("getTemperature",BlockPos.class,int.class);temperature.setAccessible(true); + cache=Biome.class.getDeclaredField("temperatureCache");cache.setAccessible(true); + Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(String line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();var climate=climate(f); + if(climate==null){out.println("decode error");continue;} + out.println("settings "+field(climate,"hasPrecipitation")+" "+bits((Float)field(climate,"temperature"))+" "+field(climate,"temperatureModifier")+" "+bits((Float)field(climate,"downfall"))); + operations(make(climate),f.getAsJsonArray("ops"),out); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeZoomOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeZoomOracle.java new file mode 100644 index 000000000..e130df20f --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeZoomOracle.java @@ -0,0 +1,36 @@ +package dev.horizonlab.parity; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.biome.BiomeManager; + +/** Original transport; actual biome manager selects coordinates for a traced resolver. */ +public final class VanillaBiomeZoomOracle { + public static void main(String[] args) throws Exception { + Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(String line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var v=line.split(" "); + switch(v[0]) { + case "s" -> out.println("s "+BiomeManager.obfuscateSeed(Long.parseLong(v[1]))); + case "b" -> { + out.print("b"); + var manager=new BiomeManager((x,y,z)->{out.print(" "+x+" "+y+" "+z);return null;},Long.parseLong(v[1])); + var pos=new BlockPos(Integer.parseInt(v[2]),Integer.parseInt(v[3]),Integer.parseInt(v[4])); + manager.getBiome(pos);manager.getNoiseBiomeAtPosition(pos); + manager.withDifferentSource((x,y,z)->{out.print(" "+x+" "+y+" "+z);return null;}).getBiome(pos.getX(),pos.getY(),pos.getZ()); + out.println(); + } + case "p" -> { + out.print("p"); + var manager=new BiomeManager((x,y,z)->{out.print(" "+x+" "+y+" "+z);return null;},0); + manager.getNoiseBiomeAtPosition(Double.longBitsToDouble(Long.parseUnsignedLong(v[1],16)),Double.longBitsToDouble(Long.parseUnsignedLong(v[2],16)),Double.longBitsToDouble(Long.parseUnsignedLong(v[3],16))); + out.println(); + } + default -> throw new IllegalArgumentException("unknown fixture operation"); + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockBehaviourExporter.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockBehaviourExporter.java new file mode 100644 index 000000000..4a475133b --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockBehaviourExporter.java @@ -0,0 +1,255 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.lang.reflect.RecordComponent; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.Optional; +import net.minecraft.SharedConstants; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.Holder; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.resources.Identifier; +import net.minecraft.resources.ResourceKey; +import net.minecraft.server.Bootstrap; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.EmptyBlockGetter; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.SupportType; +import net.minecraft.world.level.material.FlowingFluid; +import net.minecraft.world.level.material.Fluid; + +/** + * Original exporter of the block-behaviour inputs Horizon's level simulation needs: + * every block's class chain and immutable instance configuration (read reflectively), + * per-state support/redstone/fluid facts from vanilla's accessors over an empty level, + * fire odds and block-item placement bindings. No behaviour is evaluated here. + */ +public final class VanillaBlockBehaviourExporter { + private static JsonElement value(Object v, int depth) { + if (v == null) { + return JsonNull.INSTANCE; + } else if (v instanceof Boolean b) { + return new JsonPrimitive(b); + } else if (v instanceof Number n) { + return new JsonPrimitive(n); + } else if (v instanceof String || v instanceof Character) { + return new JsonPrimitive(v.toString()); + } else if (v instanceof Enum<?> e) { + return new JsonPrimitive(e.name()); + } else if (v instanceof Block b) { + return new JsonPrimitive(BuiltInRegistries.BLOCK.getKey(b).toString()); + } else if (v instanceof BlockState s) { + var o = new JsonObject(); + o.addProperty("state", Block.getId(s)); + return o; + } else if (v instanceof Item i) { + return new JsonPrimitive(BuiltInRegistries.ITEM.getKey(i).toString()); + } else if (v instanceof Fluid f) { + return new JsonPrimitive(BuiltInRegistries.FLUID.getKey(f).toString()); + } else if (v instanceof SoundEvent s) { + return new JsonPrimitive(s.location().toString()); + } else if (v instanceof Identifier id) { + return new JsonPrimitive(id.toString()); + } else if (v instanceof ResourceKey<?> key) { + return new JsonPrimitive(key.identifier().toString()); + } else if (v instanceof TagKey<?> tag) { + return new JsonPrimitive("#" + tag.location()); + } else if (v instanceof Holder<?> holder) { + if (holder.isBound() && depth > 0) { + return value(holder.value(), depth - 1); + } + return holder.unwrapKey().<JsonElement>map(k -> new JsonPrimitive(k.identifier().toString())).orElse(JsonNull.INSTANCE); + } else if (v instanceof Optional<?> optional) { + return optional.isPresent() ? value(optional.get(), depth) : JsonNull.INSTANCE; + } else if (depth > 0 && v instanceof java.util.Map<?, ?> map) { + var o = new JsonObject(); + for (var entry : map.entrySet()) { + var key = value(entry.getKey(), 0); + o.add(key.isJsonPrimitive() ? key.getAsString() : key.toString(), value(entry.getValue(), depth - 1)); + } + return o; + } else if (depth > 0 && v.getClass().isRecord()) { + var o = new JsonObject(); + for (RecordComponent component : v.getClass().getRecordComponents()) { + try { + component.getAccessor().setAccessible(true); + o.add(component.getName(), value(component.getAccessor().invoke(v), depth - 1)); + } catch (Exception e) { + o.addProperty(component.getName(), "<error>"); + } + } + return o; + } else if (depth > 0 && v instanceof SoundType sound) { + var o = new JsonObject(); + o.addProperty("volume", sound.getVolume()); + o.addProperty("pitch", sound.getPitch()); + o.addProperty("break", sound.getBreakSound().location().toString()); + o.addProperty("place", sound.getPlaceSound().location().toString()); + return o; + } else if (v instanceof net.minecraft.core.particles.ParticleType<?> particle) { + return new JsonPrimitive(BuiltInRegistries.PARTICLE_TYPE.getKey(particle).toString()); + } else if (depth > 0 && v.getClass().getName().startsWith("net.minecraft.world.level.block.grower.")) { + return fields(v, Object.class); + } + return new JsonPrimitive("<" + v.getClass().getSimpleName() + ">"); + } + + private static JsonObject fields(Object instance, Class<?> top) { + var o = new JsonObject(); + for (Class<?> c = instance.getClass(); c != null && c != top; c = c.getSuperclass()) { + for (Field field : c.getDeclaredFields()) { + if (Modifier.isStatic(field.getModifiers()) || o.has(field.getName())) { + continue; + } + try { + field.setAccessible(true); + o.add(field.getName(), value(field.get(instance), 3)); + } catch (Exception e) { + o.addProperty(field.getName(), "<error>"); + } + } + } + return o; + } + + private static JsonArray chain(Class<?> c, Class<?> top) { + var result = new JsonArray(); + for (; c != null && c != top; c = c.getSuperclass()) { + result.add(c.getSimpleName()); + } + return result; + } + + private static JsonArray blocks() { + var blocks = new JsonArray(); + for (Block block : BuiltInRegistries.BLOCK) { + var o = new JsonObject(); + o.addProperty("name", BuiltInRegistries.BLOCK.getKey(block).toString()); + o.add("class", chain(block.getClass(), BlockBehaviour.class)); + var interfaces = new JsonArray(); + for (Class<?> c = block.getClass(); c != null; c = c.getSuperclass()) { + for (Class<?> i : c.getInterfaces()) { + interfaces.add(i.getSimpleName()); + } + } + o.add("interfaces", interfaces); + o.add("fields", fields(block, Block.class)); + o.addProperty("dynamic_shape", block.hasDynamicShape()); + o.addProperty("item", BuiltInRegistries.ITEM.getKey(block.asItem()).toString()); + blocks.add(o); + } + return blocks; + } + + private static final SupportType[] SUPPORTS = {SupportType.FULL, SupportType.CENTER, SupportType.RIGID}; + + private static JsonArray states() { + var states = new JsonArray(); + var level = EmptyBlockGetter.INSTANCE; + for (BlockState state : Block.BLOCK_STATE_REGISTRY) { + var o = new JsonArray(); + int sturdy = 0; + for (int s = 0; s < SUPPORTS.length; s++) { + for (Direction d : Direction.values()) { + try { + if (state.isFaceSturdy(level, BlockPos.ZERO, d, SUPPORTS[s])) { + sturdy |= 1 << (s * 6 + d.ordinal()); + } + } catch (Exception e) { + sturdy |= 1 << 30; + } + } + } + int flags = 0; + if (state.isSolid()) flags |= 1; + if (state.isAir()) flags |= 2; + try { + if (state.isRedstoneConductor(level, BlockPos.ZERO)) flags |= 4; + } catch (Exception e) { + flags |= 1 << 20; + } + if (state.isSignalSource()) flags |= 8; + if (state.hasAnalogOutputSignal()) flags |= 16; + try { + if (state.getCollisionShape(level, BlockPos.ZERO).isEmpty()) flags |= 32; + } catch (Exception e) { + flags |= 1 << 21; + } + try { + if (state.isSuffocating(level, BlockPos.ZERO)) flags |= 64; + } catch (Exception e) { + flags |= 1 << 22; + } + var fluid = state.getFluidState(); + int fluidId = BuiltInRegistries.FLUID.getId(fluid.getType()); + int fluidAmount = fluid.getAmount(); + boolean falling = fluid.hasProperty(FlowingFluid.FALLING) && fluid.getValue(FlowingFluid.FALLING); + // Weak/strong signals over an empty level, packed 4 bits per direction. + long weak = 0; + long strong = 0; + boolean signalError = false; + if (state.isSignalSource()) { + for (Direction d : Direction.values()) { + try { + weak |= ((long) state.getSignal(level, BlockPos.ZERO, d) & 15) << (4 * d.ordinal()); + strong |= ((long) state.getDirectSignal(level, BlockPos.ZERO, d) & 15) << (4 * d.ordinal()); + } catch (Exception e) { + signalError = true; + } + } + } + o.add(sturdy); + o.add(flags); + o.add(fluidId); + o.add(fluidAmount); + o.add(falling); + o.add(weak); + o.add(strong); + o.add(signalError); + o.add(state.instrument().name()); + states.add(o); + } + return states; + } + + private static JsonObject items() { + var items = new JsonObject(); + for (Item item : BuiltInRegistries.ITEM) { + if (!(item instanceof BlockItem)) { + continue; + } + var o = new JsonObject(); + o.add("class", chain(item.getClass(), Item.class)); + o.add("fields", fields(item, Item.class)); + items.add(BuiltInRegistries.ITEM.getKey(item).toString(), o); + } + return items; + } + + public static void main(String[] args) throws Exception { + SharedConstants.tryDetectVersion(); + Bootstrap.bootStrap(); + var result = new JsonObject(); + result.add("blocks", blocks()); + result.add("states", states()); + result.add("items", items()); + var fluids = new JsonArray(); + for (Fluid fluid : BuiltInRegistries.FLUID) { + fluids.add(BuiltInRegistries.FLUID.getKey(fluid).toString()); + } + result.add("fluids", fluids); + result.add("fire", fields(Blocks.FIRE, Block.class)); + Files.writeString(Path.of(args[0]), new Gson().toJson(result), StandardCharsets.UTF_8); + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockCollisionScanOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockCollisionScanOracle.java new file mode 100644 index 000000000..53002e6f0 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockCollisionScanOracle.java @@ -0,0 +1,85 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import net.minecraft.core.BlockPos; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.phys.*; +import net.minecraft.world.phys.shapes.*; +/** Runs native BlockCollisions with controlled block metadata and traced providers. */ +public final class VanillaBlockCollisionScanOracle { + static final class Stop extends RuntimeException {} + static final class Trace { + PrintWriter out;int calls,fail;CollisionGetter global; + void query(String value){out.println(value);if(calls++==fail)throw new Stop();} + } + public static class State extends BlockState { + int id;boolean large,moving,suffocating;VoxelShape shape;Trace trace;BlockGetter readFrom; + public State(){super(null,null,null);} + @Override public VoxelShape getCollisionShape(BlockGetter world,BlockPos p,CollisionContext context){if(world!=trace.global)throw new AssertionError("wrong collision world");trace.query("shape "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+id);return shape;} + @Override public Block getBlock(){return moving?Blocks.MOVING_PISTON:Blocks.STONE;} + @Override public boolean hasLargeCollisionShape(){return large;} + @Override public boolean isSuffocating(BlockGetter world,BlockPos p){if(world!=readFrom||world==trace.global)throw new AssertionError("wrong suffocation world");trace.query("suffocating "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+id);return suffocating;} + } + public static class SupportingEntity extends net.minecraft.world.entity.Marker { + public SupportingEntity(){super(null,null);} + @Override public boolean isDescending(){return false;} + } + static VoxelShape shape(int index){return switch(index){ + case 0->Shapes.empty();case 1->Shapes.block();case 2->Shapes.block().move(0,0,0); + case 3->Shapes.box(0,0,0,1,0.5,1);case 4->Shapes.box(-0.25,-0.5,-0.25,1.25,1.5,1.25); + case 5->Shapes.box(0,0,0,1e-8,1,1); + case 6->Shapes.or(Shapes.box(0,0,0,0.25,1,0.25),Shapes.box(0.75,0,0.75,1,1,1)); + default->throw new AssertionError(index); + };} + static double number(JsonElement value){return Double.longBitsToDouble(Long.parseUnsignedLong(value.getAsString(),16));} + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var allocator=Class.forName("sun.misc.Unsafe");var access=allocator.getDeclaredField("theUnsafe");access.setAccessible(true);var unsafe=access.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + var entityPosition=net.minecraft.world.entity.Entity.class.getDeclaredField("position");entityPosition.setAccessible(true); + var emit=VanillaFaceSupportOracle.class.getDeclaredMethod("emit",PrintWriter.class,VoxelShape.class);emit.setAccessible(true); + Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){ + for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var trace=new Trace();trace.out=out;trace.fail=f.get("fail").getAsInt(); + var palette=f.getAsJsonArray("palette");var states=new State[palette.size()]; + for(int i=0;i<states.length;i++){var v=palette.get(i).getAsJsonArray();var state=(State)allocate.invoke(unsafe,State.class);state.id=i;state.shape=shape(v.get(0).getAsInt());state.large=v.get(1).getAsBoolean();state.moving=v.get(2).getAsBoolean();state.suffocating=v.get(3).getAsBoolean();state.trace=trace;states[i]=state;} + int seed=f.get("seed").getAsInt(),missing=f.get("missing").getAsInt(); + var world=(CollisionGetter)Proxy.newProxyInstance(CollisionGetter.class.getClassLoader(),new Class<?>[]{CollisionGetter.class},(proxy,method,values)->{ + if(method.isDefault())return InvocationHandler.invokeDefault(proxy,method,values); + if(!method.getName().equals("getChunkForCollisions"))throw new AssertionError(method); + int cx=(int)values[0],cz=(int)values[1];trace.query("chunk "+cx+" "+cz); + if(missing==1||missing==2&&((cx^cz)&1)!=0)return null; + return Proxy.newProxyInstance(BlockGetter.class.getClassLoader(),new Class<?>[]{BlockGetter.class},(chunk,m,a)->{ + if(!m.getName().equals("getBlockState"))throw new AssertionError(m); + var p=(BlockPos)a[0];trace.query("block "+p.getX()+" "+p.getY()+" "+p.getZ()); + var state=states[((p.getX()*3+p.getY()*5+p.getZ()*7+seed)&Integer.MAX_VALUE)%states.length];state.readFrom=(BlockGetter)chunk;return state; + }); + });trace.global=world; + var context=new CollisionContext(){ + public boolean isDescending(){throw new AssertionError();} + public boolean isAbove(VoxelShape s,BlockPos p,boolean d){throw new AssertionError();} + public boolean isHoldingItem(Item i){throw new AssertionError();} + public boolean alwaysCollideWithFluid(){throw new AssertionError();} + public boolean canStandOnFluid(FluidState a,FluidState b){throw new AssertionError();} + public VoxelShape getCollisionShape(BlockState state,CollisionGetter collision,BlockPos p){if(collision!=world)throw new AssertionError("wrong collision world");var s=(State)state;trace.query("shape "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+s.id);return s.shape;} + }; + var v=f.getAsJsonArray("box");var box=new AABB(number(v.get(0)),number(v.get(1)),number(v.get(2)),number(v.get(3)),number(v.get(4)),number(v.get(5))); + if(f.has("support_position")){ + var entity=(SupportingEntity)allocate.invoke(unsafe,SupportingEntity.class);var pos=f.getAsJsonArray("support_position");entityPosition.set(entity,new Vec3(number(pos.get(0)),number(pos.get(1)),number(pos.get(2)))); + try{var support=world.findSupportingBlock(entity,box);if(support.isEmpty())out.println("support none");else{var p=support.get();out.println("support "+p.getX()+" "+p.getY()+" "+p.getZ());}}catch(Stop error){out.println("support error");} + out.println("done support "+trace.calls);continue; + } + var scan=new BlockCollisions<VoxelShape>(world,context,box,f.get("suffocating").getAsBoolean(),(p,s)->{out.println("hit "+p.getX()+" "+p.getY()+" "+p.getZ());return s;}); + int hits=0,limit=f.get("limit").getAsInt(); + try{while(hits<limit&&scan.hasNext()){emit.invoke(null,out,scan.next());hits++;}}catch(Stop error){out.println("error");} + out.println("done "+hits+" "+trace.calls); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockEntityStorageOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockEntityStorageOracle.java new file mode 100644 index 000000000..50cab96f3 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockEntityStorageOracle.java @@ -0,0 +1,62 @@ +package dev.horizonlab.parity; +import java.io.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.nbt.*; +import net.minecraft.resources.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.entity.*; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.level.storage.loot.LootTable; + +/** Native proto-chunk entity storage and numeric position transport. */ +public final class VanillaBlockEntityStorageOracle { + private static final Comparator<BlockPos> ORDER=Comparator.<BlockPos>comparingInt(BlockPos::getX).thenComparingInt(BlockPos::getY).thenComparingInt(BlockPos::getZ); + private static PalettedContainerFactory factory; + private static String xyz(BlockPos p){return p.getX()+" "+p.getY()+" "+p.getZ();} + private static final class Input { + String[] words;int cursor=1;Input(String line){words=line.split(" ");} + int integer(){return Integer.parseInt(words[cursor++]);}long number(){return Long.parseLong(words[cursor++]);} + BlockPos pos(){return new BlockPos(integer(),integer(),integer());} + Tag tag(){String type=words[cursor++],value=words[cursor++];return switch(type){ + case "none"->null;case "byte"->ByteTag.valueOf(Byte.parseByte(value));case "short"->ShortTag.valueOf(Short.parseShort(value));case "int"->IntTag.valueOf(Integer.parseInt(value));case "long"->LongTag.valueOf(Long.parseLong(value)); + case "float"->FloatTag.valueOf(Float.intBitsToFloat(Integer.parseUnsignedInt(value,16)));case "double"->DoubleTag.valueOf(Double.longBitsToDouble(Long.parseUnsignedLong(value,16)));case "string"->StringTag.valueOf(value);default->throw new AssertionError(type); + };} + } + private static String atom(Tag tag){ + if(tag==null)return "none"; + if(tag instanceof FloatTag value)return "float:"+Integer.toUnsignedString(Float.floatToRawIntBits(value.floatValue()),16); + if(tag instanceof DoubleTag value)return "double:"+Long.toUnsignedString(Double.doubleToRawLongBits(value.doubleValue()),16); + if(tag instanceof NumericTag value)return tag.getId()+":"+value.longValue(); + return tag.getId()+":invalid"; + } + private static String pending(CompoundTag tag){return tag==null?"none":tag.getLongOr("mark",0)+" "+atom(tag.get("x"))+" "+atom(tag.get("y"))+" "+atom(tag.get("z"));} + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + Holder<Biome> biome=Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},Biomes.PLAINS);var ids=new IdMapper<Holder<Biome>>();ids.add(biome); + factory=new PalettedContainerFactory(Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY),Blocks.AIR.defaultBlockState(),null,Strategy.createForBiomes(ids),biome,null); + var registries=RegistryAccess.fromRegistryOfRegistries(BuiltInRegistries.REGISTRY); + var loot=ResourceKey.create(Registries.LOOT_TABLE,Identifier.parse("horizon:storage_probe")); + ProtoChunk chunk=null; + try(var input=Files.newBufferedReader(Path.of(args[0]));var out=new PrintWriter(Files.newBufferedWriter(Path.of(args[1])))){ + String line;int index=0; + while((line=input.readLine())!=null){var in=new Input(line);String op=in.words[0];out.println("command "+index+++" "+op); + switch(op){ + case "reset"->chunk=new ProtoChunk(new ChunkPos(in.integer(),in.integer()),UpgradeData.EMPTY,LevelHeightAccessor.create(-64,384),factory,null); + case "pending","resolve"->{var tag=new CompoundTag();tag.putLong("mark",in.number());for(String axis:new String[]{"x","y","z"}){var value=in.tag();if(value!=null)tag.put(axis,value);}out.println("position "+xyz(BlockEntity.getPosFromTag(chunk.getPos(),tag)));if(op.equals("pending"))chunk.setBlockEntityNbt(tag);} + case "active"->{var p=in.pos();var entity=new ChestBlockEntity(p,Blocks.CHEST.defaultBlockState());entity.setLootTable(loot,in.number());chunk.setBlockEntity(entity);} + case "remove"->chunk.removeBlockEntity(in.pos()); + case "mutate"->{var p=in.pos();int x=in.integer();var tag=chunk.getBlockEntityNbt(p);if(tag!=null)tag.putInt("x",x);} + case "get","save"->{var p=in.pos();if(op.equals("get")){var active=chunk.getBlockEntity(p);out.println("active "+(active==null?"none":((ChestBlockEntity)active).getLootTableSeed()));out.println("pending "+pending(chunk.getBlockEntityNbt(p)));}else{var tag=chunk.getBlockEntityNbtForSaving(p,registries);if(chunk.getBlockEntity(p)!=null)out.println("saved active "+tag.getStringOr("id","")+" "+tag.getIntOr("x",0)+" "+tag.getIntOr("y",0)+" "+tag.getIntOr("z",0)+" "+tag.getLongOr("LootTableSeed",0));else out.println("saved pending "+pending(tag));}} + case "dump"->{var positions=new TreeSet<BlockPos>(ORDER);positions.addAll(chunk.getBlockEntitiesPos());for(var p:positions){var entity=chunk.getBlockEntity(p);out.println("entry "+xyz(p)+" "+(entity==null?"none":((ChestBlockEntity)entity).getLootTableSeed())+" "+pending(chunk.getBlockEntityNbt(p)));}out.println("size "+positions.size()+" "+chunk.getBlockEntityNbts().size());} + default->throw new AssertionError(op); + } + if(in.cursor!=in.words.length)throw new AssertionError("extra input"); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockLandingOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockLandingOracle.java new file mode 100644 index 000000000..250a8bf3d --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockLandingOracle.java @@ -0,0 +1,218 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.sounds.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.entity.*; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.damagesource.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.level.gamerules.*; +import net.minecraft.world.level.gameevent.*; +import net.minecraft.world.phys.*; +/** Runs registered native landing/bounce methods with controlled observable providers. */ +public final class VanillaBlockLandingOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate; + static <T>T make(Class<T> type){try{return type.cast(allocate.invoke(unsafe,type));}catch(Exception e){throw new AssertionError(e);}} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static String pos(BlockPos p){return p.getX()+" "+p.getY()+" "+p.getZ();} + static String bounds(String label,AABB b){return String.format("%s %016x %016x %016x %016x %016x %016x",label,Double.doubleToLongBits(b.minX),Double.doubleToLongBits(b.minY),Double.doubleToLongBits(b.minZ),Double.doubleToLongBits(b.maxX),Double.doubleToLongBits(b.maxY),Double.doubleToLongBits(b.maxZ));} + static AABB box(JsonElement v){var a=v.getAsJsonArray();return new AABB(number(a.get(0)),number(a.get(1)),number(a.get(2)),number(a.get(3)),number(a.get(4)),number(a.get(5)));} + static String sound(SoundEvent s){if(s==SoundEvents.HONEY_BLOCK_SLIDE)return "honey-slide";if(s==SoundEvents.HONEY_BLOCK_FALL)return "honey-fall";if(s==SoundEvents.TURTLE_EGG_BREAK)return "egg-break";if(s==SoundEvents.SHELF_MUSHROOM_BOUNCE)return "mushroom";if(s==SoundEvents.GENERIC_SMALL_FALL)return "small";if(s==SoundEvents.GENERIC_BIG_FALL)return "big";throw new AssertionError(s);} + static final class Data { + JsonObject f;PrintWriter out;int calls;BlockState state;Sources sources;Rules rules;Server server;RandomSource random;List<Occupant> occupants; + boolean flag(String name){return f.get(name).getAsBoolean();} + void query(String s){out.println(s);if(calls++==f.get("fail").getAsInt())throw new Stop();} + boolean damage(double distance,float multiplier,DamageSource source){query(String.format("damage %016x %08x %s",Double.doubleToLongBits(distance),Float.floatToIntBits(multiplier),source==sources.fall?"fall":source==sources.stalagmite?"stalagmite":"unknown"));return flag("damage");} + void entitySound(SoundEvent s,float volume,float pitch){query(String.format("entity-sound %s %08x %08x",sound(s),Float.floatToIntBits(volume),Float.floatToIntBits(pitch)));} + boolean set(BlockPos p,BlockState next,int flags){query("set "+pos(p)+" "+Block.getId(next)+" "+flags);if(flag("write"))state=next;return flag("write");} + boolean destroy(BlockPos p,boolean drops){query("destroy "+pos(p)+" "+drops);if(flag("write"))state=Blocks.AIR.defaultBlockState();return flag("write");} + void event(Holder<GameEvent> event,BlockPos p,GameEvent.Context c){query("event "+(event==GameEvent.BLOCK_CHANGE?"change":event==GameEvent.BLOCK_DESTROY?"destroy":"unknown")+" "+pos(p)+" "+Block.getId(c.affectedState())+" "+(c.sourceEntity()!=null));} + void blockSound(Entity entity,BlockPos p,SoundEvent sound,SoundSource source,float volume,float pitch){if(entity!=null||source!=SoundSource.BLOCKS)throw new AssertionError();query(String.format("block-sound %s %s %08x %08x",pos(p),sound(sound),Float.floatToIntBits(volume),Float.floatToIntBits(pitch)));} + List<Entity> entities(Entity excluded,AABB bounds){if(excluded!=null)throw new AssertionError();query(bounds("entities",bounds));return new ArrayList<Entity>(occupants);} + } + static final class Sources extends DamageSources { + Data d;DamageSource fall,stalagmite;Sources(){super(null);} + @Override public DamageSource fall(){d.query("fall-source");return fall;} + @Override public DamageSource stalagmite(){d.query("stalagmite-source");return stalagmite;} + } + static final class Rules extends GameRules { + Data d;Rules(){super(net.minecraft.world.flag.FeatureFlagSet.of());} + @SuppressWarnings("unchecked") @Override public <T>T get(GameRule<T> rule){if(rule!=GameRules.MOB_GRIEFING)throw new AssertionError();d.query("mob-griefing");return (T)Boolean.valueOf(d.flag("griefing"));} + } + static final class Server extends net.minecraft.server.MinecraftServer { + @Override public int getMaxPlayers(){throw new UnsupportedOperationException();} + Data d;Server(){super(null,null,null,null,Optional.empty(),null,null,null,null,false,null);} + @Override public boolean isUnderSpawnProtection(net.minecraft.server.level.ServerLevel level,BlockPos p,Player player){d.query("protection "+pos(p));return d.flag("protected");} + @Override public boolean initServer(){throw new UnsupportedOperationException();} + @Override public net.minecraft.server.permissions.LevelBasedPermissionSet operatorUserPermissions(){throw new UnsupportedOperationException();} + @Override public net.minecraft.server.permissions.PermissionSet getFunctionCompilationPermissions(){throw new UnsupportedOperationException();} + @Override public boolean shouldRconBroadcast(){throw new UnsupportedOperationException();} + @Override public net.minecraft.util.debugchart.SampleLogger getTickTimeLogger(){throw new UnsupportedOperationException();} + @Override public boolean isTickTimeLoggingEnabled(){throw new UnsupportedOperationException();} + @Override public net.minecraft.SystemReport fillServerSystemReport(net.minecraft.SystemReport p0){throw new UnsupportedOperationException();} + @Override public boolean isDedicatedServer(){throw new UnsupportedOperationException();} + @Override public int getRateLimitPacketsPerSecond(){throw new UnsupportedOperationException();} + @Override public int getCommandSpamThresholdSeconds(){throw new UnsupportedOperationException();} + @Override public int getChatSpamThresholdSeconds(){throw new UnsupportedOperationException();} + @Override public boolean useNativeTransport(){throw new UnsupportedOperationException();} + @Override public boolean isPublished(){throw new UnsupportedOperationException();} + @Override public boolean shouldInformAdmins(){throw new UnsupportedOperationException();} + @Override public boolean isSingleplayerOwner(net.minecraft.server.players.NameAndId p0){throw new UnsupportedOperationException();} + } + static final class ServerWorld extends net.minecraft.server.level.ServerLevel { + Data d;ServerWorld(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public GameRules getGameRules(){d.query("rules");return d.rules;} + + @Override public boolean isClientSide(){d.query("client");return d.flag("client");} + @Override public RandomSource getRandom(){d.query("random");return d.random;} + @Override public DamageSources damageSources(){d.query("level-sources");return d.sources;} + @Override public net.minecraft.server.MinecraftServer getServer(){d.query("server");return d.server;} + @Override public void playSound(Entity e,BlockPos p,SoundEvent s,SoundSource source,float volume,float pitch){d.blockSound(e,p,s,source,volume,pitch);} + @Override public void broadcastEntityEvent(Entity e,byte event){d.query("broadcast "+event);} + @Override public boolean setBlock(BlockPos p,BlockState state,int flags){return d.set(p,state,flags);} + @Override public boolean destroyBlock(BlockPos p,boolean drops){return d.destroy(p,drops);} + @Override public void gameEvent(Holder<GameEvent> e,BlockPos p,GameEvent.Context c){d.event(e,p,c);} + @Override public void levelEvent(int event,BlockPos p,int data){d.query("level-event "+event+" "+pos(p)+" "+data);} + @Override public List<Entity> getEntities(Entity excluded,AABB bounds){return d.entities(excluded,bounds);} + } + static final class ClientWorld extends Level { + Data d;ClientWorld(){super(null,null,null,null,false,false,0L,0);} + + @Override public boolean isClientSide(){d.query("client");return d.flag("client");} + @Override public RandomSource getRandom(){d.query("random");return d.random;} + @Override public DamageSources damageSources(){d.query("level-sources");return d.sources;} + @Override public net.minecraft.server.MinecraftServer getServer(){d.query("server");return d.server;} + @Override public void playSound(Entity e,BlockPos p,SoundEvent s,SoundSource source,float volume,float pitch){d.blockSound(e,p,s,source,volume,pitch);} + @Override public void broadcastEntityEvent(Entity e,byte event){d.query("broadcast "+event);} + @Override public boolean setBlock(BlockPos p,BlockState state,int flags){return d.set(p,state,flags);} + @Override public boolean destroyBlock(BlockPos p,boolean drops){return d.destroy(p,drops);} + @Override public void gameEvent(Holder<GameEvent> e,BlockPos p,GameEvent.Context c){d.event(e,p,c);} + @Override public void levelEvent(int event,BlockPos p,int data){d.query("level-event "+event+" "+pos(p)+" "+data);} + @Override public List<Entity> getEntities(Entity excluded,AABB bounds){return d.entities(excluded,bounds);} +@Override public net.minecraft.world.clock.ClockManager clockManager(){throw new UnsupportedOperationException();} +@Override public void destroyBlockProgress(int p0,net.minecraft.core.BlockPos p1,int p2){throw new UnsupportedOperationException();} +@Override public java.util.Collection dragonParts(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.flag.FeatureFlagSet enabledFeatures(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.attribute.EnvironmentAttributeSystem environmentAttributes(){throw new UnsupportedOperationException();} +@Override public void explode(net.minecraft.world.entity.Entity p0,net.minecraft.world.damagesource.DamageSource p1,net.minecraft.world.level.ExplosionDamageCalculator p2,double p3,double p4,double p5,float p6,boolean p7,net.minecraft.world.level.Level.ExplosionInteraction p8,net.minecraft.core.particles.ParticleOptions p9,net.minecraft.core.particles.ParticleOptions p10,net.minecraft.util.random.WeightedList p11,net.minecraft.core.Holder p12){throw new UnsupportedOperationException();} +@Override public void gameEvent(net.minecraft.core.Holder p0,net.minecraft.world.phys.Vec3 p1,net.minecraft.world.level.gameevent.GameEvent.Context p2){throw new UnsupportedOperationException();} +@Override public java.lang.String gatherChunkSourceStats(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.ticks.LevelTickAccess getBlockTicks(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.chunk.ChunkSource getChunkSource(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.entity.LevelEntityGetter getEntities(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.entity.Entity getEntity(int p0){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.ticks.LevelTickAccess getFluidTicks(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.saveddata.maps.MapItemSavedData getMapData(net.minecraft.world.level.saveddata.maps.MapId p0){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.storage.LevelData.RespawnData getRespawnData(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.scores.Scoreboard getScoreboard(){throw new UnsupportedOperationException();} +@Override public int getSeaLevel(){throw new UnsupportedOperationException();} +@Override public net.minecraft.core.Holder getUncachedNoiseBiome(int p0,int p1,int p2){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.border.WorldBorder getWorldBorder(){throw new UnsupportedOperationException();} +@Override public void levelEvent(net.minecraft.world.entity.Entity p0,int p1,net.minecraft.core.BlockPos p2,int p3){throw new UnsupportedOperationException();} +@Override public void playSeededSound(net.minecraft.world.entity.Entity p0,net.minecraft.world.entity.Entity p1,net.minecraft.core.Holder p2,net.minecraft.sounds.SoundSource p3,float p4,float p5,long p6){throw new UnsupportedOperationException();} +@Override public void playSeededSound(net.minecraft.world.entity.Entity p0,double p1,double p2,double p3,net.minecraft.core.Holder p4,net.minecraft.sounds.SoundSource p5,float p6,float p7,long p8){throw new UnsupportedOperationException();} +@Override public java.util.List players(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.item.crafting.RecipeAccess recipeAccess(){throw new UnsupportedOperationException();} +@Override public void sendBlockUpdated(net.minecraft.core.BlockPos p0,net.minecraft.world.level.block.state.BlockState p1,net.minecraft.world.level.block.state.BlockState p2,int p3){throw new UnsupportedOperationException();} +@Override public void setRespawnData(net.minecraft.world.level.storage.LevelData.RespawnData p0){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.TickRateManager tickRateManager(){throw new UnsupportedOperationException();} + } + static final class Other extends Marker { + Data d;Other(){super(null,null);} + @Override public boolean causeFallDamage(double distance,float multiplier,DamageSource source){return d.damage(distance,multiplier,source);} + @Override public boolean isSuppressingBounce(){d.query("suppress");return d.flag("suppress");} + @Override public DamageSources damageSources(){d.query("entity-sources");return d.sources;} + @Override public void playSound(SoundEvent s,float volume,float pitch){d.entitySound(s,volume,pitch);} + } + static final class Living extends net.minecraft.world.entity.decoration.ArmorStand { + Data d;Living(){super(null,null);} + @Override public boolean causeFallDamage(double distance,float multiplier,DamageSource source){return d.damage(distance,multiplier,source);} + @Override public boolean isSuppressingBounce(){d.query("suppress");return d.flag("suppress");} + @Override public DamageSources damageSources(){d.query("entity-sources");return d.sources;} + @Override public void playSound(SoundEvent s,float volume,float pitch){d.entitySound(s,volume,pitch);} + @Override public Fallsounds getFallSounds(){d.query("fall-sounds");return new Fallsounds(SoundEvents.GENERIC_SMALL_FALL,SoundEvents.GENERIC_BIG_FALL);} + } + static final class Human extends Player { + Data d;Human(){super(null,null);} + @Override public boolean causeFallDamage(double distance,float multiplier,DamageSource source){return d.damage(distance,multiplier,source);} + @Override public boolean isSuppressingBounce(){d.query("suppress");return d.flag("suppress");} + @Override public DamageSources damageSources(){d.query("entity-sources");return d.sources;} + @Override public void playSound(SoundEvent s,float volume,float pitch){d.entitySound(s,volume,pitch);} + @Override public Fallsounds getFallSounds(){d.query("fall-sounds");return new Fallsounds(SoundEvents.GENERIC_SMALL_FALL,SoundEvents.GENERIC_BIG_FALL);} + @Override public GameType gameMode(){return GameType.SURVIVAL;} + } + static final class Undead extends net.minecraft.world.entity.monster.zombie.Zombie { + Data d;Undead(){super(null,null);} + @Override public boolean causeFallDamage(double distance,float multiplier,DamageSource source){return d.damage(distance,multiplier,source);} + @Override public boolean isSuppressingBounce(){d.query("suppress");return d.flag("suppress");} + @Override public DamageSources damageSources(){d.query("entity-sources");return d.sources;} + @Override public void playSound(SoundEvent s,float volume,float pitch){d.entitySound(s,volume,pitch);} + @Override public Fallsounds getFallSounds(){d.query("fall-sounds");return new Fallsounds(SoundEvents.GENERIC_SMALL_FALL,SoundEvents.GENERIC_BIG_FALL);} + } + static final class Reptile extends net.minecraft.world.entity.animal.turtle.Turtle { + Data d;Reptile(){super(null,null);} + @Override public boolean causeFallDamage(double distance,float multiplier,DamageSource source){return d.damage(distance,multiplier,source);} + @Override public boolean isSuppressingBounce(){d.query("suppress");return d.flag("suppress");} + @Override public DamageSources damageSources(){d.query("entity-sources");return d.sources;} + @Override public void playSound(SoundEvent s,float volume,float pitch){d.entitySound(s,volume,pitch);} + @Override public Fallsounds getFallSounds(){d.query("fall-sounds");return new Fallsounds(SoundEvents.GENERIC_SMALL_FALL,SoundEvents.GENERIC_BIG_FALL);} + } + static final class Flying extends net.minecraft.world.entity.ambient.Bat { + Data d;Flying(){super(null,null);} + @Override public boolean causeFallDamage(double distance,float multiplier,DamageSource source){return d.damage(distance,multiplier,source);} + @Override public boolean isSuppressingBounce(){d.query("suppress");return d.flag("suppress");} + @Override public DamageSources damageSources(){d.query("entity-sources");return d.sources;} + @Override public void playSound(SoundEvent s,float volume,float pitch){d.entitySound(s,volume,pitch);} + @Override public Fallsounds getFallSounds(){d.query("fall-sounds");return new Fallsounds(SoundEvents.GENERIC_SMALL_FALL,SoundEvents.GENERIC_BIG_FALL);} + } + static final class Item extends net.minecraft.world.entity.item.ItemEntity { + Data d;Item(){super(null,null);} + @Override public boolean causeFallDamage(double distance,float multiplier,DamageSource source){return d.damage(distance,multiplier,source);} + @Override public boolean isSuppressingBounce(){d.query("suppress");return d.flag("suppress");} + @Override public DamageSources damageSources(){d.query("entity-sources");return d.sources;} + @Override public void playSound(SoundEvent s,float volume,float pitch){d.entitySound(s,volume,pitch);} + } + static final class Tnt extends net.minecraft.world.entity.item.PrimedTnt { + Data d;Tnt(){super(null,null);} + @Override public boolean causeFallDamage(double distance,float multiplier,DamageSource source){return d.damage(distance,multiplier,source);} + @Override public boolean isSuppressingBounce(){d.query("suppress");return d.flag("suppress");} + @Override public DamageSources damageSources(){d.query("entity-sources");return d.sources;} + @Override public void playSound(SoundEvent s,float volume,float pitch){d.entitySound(s,volume,pitch);} + } + static final class Occupant extends Marker { + Data d;int id;Occupant(){super(null,null);} + @Override public void teleportRelative(double x,double y,double z){d.query(String.format("teleport %d %016x %016x %016x",id,Double.doubleToLongBits(x),Double.doubleToLongBits(y),Double.doubleToLongBits(z)));setBoundingBox(getBoundingBox().move(x,y,z));if(d.flag("mutate")&&id+1<d.occupants.size()){var next=d.occupants.get(id+1);next.setBoundingBox(next.getBoundingBox().move(0,.125,0));}} + } + static void export(Path dir)throws Exception { + VanillaCollisionOracle.main(new String[]{"generate",dir.toString()});VanillaMovementRegistryOracle.export(dir); + var definitions=new JsonObject();var metadata=new JsonArray();var base=FarmlandBlock.class.getDeclaredField("baseBlock");base.setAccessible(true);var sound=BlockBehaviour.class.getDeclaredField("soundType");sound.setAccessible(true); + var owners=Set.of(Block.class,HayBlock.class,HoneyBlock.class,SlimeBlock.class,PowderSnowBlock.class,PointedDripstoneBlock.class,FarmlandBlock.class,TurtleEggBlock.class); + for(var block:BuiltInRegistries.BLOCK){var owner=block.getClass().getMethod("fallOn",Level.class,BlockState.class,BlockPos.class,Entity.class,double.class).getDeclaringClass();if(!owners.contains(owner))throw new AssertionError(owner);var bounce=block.getClass().getMethod("bounceOn",Level.class,BlockState.class,BlockPos.class,Entity.class,double.class).getDeclaringClass();if(bounce!=Block.class&&bounce!=ShelfMushroomBlock.class)throw new AssertionError(bounce);var entry=new JsonObject();entry.addProperty("fall",owner.getSimpleName());entry.addProperty("bounce",bounce==ShelfMushroomBlock.class);if(owner==FarmlandBlock.class)entry.addProperty("base",BuiltInRegistries.BLOCK.getKey((Block)base.get(block)).toString());if(owner==HoneyBlock.class){var type=(SoundType)sound.get(block);entry.addProperty("volume",String.format("%08x",Float.floatToIntBits(type.getVolume())));entry.addProperty("pitch",String.format("%08x",Float.floatToIntBits(type.getPitch())));if(type.getFallSound()!=SoundEvents.HONEY_BLOCK_FALL)throw new AssertionError();}definitions.add(BuiltInRegistries.BLOCK.getKey(block).toString(),entry);} + for(var state:Block.BLOCK_STATE_REGISTRY){var row=new JsonObject();row.addProperty("id",Block.getId(state));row.addProperty("name",BuiltInRegistries.BLOCK.getKey(state.getBlock()).toString());metadata.add(row);} + Files.writeString(dir.resolve("landing-definitions.json"),definitions.toString());Files.writeString(dir.resolve("landing-states.json"),metadata.toString()); + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]);if(args[0].equals("export")){export(dir);return;} + var allocator=Class.forName("sun.misc.Unsafe");var field=allocator.getDeclaredField("theUnsafe");field.setAccessible(true);unsafe=field.get(null);allocate=allocator.getMethod("allocateInstance",Class.class);var dimensions=Entity.class.getDeclaredField("dimensions");dimensions.setAccessible(true); + var kinds=new Class<?>[]{Other.class,Living.class,Human.class,Undead.class,Reptile.class,Flying.class,Item.class,Tnt.class}; + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;d.state=Block.stateById(f.get("state").getAsInt());d.sources=make(Sources.class);d.sources.d=d;d.sources.fall=make(DamageSource.class);d.sources.stalagmite=make(DamageSource.class);d.rules=make(Rules.class);d.rules.d=d;d.server=make(Server.class);d.server.d=d; + d.random=(RandomSource)Proxy.newProxyInstance(RandomSource.class.getClassLoader(),new Class<?>[]{RandomSource.class},(proxy,method,values)->{if(method.getName().equals("nextFloat")){d.query("float");return single(f.get("random_float"));}if(method.getName().equals("nextInt")&&values.length==1){d.query("int "+values[0]);return f.get("random_int").getAsInt();}throw new AssertionError(method);}); + Level world;if(d.flag("server")){var w=make(ServerWorld.class);w.d=d;world=w;}else{var w=make(ClientWorld.class);w.d=d;world=w;} + var kind=kinds[f.get("kind").getAsInt()];var entity=(Entity)make(kind);var dataField=kind.getDeclaredField("d");dataField.set(entity,d);dimensions.set(entity,EntityDimensions.scalable(single(f.get("width")),single(f.get("height"))));d.occupants=new ArrayList<>();for(var box:f.getAsJsonArray("entities")){var e=make(Occupant.class);e.d=d;e.id=d.occupants.size();e.setBoundingBox(box(box));d.occupants.add(e);} + var p=f.getAsJsonArray("position");var position=new BlockPos(p.get(0).getAsInt(),p.get(1).getAsInt(),p.get(2).getAsInt());var state=d.state; + try{if(d.flag("bounce"))state.getBlock().bounceOn(world,state,position,entity,number(f.get("distance")));else state.getBlock().fallOn(world,state,position,entity,number(f.get("distance")));out.println("ok");}catch(Stop e){out.println("error");} + out.println("state "+Block.getId(d.state));for(var e:d.occupants)out.println(bounds("final "+e.id,e.getBoundingBox()));out.println("queries "+d.calls); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java new file mode 100644 index 000000000..f3508e476 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java @@ -0,0 +1,59 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.core.Direction; +import net.minecraft.nbt.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.phys.AABB; +import net.minecraft.world.phys.shapes.*; +/** Imports definition inputs only; vanilla computes the independently compared solidity results. */ +public final class VanillaBlockPropertiesOracle { + private static Field field(Class<?> cls,String name) throws Exception {var f=cls.getDeclaredField(name);f.setAccessible(true);return f;} + private static VoxelShape shape(JsonElement value) { + var a=value.getAsJsonArray();double[] v=new double[6];for(int i=0;i<6;i++)v[i]=Double.longBitsToDouble(Long.parseUnsignedLong(a.get(i).getAsString(),16)); + return Shapes.create(new AABB(v[0],v[1],v[2],v[3],v[4],v[5])); + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var properties=field(BlockBehaviour.class,"properties");var on=field(BlockBehaviour.Properties.class,"forceSolidOn");var off=field(BlockBehaviour.Properties.class,"forceSolidOff");var replace=field(BlockBehaviour.Properties.class,"replaceable");var liquid=field(BlockBehaviour.Properties.class,"liquid");var occlude=field(BlockBehaviour.Properties.class,"canOcclude"); + var cache=field(BlockBehaviour.BlockStateBase.class,"cache");var collision=field(cache.getType(),"collisionShape"); + var calculate=BlockBehaviour.BlockStateBase.class.getDeclaredMethod("calculateSolid");calculate.setAccessible(true); + Path dir=Path.of(args[1]); + if(args[0].equals("export")) { + VanillaCollisionOracle.main(new String[]{"generate",args[1]}); + var states=new ListTag();var blocks=new CompoundTag(); + for(var state:Block.BLOCK_STATE_REGISTRY)states.add(BlockState.FULL_CODEC.encodeStart(NbtOps.INSTANCE,state).getOrThrow()); + for(var block:BuiltInRegistries.BLOCK) { + var p=properties.get(block);blocks.putByte(BuiltInRegistries.BLOCK.getKey(block).toString(),(byte)((on.getBoolean(p)?1:0)|(off.getBoolean(p)?2:0)|(replace.getBoolean(p)?4:0)|(liquid.getBoolean(p)?8:0)|(occlude.getBoolean(p)?16:0))); + } + var root=new CompoundTag();root.putInt("DataVersion",net.minecraft.SharedConstants.getCurrentVersion().dataVersion().version());root.put("states",states);root.put("blocks",blocks);root.put("occlusion",VanillaCollisionOracle.occlusionDefinitions()); + try(var out=new DataOutputStream(Files.newOutputStream(dir.resolve("block-properties.nbt")))){NbtIo.write(root,out);}return; + } + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")))) { + for(var state:Block.BLOCK_STATE_REGISTRY) { + var p=properties.get(state.getBlock()); + out.printf("state %d %s %s %s %s%n",Block.getId(state),on.getBoolean(p),off.getBoolean(p),state.canBeReplaced(),state.isSolid()); + out.printf("render %s %s %s%n",state.liquid(),state.canOcclude(),state.isSolidRender()); + int mask=0;for(var direction:Direction.values())if(Block.isShapeFullBlock(state.getFaceOcclusionShape(direction)))mask|=1<<direction.ordinal();out.println("occlusion "+mask); + var c=cache.get(state);var s=c==null?null:(VoxelShape)collision.get(c); + if(s==null)out.println("cache none");else if(s.isEmpty())out.println("cache empty");else { + var b=s.bounds();out.printf("cache %016x %016x %016x %016x %016x %016x%n",Double.doubleToRawLongBits(b.minX),Double.doubleToRawLongBits(b.minY),Double.doubleToRawLongBits(b.minZ),Double.doubleToRawLongBits(b.maxX),Double.doubleToRawLongBits(b.maxY),Double.doubleToRawLongBits(b.maxZ)); + } + } + var state=Blocks.STONE.defaultBlockState();var p=properties.get(Blocks.STONE);var savedCache=cache.get(state);var savedShape=collision.get(savedCache);boolean savedOn=on.getBoolean(p),savedOff=off.getBoolean(p); + try(var inputs=Files.lines(dir.resolve("inputs.txt"))) { + for(var line:(Iterable<String>)inputs::iterator) { + var f=JsonParser.parseString(line).getAsJsonObject();VoxelShape s=Shapes.empty();for(var value:f.getAsJsonArray("shape"))s=Shapes.or(s,shape(value)); + on.setBoolean(p,f.get("on").getAsBoolean());off.setBoolean(p,f.get("off").getAsBoolean());cache.set(state,f.get("cached").getAsBoolean()?savedCache:null);collision.set(savedCache,s); + out.println("solid "+calculate.invoke(state)); + out.println("render "+Block.isShapeFullBlock(f.get("occludes").getAsBoolean()?s:Shapes.empty())); + int mask=0;if(f.get("occludes").getAsBoolean())for(var direction:Direction.values())if(Block.isShapeFullBlock(s.getFaceShape(direction)))mask|=1<<direction.ordinal();out.println("occlusion "+mask); + } + } finally {cache.set(state,savedCache);collision.set(savedCache,savedShape);on.setBoolean(p,savedOn);off.setBoolean(p,savedOff);} + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPushOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPushOracle.java new file mode 100644 index 000000000..2e10246b7 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPushOracle.java @@ -0,0 +1,41 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.phys.*; +import net.minecraft.world.phys.shapes.*; +/** Actual Block.pushEntitiesUp with controlled shapes and selected entity lists. */ +public final class VanillaBlockPushOracle { + static final class Stop extends RuntimeException {} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static AABB box(JsonElement v){var a=v.getAsJsonArray();return new AABB(number(a.get(0)),number(a.get(1)),number(a.get(2)),number(a.get(3)),number(a.get(4)),number(a.get(5)));} + static String bounds(String label,AABB b){return String.format("%s %016x %016x %016x %016x %016x %016x",label,Double.doubleToLongBits(b.minX),Double.doubleToLongBits(b.minY),Double.doubleToLongBits(b.minZ),Double.doubleToLongBits(b.maxX),Double.doubleToLongBits(b.maxY),Double.doubleToLongBits(b.maxZ));} + static VoxelShape shape(JsonElement v){VoxelShape s=Shapes.empty();for(var b:v.getAsJsonArray())s=Shapes.or(s,Shapes.create(box(b)));return s;} + static final class Data{JsonObject f;PrintWriter out;int calls;List<Actor> actors;void query(String text){out.println(text);if(calls++==f.get("fail").getAsInt())throw new Stop();}} + static final class State extends BlockState { + Data d;int id;VoxelShape shape;State(){super(null,null,null);} + @Override public VoxelShape getCollisionShape(BlockGetter world,BlockPos p){d.query("shape "+id+" "+p.getX()+" "+p.getY()+" "+p.getZ());return shape;} + } + static final class Actor extends Marker { + Data d;int id;Actor(){super(null,null);} + @Override public void teleportRelative(double x,double y,double z){d.query(String.format("teleport %d %016x %016x %016x",id,Double.doubleToLongBits(x),Double.doubleToLongBits(y),Double.doubleToLongBits(z)));setBoundingBox(getBoundingBox().move(x,y,z));if(d.f.get("mutate").getAsBoolean()&&id+1<d.actors.size()){var next=d.actors.get(id+1);next.setBoundingBox(next.getBoundingBox().move(0,.125,0));}} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var allocator=Class.forName("sun.misc.Unsafe");var field=allocator.getDeclaredField("theUnsafe");field.setAccessible(true);var unsafe=field.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){ + for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;d.actors=new ArrayList<>();for(var b:f.getAsJsonArray("entities")){var actor=(Actor)allocate.invoke(unsafe,Actor.class);actor.d=d;actor.id=d.actors.size();actor.setBoundingBox(box(b));d.actors.add(actor);} + var old=(State)allocate.invoke(unsafe,State.class);old.d=d;old.id=0;old.shape=shape(f.get("old"));var next=(State)allocate.invoke(unsafe,State.class);next.d=d;next.id=1;next.shape=shape(f.get("new")); + var world=(LevelAccessor)Proxy.newProxyInstance(LevelAccessor.class.getClassLoader(),new Class<?>[]{LevelAccessor.class},(proxy,method,values)->{if(method.getName().equals("getEntities")&&values.length==2){if(values[0]!=null)throw new AssertionError();d.query(bounds("entities",(AABB)values[1]));return d.actors;}throw new AssertionError(method);});var p=f.getAsJsonArray("position");var pos=new BlockPos(p.get(0).getAsInt(),p.get(1).getAsInt(),p.get(2).getAsInt()); + try{out.println("result "+(Block.pushEntitiesUp(old,next,world,pos)==next));}catch(Stop error){out.println("error");}for(var actor:d.actors)out.println(bounds("final "+actor.id,actor.getBoundingBox()));out.println("queries "+d.calls); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateBindingOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateBindingOracle.java new file mode 100644 index 000000000..ff391053a --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateBindingOracle.java @@ -0,0 +1,90 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.nio.file.*; +import java.util.*; +import net.minecraft.client.renderer.block.dispatch.*; +import net.minecraft.client.renderer.block.dispatch.multipart.MultiPartModel; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.resources.Identifier; +import net.minecraft.client.resources.model.BlockStateDefinitions; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.Property; +import net.minecraft.util.StrictJsonParser; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.IntegerProperty; +import static dev.horizonlab.parity.VanillaCuboidModelOracle.map; + +/** Native registry binding and multipart visual-equality selection, without a GPU. */ +public final class VanillaBlockStateBindingOracle { + private static java.util.function.Function<Identifier,StateDefinition<Block,BlockState>> mapper; + private static final Gson JSON = new GsonBuilder().serializeNulls().create(); + private static Object field(Object value,String name) throws Exception { + var f=value.getClass().getDeclaredField(name);f.setAccessible(true);return f.get(value); + } + private static void export(Path path) throws Exception { + var blocks=new TreeMap<String,Object>(); + var ids=new TreeSet<>(BuiltInRegistries.BLOCK.keySet()); + ids.add(Identifier.parse("minecraft:item_frame"));ids.add(Identifier.parse("minecraft:glow_item_frame")); + for(var id:ids) { + var definition=Objects.requireNonNull(mapper.apply(id)); + var schema=new TreeMap<String,Object>(); + for(var property:definition.getProperties()) { + if(property instanceof IntegerProperty integer) { + var values=integer.getPossibleValues();schema.put(property.getName(),map("integer",new int[]{Collections.min(values),Collections.max(values)})); + } else { + var values=values(property); + schema.put(property.getName(),map("named",values)); + } + } + var states=new ArrayList<Object>(); + for(var state:definition.getPossibleStates()) { + var properties=new TreeMap<String,String>(); + for(var property:definition.getProperties())properties.put(property.getName(),value(state,property)); + states.add(properties); + } + blocks.put(id.toString(),map("schema",schema,"states",states)); + } + Files.writeString(path,JSON.toJson(blocks)); + } + private static <T extends Comparable<T>> Set<String> values(Property<T> property) { + var values=new TreeSet<String>();for(var value:property.getPossibleValues())values.add(property.getName(value));return values; + } + private static <T extends Comparable<T>> String value(BlockState state,Property<T> property) {return property.getName(state.getValue(property));} + private static Object bind(JsonObject row) throws Exception { + var states=Objects.requireNonNull(mapper.apply(Identifier.parse(row.get("block").getAsString()))); + var definition=BlockStateModelDispatcher.CODEC.parse(JsonOps.INSTANCE,StrictJsonParser.parse(row.get("json").getAsString())).getOrThrow(); + var roots=definition.instantiate(states,()->"horizon:binding_probe"); + var indices=new IdentityHashMap<BlockStateModel.Unbaked,Integer>(); + definition.simpleModels().ifPresent(m->{int index=0;for(var value:m.models().values())indices.put(value,index++);}); + var selected=new ArrayList<Object>(); + for(var state:states.getPossibleStates()) { + var root=roots.get(state); + if(root==null) {selected.add(null);continue;} + if(root instanceof BlockStateModel.SimpleCachedUnbakedRoot) { + var index=indices.get(field(root,"contents"));if(index==null)throw new AssertionError("unrecognized simple root"); + selected.add(map("variant",index)); + } else if(root instanceof MultiPartModel.Unbaked) { + var group=root.visualEqualityGroup(state);Object parts=null; + for(var f:group.getClass().getDeclaredFields())if(it.unimi.dsi.fastutil.ints.IntList.class.isAssignableFrom(f.getType())) {f.setAccessible(true);parts=f.get(group);} + if(parts==null)throw new AssertionError("unrecognized multipart group"); + selected.add(map("multipart",parts)); + } else throw new AssertionError("unrecognized root "+root.getClass()); + } + return selected; + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();mapper=BlockStateDefinitions.definitionLocationToBlockStateMapper(); + if(args[0].equals("export")){export(Path.of(args[1]));return;} + try(var input=Files.newBufferedReader(Path.of(args[0]));var output=Files.newBufferedWriter(Path.of(args[1]))) { + for(String line;(line=input.readLine())!=null;) { + var row=JsonParser.parseString(line).getAsJsonObject();Object result; + try {result=map("name",row.get("name").getAsString(),"selected",bind(row));} + catch(RuntimeException error) {result=map("name",row.get("name").getAsString(),"error",true);} + output.write(JSON.toJson(result));output.newLine(); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java new file mode 100644 index 000000000..12de99201 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java @@ -0,0 +1,46 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.IntegerProperty; + +/** Original transport for actual compact/full block-state codecs. */ +public final class VanillaBlockStateCodecOracle { + private static JsonElement canonical(JsonElement value) { + if(value.isJsonObject()){var result=new JsonObject();for(var e:new TreeMap<>(value.getAsJsonObject().asMap()).entrySet())result.add(e.getKey(),canonical(e.getValue()));return result;} + if(value.isJsonArray()){var result=new JsonArray();for(var e:value.getAsJsonArray())result.add(canonical(e));return result;} + return value; + } + private static String encode(BlockState state,boolean full){return canonical((full?BlockState.FULL_CODEC:BlockState.CODEC).encodeStart(JsonOps.INSTANCE,state).getOrThrow()).toString();} + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + Path dir=Path.of(args[1]); + if(args[0].equals("export")) { + var result=new JsonObject();var states=new JsonArray();var defaults=new JsonObject();var integers=new JsonArray(); + for(var state:Block.BLOCK_STATE_REGISTRY) { + if(Block.getId(state)!=states.size())throw new AssertionError("registry IDs not dense"); + states.add(BlockState.FULL_CODEC.encodeStart(JsonOps.INSTANCE,state).getOrThrow()); + } + for(var id:new TreeSet<>(BuiltInRegistries.BLOCK.keySet())) { + var block=BuiltInRegistries.BLOCK.getValue(id);defaults.addProperty(id.toString(),Block.getId(block.defaultBlockState())); + for(var p:block.getStateDefinition().getProperties())if(p instanceof IntegerProperty){var entry=new JsonArray();entry.add(id.toString());entry.add(p.getName());integers.add(entry);} + } + result.add("states",states);result.add("defaults",defaults);result.add("integers",integers); + Files.writeString(dir,result.toString(),StandardCharsets.UTF_8);return; + } + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var state:Block.BLOCK_STATE_REGISTRY)out.println("state "+Block.getId(state)+" "+encode(state,false)+" "+encode(state,true)); + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var input=JsonParser.parseString(line).getAsJsonArray();boolean full=input.get(0).getAsBoolean(); + var value=(full?BlockState.FULL_CODEC:BlockState.CODEC).parse(JsonOps.INSTANCE,JsonParser.parseString(input.get(1).getAsString())).result(); + if(value.isEmpty())out.println("decode error");else {var state=value.get();out.println("decode "+Block.getId(state)+" "+encode(state,false)+" "+encode(state,true));} + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateModelOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateModelOracle.java new file mode 100644 index 000000000..0ecbe597d --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateModelOracle.java @@ -0,0 +1,48 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.nio.file.*; +import java.util.*; +import net.minecraft.client.renderer.block.dispatch.*; +import net.minecraft.client.renderer.block.dispatch.multipart.*; +import net.minecraft.util.StrictJsonParser; +import static dev.horizonlab.parity.VanillaCuboidModelOracle.map; + +/** Original adapter around the actual blockstate resource parser and codec. */ +public final class VanillaBlockStateModelOracle { + private static final Gson JSON = new GsonBuilder().serializeNulls().create(); + private static Object variant(Variant value) { + var state=value.modelState(); + return map("model",value.modelLocation().toString(),"rotations",new int[]{state.x().ordinal(),state.y().ordinal(),state.z().ordinal()},"uvlock",state.uvLock()); + } + private static Object model(BlockStateModel.Unbaked value) { + if(value instanceof SingleVariant.Unbaked single)return map("single",variant(single.variant())); + var weighted=(WeightedVariants.Unbaked)value; + return map("weighted",weighted.entries().unwrap().stream().map(e->Arrays.asList(variant(((SingleVariant.Unbaked)e.value()).variant()),e.weight())).toList()); + } + private static Object condition(Condition value) { + if(value instanceof CombinedCondition combined)return map(combined.operation().name().toLowerCase(Locale.ROOT),combined.terms().stream().map(VanillaBlockStateModelOracle::condition).toList()); + var tests=new TreeMap<String,Object>(); + ((KeyValueCondition)value).tests().forEach((key,terms)->tests.put(key,terms.entries().stream().map(t->map("value",t.value(),"negated",t.negated())).toList())); + return map("properties",tests); + } + private static Object definition(BlockStateModelDispatcher value) { + var variants=value.simpleModels().map(m->m.models().entrySet().stream().map(e->Arrays.asList(e.getKey(),model(e.getValue()))).toList()).orElse(null); + var multipart=value.multiPart().map(m->m.selectors().stream().map(s->map("when",s.condition().map(VanillaBlockStateModelOracle::condition).orElse(null),"apply",model(s.variant()))).toList()).orElse(null); + return map("variants",variants,"multipart",multipart); + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion(); + try(var input=Files.newBufferedReader(Path.of(args[0]));var output=Files.newBufferedWriter(Path.of(args[1]))) { + for(String line;(line=input.readLine())!=null;) { + var row=JsonParser.parseString(line).getAsJsonArray();Object result; + BlockStateModelDispatcher decoded; + try { decoded=BlockStateModelDispatcher.CODEC.parse(JsonOps.INSTANCE,StrictJsonParser.parse(row.get(1).getAsString())).getOrThrow(); } + catch(RuntimeException error) {output.write(JSON.toJson(map("name",row.get(0).getAsString(),"error",true)));output.newLine();continue;} + result=map("name",row.get(0).getAsString(),"definition",definition(decoded)); + output.write(JSON.toJson(result));output.newLine(); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java new file mode 100644 index 000000000..ce3b327e6 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java @@ -0,0 +1,37 @@ +package dev.horizonlab.parity; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.nbt.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.phys.shapes.*; +/** Private support-shape data export; native cache answers are the independent reference. */ +public final class VanillaBlockSupportOracle { + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var cache=BlockBehaviour.BlockStateBase.class.getDeclaredField("cache");cache.setAccessible(true);Path dir=Path.of(args[1]); + if(args[0].equals("export")) { + VanillaCollisionOracle.main(new String[]{"generate",args[1]}); + var grid=VanillaCollisionOracle.class.getDeclaredMethod("grid",VoxelShape.class);grid.setAccessible(true); + var states=new ListTag();var shapes=new ListTag();var ids=new IdentityHashMap<VoxelShape,Integer>();int[] mapping=new int[Block.BLOCK_STATE_REGISTRY.size()]; + for(var state:Block.BLOCK_STATE_REGISTRY){int id=Block.getId(state);states.add(BlockState.FULL_CODEC.encodeStart(NbtOps.INSTANCE,state).getOrThrow());if(cache.get(state)==null){mapping[id]=-1;continue;} + var shape=state.getBlockSupportShape(EmptyBlockGetter.INSTANCE,BlockPos.ZERO);Integer shapeId=ids.get(shape);if(shapeId==null){shapeId=shapes.size();ids.put(shape,shapeId);shapes.add((CompoundTag)grid.invoke(null,shape));}mapping[id]=shapeId; + } + var cachedIds=new com.google.gson.JsonArray();for(int i=0;i<mapping.length;i++)if(mapping[i]>=0)cachedIds.add(i);Files.writeString(dir.resolve("support-cached-states.json"),cachedIds.toString()); + var root=new CompoundTag();root.putInt("DataVersion",net.minecraft.SharedConstants.getCurrentVersion().dataVersion().version());root.putString("Kind","block_support");root.put("states",states);root.put("shapes",shapes);root.putIntArray("cached_shapes",mapping); + try(var out=new DataOutputStream(Files.newOutputStream(dir.resolve("cached-support.nbt")))){NbtIo.write(root,out);}return; + } + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")))) { + for(var state:Block.BLOCK_STATE_REGISTRY){int id=Block.getId(state);if(cache.get(state)==null){out.println("state "+id+" uncached");continue;} + out.println("state "+id+" cached"); + for(var direction:Direction.values()) { + out.print("support "+direction.ordinal());for(var type:SupportType.values())out.print(" "+state.isFaceSturdy(EmptyBlockGetter.INSTANCE,BlockPos.ZERO,direction,type));out.println(" "+state.isFaceSturdy(EmptyBlockGetter.INSTANCE,BlockPos.ZERO,direction)); + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java new file mode 100644 index 000000000..efd3cd0e4 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java @@ -0,0 +1,91 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import net.minecraft.core.*; +import net.minecraft.resources.*; +import net.minecraft.tags.*; +import net.minecraft.world.level.material.Fluid; +import com.mojang.serialization.JsonOps; +import java.util.*; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.core.registries.Registries; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.entity.ShulkerBoxBlockEntity; +import net.minecraft.world.level.block.state.*; +/** Native survival calls over changing neighbor states and independent query failures. */ +public final class VanillaBlockSurvivalOracle { + private static final class Stop extends RuntimeException {} + private static Class<?> declaring(Class<?> type,String name,Class<?>... parameters) { + while(type!=null){try{type.getDeclaredMethod(name,parameters);return type;}catch(NoSuchMethodException e){type=type.getSuperclass();}} + return null; + } + private static void bindFluidTags(JsonObject resources) { + var registry=BuiltInRegistries.FLUID; + var loader=new TagLoader<Holder<Fluid>>((id,required)->registry.get(id).map(value->(Holder<Fluid>)value),"tags/fluid"); + var definitions=new HashMap<Identifier,List<TagLoader.EntryWithSource>>(); + for(var item:resources.entrySet()) { + var file=TagFile.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(item.getValue().getAsString())).getOrThrow(); + var entries=new ArrayList<TagLoader.EntryWithSource>(); + for(var entry:file.entries())entries.add(new TagLoader.EntryWithSource(entry,"vanilla")); + definitions.put(Identifier.parse(item.getKey()),entries); + } + var tags=new HashMap<TagKey<Fluid>,List<Holder<Fluid>>>(); + loader.build(definitions).forEach((id,values)->tags.put(TagKey.create(Registries.FLUID,id),List.copyOf(values))); + if(tags.size()!=resources.size())throw new AssertionError("incomplete fluid tags"); + registry.prepareTagReload(new TagLoader.LoadResult<>(Registries.FLUID,tags)).apply(); + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + if(args[0].equals("export")||args[0].equals("definitions")) { + if(args[0].equals("export")) { + VanillaBlockPropertiesOracle.main(new String[]{"export",args[1]});VanillaBlockSupportOracle.main(new String[]{"export",args[1]});VanillaBlockStateCodecOracle.main(new String[]{"export",dir.resolve("facts.json").toString()}); + } + var extra=new JsonObject();var fenceGates=new JsonArray();var ignition=new JsonObject(); + for(var block:BuiltInRegistries.BLOCK)if(block instanceof FenceGateBlock)fenceGates.add(BuiltInRegistries.BLOCK.getKey(block).toString()); + var ignitionField=FireBlock.class.getDeclaredField("igniteOdds");ignitionField.setAccessible(true); + var odds=(it.unimi.dsi.fastutil.objects.Object2IntMap<?>)ignitionField.get(Blocks.FIRE); + for(var block:BuiltInRegistries.BLOCK)ignition.addProperty(BuiltInRegistries.BLOCK.getKey(block).toString(),odds.getInt(block)); + extra.add("fence_gates",fenceGates);extra.add("ignition_odds",ignition);Files.writeString(dir.resolve("survival-extra-definitions.json"),extra.toString()); + var definitions=new JsonObject();var placement=new JsonObject();var supportTags=new JsonObject(); + for(var block:BuiltInRegistries.BLOCK){ + String name=BuiltInRegistries.BLOCK.getKey(block).toString(); + Class<?> type=declaring(block.getClass(),"canSurvive",BlockState.class,LevelReader.class,BlockPos.class); + definitions.addProperty(name,type.getSimpleName()); + type=declaring(block.getClass(),"mayPlaceOn",BlockState.class,BlockGetter.class,BlockPos.class); + if(type!=null)placement.addProperty(name,type.getSimpleName()); + var fields=new JsonObject(); + for(Class<?> c=block.getClass();c!=null;c=c.getSuperclass())for(var field:c.getDeclaredFields())if(field.getType().equals(net.minecraft.tags.TagKey.class)&&!Modifier.isStatic(field.getModifiers())) { + field.setAccessible(true);var tag=(net.minecraft.tags.TagKey<?>)field.get(block);if(tag!=null)fields.addProperty(field.getName(),tag.location().toString()); + } + if(fields.size()>0)supportTags.add(name,fields); + } + Files.writeString(dir.resolve("survival-classes.json"),definitions.toString()); + Files.writeString(dir.resolve("survival-placement-classes.json"),placement.toString()); + Files.writeString(dir.resolve("survival-support-tags.json"),supportTags.toString());return; + } + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject()); + bindFluidTags(JsonParser.parseString(Files.readString(dir.resolve("fluid-tags.json"))).getAsJsonObject()); + var allocator=Class.forName("sun.misc.Unsafe");var access=allocator.getDeclaredField("theUnsafe");access.setAccessible(true);var unsafe=access.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + var oldProgress=ShulkerBoxBlockEntity.class.getDeclaredField("progressOld");oldProgress.setAccessible(true);var progress=ShulkerBoxBlockEntity.class.getDeclaredField("progress");progress.setAccessible(true); + var animation=ShulkerBoxBlockEntity.class.getDeclaredField("animationStatus");animation.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var inputs=Files.lines(dir.resolve("inputs.txt"))) { + for(var line:(Iterable<String>)inputs::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var candidate=Block.stateById(f.get("state").getAsInt());var xyz=f.getAsJsonArray("position");var p=new BlockPos(xyz.get(0).getAsInt(),xyz.get(1).getAsInt(),xyz.get(2).getAsInt());var neighbors=f.getAsJsonArray("neighbors");int[] reads={0},entities={0},lights={0},fluids={0}; + Object entity=null;String mode=f.get("entity").getAsString();if(!mode.equals("none")){entity=allocate.invoke(unsafe,ShulkerBoxBlockEntity.class);Object status=null;for(var value:animation.getType().getEnumConstants())if(((Enum<?>)value).name().equals(mode.toUpperCase(java.util.Locale.ROOT)))status=value;if(status==null)throw new AssertionError(mode);animation.set(entity,status);}if(entity!=null && f.has("shulker_progress")){var data=f.getAsJsonArray("shulker_progress");oldProgress.setFloat(entity,Float.intBitsToFloat(Integer.parseUnsignedInt(data.get(0).getAsString(),16)));progress.setFloat(entity,Float.intBitsToFloat(Integer.parseUnsignedInt(data.get(1).getAsString(),16)));}Object selected=entity; + var world=(LevelReader)Proxy.newProxyInstance(LevelReader.class.getClassLoader(),new Class<?>[]{LevelReader.class},(proxy,method,values)->{ + if(method.getName().equals("getFluidState")){var at=(BlockPos)values[0];out.println("fluid "+at.getX()+" "+at.getY()+" "+at.getZ());int count=fluids[0]++;if(count==(f.has("fluid_fail")?f.get("fluid_fail").getAsInt():-1))throw new Stop();var states=f.has("fluid_states")?f.getAsJsonArray("fluid_states"):neighbors;return Block.stateById(states.get(count%states.size()).getAsInt()).getFluidState();} + if(method.getName().equals("getRawBrightness")){var at=(BlockPos)values[0];out.println("light "+at.getX()+" "+at.getY()+" "+at.getZ()+" "+values[1]);if(lights[0]++==(f.has("light_fail")?f.get("light_fail").getAsInt():-1))throw new Stop();return f.has("brightness")?f.get("brightness").getAsInt():15;} + if(method.getName().equals("getBlockState")){var at=(BlockPos)values[0];out.println("read "+at.getX()+" "+at.getY()+" "+at.getZ());int count=reads[0]++;if(count==f.get("fail").getAsInt())throw new Stop();return Block.stateById(neighbors.get(count%neighbors.size()).getAsInt());} + if(method.getName().equals("getBlockEntity")){var at=(BlockPos)values[0];out.println("entity "+at.getX()+" "+at.getY()+" "+at.getZ());if(entities[0]++==f.get("entity_fail").getAsInt())throw new Stop();return selected;} + if(method.isDefault())return InvocationHandler.invokeDefault(proxy,method,values); + throw new AssertionError(method); + }); + try{out.println("survive "+candidate.canSurvive(world,p));}catch(Stop error){out.println("survive error");} + out.println("counts "+reads[0]+" "+entities[0]+" "+lights[0]+" "+fluids[0]); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockingItemDamageOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockingItemDamageOracle.java new file mode 100644 index 000000000..4d611fd32 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockingItemDamageOracle.java @@ -0,0 +1,29 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.core.registries.*;import net.minecraft.world.item.*;import net.minecraft.server.level.*;import net.minecraft.server.PlayerAdvancements; +/** Native BlocksAttacks durability dispatch into actual ItemStack storage. */ +public final class VanillaBlockingItemDamageOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate;static Field components,count; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static String optional(Object v){return v==null?"none":v.toString();} + static String snapshot(ItemStack s){try{var c=(PatchedDataComponentMap)components.get(s);return count.getInt(s)+" "+s.getCount()+" "+optional(c.get(DataComponents.MAX_DAMAGE))+" "+optional(c.get(DataComponents.DAMAGE))+" "+c.has(DataComponents.UNBREAKABLE)+" "+s.getMaxDamage()+" "+s.getDamageValue()+" "+s.isEmpty()+" "+s.isDamageableItem()+" "+s.isDamaged()+" "+s.isBroken()+" "+s.nextDamageWillBreak();}catch(Exception e){throw new AssertionError(e);}} + static void reset(ItemStack s,JsonObject f){s.setCount(f.get("count").getAsInt());if(f.get("max").isJsonNull())s.remove(DataComponents.MAX_DAMAGE);else s.set(DataComponents.MAX_DAMAGE,f.get("max").getAsInt());if(f.get("damage").isJsonNull())s.remove(DataComponents.DAMAGE);else s.set(DataComponents.DAMAGE,f.get("damage").getAsInt());if(f.get("unbreakable").getAsBoolean())s.set(DataComponents.UNBREAKABLE,net.minecraft.util.Unit.INSTANCE);else s.remove(DataComponents.UNBREAKABLE);} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static final class Data {Server level;JsonObject f;PrintWriter out;int calls;boolean changed;ItemStack stack;PlayerAdvancements advancements; + void event(String s){out.println(s+" | "+snapshot(stack));int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt()){changed=true;reset(stack,f.getAsJsonObject("after"));}} + boolean flag(String name){return f.get((changed?"after_":"")+name).getAsBoolean();} boolean infinite(){return flag("infinite");}} + static final class Server extends ServerLevel {Data d;Server(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public boolean isClientSide(){d.event("client");return d.flag("client");}} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Actor(){super(null,null);}} + static void broken(Data d,ItemStack copy,net.minecraft.world.entity.EquipmentSlot slot){d.out.println("copy "+snapshot(copy));d.event("break "+(slot==net.minecraft.world.entity.EquipmentSlot.MAINHAND?0:1));} + static void stat(Data d,net.minecraft.stats.Stat<?> s){if(s.getType()!=net.minecraft.stats.Stats.ITEM_USED)throw new AssertionError();d.event("stat "+(s.getValue()==Items.AIR?0:1));} + static final class Human extends ServerPlayer {Data d;Human(){super(null,null,null,null);}@Override public boolean hasInfiniteMaterials(){d.event("infinite");return d.infinite();}@Override public PlayerAdvancements getAdvancements(){d.event("criterion");return d.advancements;}@Override public ServerLevel level(){d.event("level");return d.flag("server")?d.level:null;}@Override public void awardStat(net.minecraft.stats.Stat<?> s){stat(d,s);}@Override public void onEquippedItemBroken(ItemStack copy,net.minecraft.world.entity.EquipmentSlot slot){broken(d,copy,slot);}} + static final class PlainPlayer extends net.minecraft.world.entity.player.Player {Data d;PlainPlayer(){super(null,null);}@Override public net.minecraft.world.level.GameType gameMode(){return net.minecraft.world.level.GameType.SURVIVAL;}@Override public boolean isSpectator(){return false;}@Override public boolean isCreative(){return false;}@Override public net.minecraft.world.level.Level level(){d.event("level");return d.flag("server")?d.level:null;}@Override public void awardStat(net.minecraft.stats.Stat<?> s){stat(d,s);}@Override public void onEquippedItemBroken(ItemStack copy,net.minecraft.world.entity.EquipmentSlot slot){broken(d,copy,slot);}} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);components=field(ItemStack.class,"components");count=field(ItemStack.class,"count");var ctor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);ctor.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.advancements=make(PlayerAdvancements.class);field(PlayerAdvancements.class,"activeTriggers").set(d.advancements,new HashMap<>());d.level=make(Server.class);d.level.d=d;var human=make(Human.class);human.d=d;var plain=make(PlainPlayer.class);plain.d=d;net.minecraft.world.entity.LivingEntity actor=switch(d.f.get("kind").getAsInt()){case 0->make(Actor.class);case 1->plain;default->human;};d.stack=(ItemStack)ctor.newInstance(BuiltInRegistries.ITEM.wrapAsHolder(d.f.get("air").getAsBoolean()?Items.AIR:Items.SHIELD),1,new PatchedDataComponentMap(DataComponentMap.EMPTY));reset(d.stack,d.f.getAsJsonObject("initial"));var rule=d.f.getAsJsonObject("rule");var component=new net.minecraft.world.item.component.BlocksAttacks(0,1,List.of(),new net.minecraft.world.item.component.BlocksAttacks.ItemDamageFunction(single(rule.get("threshold")),single(rule.get("base")),single(rule.get("factor"))),Optional.empty(),Optional.empty(),Optional.empty()); + try{component.hurtBlockingItem(d.level,d.stack,actor,net.minecraft.world.InteractionHand.values()[d.f.get("hand").getAsInt()],single(d.f.get("damage")));out.println("result ok");}catch(Stop e){out.println("result error");}out.println("state "+snapshot(d.stack)+" "+d.calls+" "+d.changed); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockingRulesOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockingRulesOracle.java new file mode 100644 index 000000000..ddd36c22a --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockingRulesOracle.java @@ -0,0 +1,17 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.world.damagesource.*;import net.minecraft.world.item.component.BlocksAttacks; +/** Actual blocking component math with native direct holder-set membership. */ +public final class VanillaBlockingRulesOracle { + static final class Stop extends RuntimeException {} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static final class Source extends DamageSource {JsonObject f;PrintWriter out;int calls;boolean changed;List<Holder<DamageType>> types;Source(){super(null);}@Override public Holder<DamageType> typeHolder(){out.println("type-holder");int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt())changed=true;return types.get(f.get(changed?"after_type":"type").getAsInt());}} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var a=Holder.direct(new DamageType("a",0));var b=Holder.direct(new DamageType("b",0));List<Holder<DamageType>> types=List.of(a,b);List<HolderSet<DamageType>> sets=List.of(HolderSet.direct(List.of(a)),HolderSet.direct(List.of(b)),HolderSet.direct(List.of(a,b)),HolderSet.direct(List.of()));var disable=BlocksAttacks.class.getDeclaredMethod("disableBlockingForTicks",float.class);disable.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var source=new Source();source.f=f;source.out=out;source.types=types;var reductions=new ArrayList<BlocksAttacks.DamageReduction>();for(var rv:f.getAsJsonArray("reductions")){var r=rv.getAsJsonObject();int set=r.get("set").getAsInt();reductions.add(new BlocksAttacks.DamageReduction(single(r.get("angle")),set==0?Optional.empty():Optional.of(sets.get(set-1)),single(r.get("base")),single(r.get("factor"))));}var item=f.getAsJsonObject("item");var itemDamage=new BlocksAttacks.ItemDamageFunction(single(item.get("threshold")),single(item.get("base")),single(item.get("factor")));var rules=new BlocksAttacks(single(f.get("delay")),single(f.get("disable_scale")),reductions,itemDamage,Optional.empty(),Optional.empty(),Optional.empty());float damage=single(f.get("damage"));double angle=number(f.get("angle")); + try{out.println("delay "+rules.blockDelayTicks());out.println("disable "+disable.invoke(rules,single(f.get("disable_seconds"))));out.println("item "+itemDamage.apply(damage));out.println("blocked "+bits(rules.resolveBlockedDamage(source,damage,angle)));out.println("result ok");}catch(Stop e){out.println("result error");}out.println("queries "+source.calls+" "+source.changed); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBulkSectionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBulkSectionOracle.java new file mode 100644 index 000000000..160207065 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBulkSectionOracle.java @@ -0,0 +1,88 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.lang.reflect.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.level.chunk.status.ChunkStatus; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.feature.Feature; +import net.minecraft.world.level.levelgen.placement.*; + +/** Native feature placement into resident ProtoChunks through a world transport. */ +public final class VanillaBulkSectionOracle { + private static ProtoChunk chunk(Map<ChunkPos,ProtoChunk> chunks,int x,int z) { + var chunk=chunks.get(new ChunkPos(x>>4,z>>4));if(chunk==null)throw new IllegalArgumentException("missing region chunk");return chunk; + } + private static int count(BulkSectionAccess bulk) throws Exception { + var field=BulkSectionAccess.class.getDeclaredField("acquiredSections");field.setAccessible(true);return ((Map<?,?>)field.get(bulk)).size(); + } + public static void main(String[] args) throws Exception { + if(args[0].equals("export")){VanillaHeightmapOracle.main(args);return;} + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + Path dir=Path.of(args[1]); + Holder<Biome> biome=Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},Biomes.PLAINS); + var ids=new IdMapper<Holder<Biome>>();ids.add(biome); + var factory=new PalettedContainerFactory(Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY),Blocks.AIR.defaultBlockState(),null,Strategy.createForBiomes(ids),biome,null); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject()); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();int minimum=f.get("min").getAsInt(),height=f.get("height").getAsInt(); + var chunks=new TreeMap<ChunkPos,ProtoChunk>(Comparator.<ChunkPos>comparingInt(p->p.x()).thenComparingInt(p->p.z())); + for(var value:f.getAsJsonArray("chunks")) { + var p=value.getAsJsonArray();var cp=new ChunkPos(p.get(0).getAsInt(),p.get(1).getAsInt()); + var chunk=new ProtoChunk(cp,UpgradeData.EMPTY,LevelHeightAccessor.create(minimum,height),factory,null); + chunk.setPersistedStatus(ChunkStatus.TERRAIN); + if(f.get("prime").getAsBoolean())Heightmap.primeHeightmaps(chunk,EnumSet.allOf(Heightmap.Types.class)); + chunks.put(cp,chunk); + } + var world=(LevelAccessor)Proxy.newProxyInstance(LevelAccessor.class.getClassLoader(),new Class<?>[]{LevelAccessor.class},(proxy,method,values)->switch(method.getName()) { + case "getMinY"->minimum; + case "getHeight"->height; + case "getChunk"->{var c=chunks.get(new ChunkPos((Integer)values[0],(Integer)values[1]));if(c==null)throw new IllegalArgumentException("missing chunk");yield c;} + default->{if(method.isDefault())yield InvocationHandler.invokeDefault(proxy,method,values);throw new AssertionError(method);} + }); + var bulk=new BulkSectionAccess(world); + try { + for(var value:f.getAsJsonArray("ops")) { + var op=value.getAsJsonArray();String kind=op.get(0).getAsString(); + try { + if(kind.equals("reset")){bulk.close();bulk=new BulkSectionAccess(world);out.println("reset");} + else if(kind.equals("height")) { + int x=op.get(2).getAsInt(),z=op.get(3).getAsInt(); + out.println("height "+(chunk(chunks,x,z).getHeight(Heightmap.Types.valueOf(op.get(1).getAsString()),x&15,z&15)+1)); + } else { + var p=new BlockPos(op.get(1).getAsInt(),op.get(2).getAsInt(),op.get(3).getAsInt()); + switch(kind) { + case "get"->out.println("get "+Block.getId(bulk.getBlockState(p))); + case "world"->out.println("world "+Block.getId(chunk(chunks,p.getX(),p.getZ()).getBlockState(p))); + case "has"->out.println("has "+(bulk.getSection(p)!=null)); + case "set"->{var section=bulk.getSection(p);if(section==null)out.println("set none");else out.println("set "+Block.getId(section.setBlockState(p.getX()&15,p.getY()&15,p.getZ()&15,Block.stateById(op.get(4).getAsInt()),false)));} + default->throw new AssertionError(kind); + } + } + } catch(IllegalArgumentException error){out.println("error");} + out.println("cache "+count(bulk)); + } + } finally {bulk.close();} + for(var entry:chunks.entrySet()) { + var cp=entry.getKey();var chunk=entry.getValue();out.println("chunk "+cp.x()+" "+cp.z()); + for(var kind:Heightmap.Types.values()) { + if(chunk.hasPrimedHeightmap(kind)){out.println("map "+kind.name());for(long word:chunk.getOrCreateHeightmapUnprimed(kind).getRawData())out.println(Long.toUnsignedString(word,16));} + else out.println("missing "+kind.name()); + } + for(int i=0;i<height/16;i++){out.println("section "+i);var section=chunk.getSection(i);for(int y=0;y<16;y++)for(int z=0;z<16;z++)for(int x=0;x<16;x++)out.println(Block.getId(section.getBlockState(x,y,z)));} + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBundleWeightOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBundleWeightOracle.java new file mode 100644 index 000000000..7087bac88 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBundleWeightOracle.java @@ -0,0 +1,22 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.component.*;import net.minecraft.world.item.*;import net.minecraft.world.item.component.*;import org.apache.commons.lang3.math.Fraction; +/** Native checked fraction arithmetic, cached bundle weights and contained validation. */ +public final class VanillaBundleWeightOracle { + static Item[] items;static Constructor<ItemContainerContents> container; + static String fraction(Fraction f){return f.getNumerator()+"/"+f.getDenominator();} + static void bind(int i,JsonElement value){var b=DataComponentMap.builder();if(!value.isJsonNull())b.set(DataComponents.MAX_STACK_SIZE,value.getAsInt());items[i].builtInRegistryHolder().bindComponents(b.build());} + static int n(JsonObject v,String key){return v.get(key).getAsInt();} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();items=new Item[]{Items.STICK,Items.SHIELD};container=ItemContainerContents.class.getDeclaredConstructor(List.class);container.setAccessible(true); + Path dir=Path.of(args[1]);try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();if(f.get("mode").getAsString().equals("fraction")){try{var a=Fraction.getFraction(n(f,"a"),n(f,"b"));var b=Fraction.getFraction(n(f,"c"),n(f,"d"));out.println("new "+fraction(a)+" "+fraction(b));try{out.println("add "+fraction(a.add(b)));}catch(ArithmeticException e){out.println("add error");}try{out.println("multiply "+fraction(a.multiplyBy(b)));}catch(ArithmeticException e){out.println("multiply error");}}catch(ArithmeticException e){out.println("new error");}continue;} + for(int i=0;i<2;i++)bind(i,f.getAsJsonArray("prototypes").get(i));var bundles=new ArrayList<BundleContents>();for(var bv:f.getAsJsonArray("bundles")){var list=new ArrayList<ItemStackTemplate>();for(var iv:bv.getAsJsonArray()){var v=iv.getAsJsonObject();var p=DataComponentPatch.builder();if(!v.get("maximum").isJsonNull())p.set(DataComponents.MAX_STACK_SIZE,n(v,"maximum"));if(v.get("bees").getAsBoolean())p.set(DataComponents.BEES,new Bees(Collections.singletonList(null)));int nested=n(v,"nested");if(nested>=0)p.set(DataComponents.BUNDLE_CONTENTS,bundles.get(nested));list.add(new ItemStackTemplate(items[n(v,"kind")].builtInRegistryHolder(),n(v,"count"),p.build()));}bundles.add(new BundleContents(list));} + for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonObject();switch(op.get("kind").getAsString()){ + case "prototype":bind(n(op,"index"),op.get("maximum"));out.println("prototype");break; + case "weight":{var w=bundles.get(n(op,"index")).weight();out.println("weight "+(w.isError()?"error":fraction(w.getOrThrow())));break;} + case "validate":{var s=new ItemStack(items[0],n(op,"count"));if(op.get("maximum").isJsonNull())s.remove(DataComponents.MAX_STACK_SIZE);else s.set(DataComponents.MAX_STACK_SIZE,n(op,"maximum"));if(op.get("damage").getAsBoolean())s.set(DataComponents.MAX_DAMAGE,0);int ci=n(op,"container"),bi=n(op,"bundle"),pi=n(op,"projectiles");if(ci>=0)s.set(DataComponents.CONTAINER,container.newInstance(bundles.get(ci).items().stream().map(Optional::of).toList()));if(bi>=0)s.set(DataComponents.BUNDLE_CONTENTS,bundles.get(bi));if(pi>=0)s.set(DataComponents.CHARGED_PROJECTILES,new ChargedProjectiles(bundles.get(pi).items()));out.println("valid "+ItemStack.validateStrict(s).isSuccess());break;} + default:throw new AssertionError();} + } + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCanyonCarverOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCanyonCarverOracle.java new file mode 100644 index 000000000..fd7520cb6 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCanyonCarverOracle.java @@ -0,0 +1,40 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.ChunkPos; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.carver.*; + +/** Original transport calling actual decoded canyon carvers and tracing mask writes. */ +public final class VanillaCanyonCarverOracle { + private static final class OutputFailure extends RuntimeException {} + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + var contextMethod=VanillaAnchorOracle.class.getDeclaredMethod("context",JsonObject.class);contextMethod.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();long seed=f.get("seed").getAsLong(); + var context=(WorldGenerationContext)contextMethod.invoke(null,f); + RandomSource random=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + var decoded=WorldCarver.DIRECT_CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(f.get("definition").getAsString())); + if(decoded.result().isEmpty())out.println("decode error");else { + var carver=decoded.result().get();out.println("decode ok"); + var mask=new CarvingMask(context.getMinGenY()+1,context.getMinGenY()+context.getGenDepth()-8); + var t=f.getAsJsonArray("target");var o=f.getAsJsonArray("origin");var target=new ChunkPos(t.get(0).getAsInt(),t.get(1).getAsInt());var origin=new ChunkPos(o.get(0).getAsInt(),o.get(1).getAsInt()); + for(int repeat=0;repeat<f.get("repeats").getAsInt();repeat++) { + out.println("start "+carver.isStartChunk(random));int[] calls={0}; + var output=new CarverOutput(){public int minY(){return mask.minY();}public int maxY(){return mask.maxY();}public void carve(int x,int y,int z){out.println("cell "+x+" "+y+" "+z);int previous=calls[0]++;if(previous==f.get("fail").getAsInt())throw new OutputFailure();mask.carve(x,y,z);}}; + try{out.println("carve "+carver.carve(context,random,target,origin,output)+" "+calls[0]);}catch(OutputFailure|IllegalArgumentException error){out.println("carve error "+calls[0]);} + mask.visit((x,z,low,high)->out.println("column "+x+" "+z+" "+low+" "+high));out.println("next "+random.nextLong()); + } + } + out.println("tail "+random.nextLong()); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCarvingGeometryOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCarvingGeometryOracle.java new file mode 100644 index 000000000..a7524b27d --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCarvingGeometryOracle.java @@ -0,0 +1,43 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import net.minecraft.world.level.ChunkPos; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.level.levelgen.carver.WorldCarver; + +/** Original transport invoking native shared cave/canyon geometry. */ +public final class VanillaCarvingGeometryOracle { + private static double d(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + private static float f(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + private static String bits(double v){return Long.toHexString(Double.doubleToLongBits(v));} + private static final class OutputFailure extends RuntimeException {} + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(String line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var input=JsonParser.parseString(line).getAsJsonObject();var cp=input.getAsJsonArray("chunk");var chunk=new ChunkPos(cp.get(0).getAsInt(),cp.get(1).getAsInt()); + var mask=new CarvingMask(input.get("min").getAsInt(),input.get("max").getAsInt()); + for(var value:input.getAsJsonArray("ellipsoids")) { + var e=value.getAsJsonObject();var center=e.getAsJsonArray("center");int[] calls={0}; + var output=new CarverOutput(){public int minY(){return mask.minY();}public int maxY(){return mask.maxY();}public void carve(int x,int y,int z){ + out.println("cell "+x+" "+y+" "+z);int previous=calls[0]++;if(previous==e.get("fail").getAsInt())throw new OutputFailure();mask.carve(x,y,z); + }}; + int mode=e.get("skip").getAsInt();boolean ok=true; + try {WorldCarver.carveEllipsoid(chunk,d(center.get(0)),d(center.get(1)),d(center.get(2)),d(e.get("horizontal")),d(e.get("vertical")),output,(x,y,z,by)->{ + boolean skip=switch(mode){case 0->x*x+y*y+z*z>=1;case 1->y<=-0.7||x*x+y*y+z*z>=1;case 2->Math.floorMod(by,3)==0;default->false;}; + out.println("skip "+bits(x)+" "+bits(y)+" "+bits(z)+" "+by+" "+skip);return skip; + });}catch(OutputFailure error){ok=false;} + out.println("ellipsoid "+(ok?"ok":"error")+" "+calls[0]); + mask.visit((x,z,low,high)->out.println("column "+x+" "+z+" "+low+" "+high)); + } + } + for(String line:Files.readAllLines(dir.resolve("reach.txt"))) { + var q=JsonParser.parseString(line).getAsJsonArray(); + out.println("reach "+WorldCarver.canReach(new ChunkPos(q.get(0).getAsInt(),q.get(1).getAsInt()),d(q.get(2)),d(q.get(3)),q.get(4).getAsInt(),q.get(5).getAsInt(),f(q.get(6)))); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCarvingMaskOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCarvingMaskOracle.java new file mode 100644 index 000000000..483ab1542 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCarvingMaskOracle.java @@ -0,0 +1,51 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import net.minecraft.world.level.chunk.CarvingMask; + +/** Original transport invoking the pinned vanilla carving mask directly. */ +public final class VanillaCarvingMaskOracle { + private static boolean carve(CarvingMask mask,JsonArray q) { + try {mask.carve(q.get(0).getAsInt(),q.get(1).getAsInt(),q.get(2).getAsInt());return true;} + catch(IndexOutOfBoundsException error){return false;} + } + private static final class VisitorFailure extends RuntimeException {} + public static void main(String[] args) throws Exception { + Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(String line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();var mask=new CarvingMask(f.get("min").getAsInt(),f.get("max").getAsInt()); + out.println("mask "+mask.minY()+" "+mask.maxY()); + for(var value:f.getAsJsonArray("ops")) { + var op=value.getAsJsonObject(); + switch(op.get("kind").getAsString()) { + case "carve" -> out.println("carve "+(carve(mask,op.getAsJsonArray("pos"))?"ok":"error")); + case "fill" -> { + var b=op.getAsJsonArray("box");int calls=0; + for(int x=b.get(0).getAsInt();x<=b.get(1).getAsInt();x++)for(int z=b.get(4).getAsInt();z<=b.get(5).getAsInt();z++) { + int low=b.get(2).getAsInt(),high=b.get(3).getAsInt(); + for(int dy=0;dy<=(long)high-low;dy++){mask.carve(x,low+dy,z);calls++;} + } + out.println("fill "+calls); + } + case "visit" -> { + int[] calls={0};boolean ok=true; + try {mask.visit((x,z,low,high)->{ + out.println("column "+x+" "+z+" "+low+" "+high);int previous=calls[0]++; + var points=op.getAsJsonObject("add").get(Integer.toString(previous)); + if(points!=null)for(var q:points.getAsJsonArray())out.println("add "+(carve(mask,q.getAsJsonArray())?"ok":"error")); + if(previous==op.get("fail").getAsInt())throw new VisitorFailure(); + });}catch(VisitorFailure error){ok=false;} + out.println("visit "+(ok?"ok":"error")+" "+calls[0]); + } + case "read" -> {mask.visit((x,z,low,high)->out.println("column "+x+" "+z+" "+low+" "+high));out.println("read");} + default -> throw new IllegalArgumentException("unknown operation"); + } + out.println("empty "+mask.isEmpty()); + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCaveCarverOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCaveCarverOracle.java new file mode 100644 index 000000000..db49b6aff --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCaveCarverOracle.java @@ -0,0 +1,40 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.ChunkPos; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.carver.*; + +/** Original transport calling actual decoded cave carvers and tracing mask writes. */ +public final class VanillaCaveCarverOracle { + private static final class OutputFailure extends RuntimeException {} + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + var contextMethod=VanillaAnchorOracle.class.getDeclaredMethod("context",JsonObject.class);contextMethod.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();long seed=f.get("seed").getAsLong(); + var context=(WorldGenerationContext)contextMethod.invoke(null,f); + RandomSource random=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + var decoded=WorldCarver.DIRECT_CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(f.get("definition").getAsString())); + if(decoded.result().isEmpty())out.println("decode error");else { + var carver=decoded.result().get();out.println("decode ok"); + var mask=new CarvingMask(context.getMinGenY()+1,context.getMinGenY()+context.getGenDepth()-8); + var t=f.getAsJsonArray("target");var o=f.getAsJsonArray("origin");var target=new ChunkPos(t.get(0).getAsInt(),t.get(1).getAsInt());var origin=new ChunkPos(o.get(0).getAsInt(),o.get(1).getAsInt()); + for(int repeat=0;repeat<f.get("repeats").getAsInt();repeat++) { + out.println("start "+carver.isStartChunk(random));int[] calls={0}; + var output=new CarverOutput(){public int minY(){return mask.minY();}public int maxY(){return mask.maxY();}public void carve(int x,int y,int z){out.println("cell "+x+" "+y+" "+z);int previous=calls[0]++;if(previous==f.get("fail").getAsInt())throw new OutputFailure();mask.carve(x,y,z);}}; + try{out.println("carve "+carver.carve(context,random,target,origin,output)+" "+calls[0]);}catch(OutputFailure|IllegalArgumentException error){out.println("carve error "+calls[0]);} + mask.visit((x,z,low,high)->out.println("column "+x+" "+z+" "+low+" "+high));out.println("next "+random.nextLong()); + } + } + out.println("tail "+random.nextLong()); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkStageOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkStageOracle.java new file mode 100644 index 000000000..8569d55b5 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkStageOracle.java @@ -0,0 +1,67 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.level.chunk.status.ChunkStatus; +import net.minecraft.world.level.levelgen.Heightmap; +import net.minecraft.world.level.levelgen.BelowZeroRetrogen; +import com.mojang.serialization.JsonOps; + +/** Actual pre-light ProtoChunk writes and persisted-status transitions. */ +public final class VanillaChunkStageOracle { + private static final Map<String,ChunkStatus> STAGES=new HashMap<>(); + private static BelowZeroRetrogen upgrade(String target,JsonArray words) { + var data=new JsonObject();data.addProperty("target_status",target);data.add("missing_bedrock",words); + return BelowZeroRetrogen.CODEC.parse(JsonOps.INSTANCE,data).getOrThrow(); + } + public static void main(String[] args) throws Exception { + if(args[0].equals("export")){VanillaHeightmapOracle.main(args);return;} + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + STAGES.put("empty",ChunkStatus.EMPTY);STAGES.put("structure_starts",ChunkStatus.STRUCTURE_STARTS);STAGES.put("structure_references",ChunkStatus.STRUCTURE_REFERENCES);STAGES.put("biomes",ChunkStatus.BIOMES);STAGES.put("terrain",ChunkStatus.TERRAIN);STAGES.put("features",ChunkStatus.FEATURES); + Path dir=Path.of(args[1]); + Holder<Biome> biome=Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},Biomes.PLAINS); + var ids=new IdMapper<Holder<Biome>>();ids.add(biome); + var factory=new PalettedContainerFactory(Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY),Blocks.AIR.defaultBlockState(),null,Strategy.createForBiomes(ids),biome,null); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject()); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();int min=f.get("min").getAsInt(),height=f.get("height").getAsInt();var cp=f.getAsJsonArray("chunk");int cx=cp.get(0).getAsInt(),cz=cp.get(1).getAsInt(); + var chunk=new ProtoChunk(new ChunkPos(cx,cz),UpgradeData.EMPTY,LevelHeightAccessor.create(min,height),factory,null); + out.println("chunk "+cx+" "+cz+" "+min+" "+height); + for(var value:f.getAsJsonArray("ops")) { + var a=value.getAsJsonArray();String op=a.get(0).getAsString(); + switch(op) { + case "stage"->{String name=a.get(1).getAsString();chunk.setPersistedStatus(STAGES.get(name));out.println("stage "+name);} + case "upgrade"->{chunk.setBelowZeroRetrogen(a.get(1).isJsonNull()?null:upgrade(a.get(1).getAsString(),a.get(2).getAsJsonArray()));out.println("upgrade");} + case "upgrade_info"->{var data=chunk.getBelowZeroRetrogen();var bounds=chunk.getHeightAccessorForGeneration();out.println("upgrade_info "+chunk.isUpgrading()+" "+(data==null?"none":data.targetStatus().getName())+" "+bounds.getMinY()+" "+bounds.getHeight()+" "+chunk.getHighestGeneratedStatus().getName());} + case "replace_bedrock"->{BelowZeroRetrogen.replaceOldBedrock(chunk);out.println("replace_bedrock");} + case "mask"->{upgrade("full",a.get(1).getAsJsonArray()).applyBedrockMask(chunk);out.println("mask");} + case "fill"->{var states=a.get(1).getAsJsonArray();int salt=a.get(2).getAsInt();for(int y=0;y<height;y++)for(int z=0;z<16;z++)for(int x=0;x<16;x++)chunk.setBlockState(new BlockPos((cx<<4)+x,min+y,(cz<<4)+z),Block.stateById(states.get((x+3*y+5*z+salt)%states.size()).getAsInt()),3);out.println("fill");} + case "set"->{var p=new BlockPos(a.get(1).getAsInt(),a.get(2).getAsInt(),a.get(3).getAsInt());out.println("set "+Block.getId(chunk.setBlockState(p,Block.stateById(a.get(4).getAsInt()),3)));} + case "get"->out.println("get "+Block.getId(chunk.getBlockState(new BlockPos(a.get(1).getAsInt(),a.get(2).getAsInt(),a.get(3).getAsInt())))); + case "prime"->{int mask=a.get(1).getAsInt();var kinds=EnumSet.noneOf(Heightmap.Types.class);for(var kind:Heightmap.Types.values())if((mask&(1<<kind.ordinal()))!=0)kinds.add(kind);Heightmap.primeHeightmaps(chunk,kinds);out.println("prime "+mask);} + case "query"->{for(var kind:Heightmap.Types.values()) { + if(chunk.hasPrimedHeightmap(kind))out.println("height "+kind.name()+" "+chunk.getOrCreateHeightmapUnprimed(kind).getFirstAvailable(a.get(1).getAsInt()&15,a.get(2).getAsInt()&15)); + else out.println("missing "+kind.name()); + }} + case "dump"->{ + for(var kind:Heightmap.Types.values()) { + if(chunk.hasPrimedHeightmap(kind)){out.println("map "+kind.name());for(long word:chunk.getOrCreateHeightmapUnprimed(kind).getRawData())out.println(Long.toUnsignedString(word,16));} + else out.println("missing "+kind.name()); + } + for(int i=0;i<height/16;i++){out.println("section "+i);var section=chunk.getSection(i);for(int y=0;y<16;y++)for(int z=0;z<16;z++)for(int x=0;x<16;x++)out.println(Block.getId(section.getBlockState(x,y,z)));} + } + default->throw new AssertionError(op); + } + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkStatusOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkStatusOracle.java new file mode 100644 index 000000000..19e91b6f3 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkStatusOracle.java @@ -0,0 +1,36 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.nio.file.*; +import java.util.stream.Collectors; +import net.minecraft.nbt.*; +import net.minecraft.world.level.chunk.status.ChunkType; +import net.minecraft.world.level.chunk.status.ChunkStatus; + +/** Calls the pinned registry and status metadata/codec implementations. */ +public final class VanillaChunkStatusOracle { + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + try(var out=new PrintWriter(Files.newBufferedWriter(Path.of(args[1])))){ + out.println("structure_distance "+ChunkStatus.class.getField("MAX_STRUCTURE_DISTANCE").getInt(null)); + for(var status:ChunkStatus.getStatusList()){ + out.println("status "+status.getIndex()+" "+status.getName()+" "+status.getParent().getName()+" "+(status.getChunkType()==ChunkType.LEVELCHUNK)+" "+status.heightmapsAfter().stream().map(Enum::name).collect(Collectors.joining(","))); + for(var other:ChunkStatus.getStatusList())out.println("order "+status.isOrAfter(other)+" "+status.isAfter(other)+" "+status.isOrBefore(other)+" "+status.isBefore(other)+" "+ChunkStatus.max(status,other).getName()); + } + for(var line:Files.readAllLines(Path.of(args[0]))){ + var row=JsonParser.parseString(line).getAsJsonArray(); + Tag tag=switch(row.get(0).getAsString()){ + case "string"->StringTag.valueOf(row.get(1).getAsString()); + case "int"->IntTag.valueOf(row.get(1).getAsInt()); + case "list"->new ListTag(); + case "compound"->new CompoundTag(); + default->throw new AssertionError(); + }; + if(tag instanceof StringTag)out.println("lookup "+ChunkStatus.byName(row.get(1).getAsString()).getName()); + var result=ChunkStatus.CODEC.parse(NbtOps.INSTANCE,tag).result(); + if(result.isEmpty())out.println("decoded error"); + else {var status=result.get();var encoded=ChunkStatus.CODEC.encodeStart(NbtOps.INSTANCE,status).getOrThrow();out.println("decoded "+status.getIndex()+" "+((StringTag)encoded).value());} + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaClimbingOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaClimbingOracle.java new file mode 100644 index 000000000..b0eeb5399 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaClimbingOracle.java @@ -0,0 +1,35 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.registries.*;import net.minecraft.nbt.*;import net.minecraft.tags.*;import net.minecraft.world.entity.*;import net.minecraft.world.level.block.*;import net.minecraft.world.level.block.state.*; +/** Actual registered LivingEntity climbing and trapdoor ladder predicates. */ +public final class VanillaClimbingOracle { + static final class Stop extends RuntimeException {} + static Field last; + static BlockPos pos(JsonElement v){var a=v.getAsJsonArray();return new BlockPos(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt());} + static String text(BlockPos p){return p.getX()+" "+p.getY()+" "+p.getZ();} + static final class Data {JsonObject op;PrintWriter out;int calls;BlockPos position;Actor actor; + void query(String s){out.println(s);int n=calls++;if(n==op.get("fail").getAsInt())throw new Stop();if(n==op.get("mutate_at").getAsInt()){position=new BlockPos(31,32,33);try{last.set(actor,Optional.of(new BlockPos(-8,-9,-10)));}catch(ReflectiveOperationException e){throw new AssertionError(e);}}}} + static final class Level extends net.minecraft.server.level.ServerLevel {Data d;Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public BlockState getBlockState(BlockPos p){d.query("below "+text(p));return Block.stateById(d.op.get("below").getAsInt());}} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Data d;Actor(){super(null,null);}void configure(Level l){setLevel(l);} + @Override public boolean isSpectator(){d.query("spectator");return d.op.get("spectator").getAsBoolean();} + @Override public BlockPos blockPosition(){d.query("position");return d.position;} + @Override public BlockState getInBlockState(){d.query("in-state");return Block.stateById(d.op.get("state").getAsInt());} + @Override public boolean isFallFlying(){d.query("gliding");return d.op.get("gliding").getAsBoolean();}} + static void export(Path dir,JsonArray climb,JsonArray glide)throws Exception{ + var states=new ListTag();var defaults=new CompoundTag();var trapdoors=new JsonArray();var trapdoorStates=new JsonArray();var ladderStates=new JsonArray();var names=new JsonObject(); + for(var block:BuiltInRegistries.BLOCK){String name=BuiltInRegistries.BLOCK.getKey(block).toString();defaults.putInt(name,Block.getId(block.defaultBlockState()));names.addProperty(name,Block.getId(block.defaultBlockState()));if(block instanceof TrapDoorBlock)trapdoors.add(name);} + for(var state:Block.BLOCK_STATE_REGISTRY){states.add(BlockState.FULL_CODEC.encodeStart(NbtOps.INSTANCE,state).getOrThrow());if(state.getBlock() instanceof TrapDoorBlock)trapdoorStates.add(Block.getId(state));if(state.is(Blocks.LADDER))ladderStates.add(Block.getId(state));} + var data=new CompoundTag();data.putInt("DataVersion",net.minecraft.SharedConstants.getCurrentVersion().dataVersion().version());data.put("states",states);data.put("defaults",defaults);try(var out=new DataOutputStream(Files.newOutputStream(dir.resolve("block-registry.nbt")))){NbtIo.write(data,out);} + var info=new JsonObject();info.addProperty("states",states.size());info.add("defaults",names);info.add("trapdoors",trapdoors);info.add("trapdoor_states",trapdoorStates);info.add("ladder_states",ladderStates);info.add("climbable",climb);info.add("glide_through",glide);Files.writeString(dir.resolve("info.json"),info.toString()); + } + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]);VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject());var all=new ArrayList<Holder<Block>>();var climb=new ArrayList<Holder<Block>>();var glide=new ArrayList<Holder<Block>>();var cn=new JsonArray();var gn=new JsonArray();for(var block:BuiltInRegistries.BLOCK){var h=block.builtInRegistryHolder();String name=BuiltInRegistries.BLOCK.getKey(block).toString();all.add(h);if(block.defaultBlockState().is(BlockTags.CLIMBABLE)){climb.add(h);cn.add(name);}if(block.defaultBlockState().is(BlockTags.CAN_GLIDE_THROUGH)){glide.add(h);gn.add(name);}} + if(args[0].equals("export")){export(dir,cn,gn);return;} + var u=Class.forName("sun.misc.Unsafe");var uf=u.getDeclaredField("theUnsafe");uf.setAccessible(true);var unsafe=uf.get(null);var allocate=u.getMethod("allocateInstance",Class.class);last=LivingEntity.class.getDeclaredField("lastClimbablePos");last.setAccessible(true);int oldC=-1,oldG=-1; + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();int c=f.get("climb_tags").getAsInt(),g=f.get("glide_tags").getAsInt();if(c!=oldC||g!=oldG){BuiltInRegistries.BLOCK.prepareTagReload(new TagLoader.LoadResult<>(Registries.BLOCK,Map.of(BlockTags.CLIMBABLE,c==0?climb:c==1?List.<Holder<Block>>of():all,BlockTags.CAN_GLIDE_THROUGH,g==0?glide:g==1?List.<Holder<Block>>of():all))).apply();oldC=c;oldG=g;} + var d=new Data();d.out=out;var level=(Level)allocate.invoke(unsafe,Level.class);level.d=d;var actor=(Actor)allocate.invoke(unsafe,Actor.class);actor.d=d;actor.configure(level);d.actor=actor;last.set(actor,Optional.of(new BlockPos(7,8,9))); + for(var v:f.getAsJsonArray("ops")){d.op=v.getAsJsonObject();d.calls=0;d.position=pos(d.op.get("position"));try{out.println("result "+actor.onClimbable());}catch(Stop e){out.println("error");}out.println("position "+text(d.position));var p=(Optional<?>)last.get(actor);out.println(p.isEmpty()?"last none":"last "+text((BlockPos)p.get()));out.println("queries "+d.calls);} + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java new file mode 100644 index 000000000..b9a9b3a93 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java @@ -0,0 +1,174 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.nio.file.*; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.*; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.entity.item.FallingBlockEntity; +import net.minecraft.tags.*; +import net.minecraft.world.item.*; +import net.minecraft.world.level.GameType; +import net.minecraft.world.level.CollisionGetter; +import net.minecraft.world.level.block.*; +import java.lang.reflect.Proxy; +import net.minecraft.world.level.material.*; +import net.minecraft.world.phys.Vec3; +import net.minecraft.world.phys.shapes.*; +/** Executes native collision-context factories and queries over controlled snapshots. */ +public final class VanillaCollisionContextOracle { + static { net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); } + private static final Item[] ITEMS={Items.AIR,Items.STONE,Items.SCAFFOLDING,Items.POWDER_SNOW_BUCKET,Items.LEATHER_BOOTS}; + private static final Fluid[] FLUIDS={Fluids.EMPTY,Fluids.FLOWING_WATER,Fluids.WATER,Fluids.FLOWING_LAVA,Fluids.LAVA}; + private static final class Stop extends RuntimeException {} + private static final class Trace { + PrintWriter out;int calls,fail; + void query(String value){out.println(value);if(calls++==fail)throw new Stop();} + } + public static class PlayerSnapshot extends Player { + Trace trace;VoxelShape liquidShape;boolean powderTag;ItemStack feet; + @Override public boolean is(TagKey<EntityType<?>> tag){if(tag!=EntityTypeTags.POWDER_SNOW_WALKABLE_MOBS)throw new AssertionError(tag);trace.query("walkable_tag 1");return powderTag;} + @Override public ItemStack getItemBySlot(EquipmentSlot slot){if(slot!=EquipmentSlot.FEET)throw new AssertionError(slot);trace.query("feet 1");return feet;} + + @Override public VoxelShape getLiquidCollisionShape(){trace.query("liquid_shape 1");return liquidShape;} + + boolean descending,stand,fail; + ItemStack held; + int calls,lastFluid; + public PlayerSnapshot(){super(null,null);} + @Override public GameType gameMode(){return GameType.SURVIVAL;} + @Override public boolean isDescending(){return descending;} + @Override public ItemStack getMainHandItem(){return held;} + @Override public boolean canStandOnFluid(FluidState state){ + if(trace!=null)trace.query("stand 1 "+fluidIndex(state)+" "+state.getAmount()+" "+state.getValueOrElse(FlowingFluid.FALLING,false)); + calls++;lastFluid=-1;for(int i=0;i<FLUIDS.length;i++)if(state.getType()==FLUIDS[i])lastFluid=i; + if(fail)throw new Stop();return stand; + } + } + public static class MarkerSnapshot extends Marker { + boolean descending,powderTag;Trace trace; + @Override public boolean is(TagKey<EntityType<?>> tag){if(tag!=EntityTypeTags.POWDER_SNOW_WALKABLE_MOBS)throw new AssertionError(tag);trace.query("walkable_tag 2");return powderTag;} + public MarkerSnapshot(){super(null,null);} + @Override public boolean isDescending(){return descending;} + } + public static class FallingSnapshot extends FallingBlockEntity { + boolean descending; + public FallingSnapshot(){super(null,null);} + @Override public boolean isDescending(){return descending;} + } + private static int fluidIndex(FluidState state){for(int i=0;i<FLUIDS.length;i++)if(FLUIDS[i]==state.getType())return i;throw new AssertionError();} + private static FluidState liquidAbove(int index){return index<0?Fluids.EMPTY.defaultFluidState():(index<16?Blocks.WATER:Blocks.LAVA).defaultBlockState().setValue(LiquidBlock.LEVEL,index%16).getFluidState();} + private static VoxelShape liquidShape(int index){return switch(index){case 0->Shapes.empty();case 1->Shapes.block();case 2->Shapes.box(0,0,0,1,0.5,1);case 3->Shapes.box(0.25,-0.5,0.25,0.75,1.5,0.75);default->throw new AssertionError();};} + private static double number(JsonElement value){return Double.longBitsToDouble(Long.parseUnsignedLong(value.getAsString(),16));} + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var allocator=Class.forName("sun.misc.Unsafe");var access=allocator.getDeclaredField("theUnsafe");access.setAccessible(true);var unsafe=access.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + var position=Entity.class.getDeclaredField("position");position.setAccessible(true); + var stackItem=ItemStack.class.getDeclaredField("item");stackItem.setAccessible(true); + var stackCount=ItemStack.class.getDeclaredField("count");stackCount.setAccessible(true); + Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var inputs=Files.lines(dir.resolve("inputs.txt"))){ + for(var line:(Iterable<String>)inputs::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject(); + var player=(PlayerSnapshot)allocate.invoke(unsafe,PlayerSnapshot.class); + var marker=(MarkerSnapshot)allocate.invoke(unsafe,MarkerSnapshot.class); + var falling=(FallingSnapshot)allocate.invoke(unsafe,FallingSnapshot.class); + player.descending=marker.descending=falling.descending=f.get("descending").getAsBoolean(); + // Query only item identity/count; component loading and inventory lifecycle are outside this fixture. + player.held=(ItemStack)allocate.invoke(unsafe,ItemStack.class); + stackItem.set(player.held,ITEMS[f.get("item").getAsInt()].builtInRegistryHolder()); + stackCount.setInt(player.held,f.get("count").getAsInt()); + player.stand=f.get("stand").getAsBoolean();player.fail=f.get("fail").getAsBoolean(); + double y=number(f.get("y")),other=number(f.get("other")); + position.set(player,new Vec3(0,y,0));position.set(marker,new Vec3(0,y,0));position.set(falling,new Vec3(0,y,0)); + boolean always=f.get("always").getAsBoolean(); + var context=switch(f.get("mode").getAsString()){ + case "empty"->always?CollisionContext.emptyWithFluidCollisions():CollisionContext.empty(); + case "position"->CollisionContext.positionContext(y); + case "player"->CollisionContext.of(player,always); + case "marker"->CollisionContext.of(marker,always); + case "falling"->CollisionContext.of(falling,always); + case "with_falling"->CollisionContext.withPosition(falling,other); + case "factory_player"->CollisionContext.of(player); + case "factory_marker"->CollisionContext.of(marker); + case "placement"->CollisionContext.placementContext(player); + case "placement_null"->CollisionContext.placementContext(null); + case "with_player"->CollisionContext.withPosition(player,other); + case "with_marker"->CollisionContext.withPosition(marker,other); + case "with_null"->CollisionContext.withPosition(null,other); + default->throw new AssertionError(); + }; + int entity=context instanceof EntityCollisionContext ec?(ec.getEntity()==player?1:ec.getEntity()==marker?2:ec.getEntity()==falling?3:0):0; + int held=0;for(int i=0;i<ITEMS.length;i++)if(context.isHoldingItem(ITEMS[i]))held|=1<<i; + out.printf("context %b %b %b %d %d%n",context.isDescending(),context.isPlacement(),context.alwaysCollideWithFluid(),entity,held); + if(f.has("registry")) { + var config=f.getAsJsonArray("registry");var state=Block.stateById(config.get(0).getAsInt()); + var pos=new BlockPos(config.get(1).getAsInt(),config.get(2).getAsInt(),config.get(3).getAsInt()); + var trace=new Trace();trace.out=out;trace.fail=-1;player.trace=marker.trace=trace;player.liquidShape=liquidShape(2); + player.fallDistance=marker.fallDistance=falling.fallDistance=always?3.0:0.0;player.powderTag=marker.powderTag=false; + player.feet=(ItemStack)allocate.invoke(unsafe,ItemStack.class);stackItem.set(player.feet,Items.LEATHER_BOOTS.builtInRegistryHolder());stackCount.setInt(player.feet,1); + var world=(CollisionGetter)Proxy.newProxyInstance(CollisionGetter.class.getClassLoader(),new Class<?>[]{CollisionGetter.class},(proxy,method,values)->{ + var at=(BlockPos)values[0]; + if(method.getName().equals("getFluidState")){trace.query("fluid_at "+at.getX()+" "+at.getY()+" "+at.getZ());return Fluids.EMPTY.defaultFluidState();} + if(method.getName().equals("getBlockEntity")){trace.query("block_entity "+at.getX()+" "+at.getY()+" "+at.getZ());return null;} + throw new AssertionError(method); + }); + var shape=context.getCollisionShape(state,world,pos); + var cacheField=net.minecraft.world.level.block.state.BlockBehaviour.BlockStateBase.class.getDeclaredField("cache");cacheField.setAccessible(true);var cache=cacheField.get(state); + if(cache!=null){var shapeField=cache.getClass().getDeclaredField("collisionShape");shapeField.setAccessible(true);out.println("cache_equal "+!Shapes.joinIsNotEmpty(shape,(VoxelShape)shapeField.get(cache),BooleanOp.NOT_SAME));} + else{var emit=VanillaFaceSupportOracle.class.getDeclaredMethod("emit",PrintWriter.class,VoxelShape.class);emit.setAccessible(true);emit.invoke(null,out,shape);} + out.println("queries "+trace.calls); + continue; + } + if(f.has("powder")) { + var config=f.getAsJsonArray("powder"); + var pos=new BlockPos(17,config.get(0).getAsInt(),-33); + var trace=new Trace();trace.out=out;trace.fail=config.get(5).getAsInt();player.trace=marker.trace=trace; + player.fallDistance=marker.fallDistance=falling.fallDistance=number(config.get(1)); + player.powderTag=marker.powderTag=config.get(2).getAsBoolean(); + player.feet=(ItemStack)allocate.invoke(unsafe,ItemStack.class);stackItem.set(player.feet,ITEMS[config.get(3).getAsInt()].builtInRegistryHolder());stackCount.setInt(player.feet,config.get(4).getAsInt()); + var world=(CollisionGetter)Proxy.newProxyInstance(CollisionGetter.class.getClassLoader(),new Class<?>[]{CollisionGetter.class},(proxy,method,values)->{throw new AssertionError("unexpected powder world query: "+method);}); + var emit=VanillaFaceSupportOracle.class.getDeclaredMethod("emit",PrintWriter.class,VoxelShape.class);emit.setAccessible(true); + try{emit.invoke(null,out,context.getCollisionShape(Blocks.POWDER_SNOW.defaultBlockState(),world,pos));}catch(Stop error){out.println("shape error");} + out.println("queries "+trace.calls); + continue; + } + if(f.has("liquid")) { + var config=f.getAsJsonArray("liquid"); + var state=(config.get(1).getAsBoolean()?Blocks.LAVA:Blocks.WATER).defaultBlockState().setValue(LiquidBlock.LEVEL,config.get(0).getAsInt()); + var pos=new BlockPos(17,config.get(2).getAsInt(),-33); + var trace=new Trace();trace.out=out;trace.fail=config.get(5).getAsInt();player.trace=trace;player.liquidShape=liquidShape(config.get(4).getAsInt()); + var world=(CollisionGetter)Proxy.newProxyInstance(CollisionGetter.class.getClassLoader(),new Class<?>[]{CollisionGetter.class},(proxy,method,values)->{ + if(!method.getName().equals("getFluidState"))throw new AssertionError(method); + var at=(BlockPos)values[0];trace.query("fluid_at "+at.getX()+" "+at.getY()+" "+at.getZ());return liquidAbove(config.get(3).getAsInt()); + }); + var emit=VanillaFaceSupportOracle.class.getDeclaredMethod("emit",PrintWriter.class,VoxelShape.class);emit.setAccessible(true); + try{emit.invoke(null,out,context.getCollisionShape(state,world,pos));}catch(Stop error){out.println("shape error");} + out.println("queries "+trace.calls); + continue; + } + if(f.has("scaffolding")) { + var config=f.getAsJsonArray("scaffolding"); + var state=Blocks.SCAFFOLDING.defaultBlockState().setValue(ScaffoldingBlock.DISTANCE,config.get(0).getAsInt()).setValue(ScaffoldingBlock.BOTTOM,config.get(1).getAsBoolean()).setValue(ScaffoldingBlock.WATERLOGGED,config.get(2).getAsBoolean()); + var pos=new BlockPos(17,config.get(3).getAsInt(),-33); + var world=(CollisionGetter)Proxy.newProxyInstance(CollisionGetter.class.getClassLoader(),new Class<?>[]{CollisionGetter.class},(proxy,method,values)->{throw new AssertionError("unexpected world query: "+method);}); + var emit=VanillaFaceSupportOracle.class.getDeclaredMethod("emit",PrintWriter.class,VoxelShape.class);emit.setAccessible(true); + emit.invoke(null,out,context.getCollisionShape(state,world,pos)); + continue; + } + var above=new StringBuilder(); + for(var query:f.getAsJsonArray("above")){ + var q=query.getAsJsonArray();int blockY=q.get(0).getAsInt();double top=number(q.get(1)); + var shape=q.get(2).getAsBoolean()?Shapes.empty():Shapes.box(0,top-0.25,0,1,top,1); + for(boolean fallback:new boolean[]{false,true})above.append(context.isAbove(shape,new BlockPos(0,blockY,0),fallback)?'1':'0'); + } + out.println("above "+above); + for(int a=0;a<FLUIDS.length;a++)for(int b=0;b<FLUIDS.length;b++){ + player.calls=0;player.lastFluid=-1;String result; + try{result=Boolean.toString(context.canStandOnFluid(FLUIDS[a].defaultFluidState(),FLUIDS[b].defaultFluidState()));}catch(Stop error){result="error";} + out.printf("fluid %s %d %d%n",result,player.calls,player.lastFluid); + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java new file mode 100644 index 000000000..3466606cd --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java @@ -0,0 +1,155 @@ +package dev.horizonlab.parity; + +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.SharedConstants; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.*; +import net.minecraft.server.Bootstrap; +import net.minecraft.world.level.EmptyBlockGetter; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.*; +import net.minecraft.world.phys.shapes.*; + +/** Exports private runtime data locally and invokes actual vanilla cached-shape queries. */ +public final class VanillaCollisionOracle { + static { SharedConstants.tryDetectVersion(); Bootstrap.bootStrap(); } + private static final Field CACHE, COLLISION, DISCRETE; + private static final Method INDEX; + static { + try { + CACHE = BlockBehaviour.BlockStateBase.class.getDeclaredField("cache"); CACHE.setAccessible(true); + COLLISION = CACHE.getType().getDeclaredField("collisionShape"); COLLISION.setAccessible(true); + DISCRETE = VoxelShape.class.getDeclaredField("shape"); DISCRETE.setAccessible(true); + INDEX = VoxelShape.class.getDeclaredMethod("findIndex", Direction.Axis.class, double.class); INDEX.setAccessible(true); + } catch (ReflectiveOperationException e) { throw new ExceptionInInitializerError(e); } + } + private static VoxelShape cached(BlockState state) throws ReflectiveOperationException { + Object cache = CACHE.get(state); + if (cache == null) return null; + VoxelShape shape = (VoxelShape) COLLISION.get(cache); + if (state.getCollisionShape(EmptyBlockGetter.INSTANCE, BlockPos.ZERO) != shape) throw new AssertionError("cached dispatch differs"); + return shape; + } + private static CompoundTag grid(VoxelShape shape) throws ReflectiveOperationException { + CompoundTag tag = new CompoundTag(); + tag.putByte("canonical",(byte)(shape==Shapes.empty()?1:shape==Shapes.block()?2:0)); + tag.putByte("cube", (byte)(shape instanceof CubeVoxelShape ? 1 : 0)); + int cubeAxes=0;for(Direction.Axis axis:Direction.Axis.values())if(shape.getCoords(axis) instanceof CubePointRange)cubeAxes|=1<<axis.ordinal();tag.putByte("cube_axes",(byte)cubeAxes); + for (Direction.Axis axis : Direction.Axis.values()) { + var coords = shape.getCoords(axis); long[] bits = new long[coords.size()]; + for (int i = 0; i < bits.length; i++) bits[i] = Double.doubleToRawLongBits(coords.getDouble(i)); + tag.putLongArray(axis.getName(), bits); + } + DiscreteVoxelShape discrete = (DiscreteVoxelShape) DISCRETE.get(shape); + tag.putIntArray("discrete_min", Arrays.stream(Direction.Axis.values()).mapToInt(discrete::firstFull).toArray()); + tag.putIntArray("discrete_max", Arrays.stream(Direction.Axis.values()).mapToInt(discrete::lastFull).toArray()); + byte[] bits = new byte[discrete.getXSize() * discrete.getYSize() * discrete.getZSize()]; + for (int x = 0; x < discrete.getXSize(); x++) for (int y = 0; y < discrete.getYSize(); y++) for (int z = 0; z < discrete.getZSize(); z++) bits[(x * discrete.getYSize() + y) * discrete.getZSize() + z] = (byte)(discrete.isFull(x, y, z) ? 1 : 0); + tag.putByteArray("occupied", bits); + return tag; + } + public static CompoundTag occlusionDefinitions() throws Exception { + var method=BlockBehaviour.class.getDeclaredMethod("getOcclusionShape",BlockState.class);method.setAccessible(true); + var states=new ListTag();var shapes=new ListTag();var ids=new IdentityHashMap<VoxelShape,Integer>();int[] mapping=new int[Block.BLOCK_STATE_REGISTRY.size()];int index=0; + for(var state:Block.BLOCK_STATE_REGISTRY) { + states.add(BlockState.FULL_CODEC.encodeStart(NbtOps.INSTANCE,state).getOrThrow()); + var shape=(VoxelShape)method.invoke(state.getBlock(),state);Integer id=ids.get(shape); + if(id==null){id=shapes.size();ids.put(shape,id);shapes.add(grid(shape));} + mapping[index++]=id; + } + var data=new CompoundTag();data.putInt("DataVersion",SharedConstants.getCurrentVersion().dataVersion().version());data.put("states",states);data.put("shapes",shapes);data.putIntArray("cached_shapes",mapping);return data; + } + private static void write(CompoundTag tag, Path path) throws IOException { + try (DataOutputStream out = new DataOutputStream(Files.newOutputStream(path))) { NbtIo.write(tag, out); } + } + private static void inputValues(PrintWriter out, double... values) { for (double value : values) out.printf(" %016x", Double.doubleToRawLongBits(value)); } + private static void generate(Path base) throws Exception { + ListTag states = new ListTag(), shapes = new ListTag(); CompoundTag defaults = new CompoundTag(); + Map<VoxelShape,Integer> ids = new IdentityHashMap<>();Set<CompoundTag> grids=new HashSet<>(); int[] mapping = new int[Block.BLOCK_STATE_REGISTRY.size()]; int cachedCount = 0; + for (BlockState state : Block.BLOCK_STATE_REGISTRY) { + int id = states.size(); + if (Block.BLOCK_STATE_REGISTRY.getId(state) != id) throw new AssertionError("non-dense states"); + Tag encoded = BlockState.FULL_CODEC.encodeStart(NbtOps.INSTANCE, state).getOrThrow(); states.add(encoded); + if (state == state.getBlock().defaultBlockState()) defaults.putInt(((CompoundTag)encoded).getStringOr("id", ""), id); + VoxelShape shape = cached(state); + if (shape == null) mapping[id] = -1; + else { + cachedCount++; CompoundTag data = grid(shape);var geometry=data.copy();geometry.remove("canonical");grids.add(geometry); Integer shapeId = ids.get(shape); + if (shapeId == null) { shapeId = shapes.size(); ids.put(shape, shapeId); shapes.add(data); } + mapping[id] = shapeId; + } + } + CompoundTag registry = new CompoundTag(); registry.putInt("DataVersion", SharedConstants.getCurrentVersion().dataVersion().version()); registry.put("states", states); registry.put("defaults", defaults); + write(registry, base.resolve("block-registry.nbt")); + CompoundTag collision = new CompoundTag(); collision.putInt("DataVersion", SharedConstants.getCurrentVersion().dataVersion().version()); collision.put("states", states); collision.put("shapes", shapes); collision.putIntArray("cached_shapes", mapping); + write(collision, base.resolve("cached-collision.nbt")); + Random random = new Random(0x484f52495a4f4eL); + try (PrintWriter out = new PrintWriter(Files.newBufferedWriter(base.resolve("inputs.txt")))) { + for (int id = 0; id < mapping.length; id++) { + if (mapping[id] < 0) continue; + for (int scenario = 0; scenario < 6; scenario++) { + BlockPos offset = switch(scenario % 3) { case 0 -> BlockPos.ZERO; case 1 -> new BlockPos(-17,-64,-1); default -> new BlockPos(30_000_000,64,-30_000_000); }; + double[] origin = {offset.getX(),offset.getY(),offset.getZ()}; double[] lower = new double[3], upper = new double[3], start = new double[3], end = new double[3], point = new double[3]; + for (int axis = 0; axis < 3; axis++) { + lower[axis] = origin[axis] + (scenario < 3 ? -.6 + axis * .4 : random.nextDouble() * 4 - 2); + upper[axis] = lower[axis] + (axis == 1 ? 1.8 : .6); + start[axis] = origin[axis] + (scenario < 3 ? (axis == 0 ? -1 : .5) : random.nextDouble() * 3 - 1); + end[axis] = origin[axis] + (scenario < 3 ? (axis == 0 ? 2 : .5) : random.nextDouble() * 3 - 1); + point[axis] = origin[axis] + random.nextDouble() * 3 - 1; + } + out.print(id); out.printf(" %d %d %d",offset.getX(),offset.getY(),offset.getZ()); + inputValues(out, lower); inputValues(out, upper); inputValues(out, start); inputValues(out, end); inputValues(out, point); + inputValues(out, scenario == 4 ? 1e-8 : scenario == 5 ? -1e-7 : random.nextDouble() * 4 - 2); out.println(); + } + } + } + System.out.printf("HORIZON_COLLISION_RESULT {\"registry_states\":%d,\"cached_states\":%d,\"uncached_states\":%d,\"unique_shapes\":%d,\"unique_grids\":%d,\"queries\":%d}%n", mapping.length,cachedCount,mapping.length-cachedCount,shapes.size(),grids.size(),cachedCount*6); + } + private static void values(PrintWriter out, String label, double... values) { out.print(label); for (double value : values) out.printf(" %016x",Double.doubleToLongBits(value)); out.println(); } + private static void box(PrintWriter out, String label, AABB b) { values(out,label,b.minX,b.minY,b.minZ,b.maxX,b.maxY,b.maxZ); } + private static void hit(PrintWriter out, BlockHitResult h) { + if (h == null) out.println("hit none"); else {Vec3 v=h.getLocation(); out.printf("hit %d %d %016x %016x %016x%n",h.getDirection().ordinal(),h.isInside()?1:0,Double.doubleToLongBits(v.x),Double.doubleToLongBits(v.y),Double.doubleToLongBits(v.z));} + } + private static final class Input { + String[] words; int index; + Input(String line) {words=line.split(" ");} + int integer() {return Integer.parseInt(words[index++]);} + double number() {return Double.longBitsToDouble(Long.parseUnsignedLong(words[index++],16));} + Vec3 vector() {return new Vec3(number(),number(),number());} + } + private static void verify(Path base, String side) throws Exception { + try (PrintWriter out = new PrintWriter(Files.newBufferedWriter(base.resolve("vanilla-"+side+".txt")))) { + IdentityHashMap<VoxelShape,Integer> identities=new IdentityHashMap<>(); + for (BlockState state : Block.BLOCK_STATE_REGISTRY) { + VoxelShape shape=cached(state); int id=Block.BLOCK_STATE_REGISTRY.getId(state); + if (shape==null) {out.printf("state %d uncached%n",id); continue;} + List<AABB> boxes=shape.toAabbs(); out.printf("state %d cached %d%n",id,boxes.size()); + out.printf("identity %d%n",identities.computeIfAbsent(shape,key->identities.size())); + out.printf("canonical %b %b%n",shape==Shapes.empty(),shape==Shapes.block()); + int cubeAxes=0;for(Direction.Axis axis:Direction.Axis.values())if(shape.getCoords(axis) instanceof CubePointRange)cubeAxes|=1<<axis.ordinal();out.printf("cube %d %d%n",shape instanceof CubeVoxelShape?1:0,cubeAxes); + values(out,"axis-extrema",shape.min(Direction.Axis.X),shape.min(Direction.Axis.Y),shape.min(Direction.Axis.Z),shape.max(Direction.Axis.X),shape.max(Direction.Axis.Y),shape.max(Direction.Axis.Z)); + if (shape.isEmpty()) out.println("bounds none"); else box(out,"bounds",shape.bounds()); + for (AABB b:boxes) box(out,"part",b); + } + try (BufferedReader input=Files.newBufferedReader(base.resolve("inputs.txt"))) { + for (String line;(line=input.readLine())!=null;) { + Input in=new Input(line); int id=in.integer(); BlockPos offset=new BlockPos(in.integer(),in.integer(),in.integer()); + AABB box=new AABB(in.vector(),in.vector()); Vec3 start=in.vector(),end=in.vector(),point=in.vector(); double amount=in.number(); + VoxelShape local=cached(Block.BLOCK_STATE_REGISTRY.byId(id)); VoxelShape moved=local.move(offset); + values(out,"collide",moved.collide(Direction.Axis.X,box,amount),moved.collide(Direction.Axis.Y,box,amount),moved.collide(Direction.Axis.Z,box,amount)); + hit(out,local.clip(start,end,offset)); + Optional<Vec3> nearest=moved.closestPointTo(point); if(nearest.isEmpty()) out.println("closest none"); else values(out,"closest",nearest.get().x,nearest.get().y,nearest.get().z); + out.printf("index %d %d %d%n",INDEX.invoke(moved,Direction.Axis.X,point.x),INDEX.invoke(moved,Direction.Axis.Y,point.y),INDEX.invoke(moved,Direction.Axis.Z,point.z)); + if(in.index!=in.words.length) throw new AssertionError("trailing input"); + } + } + } + } + public static void main(String[] args) throws Exception { Path base=Path.of(args[1]); if(args[0].equals("generate"))generate(base);else verify(base,args[0]); } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCombatRulesOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCombatRulesOracle.java new file mode 100644 index 000000000..c77de3c11 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCombatRulesOracle.java @@ -0,0 +1,21 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.nio.file.*;import java.util.*; +import net.minecraft.world.damagesource.*;import net.minecraft.world.entity.player.Player;import net.minecraft.world.item.*;import net.minecraft.world.level.Level;import net.minecraft.server.level.ServerLevel; +/** Actual CombatRules; weapon paths use empty or unenchanted native stacks. */ +public final class VanillaCombatRulesOracle { + static final class Stop extends RuntimeException {} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static final class Data {JsonObject f;PrintWriter out;int calls;boolean changed;Level level;ItemStack stack; + void query(String text){out.println(text);int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt())changed=true;} + boolean flag(String name){return f.get((changed?"after_":"")+name).getAsBoolean();}} + static final class Source extends DamageSource {Data d;Source(){super(null);}@Override public ItemStack getWeaponItem(){d.query("weapon");return d.flag("weapon")?d.stack:null;}} + static final class Actor extends Player {Data d;Actor(){super(null,null);}@Override public net.minecraft.world.level.GameType gameMode(){return net.minecraft.world.level.GameType.SURVIVAL;}@Override public Level level(){d.query("level");return d.flag("server")?d.level:null;}} + static final class Server extends ServerLevel {Server(){super(null,null,null,null,null,null,false,0L,List.of(),false);}} + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");var uf=u.getDeclaredField("theUnsafe");uf.setAccessible(true);var unsafe=uf.get(null);var allocate=u.getMethod("allocateInstance",Class.class);var level=(Server)allocate.invoke(unsafe,Server.class);var stackConstructor=ItemStack.class.getDeclaredConstructor(net.minecraft.core.Holder.class,int.class,net.minecraft.core.component.PatchedDataComponentMap.class);stackConstructor.setAccessible(true);var unenchanted=(ItemStack)stackConstructor.newInstance(net.minecraft.core.registries.BuiltInRegistries.ITEM.wrapAsHolder(Items.DIAMOND_SWORD),1,new net.minecraft.core.component.PatchedDataComponentMap(net.minecraft.core.component.DataComponentMap.EMPTY));Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;d.level=level;d.stack=f.get("empty").getAsBoolean()?ItemStack.EMPTY:unenchanted;var source=(Source)allocate.invoke(unsafe,Source.class);source.d=d;var actor=(Actor)allocate.invoke(unsafe,Actor.class);actor.d=d; + try{float value=f.get("mode").getAsString().equals("magic")?CombatRules.getDamageAfterMagicAbsorb(single(f.get("damage")),single(f.get("armor"))):CombatRules.getDamageAfterAbsorb(actor,single(f.get("damage")),source,single(f.get("armor")),single(f.get("toughness")));out.println("value "+bits(value));out.println("result ok");}catch(Stop e){out.println("result error");}out.println("queries "+d.calls); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaComponentDurabilityOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaComponentDurabilityOracle.java new file mode 100644 index 000000000..8d73686f7 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaComponentDurabilityOracle.java @@ -0,0 +1,26 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.core.registries.*;import net.minecraft.world.item.*;import net.minecraft.server.level.*;import net.minecraft.server.PlayerAdvancements; +/** Actual durability writes into shared prototypes and observable component patches. */ +public final class VanillaComponentDurabilityOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate;static Field components,count,patchMap;static Object removed; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static String optional(Object v){return v==null?"none":v.toString();} + static DataComponentMap prototype(JsonObject f){var b=DataComponentMap.builder();if(!f.get("max").isJsonNull())b.set(DataComponents.MAX_DAMAGE,f.get("max").getAsInt());if(!f.get("damage").isJsonNull())b.set(DataComponents.DAMAGE,f.get("damage").getAsInt());if(f.get("unbreakable").getAsBoolean())b.set(DataComponents.UNBREAKABLE,net.minecraft.util.Unit.INSTANCE);return b.build();} + static DataComponentPatch patch(JsonArray a){var b=DataComponentPatch.builder();for(var e:a){var pair=e.getAsJsonArray();int key=pair.get(0).getAsInt();var v=pair.get(1);if(key==0){if(v.isJsonNull())b.remove(DataComponents.MAX_DAMAGE);else b.set(DataComponents.MAX_DAMAGE,v.getAsInt());}else if(key==1){if(v.isJsonNull())b.remove(DataComponents.DAMAGE);else b.set(DataComponents.DAMAGE,v.getAsInt());}else{if(v.isJsonNull())b.remove(DataComponents.UNBREAKABLE);else b.set(DataComponents.UNBREAKABLE,net.minecraft.util.Unit.INSTANCE);}}return b.build();} + static String patchText(PatchedDataComponentMap c)throws Exception{var join=new StringJoiner(",");for(var e:((Map<?,?>)patchMap.get(c.asPatch())).entrySet()){int key=e.getKey()==DataComponents.MAX_DAMAGE?0:e.getKey()==DataComponents.DAMAGE?1:2;join.add(key+"="+(e.getValue()==removed?"none":key==2?"0":e.getValue().toString()));}return join.toString();} + static String snapshot(ItemStack s){try{var c=(PatchedDataComponentMap)components.get(s);return count.getInt(s)+" "+s.getCount()+" "+optional(c.get(DataComponents.MAX_DAMAGE))+" "+optional(c.get(DataComponents.DAMAGE))+" "+c.has(DataComponents.UNBREAKABLE)+" "+s.getMaxDamage()+" "+s.getDamageValue()+" "+s.isEmpty()+" "+s.isDamageableItem()+" "+s.isDamaged()+" "+s.isBroken()+" "+s.nextDamageWillBreak()+" | "+patchText(c);}catch(Exception e){throw new AssertionError(e);}} + static void reset(ItemStack s,JsonObject f){s.setCount(f.get("count").getAsInt());if(f.get("max").isJsonNull())s.remove(DataComponents.MAX_DAMAGE);else s.set(DataComponents.MAX_DAMAGE,f.get("max").getAsInt());if(f.get("damage").isJsonNull())s.remove(DataComponents.DAMAGE);else s.set(DataComponents.DAMAGE,f.get("damage").getAsInt());if(f.get("unbreakable").getAsBoolean())s.set(DataComponents.UNBREAKABLE,net.minecraft.util.Unit.INSTANCE);else s.remove(DataComponents.UNBREAKABLE);} + static final class Data {JsonObject f;PrintWriter out;int calls;boolean changed;ItemStack stack;PlayerAdvancements advancements; + void event(String s){out.println(s+" | "+snapshot(stack));int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt()){changed=true;reset(stack,f.getAsJsonObject("after"));}} + boolean infinite(){return f.get(changed?"after_infinite":"infinite").getAsBoolean();}} + static final class Human extends ServerPlayer {Data d;Human(){super(null,null,null,null);}@Override public boolean hasInfiniteMaterials(){d.event("infinite");return d.infinite();}@Override public PlayerAdvancements getAdvancements(){d.event("criterion");return d.advancements;}@Override public ServerLevel level(){d.event("level");return null;}} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);patchMap=field(DataComponentPatch.class,"map");removed=field(Class.forName("net.minecraft.core.component.Removed"),"INSTANCE").get(null);components=field(ItemStack.class,"components");count=field(ItemStack.class,"count");var ctor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);ctor.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.advancements=make(PlayerAdvancements.class);field(PlayerAdvancements.class,"activeTriggers").set(d.advancements,new HashMap<>());var actor=make(Human.class);actor.d=d;d.stack=(ItemStack)ctor.newInstance(BuiltInRegistries.ITEM.wrapAsHolder(d.f.get("air").getAsBoolean()?Items.AIR:Items.SHIELD),1,new PatchedDataComponentMap(prototype(d.f.getAsJsonObject("prototype"))));reset(d.stack,d.f.getAsJsonObject("initial"));if(d.f.has("restore"))((PatchedDataComponentMap)components.get(d.stack)).restorePatch(patch(d.f.getAsJsonArray("restore")));int amount=d.f.get("amount").getAsInt(); + try{switch(d.f.get("mode").getAsString()){case "hurt":d.stack.hurtAndBreak(amount,(ServerLevel)null,d.f.get("player").getAsBoolean()?actor:null,copy->{out.println("copy "+snapshot(copy));d.event("break");out.println("copy-after "+snapshot(copy));});break;case "without":d.stack.hurtWithoutBreaking(amount,actor);break;case "set":d.stack.setDamageValue(amount);break;case "grow":d.stack.grow(amount);break;case "shrink":d.stack.shrink(amount);break;case "query":break;default:throw new AssertionError();}out.println("result ok");}catch(Stop|NullPointerException e){out.println("result error");}out.println("state "+snapshot(d.stack)+" "+d.calls+" "+d.changed); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaComponentPatchOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaComponentPatchOracle.java new file mode 100644 index 000000000..724b81ab5 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaComponentPatchOracle.java @@ -0,0 +1,25 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import com.mojang.serialization.Codec;import java.io.*;import java.nio.file.*;import java.lang.reflect.*;import java.util.*; +import net.minecraft.core.component.*; +/** Actual patched maps, ordered immutable prototypes and shared copies. */ +public final class VanillaComponentPatchOracle { + static DataComponentType<Object>[] keys;static Field patchMap;static Object removed; + static Object value(JsonElement v){if(v.isJsonNull())return null;if(v.getAsJsonPrimitive().isString())return Float.valueOf(Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16)));return Integer.valueOf(v.getAsInt());} + static String text(Object v){if(v==null||v==removed)return "none";if(v instanceof Float f)return "f"+String.format("%08x",Float.floatToIntBits(f));return "i"+v;} + static int id(Object key){for(int i=0;i<keys.length;i++)if(keys[i]==key)return i;throw new AssertionError();} + static DataComponentMap prototype(JsonArray a){var b=DataComponentMap.builder();for(var ev:a){var e=ev.getAsJsonArray();b.set(keys[e.get(0).getAsInt()],value(e.get(1)));}return b.build();} + static DataComponentPatch patch(JsonArray a){var b=DataComponentPatch.builder();for(var ev:a){var e=ev.getAsJsonArray();int k=e.get(0).getAsInt();var v=value(e.get(1));if(v==null)b.remove(keys[k]);else b.set(keys[k],v);}return b.build();} + static String patchText(DataComponentPatch p)throws Exception{var result=new StringJoiner(",");for(var e:((Map<?,?>)patchMap.get(p)).entrySet())result.add(id(e.getKey())+"="+text(e.getValue()));return result.toString();} + static void snapshot(PrintWriter out,PatchedDataComponentMap[] maps,DataComponentPatch[] patches)throws Exception{for(int i=0;i<maps.length;i++){var m=maps[i];var entries=new StringJoiner(",");for(var e:m)entries.add(id(e.type())+"="+text(e.value()));var ks=new StringJoiner(",");for(var k:m.keySet())ks.add(Integer.toString(id(k)));var values=new StringJoiner(",");int flags=0;for(int k=0;k<keys.length;k++){values.add(text(m.get(keys[k])));if(m.hasNonDefault(keys[k]))flags|=1<<k;}out.println("map "+i+" "+m.size()+" "+entries+" | "+ks+" | "+values+" | "+flags+" | "+patchText(m.asPatch()));}for(int i=0;i<patches.length;i++)out.println("patch "+i+" "+patchText(patches[i]));out.println("equal "+maps[0].equals(maps[1])+" "+maps[0].equals(maps[2])+" "+maps[1].equals(maps[2]));} + @SuppressWarnings("unchecked")public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var removedField=Class.forName("net.minecraft.core.component.Removed").getDeclaredField("INSTANCE");removedField.setAccessible(true);removed=removedField.get(null);keys=new DataComponentType[16];for(int i=0;i<keys.length;i++)keys[i]=(DataComponentType<Object>)(DataComponentType<?>)DataComponentType.<Integer>builder().persistent(Codec.INT).build();patchMap=DataComponentPatch.class.getDeclaredField("map");patchMap.setAccessible(true);Path dir=Path.of(args[1]);try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var base=prototype(f.getAsJsonArray("prototype"));PatchedDataComponentMap[] maps={new PatchedDataComponentMap(base),new PatchedDataComponentMap(base),new PatchedDataComponentMap(base)};DataComponentPatch[] patches={DataComponentPatch.EMPTY,DataComponentPatch.EMPTY,DataComponentPatch.EMPTY};snapshot(out,maps,patches);for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonObject();int a=op.get("a").getAsInt(),b=op.get("b").getAsInt();try{switch(op.get("kind").getAsString()){ + case "set":out.println("old "+text(maps[a].set(keys[op.get("key").getAsInt()],value(op.get("value")))));break; + case "remove":out.println("old "+text(maps[a].remove(keys[op.get("key").getAsInt()])));break; + case "copy":maps[b]=maps[a].copy();break; + case "save":patches[b]=maps[a].asPatch();break; + case "apply":maps[a].applyPatch(patches[b]);break; + case "restore":maps[a].restorePatch(patches[b]);break; + case "clear":maps[a].clearPatch();break; + case "build":patches[b]=patch(op.getAsJsonArray("entries"));break; + case "from":maps[a]=PatchedDataComponentMap.fromPatch(base,patches[b]);break; + default:throw new AssertionError();}out.println("result ok");}catch(NullPointerException e){out.println("result error");}snapshot(out,maps,patches);}}}} +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaConsumableEmissionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaConsumableEmissionOracle.java new file mode 100644 index 000000000..22a37b905 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaConsumableEmissionOracle.java @@ -0,0 +1,38 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.world.item.component.Consumable;import net.minecraft.sounds.*;import net.minecraft.core.Holder; +import net.minecraft.world.entity.*;import net.minecraft.world.level.Level;import net.minecraft.server.level.ServerLevel;import net.minecraft.world.item.*;import net.minecraft.util.RandomSource;import net.minecraft.world.level.levelgen.XoroshiroRandomSource;import net.minecraft.world.phys.Vec3;import net.minecraft.core.particles.*;import net.minecraft.core.component.DataComponents; +/** Actual consumable emission composed with inherited item particles. */ +public final class VanillaConsumableEmissionOracle { + static Object unsafe;static Method allocate;static Field position,randomField; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static int n(JsonObject v,String k){return v.get(k).getAsInt();} + static float fl(JsonObject v,String k){return Float.intBitsToFloat((int)v.get(k).getAsLong());} + static String bits(double v){return Long.toUnsignedString(Double.doubleToLongBits(v));} + static int kind(Item item){return item==Items.AIR?0:item==Items.STONE?1:2;} + static String opt(Integer value){return value==null?"none":value.toString();} + static final class Stop extends RuntimeException{} + static final class Data{JsonObject f;PrintWriter out;RandomSource[] random;Actor actor;ParticleLevel[] levels;ItemStack stack;ItemParticleOption first;boolean changed;int calls; + JsonObject config(){return f.getAsJsonObject(changed?"after":"initial");} + void reset(){try{var c=config();var p=c.getAsJsonArray("position");position.set(actor,new Vec3(p.get(0).getAsDouble(),p.get(1).getAsDouble(),p.get(2).getAsDouble()));randomField.set(actor,random[n(c,"random")]);stack.setCount(n(c,"count"));if(c.get("damage").isJsonNull())stack.remove(DataComponents.DAMAGE);else stack.set(DataComponents.DAMAGE,n(c,"damage"));if(c.get("reseed").getAsBoolean())for(int i=0;i<2;i++)random[i].setSeed(c.getAsJsonArray("seeds").get(i).getAsLong());}catch(Exception e){throw new AssertionError(e);}} + void all(){out.println("state "+calls+" "+changed+" "+n(config(),"random")+" "+n(config(),"level")+" "+kind(stack.getItem())+" "+stack.getCount()+" "+opt(stack.get(DataComponents.DAMAGE)));} + void event(String name){out.println("event "+name);int index=calls++;all();if(index==n(f,"fail"))throw new Stop();if(index==n(f,"mutate")){changed=true;reset();}} + } + static class Actor extends net.minecraft.world.entity.decoration.ArmorStand{Data d;Actor(){super(null,null);} + @Override public void spawnItemParticles(ItemStack s,int count){if(s!=d.stack)throw new AssertionError();d.event("spawn "+count);super.spawnItemParticles(s,count);} + @Override public void playSound(SoundEvent s,float volume,float pitch){d.event("sound "+(s==SoundEvents.GENERIC_EAT.value()?0:s==SoundEvents.PLAYER_BURP?1:-1)+" "+Integer.toUnsignedString(Float.floatToIntBits(volume))+" "+Integer.toUnsignedString(Float.floatToIntBits(pitch)));} + @Override public RandomSource getRandom(){throw new AssertionError("virtual random getter must not be used");} + @Override public float getXRot(){d.event("pitch");return fl(d.config(),"pitch");} + @Override public float getYRot(){d.event("yaw");return fl(d.config(),"yaw");} + @Override public double getEyeY(){d.event("eye");return getY()+(double)fl(d.config(),"eye");} + @Override public Level level(){d.event("level");return d.levels[n(d.config(),"level")];} + } + static final class OverrideActor extends Actor implements Consumable.OverrideConsumeSound {public SoundEvent getConsumeSound(ItemStack s){if(s!=d.stack)throw new AssertionError();d.event("override");return n(d.config(),"sound")==0?SoundEvents.GENERIC_EAT.value():SoundEvents.PLAYER_BURP;}} + static final class ParticleLevel extends ServerLevel{Data d;int id;ParticleLevel(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public void addParticle(ParticleOptions options,double x,double y,double z,double vx,double vy,double vz){var p=(ItemParticleOption)options;if(p.getType()!=ParticleTypes.ITEM)throw new AssertionError();boolean same=d.first==null||d.first==p;if(d.first==null)d.first=p;var t=p.getItem();d.event("particle "+id+" "+kind(t.item().value())+" "+t.count()+" "+opt(t.get(DataComponents.DAMAGE))+" "+same+" "+bits(x)+" "+bits(y)+" "+bits(z)+" "+bits(vx)+" "+bits(vy)+" "+bits(vz));} + } + public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();for(var item:new Item[]{Items.AIR,Items.STONE,Items.BREAD})item.builtInRegistryHolder().bindComponents(net.minecraft.core.component.DataComponentMap.EMPTY);var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);position=field(Entity.class,"position");randomField=field(Entity.class,"random");Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.random=new RandomSource[2];for(int i=0;i<2;i++){long seed=d.f.getAsJsonArray("seeds").get(i).getAsLong();d.random[i]=d.f.get("xor").getAsBoolean()?new XoroshiroRandomSource(seed):RandomSource.create(seed);}d.actor=d.f.get("override").getAsBoolean()?make(OverrideActor.class):make(Actor.class);d.actor.d=d;d.levels=new ParticleLevel[2];for(int i=0;i<2;i++){d.levels[i]=make(ParticleLevel.class);d.levels[i].d=d;d.levels[i].id=i;}d.stack=new ItemStack(new Item[]{Items.AIR,Items.STONE,Items.BREAD}[n(d.f,"item")]);d.reset();d.all();var component=new Consumable(fl(d.f,"seconds"),ItemUseAnimation.values()[n(d.f,"animation")],Holder.direct(n(d.f,"sound")==0?SoundEvents.GENERIC_EAT.value():SoundEvents.PLAYER_BURP),d.f.get("has_particles").getAsBoolean(),List.of());out.println("timing "+component.consumeTicks()+" "+component.shouldEmitParticlesAndSounds(n(d.f,"remaining")));try{component.emitParticlesAndSounds(d.random[n(d.f,"emit_random")],d.actor,d.stack,n(d.f,"particles"));out.println("result ok");}catch(Stop e){out.println("result callback");}d.all();for(int i=0;i<2;i++)out.println("random "+i+" "+d.random[i].nextLong()+" "+d.random[i].nextLong());} + }} +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaConsumableOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaConsumableOracle.java new file mode 100644 index 000000000..0bb5eb6d2 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaConsumableOracle.java @@ -0,0 +1,78 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.world.item.component.Consumable;import net.minecraft.sounds.*;import net.minecraft.core.Holder; +import net.minecraft.world.food.*;import net.minecraft.world.entity.player.Player;import net.minecraft.server.level.ServerPlayer;import net.minecraft.server.PlayerAdvancements;import net.minecraft.stats.*;import net.minecraft.world.level.GameType;import net.minecraft.world.level.gameevent.GameEvent;import net.minecraft.world.InteractionHand;import net.minecraft.world.InteractionResult;import net.minecraft.world.item.consume_effects.ConsumeEffect; +import net.minecraft.world.entity.*;import net.minecraft.world.level.Level;import net.minecraft.server.level.ServerLevel;import net.minecraft.world.item.*;import net.minecraft.util.RandomSource;import net.minecraft.world.level.levelgen.XoroshiroRandomSource;import net.minecraft.world.phys.Vec3;import net.minecraft.core.particles.*;import net.minecraft.core.component.DataComponents; +/** Actual consumable start/completion with real food listeners, particles and stacks. */ +public final class VanillaConsumableOracle { + static Object unsafe;static Method allocate;static Field position,randomField; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static int n(JsonObject v,String k){return v.get(k).getAsInt();} + static float fl(JsonObject v,String k){return Float.intBitsToFloat((int)v.get(k).getAsLong());} + static String bits(double v){return Long.toUnsignedString(Double.doubleToLongBits(v));} + static int kind(Item item){return item==Items.AIR?0:item==Items.STONE?1:2;} + static String opt(Integer value){return value==null?"none":value.toString();} + static final class Stop extends RuntimeException{} + static final class Data{JsonObject f;PrintWriter out;RandomSource[] random;LivingEntity actor;FoodData food;PlayerAdvancements advancements;ParticleLevel[] levels;ItemStack stack;ItemParticleOption first;boolean changed;int calls; + JsonObject config(){return f.getAsJsonObject(changed?"after":"initial");} + void reset(){try{var c=config();var p=c.getAsJsonArray("position");position.set(actor,new Vec3(p.get(0).getAsDouble(),p.get(1).getAsDouble(),p.get(2).getAsDouble()));randomField.set(actor,random[n(c,"random")]);stack.setCount(n(c,"count"));if(c.get("damage").isJsonNull())stack.remove(DataComponents.DAMAGE);else stack.set(DataComponents.DAMAGE,n(c,"damage"));var f=c.get("food_component");if(f.isJsonNull())stack.remove(DataComponents.FOOD);else{var v=f.getAsJsonObject();stack.set(DataComponents.FOOD,new FoodProperties(n(v,"nutrition"),fl(v,"saturation"),v.get("always").getAsBoolean()));}food.setFoodLevel(n(c,"food"));food.setSaturation(fl(c,"saturation"));if(c.get("reseed").getAsBoolean())for(int i=0;i<2;i++)random[i].setSeed(c.getAsJsonArray("seeds").get(i).getAsLong());}catch(Exception e){throw new AssertionError(e);}} + void all(){out.println("state "+calls+" "+changed+" "+n(config(),"random")+" "+n(config(),"level")+" "+kind(stack.getItem())+" "+stack.getCount()+" "+opt(stack.get(DataComponents.DAMAGE)));} + void foodState(){out.println("food "+food.getFoodLevel()+" "+Integer.toUnsignedString(Float.floatToIntBits(food.getSaturationLevel())));} + void event(String name){out.println("event "+name);int index=calls++;all();foodState();if(index==n(f,"fail"))throw new Stop();if(index==n(f,"mutate")){changed=true;reset();}} + } + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Data d;Actor(){super(null,null);} + @Override public void spawnItemParticles(ItemStack s,int count){if(s!=d.stack)throw new AssertionError();d.event("spawn "+count);super.spawnItemParticles(s,count);} + @Override public void playSound(SoundEvent s,float volume,float pitch){d.event("sound "+(s==SoundEvents.GENERIC_EAT.value()?0:s==SoundEvents.PLAYER_BURP?1:-1)+" "+Integer.toUnsignedString(Float.floatToIntBits(volume))+" "+Integer.toUnsignedString(Float.floatToIntBits(pitch)));} + @Override public RandomSource getRandom(){d.event("random");return d.random[n(d.config(),"virtual_random")];} + @Override public float getXRot(){d.event("pitch");return fl(d.config(),"pitch");} + @Override public float getYRot(){d.event("yaw");return fl(d.config(),"yaw");} + @Override public double getEyeY(){d.event("eye");return getY()+(double)fl(d.config(),"eye");} + @Override public ParticleLevel level(){d.event("level");return d.levels[n(d.config(),"level")];} + @Override public void startUsingItem(InteractionHand hand){d.event("start "+hand.ordinal());} + @Override public boolean hasInfiniteMaterials(){d.event("infinite");return d.config().get("infinite").getAsBoolean();} + @Override public void gameEvent(Holder<GameEvent> event){if(event!=GameEvent.EAT&&event!=GameEvent.DRINK)throw new AssertionError();d.event("game-event "+(event==GameEvent.DRINK));} +} + static final class Human extends Player {Data d;Human(){super(null,null);}@Override public GameType gameMode(){return GameType.SURVIVAL;}@Override public boolean isSpectator(){return false;}@Override public boolean isCreative(){return false;} + @Override public void spawnItemParticles(ItemStack s,int count){if(s!=d.stack)throw new AssertionError();d.event("spawn "+count);super.spawnItemParticles(s,count);} + @Override public void playSound(SoundEvent s,float volume,float pitch){d.event("sound "+(s==SoundEvents.GENERIC_EAT.value()?0:s==SoundEvents.PLAYER_BURP?1:-1)+" "+Integer.toUnsignedString(Float.floatToIntBits(volume))+" "+Integer.toUnsignedString(Float.floatToIntBits(pitch)));} + @Override public RandomSource getRandom(){d.event("random");return d.random[n(d.config(),"virtual_random")];} + @Override public float getXRot(){d.event("pitch");return fl(d.config(),"pitch");} + @Override public float getYRot(){d.event("yaw");return fl(d.config(),"yaw");} + @Override public double getEyeY(){d.event("eye");return getY()+(double)fl(d.config(),"eye");} + @Override public ParticleLevel level(){d.event("level");return d.levels[n(d.config(),"level")];} + @Override public void startUsingItem(InteractionHand hand){d.event("start "+hand.ordinal());} + @Override public boolean hasInfiniteMaterials(){d.event("infinite");return d.config().get("infinite").getAsBoolean();} + @Override public void gameEvent(Holder<GameEvent> event){if(event!=GameEvent.EAT&&event!=GameEvent.DRINK)throw new AssertionError();d.event("game-event "+(event==GameEvent.DRINK));} + + @Override public boolean canEat(boolean always){d.event("can-eat "+always);return d.config().get("can_eat").getAsBoolean();} + @Override public FoodData getFoodData(){d.event("food-data");return d.food;} +} + static final class ServerActor extends ServerPlayer {Data d;ServerActor(){super(null,null,null,null);} + @Override public void spawnItemParticles(ItemStack s,int count){if(s!=d.stack)throw new AssertionError();d.event("spawn "+count);super.spawnItemParticles(s,count);} + @Override public void playSound(SoundEvent s,float volume,float pitch){d.event("sound "+(s==SoundEvents.GENERIC_EAT.value()?0:s==SoundEvents.PLAYER_BURP?1:-1)+" "+Integer.toUnsignedString(Float.floatToIntBits(volume))+" "+Integer.toUnsignedString(Float.floatToIntBits(pitch)));} + @Override public RandomSource getRandom(){d.event("random");return d.random[n(d.config(),"virtual_random")];} + @Override public float getXRot(){d.event("pitch");return fl(d.config(),"pitch");} + @Override public float getYRot(){d.event("yaw");return fl(d.config(),"yaw");} + @Override public double getEyeY(){d.event("eye");return getY()+(double)fl(d.config(),"eye");} + @Override public ParticleLevel level(){d.event("level");return d.levels[n(d.config(),"level")];} + @Override public void startUsingItem(InteractionHand hand){d.event("start "+hand.ordinal());} + @Override public boolean hasInfiniteMaterials(){d.event("infinite");return d.config().get("infinite").getAsBoolean();} + @Override public void gameEvent(Holder<GameEvent> event){if(event!=GameEvent.EAT&&event!=GameEvent.DRINK)throw new AssertionError();d.event("game-event "+(event==GameEvent.DRINK));} + + @Override public boolean canEat(boolean always){d.event("can-eat "+always);return d.config().get("can_eat").getAsBoolean();} + @Override public FoodData getFoodData(){d.event("food-data");return d.food;} + + @Override public void awardStat(Stat<?> stat){if(stat.getType()!=Stats.ITEM_USED)throw new AssertionError();d.event("stat "+kind((Item)stat.getValue()));} + @Override public PlayerAdvancements getAdvancements(){d.event("criterion");return d.advancements;} + } + static final class ParticleLevel extends ServerLevel{Data d;int id;ParticleLevel(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public boolean isClientSide(){d.event("client "+id);return d.config().get("client").getAsBoolean();} + @Override public void playSound(Entity excluded,double x,double y,double z,SoundEvent sound,SoundSource source,float volume,float pitch){if(excluded!=null)throw new AssertionError();int s=sound==SoundEvents.GENERIC_EAT.value()?0:sound==SoundEvents.PLAYER_BURP?1:-1;d.event("food-sound "+id+" "+s+" "+source.ordinal()+" "+bits(x)+" "+bits(y)+" "+bits(z)+" "+Integer.toUnsignedString(Float.floatToIntBits(volume))+" "+Integer.toUnsignedString(Float.floatToIntBits(pitch)));} + @Override public void addParticle(ParticleOptions options,double x,double y,double z,double vx,double vy,double vz){var p=(ItemParticleOption)options;if(p.getType()!=ParticleTypes.ITEM)throw new AssertionError();boolean same=d.first==null||d.first==p;if(d.first==null)d.first=p;var t=p.getItem();d.event("particle "+id+" "+kind(t.item().value())+" "+t.count()+" "+opt(t.get(DataComponents.DAMAGE))+" "+same+" "+bits(x)+" "+bits(y)+" "+bits(z)+" "+bits(vx)+" "+bits(vy)+" "+bits(vz));} + } + static final class Effect implements ConsumeEffect {Data d;int id;Effect(Data d,int id){this.d=d;this.id=id;}public ConsumeEffect.Type<? extends ConsumeEffect> getType(){throw new AssertionError();}public boolean apply(Level level,ItemStack stack,LivingEntity actor){if(stack!=d.stack||actor!=d.actor)throw new AssertionError();d.event("effect "+((ParticleLevel)level).id+" "+id);return d.config().get("effect_result").getAsBoolean();}} + public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();for(var item:new Item[]{Items.AIR,Items.STONE,Items.BREAD})item.builtInRegistryHolder().bindComponents(net.minecraft.core.component.DataComponentMap.EMPTY);var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);position=field(Entity.class,"position");randomField=field(Entity.class,"random");Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.random=new RandomSource[2];for(int i=0;i<2;i++){long seed=d.f.getAsJsonArray("seeds").get(i).getAsLong();d.random[i]=d.f.get("xor").getAsBoolean()?new XoroshiroRandomSource(seed):RandomSource.create(seed);}switch(n(d.f,"actor")){case 0->{var a=make(Actor.class);a.d=d;d.actor=a;}case 1->{var a=make(Human.class);a.d=d;d.actor=a;}case 2->{var a=make(ServerActor.class);a.d=d;d.actor=a;}default->throw new AssertionError();}d.food=new FoodData();d.advancements=make(PlayerAdvancements.class);field(PlayerAdvancements.class,"activeTriggers").set(d.advancements,new HashMap<>());d.levels=new ParticleLevel[2];for(int i=0;i<2;i++){d.levels[i]=make(ParticleLevel.class);d.levels[i].d=d;d.levels[i].id=i;}d.stack=new ItemStack(new Item[]{Items.AIR,Items.STONE,Items.BREAD}[n(d.f,"item")]);d.reset();d.all();var effects=new ArrayList<ConsumeEffect>();for(int i=0;i<n(d.f,"effects");i++)effects.add(new Effect(d,i));var component=new Consumable(fl(d.f,"seconds"),ItemUseAnimation.values()[n(d.f,"animation")],Holder.direct(n(d.f,"sound")==0?SoundEvents.GENERIC_EAT.value():SoundEvents.PLAYER_BURP),d.f.get("has_particles").getAsBoolean(),effects);d.foodState();try{switch(n(d.f,"op")){case 0->out.println("result can "+component.canConsume(d.actor,d.stack));case 1->{var r=component.startConsuming(d.actor,d.stack,InteractionHand.values()[n(d.f,"hand")]);if(r==InteractionResult.FAIL)out.println("result fail");else{var s=(InteractionResult.Success)r;if(s.shouldSwing()||!s.consumesAction())throw new AssertionError();if(s.heldItemTransformedTo()!=null&&s.heldItemTransformedTo()!=d.stack)throw new AssertionError();out.println("result consume "+(s.heldItemTransformedTo()==null?"none":"input"));}}case 2->{var r=component.onConsume(d.levels[n(d.f,"passed_level")],d.actor,d.stack);if(r!=d.stack)throw new AssertionError();out.println("result input");}default->throw new AssertionError();}}catch(Stop e){out.println("result callback");}d.all();d.foodState();for(int i=0;i<2;i++)out.println("random "+i+" "+d.random[i].nextLong()+" "+d.random[i].nextLong());} + }} +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaConsumeEffectOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaConsumeEffectOracle.java new file mode 100644 index 000000000..a8faf7556 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaConsumeEffectOracle.java @@ -0,0 +1,38 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.world.effect.*;import net.minecraft.core.*;import net.minecraft.world.item.*;import net.minecraft.world.item.consume_effects.*;import net.minecraft.world.entity.*;import net.minecraft.world.level.Level;import net.minecraft.server.level.ServerLevel;import net.minecraft.sounds.*;import net.minecraft.util.RandomSource;import net.minecraft.world.level.levelgen.XoroshiroRandomSource; +/** Actual apply/remove/clear/sound consume effects with concrete instance copies. */ +public final class VanillaConsumeEffectOracle { + static Object unsafe;static Method allocate;static List<Holder<MobEffect>> effects;static Field duration,amplifier,ambient,visible,icon,hidden,blend,factor,previous; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static int n(JsonObject v,String k){return v.get(k).getAsInt();} + static float fl(JsonObject v,String k){return Float.intBitsToFloat((int)v.get(k).getAsLong());} + static long bits(float v){return Integer.toUnsignedLong(Float.floatToIntBits(v));} + static String desc(MobEffectInstance e){try{var b=blend.get(e);return effects.indexOf(e.getEffect())+" "+e.getDuration()+" "+e.getAmplifier()+" "+e.isAmbient()+" "+e.isVisible()+" "+e.showIcon()+" "+(hidden.get(e)!=null)+" "+bits(factor.getFloat(b))+" "+bits(previous.getFloat(b));}catch(Exception ex){throw new AssertionError(ex);}} + static MobEffectInstance instance(int id,JsonObject v,MobEffectInstance hidden){return new MobEffectInstance(effects.get(id),n(v,"duration"),n(v,"amplifier"),v.get("ambient").getAsBoolean(),v.get("visible").getAsBoolean(),v.get("icon").getAsBoolean(),hidden);} + static final class Stop extends RuntimeException{} + static final class Data {JsonObject f;PrintWriter out;RandomSource[] random;MobEffectInstance[] inputs;List<MobEffectInstance> added=new ArrayList<>();boolean changed;int calls; + JsonObject config(){return f.getAsJsonObject(changed?"after":"initial");} + void reset(){try{var c=config();for(int i=0;i<3;i++){var v=c.getAsJsonArray("instances").get(i).getAsJsonObject();var e=inputs[i];duration.setInt(e,n(v,"duration"));amplifier.setInt(e,n(v,"amplifier"));ambient.setBoolean(e,v.get("ambient").getAsBoolean());visible.setBoolean(e,v.get("visible").getAsBoolean());icon.setBoolean(e,v.get("icon").getAsBoolean());factor.setFloat(blend.get(e),fl(v,"factor"));previous.setFloat(blend.get(e),fl(v,"previous"));}if(c.get("reseed").getAsBoolean())for(int i=0;i<2;i++)random[i].setSeed(c.getAsJsonArray("seeds").get(i).getAsLong());}catch(Exception e){throw new AssertionError(e);}} + void all(){out.println("state "+calls+" "+changed+" "+n(config(),"random"));for(int i=0;i<3;i++)out.println("input "+i+" "+desc(inputs[i]));for(int i=0;i<added.size();i++)out.println("added "+i+" "+desc(added.get(i)));} + boolean event(String name){out.println("event "+name);int i=calls++;all();if(i==n(f,"fail"))throw new Stop();if(i==n(f,"mutate")){changed=true;reset();}var results=config().getAsJsonArray("returns");return results.get(i%results.size()).getAsBoolean();} + } + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Data d;Actor(){super(null,null);} + @Override public RandomSource getRandom(){d.event("random");return d.random[n(d.config(),"random")];} + @Override public boolean addEffect(MobEffectInstance e,Entity source){if(source!=null)throw new AssertionError();boolean fresh=true;for(var v:d.inputs)if(v==e)fresh=false;for(var v:d.added)if(v==e)fresh=false;boolean result=d.event("add "+fresh+" "+desc(e));d.added.add(e);return result;} + @Override public boolean removeEffect(Holder<MobEffect> e){return d.event("remove "+effects.indexOf(e));} + @Override public boolean removeAllEffects(){return d.event("clear");} + @Override public BlockPos blockPosition(){d.event("position");var p=d.config().getAsJsonArray("position");return new BlockPos(p.get(0).getAsInt(),p.get(1).getAsInt(),p.get(2).getAsInt());} + @Override public SoundSource getSoundSource(){d.event("category");return SoundSource.values()[n(d.config(),"category")];} + } + static final class SoundLevel extends ServerLevel {Data d;int id;SoundLevel(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public void playSound(Entity excluded,BlockPos p,SoundEvent sound,SoundSource category,float volume,float pitch){if(excluded!=null||volume!=1||pitch!=1)throw new AssertionError();int s=sound==SoundEvents.GENERIC_EAT.value()?0:sound==SoundEvents.PLAYER_BURP?1:-1;if(s<0)throw new AssertionError();d.event("sound "+id+" "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+s+" "+category.ordinal());} + } + public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();effects=List.of(MobEffects.SPEED,MobEffects.POISON,MobEffects.NIGHT_VISION);var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);duration=field(MobEffectInstance.class,"duration");amplifier=field(MobEffectInstance.class,"amplifier");ambient=field(MobEffectInstance.class,"ambient");visible=field(MobEffectInstance.class,"visible");icon=field(MobEffectInstance.class,"showIcon");hidden=field(MobEffectInstance.class,"hiddenEffect");blend=field(MobEffectInstance.class,"blendState");factor=field(blend.getType(),"factor");previous=field(blend.getType(),"factorPreviousFrame");Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.random=new RandomSource[2];for(int i=0;i<2;i++){long seed=d.f.getAsJsonArray("seeds").get(i).getAsLong();d.random[i]=d.f.get("xor").getAsBoolean()?new XoroshiroRandomSource(seed):RandomSource.create(seed);}d.inputs=new MobEffectInstance[3];for(int i=0;i<3;i++){var v=d.config().getAsJsonArray("instances").get(i).getAsJsonObject();d.inputs[i]=instance(i,v,instance(i,v,null));}var actor=make(Actor.class);actor.d=d;var levels=new SoundLevel[2];for(int i=0;i<2;i++){levels[i]=make(SoundLevel.class);levels[i].d=d;levels[i].id=i;}d.reset();d.all(); + for(var value:d.f.getAsJsonArray("ops")){var op=value.getAsJsonObject();var list=op.getAsJsonArray("list");ConsumeEffect effect;switch(n(op,"kind")){case 0->{var selected=new ArrayList<MobEffectInstance>();for(var v:list)selected.add(d.inputs[v.getAsInt()]);effect=new ApplyStatusEffectsConsumeEffect(selected,fl(op,"probability"));}case 1->{var selected=new ArrayList<Holder<MobEffect>>();for(var v:list)selected.add(effects.get(v.getAsInt()));effect=new RemoveStatusEffectsConsumeEffect(HolderSet.direct(selected));}case 2->effect=ClearAllStatusEffectsConsumeEffect.INSTANCE;case 3->effect=new PlaySoundConsumeEffect(Holder.direct(n(op,"sound")==0?SoundEvents.GENERIC_EAT.value():SoundEvents.PLAYER_BURP));default->throw new AssertionError();}try{out.println("result "+effect.apply(levels[n(op,"level")],ItemStack.EMPTY,actor));}catch(Stop e){out.println("result callback");}d.all();} + for(int i=0;i<2;i++)out.println("random "+i+" "+d.random[i].nextLong()+" "+d.random[i].nextLong()); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaContextualCollisionAudit.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaContextualCollisionAudit.java new file mode 100644 index 000000000..8a71a9b76 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaContextualCollisionAudit.java @@ -0,0 +1,64 @@ +package dev.horizonlab.parity; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.item.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.phys.shapes.*; +/** Verifies that the pinned cached families used by the contextual dispatcher + * return the exact cache object without reading world or context providers. */ +public final class VanillaContextualCollisionAudit { + static final class Query extends RuntimeException { Query(String name){super(name);} } + static class RejectContext implements CollisionContext { + public boolean isDescending(){throw new Query("descending");} + public boolean isAbove(VoxelShape s,BlockPos p,boolean d){throw new Query("above");} + public boolean isHoldingItem(Item i){throw new Query("item");} + public boolean alwaysCollideWithFluid(){throw new Query("fluid");} + public boolean canStandOnFluid(FluidState a,FluidState b){throw new Query("stand");} + public boolean isPlacement(){throw new Query("placement");} + public VoxelShape getCollisionShape(BlockState s,CollisionGetter w,BlockPos p){throw new Query("shape");} + } + static class RejectEntityContext extends EntityCollisionContext { + RejectEntityContext(){super(false,false,0.0,ItemStack.EMPTY,false,null);} + public boolean isDescending(){throw new Query("descending");} + public boolean isAbove(VoxelShape s,BlockPos p,boolean d){throw new Query("above");} + public boolean isHoldingItem(Item i){throw new Query("item");} + public boolean alwaysCollideWithFluid(){throw new Query("fluid");} + public boolean canStandOnFluid(FluidState a,FluidState b){throw new Query("stand");} + public boolean isPlacement(){throw new Query("placement");} + public Entity getEntity(){throw new Query("entity");} + public VoxelShape getCollisionShape(BlockState s,CollisionGetter w,BlockPos p){throw new Query("shape");} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var cache=BlockBehaviour.BlockStateBase.class.getDeclaredField("cache");cache.setAccessible(true); + var collision=cache.getType().getDeclaredField("collisionShape");collision.setAccessible(true); + var world=(BlockGetter)Proxy.newProxyInstance(BlockGetter.class.getClassLoader(),new Class<?>[]{BlockGetter.class},(p,m,v)->{throw new AssertionError("unexpected world read: "+m);}); + var contexts=new CollisionContext[]{new RejectContext(),new RejectEntityContext()}; + var positions=new BlockPos[]{BlockPos.ZERO,new BlockPos(17,-64,-33),new BlockPos(-17,320,33),new BlockPos(30000000,63,-30000000),new BlockPos(Integer.MIN_VALUE,Integer.MIN_VALUE,Integer.MIN_VALUE),new BlockPos(Integer.MAX_VALUE,Integer.MAX_VALUE,Integer.MAX_VALUE),new BlockPos(-1,-1,-1)}; + int independent=0,contextual=0,uncached=0; + try(var out=new PrintWriter(Files.newBufferedWriter(Path.of(args[1]).resolve(args[0]+"-audit.txt")))) { + for(var state:Block.BLOCK_STATE_REGISTRY) { + var c=cache.get(state);String label="uncached"; + if(c==null)uncached++; + else { + String expected=state.getBlock() instanceof LiquidBlock?"fluid":"independent"; + for(var p:positions)for(var context:contexts){ + String result; + try{var shape=state.getCollisionShape(world,p,context);if(shape!=collision.get(c))throw new AssertionError("different shape identity: "+state);result="independent";} + catch(Query query){result=query.getMessage();} + if(!result.equals(expected))throw new AssertionError(state+" unexpected query "+result); + } + label=expected;if(label.equals("independent"))independent++;else contextual++; + } + out.println("audit "+Block.getId(state)+" "+label+" "+state.hasLargeCollisionShape()+" "+state.is(Blocks.MOVING_PISTON)); + } + } + if(independent!=35492||contextual!=32||uncached!=199)throw new AssertionError("registry classification changed"); + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCoreOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCoreOracle.java new file mode 100644 index 000000000..a2e66cee7 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCoreOracle.java @@ -0,0 +1,161 @@ +package dev.horizonlab.parity; + +import java.io.BufferedReader; +import java.io.PrintWriter; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Arrays; +import java.util.StringTokenizer; +import net.minecraft.core.BlockPos; +import net.minecraft.core.IdMapper; +import net.minecraft.core.SectionPos; +import net.minecraft.util.RandomSource; +import net.minecraft.util.SimpleBitStorage; +import net.minecraft.world.level.ChunkPos; +import net.minecraft.world.level.chunk.Strategy; +import net.minecraft.world.level.levelgen.LegacyRandomSource; +import net.minecraft.world.level.levelgen.XoroshiroRandomSource; +import net.minecraft.world.level.levelgen.PositionalRandomFactory; +import net.minecraft.world.level.levelgen.RandomSupport; +import net.minecraft.util.Mth; + +/** Original test adapter. Calls downloaded vanilla classes, never reimplements them. */ +public final class VanillaCoreOracle { + private static final int[] BOUNDS = {1, 2, 3, 16, 31, 256, 65537, 1073741825, Integer.MAX_VALUE, 0, -1}; + private static final Strategy<Object> BLOCKS = Strategy.createForBlockStates(new IdMapper<>()); + + private static int integer(StringTokenizer args) { return Integer.parseInt(args.nextToken()); } + private static long longValue(StringTokenizer args) { return Long.parseLong(args.nextToken()); } + private static String utf16(String token) { + if(token.equals("-"))return ""; + char[] units=new char[token.length()/4];for(int i=0;i<units.length;i++)units[i]=(char)Integer.parseInt(token.substring(i*4,i*4+4),16); + return new String(units); + } + + private static void random(PrintWriter out, RandomSource rng, int count) { + for (int i = 0; i < count; i++) { + String value = switch (i % 10) { + case 0, 9 -> Integer.toString(rng.nextInt()); + case 1 -> Long.toString(rng.nextLong()); + case 2 -> { + try { yield Integer.toString(rng.nextInt(BOUNDS[(i / 10) % BOUNDS.length])); } + catch (IllegalArgumentException e) { yield "error"; } + } + case 3 -> rng.nextBoolean() ? "1" : "0"; + case 4 -> Integer.toUnsignedString(Float.floatToRawIntBits(rng.nextFloat())); + case 5 -> Long.toUnsignedString(Double.doubleToRawLongBits(rng.nextDouble())); + case 6 -> Long.toString(rng.fork().nextLong()); + case 7 -> { + rng.consumeCount(i % 7 - 2); + yield Long.toString(rng.nextLong()); + } + case 8 -> { + if (i % 101 == 8) rng.setSeed(rng.nextLong() - i); + yield Integer.toString(rng.nextInt(1073741825)); + } + default -> throw new AssertionError(); + }; + out.println("rng " + i + " " + value); + } + } + + private static void probe(String line, PrintWriter out) { + StringTokenizer args = new StringTokenizer(line); + switch (args.nextToken()) { + case "helpers" -> { + String kind=args.nextToken();long seed=longValue(args);int min=integer(args),max=integer(args); + double mean=Double.longBitsToDouble(Long.parseUnsignedLong(args.nextToken(),16)),deviation=Double.longBitsToDouble(Long.parseUnsignedLong(args.nextToken(),16)); + float smallMean=Float.intBitsToFloat(Integer.parseUnsignedInt(args.nextToken(),16)),smallDeviation=Float.intBitsToFloat(Integer.parseUnsignedInt(args.nextToken(),16)); + RandomSource source=kind.equals("legacy")?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + for(int i=0;i<32;i++) { + String inclusive,exclusive; + try { inclusive=Integer.toString(source.nextIntBetweenInclusive(min,max)); } catch(IllegalArgumentException e) { inclusive="error"; } + try { exclusive=Integer.toString(source.nextInt(min,max)); } catch(IllegalArgumentException e) { exclusive="error"; } + String d=Long.toUnsignedString(Double.doubleToLongBits(source.triangle(mean,deviation))); + String f=Integer.toUnsignedString(Float.floatToIntBits(source.triangle(smallMean,smallDeviation))); + out.printf("helpers %d %s %s %s %s %d%n",i,inclusive,exclusive,d,f,source.nextLong()); + } + random(out,source,24); + } + case "factory" -> { + String kind=args.nextToken();int mode=integer(args);long lo=longValue(args),hi=longValue(args); + BlockPos position=new BlockPos(integer(args),integer(args),integer(args));long seed=longValue(args);String name=utf16(args.nextToken());int count=integer(args); + RandomSource source=kind.equals("legacy")?new LegacyRandomSource(lo):new XoroshiroRandomSource(lo); + PositionalRandomFactory factory=mode!=0?source.forkPositional():kind.equals("legacy")?new LegacyRandomSource.LegacyPositionalRandomFactory(lo):new XoroshiroRandomSource.XoroshiroPositionalRandomFactory(lo,hi); + var hash=RandomSupport.seedFromHashOf(name);out.printf("seeds %d %d %d %d%n",Mth.getSeed(position),name.hashCode(),hash.seedLo(),hash.seedHi()); + out.println("factory at");random(out,factory.at(position),count);out.println("factory seed");random(out,factory.fromSeed(seed),count);out.println("factory hash");random(out,factory.fromHashOf(name),count); + if(mode!=0)out.println("parent "+source.nextLong()); + } + case "position" -> { + BlockPos p = new BlockPos(integer(args), integer(args), integer(args)); + BlockPos offset = p.offset(integer(args), integer(args), integer(args)); + long packed = p.asLong(); + BlockPos decoded = BlockPos.of(packed); + SectionPos section = SectionPos.of(p); + long sp = section.asLong(); + SectionPos sd = SectionPos.of(sp); + ChunkPos chunk = ChunkPos.containing(p); + long cp = chunk.pack(); + ChunkPos cd = ChunkPos.unpack(cp); + short relative = SectionPos.sectionRelativePos(p); + BlockPos rebuilt = section.relativeToBlockPos(relative); + out.printf("position %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d%n", + packed, decoded.getX(), decoded.getY(), decoded.getZ(), sp, sd.x(), sd.y(), sd.z(), + cp, cd.x(), cd.z(), chunk.getRegionX(), chunk.getRegionZ(), chunk.getRegionLocalX(), chunk.getRegionLocalZ(), + Short.toUnsignedInt(relative), BLOCKS.getIndex(p.getX() & 15, p.getY() & 15, p.getZ() & 15), + rebuilt.getX(), rebuilt.getY(), rebuilt.getZ(), offset.getX(), offset.getY(), offset.getZ()); + } + case "legacy" -> random(out, new LegacyRandomSource(longValue(args)), integer(args)); + case "xoroshiro" -> random(out, new XoroshiroRandomSource(longValue(args)), integer(args)); + case "xoroshiro_state" -> random(out, new XoroshiroRandomSource(longValue(args), longValue(args)), integer(args)); + case "storage" -> { + int bits = integer(args); + int len = integer(args); + long seed = longValue(args); + SimpleBitStorage storage = new SimpleBitStorage(bits, len); + RandomSource rng = new LegacyRandomSource(seed); + long mask = Math.min((1L << bits) - 1, Integer.MAX_VALUE); + for (int i = 0; i < len * 3; i++) { + int index = rng.nextInt(len); + int value = (int) (Integer.toUnsignedLong(rng.nextInt()) & mask); + int old = storage.getAndSet(index, value); + out.println("set " + i + " " + index + " " + Integer.toUnsignedString(old) + " " + Integer.toUnsignedString(storage.get(index))); + } + for (int i = 0; i < storage.getRaw().length; i++) out.println("word " + i + " " + storage.getRaw()[i]); + int[] unpacked = new int[len]; + storage.unpack(unpacked); + for (int i = 0; i < len; i++) out.println("value " + i + " " + unpacked[i]); + long[] words = new long[storage.getRaw().length]; + Arrays.fill(words, -1L); + SimpleBitStorage imported = new SimpleBitStorage(bits, len, words); + for (int i = 0; i < len; i++) out.println("import " + i + " " + imported.get(i)); + if (len > 0) imported.set(len - 1, 0); + for (int i = 0; i < words.length; i++) out.println("import_word " + i + " " + words[i]); + for (int value : new int[]{0, 1, (int) mask}) { + imported.fill(value); + for (int i = 0; i < words.length; i++) out.println("fill " + value + " " + i + " " + words[i]); + } + long[] before = storage.getRaw().clone(); + try { storage.set(len, 0); out.println("invalid_index 0"); } + catch (IllegalArgumentException e) { out.println("invalid_index 1"); } + if (len > 0) { + try { storage.set(0, bits == 32 ? -1 : 1 << bits); out.println("invalid_value 0"); } + catch (IllegalArgumentException e) { out.println("invalid_value 1"); } + } + out.println("unchanged " + (Arrays.equals(before, storage.getRaw()) ? "1" : "0")); + } + default -> throw new IllegalArgumentException("unknown operation"); + } + if (args.hasMoreTokens()) throw new IllegalArgumentException("unexpected trailing argument"); + } + + public static void main(String[] args) throws Exception { + try (BufferedReader input = Files.newBufferedReader(Path.of(args[0]), StandardCharsets.UTF_8); + PrintWriter out = new PrintWriter(Files.newBufferedWriter(Path.of(args[1]), StandardCharsets.UTF_8))) { + String line; + while ((line = input.readLine()) != null) probe(line, out); + if (out.checkError()) throw new IllegalStateException("oracle output failed"); + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCreativeTabsExporter.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCreativeTabsExporter.java new file mode 100644 index 000000000..407bcf0f0 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCreativeTabsExporter.java @@ -0,0 +1,59 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import net.minecraft.SharedConstants; +import net.minecraft.core.RegistryAccess; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.server.Bootstrap; +import net.minecraft.world.flag.FeatureFlags; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.CreativeModeTabs; + +/** + * Original exporter of the creative inventory tab contents built by vanilla's own + * CreativeModeTab display generators (built-in registries; tabs needing dynamic + * registries keep whatever they produced before failing). + */ +public final class VanillaCreativeTabsExporter { + public static void main(String[] args) throws Exception { + SharedConstants.tryDetectVersion(); + Bootstrap.bootStrap(); + // Display generators only need ItemStacks to exist: bind minimal components. + for (var item : BuiltInRegistries.ITEM) { + item.builtInRegistryHolder().bindComponents( + net.minecraft.core.component.DataComponentMap.builder() + .set(net.minecraft.core.component.DataComponents.MAX_STACK_SIZE, 64) + .build()); + } + var lookup = RegistryAccess.fromRegistryOfRegistries(BuiltInRegistries.REGISTRY); + var parameters = new CreativeModeTab.ItemDisplayParameters(FeatureFlags.DEFAULT_FLAGS, true, lookup); + var out = new JsonArray(); + for (CreativeModeTab tab : BuiltInRegistries.CREATIVE_MODE_TAB) { + var o = new JsonObject(); + var key = BuiltInRegistries.CREATIVE_MODE_TAB.getKey(tab); + o.addProperty("id", key == null ? "" : key.toString()); + o.addProperty("type", tab.getType().name()); + o.addProperty("row", tab.row().name()); + o.addProperty("column", tab.column()); + o.addProperty("title", tab.getDisplayName().getString()); + var items = new JsonArray(); + try { + tab.buildContents(parameters); + for (var stack : tab.getDisplayItems()) { + items.add(BuiltInRegistries.ITEM.getKey(stack.getItem()).toString()); + } + } catch (RuntimeException error) { + o.addProperty("error", error.toString()); + } + try { + o.addProperty("icon", BuiltInRegistries.ITEM.getKey(tab.getIconItem().getItem()).toString()); + } catch (RuntimeException ignored) { + } + o.add("items", items); + out.add(o); + } + Files.writeString(Path.of(args[0]), new Gson().toJson(out), StandardCharsets.UTF_8); + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java new file mode 100644 index 000000000..f06fb088f --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java @@ -0,0 +1,96 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import java.io.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.client.resources.model.cuboid.*; +import net.minecraft.client.resources.model.sprite.TextureSlots; +import net.minecraft.world.item.ItemDisplayContext; +import org.joml.Vector3fc; + +/** Original adapter around the pinned client parser. No model assets are embedded. */ +public final class VanillaCuboidModelOracle { + private static final Gson JSON = new GsonBuilder().serializeNulls().create(); + private static long bits(float value) { return Integer.toUnsignedLong(Float.floatToIntBits(value)); } + private static Object vector(Vector3fc value) { return new long[]{bits(value.x()), bits(value.y()), bits(value.z())}; } + private static String direction(net.minecraft.core.Direction value) { return value == null ? null : value.getName(); } + static Map<String, Object> map(Object... values) { + var result = new TreeMap<String, Object>(); + for (int i=0;i<values.length;i+=2) result.put((String)values[i], values[i+1]); + return result; + } + static Object transform(ItemTransform value) { + if (value == ItemTransform.NO_TRANSFORM) return "inherit"; + if (value == null) return null; + return map("rotation", vector(value.rotation()), "translation", vector(value.translation()), "scale", vector(value.scale())); + } + private static Object rotation(CuboidRotation value) { + if (value == null) return null; + Object angles = switch (value.value()) { + case CuboidRotation.SingleAxisRotation single -> map("axis", single.axis().getName(), "angle", bits(single.angle())); + case CuboidRotation.EulerXYZRotation euler -> new long[]{bits(euler.x()), bits(euler.y()), bits(euler.z())}; + default -> throw new AssertionError("Unexpected parsed rotation " + value.value().getClass()); + }; + return map("origin", vector(value.origin()), "value", angles, "rescale", value.rescale()); + } + private static Object face(CuboidFace value) { + if (value == null) return null; + var uv = value.uvs(); + return map("cull", direction(value.cullForDirection()), "tint", value.tintIndex(), "texture", value.texture(), + "rotation", value.rotation().ordinal(), "uv", uv == null ? null : new long[]{bits(uv.minU()), bits(uv.minV()), bits(uv.maxU()), bits(uv.maxV())}); + } + static Object element(CuboidModelElement value) { + if (value == null) return null; + var faces = new TreeMap<String, Object>(); + value.faces().forEach((key, f) -> faces.put(key.getName(), face(f))); + return map("from", vector(value.from()), "to", vector(value.to()), "faces", faces, + "rotation", rotation(value.rotation()), "shade", direction(value.shadeDirectionOverride()), "light", value.lightEmission()); + } + private static Object model(CuboidModel value) throws Exception { + if (value == null) return null; + var textures = new TreeMap<String, Object>(); + // Slot implementation records are package-private; inspect only their public accessors. + for (var entry : value.textureSlots().values().entrySet()) { + Object slot = entry.getValue(); + var cls = slot.getClass(); + if (cls.getSimpleName().equals("Reference")) { + var target = cls.getDeclaredMethod("target"); target.setAccessible(true); + textures.put(entry.getKey(), map("reference", target.invoke(slot))); + } else { + var method = cls.getDeclaredMethod("material"); method.setAccessible(true); + var material = (net.minecraft.client.resources.model.sprite.Material)method.invoke(slot); + textures.put(entry.getKey(), map("sprite", material.sprite().toString(), "translucent", material.forceTranslucent())); + } + } + List<Object> elements = null; + if (value.geometry() != null) { + elements = new ArrayList<>(); + for (var element : ((UnbakedCuboidGeometry)value.geometry()).elements()) elements.add(element(element)); + } + Object display = null; + if (value.transforms() != null) { + var transforms = new TreeMap<String, Object>(); + for (var context : ItemDisplayContext.values()) { + if (context != ItemDisplayContext.NONE) transforms.put(context.getSerializedName(), transform(value.transforms().getTransform(context))); + } + display = transforms; + } + return map("parent", value.parent() == null ? null : value.parent().toString(), "ao", value.ambientOcclusion(), + "gui", value.guiLight() == null ? null : value.guiLight().name().toLowerCase(Locale.ROOT), "textures", textures, "elements", elements, "display", display); + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion(); + try (var input=Files.newBufferedReader(Path.of(args[0])); var output=Files.newBufferedWriter(Path.of(args[1]))) { + for (String line; (line=input.readLine())!=null;) { + var row=JsonParser.parseString(line).getAsJsonArray(); + CuboidModel decoded; + try { decoded=CuboidModel.fromStream(new StringReader(row.get(1).getAsString())); } + catch (RuntimeException failure) { + output.write(JSON.toJson(map("name", row.get(0).getAsString(), "error", true))); output.newLine(); continue; + } + output.write(JSON.toJson(map("name", row.get(0).getAsString(), "model", model(decoded)))); output.newLine(); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageImmunityOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageImmunityOracle.java new file mode 100644 index 000000000..a70a289c5 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageImmunityOracle.java @@ -0,0 +1,35 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.lang.invoke.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.resources.*;import net.minecraft.tags.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.*;import net.minecraft.world.damagesource.*;import net.minecraft.world.item.*;import net.minecraft.world.level.gamerules.*;import net.minecraft.world.flag.FeatureFlagSet;import net.minecraft.server.level.*;import net.minecraft.server.network.ServerGamePacketListenerImpl; +/** Native immunity layers with empty equipment and controlled source/rule queries. */ +public final class VanillaDamageImmunityOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static final class Data {JsonObject f;PrintWriter out;int calls;boolean changed;Rules rules; + JsonObject state(){return f.getAsJsonObject(changed?"after":"initial");}boolean flag(String n){return state().get(n).getAsBoolean();}void event(String s){out.println(s);int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt())changed=true;}} + static final class Source extends DamageSource {Data d;Source(){super(null);} + @Override public boolean is(TagKey<DamageType> tag){String n=tag==DamageTypeTags.BYPASSES_INVULNERABILITY?"bypass":tag==DamageTypeTags.IS_FIRE?"fire":tag==DamageTypeTags.IS_FALL?"fall":tag==DamageTypeTags.IS_DROWNING?"drowning":tag==DamageTypeTags.IS_FREEZING?"freezing":null;if(n==null)throw new AssertionError();d.event("tag "+n);return d.flag(n);} + @Override public boolean is(ResourceKey<DamageType> k){if(k!=DamageTypes.ENDER_PEARL)throw new AssertionError();d.event("pearl");return d.flag("pearl");} + @Override public boolean isCreativePlayer(){d.event("creative");return d.flag("creative");}} + static final class Rules extends GameRules {Data d;Rules(){super(FeatureFlagSet.of());}@SuppressWarnings("unchecked") @Override public <T>T get(GameRule<T> rule){String n=rule==GameRules.DROWNING_DAMAGE?"drowning":rule==GameRules.FALL_DAMAGE?"fall":rule==GameRules.FIRE_DAMAGE?"fire":rule==GameRules.FREEZE_DAMAGE?"freeze":null;if(n==null)throw new AssertionError();d.event("rule "+n);return (T)Boolean.valueOf(d.flag("rule_"+n));}} + static final class Server extends ServerLevel {Data d;Server(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public GameRules getGameRules(){d.event("rules");return d.rules;}} + static final class Connection extends ServerGamePacketListenerImpl {Data d;Connection(){super(null,null,null,null);}@Override public boolean hasClientLoaded(){d.event("loaded");return d.flag("loaded");}} + static final class Human extends ServerPlayer {Data d;Human(){super(null,null,null,null);} + @Override public boolean isPermanentlyInvulnerable(){d.event("permanent");return d.flag("permanent");} + @Override public boolean isTemporarilyInvulnerable(){d.event("temporary");return d.flag("temporary");} + @Override public boolean fireImmune(){d.event("fire-immune");return d.flag("fire_immune");} + @Override public boolean is(TagKey<EntityType<?>> tag){if(tag!=EntityTypeTags.FALL_DAMAGE_IMMUNE)throw new AssertionError();d.event("fall-immune");return d.flag("fall_immune");} + @Override public ItemStack getItemBySlot(EquipmentSlot s){d.event("slot "+s.ordinal());return ItemStack.EMPTY;} + @Override public boolean isChangingDimension(){d.event("changing");return d.flag("changing");} + boolean base(DamageSource s){return super.isInvulnerableToBase(s);} + } + public static void main(String[] args)throws Throwable{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]);if(args[0].equals("export")){var slots=new JsonArray();for(var s:EquipmentSlot.VALUES)slots.add(s.ordinal());Files.writeString(dir.resolve("slots.json"),slots.toString());return;} + var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);var handles=new HashMap<String,MethodHandle>();for(var entry:Map.of("living",LivingEntity.class,"player",Player.class,"server",ServerPlayer.class).entrySet()){var type=entry.getValue();var lookup=MethodHandles.privateLookupIn(type,MethodHandles.lookup());handles.put(entry.getKey(),lookup.findSpecial(type,"isInvulnerableTo",MethodType.methodType(boolean.class,ServerLevel.class,DamageSource.class),type).asType(MethodType.methodType(boolean.class,Human.class,ServerLevel.class,DamageSource.class)));} + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.rules=make(Rules.class);d.rules.d=d;var actor=make(Human.class);actor.d=d;var connection=make(Connection.class);connection.d=d;actor.connection=connection;var level=make(Server.class);level.d=d;var source=make(Source.class);source.d=d;if(d.flag("removed"))field(Entity.class,"removalReason").set(actor,Entity.RemovalReason.DISCARDED); + try{String mode=d.f.get("mode").getAsString();boolean v=switch(mode){case "entity"->actor.isInvulnerable();case "base"->actor.base(source);default->(boolean)handles.get(mode).invokeExact(actor,(ServerLevel)level,(DamageSource)source);};out.println("bool "+v);out.println("result ok");}catch(Stop e){out.println("result error");}out.println("queries "+d.calls+" "+d.changed); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageReductionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageReductionOracle.java new file mode 100644 index 000000000..78c749562 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageReductionOracle.java @@ -0,0 +1,53 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.Holder;import net.minecraft.resources.Identifier;import net.minecraft.tags.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.ai.attributes.*;import net.minecraft.world.damagesource.*;import net.minecraft.world.effect.*;import net.minecraft.world.item.ItemStack;import net.minecraft.world.level.Level;import net.minecraft.server.level.*;import net.minecraft.stats.Stats; +/** Actual living armor/resistance/protection dispatch, with empty equipment. */ +public final class VanillaDamageReductionOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate;static Field amplifier; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static final class Data {JsonObject f;PrintWriter out;int calls;boolean changed;LivingEntity actor;Actor other;Human attacker;Server level; + JsonObject state(){return f.getAsJsonObject(changed?"after":"initial");} + void query(String s){out.println(s);int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt())changed=true;}} + static final class Source extends DamageSource {Data d;Source(){super(null);} + @Override public boolean is(TagKey<DamageType> tag){String n=tag==DamageTypeTags.BYPASSES_ARMOR?"armor":tag==DamageTypeTags.BYPASSES_EFFECTS?"effects":tag==DamageTypeTags.BYPASSES_RESISTANCE?"resistance":tag==DamageTypeTags.BYPASSES_ENCHANTMENTS?"enchantments":null;if(n==null)throw new AssertionError();d.query("bypass "+n);return d.state().get("bypass_"+n).getAsBoolean();} + @Override public ItemStack getWeaponItem(){d.query("weapon");return d.state().get("weapon").getAsBoolean()?ItemStack.EMPTY:null;} + @Override public Entity getEntity(){d.query("attacker");return switch(d.f.get("attacker").getAsInt()){case 0->null;case 1->d.other;case 2->d.attacker;default->throw new AssertionError();};}} + static final class Server extends ServerLevel {Server(){super(null,null,null,null,null,null,false,0L,List.of(),false);}} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Actor(){super(null,null);} + + Data d; + @Override public double getAttributeValue(Holder<Attribute> a){String k=a==Attributes.ARMOR?"armor":a==Attributes.ARMOR_TOUGHNESS?"toughness":null;if(k==null)throw new AssertionError();d.query(k);return number(d.state().get(k));} + @Override protected void hurtArmor(DamageSource s,float v){d.query("hurt-armor "+bits(v));} + @Override public boolean hasEffect(Holder<MobEffect> e){if(e!=MobEffects.RESISTANCE)throw new AssertionError();d.query("has-resistance");return d.state().get("resistance").getAsBoolean();} + @Override public MobEffectInstance getEffect(Holder<MobEffect> e){if(e!=MobEffects.RESISTANCE)throw new AssertionError();d.query("effect");var result=new MobEffectInstance(e,100,0);try{amplifier.setInt(result,d.state().get("amplifier").getAsInt());}catch(Exception ex){throw new AssertionError(ex);}return result;} + @Override public Level level(){d.query("level");return d.state().get("server").getAsBoolean()?d.level:null;} + @Override public ItemStack getItemBySlot(EquipmentSlot slot){d.query("slot "+slot.ordinal());return ItemStack.EMPTY;} + float armor(DamageSource s,float v){return super.getDamageAfterArmorAbsorb(s,v);} + float magic(DamageSource s,float v){return super.getDamageAfterMagicAbsorb(s,v);} + } + static final class Human extends ServerPlayer {Human(){super(null,null,null,null);} + + Data d; + @Override public double getAttributeValue(Holder<Attribute> a){String k=a==Attributes.ARMOR?"armor":a==Attributes.ARMOR_TOUGHNESS?"toughness":null;if(k==null)throw new AssertionError();d.query(k);return number(d.state().get(k));} + @Override protected void hurtArmor(DamageSource s,float v){d.query("hurt-armor "+bits(v));} + @Override public boolean hasEffect(Holder<MobEffect> e){if(e!=MobEffects.RESISTANCE)throw new AssertionError();d.query("has-resistance");return d.state().get("resistance").getAsBoolean();} + @Override public MobEffectInstance getEffect(Holder<MobEffect> e){if(e!=MobEffects.RESISTANCE)throw new AssertionError();d.query("effect");var result=new MobEffectInstance(e,100,0);try{amplifier.setInt(result,d.state().get("amplifier").getAsInt());}catch(Exception ex){throw new AssertionError(ex);}return result;} + @Override public ServerLevel level(){d.query("level");return d.state().get("server").getAsBoolean()?d.level:null;} + @Override public ItemStack getItemBySlot(EquipmentSlot slot){d.query("slot "+slot.ordinal());return ItemStack.EMPTY;} + float armor(DamageSource s,float v){return super.getDamageAfterArmorAbsorb(s,v);} + float magic(DamageSource s,float v){return super.getDamageAfterMagicAbsorb(s,v);} + + @Override public void awardStat(Identifier stat,int v){String n=stat==Stats.DAMAGE_RESISTED?"resisted":stat==Stats.DAMAGE_DEALT_RESISTED?"dealt-resisted":null;if(n==null)throw new AssertionError();d.query("stat "+(d.actor==this?"self":"attacker")+" "+n+" "+v);} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]);if(args[0].equals("export")){var slots=new JsonArray();for(var slot:EquipmentSlot.VALUES)slots.add(slot.ordinal());Files.writeString(dir.resolve("slots.json"),slots.toString());return;} + var u=Class.forName("sun.misc.Unsafe");var uf=u.getDeclaredField("theUnsafe");uf.setAccessible(true);unsafe=uf.get(null);allocate=u.getMethod("allocateInstance",Class.class);amplifier=MobEffectInstance.class.getDeclaredField("amplifier");amplifier.setAccessible(true);var level=make(Server.class); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;d.level=level;d.other=make(Actor.class);d.other.d=d;d.attacker=make(Human.class);d.attacker.d=d;var source=make(Source.class);source.d=d;boolean player=f.get("player").getAsBoolean();if(player){var actor=make(Human.class);actor.d=d;d.actor=actor;}else{var actor=make(Actor.class);actor.d=d;d.actor=actor;} + try{String mode=f.get("mode").getAsString();float damage=single(f.get("damage"));if(mode.equals("armor-value"))out.println("int "+d.actor.getArmorValue());else{float result=player?(mode.equals("armor")?((Human)d.actor).armor(source,damage):((Human)d.actor).magic(source,damage)):(mode.equals("armor")?((Actor)d.actor).armor(source,damage):((Actor)d.actor).magic(source,damage));out.println("float "+bits(result));}out.println("result ok");}catch(Stop e){out.println("result error");}out.println("queries "+d.calls); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageSourceOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageSourceOracle.java new file mode 100644 index 000000000..49558dd2a --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageSourceOracle.java @@ -0,0 +1,52 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import com.mojang.serialization.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.registries.*;import net.minecraft.resources.*;import net.minecraft.tags.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.*;import net.minecraft.world.damagesource.*;import net.minecraft.world.item.*;import net.minecraft.world.phys.Vec3; +/** Native decoded damage definitions, resolved tags and source query behavior. */ +public final class VanillaDamageSourceOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static Vec3 position(JsonElement v){var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static String vec(Vec3 v){return v==null?"none":String.format("%016x %016x %016x",Double.doubleToLongBits(v.x),Double.doubleToLongBits(v.y),Double.doubleToLongBits(v.z));} + static final class Data {JsonObject f;PrintWriter out;int calls;boolean changed;Entity[] entities; + JsonObject state(){return f.getAsJsonObject(changed?"after":"initial");}void event(String s){out.println(s);int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt())changed=true;} + int id(Entity e){for(int i=0;i<entities.length;i++)if(entities[i]==e)return i;throw new AssertionError();}} + static final class Source extends DamageSource {Data d; + Source(Holder<DamageType> t,Entity direct,Entity causing){super(t,direct,causing);}Source(Holder<DamageType> t,Entity entity){super(t,entity);}Source(Holder<DamageType> t,Vec3 p){super(t,p);}Source(Holder<DamageType> t){super(t);} + @Override public Entity getEntity(){d.event("entity");return d.f.get("virtual").getAsBoolean()?d.entities[d.state().get("virtual_entity").getAsInt()]:super.getEntity();} + Entity stored(){return super.getEntity();}} + static final class Other extends net.minecraft.world.entity.Marker {Other(){super(null,null);} +Data d;int id; + @Override public ItemStack getWeaponItem(){d.event("weapon "+id);return d.state().getAsJsonArray("weapons").get(id).getAsBoolean()?ItemStack.EMPTY:null;} + @Override public Vec3 position(){d.event("position "+id);return VanillaDamageSourceOracle.position(d.state().getAsJsonArray("positions").get(id));} + } + static final class Living extends net.minecraft.world.entity.decoration.ArmorStand {Living(){super(null,null);} +Data d;int id; + @Override public ItemStack getWeaponItem(){d.event("weapon "+id);return d.state().getAsJsonArray("weapons").get(id).getAsBoolean()?ItemStack.EMPTY:null;} + @Override public Vec3 position(){d.event("position "+id);return VanillaDamageSourceOracle.position(d.state().getAsJsonArray("positions").get(id));} + } + static final class Human extends Player {Human(){super(null,null);} +Data d;int id; + @Override public ItemStack getWeaponItem(){d.event("weapon "+id);return d.state().getAsJsonArray("weapons").get(id).getAsBoolean()?ItemStack.EMPTY:null;} + @Override public Vec3 position(){d.event("position "+id);return VanillaDamageSourceOracle.position(d.state().getAsJsonArray("positions").get(id));} + @Override public net.minecraft.world.level.GameType gameMode(){return net.minecraft.world.level.GameType.SURVIVAL;} + @Override public Abilities getAbilities(){d.event("abilities "+id);var a=new Abilities();a.instabuild=d.state().getAsJsonArray("creative").get(id).getAsBoolean();return a;} + } + static MappedRegistry<DamageType> registry(Path dir)throws Exception { + var registry=new MappedRegistry<DamageType>(Registries.DAMAGE_TYPE,Lifecycle.stable());var resources=JsonParser.parseString(Files.readString(dir.resolve("types.json"))).getAsJsonObject();for(var e:resources.entrySet())registry.register(ResourceKey.create(Registries.DAMAGE_TYPE,Identifier.parse(e.getKey())),DamageType.DIRECT_CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(e.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN);registry.bindAllTagsToEmpty();registry.freeze(); + var loader=new TagLoader<Holder<DamageType>>((id,required)->registry.get(id).map(v->(Holder<DamageType>)v),"tags/damage_type");var definitions=new HashMap<Identifier,List<TagLoader.EntryWithSource>>();for(var e:JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject().entrySet()){var file=TagFile.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(e.getValue().getAsString())).getOrThrow();var entries=new ArrayList<TagLoader.EntryWithSource>();for(var entry:file.entries())entries.add(new TagLoader.EntryWithSource(entry,"vanilla"));definitions.put(Identifier.parse(e.getKey()),entries);}var tags=new HashMap<TagKey<DamageType>,List<Holder<DamageType>>>();loader.build(definitions).forEach((id,values)->tags.put(TagKey.create(Registries.DAMAGE_TYPE,id),List.copyOf(values)));if(tags.size()!=definitions.size())throw new AssertionError("missing tags");registry.prepareTagReload(new TagLoader.LoadResult<>(Registries.DAMAGE_TYPE,tags)).apply();return registry; + } + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]);var registry=registry(dir);var names=new TreeSet<Identifier>(Comparator.comparing(Identifier::toString));names.addAll(registry.keySet());var tagNames=new TreeSet<String>();tagNames.addAll(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject().keySet()); + if(args[0].equals("export")){var root=new JsonObject();root.addProperty("data_version",net.minecraft.SharedConstants.getCurrentVersion().dataVersion().version());var types=new JsonArray();for(var id:names){var t=registry.getValue(id);var d=new JsonObject();d.addProperty("id",id.toString());d.addProperty("message_id",t.msgId());d.addProperty("exhaustion",bits(t.exhaustion()));d.addProperty("scaling",t.scaling().getSerializedName());d.addProperty("effects",t.effects().getSerializedName());d.addProperty("death_message_type",t.deathMessageType().getSerializedName());types.add(d);}root.add("types",types);Files.writeString(dir.resolve("catalog.json"),root.toString());return;} + var u=Class.forName("sun.misc.Unsafe");var uf=u.getDeclaredField("theUnsafe");uf.setAccessible(true);unsafe=uf.get(null);allocate=u.getMethod("allocateInstance",Class.class); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){ + for(var id:names){var holder=registry.get(id).orElseThrow();var source=new DamageSource(holder);var t=source.type();out.println("definition "+id+" "+source.getMsgId()+" "+bits(source.getFoodExhaustion())+" "+t.scaling().getSerializedName()+" "+t.effects().getSerializedName()+" "+t.deathMessageType().getSerializedName());for(var tag:tagNames)out.println("tag "+tag+" "+source.is(TagKey.create(Registries.DAMAGE_TYPE,Identifier.parse(tag))));} + for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;var other=make(Other.class);other.d=d;other.id=1;var living=make(Living.class);living.d=d;living.id=2;var a=make(Human.class);a.d=d;a.id=3;var b=make(Human.class);b.d=d;b.id=4;d.entities=new Entity[]{null,other,living,a,b};var f=d.f;var holder=registry.get(Identifier.parse(f.get("type").getAsString())).orElseThrow();int direct=f.get("direct").getAsInt(),causing=f.get("causing").getAsInt();var source=switch(f.get("constructor").getAsInt()){case 0->new Source(holder,d.entities[direct],d.entities[causing]);case 1->new Source(holder,d.entities[direct]);case 2->new Source(holder,position(f.get("position")));case 3->new Source(holder);default->throw new AssertionError();};source.d=d; + try{out.println("direct "+source.isDirect()+" "+d.id(source.getDirectEntity())+" "+d.id(source.stored()));out.println("scales "+source.scalesWithDifficulty());out.println("weapon-result "+(source.getWeaponItem()!=null));out.println("creative "+source.isCreativePlayer());out.println("position-result "+vec(source.getSourcePosition()));out.println("raw "+vec(source.sourcePositionRaw()));out.println("type "+source.is(ResourceKey.create(Registries.DAMAGE_TYPE,Identifier.parse(f.get("check_type").getAsString()))));out.println("result ok");}catch(Stop e){out.println("result error");}out.println("queries "+d.calls+" "+d.changed); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDecorationOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDecorationOracle.java new file mode 100644 index 000000000..2af6d7627 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDecorationOracle.java @@ -0,0 +1,102 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import java.util.function.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.feature.Feature; +import net.minecraft.world.level.levelgen.placement.*; +import net.minecraft.world.level.levelgen.structure.Structure; + +/** Actual chunk decoration, with structures disabled and traced feature sinks. */ +public final class VanillaDecorationOracle { + private static final class Stop extends RuntimeException {} + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + Path dir=Path.of(args[1]); + var contextMethod=VanillaPlacementOracle.class.getDeclaredMethod("context",JsonObject.class);contextMethod.setAccessible(true); + var settingsConstructor=BiomeGenerationSettings.class.getDeclaredConstructor(HolderSet.class,List.class);settingsConstructor.setAccessible(true); + var getter=ChunkGenerator.class.getDeclaredField("generationSettingsGetter");getter.setAccessible(true); + var stepsField=ChunkGenerator.class.getDeclaredField("featuresPerStep");stepsField.setAccessible(true); + var possibleField=BiomeSource.class.getDeclaredField("possibleBiomes");possibleField.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();int min=f.get("min").getAsInt(),height=f.get("height").getAsInt(); + int biomeCount=f.getAsJsonArray("biomes").size(),featureCount=f.getAsJsonArray("placements").size(); + var holders=new ArrayList<Holder<Biome>>();var ids=new IdMapper<Holder<Biome>>(); + for(int i=0;i<=biomeCount;i++){var holder=Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},ResourceKey.create(Registries.BIOME,Identifier.parse("horizon:b"+i)));holders.add(holder);ids.add(holder);} + var bounds=new JsonObject();bounds.add("context",JsonParser.parseString("[-64,384,63]")); + var generator=((PlacementContext)contextMethod.invoke(null,bounds)).generator(); + var placed=new MappedRegistry<PlacedFeature>(Registries.PLACED_FEATURE,Lifecycle.stable()); + var structures=new MappedRegistry<Structure>(Registries.STRUCTURE,Lifecycle.stable());structures.freeze(); + int[] calls={0},queries={0},notifications={0},chunksRead={0}; + var features=new ArrayList<PlacedFeature>(); + for(int i=0;i<featureCount;i++) { + final int id=i; + var leaf=new Feature(){ + public MapCodec<? extends Feature> codec(){return MapCodec.unit(this);} + public boolean place(WorldGenLevel w,ChunkGenerator g,RandomSource r,BlockPos p){ + out.println("feature "+id+" "+p.getX()+" "+p.getY()+" "+p.getZ()); + out.println("draw "+r.nextLong()+" "+r.nextInt(17)+" "+Integer.toHexString(Float.floatToRawIntBits(r.nextFloat()))+" "+Long.toHexString(Double.doubleToRawLongBits(r.nextDouble()))); + if(calls[0]++==f.get("feature_fail").getAsInt())throw new Stop(); + return f.get("return_mode").getAsInt()==0||(f.get("return_mode").getAsInt()==2&&id%2==0); + } + }; + var modifiers=new ArrayList<PlacementModifier>();for(var value:f.getAsJsonArray("placements").get(i).getAsJsonArray())modifiers.add(PlacementModifier.CODEC.parse(JsonOps.INSTANCE,value).getOrThrow()); + var root=new PlacedFeature(Holder.direct(leaf),modifiers);features.add(root); + placed.register(ResourceKey.create(Registries.PLACED_FEATURE,Identifier.parse("horizon:f"+i)),root,RegistrationInfo.BUILT_IN); + } + placed.freeze(); + var settings=new ArrayList<BiomeGenerationSettings>(); + for(var value:f.getAsJsonArray("biomes")) { + var steps=new ArrayList<HolderSet<PlacedFeature>>(); + for(var step:value.getAsJsonArray()){var roots=new ArrayList<Holder<PlacedFeature>>();for(var root:step.getAsJsonArray())roots.add(Holder.direct(features.get(root.getAsInt())));steps.add(HolderSet.direct(roots));} + settings.add(settingsConstructor.newInstance(HolderSet.direct(List.of()),steps)); + } + settings.add(settingsConstructor.newInstance(HolderSet.direct(List.of()),List.of())); + Function<Holder<Biome>,BiomeGenerationSettings> settingsGetter=biome->settings.get(ids.getId(biome));getter.set(generator,settingsGetter); + var possible=new LinkedHashSet<Holder<Biome>>(holders.subList(0,biomeCount));possibleField.set(generator.getBiomeSource(),(Supplier<Set<Holder<Biome>>>)(()->possible)); + List<FeatureSorter.StepFeatureData> sorted; + try {sorted=FeatureSorter.buildFeaturesPerStep(new ArrayList<>(possible),b->settingsGetter.apply(b).features(),true);} + catch(IllegalStateException error){out.println("plan error");continue;} + stepsField.set(generator,(Supplier<List<FeatureSorter.StepFeatureData>>)(()->sorted));out.println("plan ok"); + var factory=new PalettedContainerFactory(Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY),Blocks.AIR.defaultBlockState(),null,Strategy.createForBiomes(ids),holders.get(biomeCount),null); + var cp=new ChunkPos(f.get("cx").getAsInt(),f.get("cz").getAsInt());var chunks=new HashMap<ChunkPos,ProtoChunk>(); + var palettes=f.getAsJsonArray("palettes");int ordinal=0; + for(int dz=-1;dz<=1;dz++)for(int dx=-1;dx<=1;dx++) { + var pos=new ChunkPos(cp.x()+dx,cp.z()+dz);var chunk=new ProtoChunk(pos,UpgradeData.EMPTY,LevelHeightAccessor.create(min,height),factory,null); + final var values=palettes.get(ordinal++).getAsJsonArray(); + chunk.fillBiomesFromNoise((x,y,z)->holders.get(values.get(Math.floorMod((y-(min>>2))*16+(z&3)*4+(x&3),values.size())).getAsInt()));chunks.put(pos,chunk); + } + var access=new RegistryAccess.ImmutableRegistryAccess(List.of(structures,placed)).freeze(); + var world=(WorldGenLevel)Proxy.newProxyInstance(WorldGenLevel.class.getClassLoader(),new Class<?>[]{WorldGenLevel.class},(proxy,method,values)->switch(method.getName()) { + case "getMinY"->min;case "getHeight"->height;case "getSeaLevel"->63; + case "getMinSectionY"->InvocationHandler.invokeDefault(proxy,method,values); + case "getSeed"->f.get("seed").getAsLong();case "registryAccess"->access; + case "getChunk"->{int x=(Integer)values[0],z=(Integer)values[1];out.println("chunk "+x+" "+z);if(chunksRead[0]++==f.get("chunk_fail").getAsInt())throw new Stop();var chunk=chunks.get(new ChunkPos(x,z));if(chunk==null)throw new AssertionError("missing chunk");yield chunk;} + case "setCurrentlyGenerating"->{String label=values[0]==null?"none":((Supplier<?>)values[0]).get().toString();out.println("generating "+label);if(notifications[0]++==f.get("notify_fail").getAsInt())throw new Stop();yield null;} + case "getBiome"->{var p=(BlockPos)values[0];int id=Math.floorMod(p.getX()*31+p.getY()*7+p.getZ()*17+f.get("biome_offset").getAsInt(),biomeCount+1);out.println("biome "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+id);if(queries[0]++==f.get("query_fail").getAsInt())throw new Stop();yield holders.get(id);} + default->throw new AssertionError(method); + }); + var manager=new StructureManager(world,new WorldOptions(f.get("seed").getAsLong(),false,false),null); + for(int repeat=0;repeat<2;repeat++) { + calls[0]=queries[0]=notifications[0]=chunksRead[0]=0; + try {generator.applyBiomeDecoration(world,chunks.get(cp),manager);out.println("decorate ok");} + catch(Stop|net.minecraft.ReportedException error){out.println("decorate error");} + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDecorationRegionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDecorationRegionOracle.java new file mode 100644 index 000000000..093d6eeed --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDecorationRegionOracle.java @@ -0,0 +1,125 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import java.util.function.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.feature.Feature; +import net.minecraft.world.level.levelgen.placement.*; +import net.minecraft.world.level.levelgen.structure.Structure; + +/** Actual chunk decoration, with structures disabled and resident block-writing features. */ +public final class VanillaDecorationRegionOracle { + private static final class Stop extends RuntimeException {} + @SuppressWarnings("unchecked") + public static void main(String[] args) throws Exception { + if(args[0].equals("export")){VanillaHeightmapOracle.main(args);return;} + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + Path dir=Path.of(args[1]); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject()); + var contextMethod=VanillaPlacementOracle.class.getDeclaredMethod("context",JsonObject.class);contextMethod.setAccessible(true); + var settingsConstructor=BiomeGenerationSettings.class.getDeclaredConstructor(HolderSet.class,List.class);settingsConstructor.setAccessible(true); + var getter=ChunkGenerator.class.getDeclaredField("generationSettingsGetter");getter.setAccessible(true); + var stepsField=ChunkGenerator.class.getDeclaredField("featuresPerStep");stepsField.setAccessible(true); + var possibleField=BiomeSource.class.getDeclaredField("possibleBiomes");possibleField.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();int min=f.get("min").getAsInt(),height=f.get("height").getAsInt(); + int biomeCount=f.getAsJsonArray("biomes").size(),featureCount=f.getAsJsonArray("placements").size(); + var holders=new ArrayList<Holder<Biome>>();var ids=new IdMapper<Holder<Biome>>(); + for(int i=0;i<=biomeCount;i++){var holder=Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},ResourceKey.create(Registries.BIOME,Identifier.parse("horizon:b"+i)));holders.add(holder);ids.add(holder);} + var biomeLookup=new HolderGetter<Biome>() { + public Optional<Holder.Reference<Biome>> get(ResourceKey<Biome> key) { + return holders.stream().filter(h->h.unwrapKey().orElseThrow().equals(key)).map(h->(Holder.Reference<Biome>)h).findFirst(); + } + public Optional<HolderSet.Named<Biome>> get(net.minecraft.tags.TagKey<Biome> key) {return Optional.empty();} + }; + var ops=RegistryOps.create(JsonOps.INSTANCE,new RegistryOps.RegistryInfoLookup(){public <T> Optional<HolderGetter<T>> lookup(ResourceKey<? extends Registry<? extends T>> key){ + return key.equals(Registries.BIOME)?(Optional<HolderGetter<T>>)(Optional<?>)Optional.of(biomeLookup):Optional.empty(); + }}); + var bounds=new JsonObject();bounds.add("context",JsonParser.parseString("[-64,384,63]")); + var generator=((PlacementContext)contextMethod.invoke(null,bounds)).generator(); + var placed=new MappedRegistry<PlacedFeature>(Registries.PLACED_FEATURE,Lifecycle.stable()); + var structures=new MappedRegistry<Structure>(Registries.STRUCTURE,Lifecycle.stable());structures.freeze(); + int[] calls={0},queries={0},notifications={0},chunksRead={0}; + var features=new ArrayList<PlacedFeature>(); + for(int i=0;i<featureCount;i++) { + final int id=i; + var leaf=Feature.DIRECT_CODEC.parse(JsonOps.INSTANCE,f.getAsJsonArray("features").get(i)).getOrThrow(); + var modifiers=new ArrayList<PlacementModifier>();for(var value:f.getAsJsonArray("placements").get(i).getAsJsonArray())modifiers.add(PlacementModifier.CODEC.parse(ops,value).getOrThrow()); + var root=new PlacedFeature(Holder.direct(leaf),modifiers);features.add(root); + placed.register(ResourceKey.create(Registries.PLACED_FEATURE,Identifier.parse("horizon:f"+i)),root,RegistrationInfo.BUILT_IN); + } + placed.freeze(); + var settings=new ArrayList<BiomeGenerationSettings>(); + for(var value:f.getAsJsonArray("biomes")) { + var steps=new ArrayList<HolderSet<PlacedFeature>>(); + for(var step:value.getAsJsonArray()){var roots=new ArrayList<Holder<PlacedFeature>>();for(var root:step.getAsJsonArray())roots.add(Holder.direct(features.get(root.getAsInt())));steps.add(HolderSet.direct(roots));} + settings.add(settingsConstructor.newInstance(HolderSet.direct(List.of()),steps)); + } + settings.add(settingsConstructor.newInstance(HolderSet.direct(List.of()),List.of())); + Function<Holder<Biome>,BiomeGenerationSettings> settingsGetter=biome->settings.get(ids.getId(biome));getter.set(generator,settingsGetter); + var possible=new LinkedHashSet<Holder<Biome>>(holders.subList(0,biomeCount));possibleField.set(generator.getBiomeSource(),(Supplier<Set<Holder<Biome>>>)(()->possible)); + List<FeatureSorter.StepFeatureData> sorted; + try {sorted=FeatureSorter.buildFeaturesPerStep(new ArrayList<>(possible),b->settingsGetter.apply(b).features(),true);} + catch(IllegalStateException error){out.println("plan error");continue;} + stepsField.set(generator,(Supplier<List<FeatureSorter.StepFeatureData>>)(()->sorted));out.println("plan ok"); + var factory=new PalettedContainerFactory(Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY),Blocks.AIR.defaultBlockState(),null,Strategy.createForBiomes(ids),holders.get(biomeCount),null); + var cp=new ChunkPos(f.get("cx").getAsInt(),f.get("cz").getAsInt());var chunks=new TreeMap<ChunkPos,ProtoChunk>(Comparator.<ChunkPos>comparingInt(p->p.x()).thenComparingInt(p->p.z())); + var palettes=f.getAsJsonArray("palettes");int ordinal=0; + for(int dz=-1;dz<=1;dz++)for(int dx=-1;dx<=1;dx++) { + var pos=new ChunkPos(cp.x()+dx,cp.z()+dz);var chunk=new ProtoChunk(pos,UpgradeData.EMPTY,LevelHeightAccessor.create(min,height),factory,null); + chunk.setPersistedStatus(switch(f.get("stage").getAsString()){case "terrain"->net.minecraft.world.level.chunk.status.ChunkStatus.TERRAIN;case "biomes"->net.minecraft.world.level.chunk.status.ChunkStatus.BIOMES;default->net.minecraft.world.level.chunk.status.ChunkStatus.EMPTY;}); + for(int x=0;x<16;x++)for(int z=0;z<16;z++) { + chunk.setBlockState(new BlockPos((pos.x()<<4)+x,-56,(pos.z()<<4)+z),Blocks.STONE.defaultBlockState(),3); + if((x+z)%3!=0)chunk.setBlockState(new BlockPos((pos.x()<<4)+x,-48,(pos.z()<<4)+z),Blocks.DIRT.defaultBlockState(),3); + } + final var values=palettes.get(ordinal++).getAsJsonArray(); + chunk.fillBiomesFromNoise((x,y,z)->holders.get(values.get(Math.floorMod((y-(min>>2))*16+(z&3)*4+(x&3),values.size())).getAsInt()));chunks.put(pos,chunk); + } + var zoom=new BiomeManager((x,y,z)->{var chunk=chunks.get(new ChunkPos(x>>2,z>>2));if(chunk==null)throw new Stop();return chunk.getNoiseBiome(x,y,z);},BiomeManager.obfuscateSeed(f.get("seed").getAsLong())); + var access=new RegistryAccess.ImmutableRegistryAccess(List.of(structures,placed)).freeze(); + var world=(WorldGenLevel)Proxy.newProxyInstance(WorldGenLevel.class.getClassLoader(),new Class<?>[]{WorldGenLevel.class},(proxy,method,values)->switch(method.getName()) { + case "getMinY"->min;case "getSeaLevel"->63; + case "getHeight"->{if(values==null||values.length==0)yield height;var kind=(Heightmap.Types)values[0];int x=(Integer)values[1],z=(Integer)values[2];var chunk=chunks.get(new ChunkPos(x>>4,z>>4));if(chunk==null)throw new Stop();yield chunk.getHeight(kind,x&15,z&15)+1;} + case "getMaxY","isInsideBuildHeight","isOutsideBuildHeight","setBlockAndUpdate"->InvocationHandler.invokeDefault(proxy,method,values); + case "getBlockState"->{var p=(BlockPos)values[0];var chunk=chunks.get(new ChunkPos(p.getX()>>4,p.getZ()>>4));if(chunk==null)throw new Stop();yield chunk.getBlockState(p);} + case "setBlock"->{var p=(BlockPos)values[0];var state=(net.minecraft.world.level.block.state.BlockState)values[1];int flags=(Integer)values[2];out.println("write "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+Block.getId(state)+" "+flags);int call=calls[0]++;if(call==f.get("write_fail").getAsInt())throw new Stop();int reject=f.get("reject").getAsInt();boolean result=reject==0||call%reject!=0;if(result){var chunk=chunks.get(new ChunkPos(p.getX()>>4,p.getZ()>>4));if(chunk==null)throw new Stop();chunk.setBlockState(p,state,flags);}out.println("written "+result);yield result;} + case "getMinSectionY"->InvocationHandler.invokeDefault(proxy,method,values); + case "getSeed"->f.get("seed").getAsLong();case "registryAccess"->access; + case "getChunk"->{int x=(Integer)values[0],z=(Integer)values[1];out.println("chunk "+x+" "+z);if(chunksRead[0]++==f.get("chunk_fail").getAsInt())throw new Stop();var chunk=chunks.get(new ChunkPos(x,z));if(chunk==null)throw new AssertionError("missing chunk");yield chunk;} + case "setCurrentlyGenerating"->{String label=values[0]==null?"none":((Supplier<?>)values[0]).get().toString();out.println("generating "+label);if(notifications[0]++==f.get("notify_fail").getAsInt())throw new Stop();yield null;} + case "getBiome"->{var p=(BlockPos)values[0];var biome=zoom.getBiome(p);out.println("biome "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+ids.getId(biome));yield biome;} + default->throw new AssertionError(method); + }); + var manager=new StructureManager(world,new WorldOptions(f.get("seed").getAsLong(),false,false),null); + for(int repeat=0;repeat<2;repeat++) { + calls[0]=queries[0]=notifications[0]=chunksRead[0]=0; + try {generator.applyBiomeDecoration(world,chunks.get(cp),manager);out.println("decorate ok");} + catch(Stop|net.minecraft.ReportedException error){out.println("decorate error");} + for(int[] p:new int[][]{{0,0},{15,15},{16,16},{-1,-1}})for(var kind:Heightmap.Types.values())out.println("height "+kind.name()+" "+p[0]+" "+p[1]+" "+(chunks.get(new ChunkPos(p[0]>>4,p[1]>>4)).getHeight(kind,p[0]&15,p[1]&15)+1)); + } + for(var entry:chunks.entrySet()) { + var pos=entry.getKey();var chunk=entry.getValue();out.println("stored "+pos.x()+" "+pos.z()); + for(var kind:Heightmap.Types.values()) { + if(chunk.hasPrimedHeightmap(kind)){out.println("map "+kind.name());for(long word:chunk.getOrCreateHeightmapUnprimed(kind).getRawData())out.println(Long.toUnsignedString(word,16));} + else out.println("missing "+kind.name()); + } + for(int i=0;i<height/16;i++){out.println("section "+i);var section=chunk.getSection(i);for(int y=0;y<16;y++)for(int z=0;z<16;z++)for(int x=0;x<16;x++)out.println(Block.getId(section.getBlockState(x,y,z)));} + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDensityOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDensityOracle.java new file mode 100644 index 000000000..15eb4c424 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDensityOracle.java @@ -0,0 +1,471 @@ +package dev.horizonlab.parity; + +import java.io.PrintWriter; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.StringTokenizer; +import net.minecraft.core.Direction.Axis; +import net.minecraft.util.RandomSource; +import net.minecraft.util.Interval; +import net.minecraft.util.CubicSpline; +import net.minecraft.world.level.levelgen.LegacyRandomSource; +import net.minecraft.world.level.levelgen.Beardifier; +import net.minecraft.world.level.levelgen.blending.Blender; +import net.minecraft.util.context.ContextMap; +import net.minecraft.world.level.levelgen.XoroshiroRandomSource; +import net.minecraft.world.level.levelgen.densityfunction.*; +import net.minecraft.world.level.levelgen.densityfunction.generator.*; +import net.minecraft.world.level.levelgen.synth.*; +import net.minecraft.world.level.levelgen.densityfunction.op.*; + +/** Original transport: all density arithmetic is evaluated by vanilla classes. */ +public final class VanillaDensityOracle { + private static int integer(StringTokenizer args) { return Integer.parseInt(args.nextToken()); } + private static double number(StringTokenizer args) { return Double.longBitsToDouble(Long.parseUnsignedLong(args.nextToken(),16)); } + private static float small(StringTokenizer args) { return Float.intBitsToFloat(Integer.parseUnsignedInt(args.nextToken(),16)); } + private static String bits(float value) { return Integer.toUnsignedString(Float.floatToIntBits(value)); } + private static DensitySampler construct(String nested,Class<?>[] types,Object... arguments) throws Exception { + var constructor=Class.forName("net.minecraft.world.level.levelgen.densityfunction.op."+nested).getDeclaredConstructor(types); + constructor.setAccessible(true);return (DensitySampler)constructor.newInstance(arguments); + } + private static void intervalOutput(PrintWriter out,String name,java.util.function.Supplier<Interval> compute) { + try { var result=compute.get();out.printf("bounds %s %s %s %d %d%n",name,bits(result.min()),bits(result.max()),result.isNaI()?1:0,result.hashCode()); } + catch(IllegalArgumentException | IllegalStateException e) { out.println("bounds "+name+" error"); } + } + private static void fbmProbe(RandomSource random,int octave,double smear,double amplitude,PrintWriter out) throws Exception { + NoiseStack stack; + try { stack=BlendedNoise.createFbm(random,octave,smear,amplitude); } + catch(IllegalArgumentException e) { out.println("fbm error");out.println("fbm-parent "+random.nextLong());return; } + var layersField=NoiseStack.class.getDeclaredField("layers");layersField.setAccessible(true);Object[] layers=(Object[])layersField.get(stack); + out.printf("fbm %d %s %s%n",layers.length,bits(stack.range().min()),bits(stack.range().max())); + for(int i=0;i<layers.length;i++) { + var frequency=layers[i].getClass().getDeclaredField("frequency");var gain=layers[i].getClass().getDeclaredField("amplitude");frequency.setAccessible(true);gain.setAccessible(true); + out.printf("fbm-layer %s %s %s%n",Long.toUnsignedString(Double.doubleToLongBits(frequency.getDouble(layers[i]))),bits(gain.getFloat(layers[i])),bits(stack.getLayer(i).get(-17.25,64.125,32.5))); + } + double[][] points={{0,0,0},{-17.25,64.125,32.5},{3e7,-64,-3e7},{Double.POSITIVE_INFINITY,Double.POSITIVE_INFINITY,Double.POSITIVE_INFINITY}}; + for(var point:points)out.printf("fbm-query %s %s%n",bits(stack.get(point[0],point[2])),bits(stack.get(point[0],point[1],point[2]))); + var volume=new DensityVolume(2,5,2,-17,-64,32,4,1,4);var buffer=DensityBuffer.createUnpooled(volume.size()+2); + for(int i=0;i<buffer.size();i++)buffer.set(i,(i-10.0f)*.125f); + stack.addToVolume(buffer,volume,.125,.25,-.5f); + for(int i=0;i<buffer.size();i++)out.println("fbm-cell "+bits(buffer.get(i))); + out.println("fbm-parent "+random.nextLong()); + } + private static DensityFunction.CompileContext shiftContext(Noise noise) { + return new DensityFunction.CompileContext() { + public Noise createNoiseSampler(net.minecraft.core.Holder<NormalNoise> holder) { return noise; } + public RandomSource createRandom(net.minecraft.resources.Identifier id) { throw new AssertionError("unexpected random lookup"); } + public RandomSource createEndIslandRandom() { throw new AssertionError("unexpected end lookup"); } + }; + } + private static Interval[] splineRanges = {Interval.INFINITE,Interval.INFINITE,Interval.INFINITE}; + private static final class TransportFunction implements DensityFunction { + private final DensitySampler sampler; + private final int id; + TransportFunction(int id,DensitySampler sampler) { this.id=id;this.sampler=sampler; } + public DensitySampler compileSampler(DensityFunction.CompileContext context) { return sampler; } + public DensityFunction rewriteChildren(DfRewriteRule rule) { return this; } + public Interval range() { return splineRanges[id % 3]; } + public int domainAxes() { return 7; } + public com.mojang.serialization.MapCodec<? extends DensityFunction> codec() { throw new AssertionError("unexpected codec lookup"); } + } + private static final class BoundFunction implements DensityFunction { + private final DensitySampler sampler; + private final Interval range; + private final int axes; + BoundFunction(DensitySampler sampler,Interval range,int axes){this.sampler=sampler;this.range=range;this.axes=axes;} + public DensitySampler compileSampler(DensityFunction.CompileContext context){return sampler;} + public DensityFunction rewriteChildren(DfRewriteRule rule){return this;} + public Interval range(){return range;} + public int domainAxes(){return axes;} + public com.mojang.serialization.MapCodec<? extends DensityFunction> codec(){throw new AssertionError("unexpected codec lookup");} + } + private static int cacheCount(DensityFunctionCompiler compiler) throws Exception { + var field=DensityFunctionCompiler.class.getDeclaredField("nextCacheId");field.setAccessible(true);return field.getInt(compiler); + } + // The concrete structure key has an erased DensitySampler runtime contract. + // Widen it solely to attach transport samplers that expose delegation calls. + @SuppressWarnings("unchecked") + private static net.minecraft.util.context.ContextKey<DensitySampler> structureKey() { + return (net.minecraft.util.context.ContextKey<DensitySampler>)(net.minecraft.util.context.ContextKey<?>)Beardifier.CONTEXT_KEY; + } + public static void main(String[] paths) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion(); + net.minecraft.server.Bootstrap.bootStrap(); + var samplers=new ArrayList<DensitySampler>(); + var noises=new ArrayList<NoiseFunction.Sampler>(); + var splines=new ArrayList<CubicSpline<SplineFunction.Coordinate>>(); + var functions=new java.util.HashMap<Integer,DensityFunction>(); + var context=SamplerContext.EMPTY_UNCACHED; + var counters=new ArrayList<long[]>(); + var graph=new ArrayList<DensityFunction>(); + var graphFunctions=new net.minecraft.core.MappedRegistry<DensityFunction>(net.minecraft.core.registries.Registries.DENSITY_FUNCTION,com.mojang.serialization.Lifecycle.stable()); + var namedFunctions=new java.util.HashMap<String,net.minecraft.core.Holder<DensityFunction>>(); + var graphSplines=new ArrayList<CubicSpline<SplineFunction.Coordinate>>(); + var graphNoises=new ArrayList<net.minecraft.core.Holder<NormalNoise>>(); + var graphContext=shiftContext(null); + net.minecraft.core.MappedRegistry<NormalNoise> graphRegistry=null; + long graphWorldSeed=0;boolean graphLegacy=false; + var graphCompiler=new DensityFunctionCompiler(shiftContext(null)); + try(var reader=Files.newBufferedReader(Path.of(paths[0]),StandardCharsets.UTF_8); + var out=new PrintWriter(Files.newBufferedWriter(Path.of(paths[1]),StandardCharsets.UTF_8))) { + String line; + while((line=reader.readLine())!=null) { + var args=new StringTokenizer(line); + switch(args.nextToken()) { + case "constant" -> { samplers.add(new ConstantFunction.Sampler(small(args)));out.println("create "+(samplers.size()-1)); } + case "gradient" -> { + var axis=Axis.values()[integer(args)];var tiling=TilingMode.values()[integer(args)]; + int from=integer(args),to=integer(args);float low=small(args),high=small(args); + samplers.add(new GradientFunction(axis,tiling,from,to,low,high).compileSampler(null)); + out.println("create "+(samplers.size()-1)); + } + case "noise" -> { + String kind=args.nextToken(),stream=args.nextToken();long seed=Long.parseLong(args.nextToken());double scale=number(args); + RandomSource random=stream.equals("legacy")?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + Noise noise=switch(kind) { case "normal"->NormalNoise.builder().setBaseOctave(-7).setOctaveCount(4).build().create(random);case "perlin"->new PerlinNoise(random);case "simplex"->new SimplexNoise(random);case "smeared"->new SmearedPerlinNoise(random,scale);default->throw new AssertionError(); }; + var sampler=new NoiseFunction.Sampler(noise,number(args),number(args));noises.add(sampler);samplers.add(sampler); + out.printf("noise %d %d%n",noises.size()-1,samplers.size()-1); + } + case "shift" -> { + var noise=noises.get(integer(args));int x=integer(args),y=integer(args),z=integer(args); + samplers.add(y<0?new NoiseFunction.ShiftedXzSampler(samplers.get(x),samplers.get(z),noise.noise(),noise.xzScale(),noise.yScale()):new NoiseFunction.ShiftedXyzSampler(samplers.get(x),samplers.get(y),samplers.get(z),noise.noise(),noise.xzScale(),noise.yScale())); + out.println("create "+(samplers.size()-1)); + } + case "unary" -> { + String kind=args.nextToken();var input=samplers.get(integer(args));float a=small(args),b=small(args); + DensitySampler result=switch(kind) { + case "abs" -> new UnaryFunction.AbsSampler(input); + case "negate" -> new UnaryFunction.NegateSampler(input); + case "square" -> new UnaryFunction.SquareSampler(input); + case "cube" -> new UnaryFunction.CubeSampler(input); + case "sqrt" -> new UnaryFunction.SqrtSampler(input); + case "log" -> new UnaryFunction.LogSampler(input); + case "reciprocal" -> new UnaryFunction.ReciprocalSampler(input); + case "sign" -> new UnaryFunction.SignSampler(input); + case "squeeze" -> new UnaryFunction.SqueezeSampler(input); + case "leaky" -> new UnaryFunction.LeakyReLUSampler(input,a); + case "add" -> new BinaryFunction.ConstAddSampler(input,a); + case "sub" -> new BinaryFunction.ConstSubSampler(a,input); + case "mul" -> new BinaryFunction.ConstMulSampler(input,a); + case "div" -> new BinaryFunction.ConstDivSampler(a,input); + case "min" -> new BinaryFunction.ConstMinSampler(input,a); + case "max" -> new BinaryFunction.ConstMaxSampler(input,a); + case "clamp" -> new ClampFunction.Sampler(input,a,b); + default -> throw new AssertionError(); + }; + samplers.add(result);out.println("create "+(samplers.size()-1)); + } + case "round" -> { + var type=RoundFunction.Type.values()[integer(args)];var input=samplers.get(integer(args));int multiple=integer(args); + var result=multiple<0?construct("RoundFunction$IntegerMultipleSampler",new Class<?>[]{RoundFunction.Type.class,DensitySampler.class},type,input): + construct("RoundFunction$Sampler",new Class<?>[]{RoundFunction.Type.class,DensitySampler.class,DensitySampler.class},type,input,samplers.get(multiple)); + samplers.add(result);out.println("create "+(samplers.size()-1)); + } + case "power" -> { + int mode=integer(args);DensitySampler result; + if(mode==0)result=construct("PowFunction$Sampler",new Class<?>[]{DensitySampler.class,DensitySampler.class},samplers.get(integer(args)),samplers.get(integer(args))); + else if(mode==1)result=construct("PowFunction$ConstBaseSampler",new Class<?>[]{double.class,DensitySampler.class},number(args),samplers.get(integer(args))); + else if(mode==2)result=construct("PowFunction$ConstExponentSampler",new Class<?>[]{DensitySampler.class,double.class},samplers.get(integer(args)),number(args)); + else throw new AssertionError(); + samplers.add(result);out.println("create "+(samplers.size()-1)); + } + case "binary" -> { + String kind=args.nextToken();var left=samplers.get(integer(args));var right=samplers.get(integer(args));float bound=small(args); + DensitySampler result=switch(kind) { + case "add" -> new BinaryFunction.AddSampler(left,right); + case "sub" -> new BinaryFunction.SubSampler(left,right); + case "mul" -> new BinaryFunction.MulSampler(left,right); + case "div" -> new BinaryFunction.DivSampler(left,right); + case "min" -> new BinaryFunction.MinSampler(left,right,bound); + case "max" -> new BinaryFunction.MaxSampler(left,right,bound); + default -> throw new AssertionError(); + }; + samplers.add(result);out.println("create "+(samplers.size()-1)); + } + case "choice" -> { + int mode=integer(args);var input=samplers.get(integer(args));float min=small(args),max=small(args); + DensitySampler result; + if(mode==1)result=construct("RangeChoiceFunction$ConstSampler",new Class<?>[]{DensitySampler.class,float.class,float.class,float.class,float.class},input,min,max,small(args),small(args)); + else result=construct("RangeChoiceFunction$Sampler",new Class<?>[]{DensitySampler.class,float.class,float.class,DensitySampler.class,DensitySampler.class},input,min,max,samplers.get(integer(args)),samplers.get(integer(args))); + samplers.add(result);out.println("create "+(samplers.size()-1)); + } + case "lerp" -> { + int mode=integer(args);var alpha=samplers.get(integer(args)); + DensitySampler result=switch(mode) { + case 0 -> new LerpFunction.Sampler(alpha,samplers.get(integer(args)),samplers.get(integer(args))); + case 1 -> new LerpFunction.ConstFirstSampler(alpha,small(args),samplers.get(integer(args))); + case 2 -> new LerpFunction.ConstSecondSampler(alpha,samplers.get(integer(args)),small(args)); + default -> throw new AssertionError(); + }; + samplers.add(result);out.println("create "+(samplers.size()-1)); + } + case "interval" -> { + int mode=integer(args);var input=samplers.get(integer(args));int count=integer(args); + float[] thresholds=new float[count];for(int i=0;i<count;i++)thresholds[i]=small(args); + DensitySampler[] branches=new DensitySampler[count+1];for(int i=0;i<=count;i++)branches[i]=samplers.get(integer(args)); + var result=mode==0?construct("IntervalSelectFunction$Sampler",new Class<?>[]{DensitySampler.class,float[].class,DensitySampler[].class},input,thresholds,branches): + construct("IntervalSelectFunction$SingleThresholdSampler",new Class<?>[]{DensitySampler.class,float.class,DensitySampler.class,DensitySampler.class},input,thresholds[0],branches[0],branches[1]); + samplers.add(result);out.println("create "+(samplers.size()-1)); + } + case "bounds" -> { + int mode=integer(args);float a=small(args),b=small(args),c=small(args),d=small(args),e=small(args),f=small(args); + Interval left; + try { left=switch(mode) {case 0->Interval.of(a,b);case 1->Interval.ofSymmetric(a);case 2->Interval.ofExact(a);case 3->Interval.encapsulating(a,b);case 4->Interval.NaI;case 5->Interval.INFINITE;default->throw new AssertionError();}; } + catch(IllegalArgumentException error) { out.println("bounds create error");break; } + final var first=left;var right=Interval.encapsulating(c,d);var third=Interval.encapsulating(e,f); + intervalOutput(out,"create",()->first);intervalOutput(out,"right",()->right); + intervalOutput(out,"add",()->Interval.add(first,right));intervalOutput(out,"sub",()->Interval.sub(first,right)); + intervalOutput(out,"mul",()->Interval.mul(first,right));intervalOutput(out,"div",()->Interval.div(first,right)); + intervalOutput(out,"min",()->Interval.min(first,right));intervalOutput(out,"max",()->Interval.max(first,right)); + intervalOutput(out,"reciprocal",()->Interval.reciprocal(first));intervalOutput(out,"abs",()->Interval.abs(first)); + intervalOutput(out,"square",()->Interval.square(first));intervalOutput(out,"sign",()->Interval.sign(first)); + intervalOutput(out,"power",()->Interval.pow(first,right)); + intervalOutput(out,"clamp",()->Interval.clamp(first,c,d)); + intervalOutput(out,"log",()->Interval.log(first)); + intervalOutput(out,"lerp-values",()->Interval.lerp(first,c,d));intervalOutput(out,"lerp-ranges",()->Interval.lerp(first,right,third)); + intervalOutput(out,"map-negate",()->Interval.mapMonotonic(first,v->-v));intervalOutput(out,"map-cube",()->Interval.mapMonotonic(first,v->v*v*v)); + intervalOutput(out,"map-sqrt",()->Interval.mapMonotonic(first,v->(float)Math.sqrt(v)));intervalOutput(out,"map-reciprocal",()->Interval.mapMonotonic(first,v->1.0f/v)); + intervalOutput(out,"hull",()->Interval.encapsulating(first,right,third)); + intervalOutput(out,"empty",()->Interval.encapsulating(new Interval[0])); + out.printf("bounds query %d %d %d %d%n",first.contains(e)?1:0,first.intersects(right)?1:0,first.equals(right)?1:0,first.equals(first)?1:0); + } + case "offset" -> { + int kind=integer(args);var contextForShift=shiftContext(noises.get(integer(args)).noise()); + var sampler=switch(kind) {case 0->new ShiftNoiseFunction.Shift(null).compileSampler(contextForShift);case 1->new ShiftNoiseFunction.ShiftA(null).compileSampler(contextForShift);case 2->new ShiftNoiseFunction.ShiftB(null).compileSampler(contextForShift);default->throw new AssertionError();}; + samplers.add(sampler);out.println("create "+(samplers.size()-1)); + } + case "blended", "blendfail" -> { + String stream=args.nextToken();long seed=Long.parseLong(args.nextToken()); + var definition=new BlendedNoise(number(args),number(args),number(args),number(args),number(args)); + intervalOutput(out,"blended",definition::range); + RandomSource random=stream.equals("legacy")?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + DensitySampler sampler=null; + try { sampler=definition.compileSampler(random); } catch(IllegalArgumentException e) { } + out.printf("blended %s %d%n",sampler==null?"error":"ok",random.nextLong()); + if(sampler!=null) { samplers.add(sampler);out.println("create "+(samplers.size()-1)); } + } + case "blendfbm" -> { + String stream=args.nextToken();long seed=Long.parseLong(args.nextToken());int octave=integer(args);double smear=number(args),amplitude=number(args); + RandomSource random=stream.equals("legacy")?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + fbmProbe(random,octave,smear,amplitude,out); + } + case "distance" -> { + var metric=DistanceMetric.values()[integer(args)];var point=new net.minecraft.core.Vec3i(integer(args),integer(args),integer(args)); + samplers.add(new DistanceToPointFunction(point,metric).compileSampler(null));out.println("create "+(samplers.size()-1)); + } + case "metric" -> { + float x=small(args),y=small(args),z=small(args); + for(var metric:DistanceMetric.values())out.printf("metric %s %s%n",bits(metric.compute(x,y)),bits(metric.compute(x,y,z))); + } + case "wfield" -> { + int field=integer(args),fallback=integer(args); + var key=switch(field){case 0->Blender.ALPHA_KEY;case 1->Blender.OFFSET_KEY;case 2->Beardifier.CONTEXT_KEY;default->throw new AssertionError();}; + samplers.add(fallback<0?SimpleDensityFunction.values()[field].compileSampler(null):new ContextBoundSampler(key,samplers.get(fallback)));out.println("create "+(samplers.size()-1)); + } + case "blenddensity" -> { + samplers.add(new BlendDensityFunction(new BoundFunction(samplers.get(integer(args)),Interval.INFINITE,7)).compileSampler(null));out.println("create "+(samplers.size()-1)); + } + case "context","wcontext" -> { + boolean cached=integer(args)!=0; + var builder=SamplerContext.builder().useBufferArena(new DensityBufferArena() { + public ScopedDensityBuffer acquire(int size) { var result=DensityBufferArena.GLOBAL.acquire(size);result.fill(0.0f);return result; } + public void release(ScopedDensityBuffer buffer) { DensityBufferArena.GLOBAL.release(buffer); } + }); + if(line.startsWith("wcontext ")) { + var fields=ContextMap.builder(); + int alpha=integer(args),offset=integer(args),beard=integer(args),blender=integer(args); + if(alpha>=0)fields.set(Blender.ALPHA_KEY,samplers.get(alpha)); + if(offset>=0)fields.set(Blender.OFFSET_KEY,samplers.get(offset)); + if(beard>=0)fields.set(structureKey(),samplers.get(beard)); + if(blender!=0)fields.set(Blender.CONTEXT_KEY,Blender.empty()); + builder.setUserFields(fields.build()); + } + if(cached)builder.enableCaches();context=builder.build();out.println("context"); + } + case "counted" -> { + var input=samplers.get(integer(args));var calls=new long[2];counters.add(calls); + samplers.add(new DensitySampler() { + public float sampleValue(SamplerContext ctx,int x,int y,int z) { calls[0]++;return input.sampleValue(ctx,x,y,z); } + public void sampleVolume(SamplerContext ctx,DensityBuffer buffer,DensityVolume volume) { calls[1]++;input.sampleVolume(ctx,buffer,volume); } + }); + out.printf("counted %d %d%n",counters.size()-1,samplers.size()-1); + } + case "counts" -> { var calls=counters.get(integer(args));out.printf("counts %d %d%n",calls[0],calls[1]); } + case "greset" -> {graphFunctions=new net.minecraft.core.MappedRegistry<>(net.minecraft.core.registries.Registries.DENSITY_FUNCTION,com.mojang.serialization.Lifecycle.stable());namedFunctions.clear();graph.clear();graphSplines.clear();graphNoises.clear();graphContext=shiftContext(null);graphCompiler=new DensityFunctionCompiler(graphContext);context=SamplerContext.EMPTY_UNCACHED;out.println("graph-reset");} + case "gend" -> {graph.add(new EndIslandFunction());out.println("graph-create "+(graph.size()-1));} + case "gseed" -> { + long seed=Long.parseLong(args.nextToken());boolean legacy=integer(args)!=0; + graphWorldSeed=seed;graphLegacy=legacy; + graphRegistry=new net.minecraft.core.MappedRegistry<>(net.minecraft.core.registries.Registries.NOISE,com.mojang.serialization.Lifecycle.stable()); + // Original fixtures supply constructor-only material inputs; + // RandomState performs all seed derivation and noise creation. + for(var key:java.util.List.of(net.minecraft.world.level.levelgen.Noises.CLAY_BANDS_OFFSET,net.minecraft.world.level.levelgen.Noises.SURFACE,net.minecraft.world.level.levelgen.Noises.SURFACE_SECONDARY,net.minecraft.world.level.levelgen.Noises.BADLANDS_PILLAR,net.minecraft.world.level.levelgen.Noises.BADLANDS_PILLAR_ROOF,net.minecraft.world.level.levelgen.Noises.BADLANDS_SURFACE,net.minecraft.world.level.levelgen.Noises.ICEBERG_PILLAR,net.minecraft.world.level.levelgen.Noises.ICEBERG_PILLAR_ROOF,net.minecraft.world.level.levelgen.Noises.ICEBERG_SURFACE)) + graphRegistry.register(key,NormalNoise.builder().setOctaveCount(0).build(),net.minecraft.core.RegistrationInfo.BUILT_IN); + graphContext=shiftContext(null);graphCompiler=new DensityFunctionCompiler(graphContext); + graphFunctions=new net.minecraft.core.MappedRegistry<>(net.minecraft.core.registries.Registries.DENSITY_FUNCTION,com.mojang.serialization.Lifecycle.stable());namedFunctions.clear();graph.clear();graphSplines.clear();graphNoises.clear();context=SamplerContext.EMPTY_UNCACHED;out.println("graph-seed"); + } + case "gready" -> { + graphRegistry.freeze(); + var zero=DensityFunctions.zero();var router=new net.minecraft.world.level.levelgen.NoiseRouter(zero,zero,zero,zero,zero,zero,zero,zero); + var state=net.minecraft.world.level.levelgen.RandomState.create(graphRegistry,graphWorldSeed,graphLegacy,net.minecraft.world.level.block.Blocks.STONE.defaultBlockState(),63,router); + var compilerField=state.getClass().getDeclaredField("densityFunctionCompiler");compilerField.setAccessible(true);graphCompiler=(DensityFunctionCompiler)compilerField.get(state); + var contextField=DensityFunctionCompiler.class.getDeclaredField("context");contextField.setAccessible(true);graphContext=(DensityFunction.CompileContext)contextField.get(graphCompiler); + out.println("graph-ready"); + } + case "gregister" -> { + String name=args.nextToken();int base=integer(args);double amplitude=number(args);int count=integer(args),normalization=integer(args),modifiers=integer(args); + var builder=NormalNoise.builder().setBaseOctave(base).setBaseAmplitude(amplitude).setOctaveCount(count); + if(normalization==2)builder.setLegacyNormalization();else builder.setNormalize(normalization==1); + for(int i=0;i<modifiers;i++)builder.setAmplitudeModifier(i,number(args)); + var key=net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.NOISE,net.minecraft.resources.Identifier.parse(name)); + graphNoises.add(graphRegistry.register(key,builder.build(),net.minecraft.core.RegistrationInfo.BUILT_IN));out.println("graph-noise "+(graphNoises.size()-1)); + } + case "ginstance" -> {var holder=graphNoises.get(integer(args));var a=graphContext.createNoiseSampler(holder);var b=graphContext.createNoiseSampler(holder);out.println("graph-instance "+(a==b?1:0));} + case "gsconstant" -> {graphSplines.add(CubicSpline.constant(small(args)));out.println("graph-spline "+(graphSplines.size()-1));} + case "gspoints" -> { + var coordinate=new SplineFunction.Coordinate(graph.get(integer(args)));int count=integer(args); + var locations=new float[count];var derivatives=new float[count];var values=new ArrayList<CubicSpline<SplineFunction.Coordinate>>(); + for(int i=0;i<count;i++){locations[i]=small(args);derivatives[i]=small(args);values.add(graphSplines.get(integer(args)));} + graphSplines.add(new CubicSpline.Multipoint<>(coordinate,locations,values,derivatives));out.println("graph-spline "+(graphSplines.size()-1)); + } + case "gref" -> {graph.add(new DensityFunctions.HolderHolder(net.minecraft.core.Holder.direct(graph.get(integer(args)))));out.println("graph-create "+(graph.size()-1));} + case "gnamed" -> { + String name=args.nextToken();var value=graph.get(integer(args)); + // Distinct equal constant objects may have distinct registered holders. + if(value instanceof ConstantFunction constant)value=new ConstantFunction(constant.value()); + var key=net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.DENSITY_FUNCTION,net.minecraft.resources.Identifier.parse(name)); + var holder=graphFunctions.register(key,value,net.minecraft.core.RegistrationInfo.BUILT_IN); + // Bind each transport entry immediately, as freeze binds a loaded registry. + var bind=net.minecraft.core.Holder.Reference.class.getDeclaredMethod("bindValue",Object.class);bind.setAccessible(true);bind.invoke(holder,value);namedFunctions.put(name,holder); + graph.add(new DensityFunctions.HolderHolder(holder));out.println("graph-create "+(graph.size()-1)); + } + case "glookup" -> {graph.add(new DensityFunctions.HolderHolder(namedFunctions.get(args.nextToken())));out.println("graph-create "+(graph.size()-1));} + case "gspline" -> {graph.add(new SplineFunction(graphSplines.get(integer(args))));out.println("graph-create "+(graph.size()-1));} + case "gbind" -> { + var sampler=samplers.get(integer(args));var range=Interval.encapsulating(small(args),small(args));int axes=integer(args); + graph.add(new BoundFunction(sampler,range,axes));out.println("graph-create "+(graph.size()-1)); + } + case "gconst","ggradient","gunary","gbinary","gclamp","gchoice","glerp","gslice","gcache","ginterp","gsurface","ginterval","gdistance","gnoise","goffset","gblended","ground","gpow","gwfield","gblenddensity" -> { + String command=line.substring(0,line.indexOf(' ')); + DensityFunction node=switch(command){ + case "gconst"->new ConstantFunction(small(args)); + case "gwfield"->SimpleDensityFunction.values()[integer(args)]; + case "gblenddensity"->new BlendDensityFunction(graph.get(integer(args))); + case "gnoise"->new NoiseFunction(graphNoises.get(integer(args)),number(args),number(args),graph.get(integer(args)),graph.get(integer(args)),graph.get(integer(args))); + case "goffset"->{var noise=graphNoises.get(integer(args));yield switch(integer(args)){case 0->new ShiftNoiseFunction.Shift(noise);case 1->new ShiftNoiseFunction.ShiftA(noise);case 2->new ShiftNoiseFunction.ShiftB(noise);default->throw new AssertionError();};} + case "gblended"->new BlendedNoise(number(args),number(args),number(args),number(args),number(args)); + case "ground"->new RoundFunction(RoundFunction.Type.values()[integer(args)],graph.get(integer(args)),graph.get(integer(args))); + case "gpow"->new PowFunction(graph.get(integer(args)),graph.get(integer(args))); + case "gdistance"->new DistanceToPointFunction(new net.minecraft.core.Vec3i(integer(args),integer(args),integer(args)),DistanceMetric.values()[integer(args)]); + case "ginterval"->{ + var input=graph.get(integer(args));int count=integer(args); + float[] thresholds=new float[count];for(int i=0;i<count;i++)thresholds[i]=small(args); + var branches=new ArrayList<DensityFunction>();for(int i=0;i<=count;i++)branches.add(graph.get(integer(args))); + yield new IntervalSelectFunction(input,it.unimi.dsi.fastutil.floats.FloatArrayList.wrap(thresholds),branches); + } + case "ggradient"->new GradientFunction(Axis.values()[integer(args)],TilingMode.values()[integer(args)],integer(args),integer(args),small(args),small(args)); + case "gunary"->new UnaryFunction(UnaryFunction.Type.values()[new int[]{0,1,2,4,5,6,7,8,10,9,3}[integer(args)]],graph.get(integer(args))); + case "gbinary"->new BinaryFunction(BinaryFunction.Type.values()[integer(args)],graph.get(integer(args)),graph.get(integer(args))); + case "gclamp"->new ClampFunction(graph.get(integer(args)),small(args),small(args)); + case "gchoice"->new RangeChoiceFunction(graph.get(integer(args)),small(args),small(args),graph.get(integer(args)),graph.get(integer(args))); + case "glerp"->new LerpFunction(graph.get(integer(args)),graph.get(integer(args)),graph.get(integer(args))); + case "gslice"->new SliceFunction(Axis.values()[integer(args)],integer(args),graph.get(integer(args))); + case "gcache"->new CacheFunction(graph.get(integer(args))); + case "ginterp"->new InterpolatedFunction(graph.get(integer(args)),integer(args),integer(args)); + case "gsurface"->new FindTopSurfaceFunction(graph.get(integer(args)),graph.get(integer(args)),integer(args),integer(args)); + default->throw new AssertionError(); + }; + graph.add(node);out.println("graph-create "+(graph.size()-1)); + } + case "ginfo" -> {var node=graph.get(integer(args));intervalOutput(out,"graph",node::range);out.println("graph-axes "+node.domainAxes());} + case "gsame" -> out.println("graph-same "+(graph.get(integer(args)).equals(graph.get(integer(args)))?1:0)); + case "gcompile","gtry" -> { + String command=line.substring(0,line.indexOf(' '));int mode=integer(args);var node=graph.get(integer(args)); + if(command.equals("gtry")){ + String status="ok"; + try{if(mode==0)node.compileSampler(graphContext);else graphCompiler.getSampler(node);} + catch(IllegalArgumentException | IllegalStateException e){status="error";} + out.printf("graph-try %s %d%n",status,cacheCount(graphCompiler)); + }else{ + var sampler=mode==0?node.compileSampler(graphContext):graphCompiler.getSampler(node); + int same=mode==0?-1:(sampler==graphCompiler.getSampler(node)?1:0); + samplers.add(sampler);out.printf("graph-compile %d %d %d%n",samplers.size()-1,cacheCount(graphCompiler),same); + } + } + case "spconstant" -> { + splines.add(CubicSpline.constant(small(args)));out.println("spline "+(splines.size()-1)); + } + case "sppoints" -> { + int id=integer(args),count=integer(args);var function=functions.computeIfAbsent(id,key->new TransportFunction(key,samplers.get(key))); + var locations=new float[count];var derivatives=new float[count];var values=new ArrayList<CubicSpline<SplineFunction.Coordinate>>(); + for(int i=0;i<count;i++){locations[i]=small(args);derivatives[i]=small(args);values.add(splines.get(integer(args)));} + splines.add(new CubicSpline.Multipoint<>(new SplineFunction.Coordinate(function),locations,values,derivatives));out.println("spline "+(splines.size()-1)); + } + case "spfail" -> { + var spline=splines.get(integer(args)); + try {new SplineFunction(spline).compileSampler(shiftContext(null));out.println("spline-compile ok");} + catch(IllegalArgumentException e){out.println("spline-compile error");} + } + case "sprange" -> { + var spline=splines.get(integer(args)); + for(int i=0;i<3;i++)splineRanges[i]=Interval.encapsulating(small(args),small(args)); + intervalOutput(out,"spline",spline::range); + java.util.Arrays.fill(splineRanges,Interval.INFINITE); + } + case "spsampler" -> { + samplers.add(new SplineFunction(splines.get(integer(args))).compileSampler(shiftContext(null)));out.println("create "+(samplers.size()-1)); + } + case "surface" -> { + int mode=integer(args);var density=samplers.get(integer(args));var upper=samplers.get(integer(args));int lower=integer(args),height=integer(args); + var sampler=construct("FindTopSurfaceFunction$Sampler",new Class<?>[]{DensitySampler.class,DensitySampler.class,int.class,int.class},density,upper,lower,height); + samplers.add(mode==0?sampler:new SliceFunction.YSampler(sampler,0));out.println("create "+(samplers.size()-1)); + } + case "interpolate" -> { + var input=samplers.get(integer(args));int xz=integer(args),y=integer(args); + samplers.add(construct("InterpolatedFunction$Sampler",new Class<?>[]{DensitySampler.class,int.class,int.class,float.class,float.class},input,xz,y,1.0f/xz,1.0f/y)); + out.println("create "+(samplers.size()-1)); + } + case "slice" -> { + int mode=integer(args);var input=samplers.get(integer(args));int a=integer(args),b=integer(args); + DensitySampler sampler=switch(mode) { + case 0->new SliceFunction.XSampler(input,a); + case 1->new SliceFunction.YSampler(input,a); + case 2->new SliceFunction.ZSampler(input,a); + case 3->new SliceFunction.XzSampler(input,a,b); + default->throw new AssertionError(); + }; + samplers.add(sampler);out.println("create "+(samplers.size()-1)); + } + case "cache" -> { int id=integer(args);samplers.add(new CachingDensitySampler(id,samplers.get(integer(args))));out.println("create "+(samplers.size()-1)); } + case "lookup" -> { + var volume=new DensityVolume(integer(args),integer(args),integer(args),integer(args),integer(args),integer(args),integer(args),integer(args),integer(args)); + out.println("lookup "+volume.indexOfBlock(integer(args),integer(args),integer(args))); + } + case "query" -> { + var sampler=samplers.get(integer(args));int x=integer(args),y=integer(args),z=integer(args); + try { out.println("query "+bits(sampler.sampleValue(context,x,y,z))); } + catch(ArithmeticException e) { out.println("query error"); } + } + case "volume" -> { + var sampler=samplers.get(integer(args)); + int sx=integer(args),sy=integer(args),sz=integer(args),mx=integer(args),my=integer(args),mz=integer(args),dx=integer(args),dy=integer(args),dz=integer(args); + int tail=integer(args);long seed=Long.parseLong(args.nextToken());int repeats=integer(args); + var volume=new DensityVolume(sx,sy,sz,mx,my,mz,dx,dy,dz);var buffer=DensityBuffer.createUnpooled(volume.size()+tail);var random=new LegacyRandomSource(seed); + for(int i=0;i<buffer.size();i++)buffer.set(i,Float.intBitsToFloat(random.nextInt())); + for(int pass=0;pass<repeats;pass++) { + String status="ok"; + try { sampler.sampleVolume(context,buffer,volume); } catch(ArithmeticException | IllegalArgumentException e) { status="error"; } + out.printf("volume %d %s%n",pass,status); + for(int i=0;i<buffer.size();i++)out.printf("cell %d %s%n",i,bits(buffer.get(i))); + } + } + default -> throw new AssertionError(); + } + if(args.hasMoreTokens())throw new AssertionError("extra argument"); + } + if(out.checkError())throw new java.io.IOException("reference output failed"); + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDynamicSupportOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDynamicSupportOracle.java new file mode 100644 index 000000000..26619a5b3 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDynamicSupportOracle.java @@ -0,0 +1,55 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import net.minecraft.core.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.entity.*; +import net.minecraft.world.level.block.piston.PistonMovingBlockEntity; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.phys.shapes.*; +/** Native uncached support selection; block-entity lifecycle is outside these snapshots. */ +public final class VanillaDynamicSupportOracle { + private static final class Stop extends RuntimeException {} + @SuppressWarnings("unchecked") public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + if(args[0].equals("export")) { + VanillaCollisionOracle.main(new String[]{"generate",args[1]}); + VanillaBlockStateCodecOracle.main(new String[]{"export",dir.resolve("facts.json").toString()}); + var cache=BlockBehaviour.BlockStateBase.class.getDeclaredField("cache");cache.setAccessible(true);var ids=new JsonArray();for(var state:Block.BLOCK_STATE_REGISTRY)if(cache.get(state)==null)ids.add(Block.getId(state));Files.writeString(dir.resolve("uncached-states.json"),ids.toString());return; + } + var allocator=Class.forName("sun.misc.Unsafe");var access=allocator.getDeclaredField("theUnsafe");access.setAccessible(true);var unsafe=access.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + var progress=PistonMovingBlockEntity.class.getDeclaredField("progress");progress.setAccessible(true);var clipField=PistonMovingBlockEntity.class.getDeclaredField("NOCLIP");clipField.setAccessible(true);var noclip=(ThreadLocal<Direction>)clipField.get(null); + var shulkerOld=ShulkerBoxBlockEntity.class.getDeclaredField("progressOld");shulkerOld.setAccessible(true);var shulkerProgress=ShulkerBoxBlockEntity.class.getDeclaredField("progress");shulkerProgress.setAccessible(true); + var animation=ShulkerBoxBlockEntity.class.getDeclaredField("animationStatus");animation.setAccessible(true); + var emit=VanillaFaceSupportOracle.class.getDeclaredMethod("emit",PrintWriter.class,VoxelShape.class);emit.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var inputs=Files.lines(dir.resolve("inputs.txt"))) { + for(var line:(Iterable<String>)inputs::iterator) { + var f=JsonParser.parseString(line).getAsJsonObject();var state=Block.stateById(f.get("state").getAsInt());var xyz=f.getAsJsonArray("position");var p=new BlockPos(xyz.get(0).getAsInt(),xyz.get(1).getAsInt(),xyz.get(2).getAsInt());String mode=f.get("entity").getAsString(); + Object entity=null; + if(!mode.equals("none")) { + if(mode.equals("other"))entity=allocate.invoke(unsafe,state.getBlock() instanceof ShulkerBoxBlock?PistonMovingBlockEntity.class:ShulkerBoxBlockEntity.class); + else if(mode.equals("piston")) { + var data=f.getAsJsonObject("piston");var moving=new PistonMovingBlockEntity(p,state,Block.stateById(data.get("state").getAsInt()),Direction.values()[data.get("direction").getAsInt()],data.get("extending").getAsBoolean(),data.get("source").getAsBoolean()); + progress.setFloat(moving,Float.intBitsToFloat(Integer.parseUnsignedInt(data.get("progress").getAsString(),16)));entity=moving;int clip=data.get("noclip").getAsInt();noclip.set(clip<0?null:Direction.values()[clip]); + } + else {entity=allocate.invoke(unsafe,ShulkerBoxBlockEntity.class);Object status=null;for(var value:animation.getType().getEnumConstants())if(((Enum<?>)value).name().equals(mode.toUpperCase(java.util.Locale.ROOT)))status=value;if(status==null)throw new AssertionError(mode);animation.set(entity,status);} + } + if(entity instanceof ShulkerBoxBlockEntity && f.has("shulker_progress")){var data=f.getAsJsonArray("shulker_progress");shulkerOld.setFloat(entity,Float.intBitsToFloat(Integer.parseUnsignedInt(data.get(0).getAsString(),16)));shulkerProgress.setFloat(entity,Float.intBitsToFloat(Integer.parseUnsignedInt(data.get(1).getAsString(),16)));} + Object selected=entity;int[] calls={0}; + var world=(BlockGetter)Proxy.newProxyInstance(BlockGetter.class.getClassLoader(),new Class<?>[]{BlockGetter.class},(proxy,method,values)->{ + if(!method.getName().equals("getBlockEntity"))throw new AssertionError(method); + var at=(BlockPos)values[0];out.println("entity "+at.getX()+" "+at.getY()+" "+at.getZ());if(calls[0]++==f.get("fail").getAsInt())throw new Stop();return selected; + }); + var offset=state.getOffset(p);out.printf("offset %016x %016x %016x%n",Double.doubleToRawLongBits(offset.x),Double.doubleToRawLongBits(offset.y),Double.doubleToRawLongBits(offset.z)); + try {emit.invoke(null,out,f.has("collision")&&f.get("collision").getAsBoolean()?state.getCollisionShape(world,p):state.getBlockSupportShape(world,p));}catch(Stop error){out.println("shape error");} + for(var direction:Direction.values())for(var type:SupportType.values()) { + try {out.println("support "+direction.ordinal()+" "+type.ordinal()+" "+state.isFaceSturdy(world,p,direction,type));}catch(Stop error){out.println("support "+direction.ordinal()+" "+type.ordinal()+" error");} + } + out.println("queries "+calls[0]);noclip.remove(); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEdgeBackoffOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEdgeBackoffOracle.java new file mode 100644 index 000000000..a3c116891 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEdgeBackoffOracle.java @@ -0,0 +1,43 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.entity.player.*; +import net.minecraft.world.level.GameType; +import net.minecraft.world.phys.*; +/** Actual Player edge-backoff decisions and probe bounds with controlled collisions. */ +public final class VanillaEdgeBackoffOracle { + static final class Stop extends RuntimeException {} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static Vec3 vector(JsonElement v){var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static final class Data { + JsonObject input;PrintWriter out;int calls,probes; + void query(String text){out.println(text);if(calls++==input.get("fail").getAsInt())throw new Stop();} + } + static final class Level extends net.minecraft.server.level.ServerLevel { + Data d; + private Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public boolean noCollision(Entity entity,AABB b){d.query(String.format("clear %016x %016x %016x %016x %016x %016x",Double.doubleToLongBits(b.minX),Double.doubleToLongBits(b.minY),Double.doubleToLongBits(b.minZ),Double.doubleToLongBits(b.maxX),Double.doubleToLongBits(b.maxY),Double.doubleToLongBits(b.maxZ)));var values=d.input.getAsJsonArray("clear");int index=d.probes++;return index<values.size()?values.get(index).getAsBoolean():false;} + } + static final class Actor extends Player { + Data d;Actor(){super(null,null);}void configure(Level level){setLevel(level);} + @Override public GameType gameMode(){return GameType.SURVIVAL;} + @Override public float maxUpStep(){d.query("step");return Float.intBitsToFloat(Integer.parseUnsignedInt(d.input.get("step").getAsString(),16));} + @Override protected boolean isStayingOnGroundSurface(){d.query("staying");return d.input.get("staying").getAsBoolean();} + @Override public boolean onGround(){d.query("ground");return d.input.get("ground").getAsBoolean();} + Vec3 backoff(Vec3 v,MoverType type){return maybeBackOffFromEdge(v,type);} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var allocator=Class.forName("sun.misc.Unsafe");var field=allocator.getDeclaredField("theUnsafe");field.setAccessible(true);var unsafe=field.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class);var abilities=Player.class.getDeclaredField("abilities");abilities.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){ + for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.input=f;d.out=out;var level=(Level)allocate.invoke(unsafe,Level.class);level.d=d;var entity=(Actor)allocate.invoke(unsafe,Actor.class);entity.d=d;entity.configure(level);var a=new Abilities();a.flying=f.get("flying").getAsBoolean();abilities.set(entity,a);entity.fallDistance=number(f.get("fall"));var b=f.getAsJsonArray("box");entity.setBoundingBox(new AABB(number(b.get(0)),number(b.get(1)),number(b.get(2)),number(b.get(3)),number(b.get(4)),number(b.get(5)))); + try{var result=entity.backoff(vector(f.get("movement")),MoverType.valueOf(f.get("mover").getAsString()));out.printf("movement %016x %016x %016x%n",Double.doubleToLongBits(result.x),Double.doubleToLongBits(result.y),Double.doubleToLongBits(result.z));}catch(Stop error){out.println("error");}out.println("queries "+d.calls); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEffectAttributeModifiersOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEffectAttributeModifiersOracle.java new file mode 100644 index 000000000..cf890698e --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEffectAttributeModifiersOracle.java @@ -0,0 +1,165 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.Holder; +import net.minecraft.resources.Identifier; +import net.minecraft.world.effect.*; +import net.minecraft.world.entity.ai.attributes.*; + +/** Native MobEffect modifier methods and AttributeInstance storage/callbacks. */ +public final class VanillaEffectAttributeModifiersOracle { + static Field definitions, dirty, cached, templateId, templateAmount, templateOperation; + static Field field(Class<?> c, String name) throws Exception { + var f = c.getDeclaredField(name); f.setAccessible(true); return f; + } + static double number(JsonElement v) { return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(), 16)); } + static String bits(double v) { return String.format("%016x", Double.doubleToLongBits(v)); } + static String desc(AttributeModifier m) { return m.id() + ":" + bits(m.amount()) + ":" + m.operation().ordinal(); } + static final class Stop extends RuntimeException {} + static final class Basic extends Attribute { + int hash; + Basic(double value, int hash) { super("horizon.fixture", value); this.hash = hash; } + @Override public int hashCode() { return hash; } + } + static final class Effect extends MobEffect { Effect() { super(MobEffectCategory.BENEFICIAL, 0); } } + record Template(Identifier id, double amount, AttributeModifier.Operation operation) { + AttributeModifier create(int amplifier) { return new AttributeModifier(id, amount * (double)(amplifier + 1), operation); } + } + static final class Data { + List<Holder<Attribute>> keys = new ArrayList<>(); + List<Template> templates = new ArrayList<>(); + List<AttributeModifier> pool = new ArrayList<>(); + int[] routes; Attr[] instances; Attrs attributes; Effect effect = new Effect(); + Map<Holder<Attribute>, Object> defs; JsonObject op; int calls; boolean changed; PrintWriter out; + Holder<Attribute> key(JsonObject op) { int k = op.get("key").getAsInt(); return k < 0 ? null : keys.get(k); } + String keyDesc(Holder<Attribute> key) { return key == null ? "null" : Integer.toString(keys.indexOf(key)); } + int modifier(AttributeModifier m) { pool.add(m); return pool.size() - 1; } + String refs(Collection<AttributeModifier> mods) { + var out = new StringJoiner(","); + for (var m : mods) { + int id = -1; for (int i = 0; i < pool.size(); i++) if (pool.get(i) == m) { id = i; break; } + if (id < 0) throw new AssertionError("unknown modifier"); + out.add(Integer.toString(id)); + } + return out.toString(); + } + void definitions() { + var result = new StringJoiner(","); + defs.forEach((key, t) -> { + try { result.add(keyDesc(key) + "=" + (t == null ? "null" : templateId.get(t) + ":" + bits(templateAmount.getDouble(t)) + ":" + ((AttributeModifier.Operation)templateOperation.get(t)).ordinal())); } + catch (IllegalAccessException e) { throw new AssertionError(e); } + }); + out.println("definitions " + defs.size() + " | " + result); + } + void state(int id, AttributeInstance a) { + try { out.println("instance " + id + " " + bits(a.getBaseValue()) + " " + dirty.getBoolean(a) + " " + bits(cached.getDouble(a)) + " | " + refs(a.getModifiers()) + " | " + refs(a.getPermanentModifiers())); } + catch (IllegalAccessException e) { throw new AssertionError(e); } + } + void raw(JsonObject op) { + switch (op.get("op").getAsString()) { + case "define" -> { + var t = templates.get(op.get("template").getAsInt()); + if (effect.addAttributeModifier(key(op), t.id(), t.amount(), t.operation()) != effect) throw new AssertionError(); + } + case "null" -> defs.put(key(op), null); + case "drop" -> defs.remove(key(op)); + case "clear" -> defs.clear(); + case "route" -> { var k = key(op); routes[k == null ? keys.size() : keys.indexOf(k)] = op.get("target").getAsInt(); } + default -> throw new AssertionError(); + } + } + void event(String name) { + int call = calls++; + out.println("event " + call + " " + name); definitions(); + if (call == op.get("fail").getAsInt()) throw new Stop(); + if (call == op.get("mutate").getAsInt()) { + changed = true; + for (var a : op.getAsJsonArray("mutations")) raw(a.getAsJsonObject()); + } + } + void changed(AttributeInstance a) { + int id = ((Attr)a).id; state(id, a); event("dirty " + id); + if (op.get("read").getAsBoolean()) out.println("observed " + bits(a.getValue())); + } + } + static final class Attrs extends AttributeMap { + Data d; + Attrs(Data d) { super(null); this.d = d; } + @Override public AttributeInstance getInstance(Holder<Attribute> h) { + d.event("get " + d.keyDesc(h)); + int route = d.routes[h == null ? d.keys.size() : d.keys.indexOf(h)]; + return route < 0 ? null : d.instances[route]; + } + } + static final class Attr extends AttributeInstance { + Data d; int id; + Attr(Data d, int id, double value) { super(Holder.direct(new Basic(value, id)), d::changed); this.d = d; this.id = id; } + @Override public boolean removeModifier(Identifier id) { d.event("remove " + this.id + " " + id); return super.removeModifier(id); } + @Override public void addPermanentModifier(AttributeModifier modifier) { + int m = d.modifier(modifier); d.event("permanent " + id + " " + m + " " + desc(modifier)); + super.addPermanentModifier(modifier); + } + } + @SuppressWarnings("unchecked") + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); + definitions = field(MobEffect.class, "attributeModifiers"); + dirty = field(AttributeInstance.class, "dirty"); cached = field(AttributeInstance.class, "cachedValue"); + var template = Class.forName("net.minecraft.world.effect.MobEffect$AttributeTemplate"); + templateId = field(template, "id"); templateAmount = field(template, "amount"); templateOperation = field(template, "operation"); + Path dir = Path.of(args[1]); + try (var out = new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0] + ".txt"))); + var lines = Files.lines(dir.resolve("inputs.txt"))) { + for (var line : (Iterable<String>)lines::iterator) { + var f = JsonParser.parseString(line).getAsJsonObject(); var d = new Data(); d.out = out; + d.defs = (Map<Holder<Attribute>, Object>)definitions.get(d.effect); + // Direct is a two-component record (value, components). Solve + // its record hash for the requested holder hash so collision + // fixtures target the actual keys, not only their values. + int componentsHash = Holder.direct(new Basic(0, 0)).hashCode(); + for (var h : f.getAsJsonArray("hashes")) { + int requested = h.getAsInt(); + var key = Holder.<Attribute>direct(new Basic(0, (requested - componentsHash) * 0xbdef7bdf)); + if (key.hashCode() != requested) throw new AssertionError("holder hash fixture"); + d.keys.add(key); + } + for (var v : f.getAsJsonArray("templates")) { + var t = v.getAsJsonObject(); + d.templates.add(new Template(Identifier.parse(t.get("id").getAsString()), number(t.get("amount")), AttributeModifier.Operation.values()[t.get("operation").getAsInt()])); + } + d.routes = new int[d.keys.size() + 1]; + for (int i = 0; i < d.routes.length; i++) d.routes[i] = f.getAsJsonArray("routes").get(i).getAsInt(); + d.instances = new Attr[f.getAsJsonArray("defaults").size()]; + for (int i = 0; i < d.instances.length; i++) d.instances[i] = new Attr(d, i, number(f.getAsJsonArray("defaults").get(i))); + d.attributes = new Attrs(d); + for (var v : f.getAsJsonArray("setup")) d.raw(v.getAsJsonObject()); + for (var v : f.getAsJsonArray("ops")) { + d.op = v.getAsJsonObject(); d.calls = 0; d.changed = false; String result = "ok"; + int amp = d.op.get("amplifier").getAsInt(); + try { + switch (d.op.get("op").getAsString()) { + case "add" -> d.effect.addAttributeModifiers(d.attributes, amp); + case "remove" -> d.effect.removeAttributeModifiers(d.attributes); + case "create" -> d.effect.createModifiers(amp, (key, modifier) -> { + int id = d.modifier(modifier); d.event("consume " + d.keyDesc(key) + " " + id + " " + desc(modifier)); + }); + case "seed" -> d.instances[d.op.get("target").getAsInt()].addPermanentModifier(d.templates.get(d.op.get("template").getAsInt()).create(amp)); + case "value" -> { int id = d.op.get("target").getAsInt(); out.println("value " + id + " " + bits(d.instances[id].getValue())); } + default -> d.raw(d.op); + } + } catch (Stop e) { result = "callback"; + } catch (NullPointerException e) { result = "null"; + } catch (IndexOutOfBoundsException e) { result = "bounds"; + } catch (NoSuchElementException e) { result = "empty"; + } catch (IllegalArgumentException e) { result = "duplicate"; } + out.println("result " + result); out.println("calls " + d.calls + " " + d.changed); d.definitions(); + for (int i = 0; i < d.instances.length; i++) d.state(i, d.instances[i]); + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEffectNotificationsOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEffectNotificationsOracle.java new file mode 100644 index 000000000..06cc75d00 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEffectNotificationsOracle.java @@ -0,0 +1,55 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.Holder;import net.minecraft.world.effect.*;import net.minecraft.world.entity.*;import net.minecraft.world.level.Level;import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.ai.attributes.*;import net.minecraft.server.level.ServerPlayer;import net.minecraft.server.network.ServerGamePacketListenerImpl;import net.minecraft.network.protocol.Packet;import net.minecraft.network.protocol.game.*;import net.minecraft.tags.*;import com.google.common.collect.ImmutableList;import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; +/** Inherited eligibility and effect notification bodies with real packets and pending sets. */ +public final class VanillaEffectNotificationsOracle { + static Object unsafe;static Method allocate;static Field duration,amplifier,ambient,visible,icon,hidden,blend,factor,previous,removed,activeEffects;static Data active;static Field dirty,passengers;static Method refresh;static List<Holder<MobEffect>> known;static List<Holder<Attribute>> attributeHolders; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static int n(JsonObject v,String k){return v.get(k).getAsInt();} + static float fl(JsonObject v,String k){return Float.intBitsToFloat((int)v.get(k).getAsLong());} + static long bits(float v){return Integer.toUnsignedLong(Float.floatToIntBits(v));} + static final class Stop extends RuntimeException{} + static final class Data {JsonObject f;PrintWriter out;List<Holder<MobEffect>> keys=new ArrayList<>();MobEffectInstance[] pool;IdentityHashMap<MobEffectInstance,Integer> ids=new IdentityHashMap<>();Actor actor;Entity other;EffectLevel[] levels;Attr[] attributeInstances;Attrs[] attributes;List<Set<AttributeInstance>> updates;ServerPlayer[] riders;Connection[] connections;int calls;boolean changed; + JsonObject config(){return f.getAsJsonObject(changed?"after":"initial");} + Map<Holder<MobEffect>,MobEffectInstance> map(){return actor.getActiveEffectsMap();} + int id(MobEffectInstance e){return ids.computeIfAbsent(e,k->ids.size());} + int key(Holder<MobEffect> h){return keys.indexOf(h);} + int source(Entity e){if(e==null)return -1;if(e==actor)return 0;if(e==other)return 1;throw new AssertionError();} + void reset(){try{var c=config();if(!c.get("dirty").isJsonNull())dirty.setBoolean(actor,c.get("dirty").getAsBoolean());for(int i=0;i<2;i++){int connection=c.getAsJsonArray("connections").get(i).getAsInt();riders[i].connection=connection<0?null:connections[connection];}var ps=new ArrayList<Entity>();for(var p:c.getAsJsonArray("passengers")){int id=p.getAsInt();ps.add(id<2?riders[id]:other);}passengers.set(actor,ImmutableList.copyOf(ps));removed.set(actor,c.get("removed").getAsBoolean()?Entity.RemovalReason.DISCARDED:null);for(int i=0;i<pool.length;i++){var v=c.getAsJsonArray("states").get(i).getAsJsonObject();var e=pool[i];duration.setInt(e,n(v,"duration"));amplifier.setInt(e,n(v,"amplifier"));ambient.setBoolean(e,v.get("ambient").getAsBoolean());visible.setBoolean(e,v.get("visible").getAsBoolean());icon.setBoolean(e,v.get("icon").getAsBoolean());factor.setFloat(blend.get(e),fl(v,"factor"));previous.setFloat(blend.get(e),fl(v,"previous"));}}catch(Exception e){throw new AssertionError(e);}} + void all(){try{out.println("state "+calls+" "+changed+" "+dirty.getBoolean(actor));for(int i=0;i<2;i++){var set=new StringJoiner(",");updates.get(i).forEach(v->set.add(v==null?"null":Integer.toString(((Attr)v).id)));out.println("updates "+i+" "+set);}var roots=new ArrayList<MobEffectInstance>();var entries=new StringJoiner(",");for(var e:map().entrySet()){entries.add(key(e.getKey())+"="+id(e.getValue()));roots.add(e.getValue());}out.println("map "+entries);for(int i=0;i<pool.length;i++){out.println("pool "+i+" "+id(pool[i]));roots.add(pool[i]);}var seen=new IdentityHashMap<MobEffectInstance,Boolean>();for(int i=0;i<roots.size();i++){var e=roots.get(i);if(seen.put(e,true)!=null)continue;int id=id(e);var h=(MobEffectInstance)hidden.get(e);String hid="none";if(h!=null){roots.add(h);hid=Integer.toString(id(h));}var b=blend.get(e);out.println("node "+id+" "+key(e.getEffect())+" "+e.getDuration()+" "+e.getAmplifier()+" "+e.isAmbient()+" "+e.isVisible()+" "+e.showIcon()+" "+hid+" "+bits(factor.getFloat(b))+" "+bits(previous.getFloat(b)));}}catch(Exception e){throw new AssertionError(e);}} + void raw(JsonObject op){int a=n(op,"a"),b=n(op,"b");switch(op.get("op").getAsString()){case "pending-add"->updates.get(a).add(b<0?null:attributeInstances[b]);case "pending-remove"->updates.get(a).remove(b<0?null:attributeInstances[b]);case "pending-clear"->updates.get(a).clear();case "put"->map().put(keys.get(a),pool[b]);case "drop"->map().remove(keys.get(a));case "clear"->map().clear();case "copy"->pool[b]=new MobEffectInstance(pool[a]);case "alias"->pool[b]=pool[a];default->throw new AssertionError();}} + void event(String name){out.println("event "+name);int i=calls++;all();if(i==n(f,"fail"))throw new Stop();if(i==n(f,"mutate")){changed=true;reset();for(var op:f.getAsJsonArray("mutations"))raw(op.getAsJsonObject());}} + } + static final class Effect extends MobEffect {int id,hash;Effect(int id,int hash){super(MobEffectCategory.BENEFICIAL,0);this.id=id;this.hash=hash;}@Override public int hashCode(){return hash;} + @Override public void addAttributeModifiers(AttributeMap attributes,int amp){active.event("add-modifiers "+id+" "+((Attrs)attributes).id+" "+amp);} + @Override public void removeAttributeModifiers(AttributeMap attributes){active.event("remove-modifiers "+id+" "+((Attrs)attributes).id);} + @Override public void onEffectAdded(LivingEntity actor,int amp){if(actor!=active.actor)throw new AssertionError();active.event("effect-added "+id+" "+amp);} + @Override public void onEffectStarted(LivingEntity actor,int amp){if(actor!=active.actor)throw new AssertionError();active.event("effect-started "+id+" "+amp);} + } + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Data d;Actor(){super(null,null);} + @Override public boolean is(TagKey<EntityType<?>> tag){int i=tag==EntityTypeTags.IMMUNE_TO_INFESTED?0:tag==EntityTypeTags.IMMUNE_TO_OOZING?1:tag==EntityTypeTags.IGNORES_POISON_AND_REGEN?2:-1;if(i<0)throw new AssertionError();d.event("tag "+i);return d.config().getAsJsonArray("tags").get(i).getAsBoolean();} + @Override public AttributeMap getAttributes(){d.event("attributes");return d.attributes[n(d.config(),"attributes")];} + @Override protected void onAttributeUpdated(Holder<Attribute> h){d.event("attribute-updated "+attributeHolders.indexOf(h));} + @Override public int getId(){d.event("entity-id");return n(d.config(),"entity");} + void added(MobEffectInstance e){super.onEffectAdded(e,null);}void updated(MobEffectInstance e,boolean apply){super.onEffectUpdated(e,apply,null);}void removed(List<MobEffectInstance> es){super.onEffectsRemoved(es);} + @Override public Level level(){d.event("level");return d.levels[n(d.config(),"level")];} + @Override public MobEffectInstance getEffect(Holder<MobEffect> e){d.event("get "+d.key(e));return super.getEffect(e);} + } + static final class EffectLevel extends ServerLevel{Data d;int id;EffectLevel(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public boolean isClientSide(){d.event("client "+id);return d.config().get("client").getAsBoolean();}} + static final class Attr extends AttributeInstance {Data d;int id,hash;Attr(){super(null,null);}@Override public int hashCode(){return hash;}@Override public Holder<Attribute> getAttribute(){d.event("attribute "+id);return attributeHolders.get(d.config().getAsJsonArray("holders").get(id).getAsInt());}} + static final class Attrs extends AttributeMap {Data d;int id;Attrs(){super(null);}@Override public Set<AttributeInstance> getAttributesToUpdate(){d.event("pending "+id);return d.updates.get(d.config().getAsJsonArray("routes").get(id).getAsInt());}} + static final class Connection extends ServerGamePacketListenerImpl {Data d;int id;Connection(){super(null,null,null,null);}@Override public void send(Packet<?> packet){String body;if(packet instanceof ClientboundUpdateMobEffectPacket p){int flags=(p.isEffectAmbient()?1:0)|(p.isEffectVisible()?2:0)|(p.effectShowsIcon()?4:0)|(p.shouldBlend()?8:0);body="update "+p.getEntityId()+" "+d.key(p.getEffect())+" "+p.getEffectAmplifier()+" "+p.getEffectDurationTicks()+" "+flags;}else if(packet instanceof ClientboundRemoveMobEffectPacket p){body="remove "+p.entityId()+" "+d.key(p.effect());}else throw new AssertionError();d.event("packet "+id+" "+body);}} + public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();known=List.of(MobEffects.INFESTED,MobEffects.OOZING,MobEffects.REGENERATION,MobEffects.POISON);attributeHolders=List.of(Attributes.MAX_HEALTH,Attributes.MAX_ABSORPTION,Attributes.SCALE,Attributes.WAYPOINT_TRANSMIT_RANGE);dirty=field(LivingEntity.class,"effectsDirty");passengers=field(Entity.class,"passengers");refresh=LivingEntity.class.getDeclaredMethod("refreshDirtyAttributes");refresh.setAccessible(true);var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);activeEffects=field(LivingEntity.class,"activeEffects");removed=field(Entity.class,"removalReason");duration=field(MobEffectInstance.class,"duration");amplifier=field(MobEffectInstance.class,"amplifier");ambient=field(MobEffectInstance.class,"ambient");visible=field(MobEffectInstance.class,"visible");icon=field(MobEffectInstance.class,"showIcon");hidden=field(MobEffectInstance.class,"hiddenEffect");blend=field(MobEffectInstance.class,"blendState");factor=field(blend.getType(),"factor");previous=field(blend.getType(),"factorPreviousFrame");Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var enriched=new PrintWriter(Files.newBufferedWriter(dir.resolve("inputs-"+args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();active=d;d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;var hashes=new JsonArray();var identities=new JsonArray();for(var hash:d.f.getAsJsonArray("hashes")){int id=d.keys.size();var h=id<4?known.get(id):Holder.<MobEffect>direct(new Effect(id,hash.getAsInt()));d.keys.add(h);hashes.add(h.hashCode());identities.add(System.identityHashCode(h));}d.f.add("hashes",hashes);d.f.add("identities",identities);enriched.println(d.f);d.actor=make(Actor.class);d.actor.d=d;dirty.setBoolean(d.actor,true);d.other=make(net.minecraft.world.entity.decoration.ArmorStand.class);activeEffects.set(d.actor,new HashMap<Holder<MobEffect>,MobEffectInstance>());d.levels=new EffectLevel[2];for(int i=0;i<2;i++){d.levels[i]=make(EffectLevel.class);d.levels[i].d=d;d.levels[i].id=i;}var states=d.config().getAsJsonArray("states");d.pool=new MobEffectInstance[states.size()];for(int i=0;i<d.pool.length;i++){var v=states.get(i).getAsJsonObject();int h=n(v,"hidden");d.pool[i]=new MobEffectInstance(d.keys.get(n(v,"key")),n(v,"duration"),n(v,"amplifier"),v.get("ambient").getAsBoolean(),v.get("visible").getAsBoolean(),v.get("icon").getAsBoolean(),h<0?null:d.pool[h]);}d.connections=new Connection[2];d.riders=new ServerPlayer[2];d.attributes=new Attrs[2];d.updates=List.of(new ObjectOpenHashSet<>(),new ObjectOpenHashSet<>());for(int i=0;i<2;i++){d.connections[i]=make(Connection.class);d.connections[i].d=d;d.connections[i].id=i;d.riders[i]=make(ServerPlayer.class);d.attributes[i]=make(Attrs.class);d.attributes[i].d=d;d.attributes[i].id=i;}var ah=d.f.getAsJsonArray("attribute_hashes");d.attributeInstances=new Attr[ah.size()];for(int i=0;i<ah.size();i++){var at=make(Attr.class);at.d=d;at.id=i;at.hash=ah.get(i).getAsInt();d.attributeInstances[i]=at;}d.reset();for(var op:d.f.getAsJsonArray("setup"))d.raw(op.getAsJsonObject());d.all(); + for(var value:d.f.getAsJsonArray("ops")){var op=value.getAsJsonObject();int a=n(op,"a"),b=n(op,"b"),source=n(op,"source");Entity src=source<0?null:source==0?d.actor:d.other;String result="ok";try{switch(op.get("op").getAsString()){ + case "eligible"->result=Boolean.toString(d.actor.canBeAffected(d.pool[a])); + case "notify-add"->d.actor.added(d.pool[a]);case "notify-update"->d.actor.updated(d.pool[a],op.get("reapply").getAsBoolean());case "notify-remove"->{var es=new ArrayList<MobEffectInstance>();for(var i:op.getAsJsonArray("list"))es.add(d.pool[i.getAsInt()]);d.actor.removed(es);} + case "send"->d.actor.sendEffectToPassengers(d.pool[a]);case "refresh"->{try{refresh.invoke(d.actor);}catch(InvocationTargetException ex){if(ex.getCause() instanceof RuntimeException e)throw e;throw new AssertionError(ex.getCause());}} + case "pending-add","pending-remove","pending-clear"->d.raw(op); + case "add"->result=Boolean.toString(d.actor.addEffect(d.pool[a],src));case "force"->d.actor.forceAddEffect(d.pool[a],src);case "remove"->result=Boolean.toString(d.actor.removeEffect(d.keys.get(a)));case "remove-raw"->{var e=d.actor.removeEffectNoUpdate(d.keys.get(a));result=e==null?"none":Integer.toString(d.id(e));}case "all"->result=Boolean.toString(d.actor.removeAllEffects());case "has"->result=Boolean.toString(d.actor.hasEffect(d.keys.get(a)));case "get"->{var e=d.actor.getEffect(d.keys.get(a));result=e==null?"none":Integer.toString(d.id(e));}case "blend"->result=Long.toString(bits(d.actor.getEffectBlendFactor(d.keys.get(a),fl(op,"partial"))));case "put","drop","clear","copy","alias"->d.raw(op);default->throw new AssertionError(); + }}catch(Stop e){result="callback";}catch(NullPointerException e){result="null";}catch(IndexOutOfBoundsException e){result="bounds";}catch(NoSuchElementException e){result="empty";}out.println("result "+result);d.all();} + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEffectParticlesOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEffectParticlesOracle.java new file mode 100644 index 000000000..a20d01f85 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEffectParticlesOracle.java @@ -0,0 +1,70 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import java.lang.reflect.*; +import java.nio.file.*; +import net.minecraft.core.Holder; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.core.particles.*; +import net.minecraft.world.effect.*; + +/** Exports and checks the pinned registry's inherited, pure particle factories. */ +public final class VanillaEffectParticlesOracle { + static Field field(Class<?> c, String name) throws Exception { + var f = c.getDeclaredField(name); f.setAccessible(true); return f; + } + static JsonObject particle(ParticleOptions p) throws Exception { + var result = new JsonObject(); + result.addProperty("type", BuiltInRegistries.PARTICLE_TYPE.getKey(p.getType()).toString()); + if (p.getClass() == ColorParticleOption.class) { + result.addProperty("color", Integer.toUnsignedLong(field(ColorParticleOption.class, "color").getInt(p))); + } else if (!(p instanceof SimpleParticleType)) throw new AssertionError("unsupported registered particle: " + p.getClass()); + return result; + } + static JsonObject export() throws Exception { + var root = new JsonObject(); + root.addProperty("data_version", net.minecraft.SharedConstants.getCurrentVersion().dataVersion().version()); + int alpha = field(MobEffect.class, "AMBIENT_ALPHA").getInt(null); + if (alpha != 38) throw new AssertionError("ambient alpha changed"); + root.addProperty("ambient_alpha", alpha); + var definitions = new JsonArray(); + for (var effect : BuiltInRegistries.MOB_EFFECT) { + var holder = BuiltInRegistries.MOB_EFFECT.wrapAsHolder(effect); + if (effect.getClass().getMethod("createParticleOptions", MobEffectInstance.class).getDeclaringClass() != MobEffect.class) + throw new AssertionError("registered factory override requires inspection: " + effect.getClass()); + // MobEffect's two constructors assign their sole captured argument + // to a final factory. The pinned bytecode uses only that argument + // and the ordinary instance's ambient flag; it has no world access. + Object factory = field(MobEffect.class, "particleFactory").get(effect); + Field[] captures = factory.getClass().getDeclaredFields(); + if (captures.length != 1) throw new AssertionError("factory capture layout changed"); + captures[0].setAccessible(true); + Object captured = captures[0].get(factory); + var def = new JsonObject(); def.addProperty("id", holder.getRegisteredName()); + if (captured instanceof Integer color) { + def.addProperty("factory", "color"); def.addProperty("color", Integer.toUnsignedLong(color)); + } else if (captured instanceof ParticleOptions p) { + if (!(p instanceof SimpleParticleType)) throw new AssertionError("constant option identity needs a new export schema"); + def.addProperty("factory", "constant"); def.add("particle", particle(p)); + } else throw new AssertionError("unexpected factory capture: " + captured); + for (boolean ambient : new boolean[] {false, true}) { + for (int amplifier : new int[] {0, 1, 127, 255}) { + var instance = new MobEffectInstance(holder, 200, amplifier, ambient, true, true); + var a = effect.createParticleOptions(instance); var b = effect.createParticleOptions(instance); + if (captured instanceof Integer color) { + int expected = ((ambient ? alpha : 255) << 24) | (color & 0xffffff); + if (a.getClass() != ColorParticleOption.class || a.getType() != ParticleTypes.ENTITY_EFFECT + || field(ColorParticleOption.class, "color").getInt(a) != expected || a == b || a.equals(b)) + throw new AssertionError("color factory value/identity changed"); + } else if (a != captured || b != captured) throw new AssertionError("constant identity changed"); + } + } + definitions.add(def); + } + root.add("effects", definitions); return root; + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); + Files.writeString(Path.of(args[0]), export().toString()); + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEffectSyncOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEffectSyncOracle.java new file mode 100644 index 000000000..fd0f5ebbe --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEffectSyncOracle.java @@ -0,0 +1,159 @@ +package dev.horizonlab.parity; + +import static dev.horizonlab.parity.VanillaEffectParticlesOracle.*; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.Holder; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.core.particles.ParticleOptions; +import net.minecraft.world.effect.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.level.Level; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.network.syncher.*; + +/** Inherited native effect synchronization and real heterogeneous entity data. */ +public final class VanillaEffectSyncOracle { + static Object unsafe; static Method allocate, dirtyUpdate, particlesUpdate, glowingUpdate; + static Field dataField, dirtyField, tagField, effectsField, visibleField, ambientField; + static EntityDataAccessor<Byte> flagsKey; + static EntityDataAccessor<Boolean> ambientKey; + static EntityDataAccessor<List<ParticleOptions>> particlesKey; + static Constructor<SynchedEntityData> dataCtor; + static List<Holder<MobEffect>> keys = new ArrayList<>(); + static <T> T make(Class<T> c) throws Exception { return c.cast(allocate.invoke(unsafe, c)); } + static Method method(String name) throws Exception { var m = LivingEntity.class.getDeclaredMethod(name); m.setAccessible(true); return m; } + static void invoke(Method m, Actor actor) throws Exception { try { m.invoke(actor); } catch (InvocationTargetException e) { if (e.getCause() instanceof RuntimeException x) throw x; throw new AssertionError(e.getCause()); } } + static final class Stop extends RuntimeException {} + static final class Data { + Actor actor; EffectLevel level; PrintWriter out; JsonObject op; + SynchedEntityData[] tables = new SynchedEntityData[2]; + List<SynchedEntityData.DataItem<?>>[] items; + Map<Holder<MobEffect>, MobEffectInstance> effects = new HashMap<>(); + List<MobEffectInstance> pool = new ArrayList<>(); + List<ParticleOptions> particles = new ArrayList<>(); + int data, calls; boolean client; + String particleRef(ParticleOptions p) throws Exception { + int id = -1; for (int i = 0; i < particles.size(); i++) if (particles.get(i) == p) { id = i; break; } + if (id < 0) { id = particles.size(); particles.add(p); } + var desc = particle(p); + return id + ":" + desc.get("type").getAsString() + ":" + (desc.has("color") ? desc.get("color").getAsString() : "none"); + } + String value(Object value) throws Exception { + if (value instanceof Byte b) return "flags:" + Byte.toUnsignedInt(b); + if (value instanceof Boolean b) return "ambient:" + b; + if (value instanceof List<?> list) { + var refs = new StringJoiner(","); for (var p : list) refs.add(particleRef((ParticleOptions)p)); + return "particles:[" + refs + "]"; + } + throw new AssertionError(value); + } + String packed(List<SynchedEntityData.DataValue<?>> values) throws Exception { + if (values == null) return "none"; + var result = new StringJoiner("|"); for (var v : values) result.add(v.id() + "=" + value(v.value())); + return result.length() == 0 ? "empty" : result.toString(); + } + void event(String name) { + int call = calls++; out.println("event " + call + " " + name); + if (call == op.get("fail").getAsInt()) throw new Stop(); + if (call == op.get("mutate").getAsInt()) { + try { controls(op.getAsJsonObject("changes")); for (var action : op.getAsJsonArray("actions")) raw(action.getAsJsonObject()); } + catch (RuntimeException e) { throw e; } catch (Exception e) { throw new AssertionError(e); } + } + } + void controls(JsonObject c) throws Exception { + if (c.has("data")) data = c.get("data").getAsInt(); + if (c.has("client")) client = c.get("client").getAsBoolean(); + if (c.has("tag")) tagField.setBoolean(actor, c.get("tag").getAsBoolean()); + if (c.has("dirty")) dirtyField.setBoolean(actor, c.get("dirty").getAsBoolean()); + dataField.set(actor, tables[data]); + } + void raw(JsonObject op) throws Exception { + int target = op.get("target").getAsInt(), key = op.get("key").getAsInt(), slot = op.get("pool").getAsInt(); + switch (op.get("mode").getAsString()) { + case "put": effects.put(keys.get(key), pool.get(slot)); break; + case "drop": effects.remove(keys.get(key)); break; + case "clear": effects.clear(); break; + case "details": visibleField.setBoolean(pool.get(slot), op.get("visible").getAsBoolean()); ambientField.setBoolean(pool.get(slot), op.get("ambient").getAsBoolean()); break; + case "controls": controls(op.getAsJsonObject("changes")); break; + case "flags": tables[target].set(flagsKey, (byte)op.get("flags").getAsInt()); break; + case "ambient": tables[target].set(ambientKey, op.get("ambient").getAsBoolean()); break; + case "pack": out.println("packed " + target + " " + packed(tables[target].packDirty())); break; + case "defaults": out.println("defaults " + target + " " + packed(tables[target].getNonDefaultValues())); break; + default: throw new AssertionError(op); + } + } + void state() throws Exception { + out.println("state " + data + " " + client + " " + tagField.getBoolean(actor) + " " + dirtyField.getBoolean(actor) + " " + calls); + var entries = new StringJoiner(","); for (var e : effects.entrySet()) entries.add(keys.indexOf(e.getKey()) + "=" + pool.indexOf(e.getValue())); + out.println("effects " + entries); + for (int i = 0; i < pool.size(); i++) out.println("instance " + i + " " + pool.get(i).isVisible() + " " + pool.get(i).isAmbient()); + for (int i = 0; i < 2; i++) { + out.println("data " + i + " " + tables[i].isDirty()); + for (var item : items[i]) out.println("field " + item.getAccessor().id() + " " + value(item.getValue()) + " " + item.isDirty() + " " + item.isSetToDefault()); + } + } + } + static final class Actor extends net.minecraft.world.entity.monster.zombie.Zombie { + Data d; Actor() { super(null, null); } + @Override protected void updateInvisibilityStatus() { d.event("invisibility"); super.updateInvisibilityStatus(); } + @Override protected void removeEffectParticles() { d.event("remove-particles"); super.removeEffectParticles(); } + @Override public boolean hasEffect(Holder<MobEffect> effect) { d.event("has " + effect.getRegisteredName()); return super.hasEffect(effect); } + @Override public void setInvisible(boolean v) { d.event("invisible " + v); super.setInvisible(v); } + @Override public boolean isCurrentlyGlowing() { d.event("glowing"); return super.isCurrentlyGlowing(); } + @Override protected boolean getSharedFlag(int bit) { d.event("get-flag " + bit); return super.getSharedFlag(bit); } + @Override protected void setSharedFlag(int bit, boolean v) { d.event("set-flag " + bit + " " + v); super.setSharedFlag(bit, v); } + @Override public Level level() { d.event("level"); return d.level; } + @Override public void onSyncedDataUpdated(EntityDataAccessor<?> key) { d.event("updated " + key.id()); } + } + static final class EffectLevel extends ServerLevel { + Data d; EffectLevel() { super(null,null,null,null,null,null,false,0L,List.of(),false); } + @Override public boolean isClientSide() { d.event("client"); return d.client; } + } + @SuppressWarnings("unchecked") + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); + for (var effect : BuiltInRegistries.MOB_EFFECT) keys.add(BuiltInRegistries.MOB_EFFECT.wrapAsHolder(effect)); + flagsKey = (EntityDataAccessor<Byte>)field(Entity.class,"DATA_SHARED_FLAGS_ID").get(null); + ambientKey = (EntityDataAccessor<Boolean>)field(LivingEntity.class,"DATA_EFFECT_AMBIENCE_ID").get(null); + particlesKey = (EntityDataAccessor<List<ParticleOptions>>)field(LivingEntity.class,"DATA_EFFECT_PARTICLES").get(null); + Path dir = Path.of(args[1]); + if (args[0].startsWith("export-")) { + var catalog = export(); var schema = new JsonObject(); schema.addProperty("flags",flagsKey.id()); schema.addProperty("ambient",ambientKey.id()); schema.addProperty("particles",particlesKey.id()); catalog.add("schema",schema); + Files.writeString(dir.resolve("catalog-" + args[0].substring(7) + ".json"),catalog.toString()); return; + } + if (Actor.class.getSuperclass().getMethod("setInvisible",boolean.class).getDeclaringClass() != Entity.class || Actor.class.getSuperclass().getMethod("isCurrentlyGlowing").getDeclaringClass() != LivingEntity.class) throw new AssertionError("actor overrides inspected base methods"); + var u=Class.forName("sun.misc.Unsafe"); unsafe=field(u,"theUnsafe").get(null); allocate=u.getMethod("allocateInstance",Class.class); + dataField=field(Entity.class,"entityData"); dirtyField=field(LivingEntity.class,"effectsDirty"); tagField=field(Entity.class,"hasGlowingTag"); effectsField=field(LivingEntity.class,"activeEffects"); visibleField=field(MobEffectInstance.class,"visible"); ambientField=field(MobEffectInstance.class,"ambient"); + dirtyUpdate=method("updateDirtyEffects"); particlesUpdate=method("updateSynchronizedMobEffectParticles"); glowingUpdate=method("updateGlowingStatus"); + dataCtor=SynchedEntityData.class.getDeclaredConstructor(SyncedDataHolder.class,SynchedEntityData.DataItem[].class); dataCtor.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var enriched=new PrintWriter(Files.newBufferedWriter(dir.resolve("inputs-"+args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))) { + for(var line:(Iterable<String>)lines::iterator) { + var f=JsonParser.parseString(line).getAsJsonObject(); var d=new Data();d.out=out;d.actor=make(Actor.class);d.actor.d=d;d.level=make(EffectLevel.class);d.level.d=d; + effectsField.set(d.actor,d.effects);dirtyField.setBoolean(d.actor,true); d.items=(List<SynchedEntityData.DataItem<?>>[])new List<?>[2]; + for(int i=0;i<2;i++) { + var a=new SynchedEntityData.DataItem<Byte>(flagsKey,(byte)f.getAsJsonArray("flags").get(i).getAsInt());var b=new SynchedEntityData.DataItem<Boolean>(ambientKey,f.getAsJsonArray("ambient").get(i).getAsBoolean());var c=new SynchedEntityData.DataItem<List<ParticleOptions>>(particlesKey,List.of()); + d.items[i]=new ArrayList<>(List.of(a,b,c));d.items[i].sort(Comparator.comparingInt(item->item.getAccessor().id())); + var entries=new SynchedEntityData.DataItem<?>[Math.max(flagsKey.id(),Math.max(ambientKey.id(),particlesKey.id()))+1];for(int j=0;j<entries.length;j++)entries[j]=new SynchedEntityData.DataItem<Byte>(new EntityDataAccessor<Byte>(j,EntityDataSerializers.BYTE),(byte)0);for(var item:d.items[i])entries[item.getAccessor().id()]=item; + d.tables[i]=dataCtor.newInstance(d.actor,entries); + } + for(var v:f.getAsJsonArray("pool")) {var e=v.getAsJsonObject();d.pool.add(new MobEffectInstance(keys.get(e.get("effect").getAsInt()),200,e.get("amplifier").getAsInt(),e.get("ambient").getAsBoolean(),e.get("visible").getAsBoolean(),true));} + d.controls(f.getAsJsonObject("controls"));for(var v:f.getAsJsonArray("setup"))d.raw(v.getAsJsonObject()); + for(var v:f.getAsJsonArray("ops")) {d.op=v.getAsJsonObject();d.calls=0;String result="ok";var op=d.op; + try {switch(op.get("mode").getAsString()) { + case "dirty-update":invoke(dirtyUpdate,d.actor);break;case "invisibility":d.actor.updateInvisibilityStatus();break;case "particles":invoke(particlesUpdate,d.actor);break;case "glowing-update":invoke(glowingUpdate,d.actor);break;case "remove-particles":d.actor.removeEffectParticles();break; + case "glowing":result=Boolean.toString(d.actor.isCurrentlyGlowing());break;case "glow-tag":d.actor.setGlowingTag(op.get("flag").getAsBoolean());break;case "invisible":d.actor.setInvisible(op.get("flag").getAsBoolean());break; + case "get-flag":result=Boolean.toString(d.actor.getSharedFlag(op.get("bit").getAsInt()));break;case "set-flag":d.actor.setSharedFlag(op.get("bit").getAsInt(),op.get("flag").getAsBoolean());break; + case "all-ambient":result=Boolean.toString(LivingEntity.areAllEffectsAmbient(d.effects.values()));break; + default:d.raw(op); + }}catch(Stop e){result="error callback";}out.println("result "+result);d.state(); + } + var hashes=new JsonArray();var identities=new JsonArray();for(var key:keys){hashes.add(key.hashCode());identities.add(System.identityHashCode(key));}f.add("hashes",hashes);f.add("identities",identities);enriched.println(f); + } + if(out.checkError()||enriched.checkError())throw new IOException("cannot write native trace"); + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java new file mode 100644 index 000000000..d86f73f78 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java @@ -0,0 +1,54 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.registries.*; +import net.minecraft.resources.Identifier; +import net.minecraft.world.entity.*; +import net.minecraft.world.entity.ai.attributes.*; +/** Native lazy entity attributes; set membership is observed in registry order. */ +public final class VanillaEntityAttributeOracle { + static String bits(double v){return String.format("%016x",Double.doubleToLongBits(v));} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static List<Holder<Attribute>> attributes=new ArrayList<>(); + static JsonObject export()throws Exception { + var root=new JsonObject();root.addProperty("data_version",net.minecraft.SharedConstants.getCurrentVersion().dataVersion().version()); + var defs=new JsonArray(); + for(var a:attributes){var v=a.value();var d=new JsonObject();d.addProperty("id",a.getRegisteredName());d.addProperty("default",bits(v.getDefaultValue()));d.addProperty("syncable",v.isClientSyncable());if(v instanceof RangedAttribute r){d.addProperty("min",bits(r.getMinValue()));d.addProperty("max",bits(r.getMaxValue()));}defs.add(d);} + root.add("attributes",defs);var entities=new JsonObject(); + for(var e:BuiltInRegistries.ENTITY_TYPE){if(!DefaultAttributes.hasSupplier(e))continue;var supplier=supplier(e);var bases=new JsonObject();for(var a:attributes)if(supplier.hasAttribute(a)){var instance=supplier.createInstance(v->{},a);if(!instance.getModifiers().isEmpty())throw new AssertionError("default modifiers require export support");bases.addProperty(a.getRegisteredName(),bits(supplier.getBaseValue(a)));}entities.add(BuiltInRegistries.ENTITY_TYPE.getKey(e).toString(),bases);} + root.add("entities",entities);return root; + } + @SuppressWarnings("unchecked") static AttributeSupplier supplier(EntityType<?> e){return DefaultAttributes.getSupplier((EntityType<? extends LivingEntity>)e);} + @SuppressWarnings("unchecked") public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + for(var a:BuiltInRegistries.ATTRIBUTE)attributes.add(BuiltInRegistries.ATTRIBUTE.wrapAsHolder(a)); + Path dir=Path.of(args[1]);if(args[0].equals("export")){Files.writeString(dir.resolve("catalog.json"),export().toString());return;} + var storage=field(AttributeMap.class,"attributes");var dirty=field(AttributeInstance.class,"dirty");var cached=field(AttributeInstance.class,"cachedValue"); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var entity=BuiltInRegistries.ENTITY_TYPE.getValue(Identifier.parse(f.get("entity").getAsString()));var map=new AttributeMap(supplier(entity));var instances=(Map<Holder<Attribute>,AttributeInstance>)storage.get(map); + for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonObject();var a=attributes.get(op.get("attribute").getAsInt());String mode=op.get("mode").getAsString();var id=Identifier.parse(op.get("id").getAsString()); + try{switch(mode){ + case "value":out.println("value "+bits(map.getValue(a)));break; + case "base":out.println("base "+bits(map.getBaseValue(a)));break; + case "has":out.println("has "+map.hasAttribute(a));break; + case "modifier":out.println("modifier "+bits(map.getModifierValue(a,id)));break; + case "has_modifier":out.println("has_modifier "+map.hasModifier(a,id));break; + case "ensure":out.println("ensure "+(map.getInstance(a)!=null));break; + case "reset":out.println("reset "+map.resetBaseValue(a));break; + case "ack_update":map.getAttributesToUpdate().remove(instances.get(a));break; + case "ack_sync":map.getAttributesToSync().remove(instances.get(a));break; + default:{var instance=map.getInstance(a);if(instance==null){out.println("absent");break;}var modifier=new AttributeModifier(id,number(op.get("amount")),AttributeModifier.Operation.values()[op.get("operation").getAsInt()]);switch(mode){ + case "set":instance.setBaseValue(number(op.get("base")));break; + case "add":instance.addTransientModifier(modifier);break; + case "update":instance.addOrUpdateTransientModifier(modifier);break; + case "permanent":instance.addPermanentModifier(modifier);break; + case "remove":out.println("removed "+instance.removeModifier(id));break; + case "clear":instance.removeModifiers();break; + default:throw new AssertionError(mode); + }} + }out.println("ok");}catch(NullPointerException e){out.println("error instance_modifier");}catch(IllegalArgumentException e){out.println("error "+(mode.equals("modifier")?(map.hasAttribute(a)?"modifier":"attribute"):(mode.equals("value")||mode.equals("base")?"attribute":"duplicate")));} + for(int i=0;i<attributes.size();i++){var key=attributes.get(i);var instance=instances.get(key);if(instance!=null)out.println("state "+i+" "+bits(instance.getBaseValue())+" "+dirty.getBoolean(instance)+" "+bits(cached.getDouble(instance))+" "+map.getAttributesToUpdate().contains(instance)+" "+map.getAttributesToSync().contains(instance)+" "+instance.getModifiers().size()+" "+instance.getPermanentModifiers().size());}out.println("end"); + } + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityCollisionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityCollisionOracle.java new file mode 100644 index 000000000..d313bd4b4 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityCollisionOracle.java @@ -0,0 +1,55 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import java.util.function.Predicate; +import net.minecraft.world.entity.*; +import net.minecraft.world.level.EntityGetter; +import net.minecraft.world.phys.AABB; +import net.minecraft.world.phys.shapes.*; +/** Actual EntityGetter collision selection with traced entity policy overrides. */ +public final class VanillaEntityCollisionOracle { + static final class Stop extends RuntimeException {} + static final class Trace { + PrintWriter out;int calls,fail; + void query(String text){out.println(text);if(calls++==fail)throw new Stop();} + } + public static class Snapshot extends Marker { + boolean spectator,collidable;int policy;Trace trace; + public Snapshot(){super(null,null);} + @Override public boolean isSpectator(){return spectator;} + @Override public boolean canBeCollidedWith(Entity source){trace.query("collidable "+getId()+" "+(source==null?-1:source.getId()));return collidable;} + @Override public boolean canCollideWith(Entity candidate){trace.query("collide "+getId()+" "+candidate.getId());return policy==0?super.canCollideWith(candidate):policy==1;} + } + static AABB box(JsonElement value){var v=value.getAsJsonArray();double[] d=new double[6];for(int i=0;i<6;i++)d[i]=Double.longBitsToDouble(Long.parseUnsignedLong(v.get(i).getAsString(),16));return new AABB(d[0],d[1],d[2],d[3],d[4],d[5]);} + @SuppressWarnings("unchecked") + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var allocator=Class.forName("sun.misc.Unsafe");var field=allocator.getDeclaredField("theUnsafe");field.setAccessible(true);var unsafe=field.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + var vehicle=Entity.class.getDeclaredField("vehicle");vehicle.setAccessible(true); + var emit=VanillaFaceSupportOracle.class.getDeclaredMethod("emit",PrintWriter.class,VoxelShape.class);emit.setAccessible(true); + Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){ + for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var trace=new Trace();trace.out=out;trace.fail=f.get("fail").getAsInt();var entities=new ArrayList<Snapshot>(); + for(var item:f.getAsJsonArray("entities")){ + var v=item.getAsJsonObject();var entity=(Snapshot)allocate.invoke(unsafe,Snapshot.class);entity.setId(entities.size()+1);entity.setBoundingBox(box(v.get("box")));entity.spectator=v.get("spectator").getAsBoolean();entity.collidable=v.get("collidable").getAsBoolean();entity.policy=v.get("policy").getAsInt();entity.trace=trace; + int parent=v.get("parent").getAsInt();if(parent>=0)vehicle.set(entity,entities.get(parent));entities.add(entity); + } + var world=(EntityGetter)Proxy.newProxyInstance(EntityGetter.class.getClassLoader(),new Class<?>[]{EntityGetter.class},(proxy,method,values)->{ + if(method.isDefault())return InvocationHandler.invokeDefault(proxy,method,values); + if(!method.getName().equals("getEntities")||values.length!=3)throw new AssertionError(method); + var source=(Entity)values[0];var bounds=(AABB)values[1];var predicate=(Predicate<Entity>)values[2]; + trace.query(String.format("query %d %016x %016x %016x %016x %016x %016x",source==null?-1:source.getId(),Double.doubleToLongBits(bounds.minX),Double.doubleToLongBits(bounds.minY),Double.doubleToLongBits(bounds.minZ),Double.doubleToLongBits(bounds.maxX),Double.doubleToLongBits(bounds.maxY),Double.doubleToLongBits(bounds.maxZ))); + var selected=new ArrayList<Entity>();for(var entity:entities)if(entity!=source&&entity.getBoundingBox().intersects(bounds)&&predicate.test(entity))selected.add(entity);return selected; + }); + int source=f.get("source").getAsInt(); + try{var shapes=world.getEntityCollisions(source<0?null:entities.get(source),box(f.get("box")));out.println("selected "+shapes.size());for(var shape:shapes)emit.invoke(null,out,shape);} + catch(Stop error){out.println("error");} + out.println("queries "+trace.calls); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityFluidOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityFluidOracle.java new file mode 100644 index 000000000..10e24407e --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityFluidOracle.java @@ -0,0 +1,82 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.registries.*;import net.minecraft.resources.Identifier;import net.minecraft.tags.*; +import net.minecraft.world.entity.*;import net.minecraft.world.level.*;import net.minecraft.world.level.biome.*;import net.minecraft.world.level.block.*;import net.minecraft.world.level.block.state.*;import net.minecraft.world.level.chunk.*;import net.minecraft.world.level.chunk.status.ChunkStatus;import net.minecraft.world.level.material.*;import net.minecraft.world.phys.*; +/** Actual entity immersion/current state machine with controlled cell providers and real chunk sections. */ +public final class VanillaEntityFluidOracle { + static final class Stop extends RuntimeException {} + static java.util.function.Consumer<JsonObject> setup; + static Object unsafe;static Method allocate;static Field blockPosition,level,touch,first,interactionField; + static net.minecraft.world.level.material.Fluid[] KINDS; + static <T>T make(Class<T> c){try{return c.cast(allocate.invoke(unsafe,c));}catch(Exception e){throw new AssertionError(e);}} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static Vec3 vec(JsonElement v){var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static String vector(Vec3 v){return String.format("%016x %016x %016x",Double.doubleToLongBits(v.x),Double.doubleToLongBits(v.y),Double.doubleToLongBits(v.z));} + static String pos(BlockPos p){return p.getX()+" "+p.getY()+" "+p.getZ();} + static BlockPos position(JsonElement v){var a=v.getAsJsonArray();return new BlockPos(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt());} + static AABB bounds(JsonElement v){if(v.isJsonNull())return null;var a=v.getAsJsonArray();return new AABB(number(a.get(0)),number(a.get(1)),number(a.get(2)),number(a.get(3)),number(a.get(4)),number(a.get(5)));} + static final class Data {JsonObject op;PrintWriter out;int calls,pushed;Vec3 velocity;Entity entity;Chunk chunk;FluidState[] states; + void query(String s){out.println(s);int n=calls++;if(n==op.get("fail").getAsInt())throw new Stop();if(n==op.get("mutate_at").getAsInt()){velocity=vec(op.get("after_velocity"));try{blockPosition.set(entity,position(op.get("after_block")));if(op.has("after_touch")){touch.setBoolean(entity,op.get("after_touch").getAsBoolean());first.setBoolean(entity,op.get("after_first").getAsBoolean());entity.fallDistance=number(op.get("after_fall"));}}catch(Exception e){throw new AssertionError(e);}}} + JsonObject cell(BlockPos p){var c=op.getAsJsonObject("cells").get(pos(p));return(c==null?op.get("default"):c).getAsJsonObject();} + boolean pushed(){query("pushed");var a=op.getAsJsonArray("pushed");return a.get(Math.min(pushed++,a.size()-1)).getAsBoolean();} + AABB box(){query("box");return bounds(op.get("bounds"));} + double eye(){query("eye");return number(op.get("eye"));} + Vec3 velocity(){query("velocity");return velocity;} + void set(Vec3 v){query("set "+vector(v));velocity=v;} + } + static final class Fluid extends WaterFluid.Source {Data d;int kind; + @Override protected boolean isEmpty(){return kind==0;} + @Override public boolean isSource(FluidState s){return kind==2||kind==4;} + @Override public Holder.Reference<net.minecraft.world.level.material.Fluid> builtInRegistryHolder(){return KINDS[kind].builtInRegistryHolder();} + @Override public float getHeight(FluidState s,BlockGetter w,BlockPos p){d.query("height "+pos(p));return single(d.cell(p).get("height"));} + @Override public Vec3 getFlow(BlockGetter w,BlockPos p,FluidState s){d.query("flow "+pos(p));return vec(d.cell(p).get("flow"));} + } + static final class Chunk extends ProtoChunk {Data d; + Chunk(Data d,PalettedContainerFactory factory,int min,int height){super(new ChunkPos(0,0),UpgradeData.EMPTY,LevelHeightAccessor.create(min,height),factory,null);} + @Override public LevelChunkSection[] getSections(){if(d!=null)d.query("sections");return super.getSections();} + } + static final class World extends net.minecraft.server.level.ServerLevel {Data d;World(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public net.minecraft.world.attribute.EnvironmentAttributeSystem environmentAttributes(){d.query("fast-lava");return net.minecraft.world.attribute.EnvironmentAttributeSystem.builder().addConstantLayer(net.minecraft.world.attribute.EnvironmentAttributes.FAST_LAVA,previous->d.op.get("fast_lava").getAsBoolean()).build();} + @Override public ChunkAccess getChunk(int x,int z,ChunkStatus status,boolean create){if(status!=ChunkStatus.FULL||create)throw new AssertionError();d.query("chunk "+x+" "+z);return d.op.getAsJsonArray("missing").contains(new JsonPrimitive(x+" "+z))?null:d.chunk;} + @Override public FluidState getFluidState(BlockPos p){d.query("fluid "+pos(p));return d.op.get("mode").getAsString().equals("registered")?Block.stateById(d.cell(p).get("state").getAsInt()).getFluidState():d.states[d.cell(p).get("kind").getAsInt()];} + @Override public net.minecraft.world.level.block.entity.BlockEntity getBlockEntity(BlockPos p){d.query("entity "+pos(p));return null;} + @Override public BlockState getBlockState(BlockPos p){d.query("block "+pos(p));return d.op.get("mode").getAsString().equals("registered")?Block.stateById(d.cell(p).get("state").getAsInt()):(d.op.get("sturdy").getAsBoolean()?Blocks.STONE:Blocks.AIR).defaultBlockState();} + } + static final class Actor extends Marker {Data d;Actor(){super(null,null);} + @Override public boolean isPushedByFluid(){return d.pushed();} + @Override public void resetFallDistance(){d.query("reset-fall");super.resetFallDistance();} + @Override protected void doWaterSplashEffect(){d.query("splash");} + @Override public AABB getFluidInteractionBox(){return d.box();}@Override public double getEyeY(){return d.eye();} + @Override public Vec3 getDeltaMovement(){return d.velocity();}@Override public void setDeltaMovement(Vec3 v){d.set(v);} + } + static final class Human extends net.minecraft.world.entity.player.Player {Data d;Human(){super(null,null);} + @Override public GameType gameMode(){return GameType.SURVIVAL;} + @Override public boolean isPushedByFluid(){return d.pushed();} + @Override public void resetFallDistance(){d.query("reset-fall");super.resetFallDistance();} + @Override protected void doWaterSplashEffect(){d.query("splash");} + @Override public AABB getFluidInteractionBox(){return d.box();}@Override public double getEyeY(){return d.eye();} + @Override public Vec3 getDeltaMovement(){return d.velocity();}@Override public void setDeltaMovement(Vec3 v){d.set(v);} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();KINDS=new net.minecraft.world.level.material.Fluid[]{Fluids.EMPTY,Fluids.FLOWING_WATER,Fluids.WATER,Fluids.FLOWING_LAVA,Fluids.LAVA};var u=Class.forName("sun.misc.Unsafe");var uf=field(u,"theUnsafe");unsafe=uf.get(null);allocate=u.getMethod("allocateInstance",Class.class);blockPosition=field(Entity.class,"blockPosition");level=field(Entity.class,"level");touch=field(Entity.class,"wasTouchingWater");first=field(Entity.class,"firstTick");interactionField=field(Entity.class,"fluidInteraction");var tick=Entity.class.getDeclaredMethod("updateFluidInteraction");tick.setAccessible(true); + var trackers=field(EntityFluidInteraction.class,"fluidTrackers");var currents=field(EntityFluidInteraction.class,"currentAccumulators");var trackerClass=Class.forName("net.minecraft.world.entity.EntityFluidInteraction$Tracker");var kind=field(trackerClass,"fluidType");var height=field(trackerClass,"height");var eyes=field(trackerClass,"eyesInside");var currentClass=Class.forName("net.minecraft.world.entity.EntityFluidInteraction$CurrentAccumulator");var depth=field(currentClass,"height");var accumulated=field(currentClass,"accumulatedCurrent");var count=field(currentClass,"currentCount"); + var tags=new ArrayList<TagKey<net.minecraft.world.level.material.Fluid>>();for(int i=0;i<4;i++)tags.add(i==0?FluidTags.WATER:i==1?FluidTags.LAVA:TagKey.create(Registries.FLUID,Identifier.parse("horizon:immersion_"+i))); + Holder<Biome> biome=Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},Biomes.PLAINS);var ids=new IdMapper<Holder<Biome>>();ids.add(biome);var factory=new PalettedContainerFactory(Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY),Blocks.AIR.defaultBlockState(),null,Strategy.createForBiomes(ids),biome,null); + Path dir=Path.of(args[1]);try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var ordered=new LinkedHashSet<TagKey<net.minecraft.world.level.material.Fluid>>();for(var t:f.getAsJsonArray("order"))ordered.add(tags.get(t.getAsInt()));var interaction=new EntityFluidInteraction(ordered); + var d=new Data();d.out=out;d.states=new FluidState[5];for(int i=0;i<5;i++){var fluid=make(Fluid.class);fluid.d=d;fluid.kind=i;d.states[i]=new FluidState(fluid,new net.minecraft.world.level.block.state.properties.Property<?>[0],new Comparable<?>[0]);}var w=make(World.class);w.d=d; + if(f.get("player").getAsBoolean()){var e=make(Human.class);e.d=d;d.entity=e;}else{var e=make(Actor.class);e.d=d;d.entity=e;}level.set(d.entity,w);interactionField.set(d.entity,interaction);if(f.has("tick_initial")){var initial=f.getAsJsonObject("tick_initial");touch.setBoolean(d.entity,initial.get("touch").getAsBoolean());first.setBoolean(d.entity,initial.get("first").getAsBoolean());d.entity.fallDistance=number(initial.get("fall"));} + for(var value:f.getAsJsonArray("ops")){d.op=value.getAsJsonObject();var op=d.op;if(setup!=null)setup.accept(op);d.calls=0;d.pushed=0;d.velocity=vec(op.get("velocity"));blockPosition.set(d.entity,position(op.get("block")));d.entity.setBoundingBox(new AABB(0,number(op.get("base_y")),0,1,number(op.get("base_y"))+1,1)); + var bindings=new HashMap<TagKey<net.minecraft.world.level.material.Fluid>,List<Holder<net.minecraft.world.level.material.Fluid>>>();for(int t=0;t<4;t++){var members=new ArrayList<Holder<net.minecraft.world.level.material.Fluid>>();int mask=op.getAsJsonArray("tags").get(t).getAsInt();for(int k=0;k<5;k++)if((mask&(1<<k))!=0)members.add(KINDS[k].builtInRegistryHolder());bindings.put(tags.get(t),members);}BuiltInRegistries.FLUID.prepareTagReload(new TagLoader.LoadResult<>(Registries.FLUID,bindings)).apply(); + var wet=op.getAsJsonArray("wet");d.chunk=new Chunk(d,factory,op.get("min_section").getAsInt()*16,wet.size()*16);for(int i=0;i<wet.size();i++)if(wet.get(i).getAsBoolean())d.chunk.getSection(i).setBlockState(0,0,0,Blocks.WATER.defaultBlockState(),false);d.chunk.d=d; + try{if(op.get("mode").getAsString().equals("tick"))out.println("result "+tick.invoke(d.entity));else if(op.get("mode").getAsString().equals("update")||op.get("mode").getAsString().equals("registered"))out.println("result "+interaction.update(d.entity,op.get("ignore").getAsBoolean()));else{interaction.applyCurrentTo(tags.get(op.get("tag").getAsInt()),d.entity,number(op.get("speed")));out.println("result ok");}}catch(Stop e){out.println("error");}catch(InvocationTargetException e){if(e.getCause() instanceof Stop)out.println("error");else throw e;} + var list=(List<?>)trackers.get(interaction);out.println("trackers "+list.size());for(var t:list){Object holder=kind.get(t);int k=-1;for(int i=0;i<5;i++)if(KINDS[i].builtInRegistryHolder()==holder)k=i;out.printf("tracker %d %016x %s%n",k,Double.doubleToLongBits(height.getDouble(t)),eyes.getBoolean(t));} + var map=(Map<?,?>)currents.get(interaction);for(var tag:ordered){var c=map.get(tag);out.printf("current %d %016x %s %d%n",tags.indexOf(tag),Double.doubleToLongBits(depth.getDouble(c)),vector((Vec3)accumulated.get(c)),count.getInt(c));} + for(int t=0;t<4;t++)out.printf("tag %d %016x %s %s%n",t,Double.doubleToLongBits(interaction.getFluidHeight(tags.get(t))),interaction.isInFluid(tags.get(t)),interaction.isEyeInFluid(tags.get(t))); + out.println("final "+vector(d.velocity));out.println("queries "+d.calls);if(f.has("tick_initial"))out.printf("tick %s %s %016x%n",touch.getBoolean(d.entity),first.getBoolean(d.entity),Double.doubleToLongBits(d.entity.fallDistance)); + } + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityModelExporter.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityModelExporter.java new file mode 100644 index 000000000..7d801bbbc --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityModelExporter.java @@ -0,0 +1,67 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import java.lang.reflect.Field; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.SharedConstants; +import net.minecraft.client.model.geom.LayerDefinitions; +import net.minecraft.client.model.geom.ModelPart; +import net.minecraft.server.Bootstrap; + +/** + * Original exporter of every baked entity model layer (part tree, initial poses and + * textured polygons) produced by vanilla's own LayerDefinitions. + */ +public final class VanillaEntityModelExporter { + private static Field cubes; + private static Field children; + + @SuppressWarnings("unchecked") + private static JsonObject part(ModelPart part) throws Exception { + var o = new JsonObject(); + var pose = new JsonArray(); + for (float f : new float[] {part.x, part.y, part.z, part.xRot, part.yRot, part.zRot, part.xScale, part.yScale, part.zScale}) + pose.add(f); + o.add("pose", pose); + var polygons = new JsonArray(); + for (ModelPart.Cube cube : (List<ModelPart.Cube>) cubes.get(part)) { + for (ModelPart.Polygon polygon : cube.polygons) { + var p = new JsonArray(); + for (ModelPart.Vertex v : polygon.vertices()) { + var vertex = new JsonArray(); + // Degenerate (zero-size) faces have NaN UVs: write them as 0. + for (float f : new float[] {v.x(), v.y(), v.z(), v.u(), v.v()}) + vertex.add(Float.isFinite(f) ? f : 0.0F); + p.add(vertex); + } + polygons.add(p); + } + } + o.add("polygons", polygons); + var kids = new JsonObject(); + for (var entry : ((Map<String, ModelPart>) children.get(part)).entrySet()) + kids.add(entry.getKey(), part(entry.getValue())); + o.add("children", kids); + return o; + } + + public static void main(String[] args) throws Exception { + SharedConstants.tryDetectVersion(); + Bootstrap.bootStrap(); + cubes = ModelPart.class.getDeclaredField("cubes"); + cubes.setAccessible(true); + children = ModelPart.class.getDeclaredField("children"); + children.setAccessible(true); + var out = new JsonObject(); + for (var entry : LayerDefinitions.createRoots().entrySet()) { + try { + out.add(entry.getKey().toString(), part(entry.getValue().bakeRoot())); + } catch (RuntimeException error) { + System.err.println("skipped " + entry.getKey() + ": " + error); + } + } + Files.writeString(Path.of(args[0]), new Gson().toJson(out), StandardCharsets.UTF_8); + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityMoveOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityMoveOracle.java new file mode 100644 index 000000000..8c40f26c4 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityMoveOracle.java @@ -0,0 +1,92 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.tags.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.level.border.WorldBorder; +import net.minecraft.world.level.gameevent.GameEvent; +import net.minecraft.world.phys.*; +import net.minecraft.world.phys.shapes.*; +/** Actual Entity.move with controlled lifecycle providers and native collision resolution. */ +public final class VanillaEntityMoveOracle { + static final class Stop extends RuntimeException {} + static Field position,stuck,history,removal; + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static Vec3 vector(JsonElement v){var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static String vec(String label,Vec3 v){return String.format("%s %016x %016x %016x",label,Double.doubleToLongBits(v.x),Double.doubleToLongBits(v.y),Double.doubleToLongBits(v.z));} + static String box(String label,AABB b){return String.format("%s %016x %016x %016x %016x %016x %016x",label,Double.doubleToLongBits(b.minX),Double.doubleToLongBits(b.minY),Double.doubleToLongBits(b.minZ),Double.doubleToLongBits(b.maxX),Double.doubleToLongBits(b.maxY),Double.doubleToLongBits(b.maxZ));} + static String pos(BlockPos p){return p.getX()+" "+p.getY()+" "+p.getZ();} + static void write(Field f,Object o,Object v){try{f.set(o,v);}catch(Exception e){throw new AssertionError(e);}} + static final class Data { + JsonObject f;PrintWriter out;int calls;Vec3 velocity;boolean grounded;Actor actor;State state;List<VoxelShape> shapes; + boolean flag(String n){return f.get(n).getAsBoolean();} + void query(String s){out.println(s);if(calls++==f.get("fail").getAsInt())throw new Stop();} + } + static final class BounceBlock extends Block { + Data d;BounceBlock(){super(BlockBehaviour.Properties.of());} + @Override public float getBounceRestitution(){d.query("block-bounce");return 0;} + } + static final class State extends BlockState { + Data d;BounceBlock block;State(){super(null,null,null);} + @Override public Block getBlock(){return block;} + @Override public boolean is(TagKey<Block> tag){if(tag!=BlockTags.SUPPRESSES_BOUNCE)throw new AssertionError();d.query("block-suppresses");return false;} + } + static final class Border extends WorldBorder { + Data d;@Override public boolean isInsideCloseToBorder(Entity e,AABB b){d.query(box("border-test",b));return false;} + } + static final class Level extends net.minecraft.server.level.ServerLevel { + Data d;Border border;Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public boolean isClientSide(){d.query("client");return d.flag("client");} + @Override public BlockState getBlockState(BlockPos p){d.query("block "+pos(p));return d.state;} + @Override public WorldBorder getWorldBorder(){d.query("border");return border;} + @Override public List<VoxelShape> getEntityCollisions(Entity e,AABB b){d.query(box("entities",b));return List.of();} + @Override public Iterable<VoxelShape> getBlockCollisions(Entity e,AABB b){d.query(box("blocks",b));return d.shapes;} + @Override public BlockHitResult clip(ClipContext c){d.query(vec("clip-from",c.getFrom()));d.query(vec("clip-to",c.getTo()));return d.flag("clip_hit")?new BlockHitResult(c.getTo(),Direction.UP,BlockPos.ZERO,false):BlockHitResult.miss(c.getTo(),Direction.UP,BlockPos.ZERO);} + } + static final class Actor extends Marker { + Data d;Actor(){super(null,null);}void configure(Level level){setLevel(level);} + @Override public void setPos(double x,double y,double z){var next=new Vec3(x,y,z);d.query(vec("set-position",next));setBoundingBox(getBoundingBox().move(next.subtract(position())));write(position,this,next);} + @Override public void recordMovement(MoverType mover,Vec3 v){d.query(vec("record "+mover.ordinal(),v));} + @Override protected Vec3 limitPistonMovement(Vec3 v){d.query(vec("piston",v));return vector(d.f.get("piston_result"));} + @Override public Vec3 getDeltaMovement(){d.query("velocity");return d.velocity;} + @Override public void setDeltaMovement(Vec3 v){d.query(vec("set-velocity",v));d.velocity=v;} + @Override protected Vec3 maybeBackOffFromEdge(Vec3 v,MoverType mover){d.query(vec("edge "+mover.ordinal(),v));return d.flag("edge_override")?vector(d.f.get("edge_result")):v;} + @Override public float maxUpStep(){return 0;} + @Override public boolean isDescending(){return false;} + @Override protected boolean isLocalClientAuthoritative(){d.query("local-client-authority");return d.flag("local_client");} + @Override public boolean isClientAuthoritative(){d.query("client-authority");return d.flag("client_authority");} + @Override public MoveSimulationType getMoveSimulationType(){d.query("simulation");return MoveSimulationType.SERVER_AND_CLIENT;} + @Override public boolean onGround(){d.query("ground");return d.grounded;} + @Override public void setOnGroundWithMovement(boolean below,boolean horizontal,Vec3 v){d.query(vec("ground-set "+below+" "+horizontal,v));d.grounded=below;horizontalCollision=horizontal;} + @Override protected boolean isHorizontalCollisionMinor(Vec3 v){d.query(vec("minor",v));return d.flag("minor_result");} + @Override public BlockPos getOnPosLegacy(){d.query("legacy");return new BlockPos(17,-64,-33);} + @Override protected void checkFallDamage(double dy,boolean ground,BlockState s,BlockPos p){d.query(String.format("fall %016x %s %s",Double.doubleToLongBits(dy),ground,pos(p)));if(d.flag("fall_mutates")){fallDistance=3;d.velocity=new Vec3(17,18,19);horizontalCollision=d.flag("mutated_horizontal");verticalCollision=d.flag("mutated_vertical");verticalCollisionBelow=d.flag("mutated_below");}if(d.flag("fall_removes"))write(removal,this,Entity.RemovalReason.DISCARDED);} + @Override public void resetFallDistance(){d.query("reset-fall");fallDistance=0;} + @Override public boolean isSuppressingBounce(){d.query("suppress");return false;} + @Override protected double getEntityBounciness(){d.query("entity-bounce");return 0;} + @Override protected double getEffectiveGravity(){d.query("gravity");return .08;} + @Override protected MovementEmission getMovementEmission(){d.query("emission");return d.flag("emits")?MovementEmission.ALL:MovementEmission.NONE;} + @Override public boolean isPassenger(){d.query("passenger");return true;} + @Override protected float getBlockSpeedFactor(){d.query("speed");return single(d.f.get("speed"));} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var allocator=Class.forName("sun.misc.Unsafe");var field=allocator.getDeclaredField("theUnsafe");field.setAccessible(true);var unsafe=field.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + position=Entity.class.getDeclaredField("position");position.setAccessible(true);stuck=Entity.class.getDeclaredField("stuckSpeedMultiplier");stuck.setAccessible(true);history=Entity.class.getDeclaredField("movementThisTick");history.setAccessible(true);removal=Entity.class.getDeclaredField("removalReason");removal.setAccessible(true); + var record=Class.forName("net.minecraft.world.entity.Entity$Movement");var constructor=record.getDeclaredConstructor(Vec3.class,Vec3.class,Vec3.class);constructor.setAccessible(true);var from=record.getDeclaredMethod("from");from.setAccessible(true);var to=record.getDeclaredMethod("to");to.setAccessible(true);var original=record.getDeclaredMethod("axisDependentOriginalMovement");original.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;d.velocity=vector(f.get("velocity"));d.grounded=d.flag("ground");var actor=(Actor)allocate.invoke(unsafe,Actor.class);actor.d=d;d.actor=actor;var level=(Level)allocate.invoke(unsafe,Level.class);level.d=d;actor.configure(level);var border=(Border)allocate.invoke(unsafe,Border.class);border.d=d;level.border=border;var state=(State)allocate.invoke(unsafe,State.class);state.d=d;var block=(BounceBlock)allocate.invoke(unsafe,BounceBlock.class);block.d=d;state.block=block;d.state=state; + var p=vector(f.get("position"));position.set(actor,p);actor.setBoundingBox(new AABB(p.x-.3,p.y,p.z-.3,p.x+.3,p.y+1.8,p.z+.3));stuck.set(actor,vector(f.get("stuck")));actor.noPhysics=d.flag("no_physics");actor.fallDistance=number(f.get("distance"));actor.horizontalCollision=d.flag("horizontal");actor.verticalCollision=d.flag("vertical");actor.verticalCollisionBelow=d.flag("below");actor.minorHorizontalCollision=d.flag("minor");removal.set(actor,d.flag("removed")?Entity.RemovalReason.DISCARDED:null); + var movements=new ArrayDeque<Object>();for(int i=0;i<f.get("history").getAsInt();i++)movements.add(constructor.newInstance(new Vec3(i,0,0),new Vec3(i+1,0,0),new Vec3(1,0,0)));history.set(actor,movements);d.shapes=new ArrayList<>();for(var v:f.getAsJsonArray("shapes")){var a=v.getAsJsonArray();d.shapes.add(Shapes.box(number(a.get(0)),number(a.get(1)),number(a.get(2)),number(a.get(3)),number(a.get(4)),number(a.get(5))));} + try{actor.move(MoverType.values()[f.get("mover").getAsInt()],vector(f.get("movement")));out.println("ok");}catch(Stop e){out.println("error");} + out.println(vec("position",actor.position()));out.println(vec("velocity-final",d.velocity));out.println(vec("stuck",(Vec3)stuck.get(actor)));out.println(box("bounds",actor.getBoundingBox()));out.printf("flags %s %s %s %s %s %s %016x%n",actor.horizontalCollision,actor.verticalCollision,actor.verticalCollisionBelow,actor.minorHorizontalCollision,d.grounded,actor.isRemoved(),Double.doubleToLongBits(actor.fallDistance));out.println("history "+movements.size());for(var r:movements){out.println(vec("from",(Vec3)from.invoke(r)));out.println(vec("to",(Vec3)to.invoke(r)));var v=(Optional<?>)original.invoke(r);out.println(v.isEmpty()?"original none":vec("original",(Vec3)v.get()));}out.println("queries "+d.calls); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityObstructionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityObstructionOracle.java new file mode 100644 index 000000000..71e349021 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityObstructionOracle.java @@ -0,0 +1,58 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import java.util.function.Predicate; +import net.minecraft.world.entity.*; +import net.minecraft.world.level.EntityGetter; +import net.minecraft.world.phys.AABB; +import net.minecraft.world.phys.shapes.*; +/** Original snapshot transport executing the actual EntityGetter default method. */ +public final class VanillaEntityObstructionOracle { + private static final class Stop extends RuntimeException {} + public static final class Snapshot extends Marker { + boolean spectator; + // Instances are allocated without constructors: the world-owned entity lifecycle is outside this fixture. + public Snapshot(){super(null,null);} + @Override public boolean isSpectator(){return spectator;} + } + private static AABB box(JsonElement value) { + var a=value.getAsJsonArray();double[] v=new double[6]; + for(int i=0;i<6;i++)v[i]=Double.longBitsToDouble(Long.parseUnsignedLong(a.get(i).getAsString(),16)); + return new AABB(v[0],v[1],v[2],v[3],v[4],v[5]); + } + @SuppressWarnings("unchecked") + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + Class<?> allocator=Class.forName("sun.misc.Unsafe");var field=allocator.getDeclaredField("theUnsafe");field.setAccessible(true);var unsafe=field.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + var removed=Entity.class.getDeclaredField("removalReason");removed.setAccessible(true);var vehicle=Entity.class.getDeclaredField("vehicle");vehicle.setAccessible(true); + Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var inputs=Files.lines(dir.resolve("inputs.txt"))) { + for(var line:(Iterable<String>)inputs::iterator) { + var f=JsonParser.parseString(line).getAsJsonObject();var entities=new ArrayList<Snapshot>(); + for(var value:f.getAsJsonArray("entities")) { + var e=value.getAsJsonObject();var snapshot=(Snapshot)allocate.invoke(unsafe,Snapshot.class); + snapshot.setId(entities.size()+1);snapshot.setBoundingBox(box(e.get("box")));snapshot.blocksBuilding=e.get("building").getAsBoolean();snapshot.spectator=e.get("spectator").getAsBoolean(); + if(e.get("removed").getAsBoolean())removed.set(snapshot,Entity.RemovalReason.DISCARDED); + int parent=e.get("parent").getAsInt();if(parent>=0)vehicle.set(snapshot,entities.get(parent));entities.add(snapshot); + } + VoxelShape shape=Shapes.empty();for(var value:f.getAsJsonArray("shape"))shape=Shapes.or(shape,Shapes.create(box(value))); + int excluded=f.get("exclude").getAsInt();Entity except=excluded<0?null:entities.get(excluded);int[] calls={0}; + var world=(EntityGetter)Proxy.newProxyInstance(EntityGetter.class.getClassLoader(),new Class<?>[]{EntityGetter.class},(proxy,method,values)->{ + if(method.isDefault())return InvocationHandler.invokeDefault(proxy,method,values); + if(!method.getName().equals("getEntities")||values.length!=3)throw new AssertionError(method); + var exceptEntity=(Entity)values[0];var bounds=(AABB)values[1];var predicate=(Predicate<Entity>)values[2]; + out.printf("query %d %016x %016x %016x %016x %016x %016x%n",exceptEntity==null?-1:exceptEntity.getId(),Double.doubleToRawLongBits(bounds.minX),Double.doubleToRawLongBits(bounds.minY),Double.doubleToRawLongBits(bounds.minZ),Double.doubleToRawLongBits(bounds.maxX),Double.doubleToRawLongBits(bounds.maxY),Double.doubleToRawLongBits(bounds.maxZ)); + calls[0]++;if(f.get("fail").getAsBoolean())throw new Stop(); + var selected=new ArrayList<Entity>(); + for(var entity:entities)if(entity!=exceptEntity&&entity.getBoundingBox().intersects(bounds)&&predicate.test(entity)){selected.add(entity);out.println("picked "+entity.getId());} + return selected; + }); + try {out.println("clear "+world.isUnobstructed(except,shape));}catch(Stop error){out.println("clear error");} + out.println("queries "+calls[0]); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityTypesExporter.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityTypesExporter.java new file mode 100644 index 000000000..572058871 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityTypesExporter.java @@ -0,0 +1,41 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import net.minecraft.SharedConstants; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.server.Bootstrap; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.ai.attributes.DefaultAttributes; + +/** Original exporter of entity type dimensions, categories and default attributes. */ +public final class VanillaEntityTypesExporter { + @SuppressWarnings("unchecked") + public static void main(String[] args) throws Exception { + SharedConstants.tryDetectVersion(); + Bootstrap.bootStrap(); + var out = new JsonObject(); + for (var type : BuiltInRegistries.ENTITY_TYPE) { + var o = new JsonObject(); + var d = type.getDimensions(); + o.addProperty("width", d.width()); + o.addProperty("height", d.height()); + o.addProperty("eye_height", d.eyeHeight()); + o.addProperty("category", type.getCategory().getName()); + o.addProperty("fire_immune", type.fireImmune()); + if (DefaultAttributes.hasSupplier(type)) { + var supplier = DefaultAttributes.getSupplier((EntityType<? extends LivingEntity>) type); + var attributes = new JsonObject(); + for (var attribute : BuiltInRegistries.ATTRIBUTE.asHolderIdMap()) { + if (supplier.hasAttribute(attribute)) + attributes.addProperty(attribute.unwrapKey().orElseThrow().identifier().toString(), supplier.getBaseValue(attribute)); + } + o.add("attributes", attributes); + } + out.add(BuiltInRegistries.ENTITY_TYPE.getKey(type).toString(), o); + } + Files.writeString(Path.of(args[0]), new Gson().toJson(out), StandardCharsets.UTF_8); + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaExtraItemsOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaExtraItemsOracle.java new file mode 100644 index 000000000..80b4f0b83 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaExtraItemsOracle.java @@ -0,0 +1,29 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.resources.Identifier;import net.minecraft.world.item.*;import net.minecraft.world.item.component.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.Player;import net.minecraft.world.level.*; +/** Real ItemStack.finishUsingItem, UseRemainder/template and UseCooldown/ItemCooldowns composition. */ +public final class VanillaExtraItemsOracle { + static Object unsafe;static Method allocate;static Field count,tick,map,start,end;static Constructor<ItemStack> stackCtor; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static int n(JsonObject v,String k){return v.get(k).getAsInt();} + static final class Stop extends RuntimeException{} + static UseCooldown cooldown(JsonObject v){return v.get("cooldown").isJsonNull()?null:new UseCooldown(Float.intBitsToFloat((int)v.get("cooldown").getAsLong()),n(v,"group")<0?Optional.empty():Optional.of(Identifier.parse("test:group"+n(v,"group"))));} + static ItemStackTemplate template(JsonObject v){if(v.get("remainder").isJsonNull())return null;var p=DataComponentPatch.builder();if(!v.get("maximum").isJsonNull())p.set(DataComponents.MAX_STACK_SIZE,n(v,"maximum"));if(v.get("damage").getAsBoolean())p.set(DataComponents.MAX_DAMAGE,0);return new ItemStackTemplate(Items.STICK.builtInRegistryHolder(),n(v,"remainder"),p.build());} + static void components(ItemStack s,JsonObject v){var t=template(v);s.set(DataComponents.USE_REMAINDER,t==null?null:new UseRemainder(t));s.set(DataComponents.USE_COOLDOWN,cooldown(v));} + static final class Custom extends Item{Data d;Custom(){super(null);}@Override public ItemStack finishUsingItem(ItemStack s,Level l,LivingEntity actor){d.event("finish");return d.refs[n(d.config(),"finish")];}} + static final class Actor extends net.minecraft.server.level.ServerPlayer{Data d;Actor(){super(null,null,null,null);}@Override public GameType gameMode(){return GameType.SURVIVAL;}@Override public boolean isSpectator(){return false;}@Override public boolean isCreative(){return false;}@Override public boolean hasInfiniteMaterials(){d.event("infinite");return d.config().get("infinite").getAsBoolean();}@Override public void handleExtraItemsCreatedOnUse(ItemStack stack){d.extra=stack;d.event("extra");super.handleExtraItemsCreatedOnUse(stack);}@Override public net.minecraft.world.entity.player.Inventory getInventory(){return d.inv;}@Override public net.minecraft.world.entity.item.ItemEntity drop(ItemStack stack,boolean random,net.minecraft.util.Prediction prediction){if(random||prediction!=net.minecraft.util.Prediction.PREDICTED)throw new AssertionError();d.dropped=stack;d.event("drop");return null;}@Override public ItemCooldowns getCooldowns(){d.event("get-cooldowns");return d.book;}} + static final class Other extends net.minecraft.world.entity.decoration.ArmorStand{Data d;Other(){super(null,null);}@Override public boolean hasInfiniteMaterials(){d.event("infinite");return d.config().get("infinite").getAsBoolean();}@Override public void handleExtraItemsCreatedOnUse(ItemStack stack){d.extra=stack;d.event("extra");}} + static final class Book extends ItemCooldowns{Data d;@Override public void addCooldown(ItemStack stack,int ticks){d.original=stack;d.event("add-cooldown "+ticks);super.addCooldown(stack,ticks);}@Override protected void onCooldownStarted(Identifier group,int ticks){d.event("started "+group+" "+ticks);}} + static final class Data{ + JsonObject f;PrintWriter out;ItemStack[] refs;ItemStack extra,original,result,dropped;net.minecraft.world.entity.player.Inventory inv;Book book;boolean changed;int calls; + JsonObject config(){return f.getAsJsonObject(changed?"after":"initial");} + String snapshot(ItemStack s){if(s==null)return "none";try{var remainder=s.get(DataComponents.USE_REMAINDER);var c=s.get(DataComponents.USE_COOLDOWN);return (s==ItemStack.EMPTY)+" "+(s.getItem()==Items.AIR?0:s.getItem()==Items.STICK?2:1)+" "+count.getInt(s)+" "+s.getCount()+" "+s.getPopTime()+" "+(remainder==null?"none":remainder.convertInto().count()+":"+remainder.convertInto().getMaxStackSize())+" "+(c==null?"none":Integer.toUnsignedString(Float.floatToIntBits(c.seconds()))+":"+c.cooldownGroup().map(Object::toString).orElse("none"));}catch(Exception e){throw new AssertionError(e);}} + void all(){try{out.println("state "+calls+" "+changed+" "+tick.getInt(book));var slots=new ItemStack[]{refs[0],refs[1],refs[2],extra,original,result,dropped};for(int i=0;i<slots.length;i++)out.println("ref "+i+" "+snapshot(slots[i]));var same=new StringJoiner(",");for(int a=0;a<slots.length;a++)for(int b=a+1;b<slots.length;b++)same.add(Boolean.toString(slots[a]==slots[b]));out.println("same "+same);var entries=new StringJoiner(",");for(var e:((Map<Identifier,?>)map.get(book)).entrySet())entries.add(e.getKey()+"="+start.getInt(e.getValue())+":"+end.getInt(e.getValue()));out.println("cooldowns "+entries);var contents=new StringJoiner(" | ");for(int i=0;i<43;i++){var item=inv.getItem(i);if(item!=ItemStack.EMPTY){var aliases=new StringJoiner(",");for(var ref:slots)aliases.add(Boolean.toString(item==ref));contents.add(i+"="+snapshot(item)+" ["+aliases+"]");}}out.println("inventory "+inv.getSelectedSlot()+" | "+contents);}catch(Exception e){throw new AssertionError(e);}} + void reset(){try{var c=config();Items.STICK.builtInRegistryHolder().bindComponents(DataComponentMap.builder().set(DataComponents.MAX_STACK_SIZE,n(c,"prototype_max")).build());for(int i=0;i<2;i++){var v=c.getAsJsonArray("items").get(i).getAsJsonObject();refs[i].setCount(n(v,"count"));components(refs[i],v);}tick.setInt(book,n(c,"clock"));inv.clearContent();inv.setSelectedSlot(n(c,"selected"));for(var sv:c.getAsJsonArray("slots")){var pair=sv.getAsJsonArray();inv.setItem(pair.get(0).getAsInt(),refs[pair.get(1).getAsInt()]);}if(extra!=null)extra.setCount(n(c,"extra_count"));if(original!=null){original.setCount(n(c,"original_count"));components(original,c.getAsJsonArray("items").get(1).getAsJsonObject());}}catch(Exception e){throw new AssertionError(e);}} + void event(String name){out.println("event "+name);int index=calls++;all();if(index==n(f,"fail"))throw new Stop();if(index==n(f,"mutate")){changed=true;reset();}} + } + public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Items.AIR.builtInRegistryHolder().bindComponents(DataComponentMap.EMPTY);var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);count=field(ItemStack.class,"count");tick=field(ItemCooldowns.class,"tickCount");map=field(ItemCooldowns.class,"cooldowns");var ci=Class.forName("net.minecraft.world.item.ItemCooldowns$CooldownInstance");start=field(ci,"startTime");end=field(ci,"endTime");stackCtor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);stackCtor.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;var custom=make(Custom.class);custom.d=d;ItemStack.EMPTY.setCount(0);ItemStack.EMPTY.setPopTime(0);var initial=d.config();Items.STICK.builtInRegistryHolder().bindComponents(DataComponentMap.builder().set(DataComponents.MAX_STACK_SIZE,n(initial,"prototype_max")).build());d.refs=new ItemStack[]{stackCtor.newInstance(Holder.direct(custom),1,new PatchedDataComponentMap(DataComponentMap.EMPTY)),new ItemStack(Items.STICK),ItemStack.EMPTY};d.refs[0].setPopTime(5);d.refs[1].setPopTime(7);d.book=new Book();d.book.d=d;var actor=make(Actor.class);actor.d=d;d.inv=new net.minecraft.world.entity.player.Inventory(actor,new net.minecraft.world.entity.player.PlayerEquipment(actor));d.reset();var other=make(Other.class);other.d=d;d.all();try{d.result=d.refs[n(d.f,"source")].finishUsingItem(null,d.f.get("player").getAsBoolean()?actor:other);out.println("result ok");}catch(Stop|net.minecraft.ReportedException e){out.println("result callback");}d.all();} + }} +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java new file mode 100644 index 000000000..4e816024b --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceSupportOracle.java @@ -0,0 +1,56 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.phys.*; +import net.minecraft.world.phys.shapes.*; +/** Native face slicing and support algorithms over caller-specified shape data. */ +public final class VanillaFaceSupportOracle { + private static final class SupportBlock extends Block { + VoxelShape shape;int calls; + SupportBlock(){super(BlockBehaviour.Properties.of().setId(ResourceKey.create(Registries.BLOCK,Identifier.parse("horizon:fixture_support"))));} + @Override protected VoxelShape getBlockSupportShape(BlockState state,BlockGetter world,BlockPos pos){calls++;return shape;} + } + private static double number(JsonElement value){return Double.longBitsToDouble(Long.parseUnsignedLong(value.getAsString(),16));} + private static double[] numbers(JsonArray values){double[] result=new double[values.size()];for(int i=0;i<result.length;i++)result[i]=number(values.get(i));return result;} + private static void values(PrintWriter out,String label,double... values){out.print(label);for(double value:values)out.printf(" %016x",Double.doubleToLongBits(value));out.println();} + private static void emit(PrintWriter out,VoxelShape shape) { + var boxes=shape.toAabbs();out.println("shape "+shape.isEmpty()+" "+boxes.size()+" "+(shape instanceof CubeVoxelShape)); + int axes=0;for(var axis:Direction.Axis.values()){var coords=shape.getCoords(axis);if(coords instanceof CubePointRange)axes|=1<<axis.ordinal();values(out,axis.getName(),coords.toDoubleArray());}out.println("axes "+axes); + values(out,"extrema",shape.min(Direction.Axis.X),shape.min(Direction.Axis.Y),shape.min(Direction.Axis.Z),shape.max(Direction.Axis.X),shape.max(Direction.Axis.Y),shape.max(Direction.Axis.Z)); + if(shape.isEmpty())out.println("bounds none");else {var b=shape.bounds();values(out,"bounds",b.minX,b.minY,b.minZ,b.maxX,b.maxY,b.maxZ);} + for(var b:boxes)values(out,"box",b.minX,b.minY,b.minZ,b.maxX,b.maxY,b.maxZ); + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var array=ArrayVoxelShape.class.getDeclaredConstructor(DiscreteVoxelShape.class,double[].class,double[].class,double[].class);array.setAccessible(true); + // Geometry-only snapshots bypass registration and block construction. + var allocator=Class.forName("sun.misc.Unsafe");var access=allocator.getDeclaredField("theUnsafe");access.setAccessible(true);var unsafe=access.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + var block=(SupportBlock)allocate.invoke(unsafe,SupportBlock.class);var state=(BlockState)allocate.invoke(unsafe,BlockState.class); + var owner=StateHolder.class.getDeclaredField("owner");owner.setAccessible(true);owner.set(state,block);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var inputs=Files.lines(dir.resolve("inputs.txt"))) { + for(var line:(Iterable<String>)inputs::iterator) { + var f=JsonParser.parseString(line).getAsJsonObject();VoxelShape shape; + if(f.has("coords")) { + var coords=f.getAsJsonArray("coords");double[] x=numbers(coords.get(0).getAsJsonArray()),y=numbers(coords.get(1).getAsJsonArray()),z=numbers(coords.get(2).getAsJsonArray()); + int nx=x.length-1,ny=y.length-1,nz=z.length-1;var bits=new BitSetDiscreteVoxelShape(nx,ny,nz);var occupied=f.getAsJsonArray("occupied"); + for(int i=0;i<nx;i++)for(int j=0;j<ny;j++)for(int k=0;k<nz;k++)if(occupied.get((i*ny+j)*nz+k).getAsBoolean())bits.fill(i,j,k); + shape=f.get("cube").getAsBoolean()?new CubeVoxelShape(bits):array.newInstance(bits,x,y,z); + } else {shape=Shapes.empty();for(var v:f.getAsJsonArray("boxes")){var b=numbers(v.getAsJsonArray());shape=Shapes.or(shape,Shapes.create(new AABB(b[0],b[1],b[2],b[3],b[4],b[5])));}} + if(f.has("move")){var v=numbers(f.getAsJsonArray("move"));shape=shape.move(v[0],v[1],v[2]);} + for(var direction:Direction.values()) { + var face=shape.getFaceShape(direction);out.println("face "+direction.ordinal()+" "+(face==shape)+" "+(face==shape.getFaceShape(direction)));emit(out,face); + block.shape=shape;block.calls=0;out.println("support "+SupportType.FULL.isSupporting(state,EmptyBlockGetter.INSTANCE,BlockPos.ZERO,direction)+" "+SupportType.CENTER.isSupporting(state,EmptyBlockGetter.INSTANCE,BlockPos.ZERO,direction)+" "+SupportType.RIGID.isSupporting(state,EmptyBlockGetter.INSTANCE,BlockPos.ZERO,direction)+" "+block.calls); + for(var nested:Direction.values()){var second=face.getFaceShape(nested);out.println("nested "+nested.ordinal()+" "+(second==face));emit(out,second);} + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceVisibilityOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceVisibilityOracle.java new file mode 100644 index 000000000..c88bcc7ed --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFaceVisibilityOracle.java @@ -0,0 +1,68 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import java.io.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.Direction; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.nbt.*; +import net.minecraft.tags.BlockTags; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.BlockState; + +/** Imports definition kinds and raw geometry; compares actual skipRendering and + * Block.shouldRenderFace on the unmodified native state registry. */ +public final class VanillaFaceVisibilityOracle { + private static final Gson JSON=new GsonBuilder().serializeNulls().create(); + private static String rule(Block block) throws Exception { + for(Class<?> type=block.getClass();type!=null;type=type.getSuperclass()) { + try { + type.getDeclaredMethod("skipRendering",BlockState.class,BlockState.class,Direction.class); + return switch(type.getSimpleName()) { + case "BlockBehaviour" -> "never"; + case "HalfTransparentBlock", "PowderSnowBlock" -> "same_block"; + case "IronBarsBlock" -> "bars"; + case "LeavesBlock" -> "leaves"; + case "LiquidBlock" -> "liquid"; + case "MangroveRootsBlock" -> "mangrove_roots"; + default -> throw new AssertionError("Unhandled skip-rendering owner "+type); + }; + } catch(NoSuchMethodException ignored) {} + } + throw new AssertionError("Missing skip-rendering method"); + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var directory=Path.of(args[1]); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(directory.resolve("tags.json"))).getAsJsonObject()); + if(args[0].equals("export")) { + VanillaCollisionOracle.main(new String[]{"generate",args[1]}); + try(var output=new DataOutputStream(Files.newOutputStream(directory.resolve("occlusion.nbt")))) { + NbtIo.write(VanillaCollisionOracle.occlusionDefinitions(),output); + } + var definitions=new TreeMap<String,Object>(); + for(var block:BuiltInRegistries.BLOCK) { + var state=block.defaultBlockState();var ids=new ArrayList<Integer>(); + for(var value:block.getStateDefinition().getPossibleStates())ids.add(Block.getId(value)); + definitions.put(BuiltInRegistries.BLOCK.getKey(block).toString(),Map.of("rule",rule(block), + "can_occlude",state.canOcclude(),"bars_tag",state.is(BlockTags.BARS),"default",Block.getId(state),"states",ids)); + } + Files.writeString(directory.resolve("definitions.json"),JSON.toJson(definitions));return; + } + try(var inputs=Files.newBufferedReader(directory.resolve("pairs.txt"));var output=Files.newBufferedWriter(directory.resolve(args[0]+".txt"))) { + for(String line;(line=inputs.readLine())!=null;) { + var values=line.split(" ");int a=Integer.parseInt(values[0]),b=Integer.parseInt(values[1]); + var state=Block.stateById(a);var neighbor=Block.stateById(b); + for(boolean cutout:new boolean[]{false,true}) { + LeavesBlock.setCutoutLeaves(cutout);int skip=0,visible=0; + for(var direction:Direction.values()) { + if(state.skipRendering(neighbor,direction))skip|=1<<direction.ordinal(); + if(Block.shouldRenderFace(state,neighbor,direction))visible|=1<<direction.ordinal(); + } + output.write(a+" "+b+" "+cutout+" "+skip+" "+visible);output.newLine(); + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFallDamageOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFallDamageOracle.java new file mode 100644 index 000000000..7c16307dc --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFallDamageOracle.java @@ -0,0 +1,53 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.level.gameevent.*; +import net.minecraft.world.phys.Vec3; +/** Actual base Entity checkFallDamage with traced landing callbacks and mutations. */ +public final class VanillaFallDamageOracle { + static final class Stop extends RuntimeException {} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static Optional<BlockPos> support(JsonElement value){if(value.isJsonNull())return Optional.empty();var a=value.getAsJsonArray();return Optional.of(new BlockPos(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt()));} + static Field positionField,supportField; + static final class Data { + JsonObject input;PrintWriter out;int calls;Actor actor; + void query(String text){out.println(text);if(calls++==input.get("fail").getAsInt())throw new Stop();} + void mutate() {if(input.get("mutate").getAsBoolean()){try{actor.fallDistance=17.25;positionField.set(actor,new Vec3(17,18,19));supportField.set(actor,support(input.get("after_support")));}catch(ReflectiveOperationException e){throw new AssertionError(e);}}} + } + static final class FallBlock extends Block { + Data d;FallBlock(){super(BlockBehaviour.Properties.of());} + @Override public void fallOn(net.minecraft.world.level.Level level,BlockState state,BlockPos p,Entity entity,double distance){d.query(String.format("fall-on %d %d %d %016x",p.getX(),p.getY(),p.getZ(),Double.doubleToLongBits(distance)));d.mutate();} + } + static final class State extends BlockState {Block block;State(){super(null,null,null);}@Override public Block getBlock(){return block;}} + static final class Level extends net.minecraft.server.level.ServerLevel { + Data d;BlockState queried; + private Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public BlockState getBlockState(BlockPos p){d.query("state "+p.getX()+" "+p.getY()+" "+p.getZ());return queried;} + @Override public void gameEvent(Holder<GameEvent> event,Vec3 p,GameEvent.Context context){if(event!=GameEvent.HIT_GROUND)throw new AssertionError(event);d.query(String.format("hit-ground %016x %016x %016x %s",Double.doubleToLongBits(p.x),Double.doubleToLongBits(p.y),Double.doubleToLongBits(p.z),context.affectedState()==queried?"queried":"input"));} + } + static final class Actor extends Marker { + Data d;Actor(){super(null,null);}void configure(Level level){setLevel(level);} + @Override public boolean isInWater(){d.query("water");return d.input.get("water").getAsBoolean();} + @Override public void resetFallDistance(){d.query("reset");super.resetFallDistance();} + void check(double dy,boolean ground,BlockState state,BlockPos p){checkFallDamage(dy,ground,state,p);} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var allocator=Class.forName("sun.misc.Unsafe");var field=allocator.getDeclaredField("theUnsafe");field.setAccessible(true);var unsafe=field.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class);positionField=Entity.class.getDeclaredField("position");positionField.setAccessible(true);supportField=Entity.class.getDeclaredField("mainSupportingBlockPos");supportField.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){ + for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.input=f;d.out=out;var level=(Level)allocate.invoke(unsafe,Level.class);level.d=d;level.queried=Blocks.STONE.defaultBlockState();var entity=(Actor)allocate.invoke(unsafe,Actor.class);entity.d=d;d.actor=entity;entity.configure(level);entity.fallDistance=number(f.get("fall"));positionField.set(entity,new Vec3(.3,1.5,-.3));supportField.set(entity,support(f.get("support")));var block=(FallBlock)allocate.invoke(unsafe,FallBlock.class);block.d=d;var state=(State)allocate.invoke(unsafe,State.class);state.block=block; + try{entity.check(number(f.get("dy")),f.get("ground").getAsBoolean(),state,new BlockPos(3,4,5));out.println("result ok");}catch(Stop error){out.println("result error");} + var p=(Vec3)positionField.get(entity);out.printf("final %016x %016x %016x %016x%n",Double.doubleToLongBits(entity.fallDistance),Double.doubleToLongBits(p.x),Double.doubleToLongBits(p.y),Double.doubleToLongBits(p.z));var selected=(Optional<?>)supportField.get(entity);if(selected.isEmpty())out.println("support none");else{var pos=(BlockPos)selected.get();out.println("support "+pos.getX()+" "+pos.getY()+" "+pos.getZ());}out.println("queries "+d.calls); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureCatalogOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureCatalogOracle.java new file mode 100644 index 000000000..b6439ffa8 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureCatalogOracle.java @@ -0,0 +1,123 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.lang.reflect.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.resources.*; +import net.minecraft.tags.*; +import com.mojang.serialization.Lifecycle; +import net.minecraft.world.level.chunk.ChunkGenerator; +import net.minecraft.world.level.levelgen.placement.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.WorldGenLevel; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.feature.Feature; + +/** Invokes native block-writing features through an observable mutable world. */ +public final class VanillaFeatureCatalogOracle { + private static final class Stop extends RuntimeException {} + private static Optional<Feature> decodeRoot(RegistryOps<JsonElement> ops,JsonObject f) { + var json=JsonParser.parseString(f.get("definition").getAsString()); + if(!f.get("placed_root").getAsBoolean())return Feature.CODEC.parse(ops,json).result().map(Holder::value); + return PlacedFeature.CODEC.parse(ops,json).result().map(holder->new Feature(){ + public com.mojang.serialization.MapCodec<? extends Feature> codec(){return com.mojang.serialization.MapCodec.unit(this);} + public boolean place(WorldGenLevel world,ChunkGenerator generator,RandomSource random,BlockPos p){return holder.value().place(world,generator,random,p);} + }); + } + @SuppressWarnings("unchecked") + private static RegistryOps<JsonElement> loadCatalog(Path dir) throws Exception { + var bundle=JsonParser.parseString(Files.readString(dir.resolve("catalog.json"))).getAsJsonObject(); + var features=new MappedRegistry<Feature>(Registries.FEATURE,Lifecycle.stable()); + var placed=new MappedRegistry<PlacedFeature>(Registries.PLACED_FEATURE,Lifecycle.stable()); + var ops=RegistryOps.create(JsonOps.INSTANCE,new RegistryOps.RegistryInfoLookup(){public <T> Optional<HolderGetter<T>> lookup(ResourceKey<? extends Registry<? extends T>> key){ + if(key.equals(Registries.FLUID))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(net.minecraft.core.registries.BuiltInRegistries.FLUID); + if(key.equals(Registries.BLOCK))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(net.minecraft.core.registries.BuiltInRegistries.BLOCK); + if(key.equals(Registries.FEATURE))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(features); + if(key.equals(Registries.PLACED_FEATURE))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(placed); + return Optional.empty(); + }}); + for(var entry:bundle.getAsJsonObject("features").entrySet())if(!entry.getKey().equals("horizon:composite"))features.register(ResourceKey.create(Registries.FEATURE,Identifier.parse(entry.getKey())),Feature.DIRECT_CODEC.parse(ops,JsonParser.parseString(entry.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN); + for(var entry:bundle.getAsJsonObject("placed").entrySet())placed.register(ResourceKey.create(Registries.PLACED_FEATURE,Identifier.parse(entry.getKey())),PlacedFeature.DIRECT_CODEC.parse(ops,JsonParser.parseString(entry.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN); + placed.freeze(); + var loader=new TagLoader<Holder<PlacedFeature>>((id,required)->placed.get(id).map(value->(Holder<PlacedFeature>)value),"tags/worldgen/placed_feature"); + var definitions=new HashMap<Identifier,List<TagLoader.EntryWithSource>>(); + for(var entry:bundle.getAsJsonObject("tags").entrySet()) { + var file=TagFile.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(entry.getValue().getAsString())).getOrThrow(); + var values=new ArrayList<TagLoader.EntryWithSource>();for(var value:file.entries())values.add(new TagLoader.EntryWithSource(value,"fixture")); + definitions.put(Identifier.parse(entry.getKey()),values); + } + var tags=new HashMap<TagKey<PlacedFeature>,List<Holder<PlacedFeature>>>(); + loader.build(definitions).forEach((name,values)->tags.put(TagKey.create(Registries.PLACED_FEATURE,name),List.copyOf(values))); + placed.prepareTagReload(new TagLoader.LoadResult<>(Registries.PLACED_FEATURE,tags)).apply(); + features.register(ResourceKey.create(Registries.FEATURE,Identifier.parse("horizon:composite")),Feature.DIRECT_CODEC.parse(ops,JsonParser.parseString(bundle.getAsJsonObject("features").get("horizon:composite").getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN); + features.freeze();return ops; + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + final Block[] BLOCKS={Blocks.AIR,Blocks.STONE,Blocks.COBBLESTONE,Blocks.END_STONE,Blocks.OBSIDIAN}; + if(args[0].equals("export")) { + VanillaBlockStateCodecOracle.main(args);return; + } + Path dir=Path.of(args[1]); + var ops=loadCatalog(dir); + var contextMethod=VanillaPlacementOracle.class.getDeclaredMethod("context",JsonObject.class);contextMethod.setAccessible(true); + var bounds=new JsonObject();bounds.add("context",JsonParser.parseString("[-64,384,63]")); + var generator=((PlacementContext)contextMethod.invoke(null,bounds)).generator(); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();long seed=f.get("seed").getAsLong(); + RandomSource random=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + if(f.get("worldgen").getAsBoolean())random=new WorldgenRandom(random); + Optional<Feature> decoded; + try {decoded=decodeRoot(ops,f);}catch(IllegalArgumentException|IllegalStateException error){decoded=Optional.empty();} + var modifiers=new ArrayList<PlacementModifier>();boolean valid=true; + if(f.has("placement"))for(var json:f.getAsJsonArray("placement")) { + try {var modifier=PlacementModifier.CODEC.parse(JsonOps.INSTANCE,json).result();if(modifier.isPresent())modifiers.add(modifier.get());else valid=false;} + catch(IllegalArgumentException error){valid=false;} + } + if(decoded.isEmpty()||!valid)out.println("decode error");else { + out.println("decode ok");int[] calls={0};int fail=f.get("fail").getAsInt(),reject=f.get("reject").getAsInt(); + var states=new TreeMap<BlockPos,BlockState>(Comparator.<BlockPos>comparingInt(BlockPos::getX).thenComparingInt(BlockPos::getY).thenComparingInt(BlockPos::getZ)); + var world=(WorldGenLevel)Proxy.newProxyInstance(WorldGenLevel.class.getClassLoader(),new Class<?>[]{WorldGenLevel.class},(proxy,method,values)->{ + if(method.getName().equals("getMinY"))return -64; + if(method.getName().equals("getHeight")&&(values==null||values.length==0))return 384; + if(method.getName().equals("getSeaLevel"))return 63; + if(Set.of("getMaxY","isInsideBuildHeight","isOutsideBuildHeight","setBlockAndUpdate").contains(method.getName()))return InvocationHandler.invokeDefault(proxy,method,values); + var p=((BlockPos)values[0]).immutable();int call=calls[0]++; + switch(method.getName()) { + case "getBlockState"->{ + out.println("get "+p.getX()+" "+p.getY()+" "+p.getZ());if(call==fail)throw new Stop(); + var state=states.getOrDefault(p,BLOCKS[Math.floorMod(p.getX()*31+p.getY()*7+p.getZ()*17,5)].defaultBlockState());out.println("state "+Block.getId(state));return state; + } + case "setBlock"->{ + var state=(BlockState)values[1];int flags=(Integer)values[2];out.println("set "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+Block.getId(state)+" "+flags);if(call==fail)throw new Stop(); + boolean result=reject==0||call%reject!=0;if(result)states.put(p,state);out.println("written "+result);return result; + } + default->throw new AssertionError("unexpected world method "+method); + } + }); + var p=f.getAsJsonArray("origin");var origin=new BlockPos(p.get(0).getAsInt(),p.get(1).getAsInt(),p.get(2).getAsInt()); + var placed=new PlacedFeature(Holder.direct(decoded.get()),modifiers);var placer=new FeaturePlacer(world,generator); + for(int repeat=0;repeat<f.get("repeats").getAsInt();repeat++) { + calls[0]=0; + try {out.println("place "+(f.has("placement")?placer.place(placed,random,origin):decoded.get().place(world,generator,random,origin)));}catch(Stop|IllegalArgumentException error){out.println("place error");} + out.println("next "+random.nextLong()); + for(var entry:states.entrySet()){var q=entry.getKey();out.println("stored "+q.getX()+" "+q.getY()+" "+q.getZ()+" "+Block.getId(entry.getValue()));} + out.println("end"); + } + } + out.println("tail "+random.nextLong()); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureGraphOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureGraphOracle.java new file mode 100644 index 000000000..b210ea8a4 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureGraphOracle.java @@ -0,0 +1,79 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.lang.reflect.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; +import net.minecraft.world.level.levelgen.placement.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.WorldGenLevel; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.feature.Feature; + +/** Invokes native block-writing features through an observable mutable world. */ +public final class VanillaFeatureGraphOracle { + private static final class Stop extends RuntimeException {} + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + final Block[] BLOCKS={Blocks.AIR,Blocks.STONE,Blocks.COBBLESTONE,Blocks.END_STONE,Blocks.OBSIDIAN}; + if(args[0].equals("export")) { + var values=new JsonArray();for(var block:BLOCKS)values.add(Block.getId(block.defaultBlockState()));Files.writeString(Path.of(args[1]),values.toString());return; + } + Path dir=Path.of(args[1]); + var contextMethod=VanillaPlacementOracle.class.getDeclaredMethod("context",JsonObject.class);contextMethod.setAccessible(true); + var bounds=new JsonObject();bounds.add("context",JsonParser.parseString("[-64,384,63]")); + var generator=((PlacementContext)contextMethod.invoke(null,bounds)).generator(); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();long seed=f.get("seed").getAsLong(); + RandomSource random=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + Optional<Feature> decoded; + try {decoded=Feature.DIRECT_CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(f.get("definition").getAsString())).result();}catch(IllegalArgumentException error){decoded=Optional.empty();} + var modifiers=new ArrayList<PlacementModifier>();boolean valid=true; + if(f.has("placement"))for(var json:f.getAsJsonArray("placement")) { + try {var modifier=PlacementModifier.CODEC.parse(JsonOps.INSTANCE,json).result();if(modifier.isPresent())modifiers.add(modifier.get());else valid=false;} + catch(IllegalArgumentException error){valid=false;} + } + if(decoded.isEmpty()||!valid)out.println("decode error");else { + out.println("decode ok");int[] calls={0};int fail=f.get("fail").getAsInt(),reject=f.get("reject").getAsInt(); + var states=new TreeMap<BlockPos,BlockState>(Comparator.<BlockPos>comparingInt(BlockPos::getX).thenComparingInt(BlockPos::getY).thenComparingInt(BlockPos::getZ)); + var world=(WorldGenLevel)Proxy.newProxyInstance(WorldGenLevel.class.getClassLoader(),new Class<?>[]{WorldGenLevel.class},(proxy,method,values)->{ + if(method.getName().equals("getMinY"))return -64; + if(method.getName().equals("getHeight")&&(values==null||values.length==0))return 384; + if(method.getName().equals("getSeaLevel"))return 63; + if(Set.of("getMaxY","isInsideBuildHeight","isOutsideBuildHeight","setBlockAndUpdate").contains(method.getName()))return InvocationHandler.invokeDefault(proxy,method,values); + var p=((BlockPos)values[0]).immutable();int call=calls[0]++; + switch(method.getName()) { + case "getBlockState"->{ + out.println("get "+p.getX()+" "+p.getY()+" "+p.getZ());if(call==fail)throw new Stop(); + var state=states.getOrDefault(p,BLOCKS[Math.floorMod(p.getX()*31+p.getY()*7+p.getZ()*17,5)].defaultBlockState());out.println("state "+Block.getId(state));return state; + } + case "setBlock"->{ + var state=(BlockState)values[1];int flags=(Integer)values[2];out.println("set "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+Block.getId(state)+" "+flags);if(call==fail)throw new Stop(); + boolean result=reject==0||call%reject!=0;if(result)states.put(p,state);out.println("written "+result);return result; + } + default->throw new AssertionError("unexpected world method "+method); + } + }); + var p=f.getAsJsonArray("origin");var origin=new BlockPos(p.get(0).getAsInt(),p.get(1).getAsInt(),p.get(2).getAsInt()); + var placed=new PlacedFeature(Holder.direct(decoded.get()),modifiers);var placer=new FeaturePlacer(world,generator); + for(int repeat=0;repeat<f.get("repeats").getAsInt();repeat++) { + calls[0]=0; + try {out.println("place "+(f.has("placement")?placer.place(placed,random,origin):decoded.get().place(world,generator,random,origin)));}catch(Stop|IllegalArgumentException error){out.println("place error");} + out.println("next "+random.nextLong()); + for(var entry:states.entrySet()){var q=entry.getKey();out.println("stored "+q.getX()+" "+q.getY()+" "+q.getZ()+" "+Block.getId(entry.getValue()));} + out.println("end"); + } + } + out.println("tail "+random.nextLong()); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeaturePlacementOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeaturePlacementOracle.java new file mode 100644 index 000000000..37727e3c3 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeaturePlacementOracle.java @@ -0,0 +1,53 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.WorldGenLevel; +import net.minecraft.world.level.chunk.ChunkGenerator; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.feature.Feature; +import net.minecraft.world.level.levelgen.placement.*; + +/** Actual FeaturePlacer executing native modifiers and an observable feature sink. */ +public final class VanillaFeaturePlacementOracle { + private static final class Stop extends RuntimeException {} + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + var contextMethod=VanillaPlacementOracle.class.getDeclaredMethod("context",JsonObject.class,PrintWriter.class);contextMethod.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();var context=(PlacementContext)contextMethod.invoke(null,f,out);long seed=f.get("seed").getAsLong(); + RandomSource random=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + var modifiers=new ArrayList<PlacementModifier>();boolean valid=true; + for(var json:f.getAsJsonArray("modifiers")) { + try {var decoded=PlacementModifier.CODEC.parse(JsonOps.INSTANCE,json).result();if(decoded.isPresent())modifiers.add(decoded.get());else valid=false;} + catch(IllegalArgumentException error){valid=false;} + } + if(!valid)out.println("decode error");else { + out.println("decode ok");int[] count={0};int fail=f.get("fail").getAsInt();boolean draw=f.get("draw").getAsBoolean();int mode=f.get("result").getAsInt(); + var feature=new Feature() { + public com.mojang.serialization.MapCodec<? extends Feature> codec(){return com.mojang.serialization.MapCodec.unit(this);} + public boolean place(WorldGenLevel level,ChunkGenerator generator,RandomSource rng,BlockPos p) { + if(count[0]++==fail)throw new Stop(); + out.println("feature "+p.getX()+" "+p.getY()+" "+p.getZ()); + long value=p.getX()+p.getY()+p.getZ();if(draw){value=rng.nextLong();out.println("consumer "+value);} + boolean result=mode==1||(mode==2&&(value&1)==0);out.println("result "+result);return result; + } + }; + var placed=new PlacedFeature(Holder.direct(feature),modifiers);var placer=new FeaturePlacer(context.getLevel(),context.generator()); + for(var value:f.getAsJsonArray("positions")) { + var p=value.getAsJsonArray();var position=new BlockPos(p.get(0).getAsInt(),p.get(1).getAsInt(),p.get(2).getAsInt());count[0]=0; + try {out.println("place "+placer.place(placed,random,position));}catch(Stop|IllegalArgumentException error){out.println("place error");} + out.println("next "+random.nextLong()); + } + } + out.println("tail "+random.nextLong()); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureRegionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureRegionOracle.java new file mode 100644 index 000000000..e6acbf117 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureRegionOracle.java @@ -0,0 +1,248 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.lang.reflect.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.resources.*; +import net.minecraft.tags.*; +import net.minecraft.world.ticks.*; +import net.minecraft.world.level.material.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.level.chunk.status.ChunkStatus; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.feature.Feature; +import net.minecraft.world.level.levelgen.placement.*; + +/** Native feature placement into resident ProtoChunks through a world transport. */ +public final class VanillaFeatureRegionOracle { + // Execute the actual native destruction method with resident storage as its + // world transport; no ServerLevel constructor or copied destruction body. + private static final class NativeDestruction extends net.minecraft.server.level.WorldGenRegion { + WorldGenLevel world; + private NativeDestruction(){super(null,null,null,null);} + @Override public BlockState getBlockState(BlockPos p){return world.getBlockState(p);} + @Override public boolean setBlock(BlockPos p,BlockState state,int flags,int recursion){return world.setBlock(p,state,flags,recursion);} + } + private static NativeDestruction destruction(WorldGenLevel world)throws ReflectiveOperationException { + var field=sun.misc.Unsafe.class.getDeclaredField("theUnsafe");field.setAccessible(true); + var value=(NativeDestruction)((sun.misc.Unsafe)field.get(null)).allocateInstance(NativeDestruction.class);value.world=world;return value; + } + + private static void setWriteZone(NativeDestruction world,int x,int z,int radius)throws ReflectiveOperationException { + String[] names={"centerChunkX","centerChunkZ","writeRadius"};int[] values={x,z,radius}; + for(int i=0;i<names.length;i++){var field=net.minecraft.server.level.WorldGenRegion.class.getDeclaredField(names[i]);field.setAccessible(true);field.setInt(world,values[i]);} + } + private static void center(NativeDestruction world,ProtoChunk chunk)throws ReflectiveOperationException { + var field=net.minecraft.server.level.WorldGenRegion.class.getDeclaredField("center");field.setAccessible(true);field.set(world,chunk); + } + private static BelowZeroRetrogen retrogen(){return BelowZeroRetrogen.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString("{\"target_status\":\"minecraft:features\"}")).getOrThrow();} + private static ProtoChunk chunk(Map<ChunkPos,ProtoChunk> chunks,int x,int z) { + var chunk=chunks.get(new ChunkPos(x>>4,z>>4));if(chunk==null)throw new IllegalArgumentException("missing region chunk");return chunk; + } + private static void bindFluidTags(JsonObject resources) { + var registry=BuiltInRegistries.FLUID; + var loader=new TagLoader<Holder<Fluid>>((id,required)->registry.get(id).map(value->(Holder<Fluid>)value),"tags/fluid"); + var definitions=new HashMap<Identifier,List<TagLoader.EntryWithSource>>(); + for(var item:resources.entrySet()) { + var file=TagFile.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(item.getValue().getAsString())).getOrThrow(); + var entries=new ArrayList<TagLoader.EntryWithSource>(); + for(var entry:file.entries())entries.add(new TagLoader.EntryWithSource(entry,"vanilla")); + definitions.put(Identifier.parse(item.getKey()),entries); + } + var tags=new HashMap<TagKey<Fluid>,List<Holder<Fluid>>>(); + loader.build(definitions).forEach((id,values)->tags.put(TagKey.create(Registries.FLUID,id),List.copyOf(values))); + if(tags.size()!=resources.size())throw new AssertionError("incomplete fluid tags"); + registry.prepareTagReload(new TagLoader.LoadResult<>(Registries.FLUID,tags)).apply(); + } + private static void queryState(WorldGenLevel world, BlockPos p, List<String> tags, PrintWriter out) { + out.println("query "+p.getX()+" "+p.getY()+" "+p.getZ()); + try { var fluid=world.getFluidState(p); boolean falling=fluid.hasProperty(FlowingFluid.FALLING)&&fluid.getValue(FlowingFluid.FALLING); out.println("fluid "+BuiltInRegistries.FLUID.getKey(fluid.getType())+" "+fluid.getAmount()+" "+falling+" "+fluid.isFull()+" "+fluid.isSource()); } + catch(RuntimeException error){out.println("fluid error");} + try {out.println("water "+world.isWaterAt(p));}catch(RuntimeException error){out.println("water error");} + var bits=new StringBuilder(); + for(var tag:tags){try{bits.append(world.getBlockState(p).is(TagKey.create(Registries.BLOCK,Identifier.parse(tag)))?'1':'0');}catch(RuntimeException error){bits.append('E');}} + out.println("tags "+bits); + } + private static void upgradeLifecycle(PalettedContainerFactory factory, PrintWriter out)throws ReflectiveOperationException { + var stages=new ChunkStatus[]{ChunkStatus.EMPTY,ChunkStatus.STRUCTURE_STARTS,ChunkStatus.STRUCTURE_REFERENCES,ChunkStatus.BIOMES,ChunkStatus.TERRAIN,ChunkStatus.FEATURES}; + var targets=new ChunkStatus[]{ChunkStatus.STRUCTURE_STARTS,ChunkStatus.STRUCTURE_REFERENCES,ChunkStatus.BIOMES,ChunkStatus.TERRAIN,ChunkStatus.FEATURES,ChunkStatus.INITIALIZE_LIGHT,ChunkStatus.LIGHT,ChunkStatus.SPAWN,ChunkStatus.FULL}; + for(var stage:stages)for(var target:targets) { + out.println("lifecycle "+stage.getName()+" "+target.getName()); + var data=BelowZeroRetrogen.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString("{\"target_status\":\""+target.getName()+"\"}")).getOrThrow(); + var chunks=new ProtoChunk[2]; + for(int x=0;x<2;x++) { + var chunk=new ProtoChunk(new ChunkPos(x,0),UpgradeData.EMPTY,LevelHeightAccessor.create(-64,128),factory,null); + chunk.setPersistedStatus(stage);chunk.setBelowZeroRetrogen(data);chunks[x]=chunk; + } + var world=destruction(null);center(world,chunks[0]);setWriteZone(world,0,0,1); + for(int pass=0;pass<2;pass++) { + for(int x=0;x<2;x++) { + boolean readable;try{chunks[x].getNoiseBiome(x*4,Integer.MAX_VALUE,0);readable=true;}catch(IllegalStateException error){readable=false;} + out.println("lifecycle_status "+pass+" "+x+" "+chunks[x].getHighestGeneratedStatus().getName()+" "+readable); + } + if(pass!=0)break; + for(int[] step:new int[][]{{16,0,0},{16,-1,1},{16,0,0},{0,-64,3},{16,0,2},{16,0,0},{0,-1,4},{16,0,0},{0,-65,0},{0,-1,3},{16,Integer.MAX_VALUE,0}}) { + boolean accepted=world.ensureCanWrite(new BlockPos(step[0],step[1],0)); + if(accepted)switch(step[2]) { + case 1->chunks[0].setPersistedStatus(ChunkStatus.FEATURES); + case 2->chunks[0].setBelowZeroRetrogen(data); + case 3->chunks[0].setBelowZeroRetrogen(null); + case 4->chunks[0].setPersistedStatus(stage); + } + out.println("lifecycle_write "+step[0]+" "+step[1]+" "+step[2]+" "+accepted); + } + } + } + } + @SuppressWarnings("unchecked") + public static void main(String[] args) throws Exception { + if(args[0].equals("export")){VanillaHeightmapOracle.main(args);return;} + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + Path dir=Path.of(args[1]); + Holder<Biome> biome=Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},Biomes.PLAINS); + var ids=new IdMapper<Holder<Biome>>();ids.add(biome); + var factory=new PalettedContainerFactory(Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY),Blocks.AIR.defaultBlockState(),null,Strategy.createForBiomes(ids),biome,null); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject()); + bindFluidTags(JsonParser.parseString(Files.readString(dir.resolve("fluid-tags.json"))).getAsJsonObject()); + var queryTags=new ArrayList<>(new TreeSet<>(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject().keySet()));queryTags.add("horizon:absent"); + var contextMethod=VanillaPlacementOracle.class.getDeclaredMethod("context",JsonObject.class);contextMethod.setAccessible(true); + var bounds=new JsonObject();bounds.add("context",JsonParser.parseString("[-64,64,0]")); + var generator=((PlacementContext)contextMethod.invoke(null,bounds)).generator(); + var ops=RegistryOps.create(JsonOps.INSTANCE,new RegistryOps.RegistryInfoLookup(){public <T> Optional<HolderGetter<T>> lookup(ResourceKey<? extends Registry<? extends T>> key){ + if(key.equals(Registries.BLOCK))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(BuiltInRegistries.BLOCK); + if(key.equals(Registries.FLUID))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(BuiltInRegistries.FLUID); + return Optional.empty(); + }}); + var fluids=new Fluid[]{Fluids.EMPTY,Fluids.FLOWING_WATER,Fluids.WATER,Fluids.FLOWING_LAVA,Fluids.LAVA}; + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + var zoneWorld=destruction(null); + var chunkZone=net.minecraft.server.level.WorldGenRegion.class.getDeclaredMethod("isWithinWriteZone",int.class,int.class);chunkZone.setAccessible(true); + for(var value:JsonParser.parseString(Files.readString(dir.resolve("zones.json"))).getAsJsonArray()) { + var row=value.getAsJsonArray();setWriteZone(zoneWorld,row.get(0).getAsInt(),row.get(1).getAsInt(),row.get(2).getAsInt()); + int x=row.get(3).getAsInt(),z=row.get(4).getAsInt();out.println("zone "+chunkZone.invoke(zoneWorld,x,z)+" "+zoneWorld.isWithinWriteZone(new BlockPos(x,Integer.MIN_VALUE,z))); + } + var heightChunk=new ProtoChunk(new ChunkPos(0,0),UpgradeData.EMPTY,LevelHeightAccessor.create(-64,384),factory,null); + center(zoneWorld,heightChunk);setWriteZone(zoneWorld,0,0,0); + var upgrade=retrogen(); + for(var value:JsonParser.parseString(Files.readString(dir.resolve("heights.json"))).getAsJsonArray()) { + var row=value.getAsJsonArray();int y=row.get(2).getAsInt();var p=new BlockPos(0,y,0); + boolean interval=LevelHeightAccessor.create(row.get(0).getAsInt(),row.get(1).getAsInt()).isInsideBuildHeight(y); + heightChunk.setBelowZeroRetrogen(null);boolean normal=zoneWorld.ensureCanWrite(p); + heightChunk.setBelowZeroRetrogen(upgrade);boolean upgrading=zoneWorld.ensureCanWrite(p); + out.println("heightgate "+interval+" "+normal+" "+upgrading); + } + upgradeLifecycle(factory,out); + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();long seed=f.get("seed").getAsLong(); + var features=new ArrayList<Feature>(); + for(var value:f.getAsJsonArray("features"))features.add(Feature.DIRECT_CODEC.parse(ops,value).getOrThrow()); + RandomSource random=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + if(f.get("worldgen").getAsBoolean())random=new WorldgenRandom(random); + var chunks=new TreeMap<ChunkPos,ProtoChunk>(Comparator.<ChunkPos>comparingInt(p->p.x()).thenComparingInt(p->p.z())); + for(int cx=-1;cx<=1;cx++)for(int cz=-1;cz<=1;cz++) { + var cp=new ChunkPos(cx,cz);var chunk=new ProtoChunk(cp,UpgradeData.EMPTY,LevelHeightAccessor.create(-64,64),factory,null); + chunk.setPersistedStatus(f.get("stage").getAsString().equals("terrain")?ChunkStatus.TERRAIN:ChunkStatus.EMPTY); + for(int x=0;x<16;x++)for(int z=0;z<16;z++) { + chunk.setBlockState(new BlockPos((cx<<4)+x,-56,(cz<<4)+z),Blocks.STONE.defaultBlockState(),3); + if((x+z)%3!=0)chunk.setBlockState(new BlockPos((cx<<4)+x,-48,(cz<<4)+z),Blocks.DIRT.defaultBlockState(),3); + } + chunks.put(cp,chunk); + } + var blockTicks=new WorldGenTickAccess<Block>(p->chunk(chunks,p.getX(),p.getZ()).getBlockTicks()); + var fluidTicks=new WorldGenTickAccess<Fluid>(p->chunk(chunks,p.getX(),p.getZ()).getFluidTicks()); + long[] tickOrder={f.get("tick_order").getAsLong()}; + int[] calls={0};int fail=f.get("fail").getAsInt(),reject=f.get("reject").getAsInt(); + NativeDestruction[] destroyer={null}; + var world=(WorldGenLevel)Proxy.newProxyInstance(WorldGenLevel.class.getClassLoader(),new Class<?>[]{WorldGenLevel.class},(proxy,method,values)->switch(method.getName()) { + case "destroyBlock"->{ + if(method.isDefault())yield InvocationHandler.invokeDefault(proxy,method,values); + yield destroyer[0].destroyBlock((BlockPos)values[0],(Boolean)values[1],(net.minecraft.world.entity.Entity)values[2],(Integer)values[3]); + } + case "getBlockTicks"->blockTicks; + case "getFluidTicks"->fluidTicks; + case "getGameTime"->f.get("game_time").getAsLong(); + case "nextSubTickCount"->tickOrder[0]++; + case "scheduleTick","createTick","isEmptyBlock","isWaterAt"->InvocationHandler.invokeDefault(proxy,method,values); + case "getMinY"->-64; + case "getSeaLevel"->0; + case "getHeight"->{ + if(values==null||values.length==0)yield 64; + var kind=(Heightmap.Types)values[0];int x=(Integer)values[1],z=(Integer)values[2];yield chunk(chunks,x,z).getHeight(kind,x&15,z&15)+1; + } + case "getMaxY","isInsideBuildHeight","isOutsideBuildHeight","setBlockAndUpdate"->InvocationHandler.invokeDefault(proxy,method,values); + case "getFluidState"->{var p=(BlockPos)values[0];yield chunk(chunks,p.getX(),p.getZ()).getFluidState(p);} + case "getBlockState"->{var p=(BlockPos)values[0];yield chunk(chunks,p.getX(),p.getZ()).getBlockState(p);} + case "setBlock"->{ + var p=(BlockPos)values[0];var state=(BlockState)values[1];int flags=(Integer)values[2]; + if(!f.get("write_zone").isJsonNull()&&!destroyer[0].isWithinWriteZone(p))yield false; + if(!destroyer[0].ensureCanWrite(p))yield false; + out.println("write "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+Block.getId(state)+" "+flags); + int call=calls[0]++;if(call==fail)throw new IllegalArgumentException("injected write failure"); + boolean result=reject==0||call%reject!=0; + if(result)chunk(chunks,p.getX(),p.getZ()).setBlockState(p,state,flags); + out.println("written "+result);yield result; + } + default->throw new AssertionError("unexpected world method "+method); + }); + destroyer[0]=destruction(world); + var centerChunk=chunks.get(new ChunkPos(0,0)); + if(f.get("upgrading").getAsBoolean())centerChunk.setBelowZeroRetrogen(upgrade); + center(destroyer[0],centerChunk);setWriteZone(destroyer[0],0,0,Integer.MAX_VALUE); + if(!f.get("write_zone").isJsonNull()){var zone=f.getAsJsonArray("write_zone");setWriteZone(destroyer[0],zone.get(0).getAsInt(),zone.get(1).getAsInt(),zone.get(2).getAsInt());} + var modifiers=new ArrayList<PlacementModifier>();for(var value:f.getAsJsonArray("placement"))modifiers.add(PlacementModifier.CODEC.parse(JsonOps.INSTANCE,value).getOrThrow()); + var placer=new FeaturePlacer(world,generator); + for(int repeat=0;repeat<2;repeat++) { + for(var feature:features) { + calls[0]=0; + try {out.println("place "+placer.place(new PlacedFeature(Holder.direct(feature),modifiers),random,new BlockPos(15,-40,15)));}catch(RuntimeException error){out.println("place error");} + out.println("next "+random.nextLong()); + for(int[] p:new int[][]{{0,0},{15,15},{16,16},{-1,-1}})for(var kind:Heightmap.Types.values())out.println("height "+kind.name()+" "+p[0]+" "+p[1]+" "+(chunk(chunks,p[0],p[1]).getHeight(kind,p[0]&15,p[1]&15)+1)); + } + out.println("repeat "+repeat); + } + for(int y:new int[]{Integer.MIN_VALUE,-65,-64,-63,-1,0,1,319,320,Integer.MAX_VALUE})for(int x:new int[]{0,16}) { + calls[0]=0;boolean result=world.setBlock(new BlockPos(x,y,0),Blocks.STONE.defaultBlockState(),2); + out.println("heightwrite "+x+" "+y+" "+result); + } + for(var raw:f.getAsJsonArray("tick_commands")){ + var command=raw.getAsJsonArray();String kind=command.get(0).getAsString();int id=command.get(1).getAsInt();var xyz=command.get(2).getAsJsonArray();var p=new BlockPos(xyz.get(0).getAsInt(),xyz.get(1).getAsInt(),xyz.get(2).getAsInt());int delay=command.get(3).getAsInt(); + out.println("tickrequest "+kind+" "+id); + try{if(kind.equals("block"))world.scheduleTick(p,Block.stateById(id).getBlock(),delay);else world.scheduleTick(p,fluids[id],delay);out.println("tickresult ok");}catch(RuntimeException error){out.println("tickresult error");} + out.println("tickorder "+tickOrder[0]); + } + for(var value:f.getAsJsonArray("probe_states")) { + int id=value.getAsInt();int[] xyz=new int[][]{{0,-64,0},{-1,-49,-1},{16,-1,16},{31,-32,31}}[id%4];var p=new BlockPos(xyz[0],xyz[1],xyz[2]); + out.println("probe "+id); + for(var state:new BlockState[]{Block.stateById(id),Blocks.AIR.defaultBlockState()}) { + chunk(chunks,p.getX(),p.getZ()).setBlockState(p,state,3); + queryState(world,p,queryTags,out); + } + } + for(int[] xyz:new int[][]{{0,-65,0},{31,0,31},{-1,Integer.MIN_VALUE,-1},{16,Integer.MAX_VALUE,16},{-17,-40,0},{32,-40,0},{Integer.MAX_VALUE,Integer.MIN_VALUE,0}})queryState(world,new BlockPos(xyz[0],xyz[1],xyz[2]),queryTags,out); + for(var entry:chunks.entrySet()) { + var cp=entry.getKey();var chunk=entry.getValue();out.println("chunk "+cp.x()+" "+cp.z()); + out.println("blockticks "+chunk.getBlockTicks().count()); + for(var tick:((SerializableTickContainer<Block>)chunk.getBlockTicks()).pack(f.get("game_time").getAsLong()))out.println("bt "+Block.getId(tick.type().defaultBlockState())+" "+tick.pos().getX()+" "+tick.pos().getY()+" "+tick.pos().getZ()+" "+tick.delay()+" "+tick.priority().getValue()); + out.println("fluidticks "+chunk.getFluidTicks().count()); + for(var tick:((SerializableTickContainer<Fluid>)chunk.getFluidTicks()).pack(f.get("game_time").getAsLong()))out.println("ft "+BuiltInRegistries.FLUID.getKey(tick.type())+" "+tick.pos().getX()+" "+tick.pos().getY()+" "+tick.pos().getZ()+" "+tick.delay()+" "+tick.priority().getValue()); + for(var kind:Heightmap.Types.values()) { + if(chunk.hasPrimedHeightmap(kind)){out.println("map "+kind.name());for(long word:chunk.getOrCreateHeightmapUnprimed(kind).getRawData())out.println(Long.toUnsignedString(word,16));} + else out.println("missing "+kind.name()); + } + for(int i=0;i<4;i++){out.println("section "+i);var section=chunk.getSection(i);for(int y=0;y<16;y++)for(int z=0;z<16;z++)for(int x=0;x<16;x++)out.println(Block.getId(section.getBlockState(x,y,z)));} + } + out.println("tail "+random.nextLong()); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureSortOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureSortOracle.java new file mode 100644 index 000000000..833ede52d --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureSortOracle.java @@ -0,0 +1,45 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.world.level.biome.FeatureSorter; +import net.minecraft.world.level.levelgen.feature.Feature; +import net.minecraft.world.level.levelgen.placement.PlacedFeature; + +/** Exercises identity-based native feature ordering, using equal dummy payloads. */ +public final class VanillaFeatureSortOracle { + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var noop=Feature.DIRECT_CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString("{\"type\":\"no_op\"}")).getOrThrow(); + Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8));var inputs=Files.lines(dir.resolve("inputs.txt"))) { + for(var line:(Iterable<String>)inputs::iterator) { + var f=JsonParser.parseString(line).getAsJsonObject(); + var identities=new HashMap<Integer,PlacedFeature>();var names=new IdentityHashMap<PlacedFeature,Integer>(); + java.util.function.IntFunction<PlacedFeature> feature=id->identities.computeIfAbsent(id,key->{var value=new PlacedFeature(Holder.direct(noop),List.of());names.put(value,key);return value;}); + var biomes=new ArrayList<List<HolderSet<PlacedFeature>>>(); + for(var b:f.getAsJsonArray("biomes")) { + var steps=new ArrayList<HolderSet<PlacedFeature>>(); + for(var s:b.getAsJsonArray()) { + var values=new ArrayList<Holder<PlacedFeature>>();for(var id:s.getAsJsonArray())values.add(Holder.direct(feature.apply(id.getAsInt()))); + steps.add(HolderSet.direct(values)); + } + biomes.add(steps); + } + try { + var steps=FeatureSorter.buildFeaturesPerStep(biomes,value->value,false); + out.println("steps "+steps.size()); + for(int i=0;i<steps.size();i++) { + var step=steps.get(i);out.println("step "+i+" "+step.features().size()); + for(var value:step.features())out.println("feature "+names.get(value)); + for(var id:f.getAsJsonArray("queries"))out.println("index "+id.getAsInt()+" "+step.indexMapping().applyAsInt(feature.apply(id.getAsInt()))); + } + } catch(IllegalStateException error){out.println("cycle");} + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFillLayerOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFillLayerOracle.java new file mode 100644 index 000000000..fa3752786 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFillLayerOracle.java @@ -0,0 +1,76 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.lang.reflect.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; +import net.minecraft.world.level.levelgen.placement.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.WorldGenLevel; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.feature.Feature; + +/** Invokes native block-writing features through an observable mutable world. */ +public final class VanillaFillLayerOracle { + private static final class Stop extends RuntimeException {} + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + final Block[] BLOCKS={Blocks.AIR,Blocks.CAVE_AIR,Blocks.VOID_AIR,Blocks.STONE,Blocks.WATER,Blocks.OAK_LEAVES,Blocks.DIRT}; + if(args[0].equals("export")) { + VanillaBlockStateCodecOracle.main(args); + var facts=JsonParser.parseString(Files.readString(Path.of(args[1]))).getAsJsonObject(); + var air=new JsonArray();for(var state:Block.BLOCK_STATE_REGISTRY)if(state.isAir())air.add(Block.getId(state)); + facts.add("air_ids",air);facts.addProperty("height_limit",net.minecraft.world.level.dimension.DimensionType.Y_SIZE); + Files.writeString(Path.of(args[1]),facts.toString());return; + } + Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();long seed=f.get("seed").getAsLong(); + RandomSource random=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + var decoded=Feature.DIRECT_CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(f.get("definition").getAsString())).result(); + if(decoded.isEmpty())out.println("decode error");else { + out.println("decode ok");int[] calls={0};int fail=f.get("fail").getAsInt(),reject=f.get("reject").getAsInt(); + var states=new TreeMap<BlockPos,BlockState>(Comparator.<BlockPos>comparingInt(BlockPos::getX).thenComparingInt(BlockPos::getY).thenComparingInt(BlockPos::getZ)); + var world=(WorldGenLevel)Proxy.newProxyInstance(WorldGenLevel.class.getClassLoader(),new Class<?>[]{WorldGenLevel.class},(proxy,method,values)->{ + if(method.getName().equals("getMinY")) { + out.println("min");int call=calls[0]++;if(call==fail)throw new Stop(); + int minimum=f.get("world_min").getAsInt();out.println("minimum "+minimum);return minimum; + } + if(method.getName().equals("getHeight")&&(values==null||values.length==0))return 384; + if(method.getName().equals("getSeaLevel"))return 63; + if(method.getName().equals("setBlockAndUpdate"))return InvocationHandler.invokeDefault(proxy,method,values); + var p=((BlockPos)values[0]).immutable();int call=calls[0]++; + switch(method.getName()) { + case "getBlockState"->{ + out.println("get "+p.getX()+" "+p.getY()+" "+p.getZ());if(call==fail)throw new Stop(); + var state=states.getOrDefault(p,BLOCKS[Math.floorMod(p.getX()*31+p.getY()*7+p.getZ()*17,7)].defaultBlockState());out.println("state "+Block.getId(state));return state; + } + case "setBlock"->{ + var state=(BlockState)values[1];int flags=(Integer)values[2];out.println("set "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+Block.getId(state)+" "+flags);if(call==fail)throw new Stop(); + boolean result=reject==0||call%reject!=0;if(result)states.put(p,state);out.println("written "+result);return result; + } + default->throw new AssertionError("unexpected world method "+method); + } + }); + var p=f.getAsJsonArray("origin");var origin=new BlockPos(p.get(0).getAsInt(),p.get(1).getAsInt(),p.get(2).getAsInt()); + for(int repeat=0;repeat<f.get("repeats").getAsInt();repeat++) { + calls[0]=0; + try {out.println("place "+decoded.get().place(world,null,random,origin));}catch(Stop|IllegalArgumentException error){out.println("place error");} + out.println("next "+random.nextLong()); + for(var entry:states.entrySet()){var q=entry.getKey();out.println("stored "+q.getX()+" "+q.getY()+" "+q.getZ()+" "+Block.getId(entry.getValue()));} + out.println("end"); + } + } + out.println("tail "+random.nextLong()); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFloatLogOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFloatLogOracle.java new file mode 100644 index 000000000..7ffc32138 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFloatLogOracle.java @@ -0,0 +1,32 @@ +package dev.horizonlab.parity; + +import java.io.BufferedOutputStream; +import net.minecraft.world.level.levelgen.densityfunction.*; +import net.minecraft.world.level.levelgen.densityfunction.op.UnaryFunction; + +/** Original binary transport; all logarithms use vanilla's compiled sampler. */ +public final class VanillaFloatLogOracle { + public static void main(String[] args) throws Exception { + long start=Long.parseLong(args[0]),remaining=Long.parseLong(args[1]); + if(args.length!=2 || start<0 || remaining<0 || start+remaining>0x100000000L) + throw new IllegalArgumentException("invalid float bit range"); + var sampler=new UnaryFunction.LogSampler(new DensitySampler() { + public float sampleValue(SamplerContext context,int x,int y,int z) {return Float.intBitsToFloat(x);} + public void sampleVolume(SamplerContext context,DensityBuffer buffer,DensityVolume volume) {throw new AssertionError("unexpected volume");} + }); + byte[] buffer=new byte[1<<20]; + try(var out=new BufferedOutputStream(System.out,1<<20)) { + while(remaining>0) { + int count=(int)Math.min(remaining,buffer.length/4); + for(int i=0;i<count;i++) { + int bits=Float.floatToIntBits(sampler.sampleValue(SamplerContext.EMPTY_UNCACHED,(int)(start+i),0,0)); + int at=i*4; + buffer[at]=(byte)(bits>>>24);buffer[at+1]=(byte)(bits>>>16); + buffer[at+2]=(byte)(bits>>>8);buffer[at+3]=(byte)bits; + } + out.write(buffer,0,count*4); + start+=count;remaining-=count; + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidBoxOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidBoxOracle.java new file mode 100644 index 000000000..97b5fdaab --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidBoxOracle.java @@ -0,0 +1,25 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*; +import net.minecraft.world.entity.*;import net.minecraft.world.entity.vehicle.boat.*;import net.minecraft.world.phys.AABB; +/** Actual default and boat passenger fluid-interaction bounds. */ +public final class VanillaFluidBoxOracle { + static final class Stop extends RuntimeException {} + static Field status; + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static AABB box(JsonElement v){if(v.isJsonNull())return null;var a=v.getAsJsonArray();return new AABB(number(a.get(0)),number(a.get(1)),number(a.get(2)),number(a.get(3)),number(a.get(4)),number(a.get(5)));} + static String text(AABB b){return b==null?"none":String.format("%016x %016x %016x %016x %016x %016x",Double.doubleToLongBits(b.minX),Double.doubleToLongBits(b.minY),Double.doubleToLongBits(b.minZ),Double.doubleToLongBits(b.maxX),Double.doubleToLongBits(b.maxY),Double.doubleToLongBits(b.maxZ));} + static void setStatus(Entity boat,int value){try{status.set(boat,value<0?null:AbstractBoat.Status.values()[value]);}catch(Exception e){throw new AssertionError(e);}} + static final class Data {JsonObject f;PrintWriter out;int calls;Actor actor;ProbeBoat boat;Entity vehicle; + void query(String s){out.println(s);int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt()){actor.setBoundingBox(box(f.get("after_actor")));boat.setBoundingBox(box(f.get("after_boat")));setStatus(boat,f.get("after_status").getAsInt());}} + } + static final class Actor extends Marker {Data d;Actor(){super(null,null);}@Override public Entity getVehicle(){d.query("vehicle");return d.vehicle;}} + static final class Modifier extends Marker {Data d;Modifier(){super(null,null);}@Override protected AABB modifyPassengerFluidInteractionBox(AABB b){d.query("modifier "+text(b));return box(d.f.get("modified"));}} + static final class ProbeBoat extends Boat {Data d;ProbeBoat(){super(null,null,null);}@Override public boolean isUnderWater(){d.query("boat-under");return super.isUnderWater();}} + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");var uf=u.getDeclaredField("theUnsafe");uf.setAccessible(true);var unsafe=uf.get(null);var allocate=u.getMethod("allocateInstance",Class.class);status=AbstractBoat.class.getDeclaredField("status");status.setAccessible(true);var helper=AbstractBoat.class.getDeclaredMethod("modifyPassengerFluidInteractionBox",AABB.class);helper.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;d.actor=(Actor)allocate.invoke(unsafe,Actor.class);d.actor.d=d;d.actor.setBoundingBox(box(f.get("actor")));d.boat=(ProbeBoat)allocate.invoke(unsafe,ProbeBoat.class);d.boat.d=d;d.boat.setBoundingBox(box(f.get("boat")));setStatus(d.boat,f.get("status").getAsInt());int vehicle=f.get("vehicle").getAsInt();if(vehicle==1)d.vehicle=(Marker)allocate.invoke(unsafe,Marker.class);else if(vehicle==2)d.vehicle=d.boat;else if(vehicle==3){var m=(Modifier)allocate.invoke(unsafe,Modifier.class);m.d=d;d.vehicle=m;} + try{var result=f.get("direct").getAsBoolean()?(AABB)helper.invoke(d.boat,box(f.get("input"))):d.actor.getFluidInteractionBox();out.println("result "+text(result));}catch(Stop e){out.println("error");}catch(InvocationTargetException e){if(e.getCause() instanceof Stop)out.println("error");else throw e;} + out.println("actor "+text(d.actor.getBoundingBox()));out.println("boat "+text(d.boat.getBoundingBox()));out.println("queries "+d.calls); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidFlowOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidFlowOracle.java new file mode 100644 index 000000000..4c41cd934 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidFlowOracle.java @@ -0,0 +1,29 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import com.mojang.serialization.JsonOps; +import java.io.*;import java.lang.reflect.*;import java.nio.file.*; +import net.minecraft.core.*;import net.minecraft.core.registries.*;import net.minecraft.tags.*;import net.minecraft.world.level.*;import net.minecraft.world.level.block.*;import net.minecraft.world.level.block.state.*;import net.minecraft.world.level.material.*;import net.minecraft.world.phys.*; +/** Native registered fluid current calculation with independently controlled block/fluid neighbors. */ +public final class VanillaFluidFlowOracle { + static final class Stop extends RuntimeException {} + static String pos(BlockPos p){return p.getX()+" "+p.getY()+" "+p.getZ();} + static final class Data {JsonObject f;PrintWriter out;int calls;State[] blocks;FluidState[] fluids; + void query(String s){out.println(s);if(calls++==f.get("fail").getAsInt())throw new Stop();} + int cell(BlockPos p){var v=f.getAsJsonObject("cells").get(pos(p));return v==null?f.get("default").getAsInt():v.getAsInt();} + } + static final class State extends BlockState {Data d;int id; + State(Block block){super(block,new net.minecraft.world.level.block.state.properties.Property<?>[0],new Comparable<?>[0]);} + @Override public boolean is(TagKey<Block> tag){if(tag!=BlockTags.BLOCKS_FLUID_FLOW)throw new AssertionError(tag);return d.f.getAsJsonArray("states").get(id).getAsJsonObject().get("blocks_flow").getAsBoolean();} + @Override public boolean isFaceSturdy(BlockGetter w,BlockPos p,Direction face){d.query("sturdy "+pos(p)+" "+face.getSerializedName());return (d.f.getAsJsonArray("states").get(id).getAsJsonObject().get("faces").getAsInt()&(1<<face.ordinal()))!=0;} + } + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + if(args[0].equals("export")){var states=new JsonArray();for(var fluid:BuiltInRegistries.FLUID)for(var state:fluid.getStateDefinition().getPossibleStates())states.add(FluidState.CODEC.encodeStart(JsonOps.INSTANCE,state).getOrThrow());Files.writeString(dir.resolve("fluid-states.json"),states.toString());return;} + var solid=FlowingFluid.class.getDeclaredMethod("isSolidFace",BlockGetter.class,BlockPos.class,Direction.class);solid.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;var states=f.getAsJsonArray("states");d.blocks=new State[states.size()];d.fluids=new FluidState[states.size()];for(int i=0;i<states.size();i++){var s=states.get(i).getAsJsonObject();var b=new State(s.get("ice").getAsBoolean()?Blocks.ICE:Blocks.STONE);b.d=d;b.id=i;d.blocks[i]=b;d.fluids[i]=FluidState.CODEC.parse(JsonOps.INSTANCE,s.get("fluid")).getOrThrow();} + var world=(BlockGetter)Proxy.newProxyInstance(BlockGetter.class.getClassLoader(),new Class<?>[]{BlockGetter.class},(proxy,method,values)->{var p=(BlockPos)values[0];switch(method.getName()){case "getBlockState":d.query("block "+pos(p));return d.blocks[d.cell(p)];case "getFluidState":d.query("fluid "+pos(p));return d.fluids[d.cell(p)];default:throw new AssertionError(method);}}); + var a=f.getAsJsonArray("position");var p=new BlockPos(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt());var root=FluidState.CODEC.parse(JsonOps.INSTANCE,f.get("root")).getOrThrow(); + try{if(f.get("mode").getAsString().equals("flow")){var v=root.getFlow(world,p);out.printf("flow %016x %016x %016x%n",Double.doubleToLongBits(v.x),Double.doubleToLongBits(v.y),Double.doubleToLongBits(v.z));}else out.println("face "+solid.invoke(root.getType(),world,p,Direction.values()[f.get("direction").getAsInt()]));}catch(Stop e){out.println("error");}catch(InvocationTargetException e){if(e.getCause() instanceof Stop)out.println("error");else throw e;} + out.println("queries "+d.calls); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidOccupancyOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidOccupancyOracle.java new file mode 100644 index 000000000..aa43ea1c8 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidOccupancyOracle.java @@ -0,0 +1,24 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.registries.*;import net.minecraft.nbt.*;import net.minecraft.world.level.*;import net.minecraft.world.level.biome.*;import net.minecraft.world.level.block.*;import net.minecraft.world.level.block.state.*;import net.minecraft.world.level.chunk.*;import net.minecraft.world.phys.AABB; +/** Native containsAnyLiquid through actual chunk sections and palette filtering. */ +public final class VanillaFluidOccupancyOracle { + static final class Stop extends RuntimeException {} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static AABB bounds(JsonArray a){return new AABB(number(a.get(0)),number(a.get(1)),number(a.get(2)),number(a.get(3)),number(a.get(4)),number(a.get(5)));} + static final class Data {PrintWriter out;int min,height,calls,fail;boolean trace; + void query(String s){if(!trace)return;out.println(s);if(calls++==fail)throw new Stop();}} + static final class Chunk extends ProtoChunk {Data d; + Chunk(Data d,PalettedContainerFactory factory){super(new ChunkPos(0,0),UpgradeData.EMPTY,LevelHeightAccessor.create(d.min,d.height),factory,null);this.d=d;} + @Override public LevelChunkSection getSection(int index){if(d!=null)d.query("section "+((d.min>>4)+index));return super.getSection(index);}} + static void export(Path dir)throws Exception{var states=new ListTag();var defaults=new CompoundTag();var names=new JsonObject();for(var state:Block.BLOCK_STATE_REGISTRY){states.add(BlockState.FULL_CODEC.encodeStart(NbtOps.INSTANCE,state).getOrThrow());if(state==state.getBlock().defaultBlockState()){String n=BuiltInRegistries.BLOCK.getKey(state.getBlock()).toString();defaults.putInt(n,Block.getId(state));names.addProperty(n,Block.getId(state));}}var data=new CompoundTag();data.putInt("DataVersion",net.minecraft.SharedConstants.getCurrentVersion().dataVersion().version());data.put("states",states);data.put("defaults",defaults);try(var out=new DataOutputStream(Files.newOutputStream(dir.resolve("block-registry.nbt")))){NbtIo.write(data,out);}var info=new JsonObject();info.addProperty("states",states.size());info.add("defaults",names);Files.writeString(dir.resolve("info.json"),info.toString());} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]);if(args[0].equals("export")){export(dir);return;} + Holder<Biome> biome=Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},Biomes.PLAINS);var ids=new IdMapper<Holder<Biome>>();ids.add(biome); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var state:Block.BLOCK_STATE_REGISTRY)out.println("state "+Block.getId(state)+" "+!state.getFluidState().isEmpty());for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.out=out;d.min=f.get("min").getAsInt();d.height=f.get("height").getAsInt();var factory=new PalettedContainerFactory(Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY),Block.stateById(f.get("base").getAsInt()),null,Strategy.createForBiomes(ids),biome,null);var chunk=new Chunk(d,factory); + var world=(LevelReader)Proxy.newProxyInstance(LevelReader.class.getClassLoader(),new Class<?>[]{LevelReader.class},(proxy,method,values)->{switch(method.getName()){case "getMinSectionY":d.query("min-section");return d.min>>4;case "getMaxSectionY":d.query("max-section");return(d.min+d.height-1)>>4;case "getMinY":d.query("min-y");return d.min;case "getMaxY":d.query("max-y");return d.min+d.height-1;case "getChunk":if(values.length!=2)throw new AssertionError(method);d.query("chunk "+values[0]+" "+values[1]);return chunk;default:if(method.isDefault())return InvocationHandler.invokeDefault(proxy,method,values);throw new AssertionError(method);}}); + for(var v:f.getAsJsonArray("ops")){var op=v.getAsJsonObject();d.trace=false;for(var write:op.getAsJsonArray("writes")){var a=write.getAsJsonArray();int x=a.get(0).getAsInt(),y=a.get(1).getAsInt(),z=a.get(2).getAsInt();chunk.getSection((y-d.min)>>4).setBlockState(x&15,y&15,z&15,Block.stateById(a.get(3).getAsInt()),false);}d.calls=0;d.fail=op.get("fail").getAsInt();d.trace=true;try{out.println("result "+world.containsAnyLiquid(bounds(op.getAsJsonArray("bounds"))));}catch(Stop e){out.println("error");}out.println("queries "+d.calls);} + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidOracle.java new file mode 100644 index 000000000..7e1c08f82 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidOracle.java @@ -0,0 +1,57 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import net.minecraft.world.level.material.FluidState; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import net.minecraft.core.BlockPos; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.material.FlowingFluid; +/** Original transport for native contained fluid state and height queries. */ +public final class VanillaFluidOracle { + private static final class Stop extends RuntimeException {} + public static void main(String[] args) throws Exception { + if(args[0].equals("export")){VanillaBlockStateCodecOracle.main(args);return;} + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var inputs=Files.lines(dir.resolve("inputs.txt"))) { + for(var first:BuiltInRegistries.FLUID)for(var second:BuiltInRegistries.FLUID) + out.println("family "+BuiltInRegistries.FLUID.getKey(first)+" "+BuiltInRegistries.FLUID.getKey(second)+" "+first.isSame(second)); + for(var block:Block.BLOCK_STATE_REGISTRY) { + var state=block.getFluidState();boolean falling=state.hasProperty(FlowingFluid.FALLING)&&state.getValue(FlowingFluid.FALLING); + out.println("state "+Block.getId(block)+" "+BuiltInRegistries.FLUID.getKey(state.getType())+" "+state.getAmount()+" "+falling+" "+state.isFull()+" "+state.isSource()+" "+Integer.toUnsignedString(Float.floatToRawIntBits(state.getOwnHeight()))+" "+Block.getId(state.createLegacyBlock())); + } + for(var line:Files.readAllLines(dir.resolve("codec-inputs.txt"))) { + var decoded=FluidState.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(line)).result(); + if(decoded.isEmpty()){out.println("codec error");continue;} + var state=decoded.get();boolean falling=state.hasProperty(FlowingFluid.FALLING)&&state.getValue(FlowingFluid.FALLING); + out.println("codec "+BuiltInRegistries.FLUID.getKey(state.getType())+" "+state.getAmount()+" "+falling+" "+state.isSource()+" "+Block.getId(state.createLegacyBlock())); + var raw=FluidState.CODEC.encodeStart(JsonOps.INSTANCE,state).getOrThrow().getAsJsonObject(); + var canonical=new JsonObject();canonical.add("id",raw.get("id")); + if(raw.has("properties")){var properties=new JsonObject();new java.util.TreeMap<>(raw.getAsJsonObject("properties").asMap()).forEach(properties::add);canonical.add("properties",properties);} + out.println("encoded "+canonical); + } + for(var line:(Iterable<String>)inputs::iterator) { + var f=JsonParser.parseString(line).getAsJsonObject();var state=Block.stateById(f.get("state").getAsInt()).getFluidState(); + var above=Block.stateById(f.get("above").getAsInt()).getFluidState();int[] calls={0};int fail=f.get("fail").getAsInt(); + var world=(BlockGetter)Proxy.newProxyInstance(BlockGetter.class.getClassLoader(),new Class<?>[]{BlockGetter.class},(proxy,method,values)->{ + var p=(BlockPos)values[0];boolean fluid=method.getName().equals("getFluidState"); + if(!fluid&&!method.getName().equals("getBlockState"))throw new AssertionError(method); + out.println((fluid?"fluid ":"block ")+p.getX()+" "+p.getY()+" "+p.getZ()); + if(calls[0]++==fail)throw new Stop(); + return fluid?above:(f.get("sturdy").getAsBoolean()?Blocks.STONE:Blocks.AIR).defaultBlockState(); + }); + var xyz=f.getAsJsonArray("position");var p=new BlockPos(xyz.get(0).getAsInt(),xyz.get(1).getAsInt(),xyz.get(2).getAsInt()); + for(boolean camera:new boolean[]{false,true}) { + try {float height=camera?state.getHeightForCamera(world,p):state.getHeight(world,p);out.println("height "+Integer.toUnsignedString(Float.floatToRawIntBits(height)));} + catch(Stop error){out.println("height error");} + } + out.println("calls "+calls[0]); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidShapeOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidShapeOracle.java new file mode 100644 index 000000000..ac2d7fe10 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidShapeOracle.java @@ -0,0 +1,27 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.material.*; +import net.minecraft.world.phys.shapes.*; +/** Native registered fluid shapes over changing world snapshots and shared caches. */ +public final class VanillaFluidShapeOracle { + static final class Stop extends RuntimeException {} + static FluidState state(JsonElement v){return FluidState.CODEC.parse(JsonOps.INSTANCE,v).getOrThrow();} + static void emit(PrintWriter out,VoxelShape shape,IdentityHashMap<VoxelShape,Integer> ids){out.println("identity "+ids.computeIfAbsent(shape,k->ids.size()));out.println("shape "+(shape==Shapes.empty())+" "+(shape==Shapes.block())+" "+shape.toAabbs().size());for(var b:shape.toAabbs())out.printf("box %016x %016x %016x %016x %016x %016x%n",Double.doubleToLongBits(b.minX),Double.doubleToLongBits(b.minY),Double.doubleToLongBits(b.minZ),Double.doubleToLongBits(b.maxX),Double.doubleToLongBits(b.maxY),Double.doubleToLongBits(b.maxZ));} + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]);var caches=FlowingFluid.class.getDeclaredField("shapes");caches.setAccessible(true); + if(args[0].equals("export")){var states=new JsonArray();for(var s:Fluid.FLUID_STATE_REGISTRY){if(s.getAmount()>8)throw new AssertionError("new fluid amount");states.add(FluidState.CODEC.encodeStart(JsonOps.INSTANCE,s).getOrThrow());}Files.writeString(dir.resolve("fluid-states.json"),states.toString());return;} + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();for(var fluid:List.of(Fluids.WATER,Fluids.FLOWING_WATER,Fluids.LAVA,Fluids.FLOWING_LAVA))((Map<?,?>)caches.get(fluid)).clear(); + var identities=new IdentityHashMap<VoxelShape,Integer>();for(var value:f.getAsJsonArray("ops")){var op=value.getAsJsonObject();int[] calls={0};var s=state(op.get("state"));var above=state(op.get("above"));var p=op.getAsJsonArray("position");var position=new BlockPos(p.get(0).getAsInt(),p.get(1).getAsInt(),p.get(2).getAsInt());var world=(BlockGetter)Proxy.newProxyInstance(BlockGetter.class.getClassLoader(),new Class<?>[]{BlockGetter.class},(proxy,method,values)->{if(method.getName().equals("getFluidState")){var q=(BlockPos)values[0];out.println("fluid "+q.getX()+" "+q.getY()+" "+q.getZ());if(calls[0]++==op.get("fail").getAsInt())throw new Stop();return above;}throw new AssertionError(method);}); + try{emit(out,s.getShape(world,position),identities);}catch(Stop e){out.println("error");}int count=0;for(var fluid:List.of(Fluids.WATER,Fluids.FLOWING_WATER,Fluids.LAVA,Fluids.FLOWING_LAVA))count+=((Map<?,?>)caches.get(fluid)).size();out.println("cached "+count);out.println("queries "+calls[0]); + } + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFoodOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFoodOracle.java new file mode 100644 index 000000000..8af1580e3 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFoodOracle.java @@ -0,0 +1,48 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.world.food.*;import net.minecraft.world.Difficulty;import net.minecraft.server.level.*; +import net.minecraft.world.damagesource.*;import net.minecraft.world.level.gamerules.*; +/** Actual FoodData arithmetic and tick with observable player/world callbacks. */ +public final class VanillaFoodOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate;static Field exhaustion,timer; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static Field field(String n)throws Exception{var f=FoodData.class.getDeclaredField(n);f.setAccessible(true);return f;} + static void set(FoodData food,JsonObject v){try{food.setFoodLevel(v.get("food").getAsInt());food.setSaturation(single(v.get("saturation")));exhaustion.setFloat(food,single(v.get("exhaustion")));timer.setInt(food,v.get("timer").getAsInt());}catch(Exception e){throw new AssertionError(e);}} + static final class Data {JsonObject f;PrintWriter out;FoodData food;int calls;boolean changed;Level level;Rules rules;Sources sources; + void query(String s){out.println(s);int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt()){set(food,f.getAsJsonObject("after"));changed=true;}} + JsonObject state(){return changed?f.getAsJsonObject("after_world"):f.getAsJsonObject("world");} + } + static final class Rules extends GameRules {Data d;Rules(){super(net.minecraft.world.flag.FeatureFlagSet.of());}@SuppressWarnings("unchecked")@Override public <T>T get(GameRule<T> r){if(r!=GameRules.NATURAL_HEALTH_REGENERATION)throw new AssertionError();d.query("regeneration");return (T)Boolean.valueOf(d.state().get("regen").getAsBoolean());}} + static final class Sources extends DamageSources {Data d;DamageSource source;Sources(){super(null);}@Override public DamageSource starve(){d.query("starve-source");return source;}} + static final class Level extends ServerLevel {Data d;Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public Difficulty getDifficulty(){d.query("difficulty");return Difficulty.values()[d.state().get("difficulty").getAsInt()];} + @Override public GameRules getGameRules(){d.query("rules");return d.rules;} + } + static final class Actor extends ServerPlayer {Data d;Actor(){super(null,null,null,null);} + @Override public ServerLevel level(){d.query("level");return d.level;} + @Override public boolean isHurt(){d.query("is-hurt");return d.state().get("hurt").getAsBoolean();} + @Override public float getHealth(){d.query("health");return single(d.state().get("health"));} + @Override public void heal(float v){d.query("heal "+bits(v));} + @Override public DamageSources damageSources(){d.query("damage-sources");return d.sources;} + @Override public boolean hurtServer(ServerLevel l,DamageSource s,float v){if(l!=d.level||s!=d.sources.source)throw new AssertionError();d.query("hurt "+bits(v));return false;} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");var uf=u.getDeclaredField("theUnsafe");uf.setAccessible(true);unsafe=uf.get(null);allocate=u.getMethod("allocateInstance",Class.class);exhaustion=field("exhaustionLevel");timer=field("tickTimer");Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;d.food=new FoodData();set(d.food,f.getAsJsonObject("initial"));d.level=make(Level.class);d.level.d=d;d.rules=make(Rules.class);d.rules.d=d;d.sources=make(Sources.class);d.sources.d=d;d.sources.source=make(DamageSource.class);var actor=make(Actor.class);actor.d=d; + try{for(var v:f.getAsJsonArray("ops")){var op=v.getAsJsonObject();switch(op.get("mode").getAsString()){ + case "eat":d.food.eat(op.get("nutrition").getAsInt(),single(op.get("amount")));break; + case "properties":d.food.eat(new FoodProperties(op.get("nutrition").getAsInt(),single(op.get("amount")),false));break; + case "exhaust":d.food.addExhaustion(single(op.get("amount")));break; + case "food":d.food.setFoodLevel(op.get("nutrition").getAsInt());break; + case "saturation":d.food.setSaturation(single(op.get("amount")));break; + case "tick":d.food.tick(actor);break; + default:throw new AssertionError();} + out.println("state "+d.food.getFoodLevel()+" "+bits(d.food.getSaturationLevel())+" "+bits(exhaustion.getFloat(d.food))+" "+timer.getInt(d.food)+" "+d.food.hasEnoughFood()+" "+d.food.needsFood()); + }out.println("result ok");}catch(Stop e){out.println("result error");} + out.println("final "+d.food.getFoodLevel()+" "+bits(d.food.getSaturationLevel())+" "+bits(exhaustion.getFloat(d.food))+" "+timer.getInt(d.food));out.println("queries "+d.calls); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFoodPropertiesOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFoodPropertiesOracle.java new file mode 100644 index 000000000..73050497e --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFoodPropertiesOracle.java @@ -0,0 +1,26 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.world.food.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.Player;import net.minecraft.world.level.*;import net.minecraft.server.level.ServerLevel;import net.minecraft.world.item.*;import net.minecraft.world.item.component.*;import net.minecraft.util.RandomSource;import net.minecraft.world.level.levelgen.XoroshiroRandomSource;import net.minecraft.world.phys.Vec3;import net.minecraft.sounds.*; +/** Actual FoodProperties listener, real stored FoodData and both native RNGs. */ +public final class VanillaFoodPropertiesOracle { + static Object unsafe;static Method allocate;static Field position,exhaustion,timer; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static int n(JsonObject v,String k){return v.get(k).getAsInt();} + static float fl(JsonObject v,String k){return Float.intBitsToFloat((int)v.get(k).getAsLong());} + static long bits(float v){return Integer.toUnsignedLong(Float.floatToIntBits(v));} + static final class Stop extends RuntimeException{} + static final class Data{JsonObject f;PrintWriter out;FoodData[] foods;RandomSource[] random;LivingEntity actor;boolean changed;int calls; + JsonObject config(){return f.getAsJsonObject(changed?"after":"initial");} + void reset(){try{var c=config();var p=c.getAsJsonArray("position");position.set(actor,new Vec3(p.get(0).getAsDouble(),p.get(1).getAsDouble(),p.get(2).getAsDouble()));for(int i=0;i<2;i++){var v=c.getAsJsonArray("foods").get(i).getAsJsonObject();foods[i].setFoodLevel(n(v,"food"));foods[i].setSaturation(fl(v,"saturation"));exhaustion.setFloat(foods[i],fl(v,"exhaustion"));timer.setInt(foods[i],n(v,"timer"));}if(c.get("reseed").getAsBoolean())for(int i=0;i<2;i++)random[i].setSeed(c.getAsJsonArray("seeds").get(i).getAsLong());}catch(Exception e){throw new AssertionError(e);}} + void all(){try{out.println("state "+calls+" "+changed+" "+n(config(),"random")+" "+n(config(),"food"));for(int i=0;i<2;i++){var food=foods[i];out.println("food "+i+" "+food.getFoodLevel()+" "+bits(food.getSaturationLevel())+" "+bits(exhaustion.getFloat(food))+" "+timer.getInt(food));}}catch(Exception e){throw new AssertionError(e);}} + void event(String name){out.println("event "+name);int index=calls++;all();if(index==n(f,"fail"))throw new Stop();if(index==n(f,"mutate")){changed=true;reset();}} + RandomSource random(){event("random");return random[n(config(),"random")];} + } + static final class Actor extends Player{Data d;Actor(){super(null,null);}@Override public GameType gameMode(){return GameType.SURVIVAL;}@Override public boolean isSpectator(){return false;}@Override public boolean isCreative(){return false;}@Override public RandomSource getRandom(){return d.random();}@Override public FoodData getFoodData(){d.event("food-data");return d.foods[n(d.config(),"food")];}} + static final class Other extends net.minecraft.world.entity.decoration.ArmorStand{Data d;Other(){super(null,null);}@Override public RandomSource getRandom(){return d.random();}} + static final class Level extends ServerLevel{Data d;Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public void playSound(Entity excluded,double x,double y,double z,SoundEvent sound,SoundSource source,float volume,float pitch){if(excluded!=null)throw new AssertionError();int id=sound==SoundEvents.GENERIC_EAT.value()?0:sound==SoundEvents.PLAYER_BURP?1:-1;if(id<0)throw new AssertionError();d.event("sound "+id+" "+source.ordinal()+" "+Long.toUnsignedString(Double.doubleToLongBits(x))+" "+Long.toUnsignedString(Double.doubleToLongBits(y))+" "+Long.toUnsignedString(Double.doubleToLongBits(z))+" "+bits(volume)+" "+bits(pitch));}} + public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);position=field(Entity.class,"position");exhaustion=field(FoodData.class,"exhaustionLevel");timer=field(FoodData.class,"tickTimer");Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.foods=new FoodData[]{new FoodData(),new FoodData()};d.random=new RandomSource[2];for(int i=0;i<2;i++){long seed=d.f.getAsJsonArray("seeds").get(i).getAsLong();d.random[i]=d.f.get("xor").getAsBoolean()?new XoroshiroRandomSource(seed):RandomSource.create(seed);}if(d.f.get("player").getAsBoolean()){var actor=make(Actor.class);actor.d=d;d.actor=actor;}else{var actor=make(Other.class);actor.d=d;d.actor=actor;}var level=make(Level.class);level.d=d;d.reset();d.all();var food=new FoodProperties(n(d.f,"nutrition"),fl(d.f,"saturation"),d.f.get("always").getAsBoolean());var consumable=new Consumable(1,ItemUseAnimation.EAT,SoundEvents.GENERIC_EAT,false,List.of());try{food.onConsume(level,d.actor,ItemStack.EMPTY,consumable);out.println("result ok");}catch(Stop e){out.println("result callback");}d.all();for(int i=0;i<2;i++)out.println("random "+i+" "+d.random[i].nextLong()+" "+d.random[i].nextLong());} + }} +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFoodStorageOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFoodStorageOracle.java new file mode 100644 index 000000000..02d3595f5 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFoodStorageOracle.java @@ -0,0 +1,24 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*; +import net.minecraft.nbt.*;import net.minecraft.world.food.FoodData;import net.minecraft.world.level.storage.*;import net.minecraft.util.ProblemReporter; +/** Native TagValueInput/Output hunger persistence and numeric coercions. */ +public final class VanillaFoodStorageOracle { + static final String[] KEYS={"foodLevel","foodTickTimer","foodSaturationLevel","foodExhaustionLevel"}; + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static Tag tag(JsonObject o){int type=o.get("type").getAsInt();var v=o.get("value");return switch(type){ + case 1->ByteTag.valueOf(v.getAsByte());case 2->ShortTag.valueOf(v.getAsShort());case 3->IntTag.valueOf(v.getAsInt());case 4->LongTag.valueOf(Long.parseLong(v.getAsString())); + case 5->FloatTag.valueOf(single(v));case 6->DoubleTag.valueOf(Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16))); + case 7->new ByteArrayTag(new byte[]{1});case 8->StringTag.valueOf("17");case 9->new ListTag();case 10->new CompoundTag();case 11->new IntArrayTag(new int[]{2});case 12->new LongArrayTag(new long[]{3});default->throw new AssertionError();};} + static Field field(String n)throws Exception{var f=FoodData.class.getDeclaredField(n);f.setAccessible(true);return f;} + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]);var exhaustion=field("exhaustionLevel");var timer=field("tickTimer"); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var food=new FoodData();food.setFoodLevel(-9);food.setSaturation(-7);timer.setInt(food,83);exhaustion.setFloat(food,99); + if(f.get("mode").getAsString().equals("read")){var compound=new CompoundTag();var tags=f.getAsJsonArray("tags");for(int i=0;i<4;i++){var t=tags.get(i).getAsJsonObject();if(t.get("type").getAsInt()!=0)compound.put(KEYS[i],tag(t));}food.readAdditionalSaveData(TagValueInput.create(ProblemReporter.DISCARDING,net.minecraft.core.HolderLookup.Provider.create(java.util.stream.Stream.empty()),compound));} + else {food.setFoodLevel(f.get("food").getAsInt());food.setSaturation(single(f.get("saturation")));timer.setInt(food,f.get("timer").getAsInt());exhaustion.setFloat(food,single(f.get("exhaustion")));} + out.println("state "+food.getFoodLevel()+" "+timer.getInt(food)+" "+bits(food.getSaturationLevel())+" "+bits(exhaustion.getFloat(food))); + var output=TagValueOutput.createWithoutContext(ProblemReporter.DISCARDING);output.putInt("unrelated",42);output.putString("foodLevel","replace");food.addAdditionalSaveData(output);var saved=output.buildResult();out.println("saved "+saved.size()+" "+saved.getIntOr("unrelated",-1));for(var key:KEYS){var t=(NumericTag)saved.get(key);out.println("tag "+t.getId()+" "+(t instanceof IntTag?Integer.toString(t.intValue()):bits(t.floatValue())));} + food.readAdditionalSaveData(TagValueInput.create(ProblemReporter.DISCARDING,net.minecraft.core.HolderLookup.Provider.create(java.util.stream.Stream.empty()),saved));out.println("roundtrip "+food.getFoodLevel()+" "+timer.getInt(food)+" "+bits(food.getSaturationLevel())+" "+bits(exhaustion.getFloat(food))); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java new file mode 100644 index 000000000..290425f1e --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java @@ -0,0 +1,155 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import com.mojang.math.Quadrant; +import com.mojang.serialization.JsonOps; +import java.nio.file.*; +import java.util.*; +import net.minecraft.client.renderer.block.dispatch.*; +import net.minecraft.client.resources.model.*; +import net.minecraft.client.resources.model.geometry.*; +import net.minecraft.client.resources.model.cuboid.*; +import net.minecraft.client.resources.model.sprite.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.resources.Identifier; +import net.minecraft.util.StrictJsonParser; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.Property; +import net.minecraft.world.level.levelgen.LegacyRandomSource; +import org.joml.Matrix4fc; +import static dev.horizonlab.parity.VanillaCuboidModelOracle.map; + +/** Real registry binding, root baking and model collection for the Rust scene. + * Empty tagged geometry isolates dispatch; FaceBakery has its separate gate. */ +public final class VanillaGallerySelectionOracle { + private static final Gson JSON=new GsonBuilder().serializeNulls().create(); + private static Object matrix(Matrix4fc value) { + var rows=new long[3][4]; + for(int r=0;r<3;r++)for(int c=0;c<4;c++)rows[r][c]=Integer.toUnsignedLong(Float.floatToIntBits(value.get(c,r))); + return rows; + } + private static JsonElement tag(String name,ModelState state) { + var faces=new ArrayList<Object>();for(var d:Direction.values())faces.add(matrix(state.inverseFaceTransformation(d))); + return JSON.toJsonTree(map("model",name,"matrix",matrix(state.transformation().getMatrix()),"inverse_uv",faces)); + } + private record PartTag(Identifier model,ModelState transform,JsonElement signature) {} + private static final class Baker implements ModelBaker { + final IdentityHashMap<QuadCollection,PartTag> tags=new IdentityHashMap<>(); + public ResolvedModel getModel(Identifier id) { + return new ResolvedModel() { + public String debugName(){return id.toString();} + public UnbakedModel wrapped(){throw new AssertionError("unexpected wrapped model access");} + public ResolvedModel parent(){return null;} + public TextureSlots getTopTextureSlots(){return null;} + public boolean getTopAmbientOcclusion(){return true;} + public Material.Baked resolveParticleMaterial(TextureSlots slots,ModelBaker baker){return null;} + public QuadCollection bakeTopGeometry(TextureSlots slots,ModelBaker baker,ModelState state) { + try { + var constructor=QuadCollection.class.getDeclaredConstructors()[0];constructor.setAccessible(true); + var empty=List.of();var result=(QuadCollection)constructor.newInstance(empty,empty,empty,empty,empty,empty,empty,empty); + tags.put(result,new PartTag(id,state,tag(id.toString(),state)));return result; + } catch(ReflectiveOperationException error){throw new AssertionError(error);} + } + }; + } + public BlockStateModelPart missingBlockModelPart(){throw new AssertionError("unexpected missing model");} + public MaterialBaker materials(){throw new AssertionError("unexpected material bake");} + public ModelBaker.Interner interner(){throw new AssertionError("unexpected interner");} + public <T> T compute(ModelBaker.SharedOperationKey<T> key){return key.compute(this);} + } + private static <T extends Comparable<T>> BlockState set(BlockState state,Property<T> property,String value) { + return state.setValue(property,property.getValue(value).orElseThrow()); + } + private static Object scene(JsonObject report)throws Exception { + int chunks=report.get("resident_chunks").getAsInt();int diameter=(int)Math.sqrt(chunks); + if(diameter*diameter!=chunks || diameter%2==0)throw new AssertionError("unsupported scene grid"); + int radius=diameter/2;var world=new HashMap<BlockPos,BlockState>(); + String[] layers={"bedrock","dirt","stone","sand","oak_planks","bricks"}; + var materials=new ArrayList<BlockState>();for(var name:layers)materials.add(BuiltInRegistries.BLOCK.getValue(Identifier.parse(name)).defaultBlockState()); + for(int cz=-radius;cz<=radius;cz++)for(int cx=-radius;cx<=radius;cx++) + for(int z=0;z<16;z++)for(int x=0;x<16;x++)for(int y=0;y<4;y++) { + int layer=y==0?0:y<3?1:((cx+cz)&1)==0?2:3; + world.put(new BlockPos(cx*16+x,y,cz*16+z),materials.get(layer)); + } + for(int y=4;y<11;y++)for(int z=-10;z<=10;z++)for(int x=-10;x<=10;x++) + if(Math.max(Math.abs(x),Math.abs(z))<=14-y)world.put(new BlockPos(x,y,z),materials.get((y&1)==0?4:5)); + for(var item:report.getAsJsonArray("model_gallery")) { + var row=item.getAsJsonObject();var p=row.getAsJsonArray("position"); + world.put(new BlockPos(p.get(0).getAsInt(),p.get(1).getAsInt(),p.get(2).getAsInt()),Block.stateById(row.get("state_id").getAsInt())); + } + var roots=new HashMap<BlockState,BlockStateModel.UnbakedRoot>(); + for(var state:new HashSet<>(world.values())) { + var id=BuiltInRegistries.BLOCK.getKey(state.getBlock()); + try(var input=VanillaGallerySelectionOracle.class.getResourceAsStream("/assets/"+id.getNamespace()+"/blockstates/"+id.getPath()+".json")) { + var raw=new String(Objects.requireNonNull(input).readAllBytes(),java.nio.charset.StandardCharsets.UTF_8); + roots.putAll(BlockStateModelDispatcher.CODEC.parse(JsonOps.INSTANCE,StrictJsonParser.parse(raw)).getOrThrow().instantiate(state.getBlock().getStateDefinition(),id::toString)); + } + } + var baker=new Baker();var models=new HashMap<BlockState,BlockStateModel>(); + for(var state:new HashSet<>(world.values()))models.put(state,Objects.requireNonNull(roots.get(state)).bake(state,baker)); + var unbaked=new HashMap<Identifier,UnbakedModel>();var pending=new ArrayList<Identifier>(); + for(var part:baker.tags.values())pending.add(part.model()); + for(int i=0;i<pending.size();i++) { + var id=pending.get(i);if(unbaked.containsKey(id))continue; + try(var input=VanillaGallerySelectionOracle.class.getResourceAsStream("/assets/"+id.getNamespace()+"/models/"+id.getPath()+".json")) { + var model=CuboidModel.fromStream(new java.io.InputStreamReader(Objects.requireNonNull(input),java.nio.charset.StandardCharsets.UTF_8)); + unbaked.put(id,model);if(model.parent()!=null)pending.add(model.parent()); + } + } + var discovery=new ModelDiscovery(unbaked,MissingCuboidModel.missingModel()); + discovery.addRoot(resolver->{for(var id:unbaked.keySet())resolver.markDependency(id);});var resolved=discovery.resolve(); + int visible=0,culled=0;LeavesBlock.setCutoutLeaves(true); + var parts=new ArrayList<BlockStateModelPart>(); + for(var entry:world.entrySet()) { + var pos=entry.getKey();var state=entry.getValue();parts.clear(); + models.get(state).collectParts(new LegacyRandomSource(state.getSeed(pos)),parts); + for(var selected:parts) { + var part=baker.tags.get(((SimpleModelWrapper)selected).quads()); + var geometry=resolved.get(part.model()).getTopGeometry();if(geometry==UnbakedGeometry.EMPTY)continue; + for(var element:((UnbakedCuboidGeometry)geometry).elements())for(var face:element.faces().values()) { + var direction=face.cullForDirection(); + if(direction!=null)direction=Direction.rotate(part.transform().transformation().getMatrix(),direction); + if(direction==null || Block.shouldRenderFace(state,world.getOrDefault(pos.relative(direction),Blocks.AIR.defaultBlockState()),direction))visible++;else culled++; + } + } + } + if(visible!=report.get("visible_model_faces").getAsInt() || culled!=report.get("culled_model_faces").getAsInt() || world.size()!=report.get("model_blocks").getAsInt()) + throw new AssertionError("native chunk model totals disagree: "+world.size()+" blocks / "+visible+" visible / "+culled+" culled"); + return map("blocks",world.size(),"visible_faces",visible,"culled_faces",culled); + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var report=JsonParser.parseString(Files.readString(Path.of(args[0]))).getAsJsonObject(); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(Path.of(args[2]).resolve("block-tags.json"))).getAsJsonObject()); + var results=new ArrayList<Object>();int index=0; + for(var item:report.getAsJsonArray("model_gallery")) { + var row=item.getAsJsonObject();var id=Identifier.parse(row.get("block").getAsString()); + var block=BuiltInRegistries.BLOCK.getValue(id);var state=block.defaultBlockState(); + for(var entry:row.getAsJsonObject("properties").entrySet()) + state=set(state,Objects.requireNonNull(block.getStateDefinition().getProperty(entry.getKey())),entry.getValue().getAsString()); + if(Block.getId(state)!=row.get("state_id").getAsInt())throw new AssertionError("state ID mismatch"); + String resource="/assets/"+id.getNamespace()+"/blockstates/"+id.getPath()+".json"; + String raw;try(var input=VanillaGallerySelectionOracle.class.getResourceAsStream(resource)) { + raw=new String(Objects.requireNonNull(input).readAllBytes(),java.nio.charset.StandardCharsets.UTF_8); + } + var definition=BlockStateModelDispatcher.CODEC.parse(JsonOps.INSTANCE,StrictJsonParser.parse(raw)).getOrThrow(); + var root=definition.instantiate(block.getStateDefinition(),id::toString).get(state); + var baker=new Baker();var model=Objects.requireNonNull(root).bake(state,baker); + var pos=row.getAsJsonArray("position");var position=new BlockPos(pos.get(0).getAsInt(),pos.get(1).getAsInt(),pos.get(2).getAsInt()); + var parts=new ArrayList<BlockStateModelPart>();model.collectParts(new LegacyRandomSource(state.getSeed(position)),parts); + var actual=new ArrayList<JsonElement>(); + for(var part:parts)actual.add(Objects.requireNonNull(baker.tags.get(((SimpleModelWrapper)part).quads())).signature()); + var expected=new ArrayList<JsonElement>(); + for(var selected:row.getAsJsonArray("models")) { + var v=selected.getAsJsonObject();var t=v.getAsJsonArray("rotations"); + var transform=new Variant.SimpleModelState(Quadrant.values()[t.get(0).getAsInt()],Quadrant.values()[t.get(1).getAsInt()],Quadrant.values()[t.get(2).getAsInt()],v.get("uv_lock").getAsBoolean()).asModelState(); + expected.add(tag(v.get("model").getAsString(),transform)); + } + if(!actual.equals(expected))throw new AssertionError("gallery selection mismatch at "+index+" "+id+": native="+actual+" Rust="+expected); + results.add(map("case",index++,"state_id",Block.getId(state),"models",actual)); + } + Files.writeString(Path.of(args[1]),JSON.toJson(map("gallery",results,"scene",scene(report)))); + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGameplayFactsExporter.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGameplayFactsExporter.java new file mode 100644 index 000000000..4dfb69c0d --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGameplayFactsExporter.java @@ -0,0 +1,79 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import net.minecraft.SharedConstants; +import net.minecraft.core.BlockPos; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.server.Bootstrap; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.world.level.EmptyBlockGetter; +import net.minecraft.world.level.block.Block; + +/** + * Original exporter of per-state gameplay facts read through vanilla's own accessors: + * light, hardness, sounds and tool requirements. Item components come from the + * vanilla data generator's component reports. + */ +public final class VanillaGameplayFactsExporter { + private static JsonObject sound(SoundEvent event) { + var result = new JsonObject(); + result.addProperty("id", event.location().toString()); + return result; + } + + private static JsonArray states() { + var states = new JsonArray(); + var level = EmptyBlockGetter.INSTANCE; + for (var state : Block.BLOCK_STATE_REGISTRY) { + var o = new JsonObject(); + var block = state.getBlock(); + o.addProperty("id", Block.getId(state)); + o.addProperty("emission", state.getLightEmission()); + o.addProperty("dampening", state.getLightDampening()); + o.addProperty("skylight_down", state.propagatesSkylightDown()); + o.addProperty("shape_occlusion", state.useShapeForLightOcclusion()); + o.addProperty("can_occlude", state.canOcclude()); + o.addProperty("solid_render", state.isSolidRender()); + o.addProperty("hardness", state.getDestroySpeed(level, BlockPos.ZERO)); + o.addProperty("requires_tool", state.requiresCorrectToolForDrops()); + o.addProperty("replaceable", state.canBeReplaced()); + o.addProperty("random_ticks", state.isRandomlyTicking()); + o.addProperty("block_entity", state.hasBlockEntity()); + o.addProperty("render_shape", state.getRenderShape().name()); + o.addProperty("liquid", state.liquid()); + o.addProperty("ignited_by_lava", state.ignitedByLava()); + o.addProperty("push", state.getPistonPushReaction().name()); + o.addProperty("offset", state.hasOffsetFunction()); + o.addProperty("full_collision", state.isCollisionShapeFullBlock(level, BlockPos.ZERO)); + o.addProperty("map_color", state.getMapColor(level, BlockPos.ZERO).col); + o.addProperty("friction", block.getFriction()); + o.addProperty("speed_factor", block.getSpeedFactor()); + o.addProperty("jump_factor", block.getJumpFactor()); + o.addProperty("explosion_resistance", block.getExplosionResistance()); + o.addProperty("item", BuiltInRegistries.ITEM.getKey(block.asItem()).toString()); + var sound = state.getSoundType(); + var sounds = new JsonObject(); + sounds.addProperty("volume", sound.getVolume()); + sounds.addProperty("pitch", sound.getPitch()); + sounds.add("break", sound(sound.getBreakSound())); + sounds.add("step", sound(sound.getStepSound())); + sounds.add("place", sound(sound.getPlaceSound())); + sounds.add("hit", sound(sound.getHitSound())); + sounds.add("fall", sound(sound.getFallSound())); + o.add("sound", sounds); + states.add(o); + } + return states; + } + + public static void main(String[] args) throws Exception { + SharedConstants.tryDetectVersion(); + Bootstrap.bootStrap(); + var result = new JsonObject(); + result.add("states", states()); + Files.writeString(Path.of(args[0]), new Gson().toJson(result), StandardCharsets.UTF_8); + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGenerationTickOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGenerationTickOracle.java new file mode 100644 index 000000000..4d956f5f0 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGenerationTickOracle.java @@ -0,0 +1,48 @@ +package dev.horizonlab.parity; +import java.io.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.ChunkPos; +import net.minecraft.world.ticks.*; + +/** Original transport for native proto tick storage and world-generation routing. */ +public final class VanillaGenerationTickOracle { + private static final Object[] TYPES=new Object[32]; + static{for(int i=0;i<TYPES.length;i++)TYPES[i]=new Object();} + private static final class Stop extends RuntimeException{} + private static final class Input { + final String[] words;int cursor=1;Input(String line){words=line.split(" ");} + int integer(){return Integer.parseInt(words[cursor++]);}long number(){return Long.parseLong(words[cursor++]);} + BlockPos pos(){return new BlockPos(integer(),integer(),integer());}long chunk(){return new ChunkPos(integer(),integer()).pack();} + SavedTick<Object> saved(){return new SavedTick<>(TYPES[integer()],pos(),integer(),TickPriority.byValue(integer()));} + } + private final Map<Long,TickContainerAccess<Object>> chunks=new HashMap<>(); + private final PrintWriter out;private boolean fail;private List<SavedTick<Object>> snapshot=List.of(); + private final WorldGenTickAccess<Object> access; + private VanillaGenerationTickOracle(PrintWriter out){this.out=out;access=new WorldGenTickAccess<>(p->{out.println("lookup "+p.getX()+" "+p.getY()+" "+p.getZ());if(fail)throw new Stop();return chunks.computeIfAbsent(ChunkPos.pack(p),key->new ProtoChunkTicks<>());});} + private static int type(Object value){for(int i=0;i<TYPES.length;i++)if(TYPES[i]==value)return i;throw new AssertionError();} + private void emit(List<SavedTick<Object>> ticks){out.println("saved "+ticks.size());for(var t:ticks)out.println("value "+type(t.type())+" "+t.pos().getX()+" "+t.pos().getY()+" "+t.pos().getZ()+" "+t.delay()+" "+t.priority().getValue());} + @SuppressWarnings("unchecked") private void command(String line,int index){var in=new Input(line);String op=in.words[0];out.println("command "+index+" "+op); + try{switch(op){ + case "reset"->{chunks.clear();snapshot=List.of();fail=false;} + case "fail"->fail=in.integer()!=0; + case "load","level"->{long key=in.chunk();int count=in.integer();var ticks=new ArrayList<SavedTick<Object>>();for(int i=0;i<count;i++)ticks.add(in.saved());chunks.put(key,op.equals("load")?ProtoChunkTicks.load(ticks):new LevelChunkTicks<>(ticks));} + case "schedule"->{var t=new ScheduledTick<>(TYPES[in.integer()],in.pos(),in.number(),TickPriority.byValue(in.integer()),in.number());access.schedule(t);out.println("scheduled");} + case "query"->{var type=TYPES[in.integer()];var p=in.pos();out.println("query "+access.hasScheduledTick(p,type));} + case "will"->{var type=TYPES[in.integer()];var p=in.pos();out.println("will "+access.willTickThisTick(p,type));} + case "dump"->{var c=chunks.get(in.chunk());long time=in.number();if(c==null)out.println("absent");else emit(((SerializableTickContainer<Object>)c).pack(time));} + case "snapshot"->{var c=chunks.get(in.chunk());snapshot=c instanceof ProtoChunkTicks<?>?((ProtoChunkTicks<Object>)c).scheduledTicks():List.of();} + case "snapshot_dump"->emit(snapshot); + case "unpack","promote"->{long key=in.chunk(),time=in.number();var c=chunks.get(key);if(op.equals("promote")&&c instanceof ProtoChunkTicks<?>){c=new LevelChunkTicks<>(((ProtoChunkTicks<Object>)c).scheduledTicks());chunks.put(key,c);}if(c instanceof LevelChunkTicks<?>)((LevelChunkTicks<Object>)c).unpack(time);} + case "remove"->chunks.remove(in.chunk()); + case "count"->{} + default->throw new AssertionError(op); + }}catch(Stop ignored){out.println("error");} + if(in.cursor!=in.words.length)throw new AssertionError("extra input");out.println("count "+access.count()); + } + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion(); + try(var input=Files.newBufferedReader(Path.of(args[0]));var out=new PrintWriter(Files.newBufferedWriter(Path.of(args[1])))){var oracle=new VanillaGenerationTickOracle(out);String line;int index=0;while((line=input.readLine())!=null)oracle.command(line,index++);} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGeometryOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGeometryOracle.java new file mode 100644 index 000000000..4241b656b --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGeometryOracle.java @@ -0,0 +1,218 @@ +package dev.horizonlab.parity; + +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.SharedConstants; +import net.minecraft.server.Bootstrap; +import net.minecraft.world.entity.Entity; +import net.minecraft.util.Mth; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.phys.*; +import net.minecraft.world.phys.shapes.*; + +/** Original I/O adapter. Every geometry calculation invokes the pinned vanilla classes. */ +public final class VanillaGeometryOracle { + private static final Constructor<ArrayVoxelShape> ARRAY; + private static final Method INDEX; + private static final Method MOTION, STEP, COLLIDE, ALLOCATE; + private static final Object ALLOCATOR; + static { + try { + ARRAY = ArrayVoxelShape.class.getDeclaredConstructor(DiscreteVoxelShape.class, double[].class, double[].class, double[].class); + ARRAY.setAccessible(true); + INDEX = VoxelShape.class.getDeclaredMethod("findIndex", Direction.Axis.class, double.class); + INDEX.setAccessible(true); + MOTION = Entity.class.getDeclaredMethod("collideWithShapes", Vec3.class, AABB.class, List.class); MOTION.setAccessible(true); + STEP = Entity.class.getDeclaredMethod("collectCandidateStepUpHeights", AABB.class, List.class, float.class, float.class); STEP.setAccessible(true); + COLLIDE = Entity.class.getDeclaredMethod("collide", Vec3.class); COLLIDE.setAccessible(true); + Class<?> allocator = Class.forName("sun.misc.Unsafe"); + Field field = allocator.getDeclaredField("theUnsafe"); field.setAccessible(true); + ALLOCATOR = field.get(null); ALLOCATE = allocator.getMethod("allocateInstance", Class.class); + } catch (ReflectiveOperationException error) { throw new ExceptionInInitializerError(error); } + } + private static final class Input { + final String[] words; int cursor = 1; + Input(String line) { words = line.split(" "); } + String word() { return words[cursor++]; } + int integer() { return Integer.parseInt(word()); } + double number() { return Double.longBitsToDouble(Long.parseUnsignedLong(word(), 16)); } + Vec3 vector() { return new Vec3(number(), number(), number()); } + AABB box() { return new AABB(vector(), vector()); } + BlockPos pos() { return new BlockPos(integer(), integer(), integer()); } + } + private final PrintWriter out; + private final List<VoxelShape> shapes = new ArrayList<>(); + private VanillaGeometryOracle(PrintWriter out) { this.out = out; } + private void values(String label, double... values) { out.print(label); for (double v : values) out.printf(" %016x", Double.doubleToLongBits(v)); out.println(); } + private void vector(String label, Vec3 v) { values(label, v.x, v.y, v.z); } + private void box(String label, AABB b) { values(label, b.minX, b.minY, b.minZ, b.maxX, b.maxY, b.maxZ); } + private void point(String label, Optional<Vec3> p) { if (p.isPresent()) vector(label, p.get()); else out.println(label + " none"); } + private void hit(BlockHitResult h) { if (h == null) out.println("hit none"); else { BlockPos p = h.getBlockPos(); Vec3 v = h.getLocation(); out.printf("hit %d %d %d %d %d %016x %016x %016x%n", h.getDirection().ordinal(), h.isInside() ? 1 : 0, p.getX(), p.getY(), p.getZ(), Double.doubleToLongBits(v.x), Double.doubleToLongBits(v.y), Double.doubleToLongBits(v.z)); } } + private static int flag(boolean v) { return v ? 1 : 0; } + // These fixtures only provide caller-controlled shape lists and entity + // inputs. The private vanilla Entity.collide method performs every movement + // and step decision. Allocation avoids starting a world/server or invoking + // entity lifecycle logic unrelated to this geometry comparison. + private static final class StepBorder extends net.minecraft.world.level.border.WorldBorder { + VoxelShape shape; + @Override public boolean isInsideCloseToBorder(Entity entity, AABB box) { return shape != null; } + @Override public VoxelShape getCollisionShape() { return shape; } + } + private static final class StepLevel extends net.minecraft.server.level.ServerLevel { + VanillaGeometryOracle oracle; + StepBorder border; + List<VoxelShape> entities, initial, stepping; + int queries; + private StepLevel() { super(null, null, null, null, null, null, false, 0L, List.of(), false); } + @Override public net.minecraft.world.level.border.WorldBorder getWorldBorder() { return border; } + @Override public List<VoxelShape> getEntityCollisions(Entity entity, AABB query) { oracle.box("entity-query", query); return entities; } + @Override public Iterable<VoxelShape> getBlockCollisions(Entity entity, AABB query) { oracle.box("block-query", query); return queries++ == 0 ? initial : stepping; } + } + private static final class StepEntity extends net.minecraft.world.entity.decoration.ArmorStand { + float step; + boolean grounded; + private StepEntity() { super(null, null); } + @Override public float maxUpStep() { return step; } + @Override public boolean onGround() { return grounded; } + void configure(StepLevel level, AABB box, float step, boolean grounded) { setLevel(level); setBoundingBox(box); this.step = step; this.grounded = grounded; } + } + private List<VoxelShape> selected(Input in) { + int count = in.integer(); List<VoxelShape> selected = new ArrayList<>(count); + for (int i = 0; i < count; i++) selected.add(shapes.get(in.integer())); + return selected; + } + private void positions(String label, Iterable<BlockPos> positions, int limit) { + int count = 0; Iterator<BlockPos> iterator = positions.iterator(); + while (count < limit && iterator.hasNext()) { BlockPos pos = iterator.next(); out.printf("%s %d %d %d%n", label, pos.getX(), pos.getY(), pos.getZ()); count++; } + out.printf("%s-count %d%n", label, count); + } + private void emitShape(VoxelShape shape) { + values("axis-extrema",shape.min(Direction.Axis.X),shape.min(Direction.Axis.Y),shape.min(Direction.Axis.Z),shape.max(Direction.Axis.X),shape.max(Direction.Axis.Y),shape.max(Direction.Axis.Z)); + List<AABB> boxes=shape.toAabbs();out.printf("shape %d %d%n",shapes.size(),boxes.size());int cubeAxes=0; + for(Direction.Axis axis:Direction.Axis.values())if(shape.getCoords(axis) instanceof CubePointRange)cubeAxes|=1<<axis.ordinal(); + out.printf("cube %d %d%n",flag(shape instanceof CubeVoxelShape),cubeAxes); + for(Direction.Axis axis:Direction.Axis.values())values(axis.getName()+"-coords",shape.getCoords(axis).toDoubleArray()); + if(shape.isEmpty())out.println("shape-bounds none");else box("shape-bounds",shape.bounds());for(AABB box:boxes)box("part",box);shapes.add(shape); + } + private void command(String line, int lineNumber) throws ReflectiveOperationException { + Input in = new Input(line); String operation = in.words[0]; out.printf("command %d %s%n", lineNumber, operation); + switch (operation) { + case "floor-height" -> { + VoxelShape shape = shapes.get(in.integer()), below = shapes.get(in.integer()); int[] calls = {0}; + values("floor-height", net.minecraft.world.level.EmptyBlockGetter.INSTANCE.getBlockFloorHeight(shape, () -> { calls[0]++; return below; })); + out.printf("below-calls %d%n", calls[0]); + } + case "block-iterate" -> { + BlockPos a = in.pos(), b = in.pos(); Vec3 movement = in.vector(); int limit = in.integer(); + positions("closed", BlockPos.betweenClosed(a, b), limit); + positions("direction", BlockPos.betweenCornersInDirection(a, b, movement), limit); + } + case "box-iterate" -> { + AABB box = in.box(); Vec3 movement = in.vector(); int limit = in.integer(); + positions("closed", BlockPos.betweenClosed(box), limit); + positions("direction", BlockPos.betweenCornersInDirection(box, movement), limit); + } + case "sweep" -> { + Vec3 start = in.vector(), end = in.vector(); AABB box = in.box(); int stop = in.integer(); int[] count = {0}; + boolean completed = BlockGetter.forEachBlockIntersectedBetween(start, end, box, (pos, step) -> { count[0]++; out.printf("block-visit %d %d %d %d%n", pos.getX(), pos.getY(), pos.getZ(), step); return count[0] != stop; }); + out.printf("sweep %d %d%n", flag(completed), count[0]); + } + case "step-motion" -> { + AABB box = in.box(); Vec3 movement = in.vector(); float maxStep = (float)in.number(); boolean grounded = in.integer() != 0; + StepLevel level = (StepLevel)ALLOCATE.invoke(ALLOCATOR, StepLevel.class); + level.oracle = this; level.entities = selected(in); level.initial = selected(in); level.stepping = selected(in); + int border = in.integer(); level.border = new StepBorder(); level.border.shape = border < 0 ? null : shapes.get(border); + StepEntity entity = (StepEntity)ALLOCATE.invoke(ALLOCATOR, StepEntity.class); entity.configure(level, box, maxStep, grounded); + vector("step-motion", (Vec3)COLLIDE.invoke(entity, movement)); + out.printf("block-queries %d%n", level.queries); + } + case "make-box" -> emitShape(Shapes.create(in.box())); + case "optimize" -> emitShape(shapes.get(in.integer()).optimize()); + case "join", "join-optimized" -> { + VoxelShape a=shapes.get(in.integer()),b=shapes.get(in.integer());int bits=in.integer();BooleanOp op=(first,second)->(bits&(1<<((first?2:0)+(second?1:0))))!=0; + if((bits&1)!=0) { + try {Shapes.joinUnoptimized(a,b,op);throw new AssertionError("accepted unbounded Boolean");}catch(IllegalArgumentException expected){out.println("join invalid");} + }else{ + VoxelShape shape=operation.equals("join")?Shapes.joinUnoptimized(a,b,op):Shapes.join(a,b,op);out.printf("overlap %d%n",flag(Shapes.joinIsNotEmpty(a,b,op)));emitShape(shape); + } + } + case "traverse" -> { + Vec3 start=in.vector(),end=in.vector();int stop=in.integer();int[] count={0}; + BlockPos result=BlockGetter.traverseBlocks(start,end,stop,(context,pos)->{count[0]++;out.printf("visit %d %d %d%n",pos.getX(),pos.getY(),pos.getZ());if(count[0]==context)return pos;return null;},context->null); + if(result==null)out.printf("traverse none %d%n",count[0]);else out.printf("traverse %d %d %d %d%n",result.getX(),result.getY(),result.getZ(),count[0]); + } + case "trig-table" -> { + Field field=Mth.class.getDeclaredField("SIN");field.setAccessible(true);float[] table=(float[])field.get(null); + for(int i=0;i<table.length;i++)out.printf("sine %d %08x%n",i,Float.floatToIntBits(table[i])); + } + case "rotation" -> { + Vec3 v=in.vector();double angle=in.number();float pitch=(float)in.number(),yaw=(float)in.number();int axes=in.integer();Direction.Axis axis=Direction.Axis.values()[in.integer()];Direction direction=Direction.values()[in.integer()];double amount=in.number(); + values("trig",Mth.sin(angle),Mth.cos(angle));vector("rotate-x",v.xRot((float)angle));vector("rotate-y",v.yRot((float)angle));vector("rotate-z",v.zRot((float)angle));vector("clockwise",v.rotateClockwise90());vector("look",Vec3.directionFromRotation(pitch,yaw)); + Vec2 rotation=v.rotation();values("rotation",rotation.x,rotation.y); + EnumSet<Direction.Axis> selected=EnumSet.noneOf(Direction.Axis.class);for(Direction.Axis a:Direction.Axis.values())if((axes&(1<<a.ordinal()))!=0)selected.add(a); + vector("align",v.align(selected));vector("with",v.with(axis,amount));vector("relative",v.relative(direction,amount)); + } + case "vec" -> { + Vec3 a = in.vector(), b = in.vector(); double t = in.number(); + vector("add", a.add(b)); vector("subtract", a.subtract(b)); vector("vector-to", a.vectorTo(b)); vector("multiply", a.multiply(b)); vector("scale", a.scale(t)); vector("normalize", a.normalize()); vector("cross", a.cross(b)); vector("lerp", a.lerp(b, t)); vector("projected", a.projectedOn(b)); vector("reverse", a.reverse()); vector("horizontal", a.horizontal()); + values("scalar", a.dot(b), a.lengthSqr(), a.length(), a.horizontalDistanceSqr(), a.horizontalDistance(), a.distanceToSqr(b), a.distanceTo(b)); + out.printf("flags %d %d %d %d%n", flag(a.equals(b)), flag(a.isFinite()), flag(a.closerThan(b, t)), Direction.getApproximateNearest(a).ordinal()); + var order = Direction.axisStepOrder(a); out.printf("order %d %d %d%n", order.get(0).ordinal(), order.get(1).ordinal(), order.get(2).ordinal()); + } + case "box" -> { + AABB a = in.box(), b = in.box(); Vec3 start = in.vector(), end = in.vector(), amount = in.vector(); Direction.Axis axis = Direction.Axis.values()[in.integer()]; double value = in.number(); + box("bounds", a); box("move", a.move(amount)); box("inflate", a.inflate(amount.x, amount.y, amount.z)); box("deflate", a.deflate(amount.x, amount.y, amount.z)); box("contract", a.contract(amount.x, amount.y, amount.z)); box("expand", a.expandTowards(amount)); box("intersect", a.intersect(b)); box("union", a.minmax(b)); box("next", a.nextDeflated()); + box("set-min", switch(axis) { case X -> a.setMinX(value); case Y -> a.setMinY(value); case Z -> a.setMinZ(value); }); + box("set-max", switch(axis) { case X -> a.setMaxX(value); case Y -> a.setMaxY(value); case Z -> a.setMaxZ(value); }); + box("of-size", AABB.ofSize(start, amount.x, amount.y, amount.z)); box("unit", AABB.unitCubeFromLowerCorner(start)); + vector("center", a.getCenter()); vector("bottom", a.getBottomCenter()); vector("size", new Vec3(a.getXsize(), a.getYsize(), a.getZsize())); + values("distance", a.getSize(), a.distanceToSqr(start), a.distanceToSqr(b)); + out.printf("flags %d %d %d %d%n", flag(a.intersects(b)), flag(a.contains(start)), flag(a.hasNaN()), flag(a.collidedAlongVector(amount, List.of(b)))); + point("clip", a.clip(start, end)); hit(AABB.clip(List.of(a, b), start, end, BlockPos.ZERO)); + } + case "block-box" -> { BlockPos a = in.pos(), b = in.pos(); box("block", new AABB(a)); box("encapsulate", AABB.encapsulatingFullBlocks(a, b)); } + case "grid" -> { + boolean cube = in.integer() != 0; int nx = in.integer(), ny = in.integer(), nz = in.integer(); + double[] xs = new double[nx + 1], ys = new double[ny + 1], zs = new double[nz + 1]; + for (double[] coords : new double[][] {xs, ys, zs}) for (int i = 0; i < coords.length; i++) coords[i] = in.number(); + String occupied = in.word(); BitSetDiscreteVoxelShape discrete = new BitSetDiscreteVoxelShape(nx, ny, nz); + for (int x = 0; x < nx; x++) for (int y = 0; y < ny; y++) for (int z = 0; z < nz; z++) if (occupied.charAt((x * ny + y) * nz + z) == '1') discrete.fill(x, y, z); + VoxelShape shape = cube ? new CubeVoxelShape(discrete) : ARRAY.newInstance(discrete, xs, ys, zs); + List<AABB> boxes = shape.toAabbs(); out.printf("shape %d %d%n", shapes.size(), boxes.size()); + values("axis-extrema",shape.min(Direction.Axis.X),shape.min(Direction.Axis.Y),shape.min(Direction.Axis.Z),shape.max(Direction.Axis.X),shape.max(Direction.Axis.Y),shape.max(Direction.Axis.Z)); + if (shape.isEmpty()) out.println("shape-bounds none"); else box("shape-bounds", shape.bounds()); + for (AABB b : boxes) box("part", b); shapes.add(shape); + } + case "query" -> { + VoxelShape shape = shapes.get(in.integer()); AABB b = in.box(); Vec3 start = in.vector(), end = in.vector(), p = in.vector(); BlockPos block = in.pos(); Direction.Axis axis = Direction.Axis.values()[in.integer()]; double amount = in.number(); + values("column", shape.min(axis, p.x, p.y), shape.max(axis, p.x, p.y)); + values("collide", shape.collide(axis, b, amount)); hit(shape.clip(start, end, block)); point("closest", shape.closestPointTo(p)); + out.printf("index %d %d %d%n", INDEX.invoke(shape, Direction.Axis.X, p.x), INDEX.invoke(shape, Direction.Axis.Y, p.y), INDEX.invoke(shape, Direction.Axis.Z, p.z)); + } + case "many" -> { + AABB b = in.box(); Direction.Axis axis = Direction.Axis.values()[in.integer()]; double amount = in.number(); int count = in.integer(); List<VoxelShape> selected = new ArrayList<>(); + for (int i = 0; i < count; i++) selected.add(shapes.get(in.integer())); values("many", Shapes.collide(axis, b, selected, amount)); + } + case "motion" -> { + AABB b = in.box(); Vec3 movement = in.vector(); float maxStep = (float)in.number(), currentY = (float)in.number(); int count = in.integer(); List<VoxelShape> selected = new ArrayList<>(); + for (int i = 0; i < count; i++) selected.add(shapes.get(in.integer())); + vector("motion", (Vec3)MOTION.invoke(null,movement,b,selected)); + float[] candidates = (float[])STEP.invoke(null,b,selected,maxStep,currentY); + out.printf("steps %d",candidates.length); for(float height:candidates)out.printf(" %08x",Float.floatToIntBits(height)); out.println(); + } + default -> throw new IllegalArgumentException(operation); + } + if (in.cursor != in.words.length) throw new AssertionError("trailing input"); + } + public static void main(String[] args) throws Exception { + SharedConstants.tryDetectVersion(); Bootstrap.bootStrap(); + try (BufferedReader input = Files.newBufferedReader(Path.of(args[0])); PrintWriter out = new PrintWriter(Files.newBufferedWriter(Path.of(args[1])))) { + VanillaGeometryOracle oracle = new VanillaGeometryOracle(out); int lineNumber = 0; + for (String line; (line = input.readLine()) != null;) oracle.command(line, ++lineNumber); + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGroundStateOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGroundStateOracle.java new file mode 100644 index 000000000..b5a033561 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGroundStateOracle.java @@ -0,0 +1,39 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.*; +import net.minecraft.world.phys.*; +/** Native ground/support state transitions with controlled support queries. */ +public final class VanillaGroundStateOracle { + static final class Stop extends RuntimeException {} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static Vec3 vector(JsonElement v){var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static Optional<BlockPos> position(JsonElement v){if(v.isJsonNull())return Optional.empty();var a=v.getAsJsonArray();return Optional.of(new BlockPos(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt()));} + static final class Level extends net.minecraft.server.level.ServerLevel { + JsonObject op;PrintWriter out;int calls; + private Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public Optional<BlockPos> findSupportingBlock(Entity entity,AABB b){out.printf("find %016x %016x %016x %016x %016x %016x%n",Double.doubleToLongBits(b.minX),Double.doubleToLongBits(b.minY),Double.doubleToLongBits(b.minZ),Double.doubleToLongBits(b.maxX),Double.doubleToLongBits(b.maxY),Double.doubleToLongBits(b.maxZ));int call=calls++;if(call==op.get("fail").getAsInt())throw new Stop();return position(op.getAsJsonArray("results").get(call));} + } + static final class Actor extends Marker {Actor(){super(null,null);}void configure(Level level){setLevel(level);}} + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var allocator=Class.forName("sun.misc.Unsafe");var field=allocator.getDeclaredField("theUnsafe");field.setAccessible(true);var unsafe=field.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + var ground=Entity.class.getDeclaredField("onGround");ground.setAccessible(true);var empty=Entity.class.getDeclaredField("onGroundNoBlocks");empty.setAccessible(true);var support=Entity.class.getDeclaredField("mainSupportingBlockPos");support.setAccessible(true); + var check=Entity.class.getDeclaredMethod("checkSupportingBlock",boolean.class,Vec3.class);check.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){ + for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var initial=f.getAsJsonObject("initial");var level=(Level)allocate.invoke(unsafe,Level.class);level.out=out;var entity=(Actor)allocate.invoke(unsafe,Actor.class);entity.configure(level);ground.setBoolean(entity,initial.get("grounded").getAsBoolean());entity.horizontalCollision=initial.get("horizontal").getAsBoolean();empty.setBoolean(entity,initial.get("empty").getAsBoolean());support.set(entity,position(initial.get("support"))); + for(var value:f.getAsJsonArray("ops")){ + var op=value.getAsJsonObject();level.op=op;level.calls=0;var b=op.getAsJsonArray("box");entity.setBoundingBox(new AABB(number(b.get(0)),number(b.get(1)),number(b.get(2)),number(b.get(3)),number(b.get(4)),number(b.get(5))));Vec3 movement=op.get("movement").isJsonNull()?null:vector(op.get("movement"));boolean onGround=op.get("grounded").getAsBoolean(); + try{switch(op.get("mode").getAsInt()){case 0->check.invoke(entity,onGround,movement);case 1->entity.setOnGroundWithMovement(onGround,movement);case 2->entity.setOnGroundWithMovement(onGround,op.get("horizontal").getAsBoolean(),movement);default->throw new AssertionError();}out.println("result ok");} + catch(InvocationTargetException error){if(error.getCause() instanceof Stop)out.println("result error");else throw error;}catch(Stop error){out.println("result error");} + out.println("flags "+entity.onGround()+" "+entity.horizontalCollision+" "+empty.getBoolean(entity));var selected=(Optional<?>)support.get(entity);if(selected.isEmpty())out.println("support none");else{var p=(BlockPos)selected.get();out.println("support "+p.getX()+" "+p.getY()+" "+p.getZ());}out.println("queries "+level.calls); + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightProviderOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightProviderOracle.java new file mode 100644 index 000000000..b3fb18aff --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightProviderOracle.java @@ -0,0 +1,32 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.heightproviders.HeightProvider; + +/** Original transport calling native height-provider codecs and samples. */ +public final class VanillaHeightProviderOracle { + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + var contextMethod=VanillaAnchorOracle.class.getDeclaredMethod("context",JsonObject.class);contextMethod.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();long seed=f.get("seed").getAsLong(); + var context=(WorldGenerationContext)contextMethod.invoke(null,f); + RandomSource random=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + com.mojang.serialization.DataResult<HeightProvider> decoded; + try {decoded=HeightProvider.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(f.get("definition").getAsString()));} catch(IllegalArgumentException error) {out.println("decode error");out.println("tail "+random.nextLong());continue;} + int count=f.get("samples").getAsInt(); + if(decoded.result().isEmpty())out.println("decode error");else { + var provider=decoded.result().get();out.println("decode ok"); + for(int i=0;i<count;i++){try{out.println("sample "+provider.sample(random,context));}catch(IllegalArgumentException error){out.println("sample error");}out.println("next "+random.nextLong());} + } + out.println("tail "+random.nextLong()); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java new file mode 100644 index 000000000..6aab393db --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java @@ -0,0 +1,145 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.SharedConstants; +import net.minecraft.server.Bootstrap; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.resources.Identifier; +import net.minecraft.tags.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.level.levelgen.Heightmap; + +/** Original transport calling actual vanilla heightmap and chunk APIs. */ +public final class VanillaHeightmapOracle { + private static final Heightmap.Types[] TYPES=Heightmap.Types.values(); + private static PalettedContainerFactory factory; + + private static JsonObject facts() { + var result=new JsonObject();var states=new JsonArray();var defaults=new JsonObject(); + for(var state:Block.BLOCK_STATE_REGISTRY) { + var entry=new JsonArray(); + entry.add(BuiltInRegistries.BLOCK.getKey(state.getBlock()).toString()); + entry.add(state.isAir());entry.add(!state.getFluidState().isEmpty()); + entry.add(state.toString());entry.add(BlockState.FULL_CODEC.encodeStart(JsonOps.INSTANCE,state).getOrThrow());states.add(entry); + } + for(var id:new TreeSet<>(BuiltInRegistries.BLOCK.keySet())) + defaults.addProperty(id.toString(),Block.getId(BuiltInRegistries.BLOCK.getValue(id).defaultBlockState())); + result.add("states",states);result.add("defaults",defaults);return result; + } + static void bindTags(JsonObject resources) { + var registry=BuiltInRegistries.BLOCK; + var loader=new TagLoader<Holder<Block>>((id,required)->registry.get(id).map(value->(Holder<Block>)value),"tags/block"); + var definitions=new HashMap<Identifier,List<TagLoader.EntryWithSource>>(); + for(var item:resources.entrySet()) { + var file=TagFile.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(item.getValue().getAsString())).getOrThrow(); + var entries=new ArrayList<TagLoader.EntryWithSource>(); + for(var entry:file.entries())entries.add(new TagLoader.EntryWithSource(entry,"vanilla")); + definitions.put(Identifier.parse(item.getKey()),entries); + } + var tags=new HashMap<TagKey<Block>,List<Holder<Block>>>(); + loader.build(definitions).forEach((id,values)->tags.put(TagKey.create(Registries.BLOCK,id),List.copyOf(values))); + if(tags.size()!=resources.size())throw new AssertionError("incomplete block tags"); + registry.prepareTagReload(new TagLoader.LoadResult<>(Registries.BLOCK,tags)).apply(); + } + private static final class Chunk extends ProtoChunk { + final List<String> reads=new ArrayList<>(); + final boolean trace; + Chunk(int min,int height,boolean trace) { + super(new ChunkPos(0,0),UpgradeData.EMPTY,LevelHeightAccessor.create(min,height),factory,null); + this.trace=trace; + } + @Override public BlockState getBlockState(BlockPos pos) { + var state=super.getBlockState(pos); + if(trace)reads.add("read "+pos.getX()+" "+pos.getY()+" "+pos.getZ()+" "+Block.getId(state)); + return state; + } + void write(int x,int y,int z,int id) { + getSection(getSectionIndex(y)).setBlockState(x&15,y&15,z&15,Block.stateById(id),false); + } + } + private static void fixture(JsonObject input,PrintWriter out) { + int min=input.get("min").getAsInt(),height=input.get("height").getAsInt(); + var chunk=new Chunk(min,height,input.get("trace").getAsBoolean()); + out.println("chunk "+min+" "+height); + for(var item:input.getAsJsonArray("initial")) { + var a=item.getAsJsonArray();chunk.write(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt(),a.get(3).getAsInt()); + } + for(var type:TYPES)chunk.getOrCreateHeightmapUnprimed(type); + for(var item:input.getAsJsonArray("ops")) { + var a=item.getAsJsonArray();String op=a.get(0).getAsString(); + switch(op) { + case "set" -> { + int x=a.get(1).getAsInt(),y=a.get(2).getAsInt(),z=a.get(3).getAsInt(),id=a.get(4).getAsInt(),mask=a.get(5).getAsInt(); + chunk.write(x,y,z,id); + for(int t=0;t<TYPES.length;t++)if((mask&(1<<t))!=0) { + try {out.println("update "+t+" "+chunk.getOrCreateHeightmapUnprimed(TYPES[t]).update(x,y,z,Block.stateById(id)));} + catch(RuntimeException e){out.println("update "+t+" error");} + } + } + case "update" -> { + int x=a.get(1).getAsInt(),y=a.get(2).getAsInt(),z=a.get(3).getAsInt(),id=a.get(4).getAsInt(),t=a.get(5).getAsInt(); + try {out.println("update "+t+" "+chunk.getOrCreateHeightmapUnprimed(TYPES[t]).update(x,y,z,Block.stateById(id)));} + catch(RuntimeException e){out.println("update "+t+" error");} + } + case "prime" -> { + var selected=EnumSet.noneOf(Heightmap.Types.class);int mask=a.get(1).getAsInt(); + for(int t=0;t<TYPES.length;t++)if((mask&(1<<t))!=0)selected.add(TYPES[t]); + Heightmap.primeHeightmaps(chunk,selected);out.println("prime "+mask); + } + case "raw" -> { + int t=a.get(1).getAsInt();var words=a.get(2).getAsJsonArray();long[] data=new long[words.size()]; + for(int i=0;i<data.length;i++)data[i]=Long.parseUnsignedLong(words.get(i).getAsString(),16); + chunk.getOrCreateHeightmapUnprimed(TYPES[t]).setRawData(chunk,TYPES[t],data);out.println("raw "+t); + } + case "query" -> { + int x=a.get(1).getAsInt(),z=a.get(2).getAsInt(); + for(int t=0;t<TYPES.length;t++) { + var map=chunk.getOrCreateHeightmapUnprimed(TYPES[t]); + try {out.println("height "+t+" "+x+" "+z+" "+map.getFirstAvailable(x,z)+" "+map.getHighestTaken(x,z));} + catch(RuntimeException e){out.println("height "+t+" "+x+" "+z+" error");} + } + } + case "dump" -> { + out.println("highest_section "+chunk.getHighestSectionPosition()); + for(int t=0;t<TYPES.length;t++) { + long[] data=chunk.getOrCreateHeightmapUnprimed(TYPES[t]).getRawData(); + out.println("words "+t+" "+data.length); + for(long word:data)out.println(Long.toUnsignedString(word,16)); + } + } + default -> throw new IllegalArgumentException(op); + } + for(String read:chunk.reads)out.println(read);chunk.reads.clear(); + } + } + public static void main(String[] args) throws Exception { + SharedConstants.tryDetectVersion();Bootstrap.bootStrap(); + Path directory=Path.of(args[1]); + if(args[0].equals("export")) { + Files.writeString(directory,new Gson().toJson(facts()),StandardCharsets.UTF_8);return; + } + Holder<Biome> biome=Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},Biomes.PLAINS); + var ids=new IdMapper<Holder<Biome>>();ids.add(biome); + // Only in-memory section storage is exercised; biome and section codecs are not invoked. + factory=new PalettedContainerFactory(Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY),Blocks.AIR.defaultBlockState(),null,Strategy.createForBiomes(ids),biome,null); + bindTags(JsonParser.parseString(Files.readString(directory.resolve("tags.json"))).getAsJsonObject()); + try(var out=new PrintWriter(Files.newBufferedWriter(directory.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(int t=0;t<TYPES.length;t++)out.println("type "+t+" "+TYPES[t].getSerializationKey()+" "+TYPES[t].sendToClient()+" "+TYPES[t].keepAfterWorldgen()); + for(var state:Block.BLOCK_STATE_REGISTRY) { + int mask=0;for(int t=0;t<TYPES.length;t++)if(TYPES[t].isOpaque().test(state))mask|=1<<t; + out.println("predicate "+Block.getId(state)+" "+mask); + } + for(String line:Files.readAllLines(directory.resolve("inputs.txt")))fixture(JsonParser.parseString(line).getAsJsonObject(),out); + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInteractionShapeOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInteractionShapeOracle.java new file mode 100644 index 000000000..0c2520ccb --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInteractionShapeOracle.java @@ -0,0 +1,35 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.nbt.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.phys.*; +import net.minecraft.world.phys.shapes.*; +/** Audits static registered interaction shapes and invokes actual ray-face overrides. */ +public final class VanillaInteractionShapeOracle { + static BlockGetter world=(BlockGetter)Proxy.newProxyInstance(BlockGetter.class.getClassLoader(),new Class<?>[]{BlockGetter.class},(proxy,method,values)->{if(method.isDefault())return InvocationHandler.invokeDefault(proxy,method,values);throw new AssertionError("interaction shape unexpectedly queried world: "+method);}); + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static Vec3 vector(JsonElement v){var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static VoxelShape shape(JsonElement v){var result=Shapes.empty();for(var value:v.getAsJsonArray()){var a=value.getAsJsonArray();result=Shapes.or(result,Shapes.box(number(a.get(0)),number(a.get(1)),number(a.get(2)),number(a.get(3)),number(a.get(4)),number(a.get(5))));}return result;} + static Class<?> owner(Class<?> type)throws Exception{for(;type!=null;type=type.getSuperclass())try{return type.getDeclaredMethod("getInteractionShape",BlockState.class,BlockGetter.class,BlockPos.class).getDeclaringClass();}catch(NoSuchMethodException ignored){}throw new AssertionError();} + static void export(Path dir)throws Exception{ + var allowed=Set.of(BlockBehaviour.class,AbstractCauldronBlock.class,ComposterBlock.class,HopperBlock.class,ScaffoldingBlock.class);for(var block:BuiltInRegistries.BLOCK)if(!allowed.contains(owner(block.getClass())))throw new AssertionError("new interaction implementation"); + var grid=VanillaCollisionOracle.class.getDeclaredMethod("grid",VoxelShape.class);grid.setAccessible(true);var states=new ListTag();var defaults=new CompoundTag();var shapes=new ListTag();var identities=new IdentityHashMap<VoxelShape,Integer>();var mapping=new int[Block.BLOCK_STATE_REGISTRY.size()]; + for(var state:Block.BLOCK_STATE_REGISTRY){int id=Block.getId(state);states.add(BlockState.FULL_CODEC.encodeStart(NbtOps.INSTANCE,state).getOrThrow());if(state==state.getBlock().defaultBlockState())defaults.putInt(BuiltInRegistries.BLOCK.getKey(state.getBlock()).toString(),id);var shape=state.getInteractionShape(world,BlockPos.ZERO);Integer index=identities.get(shape);if(index==null){index=shapes.size();identities.put(shape,index);shapes.add((CompoundTag)grid.invoke(null,shape));}mapping[id]=index;} + var registry=new CompoundTag();registry.putInt("DataVersion",net.minecraft.SharedConstants.getCurrentVersion().dataVersion().version());registry.put("states",states);registry.put("defaults",defaults);var data=new CompoundTag();data.putInt("DataVersion",net.minecraft.SharedConstants.getCurrentVersion().dataVersion().version());data.putString("kind","interaction");data.put("states",states);data.put("shapes",shapes);data.putIntArray("cached_shapes",mapping); + try(var out=new DataOutputStream(Files.newOutputStream(dir.resolve("block-registry.nbt")))){NbtIo.write(registry,out);}try(var out=new DataOutputStream(Files.newOutputStream(dir.resolve("interaction-shapes.nbt")))){NbtIo.write(data,out);}var info=new JsonObject();info.addProperty("states",states.size());info.addProperty("shapes",shapes.size());Files.writeString(dir.resolve("info.json"),info.toString()); + } + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]);if(args[0].equals("export")){export(dir);return;} + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){var identities=new IdentityHashMap<VoxelShape,Integer>();for(var state:Block.BLOCK_STATE_REGISTRY){var shape=state.getInteractionShape(world,BlockPos.ZERO);out.println("state "+Block.getId(state)+" "+identities.computeIfAbsent(shape,k->identities.size())+" "+(shape==Shapes.empty())+" "+(shape==Shapes.block())+" "+shape.toAabbs().size());for(var b:shape.toAabbs())out.printf("box %016x %016x %016x %016x %016x %016x%n",Double.doubleToLongBits(b.minX),Double.doubleToLongBits(b.minY),Double.doubleToLongBits(b.minZ),Double.doubleToLongBits(b.maxX),Double.doubleToLongBits(b.maxY),Double.doubleToLongBits(b.maxZ));} + for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var p=f.getAsJsonArray("position");var position=new BlockPos(p.get(0).getAsInt(),p.get(1).getAsInt(),p.get(2).getAsInt());var state=Block.stateById(f.get("state").getAsInt());var hit=world.clipWithInteractionOverride(vector(f.get("from")),vector(f.get("to")),position,shape(f.get("shape")),state);if(hit==null)out.println("none");else{var v=hit.getLocation();out.printf("hit %016x %016x %016x %s %d %d %d %s%n",Double.doubleToLongBits(v.x),Double.doubleToLongBits(v.y),Double.doubleToLongBits(v.z),hit.getDirection().getSerializedName(),hit.getBlockPos().getX(),hit.getBlockPos().getY(),hit.getBlockPos().getZ(),hit.isInside());}} + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryPickupOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryPickupOracle.java new file mode 100644 index 000000000..7ed3e8845 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryPickupOracle.java @@ -0,0 +1,42 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.component.*;import net.minecraft.world.item.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.Inventory;import net.minecraft.world.item.enchantment.*; +/** Native Inventory pickup and storage with real stack/component and equipment aliases. */ +@SuppressWarnings({"unchecked","rawtypes"}) +public final class VanillaInventoryPickupOracle { + static Item[] items;static DataComponentType[] keys;static Field components,count,patchMap,equipmentItems,changed;static Object removed;static ItemEnchantments enchanted; + static EquipmentSlot[] mapped={EquipmentSlot.FEET,EquipmentSlot.LEGS,EquipmentSlot.CHEST,EquipmentSlot.HEAD,EquipmentSlot.OFFHAND,EquipmentSlot.BODY,EquipmentSlot.SADDLE}; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static int n(JsonObject o,String k){return o.get(k).getAsInt();} + static int key(Object k){for(int i=0;i<keys.length;i++)if(keys[i]==k)return i;throw new AssertionError();} + static int item(Item i){for(int k=0;k<items.length;k++)if(items[k]==i)return k;throw new AssertionError();} + static Object value(int k,JsonElement v){if(v.isJsonNull())return null;int n=v.getAsInt();return switch(k){case 3->net.minecraft.util.Unit.INSTANCE;case 4->n==0?ItemEnchantments.EMPTY:enchanted;case 5->net.minecraft.network.chat.Component.literal(Integer.toString(n));default->n;};} + static String text(int k,Object v){if(v==null||v==removed)return "none";return switch(k){case 3->"0";case 4->((ItemEnchantments)v).isEmpty()?"0":"1";case 5->((net.minecraft.network.chat.Component)v).getString();default->v.toString();};} + static DataComponentMap prototype(JsonArray a){var b=DataComponentMap.builder();for(var e:a){var p=e.getAsJsonArray();int k=p.get(0).getAsInt();b.set(keys[k],value(k,p.get(1)));}return b.build();} + static DataComponentPatch patch(JsonArray a){var b=DataComponentPatch.builder();for(var e:a){var p=e.getAsJsonArray();int k=p.get(0).getAsInt();if(p.get(1).isJsonNull())b.remove(keys[k]);else b.set(keys[k],value(k,p.get(1)));}return b.build();} + static final class Stop extends RuntimeException {} + static final class Actor extends net.minecraft.world.entity.player.Player {Data d;Actor(){super(null,null);}@Override public net.minecraft.world.level.GameType gameMode(){return net.minecraft.world.level.GameType.SURVIVAL;}@Override public boolean isSpectator(){return false;}@Override public boolean isCreative(){return false;}@Override public boolean hasInfiniteMaterials(){d.event("infinite");return d.op.get("infinite").getAsBoolean();}} + static final class Inv extends Inventory {Data d;Inv(Actor actor,EntityEquipment equipment){super(actor,equipment);}@Override public int getMaxStackSize(){d.event("max");return n(d.op,"max");}} + static final class Data { JsonObject op;int calls,active; + void event(String name){calls++;out.println("event "+name+" "+calls);var c=inv[active];out.println("active "+c.getSelectedSlot()+" "+c.getTimesChanged());for(int i=0;i<refs.length;i++)out.println("active-ref "+i+" "+snapshot(refs[i]));var slots=new StringJoiner(" | ");for(int j=0;j<43;j++)slots.add(snapshot(c.getItem(j)));out.println("active-slots "+slots);if(calls==n(op,"fail_at"))throw new Stop();if(calls==n(op,"mutate_at")){refs[n(op,"mutate_ref")].setCount(n(op,"after_count"));refs[n(op,"mutate_ref")].set(DataComponents.MAX_STACK_SIZE,n(op,"after_max"));if(n(op,"mutate_slot")>=0)c.setItem(n(op,"mutate_slot"),refs[n(op,"replace_ref")]);if(n(op,"after_selected")>=0)c.setSelectedSlot(n(op,"after_selected"));}} + + PrintWriter out;ItemStack[] refs;Inventory[] inv;EntityEquipment[] equipment;IdentityHashMap<ItemStack,Integer> ids=new IdentityHashMap<>(); + int id(ItemStack s){return ids.computeIfAbsent(s,k->ids.size());} + String snapshot(ItemStack s){try{var raw=(PatchedDataComponentMap)components.get(s);var p=new StringJoiner(",");for(var e:((Map<?,?>)patchMap.get(raw.asPatch())).entrySet())p.add(key(e.getKey())+"="+text(key(e.getKey()),e.getValue()));var v=new StringJoiner(",");for(int k=0;k<keys.length;k++)v.add(text(k,s.get(keys[k])));return id(s)+":"+item(s.getItem())+":"+count.getInt(s)+":"+s.getCount()+":"+s.getPopTime()+":"+s.isEmpty()+":"+s.isDamaged()+":"+s.isEnchanted()+":"+v+":"+p;}catch(Exception e){throw new AssertionError(e);}} + void all()throws Exception { + for(int i=0;i<refs.length;i++)out.println("ref "+i+" "+snapshot(refs[i])); + for(int i=0;i<2;i++){var c=inv[i];out.println("inventory "+i+" "+c.getSelectedSlot()+" "+c.getTimesChanged()+" "+c.getFreeSlot()+" "+c.getSuitableHotbarSlot()+" "+c.isEmpty()+" "+c.countItem(items[0])+" "+c.countItem(items[1])+" "+c.countItem(items[2]));var slots=new StringJoiner(" | ");for(int j=0;j<43;j++)slots.add(snapshot(c.getItem(j)));out.println("slots "+slots);var eq=new StringJoiner(" | ");for(var e:((EnumMap<EquipmentSlot,ItemStack>)equipmentItems.get(equipment[i])).entrySet())eq.add(e.getKey().name()+"="+snapshot(e.getValue()));out.println("equipment "+eq);for(int j=0;j<refs.length;j++)out.println("query "+j+" "+c.contains(refs[j])+" "+c.findSlotMatchingItem(refs[j])+" "+c.findSlotMatchingCraftingIngredient(items[1].builtInRegistryHolder(),refs[j]));} + out.println("empty "+snapshot(ItemStack.EMPTY)); + } + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var lookup=net.minecraft.data.registries.VanillaRegistries.createWorldLookup();var m=new ItemEnchantments.Mutable(ItemEnchantments.EMPTY);m.set(lookup.lookupOrThrow(net.minecraft.core.registries.Registries.ENCHANTMENT).getOrThrow(Enchantments.UNBREAKING),1);enchanted=m.toImmutable(); + items=new Item[]{Items.AIR,Items.STICK,Items.SHIELD};keys=new DataComponentType[]{DataComponents.MAX_STACK_SIZE,DataComponents.DAMAGE,DataComponents.MAX_DAMAGE,DataComponents.UNBREAKABLE,DataComponents.ENCHANTMENTS,DataComponents.CUSTOM_NAME};components=field(ItemStack.class,"components");count=field(ItemStack.class,"count");patchMap=field(DataComponentPatch.class,"map");removed=field(Class.forName("net.minecraft.core.component.Removed"),"INSTANCE").get(null);equipmentItems=field(EntityEquipment.class,"items");changed=field(Inventory.class,"timesChanged");Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();for(int i=0;i<3;i++)items[i].builtInRegistryHolder().bindComponents(prototype(f.getAsJsonArray("prototypes").get(i).getAsJsonArray()));Inventory.EQUIPMENT_SLOT_MAPPING.clear();for(var e:f.getAsJsonArray("equipment_order")){int i=e.getAsInt();Inventory.EQUIPMENT_SLOT_MAPPING.put(36+i,mapped[i]);}ItemStack.EMPTY.setCount(0);ItemStack.EMPTY.setPopTime(0);((PatchedDataComponentMap)components.get(ItemStack.EMPTY)).clearPatch();var d=new Data();d.out=out;d.ids.put(ItemStack.EMPTY,0);d.refs=new ItemStack[4];for(int i=0;i<4;i++){var v=f.getAsJsonArray("stacks").get(i).getAsJsonObject();int type=n(v,"item");d.refs[i]=type<0?ItemStack.EMPTY:new ItemStack(items[type],n(v,"count"));if(type>=0){d.refs[i].setPopTime(n(v,"pop"));((PatchedDataComponentMap)components.get(d.refs[i])).restorePatch(patch(v.getAsJsonArray("patch")));}} + d.equipment=new EntityEquipment[]{new EntityEquipment(),new EntityEquipment()};if(f.get("shared_equipment").getAsBoolean())d.equipment[1]=d.equipment[0];var u=Class.forName("sun.misc.Unsafe");var unsafe=field(u,"theUnsafe").get(null);var allocate=u.getMethod("allocateInstance",Class.class);var actor=(Actor)allocate.invoke(unsafe,Actor.class);actor.d=d;d.inv=new Inventory[]{new Inv(actor,d.equipment[0]),new Inv(actor,d.equipment[1])};for(var c:d.inv)((Inv)c).d=d; + for(int i=0;i<2;i++){var initial=f.getAsJsonArray("inventories").get(i).getAsJsonObject();d.inv[i].setSelectedSlot(n(initial,"selected"));changed.setInt(d.inv[i],n(initial,"changed"));for(var entry:initial.getAsJsonArray("slots")){var pair=entry.getAsJsonArray();d.inv[i].setItem(pair.get(0).getAsInt(),d.refs[pair.get(1).getAsInt()]);}if(n(initial,"mainhand")>=0)d.equipment[i].set(EquipmentSlot.MAINHAND,d.refs[n(initial,"mainhand")]);} + d.all();for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonObject();d.op=op;d.calls=0;d.active=n(op,"inventory");var c=d.inv[d.active];int a=n(op,"a"),b=n(op,"b"),slot=n(op,"slot"),amount=n(op,"amount");try{switch(op.get("kind").getAsString()){ + case "add":out.println("added "+c.add(slot,d.refs[a]));break;case "space":out.println("space "+c.getSlotWithRemainingSpace(d.refs[a]));break;case "get":d.refs[b]=c.getItem(slot);break;case "set":c.setItem(slot,d.refs[a]);break;case "remove":d.refs[b]=c.removeItem(slot,amount);break;case "no-update":d.refs[b]=c.removeItemNoUpdate(slot);break;case "remove-ref":c.removeItem(d.refs[a]);break;case "select":c.setSelectedSlot(slot);break;case "selected":d.refs[b]=c.getSelectedItem();break;case "set-selected":d.refs[b]=c.setSelectedItem(d.refs[a]);break;case "remove-selected":d.refs[b]=c.removeFromSelected(op.get("all").getAsBoolean());break;case "pick":c.pickSlot(slot);break;case "add-pick":c.addAndPickItem(d.refs[a]);break;case "clear":c.clearContent();break;case "changed":c.setChanged();break;case "replace":c.replaceWith(d.inv[n(op,"other")]);break;case "equip":d.refs[b]=d.equipment[n(op,"inventory")].set(EquipmentSlot.values()[n(op,"equipment")],d.refs[a]);break;case "get-equip":d.refs[b]=d.equipment[n(op,"inventory")].get(EquipmentSlot.values()[n(op,"equipment")]);break;case "alias":d.refs[b]=d.refs[a];break;case "copy":d.refs[b]=d.refs[a].copy();break;case "count":d.refs[a].setCount(amount);break;case "component":int k=n(op,"key");d.refs[a].set(keys[k],value(k,op.get("value")));break;default:throw new AssertionError();}out.println("result ok "+d.calls);}catch(Stop|net.minecraft.ReportedException|IndexOutOfBoundsException|IllegalArgumentException|NullPointerException e){out.println("result error "+d.calls);}d.all();} + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryTickOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryTickOracle.java new file mode 100644 index 000000000..8ad5d1f67 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryTickOracle.java @@ -0,0 +1,28 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.world.item.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.*;import net.minecraft.world.level.Level;import net.minecraft.server.level.ServerLevel; +/** Native inventory/equipment loops composed with actual ItemStack.inventoryTick. */ +public final class VanillaInventoryTickOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate;static Field count,eqItems;static Constructor<ItemStack> ctor; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static int n(JsonObject o,String k){return o.get(k).getAsInt();} + static final class Data { + PrintWriter out;JsonObject f;ItemStack[] refs;Item[] types;Inventory inv;EntityEquipment equipment;Actor actor;Level[] levels;int level,calls;IdentityHashMap<ItemStack,Integer> ids=new IdentityHashMap<>(); + int type(Item item){for(int i=0;i<types.length;i++)if(types[i]==item)return i;throw new AssertionError();} + int id(ItemStack s){return ids.computeIfAbsent(s,k->ids.size());} + String snapshot(ItemStack s){try{return id(s)+":"+type(s.getItem())+":"+count.getInt(s)+":"+s.getCount()+":"+s.getPopTime()+":"+s.isEmpty();}catch(Exception e){throw new AssertionError(e);}} + void all(){try{for(int i=0;i<refs.length;i++)out.println("ref "+i+" "+snapshot(refs[i]));out.println("state "+inv.getSelectedSlot()+" "+level+" "+calls);var slots=new StringJoiner(" | ");for(int i=0;i<43;i++)slots.add(snapshot(inv.getItem(i)));out.println("slots "+slots);var entries=new StringJoiner(" | ");for(var e:((EnumMap<EquipmentSlot,ItemStack>)eqItems.get(equipment)).entrySet())entries.add(e.getKey().name()+"="+snapshot(e.getValue()));out.println("equipment "+entries);out.println("empty "+snapshot(ItemStack.EMPTY));}catch(Exception e){throw new AssertionError(e);}} + void event(String name){out.println(name);calls++;all();if(calls==n(f,"fail_at"))throw new Stop();if(calls==n(f,"mutate_at")){refs[n(f,"mutate_ref")].setCount(n(f,"after_count"));refs[n(f,"pop_ref")].setPopTime(n(f,"after_pop"));if(n(f,"replace_slot")>=0)inv.setItem(n(f,"replace_slot"),refs[n(f,"replace_ref")]);if(n(f,"equipment_slot")>=0)equipment.set(EquipmentSlot.values()[n(f,"equipment_slot")],refs[n(f,"equipment_ref")]);inv.setSelectedSlot(n(f,"after_selected"));level=n(f,"after_level");}} + } + static final class Actor extends Player {Data d;Actor(){super(null,null);}@Override public net.minecraft.world.level.GameType gameMode(){return net.minecraft.world.level.GameType.SURVIVAL;}@Override public boolean isSpectator(){return false;}@Override public boolean isCreative(){return false;}@Override public Level level(){d.event("level");return d.levels[d.level];}} + static final class TickItem extends Item {Data d;int type;TickItem(){super(null);}@Override public void inventoryTick(ItemStack s,ServerLevel level,Entity owner,EquipmentSlot slot){if(owner!=d.actor||level!=d.levels[1])throw new AssertionError();d.event("tick "+type+" "+d.id(s)+" "+(slot==null?-1:slot.ordinal()));}} + @SuppressWarnings("unchecked")public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);count=field(ItemStack.class,"count");eqItems=field(EntityEquipment.class,"items");ctor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);ctor.setAccessible(true); + // ClientLevel is absent from the dedicated JAR. Null exercises the same + // non-ServerLevel branch there; client comparisons use an actual ClientLevel. + Level client=null;try{client=(Level)allocate.invoke(unsafe,Class.forName("net.minecraft.client.multiplayer.ClientLevel"));}catch(ClassNotFoundException ignored){} + Path dir=Path.of(args[1]);try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.out=out;d.f=JsonParser.parseString(line).getAsJsonObject();d.ids.put(ItemStack.EMPTY,0);ItemStack.EMPTY.setCount(0);ItemStack.EMPTY.setPopTime(0);d.actor=make(Actor.class);d.actor.d=d;d.levels=new Level[]{client,make(ServerLevel.class)};d.level=n(d.f,"level");var first=make(TickItem.class);first.d=d;first.type=1;var second=make(TickItem.class);second.d=d;second.type=2;d.types=new Item[]{Items.AIR,first,second};d.refs=new ItemStack[4];for(int i=0;i<4;i++){var v=d.f.getAsJsonArray("stacks").get(i).getAsJsonObject();int item=n(v,"item");d.refs[i]=item<0?ItemStack.EMPTY:ctor.newInstance(Holder.direct(d.types[item]),n(v,"count"),new PatchedDataComponentMap(DataComponentMap.EMPTY));if(item>=0)d.refs[i].setPopTime(n(v,"pop"));}d.equipment=new EntityEquipment();d.inv=new Inventory(d.actor,d.equipment);d.inv.setSelectedSlot(n(d.f,"selected"));for(var e:d.f.getAsJsonArray("slots")){var p=e.getAsJsonArray();d.inv.setItem(p.get(0).getAsInt(),d.refs[p.get(1).getAsInt()]);}for(var e:d.f.getAsJsonArray("equipment")){var p=e.getAsJsonArray();d.equipment.set(EquipmentSlot.values()[p.get(0).getAsInt()],d.refs[p.get(1).getAsInt()]);}d.all();try{switch(d.f.get("mode").getAsString()){case "inventory":d.inv.tick();break;case "equipment":d.equipment.tick(d.actor);break;case "both":d.inv.tick();d.equipment.tick(d.actor);break;case "stack":int slot=n(d.f,"slot");d.refs[n(d.f,"argument")].inventoryTick(d.levels[n(d.f,"argument_level")],d.actor,slot<0?null:EquipmentSlot.values()[slot]);break;default:throw new AssertionError();}out.println("result ok");}catch(Stop e){out.println("result error");}d.all();}} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryUseOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryUseOracle.java new file mode 100644 index 000000000..45f3d1191 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryUseOracle.java @@ -0,0 +1,40 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.*;import net.minecraft.world.item.*;import net.minecraft.world.level.*;import net.minecraft.world.level.gameevent.GameEvent;import net.minecraft.server.level.*;import net.minecraft.network.syncher.*; +/** Native use lifecycle with actual Inventory, PlayerEquipment and synchronized flags. */ +public final class VanillaInventoryUseOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate;static Field useItem,remaining,kinetic,count,eqItems; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static int n(JsonObject o,String k){return o.get(k).getAsInt();} + static final class Data { + JsonObject f;PrintWriter out;int calls;boolean changed;Actor actor;ItemStack[] items;Server[] levels;Inventory inv;PlayerEquipment equipment;SynchedEntityData data;SynchedEntityData.DataItem<Byte> flags; + JsonObject state(){return f.getAsJsonObject(changed?"after":"initial");} + int id(ItemStack s){for(int i=0;i<items.length;i++)if(items[i]==s)return i;throw new AssertionError();} + void reset(){try{var s=state();useItem.set(actor,items[n(s,"item")]);remaining.setInt(actor,n(s,"remaining"));kinetic.set(actor,s.get("kinetic").getAsBoolean()?new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>():null);for(int i=0;i<3;i++)items[i].setCount(s.getAsJsonArray("counts").get(i).getAsInt());inv.clearContent();inv.setSelectedSlot(n(s,"selected"));for(var e:s.getAsJsonArray("slots")){var p=e.getAsJsonArray();inv.setItem(p.get(0).getAsInt(),items[p.get(1).getAsInt()]);}}catch(Exception e){throw new AssertionError(e);}} + void all(){try{out.println("state "+id((ItemStack)useItem.get(actor))+" "+remaining.getInt(actor)+" "+(kinetic.get(actor)!=null)+" "+actor.isUsingItem()+" "+actor.getUsedItemHand().ordinal()+" "+Byte.toUnsignedInt(flags.getValue())+" "+data.isDirty()+" "+flags.isDirty()+" "+inv.getSelectedSlot()+" "+calls+" "+changed);out.println("counts "+count.getInt(items[0])+" "+count.getInt(items[1])+" "+count.getInt(items[2]));var slots=new StringJoiner(",");for(int i=0;i<43;i++)slots.add(Integer.toString(id(inv.getItem(i))));out.println("slots "+slots);var eq=new StringJoiner(",");for(var e:((EnumMap<EquipmentSlot,ItemStack>)eqItems.get(equipment)).entrySet())eq.add(e.getKey().ordinal()+"="+id(e.getValue()));out.println("equipment "+eq);}catch(Exception e){throw new AssertionError(e);}} + void event(String name){out.println(name);int index=calls++;all();if(index==n(f,"fail"))throw new Stop();if(index==n(f,"mutate_at")){changed=true;reset();}} + } + static final class Server extends ServerLevel {Data d;int id;Server(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public boolean isClientSide(){d.event("client "+id);return d.state().getAsJsonArray("clients").get(id).getAsBoolean();}} + static final class CustomItem extends Item {Data d;int id;CustomItem(){super(null);} + @Override public void onUseTick(Level l,LivingEntity a,ItemStack s,int ticks){d.event("tick "+id+" "+d.id(s)+" "+((Server)l).id+" "+ticks);} + @Override public boolean useOnRelease(ItemStack s){d.event("release-query "+id+" "+d.id(s));return d.state().getAsJsonArray("releases").get(id).getAsBoolean();} + @Override public boolean releaseUsing(ItemStack s,Level l,LivingEntity a,int ticks){d.event("release "+id+" "+d.id(s)+" "+((Server)l).id+" "+ticks);return false;} + @Override public ItemStack finishUsingItem(ItemStack s,Level l,LivingEntity a){d.event("finish "+id+" "+d.id(s)+" "+((Server)l).id);return d.items[d.state().getAsJsonArray("finishes").get(id).getAsInt()];} + } + static final class Actor extends Player {Data d;Actor(){super(null,null);}@Override public GameType gameMode(){return GameType.SURVIVAL;}@Override public boolean isSpectator(){return false;}@Override public boolean isCreative(){return false;} + @Override public ServerLevel level(){d.event("level");return d.levels[n(d.state(),"level")];} + @Override public int getUseItemRemainingTicks(){d.event("remaining");return n(d.state(),"virtual_remaining");} + @Override public void onEquipItem(EquipmentSlot slot,ItemStack old,ItemStack next){d.event("equip "+slot.ordinal()+" "+d.id(old)+" "+d.id(next));} + @Override public void onSyncedDataUpdated(EntityDataAccessor<?> key){d.event("synced "+key.id());} + @Override public void gameEvent(Holder<GameEvent> event){if(event!=GameEvent.ITEM_INTERACT_FINISH)throw new AssertionError();d.event("vibration");} + void update(ItemStack s){super.updateUsingItem(s);}void complete(){super.completeUsingItem();} + } + @SuppressWarnings("unchecked")public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Items.AIR.builtInRegistryHolder().bindComponents(DataComponentMap.EMPTY);var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);useItem=field(LivingEntity.class,"useItem");remaining=field(LivingEntity.class,"useItemRemaining");kinetic=field(LivingEntity.class,"recentKineticEnemies");count=field(ItemStack.class,"count");eqItems=field(EntityEquipment.class,"items");var invField=field(Player.class,"inventory");var equipmentField=field(LivingEntity.class,"equipment");var dataField=field(Entity.class,"entityData");var flagKey=(EntityDataAccessor<Byte>)field(LivingEntity.class,"DATA_LIVING_ENTITY_FLAGS").get(null);if(flagKey.id()!=8)throw new AssertionError();var dataCtor=SynchedEntityData.class.getDeclaredConstructor(SyncedDataHolder.class,SynchedEntityData.DataItem[].class);dataCtor.setAccessible(true);var tick=LivingEntity.class.getDeclaredMethod("updatingUsingItem");tick.setAccessible(true);var ctor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);ctor.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.actor=make(Actor.class);d.actor.d=d;d.levels=new Server[]{make(Server.class),make(Server.class)};for(int i=0;i<2;i++){d.levels[i].d=d;d.levels[i].id=i;}var first=make(CustomItem.class);first.d=d;first.id=0;var second=make(CustomItem.class);second.d=d;second.id=1;d.items=new ItemStack[]{ctor.newInstance(Holder.direct(first),1,new PatchedDataComponentMap(DataComponentMap.EMPTY)),ctor.newInstance(Holder.direct(d.f.get("shared_type").getAsBoolean()?first:second),1,new PatchedDataComponentMap(DataComponentMap.EMPTY)),ItemStack.EMPTY};ItemStack.EMPTY.setCount(0);ItemStack.EMPTY.setPopTime(0);for(int i=0;i<2;i++)if(d.f.getAsJsonArray("vibrations").get(i).getAsBoolean())d.items[i].set(DataComponents.USE_EFFECTS,new net.minecraft.world.item.component.UseEffects(false,true,1));d.equipment=new PlayerEquipment(d.actor);d.inv=new Inventory(d.actor,d.equipment);invField.set(d.actor,d.inv);equipmentField.set(d.actor,d.equipment);var entries=new SynchedEntityData.DataItem<?>[9];for(int i=0;i<9;i++)entries[i]=new SynchedEntityData.DataItem<Byte>(new EntityDataAccessor<Byte>(i,EntityDataSerializers.BYTE),(byte)0);d.flags=new SynchedEntityData.DataItem<Byte>(flagKey,(byte)n(d.f,"flags"));entries[8]=d.flags;d.data=dataCtor.newInstance(d.actor,entries);dataField.set(d.actor,d.data);d.reset();d.all(); + try{switch(d.f.get("mode").getAsString()){case "tick":try{tick.invoke(d.actor);}catch(InvocationTargetException e){if(e.getCause() instanceof Stop)throw new Stop();throw new AssertionError(e.getCause());}break;case "update":d.actor.update(d.items[n(d.f,"argument")]);break;case "complete":d.actor.complete();break;case "release":d.actor.releaseUsingItem();break;case "stop":d.actor.stopUsingItem();break;default:throw new AssertionError();}out.println("result ok");}catch(Stop e){out.println("result error");}d.all();var packed=d.data.packDirty();out.println("packed "+(packed==null?"none":packed.stream().map(v->v.id()+":"+Byte.toUnsignedInt((Byte)v.value())).collect(java.util.stream.Collectors.joining(","))));d.all(); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryUseStartOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryUseStartOracle.java new file mode 100644 index 000000000..8a8478e69 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryUseStartOracle.java @@ -0,0 +1,42 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.*;import net.minecraft.world.item.*;import net.minecraft.world.level.*;import net.minecraft.world.level.gameevent.GameEvent;import net.minecraft.server.level.*;import net.minecraft.network.syncher.*; +/** Native use lifecycle with actual Inventory, PlayerEquipment and synchronized flags. */ +public final class VanillaInventoryUseStartOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate;static Field useItem,remaining,kinetic,count,eqItems; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static int n(JsonObject o,String k){return o.get(k).getAsInt();} + static final class Data { + JsonObject f;PrintWriter out;int calls;boolean changed;Entity enemy;Chunks[] chunks;Actor actor;ItemStack[] items;Server[] levels;Inventory inv;PlayerEquipment equipment;SynchedEntityData data;SynchedEntityData.DataItem<Byte> flags; + JsonObject state(){return f.getAsJsonObject(changed?"after":"initial");} + int id(ItemStack s){for(int i=0;i<items.length;i++)if(items[i]==s)return i;throw new AssertionError();} + void reset(){try{var s=state();useItem.set(actor,items[n(s,"item")]);remaining.setInt(actor,n(s,"remaining"));kinetic.set(actor,s.get("kinetic").getAsBoolean()?new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>():null);if(kinetic.get(actor)!=null)((it.unimi.dsi.fastutil.objects.Object2LongMap<Object>)kinetic.get(actor)).put(enemy,99L);for(int i=0;i<3;i++)items[i].setCount(s.getAsJsonArray("counts").get(i).getAsInt());inv.clearContent();inv.setSelectedSlot(n(s,"selected"));for(var e:s.getAsJsonArray("slots")){var p=e.getAsJsonArray();inv.setItem(p.get(0).getAsInt(),items[p.get(1).getAsInt()]);}}catch(Exception e){throw new AssertionError(e);}} + void all(){try{out.println("state "+id((ItemStack)useItem.get(actor))+" "+remaining.getInt(actor)+" "+(kinetic.get(actor)!=null)+" "+actor.isUsingItem()+" "+actor.getUsedItemHand().ordinal()+" "+Byte.toUnsignedInt(flags.getValue())+" "+data.isDirty()+" "+flags.isDirty()+" "+inv.getSelectedSlot()+" "+calls+" "+changed+" "+(kinetic.get(actor)==null?-1:((it.unimi.dsi.fastutil.objects.Object2LongMap<?>)kinetic.get(actor)).size()));out.println("counts "+count.getInt(items[0])+" "+count.getInt(items[1])+" "+count.getInt(items[2]));var slots=new StringJoiner(",");for(int i=0;i<43;i++)slots.add(Integer.toString(id(inv.getItem(i))));out.println("slots "+slots);var eq=new StringJoiner(",");for(var e:((EnumMap<EquipmentSlot,ItemStack>)eqItems.get(equipment)).entrySet())eq.add(e.getKey().ordinal()+"="+id(e.getValue()));out.println("equipment "+eq);}catch(Exception e){throw new AssertionError(e);}} + void event(String name){out.println(name);int index=calls++;all();if(index==n(f,"fail"))throw new Stop();if(index==n(f,"mutate_at")){changed=true;reset();}} + } + static final class Chunks extends ServerChunkCache {Data d;int id;Chunks(){super(null,null,null,null,null,null,0,0,false,null);}@Override public void sendToTrackingPlayers(Entity e,net.minecraft.network.protocol.Packet<? super net.minecraft.network.protocol.game.ClientGamePacketListener> packet){var p=(net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket)packet;var entry=p.getSlots().getFirst();d.event("equipment "+id+" "+(entry.getFirst()==EquipmentSlot.MAINHAND?0:1)+" "+d.id(entry.getSecond())+" "+p.getEntity());}} + static final class Server extends ServerLevel {Data d;int id;Server(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public ServerChunkCache getChunkSource(){d.event("chunks "+id);return d.chunks[id];}@Override public boolean isClientSide(){d.event("client "+id);return d.state().getAsJsonArray("clients").get(id).getAsBoolean();}} + static final class CustomItem extends Item {Data d;int id;CustomItem(){super(null);} + @Override public int getUseDuration(ItemStack stack,LivingEntity actor){d.event("duration "+id+" "+d.id(stack));return d.state().getAsJsonArray("durations").get(id).getAsInt();} + @Override public void onUseTick(Level l,LivingEntity a,ItemStack s,int ticks){d.event("tick "+id+" "+d.id(s)+" "+((Server)l).id+" "+ticks);} + @Override public boolean useOnRelease(ItemStack s){d.event("release-query "+id+" "+d.id(s));return d.state().getAsJsonArray("releases").get(id).getAsBoolean();} + @Override public boolean releaseUsing(ItemStack s,Level l,LivingEntity a,int ticks){d.event("release "+id+" "+d.id(s)+" "+((Server)l).id+" "+ticks);return false;} + @Override public ItemStack finishUsingItem(ItemStack s,Level l,LivingEntity a){d.event("finish "+id+" "+d.id(s)+" "+((Server)l).id);return d.items[d.state().getAsJsonArray("finishes").get(id).getAsInt()];} + } + static final class Actor extends Player {Data d;Actor(){super(null,null);}@Override public int getId(){d.event("id");return 17;}@Override public GameType gameMode(){return GameType.SURVIVAL;}@Override public boolean isSpectator(){return false;}@Override public boolean isCreative(){return false;} + @Override public ServerLevel level(){d.event("level");return d.levels[n(d.state(),"level")];} + @Override public int getUseItemRemainingTicks(){d.event("remaining");return n(d.state(),"virtual_remaining");} + @Override public void onEquipItem(EquipmentSlot slot,ItemStack old,ItemStack next){d.event("equip "+slot.ordinal()+" "+d.id(old)+" "+d.id(next));} + @Override public void onSyncedDataUpdated(EntityDataAccessor<?> key){d.event("synced "+key.id());super.onSyncedDataUpdated(key);} + @Override public void gameEvent(Holder<GameEvent> event){if(event==GameEvent.ITEM_INTERACT_START)d.event("vibration-start");else if(event==GameEvent.ITEM_INTERACT_FINISH)d.event("vibration");else throw new AssertionError();} + void flag(int mask,boolean value){super.setLivingEntityFlag(mask,value);}void update(ItemStack s){super.updateUsingItem(s);}void complete(){super.completeUsingItem();} + } + @SuppressWarnings("unchecked")public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Items.AIR.builtInRegistryHolder().bindComponents(DataComponentMap.EMPTY);var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);useItem=field(LivingEntity.class,"useItem");remaining=field(LivingEntity.class,"useItemRemaining");kinetic=field(LivingEntity.class,"recentKineticEnemies");count=field(ItemStack.class,"count");eqItems=field(EntityEquipment.class,"items");var invField=field(Player.class,"inventory");var equipmentField=field(LivingEntity.class,"equipment");var dataField=field(Entity.class,"entityData");var flagKey=(EntityDataAccessor<Byte>)field(LivingEntity.class,"DATA_LIVING_ENTITY_FLAGS").get(null);if(flagKey.id()!=8)throw new AssertionError();var dataCtor=SynchedEntityData.class.getDeclaredConstructor(SyncedDataHolder.class,SynchedEntityData.DataItem[].class);dataCtor.setAccessible(true);var tick=LivingEntity.class.getDeclaredMethod("updatingUsingItem");tick.setAccessible(true);var ctor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);ctor.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.enemy=make(net.minecraft.world.entity.decoration.ArmorStand.class);d.enemy.setId(99);d.actor=make(Actor.class);d.actor.d=d;d.chunks=new Chunks[]{make(Chunks.class),make(Chunks.class)};for(int i=0;i<2;i++){d.chunks[i].d=d;d.chunks[i].id=i;}d.levels=new Server[]{make(Server.class),make(Server.class)};for(int i=0;i<2;i++){d.levels[i].d=d;d.levels[i].id=i;}var first=make(CustomItem.class);first.d=d;first.id=0;var second=make(CustomItem.class);second.d=d;second.id=1;d.items=new ItemStack[]{ctor.newInstance(Holder.direct(first),1,new PatchedDataComponentMap(DataComponentMap.EMPTY)),ctor.newInstance(Holder.direct(d.f.get("shared_type").getAsBoolean()?first:second),1,new PatchedDataComponentMap(DataComponentMap.EMPTY)),ItemStack.EMPTY};ItemStack.EMPTY.setCount(0);ItemStack.EMPTY.setPopTime(0);for(int i=0;i<2;i++)if(d.f.getAsJsonArray("vibrations").get(i).getAsBoolean())d.items[i].set(DataComponents.USE_EFFECTS,new net.minecraft.world.item.component.UseEffects(false,true,1));for(int i=0;i<2;i++)if(d.f.getAsJsonArray("kinetic_items").get(i).getAsBoolean())d.items[i].set(DataComponents.KINETIC_WEAPON,new net.minecraft.world.item.component.KineticWeapon(0,0,Optional.empty(),Optional.empty(),Optional.empty(),0,0,Optional.empty(),Optional.empty()));d.equipment=new PlayerEquipment(d.actor);d.inv=new Inventory(d.actor,d.equipment);invField.set(d.actor,d.inv);equipmentField.set(d.actor,d.equipment);var entries=new SynchedEntityData.DataItem<?>[9];for(int i=0;i<9;i++)entries[i]=new SynchedEntityData.DataItem<Byte>(new EntityDataAccessor<Byte>(i,EntityDataSerializers.BYTE),(byte)0);d.flags=new SynchedEntityData.DataItem<Byte>(flagKey,(byte)n(d.f,"flags"));entries[8]=d.flags;d.data=dataCtor.newInstance(d.actor,entries);dataField.set(d.actor,d.data);d.reset();d.all(); + try{switch(d.f.get("mode").getAsString()){case "start":d.actor.startUsingItem(net.minecraft.world.InteractionHand.values()[n(d.f,"start_hand")]);break;case "notify":d.actor.onSyncedDataUpdated(flagKey);break;case "flag":d.actor.flag(n(d.f,"mask"),d.f.get("value").getAsBoolean());break;case "assign":var values=new ArrayList<SynchedEntityData.DataValue<?>>();for(var value:d.f.getAsJsonArray("values"))values.add(new SynchedEntityData.DataValue<Byte>(8,EntityDataSerializers.BYTE,(byte)value.getAsInt()));d.data.assignValues(values);break;case "tick":try{tick.invoke(d.actor);}catch(InvocationTargetException e){if(e.getCause() instanceof Stop)throw new Stop();throw new AssertionError(e.getCause());}break;case "update":d.actor.update(d.items[n(d.f,"argument")]);break;case "complete":d.actor.complete();break;case "release":d.actor.releaseUsingItem();break;case "stop":d.actor.stopUsingItem();break;default:throw new AssertionError();}out.println("result ok");}catch(Stop e){out.println("result error");}d.all();var packed=d.data.packDirty();out.println("packed "+(packed==null?"none":packed.stream().map(v->v.id()+":"+Byte.toUnsignedInt((Byte)v.value())).collect(java.util.stream.Collectors.joining(","))));d.all(); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemAfterUseOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemAfterUseOracle.java new file mode 100644 index 000000000..a55f7172e --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemAfterUseOracle.java @@ -0,0 +1,29 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.resources.Identifier;import net.minecraft.world.item.*;import net.minecraft.world.item.component.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.Player;import net.minecraft.world.level.*; +/** Real ItemStack.finishUsingItem, UseRemainder/template and UseCooldown/ItemCooldowns composition. */ +public final class VanillaItemAfterUseOracle { + static Object unsafe;static Method allocate;static Field count,tick,map,start,end;static Constructor<ItemStack> stackCtor; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static int n(JsonObject v,String k){return v.get(k).getAsInt();} + static final class Stop extends RuntimeException{} + static UseCooldown cooldown(JsonObject v){return v.get("cooldown").isJsonNull()?null:new UseCooldown(Float.intBitsToFloat((int)v.get("cooldown").getAsLong()),n(v,"group")<0?Optional.empty():Optional.of(Identifier.parse("test:group"+n(v,"group"))));} + static ItemStackTemplate template(JsonObject v){if(v.get("remainder").isJsonNull())return null;var p=DataComponentPatch.builder();if(!v.get("maximum").isJsonNull())p.set(DataComponents.MAX_STACK_SIZE,n(v,"maximum"));if(v.get("damage").getAsBoolean())p.set(DataComponents.MAX_DAMAGE,0);return new ItemStackTemplate(Items.STICK.builtInRegistryHolder(),n(v,"remainder"),p.build());} + static void components(ItemStack s,JsonObject v){var t=template(v);s.set(DataComponents.USE_REMAINDER,t==null?null:new UseRemainder(t));s.set(DataComponents.USE_COOLDOWN,cooldown(v));} + static final class Custom extends Item{Data d;Custom(){super(null);}@Override public ItemStack finishUsingItem(ItemStack s,Level l,LivingEntity actor){d.event("finish");return d.refs[n(d.config(),"finish")];}} + static final class Actor extends Player{Data d;Actor(){super(null,null);}@Override public GameType gameMode(){return GameType.SURVIVAL;}@Override public boolean isSpectator(){return false;}@Override public boolean isCreative(){return false;}@Override public boolean hasInfiniteMaterials(){d.event("infinite");return d.config().get("infinite").getAsBoolean();}@Override public void handleExtraItemsCreatedOnUse(ItemStack stack){d.extra=stack;d.event("extra");}@Override public ItemCooldowns getCooldowns(){d.event("get-cooldowns");return d.book;}} + static final class Other extends net.minecraft.world.entity.decoration.ArmorStand{Data d;Other(){super(null,null);}@Override public boolean hasInfiniteMaterials(){d.event("infinite");return d.config().get("infinite").getAsBoolean();}@Override public void handleExtraItemsCreatedOnUse(ItemStack stack){d.extra=stack;d.event("extra");}} + static final class Book extends ItemCooldowns{Data d;@Override public void addCooldown(ItemStack stack,int ticks){d.original=stack;d.event("add-cooldown "+ticks);super.addCooldown(stack,ticks);}@Override protected void onCooldownStarted(Identifier group,int ticks){d.event("started "+group+" "+ticks);}} + static final class Data{ + JsonObject f;PrintWriter out;ItemStack[] refs;ItemStack extra,original,result;Book book;boolean changed;int calls; + JsonObject config(){return f.getAsJsonObject(changed?"after":"initial");} + String snapshot(ItemStack s){if(s==null)return "none";try{var remainder=s.get(DataComponents.USE_REMAINDER);var c=s.get(DataComponents.USE_COOLDOWN);return (s==ItemStack.EMPTY)+" "+(s.getItem()==Items.AIR?0:s.getItem()==Items.STICK?2:1)+" "+count.getInt(s)+" "+s.getCount()+" "+s.getPopTime()+" "+(remainder==null?"none":remainder.convertInto().count()+":"+remainder.convertInto().getMaxStackSize())+" "+(c==null?"none":Integer.toUnsignedString(Float.floatToIntBits(c.seconds()))+":"+c.cooldownGroup().map(Object::toString).orElse("none"));}catch(Exception e){throw new AssertionError(e);}} + void all(){try{out.println("state "+calls+" "+changed+" "+tick.getInt(book));var slots=new ItemStack[]{refs[0],refs[1],refs[2],extra,original,result};for(int i=0;i<slots.length;i++)out.println("ref "+i+" "+snapshot(slots[i]));var same=new StringJoiner(",");for(int a=0;a<slots.length;a++)for(int b=a+1;b<slots.length;b++)same.add(Boolean.toString(slots[a]==slots[b]));out.println("same "+same);var entries=new StringJoiner(",");for(var e:((Map<Identifier,?>)map.get(book)).entrySet())entries.add(e.getKey()+"="+start.getInt(e.getValue())+":"+end.getInt(e.getValue()));out.println("cooldowns "+entries);}catch(Exception e){throw new AssertionError(e);}} + void reset(){try{var c=config();Items.STICK.builtInRegistryHolder().bindComponents(DataComponentMap.builder().set(DataComponents.MAX_STACK_SIZE,n(c,"prototype_max")).build());for(int i=0;i<2;i++){var v=c.getAsJsonArray("items").get(i).getAsJsonObject();refs[i].setCount(n(v,"count"));components(refs[i],v);}tick.setInt(book,n(c,"clock"));if(extra!=null)extra.setCount(n(c,"extra_count"));if(original!=null){original.setCount(n(c,"original_count"));components(original,c.getAsJsonArray("items").get(1).getAsJsonObject());}}catch(Exception e){throw new AssertionError(e);}} + void event(String name){out.println("event "+name);int index=calls++;all();if(index==n(f,"fail"))throw new Stop();if(index==n(f,"mutate")){changed=true;reset();}} + } + public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Items.AIR.builtInRegistryHolder().bindComponents(DataComponentMap.EMPTY);var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);count=field(ItemStack.class,"count");tick=field(ItemCooldowns.class,"tickCount");map=field(ItemCooldowns.class,"cooldowns");var ci=Class.forName("net.minecraft.world.item.ItemCooldowns$CooldownInstance");start=field(ci,"startTime");end=field(ci,"endTime");stackCtor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);stackCtor.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;var custom=make(Custom.class);custom.d=d;ItemStack.EMPTY.setCount(0);ItemStack.EMPTY.setPopTime(0);var initial=d.config();Items.STICK.builtInRegistryHolder().bindComponents(DataComponentMap.builder().set(DataComponents.MAX_STACK_SIZE,n(initial,"prototype_max")).build());d.refs=new ItemStack[]{stackCtor.newInstance(Holder.direct(custom),1,new PatchedDataComponentMap(DataComponentMap.EMPTY)),new ItemStack(Items.STICK),ItemStack.EMPTY};d.refs[0].setPopTime(5);d.refs[1].setPopTime(7);d.book=new Book();d.book.d=d;d.reset();var actor=make(Actor.class);actor.d=d;var other=make(Other.class);other.d=d;d.all();try{d.result=d.refs[n(d.f,"source")].finishUsingItem(null,d.f.get("player").getAsBoolean()?actor:other);out.println("result ok");}catch(Stop e){out.println("result callback");}d.all();} + }} +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemBlockingOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemBlockingOracle.java new file mode 100644 index 000000000..1dede3a19 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemBlockingOracle.java @@ -0,0 +1,48 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.core.registries.*;import net.minecraft.tags.*;import net.minecraft.world.InteractionHand;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.*;import net.minecraft.world.damagesource.*;import net.minecraft.world.item.*;import net.minecraft.world.item.component.BlocksAttacks;import net.minecraft.server.level.*;import net.minecraft.stats.*;import net.minecraft.world.phys.Vec3; +/** Actual living item-blocking dispatch with native components and undamageable stacks. */ +public final class VanillaItemBlockingOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static Vec3 vec(JsonElement v){if(v.isJsonNull())return null;var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static final class Data {JsonObject f;PrintWriter out;int calls;boolean changed;ItemStack[] items;Server[] levels;Entity[] entities;List<Holder<DamageType>> types; + JsonObject state(){return f.getAsJsonObject(changed?"after":"initial");}void event(String s){out.println(s);int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt())changed=true;}} + static final class Source extends DamageSource {Data d;Source(){super(null);} + @Override public Holder<DamageType> typeHolder(){d.event("type-holder");return d.types.get(d.state().get("type").getAsInt());} + @Override public Entity getDirectEntity(){d.event("direct");return d.entities[d.state().get("direct").getAsInt()];} + @Override public Vec3 getSourcePosition(){d.event("source-position");return vec(d.state().get("source"));} + @Override public boolean is(TagKey<DamageType> tag){if(tag!=DamageTypeTags.IS_PROJECTILE)throw new AssertionError();d.event("projectile");return d.state().get("projectile").getAsBoolean();}} + static final class Arrow extends net.minecraft.world.entity.projectile.arrow.Arrow {Data d;Arrow(){super(null,null);}@Override public byte getPierceLevel(){d.event("pierce");return d.state().get("pierce").getAsByte();}} + static final class Server extends ServerLevel {Data d;int id;Server(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public boolean isClientSide(){d.event("client "+id);return d.state().get("client").getAsBoolean();}} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Actor(){super(null,null);} +Data d; + @Override public ItemStack getItemBlockingWith(){d.event("blocking-item");int id=d.state().get("item").getAsInt();return id<0?null:d.items[id];} + @Override public float getYHeadRot(){d.event("yaw");return single(d.state().get("yaw"));} + @Override public Vec3 position(){d.event("position");return vec(d.state().get("position"));} + @Override public ServerLevel level(){d.event("level");return d.levels[d.state().get("level").getAsInt()];} + @Override public InteractionHand getUsedItemHand(){d.event("hand");return InteractionHand.values()[d.state().get("hand").getAsInt()];} + @Override protected void blockUsingItem(ServerLevel l,LivingEntity attacker,DamageSource source,float damage,boolean full){d.event("block-using "+(l==d.levels[0]?0:1)+" "+bits(damage)+" "+full);} + } + static final class Human extends ServerPlayer {Human(){super(null,null,null,null);} +Data d; + @Override public ItemStack getItemBlockingWith(){d.event("blocking-item");int id=d.state().get("item").getAsInt();return id<0?null:d.items[id];} + @Override public float getYHeadRot(){d.event("yaw");return single(d.state().get("yaw"));} + @Override public Vec3 position(){d.event("position");return vec(d.state().get("position"));} + @Override public ServerLevel level(){d.event("level");return d.levels[d.state().get("level").getAsInt()];} + @Override public InteractionHand getUsedItemHand(){d.event("hand");return InteractionHand.values()[d.state().get("hand").getAsInt()];} + @Override protected void blockUsingItem(ServerLevel l,LivingEntity attacker,DamageSource source,float damage,boolean full){d.event("block-using "+(l==d.levels[0]?0:1)+" "+bits(damage)+" "+full);} + @Override public void awardStat(Stat<?> s){if(s.getType()!=Stats.ITEM_USED)throw new AssertionError();d.event("stat "+(s.getValue()==Items.SHIELD?0:s.getValue()==Items.STICK?1:-1));} + } + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");var uf=u.getDeclaredField("theUnsafe");uf.setAccessible(true);unsafe=uf.get(null);allocate=u.getMethod("allocateInstance",Class.class);var ctor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);ctor.setAccessible(true);var a=Holder.direct(new DamageType("a",0));var b=Holder.direct(new DamageType("b",0));List<Holder<DamageType>> types=List.of(a,b);List<HolderSet<DamageType>> sets=List.of(HolderSet.direct(List.of(a)),HolderSet.direct(List.of(b)),HolderSet.direct(List.of(a,b)),HolderSet.direct(List.of())); + Path dir=Path.of(args[1]);try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;d.types=types;d.items=new ItemStack[2];for(int i=0;i<2;i++){var c=f.getAsJsonArray("components").get(i).getAsJsonObject();d.items[i]=(ItemStack)ctor.newInstance(BuiltInRegistries.ITEM.wrapAsHolder(i==0?Items.SHIELD:Items.STICK),1,new PatchedDataComponentMap(DataComponentMap.EMPTY));if(!c.get("present").getAsBoolean())continue;var reductions=new ArrayList<BlocksAttacks.DamageReduction>();for(var rv:c.getAsJsonArray("reductions")){var r=rv.getAsJsonObject();int set=r.get("set").getAsInt();reductions.add(new BlocksAttacks.DamageReduction(single(r.get("angle")),set==0?Optional.empty():Optional.of(sets.get(set-1)),single(r.get("base")),single(r.get("factor"))));}var item=c.getAsJsonObject("item_damage");int bypass=c.get("bypass").getAsInt();d.items[i].set(DataComponents.BLOCKS_ATTACKS,new BlocksAttacks(0,1,reductions,new BlocksAttacks.ItemDamageFunction(single(item.get("threshold")),single(item.get("base")),single(item.get("factor"))),bypass==0?Optional.empty():Optional.of(sets.get(bypass-1)),Optional.empty(),Optional.empty()));} + d.levels=new Server[]{make(Server.class),make(Server.class)};for(int i=0;i<2;i++){d.levels[i].d=d;d.levels[i].id=i;}var arrow=make(Arrow.class);arrow.d=d;d.entities=new Entity[]{null,make(Actor.class),arrow,make(Marker.class)};var source=new Source();source.d=d;LivingEntity actor;if(f.get("player").getAsBoolean()){var p=make(Human.class);p.d=d;actor=p;}else{var p=make(Actor.class);p.d=d;actor=p;} + try{out.println("blocked "+bits(actor.applyItemBlocking(d.levels[0],source,single(f.get("damage")))));out.println("result ok");}catch(Stop e){out.println("result error");}out.println("queries "+d.calls+" "+d.changed);out.println("items "+d.items[0].getCount()+" "+d.items[0].getDamageValue()+" "+d.items[1].getCount()+" "+d.items[1].getDamageValue()); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemCooldownsOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemCooldownsOracle.java new file mode 100644 index 000000000..68600af2f --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemCooldownsOracle.java @@ -0,0 +1,37 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.component.*;import net.minecraft.resources.Identifier;import net.minecraft.world.item.*;import net.minecraft.world.item.component.UseCooldown; +/** Actual cooldown storage, expiry iteration, stack grouping and use-cooldown application. */ +public final class VanillaItemCooldownsOracle { + static Field tick,map,start,end;static Item[] items;static Object unsafe;static Method allocate; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static int n(JsonObject o,String k){return o.get(k).getAsInt();} + static float fl(JsonObject o,String k){return Float.intBitsToFloat((int)o.get(k).getAsLong());} + static long bits(float f){return Integer.toUnsignedLong(Float.floatToIntBits(f));} + static final class Stop extends RuntimeException{} + static final class Book extends ItemCooldowns{Data d;@Override protected void onCooldownStarted(Identifier id,int ticks){if(d!=null)d.event("started "+id+" "+ticks);}@Override protected void onCooldownEnded(Identifier id){if(d!=null)d.event("ended "+id);}} + static final class Actor extends net.minecraft.world.entity.player.Player{Data d;Actor(){super(null,null);}@Override public net.minecraft.world.level.GameType gameMode(){return net.minecraft.world.level.GameType.SURVIVAL;}@Override public boolean isSpectator(){return false;}@Override public boolean isCreative(){return false;}@Override public ItemCooldowns getCooldowns(){d.event("get-cooldowns");return d.book;}} + static final class Data{Book book;PrintWriter out;Identifier[] groups;ItemStack stack;JsonObject op;int calls; + void snapshot(){try{var entries=new StringJoiner(",");for(var e:((Map<Identifier,?>)map.get(book)).entrySet())entries.add(e.getKey()+"="+start.getInt(e.getValue())+":"+end.getInt(e.getValue()));out.println("state "+tick.getInt(book)+" "+calls+" | "+entries);out.println("stack "+stack.getCount()+" "+book.getCooldownGroup(stack));}catch(Exception e){throw new AssertionError(e);}} + void event(String name){out.println("event "+name);int index=calls++;snapshot();if(index==n(op,"fail"))throw new Stop();if(index==n(op,"mutate")){try{switch(op.get("action").getAsString()){ + case "add":book.addCooldown(groups[n(op,"other")],n(op,"after"));break; + case "remove":book.removeCooldown(groups[n(op,"other")]);break; + case "clock":tick.setInt(book,n(op,"after"));break; + case "tick":book.tick();break; + case "stack":stack.setCount(n(op,"after"));stack.set(DataComponents.USE_COOLDOWN,new UseCooldown(1,Optional.of(groups[n(op,"other")])));break; + case "none":break;default:throw new AssertionError();}}catch(ReflectiveOperationException e){throw new AssertionError(e);}}} + } + public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();items=new Item[]{Items.AIR,Items.STICK,Items.SHIELD};for(var item:items)item.builtInRegistryHolder().bindComponents(DataComponentMap.EMPTY);tick=field(ItemCooldowns.class,"tickCount");map=field(ItemCooldowns.class,"cooldowns");var ci=Class.forName("net.minecraft.world.item.ItemCooldowns$CooldownInstance");start=field(ci,"startTime");end=field(ci,"endTime");var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class); + Path dir=Path.of(args[1]);try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.out=out;d.groups=new Identifier[f.getAsJsonArray("groups").size()];for(int i=0;i<d.groups.length;i++)d.groups[i]=Identifier.parse(f.getAsJsonArray("groups").get(i).getAsString());d.book=new Book();tick.setInt(d.book,n(f,"clock"));for(var iv:f.getAsJsonArray("initial")){var a=iv.getAsJsonArray();d.book.addCooldown(d.groups[a.get(0).getAsInt()],a.get(1).getAsInt());}d.book.d=d;d.stack=new ItemStack(items[n(f,"item")],n(f,"count"));if(f.get("component").getAsBoolean())d.stack.set(DataComponents.USE_COOLDOWN,new UseCooldown(fl(f,"seconds"),n(f,"group")<0?Optional.empty():Optional.of(d.groups[n(f,"group")])));var actor=(Actor)allocate.invoke(unsafe,Actor.class);actor.d=d;d.snapshot(); + for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonObject();d.op=op;d.calls=0;try{switch(op.get("kind").getAsString()){ + case "add":d.book.addCooldown(d.groups[n(op,"group")],n(op,"duration"));break; + case "add-stack":d.book.addCooldown(d.stack,n(op,"duration"));break; + case "remove":d.book.removeCooldown(d.groups[n(op,"group")]);break; + case "tick":d.book.tick();break; + case "clock":tick.setInt(d.book,n(op,"duration"));break; + case "percent":out.println("percent "+bits(d.book.getCooldownPercent(d.stack,fl(op,"partial")))+" "+d.book.isOnCooldown(d.stack));break; + case "duration":out.println("duration "+new UseCooldown(fl(op,"seconds")).ticks());break; + case "apply":new UseCooldown(fl(op,"seconds"),Optional.of(d.groups[n(op,"group")])).apply(d.stack,op.get("player").getAsBoolean()?actor:null);break; + default:throw new AssertionError();}out.println("result ok");}catch(Stop e){out.println("result callback");}catch(ConcurrentModificationException e){out.println("result modified");}d.snapshot();} + }}} +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemDurabilityOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemDurabilityOracle.java new file mode 100644 index 000000000..0c2a98eaa --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemDurabilityOracle.java @@ -0,0 +1,23 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.core.registries.*;import net.minecraft.world.item.*;import net.minecraft.server.level.*;import net.minecraft.server.PlayerAdvancements; +/** Real ItemStack durability mutations, with unenchanted component maps. */ +public final class VanillaItemDurabilityOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate;static Field components,count; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static String optional(Object v){return v==null?"none":v.toString();} + static String snapshot(ItemStack s){try{var c=(PatchedDataComponentMap)components.get(s);return count.getInt(s)+" "+s.getCount()+" "+optional(c.get(DataComponents.MAX_DAMAGE))+" "+optional(c.get(DataComponents.DAMAGE))+" "+c.has(DataComponents.UNBREAKABLE)+" "+s.getMaxDamage()+" "+s.getDamageValue()+" "+s.isEmpty()+" "+s.isDamageableItem()+" "+s.isDamaged()+" "+s.isBroken()+" "+s.nextDamageWillBreak();}catch(Exception e){throw new AssertionError(e);}} + static void reset(ItemStack s,JsonObject f){s.setCount(f.get("count").getAsInt());if(f.get("max").isJsonNull())s.remove(DataComponents.MAX_DAMAGE);else s.set(DataComponents.MAX_DAMAGE,f.get("max").getAsInt());if(f.get("damage").isJsonNull())s.remove(DataComponents.DAMAGE);else s.set(DataComponents.DAMAGE,f.get("damage").getAsInt());if(f.get("unbreakable").getAsBoolean())s.set(DataComponents.UNBREAKABLE,net.minecraft.util.Unit.INSTANCE);else s.remove(DataComponents.UNBREAKABLE);} + static final class Data {JsonObject f;PrintWriter out;int calls;boolean changed;ItemStack stack;PlayerAdvancements advancements; + void event(String s){out.println(s+" | "+snapshot(stack));int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt()){changed=true;reset(stack,f.getAsJsonObject("after"));}} + boolean infinite(){return f.get(changed?"after_infinite":"infinite").getAsBoolean();}} + static final class Human extends ServerPlayer {Data d;Human(){super(null,null,null,null);}@Override public boolean hasInfiniteMaterials(){d.event("infinite");return d.infinite();}@Override public PlayerAdvancements getAdvancements(){d.event("criterion");return d.advancements;}@Override public ServerLevel level(){d.event("level");return null;}} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);components=field(ItemStack.class,"components");count=field(ItemStack.class,"count");var ctor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);ctor.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.advancements=make(PlayerAdvancements.class);field(PlayerAdvancements.class,"activeTriggers").set(d.advancements,new HashMap<>());var actor=make(Human.class);actor.d=d;d.stack=(ItemStack)ctor.newInstance(BuiltInRegistries.ITEM.wrapAsHolder(d.f.get("air").getAsBoolean()?Items.AIR:Items.SHIELD),1,new PatchedDataComponentMap(DataComponentMap.EMPTY));reset(d.stack,d.f.getAsJsonObject("initial"));int amount=d.f.get("amount").getAsInt(); + try{switch(d.f.get("mode").getAsString()){case "hurt":d.stack.hurtAndBreak(amount,(ServerLevel)null,d.f.get("player").getAsBoolean()?actor:null,copy->{out.println("copy "+snapshot(copy));d.event("break");});break;case "without":d.stack.hurtWithoutBreaking(amount,actor);break;case "set":d.stack.setDamageValue(amount);break;case "grow":d.stack.grow(amount);break;case "shrink":d.stack.shrink(amount);break;case "query":break;default:throw new AssertionError();}out.println("result ok");}catch(Stop e){out.println("result error");}out.println("state "+snapshot(d.stack)+" "+d.calls+" "+d.changed); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemParticlesOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemParticlesOracle.java new file mode 100644 index 000000000..a6551eb56 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemParticlesOracle.java @@ -0,0 +1,34 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.world.entity.*;import net.minecraft.world.level.Level;import net.minecraft.server.level.ServerLevel;import net.minecraft.world.item.*;import net.minecraft.util.RandomSource;import net.minecraft.world.level.levelgen.XoroshiroRandomSource;import net.minecraft.world.phys.Vec3;import net.minecraft.core.particles.*;import net.minecraft.core.component.DataComponents; +/** Inherited LivingEntity particle emission with native templates and RNGs. */ +public final class VanillaItemParticlesOracle { + static Object unsafe;static Method allocate;static Field position,randomField; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static int n(JsonObject v,String k){return v.get(k).getAsInt();} + static float fl(JsonObject v,String k){return Float.intBitsToFloat((int)v.get(k).getAsLong());} + static String bits(double v){return Long.toUnsignedString(Double.doubleToLongBits(v));} + static int kind(Item item){return item==Items.AIR?0:item==Items.STONE?1:2;} + static String opt(Integer value){return value==null?"none":value.toString();} + static final class Stop extends RuntimeException{} + static final class Data{JsonObject f;PrintWriter out;RandomSource[] random;Actor actor;ParticleLevel[] levels;ItemStack stack;ItemParticleOption first;boolean changed;int calls; + JsonObject config(){return f.getAsJsonObject(changed?"after":"initial");} + void reset(){try{var c=config();var p=c.getAsJsonArray("position");position.set(actor,new Vec3(p.get(0).getAsDouble(),p.get(1).getAsDouble(),p.get(2).getAsDouble()));randomField.set(actor,random[n(c,"random")]);stack.setCount(n(c,"count"));if(c.get("damage").isJsonNull())stack.remove(DataComponents.DAMAGE);else stack.set(DataComponents.DAMAGE,n(c,"damage"));if(c.get("reseed").getAsBoolean())for(int i=0;i<2;i++)random[i].setSeed(c.getAsJsonArray("seeds").get(i).getAsLong());}catch(Exception e){throw new AssertionError(e);}} + void all(){out.println("state "+calls+" "+changed+" "+n(config(),"random")+" "+n(config(),"level")+" "+kind(stack.getItem())+" "+stack.getCount()+" "+opt(stack.get(DataComponents.DAMAGE)));} + void event(String name){out.println("event "+name);int index=calls++;all();if(index==n(f,"fail"))throw new Stop();if(index==n(f,"mutate")){changed=true;reset();}} + } + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand{Data d;Actor(){super(null,null);} + @Override public RandomSource getRandom(){throw new AssertionError("virtual random getter must not be used");} + @Override public float getXRot(){d.event("pitch");return fl(d.config(),"pitch");} + @Override public float getYRot(){d.event("yaw");return fl(d.config(),"yaw");} + @Override public double getEyeY(){d.event("eye");return getY()+(double)fl(d.config(),"eye");} + @Override public Level level(){d.event("level");return d.levels[n(d.config(),"level")];} + } + static final class ParticleLevel extends ServerLevel{Data d;int id;ParticleLevel(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public void addParticle(ParticleOptions options,double x,double y,double z,double vx,double vy,double vz){var p=(ItemParticleOption)options;if(p.getType()!=ParticleTypes.ITEM)throw new AssertionError();boolean same=d.first==null||d.first==p;if(d.first==null)d.first=p;var t=p.getItem();d.event("particle "+id+" "+kind(t.item().value())+" "+t.count()+" "+opt(t.get(DataComponents.DAMAGE))+" "+same+" "+bits(x)+" "+bits(y)+" "+bits(z)+" "+bits(vx)+" "+bits(vy)+" "+bits(vz));} + } + public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();for(var item:new Item[]{Items.AIR,Items.STONE,Items.BREAD})item.builtInRegistryHolder().bindComponents(net.minecraft.core.component.DataComponentMap.EMPTY);var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);position=field(Entity.class,"position");randomField=field(Entity.class,"random");Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.random=new RandomSource[2];for(int i=0;i<2;i++){long seed=d.f.getAsJsonArray("seeds").get(i).getAsLong();d.random[i]=d.f.get("xor").getAsBoolean()?new XoroshiroRandomSource(seed):RandomSource.create(seed);}d.actor=make(Actor.class);d.actor.d=d;d.levels=new ParticleLevel[2];for(int i=0;i<2;i++){d.levels[i]=make(ParticleLevel.class);d.levels[i].d=d;d.levels[i].id=i;}d.stack=new ItemStack(new Item[]{Items.AIR,Items.STONE,Items.BREAD}[n(d.f,"item")]);d.reset();d.all();try{d.actor.spawnItemParticles(d.stack,n(d.f,"particles"));out.println("result ok");}catch(Stop e){out.println("result callback");}d.all();for(int i=0;i<2;i++)out.println("random "+i+" "+d.random[i].nextLong()+" "+d.random[i].nextLong());} + }} +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemStackStorageOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemStackStorageOracle.java new file mode 100644 index 000000000..34c5bfa86 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemStackStorageOracle.java @@ -0,0 +1,28 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import com.mojang.serialization.Codec;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.world.item.*; +/** Native item-stack copy/count/component kernels, retaining canonical EMPTY identity. */ +public final class VanillaItemStackStorageOracle { + static final class Stop extends RuntimeException {} + static DataComponentType<Integer>[] keys;static Item[] items;static Field components,count,item,patchMap;static Object removed,unsafe;static Method allocate; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static String optional(Object v){return v==null||v==removed?"none":v.toString();} + static int kind(Item i){for(int k=0;k<items.length;k++)if(items[k]==i)return k;throw new AssertionError();} + static int key(Object k){for(int i=0;i<keys.length;i++)if(keys[i]==k)return i;throw new AssertionError();} + static DataComponentMap prototype(JsonArray a){var b=DataComponentMap.builder();for(var e:a){var p=e.getAsJsonArray();b.set(keys[p.get(0).getAsInt()],p.get(1).getAsInt());}return b.build();} + static DataComponentPatch patch(JsonArray a){var b=DataComponentPatch.builder();for(var e:a){var p=e.getAsJsonArray();int k=p.get(0).getAsInt();if(p.get(1).isJsonNull())b.remove(keys[k]);else b.set(keys[k],p.get(1).getAsInt());}return b.build();} + static String patchText(DataComponentPatch p)throws Exception{var join=new StringJoiner(",");for(var e:((Map<?,?>)patchMap.get(p)).entrySet())join.add(key(e.getKey())+"="+optional(e.getValue()));return join.toString();} + static String snapshot(ItemStack s){try{var raw=(PatchedDataComponentMap)components.get(s);var h=(Holder<?>)item.get(s);var visible=new StringJoiner(",");for(var k:keys)visible.add(optional(s.get(k)));var entries=new StringJoiner(",");for(var e:raw)entries.add(key(e.type())+"="+e.value());return (s==ItemStack.EMPTY)+" "+(h==null?-1:kind((Item)h.value()))+" "+kind(s.getItem())+" "+count.getInt(s)+" "+s.getCount()+" "+s.getPopTime()+" "+s.isEmpty()+" | "+visible+" | "+entries+" | "+patchText(raw.asPatch())+" | "+patchText(s.getComponentsPatch());}catch(Exception e){throw new AssertionError(e);}} + static void all(PrintWriter out,ItemStack[] slots){for(int i=0;i<slots.length;i++)out.println("slot "+i+" "+snapshot(slots[i]));for(int a=0;a<3;a++)for(int b=a+1;b<3;b++)out.println("equal "+a+" "+b+" "+(slots[a]==slots[b])+" "+ItemStack.isSameItem(slots[a],slots[b])+" "+ItemStack.isSameItemSameComponents(slots[a],slots[b])+" "+ItemStack.matches(slots[a],slots[b]));} + static final class Data{PrintWriter out;JsonObject op;ItemStack target;int calls;void event(){out.println("infinite | "+snapshot(target));calls++;if(op.get("fail").getAsBoolean())throw new Stop();if(op.get("mutate").getAsBoolean()){target.setCount(op.get("after_count").getAsInt());target.setPopTime(op.get("after_pop").getAsInt());for(var e:op.getAsJsonArray("after_components")){var pair=e.getAsJsonArray();target.set(keys[pair.get(0).getAsInt()],pair.get(1).isJsonNull()?null:pair.get(1).getAsInt());}}}} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand{Data d;Actor(){super(null,null);}@Override public boolean hasInfiniteMaterials(){d.event();return d.op.get("infinite").getAsBoolean();}} + @SuppressWarnings("unchecked")public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();keys=new DataComponentType[4];for(int i=0;i<keys.length;i++)keys[i]=DataComponentType.<Integer>builder().persistent(Codec.INT).build();items=new Item[]{Items.AIR,Items.STICK,Items.SHIELD};components=field(ItemStack.class,"components");count=field(ItemStack.class,"count");item=field(ItemStack.class,"item");patchMap=field(DataComponentPatch.class,"map");removed=field(Class.forName("net.minecraft.core.component.Removed"),"INSTANCE").get(null);var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);Path dir=Path.of(args[1]);try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();for(int i=0;i<3;i++)items[i].builtInRegistryHolder().bindComponents(prototype(f.getAsJsonArray("prototypes").get(i).getAsJsonArray()));ItemStack.EMPTY.setCount(0);ItemStack.EMPTY.setPopTime(0);((PatchedDataComponentMap)components.get(ItemStack.EMPTY)).clearPatch();var slots=new ItemStack[3];for(int i=0;i<3;i++){var v=f.getAsJsonArray("stacks").get(i).getAsJsonObject();int type=v.get("item").getAsInt();slots[i]=type<0?ItemStack.EMPTY:new ItemStack(items[type],v.get("count").getAsInt());if(type>=0){slots[i].setPopTime(v.get("pop").getAsInt());((PatchedDataComponentMap)components.get(slots[i])).restorePatch(patch(v.getAsJsonArray("patch")));}}var d=new Data();d.out=out;var actor=make(Actor.class);actor.d=d;all(out,slots);for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonObject();d.op=op;d.calls=0;int a=op.get("a").getAsInt(),b=op.get("b").getAsInt(),amount=op.get("amount").getAsInt();d.target=slots[a];try{switch(op.get("kind").getAsString()){ + case "count":slots[a].setCount(amount);break;case "pop":slots[a].setPopTime(amount);break;case "grow":slots[a].grow(amount);break;case "shrink":slots[a].shrink(amount);break;case "limit":slots[a].limitSize(amount);break; + case "set":out.println("old "+optional(slots[a].set(keys[op.get("key").getAsInt()],op.get("value").isJsonNull()?null:op.get("value").getAsInt())));break; + case "copy":slots[b]=slots[a].copy();break;case "copy-count":slots[b]=slots[a].copyWithCount(amount);break;case "copy-clear":slots[b]=slots[a].copyAndClear();break;case "split":slots[b]=slots[a].split(amount);break; + case "transmute":slots[b]=slots[a].transmuteCopy(items[op.get("item").getAsInt()],amount);break; + case "consume":slots[a].consume(amount,op.get("actor").getAsBoolean()?actor:null);break; + case "consume-return":slots[b]=slots[a].consumeAndReturn(amount,op.get("actor").getAsBoolean()?actor:null);break; + default:throw new AssertionError();}out.println("result ok "+d.calls);}catch(Stop|NullPointerException e){out.println("result error "+d.calls);}all(out,slots);}}}} +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemTemplateOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemTemplateOracle.java new file mode 100644 index 000000000..fa3ad6a9a --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemTemplateOracle.java @@ -0,0 +1,39 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.component.*;import net.minecraft.world.item.*; +/** Native template construction, patch precedence, validation and rollback. */ +public final class VanillaItemTemplateOracle { + static DataComponentType<Integer>[] keys; + static Item[] items;static Field components,count,patchMap;static Object removed; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static String opt(Object o){return o==null||o==removed?"none":o.toString();} + static int kind(Item i){for(int k=0;k<items.length;k++)if(items[k]==i)return k;throw new AssertionError();} + static int key(Object k){for(int i=0;i<keys.length;i++)if(keys[i]==k)return i;throw new AssertionError();} + static DataComponentMap prototype(JsonArray a){var b=DataComponentMap.builder();for(var e:a){var p=e.getAsJsonArray();b.set(keys[p.get(0).getAsInt()],p.get(1).getAsInt());}return b.build();} + static DataComponentPatch patch(JsonArray a){var b=DataComponentPatch.builder();for(var e:a){var p=e.getAsJsonArray();if(p.get(1).isJsonNull())b.remove(keys[p.get(0).getAsInt()]);else b.set(keys[p.get(0).getAsInt()],p.get(1).getAsInt());}return b.build();} + static String patchText(DataComponentPatch p)throws Exception{var j=new StringJoiner(",");for(var e:((Map<?,?>)patchMap.get(p)).entrySet())j.add(key(e.getKey())+"="+opt(e.getValue()));return j.toString();} + static void all(PrintWriter out,ItemStack[] stacks,ItemStackTemplate[] templates)throws Exception{ + for(int i=0;i<3;i++){var s=stacks[i];var v=new StringJoiner(",");for(var k:keys)v.add(opt(s.get(k)));out.println("stack "+i+" "+(s==ItemStack.EMPTY)+" "+kind(s.getItem())+" "+count.getInt(s)+" "+s.getCount()+" "+s.getPopTime()+" "+s.isEmpty()+" "+ItemStack.validateStrict(s).isSuccess()+" | "+v+" | "+patchText(((PatchedDataComponentMap)components.get(s)).asPatch()));} + for(int i=0;i<3;i++){var t=templates[i];if(t==null){out.println("template "+i+" none");continue;}var v=new StringJoiner(",");for(var k:keys)v.add(opt(t.get(k)));out.println("template "+i+" "+kind(t.item().value())+" "+t.count()+" | "+v+" | "+patchText(t.components()));} + for(int a=0;a<3;a++)for(int b=a+1;b<3;b++)out.println("same "+a+" "+b+" "+(stacks[a]==stacks[b])+" "+(templates[a]==templates[b])); + } + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();keys=new DataComponentType[]{DataComponents.MAX_STACK_SIZE,DataComponents.MAX_DAMAGE,DataComponents.DAMAGE};items=new Item[]{Items.AIR,Items.STICK,Items.SHIELD};components=field(ItemStack.class,"components");count=field(ItemStack.class,"count");patchMap=field(DataComponentPatch.class,"map");removed=field(Class.forName("net.minecraft.core.component.Removed"),"INSTANCE").get(null); + Path dir=Path.of(args[1]);try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();for(int i=0;i<3;i++)items[i].builtInRegistryHolder().bindComponents(prototype(f.getAsJsonArray("prototypes").get(i).getAsJsonArray()));ItemStack.EMPTY.setCount(0);ItemStack.EMPTY.setPopTime(0);((PatchedDataComponentMap)components.get(ItemStack.EMPTY)).clearPatch();var stacks=new ItemStack[3];var templates=new ItemStackTemplate[3];for(int i=0;i<3;i++){var v=f.getAsJsonArray("stacks").get(i).getAsJsonObject();int id=v.get("item").getAsInt();stacks[i]=id<0?ItemStack.EMPTY:new ItemStack(items[id],v.get("count").getAsInt());if(id>=0){stacks[i].setPopTime(5);((PatchedDataComponentMap)components.get(stacks[i])).restorePatch(patch(v.getAsJsonArray("patch")));}}all(out,stacks,templates); + for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonObject();int a=op.get("a").getAsInt(),b=op.get("b").getAsInt(),n=op.get("count").getAsInt();try{switch(op.get("kind").getAsString()){ + case "new":templates[b]=new ItemStackTemplate(items[op.get("item").getAsInt()].builtInRegistryHolder(),n,patch(op.getAsJsonArray("patch")));break; + case "from":templates[b]=ItemStackTemplate.fromStack(stacks[a]);break; + case "from-nonempty":templates[b]=ItemStackTemplate.fromNonEmptyStack(stacks[a]);break; + case "from-count":templates[b]=ItemStackTemplate.fromNonEmptyStack(stacks[a],n);break; + case "with":templates[b]=templates[a].withCount(n);break; + case "create":stacks[b]=templates[a].create();break; + case "apply":stacks[b]=templates[a].apply(patch(op.getAsJsonArray("patch")));break; + case "apply-count":stacks[b]=templates[a].apply(n,patch(op.getAsJsonArray("patch")));break; + case "validate-patch":stacks[a].applyComponentsAndValidate(patch(op.getAsJsonArray("patch")));break; + case "count":stacks[a].setCount(n);break; + case "prototype":items[op.get("item").getAsInt()].builtInRegistryHolder().bindComponents(prototype(op.getAsJsonArray("prototype")));break; + default:throw new AssertionError();}out.println("result ok");}catch(IllegalStateException|NullPointerException e){out.println("result error");}all(out,stacks,templates); + } + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseCatalogOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseCatalogOracle.java new file mode 100644 index 000000000..0c69903d3 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseCatalogOracle.java @@ -0,0 +1,28 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.core.registries.*;import net.minecraft.world.item.*;import net.minecraft.world.item.component.*;import net.minecraft.resources.*;import com.mojang.serialization.JsonOps; +/** Bound built-in prototypes, queried through actual registered item methods. */ +public final class VanillaItemUseCatalogOracle { + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static KineticWeapon kinetic(){return new KineticWeapon(0,0,Optional.empty(),Optional.empty(),Optional.empty(),0,0,Optional.empty(),Optional.empty());} + static BlocksAttacks blocking(float delay){return new BlocksAttacks(delay,1,List.of(),new BlocksAttacks.ItemDamageFunction(0,0,0),Optional.empty(),Optional.empty(),Optional.empty());} + static void snapshot(PrintWriter out,ItemStack s){out.println("stack "+BuiltInRegistries.ITEM.getId(s.getItem())+" "+s.getCount()+" "+s.getMaxStackSize()+" "+s.getMaxDamage()+" "+s.getDamageValue()+" "+s.isEmpty()+" "+s.isDamageableItem()+" "+s.isDamaged()+" "+s.isBroken()+" "+s.nextDamageWillBreak()+" "+s.isStackable()+" "+s.getUseDuration(null)+" "+s.useOnRelease());} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var lookup=net.minecraft.data.registries.VanillaRegistries.createWorldLookup();for(var p:BuiltInRegistries.DATA_COMPONENT_INITIALIZERS.build(lookup))p.apply();Path dir=Path.of(args[1]); + if(args[0].equals("export")){var root=new JsonObject();root.addProperty("schema",1);root.addProperty("DataVersion",5023);var instruments=new JsonObject();lookup.lookupOrThrow(Registries.INSTRUMENT).listElements().forEach(h->instruments.addProperty(h.key().identifier().toString(),bits(h.value().useDuration())));root.add("instruments",instruments);var rows=new JsonArray();var ops=RegistryOps.create(JsonOps.INSTANCE,lookup);for(var item:BuiltInRegistries.ITEM){var row=new JsonObject();row.addProperty("name",BuiltInRegistries.ITEM.getKey(item).toString());row.addProperty("id",BuiltInRegistries.ITEM.getId(item));row.addProperty("duration_impl",item.getClass().getMethod("getUseDuration",ItemStack.class,net.minecraft.world.entity.LivingEntity.class).getDeclaringClass().getSimpleName());row.addProperty("release_impl",item.getClass().getMethod("useOnRelease",ItemStack.class).getDeclaringClass().getSimpleName());row.add("components",DataComponentMap.CODEC.encodeStart(ops,item.builtInRegistryHolder().components()).getOrThrow());rows.add(row);}root.add("items",rows);Files.writeString(dir.resolve("catalog.json"),root.toString());return;} + var sound=net.minecraft.sounds.SoundEvents.GENERIC_EAT; + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var item=BuiltInRegistries.ITEM.getValue(Identifier.parse(f.get("name").getAsString()));var stack=new ItemStack(item,f.get("count").getAsInt());snapshot(out,stack);for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonObject();var v=op.get("value");switch(op.get("kind").getAsString()){ + case "count":stack.setCount(v.getAsInt());break; + case "set-damage":stack.setDamageValue(v.getAsInt());break; + case "damage":stack.set(DataComponents.DAMAGE,v.isJsonNull()?null:v.getAsInt());break; + case "max-damage":stack.set(DataComponents.MAX_DAMAGE,v.isJsonNull()?null:v.getAsInt());break; + case "max-stack":stack.set(DataComponents.MAX_STACK_SIZE,v.isJsonNull()?null:v.getAsInt());break; + case "unbreakable":stack.set(DataComponents.UNBREAKABLE,v.getAsBoolean()?net.minecraft.util.Unit.INSTANCE:null);break; + case "consume":stack.set(DataComponents.CONSUMABLE,v.isJsonNull()?null:new Consumable(single(v),ItemUseAnimation.EAT,sound,false,List.of()));break; + case "blocking":stack.set(DataComponents.BLOCKS_ATTACKS,v.isJsonNull()?null:blocking(single(v)));break; + case "kinetic":stack.set(DataComponents.KINETIC_WEAPON,v.getAsBoolean()?kinetic():null);break; + case "instrument":stack.set(DataComponents.INSTRUMENT,v.isJsonNull()?null:new InstrumentComponent(Holder.direct(new Instrument(sound,single(v),1,0,net.minecraft.network.chat.Component.empty()))));break; + default:throw new AssertionError();}snapshot(out,stack);}}} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseLifecycleOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseLifecycleOracle.java new file mode 100644 index 000000000..db0180ef0 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseLifecycleOracle.java @@ -0,0 +1,38 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.world.entity.*;import net.minecraft.world.item.*;import net.minecraft.world.InteractionHand;import net.minecraft.world.level.*;import net.minecraft.world.level.gameevent.GameEvent;import net.minecraft.server.level.*; +/** Actual inherited living tick/release/complete/stop lifecycle with custom items. */ +public final class VanillaItemUseLifecycleOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate;static Field useItem,remaining,kinetic; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static final class Data {JsonObject f;PrintWriter out;int calls;boolean changed,using;Actor actor;ItemStack[] items,hands;Server[] levels; + JsonObject state(){return f.getAsJsonObject(changed?"after":"initial");} + void reset(){try{var s=state();useItem.set(actor,items[s.get("item").getAsInt()]);remaining.setInt(actor,s.get("remaining").getAsInt());kinetic.set(actor,s.get("kinetic").getAsBoolean()?new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>():null);using=s.get("using").getAsBoolean();hands=new ItemStack[]{items[s.getAsJsonArray("hands").get(0).getAsInt()],items[s.getAsJsonArray("hands").get(1).getAsInt()]};}catch(Exception e){throw new AssertionError(e);}} + void event(String name){out.println(name);int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt()){changed=true;reset();}} + int id(ItemStack s){for(int i=0;i<items.length;i++)if(items[i]==s)return i;throw new AssertionError();} + String snapshot(){try{return id((ItemStack)useItem.get(actor))+" "+remaining.getInt(actor)+" "+(kinetic.get(actor)!=null)+" "+using+" "+id(hands[0])+" "+id(hands[1])+" "+calls+" "+changed;}catch(Exception e){throw new AssertionError(e);}}} + static final class Server extends ServerLevel {Data d;int id;Server(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public boolean isClientSide(){d.event("client "+id);return d.state().getAsJsonArray("clients").get(id).getAsBoolean();}} + static final class CustomItem extends Item {Data d;int id;CustomItem(){super(null);} + @Override public void onUseTick(Level l,LivingEntity a,ItemStack s,int remaining){d.event("tick "+id+" "+d.id(s)+" "+((Server)l).id+" "+remaining);} + @Override public boolean useOnRelease(ItemStack s){d.event("release-query "+id+" "+d.id(s));return d.state().getAsJsonArray("releases").get(id).getAsBoolean();} + @Override public boolean releaseUsing(ItemStack s,Level l,LivingEntity a,int remaining){d.event("release "+id+" "+d.id(s)+" "+((Server)l).id+" "+remaining);return false;} + @Override public ItemStack finishUsingItem(ItemStack s,Level l,LivingEntity a){d.event("finish "+id+" "+d.id(s)+" "+((Server)l).id);return d.items[d.state().getAsJsonArray("finishes").get(id).getAsInt()];}} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Data d;Actor(){super(null,null);} + @Override public boolean isUsingItem(){d.event("using");return d.using;} + @Override public InteractionHand getUsedItemHand(){d.event("hand");return InteractionHand.values()[d.state().get("hand").getAsInt()];} + @Override public ItemStack getItemInHand(InteractionHand h){d.event("get-hand "+h.ordinal());return d.hands[h.ordinal()];} + @Override public void setItemInHand(InteractionHand h,ItemStack s){d.event("set-hand "+h.ordinal()+" "+d.id(s));d.hands[h.ordinal()]=s;} + @Override public ServerLevel level(){d.event("level");return d.levels[d.state().get("level").getAsInt()];} + @Override public int getUseItemRemainingTicks(){d.event("remaining");return d.state().get("virtual_remaining").getAsInt();} + @Override protected void setLivingEntityFlag(int flag,boolean value){if(flag!=1)throw new AssertionError();d.event("flag "+value);d.using=value;} + @Override public void gameEvent(Holder<GameEvent> event){if(event!=GameEvent.ITEM_INTERACT_FINISH)throw new AssertionError();d.event("vibration");} + void update(ItemStack s){super.updateUsingItem(s);}void complete(){super.completeUsingItem();}} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);useItem=field(LivingEntity.class,"useItem");remaining=field(LivingEntity.class,"useItemRemaining");kinetic=field(LivingEntity.class,"recentKineticEnemies");var tick=LivingEntity.class.getDeclaredMethod("updatingUsingItem");tick.setAccessible(true);var ctor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);ctor.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.actor=make(Actor.class);d.actor.d=d;d.levels=new Server[]{make(Server.class),make(Server.class)};for(int i=0;i<2;i++){d.levels[i].d=d;d.levels[i].id=i;}var a=make(CustomItem.class);a.d=d;a.id=0;var b=make(CustomItem.class);b.d=d;b.id=1;d.items=new ItemStack[]{(ItemStack)ctor.newInstance(Holder.direct(a),1,new PatchedDataComponentMap(DataComponentMap.EMPTY)),(ItemStack)ctor.newInstance(Holder.direct(d.f.get("shared_type").getAsBoolean()?a:b),1,new PatchedDataComponentMap(DataComponentMap.EMPTY)),ItemStack.EMPTY};for(int i=0;i<2;i++)if(d.f.getAsJsonArray("vibrations").get(i).getAsBoolean())d.items[i].set(DataComponents.USE_EFFECTS,new net.minecraft.world.item.component.UseEffects(false,true,1));d.reset(); + try{switch(d.f.get("mode").getAsString()){case "tick":try{tick.invoke(d.actor);}catch(InvocationTargetException e){if(e.getCause() instanceof Stop)throw new Stop();throw new AssertionError(e.getCause());}break;case "update":d.actor.update(d.items[d.f.get("argument").getAsInt()]);break;case "complete":d.actor.complete();break;case "release":d.actor.releaseUsingItem();break;case "stop":d.actor.stopUsingItem();break;default:throw new AssertionError();}out.println("result ok");}catch(Stop e){out.println("result error");}out.println("state "+d.snapshot()); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseOracle.java new file mode 100644 index 000000000..5421a1f61 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseOracle.java @@ -0,0 +1,24 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.world.entity.*;import net.minecraft.world.item.*;import net.minecraft.world.item.component.BlocksAttacks; +/** Native blocking eligibility and use timers, with controlled virtual item durations. */ +public final class VanillaItemUseOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate;static Field useItem,remaining; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static final class Data {JsonObject f;PrintWriter out;int calls;boolean changed;Actor actor;ItemStack[] items; + JsonObject state(){return f.getAsJsonObject(changed?"after":"initial");}void reset(){try{useItem.set(actor,items[state().get("item").getAsInt()]);remaining.setInt(actor,state().get("remaining").getAsInt());}catch(Exception e){throw new AssertionError(e);}} + void event(String s){out.println(s);int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt()){changed=true;reset();}} + int id(ItemStack item){for(int i=0;i<items.length;i++)if(items[i]==item)return i;throw new AssertionError();}} + static final class CustomItem extends Item {Data d;int id;CustomItem(){super(null);}@Override public int getUseDuration(ItemStack stack,LivingEntity e){d.event("duration "+id+" "+d.id(stack));return d.state().getAsJsonArray("durations").get(id).getAsInt();}} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Data d;Actor(){super(null,null);}@Override public boolean isUsingItem(){d.event("using");return d.state().get("using").getAsBoolean();}@Override public int getUseItemRemainingTicks(){d.event("remaining");return d.state().get("virtual_remaining").getAsInt();}@Override public ItemStack getUseItem(){throw new AssertionError("native paths use direct storage");}} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);useItem=field(LivingEntity.class,"useItem");remaining=field(LivingEntity.class,"useItemRemaining");var ctor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);ctor.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.actor=make(Actor.class);d.actor.d=d;var a=make(CustomItem.class);a.d=d;a.id=0;var b=make(CustomItem.class);b.d=d;b.id=1;d.items=new ItemStack[]{(ItemStack)ctor.newInstance(Holder.direct(a),1,new PatchedDataComponentMap(DataComponentMap.EMPTY)),(ItemStack)ctor.newInstance(Holder.direct(d.f.get("shared_type").getAsBoolean()?a:b),1,new PatchedDataComponentMap(DataComponentMap.EMPTY)),ItemStack.EMPTY};for(int i=0;i<2;i++){var c=d.f.getAsJsonArray("components").get(i).getAsJsonObject();if(c.get("present").getAsBoolean())d.items[i].set(DataComponents.BLOCKS_ATTACKS,new BlocksAttacks(single(c.get("delay")),1,List.of(),new BlocksAttacks.ItemDamageFunction(0,0,0),Optional.empty(),Optional.empty(),Optional.empty()));}d.reset(); + try{switch(d.f.get("mode").getAsString()){case "blocking":{var item=d.actor.getItemBlockingWith();out.println("item "+(item==null?-1:d.id(item)));break;}case "is-blocking":out.println("bool "+d.actor.isBlocking());break;case "ticks":out.println("ticks "+d.actor.getTicksUsingItem());break;case "partial":out.println("float "+bits(d.actor.getTicksUsingItem(single(d.f.get("partial")))));break;default:throw new AssertionError();}out.println("result ok");}catch(Stop e){out.println("result error");}out.println("state "+d.id((ItemStack)useItem.get(d.actor))+" "+remaining.getInt(d.actor)+" "+d.calls+" "+d.changed); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseStartOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseStartOracle.java new file mode 100644 index 000000000..24041611c --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseStartOracle.java @@ -0,0 +1,39 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.world.entity.*;import net.minecraft.world.item.*;import net.minecraft.world.InteractionHand;import net.minecraft.world.level.*;import net.minecraft.world.level.gameevent.GameEvent;import net.minecraft.server.level.*; +/** Actual inherited startUsingItem with native equipment packet construction. */ +public final class VanillaItemUseStartOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate;static Field useItem,remaining,kinetic; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static final class Data {JsonObject f;PrintWriter out;int calls;boolean changed,using,off;Entity enemy;Actor actor;ItemStack[] items,hands;Server[] levels;Chunks[] chunks; + JsonObject state(){return f.getAsJsonObject(changed?"after":"initial");} + void reset(){try{var s=state();useItem.set(actor,items[s.get("item").getAsInt()]);remaining.setInt(actor,s.get("remaining").getAsInt());kinetic.set(actor,s.get("kinetic").getAsBoolean()?new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>():null);using=s.get("using").getAsBoolean();off=s.get("off").getAsBoolean();if(kinetic.get(actor)!=null)((it.unimi.dsi.fastutil.objects.Object2LongMap<Object>)kinetic.get(actor)).put(enemy,99L);hands=new ItemStack[]{items[s.getAsJsonArray("hands").get(0).getAsInt()],items[s.getAsJsonArray("hands").get(1).getAsInt()]};}catch(Exception e){throw new AssertionError(e);}} + void event(String name){out.println(name);int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt()){changed=true;reset();}} + int id(ItemStack s){for(int i=0;i<items.length;i++)if(items[i]==s)return i;throw new AssertionError();} + String snapshot(){try{return id((ItemStack)useItem.get(actor))+" "+remaining.getInt(actor)+" "+(kinetic.get(actor)!=null)+" "+using+" "+id(hands[0])+" "+id(hands[1])+" "+calls+" "+changed+" "+off+" "+(kinetic.get(actor)==null?-1:((it.unimi.dsi.fastutil.objects.Object2LongMap<?>)kinetic.get(actor)).size());}catch(Exception e){throw new AssertionError(e);}}} + static final class Chunks extends ServerChunkCache {Data d;int id;Chunks(){super(null,null,null,null,null,null,0,0,false,null);}@Override public void sendToTrackingPlayers(Entity e,net.minecraft.network.protocol.Packet<? super net.minecraft.network.protocol.game.ClientGamePacketListener> packet){var p=(net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket)packet;var entry=p.getSlots().getFirst();d.event("equipment "+id+" "+(entry.getFirst()==EquipmentSlot.MAINHAND?0:1)+" "+d.id(entry.getSecond())+" "+p.getEntity());}} + static final class Server extends ServerLevel {Data d;int id;Server(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public ServerChunkCache getChunkSource(){d.event("chunks "+id);return d.chunks[id];}@Override public boolean isClientSide(){d.event("client "+id);return d.state().getAsJsonArray("clients").get(id).getAsBoolean();}} + static final class CustomItem extends Item {Data d;int id;CustomItem(){super(null);}@Override public int getUseDuration(ItemStack s,LivingEntity e){d.event("duration "+id+" "+d.id(s));return d.state().getAsJsonArray("durations").get(id).getAsInt();} + @Override public void onUseTick(Level l,LivingEntity a,ItemStack s,int remaining){d.event("tick "+id+" "+d.id(s)+" "+((Server)l).id+" "+remaining);} + @Override public boolean useOnRelease(ItemStack s){d.event("release-query "+id+" "+d.id(s));return d.state().getAsJsonArray("releases").get(id).getAsBoolean();} + @Override public boolean releaseUsing(ItemStack s,Level l,LivingEntity a,int remaining){d.event("release "+id+" "+d.id(s)+" "+((Server)l).id+" "+remaining);return false;} + @Override public ItemStack finishUsingItem(ItemStack s,Level l,LivingEntity a){d.event("finish "+id+" "+d.id(s)+" "+((Server)l).id);return d.items[d.state().getAsJsonArray("finishes").get(id).getAsInt()];}} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Data d;Actor(){super(null,null);}@Override public int getId(){d.event("id");return 17;} + @Override public boolean isUsingItem(){d.event("using");return d.using;} + @Override public InteractionHand getUsedItemHand(){d.event("hand");return InteractionHand.values()[d.state().get("hand").getAsInt()];} + @Override public ItemStack getItemInHand(InteractionHand h){d.event("get-hand "+h.ordinal());return d.hands[h.ordinal()];} + @Override public void setItemInHand(InteractionHand h,ItemStack s){d.event("set-hand "+h.ordinal()+" "+d.id(s));d.hands[h.ordinal()]=s;} + @Override public ServerLevel level(){d.event("level");return d.levels[d.state().get("level").getAsInt()];} + @Override public int getUseItemRemainingTicks(){d.event("remaining");return d.state().get("virtual_remaining").getAsInt();} + @Override protected void setLivingEntityFlag(int flag,boolean value){d.event("flag "+flag+" "+value);if(flag==1)d.using=value;else if(flag==2)d.off=value;else throw new AssertionError();} + @Override public void gameEvent(Holder<GameEvent> event){if(event!=GameEvent.ITEM_INTERACT_START)throw new AssertionError();d.event("vibration-start");} + void update(ItemStack s){super.updateUsingItem(s);}void complete(){super.completeUsingItem();}} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);useItem=field(LivingEntity.class,"useItem");remaining=field(LivingEntity.class,"useItemRemaining");kinetic=field(LivingEntity.class,"recentKineticEnemies");var tick=LivingEntity.class.getDeclaredMethod("updatingUsingItem");tick.setAccessible(true);var ctor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);ctor.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.enemy=make(net.minecraft.world.entity.decoration.ArmorStand.class);d.enemy.setId(99);d.actor=make(Actor.class);d.actor.d=d;d.chunks=new Chunks[]{make(Chunks.class),make(Chunks.class)};for(int i=0;i<2;i++){d.chunks[i].d=d;d.chunks[i].id=i;}d.levels=new Server[]{make(Server.class),make(Server.class)};for(int i=0;i<2;i++){d.levels[i].d=d;d.levels[i].id=i;}var a=make(CustomItem.class);a.d=d;a.id=0;var b=make(CustomItem.class);b.d=d;b.id=1;d.items=new ItemStack[]{(ItemStack)ctor.newInstance(Holder.direct(a),1,new PatchedDataComponentMap(DataComponentMap.EMPTY)),(ItemStack)ctor.newInstance(Holder.direct(d.f.get("shared_type").getAsBoolean()?a:b),1,new PatchedDataComponentMap(DataComponentMap.EMPTY)),ItemStack.EMPTY};for(int i=0;i<2;i++)if(d.f.getAsJsonArray("vibrations").get(i).getAsBoolean())d.items[i].set(DataComponents.USE_EFFECTS,new net.minecraft.world.item.component.UseEffects(false,true,1));for(int i=0;i<2;i++)if(d.f.getAsJsonArray("kinetic_items").get(i).getAsBoolean())d.items[i].set(DataComponents.KINETIC_WEAPON,new net.minecraft.world.item.component.KineticWeapon(0,0,Optional.empty(),Optional.empty(),Optional.empty(),0,0,Optional.empty(),Optional.empty()));d.reset(); + try{d.actor.startUsingItem(InteractionHand.values()[d.f.get("start_hand").getAsInt()]);out.println("result ok");}catch(Stop e){out.println("result error");}out.println("state "+d.snapshot()); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaJavaHashMapOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaJavaHashMapOracle.java new file mode 100644 index 000000000..c945b6596 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaJavaHashMapOracle.java @@ -0,0 +1,19 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.nio.file.*;import java.util.*; +/** The actual JDK HashMap used by vanilla cooldown storage, with ordered keys. */ +public final class VanillaJavaHashMapOracle { + record Key(int id,int hash) implements Comparable<Key>{@Override public int hashCode(){return hash;}@Override public int compareTo(Key other){return Integer.compare(id,other.id);}} + static String opt(Integer value){return value==null?"none":value.toString();} + public static void main(String[] args)throws Exception{Path dir=Path.of(args[1]);try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var keys=new ArrayList<Key>();for(var h:f.getAsJsonArray("hashes"))keys.add(new Key(keys.size(),h.getAsInt()));var map=new HashMap<Key,Integer>();Iterator<Map.Entry<Key,Integer>> cursor=map.entrySet().iterator();for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonArray();int k=op.get(1).getAsInt();try{switch(op.get(0).getAsString()){ + case "put":out.println("old "+opt(map.put(keys.get(k),op.get(2).getAsInt())));break; + case "remove":out.println("old "+opt(map.remove(keys.get(k))));break; + case "get":out.println("get "+opt(map.get(keys.get(k))));break; + case "clear":map.clear();out.println("clear");break; + case "cursor":cursor=map.entrySet().iterator();out.println("cursor");break; + case "next":if(cursor.hasNext()){var e=cursor.next();out.println("next "+e.getKey().id()+"="+e.getValue());}else out.println("next none");break; + case "force-next":{var e=cursor.next();out.println("next "+e.getKey().id()+"="+e.getValue());break;} + case "delete":cursor.remove();out.println("delete");break; + default:throw new AssertionError();}}catch(ConcurrentModificationException e){out.println("error modified");}catch(IllegalStateException e){out.println("error current");}catch(NoSuchElementException e){out.println("next none");} + var entries=new StringJoiner(",");for(var e:map.entrySet())entries.add(e.getKey().id()+"="+e.getValue());out.println("map "+map.size()+" "+map.isEmpty()+" "+cursor.hasNext()+" | "+entries); + }}}} +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaJavaIdentityMapOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaJavaIdentityMapOracle.java new file mode 100644 index 000000000..617a6c62d --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaJavaIdentityMapOracle.java @@ -0,0 +1,28 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.nio.file.*;import java.util.*; +/** Actual JDK map copies and mixed comparable/non-comparable collision bins. */ +public final class VanillaJavaIdentityMapOracle { + static abstract class Key {final int object,id,hash;Key(int o,int id,int h){this.object=o;this.id=id;hash=h;}@Override public int hashCode(){return hash;}@Override public boolean equals(Object o){return o!=null&&getClass()==o.getClass()&&id==((Key)o).id;}} + static final class A extends Key{A(int o,int i,int h){super(o,i,h);}} + static final class B extends Key{B(int o,int i,int h){super(o,i,h);}} + static final class C extends Key implements Comparable<C>{C(int o,int i,int h){super(o,i,h);}public int compareTo(C other){return Integer.compare(id%4,other.id%4);}} + static final class D extends Key implements Comparable<D>{D(int o,int i,int h){super(o,i,h);}public int compareTo(D other){return Integer.compare(id,other.id);}} + static String opt(Integer value){return value==null?"none":value.toString();} + public static void main(String[] args)throws Exception{Path dir=Path.of(args[1]);try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var enriched=new PrintWriter(Files.newBufferedWriter(dir.resolve("inputs-"+args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var keys=new ArrayList<Key>();var identities=new JsonArray();for(var kv:f.getAsJsonArray("keys")){var k=kv.getAsJsonObject();int o=keys.size(),i=k.get("id").getAsInt(),h=k.get("hash").getAsInt();Key key=switch(k.get("kind").getAsInt()){case 0->new A(o,i,h);case 1->new B(o,i,h);case 2->new C(o,i,h);case 3->new D(o,i,h);default->throw new AssertionError();};keys.add(key);identities.add(System.identityHashCode(key));}f.add("identities",identities);enriched.println(f); +var map=new HashMap<Key,Integer>();var saved=new HashMap<Key,Integer>();Iterator<Map.Entry<Key,Integer>> cursor=map.entrySet().iterator();for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonArray();int k=op.get(1).getAsInt();try{switch(op.get(0).getAsString()){ + case "put":out.println("old "+opt(map.put(keys.get(k),op.get(2).getAsInt())));break; + case "remove":out.println("old "+opt(map.remove(keys.get(k))));break; + case "get":out.println("get "+opt(map.get(keys.get(k))));break; + case "copy":map=new HashMap<>(map);cursor=map.entrySet().iterator();out.println("copy");break; + case "save":saved=new HashMap<>(map);out.println("save");break; + case "swap":{var tmp=map;map=saved;saved=tmp;cursor=map.entrySet().iterator();out.println("swap");break;} + case "clear":map.clear();out.println("clear");break; + case "cursor":cursor=map.entrySet().iterator();out.println("cursor");break; + case "next":if(cursor.hasNext()){var e=cursor.next();out.println("next "+e.getKey().object+"="+e.getValue());}else out.println("next none");break; + case "force-next":{var e=cursor.next();out.println("next "+e.getKey().object+"="+e.getValue());break;} + case "delete":cursor.remove();out.println("delete");break; + default:throw new AssertionError();}}catch(ConcurrentModificationException e){out.println("error modified");}catch(IllegalStateException e){out.println("error current");}catch(NoSuchElementException e){out.println("next none");} + for(int mi=0;mi<2;mi++){var current=mi==0?map:saved;var entries=new StringJoiner(",");for(var e:current.entrySet())entries.add(e.getKey().object+"="+e.getValue());out.println((mi==0?"map":"saved")+" "+current.size()+" "+current.isEmpty()+" "+cursor.hasNext()+" | "+entries);} + + }}}} +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLevelShapeOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLevelShapeOracle.java new file mode 100644 index 000000000..e3ff99b24 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLevelShapeOracle.java @@ -0,0 +1,133 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.PrintWriter; +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Proxy; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.Identifier; +import net.minecraft.tags.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.attribute.EnvironmentAttributeReader; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.levelgen.LegacyRandomSource; +import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.ticks.LevelTickAccess; +import net.minecraft.world.ticks.TickPriority; + +/** + * Native BlockState.updateShape and canSurvive over small generated neighbourhoods. + * The level is a reflective LevelReader over the case cells; scheduled ticks requested + * through ScheduledTickAccess are recorded instead of queued. + */ +public final class VanillaLevelShapeOracle { + static void bindFluidTags(Path dir) throws Exception { + var registry = BuiltInRegistries.FLUID; + var loader = new TagLoader<Holder<Fluid>>((id, required) -> registry.get(id).map(value -> (Holder<Fluid>) value), "tags/fluid"); + var definitions = new HashMap<Identifier, List<TagLoader.EntryWithSource>>(); + try (var files = Files.list(dir)) { + for (var file : (Iterable<Path>) files::iterator) { + var name = file.getFileName().toString().replace(".json", ""); + var parsed = TagFile.CODEC.parse(JsonOps.INSTANCE, JsonParser.parseString(Files.readString(file))).getOrThrow(); + var entries = new ArrayList<TagLoader.EntryWithSource>(); + for (var entry : parsed.entries()) entries.add(new TagLoader.EntryWithSource(entry, "vanilla")); + definitions.put(Identifier.parse("minecraft:" + name), entries); + } + } + var tags = new HashMap<TagKey<Fluid>, List<Holder<Fluid>>>(); + loader.build(definitions).forEach((id, values) -> tags.put(TagKey.create(Registries.FLUID, id), List.copyOf(values))); + registry.prepareTagReload(new TagLoader.LoadResult<>(Registries.FLUID, tags)).apply(); + } + + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion(); + net.minecraft.server.Bootstrap.bootStrap(); + Path resources = Path.of(args[0]); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(resources.resolve("block-tags.json"))).getAsJsonObject()); + bindFluidTags(resources.resolve("data/minecraft/tags/fluid")); + var registryAccess = RegistryAccess.fromRegistryOfRegistries(BuiltInRegistries.REGISTRY); + var air = net.minecraft.world.level.block.Blocks.AIR.defaultBlockState(); + try (var out = new PrintWriter(Files.newBufferedWriter(Path.of(args[2]))); var lines = Files.lines(Path.of(args[1]))) { + for (var line : (Iterable<String>) lines::iterator) { + var f = JsonParser.parseString(line).getAsJsonObject(); + var cells = new HashMap<BlockPos, BlockState>(); + for (var cell : f.getAsJsonArray("cells")) { + var c = cell.getAsJsonArray(); + cells.put(new BlockPos(c.get(0).getAsInt(), c.get(1).getAsInt(), c.get(2).getAsInt()), Block.stateById(c.get(3).getAsInt())); + } + int light = f.get("light").getAsInt(); + var noTicks = (LevelTickAccess<?>) Proxy.newProxyInstance(LevelTickAccess.class.getClassLoader(), new Class<?>[]{LevelTickAccess.class}, (proxy, method, values) -> { + if (method.getReturnType() == boolean.class) return false; + if (method.getReturnType() == int.class) return 0; + return null; + }); + var level = (LevelReader) Proxy.newProxyInstance(LevelReader.class.getClassLoader(), new Class<?>[]{LevelReader.class}, (proxy, method, values) -> { + switch (method.getName()) { + case "getBlockState": return cells.getOrDefault((BlockPos) values[0], air); + case "getFluidState": return cells.getOrDefault((BlockPos) values[0], air).getFluidState(); + case "getBlockEntity": return null; + case "getRawBrightness": return Math.max(0, light - (int) values[1]); + case "getMaxLocalRawBrightness": return light; + case "getBrightness": return light; + case "isClientSide": return false; + case "registryAccess": return registryAccess; + case "enabledFeatures": return net.minecraft.world.flag.FeatureFlags.DEFAULT_FLAGS; + case "environmentAttributes": return EnvironmentAttributeReader.EMPTY; + case "getMinY": return -64; + case "getHeight": return values == null || values.length == 0 ? 384 : null; + case "getSkyDarken": return 0; + case "hashCode": return System.identityHashCode(proxy); + case "equals": return proxy == values[0]; + default: + if (method.isDefault()) return InvocationHandler.invokeDefault(proxy, method, values); + throw new AssertionError(method.toString()); + } + }); + var scheduled = new TreeSet<String>(); + var ticks = (ScheduledTickAccess) Proxy.newProxyInstance(ScheduledTickAccess.class.getClassLoader(), new Class<?>[]{ScheduledTickAccess.class}, (proxy, method, values) -> { + switch (method.getName()) { + case "scheduleTick": { + var pos = (BlockPos) values[0]; + String type = values[1] instanceof Block block ? BuiltInRegistries.BLOCK.getKey(block).toString() : BuiltInRegistries.FLUID.getKey((Fluid) values[1]).toString(); + int priority = values.length > 3 ? ((TickPriority) values[3]).getValue() : 0; + scheduled.add(type + "@" + pos.getX() + "," + pos.getY() + "," + pos.getZ() + "+" + values[2] + "p" + priority); + return null; + } + case "getBlockTicks": + case "getFluidTicks": + return noTicks; + default: + throw new AssertionError(method.toString()); + } + }); + RandomSource random = new LegacyRandomSource(f.get("seed").getAsLong()); + var p = f.getAsJsonArray("pos"); + var pos = new BlockPos(p.get(0).getAsInt(), p.get(1).getAsInt(), p.get(2).getAsInt()); + var state = cells.getOrDefault(pos, air); + var direction = Direction.from3DDataValue(f.get("dir").getAsInt()); + var neighbourPos = pos.relative(direction); + String shape; + try { + var result = state.updateShape(level, ticks, pos, direction, neighbourPos, level.getBlockState(neighbourPos), random); + shape = Integer.toString(Block.getId(result)); + } catch (RuntimeException | AssertionError e) { + shape = "error " + e.getClass().getSimpleName(); + } + String survive; + try { + survive = Boolean.toString(state.canSurvive(level, pos)); + } catch (RuntimeException | AssertionError e) { + survive = "error"; + } + out.println("shape " + shape + " ticks " + String.join(" ", scheduled) + " survive " + survive); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLiveAttributeUpdatesOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLiveAttributeUpdatesOracle.java new file mode 100644 index 000000000..ca25e3d2b --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLiveAttributeUpdatesOracle.java @@ -0,0 +1,197 @@ +package dev.horizonlab.parity; + +import static dev.horizonlab.parity.VanillaEntityAttributeOracle.*; +import com.google.gson.*; +import com.google.common.collect.ImmutableList; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.Holder; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.resources.Identifier; +import net.minecraft.world.effect.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.entity.ai.attributes.*; +import net.minecraft.world.level.Level; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.waypoints.ServerWaypointManager; +import net.minecraft.world.waypoints.WaypointTransmitter; +import net.minecraft.network.syncher.*; + +/** Native entity updates and notifications with actual registered attribute maps. */ +public final class VanillaLiveAttributeUpdatesOracle { + static Object unsafe; + static Method allocate, refresh; + static Field healthData, absorption, attributesField, effectDirty; + static EntityDataAccessor<Float> healthKey; + static Constructor<SynchedEntityData> dataCtor; + static <T> T make(Class<T> type) throws Exception { return type.cast(allocate.invoke(unsafe, type)); } + static float single(JsonElement v) { return Float.intBitsToFloat((int)v.getAsLong()); } + static long floatBits(float value) { return Integer.toUnsignedLong(Float.floatToIntBits(value)); } + static final class Stop extends RuntimeException {} + static final class Data { + VanillaLiveAttributesOracle.Data[] maps = new VanillaLiveAttributesOracle.Data[2]; + VanillaLiveAttributesOracle.Effect effect = new VanillaLiveAttributesOracle.Effect(); + SynchedEntityData[] stores = new SynchedEntityData[2]; + List<SynchedEntityData.DataItem<Float>> items = new ArrayList<>(); + Manager[] managers = new Manager[2]; + Actor actor; EffectLevel level; PrintWriter out; JsonObject op; + int selection, direct, data, manager, calls; + boolean server = true, client; + Holder<Attribute> key(JsonObject op) { + int index = op.get("attribute").getAsInt(); + return index < 0 ? null : attributes.get(index); + } + void controls(JsonObject c) throws Exception { + if (c.has("selection")) selection = c.get("selection").getAsInt(); + if (c.has("direct")) direct = c.get("direct").getAsInt(); + if (c.has("data")) data = c.get("data").getAsInt(); + if (c.has("manager")) manager = c.get("manager").getAsInt(); + if (c.has("server")) server = c.get("server").getAsBoolean(); + if (c.has("client")) client = c.get("client").getAsBoolean(); + if (c.has("absorption")) absorption.setFloat(actor, single(c.get("absorption"))); + healthData.set(actor, stores[data]); + attributesField.set(actor, maps[direct].attributes); + } + void event(String name) { + int call = calls++; + out.println("event " + call + " " + name); + if (call == op.get("fail").getAsInt()) throw new Stop(); + if (call == op.get("mutate").getAsInt()) { + try { + controls(op.getAsJsonObject("changes")); + for (var action : op.getAsJsonArray("actions")) raw(action.getAsJsonObject()); + } catch (RuntimeException e) { throw e; } + catch (Exception e) { throw new AssertionError(e); } + } + } + String raw(JsonObject op) throws Exception { + var map = maps[op.get("target").getAsInt()]; + var key = key(op); + String mode = op.get("mode").getAsString(); + var modifier = new AttributeModifier(Identifier.parse(op.get("id").getAsString()), number(op.get("amount")), AttributeModifier.Operation.values()[op.get("operation").getAsInt()]); + switch (mode) { + case "controls": controls(op.getAsJsonObject("changes")); return "ok"; + case "ensure": return map.reference(map.attributes.getInstance(key)); + case "reset": return Boolean.toString(map.attributes.resetBaseValue(key)); + case "define": effect.addAttributeModifier(key, modifier.id(), modifier.amount(), modifier.operation()); return "ok"; + case "effect-add": effect.addAttributeModifiers(map.attributes, op.get("amplifier").getAsInt()); return "ok"; + case "effect-remove": effect.removeAttributeModifiers(map.attributes); return "ok"; + case "clear-updates": map.attributes.getAttributesToUpdate().clear(); return "ok"; + case "clear-sync": map.attributes.getAttributesToSync().clear(); return "ok"; + case "null-update": map.attributes.getAttributesToUpdate().add(null); return "ok"; + case "dirty": effectDirty.setBoolean(actor, op.get("flag").getAsBoolean()); return "ok"; + default: + var instance = map.attributes.getInstance(key); + if (instance == null) return "absent"; + switch (mode) { + case "set": instance.setBaseValue(number(op.get("base"))); break; + case "update": instance.addOrUpdateTransientModifier(modifier); break; + case "permanent": instance.addPermanentModifier(modifier); break; + case "remove": return Boolean.toString(instance.removeModifier(modifier.id())); + case "clear": instance.removeModifiers(); break; + default: throw new AssertionError(mode); + } + return "ok"; + } + } + void state() throws Exception { + out.println("controls " + selection + " " + direct + " " + data + " " + manager + " " + server + " " + client + " " + calls + " " + effectDirty.getBoolean(actor)); + for (int i = 0; i < 2; i++) out.println("health " + i + " " + floatBits(items.get(i).getValue()) + " " + stores[i].isDirty() + " " + items.get(i).isDirty() + " " + items.get(i).isSetToDefault()); + out.println("absorption " + floatBits(absorption.getFloat(actor))); + for (int i = 0; i < 2; i++) { out.println("attributes " + i); maps[i].state(out); } + } + } + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand { + Data d; Actor() { super(null, null); } + @Override public AttributeMap getAttributes() { d.event("attributes"); return d.maps[d.selection].attributes; } + @Override public double getAttributeValue(Holder<Attribute> h) { d.event("value " + (h == null ? "null" : h.getRegisteredName())); return super.getAttributeValue(h); } + @Override public float getHealth() { d.event("health"); return super.getHealth(); } + @Override public void setHealth(float v) { d.event("set-health " + floatBits(v)); super.setHealth(v); } + @Override public float getAbsorptionAmount() { d.event("absorption"); return super.getAbsorptionAmount(); } + @Override protected void internalSetAbsorptionAmount(float v) { d.event("store-absorption " + floatBits(v)); super.internalSetAbsorptionAmount(v); } + @Override public void onSyncedDataUpdated(EntityDataAccessor<?> key) { if (key != healthKey) throw new AssertionError(); d.event("health-updated"); } + @Override public void refreshDimensions() { d.event("dimensions"); } + @Override public Level level() { d.event("level"); return d.server ? d.level : null; } + @Override protected void onAttributeUpdated(Holder<Attribute> h) { d.event("updated " + (h == null ? "null" : h.getRegisteredName())); super.onAttributeUpdated(h); } + void added(MobEffectInstance e) { super.onEffectAdded(e, null); } + void updated(MobEffectInstance e, boolean reapply) { super.onEffectUpdated(e, reapply, null); } + void removed(List<MobEffectInstance> es) { super.onEffectsRemoved(es); } + } + static final class EffectLevel extends ServerLevel { + Data d; EffectLevel() { super(null,null,null,null,null,null,false,0L,List.of(),false); } + @Override public boolean isClientSide() { d.event("client"); return d.client; } + @Override public ServerWaypointManager getWaypointManager() { d.event("manager"); return d.managers[d.manager]; } + } + static final class Manager extends ServerWaypointManager { + Data d; int id; + @Override public void trackWaypoint(WaypointTransmitter actor) { if (actor != d.actor) throw new AssertionError(); d.event("waypoint " + id + " true"); } + @Override public void untrackWaypoint(WaypointTransmitter actor) { if (actor != d.actor) throw new AssertionError(); d.event("waypoint " + id + " false"); } + } + @SuppressWarnings("unchecked") + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion(); net.minecraft.server.Bootstrap.bootStrap(); + for (var a : BuiltInRegistries.ATTRIBUTE) attributes.add(BuiltInRegistries.ATTRIBUTE.wrapAsHolder(a)); + Path dir = Path.of(args[1]); + if (args[0].startsWith("export-")) { Files.writeString(dir.resolve("catalog-" + args[0].substring(7) + ".json"), export().toString()); return; } + var u = Class.forName("sun.misc.Unsafe"); unsafe = field(u, "theUnsafe").get(null); allocate = u.getMethod("allocateInstance", Class.class); + healthData = field(Entity.class, "entityData"); absorption = field(LivingEntity.class, "absorptionAmount"); attributesField = field(LivingEntity.class, "attributes"); effectDirty = field(LivingEntity.class, "effectsDirty"); + var passengers = field(Entity.class, "passengers"); + refresh = LivingEntity.class.getDeclaredMethod("refreshDirtyAttributes"); refresh.setAccessible(true); + healthKey = (EntityDataAccessor<Float>)field(LivingEntity.class, "DATA_HEALTH_ID").get(null); + dataCtor = SynchedEntityData.class.getDeclaredConstructor(SyncedDataHolder.class, SynchedEntityData.DataItem[].class); dataCtor.setAccessible(true); + VanillaLiveAttributesOracle.storage = field(AttributeMap.class, "attributes"); VanillaLiveAttributesOracle.dirty = field(AttributeInstance.class, "dirty"); VanillaLiveAttributesOracle.cached = field(AttributeInstance.class, "cachedValue"); + try (var out = new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0] + ".txt"))); + var enriched = new PrintWriter(Files.newBufferedWriter(dir.resolve("inputs-" + args[0] + ".txt"))); + var lines = Files.lines(dir.resolve("inputs.txt"))) { + for (var line : (Iterable<String>)lines::iterator) { + var f = JsonParser.parseString(line).getAsJsonObject(); var d = new Data(); d.out = out; + d.actor = make(Actor.class); d.actor.d = d; d.level = make(EffectLevel.class); d.level.d = d; + var entity = BuiltInRegistries.ENTITY_TYPE.getValue(Identifier.parse(f.get("entity").getAsString())); + for (int i = 0; i < 2; i++) { + var map = new VanillaLiveAttributesOracle.Data(); d.maps[i] = map; + map.attributes = new VanillaLiveAttributesOracle.Attrs(map, supplier(entity)); + map.map = (Map<Holder<Attribute>,AttributeInstance>)VanillaLiveAttributesOracle.storage.get(map.attributes); + d.managers[i] = make(Manager.class); d.managers[i].d = d; d.managers[i].id = i; + var items = new SynchedEntityData.DataItem<?>[healthKey.id() + 1]; + for (int j = 0; j < items.length; j++) items[j] = new SynchedEntityData.DataItem<Float>(new EntityDataAccessor<Float>(j, EntityDataSerializers.FLOAT), 0f); + var health = new SynchedEntityData.DataItem<Float>(healthKey, single(f.getAsJsonArray("health").get(i))); + d.items.add(health); items[healthKey.id()] = health; d.stores[i] = dataCtor.newInstance(d.actor, items); + } + effectDirty.setBoolean(d.actor, true); passengers.set(d.actor, ImmutableList.of()); absorption.setFloat(d.actor, single(f.get("absorption"))); d.controls(new JsonObject()); + for (var op : f.getAsJsonArray("setup")) d.raw(op.getAsJsonObject()); + var effect = Holder.<MobEffect>direct(d.effect); + for (var ov : f.getAsJsonArray("ops")) { + d.op = ov.getAsJsonObject(); d.calls = 0; String result = "ok"; + var op = d.op; String mode = op.get("mode").getAsString(); + try { + switch (mode) { + case "value": result = bits(d.actor.getAttributeValue(d.key(op))); break; + case "base": result = bits(d.actor.getAttributeBaseValue(d.key(op))); break; + case "set-health": d.actor.setHealth(single(op.get("value"))); break; + case "set-absorption": d.actor.setAbsorptionAmount(single(op.get("value"))); break; + case "heal": d.actor.heal(single(op.get("value"))); break; + case "attribute-update": d.actor.onAttributeUpdated(d.key(op)); break; + case "refresh": try { refresh.invoke(d.actor); } catch (InvocationTargetException e) { if (e.getCause() instanceof RuntimeException x) throw x; throw new AssertionError(e.getCause()); } break; + case "notify-add": d.actor.added(new MobEffectInstance(effect,200,op.get("amplifier").getAsInt())); break; + case "notify-update": d.actor.updated(new MobEffectInstance(effect,200,op.get("amplifier").getAsInt()),op.get("reapply").getAsBoolean()); break; + case "notify-remove": d.actor.removed(Collections.nCopies(op.get("count").getAsInt(),new MobEffectInstance(effect,200,op.get("amplifier").getAsInt()))); break; + case "pack": var packed = d.stores[op.get("target").getAsInt()].packDirty(); result = packed == null ? "none" : Long.toString(floatBits((Float)packed.getFirst().value())); break; + default: result = d.raw(op); + } + } catch (Stop e) { result = "error callback"; } + catch (NullPointerException e) { result = "error null"; } + catch (IndexOutOfBoundsException e) { result = "error bounds"; } + catch (NoSuchElementException e) { result = "error empty"; } + catch (IllegalArgumentException e) { result = "error argument"; } + out.println("result " + result); d.state(); + } + var hashes = new JsonArray(); for (var key : attributes) hashes.add(key.hashCode()); f.add("holder_hashes", hashes); + var instances = new JsonArray(); for (var map : d.maps) { hashes = new JsonArray(); for (var a : map.instances) hashes.add(System.identityHashCode(a)); instances.add(hashes); } f.add("instance_hashes", instances); + enriched.println(f); + } + if (out.checkError() || enriched.checkError()) throw new IOException("cannot write native trace"); + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLiveAttributesOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLiveAttributesOracle.java new file mode 100644 index 000000000..7a9449e97 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLiveAttributesOracle.java @@ -0,0 +1,150 @@ +package dev.horizonlab.parity; + +import static dev.horizonlab.parity.VanillaEntityAttributeOracle.*; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.Field; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.Holder; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.resources.Identifier; +import net.minecraft.world.effect.*; +import net.minecraft.world.entity.ai.attributes.*; + +/** Real registered suppliers, maps, instance caches, modifiers and pending sets. */ +public final class VanillaLiveAttributesOracle { + static Field storage, dirty, cached; + static final class Effect extends MobEffect { + Effect() { super(MobEffectCategory.BENEFICIAL, 0); } + } + static final class Attrs extends AttributeMap { + final Data data; + Attrs(Data data, AttributeSupplier supplier) { super(supplier); this.data = data; } + @Override public AttributeInstance getInstance(Holder<Attribute> key) { + var instance = super.getInstance(key); + data.track(instance); + return instance; + } + } + static final class Data { + final List<AttributeInstance> instances = new ArrayList<>(); + final List<AttributeModifier> modifiers = new ArrayList<>(); + Attrs attributes; + Map<Holder<Attribute>, AttributeInstance> map; + void track(AttributeInstance instance) { + if (instance != null && !instances.contains(instance)) instances.add(instance); + } + String reference(AttributeInstance instance) { + if (instance == null) return "null"; + int id = instances.indexOf(instance); + if (id < 0) throw new AssertionError("untracked instance"); + return Integer.toString(id); + } + String references(Collection<AttributeInstance> values) { + var result = new StringJoiner(","); + for (var instance : values) result.add(reference(instance)); + return result.toString(); + } + String modifierReferences(Collection<AttributeModifier> values) { + var result = new StringJoiner(","); + for (var modifier : values) { + int id = -1; + for (int i = 0; i < modifiers.size(); i++) if (modifiers.get(i) == modifier) { id = i; break; } + if (id < 0) { id = modifiers.size(); modifiers.add(modifier); } + result.add(id + ":" + modifier.id() + ":" + bits(modifier.amount()) + ":" + modifier.operation().ordinal()); + } + return result.toString(); + } + void state(PrintWriter out) throws Exception { + var entries = new StringJoiner(","); + for (var entry : map.entrySet()) entries.add((entry.getKey() == null ? "null" : entry.getKey().getRegisteredName()) + "=" + reference(entry.getValue())); + out.println("map " + entries); + out.println("updates " + references(attributes.getAttributesToUpdate())); + out.println("sync " + references(attributes.getAttributesToSync())); + for (int i = 0; i < instances.size(); i++) { + var instance = instances.get(i); + out.println("instance " + i + " " + instance.getAttribute().getRegisteredName() + " " + bits(instance.getBaseValue()) + " " + dirty.getBoolean(instance) + " " + bits(cached.getDouble(instance)) + " | " + modifierReferences(instance.getModifiers()) + " | " + modifierReferences(instance.getPermanentModifiers())); + } + } + } + @SuppressWarnings("unchecked") + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion(); + net.minecraft.server.Bootstrap.bootStrap(); + for (var a : BuiltInRegistries.ATTRIBUTE) attributes.add(BuiltInRegistries.ATTRIBUTE.wrapAsHolder(a)); + Path dir = Path.of(args[1]); + if (args[0].startsWith("export-")) { + Files.writeString(dir.resolve("catalog-" + args[0].substring(7) + ".json"), export().toString()); + return; + } + storage = field(AttributeMap.class, "attributes"); + dirty = field(AttributeInstance.class, "dirty"); + cached = field(AttributeInstance.class, "cachedValue"); + try (var out = new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0] + ".txt"))); + var enriched = new PrintWriter(Files.newBufferedWriter(dir.resolve("inputs-" + args[0] + ".txt"))); + var lines = Files.lines(dir.resolve("inputs.txt"))) { + for (var line : (Iterable<String>)lines::iterator) { + var fixture = JsonParser.parseString(line).getAsJsonObject(); + var entity = BuiltInRegistries.ENTITY_TYPE.getValue(Identifier.parse(fixture.get("entity").getAsString())); + var data = new Data(); + data.attributes = new Attrs(data, supplier(entity)); + data.map = (Map<Holder<Attribute>, AttributeInstance>)storage.get(data.attributes); + var effect = new Effect(); + for (var value : fixture.getAsJsonArray("ops")) { + var op = value.getAsJsonObject(); + int index = op.get("attribute").getAsInt(); + var key = index < 0 ? null : attributes.get(index); + String mode = op.get("mode").getAsString(); + var modifier = new AttributeModifier(Identifier.parse(op.get("id").getAsString()), number(op.get("amount")), AttributeModifier.Operation.values()[op.get("operation").getAsInt()]); + String result = "ok"; + try { + switch (mode) { + case "value" -> result = bits(data.attributes.getValue(key)); + case "base" -> result = bits(data.attributes.getBaseValue(key)); + case "has" -> result = Boolean.toString(data.attributes.hasAttribute(key)); + case "has_modifier" -> result = Boolean.toString(data.attributes.hasModifier(key, modifier.id())); + case "modifier" -> result = bits(data.attributes.getModifierValue(key, modifier.id())); + case "ensure" -> result = data.reference(data.attributes.getInstance(key)); + case "reset" -> result = Boolean.toString(data.attributes.resetBaseValue(key)); + case "ack_update" -> data.attributes.getAttributesToUpdate().remove(data.map.get(key)); + case "ack_sync" -> data.attributes.getAttributesToSync().remove(data.map.get(key)); + case "clear_updates" -> data.attributes.getAttributesToUpdate().clear(); + case "clear_sync" -> data.attributes.getAttributesToSync().clear(); + case "define" -> effect.addAttributeModifier(key, modifier.id(), modifier.amount(), modifier.operation()); + case "effect-add" -> effect.addAttributeModifiers(data.attributes, op.get("amplifier").getAsInt()); + case "effect-remove" -> effect.removeAttributeModifiers(data.attributes); + default -> { + var instance = data.attributes.getInstance(key); + if (instance == null) result = "absent"; + else switch (mode) { + case "set" -> instance.setBaseValue(number(op.get("base"))); + case "add" -> instance.addTransientModifier(modifier); + case "update" -> instance.addOrUpdateTransientModifier(modifier); + case "permanent" -> instance.addPermanentModifier(modifier); + case "remove" -> result = Boolean.toString(instance.removeModifier(modifier.id())); + case "clear" -> instance.removeModifiers(); + default -> throw new AssertionError(mode); + } + } + } + } catch (NullPointerException e) { + result = "error null"; + } catch (IllegalArgumentException e) { + result = "error " + (mode.equals("modifier") ? (data.attributes.hasAttribute(key) ? "modifier" : "attribute") : (mode.equals("value") || mode.equals("base") ? "attribute" : "duplicate")); + } + out.println("result " + result); + data.state(out); + } + var hashes = new JsonArray(); + for (var key : attributes) hashes.add(key.hashCode()); + fixture.add("holder_hashes", hashes); + hashes = new JsonArray(); + for (var instance : data.instances) hashes.add(System.identityHashCode(instance)); + fixture.add("instance_hashes", hashes); + enriched.println(fixture); + } + if (out.checkError() || enriched.checkError()) throw new IOException("cannot write native trace"); + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingAirOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingAirOracle.java new file mode 100644 index 000000000..143d926cc --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingAirOracle.java @@ -0,0 +1,84 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.tags.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.ai.attributes.*;import net.minecraft.world.effect.*;import net.minecraft.world.item.*;import net.minecraft.world.level.block.*;import net.minecraft.world.level.block.state.*;import net.minecraft.world.phys.Vec3; +/** Actual native private air travel, relative movement and climbing helpers. */ +public final class VanillaLivingAirOracle { + static ItemStack BOOTS;static Field amplifier; + static MobEffectInstance effect(Data d,Holder<MobEffect> type){if(d.f.get("levitation").isJsonNull())return null;var e=new MobEffectInstance(type,100,0);try{amplifier.setInt(e,d.f.get("levitation").getAsInt());}catch(ReflectiveOperationException ex){throw new AssertionError(ex);}return e;} + static final class Stop extends RuntimeException {} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static Vec3 vec(JsonElement v){var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static String vector(Vec3 v){return String.format("%016x %016x %016x",Double.doubleToLongBits(v.x),Double.doubleToLongBits(v.y),Double.doubleToLongBits(v.z));} + static final class Data {JsonObject f;PrintWriter out;int calls,groundCalls,climbCalls;Vec3 velocity; + void query(String s){out.println(s);if(calls++==f.get("fail").getAsInt())throw new Stop();} + boolean flag(String k){return f.get(k).getAsBoolean();} + boolean sequence(String k,int n){var a=f.getAsJsonArray(k);return a.get(Math.min(n,a.size()-1)).getAsBoolean();}} + static final class FrictionBlock extends Block {Data d;FrictionBlock(){super(BlockBehaviour.Properties.of());}@Override public float getFriction(){d.query("friction");return single(d.f.get("friction"));}} + static final class State extends BlockState {Block block;State(){super(null,null,null);}@Override public Block getBlock(){return block;}} + static final class Level extends net.minecraft.server.level.ServerLevel {Data d;BlockState state;Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public BlockState getBlockState(BlockPos p){d.query("state "+p.getX()+" "+p.getY()+" "+p.getZ());return state;} + @Override public boolean isClientSide(){d.query("client");return d.flag("client");} + @Override public boolean hasChunkAt(BlockPos p){d.query("chunk "+p.getX()+" "+p.getY()+" "+p.getZ());return d.flag("chunk");} + @Override public int getMinY(){d.query("min-y");return d.f.get("min_y").getAsInt();}} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Actor(){super(null,null);} + Data d; + void configure(Level l){setLevel(l);} + @Override public BlockPos getBlockPosBelowThatAffectsMyMovement(){d.query("support");return new BlockPos(17,-64,-33);} + @Override public boolean onGround(){d.query("ground");return d.sequence("ground",d.groundCalls++);} + @Override public double getAttributeValue(Holder<Attribute> attribute){String n=attribute==Attributes.FRICTION_MODIFIER?"friction":attribute==Attributes.AIR_DRAG_MODIFIER?"drag":null;if(n==null)throw new AssertionError(attribute);d.query(n+"-modifier");return number(d.f.get(n+"_modifier"));} + @Override public float getSpeed(){d.query("speed");return single(d.f.get("speed"));} + @Override protected float getFlyingSpeed(){d.query("flying-speed");return single(d.f.get("flying_speed"));} + @Override public float getYRot(){d.query("yaw");if(d.flag("yaw_mutate"))d.velocity=new Vec3(17,18,19);return single(d.f.get("yaw"));} + @Override public Vec3 getDeltaMovement(){return d.velocity;} + @Override public void setDeltaMovement(Vec3 v){d.query("set "+vector(v));d.velocity=v;} + @Override public boolean onClimbable(){d.query("climb");return d.sequence("climb",d.climbCalls++);} + @Override public void resetFallDistance(){d.query("reset");fallDistance=0;} + @Override public BlockState getInBlockState(){d.query("in-block");return (d.flag("scaffolding")?Blocks.SCAFFOLDING:Blocks.STONE).defaultBlockState();} + @Override public boolean isSuppressingSlidingDownLadder(){d.query("suppress");return d.flag("suppress");} + @Override public void move(MoverType type,Vec3 v){if(type!=MoverType.SELF)throw new AssertionError(type);d.query("move "+vector(v));horizontalCollision=d.flag("after_horizontal");jumping=d.flag("after_jumping");wasInPowderSnow=d.flag("after_snow");if(d.flag("move_mutate"))d.velocity=vec(d.f.get("after_velocity"));} + @Override public boolean is(TagKey<EntityType<?>> tag){if(tag!=EntityTypeTags.POWDER_SNOW_WALKABLE_MOBS)throw new AssertionError(tag);d.query("powder-tag");return d.flag("powder_tag");} + @Override public ItemStack getItemBySlot(EquipmentSlot slot){if(slot!=EquipmentSlot.FEET)throw new AssertionError(slot);d.query("feet");return d.flag("boots")?BOOTS:ItemStack.EMPTY;} + @Override public MobEffectInstance getEffect(Holder<MobEffect> effect){if(effect!=MobEffects.LEVITATION)throw new AssertionError(effect);d.query("levitation");return effect(d,effect);} + @Override protected double getEffectiveGravity(){d.query("gravity");return number(d.f.get("gravity"));} + @Override public boolean shouldDiscardFriction(){d.query("discard");return d.flag("discard");} + @Override protected boolean omnidirectionalAirMover(){d.query("omni");return d.flag("omni");} + } + static final class Human extends net.minecraft.world.entity.player.Player {Human(){super(null,null);} + Data d; + void configure(Level l){setLevel(l);} + @Override public BlockPos getBlockPosBelowThatAffectsMyMovement(){d.query("support");return new BlockPos(17,-64,-33);} + @Override public boolean onGround(){d.query("ground");return d.sequence("ground",d.groundCalls++);} + @Override public double getAttributeValue(Holder<Attribute> attribute){String n=attribute==Attributes.FRICTION_MODIFIER?"friction":attribute==Attributes.AIR_DRAG_MODIFIER?"drag":null;if(n==null)throw new AssertionError(attribute);d.query(n+"-modifier");return number(d.f.get(n+"_modifier"));} + @Override public float getSpeed(){d.query("speed");return single(d.f.get("speed"));} + @Override protected float getFlyingSpeed(){d.query("flying-speed");return single(d.f.get("flying_speed"));} + @Override public float getYRot(){d.query("yaw");if(d.flag("yaw_mutate"))d.velocity=new Vec3(17,18,19);return single(d.f.get("yaw"));} + @Override public Vec3 getDeltaMovement(){return d.velocity;} + @Override public void setDeltaMovement(Vec3 v){d.query("set "+vector(v));d.velocity=v;} + @Override public boolean onClimbable(){d.query("climb");return d.sequence("climb",d.climbCalls++);} + @Override public void resetFallDistance(){d.query("reset");fallDistance=0;} + @Override public BlockState getInBlockState(){d.query("in-block");return (d.flag("scaffolding")?Blocks.SCAFFOLDING:Blocks.STONE).defaultBlockState();} + @Override public boolean isSuppressingSlidingDownLadder(){d.query("suppress");return d.flag("suppress");} + @Override public void move(MoverType type,Vec3 v){if(type!=MoverType.SELF)throw new AssertionError(type);d.query("move "+vector(v));horizontalCollision=d.flag("after_horizontal");jumping=d.flag("after_jumping");wasInPowderSnow=d.flag("after_snow");if(d.flag("move_mutate"))d.velocity=vec(d.f.get("after_velocity"));} + @Override public boolean is(TagKey<EntityType<?>> tag){if(tag!=EntityTypeTags.POWDER_SNOW_WALKABLE_MOBS)throw new AssertionError(tag);d.query("powder-tag");return d.flag("powder_tag");} + @Override public ItemStack getItemBySlot(EquipmentSlot slot){if(slot!=EquipmentSlot.FEET)throw new AssertionError(slot);d.query("feet");return d.flag("boots")?BOOTS:ItemStack.EMPTY;} + @Override public MobEffectInstance getEffect(Holder<MobEffect> effect){if(effect!=MobEffects.LEVITATION)throw new AssertionError(effect);d.query("levitation");return effect(d,effect);} + @Override protected double getEffectiveGravity(){d.query("gravity");return number(d.f.get("gravity"));} + @Override public boolean shouldDiscardFriction(){d.query("discard");return d.flag("discard");} + @Override protected boolean omnidirectionalAirMover(){d.query("omni");return d.flag("omni");} + @Override public net.minecraft.world.level.GameType gameMode(){return net.minecraft.world.level.GameType.SURVIVAL;} + } + static Method method(Class<?> owner,String name,Class<?>... args)throws Exception{var m=owner.getDeclaredMethod(name,args);m.setAccessible(true);return m;} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");var uf=u.getDeclaredField("theUnsafe");uf.setAccessible(true);var unsafe=uf.get(null);var allocate=u.getMethod("allocateInstance",Class.class); + amplifier=MobEffectInstance.class.getDeclaredField("amplifier");amplifier.setAccessible(true);BOOTS=(ItemStack)allocate.invoke(unsafe,ItemStack.class);var stackItem=ItemStack.class.getDeclaredField("item");stackItem.setAccessible(true);stackItem.set(BOOTS,Items.LEATHER_BOOTS.builtInRegistryHolder());var stackCount=ItemStack.class.getDeclaredField("count");stackCount.setAccessible(true);stackCount.setInt(BOOTS,1); + var air=method(LivingEntity.class,"travelInAir",Vec3.class);var relative=method(LivingEntity.class,"handleRelativeFrictionAndCalculateMovement",Vec3.class,float.class);var climb=method(LivingEntity.class,"handleOnClimbable",Vec3.class);var speed=method(LivingEntity.class,"getFrictionInfluencedSpeed",float.class);var input=method(Entity.class,"getInputVector",Vec3.class,float.class,float.class);var friction=method(LivingEntity.class,"computeModifiedFriction",float.class,float.class);var position=Entity.class.getDeclaredField("position");position.setAccessible(true);var jumping=LivingEntity.class.getDeclaredField("jumping");jumping.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;d.velocity=vec(f.get("velocity"));var level=(Level)allocate.invoke(unsafe,Level.class);level.d=d;var block=(FrictionBlock)allocate.invoke(unsafe,FrictionBlock.class);block.d=d;var state=(State)allocate.invoke(unsafe,State.class);state.block=block;level.state=state; + LivingEntity entity;if(d.flag("player")){var e=(Human)allocate.invoke(unsafe,Human.class);e.d=d;e.configure(level);entity=e;}else{var e=(Actor)allocate.invoke(unsafe,Actor.class);e.d=d;e.configure(level);entity=e;}position.set(entity,new Vec3(0,number(f.get("y")),0));entity.fallDistance=number(f.get("fall"));entity.horizontalCollision=d.flag("horizontal");jumping.setBoolean(entity,d.flag("jumping"));entity.wasInPowderSnow=d.flag("snow"); + try{Object result=switch(f.get("mode").getAsString()){case "air"->air.invoke(entity,vec(f.get("input")));case "relative"->relative.invoke(entity,vec(f.get("input")),single(f.get("friction")));case "climb"->climb.invoke(entity,vec(f.get("input")));case "speed"->speed.invoke(entity,single(f.get("friction")));case "input"->input.invoke(null,vec(f.get("input")),single(f.get("speed")),single(f.get("yaw")));case "friction"->friction.invoke(null,single(f.get("friction")),(float)number(f.get("friction_modifier")));default->throw new AssertionError();};if(result instanceof Vec3 v)out.println("vector "+vector(v));else if(result instanceof Float v)out.printf("float %08x%n",Float.floatToIntBits(v));out.println("result ok");}catch(InvocationTargetException e){if(e.getCause() instanceof Stop)out.println("result error");else throw e;} + out.printf("final %s %016x%n",vector(d.velocity),Double.doubleToLongBits(entity.fallDistance));out.println("queries "+d.calls); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingDamageOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingDamageOracle.java new file mode 100644 index 000000000..77d8b1eb3 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingDamageOracle.java @@ -0,0 +1,60 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.Holder;import net.minecraft.resources.Identifier;import net.minecraft.world.entity.*;import net.minecraft.world.entity.ai.attributes.*;import net.minecraft.world.damagesource.*;import net.minecraft.server.level.*;import net.minecraft.world.level.gameevent.GameEvent;import net.minecraft.stats.Stats; +/** Actual LivingEntity/Player inner damage application with controlled phase hooks. */ +public final class VanillaLivingDamageOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static final class Data {JsonObject f;PrintWriter out;int calls;boolean changed;float health,absorption,exhaustion,recorded;LivingEntity actor;Actor other;Human attacker;Tracker tracker; + JsonObject state(){return f.getAsJsonObject(changed?"after":"initial");} + void reset(){var s=state();health=single(s.get("health"));absorption=single(s.get("absorption"));exhaustion=single(s.get("exhaustion"));} + void query(String s){out.println(s);int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt()){changed=true;reset();}} + } + static final class Source extends DamageSource {Data d;Source(){super(null);}@Override public Entity getEntity(){d.query("attacker");return switch(d.state().get("attacker").getAsInt()){case 0->null;case 1->d.other;case 2->d.attacker;default->throw new AssertionError();};}@Override public float getFoodExhaustion(){d.query("food-exhaustion");return single(d.state().get("food_exhaustion"));}} + static final class Tracker extends CombatTracker {Data d;Tracker(){super(null);}@Override public void recordDamage(DamageSource s,float v){d.query("record "+bits(v));d.recorded=v;}} + static final class Level extends ServerLevel {Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);}} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Actor(){super(null,null);} + + Data d; + @Override public boolean isInvulnerableTo(ServerLevel l,DamageSource s){d.query("invulnerable");return d.state().get("invulnerable").getAsBoolean();} + @Override protected float getDamageAfterArmorAbsorb(DamageSource s,float v){d.query("armor "+bits(v));return single(d.state().get("armor"));} + @Override protected float getDamageAfterMagicAbsorb(DamageSource s,float v){d.query("magic "+bits(v));return single(d.state().get("magic"));} + @Override public float getAbsorptionAmount(){d.query("absorption");return d.absorption;} + @Override public double getAttributeValue(Holder<Attribute> a){if(a!=Attributes.MAX_ABSORPTION)throw new AssertionError();d.query("max-absorption");return number(d.state().get("max_absorption"));} + @Override protected void internalSetAbsorptionAmount(float v){d.query("set-absorption "+bits(v));d.absorption=v;} + @Override public float getHealth(){d.query("health");return d.health;} + @Override public void setHealth(float v){d.query("set-health "+bits(v));d.health=v;} + @Override public CombatTracker getCombatTracker(){d.query("tracker");return d.tracker;} + @Override public void gameEvent(Holder<GameEvent> e){if(e!=GameEvent.ENTITY_DAMAGE)throw new AssertionError();d.query("damage-event");} + void run(ServerLevel l,DamageSource s,float v){super.actuallyHurt(l,s,v);} + } + static final class Human extends ServerPlayer {Human(){super(null,null,null,null);} + + Data d; + @Override public boolean isInvulnerableTo(ServerLevel l,DamageSource s){d.query("invulnerable");return d.state().get("invulnerable").getAsBoolean();} + @Override protected float getDamageAfterArmorAbsorb(DamageSource s,float v){d.query("armor "+bits(v));return single(d.state().get("armor"));} + @Override protected float getDamageAfterMagicAbsorb(DamageSource s,float v){d.query("magic "+bits(v));return single(d.state().get("magic"));} + @Override public float getAbsorptionAmount(){d.query("absorption");return d.absorption;} + @Override public double getAttributeValue(Holder<Attribute> a){if(a!=Attributes.MAX_ABSORPTION)throw new AssertionError();d.query("max-absorption");return number(d.state().get("max_absorption"));} + @Override protected void internalSetAbsorptionAmount(float v){d.query("set-absorption "+bits(v));d.absorption=v;} + @Override public float getHealth(){d.query("health");return d.health;} + @Override public void setHealth(float v){d.query("set-health "+bits(v));d.health=v;} + @Override public CombatTracker getCombatTracker(){d.query("tracker");return d.tracker;} + @Override public void gameEvent(Holder<GameEvent> e){if(e!=GameEvent.ENTITY_DAMAGE)throw new AssertionError();d.query("damage-event");} + void run(ServerLevel l,DamageSource s,float v){super.actuallyHurt(l,s,v);} + + @Override public void causeFoodExhaustion(float v){d.query("exhaust "+bits(v));d.exhaustion+=v;} + @Override public void awardStat(Identifier stat,int value){String name=stat==Stats.DAMAGE_ABSORBED?"absorbed":stat==Stats.DAMAGE_DEALT_ABSORBED?"dealt-absorbed":stat==Stats.DAMAGE_TAKEN?"taken":"unknown";if(name.equals("unknown"))throw new AssertionError();d.query("stat "+(d.actor==this?"self":"attacker")+" "+name+" "+value);} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");var uf=u.getDeclaredField("theUnsafe");uf.setAccessible(true);unsafe=uf.get(null);allocate=u.getMethod("allocateInstance",Class.class);var level=make(Level.class);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;d.reset();d.other=make(Actor.class);d.other.d=d;d.attacker=make(Human.class);d.attacker.d=d;d.tracker=make(Tracker.class);d.tracker.d=d;var source=make(Source.class);source.d=d;boolean player=f.get("player").getAsBoolean();if(player){var actor=make(Human.class);actor.d=d;d.actor=actor;}else{var actor=make(Actor.class);actor.d=d;d.actor=actor;} + try{if(player)((Human)d.actor).run(level,source,single(f.get("damage")));else ((Actor)d.actor).run(level,source,single(f.get("damage")));out.println("result ok");}catch(Stop e){out.println("result error");} + out.println("final "+bits(d.health)+" "+bits(d.absorption)+" "+bits(d.exhaustion)+" "+bits(d.recorded));out.println("queries "+d.calls); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingFallOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingFallOracle.java new file mode 100644 index 000000000..18eebac2c --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingFallOracle.java @@ -0,0 +1,49 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.tags.*; +import net.minecraft.sounds.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.entity.decoration.ArmorStand; +import net.minecraft.world.entity.ai.attributes.*; +import net.minecraft.world.damagesource.*; +import net.minecraft.world.phys.Vec3; +/** Actual living fall calculation/cause methods and impulse context transitions. */ +public final class VanillaLivingFallOracle { + static final class Stop extends RuntimeException {} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static Vec3 vector(JsonElement v){if(v.isJsonNull())return null;var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static Field grace,impact; + static final class Data {JsonObject f;PrintWriter out;int calls,immuneCalls,hurt;void query(String s){out.println(s);if(calls++==f.get("fail").getAsInt())throw new Stop();}} + static final class Level extends net.minecraft.server.level.ServerLevel {private Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);}} + static final class Actor extends ArmorStand { + Data d;Actor(){super(null,null);}void configure(Level level){setLevel(level);} + @Override public boolean is(TagKey<EntityType<?>> tag){if(tag!=EntityTypeTags.FALL_DAMAGE_IMMUNE)throw new AssertionError(tag);d.query("immune");var values=d.f.getAsJsonArray("immune");return values.get(Math.min(d.immuneCalls++,values.size()-1)).getAsBoolean();} + @Override public double getAttributeValue(Holder<Attribute> attribute){String name=attribute==Attributes.SAFE_FALL_DISTANCE?"safe":attribute==Attributes.FALL_DAMAGE_MULTIPLIER?"damage-factor":null;if(name==null)throw new AssertionError(attribute);d.query(name);return number(d.f.get(name));} + @Override public void resetCurrentImpulseContext(){d.query("reset");super.resetCurrentImpulseContext();} + @Override public void tryResetCurrentImpulseContext(){d.query("try-reset");super.tryResetCurrentImpulseContext();} + @Override protected void propagateFallToPassengers(double distance,float multiplier,DamageSource source){d.query(String.format("passengers %016x %08x",Double.doubleToLongBits(distance),Float.floatToIntBits(multiplier)));if(d.f.get("mutate").getAsBoolean()){try{grace.setInt(this,17);impact.set(this,new Vec3(17,18,19));}catch(ReflectiveOperationException e){throw new AssertionError(e);}}} + @Override public Fallsounds getFallSounds(){d.query("sounds");return new Fallsounds(SoundEvents.GENERIC_SMALL_FALL,SoundEvents.GENERIC_BIG_FALL);} + @Override public void playSound(SoundEvent sound,float volume,float pitch){if(volume!=1||pitch!=1)throw new AssertionError();d.query("sound "+(sound==SoundEvents.GENERIC_BIG_FALL?"big":"small"));} + @Override protected void playBlockFallSound(){d.query("block-sound");} + @Override public boolean hurtServer(net.minecraft.server.level.ServerLevel level,DamageSource source,float damage){d.query(String.format("hurt %08x",Float.floatToIntBits(damage)));d.hurt++;return d.f.get("hurt_result").getAsBoolean();} + int calculate(double distance,float multiplier){return calculateFallDamage(distance,multiplier);} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var allocator=Class.forName("sun.misc.Unsafe");var field=allocator.getDeclaredField("theUnsafe");field.setAccessible(true);var unsafe=field.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + grace=LivingEntity.class.getDeclaredField("currentImpulseContextResetGraceTime");grace.setAccessible(true);impact=LivingEntity.class.getDeclaredField("currentImpulseImpactPos");impact.setAccessible(true);var position=Entity.class.getDeclaredField("position");position.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){ + for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;var entity=(Actor)allocate.invoke(unsafe,Actor.class);entity.d=d;entity.configure(f.get("server").getAsBoolean()?(Level)allocate.invoke(unsafe,Level.class):null);grace.setInt(entity,f.get("grace").getAsInt());impact.set(entity,vector(f.get("impact")));position.set(entity,new Vec3(0,number(f.get("y")),0)); + try{int mode=f.get("mode").getAsInt();if(mode==0)out.println("damage "+entity.calculate(number(f.get("distance")),single(f.get("multiplier"))));else if(mode==1)out.println("caused "+entity.causeFallDamage(number(f.get("distance")),single(f.get("multiplier")),null));else for(var value:f.getAsJsonArray("ops")){var op=value.getAsJsonObject();switch(op.get("mode").getAsInt()){case 0->entity.setIgnoreFallDamageFromCurrentImpulse(op.get("ignore").getAsBoolean(),vector(op.get("position")));case 1->entity.applyPostImpulseGraceTime(op.get("ticks").getAsInt());case 2->entity.tryResetCurrentImpulseContext();case 3->entity.resetCurrentImpulseContext();default->throw new AssertionError();}emit(out,entity);} } + catch(Stop error){out.println("error");}emit(out,entity);out.println("hurt-count "+d.hurt);out.println("queries "+d.calls); + } + } + } + static void emit(PrintWriter out,Actor entity)throws Exception{var p=(Vec3)impact.get(entity);out.println("grace "+grace.getInt(entity)+" "+entity.isInPostImpulseGraceTime()+" "+entity.isIgnoringFallDamageFromCurrentImpulse());if(p==null)out.println("impact none");else out.printf("impact %016x %016x %016x%n",Double.doubleToLongBits(p.x),Double.doubleToLongBits(p.y),Double.doubleToLongBits(p.z));} +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingFluidOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingFluidOracle.java new file mode 100644 index 000000000..b37df7384 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingFluidOracle.java @@ -0,0 +1,101 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.tags.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.ai.attributes.*;import net.minecraft.world.effect.*;import net.minecraft.world.item.*;import net.minecraft.world.level.block.*;import net.minecraft.world.level.block.state.*;import net.minecraft.world.phys.Vec3; +/** Actual native private air travel, relative movement and climbing helpers. */ +public final class VanillaLivingFluidOracle { + static ItemStack BOOTS;static Field position;static Field amplifier; + static MobEffectInstance effect(Data d,Holder<MobEffect> type){if(d.f.get("levitation").isJsonNull())return null;var e=new MobEffectInstance(type,100,0);try{amplifier.setInt(e,d.f.get("levitation").getAsInt());}catch(ReflectiveOperationException ex){throw new AssertionError(ex);}return e;} + static final class Stop extends RuntimeException {} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static Vec3 vec(JsonElement v){var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static String vector(Vec3 v){return String.format("%016x %016x %016x",Double.doubleToLongBits(v.x),Double.doubleToLongBits(v.y),Double.doubleToLongBits(v.z));} + static final class Data {JsonObject f;PrintWriter out;int calls,groundCalls,climbCalls,sprintCalls;Vec3 velocity; + void query(String s){out.println(s);if(calls++==f.get("fail").getAsInt())throw new Stop();} + boolean flag(String k){return f.get(k).getAsBoolean();} + boolean sequence(String k,int n){var a=f.getAsJsonArray(k);return a.get(Math.min(n,a.size()-1)).getAsBoolean();}} + static final class FrictionBlock extends Block {Data d;FrictionBlock(){super(BlockBehaviour.Properties.of());}@Override public float getFriction(){d.query("friction");return single(d.f.get("friction"));}} + static final class State extends BlockState {Block block;State(){super(null,null,null);}@Override public Block getBlock(){return block;}} + static final class Level extends net.minecraft.server.level.ServerLevel {Data d;BlockState state;Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public BlockState getBlockState(BlockPos p){d.query("state "+p.getX()+" "+p.getY()+" "+p.getZ());return state;} + @Override public boolean isClientSide(){d.query("client");return d.flag("client");} + @Override public boolean hasChunkAt(BlockPos p){d.query("chunk "+p.getX()+" "+p.getY()+" "+p.getZ());return d.flag("chunk");} + @Override public int getMinY(){d.query("min-y");return d.f.get("min_y").getAsInt();}} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Actor(){super(null,null);} + Data d; + void configure(Level l){setLevel(l);} + @Override public BlockPos getBlockPosBelowThatAffectsMyMovement(){d.query("support");return new BlockPos(17,-64,-33);} + @Override public boolean onGround(){d.query("ground");return d.sequence("ground",d.groundCalls++);} + @Override public double getAttributeValue(Holder<Attribute> attribute){if(attribute==Attributes.WATER_MOVEMENT_EFFICIENCY){d.query("efficiency");return number(d.f.get("efficiency"));}String n=attribute==Attributes.FRICTION_MODIFIER?"friction":attribute==Attributes.AIR_DRAG_MODIFIER?"drag":null;if(n==null)throw new AssertionError(attribute);d.query(n+"-modifier");return number(d.f.get(n+"_modifier"));} + @Override public float getSpeed(){d.query("speed");return single(d.f.get("speed"));} + @Override protected float getFlyingSpeed(){d.query("flying-speed");return single(d.f.get("flying_speed"));} + @Override public float getYRot(){d.query("yaw");if(d.flag("yaw_mutate"))d.velocity=new Vec3(17,18,19);return single(d.f.get("yaw"));} + @Override public Vec3 getDeltaMovement(){return d.velocity;} + @Override public void setDeltaMovement(Vec3 v){d.query("set "+vector(v));d.velocity=v;} + @Override public boolean onClimbable(){d.query("climb");return d.sequence("climb",d.climbCalls++);} + @Override public void resetFallDistance(){d.query("reset");fallDistance=0;} + @Override public BlockState getInBlockState(){d.query("in-block");return (d.flag("scaffolding")?Blocks.SCAFFOLDING:Blocks.STONE).defaultBlockState();} + @Override public boolean isSuppressingSlidingDownLadder(){d.query("suppress");return d.flag("suppress");} + @Override public void move(MoverType type,Vec3 v){if(type!=MoverType.SELF)throw new AssertionError(type);d.query("move "+vector(v));try{position.set(this,new Vec3(0,number(d.f.get("after_y")),0));}catch(ReflectiveOperationException e){throw new AssertionError(e);}horizontalCollision=d.flag("after_horizontal");jumping=d.flag("after_jumping");wasInPowderSnow=d.flag("after_snow");if(d.flag("move_mutate"))d.velocity=vec(d.f.get("after_velocity"));} + @Override public boolean is(TagKey<EntityType<?>> tag){if(tag==EntityTypeTags.CAN_FLOAT_WHILE_RIDDEN){d.query("float-tag");return d.flag("float_tag");}if(tag!=EntityTypeTags.POWDER_SNOW_WALKABLE_MOBS)throw new AssertionError(tag);d.query("powder-tag");return d.flag("powder_tag");} + @Override public ItemStack getItemBySlot(EquipmentSlot slot){if(slot!=EquipmentSlot.FEET)throw new AssertionError(slot);d.query("feet");return d.flag("boots")?BOOTS:ItemStack.EMPTY;} + @Override public MobEffectInstance getEffect(Holder<MobEffect> effect){if(effect!=MobEffects.LEVITATION)throw new AssertionError(effect);d.query("levitation");return effect(d,effect);} + @Override protected double getEffectiveGravity(){d.query("gravity");return number(d.f.get("gravity"));} + @Override public boolean shouldDiscardFriction(){d.query("discard");return d.flag("discard");} + @Override public boolean isInWater(){d.query("water");return d.flag("water");} + @Override public boolean isSprinting(){d.query("sprint");return d.sequence("sprint",d.sprintCalls++);} + @Override protected float getWaterSlowDown(){d.query("slow-down");return single(d.f.get("slow_down"));} + @Override public boolean hasEffect(Holder<MobEffect> effect){if(effect!=MobEffects.DOLPHINS_GRACE)throw new AssertionError(effect);d.query("dolphin");return d.flag("dolphin");} + @Override public double getFluidHeight(TagKey<net.minecraft.world.level.material.Fluid> tag){String name=tag==FluidTags.LAVA?"lava":tag==FluidTags.ENTITY_FLOATABLE?"floatable":null;if(name==null)throw new AssertionError(tag);d.query("height "+name);return number(d.f.get(name+"_height"));} + @Override public double getFluidJumpThreshold(){d.query("threshold");return number(d.f.get("threshold"));} + @Override public boolean isFree(double x,double y,double z){d.query("free "+vector(new Vec3(x,y,z)));if(d.flag("free_mutate"))d.velocity=new Vec3(31,32,33);return d.flag("free");} + @Override public boolean isVehicle(){d.query("vehicle");return d.flag("vehicle");} + @Override protected boolean omnidirectionalAirMover(){d.query("omni");return d.flag("omni");} + } + static final class Human extends net.minecraft.world.entity.player.Player {Human(){super(null,null);} + Data d; + void configure(Level l){setLevel(l);} + @Override public BlockPos getBlockPosBelowThatAffectsMyMovement(){d.query("support");return new BlockPos(17,-64,-33);} + @Override public boolean onGround(){d.query("ground");return d.sequence("ground",d.groundCalls++);} + @Override public double getAttributeValue(Holder<Attribute> attribute){if(attribute==Attributes.WATER_MOVEMENT_EFFICIENCY){d.query("efficiency");return number(d.f.get("efficiency"));}String n=attribute==Attributes.FRICTION_MODIFIER?"friction":attribute==Attributes.AIR_DRAG_MODIFIER?"drag":null;if(n==null)throw new AssertionError(attribute);d.query(n+"-modifier");return number(d.f.get(n+"_modifier"));} + @Override public float getSpeed(){d.query("speed");return single(d.f.get("speed"));} + @Override protected float getFlyingSpeed(){d.query("flying-speed");return single(d.f.get("flying_speed"));} + @Override public float getYRot(){d.query("yaw");if(d.flag("yaw_mutate"))d.velocity=new Vec3(17,18,19);return single(d.f.get("yaw"));} + @Override public Vec3 getDeltaMovement(){return d.velocity;} + @Override public void setDeltaMovement(Vec3 v){d.query("set "+vector(v));d.velocity=v;} + @Override public boolean onClimbable(){d.query("climb");return d.sequence("climb",d.climbCalls++);} + @Override public void resetFallDistance(){d.query("reset");fallDistance=0;} + @Override public BlockState getInBlockState(){d.query("in-block");return (d.flag("scaffolding")?Blocks.SCAFFOLDING:Blocks.STONE).defaultBlockState();} + @Override public boolean isSuppressingSlidingDownLadder(){d.query("suppress");return d.flag("suppress");} + @Override public void move(MoverType type,Vec3 v){if(type!=MoverType.SELF)throw new AssertionError(type);d.query("move "+vector(v));try{position.set(this,new Vec3(0,number(d.f.get("after_y")),0));}catch(ReflectiveOperationException e){throw new AssertionError(e);}horizontalCollision=d.flag("after_horizontal");jumping=d.flag("after_jumping");wasInPowderSnow=d.flag("after_snow");if(d.flag("move_mutate"))d.velocity=vec(d.f.get("after_velocity"));} + @Override public boolean is(TagKey<EntityType<?>> tag){if(tag==EntityTypeTags.CAN_FLOAT_WHILE_RIDDEN){d.query("float-tag");return d.flag("float_tag");}if(tag!=EntityTypeTags.POWDER_SNOW_WALKABLE_MOBS)throw new AssertionError(tag);d.query("powder-tag");return d.flag("powder_tag");} + @Override public ItemStack getItemBySlot(EquipmentSlot slot){if(slot!=EquipmentSlot.FEET)throw new AssertionError(slot);d.query("feet");return d.flag("boots")?BOOTS:ItemStack.EMPTY;} + @Override public MobEffectInstance getEffect(Holder<MobEffect> effect){if(effect!=MobEffects.LEVITATION)throw new AssertionError(effect);d.query("levitation");return effect(d,effect);} + @Override protected double getEffectiveGravity(){d.query("gravity");return number(d.f.get("gravity"));} + @Override public boolean shouldDiscardFriction(){d.query("discard");return d.flag("discard");} + @Override public boolean isInWater(){d.query("water");return d.flag("water");} + @Override public boolean isSprinting(){d.query("sprint");return d.sequence("sprint",d.sprintCalls++);} + @Override protected float getWaterSlowDown(){d.query("slow-down");return single(d.f.get("slow_down"));} + @Override public boolean hasEffect(Holder<MobEffect> effect){if(effect!=MobEffects.DOLPHINS_GRACE)throw new AssertionError(effect);d.query("dolphin");return d.flag("dolphin");} + @Override public double getFluidHeight(TagKey<net.minecraft.world.level.material.Fluid> tag){String name=tag==FluidTags.LAVA?"lava":tag==FluidTags.ENTITY_FLOATABLE?"floatable":null;if(name==null)throw new AssertionError(tag);d.query("height "+name);return number(d.f.get(name+"_height"));} + @Override public double getFluidJumpThreshold(){d.query("threshold");return number(d.f.get("threshold"));} + @Override public boolean isFree(double x,double y,double z){d.query("free "+vector(new Vec3(x,y,z)));if(d.flag("free_mutate"))d.velocity=new Vec3(31,32,33);return d.flag("free");} + @Override public boolean isVehicle(){d.query("vehicle");return d.flag("vehicle");} + @Override protected boolean omnidirectionalAirMover(){d.query("omni");return d.flag("omni");} + @Override public net.minecraft.world.level.GameType gameMode(){return net.minecraft.world.level.GameType.SURVIVAL;} + } + static Method method(Class<?> owner,String name,Class<?>... args)throws Exception{var m=owner.getDeclaredMethod(name,args);m.setAccessible(true);return m;} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");var uf=u.getDeclaredField("theUnsafe");uf.setAccessible(true);var unsafe=uf.get(null);var allocate=u.getMethod("allocateInstance",Class.class); + amplifier=MobEffectInstance.class.getDeclaredField("amplifier");amplifier.setAccessible(true);BOOTS=(ItemStack)allocate.invoke(unsafe,ItemStack.class);var stackItem=ItemStack.class.getDeclaredField("item");stackItem.setAccessible(true);stackItem.set(BOOTS,Items.LEATHER_BOOTS.builtInRegistryHolder());var stackCount=ItemStack.class.getDeclaredField("count");stackCount.setAccessible(true);stackCount.setInt(BOOTS,1); + var fluid=method(LivingEntity.class,"travelInFluid",Vec3.class);var water=method(LivingEntity.class,"travelInWater",Vec3.class,double.class,boolean.class,double.class);var lava=method(LivingEntity.class,"travelInLava",Vec3.class,double.class,boolean.class,double.class);var adjust=method(LivingEntity.class,"getFluidFallingAdjustedMovement",double.class,boolean.class,Vec3.class);var jump=method(LivingEntity.class,"jumpOutOfFluid",double.class);var floatLiquid=method(LivingEntity.class,"floatInLiquidWhileRidden",TagKey.class); + var air=method(LivingEntity.class,"travelInAir",Vec3.class);var relative=method(LivingEntity.class,"handleRelativeFrictionAndCalculateMovement",Vec3.class,float.class);var climb=method(LivingEntity.class,"handleOnClimbable",Vec3.class);var speed=method(LivingEntity.class,"getFrictionInfluencedSpeed",float.class);var input=method(Entity.class,"getInputVector",Vec3.class,float.class,float.class);var friction=method(LivingEntity.class,"computeModifiedFriction",float.class,float.class);position=Entity.class.getDeclaredField("position");position.setAccessible(true);var jumping=LivingEntity.class.getDeclaredField("jumping");jumping.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;d.velocity=vec(f.get("velocity"));var level=(Level)allocate.invoke(unsafe,Level.class);level.d=d;var block=(FrictionBlock)allocate.invoke(unsafe,FrictionBlock.class);block.d=d;var state=(State)allocate.invoke(unsafe,State.class);state.block=block;level.state=state; + LivingEntity entity;if(d.flag("player")){var e=(Human)allocate.invoke(unsafe,Human.class);e.d=d;e.configure(level);entity=e;}else{var e=(Actor)allocate.invoke(unsafe,Actor.class);e.d=d;e.configure(level);entity=e;}position.set(entity,new Vec3(0,number(f.get("y")),0));entity.fallDistance=number(f.get("fall"));entity.horizontalCollision=d.flag("horizontal");jumping.setBoolean(entity,d.flag("jumping"));entity.wasInPowderSnow=d.flag("snow"); + try{Object result=switch(f.get("mode").getAsString()){case "fluid"->fluid.invoke(entity,vec(f.get("input")));case "water"->water.invoke(entity,vec(f.get("input")),number(f.get("gravity")),d.flag("falling"),number(f.get("old_y")));case "lava"->lava.invoke(entity,vec(f.get("input")),number(f.get("gravity")),d.flag("falling"),number(f.get("old_y")));case "adjust"->adjust.invoke(entity,number(f.get("gravity")),d.flag("falling"),vec(f.get("input")));case "jump"->jump.invoke(entity,number(f.get("old_y")));case "float"->floatLiquid.invoke(entity,FluidTags.ENTITY_FLOATABLE);case "air"->air.invoke(entity,vec(f.get("input")));case "relative"->relative.invoke(entity,vec(f.get("input")),single(f.get("friction")));case "climb"->climb.invoke(entity,vec(f.get("input")));case "speed"->speed.invoke(entity,single(f.get("friction")));case "input"->input.invoke(null,vec(f.get("input")),single(f.get("speed")),single(f.get("yaw")));case "friction"->friction.invoke(null,single(f.get("friction")),(float)number(f.get("friction_modifier")));default->throw new AssertionError();};if(result instanceof Vec3 v)out.println("vector "+vector(v));else if(result instanceof Float v)out.printf("float %08x%n",Float.floatToIntBits(v));out.println("result ok");}catch(InvocationTargetException e){if(e.getCause() instanceof Stop)out.println("result error");else throw e;} + out.printf("final %s %016x%n",vector(d.velocity),Double.doubleToLongBits(entity.fallDistance));out.println("queries "+d.calls); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingHealthOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingHealthOracle.java new file mode 100644 index 000000000..e50c50b64 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingHealthOracle.java @@ -0,0 +1,43 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*; +import net.minecraft.core.Holder;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.Player;import net.minecraft.world.entity.ai.attributes.*;import net.minecraft.network.syncher.*; +/** Native health methods and Float synchronized-data callback semantics. */ +public final class VanillaLivingHealthOracle { + static final class Stop extends RuntimeException {} + static Field entityData,dead,absorption;static EntityDataAccessor<Float> healthKey; + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static final class Data {JsonObject f;PrintWriter out;int calls,active;boolean changed;Actor actor;SynchedEntityData[] stores;SynchedEntityData.DataItem<Float>[] items; + JsonObject world(){return f.getAsJsonObject(changed?"after":"world");} + void query(String text){out.println(text);int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt()){changed=true;active=1;try{entityData.set(actor,stores[active]);dead.setBoolean(actor,world().get("dead").getAsBoolean());}catch(Exception e){throw new AssertionError(e);}}} + } + static final class Actor extends Player {Data d;Actor(){super(null,null);} + @Override public net.minecraft.world.level.GameType gameMode(){return net.minecraft.world.level.GameType.SURVIVAL;} + @Override public float getHealth(){d.query("health");return super.getHealth();} + @Override public double getAttributeValue(Holder<Attribute> a){String name=a==Attributes.MAX_HEALTH?"max-health":a==Attributes.MAX_ABSORPTION?"max-absorption":"unknown";d.query(name);return number(d.world().get(name));} + @Override public void setHealth(float v){d.query("set "+bits(v));super.setHealth(v);} + void base(float v){super.setHealth(v);} + @Override protected void internalSetAbsorptionAmount(float v){d.query("absorption "+bits(v));try{absorption.setFloat(this,v);}catch(IllegalAccessException e){throw new AssertionError(e);}} + @Override public void onSyncedDataUpdated(EntityDataAccessor<?> key){if(key!=healthKey)throw new AssertionError();d.query("updated");} + } + @SuppressWarnings("unchecked") public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");var uf=u.getDeclaredField("theUnsafe");uf.setAccessible(true);var unsafe=uf.get(null);var allocate=u.getMethod("allocateInstance",Class.class); + entityData=field(Entity.class,"entityData");dead=field(LivingEntity.class,"dead");healthKey=(EntityDataAccessor<Float>)field(LivingEntity.class,"DATA_HEALTH_ID").get(null);absorption=field(LivingEntity.class,"absorptionAmount"); + var ctor=SynchedEntityData.class.getDeclaredConstructor(SyncedDataHolder.class,SynchedEntityData.DataItem[].class);ctor.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;d.actor=(Actor)allocate.invoke(unsafe,Actor.class);d.actor.d=d;d.stores=new SynchedEntityData[2];d.items=(SynchedEntityData.DataItem<Float>[])new SynchedEntityData.DataItem<?>[2]; + for(int s=0;s<2;s++){var items=new SynchedEntityData.DataItem<?>[healthKey.id()+1];for(int i=0;i<items.length;i++)items[i]=new SynchedEntityData.DataItem<Float>(new EntityDataAccessor<Float>(i,EntityDataSerializers.FLOAT),0f);d.items[s]=new SynchedEntityData.DataItem<Float>(healthKey,single(f.getAsJsonArray("health").get(s)));items[healthKey.id()]=d.items[s];d.stores[s]=ctor.newInstance(d.actor,items);} + entityData.set(d.actor,d.stores[0]);dead.setBoolean(d.actor,d.world().get("dead").getAsBoolean());absorption.setFloat(d.actor,single(f.get("absorption"))); + for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonObject();float v=single(op.get("value"));try{switch(op.get("mode").getAsString()){ + case "heal":d.actor.heal(v);break;case "set":d.actor.setHealth(v);break;case "base":d.actor.base(v);break;case "absorption":d.actor.setAbsorptionAmount(v);break; + case "hurt":out.println("bool "+d.actor.isHurt());break;case "dead":out.println("bool "+d.actor.isDeadOrDying());break; + case "sync":d.stores[d.active].set(healthKey,v,op.get("force").getAsBoolean());break; + case "pack":{var packed=d.stores[d.active].packDirty();out.println("packed "+(packed==null?"none":bits((Float)packed.getFirst().value())));break;} + default:throw new AssertionError();}out.println("result ok");}catch(Stop e){out.println("result error");} + for(int s=0;s<2;s++)out.println("data "+s+" "+bits(d.items[s].getValue())+" "+d.stores[s].isDirty()+" "+d.items[s].isDirty()+" "+d.items[s].isSetToDefault()); + out.println("state "+d.active+" "+bits(absorption.getFloat(d.actor))+" "+dead.getBoolean(d.actor)+" "+d.calls); + } + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingHurtOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingHurtOracle.java new file mode 100644 index 000000000..0b43ba05b --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingHurtOracle.java @@ -0,0 +1,86 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.lang.invoke.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.core.registries.*;import net.minecraft.resources.*;import net.minecraft.tags.*;import net.minecraft.world.InteractionHand;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.*;import net.minecraft.world.damagesource.*;import net.minecraft.world.effect.*;import net.minecraft.world.item.*;import net.minecraft.world.item.component.*;import net.minecraft.server.level.*;import net.minecraft.server.PlayerAdvancements;import net.minecraft.sounds.*;import net.minecraft.stats.Stats; +/** Invoke the actual LivingEntity outer hurt method, retaining virtual service hooks. */ +public final class VanillaLivingHurtOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate;static ItemStack plain,shield;static Field stamp,lastSource,noAction,cooldown,lastHurt,duration,time; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static String state(LivingEntity a){try{return noAction.getInt(a)+" "+cooldown.getInt(a)+" "+bits(lastHurt.getFloat(a))+" "+duration.getInt(a)+" "+time.getInt(a)+" "+(lastSource.get(a)!=null)+" "+stamp.getLong(a);}catch(Exception e){throw new AssertionError(e);}} + static final class Data {JsonObject op;PrintWriter out;int calls;boolean hit;float recorded;Server level;PlayerAdvancements advancements;List<MobEffectInstance> effects; + boolean flag(String n){return op.get(n).getAsBoolean();}void event(String s){out.println(s);if(calls++==op.get("fail").getAsInt())throw new Stop();}} + static final class Source extends DamageSource {Data d;Source(){super(null);} + @Override public boolean is(TagKey<DamageType> tag){String n=tag==DamageTypeTags.IS_FIRE?"fire":tag==DamageTypeTags.IS_FREEZING?"freezing":tag==DamageTypeTags.DAMAGES_HELMET?"damages_helmet":tag==DamageTypeTags.BYPASSES_COOLDOWN?"bypasses_cooldown":tag==DamageTypeTags.NO_IMPACT?"no_impact":tag==DamageTypeTags.NO_KNOCKBACK?"no_knockback":tag==DamageTypeTags.BYPASSES_INVULNERABILITY?"bypasses_invulnerability":null;if(n==null)throw new AssertionError();d.event("tag "+n);return d.flag(n);} + @Override public boolean is(ResourceKey<DamageType> k){if(k!=DamageTypes.THORNS)throw new AssertionError();d.event("thorns");return false;} + @Override public Entity getEntity(){d.event("attacker");return null;}} + static final class Server extends ServerLevel {Data d;Server(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public void broadcastDamageEvent(Entity a,DamageSource s){d.event("broadcast");}@Override public long getGameTime(){d.event("game-time");return d.op.get("game_time").getAsLong();}} + static final class Effect extends MobEffectInstance {Data d;int id;Effect(){super(MobEffects.RESISTANCE);}@Override public void onMobHurt(ServerLevel l,LivingEntity a,DamageSource s,float v){d.event("effect "+id+" "+bits(v));}} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Actor(){super(null,null);} + + Data d; + @Override public boolean isInvulnerableTo(ServerLevel l,DamageSource s){d.event("invulnerable");return d.flag("invulnerable");} + @Override public boolean isDeadOrDying(){d.event("dead");return d.flag(d.hit?"dead_after":"dead_before");} + @Override public boolean hasEffect(Holder<MobEffect> e){if(e!=MobEffects.FIRE_RESISTANCE)throw new AssertionError();d.event("fire-resistance");return d.flag("fire_resistance");} + @Override public boolean isSleeping(){d.event("sleeping");return d.flag("sleeping");} + @Override public void stopSleeping(){d.event("wake");} + @Override public ItemStack getUseItem(){d.event("use-item");return d.flag("component")?shield:ItemStack.EMPTY;} + @Override public float applyItemBlocking(ServerLevel l,DamageSource s,float v){d.event("blocking "+bits(v));return single(d.op.get("blocked"));} + @Override public boolean is(TagKey<EntityType<?>> tag){if(tag!=EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES)throw new AssertionError();d.event("freeze-extra");return d.flag("freeze_extra");} + @Override public ItemStack getItemBySlot(EquipmentSlot slot){if(slot!=EquipmentSlot.HEAD)throw new AssertionError();d.event("helmet");return d.flag("helmet")?plain:ItemStack.EMPTY;} + @Override protected void hurtHelmet(DamageSource s,float v){d.event("hurt-helmet "+bits(v));} + @Override protected void actuallyHurt(ServerLevel l,DamageSource s,float v){d.event("hurt "+bits(v)+" "+state(this));d.hit=true;d.recorded=v;if(d.flag("mutate_hit")){damageCooldownTime=d.op.get("hit_cooldown").getAsInt();lastHurt=single(d.op.get("hit_last"));hurtDuration=d.op.get("hit_duration").getAsInt();hurtTime=d.op.get("hit_time").getAsInt();}} + @Override protected void resolveMobResponsibleForDamage(DamageSource s){d.event("resolve-mob");} + @Override protected Player resolvePlayerResponsibleForDamage(DamageSource s){d.event("resolve-player");return null;} + @Override protected void markHurt(){d.event("mark");} + @Override public void dealDefaultKnockback(DamageSource s,float v,boolean b){d.event("knockback "+bits(v)+" "+b);} + @Override public ItemStack getItemInHand(InteractionHand h){d.event("hand "+h.ordinal());return ItemStack.EMPTY;} + @Override protected SoundEvent getDeathSound(){d.event("death-sound");return null;} + @Override public void makeSound(SoundEvent e){d.event("make-sound");} + @Override public void die(DamageSource s){d.event("die");} + @Override protected void playHurtSound(DamageSource s){d.event("hurt-sound");} + @Override public ServerLevel level(){d.event("level");return d.level;} + @Override public Collection<MobEffectInstance> getActiveEffects(){d.event("effects");return d.effects;} + } + static final class Human extends ServerPlayer {Human(){super(null,null,null,null);} + + Data d; + @Override public boolean isInvulnerableTo(ServerLevel l,DamageSource s){d.event("invulnerable");return d.flag("invulnerable");} + @Override public boolean isDeadOrDying(){d.event("dead");return d.flag(d.hit?"dead_after":"dead_before");} + @Override public boolean hasEffect(Holder<MobEffect> e){if(e!=MobEffects.FIRE_RESISTANCE)throw new AssertionError();d.event("fire-resistance");return d.flag("fire_resistance");} + @Override public boolean isSleeping(){d.event("sleeping");return d.flag("sleeping");} + @Override public void stopSleeping(){d.event("wake");} + @Override public ItemStack getUseItem(){d.event("use-item");return d.flag("component")?shield:ItemStack.EMPTY;} + @Override public float applyItemBlocking(ServerLevel l,DamageSource s,float v){d.event("blocking "+bits(v));return single(d.op.get("blocked"));} + @Override public boolean is(TagKey<EntityType<?>> tag){if(tag!=EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES)throw new AssertionError();d.event("freeze-extra");return d.flag("freeze_extra");} + @Override public ItemStack getItemBySlot(EquipmentSlot slot){if(slot!=EquipmentSlot.HEAD)throw new AssertionError();d.event("helmet");return d.flag("helmet")?plain:ItemStack.EMPTY;} + @Override protected void hurtHelmet(DamageSource s,float v){d.event("hurt-helmet "+bits(v));} + @Override protected void actuallyHurt(ServerLevel l,DamageSource s,float v){d.event("hurt "+bits(v)+" "+state(this));d.hit=true;d.recorded=v;if(d.flag("mutate_hit")){damageCooldownTime=d.op.get("hit_cooldown").getAsInt();lastHurt=single(d.op.get("hit_last"));hurtDuration=d.op.get("hit_duration").getAsInt();hurtTime=d.op.get("hit_time").getAsInt();}} + @Override protected void resolveMobResponsibleForDamage(DamageSource s){d.event("resolve-mob");} + @Override protected Player resolvePlayerResponsibleForDamage(DamageSource s){d.event("resolve-player");return null;} + @Override protected void markHurt(){d.event("mark");} + @Override public void dealDefaultKnockback(DamageSource s,float v,boolean b){d.event("knockback "+bits(v)+" "+b);} + @Override public ItemStack getItemInHand(InteractionHand h){d.event("hand "+h.ordinal());return ItemStack.EMPTY;} + @Override protected SoundEvent getDeathSound(){d.event("death-sound");return null;} + @Override public void makeSound(SoundEvent e){d.event("make-sound");} + @Override public void die(DamageSource s){d.event("die");} + @Override protected void playHurtSound(DamageSource s){d.event("hurt-sound");} + @Override public ServerLevel level(){d.event("level");return d.level;} + @Override public Collection<MobEffectInstance> getActiveEffects(){d.event("effects");return d.effects;} + + @Override public PlayerAdvancements getAdvancements(){d.event("criterion");return d.advancements;} + @Override public void awardStat(Identifier s,int v){if(s!=Stats.DAMAGE_BLOCKED_BY_SHIELD)throw new AssertionError();d.event("blocked-stat "+v);} + } + public static void main(String[] args)throws Throwable { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class); + noAction=field(LivingEntity.class,"noActionTime");cooldown=field(LivingEntity.class,"damageCooldownTime");lastHurt=field(LivingEntity.class,"lastHurt");duration=field(LivingEntity.class,"hurtDuration");time=field(LivingEntity.class,"hurtTime");stamp=field(LivingEntity.class,"lastDamageStamp");lastSource=field(LivingEntity.class,"lastDamageSource"); + var ctor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);ctor.setAccessible(true);plain=(ItemStack)ctor.newInstance(BuiltInRegistries.ITEM.wrapAsHolder(Items.STICK),1,new PatchedDataComponentMap(DataComponentMap.EMPTY));shield=(ItemStack)ctor.newInstance(BuiltInRegistries.ITEM.wrapAsHolder(Items.SHIELD),1,new PatchedDataComponentMap(DataComponentMap.EMPTY));shield.set(DataComponents.BLOCKS_ATTACKS,new BlocksAttacks(0,1,List.of(),new BlocksAttacks.ItemDamageFunction(0,0,0),Optional.empty(),Optional.empty(),Optional.empty())); + var lookup=MethodHandles.privateLookupIn(LivingEntity.class,MethodHandles.lookup());var hurt=lookup.findSpecial(LivingEntity.class,"hurtServer",MethodType.methodType(boolean.class,ServerLevel.class,DamageSource.class,float.class),LivingEntity.class); + Path dir=Path.of(args[1]);try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.out=out;d.level=make(Server.class);d.level.d=d;d.advancements=make(PlayerAdvancements.class);field(PlayerAdvancements.class,"activeTriggers").set(d.advancements,new HashMap<>());LivingEntity actor;if(f.get("player").getAsBoolean()){var a=make(Human.class);a.d=d;actor=a;}else{var a=make(Actor.class);a.d=d;actor=a;}var source=make(Source.class);source.d=d; + noAction.setInt(actor,f.get("no_action").getAsInt());cooldown.setInt(actor,f.get("cooldown").getAsInt());lastHurt.setFloat(actor,single(f.get("last_hurt")));duration.setInt(actor,f.get("duration").getAsInt());time.setInt(actor,f.get("time").getAsInt());stamp.setLong(actor,f.get("stamp").getAsLong());if(f.get("source").getAsBoolean())lastSource.set(actor,source); + for(var ov:f.getAsJsonArray("ops")){d.op=ov.getAsJsonObject();d.calls=0;d.hit=false;d.effects=new ArrayList<>();for(int i=0;i<d.op.get("effects").getAsInt();i++){var e=make(Effect.class);e.d=d;e.id=i;d.effects.add(e);}try{boolean result=(boolean)hurt.invokeExact(actor,(ServerLevel)d.level,(DamageSource)source,single(d.op.get("damage")));out.println("bool "+result);out.println("result ok");}catch(Stop e){out.println("result error");}out.println("state "+state(actor)+" "+bits(d.recorded)+" "+d.hit+" "+d.calls);} + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingLandingOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingLandingOracle.java new file mode 100644 index 000000000..b5f354b86 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingLandingOracle.java @@ -0,0 +1,90 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.level.gameevent.*; +import net.minecraft.world.phys.Vec3; +/** Actual LivingEntity landing wrapper with native base fall handling. */ +public final class VanillaLivingLandingOracle { + static final class Stop extends RuntimeException {} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static Optional<BlockPos> support(JsonElement value){if(value.isJsonNull())return Optional.empty();var a=value.getAsJsonArray();return Optional.of(new BlockPos(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt()));} + static Field positionField,supportField,climbableField; + static final class Data { + JsonObject input;PrintWriter out;int calls;Actor actor;boolean water;BlockState inputState; + void setPosition(Vec3 p){try{positionField.set(actor,p);}catch(ReflectiveOperationException e){throw new AssertionError(e);}} + void query(String text){out.println(text);if(calls++==input.get("fail").getAsInt())throw new Stop();} + void mutate() {if(input.get("mutate").getAsBoolean()){try{actor.fallDistance=17.25;positionField.set(actor,new Vec3(17,18,19));supportField.set(actor,support(input.get("after_support")));}catch(ReflectiveOperationException e){throw new AssertionError(e);}}} + } + static final class FallBlock extends Block { + Data d;FallBlock(){super(BlockBehaviour.Properties.of());} + @Override public void fallOn(net.minecraft.world.level.Level level,BlockState state,BlockPos p,Entity entity,double distance){d.query(String.format("fall-on %d %d %d %016x",p.getX(),p.getY(),p.getZ(),Double.doubleToLongBits(distance)));d.mutate();} + } + static final class State extends BlockState {Block block;Data d;@Override public boolean isAir(){d.query("air");return d.input.get("air").getAsBoolean();}State(){super(null,null,null);}@Override public Block getBlock(){return block;}} + static final class Level extends net.minecraft.server.level.ServerLevel { + Data d;BlockState queried; + private Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public <T extends net.minecraft.core.particles.ParticleOptions> int sendParticles(T particle,double x,double y,double z,int count,double dx,double dy,double dz,double speed){if(!(particle instanceof net.minecraft.core.particles.BlockParticleOption b)||b.getState()!=d.inputState||b.getType()!=net.minecraft.core.particles.ParticleTypes.BLOCK||dx!=0||dy!=0||dz!=0)throw new AssertionError(particle);d.query(String.format("particles %016x %016x %016x %d %016x",Double.doubleToLongBits(x),Double.doubleToLongBits(y),Double.doubleToLongBits(z),count,Double.doubleToLongBits(speed)));if(d.input.get("particle_mutate").getAsBoolean()){d.actor.fallDistance=number(d.input.get("after_fall"));d.water=!d.water;}return -1;} + @Override public BlockState getBlockState(BlockPos p){d.query("state "+p.getX()+" "+p.getY()+" "+p.getZ());return queried;} + @Override public void gameEvent(Holder<GameEvent> event,Vec3 p,GameEvent.Context context){if(event!=GameEvent.HIT_GROUND)throw new AssertionError(event);d.query(String.format("hit-ground %016x %016x %016x %s",Double.doubleToLongBits(p.x),Double.doubleToLongBits(p.y),Double.doubleToLongBits(p.z),context.affectedState()==queried?"queried":"input"));} + } + static final class ClientLevel extends net.minecraft.world.level.Level { + Data d;BlockState queried;ClientLevel(){super(null,null,null,null,false,false,0L,0);} + @Override public BlockState getBlockState(BlockPos p){d.query("state "+p.getX()+" "+p.getY()+" "+p.getZ());return queried;} + @Override public void gameEvent(Holder<GameEvent> event,Vec3 p,GameEvent.Context context){if(event!=GameEvent.HIT_GROUND)throw new AssertionError(event);d.query(String.format("hit-ground %016x %016x %016x %s",Double.doubleToLongBits(p.x),Double.doubleToLongBits(p.y),Double.doubleToLongBits(p.z),context.affectedState()==queried?"queried":"input"));} +@Override public net.minecraft.world.clock.ClockManager clockManager(){throw new UnsupportedOperationException();} +@Override public void destroyBlockProgress(int p0,net.minecraft.core.BlockPos p1,int p2){throw new UnsupportedOperationException();} +@Override public java.util.Collection dragonParts(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.flag.FeatureFlagSet enabledFeatures(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.attribute.EnvironmentAttributeSystem environmentAttributes(){throw new UnsupportedOperationException();} +@Override public void explode(net.minecraft.world.entity.Entity p0,net.minecraft.world.damagesource.DamageSource p1,net.minecraft.world.level.ExplosionDamageCalculator p2,double p3,double p4,double p5,float p6,boolean p7,net.minecraft.world.level.Level.ExplosionInteraction p8,net.minecraft.core.particles.ParticleOptions p9,net.minecraft.core.particles.ParticleOptions p10,net.minecraft.util.random.WeightedList p11,net.minecraft.core.Holder p12){throw new UnsupportedOperationException();} +@Override public java.lang.String gatherChunkSourceStats(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.ticks.LevelTickAccess getBlockTicks(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.chunk.ChunkSource getChunkSource(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.entity.LevelEntityGetter getEntities(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.entity.Entity getEntity(int p0){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.ticks.LevelTickAccess getFluidTicks(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.saveddata.maps.MapItemSavedData getMapData(net.minecraft.world.level.saveddata.maps.MapId p0){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.storage.LevelData.RespawnData getRespawnData(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.scores.Scoreboard getScoreboard(){throw new UnsupportedOperationException();} +@Override public int getSeaLevel(){throw new UnsupportedOperationException();} +@Override public net.minecraft.core.Holder getUncachedNoiseBiome(int p0,int p1,int p2){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.level.border.WorldBorder getWorldBorder(){throw new UnsupportedOperationException();} +@Override public void levelEvent(net.minecraft.world.entity.Entity p0,int p1,net.minecraft.core.BlockPos p2,int p3){throw new UnsupportedOperationException();} +@Override public void playSeededSound(net.minecraft.world.entity.Entity p0,net.minecraft.world.entity.Entity p1,net.minecraft.core.Holder p2,net.minecraft.sounds.SoundSource p3,float p4,float p5,long p6){throw new UnsupportedOperationException();} +@Override public void playSeededSound(net.minecraft.world.entity.Entity p0,double p1,double p2,double p3,net.minecraft.core.Holder p4,net.minecraft.sounds.SoundSource p5,float p6,float p7,long p8){throw new UnsupportedOperationException();} +@Override public java.util.List players(){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.item.crafting.RecipeAccess recipeAccess(){throw new UnsupportedOperationException();} +@Override public void sendBlockUpdated(net.minecraft.core.BlockPos p0,net.minecraft.world.level.block.state.BlockState p1,net.minecraft.world.level.block.state.BlockState p2,int p3){throw new UnsupportedOperationException();} +@Override public void setRespawnData(net.minecraft.world.level.storage.LevelData.RespawnData p0){throw new UnsupportedOperationException();} +@Override public net.minecraft.world.TickRateManager tickRateManager(){throw new UnsupportedOperationException();} + } + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand { + Data d;Actor(){super(null,null);}void configure(net.minecraft.world.level.Level level){setLevel(level);} + @Override public boolean isInWater(){d.query("water");return d.water;} + @Override public void resetFallDistance(){d.query("reset");super.resetFallDistance();} + @Override public boolean updateFluidInteraction(){d.query("fluid-update");d.water=d.input.get("after_water").getAsBoolean();if(d.input.get("fluid_mutate").getAsBoolean())fallDistance=number(d.input.get("after_fall"));return d.input.get("fluid_result").getAsBoolean();} + @Override protected void onChangedBlock(net.minecraft.server.level.ServerLevel level,BlockPos p){d.query("changed "+p.getX()+" "+p.getY()+" "+p.getZ());if(d.input.get("changed_mutate").getAsBoolean()){fallDistance=number(d.input.get("after_fall"));d.setPosition(new Vec3(17,18,19));}} + @Override public double getAttributeValue(Holder<net.minecraft.world.entity.ai.attributes.Attribute> attribute){if(attribute!=net.minecraft.world.entity.ai.attributes.Attributes.SAFE_FALL_DISTANCE)throw new AssertionError(attribute);d.query("safe");return number(d.input.get("safe"));} + @Override public BlockPos blockPosition(){d.query("block-position");if(d.input.get("block_mutate").getAsBoolean())d.setPosition(new Vec3(31,32,33));return support(d.input.get("block_position")).orElseThrow();} + void check(double dy,boolean ground,BlockState state,BlockPos p){checkFallDamage(dy,ground,state,p);} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var allocator=Class.forName("sun.misc.Unsafe");var field=allocator.getDeclaredField("theUnsafe");field.setAccessible(true);var unsafe=field.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class);positionField=Entity.class.getDeclaredField("position");positionField.setAccessible(true);supportField=Entity.class.getDeclaredField("mainSupportingBlockPos");supportField.setAccessible(true);climbableField=LivingEntity.class.getDeclaredField("lastClimbablePos");climbableField.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){ + for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.input=f;d.out=out;d.water=f.get("water").getAsBoolean();net.minecraft.world.level.Level level;if(f.get("server").getAsBoolean()){var l=(Level)allocate.invoke(unsafe,Level.class);l.d=d;l.queried=Blocks.STONE.defaultBlockState();level=l;}else{var l=(ClientLevel)allocate.invoke(unsafe,ClientLevel.class);l.d=d;l.queried=Blocks.STONE.defaultBlockState();level=l;}var entity=(Actor)allocate.invoke(unsafe,Actor.class);entity.d=d;d.actor=entity;entity.configure(level);entity.fallDistance=number(f.get("fall"));var xyz=f.getAsJsonArray("position");positionField.set(entity,new Vec3(number(xyz.get(0)),number(xyz.get(1)),number(xyz.get(2))));climbableField.set(entity,Optional.of(new BlockPos(7,8,9)));supportField.set(entity,support(f.get("support")));var block=(FallBlock)allocate.invoke(unsafe,FallBlock.class);block.d=d;var state=(State)allocate.invoke(unsafe,State.class);state.block=block;state.d=d;d.inputState=state; + try{entity.check(number(f.get("dy")),f.get("ground").getAsBoolean(),state,support(f.get("landing")).orElseThrow());out.println("result ok");}catch(Stop error){out.println("result error");} + var p=(Vec3)positionField.get(entity);out.printf("final %016x %016x %016x %016x%n",Double.doubleToLongBits(entity.fallDistance),Double.doubleToLongBits(p.x),Double.doubleToLongBits(p.y),Double.doubleToLongBits(p.z));var selected=(Optional<?>)supportField.get(entity);if(selected.isEmpty())out.println("support none");else{var pos=(BlockPos)selected.get();out.println("support "+pos.getX()+" "+pos.getY()+" "+pos.getZ());}out.println("climbable "+((Optional<?>)climbableField.get(entity)).isPresent()+" water "+d.water);out.println("queries "+d.calls); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingMotionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingMotionOracle.java new file mode 100644 index 000000000..1a05fa578 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingMotionOracle.java @@ -0,0 +1,42 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.ai.attributes.*;import net.minecraft.world.effect.*;import net.minecraft.world.phys.Vec3; +/** Native default living jump, gravity and flight parameter methods. */ +public final class VanillaLivingMotionOracle { + static final class Stop extends RuntimeException {} + static Field amplifier; + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static Vec3 vec(JsonElement v){var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static String vector(Vec3 v){return String.format("%016x %016x %016x",Double.doubleToLongBits(v.x),Double.doubleToLongBits(v.y),Double.doubleToLongBits(v.z));} + static final class Data {JsonObject f;PrintWriter out;int calls;Vec3 velocity;LivingEntity passenger; + void query(String s){out.println(s);int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt())velocity=vec(f.get("after_velocity"));} + boolean flag(String k){return f.get(k).getAsBoolean();}} + static final class Human extends net.minecraft.world.entity.player.Player {Human(){super(null,null);}@Override public net.minecraft.world.level.GameType gameMode(){return net.minecraft.world.level.GameType.SURVIVAL;}} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand { + Data d;Actor(){super(null,null);} + @Override public Vec3 getDeltaMovement(){return d.velocity;} + @Override public void setDeltaMovement(Vec3 v){d.query("set "+vector(v));d.velocity=v;} + @Override public double getAttributeValue(Holder<Attribute> attribute){String name=attribute==Attributes.JUMP_STRENGTH?"strength":attribute==Attributes.GRAVITY?"gravity":attribute==Attributes.AIR_DRAG_MODIFIER?"drag-modifier":null;if(name==null)throw new AssertionError(attribute);d.query(name);return number(d.f.get(name.replace('-','_')));} + @Override protected float getBlockJumpFactor(){d.query("block-factor");return single(d.f.get("block_factor"));} + @Override public boolean hasEffect(Holder<MobEffect> effect){if(effect==MobEffects.JUMP_BOOST){d.query("has-boost");return d.flag("boost");}if(effect==MobEffects.SLOW_FALLING){d.query("slow-falling");return d.flag("slow_falling");}throw new AssertionError(effect);} + @Override public MobEffectInstance getEffect(Holder<MobEffect> effect){if(effect!=MobEffects.JUMP_BOOST)throw new AssertionError(effect);d.query("get-boost");var e=new MobEffectInstance(effect,100,0);try{amplifier.setInt(e,d.f.get("amplifier").getAsInt());}catch(ReflectiveOperationException ex){throw new AssertionError(ex);}return e;} + @Override public boolean isSprinting(){d.query("sprint");return d.flag("sprint");} + @Override public float getYRot(){d.query("yaw");return single(d.f.get("yaw"));} + @Override public boolean isNoGravity(){d.query("no-gravity");return d.flag("no_gravity");} + @Override public LivingEntity getControllingPassenger(){d.query("passenger");return d.passenger;} + @Override public float getSpeed(){d.query("speed");return single(d.f.get("speed"));} + @Override protected boolean omnidirectionalAirMover(){d.query("omni");return d.flag("omni");} + } + static Method method(Class<?> c,String name,Class<?>... args)throws Exception{var m=c.getDeclaredMethod(name,args);m.setAccessible(true);return m;} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");var uf=u.getDeclaredField("theUnsafe");uf.setAccessible(true);var unsafe=uf.get(null);var allocate=u.getMethod("allocateInstance",Class.class);amplifier=MobEffectInstance.class.getDeclaredField("amplifier");amplifier.setAccessible(true); + var power=method(LivingEntity.class,"getJumpPower",float.class);var effective=method(LivingEntity.class,"getEffectiveGravity");var apply=method(Entity.class,"applyGravity");var up=method(LivingEntity.class,"jumpInLiquid",net.minecraft.tags.TagKey.class);var down=method(LivingEntity.class,"goDownInWater");var speed=method(LivingEntity.class,"getFlyingSpeed");var drag=method(LivingEntity.class,"getAirDrag");Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;d.velocity=vec(f.get("velocity"));int p=f.get("passenger").getAsInt();d.passenger=p==0?null:(LivingEntity)allocate.invoke(unsafe,p==2?Human.class:Actor.class);var entity=(Actor)allocate.invoke(unsafe,Actor.class);entity.d=d;entity.needsSync=d.flag("sync"); + try{Object result=switch(f.get("mode").getAsString()){case "boost"->entity.getJumpBoostPower();case "power"->power.invoke(entity,single(f.get("scale")));case "jump"->{entity.jumpFromGround();yield null;}case "gravity"->entity.getGravity();case "effective"->effective.invoke(entity);case "apply"->apply.invoke(entity);case "up"->up.invoke(entity,net.minecraft.tags.FluidTags.WATER);case "down"->down.invoke(entity);case "speed"->speed.invoke(entity);case "drag"->drag.invoke(entity);case "add"->{entity.addDeltaMovement(vec(f.get("delta")));yield null;}default->throw new AssertionError();};if(result instanceof Float v)out.printf("float %08x%n",Float.floatToIntBits(v));else if(result instanceof Double v)out.printf("double %016x%n",Double.doubleToLongBits(v));out.println("result ok");}catch(Stop e){out.println("result error");}catch(InvocationTargetException e){if(e.getCause() instanceof Stop)out.println("result error");else throw e;} + out.println("final "+vector(d.velocity)+" "+entity.needsSync);out.println("queries "+d.calls); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLocalInputOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLocalInputOracle.java new file mode 100644 index 000000000..229abcd70 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLocalInputOracle.java @@ -0,0 +1,54 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import net.minecraft.client.*; +import net.minecraft.client.player.*; +import net.minecraft.core.Holder; +import net.minecraft.core.component.DataComponents; +import net.minecraft.core.component.DataComponentMap; +import net.minecraft.core.component.PatchedDataComponentMap; +import net.minecraft.world.entity.ai.attributes.*; +import net.minecraft.world.entity.player.Input; +import net.minecraft.world.item.*; +import net.minecraft.world.item.component.UseEffects; +import net.minecraft.world.phys.Vec2; + +/** Calls real KeyboardInput.tick and private LocalPlayer.modifyInput. */ +public final class VanillaLocalInputOracle { + static Object unsafe;static Method allocate;static Constructor<ItemStack> stackConstructor; + static <T>T make(Class<T> type)throws Exception{return type.cast(allocate.invoke(unsafe,type));} + static Field field(Class<?> type,String name)throws Exception{var f=type.getDeclaredField(name);f.setAccessible(true);return f;} + static float number(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static final class Actor extends LocalPlayer { + boolean using,riding,slow;float sneak; + Actor(){super(null,null,null,null,null,Input.EMPTY,false,null,null);} + @Override public boolean isUsingItem(){return using;} + @Override public boolean isPassenger(){return riding;} + @Override public boolean isMovingSlowly(){return slow;} + @Override public double getAttributeValue(Holder<Attribute> attribute){if(attribute!=Attributes.SNEAKING_SPEED)throw new AssertionError(attribute);return sneak;} + void item(float speed)throws Exception{useItem=stackConstructor.newInstance(Holder.direct(Items.STONE),1,new PatchedDataComponentMap(DataComponentMap.EMPTY));useItem.set(DataComponents.USE_EFFECTS,new UseEffects(false,false,speed));} + } + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class); + stackConstructor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);stackConstructor.setAccessible(true); + var options=make(Options.class);String[] names={"keyUp","keyDown","keyLeft","keyRight","keyJump","keyShift","keySprint"}; + var keys=new KeyMapping[names.length];var down=field(KeyMapping.class,"isDown"); + for(int i=0;i<names.length;i++){keys[i]=make(KeyMapping.class);field(Options.class,names[i]).set(options,keys[i]);} + var keyboard=new KeyboardInput(options);var actor=make(Actor.class); + var modify=LocalPlayer.class.getDeclaredMethod("modifyInput",Vec2.class);modify.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(Path.of(args[1])));var lines=Files.lines(Path.of(args[0]))){ + for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();int mask=f.get("keys").getAsInt(); + for(int i=0;i<keys.length;i++)down.setBoolean(keys[i],(mask&(1<<i))!=0); + keyboard.tick();var direction=keyboard.getMoveVector(); + Vec2 vector=direction;if(f.has("vector")){var v=f.getAsJsonArray("vector");vector=new Vec2(number(v.get(0)),number(v.get(1)));} + actor.using=f.get("using").getAsBoolean();actor.riding=f.get("riding").getAsBoolean();actor.slow=f.get("slow").getAsBoolean();actor.sneak=number(f.get("sneak"));actor.item(number(f.get("item"))); + var result=(Vec2)modify.invoke(actor,vector); + out.printf("%08x %08x %08x %08x%n",Float.floatToIntBits(direction.x),Float.floatToIntBits(direction.y),Float.floatToIntBits(result.x),Float.floatToIntBits(result.y)); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialConditionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialConditionOracle.java new file mode 100644 index 000000000..d5efa48bc --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialConditionOracle.java @@ -0,0 +1,251 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.*; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import java.util.function.Function; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.resources.*; +import net.minecraft.tags.*; +import net.minecraft.world.level.biome.Biome; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.densityfunction.*; +import net.minecraft.world.level.levelgen.material.*; +import net.minecraft.world.level.levelgen.material.condition.*; +import net.minecraft.world.level.levelgen.material.rule.*; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.levelgen.placement.CaveSurface; +import net.minecraft.world.level.levelgen.synth.*; + +/** Original transport for explicitly constructed material conditions and caches. */ +public final class VanillaMaterialConditionOracle { + private static MappedRegistry<NormalNoise> noises; + private static MappedRegistry<MaterialCondition> definitions; + private static MappedRegistry<Biome> biomes; + private static RegistryOps<JsonElement> ops; + private static MappedRegistry<DensityFunction> densities; + private static HolderGetter<DensityFunction> densityLookup; + private static MappedRegistry<MaterialRule> ruleDefinitions; + private static HolderGetter<MaterialRule> ruleLookup; + private static JsonElement canonical(JsonElement value) { + if(value.isJsonObject()) {var result=new JsonObject();for(var e:new TreeMap<>(value.getAsJsonObject().asMap()).entrySet())result.add(e.getKey(),canonical(e.getValue()));return result;} + if(value.isJsonArray()){var result=new JsonArray();for(var e:value.getAsJsonArray())result.add(canonical(e));return result;} + if(value.isJsonPrimitive() && value.getAsJsonPrimitive().isNumber())return new JsonPrimitive("number:"+Long.toUnsignedString(Double.doubleToLongBits(value.getAsDouble()),16)); + return value; + } + private static String encode(MaterialCondition value) {return MaterialCondition.CODEC.encodeStart(ops,value).result().map(v->canonical(v).toString()).orElse("error");} + @SuppressWarnings("unchecked") + private static RegistryOps<JsonElement> conditionOps(HolderGetter<MaterialCondition> lookup) { + return RegistryOps.create(JsonOps.INSTANCE,new RegistryOps.RegistryInfoLookup(){ + public <T> Optional<HolderGetter<T>> lookup(ResourceKey<? extends Registry<? extends T>> key){ + if(key.equals(Registries.NOISE))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(noises); + if(key.equals(Registries.DENSITY_FUNCTION))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.ofNullable(densityLookup); + if(key.equals(Registries.MATERIAL_RULE))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.ofNullable(ruleLookup); + if(key.equals(Registries.BIOME))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(biomes); + if(key.equals(Registries.MATERIAL_CONDITION))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(lookup); + return Optional.empty(); + } + }); + } + private static void loadBiomes(Path dir) throws Exception { + biomes=new MappedRegistry<>(Registries.BIOME,Lifecycle.stable()); + var climate=VanillaBiomeTemperatureOracle.class.getDeclaredMethod("climate",JsonObject.class);climate.setAccessible(true); + var make=VanillaBiomeTemperatureOracle.class.getDeclaredMethod("make",Object.class);make.setAccessible(true); + var definitions=JsonParser.parseString(Files.readString(dir.resolve("biomes.json"))).getAsJsonObject(); + for(var e:definitions.entrySet()) { + var f=new JsonObject();f.addProperty("json",e.getValue().getAsString()); + var biome=(Biome)make.invoke(null,climate.invoke(null,f)); + biomes.register(ResourceKey.create(Registries.BIOME,Identifier.parse(e.getKey())),biome,RegistrationInfo.BUILT_IN); + } + biomes.freeze(); + var tagResources=JsonParser.parseString(Files.readString(dir.resolve("biome_tags.json"))).getAsJsonObject(); + var loader=new TagLoader<Holder<Biome>>((id,required)->biomes.get(id).map(value->(Holder<Biome>)value),"tags/worldgen/biome"); + var tags=new HashMap<Identifier,List<TagLoader.EntryWithSource>>(); + for(var e:tagResources.entrySet()) { + var file=TagFile.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(e.getValue().getAsString())).getOrThrow(); + var entries=new ArrayList<TagLoader.EntryWithSource>();for(var entry:file.entries())entries.add(new TagLoader.EntryWithSource(entry,"vanilla")); + tags.put(Identifier.parse(e.getKey()),entries); + } + var resolved=new HashMap<TagKey<Biome>,List<Holder<Biome>>>(); + loader.build(tags).forEach((id,values)->resolved.put(TagKey.create(Registries.BIOME,id),List.copyOf(values))); + if(resolved.size()!=tagResources.size())throw new AssertionError("unresolved biome tags"); + biomes.prepareTagReload(new TagLoader.LoadResult<>(Registries.BIOME,resolved)).apply(); + } + private static Holder<Biome> biome(String name) {return biomes.getOrThrow(ResourceKey.create(Registries.BIOME,Identifier.parse(name)));} + private static String test(ConditionEvaluator condition) {try{return Boolean.toString(condition.test());}catch(RuntimeException error){return "error";}} + private static void loadConditions(Path dir) throws Exception { + definitions=new MappedRegistry<>(Registries.MATERIAL_CONDITION,Lifecycle.stable()); + ops=conditionOps(definitions.createRegistrationLookup()); + var data=JsonParser.parseString(Files.readString(dir.resolve("conditions.json"))).getAsJsonObject(); + for(var e:new TreeMap<>(data.asMap()).entrySet())definitions.register(ResourceKey.create(Registries.MATERIAL_CONDITION,Identifier.parse(e.getKey())),MaterialCondition.DIRECT_CODEC.parse(ops,JsonParser.parseString(e.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN); + definitions.freeze();ops=conditionOps(definitions); + } + private static void loadRules(Path dir) throws Exception { + if(!Files.exists(dir.resolve("rules.json")))return; + densities=new MappedRegistry<>(Registries.DENSITY_FUNCTION,Lifecycle.stable());densityLookup=densities.createRegistrationLookup(); + var densityJson=JsonParser.parseString(Files.readString(dir.resolve("densities.json"))).getAsJsonObject(); + for(var e:new TreeMap<>(densityJson.asMap()).entrySet())densities.register(ResourceKey.create(Registries.DENSITY_FUNCTION,Identifier.parse(e.getKey())),DensityFunctions.DIRECT_CODEC.parse(ops,JsonParser.parseString(e.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN); + densities.freeze();densityLookup=densities; + ruleDefinitions=new MappedRegistry<>(Registries.MATERIAL_RULE,Lifecycle.stable());ruleLookup=ruleDefinitions.createRegistrationLookup(); + var data=JsonParser.parseString(Files.readString(dir.resolve("rules.json"))).getAsJsonObject(); + for(var e:new TreeMap<>(data.asMap()).entrySet())ruleDefinitions.register(ResourceKey.create(Registries.MATERIAL_RULE,Identifier.parse(e.getKey())),MaterialRule.DIRECT_CODEC.parse(ops,JsonParser.parseString(e.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN); + ruleDefinitions.freeze();ruleLookup=ruleDefinitions; + } + private static VerticalAnchor anchor(JsonElement e) { + var a=e.getAsJsonArray();int v=a.get(1).getAsInt(); + return switch(a.get(0).getAsInt()) {case 0->VerticalAnchor.absolute(v);case 1->VerticalAnchor.aboveBottom(v);case 2->VerticalAnchor.belowTop(v);case 3->VerticalAnchor.relativeToSeaLevel(v);default->throw new AssertionError();}; + } + private static MaterialCondition condition(JsonElement e) { + var a=e.getAsJsonArray();return switch(a.get(0).getAsString()) { + case "temperature"->TemperatureCondition.INSTANCE; + case "above"->AbovePreliminarySurfaceCondition.INSTANCE; + case "biome"->{var selected=new ArrayList<Holder<Biome>>();for(var name:a.get(1).getAsJsonArray())selected.add(biome(name.getAsString()));yield new BiomeCondition(HolderSet.direct(selected));} + case "noise"->new NoiseThresholdCondition(ResourceKey.create(Registries.NOISE,Identifier.parse(a.get(1).getAsString())),Double.longBitsToDouble(Long.parseUnsignedLong(a.get(2).getAsString(),16)),Double.longBitsToDouble(Long.parseUnsignedLong(a.get(3).getAsString(),16)),a.get(4).getAsBoolean()); + case "json"->MaterialCondition.CODEC.parse(ops,JsonParser.parseString(a.get(1).getAsString())).getOrThrow(); + case "hole"->HoleCondition.INSTANCE; + case "steep"->SteepCondition.INSTANCE; + case "y"->new YCondition(anchor(a.get(1)),a.get(2).getAsInt(),a.get(3).getAsBoolean()); + case "water"->new WaterCondition(a.get(1).getAsInt(),a.get(2).getAsInt(),a.get(3).getAsBoolean()); + case "stone"->new StoneDepthCondition(a.get(1).getAsInt(),a.get(2).getAsBoolean(),a.get(3).getAsInt(),a.get(4).getAsBoolean()?CaveSurface.CEILING:CaveSurface.FLOOR); + case "gradient"->new VerticalGradientCondition(Identifier.parse(a.get(1).getAsString()),anchor(a.get(2)),anchor(a.get(3))); + case "not"->new NotCondition(condition(a.get(1))); + default->throw new AssertionError("unknown condition "+a); + }; + } + private static BlockState[] BLOCKS; + private static DensityFunction[] oreFunctions; + private static int label(BlockState state){if(ruleDefinitions!=null)return net.minecraft.world.level.block.Block.getId(state);for(int i=0;i<BLOCKS.length;i++)if(state==BLOCKS[i])return i;throw new AssertionError("unexpected rule result "+state);} + private static MaterialRule rule(JsonElement value) { + var a=value.getAsJsonArray();return switch(a.get(0).getAsString()){ + case "block"->new BlockRule(BLOCKS[a.get(1).getAsInt()]); + case "band"->BandlandsRule.INSTANCE; + case "ore"->new OreVeinRule(BLOCKS[7],BLOCKS[8],BLOCKS[9],Float.intBitsToFloat(Integer.parseUnsignedInt(a.get(1).getAsString(),16)),oreFunctions[0],oreFunctions[1],oreFunctions[2]); + case "if"->new ConditionRule(condition(a.get(1)),rule(a.get(2))); + case "sequence"->{var rules=new ArrayList<MaterialRule>();for(var child:a.get(1).getAsJsonArray())rules.add(rule(child));yield new SequenceRule(rules);} + default->throw new AssertionError("unknown rule "+a); + }; + } + @SuppressWarnings("unchecked") + private static void fixture(JsonObject f,PrintWriter out) throws Exception { + long seed=f.get("seed").getAsLong();boolean legacy=f.get("legacy").getAsBoolean(); + var zero=DensityFunctions.zero();var router=new NoiseRouter(zero,zero,zero,zero,zero,zero,zero,zero); + var random=RandomState.create(noises,seed,legacy,Blocks.STONE.defaultBlockState(),63,router);var system=random.surfaceSystem(); + int[] depth={0};float[] secondary={0}; + if(!f.has("real_noise")||!f.get("real_noise").getAsBoolean()) { + var noiseField=RandomState.class.getDeclaredField("noiseInstances");noiseField.setAccessible(true); + var noiseCache=(Map<ResourceKey<NormalNoise>,Noise>)noiseField.get(random); + for(var key:noises.registryKeySet())noiseCache.put(key,new Noise(){ + public net.minecraft.util.Interval range(){return net.minecraft.util.Interval.INFINITE;} + public float get(double x,double z){throw new AssertionError("unexpected 2D noise call");} + public float get(double x,double y,double z){out.println("noise query "+key.identifier()+" "+(int)x+" "+(int)y+" "+(int)z);return secondary[0];} + }); + } + Noise noise=new Noise() { + public net.minecraft.util.Interval range(){return net.minecraft.util.Interval.INFINITE;} + public float get(double x,double z){throw new AssertionError("unexpected 2D lookup");} + public float get(double x,double y,double z){if(y!=0)throw new AssertionError("unexpected secondary Y");out.println("secondary query "+(int)x+" "+(int)z);return secondary[0];} + }; + var secondaryField=MaterialSystem.class.getDeclaredField("surfaceSecondaryNoise");secondaryField.setAccessible(true);secondaryField.set(system,noise); + var getContext=VanillaAnchorOracle.class.getDeclaredMethod("context",JsonObject.class);getContext.setAccessible(true); + var generation=(WorldGenerationContext)getContext.invoke(null,f); + var ctor=MaterialRuleContext.class.getDeclaredConstructors()[0];ctor.setAccessible(true); + String[] currentBiome={"minecraft:plains"}; + Function<BlockPos,Holder<Biome>> biomeGetter=pos->{ + out.println("biome query "+pos.getX()+" "+pos.getY()+" "+pos.getZ()); + if(currentBiome[0]==null)return null; + if(currentBiome[0].equals("#throw"))throw new IllegalStateException("fixture biome lookup failure"); + return biome(currentBiome[0]); + }; + Set<Holder<Biome>> possible=null; + if(f.has("possible_biomes")&&!f.get("possible_biomes").isJsonNull()){possible=new HashSet<>();for(var name:f.getAsJsonArray("possible_biomes"))possible.add(biome(name.getAsString()));} + float[] density={0}; int[] remaining={-1}; + DensitySampler sampler=new DensitySampler(){ + public float sampleValue(SamplerContext c,int x,int y,int z){ + out.println("density query "+x+" "+y+" "+z); + if(remaining[0]==0)throw new IllegalStateException("fixture density failure"); + if(remaining[0]>0)remaining[0]--; + return density[0]; + } + public void sampleVolume(SamplerContext c,DensityBuffer b,DensityVolume v){ + out.println("density volume "+v.sizeX()+" "+v.sizeY()+" "+v.sizeZ()+" "+v.minBlockX()+" "+v.minBlockY()+" "+v.minBlockZ()+" "+v.stepBlockX()+" "+v.stepBlockY()+" "+v.stepBlockZ()); + DensitySampler.sampleVolumeNaive(c,b,v,this); + } + }; + oreFunctions=new DensityFunction[]{DensityFunctions.constant(12345),DensityFunctions.constant(12346),DensityFunctions.constant(12347)}; + float[] oreValues={1,1,-1};int[] oreRemaining={-1,-1,-1}; + if(f.has("ore_values"))for(int i=0;i<3;i++)oreValues[i]=Float.intBitsToFloat(Integer.parseUnsignedInt(f.getAsJsonArray("ore_values").get(i).getAsString(),16)); + var oreSamplers=new DensitySampler[3]; + for(int id=0;id<3;id++) {final int channel=id;oreSamplers[id]=new DensitySampler(){ + public float sampleValue(SamplerContext c,int x,int y,int z){ + out.println("ore "+channel+" query "+x+" "+y+" "+z); + if(oreRemaining[channel]==0)throw new IllegalStateException("fixture ore density failure"); + if(oreRemaining[channel]>0)oreRemaining[channel]--; + return oreValues[channel]; + } + public void sampleVolume(SamplerContext c,DensityBuffer b,DensityVolume v){ + out.println("ore "+channel+" volume "+v.sizeX()+" "+v.sizeY()+" "+v.sizeZ()+" "+v.minBlockX()+" "+v.minBlockY()+" "+v.minBlockZ()+" "+v.stepBlockX()+" "+v.stepBlockY()+" "+v.stepBlockZ()); + DensitySampler.sampleVolumeNaive(c,b,v,this); + } + };} + DensitySamplerSet densitySamplers=function->{ + if(function==system.preliminarySurfaceFunction())return sampler.bind(SamplerContext.EMPTY_UNCACHED); + for(int i=0;i<3;i++)if(function==oreFunctions[i])return oreSamplers[i].bind(SamplerContext.EMPTY_UNCACHED); + throw new AssertionError("unexpected density function"); + }; + if(ruleDefinitions!=null) { + densitySamplers=random.samplersWithContext(SamplerContext.builder().enableCaches().useBufferArena(DensityBufferArena.GLOBAL).build()); + if(f.has("library_json"))for(var value:f.getAsJsonArray("library_json"))out.println("rule decode "+(MaterialRule.DIRECT_CODEC.parse(ops,JsonParser.parseString(value.getAsString())).result().isPresent()?"ok":"error")); + } + int[] dims={16,1,16,0,0,0,1,1,1};if(f.has("volume"))for(int i=0;i<9;i++)dims[i]=f.getAsJsonArray("volume").get(i).getAsInt(); + var expected=new DensityVolume(dims[0],dims[1],dims[2],dims[3],dims[4],dims[5],dims[6],dims[7],dims[8]); + var context=(MaterialRuleContext)ctor.newInstance(system,random,expected,densitySamplers,biomeGetter,generation,possible); + var updateXZ=MaterialRuleContext.class.getDeclaredMethod("updateXZ",int.class,int.class,int.class,int.class);updateXZ.setAccessible(true); + var updateY=MaterialRuleContext.class.getDeclaredMethod("updateY",int.class,int.class,int.class,int.class);updateY.setAccessible(true); + var depthField=MaterialRuleContext.class.getDeclaredField("surfaceDepth");depthField.setAccessible(true); + var conditions=new ArrayList<ConditionEvaluator>(); + for(var c:f.getAsJsonArray("conditions")) {var value=condition(c);out.println("runtime "+encode(value));conditions.add(value.compile(context));} + if(f.has("json"))for(var c:f.getAsJsonArray("json")) { + var value=MaterialCondition.CODEC.parse(ops,JsonParser.parseString(c.getAsString())).result(); + if(value.isEmpty())out.println("decode error");else {out.println("decode "+encode(value.get()));try{conditions.add(value.get().compile(context));}catch(IllegalStateException|NoSuchElementException error){out.println("compile error");}} + } + var rules=new ArrayList<RuleEvaluator>(); + if(f.has("rules"))for(var r:f.getAsJsonArray("rules"))rules.add(rule(r).compile(context)); + if(ruleDefinitions!=null)for(var name:f.getAsJsonArray("library_rules"))rules.add(ruleDefinitions.getValue(Identifier.parse(name.getAsString())).compile(context)); + for(var item:f.getAsJsonArray("ops")) { + var op=item.getAsJsonArray();switch(op.get(0).getAsString()) { + case "ore_input"->{int channel=op.get(1).getAsInt();oreValues[channel]=Float.intBitsToFloat(Integer.parseUnsignedInt(op.get(2).getAsString(),16));oreRemaining[channel]=op.get(3).getAsInt();} + case "density"->{density[0]=Float.intBitsToFloat(Integer.parseUnsignedInt(op.get(1).getAsString(),16));remaining[0]=op.get(2).getAsInt();} + case "minimum"->{try{out.println("minimum "+context.getMinSurfaceLevel());}catch(RuntimeException error){out.println("minimum error");}} + case "biome"->currentBiome[0]=op.get(1).isJsonNull()?null:op.get(1).getAsString(); + case "rule"->{try{rules.add(rule(op.get(1)).compile(context));out.println("rule added "+(rules.size()-1));}catch(RuntimeException error){out.println("rule compile error");}} + case "apply"->{for(int i=0;i<rules.size();i++){ + try{var value=rules.get(i).tryApply(op.get(1).getAsInt(),op.get(2).getAsInt(),op.get(3).getAsInt());out.println("rule "+i+" "+(value==null?"none":Integer.toString(label(value))));} + catch(RuntimeException error){out.println("rule "+i+" error");} + }} + case "input"->{depth[0]=op.get(1).getAsInt();secondary[0]=Float.intBitsToFloat(Integer.parseUnsignedInt(op.get(2).getAsString(),16));} + case "xz"->{updateXZ.invoke(context,op.get(1).getAsInt(),op.get(2).getAsInt(),op.get(3).getAsInt(),op.get(4).getAsInt());depthField.setInt(context,depth[0]);} + case "y"->updateY.invoke(context,op.get(1).getAsInt(),op.get(2).getAsInt(),op.get(3).getAsInt(),op.get(4).getAsInt()); + case "add"->{conditions.add(condition(op.get(1)).compile(context));out.println("added "+(conditions.size()-1));} + case "eval"->{if(op.size()==1){for(int i=0;i<conditions.size();i++)out.println("eval "+i+" "+test(conditions.get(i)));}else{for(var i:op.get(1).getAsJsonArray())out.println("eval "+i.getAsInt()+" "+test(conditions.get(i.getAsInt())));}} + case "secondary"->out.println("secondary "+Long.toUnsignedString(Double.doubleToLongBits(context.getSurfaceSecondary()),16)); + default->throw new AssertionError("unknown operation "+op); + } + } + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + BLOCKS=Arrays.stream(new String[]{"terracotta","orange_terracotta","yellow_terracotta","brown_terracotta","red_terracotta","white_terracotta","light_gray_terracotta","stone","air","water"}).map(name->BuiltInRegistries.BLOCK.getValue(Identifier.withDefaultNamespace(name)).defaultBlockState()).toArray(BlockState[]::new); + Path dir=Path.of(args[1]);noises=new MappedRegistry<>(Registries.NOISE,Lifecycle.stable()); + var noiseDefinitions=JsonParser.parseString(Files.readString(dir.resolve("noises.json"))).getAsJsonObject(); + for(var e:noiseDefinitions.entrySet())noises.register(ResourceKey.create(Registries.NOISE,Identifier.parse(e.getKey())),NormalNoise.DIRECT_CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(e.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN); + noises.freeze();loadBiomes(dir);loadConditions(dir);loadRules(dir); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var name:definitions.keySet().stream().map(Object::toString).sorted().toList())out.println("registry "+name+" "+encode(definitions.getValue(Identifier.parse(name)))); + for(String line:Files.readAllLines(dir.resolve("inputs.txt")))fixture(JsonParser.parseString(line).getAsJsonObject(),out); + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialExtensionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialExtensionOracle.java new file mode 100644 index 000000000..2204fa6e0 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialExtensionOracle.java @@ -0,0 +1,67 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.*; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.lang.reflect.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.resources.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.biome.Biome; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.chunk.BlockColumn; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.densityfunction.DensityFunctions; +import net.minecraft.world.level.levelgen.material.MaterialSystem; +import net.minecraft.world.level.levelgen.synth.*; + +/** Original transport invoking the actual private column extension methods. */ +public final class VanillaMaterialExtensionOracle { + private static final String[] NAMES={"badlands_surface","badlands_pillar","badlands_pillar_roof","iceberg_surface","iceberg_pillar","iceberg_pillar_roof"}; + private static final String[] FIELDS={"badlandsSurfaceNoise","badlandsPillarNoise","badlandsPillarRoofNoise","icebergSurfaceNoise","icebergPillarNoise","icebergPillarRoofNoise"}; + private static MappedRegistry<NormalNoise> noises; + private static JsonObject biomes; + private static BlockState[] states; + private static Method badlands,frozen,climate,make; + private static int label(BlockState state){for(int i=0;i<states.length;i++)if(states[i]==state)return i;throw new AssertionError("unexpected state "+state);} + private static void fixture(JsonObject f,PrintWriter out) throws Exception { + var zero=DensityFunctions.zero();var router=new NoiseRouter(zero,zero,zero,zero,zero,zero,zero,zero); + var system=RandomState.create(noises,f.get("seed").getAsLong(),f.get("legacy").getAsBoolean(),states[f.get("default").getAsInt()],f.get("sea").getAsInt(),router).surfaceSystem(); + for(int i=0;i<6;i++) { + var field=MaterialSystem.class.getDeclaredField(FIELDS[i]);field.setAccessible(true);var real=(Noise)field.get(system);final int index=i; + field.set(system,new Noise(){ + public net.minecraft.util.Interval range(){return net.minecraft.util.Interval.INFINITE;} + public float get(double x,double z){throw new AssertionError("unexpected 2D query");} + public float get(double x,double y,double z){out.println("noise "+NAMES[index]+" "+Long.toUnsignedString(Double.doubleToLongBits(x),16)+" "+Long.toUnsignedString(Double.doubleToLongBits(y),16)+" "+Long.toUnsignedString(Double.doubleToLongBits(z),16));return f.has("noise_bits")?Float.intBitsToFloat(Integer.parseUnsignedInt(f.getAsJsonArray("noise_bits").get(index).getAsString(),16)):real.get(x,y,z);} + }); + } + var climateInput=new JsonObject();climateInput.add("json",biomes.get(f.get("biome").getAsString()));var biome=(Biome)make.invoke(null,climate.invoke(null,climateInput)); + int min=f.get("min").getAsInt();var values=new BlockState[f.getAsJsonArray("initial").size()];for(int i=0;i<values.length;i++)values[i]=states[f.getAsJsonArray("initial").get(i).getAsInt()]; + int[] remaining={0}; + BlockColumn column=new BlockColumn(){ + public BlockState getBlock(int y){if(remaining[0]==0){out.println("read error "+y);throw new IllegalStateException("fixture read limit");}remaining[0]--;long i=(long)y-min;var state=i>=0 && i<values.length?values[(int)i]:states[2];out.println("read "+y+" "+label(state));return state;} + public void setBlock(int y,BlockState state){out.println("write "+y+" "+label(state));long i=(long)y-min;if(i>=0 && i<values.length)values[(int)i]=state;} + }; + for(var value:f.getAsJsonArray("ops")) { + var op=value.getAsJsonArray();remaining[0]=f.get("limit").getAsInt();int x=op.get(1).getAsInt(),z=op.get(2).getAsInt(),surface=op.get(3).getAsInt(),minimum=op.get(4).getAsInt(); + try{if(op.get(0).getAsString().equals("badlands"))badlands.invoke(system,column,x,z,surface,LevelHeightAccessor.create(minimum,values.length));else frozen.invoke(system,minimum,biome,column,new BlockPos.MutableBlockPos(),x,z,surface);out.println("result ok");} + catch(InvocationTargetException error){if(!(error.getCause() instanceof RuntimeException))throw error;out.println("result error");} + out.print("column");for(var state:values)out.print(" "+label(state));out.println(); + } + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + String[] descriptors={"\"minecraft:air\"","\"minecraft:cave_air\"","\"minecraft:void_air\"","\"minecraft:stone\"","\"minecraft:water\"","{\"id\":\"minecraft:water\",\"properties\":{\"level\":\"5\"}}","\"minecraft:snow_block\"","\"minecraft:packed_ice\"","\"minecraft:oak_log\"","{\"id\":\"minecraft:oak_log\",\"properties\":{\"axis\":\"x\"}}","{\"id\":\"minecraft:oak_stairs\",\"properties\":{\"waterlogged\":\"true\"}}","\"minecraft:dirt\"","\"minecraft:lava\""}; + states=Arrays.stream(descriptors).map(text->BlockState.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(text)).getOrThrow()).toArray(BlockState[]::new); + noises=new MappedRegistry<>(Registries.NOISE,Lifecycle.stable());var definitions=JsonParser.parseString(Files.readString(dir.resolve("noises.json"))).getAsJsonObject(); + for(var e:definitions.entrySet())noises.register(ResourceKey.create(Registries.NOISE,Identifier.parse(e.getKey())),NormalNoise.DIRECT_CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(e.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN);noises.freeze(); + biomes=JsonParser.parseString(Files.readString(dir.resolve("biomes.json"))).getAsJsonObject(); + badlands=MaterialSystem.class.getDeclaredMethod("erodedBadlandsExtension",BlockColumn.class,int.class,int.class,int.class,LevelHeightAccessor.class);badlands.setAccessible(true); + frozen=MaterialSystem.class.getDeclaredMethod("frozenOceanExtension",int.class,Biome.class,BlockColumn.class,BlockPos.MutableBlockPos.class,int.class,int.class,int.class);frozen.setAccessible(true); + climate=VanillaBiomeTemperatureOracle.class.getDeclaredMethod("climate",JsonObject.class);climate.setAccessible(true);make=VanillaBiomeTemperatureOracle.class.getDeclaredMethod("make",Object.class);make.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))){for(var line:Files.readAllLines(dir.resolve("inputs.txt")))fixture(JsonParser.parseString(line).getAsJsonObject(),out);} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialStageOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialStageOracle.java new file mode 100644 index 000000000..8a2e81a71 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialStageOracle.java @@ -0,0 +1,181 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.*; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.lang.reflect.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.resources.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.level.block.state.properties.IntegerProperty; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.level.chunk.status.ChunkStatus; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.blending.Blender; +import net.minecraft.world.level.levelgen.densityfunction.*; +import net.minecraft.world.level.levelgen.material.rule.MaterialRule; +import net.minecraft.world.level.levelgen.synth.NormalNoise; + +/** Original transport calling the actual MaterialSystem.buildSurface on ProtoChunk. */ +public final class VanillaMaterialStageOracle { + private static MappedRegistry<NormalNoise> noises; + private static MappedRegistry<Biome> biomes; + private static RegistryOps<JsonElement> ops; + private static PalettedContainerFactory factory; + private static Object field(String name) throws Exception {var f=VanillaMaterialConditionOracle.class.getDeclaredField(name);f.setAccessible(true);return f.get(null);} + @SuppressWarnings("unchecked") + private static void load(Path dir) throws Exception { + noises=new MappedRegistry<>(Registries.NOISE,Lifecycle.stable()); + var data=JsonParser.parseString(Files.readString(dir.resolve("noises.json"))).getAsJsonObject(); + for(var e:data.entrySet())noises.register(ResourceKey.create(Registries.NOISE,Identifier.parse(e.getKey())),NormalNoise.DIRECT_CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(e.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN);noises.freeze(); + var field=VanillaMaterialConditionOracle.class.getDeclaredField("noises");field.setAccessible(true);field.set(null,noises); + for(var name:new String[]{"loadBiomes","loadConditions","loadRules"}){var method=VanillaMaterialConditionOracle.class.getDeclaredMethod(name,Path.class);method.setAccessible(true);method.invoke(null,dir);} + biomes=(MappedRegistry<Biome>)field("biomes");ops=(RegistryOps<JsonElement>)field("ops"); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("block_tags.json"))).getAsJsonObject()); + var ids=new IdMapper<Holder<Biome>>();for(var id:biomes.keySet())ids.add(biome(id.toString())); + factory=new PalettedContainerFactory(Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY),Blocks.AIR.defaultBlockState(),null,Strategy.createForBiomes(ids),biome("minecraft:plains"),null); + var carvers=new MappedRegistry<net.minecraft.world.level.levelgen.carver.WorldCarver>(Registries.CARVER,Lifecycle.stable()); + var carverJson=JsonParser.parseString(Files.readString(dir.resolve("carvers.json"))).getAsJsonObject(); + for(var e:carverJson.entrySet())carvers.register(ResourceKey.create(Registries.CARVER,Identifier.parse(e.getKey())),net.minecraft.world.level.levelgen.carver.WorldCarver.DIRECT_CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(e.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN);carvers.freeze(); + var carverOps=RegistryOps.create(JsonOps.INSTANCE,new RegistryOps.RegistryInfoLookup(){public <T> Optional<HolderGetter<T>> lookup(ResourceKey<? extends Registry<? extends T>> key){if(key.equals(Registries.CARVER))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(carvers);return Optional.empty();}}); + var generationField=Biome.class.getDeclaredField("generationSettings");generationField.setAccessible(true);var biomeJson=JsonParser.parseString(Files.readString(dir.resolve("biomes.json"))).getAsJsonObject(); + for(var e:biomeJson.entrySet()) { + var config=new JsonObject();config.add("carvers",JsonParser.parseString(e.getValue().getAsString()).getAsJsonObject().get("carvers"));config.add("features",new JsonArray()); + generationField.set(biome(e.getKey()).value(),BiomeGenerationSettings.CODEC.codec().parse(carverOps,config).getOrThrow()); + } + } + @SuppressWarnings("unchecked") + private static RegistryOps<JsonElement> biomeOps() { + var presets=new MappedRegistry<MultiNoiseBiomeSourceParameterList>(Registries.MULTI_NOISE_BIOME_SOURCE_PARAMETER_LIST,Lifecycle.stable()); + for(var preset:List.of(MultiNoiseBiomeSourceParameterList.Preset.OVERWORLD,MultiNoiseBiomeSourceParameterList.Preset.NETHER))presets.register(ResourceKey.create(Registries.MULTI_NOISE_BIOME_SOURCE_PARAMETER_LIST,preset.id()),new MultiNoiseBiomeSourceParameterList(preset,biomes),RegistrationInfo.BUILT_IN);presets.freeze(); + return RegistryOps.create(JsonOps.INSTANCE,new RegistryOps.RegistryInfoLookup(){public <T> Optional<HolderGetter<T>> lookup(ResourceKey<? extends Registry<? extends T>> key){ + if(key.equals(Registries.BIOME))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(biomes); + if(key.equals(Registries.MULTI_NOISE_BIOME_SOURCE_PARAMETER_LIST))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(presets);return Optional.empty();}}); + } + private static Holder<Biome> biome(String name){return biomes.getOrThrow(ResourceKey.create(Registries.BIOME,Identifier.parse(name)));} + private static void export(Path path) throws Exception { + var method=VanillaHeightmapOracle.class.getDeclaredMethod("facts");method.setAccessible(true);var facts=(JsonObject)method.invoke(null); + var integers=new JsonArray();for(var id:new TreeSet<>(BuiltInRegistries.BLOCK.keySet()))for(var p:BuiltInRegistries.BLOCK.getValue(id).getStateDefinition().getProperties())if(p instanceof IntegerProperty){var a=new JsonArray();a.add(id.toString());a.add(p.getName());integers.add(a);} + facts.add("integers",integers);Files.writeString(path,facts.toString(),StandardCharsets.UTF_8); + } + private static void fixture(JsonObject f,PrintWriter out) throws Exception { + int cx=f.get("cx").getAsInt(),cz=f.get("cz").getAsInt(),min=f.get("min").getAsInt(),height=f.get("height").getAsInt(),sea=f.get("sea").getAsInt(); + long seed=f.get("seed").getAsLong();boolean legacy=f.get("legacy").getAsBoolean(); + var rule=MaterialRule.CODEC.parse(ops,new JsonPrimitive(f.get("rule").getAsString())).getOrThrow(); + var routerJson=new JsonObject();for(var name:new String[]{"chunk_surface_level","continents","depth","erosion","final_density","ridges","temperature","vegetation"})routerJson.addProperty(name,0);routerJson.add("chunk_surface_level",f.get("preliminary")); + if(f.has("router"))routerJson=f.getAsJsonObject("router"); + var router=NoiseRouter.CODEC.parse(ops,routerJson).getOrThrow();var defaultBlock=Block.stateById(f.get("default").getAsInt()); + Optional<Aquifer.Config> aquifers=f.has("aquifers")&&!f.get("aquifers").isJsonNull()?Optional.of(Aquifer.Config.CODEC.parse(ops,f.get("aquifers")).getOrThrow()):Optional.empty(); + var fluid=f.has("fluid")?Block.stateById(f.get("fluid").getAsInt()):Blocks.WATER.defaultBlockState(); + var settings=new NoiseGeneratorSettings(NoiseSettings.create(f.get("noise_min").getAsInt(),f.get("noise_height").getAsInt()),defaultBlock,fluid,router,Holder.direct(rule),List.of(),sea,false,aquifers,legacy,NoiseGeneratorSettings.DebugFunctions.EMPTY); + var random=RandomState.create(noises,seed,legacy,defaultBlock,sea,router); + var bounds=LevelHeightAccessor.create(f.get("write_min").getAsInt(),f.get("write_max").getAsInt()-f.get("write_min").getAsInt()+1); + var chunk=new ProtoChunk(new ChunkPos(cx,cz),UpgradeData.EMPTY,LevelHeightAccessor.create(min,height),factory,null){@Override public LevelHeightAccessor getHeightAccessorForGeneration(){return bounds;}}; + chunk.setPersistedStatus(ChunkStatus.BIOMES); + for(var value:f.getAsJsonArray("initial")){var a=value.getAsJsonArray();int x=a.get(0).getAsInt(),z=a.get(2).getAsInt();for(int y=a.get(1).getAsInt();y<=a.get(3).getAsInt();y++)chunk.getSection(chunk.getSectionIndex(y)).setBlockState(x&15,y&15,z&15,Block.stateById(a.get(4).getAsInt()),false);} + if(f.get("prime").getAsBoolean())Heightmap.primeHeightmaps(chunk,EnumSet.of(Heightmap.Types.WORLD_SURFACE_WG,Heightmap.Types.OCEAN_FLOOR_WG)); + var neighborhood=new HashMap<Long,ProtoChunk>(); + BiomeSource source=null; + if(f.has("biome_source")) { + source=BiomeSource.CODEC.parse(biomeOps(),f.get("biome_source_json")).getOrThrow(); + var generator=new NoiseBasedChunkGenerator(source,Holder.direct(settings)); + var create=ChunkGenerator.class.getDeclaredMethod("doCreateBiomes",Blender.class,RandomState.class,ChunkAccess.class);create.setAccessible(true); + for(int dx=-1;dx<=1;dx++)for(int dz=-1;dz<=1;dz++) { + int x=cx+dx,z=cz+dz;var neighbor=dx==0&&dz==0?chunk:new ProtoChunk(new ChunkPos(x,z),UpgradeData.EMPTY,LevelHeightAccessor.create(min,height),factory,null); + neighbor.setPersistedStatus(ChunkStatus.BIOMES);create.invoke(generator,Blender.empty(),random,neighbor); + out.println("biomechunk "+x+" "+z); + for(int section=0;section<height/16;section++){var data=neighbor.getSection(section);for(int y=0;y<4;y++)for(int lz=0;lz<4;lz++)for(int lx=0;lx<4;lx++)out.println("stored "+biomes.getKey(data.getNoiseBiome(lx,y,lz).value()));} + neighborhood.put(ChunkPos.pack(x,z),neighbor); + } + } + var names=f.getAsJsonArray("biome_choices");boolean zoom=f.has("biome_zoom")&&f.get("biome_zoom").getAsBoolean(); + var manager=new BiomeManager((x,y,z)->{ + Holder<Biome> value; + if(!neighborhood.isEmpty())value=neighborhood.get(ChunkPos.pack(x>>2,z>>2)).getNoiseBiome(x,y,z); + else {int hash=x*31+y*7+z*17;value=biome(names.get(Math.floorMod(hash,names.size())).getAsString());} + out.println("quart "+x+" "+y+" "+z+" "+biomes.getKey(value.value()));return value; + },BiomeManager.obfuscateSeed(seed)) { + @Override public Holder<Biome> getBiome(BlockPos pos) { + Holder<Biome> value; + if(zoom)value=super.getBiome(pos); + else {int hash=pos.getX()*31+pos.getY()*7+pos.getZ()*17;value=biome(names.get(Math.floorMod(hash,names.size())).getAsString());} + out.println("biome "+pos.getX()+" "+pos.getY()+" "+pos.getZ()+" "+biomes.getKey(value.value()));return value; + } + }; + Set<Holder<Biome>> possible=null;if(!f.get("possible").isJsonNull()){possible=new HashSet<>();for(var name:f.getAsJsonArray("possible"))possible.add(biome(name.getAsString()));} + var contextInput=new JsonObject();var contextArray=new JsonArray();contextArray.add(min);contextArray.add(height);contextArray.add(sea);contextInput.add("context",contextArray); + var contextMethod=VanillaAnchorOracle.class.getDeclaredMethod("context",JsonObject.class);contextMethod.setAccessible(true);var context=(WorldGenerationContext)contextMethod.invoke(null,contextInput); + var volume=new DensityVolume(16,f.get("noise_height").getAsInt(),16,cx<<4,f.get("noise_min").getAsInt(),cz<<4); + var pickerMethod=NoiseBasedChunkGenerator.class.getDeclaredMethod("createFluidPicker",NoiseGeneratorSettings.class);pickerMethod.setAccessible(true); + var picker=(Aquifer.FluidPicker)pickerMethod.invoke(null,settings); + try(var noise=new NoiseChunk(random,Beardifier.EMPTY,settings,picker,Blender.empty(),volume)) { + if(f.has("router")) { + var generator=new NoiseBasedChunkGenerator(new FixedBiomeSource(biome(names.get(0).getAsString())),Holder.direct(settings)); + var fill=NoiseBasedChunkGenerator.class.getDeclaredMethod("doFill",NoiseChunk.class,ChunkAccess.class);fill.setAccessible(true);fill.invoke(generator,noise,chunk); + out.println("terrain "+noise.aquifer().shouldScheduleFluidUpdate());dump(chunk,height,out); + } + for(int repeat=0;repeat<f.get("repeats").getAsInt();repeat++) { + try{random.surfaceSystem().buildSurface(random,manager,context,chunk,noise,rule,possible);out.println("surface "+repeat+" ok");}catch(RuntimeException error){out.println("surface "+repeat+" error");error.printStackTrace();} + dump(chunk,height,out); + } + for(var query:f.getAsJsonArray("top_queries")) { + var q=query.getAsJsonArray();var pos=new BlockPos(q.get(0).getAsInt(),q.get(1).getAsInt(),q.get(2).getAsInt()); + try { + var result=random.surfaceSystem().topMaterial(rule,random,context,manager::getBiome,chunk,noise.cachingSamplers(),pos,q.get(3).getAsBoolean()); + out.println("top "+(result.isPresent()?Integer.toString(Block.getId(result.get())):"none")); + }catch(RuntimeException error){out.println("top error");error.printStackTrace();} + } + var delegate=noise.aquifer();var traced=new Aquifer() { + public net.minecraft.world.level.block.state.BlockState computeSubstance(int x,int y,int z,double density) { + out.println("aquifer "+x+" "+y+" "+z+" "+Long.toHexString(Double.doubleToRawLongBits(density))); + var result=delegate.computeSubstance(x,y,z,density);out.println("substance "+(result==null?"none":Integer.toString(Block.getId(result))));return result; + } + public boolean shouldScheduleFluidUpdate(){boolean result=delegate.shouldScheduleFluidUpdate();out.println("fluid_schedule "+result);return result;} + }; + var aquiferField=NoiseChunk.class.getDeclaredField("aquifer");aquiferField.setAccessible(true);aquiferField.set(noise,traced); + if(source!=null) { + var delegateSource=source; + var tracedSource=new BiomeSource() { + protected com.mojang.serialization.MapCodec<? extends BiomeSource> codec(){return com.mojang.serialization.MapCodec.unit(delegateSource);} + protected java.util.stream.Stream<Holder<Biome>> collectPossibleBiomes(){return delegateSource.possibleBiomes().stream();} + public BiomeResolver createResolver(Climate.Sampler sampler) { + var resolver=delegateSource.createResolver(sampler); + return (x,y,z)->{var value=resolver.getNoiseBiome(x,y,z);out.println("rawquart "+x+" "+y+" "+z+" "+biomes.getKey(value.value()));return value;}; + } + }; + var generator=new NoiseBasedChunkGenerator(tracedSource,Holder.direct(settings)); + var generate=NoiseBasedChunkGenerator.class.getDeclaredMethod("generateCarvers",ChunkAccess.class,Blender.class,NoiseChunk.class,RandomState.class,BiomeManager.class,net.minecraft.server.level.WorldGenRegion.class,MaterialRule.class);generate.setAccessible(true); + try {generate.invoke(generator,chunk,Blender.empty(),noise,random,manager,null,rule);out.println("generatedcarving ok");} + catch(java.lang.reflect.InvocationTargetException error){out.println("generatedcarving error");error.getCause().printStackTrace();} + dump(chunk,height,out); + } + var carving=f.getAsJsonObject("carving"); + for(var value:carving.getAsJsonArray("initial")) {var q=value.getAsJsonArray();chunk.setBlockState(new BlockPos(q.get(0).getAsInt(),q.get(1).getAsInt(),q.get(2).getAsInt()),Block.stateById(q.get(3).getAsInt()));} + var mask=new CarvingMask(min+1,min+height-8); + for(var value:carving.getAsJsonArray("spans")) {var q=value.getAsJsonArray();for(int y=q.get(2).getAsInt();y<=q.get(3).getAsInt();y++)mask.carve(q.get(0).getAsInt(),y,q.get(1).getAsInt());} + var generator=new NoiseBasedChunkGenerator(new FixedBiomeSource(biome(names.get(0).getAsString())),Holder.direct(settings)); + var apply=NoiseBasedChunkGenerator.class.getDeclaredMethod("applyCarvingMask",ChunkAccess.class,CarvingMask.class,RandomState.class,MaterialRule.class,WorldGenerationContext.class,NoiseChunk.class,java.util.function.Function.class,CarvingMask.Filter.class);apply.setAccessible(true); + for(var value:carving.getAsJsonArray("filters")) { + int mode=value.getAsInt();CarvingMask.Filter filter=mode==0?null:(x,y,z)->{boolean keep=mode==1&&Math.floorMod(x*31+y*7+z*17,5)!=0;out.println("filter "+x+" "+y+" "+z+" "+keep);return keep;}; + try {apply.invoke(generator,chunk,mask,random,rule,context,noise,(java.util.function.Function<BlockPos,Holder<Biome>>)manager::getBiome,filter);out.println("carving "+mode+" ok");} + catch(java.lang.reflect.InvocationTargetException error){out.println("carving "+mode+" error");error.getCause().printStackTrace();} + dump(chunk,height,out); + } + } + } + private static void dump(ProtoChunk chunk,int height,PrintWriter out) { + for(int section=0;section<height/16;section++){out.println("section "+section);var data=chunk.getSection(section);for(int y=0;y<16;y++)for(int z=0;z<16;z++){out.print("blocks");for(int x=0;x<16;x++)out.print(" "+Block.getId(data.getBlockState(x,y,z)));out.println();}} + for(var type:new Heightmap.Types[]{Heightmap.Types.WORLD_SURFACE_WG,Heightmap.Types.OCEAN_FLOOR_WG}) {out.println("heightmap "+type);for(long word:chunk.getOrCreateHeightmapUnprimed(type).getRawData())out.println(Long.toUnsignedString(word,16));} + var offsets=chunk.getPostProcessing();for(int section=0;section<offsets.length;section++){var list=offsets[section];out.println("post "+section+" "+(list==null?0:list.size()));if(list!=null)for(short value:list)out.println(Short.toUnsignedInt(value));} + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]);if(args[0].equals("export")){export(dir);return;}load(dir); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))){for(var line:Files.readAllLines(dir.resolve("inputs.txt")))fixture(JsonParser.parseString(line).getAsJsonObject(),out);} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialSurfaceOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialSurfaceOracle.java new file mode 100644 index 000000000..e3a7bb287 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMaterialSurfaceOracle.java @@ -0,0 +1,75 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.*; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.resources.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.densityfunction.*; +import net.minecraft.world.level.levelgen.material.MaterialSystem; +import net.minecraft.world.level.levelgen.synth.*; + +/** Original transport for the material system's bands and surface queries. */ +public final class VanillaMaterialSurfaceOracle { + private static final String[] COLORS={"terracotta","orange_terracotta","yellow_terracotta","brown_terracotta","red_terracotta","white_terracotta","light_gray_terracotta"}; + private static MappedRegistry<NormalNoise> noises; + private static int label(BlockState state) { + String name=BuiltInRegistries.BLOCK.getKey(state.getBlock()).toString(); + for(int i=0;i<COLORS.length;i++)if(name.equals("minecraft:"+COLORS[i]))return i; + throw new AssertionError("unknown band state "+name); + } + private static String bits(double value) {return Long.toUnsignedString(Double.doubleToLongBits(value),16);} + private static void fixture(JsonObject f,PrintWriter out) throws Exception { + long seed=f.get("seed").getAsLong();boolean legacy=f.get("legacy").getAsBoolean(); + RandomSource direct=legacy?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + if(f.get("child").getAsBoolean())direct=direct.forkPositional().fromHashOf(Identifier.parse("minecraft:clay_bands")); + direct.consumeCount(f.get("consume").getAsInt()); + var generate=MaterialSystem.class.getDeclaredMethod("generateBands",RandomSource.class);generate.setAccessible(true); + var bands=(BlockState[])generate.invoke(null,direct);out.println("bands "+bands.length); + for(var band:bands)out.println(label(band)); + out.println("next "+direct.nextLong()+" "+direct.nextInt()); + var zero=DensityFunctions.zero();var router=new NoiseRouter(zero,zero,zero,zero,zero,zero,zero,zero); + var random=RandomState.create(noises,seed,legacy,Blocks.STONE.defaultBlockState(),63,router); + var system=random.surfaceSystem(); + var bandsField=MaterialSystem.class.getDeclaredField("clayBands");bandsField.setAccessible(true); + out.println("system bands");for(var band:(BlockState[])bandsField.get(system))out.println(label(band)); + String[] names={"clayBandsOffsetNoise","surfaceNoise","surfaceSecondaryNoise"}; + for(int field=0;field<names.length;field++) { + if(f.getAsJsonArray("overrides").get(field).isJsonNull())continue; + float value=Float.intBitsToFloat(Integer.parseUnsignedInt(f.getAsJsonArray("overrides").get(field).getAsString(),16)); + Noise noise=new Noise() { + public net.minecraft.util.Interval range(){return net.minecraft.util.Interval.INFINITE;} + public float get(double x,double z){throw new AssertionError("unexpected 2d noise lookup");} + public float get(double x,double y,double z){if(y!=0)throw new AssertionError("unexpected noise Y");return value;} + }; + var target=MaterialSystem.class.getDeclaredField(names[field]);target.setAccessible(true);target.set(system,noise); + } + var bandMethod=MaterialSystem.class.getDeclaredMethod("getBand",int.class,int.class,int.class);bandMethod.setAccessible(true); + var depthMethod=MaterialSystem.class.getDeclaredMethod("getSurfaceDepth",int.class,int.class);depthMethod.setAccessible(true); + var secondaryMethod=MaterialSystem.class.getDeclaredMethod("getSurfaceSecondary",int.class,int.class);secondaryMethod.setAccessible(true); + for(var e:f.getAsJsonArray("points")) { + var p=e.getAsJsonArray();int x=p.get(0).getAsInt(),y=p.get(1).getAsInt(),z=p.get(2).getAsInt(); + try {out.println("band "+label((BlockState)bandMethod.invoke(system,x,y,z)));} + catch(java.lang.reflect.InvocationTargetException ex) {if(!(ex.getCause() instanceof ArrayIndexOutOfBoundsException))throw ex;out.println("band error");} + out.println("depth "+depthMethod.invoke(system,x,z)); + out.println("secondary "+bits((Double)secondaryMethod.invoke(system,x,z))); + } + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + Path dir=Path.of(args[1]);noises=new MappedRegistry<>(Registries.NOISE,Lifecycle.stable()); + var definitions=JsonParser.parseString(Files.readString(dir.resolve("noises.json"))).getAsJsonObject(); + for(var e:definitions.entrySet())noises.register(ResourceKey.create(Registries.NOISE,Identifier.parse(e.getKey())),NormalNoise.DIRECT_CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(e.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN); + noises.freeze(); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(String line:Files.readAllLines(dir.resolve("inputs.txt")))fixture(JsonParser.parseString(line).getAsJsonObject(),out); + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaModelBakingOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaModelBakingOracle.java new file mode 100644 index 000000000..96ecc8b46 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaModelBakingOracle.java @@ -0,0 +1,106 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import com.mojang.blaze3d.platform.NativeImage; +import java.io.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.client.resources.model.*; +import net.minecraft.client.resources.model.cuboid.*; +import net.minecraft.client.resources.model.geometry.*; +import net.minecraft.client.resources.model.sprite.Material; +import net.minecraft.client.renderer.block.dispatch.ModelState; +import net.minecraft.client.renderer.block.dispatch.Variant; +import com.mojang.math.Quadrant; +import net.minecraft.client.renderer.texture.*; +import net.minecraft.client.resources.metadata.animation.FrameSize; +import net.minecraft.core.Direction; +import net.minecraft.resources.Identifier; +import org.joml.*; +import static dev.horizonlab.parity.VanillaCuboidModelOracle.map; + +/** Geometry-only native baker probe with a real 16x16 sprite in a unit atlas. */ +public final class VanillaModelBakingOracle { + private static final Gson JSON = new GsonBuilder().serializeNulls().create(); + private static final class Sprite extends TextureAtlasSprite { + Sprite(SpriteContents contents) { super(Identifier.parse("horizon:atlas"),contents,16,16,0,0,0); } + } + private static final ModelBaker.Interner INTERNER = new ModelBaker.Interner() { + public Vector3fc vector(Vector3fc vector) { return vector; } + public BakedQuad.MaterialInfo materialInfo(BakedQuad.MaterialInfo value) { return value; } + }; + private static long bits(float value) { return Integer.toUnsignedLong(Float.floatToIntBits(value)); } + private static Object matrix(CuboidRotation rotation) { + if(rotation==null)return null; + var m=rotation.transform(); + return new long[][]{{bits(m.m00()),bits(m.m10()),bits(m.m20())}, + {bits(m.m01()),bits(m.m11()),bits(m.m21())},{bits(m.m02()),bits(m.m12()),bits(m.m22())}}; + } + private static Map<String,Object> bake(ResolvedModel model, Sprite sprite, ModelState state) throws Exception { + var geometry=model.getTopGeometry(); + var quads=new ArrayList<Object>(); var matrices=new ArrayList<Object>(); + if(geometry==UnbakedGeometry.EMPTY)return map("quads",quads,"matrices",matrices); + var textures=model.getTopTextureSlots(); + var defaultUv=FaceBakery.class.getDeclaredMethod("defaultFaceUV",Vector3fc.class,Vector3fc.class,Direction.class);defaultUv.setAccessible(true); + for(var element:((UnbakedCuboidGeometry)geometry).elements()) { + matrices.add(matrix(element.rotation())); + for(var entry:element.faces().entrySet()) { + var face=entry.getValue(); + var material=textures.getMaterial(face.texture()); + if(material==null)material=new Material(Identifier.parse("minecraft:missingno")); + var uv=face.uvs(); + if(uv==null)uv=(CuboidFace.UVs)defaultUv.invoke(null,element.from(),element.to(),entry.getKey()); + var info=new BakedQuad.MaterialInfo(sprite,null,null,null,null,face.tintIndex(),element.shadeDirectionOverride(),element.lightEmission()); + var quad=FaceBakery.bakeQuad(INTERNER,element.from(),element.to(),uv,face.rotation(),info,entry.getKey(),state,element.rotation()); + var positions=new long[4][3];var uvs=new long[4][2]; + for(int i=0;i<4;i++) { + var p=quad.position(i);positions[i]=new long[]{bits(p.x()),bits(p.y()),bits(p.z())}; + long packed=quad.packedUV(i);uvs[i]=new long[]{packed >>> 32,packed & 0xffffffffL}; + } + quads.add(map("positions",positions,"uv",uvs,"facing",quad.direction().getName(), + "cull",face.cullForDirection()==null?null:Direction.rotate(state.transformation().getMatrix(),face.cullForDirection()).getName(),"tint",face.tintIndex(), + "shade",element.shadeDirectionOverride()==null?null:element.shadeDirectionOverride().getName(), + "light",element.lightEmission(),"material",map("sprite",material.sprite().toString(),"translucent",material.forceTranslucent()))); + } + } + return map("quads",quads,"matrices",matrices); + } + private static Object affine(Matrix4fc matrix) { + var rows=new long[3][4]; + for(int r=0;r<3;r++)for(int c=0;c<4;c++)rows[r][c]=bits(matrix.get(c,r)); + return rows; + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion(); + if(org.joml.Options.FASTMATH || org.joml.Options.USE_MATH_FMA)throw new AssertionError("Expected default JOML math options"); + var image=new NativeImage(16,16,true); + var contents=new SpriteContents(Identifier.parse("horizon:probe"),new FrameSize(16,16),image); + var sprite=new Sprite(contents); + try (contents; var input=Files.newBufferedReader(Path.of(args[0])); var output=Files.newBufferedWriter(Path.of(args[1]))) { + int index=0; + for(String line;(line=input.readLine())!=null;index++) { + var row=JsonParser.parseString(line).getAsJsonObject();var models=new HashMap<Identifier,UnbakedModel>(); + for(var entry:row.getAsJsonObject("models").entrySet())models.put(Identifier.parse(entry.getKey()),CuboidModel.fromStream(new StringReader(entry.getValue().getAsString()))); + var discovery=new ModelDiscovery(models,MissingCuboidModel.missingModel()); + discovery.addRoot(resolver->{for(var root:row.getAsJsonArray("roots"))resolver.markDependency(Identifier.parse(root.getAsString()));}); + var resolved=discovery.resolve(); + ModelState state=new ModelState(){}; + if(row.has("transform")) { + var t=row.getAsJsonArray("transform"); + state=new Variant.SimpleModelState(Quadrant.values()[t.get(0).getAsInt()],Quadrant.values()[t.get(1).getAsInt()],Quadrant.values()[t.get(2).getAsInt()],t.get(3).getAsBoolean()).asModelState(); + } + for(var root:row.getAsJsonArray("roots")) { + String name=root.getAsString();Map<String,Object> value; + try {value=bake(Objects.requireNonNull(resolved.get(Identifier.parse(name))),sprite,state); + if(row.has("transform")) { + var inverse=new ArrayList<Object>(); + for(var d:Direction.values())inverse.add(affine(state.inverseFaceTransformation(d))); + value.put("transform",map("matrix",affine(state.transformation().getMatrix()),"inverse_uv",inverse)); + }} + catch(RuntimeException error) {output.write(JSON.toJson(map("case",index,"name",name,"error",true)));output.newLine();continue;} + output.write(JSON.toJson(map("case",index,"name",name,"baked",value)));output.newLine(); + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaModelChoiceOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaModelChoiceOracle.java new file mode 100644 index 000000000..4cf8cb329 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaModelChoiceOracle.java @@ -0,0 +1,65 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.client.renderer.block.dispatch.*; +import net.minecraft.client.resources.model.sprite.Material; +import net.minecraft.util.RandomSource; +import net.minecraft.util.random.*; +import net.minecraft.world.level.levelgen.*; +import static dev.horizonlab.parity.VanillaCuboidModelOracle.map; + +/** Real weighted and multipart collectParts, with observable inert leaf models. */ +public final class VanillaModelChoiceOracle { + private static final Gson JSON=new GsonBuilder().serializeNulls().create(); + private record Leaf(String tag,List<String> output) implements BlockStateModel { + public Material.Baked particleMaterial(){return null;} + public int materialFlags(){return 0;} + public void collectParts(RandomSource random,List<BlockStateModelPart> parts){output.add(tag);} + } + private static BlockStateModel choice(JsonElement value,int index,List<String> output) { + if(value.isJsonNull())return new Leaf("horizon:part"+index+"_single",output); + var list=new ArrayList<Weighted<BlockStateModel>>();int variant=0; + for(var weight:value.getAsJsonArray())list.add(new Weighted<>(new Leaf("horizon:part"+index+"_variant"+variant++,output),weight.getAsInt())); + return new WeightedVariants(WeightedList.of(list)); + } + private static Object probe(JsonObject row) throws Exception { + var emitted=new ArrayList<String>();var values=row.getAsJsonArray("parts"); + BlockStateModel model; + if(!row.get("multipart").getAsBoolean())model=choice(values.get(0),0,emitted); + else { + var selectors=new ArrayList<Object>();var selected=new HashSet<Integer>(); + for(var i:row.getAsJsonArray("selected"))selected.add(i.getAsInt()); + var selectorType=Class.forName("net.minecraft.client.renderer.block.dispatch.multipart.MultiPartModel$Selector"); + var selectorConstructor=selectorType.getDeclaredConstructors()[0];selectorConstructor.setAccessible(true); + for(int i=0;i<values.size();i++) { + boolean enabled=selected.contains(i); + java.util.function.Predicate<net.minecraft.world.level.block.state.BlockState> predicate=state->enabled; + selectors.add(selectorConstructor.newInstance(predicate,choice(values.get(i),i,emitted))); + } + var sharedType=Class.forName("net.minecraft.client.renderer.block.dispatch.multipart.MultiPartModel$SharedBakedState"); + var sharedConstructor=sharedType.getDeclaredConstructors()[0];sharedConstructor.setAccessible(true); + var shared=sharedConstructor.newInstance(selectors); + var constructor=Class.forName("net.minecraft.client.renderer.block.dispatch.multipart.MultiPartModel").getDeclaredConstructors()[0];constructor.setAccessible(true); + model=(BlockStateModel)constructor.newInstance(shared,null); + } + long seed=row.get("seed").getAsLong(); + RandomSource random=row.get("random").getAsString().equals("legacy")?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + var traces=new ArrayList<Object>();var parts=new ArrayList<BlockStateModelPart>(); + for(int i=0;i<row.get("repeats").getAsInt();i++) { + emitted.clear();model.collectParts(random,parts); + traces.add(map("models",new ArrayList<>(emitted),"next_long",random.nextLong(),"next_int",random.nextInt())); + } + return traces; + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion(); + try(var input=Files.newBufferedReader(Path.of(args[0]));var output=Files.newBufferedWriter(Path.of(args[1]))) { + for(String line;(line=input.readLine())!=null;) { + var row=JsonParser.parseString(line).getAsJsonObject(); + output.write(JSON.toJson(map("name",row.get("name").getAsString(),"trace",probe(row))));output.newLine(); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaModelResolutionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaModelResolutionOracle.java new file mode 100644 index 000000000..b198a1882 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaModelResolutionOracle.java @@ -0,0 +1,63 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import java.io.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.client.resources.model.*; +import net.minecraft.client.resources.model.cuboid.*; +import net.minecraft.client.resources.model.geometry.UnbakedGeometry; +import net.minecraft.client.resources.model.sprite.Material; +import net.minecraft.resources.Identifier; +import net.minecraft.world.item.ItemDisplayContext; +import static dev.horizonlab.parity.VanillaCuboidModelOracle.*; + +/** Exercises actual ModelDiscovery, ResolvedModel and TextureSlots resolution. */ +public final class VanillaModelResolutionOracle { + private static final Gson JSON = new GsonBuilder().serializeNulls().create(); + private static Object material(Material value) { + return value == null ? null : map("sprite", value.sprite().toString(), "translucent", value.forceTranslucent()); + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion(); + try (var input=Files.newBufferedReader(Path.of(args[0])); var output=Files.newBufferedWriter(Path.of(args[1]))) { + int index=0; + for (String line; (line=input.readLine())!=null; index++) { + var row=JsonParser.parseString(line).getAsJsonObject(); + var models=new HashMap<Identifier, UnbakedModel>(); + var slots=new TreeSet<String>(); slots.add("missingno"); slots.add("particle"); + for (var entry:row.getAsJsonObject("models").entrySet()) { + var model=CuboidModel.fromStream(new StringReader(entry.getValue().getAsString())); + models.put(Identifier.parse(entry.getKey()),model); + slots.addAll(model.textureSlots().values().keySet()); + } + var discovery=new ModelDiscovery(models,MissingCuboidModel.missingModel()); + discovery.addRoot(resolver -> {for(var root:row.getAsJsonArray("roots")) resolver.markDependency(Identifier.parse(root.getAsString()));}); + var resolved=discovery.resolve(); + for (var root:row.getAsJsonArray("roots")) { + String name=root.getAsString(); + var model=resolved.get(Identifier.parse(name)); + if(model==null) {output.write(JSON.toJson(map("case",index,"name",name,"error",true)));output.newLine();continue;} + var geometry=model.getTopGeometry(); + var elements=new ArrayList<Object>(); + if(geometry!=UnbakedGeometry.EMPTY) for(var e:((UnbakedCuboidGeometry)geometry).elements()) elements.add(element(e)); + var display=new TreeMap<String,Object>(); + var transforms=model.getTopTransforms(); + for(var context:ItemDisplayContext.values()) if(context!=ItemDisplayContext.NONE) display.put(context.getSerializedName(),transform(transforms.getTransform(context))); + var textures=model.getTopTextureSlots(); + var values=new TreeMap<String,Object>(); + for(var slot:slots) {var value=textures.getMaterial("#"+slot);if(value!=null) values.put(slot,material(value));} + var queries=new ArrayList<Object>(); + for(var raw:row.getAsJsonArray("queries")) { + String slot=raw.getAsString(); + try {queries.add(map("slot",slot,"value",material(textures.getMaterial(slot))));} + catch(RuntimeException failure) {queries.add(map("slot",slot,"error",true));} + } + output.write(JSON.toJson(map("case",index,"name",name,"ao",model.getTopAmbientOcclusion(), + "gui",model.getTopGuiLight().name().toLowerCase(Locale.ROOT),"elements",elements, + "display",display,"textures",values,"queries",queries)));output.newLine(); + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementEmissionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementEmissionOracle.java new file mode 100644 index 000000000..6ad610cc7 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementEmissionOracle.java @@ -0,0 +1,68 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.tags.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.level.gameevent.*; +import net.minecraft.world.phys.Vec3; +/** Invokes native movement emission, including its private block effect dispatch. */ +public final class VanillaMovementEmissionOracle { + static final class Stop extends RuntimeException {} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static Vec3 vector(JsonElement v){var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static BlockPos position(JsonElement v){var a=v.getAsJsonArray();return new BlockPos(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt());} + static String pos(BlockPos p){return p.getX()+" "+p.getY()+" "+p.getZ();} + static Field moveDist,flyDist,nextStep; + static final class Data { + JsonObject f;PrintWriter out;int calls;Actor actor;State[] states; + boolean flag(String n){return f.get(n).getAsBoolean();} + void query(String text){out.println(text);if(calls++==f.get("fail").getAsInt())throw new Stop();} + void mutate(){if(flag("mutate")){try{moveDist.setFloat(actor,single(f.get("mutated_move")));flyDist.setFloat(actor,single(f.get("mutated_fly")));nextStep.setFloat(actor,single(f.get("mutated_next")));}catch(Exception e){throw new AssertionError(e);}}} + } + static final class State extends BlockState { + Data d;int id;State(){super(null,null,null);} + boolean flag(String n){return d.f.getAsJsonArray("states").get(id).getAsJsonObject().get(n).getAsBoolean();} + @Override public boolean isAir(){d.query("air "+id);return flag("air");} + @Override public boolean is(TagKey<Block> tag){if(tag==BlockTags.CRYSTAL_SOUND_BLOCKS){d.query("crystal "+id);return false;}if(tag!=BlockTags.CLIMBABLE)throw new AssertionError(tag);d.query("climbable "+id);return flag("climbable");} + @Override public boolean is(Block block){if(block!=Blocks.POWDER_SNOW)throw new AssertionError(block);d.query("powder "+id);return flag("powder");} + } + static final class Level extends net.minecraft.server.level.ServerLevel { + Data d;Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public BlockState getBlockState(BlockPos p){d.query("state "+pos(p));return d.states[1];} + @Override public void gameEvent(Holder<GameEvent> e,Vec3 p,GameEvent.Context c){if(e!=GameEvent.STEP||c.sourceEntity()!=d.actor)throw new AssertionError();d.query(String.format("step %d %016x %016x %016x",((State)c.affectedState()).id,Double.doubleToLongBits(p.x),Double.doubleToLongBits(p.y),Double.doubleToLongBits(p.z)));d.mutate();} + } + static final class Actor extends Marker { + Data d;Actor(){super(null,null);}void configure(Level w){setLevel(w);} + @Override public BlockPos getOnPos(){d.query("on-pos");return VanillaMovementEmissionOracle.position(d.f.get("on_pos"));} + @Override public boolean onGround(){d.query("ground");return d.flag("ground");} + @Override public boolean isCrouching(){d.query("crouch");return d.flag("crouch");} + @Override public boolean isOnRails(){d.query("rails");return d.flag("rails");} + @Override public boolean isSwimming(){d.query("swimming");return d.flag("swimming");} + @Override public boolean isInWater(){d.query("water");return d.flag("water");} + @Override protected void playStepSound(BlockPos p,BlockState s){d.query("walking "+pos(p)+" "+((State)s).id);d.mutate();} + @Override protected float nextStep(){d.query("next-step");return super.nextStep();} + @Override protected void waterSwimSound(){d.query("water-sound");d.mutate();} + @Override public void gameEvent(Holder<GameEvent> e){d.query("event "+(e==GameEvent.SWIM?"swim":e==GameEvent.FLAP?"flap":"unknown"));d.mutate();} + @Override protected boolean isFlapping(){d.query("flapping");return d.flag("flapping");} + @Override protected void onFlap(){d.query("on-flap");d.mutate();} + @Override protected MovementEmission getMovementEmission(){d.query("emission");return MovementEmission.values()[d.f.get("flap_emission").getAsInt()];} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var allocator=Class.forName("sun.misc.Unsafe");var field=allocator.getDeclaredField("theUnsafe");field.setAccessible(true);var unsafe=field.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + moveDist=Entity.class.getDeclaredField("moveDist");moveDist.setAccessible(true);flyDist=Entity.class.getDeclaredField("flyDist");flyDist.setAccessible(true);nextStep=Entity.class.getDeclaredField("nextStep");nextStep.setAccessible(true);var position=Entity.class.getDeclaredField("position");position.setAccessible(true); + var apply=Entity.class.getDeclaredMethod("applyMovementEmissionAndPlaySound",Entity.MovementEmission.class,Vec3.class,BlockPos.class,BlockState.class);apply.setAccessible(true);var block=Entity.class.getDeclaredMethod("vibrationAndSoundEffectsFromBlock",BlockPos.class,BlockState.class,boolean.class,boolean.class,Vec3.class);block.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;var actor=(Actor)allocate.invoke(unsafe,Actor.class);actor.d=d;d.actor=actor;var level=(Level)allocate.invoke(unsafe,Level.class);level.d=d;actor.configure(level);d.states=new State[2];for(int i=0;i<2;i++){var s=(State)allocate.invoke(unsafe,State.class);s.d=d;s.id=i;d.states[i]=s;} + moveDist.setFloat(actor,single(f.get("move")));flyDist.setFloat(actor,single(f.get("fly")));nextStep.setFloat(actor,single(f.get("next")));position.set(actor,vector(f.get("position"))); + try{if(f.get("block").getAsBoolean())out.println("result "+block.invoke(actor,position(f.get("legacy")),d.states[0],d.flag("sounds"),d.flag("events"),vector(f.get("movement"))));else{apply.invoke(actor,Entity.MovementEmission.values()[f.get("emission").getAsInt()],vector(f.get("movement")),position(f.get("legacy")),d.states[0]);out.println("ok");}}catch(InvocationTargetException e){if(e.getCause() instanceof Stop)out.println("error");else throw e;} + out.printf("distances %08x %08x %08x%n",Float.floatToIntBits(moveDist.getFloat(actor)),Float.floatToIntBits(flyDist.getFloat(actor)),Float.floatToIntBits(nextStep.getFloat(actor)));out.println("queries "+d.calls); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementRegistryOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementRegistryOracle.java new file mode 100644 index 000000000..d25ff5d36 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementRegistryOracle.java @@ -0,0 +1,61 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.nbt.*; +import net.minecraft.tags.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.phys.Vec3; +/** Exports raw block fields; compares registered movement queries independently. */ +public final class VanillaMovementRegistryOracle { + static final class Stop extends RuntimeException {} + static final String[] PROPERTIES={"friction","speedFactor","jumpFactor","bounceRestitution","fallDistanceReduction"}; + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static BlockPos position(JsonElement v){var a=v.getAsJsonArray();return new BlockPos(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt());} + static void export(Path dir)throws Exception { + var fields=new Field[PROPERTIES.length];for(int i=0;i<fields.length;i++){fields[i]=BlockBehaviour.class.getDeclaredField(PROPERTIES[i]);fields[i].setAccessible(true);} + var states=new ListTag();var defaults=new CompoundTag();var definitions=new CompoundTag(); + for(var state:Block.BLOCK_STATE_REGISTRY){states.add(BlockState.FULL_CODEC.encodeStart(NbtOps.INSTANCE,state).getOrThrow());if(state==state.getBlock().defaultBlockState())defaults.putInt(BuiltInRegistries.BLOCK.getKey(state.getBlock()).toString(),Block.getId(state));} + for(var block:BuiltInRegistries.BLOCK){var data=new CompoundTag();for(int i=0;i<fields.length;i++)data.putFloat(PROPERTIES[i],fields[i].getFloat(block));data.putBoolean("fenceGate",block instanceof FenceGateBlock);definitions.put(BuiltInRegistries.BLOCK.getKey(block).toString(),data);} + var info=new JsonObject();info.addProperty("states",states.size());var ids=new JsonObject();for(var block:BuiltInRegistries.BLOCK)ids.addProperty(BuiltInRegistries.BLOCK.getKey(block).toString(),Block.getId(block.defaultBlockState()));info.add("defaults",ids);Files.writeString(dir.resolve("registry-info.json"),info.toString()); + var registry=new CompoundTag();registry.putInt("DataVersion",net.minecraft.SharedConstants.getCurrentVersion().dataVersion().version());registry.put("states",states);registry.put("defaults",defaults); + var movement=new CompoundTag();movement.putInt("DataVersion",net.minecraft.SharedConstants.getCurrentVersion().dataVersion().version());movement.put("states",states);movement.put("blocks",definitions); + try(var out=new DataOutputStream(Files.newOutputStream(dir.resolve("block-registry.nbt")))){NbtIo.write(registry,out);}try(var out=new DataOutputStream(Files.newOutputStream(dir.resolve("movement-properties.nbt")))){NbtIo.write(movement,out);} + } + static final class Level extends net.minecraft.server.level.ServerLevel { + JsonObject input;PrintWriter out;int calls; + private Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public BlockState getBlockState(BlockPos p){out.println("state "+p.getX()+" "+p.getY()+" "+p.getZ());int call=calls++;if(call==input.get("fail").getAsInt())throw new Stop();var states=input.getAsJsonArray("states");return Block.stateById(states.get(call%states.size()).getAsInt());} + } + static final class Actor extends Marker { + Actor(){super(null,null);}void configure(Level level){setLevel(level);}BlockPos cached; + @Override public BlockPos blockPosition(){return cached;} + BlockPos support(float offset){return getOnPos(offset);}float jump(){return getBlockJumpFactor();}float speed(){return getBlockSpeedFactor();} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject()); + if(args[0].equals("export")){export(dir);return;} + var registry=BuiltInRegistries.BLOCK;var natural=new HashMap<TagKey<Block>,List<Holder<Block>>>();var all=new ArrayList<Holder<Block>>(); + var tags=List.of(BlockTags.FENCES,BlockTags.WALLS,BlockTags.SUPPRESSES_BOUNCE); + for(var tag:tags){var values=new ArrayList<Holder<Block>>();for(var block:registry){if(block.defaultBlockState().is(tag))values.add(block.builtInRegistryHolder());}natural.put(tag,values);}for(var block:registry)all.add(block.builtInRegistryHolder()); + var allocator=Class.forName("sun.misc.Unsafe");var field=allocator.getDeclaredField("theUnsafe");field.setAccessible(true);var unsafe=field.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + var support=Entity.class.getDeclaredField("mainSupportingBlockPos");support.setAccessible(true);var pos=Entity.class.getDeclaredField("position");pos.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){ + for(var state:Block.BLOCK_STATE_REGISTRY){var b=state.getBlock();out.printf("properties %d %08x %08x %08x %08x %08x %s %s %s %s %s %s%n",Block.getId(state),Float.floatToIntBits(b.getFriction()),Float.floatToIntBits(b.getSpeedFactor()),Float.floatToIntBits(b.getJumpFactor()),Float.floatToIntBits(b.getBounceRestitution()),Float.floatToIntBits(b.getFallDistanceReduction()),b instanceof FenceGateBlock,state.is(BlockTags.FENCES),state.is(BlockTags.WALLS),state.is(BlockTags.SUPPRESSES_BOUNCE),state.is(Blocks.WATER),state.is(Blocks.BUBBLE_COLUMN));} + int active=-1; + for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();int tagMode=f.get("tags").getAsInt();if(active!=tagMode){var selected=new HashMap<TagKey<Block>,List<Holder<Block>>>();for(var tag:tags)selected.put(tag,tagMode==0?natural.get(tag):tagMode==1?List.of():all);registry.prepareTagReload(new TagLoader.LoadResult<>(Registries.BLOCK,selected)).apply();active=tagMode;} + var level=(Level)allocate.invoke(unsafe,Level.class);level.input=f;level.out=out;var entity=(Actor)allocate.invoke(unsafe,Actor.class);entity.configure(level);entity.cached=position(f.get("cached"));support.set(entity,f.get("support").isJsonNull()?Optional.empty():Optional.of(position(f.get("support"))));var v=f.getAsJsonArray("position");pos.set(entity,new Vec3(number(v.get(0)),number(v.get(1)),number(v.get(2)))); + try{int mode=f.get("mode").getAsInt();if(mode<4){BlockPos p=switch(mode){case 0->entity.support(Float.intBitsToFloat(Integer.parseUnsignedInt(f.get("offset").getAsString(),16)));case 1->entity.getOnPosLegacy();case 2->entity.getOnPos();case 3->entity.getBlockPosBelowThatAffectsMyMovement();default->throw new AssertionError();};out.printf("position %d %d %d%n",p.getX(),p.getY(),p.getZ());}else{float factor=mode==4?entity.jump():entity.speed();out.printf("factor %08x%n",Float.floatToIntBits(factor));}} + catch(Stop error){out.println("error");}out.println("queries "+level.calls); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementSupportOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementSupportOracle.java new file mode 100644 index 000000000..fe55429c2 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementSupportOracle.java @@ -0,0 +1,61 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.BlockPos; +import net.minecraft.tags.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.phys.Vec3; +/** Native support positions and movement factors with traced world/tag queries. */ +public final class VanillaMovementSupportOracle { + static final class Stop extends RuntimeException {} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static BlockPos position(JsonElement v){var a=v.getAsJsonArray();return new BlockPos(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt());} + static final class Data { + JsonObject input;PrintWriter out;int calls,reads; + void query(String text){out.println(text);if(calls++==input.get("fail").getAsInt())throw new Stop();} + } + static class FactorBlock extends Block { + Data d;int id;FactorBlock(){super(BlockBehaviour.Properties.of());} + @Override public float getJumpFactor(){d.query("jump "+id);return single(d.input.getAsJsonArray("states").get(id).getAsJsonObject().get("jump"));} + @Override public float getSpeedFactor(){d.query("speed "+id);return single(d.input.getAsJsonArray("states").get(id).getAsJsonObject().get("speed"));} + } + static class State extends BlockState { + Data d;int id;FactorBlock block;State(){super(null,null,null);} + boolean flag(String name){return d.input.getAsJsonArray("states").get(id).getAsJsonObject().get(name).getAsBoolean();} + @Override public Block getBlock(){d.query("block "+id);return flag("gate")?Blocks.OAK_FENCE_GATE:block;} + @Override public boolean is(TagKey<Block> tag){String name=tag==BlockTags.FENCES?"fence":tag==BlockTags.WALLS?"wall":null;if(name==null)throw new AssertionError(tag);d.query(name+" "+id);return flag(name);} + @Override public boolean is(Block block){String name=block==Blocks.WATER?"water":block==Blocks.BUBBLE_COLUMN?"bubble":null;if(name==null)throw new AssertionError(block);d.query(name+" "+id);return flag(name);} + } + static final class Level extends net.minecraft.server.level.ServerLevel { + Data d;State[] states; + private Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public BlockState getBlockState(BlockPos p){d.query("state "+p.getX()+" "+p.getY()+" "+p.getZ());return states[d.reads++ % states.length];} + } + static final class Actor extends Marker { + Actor(){super(null,null);}void configure(Level level){setLevel(level);} + BlockPos cached; + @Override public BlockPos blockPosition(){return cached;} + BlockPos support(float offset){return getOnPos(offset);} + float jump(){return getBlockJumpFactor();}float speed(){return getBlockSpeedFactor();} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var allocator=Class.forName("sun.misc.Unsafe");var field=allocator.getDeclaredField("theUnsafe");field.setAccessible(true);var unsafe=field.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + var support=Entity.class.getDeclaredField("mainSupportingBlockPos");support.setAccessible(true);var pos=Entity.class.getDeclaredField("position");pos.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){ + for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.input=f;d.out=out;var level=(Level)allocate.invoke(unsafe,Level.class);level.d=d;level.states=new State[f.getAsJsonArray("states").size()]; + for(int i=0;i<level.states.length;i++){var s=(State)allocate.invoke(unsafe,State.class);s.d=d;s.id=i;var b=(FactorBlock)allocate.invoke(unsafe,FactorBlock.class);b.d=d;b.id=i;s.block=b;level.states[i]=s;} + var entity=(Actor)allocate.invoke(unsafe,Actor.class);entity.configure(level);entity.cached=position(f.get("cached"));support.set(entity,f.get("support").isJsonNull()?Optional.empty():Optional.of(position(f.get("support"))));var v=f.getAsJsonArray("position");pos.set(entity,new Vec3(number(v.get(0)),number(v.get(1)),number(v.get(2)))); + try{int mode=f.get("mode").getAsInt();if(mode<4){BlockPos p=switch(mode){case 0->entity.support(single(f.get("offset")));case 1->entity.getOnPosLegacy();case 2->entity.getOnPos();case 3->entity.getBlockPosBelowThatAffectsMyMovement();default->throw new AssertionError();};out.printf("position %d %d %d%n",p.getX(),p.getY(),p.getZ());}else{float factor=mode==4?entity.jump():entity.speed();out.printf("factor %08x%n",Float.floatToIntBits(factor));}} + catch(Stop error){out.println("error");}out.println("queries "+d.calls); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaNoiseOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaNoiseOracle.java new file mode 100644 index 000000000..cf0cfb7d9 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaNoiseOracle.java @@ -0,0 +1,149 @@ +package dev.horizonlab.parity; + +import java.io.PrintWriter; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.StringTokenizer; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.levelgen.LegacyRandomSource; +import net.minecraft.world.level.levelgen.XoroshiroRandomSource; +import net.minecraft.world.level.levelgen.synth.GradientNoise; +import net.minecraft.world.level.levelgen.synth.Noise; +import net.minecraft.world.level.levelgen.synth.NoiseStack; +import net.minecraft.world.level.levelgen.synth.NormalNoise; +import net.minecraft.world.level.levelgen.synth.PerlinNoise; +import net.minecraft.world.level.levelgen.synth.SimplexNoise; +import net.minecraft.world.level.levelgen.synth.SmearedPerlinNoise; +import net.minecraft.world.level.levelgen.densityfunction.DensityBuffer; +import net.minecraft.world.level.levelgen.densityfunction.DensityVolume; + +/** Original transport adapter; samples the reference classes directly. */ +public final class VanillaNoiseOracle { + private static int integer(StringTokenizer args) { return Integer.parseInt(args.nextToken()); } + private static double number(StringTokenizer args) { return Double.longBitsToDouble(Long.parseUnsignedLong(args.nextToken(),16)); } + private static float small(StringTokenizer args) { return Float.intBitsToFloat(Integer.parseUnsignedInt(args.nextToken(),16)); } + private static String bits(float value) { return Integer.toUnsignedString(Float.floatToIntBits(value)); } + private static String bits(double value) { return Long.toUnsignedString(Double.doubleToLongBits(value)); } + private static Object field(Object object, String name) throws Exception { + Field field=GradientNoise.class.getDeclaredField(name);field.setAccessible(true);return field.get(object); + } + private static Object declared(Object object,String name) throws Exception { + Field field=object.getClass().getDeclaredField(name);field.setAccessible(true);return field.get(object); + } + private static void normal(StringTokenizer args,PrintWriter out) throws Exception { + String kind=args.nextToken();long seed=Long.parseLong(args.nextToken());int parity=integer(args),base=integer(args),count=integer(args),normalization=integer(args); + double amplitude=number(args);double[] modifiers=new double[integer(args)];for(int i=0;i<modifiers.length;i++)modifiers[i]=number(args); + double[][] points=new double[integer(args)][3];for(double[] point:points)for(int i=0;i<3;i++)point[i]=number(args); + RandomSource random=kind.equals("legacy")?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + NormalNoise definition; + try { + if((parity&1)!=0)definition=NormalNoise.createParity(base,modifiers); + else { + var builder=NormalNoise.builder().setBaseOctave(base).setBaseAmplitude(amplitude).setOctaveCount(count); + if(normalization==2)builder.setLegacyNormalization();else builder.setNormalize(normalization==1); + for(int i=0;i<modifiers.length;i++)builder.setAmplitudeModifier(i,modifiers[i]); + definition=builder.build(); + } + } catch(IllegalArgumentException e) { out.println("normal error "+random.nextLong());return; } + var octaves=(java.util.List<?>)declared(definition,"octaves"); + out.printf("normal %d %s %s %s%n",octaves.size(),bits((double)declared(definition,"normalizationFactor")),bits(definition.range().min()),bits(definition.range().max())); + for(Object octave:octaves) { + Method name=octave.getClass().getDeclaredMethod("seed");name.setAccessible(true); + out.printf("octave %d %s %s %s%n",(int)declared(octave,"octaveIndex"),bits((double)declared(octave,"frequency")),bits((double)declared(octave,"amplitude")),name.invoke(octave)); + } + NoiseStack noise; + try { noise=(NoiseStack)((parity&2)!=0?definition.createForLegacyNetherBiome(random):definition.create(random)); } + catch(IllegalArgumentException | IllegalStateException e) { out.println("normal-create error");out.println("normal-parent "+random.nextLong());return; } + Field layerField=NoiseStack.class.getDeclaredField("layers");layerField.setAccessible(true);Object[] layers=(Object[])layerField.get(noise); + out.printf("normal-create %d %s %s%n",layers.length,bits(noise.range().min()),bits(noise.range().max())); + for(int i=0;i<layers.length;i++)out.printf("normal-layer %s %s %s %s%n",bits((double)declared(layers[i],"frequency")),bits((float)declared(layers[i],"amplitude")),bits(noise.getLayer(i).get(.25,.75)),bits(noise.getLayer(i).get(-17.25,64.125,32.5))); + for(double[] point:points)out.printf("normal-query %s %s%n",bits(noise.get(point[0],point[2])),bits(noise.get(point[0],point[1],point[2]))); + var volume=new DensityVolume(2,5,2,-17,-64,32,4,1,4);var buffer=DensityBuffer.createUnpooled(volume.size()); + for(int i=0;i<volume.size();i++)buffer.set(i,(i-10.0f)*.125f); + float[] amplitudes={.5f,-.25f}; + for(int pass=0;pass<2;pass++) { + noise.addToVolume(buffer,volume,.125,.25,amplitudes[pass]); + for(int i=0;i<volume.size();i++)out.printf("normal-volume %d %d %s%n",pass,i,bits(buffer.get(i))); + } + out.println("normal-parent "+random.nextLong()); + } + public static void main(String[] paths) throws Exception { + var samplers=new ArrayList<Noise>(); + Method wrap=GradientNoise.class.getDeclaredMethod("wrap",double.class);wrap.setAccessible(true); + try(var reader=Files.newBufferedReader(Path.of(paths[0]),StandardCharsets.UTF_8); + var out=new PrintWriter(Files.newBufferedWriter(Path.of(paths[1]),StandardCharsets.UTF_8))) { + String line; + while((line=reader.readLine())!=null) { + var args=new StringTokenizer(line); + String operation=args.nextToken(); + switch(operation) { + case "normal" -> normal(args,out); + case "create" -> { + String kind=args.nextToken(),stream=args.nextToken();long seed=Long.parseLong(args.nextToken()); + boolean skip=integer(args)!=0;double scale=number(args); + RandomSource random=switch(stream) {case "legacy"->new LegacyRandomSource(seed);case "xoroshiro"->new XoroshiroRandomSource(seed);default->throw new AssertionError();}; + GradientNoise noise=switch(kind) {case "perlin"->new PerlinNoise(random);case "simplex"->new SimplexNoise(random,skip);case "smeared"->new SmearedPerlinNoise(random,scale);default->throw new AssertionError();}; + samplers.add(noise); + String lower,upper; + try { lower=bits(noise.range().min());upper=bits(noise.range().max()); } + catch(IllegalArgumentException e) { lower="error";upper="error"; } + out.printf("create %s %s %s %s %s %d%n",bits((double)field(noise,"offsetX")),bits((double)field(noise,"offsetY")),bits((double)field(noise,"offsetZ")),lower,upper,random.nextLong()); + out.print("permutations");for(byte v:(byte[])field(noise,"perms"))out.print(" "+(v&255));out.println(); + } + case "query", "local" -> { + var noise=samplers.get(integer(args));double x=number(args),y=number(args),z=number(args); + if(operation.equals("local")) { x-=(double)field(noise,"offsetX");y-=(double)field(noise,"offsetY");z-=(double)field(noise,"offsetZ"); } + float[] derivative={small(args),small(args),small(args)}; + out.print("query "+bits(noise.get(x,z))+" "+bits(noise.get(x,y,z))); + if(noise instanceof PerlinNoise perlin)out.print(" "+bits(perlin.noiseWithDerivative(x,y,z,derivative))+" "+bits(derivative[0])+" "+bits(derivative[1])+" "+bits(derivative[2])); + out.println(); + } + case "volume" -> { + var noise=samplers.get(integer(args)); + int sx=integer(args),sy=integer(args),sz=integer(args),mx=integer(args),my=integer(args),mz=integer(args),dx=integer(args),dy=integer(args),dz=integer(args); + double xzScale=number(args),yScale=number(args);float amplitude=small(args);long seed=Long.parseLong(args.nextToken());int repeats=integer(args); + DensityVolume volume; + try { volume=new DensityVolume(sx,sy,sz,mx,my,mz,dx,dy,dz); } + catch(IllegalArgumentException e) { out.println("volume error");break; } + var buffer=DensityBuffer.createUnpooled(volume.size()+4);var random=new LegacyRandomSource(seed); + for(int i=0;i<buffer.size();i++)buffer.set(i,Float.intBitsToFloat(random.nextInt())); + for(int i=0;i<repeats;i++) noise.addToVolume(buffer,volume,xzScale,yScale,amplitude); + out.printf("volume %d %d %d %d%n",volume.size(),volume.maxBlockX(),volume.maxBlockY(),volume.maxBlockZ()); + for(int z=0;z<sz;z++)for(int x=0;x<sx;x++)for(int y=0;y<sy;y++) { + int index=volume.indexUnchecked(x,y,z); + out.printf("cell %d %d %d %d %s%n",index,volume.blockX(x),volume.blockY(y),volume.blockZ(z),bits(buffer.get(index))); + } + for(int i=volume.size();i<buffer.size();i++)out.println("tail "+bits(buffer.get(i))); + } + case "stack" -> { + int count=integer(args);var builder=NoiseStack.builder(); + for(int i=0;i<count;i++) { + int flatten=integer(args),id=integer(args);double frequency=number(args);float amplitude=small(args); + if(flatten!=0)builder.addStack((NoiseStack)samplers.get(id),frequency,amplitude); + else builder.add(samplers.get(id),frequency,amplitude); + } + NoiseStack stack; + try { stack=builder.build(); } catch(IllegalArgumentException e) { out.println("stack error");break; } + Field layersField=NoiseStack.class.getDeclaredField("layers");layersField.setAccessible(true); + Object[] layers=(Object[])layersField.get(stack); + out.printf("stack %d %s %s%n",layers.length,bits(stack.range().min()),bits(stack.range().max())); + for(int i=0;i<layers.length;i++) { + Field frequency=layers[i].getClass().getDeclaredField("frequency"),amplitude=layers[i].getClass().getDeclaredField("amplitude"); + frequency.setAccessible(true);amplitude.setAccessible(true); + out.printf("layer %s %s %s%n",bits(frequency.getDouble(layers[i])),bits(amplitude.getFloat(layers[i])),bits(stack.getLayer(i).get(0,0,0))); + } + samplers.add(stack); + } + case "wrap" -> out.println("wrap "+bits((double)wrap.invoke(null,number(args)))); + default -> throw new AssertionError(); + } + if(args.hasMoreTokens())throw new AssertionError("extra argument"); + } + if(out.checkError())throw new java.io.IOException("reference output failed"); + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaObjectOpenMapOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaObjectOpenMapOracle.java new file mode 100644 index 000000000..af075584f --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaObjectOpenMapOracle.java @@ -0,0 +1,96 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import java.io.*; +import java.nio.file.*; +import java.util.*; +import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; + +/** Executes the actual pinned fastutil map, including live MapEntry handles. */ +public final class VanillaObjectOpenMapOracle { + record Key(int id, int hash, int object) { + @Override public int hashCode() { return hash; } + @Override public boolean equals(Object o) { return o instanceof Key k && id == k.id; } + } + static final class CallbackFailure extends RuntimeException {} + static String desc(Key key) { return key == null ? "null" : key.id() + ":" + key.object(); } + static Integer value(JsonElement v) { return v.isJsonNull() ? null : v.getAsInt(); } + static String snapshot(Object2ObjectOpenHashMap<Key, Integer> map) { + var entries = new StringJoiner(","); + map.forEach((k, v) -> entries.add(desc(k) + "=" + v)); + return "map " + map.size() + " " + map.isEmpty() + " | " + entries; + } + static String mutation(Object2ObjectOpenHashMap<Key, Integer> map, List<Key> keys, JsonArray op) { + int index = op.get(1).getAsInt(); + Key key = index < 0 ? null : keys.get(index); + return switch (op.get(0).getAsString()) { + case "put" -> "put " + map.put(key, value(op.get(2))); + case "remove" -> "remove " + map.remove(key); + case "contains" -> "contains " + map.containsKey(key); + case "get" -> "get " + map.get(key); + case "clear" -> { map.clear(); yield "clear"; } + default -> throw new AssertionError(); + }; + } + public static void main(String[] args) throws Exception { + Path dir = Path.of(args[1]); + try (var out = new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0] + ".txt"))); + var lines = Files.lines(dir.resolve("inputs.txt"))) { + for (var line : (Iterable<String>) lines::iterator) { + var f = JsonParser.parseString(line).getAsJsonObject(); + var keys = new ArrayList<Key>(); + for (var h : f.getAsJsonArray("hashes")) { + int i = keys.size(); + keys.add(new Key(f.getAsJsonArray("ids").get(i).getAsInt(), h.getAsInt(), i)); + } + var map = new Object2ObjectOpenHashMap<Key, Integer>(); + Iterator<Map.Entry<Key, Integer>> cursor = map.entrySet().iterator(); + var entries = new ArrayList<Map.Entry<Key, Integer>>(); + for (var ov : f.getAsJsonArray("ops")) { + var op = ov.getAsJsonArray(); + try { + switch (op.get(0).getAsString()) { + case "put", "remove", "contains", "get", "clear" -> out.println(mutation(map, keys, op)); + case "cursor" -> { cursor = map.entrySet().iterator(); out.println("cursor"); } + case "next", "force-next" -> { + if (cursor.hasNext() || op.get(0).getAsString().equals("force-next")) { + var entry = cursor.next(); + entries.add(entry); + out.println("next " + (entries.size() - 1) + " " + desc(entry.getKey()) + "=" + entry.getValue()); + } else out.println("next none"); + } + case "delete" -> { cursor.remove(); out.println("delete"); } + case "entry-key" -> out.println("entry-key " + desc(entries.get(op.get(1).getAsInt()).getKey())); + case "entry-value" -> out.println("entry-value " + entries.get(op.get(1).getAsInt()).getValue()); + case "entry-set" -> out.println("entry-set " + entries.get(op.get(1).getAsInt()).setValue(value(op.get(2)))); + case "each" -> { + int[] calls = {0}; + map.forEach((k, v) -> { + int call = calls[0]; + out.println("visit " + call + " " + desc(k) + "=" + v); + var actions = op.get(1).getAsJsonArray(); + if (call < actions.size()) { + for (var av : actions.get(call).getAsJsonArray()) { + var action = av.getAsJsonArray(); + if (action.get(0).getAsString().equals("fail")) throw new CallbackFailure(); + out.println("callback " + mutation(map, keys, action)); + out.println(snapshot(map)); + } + } + calls[0]++; + }); + out.println("each"); + } + default -> throw new AssertionError(); + } + } catch (CallbackFailure e) { out.println("error callback"); + } catch (IllegalStateException e) { out.println("error current"); + } catch (NoSuchElementException e) { out.println("next none"); + } catch (NullPointerException e) { out.println("error null"); + } catch (IndexOutOfBoundsException e) { out.println("error bounds"); } + out.println(snapshot(map) + " | cursor " + cursor.hasNext()); + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaObjectOpenSetOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaObjectOpenSetOracle.java new file mode 100644 index 000000000..4a23331ee --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaObjectOpenSetOracle.java @@ -0,0 +1,12 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.nio.file.*;import java.util.*;import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; +/** Actual default fastutil set used for pending attribute updates. */ +public final class VanillaObjectOpenSetOracle { + record Key(int id,int hash,int object){@Override public int hashCode(){return hash;}@Override public boolean equals(Object o){return o instanceof Key k&&id==k.id;}} + static String desc(Key key){return key==null?"null":key.id()+":"+key.object();} + public static void main(String[] args)throws Exception{Path dir=Path.of(args[1]);try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var keys=new ArrayList<Key>();for(var h:f.getAsJsonArray("hashes")){int i=keys.size();keys.add(new Key(f.getAsJsonArray("ids").get(i).getAsInt(),h.getAsInt(),i));}var set=new ObjectOpenHashSet<Key>();Iterator<Key> cursor=set.iterator();for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonArray();int index=op.get(1).getAsInt();Key key=index<0?null:keys.get(index);try{switch(op.get(0).getAsString()){ + case "add"->out.println("add "+set.add(key));case "remove"->out.println("remove "+set.remove(key));case "contains"->out.println("contains "+set.contains(key));case "get"->out.println("get "+desc(set.get(key)));case "clear"->{set.clear();out.println("clear");}case "cursor"->{cursor=set.iterator();out.println("cursor");}case "next"->{if(cursor.hasNext())out.println("next "+desc(cursor.next()));else out.println("next none");}case "force-next"->out.println("next "+desc(cursor.next()));case "delete"->{cursor.remove();out.println("delete");}default->throw new AssertionError();} + }catch(IllegalStateException e){out.println("error current");}catch(NoSuchElementException e){out.println("next none");}catch(NullPointerException e){out.println("error null");}catch(IndexOutOfBoundsException e){out.println("error bounds");} + var entries=new StringJoiner(",");set.forEach(k->entries.add(desc(k)));out.println("set "+set.size()+" "+set.isEmpty()+" "+cursor.hasNext()+" | "+entries); + }}}} +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPistonMovementOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPistonMovementOracle.java new file mode 100644 index 000000000..feb36cda5 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPistonMovementOracle.java @@ -0,0 +1,31 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.phys.Vec3; +/** Actual Entity piston limiter with sequential tick/movement inputs. */ +public final class VanillaPistonMovementOracle { + static final class Stop extends RuntimeException {} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static Vec3 vector(JsonElement v){var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static final class Level extends net.minecraft.server.level.ServerLevel { + JsonObject op;PrintWriter out;int calls; + private Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public long getGameTime(){out.println("time");calls++;if(op.get("fail").getAsBoolean())throw new Stop();return op.get("time").getAsLong();} + } + static final class Actor extends Marker {Actor(){super(null,null);}void configure(Level level){setLevel(level);}Vec3 limit(Vec3 v){return limitPistonMovement(v);}} + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var allocator=Class.forName("sun.misc.Unsafe");var field=allocator.getDeclaredField("theUnsafe");field.setAccessible(true);var unsafe=field.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + var deltas=Entity.class.getDeclaredField("pistonDeltas");deltas.setAccessible(true);var time=Entity.class.getDeclaredField("pistonDeltasGameTime");time.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){ + for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var level=(Level)allocate.invoke(unsafe,Level.class);level.out=out;var entity=(Actor)allocate.invoke(unsafe,Actor.class);entity.configure(level);var d=vector(f.get("deltas"));deltas.set(entity,new double[]{d.x,d.y,d.z});time.setLong(entity,f.get("time").getAsLong()); + for(var value:f.getAsJsonArray("ops")){var op=value.getAsJsonObject();level.op=op;level.calls=0;try{var result=entity.limit(vector(op.get("movement")));out.printf("movement %016x %016x %016x%n",Double.doubleToLongBits(result.x),Double.doubleToLongBits(result.y),Double.doubleToLongBits(result.z));}catch(Stop error){out.println("error");}var accumulated=(double[])deltas.get(entity);out.printf("deltas %016x %016x %016x%n",Double.doubleToLongBits(accumulated[0]),Double.doubleToLongBits(accumulated[1]),Double.doubleToLongBits(accumulated[2]));out.println("tick "+time.getLong(entity));out.println("queries "+level.calls);} + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPistonShapeOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPistonShapeOracle.java new file mode 100644 index 000000000..4df179e17 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPistonShapeOracle.java @@ -0,0 +1,41 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import net.minecraft.core.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.piston.PistonMovingBlockEntity; +import net.minecraft.world.phys.shapes.*; +/** Executes native moving-piston collision and interpolation with actual registry states. */ +public final class VanillaPistonShapeOracle { + private static final class Stop extends RuntimeException {} + private static Field field(String name)throws Exception {var f=PistonMovingBlockEntity.class.getDeclaredField(name);f.setAccessible(true);return f;} + private static float number(JsonElement value){return Float.intBitsToFloat(Integer.parseUnsignedInt(value.getAsString(),16));} + @SuppressWarnings("unchecked") public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + if(args[0].equals("export")){VanillaCollisionOracle.main(new String[]{"generate",args[1]});VanillaBlockStateCodecOracle.main(new String[]{"export",dir.resolve("facts.json").toString()});return;} + var progress=field("progress");var previous=field("progressO");var noclip=(ThreadLocal<Direction>)field("NOCLIP").get(null); + var related=PistonMovingBlockEntity.class.getDeclaredMethod("getCollisionRelatedBlockState");related.setAccessible(true); + var movement=PistonMovingBlockEntity.class.getDeclaredMethod("getMovementDirection");movement.setAccessible(true); + var emit=VanillaFaceSupportOracle.class.getDeclaredMethod("emit",PrintWriter.class,VoxelShape.class);emit.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var inputs=Files.lines(dir.resolve("inputs.txt"))) { + for(var line:(Iterable<String>)inputs::iterator) { + var f=JsonParser.parseString(line).getAsJsonObject();var v=f.getAsJsonArray("position");var p=new BlockPos(v.get(0).getAsInt(),v.get(1).getAsInt(),v.get(2).getAsInt()); + var direction=Direction.values()[f.get("direction").getAsInt()];var moved=Block.stateById(f.get("state").getAsInt()); + var piston=new PistonMovingBlockEntity(p,Blocks.MOVING_PISTON.defaultBlockState(),moved,direction,f.get("extending").getAsBoolean(),f.get("source").getAsBoolean());progress.setFloat(piston,number(f.get("progress")));previous.setFloat(piston,number(f.get("previous")));float partial=number(f.get("partial")); + int clip=f.get("noclip").getAsInt();noclip.set(clip<0?null:Direction.values()[clip]);int[] calls={0}; + var world=(BlockGetter)Proxy.newProxyInstance(BlockGetter.class.getClassLoader(),new Class<?>[]{BlockGetter.class},(proxy,method,values)->{ + if(!method.getName().equals("getBlockEntity"))throw new AssertionError(method);var at=(BlockPos)values[0];out.println("entity "+at.getX()+" "+at.getY()+" "+at.getZ());if(calls[0]++==f.get("fail").getAsInt())throw new Stop();return null; + }); + try { + out.printf("motion %d %08x %08x %08x %08x%n",((Direction)movement.invoke(piston)).ordinal(),Float.floatToIntBits(piston.getProgress(partial)),Float.floatToIntBits(piston.getXOff(partial)),Float.floatToIntBits(piston.getYOff(partial)),Float.floatToIntBits(piston.getZOff(partial))); + out.println("related "+Block.getId((net.minecraft.world.level.block.state.BlockState)related.invoke(piston))); + if(!f.get("kinematic").getAsBoolean())try {emit.invoke(null,out,piston.getCollisionShape(world,p));}catch(Stop error){out.println("shape error");} + out.println("queries "+calls[0]); + } finally {noclip.remove();} + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java new file mode 100644 index 000000000..1d4b3262a --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java @@ -0,0 +1,160 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import java.io.PrintWriter; +import java.lang.reflect.Method; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.resources.Identifier; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.util.RandomSource; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.levelgen.LegacyRandomSource; +import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.Vec3; +import net.minecraft.world.phys.shapes.CollisionContext; + +/** + * Native BlockItem placement-state selection (BlockPlaceContext resolution, + * updatePlacementContext and getPlacementState) over generated neighbourhoods. + * Entities never obstruct; nothing is written to the world. + */ +public final class VanillaPlacementOracle { + static Object unsafe; + static Method allocate; + static int errors; + static final Set<BlockItem> bound = new HashSet<>(); + + static <T> T make(Class<T> type) { + try { + return type.cast(allocate.invoke(unsafe, type)); + } catch (Exception e) { + throw new AssertionError(e); + } + } + + static final class FakePlayer extends ServerPlayer { + float yaw, pitch; + boolean sneak; + World world; + ItemStack held; + FakePlayer() { + super(null, null, null, null); + } + @Override public float getViewXRot(final float a) { return pitch; } + @Override public float getViewYRot(final float a) { return yaw; } + @Override public float getXRot() { return pitch; } + @Override public float getYRot() { return yaw; } + @Override public Direction getDirection() { return Direction.fromYRot(yaw); } + @Override public boolean isSecondaryUseActive() { return sneak; } + @Override public boolean isShiftKeyDown() { return sneak; } + @Override public boolean isDescending() { return sneak; } + @Override public ItemStack getMainHandItem() { return held; } + @Override public boolean canUseGameMasterBlocks() { return false; } + @Override public net.minecraft.server.level.ServerLevel level() { return world; } + } + + static final class World extends net.minecraft.server.level.ServerLevel { + Map<BlockPos, BlockState> cells; + RandomSource random; + World() { + super(null, null, null, null, null, null, false, 0L, List.of(), false); + } + @Override public BlockState getBlockState(BlockPos p) { return cells.getOrDefault(p, net.minecraft.world.level.block.Blocks.AIR.defaultBlockState()); } + @Override public FluidState getFluidState(BlockPos p) { return getBlockState(p).getFluidState(); } + @Override public net.minecraft.world.level.block.entity.BlockEntity getBlockEntity(BlockPos p) { return null; } + @Override public boolean isClientSide() { return false; } + @Override public RandomSource getRandom() { return random; } + @Override public int getMinY() { return -64; } + @Override public int getHeight() { return 384; } + @Override public boolean isUnobstructed(BlockState state, BlockPos pos, CollisionContext context) { return true; } + @Override public boolean isUnobstructed(Entity entity) { return true; } + @Override public void scheduleTick(BlockPos pos, Block block, int delay) { } + @Override public net.minecraft.core.RegistryAccess registryAccess() { return RegistryAccess.fromRegistryOfRegistries(BuiltInRegistries.REGISTRY); } + @Override public net.minecraft.world.flag.FeatureFlagSet enabledFeatures() { return net.minecraft.world.flag.FeatureFlags.DEFAULT_FLAGS; } + @Override public net.minecraft.world.level.border.WorldBorder getWorldBorder() { return new net.minecraft.world.level.border.WorldBorder(); } + @Override public void gameEvent(net.minecraft.core.Holder<net.minecraft.world.level.gameevent.GameEvent> e, BlockPos p, net.minecraft.world.level.gameevent.GameEvent.Context c) { } + @Override public int getSeaLevel() { return 63; } + @Override public int getBrightness(net.minecraft.world.level.LightLayer layer, BlockPos p) { return layer == net.minecraft.world.level.LightLayer.SKY ? 15 : 0; } + @Override public int getRawBrightness(BlockPos p, int darkening) { return 15 - darkening; } + @Override public int getSkyDarken() { return 0; } + @Override public List<Entity> getEntities(Entity except, net.minecraft.world.phys.AABB box, java.util.function.Predicate<? super Entity> filter) { return List.of(); } + } + + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion(); + net.minecraft.server.Bootstrap.bootStrap(); + Path resources = Path.of(args[0]); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(resources.resolve("block-tags.json"))).getAsJsonObject()); + VanillaLevelShapeOracle.bindFluidTags(resources.resolve("data/minecraft/tags/fluid")); + var position = Entity.class.getDeclaredField("position"); + position.setAccessible(true); + var allocator = Class.forName("sun.misc.Unsafe"); + var field = allocator.getDeclaredField("theUnsafe"); + field.setAccessible(true); + unsafe = field.get(null); + allocate = allocator.getMethod("allocateInstance", Class.class); + Method getPlacementState = BlockItem.class.getDeclaredMethod("getPlacementState", BlockPlaceContext.class); + getPlacementState.setAccessible(true); + try (var out = new PrintWriter(Files.newBufferedWriter(Path.of(args[2]))); var lines = Files.lines(Path.of(args[1]))) { + for (var line : (Iterable<String>) lines::iterator) { + var f = JsonParser.parseString(line).getAsJsonObject(); + var world = make(World.class); + world.cells = new HashMap<>(); + for (var cell : f.getAsJsonArray("cells")) { + var c = cell.getAsJsonArray(); + world.cells.put(new BlockPos(c.get(0).getAsInt(), c.get(1).getAsInt(), c.get(2).getAsInt()), Block.stateById(c.get(3).getAsInt())); + } + world.random = new LegacyRandomSource(f.get("seed").getAsLong()); + var player = make(FakePlayer.class); + player.world = world; + player.yaw = f.get("yaw").getAsFloat(); + player.pitch = f.get("pitch").getAsFloat(); + player.sneak = f.get("sneak").getAsBoolean(); + position.set(player, Vec3.ZERO); + var item = (BlockItem) BuiltInRegistries.ITEM.getValue(Identifier.parse(f.get("item").getAsString())); + if (bound.add(item)) { + item.builtInRegistryHolder().bindComponents(net.minecraft.core.component.DataComponentMap.EMPTY); + } + var h = f.getAsJsonArray("hit"); + var p = f.getAsJsonArray("pos"); + var hit = new BlockHitResult(new Vec3(h.get(0).getAsDouble(), h.get(1).getAsDouble(), h.get(2).getAsDouble()), + Direction.from3DDataValue(f.get("face").getAsInt()), new BlockPos(p.get(0).getAsInt(), p.get(1).getAsInt(), p.get(2).getAsInt()), false); + String result; + try { + player.held = new ItemStack(item); + var context = new BlockPlaceContext(player, InteractionHand.MAIN_HAND, player.held, hit); + if (!context.canPlace()) { + result = "none"; + } else { + var updated = item.updatePlacementContext(context); + if (updated == null) { + result = "none"; + } else { + var state = (BlockState) getPlacementState.invoke(item, updated); + var at = updated.getClickedPos(); + result = state == null ? "none" : at.getX() + "," + at.getY() + "," + at.getZ() + " " + Block.getId(state); + } + } + } catch (Exception | AssertionError e) { + Throwable cause = e instanceof java.lang.reflect.InvocationTargetException ite ? ite.getCause() : e; + result = "error " + cause.getClass().getSimpleName(); + if (errors++ < 3) { + cause.printStackTrace(); + } + } + out.println("place " + result); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerEquipmentOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerEquipmentOracle.java new file mode 100644 index 000000000..d26528a66 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerEquipmentOracle.java @@ -0,0 +1,26 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.component.*;import net.minecraft.world.item.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.*;import net.minecraft.world.InteractionHand; +/** Real player equipment and inherited hand access through its selected slot. */ +public final class VanillaPlayerEquipmentOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate;static Field count,eqItems,inventory,entityEquipment;static Item[] items; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static int n(JsonObject o,String k){return o.get(k).getAsInt();} + static int type(Item item){for(int i=0;i<items.length;i++)if(items[i]==item)return i;throw new AssertionError();} + static final class Data { + PrintWriter out;JsonObject op;ItemStack[] refs;Inventory inv;PlayerEquipment equipment;Actor actor;int calls;IdentityHashMap<ItemStack,Integer> ids=new IdentityHashMap<>(); + int id(ItemStack s){return ids.computeIfAbsent(s,k->ids.size());} + String snapshot(ItemStack s){try{return id(s)+":"+type(s.getItem())+":"+count.getInt(s)+":"+s.getCount()+":"+s.getPopTime()+":"+s.isEmpty();}catch(Exception e){throw new AssertionError(e);}} + void all(){try{for(int i=0;i<refs.length;i++)out.println("ref "+i+" "+snapshot(refs[i]));out.println("state "+inv.getSelectedSlot()+" "+calls+" "+equipment.isEmpty());var slots=new StringJoiner(" | ");for(int i=0;i<43;i++)slots.add(snapshot(inv.getItem(i)));out.println("slots "+slots);var entries=new StringJoiner(" | ");for(var e:((EnumMap<EquipmentSlot,ItemStack>)eqItems.get(equipment)).entrySet())entries.add(e.getKey().name()+"="+snapshot(e.getValue()));out.println("raw-equipment "+entries);var equipped=new StringJoiner(" | ");for(var s:EquipmentSlot.values())equipped.add(snapshot(actor.getItemBySlot(s)));out.println("equipped "+equipped);out.println("hands "+snapshot(actor.getMainHandItem())+" | "+snapshot(actor.getOffhandItem()));out.println("empty "+snapshot(ItemStack.EMPTY));}catch(Exception e){throw new AssertionError(e);}} + void event(EquipmentSlot slot,ItemStack old,ItemStack next){calls++;out.println("equip "+slot.ordinal()+" "+id(old)+" "+id(next));all();if(op.get("fail").getAsBoolean())throw new Stop();if(op.get("mutate").getAsBoolean()){refs[n(op,"mutate_ref")].setCount(n(op,"after_count"));inv.setSelectedSlot(n(op,"after_selected"));inv.setItem(n(op,"replace_slot"),refs[n(op,"replace_ref")]);}} + } + static final class Actor extends Player {Data d;Actor(){super(null,null);}@Override public net.minecraft.world.level.GameType gameMode(){return net.minecraft.world.level.GameType.SURVIVAL;}@Override public boolean isSpectator(){return false;}@Override public boolean isCreative(){return false;}@Override public void onEquipItem(EquipmentSlot slot,ItemStack old,ItemStack next){d.event(slot,old,next);}} + @SuppressWarnings("unchecked")public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);count=field(ItemStack.class,"count");eqItems=field(EntityEquipment.class,"items");inventory=field(Player.class,"inventory");entityEquipment=field(LivingEntity.class,"equipment");items=new Item[]{Items.AIR,Items.STICK,Items.SHIELD};for(var item:items)item.builtInRegistryHolder().bindComponents(DataComponentMap.EMPTY);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.out=out;d.ids.put(ItemStack.EMPTY,0);ItemStack.EMPTY.setCount(0);ItemStack.EMPTY.setPopTime(0);d.actor=make(Actor.class);d.actor.d=d;d.refs=new ItemStack[4];for(int i=0;i<4;i++){var v=f.getAsJsonArray("stacks").get(i).getAsJsonObject();int item=n(v,"item");d.refs[i]=item<0?ItemStack.EMPTY:new ItemStack(items[item],n(v,"count"));if(item>=0)d.refs[i].setPopTime(n(v,"pop"));}d.equipment=new PlayerEquipment(d.actor);d.inv=new Inventory(d.actor,d.equipment);inventory.set(d.actor,d.inv);entityEquipment.set(d.actor,d.equipment);d.inv.setSelectedSlot(n(f,"selected"));for(var e:f.getAsJsonArray("slots")){var p=e.getAsJsonArray();d.inv.setItem(p.get(0).getAsInt(),d.refs[p.get(1).getAsInt()]);}for(var e:f.getAsJsonArray("equipment")){var p=e.getAsJsonArray();d.equipment.set(EquipmentSlot.values()[p.get(0).getAsInt()],d.refs[p.get(1).getAsInt()]);}for(var e:f.getAsJsonArray("raw_entries")){var p=e.getAsJsonArray();((EnumMap<EquipmentSlot,ItemStack>)eqItems.get(d.equipment)).put(EquipmentSlot.values()[p.get(0).getAsInt()],d.refs[p.get(1).getAsInt()]);}d.all();for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonObject();d.op=op;d.calls=0;int a=n(op,"a"),b=n(op,"b"),slot=n(op,"slot");try{switch(op.get("kind").getAsString()){ + case "get-hand":d.refs[b]=d.actor.getItemInHand(InteractionHand.values()[n(op,"hand")]);break;case "set-hand":d.actor.setItemInHand(InteractionHand.values()[n(op,"hand")],d.refs[a]);break;case "get-item":d.refs[b]=d.actor.getItemBySlot(EquipmentSlot.values()[n(op,"equipment")]);break;case "set-item":d.actor.setItemSlot(EquipmentSlot.values()[n(op,"equipment")],d.refs[a]);break;case "set-equipment":d.refs[b]=d.equipment.set(EquipmentSlot.values()[n(op,"equipment")],d.refs[a]);break;case "clear-equipment":d.equipment.clear();break;case "clear":d.inv.clearContent();break;case "select":d.inv.setSelectedSlot(slot);break;case "get":d.refs[b]=d.inv.getItem(slot);break;case "set":d.inv.setItem(slot,d.refs[a]);break;case "count":d.refs[a].setCount(n(op,"amount"));break;case "alias":d.refs[b]=d.refs[a];break;case "copy":d.refs[b]=d.refs[a].copy();break;default:throw new AssertionError();}out.println("result ok "+d.calls);}catch(Stop|IllegalArgumentException|IndexOutOfBoundsException e){out.println("result error "+d.calls);}d.all();}} + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerFoodOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerFoodOracle.java new file mode 100644 index 000000000..4ec98769b --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerFoodOracle.java @@ -0,0 +1,26 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.world.food.FoodData;import net.minecraft.world.entity.player.*;import net.minecraft.world.level.Level;import net.minecraft.server.level.ServerLevel; +/** Actual player hunger guards, including direct versus virtual storage. */ +public final class VanillaPlayerFoodOracle { + static final class Stop extends RuntimeException {} + static Field foodField,abilitiesField,exhaustion; + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static final class Data {JsonObject f;PrintWriter out;int calls;boolean changed;Actor actor;Food[] foods;Abilities direct,virtual;Level level; + JsonObject state(){return f.getAsJsonObject(changed?"after":"initial");} + void reset(){var s=state();direct.invulnerable=s.get("invulnerable").getAsBoolean();virtual.mayfly=s.get("mayfly").getAsBoolean();virtual.invulnerable=!direct.invulnerable;try{foodField.set(actor,foods[s.get("direct").getAsInt()]);for(int i=0;i<2;i++){var v=s.getAsJsonArray("foods").get(i).getAsJsonObject();foods[i].setFoodLevel(v.get("food").getAsInt());exhaustion.setFloat(foods[i],single(v.get("exhaustion")));}}catch(Exception e){throw new AssertionError(e);}} + void query(String s){if(f.get("stored").getAsBoolean())return;out.println(s);int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt()){changed=true;reset();}} + } + static final class Food extends FoodData {Data d;int id;@Override public boolean hasEnoughFood(){d.query("enough "+id);return super.hasEnoughFood();}@Override public boolean needsFood(){d.query("needs "+id);return super.needsFood();}@Override public void addExhaustion(float v){d.query("exhaust "+id+" "+bits(v));super.addExhaustion(v);}} + static final class Server extends ServerLevel {Data d;Server(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public boolean isClientSide(){d.query("client");return d.state().get("client").getAsBoolean();}} + static final class Actor extends Player {Data d;Actor(){super(null,null);}@Override public net.minecraft.world.level.GameType gameMode(){return net.minecraft.world.level.GameType.SURVIVAL;}@Override public Level level(){d.query("level");return d.level;}@Override public FoodData getFoodData(){d.query("food");return d.foods[d.state().get("virtual").getAsInt()];}@Override public Abilities getAbilities(){d.query("abilities");return d.virtual;}boolean enough(){return hasEnoughFoodToDoExhaustiveManoeuvres();}} + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");var uf=u.getDeclaredField("theUnsafe");uf.setAccessible(true);var unsafe=uf.get(null);var allocate=u.getMethod("allocateInstance",Class.class);foodField=field(Player.class,"foodData");abilitiesField=field(Player.class,"abilities");exhaustion=field(FoodData.class,"exhaustionLevel");Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;d.actor=(Actor)allocate.invoke(unsafe,Actor.class);d.actor.d=d;var level=(Server)allocate.invoke(unsafe,Server.class);level.d=d;d.level=level;d.foods=new Food[]{new Food(),new Food()};for(int i=0;i<2;i++){d.foods[i].d=d;d.foods[i].id=i;}d.direct=new Abilities();d.virtual=new Abilities();abilitiesField.set(d.actor,d.direct);d.reset(); + try{switch(f.get("mode").getAsString()){case "exhaust":d.actor.causeFoodExhaustion(single(f.get("amount")));break;case "eat":out.println("bool "+d.actor.canEat(f.get("always").getAsBoolean()));break;case "enough":out.println("bool "+d.actor.enough());break;default:throw new AssertionError();}out.println("result ok");}catch(Stop e){out.println("result error");} + for(int i=0;i<2;i++)out.println("food "+i+" "+d.foods[i].getFoodLevel()+" "+bits(exhaustion.getFloat(d.foods[i])));out.println("queries "+d.calls); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerHealthOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerHealthOracle.java new file mode 100644 index 000000000..3a19afd71 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerHealthOracle.java @@ -0,0 +1,39 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.registries.*;import net.minecraft.resources.Identifier;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.Player;import net.minecraft.world.entity.ai.attributes.*;import net.minecraft.network.syncher.*; +/** Actual player health/absorption on one native synchronized table. */ +public final class VanillaPlayerHealthOracle { + static final class Stop extends RuntimeException {} + static EntityDataAccessor<Float> healthKey,absorptionKey; + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static String values(List<SynchedEntityData.DataValue<?>> values){if(values==null)return "none";var s=new StringJoiner(",");for(var v:values)s.add(v.id()+":"+bits((Float)v.value()));return s.length()==0?"empty":s.toString();} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static final class Data {JsonObject op;PrintWriter out;AttributeMap attributes;SynchedEntityData data;int calls; + void event(String s){out.println(s);if(calls++==op.get("fail").getAsInt())throw new Stop();}} + static final class Actor extends Player {Data d;Actor(){super(null,null);}@Override public net.minecraft.world.level.GameType gameMode(){return net.minecraft.world.level.GameType.SURVIVAL;} + @Override public double getAttributeValue(Holder<Attribute> a){return d.attributes.getValue(a);} + @Override public void onSyncedDataUpdated(EntityDataAccessor<?> a){var key=a.id()==healthKey.id()?healthKey:absorptionKey;d.event("updated "+key.id()+" "+bits(d.data.get(key))+" "+d.data.isDirty());if(d.op.get("pack_callback").getAsBoolean())d.out.println("callback-pack "+values(d.data.packDirty()));} + @Override public void onSyncedDataUpdated(List<SynchedEntityData.DataValue<?>> v){d.event("assigned "+values(v));} + } + @SuppressWarnings("unchecked") public static void main(String[] args)throws Exception { + Path dir=Path.of(args[1]);if(args[0].equals("export"))VanillaEntityAttributeOracle.main(args);else{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();} + healthKey=(EntityDataAccessor<Float>)field(LivingEntity.class,"DATA_HEALTH_ID").get(null);absorptionKey=(EntityDataAccessor<Float>)field(Player.class,"DATA_PLAYER_ABSORPTION_ID").get(null);if(args[0].equals("export")){var ids=new JsonObject();ids.addProperty("health",healthKey.id());ids.addProperty("absorption",absorptionKey.id());Files.writeString(dir.resolve("ids.json"),ids.toString());return;} + var u=Class.forName("sun.misc.Unsafe");var uf=u.getDeclaredField("theUnsafe");uf.setAccessible(true);var unsafe=uf.get(null);var allocate=u.getMethod("allocateInstance",Class.class);var ctor=SynchedEntityData.class.getDeclaredConstructor(SyncedDataHolder.class,SynchedEntityData.DataItem[].class);ctor.setAccessible(true);var storage=field(Entity.class,"entityData");var dead=field(LivingEntity.class,"dead");var keys=List.of(Attributes.MAX_HEALTH,Attributes.MAX_ABSORPTION); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.out=out;d.attributes=new AttributeMap(VanillaEntityAttributeOracle.supplier(BuiltInRegistries.ENTITY_TYPE.getValue(Identifier.parse("minecraft:player"))));var actor=(Actor)allocate.invoke(unsafe,Actor.class);actor.d=d; + var items=new SynchedEntityData.DataItem<?>[Math.max(healthKey.id(),absorptionKey.id())+1];for(int i=0;i<items.length;i++)items[i]=new SynchedEntityData.DataItem<Float>(new EntityDataAccessor<Float>(i,EntityDataSerializers.FLOAT),0f);var health=new SynchedEntityData.DataItem<Float>(healthKey,single(f.get("health")));var absorption=new SynchedEntityData.DataItem<Float>(absorptionKey,single(f.get("absorption")));items[healthKey.id()]=health;items[absorptionKey.id()]=absorption;d.data=ctor.newInstance(actor,items);storage.set(actor,d.data);dead.setBoolean(actor,f.get("dead").getAsBoolean()); + for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonObject();d.op=op;d.calls=0;var key=keys.get(op.get("attribute").getAsInt());float v=single(op.get("value"));try{switch(op.get("mode").getAsString()){ + case "set":actor.setHealth(v);break;case "heal":actor.heal(v);break;case "absorption":actor.setAbsorptionAmount(v);break;case "get-absorption":out.println("float "+bits(actor.getAbsorptionAmount()));break; + case "hurt":out.println("bool "+actor.isHurt());break;case "dead":out.println("bool "+actor.isDeadOrDying());break; + case "base":d.attributes.getInstance(key).setBaseValue(number(op.get("amount")));break; + case "add":d.attributes.getInstance(key).addOrUpdateTransientModifier(new AttributeModifier(Identifier.parse(op.get("id").getAsString()),number(op.get("amount")),AttributeModifier.Operation.values()[op.get("operation").getAsInt()]));break; + case "remove":d.attributes.getInstance(key).removeModifier(Identifier.parse(op.get("id").getAsString()));break;case "reset":d.attributes.resetBaseValue(key);break; + case "pack":out.println("packed "+values(d.data.packDirty()));break;case "defaults":out.println("defaults "+values(d.data.getNonDefaultValues()));break; + case "assign":{var data=new ArrayList<SynchedEntityData.DataValue<?>>();for(var x:op.getAsJsonArray("values")){var e=x.getAsJsonObject();data.add(new SynchedEntityData.DataValue<Float>(e.get("field").getAsInt()==0?healthKey.id():absorptionKey.id(),EntityDataSerializers.FLOAT,single(e.get("value"))));}d.data.assignValues(data);break;} + default:throw new AssertionError();}out.println("result ok");}catch(Stop e){out.println("result error");} + out.println("state "+bits(health.getValue())+" "+bits(absorption.getValue())+" "+d.data.isDirty()+" "+health.isDirty()+" "+absorption.isDirty()+" "+health.isSetToDefault()+" "+absorption.isSetToDefault()+" "+d.calls); + } + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerHurtOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerHurtOracle.java new file mode 100644 index 000000000..76e207b01 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerHurtOracle.java @@ -0,0 +1,90 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.lang.invoke.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.core.registries.*;import net.minecraft.resources.*;import net.minecraft.tags.*;import net.minecraft.world.InteractionHand;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.*;import net.minecraft.world.damagesource.*;import net.minecraft.world.effect.*;import net.minecraft.world.item.*;import net.minecraft.world.item.component.*;import net.minecraft.server.level.*;import net.minecraft.server.PlayerAdvancements;import net.minecraft.sounds.*;import net.minecraft.stats.Stats; +/** Actual Player/ServerPlayer outer gates followed by native living hurt dispatch. */ +public final class VanillaPlayerHurtOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate;static ItemStack plain,shield;static Field stamp,lastSource,noAction,cooldown,lastHurt,duration,time; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static String state(LivingEntity a){try{return noAction.getInt(a)+" "+cooldown.getInt(a)+" "+bits(lastHurt.getFloat(a))+" "+duration.getInt(a)+" "+time.getInt(a)+" "+(lastSource.get(a)!=null)+" "+stamp.getLong(a);}catch(Exception e){throw new AssertionError(e);}} + static final class Data {JsonObject op;PrintWriter out;int calls,difficultyCalls;boolean hit;Abilities abilities;PlainPlayer attacker;Arrow arrow;Actor other;float recorded;Server level;PlayerAdvancements advancements;List<MobEffectInstance> effects; + boolean flag(String n){return op.get(n).getAsBoolean();}void event(String s){out.println(s);if(calls++==op.get("fail").getAsInt())throw new Stop();}} + static final class Source extends DamageSource {Data d;Source(){super(null);} + @Override public boolean is(TagKey<DamageType> tag){String n=tag==DamageTypeTags.IS_FIRE?"fire":tag==DamageTypeTags.IS_FREEZING?"freezing":tag==DamageTypeTags.DAMAGES_HELMET?"damages_helmet":tag==DamageTypeTags.BYPASSES_COOLDOWN?"bypasses_cooldown":tag==DamageTypeTags.NO_IMPACT?"no_impact":tag==DamageTypeTags.NO_KNOCKBACK?"no_knockback":tag==DamageTypeTags.BYPASSES_INVULNERABILITY?"bypasses_invulnerability":null;if(n==null)throw new AssertionError();d.event("tag "+n);return d.flag(n);} + @Override public boolean is(ResourceKey<DamageType> k){if(k!=DamageTypes.THORNS)throw new AssertionError();d.event("thorns");return false;} + @Override public Entity getEntity(){d.event("attacker");return switch(d.op.get("attacker").getAsInt()){case 0->null;case 1->d.other;case 2->d.attacker;case 3->d.arrow;default->throw new AssertionError();};} + @Override public boolean scalesWithDifficulty(){d.event("scales");return d.flag("scales");}} + static final class PlainPlayer extends Player {PlainPlayer(){super(null,null);}@Override public net.minecraft.world.level.GameType gameMode(){return net.minecraft.world.level.GameType.SURVIVAL;}} + static final class Arrow extends net.minecraft.world.entity.projectile.arrow.Arrow {Data d;Arrow(){super(null,null);}@Override public Entity getOwner(){d.event("owner");return switch(d.op.get("owner").getAsInt()){case 0->null;case 1->d.attacker;case 2->d.other;default->throw new AssertionError();};}} + static final class Server extends ServerLevel {Data d;Server(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public void broadcastDamageEvent(Entity a,DamageSource s){d.event("broadcast");}@Override public net.minecraft.world.Difficulty getDifficulty(){d.event("difficulty");return net.minecraft.world.Difficulty.values()[d.op.getAsJsonArray("difficulties").get(d.difficultyCalls++).getAsInt()];}@Override public long getGameTime(){d.event("game-time");return d.op.get("game_time").getAsLong();}} + static final class Effect extends MobEffectInstance {Data d;int id;Effect(){super(MobEffects.RESISTANCE);}@Override public void onMobHurt(ServerLevel l,LivingEntity a,DamageSource s,float v){d.event("effect "+id+" "+bits(v));}} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Actor(){super(null,null);} + + Data d; + @Override public boolean isInvulnerableTo(ServerLevel l,DamageSource s){d.event("invulnerable");return d.flag("invulnerable");} + @Override public boolean isDeadOrDying(){d.event("dead");return d.flag(d.hit?"dead_after":"dead_before");} + @Override public boolean hasEffect(Holder<MobEffect> e){if(e!=MobEffects.FIRE_RESISTANCE)throw new AssertionError();d.event("fire-resistance");return d.flag("fire_resistance");} + @Override public boolean isSleeping(){d.event("sleeping");return d.flag("sleeping");} + @Override public void stopSleeping(){d.event("wake");} + @Override public ItemStack getUseItem(){d.event("use-item");return d.flag("component")?shield:ItemStack.EMPTY;} + @Override public float applyItemBlocking(ServerLevel l,DamageSource s,float v){d.event("blocking "+bits(v));return single(d.op.get("blocked"));} + @Override public boolean is(TagKey<EntityType<?>> tag){if(tag!=EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES)throw new AssertionError();d.event("freeze-extra");return d.flag("freeze_extra");} + @Override public ItemStack getItemBySlot(EquipmentSlot slot){if(slot!=EquipmentSlot.HEAD)throw new AssertionError();d.event("helmet");return d.flag("helmet")?plain:ItemStack.EMPTY;} + @Override protected void hurtHelmet(DamageSource s,float v){d.event("hurt-helmet "+bits(v));} + @Override protected void actuallyHurt(ServerLevel l,DamageSource s,float v){d.event("hurt "+bits(v)+" "+state(this));d.hit=true;d.recorded=v;if(d.flag("mutate_hit")){damageCooldownTime=d.op.get("hit_cooldown").getAsInt();lastHurt=single(d.op.get("hit_last"));hurtDuration=d.op.get("hit_duration").getAsInt();hurtTime=d.op.get("hit_time").getAsInt();}} + @Override protected void resolveMobResponsibleForDamage(DamageSource s){d.event("resolve-mob");} + @Override protected Player resolvePlayerResponsibleForDamage(DamageSource s){d.event("resolve-player");return null;} + @Override protected void markHurt(){d.event("mark");} + @Override public void dealDefaultKnockback(DamageSource s,float v,boolean b){d.event("knockback "+bits(v)+" "+b);} + @Override public ItemStack getItemInHand(InteractionHand h){d.event("hand "+h.ordinal());return ItemStack.EMPTY;} + @Override protected SoundEvent getDeathSound(){d.event("death-sound");return null;} + @Override public void makeSound(SoundEvent e){d.event("make-sound");} + @Override public void die(DamageSource s){d.event("die");} + @Override protected void playHurtSound(DamageSource s){d.event("hurt-sound");} + @Override public ServerLevel level(){d.event("level");return d.level;} + @Override public Collection<MobEffectInstance> getActiveEffects(){d.event("effects");return d.effects;} + } + static final class Human extends ServerPlayer {Human(){super(null,null,null,null);} + + Data d; + @Override public boolean isInvulnerableTo(ServerLevel l,DamageSource s){d.event("invulnerable");return d.flag("invulnerable");} + @Override public boolean isDeadOrDying(){d.event("dead");return d.flag(d.hit?"dead_after":"dead_before");} + @Override public boolean hasEffect(Holder<MobEffect> e){if(e!=MobEffects.FIRE_RESISTANCE)throw new AssertionError();d.event("fire-resistance");return d.flag("fire_resistance");} + @Override public boolean isSleeping(){d.event("sleeping");return d.flag("sleeping");} + @Override public void stopSleeping(){d.event("wake");} + @Override public ItemStack getUseItem(){d.event("use-item");return d.flag("component")?shield:ItemStack.EMPTY;} + @Override public float applyItemBlocking(ServerLevel l,DamageSource s,float v){d.event("blocking "+bits(v));return single(d.op.get("blocked"));} + @Override public boolean is(TagKey<EntityType<?>> tag){if(tag!=EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES)throw new AssertionError();d.event("freeze-extra");return d.flag("freeze_extra");} + @Override public ItemStack getItemBySlot(EquipmentSlot slot){if(slot!=EquipmentSlot.HEAD)throw new AssertionError();d.event("helmet");return d.flag("helmet")?plain:ItemStack.EMPTY;} + @Override protected void hurtHelmet(DamageSource s,float v){d.event("hurt-helmet "+bits(v));} + @Override protected void actuallyHurt(ServerLevel l,DamageSource s,float v){d.event("hurt "+bits(v)+" "+state(this));d.hit=true;d.recorded=v;if(d.flag("mutate_hit")){damageCooldownTime=d.op.get("hit_cooldown").getAsInt();lastHurt=single(d.op.get("hit_last"));hurtDuration=d.op.get("hit_duration").getAsInt();hurtTime=d.op.get("hit_time").getAsInt();}} + @Override protected void resolveMobResponsibleForDamage(DamageSource s){d.event("resolve-mob");} + @Override protected Player resolvePlayerResponsibleForDamage(DamageSource s){d.event("resolve-player");return null;} + @Override protected void markHurt(){d.event("mark");} + @Override public void dealDefaultKnockback(DamageSource s,float v,boolean b){d.event("knockback "+bits(v)+" "+b);} + @Override public ItemStack getItemInHand(InteractionHand h){d.event("hand "+h.ordinal());return ItemStack.EMPTY;} + @Override protected SoundEvent getDeathSound(){d.event("death-sound");return null;} + @Override public void makeSound(SoundEvent e){d.event("make-sound");} + @Override public void die(DamageSource s){d.event("die");} + @Override protected void playHurtSound(DamageSource s){d.event("hurt-sound");} + @Override public ServerLevel level(){d.event("level");return d.level;} + @Override public Collection<MobEffectInstance> getActiveEffects(){d.event("effects");return d.effects;} + + @Override protected void removeEntitiesOnShoulder(){d.event("shoulders");}@Override public boolean canHarmPlayer(Player p){d.event("can-harm");return d.flag("can_harm");}@Override public PlayerAdvancements getAdvancements(){d.event("criterion");return d.advancements;} + @Override public void awardStat(Identifier s,int v){if(s!=Stats.DAMAGE_BLOCKED_BY_SHIELD)throw new AssertionError();d.event("blocked-stat "+v);} + } + public static void main(String[] args)throws Throwable { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class); + noAction=field(LivingEntity.class,"noActionTime");cooldown=field(LivingEntity.class,"damageCooldownTime");lastHurt=field(LivingEntity.class,"lastHurt");duration=field(LivingEntity.class,"hurtDuration");time=field(LivingEntity.class,"hurtTime");stamp=field(LivingEntity.class,"lastDamageStamp");lastSource=field(LivingEntity.class,"lastDamageSource"); + var ctor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);ctor.setAccessible(true);plain=(ItemStack)ctor.newInstance(BuiltInRegistries.ITEM.wrapAsHolder(Items.STICK),1,new PatchedDataComponentMap(DataComponentMap.EMPTY));shield=(ItemStack)ctor.newInstance(BuiltInRegistries.ITEM.wrapAsHolder(Items.SHIELD),1,new PatchedDataComponentMap(DataComponentMap.EMPTY));shield.set(DataComponents.BLOCKS_ATTACKS,new BlocksAttacks(0,1,List.of(),new BlocksAttacks.ItemDamageFunction(0,0,0),Optional.empty(),Optional.empty(),Optional.empty())); + var lookup=MethodHandles.privateLookupIn(Player.class,MethodHandles.lookup());var playerHurt=lookup.findSpecial(Player.class,"hurtServer",MethodType.methodType(boolean.class,ServerLevel.class,DamageSource.class,float.class),Player.class).asType(MethodType.methodType(boolean.class,LivingEntity.class,ServerLevel.class,DamageSource.class,float.class)); + var serverLookup=MethodHandles.privateLookupIn(ServerPlayer.class,MethodHandles.lookup());var serverHurt=serverLookup.findSpecial(ServerPlayer.class,"hurtServer",MethodType.methodType(boolean.class,ServerLevel.class,DamageSource.class,float.class),ServerPlayer.class).asType(MethodType.methodType(boolean.class,LivingEntity.class,ServerLevel.class,DamageSource.class,float.class)); + Path dir=Path.of(args[1]);try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.out=out;d.level=make(Server.class);d.level.d=d;d.advancements=make(PlayerAdvancements.class);field(PlayerAdvancements.class,"activeTriggers").set(d.advancements,new HashMap<>());var human=make(Human.class);human.d=d;LivingEntity actor=human;d.abilities=new Abilities();field(Player.class,"abilities").set(actor,d.abilities);d.attacker=make(PlainPlayer.class);d.other=make(Actor.class);d.other.d=d;d.arrow=make(Arrow.class);d.arrow.d=d;var hurt=f.get("server").getAsBoolean()?serverHurt:playerHurt;var source=make(Source.class);source.d=d; + noAction.setInt(actor,f.get("no_action").getAsInt());cooldown.setInt(actor,f.get("cooldown").getAsInt());lastHurt.setFloat(actor,single(f.get("last_hurt")));duration.setInt(actor,f.get("duration").getAsInt());time.setInt(actor,f.get("time").getAsInt());stamp.setLong(actor,f.get("stamp").getAsLong());if(f.get("source").getAsBoolean())lastSource.set(actor,source); + for(var ov:f.getAsJsonArray("ops")){d.op=ov.getAsJsonObject();d.calls=0;d.difficultyCalls=0;d.hit=false;d.abilities.invulnerable=d.flag("ability_invulnerable");d.effects=new ArrayList<>();for(int i=0;i<d.op.get("effects").getAsInt();i++){var e=make(Effect.class);e.d=d;e.id=i;d.effects.add(e);}try{boolean result=(boolean)hurt.invokeExact(actor,(ServerLevel)d.level,(DamageSource)source,single(d.op.get("damage")));out.println("bool "+result);out.println("result ok");}catch(Stop e){out.println("result error");}out.println("state "+state(actor)+" "+bits(d.recorded)+" "+d.hit+" "+d.calls);} + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerInventoryOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerInventoryOracle.java new file mode 100644 index 000000000..79ceee563 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerInventoryOracle.java @@ -0,0 +1,37 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.component.*;import net.minecraft.world.item.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.Inventory;import net.minecraft.world.item.enchantment.*; +/** Native Inventory storage/selection with real stack/component and equipment aliases. */ +@SuppressWarnings({"unchecked","rawtypes"}) +public final class VanillaPlayerInventoryOracle { + static Item[] items;static DataComponentType[] keys;static Field components,count,patchMap,equipmentItems,changed;static Object removed;static ItemEnchantments enchanted; + static EquipmentSlot[] mapped={EquipmentSlot.FEET,EquipmentSlot.LEGS,EquipmentSlot.CHEST,EquipmentSlot.HEAD,EquipmentSlot.OFFHAND,EquipmentSlot.BODY,EquipmentSlot.SADDLE}; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static int n(JsonObject o,String k){return o.get(k).getAsInt();} + static int key(Object k){for(int i=0;i<keys.length;i++)if(keys[i]==k)return i;throw new AssertionError();} + static int item(Item i){for(int k=0;k<items.length;k++)if(items[k]==i)return k;throw new AssertionError();} + static Object value(int k,JsonElement v){if(v.isJsonNull())return null;int n=v.getAsInt();return switch(k){case 3->net.minecraft.util.Unit.INSTANCE;case 4->n==0?ItemEnchantments.EMPTY:enchanted;case 5->net.minecraft.network.chat.Component.literal(Integer.toString(n));default->n;};} + static String text(int k,Object v){if(v==null||v==removed)return "none";return switch(k){case 3->"0";case 4->((ItemEnchantments)v).isEmpty()?"0":"1";case 5->((net.minecraft.network.chat.Component)v).getString();default->v.toString();};} + static DataComponentMap prototype(JsonArray a){var b=DataComponentMap.builder();for(var e:a){var p=e.getAsJsonArray();int k=p.get(0).getAsInt();b.set(keys[k],value(k,p.get(1)));}return b.build();} + static DataComponentPatch patch(JsonArray a){var b=DataComponentPatch.builder();for(var e:a){var p=e.getAsJsonArray();int k=p.get(0).getAsInt();if(p.get(1).isJsonNull())b.remove(keys[k]);else b.set(keys[k],value(k,p.get(1)));}return b.build();} + static final class Data { + PrintWriter out;ItemStack[] refs;Inventory[] inv;EntityEquipment[] equipment;IdentityHashMap<ItemStack,Integer> ids=new IdentityHashMap<>(); + int id(ItemStack s){return ids.computeIfAbsent(s,k->ids.size());} + String snapshot(ItemStack s){try{var raw=(PatchedDataComponentMap)components.get(s);var p=new StringJoiner(",");for(var e:((Map<?,?>)patchMap.get(raw.asPatch())).entrySet())p.add(key(e.getKey())+"="+text(key(e.getKey()),e.getValue()));var v=new StringJoiner(",");for(int k=0;k<keys.length;k++)v.add(text(k,s.get(keys[k])));return id(s)+":"+item(s.getItem())+":"+count.getInt(s)+":"+s.getCount()+":"+s.getPopTime()+":"+s.isEmpty()+":"+s.isDamaged()+":"+s.isEnchanted()+":"+v+":"+p;}catch(Exception e){throw new AssertionError(e);}} + void all()throws Exception { + for(int i=0;i<refs.length;i++)out.println("ref "+i+" "+snapshot(refs[i])); + for(int i=0;i<2;i++){var c=inv[i];out.println("inventory "+i+" "+c.getSelectedSlot()+" "+c.getTimesChanged()+" "+c.getFreeSlot()+" "+c.getSuitableHotbarSlot()+" "+c.isEmpty()+" "+c.countItem(items[0])+" "+c.countItem(items[1])+" "+c.countItem(items[2]));var slots=new StringJoiner(" | ");for(int j=0;j<43;j++)slots.add(snapshot(c.getItem(j)));out.println("slots "+slots);var eq=new StringJoiner(" | ");for(var e:((EnumMap<EquipmentSlot,ItemStack>)equipmentItems.get(equipment[i])).entrySet())eq.add(e.getKey().name()+"="+snapshot(e.getValue()));out.println("equipment "+eq);for(int j=0;j<refs.length;j++)out.println("query "+j+" "+c.contains(refs[j])+" "+c.findSlotMatchingItem(refs[j])+" "+c.findSlotMatchingCraftingIngredient(items[1].builtInRegistryHolder(),refs[j]));} + out.println("empty "+snapshot(ItemStack.EMPTY)); + } + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var lookup=net.minecraft.data.registries.VanillaRegistries.createWorldLookup();var m=new ItemEnchantments.Mutable(ItemEnchantments.EMPTY);m.set(lookup.lookupOrThrow(net.minecraft.core.registries.Registries.ENCHANTMENT).getOrThrow(Enchantments.UNBREAKING),1);enchanted=m.toImmutable(); + items=new Item[]{Items.AIR,Items.STICK,Items.SHIELD};keys=new DataComponentType[]{DataComponents.MAX_STACK_SIZE,DataComponents.DAMAGE,DataComponents.MAX_DAMAGE,DataComponents.UNBREAKABLE,DataComponents.ENCHANTMENTS,DataComponents.CUSTOM_NAME};components=field(ItemStack.class,"components");count=field(ItemStack.class,"count");patchMap=field(DataComponentPatch.class,"map");removed=field(Class.forName("net.minecraft.core.component.Removed"),"INSTANCE").get(null);equipmentItems=field(EntityEquipment.class,"items");changed=field(Inventory.class,"timesChanged");Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();for(int i=0;i<3;i++)items[i].builtInRegistryHolder().bindComponents(prototype(f.getAsJsonArray("prototypes").get(i).getAsJsonArray()));Inventory.EQUIPMENT_SLOT_MAPPING.clear();for(var e:f.getAsJsonArray("equipment_order")){int i=e.getAsInt();Inventory.EQUIPMENT_SLOT_MAPPING.put(36+i,mapped[i]);}ItemStack.EMPTY.setCount(0);ItemStack.EMPTY.setPopTime(0);((PatchedDataComponentMap)components.get(ItemStack.EMPTY)).clearPatch();var d=new Data();d.out=out;d.ids.put(ItemStack.EMPTY,0);d.refs=new ItemStack[4];for(int i=0;i<4;i++){var v=f.getAsJsonArray("stacks").get(i).getAsJsonObject();int type=n(v,"item");d.refs[i]=type<0?ItemStack.EMPTY:new ItemStack(items[type],n(v,"count"));if(type>=0){d.refs[i].setPopTime(n(v,"pop"));((PatchedDataComponentMap)components.get(d.refs[i])).restorePatch(patch(v.getAsJsonArray("patch")));}} + d.equipment=new EntityEquipment[]{new EntityEquipment(),new EntityEquipment()};if(f.get("shared_equipment").getAsBoolean())d.equipment[1]=d.equipment[0];d.inv=new Inventory[]{new Inventory(null,d.equipment[0]),new Inventory(null,d.equipment[1])}; + for(int i=0;i<2;i++){var initial=f.getAsJsonArray("inventories").get(i).getAsJsonObject();d.inv[i].setSelectedSlot(n(initial,"selected"));changed.setInt(d.inv[i],n(initial,"changed"));for(var entry:initial.getAsJsonArray("slots")){var pair=entry.getAsJsonArray();d.inv[i].setItem(pair.get(0).getAsInt(),d.refs[pair.get(1).getAsInt()]);}if(n(initial,"mainhand")>=0)d.equipment[i].set(EquipmentSlot.MAINHAND,d.refs[n(initial,"mainhand")]);} + d.all();for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonObject();var c=d.inv[n(op,"inventory")];int a=n(op,"a"),b=n(op,"b"),slot=n(op,"slot"),amount=n(op,"amount");try{switch(op.get("kind").getAsString()){ + case "get":d.refs[b]=c.getItem(slot);break;case "set":c.setItem(slot,d.refs[a]);break;case "remove":d.refs[b]=c.removeItem(slot,amount);break;case "no-update":d.refs[b]=c.removeItemNoUpdate(slot);break;case "remove-ref":c.removeItem(d.refs[a]);break;case "select":c.setSelectedSlot(slot);break;case "selected":d.refs[b]=c.getSelectedItem();break;case "set-selected":d.refs[b]=c.setSelectedItem(d.refs[a]);break;case "remove-selected":d.refs[b]=c.removeFromSelected(op.get("all").getAsBoolean());break;case "pick":c.pickSlot(slot);break;case "add-pick":c.addAndPickItem(d.refs[a]);break;case "clear":c.clearContent();break;case "changed":c.setChanged();break;case "replace":c.replaceWith(d.inv[n(op,"other")]);break;case "equip":d.refs[b]=d.equipment[n(op,"inventory")].set(EquipmentSlot.values()[n(op,"equipment")],d.refs[a]);break;case "get-equip":d.refs[b]=d.equipment[n(op,"inventory")].get(EquipmentSlot.values()[n(op,"equipment")]);break;case "alias":d.refs[b]=d.refs[a];break;case "copy":d.refs[b]=d.refs[a].copy();break;case "count":d.refs[a].setCount(amount);break;case "component":int k=n(op,"key");d.refs[a].set(keys[k],value(k,op.get("value")));break;default:throw new AssertionError();}out.println("result ok");}catch(IndexOutOfBoundsException|IllegalArgumentException|NullPointerException e){out.println("result error");}d.all();} + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerTravelOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerTravelOracle.java new file mode 100644 index 000000000..d6a87ca73 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerTravelOracle.java @@ -0,0 +1,42 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.*;import net.minecraft.world.level.material.*;import net.minecraft.world.phys.Vec3; +/** Actual Player travel wrapper and flight speed, with controlled parent fluid travel. */ +public final class VanillaPlayerTravelOracle { + static final class Stop extends RuntimeException {} + static Field position; + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static Vec3 vec(JsonElement v){var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static String vector(Vec3 v){return String.format("%016x %016x %016x",Double.doubleToLongBits(v.x),Double.doubleToLongBits(v.y),Double.doubleToLongBits(v.z));} + static final class Data {JsonObject f;PrintWriter out;int calls;Vec3 velocity;Actor actor;Ability ability; + void query(String s){out.println(s);int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt()){velocity=vec(f.get("after_velocity"));try{position.set(actor,vec(f.get("after_position")));}catch(ReflectiveOperationException e){throw new AssertionError(e);}ability.flying=flag("after_flying");}} + boolean flag(String k){return f.get(k).getAsBoolean();}} + static final class Ability extends Abilities {Data d;@Override public float getFlyingSpeed(){d.query("ability-speed");return single(d.f.get("speed"));}} + static final class Level extends net.minecraft.server.level.ServerLevel {Data d;Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public FluidState getFluidState(BlockPos p){d.query("fluid "+p.getX()+" "+p.getY()+" "+p.getZ());return (d.flag("empty")?Fluids.EMPTY:Fluids.WATER).defaultFluidState();}} + static final class Actor extends Player { + Data d;Actor(){super(null,null);}void configure(Level l){setLevel(l);} + @Override public net.minecraft.world.level.GameType gameMode(){return net.minecraft.world.level.GameType.SURVIVAL;} + @Override public boolean isPassenger(){d.query("passenger");return d.flag("passenger");} + @Override public boolean isSwimming(){d.query("swimming");return d.flag("swimming");} + @Override public Vec3 getLookAngle(){d.query("look");return vec(d.f.get("look"));} + @Override public Vec3 getDeltaMovement(){return d.velocity;} + @Override public void setDeltaMovement(Vec3 v){d.query("set "+vector(v));d.velocity=v;} + @Override public Abilities getAbilities(){d.query("abilities");return d.ability;} + @Override public boolean isSprinting(){d.query("sprint");return d.flag("sprint");} + @Override public BlockPos blockPosition(){d.query("block-position");return new BlockPos(17,-64,-33);} + @Override protected boolean shouldTravelInFluid(FluidState fluid){d.query("should-fluid");return true;} + @Override protected void travelInFluid(Vec3 input){d.query("base "+vector(input));if(d.flag("base_mutate")){d.velocity=vec(d.f.get("base_velocity"));d.ability.flying=d.flag("base_flying");}} + float flightSpeed(){return getFlyingSpeed();} + } + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");var uf=u.getDeclaredField("theUnsafe");uf.setAccessible(true);var unsafe=uf.get(null);var allocate=u.getMethod("allocateInstance",Class.class);position=Entity.class.getDeclaredField("position");position.setAccessible(true);var abilities=Player.class.getDeclaredField("abilities");abilities.setAccessible(true);var jumping=LivingEntity.class.getDeclaredField("jumping");jumping.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;d.velocity=vec(f.get("velocity"));var entity=(Actor)allocate.invoke(unsafe,Actor.class);d.actor=entity;entity.d=d;var level=(Level)allocate.invoke(unsafe,Level.class);level.d=d;entity.configure(level);var ability=new Ability();ability.d=d;ability.flying=d.flag("flying");d.ability=ability;abilities.set(entity,ability);position.set(entity,vec(f.get("position")));jumping.setBoolean(entity,d.flag("jumping")); + try{switch(f.get("mode").getAsString()){case "travel"->entity.travel(vec(f.get("input")));case "speed"->out.printf("float %08x%n",Float.floatToIntBits(entity.flightSpeed()));case "affected"->out.println("bool "+entity.isAffectedByFluids());default->throw new AssertionError();}out.println("result ok");}catch(Stop e){out.println("result error");} + out.println("final "+vector(d.velocity)+" "+vector((Vec3)position.get(entity))+" "+ability.flying);out.println("queries "+d.calls); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegisteredEntityFluidOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegisteredEntityFluidOracle.java new file mode 100644 index 000000000..e27b14767 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegisteredEntityFluidOracle.java @@ -0,0 +1,13 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.registries.*;import net.minecraft.tags.*;import net.minecraft.world.level.block.*; +/** Run actual entity immersion with registered fluid heights, flows and support. */ +public final class VanillaRegisteredEntityFluidOracle { + public static void main(String[] args)throws Exception { + if(args[0].equals("export")){VanillaRegistryFluidOracle.main(args);return;} + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]);VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject()); + var natural=new ArrayList<Holder<Block>>();var all=new ArrayList<Holder<Block>>();for(var block:BuiltInRegistries.BLOCK){all.add(block.builtInRegistryHolder());if(block.defaultBlockState().is(BlockTags.BLOCKS_FLUID_FLOW))natural.add(block.builtInRegistryHolder());} + int[] old={-1};VanillaEntityFluidOracle.setup=op->{int tag=op.get("block_tag").getAsInt();if(old[0]!=tag){BuiltInRegistries.BLOCK.prepareTagReload(new TagLoader.LoadResult<>(Registries.BLOCK,Map.of(BlockTags.BLOCKS_FLUID_FLOW,tag==0?natural:tag==1?List.<Holder<Block>>of():all))).apply();old[0]=tag;}}; + VanillaEntityFluidOracle.main(args); + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegisteredPlayerCombatOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegisteredPlayerCombatOracle.java new file mode 100644 index 000000000..fb87832dd --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegisteredPlayerCombatOracle.java @@ -0,0 +1,108 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.lang.invoke.*;import java.nio.file.*;import java.util.*; +import net.minecraft.network.syncher.*;import net.minecraft.world.entity.ai.attributes.*;import net.minecraft.world.food.FoodData;import net.minecraft.world.level.gamerules.*;import net.minecraft.world.flag.FeatureFlagSet;import net.minecraft.server.network.ServerGamePacketListenerImpl;import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.core.registries.*;import net.minecraft.resources.*;import net.minecraft.tags.*;import net.minecraft.world.InteractionHand;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.*;import net.minecraft.world.damagesource.*;import net.minecraft.world.effect.*;import net.minecraft.world.item.*;import net.minecraft.world.item.component.*;import net.minecraft.server.level.*;import net.minecraft.server.PlayerAdvancements;import net.minecraft.sounds.*;import net.minecraft.stats.Stats; +/** Native ServerPlayer hurt through actual reduction, attributes, health/absorption and hunger. */ +public final class VanillaRegisteredPlayerCombatOracle { + static final class Stop extends RuntimeException {} + static EntityDataAccessor<Float> healthKey,absorptionKey;static Field amplifier;static Object unsafe;static Method allocate;static ItemStack plain,shield;static Field stamp,lastSource,noAction,cooldown,lastHurt,duration,time; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static String values(List<SynchedEntityData.DataValue<?>> v){return VanillaPlayerHealthOracle.values(v);} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static String state(LivingEntity a){try{return noAction.getInt(a)+" "+cooldown.getInt(a)+" "+bits(lastHurt.getFloat(a))+" "+duration.getInt(a)+" "+time.getInt(a)+" "+(lastSource.get(a)!=null)+" "+stamp.getLong(a);}catch(Exception e){throw new AssertionError(e);}} + static final class Data {JsonObject op;PrintWriter out;AttributeMap attributes;SynchedEntityData data;Tracker tracker;Rules rules;int calls,difficultyCalls;boolean hit;Abilities abilities;PlainPlayer attacker;Arrow arrow;Actor other;float recorded;Server level;PlayerAdvancements advancements;List<MobEffectInstance> effects; + boolean flag(String n){return op.get(n).getAsBoolean();}void event(String s){out.println(s);if(calls++==op.get("fail").getAsInt())throw new Stop();}} + static final class PlainPlayer extends Player {Data d;PlainPlayer(){super(null,null);}@Override public Abilities getAbilities(){d.event("source-abilities");var a=new Abilities();a.instabuild=d.flag("creative");return a;}@Override public ItemStack getWeaponItem(){d.event("source-weapon 2");return d.flag("weapon")?ItemStack.EMPTY:null;}@Override public net.minecraft.world.level.GameType gameMode(){return net.minecraft.world.level.GameType.SURVIVAL;}} + static final class Arrow extends net.minecraft.world.entity.projectile.arrow.Arrow {Data d;Arrow(){super(null,null);}@Override public ItemStack getWeaponItem(){d.event("source-weapon 3");return d.flag("weapon")?ItemStack.EMPTY:null;}@Override public Entity getOwner(){d.event("owner");return switch(d.op.get("owner").getAsInt()){case 0->null;case 1->d.attacker;case 2->d.other;default->throw new AssertionError();};}} + static final class Tracker extends CombatTracker {Data d;Tracker(){super(null);}@Override public void recordDamage(DamageSource s,float v){d.event("record "+bits(v));d.recorded=v;d.hit=true;}} + static final class Rules extends GameRules {Data d;Rules(){super(FeatureFlagSet.of());}@SuppressWarnings("unchecked") @Override public <T>T get(GameRule<T> rule){String n=rule==GameRules.DROWNING_DAMAGE?"drowning":rule==GameRules.FALL_DAMAGE?"fall":rule==GameRules.FIRE_DAMAGE?"fire":rule==GameRules.FREEZE_DAMAGE?"freeze":null;if(n==null)throw new AssertionError();d.event("rule "+n);return (T)Boolean.valueOf(d.flag("rule_"+n));}} + static final class Connection extends ServerGamePacketListenerImpl {Data d;Connection(){super(null,null,null,null);}@Override public boolean hasClientLoaded(){d.event("loaded");return d.flag("loaded");}} + static final class Server extends ServerLevel {Data d;Server(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public void playSound(Entity e,double x,double y,double z,SoundEvent sound,SoundSource category){d.event("thorns-sound");}@Override public GameRules getGameRules(){d.event("rules");return d.rules;}@Override public void broadcastDamageEvent(Entity a,DamageSource s){d.event("broadcast");}@Override public boolean isClientSide(){d.event("client");return d.flag("client");}@Override public net.minecraft.world.Difficulty getDifficulty(){d.event("difficulty");return net.minecraft.world.Difficulty.values()[d.op.getAsJsonArray("difficulties").get(d.difficultyCalls++).getAsInt()];}@Override public long getGameTime(){d.event("game-time");return d.op.get("game_time").getAsLong();}} + static final class Effect extends MobEffectInstance {Data d;int id;Effect(){super(MobEffects.RESISTANCE);}@Override public void onMobHurt(ServerLevel l,LivingEntity a,DamageSource s,float v){d.event("effect "+id+" "+bits(v));}} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Actor(){super(null,null);}@Override public ItemStack getWeaponItem(){d.event("source-weapon 1");return d.flag("weapon")?ItemStack.EMPTY:null;} + + Data d; + @Override public boolean isPermanentlyInvulnerable(){d.event("permanent");return d.flag("permanent");} + @Override public boolean isTemporarilyInvulnerable(){d.event("temporary");return d.flag("temporary");} + @Override public boolean fireImmune(){d.event("fire-immune");return d.flag("fire_immune");} + @Override public boolean hasEffect(Holder<MobEffect> e){if(e==MobEffects.FIRE_RESISTANCE){d.event("fire-resistance");return d.flag("fire_resistance");}if(e!=MobEffects.RESISTANCE)throw new AssertionError();d.event("has-resistance");return d.flag("resistance");} + @Override public MobEffectInstance getEffect(Holder<MobEffect> e){if(e!=MobEffects.RESISTANCE)throw new AssertionError();d.event("effect");var v=new MobEffectInstance(e,100,0);try{amplifier.setInt(v,d.op.get("amplifier").getAsInt());}catch(Exception ex){throw new AssertionError(ex);}return v;} + @Override public double getAttributeValue(Holder<Attribute> a){return d.attributes.getValue(a);} + @Override protected void hurtArmor(DamageSource s,float v){d.event("hurt-armor "+bits(v));if(d.flag("break_armor"))d.attributes.getInstance(Attributes.ARMOR).setBaseValue(number(d.op.get("armor_after")));} + @Override public CombatTracker getCombatTracker(){d.event("tracker");return d.tracker;} + @Override public void gameEvent(Holder<net.minecraft.world.level.gameevent.GameEvent> e){if(e!=net.minecraft.world.level.gameevent.GameEvent.ENTITY_DAMAGE)throw new AssertionError();d.event("damage-event");} + @Override public void onSyncedDataUpdated(EntityDataAccessor<?> a){var k=a.id()==healthKey.id()?healthKey:absorptionKey;d.event("updated "+k.id()+" "+bits(d.data.get(k))+" "+d.data.isDirty());if(d.flag("pack_callback"))d.out.println("callback-pack "+values(d.data.packDirty()));} + @Override public boolean isSleeping(){d.event("sleeping");return d.flag("sleeping");} + @Override public void stopSleeping(){d.event("wake");} + @Override public ItemStack getUseItem(){d.event("use-item");return d.flag("component")?shield:ItemStack.EMPTY;} + @Override public float applyItemBlocking(ServerLevel l,DamageSource s,float v){d.event("blocking "+bits(v));return single(d.op.get("blocked"));} + @Override public boolean is(TagKey<EntityType<?>> tag){if(tag==EntityTypeTags.FALL_DAMAGE_IMMUNE){d.event("fall-immune");return d.flag("fall_immune");}if(tag!=EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES)throw new AssertionError();d.event("freeze-extra");return d.flag("freeze_extra");} + @Override public ItemStack getItemBySlot(EquipmentSlot slot){d.event("slot "+slot.ordinal());return slot==EquipmentSlot.HEAD&&d.flag("helmet")?plain:ItemStack.EMPTY;} + @Override protected void hurtHelmet(DamageSource s,float v){d.event("hurt-helmet "+bits(v));} + @Override protected void resolveMobResponsibleForDamage(DamageSource s){d.event("resolve-mob");} + @Override protected Player resolvePlayerResponsibleForDamage(DamageSource s){d.event("resolve-player");return null;} + @Override protected void markHurt(){d.event("mark");} + @Override public void dealDefaultKnockback(DamageSource s,float v,boolean b){d.event("knockback "+bits(v)+" "+b);} + @Override public ItemStack getItemInHand(InteractionHand h){d.event("hand "+h.ordinal());return ItemStack.EMPTY;} + @Override protected SoundEvent getDeathSound(){d.event("death-sound");return null;} + @Override public void makeSound(SoundEvent e){d.event("make-sound");} + @Override public void die(DamageSource s){d.event("die");dead=true;} + @Override protected void playHurtSound(DamageSource s){d.event("hurt-sound");} + @Override public ServerLevel level(){d.event("level");return d.level;} + @Override public Collection<MobEffectInstance> getActiveEffects(){d.event("effects");return d.effects;} + } + static final class Human extends ServerPlayer {Human(){super(null,null,null,null);} + + Data d; + @Override public boolean isPermanentlyInvulnerable(){d.event("permanent");return d.flag("permanent");} + @Override public boolean isTemporarilyInvulnerable(){d.event("temporary");return d.flag("temporary");} + @Override public boolean fireImmune(){d.event("fire-immune");return d.flag("fire_immune");} + @Override public boolean hasEffect(Holder<MobEffect> e){if(e==MobEffects.FIRE_RESISTANCE){d.event("fire-resistance");return d.flag("fire_resistance");}if(e!=MobEffects.RESISTANCE)throw new AssertionError();d.event("has-resistance");return d.flag("resistance");} + @Override public MobEffectInstance getEffect(Holder<MobEffect> e){if(e!=MobEffects.RESISTANCE)throw new AssertionError();d.event("effect");var v=new MobEffectInstance(e,100,0);try{amplifier.setInt(v,d.op.get("amplifier").getAsInt());}catch(Exception ex){throw new AssertionError(ex);}return v;} + @Override public double getAttributeValue(Holder<Attribute> a){return d.attributes.getValue(a);} + @Override protected void hurtArmor(DamageSource s,float v){d.event("hurt-armor "+bits(v));if(d.flag("break_armor"))d.attributes.getInstance(Attributes.ARMOR).setBaseValue(number(d.op.get("armor_after")));} + @Override public CombatTracker getCombatTracker(){d.event("tracker");return d.tracker;} + @Override public void gameEvent(Holder<net.minecraft.world.level.gameevent.GameEvent> e){if(e!=net.minecraft.world.level.gameevent.GameEvent.ENTITY_DAMAGE)throw new AssertionError();d.event("damage-event");} + @Override public void onSyncedDataUpdated(EntityDataAccessor<?> a){var k=a.id()==healthKey.id()?healthKey:absorptionKey;d.event("updated "+k.id()+" "+bits(d.data.get(k))+" "+d.data.isDirty());if(d.flag("pack_callback"))d.out.println("callback-pack "+values(d.data.packDirty()));} + @Override public boolean isSleeping(){d.event("sleeping");return d.flag("sleeping");} + @Override public void stopSleeping(){d.event("wake");} + @Override public ItemStack getUseItem(){d.event("use-item");return d.flag("component")?shield:ItemStack.EMPTY;} + @Override public float applyItemBlocking(ServerLevel l,DamageSource s,float v){d.event("blocking "+bits(v));return single(d.op.get("blocked"));} + @Override public boolean is(TagKey<EntityType<?>> tag){if(tag==EntityTypeTags.FALL_DAMAGE_IMMUNE){d.event("fall-immune");return d.flag("fall_immune");}if(tag!=EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES)throw new AssertionError();d.event("freeze-extra");return d.flag("freeze_extra");} + @Override public ItemStack getItemBySlot(EquipmentSlot slot){d.event("slot "+slot.ordinal());return slot==EquipmentSlot.HEAD&&d.flag("helmet")?plain:ItemStack.EMPTY;} + @Override protected void hurtHelmet(DamageSource s,float v){d.event("hurt-helmet "+bits(v));} + @Override protected void resolveMobResponsibleForDamage(DamageSource s){d.event("resolve-mob");} + @Override protected Player resolvePlayerResponsibleForDamage(DamageSource s){d.event("resolve-player");return null;} + @Override protected void markHurt(){d.event("mark");} + @Override public void dealDefaultKnockback(DamageSource s,float v,boolean b){d.event("knockback "+bits(v)+" "+b);} + @Override public ItemStack getItemInHand(InteractionHand h){d.event("hand "+h.ordinal());return ItemStack.EMPTY;} + @Override protected SoundEvent getDeathSound(){d.event("death-sound");return null;} + @Override public void makeSound(SoundEvent e){d.event("make-sound");} + @Override public void die(DamageSource s){d.event("die");dead=true;} + @Override protected void playHurtSound(DamageSource s){d.event("hurt-sound");} + @Override public ServerLevel level(){d.event("level");return d.level;} + @Override public Collection<MobEffectInstance> getActiveEffects(){d.event("effects");return d.effects;} + + @Override public boolean isChangingDimension(){d.event("changing");return d.flag("changing");}@Override protected void removeEntitiesOnShoulder(){d.event("shoulders");}@Override public boolean canHarmPlayer(Player p){d.event("can-harm");return d.flag("can_harm");}@Override public PlayerAdvancements getAdvancements(){d.event("criterion");return d.advancements;} + @Override public void awardStat(Identifier s,int v){if(s==Stats.DAMAGE_BLOCKED_BY_SHIELD){d.event("blocked-stat "+v);return;}String n=s==Stats.DAMAGE_RESISTED?"resisted":s==Stats.DAMAGE_ABSORBED?"absorbed":s==Stats.DAMAGE_TAKEN?"taken":null;if(n==null)throw new AssertionError();d.event("stat "+n+" "+v);} + } + @SuppressWarnings("unchecked") public static void main(String[] args)throws Throwable { + Path dir=Path.of(args[1]);if(args[0].equals("export")){VanillaPlayerHealthOracle.main(args);VanillaDamageSourceOracle.main(new String[]{"export",dir.resolve("damage").toString()});}else{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();} + healthKey=(EntityDataAccessor<Float>)field(LivingEntity.class,"DATA_HEALTH_ID").get(null);absorptionKey=(EntityDataAccessor<Float>)field(Player.class,"DATA_PLAYER_ABSORPTION_ID").get(null);if(args[0].equals("export")){var slots=new JsonArray();for(var s:EquipmentSlot.VALUES)slots.add(s.ordinal());Files.writeString(dir.resolve("slots.json"),slots.toString());Files.writeString(dir.resolve("head.json"),Integer.toString(EquipmentSlot.HEAD.ordinal()));return;} + var damageRegistry=VanillaDamageSourceOracle.registry(dir.resolve("damage")); + var dataCtor=SynchedEntityData.class.getDeclaredConstructor(SyncedDataHolder.class,SynchedEntityData.DataItem[].class);dataCtor.setAccessible(true);amplifier=field(MobEffectInstance.class,"amplifier");var exhaustion=field(FoodData.class,"exhaustionLevel");var keys=List.of(Attributes.ARMOR,Attributes.ARMOR_TOUGHNESS,Attributes.MAX_HEALTH,Attributes.MAX_ABSORPTION);var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class); + noAction=field(LivingEntity.class,"noActionTime");cooldown=field(LivingEntity.class,"damageCooldownTime");lastHurt=field(LivingEntity.class,"lastHurt");duration=field(LivingEntity.class,"hurtDuration");time=field(LivingEntity.class,"hurtTime");stamp=field(LivingEntity.class,"lastDamageStamp");lastSource=field(LivingEntity.class,"lastDamageSource"); + var ctor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);ctor.setAccessible(true);plain=(ItemStack)ctor.newInstance(BuiltInRegistries.ITEM.wrapAsHolder(Items.STICK),1,new PatchedDataComponentMap(DataComponentMap.EMPTY));shield=(ItemStack)ctor.newInstance(BuiltInRegistries.ITEM.wrapAsHolder(Items.SHIELD),1,new PatchedDataComponentMap(DataComponentMap.EMPTY));shield.set(DataComponents.BLOCKS_ATTACKS,new BlocksAttacks(0,1,List.of(),new BlocksAttacks.ItemDamageFunction(0,0,0),Optional.empty(),Optional.empty(),Optional.empty())); + var lookup=MethodHandles.privateLookupIn(Player.class,MethodHandles.lookup());var playerHurt=lookup.findSpecial(Player.class,"hurtServer",MethodType.methodType(boolean.class,ServerLevel.class,DamageSource.class,float.class),Player.class).asType(MethodType.methodType(boolean.class,LivingEntity.class,ServerLevel.class,DamageSource.class,float.class)); + var serverLookup=MethodHandles.privateLookupIn(ServerPlayer.class,MethodHandles.lookup());var serverHurt=serverLookup.findSpecial(ServerPlayer.class,"hurtServer",MethodType.methodType(boolean.class,ServerLevel.class,DamageSource.class,float.class),ServerPlayer.class).asType(MethodType.methodType(boolean.class,LivingEntity.class,ServerLevel.class,DamageSource.class,float.class)); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.out=out;d.level=make(Server.class);d.level.d=d;d.advancements=make(PlayerAdvancements.class);field(PlayerAdvancements.class,"activeTriggers").set(d.advancements,new HashMap<>());d.rules=make(Rules.class);d.rules.d=d;var human=make(Human.class);human.d=d;var connection=make(Connection.class);connection.d=d;human.connection=connection;LivingEntity actor=human;d.abilities=new Abilities();field(Player.class,"abilities").set(actor,d.abilities);d.attacker=make(PlainPlayer.class);d.attacker.d=d;d.other=make(Actor.class);d.other.d=d;d.arrow=make(Arrow.class);d.arrow.d=d;var hurt=serverHurt;DamageSource source=new DamageSource(damageRegistry.get(Identifier.parse("minecraft:generic")).orElseThrow());field(Entity.class,"position").set(actor,net.minecraft.world.phys.Vec3.ZERO); + d.attributes=new AttributeMap(VanillaEntityAttributeOracle.supplier(BuiltInRegistries.ENTITY_TYPE.getValue(Identifier.parse("minecraft:player"))));for(int i=0;i<keys.size();i++){var a=f.getAsJsonArray("attributes").get(i).getAsJsonObject();var instance=d.attributes.getInstance(keys.get(i));instance.setBaseValue(number(a.get("base")));instance.addTransientModifier(new AttributeModifier(Identifier.parse("horizon:test"),number(a.get("amount")),AttributeModifier.Operation.values()[a.get("operation").getAsInt()]));} + var items=new SynchedEntityData.DataItem<?>[Math.max(healthKey.id(),absorptionKey.id())+1];for(int i=0;i<items.length;i++)items[i]=new SynchedEntityData.DataItem<Float>(new EntityDataAccessor<Float>(i,EntityDataSerializers.FLOAT),0f);var health=new SynchedEntityData.DataItem<Float>(healthKey,single(f.get("health")));var absorption=new SynchedEntityData.DataItem<Float>(absorptionKey,single(f.get("absorption")));items[healthKey.id()]=health;items[absorptionKey.id()]=absorption;d.data=dataCtor.newInstance(actor,items);field(Entity.class,"entityData").set(actor,d.data);field(LivingEntity.class,"dead").setBoolean(actor,f.get("dead").getAsBoolean());var food=new FoodData();exhaustion.setFloat(food,single(f.get("exhaustion")));field(Player.class,"foodData").set(actor,food);d.tracker=make(Tracker.class);d.tracker.d=d; + noAction.setInt(actor,f.get("no_action").getAsInt());cooldown.setInt(actor,f.get("cooldown").getAsInt());lastHurt.setFloat(actor,single(f.get("last_hurt")));duration.setInt(actor,f.get("duration").getAsInt());time.setInt(actor,f.get("time").getAsInt());stamp.setLong(actor,f.get("stamp").getAsLong());if(f.get("source").getAsBoolean())lastSource.set(actor,source); + for(var ov:f.getAsJsonArray("ops")){d.op=ov.getAsJsonObject();var sourceEntities=new Entity[]{null,d.other,d.attacker,d.arrow};source=new DamageSource(damageRegistry.get(Identifier.parse(d.op.get("source_type").getAsString())).orElseThrow(),sourceEntities[d.op.get("direct").getAsInt()],sourceEntities[d.op.get("attacker").getAsInt()]);field(Entity.class,"removalReason").set(actor,d.flag("removed")?Entity.RemovalReason.DISCARDED:null);if(d.op.has("reset_cooldown")&&d.flag("reset_cooldown"))cooldown.setInt(actor,0);d.calls=0;d.difficultyCalls=0;d.hit=false;d.abilities.invulnerable=d.flag("ability_invulnerable");d.effects=new ArrayList<>();for(int i=0;i<d.op.get("effects").getAsInt();i++){var e=make(Effect.class);e.d=d;e.id=i;d.effects.add(e);}try{boolean result=(boolean)hurt.invokeExact(actor,(ServerLevel)d.level,(DamageSource)source,single(d.op.get("damage")));out.println("bool "+result);out.println("result ok");}catch(Stop e){out.println("result error");}out.println("state "+state(actor)+" "+bits(d.recorded)+" "+d.hit+" "+d.calls); + out.println("storage "+bits(health.getValue())+" "+bits(absorption.getValue())+" "+bits(exhaustion.getFloat(food))+" "+d.data.isDirty()+" "+health.isDirty()+" "+absorption.isDirty()+" "+field(LivingEntity.class,"dead").getBoolean(actor));if(d.flag("pack"))out.println("packed "+values(d.data.packDirty()));out.println("defaults "+values(d.data.getNonDefaultValues()));} + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java new file mode 100644 index 000000000..9096f5aa9 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java @@ -0,0 +1,119 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.entity.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.phys.*; +import net.minecraft.world.phys.shapes.*; +/** Native registry behavior and BlockCollisions over resident ProtoChunk sections. */ +public final class VanillaRegistryCollisionScanOracle { + static final class Stop extends RuntimeException {} + static final class Trace { + PrintWriter out;int calls,fail; + void query(String text){out.println(text);if(calls++==fail)throw new Stop();} + } + static PalettedContainerFactory factory; + static class Chunk extends ProtoChunk { + Trace trace;BlockEntity entity;boolean liquidTrace; + Chunk(int x,int z,Trace trace,BlockEntity entity){super(new ChunkPos(x,z),UpgradeData.EMPTY,LevelHeightAccessor.create(-16,48),factory,null);this.trace=trace;this.entity=entity;} + @Override public BlockState getBlockState(BlockPos p){trace.query("block "+p.getX()+" "+p.getY()+" "+p.getZ());return super.getBlockState(p);} + @Override public BlockEntity getBlockEntity(BlockPos p){trace.query("entity chunk "+p.getX()+" "+p.getY()+" "+p.getZ());return entity;} + @Override public LevelChunkSection getSection(int index){if(liquidTrace)trace.query("liquid-section "+(index-1));return super.getSection(index);} + void write(BlockPos p,int id){getSection(getSectionIndex(p.getY())).setBlockState(p.getX()&15,p.getY()&15,p.getZ()&15,Block.stateById(id),false);} + } + static String boxText(String label,AABB b){return label+String.format(" %016x %016x %016x %016x %016x %016x",Double.doubleToLongBits(b.minX),Double.doubleToLongBits(b.minY),Double.doubleToLongBits(b.minZ),Double.doubleToLongBits(b.maxX),Double.doubleToLongBits(b.maxY),Double.doubleToLongBits(b.maxZ));} + static VoxelShape boxShape(JsonElement input){var v=input.getAsJsonArray();return Shapes.box(number(v.get(0)),number(v.get(1)),number(v.get(2)),number(v.get(3)),number(v.get(4)),number(v.get(5)));} + static final class StepBorder extends net.minecraft.world.level.border.WorldBorder { + Trace trace;VoxelShape shape; + @Override public boolean isInsideCloseToBorder(net.minecraft.world.entity.Entity entity,AABB bounds){trace.query(boxText("border-test",bounds));return shape!=null;} + @Override public VoxelShape getCollisionShape(){trace.query("border-shape");return shape;} + } + static final class StepLevel extends net.minecraft.server.level.ServerLevel { + Trace trace;StepBorder border;List<VoxelShape> entities;CollisionGetter world;CollisionContext context;LevelReader liquidWorld;Collection<Chunk> chunks; + private StepLevel(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public boolean containsAnyLiquid(AABB bounds){for(var c:chunks)c.liquidTrace=true;try{return liquidWorld.containsAnyLiquid(bounds);}finally{for(var c:chunks)c.liquidTrace=false;}} + @Override public net.minecraft.world.level.border.WorldBorder getWorldBorder(){trace.query("border");return border;} + @Override public List<VoxelShape> getEntityCollisions(net.minecraft.world.entity.Entity entity,AABB bounds){trace.query(boxText("entities",bounds));return entities;} + @Override public Iterable<VoxelShape> getBlockCollisions(net.minecraft.world.entity.Entity entity,AABB bounds){return ()->new BlockCollisions<VoxelShape>(world,context,bounds,false,(p,shape)->shape);} + } + static final class StepEntity extends net.minecraft.world.entity.decoration.ArmorStand { + float step;boolean grounded; + private StepEntity(){super(null,null);} + @Override public float maxUpStep(){return step;} + @Override public boolean onGround(){return grounded;} + void configure(StepLevel level,AABB bounds,float step,boolean grounded){setLevel(level);setBoundingBox(bounds);this.step=step;this.grounded=grounded;} + } + static final class EdgePlayer extends net.minecraft.world.entity.player.Player { + float step;boolean grounded,staying; + private EdgePlayer(){super(null,null);} + @Override public GameType gameMode(){return GameType.SURVIVAL;} + @Override public float maxUpStep(){return step;} + @Override public boolean onGround(){return grounded;} + @Override protected boolean isStayingOnGroundSurface(){return staying;} + void configure(StepLevel level,AABB bounds,float step,boolean grounded,boolean staying){setLevel(level);setBoundingBox(bounds);this.step=step;this.grounded=grounded;this.staying=staying;} + Vec3 backoff(Vec3 delta,net.minecraft.world.entity.MoverType mover){return maybeBackOffFromEdge(delta,mover);} + } + static long key(int x,int z){return (long)x<<32|Integer.toUnsignedLong(z);} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + public static void main(String[] args)throws Exception { + if(args[0].equals("export")){VanillaSuffocationOracle.main(args);return;} + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject()); + Holder<Biome> biome=Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},Biomes.PLAINS);var ids=new IdMapper<Holder<Biome>>();ids.add(biome); + factory=new PalettedContainerFactory(Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY),Blocks.AIR.defaultBlockState(),null,Strategy.createForBiomes(ids),biome,null); + var allocator=Class.forName("sun.misc.Unsafe");var access=allocator.getDeclaredField("theUnsafe");access.setAccessible(true);var unsafe=access.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + var animation=ShulkerBoxBlockEntity.class.getDeclaredField("animationStatus");animation.setAccessible(true); + var progress=ShulkerBoxBlockEntity.class.getDeclaredField("progress");progress.setAccessible(true);var previous=ShulkerBoxBlockEntity.class.getDeclaredField("progressOld");previous.setAccessible(true); + BlockEntity[] entities={null,(BlockEntity)allocate.invoke(unsafe,ShulkerBoxBlockEntity.class),(BlockEntity)allocate.invoke(unsafe,ShulkerBoxBlockEntity.class)}; + for(int i=1;i<3;i++){ + for(var status:animation.getType().getEnumConstants())if(((Enum<?>)status).name().equals(i==1?"CLOSED":"OPENED"))animation.set(entities[i],status); + progress.setFloat(entities[i],i==1?0:0.5f);previous.setFloat(entities[i],i==1?0:0.5f); + } + var abilities=net.minecraft.world.entity.player.Player.class.getDeclaredField("abilities");abilities.setAccessible(true); + var collide=net.minecraft.world.entity.Entity.class.getDeclaredMethod("collide",Vec3.class);collide.setAccessible(true); + var emit=VanillaFaceSupportOracle.class.getDeclaredMethod("emit",PrintWriter.class,VoxelShape.class);emit.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){ + for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var trace=new Trace();trace.out=out;trace.fail=f.get("fail").getAsInt(); + var chunks=new HashMap<Long,Chunk>();var modes=f.getAsJsonArray("entities"); + for(var value:f.getAsJsonArray("chunks")){var v=value.getAsJsonArray();int x=v.get(0).getAsInt(),z=v.get(1).getAsInt();chunks.put(key(x,z),new Chunk(x,z,trace,entities[modes.get(1).getAsInt()]));} + for(var value:f.getAsJsonArray("blocks")){var v=value.getAsJsonArray();var p=new BlockPos(v.get(0).getAsInt(),v.get(1).getAsInt(),v.get(2).getAsInt());chunks.get(key(p.getX()>>4,p.getZ()>>4)).write(p,v.get(3).getAsInt());} + var world=(CollisionGetter)Proxy.newProxyInstance(CollisionGetter.class.getClassLoader(),new Class<?>[]{CollisionGetter.class},(proxy,method,values)->{ + if(method.getName().equals("getChunkForCollisions")){int x=(int)values[0],z=(int)values[1];trace.query("chunk "+x+" "+z);return chunks.get(key(x,z));} + if(method.getName().equals("getBlockEntity")){var p=(BlockPos)values[0];trace.query("entity global "+p.getX()+" "+p.getY()+" "+p.getZ());return entities[modes.get(0).getAsInt()];} + throw new AssertionError(method); + }); + int mode=f.get("context").getAsInt();var context=mode==0?CollisionContext.empty():mode==1?CollisionContext.emptyWithFluidCollisions():mode==2?CollisionContext.positionContext(number(f.get("y"))):CollisionContext.placementContext(null); + var v=f.getAsJsonArray("box");var bounds=new AABB(number(v.get(0)),number(v.get(1)),number(v.get(2)),number(v.get(3)),number(v.get(4)),number(v.get(5))); + if(f.has("movement")){ + var m=f.getAsJsonObject("movement");var level=(StepLevel)allocate.invoke(unsafe,StepLevel.class);level.trace=trace;level.world=world;level.context=context; + level.chunks=chunks.values();level.liquidWorld=(LevelReader)Proxy.newProxyInstance(LevelReader.class.getClassLoader(),new Class<?>[]{LevelReader.class},(proxy,method,values)->{switch(method.getName()){case "getMinSectionY":trace.query("liquid-min-section");return -1;case "getMaxSectionY":trace.query("liquid-max-section");return 1;case "getMinY":trace.query("liquid-min-y");return -16;case "getMaxY":trace.query("liquid-max-y");return 31;case "getChunk":if(values.length!=2)throw new AssertionError(method);int x=(int)values[0],z=(int)values[1];trace.query("liquid-chunk "+x+" "+z);var c=chunks.get(key(x,z));if(c==null)throw new Stop();return c;default:if(method.isDefault())return InvocationHandler.invokeDefault(proxy,method,values);throw new AssertionError(method);}}); + + level.entities=new ArrayList<>();for(var shape:m.getAsJsonArray("entities"))level.entities.add(boxShape(shape)); + level.border=new StepBorder();level.border.trace=trace;level.border.shape=m.get("border").isJsonNull()?null:boxShape(m.get("border")); + var entity=(StepEntity)allocate.invoke(unsafe,StepEntity.class);entity.configure(level,bounds,(float)number(m.get("step")),m.get("grounded").getAsBoolean());var delta=m.getAsJsonArray("delta"); + if(m.has("edge")){ + var e=m.getAsJsonObject("edge");var player=(EdgePlayer)allocate.invoke(unsafe,EdgePlayer.class);player.configure(level,bounds,(float)number(m.get("step")),m.get("grounded").getAsBoolean(),e.get("staying").getAsBoolean());player.fallDistance=number(e.get("fall"));var a=new net.minecraft.world.entity.player.Abilities();a.flying=e.get("flying").getAsBoolean();abilities.set(player,a); + try{var result=player.backoff(new Vec3(number(delta.get(0)),number(delta.get(1)),number(delta.get(2))),net.minecraft.world.entity.MoverType.valueOf(e.get("mover").getAsString()));out.printf("edge %016x %016x %016x%n",Double.doubleToLongBits(result.x),Double.doubleToLongBits(result.y),Double.doubleToLongBits(result.z));}catch(Stop error){out.println("error");}out.println("done edge "+trace.calls);continue; + } + if(m.has("free")&&m.get("free").getAsBoolean()){try{out.println("free "+entity.isFree(number(delta.get(0)),number(delta.get(1)),number(delta.get(2))));}catch(Stop error){out.println("error");}out.println("done free "+trace.calls);continue;} + if(m.has("check")&&m.get("check").getAsBoolean()){try{out.println("clear "+level.noCollision(entity,bounds));}catch(Stop error){out.println("error");}out.println("done check "+trace.calls);continue;} + try{var result=(Vec3)collide.invoke(entity,new Vec3(number(delta.get(0)),number(delta.get(1)),number(delta.get(2))));out.printf("movement %016x %016x %016x%n",Double.doubleToLongBits(result.x),Double.doubleToLongBits(result.y),Double.doubleToLongBits(result.z));} + catch(InvocationTargetException error){if(error.getCause() instanceof Stop)out.println("error");else throw error;} + out.println("done movement "+trace.calls);continue; + } + var scan=new BlockCollisions<VoxelShape>(world,context,bounds,f.get("suffocating").getAsBoolean(),(p,s)->{out.println("hit "+p.getX()+" "+p.getY()+" "+p.getZ());return s;});int hits=0; + try{while(hits<f.get("limit").getAsInt()&&scan.hasNext()){emit.invoke(null,out,scan.next());hits++;}}catch(Stop error){out.println("error");} + out.println("done "+hits+" "+trace.calls); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryFallRayOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryFallRayOracle.java new file mode 100644 index 000000000..256083a33 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryFallRayOracle.java @@ -0,0 +1,80 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.resources.Identifier; +import net.minecraft.tags.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.level.gamerules.*; +import net.minecraft.world.level.material.*; +import net.minecraft.world.phys.*; +import net.minecraft.world.phys.shapes.*; +/** Registered fall-reset rays with actual block interactions, fluid shapes and tags. */ +public final class VanillaRegistryFallRayOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate; + static <T>T make(Class<T> type){try{return type.cast(allocate.invoke(unsafe,type));}catch(Exception e){throw new AssertionError(e);}} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static Vec3 vector(JsonElement v){var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static String pos(BlockPos p){return p.getX()+" "+p.getY()+" "+p.getZ();} + static final class Data { + JsonObject f,op;PrintWriter out;int calls;BlockPos position;Rules rules; + void query(String s){out.println(s);if(calls++==op.get("fail").getAsInt())throw new Stop();} + BlockState at(BlockPos p){return Block.stateById(p.equals(position)?f.get("state").getAsInt():p.equals(position.above())?op.get("above").getAsInt():0);} + BlockState block(BlockPos p){query("block "+pos(p));return at(p);} + FluidState fluid(BlockPos p){query("fluid "+pos(p));return at(p).getFluidState();} + } + static final class Rules extends GameRules { + Data d;Rules(){super(net.minecraft.world.flag.FeatureFlagSet.of());} + @SuppressWarnings("unchecked") @Override public <T>T get(GameRule<T> rule){if(rule!=GameRules.PLAYERS_NETHER_PORTAL_DEFAULT_DELAY)throw new AssertionError();d.query("portal-delay");return (T)Integer.valueOf(d.f.get("delay").getAsInt());} + } + static final class ServerWorld extends net.minecraft.server.level.ServerLevel { + Data d;ServerWorld(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public BlockState getBlockState(BlockPos p){return d.block(p);} + @Override public FluidState getFluidState(BlockPos p){return d.fluid(p);} + @Override public GameRules getGameRules(){d.query("rules");return d.rules;} + } + static final class Actor extends Marker { + Data d;Actor(){super(null,null);} + @Override public boolean is(EntityType<?> type){if(type!=EntityTypes.PLAYER)throw new AssertionError();d.query("player");return d.f.get("player").getAsBoolean();} + @Override public boolean isDescending(){return false;} + } + private static void bindFluidTags(JsonObject resources) { + var registry=BuiltInRegistries.FLUID; + var loader=new TagLoader<Holder<Fluid>>((id,required)->registry.get(id).map(value->(Holder<Fluid>)value),"tags/fluid"); + var definitions=new HashMap<Identifier,List<TagLoader.EntryWithSource>>(); + for(var item:resources.entrySet()) { + var file=TagFile.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(item.getValue().getAsString())).getOrThrow(); + var entries=new ArrayList<TagLoader.EntryWithSource>(); + for(var entry:file.entries())entries.add(new TagLoader.EntryWithSource(entry,"vanilla")); + definitions.put(Identifier.parse(item.getKey()),entries); + } + var tags=new HashMap<TagKey<Fluid>,List<Holder<Fluid>>>(); + loader.build(definitions).forEach((id,values)->tags.put(TagKey.create(Registries.FLUID,id),List.copyOf(values))); + if(tags.size()!=resources.size())throw new AssertionError("incomplete fluid tags"); + registry.prepareTagReload(new TagLoader.LoadResult<>(Registries.FLUID,tags)).apply(); + } + + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]);VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject());bindFluidTags(JsonParser.parseString(Files.readString(dir.resolve("fluid-tags.json"))).getAsJsonObject()); + var blocks=new ArrayList<Holder<Block>>();var reset=new ArrayList<Holder<Block>>();var fluids=new ArrayList<Holder<Fluid>>();var water=new ArrayList<Holder<Fluid>>();var resetNames=new JsonArray();var waterNames=new JsonArray();for(var b:BuiltInRegistries.BLOCK){blocks.add(b.builtInRegistryHolder());if(b.defaultBlockState().is(BlockTags.FALL_DAMAGE_RESETTING)){reset.add(b.builtInRegistryHolder());resetNames.add(BuiltInRegistries.BLOCK.getKey(b).toString());}}for(var f:BuiltInRegistries.FLUID){fluids.add(f.builtInRegistryHolder());if(f.is(FluidTags.WATER)){water.add(f.builtInRegistryHolder());waterNames.add(BuiltInRegistries.FLUID.getKey(f).toString());}} + if(args[0].equals("export")){VanillaInteractionShapeOracle.main(args);var bound=new JsonObject();bound.add("reset",resetNames);bound.add("water",waterNames);Files.writeString(dir.resolve("bound-tags.json"),bound.toString());var info=JsonParser.parseString(Files.readString(dir.resolve("info.json"))).getAsJsonObject();var defaults=new JsonObject();for(var b:BuiltInRegistries.BLOCK)defaults.addProperty(BuiltInRegistries.BLOCK.getKey(b).toString(),Block.getId(b.defaultBlockState()));info.add("defaults",defaults);Files.writeString(dir.resolve("info.json"),info.toString());return;} + var allocator=Class.forName("sun.misc.Unsafe");var field=allocator.getDeclaredField("theUnsafe");field.setAccessible(true);unsafe=field.get(null);allocate=allocator.getMethod("allocateInstance",Class.class);var entityPosition=Entity.class.getDeclaredField("position");entityPosition.setAccessible(true);var caches=FlowingFluid.class.getDeclaredField("shapes");caches.setAccessible(true);int oldBlocks=-1,oldFluids=-1; + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();int bt=f.get("block_tags").getAsInt(),ft=f.get("fluid_tags").getAsInt();if(bt!=oldBlocks){BuiltInRegistries.BLOCK.prepareTagReload(new TagLoader.LoadResult<>(Registries.BLOCK,Map.of(BlockTags.FALL_DAMAGE_RESETTING,bt==0?reset:bt==1?List.<Holder<Block>>of():blocks))).apply();oldBlocks=bt;}if(ft!=oldFluids){BuiltInRegistries.FLUID.prepareTagReload(new TagLoader.LoadResult<>(Registries.FLUID,Map.of(FluidTags.WATER,ft==0?water:ft==1?List.<Holder<Fluid>>of():fluids))).apply();oldFluids=ft;} + for(var fluid:List.of(Fluids.WATER,Fluids.FLOWING_WATER,Fluids.LAVA,Fluids.FLOWING_LAVA))((Map<?,?>)caches.get(fluid)).clear();var d=new Data();d.f=f;d.out=out;var p=f.getAsJsonArray("position");d.position=new BlockPos(p.get(0).getAsInt(),p.get(1).getAsInt(),p.get(2).getAsInt());d.rules=make(Rules.class);d.rules.d=d;BlockGetter world;if(f.get("server").getAsBoolean()){var w=make(ServerWorld.class);w.d=d;world=w;}else{world=(BlockGetter)Proxy.newProxyInstance(BlockGetter.class.getClassLoader(),new Class<?>[]{BlockGetter.class},(proxy,method,values)->{if(method.getName().equals("getBlockState"))return d.block((BlockPos)values[0]);if(method.getName().equals("getFluidState"))return d.fluid((BlockPos)values[0]);if(method.isDefault())return InvocationHandler.invokeDefault(proxy,method,values);throw new AssertionError(method);});} + CollisionContext context=CollisionContext.empty();if(f.get("entity").getAsBoolean()){var actor=make(Actor.class);actor.d=d;entityPosition.set(actor,Vec3.ZERO);context=CollisionContext.of(actor);} + for(var value:f.getAsJsonArray("ops")){d.op=value.getAsJsonObject();d.calls=0;var c=new ClipContext(vector(d.op.get("from")),vector(d.op.get("to")),ClipContext.Block.FALLDAMAGE_RESETTING,ClipContext.Fluid.WATER,context); + try{var hit=world.clip(c);var v=hit.getLocation();out.printf("hit %s %016x %016x %016x %s %s %s%n",hit.getType()==HitResult.Type.MISS,Double.doubleToLongBits(v.x),Double.doubleToLongBits(v.y),Double.doubleToLongBits(v.z),hit.getDirection().getSerializedName(),pos(hit.getBlockPos()),hit.isInside());}catch(Stop e){out.println("error");}int count=0;for(var fluid:List.of(Fluids.WATER,Fluids.FLOWING_WATER,Fluids.LAVA,Fluids.FLOWING_LAVA))count+=((Map<?,?>)caches.get(fluid)).size();out.println("cached "+count);out.println("queries "+d.calls); + } + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryFluidOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryFluidOracle.java new file mode 100644 index 000000000..356004382 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryFluidOracle.java @@ -0,0 +1,21 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.registries.*;import net.minecraft.tags.*;import net.minecraft.world.level.*;import net.minecraft.world.level.block.*;import net.minecraft.world.level.material.*; +/** Registered fluid contents and cached/dynamic support dispatch in actual height/flow calls. */ +public final class VanillaRegistryFluidOracle { + static final class Stop extends RuntimeException {} + static String pos(BlockPos p){return p.getX()+" "+p.getY()+" "+p.getZ();} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]);VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject()); + var natural=new ArrayList<Holder<Block>>();var all=new ArrayList<Holder<Block>>();var names=new JsonArray();var ice=new JsonArray();for(var block:BuiltInRegistries.BLOCK){String name=BuiltInRegistries.BLOCK.getKey(block).toString();all.add(block.builtInRegistryHolder());if(block.defaultBlockState().is(BlockTags.BLOCKS_FLUID_FLOW)){names.add(name);natural.add(block.builtInRegistryHolder());}if(block instanceof IceBlock)ice.add(name);} + if(args[0].equals("export")){VanillaBlockSupportOracle.main(args);VanillaBlockStateCodecOracle.main(new String[]{"export",dir.resolve("facts.json").toString()});var info=new JsonObject();info.add("blocks_flow",names);info.add("ice",ice);Files.writeString(dir.resolve("fluid-info.json"),info.toString());return;} + var solid=FlowingFluid.class.getDeclaredMethod("isSolidFace",BlockGetter.class,BlockPos.class,Direction.class);solid.setAccessible(true);int oldTag=-1; + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();int tag=f.get("tag").getAsInt();if(tag!=oldTag){BuiltInRegistries.BLOCK.prepareTagReload(new TagLoader.LoadResult<>(Registries.BLOCK,Map.of(BlockTags.BLOCKS_FLUID_FLOW,tag==0?natural:tag==1?List.<Holder<Block>>of():all))).apply();oldTag=tag;} + int[] calls={0};var world=(BlockGetter)Proxy.newProxyInstance(BlockGetter.class.getClassLoader(),new Class<?>[]{BlockGetter.class},(proxy,method,values)->{var p=(BlockPos)values[0];String kind=switch(method.getName()){case "getBlockState"->"block";case "getFluidState"->"fluid";case "getBlockEntity"->"entity";default->throw new AssertionError(method);};out.println(kind+" "+pos(p));if(calls[0]++==f.get("fail").getAsInt())throw new Stop();if(kind.equals("entity"))return null;var v=f.getAsJsonObject("cells").get(pos(p));var state=Block.stateById(v==null?f.get("default").getAsInt():v.getAsInt());return kind.equals("block")?state:state.getFluidState();}); + var a=f.getAsJsonArray("position");var p=new BlockPos(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt());var root=Block.stateById(f.get("root").getAsInt()).getFluidState(); + try{switch(f.get("mode").getAsString()){case "flow":{var v=root.getFlow(world,p);out.printf("flow %016x %016x %016x%n",Double.doubleToLongBits(v.x),Double.doubleToLongBits(v.y),Double.doubleToLongBits(v.z));break;}case "face":out.println("face "+solid.invoke(root.getType(),world,p,Direction.values()[f.get("direction").getAsInt()]));break;case "height":out.printf("height %08x%n",Float.floatToIntBits(root.getHeight(world,p)));break;case "camera":out.printf("height %08x%n",Float.floatToIntBits(root.getHeightForCamera(world,p)));break;default:throw new AssertionError();}}catch(Stop e){out.println("error");}catch(InvocationTargetException e){if(e.getCause() instanceof Stop)out.println("error");else throw e;} + out.println("queries "+calls[0]); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaReplaceBlockOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaReplaceBlockOracle.java new file mode 100644 index 000000000..1f14fbec8 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaReplaceBlockOracle.java @@ -0,0 +1,74 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.lang.reflect.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; +import net.minecraft.world.level.levelgen.placement.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.WorldGenLevel; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.feature.Feature; + +/** Invokes native block-writing features through an observable mutable world. */ +public final class VanillaReplaceBlockOracle { + private static final class Stop extends RuntimeException {} + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + final Block[] BLOCKS={Blocks.AIR,Blocks.CAVE_AIR,Blocks.VOID_AIR,Blocks.STONE,Blocks.WATER,Blocks.OAK_LEAVES,Blocks.DIRT}; + if(args[0].equals("export")) { + VanillaBlockStateCodecOracle.main(args); + return; + } + Path dir=Path.of(args[1]); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject()); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();long seed=f.get("seed").getAsLong(); + RandomSource random=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + var decoded=Feature.DIRECT_CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(f.get("definition").getAsString())).result(); + if(decoded.isEmpty())out.println("decode error");else { + out.println("decode ok");int[] calls={0};int fail=f.get("fail").getAsInt(),reject=f.get("reject").getAsInt(); + var states=new TreeMap<BlockPos,BlockState>(Comparator.<BlockPos>comparingInt(BlockPos::getX).thenComparingInt(BlockPos::getY).thenComparingInt(BlockPos::getZ)); + var world=(WorldGenLevel)Proxy.newProxyInstance(WorldGenLevel.class.getClassLoader(),new Class<?>[]{WorldGenLevel.class},(proxy,method,values)->{ + if(method.getName().equals("getMinY")) { + out.println("min");int call=calls[0]++;if(call==fail)throw new Stop(); + int minimum=f.get("world_min").getAsInt();out.println("minimum "+minimum);return minimum; + } + if(method.getName().equals("getHeight")&&(values==null||values.length==0))return 384; + if(method.getName().equals("getSeaLevel"))return 63; + if(method.getName().equals("setBlockAndUpdate"))return InvocationHandler.invokeDefault(proxy,method,values); + var p=((BlockPos)values[0]).immutable();int call=calls[0]++; + switch(method.getName()) { + case "getBlockState"->{ + out.println("get "+p.getX()+" "+p.getY()+" "+p.getZ());if(call==fail)throw new Stop(); + var state=states.getOrDefault(p,BLOCKS[Math.floorMod(p.getX()*31+p.getY()*7+p.getZ()*17,7)].defaultBlockState());out.println("state "+Block.getId(state));return state; + } + case "setBlock"->{ + var state=(BlockState)values[1];int flags=(Integer)values[2];out.println("set "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+Block.getId(state)+" "+flags);if(call==fail)throw new Stop(); + boolean result=reject==0||call%reject!=0;if(result)states.put(p,state);out.println("written "+result);return result; + } + default->throw new AssertionError("unexpected world method "+method); + } + }); + var p=f.getAsJsonArray("origin");var origin=new BlockPos(p.get(0).getAsInt(),p.get(1).getAsInt(),p.get(2).getAsInt()); + for(int repeat=0;repeat<f.get("repeats").getAsInt();repeat++) { + calls[0]=0; + try {out.println("place "+decoded.get().place(world,null,random,origin));}catch(Stop|IllegalArgumentException error){out.println("place error");} + out.println("next "+random.nextLong()); + for(var entry:states.entrySet()){var q=entry.getKey();out.println("stored "+q.getX()+" "+q.getY()+" "+q.getZ()+" "+Block.getId(entry.getValue()));} + out.println("end"); + } + } + out.println("tail "+random.nextLong()); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRestitutionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRestitutionOracle.java new file mode 100644 index 000000000..1beb0c182 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRestitutionOracle.java @@ -0,0 +1,78 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import net.minecraft.core.*; +import net.minecraft.tags.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.entity.decoration.ArmorStand; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.level.gameevent.GameEvent; +import net.minecraft.world.phys.Vec3; +/** Actual Entity restitution with traced provider methods and bounce effects. */ +public final class VanillaRestitutionOracle { + static final class Stop extends RuntimeException {} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static Vec3 vector(JsonElement v){var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static String vectorText(String prefix,Vec3 v){return String.format("%s %016x %016x %016x",prefix,Double.doubleToLongBits(v.x),Double.doubleToLongBits(v.y),Double.doubleToLongBits(v.z));} + static final class Data { + JsonObject input;PrintWriter out;int calls,suppressCalls,gravityCalls;Vec3 velocity; + void query(String text){out.println(text);if(calls++==input.get("fail").getAsInt())throw new Stop();} + boolean suppress(){query("suppress");var values=input.getAsJsonArray("suppress");return values.get(Math.min(suppressCalls++,values.size()-1)).getAsBoolean();} + double gravity(){query("gravity");var values=input.getAsJsonArray("gravity");return number(values.get(Math.min(gravityCalls++,values.size()-1)));} + } + static class BounceBlock extends Block { + Data d;BounceBlock(){super(BlockBehaviour.Properties.of());} + @Override public float getBounceRestitution(){d.query("block-bounce");return single(d.input.get("block"));} + @Override public void bounceOn(Level level,BlockState state,BlockPos p,Entity entity,double distance){d.query(String.format("bounce-on %d %d %d %016x",p.getX(),p.getY(),p.getZ(),Double.doubleToLongBits(distance)));if(d.input.get("mutate").getAsBoolean())d.velocity=new Vec3(17,18,19);} + } + static class State extends BlockState { + Data d;BounceBlock block;State(){super(null,null,null);} + @Override public Block getBlock(){return block;} + @Override public boolean is(TagKey<Block> tag){if(tag!=BlockTags.SUPPRESSES_BOUNCE)throw new AssertionError(tag);d.query("block-suppresses");return d.input.get("tag").getAsBoolean();} + } + static class NonLiving extends Marker { + NonLiving(){super(null,null);} + Data d; + @Override public boolean isSuppressingBounce(){return d.suppress();} + @Override protected double getEntityBounciness(){d.query("entity-bounce");return number(d.input.get("entity"));} + @Override public Vec3 getDeltaMovement(){d.query("velocity");return d.velocity;} + @Override protected double getEffectiveGravity(){return d.gravity();} + @Override protected float getAirDrag(){d.query("drag");return single(d.input.get("drag"));} + @Override public BlockPos getBlockPosBelowThatAffectsMyMovement(){d.query("support-position");return new BlockPos(17,-64,-33);} + @Override public void gameEvent(Holder<GameEvent> event){if(event!=GameEvent.BOUNCE)throw new AssertionError(event);d.query("bounce-event");} + @Override public void setDeltaMovement(Vec3 velocity){d.query(vectorText("set-velocity",velocity));d.velocity=velocity;} + } + static class Living extends ArmorStand { + Living(){super(null,null);} + Data d; + @Override public boolean isSuppressingBounce(){return d.suppress();} + @Override protected double getEntityBounciness(){d.query("entity-bounce");return number(d.input.get("entity"));} + @Override public Vec3 getDeltaMovement(){d.query("velocity");return d.velocity;} + @Override protected double getEffectiveGravity(){return d.gravity();} + @Override protected float getAirDrag(){d.query("drag");return single(d.input.get("drag"));} + @Override public BlockPos getBlockPosBelowThatAffectsMyMovement(){d.query("support-position");return new BlockPos(17,-64,-33);} + @Override public void gameEvent(Holder<GameEvent> event){if(event!=GameEvent.BOUNCE)throw new AssertionError(event);d.query("bounce-event");} + @Override public void setDeltaMovement(Vec3 velocity){d.query(vectorText("set-velocity",velocity));d.velocity=velocity;} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var allocator=Class.forName("sun.misc.Unsafe");var access=allocator.getDeclaredField("theUnsafe");access.setAccessible(true);var unsafe=access.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + var method=Entity.class.getDeclaredMethod("restituteMovementAfterCollisions",BlockState.class,boolean.class,boolean.class,Vec3.class);method.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){ + for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.input=f;d.out=out;d.velocity=vector(f.get("velocity"));Entity entity; + if(f.get("living").getAsBoolean()){var e=(Living)allocate.invoke(unsafe,Living.class);e.d=d;entity=e;}else{var e=(NonLiving)allocate.invoke(unsafe,NonLiving.class);e.d=d;entity=e;} + entity.verticalCollision=f.get("vertical").getAsBoolean();entity.verticalCollisionBelow=f.get("below").getAsBoolean();entity.fallDistance=number(f.get("fall"));entity.syncPosition=f.get("sync").getAsBoolean(); + var block=(BounceBlock)allocate.invoke(unsafe,BounceBlock.class);block.d=d;var state=(State)allocate.invoke(unsafe,State.class);state.d=d;state.block=block; + try{method.invoke(entity,state,f.get("x").getAsBoolean(),f.get("z").getAsBoolean(),vector(f.get("resolved")));out.println("result ok");} + catch(InvocationTargetException error){if(error.getCause() instanceof Stop)out.println("result error");else throw error;} + out.println(vectorText("final",d.velocity));out.println("sync "+entity.syncPosition);out.println("queries "+d.calls); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRetrogenDataOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRetrogenDataOracle.java new file mode 100644 index 000000000..50705ccb2 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRetrogenDataOracle.java @@ -0,0 +1,50 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.nbt.*; +import net.minecraft.world.level.levelgen.BelowZeroRetrogen; + +/** Original typed-NBT transport for the native retrogen codec and hole queries. */ +public final class VanillaRetrogenDataOracle { + private static Tag tag(JsonElement value) { + var row=value.getAsJsonArray();String kind=row.get(0).getAsString();var v=row.get(1); + return switch(kind){ + case "end"->EndTag.INSTANCE; + case "byte"->ByteTag.valueOf(v.getAsByte()); + case "short"->ShortTag.valueOf(v.getAsShort()); + case "int"->IntTag.valueOf(v.getAsInt()); + case "long"->LongTag.valueOf(v.getAsLong()); + case "float"->FloatTag.valueOf(Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16))); + case "double"->DoubleTag.valueOf(Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16))); + case "string"->StringTag.valueOf(v.getAsString()); + case "list"->{var list=new ListTag();for(var item:v.getAsJsonArray())list.add(tag(item));yield list;} + case "compound"->{var map=new CompoundTag();for(var item:v.getAsJsonObject().entrySet())map.put(item.getKey(),tag(item.getValue()));yield map;} + case "long_array"->{var array=v.getAsJsonArray();long[] words=new long[array.size()];for(int i=0;i<words.length;i++)words[i]=array.get(i).getAsLong();yield new LongArrayTag(words);} + case "int_array"->{var array=v.getAsJsonArray();int[] words=new int[array.size()];for(int i=0;i<words.length;i++)words[i]=array.get(i).getAsInt();yield new IntArrayTag(words);} + case "byte_array"->{var array=v.getAsJsonArray();byte[] words=new byte[array.size()];for(int i=0;i<words.length;i++)words[i]=array.get(i).getAsByte();yield new ByteArrayTag(words);} + default->throw new AssertionError(kind); + }; + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + try(var out=new PrintWriter(Files.newBufferedWriter(Path.of(args[1])))){ + int index=0; + for(var line:Files.readAllLines(Path.of(args[0]))){ + out.println("case "+index++); + var result=BelowZeroRetrogen.CODEC.parse(NbtOps.INSTANCE,tag(JsonParser.parseString(line))).result(); + if(result.isEmpty()){out.println("decoded error");continue;} + var data=result.get();var encoded=(CompoundTag)BelowZeroRetrogen.CODEC.encodeStart(NbtOps.INSTANCE,data).getOrThrow(); + out.println("decoded "+data.targetStatus().getName()+" "+data.hasBedrockHoles()+" "+encoded.size()); + out.println("encoded_target "+((StringTag)encoded.get("target_status")).value()); + var words=(LongArrayTag)encoded.get("missing_bedrock"); + var text=new StringJoiner(",");if(words!=null)for(long word:words.getAsLongArray())text.add(Long.toUnsignedString(word,16)); + out.println("mask "+(words==null?"absent":text)); + var holes=new StringBuilder();for(int z=-17;z<=17;z++)for(int x=-17;x<=17;x++)holes.append(data.hasBedrockHole(x,z)?'1':'0'); + for(int z:new int[]{Integer.MIN_VALUE,Integer.MAX_VALUE})for(int x:new int[]{Integer.MIN_VALUE,Integer.MAX_VALUE})holes.append(data.hasBedrockHole(x,z)?'1':'0'); + out.println("holes "+holes); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRuleTestOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRuleTestOracle.java new file mode 100644 index 000000000..04d4c3b54 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRuleTestOracle.java @@ -0,0 +1,37 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import net.minecraft.core.BlockPos; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.structure.templatesystem.RuleTest; + +/** Exercises native replacement-rule codecs and ordered random evaluation. */ +public final class VanillaRuleTestOracle { + public static void main(String[] args) throws Exception { + if(args[0].equals("export")){VanillaBlockStateCodecOracle.main(args);return;} + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + Path dir=Path.of(args[1]); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject()); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8));var inputs=Files.lines(dir.resolve("inputs.txt"))) { + for(var line:(Iterable<String>)inputs::iterator) { + var f=JsonParser.parseString(line).getAsJsonObject();long seed=f.get("seed").getAsLong(); + RandomSource random=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + var decoded=RuleTest.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(f.get("definition").getAsString())).result(); + if(decoded.isEmpty())out.println("decode error");else { + out.println("decode ok");int index=0;var heights=f.getAsJsonArray("heights"); + for(int repeat=0;repeat<f.get("repeats").getAsInt();repeat++)for(var state:f.getAsJsonArray("states")) { + int y=heights.get(index++%heights.size()).getAsInt(); + boolean result=decoded.get().test(Block.stateById(state.getAsInt()),new BlockPos(17,y,-33),random); + out.println("test "+result+" "+random.nextLong()); + } + } + out.println("tail "+random.nextLong()); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaScatteredOreOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaScatteredOreOracle.java new file mode 100644 index 000000000..5f0e138c8 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaScatteredOreOracle.java @@ -0,0 +1,78 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.lang.reflect.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; +import net.minecraft.world.level.levelgen.placement.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.WorldGenLevel; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.feature.Feature; + +/** Invokes native block-writing features through an observable mutable world. */ +public final class VanillaScatteredOreOracle { + private static final class Stop extends RuntimeException {} + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + final Block[] BLOCKS={Blocks.AIR,Blocks.CAVE_AIR,Blocks.VOID_AIR,Blocks.STONE,Blocks.WATER,Blocks.OAK_LEAVES,Blocks.DIRT}; + if(args[0].equals("export")) { + VanillaBlockStateCodecOracle.main(args); + return; + } + Path dir=Path.of(args[1]); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject()); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();long seed=f.get("seed").getAsLong(); + RandomSource random=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + var decoded=Feature.DIRECT_CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(f.get("definition").getAsString())).result(); + if(decoded.isEmpty())out.println("decode error");else { + out.println("decode ok");int[] calls={0};int fail=f.get("fail").getAsInt(),reject=f.get("reject").getAsInt(); + var states=new TreeMap<BlockPos,BlockState>(Comparator.<BlockPos>comparingInt(BlockPos::getX).thenComparingInt(BlockPos::getY).thenComparingInt(BlockPos::getZ)); + var o=f.getAsJsonArray("origin");var center=new BlockPos(o.get(0).getAsInt(),o.get(1).getAsInt(),o.get(2).getAsInt()); + int mode=f.get("mode").getAsInt(); + var world=(WorldGenLevel)Proxy.newProxyInstance(WorldGenLevel.class.getClassLoader(),new Class<?>[]{WorldGenLevel.class},(proxy,method,values)->{ + if(method.getName().equals("getMinY")) { + out.println("min");int call=calls[0]++;if(call==fail)throw new Stop(); + int minimum=f.get("world_min").getAsInt();out.println("minimum "+minimum);return minimum; + } + if(method.getName().equals("getHeight")&&(values==null||values.length==0))return 384; + if(method.getName().equals("getSeaLevel"))return 63; + if(method.getName().equals("setBlockAndUpdate"))return InvocationHandler.invokeDefault(proxy,method,values); + var p=((BlockPos)values[0]).immutable();int call=calls[0]++; + switch(method.getName()) { + case "getBlockState"->{ + out.println("get "+p.getX()+" "+p.getY()+" "+p.getZ());if(call==fail)throw new Stop(); + var fallback=mode==0?BLOCKS[Math.floorMod(p.getX()*31+p.getY()*7+p.getZ()*17,7)].defaultBlockState():Blocks.STONE.defaultBlockState(); + if(mode>=2&&p.equals(center.relative(net.minecraft.core.Direction.values()[mode-2])))fallback=Blocks.CAVE_AIR.defaultBlockState(); + var state=states.getOrDefault(p,fallback);out.println("state "+Block.getId(state));return state; + } + case "setBlock"->{ + var state=(BlockState)values[1];int flags=(Integer)values[2];out.println("set "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+Block.getId(state)+" "+flags);if(call==fail)throw new Stop(); + boolean result=reject==0||call%reject!=0;if(result)states.put(p,state);out.println("written "+result);return result; + } + default->throw new AssertionError("unexpected world method "+method); + } + }); + var p=f.getAsJsonArray("origin");var origin=new BlockPos(p.get(0).getAsInt(),p.get(1).getAsInt(),p.get(2).getAsInt()); + for(int repeat=0;repeat<f.get("repeats").getAsInt();repeat++) { + calls[0]=0; + try {out.println("place "+decoded.get().place(world,null,random,origin));}catch(Stop|IllegalArgumentException error){out.println("place error");} + out.println("next "+random.nextLong()); + for(var entry:states.entrySet()){var q=entry.getKey();out.println("stored "+q.getX()+" "+q.getY()+" "+q.getZ()+" "+Block.getId(entry.getValue()));} + out.println("end"); + } + } + out.println("tail "+random.nextLong()); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java new file mode 100644 index 000000000..f860fc63f --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java @@ -0,0 +1,104 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.resources.Identifier; +import net.minecraft.world.level.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.level.block.state.properties.Property; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.phys.*; +import net.minecraft.world.phys.shapes.*; +import static dev.horizonlab.parity.VanillaRegistryCollisionScanOracle.*; + +/** Actual Entity.collide and CollisionGetter.noCollision over an independently + * constructed version of the development client's resident scene. */ +public final class VanillaSceneCollisionOracle { + static final String[][] GALLERY = { + {"oak_stairs","facing=north","half=top","shape=inner_left"}, + {"stone_slab","type=top"}, {"anvil","facing=east"}, {"torch"}, {"lantern"}, + {"oak_fence","north=true","east=true"}, {"oak_fence_gate","facing=west","open=true"}, + {"iron_bars","north=true","south=true"}, {"cobweb"}, {"grindstone","face=wall","facing=west"}, + {"ladder","facing=west"}, {"amethyst_cluster","facing=east"}, {"stone"}, {"stone"}, {"stone"}, {"stone"} + }; + static <T extends Comparable<T>> BlockState property(BlockState state, Property<T> key, String value) { + return state.setValue(key,key.getValue(value).orElseThrow()); + } + static BlockState state(String name) { + return BuiltInRegistries.BLOCK.getValue(Identifier.parse(name)).defaultBlockState(); + } + static void put(Map<Long,Chunk> chunks,int x,int y,int z,BlockState state) { + chunks.get(key(x>>4,z>>4)).write(new BlockPos(x,y,z),Block.getId(state)); + } + static Vec3 vector(JsonElement value) { + var a=value.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2))); + } + static HashMap<Long,Chunk> scene(JsonObject description,Trace trace)throws Exception { + int radius=description.get("radius").getAsInt(); + if(radius<1||radius>16)throw new AssertionError("invalid scene radius"); + Holder<Biome> biome=Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},Biomes.PLAINS); + var ids=new IdMapper<Holder<Biome>>();ids.add(biome); + factory=new PalettedContainerFactory(Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY),Blocks.AIR.defaultBlockState(),null,Strategy.createForBiomes(ids),biome,null); + var chunks=new HashMap<Long,Chunk>(); + String[] names={"bedrock","dirt","stone","sand","oak_planks","bricks"}; + BlockState[] materials=Arrays.stream(names).map(VanillaSceneCollisionOracle::state).toArray(BlockState[]::new); + for(int cz=-radius;cz<=radius;cz++)for(int cx=-radius;cx<=radius;cx++) { + chunks.put(key(cx,cz),new Chunk(cx,cz,trace,null)); + for(int z=0;z<16;z++)for(int x=0;x<16;x++)for(int y=0;y<4;y++) + put(chunks,cx*16+x,y,cz*16+z,materials[y==0?0:y<3?1:((cx+cz)&1)==0?2:3]); + } + for(int y=4;y<11;y++)for(int z=-10;z<=10;z++)for(int x=-10;x<=10;x++) + if(Math.max(Math.abs(x),Math.abs(z))<=14-y)put(chunks,x,y,z,materials[(y&1)==0?4:5]); + var gallery=description.getAsJsonArray("model_gallery"); + if(gallery.size()!=GALLERY.length || chunks.size()!=description.get("resident_chunks").getAsInt())throw new AssertionError("scene size differs"); + for(int i=0;i<GALLERY.length;i++) { + var spec=GALLERY[i];var state=state(spec[0]); + for(int j=1;j<spec.length;j++) { + var p=spec[j].split("=");state=property(state,Objects.requireNonNull(state.getBlock().getStateDefinition().getProperty(p[0])),p[1]); + } + int x=i%4*4-7,z=i/4*4+14; + var actual=gallery.get(i).getAsJsonObject();var p=actual.getAsJsonArray("position"); + if(actual.get("state_id").getAsInt()!=Block.getId(state) || p.get(0).getAsInt()!=x || p.get(1).getAsInt()!=4 || p.get(2).getAsInt()!=z) + throw new AssertionError("gallery differs at "+i); + put(chunks,x,4,z,state); + } + return chunks; + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + Path dir=Path.of(args[1]); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(Path.of(args[2]).resolve("block-tags.json"))).getAsJsonObject()); + var description=JsonParser.parseString(Files.readString(dir.resolve("scene.json"))).getAsJsonObject(); + var trace=new Trace();trace.out=new PrintWriter(OutputStream.nullOutputStream());trace.fail=-1; + var chunks=scene(description,trace); + var world=(CollisionGetter)Proxy.newProxyInstance(CollisionGetter.class.getClassLoader(),new Class<?>[]{CollisionGetter.class},(proxy,method,values)->{ + if(method.getName().equals("getChunkForCollisions"))return chunks.get(key((int)values[0],(int)values[1])); + if(method.getName().equals("getBlockEntity"))return null; + throw new AssertionError(method); + }); + var allocator=Class.forName("sun.misc.Unsafe");var access=allocator.getDeclaredField("theUnsafe");access.setAccessible(true); + var unsafe=access.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + var level=(StepLevel)allocate.invoke(unsafe,StepLevel.class);level.trace=trace;level.world=world;level.entities=List.of(); + level.border=new StepBorder();level.border.trace=trace; + var entity=(StepEntity)allocate.invoke(unsafe,StepEntity.class); + var collide=net.minecraft.world.entity.Entity.class.getDeclaredMethod("collide",Vec3.class);collide.setAccessible(true); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))) { + for(var line:(Iterable<String>)lines::iterator) { + var f=JsonParser.parseString(line).getAsJsonObject();var bounds=new AABB(vector(f.get("min")),vector(f.get("max"))); + float step=Float.intBitsToFloat(Integer.parseUnsignedInt(f.get("step").getAsString(),16)); + entity.configure(level,bounds,step,f.get("grounded").getAsBoolean());level.context=CollisionContext.positionContext(bounds.minY); + var movement=(Vec3)collide.invoke(entity,vector(f.get("delta"))); + boolean before=level.noCollision(entity,bounds);var moved=bounds.move(movement); + level.context=CollisionContext.positionContext(moved.minY);boolean after=level.noCollision(entity,moved); + out.printf("move %016x %016x %016x clear %s %s%n",Double.doubleToLongBits(movement.x),Double.doubleToLongBits(movement.y),Double.doubleToLongBits(movement.z),before,after); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneMotionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneMotionOracle.java new file mode 100644 index 000000000..7dab6e62a --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneMotionOracle.java @@ -0,0 +1,366 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.lang.invoke.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.resources.Identifier; +import net.minecraft.world.effect.*; +import net.minecraft.world.damagesource.*; +import net.minecraft.sounds.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.entity.ai.attributes.*; +import net.minecraft.world.entity.player.*; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.border.WorldBorder; +import net.minecraft.world.level.gameevent.GameEvent; +import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.phys.*; +import net.minecraft.network.syncher.*; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.food.FoodData; +import net.minecraft.world.phys.shapes.*; +import static dev.horizonlab.parity.VanillaRegistryCollisionScanOracle.*; + +/** Real server-player movement, landing and hurt over stored attributes, health + * and chunks. Audio/network delivery, statistics/tracker/criterion listeners and + * full death services remain controlled boundaries. Clock operations set up the + * two damage-clock fields, not the complete enclosing native tick methods. */ +public final class VanillaSceneMotionOracle { + static Field position,history,support,noBlocks,last,stuck,delay,trigger,attributeStorage,attributeDirty,attributeCached,impact,grace; + static MethodHandle aiStep; + static Method refreshAttributes; + static EntityDataAccessor<Float> healthKey,absorptionKey; + static Field healthDead,cooldown,lastHurt,noAction,lastDamage,lastStamp,foodExhaustion,foodTimer,storedSpeed; + static Map<String,DamageSource> damageSources; + static final class TrackedAttributes extends AttributeMap { + final List<AttributeInstance> instances=new ArrayList<>(); + TrackedAttributes(AttributeSupplier supplier){super(supplier);} + @Override public AttributeInstance getInstance(Holder<Attribute> key){ + var instance=super.getInstance(key); + if(instance!=null&&!instances.contains(instance))instances.add(instance); + return instance; + } + } + static final class Waypoints extends net.minecraft.server.waypoints.ServerWaypointManager { + Level level; + @Override public void trackWaypoint(net.minecraft.world.waypoints.WaypointTransmitter actor){level.actor.events.add("waypoint transmit true");} + @Override public void untrackWaypoint(net.minecraft.world.waypoints.WaypointTransmitter actor){level.actor.events.add("waypoint transmit false");} + @Override public void addPlayer(ServerPlayer actor){level.actor.events.add("waypoint receive true");} + @Override public void removePlayer(ServerPlayer actor){level.actor.events.add("waypoint receive false");} + } + static String sourceName(DamageSource source){return source==null?"none":source.typeHolder().getRegisteredName();} + static final class Connection extends net.minecraft.server.network.ServerGamePacketListenerImpl { + Connection(){super(null,null,null,null);} + @Override public boolean hasClientLoaded(){return true;} + } + static final class Tracker extends CombatTracker { + Actor actor;Tracker(){super(null);} + @Override public void recordDamage(DamageSource source,float amount){actor.events.add(String.format("record-damage %08x",Float.floatToIntBits(amount)));} + } + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static void write(Field f,Object o,Object value){try{f.set(o,value);}catch(Exception e){throw new AssertionError(e);}} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static String blockPos(BlockPos p){return p.getX()+","+p.getY()+","+p.getZ();} + static String vectorBits(Vec3 p){return String.format("%016x,%016x,%016x",Double.doubleToLongBits(p.x),Double.doubleToLongBits(p.y),Double.doubleToLongBits(p.z));} + static String soundName(SoundEvent s){ + if(s==SoundEvents.PLAYER_SMALL_FALL)return "small";if(s==SoundEvents.PLAYER_BIG_FALL)return "big"; + return VanillaBlockLandingOracle.sound(s); + } + static final class Sources extends DamageSources { + DamageSource fall,stalagmite,starve;Sources(){super(null);} + @Override public DamageSource starve(){return starve;} + @Override public DamageSource fall(){return fall;} + @Override public DamageSource stalagmite(){return stalagmite;} + } + static final class Rules extends net.minecraft.world.level.gamerules.GameRules { + boolean regenerate=true; + Rules(){super(net.minecraft.world.flag.FeatureFlagSet.of());} + @SuppressWarnings("unchecked") @Override public <T> T get(net.minecraft.world.level.gamerules.GameRule<T> rule){ + return rule==net.minecraft.world.level.gamerules.GameRules.NATURAL_HEALTH_REGENERATION?(T)Boolean.valueOf(regenerate):super.get(rule); + } + } + static final class Border extends WorldBorder { + @Override public boolean isInsideCloseToBorder(Entity e,AABB b){return false;} + } + static final class Level extends net.minecraft.server.level.ServerLevel { + Map<Long,Chunk> chunks;WorldBorder border;Actor actor;Sources sources;net.minecraft.util.RandomSource rng; + net.minecraft.server.MinecraftServer server; + Rules rules;net.minecraft.world.Difficulty difficulty;long time;Waypoints waypoints; + @Override public net.minecraft.server.waypoints.ServerWaypointManager getWaypointManager(){return waypoints;} + @Override public net.minecraft.world.level.gamerules.GameRules getGameRules(){return rules;} + @Override public net.minecraft.world.Difficulty getDifficulty(){return difficulty;} + static final net.minecraft.world.TickRateManager TICK_RATE=new net.minecraft.world.TickRateManager(); + @Override public net.minecraft.world.TickRateManager tickRateManager(){return TICK_RATE;} + @Override public long getGameTime(){return time;} + @Override public void broadcastDamageEvent(Entity actor,DamageSource source){this.actor.events.add("broadcast-damage");} + Level(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public boolean isClientSide(){return false;} + @Override public BlockGetter getChunkForCollisions(int x,int z){return chunks.get(key(x,z));} + @Override public BlockState getBlockState(BlockPos p){var c=chunks.get(key(p.getX()>>4,p.getZ()>>4));return c==null?Blocks.AIR.defaultBlockState():c.getBlockState(p);} + @Override public FluidState getFluidState(BlockPos p){return getBlockState(p).getFluidState();} + @Override public List<VoxelShape> getEntityCollisions(Entity e,AABB b){return List.of();} + @Override public List<Entity> getPushableEntities(Entity e,AABB b){return List.of();} + @Override public List<Entity> getEntities(Entity e,AABB b){return e!=actor&&b.intersects(actor.getBoundingBox())?List.of(actor):List.of();} + @Override public WorldBorder getWorldBorder(){return border;} + @Override public DamageSources damageSources(){return sources;} + @Override public net.minecraft.util.RandomSource getRandom(){return rng;} + @Override public net.minecraft.server.MinecraftServer getServer(){return server;} + @Override public void gameEvent(Holder<GameEvent> event,Vec3 pos,GameEvent.Context context){if(event==GameEvent.HIT_GROUND)actor.events.add("hit "+vectorBits(pos)+" "+Block.getId(context.affectedState()));} + @Override public void gameEvent(Holder<GameEvent> event,BlockPos pos,GameEvent.Context context){actor.events.add("event "+(event==GameEvent.BLOCK_CHANGE?"change":event==GameEvent.BLOCK_DESTROY?"destroy":"unknown")+" "+blockPos(pos)+" "+Block.getId(context.affectedState())+" "+(context.sourceEntity()!=null));} + @Override public <T extends net.minecraft.core.particles.ParticleOptions> int sendParticles(T particle,double x,double y,double z,int count,double dx,double dy,double dz,double speed){ + var b=(net.minecraft.core.particles.BlockParticleOption)particle;if(dx!=0||dy!=0||dz!=0)throw new AssertionError(); + actor.events.add(String.format("particles %d %s %d %016x",Block.getId(b.getState()),vectorBits(new Vec3(x,y,z)),count,Double.doubleToLongBits(speed)));return 0; + } + @Override public void playSound(Entity e,BlockPos p,SoundEvent s,SoundSource source,float volume,float pitch){if(e!=null||source!=SoundSource.BLOCKS)throw new AssertionError();actor.events.add(String.format("sound %s %s %08x %08x",soundName(s),blockPos(p),Float.floatToIntBits(volume),Float.floatToIntBits(pitch)));} + @Override public void broadcastEntityEvent(Entity e,byte event){actor.events.add("broadcast "+Byte.toUnsignedInt(event));} + @Override public boolean setBlock(BlockPos p,BlockState state,int flags){chunks.get(key(p.getX()>>4,p.getZ()>>4)).write(p,Block.getId(state));actor.events.add("write "+blockPos(p)+" "+Block.getId(state)+" "+flags);return true;} + @Override public boolean destroyBlock(BlockPos p,boolean drops){chunks.get(key(p.getX()>>4,p.getZ()>>4)).write(p,Block.getId(Blocks.AIR.defaultBlockState()));actor.events.add("destroy "+blockPos(p)+" "+drops);return true;} + @Override public void levelEvent(int event,BlockPos p,int data){actor.events.add("level-event "+event+" "+blockPos(p)+" "+data);} + } + static final class Actor extends ServerPlayer { + AttributeMap attrs;byte flags;boolean preparedInput;List<String> events; + // Query overrides only while directly exercising the complete statistics + // method; regular resident movement keeps its actual dry pose state. + Integer statisticsFlags; + Object sprintController; + Pose scenePose=Pose.STANDING; + @Override public Pose getPose(){return scenePose;} + @Override public void setPose(Pose pose){if(scenePose!=pose){scenePose=pose;super.refreshDimensions();}} + public boolean fitPose(Pose pose){return super.canPlayerFitWithinBlocksAndEntitiesWhen(pose);} + public void poseTick(){updatePlayerPose();} + public void attributeTick()throws Exception{refreshAttributes.invoke(this);} + boolean statFlag(int bit){return (statisticsFlags&(1<<bit))!=0;} + SynchedEntityData.DataItem<Float> healthItem,absorptionItem;Level sceneLevel;Tracker tracker;net.minecraft.server.PlayerAdvancements advancements; + Actor(){super(null,null,null,null);} + void configure(Level l){sceneLevel=l;setLevel(l);} + @Override public Level level(){return sceneLevel;} + @Override public boolean isChangingDimension(){return false;} + @Override public boolean isPermanentlyInvulnerable(){return false;} + @Override public boolean isTemporarilyInvulnerable(){return false;} + @Override public boolean fireImmune(){return false;} + @Override public boolean is(net.minecraft.tags.TagKey<EntityType<?>> tag){return false;} // player: neither fall immune nor freeze-extra + @Override public boolean isSleeping(){return false;} + @Override public ItemStack getUseItem(){return ItemStack.EMPTY;} + @Override public boolean isUsingItem(){return false;} + @Override public ItemStack getItemInHand(net.minecraft.world.InteractionHand hand){return ItemStack.EMPTY;} + @Override protected void removeEntitiesOnShoulder(){} + @Override public Collection<MobEffectInstance> getActiveEffects(){return List.of();} + @Override public CombatTracker getCombatTracker(){return tracker;} + @Override public net.minecraft.server.PlayerAdvancements getAdvancements(){events.add("hurt-criterion");return advancements;} + @Override public void onSyncedDataUpdated(EntityDataAccessor<?> key){if(key!=healthKey&&key!=absorptionKey)throw new AssertionError(key);events.add(String.format("updated %d %08x %s",key.id(),Float.floatToIntBits(getEntityData().get(key==healthKey?healthKey:absorptionKey)),getEntityData().isDirty()));} + @Override public void gameEvent(Holder<GameEvent> event){if(event==GameEvent.ENTITY_DAMAGE)events.add("entity-damage");else super.gameEvent(event);} + @Override public void die(DamageSource source){dead=true;events.add("death-request");} + @Override protected void playHurtSound(DamageSource source){events.add("hurt-sound");} + @Override protected SoundEvent getDeathSound(){return SoundEvents.PLAYER_DEATH;} + @Override public void makeSound(SoundEvent sound){events.add("death-sound");} + @Override public GameType gameMode(){return GameType.SURVIVAL;} + @Override public AttributeMap getAttributes(){return attrs;} + @Override protected boolean getSharedFlag(int bit){return (flags&(1<<bit))!=0;} + @Override protected void setSharedFlag(int bit,boolean v){flags=(byte)(v?flags|(1<<bit):flags&~(1<<bit));} + @Override public void setPos(double x,double y,double z){write(position,this,new Vec3(x,y,z));setBoundingBox(EntityDimensions.scalable(getBbWidth(),getBbHeight()).makeBoundingBox(position()));} + @Override public BlockPos blockPosition(){return BlockPos.containing(position());} + @Override public BlockState getInBlockState(){return level().getBlockState(blockPosition());} + @Override public ItemStack getMainHandItem(){return ItemStack.EMPTY;} + @Override public boolean isPassenger(){return statisticsFlags!=null&&statFlag(0);} + @Override public boolean isSwimming(){return statisticsFlags!=null&&statFlag(1);} + @Override public boolean isEyeInFluid(net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> tag){return statisticsFlags!=null&&statFlag(2);} + @Override public boolean isInWater(){return statisticsFlags!=null&&statFlag(3);} + @Override public boolean onClimbable(){return statisticsFlags!=null?statFlag(4):super.onClimbable();} + @Override public boolean onGround(){return statisticsFlags!=null?statFlag(5):super.onGround();} + @Override public boolean isSprinting(){return statisticsFlags!=null?statFlag(6):super.isSprinting();} + @Override public boolean isCrouching(){return statisticsFlags!=null?statFlag(7):super.isCrouching();} + @Override public boolean isInLava(){return false;} + @Override public boolean isInLiquid(){return false;} + @Override public boolean isFallFlying(){return statisticsFlags!=null&&statFlag(8);} + @Override public boolean isAutoSpinAttack(){return false;} + @Override public boolean isSpectator(){return false;} + @Override public boolean isNoGravity(){return false;} + @Override public boolean hasEffect(Holder<MobEffect> effect){return false;} + @Override public MobEffectInstance getEffect(Holder<MobEffect> effect){return null;} + @Override public MoveSimulationType getMoveSimulationType(){return MoveSimulationType.SERVER_AND_CLIENT;} + @Override public boolean isClientAuthoritative(){return false;} + @Override public void recordMovement(MoverType mover,Vec3 movement){} + @Override protected boolean updateFluidInteraction(){return false;} + @Override public void playSound(SoundEvent sound,float volume,float pitch){events.add(String.format("sound %s entity %08x %08x",soundName(sound),Float.floatToIntBits(volume),Float.floatToIntBits(pitch)));} + @Override protected void playBlockFallSound(){events.add("block-fall-sound");} + @Override public void awardStat(net.minecraft.stats.Stat<?> stat,int value){ + if(stat.getValue()!=net.minecraft.stats.Stats.JUMP)throw new AssertionError(stat); + events.add("health-stat jump "+value); + } + @Override public void awardStat(Identifier stat,int value){ + if(stat==net.minecraft.stats.Stats.FALL_ONE_CM){events.add("stat "+value);return;} + String name=stat==net.minecraft.stats.Stats.DAMAGE_ABSORBED?"absorbed":stat==net.minecraft.stats.Stats.DAMAGE_TAKEN?"taken":stat==net.minecraft.stats.Stats.DAMAGE_RESISTED?"resisted":null; + if(name==null){name=stat.getPath();if(!Set.of("swim_one_cm","walk_under_water_one_cm","walk_on_water_one_cm","climb_one_cm","sprint_one_cm","crouch_one_cm","walk_one_cm","aviate_one_cm","fly_one_cm").contains(name))throw new AssertionError(stat);}events.add("health-stat "+name+" "+value); + } + @Override public boolean hurtServer(net.minecraft.server.level.ServerLevel level,DamageSource source,float damage){var sources=((Level)level).sources;events.add(String.format("damage %s %08x",source==sources.fall?"fall":source==sources.stalagmite?"stalagmite":source==sources.starve?"starve":"unknown",Float.floatToIntBits(damage)));return super.hurtServer(level,source,damage);} + @Override public void teleportRelative(double x,double y,double z){setPos(getX()+x,getY()+y,getZ()+z);} + @Override protected void playStepSound(BlockPos p,BlockState state){} + @Override public void gameEvent(Holder<GameEvent> event,Entity source){} + @Override public LivingEntity getControllingPassenger(){return null;} + @Override public double getFluidHeight(net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> tag){return 0;} + @Override public double getFluidJumpThreshold(){return .4;} + @Override public int getTicksFrozen(){return 0;} + @Override public void setTicksFrozen(int value){if(value!=0)throw new AssertionError(value);} + @Override protected void applyEffectsFromBlocks(){} + @Override protected void applyInput(){if(!preparedInput)super.applyInput();} + void peaceful(){tickRegeneration();} + void clock()throws Exception{sceneLevel.time++;tickCount++;if(cooldown.getInt(this)>0)cooldown.setInt(this,cooldown.getInt(this)-1);if(hurtTime>0)hurtTime--;} + void playerMovementTick(Vec3 input,boolean jumping){ + preparedInput=true;xxa=(float)input.x;yya=0;zza=(float)input.z;setJumping(jumping); + try{aiStep();}finally{preparedInput=false;} + } + void movementTick(Vec3 input)throws Exception { + xxa=(float)input.x;yya=(float)input.y;zza=(float)input.z; + try{aiStep.invoke((LivingEntity)this);}catch(Throwable t){if(t instanceof Exception e)throw e;throw new AssertionError(t);} + } + void land(double dy,boolean ground,BlockPos pos){checkFallDamage(dy,ground,level().getBlockState(pos),pos);} + } + static String pos(Object v){var o=(Optional<?>)v;return o.isEmpty()?"none":((BlockPos)o.get()).getX()+","+((BlockPos)o.get()).getY()+","+((BlockPos)o.get()).getZ();} + @SuppressWarnings("unchecked") + static void snapshot(PrintWriter out,Actor p)throws Exception{ + var attributes=new ArrayList<String>(); + var stored=(Map<Holder<Attribute>,AttributeInstance>)attributeStorage.get(p.attrs); + for(var entry:stored.entrySet()){ + var a=entry.getValue();var modifiers=new ArrayList<String>(); + for(var m:a.getModifiers())modifiers.add(String.format("%s:%016x:%d:%s",m.id(),Double.doubleToLongBits(m.amount()),m.operation().ordinal(),a.getPermanentModifiers().contains(m))); + Collections.sort(modifiers); + attributes.add(String.format("%s:%016x:%s:%016x:%s:%s:[%s]",entry.getKey().getRegisteredName(),Double.doubleToLongBits(a.getBaseValue()),attributeDirty.getBoolean(a),Double.doubleToLongBits(attributeCached.getDouble(a)),p.attrs.getAttributesToUpdate().contains(a),p.attrs.getAttributesToSync().contains(a),String.join(",",modifiers))); + } + Collections.sort(attributes); + AABB b=p.getBoundingBox(); + for(var v:List.of(p.position(),p.getDeltaMovement(),new Vec3(b.minX,b.minY,b.minZ),new Vec3(b.maxX,b.maxY,b.maxZ))) + out.printf("%016x %016x %016x ",Double.doubleToLongBits(v.x),Double.doubleToLongBits(v.y),Double.doubleToLongBits(v.z)); + out.printf("%s %s %s %s %s %s %s %016x %s %s %s %08x %d %08x %d %d %s | %s%n",p.horizontalCollision,p.verticalCollision,p.verticalCollisionBelow,p.minorHorizontalCollision, + p.onGround(),noBlocks.getBoolean(p),pos(support.get(p)),Double.doubleToLongBits(p.fallDistance),pos(last.get(p)),p.needsSync,p.syncPosition,Float.floatToIntBits(storedSpeed.getFloat(p)),delay.getInt(p),Float.floatToIntBits(p.yHeadRot),trigger.getInt(p),grace.getInt(p),impact.get(p)==null?"none":vectorBits((Vec3)impact.get(p)),String.join(";",attributes)); + out.println("events "+String.join(" | ",p.events));p.events.clear(); + out.println("block "+Block.getId(p.level().getBlockState(new BlockPos(25,3,25)))); + out.printf("health %08x %08x %08x %d %d %08x %d %d %s %d %s %s %s %s %s %d%n", + Float.floatToIntBits(p.getHealth()),Float.floatToIntBits(p.getAbsorptionAmount()),Float.floatToIntBits(foodExhaustion.getFloat(p.getFoodData())), + noAction.getInt(p),cooldown.getInt(p),Float.floatToIntBits(lastHurt.getFloat(p)),p.hurtDuration,p.hurtTime,sourceName((DamageSource)lastDamage.get(p)),lastStamp.getLong(p),healthDead.getBoolean(p),p.syncVelocity, + p.getEntityData().isDirty(),p.healthItem.isDirty(),p.absorptionItem.isDirty(),p.sceneLevel.time); + var food=p.getFoodData();out.printf("food %d %08x %d %d %d %s%n",food.getFoodLevel(),Float.floatToIntBits(food.getSaturationLevel()),foodTimer.getInt(food),p.tickCount,p.sceneLevel.difficulty.ordinal(),p.sceneLevel.rules.regenerate); + out.println("input "+p.isSprinting()+" "+(p.sprintController==null?"0 false false":p.sprintController.getClass().getMethod("state").invoke(p.sprintController))); + out.printf("pose %s %s %s %08x %08x %08x%n",p.getPose(),p.isShiftKeyDown(),p.sprintController!=null&&((Boolean)p.sprintController.getClass().getMethod("crouching").invoke(p.sprintController)),Float.floatToIntBits(p.getBbWidth()),Float.floatToIntBits(p.getBbHeight()),Float.floatToIntBits(p.getEyeHeight())); + } + @SuppressWarnings("unchecked") public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(Path.of(args[2]).resolve("block-tags.json"))).getAsJsonObject()); + var u=Class.forName("sun.misc.Unsafe");var f=u.getDeclaredField("theUnsafe");f.setAccessible(true);var unsafe=f.get(null);var allocate=u.getMethod("allocateInstance",Class.class); + position=field(Entity.class,"position");history=field(Entity.class,"movementThisTick");support=field(Entity.class,"mainSupportingBlockPos");noBlocks=field(Entity.class,"onGroundNoBlocks");last=field(LivingEntity.class,"lastClimbablePos");stuck=field(Entity.class,"stuckSpeedMultiplier"); + var abilities=field(Player.class,"abilities"); + healthKey=(EntityDataAccessor<Float>)field(LivingEntity.class,"DATA_HEALTH_ID").get(null);absorptionKey=(EntityDataAccessor<Float>)field(Player.class,"DATA_PLAYER_ABSORPTION_ID").get(null); + healthDead=field(LivingEntity.class,"dead");cooldown=field(LivingEntity.class,"damageCooldownTime");lastHurt=field(LivingEntity.class,"lastHurt");noAction=field(LivingEntity.class,"noActionTime");lastDamage=field(LivingEntity.class,"lastDamageSource");lastStamp=field(LivingEntity.class,"lastDamageStamp");foodExhaustion=field(FoodData.class,"exhaustionLevel");foodTimer=field(FoodData.class,"tickTimer"); + var dataCtor=SynchedEntityData.class.getDeclaredConstructor(SyncedDataHolder.class,SynchedEntityData.DataItem[].class);dataCtor.setAccessible(true); + var damageRegistry=VanillaDamageSourceOracle.registry(dir.resolve("damage"));damageSources=new HashMap<>(); + for(var name:damageRegistry.keySet())damageSources.put(name.toString(),new DamageSource(damageRegistry.get(name).orElseThrow())); + delay=field(LivingEntity.class,"noJumpDelay"); + trigger=field(Player.class,"jumpTriggerTime");storedSpeed=field(LivingEntity.class,"speed"); + impact=field(LivingEntity.class,"currentImpulseImpactPos");grace=field(LivingEntity.class,"currentImpulseContextResetGraceTime"); + attributeStorage=field(AttributeMap.class,"attributes");attributeDirty=field(AttributeInstance.class,"dirty");attributeCached=field(AttributeInstance.class,"cachedValue"); + refreshAttributes=LivingEntity.class.getDeclaredMethod("refreshDirtyAttributes");refreshAttributes.setAccessible(true); + aiStep=MethodHandles.privateLookupIn(LivingEntity.class,MethodHandles.lookup()).findSpecial(LivingEntity.class,"aiStep",MethodType.methodType(void.class),LivingEntity.class); + var description=JsonParser.parseString(Files.readString(dir.resolve("scene.json"))).getAsJsonObject(); + var trace=new Trace();trace.out=new PrintWriter(OutputStream.nullOutputStream());trace.fail=-1; + var level=(Level)allocate.invoke(unsafe,Level.class);level.chunks=VanillaSceneCollisionOracle.scene(description,trace);level.border=new Border(); + level.rng=net.minecraft.util.RandomSource.create(0);level.sources=(Sources)allocate.invoke(unsafe,Sources.class); + level.sources.fall=damageSources.get("minecraft:fall");level.sources.stalagmite=damageSources.get("minecraft:stalagmite");level.sources.starve=damageSources.get("minecraft:starve"); + level.waypoints=(Waypoints)allocate.invoke(unsafe,Waypoints.class);level.waypoints.level=level; + level.rules=new Rules();level.difficulty=net.minecraft.world.Difficulty.NORMAL; + var server=(VanillaBlockLandingOracle.Server)allocate.invoke(unsafe,VanillaBlockLandingOracle.Server.class); + server.d=new VanillaBlockLandingOracle.Data();server.d.out=new PrintWriter(OutputStream.nullOutputStream());server.d.f=JsonParser.parseString("{\"fail\":-1,\"protected\":false}").getAsJsonObject();level.server=server; + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var enriched=new PrintWriter(Files.newBufferedWriter(dir.resolve("inputs-"+args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){ + for(var line:(Iterable<String>)lines::iterator){ + var row=JsonParser.parseString(line).getAsJsonObject();var p=(Actor)allocate.invoke(unsafe,Actor.class);p.configure(level);p.events=new ArrayList<>();level.actor=p; + write(field(Entity.class,"type"),p,EntityTypes.PLAYER); + p.scenePose=Pose.STANDING; + write(field(Entity.class,"passengers"),p,com.google.common.collect.ImmutableList.of());write(field(Entity.class,"dimensions"),p,p.getDefaultDimensions(Pose.STANDING));write(field(Entity.class,"eyeHeight"),p,1.62f); + write(field(Entity.class,"interpolationHandler"),p,InterpolationHandler.NO_OP); + var equipment=new EntityEquipment();write(field(LivingEntity.class,"equipment"),p,equipment); + write(field(Player.class,"inventory"),p,new Inventory(p,equipment)); + p.attrs=new TrackedAttributes(VanillaEntityAttributeOracle.supplier(EntityTypes.PLAYER));write(field(LivingEntity.class,"attributes"),p,p.attrs); + write(history,p,new ArrayDeque<>());write(support,p,Optional.empty());write(last,p,Optional.empty());write(stuck,p,Vec3.ZERO);write(abilities,p,new Abilities()); + write(field(ServerPlayer.class,"shoulderEntityLeft"),p,new net.minecraft.nbt.CompoundTag());write(field(ServerPlayer.class,"shoulderEntityRight"),p,new net.minecraft.nbt.CompoundTag()); + p.connection=(Connection)allocate.invoke(unsafe,Connection.class); + p.advancements=(net.minecraft.server.PlayerAdvancements)allocate.invoke(unsafe,net.minecraft.server.PlayerAdvancements.class); + write(field(net.minecraft.server.PlayerAdvancements.class,"activeTriggers"),p.advancements,new HashMap<>()); + p.tracker=(Tracker)allocate.invoke(unsafe,Tracker.class);p.tracker.actor=p; + write(field(Player.class,"foodData"),p,new FoodData()); + var items=new SynchedEntityData.DataItem<?>[Math.max(healthKey.id(),absorptionKey.id())+1]; + for(int i=0;i<items.length;i++)items[i]=new SynchedEntityData.DataItem<Float>(new EntityDataAccessor<Float>(i,EntityDataSerializers.FLOAT),0f); + items[healthKey.id()]=p.healthItem=new SynchedEntityData.DataItem<Float>(healthKey,1f);items[absorptionKey.id()]=p.absorptionItem=new SynchedEntityData.DataItem<Float>(absorptionKey,0f); + write(field(Entity.class,"entityData"),p,dataCtor.newInstance(p,items));p.setHealth(p.getMaxHealth());p.events.clear();level.time=0;level.rules.regenerate=true;level.difficulty=net.minecraft.world.Difficulty.NORMAL; + p.setDeltaMovement(Vec3.ZERO);p.setPos(VanillaSceneCollisionOracle.vector(row.get("position"))); + for(var value:row.getAsJsonArray("ops")){ + var op=value.getAsJsonObject();switch(op.get("mode").getAsString()){ + case "shift"->p.setShiftKeyDown(op.get("value").getAsBoolean()); + case "pose_tick"->p.poseTick(); + case "refresh_dimensions"->p.refreshDimensions(); + case "refresh_attributes"->p.attributeTick(); + case "pose"->p.setPose(Pose.valueOf(op.get("value").getAsString())); + case "controlled_tick"->{ + if(p.sprintController==null)p.sprintController=Class.forName("dev.horizonlab.parity.VanillaSprintInputOracle$Controller").getConstructor(ServerPlayer.class).newInstance(p); + int mask=op.get("value").getAsInt();var direction=(net.minecraft.world.phys.Vec2)p.sprintController.getClass().getMethod("step",int.class).invoke(p.sprintController,mask); + p.clock();var before=p.position();p.playerMovementTick(new Vec3(direction.x,0,direction.y),(mask&16)!=0);p.attributeTick();p.poseTick();p.checkMovementStatistics(p.getX()-before.x,p.getY()-before.y,p.getZ()-before.z);p.getFoodData().tick(p); + } + case "health"->p.setHealth(single(op.get("value"))); + case "absorption"->p.setAbsorptionAmount(single(op.get("value"))); + case "hurt"->p.hurtServer(level,damageSources.get(op.get("name").getAsString()),single(op.get("value"))); + case "clock"->p.clock(); + case "tick_count"->p.tickCount=op.get("value").getAsInt(); + case "rules"->{level.difficulty=net.minecraft.world.Difficulty.values()[op.get("difficulty").getAsInt()];level.rules.regenerate=op.get("regenerate").getAsBoolean();} + case "food"->{var food=p.getFoodData();food.setFoodLevel(op.get("food").getAsInt());food.setSaturation(single(op.get("saturation")));foodExhaustion.setFloat(food,single(op.get("exhaustion")));foodTimer.setInt(food,op.get("timer").getAsInt());} + case "exhaust"->p.causeFoodExhaustion(single(op.get("value"))); + case "eat"->p.getFoodData().eat(op.get("nutrition").getAsInt(),single(op.get("value"))); + case "food_tick"->p.getFoodData().tick(p); + case "peaceful"->p.peaceful(); + case "simulation_tick"->{p.clock();var before=p.position();p.playerMovementTick(VanillaSceneCollisionOracle.vector(op.get("value")),op.get("jumping").getAsBoolean());p.attributeTick();p.poseTick();p.checkMovementStatistics(p.getX()-before.x,p.getY()-before.y,p.getZ()-before.z);p.getFoodData().tick(p);} + case "movement_statistics"->{var delta=VanillaSceneCollisionOracle.vector(op.get("value"));p.checkMovementStatistics(delta.x,delta.y,delta.z);} + case "statistics_context"->{ + p.statisticsFlags=op.get("flags").getAsInt();p.getAbilities().invulnerable=op.get("invulnerable").getAsBoolean(); + try{var delta=VanillaSceneCollisionOracle.vector(op.get("value"));p.checkMovementStatistics(delta.x,delta.y,delta.z);} + finally{p.statisticsFlags=null;p.getAbilities().invulnerable=false;} + } + case "seed"->level.rng.setSeed(op.get("value").getAsLong()); + case "impulse"->p.setIgnoreFallDamageFromCurrentImpulse(op.get("ignore").getAsBoolean(),op.get("value").isJsonNull()?null:VanillaSceneCollisionOracle.vector(op.get("value"))); + case "block"->{var v=op.getAsJsonArray("position");var pos=new BlockPos(v.get(0).getAsInt(),v.get(1).getAsInt(),v.get(2).getAsInt());var state=VanillaSceneCollisionOracle.state(op.get("name").getAsString());if(op.has("properties"))for(var property:op.getAsJsonObject("properties").entrySet())state=VanillaSceneCollisionOracle.property(state,state.getBlock().getStateDefinition().getProperty(property.getKey()),property.getValue().getAsString());level.chunks.get(key(pos.getX()>>4,pos.getZ()>>4)).write(pos,Block.getId(state));} + case "landing"->{var v=op.getAsJsonArray("position");p.land(number(op.get("value")),op.get("ground").getAsBoolean(),new BlockPos(v.get(0).getAsInt(),v.get(1).getAsInt(),v.get(2).getAsInt()));} + case "travel"->p.travel(VanillaSceneCollisionOracle.vector(op.get("value"))); + case "tick"->p.movementTick(VanillaSceneCollisionOracle.vector(op.get("value"))); + case "player_tick"->p.playerMovementTick(VanillaSceneCollisionOracle.vector(op.get("value")),op.get("jumping").getAsBoolean()); + case "trigger"->trigger.setInt(p,op.get("value").getAsInt()); + case "delay"->delay.setInt(p,op.get("value").getAsInt()); + case "ack_attributes"->{p.attrs.getAttributesToUpdate().clear();p.attrs.getAttributesToSync().clear();} + case "modifier"->{ + var holder=BuiltInRegistries.ATTRIBUTE.get(Identifier.parse(op.get("name").getAsString())).orElseThrow(); + var modifier=new AttributeModifier(Identifier.parse(op.get("id").getAsString()),number(op.get("value")),AttributeModifier.Operation.values()[op.get("operation").getAsInt()]); + if(op.get("permanent").getAsBoolean())p.getAttribute(holder).addPermanentModifier(modifier);else p.getAttribute(holder).addTransientModifier(modifier); + } + case "move"->p.move(MoverType.SELF,VanillaSceneCollisionOracle.vector(op.get("value"))); + case "jump"->p.jumpFromGround(); + case "sprint"->p.setSprinting(op.get("value").getAsBoolean()); + case "speed"->p.setSpeed(single(op.get("value"))); + case "yaw"->p.setYRot(single(op.get("value"))); + case "velocity"->p.setDeltaMovement(VanillaSceneCollisionOracle.vector(op.get("value"))); + case "stuck"->write(stuck,p,VanillaSceneCollisionOracle.vector(op.get("value"))); + case "fall"->p.fallDistance=number(op.get("value")); + case "jumping"->p.setJumping(op.get("value").getAsBoolean()); + case "attribute"->{var attr=BuiltInRegistries.ATTRIBUTE.wrapAsHolder(BuiltInRegistries.ATTRIBUTE.getValue(Identifier.parse(op.get("name").getAsString())));p.getAttribute(attr).setBaseValue(number(op.get("value")));} + default->throw new AssertionError(op); + } + snapshot(out,p); + } + out.println("end"); + var hashes=new JsonObject();for(var attr:BuiltInRegistries.ATTRIBUTE){var key=BuiltInRegistries.ATTRIBUTE.wrapAsHolder(attr);hashes.addProperty(key.getRegisteredName(),key.hashCode());}row.add("holder_hashes",hashes); + var instances=new JsonArray();for(var instance:((TrackedAttributes)p.attrs).instances)instances.add(System.identityHashCode(instance));row.add("instance_hashes",instances); + enriched.println(row); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaServerPlayerCombatOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaServerPlayerCombatOracle.java new file mode 100644 index 000000000..26ac59fb6 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaServerPlayerCombatOracle.java @@ -0,0 +1,113 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.lang.invoke.*;import java.nio.file.*;import java.util.*; +import net.minecraft.network.syncher.*;import net.minecraft.world.entity.ai.attributes.*;import net.minecraft.world.food.FoodData;import net.minecraft.world.level.gamerules.*;import net.minecraft.world.flag.FeatureFlagSet;import net.minecraft.server.network.ServerGamePacketListenerImpl;import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.core.registries.*;import net.minecraft.resources.*;import net.minecraft.tags.*;import net.minecraft.world.InteractionHand;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.*;import net.minecraft.world.damagesource.*;import net.minecraft.world.effect.*;import net.minecraft.world.item.*;import net.minecraft.world.item.component.*;import net.minecraft.server.level.*;import net.minecraft.server.PlayerAdvancements;import net.minecraft.sounds.*;import net.minecraft.stats.Stats; +/** Native ServerPlayer hurt through actual reduction, attributes, health/absorption and hunger. */ +public final class VanillaServerPlayerCombatOracle { + static final class Stop extends RuntimeException {} + static EntityDataAccessor<Float> healthKey,absorptionKey;static Field amplifier;static Object unsafe;static Method allocate;static ItemStack plain,shield;static Field stamp,lastSource,noAction,cooldown,lastHurt,duration,time; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static String values(List<SynchedEntityData.DataValue<?>> v){return VanillaPlayerHealthOracle.values(v);} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static String state(LivingEntity a){try{return noAction.getInt(a)+" "+cooldown.getInt(a)+" "+bits(lastHurt.getFloat(a))+" "+duration.getInt(a)+" "+time.getInt(a)+" "+(lastSource.get(a)!=null)+" "+stamp.getLong(a);}catch(Exception e){throw new AssertionError(e);}} + static final class Data {JsonObject op;PrintWriter out;AttributeMap attributes;SynchedEntityData data;Tracker tracker;Rules rules;int calls,difficultyCalls;boolean hit;Abilities abilities;PlainPlayer attacker;Arrow arrow;Actor other;float recorded;Server level;PlayerAdvancements advancements;List<MobEffectInstance> effects; + boolean flag(String n){return op.get(n).getAsBoolean();}void event(String s){out.println(s);if(calls++==op.get("fail").getAsInt())throw new Stop();}} + static final class Source extends DamageSource {Data d;Source(){super(null);} + @Override public boolean is(TagKey<DamageType> tag){String n=tag==DamageTypeTags.BYPASSES_ARMOR?"bypass_armor":tag==DamageTypeTags.BYPASSES_EFFECTS?"bypass_effects":tag==DamageTypeTags.BYPASSES_RESISTANCE?"bypass_resistance":tag==DamageTypeTags.BYPASSES_ENCHANTMENTS?"bypass_enchantments":tag==DamageTypeTags.IS_DROWNING?"drowning":tag==DamageTypeTags.IS_FALL?"fall":tag==DamageTypeTags.IS_FIRE?"fire":tag==DamageTypeTags.IS_FREEZING?"freezing":tag==DamageTypeTags.DAMAGES_HELMET?"damages_helmet":tag==DamageTypeTags.BYPASSES_COOLDOWN?"bypasses_cooldown":tag==DamageTypeTags.NO_IMPACT?"no_impact":tag==DamageTypeTags.NO_KNOCKBACK?"no_knockback":tag==DamageTypeTags.BYPASSES_INVULNERABILITY?"bypasses_invulnerability":null;if(n==null)throw new AssertionError();d.event("tag "+n);return d.flag(n);} + @Override public boolean is(ResourceKey<DamageType> k){if(k==DamageTypes.ENDER_PEARL){d.event("pearl");return d.flag("pearl");}if(k!=DamageTypes.THORNS)throw new AssertionError();d.event("thorns");return false;} + @Override public Entity getEntity(){d.event("attacker");return switch(d.op.get("attacker").getAsInt()){case 0->null;case 1->d.other;case 2->d.attacker;case 3->d.arrow;default->throw new AssertionError();};} + @Override public ItemStack getWeaponItem(){d.event("weapon");return d.flag("weapon")?ItemStack.EMPTY:null;}@Override public float getFoodExhaustion(){d.event("food-exhaustion");return single(d.op.get("food_exhaustion"));} + @Override public boolean isCreativePlayer(){d.event("creative");return d.flag("creative");}@Override public boolean scalesWithDifficulty(){d.event("scales");return d.flag("scales");}} + static final class PlainPlayer extends Player {PlainPlayer(){super(null,null);}@Override public net.minecraft.world.level.GameType gameMode(){return net.minecraft.world.level.GameType.SURVIVAL;}} + static final class Arrow extends net.minecraft.world.entity.projectile.arrow.Arrow {Data d;Arrow(){super(null,null);}@Override public Entity getOwner(){d.event("owner");return switch(d.op.get("owner").getAsInt()){case 0->null;case 1->d.attacker;case 2->d.other;default->throw new AssertionError();};}} + static final class Tracker extends CombatTracker {Data d;Tracker(){super(null);}@Override public void recordDamage(DamageSource s,float v){d.event("record "+bits(v));d.recorded=v;d.hit=true;}} + static final class Rules extends GameRules {Data d;Rules(){super(FeatureFlagSet.of());}@SuppressWarnings("unchecked") @Override public <T>T get(GameRule<T> rule){String n=rule==GameRules.DROWNING_DAMAGE?"drowning":rule==GameRules.FALL_DAMAGE?"fall":rule==GameRules.FIRE_DAMAGE?"fire":rule==GameRules.FREEZE_DAMAGE?"freeze":null;if(n==null)throw new AssertionError();d.event("rule "+n);return (T)Boolean.valueOf(d.flag("rule_"+n));}} + static final class Connection extends ServerGamePacketListenerImpl {Data d;Connection(){super(null,null,null,null);}@Override public boolean hasClientLoaded(){d.event("loaded");return d.flag("loaded");}} + static final class Server extends ServerLevel {Data d;Server(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public GameRules getGameRules(){d.event("rules");return d.rules;}@Override public void broadcastDamageEvent(Entity a,DamageSource s){d.event("broadcast");}@Override public boolean isClientSide(){d.event("client");return d.flag("client");}@Override public net.minecraft.world.Difficulty getDifficulty(){d.event("difficulty");return net.minecraft.world.Difficulty.values()[d.op.getAsJsonArray("difficulties").get(d.difficultyCalls++).getAsInt()];}@Override public long getGameTime(){d.event("game-time");return d.op.get("game_time").getAsLong();}} + static final class Effect extends MobEffectInstance {Data d;int id;Effect(){super(MobEffects.RESISTANCE);}@Override public void onMobHurt(ServerLevel l,LivingEntity a,DamageSource s,float v){d.event("effect "+id+" "+bits(v));}} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Actor(){super(null,null);} + + Data d; + @Override public boolean isPermanentlyInvulnerable(){d.event("permanent");return d.flag("permanent");} + @Override public boolean isTemporarilyInvulnerable(){d.event("temporary");return d.flag("temporary");} + @Override public boolean fireImmune(){d.event("fire-immune");return d.flag("fire_immune");} + @Override public boolean hasEffect(Holder<MobEffect> e){if(e==MobEffects.FIRE_RESISTANCE){d.event("fire-resistance");return d.flag("fire_resistance");}if(e!=MobEffects.RESISTANCE)throw new AssertionError();d.event("has-resistance");return d.flag("resistance");} + @Override public MobEffectInstance getEffect(Holder<MobEffect> e){if(e!=MobEffects.RESISTANCE)throw new AssertionError();d.event("effect");var v=new MobEffectInstance(e,100,0);try{amplifier.setInt(v,d.op.get("amplifier").getAsInt());}catch(Exception ex){throw new AssertionError(ex);}return v;} + @Override public double getAttributeValue(Holder<Attribute> a){return d.attributes.getValue(a);} + @Override protected void hurtArmor(DamageSource s,float v){d.event("hurt-armor "+bits(v));if(d.flag("break_armor"))d.attributes.getInstance(Attributes.ARMOR).setBaseValue(number(d.op.get("armor_after")));} + @Override public CombatTracker getCombatTracker(){d.event("tracker");return d.tracker;} + @Override public void gameEvent(Holder<net.minecraft.world.level.gameevent.GameEvent> e){if(e!=net.minecraft.world.level.gameevent.GameEvent.ENTITY_DAMAGE)throw new AssertionError();d.event("damage-event");} + @Override public void onSyncedDataUpdated(EntityDataAccessor<?> a){var k=a.id()==healthKey.id()?healthKey:absorptionKey;d.event("updated "+k.id()+" "+bits(d.data.get(k))+" "+d.data.isDirty());if(d.flag("pack_callback"))d.out.println("callback-pack "+values(d.data.packDirty()));} + @Override public boolean isSleeping(){d.event("sleeping");return d.flag("sleeping");} + @Override public void stopSleeping(){d.event("wake");} + @Override public ItemStack getUseItem(){d.event("use-item");return d.flag("component")?shield:ItemStack.EMPTY;} + @Override public float applyItemBlocking(ServerLevel l,DamageSource s,float v){d.event("blocking "+bits(v));return single(d.op.get("blocked"));} + @Override public boolean is(TagKey<EntityType<?>> tag){if(tag==EntityTypeTags.FALL_DAMAGE_IMMUNE){d.event("fall-immune");return d.flag("fall_immune");}if(tag!=EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES)throw new AssertionError();d.event("freeze-extra");return d.flag("freeze_extra");} + @Override public ItemStack getItemBySlot(EquipmentSlot slot){d.event("slot "+slot.ordinal());return slot==EquipmentSlot.HEAD&&d.flag("helmet")?plain:ItemStack.EMPTY;} + @Override protected void hurtHelmet(DamageSource s,float v){d.event("hurt-helmet "+bits(v));} + @Override protected void resolveMobResponsibleForDamage(DamageSource s){d.event("resolve-mob");} + @Override protected Player resolvePlayerResponsibleForDamage(DamageSource s){d.event("resolve-player");return null;} + @Override protected void markHurt(){d.event("mark");} + @Override public void dealDefaultKnockback(DamageSource s,float v,boolean b){d.event("knockback "+bits(v)+" "+b);} + @Override public ItemStack getItemInHand(InteractionHand h){d.event("hand "+h.ordinal());return ItemStack.EMPTY;} + @Override protected SoundEvent getDeathSound(){d.event("death-sound");return null;} + @Override public void makeSound(SoundEvent e){d.event("make-sound");} + @Override public void die(DamageSource s){d.event("die");dead=true;} + @Override protected void playHurtSound(DamageSource s){d.event("hurt-sound");} + @Override public ServerLevel level(){d.event("level");return d.level;} + @Override public Collection<MobEffectInstance> getActiveEffects(){d.event("effects");return d.effects;} + } + static final class Human extends ServerPlayer {Human(){super(null,null,null,null);} + + Data d; + @Override public boolean isPermanentlyInvulnerable(){d.event("permanent");return d.flag("permanent");} + @Override public boolean isTemporarilyInvulnerable(){d.event("temporary");return d.flag("temporary");} + @Override public boolean fireImmune(){d.event("fire-immune");return d.flag("fire_immune");} + @Override public boolean hasEffect(Holder<MobEffect> e){if(e==MobEffects.FIRE_RESISTANCE){d.event("fire-resistance");return d.flag("fire_resistance");}if(e!=MobEffects.RESISTANCE)throw new AssertionError();d.event("has-resistance");return d.flag("resistance");} + @Override public MobEffectInstance getEffect(Holder<MobEffect> e){if(e!=MobEffects.RESISTANCE)throw new AssertionError();d.event("effect");var v=new MobEffectInstance(e,100,0);try{amplifier.setInt(v,d.op.get("amplifier").getAsInt());}catch(Exception ex){throw new AssertionError(ex);}return v;} + @Override public double getAttributeValue(Holder<Attribute> a){return d.attributes.getValue(a);} + @Override protected void hurtArmor(DamageSource s,float v){d.event("hurt-armor "+bits(v));if(d.flag("break_armor"))d.attributes.getInstance(Attributes.ARMOR).setBaseValue(number(d.op.get("armor_after")));} + @Override public CombatTracker getCombatTracker(){d.event("tracker");return d.tracker;} + @Override public void gameEvent(Holder<net.minecraft.world.level.gameevent.GameEvent> e){if(e!=net.minecraft.world.level.gameevent.GameEvent.ENTITY_DAMAGE)throw new AssertionError();d.event("damage-event");} + @Override public void onSyncedDataUpdated(EntityDataAccessor<?> a){var k=a.id()==healthKey.id()?healthKey:absorptionKey;d.event("updated "+k.id()+" "+bits(d.data.get(k))+" "+d.data.isDirty());if(d.flag("pack_callback"))d.out.println("callback-pack "+values(d.data.packDirty()));} + @Override public boolean isSleeping(){d.event("sleeping");return d.flag("sleeping");} + @Override public void stopSleeping(){d.event("wake");} + @Override public ItemStack getUseItem(){d.event("use-item");return d.flag("component")?shield:ItemStack.EMPTY;} + @Override public float applyItemBlocking(ServerLevel l,DamageSource s,float v){d.event("blocking "+bits(v));return single(d.op.get("blocked"));} + @Override public boolean is(TagKey<EntityType<?>> tag){if(tag==EntityTypeTags.FALL_DAMAGE_IMMUNE){d.event("fall-immune");return d.flag("fall_immune");}if(tag!=EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES)throw new AssertionError();d.event("freeze-extra");return d.flag("freeze_extra");} + @Override public ItemStack getItemBySlot(EquipmentSlot slot){d.event("slot "+slot.ordinal());return slot==EquipmentSlot.HEAD&&d.flag("helmet")?plain:ItemStack.EMPTY;} + @Override protected void hurtHelmet(DamageSource s,float v){d.event("hurt-helmet "+bits(v));} + @Override protected void resolveMobResponsibleForDamage(DamageSource s){d.event("resolve-mob");} + @Override protected Player resolvePlayerResponsibleForDamage(DamageSource s){d.event("resolve-player");return null;} + @Override protected void markHurt(){d.event("mark");} + @Override public void dealDefaultKnockback(DamageSource s,float v,boolean b){d.event("knockback "+bits(v)+" "+b);} + @Override public ItemStack getItemInHand(InteractionHand h){d.event("hand "+h.ordinal());return ItemStack.EMPTY;} + @Override protected SoundEvent getDeathSound(){d.event("death-sound");return null;} + @Override public void makeSound(SoundEvent e){d.event("make-sound");} + @Override public void die(DamageSource s){d.event("die");dead=true;} + @Override protected void playHurtSound(DamageSource s){d.event("hurt-sound");} + @Override public ServerLevel level(){d.event("level");return d.level;} + @Override public Collection<MobEffectInstance> getActiveEffects(){d.event("effects");return d.effects;} + + @Override public boolean isChangingDimension(){d.event("changing");return d.flag("changing");}@Override protected void removeEntitiesOnShoulder(){d.event("shoulders");}@Override public boolean canHarmPlayer(Player p){d.event("can-harm");return d.flag("can_harm");}@Override public PlayerAdvancements getAdvancements(){d.event("criterion");return d.advancements;} + @Override public void awardStat(Identifier s,int v){if(s==Stats.DAMAGE_BLOCKED_BY_SHIELD){d.event("blocked-stat "+v);return;}String n=s==Stats.DAMAGE_RESISTED?"resisted":s==Stats.DAMAGE_ABSORBED?"absorbed":s==Stats.DAMAGE_TAKEN?"taken":null;if(n==null)throw new AssertionError();d.event("stat "+n+" "+v);} + } + @SuppressWarnings("unchecked") public static void main(String[] args)throws Throwable { + Path dir=Path.of(args[1]);if(args[0].equals("export"))VanillaPlayerHealthOracle.main(args);else{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();} + healthKey=(EntityDataAccessor<Float>)field(LivingEntity.class,"DATA_HEALTH_ID").get(null);absorptionKey=(EntityDataAccessor<Float>)field(Player.class,"DATA_PLAYER_ABSORPTION_ID").get(null);if(args[0].equals("export")){var slots=new JsonArray();for(var s:EquipmentSlot.VALUES)slots.add(s.ordinal());Files.writeString(dir.resolve("slots.json"),slots.toString());Files.writeString(dir.resolve("head.json"),Integer.toString(EquipmentSlot.HEAD.ordinal()));return;} + var dataCtor=SynchedEntityData.class.getDeclaredConstructor(SyncedDataHolder.class,SynchedEntityData.DataItem[].class);dataCtor.setAccessible(true);amplifier=field(MobEffectInstance.class,"amplifier");var exhaustion=field(FoodData.class,"exhaustionLevel");var keys=List.of(Attributes.ARMOR,Attributes.ARMOR_TOUGHNESS,Attributes.MAX_HEALTH,Attributes.MAX_ABSORPTION);var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class); + noAction=field(LivingEntity.class,"noActionTime");cooldown=field(LivingEntity.class,"damageCooldownTime");lastHurt=field(LivingEntity.class,"lastHurt");duration=field(LivingEntity.class,"hurtDuration");time=field(LivingEntity.class,"hurtTime");stamp=field(LivingEntity.class,"lastDamageStamp");lastSource=field(LivingEntity.class,"lastDamageSource"); + var ctor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);ctor.setAccessible(true);plain=(ItemStack)ctor.newInstance(BuiltInRegistries.ITEM.wrapAsHolder(Items.STICK),1,new PatchedDataComponentMap(DataComponentMap.EMPTY));shield=(ItemStack)ctor.newInstance(BuiltInRegistries.ITEM.wrapAsHolder(Items.SHIELD),1,new PatchedDataComponentMap(DataComponentMap.EMPTY));shield.set(DataComponents.BLOCKS_ATTACKS,new BlocksAttacks(0,1,List.of(),new BlocksAttacks.ItemDamageFunction(0,0,0),Optional.empty(),Optional.empty(),Optional.empty())); + var lookup=MethodHandles.privateLookupIn(Player.class,MethodHandles.lookup());var playerHurt=lookup.findSpecial(Player.class,"hurtServer",MethodType.methodType(boolean.class,ServerLevel.class,DamageSource.class,float.class),Player.class).asType(MethodType.methodType(boolean.class,LivingEntity.class,ServerLevel.class,DamageSource.class,float.class)); + var serverLookup=MethodHandles.privateLookupIn(ServerPlayer.class,MethodHandles.lookup());var serverHurt=serverLookup.findSpecial(ServerPlayer.class,"hurtServer",MethodType.methodType(boolean.class,ServerLevel.class,DamageSource.class,float.class),ServerPlayer.class).asType(MethodType.methodType(boolean.class,LivingEntity.class,ServerLevel.class,DamageSource.class,float.class)); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.out=out;d.level=make(Server.class);d.level.d=d;d.advancements=make(PlayerAdvancements.class);field(PlayerAdvancements.class,"activeTriggers").set(d.advancements,new HashMap<>());d.rules=make(Rules.class);d.rules.d=d;var human=make(Human.class);human.d=d;var connection=make(Connection.class);connection.d=d;human.connection=connection;LivingEntity actor=human;d.abilities=new Abilities();field(Player.class,"abilities").set(actor,d.abilities);d.attacker=make(PlainPlayer.class);d.other=make(Actor.class);d.other.d=d;d.arrow=make(Arrow.class);d.arrow.d=d;var hurt=serverHurt;var source=make(Source.class);source.d=d; + d.attributes=new AttributeMap(VanillaEntityAttributeOracle.supplier(BuiltInRegistries.ENTITY_TYPE.getValue(Identifier.parse("minecraft:player"))));for(int i=0;i<keys.size();i++){var a=f.getAsJsonArray("attributes").get(i).getAsJsonObject();var instance=d.attributes.getInstance(keys.get(i));instance.setBaseValue(number(a.get("base")));instance.addTransientModifier(new AttributeModifier(Identifier.parse("horizon:test"),number(a.get("amount")),AttributeModifier.Operation.values()[a.get("operation").getAsInt()]));} + var items=new SynchedEntityData.DataItem<?>[Math.max(healthKey.id(),absorptionKey.id())+1];for(int i=0;i<items.length;i++)items[i]=new SynchedEntityData.DataItem<Float>(new EntityDataAccessor<Float>(i,EntityDataSerializers.FLOAT),0f);var health=new SynchedEntityData.DataItem<Float>(healthKey,single(f.get("health")));var absorption=new SynchedEntityData.DataItem<Float>(absorptionKey,single(f.get("absorption")));items[healthKey.id()]=health;items[absorptionKey.id()]=absorption;d.data=dataCtor.newInstance(actor,items);field(Entity.class,"entityData").set(actor,d.data);field(LivingEntity.class,"dead").setBoolean(actor,f.get("dead").getAsBoolean());var food=new FoodData();exhaustion.setFloat(food,single(f.get("exhaustion")));field(Player.class,"foodData").set(actor,food);d.tracker=make(Tracker.class);d.tracker.d=d; + noAction.setInt(actor,f.get("no_action").getAsInt());cooldown.setInt(actor,f.get("cooldown").getAsInt());lastHurt.setFloat(actor,single(f.get("last_hurt")));duration.setInt(actor,f.get("duration").getAsInt());time.setInt(actor,f.get("time").getAsInt());stamp.setLong(actor,f.get("stamp").getAsLong());if(f.get("source").getAsBoolean())lastSource.set(actor,source); + for(var ov:f.getAsJsonArray("ops")){d.op=ov.getAsJsonObject();field(Entity.class,"removalReason").set(actor,d.flag("removed")?Entity.RemovalReason.DISCARDED:null);if(d.op.has("reset_cooldown")&&d.flag("reset_cooldown"))cooldown.setInt(actor,0);d.calls=0;d.difficultyCalls=0;d.hit=false;d.abilities.invulnerable=d.flag("ability_invulnerable");d.effects=new ArrayList<>();for(int i=0;i<d.op.get("effects").getAsInt();i++){var e=make(Effect.class);e.d=d;e.id=i;d.effects.add(e);}try{boolean result=(boolean)hurt.invokeExact(actor,(ServerLevel)d.level,(DamageSource)source,single(d.op.get("damage")));out.println("bool "+result);out.println("result ok");}catch(Stop e){out.println("result error");}out.println("state "+state(actor)+" "+bits(d.recorded)+" "+d.hit+" "+d.calls); + out.println("storage "+bits(health.getValue())+" "+bits(absorption.getValue())+" "+bits(exhaustion.getFloat(food))+" "+d.data.isDirty()+" "+health.isDirty()+" "+absorption.isDirty()+" "+field(LivingEntity.class,"dead").getBoolean(actor));if(d.flag("pack"))out.println("packed "+values(d.data.packDirty()));out.println("defaults "+values(d.data.getNonDefaultValues()));} + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaServerPlayerDamageOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaServerPlayerDamageOracle.java new file mode 100644 index 000000000..69605efd6 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaServerPlayerDamageOracle.java @@ -0,0 +1,51 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.registries.*;import net.minecraft.resources.Identifier;import net.minecraft.tags.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.*;import net.minecraft.world.entity.ai.attributes.*;import net.minecraft.network.syncher.*;import net.minecraft.world.damagesource.*;import net.minecraft.world.effect.*;import net.minecraft.world.item.ItemStack;import net.minecraft.world.food.FoodData;import net.minecraft.server.level.*;import net.minecraft.stats.Stats;import net.minecraft.world.level.gameevent.GameEvent; +/** Native player inner damage with actual attributes, synchronized floats and food storage. */ +public final class VanillaServerPlayerDamageOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate;static EntityDataAccessor<Float> healthKey,absorptionKey;static Field amplifier; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static String values(List<SynchedEntityData.DataValue<?>> values){if(values==null)return "none";var s=new StringJoiner(",");for(var v:values)s.add(v.id()+":"+bits((Float)v.value()));return s.length()==0?"empty":s.toString();} + static final class Data {JsonObject op;PrintWriter out;int calls;float recorded;AttributeMap attributes;SynchedEntityData data;Server level;Tracker tracker; + void event(String s){out.println(s);if(calls++==op.get("fail").getAsInt())throw new Stop();}} + static final class Source extends DamageSource {Data d;Source(){super(null);} + @Override public boolean is(TagKey<DamageType> tag){String n=tag==DamageTypeTags.BYPASSES_ARMOR?"armor":tag==DamageTypeTags.BYPASSES_EFFECTS?"effects":tag==DamageTypeTags.BYPASSES_RESISTANCE?"resistance":tag==DamageTypeTags.BYPASSES_ENCHANTMENTS?"enchantments":null;if(n==null)throw new AssertionError();d.event("bypass "+n);return d.op.get("bypass_"+n).getAsBoolean();} + @Override public ItemStack getWeaponItem(){d.event("weapon");return d.op.get("weapon").getAsBoolean()?ItemStack.EMPTY:null;} + @Override public float getFoodExhaustion(){d.event("food-exhaustion");return single(d.op.get("food_exhaustion"));}} + static final class Server extends ServerLevel {Data d;Server(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public boolean isClientSide(){d.event("client");return d.op.get("client").getAsBoolean();}} + static final class Tracker extends CombatTracker {Data d;Tracker(){super(null);}@Override public void recordDamage(DamageSource s,float v){d.event("record "+bits(v));d.recorded=v;}} + static final class Actor extends ServerPlayer {Data d;Actor(){super(null,null,null,null);} + @Override public boolean isInvulnerableTo(ServerLevel l,DamageSource s){d.event("invulnerable");return d.op.get("invulnerable").getAsBoolean();} + @Override public double getAttributeValue(Holder<Attribute> a){return d.attributes.getValue(a);} + @Override protected void hurtArmor(DamageSource s,float v){d.event("hurt-armor "+bits(v));if(d.op.get("break_armor").getAsBoolean())d.attributes.getInstance(Attributes.ARMOR).setBaseValue(number(d.op.get("armor_after")));} + @Override public boolean hasEffect(Holder<MobEffect> e){if(e!=MobEffects.RESISTANCE)throw new AssertionError();d.event("has-resistance");return d.op.get("resistance").getAsBoolean();} + @Override public MobEffectInstance getEffect(Holder<MobEffect> e){if(e!=MobEffects.RESISTANCE)throw new AssertionError();d.event("effect");var v=new MobEffectInstance(e,100,0);try{amplifier.setInt(v,d.op.get("amplifier").getAsInt());}catch(Exception ex){throw new AssertionError(ex);}return v;} + @Override public ServerLevel level(){d.event("level");return d.level;} + @Override public ItemStack getItemBySlot(EquipmentSlot s){d.event("slot "+s.ordinal());return ItemStack.EMPTY;} + @Override public CombatTracker getCombatTracker(){d.event("tracker");return d.tracker;} + @Override public void gameEvent(Holder<GameEvent> e){if(e!=GameEvent.ENTITY_DAMAGE)throw new AssertionError();d.event("damage-event");} + @Override public void awardStat(Identifier s,int v){String n=s==Stats.DAMAGE_RESISTED?"resisted":s==Stats.DAMAGE_ABSORBED?"absorbed":s==Stats.DAMAGE_TAKEN?"taken":null;if(n==null)throw new AssertionError();d.event("stat "+n+" "+v);} + @Override public void onSyncedDataUpdated(EntityDataAccessor<?> a){var k=a.id()==healthKey.id()?healthKey:absorptionKey;d.event("updated "+k.id()+" "+bits(d.data.get(k))+" "+d.data.isDirty());if(d.op.get("pack_callback").getAsBoolean())d.out.println("callback-pack "+values(d.data.packDirty()));} + void run(DamageSource s,float v){super.actuallyHurt(d.level,s,v);} + } + @SuppressWarnings("unchecked") public static void main(String[] args)throws Exception{ + Path dir=Path.of(args[1]);if(args[0].equals("export"))VanillaPlayerHealthOracle.main(args);else{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();} + healthKey=(EntityDataAccessor<Float>)field(LivingEntity.class,"DATA_HEALTH_ID").get(null);absorptionKey=(EntityDataAccessor<Float>)field(Player.class,"DATA_PLAYER_ABSORPTION_ID").get(null); + if(args[0].equals("export")){var slots=new JsonArray();for(var s:EquipmentSlot.VALUES)slots.add(s.ordinal());Files.writeString(dir.resolve("slots.json"),slots.toString());return;} + var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);amplifier=field(MobEffectInstance.class,"amplifier");var ctor=SynchedEntityData.class.getDeclaredConstructor(SyncedDataHolder.class,SynchedEntityData.DataItem[].class);ctor.setAccessible(true);var storage=field(Entity.class,"entityData");var foodField=field(Player.class,"foodData");var abilityField=field(Player.class,"abilities");var exhaustion=field(FoodData.class,"exhaustionLevel");var keys=List.of(Attributes.ARMOR,Attributes.ARMOR_TOUGHNESS,Attributes.MAX_HEALTH,Attributes.MAX_ABSORPTION); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.out=out;d.attributes=new AttributeMap(VanillaEntityAttributeOracle.supplier(BuiltInRegistries.ENTITY_TYPE.getValue(Identifier.parse("minecraft:player")))); + for(int i=0;i<keys.size();i++){var a=f.getAsJsonArray("attributes").get(i).getAsJsonObject();var instance=d.attributes.getInstance(keys.get(i));instance.setBaseValue(number(a.get("base")));instance.addTransientModifier(new AttributeModifier(Identifier.parse("horizon:test"),number(a.get("amount")),AttributeModifier.Operation.values()[a.get("operation").getAsInt()]));} + var actor=make(Actor.class);actor.d=d;d.level=make(Server.class);d.level.d=d;d.tracker=make(Tracker.class);d.tracker.d=d;var source=make(Source.class);source.d=d;var food=new FoodData();exhaustion.setFloat(food,single(f.get("exhaustion")));foodField.set(actor,food);var abilities=new Abilities();abilityField.set(actor,abilities); + var items=new SynchedEntityData.DataItem<?>[Math.max(healthKey.id(),absorptionKey.id())+1];for(int i=0;i<items.length;i++)items[i]=new SynchedEntityData.DataItem<Float>(new EntityDataAccessor<Float>(i,EntityDataSerializers.FLOAT),0f);var health=new SynchedEntityData.DataItem<Float>(healthKey,single(f.get("health")));var absorption=new SynchedEntityData.DataItem<Float>(absorptionKey,single(f.get("absorption")));items[healthKey.id()]=health;items[absorptionKey.id()]=absorption;d.data=ctor.newInstance(actor,items);storage.set(actor,d.data); + for(var ov:f.getAsJsonArray("ops")){d.op=ov.getAsJsonObject();d.calls=0;abilities.invulnerable=d.op.get("ability_invulnerable").getAsBoolean();try{actor.run(source,single(d.op.get("damage")));out.println("result ok");}catch(Stop e){out.println("result error");} + out.println("state "+bits(health.getValue())+" "+bits(absorption.getValue())+" "+bits(exhaustion.getFloat(food))+" "+bits(d.recorded)+" "+d.data.isDirty()+" "+health.isDirty()+" "+absorption.isDirty()+" "+d.calls); + if(d.op.get("pack").getAsBoolean())out.println("packed "+values(d.data.packDirty()));out.println("defaults "+values(d.data.getNonDefaultValues())); + } + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java new file mode 100644 index 000000000..5d82bbc8f --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleBlockOracle.java @@ -0,0 +1,178 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.resources.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.entity.*; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.feature.SimpleBlockFeature; +import net.minecraft.world.level.levelgen.feature.Feature; +import net.minecraft.world.level.levelgen.placement.*; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider; + +/** Actual native simple-block map codec and mutable world placement. */ +public final class VanillaSimpleBlockOracle { + private static final class Stop extends RuntimeException {} + private static final List<ThreadLocal<?>> fixtureCaches=new ArrayList<>(); + private static Biome trackBiome(Biome biome)throws ReflectiveOperationException{ + var field=Biome.class.getDeclaredField("temperatureCache");field.setAccessible(true);fixtureCaches.add((ThreadLocal<?>)field.get(biome));return biome; + } + private static Optional<Feature> decode(RegistryOps<JsonElement> ops,JsonObject f) { + var json=JsonParser.parseString(f.get("definition").getAsString()); + String mode=f.has("mode")?f.get("mode").getAsString():"map"; + if(mode.equals("weather")){ + final Biome biome=makeBiome(f); + return Optional.of(new Feature(){ + public com.mojang.serialization.MapCodec<? extends Feature> codec(){return com.mojang.serialization.MapCodec.unit(this);} + public boolean place(WorldGenLevel world,ChunkGenerator generator,RandomSource random,BlockPos p){return f.get("operation").getAsString().equals("snow")?biome.shouldSnow(world,p):biome.shouldFreeze(world,p,f.get("edge").getAsBoolean());} + }); + } + if(mode.equals("map"))return SimpleBlockFeature.CODEC.codec().parse(ops,json).result().map(value->value); + if(mode.equals("feature"))return Feature.CODEC.parse(ops,json).result().map(Holder::value); + return PlacedFeature.CODEC.parse(ops,json).result().map(holder->new Feature(){ + public com.mojang.serialization.MapCodec<? extends Feature> codec(){return com.mojang.serialization.MapCodec.unit(this);} + public boolean place(WorldGenLevel world,ChunkGenerator generator,RandomSource random,BlockPos p){return holder.value().place(world,generator,random,p);} + }); + } + private static Biome makeBiome(JsonObject f){ + try{ + var type=Class.forName("net.minecraft.world.level.biome.Biome$ClimateSettings"); + var climate=type.getDeclaredConstructor(boolean.class,float.class,Biome.TemperatureModifier.class,float.class);climate.setAccessible(true); + var settings=climate.newInstance(f.get("precipitation").getAsBoolean(),Float.intBitsToFloat(Integer.parseUnsignedInt(f.get("base").getAsString(),16)),Biome.TemperatureModifier.valueOf(f.get("modifier").getAsString()),0f); + var constructor=Biome.class.getDeclaredConstructors()[0];constructor.setAccessible(true);return trackBiome((Biome)constructor.newInstance(settings,null,null,null)); + }catch(ReflectiveOperationException error){throw new IllegalStateException(error);} + } + private static BlockPos pos(JsonArray a){return new BlockPos(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt());} + private static String xyz(BlockPos p){return p.getX()+" "+p.getY()+" "+p.getZ();} + private static final class Chunks { + static final PalettedContainerFactory FACTORY; + static { + Holder<Biome> biome=Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},Biomes.PLAINS); + var ids=new IdMapper<Holder<Biome>>();ids.add(biome); + FACTORY=new PalettedContainerFactory(Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY),Blocks.AIR.defaultBlockState(),null,Strategy.createForBiomes(ids),biome,null); + } + } + private static final class World implements InvocationHandler { + final JsonObject f;final PrintWriter out;final RandomSource random;final Holder<Biome> biome;int calls; + final TreeMap<BlockPos,BlockState> states=new TreeMap<>(Comparator.<BlockPos>comparingInt(BlockPos::getX).thenComparingInt(BlockPos::getY).thenComparingInt(BlockPos::getZ)); + World(JsonObject f,PrintWriter out,RandomSource random){this.f=f;this.out=out;this.random=random;this.biome=f.has("biome")?Holder.direct(makeBiome(f.getAsJsonObject("biome"))):null;for(var raw:f.getAsJsonArray("states")){var v=raw.getAsJsonArray();states.put(pos(v),Block.stateById(v.get(3).getAsInt()));}} + final TreeMap<BlockPos,ChestBlockEntity> lootContainers=new TreeMap<>(Comparator.<BlockPos>comparingInt(BlockPos::getX).thenComparingInt(BlockPos::getY).thenComparingInt(BlockPos::getZ)); + final TreeMap<BlockPos,TheEndGatewayBlockEntity> gateways=new TreeMap<>(Comparator.<BlockPos>comparingInt(BlockPos::getX).thenComparingInt(BlockPos::getY).thenComparingInt(BlockPos::getZ)); + final Map<ChunkPos,ProtoChunk> chunks=new HashMap<>(); + ProtoChunk chunk(BlockPos p) { + event("chunk "+xyz(p));var key=new ChunkPos(p.getX()>>4,p.getZ()>>4); + return chunks.computeIfAbsent(key,cp->new ProtoChunk(cp,UpgradeData.EMPTY,LevelHeightAccessor.create(-64,384),Chunks.FACTORY,null){ + @Override public void markPosForPostProcessing(BlockPos position){event("post "+xyz(position));super.markPosForPostProcessing(position);} + }); + } + void event(String text){out.println(text);if(calls++==f.get("fail").getAsInt())throw new Stop();} + BlockState at(BlockPos p){return states.getOrDefault(p,f.has("air_above")&&p.getY()>f.get("air_above").getAsInt()?Blocks.AIR.defaultBlockState():Block.stateById(f.get("fallback").getAsInt()));} + public Object invoke(Object proxy,Method method,Object[] args)throws Throwable { + String name=method.getName(); + if(name.equals("getBiome")){event("biome "+xyz((BlockPos)args[0]));if(biome==null)throw new IllegalStateException("missing fixture biome");return biome;} + if(name.equals("getRandom"))return random; + if(name.equals("isStateAtPosition")){var p=(BlockPos)args[0];event("get "+xyz(p));var state=at(p);out.println("state "+Block.getId(state));return ((java.util.function.Predicate<BlockState>)args[1]).test(state);} + if(name.equals("getChunk")&&args.length==1&&args[0] instanceof BlockPos)return chunk((BlockPos)args[0]); + if(name.equals("getMinY"))return -64; + if(name.equals("getHeight")&&(args==null||args.length==0))return 384; + if(name.equals("getHeight")&&args.length==3){event("height "+args[0]+" "+args[1]+" "+args[2]);return f.has("height")?f.get("height").getAsInt():64;} + if(name.equals("getSeaLevel"))return f.has("sea")?f.get("sea").getAsInt():63; + if(name.equals("getBlockState")){var p=(BlockPos)args[0];event("get "+xyz(p));var state=at(p);out.println("state "+Block.getId(state));return state;} + if(name.equals("getFluidState")){var p=(BlockPos)args[0];event("fluid "+xyz(p));return (f.has("fluid")?Block.stateById(f.get("fluid").getAsInt()):at(p)).getFluidState();} + if(name.equals("getBrightness")&&args[0]==LightLayer.BLOCK){event("blocklight "+xyz((BlockPos)args[1]));return f.get("brightness").getAsInt();} + if(name.equals("getRawBrightness")){var p=(BlockPos)args[0];event("light "+xyz(p)+" "+args[1]);return f.get("brightness").getAsInt();} + if(name.equals("getBlockEntity")){ + var p=((BlockPos)args[0]).immutable();event("entity "+xyz(p));String mode=f.has("gateway_entity")?f.get("gateway_entity").getAsString():"none"; + if(f.has("loot_entity")){ + String lootMode=f.get("loot_entity").getAsString(); + if(lootMode.equals("chest"))return lootContainers.computeIfAbsent(p,key->new ChestBlockEntity(key,Blocks.CHEST.defaultBlockState())); + if(lootMode.equals("other"))return new TheEndGatewayBlockEntity(p,Blocks.END_GATEWAY.defaultBlockState()); + return null; + } + if(mode.equals("other"))return new ShulkerBoxBlockEntity(p,Blocks.SHULKER_BOX.defaultBlockState()); + if(mode.equals("gateway"))return gateways.computeIfAbsent(p,key->new TheEndGatewayBlockEntity(key,Blocks.END_GATEWAY.defaultBlockState()){@Override public void setChanged(){event("gateway_changed "+xyz(key));}}); + return null; + } + if(name.equals("destroyBlock")){ + if(args.length!=3||args[2]!=null)throw new UnsupportedOperationException("only no-entity destruction is defined in this fixture"); + var p=((BlockPos)args[0]).immutable();event("destroy "+xyz(p)+" "+args[1]);boolean result=!f.has("destroy_success")||f.get("destroy_success").getAsBoolean(); + if(result)states.put(p,Blocks.AIR.defaultBlockState());out.println("destroyed "+result);return result; + } + if(name.equals("setBlock")){ + var p=((BlockPos)args[0]).immutable();var state=(BlockState)args[1];int call=calls;event("set "+xyz(p)+" "+Block.getId(state)+" "+args[2]); + int reject=f.get("reject").getAsInt();boolean result=reject==0||call%reject!=0;if(result)states.put(p,state);out.println("written "+result);return result; + } + if(name.equals("scheduleTick")&&args[1] instanceof net.minecraft.world.level.material.Fluid fluid){event("fluidtick "+xyz((BlockPos)args[0])+" "+BuiltInRegistries.FLUID.getKey(fluid)+" "+args[2]);return null;} + if(name.equals("scheduleTick")){event("tick "+xyz((BlockPos)args[0])+" "+Block.getId(((Block)args[1]).defaultBlockState())+" "+args[2]);return null;} + if(method.isDefault())return InvocationHandler.invokeDefault(proxy,method,args); + throw new AssertionError(method); + } + } + @SuppressWarnings("unchecked") + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + if(args[0].equals("export")) { + VanillaBlockSurvivalOracle.main(args); + var data=new JsonObject();var doubles=new JsonArray();var moss=new JsonArray(); + for(var block:BuiltInRegistries.BLOCK){String name=BuiltInRegistries.BLOCK.getKey(block).toString();if(block instanceof DoublePlantBlock)doubles.add(name);if(block instanceof MossyCarpetBlock)moss.add(name);} + data.add("double_plants",doubles);data.add("mossy_carpets",moss);Files.writeString(dir.resolve("placement-definitions.json"),data.toString());return; + } + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject()); + var bind=VanillaBlockSurvivalOracle.class.getDeclaredMethod("bindFluidTags",JsonObject.class);bind.setAccessible(true);bind.invoke(null,JsonParser.parseString(Files.readString(dir.resolve("fluid-tags.json"))).getAsJsonObject()); + var providers=new MappedRegistry<BlockStateProvider>(Registries.BLOCK_STATE_PROVIDER,com.mojang.serialization.Lifecycle.stable()); + var features=new MappedRegistry<Feature>(Registries.FEATURE,com.mojang.serialization.Lifecycle.stable()); + var placed=new MappedRegistry<PlacedFeature>(Registries.PLACED_FEATURE,com.mojang.serialization.Lifecycle.stable()); + var ops=RegistryOps.create(JsonOps.INSTANCE,new RegistryOps.RegistryInfoLookup(){public <T> Optional<HolderGetter<T>> lookup(ResourceKey<? extends Registry<? extends T>> key){ + if(key.equals(Registries.FEATURE))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(features); + if(key.equals(Registries.PLACED_FEATURE))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(placed); + if(key.equals(Registries.BLOCK_STATE_PROVIDER))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(providers); + if(key.equals(Registries.FLUID))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(BuiltInRegistries.FLUID); + return key.equals(Registries.BLOCK)?(Optional<HolderGetter<T>>)(Optional<?>)Optional.of(BuiltInRegistries.BLOCK):Optional.empty(); + }}); + for(var entry:JsonParser.parseString(Files.readString(dir.resolve("catalog.json"))).getAsJsonObject().entrySet()) { + var provider=BlockStateProvider.DIRECT_CODEC.parse(ops,JsonParser.parseString(entry.getValue().getAsString())).getOrThrow(); + providers.register(ResourceKey.create(Registries.BLOCK_STATE_PROVIDER,Identifier.parse(entry.getKey())),provider,RegistrationInfo.BUILT_IN); + }providers.freeze(); + var bundle=JsonParser.parseString(Files.readString(dir.resolve("feature-catalog.json"))).getAsJsonObject(); + for(var entry:bundle.getAsJsonObject("features").entrySet())features.register(ResourceKey.create(Registries.FEATURE,Identifier.parse(entry.getKey())),Feature.DIRECT_CODEC.parse(ops,JsonParser.parseString(entry.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN); + features.freeze(); + for(var entry:bundle.getAsJsonObject("placed").entrySet())placed.register(ResourceKey.create(Registries.PLACED_FEATURE,Identifier.parse(entry.getKey())),PlacedFeature.DIRECT_CODEC.parse(ops,JsonParser.parseString(entry.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN); + placed.freeze(); + var contextMethod=VanillaPlacementOracle.class.getDeclaredMethod("context",JsonObject.class);contextMethod.setAccessible(true); + var bounds=new JsonObject();bounds.add("context",JsonParser.parseString("[-64,384,63]")); + var generator=((PlacementContext)contextMethod.invoke(null,bounds)).generator(); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var inputs=Files.lines(dir.resolve("inputs.txt"))) { + for(var line:(Iterable<String>)inputs::iterator){var f=JsonParser.parseString(line).getAsJsonObject();long seed=f.get("seed").getAsLong(),worldSeed=f.get("world_seed").getAsLong();boolean legacy=f.get("legacy").getAsBoolean(); + RandomSource random=legacy?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed),worldRandom=legacy?new LegacyRandomSource(worldSeed):new XoroshiroRandomSource(worldSeed); + Optional<Feature> decoded; + try{decoded=decode(ops,f);}catch(IllegalArgumentException|IllegalStateException error){decoded=Optional.empty();} + if(decoded.isEmpty())out.println("decode error");else { + out.println("decode ok");var handler=new World(f,out,worldRandom);var world=(WorldGenLevel)Proxy.newProxyInstance(WorldGenLevel.class.getClassLoader(),new Class<?>[]{WorldGenLevel.class},handler);var origin=pos(f.getAsJsonArray("origin")); + for(int repeat=0;repeat<f.get("repeats").getAsInt();repeat++){ + handler.calls=0;try{out.println("place "+decoded.get().place(world,generator,random,origin));}catch(Stop|IllegalArgumentException error){out.println("place error");} + out.println("next "+random.nextLong()+" "+worldRandom.nextLong());out.println("calls "+handler.calls); + for(var entry:handler.states.entrySet())out.println("stored "+xyz(entry.getKey())+" "+Block.getId(entry.getValue())); + for(var entry:handler.lootContainers.entrySet())if(entry.getValue().getLootTable()!=null)out.println("loot "+xyz(entry.getKey())+" "+entry.getValue().getLootTable().identifier()+" "+entry.getValue().getLootTableSeed()); + for(var entry:handler.gateways.entrySet()) { + var exit=TheEndGatewayBlockEntity.class.getDeclaredField("exitPortal");exit.setAccessible(true);var exact=TheEndGatewayBlockEntity.class.getDeclaredField("exactTeleport");exact.setAccessible(true); + out.println("gateway "+xyz(entry.getKey())+" "+xyz((BlockPos)exit.get(entry.getValue()))+" "+exact.getBoolean(entry.getValue())); + } + out.println("end"); + } + }out.println("tail "+random.nextLong()+" "+worldRandom.nextLong()); + for(var cache:fixtureCaches)cache.remove();fixtureCaches.clear(); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleContainerOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleContainerOracle.java new file mode 100644 index 000000000..e26350caa --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSimpleContainerOracle.java @@ -0,0 +1,28 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import com.mojang.serialization.Codec;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.component.*;import net.minecraft.world.item.*;import net.minecraft.world.SimpleContainer; +/** Actual SimpleContainer methods over aliased ItemStack objects and bound prototypes. */ +public final class VanillaSimpleContainerOracle { + static final class Stop extends RuntimeException {} + static Item[] items;static DataComponentType<Integer>[] keys;static Field components,count,patchMap;static Object removed; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static int integer(JsonObject o,String k){return o.get(k).getAsInt();} + static int key(Object k){for(int i=0;i<keys.length;i++)if(keys[i]==k)return i;throw new AssertionError();} + static int item(Item i){for(int k=0;k<items.length;k++)if(items[k]==i)return k;throw new AssertionError();} + static String opt(Object v){return v==null||v==removed?"none":v.toString();} + static DataComponentMap prototype(JsonArray a){var b=DataComponentMap.builder();for(var e:a){var p=e.getAsJsonArray();b.set(keys[p.get(0).getAsInt()],p.get(1).getAsInt());}return b.build();} + static DataComponentPatch patch(JsonArray a){var b=DataComponentPatch.builder();for(var e:a){var p=e.getAsJsonArray();int k=p.get(0).getAsInt();if(p.get(1).isJsonNull())b.remove(keys[k]);else b.set(keys[k],p.get(1).getAsInt());}return b.build();} + static final class Data { + PrintWriter out;ItemStack[] refs;C c;JsonObject op;int calls;IdentityHashMap<ItemStack,Integer> identities=new IdentityHashMap<>(); + int id(ItemStack s){return identities.computeIfAbsent(s,k->identities.size());} + String snapshot(ItemStack s){try{var raw=(PatchedDataComponentMap)components.get(s);var p=new StringJoiner(",");for(var e:((Map<?,?>)patchMap.get(raw.asPatch())).entrySet())p.add(key(e.getKey())+"="+opt(e.getValue()));var v=new StringJoiner(",");for(var k:keys)v.add(opt(s.get(k)));return id(s)+" "+item(s.getItem())+" "+count.getInt(s)+" "+s.getCount()+" "+s.getPopTime()+" "+s.isEmpty()+" "+s.getMaxStackSize()+" | "+v+" | "+p;}catch(Exception e){throw new AssertionError(e);}} + void all(){for(int i=0;i<refs.length;i++)out.println("ref "+i+" "+snapshot(refs[i]));for(int i=0;i<c.getContainerSize();i++)out.println("slot "+i+" "+snapshot(c.getItems().get(i)));out.println("empty "+snapshot(ItemStack.EMPTY));out.println("container "+c.getContainerSize()+" "+c.isEmpty()+" "+c.countItem(items[0])+" "+c.countItem(items[1])+" "+c.countItem(items[2]));} + void event(String name){calls++;out.println("event "+name+" "+calls);all();if(calls==integer(op,"fail_at"))throw new Stop();if(calls==integer(op,"mutate_at")){refs[integer(op,"mutate_ref")].setCount(integer(op,"after_count"));refs[integer(op,"mutate_ref")].set(DataComponents.MAX_STACK_SIZE,integer(op,"after_max"));int slot=integer(op,"mutate_slot");if(slot>=0&&slot<c.getContainerSize())c.getItems().set(slot,refs[integer(op,"replace_ref")]);}} + } + static final class C extends SimpleContainer {Data d;C(ItemStack[] slots){super(slots);}@Override public void setChanged(){d.event("changed");}@Override public int getMaxStackSize(){d.event("max");return integer(d.op,"max");}} + @SuppressWarnings("unchecked")public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();items=new Item[]{Items.AIR,Items.STICK,Items.SHIELD};keys=new DataComponentType[]{DataComponents.MAX_STACK_SIZE,DataComponents.DAMAGE,DataComponentType.<Integer>builder().persistent(Codec.INT).build()};components=field(ItemStack.class,"components");count=field(ItemStack.class,"count");patchMap=field(DataComponentPatch.class,"map");removed=field(Class.forName("net.minecraft.core.component.Removed"),"INSTANCE").get(null);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();for(int i=0;i<3;i++)items[i].builtInRegistryHolder().bindComponents(prototype(f.getAsJsonArray("prototypes").get(i).getAsJsonArray()));ItemStack.EMPTY.setCount(0);ItemStack.EMPTY.setPopTime(0);((PatchedDataComponentMap)components.get(ItemStack.EMPTY)).clearPatch();var d=new Data();d.out=out;d.identities.put(ItemStack.EMPTY,0);d.refs=new ItemStack[f.getAsJsonArray("stacks").size()];for(int i=0;i<d.refs.length;i++){var v=f.getAsJsonArray("stacks").get(i).getAsJsonObject();int type=integer(v,"item");d.refs[i]=type<0?ItemStack.EMPTY:new ItemStack(items[type],integer(v,"count"));if(type>=0){d.refs[i].setPopTime(integer(v,"pop"));((PatchedDataComponentMap)components.get(d.refs[i])).restorePatch(patch(v.getAsJsonArray("patch")));}}var slots=new ItemStack[f.getAsJsonArray("slots").size()];for(int i=0;i<slots.length;i++)slots[i]=d.refs[f.getAsJsonArray("slots").get(i).getAsInt()];d.c=new C(slots);d.c.d=d;d.all();for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonObject();d.op=op;d.calls=0;int a=integer(op,"a"),b=integer(op,"b"),slot=integer(op,"slot"),amount=integer(op,"amount");try{switch(op.get("kind").getAsString()){ + case "set":d.c.setItem(slot,d.refs[a]);break;case "add":d.refs[b]=d.c.addItem(d.refs[a]);break;case "remove":d.refs[b]=d.c.removeItem(slot,amount);break;case "remove-type":d.refs[b]=d.c.removeItemType(items[integer(op,"item")],amount);break;case "no-update":d.refs[b]=d.c.removeItemNoUpdate(slot);break;case "clear":d.c.clearContent();break;case "all":var result=d.c.removeAllItems();out.println("all-size "+result.size());for(var s:result)out.println("removed "+d.snapshot(s));break;case "can-add":out.println("can-add "+d.c.canAddItem(d.refs[a]));break;case "get":d.refs[b]=d.c.getItem(slot);break;case "alias":d.refs[b]=d.refs[a];break;case "copy":d.refs[b]=d.refs[a].copy();break;case "count":d.refs[a].setCount(amount);break;case "component":d.refs[a].set(keys[integer(op,"key")],op.get("value").isJsonNull()?null:integer(op,"value"));break;default:throw new AssertionError();}out.println("result ok "+d.calls);}catch(Stop|IndexOutOfBoundsException|NullPointerException e){out.println("result error "+d.calls);}d.all();}}} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSprintInputOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSprintInputOracle.java new file mode 100644 index 000000000..43ca12714 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSprintInputOracle.java @@ -0,0 +1,143 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.client.*; +import net.minecraft.client.gui.Gui; +import net.minecraft.client.gui.screens.LevelLoadingScreen; +import net.minecraft.client.multiplayer.MultiPlayerGameMode; +import net.minecraft.client.player.*; +import net.minecraft.client.tutorial.Tutorial; +import net.minecraft.core.Holder; +import net.minecraft.core.component.*; +import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.entity.*; +import net.minecraft.world.entity.player.*; +import net.minecraft.world.food.FoodData; +import net.minecraft.world.item.*; +import net.minecraft.world.item.component.UseEffects; +import net.minecraft.world.level.material.Fluid; +import net.minecraft.tags.TagKey; + +/** Real LocalPlayer.aiStep prefix through sprint decisions; stop before riding + * and parent/world movement. UI/effect/world queries are controlled fixtures. */ +public final class VanillaSprintInputOracle { + static Object unsafe;static Method allocate;static Constructor<ItemStack> stackConstructor; + static <T>T make(Class<T> type)throws Exception{return type.cast(allocate.invoke(unsafe,type));} + static Field field(Class<?> type,String name)throws Exception{var f=type.getDeclaredField(name);f.setAccessible(true);return f;} + static final class Boundary extends RuntimeException {} + static final class Mode extends MultiPlayerGameMode { + Mode(){super(null,null);} + @Override public boolean isSpectator(){return false;} + } + static final class Vehicle extends net.minecraft.world.entity.decoration.ArmorStand { + Actor actor;Vehicle(){super(EntityTypes.ARMOR_STAND,null);} + @Override public boolean canSprint(){return actor.flag(2);} + void configure(net.minecraft.world.level.Level level){setLevel(level);} + @Override protected boolean isLocalClientAuthoritative(){return actor.flag(3);} + } + static final class Actor extends LocalPlayer { + int flags;boolean sprint;List<Boolean> calls;Vehicle vehicle; + net.minecraft.server.level.ServerPlayer controlled; + Actor(){super(null,null,null,null,null,Input.EMPTY,false,null,null);} + boolean flag(int bit){return (flags&(1<<bit))!=0;} + @Override public boolean isMobilityRestricted(){return flag(0);} + @Override public boolean isPassenger(){return flag(1);} + @Override public Entity getVehicle(){return flag(1)?vehicle:null;} + @Override public boolean isInShallowWater(){return flag(6);} + @Override public boolean isUsingItem(){return flag(7);} + @Override public boolean isFallFlying(){return flag(9);} + @Override public boolean isUnderWater(){return flag(10);} + @Override public boolean isMovingSlowly(){return controlled==null?flag(11):super.isMovingSlowly();} + @Override public Pose getPose(){return controlled==null?Pose.STANDING:controlled.getPose();} + @Override public double getAttributeValue(Holder<net.minecraft.world.entity.ai.attributes.Attribute> attribute){return controlled==null?super.getAttributeValue(attribute):controlled.getAttributeValue(attribute);} + @Override public boolean isSwimming(){return flag(12);} + @Override public boolean isInWater(){return flag(13);} + @Override public boolean onGround(){return flag(14);} + @Override public boolean isSleeping(){return false;} + @Override public boolean canPlayerFitWithinBlocksAndEntitiesWhen(Pose pose){ + if(controlled==null)return true; + try{var method=Player.class.getDeclaredMethod("canPlayerFitWithinBlocksAndEntitiesWhen",Pose.class);method.setAccessible(true);return (Boolean)method.invoke(controlled,pose);}catch(ReflectiveOperationException e){throw new AssertionError(e);} + } + @Override public float getEffectBlendFactor(Holder<MobEffect> effect,float partial){return 0;} + @Override public boolean isEyeInFluid(TagKey<Fluid> tag){return false;} + @Override public boolean onClimbable(){return false;} + @Override public boolean tryToStartFallFlying(){return false;} + @Override protected void goDownInWater(){} + @Override protected boolean isControlledCamera(){return false;} + @Override public void onUpdateAbilities(){} + @Override public void jumpFromGround(){} // post-sprint ability-flight callback + @Override public boolean isSprinting(){return controlled==null?sprint:controlled.isSprinting();} + @Override public void setSprinting(boolean value){calls.add(value);sprint=value;if(controlled!=null)controlled.setSprinting(value);} + @Override public PlayerRideableJumping jumpableVehicle(){throw new Boundary();} + void item()throws Exception{useItem=stackConstructor.newInstance(Holder.direct(Items.STONE),1,new PatchedDataComponentMap(DataComponentMap.EMPTY));useItem.set(DataComponents.USE_EFFECTS,new UseEffects(flag(8),false,.2f));} + int trigger(){return sprintTriggerTime;} + void trigger(int v){sprintTriggerTime=v;} + } + /** Client-only bridge used by the resident scene comparison. Sprint setters + * dispatch to its real server actor, sharing food and collision conditions. */ + public static final class Controller { + final Actor p;final KeyMapping[] keys;final Field down;final Method modify; + public Controller(net.minecraft.server.level.ServerPlayer controlled)throws Exception{ + initialize(); + var options=make(Options.class);String[] names={"keyUp","keyDown","keyLeft","keyRight","keyJump","keyShift","keySprint"}; + keys=new KeyMapping[names.length];down=field(KeyMapping.class,"isDown"); + for(int i=0;i<keys.length;i++){keys[i]=make(KeyMapping.class);field(Options.class,names[i]).set(options,keys[i]);} + var window=make(OptionInstance.class);field(OptionInstance.class,"value").set(window,7);field(Options.class,"sprintWindow").set(options,window); + var mc=make(Minecraft.class);field(Minecraft.class,"options").set(mc,options); + var gui=make(Gui.class);field(Gui.class,"screen").set(gui,make(LevelLoadingScreen.class));field(Minecraft.class,"gui").set(mc,gui); + field(Minecraft.class,"tutorial").set(mc,make(Tutorial.class));field(Minecraft.class,"gameMode").set(mc,make(Mode.class)); + p=make(Actor.class);p.controlled=controlled;p.calls=new ArrayList<>();p.noPhysics=true;p.input=new KeyboardInput(options); + field(Player.class,"abilities").set(p,new Abilities());field(Player.class,"foodData").set(p,controlled.getFoodData());field(LocalPlayer.class,"minecraft").set(p,mc); + modify=LocalPlayer.class.getDeclaredMethod("modifyInput",net.minecraft.world.phys.Vec2.class);modify.setAccessible(true); + } + public net.minecraft.world.phys.Vec2 step(int mask)throws Exception{ + p.flags=(p.controlled.onGround()?1<<14:0)|(p.controlled.horizontalCollision?1<<15:0)|(p.controlled.minorHorizontalCollision?1<<16:0); + p.horizontalCollision=p.controlled.horizontalCollision;p.minorHorizontalCollision=p.controlled.minorHorizontalCollision; + p.calls.clear();for(int i=0;i<keys.length;i++)down.setBoolean(keys[i],(mask&(1<<i))!=0); + try{p.aiStep();throw new AssertionError("missing sprint boundary");}catch(Boundary expected){} + p.controlled.setShiftKeyDown((mask&32)!=0); + return (net.minecraft.world.phys.Vec2)modify.invoke(p,p.input.getMoveVector()); + } + public String state(){return p.trigger()+" "+p.input.hasForwardImpulse()+" "+p.input.keyPresses.shift();} + public boolean crouching(){return p.isCrouching();} + } + static void initialize()throws Exception{ + if(unsafe!=null)return; + var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class); + stackConstructor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);stackConstructor.setAccessible(true); + } + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + initialize(); + var options=make(Options.class);String[] names={"keyUp","keyDown","keyLeft","keyRight","keyJump","keyShift","keySprint"}; + var keys=new KeyMapping[names.length];var down=field(KeyMapping.class,"isDown"); + for(int i=0;i<keys.length;i++){keys[i]=make(KeyMapping.class);field(Options.class,names[i]).set(options,keys[i]);} + var window=make(OptionInstance.class);field(Options.class,"sprintWindow").set(options,window); + var mc=make(Minecraft.class);field(Minecraft.class,"options").set(mc,options); + var gui=make(Gui.class);field(Gui.class,"screen").set(gui,make(LevelLoadingScreen.class));field(Minecraft.class,"gui").set(mc,gui); + field(Minecraft.class,"tutorial").set(mc,make(Tutorial.class));field(Minecraft.class,"gameMode").set(mc,make(Mode.class)); + try(var out=new PrintWriter(Files.newBufferedWriter(Path.of(args[1])));var lines=Files.lines(Path.of(args[0]))){ + for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject(); + var p=make(Actor.class);p.calls=new ArrayList<>();p.noPhysics=true;p.sprint=f.get("sprint").getAsBoolean();p.trigger(f.get("trigger").getAsInt()); + var abilities=new Abilities();field(Player.class,"abilities").set(p,abilities);field(Player.class,"foodData").set(p,new FoodData()); + var level=make(net.minecraft.client.multiplayer.ClientLevel.class);field(net.minecraft.world.level.Level.class,"isClientSide").setBoolean(level,true); + p.vehicle=make(Vehicle.class);p.vehicle.actor=p;p.vehicle.configure(level);field(LocalPlayer.class,"minecraft").set(p,mc); + var keyboard=new KeyboardInput(options);p.input=keyboard; + int initial=f.get("initial_keys").getAsInt();for(int i=0;i<keys.length;i++)down.setBoolean(keys[i],(initial&(1<<i))!=0);keyboard.tick(); + for(var element:f.getAsJsonArray("steps")){var step=element.getAsJsonObject();p.flags=step.get("flags").getAsInt();p.calls.clear();p.item(); + abilities.mayfly=p.flag(4);abilities.flying=p.flag(5);p.getFoodData().setFoodLevel(step.get("food").getAsInt()); + p.horizontalCollision=p.flag(15);p.minorHorizontalCollision=p.flag(16);field(OptionInstance.class,"value").set(window,step.get("window").getAsInt()); + int mask=step.get("keys").getAsInt();for(int i=0;i<keys.length;i++)down.setBoolean(keys[i],(mask&(1<<i))!=0); + try{p.aiStep();throw new AssertionError("missing sprint boundary");}catch(Boundary expected){} + var vector=keyboard.getMoveVector();var calls=new ArrayList<String>();for(boolean value:p.calls)calls.add(Boolean.toString(value)); + out.printf("%s %d %08x %08x %s | %s%n",p.sprint,p.trigger(),Float.floatToIntBits(vector.x),Float.floatToIntBits(vector.y),keyboard.keyPresses.shift(),String.join(",",calls)); + } + out.println("end"); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSpriteAnimationOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSpriteAnimationOracle.java new file mode 100644 index 000000000..0ee728951 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSpriteAnimationOracle.java @@ -0,0 +1,80 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import com.mojang.blaze3d.platform.NativeImage; +import com.mojang.serialization.JsonOps; +import com.mojang.renderpearl.api.buffers.GpuBufferSlice; +import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.client.renderer.texture.SpriteContents; +import net.minecraft.client.resources.metadata.animation.*; +import net.minecraft.resources.Identifier; +import static dev.horizonlab.parity.VanillaCuboidModelOracle.map; + +/** Invokes the pinned metadata codec and real animation tick state, without GPU draws. */ +public final class VanillaSpriteAnimationOracle { + private static final Gson JSON = new GsonBuilder().serializeNulls().create(); + private static Object field(Object target, String name) throws Exception { + var field=target.getClass().getDeclaredField(name); field.setAccessible(true); return field.get(target); + } + private static Object probe(JsonObject row) throws Exception { + AnimationMetadataSection metadata; + try { metadata=AnimationMetadataSection.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(row.get("json").getAsString())).getOrThrow(); } + catch(RuntimeException error) { return null; } + int width=row.get("width").getAsInt(),height=row.get("height").getAsInt(); + var size=metadata.calculateFrameSize(width,height); + Object frames=metadata.frames().map(list->list.stream().map(f->map("index",f.index(),"time",f.time().orElse(null))).toList()).orElse(null); + var result=map("metadata",map("frames",frames,"width",metadata.frameWidth().orElse(null),"height",metadata.frameHeight().orElse(null),"frametime",metadata.defaultFrameTime(),"interpolate",metadata.interpolatedFrames()),"size",new int[]{size.width(),size.height()}); + // This guard scopes allocation to valid sprite grids. Frame-size calculation + // above remains tested for impossible dimensions; loader errors are separate. + if(size.width()>width || size.height()>height || width%size.width()!=0 || height%size.height()!=0) return result; + try(var contents=new SpriteContents(Identifier.parse("horizon:probe"),size,new NativeImage(width,height,true),Optional.of(metadata),List.of(),Optional.empty())) { + var animation=field(contents,"animatedTexture"); + if(animation==null) { result.put("animation",null); return result; } + var nativeFrames=(List<?>)field(animation,"frames"); var sequence=new ArrayList<int[]>(); + for(var frame:nativeFrames) sequence.add(new int[]{(int)field(frame,"index"),(int)field(frame,"time")}); + var type=Class.forName("net.minecraft.client.renderer.texture.SpriteContents$AnimationState"); + var constructor=type.getDeclaredConstructors()[0];constructor.setAccessible(true); + var state=(SpriteContents.AnimationState)constructor.newInstance(contents,animation,new Int2ObjectOpenHashMap<>(),new GpuBufferSlice[0]); + var samples=new ArrayList<Object>(); + int ticks=row.get("ticks").getAsInt(); + for(int tick=0;tick<=ticks;tick++) { + samples.add(sample(state,sequence)); + state.tick(); + } + // Probe native tick transitions near very long frame durations too. + var edges=new ArrayList<Object>(); + var frameField=type.getDeclaredField("frame");frameField.setAccessible(true); + var subField=type.getDeclaredField("subFrame");subField.setAccessible(true); + for(int index=0;index<sequence.size();index++) { + int duration=sequence.get(index)[1]; + for(int sub: new int[]{0,1,duration/2,duration-2,duration-1}) { + if(sub<0 || sub>=duration)continue; + frameField.setInt(state,index);subField.setInt(state,sub);state.tick(); + edges.add(sample(state,sequence)); + } + } + result.put("animation",map("sequence",sequence,"columns",field(animation,"frameRowSize"),"samples",samples,"edges",edges)); + } + return result; + } + private static Object sample(SpriteContents.AnimationState state,List<int[]> sequence) throws Exception { + int index=(int)field(state,"frame"),sub=(int)field(state,"subFrame");var current=sequence.get(index); + int blend=(int)((float)sub/(float)current[1]*1000.0f); + return Arrays.asList(index,sub,current[0],sequence.get((index+1)%sequence.size())[0],field(state,"isDirty"),state.needsToDraw(),blend); + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion(); + try(var input=Files.newBufferedReader(Path.of(args[0]));var output=Files.newBufferedWriter(Path.of(args[1]))) { + for(String line;(line=input.readLine())!=null;) { + var row=JsonParser.parseString(line).getAsJsonObject();Object value; + var probe=probe(row); + value=probe==null ? map("name",row.get("name").getAsString(),"error",true) : map("name",row.get("name").getAsString(),"value",probe); + output.write(JSON.toJson(value));output.newLine(); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStateProviderOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStateProviderOracle.java new file mode 100644 index 000000000..41fd631c7 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStateProviderOracle.java @@ -0,0 +1,147 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.lang.reflect.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.resources.*; +import net.minecraft.util.RandomSource; +import net.minecraft.tags.*; +import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.FlowingFluid; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.biome.Biome; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider; + +/** Native direct/typed state-provider decoding and both sampling methods. */ +public final class VanillaStateProviderOracle { + private static final class Stop extends RuntimeException {} + @SuppressWarnings({"rawtypes","unchecked"}) + private static void verifyPropertyFamilies() { + var families=new HashMap<String,net.minecraft.world.level.block.state.properties.Property<?>>(); + for(var block:BuiltInRegistries.BLOCK)for(var property:block.getStateDefinition().getProperties()) { + var values=new ArrayList<String>(); + for(var value:property.getPossibleValues())values.add(((net.minecraft.world.level.block.state.properties.Property)property).getName((Comparable)value)); + Collections.sort(values); + String signature=property.getName()+"/"+(property instanceof net.minecraft.world.level.block.state.properties.IntegerProperty)+"/"+values; + var previous=families.putIfAbsent(signature,property); + if(previous!=null&&!previous.equals(property))throw new AssertionError("ambiguous pinned property family: "+signature); + } + } + private static void bindFluidTags(JsonObject resources) { + var registry=BuiltInRegistries.FLUID; + var loader=new TagLoader<Holder<Fluid>>((id,required)->registry.get(id).map(value->(Holder<Fluid>)value),"tags/fluid"); + var definitions=new HashMap<Identifier,List<TagLoader.EntryWithSource>>(); + for(var item:resources.entrySet()) { + var file=TagFile.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(item.getValue().getAsString())).getOrThrow(); + var entries=new ArrayList<TagLoader.EntryWithSource>(); + for(var entry:file.entries())entries.add(new TagLoader.EntryWithSource(entry,"vanilla")); + definitions.put(Identifier.parse(item.getKey()),entries); + } + var tags=new HashMap<TagKey<Fluid>,List<Holder<Fluid>>>(); + loader.build(definitions).forEach((id,values)->tags.put(TagKey.create(Registries.FLUID,id),List.copyOf(values))); + if(tags.size()!=resources.size())throw new AssertionError("incomplete fluid tags"); + registry.prepareTagReload(new TagLoader.LoadResult<>(Registries.FLUID,tags)).apply(); + } + @SuppressWarnings("unchecked") + public static void main(String[] args) throws Exception { + if(args[0].equals("export")){VanillaBlockStateCodecOracle.main(args);return;} + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + verifyPropertyFamilies(); + Path dir=Path.of(args[1]); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject()); + bindFluidTags(JsonParser.parseString(Files.readString(dir.resolve("fluid-tags.json"))).getAsJsonObject()); + var biomeLoad=VanillaMaterialConditionOracle.class.getDeclaredMethod("loadBiomes",Path.class);biomeLoad.setAccessible(true);biomeLoad.invoke(null,dir); + var biomeField=VanillaMaterialConditionOracle.class.getDeclaredField("biomes");biomeField.setAccessible(true); + var biomeRegistry=(MappedRegistry<Biome>)biomeField.get(null); + var biomeNames=new ArrayList<>(new TreeSet<>(biomeRegistry.keySet())); + var providers=new MappedRegistry<BlockStateProvider>(Registries.BLOCK_STATE_PROVIDER,com.mojang.serialization.Lifecycle.stable()); + var ops=RegistryOps.create(JsonOps.INSTANCE,new RegistryOps.RegistryInfoLookup(){public <T> Optional<HolderGetter<T>> lookup(ResourceKey<? extends Registry<? extends T>> key){ + if(key.equals(Registries.BIOME))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(biomeRegistry); + if(key.equals(Registries.FLUID))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(BuiltInRegistries.FLUID); + if(key.equals(Registries.BLOCK_STATE_PROVIDER))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(providers); + return key.equals(Registries.BLOCK)?(Optional<HolderGetter<T>>)(Optional<?>)Optional.of(BuiltInRegistries.BLOCK):Optional.empty(); + }}); + for(var entry:JsonParser.parseString(Files.readString(dir.resolve("catalog.json"))).getAsJsonObject().entrySet()) { + var provider=BlockStateProvider.DIRECT_CODEC.parse(ops,JsonParser.parseString(entry.getValue().getAsString())).getOrThrow(); + providers.register(ResourceKey.create(Registries.BLOCK_STATE_PROVIDER,Identifier.parse(entry.getKey())),provider,RegistrationInfo.BUILT_IN); + } + providers.freeze(); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8));var inputs=Files.lines(dir.resolve("inputs.txt"))) { + for(var state:Block.BLOCK_STATE_REGISTRY) { + var fluid=state.getFluidState();boolean falling=fluid.hasProperty(FlowingFluid.FALLING)&&fluid.getValue(FlowingFluid.FALLING); + out.println("fluid "+Block.getId(state)+" "+BuiltInRegistries.FLUID.getKey(fluid.getType())+" "+fluid.getAmount()+" "+falling+" "+fluid.isSource()+" "+Integer.toUnsignedString(Float.floatToRawIntBits(fluid.getOwnHeight()))); + } + for(var line:(Iterable<String>)inputs::iterator) { + var f=JsonParser.parseString(line).getAsJsonObject();long seed=f.get("seed").getAsLong(); + RandomSource random=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + if(f.get("worldgen").getAsBoolean())random=new WorldgenRandom(random); + Optional<BlockStateProvider> decoded; + try { + var definition=JsonParser.parseString(f.get("definition").getAsString()); + decoded=f.has("holder")&&f.get("holder").getAsBoolean()?BlockStateProvider.CODEC.parse(ops,definition).result().map(Holder::value):(f.get("typed").getAsBoolean()?BlockStateProvider.TYPED_CODEC:BlockStateProvider.DIRECT_CODEC).parse(ops,definition).result(); + } + catch(IllegalArgumentException|IllegalStateException error){decoded=Optional.empty();} + if(decoded.isEmpty())out.println("decode error");else { + out.println("decode ok");int[] calls={0};int[] fallback={0};int[] queries={0};int[] biomeIndex={0}; + int queryFail=f.has("query_fail")?f.get("query_fail").getAsInt():-1; + int min=f.has("bounds")?f.getAsJsonArray("bounds").get(0).getAsInt():-64; + int height=f.has("bounds")?f.getAsJsonArray("bounds").get(1).getAsInt():384; + int sea=f.has("bounds")?f.getAsJsonArray("bounds").get(2).getAsInt():63; + var world=(LevelAccessor)Proxy.newProxyInstance(LevelAccessor.class.getClassLoader(),new Class<?>[]{LevelAccessor.class},(proxy,method,values)->{ + if(method.getName().equals("getFluidState")) { + var at=(BlockPos)values[0];out.println("fluid "+at.getX()+" "+at.getY()+" "+at.getZ()); + if(queries[0]++==queryFail)throw new Stop();return Block.stateById(fallback[0]).getFluidState(); + } + if(method.getName().equals("getRawBrightness")) { + var at=(BlockPos)values[0];out.println("light "+at.getX()+" "+at.getY()+" "+at.getZ()+" "+values[1]); + if(queries[0]++==queryFail)throw new Stop();return f.has("brightness")?f.get("brightness").getAsInt():15; + } + if(method.getName().equals("getBlockEntity")) { + var p=(BlockPos)values[0];out.println("entity "+p.getX()+" "+p.getY()+" "+p.getZ()); + if(queries[0]++==queryFail)throw new Stop();return null; + } + if(method.getName().equals("isUnobstructed")) { + if(values[0]!=null)throw new AssertionError("unexpected excluded entity"); + var box=((net.minecraft.world.phys.shapes.VoxelShape)values[1]).bounds(); + out.printf("clear %016x %016x %016x %016x %016x %016x%n",Double.doubleToRawLongBits(box.minX),Double.doubleToRawLongBits(box.minY),Double.doubleToRawLongBits(box.minZ),Double.doubleToRawLongBits(box.maxX),Double.doubleToRawLongBits(box.maxY),Double.doubleToRawLongBits(box.maxZ)); + if(queries[0]++==queryFail)throw new Stop();return !f.has("unobstructed")||f.get("unobstructed").getAsBoolean(); + } + if(method.getName().equals("getBiome")) { + var p=(BlockPos)values[0];out.println("biome "+p.getX()+" "+p.getY()+" "+p.getZ()); + if(queries[0]++==queryFail)throw new Stop(); + return biomeRegistry.getOrThrow(ResourceKey.create(Registries.BIOME,biomeNames.get(biomeIndex[0]))); + } + if(method.getName().equals("getBlockState")){var p=(BlockPos)values[0];out.println("read "+p.getX()+" "+p.getY()+" "+p.getZ());if(calls[0]++==f.get("fail").getAsInt())throw new Stop();return Block.stateById(fallback[0]);} + if(method.getName().equals("getMinY")||method.getName().equals("getHeight")) { + boolean minimum=method.getName().equals("getMinY");out.println(minimum?"min":"height"); + if(queries[0]++==queryFail)throw new Stop();return minimum?min:height; + } + if(method.getName().equals("getSeaLevel")){out.println("sea");if(queries[0]++==queryFail)throw new Stop();return sea;} + if(method.isDefault())return InvocationHandler.invokeDefault(proxy,method,values); + throw new AssertionError(method); + }); + int positionIndex=0,sampleIndex=0; + for(int repeat=0;repeat<f.get("repeats").getAsInt();repeat++)for(var value:f.getAsJsonArray("states")) { + fallback[0]=value.getAsInt(); + biomeIndex[0]=f.has("biomes")?f.getAsJsonArray("biomes").get(sampleIndex%f.getAsJsonArray("biomes").size()).getAsInt():0;sampleIndex++; + var p=new BlockPos(17,repeat-64,-33); + if(f.has("positions")){var xyz=f.getAsJsonArray("positions").get(positionIndex++%f.getAsJsonArray("positions").size()).getAsJsonArray();p=new BlockPos(xyz.get(0).getAsInt(),xyz.get(1).getAsInt(),xyz.get(2).getAsInt());} + for(boolean optional:new boolean[]{false,true}) { + try {var result=optional?decoded.get().getOptionalState(world,random,p):decoded.get().getState(world,random,p);out.println("state "+(result==null?"none":Block.getId(result)));} + catch(Stop|IllegalArgumentException|IllegalStateException|IndexOutOfBoundsException error){out.println("state error");} + out.println("next "+random.nextLong()); + } + } + } + out.println("tail "+random.nextLong()); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStatusEffectOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStatusEffectOracle.java new file mode 100644 index 000000000..31b268b7a --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStatusEffectOracle.java @@ -0,0 +1,28 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.world.effect.*;import net.minecraft.core.Holder; +/** Native instance copying, shared hidden chains, update and duration behavior. */ +public final class VanillaStatusEffectOracle { + static Field duration,amplifier,ambient,visible,icon,hidden,blend,factor,previous; + static List<Holder<MobEffect>> effects; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static int n(JsonObject v,String k){return v.get(k).getAsInt();} + static float fl(JsonObject v,String k){return Float.intBitsToFloat((int)v.get(k).getAsLong());} + static long bits(float v){return Integer.toUnsignedLong(Float.floatToIntBits(v));} + static final class Stop extends RuntimeException{} + static int id(IdentityHashMap<MobEffectInstance,Integer> ids,MobEffectInstance e){return ids.computeIfAbsent(e,k->ids.size());} + static void dump(PrintWriter out,MobEffectInstance[] slots,IdentityHashMap<MobEffectInstance,Integer> ids)throws Exception { + var visit=new ArrayList<MobEffectInstance>();var seen=new IdentityHashMap<MobEffectInstance,Boolean>(); + for(int i=0;i<slots.length;i++){var e=slots[i];out.println("slot "+i+" "+id(ids,e));if(seen.put(e,true)==null)visit.add(e);} + for(int i=0;i<visit.size();i++){var e=visit.get(i);var h=(MobEffectInstance)hidden.get(e);String hid=h==null?"none":Integer.toString(id(ids,h));if(h!=null&&seen.put(h,true)==null)visit.add(h);var b=blend.get(e);out.println("node "+id(ids,e)+" "+effects.indexOf(e.getEffect())+" "+e.getDuration()+" "+e.getAmplifier()+" "+e.isAmbient()+" "+e.isVisible()+" "+e.showIcon()+" "+hid+" "+bits(factor.getFloat(b))+" "+bits(previous.getFloat(b)));} + } + public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();effects=List.of(MobEffects.SPEED,MobEffects.POISON,MobEffects.NIGHT_VISION);duration=field(MobEffectInstance.class,"duration");amplifier=field(MobEffectInstance.class,"amplifier");ambient=field(MobEffectInstance.class,"ambient");visible=field(MobEffectInstance.class,"visible");icon=field(MobEffectInstance.class,"showIcon");hidden=field(MobEffectInstance.class,"hiddenEffect");blend=field(MobEffectInstance.class,"blendState");factor=field(blend.getType(),"factor");previous=field(blend.getType(),"factorPreviousFrame");Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var input=f.getAsJsonArray("instances");var slots=new MobEffectInstance[input.size()];for(int i=0;i<slots.length;i++){var v=input.get(i).getAsJsonObject();int h=n(v,"hidden");slots[i]=new MobEffectInstance(effects.get(n(v,"effect")),n(v,"duration"),n(v,"amplifier"),v.get("ambient").getAsBoolean(),v.get("visible").getAsBoolean(),v.get("icon").getAsBoolean(),h<0?null:slots[h]);}var ids=new IdentityHashMap<MobEffectInstance,Integer>();dump(out,slots,ids); + for(var value:f.getAsJsonArray("ops")){var op=value.getAsJsonObject();int a=n(op,"a"),b=n(op,"b");String result="ok";try{switch(op.get("op").getAsString()){ + case "alias"->slots[b]=slots[a];case "copy"->slots[b]=new MobEffectInstance(slots[a]);case "scale"->slots[b]=slots[a].withScaledDuration(fl(op,"factor"));case "update"->result=Boolean.toString(slots[a].update(slots[b]));case "eq"->result=Boolean.toString(slots[a].equals(slots[b]));case "same"->result=Boolean.toString(slots[a]==slots[b]);case "ends"->result=Boolean.toString(slots[a].endsWithin(n(op,"value")));case "infinite"->result=Boolean.toString(slots[a].isInfiniteDuration());case "copy-blend"->slots[a].copyBlendState(slots[b]); + case "set"->{var e=slots[a];duration.setInt(e,n(op,"duration"));amplifier.setInt(e,n(op,"amplifier"));ambient.setBoolean(e,op.get("ambient").getAsBoolean());visible.setBoolean(e,op.get("visible").getAsBoolean());icon.setBoolean(e,op.get("icon").getAsBoolean());factor.setFloat(blend.get(e),fl(op,"factor"));previous.setFloat(blend.get(e),fl(op,"previous"));} + case "map"->result=Integer.toString(slots[a].mapDuration(v->{out.println("map "+v);if(op.get("mutate").getAsBoolean())try{duration.setInt(slots[b],n(op,"value"));}catch(Exception e){throw new AssertionError(e);}if(op.get("fail").getAsBoolean())throw new Stop();return v*n(op,"value");}));default->throw new AssertionError(); + }}catch(Stop e){result="callback";}out.println("result "+result);dump(out,slots,ids);} + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStatusTickOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStatusTickOracle.java new file mode 100644 index 000000000..45fff0d9f --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStatusTickOracle.java @@ -0,0 +1,45 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.world.entity.*;import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.effect.*;import net.minecraft.core.Holder; +/** Native server/client ticking, hidden downgrades and blend interpolation. */ +public final class VanillaStatusTickOracle { + static Field duration,amplifier,ambient,visible,icon,hidden,blend,factor,previous; + static List<Holder<MobEffect>> effects; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static int n(JsonObject v,String k){return v.get(k).getAsInt();} + static float fl(JsonObject v,String k){return Float.intBitsToFloat((int)v.get(k).getAsLong());} + static long bits(float v){return Integer.toUnsignedLong(Float.floatToIntBits(v));} + static final class Stop extends RuntimeException{} + static int id(IdentityHashMap<MobEffectInstance,Integer> ids,MobEffectInstance e){return ids.computeIfAbsent(e,k->ids.size());} + static void dump(PrintWriter out,MobEffectInstance[] slots,IdentityHashMap<MobEffectInstance,Integer> ids)throws Exception { + var visit=new ArrayList<MobEffectInstance>();var seen=new IdentityHashMap<MobEffectInstance,Boolean>(); + for(int i=0;i<slots.length;i++){var e=slots[i];out.println("slot "+i+" "+id(ids,e));if(seen.put(e,true)==null)visit.add(e);} + for(int i=0;i<visit.size();i++){var e=visit.get(i);var h=(MobEffectInstance)hidden.get(e);String hid=h==null?"none":Integer.toString(id(ids,h));if(h!=null&&seen.put(h,true)==null)visit.add(h);var b=blend.get(e);out.println("node "+id(ids,e)+" "+effects.indexOf(e.getEffect())+" "+e.getDuration()+" "+e.getAmplifier()+" "+e.isAmbient()+" "+e.isVisible()+" "+e.showIcon()+" "+hid+" "+bits(factor.getFloat(b))+" "+bits(previous.getFloat(b)));} + } + static Object unsafe;static Method allocate;static Field removed;static Data active; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static final class Data {JsonObject f;PrintWriter out;MobEffectInstance[] slots;IdentityHashMap<MobEffectInstance,Integer> ids=new IdentityHashMap<>();LivingEntity actor;ServerLevel[] levels;int calls;boolean changed; + JsonObject config(){return f.getAsJsonObject(changed?"after":"initial");} + void reset(){try{var c=config();actor.tickCount=n(c,"tick");for(int i=0;i<slots.length;i++){var v=c.getAsJsonArray("instances").get(i).getAsJsonObject();var e=slots[i];duration.setInt(e,n(v,"duration"));amplifier.setInt(e,n(v,"amplifier"));ambient.setBoolean(e,v.get("ambient").getAsBoolean());visible.setBoolean(e,v.get("visible").getAsBoolean());icon.setBoolean(e,v.get("icon").getAsBoolean());factor.setFloat(blend.get(e),fl(v,"factor"));previous.setFloat(blend.get(e),fl(v,"previous"));}}catch(Exception e){throw new AssertionError(e);}} + void all(){try{out.println("state "+calls+" "+changed+" "+actor.tickCount);dump(out,slots,ids);}catch(Exception e){throw new AssertionError(e);}} + void event(String name){out.println("event "+name);int i=calls++;all();if(i==n(f,"fail"))throw new Stop();if(i==n(f,"mutate")){changed=true;reset();}} + } + static final class Effect extends MobEffect {int id;Effect(int id){super(MobEffectCategory.BENEFICIAL,0);this.id=id;} + @Override public boolean shouldApplyEffectTickThisTick(int time,int amp){active.event("should "+id+" "+time+" "+amp);return active.config().get("should").getAsBoolean();} + @Override public boolean applyEffectTick(ServerLevel level,LivingEntity actor,int amp){if(actor!=active.actor)throw new AssertionError();int l=level==active.levels[0]?0:level==active.levels[1]?1:-1;if(l<0)throw new AssertionError();active.event("apply "+id+" "+l+" "+amp);return active.config().get("apply").getAsBoolean();} + @Override public int getBlendOutAdvanceTicks(){active.event("advance "+id);return n(active.config(),"advance");} + @Override public int getBlendInDurationTicks(){active.event("blend-duration "+id+" true");return n(active.config(),"blend_in");} + @Override public int getBlendOutDurationTicks(){active.event("blend-duration "+id+" false");return n(active.config(),"blend_out");} + } + public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();effects=List.of(Holder.direct(new Effect(0)),Holder.direct(new Effect(1)),Holder.direct(new Effect(2)));var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);removed=field(Entity.class,"removalReason");duration=field(MobEffectInstance.class,"duration");amplifier=field(MobEffectInstance.class,"amplifier");ambient=field(MobEffectInstance.class,"ambient");visible=field(MobEffectInstance.class,"visible");icon=field(MobEffectInstance.class,"showIcon");hidden=field(MobEffectInstance.class,"hiddenEffect");blend=field(MobEffectInstance.class,"blendState");factor=field(blend.getType(),"factor");previous=field(blend.getType(),"factorPreviousFrame");Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();active=d;d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.actor=make(net.minecraft.world.entity.decoration.ArmorStand.class);d.levels=new ServerLevel[]{make(ServerLevel.class),make(ServerLevel.class)};var input=d.config().getAsJsonArray("instances");d.slots=new MobEffectInstance[input.size()];for(int i=0;i<d.slots.length;i++){var v=input.get(i).getAsJsonObject();int h=n(v,"hidden");d.slots[i]=new MobEffectInstance(effects.get(n(v,"effect")),n(v,"duration"),n(v,"amplifier"),v.get("ambient").getAsBoolean(),v.get("visible").getAsBoolean(),v.get("icon").getAsBoolean(),h<0?null:d.slots[h]);}d.reset();d.all(); + for(var value:d.f.getAsJsonArray("ops")){var op=value.getAsJsonObject();int a=n(op,"a"),b=n(op,"b");String result="ok";try{switch(op.get("op").getAsString()){ + case "server"->result=Boolean.toString(d.slots[a].tickServer(d.levels[n(op,"level")],d.actor,()->d.event("downgrade"))); + case "client"->d.slots[a].tickClient();case "skip"->d.slots[a].skipBlending(); + case "factor"->{removed.set(d.actor,op.get("removed").getAsBoolean()?Entity.RemovalReason.DISCARDED:null);result=Long.toString(bits(d.slots[a].getBlendFactor(d.actor,fl(op,"partial"))));} + case "update"->result=Boolean.toString(d.slots[a].update(d.slots[b]));case "copy"->d.slots[b]=new MobEffectInstance(d.slots[a]);case "alias"->d.slots[b]=d.slots[a];default->throw new AssertionError(); + }}catch(Stop e){result="callback";}out.println("result "+result);d.all();} + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredConsumeOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredConsumeOracle.java new file mode 100644 index 000000000..1bbf8f133 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredConsumeOracle.java @@ -0,0 +1,57 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.Holder;import net.minecraft.world.effect.*;import net.minecraft.world.entity.*;import net.minecraft.world.level.Level;import net.minecraft.server.level.ServerLevel; +import net.minecraft.core.BlockPos;import net.minecraft.core.HolderSet;import net.minecraft.world.item.ItemStack;import net.minecraft.world.item.consume_effects.*;import net.minecraft.sounds.*;import net.minecraft.util.RandomSource;import net.minecraft.world.level.levelgen.XoroshiroRandomSource; +/** Actual consume effects composed with inherited entity storage and native instances. */ +public final class VanillaStoredConsumeOracle { + static Object unsafe;static Method allocate;static Field duration,amplifier,ambient,visible,icon,hidden,blend,factor,previous,removed,activeEffects;static Data active; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static int n(JsonObject v,String k){return v.get(k).getAsInt();} + static float fl(JsonObject v,String k){return Float.intBitsToFloat((int)v.get(k).getAsLong());} + static long bits(float v){return Integer.toUnsignedLong(Float.floatToIntBits(v));} + static final class Stop extends RuntimeException{} + static final class Data {JsonObject f;PrintWriter out;RandomSource[] random;List<Holder<MobEffect>> keys=new ArrayList<>();MobEffectInstance[] pool;IdentityHashMap<MobEffectInstance,Integer> ids=new IdentityHashMap<>();Actor actor;Entity other;EffectLevel[] levels;int calls;boolean changed; + JsonObject config(){return f.getAsJsonObject(changed?"after":"initial");} + Map<Holder<MobEffect>,MobEffectInstance> map(){return actor.getActiveEffectsMap();} + int id(MobEffectInstance e){return ids.computeIfAbsent(e,k->ids.size());} + int key(Holder<MobEffect> h){return keys.indexOf(h);} + int source(Entity e){if(e==null)return -1;if(e==actor)return 0;if(e==other)return 1;throw new AssertionError();} + void reset(){try{var c=config();if(c.get("reseed").getAsBoolean())for(int i=0;i<2;i++)random[i].setSeed(c.getAsJsonArray("seeds").get(i).getAsLong());removed.set(actor,c.get("removed").getAsBoolean()?Entity.RemovalReason.DISCARDED:null);for(int i=0;i<pool.length;i++){var v=c.getAsJsonArray("states").get(i).getAsJsonObject();var e=pool[i];duration.setInt(e,n(v,"duration"));amplifier.setInt(e,n(v,"amplifier"));ambient.setBoolean(e,v.get("ambient").getAsBoolean());visible.setBoolean(e,v.get("visible").getAsBoolean());icon.setBoolean(e,v.get("icon").getAsBoolean());factor.setFloat(blend.get(e),fl(v,"factor"));previous.setFloat(blend.get(e),fl(v,"previous"));}}catch(Exception e){throw new AssertionError(e);}} + void all(){try{out.println("state "+calls+" "+changed);var roots=new ArrayList<MobEffectInstance>();var entries=new StringJoiner(",");for(var e:map().entrySet()){entries.add(key(e.getKey())+"="+id(e.getValue()));roots.add(e.getValue());}out.println("map "+entries);for(int i=0;i<pool.length;i++){out.println("pool "+i+" "+id(pool[i]));roots.add(pool[i]);}var seen=new IdentityHashMap<MobEffectInstance,Boolean>();for(int i=0;i<roots.size();i++){var e=roots.get(i);if(seen.put(e,true)!=null)continue;int id=id(e);var h=(MobEffectInstance)hidden.get(e);String hid="none";if(h!=null){roots.add(h);hid=Integer.toString(id(h));}var b=blend.get(e);out.println("node "+id+" "+key(e.getEffect())+" "+e.getDuration()+" "+e.getAmplifier()+" "+e.isAmbient()+" "+e.isVisible()+" "+e.showIcon()+" "+hid+" "+bits(factor.getFloat(b))+" "+bits(previous.getFloat(b)));}}catch(Exception e){throw new AssertionError(e);}} + void raw(JsonObject op){int a=n(op,"a"),b=n(op,"b");switch(op.get("op").getAsString()){case "put"->map().put(keys.get(a),pool[b]);case "drop"->map().remove(keys.get(a));case "clear"->map().clear();case "copy"->pool[b]=new MobEffectInstance(pool[a]);case "alias"->pool[b]=pool[a];default->throw new AssertionError();}} + void event(String name){out.println("event "+name);int i=calls++;all();if(i==n(f,"fail"))throw new Stop();if(i==n(f,"mutate")){changed=true;reset();for(var op:f.getAsJsonArray("mutations"))raw(op.getAsJsonObject());}} + } + static final class Effect extends MobEffect {int id,hash;Effect(int id,int hash){super(MobEffectCategory.BENEFICIAL,0);this.id=id;this.hash=hash;}@Override public int hashCode(){return hash;} + @Override public void onEffectAdded(LivingEntity actor,int amp){if(actor!=active.actor)throw new AssertionError();active.event("effect-added "+id+" "+amp);} + @Override public void onEffectStarted(LivingEntity actor,int amp){if(actor!=active.actor)throw new AssertionError();active.event("effect-started "+id+" "+amp);} + } + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Data d;Actor(){super(null,null);} + @Override public RandomSource getRandom(){d.event("random");return d.random[n(d.config(),"random")];} + @Override public BlockPos blockPosition(){d.event("position");var p=d.config().getAsJsonArray("position");return new BlockPos(p.get(0).getAsInt(),p.get(1).getAsInt(),p.get(2).getAsInt());} + @Override public SoundSource getSoundSource(){d.event("category");return SoundSource.values()[n(d.config(),"category")];} + @Override public boolean canBeAffected(MobEffectInstance e){d.event("eligible "+d.id(e));return d.config().get("allow").getAsBoolean();} + @Override protected void onEffectAdded(MobEffectInstance e,Entity source){d.event("added "+d.id(e)+" "+d.source(source));} + @Override protected void onEffectUpdated(MobEffectInstance e,boolean reapply,Entity source){d.event("updated "+d.id(e)+" "+reapply+" "+d.source(source));} + @Override protected void onEffectsRemoved(Collection<MobEffectInstance> values){var ids=new StringJoiner(",");for(var e:values)ids.add(Integer.toString(d.id(e)));d.event("removed "+ids);} + @Override public Level level(){d.event("level");return d.levels[n(d.config(),"level")];} + @Override public MobEffectInstance getEffect(Holder<MobEffect> e){d.event("get "+d.key(e));return super.getEffect(e);} + } + static final class EffectLevel extends ServerLevel{Data d;int id;EffectLevel(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public void playSound(Entity excluded,BlockPos p,SoundEvent sound,SoundSource category,float volume,float pitch){if(excluded!=null||volume!=1||pitch!=1)throw new AssertionError();int s=sound==SoundEvents.GENERIC_EAT.value()?0:sound==SoundEvents.PLAYER_BURP?1:-1;if(s<0)throw new AssertionError();d.event("sound "+id+" "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+s+" "+category.ordinal());} + @Override public boolean isClientSide(){d.event("client "+id);return d.config().get("client").getAsBoolean();}} + public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);activeEffects=field(LivingEntity.class,"activeEffects");removed=field(Entity.class,"removalReason");duration=field(MobEffectInstance.class,"duration");amplifier=field(MobEffectInstance.class,"amplifier");ambient=field(MobEffectInstance.class,"ambient");visible=field(MobEffectInstance.class,"visible");icon=field(MobEffectInstance.class,"showIcon");hidden=field(MobEffectInstance.class,"hiddenEffect");blend=field(MobEffectInstance.class,"blendState");factor=field(blend.getType(),"factor");previous=field(blend.getType(),"factorPreviousFrame");Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var enriched=new PrintWriter(Files.newBufferedWriter(dir.resolve("inputs-"+args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();active=d;d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.random=new RandomSource[2];for(int i=0;i<2;i++){long seed=d.f.getAsJsonArray("seeds").get(i).getAsLong();d.random[i]=d.f.get("xor").getAsBoolean()?new XoroshiroRandomSource(seed):RandomSource.create(seed);}var hashes=new JsonArray();var identities=new JsonArray();for(var hash:d.f.getAsJsonArray("hashes")){var h=Holder.<MobEffect>direct(new Effect(d.keys.size(),hash.getAsInt()));d.keys.add(h);hashes.add(h.hashCode());identities.add(System.identityHashCode(h));}d.f.add("hashes",hashes);d.f.add("identities",identities);enriched.println(d.f);d.actor=make(Actor.class);d.actor.d=d;d.other=make(net.minecraft.world.entity.decoration.ArmorStand.class);activeEffects.set(d.actor,new HashMap<Holder<MobEffect>,MobEffectInstance>());d.levels=new EffectLevel[2];for(int i=0;i<2;i++){d.levels[i]=make(EffectLevel.class);d.levels[i].d=d;d.levels[i].id=i;}var states=d.config().getAsJsonArray("states");d.pool=new MobEffectInstance[states.size()];for(int i=0;i<d.pool.length;i++){var v=states.get(i).getAsJsonObject();int h=n(v,"hidden");d.pool[i]=new MobEffectInstance(d.keys.get(n(v,"key")),n(v,"duration"),n(v,"amplifier"),v.get("ambient").getAsBoolean(),v.get("visible").getAsBoolean(),v.get("icon").getAsBoolean(),h<0?null:d.pool[h]);}d.reset();for(var op:d.f.getAsJsonArray("setup"))d.raw(op.getAsJsonObject());d.all(); + for(var value:d.f.getAsJsonArray("ops")){var op=value.getAsJsonObject();int a=n(op,"a"),b=n(op,"b"),source=n(op,"source");Entity src=source<0?null:source==0?d.actor:d.other;String result="ok";try{switch(op.get("op").getAsString()){ + case "apply-status","remove-status","clear-status","sound"->{var list=op.getAsJsonArray("list");ConsumeEffect effect;switch(op.get("op").getAsString()){ + case "apply-status"->{var selected=new ArrayList<MobEffectInstance>();for(var v:list)selected.add(d.pool[v.getAsInt()]);effect=new ApplyStatusEffectsConsumeEffect(selected,fl(op,"probability"));} + case "remove-status"->{var selected=new ArrayList<Holder<MobEffect>>();for(var v:list)selected.add(d.keys.get(v.getAsInt()));effect=new RemoveStatusEffectsConsumeEffect(HolderSet.direct(selected));} + case "clear-status"->effect=ClearAllStatusEffectsConsumeEffect.INSTANCE; + default->effect=new PlaySoundConsumeEffect(Holder.direct(n(op,"sound")==0?SoundEvents.GENERIC_EAT.value():SoundEvents.PLAYER_BURP)); + }result=Boolean.toString(effect.apply(d.levels[n(op,"level")],ItemStack.EMPTY,d.actor));} + case "add"->result=Boolean.toString(d.actor.addEffect(d.pool[a],src));case "force"->d.actor.forceAddEffect(d.pool[a],src);case "remove"->result=Boolean.toString(d.actor.removeEffect(d.keys.get(a)));case "remove-raw"->{var e=d.actor.removeEffectNoUpdate(d.keys.get(a));result=e==null?"none":Integer.toString(d.id(e));}case "all"->result=Boolean.toString(d.actor.removeAllEffects());case "has"->result=Boolean.toString(d.actor.hasEffect(d.keys.get(a)));case "get"->{var e=d.actor.getEffect(d.keys.get(a));result=e==null?"none":Integer.toString(d.id(e));}case "blend"->result=Long.toString(bits(d.actor.getEffectBlendFactor(d.keys.get(a),fl(op,"partial"))));case "put","drop","clear","copy","alias"->d.raw(op);default->throw new AssertionError(); + }}catch(Stop e){result="callback";}out.println("result "+result);d.all();} + for(int i=0;i<2;i++)out.println("random "+i+" "+d.random[i].nextLong()+" "+d.random[i].nextLong()); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredEffectAttributesOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredEffectAttributesOracle.java new file mode 100644 index 000000000..43bb050aa --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredEffectAttributesOracle.java @@ -0,0 +1,112 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.Holder; +import net.minecraft.resources.Identifier; +import net.minecraft.world.effect.*; +import net.minecraft.world.entity.ai.attributes.*; + +/** Real AttributeMap/Supplier allocation, modifier application and dirty queues. */ +public final class VanillaStoredEffectAttributesOracle { + static Field mapField, dirty, cached; + static Method modified; + static Constructor<AttributeSupplier> supplierConstructor; + static Field field(Class<?> c, String name) throws Exception { var f=c.getDeclaredField(name); f.setAccessible(true); return f; } + static double number(JsonElement v) { return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16)); } + static String bits(double v) { return String.format("%016x",Double.doubleToLongBits(v)); } + static final class Stop extends RuntimeException {} + static final class Basic extends Attribute { + Data d; int id, hash; + Basic(Data d,int id,int hash) { super("horizon.fixture",d.defaults[id]); this.d=d; this.id=id; this.hash=hash; } + @Override public int hashCode() { return hash; } + @Override public double getDefaultValue() { if(d.op!=null)d.event("default "+id); return d.defaults[id]; } + @Override public boolean isClientSyncable() { d.event("syncable "+id); return d.syncable[id]; } + } + static final class Effect extends MobEffect { Effect() { super(MobEffectCategory.BENEFICIAL,0); } } + record Template(Identifier id,double amount,AttributeModifier.Operation operation) {} + static final class Attrs extends AttributeMap { + Data d; + Attrs(Data d,AttributeSupplier supplier) { super(supplier); this.d=d; } + @Override public AttributeInstance getInstance(Holder<Attribute> h) { d.event("get "+d.keyDesc(h)); return super.getInstance(h); } + } + static final class Data { + List<Holder<Attribute>> keys=new ArrayList<>(); List<Template> templates=new ArrayList<>(); + List<AttributeInstance> instances=new ArrayList<>(); List<AttributeModifier> modifiers=new ArrayList<>(); + IdentityHashMap<AttributeInstance,Integer> ids=new IdentityHashMap<>(); + double[] defaults; boolean[] syncable; Attrs attributes; Map<Holder<Attribute>,AttributeInstance> map; + Effect effect=new Effect(); JsonObject op; int calls; boolean changed; PrintWriter out; + Holder<Attribute> key(JsonObject op) { int id=op.get("key").getAsInt(); return id<0?null:keys.get(id); } + String keyDesc(Holder<Attribute> k) { return k==null?"null":Integer.toString(keys.indexOf(k)); } + AttributeInstance handle(int id) { return id<0?null:instances.get(id); } + void track(AttributeInstance a) { if(a!=null&&!ids.containsKey(a)){ids.put(a,instances.size());instances.add(a);} } + String reference(AttributeInstance a) { return a==null?"null":Integer.toString(ids.get(a)); } + String refs(Collection<AttributeModifier> mods) { + var result=new StringJoiner(","); + for(var m:mods){int id=-1;for(int i=0;i<modifiers.size();i++)if(modifiers.get(i)==m){id=i;break;}if(id<0){id=modifiers.size();modifiers.add(m);} + result.add(id+":"+m.id()+":"+bits(m.amount())+":"+m.operation().ordinal());} + return result.toString(); + } + void state() { + map.values().forEach(this::track); attributes.getAttributesToUpdate().forEach(this::track); attributes.getAttributesToSync().forEach(this::track); + out.println("state "+calls+" "+changed); + var entries=new StringJoiner(",");map.forEach((k,a)->entries.add(keyDesc(k)+"="+reference(a)));out.println("map "+entries); + var updates=new StringJoiner(",");attributes.getAttributesToUpdate().forEach(a->updates.add(reference(a)));out.println("updates "+updates); + var sync=new StringJoiner(",");attributes.getAttributesToSync().forEach(a->sync.add(reference(a)));out.println("sync "+sync); + try{for(int id=0;id<instances.size();id++){var a=instances.get(id);out.println("instance "+id+" "+keyDesc(a.getAttribute())+" "+bits(a.getBaseValue())+" "+dirty.getBoolean(a)+" "+bits(cached.getDouble(a))+" | "+refs(a.getModifiers())+" | "+refs(a.getPermanentModifiers()));}} + catch(IllegalAccessException e){throw new AssertionError(e);} + } + void raw(JsonObject op) { + switch(op.get("op").getAsString()) { + case "put"->map.put(key(op),handle(op.get("instance").getAsInt())); + case "drop"->map.remove(key(op)); case "clear"->map.clear(); + case "queue-add","queue-drop","queue-clear"->{var h=handle(op.get("instance").getAsInt());var set=op.get("target").getAsInt()==0?attributes.getAttributesToUpdate():attributes.getAttributesToSync();switch(op.get("op").getAsString()){case "queue-add"->set.add(h);case "queue-drop"->set.remove(h);default->set.clear();}} + case "syncable"->syncable[op.get("key").getAsInt()]=op.get("flag").getAsBoolean(); + case "default"->defaults[op.get("key").getAsInt()]=number(op.get("value")); + default->throw new AssertionError(); + } + } + void event(String name) { + int call=calls++;out.println("event "+call+" "+name);state(); + if(call==op.get("fail").getAsInt())throw new Stop(); + if(call==op.get("mutate").getAsInt()){changed=true;for(var a:op.getAsJsonArray("mutations"))raw(a.getAsJsonObject());} + } + } + @SuppressWarnings("unchecked") + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + dirty=field(AttributeInstance.class,"dirty");cached=field(AttributeInstance.class,"cachedValue");mapField=field(AttributeMap.class,"attributes"); + modified=AttributeMap.class.getDeclaredMethod("onAttributeModified",AttributeInstance.class);modified.setAccessible(true); + supplierConstructor=AttributeSupplier.class.getDeclaredConstructor(Map.class);supplierConstructor.setAccessible(true); + Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"))); + var enriched=new PrintWriter(Files.newBufferedWriter(dir.resolve("inputs-"+args[0]+".txt"))); + var lines=Files.lines(dir.resolve("inputs.txt"))) { + for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.out=out;int n=f.getAsJsonArray("hashes").size(); + d.defaults=new double[n];d.syncable=new boolean[n];for(int i=0;i<n;i++){d.defaults[i]=number(f.getAsJsonArray("defaults").get(i));d.syncable[i]=f.getAsJsonArray("syncable").get(i).getAsBoolean();} + int componentsHash=Holder.direct(new Basic(d,0,0)).hashCode(); + for(int i=0;i<n;i++){int hash=f.getAsJsonArray("hashes").get(i).getAsInt();var key=Holder.<Attribute>direct(new Basic(d,i,(hash-componentsHash)*0xbdef7bdf));if(key.hashCode()!=hash)throw new AssertionError("holder hash");d.keys.add(key);} + var prototypes=new HashMap<Holder<Attribute>,AttributeInstance>(); + for(int i=0;i<n;i++){var base=f.getAsJsonArray("bases").get(i);if(!base.isJsonNull()){var a=new AttributeInstance(d.keys.get(i),ignored->{});a.setBaseValue(number(base));prototypes.put(d.keys.get(i),a);}} + d.attributes=new Attrs(d,supplierConstructor.newInstance(prototypes));d.map=(Map<Holder<Attribute>,AttributeInstance>)mapField.get(d.attributes); + for(var tv:f.getAsJsonArray("templates")){var t=tv.getAsJsonObject();d.templates.add(new Template(Identifier.parse(t.get("id").getAsString()),number(t.get("amount")),AttributeModifier.Operation.values()[t.get("operation").getAsInt()]));} + for(var ov:f.getAsJsonArray("definitions")){var op=ov.getAsJsonObject();var t=d.templates.get(op.get("template").getAsInt());d.effect.addAttributeModifier(d.key(op),t.id(),t.amount(),t.operation());} + for(var ov:f.getAsJsonArray("ops")){d.op=ov.getAsJsonObject();d.calls=0;d.changed=false;String result="ok"; + try{switch(d.op.get("op").getAsString()){ + case "get"->{var a=d.attributes.getInstance(d.key(d.op));d.track(a);result=d.reference(a);} + case "lookup"->result=d.reference(d.map.get(d.key(d.op))); + case "add"->d.effect.addAttributeModifiers(d.attributes,d.op.get("amplifier").getAsInt()); + case "remove"->d.effect.removeAttributeModifiers(d.attributes); + case "modified"->{try{modified.invoke(d.attributes,d.handle(d.op.get("instance").getAsInt()));}catch(InvocationTargetException e){if(e.getCause() instanceof RuntimeException x)throw x;throw new AssertionError(e.getCause());}} + case "value"->result=bits(d.handle(d.op.get("instance").getAsInt()).getValue()); + default->d.raw(d.op); + }}catch(Stop e){result="callback";}catch(NullPointerException e){result="null";}catch(IndexOutOfBoundsException e){result="bounds";}catch(IllegalArgumentException e){result="duplicate";} + out.println("result "+result);d.state(); + } + var hashes=new JsonArray();for(var a:d.instances)hashes.add(System.identityHashCode(a));f.add("instance_hashes",hashes);enriched.println(f); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredEffectNotificationsOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredEffectNotificationsOracle.java new file mode 100644 index 000000000..d2b5fce21 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredEffectNotificationsOracle.java @@ -0,0 +1,69 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.Holder;import net.minecraft.resources.Identifier;import net.minecraft.world.effect.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.ai.attributes.*;import net.minecraft.world.level.Level;import net.minecraft.server.level.ServerLevel;import com.google.common.collect.ImmutableList; +import static dev.horizonlab.parity.VanillaStoredEffectAttributesOracle.*; +/** Actual entity notifications using supplier-created instances and real dirty queues. */ +public final class VanillaStoredEffectNotificationsOracle { + static Object unsafe;static Method allocate,refresh;static Field effectDirty; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand { + Data d;EffectLevel level;Actor(){super(null,null);} + @Override public Level level(){d.event("level");return level;} + @Override public AttributeMap getAttributes(){d.event("attributes");return d.attributes;} + @Override protected void onAttributeUpdated(Holder<Attribute> h){d.event("updated "+d.keyDesc(h));} + void added(MobEffectInstance e){super.onEffectAdded(e,null);} + void updated(MobEffectInstance e,boolean reapply){super.onEffectUpdated(e,reapply,null);} + void removed(List<MobEffectInstance> es){super.onEffectsRemoved(es);} + } + static final class EffectLevel extends ServerLevel { + Data d;EffectLevel(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public boolean isClientSide(){d.event("client");return d.op.has("client")&&d.op.get("client").getAsBoolean();} + } + @SuppressWarnings("unchecked") + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + effectDirty=field(LivingEntity.class,"effectsDirty"); + refresh=LivingEntity.class.getDeclaredMethod("refreshDirtyAttributes");refresh.setAccessible(true); + var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class); + var passengers=field(Entity.class,"passengers"); + dirty=field(AttributeInstance.class,"dirty");cached=field(AttributeInstance.class,"cachedValue");mapField=field(AttributeMap.class,"attributes"); + modified=AttributeMap.class.getDeclaredMethod("onAttributeModified",AttributeInstance.class);modified.setAccessible(true); + supplierConstructor=AttributeSupplier.class.getDeclaredConstructor(Map.class);supplierConstructor.setAccessible(true); + Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"))); + var enriched=new PrintWriter(Files.newBufferedWriter(dir.resolve("inputs-"+args[0]+".txt"))); + var lines=Files.lines(dir.resolve("inputs.txt"))) { + for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.out=out;int n=f.getAsJsonArray("hashes").size(); + d.defaults=new double[n];d.syncable=new boolean[n];for(int i=0;i<n;i++){d.defaults[i]=number(f.getAsJsonArray("defaults").get(i));d.syncable[i]=f.getAsJsonArray("syncable").get(i).getAsBoolean();} + int componentsHash=Holder.direct(new Basic(d,0,0)).hashCode(); + for(int i=0;i<n;i++){int hash=f.getAsJsonArray("hashes").get(i).getAsInt();var key=Holder.<Attribute>direct(new Basic(d,i,(hash-componentsHash)*0xbdef7bdf));if(key.hashCode()!=hash)throw new AssertionError("holder hash");d.keys.add(key);} + var prototypes=new HashMap<Holder<Attribute>,AttributeInstance>(); + for(int i=0;i<n;i++){var base=f.getAsJsonArray("bases").get(i);if(!base.isJsonNull()){var a=new AttributeInstance(d.keys.get(i),ignored->{});a.setBaseValue(number(base));prototypes.put(d.keys.get(i),a);}} + d.attributes=new Attrs(d,supplierConstructor.newInstance(prototypes));d.map=(Map<Holder<Attribute>,AttributeInstance>)mapField.get(d.attributes); + for(var tv:f.getAsJsonArray("templates")){var t=tv.getAsJsonObject();d.templates.add(new Template(Identifier.parse(t.get("id").getAsString()),number(t.get("amount")),AttributeModifier.Operation.values()[t.get("operation").getAsInt()]));} + for(var ov:f.getAsJsonArray("definitions")){var op=ov.getAsJsonObject();var t=d.templates.get(op.get("template").getAsInt());d.effect.addAttributeModifier(d.key(op),t.id(),t.amount(),t.operation());} + var actor=make(Actor.class);actor.d=d;actor.level=make(EffectLevel.class);actor.level.d=d; + effectDirty.setBoolean(actor,true);passengers.set(actor,ImmutableList.of()); + var effect=Holder.<MobEffect>direct(d.effect); + for(var ov:f.getAsJsonArray("ops")){d.op=ov.getAsJsonObject();d.calls=0;d.changed=false;String result="ok"; + try{switch(d.op.get("op").getAsString()){ + case "dirty"->effectDirty.setBoolean(actor,d.op.get("flag").getAsBoolean()); + case "notify-add"->actor.added(new MobEffectInstance(effect,200,d.op.get("amplifier").getAsInt())); + case "notify-update"->actor.updated(new MobEffectInstance(effect,200,d.op.get("amplifier").getAsInt()),d.op.get("reapply").getAsBoolean()); + case "notify-remove"->actor.removed(Collections.nCopies(d.op.get("count").getAsInt(),new MobEffectInstance(effect,200,d.op.get("amplifier").getAsInt()))); + case "refresh"->{try{refresh.invoke(actor);}catch(InvocationTargetException e){if(e.getCause() instanceof RuntimeException x)throw x;throw new AssertionError(e.getCause());}} + case "get"->{var a=d.attributes.getInstance(d.key(d.op));d.track(a);result=d.reference(a);} + case "lookup"->result=d.reference(d.map.get(d.key(d.op))); + case "add"->d.effect.addAttributeModifiers(d.attributes,d.op.get("amplifier").getAsInt()); + case "remove"->d.effect.removeAttributeModifiers(d.attributes); + case "modified"->{try{modified.invoke(d.attributes,d.handle(d.op.get("instance").getAsInt()));}catch(InvocationTargetException e){if(e.getCause() instanceof RuntimeException x)throw x;throw new AssertionError(e.getCause());}} + case "value"->result=bits(d.handle(d.op.get("instance").getAsInt()).getValue()); + default->d.raw(d.op); + }}catch(Stop e){result="callback";}catch(NullPointerException e){result="null";}catch(IndexOutOfBoundsException e){result="bounds";}catch(IllegalArgumentException e){result="duplicate";} + out.println("result "+result);out.println("effect-dirty "+effectDirty.getBoolean(actor));d.state(); + } + var hashes=new JsonArray();for(var a:d.instances)hashes.add(System.identityHashCode(a));f.add("instance_hashes",hashes);enriched.println(f); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStructureBlockExporter.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStructureBlockExporter.java new file mode 100644 index 000000000..0e37d5cda --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStructureBlockExporter.java @@ -0,0 +1,40 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import net.minecraft.SharedConstants; +import net.minecraft.core.BlockPos; +import net.minecraft.server.Bootstrap; +import net.minecraft.world.RandomizableContainer; +import net.minecraft.world.level.EmptyBlockGetter; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.BlockState; + +/** + * Original exporter of per-state structure-template behavior: BlockState.rotate + * and BlockState.mirror results, StructureTemplate's full-block ordering class + * and whether the state's block entity is a RandomizableContainer. + */ +public final class VanillaStructureBlockExporter { + public static void main(String[] args) throws Exception { + SharedConstants.tryDetectVersion();Bootstrap.bootStrap(); + var rotate=new JsonArray();var mirror=new JsonArray();var full=new JsonArray();var loot=new JsonArray(); + Rotation[] rotations={Rotation.CLOCKWISE_90,Rotation.CLOCKWISE_180,Rotation.COUNTERCLOCKWISE_90}; + Mirror[] mirrors={Mirror.LEFT_RIGHT,Mirror.FRONT_BACK}; + for(BlockState state:Block.BLOCK_STATE_REGISTRY) { + var r=new JsonArray();for(var rotation:rotations)r.add(Block.getId(state.rotate(rotation)));rotate.add(r); + var m=new JsonArray();for(var value:mirrors)m.add(Block.getId(state.mirror(value)));mirror.add(m); + full.add(!state.getBlock().hasDynamicShape()&&state.isCollisionShapeFullBlock(EmptyBlockGetter.INSTANCE,BlockPos.ZERO)); + boolean container=false; + if(state.getBlock() instanceof EntityBlock entityBlock) { + try{container=entityBlock.newBlockEntity(BlockPos.ZERO,state) instanceof RandomizableContainer;}catch(Throwable ignored){} + } + if(container)loot.add(Block.getId(state)); + } + var result=new JsonObject(); + result.addProperty("states",Block.BLOCK_STATE_REGISTRY.size()); + result.add("rotate",rotate);result.add("mirror",mirror);result.add("full_block",full);result.add("loot_containers",loot); + Files.writeString(Path.of(args[0]),new Gson().toJson(result),StandardCharsets.UTF_8); + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStructureDensityOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStructureDensityOracle.java new file mode 100644 index 000000000..3d4795e54 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStructureDensityOracle.java @@ -0,0 +1,38 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.world.level.levelgen.Beardifier; +import net.minecraft.world.level.levelgen.densityfunction.*; +import net.minecraft.world.level.levelgen.structure.*; +import net.minecraft.world.level.levelgen.structure.pools.*; + +/** Original transport for vanilla's structure-density sampler. */ +public final class VanillaStructureDensityOracle { + private static BoundingBox box(JsonElement e) { + if(e.isJsonNull())return null;var a=e.getAsJsonArray();return new BoundingBox(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt(),a.get(3).getAsInt(),a.get(4).getAsInt(),a.get(5).getAsInt()); + } + private static String bits(float value) {return Integer.toUnsignedString(Float.floatToIntBits(value),16);} + private static void fixture(JsonObject f,PrintWriter out) { + var pieces=new ArrayList<Beardifier.Rigid>();var junctions=new ArrayList<JigsawJunction>(); + for(var e:f.getAsJsonArray("pieces")) {var a=e.getAsJsonArray();pieces.add(new Beardifier.Rigid(box(a.get(0)),TerrainAdjustment.valueOf(a.get(1).getAsString()),a.get(2).getAsInt()));} + for(var e:f.getAsJsonArray("junctions")) {var a=e.getAsJsonArray();junctions.add(new JigsawJunction(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt(),0,StructureTemplatePool.Projection.RIGID));} + var sampler=new Beardifier(pieces,junctions,box(f.get("affected")));var context=SamplerContext.builder().build(); + out.println("beardifier "+pieces.size()+" "+junctions.size()); + for(var e:f.getAsJsonArray("points")) {var a=e.getAsJsonArray();out.println("value "+bits(sampler.sampleValue(context,a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt())));} + for(var e:f.getAsJsonArray("volumes")) { + var a=e.getAsJsonArray();var volume=new DensityVolume(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt(),a.get(3).getAsInt(),a.get(4).getAsInt(),a.get(5).getAsInt(),a.get(6).getAsInt(),a.get(7).getAsInt(),a.get(8).getAsInt()); + var buffer=DensityBuffer.createUnpooled(volume.size()+a.get(9).getAsInt());buffer.fill(-123.5f); + sampler.sampleVolume(context,buffer,volume);out.println("volume "+buffer.size()); + for(int i=0;i<buffer.size();i++)out.println(bits(buffer.get(i))); + } + } + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + try(var out=new PrintWriter(Files.newBufferedWriter(Path.of(args[1]),StandardCharsets.UTF_8))) { + for(String line:Files.readAllLines(Path.of(args[0])))fixture(JsonParser.parseString(line).getAsJsonObject(),out); + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStructureStartOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStructureStartOracle.java new file mode 100644 index 000000000..87e2a4466 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStructureStartOracle.java @@ -0,0 +1,114 @@ +package dev.horizonlab.parity; + +import java.io.PrintWriter; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.SharedConstants; +import net.minecraft.core.*; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.RegistryDataLoader; +import net.minecraft.server.Bootstrap; +import net.minecraft.server.RegistryLayer; +import net.minecraft.server.packs.PackType; +import net.minecraft.server.packs.repository.ServerPacksSource; +import net.minecraft.server.packs.resources.MultiPackResourceManager; +import net.minecraft.tags.TagLoader; +import net.minecraft.util.datafix.DataFixers; +import net.minecraft.world.level.ChunkPos; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelHeightAccessor; +import net.minecraft.world.level.biome.MultiNoiseBiomeSource; +import net.minecraft.world.level.biome.MultiNoiseBiomeSourceParameterLists; +import net.minecraft.world.level.chunk.ChunkGeneratorStructureState; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.structure.*; +import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager; +import net.minecraft.world.level.storage.LevelStorageSource; + +/** + * Original oracle: runs vanilla structure placement checks, start selection + * and Structure.generate (as ChunkGenerator.createStructures does for a fresh + * chunk) for a rectangle of overworld chunks and prints every valid start. + */ +public final class VanillaStructureStartOracle { + public static void main(String[] args) throws Exception { + SharedConstants.tryDetectVersion();Bootstrap.bootStrap(); + Path out=Path.of(args[0]);long seed=Long.parseLong(args[1]); + int x0=Integer.parseInt(args[2]),z0=Integer.parseInt(args[3]),x1=Integer.parseInt(args[4]),z1=Integer.parseInt(args[5]); + var repo=ServerPacksSource.createVanillaTrustedRepository();repo.reload();repo.setSelected(List.of("vanilla")); + var resources=new MultiPackResourceManager(PackType.SERVER_DATA,repo.openAllSelected()); + var layers=RegistryLayer.createRegistryAccess(); + var staticTags=TagLoader.loadTagsForExistingRegistries(resources,layers.getLayer(RegistryLayer.STATIC)); + var context=TagLoader.buildUpdatedLookups(layers.getAccessForLoading(RegistryLayer.WORLD),staticTags); + RegistryAccess.Frozen world=RegistryDataLoader.load(resources,context,RegistryDataLoader.WORLD_REGISTRIES,Runnable::run).join(); + staticTags.forEach(Registry.PendingTags::apply); + RegistryAccess access=layers.replaceFrom(RegistryLayer.WORLD,world).compositeAccess(); + var settings=world.lookupOrThrow(Registries.NOISE_SETTINGS).getOrThrow(NoiseGeneratorSettings.OVERWORLD); + var randomState=RandomState.create(world.lookupOrThrow(Registries.NOISE),seed,settings.value()); + var biomeSource=MultiNoiseBiomeSource.createFromPreset(world.lookupOrThrow(Registries.MULTI_NOISE_BIOME_SOURCE_PARAMETER_LIST).getOrThrow(MultiNoiseBiomeSourceParameterLists.OVERWORLD)); + var generator=new NoiseBasedChunkGenerator(biomeSource,settings); + var state=ChunkGeneratorStructureState.createForNormal(randomState,seed,new ChunkPos(0,0),biomeSource,world.lookupOrThrow(Registries.STRUCTURE_SET)); + Path tmp=Files.createTempDirectory("horizon-structures"); + var storage=LevelStorageSource.createDefault(tmp).createAccess("oracle"); + var templates=new StructureTemplateManager(resources,storage,DataFixers.getDataFixer(),BuiltInRegistries.BLOCK); + LevelHeightAccessor height=LevelHeightAccessor.create(-64,384); + var climate=randomState.createClimateSampler(net.minecraft.world.level.levelgen.densityfunction.SamplerContext.builder().enableCaches().build()); + var structures=world.lookupOrThrow(Registries.STRUCTURE); + try(var w=new PrintWriter(Files.newBufferedWriter(out,StandardCharsets.UTF_8))) { + structures.listElements().forEach(h->w.println("registry "+h.key().identifier()+" "+h.value().step().ordinal())); + if(System.getenv("HORIZON_RINGS")!=null)for(var set:state.possibleStructureSets()) + if(set.value().placement() instanceof net.minecraft.world.level.levelgen.structure.placement.ConcentricRingsStructurePlacement rings) + for(var p:state.getRingPositionsFor(rings))w.println("ring "+set.unwrapKey().get().identifier()+" "+p.x()+" "+p.z()); + if(System.getenv("HORIZON_HEIGHTS")!=null)for(String p:System.getenv("HORIZON_HEIGHTS").split(";")){ + String[] xz=p.split(",");int x=Integer.parseInt(xz[0]),z=Integer.parseInt(xz[1]); + int floor=generator.getBaseHeight(x,z,Heightmap.Types.OCEAN_FLOOR_WG,height,randomState),surface=generator.getBaseHeight(x,z,Heightmap.Types.WORLD_SURFACE_WG,height,randomState); + var resolver=biomeSource.createResolver(climate); + StringBuilder biomes=new StringBuilder(); + for(int qy=(floor-12)>>2;qy<=(floor+8)>>2;qy++)biomes.append(" "+qy+":"+resolver.getNoiseBiome(x>>2,qy,z>>2).unwrapKey().get().identifier().getPath()); + w.println("height "+x+" "+z+" "+floor+" "+surface+biomes); + } + for(int cx=x0;cx<=x1;cx++)for(int cz=z0;cz<=z1;cz++) { + ChunkPos pos=new ChunkPos(cx,cz); + for(var set:state.possibleStructureSets()) { + var placement=set.value().placement();var entries=set.value().structures(); + if(!placement.isStructureChunk(state,cx,cz))continue; + if(System.getenv("HORIZON_PLACED")!=null)w.println("placed "+cx+" "+cz+" "+set.unwrapKey().get().identifier()); + var options=new ArrayList<>(entries); + WorldgenRandom random=new WorldgenRandom(new LegacyRandomSource(0L));random.setLargeFeatureSeed(seed,cx,cz); + int total=0;for(var o:options)total+=o.weight(); + while(!options.isEmpty()) { + StructureSet.StructureSelectionEntry selected;int index=0; + if(entries.size()==1){selected=options.get(0);} + else{int choice=random.nextInt(total);for(var o:options){choice-=o.weight();if(choice<0)break;index++;}selected=options.get(index);} + var structure=selected.structure(); + StructureStart start=structure.value().generate(structure,Level.OVERWORLD,access,generator,biomeSource,climate,randomState,templates,seed,pos,0,height,structure.value().biomes()::contains); + if(System.getenv("HORIZON_PLACED")!=null){ + w.println("generate "+structure.unwrapKey().get().identifier()+" "+start.isValid()); + var ctx=new Structure.GenerationContext(access,generator,biomeSource,climate,randomState,templates,seed,pos,height,structure.value().biomes()::contains); + try{var m=Structure.class.getDeclaredMethod("findGenerationPoint",Structure.GenerationContext.class);m.setAccessible(true); + var stub=(java.util.Optional<?>)m.invoke(structure.value(),ctx); + stub.ifPresent(st->{var sp=((Structure.GenerationStub)st).position();w.println("stub "+sp+" "+ctx.biomeResolver().getNoiseBiome(sp.getX()>>2,sp.getY()>>2,sp.getZ()>>2).unwrapKey().get().identifier());});}catch(Exception e){w.println("err "+e);} + } + if(start.isValid()) { + var b=start.getBoundingBox(); + w.println("start "+cx+" "+cz+" "+structure.unwrapKey().get().identifier()+" "+b.minX()+" "+b.minY()+" "+b.minZ()+" "+b.maxX()+" "+b.maxY()+" "+b.maxZ()+" "+start.getPieces().size()); + for(var piece:start.getPieces()) { + var pb=piece.getBoundingBox(); + String extra=""; + if(piece instanceof PoolElementStructurePiece pool)extra=" "+pool.getPosition().getX()+" "+pool.getPosition().getY()+" "+pool.getPosition().getZ()+" "+pool.getRotation()+" "+pool.getGroundLevelDelta()+" "+pool.getJunctions().size()+" "+pool.getElement(); + w.println("piece "+BuiltInRegistries.STRUCTURE_PIECE.getKey(piece.getType())+" "+pb.minX()+" "+pb.minY()+" "+pb.minZ()+" "+pb.maxX()+" "+pb.maxY()+" "+pb.maxZ()+extra); + } + break; + } + if(entries.size()==1)break; + options.remove(index);total-=selected.weight(); + } + } + } + } + storage.close(); + System.exit(0); + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java new file mode 100644 index 000000000..550500319 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java @@ -0,0 +1,68 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.tags.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.entity.*; +import net.minecraft.world.level.block.piston.PistonMovingBlockEntity; +import net.minecraft.world.level.block.state.*; +/** Native suffocation predicates, tag rebinding, cursor flags and traced block entities. */ +public final class VanillaSuffocationOracle { + static final class Stop extends RuntimeException {} + static Object field(Class<?> type,String name,Object instance)throws Exception{var f=type.getDeclaredField(name);f.setAccessible(true);return f.get(instance);} + static void definitions(Path dir)throws Exception { + var defaults=field(BlockBehaviour.Properties.class,"isSuffocating",BlockBehaviour.Properties.of()); + var piston=field(Blocks.class,"NOT_EXTENDED_PISTON",null);var shulker=field(Blocks.class,"NOT_CLOSED_SHULKER",null); + var predicate=BlockBehaviour.BlockStateBase.class.getDeclaredField("isSuffocating");predicate.setAccessible(true); + var rejecting=(BlockGetter)Proxy.newProxyInstance(BlockGetter.class.getClassLoader(),new Class<?>[]{BlockGetter.class},(p,m,v)->{throw new AssertionError("unexpected constant predicate query: "+m);}); + var result=new TreeMap<String,String>(); + for(var state:Block.BLOCK_STATE_REGISTRY){ + var selected=predicate.get(state);String rule; + if(selected==defaults)rule="tagged_full";else if(selected==piston)rule="not_extended";else if(selected==shulker)rule="closed_shulker"; + else { + Boolean constant=null; + for(var p:new BlockPos[]{BlockPos.ZERO,new BlockPos(17,-64,-33),new BlockPos(Integer.MIN_VALUE,Integer.MAX_VALUE,-1)}){ + boolean value=state.isSuffocating(rejecting,p);if(constant!=null&&value!=constant)throw new AssertionError("position-dependent suffocation override");constant=value; + } + rule=constant?"always":"never"; + } + String name=BuiltInRegistries.BLOCK.getKey(state.getBlock()).toString();var previous=result.put(name,rule);if(previous!=null&&!previous.equals(rule))throw new AssertionError("unclassified state-dependent predicate: "+name); + } + Files.writeString(dir.resolve("definitions.json"),new Gson().toJson(result)); + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject()); + if(args[0].equals("export")){ + VanillaCollisionOracle.main(new String[]{"generate",args[1]});VanillaBlockStateCodecOracle.main(new String[]{"export",dir.resolve("facts.json").toString()});definitions(dir);return; + } + var registry=BuiltInRegistries.BLOCK;var natural=new ArrayList<Holder<Block>>();var all=new ArrayList<Holder<Block>>(); + for(var block:registry){var holder=block.builtInRegistryHolder();all.add(holder);if(block.defaultBlockState().is(BlockTags.CAUSES_SUFFOCATION))natural.add(holder);} + var allocator=Class.forName("sun.misc.Unsafe");var access=allocator.getDeclaredField("theUnsafe");access.setAccessible(true);var unsafe=access.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + var animation=ShulkerBoxBlockEntity.class.getDeclaredField("animationStatus");animation.setAccessible(true);int activeTag=-1; + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){ + for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();int tag=f.get("tags").getAsInt(); + if(activeTag!=tag){List<Holder<Block>> members=tag==0?natural:tag==1?List.of():all;registry.prepareTagReload(new TagLoader.LoadResult<>(Registries.BLOCK,Map.of(BlockTags.CAUSES_SUFFOCATION,members))).apply();activeTag=tag;} + var state=Block.stateById(f.get("state").getAsInt());var xyz=f.getAsJsonArray("position");var p=new BlockPos(xyz.get(0).getAsInt(),xyz.get(1).getAsInt(),xyz.get(2).getAsInt());String mode=f.get("entity").getAsString();Object entity=null; + if(mode.equals("other"))entity=allocate.invoke(unsafe,PistonMovingBlockEntity.class); + else if(!mode.equals("none")){ + entity=allocate.invoke(unsafe,ShulkerBoxBlockEntity.class);Object status=null;for(var value:animation.getType().getEnumConstants())if(((Enum<?>)value).name().equals(mode.toUpperCase(Locale.ROOT)))status=value;if(status==null)throw new AssertionError(mode);animation.set(entity,status); + } + Object selected=entity;int[] calls={0}; + var world=(BlockGetter)Proxy.newProxyInstance(BlockGetter.class.getClassLoader(),new Class<?>[]{BlockGetter.class},(proxy,method,values)->{ + if(!method.getName().equals("getBlockEntity"))throw new AssertionError(method);var at=(BlockPos)values[0];out.println("entity "+at.getX()+" "+at.getY()+" "+at.getZ());if(calls[0]++==f.get("fail").getAsInt())throw new Stop();return selected; + }); + out.println("metadata "+Block.getId(state)+" "+state.hasLargeCollisionShape()+" "+state.is(Blocks.MOVING_PISTON)); + try{out.println("suffocating "+state.isSuffocating(world,p));}catch(Stop error){out.println("suffocating error");} + out.println("queries "+calls[0]); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSwimmingOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSwimmingOracle.java new file mode 100644 index 000000000..8ed5b5401 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSwimmingOracle.java @@ -0,0 +1,37 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.registries.*;import net.minecraft.tags.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.*;import net.minecraft.world.level.*;import net.minecraft.world.level.material.*; +/** Actual Entity/Player swimming transitions and fluid status queries. */ +public final class VanillaSwimmingOracle { + static final class Stop extends RuntimeException {} + static Field eye,position,abilities,eyeHeight; + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static String pos(BlockPos p){return p.getX()+" "+p.getY()+" "+p.getZ();} + static final class Data {JsonObject f;PrintWriter out;Entity entity;int calls;boolean swimming,water,sprint,passenger; + void query(String s){out.println(s);int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt()){swimming=!swimming;water=!water;sprint=!sprint;passenger=!passenger;try{eye.setBoolean(entity,!eye.getBoolean(entity));position.set(entity,new BlockPos(31,32,33));}catch(Exception e){throw new AssertionError(e);}}} + boolean swimming(){query("swimming");return swimming;}boolean water(){query("water");return water;}boolean sprint(){query("sprint");return sprint;}boolean passenger(){query("passenger");return passenger;} + void set(boolean v){query("set "+v);swimming=v;} + } + static final class World extends net.minecraft.server.level.ServerLevel {Data d;FluidState fluid;World(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public FluidState getFluidState(BlockPos p){d.query("fluid "+pos(p));return fluid;} + } + static final class Actor extends Marker {Data d;Actor(){super(null,null);} + @Override public boolean isSwimming(){return d.swimming();}@Override public boolean isInWater(){return d.water();}@Override public boolean isSprinting(){return d.sprint();}@Override public boolean isPassenger(){return d.passenger();} + @Override public boolean isUnderWater(){d.query("under");return super.isUnderWater();}@Override public void setSwimming(boolean v){d.set(v);} + } + static final class Human extends Player {Data d;Human(){super(null,null);} + @Override public GameType gameMode(){return GameType.SURVIVAL;} + @Override public boolean isSwimming(){return d.swimming();}@Override public boolean isInWater(){return d.water();}@Override public boolean isSprinting(){return d.sprint();}@Override public boolean isPassenger(){return d.passenger();} + @Override public boolean isUnderWater(){d.query("under");return super.isUnderWater();}@Override public void setSwimming(boolean v){d.set(v);} + } + static Field field(Class<?> c,String name)throws Exception{var f=c.getDeclaredField(name);f.setAccessible(true);return f;} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");var unsafe=field(u,"theUnsafe").get(null);var allocate=u.getMethod("allocateInstance",Class.class);eye=field(Entity.class,"wasEyeInWater");position=field(Entity.class,"blockPosition");abilities=field(Player.class,"abilities");eyeHeight=field(Entity.class,"eyeHeight");var level=field(Entity.class,"level");Fluid[] fluids={Fluids.EMPTY,Fluids.FLOWING_WATER,Fluids.WATER,Fluids.FLOWING_LAVA,Fluids.LAVA};int oldMask=-1;Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();int mask=f.get("water_mask").getAsInt();if(oldMask!=mask){var members=new ArrayList<Holder<Fluid>>();for(int i=0;i<5;i++)if((mask&(1<<i))!=0)members.add(fluids[i].builtInRegistryHolder());BuiltInRegistries.FLUID.prepareTagReload(new TagLoader.LoadResult<>(Registries.FLUID,Map.of(FluidTags.WATER,members))).apply();oldMask=mask;} + var d=new Data();d.f=f;d.out=out;d.swimming=f.get("swimming").getAsBoolean();d.water=f.get("water").getAsBoolean();d.sprint=f.get("sprint").getAsBoolean();d.passenger=f.get("passenger").getAsBoolean();if(f.get("player").getAsBoolean()){var h=(Human)allocate.invoke(unsafe,Human.class);h.d=d;var a=new Abilities();a.flying=f.get("flying").getAsBoolean();abilities.set(h,a);d.entity=h;}else{var a=(Actor)allocate.invoke(unsafe,Actor.class);a.d=d;d.entity=a;} + var w=(World)allocate.invoke(unsafe,World.class);w.d=d;w.fluid=fluids[f.get("fluid").getAsInt()].defaultFluidState();level.set(d.entity,w);position.set(d.entity,new BlockPos(17,-64,-33));eye.setBoolean(d.entity,f.get("eye").getAsBoolean());eyeHeight.setFloat(d.entity,single(f.get("eye_height"))); + try{switch(f.get("mode").getAsString()){case "update":d.entity.updateSwimming();out.println("result ok");break;case "under":out.println("result "+d.entity.isUnderWater());break;case "shallow":out.println("result "+d.entity.isInShallowWater());break;case "threshold":out.printf("threshold %016x%n",Double.doubleToLongBits(d.entity.getFluidJumpThreshold()));break;default:throw new AssertionError();}}catch(Stop e){out.println("error");} + out.println("final "+d.swimming+" "+eye.getBoolean(d.entity)+" "+pos((BlockPos)position.get(d.entity)));out.println("queries "+d.calls); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSyncedBytesOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSyncedBytesOracle.java new file mode 100644 index 000000000..b3b54e26b --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSyncedBytesOracle.java @@ -0,0 +1,40 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.nio.file.*;import java.util.*; +import net.minecraft.network.syncher.*; +/** Native multi-byte dirty/default lists, assignment and reentrant callbacks. */ +public final class VanillaSyncedBytesOracle { + static final class Stop extends RuntimeException {} + static byte single(JsonElement v){return (byte)Integer.parseUnsignedInt(v.getAsString(),16);} + static String bits(byte v){return String.format("%02x",Byte.toUnsignedInt(v));} + static String values(List<SynchedEntityData.DataValue<?>> list){if(list==null)return "none";var s=new StringJoiner(",");for(var v:list)s.add(v.id()+":"+bits((Byte)v.value()));return s.length()==0?"empty":s.toString();} + static EntityDataAccessor<Byte> key(int id){return new EntityDataAccessor<Byte>(id,EntityDataSerializers.BYTE);} + static List<SynchedEntityData.DataValue<?>> values(JsonArray values){var result=new ArrayList<SynchedEntityData.DataValue<?>>();for(var x:values){var v=x.getAsJsonObject();result.add(new SynchedEntityData.DataValue<Byte>(v.get("id").getAsInt(),EntityDataSerializers.BYTE,single(v.get("value"))));}return result;} + static final class Holder extends net.minecraft.world.entity.decoration.ArmorStand { + Holder(){super(null,null);} + void flag(int mask,boolean value){super.setLivingEntityFlag(mask,value);} + + SynchedEntityData data;SynchedEntityData.DataItem<?>[] items;JsonObject op;PrintWriter out;int calls;boolean nested; + void event(String s){out.println(s);if(calls++==op.get("fail").getAsInt())throw new Stop();} + @Override public void onSyncedDataUpdated(EntityDataAccessor<?> key){int id=key.id();event("updated "+id+" "+bits((Byte)items[id].getValue())+" "+data.isDirty()+" "+items[id].isDirty());if(nested)return;nested=true;try{switch(op.get("hook").getAsString()){ + case "flag":flag(op.get("mask").getAsInt(),op.get("flag").getAsBoolean());break;case "none":break;case "pack":out.println("callback-pack "+values(data.packDirty()));break; + case "set":data.set(key(op.get("other").getAsInt()),single(op.get("other_value")),op.get("other_force").getAsBoolean());break; + case "assign":data.assignValues(List.of(new SynchedEntityData.DataValue<Byte>(op.get("other").getAsInt(),EntityDataSerializers.BYTE,single(op.get("other_value")))));break; + default:throw new AssertionError();}}finally{nested=false;}} + @Override public void onSyncedDataUpdated(List<SynchedEntityData.DataValue<?>> values){event("assigned "+values(values));} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var ctor=SynchedEntityData.class.getDeclaredConstructor(SyncedDataHolder.class,SynchedEntityData.DataItem[].class);ctor.setAccessible(true);var u=Class.forName("sun.misc.Unsafe");var uf=u.getDeclaredField("theUnsafe");uf.setAccessible(true);var unsafe=uf.get(null);var allocate=u.getMethod("allocateInstance",Class.class);var storage=net.minecraft.world.entity.Entity.class.getDeclaredField("entityData");storage.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var holder=(Holder)allocate.invoke(unsafe,Holder.class);holder.out=out;var initial=f.getAsJsonArray("initial");var ids=new ArrayList<Integer>();int max=-1;for(var v:initial){int id=v.getAsJsonObject().get("id").getAsInt();ids.add(id);max=Math.max(max,id);}Collections.sort(ids);holder.items=new SynchedEntityData.DataItem<?>[max+1];for(int i=0;i<=max;i++)holder.items[i]=new SynchedEntityData.DataItem<Byte>(key(i),(byte)0);for(var v:initial){var e=v.getAsJsonObject();int id=e.get("id").getAsInt();holder.items[id]=new SynchedEntityData.DataItem<Byte>(key(id),single(e.get("value")));}holder.data=ctor.newInstance(holder,holder.items);storage.set(holder,holder.data); + for(var v:f.getAsJsonArray("ops")){var op=v.getAsJsonObject();holder.op=op;holder.calls=0;try{switch(op.get("mode").getAsString()){ + case "flag":holder.flag(op.get("mask").getAsInt(),op.get("flag").getAsBoolean());break; + case "set":holder.data.set(key(op.get("id").getAsInt()),single(op.get("value")),op.get("force").getAsBoolean());break; + case "get":out.println("get "+bits(holder.data.get(key(op.get("id").getAsInt()))));break; + case "assign":holder.data.assignValues(values(op.getAsJsonArray("values")));break; + case "pack":out.println("packed "+values(holder.data.packDirty()));break; + case "defaults":out.println("defaults "+values(holder.data.getNonDefaultValues()));break; + default:throw new AssertionError();}out.println("result ok");}catch(Stop e){out.println("error observer");}catch(IndexOutOfBoundsException e){out.println("error id");} + out.println("dirty "+holder.data.isDirty());for(int id:ids){var e=holder.items[id];out.println("state "+id+" "+bits((Byte)e.getValue())+" "+e.isDirty()+" "+e.isSetToDefault());}out.println("calls "+holder.calls);out.println("flags "+holder.isUsingItem()+" "+holder.getUsedItemHand().ordinal()); + } + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSyncedFloatsOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSyncedFloatsOracle.java new file mode 100644 index 000000000..761801c0f --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSyncedFloatsOracle.java @@ -0,0 +1,36 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.nio.file.*;import java.util.*; +import net.minecraft.network.syncher.*; +/** Native multi-float dirty/default lists, assignment and reentrant callbacks. */ +public final class VanillaSyncedFloatsOracle { + static final class Stop extends RuntimeException {} + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static String bits(float v){return String.format("%08x",Float.floatToIntBits(v));} + static String values(List<SynchedEntityData.DataValue<?>> list){if(list==null)return "none";var s=new StringJoiner(",");for(var v:list)s.add(v.id()+":"+bits((Float)v.value()));return s.length()==0?"empty":s.toString();} + static EntityDataAccessor<Float> key(int id){return new EntityDataAccessor<Float>(id,EntityDataSerializers.FLOAT);} + static List<SynchedEntityData.DataValue<?>> values(JsonArray values){var result=new ArrayList<SynchedEntityData.DataValue<?>>();for(var x:values){var v=x.getAsJsonObject();result.add(new SynchedEntityData.DataValue<Float>(v.get("id").getAsInt(),EntityDataSerializers.FLOAT,single(v.get("value"))));}return result;} + static final class Holder implements SyncedDataHolder { + SynchedEntityData data;SynchedEntityData.DataItem<?>[] items;JsonObject op;PrintWriter out;int calls;boolean nested; + void event(String s){out.println(s);if(calls++==op.get("fail").getAsInt())throw new Stop();} + @Override public void onSyncedDataUpdated(EntityDataAccessor<?> key){int id=key.id();event("updated "+id+" "+bits((Float)items[id].getValue())+" "+data.isDirty()+" "+items[id].isDirty());if(nested)return;nested=true;try{switch(op.get("hook").getAsString()){ + case "none":break;case "pack":out.println("callback-pack "+values(data.packDirty()));break; + case "set":data.set(key(op.get("other").getAsInt()),single(op.get("other_value")),op.get("other_force").getAsBoolean());break; + case "assign":data.assignValues(List.of(new SynchedEntityData.DataValue<Float>(op.get("other").getAsInt(),EntityDataSerializers.FLOAT,single(op.get("other_value")))));break; + default:throw new AssertionError();}}finally{nested=false;}} + @Override public void onSyncedDataUpdated(List<SynchedEntityData.DataValue<?>> values){event("assigned "+values(values));} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var ctor=SynchedEntityData.class.getDeclaredConstructor(SyncedDataHolder.class,SynchedEntityData.DataItem[].class);ctor.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var holder=new Holder();holder.out=out;var initial=f.getAsJsonArray("initial");var ids=new ArrayList<Integer>();int max=-1;for(var v:initial){int id=v.getAsJsonObject().get("id").getAsInt();ids.add(id);max=Math.max(max,id);}Collections.sort(ids);holder.items=new SynchedEntityData.DataItem<?>[max+1];for(int i=0;i<=max;i++)holder.items[i]=new SynchedEntityData.DataItem<Float>(key(i),0f);for(var v:initial){var e=v.getAsJsonObject();int id=e.get("id").getAsInt();holder.items[id]=new SynchedEntityData.DataItem<Float>(key(id),single(e.get("value")));}holder.data=ctor.newInstance(holder,holder.items); + for(var v:f.getAsJsonArray("ops")){var op=v.getAsJsonObject();holder.op=op;holder.calls=0;try{switch(op.get("mode").getAsString()){ + case "set":holder.data.set(key(op.get("id").getAsInt()),single(op.get("value")),op.get("force").getAsBoolean());break; + case "get":out.println("get "+bits(holder.data.get(key(op.get("id").getAsInt()))));break; + case "assign":holder.data.assignValues(values(op.getAsJsonArray("values")));break; + case "pack":out.println("packed "+values(holder.data.packDirty()));break; + case "defaults":out.println("defaults "+values(holder.data.getNonDefaultValues()));break; + default:throw new AssertionError();}out.println("result ok");}catch(Stop e){out.println("error observer");}catch(IndexOutOfBoundsException e){out.println("error id");} + out.println("dirty "+holder.data.isDirty());for(int id:ids){var e=holder.items[id];out.println("state "+id+" "+bits((Float)e.getValue())+" "+e.isDirty()+" "+e.isSetToDefault());}out.println("calls "+holder.calls); + } + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTagExport.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTagExport.java new file mode 100644 index 000000000..169ed0ccc --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTagExport.java @@ -0,0 +1,12 @@ +package dev.horizonlab.parity; + +/** Original export of block identifiers, used solely as tag lookup inputs. */ +public final class VanillaTagExport { + public static void main(String[] paths) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion(); + net.minecraft.server.Bootstrap.bootStrap(); + var names=new java.util.TreeMap<String,String>(); + for(var id:net.minecraft.core.registries.BuiltInRegistries.BLOCK.keySet())names.put(id.toString(),id.toString()); + java.nio.file.Files.writeString(java.nio.file.Path.of(paths[0]),new com.google.gson.Gson().toJson(names),java.nio.charset.StandardCharsets.UTF_8); + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTeleportConsumeOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTeleportConsumeOracle.java new file mode 100644 index 000000000..751a799b8 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTeleportConsumeOracle.java @@ -0,0 +1,53 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.world.item.consume_effects.TeleportRandomlyConsumeEffect;import net.minecraft.world.item.ItemStack;import net.minecraft.core.*;import net.minecraft.world.entity.*;import net.minecraft.world.level.block.Block;import net.minecraft.tags.*;import net.minecraft.world.level.gameevent.GameEvent;import net.minecraft.server.level.ServerLevel;import net.minecraft.sounds.*;import net.minecraft.util.RandomSource;import net.minecraft.world.level.levelgen.XoroshiroRandomSource;import net.minecraft.world.phys.Vec3; +/** Actual random teleport consumption with controlled destination service. */ +public final class VanillaTeleportConsumeOracle { + static Object unsafe;static Method allocate;static Field position,grace,impact; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static int n(JsonObject v,String k){return v.get(k).getAsInt();} + static float fl(JsonObject v,String k){return Float.intBitsToFloat((int)v.get(k).getAsLong());} + static String bits(double v){return Long.toUnsignedString(Double.doubleToLongBits(v));} + static final class Stop extends RuntimeException{} + static final class Data {JsonObject f;PrintWriter out;RandomSource[] random;LivingEntity actor;boolean changed,riding;int calls,attempts; + JsonObject config(){return f.getAsJsonObject(changed?"after":"initial");} + void setPosition(Vec3 p){try{position.set(actor,p);}catch(Exception e){throw new AssertionError(e);}} + Vec3 position(){try{return (Vec3)position.get(actor);}catch(Exception e){throw new AssertionError(e);}} + void reset(){try{var c=config();var p=c.getAsJsonArray("position");setPosition(new Vec3(p.get(0).getAsDouble(),p.get(1).getAsDouble(),p.get(2).getAsDouble()));actor.fallDistance=c.get("fall").getAsDouble();grace.setInt(actor,n(c,"grace"));impact.set(actor,c.get("impact").getAsBoolean()?new Vec3(1,2,3):null);riding=c.get("riding").getAsBoolean();if(c.get("reseed").getAsBoolean())for(int i=0;i<2;i++)random[i].setSeed(c.getAsJsonArray("seeds").get(i).getAsLong());}catch(Exception e){throw new AssertionError(e);}} + void all(){try{var p=position();out.println("state "+calls+" "+attempts+" "+changed+" "+riding+" "+bits(p.x)+" "+bits(p.y)+" "+bits(p.z)+" "+bits(actor.fallDistance)+" "+grace.getInt(actor)+" "+(impact.get(actor)!=null));}catch(Exception e){throw new AssertionError(e);}} + void event(String name){out.println("event "+name);int i=calls++;all();if(i==n(f,"fail"))throw new Stop();if(i==n(f,"mutate")){changed=true;reset();}} + } + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Data d;Actor(){super(null,null);} + + @Override public RandomSource getRandom(){d.event("random");return d.random[n(d.config(),"random")];} + @Override public boolean isPassenger(){d.event("passenger");return d.riding;} + @Override public void stopRiding(){d.event("dismount");d.riding=false;} + @Override public Vec3 position(){d.event("position");return d.position();} + @Override public boolean randomTeleport(double x,double y,double z,boolean particles,TagKey<Block> tag){if(!particles||tag!=BlockTags.CONSUMABLE_DOES_NOT_TELEPORT_TO)throw new AssertionError();int i=d.attempts++;d.event("teleport "+bits(x)+" "+bits(y)+" "+bits(z));int at=n(d.config(),"success_at");boolean success=at>=0&&i>=at;if(d.config().get("move").getAsBoolean())d.setPosition(new Vec3(x,y,z));return success;} + @Override public BlockPos blockPosition(){d.event("block");return BlockPos.containing(d.position());} + @Override public void resetFallDistance(){d.event("fall");super.resetFallDistance();} + @Override public void resetCurrentImpulseContext(){d.event("impulse");super.resetCurrentImpulseContext();} +} + static final class FoxActor extends net.minecraft.world.entity.animal.fox.Fox {Data d;FoxActor(){super(null,null);} + + @Override public RandomSource getRandom(){d.event("random");return d.random[n(d.config(),"random")];} + @Override public boolean isPassenger(){d.event("passenger");return d.riding;} + @Override public void stopRiding(){d.event("dismount");d.riding=false;} + @Override public Vec3 position(){d.event("position");return d.position();} + @Override public boolean randomTeleport(double x,double y,double z,boolean particles,TagKey<Block> tag){if(!particles||tag!=BlockTags.CONSUMABLE_DOES_NOT_TELEPORT_TO)throw new AssertionError();int i=d.attempts++;d.event("teleport "+bits(x)+" "+bits(y)+" "+bits(z));int at=n(d.config(),"success_at");boolean success=at>=0&&i>=at;if(d.config().get("move").getAsBoolean())d.setPosition(new Vec3(x,y,z));return success;} + @Override public BlockPos blockPosition(){d.event("block");return BlockPos.containing(d.position());} + @Override public void resetFallDistance(){d.event("fall");super.resetFallDistance();} + @Override public void resetCurrentImpulseContext(){d.event("impulse");super.resetCurrentImpulseContext();} +} + static final class TeleportLevel extends ServerLevel {Data d;int id;TeleportLevel(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public int getMinY(){d.event("min "+id);return n(d.config(),"min");} + @Override public int getLogicalHeight(){d.event("height "+id);return n(d.config(),"height");} + @Override public void gameEvent(Holder<GameEvent> event,Vec3 p,GameEvent.Context context){if(event!=GameEvent.TELEPORT||context.sourceEntity()!=d.actor)throw new AssertionError();d.event("game-event "+id+" "+bits(p.x)+" "+bits(p.y)+" "+bits(p.z));} + @Override public void playSound(Entity excluded,double x,double y,double z,SoundEvent sound,SoundSource category){boolean fox=d.actor instanceof net.minecraft.world.entity.animal.fox.Fox;if(excluded!=null||sound!=(fox?SoundEvents.FOX_TELEPORT:SoundEvents.CHORUS_FRUIT_TELEPORT)||category!=(fox?SoundSource.NEUTRAL:SoundSource.PLAYERS))throw new AssertionError();d.event("sound "+id+" "+fox+" "+bits(x)+" "+bits(y)+" "+bits(z));} + @Override public void levelEvent(int event,BlockPos p,int data){if(event!=2017)throw new AssertionError();d.event("level-event "+id+" "+p.getX()+" "+p.getY()+" "+p.getZ()+" "+data);} + } + public static void main(String[] args)throws Exception{net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);position=field(Entity.class,"position");grace=field(LivingEntity.class,"currentImpulseContextResetGraceTime");impact=field(LivingEntity.class,"currentImpulseImpactPos");Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.random=new RandomSource[2];for(int i=0;i<2;i++){long seed=d.f.getAsJsonArray("seeds").get(i).getAsLong();d.random[i]=d.f.get("xor").getAsBoolean()?new XoroshiroRandomSource(seed):RandomSource.create(seed);}if(d.f.get("fox").getAsBoolean()){var a=make(FoxActor.class);a.d=d;d.actor=a;}else{var a=make(Actor.class);a.d=d;d.actor=a;}var level=make(TeleportLevel.class);level.d=d;level.id=n(d.f,"level");d.reset();d.all();var effect=new TeleportRandomlyConsumeEffect(fl(d.f,"diameter"),d.f.get("directional").getAsBoolean());try{out.println("result "+effect.apply(level,ItemStack.EMPTY,d.actor));}catch(Stop e){out.println("result callback");}d.all();for(int i=0;i<2;i++)out.println("random "+i+" "+d.random[i].nextLong()+" "+d.random[i].nextLong());} + }} +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTerrainOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTerrainOracle.java new file mode 100644 index 000000000..13fb2de3a --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTerrainOracle.java @@ -0,0 +1,110 @@ +package dev.horizonlab.parity; + +import com.google.gson.*; +import com.mojang.serialization.*; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import java.util.*; +import net.minecraft.SharedConstants; +import net.minecraft.server.Bootstrap; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.resources.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.blending.Blender; +import net.minecraft.world.level.levelgen.densityfunction.*; +import net.minecraft.world.level.levelgen.material.rule.MaterialRule; +import net.minecraft.world.level.levelgen.synth.NormalNoise; + +/** Original transport invoking NoiseChunk and the actual generator fill routine. */ +public final class VanillaTerrainOracle { + private static MappedRegistry<NormalNoise> noises; + private static RegistryOps<JsonElement> ops; + private static Holder<Biome> biome; + private static PalettedContainerFactory factory; + @SuppressWarnings("unchecked") + private static void load(JsonObject bundle) { + noises=new MappedRegistry<>(Registries.NOISE,Lifecycle.stable()); + var densities=new MappedRegistry<DensityFunction>(Registries.DENSITY_FUNCTION,Lifecycle.stable()); + var noiseLookup=noises.createRegistrationLookup();var densityLookup=densities.createRegistrationLookup(); + ops=RegistryOps.create(JsonOps.INSTANCE,new RegistryOps.RegistryInfoLookup() { + public <T> Optional<HolderGetter<T>> lookup(ResourceKey<? extends Registry<? extends T>> key) { + if(key.equals(Registries.NOISE))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(noiseLookup); + if(key.equals(Registries.DENSITY_FUNCTION))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(densityLookup); + return Optional.empty(); + } + }); + for(var e:bundle.getAsJsonObject("noises").entrySet())noises.register(ResourceKey.create(Registries.NOISE,Identifier.parse(e.getKey())),NormalNoise.DIRECT_CODEC.parse(ops,JsonParser.parseString(e.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN); + noises.freeze(); + for(var e:bundle.getAsJsonObject("densities").entrySet())densities.register(ResourceKey.create(Registries.DENSITY_FUNCTION,Identifier.parse(e.getKey())),DensityFunctions.DIRECT_CODEC.parse(ops,JsonParser.parseString(e.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN); + densities.freeze(); + VanillaHeightmapOracle.bindTags(bundle.getAsJsonObject("tags")); + biome=Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},Biomes.PLAINS); + var ids=new IdMapper<Holder<Biome>>();ids.add(biome); + factory=new PalettedContainerFactory(Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY),Blocks.AIR.defaultBlockState(),null,Strategy.createForBiomes(ids),biome,null); + } + private static Beardifier structure(JsonObject f) { + if(!f.has("structure"))return Beardifier.EMPTY; + var source=f.getAsJsonObject("structure"); + var pieces=new ArrayList<Beardifier.Rigid>(); + var junctions=new ArrayList<net.minecraft.world.level.levelgen.structure.pools.JigsawJunction>(); + java.util.function.Function<JsonElement,net.minecraft.world.level.levelgen.structure.BoundingBox> box=e->{var a=e.getAsJsonArray();return new net.minecraft.world.level.levelgen.structure.BoundingBox(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt(),a.get(3).getAsInt(),a.get(4).getAsInt(),a.get(5).getAsInt());}; + for(var e:source.getAsJsonArray("pieces")) {var a=e.getAsJsonArray();pieces.add(new Beardifier.Rigid(box.apply(a.get(0)),net.minecraft.world.level.levelgen.structure.TerrainAdjustment.valueOf(a.get(1).getAsString()),a.get(2).getAsInt()));} + for(var e:source.getAsJsonArray("junctions")) {var a=e.getAsJsonArray();junctions.add(new net.minecraft.world.level.levelgen.structure.pools.JigsawJunction(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt(),0,net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool.Projection.RIGID));} + return new Beardifier(pieces,junctions,box.apply(source.get("affected"))); + } + private static void fixture(JsonObject f,PrintWriter out) throws Exception { + int min=f.get("min").getAsInt(),height=f.get("height").getAsInt(),noiseMin=f.get("noise_min").getAsInt(),noiseHeight=f.get("noise_height").getAsInt(); + int cx=f.get("cx").getAsInt(),cz=f.get("cz").getAsInt(),sea=f.get("sea").getAsInt();long seed=f.get("seed").getAsLong();boolean legacy=f.get("legacy").getAsBoolean(); + var block=Block.stateById(f.get("block").getAsInt());var fluid=Block.stateById(f.get("fluid").getAsInt()); + var router=NoiseRouter.CODEC.parse(ops,f.get("router")).getOrThrow(); + Optional<Aquifer.Config> config=f.get("aquifers").isJsonNull()?Optional.empty():Optional.of(Aquifer.Config.CODEC.parse(ops,f.get("aquifers")).getOrThrow()); + // Neither material rules nor biome properties are evaluated by doFill. + var rule=Holder.Reference.createStandAlone(new HolderOwner<MaterialRule>(){},ResourceKey.create(Registries.MATERIAL_RULE,Identifier.parse("horizon:unused"))); + var settings=new NoiseGeneratorSettings(NoiseSettings.create(noiseMin,noiseHeight),block,fluid,router,rule,List.of(),sea,false,config,legacy,NoiseGeneratorSettings.DebugFunctions.EMPTY); + var state=RandomState.create(noises,seed,legacy,block,sea,router); + var generator=new NoiseBasedChunkGenerator(new FixedBiomeSource(biome),Holder.direct(settings)); + var pickerMethod=NoiseBasedChunkGenerator.class.getDeclaredMethod("createFluidPicker",NoiseGeneratorSettings.class);pickerMethod.setAccessible(true); + var picker=(Aquifer.FluidPicker)pickerMethod.invoke(null,settings); + var volume=new DensityVolume(16,noiseHeight,16,cx<<4,noiseMin,cz<<4,1,1,1); + var chunk=new ProtoChunk(new ChunkPos(cx,cz),UpgradeData.EMPTY,LevelHeightAccessor.create(min,height),factory,null); + for(var item:f.getAsJsonArray("initial")) { + var a=item.getAsJsonArray();int x=a.get(0).getAsInt(),y=a.get(1).getAsInt(),z=a.get(2).getAsInt(); + chunk.getSection(chunk.getSectionIndex(y)).setBlockState(x&15,y&15,z&15,Block.stateById(a.get(3).getAsInt()),false); + } + var fill=NoiseBasedChunkGenerator.class.getDeclaredMethod("doFill",NoiseChunk.class,ChunkAccess.class);fill.setAccessible(true); + out.println("chunk "+cx+" "+cz+" "+min+" "+height); + try(var noise=new NoiseChunk(state,structure(f),settings,picker,Blender.empty(),volume)) { + for(int repeat=0;repeat<f.get("repeats").getAsInt();repeat++) { + fill.invoke(generator,noise,chunk); + out.println("fill "+repeat+" "+noise.aquifer().shouldScheduleFluidUpdate()); + for(int section=0;section<height/16;section++) { + var data=chunk.getSection(section);out.println("section "+section); + for(int y=0;y<16;y++)for(int z=0;z<16;z++)for(int x=0;x<16;x++)out.println(Block.getId(data.getBlockState(x,y,z))); + } + for(var type:new Heightmap.Types[]{Heightmap.Types.OCEAN_FLOOR_WG,Heightmap.Types.WORLD_SURFACE_WG}) { + var map=chunk.getOrCreateHeightmapUnprimed(type);out.println("heightmap "+type); + for(long word:map.getRawData())out.println(Long.toUnsignedString(word,16)); + } + var offsets=chunk.getPostProcessing(); + for(int section=0;section<offsets.length;section++) { + var list=offsets[section];out.println("post "+section+" "+(list==null?0:list.size())); + if(list!=null)for(short offset:list)out.println(Short.toUnsignedInt(offset)); + } + } + } + } + public static void main(String[] args) throws Exception { + SharedConstants.tryDetectVersion();Bootstrap.bootStrap(); + if(SharedConstants.DEBUG_AQUIFERS || SharedConstants.DEBUG_DISABLE_FLUID_GENERATION)throw new AssertionError("regular gameplay flags required"); + Path dir=Path.of(args[1]);load(JsonParser.parseString(Files.readString(dir.resolve("registries.json"))).getAsJsonObject()); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(String line:Files.readAllLines(dir.resolve("inputs.txt")))fixture(JsonParser.parseString(line).getAsJsonObject(),out); + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTickDataOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTickDataOracle.java new file mode 100644 index 000000000..5f4faa618 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTickDataOracle.java @@ -0,0 +1,90 @@ +package dev.horizonlab.parity; + +import com.mojang.serialization.Codec; +import java.io.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.SharedConstants; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Registry; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.nbt.*; +import net.minecraft.server.Bootstrap; +import net.minecraft.world.level.ChunkPos; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.chunk.storage.RegionFile; +import net.minecraft.world.level.chunk.storage.RegionStorageInfo; +import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.Fluids; +import net.minecraft.world.ticks.*; + +/** Original adapter for actual block/fluid SavedTick codecs and region persistence. */ +public final class VanillaTickDataOracle { + static { SharedConstants.tryDetectVersion(); Bootstrap.bootStrap(); } + private static final ChunkPos POS = new ChunkPos(0, 0); + private static final Codec<List<SavedTick<Block>>> BLOCKS = SavedTick.codec(BuiltInRegistries.BLOCK.byNameCodec()).listOf(); + private static final Codec<List<SavedTick<Fluid>>> FLUIDS = SavedTick.codec(BuiltInRegistries.FLUID.byNameCodec()).listOf(); + private static <T> List<SavedTick<T>> samples(List<T> types) { + List<SavedTick<T>> ticks = new ArrayList<>(); + int[] delays = {Integer.MIN_VALUE, -1, 0, 1, 100, Integer.MAX_VALUE}; + for (int i = 0; i < 256; i++) { + SavedTick<T> tick = new SavedTick<>(types.get(i % types.size()), new BlockPos((i & 15) + (i % 17 == 0 ? 16 : 0), (i % 9 - 4) * 16, (i >>> 4) & 15), delays[i % delays.length], TickPriority.byValue(i % 11 - 5)); + ticks.add(tick); + if (i % 23 == 0) ticks.add(tick); + } + return ticks; + } + private static <T> CompoundTag ids(List<T> types, Registry<T> registry) { + CompoundTag tag = new CompoundTag(); + for (T type : types) tag.putInt(registry.getKey(type).toString(), registry.getId(type)); + return tag; + } + private static <T> Tag encode(Codec<List<SavedTick<T>>> codec, List<SavedTick<T>> ticks) { return codec.encodeStart(NbtOps.INSTANCE, ticks).getOrThrow(); } + private static <T> List<SavedTick<T>> changed(Codec<List<SavedTick<T>>> codec, Tag input, long time) { + List<SavedTick<T>> saved = SavedTick.filterTickListForChunk(codec.parse(NbtOps.INSTANCE, input).getOrThrow(), POS); + LevelChunkTicks<T> ticks = new LevelChunkTicks<>(saved); + ticks.unpack(time); + ScheduledTick<T> first = ticks.poll(); + if (first != null) ticks.schedule(new ScheduledTick<>(first.type(), first.pos(), time + 123, TickPriority.HIGH, 77)); + return ticks.pack(time); + } + private static void generate(Path base) throws Exception { + List<Block> blocks = List.of(Blocks.STONE, Blocks.OAK_LOG, Blocks.REPEATER, Blocks.WATER, Blocks.CHEST, Blocks.REDSTONE_WIRE); + List<Fluid> fluids = List.of(Fluids.EMPTY, Fluids.WATER, Fluids.FLOWING_WATER, Fluids.LAVA, Fluids.FLOWING_LAVA); + CompoundTag root = new CompoundTag(); + root.putInt("DataVersion", 5023); root.putInt("xPos", 0); root.putInt("zPos", 0); root.put("sections", new ListTag()); + root.put("block_ticks", encode(BLOCKS, samples(blocks))); root.put("fluid_ticks", encode(FLUIDS, samples(fluids))); + for (String field : List.of("block_ticks", "fluid_ticks")) { + ListTag list = (ListTag) root.get(field); + CompoundTag a = (CompoundTag) list.get(3), b = (CompoundTag) list.get(4), c = (CompoundTag) list.get(5); + a.putLong("t", Long.MAX_VALUE); a.putFloat("p", Float.NaN); + b.putDouble("t", Double.POSITIVE_INFINITY); b.putShort("p", (short) 999); b.putByte("y", (byte) -7); + c.putDouble("x", 4.75); c.putDouble("p", Double.NEGATIVE_INFINITY); + } + root.put("block_ids", ids(blocks, BuiltInRegistries.BLOCK)); root.put("fluid_ids", ids(fluids, BuiltInRegistries.FLUID)); + root.putString("unknown-root-data", "preserved through scheduled-tick mutation"); + NbtIo.write(root, base.resolve("ticks-input.nbt")); + } + private static void verify(Path base) throws Exception { + CompoundTag original = NbtIo.read(base.resolve("ticks-input.nbt")); + List<SavedTick<Block>> blocks = changed(BLOCKS, original.get("block_ticks"), 1000); + List<SavedTick<Fluid>> fluids = changed(FLUIDS, original.get("fluid_ticks"), Long.MAX_VALUE - 8); + CompoundTag expected = original.copy(); + expected.put("block_ticks", encode(BLOCKS, blocks)); expected.put("fluid_ticks", encode(FLUIDS, fluids)); + CompoundTag actual = NbtIo.read(base.resolve("ticks-output.nbt")); + if (!actual.equals(expected)) throw new AssertionError("Rust saved tick NBT differs from vanilla"); + Path regionPath = base.resolve("tick-region/r.0.0.mca"); + RegionStorageInfo info = new RegionStorageInfo("horizon-tick-fixture", Level.OVERWORLD, "chunk"); + try (RegionFile region = new RegionFile(info, regionPath, regionPath.getParent(), false); + DataInputStream input = region.getChunkDataInputStream(POS)) { + if (input == null || !NbtIo.read(input).equals(expected)) throw new AssertionError("Rust region tick data differs from vanilla"); + } + System.out.printf("HORIZON_TICK_DATA_RESULT {\"block_ticks\":%d,\"fluid_ticks\":%d,\"region_chunks\":1}%n", blocks.size(), fluids.size()); + } + public static void main(String[] args) throws Exception { + Path base = Path.of(args[1]); + switch (args[0]) { case "generate" -> generate(base); case "verify" -> verify(base); default -> throw new AssertionError("unknown mode"); } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTickOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTickOracle.java new file mode 100644 index 000000000..9ccf17050 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTickOracle.java @@ -0,0 +1,109 @@ +package dev.horizonlab.parity; + +import java.io.*; +import java.lang.reflect.Field; +import java.nio.file.*; +import java.util.*; +import net.minecraft.SharedConstants; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Vec3i; +import net.minecraft.world.level.ChunkPos; +import net.minecraft.world.level.levelgen.structure.BoundingBox; +import net.minecraft.world.ticks.*; + +/** Original trace adapter; queues, ordering, mutations and save packing are vanilla. */ +public final class VanillaTickOracle { + private static final Object[] TYPES = new Object[32]; + static { for (int i = 0; i < TYPES.length; i++) TYPES[i] = new Object(); } + private static final Field ALREADY_RUN; + static { + try { ALREADY_RUN = LevelTicks.class.getDeclaredField("alreadyRunThisTick"); ALREADY_RUN.setAccessible(true); } + catch (ReflectiveOperationException error) { throw new ExceptionInInitializerError(error); } + } + private final Set<Long> blocked = new HashSet<>(); + private final Map<Long, LevelChunkTicks<Object>> chunks = new HashMap<>(); + private final Map<Long, LevelChunkTicks<Object>> detached = new HashMap<>(); + private LevelTicks<Object> level = new LevelTicks<>(key -> !blocked.contains(key)); + private final PrintWriter out; + private VanillaTickOracle(PrintWriter out) { this.out = out; } + private static int type(Object type) { for (int i = 0; i < TYPES.length; i++) if (TYPES[i] == type) return i; throw new AssertionError(); } + private static final class Input { + final String[] words; int cursor = 1; + Input(String line) { words = line.split(" "); } + int integer() { return Integer.parseInt(words[cursor++]); } + long number() { return Long.parseLong(words[cursor++]); } + BlockPos pos() { return new BlockPos(integer(), integer(), integer()); } + ChunkPos chunk() { return new ChunkPos(integer(), integer()); } + BoundingBox area() { BlockPos a = pos(), b = pos(); return new BoundingBox(Math.min(a.getX(), b.getX()), Math.min(a.getY(), b.getY()), Math.min(a.getZ(), b.getZ()), Math.max(a.getX(), b.getX()), Math.max(a.getY(), b.getY()), Math.max(a.getZ(), b.getZ())); } + } + private int schedule(ScheduledTick<Object> tick) { + if (!chunks.containsKey(ChunkPos.pack(tick.pos()))) { level.schedule(tick); return 2; } + boolean duplicate = level.hasScheduledTick(tick.pos(), tick.type()); + level.schedule(tick); + return duplicate ? 0 : 1; + } + private void add(ChunkPos pos, LevelChunkTicks<Object> chunk) { chunks.put(pos.pack(), chunk); level.addContainer(pos, chunk); } + private LevelChunkTicks<Object> remove(ChunkPos pos) { level.removeContainer(pos); return chunks.remove(pos.pack()); } + private void scheduled(ScheduledTick<Object> tick) { out.printf("queued %d %d %d %d %d %d %d%n", type(tick.type()), tick.pos().getX(), tick.pos().getY(), tick.pos().getZ(), tick.triggerTick(), tick.priority().getValue(), tick.subTickOrder()); } + @SuppressWarnings("unchecked") + private ScheduledTick<Object> running() { + try { List<ScheduledTick<Object>> ticks = (List<ScheduledTick<Object>>) ALREADY_RUN.get(level); return ticks.getLast(); } + catch (ReflectiveOperationException error) { throw new AssertionError(error); } + } + private void command(String line, int lineNumber) { + Input in = new Input(line); String operation = in.words[0]; + out.printf("command %d %s%n", lineNumber, operation); + switch (operation) { + case "reset" -> { blocked.clear(); chunks.clear(); detached.clear(); level = new LevelTicks<>(key -> !blocked.contains(key)); } + case "add" -> { ChunkPos pos = in.chunk(); if (!chunks.containsKey(pos.pack())) add(pos, new LevelChunkTicks<>()); } + case "load" -> { + ChunkPos pos = in.chunk(); int count = in.integer(); List<SavedTick<Object>> ticks = new ArrayList<>(); + for (int i = 0; i < count; i++) ticks.add(new SavedTick<>(TYPES[in.integer()], in.pos(), in.integer(), TickPriority.byValue(in.integer()))); + remove(pos); add(pos, new LevelChunkTicks<>(ticks)); + } + case "unpack" -> { ChunkPos pos = in.chunk(); long time = in.number(); LevelChunkTicks<Object> chunk = chunks.get(pos.pack()); if (chunk != null) chunk.unpack(time); } + case "remove" -> { ChunkPos pos = in.chunk(); LevelChunkTicks<Object> chunk = remove(pos); if (chunk != null) detached.put(pos.pack(), chunk); } + case "restore" -> { ChunkPos pos = in.chunk(); if (!chunks.containsKey(pos.pack())) { LevelChunkTicks<Object> chunk = detached.remove(pos.pack()); if (chunk != null) add(pos, chunk); } } + case "enable" -> { ChunkPos pos = in.chunk(); if (in.integer() == 0) blocked.add(pos.pack()); else blocked.remove(pos.pack()); } + case "schedule" -> { ScheduledTick<Object> tick = new ScheduledTick<>(TYPES[in.integer()], in.pos(), in.number(), TickPriority.byValue(in.integer()), in.number()); out.printf("schedule %d%n", schedule(tick)); } + case "query" -> { Object kind = TYPES[in.integer()]; BlockPos pos = in.pos(); out.printf("query %d %d%n", level.hasScheduledTick(pos, kind) ? 1 : 0, level.willTickThisTick(pos, kind) ? 1 : 0); } + case "chunk" -> { LevelChunkTicks<Object> chunk = chunks.get(in.chunk().pack()); if (chunk == null) out.println("chunk absent"); else { out.printf("chunk %d%n", chunk.count()); chunk.getAll().forEach(this::scheduled); } } + case "save" -> { + LevelChunkTicks<Object> chunk = chunks.get(in.chunk().pack()); long time = in.number(); + if (chunk == null) out.println("saved absent"); else { + List<SavedTick<Object>> ticks = chunk.pack(time); out.printf("saved %d%n", ticks.size()); + for (SavedTick<Object> tick : ticks) out.printf("saved-value %d %d %d %d %d %d%n", type(tick.type()), tick.pos().getX(), tick.pos().getY(), tick.pos().getZ(), tick.delay(), tick.priority().getValue()); + } + } + case "reload" -> { ChunkPos pos = in.chunk(); long saveTime = in.number(), loadTime = in.number(); LevelChunkTicks<Object> old = remove(pos); if (old != null) { LevelChunkTicks<Object> chunk = new LevelChunkTicks<>(old.pack(saveTime)); chunk.unpack(loadTime); add(pos, chunk); } } + case "clear" -> level.clearArea(in.area()); + case "copy" -> { BoundingBox area = in.area(); BlockPos offset = in.pos(); level.copyArea(area, new Vec3i(offset.getX(), offset.getY(), offset.getZ())); } + case "tick" -> { + long time = in.number(); int maximum = in.integer(), action = in.integer(); Object probeKind = TYPES[in.integer()]; BlockPos probe = in.pos(); long[] order = {in.number()}; + level.tick(time, maximum, (pos, kind) -> { + ScheduledTick<Object> tick = running(); scheduled(tick); + out.printf("running %d %d %d%n", level.willTickThisTick(pos, kind) ? 1 : 0, level.hasScheduledTick(pos, kind) ? 1 : 0, level.willTickThisTick(probe, probeKind) ? 1 : 0); + switch (action) { + case 1 -> out.printf("callback-schedule %d%n", schedule(new ScheduledTick<>(kind, pos, time, tick.priority(), order[0]++))); + case 2 -> { level.clearArea(new BoundingBox(pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1)); out.printf("callback-clear %d%n", level.willTickThisTick(probe, probeKind) ? 1 : 0); } + case 3 -> level.copyArea(new BoundingBox(pos.getX() - 2, pos.getY() - 2, pos.getZ() - 2, pos.getX() + 2, pos.getY() + 2, pos.getZ() + 2), new Vec3i(16, 0, 0)); + case 4 -> { ChunkPos chunkPos = new ChunkPos(pos.getX() >> 4, pos.getZ() >> 4); LevelChunkTicks<Object> chunk = remove(chunkPos); if (chunk != null) detached.put(chunkPos.pack(), chunk); } + case 5 -> blocked.add(ChunkPos.pack(pos)); + case 0 -> {} + default -> throw new AssertionError("unknown callback action"); + } + }); + } + default -> throw new AssertionError("unknown command: " + operation); + } + if (in.cursor != in.words.length) throw new AssertionError("extra arguments"); + out.printf("count %d%n", level.count()); + } + public static void main(String[] args) throws Exception { + SharedConstants.tryDetectVersion(); + try (BufferedReader input = Files.newBufferedReader(Path.of(args[0])); PrintWriter out = new PrintWriter(Files.newBufferedWriter(Path.of(args[1])))) { + VanillaTickOracle oracle = new VanillaTickOracle(out); String line; int index = 0; + while ((line = input.readLine()) != null) oracle.command(line, index++); + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTreeFeatureOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTreeFeatureOracle.java new file mode 100644 index 000000000..b96d7b70d --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTreeFeatureOracle.java @@ -0,0 +1,178 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.resources.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.*; +import net.minecraft.world.level.biome.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.entity.*; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.chunk.*; +import net.minecraft.world.level.levelgen.*; +import net.minecraft.world.level.levelgen.feature.Feature; +import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider; + +/** + * Actual native tree, fallen-tree and ore features over a layered synthetic + * world backed by proto-chunk sections. Logs ordered level writes, beehive + * occupants, post-processing marks, results, random tails and the final diff. + */ +public final class VanillaTreeFeatureOracle { + private static final int MIN_Y=-64,HEIGHT=384; + private static BlockPos pos(JsonArray a){return new BlockPos(a.get(0).getAsInt(),a.get(1).getAsInt(),a.get(2).getAsInt());} + private static String xyz(BlockPos p){return p.getX()+" "+p.getY()+" "+p.getZ();} + private static final class Chunks { + static final PalettedContainerFactory FACTORY; + static { + Holder<Biome> biome=Holder.Reference.createStandAlone(new HolderOwner<Biome>(){},Biomes.PLAINS); + var ids=new IdMapper<Holder<Biome>>();ids.add(biome); + FACTORY=new PalettedContainerFactory(Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY),Blocks.AIR.defaultBlockState(),null,Strategy.createForBiomes(ids),biome,null); + } + } + /** Shared with the Rust fixture: layered column, pseudo-random holes and obstacles, overrides. */ + static final class Terrain { + final int[][] layers;final int[][] boxes;final int holeMod,holeState,obstacleMod,obstacleState,obstacleMin;final Map<BlockPos,Integer> overrides=new HashMap<>(); + Terrain(JsonObject f){ + var raw=f.getAsJsonArray("layers");layers=new int[raw.size()][];for(int i=0;i<raw.size();i++){var l=raw.get(i).getAsJsonArray();layers[i]=new int[]{l.get(0).getAsInt(),l.get(1).getAsInt()};} + var rawBoxes=f.has("boxes")?f.getAsJsonArray("boxes"):new JsonArray();boxes=new int[rawBoxes.size()][7]; + for(int i=0;i<rawBoxes.size();i++)for(int j=0;j<7;j++)boxes[i][j]=rawBoxes.get(i).getAsJsonArray().get(j).getAsInt(); + holeMod=f.get("hole_mod").getAsInt();holeState=f.get("hole_state").getAsInt();obstacleMod=f.get("obstacle_mod").getAsInt();obstacleState=f.get("obstacle_state").getAsInt();obstacleMin=f.get("obstacle_min").getAsInt(); + for(var e:f.getAsJsonArray("states")){var v=e.getAsJsonArray();overrides.put(pos(v),v.get(3).getAsInt());} + } + static int hash(int x,int y,int z){int h=x*73856093^y*19349663^z*83492791;h^=h>>>13;h*=0x5bd1e995;h^=h>>>15;return h&0x7fffffff;} + int at(int x,int y,int z){ + var o=overrides.get(new BlockPos(x,y,z));if(o!=null)return o; + for(var b:boxes)if(x>=b[0]&&y>=b[1]&&z>=b[2]&&x<=b[3]&&y<=b[4]&&z<=b[5])return b[6]; + int base=-1;for(var l:layers)if(y<=l[0]){base=l[1];break;} + int h=hash(x,y,z); + if(base>=0){if(holeMod>0&&h%holeMod==0)return holeState;return base;} + if(obstacleMod>0&&y>=obstacleMin&&h%obstacleMod==0)return obstacleState; + return Block.getId(Blocks.AIR.defaultBlockState()); + } + } + private static final class World implements InvocationHandler { + final JsonObject f;final PrintWriter out;final Terrain terrain;final Map<ChunkPos,ProtoChunk> chunks=new HashMap<>();final Map<BlockPos,BeehiveBlockEntity> hives=new HashMap<>();final Map<BlockPos,ChestBlockEntity> chests=new HashMap<>();final Map<BlockPos,SpawnerBlockEntity> spawners=new HashMap<>(); + final RandomSource shapeRandom=RandomSource.create(0); + World(JsonObject f,PrintWriter out){this.f=f;this.out=out;this.terrain=new Terrain(f);} + ProtoChunk chunk(int cx,int cz){ + return chunks.computeIfAbsent(new ChunkPos(cx,cz),cp->{ + var chunk=new ProtoChunk(cp,UpgradeData.EMPTY,LevelHeightAccessor.create(MIN_Y,HEIGHT),Chunks.FACTORY,null){ + @Override public void markPosForPostProcessing(BlockPos position){out.println("post "+xyz(position));super.markPosForPostProcessing(position);} + }; + for(int s=0;s<HEIGHT/16;s++){var section=chunk.getSection(s);for(int ly=0;ly<16;ly++)for(int lz=0;lz<16;lz++)for(int lx=0;lx<16;lx++){ + var state=Block.stateById(terrain.at(cx*16+lx,MIN_Y+s*16+ly,cz*16+lz));if(!state.isAir()||!state.is(Blocks.AIR))section.setBlockState(lx,ly,lz,state,false);}} + return chunk; + }); + } + BlockState get(BlockPos p){ + if(p.getY()<MIN_Y||p.getY()>=MIN_Y+HEIGHT)return Blocks.VOID_AIR.defaultBlockState(); + return chunk(p.getX()>>4,p.getZ()>>4).getBlockState(p); + } + public Object invoke(Object proxy,Method method,Object[] args)throws Throwable { + String name=method.getName(); + switch(name){ + case "getBlockState":return get((BlockPos)args[0]); + case "getFluidState":return get((BlockPos)args[0]).getFluidState(); + case "isStateAtPosition":return ((java.util.function.Predicate<BlockState>)args[1]).test(get((BlockPos)args[0])); + case "isFluidAtPosition":return ((java.util.function.Predicate<net.minecraft.world.level.material.FluidState>)args[1]).test(get((BlockPos)args[0]).getFluidState()); + case "getMinY":return MIN_Y; + case "getSeaLevel":return 63; + case "getRawBrightness":case "getMaxLocalRawBrightness":return 15; + case "getBrightness":return 15; + case "getSeed":return f.get("world_seed").getAsLong(); + case "ensureCanWrite":return true; + case "getRandom":return shapeRandom; + case "scheduleTick":return null; // Edge shape updates also schedule ticks; not compared. + case "setCurrentlyGenerating":case "playSound":case "levelEvent":case "gameEvent":case "blockEvent":return null; + case "getEntities":return java.util.List.of(); + case "getBlockEntity":{ + if(args.length!=1)break;var p=((BlockPos)args[0]).immutable();var state=get(p); + if(state.is(Blocks.CHEST))return chests.computeIfAbsent(p,key->new ChestBlockEntity(key,state){@Override public void setLootTable(net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable> table,long seed){out.println("loot "+xyz(key)+" "+table.identifier()+" "+seed);super.setLootTable(table,seed);}}); + if(state.is(Blocks.SPAWNER))return spawners.computeIfAbsent(p,key->new SpawnerBlockEntity(key,state){@Override public void setEntityId(net.minecraft.world.entity.EntityType<?> type,RandomSource r){super.setEntityId(type,r);out.println("spawner "+xyz(key)+" "+BuiltInRegistries.ENTITY_TYPE.getKey(type));}}); + if(!state.is(Blocks.BEE_NEST))return null; + return hives.computeIfAbsent(p,key->new BeehiveBlockEntity(key,state){@Override public void storeBee(BeehiveBlockEntity.Occupant occupant){out.println("bee "+xyz(key)+" "+occupant.ticksInHive());}}); + } + case "setBlock":{ + var p=((BlockPos)args[0]).immutable();var state=(BlockState)args[1];out.println("set "+xyz(p)+" "+Block.getId(state)+" "+args[2]); + if(p.getY()<MIN_Y||p.getY()>=MIN_Y+HEIGHT)return false; + chunk(p.getX()>>4,p.getZ()>>4).getSection((p.getY()-MIN_Y)>>4).setBlockState(p.getX()&15,p.getY()&15,p.getZ()&15,state,false);return true; + } + case "getHeight":if(args==null||args.length==0)return HEIGHT;return f.get("height").getAsInt(); + case "getChunk": + if(args.length==1&&args[0] instanceof BlockPos p)return chunk(p.getX()>>4,p.getZ()>>4); + if(args.length>=2&&args[0] instanceof Integer x&&args[1] instanceof Integer z)return chunk(x,z); + break; + default:break; + } + if(method.isDefault())return InvocationHandler.invokeDefault(proxy,method,args); + throw new AssertionError(method); + } + } + /** Parses named holders on first use from the bundled vanilla resources. */ + static final class Lazy<T> implements HolderGetter<T>, HolderOwner<T> { + JsonObject json;com.mojang.serialization.Codec<T> codec;RegistryOps<JsonElement> ops;final Map<ResourceKey<T>,Holder.Reference<T>> cache=new HashMap<>(); + public Optional<Holder.Reference<T>> get(ResourceKey<T> key){ + var cached=cache.get(key);if(cached!=null)return Optional.of(cached); + var text=json.get(key.identifier().toString());if(text==null)return Optional.empty(); + var ref=Holder.Reference.createStandAlone(this,key);cache.put(key,ref); + T value=codec.parse(ops,JsonParser.parseString(text.getAsString())).getOrThrow(); + try{var bind=Holder.Reference.class.getDeclaredMethod("bindValue",Object.class);bind.setAccessible(true);bind.invoke(ref,value);}catch(ReflectiveOperationException e){throw new IllegalStateException(e);} + return Optional.of(ref); + } + public Optional<HolderSet.Named<T>> get(net.minecraft.tags.TagKey<T> tag){return Optional.empty();} + } + static final Lazy<Feature> lazyFeatures=new Lazy<>(); + static final Lazy<net.minecraft.world.level.levelgen.placement.PlacedFeature> lazyPlaced=new Lazy<>(); + @SuppressWarnings("unchecked") + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + VanillaHeightmapOracle.bindTags(JsonParser.parseString(Files.readString(dir.resolve("tags.json"))).getAsJsonObject()); + var bind=VanillaBlockSurvivalOracle.class.getDeclaredMethod("bindFluidTags",JsonObject.class);bind.setAccessible(true);bind.invoke(null,JsonParser.parseString(Files.readString(dir.resolve("fluid-tags.json"))).getAsJsonObject()); + var providers=new MappedRegistry<BlockStateProvider>(Registries.BLOCK_STATE_PROVIDER,com.mojang.serialization.Lifecycle.stable()); + var ops=RegistryOps.create(JsonOps.INSTANCE,new RegistryOps.RegistryInfoLookup(){public <T> Optional<HolderGetter<T>> lookup(ResourceKey<? extends Registry<? extends T>> key){ + if(key.equals(Registries.BLOCK_STATE_PROVIDER))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(providers); + if(key.equals(Registries.FEATURE))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(lazyFeatures); + if(key.equals(Registries.PLACED_FEATURE))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(lazyPlaced); + if(key.equals(Registries.FLUID))return (Optional<HolderGetter<T>>)(Optional<?>)Optional.of(BuiltInRegistries.FLUID); + return key.equals(Registries.BLOCK)?(Optional<HolderGetter<T>>)(Optional<?>)Optional.of(BuiltInRegistries.BLOCK):Optional.empty(); + }}); + var bundle=JsonParser.parseString(Files.readString(dir.resolve("vanilla-features.json"))).getAsJsonObject(); + for(var entry:bundle.getAsJsonObject("providers").entrySet()) + providers.register(ResourceKey.create(Registries.BLOCK_STATE_PROVIDER,Identifier.parse(entry.getKey())),BlockStateProvider.DIRECT_CODEC.parse(ops,JsonParser.parseString(entry.getValue().getAsString())).getOrThrow(),RegistrationInfo.BUILT_IN); + providers.freeze(); + var features=bundle.getAsJsonObject("features");var placedJson=bundle.getAsJsonObject("placed"); + lazyFeatures.json=features;lazyPlaced.json=placedJson;lazyFeatures.codec=Feature.DIRECT_CODEC;lazyPlaced.codec=net.minecraft.world.level.levelgen.placement.PlacedFeature.DIRECT_CODEC;lazyFeatures.ops=ops;lazyPlaced.ops=ops; + var contextMethod=VanillaPlacementOracle.class.getDeclaredMethod("context",JsonObject.class);contextMethod.setAccessible(true); + var bounds=new JsonObject();bounds.add("context",JsonParser.parseString("[-64,384,63]")); + var generator=((net.minecraft.world.level.levelgen.placement.PlacementContext)contextMethod.invoke(null,bounds)).generator(); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var inputs=Files.lines(dir.resolve("inputs.txt"))) { + for(var line:(Iterable<String>)inputs::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();long seed=f.get("seed").getAsLong(); + RandomSource random=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + out.println("fixture "+f.get("feature").getAsString()); + Optional<Feature> decoded; + try{decoded=Feature.DIRECT_CODEC.parse(ops,JsonParser.parseString(features.get(f.get("feature").getAsString()).getAsString())).result();}catch(Throwable error){decoded=Optional.empty();} + if(decoded.isEmpty()){out.println("decode error");continue;} + var handler=new World(f,out);var world=(WorldGenLevel)Proxy.newProxyInstance(WorldGenLevel.class.getClassLoader(),new Class<?>[]{WorldGenLevel.class},handler); + try{out.println("place "+decoded.get().place(world,generator,random,pos(f.getAsJsonArray("origin"))));}catch(Throwable error){out.println("place error");System.err.println(f.get("feature").getAsString()+": "+error);} + out.println("next "+random.nextLong()); + var keys=new ArrayList<>(handler.chunks.keySet());keys.sort(Comparator.<ChunkPos>comparingInt(ChunkPos::x).thenComparingInt(ChunkPos::z)); + var changes=new TreeMap<BlockPos,Integer>(Comparator.<BlockPos>comparingInt(BlockPos::getX).thenComparingInt(BlockPos::getY).thenComparingInt(BlockPos::getZ)); + for(var key:keys){var chunk=handler.chunks.get(key); + for(int y=MIN_Y;y<MIN_Y+HEIGHT;y++)for(int lz=0;lz<16;lz++)for(int lx=0;lx<16;lx++){ + int x=key.x()*16+lx,z=key.z()*16+lz;int id=Block.getId(chunk.getSection((y-MIN_Y)>>4).getBlockState(lx,y&15,lz)); + if(id!=handler.terrain.at(x,y,z))changes.put(new BlockPos(x,y,z),id); + }} + for(var e:changes.entrySet())out.println("final "+xyz(e.getKey())+" "+e.getValue()); + out.println("end"); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaUseFlagReactionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaUseFlagReactionOracle.java new file mode 100644 index 000000000..aa5726099 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaUseFlagReactionOracle.java @@ -0,0 +1,41 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.component.*;import net.minecraft.world.entity.*;import net.minecraft.world.entity.player.*;import net.minecraft.world.item.*;import net.minecraft.world.level.*;import net.minecraft.world.level.gameevent.GameEvent;import net.minecraft.server.level.*;import net.minecraft.network.syncher.*; +/** Native use lifecycle with actual Inventory, PlayerEquipment and synchronized flags. */ +public final class VanillaUseFlagReactionOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate;static Field useItem,remaining,kinetic,count,eqItems; + static <T>T make(Class<T> c)throws Exception{return c.cast(allocate.invoke(unsafe,c));} + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static int n(JsonObject o,String k){return o.get(k).getAsInt();} + static final class Data { + JsonObject f;PrintWriter out;int calls;boolean changed;Actor actor;ItemStack[] items;Server[] levels;Inventory inv;PlayerEquipment equipment;SynchedEntityData data;SynchedEntityData.DataItem<Byte> flags; + JsonObject state(){return f.getAsJsonObject(changed?"after":"initial");} + int id(ItemStack s){for(int i=0;i<items.length;i++)if(items[i]==s)return i;throw new AssertionError();} + void reset(){try{var s=state();useItem.set(actor,items[n(s,"item")]);remaining.setInt(actor,n(s,"remaining"));kinetic.set(actor,s.get("kinetic").getAsBoolean()?new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>():null);for(int i=0;i<3;i++)items[i].setCount(s.getAsJsonArray("counts").get(i).getAsInt());inv.clearContent();inv.setSelectedSlot(n(s,"selected"));for(var e:s.getAsJsonArray("slots")){var p=e.getAsJsonArray();inv.setItem(p.get(0).getAsInt(),items[p.get(1).getAsInt()]);}}catch(Exception e){throw new AssertionError(e);}} + void all(){try{out.println("state "+id((ItemStack)useItem.get(actor))+" "+remaining.getInt(actor)+" "+(kinetic.get(actor)!=null)+" "+actor.isUsingItem()+" "+actor.getUsedItemHand().ordinal()+" "+Byte.toUnsignedInt(flags.getValue())+" "+data.isDirty()+" "+flags.isDirty()+" "+inv.getSelectedSlot()+" "+calls+" "+changed);out.println("counts "+count.getInt(items[0])+" "+count.getInt(items[1])+" "+count.getInt(items[2]));var slots=new StringJoiner(",");for(int i=0;i<43;i++)slots.add(Integer.toString(id(inv.getItem(i))));out.println("slots "+slots);var eq=new StringJoiner(",");for(var e:((EnumMap<EquipmentSlot,ItemStack>)eqItems.get(equipment)).entrySet())eq.add(e.getKey().ordinal()+"="+id(e.getValue()));out.println("equipment "+eq);}catch(Exception e){throw new AssertionError(e);}} + void event(String name){out.println(name);int index=calls++;all();if(index==n(f,"fail"))throw new Stop();if(index==n(f,"mutate_at")){changed=true;reset();}} + } + static final class Server extends ServerLevel {Data d;int id;Server(){super(null,null,null,null,null,null,false,0L,List.of(),false);}@Override public boolean isClientSide(){d.event("client "+id);return d.state().getAsJsonArray("clients").get(id).getAsBoolean();}} + static final class CustomItem extends Item {Data d;int id;CustomItem(){super(null);} + @Override public int getUseDuration(ItemStack stack,LivingEntity actor){d.event("duration "+id+" "+d.id(stack));return d.state().getAsJsonArray("durations").get(id).getAsInt();} + @Override public void onUseTick(Level l,LivingEntity a,ItemStack s,int ticks){d.event("tick "+id+" "+d.id(s)+" "+((Server)l).id+" "+ticks);} + @Override public boolean useOnRelease(ItemStack s){d.event("release-query "+id+" "+d.id(s));return d.state().getAsJsonArray("releases").get(id).getAsBoolean();} + @Override public boolean releaseUsing(ItemStack s,Level l,LivingEntity a,int ticks){d.event("release "+id+" "+d.id(s)+" "+((Server)l).id+" "+ticks);return false;} + @Override public ItemStack finishUsingItem(ItemStack s,Level l,LivingEntity a){d.event("finish "+id+" "+d.id(s)+" "+((Server)l).id);return d.items[d.state().getAsJsonArray("finishes").get(id).getAsInt()];} + } + static final class Actor extends Player {Data d;Actor(){super(null,null);}@Override public GameType gameMode(){return GameType.SURVIVAL;}@Override public boolean isSpectator(){return false;}@Override public boolean isCreative(){return false;} + @Override public ServerLevel level(){d.event("level");return d.levels[n(d.state(),"level")];} + @Override public int getUseItemRemainingTicks(){d.event("remaining");return n(d.state(),"virtual_remaining");} + @Override public void onEquipItem(EquipmentSlot slot,ItemStack old,ItemStack next){d.event("equip "+slot.ordinal()+" "+d.id(old)+" "+d.id(next));} + @Override public void onSyncedDataUpdated(EntityDataAccessor<?> key){d.event("synced "+key.id());super.onSyncedDataUpdated(key);} + @Override public void gameEvent(Holder<GameEvent> event){if(event!=GameEvent.ITEM_INTERACT_FINISH)throw new AssertionError();d.event("vibration");} + void flag(int mask,boolean value){super.setLivingEntityFlag(mask,value);}void update(ItemStack s){super.updateUsingItem(s);}void complete(){super.completeUsingItem();} + } + @SuppressWarnings("unchecked")public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Items.AIR.builtInRegistryHolder().bindComponents(DataComponentMap.EMPTY);var u=Class.forName("sun.misc.Unsafe");unsafe=field(u,"theUnsafe").get(null);allocate=u.getMethod("allocateInstance",Class.class);useItem=field(LivingEntity.class,"useItem");remaining=field(LivingEntity.class,"useItemRemaining");kinetic=field(LivingEntity.class,"recentKineticEnemies");count=field(ItemStack.class,"count");eqItems=field(EntityEquipment.class,"items");var invField=field(Player.class,"inventory");var equipmentField=field(LivingEntity.class,"equipment");var dataField=field(Entity.class,"entityData");var flagKey=(EntityDataAccessor<Byte>)field(LivingEntity.class,"DATA_LIVING_ENTITY_FLAGS").get(null);if(flagKey.id()!=8)throw new AssertionError();var dataCtor=SynchedEntityData.class.getDeclaredConstructor(SyncedDataHolder.class,SynchedEntityData.DataItem[].class);dataCtor.setAccessible(true);var tick=LivingEntity.class.getDeclaredMethod("updatingUsingItem");tick.setAccessible(true);var ctor=ItemStack.class.getDeclaredConstructor(Holder.class,int.class,PatchedDataComponentMap.class);ctor.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var d=new Data();d.f=JsonParser.parseString(line).getAsJsonObject();d.out=out;d.actor=make(Actor.class);d.actor.d=d;d.levels=new Server[]{make(Server.class),make(Server.class)};for(int i=0;i<2;i++){d.levels[i].d=d;d.levels[i].id=i;}var first=make(CustomItem.class);first.d=d;first.id=0;var second=make(CustomItem.class);second.d=d;second.id=1;d.items=new ItemStack[]{ctor.newInstance(Holder.direct(first),1,new PatchedDataComponentMap(DataComponentMap.EMPTY)),ctor.newInstance(Holder.direct(d.f.get("shared_type").getAsBoolean()?first:second),1,new PatchedDataComponentMap(DataComponentMap.EMPTY)),ItemStack.EMPTY};ItemStack.EMPTY.setCount(0);ItemStack.EMPTY.setPopTime(0);for(int i=0;i<2;i++)if(d.f.getAsJsonArray("vibrations").get(i).getAsBoolean())d.items[i].set(DataComponents.USE_EFFECTS,new net.minecraft.world.item.component.UseEffects(false,true,1));d.equipment=new PlayerEquipment(d.actor);d.inv=new Inventory(d.actor,d.equipment);invField.set(d.actor,d.inv);equipmentField.set(d.actor,d.equipment);var entries=new SynchedEntityData.DataItem<?>[9];for(int i=0;i<9;i++)entries[i]=new SynchedEntityData.DataItem<Byte>(new EntityDataAccessor<Byte>(i,EntityDataSerializers.BYTE),(byte)0);d.flags=new SynchedEntityData.DataItem<Byte>(flagKey,(byte)n(d.f,"flags"));entries[8]=d.flags;d.data=dataCtor.newInstance(d.actor,entries);dataField.set(d.actor,d.data);d.reset();d.all(); + try{switch(d.f.get("mode").getAsString()){case "notify":d.actor.onSyncedDataUpdated(flagKey);break;case "flag":d.actor.flag(n(d.f,"mask"),d.f.get("value").getAsBoolean());break;case "assign":var values=new ArrayList<SynchedEntityData.DataValue<?>>();for(var value:d.f.getAsJsonArray("values"))values.add(new SynchedEntityData.DataValue<Byte>(8,EntityDataSerializers.BYTE,(byte)value.getAsInt()));d.data.assignValues(values);break;case "tick":try{tick.invoke(d.actor);}catch(InvocationTargetException e){if(e.getCause() instanceof Stop)throw new Stop();throw new AssertionError(e.getCause());}break;case "update":d.actor.update(d.items[n(d.f,"argument")]);break;case "complete":d.actor.complete();break;case "release":d.actor.releaseUsingItem();break;case "stop":d.actor.stopUsingItem();break;default:throw new AssertionError();}out.println("result ok");}catch(Stop e){out.println("result error");}d.all();var packed=d.data.packDirty();out.println("packed "+(packed==null?"none":packed.stream().map(v->v.id()+":"+Byte.toUnsignedInt((Byte)v.value())).collect(java.util.stream.Collectors.joining(","))));d.all(); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaUseRemainderOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaUseRemainderOracle.java new file mode 100644 index 000000000..c459b2dd5 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaUseRemainderOracle.java @@ -0,0 +1,40 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.component.*;import net.minecraft.world.item.*; +/** Native template construction, patch precedence, validation and rollback. */ +public final class VanillaUseRemainderOracle { + static DataComponentType<Integer>[] keys; + static Item[] items;static Field components,count,patchMap;static Object removed; + static Field field(Class<?> c,String n)throws Exception{var f=c.getDeclaredField(n);f.setAccessible(true);return f;} + static String opt(Object o){return o==null||o==removed?"none":o.toString();} + static int kind(Item i){for(int k=0;k<items.length;k++)if(items[k]==i)return k;throw new AssertionError();} + static int key(Object k){for(int i=0;i<keys.length;i++)if(keys[i]==k)return i;throw new AssertionError();} + static DataComponentMap prototype(JsonArray a){var b=DataComponentMap.builder();for(var e:a){var p=e.getAsJsonArray();b.set(keys[p.get(0).getAsInt()],p.get(1).getAsInt());}return b.build();} + static DataComponentPatch patch(JsonArray a){var b=DataComponentPatch.builder();for(var e:a){var p=e.getAsJsonArray();if(p.get(1).isJsonNull())b.remove(keys[p.get(0).getAsInt()]);else b.set(keys[p.get(0).getAsInt()],p.get(1).getAsInt());}return b.build();} + static String patchText(DataComponentPatch p)throws Exception{var j=new StringJoiner(",");for(var e:((Map<?,?>)patchMap.get(p)).entrySet())j.add(key(e.getKey())+"="+opt(e.getValue()));return j.toString();} + static void all(PrintWriter out,ItemStack[] stacks,ItemStackTemplate[] templates)throws Exception{ + for(int i=0;i<3;i++){var s=stacks[i];var v=new StringJoiner(",");for(var k:keys)v.add(opt(s.get(k)));out.println("stack "+i+" "+(s==ItemStack.EMPTY)+" "+kind(s.getItem())+" "+count.getInt(s)+" "+s.getCount()+" "+s.getPopTime()+" "+s.isEmpty()+" "+ItemStack.validateStrict(s).isSuccess()+" | "+v+" | "+patchText(((PatchedDataComponentMap)components.get(s)).asPatch()));} + for(int i=0;i<3;i++){var t=templates[i];if(t==null){out.println("template "+i+" none");continue;}var v=new StringJoiner(",");for(var k:keys)v.add(opt(t.get(k)));out.println("template "+i+" "+kind(t.item().value())+" "+t.count()+" | "+v+" | "+patchText(t.components()));} + for(int a=0;a<3;a++)for(int b=a+1;b<3;b++)out.println("same "+a+" "+b+" "+(stacks[a]==stacks[b])+" "+(templates[a]==templates[b])); + } + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();keys=new DataComponentType[]{DataComponents.MAX_STACK_SIZE,DataComponents.MAX_DAMAGE,DataComponents.DAMAGE};items=new Item[]{Items.AIR,Items.STICK,Items.SHIELD};components=field(ItemStack.class,"components");count=field(ItemStack.class,"count");patchMap=field(DataComponentPatch.class,"map");removed=field(Class.forName("net.minecraft.core.component.Removed"),"INSTANCE").get(null); + Path dir=Path.of(args[1]);try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();for(int i=0;i<3;i++)items[i].builtInRegistryHolder().bindComponents(prototype(f.getAsJsonArray("prototypes").get(i).getAsJsonArray()));ItemStack.EMPTY.setCount(0);ItemStack.EMPTY.setPopTime(0);((PatchedDataComponentMap)components.get(ItemStack.EMPTY)).clearPatch();var stacks=new ItemStack[3];var templates=new ItemStackTemplate[3];for(int i=0;i<3;i++){var v=f.getAsJsonArray("stacks").get(i).getAsJsonObject();int id=v.get("item").getAsInt();stacks[i]=id<0?ItemStack.EMPTY:new ItemStack(items[id],v.get("count").getAsInt());if(id>=0){stacks[i].setPopTime(5);((PatchedDataComponentMap)components.get(stacks[i])).restorePatch(patch(v.getAsJsonArray("patch")));}}all(out,stacks,templates); + for(var ov:f.getAsJsonArray("ops")){var op=ov.getAsJsonObject();int a=op.get("a").getAsInt(),b=op.get("b").getAsInt(),n=op.get("count").getAsInt();try{switch(op.get("kind").getAsString()){ + case "convert":{var t=Objects.requireNonNull(templates[op.get("template").getAsInt()]);stacks[b]=new net.minecraft.world.item.component.UseRemainder(t).convertIntoRemainder(stacks[a],n,op.get("infinite").getAsBoolean(),extra->{out.println("extra "+(extra==ItemStack.EMPTY)+" "+kind(extra.getItem())+" "+extra.getCount());if(op.get("fail").getAsInt()==1)throw new IllegalStateException();extra.setCount(op.get("extra_count").getAsInt());stacks[a].setCount(op.get("source_count").getAsInt());int replace=op.get("replace").getAsInt();if(replace>=0)stacks[a]=stacks[replace];stacks[2]=extra;if(op.get("fail").getAsInt()==2)throw new IllegalStateException();});break;} + case "new":templates[b]=new ItemStackTemplate(items[op.get("item").getAsInt()].builtInRegistryHolder(),n,patch(op.getAsJsonArray("patch")));break; + case "from":templates[b]=ItemStackTemplate.fromStack(stacks[a]);break; + case "from-nonempty":templates[b]=ItemStackTemplate.fromNonEmptyStack(stacks[a]);break; + case "from-count":templates[b]=ItemStackTemplate.fromNonEmptyStack(stacks[a],n);break; + case "with":templates[b]=templates[a].withCount(n);break; + case "create":stacks[b]=templates[a].create();break; + case "apply":stacks[b]=templates[a].apply(patch(op.getAsJsonArray("patch")));break; + case "apply-count":stacks[b]=templates[a].apply(n,patch(op.getAsJsonArray("patch")));break; + case "validate-patch":stacks[a].applyComponentsAndValidate(patch(op.getAsJsonArray("patch")));break; + case "count":stacks[a].setCount(n);break; + case "prototype":items[op.get("item").getAsInt()].builtInRegistryHolder().bindComponents(prototype(op.getAsJsonArray("prototype")));break; + default:throw new AssertionError();}out.println("result ok");}catch(IllegalStateException|NullPointerException e){out.println("result error");}all(out,stacks,templates); + } + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaValueProviderOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaValueProviderOracle.java new file mode 100644 index 000000000..3010569e7 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaValueProviderOracle.java @@ -0,0 +1,39 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import com.mojang.serialization.JsonOps; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import net.minecraft.util.RandomSource; +import net.minecraft.util.valueproviders.*; +import net.minecraft.world.level.levelgen.*; + +/** Original transport calling native value-provider codecs and samples. */ +public final class VanillaValueProviderOracle { + private static String bits(float value){return Integer.toHexString(Float.floatToIntBits(value));} + public static void main(String[] args) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();long seed=f.get("seed").getAsLong(); + RandomSource random=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + var json=JsonParser.parseString(f.get("definition").getAsString());int count=f.get("samples").getAsInt(); + if(f.get("kind").getAsString().equals("float")) { + var decoded=FloatProviders.CODEC.parse(JsonOps.INSTANCE,json); + if(decoded.result().isEmpty())out.println("decode error");else { + var provider=decoded.result().get();out.println("float "+bits(provider.min())+" "+bits(provider.max())); + for(int i=0;i<count;i++){out.println("sample "+bits(provider.sample(random)));out.println("next "+random.nextLong());} + } + } else { + com.mojang.serialization.DataResult<IntProvider> decoded; + try {decoded=IntProviders.CODEC.parse(JsonOps.INSTANCE,json);} catch(IllegalArgumentException error) {out.println("decode error");out.println("tail "+random.nextLong());continue;} + if(decoded.result().isEmpty())out.println("decode error");else { + var provider=decoded.result().get();out.println("int "+provider.minInclusive()+" "+provider.maxInclusive()); + for(int i=0;i<count;i++){try{out.println("sample "+provider.sample(random));}catch(IllegalArgumentException error){out.println("sample error");}out.println("next "+random.nextLong());} + } + } + out.println("tail "+random.nextLong()); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaViewDirectionOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaViewDirectionOracle.java new file mode 100644 index 000000000..c882cb891 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaViewDirectionOracle.java @@ -0,0 +1,19 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.nio.file.*; +import net.minecraft.world.entity.Entity;import net.minecraft.world.phys.Vec3; +/** Native view vectors and native geometry/acos composition used by blocking. */ +public final class VanillaViewDirectionOracle { + static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static Vec3 vec(JsonElement v){var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static String bits(double v){return String.format("%016x",Double.doubleToLongBits(v));} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();Path dir=Path.of(args[1]);try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();switch(f.get("mode").getAsString()){ + case "acos":out.println("angle "+bits(Math.acos(number(f.get("value")))));break; + case "view":{var v=Entity.calculateViewVector(single(f.get("pitch")),single(f.get("yaw")));out.println("view "+bits(v.x)+" "+bits(v.y)+" "+bits(v.z));break;} + case "blocking":{var view=Entity.calculateViewVector(0,single(f.get("yaw")));var delta=vec(f.get("source")).subtract(vec(f.get("position")));var horizontal=new Vec3(delta.x,0,delta.z).normalize();out.println("angle "+bits(Math.acos(horizontal.dot(view))));break;} + case "fallback":out.println("angle "+bits((double)(float)Math.PI));break; + default:throw new AssertionError();} + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWaterSplashOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWaterSplashOracle.java new file mode 100644 index 000000000..47a85e02d --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWaterSplashOracle.java @@ -0,0 +1,34 @@ +package dev.horizonlab.parity; +import com.google.gson.*;import java.io.*;import java.lang.reflect.*;import java.nio.file.*;import java.util.*; +import net.minecraft.core.*;import net.minecraft.core.particles.*;import net.minecraft.resources.Identifier;import net.minecraft.sounds.*;import net.minecraft.util.RandomSource;import net.minecraft.world.entity.*;import net.minecraft.world.level.gameevent.GameEvent;import net.minecraft.world.level.levelgen.*;import net.minecraft.world.phys.Vec3; +/** Actual water-entry splash with native seeded RNG and observable sound/particle requests. */ +public final class VanillaWaterSplashOracle { + static final class Stop extends RuntimeException {} + static Field position,dimensions; + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));}static float single(JsonElement v){return Float.intBitsToFloat(Integer.parseUnsignedInt(v.getAsString(),16));} + static Vec3 vec(JsonElement v){var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static String vector(Vec3 v){return String.format("%016x %016x %016x",Double.doubleToLongBits(v.x),Double.doubleToLongBits(v.y),Double.doubleToLongBits(v.z));} + static final class Data {JsonObject f;PrintWriter out;int calls;Actor actor,other;Vec3 velocity,otherVelocity;SoundEvent low,high; + void query(String s){out.println(s);int n=calls++;if(n==f.get("fail").getAsInt())throw new Stop();if(n==f.get("mutate_at").getAsInt()){velocity=vec(f.get("after_velocity"));otherVelocity=vec(f.get("after_other_velocity"));try{position.set(actor,vec(f.get("after_position")));dimensions.set(actor,EntityDimensions.fixed(single(f.get("after_width")),2));}catch(Exception e){throw new AssertionError(e);}}} + } + static final class World extends net.minecraft.server.level.ServerLevel {Data d;World(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public void addParticle(ParticleOptions type,double x,double y,double z,double vx,double vy,double vz){d.query("particle "+(type==ParticleTypes.BUBBLE?"bubble":type==ParticleTypes.SPLASH?"splash":"unexpected")+" "+vector(new Vec3(x,y,z))+" "+vector(new Vec3(vx,vy,vz)));} + } + static final class Actor extends net.minecraft.world.entity.decoration.ArmorStand {Data d;boolean other;Actor(){super(null,null);} + @Override public LivingEntity getControllingPassenger(){d.query("passenger");return switch(d.f.get("passenger").getAsInt()){case 0->null;case 1->this;case 2->d.other;default->throw new AssertionError();};} + @Override public Vec3 getDeltaMovement(){d.query("velocity "+(other?"other":"self"));return other?d.otherVelocity:d.velocity;} + @Override protected SoundEvent getSwimSplashSound(){d.query("sound low");return d.low;} + @Override protected SoundEvent getSwimHighSpeedSplashSound(){d.query("sound high");return d.high;} + @Override public void playSound(SoundEvent sound,float volume,float pitch){d.query(String.format("play %s %08x %08x",sound==d.low?"low":"high",Float.floatToIntBits(volume),Float.floatToIntBits(pitch)));} + @Override public void gameEvent(Holder<GameEvent> event){if(event!=GameEvent.SPLASH)throw new AssertionError(event);d.query("event splash");} + } + static Field field(Class<?> c,String name)throws Exception{var f=c.getDeclaredField(name);f.setAccessible(true);return f;} + public static void main(String[] args)throws Exception{ + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var u=Class.forName("sun.misc.Unsafe");var unsafe=field(u,"theUnsafe").get(null);var allocate=u.getMethod("allocateInstance",Class.class);position=field(Entity.class,"position");dimensions=field(Entity.class,"dimensions");var level=field(Entity.class,"level");var random=field(Entity.class,"random");var splash=Entity.class.getDeclaredMethod("doWaterSplashEffect");splash.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;d.velocity=vec(f.get("velocity"));d.otherVelocity=vec(f.get("other_velocity"));d.low=SoundEvent.createVariableRangeEvent(Identifier.parse("horizon:low"));d.high=SoundEvent.createVariableRangeEvent(Identifier.parse("horizon:high"));d.actor=(Actor)allocate.invoke(unsafe,Actor.class);d.actor.d=d;d.other=(Actor)allocate.invoke(unsafe,Actor.class);d.other.d=d;d.other.other=true;var w=(World)allocate.invoke(unsafe,World.class);w.d=d;level.set(d.actor,w);position.set(d.actor,vec(f.get("position")));dimensions.set(d.actor,EntityDimensions.fixed(single(f.get("width")),2));long seed=f.get("seed").getAsLong();RandomSource rng=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + var source=(RandomSource)Proxy.newProxyInstance(RandomSource.class.getClassLoader(),new Class<?>[]{RandomSource.class},(proxy,method,values)->{switch(method.getName()){case "nextFloat":d.query("float");return rng.nextFloat();case "nextDouble":d.query("double");return rng.nextDouble();default:throw new AssertionError(method);}});random.set(d.actor,source); + try{splash.invoke(d.actor);out.println("result ok");}catch(InvocationTargetException e){if(e.getCause() instanceof Stop)out.println("error");else throw e;} + out.println("final "+vector((Vec3)position.get(d.actor))+" "+String.format("%08x",Float.floatToIntBits(d.actor.getBbWidth())));out.println("next "+rng.nextLong());out.println("queries "+d.calls); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldBorderOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldBorderOracle.java new file mode 100644 index 000000000..5014bac92 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldBorderOracle.java @@ -0,0 +1,43 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.level.border.WorldBorder; +import net.minecraft.world.phys.*; +import net.minecraft.world.phys.shapes.*; +/** Native border extents, interpolation ticks, collision shape and proximity. */ +public final class VanillaWorldBorderOracle { + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static void values(PrintWriter out,String label,double... values){out.print(label);for(double v:values)out.printf(" %016x",Double.doubleToLongBits(v));out.println();} + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap(); + var allocator=Class.forName("sun.misc.Unsafe");var access=allocator.getDeclaredField("theUnsafe");access.setAccessible(true);var unsafe=access.get(null);var allocate=allocator.getMethod("allocateInstance",Class.class); + var entity=(Marker)allocate.invoke(unsafe,Marker.class);var position=Entity.class.getDeclaredField("position");position.setAccessible(true); + var emit=VanillaFaceSupportOracle.class.getDeclaredMethod("emit",PrintWriter.class,VoxelShape.class);emit.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){ + for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var border=new WorldBorder(); + for(var value:f.getAsJsonArray("ops")){ + var op=value.getAsJsonArray();switch(op.get(0).getAsString()){ + case "center"->border.setCenter(number(op.get(1)),number(op.get(2))); + case "size"->border.setSize(number(op.get(1))); + case "limit"->border.setAbsoluteMaxSize(op.get(1).getAsInt()); + case "lerp"->border.lerpSizeBetween(number(op.get(1)),number(op.get(2)),op.get(3).getAsLong(),op.get(4).getAsLong()); + case "tick"->{for(int i=0;i<op.get(1).getAsInt();i++)border.tick();} + default->throw new AssertionError(op); + } + out.println("status "+border.getStatus().name()+" "+border.getLerpTime()+" "+border.getAbsoluteMaxSize());values(out,"state",border.getCenterX(),border.getCenterZ(),border.getSize(),border.getLerpTarget(),border.getLerpSpeed()); + for(var partial:f.getAsJsonArray("partials")){float t=Float.intBitsToFloat(Integer.parseUnsignedInt(partial.getAsString(),16));values(out,"bounds",border.getMinX(t),border.getMinZ(t),border.getMaxX(t),border.getMaxZ(t));} + emit.invoke(null,out,border.getCollisionShape()); + for(var item:f.getAsJsonArray("queries")){ + var q=item.getAsJsonArray();double x=number(q.get(0)),z=number(q.get(1)),margin=number(q.get(2));position.set(entity,new Vec3(x,0,z)); + var b=new AABB(number(q.get(3)),number(q.get(4)),number(q.get(5)),number(q.get(6)),number(q.get(7)),number(q.get(8))); + values(out,"distance",border.getDistanceToBorder(x,z));out.println("inside "+border.isWithinBounds(x,z,margin)+" "+border.isInsideCloseToBorder(entity,b)); + } + } + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldOracle.java new file mode 100644 index 000000000..4e41b8ffd --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldOracle.java @@ -0,0 +1,217 @@ +package dev.horizonlab.parity; + +import com.mojang.serialization.Codec; +import java.io.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.SharedConstants; +import net.minecraft.core.IdMapper; +import net.minecraft.nbt.*; +import net.minecraft.server.Bootstrap; +import net.minecraft.world.level.ChunkPos; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.chunk.PalettedContainer; +import net.minecraft.world.level.chunk.Strategy; +import net.minecraft.world.level.chunk.storage.RegionFile; +import net.minecraft.world.level.chunk.storage.RegionFileVersion; +import net.minecraft.world.level.chunk.storage.RegionStorageInfo; + +/** Original interoperability adapter. Game serialization is always performed by vanilla classes. */ +public final class VanillaWorldOracle { + private static final int[] SIZES = {1,2,16,17,32,33,64,65,128,129,256,257,512,513,4096}; + static { SharedConstants.tryDetectVersion(); Bootstrap.bootStrap(); } + private static final IdMapper<String> IDS = new IdMapper<>(); + static { for (int i = 0; i < 8192; i++) IDS.add("state" + i); } + private static final RegionStorageInfo INFO = new RegionStorageInfo("horizon-fixture", Level.OVERWORLD, "chunk"); + private static final Strategy<BlockState> BLOCKS = Strategy.createForBlockStates(Block.BLOCK_STATE_REGISTRY); + private static final Codec<PalettedContainer<BlockState>> BLOCK_CODEC = PalettedContainer.codecRW(BlockState.CODEC, BLOCKS, Blocks.AIR.defaultBlockState()); + + private static void check(boolean value, String message) { if (!value) throw new AssertionError(message); } + private static RegionFileVersion codec(int id) { return RegionFileVersion.fromId(id); } + private static Tag read(Path path, int compression, boolean network) throws Exception { + try (DataInputStream in = new DataInputStream(codec(compression).wrap(Files.newInputStream(path)))) { + return network ? NbtIo.readAnyTag(in, NbtAccounter.unlimitedHeap()) : NbtIo.readUnnamedTag(in, NbtAccounter.unlimitedHeap()); + } + } + private static void write(Tag tag, Path path, int compression, boolean network) throws Exception { + Files.createDirectories(path.getParent()); + try (DataOutputStream out = new DataOutputStream(codec(compression).wrap(Files.newOutputStream(path)))) { + if (network) NbtIo.writeAnyTag(tag, out); else NbtIo.writeUnnamedTag(tag, out); + } + } + private static CompoundTag specimen() { + CompoundTag root = new CompoundTag(); + root.putByte("byte", Byte.MIN_VALUE); + root.putShort("short", Short.MIN_VALUE); + root.putInt("int", Integer.MIN_VALUE); + root.putLong("long", Long.MIN_VALUE); + root.putFloat("float", Float.intBitsToFloat(0x7f800001)); + root.putDouble("double", Double.NEGATIVE_INFINITY); + root.put("negative-zero-float", new FloatTag(-0.0f)); + root.put("negative-zero-double", new DoubleTag(-0.0)); + root.putString("text\0\ud800", "nul\0 / unicode \u20ac \ud83c\udf0d / unpaired \ud800x\udfff"); + root.putString("max-ascii", "a".repeat(65535)); + root.putIntArray("ints", new int[]{0, -1, Integer.MIN_VALUE, Integer.MAX_VALUE}); + root.putLongArray("longs", new long[]{0, -1, Long.MIN_VALUE, Long.MAX_VALUE}); + byte[] bytes = new byte[1_200_013]; + new Random(173).nextBytes(bytes); + root.putByteArray("bytes", bytes); + ListTag mixed = new ListTag(); + mixed.add(IntTag.valueOf(42)); + mixed.add(StringTag.valueOf("different type")); + CompoundTag wrapper = new CompoundTag(); + wrapper.putInt("", 19); + mixed.add(wrapper); + CompoundTag normal = new CompoundTag(); + normal.putString("kept", "nested"); + mixed.add(normal); + mixed.add(new ListTag()); + root.put("mixed", mixed); + CompoundTag branch = new CompoundTag(); + for (int i = 0; i < 40; i++) { CompoundTag next = new CompoundTag(); next.put("child", branch); branch = next; } + root.put("deep", branch); + return root; + } + + private static Codec<PalettedContainer<String>> paletteCodec(boolean biome) { + // IdMapper keys use object identity. Decoding must return registry-owned + // objects, just as the real BlockState codec does. + Codec<String> stateCodec = Codec.STRING.xmap(value -> IDS.byId(Integer.parseInt(value.substring(5))), value -> value); + return PalettedContainer.codecRW(stateCodec, biome ? Strategy.createForBiomes(IDS) : Strategy.createForBlockStates(IDS), IDS.byId(0)); + } + private static PalettedContainer<String> palette(boolean biome, int distinct) { + PalettedContainer<String> result = new PalettedContainer<>(IDS.byId(0), biome ? Strategy.createForBiomes(IDS) : Strategy.createForBlockStates(IDS)); + int axis = biome ? 2 : 4, mask = (1 << axis) - 1, len = biome ? 64 : 4096; + for (int i = 0; i < len; i++) result.set(i & mask, i >> (axis * 2), (i >> axis) & mask, IDS.byId(i % distinct)); + return result; + } + private static CompoundTag chunk(ChunkPos pos, boolean oversized) { + CompoundTag root = new CompoundTag(); + root.putInt("DataVersion", SharedConstants.getCurrentVersion().dataVersion().version()); + root.putInt("xPos", pos.x()); root.putInt("zPos", pos.z()); root.putInt("yPos", -4); + root.putString("Status", "minecraft:full"); + root.putString("unknown-future-field", "preserve this exactly"); + root.putLong("LastUpdate", 123456789L); + ListTag sections = new ListTag(); + CompoundTag section = new CompoundTag(); section.putByte("Y", (byte)-4); + PalettedContainer<BlockState> blocks = new PalettedContainer<>(Blocks.AIR.defaultBlockState(), BLOCKS); + blocks.set(1, 0, 0, Blocks.OAK_LOG.defaultBlockState()); + section.put("block_states", BLOCK_CODEC.encodeStart(NbtOps.INSTANCE, blocks).getOrThrow()); + section.putString("unknown-section-field", "retain"); + sections.add(section); root.put("sections", sections); + root.put("block_entities", new ListTag()); + if (oversized) { byte[] bytes = new byte[1_200_013]; new Random(173).nextBytes(bytes); root.putByteArray("large-fixture", bytes); } + return root; + } + + private static void generate(Path base) throws Exception { + CompoundTag specimen = specimen(); + for (int codec = 1; codec <= 4; codec++) { + write(specimen, base.resolve("nbt/" + codec + ".bin"), codec, false); + write(specimen, base.resolve("network/" + codec + ".bin"), codec, true); + Path folder = base.resolve("regions/" + codec); Files.createDirectories(folder); + try (RegionFile region = new RegionFile(INFO, folder.resolve("r.-1.0.mca"), folder, codec(codec), false)) { + for (ChunkPos pos : List.of(new ChunkPos(-32, 0), new ChunkPos(-1, 31))) { + try (DataOutputStream out = region.getChunkDataOutputStream(pos)) { NbtIo.write(chunk(pos, pos.x() == -1), out); } + } + } + } + for (boolean biome : new boolean[]{false, true}) { + for (int size : SIZES) { + if (biome && size > 64) continue; + Tag data = paletteCodec(biome).encodeStart(NbtOps.INSTANCE, palette(biome, size)).getOrThrow(); + write(data, base.resolve("palettes/" + (biome ? "biome" : "block") + "-" + size + ".nbt"), 3, false); + } + } + CompoundTag registry = new CompoundTag(); + registry.putInt("DataVersion", SharedConstants.getCurrentVersion().dataVersion().version()); + ListTag states = new ListTag(); + CompoundTag defaults = new CompoundTag(); + for (BlockState state : Block.BLOCK_STATE_REGISTRY) { + check(Block.BLOCK_STATE_REGISTRY.getId(state) == states.size(), "registry IDs are not dense"); + states.add(BlockState.FULL_CODEC.encodeStart(NbtOps.INSTANCE, state).getOrThrow()); + if (state == state.getBlock().defaultBlockState()) { + Tag encoded = BlockState.FULL_CODEC.encodeStart(NbtOps.INSTANCE, state).getOrThrow(); + defaults.putInt(((CompoundTag)encoded).getStringOr("id", ""), Block.BLOCK_STATE_REGISTRY.getId(state)); + } + } + registry.put("states", states); registry.put("defaults", defaults); + write(registry, base.resolve("block-registry.nbt"), 3, false); + System.out.println("HORIZON_WORLD_GENERATED states=" + states.size()); + } + + private static void verify(Path base) throws Exception { + int nbt = 0, palettes = 0, regions = 0, blocks = 0; + for (boolean network : new boolean[]{false, true}) for (int source = 1; source <= 4; source++) for (int target = 1; target <= 4; target++) { + String directory = network ? "network" : "nbt"; + Tag original = read(base.resolve(directory + "/" + source + ".bin"), source, network); + Tag actual = read(base.resolve("rust/" + directory + "/" + source + "-" + target + ".bin"), target, network); + check(original.equals(actual), "NBT semantic mismatch " + directory + " " + source + " " + target); + nbt++; + } + for (boolean biome : new boolean[]{false, true}) for (int size : SIZES) { + if (biome && size > 64) continue; + String name = (biome ? "biome" : "block") + "-" + size + ".nbt"; + PalettedContainer<String> control = paletteCodec(biome).parse(NbtOps.INSTANCE, read(base.resolve("palettes/" + name), 3, false)).getOrThrow(); + int controlAxis = biome ? 2 : 4, controlMask = (1 << controlAxis) - 1; + for (int i = 0; i < (biome ? 64 : 4096); i++) + check(control.get(i & controlMask, i >> (controlAxis * 2), (i >> controlAxis) & controlMask).equals("state" + (i % size)), "vanilla palette control failed"); + for (String variant : List.of("edited", "compact")) { + Tag tag = read(base.resolve("rust/palettes/" + variant + "-" + name), 3, false); + PalettedContainer<String> actual = paletteCodec(biome).parse(NbtOps.INSTANCE, tag).getOrThrow(); + int axis = biome ? 2 : 4, mask = (1 << axis) - 1, len = biome ? 64 : 4096; + for (int i = 0; i < len; i++) { + String expected = "state" + (i == len - 1 ? 4096 : i % size); + check(actual.get(i & mask, i >> (axis * 2), (i >> axis) & mask).equals(expected), "palette index mismatch " + name + " " + i); + blocks++; + } + palettes++; + } + } + for (int source = 1; source <= 4; source++) for (String variant : List.of("copy", "1", "2", "3", "4", "edited")) { + Path folder = base.resolve("rust/regions/" + source + "-" + variant); + try (RegionFile region = new RegionFile(INFO, folder.resolve("r.-1.0.mca"), folder, false)) { + for (ChunkPos pos : List.of(new ChunkPos(-32, 0), new ChunkPos(-1, 31))) { + try (DataInputStream in = region.getChunkDataInputStream(pos)) { + check(in != null, "chunk missing"); + CompoundTag actual = NbtIo.read(in); + CompoundTag expected = chunk(pos, pos.x() == -1); + if (variant.equals("edited") && pos.x() == -32) { + CompoundTag section = actual.getListOrEmpty("sections").getCompoundOrEmpty(0); + PalettedContainer<BlockState> states = BLOCK_CODEC.parse(NbtOps.INSTANCE, section.get("block_states")).getOrThrow(); + check(states.get(0, 0, 0) == Blocks.STONE.defaultBlockState(), "edited block differs"); + check(states.get(1, 0, 0) == Blocks.OAK_LOG.defaultBlockState(), "neighbor changed"); + section.put("block_states", expected.getListOrEmpty("sections").getCompoundOrEmpty(0).get("block_states")); + } + check(expected.equals(actual), "region data changed " + source + " " + variant + " " + pos); + regions++; + } + } + check(!region.hasChunk(new ChunkPos(-31, 0)), "unexpected extra chunk"); + } + } + Tag actualRegistry = read(base.resolve("rust/block-registry.nbt"), 3, false); + check(read(base.resolve("block-registry.nbt"), 3, false).equals(actualRegistry), "registry roundtrip differs"); + PalettedContainer<BlockState> resident = BLOCK_CODEC.parse(NbtOps.INSTANCE, read(base.resolve("rust/runtime-section.nbt"), 3, false)).getOrThrow(); + for (int i = 0; i < 4096; i++) check(resident.get(i & 15, i >> 8, (i >> 4) & 15) == Block.BLOCK_STATE_REGISTRY.byId(i * 7 % Block.BLOCK_STATE_REGISTRY.size()), "resident block state differs"); + int[] expectedStates = new int[4096]; + long random = 0x31415926L; + for (int step = 0; step < 100_000; step++) { + random = random * 6364136223846793005L + 1; + int index = (int) ((random >>> 32) % 4096); + expectedStates[index] = step % 3 == 0 ? 0 : Integer.remainderUnsigned((int) (random >>> 16), Block.BLOCK_STATE_REGISTRY.size()); + } + PalettedContainer<BlockState> mutated = BLOCK_CODEC.parse(NbtOps.INSTANCE, read(base.resolve("rust/runtime-mutated.nbt"), 3, false)).getOrThrow(); + for (int i = 0; i < 4096; i++) check(mutated.get(i & 15, i >> 8, (i >> 4) & 15) == Block.BLOCK_STATE_REGISTRY.byId(expectedStates[i]), "mutated resident block state differs"); + System.out.printf("HORIZON_WORLD_RESULT {\"nbt_pairs\":%d,\"palettes\":%d,\"palette_values\":%d,\"region_chunks\":%d,\"registry_states\":%d,\"resident_values\":8192}%n", nbt, palettes, blocks, regions, Block.BLOCK_STATE_REGISTRY.size()); + } + + public static void main(String[] args) throws Exception { + if (args[0].equals("generate")) generate(Path.of(args[1])); + else if (args[0].equals("verify")) verify(Path.of(args[1])); + else throw new IllegalArgumentException("unknown mode"); + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldRayOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldRayOracle.java new file mode 100644 index 000000000..ff7bddd90 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldRayOracle.java @@ -0,0 +1,78 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.lang.reflect.*; +import java.nio.file.*; +import java.util.*; +import net.minecraft.core.*; +import net.minecraft.core.registries.*; +import net.minecraft.tags.*; +import net.minecraft.world.entity.*; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.*; +import net.minecraft.world.level.gamerules.*; +import net.minecraft.world.level.material.*; +import net.minecraft.world.phys.*; +import net.minecraft.world.phys.shapes.*; +/** Actual BlockGetter.clip with native context modes and controlled shape providers. */ +public final class VanillaWorldRayOracle { + static final class Stop extends RuntimeException {} + static Object unsafe;static Method allocate; + static <T>T make(Class<T> type){try{return type.cast(allocate.invoke(unsafe,type));}catch(Exception e){throw new AssertionError(e);}} + static double number(JsonElement v){return Double.longBitsToDouble(Long.parseUnsignedLong(v.getAsString(),16));} + static Vec3 vector(JsonElement v){var a=v.getAsJsonArray();return new Vec3(number(a.get(0)),number(a.get(1)),number(a.get(2)));} + static String pos(BlockPos p){return p.getX()+" "+p.getY()+" "+p.getZ();} + static VoxelShape shape(JsonElement v){var result=Shapes.empty();for(var value:v.getAsJsonArray()){var a=value.getAsJsonArray();result=Shapes.or(result,Shapes.box(number(a.get(0)),number(a.get(1)),number(a.get(2)),number(a.get(3)),number(a.get(4)),number(a.get(5))));}return result;} + static final class Data { + JsonObject f;PrintWriter out;int calls;State[] states;FluidState[] fluids;Rules rules; + void query(String s){out.println(s);if(calls++==f.get("fail").getAsInt())throw new Stop();} + int index(BlockPos p){var cells=f.getAsJsonObject("cells");var id=cells.get(pos(p));return id==null?0:id.getAsInt();} + BlockState block(BlockPos p){query("block "+pos(p));return states[index(p)];} + FluidState fluid(BlockPos p){query("fluid "+pos(p));return fluids[index(p)];} + } + static final class State extends BlockState { + Data d;int id;VoxelShape[] shapes;State(){super(null,null,null);} + boolean flag(String n){return d.f.getAsJsonArray("states").get(id).getAsJsonObject().get(n).getAsBoolean();} + @Override public boolean is(TagKey<Block> tag){if(tag!=BlockTags.FALL_DAMAGE_RESETTING)throw new AssertionError();d.query("reset-tag "+id);return flag("reset");} + @Override public boolean is(Block block){String n=block==Blocks.END_GATEWAY?"gateway":block==Blocks.END_PORTAL?"end":block==Blocks.NETHER_PORTAL?"nether":null;if(n==null)throw new AssertionError();d.query(n+" "+id);return flag(n);} + @Override public VoxelShape getCollisionShape(BlockGetter w,BlockPos p,CollisionContext c){d.query("collider "+id+" "+pos(p));return shapes[0];} + @Override public VoxelShape getShape(BlockGetter w,BlockPos p,CollisionContext c){d.query("outline "+id+" "+pos(p));return shapes[1];} + @Override public VoxelShape getVisualShape(BlockGetter w,BlockPos p,CollisionContext c){d.query("visual "+id+" "+pos(p));return shapes[2];} + @Override public VoxelShape getInteractionShape(BlockGetter w,BlockPos p){d.query("interaction "+id+" "+pos(p));return shapes[3];} + } + static final class Fluid extends WaterFluid.Source { + Data d;int id;VoxelShape shape; + boolean flag(String n){return d.f.getAsJsonArray("states").get(id).getAsJsonObject().get(n).getAsBoolean();} + @Override public boolean isSource(FluidState state){d.query("source "+id);return flag("source");} + @Override protected boolean isEmpty(){d.query("empty "+id);return flag("empty");} + @Override public Holder.Reference<net.minecraft.world.level.material.Fluid> builtInRegistryHolder(){d.query("water "+id);return (flag("water")?Fluids.WATER:Fluids.LAVA).builtInRegistryHolder();} + @Override public VoxelShape getShape(FluidState state,BlockGetter w,BlockPos p){d.query("fluid-shape "+id+" "+pos(p));return shape;} + } + static final class Rules extends GameRules { + Data d;Rules(){super(net.minecraft.world.flag.FeatureFlagSet.of());} + @SuppressWarnings("unchecked") @Override public <T>T get(GameRule<T> rule){if(rule!=GameRules.PLAYERS_NETHER_PORTAL_DEFAULT_DELAY)throw new AssertionError();d.query("portal-delay");return (T)Integer.valueOf(d.f.get("delay").getAsInt());} + } + static final class ServerWorld extends net.minecraft.server.level.ServerLevel { + Data d;ServerWorld(){super(null,null,null,null,null,null,false,0L,List.of(),false);} + @Override public BlockState getBlockState(BlockPos p){return d.block(p);} + @Override public FluidState getFluidState(BlockPos p){return d.fluid(p);} + @Override public GameRules getGameRules(){d.query("rules");return d.rules;} + } + static final class Actor extends Marker { + Data d;Actor(){super(null,null);} + @Override public boolean is(EntityType<?> type){if(type!=EntityTypes.PLAYER)throw new AssertionError();d.query("player");return d.f.get("player").getAsBoolean();} + @Override public boolean isDescending(){return false;} + } + public static void main(String[] args)throws Exception { + net.minecraft.SharedConstants.tryDetectVersion();net.minecraft.server.Bootstrap.bootStrap();var allocator=Class.forName("sun.misc.Unsafe");var field=allocator.getDeclaredField("theUnsafe");field.setAccessible(true);unsafe=field.get(null);allocate=allocator.getMethod("allocateInstance",Class.class); + BuiltInRegistries.FLUID.prepareTagReload(new TagLoader.LoadResult<>(Registries.FLUID,Map.of(FluidTags.WATER,List.of(Fluids.WATER.builtInRegistryHolder())))).apply();var position=Entity.class.getDeclaredField("position");position.setAccessible(true);Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt")));var lines=Files.lines(dir.resolve("inputs.txt"))){for(var line:(Iterable<String>)lines::iterator){ + var f=JsonParser.parseString(line).getAsJsonObject();var d=new Data();d.f=f;d.out=out;var entries=f.getAsJsonArray("states");d.states=new State[entries.size()];d.fluids=new FluidState[entries.size()];for(int i=0;i<entries.size();i++){var data=entries.get(i).getAsJsonObject();var s=make(State.class);s.d=d;s.id=i;s.shapes=new VoxelShape[]{shape(data.get("collider")),shape(data.get("outline")),shape(data.get("visual")),shape(data.get("interaction"))};d.states[i]=s;var fluid=make(Fluid.class);fluid.d=d;fluid.id=i;fluid.shape=shape(data.get("fluid_shape"));d.fluids[i]=new FluidState(fluid,new net.minecraft.world.level.block.state.properties.Property<?>[0],new Comparable<?>[0]);} + d.rules=make(Rules.class);d.rules.d=d;BlockGetter world;if(f.get("server").getAsBoolean()){var w=make(ServerWorld.class);w.d=d;world=w;}else{world=(BlockGetter)Proxy.newProxyInstance(BlockGetter.class.getClassLoader(),new Class<?>[]{BlockGetter.class},(proxy,method,values)->{if(method.getName().equals("getBlockState"))return d.block((BlockPos)values[0]);if(method.getName().equals("getFluidState"))return d.fluid((BlockPos)values[0]);if(method.isDefault())return InvocationHandler.invokeDefault(proxy,method,values);throw new AssertionError(method);});} + CollisionContext context=CollisionContext.empty();if(f.get("entity").getAsBoolean()){var actor=make(Actor.class);actor.d=d;position.set(actor,Vec3.ZERO);context=CollisionContext.of(actor);} + var c=new ClipContext(vector(f.get("from")),vector(f.get("to")),ClipContext.Block.values()[f.get("block_mode").getAsInt()],ClipContext.Fluid.values()[f.get("fluid_mode").getAsInt()],context); + try{var hit=world.clip(c);var v=hit.getLocation();out.printf("hit %s %016x %016x %016x %s %s %s%n",hit.getType()==HitResult.Type.MISS,Double.doubleToLongBits(v.x),Double.doubleToLongBits(v.y),Double.doubleToLongBits(v.z),hit.getDirection().getSerializedName(),pos(hit.getBlockPos()),hit.isInside());}catch(Stop e){out.println("error");}out.println("queries "+d.calls); + }} + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldgenOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldgenOracle.java new file mode 100644 index 000000000..e42ba7edd --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldgenOracle.java @@ -0,0 +1,387 @@ +package dev.horizonlab.parity; + +import java.io.PrintWriter; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import com.google.gson.JsonParser; +import com.mojang.serialization.JsonOps; +import net.minecraft.world.level.levelgen.LegacyRandomSource; +import net.minecraft.world.level.levelgen.XoroshiroRandomSource; +import net.minecraft.world.level.levelgen.synth.NormalNoise; + +/** Original JSON transport; decoding and evaluation use vanilla classes. */ +public final class VanillaWorldgenOracle { + private static java.util.Map<net.minecraft.world.level.biome.MultiNoiseBiomeSourceParameterList.Preset,net.minecraft.world.level.biome.Climate.ParameterList<net.minecraft.resources.ResourceKey<net.minecraft.world.level.biome.Biome>>> biomePresets; + private static void registryProbe(String path,long seed,boolean legacy,boolean optimized,String setting,PrintWriter out) throws Exception { + registryProbe(path,seed,legacy,optimized,setting,null,out); + } + @SuppressWarnings("unchecked") + private static void registryProbe(String path,long seed,boolean legacy,boolean optimized,String setting,String aquiferFixture,PrintWriter out) throws Exception { + var bundle=JsonParser.parseString(Files.readString(Path.of(path))).getAsJsonObject(); + var noises=new net.minecraft.core.MappedRegistry<NormalNoise>(net.minecraft.core.registries.Registries.NOISE,com.mojang.serialization.Lifecycle.stable()); + var densities=new net.minecraft.core.MappedRegistry<net.minecraft.world.level.levelgen.densityfunction.DensityFunction>(net.minecraft.core.registries.Registries.DENSITY_FUNCTION,com.mojang.serialization.Lifecycle.stable()); + var noiseLookup=noises.createRegistrationLookup();var densityLookup=densities.createRegistrationLookup(); + var ops=net.minecraft.resources.RegistryOps.create(JsonOps.INSTANCE,new net.minecraft.resources.RegistryOps.RegistryInfoLookup() { + public <T> java.util.Optional<net.minecraft.core.HolderGetter<T>> lookup(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<? extends T>> key) { + if(key.equals(net.minecraft.core.registries.Registries.NOISE))return (java.util.Optional<net.minecraft.core.HolderGetter<T>>)(java.util.Optional<?>)java.util.Optional.of(noiseLookup); + if(key.equals(net.minecraft.core.registries.Registries.DENSITY_FUNCTION))return (java.util.Optional<net.minecraft.core.HolderGetter<T>>)(java.util.Optional<?>)java.util.Optional.of(densityLookup); + return java.util.Optional.empty(); + } + }); + for(var entry:bundle.getAsJsonObject("noises").entrySet()) { + var key=net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.NOISE,net.minecraft.resources.Identifier.parse(entry.getKey())); + var noise=NormalNoise.DIRECT_CODEC.parse(ops,JsonParser.parseString(entry.getValue().getAsString())).getOrThrow(); + noises.register(key,noise,net.minecraft.core.RegistrationInfo.BUILT_IN); + } + noises.freeze(); + java.util.Map<String,net.minecraft.world.level.levelgen.densityfunction.DensityFunction> functions=new java.util.TreeMap<>(); + for(var entry:bundle.getAsJsonObject("densities").entrySet()) { + var key=net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.DENSITY_FUNCTION,net.minecraft.resources.Identifier.parse(entry.getKey())); + var function=net.minecraft.world.level.levelgen.densityfunction.DensityFunctions.DIRECT_CODEC.parse(ops,JsonParser.parseString(entry.getValue().getAsString())).getOrThrow(); + densities.register(key,function,net.minecraft.core.RegistrationInfo.BUILT_IN);functions.put(entry.getKey(),function); + } + densities.freeze(); + var zero=net.minecraft.world.level.levelgen.densityfunction.DensityFunctions.zero(); + var router=new net.minecraft.world.level.levelgen.NoiseRouter(zero,zero,zero,zero,zero,zero,zero,zero); + if(setting!=null) { + var settings=JsonParser.parseString(bundle.getAsJsonObject("settings").get(setting).getAsString()).getAsJsonObject(); + router=net.minecraft.world.level.levelgen.NoiseRouter.CODEC.parse(ops,settings.get("noise_router")).getOrThrow(); + functions=new java.util.LinkedHashMap<>(); + functions.put("temperature",router.temperature());functions.put("vegetation",router.vegetation()); + functions.put("continents",router.continents());functions.put("erosion",router.erosion()); + functions.put("depth",router.depth());functions.put("ridges",router.ridges()); + functions.put("chunk_surface_level",router.chunkSurfaceLevel());functions.put("final_density",router.finalDensity()); + } + var state=net.minecraft.world.level.levelgen.RandomState.create(noises,seed,legacy,net.minecraft.world.level.block.Blocks.STONE.defaultBlockState(),63,router); + var compilerField=state.getClass().getDeclaredField("densityFunctionCompiler");compilerField.setAccessible(true); + var compiler=(net.minecraft.world.level.levelgen.densityfunction.DensityFunctionCompiler)compilerField.get(state); + var contextField=compiler.getClass().getDeclaredField("context");contextField.setAccessible(true); + var compileContext=(net.minecraft.world.level.levelgen.densityfunction.DensityFunction.CompileContext)contextField.get(compiler); + var countField=compiler.getClass().getDeclaredField("nextCacheId");countField.setAccessible(true); + if(aquiferFixture!=null) { + var fixture=JsonParser.parseString(aquiferFixture).getAsJsonObject(); + var settings=JsonParser.parseString(bundle.getAsJsonObject("settings").get(setting).getAsString()).getAsJsonObject(); + var configJson=fixture.has("config")?JsonParser.parseString(fixture.get("config").getAsString()):settings.get("aquifers"); + if(configJson==null){out.println("aquifer config error");return;} + net.minecraft.world.level.levelgen.Aquifer.Config config; + try{var decoded=net.minecraft.world.level.levelgen.Aquifer.Config.CODEC.parse(ops,configJson).result(); + if(decoded.isEmpty()){out.println("aquifer config error");return;}config=decoded.get();} + catch(IllegalArgumentException | IllegalStateException e){out.println("aquifer config error");return;} + noiseAquiferProbe(fixture,config,compiler,state,countField,out);return; + } + out.println(setting==null?"registry "+functions.size():"router "+setting+" "+functions.size()); + var sharedContext=createContext(); + for(var entry:functions.entrySet()) { + var function=entry.getValue();var range=function.range(); + out.printf("entry %s %s %s %d%n",entry.getKey(),bits(range.min()),bits(range.max()),function.domainAxes()); + net.minecraft.world.level.levelgen.densityfunction.DensitySampler sampler; + try { sampler=optimized?compiler.getSampler(function):function.compileSampler(compileContext); } + catch(IllegalArgumentException | IllegalStateException e){out.println("compile error");continue;} + out.println("compile ok "+countField.getInt(compiler)); + var context=setting==null?createContext():sharedContext; + int[][] points={{0,0,0},{-17,-64,32},{30000000,319,-30000000},{1,-1,-1}}; + for(var point:points)out.println("density "+bits(sampler.sampleValue(context,point[0],point[1],point[2]))); + int[][] origins={{-17,-64,32},{-16,-64,32},{-17,0,32}},steps={{1,1,1},{4,8,4},{4,1,4}},extents={{2,9,2},{2,9,2},{3,1,2}}; + for(int v=0;v<(setting==null?2:3);v++) { + var volume=new net.minecraft.world.level.levelgen.densityfunction.DensityVolume(extents[v][0],extents[v][1],extents[v][2],origins[v][0],origins[v][1],origins[v][2],steps[v][0],steps[v][1],steps[v][2]); + var buffer=net.minecraft.world.level.levelgen.densityfunction.DensityBuffer.createUnpooled(volume.size());buffer.fill(0.0f); + for(int repeat=0;repeat<2;repeat++) { + String status="ok";try{sampler.sampleVolume(context,buffer,volume);}catch(IllegalArgumentException | IllegalStateException e){status="error";} + out.println("volume "+status);for(int i=0;i<buffer.size();i++)out.println("cell "+bits(buffer.get(i))); + } + } + } + if(setting!=null) { + var climate=state.createClimateSampler(sharedContext); + out.println("climate caches "+countField.getInt(compiler)); + int[][] positions={{0,0,0},{-5,-16,8},{7500000,79,-7500000},{Integer.MIN_VALUE,Integer.MAX_VALUE,-1},{536870912,-536870913,17},{-4,0,8}}; + for(var position:positions) { + var point=climate.sample(position[0],position[1],position[2]); + out.printf("climate %d %d %d %d %d %d 0%n",point.temperature(),point.humidity(),point.continentalness(),point.erosion(),point.depth(),point.weirdness()); + } + if(biomePresets==null)biomePresets=net.minecraft.world.level.biome.MultiNoiseBiomeSourceParameterList.knownPresets(); + var presets=new java.util.TreeMap<String,net.minecraft.world.level.biome.Climate.ParameterList<net.minecraft.resources.ResourceKey<net.minecraft.world.level.biome.Biome>>>(); + biomePresets.forEach((preset,list)->presets.put(preset.id().toString(),list)); + for(var preset:presets.entrySet()) { + // Resolver lookup needs holder identities, not biome properties. + // Registration placeholders retain actual keys without fabricating + // biome implementations or invoking their gameplay behavior. + var biomes=new net.minecraft.core.MappedRegistry<net.minecraft.world.level.biome.Biome>(net.minecraft.core.registries.Registries.BIOME,com.mojang.serialization.Lifecycle.stable()); + var lookup=biomes.createRegistrationLookup(); + var entries=new java.util.ArrayList<com.mojang.datafixers.util.Pair<net.minecraft.world.level.biome.Climate.ParameterPoint,net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>>>(); + for(var entry:preset.getValue().values())entries.add(com.mojang.datafixers.util.Pair.of(entry.getFirst(),lookup.getOrThrow(entry.getSecond()))); + var source=net.minecraft.world.level.biome.MultiNoiseBiomeSource.createFromList(new net.minecraft.world.level.biome.Climate.ParameterList<>(entries)); + out.println("biomes "+preset.getKey()+" "+entries.size()); + var resolver=source.createResolver(climate); + for(var position:positions)out.println("biome "+resolver.getNoiseBiome(position[0],position[1],position[2]).unwrapKey().orElseThrow().identifier()); + int[][] minima={{-5,-16,8},{-4,-16,8},{Integer.MAX_VALUE-1,Integer.MIN_VALUE,-1}},extents={{3,4,2},{3,4,2},{2,2,2}}; + for(int v=0;v<3;v++) { + var min=minima[v];var size=extents[v]; + var bulk=source.createResolverForChunk(climate,min[0],min[1],min[2],size[0],size[1],size[2]); + var queries=new java.util.ArrayList<int[]>(); + for(int z=0;z<size[2];z++)for(int x=0;x<size[0];x++)for(int y=0;y<size[1];y++)queries.add(new int[]{min[0]+x,min[1]+y,min[2]+z}); + var forward=new java.util.ArrayList<>(queries);var reverse=new java.util.ArrayList<>(queries);java.util.Collections.reverse(reverse);queries.addAll(reverse);queries.addAll(forward.subList(0,3)); + for(var position:queries)out.println("biomecell "+bulk.getNoiseBiome(position[0],position[1],position[2]).unwrapKey().orElseThrow().identifier()); + } + } + + } + + } + private static net.minecraft.world.level.levelgen.densityfunction.SamplerContext createContext() { + return net.minecraft.world.level.levelgen.densityfunction.SamplerContext.builder().enableCaches().useBufferArena(new net.minecraft.world.level.levelgen.densityfunction.DensityBufferArena() { + public net.minecraft.world.level.levelgen.densityfunction.ScopedDensityBuffer acquire(int size) { var buffer=net.minecraft.world.level.levelgen.densityfunction.DensityBufferArena.GLOBAL.acquire(size);buffer.fill(0.0f);return buffer; } + public void release(net.minecraft.world.level.levelgen.densityfunction.ScopedDensityBuffer buffer) { net.minecraft.world.level.levelgen.densityfunction.DensityBufferArena.GLOBAL.release(buffer); } + }).build(); + } + private static void leafOrder(Object node,PrintWriter out) throws Exception { + try { + var value=node.getClass().getDeclaredField("value");value.setAccessible(true);out.println("leaf "+value.get(node)); + } catch(NoSuchFieldException e) { + var children=node.getClass().getDeclaredField("children");children.setAccessible(true); + for(var child:(Object[])children.get(node))leafOrder(child,out); + } + } + @SuppressWarnings("unchecked") + private static void indexProbe(int branching,String json,PrintWriter out) throws Exception { + var input=JsonParser.parseString(json).getAsJsonObject(); + var entries=new java.util.ArrayList<com.mojang.datafixers.util.Pair<net.minecraft.world.level.biome.Climate.ParameterPoint,Integer>>(); + for(var raw:input.getAsJsonArray("entries")) { + var entry=raw.getAsJsonObject();var coordinates=entry.getAsJsonArray("coordinates"); + var p=new net.minecraft.world.level.biome.Climate.Parameter[6]; + for(int i=0;i<6;i++){var coord=coordinates.get(i).getAsJsonArray();p[i]=new net.minecraft.world.level.biome.Climate.Parameter(coord.get(0).getAsLong(),coord.get(1).getAsLong());} + entries.add(com.mojang.datafixers.util.Pair.of(new net.minecraft.world.level.biome.Climate.ParameterPoint(p[0],p[1],p[2],p[3],p[4],p[5],entry.get("offset").getAsLong()),entries.size())); + } + // The Rust bounded API accepts branching 2..32. Other reference rebuild + // values can diverge or fail to terminate and are outside this transport. + if(branching<2 || branching>32){out.println("index error");return;} + var constructor=net.minecraft.world.level.biome.Climate.ParameterList.class.getDeclaredConstructor(java.util.List.class,int.class);constructor.setAccessible(true); + net.minecraft.world.level.biome.Climate.ParameterList<Integer> index; + try{index=(net.minecraft.world.level.biome.Climate.ParameterList<Integer>)constructor.newInstance(entries,branching);} + catch(java.lang.reflect.InvocationTargetException e){out.println("index error");return;} + var indexField=index.getClass().getDeclaredField("index");indexField.setAccessible(true);var tree=indexField.get(index); + var rootField=tree.getClass().getDeclaredField("root");rootField.setAccessible(true); + var lastField=tree.getClass().getDeclaredField("lastResult");lastField.setAccessible(true);var last=(ThreadLocal<Object>)lastField.get(tree); + out.println("index ok "+entries.size());leafOrder(rootField.get(tree),out); + for(var target:input.getAsJsonArray("targets")) { + var values=target.getAsJsonArray();var point=new net.minecraft.world.level.biome.Climate.TargetPoint(values.get(0).getAsLong(),values.get(1).getAsLong(),values.get(2).getAsLong(),values.get(3).getAsLong(),values.get(4).getAsLong(),values.get(5).getAsLong()); + int brute=index.findValueBruteForce(point);out.println("brute "+brute+" "+entries.get(brute).getFirst().fitness(point)); + try{int found=index.findValue(point);out.println("cached "+found+" "+entries.get(found).getFirst().fitness(point));} + catch(NullPointerException e){out.println("cached error");} + var previous=last.get();last.remove(); + try{int found=index.findValue(point);out.println("fresh "+found+" "+entries.get(found).getFirst().fitness(point));} + catch(NullPointerException e){out.println("fresh error");} + finally{if(previous==null)last.remove();else last.set(previous);} + } + } + private static void settingsProbe(net.minecraft.world.level.levelgen.NoiseSettings settings,PrintWriter out) { + out.println("settings "+settings.minY()+" "+settings.height()); + int[][] accessors={{-64,384},{0,128},{-2032,4064},{17,15},{2048,16},{Integer.MAX_VALUE,1},{Integer.MIN_VALUE,Integer.MAX_VALUE}}; + for(var accessor:accessors) { + var clamped=settings.clampToHeightAccessor(net.minecraft.world.level.LevelHeightAccessor.create(accessor[0],accessor[1])); + out.println("clamped "+clamped.minY()+" "+clamped.height()); + } + } + private static net.minecraft.world.level.block.state.BlockState fluidState(int label) { + return switch(label) { + case 0 -> net.minecraft.world.level.block.Blocks.WATER.defaultBlockState(); + case 1 -> net.minecraft.world.level.block.Blocks.LAVA.defaultBlockState(); + case 2 -> net.minecraft.world.level.block.Blocks.AIR.defaultBlockState(); + case 3 -> net.minecraft.world.level.block.Blocks.STONE.defaultBlockState(); + case 4 -> net.minecraft.world.level.block.Blocks.CAVE_AIR.defaultBlockState(); + case 5 -> net.minecraft.world.level.block.Blocks.VOID_AIR.defaultBlockState(); + case 6 -> net.minecraft.world.level.block.Blocks.WATER.defaultBlockState().setValue(net.minecraft.world.level.block.LiquidBlock.LEVEL,1); + case 7 -> net.minecraft.world.level.block.Blocks.LAVA.defaultBlockState().setValue(net.minecraft.world.level.block.LiquidBlock.LEVEL,1); + default -> throw new AssertionError("unknown fluid label"); + }; + } + private static int fluidLabel(net.minecraft.world.level.block.state.BlockState state) { + for(int label=0;label<8;label++)if(fluidState(label)==state)return label; + throw new AssertionError("unknown fluid state"); + } + private static void aquiferProbe(String line,PrintWriter out) throws Exception { + if(net.minecraft.SharedConstants.DEBUG_DISABLE_FLUID_GENERATION)throw new AssertionError("reference requires regular fluid generation"); + var args=line.split(" ");int sea=Integer.parseInt(args[1]),label=Integer.parseInt(args[2]),x=Integer.parseInt(args[3]),y=Integer.parseInt(args[4]),z=Integer.parseInt(args[5]); + double density=Double.longBitsToDouble(Long.parseUnsignedLong(args[6],16)); + var empty=new net.minecraft.world.level.levelgen.Aquifer.FluidStatus(-4064,fluidState(2)); + var lava=new net.minecraft.world.level.levelgen.Aquifer.FluidStatus(-54,fluidState(1)); + var fluid=new net.minecraft.world.level.levelgen.Aquifer.FluidStatus(sea,fluidState(label)); + var method=net.minecraft.world.level.levelgen.NoiseBasedChunkGenerator.class.getDeclaredMethod("lambda$createFluidPicker$0",net.minecraft.world.level.levelgen.Aquifer.FluidStatus.class,int.class,net.minecraft.world.level.levelgen.Aquifer.FluidStatus.class,net.minecraft.world.level.levelgen.Aquifer.FluidStatus.class,int.class,int.class,int.class);method.setAccessible(true); + net.minecraft.world.level.levelgen.Aquifer.FluidPicker picker=(px,py,pz)->{ + try{return (net.minecraft.world.level.levelgen.Aquifer.FluidStatus)method.invoke(null,empty,sea,lava,fluid,px,py,pz);} + catch(ReflectiveOperationException e){throw new AssertionError(e);} + }; + var status=picker.computeFluid(x,y,z);out.println("fluid "+status.fluidLevel()+" "+fluidLabel(status.fluidType())+" "+fluidLabel(status.at(y))); + var calls=new java.util.concurrent.atomic.AtomicInteger(); + var aquifer=net.minecraft.world.level.levelgen.Aquifer.createDisabled((px,py,pz)->{calls.incrementAndGet();return picker.computeFluid(px,py,pz);}); + var substance=aquifer.computeSubstance(x,y,z,density); + out.println("substance "+(substance==null?"default_solid":Integer.toString(fluidLabel(substance)))+" "+aquifer.shouldScheduleFluidUpdate()+" "+calls.get()); + } + private static void noiseAquiferProbe(com.google.gson.JsonObject fixture,net.minecraft.world.level.levelgen.Aquifer.Config config,net.minecraft.world.level.levelgen.densityfunction.DensityFunctionCompiler compiler,net.minecraft.world.level.levelgen.RandomState state,java.lang.reflect.Field countField,PrintWriter out) throws Exception { + var functions=new net.minecraft.world.level.levelgen.densityfunction.DensityFunction[]{config.barrierNoise(),config.fluidLevelFloodednessNoise(),config.fluidLevelSpreadNoise(),config.lavaNoise(),config.exclusion(),config.surfaceLevel()}; + var samplers=new net.minecraft.world.level.levelgen.densityfunction.DensitySampler[6]; + try{for(int i=0;i<6;i++)samplers[i]=compiler.getSampler(functions[i]);} + catch(IllegalArgumentException | IllegalStateException e){out.println("aquifer compile error");return;} + out.println("aquifer compile ok "+countField.getInt(compiler)); + var events=new java.util.ArrayList<String>();var context=createContext();var binding=new java.util.concurrent.atomic.AtomicInteger(); + net.minecraft.world.level.levelgen.densityfunction.DensitySamplerSet set=function->{ + int field=binding.getAndIncrement();var inner=samplers[field]; + if(fixture.has("overrides") && !fixture.getAsJsonArray("overrides").get(field).isJsonNull())inner=net.minecraft.world.level.levelgen.densityfunction.DensityFunctions.constant(Float.intBitsToFloat(Integer.parseUnsignedInt(fixture.getAsJsonArray("overrides").get(field).getAsString(),16))).compileSampler(null); + var source=inner; + return new net.minecraft.world.level.levelgen.densityfunction.DensitySampler(){ + private int calls; + private void enter(String event){events.add(event);calls++;if(fixture.has("fail") && fixture.getAsJsonArray("fail").get(0).getAsInt()==field && fixture.getAsJsonArray("fail").get(1).getAsInt()==calls){events.add("sample failure "+field);throw new IllegalStateException("injected sampler failure");}} + public float sampleValue(net.minecraft.world.level.levelgen.densityfunction.SamplerContext ctx,int x,int y,int z){ + enter("sample "+field+" value "+x+" "+y+" "+z); + try{float value=source.sampleValue(ctx,x,y,z);events.add("value "+bits(value));return value;} + catch(IllegalArgumentException | IllegalStateException e){events.add("value error");throw e;} + } + public void sampleVolume(net.minecraft.world.level.levelgen.densityfunction.SamplerContext ctx,net.minecraft.world.level.levelgen.densityfunction.DensityBuffer buffer,net.minecraft.world.level.levelgen.densityfunction.DensityVolume volume){ + enter("sample "+field+" volume "+volume.sizeX()+" "+volume.sizeY()+" "+volume.sizeZ()+" "+volume.minBlockX()+" "+volume.minBlockY()+" "+volume.minBlockZ()+" "+volume.stepBlockX()+" "+volume.stepBlockY()+" "+volume.stepBlockZ()); + String result="ok"; + try{source.sampleVolume(ctx,buffer,volume);}catch(IllegalArgumentException | IllegalStateException e){result="error";throw e;} + finally{events.add("sample volume "+result);for(int i=0;i<buffer.size();i++)events.add("sample cell "+bits(buffer.get(i)));} + } + }.bind(context); + }; + int sea=fixture.get("sea").getAsInt(),label=fixture.get("fluid").getAsInt(); + var empty=new net.minecraft.world.level.levelgen.Aquifer.FluidStatus(-4064,fluidState(2)); + var lava=new net.minecraft.world.level.levelgen.Aquifer.FluidStatus(-54,fluidState(1)); + var fluid=new net.minecraft.world.level.levelgen.Aquifer.FluidStatus(sea,fluidState(label)); + var method=net.minecraft.world.level.levelgen.NoiseBasedChunkGenerator.class.getDeclaredMethod("lambda$createFluidPicker$0",net.minecraft.world.level.levelgen.Aquifer.FluidStatus.class,int.class,net.minecraft.world.level.levelgen.Aquifer.FluidStatus.class,net.minecraft.world.level.levelgen.Aquifer.FluidStatus.class,int.class,int.class,int.class);method.setAccessible(true); + net.minecraft.world.level.levelgen.Aquifer.FluidPicker picker=(x,y,z)->{try{var result=(net.minecraft.world.level.levelgen.Aquifer.FluidStatus)method.invoke(null,empty,sea,lava,fluid,x,y,z);events.add("pick "+x+" "+y+" "+z+" "+result.fluidLevel()+" "+fluidLabel(result.fluidType()));return result;}catch(ReflectiveOperationException e){throw new AssertionError(e);}}; + var size=fixture.getAsJsonArray("sizes");var min=fixture.getAsJsonArray("minimum");var steps=fixture.getAsJsonArray("steps"); + var volume=new net.minecraft.world.level.levelgen.densityfunction.DensityVolume(size.get(0).getAsInt(),size.get(1).getAsInt(),size.get(2).getAsInt(),min.get(0).getAsInt(),min.get(1).getAsInt(),min.get(2).getAsInt(),steps.get(0).getAsInt(),steps.get(1).getAsInt(),steps.get(2).getAsInt()); + net.minecraft.world.level.levelgen.Aquifer aquifer; + try{aquifer=config.create(set,state.getOrCreateRandomFactory(net.minecraft.resources.Identifier.withDefaultNamespace("aquifer")),volume,picker);} + catch(IllegalArgumentException | IllegalStateException e){events.forEach(out::println);out.println("aquifer create error");return;} + events.forEach(out::println);events.clear(); + var skip=aquifer.getClass().getDeclaredField("skipSamplingAboveY");skip.setAccessible(true);out.println("aquifer ready "+skip.getInt(aquifer)); + for(var raw:fixture.getAsJsonArray("queries")){ + var query=raw.getAsJsonArray();String result; + try{var block=aquifer.computeSubstance(query.get(0).getAsInt(),query.get(1).getAsInt(),query.get(2).getAsInt(),Double.longBitsToDouble(Long.parseUnsignedLong(query.get(3).getAsString(),16)));result=block==null?"default_solid":Integer.toString(fluidLabel(block));} + catch(IllegalArgumentException | IllegalStateException | IndexOutOfBoundsException e){result="error";} + events.forEach(out::println);events.clear();out.println("aquifer result "+result+" "+aquifer.shouldScheduleFluidUpdate()); + } + var locationsField=aquifer.getClass().getDeclaredField("aquiferLocationCache");locationsField.setAccessible(true);var locations=(long[])locationsField.get(aquifer); + var statusesField=aquifer.getClass().getDeclaredField("aquiferCache");statusesField.setAccessible(true);var statuses=(net.minecraft.world.level.levelgen.Aquifer.FluidStatus[])statusesField.get(aquifer); + for(int i=0;i<locations.length;i++)out.println("aquifer cell "+i+" "+locations[i]+" "+(statuses[i]==null?"none":statuses[i].fluidLevel()+" "+fluidLabel(statuses[i].fluidType()))); + var surfacesField=aquifer.getClass().getDeclaredField("surfaceLevelCache");surfacesField.setAccessible(true); + var surfaces=(it.unimi.dsi.fastutil.longs.Long2IntMap)surfacesField.get(aquifer);var sorted=new java.util.TreeMap<Long,Integer>();surfaces.long2IntEntrySet().forEach(entry->sorted.put(entry.getLongKey(),entry.getIntValue())); + sorted.forEach((key,value)->out.println("aquifer surface "+key+" "+value)); + } + + private static void tagEntryProbe(String json,PrintWriter out){ + var decoded=net.minecraft.tags.TagEntry.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(json)).result(); + if(decoded.isEmpty())out.println("tag entry error");else out.println("tag entry "+decoded.get()); + } + private static void tagFileProbe(String json,PrintWriter out){ + var decoded=net.minecraft.tags.TagFile.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(json)).result(); + if(decoded.isEmpty()){out.println("tag file error");return;} + var file=decoded.get();out.println("tag file "+file.replace()+" "+file.entries().size()); + for(var entry:file.entries())out.println("tag entry "+entry); + } + private static void tagsProbe(com.google.gson.JsonObject fixture,PrintWriter out)throws Exception { + out.println("tags resources "+fixture.getAsJsonArray("files").size()); + var definitions=new java.util.HashMap<net.minecraft.resources.Identifier,java.util.List<net.minecraft.tags.TagLoader.EntryWithSource>>(); + for(var raw:fixture.getAsJsonArray("files")){ + var row=raw.getAsJsonArray();var name=net.minecraft.resources.Identifier.parse(row.get(0).getAsString());String source=row.get(1).getAsString(); + var json=JsonParser.parseString(row.get(2).getAsString());var entries=definitions.computeIfAbsent(name,ignored->new java.util.ArrayList<>()); + var decoded=net.minecraft.tags.TagFile.CODEC.parse(JsonOps.INSTANCE,json).result(); + if(decoded.isEmpty()){out.println("tag resource error "+name+" "+source);continue;} + var file=decoded.get();if(file.replace())entries.clear(); + for(var entry:file.entries())entries.add(new net.minecraft.tags.TagLoader.EntryWithSource(entry,source)); + } + var elements=fixture.getAsJsonObject("elements");var trace=new java.util.ArrayList<String>(); + var loader=new net.minecraft.tags.TagLoader<String>((id,required)->{ + trace.add("tag lookup "+id+" "+required); + return elements.has(id.toString())?java.util.Optional.of(elements.get(id.toString()).getAsString()):java.util.Optional.empty(); + },"tags/block"); + var result=loader.build(definitions);trace.forEach(out::println); + var sorted=new java.util.TreeMap<String,java.util.List<String>>();result.forEach((key,value)->sorted.put(key.toString(),value)); + out.println("tags built "+sorted.size()); + for(var entry:sorted.entrySet()){out.println("tag members "+entry.getKey()+" "+entry.getValue().size());for(var value:entry.getValue())out.println("tag member "+value);} + definitions.keySet().stream().filter(name->!result.containsKey(name)).map(Object::toString).sorted().forEach(name->out.println("tag missing "+name)); + } + private static void tagRegistryProbe(String path,PrintWriter out)throws Exception { + var bundle=JsonParser.parseString(Files.readString(Path.of(path))).getAsJsonObject(); + var fixture=new com.google.gson.JsonObject();var files=new com.google.gson.JsonArray(); + var sorted=new java.util.TreeMap<String,com.google.gson.JsonElement>();bundle.getAsJsonObject("tags").entrySet().forEach(entry->sorted.put(entry.getKey(),entry.getValue())); + sorted.forEach((name,json)->{var row=new com.google.gson.JsonArray();row.add(name);row.add("vanilla");row.add(json);files.add(row);});fixture.add("files",files); + // This lookup table must agree with the actual reference registry. + var elements=bundle.getAsJsonObject("block_elements"); + if(elements.size()!=net.minecraft.core.registries.BuiltInRegistries.BLOCK.keySet().size())throw new AssertionError("block identifiers differ"); + for(var name:elements.keySet())if(!net.minecraft.core.registries.BuiltInRegistries.BLOCK.containsKey(net.minecraft.resources.Identifier.parse(name)))throw new AssertionError("unknown exported block"); + fixture.add("elements",elements);tagsProbe(fixture,out); + } + + private static String bits(float value) { return Integer.toUnsignedString(Float.floatToIntBits(value)); } + public static void main(String[] paths) throws Exception { + net.minecraft.SharedConstants.tryDetectVersion(); + net.minecraft.server.Bootstrap.bootStrap(); + var octavesField=NormalNoise.class.getDeclaredField("octaves");octavesField.setAccessible(true); + var factorField=NormalNoise.class.getDeclaredField("normalizationFactor");factorField.setAccessible(true); + try(var reader=Files.newBufferedReader(Path.of(paths[0]),StandardCharsets.UTF_8); + var out=new PrintWriter(Files.newBufferedWriter(Path.of(paths[1]),StandardCharsets.UTF_8))) { + String line; + while((line=reader.readLine())!=null) { + if(line.startsWith("tag_entry ")){tagEntryProbe(line.substring(10),out);continue;} + if(line.startsWith("tag_file ")){tagFileProbe(line.substring(9),out);continue;} + if(line.startsWith("tag_registry ")){tagRegistryProbe(line.substring(13),out);continue;} + if(line.startsWith("tags ")){tagsProbe(JsonParser.parseString(line.substring(5)).getAsJsonObject(),out);continue;} + if(line.startsWith("noise_aquifer ")){var fields=line.split(" ",6);registryProbe(fields[3],Long.parseLong(fields[1]),fields[2].equals("1"),true,fields[4],fields[5],out);continue;} + if(line.startsWith("aquifer ")){aquiferProbe(line,out);continue;} + if(line.startsWith("noise_settings ")) { + var decoded=net.minecraft.world.level.levelgen.NoiseSettings.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(line.substring("noise_settings ".length()))).result(); + if(decoded.isEmpty())out.println("settings error");else settingsProbe(decoded.get(),out);continue; + } + if(line.startsWith("settings_create ")) { + var values=line.split(" "); + try{settingsProbe(net.minecraft.world.level.levelgen.NoiseSettings.create(Integer.parseInt(values[1]),Integer.parseInt(values[2])),out);} + catch(IllegalStateException e){out.println("settings error");}continue; + } + if(line.startsWith("climate_parameter ")) { + var decoded=net.minecraft.world.level.biome.Climate.Parameter.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(line.substring("climate_parameter ".length()))).result(); + if(decoded.isEmpty())out.println("parameter error");else{var p=decoded.get();out.println("parameter "+p.min()+" "+p.max());}continue; + } + if(line.startsWith("climate_point ")) { + var decoded=net.minecraft.world.level.biome.Climate.ParameterPoint.CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(line.substring("climate_point ".length()))).result(); + if(decoded.isEmpty())out.println("parameterpoint error");else{ + var p=decoded.get();out.print("parameterpoint"); + for(var coordinate:new net.minecraft.world.level.biome.Climate.Parameter[]{p.temperature(),p.humidity(),p.continentalness(),p.erosion(),p.depth(),p.weirdness()})out.print(" "+coordinate.min()+" "+coordinate.max()); + out.println(" "+p.offset()); + }continue; + } + if(line.startsWith("index ")) {var fields=line.split(" ",3);indexProbe(Integer.parseInt(fields[1]),fields[2],out);continue;} + if(line.startsWith("quantize ")) { + var values=line.split(" ");out.print("quantized"); + for(int i=1;i<=6;i++)out.print(" "+net.minecraft.world.level.biome.Climate.quantizeCoord(Float.intBitsToFloat(Integer.parseUnsignedInt(values[i],16)))); + out.println();out.println("unquantized "+bits(net.minecraft.world.level.biome.Climate.unquantizeCoord(Long.parseLong(values[7]))));continue; + } + String[] args=line.split(" ",5); + if(args[0].equals("router")){var fields=args[4].split(" ",2);registryProbe(fields[0],Long.parseLong(args[1]),args[2].equals("1"),args[3].equals("1"),fields[1],out);continue;} + if(args[0].equals("registry")){registryProbe(args[4],Long.parseLong(args[1]),args[2].equals("1"),args[3].equals("1"),null,out);continue;} + if(!args[0].equals("noise"))throw new AssertionError("unknown command"); + long seed=Long.parseLong(args[1]);boolean legacy=args[2].equals("1"),nether=args[3].equals("1"); + var decoded=NormalNoise.DIRECT_CODEC.parse(JsonOps.INSTANCE,JsonParser.parseString(args[4])).result(); + if(decoded.isEmpty()){out.println("decode error");continue;} + var noise=decoded.get();var octaves=(java.util.List<?>)octavesField.get(noise); + out.printf("decode %d %s %s %s%n",octaves.size(),Long.toUnsignedString(Double.doubleToLongBits(factorField.getDouble(noise))),bits(noise.range().min()),bits(noise.range().max())); + for(var octave:octaves) { + var index=octave.getClass().getDeclaredMethod("octaveIndex");index.setAccessible(true); + var frequency=octave.getClass().getDeclaredMethod("frequency");frequency.setAccessible(true); + var amplitude=octave.getClass().getDeclaredMethod("amplitude");amplitude.setAccessible(true); + out.printf("octave %d %s %s%n",index.invoke(octave),Long.toUnsignedString(Double.doubleToLongBits((Double)frequency.invoke(octave))),Long.toUnsignedString(Double.doubleToLongBits((Double)amplitude.invoke(octave)))); + } + net.minecraft.util.RandomSource random=legacy?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + net.minecraft.world.level.levelgen.synth.Noise sampler; + try { sampler=nether?noise.createForLegacyNetherBiome(random):noise.create(random); } + catch(IllegalArgumentException | IllegalStateException e){out.println("sample error "+random.nextLong());continue;} + double[][] points={{0,0,0},{-17.25,64.125,32.5},{30e6,-64,-30e6},{1.25,-.5,-3.75},{33554432,-2048,-33554433}}; + for(var point:points)out.printf("query %s %s%n",bits(sampler.get(point[0],point[2])),bits(sampler.get(point[0],point[1],point[2]))); + out.println("parent "+random.nextLong()); + } + } + } +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldgenRandomOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldgenRandomOracle.java new file mode 100644 index 000000000..d074834d0 --- /dev/null +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldgenRandomOracle.java @@ -0,0 +1,50 @@ +package dev.horizonlab.parity; +import com.google.gson.*; +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.*; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.levelgen.*; + +/** Native world-generation bit adapter, forks, counters and seeding methods. */ +public final class VanillaWorldgenRandomOracle { + public static void main(String[] args) throws Exception { + Path dir=Path.of(args[1]); + try(var out=new PrintWriter(Files.newBufferedWriter(dir.resolve(args[0]+".txt"),StandardCharsets.UTF_8))) { + for(var line:Files.readAllLines(dir.resolve("inputs.txt"))) { + var f=JsonParser.parseString(line).getAsJsonObject();long seed=f.get("seed").getAsLong(); + RandomSource source=f.get("legacy").getAsBoolean()?new LegacyRandomSource(seed):new XoroshiroRandomSource(seed); + source.consumeCount(f.get("warmup").getAsInt()); + for(int i=1;i<f.get("layers").getAsInt();i++)source=new WorldgenRandom(source); + var root=new WorldgenRandom(source);RandomSource random=root; + for(var value:f.getAsJsonArray("ops")) { + var op=value.getAsJsonArray();String kind=op.get(0).getAsString(); + switch(kind) { + case "root"->{random=root;out.println("root");} + case "bits"->out.println("bits "+root.next(op.get(1).getAsInt())); + case "decoration"->out.println("decoration "+root.setDecorationSeed(op.get(1).getAsLong(),op.get(2).getAsInt(),op.get(3).getAsInt())); + case "feature"->{root.setFeatureSeed(op.get(1).getAsLong(),op.get(2).getAsInt(),op.get(3).getAsInt());out.println("feature");} + case "large"->{root.setLargeFeatureSeed(op.get(1).getAsLong(),op.get(2).getAsInt(),op.get(3).getAsInt());out.println("large");} + case "salt"->{root.setLargeFeatureWithSalt(op.get(1).getAsLong(),op.get(2).getAsInt(),op.get(3).getAsInt(),op.get(4).getAsInt());out.println("salt");} + case "slime"->{var r=WorldgenRandom.seedSlimeChunk(op.get(1).getAsInt(),op.get(2).getAsInt(),op.get(3).getAsLong(),op.get(4).getAsLong());out.println("slime "+r.nextLong()+" "+r.nextInt(10));} + case "int"->out.println("int "+random.nextInt()); + case "long"->out.println("long "+random.nextLong()); + case "bool"->out.println("bool "+random.nextBoolean()); + case "float"->out.println("float "+Integer.toUnsignedString(Float.floatToRawIntBits(random.nextFloat()),16)); + case "double"->out.println("double "+Long.toUnsignedString(Double.doubleToRawLongBits(random.nextDouble()),16)); + case "bound"->{try{out.println("bound "+random.nextInt(op.get(1).getAsInt()));}catch(IllegalArgumentException e){out.println("bound error");}} + case "seed"->{random.setSeed(op.get(1).getAsLong());out.println("seed");} + case "consume"->{random.consumeCount(op.get(1).getAsInt());out.println("consume");} + case "fork"->{random=random.fork();out.println("fork");} + case "pos"->{random=random.forkPositional().at(op.get(1).getAsInt(),op.get(2).getAsInt(),op.get(3).getAsInt());out.println("pos");} + case "pos_seed"->{random=random.forkPositional().fromSeed(op.get(1).getAsLong());out.println("pos_seed");} + case "pos_hash"->{var values=op.get(1).getAsJsonArray();char[] units=new char[values.size()];for(int i=0;i<units.length;i++)units[i]=(char)values.get(i).getAsInt();random=random.forkPositional().fromHashOf(new String(units));out.println("pos_hash");} + default->throw new AssertionError(kind); + } + out.println("count "+root.getCount()); + } + out.println("tail "+root.nextLong());out.println("count "+root.getCount()); + } + } + } +} diff --git a/packs/START-HERE.txt b/packs/START-HERE.txt index b563f2f05..225f8a086 100644 --- a/packs/START-HERE.txt +++ b/packs/START-HERE.txt @@ -1,4 +1,4 @@ -HORIZON LAB @PACK_VERSION@ — playable optimization experiments +HORIZON @PACK_VERSION@ — playable optimization experiments YOUR MAC 1. Extract this ZIP. Double-click Mac-Start.command. If macOS asks, use Open @@ -179,7 +179,7 @@ Only original project binaries are embedded. Mods, the game and assets download from their publishers with pinned hashes. No decompiled Minecraft is distributed. Source, build commands and measured validation: -https://github.com/ludovic111/minecraft-optimization-lab +https://github.com/ludovic111/Horizon TERRAIN / SHADER COMPARISONS Version 0.12 records actual DH radius/quality, worker count/duty cycle, Iris state diff --git a/tests/test_anchor_parity.py b/tests/test_anchor_parity.py new file mode 100644 index 000000000..a9df54cea --- /dev/null +++ b/tests/test_anchor_parity.py @@ -0,0 +1,22 @@ +import itertools +import json +import unittest +from tools import test_anchor_parity as anchor + + +class AnchorCorpusTests(unittest.TestCase): + def test_exclusive_alternatives_and_unrestricted_runtime_bounds(self): + fixtures=list(anchor.corpus()) + self.assertEqual(fixtures,list(anchor.corpus())) + self.assertEqual(len(fixtures),192) + self.assertEqual(sum('generator' in f for f in fixtures),96) + self.assertIn(-2**31,fixtures[0]['values']) + self.assertIn(2**31-1,fixtures[0]['values']) + decoded=[json.loads(s) for s in fixtures[0]['json']] + names=['absolute','above_bottom','below_top','relative_to_sea_level'] + for combination in itertools.product([None,0,2032,'bad'],repeat=4): + self.assertIn({k:v for k,v in zip(names,combination) if v is not None},decoded) + self.assertIn('{"absolute":1,"absolute":null}',fixtures[0]['json']) + + +if __name__=='__main__':unittest.main() diff --git a/tests/test_basic_feature_parity.py b/tests/test_basic_feature_parity.py new file mode 100644 index 000000000..a0744781c --- /dev/null +++ b/tests/test_basic_feature_parity.py @@ -0,0 +1,25 @@ +import json +import unittest +from tools import test_basic_feature_parity as features + + +class BasicFeatureCorpusTests(unittest.TestCase): + def test_native_feature_types_partial_mutations_and_wrapped_origins(self): + fixtures = list(features.corpus()) + self.assertEqual(fixtures, list(features.corpus())) + kinds = {v.get('type') for f in fixtures if isinstance(v := json.loads(f['definition']), dict)} + self.assertTrue({'void_start_platform', 'end_island', 'end_platform'} <= kinds) + self.assertEqual({f['legacy'] for f in fixtures}, {False, True}) + self.assertEqual({f['fail'] for f in fixtures}, {-1, 0, 7, 63}) + self.assertEqual({f['reject'] for f in fixtures}, {0, 3}) + self.assertTrue(any(f['origin'][0] == 2**31 - 1 for f in fixtures)) + self.assertTrue(any(f['origin'][1] == -2**31 for f in fixtures)) + self.assertTrue(any(f['repeats'] == 2 for f in fixtures)) + composed = [f for f in fixtures if 'placement' in f] + self.assertTrue(any(not f['placement'] for f in composed)) + self.assertTrue(any(len(f['placement']) > 1 and f['fail'] == 7 for f in composed)) + self.assertTrue(any(any(p['type'] == 'height_range' for p in f['placement']) for f in composed)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_biome_chunk_parity.py b/tests/test_biome_chunk_parity.py new file mode 100644 index 000000000..3d411af13 --- /dev/null +++ b/tests/test_biome_chunk_parity.py @@ -0,0 +1,34 @@ +import unittest +from tools import test_biome_chunk_parity as chunk + + +class BiomeChunkCorpusTests(unittest.TestCase): + def test_bounds_section_failure_and_query_coverage(self): + fixtures = list(chunk.corpus()) + self.assertEqual(fixtures, list(chunk.corpus())) + self.assertEqual(len(fixtures), 40) + self.assertTrue(any(f['height'] == 4064 for f in fixtures)) + self.assertTrue(any(f['cx'] == -(2**31) for f in fixtures)) + for f in fixtures: + self.assertEqual({op[2] for op in f['ops']}, {-1, 0, 63, 64, 65}) + self.assertTrue(any(op[3] % 16 != 0 for op in f['ops'])) + for op in f['ops']: + self.assertTrue(f['min'] <= op[3] <= op[4] < f['min'] + f['height']) + self.assertTrue(1 <= op[1] <= 512) + for q in f['queries']: + self.assertTrue(all(-(2**31) <= v < 2**31 for v in q)) + + def test_retained_keys_direct_holders_and_resolver_creation_timing(self): + fixtures = [f for f in chunk.corpus() if 'resolver_queries' in f] + self.assertEqual(len(fixtures), 20) + self.assertTrue(any(f['min'] > 0 for f in fixtures)) + self.assertTrue(any(f['min'] + f['height'] <= 0 for f in fixtures)) + for f in fixtures: + expected = {(False, False), (False, True), (True, False), (True, True)} + self.assertEqual({tuple(op[5:7]) for op in f['ops'] if len(op) > 5}, expected) + self.assertEqual({tuple(q[4:6]) for q in f['resolver_queries']}, expected) + self.assertEqual({q[0] for q in f['resolver_queries']}, {-1, 0, 1, 2, 3, 4, 511}) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_biome_generation_parity.py b/tests/test_biome_generation_parity.py new file mode 100644 index 000000000..b39ce132e --- /dev/null +++ b/tests/test_biome_generation_parity.py @@ -0,0 +1,41 @@ +import json +import unittest +from tools import test_biome_generation_parity as generation + + +class BiomeGenerationCorpusTests(unittest.TestCase): + def test_router_preset_seed_and_clipped_generation_coverage(self): + bundle = {'settings': {'minecraft:overworld': json.dumps({'noise': {'min_y': -64, 'height': 384}})}, + 'presets': {'minecraft:overworld': '[]', 'minecraft:nether': '[]'}} + all_fixtures = list(generation.corpus(bundle)) + self.assertEqual({f.get('source', 'multi') for f in all_fixtures}, {'multi', 'fixed', 'checkerboard', 'end'}) + fixtures = [f for f in all_fixtures if 'source' not in f and not f.get('retrogen')] + self.assertEqual(all_fixtures, list(generation.corpus(bundle))) + self.assertEqual(len(fixtures), 12) + self.assertEqual(sum(f['repeats'] for f in fixtures), 16) + self.assertEqual({f['preset'] for f in fixtures}, set(bundle['presets'])) + self.assertEqual({f['legacy'] for f in fixtures}, {False, True}) + self.assertTrue(any(f['write_min'] > f['min'] for f in fixtures)) + self.assertTrue(any(abs(f['cx']) > 1_000_000 for f in fixtures)) + for f in fixtures: + self.assertEqual(len(f['queries']), 180) + self.assertTrue(any(q[1] < f['min'] for q in f['queries'])) + self.assertTrue(any(q[1] >= f['min'] + f['height'] for q in f['queries'])) + + def test_upgrade_height_all_sources_and_retained_cave_candidates(self): + bundle = {'settings': { + 'minecraft:overworld': json.dumps({'noise': {'min_y': -64, 'height': 384}}), + 'minecraft:end': json.dumps({'noise': {'min_y': 0, 'height': 128}})}, + 'presets': {'minecraft:overworld': '[]', 'minecraft:nether': '[]'}} + fixtures = [f for f in generation.corpus(bundle) if f.get('retrogen')] + self.assertEqual(len(fixtures), 36) + self.assertEqual({f['setting'] for f in fixtures}, {'minecraft:overworld'}) + self.assertEqual({f.get('source', 'multi') for f in fixtures}, {'multi', 'fixed', 'checkerboard', 'end'}) + self.assertEqual({f['fixed_biome'] for f in fixtures if 'fixed_biome' in f}, + {'minecraft:lush_caves', 'minecraft:dripstone_caves', 'minecraft:deep_dark'}) + self.assertTrue(all((f['write_min'], f['write_max'], f['repeats']) == (-64, -1, 2) for f in fixtures)) + self.assertTrue(all(any(q[1] == 0 for q in f['queries']) for f in fixtures)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_biome_placement_parity.py b/tests/test_biome_placement_parity.py new file mode 100644 index 000000000..11b1ce200 --- /dev/null +++ b/tests/test_biome_placement_parity.py @@ -0,0 +1,20 @@ +import unittest +from tools import test_biome_placement_parity as biome + + +class BiomePlacementCorpusTests(unittest.TestCase): + def test_context_membership_nested_placers_and_partial_failures(self): + fixtures = list(biome.corpus()) + self.assertEqual({f['top'] for f in fixtures}, {False, True}) + self.assertEqual({f['direct'] for f in fixtures}, {False, True}) + self.assertEqual({f['nested'] for f in fixtures}, {False, True}) + self.assertEqual({f['worldgen'] for f in fixtures}, {False, True}) + self.assertEqual({f['legacy'] for f in fixtures}, {False, True}) + self.assertEqual({mode for f in fixtures for mode in f['membership']}, {0, 1, 2, 3}) + self.assertTrue(all(f['placement'] == [{'type': 'biome'}] for f in fixtures if f['direct'])) + self.assertTrue(any(f['query_fail'] == 1 for f in fixtures)) + self.assertTrue(any(f['feature_fail'] == 2 for f in fixtures)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_biome_source_codec_parity.py b/tests/test_biome_source_codec_parity.py new file mode 100644 index 000000000..924f3d306 --- /dev/null +++ b/tests/test_biome_source_codec_parity.py @@ -0,0 +1,23 @@ +import json +import unittest +from tools import test_biome_source_codec_parity as codec + + +class BiomeSourceCodecCorpusTests(unittest.TestCase): + def test_registry_holders_fallbacks_and_numeric_boundaries(self): + bundle = {'biomes': {'minecraft:plains': ''}, 'biome_tags': {'minecraft:is_overworld': ''}} + fixtures = list(codec.corpus(bundle)) + self.assertEqual(fixtures, list(codec.corpus(bundle))) + values = [json.loads(f) for f in fixtures] + objects = [v for v in values if isinstance(v, dict)] + self.assertTrue({'fixed', 'checkerboard', 'the_end', 'multi_noise'} <= {v.get('type') for v in objects}) + self.assertTrue(any(v.get('biomes') == '#minecraft:is_overworld' for v in objects)) + self.assertTrue(any(v.get('biomes') == [] and v.get('preset') == 'overworld' for v in objects)) + self.assertTrue(any(v.get('preset') == {'preset': 'nether'} for v in objects)) + self.assertTrue(any('4294967298' in f for f in fixtures)) + self.assertTrue(any('"scale":-1,"scale":2' in f for f in fixtures)) + self.assertEqual(len(codec.positions()), 7) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_biome_source_parity.py b/tests/test_biome_source_parity.py new file mode 100644 index 000000000..40b62aa69 --- /dev/null +++ b/tests/test_biome_source_parity.py @@ -0,0 +1,23 @@ +import unittest +from tools import test_biome_source_parity as source + + +class BiomeSourceCorpusTests(unittest.TestCase): + def test_shift_threshold_failure_and_wrapped_coordinate_coverage(self): + fixtures = list(source.corpus()) + self.assertEqual(fixtures, list(source.corpus())) + self.assertEqual({f['kind'] for f in fixtures}, {'fixed', 'checkerboard', 'end'}) + checker = [f for f in fixtures if f['kind'] == 'checkerboard'] + self.assertTrue(set(range(63)) <= {f['scale'] for f in checker}) + self.assertTrue(any(not f['biomes'] for f in checker)) + self.assertTrue(any(len(f['biomes']) != len(set(f['biomes'])) for f in checker)) + self.assertTrue(any(len(f['biomes']) == 512 for f in checker)) + end = [f for f in fixtures if f['kind'] == 'end'] + self.assertTrue(any(f['fail'] for f in end)) + self.assertTrue({'3e800000', 'bd800000', 'be600000', '7fc00000'} <= {f['bits'] for f in end}) + self.assertIn([-(2**31), 0, 2**31-1], fixtures[0]['positions']) + self.assertIn([256, 0, 0], fixtures[0]['positions']) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_biome_temperature_parity.py b/tests/test_biome_temperature_parity.py new file mode 100644 index 000000000..5b356f383 --- /dev/null +++ b/tests/test_biome_temperature_parity.py @@ -0,0 +1,33 @@ +import unittest +import json +from tools import test_biome_temperature_parity as biome + + +class BiomeTemperatureCorpusTests(unittest.TestCase): + def test_temperature_edges_packed_aliases_and_cache_eviction(self): + fixtures=list(biome.corpus()) + self.assertEqual(fixtures,list(biome.corpus())) + self.assertEqual(len(fixtures),204) + self.assertEqual({(f['modifier'],f['precipitation']) for f in fixtures},{('NONE',False),('NONE',True),('FROZEN',False),('FROZEN',True)}) + self.assertTrue({'3e199999','3e19999a','3e19999b','7f800000','ff800000','7fc00000'}<={f['base'] for f in fixtures}) + isolated=[f for f in fixtures if any(op[0]=='thread' for op in f['ops'])] + self.assertEqual(len(isolated),12) + self.assertEqual({f['ops'][2][1] for f in isolated},{0,1023}) + self.assertTrue(all(f['ops'][0]==['fill',1024,0,63] for f in isolated)) + queries=[op[1:] for op in fixtures[0]['ops'] if op[0]=='query'] + self.assertIn([0,80,0,63],queries) + self.assertIn([0,81,0,63],queries) + self.assertIn([2**26,4032,-2**26,63],queries) + + def test_climate_codec_fields_and_float_rounding_edges(self): + fixtures=list(biome.codec_corpus({'horizon:test':'{"has_precipitation":false,"temperature":0,"downfall":1}'})) + self.assertEqual(fixtures,list(biome.codec_corpus({'horizon:test':'{"has_precipitation":false,"temperature":0,"downfall":1}'}))) + decoded=[json.loads(f['json']) for f in fixtures] + self.assertIn({'has_precipitation':True,'temperature':0.5,'downfall':0.5},decoded) + self.assertIn({'has_precipitation':True,'temperature':0.5,'downfall':0.5,'temperature_modifier':None},decoded) + self.assertTrue(any('1.000000059604644775390626' in f['json'] for f in fixtures)) + self.assertTrue(any('1e1000' in f['json'] for f in fixtures)) + self.assertTrue(any('"temperature":0.2,"temperature":null' in f['json'] for f in fixtures)) + + +if __name__=='__main__':unittest.main() diff --git a/tests/test_biome_zoom_parity.py b/tests/test_biome_zoom_parity.py new file mode 100644 index 000000000..9f792d79a --- /dev/null +++ b/tests/test_biome_zoom_parity.py @@ -0,0 +1,20 @@ +import unittest +from tools import test_biome_zoom_parity as zoom + + +class BiomeZoomCorpusTests(unittest.TestCase): + def test_seed_coordinate_and_double_boundary_coverage(self): + fixtures = list(zoom.corpus()) + self.assertEqual(fixtures, list(zoom.corpus())) + self.assertEqual({f[0] for f in fixtures}, {'s', 'b', 'p'}) + self.assertIn('s -9223372036854775808', fixtures) + self.assertIn('s 9223372036854775807', fixtures) + self.assertIn('b 0 -2147483648 0 2147483647', fixtures) + self.assertIn('b 1 -1 0 1', fixtures) + self.assertIn('p 7ff0000000000000 fff0000000000000 7ff8000000000000', fixtures) + self.assertIn('p 0000000000000001 8000000000000001 fff8000000000000', fixtures) + self.assertEqual(sum(f.startswith('s ') for f in fixtures), 4104) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_block_properties_parity.py b/tests/test_block_properties_parity.py new file mode 100644 index 000000000..9f1eacf3f --- /dev/null +++ b/tests/test_block_properties_parity.py @@ -0,0 +1,19 @@ +import unittest +from tools import test_block_properties_parity as properties + + +class BlockPropertiesCorpusTests(unittest.TestCase): + def test_cache_flags_empty_shapes_and_threshold_cases(self): + fixtures=list(properties.corpus()) + self.assertEqual(fixtures,list(properties.corpus())) + self.assertEqual({(f['on'],f['off'],f['cached']) for f in fixtures}, + {(a,b,c) for a in [False,True] for b in [False,True] for c in [False,True]}) + self.assertEqual({f['occludes'] for f in fixtures},{False,True}) + self.assertTrue(any(not f['shape'] for f in fixtures)) + self.assertTrue(any(len(f['shape'])>1 for f in fixtures)) + self.assertGreater(len(fixtures),8000) + for f in fixtures: + for box in f['shape']:self.assertEqual(len(box),6) + + +if __name__=='__main__':unittest.main() diff --git a/tests/test_block_state_codec_parity.py b/tests/test_block_state_codec_parity.py new file mode 100644 index 000000000..95777bc37 --- /dev/null +++ b/tests/test_block_state_codec_parity.py @@ -0,0 +1,19 @@ +import json +import unittest +from tools import test_block_state_codec_parity as block + + +class BlockStateCodecCorpusTests(unittest.TestCase): + def test_modes_property_defaults_and_integer_boundaries(self): + facts={'states':[{'id':'minecraft:stone'},{'id':'minecraft:water','properties':{'level':'0'}}], 'defaults':{'minecraft:stone':0,'minecraft:water':1},'integers':[['minecraft:water','level']]} + fixtures=list(block.corpus(facts)) + self.assertEqual(fixtures,list(block.corpus(facts))) + self.assertEqual({f[0] for f in fixtures},{False,True}) + values=[json.loads(f[1]) for f in fixtures] + for value in ['+01','-2147483649','\u0660\u0661','\uff10\uff11','\U0001d7d9']: + self.assertIn({'id':'minecraft:water','properties':{'level':value}},values) + self.assertIn({'id':'minecraft:stone','properties':False},values) + self.assertTrue(any('"level":"0","level":"1"' in f[1] for f in fixtures)) + + +if __name__=='__main__':unittest.main() diff --git a/tests/test_block_survival_parity.py b/tests/test_block_survival_parity.py new file mode 100644 index 000000000..13bd63b01 --- /dev/null +++ b/tests/test_block_survival_parity.py @@ -0,0 +1,72 @@ +import unittest +import tempfile +from pathlib import Path +from tools import test_block_survival_parity as survival + + +class SurvivalCheckpointTests(unittest.TestCase): + def test_resume_rejects_changed_sources_environment_inputs_and_executables(self): + with tempfile.TemporaryDirectory() as directory: + root=Path(directory);fixture=root/'fixture';binary=root/'binary';path=root/'checkpoint.json' + fixture.write_bytes(b'original input');binary.write_bytes(b'original executable') + sources={'source.rs':'original'};environment={'java':'pinned'} + checkpoint={'schema':1,'sources_sha256':sources,'environment':environment,'fixtures_sha256':{str(fixture):survival.lab.digest(fixture,'sha256')},'artifacts_sha256':{str(binary):survival.lab.digest(binary,'sha256')}} + survival.save_checkpoint(path,checkpoint) + self.assertEqual(survival.load_checkpoint(path,sources,environment),checkpoint) + for changed_sources,changed_environment in [({'source.rs':'edited'},environment),(sources,{'java':'different'})]: + with self.assertRaises(ValueError):survival.load_checkpoint(path,changed_sources,changed_environment) + for artifact in [fixture,binary]: + original=artifact.read_bytes();artifact.write_bytes(b'changed') + with self.assertRaises(ValueError):survival.load_checkpoint(path,sources,environment) + artifact.unlink() + with self.assertRaises(ValueError):survival.load_checkpoint(path,sources,environment) + artifact.write_bytes(original) + self.assertEqual(survival.load_checkpoint(path,sources,environment),checkpoint) + + +class BlockSurvivalCorpusTests(unittest.TestCase): + def test_definition_dispatch_preserves_virtual_support_methods(self): + classes = {'a': 'VegetationBlock', 'b': 'VegetationBlock', 'c': 'VegetationBlock', 'd': 'DoublePlantBlock', 'e': 'DoublePlantBlock'} + placement = {'a': 'VegetationBlock', 'b': 'StemBlock', 'c': 'UnknownVegetationBlock', 'd': 'VegetationBlock', 'e': 'UnknownPlantBlock'} + tags = {'b': {'stemSupportBlocks': 'minecraft:supports_melon_stem', 'fruitSupportBlocks': 'minecraft:wrong_for_survival'}} + rules = survival.bind_definitions(classes, placement, tags) + self.assertEqual(rules, {'a': 'TagBelow:minecraft:supports_vegetation', 'b': 'TagBelow:minecraft:supports_melon_stem', 'd': 'DoublePlant'}) + with self.assertRaises(KeyError): + survival.bind_definitions(classes, placement, {}) + + def test_branching_neighbor_sequences_and_candidate_properties(self): + names=['air','stone','end_stone','chorus_plant','chorus_flower','scaffolding','bell','pitcher_crop'] + states=[{'id':'minecraft:'+name,'properties':{}} for name in names] + states += [dict(states[-2],properties={'attachment':'ceiling','facing':'north'}),dict(states[-1],properties={'half':'upper'})] + facts={'states':states,'defaults':{'minecraft:'+name:index for index,name in enumerate(names)}} + definitions={states[i]['id']:rule for i,rule in [(3,'ChorusPlant'),(4,'ChorusFlower'),(5,'Scaffolding'),(6,'Bell'),(7,'PitcherCrop')]} + seen=set();long_failures=set();brightness=set();upper_brightness=set() + for fixture in survival.corpus(facts,definitions): + seen.add(fixture['state']) + if len(fixture['neighbors'])==10:long_failures.add(fixture['fail']) + if 'brightness' in fixture: + brightness.add(fixture['brightness']) + if fixture['state']==9:upper_brightness.add(fixture['brightness']) + self.assertEqual(seen,{3,4,5,6,7,8,9}) + self.assertEqual(long_failures,{-1,*range(10)}) + self.assertTrue({7,8,9}.issubset(brightness)) + self.assertEqual(upper_brightness,brightness) + + def test_supported_candidates_and_query_transitions(self): + names = ['minecraft:air', 'minecraft:stone', 'minecraft:shulker_box', 'minecraft:moving_piston', 'minecraft:pale_moss_carpet', 'minecraft:unsupported'] + facts = {'states': [{'id': name, 'properties': {'bottom': 'true'}} for name in names], 'defaults': dict(zip(names, range(len(names))))} + definitions = {names[0]: 'Always', names[1]: 'RigidOrCenterBelow', names[4]: 'MossCarpet'} + fixtures = list(survival.corpus(facts, definitions)) + self.assertEqual(fixtures, list(survival.corpus(facts, definitions))) + self.assertEqual({f['state'] for f in fixtures}, {0, 1, 4}) + self.assertEqual(len([f for f in fixtures if f['state'] == 0]), 1) + self.assertTrue(any(f['neighbors'] == [2, 3] for f in fixtures)) + self.assertTrue(any(f['fail'] == 1 and f['entity_fail'] == 0 for f in fixtures)) + self.assertEqual({f['entity'] for f in fixtures}, {'none', 'closed', 'opened'}) + self.assertTrue(any(-2147483648 in f['position'] for f in fixtures)) + for candidate in [1, 4]: + self.assertTrue(all(any(f['state'] == candidate and f['neighbors'] == [neighbor] and f['fail'] == -1 for f in fixtures) for neighbor in range(len(names)))) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_bulk_section_parity.py b/tests/test_bulk_section_parity.py new file mode 100644 index 000000000..6ef998d36 --- /dev/null +++ b/tests/test_bulk_section_parity.py @@ -0,0 +1,22 @@ +import unittest +from tools import test_bulk_section_parity as bulk + + +class BulkSectionCorpusTests(unittest.TestCase): + def test_all_state_cycles_cache_aliases_and_vertical_bounds(self): + facts = {'states': list(range(5)), 'defaults': {'minecraft:air': 0, 'minecraft:cave_air': 1, 'minecraft:void_air': 2, 'minecraft:stone': 3, 'minecraft:water': 4}} + fixtures = list(bulk.corpus(facts)) + self.assertEqual(fixtures, list(bulk.corpus(facts))) + self.assertEqual({f['min'] for f in fixtures}, {-2032, -64, 0, 1968}) + self.assertEqual({f['prime'] for f in fixtures}, {False, True}) + self.assertTrue(all([4194304, 0] in f['chunks'] for f in fixtures)) + self.assertTrue(all(['reset'] in f['ops'] for f in fixtures)) + for f in fixtures: + self.assertTrue(any(op[:2] == ['get', 67108864] for op in f['ops'])) + if f['min'] == -64: + inserted = {op[4] for op in f['ops'] if op[:4] == ['set', 0, -63, 0]} + self.assertEqual(inserted, set(range(5))) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_canyon_carver_parity.py b/tests/test_canyon_carver_parity.py new file mode 100644 index 000000000..0ae46fe16 --- /dev/null +++ b/tests/test_canyon_carver_parity.py @@ -0,0 +1,20 @@ +import json +import unittest +from tools import test_canyon_carver_parity as canyon + + +class CanyonCarverCorpusTests(unittest.TestCase): + def test_heights_custom_widths_and_failures(self): + config={'type':'minecraft:canyon','probability':0.01,'y':{'absolute':40},'vertical_rotation':0,'shape':{'width_smoothness':3,'distance_factor':1,'thickness':3,'horizontal_radius_factor':1,'vertical_radius_default_factor':1,'vertical_radius_center_factor':0,'y_scale':3}} + fixtures=list(canyon.corpus({'canyon':json.dumps(config)})) + self.assertEqual(fixtures,list(canyon.corpus({'canyon':json.dumps(config)}))) + self.assertEqual({f['context'][1] for f in fixtures},{16,128,384,4064}) + self.assertEqual({f['fail'] for f in fixtures},{-1,0,1,63}) + self.assertTrue(any(f['target']==[-2**31,2**31-1] for f in fixtures)) + definitions=[json.loads(f['definition']) for f in fixtures] + shapes=[d['shape'] for d in definitions if isinstance(d,dict) and isinstance(d.get('shape'),dict)] + self.assertTrue(any(s.get('width_smoothness')==2**31-1 for s in shapes)) + self.assertTrue(any(s.get('distance_factor')==0 for s in shapes)) + + +if __name__=='__main__':unittest.main() diff --git a/tests/test_carving_geometry_parity.py b/tests/test_carving_geometry_parity.py new file mode 100644 index 000000000..649a50f6c --- /dev/null +++ b/tests/test_carving_geometry_parity.py @@ -0,0 +1,22 @@ +import unittest +from tools import test_carving_geometry_parity as geometry + + +class CarvingGeometryCorpusTests(unittest.TestCase): + def test_shape_boundaries_ieee_values_and_output_failures(self): + fixtures = list(geometry.corpus()) + self.assertEqual(fixtures, list(geometry.corpus())) + self.assertEqual(len(fixtures), 15) + shapes = [e for f in fixtures for e in f['ellipsoids']] + self.assertEqual(len(shapes), 690) + self.assertEqual({e['skip'] for e in shapes}, {0, 1, 2, 3}) + self.assertEqual({e['fail'] for e in shapes}, {-1, 0, 1, 63}) + self.assertIn(geometry.bits(float('nan')), {e['horizontal'] for e in shapes}) + self.assertIn(geometry.bits(-0.), {e['vertical'] for e in shapes}) + reach = list(geometry.reach_corpus()) + self.assertEqual(reach, list(geometry.reach_corpus())) + self.assertTrue(any(q[4] == -2**31 and q[5] == 2**31 - 1 for q in reach)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_carving_mask_parity.py b/tests/test_carving_mask_parity.py new file mode 100644 index 000000000..29c19168e --- /dev/null +++ b/tests/test_carving_mask_parity.py @@ -0,0 +1,20 @@ +import unittest +from tools import test_carving_mask_parity as carving + + +class CarvingMaskCorpusTests(unittest.TestCase): + def test_sparse_dense_wrap_and_mutating_traversal_coverage(self): + fixtures = list(carving.corpus()) + self.assertEqual(fixtures, list(carving.corpus())) + self.assertTrue(any(f['max'] - f['min'] + 1 == 4064 for f in fixtures)) + self.assertTrue(any(f['min'] == -2**31 for f in fixtures)) + self.assertTrue(any(f['max'] == 2**31 - 1 for f in fixtures)) + ops = [op for f in fixtures for op in f['ops']] + self.assertEqual({op['kind'] for op in ops}, {'carve', 'fill', 'visit', 'read'}) + self.assertTrue(any(op.get('fail') == 0 and op.get('add') for op in ops)) + self.assertTrue(any(op.get('fail') == 63 for op in ops)) + self.assertTrue(any(op.get('pos', [0])[0] == -2**31 for op in ops)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_cave_carver_parity.py b/tests/test_cave_carver_parity.py new file mode 100644 index 000000000..1f25f850b --- /dev/null +++ b/tests/test_cave_carver_parity.py @@ -0,0 +1,21 @@ +import json +import unittest +from tools import test_cave_carver_parity as cave + + +class CaveCarverCorpusTests(unittest.TestCase): + def test_seeds_origin_neighborhoods_and_partial_failures(self): + config={'type':'minecraft:cave','count':0,'probability':0.15,'thickness':1,'y':{'absolute':40},'floor_level':-0.7} + resources={'cave':json.dumps(config),'nether_cave':json.dumps(config)} + fixtures=list(cave.corpus(resources)) + self.assertEqual(fixtures,list(cave.corpus(resources))) + self.assertEqual({f['legacy'] for f in fixtures},{False,True}) + self.assertEqual({f['fail'] for f in fixtures},{-1,0,1,63}) + self.assertTrue(any(f['target']==[-2**31,2**31-1] for f in fixtures)) + self.assertTrue(any(f['origin']==[8,-8] for f in fixtures)) + self.assertTrue(any(f['repeats']==2 for f in fixtures)) + definitions=[json.loads(f['definition']) for f in fixtures] + self.assertTrue(any(isinstance(v,dict) and v.get('thickness')==6 for v in definitions)) + + +if __name__=='__main__':unittest.main() diff --git a/tests/test_chunk_stage_parity.py b/tests/test_chunk_stage_parity.py new file mode 100644 index 000000000..20bd88cbf --- /dev/null +++ b/tests/test_chunk_stage_parity.py @@ -0,0 +1,22 @@ +import unittest +from tools import test_chunk_stage_parity as stages + + +class ChunkStageCorpusTests(unittest.TestCase): + def test_all_stages_state_writes_and_reverse_transitions(self): + names = ['air', 'cave_air', 'void_air', 'stone', 'water', 'lava', 'oak_leaves', 'oak_slab', 'seagrass', 'snow', 'powder_snow', 'glass', 'barrier'] + facts = {'states': names, 'defaults': {'minecraft:' + name: i for i, name in enumerate(names)}} + fixtures = list(stages.corpus(facts)) + self.assertEqual(fixtures, list(stages.corpus(facts))) + expected = {'empty', 'structure_starts', 'structure_references', 'biomes', 'terrain', 'features'} + self.assertEqual({op[1] for f in fixtures for op in f['ops'] if op[0] == 'stage'}, expected) + for f in fixtures[:2]: + self.assertEqual({op[4] for op in f['ops'] if op[0] == 'set'}, set(range(len(names)))) + self.assertTrue(any(f['height'] == 4064 for f in fixtures)) + self.assertTrue(any(op[0] == 'set' and op[2] < f['min'] for f in fixtures for op in f['ops'])) + self.assertTrue(any(op[0] == 'set' and op[2] >= f['min'] + f['height'] for f in fixtures for op in f['ops'])) + self.assertTrue(any([op[1] for op in f['ops'] if op[0] == 'stage'][-1] == 'empty' for f in fixtures[2:])) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_decoration_parity.py b/tests/test_decoration_parity.py new file mode 100644 index 000000000..ee73d3ec3 --- /dev/null +++ b/tests/test_decoration_parity.py @@ -0,0 +1,22 @@ +import unittest +from tools import test_decoration_parity as decoration + + +class DecorationCorpusTests(unittest.TestCase): + def test_global_indices_foreign_palettes_failures_and_reproducibility(self): + resources = {'a': [[], ['horizon:a', 'horizon:b']], 'b': [['horizon:c'], ['horizon:b']]} + fixtures = list(decoration.corpus(resources)) + self.assertEqual(fixtures, list(decoration.corpus(resources))) + self.assertTrue(any(f['biomes'] == [[[0, 1]], [[1, 0]]] for f in fixtures)) + self.assertTrue(any(len(b) > 12 for f in fixtures for b in f['biomes'])) + self.assertTrue(any(f['palettes'][:8] == [[3]] * 8 and f['palettes'][8] == [1] for f in fixtures)) + for key in ['feature_fail', 'query_fail', 'chunk_fail', 'notify_fail']: + self.assertTrue(any(f[key] >= 0 for f in fixtures)) + for f in fixtures: + self.assertEqual(len(f['palettes']), 9) + self.assertTrue(all(0 <= b <= len(f['biomes']) for p in f['palettes'] for b in p)) + self.assertTrue(all(0 <= feature < len(f['placements']) for b in f['biomes'] for step in b for feature in step)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_decoration_region_parity.py b/tests/test_decoration_region_parity.py new file mode 100644 index 000000000..395bb2d9e --- /dev/null +++ b/tests/test_decoration_region_parity.py @@ -0,0 +1,22 @@ +import unittest +from tools import test_decoration_region_parity as region + + +class DecorationRegionCorpusTests(unittest.TestCase): + def test_real_features_mixed_biomes_live_heights_and_partial_writes(self): + fixtures = list(region.corpus({})) + self.assertEqual(fixtures, list(region.corpus({}))) + self.assertEqual(len(fixtures), 240) + self.assertEqual({f['stage'] for f in fixtures}, {'empty', 'biomes', 'terrain'}) + self.assertEqual({f['write_fail'] for f in fixtures}, {-1, 7}) + self.assertTrue(any(f['palettes'] == [[0]] * 9 for f in fixtures)) + self.assertTrue(any(3 in p for f in fixtures for p in f['palettes'])) + for f in fixtures: + self.assertEqual(len(f['features']), 6) + self.assertEqual(len(f['placements']), len(f['features'])) + self.assertTrue(all(any(m['type'] == 'biome' for m in p) for p in f['placements'])) + self.assertTrue(all(0 <= feature < len(f['features']) for biome in f['biomes'] for step in biome for feature in step)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_density_parity.py b/tests/test_density_parity.py new file mode 100644 index 000000000..7b5a3824f --- /dev/null +++ b/tests/test_density_parity.py @@ -0,0 +1,254 @@ +from collections import Counter +from pathlib import Path +import tempfile +import unittest +from unittest import mock + +from tools import test_density_parity as parity + + +class DensityRunnerTests(unittest.TestCase): + def test_failed_reference_verification_removes_previous_success(self): + with tempfile.TemporaryDirectory() as temp: + report = Path(temp) / "rust-density-parity/report.json" + report.parent.mkdir() + report.write_text('{"previous_success":true}') + with mock.patch.object(parity.lab, "LOCAL", Path(temp)), mock.patch("sys.argv", ["parity"]), \ + mock.patch.object(parity.test_rust_parity, "verify_artifacts", side_effect=ValueError("corrupt artifact")): + with self.assertRaisesRegex(ValueError, "corrupt artifact"): + parity.main() + self.assertFalse(report.exists()) + + def test_corpus_replays_valid_graph_references_and_edge_cases(self): + commands = list(parity.corpus()) + self.assertEqual(commands, list(parity.corpus())) + counts = Counter(line.split()[0] for line in commands) + self.assertEqual(counts["gradient"], 2041) + self.assertEqual(counts["shift"], 1200) + self.assertGreater(counts["query"], 140000) + self.assertEqual(counts["bounds"], 41176) + self.assertEqual(counts["offset"], 816) + self.assertEqual(counts["blended"], 192) + self.assertEqual(counts["blendfail"], 10) + self.assertEqual(counts["blendfbm"], 256) + self.assertEqual(counts["counted"], 3120) + self.assertEqual(counts["context"], 34805) + self.assertEqual(counts["lookup"], 10000) + self.assertEqual(counts["slice"], 384) + self.assertEqual(counts["interpolate"], 384) + self.assertEqual(counts["surface"], 384) + self.assertEqual(counts["sppoints"], 768) + self.assertEqual(counts["spconstant"], 78) + self.assertEqual(counts["spsampler"] + counts["spfail"], 334) + self.assertGreaterEqual(counts["spfail"], 2) + self.assertEqual(counts["sprange"], 13536) + self.assertEqual(counts["greset"], 368) + self.assertEqual(counts["gcompile"], 18282) + self.assertEqual(counts["power"], 1456) + self.assertEqual(counts["gpow"], 1552) + self.assertEqual(counts["round"], 1576) + self.assertEqual(counts["ground"], 880) + self.assertEqual(counts["gsconstant"], 1120) + self.assertEqual(counts["gspoints"], 1456) + self.assertEqual(counts["gspline"], 2160) + self.assertEqual(counts["gseed"], 70) + self.assertEqual(counts["gready"], 70) + self.assertEqual(counts["gregister"], 326) + self.assertEqual(counts["gnoise"], 838) + self.assertEqual(counts["goffset"], 262) + self.assertEqual(counts["gblended"], 64) + self.assertEqual(counts["gend"], 128) + self.assertEqual(counts["gref"], 288) + self.assertEqual(counts["gnamed"], 224) + self.assertEqual(counts["glookup"], 64) + self.assertEqual(counts["wfield"], 96) + self.assertEqual(counts["blenddensity"], 96) + self.assertEqual(counts["gwfield"], 96) + self.assertEqual(counts["gblenddensity"], 176) + self.assertEqual(counts["wcontext"], 20416) + self.assertEqual(counts["ginstance"], 640) + self.assertEqual(counts["ginterval"], 1024) + self.assertEqual(counts["gdistance"], 128) + self.assertEqual({line.split()[1] for line in commands if line.startswith("bounds ")}, set("012345")) + samplers = noises = splines = graph_nodes = graph_splines = graph_noises = 0 + tilings = set() + noise_modes = set() + shift_modes = set() + graph_ready = False + named_functions = set() + for command in commands: + fields = command.split() + if fields[0] in ["greset", "gseed"]: + graph_nodes = 0 + graph_splines = 0 + graph_noises = 0 + graph_ready = False + named_functions.clear() + elif fields[0] in ["gref", "gnamed", "glookup"]: + if fields[0] == "gnamed": + self.assertNotIn(fields[1], named_functions) + self.assertLess(int(fields[2]), graph_nodes) + named_functions.add(fields[1]) + elif fields[0] == "glookup": + self.assertIn(fields[1], named_functions) + else: + self.assertLess(int(fields[1]), graph_nodes) + graph_nodes += 1 + elif fields[0] == "gregister": + self.assertFalse(graph_ready) + self.assertIn(":", fields[1]) + self.assertEqual(len(fields), 7 + int(fields[6])) + graph_noises += 1 + elif fields[0] == "gready": + self.assertFalse(graph_ready) + self.assertGreater(graph_noises, 0) + graph_ready = True + elif fields[0] == "ginstance": + self.assertTrue(graph_ready) + self.assertLess(int(fields[1]), graph_noises) + elif fields[0] == "gnoise": + self.assertTrue(graph_ready) + self.assertLess(int(fields[1]), graph_noises) + for reference in map(int,fields[4:7]): + self.assertLess(reference, graph_nodes) + graph_nodes += 1 + elif fields[0] == "goffset": + self.assertLess(int(fields[1]), graph_noises) + self.assertIn(fields[2], ["0", "1", "2"]) + graph_nodes += 1 + elif fields[0] == "gsconstant": + graph_splines += 1 + elif fields[0] == "gspoints": + self.assertLess(int(fields[1]), graph_nodes) + count = int(fields[2]) + self.assertEqual(len(fields), 3 + 3*count) + for reference in map(int, fields[5::3]): + self.assertLess(reference, graph_splines) + graph_splines += 1 + elif fields[0] == "gspline": + self.assertLess(int(fields[1]), graph_splines) + graph_nodes += 1 + elif fields[0] == "gbind": + self.assertLess(int(fields[1]), samplers) + graph_nodes += 1 + elif fields[0] in ["gconst", "ggradient", "gdistance", "gblended", "gend", "gwfield"]: + graph_nodes += 1 + elif fields[0] == "ginterval": + count = int(fields[2]) + self.assertEqual(len(fields), 4 + 2*count) + for reference in map(int, fields[1:2] + fields[3+count:]): + self.assertLess(reference,graph_nodes) + graph_nodes += 1 + elif fields[0] in ["gunary", "gbinary", "ground", "gpow", "gclamp", "gchoice", "glerp", "gslice", "gcache", "ginterp", "gsurface", "gblenddensity"]: + references = { + "gunary": fields[2:3], "gbinary": fields[2:4], "ground": fields[2:4], "gpow": fields[1:3], "gclamp": fields[1:2], + "gchoice": fields[1:2] + fields[4:6], "glerp": fields[1:4], "gslice": fields[3:4], + "gcache": fields[1:2], "gblenddensity": fields[1:2], "ginterp": fields[1:2], "gsurface": fields[1:3], + }[fields[0]] + for reference in map(int,references): + self.assertLess(reference,graph_nodes) + graph_nodes += 1 + elif fields[0] in ["gcompile", "gtry"]: + self.assertLess(int(fields[2]),graph_nodes) + elif fields[0] in ["ginfo", "gsame"]: + for reference in map(int,fields[1:]): + self.assertLess(reference,graph_nodes) + elif fields[0] in ["cache", "counted"]: + self.assertLess(int(fields[-1]), samplers) + elif fields[0] == "spconstant": + splines += 1 + elif fields[0] == "sppoints": + self.assertLess(int(fields[1]), samplers) + self.assertEqual(len(fields), 3 + int(fields[2])*3) + for reference in map(int, fields[5::3]): + self.assertLess(reference, splines) + splines += 1 + elif fields[0] in ["spsampler", "spfail", "sprange"]: + self.assertLess(int(fields[1]), splines) + elif fields[0] == "surface": + for reference in map(int, fields[2:4]): + self.assertLess(reference, samplers) + self.assertGreater(int(fields[5]), 0) + elif fields[0] == "interpolate": + self.assertLess(int(fields[1]), samplers) + self.assertGreater(int(fields[2]), 0) + self.assertGreater(int(fields[3]), 0) + elif fields[0] == "slice": + self.assertIn(fields[1], list("0123")) + self.assertLess(int(fields[2]), samplers) + elif fields[0] == "offset": + self.assertIn(fields[1], ["0", "1", "2"]) + self.assertLess(int(fields[2]), noises) + elif fields[0] == "interval": + count = int(fields[3]) + references = [fields[2]] + fields[4+count:] + self.assertEqual(len(references), count + 2) + if fields[1] == "1": + self.assertEqual(count, 1) + for reference in map(int, references): + self.assertGreaterEqual(reference, 0) + self.assertLess(reference, samplers) + elif fields[0] in ["choice", "lerp"]: + mode = int(fields[1]) + references = [fields[2]] + if fields[0] == "choice" and mode == 0: + references += fields[5:7] + elif fields[0] == "lerp": + if mode != 1: + references.append(fields[3]) + if mode != 2: + references.append(fields[4]) + for reference in map(int, references): + self.assertGreaterEqual(reference, 0) + self.assertLess(reference, samplers) + elif fields[0] == "wcontext": + self.assertIn(fields[1], ["0", "1"]) + self.assertIn(fields[5], ["0", "1"]) + for reference in map(int,fields[2:5]): + self.assertGreaterEqual(reference, -1) + self.assertLess(reference, samplers) + elif fields[0] == "wfield": + self.assertIn(fields[1], ["0", "1", "2"]) + self.assertGreaterEqual(int(fields[2]), -1) + self.assertLess(int(fields[2]), samplers) + elif fields[0] == "blenddensity": + self.assertLess(int(fields[1]), samplers) + elif fields[0] == "round": + self.assertIn(fields[1], ["0", "1", "2", "3"]) + self.assertGreaterEqual(int(fields[2]), 0) + self.assertLess(int(fields[2]), samplers) + self.assertGreaterEqual(int(fields[3]), -1) + self.assertLess(int(fields[3]), samplers) + elif fields[0] == "power": + self.assertIn(fields[1], ["0", "1", "2"]) + references = fields[2:4] if fields[1] == "0" else fields[3:4] if fields[1] == "1" else fields[2:3] + for reference in map(int,references): + self.assertGreaterEqual(reference, 0) + self.assertLess(reference, samplers) + elif fields[0] in ["unary", "binary"]: + references = fields[2:3] if fields[0] == "unary" else fields[2:4] + for reference in map(int, references): + self.assertGreaterEqual(reference, 0) + self.assertLess(reference, samplers) + elif fields[0] == "shift": + self.assertLess(int(fields[1]), noises) + for reference in map(int, fields[2:]): + self.assertGreaterEqual(reference, -1) + self.assertLess(reference, samplers) + shift_modes.add(int(fields[3]) >= 0) + elif fields[0] == "noise": + noise_modes.add(tuple(fields[1:3])) + noises += 1 + elif fields[0] == "gradient": + tilings.add(tuple(fields[1:3])) + elif fields[0] in ["volume", "query"]: + self.assertLess(int(fields[1]), samplers) + if fields[0] in ["constant", "gradient", "noise", "shift", "unary", "binary", "round", "power", "choice", "lerp", "interval", "offset", "blended", "distance", "cache", "counted", "slice", "interpolate", "surface", "spsampler", "gcompile", "wfield", "blenddensity"]: + samplers += 1 + self.assertEqual(shift_modes, {False, True}) + self.assertEqual(tilings, {(str(axis), str(mode)) for axis in range(3) for mode in range(3)}) + self.assertEqual(noise_modes, {(kind, stream) for kind in ["perlin", "simplex", "smeared", "normal"] for stream in ["legacy", "xoroshiro"]}) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_dynamic_support_parity.py b/tests/test_dynamic_support_parity.py new file mode 100644 index 000000000..6fb189c33 --- /dev/null +++ b/tests/test_dynamic_support_parity.py @@ -0,0 +1,31 @@ +import unittest +from tools import test_dynamic_support_parity as support + + +class DynamicSupportCorpusTests(unittest.TestCase): + def test_entity_states_coordinate_boundaries_and_failures(self): + facts={'states':[{'id':name} for name in ['minecraft:bamboo','minecraft:shulker_box','minecraft:moving_piston','minecraft:stone']], 'defaults':{'minecraft:stone':3}} + fixtures=list(support.corpus(facts,[0,1,2])) + self.assertEqual(fixtures,list(support.corpus(facts,[0,1,2]))) + self.assertEqual({f['entity'] for f in fixtures if f['state']==0},{'none'}) + self.assertEqual({f['entity'] for f in fixtures if f['state']==1},{'none','other','closed','opening','opened','closing'}) + self.assertEqual({f['entity'] for f in fixtures if f['state']==2},{'none','other','piston'}) + self.assertEqual({f['fail'] for f in fixtures},{-1,0,1,5,18}) + self.assertTrue(any(2147483647 in f['position'] for f in fixtures)) + self.assertTrue(any(-2147483648 in f['position'] for f in fixtures)) + + + def test_collision_progress_corpus_preserves_support_cases(self): + facts={'states':[{'id':name} for name in ['minecraft:bamboo','minecraft:shulker_box']], 'defaults':{}} + original=list(support.corpus(facts,[0,1])) + fixtures=list(support.collision_corpus(facts,[0,1])) + self.assertEqual([f for f in fixtures if not f.get('collision')],original) + self.assertTrue(all(f.get('collision') for f in fixtures if 'shulker_progress' in f)) + progress={tuple(f['shulker_progress']) for f in fixtures if 'shulker_progress' in f} + self.assertIn(('00000000','3f800000'),progress) + self.assertIn(('3f800000','00000000'),progress) + self.assertIn(('80000000','00000001'),progress) + self.assertGreater(len(progress),2000) + + +if __name__=='__main__':unittest.main() diff --git a/tests/test_entity_obstruction_parity.py b/tests/test_entity_obstruction_parity.py new file mode 100644 index 000000000..6fb78d40b --- /dev/null +++ b/tests/test_entity_obstruction_parity.py @@ -0,0 +1,19 @@ +import unittest +from tools import test_entity_obstruction_parity as obstruction + + +class EntityObstructionCorpusTests(unittest.TestCase): + def test_shapes_flags_vehicle_chains_and_world_failures(self): + fixtures=list(obstruction.corpus()) + self.assertEqual(fixtures,list(obstruction.corpus())) + self.assertTrue(any(not f['shape'] and f['fail'] for f in fixtures)) + self.assertTrue(any(len(f['shape'])>1 for f in fixtures)) + self.assertTrue(any(f['exclude']>=0 for f in fixtures)) + flags={(e['building'],e['removed'],e['spectator']) for f in fixtures for e in f['entities']} + self.assertEqual(len(flags),8) + self.assertTrue(any(any(e['parent']>=0 for e in f['entities']) for f in fixtures)) + for f in fixtures: + for i,e in enumerate(f['entities']):self.assertTrue(-1<=e['parent']<i) + + +if __name__=='__main__':unittest.main() diff --git a/tests/test_face_support_parity.py b/tests/test_face_support_parity.py new file mode 100644 index 000000000..0b01f061e --- /dev/null +++ b/tests/test_face_support_parity.py @@ -0,0 +1,20 @@ +import math +import unittest +from tools import test_face_support_parity as faces + + +class FaceSupportCorpusTests(unittest.TestCase): + def test_sparse_grids_face_boundaries_and_translations(self): + fixtures=list(faces.corpus()) + self.assertEqual(fixtures,list(faces.corpus())) + self.assertTrue(any(f.get('boxes')==[] for f in fixtures)) + self.assertTrue(any('move' in f for f in fixtures)) + self.assertTrue(any(f.get('cube') for f in fixtures)) + self.assertEqual(len(fixtures[:512]),512) + for f in fixtures: + if 'coords' in f:self.assertEqual(len(f['occupied']),math.prod(len(v)-1 for v in f['coords'])) + else: + for box in f['boxes']:self.assertEqual(len(box),6) + + +if __name__=='__main__':unittest.main() diff --git a/tests/test_feature_catalog_parity.py b/tests/test_feature_catalog_parity.py new file mode 100644 index 000000000..e3f4a1571 --- /dev/null +++ b/tests/test_feature_catalog_parity.py @@ -0,0 +1,24 @@ +import unittest +from tools import test_feature_catalog_parity as catalog + + +class FeatureCatalogCorpusTests(unittest.TestCase): + def test_named_roots_tag_shapes_and_mutation_failures(self): + resources = catalog.catalog() + self.assertEqual(resources, catalog.catalog()) + self.assertEqual(len(resources['features']), 10) + self.assertEqual(len(resources['placed']), 15) + self.assertEqual(len(resources['tags']), 5) + fixtures = list(catalog.corpus()) + self.assertEqual({f['placed_root'] for f in fixtures}, {False, True}) + self.assertEqual({f['worldgen'] for f in fixtures}, {False, True}) + self.assertEqual({f['legacy'] for f in fixtures}, {False, True}) + self.assertTrue(any('#horizon:nested' in f['definition'] for f in fixtures)) + self.assertTrue(any('#horizon:empty' in f['definition'] for f in fixtures)) + self.assertTrue(any('#horizon:invalid' in f['definition'] for f in fixtures)) + self.assertEqual({f['fail'] for f in fixtures}, {-1, 0, 7}) + self.assertEqual({f['reject'] for f in fixtures}, {0, 3}) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_feature_graph_parity.py b/tests/test_feature_graph_parity.py new file mode 100644 index 000000000..413be57f4 --- /dev/null +++ b/tests/test_feature_graph_parity.py @@ -0,0 +1,22 @@ +import json +import unittest +from tools import test_feature_graph_parity as graphs + + +class FeatureGraphCorpusTests(unittest.TestCase): + def test_composition_decoding_failure_and_shared_randomness(self): + definitions = list(graphs.definitions()) + self.assertEqual(definitions, list(graphs.definitions())) + self.assertEqual({d['type'] for d in definitions}, {'no_op', 'overlay', 'sequence', 'random_boolean_selector', 'simple_random_selector', 'random_selector', 'weighted_random_selector'}) + self.assertTrue(any(d.get('features') == [] for d in definitions)) + fixtures = list(graphs.corpus()) + self.assertEqual({f['legacy'] for f in fixtures}, {False, True}) + self.assertEqual({f['fail'] for f in fixtures}, {-1, 0, 7}) + self.assertEqual({f['reject'] for f in fixtures}, {0, 3}) + self.assertTrue(any('placement' in f for f in fixtures)) + self.assertTrue(any('-0.0' in f['definition'] for f in fixtures)) + self.assertTrue(all(isinstance(json.loads(f['definition']), dict) for f in fixtures)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_feature_placement_parity.py b/tests/test_feature_placement_parity.py new file mode 100644 index 000000000..ada15836e --- /dev/null +++ b/tests/test_feature_placement_parity.py @@ -0,0 +1,21 @@ +import unittest +from tools import test_feature_placement_parity as placement + + +class FeaturePlacementCorpusTests(unittest.TestCase): + def test_chains_repeated_failure_and_boolean_results(self): + chains = list(placement.definitions()) + self.assertEqual(chains, list(placement.definitions())) + self.assertIn([], chains) + self.assertTrue(any(len(chain) >= 4 for chain in chains)) + fixtures = list(placement.corpus()) + self.assertEqual(len(fixtures), sum(36 if any(v.get("type") == "count_on_every_layer" for v in chain) else 72 for chain in chains)) + self.assertEqual({f['legacy'] for f in fixtures}, {False, True}) + self.assertEqual({f['fail'] for f in fixtures}, {-1, 0, 2, 5}) + self.assertEqual({f['result'] for f in fixtures}, {0, 1, 2}) + self.assertTrue(any(f['query_fail'] == 1 for f in fixtures)) + self.assertTrue(all(f['positions'][0] == f['positions'][1] for f in fixtures)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_feature_region_parity.py b/tests/test_feature_region_parity.py new file mode 100644 index 000000000..aae14dfd5 --- /dev/null +++ b/tests/test_feature_region_parity.py @@ -0,0 +1,31 @@ +import unittest +from tools import test_feature_region_parity as regions + + +class FeatureRegionCorpusTests(unittest.TestCase): + def test_resident_mutation_contexts_and_failures(self): + facts = {'defaults': {'minecraft:water': 0, 'minecraft:oak_log': 1}, + 'states': [[None, None, None, None, {'id': 'minecraft:water'}], + [None, None, None, None, {'id': 'minecraft:oak_log', 'properties': {'axis': 'y'}}], + [None, None, None, None, {'id': 'minecraft:oak_log', 'properties': {'axis': 'x'}}]]} + fixtures = list(regions.corpus(facts)) + self.assertEqual(fixtures, list(regions.corpus(facts))) + self.assertEqual(sorted(i for f in fixtures for i in f['probe_states']), list(range(len(facts['states'])))) + self.assertTrue(all(len(f['tick_commands']) == 77 for f in fixtures)) + self.assertTrue(all(any(v['type'] == 'spring_feature' for v in f['features']) for f in fixtures)) + self.assertTrue(all([v['active'] for v in f['features'] if v['type'] == 'end_podium'] == [False, True] for f in fixtures)) + self.assertEqual({None if f['write_zone'] is None else tuple(f['write_zone']) for f in fixtures}, {None, (0, 0, 0), (1, 1, 0), (-1, -1, 1), (0, 0, -1)}) + self.assertEqual({f['upgrading'] for f in fixtures}, {False, True}) + self.assertEqual({f['worldgen'] for f in fixtures}, {False, True}) + self.assertEqual({f['legacy'] for f in fixtures}, {False, True}) + self.assertEqual({f['stage'] for f in fixtures}, {'empty', 'terrain'}) + self.assertEqual({f['fail'] for f in fixtures}, {-1, 7}) + self.assertEqual({f['reject'] for f in fixtures}, {0, 3}) + self.assertTrue(all(f['features'][3]['type'] == 'sequence' for f in fixtures)) + self.assertEqual(len(fixtures[0]['features'][3]['features']), 4) + kinds = {m['type'] for f in fixtures for m in f['placement']} + self.assertTrue({'heightmap', 'count_on_every_layer', 'in_square'} <= kinds) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_feature_sort_parity.py b/tests/test_feature_sort_parity.py new file mode 100644 index 000000000..5457bbcb0 --- /dev/null +++ b/tests/test_feature_sort_parity.py @@ -0,0 +1,18 @@ +import unittest +from tools import test_feature_sort_parity as sort + + +class FeatureSortCorpusTests(unittest.TestCase): + def test_identity_duplicates_step_gaps_and_resource_orderings(self): + resources = {'a': [[], ['horizon:a', 'horizon:b']], 'b': [['horizon:c'], ['horizon:a']]} + fixtures = list(sort.corpus(resources)) + self.assertEqual(fixtures, list(sort.corpus(resources))) + self.assertTrue(any(f['biomes'] == [[[0, 1]], [[1, 0]]] for f in fixtures)) + self.assertTrue(any(f['biomes'] == [[[0, 0]], [[]]] for f in fixtures)) + self.assertTrue(any(f['biomes'] == [] for f in fixtures)) + self.assertTrue(any(f['biomes'] == [[], [[], [], []]] for f in fixtures)) + self.assertTrue(any(len(f['biomes']) == 2 and f['biomes'][0] == [[], [0, 1]] and f['biomes'][1] == [[2], [0]] for f in fixtures)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_fill_layer_parity.py b/tests/test_fill_layer_parity.py new file mode 100644 index 000000000..e4988a300 --- /dev/null +++ b/tests/test_fill_layer_parity.py @@ -0,0 +1,20 @@ +import json +import unittest +from tools import test_fill_layer_parity as fill + + +class FillLayerCorpusTests(unittest.TestCase): + def test_exhaustive_states_and_column_failure_cases(self): + states = ['stone', {'id': 'oak_log', 'properties': {'axis': 'x'}}] + fixtures = list(fill.corpus({'states': states})) + decode = [f for f in fixtures if f['repeats'] == 0] + self.assertEqual([json.loads(f['definition'])['state'] for f in decode], states) + self.assertEqual({f['fail'] for f in fixtures}, {-1, 0, 1, 7, 63}) + self.assertEqual({f['legacy'] for f in fixtures}, {False, True}) + self.assertEqual({f['world_min'] for f in fixtures}, {-64, -2147483648, 2147483647}) + heights = {json.loads(f['definition'])['height'] for f in fixtures} + self.assertTrue({-1, 0, 4064, 4065, 4294967297}.issubset(heights)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_float_log_parity.py b/tests/test_float_log_parity.py new file mode 100644 index 000000000..0024cea8e --- /dev/null +++ b/tests/test_float_log_parity.py @@ -0,0 +1,37 @@ +from pathlib import Path +import tempfile +import unittest +from unittest import mock + +from tools import test_float_log_parity as parity + + +class FloatLogRunnerTests(unittest.TestCase): + def test_binary_comparison_rejects_difference_and_truncated_equal_outputs(self): + with tempfile.TemporaryDirectory() as temp: + reference, candidate = Path(temp)/"java.bin", Path(temp)/"rust.bin" + reference.write_bytes(bytes.fromhex("000000003f800000")) + candidate.write_bytes(bytes.fromhex("000000003f800001")) + with self.assertRaisesRegex(ValueError, "float bits 3f800001"): + parity.compare(reference, candidate, 0x3f800000, 2) + candidate.write_bytes(reference.read_bytes()) + self.assertEqual(parity.compare(reference, candidate, 0x3f800000, 2), 2) + with self.assertRaisesRegex(ValueError, "does not cover 3 floats"): + parity.compare(reference, candidate, 0x3f800000, 3) + + def test_exhaustive_range_covers_all_float_bits(self): + self.assertEqual(parity.ranges(True), [(0, 1 << 32)]) + for start, count in parity.ranges(False): + self.assertGreaterEqual(start, 0) + self.assertLessEqual(start + count, 1 << 32) + + def test_failed_verification_removes_old_report(self): + with tempfile.TemporaryDirectory() as temp: + report = Path(temp)/"rust-float-log-parity/report.json" + report.parent.mkdir() + report.write_text('{"old_success":true}') + with mock.patch.object(parity.lab, "LOCAL", Path(temp)), mock.patch("sys.argv", ["parity"]), \ + mock.patch.object(parity.test_rust_parity, "verify_artifacts", side_effect=ValueError("corrupt artifact")): + with self.assertRaisesRegex(ValueError, "corrupt artifact"): + parity.main() + self.assertFalse(report.exists()) diff --git a/tests/test_fluid_parity.py b/tests/test_fluid_parity.py new file mode 100644 index 000000000..0721679e8 --- /dev/null +++ b/tests/test_fluid_parity.py @@ -0,0 +1,17 @@ +import unittest +from tools import test_fluid_parity as fluid + + +class FluidCorpusTests(unittest.TestCase): + def test_liquid_levels_grate_sources_and_query_failures(self): + facts={'states':[{'id':'minecraft:air'},{'id':'minecraft:water','properties':{'level':'0'}},{'id':'minecraft:water','properties':{'level':'8'}},{'id':'minecraft:lava','properties':{'level':'1'}},{'id':'minecraft:copper_grate','properties':{'waterlogged':'true'}},{'id':'minecraft:stone'}]} + fixtures=list(fluid.corpus(facts)) + self.assertEqual(fixtures,list(fluid.corpus(facts))) + self.assertEqual({v['state'] for v in fixtures},set(range(5))) + self.assertEqual({v['above'] for v in fixtures},set(range(5))) + self.assertEqual({v['sturdy'] for v in fixtures},{False,True}) + self.assertEqual({v['fail'] for v in fixtures},{-1,0,1,2}) + self.assertTrue(any(v['position'][1]==2147483647 for v in fixtures)) + + +if __name__=='__main__':unittest.main() diff --git a/tests/test_geometry_parity.py b/tests/test_geometry_parity.py new file mode 100644 index 000000000..783d188dd --- /dev/null +++ b/tests/test_geometry_parity.py @@ -0,0 +1,41 @@ +from pathlib import Path +import tempfile +import unittest +from unittest import mock + +from tools import test_geometry_parity as geometry +from tools import test_collision_parity as collision + + +class GeometryRunnerTests(unittest.TestCase): + def test_bad_artifacts_remove_old_success_reports(self): + for module, name in [(geometry, "rust-geometry-parity"), (collision, "rust-collision-parity")]: + with self.subTest(name=name), tempfile.TemporaryDirectory() as temp: + local = Path(temp) + report = local / name / "report.json" + report.parent.mkdir() + report.write_text('{"previous_success":true}') + with mock.patch.object(module.lab, "LOCAL", local), mock.patch("sys.argv", ["parity"]), \ + mock.patch.object(module.test_rust_parity, "verify_artifacts", side_effect=ValueError("corrupt artifact")): + with self.assertRaisesRegex(ValueError, "corrupt artifact"): + module.main() + self.assertFalse(report.exists()) + + def test_collision_counts_reject_missing_partial_and_inconsistent_coverage(self): + for output in ["", "HORIZON_COLLISION_RESULT {}", 'HORIZON_COLLISION_RESULT {"registry_states":35723,"cached_states":1,"uncached_states":1,"queries":6,"unique_shapes":1}']: + with self.subTest(output=output), self.assertRaises((AssertionError, KeyError)): + collision.counts(output) + + def test_geometry_inputs_are_repeatable_and_include_ieee_boundaries(self): + commands = list(geometry.corpus()) + self.assertEqual(commands, list(geometry.corpus())) + joined = "\n".join(commands) + for value in ["8000000000000000", "7ff0000000000000", "fff0000000000000", "7ff8000000000000", "0000000000000001"]: + self.assertIn(value, joined) + operations = {line.split()[0] for line in commands} + self.assertEqual(operations, {"vec", "box", "block-box", "grid", "query", "many", "motion", "step-motion", "trig-table", "rotation", "traverse", "join", "make-box", "optimize", "join-optimized", "block-iterate", "box-iterate", "sweep", "floor-height"}) + self.assertEqual({int(line.split()[-1]) for line in commands if line.startswith("join-optimized ")}, set(range(16))) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_height_provider_parity.py b/tests/test_height_provider_parity.py new file mode 100644 index 000000000..f9d28d594 --- /dev/null +++ b/tests/test_height_provider_parity.py @@ -0,0 +1,23 @@ +import json +import unittest +from tools import test_height_provider_parity as height + + +class HeightProviderCorpusTests(unittest.TestCase): + def test_anchor_variants_inner_plateaus_and_overflow_contexts(self): + definitions = list(height.definitions()) + self.assertEqual(definitions, list(height.definitions())) + values = [json.loads(raw) for raw in definitions] + objects = [v for v in values if isinstance(v, dict)] + self.assertTrue({'weighted_list', 'constant', 'uniform', 'biased_to_bottom', 'very_biased_to_bottom', 'trapezoid'} <= {v.get('type') for v in objects}) + self.assertTrue(any(v.get('absolute') == 5 and v.get('type') == 'uniform' for v in objects)) + self.assertTrue(any(v.get('inner') == 0 for v in objects)) + self.assertTrue(any(v.get('plateau') == -2**31 for v in objects)) + fixtures = list(height.corpus()) + self.assertEqual(len(fixtures), len(definitions) * 30) + self.assertEqual({f['legacy'] for f in fixtures}, {False, True}) + self.assertTrue(any(f['context'][0] == -2**31 for f in fixtures)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_heightmap_parity.py b/tests/test_heightmap_parity.py new file mode 100644 index 000000000..70c8ffb3b --- /dev/null +++ b/tests/test_heightmap_parity.py @@ -0,0 +1,39 @@ +import unittest +from tools import test_heightmap_parity as heightmap + + +class HeightmapCorpusTests(unittest.TestCase): + def facts(self): + names=["air","cave_air","void_air","stone","water","lava","oak_leaves","oak_slab","seagrass","snow","powder_snow","glass","barrier"] + return {"states":[["minecraft:"+name,name.endswith("air"),name in ["water","lava"],name] for name in names], + "defaults":{"minecraft:"+name:i for i,name in enumerate(names)}} + + def test_every_state_is_inserted_queried_and_removed(self): + facts=self.facts();fixtures=list(heightmap.corpus(facts)) + self.assertEqual(fixtures,list(heightmap.corpus(facts))) + ops=fixtures[0]["ops"] + for i in range(len(facts["states"])): + self.assertEqual(ops[i*3],["set",4,5,7,i,63]) + self.assertEqual(ops[i*3+1],["query",4,7]) + self.assertEqual(ops[i*3+2],["set",4,5,7,facts["defaults"]["minecraft:air"],63]) + + def test_corpus_keeps_vertical_edges_raw_fallbacks_and_traces(self): + fixtures=list(heightmap.corpus(self.facts())) + self.assertIn((-2032,4064),{(f["min"],f["height"]) for f in fixtures}) + for f in fixtures: + self.assertEqual(f["min"]%16,0) + self.assertEqual(f["height"]%16,0) + self.assertGreaterEqual(f["min"],-2032) + self.assertLessEqual(f["min"]+f["height"],2032) + for op in f["ops"]: + if op[0]=="set":self.assertTrue(f["min"]<=op[2]<f["min"]+f["height"]) + ops=[op for f in fixtures for op in f["ops"]] + self.assertTrue(any(op[0]=="raw" and not op[2] for op in ops)) + self.assertTrue(any(op[0]=="raw" and "ffffffffffffffff" in op[2] for op in ops)) + self.assertIn(["prime",0],ops) + self.assertIn(["query",-1,1],ops) + self.assertIn(["query",0,16],ops) + self.assertTrue(any(f["trace"] for f in fixtures)) + + +if __name__=="__main__":unittest.main() diff --git a/tests/test_lab.py b/tests/test_lab.py index 7b2ae4c1f..eddd5835d 100644 --- a/tests/test_lab.py +++ b/tests/test_lab.py @@ -99,9 +99,10 @@ class PublicationTests(unittest.TestCase): for path in [".local/minecraft/source.java", "decompiled/Foo.txt", "game.JAR", "capture.jfr", "source/Foo.java"]: self.assertTrue(check_public_tree.prohibited(path), path) for path in ["tools/lab.py", "crates/voxel-kernels/src/lib.rs", "Cargo.lock", "docs/analysis.md", + "mods/horizon/src/main/java/dev/horizonlab/HorizonLab.java", "mods/horizon-lab/src/main/java/dev/horizonlab/HorizonLab.java"]: self.assertFalse(check_public_tree.prohibited(path), path) - self.assertTrue(check_public_tree.prohibited("mods/horizon-lab/src/main/java/net/minecraft/Client.java")) + self.assertTrue(check_public_tree.prohibited("mods/horizon/src/main/java/net/minecraft/Client.java")) for path in ["tools/JfrSummary.java", "tests/java/JfrFixture.java"]: self.assertFalse(check_public_tree.prohibited(path), path) for path in ["tools/Minecraft.java", "tests/java/Client.java", ".local/tools/JfrSummary.java"]: diff --git a/tests/test_material_condition_parity.py b/tests/test_material_condition_parity.py new file mode 100644 index 000000000..f6a6ed45f --- /dev/null +++ b/tests/test_material_condition_parity.py @@ -0,0 +1,112 @@ +import unittest +import json +from tools import test_material_condition_parity as material + + +class MaterialConditionCorpusTests(unittest.TestCase): + def test_numeric_conditions_cache_updates_and_named_streams(self): + fixtures=list(material.corpus()) + self.assertEqual(fixtures,list(material.corpus())) + self.assertEqual(len(fixtures),48) + self.assertEqual({f['legacy'] for f in fixtures},{False,True}) + conditions=fixtures[0]['conditions'] + self.assertEqual({c[0] for c in conditions},{'hole','steep','y','water','stone','gradient','not'}) + self.assertEqual({c[1][0] for c in conditions if c[0]=='y'},set(range(4))) + self.assertEqual({c[4] for c in conditions if c[0]=='stone'},{False,True}) + gradients=[c for c in conditions if c[0]=='gradient'] + self.assertTrue(any(c[2]==c[3] for c in gradients)) + self.assertTrue(any(c[2]==[0,64] and c[3]==[0,-64] for c in gradients)) + ops=fixtures[0]['ops'] + self.assertEqual(ops[:2],[['eval'],['eval']]) + self.assertTrue(any(op[0]=='add' for op in ops)) + self.assertTrue({'7f800000','ff800000','7fc00000'}<={op[2] for op in ops if op[0]=='input'}) + + def test_codec_mutations_and_named_references(self): + definitions={"horizon:forward":'{"type":"not","invert":"horizon:leaf"}',"horizon:leaf":'{"type":"hole"}'} + fixtures=list(material.codec_corpus(definitions)) + self.assertEqual(len(fixtures),8) + self.assertEqual(fixtures,list(material.codec_corpus(definitions))) + decoded=[json.loads(s) for s in fixtures[0]['json']] + self.assertIn('horizon:forward',decoded) + self.assertIn({'type':'not','invert':'horizon:forward'},decoded) + self.assertIn({'type':'water','offset':0,'surface_depth_multiplier':21,'add_stone_depth':False},decoded) + self.assertIn({'type':'water','offset':0,'surface_depth_multiplier':0,'add_stone_depth':None},decoded) + self.assertTrue(any('4294967296' in s for s in fixtures[0]['json'])) + self.assertIn('{"type":"hole","type":null}',fixtures[0]['json']) + + def test_rule_composition_and_independent_application_positions(self): + fixtures=list(material.rule_corpus({"horizon:test":'{"type":"hole"}'})) + self.assertEqual(fixtures,list(material.rule_corpus({"horizon:test":'{"type":"hole"}'}))) + self.assertEqual(len(fixtures),24) + rules=fixtures[0]['rules'] + self.assertIn(['sequence',[]],rules) + self.assertIn(['sequence',[['block',8]]],rules) + self.assertIn(['band'],rules) + self.assertTrue(any(op[0]=='rule' for op in fixtures[0]['ops'])) + ops=fixtures[0]['ops'] + self.assertEqual(ops[:2],[['apply',0,0,0],['apply',0,0,0]]) + self.assertTrue(any(ops[i][0]=='apply' and ops[i+1][0]=='apply' and ops[i][1:]!=ops[i+1][1:] for i in range(len(ops)-1))) + + def test_noise_supplier_modes_and_nonfinite_thresholds(self): + fixtures=list(material.noise_corpus({'minecraft:surface':'unused'})) + self.assertEqual(len(fixtures),24) + self.assertEqual(fixtures,list(material.noise_corpus({'minecraft:surface':'unused'}))) + self.assertEqual({(f['legacy'],f['real_noise']) for f in fixtures},{(False,False),(False,True),(True,False),(True,True)}) + fake=next(f for f in fixtures if not f['real_noise']) + thresholds={b for c in fake['conditions'] if c[0]=='noise' for b in c[2:4]} + self.assertTrue({'7ff0000000000000','fff0000000000000','7ff8000000000000'}<=thresholds) + self.assertEqual({c[4] for c in fake['conditions'] if c[0]=='noise'},{False,True}) + self.assertEqual(fake['ops'][:2],[['eval'],['eval']]) + self.assertTrue(any(op[0]=='add' for op in fake['ops'])) + + def test_biome_folding_null_results_and_failed_retry_sequences(self): + resources={'minecraft:plains':'unused','minecraft:desert':'unused'} + fixtures=list(material.biome_corpus(resources)) + self.assertEqual(fixtures,list(material.biome_corpus(resources))) + self.assertEqual(len(fixtures),18) + self.assertTrue(any(f['possible_biomes'] is None for f in fixtures)) + self.assertTrue(any(f['possible_biomes']==[] for f in fixtures)) + self.assertIn(['temperature'],fixtures[0]['conditions']) + self.assertIn(['biome',[]],fixtures[0]['conditions']) + self.assertIn(['biome','#throw'],fixtures[0]['ops']) + self.assertIn(['biome',None],fixtures[0]['ops']) + self.assertTrue(any(op[0]=='add' for op in fixtures[0]['ops'])) + + def test_biome_tag_aliases_and_rule_application(self): + biomes={'minecraft:plains':'unused','minecraft:badlands':'unused'} + tags={'minecraft:is_badlands':'unused','horizon:empty':'unused'} + fixtures=list(material.biome_tag_corpus(biomes,tags)) + self.assertEqual(fixtures,list(material.biome_tag_corpus(biomes,tags))) + self.assertEqual(len(fixtures),5) + decoded=[json.loads(value) for value in fixtures[0]['json']] + self.assertIn({'type':'biome','biome_is':'#is_badlands'},decoded) + self.assertIn({'type':'biome','biome_is':'#horizon:empty'},decoded) + self.assertIn({'type':'biome','biome_is':['#minecraft:is_badlands']},decoded) + self.assertTrue(fixtures[0]['rules']) + self.assertTrue(any(op[0]=='apply' for op in fixtures[0]['ops'])) + self.assertIn(['biome',None],fixtures[0]['ops']) + + def test_preliminary_planes_failures_and_scalar_boundaries(self): + fixtures=list(material.preliminary_corpus()) + self.assertEqual(fixtures,list(material.preliminary_corpus())) + self.assertEqual(len(fixtures),61) + self.assertTrue(any(f['volume'][6:]!=[1,1,1] for f in fixtures)) + self.assertEqual({f['ops'][0][2] for f in fixtures},{-1,0,1,3,19}) + self.assertIn(['density','ff800000',-1],fixtures[0]['ops']) + self.assertIn(['density','7fc00000',-1],fixtures[0]['ops']) + self.assertIn(['add',['above']],fixtures[0]['ops']) + self.assertEqual(fixtures[-1]['ops'][1],['minimum']) + + def test_ore_sources_sampling_failures_and_random_modes(self): + fixtures=list(material.ore_corpus()) + self.assertEqual(fixtures,list(material.ore_corpus())) + self.assertEqual(len(fixtures),57) + self.assertEqual({f['legacy'] for f in fixtures},{False,True}) + self.assertTrue(any('7fc00000' in f['ore_values'] for f in fixtures)) + self.assertTrue(any(f['volume'][6:]!=[1,1,1] for f in fixtures)) + self.assertEqual({f['ops'][0][1] for f in fixtures[-9:]},{0,1,2}) + self.assertEqual({f['ops'][0][3] for f in fixtures[-9:]},{0,1,7}) + self.assertTrue(any(op[0]=='rule' for op in fixtures[0]['ops'])) + + +if __name__=='__main__':unittest.main() diff --git a/tests/test_material_extension_parity.py b/tests/test_material_extension_parity.py new file mode 100644 index 000000000..a21b1caa5 --- /dev/null +++ b/tests/test_material_extension_parity.py @@ -0,0 +1,19 @@ +import unittest +from tools import test_material_extension_parity as extension + + +class MaterialExtensionCorpusTests(unittest.TestCase): + def test_column_variants_constants_and_seeded_modes(self): + biomes={'minecraft:plains':'unused','minecraft:frozen_ocean':'unused'} + fixtures=list(extension.corpus(biomes)) + self.assertEqual(fixtures,list(extension.corpus(biomes))) + self.assertEqual({f['legacy'] for f in fixtures},{False,True}) + self.assertTrue(any('noise_bits' not in f for f in fixtures)) + self.assertTrue(any('7fc00000' in f.get('noise_bits',[]) for f in fixtures)) + self.assertTrue(any('7f800000' in f.get('noise_bits',[]) for f in fixtures)) + self.assertTrue({1,2,5,9,10,12}<={v for f in fixtures for v in f['initial']}) + self.assertEqual({op[0] for f in fixtures for op in f['ops']},{'badlands','frozen'}) + self.assertTrue(any(f['limit']==32 for f in fixtures)) + + +if __name__=='__main__':unittest.main() diff --git a/tests/test_material_rule_library_parity.py b/tests/test_material_rule_library_parity.py new file mode 100644 index 000000000..0d9df3b2a --- /dev/null +++ b/tests/test_material_rule_library_parity.py @@ -0,0 +1,24 @@ +import json +import unittest +from tools import test_material_rule_library_parity as rules + + +class MaterialRuleLibraryCorpusTests(unittest.TestCase): + def test_bundled_modes_and_codec_mutations(self): + definitions={'minecraft:leaf':'{"type":"block","result_state":"minecraft:stone"}'} + biomes={'minecraft:plains':'unused','minecraft:desert':'unused'} + fixtures=list(rules.corpus(definitions,biomes)) + self.assertEqual(fixtures,list(rules.corpus(definitions,biomes))) + self.assertEqual(len(fixtures),12) + self.assertEqual({f['legacy'] for f in fixtures},{False,True}) + self.assertTrue(any(f['possible_biomes'] is None for f in fixtures)) + self.assertTrue(all(f['real_noise'] for f in fixtures)) + self.assertTrue(all(f['library_rules']==['minecraft:leaf'] for f in fixtures)) + values=[json.loads(v) for v in fixtures[0]['library_json']] + self.assertIn({'type':'block','result_state':{'id':'minecraft:water','properties':{'level':'+01'}}},values) + self.assertTrue(any(isinstance(v,dict) and v.get('raw_ore_chance')==1.01 for v in values)) + ops=fixtures[0]['ops'] + self.assertTrue(any(ops[i][0]=='apply' and ops[i+1][0]=='apply' and ops[i][1:]!=ops[i+1][1:] for i in range(len(ops)-1))) + + +if __name__=='__main__':unittest.main() diff --git a/tests/test_material_stage_parity.py b/tests/test_material_stage_parity.py new file mode 100644 index 000000000..e1c0e7573 --- /dev/null +++ b/tests/test_material_stage_parity.py @@ -0,0 +1,95 @@ +import json +import unittest +from tools import test_material_stage_parity as stage + + +class MaterialStageCorpusTests(unittest.TestCase): + def test_chunk_boundaries_repeated_builds_and_registry_coverage(self): + names = ['stone', 'water', 'air', 'cave_air', 'void_air', 'oak_log', + 'oak_leaves', 'netherrack', 'end_stone'] + facts = {'defaults': {'minecraft:' + name: i for i, name in enumerate(names)}} + biomes = {'minecraft:plains': '', 'minecraft:eroded_badlands': '', + 'minecraft:frozen_ocean': ''} + fixtures = list(stage.corpus(facts, biomes)) + self.assertEqual(fixtures, list(stage.corpus(facts, biomes))) + self.assertEqual(len(fixtures), 37) + self.assertEqual(sum(f['repeats'] for f in fixtures), 50) + self.assertEqual({f['legacy'] for f in fixtures}, {False, True}) + self.assertTrue(any(f['initial'] == [] for f in fixtures)) + self.assertTrue(any(f['possible'] is None for f in fixtures)) + self.assertTrue(any(f['write_min'] > f['min'] for f in fixtures)) + self.assertTrue(any(f['noise_min'] != f['min'] for f in fixtures)) + self.assertTrue(any(f['cx'] < 0 for f in fixtures)) + for f in fixtures: + self.assertLessEqual(f['min'], f['write_min']) + self.assertLess(f['write_max'], f['min'] + f['height']) + for x, low, z, high, state in f['initial']: + self.assertTrue(0 <= x < 16 and 0 <= z < 16) + self.assertTrue(f['min'] <= low <= high < f['min'] + f['height']) + self.assertIn(state, facts['defaults'].values()) + + def test_generated_chunks_use_each_setting_and_share_the_router_surface_root(self): + names = ['stone', 'water', 'air', 'cave_air', 'void_air', 'oak_log', + 'oak_leaves', 'netherrack', 'end_stone'] + facts = {'defaults': {'minecraft:' + name: i for i, name in enumerate(names)}} + settings = {'minecraft:overworld': json.dumps({ + 'noise': {'min_y': -64, 'height': 384}, 'sea_level': 63, + 'default_block': 'minecraft:stone', 'default_fluid': 'minecraft:water', + 'material_rule': 'minecraft:overworld', + 'noise_router': {'chunk_surface_level': {'type': 'constant', 'argument': 64}}, + 'aquifers': {'barrier': 0}})} + generated = [f for f in stage.corpus(facts, {'minecraft:plains': ''}, settings) if 'router' in f] + self.assertEqual(len(generated), 6) + self.assertEqual(sum(f['repeats'] for f in generated), 8) + self.assertEqual({f['legacy'] for f in generated}, {False, True}) + self.assertTrue(any(abs(f['cx']) > 1_000_000 for f in generated)) + for f in generated: + self.assertEqual(f['preliminary'], f['router']['chunk_surface_level']) + self.assertEqual(f['initial'], []) + self.assertEqual(f['aquifers'], {'barrier': 0}) + self.assertTrue(f['biome_zoom']) + + def test_carving_masks_have_disjoint_runs_and_surface_restoration_inputs(self): + names = ['grass_block', 'mycelium', 'dirt', 'bedrock'] + facts = {'defaults': {'minecraft:' + name: i for i, name in enumerate(names)}} + f = {'min': -64, 'height': 384, 'sea': 63} + result = stage.carving_fixture(f, facts) + self.assertEqual(result['filters'], [0, 1]) + self.assertEqual({q[3] for q in result['initial']}, set(range(4))) + runs = [q for q in result['spans'] if q[:2] == [6, 0]] + self.assertEqual(len(runs), 2) + self.assertLess(runs[1][3] + 1, runs[0][2]) + for x, z, low, high in result['spans']: + self.assertTrue(0 <= x <= 15 and 0 <= z <= 15) + self.assertTrue(-63 <= low <= high <= 312) + + def test_top_queries_cover_water_and_gradient_boundaries(self): + f = {'cx': -1, 'cz': 1875000, 'min': -64, 'height': 384, 'sea': 63} + queries = stage.top_queries(f) + self.assertEqual(len(queries), 96) + self.assertEqual({q[3] for q in queries}, {False, True}) + self.assertEqual({q[1] for q in queries}, {-65, -64, 62, 63, 319, 320}) + self.assertTrue(any(q[0] == -16 and q[2] == 30000000 for q in queries)) + self.assertTrue(any(q[0] == -1 and q[2] == 30000015 for q in queries)) + + def test_generated_neighborhood_uses_preset_possible_biomes(self): + names = ['stone', 'water', 'air', 'cave_air', 'void_air', 'oak_log', 'oak_leaves', 'netherrack', 'end_stone'] + facts = {'defaults': {'minecraft:' + name: i for i, name in enumerate(names)}} + setting = {'noise': {'min_y': 0, 'height': 128}, 'sea_level': 63, + 'default_block': 'minecraft:stone', 'default_fluid': 'minecraft:water', + 'material_rule': 'minecraft:end', 'noise_router': {'chunk_surface_level': 0}} + presets = {'minecraft:overworld': json.dumps([{'biome': 'minecraft:plains'}])} + fixtures = list(stage.corpus(facts, {'minecraft:plains': ''}, {'minecraft:end': json.dumps(setting)}, presets)) + generated = [f for f in fixtures if 'biome_source' in f] + self.assertEqual(len(generated), 6) + self.assertTrue(all(f['biome_source'] == 'end' for f in generated)) + for f in generated: + if f['legacy']: + self.assertEqual(len(f['possible']), 5) + self.assertIn('minecraft:small_end_islands', f['possible']) + else: + self.assertIsNone(f['possible']) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_material_surface_parity.py b/tests/test_material_surface_parity.py new file mode 100644 index 000000000..85665b25f --- /dev/null +++ b/tests/test_material_surface_parity.py @@ -0,0 +1,21 @@ +import unittest +from tools import test_material_surface_parity as material + + +class MaterialSurfaceCorpusTests(unittest.TestCase): + def test_seeded_band_stream_modes_and_boundary_overrides(self): + fixtures=list(material.corpus()) + self.assertEqual(fixtures,list(material.corpus())) + real=[f for f in fixtures if f["overrides"]==[None]*3] + self.assertEqual(len(real),128) + self.assertEqual({(f["legacy"],f["child"]) for f in real},{(False,False),(False,True),(True,False),(True,True)}) + self.assertEqual({f["consume"] for f in real},{-1,0,1,17}) + values={f["overrides"][0] for f in fixtures if f["overrides"][0] is not None} + self.assertTrue({"3dffffff","3e000000","3e000001","be000000","7f800000","ff800000","7fc00001"}<=values) + points=fixtures[0]["points"] + self.assertIn([7,-193,-11],points) + self.assertIn([7,-192,-11],points) + self.assertIn([-2**31,-2**31,2**31-1],points) + + +if __name__=="__main__":unittest.main() diff --git a/tests/test_noise_parity.py b/tests/test_noise_parity.py new file mode 100644 index 000000000..b40d807fb --- /dev/null +++ b/tests/test_noise_parity.py @@ -0,0 +1,43 @@ +from collections import Counter +from pathlib import Path +import tempfile +import unittest +from unittest import mock + +from tools import test_noise_parity as parity + + +class NoiseRunnerTests(unittest.TestCase): + def test_failed_reference_verification_removes_previous_success(self): + with tempfile.TemporaryDirectory() as temp: + report = Path(temp) / "rust-noise-parity/report.json" + report.parent.mkdir() + report.write_text('{"previous_success":true}') + with mock.patch.object(parity.lab, "LOCAL", Path(temp)), mock.patch("sys.argv", ["parity"]), \ + mock.patch.object(parity.test_rust_parity, "verify_artifacts", side_effect=ValueError("corrupt artifact")): + with self.assertRaisesRegex(ValueError, "corrupt artifact"): + parity.main() + self.assertFalse(report.exists()) + + def test_corpus_replays_both_streams_offsets_and_accumulation_modes(self): + commands = list(parity.corpus()) + self.assertEqual(commands, list(parity.corpus())) + counts = Counter(line.split()[0] for line in commands) + self.assertGreater(counts["query"], 190000) + self.assertEqual(counts["local"], 38400) + creates = [line.split() for line in commands if line.startswith("create ")] + self.assertEqual({(line[1], line[2], line[4]) for line in creates}, + {(kind, stream, skip) for stream in ["legacy", "xoroshiro"] + for kind, skip in [("perlin", "0"), ("simplex", "0"), ("simplex", "1"), ("smeared", "0")]}) + self.assertEqual({line.split()[-1] for line in commands if line.startswith("volume ")}, {"0", "1", "2", "3"}) + wrapped = {line.split()[1] for line in commands if line.startswith("wrap ")} + self.assertTrue({"8000000000000000", "7ff0000000000000", "fff0000000000000", "7ff8000000000000", "0000000000000001"} <= wrapped) + normal = [line.split() for line in commands if line.startswith("normal ")] + self.assertEqual({line[1] for line in normal}, {"legacy", "xoroshiro"}) + self.assertEqual({line[3] for line in normal}, {"0", "1", "2", "3"}) + self.assertEqual({line[6] for line in normal}, {"0", "1", "2"}) + self.assertIn("stack 0 ", commands) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_packs.py b/tests/test_packs.py index 9b2e80b1e..a4fcde8f0 100644 --- a/tests/test_packs.py +++ b/tests/test_packs.py @@ -10,18 +10,34 @@ from tools import build_pack, compare_benchmarks, runtime class PackTests(unittest.TestCase): + def test_rebrand_upgrade_retires_legacy_and_current_names(self): + with tempfile.TemporaryDirectory() as temp: + root = Path(temp) + mods = root / "instance/mods" + mods.mkdir(parents=True) + previous = [mods / "horizon-lab-0.20.0.jar", mods / "horizon-0.21.0.jar"] + for old in previous: + with zipfile.ZipFile(old, "w") as archive: + archive.writestr("fabric.mod.json", json.dumps({"id": "horizonlab"})) + new = root / "horizon-0.22.0.jar" + new.write_bytes(b"new original fixture") + runtime.install_original_mod(new, mods) + self.assertTrue(all(not old.exists() for old in previous)) + self.assertEqual(list(mods.iterdir()), [mods / new.name]) + self.assertEqual(len(list((mods.parent / ".horizon-mod-backups").glob("*.jar"))), 2) + def test_original_mod_upgrade_preserves_backup_and_other_mods(self): with tempfile.TemporaryDirectory() as temp: root = Path(temp) mods = root / "instance/mods" mods.mkdir(parents=True) - old = mods / "horizon-lab-0.2.0.jar" + old = mods / "horizon-0.2.0.jar" with zipfile.ZipFile(old, "w") as archive: archive.writestr("fabric.mod.json", json.dumps({"id": "horizonlab"})) old_bytes = old.read_bytes() other = mods / "other.jar" other.write_bytes(b"another mod") - new = root / "horizon-lab-0.3.0.jar" + new = root / "horizon-0.3.0.jar" new.write_bytes(b"new original fixture") runtime.install_original_mod(new, mods) self.assertFalse(old.exists()) @@ -34,9 +50,9 @@ class PackTests(unittest.TestCase): def test_original_mod_upgrade_refuses_unrelated_named_jar(self): with tempfile.TemporaryDirectory() as temp: root = Path(temp) - with zipfile.ZipFile(root / "horizon-lab-0.1.0.jar", "w") as archive: + with zipfile.ZipFile(root / "horizon-0.1.0.jar", "w") as archive: archive.writestr("fabric.mod.json", json.dumps({"id": "someoneelse"})) - new = root / "horizon-lab-0.3.0.jar" + new = root / "horizon-0.3.0.jar" new.write_bytes(b"new original fixture") with self.assertRaisesRegex(ValueError, "another mod"): runtime.install_original_mod(new, root) @@ -176,7 +192,7 @@ class PackTests(unittest.TestCase): with zipfile.ZipFile(pack) as archive: names = archive.namelist() self.assertEqual([n for n in names if n.endswith(".jar")], - [f"overrides/mods/horizon-lab-{build_pack.read_lock()['pack_version']}.jar"]) + [f"overrides/mods/horizon-{build_pack.read_lock()['pack_version']}.jar"]) index = json.loads(archive.read("modrinth.index.json")) self.assertEqual(index["dependencies"]["minecraft"], "26.3") options = dict(line.split(":", 1) for line in archive.read("overrides/options.txt").decode().splitlines()) diff --git a/tests/test_parity.py b/tests/test_parity.py new file mode 100644 index 000000000..81c822602 --- /dev/null +++ b/tests/test_parity.py @@ -0,0 +1,20 @@ +import re +import unittest +from pathlib import Path + +README = Path(__file__).resolve().parents[1] / 'README.md' + + +class ParityTests(unittest.TestCase): + def test_readme_percentage_matches_table(self): + text = README.read_text() + heading = re.search(r'^### Java parity: (\d+)%$', text, re.MULTILINE) + self.assertIsNotNone(heading, 'README parity heading is missing') + table = text[heading.end():].split('| Subsystem | Score | Main gaps |', 1)[1].split('\n\n', 1)[0] + scores = [float(score) for score in re.findall(r'^\| [^|]+ \| (0|0\.25|0\.5|0\.75|1) \| [^|]+ \|$', table, re.MULTILINE)] + self.assertEqual(len(scores), table.count('\n|') - 1, 'Every row needs a score of 0, 0.25, 0.5, 0.75 or 1') + self.assertEqual(int(heading.group(1)), round(sum(scores) * 100 / len(scores))) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_piston_shape_parity.py b/tests/test_piston_shape_parity.py new file mode 100644 index 000000000..b800e8c84 --- /dev/null +++ b/tests/test_piston_shape_parity.py @@ -0,0 +1,19 @@ +import unittest +from tools import test_piston_shape_parity as piston + + +class PistonShapeCorpusTests(unittest.TestCase): + def test_source_extension_thresholds_noclip_and_float_interpolation(self): + facts={'states':[{'id':name} for name in ['minecraft:stone','minecraft:piston','minecraft:shulker_box','minecraft:moving_piston']], 'defaults':{'minecraft:stone':0}} + fixtures=list(piston.corpus(facts)) + self.assertEqual(fixtures,list(piston.corpus(facts))) + self.assertEqual({f['noclip'] for f in fixtures},set(range(-1,6))) + self.assertEqual({f['direction'] for f in fixtures},set(range(6))) + self.assertEqual({(f['source'],f['extending']) for f in fixtures},{(s,e) for s in [False,True] for e in [False,True]}) + self.assertEqual(sum(f['kinematic'] for f in fixtures),10000) + self.assertTrue(any(f['fail']==0 for f in fixtures)) + for field in ['progress','previous','partial']: + self.assertTrue(all(len(f[field])==8 for f in fixtures)) + + +if __name__=='__main__':unittest.main() diff --git a/tests/test_placement_parity.py b/tests/test_placement_parity.py new file mode 100644 index 000000000..5b4d4412f --- /dev/null +++ b/tests/test_placement_parity.py @@ -0,0 +1,27 @@ +import json +import unittest +from tools import test_placement_parity as placement + + +class PlacementCorpusTests(unittest.TestCase): + def test_modifier_kinds_callback_failures_and_overflow(self): + definitions = list(placement.definitions()) + self.assertEqual(definitions, list(placement.definitions())) + values = [json.loads(raw) for raw in definitions] + kinds = {v.get('type') for v in values if isinstance(v, dict)} + self.assertTrue({'block_predicate_filter', 'environment_scan', 'count_on_every_layer', 'cuboid', 'noise_based_count', 'noise_threshold_count', 'heightmap', 'surface_relative_threshold_filter', 'surface_water_depth_filter', 'count', 'in_square', 'offset', 'height_range', 'rarity_filter', 'random_chance', 'fixed_placement', 'randomly_selected'} <= kinds) + fixtures = list(placement.corpus()) + self.assertEqual({f['legacy'] for f in fixtures}, {False, True}) + self.assertEqual({f['fail'] for f in fixtures}, {-1, 0, 2}) + self.assertEqual({f['draw'] for f in fixtures}, {False, True}) + self.assertEqual({f['height_mode'] for f in fixtures}, {0, 1}) + self.assertEqual({f['count_only'] for f in fixtures}, {False, True}) + self.assertTrue(any(f['query_fail'] == 1 for f in fixtures)) + self.assertTrue(any(f['world_min'] != f['context'][0] for f in fixtures)) + self.assertTrue(any(f['context'][0] == 2**31 - 1 for f in fixtures)) + self.assertTrue(any('4294967297' in f['definition'] for f in fixtures)) + self.assertTrue(all(len(f['positions']) == 4 for f in fixtures)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_replace_block_parity.py b/tests/test_replace_block_parity.py new file mode 100644 index 000000000..29f98b46c --- /dev/null +++ b/tests/test_replace_block_parity.py @@ -0,0 +1,20 @@ +import json +import unittest +from tools import test_replace_block_parity as replace + + +class ReplaceBlockCorpusTests(unittest.TestCase): + def test_ordered_targets_failures_and_repeated_world_state(self): + fixtures = list(replace.corpus({})) + self.assertEqual({f['legacy'] for f in fixtures}, {False, True}) + self.assertEqual({f['fail'] for f in fixtures}, {-1, 0, 1, 2, 4}) + self.assertEqual({f['reject'] for f in fixtures}, {0, 2}) + self.assertTrue(all(f['repeats'] == 3 for f in fixtures)) + definitions = [json.loads(f['definition']) for f in fixtures] + self.assertTrue(any(d['targets'] == [] for d in definitions)) + self.assertTrue(any(isinstance(d['targets'], list) and len(d['targets']) == 3 for d in definitions)) + self.assertTrue(any('random_block_match' in f['definition'] for f in fixtures)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_rule_test_parity.py b/tests/test_rule_test_parity.py new file mode 100644 index 000000000..7466fc26c --- /dev/null +++ b/tests/test_rule_test_parity.py @@ -0,0 +1,19 @@ +import json +import unittest +from tools import test_rule_test_parity as rules + + +class RuleTestCorpusTests(unittest.TestCase): + def test_registry_coverage_logic_and_random_modes(self): + facts = {'states': ['air', 'stone'], 'defaults': {'minecraft:air': 0, 'minecraft:stone': 1}} + fixtures = list(rules.corpus(facts, {'minecraft:test': '{}'})) + kinds = {json.loads(f['definition']).get('predicate_type') for f in fixtures if isinstance(json.loads(f['definition']), dict)} + self.assertTrue({'always_true', 'not', 'all_of', 'any_of', 'block_match', 'blockstate_match', 'tag_match', 'height_match', 'random_block_match', 'random_blockstate_match'} <= kinds) + self.assertEqual({f['legacy'] for f in fixtures}, {False, True}) + self.assertTrue(any('minecraft:test' in f['definition'] for f in fixtures)) + self.assertTrue(any('horizon:missing' in f['definition'] for f in fixtures)) + self.assertTrue(all(0 <= s < len(facts['states']) for f in fixtures for s in f['states'])) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_rust_parity.py b/tests/test_rust_parity.py new file mode 100644 index 000000000..b14723c16 --- /dev/null +++ b/tests/test_rust_parity.py @@ -0,0 +1,102 @@ +import json +from pathlib import Path +import tempfile +import unittest +from unittest import mock + +from tools import test_rust_parity as parity + + +class ParityRunnerTests(unittest.TestCase): + def test_report_rejects_sources_changed_during_a_run(self): + with tempfile.TemporaryDirectory() as temp: + root = Path(temp) + source = root / "source.rs" + source.write_text("before") + with mock.patch.object(parity.lab, "ROOT", root): + before = parity.source_hashes([source]) + parity.ensure_sources_unchanged([source], before) + source.write_text("after") + with self.assertRaisesRegex(RuntimeError, "source.rs"): + parity.ensure_sources_unchanged([source], before) + def test_comparison_rejects_changed_missing_extra_and_empty_results(self): + for reference, candidate in [("rng 0 1\n", "rng 0 2\n"), + ("rng 0 1\n", ""), + ("rng 0 1\n", "rng 0 1\nrng 1 2\n"), ("", "")]: + with self.subTest(reference=reference, candidate=candidate), tempfile.TemporaryDirectory() as temp: + left, right = Path(temp) / "reference", Path(temp) / "candidate" + left.write_text(reference) + right.write_text(candidate) + with self.assertRaises(AssertionError): + parity.compare(left, right) + + def test_comparison_counts_matching_lines(self): + with tempfile.TemporaryDirectory() as temp: + left, right = Path(temp) / "reference", Path(temp) / "candidate" + left.write_text("rng 0 1\nrng 1 -1\n") + right.write_text(left.read_text()) + self.assertEqual(parity.compare(left, right), 2) + + def test_chunk_comparison_preserves_newlines_unicode_and_unterminated_lines(self): + cases = [ + ("one", "one", 1), + ("\n\n", "\n\n", 2), + ("one\r\ntwo\r", "one\ntwo\n", 2), + ("α" * (1024 * 1024 + 1) + "\r\nlast", "α" * (1024 * 1024 + 1) + "\nlast", 2), + ("same\n" * 220000 + "tail", "same\n" * 220000 + "tail", 220001), + ] + with tempfile.TemporaryDirectory() as temp: + left, right = Path(temp) / "reference", Path(temp) / "candidate" + for reference, candidate, count in cases: + left.write_bytes(reference.encode("utf-8")) + right.write_bytes(candidate.encode("utf-8")) + self.assertEqual(parity.compare(left, right), count) + + def test_chunk_mismatch_retains_exact_first_line_diagnostic(self): + prefix = "same\n" * 220000 + cases = [("expected\n", "actual\n", "'expected\\n'", "'actual\\n'"), + ("tail", "tail\n", "'tail'", "'tail\\n'"), + ("extra\n", "", "'extra\\n'", "None")] + with tempfile.TemporaryDirectory() as temp: + left, right = Path(temp) / "reference", Path(temp) / "candidate" + for reference, candidate, expected, actual in cases: + left.write_text(prefix + reference) + right.write_text(prefix + candidate) + with self.assertRaises(AssertionError) as caught: + parity.compare(left, right) + self.assertEqual(str(caught.exception), + f"Parity mismatch at output line 220001: vanilla={expected}, Rust={actual}") + + def test_failed_artifact_verification_removes_previous_success(self): + with tempfile.TemporaryDirectory() as temp: + local = Path(temp) + report = local / "rust-parity/report.json" + report.parent.mkdir() + report.write_text(json.dumps({"previous_success": True})) + with mock.patch.object(parity.lab, "LOCAL", local), mock.patch("sys.argv", ["parity"]), \ + mock.patch.object(parity, "verify_artifacts", side_effect=ValueError("corrupt artifact")): + with self.assertRaisesRegex(ValueError, "corrupt artifact"): + parity.main() + self.assertFalse(report.exists()) + + def test_corpus_is_repeatable_and_contains_rejection_and_word_boundaries(self): + commands = list(parity.corpus()) + self.assertEqual(commands, list(parity.corpus())) + self.assertIn("xoroshiro_state 0 0 2200", commands) + self.assertIn("legacy -9223372036854775808 2200", commands) + factories = [line.split() for line in commands if line.startswith("factory ")] + self.assertEqual(len(factories), 4400) + self.assertTrue({"-", "d800", "dc00", "d83dde00", "d8000061dc00"} <= {line[9] for line in factories}) + helpers = [line.split() for line in commands if line.startswith("helpers ")] + self.assertEqual(len(helpers), 5000) + for stream in ["legacy", "xoroshiro"]: + bounds = {(int(line[3]), int(line[4])) for line in helpers if line[1] == stream} + self.assertTrue({(-2147483648, 2147483647), (2147483647, -2147483648), (0, 0), (0, 1073741825)} <= bounds) + for bits in range(1, 33): + lengths = {int(line.split()[2]) for line in commands if line.startswith(f"storage {bits} ")} + per_word = 64 // bits + self.assertTrue({0, 1, per_word - 1, per_word, per_word + 1, 4096} <= lengths) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_scattered_ore_parity.py b/tests/test_scattered_ore_parity.py new file mode 100644 index 000000000..783632d6f --- /dev/null +++ b/tests/test_scattered_ore_parity.py @@ -0,0 +1,21 @@ +import json +import unittest +from tools import test_scattered_ore_parity as ore + + +class ScatteredOreCorpusTests(unittest.TestCase): + def test_exposure_directions_empty_targets_and_boundary_sizes(self): + fixtures = list(ore.corpus({})) + self.assertEqual({f['mode'] for f in fixtures}, set(range(8))) + self.assertEqual({f['legacy'] for f in fixtures}, {False, True}) + self.assertEqual({f['fail'] for f in fixtures}, {-1, 0, 7}) + definitions = [json.loads(f['definition']) for f in fixtures] + sizes = {d['size'] for d in definitions} + self.assertTrue({-1, 0, 1, 7, 8, 64, 65, 4294967297} <= sizes) + self.assertTrue(any(d['targets'] == [] for d in definitions)) + self.assertTrue(any(f['origin'][0] == 2147483647 for f in fixtures)) + self.assertTrue(any(f['origin'][0] == -2147483648 for f in fixtures)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_state_provider_parity.py b/tests/test_state_provider_parity.py new file mode 100644 index 000000000..e4241890a --- /dev/null +++ b/tests/test_state_provider_parity.py @@ -0,0 +1,32 @@ +import json +import unittest +from tools import test_state_provider_parity as provider + + +class StateProviderCorpusTests(unittest.TestCase): + def test_exclusive_decode_empty_fallback_rotations_and_shared_streams(self): + facts = {'states': [{'id': 'minecraft:stone'}, {'id': 'minecraft:water'}], 'defaults': {'minecraft:stone': 0, 'minecraft:water': 1}} + resources = {'horizon:provider': '{"id":"stone"}'} + fixtures = list(provider.corpus(facts, {'horizon:empty': '{"values":[]}'}, catalog_resources=resources, survival_rules={"minecraft:stone": "Always", "minecraft:water": "Always"})) + self.assertEqual(fixtures, list(provider.corpus(facts, {'horizon:empty': '{"values":[]}'}, catalog_resources=resources, survival_rules={"minecraft:stone": "Always", "minecraft:water": "Always"}))) + definitions = [json.loads(f['definition']) for f in fixtures] + self.assertTrue(any(isinstance(v, dict) and v.get('type') == 'simple' and v.get('id') == 'stone' for v in definitions)) + self.assertTrue(any(isinstance(v, dict) and v.get('type') == 'random_block' and v.get('blocks') == [] for v in definitions)) + self.assertEqual({f['typed'] for f in fixtures}, {False, True}) + self.assertEqual({(f['legacy'], f['worldgen']) for f in fixtures}, {(False, False), (True, False), (False, True), (True, True)}) + self.assertEqual({f['fail'] for f in fixtures}, {-1, 0, 1, 2}) + for kind in ['copy_properties', 'randomized_int', 'noise', 'noise_threshold', 'dual_noise', 'rule_based']: + self.assertTrue(any(isinstance(v, dict) and v.get('type') == kind for v in definitions)) + self.assertTrue(any([2147483647, -2147483648, 2147483647] in f.get('positions', []) for f in fixtures)) + self.assertEqual({f.get('query_fail', -1) for f in fixtures}, {-1, 0, 1, 2}) + self.assertTrue(any(f.get('bounds') == [2147483647, 2, 0] for f in fixtures)) + self.assertTrue(any(f.get("holder") and json.loads(f["definition"]) == "horizon:provider" for f in fixtures)) + conditions = [rule['if_true'] for v in definitions if isinstance(v, dict) and v.get('type') == 'rule_based' and isinstance(v.get('rules'), list) for rule in v['rules'] if isinstance(rule, dict) and isinstance(rule.get('if_true'), dict)] + for kind in ['matching_block_tag', 'matching_blocks', 'matching_fluids', 'matching_biomes', 'unobstructed', 'solid', 'replaceable', 'has_sturdy_face', 'would_survive', 'height_range', 'volume_match']: + self.assertTrue(any(v.get('type') == kind for v in conditions)) + for direction in ['down', 'up', 'north', 'south', 'west', 'east']: + self.assertTrue(any(isinstance(v, dict) and v.get('type') == 'rotated' and v.get('direction') == direction for v in definitions)) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_structure_density_parity.py b/tests/test_structure_density_parity.py new file mode 100644 index 000000000..f29bfe470 --- /dev/null +++ b/tests/test_structure_density_parity.py @@ -0,0 +1,27 @@ +import unittest +from tools import test_structure_density_parity as structure + + +class StructureDensityCorpusTests(unittest.TestCase): + def test_modes_kernel_neighborhood_and_null_bounds_are_covered(self): + fixtures=list(structure.corpus()) + self.assertEqual(fixtures,list(structure.corpus())) + self.assertEqual({p[1] for f in fixtures for p in f["pieces"]},{"NONE","BURY","BEARD_THIN","BEARD_BOX","ENCAPSULATE"}) + kernel=fixtures[0] + self.assertEqual(kernel["junctions"],[[0,0,0]]) + self.assertIn([29,29,29,-14,-14,-14,1,1,1,3],kernel["volumes"]) + self.assertTrue(any(f["affected"] is None and f["pieces"] for f in fixtures)) + self.assertTrue(any(p[2]==-2**31 for f in fixtures for p in f["pieces"])) + self.assertTrue(any(p[2]==2**31-1 for f in fixtures for p in f["pieces"])) + + def test_clipped_stride_fixture_exercises_a_sample_below_bounds(self): + fixture=next(f for f in structure.corpus() if f["affected"]==[1,1,1,9,9,9]) + volume=fixture["volumes"][0] + for axis in range(3): + minimum=volume[axis+3];step=volume[axis+6];bound=fixture["affected"][axis] + first=minimum+max(0,bound-minimum)//step*step + self.assertLess(first,bound) + self.assertGreater(volume[9],0) + + +if __name__=="__main__":unittest.main() diff --git a/tests/test_terrain_parity.py b/tests/test_terrain_parity.py new file mode 100644 index 000000000..071b7cf65 --- /dev/null +++ b/tests/test_terrain_parity.py @@ -0,0 +1,37 @@ +import json +import unittest +from tools import test_terrain_parity as terrain + + +class TerrainCorpusTests(unittest.TestCase): + def inputs(self): + names=["air","void_air","cave_air","stone","water","lava","oak_leaves","glass","oak_slab"] + facts={"states":[["minecraft:"+name,name.endswith("air"),name in ["water","lava","oak_slab"]] for name in names], + "defaults":{"minecraft:"+name:i for i,name in enumerate(names)}} + setting={"noise":{"min_y":-64,"height":384},"default_block":"minecraft:stone","default_fluid":"minecraft:water","sea_level":63,"noise_router":{},"aquifers":{"barrier":0}} + return facts,{"settings":{"minecraft:overworld":json.dumps(setting)}} + + def test_corpus_retains_presets_seed_modes_and_repeat_fills(self): + facts,bundle=self.inputs();fixtures=list(terrain.corpus(facts,bundle)) + self.assertEqual(fixtures,list(terrain.corpus(facts,bundle))) + self.assertEqual(len(fixtures),66) + self.assertEqual({f["legacy"] for f in fixtures[:6]},{True,False}) + self.assertEqual({f["seed"] for f in fixtures[:6]},{0,-1,0x123456789abcdef}) + self.assertTrue(all(f["initial"] for f in fixtures)) + self.assertTrue(any(f["repeats"]==2 for f in fixtures[:6])) + self.assertTrue(any(f["aquifers"] is None for f in fixtures)) + self.assertTrue(any(f["aquifers"] is not None for f in fixtures)) + + def test_partial_fills_and_input_writes_stay_inside_chunk(self): + facts,bundle=self.inputs();fixtures=list(terrain.corpus(facts,bundle)) + self.assertTrue(any(f["min"]<f["noise_min"] for f in fixtures)) + for f in fixtures: + self.assertLessEqual(f["min"],f["noise_min"]) + self.assertLessEqual(f["noise_min"]+f["noise_height"],f["min"]+f["height"]) + for x,y,z,state in f["initial"]: + self.assertTrue(0<=x<16 and 0<=z<16) + self.assertTrue(f["min"]<=y<f["min"]+f["height"]) + self.assertTrue(0<=state<len(facts["states"])) + + +if __name__=="__main__":unittest.main() diff --git a/tests/test_tick_parity.py b/tests/test_tick_parity.py new file mode 100644 index 000000000..e7da2a35b --- /dev/null +++ b/tests/test_tick_parity.py @@ -0,0 +1,32 @@ +from pathlib import Path +import tempfile +import unittest +from unittest import mock + +from tools import test_tick_parity as parity + + +class TickParityRunnerTests(unittest.TestCase): + def test_failed_reference_verification_removes_old_success(self): + with tempfile.TemporaryDirectory() as temp: + local = Path(temp) + report = local / "rust-tick-parity/report.json" + report.parent.mkdir() + report.write_text('{"previous_success":true}') + with mock.patch.object(parity.lab, "LOCAL", local), mock.patch("sys.argv", ["tick-parity"]), \ + mock.patch.object(parity.test_rust_parity, "verify_artifacts", side_effect=ValueError("corrupt reference")): + with self.assertRaisesRegex(ValueError, "corrupt reference"): + parity.main() + self.assertFalse(report.exists()) + + def test_corpus_repeats_and_covers_callback_actions_and_limits(self): + commands = list(parity.corpus()) + self.assertEqual(commands, list(parity.corpus())) + tick_commands = [line.split() for line in commands if line.startswith("tick ")] + self.assertEqual({int(words[3]) for words in tick_commands}, set(range(6))) + self.assertTrue({-1, 0, 1, 100000} <= {int(words[2]) for words in tick_commands}) + self.assertTrue({"load", "reload", "copy", "clear", "enable", "restore", "save", "query"} <= {line.split()[0] for line in commands}) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_value_provider_parity.py b/tests/test_value_provider_parity.py new file mode 100644 index 000000000..db27a42af --- /dev/null +++ b/tests/test_value_provider_parity.py @@ -0,0 +1,23 @@ +import json +import unittest +from tools import test_value_provider_parity as providers + + +class ValueProviderCorpusTests(unittest.TestCase): + def test_distribution_branches_overflow_and_random_modes(self): + definitions = list(providers.definitions()) + self.assertEqual(definitions, list(providers.definitions())) + objects = [json.loads(raw) for _, raw in definitions if raw.startswith('{')] + kinds = {v.get('type') for v in objects if isinstance(v.get('type'), str)} + self.assertTrue({'weighted_list', 'constant', 'uniform', 'trapezoid', 'clamped', 'biased_to_bottom', 'very_biased_to_bottom'} <= kinds) + self.assertTrue(any('"value":-0.0' in raw for _, raw in definitions)) + self.assertTrue(any('4294967296' in raw for _, raw in definitions)) + self.assertTrue(any(v.get('plateau') == -2**31 for v in objects)) + fixtures = list(providers.corpus()) + self.assertEqual(len(fixtures), len(definitions) * 10) + self.assertEqual({f['legacy'] for f in fixtures}, {False, True}) + self.assertEqual({f['samples'] for f in fixtures}, {64}) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_worldgen_parity.py b/tests/test_worldgen_parity.py new file mode 100644 index 000000000..e78593f5c --- /dev/null +++ b/tests/test_worldgen_parity.py @@ -0,0 +1,150 @@ +from pathlib import Path +import itertools +import json +import tempfile +import unittest +from unittest import mock + +from tools import test_worldgen_parity as parity + + +class WorldgenRunnerTests(unittest.TestCase): + def test_failed_verification_removes_previous_success(self): + with tempfile.TemporaryDirectory() as temp: + report = Path(temp)/"rust-worldgen-parity/report.json" + report.parent.mkdir() + report.write_text('{"previous_success":true}') + with mock.patch.object(parity.lab,"LOCAL",Path(temp)), mock.patch("sys.argv",["parity"]), \ + mock.patch.object(parity.base,"verify_artifacts",side_effect=ValueError("corrupt artifact")): + with self.assertRaisesRegex(ValueError,"corrupt artifact"): + parity.main() + self.assertFalse(report.exists()) + + def test_corpus_keeps_numeric_text_and_checks_all_sampling_modes(self): + resources = {"fixture":"{\"base_octave\":-7}"} + commands = list(parity.corpus(resources)) + self.assertEqual(commands,list(parity.corpus(resources))) + self.assertEqual(len(commands),599) + self.assertEqual({tuple(line.split(" ",4)[2:4]) for line in commands}, {(str(a),str(b)) for a in [0,1] for b in [0,1]}) + text = "\n".join(commands) + for retained in ["4294967295","-4294967297.9","1.9999999999999999999","[-0]","[-0.0]","0.000009999999747378751","0.000009999999747378752"]: + self.assertIn(retained,text) + + def test_different_client_registry_is_rejected_before_building(self): + with tempfile.TemporaryDirectory() as temp: + with mock.patch.object(parity.lab,"LOCAL",Path(temp)), mock.patch("sys.argv",["parity"]), \ + mock.patch.object(parity.base,"verify_artifacts",return_value=({}, {"server":"server", "client":"client"}, [])), \ + mock.patch.object(parity,"noise_resources",side_effect=[{"a":"{}"},{"a":"{\"different\":true}"}]), \ + mock.patch.object(parity.base,"run") as run: + with self.assertRaisesRegex(ValueError,"resources differ"): + parity.main() + run.assert_not_called() + + def test_density_and_settings_mismatches_are_rejected_before_building(self): + for kind in ["density", "settings"]: + with self.subTest(kind=kind), tempfile.TemporaryDirectory() as temp: + matching = [{"a":"{}"},{"a":"{}"}] + mismatch = [{"a":"{}"},{"a":"{\"changed\":true}"}] + outputs = mismatch if kind == "density" else matching + mismatch + with mock.patch.object(parity.lab,"LOCAL",Path(temp)), mock.patch("sys.argv",["parity"]), \ + mock.patch.object(parity.base,"verify_artifacts",return_value=({}, {"server":"server", "client":"client"}, [])), \ + mock.patch.object(parity,"noise_resources",return_value={"a":"{}"}), \ + mock.patch.object(parity,"registry_resources",side_effect=outputs), \ + mock.patch.object(parity.base,"run") as run: + with self.assertRaisesRegex(ValueError,"resources differ"): + parity.main() + run.assert_not_called() + + def test_climate_corpus_is_deterministic_and_retains_nonfinite_inputs(self): + commands = list(parity.climate_corpus()) + self.assertEqual(commands,list(parity.climate_corpus())) + self.assertEqual(len(commands),4116) + text = "\n".join(commands) + for retained in ["7f800001","ff800000","80000000",str(-2**63),str(2**63-1)]: + self.assertIn(retained,text) + + def test_index_corpus_preserves_ordered_warm_tie_queries(self): + commands = list(itertools.islice(parity.index_corpus(),5)) + self.assertEqual(commands,list(itertools.islice(parity.index_corpus(),5))) + values = json.loads(commands[0].split(" ",2)[2]) + self.assertEqual([v["coordinates"][0] for v in values["entries"]],[[-10,-10],[10,10]]) + self.assertEqual([v[0] for v in values["targets"]],[10,0,-10,0,10,0]) + self.assertEqual(json.loads(commands[-1].split(" ",2)[2])["entries"],[]) + + def test_climate_codec_corpus_retains_precision_and_missing_fields(self): + commands = list(parity.climate_codec_corpus()) + self.assertEqual(commands,list(parity.climate_codec_corpus())) + self.assertEqual(len(commands),208) + self.assertIn("climate_parameter 2.0000001192092895507812500000000001",commands) + self.assertIn("climate_parameter [0,-0]",commands) + point_inputs = [json.loads(command.split(" ",1)[1]) for command in commands if command.startswith("climate_point ")] + self.assertTrue(any("offset" not in value for value in point_inputs)) + + def test_settings_corpus_keeps_json_and_runtime_construction_separate(self): + resources = {"fixture":'{"noise":{"min_y":-64,"height":384}}'} + commands = list(parity.settings_corpus(resources)) + self.assertEqual(commands,list(parity.settings_corpus(resources))) + self.assertEqual(len(commands),393) + self.assertIn("settings_create -2147483648 -2147483648",commands) + self.assertIn('noise_settings {"min_y":16.9999999999999999999,"height":16}',commands) + + def test_aquifer_corpus_keeps_nan_density_and_fluid_cutoff_boundaries(self): + commands = list(parity.aquifer_corpus()) + self.assertEqual(commands,list(parity.aquifer_corpus())) + self.assertEqual(len(commands),9136) + self.assertIn("aquifer 63 0 0 -54 0 7ff0000000000001",commands) + self.assertIn("aquifer -64 4 0 -65 0 8000000000000000",commands) + + def test_noise_aquifer_corpus_preserves_stateful_queries_and_all_failures(self): + resources={"minecraft:overworld":"{}"} + commands=list(parity.noise_aquifer_corpus("bundle.json",resources)) + self.assertEqual(commands,list(parity.noise_aquifer_corpus("bundle.json",resources))) + fixtures=[json.loads(command.split(" ",5)[5]) for command in commands] + self.assertEqual({tuple(f["fail"]) for f in fixtures if "fail" in f}, + {(field,occurrence) for field in range(6) for occurrence in [1,2,8]}) + for field in range(6): + overrides={f["overrides"][field] for f in fixtures if "overrides" in f} + self.assertTrue({"7fc00000","7f800001","7f800000","ff800000","80000000"} <= overrides) + text="\n".join(commands) + self.assertIn("7ff0000000000001",text) + self.assertIn("minecraft:missing",text) + self.assertTrue(any(f["fluid"]==7 for f in fixtures)) + self.assertTrue(any(f["steps"]==[4,2,4] for f in fixtures)) + + def test_tag_corpus_covers_cycles_replacement_and_codec_numeric_types(self): + commands=list(parity.tag_corpus({"minecraft:example":'{"values":["stone"]}'})) + self.assertEqual(commands,list(parity.tag_corpus({"minecraft:example":'{"values":["stone"]}'}))) + self.assertIn('tag_entry {"id":"stone","required":0.5}',commands) + self.assertIn('tag_entry "#"',commands) + fixtures=[json.loads(command[5:]) for command in commands if command.startswith("tags ")] + self.assertTrue(any('"replace":true' in row[2] for f in fixtures for row in f["files"])) + self.assertTrue(any('"#a"' in row[2] and row[0]=="b" for f in fixtures for row in f["files"])) + self.assertTrue(any(row[2]=="{}" for f in fixtures for row in f["files"])) + + def test_different_builtin_biome_tables_fail_before_rust_build(self): + with tempfile.TemporaryDirectory() as temp: + exports = [] + def run(command, **kwargs): + if "dev.horizonlab.parity.VanillaBiomeExport" in command: + destination = Path(command[-1]) + destination.write_text(json.dumps({"minecraft:fixture":str(len(exports))})) + exports.append(destination) + self.assertNotIn("cargo",command) + resources = [ + {"data/minecraft/worldgen/density_function/a.json":"0"}, + {"data/minecraft/worldgen/noise_settings/a.json":"{}"}, + ] + with mock.patch.object(parity.lab,"LOCAL",Path(temp)), mock.patch("sys.argv",["parity"]), \ + mock.patch.object(parity.base,"verify_artifacts",return_value=({"minecraft":{"java_major":25}}, {"server":"server", "client":"client"}, [])), \ + mock.patch.object(parity,"noise_resources",return_value={"data/minecraft/worldgen/noise/a.json":"{}"}), \ + mock.patch.object(parity,"registry_resources",side_effect=[resources[0],resources[0],resources[1],resources[1]]), \ + mock.patch.object(parity,"tag_resources",return_value={"minecraft:a":'{"values":[]}'}), \ + mock.patch.object(parity.base,"source_hashes",return_value={}), \ + mock.patch.object(parity.base,"run",side_effect=run): + with self.assertRaisesRegex(ValueError,"biome parameter tables differ"): + parity.main() + self.assertEqual(len(exports),2) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_worldgen_random_parity.py b/tests/test_worldgen_random_parity.py new file mode 100644 index 000000000..ba7b52cdc --- /dev/null +++ b/tests/test_worldgen_random_parity.py @@ -0,0 +1,20 @@ +import unittest +from tools import test_worldgen_random_parity as random + + +class WorldgenRandomCorpusTests(unittest.TestCase): + def test_wrapper_layers_overflow_seeds_and_fork_operations(self): + fixtures = list(random.corpus()) + self.assertEqual(fixtures, list(random.corpus())) + self.assertEqual({f['legacy'] for f in fixtures}, {False, True}) + self.assertEqual({f['layers'] for f in fixtures}, {1, 2, 3}) + self.assertEqual({f['warmup'] for f in fixtures}, {0, 7}) + operations = {op[0] for f in fixtures for op in f['ops']} + self.assertTrue({'decoration', 'feature', 'large', 'salt', 'slime', 'fork', 'pos', 'pos_seed', 'pos_hash', 'bits'} <= operations) + bits = {op[1] for f in fixtures for op in f['ops'] if op[0] == 'bits'} + self.assertTrue({-2147483648, 0, 32, 64, 2147483647} <= bits) + self.assertTrue(any(op[0] == 'feature' and op[3] == 214749 for f in fixtures for op in f['ops'])) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/Compare-Benchmarks.html b/tools/Compare-Benchmarks.html index 0faa4358b..c98ff40ff 100644 --- a/tools/Compare-Benchmarks.html +++ b/tools/Compare-Benchmarks.html @@ -3,13 +3,13 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; connect-src 'none'; base-uri 'none'; form-action 'none'"> -<title>Horizon Lab — Compare runs +Horizon — Compare runs
-
Horizon Lab
Offline · files stay on your device
+
Horizon
Offline · files stay on your device

Compare your runs.

Choose two Horizon benchmark JSON files from your instance’s horizon-benchmarks folder. Add each matching CSV to see frame spikes. Compare frames with frames, or server ticks with server ticks.

diff --git a/tools/build_mod.py b/tools/build_mod.py index faacf092e..f6a01aa52 100644 --- a/tools/build_mod.py +++ b/tools/build_mod.py @@ -17,7 +17,7 @@ except ImportError: import runtime ROOT = lab.ROOT -SOURCE = ROOT / "mods/horizon-lab/src" +SOURCE = ROOT / "mods/horizon/src" BUILD = ROOT / ".local/mod-build" @@ -106,11 +106,11 @@ def build(): "dev.horizonlab.metrics.ResidentMemoryTest"], check=True) subprocess.run(["java", "-cp", os.pathsep.join([str(adapter_tests), test_classpath]), "dev.horizonlab.geometry.RelativeTerrainPositionTest"], check=True) - output = ROOT / "dist" / f"horizon-lab-{lock['pack_version']}.jar" + output = ROOT / "dist" / f"horizon-{lock['pack_version']}.jar" output.parent.mkdir(exist_ok=True) entries = {path.relative_to(classes).as_posix(): path.read_bytes() for path in classes.rglob("*.class")} if any(not name.startswith("dev/horizonlab/") for name in entries): - raise ValueError("Only original Horizon Lab classes may be packaged") + raise ValueError("Only original Horizon classes may be packaged") resources = SOURCE / "main/resources" entries.update({path.relative_to(resources).as_posix(): path.read_bytes() for path in resources.rglob("*") if path.is_file()}) entries["LICENSE"] = (ROOT / "LICENSE").read_bytes() diff --git a/tools/build_pack.py b/tools/build_pack.py index cbbe2b49e..0900ab497 100644 --- a/tools/build_pack.py +++ b/tools/build_pack.py @@ -82,7 +82,7 @@ def options(profile): def overrides(profile_name, mod_bytes): profile = PROFILES[profile_name] - files = {f"mods/horizon-lab-{read_lock()['pack_version']}.jar": mod_bytes, + files = {f"mods/horizon-{read_lock()['pack_version']}.jar": mod_bytes, "config/horizon-profile.txt": (profile_name + "\n").encode(), "options.txt": options(profile).encode()} experiment = any(profile.get(key, False) for key in ["adaptive", "pacing", "queue_wait", "dispatch_retry", "tick_dedup", "culling_empty", "culling_rays", "terrain_position", "quad_reuse"]) @@ -138,7 +138,7 @@ def build(profile_name, mod_jar): files.append({"path": mod_path(entry), "hashes": entry["hashes"], "downloads": [entry["url"]], "fileSize": entry["size"], "env": {"client": "required", "server": "unsupported"}}) index = {"formatVersion": 1, "game": "minecraft", "versionId": lock["pack_version"], - "name": "Horizon Lab — " + profile["title"], + "name": "Horizon — " + profile["title"], "summary": "Vanilla mechanics, pinned performance mods, measured frame and tick timings.", "files": files, "dependencies": {"minecraft": lock["minecraft"], "fabric-loader": lock["fabric_loader"]}} entries = {"modrinth.index.json": json.dumps(index, indent=2).encode()} @@ -161,7 +161,7 @@ def prepare_instance(profile_name, destination, mod_jar): target = destination / mod_path(entry) target.parent.mkdir(parents=True, exist_ok=True) shutil.copyfile(source, target) - runtime.install_original_mod(mod_jar, destination / "mods", f"horizon-lab-{lock['pack_version']}.jar") + runtime.install_original_mod(mod_jar, destination / "mods", f"horizon-{lock['pack_version']}.jar") for name, data in overrides(profile_name, mod_jar.read_bytes()).items(): if name.startswith("mods/"): continue @@ -175,7 +175,7 @@ def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--profile", choices=PROFILES) parser.add_argument("--instance", type=Path, help="Local demo smoke-test directory (no normal account launch)") - parser.add_argument("--mod", type=Path, default=ROOT / "dist" / f"horizon-lab-{read_lock()['pack_version']}.jar") + parser.add_argument("--mod", type=Path, default=ROOT / "dist" / f"horizon-{read_lock()['pack_version']}.jar") args = parser.parse_args() if not args.mod.exists(): parser.error("Build the original mod first: python3 tools/build_mod.py") diff --git a/tools/build_release.py b/tools/build_release.py index 8fe11fe55..00ded705b 100644 --- a/tools/build_release.py +++ b/tools/build_release.py @@ -15,7 +15,7 @@ ROOT = build_pack.ROOT def main(): lock = build_pack.read_lock() version = lock["pack_version"] - mod = ROOT / "dist" / f"horizon-lab-{version}.jar" + mod = ROOT / "dist" / f"horizon-{version}.jar" if not mod.exists(): raise FileNotFoundError("Run tools/build_mod.py first") packs = [build_pack.build(profile, mod) for profile in build_pack.PROFILES] diff --git a/tools/check_public_tree.py b/tools/check_public_tree.py index 26c47f4e8..7ca8b6217 100644 --- a/tools/check_public_tree.py +++ b/tools/check_public_tree.py @@ -16,8 +16,8 @@ def prohibited(path): # Original JDK-only tools are an exact allowlist; recovered game Java stays private. if path in ORIGINAL_JDK_TOOLS: return False - # Original Horizon Lab mod sources may also be tracked. - if parsed.suffix == ".java" and path.startswith("mods/horizon-lab/src/"): + # Original Horizon mod sources may also be tracked. + if parsed.suffix == ".java" and path.startswith(("mods/horizon/src/", "mods/horizon-lab/src/")): return not ("/dev/horizonlab/" in path) return bool(parsed.parts and parsed.parts[0] in PRIVATE_ROOTS) or parsed.suffix.lower() in PRIVATE_EXTENSIONS diff --git a/tools/compare_structure_starts.py b/tools/compare_structure_starts.py new file mode 100644 index 000000000..363e7b76f --- /dev/null +++ b/tools/compare_structure_starts.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python3 +"""Compare Rust structure starts (chunkgen_bench --starts) with the vanilla oracle. + +usage: compare_structure_starts.py VANILLA RUST [--all] +Pieces are compared by type, bounding box and (for jigsaw pieces) position, +rotation, ground level delta and junction count. Without --all, vanilla +starts of structure types Rust does not generate yet are only counted. +""" +import collections +import sys + + +def load(path): + starts = {} + current = None + for line in open(path): + t = line.split() + if not t: + continue + if t[0] == 'start': + current = (int(t[1]), int(t[2]), t[3]) + starts[current] = [' '.join(t[4:])] + elif t[0] == 'piece' and current: + starts[current].append(' '.join(t[1:14])) + return starts + + +def main(): + vanilla, rust = load(sys.argv[1]), load(sys.argv[2]) + generated = {k[2] for k in rust} + matched = 0 + missing = collections.Counter() + for key in sorted(vanilla): + if key not in rust: + missing[key[2]] += 1 + if key[2] in generated or '--all' in sys.argv: + print('missing', key) + continue + if vanilla[key] == rust[key]: + matched += 1 + continue + v, r = vanilla[key], rust[key] + print('DIFF', key, 'pieces', len(v) - 1, len(r) - 1) + for i, (a, b) in enumerate(zip(v, r)): + if a != b: + print(' first difference at line', i, '\n vanilla', a, '\n rust ', b) + break + for key in sorted(set(rust) - set(vanilla)): + print('extra', key) + print(f'{matched} of {len(vanilla)} vanilla starts match exactly; not generated by Rust:', dict(missing)) + return 0 if matched == len(rust) == sum(1 for k in vanilla if k[2] in generated) else 1 + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/tools/fetch_sounds.py b/tools/fetch_sounds.py new file mode 100644 index 000000000..394c03db6 --- /dev/null +++ b/tools/fetch_sounds.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python3 +"""Fetch the pinned version's sound assets (sounds.json and .ogg files) from +Mojang's asset index into the private client resource directory, verifying +every object's SHA-1. The files stay in ignored .local/ and are never committed.""" +import concurrent.futures +import hashlib +import json +from pathlib import Path +import urllib.request + +ROOT = Path(__file__).resolve().parent.parent +LOCAL = ROOT / '.local' + + +def fetch(url): + with urllib.request.urlopen(url, timeout=120) as response: + return response.read() + + +def main(): + manifest = json.loads((LOCAL / 'minecraft/26.3/manifest.json').read_text()) + index_info = manifest['assetIndex'] + target = LOCAL / 'horizon-client/26.3' + index_path = target / 'asset-index.json' + if not index_path.exists() or hashlib.sha1(index_path.read_bytes()).hexdigest() != index_info['sha1']: + data = fetch(index_info['url']) + if hashlib.sha1(data).hexdigest() != index_info['sha1']: + raise ValueError('asset index checksum mismatch') + index_path.write_bytes(data) + objects = json.loads(index_path.read_text())['objects'] + wanted = {name: info for name, info in objects.items() + if name == 'minecraft/sounds.json' or name.startswith('minecraft/sounds/')} + + def download(item): + name, info = item + path = target / 'assets' / name + if path.exists() and hashlib.sha1(path.read_bytes()).hexdigest() == info['hash']: + return 0 + h = info['hash'] + data = fetch(f'https://resources.download.minecraft.net/{h[:2]}/{h}') + if hashlib.sha1(data).hexdigest() != h: + raise ValueError(f'checksum mismatch for {name}') + path.parent.mkdir(parents=True, exist_ok=True) + path.write_bytes(data) + return len(data) + + total = 0 + with concurrent.futures.ThreadPoolExecutor(16) as pool: + for size in pool.map(download, wanted.items()): + total += size + print(f'Sound assets ready: {len(wanted)} files, {total / 1e6:.1f} MB downloaded') + + +if __name__ == '__main__': + main() diff --git a/tools/lab.py b/tools/lab.py index c6c189aca..77d2b8a87 100644 --- a/tools/lab.py +++ b/tools/lab.py @@ -40,7 +40,7 @@ def download(url, destination, checksum, algorithm="sha1"): try: with tempfile.NamedTemporaryFile(dir=destination.parent, delete=False) as stream: temporary = Path(stream.name) - request = urllib.request.Request(url, headers={"User-Agent": "minecraft-optimization-lab/0.1"}) + request = urllib.request.Request(url, headers={"User-Agent": "horizon/0.1"}) with urllib.request.urlopen(request, timeout=120) as response: shutil.copyfileobj(response, stream) actual = digest(temporary, algorithm) diff --git a/tools/measure_attribute_memory.py b/tools/measure_attribute_memory.py new file mode 100644 index 000000000..ebb8e0202 --- /dev/null +++ b/tools/measure_attribute_memory.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python3 +"""Measure held-live attribute storage RSS on Linux; not a frame-rate benchmark.""" +import argparse,json,os,platform,statistics,subprocess +from pathlib import Path +try: + from . import lab,test_rust_parity as base +except ImportError: + import lab,test_rust_parity as base + +def main(): + parser=argparse.ArgumentParser(description=__doc__) + parser.add_argument('--phase',required=True,choices=['before','after']) + parser.add_argument('--catalog',type=Path,default=lab.LOCAL/'rust-entity-attribute-parity/catalog.json') + args=parser.parse_args() + if platform.system()!='Linux':raise SystemExit('This measurement uses Linux /proc status.') + build=lab.LOCAL/'rust-attribute-memory';build.mkdir(exist_ok=True,parents=True) + sources=[Path(__file__),lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-world/src/attributes/entity.rs',lab.ROOT/'crates/horizon-world/src/attributes/mod.rs',lab.ROOT/'crates/horizon-world/examples/attribute_memory.rs'] + hashes=base.source_hashes(sources);catalog_hash=lab.digest(args.catalog,'sha256') + with (build/'compile.log').open('w') as log:base.run(['cargo','build','--release','-p','horizon-world','--example','attribute_memory'],stdout=log,stderr=subprocess.STDOUT) + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples/attribute_memory' + results=[] + for mode in ['defaults','active']: + samples=[] + for _ in range(5): + process=subprocess.Popen([str(binary),str(args.catalog),'20000',mode],cwd=lab.ROOT,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE,text=True) + try: + ready=json.loads(process.stdout.readline()) + if ready!={'entities':20000,'active_per_entity':4 if mode=='active' else 0,'health_sum':400000.0}:raise AssertionError(ready) + status={line.split(':',1)[0]:line.split(':',1)[1].strip() for line in Path(f'/proc/{process.pid}/status').read_text().splitlines() if ':' in line} + samples.append({key:int(status[key].split()[0]) for key in ['VmRSS','VmHWM']}) + _,err=process.communicate('\n',timeout=30) + if process.returncode:raise RuntimeError(err) + finally: + if process.poll() is None:process.kill();process.wait() + results.append({'mode':mode,'entities':20000,'active_per_entity':4 if mode=='active' else 0,'samples_kib':samples,'median_rss_kib':statistics.median(s['VmRSS'] for s in samples),'median_peak_kib':statistics.median(s['VmHWM'] for s in samples)}) + base.ensure_sources_unchanged(sources,hashes) + if lab.digest(args.catalog,'sha256')!=catalog_hash:raise RuntimeError('Catalog changed during measurement') + report=dict(schema=1,phase=args.phase,platform=platform.platform(),rustc=subprocess.check_output(['rustc','--version'],text=True).strip(),catalog_sha256=catalog_hash,sources_sha256=hashes,results=results,scope='Five fresh release-process samples per case, 20,000 held-live zombie attribute maps, no instances or four instantiated attributes. RSS/peak includes allocator/runtime/catalog. Identical health-read checksum. Excludes the rest of entity/world state; no timing, rendering or FPS conclusion.') + lab.write_json(build/(args.phase+'.json'),report) + print(json.dumps(results,indent=2)) +if __name__=='__main__':main() diff --git a/tools/package_native_client.py b/tools/package_native_client.py new file mode 100644 index 000000000..9acce9f57 --- /dev/null +++ b/tools/package_native_client.py @@ -0,0 +1,117 @@ +#!/usr/bin/env python3 +"""Package a built horizon-client with its prepared resources into a private +tarball for one of your own Linux or macOS machines. The resources are Mojang +assets: keep the archive in ignored .local/ and never publish or commit it. + + cargo build --release -p horizon-client + python3 tools/package_native_client.py +""" +import argparse +import hashlib +import io +import json +import platform +import subprocess +import tarfile +from pathlib import Path + +ROOT = Path(__file__).resolve().parent.parent +LOCAL = ROOT / '.local' +# Inputs of the exporters, not read by the game at runtime. +SKIP = {'classes', 'client-classes', 'export.log', 'model-state-export.log'} + +LAUNCHER = r'''#!/bin/sh +# Starts Horizon. Saves and options.txt live in $HORIZON_HOME +# (default ~/.local/share/horizon), so unpacking an update keeps them. +here=$(cd "$(dirname "$0")" && pwd) +if [ "$1" = "--install" ]; then + apps="${XDG_DATA_HOME:-$HOME/.local/share}/applications" + mkdir -p "$apps" + cat > "$apps/horizon.desktop" </.nbt. + with zipfile.ZipFile(jars['server']) as server: + prefix = 'data/minecraft/structure/' + for name in server.namelist(): + if name.startswith(prefix) and name.endswith('.nbt'): + relative = Path(name[len(prefix):]) + if relative.is_absolute() or '..' in relative.parts: + raise ValueError('Invalid structure path') + target = out/'structure'/'minecraft'/relative + data = server.read(name) + if not target.exists() or target.read_bytes() != data: + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(data) + with zipfile.ZipFile(jars['server']) as server, zipfile.ZipFile(jars['client']) as client: + for name, path in WORLDGEN_BUNDLES.items(): + prefix = f'data/minecraft/{path}/' + def extract(archive): + return {'minecraft:'+n[len(prefix):-5]: archive.read(n).decode('utf-8') + for n in sorted(archive.namelist()) if n.startswith(prefix) and n.endswith('.json')} + resources = extract(server) + if not resources or resources != extract(client): + raise ValueError('Reference worldgen resources disagree: '+path) + (out/(name+'.json')).write_text(json.dumps(resources, separators=(',', ':')), encoding='utf-8') + facts = json.loads((root/'facts.json').read_text()) + (out/'block_flags.json').write_text(json.dumps([[s[1], s[2]] for s in facts['states']], separators=(',', ':'))) + reports = out/'biome_parameters' + reports.mkdir(exist_ok=True) + presets = reports + for source in [root/'biome-parameters', local/'datagen/out/reports/biome_parameters/minecraft']: + if (source/'overworld.json').exists(): + for report in sorted(source.glob('*.json')): + (reports/report.name).write_bytes(report.read_bytes()) + break + else: + presets = None + # Block behavior used by feature placement checks (survival, support, collision). + # These come from the Java exporters of the simple-block parity run. + behavior = local/'rust-simple-block-parity' + blocks = out/'blocks' + names = ['block-properties.nbt', 'cached-collision.nbt', 'cached-support.nbt', 'survival-rules.json', + 'survival-extra-definitions.json', 'placement-definitions.json'] + if all((behavior/name).exists() for name in names): + blocks.mkdir(exist_ok=True) + for name in names: + (blocks/name).write_bytes((behavior/name).read_bytes()) + if libraries is not None: + blocks.mkdir(exist_ok=True) + export_structure_blocks(blocks/'structure-blocks.json', jars, libraries) + else: + print('Feature block behavior exports missing; run tools/test_simple_block_parity.py for full decoration') + if presets is None: + # Fall back to the Java-exported quantized tables from the material-stage parity run. + presets = local/'rust-material-stage-parity/presets.json' + if not presets.exists(): + raise FileNotFoundError('No multi-noise biome parameter tables; run the data generator reports') + (out/'presets.json').write_bytes(presets.read_bytes()) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--prepare', action='store_true', help='Fetch pinned reference artifacts first') + args = parser.parse_args() + if args.prepare: + lab.prepare() + lock, jars, libraries = base.verify_artifacts() + root = lab.LOCAL / 'horizon-client' / lock['minecraft']['version'] + root.mkdir(parents=True, exist_ok=True) + facts = root / 'facts.json' + manifest = root / 'horizon-resources.json' + oracle = lab.ROOT / 'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java' + origin = {'minecraft': lock['minecraft']['version'], + 'client_sha256': lab.digest(jars['client'], 'sha256'), + 'server_sha256': lab.digest(jars['server'], 'sha256'), + 'exporter_sha256': lab.digest(oracle, 'sha256')} + previous = json.loads(manifest.read_text()) if manifest.exists() else {} + if not (all(previous.get(k) == v for k, v in origin.items()) and facts.exists() + and previous.get('facts_sha256') == lab.digest(facts, 'sha256')): + classes = root / 'classes' + classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, [jars['server'], *libraries])) + with (root / 'export.log').open('w') as log: + subprocess.run(['javac', '--release', str(lock['minecraft']['java_major']), '-proc:none', + '-cp', dependencies, '-d', str(classes), str(oracle)], check=True, + stdout=log, stderr=subprocess.STDOUT, timeout=3600) + subprocess.run(['java', '-Xmx512M', '-cp', str(classes) + os.pathsep + dependencies, + 'dev.horizonlab.parity.VanillaHeightmapOracle', 'export', str(facts)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + binding = oracle.with_name('VanillaBlockStateBindingOracle.java') + helper = oracle.with_name('VanillaCuboidModelOracle.java') + binding_sources = base.source_hashes([binding, helper]) + model_states = root / 'model-states.json' + if not (previous.get('model_state_exporters_sha256') == binding_sources + and previous.get('client_sha256') == origin['client_sha256'] + and model_states.exists() + and previous.get('model_states_sha256') == lab.digest(model_states, 'sha256')): + classes = root / 'client-classes'; classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, [jars['client'], *baking.client_libraries()])) + with (root / 'model-state-export.log').open('w') as log: + subprocess.run(['javac', '--release', str(lock['minecraft']['java_major']), '-proc:none', + '-cp', dependencies, '-d', str(classes), str(binding), str(helper)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + subprocess.run(['java', '-Xmx512M', '-cp', str(classes) + os.pathsep + dependencies, + 'dev.horizonlab.parity.VanillaBlockStateBindingOracle', 'export', str(model_states)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + tags = worldgen.tag_resources(jars['server']) + if tags != worldgen.tag_resources(jars['client']): + raise ValueError('Reference block tags disagree') + lab.write_json(root / 'block-tags.json', tags) + visibility = oracle.with_name('VanillaFaceVisibilityOracle.java') + collision = oracle.with_name('VanillaCollisionOracle.java') + collision_sources = base.source_hashes([collision]) + movement = oracle.with_name('VanillaMovementRegistryOracle.java') + attributes = oracle.with_name('VanillaEntityAttributeOracle.java') + landing = oracle.with_name('VanillaBlockLandingOracle.java') + motion_sources = base.source_hashes([movement, attributes, oracle, landing, collision]) + motion_files = ['movement-properties.nbt', 'attributes.json', 'landing-definitions.json'] + if not (previous.get('motion_exporters_sha256') == motion_sources + and previous.get('server_sha256') == origin['server_sha256'] + and previous.get('block_tags_sha256') == lab.digest(root/'block-tags.json', 'sha256') + and all((root/name).exists() and previous.get('motion_files_sha256', {}).get(name) + == lab.digest(root/name, 'sha256') for name in motion_files)): + export = lab.LOCAL/'horizon-client-motion'; export.mkdir(exist_ok=True) + lab.write_json(export/'tags.json', tags) + classes = export/'classes'; classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, [jars['server'], *libraries])) + with (export/'export.log').open('w') as log: + subprocess.run(['javac', '--release', str(lock['minecraft']['java_major']), '-proc:none', + '-cp', dependencies, '-d', str(classes), str(movement), str(attributes), str(oracle), str(landing), str(collision)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + for name in ['VanillaBlockLandingOracle', 'VanillaEntityAttributeOracle']: + subprocess.run(['java', '-Xmx768M', '-cp', str(classes)+os.pathsep+dependencies, + 'dev.horizonlab.parity.'+name, 'export', str(export)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + (root/'movement-properties.nbt').write_bytes((export/'movement-properties.nbt').read_bytes()) + (root/'attributes.json').write_bytes((export/'catalog.json').read_bytes()) + (root/'landing-definitions.json').write_bytes((export/'landing-definitions.json').read_bytes()) + damage = oracle.with_name('VanillaDamageSourceOracle.java') + health = oracle.with_name('VanillaPlayerHealthOracle.java') + health_sources = base.source_hashes([damage, health, attributes]) + health_files = ['damage-types.json', 'damage-tags.json', 'damage-catalog.json', 'player-float-ids.json'] + if not (previous.get('health_exporters_sha256') == health_sources + and previous.get('server_sha256') == origin['server_sha256'] + and all((root/name).exists() and previous.get('health_files_sha256', {}).get(name) + == lab.digest(root/name, 'sha256') for name in health_files)): + export = lab.LOCAL/'horizon-client-health'; export.mkdir(exist_ok=True) + with zipfile.ZipFile(jars['server']) as archive, zipfile.ZipFile(jars['client']) as client_archive: + for file, prefix in [('types.json', 'data/minecraft/damage_type/'), ('tags.json', 'data/minecraft/tags/damage_type/')]: + def extract(source): + return {'minecraft:'+n[len(prefix):-5]: source.read(n).decode('utf-8') + for n in sorted(source.namelist()) if n.startswith(prefix) and n.endswith('.json')} + resources = extract(archive) + if resources != extract(client_archive): raise ValueError('Reference damage resources disagree') + lab.write_json(export/file, resources) + classes = export/'classes'; classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, [jars['server'], *libraries])) + with (export/'export.log').open('w') as log: + subprocess.run(['javac', '--release', str(lock['minecraft']['java_major']), '-proc:none', + '-cp', dependencies, '-d', str(classes), str(damage), str(health), str(attributes)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + for name in ['VanillaPlayerHealthOracle', 'VanillaDamageSourceOracle']: + subprocess.run(['java', '-Xmx768M', '-cp', str(classes)+os.pathsep+dependencies, + 'dev.horizonlab.parity.'+name, 'export', str(export)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + for source, target in [('types.json','damage-types.json'), ('tags.json','damage-tags.json'), + ('catalog.json','damage-catalog.json'), ('ids.json','player-float-ids.json')]: + (root/target).write_bytes((export/source).read_bytes()) + collision_file = root / 'cached-collision.nbt' + if not (previous.get('collision_exporters_sha256') == collision_sources + and previous.get('server_sha256') == origin['server_sha256'] + and collision_file.exists() + and previous.get('collision_sha256') == lab.digest(collision_file, 'sha256')): + export = lab.LOCAL/'horizon-client-collision'; export.mkdir(exist_ok=True) + classes = export/'classes'; classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, [jars['server'], *libraries])) + with (export/'export.log').open('w') as log: + subprocess.run(['javac', '--release', str(lock['minecraft']['java_major']), '-proc:none', + '-cp', dependencies, '-d', str(classes), str(collision)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + subprocess.run(['java', '-Xmx768M', '-cp', str(classes)+os.pathsep+dependencies, + 'dev.horizonlab.parity.VanillaCollisionOracle', 'generate', str(export)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + collision_file.write_bytes((export/'cached-collision.nbt').read_bytes()) + render_sources = base.source_hashes([visibility, collision, oracle]) + render_files = ['render-definitions.json', 'occlusion.nbt'] + tag_hash = lab.digest(root/'block-tags.json', 'sha256') + if not (previous.get('render_exporters_sha256') == render_sources + and previous.get('server_sha256') == origin['server_sha256'] + and previous.get('block_tags_sha256') == tag_hash + and all((root/name).exists() and previous.get('render_files_sha256', {}).get(name) + == lab.digest(root/name, 'sha256') for name in render_files)): + export = lab.LOCAL/'horizon-client-render'; export.mkdir(exist_ok=True) + lab.write_json(export/'tags.json', tags) + classes = export/'classes'; classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, [jars['server'], *libraries])) + with (export/'export.log').open('w') as log: + subprocess.run(['javac', '--release', str(lock['minecraft']['java_major']), '-proc:none', + '-cp', dependencies, '-d', str(classes), str(visibility), str(collision), str(oracle)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + subprocess.run(['java', '-Xmx768M', '-cp', str(classes)+os.pathsep+dependencies, + 'dev.horizonlab.parity.VanillaFaceVisibilityOracle', 'export', str(export)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + (root/'render-definitions.json').write_bytes((export/'definitions.json').read_bytes()) + (root/'occlusion.nbt').write_bytes((export/'occlusion.nbt').read_bytes()) + count = 0 + # The playable client needs every client asset (textures, models, fonts, GUI) + # and every data-pack resource (worldgen, recipes, loot tables, tags). + prefixes = ('assets/', 'data/') + with zipfile.ZipFile(jars['client']) as archive: + version = json.loads(archive.read('version.json')) + for name in archive.namelist(): + if not name.startswith(prefixes) or name.endswith('/'): + continue + relative = Path(name) + if relative.is_absolute() or '..' in relative.parts: + raise ValueError('Invalid resource path') + target = root / relative + data = archive.read(name) + if not target.exists() or target.read_bytes() != data: + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(data) + count += 1 + gameplay = root / 'gameplay-facts.json' + gameplay_oracle = oracle.with_name('VanillaGameplayFactsExporter.java') + gameplay_sources = base.source_hashes([gameplay_oracle]) + if not (previous.get('gameplay_exporters_sha256') == gameplay_sources and gameplay.exists() + and previous.get('server_sha256') == origin['server_sha256']): + classes = lab.LOCAL / 'gameplay-facts' / 'classes'; classes.mkdir(parents=True, exist_ok=True) + dependencies = os.pathsep.join(map(str, [jars['server'], *libraries])) + with (root / 'gameplay-export.log').open('w') as log: + subprocess.run(['javac', '--release', str(lock['minecraft']['java_major']), '-proc:none', + '-cp', dependencies, '-d', str(classes), str(gameplay_oracle)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + subprocess.run(['java', '-Xmx1G', '-cp', str(classes) + os.pathsep + dependencies, + 'dev.horizonlab.parity.VanillaGameplayFactsExporter', str(gameplay)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + # Entity dimensions, categories and default attributes for the client's mobs. + entity_types = root / 'entity-types.json' + entity_types_oracle = oracle.with_name('VanillaEntityTypesExporter.java') + entity_types_sources = base.source_hashes([entity_types_oracle]) + if not (previous.get('entity_types_exporters_sha256') == entity_types_sources and entity_types.exists() + and previous.get('server_sha256') == origin['server_sha256']): + classes = lab.LOCAL / 'entity-types' / 'classes'; classes.mkdir(parents=True, exist_ok=True) + dependencies = os.pathsep.join(map(str, [jars['server'], *libraries])) + with (root / 'entity-types-export.log').open('w') as log: + subprocess.run(['javac', '--release', str(lock['minecraft']['java_major']), '-proc:none', + '-cp', dependencies, '-d', str(classes), str(entity_types_oracle)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + subprocess.run(['java', '-Xmx1G', '-cp', str(classes) + os.pathsep + dependencies, + 'dev.horizonlab.parity.VanillaEntityTypesExporter', str(entity_types)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + # Block classes, instance configuration and per-state support/signal/fluid + # facts for horizon-world's level behaviour (level::Behaviours::load). + behaviours = root / 'block-behaviours.json' + behaviour_oracle = oracle.with_name('VanillaBlockBehaviourExporter.java') + behaviour_sources = base.source_hashes([behaviour_oracle]) + if not (previous.get('behaviour_exporters_sha256') == behaviour_sources and behaviours.exists() + and previous.get('server_sha256') == origin['server_sha256']): + classes = lab.LOCAL / 'block-behaviours' / 'classes'; classes.mkdir(parents=True, exist_ok=True) + dependencies = os.pathsep.join(map(str, [jars['server'], *libraries])) + with (root / 'behaviour-export.log').open('w') as log: + subprocess.run(['javac', '--release', str(lock['minecraft']['java_major']), '-proc:none', + '-cp', dependencies, '-d', str(classes), str(behaviour_oracle)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + subprocess.run(['java', '-Xmx1G', '-cp', str(classes) + os.pathsep + dependencies, + 'dev.horizonlab.parity.VanillaBlockBehaviourExporter', str(behaviours)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + items = root / 'items.json' + if not items.exists() or previous.get('server_sha256') != origin['server_sha256']: + # Vanilla's own data generator reports every item's default components. + datagen = lab.LOCAL / 'datagen'; datagen.mkdir(exist_ok=True) + with (datagen / 'datagen.log').open('w') as log: + subprocess.run(['java', '-DbundlerMainClass=net.minecraft.data.Main', '-jar', + str(jars['server'].with_name('server.jar')), '--reports', '--output', 'out'], + cwd=datagen, check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + reports = datagen / 'out' / 'reports' + components = {f'minecraft:{f.stem}': json.loads(f.read_text())['components'] + for f in sorted((reports / 'minecraft' / 'components' / 'item').glob('*.json'))} + items.write_text(json.dumps(components)) + (root / 'biome-parameters').mkdir(exist_ok=True) + for f in (reports / 'biome_parameters' / 'minecraft').glob('*.json'): + (root / 'biome-parameters' / f.name).write_bytes(f.read_bytes()) + # Biome parameter tables come from the data generator reports above. + prepare_worldgen(root, jars, lab.LOCAL, libraries) + entity_models = root / 'entity-models.json' + entity_oracle = oracle.with_name('VanillaEntityModelExporter.java') + entity_sources = base.source_hashes([entity_oracle]) + if not (previous.get('entity_model_exporters_sha256') == entity_sources and entity_models.exists() + and previous.get('client_sha256') == origin['client_sha256']): + classes = lab.LOCAL / 'entity-models' / 'classes'; classes.mkdir(parents=True, exist_ok=True) + dependencies = os.pathsep.join(map(str, [jars['client'], *baking.client_libraries()])) + with (root / 'entity-model-export.log').open('w') as log: + subprocess.run(['javac', '--release', str(lock['minecraft']['java_major']), '-proc:none', + '-cp', dependencies, '-d', str(classes), str(entity_oracle)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + subprocess.run(['java', '-Xmx1G', '-cp', str(classes) + os.pathsep + dependencies, + 'dev.horizonlab.parity.VanillaEntityModelExporter', str(entity_models)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + creative = root / 'creative-tabs.json' + creative_oracle = oracle.with_name('VanillaCreativeTabsExporter.java') + creative_sources = base.source_hashes([creative_oracle]) + if not (previous.get('creative_exporters_sha256') == creative_sources and creative.exists() + and previous.get('server_sha256') == origin['server_sha256']): + classes = lab.LOCAL / 'creative-tabs' / 'classes'; classes.mkdir(parents=True, exist_ok=True) + dependencies = os.pathsep.join(map(str, [jars['server'], *libraries])) + with (root / 'creative-export.log').open('w') as log: + subprocess.run(['javac', '--release', str(lock['minecraft']['java_major']), '-proc:none', + '-cp', dependencies, '-d', str(classes), str(creative_oracle)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + subprocess.run(['java', '-Xmx1G', '-cp', str(classes) + os.pathsep + dependencies, + 'dev.horizonlab.parity.VanillaCreativeTabsExporter', str(creative)], + check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + recover_creative_tabs(creative, root) + lab.write_json(manifest, {'schema': 7, **origin, + 'health_exporters_sha256': health_sources, + 'health_files_sha256': {name: lab.digest(root/name, 'sha256') for name in health_files}, + 'motion_exporters_sha256': motion_sources, + 'motion_files_sha256': {name: lab.digest(root/name, 'sha256') for name in motion_files}, + 'collision_exporters_sha256': collision_sources, + 'collision_sha256': lab.digest(collision_file, 'sha256'), + 'render_exporters_sha256': render_sources, + 'render_files_sha256': {name: lab.digest(root/name, 'sha256') for name in render_files}, + 'model_state_exporters_sha256': binding_sources, + 'gameplay_exporters_sha256': gameplay_sources, + 'entity_model_exporters_sha256': entity_sources, + 'creative_exporters_sha256': creative_sources, + 'entity_types_exporters_sha256': entity_types_sources, + 'behaviour_exporters_sha256': behaviour_sources, + 'model_states_sha256': lab.digest(model_states, 'sha256'), 'data_version': version['world_version'], + 'facts_sha256': lab.digest(facts, 'sha256'), + 'block_tags_sha256': lab.digest(root / 'block-tags.json', 'sha256'), 'resource_files': count}) + print(f'Prepared Horizon native-client resources: {root}') + + +def recover_creative_tabs(path, root): + """Tabs whose generators need dynamic registries (banner patterns) fail in + the bare bootstrap; recover their item order from the decompiled source.""" + import re + tabs = json.loads(path.read_text()) + source = lab.LOCAL / 'decompiled/net/minecraft/world/item/CreativeModeTabs.java' + if not source.exists(): + return + items = json.loads((root / 'items.json').read_text()) + text = source.read_text() + for tab in tabs: + if tab['items'] or tab['type'] != 'CATEGORY': + continue + name = tab['id'].split(':')[1].upper() + start = text.find(f'{name},') + end = text.find('Registry.register(', start + 1) + found = [] + for m in re.finditer(r'\b(Items|Blocks)\.([A-Z0-9_]+)(?:\.(\w+)\(\))?', text[start:end]): + base, colour = m.group(2).lower(), m.group(3) + item = 'minecraft:' + (f'{colour}_{base}' if colour and colour not in ('asItem', 'defaultBlockState', 'get') else base) + if item in items and item not in found: + found.append(item) + tab['items'] = found + path.write_text(json.dumps(tabs)) + + +if __name__ == '__main__': + main() diff --git a/tools/runtime.py b/tools/runtime.py index 60cc4b37d..1a40378c8 100644 --- a/tools/runtime.py +++ b/tools/runtime.py @@ -27,7 +27,9 @@ def install_original_mod(source, mod_dir, filename=None): """Replace our own previous versions, retaining backups outside Fabric's mod scan.""" mod_dir.mkdir(parents=True, exist_ok=True) filename = filename or source.name - for old in mod_dir.glob("horizon-lab-*.jar"): + # Retire both current and pre-rebrand filenames to avoid duplicate mod IDs. + candidates = sorted({*mod_dir.glob("horizon-*.jar"), *mod_dir.glob("horizon-lab-*.jar")}) + for old in candidates: if old.name == filename: continue with zipfile.ZipFile(old) as archive: diff --git a/tools/server.py b/tools/server.py index 4191bf75a..d9d2facc7 100644 --- a/tools/server.py +++ b/tools/server.py @@ -37,7 +37,7 @@ def prepare(instance, baseline=False): source = runtime.fetch(entry["url"], ROOT / ".local/pack-cache" / entry["filename"], entry["hashes"]["sha512"], "sha512") shutil.copyfile(source, mod_dir / entry["filename"]) - original = ROOT / "dist" / f"horizon-lab-{pack_lock['pack_version']}.jar" + original = ROOT / "dist" / f"horizon-{pack_lock['pack_version']}.jar" if not original.exists(): raise FileNotFoundError("Build the original mod first with tools/build_mod.py, or use the server starter ZIP") runtime.install_original_mod(original, mod_dir) diff --git a/tools/structure_start_oracle.py b/tools/structure_start_oracle.py new file mode 100644 index 000000000..dc622ae19 --- /dev/null +++ b/tools/structure_start_oracle.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python3 +"""Run the vanilla structure-start oracle for a seed and chunk rectangle. + +usage: structure_start_oracle.py OUT SEED X0 Z0 X1 Z1 +""" +import os +import subprocess +from pathlib import Path +import sys +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def main(): + out, seed, x0, z0, x1, z1 = sys.argv[1:7] + lock, jars, libraries = base.verify_artifacts() + source = lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStructureStartOracle.java' + build = Path(os.environ['HORIZON_ORACLE_BUILD']) if os.environ.get('HORIZON_ORACLE_BUILD') else lab.LOCAL/'structure-start-oracle' + classes = build/'classes' + classes.mkdir(parents=True, exist_ok=True) + dependencies = os.pathsep.join(map(str, [jars['server'], *libraries])) + compiled = subprocess.run(['javac', '--release', str(lock['minecraft']['java_major']), '-proc:none', '-cp', dependencies, + '-d', str(classes), str(source)], capture_output=True, text=True) + if compiled.returncode: + raise SystemExit('javac failed:\n' + compiled.stderr[-3000:]) + result = subprocess.run(['java', '-Xmx2G', '-cp', str(classes)+os.pathsep+dependencies, + 'dev.horizonlab.parity.VanillaStructureStartOracle', out, seed, x0, z0, x1, z1], + capture_output=True, text=True) + if result.returncode: + lines = [line for line in (result.stdout + result.stderr).splitlines() if 'Exception' in line or 'Caused' in line] + raise SystemExit('oracle failed: ' + ' | '.join(lines[:5])) + + +if __name__ == '__main__': + main() diff --git a/tools/test_active_effect_tick_parity.py b/tools/test_active_effect_tick_parity.py new file mode 100644 index 000000000..1ce8b20aa --- /dev/null +++ b/tools/test_active_effect_tick_parity.py @@ -0,0 +1,93 @@ +#!/usr/bin/env python3 +"""Compare inherited entity effect ticks, expirations, callbacks, blend and particles.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng=random.Random(0x5449434b4546) + durations=[-2147483648,-2,-1,0,1,2,599,600,601,1201,2147483647] + floats=[0,0x80000000,0x3f000000,0x3f800000,0xbf800000,0x7f800000,0xff800000,0x7fc00000] + doubles=[0,0x8000000000000000,0x3ff0000000000000,0xbff0000000000000,0x7ff0000000000000,0x7ff8000000000000] + def state(**kw): + v=dict(key=0,duration=20,amplifier=1,ambient=False,visible=True,icon=True,hidden=-1,factor=0x3f000000,previous=0);v.update(kw);return v + def config(**kw): + v=dict(states=[state(key=0,duration=1,hidden=-1),state(key=1,duration=601),state(key=2,duration=-1,hidden=0)],allow=True,level=0,client=False,removed=False,random=0,reseed=False,seeds=[9,-13],position=[1,2,3],category=0,tick=81,should=True,apply=True,advance=2,blend_in=4,blend_out=7,particles=[0,1,2],ambience=False,invisible=False,coordinates=[0,0x3ff0000000000000,0xbff0000000000000]);v.update(kw);return v + def op(name,a=0,b=0,**kw): + v=dict(op=name,a=a,b=b,source=-1,partial=0x3f000000,list=[0,1,2,0],probability=0x3f800000,sound=0,level=0);v.update(kw);return v + def row(**kw): + v=dict(xor=False,seeds=[1,-3],servers=[True,False],hashes=[0,1,2],initial=config(),after=config(states=[state(key=0,duration=1,amplifier=9),state(key=1,duration=-1,amplifier=2),state(key=2,duration=0,amplifier=0)],allow=True,level=1,client=True,removed=True,random=1,reseed=True,particles=[2,2,0],ambience=True,invisible=True,coordinates=[0x8000000000000000,0x7ff0000000000000,0x7ff8000000000000]),setup=[op('put',i,i) for i in range(3)],ops=[op('tick'),op('tick')],fail=-1,cme=-1,mutate=-1,mutations=[op('put',0,2)]);v.update(kw);return v + for server in [False,True]: + for should in [False,True]: + for apply in [False,True]: + for duration in durations: + for hidden in [-1,0]: + yield row(servers=[server,not server],initial=config(should=should,apply=apply,states=[state(key=0,duration=1201),state(key=1,duration=duration,hidden=hidden),state(key=2,duration=600)]),ops=[op('tick') for _ in range(4)]) + for mutation in [[],[op('drop',0)],[op('clear')],[op('put',2,0)],[op('drop',1),op('put',1,2)],[op('put',0,2)]]: + for mutate in range(-1,10): + for failure in ['fail','cme']: + for fail in range(-1,10): + yield row(servers=[server,not server],mutations=mutation,mutate=mutate,**{failure:fail}) + for xor in [False,True]: + for ambient in [False,True]: + for invisible in [False,True]: + for seed in range(40): + yield row(xor=xor,seeds=[seed,-seed],servers=[False,False],setup=[],initial=config(ambience=ambient,invisible=invisible),ops=[op('tick') for _ in range(4)]) + for count in [0,1,2,8,9,13,25,49,64]: + for server in [False,True]: + states=[state(key=i,duration=[0,1,2,601,-1][i%5]) for i in range(count)] + yield row(xor=xor,servers=[server,server],hashes=[0 for _ in range(count)],initial=config(states=states),after=config(states=states),setup=[op('put',i,i) for i in reversed(range(count))],ops=[op('tick') for _ in range(4)],mutations=[]) + for _ in range(600): + count=rng.choice([3,5,8,16]);hashes=[rng.choice([0,0,64,i*31]) for i in range(count)] + def states():return [state(key=rng.randrange(count),duration=rng.choice(durations),amplifier=rng.choice([-1,0,1,2,255,256,2147483647]),ambient=bool(rng.randrange(2)),visible=bool(rng.randrange(2)),icon=bool(rng.randrange(2)),hidden=rng.randrange(-1,i),factor=rng.choice(floats),previous=rng.choice(floats)) for i in range(count)] + def cfg():return config(states=states(),allow=bool(rng.randrange(2)),level=rng.randrange(2),client=bool(rng.randrange(2)),removed=bool(rng.randrange(2)),random=rng.randrange(2),reseed=bool(rng.randrange(2)),seeds=[rng.randrange(-2**63,2**63) for _ in range(2)],position=[rng.randrange(-2**31,2**31) for _ in range(3)],category=rng.randrange(8),tick=rng.randrange(-2**31,2**31),should=bool(rng.randrange(2)),apply=bool(rng.randrange(2)),advance=rng.choice(durations),blend_in=rng.choice(durations),blend_out=rng.choice(durations),particles=[rng.randrange(3) for _ in range(rng.randrange(5))],ambience=bool(rng.randrange(2)),invisible=bool(rng.randrange(2)),coordinates=[rng.choice(doubles) for _ in range(3)]) + yield row(xor=bool(rng.randrange(2)),seeds=[rng.randrange(-2**63,2**63) for _ in range(2)],servers=[bool(rng.randrange(2)) for _ in range(2)],hashes=hashes,initial=cfg(),after=cfg(),setup=[op('put',rng.randrange(count),rng.randrange(count)) for _ in range(count)],ops=[op(rng.choice(['tick']*8+['apply-status','remove-status','clear-status','sound','add','force','remove','all','get','blend','put','drop','copy','alias']),rng.randrange(count),rng.randrange(count),source=rng.randrange(-1,2),partial=rng.choice(floats),list=[rng.randrange(count) for _ in range(rng.randrange(5))],probability=rng.choice(floats),level=rng.randrange(2),sound=rng.randrange(2)) for _ in range(20)],fail=rng.randrange(-1,30),cme=rng.randrange(-1,30),mutate=rng.randrange(-1,30),mutations=[op(rng.choice(['put','drop','clear','copy','alias']),rng.randrange(count),rng.randrange(count)) for _ in range(3)]) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-active-effect-tick-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaActiveEffectTickOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/active_effect_tick_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaActiveEffectTickOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','active_effect_tick_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('active_effect_tick_fixture.exe' if os.name=='nt' else 'active_effect_tick_fixture') + references=[] + for side,jar in jars.items(): + java(side,side,build) + enriched=build/f'inputs-{side}.txt';enriched_hash=base.source_hashes([enriched]) + run([binary,build,side],'rust-'+side) + reference=build/f'{side}.txt';rust_output=build/f'rust-{side}.txt';matched=base.compare(reference,rust_output) + base.ensure_sources_unchanged([enriched],enriched_hash) + tested_fixtures.update(enriched_hash);fixture_paths.append(enriched) + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'rust_output_sha256':lab.digest(rust_output,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} active effect tick output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'references':references,'scope':'Inherited LivingEntity.tickEffects composed with actual MobEffectInstance ticks, active-effect HashMaps, native synced particle/ambience data and both RNG kinds. Includes removal/refresh ordering, shared hidden restoration, nonstructural replacements, structural mutations, concurrent-modification catch boundaries, client blending, particle selection and RNG tails. Selected raw instance fields and callbacks can mutate during execution. Level classes are controlled ServerLevel and non-ServerLevel implementations; random particle positions, registered effect behavior and notification side effects remain controlled. Holder identity hashes are exported per reference run. Complete entity/player lifecycle and gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped active effect tick parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_active_effects_parity.py b/tools/test_active_effects_parity.py new file mode 100644 index 000000000..39d297ba2 --- /dev/null +++ b/tools/test_active_effects_parity.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python3 +"""Compare inherited entity effect storage with concrete instances and native maps.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng=random.Random(0x414354495645) + durations=[-2147483648,-2,-1,0,1,20,200,2147483647] + amps=[-1,0,1,2,255,256,2147483647] + floats=[0,0x80000000,0x3f000000,0x3f800000,0xbf800000,0x7f800000,0x7fc00000] + def state(**kw): + v=dict(key=0,duration=20,amplifier=1,ambient=False,visible=True,icon=True,hidden=-1,factor=0x3f000000,previous=0);v.update(kw);return v + def config(**kw): + v=dict(states=[state(),state(duration=200,amplifier=0),state(key=1,hidden=0)],allow=True,level=0,client=False,removed=False);v.update(kw);return v + def op(name,a=0,b=0,**kw): + v=dict(op=name,a=a,b=b,source=-1,partial=0x3f000000);v.update(kw);return v + def row(**kw): + v=dict(hashes=[0,1,2],initial=config(),after=config(states=[state(duration=1,amplifier=9),state(duration=-1,amplifier=2),state(duration=0,amplifier=0)],allow=True,level=1,client=True,removed=True),setup=[],ops=[op('add'),op('add',1),op('force',2),op('all')],fail=-1,mutate=-1,mutations=[op('put',0,2)]);v.update(kw);return v + for name in ['add','force','remove','all','blend']: + for setup in [[],[op('put',0,0)],[op('put',0,1),op('put',1,2)]]: + for fail in range(-1,5): + for mutate in range(-1,5):yield row(setup=setup,ops=[op(name),op('get'),op('has')],fail=fail,mutate=mutate) + for count in [1,2,3,7,8,9,11,13,24,25,48,49,64]: + for collision in [False,True]: + states=[state(key=i,duration=200,amplifier=i%3) for i in range(count)] + setup=[op('put',i,i) for i in reversed(range(count))] + yield row(hashes=[0 if collision else i*31 for i in range(count)],initial=config(states=states),after=config(states=states),setup=setup,ops=[op('all')],mutations=[]) + for _ in range(700): + count=rng.choice([3,5,8,16]);hashes=[rng.choice([0,0,64,i*31]) for i in range(count)] + def states():return [state(key=rng.randrange(count),duration=rng.choice(durations),amplifier=rng.choice(amps),ambient=bool(rng.randrange(2)),visible=bool(rng.randrange(2)),icon=bool(rng.randrange(2)),hidden=rng.randrange(-1,i),factor=rng.choice(floats),previous=rng.choice(floats)) for i in range(count)] + def cfg():return config(states=states(),allow=bool(rng.randrange(2)),level=rng.randrange(2),client=bool(rng.randrange(2)),removed=bool(rng.randrange(2))) + yield row(hashes=hashes,initial=cfg(),after=cfg(),setup=[op('put',rng.randrange(count),rng.randrange(count)) for _ in range(count)],ops=[op(rng.choice(['add','add','force','remove','remove-raw','all','has','get','blend','put','drop','copy','alias']),rng.randrange(count),rng.randrange(count),source=rng.randrange(-1,2),partial=rng.choice(floats)) for _ in range(20)],fail=rng.randrange(-1,20),mutate=rng.randrange(-1,20),mutations=[op(rng.choice(['put','drop','clear','copy','alias']),rng.randrange(count),rng.randrange(count)) for _ in range(3)]) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-active-effects-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaActiveEffectsOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/active_effects_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaActiveEffectsOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','active_effects_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('active_effects_fixture.exe' if os.name=='nt' else 'active_effects_fixture') + references=[] + for side,jar in jars.items(): + java(side,side,build) + enriched=build/f'inputs-{side}.txt';enriched_hash=base.source_hashes([enriched]) + run([binary,build,side],'rust-'+side) + reference=build/f'{side}.txt';rust_output=build/f'rust-{side}.txt';matched=base.compare(reference,rust_output) + base.ensure_sources_unchanged([enriched],enriched_hash) + tested_fixtures.update(enriched_hash);fixture_paths.append(enriched) + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'rust_output_sha256':lab.digest(rust_output,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} active effect output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'references':references,'scope':'Inherited LivingEntity addEffect, forceAddEffect, removeEffect/NoUpdate, removeAllEffects, queries and blend lookup with actual status instances and JDK maps. Native holder hash and identity-hash values are captured for Rust per run. Compares callback ordering, fresh versus existing instances, hidden updates, blend transfer, source identity, incoming effect lifecycle hooks, map-copy removal order and mutation/failure prefixes. Eligibility, attribute/packet side effects and registered effect behavior remain controlled; complete entity lifecycle and gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped Java HashMap parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_anchor_parity.py b/tools/test_anchor_parity.py new file mode 100644 index 000000000..fbff1d7e6 --- /dev/null +++ b/tools/test_anchor_parity.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python3 +"""Compare vertical anchor codecs, resolution and generation bounds with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng=random.Random(0x484f52495a4f4e414e43484f52) + names=["absolute","above_bottom","below_top","relative_to_sea_level"] + edges=[-2**31,-2033,-2032,-64,-1,0,1,63,2031,2032,2**31-1] + values=edges+[rng.randrange(-2**31,2**31) for _ in range(128)] + encodings=['null','false','0','"absolute"','[]','{}'] + numbers=[str(v) for v in edges]+['0.9','-0.9','1e3','-1e3','4294967296','4294967295','-4294967296','1e100','-1e100','1e-100','2147483648.9','-2147483649.9','null','true','"12"','[]','{}'] + for name in names: + for value in numbers:encodings.append('{"'+name+'":'+value+'}') + encodings += ['{"'+name+'":0,"unknown":true}','{"'+name+'":0,"'+name+'":1}','{"'+name+'":1,"'+name+'":null}'] + import itertools + for combination in itertools.product([None,0,2032,"bad"],repeat=4): + encodings.append(json.dumps({name:value for name,value in zip(names,combination) if value is not None},separators=(",",":"))) + contexts=[[-64,384,63],[0,256,32],[-2032,4064,0],[100,0,-100],[0,-1,0]] + contexts += [[x,y,z] for x,y,z in itertools.product([-2**31,0,2**31-1],repeat=3)] + contexts += [[rng.randrange(-2**31,2**31) for _ in range(3)] for _ in range(64)] + for i,context in enumerate(contexts): + for generator in [None,contexts[(i+7)%len(contexts)]]: + fixture={"context":context,"values":values,"json":encodings} + if generator is not None:fixture["generator"]=generator + yield fixture + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-anchor-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAnchorOracle.java" + sources=[oracle,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/anchor_fixture.rs"] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus());inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths);classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") + run(["cargo","build","--release","-p","horizon-world","--example","anchor_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("anchor_fixture.exe" if os.name=="nt" else "anchor_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaAnchorOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} anchor output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"codec_inputs":sum(len(f["json"]) for f in fixtures),"runtime_anchors":sum(3+4*len(f["values"]) for f in fixtures), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual VerticalAnchor.CODEC parsing and encoding, all four anchor kinds, constant helpers, runtime integer overflow and unrestricted constructor values. WorldGenerationContext.of uses a LevelAccessor proxy with verified method calls; the generator constructor uses a native NoiseBasedChunkGenerator with supplied minimum, height and sea level. Strict JSON transport covers range limits, numeric truncation/wrapping, null/wrong field types, duplicate fields and nested exclusive alternatives. Level access outside the three queried values, JSON syntax diagnostics and complete material conditions remain pending."} + lab.write_json(report_path,report);print(f"Scoped anchor parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_attribute_health_parity.py b/tools/test_attribute_health_parity.py new file mode 100644 index 000000000..0d273bf18 --- /dev/null +++ b/tools/test_attribute_health_parity.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 +"""Compare registered health attributes, synchronization and hunger regeneration with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(catalog): + def bits(v):return struct.pack('>f',v).hex() + def double(v):return struct.pack('>d',v).hex() + def op(mode,value=0,attribute=0,amount=0,operation=0,**kw): + o=dict(mode=mode,value=bits(value),attribute=attribute,amount=double(amount),operation=operation,id='horizon:a',nutrition=2);o.update(kw);return o + def food(n=20,s=5,e=0,t=9):return dict(food=n,saturation=bits(s),exhaustion=bits(e),timer=t) + def row(entity,ops,**kw): + f=dict(entity=entity,ops=ops,health=bits(10),absorption=bits(0),dead=False,regen=True,difficulty=2,food=food(),fail=-1);f.update(kw);return f + values=[-float('inf'),-1e30,-1,-0.,0.,1e-40,.1,1,5,10,20,1e30,float('inf'),float('nan')] + entities=list(catalog['entities']) + for entity in entities: + for value in values: + ops=[op('hurt'),op('heal',1),op('base',amount=value),op('heal',1),op('set',value),op('base',attribute=1,amount=value),op('absorption',value),op('reset'),op('tick'),op('pack')] + for operation in range(3):ops.extend([op('add',amount=.25,operation=operation),op('heal',1),op('tick'),op('pack')]) + ops.extend([op('remove'),op('heal',1),op('dead')]);yield row(entity,ops) + for entity in entities: + for n,s,t in [(20,5,9),(18,0,79),(0,0,79)]: + for fail in [-1,0,1,2]:yield row(entity,[op('tick') for _ in range(100)]+[op('pack')],food=food(n,s,0,t),fail=fail) + rng=random.Random(0x4845414c464f4f44) + for _ in range(1500): + ops=[op(rng.choice(['hurt','dead','heal','set','absorption','tick','tick','eat','exhaust','pack','base','add','remove','reset']),rng.choice(values),rng.randrange(2),rng.choice(values),rng.randrange(3),id=rng.choice(['horizon:a','horizon:b']),nutrition=rng.choice([-1,0,1,2,20])) for __ in range(rng.randrange(5,80))] + yield row(rng.choice(entities),ops,health=bits(rng.choice(values)),absorption=bits(rng.choice(values)),dead=bool(rng.randrange(2)),regen=bool(rng.randrange(2)),difficulty=rng.randrange(4),food=food(rng.choice([0,17,18,19,20]),rng.choice(values),rng.choice(values),rng.choice([0,9,79])),fail=rng.choice([-1,-1,0,1,2,5])) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-attribute-health-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeHealthOracle.java' + helper=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java' + sources=[oracle,helper,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/attribute_health_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,helper],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaAttributeHealthOracle',mode,path],side+'-'+mode) + java('server','export',build);states=json.loads((build/'catalog.json').read_text());fixtures=list(corpus(states));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'catalog.json'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','attribute_health_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('attribute_health_fixture.exe' if os.name=='nt' else 'attribute_health_fixture') + run([binary,build],'rust');run([binary,build,'live'],'rust-live');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + live_matched=base.compare(reference,build/'rust-live.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched,'live_matched_output_lines':live_matched}) + print(f'{side}: {matched:,} attribute health output lines match both Rust storage backends',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Registered entity AttributeMap defaults/modifiers composed with actual LivingEntity/Player health methods, SynchedEntityData float health and FoodData regeneration. All 93 default suppliers; attribute mutations, health limits, actual healing and dirty state, hunger/exhaustion/timers, observer failures and starvation requests. Internal absorption storage and starvation damage delivery are controlled; Player absorption synchronization, attribute-change refresh, full damage and live gameplay remain pending.'} + report['live_rust_output_sha256']=lab.digest(build/'rust-live.txt','sha256') + report['scope'] += ' Both the per-attribute EntityAttributes storage and native-order LiveAttributes component execute the same production health binding. This health trace normalizes attribute collection order; actual JVM map/queue order is covered by the separate live-attribute gate.' + lab.write_json(report_path,report);print(f'Scoped attribute health parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_attribute_map_queries_parity.py b/tools/test_attribute_map_queries_parity.py new file mode 100644 index 000000000..a1495aebe --- /dev/null +++ b/tools/test_attribute_map_queries_parity.py @@ -0,0 +1,101 @@ +#!/usr/bin/env python3 +"""Compare native attribute map queries, cached and supplier values, modifier lookups and reset.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +try: + from . import lab, test_rust_parity as base, test_stored_effect_attributes_parity as stored_base, test_stored_effect_notifications_parity as notifications +except ImportError: + import lab + import test_rust_parity as base + import test_stored_effect_attributes_parity as stored_base + import test_stored_effect_notifications_parity as notifications + + +def corpus(): + yield from notifications.corpus() + rows=list(stored_base.corpus()) + def bits(v):return struct.pack('>d',float(v)).hex() + values=[-float('inf'),-1e30,-1,-0.,0.,.1,1,2,20,1e16,float('inf'),float('nan')] + def op(kind,**kw): + r=dict(op=kind,key=0,instance=0,template=0,target=0,amplifier=0,flag=False,value=bits(0),fail=-1,mutate=-1,mutations=[],client=False,reapply=True,count=1) + r.update(kw);return r + def queries(key=0,template=0): + return [op(k,key=key,template=template) for k in ['attribute-has','modifier-has','attribute-value','attribute-base','modifier-value','reset-base']] + selected=[rows[i] for i in [0,4,8,12,18,22,36,50]] + for row in selected: + n=len(row['hashes']) + ops=[] + for key in [-1,*range(n)]:ops.extend(queries(key,min(max(key,0),n-1))) + ops += [op('prototype-permanent'),*queries(),op('get'),*queries(),op('prototype-base',value=bits(7)),op('base',value=bits(3)),*queries()] + ops += [op('prototype-remove'),*queries(),op('notify-add'),*queries(),op('notify-update',amplifier=2),*queries(),op('notify-remove'),*queries()] + for key in [-1,*range(n)]:ops += [op('put',key=key,instance=0),*queries(key),op('put',key=key,instance=-1),*queries(key)] + yield dict(row,ops=ops) + for row in selected[:4]: + for value in values: + for base in values: + yield dict(row,ops=[op('prototype-base',value=bits(value)),*queries(),op('prototype-permanent'), + op('get'),op('base',value=bits(base)),op('attribute-value'),op('reset-base'),op('attribute-value'), + op('notify-add'),op('attribute-value'),op('notify-remove'),op('attribute-value')]) + mutations=[[op('clear')],[op('put',instance=-1)],[op('queue-clear')],[op('queue-clear',target=1)], + [op('put',key=-1,instance=0)],[op('queue-add',instance=-1)],[op('syncable',flag=False)]] + for row in selected[:4]: + for actions in mutations: + for fail in [-1,0,1]: + for at in [-1,0,1]: + yield dict(row,ops=[op('get'),op('base',value=bits(11)),op('reset-base',fail=fail,mutate=at,mutations=actions), + op('value'),op('lookup'),op('attribute-value'),op('notify-remove'),op('reset-base')]) + rng=random.Random(0x4154545251554552) + for _ in range(200): + row=rng.choice(selected);n=len(row['hashes']);ops=[op('get')] + for __ in range(40): + kind=rng.choice(['attribute-has','modifier-has','attribute-value','attribute-base','modifier-value','reset-base', + 'get','put','drop','base','prototype-base','prototype-permanent','prototype-remove','notify-add','notify-update','notify-remove']) + ops.append(op(kind,key=rng.randrange(-1,n),template=rng.randrange(n),instance=rng.choice([0,-1]),value=bits(rng.choice(values)), + amplifier=rng.choice([-2**31,-1,0,1,255,2**31-1]),fail=rng.choice([-1,-1,-1,0,1]), + mutate=rng.choice([-1,-1,0,1,2]),mutations=rng.choice(mutations))) + yield dict(row,ops=ops) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-attribute-map-queries-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeMapQueriesOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/attribute_map_queries_fixture.rs'] + helper=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredEffectAttributesOracle.java' + sources.extend([helper,lab.ROOT/'crates/horizon-world/examples/stored_effect_attributes_fixture.rs',lab.ROOT/'tools/test_stored_effect_attributes_parity.py',lab.ROOT/'tools/test_stored_effect_notifications_parity.py']) + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,helper],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaAttributeMapQueriesOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','attribute_map_queries_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('attribute_map_queries_fixture.exe' if os.name=='nt' else 'attribute_map_queries_fixture') + references=[] + for side,jar in jars.items(): + java(side,side,build) + enriched=build/f'inputs-{side}.txt';fixture_paths.append(enriched);tested_fixtures.update(base.source_hashes([enriched])) + run([binary,build,side],'rust-'+side) + reference=build/f'{side}.txt';candidate=build/f'rust-{side}.txt';matched=base.compare(reference,candidate) + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched,'rust_output_sha256':lab.digest(candidate,'sha256')}) + print(f'{side}: {matched:,} attribute map query output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'fastutil_sha256':{str(p.relative_to(lab.ROOT)):lab.digest(p,'sha256') for p in libraries if 'fastutil' in str(p)},'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'references':references,'scope':'Actual AttributeMap hasAttribute/hasModifier/getValue/getBaseValue/getModifierValue/resetBaseValue using real cached AttributeInstances and mutable AttributeSupplier prototypes. Includes entire stored-notification corpus and checks no lazy creation on query/reset, supplier versus instance cache updates, modifier identity and missing-value exception categories, lookup aliasing/null mappings, captured reset instance, supplier base/modifier changes and dirty callback failure. Basic attribute default/syncability and entity onAttributeUpdated bodies remain controlled; registered ranged definitions, combined health/dimension consequences, full gameplay and platform builds remain pending.'} + lab.write_json(report_path,report);print(f'Scoped attribute map query parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_attribute_parity.py b/tools/test_attribute_parity.py new file mode 100644 index 000000000..7bd639ff0 --- /dev/null +++ b/tools/test_attribute_parity.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python3 +"""Compare attribute modifier storage, value calculation and dirty callbacks with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(definitions): + def bits(v):return struct.pack('>d',float(v)).hex() + def definition(default=1,minimum=None,maximum=None): + d=dict(default=bits(default)) + if minimum is not None:d.update(min=bits(minimum),max=bits(maximum)) + return d + def mod(name='horizon:a',amount=.1,operation=0):return dict(id=name,amount=bits(amount),operation=operation) + def op(mode='value',**kw): + f=dict(mode=mode,target=0,source=1,modifier=0,modifiers=[],base=bits(0),fail=-1,read=False);f.update(kw);return f + def row(modifiers,ops,defs=None):return dict(definitions=defs or [definition(),definition(0,-100,100)],modifiers=modifiers,ops=ops) + basic=[mod(),mod(amount=.2,operation=1),mod(amount=.3,operation=2),mod(),mod('horizon:b',2,0)] + sequence=[op('value'),op('permanent'),op('update',modifier=1),op('update',modifier=1),op('update',modifier=3),op('value'),op('remove'),op('value'),op('clear'),op('value'),op('apply',modifiers=[0,1,2,4]),op('pack'),op('unpack',target=1),op('copy',target=1,source=0),op('copy',target=0,source=0),op('value'),op('value',target=1)] + for d in definitions:yield row(basic,sequence,defs=[d,definition()]) + values=[-float('inf'),-1e30,-1,-0.,0.,1e-40,.1,1,2,1e16,1e30,float('inf'),float('nan')] + for value in values: + for amount in values: + for operation in range(3):yield row([mod(amount=amount,operation=operation)],[op('base',base=bits(value)),op('add'),op('value'),op('value'),op('remove'),op('value')]) + for default in values: + for minimum in [-1,-0.,0.,1,float('nan')]: + for maximum in [-1,-0.,0.,1,float('nan')]:yield row([],[op('value'),op('base',base=bits(default)),op('value')],defs=[definition(default,minimum,maximum),definition()]) + for fail in range(-1,5): + for read in [False,True]: + ops=[dict(o,fail=fail,read=read) for o in sequence] + ops.extend([op('replace',modifier=4,fail=fail,read=read),op('many',modifiers=[0,4,0],fail=fail,read=read),op('value')]) + yield row(basic,ops) + names=['a','minecraft:a',':a','','minecraft:',':','horizon:','horizon:/a','a:b.c-_/0'] + yield row([mod(n,i/10,i%3) for i,n in enumerate(names)],[*[op('update',modifier=i) for i in range(len(names))],op('value'),op('clear'),op('value')]) + def java_hash(s): + h=0 + for c in s:h=(h*31+ord(c))&0xffffffff + return h + colliders=[];i=0 + while len(colliders)<128: + name='cluster_'+str(i);h=(31*java_hash('horizon')+java_hash(name))&0xffffffff;h=(h*0x9e3779b9)&0xffffffff + if (h^(h>>16))&31==31:colliders.append('horizon:'+name) + i+=1 + for operation in range(3): + pool=[mod(n,[1e16,-1e16,1,.01,-.01,7][i%6],operation) for i,n in enumerate(colliders)] + for reverse in [False,True]: + order=list(range(len(pool)));order=order[::-1] if reverse else order + ops=[] + for i in order:ops.extend([op('permanent',modifier=i),op('value')]) + ops.extend([op('copy',target=1,source=0),op('value',target=1)]) + for i in order[::2]+order[1::2]:ops.extend([op('remove',modifier=i),op('value')]) + ops.extend([op('apply',modifiers=order),op('value'),op('clear'),op('value')]);yield row(pool,ops) + rng=random.Random(0x415454524942) + for _ in range(1500): + pool=[mod(rng.choice(colliders[:40]),rng.choice(values),rng.randrange(3)) for _ in range(rng.randrange(1,90))] + ops=[op('pack')] + for i in range(rng.randrange(10,100)): + mode=rng.choice(['base','add','update','permanent','replace','remove','clear','copy','pack','unpack','apply','many','value']) + ops.append(op(mode,target=rng.randrange(2),source=rng.randrange(2),modifier=rng.randrange(len(pool)),modifiers=[rng.randrange(len(pool)) for _ in range(rng.randrange(8))],base=bits(rng.choice(values)),fail=rng.choice([-1,-1,-1,0,1,2]),read=bool(rng.randrange(2)))) + yield row(pool,ops,defs=rng.sample(definitions,2) if rng.randrange(2) else [definition(),definition(0,-100,100)]) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-attribute-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/attribute_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaAttributeOracle',mode,path],side+'-'+mode) + java('server','export',build);states=json.loads((build/'attributes.json').read_text());fixtures=list(corpus(states));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'attributes.json'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','attribute_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('attribute_fixture.exe' if os.name=='nt' else 'attribute_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} attribute output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual AttributeInstance and basic/ranged attributes, with every registered attribute definition. Native modifier identity, global/permanent insertion order, per-operation fastutil hash iteration/rehashing, cache/dirty callbacks, partial writes on observer failure, transient operation changes, duplicate rejection, bulk removal, replacement (including self), pack and merging apply. Includes nonfinite/signed-zero arithmetic, collision clusters and seeded operation sequences. Attribute registry/entity/equipment integration and packed data/network codecs remain pending.'} + lab.write_json(report_path,report);print(f'Scoped attribute parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_attribute_updates_parity.py b/tools/test_attribute_updates_parity.py new file mode 100644 index 000000000..1afcf059d --- /dev/null +++ b/tools/test_attribute_updates_parity.py @@ -0,0 +1,91 @@ +#!/usr/bin/env python3 +"""Compare native attribute-update consequences composed with notifications and health storage.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +try: + from . import lab, test_rust_parity as base, test_effect_notifications_parity as notifications +except ImportError: + import lab + import test_rust_parity as base + import test_effect_notifications_parity as notifications + + +def corpus(): + def d(v):return int.from_bytes(struct.pack('>d',v),'big') + def f(v):return int.from_bytes(struct.pack('>f',v),'big') + def decorate(row): + row['health']=[f(20),f(30)];row['servers']=[True,False] + for after,c in enumerate([row['initial'],row['after']]): + c.update(data=after,absorption=f(12) if not after else None,maximums=[d(10),d(6)] if not after else [d(.5),d(2)],direct_attributes=after,managers=[0,1] if not after else [1,0],values=[[d(1)]*5,[d(-1)]*5]) + return row + for row in notifications.corpus():yield decorate(row) + def op(name,a=0,**kw): + v=dict(op=name,a=a,b=0,source=-1,partial=0x3f000000,list=[4,5],reapply=True);v.update(kw);return v + def fresh(): + row=decorate(next(notifications.corpus()));row.update(setup=[],ops=[op('attribute-update'),op('pack',0),op('pack',1)],fail=-1,mutate=-1,mutations=[]) + return row + doubles=[-float('inf'),-1.,-0.,0.,1e-50,.5,1.,10.,20.,1e50,float('inf'),float('nan')] + floats=[-float('inf'),-1.,-0.,0.,.5,10.,20.,float('inf'),float('nan')] + for kind in [0,1]: + for value in floats: + for maximum in doubles: + row=fresh();row['health']=[f(value),f(value)];row['initial'].update(absorption=f(value),maximums=[d(maximum),d(maximum)]);row['ops'][0]=op('attribute-update',kind);yield row + for kind in range(5): + for servers in [[False,False],[True,False],[False,True],[True,True]]: + for fail in range(-1,8): + for mutate in range(-1,8): + row=fresh();row.update(servers=servers,fail=fail,mutate=mutate);row['ops'][0]=op('attribute-update',kind);yield row + for value in doubles: + for level in [0,1]: + row=fresh();row.update(servers=[True,True]);row['initial'].update(level=level,values=[[d(value)]*5,[d(value)]*5]);row['ops'][0]=op('attribute-update',3);yield row + rng=random.Random(0x41545452555044) + for _ in range(500): + row=fresh();row.update(health=[f(rng.choice(floats)) for _ in range(2)],servers=[bool(rng.randrange(2)) for _ in range(2)],fail=rng.randrange(-1,20),mutate=rng.randrange(-1,20),ops=[op(rng.choice(['attribute-update','refresh','notify-update','notify-remove','pack']),rng.randrange(2)) for _ in range(8)]) + for c in [row['initial'],row['after']]: + c.update(data=rng.randrange(2),absorption=f(rng.choice(floats)),maximums=[d(rng.choice(doubles)) for _ in range(2)],direct_attributes=rng.randrange(2),managers=[rng.randrange(2) for _ in range(2)],values=[[d(rng.choice(doubles)) for _ in range(5)] for _ in range(2)],holders=[rng.randrange(5) for _ in range(3)],level=rng.randrange(2)) + row['setup']=[op('pending-add',0,b=i) for i in range(3)];yield row + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-attribute-updates-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaAttributeUpdatesOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/"tools/test_effect_notifications_parity.py",lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/attribute_updates_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaAttributeUpdatesOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','attribute_updates_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('attribute_updates_fixture.exe' if os.name=='nt' else 'attribute_updates_fixture') + references=[] + for side,jar in jars.items(): + java(side,side,build) + enriched=build/f'inputs-{side}.txt';enriched_hash=base.source_hashes([enriched]) + run([binary,build,side],'rust-'+side) + reference=build/f'{side}.txt';rust_output=build/f'rust-{side}.txt';matched=base.compare(reference,rust_output) + base.ensure_sources_unchanged([enriched],enriched_hash) + tested_fixtures.update(enriched_hash);fixture_paths.append(enriched) + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'rust_output_sha256':lab.digest(rust_output,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} attribute update output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'references':references,'scope':'Inherited LivingEntity.onAttributeUpdated composed with native effect notifications, pending sets and synchronized health storage. Includes max-health and max-absorption lowering, repeated maximum reads, Float dirty callbacks, dimension refresh dispatch, server waypoint manager selection, direct attribute-map field capture and positive-range tracking. Tests finite/nonfinite numeric values, callback mutation/failure prefixes and packet notifications. Actual attribute values, dimension rebuild and waypoint-manager internals remain controlled; registered modifier bodies and complete player/entity gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped attribute update parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_bamboo_parity.py b/tools/test_bamboo_parity.py new file mode 100644 index 000000000..9a2d65c55 --- /dev/null +++ b/tools/test_bamboo_parity.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python3 +"""Compare bamboo survival, podzol spread and ordered leafy caps.""" +import itertools +import json +try: + from . import test_simple_block_parity as harness +except ImportError: + import test_simple_block_parity as harness + + +def corpus(facts, placement): + states = facts['states']; get = lambda name: facts['defaults']['minecraft:' + name] + wrap = lambda n: (n + 2**31) % 2**32 - 2**31 + def bamboo(probability=1): return {'type': 'bamboo', 'probability': probability} + def case(definition=None, **extra): + origin = extra.pop('origin', [0, 65, 0]) + value = {'definition': json.dumps(definition if definition is not None else bamboo()), + 'mode': 'feature', 'origin': origin, 'legacy': False, 'seed': 0, 'world_seed': 1, + 'fail': -1, 'reject': 0, 'brightness': 15, 'height': origin[1], 'fallback': get('air'), + 'states': [[*origin, get('air')], [origin[0], wrap(origin[1]-1), origin[2], get('dirt')]], 'repeats': 1} + value.update(extra); return value + for state in range(len(states)): + yield case(states=[[0, 65, 0, state], [0, 64, 0, get('dirt')]], fail=25) + yield case(bamboo(0), states=[[0, 65, 0, get('air')], [0, 64, 0, state]], fail=25) + yield case(fallback=state, fail=25) + yield case(bamboo(0), states=[[0, 64, 0, get('dirt')], [0, 68, 0, state]]) + for probability, legacy, seed in itertools.product([0, 0.01, 0.5, 1], [False, True], range(64)): + yield case(bamboo(probability), legacy=legacy, seed=seed, repeats=2) + for legacy, seed, fail, reject in itertools.product([False, True], range(16), [-1, 0, 1, 2, 4, 11, 25, 60, 100], [0, 1, 3]): + yield case(legacy=legacy, seed=seed, fail=fail, reject=reject, fallback=get('dirt'), + states=[[0, y, 0, get('air')] for y in range(65, 84)], repeats=2) + for stop, legacy, reject in itertools.product(range(1, 19), [False, True], [0, 1, 3]): + yield case(bamboo(0), legacy=legacy, reject=reject, states=[[0, 64, 0, get('dirt')], [0, 65+stop, 0, get('bedrock')]]) + for height, legacy in itertools.product([-2147483648, -64, 0, 65, 320, 2147483647], [False, True]): + yield case(height=height, legacy=legacy) + for origin, legacy in itertools.product( + [[2147483647, 65, 2147483647], [-2147483648, 65, -2147483648], [0, 2147483647, 0], [0, -2147483648, 0], + [2147483644, 65, 2147483644]], [False, True]): + yield case(origin=origin, legacy=legacy, fail=20) + yield case(bamboo(0), origin=origin, legacy=legacy) + for value in [None, False, -1, -0.0, -1e-100, 1e-100, 1.0000000001, 1.01, '0.5', [], {}]: + yield case(bamboo(value)) + yield case({'type': 'bamboo'}) + for legacy, fail, reject in itertools.product([False, True], [-1, 0, 9, 31], [0, 3]): + placed = {'feature': bamboo(), 'placement': [{'type': 'count', 'count': 2}]} + yield case(placed, mode='placed', legacy=legacy, fail=fail, reject=reject, repeats=2) + yield case({'type': 'overlay', 'features': [placed, {'feature': 'horizon:moss', 'placement': []}]}, legacy=legacy, fail=fail, reject=reject) + + +if __name__ == '__main__': + harness.run(corpus, 'rust-bamboo-parity', __file__, + 'Native BambooFeature bounded float codec, air-origin gate, actual bamboo survival, attempted-success semantics, height and optional radius draws, circular podzol patch with ordered WORLD_SURFACE requests, replacement tag, stalk air checks and three leafy caps including the stopping-position overwrite. All origin/support/podzol states have failure-terminated prefixes; all obstacle states have full no-podzol runs. Both RNGs, many seeds, signed zero and float rounding, obstruction heights, rejected writes, repeated mutation, partial failures, wrapped coordinates and composition are covered. Fixture height values are controlled and do not update after writes. Growth, world updates and complete generation remain pending; pathological wrapped patch loops are bounded to 2^20 visits.') diff --git a/tools/test_basic_feature_parity.py b/tools/test_basic_feature_parity.py new file mode 100644 index 000000000..001397965 --- /dev/null +++ b/tools/test_basic_feature_parity.py @@ -0,0 +1,95 @@ +#!/usr/bin/env python3 +"""Compare basic feature algorithms and ordered world mutations with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + encode=lambda value:json.dumps(value,separators=(',',':')) + origins=[[cx*16,64,cz*16] for cx in [-1,0,1] for cz in [-1,0,1]]+[[8,64,8],[-32,0,0],[32,0,0],[2147483647,-2147483648,2147483647],[-2147483648,2147483647,-2147483648]] + for legacy in [False,True]: + for seed in [0,-1,0x123456789abcdef]: + for kind in ['void_start_platform','end_island','end_platform']: + for origin in origins: + for reject in [0,3]: + for fail in [-1,0,7,63]: + yield {'definition':encode({'type':kind}),'origin':origin,'legacy':legacy,'seed':seed,'reject':reject,'fail':fail,'repeats':2} + chains=[[], + [{'type':'count','count':2}], + [{'type':'count','count':2},{'type':'in_square'}], + [{'type':'in_square'},{'type':'count','count':2}], + [{'type':'count','count':{'type':'uniform','min_inclusive':0,'max_inclusive':3}}, + {'type':'offset','x':{'type':'uniform','min_inclusive':-2,'max_inclusive':2},'y':1,'z':-1}], + [{'type':'count','count':2},{'type':'height_range','height':{'type':'uniform','min_inclusive':{'above_bottom':0},'max_inclusive':{'below_top':0}}}], + [{'type':'random_chance','chance':0.5},{'type':'count','count':2}], + [{'type':'count','count':2},{'type':'random_chance','chance':0.5}], + [{'type':'cuboid','xz_size':1,'y_size':1},{'type':'random_chance','chance':0.5}], + [{'type':'fixed_placement','positions':[[0,64,0],[0,64,0],[1,64,1]]}], + [{'type':'noise_threshold_count','noise_level':0,'below_noise':1,'above_noise':2},{'type':'in_square'}]] + for legacy in [False,True]: + for seed in [0,-1,0x123456789abcdef]: + for kind in ['void_start_platform','end_island','end_platform']: + for chain in chains: + for fail in [-1,0,7,63]: + for reject in [0,3]: + yield {'definition':encode({'type':kind}),'placement':chain,'origin':[0,64,0], + 'legacy':legacy,'seed':seed,'reject':reject,'fail':fail,'repeats':2} + for definition in [None,False,0,[],{}, {'type':'missing'}, {'type':':end_island'}, {'type':'minecraft:end_platform','ignored':0}]: + yield {'definition':encode(definition),'origin':[0,64,0],'legacy':False,'seed':0,'reject':0,'fail':7,'repeats':1} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-basic-feature-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBasicFeatureOracle.java" + helper=oracle.with_name("VanillaPlacementOracle.java") + sources=[oracle,helper,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/basic_feature_fixture.rs"] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus());inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths);classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper],"compile-java") + for side,jar in jars.items(): + path=build/f"facts-{side}.json" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaBasicFeatureOracle","export",path],side+"-export") + fixture_paths.append(path) + if json.loads((build/"facts-client.json").read_text())!=json.loads((build/"facts-server.json").read_text()):raise ValueError("reference feature block states differ") + tested_fixtures=base.source_hashes(fixture_paths) + run(["cargo","build","--release","-p","horizon-world","--example","basic_feature_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("basic_feature_fixture.exe" if os.name=="nt" else "basic_feature_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaBasicFeatureOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} basic-feature output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"basic_features":3,"block_states":5,"composed_fixtures":sum("placement" in f for f in fixtures),"requested_placements":sum(f["repeats"] for f in fixtures), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual Feature.DIRECT_CODEC and native void-start-platform, End-island and End-platform feature algorithms. A mutable WorldGenLevel proxy logs ordered block reads, writes, update flags, rejected writes, thrown failures and accumulated stored states after repeated placements. Native LevelWriter.setBlockAndUpdate executes through its actual default method. Required default block-state IDs are independently exported and checked across both authenticated JARs. Direct calls and native FeaturePlacer modifier chains share the mutable world and random stream, including reused placer buffers after failures. Both random modes, multiple seeds, nearby/far chunks and extreme wrapped coordinates are compared, with nextLong values after every placement and at fixture end. The End-platform feature invokes its ordinary generation path without block destruction/drops. Actual chunk mutation, neighbor updates, lighting, entity/block drops, full feature registry behavior and complete generated worlds remain outside this comparison."} + + lab.write_json(report_path,report);print(f"Scoped basic-feature parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_biome_chunk_parity.py b/tools/test_biome_chunk_parity.py new file mode 100644 index 000000000..f484c1c5f --- /dev/null +++ b/tools/test_biome_chunk_parity.py @@ -0,0 +1,81 @@ +#!/usr/bin/env python3 +"""Compare quart-biome chunk storage and section-atomic filling with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng=random.Random(0x484f52495a4f4e42494f4348) + for minimum,height in [(-64,384),(0,128),(-2032,4064),(2000,32),(-16,16)]: + for cx,cz in [(0,0),(-1,2),(1875000,-1875000),(-2**31,2**31-1)]: + maximum=minimum+height-1 + queries=[[x,y,z] for x,y,z in [(cx*4,minimum//4,cz*4),(cx*4+3,maximum//4,cz*4+3),(-2**31,-2**31,2**31-1),(2**31-1,2**31-1,-2**31)]] + queries=[[((v+2**31)%2**32)-2**31 for v in q] for q in queries] + queries += [[rng.randrange(-2**31,2**31) for _ in range(3)] for _ in range(128)] + ops=[[0,1,-1,minimum,maximum],[17,67,-1,minimum,maximum],[97,129,0,minimum,maximum],[5,2,63,minimum,maximum],[9,8,64,minimum,maximum],[123,512,65,minimum,maximum],[17,3,-1,minimum+1,maximum-1],[-2**31,67,-1,minimum,maximum]] + yield {'cx':cx,'cz':cz,'min':minimum,'height':height,'default':rng.randrange(512),'ops':ops,'queries':queries} + + # Retention uses an existing column at quart Y=0. Include fills that overlap + # that column's section so later sections observe earlier committed sections. + for minimum,height in [(-64,128),(-64,64),(-16,32),(0,32),(64,16)]: + for cx,cz in [(0,0),(-1,2),(1875000,-1875000),(-2**31,2**31-1)]: + maximum=minimum+height-1 + queries=[[-2**31,-2**31,2**31-1],[2**31-1,2**31-1,-2**31],[-1,0,1],[0,-16,0],[3,15,3]] + ops=[[17,67,-1,minimum,maximum]] + for before,after in [(False,False),(True,True),(False,True),(True,False)]: + for salt,count,fail in [(19,512,-1),(0,3,-1),(7,512,0),(9,512,63),(17,512,64),(23,512,65)]: + ops.append([salt,count,fail,minimum,maximum,before,after]) + ops.append([31,512,-1,minimum+1,maximum-1,before,after]) + resolver_queries=[[candidate,*q,before,after] for candidate in [0,1,2,3,4,511,-1] + for before,after in [(False,False),(False,True),(True,False),(True,True)] for q in queries] + yield {'cx':cx,'cz':cz,'min':minimum,'height':height,'default':4,'ops':ops,'queries':queries,'resolver_queries':resolver_queries} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-biome-chunk-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeChunkOracle.java" + sources=[oracle,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/biome_chunk_fixture.rs"] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus());inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths);classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") + run(["cargo","build","--release","-p","horizon-world","--example","biome_chunk_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("biome_chunk_fixture.exe" if os.name=="nt" else "biome_chunk_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaBiomeChunkOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} biome-chunk output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"fills":sum(len(f["ops"]) for f in fixtures),"block_queries":sum(len(f["ops"])*len(f["queries"]) for f in fixtures),"retrogen_fills":sum(len(op)>5 for f in fixtures for op in f["ops"]),"resolver_queries":sum(len(f.get("resolver_queries",[])) for f in fixtures), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual ChunkAccess.fillBiomesFromNoise, LevelChunkSection.fillBiomesFromNoise and chunk/section biome reads using synthetic registered holder identities. Ordered resolver queries, section contents and clamped/wrapped chunk lookups are compared after repeated fills and failures at section boundaries. Covers full supported aligned vertical bounds, generation bounds cutting through sections, negative/extreme chunk coordinates and 1..512 possible biome identities. Completed earlier sections survive failure while the failing section retains its previous values. Additional BelowZeroRetrogen.getBiomeResolver cases compare all three retained cave keys, a lookalike foreign namespace, ordinary keyed holders and a direct holder without a key. All four combinations of upgrade activation at resolver construction and after construction test the captured wrapping decision. Candidate invocation order, injected candidate failures, old-column reads with quart Y fixed to zero and X/Z wrapping, repeated fills, and overlap of generation bounds with the old column section are exercised. Synthetic generation bounds deliberately override the fixed native retrogen height to expose section commit/read ordering. Direct holder values and all keyed holders are identity-only placeholders; biome properties are not evaluated. This compares stored biome values and resolver behavior, not native in-memory palette layout, wire encoding, biome-source generation integration, nonempty blending or complete generated worlds."} + + lab.write_json(report_path,report);print(f"Scoped biome-chunk parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_biome_generation_parity.py b/tools/test_biome_generation_parity.py new file mode 100644 index 000000000..4c38070d7 --- /dev/null +++ b/tools/test_biome_generation_parity.py @@ -0,0 +1,100 @@ +#!/usr/bin/env python3 +"""Compare chunk generation for all four biome-source kinds with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base,test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(bundle): + for setting,raw in sorted(bundle['settings'].items()): + value=json.loads(raw);minimum=value['noise']['min_y'];height=value['noise']['height'] + for preset in sorted(bundle['presets']): + for legacy in [False,True]: + for seed,cx,cz in [(0,0,0),(-1,-2,3),(0x123456789abcdef,1875000,-1875000)]: + queries=[[cx*16+x,y,cz*16+z] for x in [-1,0,2,7,15,16] for z in [-1,0,2,7,15,16] for y in [minimum-20,minimum,minimum+17,minimum+height-1,minimum+height+20]] + yield {'setting':setting,'preset':preset,'seed':seed,'legacy':legacy,'cx':cx,'cz':cz,'min':minimum,'height':height,'write_min':minimum+(17 if seed==-1 else 0),'write_max':minimum+height-1-(17 if seed==-1 else 0),'queries':queries,'repeats':2 if seed==0 else 1} + + + for source in ['fixed','checkerboard','end']: + for legacy in [False,True]: + for seed,cx,cz,scale in [(0,0,0,2),(-1,65,0,0),(2,-65,1,30),(-2**63,1875000,-1875000,62)]: + queries=[[cx*16+x,y,cz*16+z] for x in [-1,0,7,15,16] for z in [-1,0,7,15,16] for y in [minimum-1,minimum+17,minimum+height]] + yield {'setting':setting,'preset':'minecraft:overworld','source':source,'scale':scale,'seed':seed,'legacy':legacy,'cx':cx,'cz':cz,'min':minimum,'height':height,'write_min':minimum,'write_max':minimum+height-1,'queries':queries,'repeats':2 if seed==0 else 1} + + for setting,raw in sorted(bundle['settings'].items()): + value=json.loads(raw);minimum=value['noise']['min_y'];height=value['noise']['height'] + if minimum != -64: continue + for legacy in [False,True]: + for mode in ['multi_overworld','multi_nether','fixed','cave_fixed','checkerboard','end']: + for sample,(seed,cx,cz) in enumerate([(0,0,0),(-1,-2,3),(0x123456789abcdef,1875000,-1875000)]): + queries=[[cx*16+x,y,cz*16+z] for x in [-1,0,7,15,16] for z in [-1,0,7,15,16] for y in [-65,-64,-17,-1,0,1,minimum+height-1,minimum+height]] + fixture={'setting':setting,'preset':'minecraft:nether' if mode=='multi_nether' else 'minecraft:overworld','seed':seed,'legacy':legacy,'cx':cx,'cz':cz,'min':minimum,'height':height,'write_min':-64,'write_max':-1,'retrogen':True,'queries':queries,'repeats':2,'scale':2} + if not mode.startswith('multi_'):fixture['source']='fixed' if mode=='cave_fixed' else mode + if mode=='cave_fixed':fixture['fixed_biome']=['minecraft:lush_caves','minecraft:dripstone_caves','minecraft:deep_dark'][sample] + yield fixture + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-biome-generation-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeGenerationOracle.java" + exporter=oracle.with_name("VanillaBiomeExport.java") + sources=[oracle,exporter,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/biome_generation_fixture.rs"] + tested_sources=base.source_hashes(sources) + classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,exporter],"compile-java") + bundle={} + for field,kind in [('noises','noise'),('densities','density_function'),('settings','noise_settings')]: + resources=worldgen.registry_resources(jars['server'],kind) + if not resources or resources!=worldgen.registry_resources(jars['client'],kind):raise ValueError('reference '+kind+' resources differ') + prefix='data/minecraft/worldgen/'+kind+'/' + bundle[field]={'minecraft:'+name[len(prefix):-5]:raw for name,raw in resources.items()} + exports=[] + for side,jar in jars.items(): + path=build/f'presets-{side}.json';exports.append(path) + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jar),dependency_path]),'dev.horizonlab.parity.VanillaBiomeExport',path],side+'-export') + presets=json.loads(path.read_text()) + if not presets or ('presets' in bundle and presets!=bundle['presets']):raise ValueError('reference biome preset tables differ') + bundle['presets']=presets + registries=build/'registries.json';registries.write_text(json.dumps(bundle,separators=(',',':')),encoding='utf-8') + fixtures=list(corpus(bundle));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(f,separators=(',',':'))+'\n' for f in fixtures),encoding='utf-8') + fixture_paths=[inputs,registries,*exports];tested_fixtures=base.source_hashes(fixture_paths) + run(["cargo","build","--release","-p","horizon-world","--example","biome_generation_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("biome_generation_fixture.exe" if os.name=="nt" else "biome_generation_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaBiomeGenerationOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} biome-generation output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"retrogen_fixtures":sum(f.get("retrogen",False) for f in fixtures),"fills":sum(f["repeats"] for f in fixtures),"biome_values":sum(f["repeats"]*f["height"]*4 for f in fixtures),"block_queries":sum(f["repeats"]*len(f["queries"]) for f in fixtures),"preset_entries":{name:len(json.loads(raw)) for name,raw in bundle["presets"].items()},"source_fixtures":{name:sum(f.get("source","multi")==name for f in fixtures) for name in ["multi","fixed","checkerboard","end"]}, + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual ChunkGenerator.doCreateBiomes through NoiseBasedChunkGenerator with empty Blender, in ordinary and below-zero upgrade modes. Both bundled Overworld/Nether multi-noise preset tables are independently exported from authenticated JARs; Rust imports quantized tables and compiles climate routers itself. All seven bundled routers, both random modes, multiple seeds and distant positive/negative chunks are tested. Complete section biome values and subsequent BiomeManager block lookups are compared, including repeated generation with fresh density contexts and persistent previous-leaf search state, and generation bounds excluding top/bottom sections. Holders are identity placeholders; no biome properties are evaluated. Fixed, checkerboard and End source fixtures also run actual chunk generation through every bundled router, including real seeded End erosion, the central-island shortcut, distant coordinates and wrapped checkerboard shifts. Retrogen cases initialize patterned old biome columns, install actual below-zero metadata with a full target on an empty persisted-stage ProtoChunk, and use its native generation height. Four below-zero noise settings, all source kinds, fixed candidates for each of the three retained cave biomes, both random modes, signed/distant seeds and repeated fills are compared. Above-zero stored biomes remain checked alongside regenerated sections and block-level biome zoom. Rust composes seeded candidate resolvers with the independently tested retention fill. Preset builders, complete biome-source codecs, nonempty blending, complete terrain-stage scheduling and complete generated worlds remain pending."} + + lab.write_json(report_path,report);print(f"Scoped biome-generation parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_biome_placement_parity.py b/tools/test_biome_placement_parity.py new file mode 100644 index 000000000..b32a0297b --- /dev/null +++ b/tools/test_biome_placement_parity.py @@ -0,0 +1,70 @@ +#!/usr/bin/env python3 +"""Compare biome placement filtering, root context, nested placers and partial failures.""" +import argparse +import itertools +import json +import os +from pathlib import Path +import platform +import random +import subprocess +import zipfile +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + biome={'type':'biome'} + chains=[[biome],[{'type':'count','count':3},{'type':'in_square'},biome],[biome,{'type':'count','count':2},{'type':'offset','x':1,'y':0,'z':0},biome],[{'type':'random_chance','chance':0.5},biome,{'type':'count','count':2}],[{'type':'count','count':2},biome,{'type':'offset','x':1,'y':0,'z':0},biome]] + for legacy in [False,True]: + for worldgen in [False,True]: + for top in [False,True]: + for membership in [[0,0],[1,0],[0,1],[1,1],[2,3],[3,2]]: + for placement in chains: + for query_fail,feature_fail in [(-1,-1),(0,-1),(1,-1),(3,-1),(-1,0),(-1,2)]: + for nested in [False,True]: + for return_mode in [0,1,2]: + yield {'legacy':legacy,'worldgen':worldgen,'seed':-1 if nested else 0,'top':top,'direct':False,'membership':membership,'placement':placement,'query_fail':query_fail,'feature_fail':feature_fail,'nested':nested,'draw':return_mode!=1,'return_mode':return_mode,'origin':[15,-64,15]} + for legacy in [False,True]: + for top in [False,True]: + for membership in itertools.product(range(4),repeat=2): + for query_fail in [-1,0,1,2]: + for origin in [[0,0,0],[2147483647,-2147483648,2147483647]]: + yield {'legacy':legacy,'worldgen':False,'seed':0,'top':top,'direct':True,'membership':list(membership),'placement':[biome],'query_fail':query_fail,'feature_fail':-1,'nested':False,'draw':True,'return_mode':0,'origin':origin} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-biome-placement-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomePlacementOracle.java' + helper=oracle.with_name("VanillaPlacementOracle.java") + sources=[oracle,helper,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/biome_placement_fixture.rs'] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(f,separators=(',',':'))+'\n' for f in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,helper],'compile-java') + run(['cargo','build','--release','-p','horizon-world','--example','biome_placement_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('biome_placement_fixture.exe' if os.name=='nt' else 'biome_placement_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jar),dependency_path]),'dev.horizonlab.parity.VanillaBiomePlacementOracle',side,build],side) + reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} biome-placement output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'random_modes':2,'requested_placements':len(fixtures)*3,'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual BiomeFilter.modify and FeaturePlacer.place/placeWithBiomeCheck with native biome generation settings. Missing top features fail before biome lookup. Direct, absent, structurally equal and different placed-feature membership, query order, callback random draws/results/errors, dirty buffers across repeats and nested plain placers are compared. Direct and WorldgenRandom-wrapped legacy/xoroshiro streams execute modifier chains. Rust delegates biome resolution and generation-settings membership to the caller while isolating each placer invocation context. Full biome sampling/registry equality, complete decoration, crash-report text and gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped biome-placement parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_biome_source_codec_parity.py b/tools/test_biome_source_codec_parity.py new file mode 100644 index 000000000..58989d884 --- /dev/null +++ b/tools/test_biome_source_codec_parity.py @@ -0,0 +1,120 @@ +#!/usr/bin/env python3 +"""Compare registry-bound biome-source codecs and decoded runtime behavior.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base,test_worldgen_parity as worldgen,test_biome_temperature_parity as temperature,test_material_condition_parity as material +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + import test_biome_temperature_parity as temperature + import test_material_condition_parity as material + + +def corpus(bundle): + encode=lambda value:json.dumps(value,separators=(',',':')) + for value in [None,False,0,'fixed',[],{}, {'type':'missing'}, {'type':None}]:yield encode(value) + for name in sorted(bundle['biomes']): + yield encode({'type':'fixed','biome':name}) + yield encode({'type':'checkerboard','biomes':name}) + for name in sorted(bundle['biome_tags']):yield encode({'type':'checkerboard','biomes':'#'+name,'scale':3}) + for value in [None,False,0,[],{},'',':','missing','Minecraft:plains','#is_overworld',['plains'],['plains','desert','plains'],['#is_overworld']]: + yield encode({'type':'fixed','biome':value}) + yield encode({'type':'checkerboard','biomes':value}) + for token in ['null','false','"2"','{}','[]','-1','0','1','2','30','31','32','62','63','-0.0','2.9','-0.9','4294967296','4294967298','2147483648','-4294967296','1e100','-1e100','1e-100']: + yield '{"type":"checkerboard","biomes":["plains","desert"],"scale":'+token+'}' + yield '{"type":"checkerboard","biomes":"plains","scale":-1,"scale":2}' + yield '{"type":":fixed","biome":":plains","ignored":true}' + yield '{"type":"fixed","biome":"missing","biome":"plains"}' + for value in [{},{'biome':'missing'},{'preset':None}]:yield encode({'type':'the_end',**value}) + point={name:0 for name in ['temperature','humidity','continentalness','erosion','depth','weirdness','offset']} + good={'parameters':point,'biome':'plains'} + for preset in [None,False,0,[],{},'overworld','nether',':overworld','missing',{'preset':'overworld'},{'preset':'nether'},{'preset':'missing'},{'preset':None}]: + yield encode({'type':'multi_noise','preset':preset}) + yield encode({'type':'multi_noise','biomes':[good],'preset':preset}) + yield encode({'type':'multi_noise','biomes':[],'preset':preset}) + yield encode({'type':'multi_noise','biomes':[{'biome':'missing','parameters':point}],'preset':preset}) + for entries in [[],[good],[good,good],[good,{'parameters':point,'biome':'desert'}],[{}],[{'parameters':point}],[{'biome':'plains'}],None,'plains',0]:yield encode({'type':'multi_noise','biomes':entries}) + for field in point: + for value in [None,False,'0',[],{},[-1,1],{'min':-1,'max':1},[1,-1],[-0.0,0.0],[0.0,-0.0],-2,-2.0001,2,2.0001,-0.0,0.00009999,0.123456789,1e100]: + changed={**point,field:value} + yield encode({'type':'multi_noise','biomes':[{'parameters':changed,'biome':'plains'}]}) + for name in point: + changed={key:value for key,value in point.items() if key!=name} + yield encode({'type':'multi_noise','biomes':[{'parameters':changed,'biome':'plains'}]}) + yield encode({'type':'multi_noise','biomes':[{'parameters':{**point,'temperature':[-0.1111,0.2222],'offset':0.012345},'biome':'desert'}]}) + + + # Cover every quantized climate value in [-2,2], including interval encoding + # and every nonnegative offset increment. Input floats are parsed by each codec. + for step in range(-20000,20001): + changed={**point,'temperature':step/10000,'humidity':[-2,step/10000],'offset':abs(step)%10001/10000} + yield encode({'type':'multi_noise','biomes':[{'parameters':changed,'biome':'plains'}]}) + + +def positions(): + return [[0,0,0],[256,0,0],[260,-1,0],[-257,8,1],[7500000,79,-7500000],[-2**31,2**31-1,-1],[2**31-1,-2**31,17]] + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-biome-source-codec-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeSourceCodecOracle.java" + exporter=oracle.with_name("VanillaBiomeExport.java") + helpers=[oracle.with_name(name+".java") for name in ["VanillaMaterialConditionOracle","VanillaAnchorOracle","VanillaBiomeTemperatureOracle"]] + sources=[oracle,exporter,*helpers,lab.ROOT/"tools/test_biome_temperature_parity.py",lab.ROOT/"tools/test_material_condition_parity.py",Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/biome_source_codec_fixture.rs"] + tested_sources=base.source_hashes(sources) + classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,exporter,*helpers],"compile-java") + bundle={} + for field,getter in [('biomes',temperature.biome_resources),('biome_tags',material.biome_tag_resources)]: + bundle[field]=getter(jars['server']) + if not bundle[field] or bundle[field]!=getter(jars['client']):raise ValueError('reference '+field+' resources differ') + (build/(field+'.json')).write_text(json.dumps(bundle[field],separators=(',',':')),encoding='utf-8') + exports=[] + for side,jar in jars.items(): + path=build/f'presets-{side}.json';exports.append(path) + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jar),dependency_path]),'dev.horizonlab.parity.VanillaBiomeExport',path],side+'-export') + presets=json.loads(path.read_text()) + if not presets or ('presets' in bundle and presets!=bundle['presets']):raise ValueError('reference biome preset tables differ') + bundle['presets']=presets + (build/'presets.json').write_text(json.dumps(bundle['presets'],separators=(',',':')),encoding='utf-8') + fixtures=list(corpus(bundle));inputs=build/'inputs.txt';inputs.write_text('\n'.join(fixtures)+'\n',encoding='utf-8') + (build/'positions.json').write_text(json.dumps(positions(),separators=(',',':')),encoding='utf-8') + fixture_paths=[inputs,*exports,build/'positions.json',*[build/(name+'.json') for name in bundle]];tested_fixtures=base.source_hashes(fixture_paths) + run(["cargo","build","--release","-p","horizon-world","--example","biome_source_codec_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("biome_source_codec_fixture.exe" if os.name=="nt" else "biome_source_codec_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaBiomeSourceCodecOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} biome-source codec output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"query_positions":len(positions()),"climate_grid_cases":40001,"biomes":len(bundle['biomes']),"biome_tags":len(bundle['biome_tags']), + + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual BiomeSource.CODEC parsing and encoding for fixed, checkerboard, End and multi-noise sources bound to pinned biome/tag registries and preset holders. Named biome holders, direct/tag holder sets, canonical identifiers, scale defaults/bounds/numeric narrowing, inline climate parameter lists, named/inline preset holders, inline-list preference/fallback, malformed fields and duplicate keys are compared. Canonical serialized JSON is compared as sorted structures with numeric double-bit values; possible-biome sets are sorted and compared, followed by source queries against zero climate/erosion. Rust imports independently authenticated preset tables. Full inline biome definitions, live registry ownership/reloads and complete source/world generation remain outside this scoped codec comparison."} + + lab.write_json(report_path,report);print(f"Scoped biome-source codec parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_biome_source_parity.py b/tools/test_biome_source_parity.py new file mode 100644 index 000000000..093c92427 --- /dev/null +++ b/tools/test_biome_source_parity.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python3 +"""Compare fixed, checkerboard and End biome sources with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng=random.Random(0x484f52495a4f4e534f55524345) + edges=[-2**31,-2**31+1,-536870913,-536870912,-260,-257,-256,-255,-4,-1,0,1,4,255,256,257,260,536870911,536870912,2**31-1] + positions=[[x,y,z] for x in edges for z in edges for y in [-2**31,-1,0,79,2**31-1]] + positions += [[rng.randrange(-2**31,2**31) for _ in range(3)] for _ in range(512)] + yield {'kind':'fixed','positions':positions} + for scale in [-2**31,-65,-34,-33,-32,-3,-2,-1,*range(63),63,64,65,2**31-1]: + for biomes in [[],[0],[3,1,3,2],list(range(67)),list(range(512))]:yield {'kind':'checkerboard','scale':scale,'biomes':biomes,'positions':positions} + bits=['00000000','80000000','3e800000','3e7fffff','3e800001','bd800000','bd800001','bd7fffff','be600000','be600001','be5fffff','7f800000','ff800000','7fc00000','7f800001','ffc00000'] + bits += [f'{rng.getrandbits(32):08x}' for _ in range(64)] + for value in bits:yield {'kind':'end','bits':value,'fail':False,'positions':positions} + yield {'kind':'end','bits':'00000000','fail':True,'positions':positions} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-biome-source-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeSourceOracle.java" + sources=[oracle,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/biome_source_fixture.rs"] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus());inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths);classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") + run(["cargo","build","--release","-p","horizon-world","--example","biome_source_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("biome_source_fixture.exe" if os.name=="nt" else "biome_source_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaBiomeSourceOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} biome-source output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"queries":sum(len(f["positions"]) for f in fixtures),"sources":{name:sum(f["kind"]==name for f in fixtures) for name in ["fixed","checkerboard","end"]}, + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual FixedBiomeSource, CheckerboardColumnBiomeSource and TheEndBiomeSource runtime queries using synthetic holder identities. Fixed results, checkerboard empty/duplicate/large lists, all codec-valid scales plus unrestricted runtime scales, Java masked shifts and wrapping sums are compared. End central-circle shortcuts, erosion sampler coordinates, exact threshold boundaries, nonfinite float samples, sampler failures and integer coordinate wrapping are compared through actual Climate.Sampler bindings. End density inputs in this suite are supplied constants; real seeded End density, biome-source codecs, registry/preset loading, possible-biome metadata and generated-world integration remain separate work."} + + lab.write_json(report_path,report);print(f"Scoped biome-source parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_biome_temperature_parity.py b/tools/test_biome_temperature_parity.py new file mode 100644 index 000000000..1edec516e --- /dev/null +++ b/tools/test_biome_temperature_parity.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python3 +"""Compare biome temperature sampling, precipitation and cache behavior with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +import zipfile +try: + from . import lab,test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng=random.Random(0x484f52495a4f4e54454d50) + bases=[0,0x80000000,1,0x80000001,0x3dcccccc,0x3dcccccd,0x3dccccce,0x3e199999,0x3e19999a,0x3e19999b,0x3e4ccccd,0x3f000000,0x3f800000,0xbf800000,0x7f7fffff,0xff7fffff,0x7f800000,0xff800000,0x7fc00000,0xffc00001] + bases += [rng.getrandbits(32) for _ in range(28)] + edges=[-2**31,-33554433,-33554432,-16777217,-16777216,-4097,-4096,-64,-1,0,1,63,64,79,80,81,4095,4096,16777216,16777217,33554431,33554432,2**31-1] + wrap=lambda value:(value+2**31)%2**32-2**31 + points=[[0,y,0,63] for y in [-64,0,63,79,80,81,82,319,4096]] + points += [[rng.choice(edges),rng.choice(edges),rng.choice(edges),rng.choice(edges)] for _ in range(96)] + points += [[rng.randrange(-30000000,30000001),rng.randrange(-64,321),rng.randrange(-30000000,30000001),63] for _ in range(96)] + # Reuse packed keys while varying the source coordinates and sea level. + for x,y,z,sea in list(points[:32]): + points += [[x,y,z,wrap(sea+500)],[wrap(x+2**26),wrap(y+4096),wrap(z-2**26),sea]] + for base in bases: + for modifier in ['NONE','FROZEN']: + for precipitation in [False,True]: + ops=[['query',*p] for p in points] + ops += [['fill',1100,-10000,63],['dump'],['query',-8901,1099&255,1099*31,-64],['query',-10000,0,0,63],['dump']] + yield {'base':f'{base:x}','modifier':modifier,'precipitation':precipitation,'ops':ops} + for base in [0x3e4ccccd,0x7fc00000,0xffc00001]: + for modifier in ['NONE','FROZEN']: + for first in [0,1023]: + ops=[['fill',1024,0,63],['dump'],['query',first,first&255,first*31,-64],['dump'],['fill',1,5000,63],['dump']] + child=[['dump'],['query',first,first&255,first*31,-1000],['query',0,4096,0,0],['dump']] + ops += [['thread',child],['dump'],['query',first,first&255,first*31,-64],['dump']] + yield {'base':f'{base:x}','modifier':modifier,'precipitation':True,'ops':ops} + + +def biome_resources(jar): + prefix='data/minecraft/worldgen/biome/' + with zipfile.ZipFile(jar) as archive: + return {'minecraft:'+name[len(prefix):-5]:archive.read(name).decode('utf-8') for name in sorted(archive.namelist()) if name.startswith(prefix) and name.endswith('.json')} + + +def codec_corpus(biomes): + cases=list(biomes.values())+['null','false','0','[]','{}'] + template={'has_precipitation':True,'temperature':0.5,'downfall':0.5,'temperature_modifier':'none'} + tokens=['null','true','false','0','-0.0','0.1','0.15','0.2','1','-1','1.000000059604644775390625','1.000000059604644775390626','1e40','-1e40','1e1000','-1e1000','1e-1000','"none"','"frozen"','"NONE"','"minecraft:none"','"NaN"','"Infinity"','"0.1"','[]','{}'] + for key in template: + cases.append(json.dumps({k:v for k,v in template.items() if k!=key})) + for token in tokens: + cases.append('{'+','.join(json.dumps(k)+':'+(token if k==key else json.dumps(v)) for k,v in template.items())+'}') + cases += [json.dumps(dict(template,unknown={'anything':True})), + '{"has_precipitation":true,"temperature":0.2,"temperature":-0.0,"downfall":0.0}', + '{"has_precipitation":true,"temperature":0.2,"temperature":null,"downfall":0.0}'] + operations=[['query',0,y,0,63] for y in [-64,0,63,79,80,81,319]]+[['query',12345,100,-9876,63],['query',12345,100,-9876,-1000],['dump']] + for value in cases:yield {'json':value,'ops':operations} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-biome-temperature-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + biomes=biome_resources(jars['server']) + if not biomes or biomes!=biome_resources(jars['client']):raise ValueError('client/server biome resources differ') + (build/'biomes.json').write_text(json.dumps(biomes,separators=(',',':')),encoding='utf-8') + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeTemperatureOracle.java" + sources=[oracle,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/biome_temperature_fixture.rs"] + tested_sources=base.source_hashes(sources) + fixtures=[*corpus(),*codec_corpus(biomes)];inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + fixture_paths=[inputs,build/"biomes.json"];tested_fixtures=base.source_hashes(fixture_paths);classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") + run(["cargo","build","--release","-p","horizon-world","--example","biome_temperature_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("biome_temperature_fixture.exe" if os.name=="nt" else "biome_temperature_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaBiomeTemperatureOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} biome-temperature output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"biome_resources":len(biomes),"codec_inputs":sum("json" in f for f in fixtures),"operations":sum(len(f["ops"]) for f in fixtures),"thread_isolation_fixtures":sum(any(op[0]=="thread" for op in f["ops"]) for f in fixtures), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual Biome temperature methods, warm/cold/iceberg-melt predicates and precipitation selection, with both temperature modifiers and arbitrary base float bits. Native private climate/biome constructors provide explicit temperature inputs; unrelated biome fields are null and never queried. Fixed seeded simplex/stack sources, float/double conversion and arithmetic order, height adjustment and sea-level overflow, packed-position aliases, repeated queries with changed sea levels, cache capacity/order/content, NaN recomputation and eviction, and actual native thread-local isolation versus independently owned Rust workers. ClimateSettings map-codec parsing additionally covers all independently authenticated bundled biome definitions, direct float conversion, nonfinite overflow, modifier defaults/null handling, field types, duplicates and missing fields. Full biome data codecs, climate encoding, complete weather placement/freezing, material condition integration and automatic migration of shared biome instances between threads remain outside this scope."} + lab.write_json(report_path,report);print(f"Scoped biome-temperature parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_biome_weather_parity.py b/tools/test_biome_weather_parity.py new file mode 100644 index 000000000..8845ccc4b --- /dev/null +++ b/tools/test_biome_weather_parity.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python3 +"""Compare native biome freezing and snow eligibility over real block states.""" +import itertools +try: + from . import test_simple_block_parity as harness +except ImportError: + import test_simple_block_parity as harness + + +def corpus(facts, placement): + states = facts['states']; get = lambda name: facts['defaults']['minecraft:' + name] + directions = [(-1, 0, 0), (1, 0, 0), (0, 0, -1), (0, 0, 1)] + def case(operation='freeze', **extra): + origin = extra.pop('origin', [0, 64, 0]) + value = {'definition': '{}', 'mode': 'weather', 'operation': operation, + 'base': '0', 'modifier': 'NONE', 'precipitation': True, 'edge': False, + 'origin': origin, 'legacy': False, 'seed': 0, 'world_seed': 1, + 'fail': -1, 'reject': 0, 'brightness': 0, 'sea': 63, + 'fallback': get('stone'), 'states': [[*origin, get('water' if operation == 'freeze' else 'air')]], 'repeats': 1} + value.update(extra); return value + for state in range(len(states)): + yield case(states=[[0, 64, 0, state]]) + yield case(states=[[0, 64, 0, state]], fluid=get('water')) + yield case(fluid=state) + yield case('snow', states=[[0, 64, 0, state]]) + yield case('snow', states=[[0, 64, 0, get('air')], [0, 63, 0, state]]) + for x, y, z in directions: + yield case(edge=True, fallback=get('water'), states=[[x, 64+y, z, state]]) + for mask, legacy, fail in itertools.product(range(16), [False, True], [-1, 0, 1, 2, 3, 4, 5, 6]): + yield case(edge=True, legacy=legacy, fail=fail, + states=[[0, 64, 0, get('water')], *[[x, 64+y, z, get('water') if mask & (1 << i) else get('stone')] for i, (x, y, z) in enumerate(directions)]]) + for operation, base, modifier, precipitation, y, light in itertools.product( + ['freeze', 'snow'], ['0', '80000000', '3e199999', '3e19999a', '3e19999b', '3e4ccccd', '3f800000', 'bf800000', '7f800000', 'ff800000', '7fc00000', 'ffc00001'], + ['NONE', 'FROZEN'], [False, True], [-65, -64, 0, 64, 80, 81, 319, 320], [-1, 0, 9, 10, 15]): + yield case(operation, base=base, modifier=modifier, precipitation=precipitation, origin=[12345, y, -9876], brightness=light, repeats=2) + for operation, legacy, sea, fail in itertools.product(['freeze', 'snow'], [False, True], [-2147483648, -1000, 0, 63, 2147483647], [-1, 0, 1, 2, 3, 4, 5, 6]): + yield case(operation, origin=[2147483647, 64, -2147483648], legacy=legacy, sea=sea, fail=fail, edge=True, repeats=2) + for operation, origin in itertools.product(['freeze', 'snow'], [[0, -2147483648, 0], [0, 2147483647, 0], [-2147483648, -64, 2147483647]]): + yield case(operation, origin=origin, edge=True) + for name, level, legacy in itertools.product(['air', 'cave_air', 'void_air', 'snow', 'water', 'oak_slab', 'honey_block', 'ice', 'packed_ice'], range(16), [False, True]): + yield case('snow', states=[[0, 64, 0, get(name)], [0, 63, 0, get('stone')]], brightness=level, legacy=legacy) + + +if __name__ == '__main__': + harness.run(corpus, 'rust-biome-weather-parity', __file__, + 'Actual native Biome.shouldFreeze and Biome.shouldSnow using private climate construction for explicit float bits, native temperature modifiers/cache, real fluid identities, real snow survival/support and light/build-height gates. All states are compared as freezing blocks, forced fluid carriers, contained fluids, snow candidates, snow supports and each water-edge neighbor. All neighbor masks, both RNG tails, repeated queries, raw float thresholds/nonfinite values, both temperature modifiers, precipitation flags, light boundaries, sea-level extremes, partial failures and wrapped coordinates are included. Dynamic block entities are absent; lighting propagation, mutation, snow/ice updates and complete weather simulation remain pending. Native per-biome thread-local caches are released only after each independent fixture, retaining repeated-query semantics within it. The fixture mode directly calls biome methods and does not represent a vanilla feature codec.') diff --git a/tools/test_biome_zoom_parity.py b/tools/test_biome_zoom_parity.py new file mode 100644 index 000000000..4dc5cea0c --- /dev/null +++ b/tools/test_biome_zoom_parity.py @@ -0,0 +1,81 @@ +#!/usr/bin/env python3 +"""Compare biome zoom, quart lookup and seed obfuscation with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng=random.Random(0x484f52495a4f4e42494f4d45) + seeds=[-2**63,-2**63+1,-987654321,-1,0,1,987654321,2**63-1] + for seed in seeds+[rng.randrange(-2**63,2**63) for _ in range(4096)]: + yield f's {seed}' + edges=[-2**31,-2**31+1,-2**31+2,-30000000,-17,-16,-5,-4,-3,-2,-1,0,1,2,3,4,5,15,16,17,30000000,2**31-2,2**31-1] + import itertools + for seed in seeds: + for x,y,z in itertools.product(edges,repeat=3):yield f'b {seed} {x} {y} {z}' + for x,y,z in itertools.product(range(-8,9),repeat=3):yield f'b {seed} {x} {y} {z}' + for _ in range(32768): + seed=rng.randrange(-2**63,2**63);x,y,z=[rng.randrange(-2**31,2**31) for _ in range(3)] + yield f'b {seed} {x} {y} {z}' + import struct + float_values=[float(v) for v in edges]+[-0.,0.1,-0.1,3.9999999999999996,-4.000000000000001,1e100,-1e100,float('inf'),-float('inf'),float('nan')] + bits=[struct.pack('>d',v).hex() for v in float_values]+['0000000000000001','8000000000000001','7ff0000000000001','fff8000000000000'] + for a,b,c in itertools.product(bits,repeat=3):yield f'p {a} {b} {c}' + for _ in range(32768):yield 'p '+' '.join(f'{rng.getrandbits(64):016x}' for _ in range(3)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-biome-zoom-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBiomeZoomOracle.java" + sources=[oracle,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-core/examples/biome_zoom_fixture.rs"] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus());inputs=build/"inputs.txt";inputs.write_text("\n".join(fixtures)+"\n",encoding="utf-8") + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths);classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") + run(["cargo","build","--release","-p","horizon-core","--example","biome_zoom_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("biome_zoom_fixture.exe" if os.name=="nt" else "biome_zoom_fixture") + run([binary,build],"rust") + import hashlib + with (build/"rust.txt").open() as output: + for fixture in fixtures: + result=output.readline().strip() + if fixture.startswith('s '): + seed=int(fixture[2:]);digest=hashlib.sha256(seed.to_bytes(8,'little',signed=True)).digest() + if result!='s '+str(int.from_bytes(digest[:8],'little',signed=True)):raise AssertionError('seed SHA-256 disagrees with hashlib') + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaBiomeZoomOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} biome-zoom output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"seed_hashes":sum(f.startswith("s ") for f in fixtures),"block_queries":sum(f.startswith("b ") for f in fixtures),"position_queries":sum(f.startswith("p ") for f in fixtures), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual BiomeManager seed obfuscation, block-position eight-corner jitter selection, direct block/double-to-quart queries, and source replacement preserving the zoom seed. Captured resolver coordinates are compared, including dense local grids, signed coordinate overflow, negative boundaries, distant blocks, long-seed boundaries, random seeds/positions, double infinities/NaNs/subnormals and saturating conversion. SHA-256 seed transforms are also compared against Python hashlib independently. Biome storage/source generation, blending, chunk integration and gameplay remain separate work."} + + lab.write_json(report_path,report);print(f"Scoped biome-zoom parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_block_blob_parity.py b/tools/test_block_blob_parity.py new file mode 100644 index 000000000..951830f98 --- /dev/null +++ b/tools/test_block_blob_parity.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python3 +"""Compare block-blob descent, three randomized shapes and state mutations.""" +import itertools +import json +try: + from . import test_simple_block_parity as harness +except ImportError: + import test_simple_block_parity as harness + + +def corpus(facts, placement): + states=facts['states'];get=lambda name:facts['defaults']['minecraft:'+name] + def blob(state=None, **extra): + value={'type':'block_blob','state':state if state is not None else {'id':'mossy_cobblestone'},'can_place_on':{'type':'matching_blocks','blocks':'stone'}} + value.update(extra);return value + def case(definition=None, **extra): + value={'definition':json.dumps(definition if definition is not None else blob(),separators=(',',':')), + 'mode':'feature','origin':[0,64,0],'legacy':False,'seed':0,'world_seed':1,'fail':-1,'reject':0, + 'brightness':15,'fallback':get('stone'),'states':[],'repeats':2} + value.update(extra);return value + for state in states:yield case(blob(state)) + for state in range(len(states)): + yield case(origin=[0,-60,0],states=[[0,-61,0,state]],repeats=1) + predicates=[{'type':'true'},{'type':'not','predicate':{'type':'true'}}, + {'type':'matching_blocks','blocks':['stone','water']}, + {'type':'matching_blocks','blocks':'#minecraft:logs'}, + {'type':'has_sturdy_face','direction':'up'}, + {'type':'would_survive','state':'short_grass'}, {'type':'solid'}] + for predicate,legacy,seed,fail,reject in itertools.product(predicates,[False,True],range(24),[-1,0,1,3,9,19],[0,1,3]): + yield case(blob(can_place_on=predicate),legacy=legacy,seed=seed,fail=fail,reject=reject, + origin=[15,-48,15],states=[[15,-49,15,get('air')],[15,-50,15,get('oak_log')]]) + for height,depth in itertools.product([-64,-62,-61,-60,-59,0,319,320],range(8)): + initial=[[0,height-1-offset,0,get('air')] for offset in range(depth)] + yield case(origin=[0,height,0],states=initial) + for legacy,seed,origin in itertools.product([False,True],[0,-1,0x123456789abcdef], + [[-2147483640,64,-2147483640],[2147483640,64,2147483640],[-17,-2147483648,-33]]): + yield case(legacy=legacy,seed=seed,origin=origin) + for key,values in [('state',[None,False,{},[],{'id':'missing'},'missing',{'id':'oak_log','properties':{'axis':'invalid'}}]), + ('can_place_on',[None,False,{},[],{'type':'missing'}])]: + for value in values: + definition=blob();definition[key]=value;yield case(definition) + definition=blob();del definition[key];yield case(definition) + for legacy,seed,fail,reject in itertools.product([False,True],[0,-1,0x123456789abcdef],[-1,0,5,17],[0,3]): + placed={'feature':blob(),'placement':[{'type':'count','count':2},{'type':'in_square'}]} + yield case(placed,mode='placed',legacy=legacy,seed=seed,fail=fail,reject=reject) + yield case({'type':'overlay','features':[placed,{'feature':'horizon:moss','placement':[]}]},legacy=legacy,seed=seed,fail=fail,reject=reject) + + +if __name__=='__main__': + harness.run(corpus,'rust-block-blob-parity',__file__, + 'Native BlockBlobFeature codec, state decoding, support-predicate descent and three randomized overlapping shapes. Every candidate and supporting registry state, minimum-height returns, query failures, float radius versus double distance, inclusive box order, all three final origin-offset draws, flags 3, rejected writes, repeated mutations and both random modes are compared. Named tags, survival/support predicates and overlay/modifier composition use the same mutable world. Positions near signed integer limits avoid pathological native overflow boxes; Rust bounds descent and box work to 2^20 visits. Resident-world update callbacks and complete gameplay remain pending.') diff --git a/tools/test_block_collision_scan_parity.py b/tools/test_block_collision_scan_parity.py new file mode 100644 index 000000000..d592c8602 --- /dev/null +++ b/tools/test_block_collision_scan_parity.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python3 +"""Compare lazy block collision scanning and query ordering with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def box(values):return [struct.pack('>d',float(v)).hex() for v in values] + boxes=[ + [0.2,0.2,0.2,0.8,0.8,0.8],[-0.3,0,0.3,0.3,1.8,0.9],[0,0,0,1,1,1], + [0.5,0.2,0.2,0.5,0.8,0.8],[0.5,0.2,0.2,0.5+1e-8,0.8,0.8], + [0.5,0.2,0.2,0.5+2e-7,0.8,0.8],[1-1e-8,0.2,0.2,1+1e-8,0.8,0.8], + [15.8,63.2,-0.3,16.2,64.8,0.3],[-16.2,-64.3,-16.2,-15.8,-62.5,-15.8], + [0.5,0.5,0.5,0.5,0.5,0.5],[1e-7,1e-7,1e-7,1-1e-7,1-1e-7,1-1e-7], + [2,2,2,-1,-1,-1],[-20.2,0.2,0.2,20.2,0.8,0.8], + [2147483647.2,0.2,0.2,2147483647.8,0.8,0.8], + [-2147483648.8,-0.5,-0.5,-2147483648.2,0.5,0.5], + [0.2,2147483647.2,0.2,0.8,2147483647.8,0.8], + [-0.0,-0.0,-0.0,1e-8,1e-8,1e-8],[-1e-8,-1e-8,-1e-8,0,0,0], + ] + palettes=[[shape,large,moving,suffocating] for shape in range(7) for large in [False,True] for moving in [False,True] for suffocating in [False,True]] + def row(bounds,palette,suffocating=False,missing=0,fail=-1,limit=100000,seed=0): + return {'box':box(bounds),'palette':palette,'suffocating':suffocating,'missing':missing,'fail':fail,'limit':limit,'seed':seed} + for entry in palettes: + for bounds in boxes: + for suffocating in [False,True]:yield row(bounds,[entry],suffocating) + for fail in [0,1,2,5,15,50]: + for suffocating in [False,True]:yield row(boxes[7],[entry],suffocating,fail=fail) + for missing in [1,2]: + for bounds in boxes: + for suffocating in [False,True]: + for limit in [0,1,4,100000]:yield row(bounds,palettes,suffocating,missing,limit=limit) + rng=random.Random(0x434f4c4c4953494f4e) + for index in range(1200): + low=[rng.choice([-16,-1,0,15,16])+rng.random() for _ in range(3)] + high=[v+rng.choice([0,1e-8,2e-7,0.25,0.6,1.8,2.5]) for v in low] + palette=rng.sample(palettes,rng.randrange(1,13)) + yield row([*low,*high],palette,bool(index%2),rng.randrange(3),rng.choice([-1,-1,-1,0,3,10,50]),rng.choice([0,1,3,100000]),rng.randrange(-2147483648,2147483648)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-block-collision-scan-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockCollisionScanOracle.java' + helpers=[oracle.with_name('VanillaFaceSupportOracle.java')] + sources=[oracle,*helpers,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/block_collision_scan_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,*helpers],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaBlockCollisionScanOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','block_collision_scan_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('block_collision_scan_fixture.exe' if os.name=='nt' else 'block_collision_scan_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} block-collision-scan output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual BlockCollisions cursor and selection algorithm over controlled block metadata, chunk providers and context shapes. Compares ordered chunk/state/suffocation/shape calls, missing-chunk retries, cached chunk reuse, face/edge/corner filtering, canonical full-block versus equal noncanonical shape behavior, exact emitted shape data, early consumer termination and injected provider failures. Finite bounded scans include thin/zero-size boxes, chunk crossings and wrapped integer positions. Registry-specific metadata/shape dispatch, live chunk loading and entity movement are separate integration work; unsupported cursor volumes and caller budgets use typed Rust errors.'} + lab.write_json(report_path,report);print(f'Scoped block collision scan parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_block_column_parity.py b/tools/test_block_column_parity.py new file mode 100644 index 000000000..c15cd8a0f --- /dev/null +++ b/tools/test_block_column_parity.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +"""Compare native block-column sampling, obstruction, truncation and writes.""" +import itertools +import json +try: + from . import test_simple_block_parity as harness +except ImportError: + import test_simple_block_parity as harness + + +def corpus(facts, placement): + states=facts['states'];get=lambda name:facts['defaults']['minecraft:'+name] + encode=lambda value:json.dumps(value,separators=(',',':')) + directions={'down':(0,-1,0),'up':(0,1,0),'north':(0,0,-1),'south':(0,0,1),'west':(-1,0,0),'east':(1,0,0)} + def feature(heights=(2,3,1),providers=({'id':'stone'},{'id':'water'},{'id':'pale_moss_carpet'}),direction='up',allowed=None,tip=False): + return {'type':'block_column','layers':[{'height':height,'provider':providers[i%len(providers)]} for i,height in enumerate(heights)],'direction':direction,'allowed_placement':allowed if allowed is not None else {'type':'true'},'prioritize_tip':tip} + def case(definition,**extra): + f={'definition':encode(definition),'mode':'feature','origin':[0,64,0],'legacy':False,'seed':0,'world_seed':1,'fail':-1,'reject':0,'brightness':15,'fallback':get('air'),'states':[],'repeats':2};f.update(extra);return f + for state in states:yield case(feature((1,),[state])) + heights=[[],[0],[1],[0,0],[0,2,0,1],[2,3,1],[{'type':'uniform','min_inclusive':0,'max_inclusive':3},1,{'type':'weighted_list','distribution':[{'data':0,'weight':1},{'data':3,'weight':2}]}]] + # The first allowed-placement test is one step beyond the origin. Truncation + # chooses base or tip layers before any provider is sampled or write occurs. + for direction,step in directions.items(): + for selected in heights: + for tip in [False,True]: + for blocked in range(9): + for legacy in [False,True]: + for seed in [0,-1,0x123456789abcdef]: + for fail in [-1,0,2,5,9]: + obstruction=[step[0]*blocked,64+step[1]*blocked,step[2]*blocked,get('stone')] + yield case(feature(selected,direction=direction,allowed={'type':'matching_blocks','blocks':['air']},tip=tip),states=[obstruction],legacy=legacy,seed=seed,fail=fail,reject=3 if seed else 0) + providers=[{'type':'random_block','blocks':[]},{'type':'random_block','blocks':['stone','water','pale_moss_carpet']},{'type':'rotated','state':{'id':'oak_log'}},{'type':'weighted','entries':[{'data':'stone','weight':1},{'data':'water','weight':2}]},'horizon:stone',{'type':'rule_based','rules':[]}] + for provider,direction,tip in itertools.product(providers,directions,[False,True]): + for legacy,seed,fail,reject in itertools.product([False,True],[0,-1,0x123456789abcdef],[-1,0,1,4],[0,1,3]): + yield case(feature([{'type':'uniform','min_inclusive':0,'max_inclusive':3},2,1],[provider],direction=direction,tip=tip),legacy=legacy,seed=seed,fail=fail,reject=reject,repeats=3) + predicates=[{'type':'true'},{'type':'not','predicate':{'type':'true'}},{'type':'solid'},{'type':'replaceable'},{'type':'has_sturdy_face','direction':'up'},{'type':'would_survive','state':'small_dripleaf'},{'type':'all_of','predicates':[{'type':'replaceable'},{'type':'would_survive','state':'pale_moss_carpet'}]}] + for predicate in predicates: + for neighbor in ['air','stone','water','clay','shulker_box','moving_piston','scaffolding']: + for fail in [-1,0,1,2,3,6]:yield case(feature(allowed=predicate),fallback=get(neighbor),fail=fail) + for origin in [[2147483647,2147483647,2147483647],[-2147483648,-2147483648,-2147483648],[-17,-64,-33]]: + for direction in directions:yield case(feature(direction=direction),origin=origin) + for key,values in [('layers',[None,False,[],[{}],[{'height':-1,'provider':{'id':'stone'}}],[{'height':1,'provider':None}],[{'height':1,'provider':'missing'}]]),('direction',[None,False,0,'UP','missing']),('allowed_placement',[None,{},True]),('prioritize_tip',[None,0,1,'true',False,True])]: + for value in values: + definition=feature();definition[key]=value;yield case(definition) + definition=feature();del definition[key];yield case(definition) + for provider in [-1,{'type':'uniform','min_inclusive':-1,'max_inclusive':2},{'type':'uniform','min_inclusive':0,'max_inclusive':2147483647},2147483647]: + # A false first obstruction permits huge positive heights to truncate + # without an enormous world traversal. + yield case(feature([provider],allowed={'type':'not','predicate':{'type':'true'}})) + for tip in [False,True]: + column=feature(tip=tip,allowed={'type':'matching_blocks','blocks':'air'}) + placed={'feature':column,'placement':[{'type':'count','count':2},{'type':'offset','x':1,'y':0,'z':-1}]} + for legacy,seed,fail,reject in itertools.product([False,True],[0,-1],[-1,0,3,8],[0,1,3]): + yield case(placed,mode='placed',legacy=legacy,seed=seed,fail=fail,reject=reject) + yield case({'type':'sequence','features':[placed,{'feature':'horizon:moss','placement':[]}]},legacy=legacy,seed=seed,fail=fail,reject=reject) + + +if __name__=='__main__': + harness.run(corpus,'rust-block-column-parity',__file__, + 'Native block-column feature codec and algorithms, with nonnegative height-provider validation, all candidate state descriptors, all six directions, both base/tip truncation orders, first obstruction beyond the origin, ordered predicate queries before writes, optional-provider fallback reads, rejected writes, partial failures, coordinate wrapping, named providers and nested feature/modifier composition. Both independent random streams and stored states are checked after repeated calls. A bounded runtime work budget rejects pathological million-operation traversals; actual chunks, neighbor updates and complete gameplay remain pending.') diff --git a/tools/test_block_entity_storage_parity.py b/tools/test_block_entity_storage_parity.py new file mode 100644 index 000000000..37da0f7f4 --- /dev/null +++ b/tools/test_block_entity_storage_parity.py @@ -0,0 +1,95 @@ +#!/usr/bin/env python3 +"""Compare native proto-chunk block-entity storage and NBT coordinate coercion.""" +import argparse +from collections import Counter +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab, test_rust_parity as base + + +def corpus(): + atoms=['none 0','string invalid'] + for kind,values in [('byte',[-128,-1,0,1,127]),('short',[-32768,-1,0,1,32767]),('int',[-2147483648,-17,-16,-1,0,1,15,16,2147483647]),('long',[-9223372036854775808,-4294967297,-2147483649,-1,0,2147483648,4294967297,9223372036854775807])]: + atoms += [f'{kind} {v}' for v in values] + atoms += ['float '+bits for bits in ['00000000','80000000','00000001','80000001','3fc00000','bfc00000','4f000000','cf000000','cf000001','7f800000','ff800000','7fc00000','7f800001']] + atoms += ['double '+bits for bits in ['0000000000000000','8000000000000000','0000000000000001','8000000000000001','3ff8000000000000','bff8000000000000','41e0000000000000','c1e0000000000000','c1e0000000000001','7ff0000000000000','fff0000000000000','7ff8000000000000','7ff0000000000001']] + for cx,cz in [(0,0),(-1,-1),(1,-2),(-134217728,134217727),(-2147483648,2147483647)]: + yield f'reset {cx} {cz}' + for axis in range(3): + for i,atom in enumerate(atoms): + xyz=['int -1','int 64','int 31'];xyz[axis]=atom + yield 'resolve 0 '+' '.join(xyz) + yield f'pending {i} '+' '.join(xyz) + yield 'dump' + for marker in [-9223372036854775808,-1,0,1,9223372036854775807]: + yield 'reset -1 -1' + yield f'pending {marker} int 15 int 64 int 15' + yield 'get -1 64 -1';yield 'save -1 64 -1' + yield 'mutate -1 64 -1 2147483647' + yield 'get -1 64 -1';yield 'save -1 64 -1' + yield f'active -1 64 -1 {marker}' + yield 'pending 99 int 15 int 64 int 15' + yield 'get -1 64 -1';yield 'save -1 64 -1';yield 'dump' + yield 'remove -1 64 -1';yield 'get -1 64 -1';yield 'save -1 64 -1' + rng=random.Random(0x424c4f434b454e54) + for trial in range(12): + cx,cz=trial%3-1,trial%5-2 + yield f'reset {cx} {cz}' + positions=[(cx*16+x,y,cz*16+z) for x in [0,1,15] for y in [-2147483648,-64,0,64,2147483647] for z in [0,1,15]] + positions += [(2147483647,-2147483648,-2147483648),(0,4096,0),(67108864,4096,-67108864)] + for _ in range(500): + p=rng.choice(positions);xyz=' '.join(map(str,p));op=rng.randrange(7) + if op<2:yield f'pending {rng.randrange(-2**63,2**63)} int {p[0]} int {p[1]} int {p[2]}' + elif op==2:yield f'active {xyz} {rng.randrange(-2**63,2**63)}' + elif op==3:yield f'remove {xyz}' + elif op==4:yield f'mutate {xyz} {rng.randrange(-2**31,2**31)}' + elif op==5:yield f'get {xyz}' + else:yield f'save {xyz}' + if rng.randrange(8)==0:yield 'dump' + yield 'dump' + yield 'reset 0 0' + for _ in range(20000): + xyz=[rng.choice([f'float {rng.getrandbits(32):08x}',f'double {rng.getrandbits(64):016x}',rng.choice(atoms)]) for _ in range(3)] + yield 'resolve 0 '+' '.join(xyz) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-block-entity-storage-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockEntityStorageOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/block_entity_storage_fixture.rs'] + tested_sources=base.source_hashes(sources) + commands=list(corpus());inputs=build/'inputs.txt';inputs.write_text('\n'.join(commands)+'\n') + tested_fixtures=base.source_hashes([inputs]);classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + dependencies=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependencies,'-d',classes,oracle],'compile-java') + run(['cargo','build','--release','-p','horizon-world','--example','block_entity_storage_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('block_entity_storage_fixture.exe' if os.name=='nt' else 'block_entity_storage_fixture') + run([binary,inputs,build/'rust.txt'],'rust') + references=[] + for side,jar in jars.items(): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jar),dependencies]),'dev.horizonlab.parity.VanillaBlockEntityStorageOracle',inputs,build/(side+'.txt')],side) + matched=base.compare(build/(side+'.txt'),build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(build/(side+'.txt'),'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} block-entity storage lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged([inputs],tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(), + 'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(), + 'commands':dict(Counter(c.split()[0] for c in commands)),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references, + 'scope':'Native BlockEntity.getPosFromTag and actual ProtoChunk pending/active insertion, lookup, removal, position union and pending-save fallback. NumericTag coordinate reads cover integer narrowing, float/double floor overflow, infinities/NaNs, missing/nonnumeric fields, wrong-chunk relocation and wrapped chunk coordinates. Active entries replace pending data; later pending records cannot overwrite active entries. In-place pending coordinate mutation retains the original map key. Native chest entities carry loot seeds for active identity and basic saving-metadata comparisons; Rust supplies caller-owned payload serialization. Iteration order is normalized, and pending reads are borrowed/owned values rather than unrestricted Java aliases. Entity creation from NBT, complete entity serializers, active behavior and integration with chunk lifecycle remain pending.'} + lab.write_json(report_path,report);print(f'Scoped block-entity storage parity passed: {report_path}') + +if __name__=='__main__':main() diff --git a/tools/test_block_landing_parity.py b/tools/test_block_landing_parity.py new file mode 100644 index 000000000..50c8922ad --- /dev/null +++ b/tools/test_block_landing_parity.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python3 +"""Compare every registered block landing/bounce family with pinned vanilla.""" +import json +import math +import os +from pathlib import Path +import platform +import random +import struct +import subprocess +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(states, definitions): + def bits(v):return struct.pack('>d',float(v)).hex() + def single(v):return struct.pack('>f',float(v)).hex() + def row(state,kind=2,**kw): + f=dict(state=state,kind=kind,bounce=False,server=True,client=False,distance=bits(8),random_float=single(.25),random_int=0,width=single(.6),height=single(1.8),damage=True,suppress=False,protected=False,griefing=True,write=True,position=[17,-64,-33],entities=[],mutate=False,fail=-1) + f.update(kw);return f + for state in states: + for kind in range(8): + for bounce in [False,True]:yield row(state['id'],kind,bounce=bounce) + special=[s for s in states if definitions[s['name']]['fall']!='Block' or definitions[s['name']]['bounce']] + distances=[-math.inf,-1.,-0.,0.,.5,math.nextafter(.75,0),.75,math.nextafter(.75,1),1.,math.nextafter(4.,0),4.,math.nextafter(4.,5),math.nextafter(7.,0),7.,math.nextafter(7.,8),1e40,math.inf,math.nan] + for state in special: + for kind in range(8): + for distance in distances: + for server,client in [(True,False),(True,True),(False,True),(False,False)]:yield row(state['id'],kind,distance=bits(distance),server=server,client=client) + for flag in ['damage','suppress','protected','griefing','write']: + for value in [False,True]: + for fail in range(-1,18):yield row(state['id'],kind,**{flag:value,'fail':fail}) + for bounce in [False,True]: + for fail in range(-1,4):yield row(state['id'],kind,bounce=bounce,fail=fail) + rng=random.Random(0x4c414e44494e47) + for _ in range(18000): + state=rng.choice(special);p=rng.choice([[0,0,0],[17,-64,-33],[2147483647,0,-2147483648]]) + entities=[] + if definitions[state['name']]['fall']=='FarmlandBlock': + for _ in range(rng.randrange(5)): + y=rng.choice([0,.5,.9375,1,1.1]);low=[p[0]+.2,p[1]+y,p[2]+.2];entities.append([*low,low[0]+.6,low[1]+1.8,low[2]+.6]) + yield row(state['id'],rng.randrange(8),server=bool(rng.randrange(2)),client=bool(rng.randrange(2)),distance=bits(rng.choice(distances+[rng.uniform(-1,12)])),random_float=single(rng.choice([0.,.25,.5,.99999994,math.nan])),random_int=rng.randrange(3),width=single(rng.choice([0.,.6,.8,1.,2.,math.nan,math.inf])),height=single(rng.choice([0.,.8,1.,1.8,math.nan,math.inf])),damage=bool(rng.randrange(2)),suppress=bool(rng.randrange(2)),protected=bool(rng.randrange(2)),griefing=bool(rng.randrange(2)),write=bool(rng.randrange(2)),position=p,entities=[[bits(v) for v in b] for b in entities],mutate=bool(rng.randrange(2)),fail=rng.choice([-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12])) + # Complete successful farmland pushes, all mutation/failure cut points and volume threshold. + farms=[s['id'] for s in states if definitions[s['name']]['fall']=='FarmlandBlock'] + for state in farms: + for width,height in [(.8,.8),(.8,math.nextafter(.8,1)),(.6,1.8),(1.,.512),(1.,.5120001),(1.,.5119999),(-.8,1.),(math.inf,0.),(math.nan,1.)]: + for kind in [1,2]: + for fail in range(-1,18): + for mutate in [False,True]:yield row(state,kind,width=single(width),height=single(height),entities=[[bits(v) for v in b] for b in [[17.2,-63.0625,-32.8,17.8,-61.2,-32.2],[17.2,-63.5,-32.8,17.8,-61.7,-32.2]]],mutate=mutate,fail=fail) + + +def main(): + lock,jars,libraries=base.verify_artifacts();build=lab.LOCAL/'rust-block-landing-parity';build.mkdir(exist_ok=True);report_path=build/'report.json';report_path.unlink(missing_ok=True) + root=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity' + oracles=[root/(n+'.java') for n in ['VanillaBlockLandingOracle','VanillaMovementRegistryOracle','VanillaHeightmapOracle','VanillaCollisionOracle']] + sources=[*oracles,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-world/examples/block_landing_fixture.rs'] + for crate in ['horizon-core','horizon-world']:sources += [lab.ROOT/'crates'/crate/'Cargo.toml',*sorted((lab.ROOT/'crates'/crate/'src').rglob('*.rs'))] + tested=base.source_hashes(sources);classes=build/'classes';classes.mkdir(exist_ok=True);dependencies=os.pathsep.join(map(str,libraries)) + def run(command,name): + with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependencies,'-d',classes,*oracles],'compile-java') + def java(side,mode):run(['java','-Xmx768M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependencies]),'dev.horizonlab.parity.VanillaBlockLandingOracle',mode,build],side+'-'+mode) + java('server','export');states=json.loads((build/'landing-states.json').read_text());definitions=json.loads((build/'landing-definitions.json').read_text()) + if len(states)!=35723 or len(definitions)!=1286:raise AssertionError('Incomplete pinned registry') + count=0 + with (build/'inputs.txt').open('w') as output: + for f in corpus(states,definitions):output.write(json.dumps(f,separators=(',',':'))+'\n');count+=1 + fixture_paths=[build/n for n in ['inputs.txt','landing-states.json','landing-definitions.json','movement-properties.nbt','block-registry.nbt','cached-collision.nbt']];fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--locked','--release','-p','horizon-world','--example','block_landing_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('block_landing_fixture.exe' if os.name=='nt' else 'block_landing_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side);matched=base.compare(build/(side+'.txt'),build/'rust.txt');references.append(dict(side=side,jar_sha256=lab.digest(jar,'sha256'),output_sha256=lab.digest(build/(side+'.txt'),'sha256'),matched_output_lines=matched));print(f'{side}: {matched:,} registered block landing lines match',flush=True) + base.ensure_sources_unchanged(sources,tested);base.ensure_sources_unchanged(fixture_paths,fixtures) + report=dict(schema=1,minecraft=lock['minecraft']['version'],manifest_sha1=lock['minecraft']['manifest_sha1'],platform=platform.platform(),java=subprocess.check_output(['java','--version'],text=True).splitlines()[0],rustc=subprocess.check_output(['rustc','--version'],text=True).strip(),registry_states=len(states),registry_blocks=len(definitions),fixtures=count,sources_sha256=tested,fixtures_sha256=fixtures,rust_output_sha256=lab.digest(build/'rust.txt','sha256'),references=references,scope='Actual registered Block.fallOn and bounceOn across all states and eight entity class families, plus client/server distinctions, damage return, bounce suppression, protection/rules, random boundaries, NaN/infinity and failures at each observable callback. Farmland replacement uses native registered collision shapes and ordered occupant pushes; turtle egg changes preserve hatch and compare write flags, event order and effects after failed writes. Entity damage, randomness, selected entities, sounds, world writes and events are controlled providers. Live health, entity storage, network, audio and full movement lifecycle integration remain separate work.') + lab.write_json(report_path,report);print(f'Scoped registered landing parity passed: {report_path}',flush=True) + + +if __name__=='__main__':main() diff --git a/tools/test_block_pile_parity.py b/tools/test_block_pile_parity.py new file mode 100644 index 000000000..4562ef4a8 --- /dev/null +++ b/tools/test_block_pile_parity.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python3 +"""Compare block-pile support, ordered mutations and random consumption.""" +import itertools +import json +try: + from . import test_simple_block_parity as harness +except ImportError: + import test_simple_block_parity as harness + + +def corpus(facts, placement): + states = facts['states'] + get = lambda name: facts['defaults']['minecraft:' + name] + def pile(provider=None): + return {'type': 'block_pile', 'state_provider': provider if provider is not None else {'id': 'stone'}} + def case(definition=None, support=None, **extra): + origin = extra.pop('origin', [0, 64, 0]) + wrap = lambda value: (value + 2**31) % 2**32 - 2**31 + floor = [[wrap(origin[0]+x), wrap(origin[1]-1), wrap(origin[2]+z), support if support is not None else get('stone')] + for z in range(-3, 4) for x in range(-3, 4)] + value = {'definition': json.dumps(definition if definition is not None else pile(), separators=(',', ':')), + 'mode': 'feature', 'origin': origin, 'legacy': False, 'seed': 0, 'world_seed': 1, + 'fail': -1, 'reject': 0, 'brightness': 15, 'fallback': get('air'), 'states': floor, 'repeats': 1} + value.update(extra) + return value + # Every output candidate and every supporting state in the pinned registry. + for state in states: + yield case(pile(state)) + for state in range(len(states)): + yield case(support=state) + providers = [{'id': 'stone'}, {'type': 'random_block', 'blocks': []}, + {'type': 'random_block', 'blocks': ['stone', 'water', 'hay_block']}, + {'type': 'rotated', 'state': {'id': 'oak_log'}}, + {'type': 'weighted', 'entries': [{'data': 'stone', 'weight': 1}, {'data': 'hay_block', 'weight': 3}]}, + 'horizon:stone'] + for provider, ground, legacy, seed, fail, reject in itertools.product( + providers, ['stone', 'dirt_path', 'air', 'oak_slab', 'shulker_box', 'moving_piston'], + [False, True], [0, -1, 0x123456789abcdef], [-1, 0, 1, 2, 7, 19], [0, 1, 3]): + yield case(pile(provider), support=get(ground), legacy=legacy, seed=seed, fail=fail, reject=reject, repeats=2) + for fallback, y, seed in itertools.product(['air', 'cave_air', 'void_air', 'water', 'short_grass', 'snow'], + [-64, -60, -59, -58, 319, 320, 2147483647, -2147483648], range(4)): + yield case(fallback=get(fallback), origin=[-17, y, -33], seed=seed) + for x, z, seed in itertools.product([2147483647, -2147483648], [2147483647, -2147483648], range(8)): + yield case(origin=[x, 64, z], seed=seed) + # One overflowing horizontal dimension produces a negative native iterator + # count; injected failures terminate after a finite matching prefix. + for x, z in [(2147483647, 0), (0, -2147483648)]: + for fail in [0, 1, 3]: + yield case(origin=[x, 64, z], fail=fail) + for value in [None, False, {}, [], 'missing', {'id': 'missing'}]: + yield case({'type': 'block_pile', 'state_provider': value}) + yield case({'type': 'block_pile'}) + for legacy, seed, fail, reject in itertools.product([False, True], [0, -1, 0x123456789abcdef], [-1, 0, 5, 21], [0, 3]): + placed = {'feature': pile(providers[2]), 'placement': [{'type': 'count', 'count': 2}, {'type': 'in_square'}]} + yield case(placed, mode='placed', legacy=legacy, seed=seed, fail=fail, reject=reject) + yield case({'type': 'overlay', 'features': [placed, {'feature': 'horizon:moss', 'placement': []}]}, + legacy=legacy, seed=seed, fail=fail, reject=reject) + + +if __name__ == '__main__': + harness.run(corpus, 'rust-block-pile-parity', __file__, + 'Native BlockPileFeature codec and placement with every candidate and supporting block state. Minimum-height early return, radius sampling, native inclusive-box visit order, squared-distance float arithmetic, sparse outer draws, air variants, dirt-path random acceptance, cached/dynamic FULL upper support, provider selection and fallback reads, flags 260, rejected writes, partial failures, repeated calls and both random streams are compared. Named providers and overlay/modifier composition use the same world. Wrapped boxes with finite native counts and failure-terminated prefixes of negative-count boxes are included; Rust bounds pathological iteration to 2^20 visits. Block entities are absent in this fixture. Resident chunks, block updates and complete gameplay remain pending.') diff --git a/tools/test_block_properties_parity.py b/tools/test_block_properties_parity.py new file mode 100644 index 000000000..b6f094d50 --- /dev/null +++ b/tools/test_block_properties_parity.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +"""Compare block-definition flags and calculated solidity with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def box(values):return [struct.pack('>d',float(v)).hex() for v in values] + shapes=[[],[[0,0,0,1,1,1]],[[0,0,0,0.1,1,0.1]],[[0,0,0,1,0.1,1]],[[0,0,0,0.01,0.01,0.01],[0.99,0.99,0.99,1,1,1]]] + threshold=0.7291666666666666 + for x in [0.0,0.125,0.5,threshold,1.0,2.0]: + for y in [0.0,1e-8,0.125,0.5,math.nextafter(1.0,0.0),1.0,math.nextafter(1.0,2.0)]: + z=3*threshold-x-y + for extent in [math.nextafter(z,-math.inf),z,math.nextafter(z,math.inf)]:shapes.append([[0,0,0,x,y,extent]]) + rng=random.Random(0x534f4c4944) + for _ in range(1000): + shape=[] + for _ in range(rng.randrange(1,5)): + low=[rng.uniform(-1,1) for _ in range(3)];high=[v+rng.choice([1e-8,1e-7,0.125,0.5,1.0,2.0]) for v in low];shape.append([*low,*high]) + shapes.append(shape) + for shape in shapes: + for on in [False,True]: + for off in [False,True]: + for cached in [False,True]: + for occludes in [False,True]:yield {'shape':[box(v) for v in shape],'on':on,'off':off,'cached':cached,'occludes':occludes} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-block-properties-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPropertiesOracle.java' + helper=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java' + sources=[oracle,helper,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/block_properties_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,helper],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaBlockPropertiesOracle',mode,path],side+'-'+mode) + java('server','export',build) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'block-registry.nbt',build/'cached-collision.nbt',build/'block-properties.nbt'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','block_properties_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('block_properties_fixture.exe' if os.name=='nt' else 'block_properties_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} block-properties output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'registry_states':35723,'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'All pinned block-definition force-solid, replaceability, liquid and occlusion flags and raw occlusion geometry are imported privately; Rust computes legacy solidity from cached collision shapes and solid rendering from occlusion geometry. All six native face-occlusion full-shape tests are compared for every state and every synthetic shape/occlusion-flag case; Rust caches shared shape masks and retains typed errors for unknown state IDs. Actual native BlockState isSolid, liquid, canOcclude, isSolidRender and no-context canBeReplaced are compared for every state, together with raw cached bounds and synthetic force-flag/cache/shape threshold combinations using the private native solidity calculator and native full-shape test. Item/fluid replacement, block support, survival, dynamic collision and full gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped block-properties parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_block_push_parity.py b/tools/test_block_push_parity.py new file mode 100644 index 000000000..602c8772e --- /dev/null +++ b/tools/test_block_push_parity.py @@ -0,0 +1,69 @@ +#!/usr/bin/env python3 +"""Compare entity pushes caused by replacement block collision geometry with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>d',float(v)).hex() + def row(old,new,position=(0,0,0),entities=(),mutate=False,fail=-1):return dict(old=[list(map(bits,b)) for b in old],new=[list(map(bits,b)) for b in new],position=position,entities=[list(map(bits,b)) for b in entities],mutate=mutate,fail=fail) + shapes=[[],[[0,0,0,1,1,1]],[[0,0,0,1,.9375,1]],[[0,0,0,1,.5,1]],[[0,.5,0,1,1,1]],[[0,0,0,.1,1,1]],[[0,0,0,1,1e-8,1]],[[0,0,0,1,1e-7,1]],[[-.5,-.5,-.5,1.5,1.5,1.5]],[[0,0,0,.25,.5,1],[.75,0,0,1,1,1]],[[0,0,0,0,0,0]]] + for old in shapes: + for new in shapes: + for p in [(0,0,0),(17,-64,-33),(2147483647,0,-2147483648)]: + entities=[[p[0]+.2,p[1]+y,p[2]+.2,p[0]+.8,p[1]+y+1.8,p[2]+.8] for y in [-1,0,.5,.9375,1,1.1]] + for mutate in [False,True]: + for fail in [-1,0,1,2,3,5,8]:yield row(old,new,p,entities,mutate,fail) + rng=random.Random(0x505553485550) + for _ in range(5000): + old=rng.choice(shapes);new=rng.choice(shapes);p=rng.choice([(0,0,0),(17,-64,-33)]) + entities=[] + for _ in range(rng.randrange(8)): + low=[rng.choice([-1,-0.0,0,.2,.5,1,1.5,float('nan')])+p[i] for i in range(3)];high=[v+rng.choice([0,1e-8,1e-7,.3,.6,1.8]) for v in low];entities.append([*low,*high]) + yield row(old,new,p,entities,bool(rng.randrange(2)),rng.choice([-1,-1,0,1,2,3,6,10])) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-block-push-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockPushOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/block_push_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaBlockPushOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','block_push_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('block_push_fixture.exe' if os.name=='nt' else 'block_push_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} block-push output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Block.pushEntitiesUp with old/new collision shape queries and ordered selected entity lists. Compares unoptimized added-space geometry, world translation, entity query bounds, upward collision displacement, zero-distance teleports, current bounds after previous callbacks and partial state after provider failures. Empty/redundant shapes, partial shapes, large coordinates, degenerate/nonfinite entity boxes and callbacks moving later entities are covered. Collision shapes and entity selections are controlled snapshots; registered replacement dispatch, live entity indexing and actual teleport/network behavior remain separate integration work.'} + lab.write_json(report_path,report);print(f'Scoped block push parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_block_state_codec_parity.py b/tools/test_block_state_codec_parity.py new file mode 100644 index 000000000..7073f4bc8 --- /dev/null +++ b/tools/test_block_state_codec_parity.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python3 +"""Compare pinned vanilla compact/full block-state JSON codecs.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(facts): + states=facts['states'];defaults=facts['defaults'] + for state in states: + for full in [False,True]:yield [full,json.dumps(state,separators=(',',':'))] + for name,index in sorted(defaults.items()): + default=states[index] + for value in [name,name.removeprefix('minecraft:'),':'+name.removeprefix('minecraft:'),{'id':name},{'id':name,'properties':default.get('properties',{})}]: + for full in [False,True]:yield [full,json.dumps(value)] + for properties in [None,False,0,1.5,'unknown',[],[{}],{}, {'unknown':'unknown'}]: + for full in [False,True]:yield [full,json.dumps({'id':name,'properties':properties})] + for key,original in default.get('properties',{}).items(): + for value in [None,True,False,0,1.0,[],{},'',original.upper(),'unknown',original]: + changed=dict(default['properties']);changed[key]=value;changed['unknown']='ignored' + for full in [False,True]:yield [full,json.dumps({'id':name,'properties':changed})] + zeroes=[0x30,0x660,0x6f0,0x7c0,0x966,0x9e6,0xa66,0xae6,0xb66,0xbe6,0xc66,0xce6,0xd66,0xde6,0xe50,0xed0,0xf20,0x1040,0x1090,0x17e0,0x1810,0x1946,0x19d0,0x1a80,0x1a90,0x1b50,0x1bb0,0x1c40,0x1c50,0xa620,0xa8d0,0xa900,0xa9d0,0xa9f0,0xaa50,0xabf0,0xff10] + for name,key in facts['integers']: + for value in ['+0','-0','00','+01','-01','1.0','1e0',' 1','1 ','2147483647','2147483648','-2147483648','-2147483649','9'*80,'0'*80+'1','+','--1','+-1','\u00b2','\U0001d7d9',*[str(i) for i in range(-2,34)],*[chr(z)+chr(z+1) for z in zeroes]]: + for full in [False,True]:yield [full,json.dumps({'id':name,'properties':{key:value}})] + invalid=[None,False,1,[],{}, {'Name':'minecraft:stone'}, {'id':None}, {'id':True}, {'id':1}, {'id':[]}, {'id':{}},'minecraft:unknown','minecraft:',':','Minecraft:stone','minecraft:stone:foo','mine craft:stone',{'id':'minecraft:unknown','properties':{}}] + for value in invalid: + for full in [False,True]:yield [full,json.dumps(value)] + for text in ['{"id":"minecraft:stone","id":"minecraft:water"}','{"id":"minecraft:water","properties":{"level":"0","level":"1"}}','{"id":"minecraft:water","properties":{"level":"1"},"properties":null}']: + for full in [False,True]:yield [full,text] + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-block-state-codec-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateCodecOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/block_state_codec_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaBlockStateCodecOracle',mode,path],side+'-'+mode) + for side in jars:java(side,'export',build/f'facts-{side}.json') + facts=json.loads((build/'facts-server.json').read_text()) + if facts!=json.loads((build/'facts-client.json').read_text()):raise ValueError('client/server registry metadata differs') + if len(facts['states'])!=35723:raise ValueError('incomplete pinned state registry') + fixtures=list(corpus(facts));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'facts-client.json',build/'facts-server.json'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','block_state_codec_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('block_state_codec_fixture.exe' if os.name=='nt' else 'block_state_codec_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} block-state codec output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'block_states':len(facts['states']),'blocks':len(facts['defaults']),'integer_properties':len(facts['integers']),'codec_inputs':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual BlockState.CODEC and FULL_CODEC, every pinned runtime block state, compact/default versus full encoding, canonical object keys, namespaces, property omission/invalid fallback, unknown fields, malformed property containers, Java integer-property parsing including signs/leading zeroes/BMP decimal digits and overflow, invalid identifiers/types, duplicate fields. Registry identities, defaults and integer property kinds are imported from both authenticated JARs and must agree. This ports codec behavior over that metadata, not block gameplay. Native warning text, arbitrary malformed JSON/unpaired surrogate text, registry lifecycle/ownership and full material-rule codecs remain pending.'} + lab.write_json(report_path,report);print(f'Scoped block-state codec parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_block_support_parity.py b/tools/test_block_support_parity.py new file mode 100644 index 000000000..fd7646a39 --- /dev/null +++ b/tools/test_block_support_parity.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python3 +"""Compare registered cached block support with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-block-support-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSupportOracle.java' + helper=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java' + sources=[oracle,helper,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/block_support_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,helper],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaBlockSupportOracle',mode,path],side+'-'+mode) + java('server','export',build) + fixture_paths=[build/'block-registry.nbt',build/'cached-support.nbt'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','block_support_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('block_support_fixture.exe' if os.name=='nt' else 'block_support_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} block-support output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'registry_states':35723,'cached_states':35524,'uncached_states':199,'support_queries':35524*18,'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'All 35,524 cached block-state support shapes are imported privately and Rust derives FULL/CENTER/RIGID face-support masks. These are compared with actual BlockState.isFaceSturdy cache results across all six directions; all 199 uncached states remain explicitly unsupported. Registry/DataVersion/kind validation, shared shape identities, exact face geometry and full-state queries are covered. Dynamic support selection, block survival and full gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped block-support parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_block_survival_parity.py b/tools/test_block_survival_parity.py new file mode 100644 index 000000000..1300d3bd8 --- /dev/null +++ b/tools/test_block_survival_parity.py @@ -0,0 +1,267 @@ +#!/usr/bin/env python3 +"""Compare initial block survival rules with pinned vanilla.""" +import argparse +import json +import itertools +import random +import struct +import os +from pathlib import Path +import platform +import subprocess +import zipfile +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +CLASS_RULES={ + 'FireBlock':'Fire', + 'CactusBlock':'Cactus', + 'PathBlock':'Path', + 'MushroomBlock':'Mushroom', + + 'MultifaceBlock':'Multiface', + 'VineBlock':'Vine', + 'HangingMossBlock':'HangingMoss', + 'SeaPickleBlock':'SeaPickle', + 'SnowLayerBlock':'SnowLayer', + + 'BellBlock':'Bell','ShelfMushroomBlock':'FullBehind', + 'GrowingPlantBlock':'GrowingPlant', + 'MangrovePropaguleBlock':'MangrovePropagule', + 'SpeleothemBlock':'Speleothem', + 'ScaffoldingBlock':'Scaffolding', + 'PistonHeadBlock':'PistonHead', + 'ChorusPlantBlock':'ChorusPlant', + 'ChorusFlowerBlock':'ChorusFlower', + 'PitcherCropBlock':'PitcherCrop', + + 'BigDripleafBlock':'BigDripleaf','BigDripleafStemBlock':'BigDripleafStem','FarmlandBlock':'Farmland','CocoaBlock':'Cocoa', + 'SugarCaneBlock':'SugarCane','SporeBlossomBlock':'SporeBlossom','FrogspawnBlock':'Frogspawn','SmallDripleafBlock':'SmallDripleaf','TallSeagrassBlock':'TallSeagrass', + 'DoorBlock':'Door', + 'BaseRailBlock':'RigidBelow','LeafLitterBlock':'FullBelow','WallSignBlock':'SolidBehind','GrindstoneBlock':'Always','RedstoneWallTorchBlock':'FullBehind','BubbleColumnBlock':'BubbleColumn','RedstoneWireBlock':'RedstoneWire','SoulFireBlock':'TagBelow:minecraft:soul_fire_base_blocks', + 'BlockBehaviour':'Always','CakeBlock':'SolidBelow','CandleCakeBlock':'SolidBelow','BannerBlock':'SolidBelow','StandingSignBlock':'SolidBelow', + 'WallBannerBlock':'SolidBehind','CarpetBlock':'NonAirBelow','MossyCarpetBlock':'MossCarpet','BaseTorchBlock':'CenterBelow','CandleBlock':'CenterBelow','LanternBlock':'Lantern', + 'HangingRootsBlock':'FullAbove','LadderBlock':'FullBehind','AmethystClusterBlock':'FullBehind','TripWireHookBlock':'FullBehind','BaseCoralWallFanBlock':'FullBehind','WallTorchBlock':'FullBehind', + 'BasePressurePlateBlock':'RigidOrCenterBelow','DiodeBlock':'RigidBelow','BaseCoralPlantTypeBlock':'FullBelow','CeilingHangingSignBlock':'CenterAbove', + 'FaceAttachedHorizontalDirectionalBlock':'FaceAttached','BambooSaplingBlock':'SupportsBamboo','BambooStalkBlock':'SupportsBamboo', +} + +VEGETATION_RULES={ + 'LilyPadBlock':'LilyPad', + 'VegetationBlock':'TagBelow:minecraft:supports_vegetation', + 'AzaleaBlock':'TagBelow:minecraft:supports_azalea', + 'DryVegetationBlock':'TagBelow:minecraft:supports_dry_vegetation', + 'NetherSproutsBlock':'TagBelow:minecraft:supports_nether_sprouts', + 'NetherWartBlock':'TagBelow:minecraft:supports_nether_wart', + 'WitherRoseBlock':'TagBelow:minecraft:supports_wither_rose', + 'CactusFlowerBlock':'CactusFlower','SeagrassBlock':'Seagrass', +} + +def bind_definitions(classes,placement,support_tags): + definitions={name:CLASS_RULES[owner] for name,owner in classes.items() if owner in CLASS_RULES} + for name,owner in classes.items(): + if owner=='CropBlock' and placement.get(name)=='CropBlock':definitions[name]='Crop' + if owner=='DoublePlantBlock' and placement.get(name)=='VegetationBlock':definitions[name]='DoublePlant' + if owner!='VegetationBlock':continue + method=placement[name] + if method in VEGETATION_RULES:definitions[name]=VEGETATION_RULES[method] + elif method in ['AttachedStemBlock','StemBlock','NetherFungusBlock','NetherRootsBlock']: + field='stemSupportBlocks' if method=='StemBlock' else 'supportBlocks' + definitions[name]='TagBelow:'+support_tags[name][field] + return definitions + + +def fluid_tag_resources(jar): + with zipfile.ZipFile(jar) as archive: + prefix='data/minecraft/tags/fluid/' + return {'minecraft:'+name[len(prefix):-5]:archive.read(name).decode('utf-8') for name in sorted(archive.namelist()) if name.startswith(prefix) and name.endswith('.json')} + + +def behavior_key(rule,value): + properties=value.get('properties',{}) + return (rule,properties.get('facing') if rule in ['FullBehind','SolidBehind','Cocoa','PistonHead','Bell'] or rule=='FaceAttached' and properties.get('face')=='wall' else None,properties.get('hanging') if rule in ['Lantern','MangrovePropagule'] else None,properties.get('bottom') if rule=='MossCarpet' else None,properties.get('face') if rule=='FaceAttached' else None,properties.get('half') if rule in ['Door','DoublePlant','SmallDripleaf','TallSeagrass','PitcherCrop'] else None,properties.get('vertical_direction') if rule=='Speleothem' else None,properties.get('type') if rule=='PistonHead' else None,value['id'] if rule in ['GrowingPlant','Speleothem'] else None,properties.get('attachment') if rule=='Bell' else None,tuple(properties.get(face) for face in ['down','up','north','south','west','east']) if rule in ['Multiface','Vine'] else None) + +def corpus(facts,definitions): + positions=[[0,0,0],[2147483647,-2147483648,2147483647],[-17,2147483647,-33]] + def case(state,neighbors,position=0,**kwargs): + f={'state':state,'neighbors':neighbors,'position':positions[position%3],'entity':'none','fail':-1,'entity_fail':-1};f.update(kwargs);return f + defaults=facts['defaults'];samples=[defaults[name] for name in ['minecraft:air','minecraft:stone','minecraft:water','minecraft:pale_moss_carpet'] if name in defaults] + representatives={} + for state,value in enumerate(facts['states']): + rule=definitions.get(value['id']) + if rule is None:continue + yield case(state,samples or [0],state,fail=0) + if rule=='Always':continue + for neighbor in [*samples,state,defaults[value['id']]]:yield case(state,[neighbor],state) + key=behavior_key(rule,value) + representatives.setdefault(key,state) + special=[defaults[name] for name in ['minecraft:shulker_box','minecraft:moving_piston','minecraft:scaffolding','minecraft:oak_slab','minecraft:stone','minecraft:air','minecraft:pale_moss_carpet','minecraft:bamboo'] if name in defaults] or [0] + for candidate in representatives.values(): + rule=definitions[facts['states'][candidate]['id']] + for neighbor in range(len(facts['states'])):yield case(candidate,[neighbor],neighbor) + extra=['big_dripleaf','big_dripleaf_stem','clay','dirt'] if rule=='BigDripleafStem' else ['oak_fence_gate','dirt','oak_trapdoor'] if rule=='Farmland' else ['farmland','dirt'] if rule in ['Crop','PitcherCrop'] else [] + neighbors=[*special,*[defaults['minecraft:'+name] for name in extra if 'minecraft:'+name in defaults]] + if rule in ['Crop','PitcherCrop']: + for brightness in [-2147483648,-1,0,7,8,9,15,2147483647]: + for neighbor in neighbors: + for fail in [-1,0]: + for light_fail in [-1,0]:yield case(candidate,[neighbor],candidate,brightness=brightness,fail=fail,light_fail=light_fail) + if rule in ['LilyPad','Frogspawn','SporeBlossom','SmallDripleaf','TallSeagrass','SugarCane']: + fluid_states=[index for index,state in enumerate(facts['states']) if state['id'] in ['minecraft:water','minecraft:lava','minecraft:air']] + supporting=[defaults['minecraft:'+name] for name in ['stone','dirt','clay','ice','big_dripleaf','small_dripleaf','tall_seagrass','sugar_cane','oak_leaves'] if 'minecraft:'+name in defaults] + for first in fluid_states: + for second in [defaults[name] for name in ['minecraft:air','minecraft:water','minecraft:lava'] if name in defaults]: + for neighbor in supporting: + for fail in [-1,0,1,4]: + for fluid_fail in [-1,0,1,3]: + yield case(candidate,[neighbor],candidate,fluid_states=[first,second],fail=fail,fluid_fail=fluid_fail) + if rule=='Fire': + air=defaults['minecraft:air'] + # An empty first support query forces the ignition lookup even when + # the subsequent neighbor has a full supporting face. + for neighbor in range(len(facts['states'])): + yield case(candidate,[air,neighbor],neighbor) + if rule=='Mushroom': + for brightness in [-2147483648,0,12,13,14,2147483647]: + for neighbor in range(len(facts['states'])): + yield case(candidate,[neighbor],neighbor,brightness=brightness) + for neighbor in range(0,len(facts['states']),7): + for fail in [-1,0]: + yield case(candidate,[neighbor],neighbor,brightness=12,fail=fail,light_fail=0) + if rule=='Cactus': + air=defaults['minecraft:air'];cactus=defaults['minecraft:cactus'] + for neighbor in range(len(facts['states'])): + yield case(candidate,[air,air,air,air,cactus,neighbor],neighbor,fluid_states=[air]) + supports=[defaults['minecraft:'+name] for name in ['air','sand','red_sand','cactus','stone'] if 'minecraft:'+name in defaults] + fluid_states=[index for index,state in enumerate(facts['states']) if state['id'] in ['minecraft:air','minecraft:water','minecraft:lava']] + for support in supports: + for fluid in fluid_states: + for slot in range(4): + fluids=[air]*4;fluids[slot]=fluid + for fail in [-1,*range(6)]: + for fluid_fail in [-1,*range(4)]: + yield case(candidate,[air,air,air,air,support,air],slot,fluid_states=fluids,fail=fail,fluid_fail=fluid_fail) + if rule in ['Multiface','Vine','HangingMoss','SnowLayer','SeaPickle']: + shulkers=[index for index,state in enumerate(facts['states']) if state['id']=='minecraft:shulker_box'] + for neighbor in shulkers: + for old,current in [(0,0),(0,1),(1,0),(0.1,0.2),(0.7,0.8),(1,1)]: + for entity in ['closed','opened']: + for entity_fail in [-1,0,1,2,3]: + yield case(candidate,[neighbor],candidate,entity=entity,entity_fail=entity_fail,shulker_progress=[struct.pack('>f',v).hex() for v in [old,current]]) + if rule in ['ChorusPlant','ChorusFlower','Scaffolding','Multiface','Vine','HangingMoss','SnowLayer','SeaPickle','Fire','Cactus']: + # Long read sequences expose directional order, early exits and failures + # beyond the two alternating neighbors used by the general corpus. + names=['air','stone','end_stone','chorus_plant','chorus_flower','vine','pale_hanging_moss','shulker_box','scaffolding','oak_slab','oak_planks','sand','cactus','water'] + palette=[defaults['minecraft:'+name] for name in names if 'minecraft:'+name in defaults] + if rule=='Scaffolding': + palette.extend(index for index,state in enumerate(facts['states']) if state['id']=='minecraft:scaffolding') + rng=random.Random(0x484f52495a4f4e+candidate) + sequences=(tuple(rng.choice(palette) for _ in range(10)) for _ in range(4096 if rule in ["ChorusPlant","ChorusFlower","Scaffolding"] else 512)) + for index,sequence in enumerate(sequences): + for fail in [-1,*range(10)]:yield case(candidate,list(sequence),index,fail=fail) + if rule in ['ChorusPlant','ChorusFlower']: + for index,sequence in enumerate(itertools.product(palette[:5],repeat=5)): + yield case(candidate,list(sequence),index) + for first in neighbors: + for second in neighbors: + for fail in [-1,0,1]: + for entity_fail in [-1,0]: + for entity in ['none','closed','opened']:yield case(candidate,[first,second],candidate,fail=fail,entity_fail=entity_fail,entity=entity) + + +def save_checkpoint(path, checkpoint): + temporary=path.with_suffix('.tmp') + temporary.write_text(json.dumps(checkpoint,indent=2)+'\n',encoding='utf-8') + temporary.replace(path) + + +def load_checkpoint(path, sources, environment): + if not path.exists():return None + checkpoint=json.loads(path.read_text(encoding='utf-8')) + if checkpoint.get('schema')!=1 or checkpoint['sources_sha256']!=sources or checkpoint['environment']!=environment: + raise ValueError('checkpoint source/environment changed; run again without --resume') + for group in ['fixtures_sha256','artifacts_sha256']: + for name,digest in checkpoint[group].items(): + artifact=Path(name) + if not artifact.is_file() or lab.digest(artifact,'sha256')!=digest: + raise ValueError(f'checkpoint artifact changed: {artifact}; run again without --resume') + return checkpoint + + +def main(): + parser=argparse.ArgumentParser(description=__doc__) + parser.add_argument('--prepare',action='store_true') + parser.add_argument('--resume',action='store_true',help='Reuse completed stages only when all recorded input and executable hashes still match') + args=parser.parse_args() + build=lab.LOCAL/'rust-block-survival-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + checkpoint_path=build/'run-state.json' + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockSurvivalOracle.java' + helpers=[oracle.with_name(name+'.java') for name in ['VanillaBlockPropertiesOracle','VanillaBlockSupportOracle','VanillaBlockStateCodecOracle','VanillaCollisionOracle','VanillaHeightmapOracle']] + sources=[oracle,*helpers,lab.ROOT/'tools/test_worldgen_parity.py',Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/block_survival_fixture.rs'] + tested_sources=base.source_hashes(sources) + environment={'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'dependencies':{str(path):lab.digest(path,'sha256') for path in [*jars.values(),*libraries]}} + checkpoint=load_checkpoint(checkpoint_path,tested_sources,environment) if args.resume else None + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,stdout=log,stderr=subprocess.STDOUT,timeout=3600) + dependency_path=os.pathsep.join(map(str,libraries)) + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaBlockSurvivalOracle',mode,path],side+'-'+mode) + if checkpoint is None: + checkpoint_path.unlink(missing_ok=True) + tags=worldgen.tag_resources(jars['server']) + if tags!=worldgen.tag_resources(jars['client']):raise ValueError('client/server tags differ') + (build/'tags.json').write_text(json.dumps(tags,separators=(',',':'))) + fluid_tags=fluid_tag_resources(jars['server']) + if fluid_tags!=fluid_tag_resources(jars['client']):raise ValueError('client/server fluid tags differ') + (build/'fluid-tags.json').write_text(json.dumps(fluid_tags,separators=(',',':'))) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,*helpers],'compile-java') + java('server','export',build) + facts=json.loads((build/'facts.json').read_text());definition_classes=json.loads((build/'survival-classes.json').read_text()) + definitions=bind_definitions(definition_classes,json.loads((build/'survival-placement-classes.json').read_text()),json.loads((build/'survival-support-tags.json').read_text())) + if len(facts['states'])!=35723:raise ValueError('incomplete pinned registry') + if len(definitions)!=len(facts['defaults']):raise ValueError('incomplete pinned survival definitions') + (build/'survival-rules.json').write_text(json.dumps(definitions,separators=(',',':'))) + inputs=build/'inputs.txt';fixture_count=0 + with inputs.open('w',encoding='utf-8') as output: + for fixture in corpus(facts,definitions): + output.write(json.dumps(fixture,separators=(',',':'))+'\n');fixture_count+=1 + fixture_paths=[inputs,build/'survival-extra-definitions.json',build/'fluid-tags.json',build/'survival-placement-classes.json',build/'survival-support-tags.json',build/'facts.json',build/'survival-classes.json',build/'survival-rules.json',build/'tags.json',build/'block-registry.nbt',build/'cached-collision.nbt',build/'block-properties.nbt',build/'cached-support.nbt'] + tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','block_survival_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('block_survival_fixture.exe' if os.name=='nt' else 'block_survival_fixture') + base.ensure_sources_unchanged(sources,tested_sources) + checkpoint={'schema':1,'environment':environment,'sources_sha256':tested_sources,'fixtures_sha256':{str(lab.ROOT/name):digest for name,digest in tested_fixtures.items()},'artifacts_sha256':{str(path):lab.digest(path,'sha256') for path in [binary,*sorted(classes.rglob('*.class'))]},'binary':str(binary),'counts':{'supported_blocks':len(definitions),'supported_states':sum(state['id'] in definitions for state in facts['states']),'survival_rules':len(set(definitions.values())),'survival_rule_kinds':len({rule.split(':',1)[0] for rule in definitions.values()}),'fluid_tag_files':len(fluid_tags),'fixtures':fixture_count},'outputs':{}} + save_checkpoint(checkpoint_path,checkpoint) + print('Verified inputs and compiled executables checkpointed',flush=True) + def stage(name, action): + output=build/(name+'.txt') + previous=checkpoint['outputs'].get(name) + if previous is None or not output.exists() or lab.digest(output,'sha256')!=previous: + action() + checkpoint['outputs'][name]=lab.digest(output,'sha256') + save_checkpoint(checkpoint_path,checkpoint) + print(f'{name}: completed output checkpointed',flush=True) + stage('rust',lambda:run([checkpoint['binary'],build],'rust')) + references=[] + for side,jar in jars.items(): + stage(side,lambda:java(side,side,build)) + reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} block-survival output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources) + load_checkpoint(checkpoint_path,tested_sources,environment) + report={'schema':1,**{key:value for key,value in environment.items() if key!='dependencies'},**checkpoint['counts'],'sources_sha256':tested_sources,'fixtures_sha256':{str(Path(name).relative_to(lab.ROOT)):digest for name,digest in checkpoint['fixtures_sha256'].items()},'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Version-pinned block survival rules are assigned from privately inspected native definition classes and executed in Rust against solid/air/tag tests and unified support geometry. Actual native canSurvive evaluates every supported candidate state, each neighbor state against behavior representatives, changing repeated reads, world-coordinate wrapping, absent/closed/open shulker snapshots, brightness thresholds, independent fluid state sequences and block/entity/light/fluid query failures. All pinned survival families are included; full block placement/update behavior, world/entity lifecycle and full gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped block-survival parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_blocking_item_damage_parity.py b/tools/test_blocking_item_damage_parity.py new file mode 100644 index 000000000..7d0f3db4f --- /dev/null +++ b/tools/test_blocking_item_damage_parity.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python3 +"""Compare native blocking-item damage bound to actual item-stack durability.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>f',v).hex() + floats = [-float('inf'), -1e30, -1, -0., 0., 1e-40, .5, 1, 5, 20, 1e30, float('inf'), float('nan')] + def state(count=1, maximum=20, damage=0, unbreakable=False): return dict(count=count, max=maximum, damage=damage, unbreakable=unbreakable) + def rule(threshold=3, base=1, factor=1):return dict(threshold=bits(threshold),base=bits(base),factor=bits(factor)) + def row(damage=20, **kw): + f=dict(damage=bits(damage),rule=rule(),air=False,kind=2,hand=0,infinite=False,after_infinite=False,client=False,after_client=False,server=True,after_server=True,initial=state(),after=state(count=2,maximum=5,damage=4),fail=-1,mutate_at=-1);f.update(kw);return f + for damage in floats: + for base in floats: + for factor in floats: + for kind in range(3):yield row(damage,rule=rule(threshold=base,base=base,factor=factor),kind=kind) + for kind in range(3): + for mutate in range(-1,7): + for fail in range(-1,7): + for count in [0,1,2]: + for maximum in [None,0,5,20]:yield row(kind=kind,fail=fail,mutate_at=mutate,hand=1,after=state(count=count,maximum=maximum,damage=4)) + rng=random.Random(0x424c4f434b445552) + edges=[-2147483648,-1,0,1,2,19,20,21,16777217,2147483647] + def integer():return rng.choice(edges) if rng.randrange(2) else rng.randrange(-2147483648,2147483648) + def random_state():return state(rng.choice([-1,0,1,2,64]),rng.choice([None,integer()]),rng.choice([None,integer()]),bool(rng.randrange(2))) + def floating():return bits(rng.choice(floats)) if rng.randrange(2) else f'{rng.getrandbits(32):08x}' + for _ in range(12000): + flags={name:bool(rng.randrange(2)) for name in ['infinite','after_infinite','client','after_client','server','after_server']} + yield row(damage=0,**flags,rule={name:floating() for name in ['threshold','base','factor']},kind=rng.randrange(3),hand=rng.randrange(2),air=bool(rng.randrange(5)==0),initial=random_state(),after=random_state(),fail=rng.choice([-1,-1,*range(7)]),mutate_at=rng.randrange(-1,7)) | dict(damage=floating()) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-blocking-item-damage-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockingItemDamageOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/blocking_item_damage_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaBlockingItemDamageOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','blocking_item_damage_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('blocking_item_damage_fixture.exe' if os.name=='nt' else 'blocking_item_damage_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} blocking item damage output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual BlocksAttacks hurtBlockingItem into native unenchanted ItemStack durability storage, on non-player, Player and ServerPlayer receivers. Native statistic item capture, client/level guards, scalar item-damage rules, creative immunity, empty-listener advancement ordering, stack mutation/shrink and equipment-break callback copy/slot are compared with Rust composition. Covers scalar float boundaries, absent/invalid durability components, callback storage mutations and failures. Complete components/codecs, enchantment effects, inventory/equipment lifecycle and full combat/world integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped blocking item damage parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_blocking_rules_parity.py b/tools/test_blocking_rules_parity.py new file mode 100644 index 000000000..29f58fd1b --- /dev/null +++ b/tools/test_blocking_rules_parity.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python3 +"""Compare native blocking reductions, timers and item-damage arithmetic.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>f',v).hex() + def double(v):return struct.pack('>d',v).hex() + def reduction(angle=90,base=0,factor=1,set=0):return dict(angle=bits(angle),base=bits(base),factor=bits(factor),set=set) + def row(damage=8,angle=0,reductions=None,delay=.25,scale=1,seconds=1,threshold=3,base=1,factor=1,**kw): + f=dict(damage=bits(damage),angle=double(angle),reductions=reductions if reductions is not None else [reduction()],delay=bits(delay),disable_scale=bits(scale),disable_seconds=bits(seconds),item=dict(threshold=bits(threshold),base=bits(base),factor=bits(factor)),type=0,after_type=1,fail=-1,mutate_at=-1);f.update(kw);return f + values=[-float('inf'),-1e30,-1,-.5,-0.,0.,1e-40,.1,.5,1,5,20,1e30,float('inf'),float('nan')] + for damage in values: + for base in values: + for factor in values: + yield row(damage,base=base,factor=factor,threshold=base,delay=damage,scale=base,seconds=factor,reductions=[reduction(base=base,factor=factor),reduction(angle=float('nan'),base=factor,factor=base,set=1)]) + for degrees in [-float('inf'),-360,-90,-0.,0.,1e-40,.1,45,90,180,360,float('inf'),float('nan')]: + c=struct.unpack('>f',struct.pack('>f',.017453292))[0] + radians=struct.unpack('>f',struct.pack('>f',c*degrees))[0] + for angle in [radians,math.nextafter(radians,-float('inf')),math.nextafter(radians,float('inf')),-float('inf'),float('inf'),float('nan')]: + for set in range(5): + for t in range(2):yield row(angle=angle,reductions=[reduction(angle=degrees,set=set)],type=t) + for delay in [i/40 for i in range(-100,101)]+[53687088.,107374176.,107374184.,float('nan')]: + yield row(delay=delay,scale=1,seconds=delay) + rng=random.Random(0x424c4f434b52554c) + def random_float():return struct.unpack('>f',struct.pack('>I',rng.getrandbits(32)))[0] + for _ in range(10000): + v=lambda:rng.choice(values) if rng.randrange(2) else random_float() + yield row(damage=v(),angle=rng.choice([float('nan'),-float('inf'),float('inf'),rng.uniform(-10,10)]),reductions=[reduction(angle=v(),base=v(),factor=v(),set=rng.randrange(5)) for _ in range(rng.randrange(9))],delay=v(),scale=v(),seconds=v(),threshold=v(),base=v(),factor=v(),type=rng.randrange(2),after_type=rng.randrange(2),fail=rng.choice([-1,-1,*range(8)]),mutate_at=rng.randrange(-1,8)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-blocking-rules-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockingRulesOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/blocking_rules_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaBlockingRulesOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','blocking_rules_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('blocking_rules_fixture.exe' if os.name=='nt' else 'blocking_rules_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} blocking rules output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual BlocksAttacks damage reduction records and ordered sums, native direct HolderSet membership through virtual source typeHolder queries, delay/disable tick rounding and ItemDamageFunction thresholds/flooring. Covers NaN/infinity/signed zero, exact angle boundaries, randomized float bits, membership mutations and query failures. Direction/acos calculation, component codecs, item durability, sounds and full blocking dispatch remain pending.'} + lab.write_json(report_path,report);print(f'Scoped blocking rules parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_blockstate_binding_parity.py b/tools/test_blockstate_binding_parity.py new file mode 100644 index 000000000..16ca50ff8 --- /dev/null +++ b/tools/test_blockstate_binding_parity.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python3 +"""Compare blockstate selector binding and multipart parts over the native registry.""" +import json +import os +from pathlib import Path +import platform +import random +import subprocess +import zipfile +try: + from . import lab, test_rust_parity as base, test_cuboid_model_parity as decoding +except ImportError: + import lab, test_rust_parity as base, test_cuboid_model_parity as decoding + + +def corpus(facts): + def variant(i):return {'model':f'horizon:probe_{i}'} + names=['stone','water','oak_stairs','oak_fence','oak_log','oak_door','redstone_wire','item_frame','glow_item_frame'] + for name in names: + block='minecraft:'+name;schema=facts[block]['schema'] + def row(value):return {'block':block,'json':json.dumps(value)} + keys=['',',','=','==','=x','unknown','unknown=x'] + for key,domain in schema.items(): + values=[str(domain['integer'][0]),str(domain['integer'][1])] if 'integer' in domain else domain['named'] + for value in values: + selector=key+'='+value;keys.extend([selector,selector+',',','+selector,selector+','+selector]) + keys.extend([key,key+'=',key+'=unknown',key+'=true=false',key+'= '+values[0],key+'='+values[0]+','+key+'='+values[-1]]) + for key in keys: + yield row({'variants':{key:variant(0)}}) + yield row({'variants':{'':variant(0),key:variant(1)},'multipart':[{'apply':variant(2)}]}) + yield row({'variants':{key:variant(0),'':variant(1)}}) + conditions=[None,{'OR':[]},{'AND':[]},{'unknown':'x'},{'OR':[{'AND':[]},{'unknown':'x'}]},{'AND':[{'OR':[]},{'unknown':'x'}]}] + for key,domain in schema.items(): + values=[str(domain['integer'][0]),str(domain['integer'][1])] if 'integer' in domain else domain['named'] + terms=['unknown',values[0],'!'+values[0],values[0]+'|'+values[-1],'!'+values[0]+'|'+values[-1],values[0]+'|unknown',values[0]+'|!'+values[0]+'|unknown'] + if 'integer' in domain:terms+=['+0','-0','00','+01','-01','1.0','1e0','2147483648','-2147483649','9'*80,'0'*80+'1','\u0661','\uff11','\U0001d7d9'] + for term in terms: + conditions.append({key:term}) + yield row({'variants':{key+'='+term:variant(0)}}) + for condition in conditions: + parts=[{'when':condition,'apply':variant(0)},{'apply':variant(1)}] + yield row({'multipart':parts}) + yield row({'variants':{'':variant(2)},'multipart':parts}) + rng=random.Random(name) + valid=[k for k in keys if k and 'unknown' not in k] + for _ in range(60): + chosen=rng.sample(valid,min(len(valid),rng.randrange(1,8))) + yield row({'variants':{k:variant(i) for i,k in enumerate(chosen)},'multipart':[{'apply':variant(9)}]}) + + +def main(): + lock,jars,libraries=base.verify_artifacts();build=lab.LOCAL/'rust-blockstate-binding-parity';build.mkdir(parents=True,exist_ok=True);report_path=build/'report.json';report_path.unlink(missing_ok=True) + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateBindingOracle.java';helper=oracle.with_name('VanillaCuboidModelOracle.java');crate=lab.ROOT/'crates/horizon-assets' + sources=[oracle,helper,Path(__file__),lab.ROOT/'tools/test_cuboid_model_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',crate/'Cargo.toml',lab.ROOT/'crates/horizon-core/Cargo.toml',*sorted(crate.rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs'))] + tested=base.source_hashes(sources);classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + dependencies=os.pathsep.join(map(str,[jars['client'],*libraries]));classpath=str(classes)+os.pathsep+dependencies + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',dependencies,'-d',classes,oracle,helper],'compile-java') + facts_path=build/'registry.json';run(['java','-Xmx512M','-cp',classpath,'dev.horizonlab.parity.VanillaBlockStateBindingOracle','export',facts_path],'export');facts=json.loads(facts_path.read_text()) + rows=[];unbound=[] + with zipfile.ZipFile(jars['client']) as archive: + names=sorted(n for n in archive.namelist() if n.startswith('assets/minecraft/blockstates/') and n.endswith('.json')) + for name in names: + block='minecraft:'+name.removeprefix('assets/minecraft/blockstates/').removesuffix('.json') + if block not in facts:unbound.append(name);continue + rows.append({'name':name,'block':block,'json':archive.read(name).decode()}) + resources=len(rows) + assert not unbound, 'Bundled blockstate lacks native state definition' + assert len(facts)==1288 and sum(len(v['states']) for v in facts.values())==35727, 'Incomplete state definitions' + for i,row in enumerate(corpus(facts)):rows.append(dict(name=f'synthetic/{i}',**row)) + inputs=build/'inputs.jsonl';inputs.write_text(''.join(json.dumps(row)+'\n' for row in rows));fixtures=base.source_hashes([inputs,facts_path]) + run(['cargo','build','--locked','-p','horizon-assets','--example','blockstate_binding_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'debug/examples'/('blockstate_binding_fixture.exe' if os.name=='nt' else 'blockstate_binding_fixture') + run([binary,inputs,build/'rust.jsonl',facts_path],'rust');run(['java','-Xmx512M','-cp',classpath,'dev.horizonlab.parity.VanillaBlockStateBindingOracle',inputs,build/'client.jsonl'],'client') + rejected=decoding.canonicalize(build/'client.jsonl');decoding.canonicalize(build/'rust.jsonl');native=[json.loads(line) for line in (build/'client.jsonl').read_text().splitlines()];rust=[json.loads(line) for line in (build/'rust.jsonl').read_text().splitlines()] + for left,right in zip(native,rust,strict=True): + if left!=right:raise AssertionError('Blockstate binding mismatch: '+left['name']) + matched=base.compare(build/'client.jsonl',build/'rust.jsonl');assert all('error' not in row for row in native[:resources]),'Bundled blockstate rejected' + base.ensure_sources_unchanged(sources,tested);base.ensure_sources_unchanged([inputs,facts_path],fixtures) + states=sum(len(row.get('selected',[])) for row in native) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'resource_blockstates':resources,'unbound_resource_names':unbound,'state_definitions':len(facts),'definition_states':sum(len(v['states']) for v in facts.values()),'definitions':len(rows),'selected_state_results':states,'rejected':rejected,'sources_sha256':tested,'fixtures_sha256':fixtures,'rust_output_sha256':lab.digest(build/'rust.jsonl','sha256'),'references':[{'side':'client','jar_sha256':lab.digest(jars['client'],'sha256'),'output_sha256':lab.digest(build/'client.jsonl','sha256'),'matched_output_lines':matched}],'scope':'Actual BlockStateModelDispatcher.instantiate and MultiPartModel visual-equality selection on every bundled blockstate definition, including the native fake item-frame definitions, and its native ordered possible states. Synthetic malformed selectors, overlapping recovery, eager multipart errors, per-term negation, combined predicates, integer-property conversion and partial coverage. Property schema and state order are exported from the authenticated client. No weighted random selection, transformed baking, renderer integration or gameplay parity claim.'} + lab.write_json(report_path,report);print(f'Native blockstate binding: {matched:,} definitions / {states:,} state results match ({rejected:,} rejected); {report_path}',flush=True) + + +if __name__=='__main__':main() diff --git a/tools/test_blockstate_model_parity.py b/tools/test_blockstate_model_parity.py new file mode 100644 index 000000000..8a2548d53 --- /dev/null +++ b/tools/test_blockstate_model_parity.py @@ -0,0 +1,83 @@ +#!/usr/bin/env python3 +"""Compare blockstate resource decoding with the pinned client loader's codec.""" +import json +import os +from pathlib import Path +import platform +import random +import subprocess +import zipfile +try: + from . import lab, test_rust_parity as base, test_cuboid_model_parity as decoding +except ImportError: + import lab, test_rust_parity as base, test_cuboid_model_parity as decoding + + +def corpus(): + model={'model':'block/stone'} + def root(value): return {'variants':{'':value}} + for value in [None,{},[],False,0,'x',{'variants':{}},{'multipart':[]},{'variants':None},{'variants':None,'multipart':[{'apply':model}]},root(model),root([model]),root([])]:yield json.dumps(value) + values=[None,True,False,0,1,-1,90,90.9,-90,270,360,450,4294967296,4294967386,1e100,'90','true','',[],{},[model]] + for key in ['model','x','y','z','uvlock','weight']: + for value in values: + variant=dict(model);variant[key]=value + yield json.dumps(root(variant));yield json.dumps(root([variant])) + for weights in [[2147483647],[2147483647,1],[2147483646,1],[0,1],[-1,2],[1,1],[1.9,2.9]]: + yield json.dumps(root([dict(model,weight=w) for w in weights])) + for name in ['block/stone',':block/stone',':','minecraft:','a:b:c','A:a','a:é','../a']: + yield json.dumps(root({'model':name})) + for x in [-360,-90,0,90,180,270,360,450]: + for y in [0,90,180,270]: + for z in [0,90,180,270]:yield json.dumps(root(dict(model,x=x,y=y,z=z,uvlock=True))) + terms=[None,True,False,0,1,1.9,-1,4294967297,'true','false','!true','true|false','!true|false','!!true','!','', '|','true|','|true','a||b',' a ',[],{},['true']] + conditions=[{},None,True,[],{'OR':[]},{'AND':[]},{'OR':[{'a':'b'}]},{'AND':[{'a':'b'},{'c':'d'}]},{'OR':'true'},{'OR':[],'AND':[]},{'OR':[],'a':'b'}] + for key in ['a','OR','AND','']: + conditions.extend({key:t} for t in terms) + for condition in conditions: + for apply in [model,[model],[],None]:yield json.dumps({'multipart':[{'when':condition,'apply':apply}]}) + for raw in ['{} trailing','{} {}','\ufeff'+json.dumps(root(model)), '{"variants":{"b":{"model":"b"},"a":{"model":"a"},"b":{"model":"c"}}}', '{"variants":{"":{"model":"a"}},"multipart":[{"apply":{"model":"b"}}]}']: + yield raw + rng=random.Random(0x424c4f434b) + for _ in range(500): + selectors=[] + for _ in range(rng.randrange(1,8)): + condition={rng.choice(['a','b','c']):rng.choice(['x','y','!x','x|y'])} + if rng.randrange(2):condition={rng.choice(['OR','AND']):[condition,{'a':'x'}]} + variants=[dict(model,weight=rng.randrange(1,10),x=rng.randrange(-4,5)*90,y=rng.randrange(4)*90,z=rng.randrange(4)*90,uvlock=bool(rng.randrange(2))) for _ in range(rng.randrange(1,6))] + selectors.append({'when':condition,'apply':variants if rng.randrange(2) else variants[0]}) + yield json.dumps({'multipart':selectors}) + for number in ['1844674407370955161601','18446744073709551616.1','1e10000','1e9999','1' * 1024]: + yield '{"variants":{"":{"model":"block/stone","x":'+number+'}}}' + yield '{"variants":{"":{"model":"block/stone"}},"unknown":'+number+'}' + + +def main(): + lock,jars,libraries=base.verify_artifacts() + build=lab.LOCAL/'rust-blockstate-model-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBlockStateModelOracle.java';helper=oracle.with_name('VanillaCuboidModelOracle.java');crate=lab.ROOT/'crates/horizon-assets' + sources=[oracle,helper,Path(__file__),lab.ROOT/'tools/test_cuboid_model_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',crate/'Cargo.toml',*sorted(crate.rglob('*.rs'))] + tested=base.source_hashes(sources) + with zipfile.ZipFile(jars['client']) as archive: + names=sorted(n for n in archive.namelist() if n.startswith('assets/minecraft/blockstates/') and n.endswith('.json')) + rows=[(n,archive.read(n).decode()) for n in names] + synthetic=list(corpus());rows.extend((f'synthetic/{i}',raw) for i,raw in enumerate(synthetic)) + inputs=build/'inputs.jsonl';inputs.write_text(''.join(json.dumps(row)+'\n' for row in rows));fixtures=base.source_hashes([inputs]);classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + dependencies=os.pathsep.join(map(str,[jars['client'],*libraries])) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',dependencies,'-d',classes,oracle,helper],'compile-java') + run(['cargo','build','--locked','-p','horizon-assets','--example','blockstate_model_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'debug/examples'/('blockstate_model_fixture.exe' if os.name=='nt' else 'blockstate_model_fixture') + run([binary,inputs,build/'rust.jsonl'],'rust');run(['java','-Xmx512M','-cp',str(classes)+os.pathsep+dependencies,'dev.horizonlab.parity.VanillaBlockStateModelOracle',inputs,build/'client.jsonl'],'client') + rejected=decoding.canonicalize(build/'client.jsonl');decoding.canonicalize(build/'rust.jsonl') + native=[json.loads(line) for line in (build/'client.jsonl').read_text().splitlines()];rust=[json.loads(line) for line in (build/'rust.jsonl').read_text().splitlines()] + for left,right in zip(native,rust,strict=True): + if left!=right:raise AssertionError('Blockstate model mismatch: '+left['name']) + matched=base.compare(build/'client.jsonl',build/'rust.jsonl');assert all('error' not in row for row in native[:len(names)]),'Bundled blockstate rejected' + base.ensure_sources_unchanged(sources,tested);base.ensure_sources_unchanged([inputs],fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'resource_blockstates':len(names),'synthetic_definitions':len(synthetic),'rejected':rejected,'sources_sha256':tested,'fixtures_sha256':fixtures,'rust_output_sha256':lab.digest(build/'rust.jsonl','sha256'),'references':[{'side':'client','jar_sha256':lab.digest(jars['client'],'sha256'),'output_sha256':lab.digest(build/'client.jsonl','sha256'),'matched_output_lines':matched}],'scope':'Actual StrictJsonParser and BlockStateModelDispatcher codec used by the pinned resource loader. Every bundled blockstate JSON plus variants, XYZ quarter turns, UV-lock flags, weighted entries, source order, multipart conditions and malformed synthetic cases. No registry binding, property selection, random draw selection, transformed baking, rendered pixels or gameplay parity claim.'} + lab.write_json(report_path,report);print(f'Native blockstate models: {matched:,} definitions match ({rejected:,} rejected); {report_path}',flush=True) + + +if __name__=='__main__':main() diff --git a/tools/test_blockstate_transform_parity.py b/tools/test_blockstate_transform_parity.py new file mode 100644 index 000000000..4b6e80f4d --- /dev/null +++ b/tools/test_blockstate_transform_parity.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python3 +"""Compare blockstate-transformed cuboid baking against the pinned Java client.""" +import itertools +import json +import os +from pathlib import Path +import platform +import subprocess +import zipfile +try: + from . import lab, test_rust_parity as base, test_model_baking_parity as baking, test_cuboid_model_parity as decoding +except ImportError: + import lab, test_rust_parity as base, test_model_baking_parity as baking, test_cuboid_model_parity as decoding + + +def corpus(archive): + models = {'minecraft:' + name.removeprefix('assets/minecraft/models/').removesuffix('.json'): archive.read(name).decode() + for name in sorted(archive.namelist()) if name.startswith('assets/minecraft/models/block/') and name.endswith('.json')} + groups = {} + definitions = 0 + for name in sorted(archive.namelist()): + if not name.startswith('assets/minecraft/blockstates/') or not name.endswith('.json'): + continue + definitions += 1 + root = json.loads(archive.read(name)) + for choice in [*root.get('variants', {}).values(), *(s['apply'] for s in root.get('multipart', []))]: + for variant in choice if isinstance(choice, list) else [choice]: + state = tuple(variant.get(axis, 0) % 360 // 90 for axis in ['x', 'y', 'z']) + (variant.get('uvlock', False),) + model = variant['model'] + if ':' not in model: + model = 'minecraft:' + model + groups.setdefault(state, set()).add(model) + rows = [{'models': models, 'roots': sorted(roots), 'transform': state} for state, roots in sorted(groups.items())] + resource_pairs = sum(len(roots) for roots in groups.values()) + # All 128 transform/lock combinations on asymmetric, reversed and degenerate + # geometry, explicit/default UVs, signed zero and representative element rotations. + synthetic = list(baking.corpus())[-1]['models'] + names = list(synthetic) + selected = names[:12] + names[12:248:9] + names[248:504:13] + names[504::53] + names[-4:] + focused = {name: synthetic[name] for name in dict.fromkeys(selected)} + for turns in itertools.product(range(4), repeat=3): + for lock in [False, True]: + rows.append({'models': focused, 'roots': list(focused), 'transform': [*turns, lock]}) + # Cover every remaining arbitrary-angle element fixture under a deterministic + # transform; do not multiply the whole large corpus by 128 unnecessarily. + for state in itertools.product(range(4), range(4), [False, True]): + x, y, lock = state + subset = {name: raw for i, (name, raw) in enumerate(synthetic.items()) if i % 32 == x*8+y*2+lock} + rows.append({'models': subset, 'roots': list(subset), 'transform': [x, y, (x+y)%4, lock]}) + return rows, definitions, resource_pairs, len(focused) + + +def main(): + lock, jars, _ = base.verify_artifacts() + build = lab.LOCAL / 'rust-blockstate-transform-parity'; build.mkdir(parents=True, exist_ok=True) + report_path = build / 'report.json'; report_path.unlink(missing_ok=True) + oracle = lab.ROOT / 'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaModelBakingOracle.java' + helper = oracle.with_name('VanillaCuboidModelOracle.java'); crate = lab.ROOT / 'crates/horizon-assets' + sources = [oracle, helper, Path(__file__), lab.ROOT/'tools/test_model_baking_parity.py', + lab.ROOT/'tools/test_cuboid_model_parity.py', lab.ROOT/'tools/test_model_resolution_parity.py', + lab.ROOT/'tools/lab.py', lab.ROOT/'tools/test_rust_parity.py', lab.ROOT/'Cargo.toml', + lab.ROOT/'Cargo.lock', crate/'Cargo.toml', *sorted(crate.rglob('*.rs'))] + tested = base.source_hashes(sources) + with zipfile.ZipFile(jars['client']) as archive: + rows, definitions, resource_pairs, focused = corpus(archive) + inputs = build/'inputs.jsonl'; inputs.write_text(''.join(json.dumps(row)+'\n' for row in rows)) + fixtures = base.source_hashes([inputs]); classes = build/'classes'; classes.mkdir(exist_ok=True) + def run(command, name): + with (build/(name+'.log')).open('w') as log: + subprocess.run(list(map(str, command)), cwd=lab.ROOT, check=True, timeout=3600, stdout=log, stderr=subprocess.STDOUT) + dependencies = os.pathsep.join(map(str, [jars['client'], *baking.client_libraries()])) + run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-cp', dependencies, '-d', classes, oracle, helper], 'compile-java') + run(['cargo', 'build', '--locked', '-p', 'horizon-assets', '--example', 'model_baking_fixture'], 'compile-rust') + metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) + binary = Path(metadata['target_directory'])/'debug/examples'/('model_baking_fixture.exe' if os.name == 'nt' else 'model_baking_fixture') + run([binary, inputs, build/'rust.jsonl'], 'rust') + run(['java', '-Xmx768M', '-cp', str(classes)+os.pathsep+dependencies, 'dev.horizonlab.parity.VanillaModelBakingOracle', inputs, build/'client.jsonl'], 'client') + rejected = decoding.canonicalize(build/'client.jsonl'); decoding.canonicalize(build/'rust.jsonl') + matched = base.compare(build/'client.jsonl', build/'rust.jsonl') + base.ensure_sources_unchanged(sources, tested); base.ensure_sources_unchanged([inputs], fixtures) + quads = sum(len(json.loads(line).get('baked', {}).get('quads', [])) for line in (build/'client.jsonl').open()) + report = {'schema': 1, 'minecraft': lock['minecraft']['version'], 'manifest_sha1': lock['minecraft']['manifest_sha1'], + 'platform': platform.platform(), 'java': subprocess.check_output(['java', '--version'], text=True).splitlines()[0], + 'rustc': subprocess.check_output(['rustc', '--version'], text=True).strip(), 'resource_definitions': definitions, + 'resource_model_transform_pairs': resource_pairs, 'synthetic_models_per_all_128_transforms': focused, + 'graph_fixtures': len(rows), 'rejected_roots': rejected, 'baked_quads': quads, + 'sources_sha256': tested, 'fixtures_sha256': fixtures, 'rust_output_sha256': lab.digest(build/'rust.jsonl', 'sha256'), + 'references': [{'side': 'client', 'jar_sha256': lab.digest(jars['client'], 'sha256'), + 'output_sha256': lab.digest(build/'client.jsonl', 'sha256'), 'matched_output_lines': matched}], + 'scope': 'Actual FaceBakery with Variant.SimpleModelState and unit-atlas sprite, default JOML math. Every distinct model/XYZ-rotation/UV-lock tuple in bundled blockstates; all 64 quarter-turn combinations with and without UV lock on synthetic geometry. Exact float bits for positions, UVs, element matrices, orientation and all six inverse UV matrices; native Direction.rotate for culling. Includes identity UV lock, degenerate/reversed geometry, element rotations, signed zero and float overflow. Does not establish atlas packing, shader pixels, lighting, render classification, renderer integration or gameplay parity.'} + lab.write_json(report_path, report) + print(f'Native transformed baking: {matched:,} roots / {quads:,} quads match ({rejected:,} rejected); {report_path}', flush=True) + + +if __name__ == '__main__': + main() diff --git a/tools/test_blue_ice_parity.py b/tools/test_blue_ice_parity.py new file mode 100644 index 000000000..83c3b0685 --- /dev/null +++ b/tools/test_blue_ice_parity.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python3 +"""Compare blue-ice sea-level gating, seeding and growth attempts.""" +import itertools +import json +try: + from . import test_simple_block_parity as harness +except ImportError: + import test_simple_block_parity as harness + + +def corpus(facts, placement): + states=facts['states'];get=lambda name:facts['defaults']['minecraft:'+name] + directions=[(0,-1,0),(0,1,0),(0,0,-1),(0,0,1),(-1,0,0),(1,0,0)] + def case(**extra): + origin=extra.pop('origin',[0,60,0]);wrap=lambda n:(n+2**31)%2**32-2**31 + value={'definition':'{"type":"blue_ice"}','mode':'feature','origin':origin,'legacy':False,'seed':0,'world_seed':1, + 'fail':-1,'reject':0,'brightness':15,'sea':63,'fallback':get('air'), + 'states':[[*origin,get('water')],[origin[0],wrap(origin[1]+1),origin[2],get('packed_ice')]],'repeats':1} + value.update(extra);return value + for state in range(len(states)): + yield case(states=[[0,60,0,state],[0,59,0,get('water')],[0,61,0,get('packed_ice')]],fail=24) + yield case(fallback=state,fail=24) + for mask,legacy,seed,fail,reject in itertools.product(range(64),[False,True],[0,-1,0x123456789abcdef],[-1,0,1,3,6,9,21],[0,1,3]): + initial=[[0,60,0,get('water')],*[[x,60+y,z,get('packed_ice') if mask&(1<-2147483648 else -2147483648,fallback=get('stone')) + # Force search through many solid candidates before finding the sole air cell. + for legacy,seed in itertools.product([False,True],range(32)): + yield case(legacy=legacy,seed=seed,fallback=get('stone'),states=[[15,64,15,get('air')]]) + for legacy,seed,fail,reject in itertools.product([False,True],[0,-1,987654321],[-1,0,5,20],[0,1,3]): + placed={'feature':{'type':'bonus_chest'},'placement':[{'type':'count','count':2},{'type':'in_square'}]} + yield case(definition=json.dumps(placed),mode='placed',legacy=legacy,seed=seed,fail=fail,reject=reject,air_above=63,fallback=get('stone')) + yield case(definition=json.dumps({'type':'overlay','features':[placed,{'feature':{'type':'bonus_chest'},'placement':[]}]}),legacy=legacy,seed=seed,fail=fail,reject=reject) + yield case(definition=json.dumps({'type':'bonus_chest','ignored':None})) + + +if __name__=='__main__': + harness.run(corpus,'rust-bonus-chest-parity',__file__, + 'Native BonusChestFeature unit codec, independently shuffled chunk X/Z coordinates, ordered heightmap candidate search, air short-circuit and second-read empty-context collision, chest writes, conditional randomizable-container loot seeding, north/east/south/west torch survival and writes. Every state participates in collision prefixes; complete searches cover absent/unrelated/actual native chest entities, repeated mutation, rejected writes, injected failures, both random modes, shuffled search exhaustion, sole viable columns, extreme coordinates/heights and placement composition. Actual ChestBlockEntity loot table and seed are compared; fixtures control heights and entity existence independently of writes. Loot generation, inventory behavior, automatic block-entity lifecycle, world updates and complete spawn generation remain pending.') diff --git a/tools/test_bulk_section_parity.py b/tools/test_bulk_section_parity.py new file mode 100644 index 000000000..414613067 --- /dev/null +++ b/tools/test_bulk_section_parity.py @@ -0,0 +1,93 @@ +#!/usr/bin/env python3 +"""Compare resident bulk-section caching, raw mutations and unchanged heightmaps.""" +import argparse +from collections import Counter +import json +import os +from pathlib import Path +import platform +import random +import subprocess + +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(facts): + ids=facts['defaults'];count=len(facts['states']);rng=random.Random(6541) + for minimum in [-2032,-64,0,1968]: + for prime in [False,True]: + ops=[] + for x,y,z in [[0,minimum,0],[0,minimum+16,0],[16,minimum+31,-1],[-1,minimum+63,16],[0,minimum-1,0],[2147483647,2147483647,-2147483648],[1600,minimum,1600]]: + ops += [['has',x,y,z],['get',x,y,z],['set',x,y,z,ids['minecraft:cave_air']],['get',x,y,z],['world',x,y,z]] + selected=range(count) if minimum==-64 else [rng.randrange(count) for _ in range(64)] + for state in selected: + ops += [['set',0,minimum+1,0,state],['get',0,minimum+1,0],['world',0,minimum+1,0]] + for state in [ids['minecraft:air'],ids['minecraft:stone'],ids['minecraft:void_air'],ids['minecraft:cave_air']]: + ops += [['set',1,minimum+48,1,state],['get',1,minimum+48,1],['world',1,minimum+48,1],['height','WORLD_SURFACE',1,1]] + # These X positions alias in the native 22-bit packed section key. + for x in [0,67108864,0]: + ops += [['set',x,minimum+2,0,ids['minecraft:stone']],['get',x,minimum+2,0],['world',x,minimum+2,0]] + ops += [['reset']] + for x in [67108864,0,67108864]: + ops += [['set',x,minimum+2,0,ids['minecraft:water']],['get',x,minimum+2,0],['world',x,minimum+2,0]] + yield {'min':minimum,'height':64,'prime':prime,'chunks':[[0,0],[1,-1],[-1,1],[4194304,0]],'ops':ops} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__) + parser.add_argument("--prepare",action="store_true") + args=parser.parse_args() + build=lab.LOCAL/"rust-bulk-section-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + tags=worldgen.tag_resources(jars["server"]) + if not tags or tags!=worldgen.tag_resources(jars["client"]):raise ValueError("client/server block tags differ or are empty") + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBulkSectionOracle.java" + helper=oracle.with_name("VanillaHeightmapOracle.java") + sources=[oracle,helper,Path(__file__),lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock", + lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/bulk_section_fixture.rs"] + tested_sources=base.source_hashes(sources) + classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper],"compile-java") + def java(side,mode,path): + run(["java","-Xmx1G","-cp",os.pathsep.join([str(classes),str(jars[side]),dependency_path]),"dev.horizonlab.parity.VanillaBulkSectionOracle",mode,path],side+"-"+mode) + for side in jars:java(side,"export",build/f"facts-{side}.json") + facts=json.loads((build/"facts-server.json").read_text()) + if facts!=json.loads((build/"facts-client.json").read_text()):raise ValueError("client/server state facts differ") + if len(facts["states"])!=35723:raise ValueError("incomplete pinned state table") + fixtures=list(corpus(facts));inputs=build/"inputs.txt" + inputs.write_text("".join(json.dumps(value,separators=(",",":"))+"\n" for value in fixtures),encoding="utf-8") + (build/"tags.json").write_text(json.dumps(tags,separators=(",",":")),encoding="utf-8") + fixture_paths=[inputs,build/"tags.json",build/"facts-client.json",build/"facts-server.json"] + tested_fixtures=base.source_hashes(fixture_paths) + run(["cargo","build","--release","-p","horizon-world","--example","bulk_section_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("bulk_section_fixture.exe" if os.name=="nt" else "bulk_section_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + java(side,side,build) + reference=build/f"{side}.txt";matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} bulk-section output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "block_states":len(facts["states"]),"block_tag_files":len(tags),"fixtures":len(fixtures),"resident_chunks_per_fixture":4,"operations":dict(Counter(op[0] for f in fixtures for op in f["ops"])), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual BulkSectionAccess over resident ProtoChunks: raw reads/writes, all-air chunk-read collapse, outside-height AIR, absent sections, missing neighbors, packed-key caching and aliasing, cache reset and complete final raw sections/heightmap words. Every pinned block state is inserted and read with both preprimed and lazy heightmaps. Rust holds an exclusive region borrow instead of Java section acquire/release locks. Concurrent ownership, ordinary ore geometry, region side effects and complete gameplay remain pending."} + + lab.write_json(report_path,report);print(f"Scoped bulk-section parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_bundle_weight_parity.py b/tools/test_bundle_weight_parity.py new file mode 100644 index 000000000..c047764b2 --- /dev/null +++ b/tools/test_bundle_weight_parity.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python3 +"""Compare native bundle weights and strict scalar stack validation.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + edges=[-2147483648,-2147483647,-65537,-64,-2,-1,0,1,2,3,16,64,65537,2147483646,2147483647] + rng=random.Random(0x42554e444c4557) + for a in edges: + for b in edges: + for c,d in [(a,b),(1,16),(-a if a!=-2147483648 else a,1),(2147483647,2147483646)]: + yield dict(mode='fraction',a=a,b=b,c=c,d=d) + for _ in range(8000): + def integer():return rng.choice(edges) if rng.randrange(2) else rng.randrange(-2147483648,2147483648) + yield dict(mode='fraction',a=integer(),b=integer(),c=integer(),d=integer()) + def item(count=1,maximum=None,kind=0,bees=False,nested=-1):return dict(count=count,maximum=maximum,kind=kind,bees=bees,nested=nested) + def weight(i):return dict(kind='weight',index=i) + def bind(i,m):return dict(kind='prototype',index=i,maximum=m) + def valid(count=1,maximum=1,damage=False,container=-1,bundle=-1,projectiles=-1):return dict(kind='validate',count=count,maximum=maximum,damage=damage,container=container,bundle=bundle,projectiles=projectiles) + for count in [n for n in edges if n]: + for maximum in [None,*edges]: + for bees in [False,True]: + for nested in [-1,0]: + yield dict(mode='bundle',prototypes=[64,1],bundles=[[item(count,maximum,bees=bees)],[item(1,maximum,bees=bees,nested=nested)]],ops=[valid(bundle=1),bind(0,2),weight(1),bind(0,0),weight(0),weight(1)]) + for _ in range(3000): + bundles=[] + for i in range(rng.randrange(1,7)): + bundles.append([item(rng.choice([n for n in edges if n]),rng.choice([None,*edges]),rng.randrange(2),bool(rng.randrange(2)),rng.randrange(-1,i)) for _ in range(rng.randrange(5))]) + ops=[] + for __ in range(12): + def index():return rng.randrange(-1,len(bundles)) + ops.extend([valid(rng.choice(edges),rng.choice([None,*edges]),bool(rng.randrange(2)),index(),index(),index()),bind(rng.randrange(2),rng.choice([None,*edges])),weight(rng.randrange(len(bundles)))]) + yield dict(mode='bundle',prototypes=[rng.choice([None,*edges]),rng.choice([None,*edges])],bundles=bundles,ops=ops) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-bundle-weight-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaBundleWeightOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/bundle_weight_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaBundleWeightOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','bundle_weight_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('bundle_weight_fixture.exe' if os.name=='nt' else 'bundle_weight_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} bundle weight output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual BundleContents.weight with ItemStackTemplate contents, nested bundles, bee presence, changed holder prototypes and memoized success/error results. Direct pinned Apache Fraction construction/add/multiply probes verify intermediate checked arithmetic, signs, reduction and overflow. Native ItemStack.validateStrict additionally checks container sizes, bundle sizes and weight, charged projectile sizes, empty visibility and top-level scalar constraints; follow-up weight probes expose lazy validation order. Rust typed component/schema adapters remain fixture-local; full bundle inventory operations, codecs, item-use integration and complete gameplay integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped bundle weight parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_canyon_carver_parity.py b/tools/test_canyon_carver_parity.py new file mode 100644 index 000000000..81d281a4c --- /dev/null +++ b/tools/test_canyon_carver_parity.py @@ -0,0 +1,89 @@ +#!/usr/bin/env python3 +"""Compare decoded canyon paths, height-dependent widths and random state with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base,test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(resources): + encode=lambda value:json.dumps(value,separators=(',',':')) + wrap=lambda value:((value+2**31)%2**32)-2**31 + config=next(json.loads(raw) for raw in resources.values() if json.loads(raw)['type']=='minecraft:canyon') + for context in [[-64,384,63],[0,128,32],[-2032,4064,0],[0,16,8]]: + for legacy in [False,True]: + for seed in [0,1,2,3,17,-1,-987654321,0x123456789abcdef]: + for cx,cz,dx,dz in [(0,0,0,0),(-1,2,1,-1),(107,-59,-4,3),(1875000,-1875000,0,0),(-2**31,2**31-1,0,0),(0,0,8,-8)]: + yield {'definition':encode(config),'context':context,'legacy':legacy,'seed':seed,'target':[cx,cz],'origin':[wrap(cx+dx),wrap(cz+dz)],'repeats':2,'fail':-1} + for mode in range(32): + shape={**config['shape'],'width_smoothness':[1,2,3,2**31-1][mode%4], + 'vertical_radius_center_factor':[-1,0,0.5,2][mode%4], + 'distance_factor':[-1,0,0.001,0.5,1,2,4,0.75][mode%8], + 'horizontal_radius_factor':[0,0.1,1,3][mode%4], + 'thickness':[-1,0,1,6][mode%4],'y_scale':[-1,0,1,4][mode%4]} + custom={**config,'shape':shape,'vertical_rotation':[-0.5,0,0.5,1][mode%4],'y':{'absolute':40}} + yield {'definition':encode(custom),'context':[-64,384,63],'legacy':bool(mode%2),'seed':mode*971,'target':[0,0],'origin':[0,0],'repeats':2,'fail':[-1,0,1,63][mode//8]} + bad=[None,False,0,[],{}, {'type':'missing'}, {**config,'type':':canyon'}] + for field in config: + bad.append({k:v for k,v in config.items() if k!=field}) + for value in [None,False,[],{},'0']:bad.append({**config,field:value}) + for field in config['shape']: + bad.append({**config,'shape':{k:v for k,v in config['shape'].items() if k!=field}}) + for value in [None,False,[],{},'0']:bad.append({**config,'shape':{**config['shape'],field:value}}) + for value in [-1,-0.0,0,1,2,1e100,-1e100,-1e-100]:bad.append({**config,'probability':value}) + for value in [-1,0,1,2**31-1,4294967296]:bad.append({**config,'shape':{**config['shape'],'width_smoothness':value}}) + for value in bad: + yield {'definition':encode(value),'context':[-64,384,63],'legacy':False,'seed':0,'target':[0,0],'origin':[0,0],'repeats':1,'fail':63} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-canyon-carver-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCanyonCarverOracle.java" + helper=oracle.with_name("VanillaAnchorOracle.java") + sources=[oracle,helper,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/canyon_carver_fixture.rs"] + tested_sources=base.source_hashes(sources) + resources=worldgen.registry_resources(jars['server'],'carver') + if not resources or resources!=worldgen.registry_resources(jars['client'],'carver'):raise ValueError('reference carver resources differ') + resources_path=build/'carvers.json';resources_path.write_text(json.dumps(resources,separators=(',',':')),encoding='utf-8') + fixtures=list(corpus(resources));inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + fixture_paths=[inputs,resources_path];tested_fixtures=base.source_hashes(fixture_paths);classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper],"compile-java") + run(["cargo","build","--release","-p","horizon-world","--example","canyon_carver_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("canyon_carver_fixture.exe" if os.name=="nt" else "canyon_carver_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaCanyonCarverOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} canyon-carver output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"carve_attempts":sum(f["repeats"] for f in fixtures),"bundled_canyon_definitions":1, + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual WorldCarver.DIRECT_CODEC, CanyonWorldCarver.isStartChunk and CanyonWorldCarver.carve using the independently authenticated bundled canyon definition. Compares ordered output cells including duplicates, partial output failures, resulting mask intervals and subsequent random longs across repeated invocations. Covers both outer random modes, local legacy streams, height-dependent width factors, horizontal/vertical radius variation, four generation heights, negative/distant/extreme coordinates and adjacent/far origin chunks. Custom shapes exercise width smoothness, path length, degenerate radii and failure branches; malformed selected codec fields are tested. Gaussian/weighted provider codecs, neighbor-carver seeding/biome selection, blending and complete worlds remain outside this scope. Rust bounds paths to 4096 steps, height to 4064 and total candidates to 2^24 per invocation."} + + lab.write_json(report_path,report);print(f"Scoped canyon-carver parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_carving_geometry_parity.py b/tools/test_carving_geometry_parity.py new file mode 100644 index 000000000..0ad9e6da0 --- /dev/null +++ b/tools/test_carving_geometry_parity.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python3 +"""Compare shared cave/canyon geometry and path reachability with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +import struct +import math +try: + from . import lab,test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def bits(value): + return struct.pack('>d',value).hex() + + +def corpus(): + rng=random.Random(0x484f52495a4f4e454c4c4950) + wrap=lambda value:((value+2**31)%2**32)-2**31 + for cx,cz in [(0,0),(-1,2),(1875000,-1875000),(-2**31,2**31-1),(134217727,-134217728)]: + bx,bz=wrap(cx<<4),wrap(cz<<4) + for minimum,height in [(-64,384),(0,128),(-2032,4064)]: + ellipsoids=[] + for index in range(16): + center=[bx+rng.uniform(-8,24),rng.uniform(minimum-8,minimum+height+8),bz+rng.uniform(-8,24)] + horizontal=[0.1,1,4,8,16,32,64,0][index%8] + vertical=[0.1,0.5,1,4,32,64,512,0][index%8] + ellipsoids.append({'center':list(map(bits,center)),'horizontal':bits(horizontal),'vertical':bits(vertical),'skip':index%4,'fail':[-1,0,1,63][index//4]}) + # Exact boundary and IEEE inputs, bounded by real output height. + for index,value in enumerate([0.,-0.,-1.,math.inf,-math.inf,math.nan,2**31,-2**31,1e300,5e-324]): + ellipsoids += [ + {'center':list(map(bits,[bx+8,minimum+height/2,bz+8])),'horizontal':bits(value),'vertical':bits(4),'skip':index%4,'fail':63}, + {'center':list(map(bits,[bx+8,minimum+height/2,bz+8])),'horizontal':bits(4),'vertical':bits(value),'skip':index%4,'fail':63}, + {'center':list(map(bits,[value,minimum+height/2,bz+8])),'horizontal':bits(4),'vertical':bits(4),'skip':index%4,'fail':63}] + yield {'chunk':[cx,cz],'min':minimum,'max':minimum+height-1,'ellipsoids':ellipsoids} + + +def reach_corpus(): + rng=random.Random(0x434152565245414348) + wrap=lambda value:((value+2**31)%2**32)-2**31 + fbits=lambda value:struct.pack('>f',value).hex() + for cx,cz in [(0,0),(-1,2),(1875000,-1875000),(-2**31,2**31-1)]: + bx,bz=wrap(cx<<4)+8,wrap(cz<<4)+8 + for thickness in [0,1,-18,-20,math.inf,-math.inf,math.nan,1e30,0.00001]: + for dx in [0,1,18,19,100,math.inf,-math.inf,math.nan]: + for start,end in [(0,0),(0,112),(111,112),(-2**31,2**31-1),(2**31-1,-2**31)]: + yield [cx,cz,bits(bx+dx),bits(bz+dx),start,end,fbits(thickness)] + for _ in range(1024): + yield [cx,cz,bits(bx+rng.uniform(-300,300)),bits(bz+rng.uniform(-300,300)),rng.randrange(-100,100),rng.randrange(-100,100),fbits(rng.uniform(-20,50))] + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-carving-geometry-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCarvingGeometryOracle.java" + sources=[oracle,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/carving_geometry_fixture.rs"] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus());inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + reach=list(reach_corpus());reach_path=build/'reach.txt';reach_path.write_text(''.join(json.dumps(q,separators=(',',':'))+'\n' for q in reach),encoding='utf-8') + fixture_paths=[inputs,reach_path];tested_fixtures=base.source_hashes(fixture_paths);classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") + run(["cargo","build","--release","-p","horizon-world","--example","carving_geometry_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("carving_geometry_fixture.exe" if os.name=="nt" else "carving_geometry_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaCarvingGeometryOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} carving-geometry output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"ellipsoids":sum(len(f["ellipsoids"]) for f in fixtures),"reach_queries":len(reach), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual WorldCarver.carveEllipsoid and canReach methods. Compares ordered normalized-coordinate skip queries, output cells, partial output on callback failure and resulting mask column runs; canReach includes Java float thickness arithmetic and signed step overflow. Corpus covers negative/extreme/distant chunk coordinates, output-height clipping, small/large/zero/negative radii, boundaries and IEEE NaNs/infinities/subnormals. NaN trace values are canonicalized. This validates shared geometric primitives, not randomized cave/canyon paths, codecs, provider sampling, biome carver selection or complete worlds."} + + lab.write_json(report_path,report);print(f"Scoped carving-geometry parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_carving_mask_parity.py b/tools/test_carving_mask_parity.py new file mode 100644 index 000000000..a3d4e375c --- /dev/null +++ b/tools/test_carving_mask_parity.py @@ -0,0 +1,89 @@ +#!/usr/bin/env python3 +"""Compare packed carving-mask runs, callback mutations and failure state with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng=random.Random(0x484f52495a4f4e4341525645) + carve=lambda x,y,z:{'kind':'carve','pos':[x,y,z]} + fill=lambda x0,x1,y0,y1,z0,z1:{'kind':'fill','box':[x0,x1,y0,y1,z0,z1]} + visit=lambda fail=-1,add=None:{'kind':'visit','fail':fail,'add':add or {}} + wrap=lambda value:((value+2**31)%2**32)-2**31 + for minimum,height in [(0,1),(-1,2),(-64,3),(-64,63),(0,64),(10,65),(-64,384),(-2032,4064),(-2**31,65),(2**31-65,65)]: + maximum=minimum+height-1 + # Isolated cells, duplicate insertions, packed word/column boundaries, + # Java-wrapped coordinate aliases, negative indices and positive growth. + ops=[visit(),{'kind':'read'}] + points=[[0,minimum,0],[15,maximum,15],[0,maximum,0],[0,minimum,1],[1,minimum,0]] + points += [[rng.randrange(16),minimum+rng.randrange(height),rng.randrange(16)] for _ in range(512)] + for x in [-2**31,-2**31+1,-268435456,-1,0,15,16,2**31-1]: + for y in [wrap(minimum-1),minimum,maximum,wrap(maximum+1)]: + for z in [-17,-1,0,16,17]: + index=wrap(wrap(y-minimum)+wrap(wrap(z+wrap(x<<4))*height)) + if index<0 or index<2**20:points.append([x,y,z]) + for i,(x,y,z) in enumerate(points): + ops += [carve(x,y,z)] + if i%97==0:ops += [visit()] + ops += [visit(0),visit(63),visit(),{'kind':'read'}] + yield {'min':minimum,'max':maximum,'ops':ops} + # Runs spanning all columns and word boundaries, duplicate dense writes. + yield {'min':minimum,'max':maximum,'ops':[fill(0,15,minimum,maximum,0,15),visit(),fill(0,1,minimum,maximum,0,1),{'kind':'read'}]} + if height>=3: + # Mutation behind/ahead of the cursor, extending its current run, + # joining runs, and a failing visitor retaining its added bits. + yield {'min':minimum,'max':maximum,'ops':[ + carve(0,minimum,1),carve(0,minimum+2,1),carve(2,minimum,0), + visit(-1,{'0':[[0,minimum,0],[0,minimum+1,1],[0,minimum+2,1],[1,maximum,0]],'1':[[3,maximum,15]],'2':[[4,minimum,1]]}), + visit(0,{'0':[[5,maximum,1]]}),{'kind':'read'},visit()]} + + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-carving-mask-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCarvingMaskOracle.java" + sources=[oracle,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/carving_mask_fixture.rs"] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus());inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths);classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") + run(["cargo","build","--release","-p","horizon-world","--example","carving_mask_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("carving_mask_fixture.exe" if os.name=="nt" else "carving_mask_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaCarvingMaskOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} carving-mask output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"operations":sum(len(f["ops"]) for f in fixtures), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual CarvingMask construction, carve, isEmpty and visit methods. Compares packed vertical-run traversal, splitting across columns, dense/sparse masks, duplicate writes, word boundaries, coordinate overflow and positive aliases, negative index failures, callback additions during traversal and mutations retained after visitor failures. Rust bounds height to 1..4064 and positive index growth to 2^24 bits; corpus indices remain below 2^20. This validates masks, not cave/canyon generation, mask application, aquifers, blending or complete terrain generation."} + + lab.write_json(report_path,report);print(f"Scoped carving-mask parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_cave_carver_parity.py b/tools/test_cave_carver_parity.py new file mode 100644 index 000000000..863dd15d4 --- /dev/null +++ b/tools/test_cave_carver_parity.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python3 +"""Compare decoded cave-carver paths, ordered mask writes and random state with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base,test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(resources): + encode=lambda value:json.dumps(value,separators=(',',':')) + wrap=lambda value:((value+2**31)%2**32)-2**31 + configs=[(name,json.loads(raw)) for name,raw in sorted(resources.items()) if json.loads(raw)['type']=='minecraft:cave'] + for name,config in configs: + context=[0,128,32] if 'nether' in name else [-64,384,63] + for legacy in [False,True]: + for seed in [0,1,2,3,17,-1,-987654321,0x123456789abcdef]: + for cx,cz,dx,dz in [(0,0,0,0),(-1,2,1,-1),(107,-59,-4,3),(1875000,-1875000,0,0),(-2**31,2**31-1,0,0),(0,0,8,-8)]: + yield {'definition':encode(config),'context':context,'legacy':legacy,'seed':seed,'target':[cx,cz],'origin':[wrap(cx+dx),wrap(cz+dz)],'repeats':2,'fail':-1} + for mode in range(12): + custom={**config,'count':3,'thickness':6 if mode%3==0 else 1,'weird_thickness_bias':bool(mode%2),'y':{'absolute':40},'floor_level':[-1,-0.7,0,1][mode%4]} + yield {'definition':encode(custom),'context':context,'legacy':bool(mode%2),'seed':mode*971,'target':[0,0],'origin':[0,0],'repeats':2,'fail':[-1,0,1,63][mode//3]} + base={**configs[0][1],'count':0} + bad=[None,False,0,[],{}, {'type':'missing'}, {**base,'type':':cave'}] + for field in list(base): + bad.append({k:v for k,v in base.items() if k!=field}) + for value in [None,False,[],{},'0']: + bad.append({**base,field:value}) + for field in ['probability','thickness','floor_level']: + for value in [-1,-0.0,0,1,2,1e100,-1e100,-1e-100]:bad.append({**base,field:value}) + for value in bad: + yield {'definition':encode(value),'context':[-64,384,63],'legacy':False,'seed':0,'target':[0,0],'origin':[0,0],'repeats':1,'fail':63} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-cave-carver-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCaveCarverOracle.java" + helper=oracle.with_name("VanillaAnchorOracle.java") + sources=[oracle,helper,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/cave_carver_fixture.rs"] + tested_sources=base.source_hashes(sources) + resources=worldgen.registry_resources(jars['server'],'carver') + if not resources or resources!=worldgen.registry_resources(jars['client'],'carver'):raise ValueError('reference carver resources differ') + resources_path=build/'carvers.json';resources_path.write_text(json.dumps(resources,separators=(',',':')),encoding='utf-8') + fixtures=list(corpus(resources));inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + fixture_paths=[inputs,resources_path];tested_fixtures=base.source_hashes(fixture_paths);classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper],"compile-java") + run(["cargo","build","--release","-p","horizon-world","--example","cave_carver_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("cave_carver_fixture.exe" if os.name=="nt" else "cave_carver_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaCaveCarverOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} cave-carver output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"carve_attempts":sum(f["repeats"] for f in fixtures),"bundled_cave_definitions":3, + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual WorldCarver.DIRECT_CODEC, CaveWorldCarver.isStartChunk and CaveWorldCarver.carve using all three independently authenticated bundled cave definitions. Compares ordered output cells including duplicates, partial output failures, resulting mask intervals and subsequent random longs across repeated invocations. Covers both outer random modes, local legacy tunnel streams, rooms, branching, thickness bias, floor thresholds, negative/distant/extreme target coordinates and adjacent/far origin chunks. Explicit custom distributions force path and failure branches; malformed selected codec fields are tested. Gaussian/weighted provider codecs, canyon paths, neighbor-carver seeding/biome selection, blending and complete generated worlds remain outside this scope. Rust bounds count to 4096 and total candidates to 2^24 per invocation."} + + lab.write_json(report_path,report);print(f"Scoped cave-carver parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_chorus_plant_parity.py b/tools/test_chorus_plant_parity.py new file mode 100644 index 000000000..d4c552c8e --- /dev/null +++ b/tools/test_chorus_plant_parity.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python3 +"""Compare native recursive chorus generation and connection-state refreshes.""" +import itertools +import json +import random +try: + from . import test_simple_block_parity as harness +except ImportError: + import test_simple_block_parity as harness + + +def corpus(facts, placement): + get=lambda name:facts['defaults']['minecraft:'+name] + ground=[0,63,0,get('end_stone')] + def case(**extra): + value={'definition':json.dumps({'type':'chorus_plant'}),'mode':'feature','origin':[0,64,0], + 'legacy':False,'seed':0,'world_seed':1,'fail':-1,'reject':0,'brightness':15, + 'fallback':get('air'),'states':[ground],'repeats':1} + value.update(extra);return value + for state in range(len(facts['states'])): + yield case(states=[[0,64,0,state],ground],fail=2) + yield case(states=[[0,63,0,state]],fail=2) + # Full initial connection-state evaluation before the injected write failure. + for x,y,z in [[0,65,0],[0,64,-1],[1,64,0],[0,64,1],[-1,64,0]]: + yield case(states=[ground,[x,y,z,state]],fail=8) + for legacy,seed in itertools.product([False,True],range(1024)): + yield case(legacy=legacy,seed=seed,repeats=2) + for legacy,seed,fail,reject in itertools.product([False,True],[0,1,-1],[-1,*range(80),101,127,191,255],[0,1,3]): + yield case(legacy=legacy,seed=seed,fail=fail,reject=reject,repeats=2) + rng=random.Random(0x43484f525553) + palette=[get(n) for n in ['air','cave_air','void_air','stone','end_stone','chorus_plant','chorus_flower','water']] + for legacy in [False,True]: + for _ in range(256): + entries=[ground]+[[rng.randrange(-7,8),rng.randrange(65,84),rng.randrange(-7,8),rng.choice(palette)] for _ in range(80)] + yield case(legacy=legacy,seed=rng.randrange(2**63),states=entries,reject=rng.choice([0,1,3]),fail=rng.choice([-1,19,37,100,300])) + for legacy,origin,seed in itertools.product([False,True],[[0,-64,0],[-17,319,-33],[2147483647,2147483647,-2147483648],[-2147483648,-2147483648,2147483647]],[0,1,-1]): + below=[origin[0],((origin[1]-1+2**31)%2**32)-2**31,origin[2],get('end_stone')] + yield case(legacy=legacy,origin=origin,seed=seed,states=[below]) + for legacy,seed,fail,reject in itertools.product([False,True],[0,-1],[-1,0,8,20,100],[0,1,3]): + placed={'feature':{'type':'chorus_plant'},'placement':[{'type':'count','count':2}]} + yield case(definition=json.dumps(placed),mode='placed',legacy=legacy,seed=seed,fail=fail,reject=reject) + yield case(definition=json.dumps({'type':'overlay','features':[placed,{'feature':{'type':'chorus_plant'},'placement':[]}]}),legacy=legacy,seed=seed,fail=fail,reject=reject) + yield case(definition=json.dumps({'type':'chorus_plant','ignored':False})) + + +if __name__=='__main__': + harness.run(corpus,'rust-chorus-plant-parity',__file__, + 'Native ChorusPlantFeature unit codec, origin air/support gates, ChorusFlowerBlock.generatePlant and depth-bounded recursive growth, horizontal clearance with parent exclusion, branch-distance bounds, connection refreshes in below/above/north/east/south/west read order and age-five terminal flowers. Every state exercises root/support gates and five neighbor connection prefixes. Full runs cover 1024 seeds per RNG, every early world-call failure, rejected writes, repeated mutation, random obstacles, wrapped coordinates and feature composition. Ordered reads/writes, final state maps and subsequent RNG draws are compared. Neighbor-update execution, random tick growth, drops, rendering and complete End generation remain pending.') diff --git a/tools/test_chunk_stage_parity.py b/tools/test_chunk_stage_parity.py new file mode 100644 index 000000000..6e055f631 --- /dev/null +++ b/tools/test_chunk_stage_parity.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python3 +"""Compare pre-light chunk status transitions and native ProtoChunk writes.""" +import argparse +from collections import Counter +import json +import os +from pathlib import Path +import platform +import random +import subprocess + +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(facts): + defaults=facts['defaults'];air=defaults['minecraft:air'] + stages=['empty','structure_starts','structure_references','biomes','terrain','features'] + choices=[defaults['minecraft:'+name] for name in ['air','cave_air','void_air','stone','water','lava','oak_leaves','oak_slab','seagrass','snow','powder_snow','glass','barrier']] + for stage in ['empty','terrain']: + ops=[['stage',stage]] + for state in range(len(facts['states'])): + ops.extend([['set',4,5,7,state],['get',4,5,7],['query',4,7],['set',4,5,7,air],['query',4,7]]) + yield {'chunk':[0,0],'min':0,'height':16,'ops':ops+[['dump']]} + rng=random.Random(0x484f52495a4f4e5354414745) + for minimum,height in [(-64,384),(0,16),(-16,32),(-2032,4064),(2016,16)]: + for initial_stage in stages: + ops=[['stage',initial_stage],['set',0,minimum,0,air],['query',0,0]] + for index,stage in enumerate(stages+list(reversed(stages))): + ops.extend([['stage',stage],['query',0,0]]) + for i in range(24): + x,z=rng.choice([(0,0),(15,15),(-1,16),(2147483647,-2147483648)]) + y=minimum+rng.choice([-1,0,height//2,height-1,height]) + state=rng.choice(choices) + ops.extend([['set',x,y,z,state],['get',x,y,z],['query',x,z]]) + if index%3==0:ops.append(['prime',rng.randrange(64)]) + yield {'chunk':[-3,7],'min':minimum,'height':height,'ops':ops+[['dump']]} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__) + parser.add_argument("--prepare",action="store_true") + args=parser.parse_args() + build=lab.LOCAL/"rust-chunk-stage-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + tags=worldgen.tag_resources(jars["server"]) + if not tags or tags!=worldgen.tag_resources(jars["client"]):raise ValueError("client/server block tags differ or are empty") + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkStageOracle.java" + helper=oracle.with_name("VanillaHeightmapOracle.java") + sources=[oracle,helper,Path(__file__),lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock", + lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/chunk_stage_fixture.rs"] + tested_sources=base.source_hashes(sources) + classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper],"compile-java") + def java(side,mode,path): + run(["java","-Xmx1G","-cp",os.pathsep.join([str(classes),str(jars[side]),dependency_path]),"dev.horizonlab.parity.VanillaChunkStageOracle",mode,path],side+"-"+mode) + for side in jars:java(side,"export",build/f"facts-{side}.json") + facts=json.loads((build/"facts-server.json").read_text()) + if facts!=json.loads((build/"facts-client.json").read_text()):raise ValueError("client/server state facts differ") + if len(facts["states"])!=35723:raise ValueError("incomplete pinned state table") + fixtures=list(corpus(facts));inputs=build/"inputs.txt" + inputs.write_text("".join(json.dumps(value,separators=(",",":"))+"\n" for value in fixtures),encoding="utf-8") + (build/"tags.json").write_text(json.dumps(tags,separators=(",",":")),encoding="utf-8") + fixture_paths=[inputs,build/"tags.json",build/"facts-client.json",build/"facts-server.json"] + tested_fixtures=base.source_hashes(fixture_paths) + run(["cargo","build","--release","-p","horizon-world","--example","chunk_stage_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("chunk_stage_fixture.exe" if os.name=="nt" else "chunk_stage_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + java(side,side,build) + reference=build/f"{side}.txt";matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} chunk-stage output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "block_states":len(facts["states"]),"block_tag_files":len(tags),"fixtures":len(fixtures),"operation_counts":dict(Counter(op[0] for fixture in fixtures for op in fixture["ops"])), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual ProtoChunk.setBlockState, direct section reads, heightmap presence/packed data and pre-light persisted-status assignments for empty, structure starts, structure references, biomes, terrain and features. Every pinned block state is inserted/removed under both heightmap groups. Forward/backward status assignments, untouched stale maps, missing-map priming, explicit priming, empty-section AIR writes, cave/void-air collapse, outside-height writes and wrapped X/Z coordinates are compared. Facts are independently exported from both authenticated JARs; block tags are resolved in Rust. This covers stage-dependent mutation and map selection, not the scheduler, persisted metadata, retro-generation, block entities, lighting, whole region behavior or a complete generated world."} + + lab.write_json(report_path,report);print(f"Scoped chunk-stage parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_chunk_status_parity.py b/tools/test_chunk_status_parity.py new file mode 100644 index 000000000..e2b01dbbe --- /dev/null +++ b/tools/test_chunk_status_parity.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python3 +"""Compare pinned chunk-status ordering, metadata, lookup and NBT codecs.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab, test_rust_parity as base + + +def corpus(): + names=['empty','structure_starts','structure_references','biomes','terrain','features','initialize_light','light','spawn','full'] + for name in names: + for prefix in ['',':','minecraft:','horizon:']: + yield ['string',prefix+name] + for name in ['',':','minecraft:','EMPTY','minecraft:Full','minecraft:noise','minecraft:surface','minecraft:carvers','full ', ' full', 'minecraft::full', 'minecraft/full','FULL','horizon:full','\u0000','\U0001f30d']: + yield ['string',name] + rng=random.Random(0x535441545553) + alphabet='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_:/. -\t\n' + for _ in range(2000):yield ['string',''.join(rng.choices(alphabet,k=rng.randrange(1,40)))] + for value in [-2147483648,-1,0,1,9,10,2147483647]:yield ['int',value] + yield ['list',None];yield ['compound',None] + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-chunk-status-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkStatusOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/chunk_status_fixture.rs'] + tested_sources=base.source_hashes(sources) + commands=list(corpus());inputs=build/'inputs.txt';inputs.write_text('\n'.join(json.dumps(command) for command in commands)+'\n') + tested_fixtures=base.source_hashes([inputs]);classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + dependencies=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependencies,'-d',classes,oracle],'compile-java') + run(['cargo','build','--release','-p','horizon-world','--example','chunk_status_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('chunk_status_fixture.exe' if os.name=='nt' else 'chunk_status_fixture') + run([binary,inputs,build/'rust.txt'],'rust') + references=[] + for side,jar in jars.items(): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jar),dependencies]),'dev.horizonlab.parity.VanillaChunkStatusOracle',inputs,build/(side+'.txt')],side) + matched=base.compare(build/(side+'.txt'),build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(build/(side+'.txt'),'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} chunk-status lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged([inputs],tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(), + 'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(), + 'statuses':10,'ordered_pairs':100,'codec_cases':len(commands),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references, + 'scope':'Actual pinned ChunkStatus status list, ordering and maximum for all pairs, parent identity, chunk kind, selected heightmaps, direct byName fallback and NBT codec acceptance/encoding. All registered names cover qualified, unqualified and empty-namespace forms; unknown, legacy, malformed, random and nonstring inputs are checked. Codec error text is normalized rather than compared. Rust pre-light chunk metadata uses these same status definitions; this does not execute generation steps, implement lighting, or establish full chunk lifecycle parity.'} + lab.write_json(report_path,report);print(f'Scoped chunk-status parity passed: {report_path}') + +if __name__=='__main__':main() diff --git a/tools/test_client_graphics.py b/tools/test_client_graphics.py index 5db6a130a..a23040843 100644 --- a/tools/test_client_graphics.py +++ b/tools/test_client_graphics.py @@ -111,7 +111,7 @@ def main(): 'dev.horizonlab.metrics.ClientGraphicsIntegration', fixture_mixins=['GraphicsBackendTraceMixin'], fixture_dependencies={}) version = build_pack.read_lock()['pack_version'] - mod = root / 'dist' / f'horizon-lab-{version}.jar' + mod = root / 'dist' / f'horizon-{version}.jar' original_hash = hashlib.sha256(mod.read_bytes()).hexdigest() results = [] for profile in args.profile or (['cinematic'] if args.shaders else ['core-performance', 'm2-balanced']): diff --git a/tools/test_climbing_parity.py b/tools/test_climbing_parity.py new file mode 100644 index 000000000..0d836d745 --- /dev/null +++ b/tools/test_climbing_parity.py @@ -0,0 +1,65 @@ +#!/usr/bin/env python3 +"""Compare registered climbing and trapdoor ladder behavior.""" +import itertools +import json +import os +from pathlib import Path +import platform +import random +import struct +import subprocess +import zipfile +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(info): + defaults=info['defaults'];air=defaults['minecraft:air'];ladder=defaults['minecraft:ladder'];stone=defaults['minecraft:stone'] + def op(state,**kw): + f=dict(state=state,below=ladder,position=[17,-64,-33],spectator=False,gliding=False,fail=-1,mutate_at=-1);f.update(kw);return f + def row(state,ct=0,gt=0,**kw):return dict(climb_tags=ct,glide_tags=gt,ops=[op(state,**kw),op(air)]) + for tags in range(3): + for state in range(info['states']): + for gliding in [False,True]:yield row(state,ct=tags,gt=tags,gliding=gliding) + for state in info['trapdoor_states']: + for below in [air,stone,*info['ladder_states']]:yield row(state,ct=1,gt=1,below=below) + special=[defaults['minecraft:'+n] for n in ['air','stone','ladder','scaffolding','vine','oak_trapdoor','iron_trapdoor','powder_snow']] + for ct,gt,state,spectator,gliding in itertools.product(range(3),range(3),special,[False,True],[False,True]):yield row(state,ct=ct,gt=gt,spectator=spectator,gliding=gliding) + for state in special+[s for s in info['trapdoor_states'][:64]]: + for fail in range(-1,6): + for mutate_at in range(-1,6):yield row(state,fail=fail,mutate_at=mutate_at,position=[2147483647,-2147483648,-2147483648]) + rng=random.Random(0x434c494d42) + for _ in range(4000): + yield dict(climb_tags=rng.randrange(3),glide_tags=rng.randrange(3),ops=[op(rng.randrange(info['states']),below=rng.choice(info['ladder_states']+[air,stone]),spectator=bool(rng.randrange(2)),gliding=bool(rng.randrange(2)),fail=rng.randrange(-1,6),mutate_at=rng.randrange(-1,6),position=rng.choice([[0,0,0],[17,-64,-33],[2147483647,-2147483648,-2147483648]])) for _ in range(4)]) + + +def main(): + lock,jars,libraries=base.verify_artifacts();build=lab.LOCAL/'rust-climbing-parity';build.mkdir(exist_ok=True);report_path=build/'report.json';report_path.unlink(missing_ok=True) + root=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity';oracles=[root/(n+'.java') for n in ['VanillaClimbingOracle','VanillaHeightmapOracle']] + sources=[*oracles,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/test_worldgen_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-world/examples/climbing_fixture.rs'] + for crate in ['horizon-core','horizon-world']:sources += [lab.ROOT/'crates'/crate/'Cargo.toml',*sorted((lab.ROOT/'crates'/crate/'src').rglob('*.rs'))] + tested=base.source_hashes(sources);tags=worldgen.tag_resources(jars['server']) + if tags!=worldgen.tag_resources(jars['client']):raise AssertionError('Native tags differ between artifacts') + lab.write_json(build/'tags.json',tags);classes=build/'classes';classes.mkdir(exist_ok=True);dependencies=os.pathsep.join(map(str,libraries)) + def run(command,name): + with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependencies,'-d',classes,*oracles],'compile-java') + def java(side,mode):run(['java','-Xmx768M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependencies]),'dev.horizonlab.parity.VanillaClimbingOracle',mode,build],side+'-'+mode) + java('server','export');info=json.loads((build/'info.json').read_text());count=0 + if info['states']!=35723:raise AssertionError('Incomplete pinned registry') + with (build/'inputs.txt').open('w') as output: + for f in corpus(info):output.write(json.dumps(f,separators=(',',':'))+'\n');count+=1 + fixture_paths=[build/n for n in ['inputs.txt','info.json','block-registry.nbt','tags.json']];fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--locked','--release','-p','horizon-world','--example','climbing_fixture'],'compile-rust');metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('climbing_fixture.exe' if os.name=='nt' else 'climbing_fixture');run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side);matched=base.compare(build/(side+'.txt'),build/'rust.txt');references.append(dict(side=side,jar_sha256=lab.digest(jar,'sha256'),output_sha256=lab.digest(build/(side+'.txt'),'sha256'),matched_output_lines=matched));print(f'{side}: {matched:,} climbing output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested);base.ensure_sources_unchanged(fixture_paths,fixtures) + report=dict(schema=1,minecraft=lock['minecraft']['version'],manifest_sha1=lock['minecraft']['manifest_sha1'],platform=platform.platform(),java=subprocess.check_output(['java','--version'],text=True).splitlines()[0],rustc=subprocess.check_output(['rustc','--version'],text=True).strip(),fixtures=count,registry_states=info['states'],sources_sha256=tested,fixtures_sha256=fixtures,rust_output_sha256=lab.digest(build/'rust.txt','sha256'),references=references,scope='Actual registered LivingEntity.onClimbable and trapdoorUsableAsLadder with native CLIMBABLE/CAN_GLIDE_THROUGH tags. Every registered state, natural/empty/universal tag snapshots, all trapdoor states against every ladder facing, gliding and spectator guards, captured positions, retained climb history, integer-coordinate wrapping, mutations and failures. Rust binding validates members/properties/state IDs. Entity/world queries are controlled; live movement binding, equipment-based glide eligibility and complete gameplay remain pending.') + lab.write_json(report_path,report);print(f'Scoped climbing parity passed: {report_path}',flush=True) + + +if __name__=='__main__':main() diff --git a/tools/test_collision_context_parity.py b/tools/test_collision_context_parity.py new file mode 100644 index 000000000..5841b475a --- /dev/null +++ b/tools/test_collision_context_parity.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python3 +"""Compare collision-context factories and queries with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + import math + def bits(value):return struct.pack('>d',value).hex() + epsilon=struct.unpack('>f',struct.pack('>f',1e-5))[0] + positions=[-2147483648,-64,-1,0,1,320,2147483647] + tops=[-0.5,0.0,0.5,1.0,1.5] + queries=[[y,bits(top),False] for y in positions for top in tops] + queries += [[y,bits(0.0),True] for y in positions] + heights=[] + for y in positions: + for top in tops: + threshold=(y+top)-epsilon + heights += [math.nextafter(threshold,-math.inf),threshold,math.nextafter(threshold,math.inf),y+top-1e-5,y+top] + heights += [-float.fromhex('0x1.fffffffffffffp1023'),float.fromhex('0x1.fffffffffffffp1023'),-math.inf,math.inf,math.nan,-0.0,0.0] + modes=['empty','position','player','marker','factory_player','factory_marker','placement','placement_null','with_player','with_marker','with_null'] + counts=[-2147483648,-1,0,1,64,2147483647] + for mode in modes: + for i,y in enumerate(heights): + for flags in range(4): + yield {'mode':mode,'y':bits(y),'other':bits(heights[-1-i]),'descending':bool(flags&1),'always':bool(flags&2),'item':i%5,'count':counts[(i//5)%len(counts)],'stand':bool(i%2),'fail':i%7==0,'above':queries} + for item in range(5): + for count in counts: + yield {'mode':mode,'y':bits(1.0),'other':bits(-1.0),'descending':True,'always':True,'item':item,'count':count,'stand':True,'fail':False,'above':queries} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-collision-context-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java' + helpers=[oracle.with_name('VanillaFaceSupportOracle.java')] + sources=[oracle,*helpers,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/collision_context_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,*helpers],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaCollisionContextOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','collision_context_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('collision_context_fixture.exe' if os.name=='nt' else 'collision_context_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} collision-context output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual CollisionContext factories and EntityCollisionContext/Empty/PositionCollisionContext queries on controlled player and marker snapshots. Checks entity identity, captured descending and placement flags, fluid collision flags, empty-stack AIR identity, height thresholds including f32 epsilon, null factories, callback arguments/order/failures and all five fluid type pairs. Entity lifecycle, inventory mutations after capture, experimental minecart contexts, contextual block shape dispatch and live movement integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped collision-context parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_collision_parity.py b/tools/test_collision_parity.py new file mode 100644 index 000000000..b4d2904a8 --- /dev/null +++ b/tools/test_collision_parity.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python3 +"""Validate registry-backed cached collisions against the pinned vanilla binaries.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import tempfile + +try: + from . import lab, test_rust_parity +except ImportError: + import lab + import test_rust_parity + + +def counts(output): + marker = "HORIZON_COLLISION_RESULT " + found = [json.loads(line.split(marker, 1)[1]) for line in output.splitlines() if marker in line] + if len(found) != 1: + raise AssertionError(f"Missing collision counts: {found}") + result = found[0] + if result["registry_states"] != 35723 or result["cached_states"] + result["uncached_states"] != result["registry_states"] or result["queries"] != result["cached_states"] * 6 or result["unique_shapes"] <= 0: + raise AssertionError(f"Incomplete collision coverage: {result}") + return result + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--prepare", action="store_true") + args = parser.parse_args() + directory = lab.LOCAL / "rust-collision-parity" + directory.mkdir(parents=True, exist_ok=True) + report_path = directory / "report.json" + report_path.unlink(missing_ok=True) + if args.prepare: + lab.prepare() + lock, jars, libraries = test_rust_parity.verify_artifacts() + base = Path(tempfile.mkdtemp(prefix="run-", dir=directory)) + oracle = lab.ROOT / "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionOracle.java" + sources = [oracle, Path(__file__).resolve(), lab.ROOT / "tools/test_rust_parity.py", lab.ROOT / "Cargo.toml", lab.ROOT / "Cargo.lock", lab.ROOT / "crates/horizon-core/Cargo.toml", lab.ROOT / "crates/horizon-world/Cargo.toml", *sorted((lab.ROOT / "crates/horizon-core/src").rglob("*.rs")), *sorted((lab.ROOT / "crates/horizon-world/src").rglob("*.rs")), lab.ROOT / "crates/horizon-world/examples/collision_fixture.rs"] + tested_sources = test_rust_parity.source_hashes(sources) + classes = base / "classes" + classes.mkdir() + dependency_path = os.pathsep.join(map(str, libraries)) + test_rust_parity.run(["javac", "--release", "25", "-proc:none", "-cp", os.pathsep.join([str(jars["server"]), dependency_path]), "-d", str(classes), str(oracle)]) + def java(side, mode): + result = subprocess.run(["java", "-Xmx1G", "-cp", os.pathsep.join([str(classes), str(jars[side]), dependency_path]), "dev.horizonlab.parity.VanillaCollisionOracle", mode, str(base)], cwd=lab.ROOT, capture_output=True, text=True, timeout=300) + (base / f"{side}-{mode}.log").write_text(result.stdout + result.stderr, encoding="utf-8") + result.check_returncode() + return result.stdout + expected = counts(java("server", "generate")) + test_rust_parity.run(["cargo", "build", "--release", "-p", "horizon-world", "--example", "collision_fixture"]) + metadata = json.loads(subprocess.check_output(["cargo", "metadata", "--no-deps", "--format-version", "1"], cwd=lab.ROOT, text=True)) + binary = Path(metadata["target_directory"]) / "release/examples" / ("collision_fixture.exe" if os.name == "nt" else "collision_fixture") + actual = counts(subprocess.check_output([str(binary), str(base)], cwd=lab.ROOT, text=True)) + if actual != expected: + raise AssertionError(f"Collision coverage differs: vanilla={expected}, Rust={actual}") + canonical = {"empty_states":0,"block_states":0,"other_cached_states":0} + for line in (base / "rust.txt").read_text().splitlines(): + if line == 'canonical true false': canonical['empty_states'] += 1 + elif line == 'canonical false true': canonical['block_states'] += 1 + elif line == 'canonical false false': canonical['other_cached_states'] += 1 + if sum(canonical.values()) != expected['cached_states']: raise AssertionError('incomplete canonical identity comparison') + references = [] + for side, jar in jars.items(): + java(side, side) + reference = base / f"vanilla-{side}.txt" + matched = test_rust_parity.compare(reference, base / "rust.txt") + references.append({"side": side, "jar_sha256": lab.digest(jar, "sha256"), "output_sha256": lab.digest(reference, "sha256"), "matched_output_lines": matched, **expected}) + print(f"{side}: {matched:,} cached collision output lines match", flush=True) + test_rust_parity.ensure_sources_unchanged(sources, tested_sources) + report = {"schema": 1, "minecraft": lock["minecraft"]["version"], "manifest_sha1": lock["minecraft"]["manifest_sha1"], "platform": platform.platform(), + "java": subprocess.check_output(["java", "--version"], text=True).splitlines()[0], "rustc": subprocess.check_output(["rustc", "--version"], text=True).strip(), + "inputs_sha256": lab.digest(base / "inputs.txt", "sha256"), "rust_output_sha256": lab.digest(base / "rust.txt", "sha256"), "sources_sha256": tested_sources, "references": references, "canonical_identities":canonical, + "scope": "Pinned no-context cached collision branch only. Registry identity validation, resident section lookup, grids, native canonical empty/block identities distinct from equal geometry, discrete extrema including empty shapes, greedy boxes, bounds, translated collide, ray hits, closest points and moved cell lookup. Uncached and entity-context behavior have separate comparison suites."} + lab.write_json(report_path, report) + lab.write_json(base / "report.json", report) + print(f"Cached collision comparison passed: {report_path}") + + +if __name__ == "__main__": + main() diff --git a/tools/test_combat_rules_parity.py b/tools/test_combat_rules_parity.py new file mode 100644 index 000000000..b60838a3b --- /dev/null +++ b/tools/test_combat_rules_parity.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +"""Compare native armor, toughness and magic protection arithmetic with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>f',v).hex() + def row(damage,armor,toughness,**kw): + f=dict(mode='armor',damage=bits(damage),armor=bits(armor),toughness=bits(toughness),weapon=False,server=False,after_weapon=True,after_server=True,empty=True,fail=-1,mutate_at=-1);f.update(kw);return f + values=[-float('inf'),-1e30,-25,-20,-8,-1,-0.,0.,1e-40,.1,1,2,4,8,20,25,40,1e30,float('inf'),float('nan')] + for damage in values: + for armor in values: + yield row(damage,armor,0,mode='magic') + for toughness in values: + for weapon,server,empty in [(False,False,True),(True,False,True),(True,True,True),(True,True,False)]:yield row(damage,armor,toughness,weapon=weapon,server=server,empty=empty) + for weapon in [False,True]: + for server in [False,True]: + for after_weapon in [False,True]: + for after_server in [False,True]: + for fail in range(-1,3): + for mutation in range(-1,3):yield row(17,20,8,weapon=weapon,server=server,after_weapon=after_weapon,after_server=after_server,fail=fail,mutate_at=mutation) + rng=random.Random(0x41524d4f52) + for _ in range(8000): + f=row(0,0,0,weapon=bool(rng.randrange(2)),server=bool(rng.randrange(2)),empty=bool(rng.randrange(2)),mode=rng.choice(['armor','magic'])) + for key in ['damage','armor','toughness']:f[key]=f'{rng.getrandbits(32):08x}' + yield f + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-combat-rules-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCombatRulesOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/combat_rules_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaCombatRulesOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','combat_rules_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('combat_rules_fixture.exe' if os.name=='nt' else 'combat_rules_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} combat rules output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual CombatRules armor/toughness and magic protection arithmetic; null/empty/unenchanted weapons, nonserver/server branches, native no-enchantment helper with explicitly empty stack components, query order/mutations/failures, nonfinite/signed-zero and random float bit patterns. The armor-effectiveness enchantment hook is exposed but enchanted components, damage tags/equipment and the full damage pipeline remain pending.'} + lab.write_json(report_path,report);print(f'Scoped combat rules parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_component_durability_parity.py b/tools/test_component_durability_parity.py new file mode 100644 index 000000000..f37b501a9 --- /dev/null +++ b/tools/test_component_durability_parity.py @@ -0,0 +1,87 @@ +#!/usr/bin/env python3 +"""Compare durability algorithms bound to actual prototype/patch storage.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def base_corpus(): + modes = ['hurt', 'without', 'set', 'query', 'grow', 'shrink'] + edges = [-2147483648, -2147483647, -1, 0, 1, 2, 19, 20, 21, 16777215, 16777216, 16777217, 2147483646, 2147483647] + def state(count=1, maximum=20, damage=0, unbreakable=False): + return dict(count=count, max=maximum, damage=damage, unbreakable=unbreakable) + def row(mode='hurt', amount=1, **kw): + f = dict(mode=mode, amount=amount, air=False, player=True, infinite=False, after_infinite=False, initial=state(), after=state(count=2, maximum=5, damage=4), fail=-1, mutate_at=-1) + f.update(kw) + return f + for mode in modes: + for maximum in [None, *edges]: + for damage in [None, *edges]: + for amount in edges: + yield row(mode, amount, initial=state(maximum=maximum, damage=damage)) + for mode in ['hurt', 'without']: + for mutate in range(-1, 5): + for fail in range(-1, 5): + for count in [-1, 0, 1, 2]: + for maximum in [None, 0, 5, 20]: + yield row(mode, 20, mutate_at=mutate, fail=fail, after=state(count=count, maximum=maximum, damage=4)) + rng = random.Random(0x4455524142494c) + def integer(): return rng.choice(edges) if rng.randrange(2) else rng.randrange(-2147483648, 2147483648) + def random_state(): return state(rng.choice([-2, 0, 1, 2, 64, 2147483647]), rng.choice([None, integer()]), rng.choice([None, integer()]), bool(rng.randrange(2))) + for _ in range(10000): + yield row(rng.choice(modes), integer(), air=bool(rng.randrange(5)==0), player=bool(rng.randrange(2)), infinite=bool(rng.randrange(2)), after_infinite=bool(rng.randrange(2)), initial=random_state(), after=random_state(), fail=rng.choice([-1, -1, *range(5)]), mutate_at=rng.randrange(-1, 5)) + + +def corpus(): + prototypes=[dict(max=None,damage=None,unbreakable=False),dict(max=20,damage=0,unbreakable=False),dict(max=20,damage=0,unbreakable=True),dict(max=None,damage=5,unbreakable=False),dict(max=-2147483648,damage=-1,unbreakable=False)] + for i,row in enumerate(base_corpus()): + yield row | dict(prototype=prototypes[i%len(prototypes)]) + for prototype in prototypes: + for amount in [-2147483648,-1,0,1,20,2147483647]: + for mode in ['hurt','without','set']: + yield dict(mode=mode,amount=amount,air=False,player=True,infinite=False,after_infinite=False,prototype=prototype,initial=dict(count=1,max=20,damage=0,unbreakable=False),after=dict(count=2,max=5,damage=4,unbreakable=False),fail=-1,mutate_at=-1,restore=[[1,None],[0,20]]) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-component-durability-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaComponentDurabilityOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/component_durability_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaComponentDurabilityOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','component_durability_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('component_durability_fixture.exe' if os.name=='nt' else 'component_durability_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} component durability output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual unenchanted ItemStack durability operations with nonempty prototypes, visible component patches at callbacks, stack copies before/after original mutation and unsanitized restored removals. Rust durability algorithms operate directly on copy-on-write component storage through DurabilityStorage. Includes creative/stat callback ordering, clamped writes, shrink/break state, empty stacks and storage mutation-before-error. Full item-component storage/codecs, enchantments, equipment lifecycle and complete gameplay integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped component durability parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_component_patch_parity.py b/tools/test_component_patch_parity.py new file mode 100644 index 000000000..5e7572369 --- /dev/null +++ b/tools/test_component_patch_parity.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +"""Compare native component patch storage, ordered mutations and shared copies.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def op(kind,a=0,b=0,**kw):return dict(kind=kind,a=a,b=b,**kw) + values=[-2147483648,-1,0,1,2147483647,'00000000','80000000','7fc00000','7fa12345','ff800000','3f800000'] + for initial in values: + for first in [None,*values]: + for second in [None,*values]: + yield dict(prototype=[[0,initial]],ops=[op('set',key=0,value=first),op('copy',b=1),op('save',b=0),op('set',key=0,value=second),op('remove',key=0),op('restore',a=2,b=0),op('set',a=2,key=0,value=second)]) + yield dict(prototype=[],ops=[op('build',entries=[[0,None],[1,2],[0,None]]),op('restore'),op('set',key=0,value=1),op('clear'),op('from'),op('set',key=0,value=1)]) + rng=random.Random(0x434f4d504f4e454e) + def val():return rng.choice(values) if rng.randrange(2) else (rng.randrange(-2147483648,2147483648) if rng.randrange(2) else f'{rng.getrandbits(32):08x}') + for _ in range(3000): + prototype=[[k,val()] for k in rng.sample(range(16),rng.randrange(8))] + ops=[] + for __ in range(rng.randrange(10,31)): + kind=rng.choice(['set','set','remove','copy','save','apply','restore','clear','build','from']);a=rng.randrange(3);b=rng.randrange(3) + if kind=='set':v=op(kind,a,b,key=rng.randrange(16),value=rng.choice([None,val()])) + elif kind=='remove':v=op(kind,a,b,key=rng.randrange(16)) + elif kind=='build':v=op(kind,a,b,entries=[[rng.randrange(16),rng.choice([None,val()])] for ___ in range(rng.randrange(20))]) + else:v=op(kind,a,b) + ops.append(v) + yield dict(prototype=prototype,ops=ops) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-component-patch-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaComponentPatchOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/component_patch_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaComponentPatchOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','component_patch_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('component_patch_fixture.exe' if os.name=='nt' else 'component_patch_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} component patch output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual PatchedDataComponentMap reads, set/remove return values, ordered patch iteration/key sets, apply versus unsanitized restore, fromPatch sanitation, saved patches and independent map copies. Immutable prototypes have at most seven keys so native builder order is defined without identity-hash tables. Integer and boxed-float values cover NaN/signed zero; generic Rust callers must supply native value equality and prototype order. Includes mutation-before-error for removal markers without prototype defaults. Component codecs, prototype hash-table construction, object identity hashes, mutable payload aliases and full item/inventory integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped component patch parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_consumable_emission_parity.py b/tools/test_consumable_emission_parity.py new file mode 100644 index 000000000..6150e8892 --- /dev/null +++ b/tools/test_consumable_emission_parity.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 +"""Compare consumable timing, sound selection and concrete eating particles.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + floats=[0,0x80000000,1,0x3d000000,0x3d4ccccd,0x3f000000,0x3f800000,0x3fcccccd,0xbf800000,0x42b40000,0xc2b40000,0x7f7fffff,0x7f800000,0xff800000,0x7fc00000] + seeds=[0,1,-1,-9223372036854775808,9223372036854775807,123456789] + def config(**kw): + v=dict(position=[1.25,64.5,-2.75],pitch=0,yaw=0,eye=0x3fcf5c29,count=3,damage=7,random=0,level=0,sound=0,reseed=False,seeds=[99,101]);v.update(kw);return v + def row(**kw): + v=dict(initial=config(),after=config(position=[-3.5,71.25,9.5],pitch=0x42b40000,yaw=0xc2b40000,count=1,damage=99,random=1,level=1,sound=1,reseed=True),seeds=[0,1],item=2,xor=False,particles=3,fail=-1,mutate=-1,animation=1,seconds=0x3fcccccd,remaining=24,sound=0,has_particles=True,emit_random=0,override=True);v.update(kw);return v + for xor in [False,True]: + for seed in seeds: + for animation in [1,2]: + for fail in range(-1,12): + for mutate in range(-1,12):yield row(xor=xor,seeds=[seed,~seed],animation=animation,fail=fail,mutate=mutate) + for animation in range(12): + for override in [False,True]: + for particles in [False,True]: + for emit_random in [0,1]:yield row(animation=animation,override=override,has_particles=particles,emit_random=emit_random) + for seconds in floats: + for remaining in [-2147483648,-2147483647,-33,-32,-1,0,1,4,7,8,20,24,25,28,32,2147483647]:yield row(seconds=seconds,remaining=remaining,has_particles=False) + rng=random.Random(0x434f4e53554d45) + def random_config():return config(position=[rng.choice([-0.0,0.0,1.25,-15.5,29999999.5]) for _ in range(3)],pitch=rng.choice(floats),yaw=rng.choice(floats),eye=rng.choice(floats),count=rng.choice([-1,0,1,16,2147483647]),damage=rng.choice([None,-1,0,99,2147483647]),random=rng.randrange(2),level=rng.randrange(2),sound=rng.randrange(2),reseed=bool(rng.randrange(2)),seeds=[rng.randrange(-2**63,2**63) for _ in range(2)]) + for _ in range(2400):yield row(initial=random_config(),after=random_config(),seeds=[rng.randrange(-2**63,2**63) for _ in range(2)],item=rng.randrange(3),xor=bool(rng.randrange(2)),particles=rng.choice([-1,0,1,3,5,16]),fail=rng.randrange(-1,35),mutate=rng.randrange(-1,35),animation=rng.randrange(12),seconds=rng.randrange(2**32),remaining=rng.randrange(-2**31,2**31),sound=rng.randrange(2),has_particles=bool(rng.randrange(2)),emit_random=rng.randrange(2),override=bool(rng.randrange(2))) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-consumable-emission-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaConsumableEmissionOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/consumable_emission_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaConsumableEmissionOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','consumable_emission_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('consumable_emission_fixture.exe' if os.name=='nt' else 'consumable_emission_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} consumable emission output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Consumable timing and emitParticlesAndSounds composed with inherited LivingEntity.spawnItemParticles, real templates and both native RNGs. Compares all animations, unconditional random draws, supplied versus direct random sources, sound overrides after particle callbacks, retained sound parameters, float timing edges and mutation/failure prefixes. Audio playback, rendering, consumable completion/effects and full gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped consumable emission parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_consumable_parity.py b/tools/test_consumable_parity.py new file mode 100644 index 000000000..55ff75e2b --- /dev/null +++ b/tools/test_consumable_parity.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 +"""Compare consumable start/completion with food listeners and particles.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + floats=[0,0x80000000,1,0x3d000000,0x3d4ccccd,0x3f000000,0x3f800000,0x3fcccccd,0xbf800000,0x42b40000,0xc2b40000,0x7f7fffff,0x7f800000,0xff800000,0x7fc00000] + def food(**kw): + v=dict(nutrition=4,saturation=0x40a00000,always=False);v.update(kw);return v + def config(**kw): + v=dict(position=[1.25,64.5,-2.75],pitch=0,yaw=0,eye=0x3fcf5c29,count=3,damage=7,random=0,virtual_random=0,level=0,sound=0,reseed=False,seeds=[99,101],food_component=food(),food=10,saturation=0x40a00000,can_eat=True,client=False,infinite=False,effect_result=False);v.update(kw);return v + def row(**kw): + v=dict(initial=config(),after=config(position=[-3.5,71.25,9.5],pitch=0x42b40000,yaw=0xc2b40000,count=1,damage=99,random=1,virtual_random=1,level=1,sound=1,reseed=True,food_component=food(nutrition=20,always=True),food=4,saturation=0x80000000,can_eat=False,client=True,infinite=True,effect_result=True),seeds=[0,1],item=2,xor=False,fail=-1,mutate=-1,animation=1,seconds=0,remaining=24,sound=0,has_particles=False,emit_random=0,override=False,actor=2,effects=3,op=2,hand=0,passed_level=0);v.update(kw);return v + for xor in [False,True]: + for actor in range(3): + for op in [1,2]: + for fail in range(-1,15): + for mutate in range(-1,15):yield row(xor=xor,actor=actor,op=op,fail=fail,mutate=mutate) + for actor in range(3): + for item in range(3): + for count in [-1,0,1,2,2147483647]: + for component in [None,food(),food(always=True)]: + for can_eat in [False,True]: + for seconds in [0,0x3fcccccd]:yield row(actor=actor,item=item,initial=config(count=count,food_component=component,can_eat=can_eat),seconds=seconds,op=1) + for seconds in floats: + for op in range(3):yield row(seconds=seconds,op=op) + for actor in range(3): + for animation in [1,2]: + for mutate in [-1,0,1,5,90,112,114,116,119,122,125]:yield row(actor=actor,animation=animation,mutate=mutate,has_particles=True) + rng=random.Random(0x434f4e53554d4544) + def random_config():return config(position=[rng.choice([-0.0,0.0,1.25,-15.5,29999999.5]) for _ in range(3)],pitch=rng.choice(floats),yaw=rng.choice(floats),eye=rng.choice(floats),count=rng.choice([-1,0,1,16,2147483647]),damage=rng.choice([None,-1,0,99,2147483647]),random=rng.randrange(2),virtual_random=rng.randrange(2),level=rng.randrange(2),reseed=bool(rng.randrange(2)),seeds=[rng.randrange(-2**63,2**63) for _ in range(2)],food_component=rng.choice([None,food(nutrition=rng.choice([-2147483648,-1,0,1,20,2147483647]),saturation=rng.choice(floats),always=bool(rng.randrange(2)))]),food=rng.choice([-1,0,1,19,20,2147483647]),saturation=rng.choice(floats),can_eat=bool(rng.randrange(2)),client=bool(rng.randrange(2)),infinite=bool(rng.randrange(2)),effect_result=bool(rng.randrange(2))) + for _ in range(2400):yield row(initial=random_config(),after=random_config(),seeds=[rng.randrange(-2**63,2**63) for _ in range(2)],item=rng.randrange(3),xor=bool(rng.randrange(2)),fail=rng.choice([-1,-1,rng.randrange(128)]),mutate=rng.choice([-1,-1,rng.randrange(128)]),animation=rng.randrange(12),seconds=rng.choice(floats),sound=rng.randrange(2),has_particles=bool(rng.randrange(2)),actor=rng.randrange(3),effects=rng.randrange(4),op=rng.randrange(3),hand=rng.randrange(2),passed_level=rng.randrange(2)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-consumable-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaConsumableOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/consumable_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaConsumableOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','consumable_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('consumable_fixture.exe' if os.name=='nt' else 'consumable_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} consumable output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Consumable.canConsume/startConsuming/onConsume composed with inherited eating particles, real FoodProperties/FoodData, stack components and both native RNGs. Covers player/non-player/server-player branches, stat item selection, empty advancement trigger storage, food listener dispatch, client/server effect guards, event and finite/infinite stack consumption, captured component values and callback mutation/failure prefixes. Food eligibility/start-use, stats, effect bodies and event delivery are controlled services; only the ordinary food listener schema is bound here. Full advancement evaluation, potion effects, lifecycle integration and playable gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped consumable parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_consume_effect_parity.py b/tools/test_consume_effect_parity.py new file mode 100644 index 000000000..f819e2718 --- /dev/null +++ b/tools/test_consume_effect_parity.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 +"""Compare concrete consume effects and native status instance copies.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + floats=[0,0x80000000,1,0x3f000000,0x3f800000,0xbf800000,0x40000000,0x7f800000,0xff800000,0x7fc00000] + def instance(**kw): + v=dict(duration=20,amplifier=1,ambient=False,visible=True,icon=True,factor=0x3f800000,previous=0x3f000000);v.update(kw);return v + def config(**kw): + v=dict(instances=[instance(),instance(duration=-1),instance(amplifier=2)],position=[1,64,-3],category=6,random=0,seeds=[123,456],reseed=False,returns=[False,True,False]);v.update(kw);return v + def op(kind,**kw): + v=dict(kind=kind,list=[0,1,0,2],probability=0x3f800000,level=0,sound=0);v.update(kw);return v + def row(**kw): + v=dict(initial=config(),after=config(instances=[instance(duration=7,amplifier=999),instance(duration=2147483647,amplifier=-999),instance(duration=0,amplifier=0)],position=[-100,300,200],category=7,random=1,reseed=True,returns=[True,False,True]),seeds=[0,1],xor=False,fail=-1,mutate=-1,ops=[op(0)]);v.update(kw);return v + for xor in [False,True]: + for kind in range(4): + for fail in range(-1,7): + for mutate in range(-1,7):yield row(xor=xor,ops=[op(kind)],fail=fail,mutate=mutate) + for probability in floats: + for indices in [[],[0],[1,1],[2,1,0,2]]: + for seed in [0,1,-1,-9223372036854775808,9223372036854775807]:yield row(ops=[op(0,probability=probability,list=indices)],seeds=[seed,~seed]) + rng=random.Random(0x434f4e53454646) + def random_instance():return instance(duration=rng.choice([-2147483648,-2,-1,0,1,20,2147483647]),amplifier=rng.choice([-2147483648,-1,0,1,255,256,2147483647]),ambient=bool(rng.randrange(2)),visible=bool(rng.randrange(2)),icon=bool(rng.randrange(2)),factor=rng.choice(floats),previous=rng.choice(floats)) + def random_config():return config(instances=[random_instance() for _ in range(3)],position=[rng.choice([-2147483648,-1,0,1,2147483647]) for _ in range(3)],category=rng.randrange(10),random=rng.randrange(2),seeds=[rng.randrange(-2**63,2**63) for _ in range(2)],reseed=bool(rng.randrange(2)),returns=[bool(rng.randrange(2)) for _ in range(5)]) + for _ in range(1800):yield row(initial=random_config(),after=random_config(),seeds=[rng.randrange(-2**63,2**63) for _ in range(2)],xor=bool(rng.randrange(2)),fail=rng.randrange(-1,30),mutate=rng.randrange(-1,30),ops=[op(rng.randrange(4),list=[rng.randrange(3) for _ in range(rng.randrange(6))],probability=rng.choice(floats),level=rng.randrange(2),sound=rng.randrange(2)) for _ in range(5)]) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-consume-effect-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaConsumeEffectOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/consume_effect_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaConsumeEffectOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','consume_effect_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('consume_effect_fixture.exe' if os.name=='nt' else 'consume_effect_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} consume_effect output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual ApplyStatusEffects, RemoveStatusEffects, ClearAllStatusEffects and PlaySound consume effects. Uses real native effect instances and RNGs; compares probability edges, unconditional probability draws, fresh copy identity/details/hidden/blend state, ordered non-short-circuit add/remove calls, repeated holders, captured block positions, sound arguments and mutation/failure prefixes. Actor add/remove/clear storage and sound delivery remain controlled; named holder-set binding, teleport consumption and full gameplay integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped consume_effect parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_contextual_collision_parity.py b/tools/test_contextual_collision_parity.py new file mode 100644 index 000000000..60a1ad7f8 --- /dev/null +++ b/tools/test_contextual_collision_parity.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python3 +"""Compare integrated contextual block collision selection with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(value):return struct.pack('>d',value).hex() + modes=['empty','position','player','marker','falling','placement','placement_null','with_player','with_marker','with_falling','with_null'] + positions=[[0,0,0],[17,-64,-33],[2147483647,2147483647,-2147483648]] + for state in range(35723): + for i,mode in enumerate(modes): + for always in [False,True]: + p=positions[(state+i)%len(positions)] + y=p[1]+[0.5,1.0,1.5][(state+i)%3] + yield {'mode':mode,'y':bits(y),'other':bits(y),'descending':bool(i%2),'always':always,'item':2,'count':1,'stand':True,'fail':False,'registry':[state,*p]} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-contextual-collision-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java' + helpers=[oracle.with_name(name+'.java') for name in ['VanillaFaceSupportOracle','VanillaCollisionOracle','VanillaContextualCollisionAudit']] + runner=lab.ROOT/'tools/test_collision_context_parity.py' + sources=[oracle,*helpers,runner,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/collision_context_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,*helpers],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaCollisionContextOracle',mode,path],side+'-'+mode) + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars['server']),dependency_path]),'dev.horizonlab.parity.VanillaCollisionOracle','generate',build],'export') + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'block-registry.nbt',build/'cached-collision.nbt'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','collision_context_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('collision_context_fixture.exe' if os.name=='nt' else 'collision_context_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jar),dependency_path]),'dev.horizonlab.parity.VanillaContextualCollisionAudit',side,build],side+'-audit') + audited=base.compare(build/(side+'-audit.txt'),build/'rust-audit.txt') + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched,'audited_states':audited,'audit_sha256':lab.digest(build/(side+'-audit.txt'),'sha256')}) + print(f'{side}: {matched:,} contextual-collision output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'block_states':35723,'independent_cached_states':35492,'context_sensitive_cached_states':32,'uncached_states':199,'audit_positions_per_cached_state':7,'audit_context_types':2,'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Integrated contextual dispatcher across every pinned block state, eleven context variants and both always-fluid flag inputs. The native audit verifies 35,492 cached states return the identical cached shape without world/context queries at seven positions with interface and entity context providers that reject queries; liquid states query context instead. Integrated outputs compare cache-relative shape equality or full uncached geometry and ordered entity/world callbacks. Missing block entities are used here; active shulker/piston states retain separate coverage. Experimental minecart contexts, entity lifecycle and live movement remain pending.'} + lab.write_json(report_path,report);print(f'Scoped contextual collision parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_cuboid_model_parity.py b/tools/test_cuboid_model_parity.py new file mode 100644 index 000000000..8d34eef60 --- /dev/null +++ b/tools/test_cuboid_model_parity.py @@ -0,0 +1,168 @@ +#!/usr/bin/env python3 +"""Compare cuboid decoding with the actual pinned client parser (client-only API).""" +import argparse +import copy +import json +import os +from pathlib import Path +import platform +import random +import subprocess +import zipfile + +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab, test_rust_parity as base + + +def corpus(): + element = {'from': [0, 0, 0], 'to': [16, 16, 16], 'faces': {'north': {'texture': '#all'}}} + values = [None, False, True, 0, 1, -1, 15, 16, 90, 90.9, -90, 360, 450, 1e30, + '', 'true', 'TRUE', 'false', 'north', 'NORTH', 'x', '#all', [], {}, [0, 0, 0]] + for raw in ['null', '{}', '[]', 'false', '0', '"model"', '{"elements":[]}', + '{"elements":[null]}', '{"elements":null}', '{"parent":"","textures":{}}', + '{} trailing', '{} {}', '\ufeff{}', '', ' ', '{"unknown":NaN}', + '{"unknown":Infinity}', '{"unknown":01}', '{"unknown":true,}', '{/*comment*/}', + '{"unknown":"unescaped\nnewline"}', '{unquoted:0}']: + yield raw + for field in ['parent', 'ambientocclusion', 'gui_light', 'textures', 'display', 'elements']: + for value in values: + yield json.dumps({field: value}) + for name in ['block/cube_all', ':block/cube_all', 'horizon:test', ':', 'minecraft:', + 'a:b:c', 'Minecraft:cube', 'a:b c', '../cube', 'é', 'a:/', 'a:.']: + yield json.dumps({'parent': name}) + yield json.dumps({'textures': {'all': name}}) + for value in values + ['#', '##all', 'block/stone', ':block/stone', + {'sprite': 'block/glass'}, {'sprite': ''}, {'sprite': None}]: + yield json.dumps({'textures': {'all': value}}) + for value in values: + yield json.dumps({'textures': {'all': {'sprite': 'block/glass', 'force_translucent': value}}}) + for field in ['from', 'to', 'rotation', 'faces', 'shade_direction_override', 'light_emission', 'shade']: + for value in values: + modified = copy.deepcopy(element); modified[field] = value + yield json.dumps({'elements': [modified]}) + for field in ['cullface', 'texture', 'tintindex', 'uv', 'rotation']: + for value in values: + modified = copy.deepcopy(element); modified['faces']['north'][field] = value + yield json.dumps({'elements': [modified]}) + for direction in ['down', 'up', 'north', 'south', 'west', 'east', 'NORTH', 'north ', '']: + for value in [None, {'texture': '#all'}, {}]: + modified = copy.deepcopy(element); modified['faces'] = {direction: value} + yield json.dumps({'elements': [modified]}) + for rotation in [{'origin': [8, 8, 8]}, {'origin': [8, 8, 8], 'x': 30}, + {'origin': [8, 8, 8], 'y': 20, 'z': 10}, + {'origin': [-32, 0, 64], 'axis': 'X', 'angle': 63, 'x': None}, + {'origin': [0, 0, 0], 'angle': 45, 'x': 0}, + {'origin': [0, 0, 0], 'axis': 'y', 'x': 0}]: + modified = copy.deepcopy(element); modified['rotation'] = rotation + yield json.dumps({'elements': [modified]}) + for key in ['origin', 'axis', 'angle', 'rescale', 'x', 'y', 'z']: + for value in values: + rotation = {'origin': [8, 8, 8], 'axis': 'y', 'angle': 22.5} if key in ['axis', 'angle'] else {'origin': [8, 8, 8], 'x': 45} + rotation[key] = value + modified = copy.deepcopy(element); modified['rotation'] = rotation + yield json.dumps({'elements': [modified]}) + for context in ['thirdperson_lefthand', 'thirdperson_righthand', 'firstperson_lefthand', + 'firstperson_righthand', 'head', 'gui', 'ground', 'fixed', 'on_shelf', 'unknown']: + for value in values + [{'rotation': [1, 2, 3], 'translation': [-81, -0.0, 81], 'scale': [-5, 0, 5]}]: + yield json.dumps({'display': {context: value}}) + for left in ['thirdperson_lefthand', 'firstperson_lefthand']: + right = left.replace('lefthand', 'righthand') + for value in [None, {}, {'scale': [1, 2, 3]}]: + yield json.dumps({'display': {left: value, right: {'rotation': [1, 2, 3]}}}) + yield json.dumps({'display': {right: {'rotation': [1, 2, 3]}}}) + # Raw tokens retain decimal spelling, integer wraparound and direct f32 rounding. + numbers = ['-0.0', '1e02', '90.999', '-90.999', '4294967296', '4294967297', + '9223372036854775809', '-9223372036854775809', '1e100', '1e-100', + '1e2147483647', '1e2147483648', '1e-2147483648', + '1.00000005960464477539062500000001', '1e-46', '-1e-46', '3.5e38', + '1e9999', '1e10000', '1e-9999', '1e-10000', '1.0e10000', '1.0e10001', + '1' * 1023, '1' * 1024, '1' * 10000, '1' * 10001, + *('1' + '0' * (n - 2) + '1' for n in [20, 64, 65, 66, 100, 1023, 1024]), + '1844674407370955161601', '-1844674407370955161601', + '18446744073709551616.1', '18446744073709551616e-18'] + for number in numbers: + for field in ['tintindex', 'rotation', 'texture']: + yield '{"elements":[{"from":[0,0,0],"to":[16,16,16],"faces":{"up":{"texture":"#all","' + field + '":' + number + '}}}]}' + yield '{"display":{"gui":{"rotation":[' + number + ',0,0],"translation":[' + number + ',0,0],"scale":[' + number + ',0,0]}}}' + # Strict stream parsing rejects scanner failures even in ignored fields; + # quoted copies remain ordinary strings. + for number in numbers: + yield '{"unknown":' + number + '}' + yield '{"unknown":"' + number + '"}' + rng = random.Random(0x4355424f4944) + for _ in range(1200): + modified = copy.deepcopy(element) + modified['from'] = [rng.uniform(-17, 33) for _ in range(3)] + modified['to'] = [rng.uniform(-17, 33) for _ in range(3)] + modified['rotation'] = {'origin': [rng.uniform(-100, 100) for _ in range(3)], 'rescale': rng.choice([False, True])} + if rng.randrange(2): + modified['rotation'].update(axis=rng.choice(['x', 'y', 'z']), angle=rng.uniform(-720, 720)) + else: + modified['rotation'].update(zip(['x', 'y', 'z'], [rng.uniform(-720, 720) for _ in range(3)])) + modified['faces'] = {rng.choice(['down', 'up', 'north', 'south', 'west', 'east']): { + 'texture': '#all', 'rotation': 90 * rng.randrange(-12, 13), 'tintindex': rng.randrange(-4, 5), + 'uv': [rng.uniform(-32, 32) for _ in range(4)]}} + modified['light_emission'] = rng.randrange(16) + yield json.dumps({'elements': [modified]}) + + +def canonicalize(path): + rows = [json.loads(line) for line in path.read_text().splitlines()] + path.write_text(''.join(json.dumps(row, sort_keys=True, separators=(',', ':')) + '\n' for row in rows)) + return sum('error' in row for row in rows) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--prepare', action='store_true') + args = parser.parse_args() + if args.prepare: + lab.prepare() + lock, jars, libraries = base.verify_artifacts() + build = lab.LOCAL / 'rust-cuboid-model-parity'; build.mkdir(parents=True, exist_ok=True) + report_path = build / 'report.json'; report_path.unlink(missing_ok=True) + oracle = lab.ROOT / 'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCuboidModelOracle.java' + crate = lab.ROOT / 'crates/horizon-assets' + sources = [oracle, Path(__file__), lab.ROOT / 'tools/lab.py', lab.ROOT / 'tools/test_rust_parity.py', + lab.ROOT / 'Cargo.toml', lab.ROOT / 'Cargo.lock', crate / 'Cargo.toml', + *sorted(crate.rglob('*.rs'))] + tested_sources = base.source_hashes(sources) + with zipfile.ZipFile(jars['client']) as archive: + names = sorted(name for name in archive.namelist() if name.startswith('assets/minecraft/models/block/') and name.endswith('.json')) + rows = [(name, archive.read(name).decode()) for name in names] + synthetic = list(corpus()) + rows += [(f'synthetic/{index}', raw) for index, raw in enumerate(synthetic)] + inputs = build / 'inputs.jsonl' + inputs.write_text(''.join(json.dumps(row) + '\n' for row in rows)) + fixtures = base.source_hashes([inputs]) + classes = build / 'classes'; classes.mkdir(exist_ok=True) + def run(command, name): + with (build / (name + '.log')).open('w') as log: + subprocess.run(list(map(str, command)), cwd=lab.ROOT, check=True, timeout=3600, stdout=log, stderr=subprocess.STDOUT) + dependencies = os.pathsep.join(map(str, [jars['client'], *libraries])) + run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-cp', dependencies, '-d', classes, oracle], 'compile-java') + run(['cargo', 'build', '--locked', '-p', 'horizon-assets', '--example', 'cuboid_model_fixture'], 'compile-rust') + metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) + binary = Path(metadata['target_directory']) / 'debug/examples' / ('cuboid_model_fixture.exe' if os.name == 'nt' else 'cuboid_model_fixture') + run([binary, inputs, build / 'rust.jsonl'], 'rust') + run(['java', '-Xmx512M', '-cp', str(classes) + os.pathsep + dependencies, 'dev.horizonlab.parity.VanillaCuboidModelOracle', inputs, build / 'client.jsonl'], 'client') + rejected = canonicalize(build / 'client.jsonl'); canonicalize(build / 'rust.jsonl') + matched = base.compare(build / 'client.jsonl', build / 'rust.jsonl') + base.ensure_sources_unchanged(sources, tested_sources); base.ensure_sources_unchanged([inputs], fixtures) + report = {'schema': 1, 'minecraft': lock['minecraft']['version'], 'manifest_sha1': lock['minecraft']['manifest_sha1'], + 'platform': platform.platform(), 'java': subprocess.check_output(['java', '--version'], text=True).splitlines()[0], + 'rustc': subprocess.check_output(['rustc', '--version'], text=True).strip(), + 'resource_models': len(names), 'synthetic_models': len(synthetic), 'rejected_models': rejected, + 'sources_sha256': tested_sources, 'fixtures_sha256': fixtures, + 'rust_output_sha256': lab.digest(build / 'rust.jsonl', 'sha256'), + 'references': [{'side': 'client', 'jar_sha256': lab.digest(jars['client'], 'sha256'), + 'output_sha256': lab.digest(build / 'client.jsonl', 'sha256'), 'matched_output_lines': matched}], + 'scope': 'Actual pinned CuboidModel.fromStream parser compared over every bundled block model and synthetic JSON/numeric/syntax cases. Decoded geometry, texture materials/references, nullable children, inheritance markers, face quadrants, light emission and display transforms; floats compare by IEEE-754 bits. Rejections normalize exception text. This client-only API is absent from the server. Does not yet validate parent resolution, rotation matrices, quad baking, blockstate dispatch, rendered pixels or gameplay.'} + lab.write_json(report_path, report) + print(f'Client cuboid decoding: {matched:,} models match ({rejected:,} rejected); {report_path}', flush=True) + + +if __name__ == '__main__': + main() diff --git a/tools/test_culling_empty.py b/tools/test_culling_empty.py index fd278733b..d2bcbbc39 100644 --- a/tools/test_culling_empty.py +++ b/tools/test_culling_empty.py @@ -22,7 +22,7 @@ def main(): args = parser.parse_args() root = build_pack.ROOT fixture = build_mod.build_culling_empty_fixture() - mod = root / "dist" / f"horizon-lab-{build_pack.read_lock()['pack_version']}.jar" + mod = root / "dist" / f"horizon-{build_pack.read_lock()['pack_version']}.jar" results = [] for enabled in [False, True]: instance = root / ".local/runtime" / ("culling-empty-fixture-patched" if enabled else "culling-empty-fixture-upstream") diff --git a/tools/test_culling_rays.py b/tools/test_culling_rays.py index 2fc43ca29..b0dfba84b 100644 --- a/tools/test_culling_rays.py +++ b/tools/test_culling_rays.py @@ -56,7 +56,7 @@ def main(): args = parser.parse_args() root = build_pack.ROOT fixture = build_mod.build_integration_fixture("culling-rays", "dev.horizonlab.dispatch.CullingRayIntegration", ["entityculling"], ["CullingRayAccess"]) - mod = root / "dist" / f"horizon-lab-{build_pack.read_lock()['pack_version']}.jar" + mod = root / "dist" / f"horizon-{build_pack.read_lock()['pack_version']}.jar" original_sha256 = hashlib.sha256(mod.read_bytes()).hexdigest() results = [] for enabled in [False, True]: diff --git a/tools/test_damage_immunity_parity.py b/tools/test_damage_immunity_parity.py new file mode 100644 index 000000000..057d7a4ad --- /dev/null +++ b/tools/test_damage_immunity_parity.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +"""Compare native entity/living/player damage immunity with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + names=['removed','permanent','temporary','bypass','creative','fire','fire_immune','fall','fall_immune','drowning','freezing','rule_drowning','rule_fall','rule_fire','rule_freeze','changing','pearl','loaded'] + modes=['entity','base','living','player','server'] + def state(**kw): + s={n:False for n in names};s.update(rule_drowning=True,rule_fall=True,rule_fire=True,rule_freeze=True,loaded=True);s.update(kw);return s + def row(s,mode='server',**kw): + f=dict(initial=s,after=s,mode=mode,fail=-1,mutate_at=-1);f.update(kw);return f + for mask in range(512): + s=state(**{n:bool(mask&(1<f',v).hex() + def double(v):return struct.pack('>d',v).hex() + def state(armor=20,toughness=8,amplifier=0,**kw): + s=dict(armor=double(armor),toughness=double(toughness),amplifier=amplifier,resistance=True,server=True,weapon=True,bypass_armor=False,bypass_effects=False,bypass_resistance=False,bypass_enchantments=False);s.update(kw);return s + def row(mode,damage=10,initial=None,**kw): + f=dict(mode=mode,damage=bits(damage),initial=initial or state(),after=state(5,3,4,resistance=False,server=False,weapon=False),player=False,attacker=2,fail=-1,mutate_at=-1);f.update(kw);return f + values=[-float('inf'),-1e30,-20,-1.9,-1,-0.,0.,1e-40,.05,1,5,20,40,1e30,3.4028235e37,float('inf'),float('nan')] + for armor in values+[2147483647.,2147483648.,-2147483649.]:yield row('armor-value',initial=state(armor)) + for damage in values: + for armor in values: + for toughness in [-8.,-1.,0.,8.,float('inf'),float('nan')]:yield row('armor',damage,state(armor,toughness)) + for amplifier in [-2**31,-429496730,-6,-1,0,1,3,4,5,2**31-1]: + for player in [False,True]: + for attacker in range(3):yield row('magic',damage,state(amplifier=amplifier),player=player,attacker=attacker) + for flags in range(128): + initial=state(resistance=flags&1!=0,server=flags&2!=0,weapon=flags&4!=0,bypass_armor=flags&8!=0,bypass_effects=flags&16!=0,bypass_resistance=flags&32!=0,bypass_enchantments=flags&64!=0) + for mode in ['armor','magic']:yield row(mode,initial=initial) + for mode in ['armor-value','armor','magic']: + for player in [False,True]: + for fail in range(-1,17): + for mutation in range(-1,17):yield row(mode,initial=state(amplifier=1),player=player,fail=fail,mutate_at=mutation) + rng=random.Random(0x524553495354) + for _ in range(7000): + initial=state(rng.choice(values),rng.choice(values),rng.randrange(-2**31,2**31),resistance=bool(rng.randrange(2)),server=bool(rng.randrange(2)),weapon=bool(rng.randrange(2)),bypass_armor=bool(rng.randrange(2)),bypass_effects=bool(rng.randrange(2)),bypass_resistance=bool(rng.randrange(2)),bypass_enchantments=bool(rng.randrange(2))) + f=row(rng.choice(['armor-value','armor','magic']),rng.choice(values),initial,player=bool(rng.randrange(2)),attacker=rng.randrange(3),fail=rng.choice([-1,-1,0,4,8,12]),mutate_at=rng.choice([-1,-1,0,3,7,11])) + if rng.randrange(3)==0:f['damage']=f'{rng.getrandbits(32):08x}' + yield f + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-damage-reduction-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageReductionOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/damage_reduction_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaDamageReductionOracle',mode,path],side+'-'+mode) + java('server','export',build) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'slots.json'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','damage_reduction_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('damage_reduction_fixture.exe' if os.name=='nt' else 'damage_reduction_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} damage reduction output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual LivingEntity armor-value and armor/magic reduction methods for base living and ServerPlayer receivers. Damage bypass tags, hurtArmor dispatch, floor/narrow attribute arithmetic, native CombatRules, resistance amplifier overflow and resisted statistics, repeated attacker lookup, native empty-equipment protection lookup, mutations/failures and numeric edges. Item enchantments, actual durability/effects/tag registries and full damage integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped damage reduction parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_damage_source_parity.py b/tools/test_damage_source_parity.py new file mode 100644 index 000000000..1e7af0480 --- /dev/null +++ b/tools/test_damage_source_parity.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python3 +"""Compare registered damage-source identity and gameplay queries with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +import zipfile +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(catalog): + def bits(v):return struct.pack('>d',v).hex() + names=[d['id'] for d in catalog['types']] + def state(**kw): + s=dict(weapons=[False,True,False,True,False],creative=[False,False,False,True,False],positions=[[bits(i*.25),bits(-i),bits(i+.75)] for i in range(5)],virtual_entity=4);s.update(kw);return s + def row(name,direct=0,causing=0,constructor=0,**kw): + f=dict(type=name,direct=direct,causing=causing,constructor=constructor,position=[bits(-0.),bits(10),bits(-20)],initial=state(),after=state(),virtual=False,fail=-1,mutate_at=-1,check_type=name);f.update(kw);return f + for name in names: + for direct in range(5): + for causing in range(5): + for constructor in range(4):yield row(name,direct,causing,constructor) + values=[-float('inf'),-1e30,-1,-0.,0.,1e-300,.1,1,5,10,20,1e30,float('inf'),float('nan')] + rng=random.Random(0x44414d4147455352) + def random_state():return state(weapons=[bool(rng.randrange(2)) for _ in range(5)],creative=[bool(rng.randrange(2)) for _ in range(5)],positions=[[bits(rng.choice(values)) for _ in range(3)] for _ in range(5)],virtual_entity=rng.randrange(5)) + for _ in range(10000):yield row(rng.choice(names),rng.randrange(5),rng.randrange(5),rng.randrange(4),initial=random_state(),after=random_state(),virtual=bool(rng.randrange(2)),fail=rng.randrange(-1,5),mutate_at=rng.randrange(-1,5),position=[bits(rng.choice(values)) for _ in range(3)],check_type=rng.choice(names+['minecraft:unknown'])) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-damage-source-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + with zipfile.ZipFile(jars['server']) as archive: + for file,prefix in [('types.json','data/minecraft/damage_type/'),('tags.json','data/minecraft/tags/damage_type/')]: + resources={'minecraft:'+n[len(prefix):-5]:archive.read(n).decode('utf-8') for n in sorted(archive.namelist()) if n.startswith(prefix) and n.endswith('.json')};lab.write_json(build/file,resources) + + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageSourceOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/damage_source_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaDamageSourceOracle',mode,path],side+'-'+mode) + java('server','export',build);catalog=json.loads((build/'catalog.json').read_text());fixtures=list(corpus(catalog));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'catalog.json',build/'types.json',build/'tags.json'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','damage_source_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('damage_source_fixture.exe' if os.name=='nt' else 'damage_source_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} damage source output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Native DamageType codec export and TagLoader resolution for all bundled vanilla damage definitions/tags; ordinary DamageSource constructor identity, difficulty scaling, exhaustion, type/tag membership, weapon/direct-position access and virtual creative-source dispatch. Entity position/weapon/ability queries are controlled, including mutation and failures. Catalog indices are local, not network IDs; live registry reload, damage definition codecs in Rust, death-message generation and combat registry binding remain pending.'} + lab.write_json(report_path,report);print(f'Scoped damage source parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_decoration_parity.py b/tools/test_decoration_parity.py new file mode 100644 index 000000000..ea693b6a1 --- /dev/null +++ b/tools/test_decoration_parity.py @@ -0,0 +1,92 @@ +#!/usr/bin/env python3 +"""Compare the feature branch of native chunk biome decoration.""" +import argparse +import itertools +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab, test_rust_parity as base, test_feature_sort_parity as sort +except ImportError: + import lab + import test_rust_parity as base + import test_feature_sort_parity as sort + + +def fixture(biomes, seed=0, mode=0, present=None): + count=max((v for b in biomes for s in b for v in s),default=-1)+1 + chains=[[],[{'type':'count','count':3},{'type':'in_square'}],[{'type':'count','count':3},{'type':'in_square'},{'type':'biome'}],[{'type':'biome'},{'type':'random_chance','chance':0.5},{'type':'count','count':2}]] + if present is None:present=list(range(len(biomes)+1)) + if not present:present=[len(biomes)] + return {'biomes':biomes,'placements':[chains[mode%len(chains)] for _ in range(count)],'palettes':[present[i%len(present):]+present[:i%len(present)] for i in range(9)],'seed':seed,'cx':0,'cz':0,'min':-64,'height':32,'biome_offset':0,'chunk_fail':-1,'notify_fail':-1,'query_fail':-1,'feature_fail':-1,'return_mode':0} + + +def corpus(resources): + graphs=[[],[[]],[[[],[],[]]],[[[0,1,2]]],[[[0,2]],[[1,2]]],[[[0],[],[1,2]],[[1],[],[2,3]]],[[[0,0]]],[[[0,1]],[[1,0]]],[[[0]],[[1]]],[[[],[2]],[[],[0,1]]],[[[0],[],[0]],[[1],[2],[3]]],[[[0]]+[[] for _ in range(12)]+[[1]],[[1]]]] + policies=[{}, {'feature_fail':0},{'feature_fail':3},{'query_fail':0},{'query_fail':2},{'chunk_fail':0},{'chunk_fail':4},{'notify_fail':0},{'notify_fail':2},{'return_mode':1},{'return_mode':2}] + for graph,mode,seed,policy in itertools.product(graphs,range(4),[0,-1,2**63-1],policies): + f=fixture(graph,seed,mode);f.update(policy) + f['cx']=[0,-1,1874999,134217728][mode];f['cz']=[0,-1875000,1,-134217729][mode] + f['min']=[-64,0,-2032,1968][mode];f['height']=[16,32,64,16][mode];f['biome_offset']=mode + yield f + # Resident palettes can contain only an excluded biome, only a neighbor's + # feature, or duplicates. Selection must retain global ordering and indices. + graph=[[[0,3]],[[1,3]],[[2,3]]] + for present in [[],[0],[1],[2],[0,2],[3],[0,0,3],[2,1,0]]: + for mode in range(4): + f=fixture(graph,-9223372036854775808,mode,present) + f['palettes']=[([3] if i!=8 else present or [3]) for i in range(9)] + yield f + names=sorted({name for steps in resources.values() for step in steps for name in step}) + if any(not isinstance(name,str) or name.startswith('#') for name in names):raise ValueError('unsupported fixture holder form') + identity={name:i for i,name in enumerate(names)} + biomes=[[[identity[name] for name in step] for step in steps] for steps in resources.values()] + rng=random.Random(8845) + for mode in range(4): + for selected in [list(range(len(biomes))),[],*[ [i] for i in range(len(biomes))],*[rng.sample(range(len(biomes)),rng.randrange(len(biomes)+1)) for _ in range(24)]]: + f=fixture(biomes,rng.randrange(-2**63,2**63),mode,selected) + f['cx']=rng.randrange(-1875000,1875000);f['cz']=rng.randrange(-1875000,1875000) + yield f + for _ in range(200): + # Shared order avoids cycles while exercising sparse high step indices. + biomes=[[[i for i in range(12) if rng.randrange(5)==0] for _ in range(rng.randrange(15))] for _ in range(rng.randrange(8))] + f=fixture(biomes,rng.randrange(-2**63,2**63),rng.randrange(4));f.update(rng.choice(policies));yield f + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-decoration-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + resources=sort.biome_features(jars['server']) + if len(resources)!=67 or resources!=sort.biome_features(jars['client']):raise ValueError('pinned biome feature resources differ') + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDecorationOracle.java';helper=oracle.with_name('VanillaPlacementOracle.java') + sources=[oracle,helper,Path(__file__),lab.ROOT/'tools/test_feature_sort_parity.py',lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/decoration_fixture.rs'] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus(resources));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(f,separators=(',',':'))+'\n' for f in fixtures),encoding='utf-8') + resource_path=build/'biome-features.json';resource_path.write_text(json.dumps(resources,separators=(',',':')),encoding='utf-8') + fixture_paths=[inputs,resource_path];tested_fixtures=base.source_hashes(fixture_paths) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,helper],'compile-java') + run(['cargo','build','--release','-p','horizon-world','--example','decoration_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('decoration_fixture.exe' if os.name=='nt' else 'decoration_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + run(['java','-Xmx768M','-cp',os.pathsep.join([str(classes),str(jar),dependency_path]),'dev.horizonlab.parity.VanillaDecorationOracle',side,build],side) + reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} decoration output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'biomes':len(resources),'requested_decorations':len(fixtures)*2,'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual ChunkGenerator.applyBiomeDecoration with structure generation disabled, native ProtoChunk biome palettes, native FeatureSorter and WorldgenRandom, and traced feature sinks. Nine-chunk query order, possible-biome intersection, sorted global feature indices, decoration/feature seeds, biome-check placement, repeated calls, ignored false results, progress markers and partial failures are compared. All 67 bundled biome feature lists participate with synthetic payloads. Rust owns immutable generation settings and delegates resident palette transport and feature callbacks. Structure decoration, complete registry/world region integration, all feature algorithms, crash-report formatting and full gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped decoration parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_decoration_region_parity.py b/tools/test_decoration_region_parity.py new file mode 100644 index 000000000..0b59c4817 --- /dev/null +++ b/tools/test_decoration_region_parity.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +"""Compare biome decoration, resident biome zoom, feature writes and heightmaps.""" +import argparse +from collections import Counter +import json +import os +from pathlib import Path +import platform +import random +import subprocess + +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen, test_feature_region_parity as region, test_decoration_parity as decoration +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + import test_feature_region_parity as region + import test_decoration_parity as decoration + + +def corpus(facts): + features=region.configured_features(include_springs=False) + biomes=[[[0],[1,2],[3,4,5]],[[0],[2],[3,5]],[[1],[2],[4,5]]] + chains=[ + [{'type':'count','count':2},{'type':'in_square'},{'type':'heightmap','heightmap':'MOTION_BLOCKING'},{'type':'biome'}], + [{'type':'count_on_every_layer','count':1},{'type':'offset','x':0,'y':1,'z':0},{'type':'biome'}], + [{'type':'biome'},{'type':'count','count':2},{'type':'heightmap','heightmap':'WORLD_SURFACE'},{'type':'offset','x':1,'y':0,'z':1}], + [{'type':'count','count':3},{'type':'in_square'},{'type':'heightmap','heightmap':'MOTION_BLOCKING'},{'type':'block_predicate_filter','predicate':{'type':'matching_biomes','biomes':['horizon:b0','horizon:b1']}},{'type':'biome'}], + [{'type':'biome'},{'type':'block_predicate_filter','predicate':{'type':'volume_match','min':[-1,0,-1],'max':[1,0,1],'match':{'type':'not','predicate':{'type':'matching_biomes','biomes':['horizon:b3']}}}}], + ] + for seed in [0,-1]: + for stage in ['empty','biomes','terrain']: + for fail in [-1,7]: + for reject in [0,3]: + for placement in chains: + for mixed in [False,True]: + f=decoration.fixture(biomes,seed,present=[0,1,2,3] if mixed else [0]) + f.update(features=features,placements=[placement]*len(features),min=-64,height=64,stage=stage,write_fail=fail,reject=reject) + yield f + + +def main(): + parser=argparse.ArgumentParser(description=__doc__) + parser.add_argument("--prepare",action="store_true") + args=parser.parse_args() + build=lab.LOCAL/"rust-decoration-region-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + tags=worldgen.tag_resources(jars["server"]) + if not tags or tags!=worldgen.tag_resources(jars["client"]):raise ValueError("client/server block tags differ or are empty") + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDecorationRegionOracle.java" + helper=oracle.with_name("VanillaHeightmapOracle.java") + placement_helper=oracle.with_name("VanillaPlacementOracle.java") + sources=[oracle,helper,placement_helper,Path(__file__),lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_feature_region_parity.py",lab.ROOT/"tools/test_decoration_parity.py",lab.ROOT/"tools/test_feature_sort_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock", + lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/decoration_region_fixture.rs",lab.ROOT/"crates/horizon-world/examples/support/decoration_storage.rs"] + tested_sources=base.source_hashes(sources) + classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper,placement_helper],"compile-java") + def java(side,mode,path): + run(["java","-Xmx1G","-cp",os.pathsep.join([str(classes),str(jars[side]),dependency_path]),"dev.horizonlab.parity.VanillaDecorationRegionOracle",mode,path],side+"-"+mode) + for side in jars:java(side,"export",build/f"facts-{side}.json") + facts=json.loads((build/"facts-server.json").read_text()) + if facts!=json.loads((build/"facts-client.json").read_text()):raise ValueError("client/server state facts differ") + if len(facts["states"])!=35723:raise ValueError("incomplete pinned state table") + fixtures=list(corpus(facts));inputs=build/"inputs.txt" + inputs.write_text("".join(json.dumps(value,separators=(",",":"))+"\n" for value in fixtures),encoding="utf-8") + (build/"tags.json").write_text(json.dumps(tags,separators=(",",":")),encoding="utf-8") + fixture_paths=[inputs,build/"tags.json",build/"facts-client.json",build/"facts-server.json"] + tested_fixtures=base.source_hashes(fixture_paths) + run(["cargo","build","--release","-p","horizon-world","--example","decoration_region_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("decoration_region_fixture.exe" if os.name=="nt" else "decoration_region_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + java(side,side,build) + reference=build/f"{side}.txt";matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} decoration-region output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "block_states":len(facts["states"]),"block_tag_files":len(tags),"fixtures":len(fixtures),"biome_zoom":True,"resident_chunks_per_fixture":9,"requested_decorations":len(fixtures)*2, + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual ChunkGenerator.applyBiomeDecoration with structures disabled executes three native basic features, configured fill-layer sequences, replacements and scattered ore into nine ProtoChunks. Biome palettes, native BiomeManager zoom, possible-biome selection, FeatureSorter order, WorldgenRandom seeding, biome filters, registry-bound matching-biome predicates, ordered volume predicates and graph composition share resident terrain. Both pre-light heightmap groups, mixed/uniform biome neighborhoods, count/square/heightmap/layered chains, repeated decoration, rejected writes and partial failures are compared. Ordered writes, current-feature markers, complete final raw sections and all heightmap presence/data are checked. Rust uses resident BiomeRegion and TerrainRegion with caller-owned biome membership/write effects. Actual WorldGenRegion write-zone policy, POIs, block entities, postprocessing, lighting, structures, remaining feature algorithms, complete noise-to-decoration lifecycle and gameplay remain pending."} + + + lab.write_json(report_path,report);print(f"Scoped decoration-region parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_delta_parity.py b/tools/test_delta_parity.py new file mode 100644 index 000000000..3aef9f358 --- /dev/null +++ b/tools/test_delta_parity.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 +"""Compare delta cavity checks, rim placement and mutable shifted contents.""" +import itertools +import json +try: + from . import test_simple_block_parity as harness +except ImportError: + import test_simple_block_parity as harness + + +def corpus(facts, placement): + states = facts['states']; get = lambda name: facts['defaults']['minecraft:' + name] + directions = [(0, -1, 0), (0, 1, 0), (0, 0, -1), (0, 0, 1), (-1, 0, 0), (1, 0, 0)] + def delta(**extra): + value = {'type': 'delta_feature', 'contents': {'id': 'lava'}, 'rim': {'id': 'magma_block'}, 'size': 0, 'rim_size': 0} + value.update(extra); return value + def case(definition=None, **extra): + value = {'definition': json.dumps(definition if definition is not None else delta(), separators=(',', ':')), + 'mode': 'feature', 'origin': [0, 64, 0], 'legacy': False, 'seed': 0, 'world_seed': 1, + 'fail': -1, 'reject': 0, 'brightness': 15, 'fallback': get('netherrack'), 'air_above': 64, 'states': [], 'repeats': 1} + value.update(extra); return value + for state_id, state in enumerate(states): + yield case(states=[[0, 64, 0, state_id]]) + yield case(delta(contents=state)) + yield case(delta(rim=state, rim_size=1)) + for x, y, z in directions: + yield case(states=[[x, 64+y, z, state_id]]) + for mask, legacy, reject in itertools.product(range(64), [False, True], [0, 1, 3]): + yield case(delta(size=2, rim_size=1), legacy=legacy, reject=reject, + states=[[x, 64+y, z, get('air') if mask & (1 << i) else get('stone')] for i, (x, y, z) in enumerate(directions)], repeats=2) + for size, rim, legacy, seed in itertools.product(range(17), [0, 1, 4, 16], [False, True], [0, -1]): + yield case(delta(size=size, rim_size=rim), legacy=legacy, seed=seed) + providers = [ + {'type': 'uniform', 'min_inclusive': 0, 'max_inclusive': 4}, + {'type': 'biased_to_bottom', 'min_inclusive': 0, 'max_inclusive': 4}, + {'type': 'very_biased_to_bottom', 'min_inclusive': 0, 'max_inclusive': 4}, + {'type': 'trapezoid', 'min': 0, 'max': 4, 'plateau': 2}, + {'type': 'clamped', 'source': {'type': 'uniform', 'min_inclusive': -4, 'max_inclusive': 8}, 'min_inclusive': 0, 'max_inclusive': 4}, + {'type': 'weighted_list', 'distribution': [{'weight': 1, 'data': 0}, {'weight': 2, 'data': 4}]}, + ] + for provider, legacy, seed, fail, reject in itertools.product(providers, [False, True], range(8), [-1, 0, 1, 7, 15, 31], [0, 1, 3]): + yield case(delta(size=provider, rim_size=provider), legacy=legacy, seed=seed, fail=fail, reject=reject, repeats=2) + for contents, rim in itertools.product(['air', 'cave_air', 'netherrack', 'magma_block', 'lava', 'bedrock', 'chest'], repeat=2): + yield case(delta(contents={'id': contents}, rim={'id': rim}, size=4, rim_size=2), repeats=2) + for legacy, seed in itertools.product([False, True], range(128)): + yield case(delta(size=2, rim_size={'type': 'uniform', 'min_inclusive': 0, 'max_inclusive': 2}), legacy=legacy, seed=seed) + for origin, legacy in itertools.product([[2147483647, 64, -2147483648], [-2147483648, 64, 2147483647], [0, -2147483648, 0], [0, 2147483647, 0]], [False, True]): + yield case(delta(size=4, rim_size=4), origin=origin, air_above=origin[1], legacy=legacy) + for key, values in [ + ('contents', [None, False, {}, [], 'missing', {'id': 'missing'}]), + ('rim', [None, False, {}, [], 'missing', {'id': 'oak_log', 'properties': {'axis': 'invalid'}}]), + ('size', [None, False, -1, 17, 16.9, '2', {}, [], {'type': 'uniform', 'min_inclusive': -1, 'max_inclusive': 2}]), + ('rim_size', [None, False, -1, 17, 16.9, '2', {}, []])]: + for value in values: + definition = delta(); definition[key] = value + yield case(definition) + definition = delta(); del definition[key] + yield case(definition) + for legacy, fail, reject in itertools.product([False, True], [-1, 0, 9, 101], [0, 3]): + placed = {'feature': delta(size=2, rim_size=1), 'placement': [{'type': 'count', 'count': 2}]} + yield case(placed, mode='placed', legacy=legacy, fail=fail, reject=reject, repeats=2) + yield case({'type': 'overlay', 'features': [placed, {'feature': 'horizon:moss', 'placement': []}]}, legacy=legacy, fail=fail, reject=reject) + + +if __name__ == '__main__': + harness.run(corpus, 'rust-delta-parity', __file__, + 'Native DeltaFeature required state and bounded size-provider codecs, 0.9 double rim draw, conditional rim X/Z sampling, independent patch X/Z sampling, Manhattan traversal and immediate rim/shifted-content mutations. Every state is tested as origin, contents, rim and all six neighbors; all air-neighbor masks, size/rim limits, six provider families, zero-component rim offsets, both RNGs, seeds, repeated mutations, rejected writes, partial failures, wrapped coordinates and composition are covered. The world fixture has a controlled flat air/ground boundary with mutable overrides. World updates, fluid behavior and full generation remain pending.') diff --git a/tools/test_density_parity.py b/tools/test_density_parity.py new file mode 100644 index 000000000..aeb319e0f --- /dev/null +++ b/tools/test_density_parity.py @@ -0,0 +1,1100 @@ +#!/usr/bin/env python3 +"""Compare 26.3 compiled density samplers with checksum-pinned vanilla JARs.""" +import argparse +from collections import Counter +import json +import math +import os +from pathlib import Path +import platform +import random +import struct +import subprocess + +try: + from . import lab, test_rust_parity +except ImportError: + import lab + import test_rust_parity + + +def number(value): + return struct.pack(">d", value).hex() + + +def corpus(): + rng = random.Random(0x484f52495a4f4e44454e53495459) + edges = [-2147483648, -2147483647, -65536, -64, -1, 0, 1, 64, 65536, 2147483646, 2147483647] + floats = ["00000000", "80000000", "00000001", "80000001", "3f000000", "bf000000", "3f800000", "bf800000", "7f7fffff", "ff7fffff", "7f800000", "ff800000", "7fc00000", "7fa00001"] + def probes(index, points=32, exact=False): + for value in edges: + yield f"query {index} {value} {value} {value}" + for _ in range(points): + position = [rng.choice(edges) if rng.randrange(3) == 0 else rng.randrange(-2**31, 2**31) for _ in range(3)] + yield f"query {index} " + " ".join(map(str, position)) + for iteration in range(5): + sizes = [rng.randrange(1, 5), rng.randrange(1, 9), rng.randrange(1, 5)] + minimum = [rng.choice(edges) for _ in range(3)] + steps = [rng.choice([1, 4, 16, 65536, 2147483647]) for _ in range(3)] + yield f"volume {index} " + " ".join(map(str, sizes+minimum+steps)) + f" {0 if exact else iteration % 3} {rng.randrange(-2**63, 2**63)} 2" + index = 0 + good_children = [] + all_children = [] + for value in floats + [f"{rng.getrandbits(32):08x}" for _ in range(64)]: + yield f"constant {value}" + yield from probes(index) + all_children.append(index) + good_children.append(index) + index += 1 + for scenario in range(1800): + axis, tiling = scenario % 3, (scenario // 3) % 3 + if scenario % 4 == 0: + start, end = rng.choice(edges), rng.choice(edges) + elif scenario % 4 == 1: + start, end = rng.randrange(-2**31, 2**31), rng.randrange(-2**31, 2**31) + else: + start, end = rng.randrange(-128, 128), rng.randrange(-128, 128) + if scenario % 37 == 0: + end = start + if scenario % 41 == 0: + start, end = 0, -1 # MIN / -1 overflow in repeating paths. + low, high = (rng.choice(floats) if scenario % 3 == 0 else f"{rng.getrandbits(32):08x}" for _ in range(2)) + yield f"gradient {axis} {tiling} {start} {end} {low} {high}" + for coordinate in [start, end, max(-2**31, start-1), min(2**31-1, end+1)]: + yield f"query {index} {coordinate} {coordinate} {coordinate}" + yield from probes(index) + all_children.append(index) + if tiling == 0 or start != end: + good_children.append(index) + index += 1 + scales = [0.0, -0.0, .001, -.001, .125, .5, 1.0, 4.0, 1e100, float("inf"), float("-inf"), float("nan")] + noise_children = [] + for scenario in range(240): + kind = ["perlin", "simplex", "smeared"][scenario % 3] + stream = ["legacy", "xoroshiro"][(scenario // 3) % 2] + scale = rng.choice(scales) + xz, y = (rng.choice(scales) if scenario % 3 == 0 else rng.uniform(-2, 2) for _ in range(2)) + noise_children.append(index) + yield f"noise {kind} {stream} {rng.randrange(-2**63, 2**63)} {number(scale)} {number(xz)} {number(y)}" + yield from probes(index) + good_children.append(index) + all_children.append(index) + index += 1 + nested = [] + for scenario in range(1200): + choices = all_children if scenario % 9 == 0 else good_children + choices = choices + [i for i, depth in nested if depth < 4] + x, y, z = (rng.choice(choices) for _ in range(3)) + if scenario % 2 == 0: + y = -1 + yield f"shift {scenario % 240} {x} {y} {z}" + yield from probes(index) + depth = 1 + max([d for i, d in nested if i in [x, y, z]], default=0) + nested.append((index, depth)) + index += 1 + unary_kinds = ["abs", "negate", "square", "cube", "sqrt", "reciprocal", "sign", "squeeze", "leaky", "add", "sub", "mul", "div", "min", "max", "clamp"] + arithmetic = [] + for scenario in range(2400): + kind = unary_kinds[scenario % len(unary_kinds)] + choices = all_children + [i for i, depth in nested if depth <= 2] + [i for i, depth in arithmetic if depth < 4] + child = rng.choice(choices) + a, b = (rng.choice(floats) if scenario % 3 == 0 else f"{rng.getrandbits(32):08x}" for _ in range(2)) + yield f"unary {kind} {child} {a} {b}" + yield from probes(index) + depth = 1 + max([d for i, d in arithmetic if i == child], default=0) + arithmetic.append((index, depth)) + index += 1 + binary = [] + for scenario in range(2400): + kind = ["add", "sub", "mul", "div", "min", "max"][scenario % 6] + choices = all_children + [i for i, depth in arithmetic if depth <= 2] + [i for i, depth in binary if depth < 4] + left, right = (rng.choice(choices) for _ in range(2)) + if scenario % 7 == 0: + left = scenario % len(floats) # Force scalar shortcuts and exceptional values. + bound = rng.choice(floats) if scenario % 3 == 0 else f"{rng.getrandbits(32):08x}" + yield f"binary {kind} {left} {right} {bound}" + yield from probes(index, exact=True) + depth = 1 + max([d for i, d in binary if i in [left, right]], default=0) + binary.append((index, depth)) + index += 1 + + selections = [] + for scenario in range(2400): + choices = all_children + [i for i, depth in arithmetic+binary+selections if depth < 3] + selected = rng.choice(choices) if scenario % 3 else scenario % len(floats) + if scenario % 2 == 0: + mode = (scenario // 2) % 2 + a, b = (rng.choice(floats) if scenario % 3 == 0 else f"{rng.getrandbits(32):08x}" for _ in range(2)) + inside, outside = (rng.choice(floats) if mode else str(rng.choice(choices)) for _ in range(2)) + yield f"choice {mode} {selected} {a} {b} {inside} {outside}" + children = [selected] + ([] if mode else [int(inside), int(outside)]) + else: + mode = (scenario // 2) % 3 + first = rng.choice(floats) if mode == 1 else str(rng.choice(choices)) + second = rng.choice(floats) if mode == 2 else str(rng.choice(choices)) + yield f"lerp {mode} {selected} {first} {second}" + children = [selected] + ([] if mode == 1 else [int(first)]) + ([] if mode == 2 else [int(second)]) + yield from probes(index, exact=True) + depth = 1 + max([d for i, d in arithmetic+binary+selections if i in children], default=0) + selections.append((index, depth)) + index += 1 + # Known failure nodes make skipped branches, bulk evaluation order and + # partial writes directly observable at scalar branch endpoints. + failure = index + yield "gradient 0 1 0 0 00000000 3f800000" + index += 1 + for zero in [0, 1, 6, 12]: + for operation in [f"binary mul {zero} {failure} 00000000", f"binary div {zero} {failure} 00000000", + f"choice 0 {zero} 00000000 3f800000 6 {failure}", f"choice 0 {zero} 00000000 3f800000 {failure} 6", + f"lerp 0 {zero} 6 {failure}", f"lerp 0 {zero} {failure} 6", + f"lerp 1 {zero} 80000000 {failure}", f"lerp 2 {zero} {failure} 80000000"]: + yield operation + yield from probes(index, points=1, exact=True) + index += 1 + for source in range(14): + for minimum, maximum in [("00000000", "3f800000"), ("80000000", "00000000"), ("7fc00000", "3f800000")]: + yield f"choice 1 {source} {minimum} {maximum} 80000000 3f800000" + yield from probes(index, points=1) # Constant-choice logical tails. + index += 1 + + interval_nodes = [] + for scenario in range(1000): + choices = all_children + [i for i, depth in arithmetic+binary+selections+interval_nodes if depth < 3] + source = rng.choice(choices) if scenario % 3 else scenario % len(floats) + mode = scenario % 2 + count = 1 if mode else rng.choice([0, 1, 2, 3, 4, 8, 16]) + thresholds = [rng.choice(floats) if scenario % 3 == 0 else f"{rng.getrandbits(32):08x}" for _ in range(count)] + branches = [rng.choice(choices) for _ in range(count+1)] + if scenario % 13 == 0: + branches[scenario % len(branches)] = failure + yield f"interval {mode} {source} {count} " + " ".join(thresholds + list(map(str, branches))) + yield from probes(index, exact=True) + depth = 1 + max([d for i, d in arithmetic+binary+selections+interval_nodes if i in [source]+branches], default=0) + interval_nodes.append((index, depth)) + index += 1 + + # Range propagation is independently checked on bit-pattern endpoints. + for a in floats: + for b in floats: + for mode in range(6): + yield f"bounds {mode} {a} {b} {a} {b} {a} {b}" + for scenario in range(24000): + values = [rng.choice(floats) if scenario % 3 == 0 else f"{rng.getrandbits(32):08x}" for _ in range(6)] + yield f"bounds {scenario % 6} " + " ".join(values) + + for scenario in range(32): + stream = ["legacy", "xoroshiro"][scenario % 2] + yield f"noise normal {stream} {rng.randrange(-2**63,2**63)} {number(0)} {number(.25)} {number(.125)}" + yield from probes(index) + index += 1 + for noise_id in range(272): + for kind in range(3): + yield f"offset {kind} {noise_id}" + yield from probes(index) + index += 1 + for scenario in range(192): + stream = ["legacy", "xoroshiro"][scenario % 2] + # The first cases include the actual overworld/nether and End parameters. + if scenario < 4: + parameters = [.25 if scenario < 2 else 1.0, .125 if scenario < 2 else 1.0, 80.0, 160.0, 8.0 if scenario < 2 else 4.0] + elif scenario % 3 == 0: + parameters = [rng.choice([0.0, -0.0, .001, .25, 1.0, -1.0, 1000.0, 1e100, float("inf")]), rng.choice([0.0, -0.0, .001, .125, 1.0, -1.0, 1000.0]), rng.choice([0.0, -0.0, 80.0, -80.0, 1e100, float("inf")]), rng.choice([160.0, -160.0, 1e100, float("inf")]), rng.choice([0.0, -0.0, 1.0, 4.0, 8.0, -8.0, 1e100])] + else: + parameters = [rng.uniform(.001,1000), rng.uniform(.001,1000), rng.uniform(.001,1000), rng.uniform(.001,1000), rng.uniform(1,8)] + yield f"blended {stream} {rng.randrange(-2**63,2**63)} " + " ".join(map(number,parameters)) + yield from probes(index, points=96, exact=True) + yield f"volume {index} 3 9 3 -32 -64 16 4 8 4 0 {scenario} 2" + index += 1 + for scenario in range(320): + point = [rng.choice(edges) if scenario % 2 == 0 else rng.randrange(-2**31,2**31) for _ in range(3)] + yield f"distance {scenario % 4} " + " ".join(map(str,point)) + yield f"query {index} " + " ".join(map(str,point)) + yield from probes(index) + index += 1 + for scenario in range(12000): + values = [rng.choice(floats) if scenario % 3 == 0 else f"{rng.getrandbits(32):08x}" for _ in range(3)] + yield "metric " + " ".join(values) + for stream in ["legacy", "xoroshiro"]: + for parameters in [[1,float("nan"),80,160,8], [1,1,80,float("nan"),8], [1,0,80,0,8], [1,1,80,160,float("nan")], [1,0,80,160,float("inf")]]: + yield f"blendfail {stream} -1 " + " ".join(map(number,parameters)) + for scenario in range(256): + stream = ["legacy", "xoroshiro"][scenario % 2] + octave = rng.choice([0,-1,-7,-15,-31,-63,-127,1]) + smear = rng.choice([0.0,-0.0,.125,1.0,-1.0,1000.0,1e100,float("inf"),float("nan")]) + amplitude = rng.choice([0.0,-0.0,1.0,-1.0,.9999847412109375,12.75,1e100,float("inf"),float("nan")]) + yield f"blendfbm {stream} {rng.randrange(-2**63,2**63)} {octave} {number(smear)} {number(amplitude)}" + + for scenario in range(192): + source = rng.choice(noise_children) if scenario % 4 == 1 else (rng.choice(all_children) if scenario % 4 else scenario % len(floats)) + yield f"counted {source}" + counted = index + index += 1 + # Some nested caches share a node; IDs remain distinct on every path. + if scenario % 3 == 0: + yield f"cache {scenario + 256} {counted}" + counted = index + index += 1 + yield f"cache {scenario} {counted}" + cached = index + index += 1 + for enabled in [0, 1]: + yield f"context {enabled}" + for point in [[0,0,0], [0,0,0], [2**26,4096,-2**26], [-17,-64,32], [-17,-64,32]]: + yield f"query {cached} " + " ".join(map(str,point)) + yield f"counts {scenario}" + for minimum in [[-17,-64,32], [-17,-64,32], [2147483647,-2147483648,0], [-17,-64,32]]: + yield f"volume {cached} 2 3 2 " + " ".join(map(str,minimum)) + f" 4 1 4 0 {scenario} 2" + yield f"counts {scenario}" + for offset in [[0,0,0],[0,0,0],[4,1,4],[1,0,0],[0,3,0]]: + point = [((a+b+2**31) % 2**32)-2**31 for a,b in zip(minimum,offset)] + yield f"query {cached} " + " ".join(map(str,point)) + yield f"counts {scenario}" + for scenario in range(10000): + sizes = [rng.randrange(1,9) for _ in range(3)] + minimum = [rng.choice(edges) for _ in range(3)] + steps = [rng.choice([1,4,16,65536,2147483647]) for _ in range(3)] + offsets = [rng.randrange(-1, sizes[i]+1)*steps[i] + (1 if scenario % 5 == 0 else 0) for i in range(3)] + point = [((a+b+2**31) % 2**32)-2**31 for a,b in zip(minimum,offsets)] + yield "lookup " + " ".join(map(str,sizes+minimum+steps+point)) + + sliced = [] + for scenario in range(384): + mode = (scenario // 8) % 4 + a, b = rng.choice(edges), rng.choice(edges) + # Force buffer tails on primitive inputs, and nested/cached graphs on + # exact buffers. IDs are never reused for different cached functions. + tails = scenario % 8 == 0 + choices = all_children + [i for i, depth in binary if depth < 3] + [i for i, depth in sliced if depth < 3] + source = scenario % len(floats) if tails else rng.choice(choices) + depth = 1 + max([d for i, d in sliced if i == source], default=0) + yield f"counted {source}" + child = index + counter = 192 + scenario + index += 1 + if scenario % 8 == 1: + yield f"cache {1024 + scenario} {child}" + child = index + index += 1 + yield f"slice {mode} {child} {a} {b}" + sampler = index + sliced.append((sampler, depth)) + index += 1 + for enabled in [0, 1]: + yield f"context {enabled}" + for command in probes(sampler, points=8, exact=not tails): + yield command + yield f"counts {counter}" + for match_minimum in [False, True]: + for match_size in [False, True]: + sizes = [2, 5, 3] + minimum = [-17, -64, 32] + fixed = [(mode, a)] if mode < 3 else [(0, a), (2, b)] + for axis, value in fixed: + sizes[axis] = 1 if match_size else sizes[axis] + minimum[axis] = value if match_minimum else (value ^ 1) + yield f"volume {sampler} " + " ".join(map(str, sizes+minimum+[4,8,16])) + f" {2 if tails else 0} {scenario} 2" + yield f"counts {counter}" + + for scenario in range(384): + xz = [1, 2, 3, 4, 7, 8, 16, 31][scenario % 8] + cell_y = [1, 2, 3, 4, 7, 8, 16, 31][(scenario // 8) % 8] + source = rng.choice(all_children + [i for i, d in binary if d < 3] + [i for i, d in sliced if d < 3]) + if scenario % 3 == 0: + source = rng.choice(noise_children) + elif scenario % 3 == 1: + source = (scenario // 3) % len(floats) + yield f"counted {source}" + counter = 576 + scenario + child = index + index += 1 + if scenario % 5 == 0: + yield f"cache {2048 + scenario} {child}" + child = index + index += 1 + yield f"interpolate {child} {xz} {cell_y}" + sampler = index + index += 1 + for enabled in [0, 1]: + yield f"context {enabled}" + for value in edges + [rng.randrange(-2**31, 2**31) for _ in range(8)]: + yield f"query {sampler} {value} {value} {value}" + yield f"counts {counter}" + for point in [[0,0,0],[-xz,-cell_y,xz],[xz,cell_y,-xz],[-1,-1,-1]]: + yield f"query {sampler} " + " ".join(map(str,point)) + yield f"counts {counter}" + for iteration in range(12): + sizes = [rng.randrange(1,6),rng.randrange(1,17),rng.randrange(1,6)] + minimum = [rng.choice([-2147479552,-65,-64,-33,-17,-1,0,1,16,32,2147479551]) for _ in range(3)] + steps = [1,1,1] if iteration < 4 else ([xz,cell_y,xz] if iteration < 8 else [2,3,4]) + if iteration in [4,5]: + minimum = [-xz,-cell_y,xz] + if iteration == 6: + sizes = [1,1,1] + minimum = [0,0,0] + steps = [1,1,1] + if iteration == 7: + sizes = [2,1,3] + minimum = [0,0,0] + steps = [xz,1,xz] + yield f"volume {sampler} " + " ".join(map(str,sizes+minimum+steps)) + f" {2 if scenario % 3 == 1 and scenario % 5 != 0 else 0} {scenario} 2" + yield f"counts {counter}" + + for scenario in range(384): + lower = [-128,-64,-63,0,64][scenario % 5] + height = [1,2,3,4,8,16,31][scenario % 7] + density = rng.choice(all_children) + if scenario % 2 == 0: + upper_bits = (floats + [struct.pack(">f",v).hex() for v in [-128,-64,-1,1,64,256,384,100.5]])[(scenario // 2) % 22] + upper_value = struct.unpack(">f",bytes.fromhex(upper_bits))[0] + if not (-512 <= upper_value <= 512): + density = 6 # Positive density makes extreme-height searches terminate immediately. + if scenario % 4 == 0: + height = 2147483647 + yield f"constant {upper_bits}" + else: + end = -64 if scenario % 17 == 0 else 64 + yield f"gradient {(scenario // 2) % 3} {(scenario // 6) % 3} -64 {end} c3000000 43800000" + upper = index + index += 1 + yield f"counted {density}" + density = index + index += 1 + yield f"counted {upper}" + upper = index + index += 1 + if scenario % 7 == 0: + yield f"cache {4096 + scenario} {density}" + density = index + index += 1 + mode = (scenario // 2) % 2 + yield f"surface {mode} {density} {upper} {lower} {height}" + sampler = index + index += 1 + for enabled in [0,1]: + yield f"context {enabled}" + for value in edges + [-129,-65,-63,63,127,128,255,256]: + yield f"query {sampler} {value} {value} {value}" + yield f"counts {960 + scenario * 2}" + yield f"counts {961 + scenario * 2}" + for iteration in range(6): + sizes = [rng.randrange(1,5),1 if iteration < 4 else 3,rng.randrange(1,5)] + minimum = [rng.choice(edges),0 if iteration % 2 else -64,rng.choice(edges)] + steps = [rng.choice([1,4,65536,2147483647]),8,rng.choice([1,4,65536,2147483647])] + yield f"volume {sampler} " + " ".join(map(str,sizes+minimum+steps)) + f" {iteration % 3} {scenario} 2" + yield f"counts {960 + scenario * 2}" + yield f"counts {961 + scenario * 2}" + + yield "context 0" + spline_index = 0 + for value in floats + [f"{rng.getrandbits(32):08x}" for _ in range(64)]: + yield f"spconstant {value}" + if math.isnan(struct.unpack(">f",bytes.fromhex(value))[0]): + yield f"spfail {spline_index}" + else: + yield f"spsampler {spline_index}" + yield from probes(index, points=8) + index += 1 + spline_index += 1 + for scenario in range(256): + sources = [rng.choice(all_children),rng.choice(noise_children),rng.choice(all_children)] + if scenario % 4 in [0,1]: + sources[0] = 12 if scenario % 4 == 0 else 4 + coordinates = [] + for source in sources: + yield f"counted {source}" + coordinates.append(index) + index += 1 + nodes = [] + for node in range(3): + coordinate = coordinates[0 if node == 2 or (node == 0 and scenario % 2 == 0) else node+1] + count = [1,2,3,8][(scenario+node) % 4] + locations = [float(i)-count*.5 for i in range(count)] + if scenario % 7 == 0: + locations = [struct.unpack(">f",bytes.fromhex(rng.choice(floats)))[0] for _ in locations] + elif scenario % 7 == 1: + locations = [0.0 for _ in locations] + fields = [] + for point, location in enumerate(locations): + derivative = rng.choice(floats) if scenario % 3 == 0 else struct.pack(">f",rng.uniform(-2,2)).hex() + value = rng.randrange(78) if node < 2 else rng.choice(nodes) + if node == 2 and point == count-1: + value = nodes[0] # Force repeated NaN coordinate reads in scalar queries. + fields += [struct.pack(">f",location).hex(),derivative,str(value)] + yield f"sppoints {coordinate} {count} " + " ".join(fields) + nodes.append(spline_index) + spline_index += 1 + yield f"spsampler {nodes[-1]}" + sampler = index + index += 1 + for enabled in [0,1]: + yield f"context {enabled}" + for command in probes(sampler, points=8, exact=True): + yield command + for counter in range(1728+scenario*3,1731+scenario*3): + yield f"counts {counter}" + + for spline in range(spline_index): + for scenario in range(16): + values = [rng.choice(floats) if scenario % 2 else struct.pack(">f",rng.uniform(-4,4)).hex() for _ in range(6)] + if scenario == 0: + values = ["ff800000","7f800000"] * 3 + if scenario == 1: + values = ["7fc00000"] * 6 + yield f"sprange {spline} " + " ".join(values) + + for scenario in range(128): + yield "greset" + for value in ["00000000","80000000","3f800000","bf800000","42000000",rng.choice(floats[:12])]: + yield f"gconst {value}" + yield f"ggradient {scenario % 3} {(scenario // 3) % 3} -64 {(-64 if scenario % 17 == 0 else 64)} bf800000 3f800000" + for slot, source in enumerate([rng.choice(noise_children),rng.choice(all_children)]): + yield f"counted {source}" + counted = index + index += 1 + yield f"gbind {counted} bf800000 3f800000 {(scenario+slot) % 8}" + yield "gcache 6" + yield "gcache 6" + yield "gsame 9 10" + yield "gcache 9" + yield f"gslice {0 if scenario % 2 else 2} {-17 if scenario % 3 else 0} 7" + yield f"gslice {2 if scenario % 2 else 0} {32 if scenario % 3 else 0} 12" + yield f"gunary {scenario % 9} 9" + yield f"gbinary {scenario % 6} {5 if scenario % 4 == 0 else 14} {5 if scenario % 4 == 1 else 8}" + yield "gclamp 15 bf800000 3f800000" + yield "gchoice 7 bf000000 3f000000 16 14" + yield f"glerp 16 {2 if scenario % 3 == 0 else 17} {5 if scenario % 3 == 1 else 14}" + yield "ginterp 18 4 8" + yield "gsurface 18 4 -64 8" + yield "gbinary 5 19 20" + yield "gcache 21" + yield "gbinary 0 22 11" + for node in range(24): + yield f"ginfo {node}" + yield "gtry 0 9" + for mode, roots in [(0,[5,6,13]),(1,[5,6,9,11,13,14,15,16,17,18,19,20,21,22,23])]: + for root in roots: + yield f"gcompile {mode} {root}" + sampler = index + index += 1 + for enabled in [0,1]: + yield f"context {enabled}" + for point in [[0,0,0],[-17,-64,32],[1,7,-1],[1,7,-1],[-2147483648,0,2147483647],[2147483647,-1,-2147483648]]: + yield f"query {sampler} " + " ".join(map(str,point)) + for counter in [2496+scenario*2,2497+scenario*2]: + yield f"counts {counter}" + for sizes, minimum, steps in [([2,5,3],[-17,-64,32],[1,1,1]),([2,5,3],[-16,-64,32],[4,8,4]),([1,3,1],[0,0,0],[1,1,1])]: + yield f"volume {sampler} " + " ".join(map(str,sizes+minimum+steps)) + f" {2 if root == 5 else 0} {scenario} 2" + for counter in [2496+scenario*2,2497+scenario*2]: + yield f"counts {counter}" + yield "gconst 7fc00000" + yield "gcache 24" + yield "gcache 25" + for root in [26,26,25]: + yield f"gtry 1 {root}" + yield "gtry 0 25" + yield "ginfo 24" + yield "ginfo 25" + yield "gconst 7fa00001" + yield "gsame 24 27" + yield "gconst 80000000" + yield "gsame 1 28" + yield "gsame 0 28" + yield f"gdistance {-2147483648 if scenario % 3 == 0 else -17} {scenario-64} {2147483647 if scenario % 3 == 1 else 32} {scenario % 4}" + yield f"ginterval 7 1 {floats[scenario % len(floats)]} 8 29" + thresholds = [[], ["00000000"], ["7fc00000"], ["80000000", "00000000", "7f800000"], ["3f800000", "bf800000", "7fc00000"]][scenario % 5] + branches = [29, 13, 7, 2][:len(thresholds)+1] + yield f"ginterval 8 {len(thresholds)} " + " ".join(thresholds + list(map(str,branches))) + yield "gcache 30" + yield "ginterval 9 1 00000000 30 29" + yield "ginterval 24 1 00000000 29 2" + yield "ginterval 7 1 7fc00000 8 29" + yield "ginterval 7 1 7fa00001 8 29" + yield "gsame 35 36" + yield "ginterval 7 1 00000000 8 29" + yield "ginterval 7 1 80000000 8 29" + yield "gsame 37 38" + yield "gcache 35" + yield "gcache 36" + yield "gtry 1 39" + yield "gtry 1 40" + yield "gbinary 0 37 37" + yield "gbinary 0 38 38" + yield "gsame 41 42" + yield "gcache 41" + yield "gcache 42" + yield "gtry 1 43" + yield "gtry 1 44" + for node in range(29,41): + yield f"ginfo {node}" + for mode, roots in [(0,[29,30,31,34]),(1,[29,30,31,32,33,34])]: + for root in roots: + yield f"gcompile {mode} {root}" + sampler = index + index += 1 + for enabled in [0,1]: + yield f"context {enabled}" + for point in [[0,0,0],[-17,-64,32],[1,7,-1],[-2147483648,0,2147483647],[2147483647,-1,-2147483648]]: + yield f"query {sampler} " + " ".join(map(str,point)) + for counter in [2496+scenario*2,2497+scenario*2]: + yield f"counts {counter}" + for sizes, minimum, steps in [([2,5,3],[-17,-64,32],[1,1,1]),([2,5,3],[-16,-64,32],[4,8,4])]: + yield f"volume {sampler} " + " ".join(map(str,sizes+minimum+steps)) + f" {2 if root == 29 else 0} {scenario} 2" + for counter in [2496+scenario*2,2497+scenario*2]: + yield f"counts {counter}" + for value in ["00000000", "80000000", "3f800000", "bf800000", "7fc00000", "7f800000"]: + yield f"gsconstant {value}" + for spline in [0,1,2,4,5]: + yield f"gspline {spline}" + # Shared and structurally equal coordinates, including zero-hash variants. + coordinate = [7,8,13][scenario % 3] + point_fields = [] + for point, location in enumerate(["bf800000", "00000000", "3f800000"]): + derivative = rng.choice(floats) if scenario % 4 == 0 else struct.pack(">f",rng.uniform(-2,2)).hex() + value = rng.randrange(6) if scenario % 4 == 0 else point % 4 + point_fields += [location, derivative, str(value)] + yield f"gspoints {coordinate} 3 " + " ".join(point_fields) + yield f"gspoints {[7,8,13][(scenario+1)%3]} 2 bf000000 00000000 6 3f000000 00000000 6" + yield f"gspoints {9 if scenario % 2 else 29} 3 bf800000 00000000 7 00000000 3f000000 6 3f800000 00000000 7" + for spline in [6,7,8,8]: + yield f"gspline {spline}" + yield "gsame 52 53" + yield f"gspoints {coordinate} 3 " + " ".join(point_fields) + yield "gspline 9" + yield "gsame 50 54" + for coordinate in [37,38]: + yield f"gspoints {coordinate} 2 bf800000 00000000 0 3f800000 00000000 2" + yield "gspline 10" + yield "gspline 11" + yield "gsame 55 56" + yield "gcache 55" + yield "gcache 56" + yield "gtry 1 57" + yield "gtry 1 58" + yield "gcache 52" + yield "gtry 1 59" + yield "gtry 1 59" + yield "gspoints 24 1 00000000 00000000 0" + yield "gspline 12" + yield "gspoints 48 1 00000000 00000000 0" + yield "gspline 13" + yield f"gbind {counted} 7fc00000 7fc00000 2" + yield "gspoints 62 1 00000000 00000000 12" + yield "gspline 14" + for node in range(45,64): + yield f"ginfo {node}" + for mode in [0,1]: + for root in [48,60,61,63]: + yield f"gtry {mode} {root}" + for mode, roots in [(0,[45,46,47,49,50,54,55,56]),(1,[45,46,47,49,50,51,52,53,54,55,56,57,58])]: + for root in roots: + yield f"gcompile {mode} {root}" + sampler = index + index += 1 + for enabled in [0,1]: + yield f"context {enabled}" + for point in [[0,0,0],[-17,-64,32],[1,7,-1],[1,7,-1],[-2147483648,0,2147483647],[2147483647,-1,-2147483648]]: + yield f"query {sampler} " + " ".join(map(str,point)) + for counter in [2496+scenario*2,2497+scenario*2]: + yield f"counts {counter}" + for sizes, minimum, steps in [([2,5,3],[-17,-64,32],[1,1,1]),([2,5,3],[-16,-64,32],[4,8,4]),([1,3,1],[0,0,0],[1,1,1])]: + yield f"volume {sampler} " + " ".join(map(str,sizes+minimum+steps)) + f" {2 if root in [45,46,47,49] else 0} {scenario} 2" + for counter in [2496+scenario*2,2497+scenario*2]: + yield f"counts {counter}" + + for scenario in range(64): + seed = [0, 1, -1, -9223372036854775808, 9223372036854775807][scenario % 5] if scenario < 10 else rng.randrange(-2**63,2**63) + yield f"gseed {seed} {scenario % 2}" + definitions = [ + ("horizon:primary", -7, 1.0, 4, scenario % 3, [1.0,0.0,-0.5,1.0] if scenario % 4 == 0 else []), + ("minecraft:nether/temperature", -7, 1.0, 4, 2, []), + ("minecraft:nether/vegetation", -8, 1.0, 4, 2, [1.0,0.0,0.5,1.0]), + ("horizon:empty", 0, 1.0, 0, 1, []), + ("horizon:secondary", -3, 0.75, 3, 0, [1.0,-0.5,0.0]), + ] + for name, base, amplitude, count, normalization, modifiers in definitions: + yield f"gregister {name} {base} {number(amplitude)} {count} {normalization} {len(modifiers)} " + " ".join(number(v) for v in modifiers) + yield "gready" + for noise in range(5): + yield f"ginstance {noise}" + for value in ["00000000", "80000000", "3f800000"]: + yield f"gconst {value}" + yield "ggradient 1 0 -64 320 bf800000 3f800000" + yield "ggradient 0 0 -32 32 bf800000 3f800000" + for kind in range(3): + yield f"goffset 0 {kind}" + yield "gcache 6" + yield f"gnoise 0 {number(.125)} {number(.25)} 0 0 0" + yield f"gnoise 0 {number(.125)} {number(.25)} 6 0 7" + yield f"gnoise 0 {number(.125)} {number(.25)} 6 1 7" + yield f"gnoise 0 {number(.125)} {number(.25)} 6 3 7" + yield f"gnoise 3 {number(1)} {number(0)} 0 0 0" + yield f"gnoise 1 {number(.25)} {number(0)} 0 0 0" + yield f"gnoise 2 {number(.25)} {number(0)} 0 0 0" + yield f"gnoise 4 {number(-0.0)} {number(0)} 0 0 0" + scale = [0.0, -0.0, .125, 1.0, float('inf'), float('nan'), -.5][scenario % 7] + yield f"gnoise 4 {number(scale)} {number(scale)} 4 3 2" + yield f"gnoise 0 {number(.125)} {number(.25)} 8 0 7" + yield "gcache 12" + parameters = [(.25,.125,80.,160.,8.), (.25,.375,80.,60.,8.), (.25,.25,80.,160.,4.)][scenario % 3] + yield "gblended " + " ".join(number(v) for v in parameters) + yield "gbinary 0 19 20" + yield "gsconstant 00000000" + yield "gsconstant 3f800000" + yield "gspoints 9 2 bf800000 00000000 0 3f800000 00000000 1" + yield "gspoints 12 2 bf800000 00000000 2 3f800000 00000000 2" + yield "gspline 3" + yield "ginterp 21 4 8" + yield "gcache 23" + yield "gclamp 22 bf800000 3f800000" + yield f"gnoise 0 {number(.125)} {number(.25)} 0 0 0" + yield "gsame 9 26" + yield f"gnoise 0 {number(.125)} {number(.25)} 1 0 0" + yield "goffset 3 1" + yield f"gnoise 4 {number(0)} {number(0)} 0 0 0" + yield "gend" + yield "gend" + yield "gsame 30 31" + yield "gcache 30" + yield "gbinary 0 30 12" + yield "gclamp 33 bf800000 3f800000" + yield "ginterp 33 4 8" + yield "gspoints 30 2 bf800000 00000000 0 3f800000 00000000 1" + yield "gspline 4" + yield "gsurface 33 2 -64 8" + for node in range(38): + yield f"ginfo {node}" + yield "gtry 0 8" + for mode, roots in [(0,[5,6,7,9,10,11,12,13,14,15,16,17,20,22,25,27,28,29,30,31,33,34,35,36,37]),(1,[5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37])]: + for root in roots: + yield f"gcompile {mode} {root}" + sampler = index + index += 1 + for enabled in [0,1]: + yield f"context {enabled}" + points = [[0,0,0],[-17,-64,32],[1,7,-1],[1,7,-1],[-2147483648,0,2147483647],[2147483647,-1,-2147483648]] + if root >= 30: + points += [[1024,80,1024],[-1025,-64,1024],[2048,256,-4096]] + for point in points: + yield f"query {sampler} " + " ".join(map(str,point)) + volumes = [([2,5,3],[-17,-64,32],[1,1,1]),([2,5,3],[-16,-64,32],[4,8,4]),([1,3,1],[0,0,0],[1,1,1])] + if root >= 30: + volumes.append(([3,2,3],[1024,-64,1024],[16,64,16])) + for sizes, minimum, steps in volumes: + yield f"volume {sampler} " + " ".join(map(str,sizes+minimum+steps)) + f" 0 {scenario} 2" + for noise in range(5): + yield f"ginstance {noise}" + + for scenario in range(6): + yield f"gseed {-9223372036854775808 if scenario % 2 else 9223372036854775807} {scenario % 2}" + base, count = [(0,3), (1,1), (-1,8)][scenario // 2] + yield f"gregister minecraft:nether/temperature {base} {number(1)} {count} 1 0" + yield "gready" + yield "gconst 00000000" + yield f"gnoise 0 {number(.25)} {number(0)} 0 0 0" + yield "goffset 0 1" + yield "gcache 1" + for root in [1,2,3]: + yield f"ginfo {root}" + for mode in [0,1,1]: + yield f"gtry {mode} {root}" + + # Rounding is appended so the established corpus keeps its original inputs. + rounding_values = floats + ["3effffff","3f000001","beffffff","bf000001", + "3fbfffff","3fc00000","3fc00001","bfbfffff","bfc00000","bfc00001", + "4affffff","4b000000","4effffff","4f000000","ceffffff","cf000000"] + rounding_inputs = [] + for value in rounding_values: + yield f"constant {value}" + rounding_inputs.append(index) + index += 1 + multiples = [-1] + [rounding_inputs[i] for i in [0,1,2,4,5,6,7,10,11,12]] + for kind in range(4): + for input in rounding_inputs: + for multiple in multiples: + yield f"round {kind} {input} {multiple}" + yield f"query {index} -17 -64 32" + yield f"volume {index} 2 3 2 -17 -64 32 4 8 4 {2 if multiple < 0 else 0} {index} 2" + index += 1 + for scenario in range(256): + input = rng.choice(all_children) + multiple = -1 if scenario % 5 == 0 else rng.choice(all_children) + yield f"round {scenario % 4} {input} {multiple}" + yield from probes(index, points=8, exact=multiple >= 0) + index += 1 + + for scenario in range(64): + yield "greset" + for value in ["00000000","80000000","3f800000","bf800000","7fc00000","7f800000",rounding_values[scenario % len(rounding_values)]]: + yield f"gconst {value}" + yield "ggradient 1 0 -64 64 bf800000 3f800000" + for slot, source in enumerate([rng.choice(noise_children),rng.choice(all_children)]): + yield f"counted {source}" + counted = index + index += 1 + yield f"gbind {counted} bf800000 3f800000 {7 if slot == 0 else scenario % 8}" + yield "gcache 8" + for input, multiple, offset in [(8,2,0),(8,9,1),(7,0,2),(7,1,3),(9,6,0),(6,3,1),(10,9,2)]: + yield f"ground {(scenario+offset) % 4} {input} {multiple}" + yield "gcache 12" + yield f"ground {(scenario+3) % 4} 18 11" + yield f"ground {scenario % 4} 6 4" + yield f"ground {scenario % 4} 6 5" + yield f"gbind {rounding_inputs[6]} 3f800000 3f800000 0" + yield f"ground {scenario % 4} 9 22" + for node in range(24): + yield f"ginfo {node}" + for mode, roots in [(0,[11,12,13,14,15,16,20,21,23]),(1,list(range(11,22))+[23])]: + for root in roots: + yield f"gcompile {mode} {root}" + sampler = index + index += 1 + for enabled in [0,1]: + yield f"context {enabled}" + for point in [[0,0,0],[-17,-64,32],[1,7,-1],[-2147483648,0,2147483647],[2147483647,-1,-2147483648]]: + yield f"query {sampler} " + " ".join(map(str,point)) + for counter in [2752+scenario*2,2753+scenario*2]: + yield f"counts {counter}" + for sizes, minimum, steps in [([2,5,3],[-17,-64,32],[1,1,1]),([2,5,3],[-16,-64,32],[4,8,4])]: + yield f"volume {sampler} " + " ".join(map(str,sizes+minimum+steps)) + f" 0 {scenario} 2" + for counter in [2752+scenario*2,2753+scenario*2]: + yield f"counts {counter}" + yield "gcache 6" + yield f"ground {scenario % 4} 24 2" + for root in [24,25]: + for mode in [0,1,1]: + yield f"gtry {mode} {root}" + + for scenario in range(768): + child = rounding_inputs[scenario % len(rounding_inputs)] if scenario < 128 else rng.choice(all_children) + yield f"unary log {child} 00000000 00000000" + yield from probes(index, points=8) + index += 1 + + power_values = floats + ["40000000","c0000000","40400000","c0400000","3fc00000","bfc00000"] + for base in power_values: + for first in power_values: + for last in power_values: + yield f"bounds 2 {base} {base} {first} {last} 00000000 3f800000" + yield f"bounds 3 {first} {last} {base} {base} 00000000 3f800000" + + for scenario in range(64): + yield "greset" + for value in ["00000000","80000000","3f800000","bf800000","7fc00000","7f800000",rounding_values[scenario % len(rounding_values)]]: + yield f"gconst {value}" + yield "ggradient 1 0 -64 64 00000000 40800000" + yield "ggradient 0 0 -32 32 bf800000 3f800000" + yield f"counted {rng.choice(all_children)}" + counted = index + index += 1 + low, high = [("00000000","40800000"),("bf800000","3f800000"),("ff800000","7f800000"),("80000000","80000000"),("bf800000","bf000000"),("7fc00000","7fc00000")][scenario % 6] + yield f"gbind {counted} {low} {high} {scenario % 8}" + yield "gcache 9" + for kind, input in [(9,7),(10,7),(9,8),(10,8),(9,9),(10,9),(9,10),(10,10)]: + yield f"gunary {kind} {input}" + yield "gcache 11" + yield "gbinary 0 17 18" + yield "gclamp 20 bf800000 3f800000" + yield "ground 1 21 2" + yield "gcache 20" + yield "gunary 9 6" + yield "gunary 10 6" + yield "gunary 9 3" + for node in range(27): + yield f"ginfo {node}" + for mode, roots in [(0,[11,12,13,14,15,16,24,25,26]),(1,list(range(11,27)))]: + for root in roots: + yield f"gcompile {mode} {root}" + sampler = index + index += 1 + for enabled in [0,1]: + yield f"context {enabled}" + for point in [[0,0,0],[-17,-64,32],[1,7,-1],[-2147483648,0,2147483647],[2147483647,-1,-2147483648]]: + yield f"query {sampler} " + " ".join(map(str,point)) + yield f"counts {2880+scenario}" + for sizes, minimum, steps in [([2,5,3],[-17,-64,32],[1,1,1]),([2,5,3],[-16,-64,32],[4,8,4]),([1,3,1],[0,0,0],[1,1,1])]: + yield f"volume {sampler} " + " ".join(map(str,sizes+minimum+steps)) + f" 0 {scenario} 2" + yield f"counts {2880+scenario}" + + power_inputs = [] + for value in power_values: + yield f"constant {value}" + power_inputs.append(index) + index += 1 + for mode in range(3): + for base, base_bits in zip(power_inputs, power_values): + for exponent, exponent_bits in zip(power_inputs, power_values): + base_constant = number(struct.unpack(">f", bytes.fromhex(base_bits))[0]) + exponent_constant = number(struct.unpack(">f", bytes.fromhex(exponent_bits))[0]) + fields = [str(base),str(exponent)] if mode == 0 else [base_constant,str(exponent)] if mode == 1 else [str(base),exponent_constant] + yield f"power {mode} " + " ".join(fields) + yield f"query {index} -17 -64 32" + yield f"volume {index} 2 3 2 -17 -64 32 4 8 4 {0 if mode == 0 else 2} {index} 2" + index += 1 + for scenario in range(256): + mode = scenario % 3 + child = rng.choice(all_children) + constant = rng.choice(scales + [2.,-2.,3.,-3.,4.,-4.]) if scenario % 2 else struct.unpack(">d",rng.getrandbits(64).to_bytes(8,"big"))[0] + fields = [str(child),str(rng.choice(all_children))] if mode == 0 else [number(constant),str(child)] if mode == 1 else [str(child),number(constant)] + yield f"power {mode} " + " ".join(fields) + yield from probes(index, points=8, exact=mode == 0) + index += 1 + + for scenario in range(64): + yield "greset" + for value in ["00000000","80000000","3f800000","bf800000","3f000000","bf000000","40000000","c0000000","40400000","c0400000","40800000","c0800000","7fc00000","7f800000","ff800000",power_values[scenario % len(power_values)]]: + yield f"gconst {value}" + yield "ggradient 1 0 -64 64 bf800000 3f800000" + for slot, source in enumerate([rng.choice(noise_children),rng.choice(all_children)]): + yield f"counted {source}" + counted = index + index += 1 + yield f"gbind {counted} bf800000 3f800000 {7 if slot == 0 else scenario % 8}" + yield "gcache 17" + yield "gpow 17 18" + yield "gpow 15 18" + for exponent in [4,5,2,3,6,7,8,9,10,11,12,13,14,0,1]: + yield f"gpow 17 {exponent}" + yield "gpow 15 15" + yield "gpow 19 18" + yield "gpow 18 19" + yield "gcache 20" + yield "gpow 40 21" + yield "gclamp 41 bf800000 3f800000" + yield "ginterp 42 4 8" + yield "gsconstant 00000000" + yield "gsconstant 3f800000" + yield "gspoints 42 2 bf800000 00000000 0 3f800000 00000000 1" + yield "gspline 2" + yield "gsurface 42 2 -64 8" + yield "gpow 12 19" + yield "gcache 46" + for node in range(48): + yield f"ginfo {node}" + for mode, roots in [(0,list(range(20,38))),(1,list(range(20,47)))]: + for root in roots: + if root == 44 and power_values[scenario % len(power_values)] in ["7fc00000","7fa00001"]: + yield f"gtry {mode} {root}" + continue + yield f"gcompile {mode} {root}" + sampler = index + index += 1 + for enabled in [0,1]: + yield f"context {enabled}" + for point in [[0,0,0],[-17,-64,32],[1,7,-1],[-2147483648,0,2147483647],[2147483647,-1,-2147483648]]: + yield f"query {sampler} " + " ".join(map(str,point)) + for counter in [2944+scenario*2,2945+scenario*2]: + yield f"counts {counter}" + for sizes, minimum, steps in [([2,5,3],[-17,-64,32],[1,1,1]),([2,5,3],[-16,-64,32],[4,8,4])]: + yield f"volume {sampler} " + " ".join(map(str,sizes+minimum+steps)) + f" 0 {scenario} 2" + for counter in [2944+scenario*2,2945+scenario*2]: + yield f"counts {counter}" + for root in [46,47]: + for mode in [0,1,1]: + yield f"gtry {mode} {root}" + + + # Context fields are resolved at evaluation time. Deliberately bind values + # outside declared ranges and axes to retain vanilla's compiler behavior. + for scenario in range(16): + sources = [] + for field in range(3): + yield f"gradient {(scenario+field) % 3} {1 if scenario % 5 == 0 else 0} {-17 if scenario % 5 else 0} {32 if scenario % 5 else 0} {floats[(scenario+field) % len(floats)]} {floats[(scenario+field+5) % len(floats)]}" + source = index + index += 1 + yield f"counted {source}" + sources.append(index) + index += 1 + yield f"constant {floats[scenario % len(floats)]}" + fallback = index + index += 1 + roots = [] + for field in range(3): + for default in [-1, fallback]: + yield f"wfield {field} {default}" + roots.append(index) + index += 1 + for source in roots[:6]: + yield f"blenddensity {source}" + roots.append(index) + index += 1 + for slot, source in enumerate(roots[:6]): + yield f"cache {slot} {source}" + roots.append(index) + index += 1 + for root in roots: + for cached in [0,1]: + for blender in [0,1]: + for mask in [0,1,2,4,7]: + bindings = [str(sources[field] if mask & (1<f',progress).hex(),'noclip':noclip} + f={'state':state,'position':[-17,-64,30000000],'entity':'piston','piston':piston,'fail':-1} + yield f + if progress==0.5 and noclip==-1:yield dict(f,fail=1) + + +def collision_corpus(facts,states): + for fixture in corpus(facts,states): + yield fixture + yield dict(fixture,collision=True) + shulkers=[state for state in states if facts['states'][state]['id']=='minecraft:shulker_box'] + rng=random.Random(0x5348554c4b4552) + progress=[0.0,-0.0,1.0,0.1,0.2,0.3,0.5,0.7,0.9,struct.unpack('>f',bytes.fromhex('3f7fffff'))[0],struct.unpack('>f',bytes.fromhex('00000001'))[0]] + progress_pairs=[(old,current) for old in progress for current in progress] + progress_pairs.extend((rng.random(),rng.random()) for _ in range(2048)) + for state in shulkers: + for old,current in progress_pairs: + yield {'state':state,'position':[-17,2147483647,-33],'entity':'opened','fail':-1,'collision':True,'shulker_progress':[struct.pack('>f',v).hex() for v in [old,current]]} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-dynamic-support-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDynamicSupportOracle.java' + helpers=[oracle.with_name(name+'.java') for name in ['VanillaFaceSupportOracle','VanillaBlockStateCodecOracle','VanillaCollisionOracle']] + sources=[oracle,*helpers,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/dynamic_support_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,*helpers],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaDynamicSupportOracle',mode,path],side+'-'+mode) + java('server','export',build) + facts=json.loads((build/'facts.json').read_text());states=json.loads((build/'uncached-states.json').read_text()) + if len(states)!=199:raise ValueError('incomplete uncached support registry') + fixtures=list(collision_corpus(facts,states));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'facts.json',build/'uncached-states.json',build/'block-registry.nbt',build/'cached-collision.nbt'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','dynamic_support_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('dynamic_support_fixture.exe' if os.name=='nt' else 'dynamic_support_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} dynamic-support output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'uncached_states':len(states),'collision_fixtures':sum(bool(f.get('collision')) for f in fixtures),'shulker_progress_fixtures':sum('shulker_progress' in f for f in fixtures),'active_piston_fixtures':sum(f['entity']=='piston' for f in fixtures),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual native support-shape and no-entity-context collision selection, block offsets and all support directions/types for the 199 uncached states. Bamboo, speleothem thickness/direction, scaffolding, powder snow and shulker support are compared over coordinate boundaries and privately allocated block-entity snapshots, including animation state, absent/wrong entity types and failures. Collision checks additionally cover exact shulker bounds and shape representation over progress interpolation boundaries and deterministic finite progress pairs. Moving-piston selection also delegates to actual native entity collision generation for active snapshots; Rust composes the independently tested piston algorithm with registry collision shapes across extension/retraction, source heads, progress boundaries, noclip directions and world-query failures. Entity lifecycle, ticking/pushing and full gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped dynamic-support parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_edge_backoff_parity.py b/tools/test_edge_backoff_parity.py new file mode 100644 index 000000000..859ea2d7f --- /dev/null +++ b/tools/test_edge_backoff_parity.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python3 +"""Compare player crouching edge-backoff probes and lazy guards with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>d',float(v)).hex() + def single(v):return struct.pack('>f',float(v)).hex() + def row(flags=6,mover='SELF',movement=(.3,-.08,.2),step=.6,fall=0,clear=None,fail=-1,bounds=(-.3,1,-.3,.3,2.8,.3)): + return dict(flying=bool(flags&1),staying=bool(flags&2),ground=bool(flags&4),mover=mover,movement=list(map(bits,movement)),step=single(step),fall=bits(fall),clear=clear if clear is not None else [True]*30,fail=fail,box=list(map(bits,bounds))) + for flags in range(8): + for mover in ['SELF','PLAYER','PISTON','SHULKER','SHULKER_BOX']: + for y in [-.1,-0.0,0,.1,float('nan')]: + for fall in [0,.2,.6,1,float('nan')]: + for clear in [[],[False],[True],[False]+[True]*30]:yield row(flags,mover,(.3,y,.2),fall=fall,clear=clear) + values=[-.6,-.1,-math.nextafter(.05,1),-.05,-math.nextafter(.05,0),-1e-9,-0.0,0,1e-9,math.nextafter(.05,0),.05,math.nextafter(.05,1),.1,.6,float('nan'),float('inf')] + for x in values: + for z in values: + for clear in [[],[True]*30,[False,True,False]+[True]*10,[True,False,True,False]+[True]*10]:yield row(movement=(x,-.08,z),clear=clear) + for fail in range(-1,35): + for flags in [0,2,6,7]:yield row(flags=flags,clear=[False]+[True]*40,fail=fail) + rng=random.Random(0x45444745) + for _ in range(6000): + low=[rng.choice([-16,-1,-0.0,0,.1,1,1e8,float('nan')]) for _ in range(3)];high=[v+rng.choice([0,1e-8,.6,1.8]) for v in low] + yield row(flags=rng.randrange(8),mover=rng.choice(['SELF','SELF','PLAYER','PISTON']),movement=[rng.choice(values),rng.choice([-.1,0,.1,float('nan')]),rng.choice(values)],step=rng.choice([0,.5,.6,1,float('nan'),float('inf')]),fall=rng.choice([0,.2,.6,1,float('nan')]),clear=[bool(rng.randrange(2)) for _ in range(50)],fail=rng.choice([-1,-1,0,1,2,3,10]),bounds=(*low,*high)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-edge-backoff-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEdgeBackoffOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/edge_backoff_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaEdgeBackoffOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','edge_backoff_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('edge_backoff_fixture.exe' if os.name=='nt' else 'edge_backoff_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} edge-backoff output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Player.maybeBackOffFromEdge, isAboveGround and canFallAtLeast with controlled step/staying/ground getters and ordered collision-free query results. Compares mover and flight guards, fall-distance boundaries, float step widening, exact thin probe bounds, X/Z/diagonal reductions, signed zero/nonfinite inputs and injected query errors. This does not establish live player crouching state, attribute provisioning or integrated registered-world ledge behavior; those need separate integration checks.'} + lab.write_json(report_path,report);print(f'Scoped edge backoff parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_effect_attribute_modifiers_parity.py b/tools/test_effect_attribute_modifiers_parity.py new file mode 100644 index 000000000..35b6b8472 --- /dev/null +++ b/tools/test_effect_attribute_modifiers_parity.py @@ -0,0 +1,139 @@ +#!/usr/bin/env python3 +"""Compare effect modifier templates and native AttributeInstance integration.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng = random.Random(0x45464641545452) + def bits(v): return struct.pack('>d', float(v)).hex() + values = [-float('inf'), -1e30, -1, -0., 0., 1e-40, .1, 1, 2, 1e16, 1e30, float('inf'), float('nan')] + amplifiers = [-2**31, -2**31 + 1, -2, -1, 0, 1, 2, 127, 255, 256, 2**31 - 2, 2**31 - 1] + names = ['a', 'minecraft:a', ':a', '', 'minecraft:', ':', 'horizon:', 'horizon:/a', 'a:b.c-_/0'] + def template(name='horizon:a', amount=.1, operation=0): + return dict(id=name, amount=bits(amount), operation=operation) + def op(kind, **kw): + row = dict(op=kind, key=0, template=0, target=0, amplifier=0, fail=-1, mutate=-1, mutations=[], read=False) + row.update(kw); return row + def hashes(mode, n): + def unmix(x): + h = ((x ^ (x >> 16)) * pow(0x9e3779b9, -1, 2**32)) & 0xffffffff + return h if h < 0x80000000 else h - 2**32 + if mode == 0: return [0] * n + if mode == 1: return [unmix(31)] * n + if mode == 2: return [unmix(127 + i % 4) for i in range(n)] + if mode == 3: return list(range(n)) + return [rng.randrange(-2**31, 2**31) for _ in range(n)] + def fixture(h, templates, setup, ops, routes=None): + return dict(hashes=h, templates=templates, defaults=[bits(1), bits(20), bits(-0.)], + routes=routes if routes is not None else [i % 3 for i in range(len(h) + 1)], setup=setup, ops=ops) + for amount in values: + for operation in range(3): + for amp in amplifiers: + yield fixture([0], [template(amount=amount, operation=operation)], [op('define')], + [op('create', amplifier=amp), op('add', amplifier=amp), op('value'), + op('add', amplifier=amp, read=True), op('value'), op('remove'), op('value')]) + pool = [template(name, values[i % len(values)], i % 3) for i, name in enumerate(names)] + yield fixture([0] * len(pool), pool, [op('define', key=i, template=i) for i in range(len(pool))], + [op('create'), op('add'), op('add', amplifier=2), op('remove'), op('remove')]) + for mode in range(5): + for n in [0, 1, 8, 24, 25, 49, 64]: + h = hashes(mode, n) + pool = [template('horizon:m' + str(i), values[i % len(values)], i % 3) for i in range(max(n, 1))] + for null in [False, True]: + setup = [op('define', key=i, template=i) for i in range(n)] + if null: setup.append(op('define', key=-1)) + ops = [op('create'), op('add'), op('value', target=0), op('value', target=1), op('value', target=2), + op('add', amplifier=2, read=True), op('remove'), op('remove')] + yield fixture(h, pool, setup, ops) + # Native methods defer template reads until getInstance returns; add reads + # the template again after removeModifier (including its dirty observer). + for mode in range(5): + h = hashes(mode, 64) + pool = [template('horizon:m' + str(i % 5), values[i % len(values)], i % 3) for i in range(64)] + for n in [1, 24, 25, 49]: + setup = [op('define', key=i, template=i) for i in range(n)] + mutations = [[op('define', key=i, template=(i + 1) % 64) for i in range(n)], + [op('null', key=i) for i in range(n)], [op('clear')], + [op('drop', key=i) for i in range(n - 1)], + [op('define', key=i, template=i) for i in range(n, 64)], + [op('route', key=i, target=-1) for i in range(n)], + [op('route', key=i, target=2) for i in range(n)], + [op('define', key=-1, template=7)]] + for kind in ['add', 'remove', 'create']: + for actions in mutations: + for at in [0, 1, 2, 3, 5]: + yield fixture(h, pool, setup, [op('add'), op(kind, amplifier=-1, mutate=at, mutations=actions, read=True), + op('create', amplifier=2**31 - 1), op('remove')]) + for null in [False, True]: + key = -1 if null else 0 + for route in [-1, 0, 1]: + yield fixture([0], [template()], [op('null', key=key), op('route', key=key, target=route)], + [op('add'), op('remove'), op('create')]) + for fail in range(12): + for read in [False, True]: + for kind in ['add', 'remove', 'create']: + pool = [template(), template('horizon:b', .3, 1), template('horizon:c', -.7, 2)] + yield fixture([0, 0, 0], pool, [op('define', key=i, template=i) for i in range(3)], + [op('add'), op(kind, amplifier=3, fail=fail, read=read), op('value'), op('add'), op('remove')]) + for _ in range(300): + n = rng.choice([1, 8, 24, 25, 49]) + pool = [template(rng.choice(names + ['horizon:m' + str(i) for i in range(12)]), rng.choice(values), rng.randrange(3)) for __ in range(20)] + h = hashes(rng.randrange(5), n) + setup = [op('define', key=i, template=rng.randrange(len(pool))) for i in range(n)] + def raw(): + return op(rng.choice(['define', 'define', 'null', 'drop', 'clear', 'route']), key=rng.randrange(-1, n), + template=rng.randrange(len(pool)), target=rng.randrange(-1, 3)) + ops = [] + for __ in range(30): + if rng.randrange(5) == 0: ops.append(raw()); continue + ops.append(op(rng.choice(['add', 'remove', 'create', 'seed', 'value']), + target=rng.randrange(3), template=rng.randrange(len(pool)), amplifier=rng.choice(amplifiers), + fail=rng.choice([-1, -1, -1, 0, 1, 2, 3]), mutate=rng.choice([-1, -1, 0, 1, 2, 3]), + read=bool(rng.randrange(2)), mutations=[raw() for ___ in range(rng.randrange(5))])) + yield fixture(h, pool, setup, ops) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-effect-attribute-modifiers-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEffectAttributeModifiersOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/effect_attribute_modifiers_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaEffectAttributeModifiersOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','effect_attribute_modifiers_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('effect_attribute_modifiers_fixture.exe' if os.name=='nt' else 'effect_attribute_modifiers_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} effect attribute modifier output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'fastutil_sha256':{str(p.relative_to(lab.ROOT)):lab.digest(p,'sha256') for p in libraries if 'fastutil' in str(p)},'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual MobEffect addAttributeModifier/createModifiers/addAttributeModifiers/removeAttributeModifiers with native fastutil definition map and AttributeInstance permanent modifier storage, cached values and dirty observers. Tests wrapping amplifier addition, double scaling, fresh modifier identity, map entry rereads after virtual getInstance/remove callbacks, null/missing instance skipping, map growth/shrink/replacement and partial failures. AttributeMap instance lookup and dirty receiver are controlled; callback mutation touches only definitions/routes. Registry effect definitions, pending attribute set ownership, entity notifications, full gameplay and playable platforms remain pending.'} + lab.write_json(report_path,report);print(f'Scoped effect attribute modifier parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_effect_notifications_parity.py b/tools/test_effect_notifications_parity.py new file mode 100644 index 000000000..71514f30c --- /dev/null +++ b/tools/test_effect_notifications_parity.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +"""Compare native effect eligibility, notification bodies, pending sets and passenger packets.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng=random.Random(0x4e4f54494659) + durations=[-2147483648,-2,-1,0,1,20,200,2147483647] + amps=[-1,0,1,2,255,256,2147483647] + floats=[0,0x80000000,0x3f000000,0x3f800000,0xbf800000,0x7f800000,0x7fc00000] + def state(**kw): + v=dict(key=4,duration=20,amplifier=1,ambient=False,visible=True,icon=True,hidden=-1,factor=0x3f000000,previous=0);v.update(kw);return v + def config(**kw): + v=dict(states=[state(key=i) for i in range(6)],level=0,client=False,removed=False,dirty=False,tags=[False]*3,attributes=0,routes=[0,1],holders=[0,1,2],passengers=[0,2,1,0],connections=[0,1],entity=42);v.update(kw);return v + def op(name,a=4,b=0,**kw): + v=dict(op=name,a=a,b=b,source=-1,partial=0x3f000000,list=[4,5],reapply=True);v.update(kw);return v + def row(**kw): + v=dict(hashes=[0,1,2,3,0,0],attribute_hashes=[0,31,64],initial=config(),after=config(states=[state(key=i,duration=-1,amplifier=9,ambient=True,visible=False,icon=False) for i in range(6)],attributes=1,routes=[1,0],holders=[2,0,1],passengers=[1,0],connections=[1,0],entity=-13,dirty=None),setup=[op('pending-add',0,i) for i in range(3)]+[op('pending-add',1,2)],ops=[op('add'),op('force',5),op('all')],fail=-1,mutate=-1,mutations=[op('put',4,5)]);v.update(kw);return v + for bits in range(8): + for effect in range(6): + for mutate in range(-1,3): + for fail in range(-1,3): + yield row(initial=config(tags=[bool(bits&(1<d',float(v)).hex() + def op(mode,attribute,**kw): + value=dict(mode=mode,attribute=attribute,id='horizon:a',amount=bits(.125),operation=0,base=bits(7));value.update(kw);return value + n=len(catalog['attributes']) + values=[-float('inf'),-1e30,-1.,-0.,0.,1e-40,.1,1.,2.,1e16,1e30,float('inf'),float('nan')] + for entity in catalog['entities']: + for i in range(n): + ops=[op(mode,i) for mode in ['has','base','value','modifier','has_modifier','reset','ensure','modifier','ack_update','ack_sync','value','set','base','value','reset','value','ack_update','ack_sync','add','value','modifier','has_modifier','add','permanent','update','value','remove','value','permanent','value','reset','value','clear','value','ack_sync','ack_update']] + for operation in range(3):ops.extend([op('update',i,operation=operation),op('value',i)]) + yield dict(entity=entity,ops=ops) + rng=random.Random(0x454e54415454) + entities=list(catalog['entities']) + for _ in range(1000): + entity=rng.choice(entities);ops=[] + for __ in range(rng.randrange(20,160)): + ops.append(op(rng.choice(['has','base','value','modifier','has_modifier','reset','ensure','ack_update','ack_sync','set','add','update','permanent','remove','clear']),rng.randrange(n),id=rng.choice(['horizon:a','horizon:b','horizon:c']),amount=bits(rng.choice(values)),base=bits(rng.choice(values)),operation=rng.randrange(3))) + yield dict(entity=entity,ops=ops) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-entity-attribute-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/entity_attribute_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaEntityAttributeOracle',mode,path],side+'-'+mode) + java('server','export',build);states=json.loads((build/'catalog.json').read_text());fixtures=list(corpus(states));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'catalog.json'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','entity_attribute_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('entity_attribute_fixture.exe' if os.name=='nt' else 'entity_attribute_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} entity attribute output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Every registered attribute and entity DefaultAttributes supplier, actual AttributeMap per-attribute queries, lazy creation, mutation, base reset, update/sync membership and independent acknowledgements. Composes the verified attribute arithmetic/cache/modifier engine. Cross-attribute collection order is normalized to registry order; bulk assignment, custom suppliers with modifiers, save/network codecs, live entities and full gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped entity attribute parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_entity_collision_parity.py b/tools/test_entity_collision_parity.py new file mode 100644 index 000000000..609981351 --- /dev/null +++ b/tools/test_entity_collision_parity.py @@ -0,0 +1,81 @@ +#!/usr/bin/env python3 +"""Compare entity collision shape selection and policy queries with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def box(v):return [struct.pack('>d',float(x)).hex() for x in v] + def entity(bounds,collidable=True,spectator=False,policy=0,parent=-1): + return dict(box=box(bounds),collidable=collidable,spectator=spectator,policy=policy,parent=parent) + unit=[0,0,0,1,1,1] + queries=[unit,[-0.0,-0.0,-0.0,0,0,0],[-1,-1,-1,2,2,2],[0,0,0,0,1,1], + [0,0,0,float('nan'),1,1],[-float('inf'),-1,-1,float('inf'),2,2]] + for width in [1e-8,math.nextafter(1e-7,0),1e-7,math.nextafter(1e-7,1),2e-7]: + queries.extend([[0,0,0,width,width,width],[0,0,0,3*width,0,0]]) + boxes=[unit,[0.2,0.2,0.2,0.8,0.8,0.8],[1,0,0,2,1,1],[1+1e-7,0,0,2,1,1], + [math.nextafter(1+1e-7,0),0,0,2,1,1],[0,0,0,1e-8,1,1], + [0.5,0.5,0.5,0.5,0.75,0.75],[3,3,3,4,4,4]] + for bounds in queries: + for candidate in boxes: + for collidable in [False,True]: + for spectator in [False,True]: + for policy in range(3): + entities=[entity(unit,policy=policy),entity(candidate,collidable,spectator),entity(candidate,collidable,spectator,parent=0)] + for source in [-1,0,1]: + for fail in [-1,0,1,2,3,4]:yield dict(box=box(bounds),entities=entities,source=source,fail=fail) + rng=random.Random(0x454e54434f4c4c) + extents=[0,1e-8,1e-7,0.125,0.5,1.0,2.0] + def random_box(): + low=[rng.choice([-1,-1e-8,0,0.5,1-1e-8,1,2]) for _ in range(3)] + return [*low,*[v+rng.choice(extents) for v in low]] + for index in range(3000): + entities=[entity(random_box(),rng.choice([False,True]),rng.randrange(4)==0,rng.randrange(3),rng.randrange(-1,i) if i else -1) for i in range(rng.randrange(15))] + yield dict(box=box(random_box()),entities=entities,source=rng.randrange(-1,len(entities)),fail=rng.choice([-1,-1,0,1,2,5,10])) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-entity-collision-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityCollisionOracle.java' + helper=oracle.with_name('VanillaFaceSupportOracle.java') + sources=[oracle,helper,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/entity_collision_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,helper],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaEntityCollisionOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','entity_collision_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('entity_collision_fixture.exe' if os.name=='nt' else 'entity_collision_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} entity-collision output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual EntityGetter.getEntityCollisions over privately allocated ordered entity snapshots. Compares average-size short circuits, epsilon-inflated query bounds, exact intersection/exclusion and spectator filtering, default canCollideWith including shared vehicle roots, overridden source policies, null-source canBeCollidedWith and emitted shape geometry. Policy callbacks are traced and can fail after each query; candidate lists and vehicle relationships are supplied snapshots. This does not establish live entity storage, broad-phase indexing, entity-type-specific collision policies, lifecycle or gameplay parity.'} + lab.write_json(report_path,report);print(f'Scoped entity-collision parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_entity_fluid_parity.py b/tools/test_entity_fluid_parity.py new file mode 100644 index 000000000..092ed2426 --- /dev/null +++ b/tools/test_entity_fluid_parity.py @@ -0,0 +1,95 @@ +#!/usr/bin/env python3 +"""Compare EntityFluidInteraction immersion and current accumulation with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>d',float(v)).hex() + def single(v):return struct.pack('>f',float(v)).hex() + def cell(kind=2,height=8/9,flow=(1,0,.25)): + return dict(kind=kind,height=single(height),flow=[bits(v) for v in flow]) + def op(**kw): + v=dict(mode='update',bounds=[.1,.1,.1,.9,.9,.9],base_y=0,eye=.8,block=[0,0,0],ignore=False,min_section=-1,wet=[False,True,False],missing=[],sturdy=False,cells={},default=cell(),tags=[6,24,30,0],velocity=[0,0,0],after_velocity=[1,2,3],after_block=[1,0,1],mutate_at=-1,fail=-1,tag=0,speed=.014) + v.update(kw) + for k in ['base_y','eye','speed']:v[k]=bits(v[k]) + for k in ['bounds','velocity','after_velocity']: + if v[k] is not None:v[k]=[bits(n) for n in v[k]] + return v + def row(ops,player=False,order=(0,1,2)):return dict(ops=ops,player=player,order=order) + values=[-float('inf'),-1,-.0,0,.1,.39999998,.4,.40000004,8/9,1,2,float('inf'),float('nan')] + for kind in range(5): + for height in values: + for eye in values: + for sturdy in [False,True]: + yield row([op(default=cell(kind,height),eye=eye,sturdy=sturdy),op(mode='apply'),op(bounds=None),op(bounds=None)]) + for player in [False,True]: + for flow in [(0,0,0),(.0031622776,0,0),(.0031622777,0,0),(1,0,.25),(-1,0,1),(1,float('nan'),2),(float('inf'),0,0)]: + for speed in values+[.003,.0045,.004500000000000001]: + for velocity in [(0,0,0),(.003,0,0),(.0029999999999,0,0),(0,0,.003),(float('nan'),0,0)]: + yield row([op(bounds=[0,0,0,2,1,1],default=cell(flow=flow)),op(mode='apply',speed=speed,velocity=velocity)],player) + cells={'0 0 0':cell(1,.2,(1,0,0)),'0 0 1':cell(2,.3,(0,1,0)),'0 1 0':cell(3,.4,(0,0,1)),'0 1 1':cell(4,.5,(-1,0,0)),'1 0 0':cell(1,.1,(0,-1,0))} + for order in [[],[0],[0,1,2],[2,0,1],[0,0,1],[3,1,0]]: + for ignore in [False,True]: + for fail in range(-1,70): + for mutate in [-1,9]: + yield row([op(bounds=[0,0,0,2,2,2],cells=cells,default=cell(0),ignore=ignore,fail=fail,mutate_at=mutate),*[op(mode='apply',tag=t,mutate_at=0) for t in range(4)],op(default=cell(3),tags=[24,6,30,0]),op(default=cell(0)),op(default=cell(0))],order=order) + for bounds in [[0,0,0,0,0,0],[-17,-17,-17,-16,-16,-16],[-.1,15.9,-.1,.1,16.1,.1],[15,0,15,17,1,17],[17,0,17,15,1,15],[0,32,0,1,33,1]]: + for wet in [[False,False,False],[True,False,False],[False,True,False],[False,False,True],[True,True,True]]: + for missing in [[],['0 0'],['1 1'],['-1 -1']]:yield row([op(bounds=bounds,wet=wet,missing=missing)]) + for lo,hi in [(-2147483649.,-2147483648.),(-1e30,-1e30),(2147483648.,2147483649.),(1e30,1e30)]: + for axis in range(3): + bounds=[0.,0.,0.,1.,1.,1.];bounds[axis]=lo;bounds[axis+3]=hi + yield row([op(bounds=bounds,fail=2)]) + rng=random.Random(0x454e54464c554944) + for _ in range(3000): + ops=[] + for i in range(rng.randrange(1,7)): + ops.append(op(mode=rng.choice(['update','update','apply']),bounds=rng.choice([None,[0,0,0,2,2,2],[.1,.1,.1,.9,.9,.9],[-1,-1,-1,1,1,1]]),cells=cells,default=cell(rng.randrange(5),rng.choice(values),tuple(rng.choice(values) for _ in range(3))),base_y=rng.choice(values),eye=rng.choice(values),sturdy=bool(rng.randrange(2)),ignore=bool(rng.randrange(2)),tags=[rng.randrange(32) for _ in range(4)],fail=rng.choice([-1,-1,*range(25)]),mutate_at=rng.choice([-1,-1,*range(15)]),speed=rng.choice(values),tag=rng.randrange(4))) + yield row(ops,bool(rng.randrange(2)),rng.sample(range(4),rng.randrange(5))) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-entity-fluid-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityFluidOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/entity_fluid_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaEntityFluidOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','entity_fluid_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('entity_fluid_fixture.exe' if os.name=='nt' else 'entity_fluid_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} entity-fluid output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual EntityFluidInteraction update, tracker pruning, body/eye depth, loaded-chunk preflight, overlapping/reloaded tags, ordered current accumulation and native Entity.addDeltaMovement. Controlled fluid height/flow and camera-support cells, real ProtoChunk section fluid flags, player versus nonplayer classes, callback mutations and injected failures. Live fluid flow/propagation and full entity/world integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped entity fluid parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_entity_fluid_tick_parity.py b/tools/test_entity_fluid_tick_parity.py new file mode 100644 index 000000000..7036e8514 --- /dev/null +++ b/tools/test_entity_fluid_tick_parity.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python3 +"""Compare Entity fluid tick composition, entry effects and current forces with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +try: + from . import test_entity_fluid_parity as immersion +except ImportError: + import test_entity_fluid_parity as immersion + +def corpus(): + import copy + def bits(v):return struct.pack('>d',float(v)).hex() + rng=random.Random(0x464c5549445449434b) + def convert(f,**kw): + f=copy.deepcopy(f);f['tick_initial']=dict(touch=kw.get('touch',False),first=kw.get('first',False),fall=bits(8)) + for op in f['ops']: + if op['mode']=='update':op['mode']='tick' + op.update(pushed=kw.get('pushed',[True,True]),fast_lava=kw.get('fast',False),after_touch=kw.get('after_touch',True),after_first=kw.get('after_first',True),after_fall=bits(-3)) + return f + cases=list(immersion.corpus()) + for f in cases: + yield convert(f,touch=bool(rng.randrange(2)),first=bool(rng.randrange(2)),pushed=rng.choice([[True],[False],[False,True],[True,False]]),fast=bool(rng.randrange(2)),after_touch=bool(rng.randrange(2)),after_first=bool(rng.randrange(2))) + seed=copy.deepcopy(cases[0]);seed['ops']=seed['ops'][:1] + op=seed['ops'][0];op['bounds']=[bits(v) for v in [0,0,0,1,1,2]];op['eye']=bits(.5) + op['cells']={'0 0 0':dict(kind=2,height=struct.pack('>f',.8).hex(),flow=[bits(v) for v in [1,0,0]]),'0 0 1':dict(kind=4,height=struct.pack('>f',.8).hex(),flow=[bits(v) for v in [0,0,1]])} + for flags in range(64): + f=convert(seed,touch=bool(flags&1),first=bool(flags&2),pushed=[bool(flags&4),bool(flags&8)],fast=bool(flags&16),after_touch=bool(flags&32),after_first=False) + for fail in range(-1,29): + for mutate in [-1,0,18,21,24]: + g=copy.deepcopy(f);g['ops'][0]['fail']=fail;g['ops'][0]['mutate_at']=mutate;yield g + for f in cases[:100]: + g=convert(f);g['ops']*=3;yield g + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-entity-fluid-tick-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityFluidOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_entity_fluid_parity.py',lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/entity_fluid_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaEntityFluidOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','entity_fluid_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('entity_fluid_fixture.exe' if os.name=='nt' else 'entity_fluid_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} entity-fluid-tick output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Entity.updateFluidInteraction composing EntityFluidInteraction update and current application. Compares both push predicate calls, water-entry fall reset and splash dispatch, retained touching-water state, first tick, water/lava current coefficients and FAST_LAVA dimension attribute selection. Includes ordered/reloaded tags, controlled cell heights/flows, player/nonplayer classes, mutations and failures before/after partial writes. Splash audio/particles and full live world/entity gameplay binding remain pending.'} + lab.write_json(report_path,report);print(f'Scoped entity fluid tick parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_entity_move_parity.py b/tools/test_entity_move_parity.py new file mode 100644 index 000000000..662ca393f --- /dev/null +++ b/tools/test_entity_move_parity.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python3 +"""Compare Entity.move lifecycle ordering, state writes and recording with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + import itertools + def bits(v):return struct.pack('>d',float(v)).hex() + def single(v):return struct.pack('>f',float(v)).hex() + def row(**kw): + f=dict(movement=list(map(bits,[.4,-.2,.3])),position=list(map(bits,[.5,1.,.5])),velocity=list(map(bits,[.1,-.8,.2])),stuck=list(map(bits,[0,0,0])),piston_result=list(map(bits,[.25,0,0])),edge_result=list(map(bits,[.1,0,.2])),edge_override=False,no_physics=False,mover=0,client=False,client_authority=False,local_client=False,ground=True,horizontal=False,vertical=False,below=False,minor=False,minor_result=True,removed=False,distance=bits(5),clip_hit=False,fall_mutates=False,fall_removes=False,mutated_horizontal=False,mutated_vertical=False,mutated_below=False,emits=False,speed=single(.4),history=0,shapes=[],fail=-1) + f.update(kw);return f + scenes=[[],[[0,0,0,1,1,1]],[[1,0,0,2,3,1]],[[0,3,0,1,4,1]],[[0,0,1,1,3,2]],[[0,0,0,1,.9375,1]],[[0,0,0,1,1,1],[1,0,0,2,3,1],[0,0,1,1,3,2]]] + motions=[[0,0,0],[-0.,0,0],[1e-200,-1e-200,1e-200],[1e-4,-1e-4,1e-4],[.4,-.2,.3],[2,-1,2],[-2,-5,-2],[0,9,0],[1e-5,0,-1e-5],[0,0,math.nan],[0,math.nan,0],[math.inf,0,0]] + for shapes,motion,mover,client,authority,local in itertools.product(scenes,motions,range(5),[False,True],[False,True],[False,True]): + yield row(shapes=[[bits(v) for v in b] for b in shapes],movement=list(map(bits,motion)),mover=mover,client=client,client_authority=authority,local_client=local,emits=True) + for mover,no_physics,stuck,piston,fail in itertools.product(range(5),[False,True],[[0,0,0],[1e-200,0,0],[.1,.2,.3],[math.nan,1,1],[math.inf,0,0]],[[0,0,0],[-0.,0,0],[0,-0.,0],[0,0,-0.],[.25,0,0]],range(-1,12)): + yield row(mover=mover,no_physics=no_physics,stuck=list(map(bits,stuck)),piston_result=list(map(bits,piston)),fail=fail,horizontal=True,vertical=True,below=True,minor=True) + for shapes,flags,fail in itertools.product(scenes,range(32),range(-1,38)): + yield row(shapes=[[bits(v) for v in b] for b in shapes],fall_mutates=True,fall_removes=bool(flags&1),mutated_horizontal=bool(flags&2),mutated_vertical=bool(flags&4),mutated_below=bool(flags&8),clip_hit=bool(flags&16),movement=list(map(bits,[2,-2,2])),fail=fail) + for count,fail,no_physics in itertools.product([0,1,98,99,100],range(-1,30),[False,True]):yield row(history=count,fail=fail,no_physics=no_physics) + rng=random.Random(0x4d4f56454d454e54) + values=[-math.inf,-1e30,-2.,-0.,0.,1e-200,1e-7,1.,1e30,math.inf,math.nan] + for _ in range(6000): + yield row(movement=list(map(bits,rng.choice(motions))),shapes=[[bits(v) for v in b] for b in rng.choice(scenes)],mover=rng.randrange(5),stuck=[bits(rng.choice([0,.5,1,math.nan])) for _ in range(3)],piston_result=[bits(rng.choice(values)) for _ in range(3)],edge_override=bool(rng.randrange(2)),edge_result=[bits(rng.choice(values)) for _ in range(3)],velocity=[bits(rng.choice(values)) for _ in range(3)],no_physics=bool(rng.randrange(2)),client=bool(rng.randrange(2)),client_authority=bool(rng.randrange(2)),local_client=bool(rng.randrange(2)),ground=bool(rng.randrange(2)),horizontal=bool(rng.randrange(2)),vertical=bool(rng.randrange(2)),below=bool(rng.randrange(2)),minor=bool(rng.randrange(2)),minor_result=bool(rng.randrange(2)),removed=bool(rng.randrange(2)),distance=bits(rng.choice(values)),clip_hit=bool(rng.randrange(2)),fall_mutates=bool(rng.randrange(2)),fall_removes=bool(rng.randrange(2)),mutated_horizontal=bool(rng.randrange(2)),mutated_vertical=bool(rng.randrange(2)),mutated_below=bool(rng.randrange(2)),emits=bool(rng.randrange(2)),speed=single(rng.choice(values)),fail=rng.randrange(-1,34)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-entity-move-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityMoveOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/entity_move_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaEntityMoveOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','entity_move_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('entity_move_fixture.exe' if os.name=='nt' else 'entity_move_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} entity-move output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Entity.move with native shape collision resolution (zero step height), native zero-restitution handling and final authority checks. Compares no-physics and piston early exits including signed zero, stuck multiplier reset, edge callback, fall-reset clip endpoints, movement recording cap, collision flag writes, ground/fall callback ordering, removal, passenger emission guard, speed multiplication and failures after partial state changes. Providers control piston/edge decisions, ground support, ray hits, landing effects and sound policy; live world integration and non-passenger movement emission remain separate work.'} + lab.write_json(report_path,report);print(f'Scoped entity move parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_entity_obstruction_parity.py b/tools/test_entity_obstruction_parity.py new file mode 100644 index 000000000..9024ccb75 --- /dev/null +++ b/tools/test_entity_obstruction_parity.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 +"""Compare entity obstruction queries and shape intersection with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def box(values):return [struct.pack('>d',float(v)).hex() for v in values] + def entity(bounds,building=True,removed=False,spectator=False,parent=-1): + return {'box':box(bounds),'building':building,'removed':removed,'spectator':spectator,'parent':parent} + unit=[0,0,0,1,1,1] + shapes=[[],[unit],[[0,0,0,1,0.5,1]],[[0,0,0,1,0.25,1],[0,0.75,0,1,1,1]],[[0,0,0,1e-8,1,1]],[[1,1,1,0,0,0]],[[2147483647,0,-2147483648,2147483648,1,-2147483647]]] + boxes=[unit,[0.2,0.4,0.2,0.8,0.6,0.8],[1,0,0,2,1,1],[0.5,0.5,0.5,0.5,0.75,0.75],[-1e-8,0,0,1e-8,1,1],[1-1e-8,0,0,2,1,1],[1-2e-7,0,0,2,1,1],[2,2,2,3,3,3],[2147483647,0,-2147483648,2147483648,1,-2147483647]] + variants=[[]] + for bounds in boxes: + for flags in range(8):variants.append([entity(bounds,bool(flags&1),bool(flags&2),bool(flags&4))]) + for parent in [-1,0]: + variants.append([entity(unit),entity(unit,parent=parent),entity([0.2,0.4,0.2,0.8,0.6,0.8],parent=1)]) + variants.append([entity(unit,False),entity(unit,parent=parent),entity(unit,removed=True,parent=1)]) + for shape in shapes: + for entities in variants: + for exclude in range(-1,len(entities)): + for fail in [False,True]:yield {'shape':[box(v) for v in shape],'entities':entities,'exclude':exclude,'fail':fail} + rng=random.Random(0x484f52495a4f4e) + extents=[-1.0,0.0,1e-8,1e-7,2e-7,0.125,0.5,1.0,2.0] + def random_box(): + low=[rng.choice([-2.0,-1e-8,0.0,0.5,1.0-1e-8,1.0,2.0]) for _ in range(3)] + return [*low,*[v+rng.choice(extents) for v in low]] + for index in range(3000): + shape=[box(random_box()) for _ in range(rng.randrange(1,5))] + entities=[entity(random_box(),rng.choice([True,True,False]),rng.randrange(4)==0,rng.randrange(4)==0,rng.randrange(-1,i) if i else -1) for i in range(rng.randrange(1,13))] + yield {'shape':shape,'entities':entities,'exclude':rng.randrange(-1,len(entities)),'fail':index%17==0} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-entity-obstruction-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityObstructionOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/entity_obstruction_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaEntityObstructionOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','entity_obstruction_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('entity_obstruction_fixture.exe' if os.name=='nt' else 'entity_obstruction_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} entity-obstruction output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual EntityGetter.isUnobstructed, its default non-spectator query, Entity removal/root-vehicle methods and voxel intersection execute over privately allocated entity snapshots. Empty shapes, excluded identities, spectators, removed/non-building entities, same-root vehicle exclusions, ordered broad-phase queries and selected candidates, thin boxes, boundary contacts, composite shapes and query failures are compared. Entity construction, lifecycle, spatial indexing, vehicle maintenance and full gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped entity-obstruction parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_extra_items_parity.py b/tools/test_extra_items_parity.py new file mode 100644 index 000000000..33f20ff43 --- /dev/null +++ b/tools/test_extra_items_parity.py @@ -0,0 +1,83 @@ +#!/usr/bin/env python3 +"""Compare native extra-item deliverys and strict scalar stack validation.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + edges=[-2147483648,-1,0,1,2,64,2147483647] + def item(count=2,remainder=1,maximum=None,damage=False,cooldown=0x3f800000,group=0):return dict(count=count,remainder=remainder,maximum=maximum,damage=damage,cooldown=cooldown,group=group) + def config(items=None,**kw): + v=dict(items=items or [item(),item(1,None,cooldown=None)],finish=0,infinite=False,prototype_max=64,clock=0,extra_count=2,original_count=3,selected=0,slots=[]);v.update(kw);return v + def row(initial=None,after=None,**kw): + v=dict(initial=initial or config(),after=after or config([item(1,None,cooldown=None),item(2,None,cooldown=0x40000000,group=1)]),source=0,player=True,fail=-1,mutate=-1);v.update(kw);return v + for count in edges: + for finish in range(3): + for infinite in [False,True]: + for player in [False,True]: + for mutate in [-1,0,1,2,3,4,5]: + for fail in [-1,0,1,2,3,4,5]: + yield row(config([item(count),item(1,None,cooldown=None)],finish=finish,infinite=infinite),source=0,player=player,mutate=mutate,fail=fail) + for existing in [0,1,63,64]: + for remainder in [1,2,64]: + for occupied in [0,1,35,36]: + for offhand in [False,True]: + for infinite in [False,True]: + initial=config([item(2,remainder),item(existing,None,cooldown=None)],slots=[[i,1] for i in range(occupied)]+([[40,1]] if offhand else [])) + after=config([item(1,remainder),item(existing,None,cooldown=None)],slots=initial['slots'],infinite=infinite) + yield row(initial,after,mutate=0) + rng=random.Random(0x4146544552555345) + def random_item():return item(rng.choice(edges),rng.choice([None,-1,1,2,64,2147483647]),rng.choice([None,*edges]),bool(rng.randrange(2)),rng.choice([None,0,0x80000000,0x3d4ccccd,0x7f800000,0xff800000,0x7fc00000,rng.randrange(0x100000000)]),rng.randrange(-1,4)) + def random_config():return config([random_item(),random_item()],finish=rng.randrange(3),infinite=bool(rng.randrange(2)),prototype_max=rng.choice(edges),clock=rng.choice(edges),extra_count=rng.choice(edges),original_count=rng.choice(edges)) + for _ in range(2400): + initial=random_config();after=random_config() + for c in [initial,after]: + c['selected']=rng.randrange(9) + c['slots']=[[i,rng.randrange(3)] for i in rng.sample(range(43),rng.randrange(44))] + yield row(initial,after,source=rng.randrange(3),player=bool(rng.randrange(2)),mutate=rng.randrange(-1,9),fail=rng.randrange(-1,9)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-extra-items-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaExtraItemsOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/extra_items_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaExtraItemsOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','extra_items_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('extra_items_fixture.exe' if os.name=='nt' else 'extra_items_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} extra-item delivery output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual ItemStack.finishUsingItem with validated remainders and cooldowns now invokes inherited ServerPlayer.handleExtraItemsCreatedOnUse and real Inventory/PlayerEquipment insertion. Shared item/component references, occupied/aliased slots, offhand merging, creative material queries, partial insertion and the drop fallback are compared through mutation/failure prefixes. The drop call verifies throwRandomly=false and predicted semantics; its entity-spawn body is controlled. Rust composes item-after-use and inventory pickup. Item handlers, full contained schemas, dropped-entity creation, complete use lifecycle and full gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped extra-item delivery parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_face_support_parity.py b/tools/test_face_support_parity.py new file mode 100644 index 000000000..662504fec --- /dev/null +++ b/tools/test_face_support_parity.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 +"""Compare face slicing and support geometry with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def nums(v):return [struct.pack('>d',float(x)).hex() for x in v] + for cube in [False,True]: + for mask in range(256):yield {'coords':[nums([0,0.5,1])]*3,'cube':cube,'occupied':[bool(mask&(1<d',float(v)).hex() + def row(fall=2,dy=-.08,ground=True,water=False,support=None,after_support=None,mutate=False,fail=-1):return dict(fall=bits(fall),dy=bits(dy),ground=ground,water=water,support=support,after_support=after_support,mutate=mutate,fail=fail) + values=[-float('inf'),-1e40,-1,-.08,-1e-46,-0.0,0,1e-46,.08,1,1e40,float('inf'),float('nan')] + for fall in values: + for dy in values: + for ground in [False,True]: + for water in [False,True]: + for support in [None,[17,-64,-33]]:yield row(fall,dy,ground,water,support) + for fall in [-1,0,2,float('nan')]: + for dy in [-1,-1e-46,0,1]: + for support in [None,[17,-64,-33]]: + for after in [None,[31,15,-1]]: + for mutate in [False,True]: + for fail in range(-1,6):yield row(fall,dy,support=support,after_support=after,mutate=mutate,fail=fail) + rng=random.Random(0x46414c4c) + for _ in range(5000): + fall=rng.uniform(-.5,10);dy=rng.uniform(-2,1) + if rng.randrange(4)==0:fall=rng.choice(values) + if rng.randrange(4)==0:dy=rng.choice(values) + yield row(fall,dy,bool(rng.randrange(2)),bool(rng.randrange(2)),rng.choice([None,[17,-64,-33]]),rng.choice([None,[31,15,-1]]),bool(rng.randrange(2)),rng.choice([-1,-1,0,1,2,3,4,5])) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-fall-damage-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFallDamageOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/fall_damage_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaFallDamageOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','fall_damage_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('fall_damage_fixture.exe' if os.name=='nt' else 'fall_damage_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} fall-damage output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual base Entity.checkFallDamage with controlled water state, block landing callback, supporting-block lookup, HIT_GROUND emission and reset. Compares float-narrowed downward displacement accumulation, grounded branches, state/position/support mutations during landing, callback order, nonfinite arithmetic and partial state after failures. LivingEntity fluid updates/particles, registered Block.fallOn behavior, health/damage/attributes and the full movement lifecycle are not established by this scoped check.'} + lab.write_json(report_path,report);print(f'Scoped fall damage parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_feature_catalog_parity.py b/tools/test_feature_catalog_parity.py new file mode 100644 index 000000000..39a290ed3 --- /dev/null +++ b/tools/test_feature_catalog_parity.py @@ -0,0 +1,125 @@ +#!/usr/bin/env python3 +"""Compare named feature holders and tags and ordered world mutations with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def catalog(): + encode=lambda value:json.dumps(value,separators=(',',':')) + features={'horizon:no_op':{'type':'no_op'},'horizon:island':{'type':'end_island'},'horizon:platform':{'type':'end_platform'},'horizon:void':{'type':'void_start_platform'},'minecraft:noop':{'type':'no_op'}} + features['horizon:fill']={'type':'fill_layer','height':1,'state':{'id':'oak_log','properties':{'axis':'x'}}} + features['horizon:replace']={'type':'replace_single_block','targets':[{'target':{'predicate_type':'random_block_match','block':'stone','probability':0.5},'state':'gold_ore'},{'target':{'predicate_type':'block_match','block':'oak_log'},'state':{'id':'water','properties':{'level':'1'}}}]} + features['horizon:scatter']={'type':'scattered_ore','targets':[{'target':{'predicate_type':'block_match','block':'stone'},'state':'iron_ore'}],'size':8,'discard_chance_on_air_exposure':0.5} + placed={ + 'horizon:a_noop':{'feature':'horizon:no_op','placement':[]}, + 'horizon:b_false':{'feature':'horizon:no_op','placement':[{'type':'count','count':0}]}, + 'horizon:c_island':{'feature':'horizon:island','placement':[{'type':'in_square'}]}, + 'horizon:d_platform':{'feature':'horizon:platform','placement':[{'type':'offset','x':1,'y':2,'z':-1}]}, + 'horizon:e_nested':{'feature':{'type':'simple_random_selector','features':['horizon:c_island','horizon:d_platform','horizon:b_false']},'placement':[{'type':'count','count':2}]}, + 'minecraft:noop':{'feature':'minecraft:noop','placement':[]}, + 'horizon:h_scatter':{'feature':'horizon:scatter','placement':[]}, + 'horizon:f_fill':{'feature':'horizon:fill','placement':[{'type':'in_square'}]}, + 'horizon:g_replace':{'feature':'horizon:replace','placement':[{'type':'count','count':2},{'type':'in_square'},{'type':'height_range','height':{'absolute':-63}}]}, + } + placed['horizon:i_filtered']={'feature':'horizon:replace','placement':[{'type':'count','count':3},{'type':'block_predicate_filter','predicate':{'type':'matching_blocks','blocks':['stone','oak_log']}}]} + placed['horizon:j_scan']={'feature':'horizon:replace','placement':[{'type':'environment_scan','direction_of_search':'down','target_condition':{'type':'matching_blocks','blocks':'stone'},'allowed_search_condition':{'type':'not','predicate':{'type':'matching_blocks','blocks':'obsidian'}},'max_steps':8}]} + placed['horizon:k_volume']={'feature':'horizon:no_op','placement':[{'type':'block_predicate_filter','predicate':{'type':'volume_match','min':[-1,0,-1],'max':[1,1,1],'match':{'type':'not','predicate':{'type':'matching_blocks','blocks':'air'}}}}]} + placed['horizon:l_fluids']={'feature':{'type':'replace_single_block','targets':[{'target':{'predicate_type':'block_match','block':'water'},'state':'stone'}]},'placement':[{'type':'count','count':3},{'type':'block_predicate_filter','predicate':{'type':'matching_fluids','fluids':['flowing_water']}}]} + placed['horizon:m_fluid_sequence']={'feature':{'type':'sequence','features':[{'feature':{'type':'fill_layer','height':128,'state':{'id':'water','properties':{'level':'1'}}},'placement':[]},'horizon:l_fluids']},'placement':[]} + tags={ + 'horizon:nonempty':{'values':['horizon:a_noop','horizon:c_island','horizon:d_platform','horizon:c_island']}, + 'horizon:empty':{'values':[]}, + 'horizon:nested':{'values':['#horizon:nonempty','horizon:e_nested','horizon:f_fill','horizon:g_replace','horizon:h_scatter','horizon:i_filtered','horizon:j_scan','horizon:k_volume','horizon:m_fluid_sequence']}, + 'horizon:optional':{'values':[{'id':'horizon:missing','required':False},'horizon:a_noop']}, + 'horizon:invalid':{'values':['horizon:missing']}, + } + features['horizon:overlay']={'type':'overlay','features':[{'feature':{'type':'no_op'},'placement':[{'type':'count','count':0}]},{'feature':{'type':'end_island'},'placement':[{'type':'in_square'}]},{'feature':{'type':'end_platform'},'placement':[]}]} + placed['horizon:n_overlay']={'feature':'horizon:overlay','placement':[{'type':'count','count':2}]} + features['horizon:composite']={'type':'sequence','features':'#horizon:nested'} + return {key:{name:encode(value) for name,value in values.items()} for key,values in [('features',features),('placed',placed),('tags',tags)]} + + +def definitions(): + inline={'feature':'horizon:island','placement':[]} + for root in [*catalog()['features'],'noop',':noop','horizon:missing','#horizon:no_op','HORIZON:no_op',None,False,[]]:yield False,root + for root in [*catalog()['placed'],'noop',':noop','horizon:missing','#horizon:nonempty',inline,{'feature':'horizon:composite','placement':[{'type':'count','count':2}]}]:yield True,root + for values in ['horizon:c_island','#horizon:nonempty','#horizon:empty','#horizon:nested','#horizon:optional','#horizon:invalid','#horizon:missing',[],['horizon:c_island','horizon:c_island'],['horizon:a_noop','horizon:b_false','horizon:c_island'],['horizon:c_island',inline],[inline,'horizon:c_island'],inline]: + for kind in ['sequence','overlay','simple_random_selector']:yield False,{'type':kind,'features':values} + for name in ['horizon:e_nested','horizon:b_false','horizon:missing']: + yield False,{'type':'random_boolean_selector','feature_true':name,'feature_false':inline} + yield False,{'type':'random_selector','features':[{'feature':name,'chance':0.5}],'default':'horizon:d_platform'} + yield False,{'type':'weighted_random_selector','features':[{'data':name,'weight':0},{'data':'horizon:d_platform','weight':1}]} + for blocks in [[],['stone','stone','water'],['missing'],'missing','#missing',['#tag'],None]: + yield True,{'feature':'horizon:replace','placement':[{'type':'block_predicate_filter','predicate':{'type':'matching_blocks','blocks':blocks}}]} + for fluids in ['empty','water','flowing_water','lava',[],['water','flowing_water'],'missing','#missing',['#water'],None]: + yield True,{'feature':'horizon:replace','placement':[{'type':'block_predicate_filter','predicate':{'type':'matching_fluids','fluids':fluids}}]} + + +def corpus(): + for legacy in [False,True]: + for seed in [0,-1,0x123456789abcdef]: + for placed,definition in definitions(): + for fail in [-1,0,7]: + for reject in [0,3]: + for worldgen in [False,True]: + yield {'worldgen':worldgen,'definition':json.dumps(definition,separators=(',',':')),'placed_root':placed,'origin':[15,64,15],'legacy':legacy,'seed':seed,'reject':reject,'fail':fail,'repeats':2} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-feature-catalog-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureCatalogOracle.java" + helper=oracle.with_name("VanillaPlacementOracle.java") + state_helper=oracle.with_name("VanillaBlockStateCodecOracle.java") + sources=[oracle,helper,state_helper,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/feature_catalog_fixture.rs"] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus());inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + resources=build/"catalog.json";resources.write_text(json.dumps(catalog(),separators=(",",":")),encoding="utf-8") + fixture_paths=[inputs,resources];tested_fixtures=base.source_hashes(fixture_paths);classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper,state_helper],"compile-java") + for side,jar in jars.items(): + path=build/f"facts-{side}.json" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaFeatureCatalogOracle","export",path],side+"-export") + fixture_paths.append(path) + if json.loads((build/"facts-client.json").read_text())!=json.loads((build/"facts-server.json").read_text()):raise ValueError("reference feature block states differ") + tested_fixtures=base.source_hashes(fixture_paths) + run(["cargo","build","--release","-p","horizon-world","--example","feature_catalog_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("feature_catalog_fixture.exe" if os.name=="nt" else "feature_catalog_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaFeatureCatalogOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} feature-catalog output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"worldgen_random_modes":[False,True],"basic_features":3,"composition_features":7,"definitions":len(list(definitions())),"block_states":35723,"configured_block_features":3,"named_features":len(catalog()["features"]),"named_placed_features":len(catalog()["placed"]),"tag_files":len(catalog()["tags"]),"requested_placements":sum(f["repeats"] for f in fixtures), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual Feature.CODEC and PlacedFeature.CODEC bind named and inline holders through RegistryOps and registered feature/placed-feature snapshots. Native TagLoader resolves ordered nested, duplicate, empty, optional-missing and required-missing placed-feature tags. Overlay accumulated success and non-short-circuit execution, including empty named tags, are compared. Root holders, named children, tag lists, mixed inline/named lists, namespace shorthand, unknown names and unselected malformed children are compared. Registry-bound fill-layer, single-block replacement and scattered-ore states execute through named roots, nested tags and composed placement. Registry-bound matching-block/fluid predicates also execute through filters, ordered volumes, environment scans and composed named features against the mutable world, including a flowing-water fill followed by repeated fluid-filtered replacement. Actual feature algorithms, nested placement, ordered world mutations, rejected writes, partial failures and direct and WorldgenRandom-wrapped legacy/xoroshiro streams execute through the same mutable world transport. Rust expands requested immutable resource roots with bounded dependency/node traversal; unused resources, cyclic references, registry reload/lifecycle, encoding, all feature algorithms and complete world generation remain outside this comparison."} + + + lab.write_json(report_path,report);print(f"Scoped feature-catalog parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_feature_graph_parity.py b/tools/test_feature_graph_parity.py new file mode 100644 index 000000000..876b9bc3c --- /dev/null +++ b/tools/test_feature_graph_parity.py @@ -0,0 +1,108 @@ +#!/usr/bin/env python3 +"""Compare inline feature graphs and ordered world mutations with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def definitions(): + placed=lambda kind,mods=[]:{'feature':{'type':kind},'placement':mods} + noop=placed('no_op');false=placed('no_op',[{'type':'count','count':0}]);island=placed('end_island') + platform=placed('end_platform',[{'type':'offset','x':1,'y':2,'z':-1}]) + yield {'type':'no_op'} + for kind in ['sequence','overlay','simple_random_selector']: + for features in [[],[noop],[false],[island],[false,island],[island,false],[false,false],[noop,false,island,platform],[noop,island,platform],None,noop]: + yield {'type':kind,'features':features} + for yes,no in [(noop,false),(false,island),(island,platform),(false,false)]: + yield {'type':'random_boolean_selector','feature_true':yes,'feature_false':no} + for chance in [-1,-0.,0,1e-100,0.25,0.5,1,1.01,None,False,'0.5']: + for selected in [false,island]: + yield {'type':'random_selector','features':[{'feature':selected,'chance':chance},{'feature':platform,'chance':0.75}],'default':island} + yield {'type':'random_selector','features':[],'default':noop} + inner={'type':'random_boolean_selector','feature_true':island,'feature_false':false} + nested={'feature':inner,'placement':[{'type':'count','count':2},{'type':'in_square'}]} + yield {'type':'sequence','features':[noop,nested,platform]} + yield {'type':'simple_random_selector','features':[nested,platform,false]} + overlay={'feature':{'type':'overlay','features':[false,nested,false,platform]},'placement':[{'type':'count','count':2},{'type':'in_square'}]} + yield {'type':'overlay','features':[false,overlay,nested,platform]} + yield {'type':'sequence','features':[overlay,nested]} + yield {'type':'random_selector','features':[{'feature':nested,'chance':0},{'feature':false,'chance':1}],'default':island} + for malformed in [None,False,{},'missing',{'feature':{'type':'no_op'}},{'feature':{'type':'no_op'},'placement':None}]: + yield {'type':'sequence','features':[malformed]} + yield {'type':'overlay','features':[noop,malformed]} + yield {'type':'random_boolean_selector','feature_true':noop,'feature_false':malformed} + + for weights in [[],[0],[1],[63],[64],[65],[2147483647],[0,0],[0,1],[1,0],[1,3],[31,32],[31,33],[31,34],[2147483647,1],[-1,2],[0.9,1],[False,1],['1',2],[4294967297,1]]: + yield {'type':'weighted_random_selector','features':[{'data':[noop,false,island,platform][i%4],'weight':w} for i,w in enumerate(weights)]} + for data in [noop,false,island,platform,nested,{'feature':{'type':'missing'},'placement':[]}]: + for weights in [(0,0),(0,1),(1,0),(1,3)]: + yield {'type':'weighted_random_selector','features':[{'data':data,'weight':weights[0]},{'data':island,'weight':weights[1]}]} + + +def corpus(): + encode=lambda value:json.dumps(value,separators=(',',':')) + for legacy in [False,True]: + for seed in [0,-1,0x123456789abcdef]: + for definition in definitions(): + for fail in [-1,0,7]: + for reject in [0,3]: + yield {'definition':encode(definition),'origin':[15,64,15],'legacy':legacy,'seed':seed,'reject':reject,'fail':fail,'repeats':2} + for definition in definitions(): + yield {'definition':encode(definition),'placement':[{'type':'count','count':2},{'type':'in_square'}],'origin':[0,64,0],'legacy':False,'seed':17,'reject':0,'fail':-1,'repeats':2} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-feature-graph-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureGraphOracle.java" + helper=oracle.with_name("VanillaPlacementOracle.java") + sources=[oracle,helper,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/feature_graph_fixture.rs"] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus());inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths);classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper],"compile-java") + for side,jar in jars.items(): + path=build/f"facts-{side}.json" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaFeatureGraphOracle","export",path],side+"-export") + fixture_paths.append(path) + if json.loads((build/"facts-client.json").read_text())!=json.loads((build/"facts-server.json").read_text()):raise ValueError("reference feature block states differ") + tested_fixtures=base.source_hashes(fixture_paths) + run(["cargo","build","--release","-p","horizon-world","--example","feature_graph_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("feature_graph_fixture.exe" if os.name=="nt" else "feature_graph_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaFeatureGraphOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} feature-graph output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"basic_features":3,"composition_features":7,"definitions":len(list(definitions())),"block_states":5,"composed_fixtures":sum("placement" in f for f in fixtures),"requested_placements":sum(f["repeats"] for f in fixtures), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual Feature.DIRECT_CODEC and native no-op, sequence, overlay, random-boolean-selector, simple-random-selector and chance-based random-selector and weighted-random-selector features compose three native block-writing features through inline PlacedFeature holders and actual nested FeaturePlacer calls. Ordered writes, reads, flags, accumulated states, boolean results, rejected writes, partial failures, shared randomness and top-level modifier chains are compared. Overlay exhaustive ordered execution with accumulated success, sequence short-circuiting, selector return propagation and empty/all-zero weighted choices without random draws are included. Named registry holders/tags, encoders, full feature registries and complete generated worlds remain pending. Rust bounds decode depth/nodes/lists, nested execution depth and feature/placed-feature visits; nested modifier-chain execution shares the feature work budget."} + + + lab.write_json(report_path,report);print(f"Scoped feature-graph parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_feature_placement_parity.py b/tools/test_feature_placement_parity.py new file mode 100644 index 000000000..630b593bf --- /dev/null +++ b/tools/test_feature_placement_parity.py @@ -0,0 +1,111 @@ +#!/usr/bin/env python3 +"""Compare modifier-chain execution and shared feature random state with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def definitions(): + count=lambda value:{'type':'count','count':value} + square={'type':'in_square'} + offset={'type':'offset','x':{'type':'uniform','min_inclusive':-16,'max_inclusive':16},'y':1,'z':{'type':'trapezoid','min':-7,'max':7,'plateau':0}} + height={'type':'height_range','height':{'type':'uniform','min_inclusive':{'above_bottom':8},'max_inclusive':{'below_top':4}}} + fixed={'type':'fixed_placement','positions':[[0,0,0],[7,64,9],[15,-64,15],[0,0,0],[-1,63,-1],[-16,5,16]]} + random={'type':'randomly_selected','placements':[count(0),count(3),fixed,square]} + yield [] + for modifier in [count(0),count(1),count(3),square,offset,height,fixed,random]:yield [modifier] + for first in [count(0),count(1),count(3),fixed,random]: + yield [first,square,offset,height] + yield [first,{'type':'rarity_filter','chance':3},count(2),random] + yield [first,{'type':'random_chance','chance':0.5},square,fixed] + yield [first,random,offset,count(3)] + yield [count(3),count(3),count(3),offset] + yield [count(2),{'type':'randomly_selected','placements':[random,offset,height]},count(2)] + for kind in ['WORLD_SURFACE_WG','WORLD_SURFACE','OCEAN_FLOOR_WG','OCEAN_FLOOR','MOTION_BLOCKING','MOTION_BLOCKING_NO_LEAVES']: + yield [count(3),square,{'type':'heightmap','heightmap':kind},offset] + yield [fixed,{'type':'surface_relative_threshold_filter','heightmap':kind,'min_inclusive':-3,'max_inclusive':17},count(2)] + yield [count(3),square,{'type':'surface_water_depth_filter','max_water_depth':7},height] + for modifier in [ + {'type':'noise_based_count','noise_to_count_ratio':5,'noise_factor':80,'noise_offset':1}, + {'type':'noise_threshold_count','noise_level':0.1,'below_noise':2,'above_noise':7}, + {'type':'noise_threshold_count','noise_level':-0.5,'below_noise':0,'above_noise':3}, + ]: + yield [modifier,square,offset] + yield [count(3),square,modifier,height] + for edges,interior in [(True,True),(True,False),(False,True),(False,False)]: + cuboid={'type':'cuboid','xz_size':{'type':'uniform','min_inclusive':1,'max_inclusive':3},'y_size':2,'include_edges':edges,'include_interior':interior} + yield [cuboid,{'type':'random_chance','chance':0.5},offset] + yield [count(2),square,cuboid] + for count in [0,1,{'type':'uniform','min_inclusive':0,'max_inclusive':3}]: + yield [{'type':'count_on_every_layer','count':count},offset] + yield [{'type':'count','count':2},{'type':'count_on_every_layer','count':count},{'type':'random_chance','chance':0.5}] + inside={'type':'inside_world_bounds','offset':[0,-16,0]} + for predicate in [inside,{'type':'not','predicate':inside},{'type':'any_of','predicates':[inside,{'type':'true'}]}]: + yield [{'type':'count','count':3},height,{'type':'block_predicate_filter','predicate':predicate},square] + for direction in ['up','down']: + scan={'type':'environment_scan','direction_of_search':direction,'target_condition':predicate,'max_steps':32} + yield [fixed,scan,offset] + yield [{'type':'count','count':2},height,scan,square] + yield [{'type':'missing'}] + + +def corpus(): + positions=[[0,0,0],[0,0,0],[-1,63,-1],[2147483647,-2147483648,2147483647]] + for legacy in [False,True]: + for seed in [0,-1,0x123456789abcdef]: + for context in [[-64,384,63],[2147483647,-2147483648,2147483647]]: + for index,modifiers in enumerate(definitions()): + layer=any(v.get('type')=='count_on_every_layer' for v in modifiers) + if layer and context[0]!=-64:continue + for fail,draw,result in [(-1,False,0),(-1,True,1),(-1,True,2),(0,False,1),(2,True,2),(5,True,1)]: + yield {'layer_world':layer,'modifiers':modifiers,'context':context,'legacy':legacy,'seed':seed,'positions':positions,'fail':fail,'draw':draw,'result':result,'height_mode':index%2,'query_fail':1 if index%3==0 and fail==2 else -1,'world_min':max(-2**31,min(2**31-1,context[0]+[-8,0,8][index%3]))} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-feature-placement-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeaturePlacementOracle.java" + helper=oracle.with_name("VanillaPlacementOracle.java") + sources=[oracle,helper,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/feature_placement_fixture.rs",lab.ROOT/"crates/horizon-world/examples/support/placement_queries.rs"] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus());inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths);classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper],"compile-java") + run(["cargo","build","--release","-p","horizon-world","--example","feature_placement_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("feature_placement_fixture.exe" if os.name=="nt" else "feature_placement_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaFeaturePlacementOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} placement output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"modifier_chains":len(list(definitions())),"requested_placements":sum(len(f["positions"]) for f in fixtures), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual native FeaturePlacer executing decoded placement-modifier chains with a synthetic Feature sink. Empty chains, repeated modifiers, nested random choices, count expansion, filtering, fixed positions, offsets, anchored heights heightmap filters and layered scans are compared. Sink callbacks emit positions, optionally consume the shared random stream, return true/false/mixed results or fail after partial placement. The same native placer is reused across calls, including after errors, exposing retained pending and modified-position buffers. Both random modes, repeated calls, ordinary and overflowing generation contexts and subsequent nextLong values are compared. Predicate filtering and vertical environment scans compare bounds-query order, short-circuiting and failures. Traced heightmap queries include synthetic extreme heights, distinct world/generation minima and injected failures. Configured feature algorithms, block queries, biome checks, registry lifecycle, nested feature placement, Gaussian providers, encoding and complete world generation remain pending. Rust bounds chain length to 1024 and pending/output work to 2^20."} + + lab.write_json(report_path,report);print(f"Scoped placement parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_feature_region_parity.py b/tools/test_feature_region_parity.py new file mode 100644 index 000000000..901743e1c --- /dev/null +++ b/tools/test_feature_region_parity.py @@ -0,0 +1,130 @@ +#!/usr/bin/env python3 +"""Compare feature chains, shared resident chunks and live heightmap mutations.""" +import argparse +from collections import Counter +import json +import os +from pathlib import Path +import platform +import random +import subprocess +import zipfile + +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def configured_features(*, include_springs=True): + leaves=[{'type':name} for name in ['end_island','void_start_platform','end_platform']] + layers=[{'feature':{'type':'fill_layer','height':height,'state':state},'placement':[]} for height,state in [(32,'water'),(16,{'id':'oak_log','properties':{'axis':'x'}}),(8,'air'),(4064,'stone')]] + targets=[{'target':{'predicate_type':'block_match','block':'stone'},'state':'iron_ore'},{'target':{'predicate_type':'block_match','block':'oak_log'},'state':'copper_ore'}] + features=leaves+[{'type':'sequence','features':layers},{'type':'replace_single_block','targets':targets},{'type':'scattered_ore','targets':targets,'size':16,'discard_chance_on_air_exposure':0.5}] + if include_springs:features.append({'type':'spring_feature','state':{'id':'water','properties':{'falling':'false'}},'requires_block_below':False,'rock_count':5,'hole_count':5,'valid_blocks':['air','stone','dirt']}) + return features + + +def corpus(facts): + features=configured_features()+[{'type':'end_podium','active':active} for active in [False,True]] + get=lambda name:facts['defaults']['minecraft:'+name] + log_x=next(i for i,state in enumerate(facts['states']) if state[4]['id']=='minecraft:oak_log' and state[4].get('properties',{}).get('axis')=='x') + ticks=[] + for p in [[0,-40,0],[-1,-64,-1],[16,100,16],[32,0,0],[-17,0,0],[2147483647,-2147483648,0]]: + for kind,value in [('block',get('water')),('fluid',2),('block',log_x),('block',get('oak_log'))]: + for delay in [-2147483648,0,2147483647]:ticks.append([kind,value,p,delay]) + for kind in range(5):ticks.append(['fluid',kind,[0,-40,0],-1]) + chains=[ + [{'type':'count','count':2},{'type':'in_square'},{'type':'heightmap','heightmap':'MOTION_BLOCKING'}], + [{'type':'count_on_every_layer','count':1},{'type':'offset','x':0,'y':1,'z':0}], + [{'type':'count','count':2},{'type':'heightmap','heightmap':'WORLD_SURFACE'},{'type':'offset','x':1,'y':0,'z':1}], + ] + fixture_index=0 + for legacy in [False,True]: + for seed in [0,-1]: + for stage in ['empty','terrain']: + for fail in [-1,7]: + for reject in [0,3]: + for placement in chains: + for worldgen in [False,True]: + yield {'upgrading':fixture_index%3==0,'write_zone':[None,[0,0,0],[1,1,0],[-1,-1,1],[0,0,-1]][fixture_index%5],'probe_states':list(range(fixture_index,len(facts['states']),192)),'worldgen':worldgen,'legacy':legacy,'seed':seed,'stage':stage,'fail':fail,'reject':reject,'placement':placement,'features':features,'tick_commands':ticks,'game_time':9223372036854775807 if worldgen else -9223372036854775808,'tick_order':9223372036854775803 if legacy else -9223372036854775808} + fixture_index+=1 + + +def main(): + parser=argparse.ArgumentParser(description=__doc__) + parser.add_argument("--prepare",action="store_true") + args=parser.parse_args() + build=lab.LOCAL/"rust-feature-region-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + tags=worldgen.tag_resources(jars["server"]) + if not tags or tags!=worldgen.tag_resources(jars["client"]):raise ValueError("client/server block tags differ or are empty") + def fluid_resources(jar): + with zipfile.ZipFile(jar) as archive: + prefix='data/minecraft/tags/fluid/' + return {'minecraft:'+name[len(prefix):-5]:archive.read(name).decode('utf-8') for name in sorted(archive.namelist()) if name.startswith(prefix) and name.endswith('.json')} + fluid_tags=fluid_resources(jars['server']) + if fluid_tags!=fluid_resources(jars['client']):raise ValueError('reference fluid tags differ') + (build/'fluid-tags.json').write_text(json.dumps(fluid_tags,separators=(',',':'))) + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureRegionOracle.java" + helper=oracle.with_name("VanillaHeightmapOracle.java") + placement_helper=oracle.with_name("VanillaPlacementOracle.java") + sources=[oracle,helper,placement_helper,Path(__file__),lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock", + lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/feature_region_fixture.rs"] + tested_sources=base.source_hashes(sources) + classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper,placement_helper],"compile-java") + def java(side,mode,path): + run(["java","-Xmx1G","-cp",os.pathsep.join([str(classes),str(jars[side]),dependency_path]),"dev.horizonlab.parity.VanillaFeatureRegionOracle",mode,path],side+"-"+mode) + for side in jars:java(side,"export",build/f"facts-{side}.json") + facts=json.loads((build/"facts-server.json").read_text()) + if facts!=json.loads((build/"facts-client.json").read_text()):raise ValueError("client/server state facts differ") + if len(facts["states"])!=35723:raise ValueError("incomplete pinned state table") + fixtures=list(corpus(facts));inputs=build/"inputs.txt" + inputs.write_text("".join(json.dumps(value,separators=(",",":"))+"\n" for value in fixtures),encoding="utf-8") + (build/"tags.json").write_text(json.dumps(tags,separators=(",",":")),encoding="utf-8") + edges=[-2147483648,-2147483647,-134217729,-134217728,-17,-16,-1,0,1,15,16,134217727,134217728,2147483646,2147483647] + zones=[] + for cx,cz in [(0,0),(-1,1),(-2147483648,-2147483648),(2147483647,2147483647),(134217727,-134217728)]: + for radius in [-2147483648,-2,-1,0,1,2,7,134217728,2147483647]: + for x in edges: + for z in edges:zones.append([cx,cz,radius,x,z]) + rng=random.Random(0x574f524c445a4f4e45) + for _ in range(10000):zones.append([rng.randrange(-2**31,2**31) for _ in range(5)]) + zone_inputs=build/'zones.json';zone_inputs.write_text(json.dumps(zones,separators=(',',':'))) + heights=[] + for min_y,height in [(-64,64),(-64,384),(0,256),(2147483647,1),(-2147483648,0),(0,-1),(-2147483648,-1)]: + for y in [-2147483648,-2147483647,-65,-64,-63,-1,0,1,255,256,319,320,2147483646,2147483647]:heights.append([min_y,height,y]) + for _ in range(10000):heights.append([rng.randrange(-2**31,2**31) for _ in range(3)]) + height_inputs=build/'heights.json';height_inputs.write_text(json.dumps(heights,separators=(',',':'))) + fixture_paths=[height_inputs,zone_inputs,inputs,build/"tags.json",build/"fluid-tags.json",build/"facts-client.json",build/"facts-server.json"] + tested_fixtures=base.source_hashes(fixture_paths) + run(["cargo","build","--release","-p","horizon-world","--example","feature_region_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("feature_region_fixture.exe" if os.name=="nt" else "feature_region_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + java(side,side,build) + reference=build/f"{side}.txt";matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} feature-region output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "block_states":len(facts["states"]),"direct_state_probes":sum(len(f["probe_states"]) for f in fixtures),"write_zone_cases":len(zones),"upgrade_height_cases":len(heights),"upgrade_lifecycle_cases":54,"block_tag_files":len(tags),"fixtures":len(fixtures),"worldgen_random_modes":[False,True],"resident_chunks_per_fixture":9,"requested_placements":sum(len(f["features"])*2 for f in fixtures),"direct_tick_requests":sum(len(f["tick_commands"]) for f in fixtures), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Native FeaturePlacer and three basic block-writing features, a composed sequence of four configured fill layers, single-block replacements, scattered ore and water springs share a world proxy backed by nine actual ProtoChunks. Configured water, horizontal logs, air, out-of-height fills and ore/replacement rules test graph-to-region binding. Initial two-layer stone/dirt terrain, both pre-light heightmap groups, count/square/heightmap/layered modifier chains, repeated placements, direct and WorldgenRandom-wrapped random streams, missing-neighbor errors, rejected writes and injected partial failures are compared. Final complete raw sections, heightmap presence and packed words are compared alongside ordered feature writes, update flags, explicit height queries and subsequent random draws. Rust uses resident registry-backed chunks, lazy heightmap priming and a caller-supplied write callback; imported air/fluid facts and bundled block tags bind independently across authenticated JARs. The proxy supplies storage mutation and actual native default scheduleTick/createTick methods routed through WorldGenTickAccess into each ProtoChunk. Separate block/fluid queues, first-request deduplication, nondefault-state block identity, shared tick-order advancement on duplicates and missing-chunk errors, out-of-height requests and wrapped clock values are compared, including saved queue order and priorities. Active and inactive End podiums additionally exercise native WorldGenRegion.destroyBlock through a subclass transport overriding only block reads and writes; air short-circuit, rejected replacements and write failures retain the generation-time semantics. All block states are also written into resident chunks, queried through feature access, cleared and queried again; contained fluid identity/amount/falling/source/full flags, water-tag membership and every bundled block tag plus an absent tag are compared. Negative coordinates, chunk edges, outside-height and absent chunks are covered. Block/fluid query bindings are an immutable registry-checked shared snapshot. The native horizontal write-zone predicate is compared separately across chunk/block coordinates, negative radii and wrapped subtraction/absolute-value extremes, and gates feature callbacks in selected fixtures. Actual WorldGenRegion.ensureCanWrite also checks the center proto-chunk before/after installing native below-zero retrogen data, with extreme and boundary heights; the generic height interval is independently compared against LevelHeightAccessor. Region feature callbacks and direct accepted/rejected write probes apply the upgrade height before mutation. The Rust access object now reads live center-chunk retrogen metadata before each write. Fifty-four lifecycle cases pair all six pre-light stages with all nine nonempty upgrade targets; one access object observes target-completion cleanup, explicit removal, reinstallation and backward stage changes from accepted write callbacks. Neighbor upgrade state is independent. Actual native highest-generated status and ProtoChunk biome-read availability are compared before and after those sequences, including clamped extreme quart Y. Retrogen activation and the world write effects remain caller-owned. Actual WorldGenRegion construction, full retrogen biome resolution, POIs, block entities, postprocessing execution, lighting, block/fluid tick execution, complete feature registries and complete world generation remain outside this comparison."} + + lab.write_json(report_path,report);print(f"Scoped feature-region parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_feature_sort_parity.py b/tools/test_feature_sort_parity.py new file mode 100644 index 000000000..389b41e86 --- /dev/null +++ b/tools/test_feature_sort_parity.py @@ -0,0 +1,81 @@ +#!/usr/bin/env python3 +"""Compare identity-based feature ordering and cycles across biome steps.""" +import argparse +import itertools +import json +import os +from pathlib import Path +import platform +import random +import subprocess +import zipfile +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def biome_features(jar): + with zipfile.ZipFile(jar) as archive: + return {name:json.loads(archive.read(name))['features'] for name in sorted(archive.namelist()) if name.startswith('data/minecraft/worldgen/biome/') and name.endswith('.json')} + + +def corpus(resources): + sequences=[list(p) for size in range(4) for p in itertools.product(range(3),repeat=size)] + for a,b in itertools.product(sequences,repeat=2): + yield {'biomes':[[a],[b]],'queries':[0,1,2,3]} + yield {'biomes':[[a,[],b],[b,[],a]],'queries':[0,1,2,3]} + yield {'biomes':[],'queries':[0]} + yield {'biomes':[[],[[],[],[]]],'queries':[0]} + rng=random.Random(6628) + for _ in range(500): + biomes=[[[rng.randrange(12) for _ in range(rng.randrange(6))] for _ in range(rng.randrange(6))] for _ in range(rng.randrange(8))] + yield {'biomes':biomes,'queries':list(range(13))} + names=sorted({name for steps in resources.values() for step in steps for name in step}) + if any(not isinstance(name,str) or name.startswith('#') for name in names):raise ValueError('unsupported fixture holder form') + identity={name:i for i,name in enumerate(names)} + biomes=[[[identity[name] for name in step] for step in steps] for steps in resources.values()] + queries=list(range(len(names)+1)) + yield {'biomes':biomes,'queries':queries} + yield {'biomes':list(reversed(biomes)),'queries':queries} + for biome in biomes:yield {'biomes':[biome],'queries':queries} + for _ in range(100): + sample=rng.sample(biomes,rng.randrange(len(biomes)+1)) + yield {'biomes':sample,'queries':queries} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-feature-sort-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + resources=biome_features(jars['server']) + if len(resources)!=67 or resources!=biome_features(jars['client']):raise ValueError('pinned biome feature resources differ') + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFeatureSortOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/feature_sort_fixture.rs'] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus(resources));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(f,separators=(',',':'))+'\n' for f in fixtures),encoding='utf-8') + resource_path=build/'biome-features.json';resource_path.write_text(json.dumps(resources,separators=(',',':')),encoding='utf-8') + fixture_paths=[inputs,resource_path];tested_fixtures=base.source_hashes(fixture_paths) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + run(['cargo','build','--release','-p','horizon-world','--example','feature_sort_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('feature_sort_fixture.exe' if os.name=='nt' else 'feature_sort_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jar),dependency_path]),'dev.horizonlab.parity.VanillaFeatureSortOracle',side,build],side) + reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} feature-sort output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'biomes':len(resources),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual FeatureSorter.buildFeaturesPerStep with structurally equal but identity-distinct placed-feature payloads. Ordered per-biome step lists, repeated references, cycles, cross-step reuse, disconnected nodes, empty steps and identity index lookups are compared. Every bundled biome feature list and deterministic shuffled/subset combinations bind named references to stable object identities without executing unported feature algorithms. Rust uses bounded iterative DFS. Cycle diagnostic minimization/text, full registry ownership, decoration seeding and feature execution remain pending.'} + lab.write_json(report_path,report);print(f'Scoped feature-sort parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_fill_layer_parity.py b/tools/test_fill_layer_parity.py new file mode 100644 index 000000000..0adf9f6c1 --- /dev/null +++ b/tools/test_fill_layer_parity.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python3 +"""Compare fill-layer state binding, column traversal and ordered world mutations with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(facts): + encode=lambda value:json.dumps(value,separators=(',',':')) + states=['stone','air','cave_air','void_air','water','oak_log',{'id':'water','properties':{'level':'+01'}},{'id':'snow','properties':{'layers':'٠٢'}},{'id':'oak_log','properties':{'axis':'x'}},{'id':'oak_log','properties':{'axis':'invalid'}},None,False,'missing'] + definitions=[{'type':'fill_layer','height':h,'state':state} for h in [-1,0,1,63,4064,4065,4294967297] for state in states] + definitions += [{'type':'fill_layer','height':h,'state':'stone'} for h in [None,False,'1',0.9]] + for legacy in [False,True]: + for seed in [0,-1]: + for definition in definitions: + for fail in [-1,0,1,7,63]: + for reject in [0,3]: + yield {'definition':encode(definition),'origin':[15,99,15],'world_min':-64,'legacy':legacy,'seed':seed,'reject':reject,'fail':fail,'repeats':2} + for minimum in [-2147483648,2147483647]: + for origin in [[-1,0,-1],[2147483647,-2147483648,2147483647],[-2147483648,2147483647,-2147483648]]: + for height in [0,1,4064]: + yield {'definition':encode({'type':'fill_layer','height':height,'state':'stone'}),'origin':origin,'world_min':minimum,'legacy':False,'seed':0,'reject':0,'fail':-1,'repeats':2} + for state in facts['states']: + yield {'definition':encode({'type':'fill_layer','height':1,'state':state}),'origin':[0,0,0],'world_min':-64,'legacy':False,'seed':0,'reject':0,'fail':-1,'repeats':0} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-fill-layer-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFillLayerOracle.java" + helper=oracle.with_name("VanillaBlockStateCodecOracle.java") + sources=[oracle,helper,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/fill_layer_fixture.rs"] + tested_sources=base.source_hashes(sources) + fixture_paths=[];classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper],"compile-java") + for side,jar in jars.items(): + path=build/f"facts-{side}.json" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaFillLayerOracle","export",path],side+"-export") + fixture_paths.append(path) + if json.loads((build/"facts-client.json").read_text())!=json.loads((build/"facts-server.json").read_text()):raise ValueError("reference feature block states differ") + facts=json.loads((build/"facts-server.json").read_text()) + if len(facts['states'])!=35723 or facts['height_limit']!=4064:raise ValueError("unexpected pinned registry or height limit") + if sorted(facts['air_ids'])!=sorted(facts['defaults']['minecraft:'+name] for name in ['air','cave_air','void_air']):raise ValueError("unexpected air-state set") + fixtures=list(corpus(facts));inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + fixture_paths.append(inputs) + tested_fixtures=base.source_hashes(fixture_paths) + run(["cargo","build","--release","-p","horizon-world","--example","fill_layer_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("fill_layer_fixture.exe" if os.name=="nt" else "fill_layer_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaFillLayerOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} fill-layer output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"block_states":len(facts["states"]),"integer_properties":len(facts["integers"]),"requested_placements":sum(f["repeats"] for f in fixtures), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual Feature.DIRECT_CODEC decoding of fill-layer features binds every pinned block state through BlockState.CODEC; selected compact/full states exercise integer properties and invalid-property defaults. Native FillLayerFeature.place traces each world-minimum query, ordered X/Z block reads and conditional writes, flags, rejected writes, thrown minimum/read/write failures and accumulated stored states after repeated calls. Air-state identity and height-limit metadata are independently exported from both authenticated JARs and checked. Extreme wrapping coordinates and world minima, both random modes and untouched subsequent random state are compared. Full world effects, region integration of fill-layer features, other configured block features and complete generated worlds remain pending."} + + + lab.write_json(report_path,report);print(f"Scoped fill-layer parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_float_log_parity.py b/tools/test_float_log_parity.py new file mode 100644 index 000000000..dc7cc036a --- /dev/null +++ b/tools/test_float_log_parity.py @@ -0,0 +1,100 @@ +#!/usr/bin/env python3 +"""Compare the Rust log sampler with both pinned vanilla JARs, optionally for every float.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess + +try: + from . import lab, test_rust_parity +except ImportError: + import lab + import test_rust_parity + + +def compare(reference, candidate, start, count): + offset = 0 + with reference.open("rb") as expected, candidate.open("rb") as actual: + while True: + left, right = expected.read(1 << 20), actual.read(1 << 20) + if len(left) != len(right): + raise ValueError(f"log output length differs at byte {offset}") + if left != right: + index = next(i for i, (a, b) in enumerate(zip(left, right)) if a != b) + at = index // 4 * 4 + bits = start + (offset + at) // 4 + raise ValueError(f"log mismatch for float bits {bits:08x}: vanilla {left[at:at+4].hex()}, Rust {right[at:at+4].hex()}") + if not left: + break + offset += len(left) + if offset != count * 4: + raise ValueError(f"log output length {offset} does not cover {count} floats") + return count + + +def ranges(exhaustive): + if exhaustive: + return [(0, 1 << 32)] + return [(start, 1 << 16) for start in [0, 0x00800000, 0x3eff0000, + 0x3f7f0000, 0x3f800000, 0x40000000, 0x7f7f0000, 0x7f800000, + 0x7fff0000, 0x80000000, 0x80800000, 0xbf7f0000, 0xbf800000, + 0xff7f0000, 0xff800000, 0xffff0000]] + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--exhaustive", action="store_true", help="check all 4,294,967,296 float bit patterns") + args = parser.parse_args() + build = lab.LOCAL / "rust-float-log-parity" + build.mkdir(parents=True, exist_ok=True) + report_path = build / "report.json" + report_path.unlink(missing_ok=True) + lock, jars, libraries = test_rust_parity.verify_artifacts() + source = lab.ROOT / "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFloatLogOracle.java" + sources = [source, Path(__file__), lab.ROOT / "tools/test_rust_parity.py", lab.ROOT / "tools/lab.py", + *sorted((lab.ROOT / "crates/horizon-core").rglob("*.rs")), lab.ROOT / "crates/horizon-core/Cargo.toml", + lab.ROOT / "Cargo.toml", lab.ROOT / "Cargo.lock"] + tested_sources = test_rust_parity.source_hashes(sources) + classes = build / "classes" + classes.mkdir(exist_ok=True) + dependency_path = os.pathsep.join(map(str, libraries)) + run = test_rust_parity.run + run(["javac", "--release", str(lock["minecraft"]["java_major"]), "-proc:none", "-cp", + os.pathsep.join([str(jars["server"]), dependency_path]), "-d", str(classes), str(source)]) + run(["cargo", "build", "--release", "--bin", "horizon-float-log-parity"]) + metadata = json.loads(subprocess.check_output(["cargo", "metadata", "--no-deps", "--format-version", "1"], cwd=lab.ROOT, text=True)) + binary = Path(metadata["target_directory"]) / "release" / ("horizon-float-log-parity.exe" if os.name == "nt" else "horizon-float-log-parity") + comparisons = [] + for start, count in ranges(args.exhaustive): + candidate = build / "rust.bin" + with candidate.open("wb") as output: + run([str(binary), str(start), str(count)], stdout=output) + candidate_digest = lab.digest(candidate, "sha256") + references = [] + for side, jar in jars.items(): + reference = build / f"vanilla-{side}.bin" + with reference.open("wb") as output: + run(["java", "-Xmx512M", "-cp", os.pathsep.join([str(classes), str(jar), dependency_path]), + "dev.horizonlab.parity.VanillaFloatLogOracle", str(start), str(count)], stdout=output) + matched = compare(reference, candidate, start, count) + references.append({"side": side, "jar_sha256": lab.digest(jar, "sha256"), + # Complete byte equality above proves the same content digest; + # avoid rereading another 16 GiB per exhaustive reference. + "output_sha256": candidate_digest, "matched_float_values": matched}) + print(f"{side}: {matched:,} float log values match Rust from bits {start:08x}", flush=True) + comparisons.append({"start_bits": start, "count": count, "rust_output_sha256": candidate_digest, "references": references}) + test_rust_parity.ensure_sources_unchanged(sources, tested_sources) + report = {"schema": 1, "minecraft": lock["minecraft"]["version"], "platform": platform.platform(), + "java": subprocess.check_output(["java", "--version"], text=True).splitlines()[0], + "rustc": subprocess.check_output(["rustc", "--version"], text=True).strip(), + "manifest_sha1": lock["minecraft"]["manifest_sha1"], "exhaustive": args.exhaustive, + "sources_sha256": tested_sources, "comparisons": comparisons, + "scope": "Compiled scalar UnaryFunction.LogSampler compared by float result bits across the recorded input bit ranges, including signed zeros, subnormals, finite values, infinities and NaNs. NaN results are canonicalized as Float.floatToIntBits. Exhaustive mode checks all 2^32 float input bit patterns against both checksum-pinned JARs on this machine's JDK. Bulk composition, range propagation, compiler rewriting and other operations belong to the separate density suite. This does not establish double-precision Math.log parity, other-platform math parity, complete terrain, gameplay or performance."} + lab.write_json(report_path, report) + print(f"Float log parity passed: {report_path}", flush=True) + + +if __name__ == "__main__": + main() diff --git a/tools/test_fluid_box_parity.py b/tools/test_fluid_box_parity.py new file mode 100644 index 000000000..0e1d59bf9 --- /dev/null +++ b/tools/test_fluid_box_parity.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +"""Compare entity and boat passenger fluid-interaction bounds with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>d',float(v)).hex() + def row(**kw): + f=dict(actor=[-.3,0,-.3,.3,1.8,.3],boat=[-1,0,-1,1,.6,1],input=[-.3,0,-.3,.3,1.8,.3],status=0,vehicle=2,direct=False,fail=-1,mutate_at=-1,after_actor=[7,8,9,10,11,12],after_boat=[-1,0,-1,1,2,1],after_status=1,modified=None) + f.update(kw) + for k in ['actor','boat','input','after_actor','after_boat','modified']: + if f[k] is not None:f[k]=[bits(v) for v in f[k]] + return f + values=[-float('inf'),-1e30,-2,-.001,-0.0,0.0,1e-40,.0005,.001,.0015,.002,.5,.6,1.7989999999999997,1.799,1.7990000000000002,1.8,2,1e30,float('inf'),float('nan')] + for top in values: + for low in values: + for status in range(-1,5): + for direct in [False,True]:yield row(boat=[-1,top,-1,1,top,1],actor=[-.3,low,-.3,.3,1.8,.3],input=[-.3,low,-.3,.3,1.8,.3],status=status,direct=direct) + for component in range(6): + for value in values: + b=[-.3,0,-.3,.3,1.8,.3];b[component]=value + for vehicle in range(4): + for fail in [-1,0,1,2]: + for mutate in [-1,0,1]:yield row(actor=b,vehicle=vehicle,fail=fail,mutate_at=mutate,modified=[1,2,3,4,5,6]) + rng=random.Random(0x464c554944424f58) + for _ in range(6000): + yield row(actor=[rng.choice(values) for _ in range(6)],input=[rng.choice(values) for _ in range(6)],boat=[rng.choice(values) for _ in range(6)],after_boat=[rng.choice(values) for _ in range(6)],vehicle=rng.randrange(4),status=rng.randrange(-1,5),after_status=rng.randrange(-1,5),direct=bool(rng.randrange(2)),fail=rng.choice([-1,-1,0,1,2]),mutate_at=rng.choice([-1,-1,0,1,2])) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-fluid-box-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidBoxOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/fluid_box_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaFluidBoxOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','fluid_box_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('fluid_box_fixture.exe' if os.name=='nt' else 'fluid_box_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} fluid-box output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Entity.getFluidInteractionBox and AbstractBoat.modifyPassengerFluidInteractionBox. Captured deflated entity bounds, virtual vehicle lookup/modifier dispatch, actual boat status predicate, clipping/null results at the boat waterline, AABB endpoint normalization, nonfinite/signed-zero arithmetic, callback mutations and failures. Entity/vehicle snapshots are controlled; live passenger lifecycle and full gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped fluid box parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_fluid_flow_parity.py b/tools/test_fluid_flow_parity.py new file mode 100644 index 000000000..2207b5834 --- /dev/null +++ b/tools/test_fluid_flow_parity.py @@ -0,0 +1,83 @@ +#!/usr/bin/env python3 +"""Compare registered fluid current vectors and neighbor queries with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(states): + empty=next(s for s in states if s['id']=='minecraft:empty') + water=next(s for s in states if s['id']=='minecraft:water' and s['properties']['falling']=='false') + def cell(fluid=empty,blocks=False,ice=False,faces=0):return dict(fluid=fluid,blocks_flow=blocks,ice=ice,faces=faces) + def row(root,entries=None,**kw): + f=dict(mode='flow',root=root,states=entries or [cell()],default=0,cells={},position=[0,0,0],fail=-1,direction=2);f.update(kw);return f + neighbors=[(0,0,-1),(1,0,0),(0,0,1),(-1,0,0)] + for root in states: + for neighbor in states: + for blocks in [False,True]: + yield row(root,[cell(neighbor,blocks),cell(empty,False),cell(water,False)],cells={'0 0 -1':1,'0 -1 -1':2}) + for root in states: + for index,p in enumerate(neighbors): + for y in [0,1]: + for mask in range(64): + for ice in [False,True]: + key=f'{p[0]} {y} {p[2]}' + yield row(root,[cell(),cell(empty,False,ice,mask)],cells={key:1}) + for root in states[1:]: + for neighbor in [empty,water,states[-1]]: + for direction in range(6): + for ice in [False,True]: + for mask in [0,63,1<d',float(v)).hex() + def op(bounds=(0,0,0,1,1,1),writes=(),fail=-1,compact=False):return dict(bounds=[bits(v) for v in bounds],writes=list(writes),fail=fail,compact=compact) + def row(base=air,min=-16,height=48,ops=None):return dict(base=base,min=min,height=height,ops=ops or [op()]) + boxes=[(0,0,0,1,1,1),(-.5,-.5,-.5,.5,.5,.5),(0,0,0,0,0,0),(15.5,-.1,15.5,16.5,16.1,16.5),(-16,-16,-16,16,32,16),(0,-32,0,1,-17,1),(0,32,0,1,64,1),(0,-32,0,1,64,1),(16,16,16,15,15,15),(30000000,-64,-30000000,30000001,1,-29999999)] + bases=[d['minecraft:'+n] for n in ['air','stone','water','lava','bubble_column','kelp','seagrass','oak_slab','oak_stairs','mangrove_roots','water_cauldron','powder_snow']] + for base in bases: + for box in boxes: + for fail in range(-1,20):yield row(base=base,ops=[op(box,fail=fail)]) + positions=[(0,0,0),(1,1,1),(15,15,15),(0,-16,0),(15,31,15),(0,16,0)] + for p in positions: + for box in boxes: + yield row(ops=[op(box,[(*p,water)]),op(box,[(*p,stone)]),op(box,[(*p,air)],compact=True),op(box,[(*p,water)])]) + for state in range(0,info['states'],97):yield row(base=state,ops=[op(boxes[1]),op(boxes[4])]) + rng=random.Random(0x4c4951554944) + for _ in range(1400): + minimum=rng.choice([-64,-16,0,16]);height=rng.choice([16,32,64]);ops=[] + for _ in range(4): + y=rng.randrange(minimum,minimum+height);box=rng.choice(boxes) + ops.append(op(box,[(rng.randrange(16),y,rng.randrange(16),rng.randrange(info['states'])) for _ in range(rng.randrange(12))],fail=rng.choice([-1,-1,*range(20)]),compact=bool(rng.randrange(2)))) + yield row(base=rng.choice(bases),min=minimum,height=height,ops=ops) + + +def main(): + lock,jars,libraries=base.verify_artifacts();build=lab.LOCAL/'rust-fluid-occupancy-parity';build.mkdir(exist_ok=True);report_path=build/'report.json';report_path.unlink(missing_ok=True) + root=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity';oracles=[root/(n+'.java') for n in ['VanillaFluidOccupancyOracle']] + sources=[*oracles,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/test_worldgen_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-world/examples/fluid_occupancy_fixture.rs'] + for crate in ['horizon-core','horizon-world']:sources += [lab.ROOT/'crates'/crate/'Cargo.toml',*sorted((lab.ROOT/'crates'/crate/'src').rglob('*.rs'))] + tested=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True);dependencies=os.pathsep.join(map(str,libraries)) + def run(command,name): + with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependencies,'-d',classes,*oracles],'compile-java') + def java(side,mode):run(['java','-Xmx768M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependencies]),'dev.horizonlab.parity.VanillaFluidOccupancyOracle',mode,build],side+'-'+mode) + java('server','export');info=json.loads((build/'info.json').read_text());count=0 + if info['states']!=35723:raise AssertionError('Incomplete pinned registry') + with (build/'inputs.txt').open('w') as output: + for f in corpus(info):output.write(json.dumps(f,separators=(',',':'))+'\n');count+=1 + fixture_paths=[build/n for n in ['inputs.txt','info.json','block-registry.nbt']];fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--locked','--release','-p','horizon-world','--example','fluid_occupancy_fixture'],'compile-rust');metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('fluid_occupancy_fixture.exe' if os.name=='nt' else 'fluid_occupancy_fixture');run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side);matched=base.compare(build/(side+'.txt'),build/'rust.txt');references.append(dict(side=side,jar_sha256=lab.digest(jar,'sha256'),output_sha256=lab.digest(build/(side+'.txt'),'sha256'),matched_output_lines=matched));print(f'{side}: {matched:,} fluid-occupancy output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested);base.ensure_sources_unchanged(fixture_paths,fixtures) + report=dict(schema=1,minecraft=lock['minecraft']['version'],manifest_sha1=lock['minecraft']['manifest_sha1'],platform=platform.platform(),java=subprocess.check_output(['java','--version'],text=True).splitlines()[0],rustc=subprocess.check_output(['rustc','--version'],text=True).strip(),fixtures=count,registry_states=info['states'],sources_sha256=tested,fixtures_sha256=fixtures,rust_output_sha256=lab.digest(build/'rust.txt','sha256'),references=references,scope='Actual LevelReader.containsAnyLiquid and native BoxBlockMatcher/BlockScanUtils over real ProtoChunk sections and palettes. All registered block fluid-presence values, inclusive AABB floors, chunk/section scan order, height limits, palette changes/compaction, nonfinite rejection and explicit Rust query budgets. Public query traces and results match; Rust skips dry active palettes without unpacking cells. Controlled repeating resident chunk snapshots; Entity.isFree collision composition and live world integration remain pending.') + lab.write_json(report_path,report);print(f'Scoped fluid occupancy parity passed: {report_path}',flush=True) + + +if __name__=='__main__':main() diff --git a/tools/test_fluid_parity.py b/tools/test_fluid_parity.py new file mode 100644 index 000000000..78a091cf2 --- /dev/null +++ b/tools/test_fluid_parity.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 +"""Compare contained fluid states, legacy blocks and height queries with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(facts): + states=[i for i,state in enumerate(facts['states']) if state['id'] in ['minecraft:air','minecraft:water','minecraft:lava'] or ('copper_grate' in state['id'] and state.get('properties',{}).get('waterlogged')=='true')] + for state in states: + for above in states: + for position in [[17,-64,-33],[2147483647,2147483647,-2147483648],[-2147483648,-2147483648,2147483647]]: + for sturdy in [False,True]: + for fail in [-1,0,1,2]: + yield {'state':state,'above':above,'position':position,'sturdy':sturdy,'fail':fail} + + + +def codec_corpus(): + import itertools + for name in ['empty','water','flowing_water','lava','flowing_lava','missing','minecraft:water',':water','MINECRAFT:water','']: + for definition in [name,{'id':name},{'id':name,'properties':None},{'id':name,'properties':[]},{'id':name,'properties':{'unknown':'x'}}]: + yield definition + for falling,level in itertools.product([None,True,False,0,1,'true','false','TRUE','False',{},[]], + [None,True,False,0,1,8,9,'0','1','8','9','-1','+2','003','٢','3','2147483648','1.0',' 1',{},[]]): + yield {'id':name,'properties':{'falling':falling,'level':level}} + for definition in [None,True,0,[],{}, {'id':None}, {'id':3}, {'Name':'minecraft:water'}]:yield definition + for name in ['water','flowing_water','lava','flowing_lava']: + for falling in ['true','false']: + for level in range(1,9):yield {'id':name,'properties':{'falling':falling,'level':str(level)}} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-fluid-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidOracle.java' + helper=oracle.with_name('VanillaBlockStateCodecOracle.java') + sources=[oracle,helper,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/fluid_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,helper],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaFluidOracle',mode,path],side+'-'+mode) + for side in jars:java(side,'export',build/f'facts-{side}.json') + facts=json.loads((build/'facts-server.json').read_text()) + if facts!=json.loads((build/'facts-client.json').read_text()):raise ValueError('reference block-state registries differ') + if len(facts['states'])!=35723:raise ValueError('incomplete pinned block-state registry') + fixtures=list(corpus(facts));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + codec_inputs=build/'codec-inputs.txt';codec_fixtures=list(codec_corpus());codec_inputs.write_text(''.join(json.dumps(v,separators=(',',':'))+'\n' for v in codec_fixtures),encoding='utf-8') + fixture_paths=[inputs,codec_inputs,build/'facts-client.json',build/'facts-server.json'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','fluid_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('fluid_fixture.exe' if os.name=='nt' else 'fluid_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} fluid output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'block_states':len(facts['states']),'fluid_kinds':5,'codec_fixtures':len(codec_fixtures),'fixtures':len(fixtures),'requested_height_queries':len(fixtures)*2,'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'FluidState.CODEC decoding and encoding include all 37 states, object-only identifiers, lenient missing/invalid properties, Unicode integer levels and native defaults. Legacy conversion is checked for codec-derived fluid states as well. Native fluid identity, amount, falling/source/full flags, own-height bits and legacy block conversion for every pinned block state; all fluid-family identity pairs. Surface and camera height query order, above-fluid family checks, source-only downward-face support checks, coordinate wrapping and injected query failures are compared. The fixture supplies stone/air support states; general block support shapes, fluid spreading/ticks, entities and rendering remain outside this comparison.'} + lab.write_json(report_path,report);print(f'Scoped fluid parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_fluid_shape_parity.py b/tools/test_fluid_shape_parity.py new file mode 100644 index 000000000..870438d59 --- /dev/null +++ b/tools/test_fluid_shape_parity.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python3 +"""Compare cached registered fluid shapes and lazy height queries with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(states): + empty=next(s for s in states if s['id']=='minecraft:empty') + def op(state,above,p=(17,-64,-33),fail=-1):return dict(state=state,above=above,position=p,fail=fail) + for state in states: + for above in states: + for fail in [-1,0,1]: + yield dict(ops=[op(state,above,fail=fail),op(state,empty,p=(1,2,3),fail=0),op(state,above,p=(-1,-2,-3)),op(state,empty)]) + for above in states: + for fail in [-1,0]: + yield dict(ops=[*[op(state,above,p=(2147483647,2147483647,-2147483648),fail=fail) for state in states],*[op(state,empty,p=(-2147483648,-2147483648,2147483647)) for state in reversed(states)],*[op(state,above,fail=0) for state in states]]) + rng=random.Random(0x464c554944534850) + for _ in range(1000):yield dict(ops=[op(rng.choice(states),rng.choice(states),p=rng.choice([(17,-64,-33),(0,0,0),(2147483647,2147483647,-2147483648)]),fail=rng.choice([-1,-1,0,1])) for _ in range(rng.randrange(1,100))]) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-fluid-shape-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFluidShapeOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/fluid_shape_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaFluidShapeOracle',mode,path],side+'-'+mode) + java('server','export',build);states=json.loads((build/'fluid-states.json').read_text());fixtures=list(corpus(states));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'fluid-states.json'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','fluid_shape_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('fluid_shape_fixture.exe' if os.name=='nt' else 'fluid_shape_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} fluid-shape output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual registered FluidState.getShape and FlowingFluid first-query shape caches over every native fluid state. Compares ordered above-fluid queries, cached-state counts, shape geometry, canonical empty/full identities and aliases across repeated states. Sequences change above fluids, positions, failure points and query order; failed height reads do not populate a cache. Caches are reset between sequences and shared across world views within each sequence. Fluid propagation, entity immersion, registered world ray binding and full gameplay remain separate work.'} + lab.write_json(report_path,report);print(f'Scoped fluid shape parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_food_parity.py b/tools/test_food_parity.py new file mode 100644 index 000000000..6fa616ca1 --- /dev/null +++ b/tools/test_food_parity.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python3 +"""Compare food arithmetic, exhaustion and server hunger tick with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>f',v).hex() + def state(food=20,saturation=5,exhaustion=0,timer=0):return dict(food=food,saturation=bits(saturation),exhaustion=bits(exhaustion),timer=timer) + def world(difficulty=2,regen=True,hurt=True,health=10):return dict(difficulty=difficulty,regen=regen,hurt=hurt,health=bits(health)) + def op(mode='tick',nutrition=0,amount=0):return dict(mode=mode,nutrition=nutrition,amount=bits(amount)) + def row(initial,ops,**kw): + f=dict(initial=initial,ops=ops,world=world(),after=state(0,0,7,79),after_world=world(3,False,False,1),fail=-1,mutate_at=-1);f.update(kw);return f + edges=[-float('inf'),-1e30,-1,-0.,0.,1e-40,.1,1,4,5,6,20,40,1e30,float('inf'),float('nan')] + foods=[-2147483648,-1,0,1,6,17,18,19,20,21,2147483647] + timers=[-2147483648,-1,0,8,9,10,78,79,80,2147483647] + for food in foods: + for nutrition in foods: + for value in edges: + for saturation in [-1.,-0.,0.,5.,float('nan')]: + yield row(state(food,saturation),[op('eat',nutrition,value),op('properties',nutrition,value),op('exhaust',amount=value)]) + for difficulty in range(4): + for regen in [False,True]: + for hurt in [False,True]: + for food in [-1,0,17,18,19,20,21]: + for saturation in [0.,.1,5.,6.,float('nan')]: + for timer in [0,9,79]: + yield row(state(food,saturation,4.000001,timer),[op(),op()],world=world(difficulty,regen,hurt,1)) + for health in edges: + for difficulty in range(4):yield row(state(0,0,0,79),[op()],world=world(difficulty,False,True,health)) + for initial in [state(20,5,0,9),state(18,0,0,79),state(0,0,0,79),state(20,5,5,9)]: + for fail in range(-1,13): + for mutation in range(-1,13):yield row(initial,[op()],fail=fail,mutate_at=mutation) + rng=random.Random(0x464f4f44) + for _ in range(3000): + ops=[op(rng.choice(['tick','tick','tick','eat','properties','exhaust','food','saturation']),rng.choice(foods),rng.choice(edges)) for __ in range(rng.randrange(1,50))] + yield row(state(rng.choice(foods),rng.choice(edges),rng.choice(edges),rng.choice(timers)),ops,world=world(rng.randrange(4),bool(rng.randrange(2)),bool(rng.randrange(2)),rng.choice(edges)),fail=rng.choice([-1,-1,0,3,5,9]),mutate_at=rng.choice([-1,-1,1,4,6,8])) + for initial in [state(20,5),state(18,0),state(0,0)]:yield row(initial,[op() for _ in range(240)]) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-food-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFoodOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/food_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaFoodOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','food_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('food_fixture.exe' if os.name=='nt' else 'food_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} food output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual FoodData eating/properties, exhaustion, hunger predicates and server tick, including query order, mutations/failures, regeneration thresholds, starvation difficulty/health guards, signed-zero/nonfinite values and integer overflow. Player healing/damage and world queries are controlled; full damage/health, consumables, persistence and playable integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped food parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_food_properties_parity.py b/tools/test_food_properties_parity.py new file mode 100644 index 000000000..7286d8829 --- /dev/null +++ b/tools/test_food_properties_parity.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +"""Compare native food propertiess and strict scalar stack validation.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + edges=[-2147483648,-1,0,1,19,20,21,2147483647] + floats=[0,0x80000000,1,0x3f000000,0x3f800000,0x40a00000,0xbf800000,0x7f800000,0xff800000,0x7fc00000] + seeds=[0,1,-1,-9223372036854775808,9223372036854775807,123456789] + def food(food=10,saturation=0x40a00000,exhaustion=0,timer=0):return dict(food=food,saturation=saturation,exhaustion=exhaustion,timer=timer) + def config(**kw): + v=dict(position=[1.25,64.5,-2.75],foods=[food(),food(20)],random=0,food=0,reseed=False,seeds=[99,101]);v.update(kw);return v + def row(**kw): + v=dict(initial=config(),after=config(position=[-3.5,71.25,9.5],foods=[food(2,0x80000000),food(18)],random=1,food=1,reseed=True),seeds=[0,1],player=True,xor=False,nutrition=4,saturation=0x40a00000,always=False,fail=-1,mutate=-1);v.update(kw);return v + for xor in [False,True]: + for seed in seeds: + for player in [False,True]: + for fail in range(-1,4): + for mutate in range(-1,4):yield row(xor=xor,seeds=[seed,~seed],player=player,fail=fail,mutate=mutate) + for nutrition in edges: + for saturation in floats: + for level in edges:yield row(nutrition=nutrition,saturation=saturation,initial=config(foods=[food(level,saturation),food()])) + rng=random.Random(0x464f4f444c495354) + def random_food():return food(rng.choice(edges),rng.choice(floats),rng.choice(floats),rng.choice(edges)) + def random_config():return config(position=[rng.choice([-0.0,0.0,1.25,-15.5,29999999.5]) for _ in range(3)],foods=[random_food(),random_food()],random=rng.randrange(2),food=rng.randrange(2),reseed=bool(rng.randrange(2)),seeds=[rng.randrange(-2**63,2**63) for _ in range(2)]) + for _ in range(2400):yield row(initial=random_config(),after=random_config(),seeds=[rng.randrange(-2**63,2**63) for _ in range(2)],player=bool(rng.randrange(2)),xor=bool(rng.randrange(2)),nutrition=rng.choice(edges),saturation=rng.choice(floats),always=bool(rng.randrange(2)),fail=rng.randrange(-1,4),mutate=rng.randrange(-1,4)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-food-properties-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFoodPropertiesOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/food_properties_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaFoodPropertiesOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','food_properties_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('food_properties_fixture.exe' if os.name=='nt' else 'food_properties_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} food properties output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual FoodProperties.onConsume with real stored FoodData, native LegacyRandomSource and XoroshiroRandomSource, player/non-player class selection, and controlled random/food getter and level sound callbacks. Compares sound arguments, stored hunger/saturation, captured random-source selection, subsequent RNG state, position reads and mutation/failure prefixes. Rust uses the existing FoodData and random stream implementations. Sound mixing/playback, concrete consumable dispatch, particles/effects and full gameplay integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped food properties parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_food_storage_parity.py b/tools/test_food_storage_parity.py new file mode 100644 index 000000000..581fb5c9c --- /dev/null +++ b/tools/test_food_storage_parity.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python3 +"""Compare vanilla food NBT persistence and numeric conversions with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>f',v).hex() + def double(v):return struct.pack('>d',v).hex() + pool=[dict(type=i,value=0) for i in [0,7,8,9,10,11,12]] + for t,values in [(1,[-128,-1,0,1,127]),(2,[-32768,-129,-1,0,1,32767]),(3,[-2**31,-1,0,1,20,2**31-1]),(4,[-2**63,-2**32-1,-2**31,-1,0,1,2**31,2**32+1,2**63-1])]: + pool.extend(dict(type=t,value=str(v) if t==4 else v) for v in values) + values=[-float('inf'),-1e30,-2147483649.,-1.9,-1.,-0.,0.,1e-40,.1,1.,1.9,20.,2147483647.,2147483648.,1e30,float('inf'),float('nan')] + pool.extend(dict(type=t,value=(bits(v) if t==5 else double(v))) for t in [5,6] for v in values) + pool.extend([dict(type=5,value='7fa12345'),dict(type=6,value='7ff123456789abcd')]) + for slot in range(4): + for item in pool: + tags=[dict(type=0,value=0) for _ in range(4)];tags[slot]=item;yield dict(mode='read',tags=tags) + rng=random.Random(0x464f4f444e4254) + for _ in range(6000):yield dict(mode='read',tags=[rng.choice(pool) for __ in range(4)]) + for a in values: + for b in values:yield dict(mode='write',food=rng.choice([-2**31,-1,0,20,2**31-1]),timer=rng.choice([-2**31,-1,0,79,2**31-1]),saturation=bits(a),exhaustion=bits(b)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-food-storage-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFoodStorageOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/food_storage_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaFoodStorageOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','food_storage_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('food_storage_fixture.exe' if os.name=='nt' else 'food_storage_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} food storage output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual FoodData readAdditionalSaveData/addAdditionalSaveData through native TagValueInput/TagValueOutput; all NBT numeric types, missing/wrong-type defaults, numeric coercion, overflow, nonfinite values, signed-zero normalization, output types and round trips. Other player fields retained. ProblemReporter diagnostics, complete player save lifecycle and playable integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped food storage parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_free_space_parity.py b/tools/test_free_space_parity.py new file mode 100644 index 000000000..5fe5e0e70 --- /dev/null +++ b/tools/test_free_space_parity.py @@ -0,0 +1,119 @@ +#!/usr/bin/env python3 +"""Compare integrated entity free-space queries with collisions and resident fluids with pinned vanilla.""" +import collections +import json +import os +from pathlib import Path +import platform +import subprocess +import struct +import random +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def collision_corpus(facts): + def bits(v):return struct.pack('>d',float(v)).hex() + def row(state,bounds=(-.3,0,.2,.3,1.8,.8),context=0,entities=(),border=None,fail=-1,blocks=None): + return dict(chunks=[[x,z] for x in [-1,0,1] for z in [-1,0,1]],blocks=blocks if blocks is not None else [[0,0,0,state]],context=context,y=bits(0),entities=[0,0],fail=fail,limit=100000,suffocating=False,box=list(map(bits,bounds)),movement=dict(check=True,delta=list(map(bits,[0,0,0])),step=bits(.6),grounded=True,entities=[list(map(bits,b)) for b in entities],border=None if border is None else list(map(bits,border)))) + for state in range(len(facts['states'])): + yield row(state,context=state%4) + yield row(state,bounds=(-.6,0,.2,-.2,1.8,.8),context=state%4,border=[-.5,-1,-1,-.4,3,1]) + defaults=facts['defaults'];names=['air','stone','water','lava','scaffolding','powder_snow','shulker_box','moving_piston','stone_slab','oak_stairs','snow','cobweb','bamboo'] + boxes=[[-.3,0,.2,.3,1.8,.8],[0,0,0,1,1,1],[0,0,0,0,0,0],[1,0,0,1.6,1.8,.6],[-16,-16,-16,-15,0,-15],[15.8,0,15.8,16.4,1.8,16.4]] + entity_lists=[[],[[0,0,0,0,0,0]],[[0,0,0,1,1,1]],[[100,100,100,101,101,101]]] + borders=[None,[-.5,-1,-1,-.4,3,1],[0,0,0,0,0,0],[100,100,100,101,101,101]] + for name in names: + for context in range(4): + for entities in entity_lists: + for border in borders: + for fail in [-1,0,1,3,12,25,50]:yield row(defaults['minecraft:'+name],context=context,entities=entities,border=border,fail=fail) + rng=random.Random(0x434c454152) + for _ in range(3000): + state=rng.randrange(len(facts['states']));f=row(state,bounds=rng.choice(boxes),context=rng.randrange(4),entities=rng.choice(entity_lists),border=rng.choice(borders),fail=rng.choice([-1,-1,0,3,12,50])) + f['entities']=[rng.randrange(3),rng.randrange(3)] + if rng.randrange(3)==0:f['chunks']=[];f['blocks']=[] + yield f + + +def corpus(facts): + def bits(v):return struct.pack('>d',float(v)).hex() + for i,f in enumerate(collision_corpus(facts)): + f['movement'].pop('check');f['movement']['free']=True + f['movement']['delta']=[bits(v) for v in [(0,0,0),(.5,.2,0),(0,.8,.5),(-.2,0,-.2)][i%4]] + yield f + air=facts['defaults']['minecraft:air'] + for state in [facts['defaults']['minecraft:'+n] for n in ['air','water','lava','seagrass','kelp','bubble_column','water_cauldron','scaffolding','powder_snow','stone']]: + for y in [-32,-16,-.1,0,15.9,31,32,64]: + for dx in [-16,-.5,0,.5,16,32]: + for fail in [-1,0,10,30,50,100,150]: + yield dict(chunks=[[x,z] for x in [-1,0,1] for z in [-1,0,1]],blocks=[[0,0,0,state]],context=0,y=bits(0),entities=[0,0],fail=fail,limit=100000,suffocating=False,box=list(map(bits,[0,y,0,1,y+1,1])),movement=dict(free=True,delta=list(map(bits,[dx,0,0])),step=bits(.6),grounded=True,entities=[],border=None)) + + +def main(): + lock, jars, libraries = base.verify_artifacts() + build = lab.LOCAL/'rust-free-space-parity';build.mkdir(exist_ok=True) + report_path = build/'report.json';report_path.unlink(missing_ok=True) + oracle = lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java' + helpers = [oracle.with_name(name+'.java') for name in + ['VanillaHeightmapOracle', 'VanillaCollisionOracle', 'VanillaBlockStateCodecOracle', 'VanillaSuffocationOracle', 'VanillaFaceSupportOracle']] + sources = [oracle, *helpers, Path(__file__), lab.ROOT/'tools/test_rust_parity.py', + lab.ROOT/'tools/test_worldgen_parity.py', lab.ROOT/'tools/lab.py', + lab.ROOT/'Cargo.toml', lab.ROOT/'Cargo.lock', + lab.ROOT/'crates/horizon-world/examples/registry_collision_scan_fixture.rs'] + for crate in ['horizon-core', 'horizon-world']: + sources += [lab.ROOT/'crates'/crate/'Cargo.toml', + *sorted((lab.ROOT/'crates'/crate/'src').rglob('*.rs'))] + tested = base.source_hashes(sources) + tags = worldgen.tag_resources(jars['server']) + if tags != worldgen.tag_resources(jars['client']):raise AssertionError('Client/server block tags differ') + lab.write_json(build/'tags.json', tags) + classes = build/'classes';classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, libraries)) + def run(command, name): + with (build/(name+'.log')).open('w') as log: + subprocess.run(list(map(str, command)), cwd=lab.ROOT, check=True, timeout=3600, + stdout=log, stderr=subprocess.STDOUT) + run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-cp', + str(jars['server'])+os.pathsep+dependencies, '-d', classes, oracle, *helpers], 'compile-java') + def java(side, mode): + run(['java', '-Xmx768M', '-cp', os.pathsep.join([str(classes), str(jars[side]), dependencies]), + 'dev.horizonlab.parity.VanillaRegistryCollisionScanOracle', mode, build], side+'-'+mode) + java('server', 'export') + facts = json.loads((build/'facts.json').read_text()) + if len(facts['states']) != 35723:raise AssertionError('Incomplete pinned registry') + definitions = json.loads((build/'definitions.json').read_text()) + count = 0 + with (build/'inputs.txt').open('w') as output: + for fixture in corpus(facts): + output.write(json.dumps(fixture, separators=(',', ':'))+'\n');count += 1 + fixture_paths = [build/name for name in ['inputs.txt', 'facts.json', 'definitions.json', + 'block-registry.nbt', 'cached-collision.nbt', 'tags.json']] + fixtures = base.source_hashes(fixture_paths) + run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'registry_collision_scan_fixture'], 'compile-rust') + metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) + binary = Path(metadata['target_directory'])/'release/examples'/('registry_collision_scan_fixture.exe' if os.name=='nt' else 'registry_collision_scan_fixture') + run([binary, build], 'rust');references = [] + for side, jar in jars.items(): + java(side, side) + matched = base.compare(build/(side+'.txt'), build/'rust.txt') + references.append({'side':side, 'jar_sha256':lab.digest(jar, 'sha256'), + 'output_sha256':lab.digest(build/(side+'.txt'), 'sha256'), 'matched_output_lines':matched}) + print(f'{side}: {matched:,} free-space lines match', flush=True) + base.ensure_sources_unchanged(sources, tested);base.ensure_sources_unchanged(fixture_paths, fixtures) + report = {'schema':1, 'minecraft':lock['minecraft']['version'], 'manifest_sha1':lock['minecraft']['manifest_sha1'], + 'platform':platform.platform(), 'java':subprocess.check_output(['java', '--version'], text=True).splitlines()[0], + 'rustc':subprocess.check_output(['rustc', '--version'], text=True).strip(), + 'registry_states':len(facts['states']), 'block_definitions':len(definitions), + 'definition_counts':dict(collections.Counter(definitions.values())), + 'native_chunk_storage':'ProtoChunk', 'rust_chunk_storage':'TerrainChunk', 'fixtures':count, 'sources_sha256':tested, 'fixtures_sha256':fixtures, + 'rust_output_sha256':lab.digest(build/'rust.txt', 'sha256'), 'references':references, + 'scope':'Actual Entity.isFree offsets its AABB, invokes native block/entity/border noCollision and only then section-based containsAnyLiquid over resident ProtoChunk storage. Rust composes registry-bound collision resolution and FluidPresence over the same TerrainChunk storage. Covers all registered states, offsets, context variants, height/chunk boundaries, fluids, missing required chunks and partial query failures. Entity collision lists, border applicability and contexts are controlled; chunk generation, live entity indexing and full playable integration remain pending.'} + lab.write_json(report_path, report);print(f'Scoped free space parity passed: {report_path}', flush=True) + + +if __name__ == '__main__':main() diff --git a/tools/test_generation_tick_parity.py b/tools/test_generation_tick_parity.py new file mode 100644 index 000000000..c0d906fb7 --- /dev/null +++ b/tools/test_generation_tick_parity.py @@ -0,0 +1,124 @@ +#!/usr/bin/env python3 +"""Compare proto-chunk ticks and world-generation tick routing with vanilla.""" +import argparse +from collections import Counter +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab, test_rust_parity as base + + +def corpus(): + extremes = [-9223372036854775808, -2147483648, -1, 0, 1, 2147483647, 9223372036854775807] + for time in extremes: + yield 'reset' + yield 'load -1 -1 4 0 -1 64 -1 -2147483648 -100 0 -1 64 -1 2147483647 100 1 -1 64 -1 -1 0 2 -2 65 -2 12 3' + yield 'query 0 -1 64 -1' + yield 'snapshot -1 -1' + yield f'schedule 0 -1 64 -1 {time} -3 {time}' + yield f'schedule 3 -3 66 -3 {time} 2 {time}' + yield f'dump -1 -1 {time}' + yield 'snapshot_dump' + yield f'promote -1 -1 {time}' + yield f'dump -1 -1 {time}' + yield f'schedule 4 -4 67 -4 {time} -2 {time}' + yield f'dump -1 -1 {time}' + yield 'snapshot_dump' + for kind in ['load', 'level']: + yield 'reset' + # Deliberately load a position outside the owning container; routing is + # determined by each request's position, not by entries in saved lists. + yield f'{kind} 0 0 2 0 16 64 0 7 0 0 16 64 0 8 -3' + yield 'query 0 16 64 0' + yield 'dump 0 0 0' + yield 'dump 1 0 0' + yield 'fail 1' + yield 'query 0 0 64 0' + yield 'schedule 1 0 64 0 0 0 0' + yield 'will 1 0 64 0' + yield 'count' + yield 'fail 0' + yield 'query 1 0 64 0' + yield 'unpack 0 0 9223372036854775807' + yield 'dump 0 0 -9223372036854775808' + positions = [[-2147483648, -2147483648, 2147483647], [2147483647, 2147483647, -2147483648], + [0, 0, 0], [67108864, 4096, -67108864], [-1, -1, -1], [15, 319, 15], [16, -64, 16]] + for priority in [-2147483648, -4, -3, -2, -1, 0, 1, 2, 3, 4, 2147483647]: + yield 'reset' + for i, p in enumerate(positions): + xyz = ' '.join(map(str, p)) + yield f'schedule {i} {xyz} -9223372036854775808 {priority} 9223372036854775807' + yield f'schedule {i} {xyz} 9223372036854775807 {-priority if priority != -2147483648 else 0} -9223372036854775808' + yield f'query {i} {xyz}' + yield f'will {i} {xyz}' + yield f'dump {p[0] >> 4} {p[2] >> 4} 12345' + rng = random.Random(0x484f52495a4f4e) + for trial in range(12): + yield 'reset' + for cx in range(-2, 3): + command = 'load' if (cx + trial) % 2 == 0 else 'level' + rows = [] + for i in range(24): + row = [rng.randrange(8), cx*16+rng.randrange(4), rng.randrange(-3, 4), rng.randrange(4), rng.choice([-2147483648, -1, 0, 1, 2147483647]), rng.randrange(-8, 9)] + rows.append(' '.join(map(str, row))) + if i % 3 == 0: rows.append(rows[-1]) + yield f'{command} {cx} 0 {len(rows)} ' + ' '.join(rows) + for step in range(700): + cx = rng.randrange(-2, 3); p = [cx*16+rng.randrange(4), rng.randrange(-3, 4), rng.randrange(4)] + xyz = ' '.join(map(str, p)); typ = rng.randrange(8) + if step % 71 == 0: + yield 'fail 1'; yield f'query {typ} {xyz}'; yield f'will {typ} {xyz}'; yield 'count'; yield 'fail 0' + if step % 79 == 0: yield f'promote {cx} 0 {rng.choice(extremes)}' + if step % 83 == 0: yield f'snapshot {cx} 0' + if step % 89 == 0: yield 'snapshot_dump' + if step % 101 == 0: yield f'remove {cx} 0' + yield f'schedule {typ} {xyz} {rng.choice(extremes)} {rng.randrange(-8, 9)} {rng.choice(extremes)}' + yield f'query {typ} {xyz}' + if step % 23 == 0: yield f'dump {cx} 0 {rng.choice(extremes)}' + for cx in range(-2, 3): yield f'dump {cx} 0 {rng.choice(extremes)}' + yield 'snapshot_dump' + + +def main(): + parser = argparse.ArgumentParser(description=__doc__); parser.add_argument('--prepare', action='store_true'); args = parser.parse_args() + build = lab.LOCAL / 'rust-generation-tick-parity'; build.mkdir(parents=True, exist_ok=True) + report_path = build / 'report.json'; report_path.unlink(missing_ok=True) + if args.prepare: lab.prepare() + lock, jars, libraries = base.verify_artifacts() + oracle = lab.ROOT / 'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGenerationTickOracle.java' + sources = [oracle, Path(__file__), lab.ROOT / 'tools/test_rust_parity.py', lab.ROOT / 'tools/lab.py', lab.ROOT / 'Cargo.toml', lab.ROOT / 'Cargo.lock', lab.ROOT / 'crates/horizon-core/Cargo.toml', + *sorted((lab.ROOT / 'crates/horizon-core/src').rglob('*.rs')), lab.ROOT / 'crates/horizon-core/examples/generation_tick_fixture.rs'] + tested_sources = base.source_hashes(sources) + commands = list(corpus()); inputs = build / 'inputs.txt'; inputs.write_text('\n'.join(commands) + '\n') + tested_fixtures = base.source_hashes([inputs]); classes = build / 'classes'; classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, libraries)) + def run(command, name, **kwargs): + with (build / (name + '.log')).open('w') as log: + subprocess.run(list(map(str, command)), cwd=lab.ROOT, check=True, timeout=3600, stderr=log, **({'stdout': log} | kwargs)) + run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-cp', str(jars['server']) + os.pathsep + dependencies, '-d', classes, oracle], 'compile-java') + run(['cargo', 'build', '--release', '-p', 'horizon-core', '--example', 'generation_tick_fixture'], 'compile-rust') + metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) + binary = Path(metadata['target_directory']) / 'release/examples' / ('generation_tick_fixture.exe' if os.name == 'nt' else 'generation_tick_fixture') + with inputs.open('rb') as source, (build / 'rust.txt').open('wb') as output: run([binary], 'rust', stdin=source, stdout=output) + references = [] + for side, jar in jars.items(): + run(['java', '-Xmx512M', '-cp', os.pathsep.join([str(classes), str(jar), dependencies]), 'dev.horizonlab.parity.VanillaGenerationTickOracle', inputs, build / (side + '.txt')], side) + matched = base.compare(build / (side + '.txt'), build / 'rust.txt') + references.append({'side': side, 'jar_sha256': lab.digest(jar, 'sha256'), 'output_sha256': lab.digest(build / (side + '.txt'), 'sha256'), 'matched_output_lines': matched}) + print(f'{side}: {matched:,} generation-tick lines match Rust', flush=True) + base.ensure_sources_unchanged(sources, tested_sources); base.ensure_sources_unchanged([inputs], tested_fixtures) + report = {'schema': 1, 'minecraft': lock['minecraft']['version'], 'manifest_sha1': lock['minecraft']['manifest_sha1'], 'platform': platform.platform(), + 'java': subprocess.check_output(['java', '--version'], text=True).splitlines()[0], 'rustc': subprocess.check_output(['rustc', '--version'], text=True).strip(), + 'commands': dict(Counter(command.split()[0] for command in commands)), 'sources_sha256': tested_sources, 'fixtures_sha256': tested_fixtures, + 'rust_output_sha256': lab.digest(build / 'rust.txt', 'sha256'), 'references': references, + 'scope': 'Native ProtoChunkTicks load/schedule deduplication, insertion order, zero delay for scheduled requests, preserved saved delays/priorities, time-independent packing and independent scheduledTicks snapshots. Native WorldGenTickAccess lookup ordering, routing to mixed proto/level containers, lookup failures, false willTickThisTick and zero count without lookups. Proto-to-level promotion and unpacked save behavior, position/type identities, priorities, duplicates, unloaded containers and integer/time extremes are compared. Rust exposes pack as a borrowed immutable slice; mutation of the native returned list is outside the API. Actual block/fluid execution and feature-world scheduling integration remain pending.'} + lab.write_json(report_path, report); print(f'Scoped generation-tick parity passed: {report_path}') + + +if __name__ == '__main__': main() diff --git a/tools/test_geometry_parity.py b/tools/test_geometry_parity.py new file mode 100644 index 000000000..54ebc21ae --- /dev/null +++ b/tools/test_geometry_parity.py @@ -0,0 +1,313 @@ +#!/usr/bin/env python3 +"""Compare Horizon simulation geometry with the checksum-pinned vanilla binaries.""" +import argparse +from collections import Counter +import json +import math +import os +from pathlib import Path +import platform +import random +import struct +import subprocess +import tempfile + +try: + from . import lab, test_rust_parity +except ImportError: + import lab + import test_rust_parity + + +def number(value): + return struct.pack(">d", value).hex() + + +def numbers(values): + return " ".join(map(number, values)) + + +def corpus(): + rng = random.Random(0x484f52495a4f4e47454f) + special = [0.0, -0.0, 1.0, -1.0, 1e-7, -1e-7, + math.nextafter(1e-7, 0), math.nextafter(1e-7, math.inf), + 9.999999747378752e-6, math.nextafter(9.999999747378752e-6, 0), + float.fromhex("0x0.0000000000001p-1022"), 1e-200, 1e200, + float("inf"), float("-inf"), float("nan")] + def component(): + return rng.choice(special) if rng.randrange(5) == 0 else rng.uniform(-32, 32) + def vector(): + return [component() for _ in range(3)] + boundaries = [-1.0, -0.0, 0.0, 1e-8, .5, math.nextafter(1.0, 0.0), 1.0, math.nextafter(1.0, math.inf)] + for start in boundaries: + for end in boundaries: + for axes in range(1, 8): + a = [start if axes & (1 << i) else 0.0 for i in range(3)] + b = [end if axes & (1 << i) else 0.0 for i in range(3)] + yield "traverse " + numbers(a + b) + " 0" + for step in range(8000): + base = rng.choice([0, -30_000_000, 30_000_000, -2147483648, 2147483647]) + start = [base + rng.choice([rng.uniform(-4, 4), -1, 0, .5, 1]) for _ in range(3)] + end = [v + rng.choice([-16, -1, 0, 1, 16, rng.uniform(-16, 16)]) for v in start] + if step % 13 == 0: + end = start[:] + yield "traverse " + numbers(start + end) + f" {rng.choice([0, 1, 2, 3, 10, 1000])}" + yield "trig-table" + for step in range(16000): + angle = component() if step % 3 == 0 else rng.uniform(-100000, 100000) + pitch, yaw = rng.uniform(-90, 90), rng.uniform(-360, 360) + if step % 11 == 0: + pitch, yaw = rng.choice(special), rng.choice(special) + yield "rotation " + numbers(vector() + [angle, pitch, yaw]) + f" {rng.randrange(8)} {rng.randrange(3)} {rng.randrange(6)} " + number(component()) + for a in special: + for b in special: + yield "vec " + numbers([a, a, a, b, b, b, rng.choice(special)]) + for _ in range(7000): + a = vector() + b = a if rng.randrange(7) == 0 else vector() + yield "vec " + numbers(a + b + [component()]) + for _ in range(7000): + yield "box " + numbers(vector() + vector() + vector() + vector() + vector() + vector() + vector()) + f" {rng.randrange(3)} " + number(component()) + # Direct ray ties, strict endpoint exclusion, inside and epsilon thresholds. + for start, end in [([-1, -1, -1], [2, 2, 2]), ([2, 2, 2], [-1, -1, -1]), + ([-1, .5, .5], [0, .5, .5]), ([0, .5, .5], [1, .5, .5]), + ([.5, .5, .5], [2, .5, .5]), ([-1e-7, .5, .5], [1e-7, .5, .5])]: + yield "box " + numbers([0, 0, 0, 1, 1, 1] * 2 + start + end + [0, 0, 0]) + " 0 " + number(0) + integers = [-2147483648, -2147483647, -16, -1, 0, 1, 15, 16, 2147483646, 2147483647] + for a in integers: + for b in integers: + yield f"block-box {a} {b} {a} {b} {a} {b}" + shape_id = 0 + for scenario in range(180): + cube = scenario % 3 == 0 + sizes = [rng.randrange(1, 7) for _ in range(3)] if scenario else [0, 0, 0] + if scenario == 0: + cube = False + coords = [] + for size in sizes: + if cube: + coords.append([i / size for i in range(size + 1)]) + else: + coords.append(sorted(rng.sample(range(-16, 33), size + 1))) + coords[-1] = [v / 16 for v in coords[-1]] + if scenario == 1: + sizes = [1, 1, 1] + coords = [[0.0, 1.0] for _ in range(3)] + density = rng.choice([0, .15, .5, .85, 1]) if scenario != 1 else 1 + occupied = "".join("1" if rng.random() < density else "0" for _ in range(math.prod(sizes))) or "-" + yield f"grid {int(cube)} {' '.join(map(str, sizes))} " + numbers(sum(coords, [])) + " " + occupied + for step in range(250): + # Collision boxes lie outside, touch, or overlap individual boundaries. + lower, upper = [], [] + for axis in range(3): + edge = rng.choice(coords[axis]) + offset = rng.choice([0, 1e-7, -1e-7, 1e-8, -1e-8, .3, -.3, -1, 1]) + lower.append(edge + offset) + upper.append(edge + offset + rng.choice([0, 1e-8, 1e-7, .2, .6, 1.8])) + point = [rng.choice(coords[axis] + special + [rng.uniform(-3, 3)]) for axis in range(3)] + block = rng.choice([(0, 0, 0), (-17, -64, -1), (30_000_000, 64, -30_000_000)]) + start = [rng.uniform(-3, 3) + v for v in block] + end = [rng.uniform(-3, 3) + v for v in block] + if step % 13 == 0: + start = [.5 + v for v in block] + if step % 17 == 0: + end = start[:] + if step % 19 == 0: + end = [v + 1e-5 for v in start] + amount = rng.choice(special) if step % 4 == 0 else rng.uniform(-4, 4) + yield f"query {shape_id} " + numbers(lower + upper + start + end + point) + f" {' '.join(map(str, block))} {rng.randrange(3)} " + number(amount) + shape_id += 1 + for _ in range(2500): + count = rng.randrange(9) + selected = [rng.randrange(shape_id) for _ in range(count)] + yield "many " + numbers(vector() + vector()) + f" {rng.randrange(3)} " + number(component()) + f" {count}" + (" " + " ".join(map(str, selected)) if selected else "") + for step in range(12000): + count = rng.randrange(12) + selected = [rng.randrange(shape_id) for _ in range(count)] + movement = vector() if step % 3 == 0 else [rng.choice([0.0, -0.0, 1e-8, -1e-8, .3, -.3, 1.0, -1.0]) for _ in range(3)] + lower = [rng.choice([-1.0, -.6, -.5, -0.0, 0.0, .5, 1.0]) for _ in range(3)] if step % 4 else vector() + upper = [v + rng.choice([0.0, .6, 1.0, 1.8]) for v in lower] + max_step = rng.choice([0.0, -0.0, .5, .6, 1.0, 2.0, float("nan"), float("inf")]) + current_y = rng.choice([0.0, -0.0, -.5, .5, -.6, .6, float("nan")]) + yield "motion " + numbers(lower + upper + movement + [max_step, current_y]) + f" {count}" + (" " + " ".join(map(str, selected)) if selected else "") + epsilon_shapes = [] + for offset in [0.0, -0.0, 1e-8, -1e-8, 1e-7, math.nextafter(1e-7, 0), math.nextafter(1e-7, math.inf), -1e-7, 1.0-1e-7, 1.0, 1.0+1e-7, 2.0]: + epsilon_shapes.append(shape_id) + shape_id += 1 + yield "grid 0 1 1 1 " + numbers([offset, offset+1, 0, 1, 0, 1]) + " 1" + for first in epsilon_shapes: + for second in epsilon_shapes: + for operation in range(0, 16, 2): + yield f"join {first} {second} {operation}" + shape_id += 1 + # Joined shapes feed subsequent joins and collision queries. Sparse and empty + # results retain merged coordinate metadata, which affects later operations. + for step in range(4500): + first = rng.randrange(shape_id) + second = first if step % 7 == 0 else rng.randrange(shape_id) + operation = step % 16 + yield f"join {first} {second} {operation}" + if operation & 1: + continue + new_id = shape_id + shape_id += 1 + for axis in range(3): + lower = [rng.uniform(-2, 2) for _ in range(3)] + upper = [v + rng.choice([.2, .6, 1.8]) for v in lower] + start, end = [rng.uniform(-2, 2) for _ in range(3)], [rng.uniform(-2, 2) for _ in range(3)] + point = [rng.choice([0, .5, 1, rng.uniform(-2, 2), float("nan")]) for _ in range(3)] + yield f"query {new_id} " + numbers(lower + upper + start + end + point) + f" 0 0 0 {axis} " + number(rng.uniform(-3, 3)) + for step in range(600): + lower = [rng.choice([0, -0.0, -.5, .125, .25, .5, .875, 1, 1e-8, -1e-8, 1e-7, -1e-7]) for _ in range(3)] + upper = [v + rng.choice([0, 1e-8, 1e-7, math.nextafter(1e-7, math.inf), .125, .25, .5, 1, .3333333333333333]) for v in lower] + if step % 31 == 0: + lower, upper = [0.0] * 3, [1.0] * 3 + yield "make-box " + numbers(lower + upper) + shape_id += 1 + for step in range(1000): + first = rng.randrange(shape_id) + if step % 2: + second = rng.randrange(shape_id) + operation = (step // 2) % 16 + yield f"join-optimized {first} {second} {operation}" + if operation & 1: + continue + else: + yield f"optimize {first}" + new_id = shape_id + shape_id += 1 + lower, upper = [-.6, 0, .2], [-.2, 1.8, .8] + yield f"query {new_id} " + numbers(lower + upper + [-1, .5, .5, 2, .5, .5, .5, .5, .5]) + " 0 0 0 0 " + number(1) + + + yield from step_corpus(rng, shape_id, vector) + yield from sweep_corpus(rng, vector) + for _ in range(12000): + yield f"floor-height {rng.randrange(shape_id)} {rng.randrange(shape_id)}" + + +def sweep_corpus(rng, vector): + for step in range(2400): + base = rng.choice([-2147483648, -30000000, -17, -1, 0, 16, 30000000, 2147483640]) + a = [base + rng.randrange(4) for _ in range(3)] + b = [base + rng.randrange(7) for _ in range(3)] + direction = vector() if step % 5 == 0 else [rng.choice([-2, -1, -0.0, 0.0, 1, 2]) for _ in range(3)] + limit = rng.choice([0, 1, 3, 10, 1000]) + yield f"block-iterate {' '.join(map(str, a+b))} " + numbers(direction) + f" {limit}" + lower = [v + rng.choice([0.0, -0.0, .25, .5, .99999999]) for v in a] + upper = [v + rng.choice([0.0, .25, .6, 1.0, 1.8]) for v in lower] + yield "box-iterate " + numbers(lower + upper + direction) + f" {limit}" + float_epsilon = struct.unpack(">f", struct.pack(">f", 1e-5))[0] + epsilon = math.sqrt(struct.unpack(">f", struct.pack(">f", float_epsilon * float_epsilon))[0]) + for axis in range(3): + for sign in [-1, 1]: + for value in [epsilon, math.nextafter(epsilon, 0), math.nextafter(epsilon, math.inf)]: + end = [0.0] * 3 + end[axis] = sign * value + yield "sweep " + numbers([0.0] * 3 + end + [-1.0] * 3 + [1.0] * 3) + " 0" + for step in range(9000): + base = rng.choice([-30000000, -17, -1, 0, 16, 30000000]) + start = [base + rng.choice([-1.0, -0.0, 0.0, .5, 1.0, rng.uniform(-3, 3)]) for _ in range(3)] + delta = [rng.choice([-4, -1, -1e-5, -1e-8, -0.0, 0.0, 1e-8, 1e-5, 1, 4, rng.uniform(-5, 5)]) for _ in range(3)] + if step % 19 == 0: + delta = [rng.choice([0.0, 1e-200, epsilon, math.nextafter(epsilon, 0), math.nextafter(epsilon, math.inf)]), 0.0, 0.0] + end = [a+b for a, b in zip(start, delta)] + lower = [end[i] + rng.choice([-1.0, -.3, -0.0, 0.0]) for i in range(3)] + upper = [v + rng.choice([0.0, .3, .6, 1.0, 1.8, 2.0]) for v in lower] + yield "sweep " + numbers(start + end + lower + upper) + f" {rng.choice([0, 1, 2, 4, 10, 1000])}" + # Packed-position identity aliases Y every 4096 blocks. The initial loop + # still visits all cells; subsequent footprints use the packed dedup set. + for delta in [0.0, 1e-8, 1.0, -1.0]: + yield "sweep " + numbers([0, 0, 0, delta, 0, 0, delta, -2048, 0, delta+.3, 2048, .3]) + " 0" + + +def step_corpus(rng, shape_id, vector): + def selected(ids): + return str(len(ids)) + (" " + " ".join(map(str, ids)) if ids else "") + # Controlled shape selection invokes the real Entity.collide, including its + # second query. Ledges, floors and ceilings exercise success and failure. + ledges = [] + for height in [.125, .5, .6, 1.0, 1.5, math.nextafter(.5, 0), math.nextafter(.5, math.inf)]: + ledges.append(shape_id) + yield "grid 0 1 1 1 " + numbers([0, 1, 0, height, 0, 1]) + " 1" + shape_id += 1 + floor = shape_id + yield "grid 0 1 1 1 " + numbers([-8, 8, -1, 0, -8, 8]) + " 1" + shape_id += 1 + ceiling = shape_id + yield "grid 0 1 1 1 " + numbers([-8, 8, 2.1, 3, -8, 8]) + " 1" + shape_id += 1 + for ledge in ledges: + for height in [0.0, .5, .6, 1.0, 2.0]: + for y in [0.0, .2, 1.0]: + for dy in [0.0, -.1, -2.0, .1]: + for grounded in [0, 1]: + for overhang in [False, True]: + blocks = [floor, ledge] + ([ceiling] if overhang else []) + bounds = [-.6, y, .2, -.2, y+1.8, .8] + yield "step-motion " + numbers(bounds + [1.0, dy, 0.0, height]) + f" {grounded} 0 " + selected(blocks) + " " + selected(blocks) + " -1" + for step in range(16000): + def random_shapes(): + return [rng.randrange(shape_id) for _ in range(rng.randrange(9))] + entities, initial, stepping = random_shapes(), random_shapes(), random_shapes() + if step % 3 == 0: + initial = stepping = [floor, rng.choice(ledges)] + lower = [rng.choice([-1.0, -.6, -.5, -0.0, 0.0, .5, 1.0]) for _ in range(3)] + if step % 11 == 0: + lower = vector() + upper = [v + rng.choice([0.0, .6, 1.0, 1.8]) for v in lower] + movement = vector() if step % 4 == 0 else [rng.choice([0.0, -0.0, 1e-200, 1e-8, -1e-8, .3, -.3, 1.0, -1.0]) for _ in range(3)] + height = rng.choice([0.0, -0.0, -.6, .5, .6, 1.0, 2.0, float("nan"), float("inf")]) + border = rng.randrange(shape_id) if step % 5 == 0 else -1 + yield "step-motion " + numbers(lower + upper + movement + [height]) + f" {rng.randrange(2)} " + " ".join(map(selected, [entities, initial, stepping])) + f" {border}" + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--prepare", action="store_true") + args = parser.parse_args() + directory = lab.LOCAL / "rust-geometry-parity" + directory.mkdir(parents=True, exist_ok=True) + report_path = directory / "report.json" + report_path.unlink(missing_ok=True) + if args.prepare: + lab.prepare() + lock, jars, libraries = test_rust_parity.verify_artifacts() + base = Path(tempfile.mkdtemp(prefix="run-", dir=directory)) + commands = list(corpus()) + inputs = base / "inputs.txt" + inputs.write_text("\n".join(commands) + "\n", encoding="utf-8") + oracle = lab.ROOT / "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGeometryOracle.java" + sources = [oracle, Path(__file__).resolve(), lab.ROOT / "tools/test_rust_parity.py", lab.ROOT / "Cargo.toml", lab.ROOT / "Cargo.lock", lab.ROOT / "crates/horizon-core/Cargo.toml", *sorted((lab.ROOT / "crates/horizon-core/src").rglob("*.rs"))] + tested_sources = test_rust_parity.source_hashes(sources) + classes = base / "classes" + classes.mkdir() + dependency_path = os.pathsep.join(map(str, libraries)) + test_rust_parity.run(["javac", "--release", "25", "-proc:none", "-cp", os.pathsep.join([str(jars["server"]), dependency_path]), "-d", str(classes), str(oracle)]) + test_rust_parity.run(["cargo", "build", "--release", "--bin", "horizon-geometry-parity"]) + metadata = json.loads(subprocess.check_output(["cargo", "metadata", "--no-deps", "--format-version", "1"], cwd=lab.ROOT, text=True)) + binary = Path(metadata["target_directory"]) / "release" / ("horizon-geometry-parity.exe" if os.name == "nt" else "horizon-geometry-parity") + candidate = base / "rust.txt" + with inputs.open("rb") as stdin, candidate.open("wb") as stdout: + test_rust_parity.run([str(binary)], stdin=stdin, stdout=stdout) + references = [] + for side, jar in jars.items(): + reference = base / f"vanilla-{side}.txt" + with (base / f"vanilla-{side}.log").open("wb") as log: + test_rust_parity.run(["java", "-Xmx512M", "-cp", os.pathsep.join([str(classes), str(jar), dependency_path]), "dev.horizonlab.parity.VanillaGeometryOracle", str(inputs), str(reference)], stdout=log, stderr=subprocess.STDOUT) + matched = test_rust_parity.compare(reference, candidate) + references.append({"side": side, "jar_sha256": lab.digest(jar, "sha256"), "output_sha256": lab.digest(reference, "sha256"), "matched_output_lines": matched}) + print(f"{side}: {matched:,} geometry output lines match", flush=True) + test_rust_parity.ensure_sources_unchanged(sources, tested_sources) + report = {"schema": 1, "minecraft": lock["minecraft"]["version"], "manifest_sha1": lock["minecraft"]["manifest_sha1"], "platform": platform.platform(), + "java": subprocess.check_output(["java", "--version"], text=True).splitlines()[0], "rustc": subprocess.check_output(["rustc", "--version"], text=True).strip(), + "commands": dict(Counter(command.split()[0] for command in commands)), "inputs_sha256": lab.digest(inputs, "sha256"), "rust_output_sha256": lab.digest(candidate, "sha256"), + "sources_sha256": tested_sources, "references": references, + "scope": "Selected Vec3/AABB operations, sine table entries, quantized trig, rotations and look directions; finite block-ray traversal; bounded inclusive/directional block iteration and finite swept-block visits with step indices; immutable cube/array voxel-grid bounds, column minima/maxima, greedy boxes, collide, ray hits, closest points and cell lookup; lazy floor-height selection; box quantization, optimized/unoptimized Boolean joins, alias identity and joinIsNotEmpty; Entity.collideWithShapes, candidate step heights and Entity.collide step-up decisions/query bounds with caller-controlled block/entity/border shape lists. No live entities, actual world shape selection, grounding/velocity side effects, fluids or block behavior."} + lab.write_json(report_path, report) + lab.write_json(base / "report.json", report) + print(f"Geometry comparison passed: {report_path}") + + +if __name__ == "__main__": + main() diff --git a/tools/test_ground_support_parity.py b/tools/test_ground_support_parity.py new file mode 100644 index 000000000..967ac9a96 --- /dev/null +++ b/tools/test_ground_support_parity.py @@ -0,0 +1,100 @@ +#!/usr/bin/env python3 +"""Compare native supporting-block selection and ground-state transitions.""" +import json +import os +from pathlib import Path +import platform +import random +import struct +import subprocess +try: + from . import lab, test_rust_parity as base, test_block_collision_scan_parity as scans +except ImportError: + import lab + import test_rust_parity as base + import test_block_collision_scan_parity as scans + + +def bits(value):return struct.pack('>d',float(value)).hex() + + +def selection_corpus(): + for index,f in enumerate(scans.corpus()): + if f['suffocating']:continue + v=[struct.unpack('>d',bytes.fromhex(x))[0] for x in f['box']] + center=[(v[i]+v[i+3])/2 for i in range(3)] + positions=[center] + if index%17==0:positions += [[0,0,0],[0.5,0.5,0.5],[float('nan'),0,0],[float('inf'),0,0],[1e154,0,0]] + for p in positions:yield dict(f,support_position=list(map(bits,p))) + for shape in [1,3,4,6]: + for p in [[0,0,0],[0.5,0.5,0.5],[1,1,1],[-0.5,-0.5,-0.5]]: + for seed in range(6): + yield dict(box=list(map(bits,[-2,-2,-2,2,2,2])),palette=[[shape,True,True,True],[1,False,False,True]],suffocating=False,missing=0,fail=-1,limit=100000,seed=seed,support_position=list(map(bits,p))) + + +def state_corpus(): + def initial(flags):return dict(grounded=bool(flags&1),horizontal=bool(flags&2),empty=bool(flags&4),support=[17,-64,-33] if flags&8 else None) + def op(mode,grounded,horizontal,movement,results,fail,bounds=None): + return dict(mode=mode,grounded=grounded,horizontal=horizontal,movement=None if movement is None else list(map(bits,movement)),results=results,fail=fail,box=list(map(bits,bounds or [-.3,1,-.3,.3,2.8,.3]))) + for flags in range(16): + for mode in range(3): + for grounded in [False,True]: + for horizontal in [False,True]: + for movement in [None,[0,0,0],[.2,-.5,.3]]: + for first in [None,[1,2,3]]: + for second in [None,[-4,-5,-6]]: + for fail in [-1,0,1,2]:yield dict(initial=initial(flags),ops=[op(mode,grounded,horizontal,movement,[first,second],fail)]) + rng=random.Random(0x47524f554e445354) + points=[None,[0,0,0],[17,-64,-33],[2147483647,-2147483648,2147483647]] + choices=[-1,-0.0,0,1e-8,.3,1,1e16,float('nan')] + for _ in range(2000): + ops=[] + for _ in range(12): + low=[rng.choice(choices) for _ in range(3)];high=[v+rng.choice([0,1e-8,1e-6,.6,1.8]) for v in low] + movement=None if rng.randrange(3)==0 else [rng.choice(choices) for _ in range(3)] + ops.append(op(rng.randrange(3),bool(rng.randrange(2)),bool(rng.randrange(2)),movement,[rng.choice(points),rng.choice(points)],rng.choice([-1,-1,0,1,2]),[*low,*high])) + yield dict(initial=initial(rng.randrange(16)),ops=ops) + + +def main(): + lock,jars,libraries=base.verify_artifacts() + build=lab.LOCAL/'rust-ground-support-parity';build.mkdir(exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + oracle_dir=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity' + oracles=[oracle_dir/(name+'.java') for name in ['VanillaBlockCollisionScanOracle','VanillaGroundStateOracle','VanillaFaceSupportOracle']] + sources=[*oracles,Path(__file__),lab.ROOT/'tools/test_block_collision_scan_parity.py',lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock'] + for crate in ['horizon-core','horizon-world']:sources += [lab.ROOT/'crates'/crate/'Cargo.toml',*sorted((lab.ROOT/'crates'/crate/'src').rglob('*.rs'))] + names=['block_collision_scan_fixture','ground_state_fixture'] + sources += [lab.ROOT/'crates/horizon-world/examples'/(name+'.rs') for name in names] + tested=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True);dependencies=os.pathsep.join(map(str,libraries)) + def run(command,name): + with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependencies,'-d',classes,*oracles],'compile-java') + counts={};fixture_paths=[] + for name,corpus in [('selection',selection_corpus),('state',state_corpus)]: + directory=build/name;directory.mkdir(exist_ok=True);path=directory/'inputs.txt';count=0 + with path.open('w') as output: + for f in corpus():output.write(json.dumps(f,separators=(',',':'))+'\n');count+=1 + counts[name]=count;fixture_paths.append(path) + fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--locked','--release','-p','horizon-world','--example',names[0],'--example',names[1]],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT)) + for group,name in zip(['selection','state'],names): + binary=Path(metadata['target_directory'])/'release/examples'/(name+'.exe' if os.name=='nt' else name);run([binary,build/group],'rust-'+group) + references=[] + for side,jar in jars.items(): + results=[] + for group,oracle in zip(['selection','state'],['VanillaBlockCollisionScanOracle','VanillaGroundStateOracle']): + directory=build/group + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jar),dependencies]),'dev.horizonlab.parity.'+oracle,side,directory],side+'-'+group) + reference=directory/(side+'.txt');matched=base.compare(reference,directory/'rust.txt') + results.append(dict(group=group,matched_output_lines=matched,output_sha256=lab.digest(reference,'sha256'),rust_output_sha256=lab.digest(directory/'rust.txt','sha256'))) + print(f'{side}: {matched:,} ground-{group} lines match',flush=True) + references.append(dict(side=side,jar_sha256=lab.digest(jar,'sha256'),results=results)) + base.ensure_sources_unchanged(sources,tested);base.ensure_sources_unchanged(fixture_paths,fixtures) + report=dict(schema=1,minecraft=lock['minecraft']['version'],manifest_sha1=lock['minecraft']['manifest_sha1'],platform=platform.platform(),java=subprocess.check_output(['java','--version'],text=True).splitlines()[0],rustc=subprocess.check_output(['rustc','--version'],text=True).strip(),fixtures=counts,sources_sha256=tested,fixtures_sha256=fixtures,references=references,scope='Actual CollisionGetter.findSupportingBlock over controlled collision metadata/shapes/providers, plus Entity.checkSupportingBlock and both setOnGroundWithMovement overloads over sequential support-query snapshots. Selection compares nearest block-center distance, ties, full scan order and failures. Ground-state checks compare thin foot bounds, previous-horizontal-footprint fallback, null movement, retained/cleared support, flags and partial state on errors across mutation sequences. Registry/context scanning has separate integration coverage; live player grounding, movement lifecycle and gameplay remain pending.') + lab.write_json(report_path,report);print(f'Scoped ground support parity passed: {report_path}',flush=True) + + +if __name__=='__main__':main() diff --git a/tools/test_height_provider_parity.py b/tools/test_height_provider_parity.py new file mode 100644 index 000000000..a14b7f8ca --- /dev/null +++ b/tools/test_height_provider_parity.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +"""Compare anchored height-provider decoding and seeded samples with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def definitions(): + encode=lambda value:json.dumps(value,separators=(',',':')) + anchors=[{'absolute':-64},{'absolute':0},{'absolute':1},{'absolute':2031},{'above_bottom':8},{'below_top':1},{'relative_to_sea_level':-8}] + for value in [None,False,0,[],{},*anchors,{'absolute':2032},{'absolute':0,'above_bottom':1}]: + yield encode(value);yield encode({'type':'constant','value':value}) + for minimum in anchors: + for maximum in anchors: + for kind in ['uniform','biased_to_bottom','very_biased_to_bottom','trapezoid']: + yield encode({'type':kind,'min_inclusive':minimum,'max_inclusive':maximum}) + for kind in ['biased_to_bottom','very_biased_to_bottom','trapezoid']: + field='plateau' if kind=='trapezoid' else 'inner' + for token in ['null','false','"1"','{}','[]','-1','0','1','2','4','14','100','2147483647','-2147483648','4294967297','1e100']: + yield '{"type":"'+kind+'","min_inclusive":{"absolute":0},"max_inclusive":{"absolute":14},"'+field+'":'+token+'}' + yield '{"type":"uniform","absolute":5,"min_inclusive":{"absolute":0},"max_inclusive":{"absolute":1}}' + yield '{"type":"constant","value":{"absolute":0},"value":{"relative_to_sea_level":0}}' + yield '{"type":"trapezoid","min_inclusive":{"absolute":-7},"max_inclusive":{"absolute":7}}' + yield '{"type":":uniform","min_inclusive":{"above_bottom":8},"max_inclusive":{"below_top":1}}' + + + # Zero-weight entries remain part of declared bounds, but are never sampled. + constant = (lambda n: {'absolute': n}) if True else (lambda n: n) + weighted = lambda entries: {'type': 'weighted_list', 'distribution': entries} + entry = lambda value, weight: {'data': value, 'weight': weight} + choices = [constant(-7), constant(19), {'type': 'uniform', 'min_inclusive': constant(0), 'max_inclusive': constant(31)}] + for weights in [(1,), (0,), (0, 1), (1, 0), (1, 1), (1, 62), (1, 63), (1, 64), (0, 3, 7), (2147483647,), (2147483646, 1), (2147483647, 1), (-1, 2), (4294967297, 2), (0.9, 1.9)]: + value = weighted([entry(choices[i % len(choices)], weight) for i, weight in enumerate(weights)]) + yield encode(value) + nested = weighted([entry(constant(5), 1), entry(constant(-9), 4)]) + yield encode(weighted([entry(nested, 3), entry(choices[-1], 2)])) + for distribution in [None, {}, [], [entry(constant(0), 0), entry(constant(1), 0)], [entry(None, 0), entry(constant(1), 1)], [{'data': constant(1)}], [{'weight': 1}], [entry(constant(1), '1')], [entry(constant(1), None)]]: + yield encode(weighted(distribution)) + + +def corpus(): + definitions_list=list(definitions()) + contexts=[[-64,384,63],[0,128,32],[-2032,4064,0],[2**31-1,-2**31,2**31-1],[-2**31,2**31-1,-2**31]] + for legacy in [False,True]: + for seed in [0,-1,0x123456789abcdef]: + for context in contexts: + for definition in definitions_list:yield {'definition':definition,'context':context,'legacy':legacy,'seed':seed,'samples':32} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-height-provider-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightProviderOracle.java" + helper=oracle.with_name("VanillaAnchorOracle.java") + sources=[oracle,helper,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/height_provider_fixture.rs"] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus());inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths);classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper],"compile-java") + run(["cargo","build","--release","-p","horizon-world","--example","height_provider_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("height_provider_fixture.exe" if os.name=="nt" else "height_provider_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaHeightProviderOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} height-provider output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"definitions":len(list(definitions())),"samples_per_valid_fixture":32, + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual HeightProvider.CODEC decoding and sampled heights with interleaved nextLong values, using actual WorldGenerationContext and all four vertical-anchor kinds. Covers constant, uniform, biased-to-bottom, very-biased-to-bottom trapezoid and weighted-list providers, both random modes, empty/equal ranges, inner/plateau defaults and bounds, numeric narrowing, relative coordinate overflow, malformed fields and anchor-versus-dispatch preference. Warning logs are excluded. Weighted lists include zero weights, singleton draws, nested providers, 63/64/65 weight totals, maximum/overflow totals and malformed entries; native constructor rejections count as decode errors. Encoding, cave/canyon paths and complete generation remain outside this scope."} + + lab.write_json(report_path,report);print(f"Scoped height-provider parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_heightmap_parity.py b/tools/test_heightmap_parity.py new file mode 100644 index 000000000..86368997c --- /dev/null +++ b/tools/test_heightmap_parity.py @@ -0,0 +1,122 @@ +#!/usr/bin/env python3 +"""Compare packed heightmaps with the pinned Java chunk and heightmap runtime.""" +import argparse +from collections import Counter +import json +import os +from pathlib import Path +import platform +import random +import subprocess + +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(facts): + states, defaults = facts["states"], facts["defaults"] + air, stone = defaults["minecraft:air"], defaults["minecraft:stone"] + choices = [defaults["minecraft:"+name] for name in ["air", "cave_air", "void_air", "stone", "water", "lava", "oak_leaves", "oak_slab", "seagrass", "snow", "powder_snow", "glass", "barrier"]] + rng = random.Random(0x484f52495a4f4e484549474854) + def fixture(minimum, height, initial, ops, trace=False): + return {"min": minimum, "height": height, "initial": initial, "ops": ops, "trace": trace} + # Every state participates in insertion and removal, not just predicate export. + ops=[] + for state in range(len(states)): + ops.extend([["set", 4, 5, 7, state, 63], ["query", 4, 7], ["set", 4, 5, 7, air, 63]]) + yield fixture(0, 16, [], [*ops, ["dump"]]) + # Exercise section boundaries, the full codec height bound and all bit widths. + for minimum, height in [(-64,384),(0,256),(0,128),(-2032,4064),(2016,16),(-2032,16),(0,16),(0,32),(0,64),(0,512),(0,1024),(0,2032)]: + initial=[[x,minimum+(x*97+z*13)%height,z,choices[(x+z)%len(choices)]] for x in range(16) for z in range(16)] + ops=[["prime",63],["dump"]] + for x in range(16): + for z in range(16):ops.append(["query",x,z]) + for x,y,z,_ in initial:ops.extend([["set",x,y,z,air,63],["query",x,z]]) + ops.extend([["prime",63],["dump"]]) + yield fixture(minimum,height,initial,ops,height==16) + # Re-priming empty columns retains old values; invalid lengths take that path. + for height in [16,32,128,256,384,1024,2032]: + bits=height.bit_length();words=(256+(64//bits)-1)//(64//bits) + for fill in ["0","ffffffffffffffff","a55a00ff55ff00aa"]: + ops=[] + for t in range(6):ops.append(["raw",t,[fill]*words]) + ops.extend([["prime",0],["dump"],["prime",63],["dump"]]) + for t in range(6):ops.extend([["raw",t,[]],["raw",t,["0"]*(words+1)]]) + for x,z in [(0,0),(15,15),(16,0),(-1,1),(0,16),(-1,0),(2**31-1,2**31-1)]:ops.append(["query",x,z]) + ops.extend([["update",0,2**31-1,0,stone,0],["update",0,-2**31,0,air,0],["dump"]]) + yield fixture(0,height,[[2,height-1,3,stone]],ops,height==16 and fill=="a55a00ff55ff00aa") + # Mutation and raw edits interleave; repeated columns force downward rescans. + for scenario in range(64): + minimum,height=rng.choice([(-64,384),(0,16),(-16,32),(0,128)]) + initial=[] + for i in range(64):initial.append([rng.randrange(16),minimum+rng.randrange(height),rng.randrange(16),rng.choice(choices)]) + ops=[["prime",63]] + for i in range(192): + x,z=rng.choice([(0,0),(15,15),(3,9)]) + y=minimum+rng.choice([0,height-1,rng.randrange(height)]) + state=rng.choice(choices) if i%3 else rng.randrange(len(states)) + ops.extend([["set",x,y,z,state,63],["query",x,z]]) + if i%47==0:ops.extend([["prime",rng.randrange(64)],["dump"]]) + ops.extend([["prime",63],["dump"]]) + yield fixture(minimum,height,initial,ops,scenario<2) + # All-air sections collapse cave/void air to AIR when read through ProtoChunk. + for other in [air,stone]: + initial=[[2,7,3,defaults["minecraft:cave_air"]],[3,7,3,defaults["minecraft:void_air"]],[15,0,15,other]] + yield fixture(0,16,initial,[["prime",63],["query",2,3],["query",3,3],["dump"]],True) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__) + parser.add_argument("--prepare",action="store_true") + args=parser.parse_args() + build=lab.LOCAL/"rust-heightmap-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + tags=worldgen.tag_resources(jars["server"]) + if not tags or tags!=worldgen.tag_resources(jars["client"]):raise ValueError("client/server block tags differ or are empty") + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaHeightmapOracle.java" + sources=[oracle,Path(__file__),lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock", + lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/heightmap_fixture.rs"] + tested_sources=base.source_hashes(sources) + classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") + def java(side,mode,path): + run(["java","-Xmx1G","-cp",os.pathsep.join([str(classes),str(jars[side]),dependency_path]),"dev.horizonlab.parity.VanillaHeightmapOracle",mode,path],side+"-"+mode) + for side in jars:java(side,"export",build/f"facts-{side}.json") + facts=json.loads((build/"facts-server.json").read_text()) + if facts!=json.loads((build/"facts-client.json").read_text()):raise ValueError("client/server state facts differ") + if len(facts["states"])!=35723:raise ValueError("incomplete pinned state table") + fixtures=list(corpus(facts));inputs=build/"inputs.txt" + inputs.write_text("".join(json.dumps(value,separators=(",",":"))+"\n" for value in fixtures),encoding="utf-8") + (build/"tags.json").write_text(json.dumps(tags,separators=(",",":")),encoding="utf-8") + fixture_paths=[inputs,build/"tags.json",build/"facts-client.json",build/"facts-server.json"] + tested_fixtures=base.source_hashes(fixture_paths) + run(["cargo","build","--release","-p","horizon-world","--example","heightmap_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("heightmap_fixture.exe" if os.name=="nt" else "heightmap_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + java(side,side,build) + reference=build/f"{side}.txt";matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} heightmap output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "block_states":len(facts["states"]),"block_tag_files":len(tags),"fixtures":len(fixtures),"operation_counts":dict(Counter(op[0] for fixture in fixtures for op in fixture["ops"])), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Six heightmap types, client/persistence flags and predicates for every pinned block state. Air/fluid facts are imported independently from both authenticated JARs and required to agree; block-tag membership is resolved in Rust from bundled resources. State behavioral methods are not ported by that import. Actual vanilla ProtoChunk and Heightmap APIs compare insertion/removal, downward rescans, repeated priming, empty-column retention, raw packed words including padding/unused slots, invalid-length fallback, wrapped column indexing, height queries, errors and selected exact block-read traces. Positive aligned vertical ranges are bounded to the NoiseSettings codec domain; arbitrary height accessors, chunk lifecycle integration, complete terrain/gameplay and rendering remain pending."} + lab.write_json(report_path,report);print(f"Scoped heightmap parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_interaction_shape_parity.py b/tools/test_interaction_shape_parity.py new file mode 100644 index 000000000..7a229606c --- /dev/null +++ b/tools/test_interaction_shape_parity.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +"""Compare registered interaction shapes and ray-face overrides with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(info): + def bits(v):return struct.pack('>d',float(v)).hex() + shapes=[[],[[0,0,0,1,1,1]],[[.5,0,0,1,1,1]],[[0,.5,0,1,1,1]],[[0,0,0,.25,1,1],[.75,0,0,1,1,1]]] + rays=[([-1,.5,.5],[2,.5,.5]),([-.5,-.25,.5],[1.5,1.75,.5]),([.5,.5,.5],[2,2,2]),([.5,2,.5],[.5,-1,.5])] + def row(state,index,p=(0,0,0),shape=None): + a,b=rays[index%len(rays)];return dict(state=state,position=p,shape=[[bits(v) for v in b] for b in (shape if shape is not None else shapes[1+index%4])],**{'from':[bits(v+p[i]) for i,v in enumerate(a)],'to':[bits(v+p[i]) for i,v in enumerate(b)]}) + for state in range(info['states']): + for i in range(4):yield row(state,i,p=(0,0,0) if i%2==0 else (17,-64,-33)) + rng=random.Random(0x494e544552414354) + for _ in range(10000):yield row(rng.randrange(info['states']),rng.randrange(4),p=rng.choice([(0,0,0),(17,-64,-33),(30000000,-64,-30000000)]),shape=rng.choice(shapes)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-interaction-shape-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInteractionShapeOracle.java' + helper=oracle.with_name('VanillaCollisionOracle.java') + sources=[oracle,helper,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/interaction_shape_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,helper],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaInteractionShapeOracle',mode,path],side+'-'+mode) + java('server','export',build);info=json.loads((build/'info.json').read_text());fixtures=list(corpus(info));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'info.json',build/'block-registry.nbt',build/'interaction-shapes.nbt'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','interaction_shape_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('interaction_shape_fixture.exe' if os.name=='nt' else 'interaction_shape_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} interaction-shape output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Complete registered interaction shape table with audited native implementation owners: default empty, cauldron, composter, hopper and scaffolding. Compares every state geometry, canonical/alias identity and actual BlockGetter.clipWithInteractionOverride with supplied collision shapes at multiple positions. World queries are rejected during native interaction-shape lookup. Imports reject wrong table kind, incomplete mapping, missing canonical identities, foreign state ordering and invalid state IDs. Outline/visual shape binding, complete ray-world binding and gameplay remain separate work.'} + lab.write_json(report_path,report);print(f'Scoped interaction shape parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_inventory_pickup_parity.py b/tools/test_inventory_pickup_parity.py new file mode 100644 index 000000000..0975a77c3 --- /dev/null +++ b/tools/test_inventory_pickup_parity.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python3 +"""Compare native InventoryPickup transfers, shared stack identity and change callbacks.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + edges=[-2147483648,-1,0,1,2,64,2147483647] + def op(kind,**kw): + v=dict(kind=kind,inventory=0,other=1,a=0,b=3,slot=-1,amount=1,all=False,equipment=0,key=0,value=64,max=99,infinite=False,fail_at=0,mutate_at=0,mutate_ref=0,after_count=2,after_max=8,mutate_slot=1,replace_ref=2,after_selected=-1);v.update(kw);return v + def stack(item,count,patch=None):return dict(item=item,count=count,pop=7,patch=patch or []) + def row(ops,count=5,slots=None,damaged=False):return dict(prototypes=[[],[[0,64]],[[0,1],[1,0],[2,100]]],stacks=[stack(2 if damaged else 1,count,[[1,3]] if damaged else []),stack(1,60),stack(2,1),stack(-1,0)],equipment_order=list(range(7)),shared_equipment=False,inventories=[dict(selected=0,changed=2147483647,mainhand=0,slots=slots if slots is not None else [[0,1],[35,2],[40,1]]),dict(selected=8,changed=0,mainhand=-1,slots=[[2,1],[39,0]])],ops=ops) + for damaged in [False,True]: + for slot in [-2,-1,0,8,35,36,40,42,43,2147483647]: + for count in edges: + for infinite in [False,True]: + # Unknown positive slots discard newly created copies on + # every iteration; bound counts to avoid billions of steps. + if slot>=43 and count>3:continue + yield row([op('space'),op('add',slot=slot,infinite=infinite),op('space')],count=count,damaged=damaged) + for damaged in [False,True]: + for slots in [[],[[0,0]],[[i,1] for i in range(43)],[[0,1],[40,1]],[[i,2] for i in range(43)]]: + for fail in range(5): + for mutate in range(4): + for after in [-1,0,4]: + yield row([op('add',fail_at=fail,mutate_at=mutate,after_selected=after)],slots=slots,damaged=damaged) + for limit in edges: + for count in edges: + for size in [0,1,64,2147483647]: + v=row([op('space',max=limit),op('add',max=limit)],count=count) + v['prototypes'][1]=[[0,size]] + yield v + rng=random.Random(0x5049434b5550) + for _ in range(1000): + damaged=bool(rng.randrange(2)) + v=row([],count=rng.choice(edges),slots=[[i,rng.randrange(4)] for i in rng.sample(range(43),rng.randrange(44))],damaged=damaged) + v['shared_equipment']=bool(rng.randrange(2)) + # Restrict insertion to actual slots; counts can cover the entire int. + for __ in range(10): + kind=rng.choice(['add','add','space','set','select','clear','count','alias','copy','remove']) + v['ops'].append(op(kind,inventory=rng.randrange(2),a=rng.randrange(4),b=rng.randrange(4),slot=rng.choice([-2,-1,0,8,35,36,40,42]),amount=rng.choice(edges),max=rng.choice(edges+[99]),infinite=bool(rng.randrange(2)),fail_at=rng.randrange(5),mutate_at=rng.randrange(4),mutate_ref=rng.randrange(4),after_count=rng.choice(edges),after_max=rng.choice(edges),mutate_slot=rng.choice([-1,0,8,40]),replace_ref=rng.randrange(4),after_selected=rng.choice([-1,0,8]))) + yield v + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-inventory-pickup-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryPickupOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/inventory_pickup_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaInventoryPickupOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','inventory_pickup_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('inventory_pickup_fixture.exe' if os.name=='nt' else 'inventory_pickup_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} inventory pickup output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Inventory.add and getSlotWithRemainingSpace over stored ItemStack and shared equipment. Traces cover selected/offhand/ordinary slot search, component-sensitive stacking, damaged copy-and-clear, source aliases, pop time, creative fallback and virtual size/material callbacks with mutations/failures. Native crash-report wrapping is represented as an error without rendering its diagnostic text. Item entity pickup events, networking, menus, arbitrary method overrides, full item components and complete gameplay integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped inventory pickup parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_inventory_tick_parity.py b/tools/test_inventory_tick_parity.py new file mode 100644 index 000000000..b8c817cf9 --- /dev/null +++ b/tools/test_inventory_tick_parity.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python3 +"""Compare native InventoryTick transfers, shared stack identity and change callbacks.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + edges=[-2147483648,-1,0,1,2,5,2147483647] + def row(mode='both',**kw): + v=dict(mode=mode,stacks=[dict(item=1,count=2,pop=5),dict(item=2,count=1,pop=2),dict(item=1,count=1,pop=0),dict(item=-1,count=0,pop=0)],slots=[[0,0],[1,0],[8,1],[35,2]],equipment=[[0,0],[1,1],[7,2]],selected=0,level=1,argument=0,argument_level=1,slot=-1,fail_at=0,mutate_at=0,mutate_ref=0,after_count=1,pop_ref=1,after_pop=5,replace_slot=8,replace_ref=2,equipment_slot=7,equipment_ref=0,after_selected=8,after_level=1);v.update(kw);return v + for mode in ['inventory','equipment','both','stack']: + for item in [-1,0,1,2]: + for count in edges: + for pop in edges: + for level in [0,1]: + v=row(mode,level=level,argument_level=level) + v['stacks'][0]=dict(item=item,count=count,pop=pop) + yield v + for mode in ['inventory','equipment','both','stack']: + for fail in range(1,9): + for mutate in range(1,9): + for count in [-1,0,2]:yield row(mode,fail_at=fail,mutate_at=mutate,after_count=count) + # Inserts into an unpopulated EnumMap entry after iteration has begun. + for initial in range(8): + for inserted in range(8): + for mutate in [1,2]:yield row('equipment',equipment=[[initial,0]],equipment_slot=inserted,mutate_at=mutate) + rng=random.Random(0x494e565449434b) + for _ in range(2000): + v=row(rng.choice(['inventory','equipment','both','stack']),stacks=[dict(item=rng.randrange(-1,3),count=rng.choice(edges),pop=rng.choice(edges)) for __ in range(4)],slots=[[i,rng.randrange(4)] for i in rng.sample(range(43),rng.randrange(44))],equipment=[[i,rng.randrange(4)] for i in rng.sample(range(8),rng.randrange(9))],selected=rng.randrange(9),level=rng.randrange(2),argument=rng.randrange(4),argument_level=rng.randrange(2),slot=rng.randrange(-1,8),fail_at=rng.randrange(10),mutate_at=rng.randrange(10),mutate_ref=rng.randrange(4),after_count=rng.choice(edges),pop_ref=rng.randrange(4),after_pop=rng.choice(edges),replace_slot=rng.randrange(-1,43),replace_ref=rng.randrange(4),equipment_slot=rng.randrange(-1,8),equipment_ref=rng.randrange(4),after_selected=rng.randrange(9),after_level=rng.randrange(2)) + yield v + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-inventory-tick-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryTickOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/inventory_tick_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaInventoryTickOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','inventory_tick_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('inventory_tick_fixture.exe' if os.name=='nt' else 'inventory_tick_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} inventory tick output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Inventory.tick, EntityEquipment.tick and ItemStack.inventoryTick composed over shared stacks. Custom item handlers trace server dispatch; level/item callbacks mutate counts, pop time, selection and future slot/enum-map entries or fail. Client JAR uses an actual allocated ClientLevel for the non-server branch; dedicated server uses null because ClientLevel is absent. Concrete registered item tick effects, arbitrary getItem overrides, whole entity/world ticks and complete gameplay integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped inventory tick parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_inventory_use_parity.py b/tools/test_inventory_use_parity.py new file mode 100644 index 000000000..8b08f37db --- /dev/null +++ b/tools/test_inventory_use_parity.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 +"""Compare native living item-use tick, release, completion and stop lifecycle.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + modes=['tick','update','complete','release','stop'] + ints=[-2147483648,-1,0,1,2,20,2147483647] + def state(**kw): + s=dict(item=0,remaining=1,virtual_remaining=1,kinetic=True,selected=0,counts=[1,1,0],slots=[[0,0],[8,1],[40,1]],level=0,clients=[False,True],releases=[False,True],finishes=[1,0]);s.update(kw);return s + def row(mode='tick',**kw): + f=dict(mode=mode,argument=0,flags=1,shared_type=False,vibrations=[True,True],initial=state(),after=state(item=1,remaining=0,virtual_remaining=-1,counts=[0,2,0],selected=8,slots=[[0,1],[8,0],[40,0]],level=1),fail=-1,mutate_at=-1);f.update(kw);return f + for mode in modes: + for flags in range(256): + for selected in [0,1,8]:yield row(mode,flags=flags,initial=state(selected=selected)) + for item in range(3): + for count in ints: + for remaining in ints: + yield row(mode,argument=item,initial=state(item=item,counts=[count,count,count],remaining=remaining,virtual_remaining=remaining)) + for mutate in range(-1,12): + for fail in range(-1,12):yield row(mode,mutate_at=mutate,fail=fail) + rng=random.Random(0x494e56555345) + def random_state():return state(item=rng.randrange(3),remaining=rng.choice(ints),virtual_remaining=rng.choice(ints),kinetic=bool(rng.randrange(2)),selected=rng.randrange(9),counts=[rng.choice(ints) for _ in range(3)],slots=[[i,rng.randrange(3)] for i in rng.sample(range(43),rng.randrange(12))],level=rng.randrange(2),clients=[bool(rng.randrange(2)),bool(rng.randrange(2))],releases=[bool(rng.randrange(2)),bool(rng.randrange(2))],finishes=[rng.randrange(3),rng.randrange(3)]) + for _ in range(5500):yield row(rng.choice(modes),argument=rng.randrange(3),flags=rng.randrange(256),shared_type=bool(rng.randrange(2)),vibrations=[bool(rng.randrange(2)),bool(rng.randrange(2))],initial=random_state(),after=random_state(),fail=rng.choice([-1,-1,*range(12)]),mutate_at=rng.randrange(-1,12)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-inventory-use-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryUseOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/inventory_use_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaInventoryUseOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','inventory_use_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('inventory_use_fixture.exe' if os.name=='nt' else 'inventory_use_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} inventory use output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual inherited LivingEntity use tick/update/completion/release/stop composed with real Player Inventory, PlayerEquipment hand access and byte SynchedEntityData flags. Traces compare held/active reference identity, live count mutations, selected/offhand writes, onEquipItem callbacks, synchronized value/dirty prefixes, finish vibration and kinetic-map presence. Custom item/level effects remain controlled; starting use, complete onEquipItem effects, consumables, kinetic combat, remainders/cooldowns and complete gameplay integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped inventory use parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_inventory_use_start_parity.py b/tools/test_inventory_use_start_parity.py new file mode 100644 index 000000000..736c22e95 --- /dev/null +++ b/tools/test_inventory_use_start_parity.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 +"""Compare native living item-use tick, release, completion and stop lifecycle.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + ints=[-2147483648,-1,0,1,2,20,2147483647] + def state(**kw): + s=dict(item=0,remaining=1,virtual_remaining=1,kinetic=True,selected=0,counts=[1,1,0],slots=[[0,0],[8,1],[40,1]],level=0,clients=[False,True],releases=[False,True],finishes=[1,0],durations=[32,72000]);s.update(kw);return s + def row(**kw): + f=dict(mode='start',argument=0,start_hand=0,kinetic_items=[True,True],flags=0,shared_type=False,vibrations=[True,True],initial=state(),after=state(item=1,remaining=0,virtual_remaining=-1,counts=[0,2,0],selected=8,slots=[[0,1],[8,0],[40,0]],level=1,durations=[-1,2147483647]),fail=-1,mutate_at=-1,mask=1,value=True,values=[0,1,3,2]);f.update(kw);return f + for flags in range(256): + for hand in [0,1]: + for selected in [0,1,8]:yield row(flags=flags,start_hand=hand,initial=state(selected=selected)) + for hand in [0,1]: + for held in range(3): + for count in ints: + for duration in ints: + for client in [False,True]:yield row(start_hand=hand,initial=state(counts=[count,count,count],slots=[[0,held],[40,held]],durations=[duration,duration],clients=[client,client])) + for mutate in range(-1,20): + for fail in range(-1,20):yield row(start_hand=hand,mutate_at=mutate,fail=fail) + rng=random.Random(0x494e565553455354) + def random_state():return state(item=rng.randrange(3),remaining=rng.choice(ints),virtual_remaining=rng.choice(ints),kinetic=bool(rng.randrange(2)),selected=rng.randrange(9),counts=[rng.choice(ints) for _ in range(3)],slots=[[i,rng.randrange(3)] for i in rng.sample(range(43),rng.randrange(12))],level=rng.randrange(2),clients=[bool(rng.randrange(2)),bool(rng.randrange(2))],releases=[bool(rng.randrange(2)),bool(rng.randrange(2))],finishes=[rng.randrange(3),rng.randrange(3)],durations=[rng.choice(ints),rng.choice(ints)]) + for _ in range(6500):yield row(start_hand=rng.randrange(2),flags=rng.randrange(256),shared_type=bool(rng.randrange(2)),vibrations=[bool(rng.randrange(2)),bool(rng.randrange(2))],kinetic_items=[bool(rng.randrange(2)),bool(rng.randrange(2))],initial=random_state(),after=random_state(),fail=rng.choice([-1,-1,*range(20)]),mutate_at=rng.randrange(-1,20)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-inventory-use-start-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaInventoryUseStartOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/inventory_use_start_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaInventoryUseStartOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','inventory_use_start_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('inventory_use_start_fixture.exe' if os.name=='nt' else 'inventory_use_start_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} inventory use start output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual LivingEntity.startUsingItem composed with real Inventory/PlayerEquipment, synchronized flag storage and inherited observer reactions. Native ClientboundSetEquipmentPacket construction reaches a controlled ServerChunkCache sender; item/level/ID callbacks expose captured arguments and mutation/failure prefixes. Includes start vibration and clearing a populated kinetic-enemy map. Rust binds the existing start algorithm to inventory use services and shared stack references. Packet encoding/delivery, complete enemy-map/kinetic combat, full item/equip effects and complete gameplay integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped inventory use start parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_item_after_use_parity.py b/tools/test_item_after_use_parity.py new file mode 100644 index 000000000..8c298de7e --- /dev/null +++ b/tools/test_item_after_use_parity.py @@ -0,0 +1,70 @@ +#!/usr/bin/env python3 +"""Compare native item after-uses and strict scalar stack validation.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + edges=[-2147483648,-1,0,1,2,64,2147483647] + def item(count=2,remainder=1,maximum=None,damage=False,cooldown=0x3f800000,group=0):return dict(count=count,remainder=remainder,maximum=maximum,damage=damage,cooldown=cooldown,group=group) + def config(items=None,**kw): + v=dict(items=items or [item(),item(1,None,cooldown=None)],finish=0,infinite=False,prototype_max=64,clock=0,extra_count=2,original_count=3);v.update(kw);return v + def row(initial=None,after=None,**kw): + v=dict(initial=initial or config(),after=after or config([item(1,None,cooldown=None),item(2,None,cooldown=0x40000000,group=1)]),source=0,player=True,fail=-1,mutate=-1);v.update(kw);return v + for count in edges: + for finish in range(3): + for infinite in [False,True]: + for player in [False,True]: + for mutate in [-1,0,1,2,3,4,5]: + for fail in [-1,0,1,2,3,4,5]: + yield row(config([item(count),item(1,None,cooldown=None)],finish=finish,infinite=infinite),source=0,player=player,mutate=mutate,fail=fail) + rng=random.Random(0x4146544552555345) + def random_item():return item(rng.choice(edges),rng.choice([None,-1,1,2,64,2147483647]),rng.choice([None,*edges]),bool(rng.randrange(2)),rng.choice([None,0,0x80000000,0x3d4ccccd,0x7f800000,0xff800000,0x7fc00000,rng.randrange(0x100000000)]),rng.randrange(-1,4)) + def random_config():return config([random_item(),random_item()],finish=rng.randrange(3),infinite=bool(rng.randrange(2)),prototype_max=rng.choice(edges),clock=rng.choice(edges),extra_count=rng.choice(edges),original_count=rng.choice(edges)) + for _ in range(2400):yield row(random_config(),random_config(),source=rng.randrange(3),player=bool(rng.randrange(2)),mutate=rng.randrange(-1,7),fail=rng.randrange(-1,7)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-item-after-use-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemAfterUseOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/item_after_use_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaItemAfterUseOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','item_after_use_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('item_after_use_fixture.exe' if os.name=='nt' else 'item_after_use_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} item after-use output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual ItemStack.finishUsingItem composes a controlled item handler with real before-use copying, UseRemainder conversion, ItemStackTemplate validation and UseCooldown/ItemCooldowns. Captured component/count values and shared references are compared through finite-material, extra-item, cooldown-manager, add and start callbacks with mutations/failures. Includes ordinary registered result items, empty visibility, current template prototypes and copied original stacks reaching cooldown grouping. Rust composes its stack, template, remainder and cooldown modules. Item handlers and actor extra-item delivery are controlled; contained schemas, concrete consumable behavior, full inventory-use integration and complete gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped item after-use parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_item_blocking_parity.py b/tools/test_item_blocking_parity.py new file mode 100644 index 000000000..7b82875b8 --- /dev/null +++ b/tools/test_item_blocking_parity.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +"""Compare actual living item-blocking dispatch with native components.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def single(v):return struct.pack('>f',v).hex() + def double(v):return struct.pack('>d',v).hex() + def vec(v):return [double(x) for x in v] + def reduction(angle=90,base=0,factor=1,set=0):return dict(angle=single(angle),base=single(base),factor=single(factor),set=set) + def component(present=True,bypass=0,reductions=None,threshold=3,base=1,factor=1):return dict(present=present,bypass=bypass,reductions=reductions if reductions is not None else [reduction()],item_damage=dict(threshold=single(threshold),base=single(base),factor=single(factor))) + def state(**kw): + s=dict(item=0,direct=1,source=vec([0,0,1]),position=vec([0,0,0]),yaw=single(0),pierce=0,projectile=False,type=0,level=0,hand=0,client=False);s.update(kw);return s + def row(damage=8,initial=None,after=None,components=None,**kw): + f=dict(damage=single(damage),initial=initial or state(),after=after or state(),components=components or [component(),component(reductions=[reduction(angle=180,factor=.5,set=2)])],player=False,fail=-1,mutate_at=-1);f.update(kw);return f + values=[-float('inf'),-1e30,-1,-0.,0.,1e-40,.1,1,5,20,1e30,float('inf'),float('nan')] + for damage in values: + for direct in range(4): + for pierce in [-128,-1,0,1,127]: + for player in [False,True]: + for bypass in range(5):yield row(damage,initial=state(direct=direct,pierce=pierce),components=[component(bypass=bypass),component()],player=player) + for fail in range(-1,26): + for mutate in range(-1,26): + for player in [False,True]:yield row(initial=state(direct=2,pierce=0),after=state(item=1,direct=1,source=None,position=vec([.5,0,0]),yaw=single(45),type=1,level=1,hand=1,client=True),components=[component(bypass=2,reductions=[reduction(set=1),reduction(angle=180,factor=.5)]),component()],player=player,fail=fail,mutate_at=mutate) + rng=random.Random(0x4954454d424c4f43) + def random_state():return state(item=rng.randrange(-1,2),direct=rng.randrange(4),source=None if rng.randrange(4)==0 else vec([rng.choice(values) for _ in range(3)]),position=vec([rng.choice(values) for _ in range(3)]),yaw=single(rng.choice(values+[45,90,180,360])),pierce=rng.randrange(-128,128),projectile=bool(rng.randrange(2)),type=rng.randrange(2),level=rng.randrange(2),hand=rng.randrange(2),client=bool(rng.randrange(2))) + for _ in range(8000):yield row(rng.choice(values),initial=random_state(),after=random_state(),components=[component(present=rng.randrange(4)!=0,bypass=rng.randrange(5),reductions=[reduction(angle=rng.choice(values+[45,90,180,360]),base=rng.choice(values),factor=rng.choice(values),set=rng.randrange(5)) for _ in range(rng.randrange(6))],threshold=rng.choice(values),base=rng.choice(values),factor=rng.choice(values)) for _ in range(2)],player=bool(rng.randrange(2)),fail=rng.choice([-1,-1,*range(26)]),mutate_at=rng.randrange(-1,26)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-item-blocking-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemBlockingOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/item_blocking_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaItemBlockingOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','item_blocking_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('item_blocking_fixture.exe' if os.name=='nt' else 'item_blocking_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} item blocking output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual LivingEntity.applyItemBlocking on base and ServerPlayer receivers, using native BlocksAttacks reductions/holder sets and actual stat/durability dispatch on undamageable stacks. Tests bypass/piercing, source direction, component/item capture across mutations, client/stat guards, repeated direct-entity lookup, melee response and callback failures. Actual damageable-item mutation, blocking-item eligibility/timing, component codecs and full combat/world integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped item blocking parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_item_cooldowns_parity.py b/tools/test_item_cooldowns_parity.py new file mode 100644 index 000000000..2509b1a54 --- /dev/null +++ b/tools/test_item_cooldowns_parity.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python3 +"""Compare native item cooldownss and strict scalar stack validation.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + edges=[-2147483648,-2147483647,-1,0,1,2,20,2147483646,2147483647] + floats=[0,0x80000000,1,0x3d4ccccc,0x3d4ccccd,0x3f000000,0x3f800000,0xbf800000,0x4b7fffff,0x4b800000,0x4effffff,0x7f800000,0xff800000,0x7fc00000,0x7fa12345] + groups=['test:'+''.join('an' if i&(1<f',v).hex() + def op(kind,value):return dict(kind=kind,value=value) + names=[r['name'] for r in catalog['items']] + for name in names: + for count in [-1,0,1,2,64]: + yield dict(name=name,count=count,ops=[op('set-damage',1),op('count',1),op('consume',bits(.75)),op('blocking',bits(.25)),op('kinetic',True),op('consume',None),op('blocking',None),op('kinetic',False),op('instrument',bits(1.25)),op('unbreakable',True),op('count',0),op('count',2)]) + floats=[-float('inf'),-1e30,-1,-.025,-0.,0.,1e-40,.025,.5,1,1.6,1e30,float('inf'),float('nan')] + representatives=['minecraft:'+n for n in ['stone','apple','shield','wooden_spear','bow','crossbow','trident','bundle','brush','spyglass','ender_eye','goat_horn','air']] + for name in representatives: + for value in floats: + for count in [0,1,2]:yield dict(name=name,count=count,ops=[op('consume',bits(value)),op('instrument',bits(value)),op('max-stack',2),op('max-damage',3),op('damage',0),op('damage',3),op('max-damage',None),op('max-stack',None)]) + rng=random.Random(0x4954454d434154) + edges=[-2147483648,-2147483647,-1,0,1,2,20,2147483646,2147483647] + def integer():return rng.choice(edges) if rng.randrange(2) else rng.randrange(-2147483648,2147483648) + def random_op(): + kind=rng.choice(['count','set-damage','damage','max-damage','max-stack','unbreakable','consume','blocking','kinetic','instrument']) + if kind in ['consume','blocking','instrument']:value=rng.choice([None,bits(rng.choice(floats)),f'{rng.getrandbits(32):08x}']) + elif kind in ['unbreakable','kinetic']:value=bool(rng.randrange(2)) + elif kind in ['count','set-damage']:value=integer() + else:value=rng.choice([None,integer()]) + return op(kind,value) + for _ in range(10000):yield dict(name=rng.choice(representatives if rng.randrange(2) else names),count=rng.choice([-1,0,1,2,64]),ops=[random_op() for _ in range(rng.randrange(1,25))]) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-item-use-catalog-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseCatalogOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/item_use_catalog_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaItemUseCatalogOracle',mode,path],side+'-'+mode) + exports=[] + for side in jars: + folder=build/(side+'-export');folder.mkdir(exist_ok=True);java(side,'export',folder);exports.append(json.loads((folder/'catalog.json').read_text())) + if exports[0]!=exports[1]:raise RuntimeError('native item catalogs differ') + catalog_path=build/'catalog.json';lab.write_json(catalog_path,exports[0]);fixtures=list(corpus(exports[0]));inputs=build/'inputs.txt' ;inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs,catalog_path];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','item_use_catalog_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('item_use_catalog_fixture.exe' if os.name=='nt' else 'item_use_catalog_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} item use catalog output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'registered_items':len(exports[0]['items']),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'All 1658 built-in item identities with bound native default component maps. Parsed exports from both JARs agree; Rust imports the component projection for stack size, durability and item-use duration/release behavior. Native ItemStack queries cover every default plus component/count mutations, empty/air behavior, registered method overrides, consumable truncation versus instrument flooring, integer and float boundaries. Other item components, arbitrary component codecs, full inventory/equipment, enchantment effects and gameplay integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped item use catalog parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_item_use_lifecycle_parity.py b/tools/test_item_use_lifecycle_parity.py new file mode 100644 index 000000000..adbfe20fd --- /dev/null +++ b/tools/test_item_use_lifecycle_parity.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +"""Compare native living item-use tick, release, completion and stop lifecycle.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + modes=['tick','update','complete','release','stop'] + ints=[-2147483648,-1,0,1,2,20,2147483647] + def state(**kw): + s=dict(item=0,remaining=1,virtual_remaining=1,kinetic=True,using=True,hand=0,hands=[0,1],level=0,clients=[False,True],releases=[False,True],finishes=[1,0]);s.update(kw);return s + def row(mode='tick',**kw): + f=dict(mode=mode,argument=0,shared_type=False,vibrations=[True,True],initial=state(),after=state(item=1,remaining=0,virtual_remaining=-1,hand=1,hands=[1,0],level=1),fail=-1,mutate_at=-1);f.update(kw);return f + for mode in modes: + for item in range(3): + for hand_item in range(3): + for remaining in ints: + for using in [False,True]: + for client in [False,True]: + for shared in [False,True]: + yield row(mode,argument=item,shared_type=shared,initial=state(item=item,hands=[hand_item,hand_item],remaining=remaining,virtual_remaining=remaining,using=using,clients=[client,client])) + for mutate in range(-1,25): + for fail in range(-1,25): + yield row(mode,mutate_at=mutate,fail=fail) + rng=random.Random(0x5553454c494645) + def random_state():return state(item=rng.randrange(3),remaining=rng.choice(ints),virtual_remaining=rng.choice(ints),kinetic=bool(rng.randrange(2)),using=bool(rng.randrange(2)),hand=rng.randrange(2),hands=[rng.randrange(3),rng.randrange(3)],level=rng.randrange(2),clients=[bool(rng.randrange(2)),bool(rng.randrange(2))],releases=[bool(rng.randrange(2)),bool(rng.randrange(2))],finishes=[rng.randrange(3),rng.randrange(3)]) + for _ in range(14000):yield row(rng.choice(modes),argument=rng.randrange(3),shared_type=bool(rng.randrange(2)),vibrations=[bool(rng.randrange(2)),bool(rng.randrange(2))],initial=random_state(),after=random_state(),fail=rng.choice([-1,-1,*range(25)]),mutate_at=rng.randrange(-1,25)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-item-use-lifecycle-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseLifecycleOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/item_use_lifecycle_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaItemUseLifecycleOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','item_use_lifecycle_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('item_use_lifecycle_fixture.exe' if os.name=='nt' else 'item_use_lifecycle_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} item use lifecycle output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual LivingEntity private using-item tick, updateUsingItem, completeUsingItem, releaseUsingItem and stopUsingItem. Real ItemStack/UseEffects components call controlled custom item handlers; virtual level/hand queries and using flag updates are observed. Rust lifecycle now uses production reference-counted StackRef values with native identity equality. Covers captured stack/level references, same-type versus stack-identity checks, callback mutations/failures, empty stacks, wrapping countdowns, returned item placement, finish vibration and kinetic-enemy-map presence. Starting use, actual synchronized flags, consumables/kinetic item effects, use remainders/cooldowns, full inventory/equipment and game tick integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped item use lifecycle parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_item_use_parity.py b/tools/test_item_use_parity.py new file mode 100644 index 000000000..d5d5e1e20 --- /dev/null +++ b/tools/test_item_use_parity.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python3 +"""Compare native living item-use timers and blocking-item eligibility.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v): return struct.pack('>f', v).hex() + modes = ['blocking', 'is-blocking', 'ticks', 'partial'] + ints = [-2147483648, -2147483647, -1, 0, 1, 4, 5, 6, 20, 72000, 2147483646, 2147483647] + floats = [-float('inf'), -1e30, -1, -.025, -0., 0., 1e-40, .025, .25, 1, 1e30, float('inf'), float('nan')] + def state(item=0, remaining=71995, virtual_remaining=71995, durations=None, using=True): + return dict(item=item, remaining=remaining, virtual_remaining=virtual_remaining, durations=durations or [72000, 20], using=using) + def row(mode='blocking', **kw): + f = dict(mode=mode, partial=bits(.5), shared_type=False, components=[dict(present=True, delay=bits(.25)), dict(present=True, delay=bits(1))], initial=state(), after=state(item=1, remaining=0, virtual_remaining=-1, durations=[20, 5]), fail=-1, mutate_at=-1) + f.update(kw) + return f + for mode in modes: + for duration in ints: + for remaining in ints: + for item in range(3): + yield row(mode, initial=state(item=item, remaining=remaining, virtual_remaining=remaining, durations=[duration, duration])) + for delay in floats + [i / 40 for i in range(-100, 101)]: + for elapsed in [-1, 0, 1, 4, 5, 6, 19, 20, 21]: + yield row(mode, components=[dict(present=True, delay=bits(delay)), dict(present=False, delay=bits(0))], initial=state(remaining=72000-elapsed, virtual_remaining=72000-elapsed), partial=bits(delay)) + for mutate in range(-1, 5): + for fail in range(-1, 5): + for item in range(3): + for using in [False, True]: + yield row(mode, mutate_at=mutate, fail=fail, after=state(item=item, using=using)) + rng = random.Random(0x4954454d555345) + def number(): return rng.choice(ints) if rng.randrange(2) else rng.randrange(-2147483648, 2147483648) + def random_state(): return state(rng.randrange(3), number(), number(), [number(), number()], bool(rng.randrange(2))) + def floating(): return bits(rng.choice(floats)) if rng.randrange(2) else f'{rng.getrandbits(32):08x}' + for _ in range(12000): + yield row(rng.choice(modes), partial=floating(), shared_type=bool(rng.randrange(2)), components=[dict(present=bool(rng.randrange(2)), delay=floating()) for _ in range(2)], initial=random_state(), after=random_state(), fail=rng.choice([-1, -1, *range(5)]), mutate_at=rng.randrange(-1, 5)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-item-use-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/item_use_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaItemUseOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','item_use_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('item_use_fixture.exe' if os.name=='nt' else 'item_use_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} item use output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual LivingEntity blocking-item eligibility, isBlocking and both use-timer overloads. Controlled item types supply virtual duration queries; actual use-item/remaining fields and BlocksAttacks components provide captured and reread state. Covers wrapping tick arithmetic, delay boundaries, absent components, empty stacks, shared item types, partial-tick float bits, callback mutations and failures. Item-use lifecycle, durability, codecs and complete combat/world integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped item use parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_item_use_start_parity.py b/tools/test_item_use_start_parity.py new file mode 100644 index 000000000..abc7f9aa8 --- /dev/null +++ b/tools/test_item_use_start_parity.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +"""Compare native startUsingItem equipment, timer and flag ordering.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + ints=[-2147483648,-1,0,1,2,20,72000,2147483647] + def state(**kw): + s=dict(item=2,remaining=3,virtual_remaining=1,kinetic=True,using=False,off=False,hand=0,hands=[0,1],level=0,clients=[False,True],releases=[False,True],finishes=[1,0],durations=[72000,20]);s.update(kw);return s + def row(**kw): + f=dict(start_hand=0,shared_type=False,vibrations=[True,True],kinetic_items=[True,False],initial=state(),after=state(item=1,remaining=0,off=True,using=False,hand=1,hands=[1,0],level=1,clients=[False,False],durations=[5,9]),fail=-1,mutate_at=-1);f.update(kw);return f + for item in range(3): + for held in range(3): + for hand in range(2): + for duration in ints: + for using in [False,True]: + for client in [False,True]: + for shared in [False,True]: + yield row(start_hand=hand,shared_type=shared,initial=state(item=item,hands=[held,held],durations=[duration,duration],using=using,clients=[client,client])) + for mutate in range(-1,16): + for fail in range(-1,16): + for item in range(3): + for kinetic in [False,True]:yield row(mutate_at=mutate,fail=fail,after=state(item=item,kinetic=kinetic,durations=[9,5])) + rng=random.Random(0x5553455354415254) + def random_state():return state(item=rng.randrange(3),remaining=rng.choice(ints),virtual_remaining=rng.choice(ints),kinetic=bool(rng.randrange(2)),using=bool(rng.randrange(2)),off=bool(rng.randrange(2)),hand=rng.randrange(2),hands=[rng.randrange(3),rng.randrange(3)],level=rng.randrange(2),clients=[bool(rng.randrange(2)),bool(rng.randrange(2))],durations=[rng.choice(ints),rng.choice(ints)]) + for _ in range(12000):yield row(start_hand=rng.randrange(2),shared_type=bool(rng.randrange(2)),vibrations=[bool(rng.randrange(2)),bool(rng.randrange(2))],kinetic_items=[bool(rng.randrange(2)),bool(rng.randrange(2))],initial=random_state(),after=random_state(),fail=rng.choice([-1,-1,*range(16)]),mutate_at=rng.randrange(-1,16)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-item-use-start-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaItemUseStartOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/item_use_start_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaItemUseStartOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','item_use_start_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('item_use_start_fixture.exe' if os.name=='nt' else 'item_use_start_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} item use start output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual inherited LivingEntity startUsingItem, native private equipment synchronization and ClientboundSetEquipmentPacket construction, item duration dispatch, using/offhand flag ordering, native UseEffects vibration and KineticWeapon presence. Covers captured held-stack/level/hand arguments, callback mutations/failures, empty stacks, client/server queries and recent-kinetic-map reset. Flag writes and delivery services are controlled; synchronized-data storage, wire encoding, kinetic combat, full inventory/equipment and game tick integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped item use start parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_java_hash_map_parity.py b/tools/test_java_hash_map_parity.py new file mode 100644 index 000000000..1fb8e680a --- /dev/null +++ b/tools/test_java_hash_map_parity.py @@ -0,0 +1,89 @@ +#!/usr/bin/env python3 +"""Compare native Java HashMaps and strict scalar stack validation.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng=random.Random(0x4a415641484d4150) + def op(kind,k=0,v=0):return [kind,k,v] + def hashes(mode,n): + spread=[0,1,-1,64,128,192,256,512,1024,-2147483648,2147483647] + def unspread(h): + h&=0xffffffff;h^=h>>16;return h if h<0x80000000 else h-0x100000000 + if mode==0:return [0]*n + if mode==1:return list(range(n)) + if mode==2:return [unspread((i%8)*64) for i in range(n)] + if mode==3:return [unspread(rng.choice(spread)) for _ in range(n)] + return [rng.randrange(-2147483648,2147483648) for _ in range(n)] + for mode in range(5): + for n in [1,7,8,9,10,11,12,13,24,25,48,49,64,97,128]: + for order in range(6): + h=hashes(mode,n);ids=list(range(n)) + if order==1:ids.reverse() + elif order>1:rng.shuffle(ids) + ops=[op('put',i,i) for i in ids]+[op('cursor')] + for i in range(n): + ops.append(op('next')) + if i%2==0:ops.append(op('delete')) + ops.extend([op('force-next'),op('delete')]) + for i in reversed(ids):ops.extend([op('get',i),op('remove',i),op('put',i,-i)]) + rng.shuffle(ids) + ops.extend(op('remove',i) for i in ids) + ops.extend([op('cursor'),op('clear'),op('next'),op('force-next'),op('delete')]) + yield dict(hashes=h,ops=ops) + kinds=['put','put','remove','get','cursor','next','force-next','delete','clear'] + for _ in range(550): + n=rng.choice([16,32,64,128]);h=hashes(rng.randrange(5),n);ids=list(range(n));rng.shuffle(ids) + ops=[op('put',i,i) for i in ids] + for __ in range(300): + k=rng.choice(kinds) + if k=='clear' and rng.randrange(20):k='remove' + ops.append(op(k,rng.randrange(n),rng.randrange(-2147483648,2147483648))) + yield dict(hashes=h,ops=ops) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-java-hash-map-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaJavaHashMapOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/java_hash_map_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaJavaHashMapOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','java_hash_map_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('java_hash_map_fixture.exe' if os.name=='nt' else 'java_hash_map_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} Java HashMap output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'JDK 25 java.util.HashMap default-constructor storage used by vanilla ItemCooldowns, with non-null Comparable keys whose ordering agrees with equality. Direct put/get/remove/clear, linked bucket iteration, collision tree creation/insertion/deletion/splitting, iterator removal and concurrent modification prefixes are compared. Both pinned game classpaths use the same installed JDK implementation; this is a JDK collection comparison, not a gameplay parity test. Null/non-comparable keys, alternate constructors and other Map methods are outside this storage API. Concrete cooldowns, packets and gameplay integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped Java HashMap parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_java_identity_map_parity.py b/tools/test_java_identity_map_parity.py new file mode 100644 index 000000000..1df2e725e --- /dev/null +++ b/tools/test_java_identity_map_parity.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python3 +"""Compare JDK map copies and non-comparable keys with captured identity hashes.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng=random.Random(0x4944454e54495459) + def op(kind,k=0,v=0):return [kind,k,v] + def keys(mode,n): + keys=[] + for i in range(n): + hash=0 if mode==0 else (i%4)*64 if mode==1 else i*31 if mode==2 else rng.randrange(-2**31,2**31) + keys.append(dict(id=i,kind=rng.randrange(4),hash=hash)) + for i in range(n//4):keys.append(dict(keys[i])) + return keys + for mode in range(4): + for n in [1,2,3,7,8,9,10,11,12,13,24,25,48,49,64,97,128]: + for order in range(4): + ks=keys(mode,n);ids=list(range(n)) + if order==1:ids.reverse() + elif order>1:rng.shuffle(ids) + ops=[op('put',i,i) for i in ids]+[op('save'),op('copy'),op('cursor')] + for i in range(n): + ops.append(op('next')) + if i%2==0:ops.append(op('delete')) + for i in range(n,len(ks)):ops.extend([op('get',i),op('put',i,-i)]) + ops.extend([op('swap'),op('copy'),op('clear'),op('copy'),op('swap')]) + rng.shuffle(ids) + ops.extend(op('remove',i) for i in ids) + yield dict(keys=ks,ops=ops) + for _ in range(600): + n=rng.choice([16,32,64,128]);ks=keys(rng.randrange(4),n);ids=list(range(n));rng.shuffle(ids) + ops=[op('put',i,i) for i in ids] + for _ in range(200): + k=rng.choice(['put','put','remove','get','copy','save','swap','cursor','next','force-next','delete','clear']) + if k=='clear' and rng.randrange(20):k='remove' + ops.append(op(k,rng.randrange(len(ks)),rng.randrange(-2**31,2**31))) + yield dict(keys=ks,ops=ops) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-java-identity-map-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaJavaIdentityMapOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/java_identity_map_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaJavaIdentityMapOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','java_identity_map_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('java_identity_map_fixture.exe' if os.name=='nt' else 'java_identity_map_fixture') + references=[] + for side,jar in jars.items(): + java(side,side,build) + enriched=build/f'inputs-{side}.txt';enriched_hash=base.source_hashes([enriched]) + run([binary,build,side],'rust-'+side) + reference=build/f'{side}.txt';rust_output=build/f'rust-{side}.txt';matched=base.compare(reference,rust_output) + base.ensure_sources_unchanged([enriched],enriched_hash) + tested_fixtures.update(enriched_hash);fixture_paths.append(enriched) + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'rust_output_sha256':lab.digest(rust_output,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} map copy/identity output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'references':references,'scope':'Actual JDK 25 HashMap with map-copy construction, non-comparable classes, consistently ordered comparable classes and unequal comparable keys that compare as zero. Captures System.identityHashCode in each Java process and supplies those hashes to Rust for the same scenario, then compares linked iteration, copy sizing/reordering, equal-key replacement, tree/list transitions and cursor invalidation. Both game classpath runs use the same installed JDK; this is a collection comparison, not a gameplay or cross-process identity-hash equivalence claim. Key operations are pure and null keys remain outside the API.'} + lab.write_json(report_path,report);print(f'Scoped Java HashMap parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_level_place_parity.py b/tools/test_level_place_parity.py new file mode 100644 index 000000000..53b51007b --- /dev/null +++ b/tools/test_level_place_parity.py @@ -0,0 +1,115 @@ +#!/usr/bin/env python3 +"""Compare horizon-world's placement port (BlockItem placement state) with pinned vanilla. + +Generates random neighbourhoods and use-item-on-block actions for random block +items, resolves the placed position and state with the native oracle +(VanillaPlacementOracle) and with Behaviours (level_place_fixture), and reports +differing cases grouped by item. +""" +import argparse +import json +import os +import random +import subprocess +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + +# Items whose placement reads block-entity data or entities. +SKIP = {'minecraft:lectern', 'minecraft:test_block', 'minecraft:moving_piston'} + + +def generate(resources, count, seed): + facts = json.loads((resources / 'facts.json').read_text()) + behaviours = json.loads((resources / 'block-behaviours.json').read_text()) + by_block = {} + for index, state in enumerate(facts['states']): + by_block.setdefault(state[0], []).append(index) + items = sorted(name for name, item in behaviours['items'].items() if name not in SKIP and item['fields'].get('block') in by_block) + names = list(by_block) + common = [by_block[name][0] for name in ['minecraft:stone', 'minecraft:dirt', 'minecraft:grass_block', 'minecraft:water', + 'minecraft:oak_planks', 'minecraft:glass', 'minecraft:sand', 'minecraft:oak_log']] + rng = random.Random(seed) + cases = [] + for _ in range(count): + item = rng.choice(items) + block = behaviours['items'][item]['fields']['block'] + related = by_block[block] + cells = [] + for x in range(-2, 3): + for y in range(-2, 3): + for z in range(-2, 3): + roll = rng.random() + if (x, y, z) == (0, 0, 0): + roll = rng.random() * 1.2 + if roll < 0.35: + continue + if roll < 0.6: + cells.append([x, y, z, rng.choice(common)]) + elif roll < 0.8: + cells.append([x, y, z, rng.choice(related)]) + else: + cells.append([x, y, z, rng.choice(by_block[rng.choice(names)])]) + face = rng.randrange(6) + normal = [(0, -1, 0), (0, 1, 0), (0, 0, -1), (0, 0, 1), (-1, 0, 0), (1, 0, 0)][face] + hit = [] + for axis in range(3): + if normal[axis] < 0: + hit.append(0.0) + elif normal[axis] > 0: + hit.append(1.0) + else: + hit.append(rng.choice([0.5, rng.random()])) + cases.append({'seed': rng.randrange(1 << 40), 'item': item, 'pos': [0, 0, 0], 'face': face, 'hit': hit, + 'yaw': rng.randrange(-180 * 64, 180 * 64) / 64, 'pitch': rng.randrange(-90 * 64, 90 * 64) / 64, + 'sneak': rng.random() < 0.2, 'cells': cells}) + return cases + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--count', type=int, default=20000) + parser.add_argument('--seed', type=int, default=1) + args = parser.parse_args() + lock, jars, libraries = base.verify_artifacts() + resources = lab.LOCAL / 'horizon-client' / lock['minecraft']['version'] + work = lab.LOCAL / 'level-place-parity' + work.mkdir(parents=True, exist_ok=True) + cases = generate(resources, args.count, args.seed) + (work / 'cases.jsonl').write_text(''.join(json.dumps(case) + '\n' for case in cases)) + classes = work / 'classes' + classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, [jars['server'], *libraries])) + parity = lab.ROOT / 'mods/horizon/src/test/java/dev/horizonlab/parity' + sources = [parity / 'VanillaPlacementOracle.java', parity / 'VanillaHeightmapOracle.java', parity / 'VanillaLevelShapeOracle.java'] + subprocess.run(['javac', '--release', str(lock['minecraft']['java_major']), '-proc:none', '-nowarn', '-cp', dependencies, + '-d', str(classes), *map(str, sources)], check=True) + subprocess.run(['java', '-Xmx2G', '-cp', str(classes) + os.pathsep + dependencies, + 'dev.horizonlab.parity.VanillaPlacementOracle', str(resources), str(work / 'cases.jsonl'), + str(work / 'native.txt')], check=True) + subprocess.run(['cargo', 'run', '-q', '-j2', '--release', '-p', 'horizon-world', '--example', 'level_place_fixture', '--', + str(resources), str(work / 'cases.jsonl'), str(work / 'rust.txt')], check=True, cwd=lab.ROOT) + native = (work / 'native.txt').read_text().splitlines() + rust = (work / 'rust.txt').read_text().splitlines() + differences = {} + for case, a, b in zip(cases, native, rust): + if a != b: + differences.setdefault(case['item'], []).append((case, a, b)) + total = sum(len(v) for v in differences.values()) + facts = json.loads((resources / 'facts.json').read_text())['states'] + def describe(line): + parts = line.split() + return line if len(parts) < 3 or not parts[2].isdigit() else f'{parts[1]} {facts[int(parts[2])][3]}' + for item, entries in sorted(differences.items(), key=lambda entry: -len(entry[1])): + case, a, b = entries[0] + print(f'{item}: {len(entries)} differing; e.g. face={case["face"]} yaw={case["yaw"]} pitch={case["pitch"]} sneak={case["sneak"]}' + f'\n native {describe(a)}\n rust {describe(b)}') + print(f'{len(cases) - total}/{len(cases)} cases match') + (work / 'differences.json').write_text(json.dumps({k: [[c, a, b] for c, a, b in v[:5]] for k, v in differences.items()})) + raise SystemExit(1 if total else 0) + + +if __name__ == '__main__': + main() diff --git a/tools/test_level_shape_parity.py b/tools/test_level_shape_parity.py new file mode 100644 index 000000000..2817d4681 --- /dev/null +++ b/tools/test_level_shape_parity.py @@ -0,0 +1,101 @@ +#!/usr/bin/env python3 +"""Compare horizon-world's level updateShape/canSurvive port with pinned vanilla. + +Generates random 5x5x5 neighbourhoods around a random block state, evaluates +BlockState.updateShape towards one neighbour and canSurvive with the native +oracle (VanillaLevelShapeOracle) and with Behaviours (level_shape_fixture), +and reports every differing case. +""" +import argparse +import json +import os +import random +import subprocess +from pathlib import Path +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + +# Blocks whose updateShape needs a full level (portal frames) are skipped. +SKIP = {'minecraft:nether_portal', 'minecraft:moving_piston'} + + +def generate(resources, count, seed): + facts = json.loads((resources / 'facts.json').read_text()) + states = facts['states'] + by_block = {} + for index, state in enumerate(states): + by_block.setdefault(state[0], []).append(index) + names = [name for name in by_block if name not in SKIP] + common = [by_block[name][0] for name in ['minecraft:stone', 'minecraft:dirt', 'minecraft:grass_block', 'minecraft:water', + 'minecraft:oak_planks', 'minecraft:glass', 'minecraft:sand', 'minecraft:farmland']] + rng = random.Random(seed) + cases = [] + for _ in range(count): + block = rng.choice(names) + center = rng.choice(by_block[block]) + related = by_block[block] + cells = [] + for x in range(-2, 3): + for y in range(-2, 3): + for z in range(-2, 3): + if (x, y, z) == (0, 0, 0): + cells.append([0, 0, 0, center]) + continue + roll = rng.random() + if roll < 0.35: + continue + if roll < 0.55: + cells.append([x, y, z, rng.choice(common)]) + elif roll < 0.75: + cells.append([x, y, z, rng.choice(related)]) + else: + other = rng.choice(names) + cells.append([x, y, z, rng.choice(by_block[other])]) + cases.append({'seed': rng.randrange(1 << 40), 'light': rng.randrange(16), 'pos': [0, 0, 0], + 'dir': rng.randrange(6), 'cells': cells, 'block': block}) + return cases + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--count', type=int, default=20000) + parser.add_argument('--seed', type=int, default=1) + args = parser.parse_args() + lock, jars, libraries = base.verify_artifacts() + resources = lab.LOCAL / 'horizon-client' / lock['minecraft']['version'] + work = lab.LOCAL / 'level-shape-parity' + work.mkdir(parents=True, exist_ok=True) + cases = generate(resources, args.count, args.seed) + (work / 'cases.jsonl').write_text(''.join(json.dumps(case) + '\n' for case in cases)) + classes = work / 'classes' + classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, [jars['server'], *libraries])) + parity = lab.ROOT / 'mods/horizon/src/test/java/dev/horizonlab/parity' + sources = [parity / 'VanillaLevelShapeOracle.java', parity / 'VanillaHeightmapOracle.java'] + subprocess.run(['javac', '--release', str(lock['minecraft']['java_major']), '-proc:none', '-cp', dependencies, + '-d', str(classes), *map(str, sources)], check=True) + subprocess.run(['java', '-Xmx2G', '-cp', str(classes) + os.pathsep + dependencies, + 'dev.horizonlab.parity.VanillaLevelShapeOracle', str(resources), str(work / 'cases.jsonl'), + str(work / 'native.txt')], check=True) + subprocess.run(['cargo', 'run', '-q', '-j2', '--release', '-p', 'horizon-world', '--example', 'level_shape_fixture', '--', + str(resources), str(work / 'cases.jsonl'), str(work / 'rust.txt')], check=True, cwd=lab.ROOT) + native = (work / 'native.txt').read_text().splitlines() + rust = (work / 'rust.txt').read_text().splitlines() + differences = {} + for case, a, b in zip(cases, native, rust): + if a != b: + differences.setdefault(case['block'], []).append((case, a, b)) + total = sum(len(v) for v in differences.values()) + for block, items in sorted(differences.items(), key=lambda item: -len(item[1])): + case, a, b = items[0] + print(f'{block}: {len(items)} differing; e.g. dir={case["dir"]}\n native {a}\n rust {b}') + print(f'{len(cases) - total}/{len(cases)} cases match') + (work / 'differences.json').write_text(json.dumps({k: [[c, a, b] for c, a, b in v[:5]] for k, v in differences.items()})) + raise SystemExit(1 if total else 0) + + +if __name__ == '__main__': + main() diff --git a/tools/test_liquid_collision_parity.py b/tools/test_liquid_collision_parity.py new file mode 100644 index 000000000..f832c39ac --- /dev/null +++ b/tools/test_liquid_collision_parity.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python3 +"""Compare contextual liquid collision selection with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + import math + def bits(value):return struct.pack('>d',value).hex() + epsilon=struct.unpack('>f',struct.pack('>f',1e-5))[0] + modes=['empty','position','player','marker','factory_player','factory_marker','placement','placement_null','with_player','with_marker','with_null'] + def row(mode,y,lava,level,block_y,above,shape,stand,fail,always=False): + return {'mode':mode,'y':bits(y),'other':bits(y),'descending':True,'always':always,'item':0,'count':0,'stand':stand,'fail':False,'liquid':[level,lava,block_y,above,shape,fail]} + # Every liquid block level and context, including the always-fluid bypass. + for lava in [False,True]: + for level in range(16): + for mode in modes: + for always in [False,True]: + for block_y in [-2147483648,0,2147483647]: + for shape in range(4): + for fail in [-1,0,1,2]: + yield row(mode,block_y+2.0,lava,level,block_y,0,shape,True,fail,always) + # Exact top boundaries and all source/flowing fluid states above the block. + for lava in [False,True]: + for mode in ['player','placement','with_player']: + for block_y in [-64,0,2147483647]: + for shape,top in enumerate([-math.inf,1.0,0.5,1.5]): + threshold=(block_y+top)-epsilon + heights=[math.nextafter(threshold,-math.inf),threshold,math.nextafter(threshold,math.inf),math.inf,math.nan] + for y in heights: + for above in range(-1,32): + for stand in [False,True]: + yield row(mode,y,lava,0,block_y,above,shape,stand,-1) + # Inject failures after height checks on an allowed candidate. + for mode in ['player','placement','with_player']: + for lava in [False,True]: + for above in range(-1,32): + for fail in [0,1,2,3]: + yield row(mode,4.0,lava,0,0,above,1,True,fail) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-liquid-collision-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java' + helpers=[oracle.with_name('VanillaFaceSupportOracle.java')] + runner=lab.ROOT/'tools/test_collision_context_parity.py' + sources=[oracle,*helpers,runner,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/collision_context_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,*helpers],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaCollisionContextOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','collision_context_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('collision_context_fixture.exe' if os.name=='nt' else 'collision_context_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} liquid-collision output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'block_states':32,'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Native contextual LiquidBlock collision dispatch for all 32 water/lava states. Checks the always-fluid bypass, source-only selection, living-entity gating, supplied entity standing shapes, exact height boundaries, all 33 above-block fluid states, callback order and failure propagation, null/placement contexts and wrapping above-block coordinates. Full selected shape data and callback traces are compared. Entity-specific standing shape implementations, liquid simulation and live movement remain pending.'} + lab.write_json(report_path,report);print(f'Scoped liquid collision parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_live_attribute_updates_parity.py b/tools/test_live_attribute_updates_parity.py new file mode 100644 index 000000000..166dbd166 --- /dev/null +++ b/tools/test_live_attribute_updates_parity.py @@ -0,0 +1,194 @@ +#!/usr/bin/env python3 +"""Compare live registered attributes with native entity notifications and update consequences.""" +import argparse +import json +import math +import os +from pathlib import Path +import platform +import random +import struct +import subprocess + +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(catalog): + def bits(value): + return struct.pack('>d', float(value)).hex() + + def fl(value): + return int.from_bytes(struct.pack('>f', float(value)), 'big') + + def op(mode, attribute=0, **kw): + result = dict(mode=mode, target=0, attribute=attribute, id='horizon:a', + amount=bits(.25), base=bits(7), operation=0, value=fl(100), + amplifier=0, fail=-1, mutate=-1, changes={}, actions=[], + reapply=True, count=1, flag=False) + result.update(kw) + return result + + def row(setup, ops, entity='minecraft:player', **kw): + result = dict(entity=entity, health=[fl(100), fl(200)], absorption=fl(100), setup=setup, ops=ops) + result.update(kw) + return result + + attrs = catalog['attributes'] + count = len(attrs) + ids = [next(i for i, a in enumerate(attrs) if a['id'] == 'minecraft:' + name) + for name in ['max_health', 'max_absorption', 'scale', 'waypoint_transmit_range', 'attack_damage']] + values = [-math.inf, -1e30, -1, -0., 0., 1e-40, .1, 1, 2, 20, 1e30, math.inf, math.nan] + rng = random.Random(0x4c495645555044) + for entity in catalog['entities']: + for reverse in [False, True]: + order = list(range(count)) + if reverse: + order.reverse() + ops = [op(mode, i) for i in [-1, *order] for mode in ['value', 'base']] + for target in range(2): + ops.extend(op('ensure', i, target=target) for i in order) + ops += [op('refresh'), op('pack'), op('pack', target=1), op('controls', changes={'selection': 1}), op('refresh')] + for i in order: + ops.append(op('define', i, operation=i % 3, amount=bits(-2))) + ops += [op('dirty'), op('notify-add', amplifier=1), op('refresh'), op('notify-update', amplifier=2), + op('notify-remove'), op('notify-remove', count=0), op('controls', changes={'client': True}), + op('dirty'), op('notify-add'), op('notify-update'), op('notify-remove'), + op('controls', changes={'client': False, 'server': False}), op('attribute-update', ids[3])] + yield row([], ops, entity) + + setup = [op('set', key, target=target, base=bits(10 if target == 0 else 30)) + for target in range(2) for key in ids] + setup += [op('define', key, amount=bits(-3)) for key in ids] + for key in ids[:4]: + for value in values: + for operation in range(3): + ops = [op('set', key, base=bits(value)), op('attribute-update', key), op('pack'), + op('define', key, amount=bits(value), operation=operation), op('notify-add'), + op('refresh'), op('set-health', value=fl(value)), op('set-absorption', value=fl(value)), + op('notify-update', amplifier=255), op('notify-remove'), op('pack'), op('refresh')] + yield row(setup, ops, health=[fl(value), fl(-value)], absorption=fl(value)) + + changes = {'selection': 1, 'direct': 1, 'data': 1, 'manager': 1, 'absorption': fl(50)} + actions = [[], [op('set', ids[0], base=bits(2)), op('set', ids[0], target=1, base=bits(3))], + [op('set', ids[1], base=bits(2)), op('set', ids[1], target=1, base=bits(3))], + [op('clear-updates')], [op('null-update')], [op('clear-updates', target=1)], + [op('set', ids[3], target=1, base=bits(0))], [op('clear-sync')]] + # Inject failures and routing/limit changes at successive callback positions + # so captures and writes preceding an exception remain visible in state. + for key in ids[:4]: + for mode in ['attribute-update', 'refresh', 'set-health', 'set-absorption', 'notify-add', 'notify-update', 'notify-remove']: + for at in range(-1, 32): + yield row(setup, [op(mode, key, fail=at), op('pack'), op('refresh')]) + for action in actions: + yield row(setup, [op(mode, key, mutate=at, changes=changes, actions=action), op('pack'), op('refresh')]) + large_setup = [op('ensure', key, target=target) for target in range(2) for key in range(count)] + large_setup += [op('define', key, amount=bits(-3)) for key in range(count)] + for mode in ['refresh', 'notify-update', 'notify-remove']: + for at in range(64): + yield row(large_setup, [op(mode, fail=at), op('pack'), op('refresh')]) + yield row(large_setup, [op(mode, mutate=at, changes=changes, actions=actions[at % len(actions)]), op('pack'), op('refresh')]) + for amp in [-2**31, -1, 0, 1, 255, 256, 2**31-1]: + for reapply in [False, True]: + for n in [0, 1, 3]: + yield row(setup, [op('notify-add', amplifier=amp), op('notify-update', amplifier=amp, reapply=reapply), + op('notify-remove', count=n), op('refresh'), op('pack')]) + for _ in range(200): + ops = [] + for _ in range(40): + ops.append(op(rng.choice(['set', 'update', 'permanent', 'remove', 'reset', 'value', 'base', + 'refresh', 'attribute-update', 'define', 'notify-add', 'notify-update', + 'notify-remove', 'effect-add', 'effect-remove', 'pack', 'set-health', + 'set-absorption', 'heal', 'clear-updates', 'clear-sync']), + rng.choice([-1, *ids]), target=rng.randrange(2), operation=rng.randrange(3), + amount=bits(rng.choice(values)), base=bits(rng.choice(values)), value=fl(rng.choice(values)), + amplifier=rng.choice([-2**31, -1, 0, 1, 255, 256, 2**31-1]), count=rng.randrange(3), + reapply=bool(rng.randrange(2)), fail=rng.choice([-1, -1, -1, 0, 1, 2]), + mutate=rng.choice([-1, -1, 0, 1, 2]), changes=changes, actions=rng.choice(actions))) + yield row(setup, ops) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--prepare', action='store_true') + args = parser.parse_args() + build = lab.LOCAL / 'rust-live-attribute-updates-parity' + build.mkdir(parents=True, exist_ok=True) + report_path = build / 'report.json' + report_path.unlink(missing_ok=True) + if args.prepare: + lab.prepare() + lock, jars, libraries = base.verify_artifacts() + oracle = lab.ROOT / 'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLiveAttributeUpdatesOracle.java' + helper = oracle.with_name('VanillaEntityAttributeOracle.java') + live_helper = oracle.with_name('VanillaLiveAttributesOracle.java') + sources = [oracle, helper, live_helper, Path(__file__), + lab.ROOT / 'tools/test_rust_parity.py', lab.ROOT / 'tools/lab.py', + lab.ROOT / 'Cargo.toml', lab.ROOT / 'Cargo.lock', + lab.ROOT / 'crates/horizon-core/Cargo.toml', lab.ROOT / 'crates/horizon-world/Cargo.toml', + *sorted((lab.ROOT / 'crates/horizon-core/src').rglob('*.rs')), + *sorted((lab.ROOT / 'crates/horizon-world/src').rglob('*.rs')), + lab.ROOT / 'crates/horizon-world/examples/live_attribute_updates_fixture.rs', + lab.ROOT / 'crates/horizon-world/examples/live_attributes_fixture.rs'] + tested_sources = base.source_hashes(sources) + classes = build / 'classes' + classes.mkdir(exist_ok=True) + + def run(command, name): + with (build / (name + '.log')).open('w', encoding='utf-8') as log: + base.run(list(map(str, command)), stdout=log, stderr=subprocess.STDOUT) + + dependency_path = os.pathsep.join(map(str, libraries)) + run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-cp', + str(jars['server']) + os.pathsep + dependency_path, '-d', classes, oracle, helper, live_helper], 'compile-java') + + def java(side, mode): + run(['java', '-Xmx512M', '-cp', os.pathsep.join([str(classes), str(jars[side]), dependency_path]), + 'dev.horizonlab.parity.VanillaLiveAttributeUpdatesOracle', mode, build], mode) + + for side in jars: + java(side, 'export-' + side) + catalog = json.loads((build / 'catalog-server.json').read_text()) + if catalog != json.loads((build / 'catalog-client.json').read_text()): + raise AssertionError('Client/server attribute catalogs differ') + lab.write_json(build / 'catalog.json', catalog) + fixtures = list(corpus(catalog)) + inputs = build / 'inputs.txt' + inputs.write_text(''.join(json.dumps(row, separators=(',', ':')) + '\n' for row in fixtures), encoding='utf-8') + fixture_paths = [inputs, build / 'catalog.json', build / 'catalog-client.json', build / 'catalog-server.json'] + tested_fixtures = base.source_hashes(fixture_paths) + run(['cargo', 'build', '--release', '-p', 'horizon-world', '--example', 'live_attribute_updates_fixture'], 'compile-rust') + metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) + binary = Path(metadata['target_directory']) / 'release/examples' / ('live_attribute_updates_fixture.exe' if os.name == 'nt' else 'live_attribute_updates_fixture') + references = [] + for side, jar in jars.items(): + java(side, side) + enriched = build / f'inputs-{side}.txt' + fixture_paths.append(enriched) + tested_fixtures.update(base.source_hashes([enriched])) + run([binary, build, side], 'rust-' + side) + reference = build / f'{side}.txt' + candidate = build / f'rust-{side}.txt' + matched = base.compare(reference, candidate) + references.append(dict(side=side, jar_sha256=lab.digest(jar, 'sha256'), + output_sha256=lab.digest(reference, 'sha256'), matched_output_lines=matched, + rust_output_sha256=lab.digest(candidate, 'sha256'))) + print(f'{side}: {matched:,} live attribute update output lines match Rust', flush=True) + base.ensure_sources_unchanged(sources, tested_sources) + base.ensure_sources_unchanged(fixture_paths, tested_fixtures) + report = dict(schema=1, minecraft=lock['minecraft']['version'], manifest_sha1=lock['minecraft']['manifest_sha1'], + platform=platform.platform(), java=subprocess.check_output(['java', '--version'], text=True).splitlines()[0], + rustc=subprocess.check_output(['rustc', '--version'], text=True).strip(), fixtures=len(fixtures), + attributes=len(catalog['attributes']), entity_suppliers=len(catalog['entities']), + fastutil_sha256={str(p.relative_to(lab.ROOT)): lab.digest(p, 'sha256') for p in libraries if 'fastutil' in str(p)}, + sources_sha256=tested_sources, fixtures_sha256=tested_fixtures, references=references, + scope='Native LivingEntity attribute queries, notification and private refresh methods with registered AttributeMaps, real effect modifiers and pending queues, onAttributeUpdated health/absorption consequences and SynchedEntityData Float storage. Exercises all registered attributes/default suppliers, separate captured/selected maps and health stores, callbacks changing limits and routes, null pending members, client guards, failure prefixes and modifier/cache/queue identity. Replays JVM holder/instance hashes per reference. Scale dimension rebuild and waypoint-manager internals remain controlled; passenger lists are empty. Full effect lifecycle/dirty-particle synchronization, player absorption, complete gameplay and playable platform builds remain pending.') + lab.write_json(report_path, report) + print(f'Scoped live attribute update parity passed: {report_path}') + + +if __name__ == '__main__': + main() diff --git a/tools/test_live_attributes_parity.py b/tools/test_live_attributes_parity.py new file mode 100644 index 000000000..686632cb6 --- /dev/null +++ b/tools/test_live_attributes_parity.py @@ -0,0 +1,166 @@ +#!/usr/bin/env python3 +"""Compare registered live attribute maps, queues and effect modifiers with vanilla.""" +import argparse +import json +import math +import os +from pathlib import Path +import platform +import random +import struct +import subprocess + +try: + from . import lab, test_rust_parity as base, test_entity_attribute_parity as entity_base +except ImportError: + import lab + import test_rust_parity as base + import test_entity_attribute_parity as entity_base + + +def corpus(catalog): + yield from entity_base.corpus(catalog) + + def bits(value): + return struct.pack('>d', float(value)).hex() + + def op(mode, attribute=0, **kwargs): + result = dict(mode=mode, attribute=attribute, id='horizon:a', amount=bits(.125), + operation=0, base=bits(7), amplifier=0) + result.update(kwargs) + return result + + count = len(catalog['attributes']) + rng = random.Random(0x4c49564541545452) + values = [-math.inf, -1e30, -1, -0., 0., 1e-40, .1, 1, 2, 20, 1e16, math.inf, math.nan] + amplifiers = [-2**31, -1, 0, 1, 255, 2**31-1] + for entity in catalog['entities']: + for reverse in [False, True]: + order = list(range(count)) + if reverse: + order.reverse() + ops = [op(mode, -1) for mode in ['has', 'has_modifier', 'value', 'base', 'modifier', 'reset', 'ensure', 'set']] + for i in order: + ops.extend(op(mode, i) for mode in ['has', 'value', 'base', 'reset']) + # The effect loop creates instances in its own native map order. + for i in [*order, -1]: + ops.append(op('define', i, operation=i % 3, amount=bits(values[i % len(values)]))) + for amplifier in amplifiers: + ops.extend([op('clear_updates'), op('clear_sync'), op('effect-add', amplifier=amplifier)]) + for i in order: + ops.extend(op(mode, i) for mode in ['value', 'modifier', 'has_modifier']) + ops.extend([op('effect-remove'), op('effect-remove')]) + for i in order: + ops.extend(op(mode, i) for mode in ['ack_update', 'set', 'ack_sync', 'reset', 'value']) + ops.extend([op('clear_updates'), op('clear_sync')]) + yield dict(entity=entity, ops=ops) + + for index, attribute in enumerate(catalog['attributes']): + entity = next(name for name, defaults in catalog['entities'].items() if attribute['id'] in defaults) + edges = values.copy() + for field in ['min', 'max', 'default']: + if field in attribute: + value = struct.unpack('>d', bytes.fromhex(attribute[field]))[0] + edges.extend([math.nextafter(value, -math.inf), value, math.nextafter(value, math.inf)]) + for value in edges: + ops = [op('set', index, base=bits(value)), op('base', index), op('value', index)] + for operation in range(3): + ops.extend([op('define', index, operation=operation, amount=bits(value)), + op('effect-add', amplifier=255), op('value', index), + op('effect-remove'), op('value', index)]) + ops.extend([op('reset', index), op('value', index)]) + yield dict(entity=entity, ops=ops) + + for _ in range(200): + entity = rng.choice(list(catalog['entities'])) + ops = [] + for _ in range(100): + ops.append(op(rng.choice(['define', 'effect-add', 'effect-remove', 'ensure', 'set', 'add', + 'permanent', 'update', 'remove', 'clear', 'value', 'base', 'modifier', + 'has_modifier', 'reset', 'ack_update', 'ack_sync', 'clear_updates', 'clear_sync']), + rng.randrange(-1, count), operation=rng.randrange(3), + id=rng.choice(['horizon:a', 'horizon:b', 'horizon:c']), + amount=bits(rng.choice(values)), base=bits(rng.choice(values)), + amplifier=rng.choice(amplifiers))) + yield dict(entity=entity, ops=ops) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--prepare', action='store_true') + args = parser.parse_args() + build = lab.LOCAL / 'rust-live-attributes-parity' + build.mkdir(parents=True, exist_ok=True) + report_path = build / 'report.json' + report_path.unlink(missing_ok=True) + if args.prepare: + lab.prepare() + lock, jars, libraries = base.verify_artifacts() + oracle = lab.ROOT / 'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLiveAttributesOracle.java' + helper = oracle.with_name('VanillaEntityAttributeOracle.java') + sources = [oracle, helper, Path(__file__), lab.ROOT / 'tools/test_entity_attribute_parity.py', + lab.ROOT / 'tools/test_rust_parity.py', lab.ROOT / 'tools/lab.py', + lab.ROOT / 'Cargo.toml', lab.ROOT / 'Cargo.lock', + lab.ROOT / 'crates/horizon-core/Cargo.toml', lab.ROOT / 'crates/horizon-world/Cargo.toml', + *sorted((lab.ROOT / 'crates/horizon-core/src').rglob('*.rs')), + *sorted((lab.ROOT / 'crates/horizon-world/src').rglob('*.rs')), + lab.ROOT / 'crates/horizon-world/examples/live_attributes_fixture.rs'] + tested_sources = base.source_hashes(sources) + classes = build / 'classes' + classes.mkdir(exist_ok=True) + + def run(command, name): + with (build / (name + '.log')).open('w', encoding='utf-8') as log: + base.run(list(map(str, command)), stdout=log, stderr=subprocess.STDOUT) + + dependency_path = os.pathsep.join(map(str, libraries)) + run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-cp', + str(jars['server']) + os.pathsep + dependency_path, '-d', classes, oracle, helper], 'compile-java') + + def java(side, mode): + run(['java', '-Xmx512M', '-cp', os.pathsep.join([str(classes), str(jars[side]), dependency_path]), + 'dev.horizonlab.parity.VanillaLiveAttributesOracle', mode, build], mode) + + for side in jars: + java(side, 'export-' + side) + catalog = json.loads((build / 'catalog-server.json').read_text()) + if catalog != json.loads((build / 'catalog-client.json').read_text()): + raise AssertionError('Client/server attribute catalogs differ') + lab.write_json(build / 'catalog.json', catalog) + fixtures = list(corpus(catalog)) + inputs = build / 'inputs.txt' + inputs.write_text(''.join(json.dumps(row, separators=(',', ':')) + '\n' for row in fixtures), encoding='utf-8') + fixture_paths = [inputs, build / 'catalog.json', build / 'catalog-client.json', build / 'catalog-server.json'] + tested_fixtures = base.source_hashes(fixture_paths) + run(['cargo', 'build', '--release', '-p', 'horizon-world', '--example', 'live_attributes_fixture'], 'compile-rust') + metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--no-deps', '--format-version', '1'], cwd=lab.ROOT, text=True)) + binary = Path(metadata['target_directory']) / 'release/examples' / ('live_attributes_fixture.exe' if os.name == 'nt' else 'live_attributes_fixture') + references = [] + for side, jar in jars.items(): + java(side, side) + enriched = build / f'inputs-{side}.txt' + fixture_paths.append(enriched) + tested_fixtures.update(base.source_hashes([enriched])) + run([binary, build, side], 'rust-' + side) + reference = build / f'{side}.txt' + candidate = build / f'rust-{side}.txt' + matched = base.compare(reference, candidate) + references.append(dict(side=side, jar_sha256=lab.digest(jar, 'sha256'), + output_sha256=lab.digest(reference, 'sha256'), matched_output_lines=matched, + rust_output_sha256=lab.digest(candidate, 'sha256'))) + print(f'{side}: {matched:,} live attribute output lines match Rust', flush=True) + base.ensure_sources_unchanged(sources, tested_sources) + base.ensure_sources_unchanged(fixture_paths, tested_fixtures) + report = dict(schema=1, minecraft=lock['minecraft']['version'], manifest_sha1=lock['minecraft']['manifest_sha1'], + platform=platform.platform(), java=subprocess.check_output(['java', '--version'], text=True).splitlines()[0], + rustc=subprocess.check_output(['rustc', '--version'], text=True).strip(), fixtures=len(fixtures), + attributes=len(catalog['attributes']), entity_suppliers=len(catalog['entities']), + fastutil_sha256={str(p.relative_to(lab.ROOT)): lab.digest(p, 'sha256') for p in libraries if 'fastutil' in str(p)}, + sources_sha256=tested_sources, fixtures_sha256=tested_fixtures, references=references, + scope='Actual registered AttributeMap, immutable DefaultAttributes suppliers, ranged definitions, lazy instances, query/reset methods, modifier reference identities/caches/permanent state, MobEffect modifier loops and native-order update/sync queues. Includes the complete previous entity-attribute corpus, all registered attributes/entity suppliers, null lookups, range boundaries, nonfinite arithmetic, wrapping amplifiers and independent/bulk queue acknowledgements. Replays each reference JVM holder/instance hash sequence. Mutable custom supplier prototypes, internal supplier caches, full entity health/dimensions/gameplay, wire/save codecs and playable platform builds remain outside this gate.') + lab.write_json(report_path, report) + print(f'Scoped live attribute parity passed: {report_path}') + + +if __name__ == '__main__': + main() diff --git a/tools/test_living_air_parity.py b/tools/test_living_air_parity.py new file mode 100644 index 000000000..d2ab0e597 --- /dev/null +++ b/tools/test_living_air_parity.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +"""Compare LivingEntity air travel, climbing and input movement with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>d',float(v)).hex() + def single(v):return struct.pack('>f',float(v)).hex() + def row(**kw): + f=dict(mode='air',input=[.4,0,.8],velocity=[.1,-.08,-.2],after_velocity=[.3,-.6,.9],fall=6,friction=.6,friction_modifier=1,drag_modifier=1,speed=.1,flying_speed=.02,yaw=37,ground=[True,True],climb=[False,False],scaffolding=False,suppress=False,player=False,horizontal=False,jumping=False,snow=False,after_horizontal=False,after_jumping=False,after_snow=False,powder_tag=False,boots=False,levitation=None,client=False,chunk=True,gravity=.08,y=64,min_y=-64,discard=False,omni=False,yaw_mutate=False,move_mutate=False,fail=-1) + f.update(kw) + for k in ['input','velocity','after_velocity']:f[k]=[bits(v) for v in f[k]] + for k in ['fall','friction_modifier','drag_modifier','gravity','y']:f[k]=bits(f[k]) + for k in ['friction','speed','flying_speed','yaw']:f[k]=single(f[k]) + return f + vals=[-float('inf'),-1e30,-1,-.15,-1e-40,-0.0,0,1e-40,.02,.1,.15,.6,.91,.98,1,2,1e30,float('inf'),float('nan')] + for friction in vals: + for modifier in vals:yield row(mode='friction',friction=friction,friction_modifier=modifier) + for friction in vals+[.59999996,.60000002]: + for speed in vals: + for ground in [False,True]:yield row(mode='speed',friction=friction,speed=speed,flying_speed=speed,ground=[ground]) + vectors=[[0,0,0],[-0.0,-0.0,-0.0],[.0001,0,0],[math.sqrt(1e-7),0,0],[1,0,0],[0,0,1],[1,1,1],[float('inf'),0,0],[float('nan'),.1,0],[0,-.15000000596046448,0],[0,-float('inf'),0]] + for i in range(4096):yield row(mode='input',yaw=i*360/4096,input=[.7,.3,-.8]) + for v in vectors: + for yaw in vals+[90,180,270,360,-360]: + for speed in [.1,-0.0,float('inf'),float('nan')]:yield row(mode='input',input=v,yaw=yaw,speed=speed) + for v in vectors+[[.5,-.7,-.5],[0,-0.0,0]]: + for climb in [False,True]: + for player in [False,True]: + for scaffolding in [False,True]: + for suppress in [False,True]: + for fail in range(-1,5):yield row(mode='climb',input=v,climb=[climb],player=player,scaffolding=scaffolding,suppress=suppress,fail=fail) + for ground in [[False],[True],[True,False],[False,True]]: + for climb in [[False],[True],[False,True],[True,False]]: + for bits_mask in range(256): + flags={k:bool(bits_mask&(1<f',v).hex() + def double(v):return struct.pack('>d',v).hex() + def state(damage=10,absorption=5,health=20,maximum=20,attacker=2,invulnerable=False):return dict(health=bits(health),absorption=bits(absorption),exhaustion=bits(0),max_absorption=double(maximum),armor=bits(damage),magic=bits(damage),food_exhaustion=bits(.1),attacker=attacker,invulnerable=invulnerable) + def row(player,initial,**kw): + f=dict(player=player,initial=initial,after=state(2,3,11,2,2),damage=bits(17),fail=-1,mutate_at=-1);f.update(kw);return f + values=[-float('inf'),-1e30,-1,-0.,0.,1e-40,.049999997,.05,.15,1.,5.,10.,20.,1e30,3.4028233e37,3.4028235e37,float('inf'),float('nan')] + for player in [False,True]: + for damage in values: + for absorption in values: + for maximum in [-1.,-0.,0.,5.,20.,float('nan')]:yield row(player,state(damage,absorption,20,maximum)) + for attacker in range(3): + for invulnerable in [False,True]: + for fail in range(-1,21): + for mutation in range(-1,21):yield row(player,state(attacker=attacker,invulnerable=invulnerable),fail=fail,mutate_at=mutation) + rng=random.Random(0x44414d414745) + for _ in range(5000): + f=row(bool(rng.randrange(2)),state(rng.choice(values),rng.choice(values),rng.choice(values),rng.choice(values),rng.randrange(3)),fail=rng.choice([-1,-1,0,3,7,11,15]),mutate_at=rng.choice([-1,-1,0,4,8,12])) + if rng.randrange(3)==0: + for key in ['armor','magic','health','absorption','food_exhaustion']:f['initial'][key]=f'{rng.getrandbits(32):08x}' + yield f + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-living-damage-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingDamageOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/living_damage_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaLivingDamageOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','living_damage_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('living_damage_fixture.exe' if os.name=='nt' else 'living_damage_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} living damage output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual LivingEntity and Player actuallyHurt with observable phase/storage/stat/combat/event hooks; real final absorption clamping. Invulnerability, armor/magic dispatch, two absorption reads, absorbed statistics and Java rounding, player exhaustion/taken statistics, base-living second absorption write, health and damage-event ordering, mutation/failure retention. Armor/magic results, storage, combat/stat sinks and exhaustion delivery are controlled; outer hurt gates, full damage binding and live gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped living damage parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_living_fall_parity.py b/tools/test_living_fall_parity.py new file mode 100644 index 000000000..f57932f89 --- /dev/null +++ b/tools/test_living_fall_parity.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python3 +"""Compare living fall damage calculation, callbacks and impulse context with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>d',float(v)).hex() + def single(v): + try:return struct.pack('>f',float(v)).hex() + except OverflowError:return struct.pack('>f',math.copysign(float('inf'),v)).hex() + def vector(v):return None if v is None else list(map(bits,v)) + def row(mode=1,distance=10,multiplier=1,safe=3,damage=1,immune=(False,False),impact=None,grace=0,y=0,mutate=False,fail=-1,server=True,hurt_result=True,ops=()):return dict(mode=mode,distance=bits(distance),multiplier=single(multiplier),safe=bits(safe),**{'damage-factor':bits(damage)},immune=list(immune),impact=vector(impact),grace=grace,y=bits(y),mutate=mutate,fail=fail,server=server,hurt_result=hurt_result,ops=list(ops)) + values=[-float('inf'),-1,-0.0,0,2.999999,3,3.999999,4,7,8,10,1e40,float('inf'),float('nan')] + for mode in [0,1]: + for distance in values: + for multiplier in [-1,-0.0,0,.5,1,2,float('nan')]: + for safe in [0,3,5,float('nan')]: + for immune in [(False,False),(True,True),(False,True),(True,False)]:yield row(mode,distance,multiplier,safe,immune=immune) + for distance in [-0.0,0,4,10,float('nan')]: + for impact in [None,[0,-1,0],[0,-0.0,0],[0,0,0],[0,2,0],[0,10,0],[0,float('nan'),0]]: + for grace in [-1,0,1,40]: + for fail in range(-1,13):yield row(distance=distance,impact=impact,grace=grace,fail=fail,mutate=True) + rng=random.Random(0x4c4956494e474641) + for _ in range(4000):yield row(mode=rng.randrange(2),distance=rng.choice(values),multiplier=rng.choice(values),safe=rng.choice(values),damage=rng.choice(values),immune=(bool(rng.randrange(2)),bool(rng.randrange(2))),impact=rng.choice([None,[0,0,0],[1,5,2],[0,float('inf'),0]]),grace=rng.choice([-1,0,1,40]),y=rng.choice(values),mutate=bool(rng.randrange(2)),fail=rng.choice([-1,-1,0,1,2,4,7,10]),server=bool(rng.randrange(2)),hurt_result=bool(rng.randrange(2))) + for _ in range(2000): + ops=[] + for _ in range(20):ops.append(dict(mode=rng.randrange(4),ignore=bool(rng.randrange(2)),position=vector(rng.choice([None,[0,0,0],[17,-64,-33]])),ticks=rng.choice([-2147483648,-1,0,1,40,100,2147483647]))) + yield row(mode=2,impact=rng.choice([None,[1,2,3]]),grace=rng.choice([-1,0,1,40,2147483647]),ops=ops,fail=rng.choice([-1,-1,0,3,7,12])) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-living-fall-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingFallOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/living_fall_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaLivingFallOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','living_fall_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('living_fall_fixture.exe' if os.name=='nt' else 'living_fall_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} living-fall output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual LivingEntity.calculateFallDamage, causeFallDamage and impulse-context setter/reset/grace methods. Controlled immunity/attribute getters, passenger callback, sounds and server hurt callback expose native query order and failure state. Includes changing immunity, passenger mutations, impulse-height limiting, zero/negative/large grace values, float multiplier widening, floor/saturation, signed zero/nonfinite values and setter sequences. Hurt return values do not change the causeFallDamage result. A null level snapshot exercises the native non-server hurt no-op; actual client entity lifecycle, passenger storage/recursion, health/damage processing, attribute provisioning and tick/save/network integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped living fall parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_living_fluid_parity.py b/tools/test_living_fluid_parity.py new file mode 100644 index 000000000..297c1de47 --- /dev/null +++ b/tools/test_living_fluid_parity.py @@ -0,0 +1,93 @@ +#!/usr/bin/env python3 +"""Compare LivingEntity water/lava travel and fluid velocity updates with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>d',float(v)).hex() + def single(v):return struct.pack('>f',float(v)).hex() + def row(**kw): + f=dict(mode='fluid',input=[.4,0,.8],velocity=[.1,-.08,-.2],after_velocity=[.3,-.6,.9],fall=6,friction=.6,friction_modifier=1,drag_modifier=1,speed=.1,flying_speed=.02,yaw=37,ground=[True,True],climb=[False,False],scaffolding=False,suppress=False,player=False,horizontal=False,jumping=False,snow=False,after_horizontal=False,after_jumping=False,after_snow=False,powder_tag=False,boots=False,levitation=None,client=False,chunk=True,gravity=.08,y=64,min_y=-64,discard=False,omni=False,yaw_mutate=False,move_mutate=False,fail=-1) + f.update(water=True,sprint=[False],slow_down=.8,efficiency=0,dolphin=False,lava_height=1,floatable_height=0,threshold=.4,free=False,vehicle=False,float_tag=False,free_mutate=False,falling=True,old_y=64,after_y=64) + f.update(kw) + for k in ['input','velocity','after_velocity']:f[k]=[bits(v) for v in f[k]] + for k in ['fall','friction_modifier','drag_modifier','gravity','y','efficiency','lava_height','floatable_height','threshold','old_y','after_y']:f[k]=bits(f[k]) + for k in ['friction','speed','flying_speed','yaw','slow_down']:f[k]=single(f[k]) + return f + vals=[-float('inf'),-1e30,-1,-.15,-.003,-1e-40,-0.0,0,1e-40,.002,.003,.005,.008,.08,.15,.6,.91,.98,1,2,1e30,float('inf'),float('nan')] + for gravity in vals: + for y in vals+[math.nextafter(.002,0),math.nextafter(.002,1),math.nextafter(.008,0),math.nextafter(.008,1)]: + for falling in [False,True]: + for sprint in [False,True]:yield row(mode='adjust',input=[-0.0,y,float('nan')],gravity=gravity,falling=falling,sprint=[sprint]) + for efficiency in vals: + for slowdown in vals: + for ground in [False,True]: + for dolphin in [False,True]: + for sprint in [[False],[True],[False,True],[True,False]]:yield row(mode='water',efficiency=efficiency,slow_down=slowdown,ground=[ground],dolphin=dolphin,sprint=sprint) + for height in vals: + for threshold in vals: + for gravity in [-0.0,.08,float('nan')]: + for falling in [False,True]:yield row(mode='lava',lava_height=height,threshold=threshold,gravity=gravity,falling=falling,move_mutate=True) + for mode in ['water','lava','fluid','jump','float']: + for mask in range(256): + f={k:bool(mask&(1<f',v).hex() + def double(v):return struct.pack('>d',v).hex() + def world(maximum=20,absorption=10,dead=False):return {'max-health':double(maximum),'max-absorption':double(absorption),'dead':dead} + def op(mode,value=0,force=False):return dict(mode=mode,value=bits(value),force=force) + def row(health,ops,**kw): + f=dict(health=[bits(health),bits(7)],absorption=bits(0),world=world(),after=world(5,3,True),fail=-1,mutate_at=-1,ops=ops);f.update(kw);return f + values=[-float('inf'),-1e30,-1,-0.,0.,1e-40,.1,1,5,10,20,1e30,float('inf'),float('nan')] + for health in values: + for limit in values: + for value in values: + yield row(health,[op('hurt'),op('dead'),op('heal',value),op('pack'),op('set',value),op('base',value),op('absorption',value),op('hurt'),op('dead')],world=world(limit,limit)) + for health in values: + for value in values: + for force in [False,True]:yield row(health,[op('sync',value,force),op('sync',value,force),op('pack'),op('pack'),op('sync',health),op('pack')]) + for mode in ['hurt','dead','heal','set','base','absorption','sync']: + for fail in range(-1,7): + for mutation in range(-1,7):yield row(10,[op(mode,6),op('pack'),op('heal',1),op('pack')],fail=fail,mutate_at=mutation) + rng=random.Random(0x4845414c5448) + for _ in range(1500): + yield row(rng.choice(values),[op(rng.choice(['hurt','dead','heal','set','base','absorption','sync','pack']),rng.choice(values),bool(rng.randrange(2))) for __ in range(rng.randrange(1,60))],world=world(rng.choice(values),rng.choice(values),bool(rng.randrange(2))),after=world(rng.choice(values),rng.choice(values),bool(rng.randrange(2))),fail=rng.choice([-1,-1,0,3,7,11]),mutate_at=rng.choice([-1,-1,0,2,4,8])) + for nan in ['7fa12345','7fc00000','ffa12345']: + f=row(0,[op('sync',float('nan')),op('heal',1),op('pack')]);f['health'][0]=nan;yield f + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-living-health-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingHealthOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/living_health_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaLivingHealthOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','living_health_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('living_health_fixture.exe' if os.name=='nt' else 'living_health_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} living health output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual LivingEntity/Player health, healing, absorption and predicates composed with actual SynchedEntityData Float storage. Checks captured synchronized-data identity, attribute narrowing/clamping, boxed-float equality, callback-before-dirty ordering, partial state after exceptions, mutations and dirty/default extraction. Attribute values and the internal absorption sink are controlled; Player-specific absorption synchronization, full multi-item synchronization, registered attribute binding, damage pipeline and playable entities remain pending.'} + lab.write_json(report_path,report);print(f'Scoped living health parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_living_hurt_parity.py b/tools/test_living_hurt_parity.py new file mode 100644 index 000000000..963f8c7c1 --- /dev/null +++ b/tools/test_living_hurt_parity.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 +"""Compare registered living hurt and synchronized absorption with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>f',v).hex() + def op(damage=8,**kw): + o=dict(damage=bits(damage),blocked=bits(0),fail=-1,game_time=123456789,hit_cooldown=3,hit_last=bits(99),hit_duration=2,hit_time=1,effects=0,**{k:False for k in ['invulnerable','dead_before','dead_after','fire','fire_resistance','sleeping','component','freezing','freeze_extra','damages_helmet','helmet','bypasses_cooldown','no_impact','no_knockback','bypasses_invulnerability','mutate_hit']});o.update(kw);return o + def row(ops,**kw): + f=dict(ops=ops,no_action=83,cooldown=0,last_hurt=bits(0),duration=7,time=9,stamp=-3,source=False,player=False);f.update(kw);return f + values=[-float('inf'),-1e30,-1,-0.,0.,1e-40,.1,1,5,10,20,1e30,float('inf'),float('nan')] + for v in values: + for block in values: + for cooldown in [-2147483648,0,10,11,2147483647]: + for player in [False,True]: + yield row([op(v,blocked=bits(block),effects=2),op(v,blocked=bits(block),component=True),op(v,blocked=bits(block),dead_after=True)],cooldown=cooldown,player=player,last_hurt=bits(v)) + for fail in range(-1,38): + for cooldown in [0,10,11,20]: + for dead in [False,True]: + for component in [False,True]: + yield row([op(21,fail=fail,sleeping=True,freezing=True,freeze_extra=True,damages_helmet=True,helmet=True,blocked=bits(2),component=component,dead_after=dead,effects=3,mutate_hit=True),op(22)],player=True,cooldown=cooldown) + rng=random.Random(0x4855525453455256) + for _ in range(3000): + ops=[] + for __ in range(rng.randrange(1,20)): + o=op(rng.choice(values),blocked=bits(rng.choice(values)),effects=rng.randrange(4),game_time=rng.choice([-9223372036854775808,-1,0,9223372036854775807]),fail=rng.choice([-1,-1,-1,*range(38)]),hit_last=bits(rng.choice(values)),hit_cooldown=rng.randrange(-30,31)) + for k in ['invulnerable','dead_before','dead_after','fire','fire_resistance','sleeping','component','freezing','freeze_extra','damages_helmet','helmet','bypasses_cooldown','no_impact','no_knockback','bypasses_invulnerability','mutate_hit']:o[k]=rng.randrange(4)==0 + ops.append(o) + yield row(ops,cooldown=rng.choice([-2147483648,0,10,11,20,2147483647]),last_hurt=bits(rng.choice(values)),source=bool(rng.randrange(2)),player=bool(rng.randrange(2))) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-living-hurt-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingHurtOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/living_hurt_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaLivingHurtOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','living_hurt_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('living_hurt_fixture.exe' if os.name=='nt' else 'living_hurt_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} living hurt output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual LivingEntity.hurtServer invoked directly on base and ServerPlayer receivers. Controlled blocking, inner damage, sounds, knockback, death, attribution and effect callbacks; native empty death-protection lookup and empty-listener victim criterion. Compares field write ordering, cooldown thresholds, float sanitization, modifiers, repeated hits and injected callback failure. Successful totems, attacker-player criteria, actual blocking reduction, combat/death services and full player outer gates remain pending.'} + lab.write_json(report_path,report);print(f'Scoped living hurt parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_living_landing_parity.py b/tools/test_living_landing_parity.py new file mode 100644 index 000000000..aca33601f --- /dev/null +++ b/tools/test_living_landing_parity.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python3 +"""Compare LivingEntity landing wrapper and base fall callbacks with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v): return struct.pack('>d',float(v)).hex() + def row(**kw): + f=dict(fall=6,dy=-.08,ground=True,water=False,after_water=False,support=None,after_support=None,mutate=False,fail=-1,server=True,fluid_mutate=False,fluid_result=False,changed_mutate=False,particle_mutate=False,block_mutate=False,after_fall=12,safe=3,air=False,position=[.3,1.5,-.3],block_position=[0,1,-1],landing=[3,4,5]) + f.update(kw) + for k in ['fall','dy','after_fall','safe']:f[k]=bits(f[k]) + f['position']=[bits(v) for v in f['position']] + return f + values=[-float('inf'),-1e40,-1,-1e-46,-0.0,0,1e-46,2.9999989,2.999999,3,3.999999,4,4.000001,6,7,37.5,100,1e40,float('inf'),float('nan')] + for fall in values: + for safe in values: + for server in [False,True]: + for ground in [False,True]: + for water in [False,True]: + for after_water in [False,True]: + for air in [False,True]:yield row(fall=fall,safe=safe,server=server,ground=ground,water=water,after_water=after_water,air=air) + positions=[[.3,1.5,-.3],[3.5,0,5.5],[3.5,0,10],[8,0,5.5],[4.5,0,6.5],[float('nan'),1,5.5],[3.5,float('inf'),float('nan')],[float('inf'),0,-float('inf')],[30000000.5,-64,-30000000.5],[-0.0,0,-0.0]] + for position in positions: + for landing in [[3,4,5],[0,1,-1],[30000000,-64,-30000000],[-2147483648,0,2147483647]]: + for block_position in [landing,[0,0,0]]: + for block_mutate in [False,True]:yield row(position=position,landing=landing,block_position=block_position,block_mutate=block_mutate) + for field in ['fluid_mutate','changed_mutate','particle_mutate','block_mutate','mutate']: + for after in values: + for fail in range(-1,14):yield row(**{field:True},after_fall=after,fail=fail,support=[17,-64,-33],after_support=[31,15,-1]) + rng=random.Random(0x4c414e44) + flags=['ground','water','after_water','mutate','server','fluid_mutate','fluid_result','changed_mutate','particle_mutate','block_mutate','air'] + for _ in range(12000): + f={k:bool(rng.randrange(2)) for k in flags} + for k in ['fall','dy','after_fall','safe']:f[k]=rng.choice(values) if rng.randrange(3)==0 else rng.uniform(-5,80) + yield row(**f,position=rng.choice(positions),support=rng.choice([None,[17,-64,-33]]),after_support=rng.choice([None,[31,15,-1]]),fail=rng.choice([-1,-1,*range(14)])) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-living-landing-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingLandingOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/living_landing_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaLivingLandingOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','living_landing_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('living_landing_fixture.exe' if os.name=='nt' else 'living_landing_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} living-landing output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual LivingEntity.checkFallDamage including its base Entity fall handling. Controlled fluid update, onChangedBlock, attribute, state, particle and block landing providers exercise callback order, mutations, server class identity, particle positions/counts, nonfinite arithmetic, climbing cleanup and partial state after failures. Full fluid immersion, enchantment hooks, particle rendering and player/world integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped living landing parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_living_motion_parity.py b/tools/test_living_motion_parity.py new file mode 100644 index 000000000..8d0de6de7 --- /dev/null +++ b/tools/test_living_motion_parity.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python3 +"""Compare default living jump, gravity and flight parameters with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>d',float(v)).hex() + def single(v):return struct.pack('>f',float(v)).hex() + def row(**kw): + f=dict(mode='jump',velocity=[.1,-.08,.2],delta=[0,.2,0],after_velocity=[17,18,19],strength=.42,block_factor=1,scale=1,boost=False,amplifier=0,sprint=False,yaw=37,sync=False,no_gravity=False,gravity=.08,slow_falling=False,passenger=0,speed=.1,omni=False,drag_modifier=1,fail=-1,mutate_at=-1) + f.update(kw) + for k in ['velocity','delta','after_velocity']:f[k]=[bits(v) for v in f[k]] + for k in ['strength','gravity','drag_modifier']:f[k]=bits(f[k]) + for k in ['block_factor','scale','yaw','speed']:f[k]=single(f[k]) + return f + vals=[-float('inf'),-1e30,-1,-.01,-1e-40,-0.0,0,1e-40,1e-5,.01,.1,.42,1,2,1e30,float('inf'),float('nan')] + for strength in vals+[.000009999999,.000010000001]: + for factor in vals: + for scale in [-1,0,.5,1,float('nan')]: + for boost in [False,True]:yield row(mode='power',strength=strength,block_factor=factor,scale=scale,boost=boost,amplifier=2) + for amplifier in [-2147483648,-1,0,1,255,16777215,16777216,2147483647]: + for boost in [False,True]:yield row(mode='boost',amplifier=amplifier,boost=boost) + for strength in vals+[.000009999999,.000010000001]: + for vy in vals: + for sprint in [False,True]: + for sync in [False,True]:yield row(strength=strength,velocity=[-0.0,vy,-0.0],sprint=sprint,sync=sync) + for yaw in [*vals,*[i*360/1024 for i in range(1024)]]:yield row(sprint=True,yaw=yaw) + for mode in ['gravity','effective','apply']: + for gravity in vals: + for vy in vals: + for no_gravity in [False,True]: + for slow_falling in [False,True]:yield row(mode=mode,gravity=gravity,velocity=[-0.0,vy,-0.0],no_gravity=no_gravity,slow_falling=slow_falling) + for speed in vals: + for passenger in [0,1,2]:yield row(mode='speed',speed=speed,passenger=passenger) + for drag_modifier in vals: + for omni in [False,True]:yield row(mode='drag',drag_modifier=drag_modifier,omni=omni) + vectors=[[0,0,0],[-0.0,-0.0,-0.0],[.1,.2,.3],[1,float('nan'),2],[float('inf'),0,0],[-float('inf'),1,0],[1.7976931348623157e308,1.7976931348623157e308,1.7976931348623157e308]] + for v in vectors: + for delta in vectors: + for mode in ['add','up','down']:yield row(mode=mode,velocity=v,delta=delta) + modes=['boost','power','jump','gravity','effective','apply','up','down','speed','drag','add'] + for mode in modes: + for fail in range(-1,10): + for mutate_at in range(-1,10):yield row(mode=mode,fail=fail,mutate_at=mutate_at,boost=True,sprint=True,slow_falling=True,passenger=2) + rng=random.Random(0x4a554d50) + for _ in range(8000): + f={k:bool(rng.randrange(2)) for k in ['boost','sprint','sync','no_gravity','slow_falling','omni']} + for k in ['strength','gravity','drag_modifier','block_factor','scale','yaw','speed']:f[k]=rng.choice(vals) if rng.randrange(3)==0 else rng.uniform(-1,2) + yield row(**f,mode=rng.choice(modes),velocity=rng.choice(vectors),delta=rng.choice(vectors),after_velocity=rng.choice(vectors),amplifier=rng.choice([-2147483648,-1,0,1,255,2147483647]),passenger=rng.randrange(3),fail=rng.choice([-1,-1,*range(10)]),mutate_at=rng.randrange(-1,10)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-living-motion-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLivingMotionOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/living_motion_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaLivingMotionOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','living_motion_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('living_motion_fixture.exe' if os.name=='nt' else 'living_motion_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} living-motion output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual default living jump power/boost/from-ground, gravity/effective-gravity, vertical liquid inputs, rider flight speed, air drag, Entity.applyGravity and finite addDeltaMovement. Traces field writes and lazy attribute/effect callbacks, both passenger classes, signed zero/nonfinite arithmetic, integer amplifier edges, callback mutations and failures. Effect amplifier fields are injected directly at boundaries. Entity-type jump/flight overrides, full effect/attribute storage, registered jump-factor binding and live gameplay integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped living motion parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_local_input_parity.py b/tools/test_local_input_parity.py new file mode 100644 index 000000000..90ef50fbe --- /dev/null +++ b/tools/test_local_input_parity.py @@ -0,0 +1,59 @@ +#!/usr/bin/env python3 +"""Compare native keyboard direction and LocalPlayer input-speed preparation.""" +import itertools +import json +import os +from pathlib import Path +import platform +import random +import struct +import subprocess +try: + from . import lab, test_rust_parity as base, test_model_baking_parity as baking +except ImportError: + import lab, test_rust_parity as base, test_model_baking_parity as baking + +def bits(value):return struct.pack('>f',value).hex() +def corpus(): + def row(keys,using,riding,slow,item,sneak,vector=None): + result=dict(keys=keys,using=using,riding=riding,slow=slow,item=bits(item),sneak=bits(sneak)) + if vector is not None:result['vector']=list(map(bits,vector)) + return result + for keys,using,riding,slow in itertools.product(range(128),[False,True],[False,True],[False,True]): + for item,sneak in [(1,1),(.2,.3),(0,.3),(.2,0),(.5,.5),(.8,.9),(2,2),(-.2,.3),(.2,-.3)]: + yield row(keys,using,riding,slow,item,sneak) + special=[0,-0.0,1,-1,1e-23,1e-20,1e-4,.98,1e10,1e20,float('inf'),float('-inf'),float('nan')] + for x,z in itertools.product(special,special): + for item,sneak in [(1,1),(0,.3),(.2,.3),(float('nan'),1)]: + yield row(0,True,False,True,item,sneak,(x,z)) + rng=random.Random(0x494e505554) + for _ in range(4096): + yield row(rng.randrange(128),bool(rng.randrange(2)),bool(rng.randrange(2)),bool(rng.randrange(2)),rng.uniform(0,2),rng.uniform(0,1),(rng.uniform(-2,2),rng.uniform(-2,2))) + +def main(): + lock,jars,_=base.verify_artifacts();libraries=baking.client_libraries() + build=lab.LOCAL/'rust-local-input';build.mkdir(exist_ok=True) + report=build/'report.json';report.unlink(missing_ok=True) + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaLocalInputOracle.java' + sources=[Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/test_model_baking_parity.py',lab.ROOT/'tools/lab.py',oracle,lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-client/Cargo.toml',lab.ROOT/'crates/horizon-client/src/input.rs',lab.ROOT/'crates/horizon-client/src/lib.rs',lab.ROOT/'crates/horizon-client/examples/input_probe.rs'] + tested=base.source_hashes(sources) + def run(command,name): + with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=600,stdout=log,stderr=subprocess.STDOUT) + fixtures=list(corpus());inputs=build/'inputs.jsonl' + inputs.write_text(''.join(json.dumps(f,separators=(',',':'))+'\n' for f in fixtures));input_hash=lab.digest(inputs,'sha256') + classes=build/'classes';classes.mkdir(exist_ok=True) + dependencies=os.pathsep.join(map(str,[jars['client'],*libraries])) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',dependencies,'-d',classes,oracle],'compile-java') + run(['cargo','build','--locked','-p','horizon-client','--example','input_probe'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT)) + binary=Path(metadata['target_directory'])/'debug/examples'/('input_probe.exe' if os.name=='nt' else 'input_probe') + run([binary,inputs,build/'rust.txt'],'rust') + run(['java','-Xmx768M','-cp',str(classes)+os.pathsep+dependencies,'dev.horizonlab.parity.VanillaLocalInputOracle',inputs,build/'client.txt'],'client') + matched=base.compare(build/'client.txt',build/'rust.txt') + if matched!=len(fixtures):raise AssertionError('Incomplete input output') + base.ensure_sources_unchanged(sources,tested) + if input_hash!=lab.digest(inputs,'sha256'):raise AssertionError('Input fixtures changed') + lab.write_json(report,dict(schema=1,minecraft=lock['minecraft']['version'],manifest_sha1=lock['minecraft']['manifest_sha1'],platform=platform.platform(),rustc=subprocess.check_output(['rustc','--version'],text=True).strip(),java=subprocess.check_output(['java','--version'],text=True).splitlines()[0],fixtures=len(fixtures),sources_sha256=tested,input_sha256=input_hash,client_jar_sha256=lab.digest(jars['client'],'sha256'),matched_output_lines=matched,output_sha256=lab.digest(build/'rust.txt','sha256'),scope='Actual KeyboardInput.tick direction and private LocalPlayer.modifyInput compared by float bits. All 128 key combinations, input-use/riding/slow gates, supplied use-effects and sneaking multipliers, analogue vectors, signed zeros and nonfinite arithmetic. Native item speed reads a real ItemStack USE_EFFECTS component. Does not establish the full LocalPlayer tick, input remapping, sprint eligibility, poses, camera bob or network lifecycle.')) + print(f'{matched:,} local input cases match the pinned client: {report}',flush=True) + +if __name__=='__main__':main() diff --git a/tools/test_material_condition_parity.py b/tools/test_material_condition_parity.py new file mode 100644 index 000000000..43e0fa48b --- /dev/null +++ b/tools/test_material_condition_parity.py @@ -0,0 +1,316 @@ +#!/usr/bin/env python3 +"""Compare numeric material conditions and cache transitions with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +import zipfile +try: + from . import lab,test_rust_parity as base,test_worldgen_parity as worldgen,test_biome_temperature_parity as biome +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + import test_biome_temperature_parity as biome + + +def corpus(): + rng=random.Random(0x484f52495a4f4e434f4e444954494f4e) + edges=[-2**31,-2032,-64,-21,-20,-5,-4,-3,-1,0,1,3,4,5,20,21,63,2031,2**31-1] + conditions=[["hole"],["steep"]] + for multiplier in [-2**31,-20,-1,0,1,20,2**31-1]: + for add in [False,True]: + for kind in range(4):conditions.append(["y",[kind,[-64,0,63,2**31-1][kind]],multiplier,add]) + conditions.append(["water",edges[(multiplier+3)%len(edges)],multiplier,add]) + for secondary in [-2**31,-100,-1,0,1,2,12,2**31-1]: + for add in [False,True]: + for ceiling in [False,True]:conditions.append(["stone",edges[(secondary+7)%len(edges)],add,secondary,ceiling]) + for name in ["bedrock_floor","minecraft:bedrock_floor",":bedrock_roof","horizon:test",""]: + for low,high in [([0,-64],[0,64]),([1,0],[1,5]),([2,5],[2,0]),([3,-5],[3,5]),([0,0],[0,0]),([0,64],[0,-64]),([0,-2**31],[0,2**31-1])]: + conditions.append(["gradient",name,low,high]) + conditions += [["not",["hole"]],["not",["not",["stone",0,True,12,False]]]] + secondary_bits=[0,0x80000000,1,0x80000001,0x3f000000,0xbf000000,0x3f800000,0xbf800000,0x40000000,0xc0000000,0x7f7fffff,0xff7fffff,0x7f800000,0xff800000,0x7fc00000]+[rng.getrandbits(32) for _ in range(81)] + seeds=[0,1,-1,-2**63,2**63-1]+[rng.randrange(-2**63,2**63) for _ in range(19)] + for fixture,seed in enumerate(seeds): + ops=[["eval"],["eval"],["secondary"]] + for i,bits in enumerate(secondary_bits): + depth=edges[(i+fixture)%len(edges)] + x,z=[rng.choice(edges) if i%3==0 else rng.randrange(-30000000,30000001) for _ in range(2)] + above,below,water=[rng.choice(edges) for _ in range(3)] + y=[-65,-64,-63,-1,0,1,62,63,64,65][i%10] if i%2 else rng.choice(edges) + ops += [["input",depth,f"{bits:x}"],["xz",x,z,edges[i%len(edges)],edges[(i+9)%len(edges)]],["y",above,below,water,y],["eval"],["eval"]] + # Changing source values alone does not invalidate cached results. + ops += [["input",depth^1,f"{secondary_bits[(i+7)%len(secondary_bits)]:x}"],["secondary"],["y",below,above,water,y],["eval"],["secondary"]] + if i%12==0: + ops += [["add",["not",["gradient","horizon:late",[0,-64],[0,64]]]],["eval"]] + for legacy in [False,True]: + yield {"seed":seed,"legacy":legacy,"context":[[-64,384,63],[0,256,32],[-2032,4064,0],[2**31-1,-2**31,-2**31]][fixture%4],"conditions":conditions,"ops":ops} + + +def condition_resources(jar): + prefix="data/minecraft/worldgen/material_condition/" + with zipfile.ZipFile(jar) as archive: + return {"minecraft:"+name[len(prefix):-5]:archive.read(name).decode("utf-8") for name in sorted(archive.namelist()) if name.startswith(prefix) and name.endswith(".json")} + + +def codec_corpus(definitions): + templates=[ + {"type":"hole"},{"type":"steep"},{"type":"temperature"}, + {"type":"biome","biome_is":["minecraft:plains"]}, + {"type":"noise_threshold","noise":"surface","min_threshold":-1.0,"max_threshold":1.0,"is_3d":False}, + {"type":"y_above","anchor":{"absolute":0},"surface_depth_multiplier":0,"add_stone_depth":False}, + {"type":"water","offset":0,"surface_depth_multiplier":0,"add_stone_depth":False}, + {"type":"stone_depth","offset":0,"add_surface_depth":False,"secondary_depth_range":0,"surface_type":"floor"}, + {"type":"vertical_gradient","random_name":"bedrock_floor","true_at_and_below":{"above_bottom":0},"false_at_and_above":{"above_bottom":5}}, + {"type":"not","invert":{"type":"hole"}}, + ] + cases=['null','false','0','[]','{}','"minecraft:unknown"'] + cases += list(definitions.values())+[json.dumps(name) for name in definitions] + cases += [json.dumps({"type":"not","invert":name}) for name in definitions] + tokens=['null','true','false','0','1','-1','-21','-20','20','21','2147483647','-2147483648','4294967296','4294967295','0.99','-0.99','1e100','1e1000','-1e1000','1e-100','""','"floor"','"ceiling"','"FLOOR"','"true"','"a:b:c"','[]','{}','{"absolute":0}','{"above_bottom":0,"below_top":0,"relative_to_sea_level":0}'] + for template in templates: + cases.append(json.dumps(template,separators=(",",":"))) + for key in template: + cases.append(json.dumps({k:v for k,v in template.items() if k!=key})) + for token in tokens: + fields=[json.dumps(k)+":"+(token if k==key else json.dumps(v,separators=(",",":"))) for k,v in template.items()] + cases.append("{"+",".join(fields)+"}") + for prefix in ["minecraft:",":","other:","Minecraft:"]: + cases.append(json.dumps(dict(template,type=prefix+template["type"]))) + cases.append(json.dumps(dict(template,unknown=[1,2,3]))) + cases += ['{"type":"hole","type":"steep"}','{"type":"hole","type":null}'] + base=next(corpus()) + for context in [[-64,384,63],[0,256,32],[-2032,4064,0],[2**31-1,-2**31,-2**31]]: + for legacy in [False,True]: + yield {"seed":-1,"legacy":legacy,"context":context,"conditions":[],"json":cases,"ops":base["ops"][:166]} + + +def rule_corpus(definitions): + rng=random.Random(0x484f52495a4f4e52554c45) + base=next(corpus()) + choices=base["conditions"]+[["json",json.dumps(name)] for name in sorted(definitions)] + def tree(depth): + kind=rng.randrange(4 if depth else 2) + if kind==0:return ["block",rng.randrange(10)] + if kind==1:return ["band"] + if kind==2:return ["if",rng.choice(choices),tree(depth-1)] + return ["sequence",[tree(depth-1) for _ in range(rng.randrange(4))]] + rules=[["block",i] for i in range(10)]+[["band"],["sequence",[]],["sequence",[["block",8]]],["sequence",[["sequence",[]]]]] + rules += [["if",c,["block",7]] for c in choices] + rules += [["sequence",[["block",8],["if",["stone",0,False,12,False],["block",7]],["band"]]], + ["sequence",[["if",["hole"],["block",0]],["if",["not",["hole"]],["band"]]]], + ["if",["stone",0,True,12,False],["sequence",[["if",["steep"],["block",1]],["block",9]]]]] + rules += [tree(3) for _ in range(48)] + edges=[-2**31,-1000,-193,-192,-65,-64,-1,0,1,63,64,191,192,319,2**31-1] + for fixture in range(12): + ops=[["apply",0,0,0],["apply",0,0,0]] + for i in range(64): + x,y,z=[rng.choice(edges) for _ in range(3)] + a,b,w=[rng.choice(edges) for _ in range(3)] + ops += [["input",[-1,0,1,4,12,2**31-1][i%6],["0","3f800000","bf800000","7f800000","7fc00000"][i%5]], + ["xz",x,z,[-5,-4,-3,0,3,4,5][i%7],[5,4,3,0,-3,-4,-5][i%7]],["y",a,b,w,y], + ["apply",x,y,z],["apply",x,y,z],["apply",z,edges[(i+7)%len(edges)],x]] + if i%16==0:ops += [["rule",tree(3)]] + for legacy in [False,True]: + yield {"seed":[0,1,-1,-2**63,2**63-1,987654321][fixture%6],"legacy":legacy,"context":[-64,384,63],"conditions":[],"rules":rules,"ops":ops} + + +def noise_corpus(noises): + import struct + bits=lambda value:struct.pack('>d',value).hex() + bounds=[(-1.,1.),(0.,0.),(-0.,0.),(1.,-1.),(float('-inf'),float('inf')),(float('nan'),1.),(-1.,float('nan'))] + conditions=[] + for name in ['surface','minecraft:surface',':surface_secondary','minecraft:clay_bands_offset']: + for is3d in [False,True]: + for low,high in bounds:conditions.append(['noise',name,bits(low),bits(high),is3d]) + conditions += [['not',c] for c in conditions[:14]] + random=__import__('random').Random(0x484f52495a4f4e4e4f495345) + noise_bits=[0,0x80000000,0x3f800000,0xbf800000,0x3f800001,0xbf800001,0x3f7fffff,0xbf7fffff,0x7f800000,0xff800000,0x7fc00000]+[random.getrandbits(32) for _ in range(85)] + edges=[-2**31,-1000,-64,-1,0,1,63,319,2**31-1] + for real in [False,True]: + selected=conditions if not real else [['noise',name,bits(-0.25),bits(0.25),is3d] for name in sorted(noises) for is3d in [False,True]] + for seed in [0,1,-1,-2**63,2**63-1,87654321]: + operations=[['eval'],['eval']] + for i,b in enumerate(noise_bits): + x,y,z=[random.choice(edges) for _ in range(3)] + operations += [['input',0,f'{b:x}'],['xz',x,z,0,0],['y',0,0,0,y],['eval'],['eval'],['input',0,f'{noise_bits[(i+7)%len(noise_bits)]:x}'],['eval'],['y',0,0,0,y],['eval'],['xz',x,z,0,0],['eval']] + if i%16==0:operations += [['add',selected[i%len(selected)]],['eval']] + for legacy in [False,True]: + yield {'seed':seed,'legacy':legacy,'context':[-64,384,63],'conditions':selected,'real_noise':real,'ops':operations} + + +def biome_corpus(biomes): + names=sorted(biomes) + conditions=[['temperature'],['not',['temperature']],['biome',[]],['biome',names]] + conditions += [['biome',[name]] for name in names] + conditions += [['not',['biome',[name]]] for name in names[::7]] + conditions += [['biome',['minecraft:plains','minecraft:plains','minecraft:desert']]] + choices=[None,[],['minecraft:plains'],['minecraft:desert'],['minecraft:plains','minecraft:desert'],names] + ops=[['eval'],['eval']] + for i,name in enumerate(names): + ops += [['biome',name],['xz',i*31,i*-17,(i%9)-4,4-(i%9)],['eval'],['y',0,0,0,[-64,0,63,80,81,120,319][i%7]],['eval'],['eval']] + if i%9==0:ops += [['add',['biome',[name]]],['eval']] + # Errors after a previous result preserve that result on a same-revision + # retry. Null biome results are queried again by uncached conditions. + ops += [['biome','#throw'],['y',0,0,0,0],['eval'],['eval'],['add',['biome',['minecraft:plains']]],['eval'],['eval'], + ['biome','minecraft:plains'],['eval'],['y',0,0,0,0],['eval'],['biome',None],['y',0,0,0,81],['eval'],['eval'], + ['biome','minecraft:desert'],['xz',7,9,0,0],['eval'],['y',0,0,0,81],['eval']] + for possible in choices: + for sea in [63,-1000,2**31-1]: + yield {'seed':0,'legacy':False,'context':[-64,384,sea],'possible_biomes':possible,'conditions':conditions,'ops':ops} + + +def biome_tag_resources(jar): + prefix='data/minecraft/tags/worldgen/biome/' + with zipfile.ZipFile(jar) as archive: + return {'minecraft:'+name[len(prefix):-5]:archive.read(name).decode('utf-8') for name in sorted(archive.namelist()) if name.startswith(prefix) and name.endswith('.json')} + + +def biome_tag_corpus(biomes,tags): + conditions=[['json',json.dumps({'type':'biome','biome_is':'#'+name})] for name in sorted(tags)] + conditions += [['not',c] for c in conditions[:8]] + invalid=[{'type':'biome','biome_is':value} for value in ['#minecraft:unknown','#',['#minecraft:is_badlands'],'##minecraft:is_badlands']] + aliases=[{'type':'biome','biome_is':'#'+name.removeprefix('minecraft:')} for name in sorted(tags)] + rules=[['sequence',[['if',c,['block',7]],['block',8]]] for c in conditions] + for possible in [None,[],['minecraft:plains'],['minecraft:badlands'],sorted(biomes)]: + ops=[['eval'],['eval']] + for i,name in enumerate(sorted(biomes)): + ops += [['biome',name],['xz',i,i*-3,0,0],['y',0,0,0,i],['eval'],['apply',i,i,i*-3]] + ops += [['biome','#throw'],['y',0,0,0,80],['eval'],['eval'],['biome',None],['y',0,0,0,81],['eval'],['eval'],['biome','minecraft:plains'],['eval']] + yield {'seed':0,'legacy':False,'context':[-64,384,63],'possible_biomes':possible,'conditions':conditions,'json':[json.dumps(v) for v in [*invalid,*aliases]],'rules':rules,'ops':ops} + + +def preliminary_corpus(): + def wrap(v): return (v+2**31)%2**32-2**31 + volumes=[[4,3,5,0,-64,0,1,1,1],[5,7,3,-17,32,19,4,8,4], + [1,1,1,1024,0,-1024,1,1,1],[4,2,4,2**31-2,1,-2**31,3,2,5]] + bit_values=['00000000','80000000','3f000000','bf000000','3f7fffff','bf800001','42810000', + 'c2810000','4effffff','4f000000','cf000000','cf000001','7f800000','ff800000','7fc00000','00000001','80000001'] + conditions=[['above'],['not',['above']],['not',['not',['above']]]] + rules=[['if',['above'],['block',7]],['sequence',[['if',['not',['above']],['block',8]],['block',9]]]] + for volume in volumes: + sx,_,sz,x,_,z,_,_,_=volume + for failure in [-1,0,1,3,19]: + for first in ['minimum','eval','apply']: + # Inside-plane allocation and failed retries, or initial scalar + # lookup before the first allocation, vary independently. + initial=[first] if first!='apply' else ['apply',0,200,0] + ops=[['density','42810000',failure],['input',3,'0'],['xz',x,z,0,0],initial,['minimum'],['eval'],['apply',7,11,13]] + ops += [['density','43400000',-1],['minimum'],['eval'],['y',0,0,0,80],['minimum'],['eval']] + for iz in range(sz): + for ix in range(sx): + ops += [['xz',wrap(x+ix),wrap(z+iz),0,0],['minimum'],['y',0,0,0,(ix+iz)*31-8],['eval'],['apply',-17,90,31]] + for i,bits in enumerate(bit_values): + depth=[-2**31,-9,0,3,8,2**31-1][i%6] + # Scalar fallback: floor/conversion, wrapping, cache reuse, + # failure after a previous successful minimum, and recovery. + ox,oz=wrap(x-1-i),wrap(z-1-i) + ops += [['density',bits,-1],['input',depth,'0'],['xz',ox,oz,0,0],['minimum']] + for y in [-2**31,-65,-8,-1,0,56,64,65,2**31-1]: + ops += [['y',0,0,0,y],['eval'],['apply',0,0,0]] + ops += [['density','0',0],['minimum'],['xz',ox,oz,0,0],['eval'],['minimum'],['eval'],['density',bits,-1],['minimum'],['xz',ox,oz,0,0],['minimum']] + ops += [['add',['above']],['eval']] + yield {'seed':failure,'legacy':first=='eval','context':[-64,384,63], 'volume':volume,'conditions':conditions,'rules':rules, + 'json':['{"type":"above_preliminary_surface"}','{"type":"minecraft:above_preliminary_surface","ignored":null}'], 'ops':ops} + # A scalar lookup outside the plane must not allocate or populate it. + yield {'seed':0,'legacy':False,'context':[-64,384,63],'volume':[2,1,2,10,0,10,1,1,1], + 'conditions':conditions,'rules':rules,'ops':[['density','42810000',-1],['minimum'],['density','43400000',-1],['xz',10,10,0,0],['minimum'],['xz',0,0,0,0],['minimum']]} + + +def ore_corpus(): + def wrap(v): return (v+2**31)%2**32-2**31 + rng=random.Random(0x484f52495a4f4e4f5245) + bits=['0','80000000','00000001','3e4ccccd','3f000000','3f333333','3f7fffff','3f800000', + '3f800001','bf800000','7f800000','ff800000','7fc00000'] + volumes=[[3,4,2,-1,-2,5,1,1,1],[3,2,3,-10,-5,-15,4,8,4],[2,2,2,2**31-1,-2**31,2**31-1,2,3,2]] + chances=['0','3ca3d70a','3f000000','3f800000','bf800000','7f800000','7fc00000'] + rules=[['ore',chance] for chance in chances] + rules += [['sequence',[['block',0],['ore','3f800000']]],['if',['not',['hole']],['ore','0']]] + for volume in volumes: + sx,sy,sz,x,y,z,dx,dy,dz=volume + positions=[[wrap(x+ix*dx),wrap(y+iy*dy),wrap(z+iz*dz)] for iz in range(sz) for ix in range(sx) for iy in range(sy)] + positions += [[wrap(x-1),y,z],[x,wrap(y-1),z],[x,y,wrap(z-1)],[wrap(x+1),wrap(y+1),wrap(z+1)]] + ops=[['apply',0,0,0]] + for i in range(180): + if iI",struct.pack(">f",value))[0]:x}' + triples=[['0','3f800000','0'],['3f800000','bf800000','3f800000'],['3f800000','0','3f800000'],['3f000000','3f000000','0'],['3f800000','3f800000','3f800000'],['7fc00000','3f800000','3f800000'],['3f800000','7fc00000','3f800000'],['3f800000','3f800000','7fc00000'],['7f800000','7f800000','0'],['7f800000','7f800000','7f800000'],['80000000','80000000','80000000']] + threshold=struct.unpack('>I',struct.pack('>f',1.8/15))[0] + triples += [[bits(1.0),f'{threshold+step:x}',bits(1.0)] for step in [-1,0,1]] + for i,triple in enumerate(triples): + for pattern in range(5): + for legacy in [False,True]: + name=sorted(biomes)[(i*5+pattern)%len(biomes)] + ops=[['badlands',17,-31,64,-64],['badlands',17,-31,64,-64],['frozen',17,-31,64,-64],['frozen',17,-31,64,-64],['frozen',-1000,3001,100,50]] + yield {'seed':-2**63 if legacy else 2**63-1,'legacy':legacy,'sea':[63,-17,127][pattern%3],'default':[3,8,3,8,4][pattern],'biome':name,'min':-64,'initial':column(pattern),'noise_bits':triple+triple,'limit':4096,'ops':ops} + for sea in [-2**31,2**31-1]: + yield {'seed':0,'legacy':False,'sea':sea,'default':3,'biome':sorted(biomes)[0],'min':-64,'initial':column(0),'noise_bits':['3f800000']*6,'limit':32,'ops':[['badlands',2**31-1,-2**31,2**31-1,-64],['frozen',2**31-1,-2**31,2**31-1,-64]]} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-material-extension-parity';build.mkdir(parents=True,exist_ok=True);report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + resources=worldgen.noise_resources(jars['server']) + if not resources or resources!=worldgen.noise_resources(jars['client']):raise ValueError('reference noise resources differ') + prefix='data/minecraft/worldgen/noise/';noises={'minecraft:'+name[len(prefix):-5]:raw for name,raw in resources.items()} + biomes=biome.biome_resources(jars['server']) + if not biomes or biomes!=biome.biome_resources(jars['client']):raise ValueError('reference biome resources differ') + for name,data in [('noises',noises),('biomes',biomes)]:(build/(name+'.json')).write_text(json.dumps(data,separators=(',',':')),encoding='utf-8') + folder=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity';oracles=[folder/(name+'.java') for name in ['VanillaMaterialExtensionOracle','VanillaBiomeTemperatureOracle']] + sources=[*oracles,Path(__file__),*[lab.ROOT/'tools'/name for name in ['test_biome_temperature_parity.py','test_worldgen_parity.py','test_rust_parity.py','lab.py']],lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/material_extension_fixture.rs'] + tested_sources=base.source_hashes(sources);fixtures=list(corpus(biomes));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(f,separators=(',',':'))+'\n' for f in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'noises.json',build/'biomes.json'];tested_fixtures=base.source_hashes(fixture_paths);classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependencies=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependencies,'-d',classes,*oracles],'compile-java') + run(['cargo','build','--release','-p','horizon-world','--example','material_extension_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True));binary=Path(metadata['target_directory'])/'release/examples'/('material_extension_fixture.exe' if os.name=='nt' else 'material_extension_fixture');run([binary,build],'rust');references=[] + for side,jar in jars.items(): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jar),dependencies]),'dev.horizonlab.parity.VanillaMaterialExtensionOracle',side,build],side) + reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt');references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched});print(f'{side}: {matched:,} material-extension output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'extension_calls':sum(len(f['ops']) for f in fixtures),'biome_resources':len(biomes),'noise_resources':len(noises),'constant_noise_fixtures':sum('noise_bits' in f for f in fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual private MaterialSystem erodedBadlandsExtension and frozenOceanExtension methods, with ordered noise-coordinate/block-read/block-write traces and complete resulting columns. Both positional random modes, actual seeded bundled noises, all biome climate settings, same-block identity across state properties, air variants, flowing water, waterlogged nonwater blocks, snow/ice thresholds, repeated calls and height clipping by supplied column providers. Constant overrides cover thresholds, signed zero, NaN/infinity, sea-level integer extremes and bounded provider read failures. Native exception class/message and full chunk/heightmap/postprocessing integration are not compared here. Rust caps extension loops to 1,048,576 iterations; oversized synthetic scans hit the fixture provider limit in both implementations. Full surface-stage and playable parity remain pending.'} + lab.write_json(report_path,report);print(f'Scoped material-extension parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_material_rule_library_parity.py b/tools/test_material_rule_library_parity.py new file mode 100644 index 000000000..b5f4dde58 --- /dev/null +++ b/tools/test_material_rule_library_parity.py @@ -0,0 +1,93 @@ +#!/usr/bin/env python3 +"""Compare bundled material-rule loading and evaluation with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +try: + from . import lab,test_rust_parity as base,test_worldgen_parity as worldgen,test_material_condition_parity as material,test_biome_temperature_parity as biome +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + import test_material_condition_parity as material + import test_biome_temperature_parity as biome + + +def codec_inputs(rules): + values=[json.loads(raw) for raw in rules.values()] + bases=[{'type':'block','result_state':'minecraft:stone'}, {'type':'sequence','sequence':[]}, {'type':'condition','if_true':{'type':'hole'},'then_run':{'type':'bandlands'}}, {'type':'ore_vein','ore_block':'minecraft:copper_ore','raw_ore_block':'minecraft:raw_copper_block','filler_block':'minecraft:granite','raw_ore_chance':0.02,'density':1,'richness':0.5,'filler_gap':-1}] + for base in bases: + values += [base,dict(base,ignored=None)] + for key in base: + missing=base.copy();del missing[key];values.append(missing) + for value in [None,[],False]:values.append(dict(base,**{key:value})) + values += [None,False,0,[],{},'minecraft:overworld',{'type':'bandlands'},{'type':'bandlands','unused':False},{'type':'condition','if_true':{'type':'hole'},'then_run':'minecraft:unknown'}, {'type':'block','result_state':{'id':'minecraft:water','properties':{'level':'+01'}}}, {'type':'block','result_state':{'id':'minecraft:oak_log','properties':{'axis':'invalid'}}}] + for chance in [-1,0,1,1.01,'0.02']: + values.append(dict(bases[-1],raw_ore_chance=chance)) + for field in ['density','richness','filler_gap']: + for value in ['minecraft:unknown',{'type':'minecraft:constant','argument':0},True,None]:values.append(dict(bases[-1],**{field:value})) + return [json.dumps(value,separators=(',',':')) for value in values] + + +def corpus(rules,biomes): + names=sorted(rules);biome_names=sorted(biomes) + for legacy in [False,True]: + for seed in [0,-1,87654321]: + for case in range(2): + ops=[] + for i,name in enumerate(biome_names): + for j,y in enumerate([-64,-48,-32,-8,-1,0,16,32,48,63,64,80,120,200,319]): + x=[0,1,-1,15,16,17,2**24+3,-2**24-3][(i+j)%8];z=(i%17)-8 + ops += [['biome',name],['input',[0,1,3,7][(i+j)%4],['0','3f000000','bf000000','3f800000'][(i+j)%4]],['xz',x,z,[-5,0,5][i%3],[-5,0,5][j%3]],['y',(j%6)+1,(i%8)+1,63 if j%2 else -2**31,y],['apply',x,y,z]] + if j%5==0:ops += [['apply',x+13,y-17,z+27]] + fixture={'seed':seed,'legacy':legacy,'context':[-64,384,63],'conditions':[],'real_noise':True,'library_rules':names,'volume':[3,4,3,0,-64,0,2,1,2] if case==0 else [4,8,2,-17,24,7,1,2,1], 'possible_biomes':None if case==0 else biome_names,'ops':ops} + if not legacy and seed==0 and case==0:fixture['library_json']=codec_inputs(rules) + yield fixture + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-material-rule-library-parity';build.mkdir(parents=True,exist_ok=True);report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + bundle={} + for field,kind in [('noises','noise'),('densities','density_function'),('rules','material_rule')]: + resources=worldgen.registry_resources(jars['server'],kind) + if not resources or resources!=worldgen.registry_resources(jars['client'],kind):raise ValueError('reference '+kind+' resources differ') + prefix='data/minecraft/worldgen/'+kind+'/' + bundle[field]={'minecraft:'+name[len(prefix):-5]:raw for name,raw in resources.items()} + for field,getter in [('conditions',material.condition_resources),('biomes',biome.biome_resources),('biome_tags',material.biome_tag_resources)]: + bundle[field]=getter(jars['server']) + if not bundle[field] or bundle[field]!=getter(jars['client']):raise ValueError('reference '+field+' resources differ') + counts={key:len(value) for key,value in bundle.items()} + bundle['rules'].update({'horizon:a_forward':'{"type":"condition","if_true":{"type":"hole"},"then_run":"horizon:z_leaf"}','horizon:z_leaf':'{"type":"block","result_state":{"id":"minecraft:oak_log","properties":{"axis":"x"}}}','horizon:empty':'{"type":"sequence","sequence":[]}','horizon:constant_ore':'{"type":"ore_vein","ore_block":"minecraft:copper_ore","raw_ore_block":"minecraft:raw_copper_block","filler_block":"minecraft:granite","raw_ore_chance":0.02,"density":1,"richness":0.5,"filler_gap":-1}'}) + for field,value in bundle.items():(build/(field+'.json')).write_text(json.dumps(value,separators=(',',':')),encoding='utf-8') + folder=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity' + oracles=[folder/(name+'.java') for name in ['VanillaMaterialConditionOracle','VanillaAnchorOracle','VanillaBiomeTemperatureOracle','VanillaBlockStateCodecOracle']] + sources=[*oracles,Path(__file__),*[lab.ROOT/'tools'/name for name in ['test_material_condition_parity.py','test_biome_temperature_parity.py','test_worldgen_parity.py','test_rust_parity.py','lab.py']],lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/material_condition_fixture.rs'] + tested_sources=base.source_hashes(sources);classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependencies=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependencies,'-d',classes,*oracles],'compile-java') + def java(side,oracle,mode,path):run(['java','-Xmx1G','-cp',os.pathsep.join([str(classes),str(jars[side]),dependencies]),'dev.horizonlab.parity.'+oracle,mode,path],side+'-'+mode) + for side in jars:java(side,'VanillaBlockStateCodecOracle','export',build/f'facts-{side}.json') + facts=json.loads((build/'facts-server.json').read_text()) + if facts!=json.loads((build/'facts-client.json').read_text()):raise ValueError('reference block metadata differs') + fixtures=list(corpus(bundle['rules'],bundle['biomes']));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(f,separators=(',',':'))+'\n' for f in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'facts-client.json',build/'facts-server.json',*[build/(field+'.json') for field in bundle]];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','material_condition_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True));binary=Path(metadata['target_directory'])/'release/examples'/('material_condition_fixture.exe' if os.name=='nt' else 'material_condition_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,'VanillaMaterialConditionOracle',side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched});print(f'{side}: {matched:,} material-rule library output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'resources':counts,'fixtures':len(fixtures),'codec_inputs':sum(len(f.get('library_json',[])) for f in fixtures),'rule_applications':sum(sum(op[0]=='apply' for op in f['ops'])*len(f['library_rules']) for f in fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'All bundled material-rule definitions loaded against authenticated condition, biome/tag, block-state, noise and density registries, then compiled/evaluated for both world random modes. Forward/nested rule holders, all five rule kinds, malformed/omitted fields and property fallback, actual seeded density/richness/gap sources, strided chunk-volume caching, scalar fallback and independent context/application positions are covered. Surface depth and secondary noise remain supplied context inputs; preliminary density is zero for isolation. All bundled biome climates are used, with unrestricted or complete possible-biome sets. Rust library definitions are immutable and atomically loaded, with typed cycle/resource-bound errors. Rule/density encoding, live reload/registry owner validation, complete surface-stage chunks and gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped material-rule library parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_material_stage_parity.py b/tools/test_material_stage_parity.py new file mode 100644 index 000000000..8fbfdac5b --- /dev/null +++ b/tools/test_material_stage_parity.py @@ -0,0 +1,146 @@ +#!/usr/bin/env python3 +"""Compare full surface-stage chunk application with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +try: + from . import lab,test_rust_parity as base,test_worldgen_parity as worldgen,test_material_condition_parity as material,test_biome_temperature_parity as biome +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + import test_material_condition_parity as material + import test_biome_temperature_parity as biome + + +def synthetic_rules(): + block=lambda name:{'type':'block','result_state':'minecraft:'+name} + conditional=lambda condition,name:{'type':'condition','if_true':condition,'then_run':block(name)} + rules={'horizon:water':block('water'),'horizon:air':block('air'),'horizon:stone':block('stone')} + rules['horizon:probe']={'type':'sequence','sequence':[ + conditional({'type':'stone_depth','offset':0,'add_surface_depth':False,'secondary_depth_range':0,'surface_type':'ceiling'},'gravel'), + conditional({'type':'steep'},'air'), + conditional({'type':'water','offset':0,'surface_depth_multiplier':1,'add_stone_depth':True},'sand'), + conditional({'type':'stone_depth','offset':1,'add_surface_depth':True,'secondary_depth_range':4,'surface_type':'floor'},'dirt'),block('stone')]} + return {name:json.dumps(value,separators=(',',':')) for name,value in rules.items()} + + +def corpus(facts,biomes,settings=None,presets=None): + defaults=facts['defaults'];all_biomes=sorted(biomes) + scenes=[('overworld','stone',['minecraft:plains'],-64,256,63),('overworld','stone',['minecraft:eroded_badlands'],-64,256,63),('overworld','stone',['minecraft:frozen_ocean'],-64,256,63),('overworld','stone',['minecraft:deep_frozen_ocean','minecraft:eroded_badlands','minecraft:desert','minecraft:grove','minecraft:sulfur_caves'],-64,256,63),('overworld','stone',all_biomes,-64,256,63),('nether','netherrack',['minecraft:basalt_deltas','minecraft:crimson_forest','minecraft:soul_sand_valley','minecraft:nether_wastes','minecraft:warped_forest'],0,128,32),('end','end_stone',['minecraft:the_end','minecraft:end_highlands'],0,128,63)] + def initial(minimum,height,sea,default,pattern): + spans=[] + for x in range(16): + for z in range(16): + top=minimum+height//2+(x*7+z*11)%27-13 + spans.append([x,minimum,z,top,default]) + if topd',float(v)).hex() + def single(v):return struct.pack('>f',float(v)).hex() + def state(mask):return dict(air=bool(mask&1),climbable=bool(mask&2),powder=bool(mask&4)) + def row(**kw): + f=dict(block=False,states=[state(0),state(0)],emission=3,flap_emission=3,movement=list(map(bits,[1.,.2,1.])),position=list(map(bits,[17.3,-63.,-32.3])),on_pos=[17,-64,-33],legacy=[17,-64,-33],ground=True,crouch=False,rails=False,swimming=False,water=False,flapping=False,sounds=True,events=True,move=single(1.),fly=single(0.),next=single(1.),mutate=False,mutated_move=single(12.5),mutated_fly=single(-3.),mutated_next=single(9.),fail=-1) + f.update(kw);return f + for old,new,flags,emission,same in itertools.product(range(8),range(8),range(64),range(4),[False,True]): + yield row(states=[state(old),state(new)],emission=emission,flap_emission=emission,legacy=[17,-64,-33] if same else [17,-65,-33],ground=bool(flags&1),crouch=bool(flags&2),rails=bool(flags&4),swimming=bool(flags&8),water=bool(flags&16),flapping=bool(flags&32)) + for st,flags,y,sounds,events in itertools.product(range(8),range(16),[-0.,.1,math.nan],[False,True],[False,True]): + yield row(block=True,states=[state(st),state(0)],movement=list(map(bits,[1,y,1])),ground=bool(flags&1),crouch=bool(flags&2),rails=bool(flags&4),swimming=bool(flags&8),sounds=sounds,events=events) + values=[-math.inf,-1e30,-1.,-0.,0.,1e-38,1e-7,.99999994,1.,1.00000012,2147483520.,2147483648.,1e30,math.inf,math.nan] + for move,next_value,y,st in itertools.product(values,values,[-0.,.1,math.nan],range(4)): + yield row(move=single(move),next=single(next_value),fly=single(move),movement=list(map(bits,[1.,y,1.])),states=[state(0),state(st)]) + # Failures before and after state writes and sound/event callbacks. + for old,new,flags,fail,mutate in itertools.product([0,1,2],[0,1,2],range(8),range(-1,27),[False,True]): + yield row(states=[state(old),state(new)],ground=bool(flags&1),water=bool(flags&2),flapping=bool(flags&4),legacy=[17,-65,-33],fail=fail,mutate=mutate) + rng=random.Random(0x454d495353494f4e) + for _ in range(12000): + yield row(block=bool(rng.randrange(2)),states=[state(rng.randrange(8)),state(rng.randrange(8))],emission=rng.randrange(4),flap_emission=rng.randrange(4),movement=[bits(rng.choice(values+[1e200,1e-200])) for _ in range(3)],ground=bool(rng.randrange(2)),crouch=bool(rng.randrange(2)),rails=bool(rng.randrange(2)),swimming=bool(rng.randrange(2)),water=bool(rng.randrange(2)),flapping=bool(rng.randrange(2)),sounds=bool(rng.randrange(2)),events=bool(rng.randrange(2)),move=single(rng.choice(values)),fly=single(rng.choice(values)),next=single(rng.choice(values)),mutate=bool(rng.randrange(2)),mutated_move=single(rng.choice(values)),mutated_fly=single(rng.choice(values)),mutated_next=single(rng.choice(values)),fail=rng.randrange(-1,23)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-movement-emission-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementEmissionOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/movement_emission_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaMovementEmissionOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','movement_emission_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('movement_emission_fixture.exe' if os.name=='nt' else 'movement_emission_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} movement-emission output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Entity movement emission, private block vibration/step dispatch, flapping dispatch and native next-step arithmetic. Compares distance accumulation, climbable/powder predicates, legacy/current support ordering, ground/crouch/rail/swimming guards, sound/event emissions, float boundaries, NaN/infinity, callback mutations and partial state on failures. Block predicates, world reads and sound callbacks are controlled; crystal sound predicate is false in this scope. Registered sound selection, audio playback, full entity movement and gameplay remain separate work.'} + lab.write_json(report_path,report);print(f'Scoped movement emission parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_movement_registry_parity.py b/tools/test_movement_registry_parity.py new file mode 100644 index 000000000..6ebca905f --- /dev/null +++ b/tools/test_movement_registry_parity.py @@ -0,0 +1,87 @@ +#!/usr/bin/env python3 +"""Compare registered movement properties, support positions and block factors with pinned vanilla.""" +import collections +import json +import os +from pathlib import Path +import platform +import subprocess +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(info): + import struct + def bits(value):return struct.pack('>d',value).hex() + defaults=info['defaults'];stone=defaults['minecraft:stone'];honey=defaults['minecraft:honey_block'];soul=defaults['minecraft:soul_sand'] + def row(state,mode,tags=0,support=[17,-64,-33],fail=-1,others=None):return dict(states=[state,*(others or [honey,soul])],mode=mode,tags=tags,position=list(map(bits,[17.3,1.5,-33.3])),cached=[17,1,-34],support=support,offset='3f000000',fail=fail) + for tag in range(3): + for state in range(info['states']): + for mode in [0,1,2,3,4,5]:yield row(state,mode,tag) + for name in ['stone','water','bubble_column','soul_sand','honey_block','slime_block','oak_fence','cobblestone_wall','oak_fence_gate','ice','packed_ice','blue_ice','bedrock','white_bed']: + for mode in range(6): + for support in [None,[17,-64,-33]]: + for fail in range(-1,4): + for first in [stone,defaults['minecraft:'+name]]: + yield row(first,mode,tag,support,fail,[defaults['minecraft:'+name],soul]) + + +def main(): + lock, jars, libraries = base.verify_artifacts() + build = lab.LOCAL/'rust-movement-registry-parity';build.mkdir(exist_ok=True) + report_path = build/'report.json';report_path.unlink(missing_ok=True) + oracle = lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementRegistryOracle.java' + helpers = [oracle.with_name(name+'.java') for name in + ['VanillaHeightmapOracle']] + sources = [oracle, *helpers, Path(__file__), lab.ROOT/'tools/test_rust_parity.py', + lab.ROOT/'tools/test_worldgen_parity.py', lab.ROOT/'tools/lab.py', + lab.ROOT/'Cargo.toml', lab.ROOT/'Cargo.lock', + lab.ROOT/'crates/horizon-world/examples/movement_registry_fixture.rs'] + for crate in ['horizon-core', 'horizon-world']: + sources += [lab.ROOT/'crates'/crate/'Cargo.toml', + *sorted((lab.ROOT/'crates'/crate/'src').rglob('*.rs'))] + tested = base.source_hashes(sources) + tags = worldgen.tag_resources(jars['server']) + if tags != worldgen.tag_resources(jars['client']):raise AssertionError('Client/server block tags differ') + lab.write_json(build/'tags.json', tags) + classes = build/'classes';classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, libraries)) + def run(command, name): + with (build/(name+'.log')).open('w') as log: + subprocess.run(list(map(str, command)), cwd=lab.ROOT, check=True, timeout=3600, + stdout=log, stderr=subprocess.STDOUT) + run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-cp', + str(jars['server'])+os.pathsep+dependencies, '-d', classes, oracle, *helpers], 'compile-java') + def java(side, mode): + run(['java', '-Xmx768M', '-cp', os.pathsep.join([str(classes), str(jars[side]), dependencies]), + 'dev.horizonlab.parity.VanillaMovementRegistryOracle', mode, build], side+'-'+mode) + java('server', 'export') + facts = json.loads((build/'registry-info.json').read_text()) + if facts['states'] != 35723:raise AssertionError('Incomplete pinned registry') + count = 0 + with (build/'inputs.txt').open('w') as output: + for fixture in corpus(facts): + output.write(json.dumps(fixture, separators=(',', ':'))+'\n');count += 1 + fixture_paths = [build/name for name in ['inputs.txt', 'registry-info.json', 'movement-properties.nbt', + 'block-registry.nbt', 'tags.json']] + fixtures = base.source_hashes(fixture_paths) + run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'movement_registry_fixture'], 'compile-rust') + metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) + binary = Path(metadata['target_directory'])/'release/examples'/('movement_registry_fixture.exe' if os.name=='nt' else 'movement_registry_fixture') + run([binary, build], 'rust');references = [] + for side, jar in jars.items(): + java(side, side) + matched = base.compare(build/(side+'.txt'), build/'rust.txt') + references.append({'side':side, 'jar_sha256':lab.digest(jar, 'sha256'), + 'output_sha256':lab.digest(build/(side+'.txt'), 'sha256'), 'matched_output_lines':matched}) + print(f'{side}: {matched:,} registered movement lines match', flush=True) + base.ensure_sources_unchanged(sources, tested);base.ensure_sources_unchanged(fixture_paths, fixtures) + report = dict(schema=1,minecraft=lock['minecraft']['version'],manifest_sha1=lock['minecraft']['manifest_sha1'],platform=platform.platform(),java=subprocess.check_output(['java','--version'],text=True).splitlines()[0],rustc=subprocess.check_output(['rustc','--version'],text=True).strip(),registry_states=facts['states'],registry_blocks=len(facts['defaults']),fixtures=count,sources_sha256=tested,fixtures_sha256=fixtures,rust_output_sha256=lab.digest(build/'rust.txt','sha256'),references=references,scope='Imports raw registered friction/speed/jump/bounce/fall-distance coefficients and fence-gate type; binds resolved fence/wall/bounce-suppression tags. Actual native getters independently verify every state. Entity support positions and jump/speed factors run every registered state with natural, empty and universal tags; additional mixed-block queries, null support and failures exercise lazy behavior. Does not establish live player travel, bounce effects or full gameplay.') + lab.write_json(report_path,report);print(f'Scoped movement registry parity passed: {report_path}',flush=True) + + +if __name__=='__main__':main() diff --git a/tools/test_movement_support_parity.py b/tools/test_movement_support_parity.py new file mode 100644 index 000000000..e055d2850 --- /dev/null +++ b/tools/test_movement_support_parity.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python3 +"""Compare support positions and Entity block movement factors with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>d',float(v)).hex() + def single(v):return struct.pack('>f',float(v)).hex() + def state(flags,jump=1,speed=1):return dict(fence=bool(flags&1),wall=bool(flags&2),gate=bool(flags&4),water=bool(flags&8),bubble=bool(flags&16),jump=single(jump),speed=single(speed)) + def row(mode=0,offset=0.2,position=(0.3,1.5,-0.3),support=(17,-64,-33),states=None,fail=-1): + return dict(mode=mode,offset=single(offset),position=list(map(bits,position)),cached=[23,75,-81],support=support,states=states or [state(0)],fail=fail) + offsets=[-float('inf'),-1,-0.0,0,1e-6,1e-5,struct.unpack('>f',bytes.fromhex('3727c5ad'))[0],0.2,0.5,0.500001,1,float('inf'),float('nan')] + coords=[-float('inf'),-2147483649,-64,-0.5,-0.0,0,0.2,0.5,0.500001,1,1.5,2147483648,float('inf'),float('nan')] + for flags in range(8): + for offset in offsets: + for y in coords: + for support in [None,[17,-64,-33]]:yield row(offset=offset,position=(y,y,-y),support=support,states=[state(flags)]) + for mode in range(1,6): + for flags in range(32): + for support in [None,[17,-64,-33]]: + for factor in [-1,-0.0,0,0.4,1,2,float('nan'),float('inf')]: + yield row(mode=mode,support=support,states=[state(flags,factor,factor),state(flags^7,.8,.6),state(0,.25,.125)]) + for mode in [0,3,4,5]: + for flags in range(32): + for fail in range(-1,14):yield row(mode=mode,states=[state(flags),state(flags^7,.8,.6),state(0,.25,.125)],fail=fail) + rng=random.Random(0x535550504f5254) + for _ in range(5000): + yield row(mode=rng.randrange(6),offset=rng.choice(offsets),position=[rng.choice(coords) for _ in range(3)],support=rng.choice([None,[17,-64,-33],[2147483647,-2147483648,2147483647]]),states=[state(rng.randrange(32),rng.choice([0,.5,1,2]),rng.choice([0,.5,1,2])) for _ in range(3)],fail=rng.choice([-1,-1,-1,0,1,2,5,8,12])) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-movement-support-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaMovementSupportOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/movement_support_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaMovementSupportOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','movement_support_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('movement_support_fixture.exe' if os.name=='nt' else 'movement_support_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} movement-support output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Entity.getOnPos(float), all three public support-position wrappers, getBlockJumpFactor and getBlockSpeedFactor. Controlled block providers vary fence/wall tags, gate type, water/bubble identities and float factors. Compares lazy query order, cached block position, support-coordinate retention, float offset widening, floor behavior, nonfinite inputs and failures. Jump queries the lower block unconditionally; speed can short-circuit. This does not establish registered movement property provisioning, LivingEntity movement efficiency, live entity storage or full gameplay.'} + lab.write_json(report_path,report);print(f'Scoped movement support parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_native_client.py b/tools/test_native_client.py new file mode 100644 index 000000000..0ddb00c03 --- /dev/null +++ b/tools/test_native_client.py @@ -0,0 +1,121 @@ +#!/usr/bin/env python3 +"""Launch the Rust development scene and check bounded GPU presentation. + +Requires prepared private resources and a desktop display (or --vscreen on +headless Linux). This is a renderer startup check, not a gameplay parity gate. +""" +import argparse +import hashlib +import json +import os +from pathlib import Path +import subprocess +import sys + +try: + from . import lab, test_rust_parity as base, test_model_baking_parity as baking +except ImportError: + import lab + import test_rust_parity as base + import test_model_baking_parity as baking + + +def resource_fingerprint(root): + files = [root / 'facts.json', root / 'model-states.json', root / 'render-definitions.json', root / 'occlusion.nbt', root / 'cached-collision.nbt', root / 'movement-properties.nbt', root / 'attributes.json', root / 'landing-definitions.json', root / 'damage-types.json', root / 'damage-tags.json', root / 'damage-catalog.json', root / 'player-float-ids.json', root / 'block-tags.json', root / 'horizon-resources.json', + *sorted(path for path in (root / 'assets').rglob('*') if path.is_file())] + digest = hashlib.sha256() + for path in files: + data = path.read_bytes() + digest.update(path.relative_to(root).as_posix().encode() + b'\0') + digest.update(len(data).to_bytes(8, 'big')); digest.update(data) + return {'files': len(files), 'sha256': digest.hexdigest()} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--vscreen', action='store_true') + parser.add_argument('--prepare', action='store_true') + args = parser.parse_args() + if args.prepare: + subprocess.run([sys.executable, str(lab.ROOT / 'tools/prepare_native_client.py'), + '--prepare'], cwd=lab.ROOT, check=True) + root = lab.LOCAL / 'horizon-client' + root.mkdir(parents=True, exist_ok=True) + report = root / 'startup-smoke.json' + report.unlink(missing_ok=True) + resources = resource_fingerprint(root / '26.3') + sources = [lab.ROOT / 'Cargo.toml', lab.ROOT / 'Cargo.lock', Path(__file__).resolve(), + lab.ROOT / 'crates/horizon-client/Cargo.toml', lab.ROOT / 'crates/horizon-assets/Cargo.toml', + *sorted((lab.ROOT / 'crates/horizon-client/src').rglob('*')), + *sorted((lab.ROOT / 'crates/horizon-assets/src').rglob('*.rs'))] + oracle = lab.ROOT / 'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaGallerySelectionOracle.java' + helper = oracle.with_name('VanillaCuboidModelOracle.java') + heightmap = oracle.with_name('VanillaHeightmapOracle.java') + sources += [oracle, helper, heightmap, lab.ROOT/'tools/test_model_baking_parity.py', lab.ROOT/'tools/test_rust_parity.py', lab.ROOT/'tools/lab.py', lab.ROOT/'tools/prepare_native_client.py'] + for crate in ['horizon-core', 'horizon-world']: + sources += [lab.ROOT/'crates'/crate/'Cargo.toml', *sorted((lab.ROOT/'crates'/crate/'src').rglob('*.rs'))] + tested_sources = { + str(path.relative_to(lab.ROOT)): lab.digest(path, 'sha256') + for path in sources + if path.is_file() + } + environment = dict(os.environ, RUSTUP_TOOLCHAIN='stable') + subprocess.run(['cargo', 'build', '--locked', '-p', 'horizon-client'], + cwd=lab.ROOT, env=environment, check=True, timeout=3600) + metadata = json.loads(subprocess.check_output( + ['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], + cwd=lab.ROOT, env=environment)) + executable = Path(metadata['target_directory']) / 'debug' / ( + 'horizon-client.exe' if os.name == 'nt' else 'horizon-client') + command = (['vscreen', 'run'] if args.vscreen else []) + [ + str(executable), '--radius', '1', '--frames', '30', + '--smoke-report', str(report), '--timeout-seconds', '60'] + with (root / 'startup-smoke.log').open('w') as log: + subprocess.run(command, cwd=lab.ROOT, env=environment, check=True, + stdout=log, stderr=subprocess.STDOUT, timeout=120) + result = json.loads(report.read_text()) + if (result.get('error') is not None or result.get('presented_frames') != 30 + or result.get('resident_chunks') != 9 or result.get('merged_quads') != 3169 + or result.get('visible_model_faces') != 5991 or result.get('culled_model_faces') != 59636 + or result.get('model_blocks') != 10919 + or result.get('model_quads') != 179 or len(result.get('model_gallery', [])) != 16 + or result.get('sprite_layers') != 18 or result.get('animated_sprites') != 1 + or not result.get('adapter') or min(result.get('window_size', [0])) <= 0): + raise RuntimeError('Incomplete native client presentation: ' + str(report)) + lock, jars, _ = base.verify_artifacts() + classes = root/'gallery-classes'; classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, [jars['client'], *baking.client_libraries()])) + native = root/'gallery-selection.json' + with (root/'gallery-selection.log').open('w') as log: + subprocess.run(['javac', '--release', str(lock['minecraft']['java_major']), '-proc:none', '-cp', dependencies, + '-d', str(classes), str(oracle), str(helper), str(heightmap)], cwd=lab.ROOT, check=True, + stdout=log, stderr=subprocess.STDOUT, timeout=3600) + subprocess.run(['java', '-Xmx512M', '-cp', str(classes)+os.pathsep+dependencies, + 'dev.horizonlab.parity.VanillaGallerySelectionOracle', str(report), str(native), str(root/'26.3')], + cwd=lab.ROOT, check=True, stdout=log, stderr=subprocess.STDOUT, timeout=3600) + native_result = json.loads(native.read_text()) + selections = native_result['gallery'] + result['native_scene_culling'] = native_result['scene'] + if len(selections) != len(result['model_gallery']): + raise RuntimeError('Incomplete native gallery selection check') + result['native_selection'] = {'matched_placements': len(selections), + 'selected_parts': sum(len(s['models']) for s in selections), + 'client_jar_sha256': lab.digest(jars['client'], 'sha256'), + 'output_sha256': lab.digest(native, 'sha256'), + 'scope': 'Actual native registry states, blockstate dispatch, tagged root baking and legacy collection using state.getSeed(position). All 16 featured placements match model names/transforms. An independently constructed native scene also matches total occupied blocks and visible/culled model faces using native parent resolution, rotated culling directions and Block.shouldRenderFace. No shader/pixel parity claim.'} + if resource_fingerprint(root / '26.3') != resources: + raise RuntimeError('Resources changed during native client verification') + result['resource_files'] = resources + result['executable_sha256'] = lab.digest(executable, 'sha256') + result['resource_manifest_sha256'] = lab.digest( + root / '26.3/horizon-resources.json', 'sha256') + actual_sources = {str(path.relative_to(lab.ROOT)): lab.digest(path, 'sha256') for path in sources if path.is_file()} + if actual_sources != tested_sources: + raise RuntimeError('Sources changed during native client verification') + result['sources'] = tested_sources + lab.write_json(report, result) + print(f'Native renderer startup passed: {report}') + + +if __name__ == '__main__': + main() diff --git a/tools/test_native_scene_collision.py b/tools/test_native_scene_collision.py new file mode 100644 index 000000000..5c0957fe4 --- /dev/null +++ b/tools/test_native_scene_collision.py @@ -0,0 +1,114 @@ +#!/usr/bin/env python3 +"""Compare the native client's actual resident-scene collision adapter with vanilla.""" +import json +import os +from pathlib import Path +import platform +import random +import struct +import subprocess +try: + from . import lab, test_rust_parity as base, test_native_client as client +except ImportError: + import lab + import test_rust_parity as base + import test_native_client as client + + +def bits(value): + return struct.pack('>d', value).hex() + + +def corpus(radius): + def row(x, y, z, delta, step=0.6, ground=True, width=0.6000000238418579, height=1.7999999523162842): + return {'min': list(map(bits, [x-width/2, y, z-width/2])), + 'max': list(map(bits, [x+width/2, y+height, z+width/2])), + 'delta': list(map(bits, delta)), 'step': struct.pack('>f', step).hex(), 'grounded': ground} + # All gallery placements, all approach axes, ledges, ceilings and embedded starts. + for index in range(16): + x, z = index % 4 * 4 - 7, index // 4 * 4 + 14 + for dx, dz in [(1, 0), (-1, 0), (0, 1), (0, -1), (1, 1), (-1, -1)]: + for y in [3.9999999, 4, 4.5, 5, 5.5, 6]: + for step in [0, 0.5, 0.6, 1, 1.5]: + yield row(x+0.5-dx, y, z+0.5-dz, (dx*1.5, -0.08, dz*1.5), step) + for dy in [-2, -0.5, -1e-8, 0, 0.5, 2]: + yield row(x+0.5, 4.25, z+0.5, (0, dy, 0)) + # Resident/unloaded boundaries, negative chunks, below/above the section and pyramid. + edges = [-16*radius-0.5, -16*radius, -16, -10, -1, 0, 1, 10, 15, 16, 16*(radius+1)] + for x in edges: + for z in edges: + for y in [-17, -1, 0, 3, 4, 10, 11, 16, 32]: + yield row(x, y, z, (1, -0.2, 0.5), ground=False) + for delta in [(0, 0, 0), (-0.0, -0.0, -0.0), (1e-200, 0, 0), (1e-8, -1e-8, 0), (12, -9, -8)]: + for ground in [True, False]: + yield row(-11, 4, 0, delta, ground=ground) + rng = random.Random(0x5343454e45 + radius) + for _ in range(3000): + yield row(rng.uniform(-20, 34), rng.uniform(-1, 14), rng.uniform(-20, 34), + [rng.uniform(-3, 3), rng.uniform(-2, 1), rng.uniform(-3, 3)], + step=rng.choice([0, 0.5, 0.6, 1, 1.5]), ground=rng.choice([True, False]), + width=rng.choice([0.2, 0.6, 1.2]), height=rng.choice([0.4, 1.5, 1.8])) + + +def main(): + lock, jars, libraries = base.verify_artifacts() + root = lab.LOCAL/'rust-native-scene-collision'; root.mkdir(exist_ok=True) + report = root/'report.json'; report.unlink(missing_ok=True) + resources = lab.LOCAL/'horizon-client'/lock['minecraft']['version'] + resources_before = client.resource_fingerprint(resources) + oracle = lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneCollisionOracle.java' + helpers = [oracle.with_name(name+'.java') for name in [ + 'VanillaRegistryCollisionScanOracle', 'VanillaHeightmapOracle', 'VanillaCollisionOracle', + 'VanillaBlockStateCodecOracle', 'VanillaSuffocationOracle', 'VanillaFaceSupportOracle']] + sources = [Path(__file__), lab.ROOT/'tools/test_native_client.py', lab.ROOT/'tools/test_rust_parity.py', + lab.ROOT/'tools/lab.py', lab.ROOT/'tools/prepare_native_client.py', oracle, *helpers, + lab.ROOT/'Cargo.toml', lab.ROOT/'Cargo.lock', + lab.ROOT/'crates/horizon-client/examples/scene_collision_probe.rs'] + for crate in ['horizon-core', 'horizon-world', 'horizon-assets', 'horizon-client']: + sources += [lab.ROOT/'crates'/crate/'Cargo.toml', *sorted((lab.ROOT/'crates'/crate/'src').rglob('*.rs'))] + tested = base.source_hashes(sources) + def run(command, name): + with (root/(name+'.log')).open('w') as log: + subprocess.run(list(map(str, command)), cwd=lab.ROOT, check=True, timeout=3600, + stdout=log, stderr=subprocess.STDOUT) + classes = root/'classes'; classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, libraries)) + run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-cp', + str(jars['server'])+os.pathsep+dependencies, '-d', classes, oracle, *helpers], 'compile-java') + run(['cargo', 'build', '--locked', '-p', 'horizon-client', '--example', 'scene_collision_probe'], 'compile-rust') + metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) + executable = Path(metadata['target_directory'])/'debug/examples'/('scene_collision_probe.exe' if os.name == 'nt' else 'scene_collision_probe') + cases = [] + for radius in [1, 2]: + build = root/str(radius); build.mkdir(exist_ok=True) + fixtures = list(corpus(radius)) + (build/'inputs.txt').write_text(''.join(json.dumps(f, separators=(',', ':'))+'\n' for f in fixtures)) + input_hash = lab.digest(build/'inputs.txt', 'sha256') + run([executable, resources, build, radius], f'rust-{radius}') + scene_hash = lab.digest(build/'scene.json', 'sha256') + references = [] + for side, jar in jars.items(): + run(['java', '-Xmx768M', '-cp', os.pathsep.join([str(classes), str(jar), dependencies]), + 'dev.horizonlab.parity.VanillaSceneCollisionOracle', side, build, resources], f'{side}-{radius}') + matched = base.compare(build/(side+'.txt'), build/'rust.txt') + if matched != len(fixtures): raise AssertionError('Incomplete collision output') + references.append({'side': side, 'jar_sha256': lab.digest(jar, 'sha256'), + 'matched_output_lines': matched, 'output_sha256': lab.digest(build/(side+'.txt'), 'sha256')}) + print(f'radius {radius}, {side}: {matched:,} scene movement/occupancy results match', flush=True) + if input_hash != lab.digest(build/'inputs.txt', 'sha256') or scene_hash != lab.digest(build/'scene.json', 'sha256'): + raise AssertionError('Scene fixtures changed during validation') + cases.append({'radius': radius, 'fixtures': len(fixtures), 'input_sha256': input_hash, 'scene_sha256': scene_hash, + 'rust_output_sha256': lab.digest(build/'rust.txt', 'sha256'), 'references': references}) + base.ensure_sources_unchanged(sources, tested) + if resources_before != client.resource_fingerprint(resources): raise AssertionError('Resources changed during validation') + lab.write_json(report, {'schema': 1, 'minecraft': lock['minecraft']['version'], + 'manifest_sha1': lock['minecraft']['manifest_sha1'], 'platform': platform.platform(), + 'rustc': subprocess.check_output(['rustc', '--version'], text=True).strip(), + 'java': subprocess.check_output(['java', '--version'], text=True).splitlines()[0], + 'sources_sha256': tested, 'resources': resources_before, 'cases': cases, + 'scope': 'Actual client Assets loader and TestWorld resident chunks feed registered collision shapes, block scanning, Entity.collide step resolution and noCollision. Native independently constructs both scene sizes and all 16 gallery states/positions; compares exact movement bits and occupancy before/after against both pinned JARs. Includes partial blocks, pyramid ledges, negative/unloaded chunk boundaries, initial overlaps, vertical/horizontal/diagonal/tiny/zero movement and step heights. Position collision contexts, absent other entities/block entities and no border are explicit scene conditions. This validates the collision adapter, not player travel, gravity, tick scheduling, fluid/entity gameplay, rendering pixels or a complete playable game.'}) + print(f'Scoped native scene collision parity passed: {report}', flush=True) + + +if __name__ == '__main__': + main() diff --git a/tools/test_native_scene_motion.py b/tools/test_native_scene_motion.py new file mode 100644 index 000000000..097393a71 --- /dev/null +++ b/tools/test_native_scene_motion.py @@ -0,0 +1,400 @@ +#!/usr/bin/env python3 +"""Compare composed stored player movement over the native client's resident scene.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import struct +import subprocess +try: + from . import lab, test_rust_parity as base, test_native_client as client +except ImportError: + import lab + import test_rust_parity as base + import test_native_client as client + +def bits(value): return struct.pack('>d', value).hex() +def single(value): return struct.pack('>f', value).hex() +def vec(values): return list(map(bits, values)) +def op(mode, value=None, **extra): return dict(mode=mode, value=value, **extra) + +def attribute_corpus(controlled): + def tick(keys=0): + return op('controlled_tick',keys) if controlled else op('simulation_tick',vec((0,0,.98 if keys&1 else 0)),jumping=bool(keys&16)) + def attr(name,value):return op('attribute',bits(value),name='minecraft:'+name) + # Limits stay pending until explicit refresh or the simulation's post-move + # phase. Repeated callbacks must clear updates but preserve sync membership. + for name in ['max_health','max_absorption','scale','waypoint_receive_range','waypoint_transmit_range']: + for value in [-float('inf'),-1,-0.,0.,.125,.5,1,2,4,20,float('inf'),float('nan')]: + ops=[attr('max_absorption',20),op('absorption',single(15)),op('refresh_attributes'), + attr(name,value),op('refresh_attributes'),op('refresh_attributes'),attr(name,1),tick(),tick(),op('refresh_attributes')] + yield dict(position=vec((25.5,4,25.5)),ops=ops) + rng=random.Random(0x41545452) + names=['max_health','max_absorption','scale','waypoint_receive_range','waypoint_transmit_range'] + for _ in range(100): + ops=[] + for cycle in range(4): + ops += [attr('max_health',40),op('health',single(35)),attr('max_absorption',20),op('absorption',single(15))] + rng.shuffle(names) + for name in names:ops.append(attr(name,rng.choice([0,.5,1,2,4]))) + ops += [tick(rng.choice([0,1,33,49,65])),tick(),op('refresh_attributes')] + yield dict(position=vec((25.5,4,25.5)),ops=ops) + # Modifier changes feed the same callbacks; rebuilding dimensions must use + # the computed value without replacing or clearing active modifiers. + for name in ['scale','max_health','max_absorption']: + for operation in range(3): + for permanent in [False,True]: + ops=[attr('max_absorption',20),op('absorption',single(15)),op('refresh_attributes'), + op('modifier',bits(-.5),name='minecraft:'+name,id='horizon:fixture',operation=operation,permanent=permanent), + tick(),op('refresh_attributes'),tick(1),tick(0)] + yield dict(position=vec((25.5,4,25.5)),ops=ops) + # Walk through a low tunnel, release Shift inside, then leave it; force a + # one-block passage by replacing the roof around a crouched player. + for roof,properties in [('stone_slab',{'type':'top'}),('stone',{})]: + for scale in [.5,1,1.25]: + for pose in ['STANDING','CROUCHING','SWIMMING']: + blocks=[(x,5,z) for x in range(24,27) for z in range(24,30)] + ops=[attr('scale',scale),op('refresh_attributes'),op('pose',pose)] + ops += [op('block',name='minecraft:'+roof,position=list(p),properties=properties) for p in blocks] + for i in range(140): + keys=33 if i<30 else 1 if i<110 else 0 + if i==60:ops.append(attr('scale',1)) + if not controlled:ops.append(op('shift',bool(keys&32))) + ops.append(tick(keys)) + ops += [op('block',name='minecraft:air',position=list(p)) for p in blocks] + yield dict(position=vec((25.5,4,25.5)),ops=ops) + +def pose_corpus(controlled): + def ticks(keys, count): + if controlled: + return [op('controlled_tick', keys) for _ in range(count)] + return [op('shift', bool(keys & 32))] + [op('simulation_tick',vec((.98 if keys & 4 else 0,0,.98 if keys & 1 else 0)),jumping=bool(keys & 16)) for _ in range(count)] + # The actor starts on ordinary resident ground. Change the ceiling in place + # to exercise all fit fallbacks, including a space too small to change pose. + for scale in [.5,1,1.25,2]: + for sneak in [0,.3,.5,1]: + ops=[op('attribute',bits(scale),name='minecraft:scale'),op('refresh_dimensions'), + op('attribute',bits(sneak),name='minecraft:sneaking_speed')] + for ceiling,props,y in [('air',{},5),('stone_slab',{'type':'top'},5),('stone',{},5),('stone',{},4)]: + ops += [op('block',name='minecraft:'+ceiling,position=[25,y,25],properties=props),op('pose_tick')] + ops += ticks(32,3)+ticks(0,3) + ops += [op('block',name='minecraft:air',position=[25,y,25]),op('pose_tick')] + for pose in ['CROUCHING','SWIMMING','STANDING']: + ops += [op('pose',pose)]+ticks(0,2) + yield dict(position=vec((25.5,4,25.5)),ops=ops) + # Finite-scene edges are open air: axis/diagonal backoff, step-height + # thresholds, falling grace, key release, sprint and jump combinations. + for start in [(30.9,4,30.9),(30.9,4.3,30.9),(30.9,4.6,30.9),(-15.9,4,-15.9)]: + for step in [0,.5,.6,1.5]: + for yaw in [0,45,180,225]: + ops=[op('attribute',bits(step),name='minecraft:step_height'),op('yaw',single(yaw))] + ops += ticks(33,35)+ticks(37,15)+ticks(97,10)+ticks(49,10)+ticks(1,15)+ticks(0,5) + yield dict(position=vec(start),ops=ops) + for material in ['stone','slime_block','honey_block','hay_block','farmland','turtle_egg']: + for shift in [0,32]: + ops=[op('block',name='minecraft:'+material,position=[25,3,25])]+ticks(shift,80) + ops += [op('block',name='minecraft:stone',position=[25,3,25])] + yield dict(position=vec((25.5,10,25.5)),ops=ops) + for start in [(1.5,4,22.5),(-7.5,4,22.5),(25.5,4,25.5)]: + ops=ticks(33,10)+ticks(32,10)+ticks(0,10)+ticks(49,10)+ticks(0,10) + yield dict(position=vec(start),ops=ops) + +def corpus(): + yield from attribute_corpus(False) + yield from pose_corpus(False) + def food(level=20,saturation=5,exhaustion=0,timer=0): + return op('food',food=level,saturation=single(saturation),exhaustion=single(exhaustion),timer=timer) + # Actual ServerPlayer.checkMovementStatistics with all query contexts. These + # overrides apply only to direct statistics calls, never to resident physics. + for flags in range(512): + for invulnerable in [False,True]: + ops=[food(exhaustion=-0.)] + for delta in [(0,0,0),(-0.,-0.,-0.),(.005,.005,0),(.125,.75,-.25),(1,2,3)]: + ops.append(op('statistics_context',vec(delta),flags=flags,invulnerable=invulnerable)) + ops.append(op('food_tick')) + yield dict(position=vec((25,4,25)),ops=ops) + values=[-float('inf'),-1e30,-1,-.005,-0.,0.,1e-300,.004999999999999999,.005,.005000000000000001, + .25499999999999995,.255,.25500000000000006,1,65536,167772.155,21474836.475,21474836.48, + 42949672.96,92233720368547760.,1e30,float('inf'),float('nan')] + for flags in [0,2,4,8,16,32,96,160,256]: + for value in values: + for axis in range(3): + delta=[0.,0.,0.];delta[axis]=value + ops=[food(exhaustion=-0.),op('statistics_context',vec(delta),flags=flags,invulnerable=False),op('food_tick')] + yield dict(position=vec((25,4,25)),ops=ops) + rng=random.Random(0x53544154) + for _ in range(1000): + flags=rng.choice([0,2,4,8,16,32,96,160,256]) + delta=[rng.uniform(-1e5,1e5) if rng.randrange(2) else rng.choice(values) for _ in range(3)] + yield dict(position=vec((25,4,25)),ops=[food(exhaustion=rng.choice([0,4,39.99,float('nan')])), + op('statistics_context',vec(delta),flags=flags,invulnerable=rng.choice([False,True]))]) + for sprint in [False,True]: + for level in [0,6,7,18,20]: + for health in [10,20]: + ops=[op('sprint',sprint),food(level),op('health',single(health))] + for i in range(360): + if i%20==0:ops.append(op('yaw',single(0 if (i//20)%2==0 else 180))) + ops.append(op('simulation_tick',vec((0,0,.98)),jumping=100<=i<160)) + yield dict(position=vec((12,4,0)),ops=ops) + # Direct dry statistics queries still use actual registry-backed climbing. + for start in [(25,4,25),(1,4,22),(-7,4,22),(25,8,25)]: + for sprint in [False,True]: + yield dict(position=vec(start),ops=[op('sprint',sprint),op('move',vec((0,-.1,0))), + *[op('movement_statistics',vec(delta)) for delta in [(0,0,0),(0,.004,0),(0,.5,0),(.01,0,0),(.5,0,.5),(0,-1,0)]]]) + # Hunger, healing and registered starvation share the exact resident state. + for difficulty in range(4): + for regenerate in [False,True]: + for level,saturation in [(20,5),(20,0),(19,0),(18,0),(17,0),(0,0)]: + for health in [1,9,10,11,19,20]: + ops=[op('rules',difficulty=difficulty,regenerate=regenerate),food(level,saturation),op('health',single(health))] + ops += [op('clock') if i%2==0 else op('food_tick') for i in range(340)] + yield dict(position=vec((25,4,25)),ops=ops) + for difficulty in range(4): + for absorption in [0,1,4]: + for health in [0,1,2,10,11,20]: + ops=[op('rules',difficulty=difficulty,regenerate=False),op('attribute',bits(20),name='minecraft:max_absorption'), + op('absorption',single(absorption)),food(0,0,timer=79),op('health',single(health)),op('food_tick'),op('food_tick')] + yield dict(position=vec((25,4,25)),ops=ops) + for exhaustion in [0,4,4.000000476837158,5,40,float('inf'),float('nan')]: + for saturation in [-1,-0.,0.,.5,1,5,float('nan')]: + for timer in [-2147483648,-1,0,8,9,78,79,2147483647]: + yield dict(position=vec((25,4,25)),ops=[op('health',single(10)),food(20,saturation,exhaustion,timer), + op('food_tick'),op('food_tick'),op('exhaust',single(5)),op('eat',single(.6),nutrition=4),op('food_tick')]) + for count in [-2147483648,-20,-10,-1,0,1,9,10,19,20,21,2147483647]: + for health in [0,10,20]: + for saturation in [0,19,19.5,20,float('nan')]: + yield dict(position=vec((25,4,25)),ops=[op('rules',difficulty=0,regenerate=True),op('tick_count',count), + op('health',single(health)),food(19,saturation),op('peaceful'),op('clock'),op('peaceful')]) + for difficulty in range(4): + for regenerate in [False,True]: + ops=[op('rules',difficulty=difficulty,regenerate=regenerate)] + ops += [op('simulation_tick',vec((0,0,0)),jumping=80<=i<110) for i in range(200)] + yield dict(position=vec((25,18,25)),ops=ops) + for difficulty in range(4): + ops=[op('rules',difficulty=difficulty,regenerate=False),food(0,0),op('health',single(3))] + ops += [op('simulation_tick',vec((0,0,.98 if i<60 else 0)),jumping=i%30<15) for i in range(330)] + yield dict(position=vec((25,4,25)),ops=ops) + for timer in [8,9,78,79]: + for maximum in [5,20,40]: + ops=[op('attribute',bits(maximum),name='minecraft:max_health'),op('health',single(4)),food(20,5,0,timer)] + for regenerate in [True,False,True,True]: + ops += [op('rules',difficulty=2,regenerate=regenerate),op('food_tick')] + ops += [food(0,0,0,79),op('rules',difficulty=3,regenerate=False),op('food_tick'),op('rules',difficulty=0,regenerate=True),op('simulation_tick',vec((0,0,0)),jumping=False)] + yield dict(position=vec((25,4,25)),ops=ops) + # Real repeated server damage, with explicit clock advancement between hits. + # Clock operations set up elapsed-time state; the enclosing native ticks are + # not executed by this scene harness. + for source in ['fall','stalagmite']: + for absorption in [0,1,4,20]: + for maximum in [1,20,40]: + for gap in [0,1,9,10,11,19,20,21]: + ops=[op('attribute',bits(maximum),name='minecraft:max_health'),op('health',single(maximum)), + op('attribute',bits(20),name='minecraft:max_absorption'),op('absorption',single(absorption))] + for amount in [2,2,1,4,8,25]: + ops.append(op('hurt',single(amount),name='minecraft:'+source)) + ops += [op('clock') for _ in range(gap)] + ops += [op('player_tick',vec((0,0,.98)),jumping=True),op('health',single(20)), + op('hurt',single(1),name='minecraft:'+source)] + yield dict(position=vec((25,4,25)),ops=ops) + for source in ['fall','stalagmite']: + for armor in [0,5,20,30]: + for toughness in [0,8,20]: + for amount in [-1,-0.,0.,1e-30,.1,5,20,1e30,float('inf'),float('nan')]: + ops=[op('attribute',bits(armor),name='minecraft:armor'),op('attribute',bits(toughness),name='minecraft:armor_toughness'), + op('attribute',bits(100),name='minecraft:max_health'),op('health',single(100)), + op('hurt',single(amount),name='minecraft:'+source),op('hurt',single(5),name='minecraft:'+source)] + yield dict(position=vec((25,4,25)),ops=ops) + for name,properties in [('pointed_dripstone',{'vertical_direction':'up','thickness':'tip'}),('turtle_egg',{'eggs':'4','hatch':'2'})]: + for seed in range(8): + yield dict(position=vec((25.5,4,25.5)),ops=[op('seed',seed),op('block',name='minecraft:'+name,position=[25,3,25],properties=properties), + *[v for _ in range(8) for v in [op('fall',bits(8)),op('landing',bits(-.1),ground=True,position=[25,3,25])]], + op('block',name='minecraft:stone',position=[25,3,25])]) + for safe in [0,1,3,6,20]: + for multiplier in [0,.5,1,2]: + for impact in [None,3,4,4.1,7,18]: + ops=[op('attribute',bits(safe),name='minecraft:safe_fall_distance'),op('attribute',bits(multiplier),name='minecraft:fall_damage_multiplier'), + op('impulse',None if impact is None else vec((25.5,impact,25.5)),ignore=True),op('fall',bits(12)), + op('landing',bits(-.125),ground=True,position=[25,3,25])] + yield dict(position=vec((25.5,4,25.5)),ops=ops) + for name in ['stone','hay_block','honey_block','slime_block','powder_snow','pointed_dripstone','farmland','turtle_egg','shelf_mushroom']: + for seed in range(4): + for distance in [0,.25,2,2.999999,3,3.000001,4,7,20]: + ops=[op('seed',seed),op('block',name='minecraft:'+name,position=[25,3,25]),op('fall',bits(distance)), + op('landing',bits(-.125),ground=True,position=[25,3,25]),op('landing',bits(0),ground=True,position=[25,3,25]), + op('block',name='minecraft:stone',position=[25,3,25])] + yield dict(position=vec((25.5,3.9375 if name=='farmland' else 4,25.5)),ops=ops) + for name in ['stone','hay_block','honey_block','slime_block','farmland','turtle_egg']: + for height in [4,5,7,8,11,18,40]: + ops=[op('block',name='minecraft:'+name,position=[25,3,25])] + ops += [op('player_tick',vec((0,0,0)),jumping=False) for _ in range(100)] + ops.append(op('block',name='minecraft:stone',position=[25,3,25])) + yield dict(position=vec((25.5,height,25.5)),ops=ops) + for start in [(25,4,25),(25,18,25),(-11,4,0),(-7,5,14),(0,18,0)]: + for yaw in [0,45,90,-135,180]: + for trigger in [-1,0,1,7]: + ops=[op('yaw',single(yaw)),op('trigger',trigger)] + for i in range(180): + if i in [20,80]:ops.append(op('sprint',i==20)) + if i==120:ops.append(op('attribute',bits(.2),name='minecraft:movement_speed')) + ops.append(op('player_tick',vec((.7071067690849304 if i<45 else 0,0,.7071067690849304 if i<45 else .98 if i<90 else 0)),jumping=(10<=i<60 or 120<=i<150))) + yield dict(position=vec(start),ops=ops) + for permanent in [False,True]: + for operation in range(3): + for value in [-.05,0,.2]: + yield dict(position=vec((25,4,25)),ops=[ + op('modifier',bits(value),name='minecraft:movement_speed',id='minecraft:powder_snow',operation=operation,permanent=permanent), + op('sprint',True),op('ack_attributes'),op('tick',vec((0,0,1))), + op('ack_attributes'),op('tick',vec((0,0,1))),op('sprint',False),op('tick',vec((0,0,1)))]) + # Native LivingEntity.aiStep drives repeated held/released jumps and the + # player-specific horizontal velocity threshold, including delay boundaries. + for start in [(25,4,25),(-11,4,0),(-7,4,26),(0,18,0)]: + for delay in [-1,0,1,9,10,11]: + ops=[op('speed',single(.1)),op('delay',delay),op('jumping',True)] + for i in range(180): + if i in [35,120]:ops.append(op('jumping',False)) + if i in [36,140]:ops.append(op('jumping',True)) + ops.append(op('tick',vec((.5 if i<90 else 0,0,0)))) + yield dict(position=vec(start),ops=ops) + for x in [0,-0.0,.002,.0021213203435596424,.0029999999999999996,.003,.004]: + for z in [0,.002,.003,-.002]: + for y in [-.003,-.0029999999999999996,-0.0,0,.0029999999999999996,.003]: + yield dict(position=vec((25,12,25)),ops=[op('velocity',vec((x,y,z))),op('tick',vec((0,0,0))),op('tick',vec((0,0,0)))]) + for start in [(25,18,25),(0,18,0),(-15.9,4,-15.9),(-11,4,0),(5,4,14),(-7,4,26)]: + for yaw in [0,45,90,180,-135]: + for sprint in [False,True]: + ops=[op('speed',single(.1)),op('yaw',single(yaw)),op('sprint',sprint)] + for i in range(120): + if i in [15,45,80]:ops.append(op('jump')) + ops.append(op('travel',vec((.98 if 35<=i<65 else 0,0,.98 if i<95 else 0)))) + yield dict(position=vec(start),ops=ops) + for index in range(16): + x,z=index%4*4-7,index//4*4+14 + for dx,dz in [(1,0),(-1,0),(0,1),(0,-1)]: + for y in [4,4.5,6]: + ops=[op('speed',single(.1)),op('velocity',vec((dx*.2,-.1,dz*.2))),op('fall',bits(4)),op('jumping',True)] + for i in range(48): + if i==20:ops.append(op('jump')) + ops.append(op('travel',vec((dx*.5,0,dz*.5)))) + yield dict(position=vec((x+.5-dx,y,z+.5-dz)),ops=ops) + for attribute,values in { + 'gravity':[0,.01,.08,.2,1], 'friction_modifier':[0,.5,1,2], 'air_drag_modifier':[0,.5,1,2], + 'bounciness':[0,.25,1], 'jump_strength':[0,.1,.42,1.5], 'step_height':[0,.5,.6,1,1.5], + 'movement_efficiency':[0,.5,1], + }.items(): + for value in values: + for start in [(25,8,25),(-11,4,0),(-7.5,5,14.5)]: + ops=[op('attribute',bits(value),name='minecraft:'+attribute),op('speed',single(.1)),op('fall',bits(3))] + for i in range(100): + if i in [10,40]:ops.append(op('jump')) + ops.append(op('travel',vec((.98,0,0)))) + yield dict(position=vec(start),ops=ops) + rng=random.Random(0x4d4f54494f4e) + for _ in range(300): + start=(rng.uniform(-17,30),rng.uniform(3,15),rng.uniform(-17,30)) + ops=[op('speed',single(rng.choice([0,.1,.13,.2])))] + for _ in range(50): + choice=rng.randrange(12) + if choice==0:ops.append(op('jump')) + elif choice==1:ops.append(op('sprint',rng.choice([True,False]))) + elif choice==2:ops.append(op('yaw',single(rng.uniform(-720,720)))) + elif choice==3:ops.append(op('velocity',vec([rng.uniform(-1,1),rng.uniform(-1,1),rng.uniform(-1,1)]))) + elif choice==4:ops.append(op('stuck',vec(rng.choice([(0,0,0),(.25,.05,.25),(.9,1.5,.9)])))) + else:ops.append(op('travel',vec((rng.choice([-1,0,.98]),0,rng.choice([-1,0,.98]))))) + yield dict(position=vec(start),ops=ops) + # Long histories exercise the native bounded movement-record retention. + yield dict(position=vec((25,4,25)),ops=[op('speed',single(.1))]+[op('travel',vec((0,0,0))) for _ in range(400)]) + +def sprint_corpus(): + yield from attribute_corpus(True) + yield from pose_corpus(True) + for level in [0,6,7,8,20]: + for health in [10,20]: + for start in [(12,4,0),(25,18,25)]: + ops=[op('food',food=level,saturation=single(0),exhaustion=single(0),timer=0),op('health',single(health))] + for i in range(400): + if i%20==0:ops.append(op('yaw',single(0 if i//20%2==0 else 180))) + keys=65 if i<20 or i>=160 else 0 if i in [80,81,83,120,121,122] else 1 + if 200<=i<250:keys|=16 + ops.append(op('controlled_tick',keys)) + yield dict(position=vec(start),ops=ops) + for keys in range(128): + for level in [6,7,20]: + ops=[op('food',food=level,saturation=single(0),exhaustion=single(3.99),timer=0)] + ops += [op('controlled_tick',k) for k in [keys,keys,0,1,0,1,65,1,0]] + yield dict(position=vec((12,4,0)),ops=ops) + for wall in ['stone','slime_block','honey_block']: + ops=[op('block',name='minecraft:'+wall,position=[12,4,3])] + for i in range(140): + if i==70:ops.append(op('yaw',single(180))) + ops.append(op('controlled_tick',65)) + ops.append(op('block',name='minecraft:air',position=[12,4,3])) + yield dict(position=vec((12.5,4,0)),ops=ops) + for gap in range(12): + seq=[0,1,0]+[0]*gap+[1]*12+[0]*3+[65]*20+[1]*12+[0] + yield dict(position=vec((12,4,0)),ops=[op('controlled_tick',k) for k in seq]) + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--sprint-input',action='store_true');args=parser.parse_args() + lock,jars,libraries=base.verify_artifacts() + if args.sprint_input: + try:from . import test_model_baking_parity as baking + except ImportError:import test_model_baking_parity as baking + libraries=baking.client_libraries();jars={'client':jars['client']} + build=lab.LOCAL/('rust-native-sprint-scene' if args.sprint_input else 'rust-native-scene-motion');build.mkdir(exist_ok=True) + report=build/'report.json';report.unlink(missing_ok=True) + resources=lab.LOCAL/'horizon-client'/lock['minecraft']['version'] + resource_hash=client.resource_fingerprint(resources) + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSceneMotionOracle.java' + helpers=[oracle.with_name(name+'.java') for name in ['VanillaSceneCollisionOracle','VanillaRegistryCollisionScanOracle', + 'VanillaHeightmapOracle','VanillaCollisionOracle','VanillaBlockStateCodecOracle','VanillaSuffocationOracle', + 'VanillaFaceSupportOracle','VanillaEntityAttributeOracle','VanillaBlockLandingOracle','VanillaMovementRegistryOracle','VanillaDamageSourceOracle']] + if args.sprint_input:helpers.append(oracle.with_name('VanillaSprintInputOracle.java')) + sources=[Path(__file__),lab.ROOT/'tools/test_native_client.py',lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py', + lab.ROOT/'tools/prepare_native_client.py',oracle,*helpers,lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock', + lab.ROOT/'crates/horizon-client/examples/scene_motion_probe.rs'] + for crate in ['horizon-core','horizon-world','horizon-assets','horizon-client']: + sources += [lab.ROOT/'crates'/crate/'Cargo.toml',*sorted((lab.ROOT/'crates'/crate/'src').rglob('*.rs'))] + if args.sprint_input:sources.append(lab.ROOT/'tools/test_model_baking_parity.py') + tested=base.source_hashes(sources) + def run(command,name): + with (build/(name+'.log')).open('w') as log: + subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + classes=build/'classes';classes.mkdir(exist_ok=True) + dependencies=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars.get('server',jars['client']))+os.pathsep+dependencies, + '-d',classes,oracle,*helpers],'compile-java') + fixtures=list(sprint_corpus() if args.sprint_input else corpus());operations=sum(len(f['ops']) for f in fixtures);expected_lines=7*operations+len(fixtures) + (build/'inputs.txt').write_text(''.join(json.dumps(f,separators=(',',':'))+'\n' for f in fixtures)) + input_hash=lab.digest(build/'inputs.txt','sha256') + damage_dir=build/'damage';damage_dir.mkdir(exist_ok=True) + for target, source in [('types.json','damage-types.json'),('tags.json','damage-tags.json')]: + (damage_dir/target).write_bytes((resources/source).read_bytes()) + run(['cargo','build','--locked','-p','horizon-client','--example','scene_motion_probe'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT)) + binary=Path(metadata['target_directory'])/'debug/examples'/('scene_motion_probe.exe' if os.name=='nt' else 'scene_motion_probe') + run([binary,resources,build,'--describe'],'describe') + references=[] + for side,jar in jars.items(): + run(['java','-Xmx768M','-cp',os.pathsep.join([str(classes),str(jar),dependencies]), + 'dev.horizonlab.parity.VanillaSceneMotionOracle',side,build,resources],side) + replay_hash=lab.digest(build/('inputs-'+side+'.txt'),'sha256') + run([binary,resources,build,side],'rust-'+side) + if replay_hash!=lab.digest(build/('inputs-'+side+'.txt'),'sha256'):raise AssertionError('Identity replay changed') + matched=base.compare(build/(side+'.txt'),build/('rust-'+side+'.txt')) + if matched!=expected_lines:raise AssertionError('Incomplete motion output') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(build/(side+'.txt'),'sha256'),'matched_output_lines':matched,'identity_input_sha256':replay_hash,'rust_output_sha256':lab.digest(build/('rust-'+side+'.txt'),'sha256')}) + print(f'{side}: {matched:,} evolving scene motion states match',flush=True) + base.ensure_sources_unchanged(sources,tested) + if resource_hash!=client.resource_fingerprint(resources) or input_hash!=lab.digest(build/'inputs.txt','sha256'): + raise AssertionError('Motion inputs changed during verification') + lab.write_json(report,{'schema':2,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'], + 'platform':platform.platform(),'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(), + 'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'fixtures':len(fixtures), + 'operations':operations,'sources_sha256':tested,'resources':resource_hash,'input_sha256':input_hash, + 'references':references, + 'scope':('Client sprint scene executes the real LocalPlayer.aiStep prefix through sprint decisions, stopping at the riding/parent movement boundary, followed by real LocalPlayer.modifyInput and the native server actor simulation. Sprint setters dispatch to that server actor, sharing its actual FoodData and collision conditions. Compares local sprint timer/input history and actual attribute changes, movement, distance exhaustion and hunger. Actual local crouch selection precedes new keyboard input; slowdown, sprint eligibility and pose-dependent dimensions share resident state. No effects, equipment, vehicles or fluid physics. Full client/server tick and networking remain unfinished. ' if args.sprint_input else '')+'Stored PlayerMotion binds resident client chunks and registered attributes/coefficients to air travel, jumping, Entity.move, step resolution, ground/support updates, restitution and speed factors. Repeated native Player.travel/jump/move and actual Player.aiStep / direct LivingEntity.aiStep compare position, velocity, bounds, collision/ground flags, support, climb state, fall-reset field, both sync flags, speed, head yaw, jump trigger and jump delay by exact bits. Prepared-local-input Player.aiStep paths verify the stored speed refresh after movement, with empty inventory and no nearby entities. Travel uses the actual Player.getSpeed movement-attribute query, independently of that stored base-living speed field; both getter and setter execute native bodies. Dry aiStep includes small-velocity cleanup, input damping, held/released jump timing and server frost-modifier removal. Snapshots also compare all allocated attribute instances, base/cache/dirty state, modifier values/operations/permanence and pending update/sync membership. Per-reference JVM holder/instance hashes are replayed so pending callback order and resulting ordered events also match. Dry resident scene with standing, crouching and crawling bounds, cached eye height, native pose-fit selection and ledge backoff; zero frozen ticks, empty equipment, no interpolation, fluids, vehicles, effects or other entities. The oracle controls pose storage and invokes actual native refreshDimensions on changes; full synchronized pose schema and network notifications remain separate. Actual pending attribute refresh runs after player movement and before pose selection in simulation operations, clamping health/absorption and rebuilding scale-dependent dimensions. Native ServerPlayer waypoint-receive and inherited transmit callbacks are compared as ordered requests; the waypoint manager and its network delivery remain controlled consumers. Direct refresh operations and the full enclosing tick remain separate boundaries. Actual LivingEntity.checkFallDamage, registered Block.fallOn/bounceOn and Player/LivingEntity.causeFallDamage are composed, including float-narrowed fall-distance accumulation, reset, last-climb clearing, safe-fall and damage-multiplier attributes, impulse exemptions and ordered landing particle/sound/statistic/hit-ground/damage requests. Farmland pushes the stored player and replaces actual chunk state; repeated turtle-egg changes preserve hatch. Block state at the landing fixture is compared after every operation. World RNG is a seeded native legacy stream. Actual ServerPlayer/Player/LivingEntity hurt dispatch now updates native synchronized health and player absorption, modified armor/toughness reduction, exhaustion, damage cooldown/last-source state and velocity synchronization. Native health storage and dirty flags are compared after every operation. Damage sources use actual decoded/tagged pinned damage registries. ServerPlayer jump statistics and exhaustion are included; dead-or-dying state disables movement input and jumping. Empty equipment/hands/effects, configurable difficulty and natural regeneration, damage gamerules enabled, loaded client and no spawn-extra fall particles define this scene domain. Ordered health/statistic/combat-record/broadcast/sound/criterion/death requests are compared; criterion argument payloads retain the separate combat gate. Actual health changes are applied, but audiovisual playback, persistent statistics, combat tracker internals, full death/drop/respawn services, block neighbor/drop/block-entity callbacks, movement emission, block-inside and networking remain controlled consumers. Actual FoodData.tick and ServerPlayer.tickRegeneration now share the same stored health, attributes, exhaustion and registered starvation damage. Snapshots compare food level, saturation, exhaustion, timer and tick count. Cases cover all four difficulties, regeneration rule changes, absorption during starvation, Peaceful recovery, timer overflow and nonfinite food values. Simulation operations compose clock setup, actual player movement and actual food ticking in their native order, including fall damage followed by regeneration in the same tick. Explicit clock operations establish cooldown/hurt-time/game-time/tick-count state; full enclosing native tick/doTick methods are not invoked by those setup operations. Input preparation has its own client comparison. ServerPlayer.checkMovementStatistics executes on accepted resident deltas after movement and before food ticking. Additional direct method fixtures cover all 512 overlapping passenger/swim/eye-water/water/climb/ground/sprint/crouch/glide flag combinations, invulnerable abilities, centimeter rounding, overflow, signed zero and nonfinite deltas. Those query contexts apply only to the statistics method; fluid/vehicle/glide physics remain unbound. ServerGamePacketListener packet acceptance/rejection and scheduling are not executed. No full Player.tick, consumable item-use lifecycle, local input lifecycle, nonempty inventory/equipment ticks, full freezing, complete death lifecycle or full gameplay parity claim.'}) + print(f'Scoped scene motion parity passed: {report}',flush=True) + +if __name__=='__main__':main() diff --git a/tools/test_neighbor_spread_parity.py b/tools/test_neighbor_spread_parity.py new file mode 100644 index 000000000..2d6295a41 --- /dev/null +++ b/tools/test_neighbor_spread_parity.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python3 +"""Compare origin placement and exactly-one-neighbor spread behavior.""" +import itertools +import json +try: + from . import test_simple_block_parity as harness +except ImportError: + import test_simple_block_parity as harness + + +def corpus(facts,placement): + states=facts['states'];get=lambda name:facts['defaults']['minecraft:'+name] + directions=[(0,-1,0),(0,1,0),(0,0,-1),(0,0,1),(-1,0,0),(1,0,0)] + def spread(block=None,**extra): + value={'type':'random_neighbor_spread','block':block if block is not None else {'id':'stone'},'accepted_neighbors':'stone','can_replace':{'type':'true'},'attempts':1,'xz_offset':0,'y_offset':0};value.update(extra);return value + def case(definition,**extra): + value={'definition':json.dumps(definition,separators=(',',':')),'mode':'feature','origin':[0,64,0],'legacy':False,'seed':0,'world_seed':1,'fail':-1,'reject':0,'brightness':15,'fallback':get('air'),'states':[],'repeats':2};value.update(extra);return value + for state in states:yield case(spread(state)) + for mask,attempts,fail,reject in itertools.product(range(64),[1,2,3],[-1,*range(9)],[0,1,3]): + initial=[[x,64+y,z,get('stone') if mask&(1<d", value).hex() + + +def numbers(values): + return " ".join(map(number, values)) + + +def corpus(): + rng = random.Random(0x484f52495a4f4e4e4f495345) + half = math.nextafter(2**24, 0) + specials = [0.0, -0.0, 1.0, -1.0, .5, -.5, 1e-7, -1e-7, + float.fromhex("0x0.0000000000001p-1022"), 1e-200, -1e-200, + 2**24, -(2**24), half, -half, math.nextafter(half, 0), + math.nextafter(-half, -math.inf), 2**25, -(2**25), + 2147483647.0, -2147483648.0, 1e100, -1e100, + float("inf"), float("-inf"), float("nan")] + for value in specials: + yield "wrap " + number(value) + for _ in range(12000): + yield "wrap " + (f"{rng.getrandbits(64):016x}" if rng.randrange(2) else number(rng.uniform(-1e10, 1e10))) + seeds = [-(2**63), -1, 0, 1, 2**63 - 1, *[rng.randrange(-2**63, 2**63) for _ in range(19)]] + scales = [0.0, -0.0, .001, .125, .5, 1.0, 4.0, -.125, -4.0, 1e-200, 1e200, math.inf, -math.inf, math.nan] + derivative_edges = ["00000000", "80000000", "3f800000", "bf800000", "7f800000", "ff800000", "7fc00000", "00000001", "7f7fffff"] + sampler_id = 0 + valid_bases = [] + invalid_ranges = [] + for stream, (kind, skip), scenario in itertools.product(["legacy", "xoroshiro"], [("perlin", 0), ("simplex", 0), ("simplex", 1), ("smeared", 0)], range(48)): + seed = seeds[scenario % len(seeds)] + scale = scales[scenario % len(scales)] + (invalid_ranges if kind == "smeared" and math.isnan(scale) else valid_bases).append(sampler_id) + yield f"create {kind} {stream} {seed} {skip} {number(scale)}" + for value in specials: + # Axis-specific extremes as well as all coordinates equal. + for axis in range(4): + coords = [value if i == axis or axis == 3 else 0.0 for i in range(3)] + yield f"query {sampler_id} " + numbers(coords) + " 00000000 80000000 3f800000" + for step in range(400): + if step % 5 == 0: + coords = [rng.choice(specials) for _ in range(3)] + elif step % 7 == 0: + value = rng.uniform(-2, 2) + coords = [value, value, value] # Ties in skipped-offset simplex. + else: + magnitude = rng.choice([1, 16, 10000, 30_000_000, 2**31, 1e100]) + coords = [rng.uniform(-magnitude, magnitude) for _ in range(3)] + initial = [rng.choice(derivative_edges) if step % 3 == 0 else f"{rng.getrandbits(32):08x}" for _ in range(3)] + yield f"query {sampler_id} " + numbers(coords) + " " + " ".join(initial) + local_edges = [-1.0, math.nextafter(-1.0, -math.inf), -0.0, 0.0, math.nextafter(0.0, math.inf), + .125, .5, math.nextafter(1.0, 0.0), 1.0, math.nextafter(1.0, math.inf)] + for x, y in itertools.product(local_edges, repeat=2): + yield f"local {sampler_id} " + numbers([x, y, x]) + " 00000000 80000000 3f800000" + if kind in ["perlin", "smeared", "simplex"]: + for step in range(32): + sizes = [rng.randrange(1, 6), rng.randrange(1, 17), rng.randrange(1, 6)] + steps = [rng.choice([1, 4, 16, 2147483647]) for _ in range(3)] + minimum = [rng.choice([-2147483648, 2147483647, -64, 0, 16]) for _ in range(3)] + xz_scale, y_scale = (rng.choice([0.0, -0.0, .001, -.001, .5, 1.0, 4.0, 1e100, math.inf, -math.inf, math.nan]) for _ in range(2)) + amplitude = rng.choice(derivative_edges) + seed = rng.randrange(-2**63, 2**63) + if step % 11 == 0: + sizes[step % 3] = 0 if step == 0 else -1 + if step % 13 == 0: + steps[step % 3] = 0 if step == 0 else -1 + yield f"volume {sampler_id} " + " ".join(map(str, sizes + minimum + steps)) + f" {numbers([xz_scale,y_scale])} {amplitude} {seed} {step % 4}" + sampler_id += 1 + stacks = [] + amplitudes = ["00000000", "80000000", "3f800000", "bf800000", "3e800000", "1e3ce508", "7f7fffff", "7f800000", "ff800000"] + for scenario in range(640): + layers = [] + layer_count = 0 + depth = 1 + for _ in range(scenario % 7): + eligible = [entry for entry in stacks if entry[1] <= 24 and entry[2] <= 3] + if eligible and rng.randrange(3) == 0: + selected, count, previous_depth = rng.choice(eligible) + flatten = rng.randrange(2) + depth = max(depth, previous_depth + (1 - flatten)) + layer_count += count if flatten else 1 + else: + selected, flatten = rng.choice(valid_bases), 0 + layer_count += 1 + frequency = rng.choice(specials) if scenario % 4 == 0 else rng.uniform(-8, 8) + # Keep generated success IDs stable: flattening 0 * infinity would + # itself create a NaN layer amplitude and reject the build. + amplitude = rng.choice(amplitudes[2:7] if flatten else amplitudes) + layers.extend([str(flatten), str(selected), number(frequency), amplitude]) + yield f"stack {scenario % 7} " + " ".join(layers) + stacks.append((sampler_id, layer_count, depth)) + for step in range(64): + point = [rng.choice(specials) if step % 5 == 0 else rng.uniform(-1000, 1000) for _ in range(3)] + yield f"query {sampler_id} " + numbers(point) + " 00000000 00000000 00000000" + for step in range(3): + scale = [rng.choice([0.0, .001, .5, -2.0, 1e100, math.inf, math.nan]) for _ in range(2)] + yield f"volume {sampler_id} 2 4 2 -17 -64 2147483647 4 1 16 " + numbers(scale) + f" {rng.choice(amplitudes)} {scenario} {step + 1}" + sampler_id += 1 + # Failed builds do not append a sampler. Zero amplitude does not bypass + # checking a layer's invalid range; NaN frequency is allowed instead. + if scenario % 16 == 0: + yield f"stack 1 0 {rng.choice(valid_bases)} {number(1.0)} 7fc00000" + yield f"stack 1 0 {rng.choice(invalid_ranges)} {number(1.0)} 00000000" + yield f"stack 1 0 0 {number(1.0)} 00000000" + yield f"stack 1 1 {sampler_id} {number(1.0)} 7f800000" # Flattened zero times infinity rejects. + yield f"stack 1 0 {sampler_id} {number(1.0)} 7f800000" # Nested range remains zero; samples are NaN. + yield f"query {sampler_id + 1} " + numbers([1.0, 2.0, 3.0]) + " 00000000 00000000 00000000" + bases = [-(2**31), 2**31-1, -1075, -1074, -1023, -1022, -32, -16, -8, 0, 16, 32, 1022, 1023, 1024] + base_amplitudes = [0.0, -0.0, 1.0, 2.0, .5, 1e-6, 1e-160, 1e160, 1e200, 1e-200, -1.0, math.inf, -math.inf, math.nan] + for scenario in range(1800): + parity = int(scenario % 5 == 0) + count = rng.choice([0, 1, 2, 3, 4, 8, 16, 32, 33, 64, -1]) + base = rng.choice(bases) if scenario % 3 == 0 else rng.randrange(-32, 33) + amplitude = rng.choice(base_amplitudes) if scenario % 3 == 0 else rng.uniform(.0001, 100) + normalization = scenario % 3 + if scenario >= 1400: + parity |= 2 + base = rng.choice([-64, -16, -8, -1, 0, 1, 2, 4]) + modifiers = [] + if parity & 1 or scenario % 4 != 0: + for _ in range(max(0, count)): + choices = [0.0, -0.0, 1.0, .5, -1.0, rng.uniform(0, 4), 1e-16, 1e16] + if scenario % 17 == 0: + choices.extend([1e200, 1e-200, math.inf, math.nan]) + modifiers.append(rng.choice(choices)) + if scenario % 31 == 0: + modifiers = [0.0] * max(0, count) + if scenario % 37 == 0 and not (parity & 1): + modifiers.append(1.0) # Also check the builder's modifier-index failure. + points = [[0, 0, 0], [-17.25, 64.125, 32.5], *[[rng.uniform(-1000, 1000) for _ in range(3)] for _ in range(16)]] + if scenario % 7 == 0: + points.extend([[value, value, value] for value in specials]) + for stream in ["legacy", "xoroshiro"]: + yield f"normal {stream} {seeds[scenario % len(seeds)]} {parity} {base} {count} {normalization} {number(amplitude)} {len(modifiers)} " + numbers(modifiers) + f" {len(points)} " + numbers(sum(points, [])) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--prepare", action="store_true") + args = parser.parse_args() + build = lab.LOCAL / "rust-noise-parity" + build.mkdir(parents=True, exist_ok=True) + report_path = build / "report.json" + report_path.unlink(missing_ok=True) + if args.prepare: + lab.prepare() + lock, jars, libraries = test_rust_parity.verify_artifacts() + commands = list(corpus()) + inputs = build / "inputs.txt" + inputs.write_text("\n".join(commands) + "\n", encoding="utf-8") + source = lab.ROOT / "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaNoiseOracle.java" + sources = [source, Path(__file__), lab.ROOT / "tools/test_rust_parity.py", lab.ROOT / "tools/lab.py", + *sorted((lab.ROOT / "crates/horizon-core").rglob("*.rs")), + lab.ROOT / "crates/horizon-core/Cargo.toml", lab.ROOT / "Cargo.toml", lab.ROOT / "Cargo.lock"] + tested_sources = test_rust_parity.source_hashes(sources) + classes = build / "classes" + classes.mkdir(exist_ok=True) + dependency_path = os.pathsep.join(map(str, libraries)) + run = test_rust_parity.run + run(["javac", "--release", str(lock["minecraft"]["java_major"]), "-proc:none", + "-cp", os.pathsep.join([str(jars["server"]), dependency_path]), "-d", str(classes), str(source)]) + run(["cargo", "build", "--release", "--bin", "horizon-noise-parity"]) + metadata = json.loads(subprocess.check_output(["cargo", "metadata", "--no-deps", "--format-version", "1"], cwd=lab.ROOT, text=True)) + binary = Path(metadata["target_directory"]) / "release" / ("horizon-noise-parity.exe" if os.name == "nt" else "horizon-noise-parity") + candidate = build / "rust.txt" + with inputs.open("rb") as stdin, candidate.open("wb") as stdout: + run([str(binary)], stdin=stdin, stdout=stdout) + references = [] + for side, jar in jars.items(): + reference = build / f"vanilla-{side}.txt" + run(["java", "-Xmx512M", "-cp", os.pathsep.join([str(classes), str(jar), dependency_path]), + "dev.horizonlab.parity.VanillaNoiseOracle", str(inputs), str(reference)]) + matched = test_rust_parity.compare(reference, candidate) + references.append({"side": side, "jar_sha256": lab.digest(jar, "sha256"), + "output_sha256": lab.digest(reference, "sha256"), "matched_output_lines": matched}) + print(f"{side}: {matched:,} noise output lines match Rust", flush=True) + test_rust_parity.ensure_sources_unchanged(sources, tested_sources) + report = {"schema": 1, "minecraft": lock["minecraft"]["version"], "platform": platform.platform(), + "java": subprocess.check_output(["java", "--version"], text=True).splitlines()[0], + "rustc": subprocess.check_output(["rustc", "--version"], text=True).strip(), + "manifest_sha1": lock["minecraft"]["manifest_sha1"], "commands": dict(Counter(line.split()[0] for line in commands)), + "inputs_sha256": lab.digest(inputs, "sha256"), "rust_output_sha256": lab.digest(candidate, "sha256"), + "sources_sha256": tested_sources, "references": references, + "scope": "26.3 gradient offsets, permutation tables, constructor RNG consumption, ranges, coordinate wrap, Perlin 2D/3D and derivative accumulation, simplex 2D/3D with both offset modes, smeared Perlin 2D/3D and inherited unsmeared derivatives; bounded strided density volumes, wrapped block coordinates, flat indices, cached and scalar bulk accumulation with preserved buffer tails; nested and flattened noise stacks; normal-noise octave construction, enabled/disabled/legacy normalization, parity factory, modern positional seeding, legacy Nether biome initialization, failure draw state, scalar and bulk sampling. Finite outputs and signed zeros compared by bits; NaNs canonicalized. No serialized noise definitions, density-function graphs, generated terrain, gameplay, rendering or performance claim."} + lab.write_json(report_path, report) + print(f"Scoped noise parity passed: {report_path}") + + +if __name__ == "__main__": + main() diff --git a/tools/test_object_open_map_parity.py b/tools/test_object_open_map_parity.py new file mode 100644 index 000000000..76e83a695 --- /dev/null +++ b/tools/test_object_open_map_parity.py @@ -0,0 +1,144 @@ +#!/usr/bin/env python3 +"""Compare default fastutil Object2ObjectOpenHashMap storage, live indexed entries and callback traversal.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng = random.Random(0x4f50454e4d4150) + + def op(kind, key=-1, value=None): + return [kind, key, value] + + def hashes(mode, n): + def unmix(x): + h = ((x ^ (x >> 16)) * pow(0x9e3779b9, -1, 2**32)) & 0xffffffff + return h if h < 0x80000000 else h - 2**32 + if mode == 0: return [0] * n + if mode == 1: return [unmix(31)] * n + if mode == 2: return [unmix(127 + i % 4) for i in range(n)] + if mode == 3: return list(range(n)) + return [rng.randrange(-2**31, 2**31) for _ in range(n)] + + def fixture(h, ops, ids=None): + return dict(hashes=h, ids=list(range(len(h))) if ids is None else ids, ops=ops) + + for mode in range(5): + for n in [0, 1, 7, 23, 24, 25, 47, 48, 49, 64, 97, 128]: + for order in range(4): + h = hashes(mode, n) + ids = list(range(n)) + rng.shuffle(ids) + if order % 2: ids.append(-1) + ops = [op('put', i, None if i % 3 == 0 else i) for i in ids] + [op('cursor')] + for i in range(len(ids)): + ops.extend([op('next'), op('entry-key', i), op('entry-value', i), op('entry-set', i, 700 + i)]) + if i % 2 == 0 or order >= 2: + ops.extend([op('delete'), op('entry-key', i), op('entry-value', i), op('entry-set', i, 800 + i)]) + if i: ops.extend([op('entry-key', i - 1), op('entry-value', i - 1)]) + ops.extend([op('force-next'), op('delete')]) + for i in reversed(ids): + ops.extend([op('contains', i), op('get', i), op('remove', i), op('put', i, -i)]) + rng.shuffle(ids) + ops.extend(op('remove', i) for i in ids) + # Old handles retain live indexes even after ordinary remove/clear. + for i in range(len(ids)): + ops.extend([op('entry-key', i), op('entry-set', i, 900 + i), op('entry-value', i)]) + ops.extend(op('get', i) for i in ids) + ops.extend([op('cursor'), op('clear'), op('next'), op('force-next')]) + yield fixture(h, ops) + for mode in range(5): + for n in [1, 8, 24, 25, 49, 128]: + h = hashes(mode, n) + yield fixture(h + h, [op('put', i, i) for i in range(n)] + + [op('put', i + n, -i) for i in range(n)] + + [op('get', i + n) for i in range(n)] + + [op('remove', i + n) for i in range(n)], list(range(n)) * 2) + # Empty-slot values written through stale entries must remain absent to get(). + for null in [False, True]: + i = -1 if null else 0 + yield fixture([0], [op('put', i, 1), op('cursor'), op('next'), op('remove', i), + op('entry-set', 0, 99), op('get', i), op('contains', i), + op('clear'), op('entry-value', 0), op('put', i, 2), op('get', i)]) + for _ in range(400): + n = rng.choice([16, 32, 64, 128]) + h = hashes(rng.randrange(5), n) + ids = list(range(n)); rng.shuffle(ids) + ops = [op('put', i, i) for i in ids] + [op('cursor')] + # Never combine external structural mutation with iterator.remove: an + # invalidated wrapped key can make the native iterator nonterminating. + for __ in range(300): + kind = rng.choice(['put', 'put', 'remove', 'contains', 'get', 'cursor', 'next', + 'force-next', 'clear', 'entry-key', 'entry-value', 'entry-set']) + if kind == 'clear' and rng.randrange(20): kind = 'remove' + k = rng.randrange(20) if kind.startswith('entry-') else rng.randrange(-1, n) + ops.append(op(kind, k, rng.choice([None, -1, 0, 1, 2**31 - 1, -2**31, rng.randrange(10000)]))) + yield fixture(h, ops) + for mode in range(5): + for n in [1, 7, 24, 25, 49, 128]: + for null in [False, True]: + h = hashes(mode, 256) + initial = ([op('put', -1, -1)] if null else []) + [op('put', i, i) for i in range(n)] + actions = [[], [op('put', 0, 999)], [op('clear')], + [op('remove', i) for i in range(n)], + [op('put', i, -i) for i in range(n, 256)], + [op('clear')] + [op('put', i, i) for i in range(256)], + [op('put', -1, 999), op('fail')]] + for action in actions: + for skip in [0, 1, 3]: + ops = initial + [['each', [[]] * skip + [action]], ['each', []]] + yield fixture(h, ops) + for _ in range(250): + n = rng.choice([16, 32, 64, 128]) + h = hashes(rng.randrange(5), n) + initial = [op('put', i, i) for i in range(rng.randrange(n))] + if rng.randrange(2): initial.insert(0, op('put', -1, -1)) + actions = [] + for call in range(8): + actions.append([op(rng.choice(['put', 'put', 'remove', 'clear', 'get', 'fail']), + rng.randrange(-1, n), rng.choice([None, call])) for __ in range(rng.randrange(5))]) + yield fixture(h, initial + [['each', actions], ['each', []]]) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-object-open-map-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaObjectOpenMapOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/object_open_map_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaObjectOpenMapOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','object_open_map_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('object_open_map_fixture.exe' if os.name=='nt' else 'object_open_map_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} object open map output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'fastutil_sha256':{str(p.relative_to(lab.ROOT)):lab.digest(p,'sha256') for p in libraries if 'fastutil' in str(p)},'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Pinned fastutil 8.5.18 default Object2ObjectOpenHashMap used for effect modifier definitions and attribute instances. Compares put/get/containsKey/remove/clear, null keys/values, retained equal-key identity, slot order, growth/shrink, live indexed entry getKey/getValue/setValue and iterator removal/invalidation including wrapped clusters. forEach exercises captured keys with live values through callback mutation/rehash/failure. Pure hash/equality, nullable Integer values. Alternate constructors/default return values, compute/merge/bulk APIs, entry reuse across different maps and external structural mutation combined with iterator removal remain outside this gate; full attribute/entity gameplay integration is pending.'} + lab.write_json(report_path,report);print(f'Scoped object open map parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_object_open_set_parity.py b/tools/test_object_open_set_parity.py new file mode 100644 index 000000000..52b533b42 --- /dev/null +++ b/tools/test_object_open_set_parity.py @@ -0,0 +1,93 @@ +#!/usr/bin/env python3 +"""Compare default fastutil ObjectOpenHashSet storage and live iterator behavior.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng=random.Random(0x4f50454e534554) + def op(kind,k=-1):return [kind,k] + def hashes(mode,n): + def unmix(x): + h=((x^(x>>16))*pow(0x9e3779b9,-1,2**32))&0xffffffff + return h if h<0x80000000 else h-2**32 + if mode==0:return [0]*n + if mode==1:return [unmix(31)]*n + if mode==2:return [unmix(127+i%4) for i in range(n)] + if mode==3:return list(range(n)) + return [rng.randrange(-2**31,2**31) for _ in range(n)] + for mode in range(5): + for n in [0,1,7,23,24,25,47,48,49,64,97,128]: + for order in range(4): + h=hashes(mode,n);ids=list(range(n));rng.shuffle(ids) + if order%2:ids.append(-1) + ops=[op('add',i) for i in ids]+[op('cursor')] + for i in range(len(ids)): + ops.append(op('next')) + if i%2==0 or order>=2:ops.append(op('delete')) + ops.extend([op('force-next'),op('delete')]) + for i in reversed(ids):ops.extend([op('contains',i),op('get',i),op('remove',i),op('add',i)]) + rng.shuffle(ids);ops.extend(op('remove',i) for i in ids) + ops.extend([op('cursor'),op('clear'),op('next'),op('force-next'),op('delete')]) + yield dict(hashes=h,ids=list(range(n)),ops=ops) + for mode in range(5): + for n in [1,8,24,25,49,128]: + h=hashes(mode,n) + # Equal keys in distinct objects must retain the original member. + yield dict(hashes=h+h,ids=list(range(n))*2,ops=[op('add',i) for i in range(n)]+[op('add',i+n) for i in range(n)]+[op('get',i+n) for i in range(n)]+[op('remove',i+n) for i in range(n)]) + for _ in range(600): + n=rng.choice([16,32,64,128]);h=hashes(rng.randrange(5),n);ids=list(range(n));rng.shuffle(ids) + ops=[op('add',i) for i in ids]+[op('cursor')] + # External mutation is deliberately not followed by iterator.remove: + # that unsupported combination can corrupt native size metadata. + for __ in range(300): + k=rng.choice(['add','add','remove','contains','get','cursor','next','force-next','clear']) + if k=='clear' and rng.randrange(20):k='remove' + ops.append(op(k,rng.randrange(-1,n))) + yield dict(hashes=h,ids=list(range(n)),ops=ops) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-object-open-set-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaObjectOpenSetOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/object_open_set_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaObjectOpenSetOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','object_open_set_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('object_open_set_fixture.exe' if os.name=='nt' else 'object_open_set_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} object open set output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'fastutil_sha256':{str(p.relative_to(lab.ROOT)):lab.digest(p,'sha256') for p in libraries if 'fastutil' in str(p)},'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Pinned fastutil 8.5.18 default ObjectOpenHashSet used for pending attribute updates. Compares add/contains/get/remove/clear, null membership, equal distinct object retention, slot iteration, growth/shrink, iterator removal with wrapped clusters and live external mutation prefixes. Key equality/hash methods are pure. Alternate constructors, collection bulk methods and external structural mutation followed by iterator removal are outside this scoped gate; attribute/player integration remains pending.'} + lab.write_json(report_path,report);print(f'Scoped object open set parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_pillar_parity.py b/tools/test_pillar_parity.py new file mode 100644 index 000000000..b34274dc9 --- /dev/null +++ b/tools/test_pillar_parity.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python3 +"""Compare vertical pillars, cap placement and early-exit random consumption.""" +import itertools +import json +try: + from . import test_simple_block_parity as harness +except ImportError: + import test_simple_block_parity as harness + + +def corpus(facts,placement): + states=facts['states'];get=lambda name:facts['defaults']['minecraft:'+name] + def pillar(block=None,**extra): + definition={'type':'single_block_pillar','block':block if block is not None else {'id':'stone'},'direction':'up'};definition.update(extra);return definition + def case(definition,**extra): + f={'definition':json.dumps(definition,separators=(',',':')),'mode':'feature','origin':[0,318,0],'legacy':False,'seed':0,'world_seed':1,'fail':-1,'reject':0,'brightness':15,'fallback':get('air'),'states':[],'repeats':2};f.update(extra);return f + for state in states:yield case(pillar(state)) + providers=[{'id':'stone'},{'id':'water'},{'type':'random_block','blocks':[]},{'type':'random_block','blocks':['stone','pale_moss_carpet']},{'type':'rotated','state':{'id':'oak_log'}},'horizon:stone'] + caps=[None,'horizon:moss','horizon:empty',{'feature':{'type':'no_op'},'placement':[]},{'feature':'horizon:stone','placement':[{'type':'count','count':2}]},{'feature':{'type':'block_column','layers':[{'height':2,'provider':{'id':'water'}}],'direction':'down','allowed_placement':{'type':'true'},'prioritize_tip':True},'placement':[]}] + for direction,chance,cap in itertools.product(['up','down'],[0.0,0.000001,0.25,0.5,0.999999,1.0],caps): + for legacy,seed,fail,reject in itertools.product([False,True],[0,-1,0x123456789abcdef],[-1,0,2,5],[0,1,3]): + definition=pillar({'type':'random_block','blocks':['stone','water']},direction=direction,chance_to_continue=chance,cap_feature=cap) + yield case(definition,origin=[0,316 if direction=='up' else -61,0],legacy=legacy,seed=seed,world_seed=seed,fail=fail,reject=reject) + predicates=[{'type':'true'},{'type':'not','predicate':{'type':'true'}},{'type':'matching_blocks','blocks':'air'},{'type':'would_survive','state':'pale_moss_carpet'},{'type':'has_sturdy_face','direction':'up'},{'type':'replaceable'}] + for provider,predicate,neighbor,fail in itertools.product(providers,predicates,['air','stone','water','shulker_box'],[-1,0,1,2,5]): + yield case(pillar(provider,can_replace=predicate,cap_feature='horizon:moss'),fallback=get(neighbor),fail=fail) + for origin,direction,chance in itertools.product([[0,-65,0],[0,-64,0],[0,319,0],[0,320,0],[2147483647,-2147483648,-2147483648],[-2147483648,2147483647,2147483647]],['up','down'],[0.0,0.5,1.0]): + yield case(pillar(direction=direction,chance_to_continue=chance,cap_feature='horizon:stone'),origin=origin) + for key,values in [('block',[None,False,0,{},'missing']),('can_replace',[None,False,0,{}, {'type':'true'}]),('direction',[None,'north','UP',False,0]),('chance_to_continue',[None,False,'0.5',-0.01,1.01,-0.0,-1e-100,1e-100,1.0000000001,0,1]),('cap_feature',[None,'missing',{},False])]: + for value in values: + definition=pillar();definition[key]=value;yield case(definition) + definition=pillar();definition.pop(key,None);yield case(definition) + nested=pillar(chance_to_continue=0,cap_feature={'feature':pillar(direction='down',chance_to_continue=0.5,cap_feature='horizon:stone'),'placement':[{'type':'count','count':2}]}) + for legacy,seed,fail in itertools.product([False,True],[0,-1,0x123456789abcdef],[-1,0,1,4]): + yield case(nested,origin=[0,-61,0],legacy=legacy,seed=seed,fail=fail) + yield case({'type':'sequence','features':[{'feature':nested,'placement':[]},{'feature':'horizon:stone','placement':[]}]},origin=[0,-61,0],legacy=legacy,seed=seed,fail=fail) + + +if __name__=='__main__': + harness.run(corpus,'rust-pillar-parity',__file__, + 'Native single-block pillar codec and placement, all provider state descriptors, upward/downward traversal, replacement predicates before continuation draws, bounds checks after draws, cap placement one opposite step from the stopping position even when no column block was placed, ignored rejected writes and cap false results, partial failures, coordinate wrapping, independent world random stream, named holders, nested pillars and feature sequences. Shared graph work limits bound pathological traversals. Actual resident chunks, neighbor updates and complete gameplay remain pending.') diff --git a/tools/test_piston_movement_parity.py b/tools/test_piston_movement_parity.py new file mode 100644 index 000000000..37b151b61 --- /dev/null +++ b/tools/test_piston_movement_parity.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python3 +"""Compare per-tick piston movement limits and accumulator state with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>d',float(v)).hex() + def op(v,time=0,fail=False):return dict(movement=list(map(bits,v)),time=time,fail=fail) + def row(ops,deltas=(0,0,0),time=0):return dict(ops=ops,deltas=list(map(bits,deltas)),time=time) + threshold=float(struct.unpack('>f',struct.pack('>f',1e-5))[0]) + values=[-float('inf'),-1,-.51,-.5,-threshold,-0.0,0,threshold,math.sqrt(1e-7),math.nextafter(math.sqrt(1e-7),0),math.nextafter(math.sqrt(1e-7),1),.5,.51,1,float('inf'),float('nan')] + for x in values: + for y in values: + for z in [0,-0.0,.2,float('nan')]: + for time in [0,1]:yield row([op([x,y,z],time)]) + for axis in range(3): + for value in values: + for initial in [0,-.51,.51,.51-threshold,math.nextafter(.51-threshold,0),float('nan'),float('inf')]: + v=[0,0,0];v[axis]=value;d=[0,0,0];d[axis]=initial + for fail in [False,True]:yield row([op(v,0,fail),op(v),op(v,1),op(v,1),op([-q for q in v],1)],d) + for axis in range(3): + v=[0,0,0];v[axis]=.1;yield row([op(v,0) for _ in range(12)]+[op([-q for q in v],0) for _ in range(12)]+[op(v,1),op(v,-1)]) + rng=random.Random(0x504953544f4e) + for _ in range(3000): + ops=[];time=rng.choice([0,1,-1,9223372036854775807,-9223372036854775808]) + for index in range(20): + if index%5==0:time=rng.choice([0,1,-1,9223372036854775807,-9223372036854775808]) + ops.append(op([rng.choice(values) for _ in range(3)],time,rng.randrange(8)==0)) + yield row(ops,[rng.choice(values) for _ in range(3)],rng.choice([0,1])) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-piston-movement-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPistonMovementOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/piston_movement_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaPistonMovementOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','piston_movement_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('piston_movement_fixture.exe' if os.name=='nt' else 'piston_movement_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} piston movement output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Entity.limitPistonMovement over sequential displacement and game-time snapshots. Compares lazy time queries, length and displacement thresholds, per-tick resets, first-nonzero-axis selection, clamped accumulation, signed zero/nonfinite values and state after injected time-query failures. This does not establish piston block event simulation, entity pushing, Entity.move guards or full gameplay.'} + lab.write_json(report_path,report);print(f'Scoped piston movement parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_piston_shape_parity.py b/tools/test_piston_shape_parity.py new file mode 100644 index 000000000..aca667fe5 --- /dev/null +++ b/tools/test_piston_shape_parity.py @@ -0,0 +1,79 @@ +#!/usr/bin/env python3 +"""Compare moving-piston collision shapes and interpolation with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(facts): + def bits(value):return struct.pack('>f',float(value)).hex() + steps=[bits(v) for v in [-1,-0.0,0,0.25,0.5,0.75,1,2]]+['3e7fffff','3e800001','3f3fffff','3f400001'] + positions=[[0,0,0],[-17,-64,30000000],[2147483647,-2147483648,-2147483648]] + partials=[bits(v) for v in [-1,0,0.5,1,2]]+['7fc00001','7f800000','ff800000'] + def fixture(state,index=0,**kwargs): + result={'state':state,'position':positions[index%3],'direction':index%6,'extending':index%2==0,'source':False,'progress':steps[index%len(steps)],'previous':bits(0.25),'partial':partials[index%len(partials)],'noclip':-1,'fail':-1,'kinematic':False};result.update(kwargs);return result + for state in range(len(facts['states'])):yield fixture(state,state) + for state,value in enumerate(facts['states']): + if value['id'] in ['minecraft:piston','minecraft:sticky_piston']: + for direction in range(6): + for extending in [False,True]: + for source in [False,True]: + for progress in steps: + for noclip in range(-1,6):yield fixture(state,direction,extending=extending,source=source,progress=progress,noclip=noclip) + if value['id'].endswith('shulker_box') or value['id']=='minecraft:moving_piston': + for extending in [False,True]: + for direction in range(6): + for noclip in [-1,direction,direction^1]: + for fail in [-1,0]:yield fixture(state,direction,extending=extending,progress=bits(0.5),noclip=noclip,fail=fail) + rng=random.Random(0x504953544f4e) + stone=facts['defaults'].get('minecraft:stone',0) + for index in range(10000): + yield fixture(stone,index,kinematic=True,progress=f'{rng.getrandbits(32):08x}',previous=f'{rng.getrandbits(32):08x}',partial=f'{rng.getrandbits(32):08x}') + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-piston-shape-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPistonShapeOracle.java' + helpers=[oracle.with_name(name+'.java') for name in ['VanillaFaceSupportOracle','VanillaBlockStateCodecOracle','VanillaCollisionOracle']] + sources=[oracle,*helpers,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/piston_shape_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,*helpers],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaPistonShapeOracle',mode,path],side+'-'+mode) + java('server','export',build) + facts=json.loads((build/'facts.json').read_text()) + if len(facts['states'])!=35723:raise ValueError('incomplete pinned registry') + fixtures=list(corpus(facts));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'facts.json',build/'block-registry.nbt',build/'cached-collision.nbt'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','piston_shape_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('piston_shape_fixture.exe' if os.name=='nt' else 'piston_shape_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} piston-shape output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'block_states':len(facts['states']),'kinematic_cases':sum(f['kinematic'] for f in fixtures),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual moving-piston entity collision shape, interpolation/offset float bits, movement direction and collision-related block-state selection. Every registered moved state is sampled, piston-base/source/extension/head thresholds and all noclip directions are crossed, and dynamic block-entity query failures are compared. Cached collision geometry is imported privately; uncached moved blocks use Rust support selection only in the tested empty-collision-context, absent-block-entity world. Piston ticking, entity pushes, live block entities, networking and full gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped piston-shape parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_placement_parity.py b/tools/test_placement_parity.py new file mode 100644 index 000000000..8ac2f9247 --- /dev/null +++ b/tools/test_placement_parity.py @@ -0,0 +1,132 @@ +#!/usr/bin/env python3 +"""Compare placement-modifier decoding and ordered emissions with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def definitions(): + encode=lambda value:json.dumps(value,separators=(',',':')) + for value in [None,False,0,[],{}, {'type':'missing'}, {'type':'in_square'}, {'type':':in_square'}]:yield encode(value) + for count in [-1,0,1,3,17,4096,4097,4294967297, {'type':'uniform','min_inclusive':0,'max_inclusive':5}, {'type':'clamped','source':10,'min_inclusive':0,'max_inclusive':3}, {'type':'weighted_list','distribution':[{'data':0,'weight':1},{'data':4,'weight':3}]}]:yield encode({'type':'count','count':count}) + for field in ['x','y','z']: + for value in [-17,-16,-1,0,1,16,17,4294967297, {'type':'uniform','min_inclusive':-16,'max_inclusive':16}, {'type':'trapezoid','min':-7,'max':7,'plateau':0}]: + definition={'type':'offset','x':0,'y':0,'z':0};definition[field]=value;yield encode(definition) + for chance in [None,False,'1',-1,-0.,0,1e-100,0.1,0.5,1,2,3,7,16777217,2147483647,4294967297]: + for kind in ['rarity_filter','random_chance']:yield encode({'type':kind,'chance':chance}) + for height in [{'absolute':0},{'above_bottom':7},{'relative_to_sea_level':-3}, {'type':'uniform','min_inclusive':{'above_bottom':0},'max_inclusive':{'below_top':0}}, {'type':'trapezoid','min_inclusive':{'absolute':-7},'max_inclusive':{'absolute':7}}, {'type':'weighted_list','distribution':[{'data':{'absolute':1},'weight':2},{'data':{'below_top':1},'weight':3}]}]:yield encode({'type':'height_range','height':height}) + fixed=[[0,7,0],[15,20,15],[-1,-64,-1],[-16,99,16],[2147483647,-2147483648,2147483647],[0,7,0]] + for positions in [[],fixed,[[1,2]],[[1,2,3,4]],[[0,False,0]],[[4294967297,0,-4294967297]]]:yield encode({'type':'fixed_placement','positions':positions}) + for placements in [[],[{'type':'in_square'}],[{'type':'in_square'},{'type':'count','count':3},{'type':'fixed_placement','positions':fixed}],[{'type':'randomly_selected','placements':[{'type':'in_square'},{'type':'count','count':0}]}]]:yield encode({'type':'randomly_selected','placements':placements}) + for kind,field in [('count','count'),('height_range','height'),('offset','y'),('rarity_filter','chance'),('random_chance','chance'),('fixed_placement','positions'),('randomly_selected','placements')]: + for value in [None,{},[]]:yield encode({'type':kind,field:value}) + + + for heightmap in ['WORLD_SURFACE_WG','WORLD_SURFACE','OCEAN_FLOOR_WG','OCEAN_FLOOR','MOTION_BLOCKING','MOTION_BLOCKING_NO_LEAVES','world_surface','missing',None,0]: + yield encode({'type':'heightmap','heightmap':heightmap}) + yield encode({'type':'surface_relative_threshold_filter','heightmap':heightmap}) + for low,high in [(-3,3),(1,0),(-2147483648,2147483647),(2147483647,2147483647),(-2147483648,-2147483648),(None,None)]: + yield encode({'type':'surface_relative_threshold_filter','heightmap':heightmap,'min_inclusive':low,'max_inclusive':high}) + for depth in [-2147483648,-1,0,1,7,2147483647,4294967297,None,False,'0']: + yield encode({'type':'surface_water_depth_filter','max_water_depth':depth}) + + for ratio in [-2147483648,-9,-1,0,1,5,16,2147483647]: + for factor in [-1e300,-200,-0.,0,1e-300,1,80,200,1e300]: + yield encode({'type':'noise_based_count','noise_to_count_ratio':ratio,'noise_factor':factor}) + for offset in [None,-1,0,0.1,1,1e300,'0',False]: + yield encode({'type':'noise_based_count','noise_to_count_ratio':7,'noise_factor':80,'noise_offset':offset}) + for level in [-1e300,-1,-0.,0,0.1,0.7,1,1e300]: + for below,above in [(-1,3),(0,0),(1,7),(17,2),(-2147483648,2147483647)]: + yield encode({'type':'noise_threshold_count','noise_level':level,'below_noise':below,'above_noise':above}) + + for xz,y in [(1,1),(2,3),(3,4),(16,16),(0,2),(2,17),({'type':'uniform','min_inclusive':1,'max_inclusive':5},{'type':'uniform','min_inclusive':1,'max_inclusive':3})]: + for edges,interior in [(True,True),(True,False),(False,True),(False,False),(None,None),(0,True),(True,'false')]: + yield encode({'type':'cuboid','xz_size':xz,'y_size':y,'include_edges':edges,'include_interior':interior}) + + for count in [-1,0,1,3,7,257, {'type':'uniform','min_inclusive':0,'max_inclusive':5}, {'type':'weighted_list','distribution':[{'data':0,'weight':1},{'data':4,'weight':3}]}]: + yield encode({'type':'count_on_every_layer','count':count}) + + truth={'type':'true'};false={'type':'not','predicate':truth};inside={'type':'inside_world_bounds'} + predicates=[truth,false,inside,{'type':'all_of','predicates':[]},{'type':'any_of','predicates':[]}] + for offset in [None,[],[0,0],[0,0,0,0],[0,-17,0],[16,16,-16],[0,-16,0],[0,1,0],[-2147483648,-2147483648,-2147483648],[4294967296,4294967297,-4294967297],[0,False,0]]: + predicates.append({'type':'inside_world_bounds','offset':offset}) + for kind in ['all_of','any_of']: + for values in [[truth,inside],[false,inside],[inside,truth],[inside,false],[inside,{'type':'not','predicate':inside}],None,False]: + predicates.append({'type':kind,'predicates':values}) + predicates += [None,False,{},{'type':'not'},{'type':'not','predicate':None},{'type':'missing'}] + for predicate in predicates:yield encode({'type':'block_predicate_filter','predicate':predicate}) + for direction in ['up','down','north','UP',None]: + for steps in [0,1,4,32,33]: + for target in [truth,false,{'type':'not','predicate':{'type':'inside_world_bounds','offset':[0,-16,0]}}]: + yield encode({'type':'environment_scan','direction_of_search':direction,'target_condition':target,'max_steps':steps}) + for allowed in [None,truth,false,inside,{'type':'inside_world_bounds','offset':[0,16,0]}, {'type':'all_of','predicates':[inside,inside]}]: + for target in [inside,{'type':'not','predicate':{'type':'inside_world_bounds','offset':[0,-16,0]}}]: + for direction in ['up','down']: + yield encode({'type':'environment_scan','direction_of_search':direction,'target_condition':target,'allowed_search_condition':allowed,'max_steps':32}) + + +def corpus(): + positions=[[0,0,0],[-1,63,-1],[-16,-64,16],[2147483647,-2147483648,2147483647]] + for legacy in [False,True]: + for seed in [0,-1,0x123456789abcdef]: + for context in [[-64,384,63],[2147483647,-2147483648,2147483647]]: + for index,definition in enumerate(definitions()): + for fail,draw in [(-1,False),(0,False),(2,True)]: + # Limit successful 4096-repeat output; a failing consumer still checks the bound. + if '4096' in definition and fail==-1:continue + value=json.loads(definition) + layer=isinstance(value,dict) and value.get('type')=='count_on_every_layer' + if layer and context[0]!=-64:continue + noise=isinstance(value,dict) and value.get('type') in ['noise_based_count','noise_threshold_count'] + unsafe=noise and (abs(value.get('noise_to_count_ratio',0))>16 or not isinstance(value.get('noise_offset',0),(int,float)) or abs(value.get('noise_offset',0))>2 or abs(value.get('below_noise',0))>17 or abs(value.get('above_noise',0))>17) + for count_only in ([True] if unsafe else [False,True] if noise else [False]): + yield {'layer_world':layer,'count_only':count_only,'definition':definition,'context':context,'legacy':legacy,'seed':seed,'positions':positions,'fail':fail,'draw':draw,'height_mode':index%2,'query_fail':1 if index%5==0 and fail==2 else -1,'world_min':max(-2**31,min(2**31-1,context[0]+[-8,0,8][index%3]))} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-placement-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlacementOracle.java" + sources=[oracle,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/placement_fixture.rs",lab.ROOT/"crates/horizon-world/examples/support/placement_queries.rs"] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus());inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths);classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") + run(["cargo","build","--release","-p","horizon-world","--example","placement_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("placement_fixture.exe" if os.name=="nt" else "placement_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaPlacementOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} placement output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"modifier_kinds":17,"predicate_kinds":5,"definitions":len(list(definitions())),"requested_modifications":sum(len(f["positions"]) for f in fixtures if not f["count_only"]),"requested_counts":sum(len(f["positions"]) for f in fixtures if f["count_only"]), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual PlacementModifier.CODEC parsing and modify callbacks for count, in-square, offset, height-range, rarity, random-chance, fixed-position randomly-selected, heightmap, surface-relative-threshold and surface-water-depth modifiers, plus native noise-based and noise-threshold repeating counts and cuboid placement with edge/interior controls and count-on-every-layer scans, predicate filters and environment scans. Logical and inside-world-bounds predicates preserve short-circuiting and offset wrapping; traced world-bound queries expose scan termination, final target tests and failures. Layer scanning uses traced synthetic block strata containing air variants, water/lava, ordinary ground, bubble columns and bedrock; callbacks and injected height/block failures preserve query order and random consumption. Both random modes, repeated calls, zero counts, inclusive provider bounds, nested random choices, anchored and overflowing coordinates, same-chunk fixed filtering, duplicates, malformed fields and failing consumers. Consumer callbacks optionally draw from the shared random stream; subsequent nextLong values verify exact consumption. Contexts use an actual PlacementContext with a traced WorldGenLevel proxy and native noise generator. Heightmap queries use traced synthetic world responses, ordinary/extreme heights and injected query failures; world minimum and generation minimum can differ. Noise count-only calls include extreme ratios, factors, offsets and thresholds without expanding huge position lists. Additional block predicates, biome filtering, configured features, provider encoders, Gaussian providers and complete world generation remain pending."} + + lab.write_json(report_path,report);print(f"Scoped placement parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_player_equipment_parity.py b/tools/test_player_equipment_parity.py new file mode 100644 index 000000000..f0a06a2f7 --- /dev/null +++ b/tools/test_player_equipment_parity.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 +"""Compare native PlayerEquipment transfers, shared stack identity and change callbacks.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + edges=[-2147483648,-1,0,1,2,5,2147483647] + kinds=['get-hand','set-hand','get-item','set-item','set-equipment','clear-equipment','clear','select','get','set','count','alias','copy'] + def op(kind,**kw): + v=dict(kind=kind,a=0,b=3,slot=0,hand=0,equipment=0,amount=1,fail=False,mutate=False,mutate_ref=0,after_count=2,after_selected=8,replace_slot=0,replace_ref=1);v.update(kw);return v + def row(ops,**kw): + v=dict(stacks=[dict(item=1,count=2,pop=5),dict(item=2,count=1,pop=2),dict(item=1,count=1,pop=0),dict(item=-1,count=0,pop=0)],slots=[[0,0],[1,0],[8,1],[35,2]],equipment=[[0,0],[1,1],[7,2]],raw_entries=[],selected=0,ops=ops);v.update(kw);return v + for kind in kinds: + for equipment in range(8): + for count in edges: + for hand in [0,1]: + v=row([op(kind,equipment=equipment,hand=hand,amount=count),op('select',slot=8),op('get-hand',hand=0)]) + v['stacks'][0]['count']=count + yield v + for kind in ['set-item','set-hand']: + for equipment in range(8): + for hand in [0,1]: + for fail in [False,True]: + for mutate in [False,True]: + for selected in [-1,0,8,9]: + yield row([op(kind,equipment=equipment,hand=hand,fail=fail,mutate=mutate,after_selected=selected),op('get-hand',hand=0)]) + for raw in [[],[[0,0]],[[0,3]]]: + yield row([op('clear-equipment'),op('set-equipment',equipment=0),op('clear-equipment'),op('clear')],raw_entries=raw) + rng=random.Random(0x45515549504d454e) + for _ in range(1600): + yield row([op(rng.choice(kinds),a=rng.randrange(4),b=rng.randrange(4),slot=rng.choice([-1,0,8,9,35,36,40,42,43]),hand=rng.randrange(2),equipment=rng.randrange(8),amount=rng.choice(edges),fail=bool(rng.randrange(2)),mutate=bool(rng.randrange(2)),mutate_ref=rng.randrange(4),after_count=rng.choice(edges),after_selected=rng.choice([-1,0,8,9]),replace_slot=rng.choice([-1,0,8,40]),replace_ref=rng.randrange(4)) for __ in range(15)],stacks=[dict(item=rng.randrange(-1,3),count=rng.choice(edges),pop=rng.choice(edges)) for __ in range(4)],slots=[[i,rng.randrange(4)] for i in rng.sample(range(43),rng.randrange(44))],equipment=[[i,rng.randrange(4)] for i in rng.sample(range(8),rng.randrange(9))],raw_entries=[[0,rng.randrange(4)]] if rng.randrange(2) else [],selected=rng.randrange(9)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-player-equipment-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerEquipmentOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/player_equipment_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaPlayerEquipmentOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','player_equipment_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('player_equipment_fixture.exe' if os.name=='nt' else 'player_equipment_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} player equipment output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual PlayerEquipment get/set/isEmpty and inherited LivingEntity hand/slot access over a real Inventory and shared ItemStack references. Equipment changes write storage before the controlled onEquipItem callback; mutations/failures and main-hand selection changes retain native prefixes. Raw enum-map main-hand entries exercise base storage independently from the selected main-hand override. Full onEquipItem effects, synchronized flags, active-use integration and complete gameplay integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped player equipment parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_player_food_parity.py b/tools/test_player_food_parity.py new file mode 100644 index 000000000..489e1787a --- /dev/null +++ b/tools/test_player_food_parity.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python3 +"""Compare player hunger guards, exhaustion and direct/virtual state binding with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>f',v).hex() + def state(food=20,other=0,invulnerable=False,mayfly=False,client=False,direct=0,virtual=1,exhaustion=0):return dict(foods=[dict(food=food,exhaustion=bits(exhaustion)),dict(food=other,exhaustion=bits(exhaustion))],invulnerable=invulnerable,mayfly=mayfly,client=client,direct=direct,virtual=virtual) + def row(mode,initial,**kw): + f=dict(mode=mode,initial=initial,after=state(1,20,True,True,False,1,0,7),amount=bits(.1),always=False,stored=False,fail=-1,mutate_at=-1);f.update(kw);return f + foods=[-2**31,-1,0,1,5,6,7,19,20,21,2**31-1] + values=[-float('inf'),-1e30,-1,-0.,0.,1e-40,.1,1,39.9,40,1e30,float('inf'),float('nan')] + for food in foods: + for flags in range(32): + initial=state(food,6,flags&1!=0,flags&2!=0,flags&4!=0,(flags>>3)&1,(flags>>4)&1) + for mode in ['exhaust','eat','enough']: + for always in [False,True]:yield row(mode,initial,always=always) + for flags in range(8): + for mode in ['exhaust','eat','enough']: + for fail in range(-1,5): + for mutation in range(-1,5):yield row(mode,state(0,0,flags&1!=0,flags&2!=0,flags&4!=0),fail=fail,mutate_at=mutation) + for v in values: + for exhaustion in values: + for stored in [False,True]:yield row('exhaust',state(20,0,virtual=0,exhaustion=exhaustion),amount=bits(v),stored=stored) + rng=random.Random(0x504c4159464f4f44) + for _ in range(2500): + stored=bool(rng.randrange(2));initial=state(rng.choice(foods),rng.choice(foods),bool(rng.randrange(2)),bool(rng.randrange(2)),bool(rng.randrange(2)),0 if stored else rng.randrange(2),0 if stored else rng.randrange(2),rng.choice(values)) + yield row(rng.choice(['exhaust','eat','enough']),initial,amount=bits(rng.choice(values)),always=bool(rng.randrange(2)),stored=stored,fail=-1 if stored else rng.choice([-1,-1,0,1,2,3]),mutate_at=-1 if stored else rng.choice([-1,-1,0,1,2])) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-player-food-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerFoodOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/player_food_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaPlayerFoodOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','player_food_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('player_food_fixture.exe' if os.name=='nt' else 'player_food_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} player food output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Player causeFoodExhaustion/canEat/hasEnoughFoodToDoExhaustiveManoeuvres with native FoodData. Direct abilities/food fields versus virtual food/ability getters, captured food identity across callbacks, client/server and invulnerability guards, mutations/failures, nonfinite exhaustion and integer hunger boundaries. Also tests the ordinary stored-food binding. Consumable/item components, abilities persistence and live player tick remain pending.'} + lab.write_json(report_path,report);print(f'Scoped player food parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_player_health_parity.py b/tools/test_player_health_parity.py new file mode 100644 index 000000000..c1d5a1ad9 --- /dev/null +++ b/tools/test_player_health_parity.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +"""Compare registered player health and synchronized absorption with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(catalog): + def bits(v):return struct.pack('>f',v).hex() + def double(v):return struct.pack('>d',v).hex() + def op(mode,value=0,**kw): + o=dict(mode=mode,value=bits(value),amount=double(0),attribute=0,id='horizon:a',operation=0,values=[],fail=-1,pack_callback=False);o.update(kw);return o + def row(health,absorption,ops,dead=False):return dict(health=bits(health),absorption=bits(absorption),ops=ops,dead=dead) + values=[-float('inf'),-1e30,-1,-0.,0.,1e-40,.1,1,5,10,20,1e30,float('inf'),float('nan')] + for start in values: + for maximum in values: + for value in values: + yield row(start,start,[op('base',amount=double(maximum)),op('base',attribute=1,amount=double(maximum)),op('set',value),op('absorption',value),op('get-absorption'),op('hurt'),op('dead'),op('pack'),op('heal',value),op('defaults'),op('pack')]) + for fail in range(-1,6): + for pack in [False,True]: + ops=[op('base',attribute=1,amount=double(20)),op('set',9),op('absorption',5),op('pack'),op('set',1),op('assign',values=[dict(field=0,value=bits(20)),dict(field=1,value=bits(7)),dict(field=0,value=bits(10))]),op('pack')] + yield row(1,0,[dict(o,fail=fail,pack_callback=pack) for o in ops]) + rng=random.Random(0x504c415945524850) + for _ in range(1500): + ops=[] + for __ in range(rng.randrange(5,70)): + ops.append(op(rng.choice(['set','heal','absorption','get-absorption','hurt','dead','base','add','remove','reset','pack','defaults','assign']),rng.choice(values),attribute=rng.randrange(2),amount=double(rng.choice(values)),operation=rng.randrange(3),id=rng.choice(['horizon:a','horizon:b']),values=[dict(field=rng.randrange(2),value=bits(rng.choice(values))) for ___ in range(rng.randrange(5))],fail=rng.choice([-1,-1,-1,0,1,2]),pack_callback=bool(rng.randrange(2)))) + yield row(rng.choice(values),rng.choice(values),ops,bool(rng.randrange(2))) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-player-health-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerHealthOracle.java' + helper=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java' + sources=[oracle,helper,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/player_health_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,helper],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaPlayerHealthOracle',mode,path],side+'-'+mode) + java('server','export',build);states=json.loads((build/'catalog.json').read_text());fixtures=list(corpus(states));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'catalog.json',build/'ids.json'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','player_health_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('player_health_fixture.exe' if os.name=='nt' else 'player_health_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} player health output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Player health/absorption methods using registered player AttributeMap and one SynchedEntityData table. Exports actual health/absorption field IDs; compares modified attribute limits, healing, player absorption getter/setter, dirty/default extraction, received updates, callback packet drains and failures. Observer side effects are controlled; custom virtual data replacement, other synchronized serializers, wire codecs and full player damage/tick integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped player health parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_player_hurt_parity.py b/tools/test_player_hurt_parity.py new file mode 100644 index 000000000..95c2f3272 --- /dev/null +++ b/tools/test_player_hurt_parity.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python3 +"""Compare player and server-player outer hurt gates with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def living_corpus(): + def bits(v):return struct.pack('>f',v).hex() + def op(damage=8,**kw): + o=dict(damage=bits(damage),blocked=bits(0),fail=-1,game_time=123456789,hit_cooldown=3,hit_last=bits(99),hit_duration=2,hit_time=1,effects=0,**{k:False for k in ['invulnerable','dead_before','dead_after','fire','fire_resistance','sleeping','component','freezing','freeze_extra','damages_helmet','helmet','bypasses_cooldown','no_impact','no_knockback','bypasses_invulnerability','mutate_hit']});o.update(kw);return o + def row(ops,**kw): + f=dict(ops=ops,no_action=83,cooldown=0,last_hurt=bits(0),duration=7,time=9,stamp=-3,source=False,player=False);f.update(kw);return f + values=[-float('inf'),-1e30,-1,-0.,0.,1e-40,.1,1,5,10,20,1e30,float('inf'),float('nan')] + for v in values: + for block in values: + for cooldown in [-2147483648,0,10,11,2147483647]: + for player in [False,True]: + yield row([op(v,blocked=bits(block),effects=2),op(v,blocked=bits(block),component=True),op(v,blocked=bits(block),dead_after=True)],cooldown=cooldown,player=player,last_hurt=bits(v)) + for fail in range(-1,38): + for cooldown in [0,10,11,20]: + for dead in [False,True]: + for component in [False,True]: + yield row([op(21,fail=fail,sleeping=True,freezing=True,freeze_extra=True,damages_helmet=True,helmet=True,blocked=bits(2),component=component,dead_after=dead,effects=3,mutate_hit=True),op(22)],player=True,cooldown=cooldown) + rng=random.Random(0x4855525453455256) + for _ in range(3000): + ops=[] + for __ in range(rng.randrange(1,20)): + o=op(rng.choice(values),blocked=bits(rng.choice(values)),effects=rng.randrange(4),game_time=rng.choice([-9223372036854775808,-1,0,9223372036854775807]),fail=rng.choice([-1,-1,-1,*range(38)]),hit_last=bits(rng.choice(values)),hit_cooldown=rng.randrange(-30,31)) + for k in ['invulnerable','dead_before','dead_after','fire','fire_resistance','sleeping','component','freezing','freeze_extra','damages_helmet','helmet','bypasses_cooldown','no_impact','no_knockback','bypasses_invulnerability','mutate_hit']:o[k]=rng.randrange(4)==0 + ops.append(o) + yield row(ops,cooldown=rng.choice([-2147483648,0,10,11,20,2147483647]),last_hurt=bits(rng.choice(values)),source=bool(rng.randrange(2)),player=bool(rng.randrange(2))) + + +def corpus(): + rng=random.Random(0x504c415948555254) + for f in living_corpus(): + f['server']=bool(rng.randrange(2)) + for o in f['ops']: + o.update(ability_invulnerable=bool(rng.randrange(2)),scales=bool(rng.randrange(2)),difficulties=[rng.randrange(4) for _ in range(3)],attacker=rng.randrange(4),owner=rng.randrange(3),can_harm=bool(rng.randrange(2))) + yield f + template=next(living_corpus()) + import copy + values=[-float('inf'),-1e30,-1,-0.,0.,1e-40,.1,1,5,10,20,1e30,float('inf'),float('nan')] + for damage in values: + for a in range(4): + for b in range(4): + for c in range(4): + f=copy.deepcopy(template);f.update(server=True,cooldown=0,last_hurt='00000000');o=f['ops'][0];o.update(damage=struct.pack('>f',damage).hex(),blocked='00000000',ability_invulnerable=False,scales=True,difficulties=[a,b,c],attacker=0,owner=0,can_harm=True);f['ops']=[o];yield f + for fail in range(-1,48): + for attacker in range(4): + for owner in range(3): + f=copy.deepcopy(template);f.update(server=True,cooldown=0,last_hurt='00000000');o=f['ops'][0];o.update(damage='41200000',blocked='3f800000',ability_invulnerable=True,bypasses_invulnerability=True,scales=True,difficulties=[2,1,3],attacker=attacker,owner=owner,can_harm=True,fail=fail);f['ops']=[o];yield f + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-player-hurt-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerHurtOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/player_hurt_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaPlayerHurtOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','player_hurt_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('player_hurt_fixture.exe' if os.name=='nt' else 'player_hurt_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} player hurt output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Player and ServerPlayer hurtServer methods on ServerPlayer receivers through native LivingEntity dispatch. Ability/invulnerability ordering, shoulder removal, three difficulty queries, PvP player/arrow-owner gates, repeated hits, non-finite values and callback failures. Native downstream living dispatch uses controlled inner damage/blocking/effects/death services and empty victim criterion listeners. Rules/source registries, actual PvP team permissions, successful totems, attacker server-player criteria and complete player lifecycle remain pending.'} + lab.write_json(report_path,report);print(f'Scoped player hurt parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_player_inventory_parity.py b/tools/test_player_inventory_parity.py new file mode 100644 index 000000000..808691ab9 --- /dev/null +++ b/tools/test_player_inventory_parity.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python3 +"""Compare native PlayerInventory transfers, shared stack identity and change callbacks.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + kinds=['get','set','remove','no-update','remove-ref','select','selected','set-selected','remove-selected','pick','add-pick','clear','changed','replace','equip','get-equip','alias','copy','count','component'] + edges=[-2147483648,-1,0,1,2,8,9,35,36,39,40,41,42,43,64,2147483647] + def op(kind,**kw): + v=dict(kind=kind,inventory=0,other=1,a=0,b=3,slot=0,amount=1,all=False,equipment=0,key=0,value=64);v.update(kw);return v + def stack(item,count,patch=None):return dict(item=item,count=count,pop=7,patch=patch or []) + def row(ops,count=5,slots=None,selected=0):return dict(prototypes=[[],[[0,64]],[[0,1],[1,0],[2,100]]],stacks=[stack(1,count),stack(1,60),stack(2,1),stack(-1,0)],equipment_order=list(range(7)),shared_equipment=False,inventories=[dict(selected=selected,changed=2147483647,mainhand=0,slots=slots if slots is not None else [[0,0],[8,1],[35,2],[36,2],[40,0],[42,1]]),dict(selected=8,changed=0,mainhand=-1,slots=[[2,1],[39,0]])],ops=ops) + for kind in kinds: + for slot in edges: + for amount in [-2147483648,-1,0,1,64,2147483647]: + yield row([op(kind,slot=slot,amount=amount),op('changed'),op('copy'),op('count',a=3,amount=3)]) + for enchanted in [False,True]: + for selected in range(9): + for free in [-1,0,1,8,9,35]: + for kind in ['pick','add-pick','replace','remove-ref','remove-selected']: + slots=[[i,1] for i in range(43) if i!=free] + v=row([op(kind,slot=35),op('replace',other=0)],slots=slots,selected=selected) + if enchanted:v['stacks'][1]['patch']=[[4,1]] + yield v + rng=random.Random(0x504c41594552494e) + def integer():return rng.choice(edges) if rng.randrange(2) else rng.randrange(-2147483648,2147483648) + def value(k):return 0 if k==3 else rng.randrange(2) if k==4 else integer() + def patch():return [[k,rng.choice([None,value(k)])] for k in rng.sample(range(6),rng.randrange(7))] + for _ in range(1500): + prototypes=[[[k,value(k)] for k in rng.sample(range(6),rng.randrange(7))] for __ in range(3)] + stacks=[dict(item=rng.randrange(-1,3),count=integer(),pop=integer(),patch=patch()) for __ in range(4)] + inventories=[dict(selected=rng.randrange(9),changed=integer(),mainhand=rng.randrange(-1,4),slots=[[i,rng.randrange(4)] for i in rng.sample(range(43),rng.randrange(44))]) for __ in range(2)] + ops=[] + for __ in range(18): + k=rng.randrange(6) + ops.append(op(rng.choice(kinds),inventory=rng.randrange(2),other=rng.randrange(2),a=rng.randrange(4),b=rng.randrange(4),slot=rng.choice(edges) if rng.randrange(2) else rng.randrange(43),amount=integer(),all=bool(rng.randrange(2)),equipment=rng.randrange(8),key=k,value=rng.choice([None,value(k)]))) + yield dict(prototypes=prototypes,stacks=stacks,inventories=inventories,equipment_order=rng.sample(range(7),7),shared_equipment=bool(rng.randrange(2)),ops=ops) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-player-inventory-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerInventoryOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/player_inventory_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaPlayerInventoryOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','player_inventory_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('player_inventory_fixture.exe' if os.name=='nt' else 'player_inventory_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} player inventory output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual player Inventory storage, equipment, selected slots, hotbar picking, matching/crafting eligibility, reference removals, clear/replacement, counts and change counter. Actual ItemStack components cover damage, unbreakable, one enchantment and custom names; fixture-controlled equipment-map iteration order isolates native JVM Map.of random ordering. Shared stack and equipment references are traced across two inventories, including self-replacement and failures after selection changes. Pickup, item/equipment ticks, menus, recipes, persistence, arbitrary virtual overrides, full components and complete gameplay integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped player inventory parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_player_travel_parity.py b/tools/test_player_travel_parity.py new file mode 100644 index 000000000..22926f6f0 --- /dev/null +++ b/tools/test_player_travel_parity.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python3 +"""Compare Player travel wrapper and flying speed with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>d',float(v)).hex() + def single(v):return struct.pack('>f',float(v)).hex() + def row(**kw): + f=dict(mode='travel',input=[.2,0,.8],velocity=[.1,-.08,.2],position=[.3,64,-.3],look=[0,.5,1],after_velocity=[17,18,19],after_position=[17,-64,-33],after_flying=False,base_velocity=[31,32,33],base_flying=False,base_mutate=True,passenger=False,swimming=True,jumping=False,empty=False,flying=True,sprint=False,speed=.05,fail=-1,mutate_at=-1) + f.update(kw) + for k in ['input','velocity','position','look','after_velocity','after_position','base_velocity']:f[k]=[bits(v) for v in f[k]] + f['speed']=single(f['speed']);return f + vals=[-float('inf'),-1e30,-1,-.20000000001,-.2,-.19999999999,-1e-40,-0.0,0,1e-40,.1,.5,1,1e30,float('inf'),float('nan')] + for y in vals: + for mask in range(128): + flags={k:bool(mask&(1<d',value).hex() + epsilon=struct.unpack('>f',struct.pack('>f',1e-5))[0] + modes=['empty','position','player','marker','falling','factory_player','factory_marker','placement','placement_null','with_player','with_marker','with_falling','with_null'] + distances=[-math.inf,-1.0,-0.0,0.0,math.nextafter(2.5,-math.inf),2.5,math.nextafter(2.5,math.inf),100.0,math.inf,math.nan] + def row(mode,y,block_y,fall,tag,item,count,descending,fail=-1): + return {'mode':mode,'y':bits(y),'other':bits(y),'descending':descending,'always':True,'item':0,'count':0,'stand':False,'fail':False,'powder':[block_y,bits(fall),tag,item,count,fail]} + for block_y in [-2147483648,0,2147483647]: + threshold=(block_y+1.0)-epsilon + heights=[math.nextafter(threshold,-math.inf),threshold,math.nextafter(threshold,math.inf),block_y+1.0,block_y-0.5,block_y+2.0,math.inf,math.nan] + for mode in modes: + for fall in distances: + for tag in [False,True]: + for item,count in [(0,0),(4,0),(4,1),(4,-1),(1,1)]: + for descending in [False,True]: + for y in heights: + yield row(mode,y,block_y,fall,tag,item,count,descending) + for mode in modes: + for fall in [0.0,2.5,3.0]: + for tag in [False,True]: + for item in [1,4]: + for descending in [False,True]: + for fail in [0,1,2]: + yield row(mode,1.0,0,fall,tag,item,1,descending,fail) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-powder-snow-collision-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java' + helpers=[oracle.with_name('VanillaFaceSupportOracle.java')] + runner=lab.ROOT/'tools/test_collision_context_parity.py' + sources=[oracle,*helpers,runner,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/collision_context_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,*helpers],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaCollisionContextOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','collision_context_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('collision_context_fixture.exe' if os.name=='nt' else 'collision_context_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} powder-snow-collision output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'block_states':1,'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Native PowderSnowBlock contextual collision and canEntityWalkOnPowderSnow decisions with controlled entity metadata, entity-tag membership and equipment snapshots. Checks empty/position/player/nonliving/falling-block/placement contexts, fall-distance and top-height adjacent doubles, nonfinite values, descending, boot identity/count and lazy tag/equipment callbacks with injected failures. Full selected shape geometry and query traces match. Entity tag loading, entity lifecycle, freezing/sinking and live movement remain pending.'} + lab.write_json(report_path,report);print(f'Scoped powder-snow collision parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_quad_reuse.py b/tools/test_quad_reuse.py index e4ed5d995..baa95c387 100644 --- a/tools/test_quad_reuse.py +++ b/tools/test_quad_reuse.py @@ -29,7 +29,7 @@ def main(): args = parser.parse_args() root = build_pack.ROOT fixture = build_mod.build_integration_fixture("quad-reuse", "dev.horizonlab.dispatch.QuadReuseIntegration") - mod = root / "dist" / f"horizon-lab-{build_pack.read_lock()['pack_version']}.jar" + mod = root / "dist" / f"horizon-{build_pack.read_lock()['pack_version']}.jar" original_sha256 = hashlib.sha256(mod.read_bytes()).hexdigest() results = [] for enabled in [False, True]: diff --git a/tools/test_quad_sizes.py b/tools/test_quad_sizes.py index 485f5af6f..51650e373 100644 --- a/tools/test_quad_sizes.py +++ b/tools/test_quad_sizes.py @@ -42,7 +42,7 @@ def main(): root = build_pack.ROOT agent = build_agent() fixture = build_mod.build_integration_fixture("quad-size", "dev.horizonlab.dispatch.QuadSizeIntegration") - mod = root / "dist" / f"horizon-lab-{build_pack.read_lock()['pack_version']}.jar" + mod = root / "dist" / f"horizon-{build_pack.read_lock()['pack_version']}.jar" mod_hash = hashlib.sha256(mod.read_bytes()).hexdigest() results = [] for headers in [False, True]: diff --git a/tools/test_registered_entity_fluid_parity.py b/tools/test_registered_entity_fluid_parity.py new file mode 100644 index 000000000..5b54d8da6 --- /dev/null +++ b/tools/test_registered_entity_fluid_parity.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 +"""Compare registered entity immersion, support and current composition.""" +import itertools +import json +import os +from pathlib import Path +import platform +import random +import struct +import subprocess +import zipfile +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +try: + from . import test_entity_fluid_parity as immersion +except ImportError: + import test_entity_fluid_parity as immersion + +def corpus(info): + import copy + seed=next(immersion.corpus())['ops'][0] + defaults=info['defaults'];states=info['states'];air=defaults['minecraft:air'];water=defaults['minecraft:water'];lava=defaults['minecraft:lava'];stone=defaults['minecraft:stone'] + def bits(v):return struct.pack('>d',float(v)).hex() + def cell(state):return dict(seed['default'],state=state) + def op(**kw): + v=copy.deepcopy(seed);v.update(mode='registered',default=cell(air),cells={},eye=bits(.9),block_tag=0);v.update(kw);return v + def row(ops,player=False,order=(0,1,2)):return dict(ops=ops,player=player,order=order) + for state in range(len(states)): + for cells in [{'0 0 0':cell(state)},{'0 0 0':cell(water),'0 1 0':cell(state)}]: + yield row([op(cells=cells),op(mode='apply',tag=0),op(mode='apply',tag=1),op(bounds=None),op(bounds=None)]) + special=[defaults['minecraft:'+n] for n in ['air','stone','water','lava','ice','frosted_ice','blue_ice','packed_ice','shulker_box','moving_piston','scaffolding','bamboo','oak_slab','powder_snow','pointed_dripstone']] + liquids=[i for i,s in enumerate(states) if s['id'] in ['minecraft:water','minecraft:lava']] + rng=random.Random(0x454e54524547464c) + for _ in range(4000): + ops=[] + for i in range(rng.randrange(1,5)): + cells={f'{x} {y} {z}':cell(rng.choice(special+liquids)) for x in range(-1,3) for y in range(-1,3) for z in range(-1,3)} + ops.append(op(bounds=[bits(v) for v in [0,0,0,2,2,2]],cells=cells,base_y=bits(rng.choice([-.1,0,.1,.4,1])),eye=bits(rng.choice([0,.1,.4,8/9,1,1.5,2])),block_tag=rng.randrange(3),tags=[rng.randrange(32) for _ in range(4)],ignore=bool(rng.randrange(2)),fail=rng.choice([-1,-1,*range(50)]),mutate_at=rng.choice([-1,-1,*range(35)]))) + ops.extend([op(mode='apply',tag=0),op(mode='apply',tag=1)]) + yield row(ops,bool(rng.randrange(2)),rng.sample(range(4),rng.randrange(5))) + for root in liquids: + for fail in range(-1,35): + for sturdy in [air,stone,defaults['minecraft:shulker_box']]: + yield row([op(cells={'0 0 0':cell(root),'0 1 0':cell(sturdy),'1 -1 0':cell(root)},fail=fail),op(mode='apply',tag=0),op(mode='apply',tag=1)]) + + +def main(): + lock,jars,libraries=base.verify_artifacts();build=lab.LOCAL/'rust-registered-entity-fluid-parity';build.mkdir(exist_ok=True);report_path=build/'report.json';report_path.unlink(missing_ok=True) + root=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity';oracles=[root/(n+'.java') for n in ['VanillaRegisteredEntityFluidOracle','VanillaEntityFluidOracle','VanillaRegistryFluidOracle','VanillaHeightmapOracle','VanillaBlockSupportOracle','VanillaCollisionOracle','VanillaBlockStateCodecOracle']] + sources=[*oracles,Path(__file__),lab.ROOT/'tools/test_entity_fluid_parity.py',lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/test_worldgen_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-world/examples/entity_fluid_fixture.rs'] + for crate in ['horizon-core','horizon-world']:sources += [lab.ROOT/'crates'/crate/'Cargo.toml',*sorted((lab.ROOT/'crates'/crate/'src').rglob('*.rs'))] + tested=base.source_hashes(sources);tags=worldgen.tag_resources(jars['server']) + if tags!=worldgen.tag_resources(jars['client']):raise AssertionError('Native tags differ between artifacts') + lab.write_json(build/'tags.json',tags);classes=build/'classes';classes.mkdir(exist_ok=True);dependencies=os.pathsep.join(map(str,libraries)) + def run(command,name): + with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependencies,'-d',classes,*oracles],'compile-java') + def java(side,mode):run(['java','-Xmx768M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependencies]),'dev.horizonlab.parity.VanillaRegisteredEntityFluidOracle',mode,build],side+'-'+mode) + java('server','export');info=json.loads((build/'facts.json').read_text());count=0 + if len(info['states'])!=35723:raise AssertionError('Incomplete pinned registry') + with (build/'inputs.txt').open('w') as output: + for f in corpus(info):output.write(json.dumps(f,separators=(',',':'))+'\n');count+=1 + fixture_paths=[build/n for n in ['inputs.txt','facts.json','fluid-info.json','block-registry.nbt','cached-support.nbt','tags.json']];fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--locked','--release','-p','horizon-world','--example','entity_fluid_fixture'],'compile-rust');metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('entity_fluid_fixture.exe' if os.name=='nt' else 'entity_fluid_fixture');run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side);matched=base.compare(build/(side+'.txt'),build/'rust.txt');references.append(dict(side=side,jar_sha256=lab.digest(jar,'sha256'),output_sha256=lab.digest(build/(side+'.txt'),'sha256'),matched_output_lines=matched));print(f'{side}: {matched:,} registered entity fluid output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested);base.ensure_sources_unchanged(fixture_paths,fixtures) + report=dict(schema=1,minecraft=lock['minecraft']['version'],manifest_sha1=lock['minecraft']['manifest_sha1'],platform=platform.platform(),java=subprocess.check_output(['java','--version'],text=True).splitlines()[0],rustc=subprocess.check_output(['rustc','--version'],text=True).strip(),fixtures=count,registry_states=len(info['states']),sources_sha256=tested,fixtures_sha256=fixtures,rust_output_sha256=lab.digest(build/'rust.txt','sha256'),references=references,scope='Actual EntityFluidInteraction update and current application with registered contained fluids, native height/camera/current calculations and cached/dynamic block support. All registered states in immersed cells and above-eye support cells; mixed water/lava grids, ordered/reloaded tags, retained trackers, current velocities, callback mutations and failures. Chunk presence/section wet flags and cell storage are controlled; block entities are absent. Live chunk/entity lifecycle, fluid propagation and complete playable gameplay remain pending.') + lab.write_json(report_path,report);print(f'Scoped registered entity fluid parity passed: {report_path}',flush=True) + + +if __name__=='__main__':main() diff --git a/tools/test_registered_player_combat_parity.py b/tools/test_registered_player_combat_parity.py new file mode 100644 index 000000000..bf709fbe8 --- /dev/null +++ b/tools/test_registered_player_combat_parity.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python3 +"""Compare registered damage sources through native server-player combat.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +import zipfile +try: + from . import lab, test_rust_parity as base, test_server_player_combat_parity as combat +except ImportError: + import lab + import test_rust_parity as base + import test_server_player_combat_parity as combat + + +def corpus(catalog,damage): + import copy + rng=random.Random(0x524547434f4d4241) + names=[d['id'] for d in damage['types']] + for f in combat.corpus(catalog): + for o in f['ops']:o.update(source_type=rng.choice(names),direct=rng.randrange(4)) + yield f + template=next(combat.corpus(catalog));base=copy.deepcopy(template['ops'][0]);base.update(damage='41000000',blocked='00000000',fail=-1,removed=False,permanent=False,temporary=False,ability_invulnerable=False,client=False,fire_immune=False,fall_immune=False,rule_drowning=True,rule_fall=True,rule_fire=True,rule_freeze=True,loaded=True,changing=False,creative=False,sleeping=False,can_harm=True,weapon=True,owner=1,difficulties=[2,2,2],reset_cooldown=True) + for name in names: + for direct in range(4): + for attacker in range(4): + for absorption in ['00000000','40800000']: + f=copy.deepcopy(template);f.update(health='41a00000',absorption=absorption,exhaustion='00000000',cooldown=0,last_hurt='00000000',dead=False);f['ops']=[dict(base,source_type=name,direct=direct,attacker=attacker,damage=struct.pack('>f',v).hex()) for v in [1,3,8,20]];yield f + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-registered-player-combat-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + damage_dir=build/'damage';damage_dir.mkdir(exist_ok=True) + with zipfile.ZipFile(jars['server']) as archive: + for file,prefix in [('types.json','data/minecraft/damage_type/'),('tags.json','data/minecraft/tags/damage_type/')]: + resources={'minecraft:'+n[len(prefix):-5]:archive.read(n).decode('utf-8') for n in sorted(archive.namelist()) if n.startswith(prefix) and n.endswith('.json')};lab.write_json(damage_dir/file,resources) + + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegisteredPlayerCombatOracle.java' + helper=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java' + health_helper=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerHealthOracle.java' + damage_helper=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDamageSourceOracle.java' + sources=[oracle,helper,health_helper,damage_helper,lab.ROOT/'tools/test_server_player_combat_parity.py',Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/test_player_hurt_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/registered_player_combat_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,helper,health_helper,damage_helper],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaRegisteredPlayerCombatOracle',mode,path],side+'-'+mode) + java('server','export',build);states=json.loads((build/'catalog.json').read_text());damage=json.loads((damage_dir/'catalog.json').read_text());fixtures=list(corpus(states,damage));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'catalog.json',build/'ids.json',build/'slots.json',build/'head.json',damage_dir/'catalog.json',damage_dir/'types.json',damage_dir/'tags.json'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','registered_player_combat_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('registered_player_combat_fixture.exe' if os.name=='nt' else 'registered_player_combat_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} registered player combat output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'All 51 bundled registered damage types and 36 native-resolved tags drive the actual ServerPlayer damage chain, immunity, difficulty scaling, armor/resistance, exhaustion, health/absorption and hurt state. Direct/causing entity identity and creative-source abilities use real DamageSource methods. Equipment is unenchanted; virtual flags/rule values, blocking amount, durability, PvP permission, attribution/effect/knockback/death services and empty criterion listeners are controlled. No full entity lifecycle, enchantments, death messages or playable integration claim.'} + lab.write_json(report_path,report);print(f'Scoped registered player combat parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_registry_collision_scan_parity.py b/tools/test_registry_collision_scan_parity.py new file mode 100644 index 000000000..633ffe9cd --- /dev/null +++ b/tools/test_registry_collision_scan_parity.py @@ -0,0 +1,121 @@ +#!/usr/bin/env python3 +"""Compare registry-bound collision scans over resident chunks with pinned vanilla.""" +import collections +import json +import os +from pathlib import Path +import platform +import subprocess +import struct +import random +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(facts): + def bits(v):return struct.pack('>d',float(v)).hex() + def row(state, context=0, suffocating=False, at=(0,0,0), bounds=None, entities=(0,0), fail=-1, limit=100000): + x,y,z=at + chunks=[[cx,cz] for cx in range((x>>4)-1,(x>>4)+2) for cz in range((z>>4)-1,(z>>4)+2)] + if bounds is None:bounds=[x+0.2,y+0.2,z+0.2,x+0.8,y+0.8,z+0.8] + return dict(chunks=chunks,blocks=[[*at,state]],context=context,suffocating=suffocating, + box=list(map(bits,bounds)),y=bits(y+1.0),entities=entities,fail=fail,limit=limit) + states=facts['states'] + for state in range(len(states)): + for suffocating in [False,True]:yield row(state,state%4,suffocating) + dynamic=[i for i,s in enumerate(states) if s['id'].endswith('shulker_box') or s['id'] in + ['minecraft:scaffolding','minecraft:water','minecraft:lava','minecraft:powder_snow', + 'minecraft:moving_piston','minecraft:bamboo','minecraft:pointed_dripstone','minecraft:sulfur_spike', + 'minecraft:piston','minecraft:sticky_piston','minecraft:oak_stairs','minecraft:stone_slab']] + for state in dynamic: + for context in range(4): + for suffocating in [False,True]: + for at in [(15,0,15),(-16,-1,-16)]:yield row(state,context,suffocating,at=at) + if states[state]['id'].endswith('shulker_box'): + for global_mode in range(3): + for chunk_mode in range(3): + for suffocating in [False,True]: + for fail in [-1,0,1,8,15,20,24]: + yield row(state,suffocating=suffocating,entities=(global_mode,chunk_mode),fail=fail) + rng=random.Random(0x5245534944454e54) + for index in range(1500): + at=rng.choice([(15,0,15),(-16,0,-16),(0,-16,0),(0,31,0)]) + x,y,z=at + f=row(rng.randrange(len(states)),context=index%4,suffocating=bool(index%2),at=at, + bounds=[x-0.2,y-0.2,z-0.2,x+1.2,y+1.2,z+1.2], + entities=(rng.randrange(3),rng.randrange(3)),fail=rng.choice([-1,-1,0,5,20,50]),limit=rng.choice([0,1,3,100000])) + f['chunks']=[c for c in f['chunks'] if c==[x>>4,z>>4] or rng.randrange(2)] + for _ in range(12): + px,pz=x+rng.randrange(-1,2),z+rng.randrange(-1,2) + py=min(31,max(-16,y+rng.randrange(-1,2))) + if [px>>4,pz>>4] in f['chunks']:f['blocks'].append([px,py,pz,rng.choice(dynamic)]) + yield f + + +def main(): + lock, jars, libraries = base.verify_artifacts() + build = lab.LOCAL/'rust-registry-collision-scan-parity';build.mkdir(exist_ok=True) + report_path = build/'report.json';report_path.unlink(missing_ok=True) + oracle = lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java' + helpers = [oracle.with_name(name+'.java') for name in + ['VanillaHeightmapOracle', 'VanillaCollisionOracle', 'VanillaBlockStateCodecOracle', 'VanillaSuffocationOracle', 'VanillaFaceSupportOracle']] + sources = [oracle, *helpers, Path(__file__), lab.ROOT/'tools/test_rust_parity.py', + lab.ROOT/'tools/test_worldgen_parity.py', lab.ROOT/'tools/lab.py', + lab.ROOT/'Cargo.toml', lab.ROOT/'Cargo.lock', + lab.ROOT/'crates/horizon-world/examples/registry_collision_scan_fixture.rs'] + for crate in ['horizon-core', 'horizon-world']: + sources += [lab.ROOT/'crates'/crate/'Cargo.toml', + *sorted((lab.ROOT/'crates'/crate/'src').rglob('*.rs'))] + tested = base.source_hashes(sources) + tags = worldgen.tag_resources(jars['server']) + if tags != worldgen.tag_resources(jars['client']):raise AssertionError('Client/server block tags differ') + lab.write_json(build/'tags.json', tags) + classes = build/'classes';classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, libraries)) + def run(command, name): + with (build/(name+'.log')).open('w') as log: + subprocess.run(list(map(str, command)), cwd=lab.ROOT, check=True, timeout=3600, + stdout=log, stderr=subprocess.STDOUT) + run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-cp', + str(jars['server'])+os.pathsep+dependencies, '-d', classes, oracle, *helpers], 'compile-java') + def java(side, mode): + run(['java', '-Xmx768M', '-cp', os.pathsep.join([str(classes), str(jars[side]), dependencies]), + 'dev.horizonlab.parity.VanillaRegistryCollisionScanOracle', mode, build], side+'-'+mode) + java('server', 'export') + facts = json.loads((build/'facts.json').read_text()) + if len(facts['states']) != 35723:raise AssertionError('Incomplete pinned registry') + definitions = json.loads((build/'definitions.json').read_text()) + count = 0 + with (build/'inputs.txt').open('w') as output: + for fixture in corpus(facts): + output.write(json.dumps(fixture, separators=(',', ':'))+'\n');count += 1 + fixture_paths = [build/name for name in ['inputs.txt', 'facts.json', 'definitions.json', + 'block-registry.nbt', 'cached-collision.nbt', 'tags.json']] + fixtures = base.source_hashes(fixture_paths) + run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'registry_collision_scan_fixture'], 'compile-rust') + metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) + binary = Path(metadata['target_directory'])/'release/examples'/('registry_collision_scan_fixture.exe' if os.name=='nt' else 'registry_collision_scan_fixture') + run([binary, build], 'rust');references = [] + for side, jar in jars.items(): + java(side, side) + matched = base.compare(build/(side+'.txt'), build/'rust.txt') + references.append({'side':side, 'jar_sha256':lab.digest(jar, 'sha256'), + 'output_sha256':lab.digest(build/(side+'.txt'), 'sha256'), 'matched_output_lines':matched}) + print(f'{side}: {matched:,} resident collision-scan lines match', flush=True) + base.ensure_sources_unchanged(sources, tested);base.ensure_sources_unchanged(fixture_paths, fixtures) + report = {'schema':1, 'minecraft':lock['minecraft']['version'], 'manifest_sha1':lock['minecraft']['manifest_sha1'], + 'platform':platform.platform(), 'java':subprocess.check_output(['java', '--version'], text=True).splitlines()[0], + 'rustc':subprocess.check_output(['rustc', '--version'], text=True).strip(), + 'registry_states':len(facts['states']), 'block_definitions':len(definitions), + 'definition_counts':dict(collections.Counter(definitions.values())), + 'native_chunk_storage':'ProtoChunk', 'rust_chunk_storage':'TerrainChunk', 'fixtures':count, 'sources_sha256':tested, 'fixtures_sha256':fixtures, + 'rust_output_sha256':lab.digest(build/'rust.txt', 'sha256'), 'references':references, + 'scope':'Native BlockCollisions over actual registered block behavior and resident ProtoChunk sections compared with RegistryCollisionWorld, contextual dispatch and TerrainChunk storage. All states cover ordinary and suffocating-only selection. Context variants include empty, always-fluid, position and placement; dynamic and representative partial shapes cover positive/negative chunk boundaries. Shulker cases distinguish chunk-local suffocation entities from global collision entities, with ordered failure injection. Seeded scenes cover resident/missing chunks, build-height edges, block replacements and early consumer termination. This validates registry/storage integration for these snapshots, not chunk loading, entity lifecycle, experimental minecarts or gameplay movement.'} + lab.write_json(report_path, report);print(f'Scoped registry collision-scan parity passed: {report_path}', flush=True) + + +if __name__ == '__main__':main() diff --git a/tools/test_registry_fall_ray_parity.py b/tools/test_registry_fall_ray_parity.py new file mode 100644 index 000000000..1ae37546c --- /dev/null +++ b/tools/test_registry_fall_ray_parity.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python3 +"""Compare registered fall-reset world rays with native blocks, fluids and tags.""" +import itertools +import json +import os +from pathlib import Path +import platform +import random +import struct +import subprocess +import zipfile +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def fluid_tags(jar): + with zipfile.ZipFile(jar) as archive: + prefix='data/minecraft/tags/fluid/' + return {'minecraft:'+n[len(prefix):-5]:archive.read(n).decode('utf-8') for n in sorted(archive.namelist()) if n.startswith(prefix) and n.endswith('.json')} + + +def corpus(info): + def bits(v):return struct.pack('>d',float(v)).hex() + defaults=info['defaults'];water=defaults['minecraft:water'];lava=defaults['minecraft:lava'] + def op(above=0,p=(0,0,0),ray=0,fail=-1): + a,b=[([.5,.5,.5],[2,.5,.5]),([-.2,.5,.5],[1.2,.5,.5]),([.5,1.5,.5],[.5,-1,.5]),([-.5,-.25,.5],[1.5,1.75,.5]),([.5,.5,.5],[.5,.5,.5])][ray] + return dict(above=above,fail=fail,**{'from':[bits(v+p[i]) for i,v in enumerate(a)],'to':[bits(v+p[i]) for i,v in enumerate(b)]}) + def row(state,**kw): + f=dict(state=state,position=[0,0,0],block_tags=0,fluid_tags=0,server=True,entity=True,player=True,delay=0,ops=[op(),op(water),op()]);f.update(kw);return f + for tags in range(3): + for state in range(info['states']):yield row(state,block_tags=tags) + special=[defaults['minecraft:'+n] for n in ['air','stone','water','lava','cobweb','sweet_berry_bush','slime_block','honey_block','hay_block','powder_snow','end_gateway','end_portal','nether_portal','cauldron','water_cauldron','composter','hopper','scaffolding']] + for state,bt,ft,entity,player,server,delay in itertools.product(special,range(3),range(3),[False,True],[False,True],[False,True],[-1,0,1,80]): + yield row(state,block_tags=bt,fluid_tags=ft,entity=entity,player=player,server=server,delay=delay,ops=[op(0,ray=1),op(water,ray=2),op(lava,ray=3)]) + for state,ft,fail in itertools.product(special,range(3),range(-1,35)): + yield row(state,fluid_tags=ft,ops=[op(0,ray=1,fail=fail),op(water,ray=2,fail=fail),op(0)]) + rng=random.Random(0x46414c4c524159) + for _ in range(6000): + p=rng.choice([(0,0,0),(17,-64,-33),(30000000,0,-30000000)]) + yield row(rng.randrange(info['states']),position=p,block_tags=rng.randrange(3),fluid_tags=rng.randrange(3),entity=bool(rng.randrange(2)),player=bool(rng.randrange(2)),server=bool(rng.randrange(2)),delay=rng.choice([-1,0,1,80]),ops=[op(rng.choice([0,water,lava,rng.randrange(info['states'])]),p,ray=rng.randrange(5),fail=rng.randrange(-1,20)) for _ in range(4)]) + + +def main(): + lock,jars,libraries=base.verify_artifacts();build=lab.LOCAL/'rust-registry-fall-ray-parity';build.mkdir(exist_ok=True);report_path=build/'report.json';report_path.unlink(missing_ok=True) + root=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity';oracles=[root/(n+'.java') for n in ['VanillaRegistryFallRayOracle','VanillaInteractionShapeOracle','VanillaCollisionOracle','VanillaHeightmapOracle']] + sources=[*oracles,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/test_worldgen_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-world/examples/registry_fall_ray_fixture.rs'] + for crate in ['horizon-core','horizon-world']:sources += [lab.ROOT/'crates'/crate/'Cargo.toml',*sorted((lab.ROOT/'crates'/crate/'src').rglob('*.rs'))] + tested=base.source_hashes(sources);tags=worldgen.tag_resources(jars['server']);fluids=fluid_tags(jars['server']) + if tags!=worldgen.tag_resources(jars['client']) or fluids!=fluid_tags(jars['client']):raise AssertionError('Native tags differ between artifacts') + lab.write_json(build/'tags.json',tags);lab.write_json(build/'fluid-tags.json',fluids);classes=build/'classes';classes.mkdir(exist_ok=True);dependencies=os.pathsep.join(map(str,libraries)) + def run(command,name): + with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependencies,'-d',classes,*oracles],'compile-java') + def java(side,mode):run(['java','-Xmx768M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependencies]),'dev.horizonlab.parity.VanillaRegistryFallRayOracle',mode,build],side+'-'+mode) + java('server','export');info=json.loads((build/'info.json').read_text());count=0 + if info['states']!=35723:raise AssertionError('Incomplete pinned registry') + with (build/'inputs.txt').open('w') as output: + for f in corpus(info):output.write(json.dumps(f,separators=(',',':'))+'\n');count+=1 + fixture_paths=[build/n for n in ['inputs.txt','info.json','block-registry.nbt','interaction-shapes.nbt','tags.json','fluid-tags.json','bound-tags.json']];fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--locked','--release','-p','horizon-world','--example','registry_fall_ray_fixture'],'compile-rust');metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('registry_fall_ray_fixture.exe' if os.name=='nt' else 'registry_fall_ray_fixture');run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side);matched=base.compare(build/(side+'.txt'),build/'rust.txt');references.append(dict(side=side,jar_sha256=lab.digest(jar,'sha256'),output_sha256=lab.digest(build/(side+'.txt'),'sha256'),matched_output_lines=matched));print(f'{side}: {matched:,} registered fall-ray output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested);base.ensure_sources_unchanged(fixture_paths,fixtures) + report=dict(schema=1,minecraft=lock['minecraft']['version'],manifest_sha1=lock['minecraft']['manifest_sha1'],platform=platform.platform(),java=subprocess.check_output(['java','--version'],text=True).splitlines()[0],rustc=subprocess.check_output(['rustc','--version'],text=True).strip(),fixtures=count,registry_states=info['states'],sources_sha256=tested,fixtures_sha256=fixtures,rust_output_sha256=lab.digest(build/'rust.txt','sha256'),references=references,scope='Actual BlockGetter.clip with registered block/interaction/fluid shapes, FALLDAMAGE_RESETTING/WATER context and native tag reloads. Every block state runs natural, empty and universal reset tags; additional fluid tag modes, entity/player/server distinctions, portal delays, multiple ray positions, above-fluid changes, cache reuse and failures compare complete traces/results. Binding rejects unknown tag members and invalid block IDs. World block/fluid reads use controlled snapshots; live resident-world binding, actual player storage, movement integration and complete gameplay remain pending.') + lab.write_json(report_path,report);print(f'Scoped registered fall ray parity passed: {report_path}',flush=True) + + +if __name__=='__main__':main() diff --git a/tools/test_registry_fluid_parity.py b/tools/test_registry_fluid_parity.py new file mode 100644 index 000000000..241f3c3ab --- /dev/null +++ b/tools/test_registry_fluid_parity.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +"""Compare registered fluid contents, height and current support composition.""" +import itertools +import json +import os +from pathlib import Path +import platform +import random +import struct +import subprocess +import zipfile +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(info): + defaults=info['defaults'];states=info['states'];air=defaults['minecraft:air'];water=defaults['minecraft:water'];lava=defaults['minecraft:lava'] + flowing=[i for i,s in enumerate(states) if s['id'] in ['minecraft:water','minecraft:lava']] + falling_water=next(i for i in flowing if states[i]['id']=='minecraft:water' and states[i]['properties']['level']=='8') + falling_lava=next(i for i in flowing if states[i]['id']=='minecraft:lava' and states[i]['properties']['level']=='8') + def row(root,**kw): + f=dict(mode='flow',root=root,default=air,cells={},position=[0,0,0],fail=-1,direction=2,tag=0);f.update(kw);return f + for i in range(len(states)): + for mode in ['flow','height','camera']:yield row(i,mode=mode,default=water) + for direction in range(6):yield row(water,mode='face',direction=direction,default=i) + yield row(falling_water,cells={'0 0 -1':i,'1 0 0':water,'-1 -1 0':lava}) + yield row(water,mode='camera',default=i) + for tag in range(3): + for i in defaults.values(): + for root in [falling_water,falling_lava]:yield row(root,tag=tag,cells={'0 0 -1':i,'0 -1 -1':root}) + special=[defaults['minecraft:'+n] for n in ['air','stone','ice','frosted_ice','packed_ice','blue_ice','water','lava','shulker_box','moving_piston','scaffolding','oak_slab','powder_snow','bamboo','pointed_dripstone']] + for i in special: + for root in [falling_water,falling_lava]: + for mode in ['flow','height','camera','face']: + for fail in range(-1,30):yield row(root,mode=mode,default=i,fail=fail) + rng=random.Random(0x524547464c554944) + for _ in range(5000): + p=rng.choice([(0,0,0),(17,-64,-33),(2147483647,-2147483648,-2147483648)]) + def wrap(v):return (v+2**31)%2**32-2**31 + cells={' '.join(str(wrap(a+b)) for a,b in zip(p,(dx,y,dz))):rng.choice(special+flowing) for dx,dz in [(0,-1),(1,0),(0,1),(-1,0)] for y in [-1,0,1]} + yield row(rng.choice(flowing),cells=cells,default=rng.choice(special),position=p,fail=rng.choice([-1,-1,*range(35)]),tag=rng.randrange(3)) + + +def main(): + lock,jars,libraries=base.verify_artifacts();build=lab.LOCAL/'rust-registry_fluid-parity';build.mkdir(exist_ok=True);report_path=build/'report.json';report_path.unlink(missing_ok=True) + root=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity';oracles=[root/(n+'.java') for n in ['VanillaRegistryFluidOracle','VanillaHeightmapOracle','VanillaBlockSupportOracle','VanillaCollisionOracle','VanillaBlockStateCodecOracle']] + sources=[*oracles,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/test_worldgen_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-world/examples/registry_fluid_fixture.rs'] + for crate in ['horizon-core','horizon-world']:sources += [lab.ROOT/'crates'/crate/'Cargo.toml',*sorted((lab.ROOT/'crates'/crate/'src').rglob('*.rs'))] + tested=base.source_hashes(sources);tags=worldgen.tag_resources(jars['server']) + if tags!=worldgen.tag_resources(jars['client']):raise AssertionError('Native tags differ between artifacts') + lab.write_json(build/'tags.json',tags);classes=build/'classes';classes.mkdir(exist_ok=True);dependencies=os.pathsep.join(map(str,libraries)) + def run(command,name): + with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependencies,'-d',classes,*oracles],'compile-java') + def java(side,mode):run(['java','-Xmx768M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependencies]),'dev.horizonlab.parity.VanillaRegistryFluidOracle',mode,build],side+'-'+mode) + java('server','export');info=json.loads((build/'facts.json').read_text());count=0 + if len(info['states'])!=35723:raise AssertionError('Incomplete pinned registry') + with (build/'inputs.txt').open('w') as output: + for f in corpus(info):output.write(json.dumps(f,separators=(',',':'))+'\n');count+=1 + fixture_paths=[build/n for n in ['inputs.txt','facts.json','fluid-info.json','block-registry.nbt','cached-support.nbt','tags.json']];fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--locked','--release','-p','horizon-world','--example','registry_fluid_fixture'],'compile-rust');metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT));binary=Path(metadata['target_directory'])/'release/examples'/('registry_fluid_fixture.exe' if os.name=='nt' else 'registry_fluid_fixture');run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side);matched=base.compare(build/(side+'.txt'),build/'rust.txt');references.append(dict(side=side,jar_sha256=lab.digest(jar,'sha256'),output_sha256=lab.digest(build/(side+'.txt'),'sha256'),matched_output_lines=matched));print(f'{side}: {matched:,} registry_fluid output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested);base.ensure_sources_unchanged(fixture_paths,fixtures) + report=dict(schema=1,minecraft=lock['minecraft']['version'],manifest_sha1=lock['minecraft']['manifest_sha1'],platform=platform.platform(),java=subprocess.check_output(['java','--version'],text=True).splitlines()[0],rustc=subprocess.check_output(['rustc','--version'],text=True).strip(),fixtures=count,registry_states=len(info['states']),sources_sha256=tested,fixtures_sha256=fixtures,rust_output_sha256=lab.digest(build/'rust.txt','sha256'),references=references,scope='Actual registered fluid height/camera-height/current vectors and solid-face selection using all native block states, BLOCKS_FLUID_FLOW tags and IceBlock class identities. Rust composes registered contained fluids with cached/dynamic block support, preserving world query order, directional walls, waterlogged contents, coordinate wrapping and failures. Block storage is controlled and block entities are absent; live entity/world binding, active block-entity lifecycle, fluid spreading and complete gameplay remain pending.') + lab.write_json(report_path,report);print(f'Scoped registry_fluid parity passed: {report_path}',flush=True) + + +if __name__=='__main__':main() diff --git a/tools/test_replace_blobs_parity.py b/tools/test_replace_blobs_parity.py new file mode 100644 index 000000000..63e3bbbd5 --- /dev/null +++ b/tools/test_replace_blobs_parity.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +"""Compare replacement-blob descent, three radius draws and Manhattan order.""" +import itertools +import json +try: + from . import test_simple_block_parity as harness +except ImportError: + import test_simple_block_parity as harness + + +def corpus(facts, placement): + states = facts['states']; get = lambda name: facts['defaults']['minecraft:' + name] + def blob(**extra): + value = {'type': 'netherrack_replace_blobs', 'target': {'id': 'netherrack'}, 'state': {'id': 'basalt'}, 'radius': 2} + value.update(extra); return value + def case(definition=None, **extra): + value = {'definition': json.dumps(definition if definition is not None else blob(), separators=(',', ':')), + 'mode': 'feature', 'origin': [0, 64, 0], 'legacy': False, 'seed': 0, 'world_seed': 1, + 'fail': -1, 'reject': 0, 'brightness': 15, 'fallback': get('netherrack'), 'states': [], 'repeats': 1} + value.update(extra); return value + for state_id, state in enumerate(states): + yield case(blob(target=state, radius=0), fallback=state_id) + yield case(blob(state=state, radius=0)) + yield case(fallback=state_id, states=[[0, 64, 0, get('netherrack')]], fail=30) + for radius, legacy, seed in itertools.product(range(13), [False, True], range(8)): + yield case(blob(radius=radius), legacy=legacy, seed=seed) + providers = [ + {'type': 'uniform', 'min_inclusive': 0, 'max_inclusive': 12}, + {'type': 'biased_to_bottom', 'min_inclusive': 0, 'max_inclusive': 12}, + {'type': 'very_biased_to_bottom', 'min_inclusive': 0, 'max_inclusive': 12}, + {'type': 'trapezoid', 'min': 0, 'max': 12, 'plateau': 4}, + {'type': 'clamped', 'source': {'type': 'uniform', 'min_inclusive': -12, 'max_inclusive': 20}, 'min_inclusive': 0, 'max_inclusive': 12}, + {'type': 'weighted_list', 'distribution': [{'weight': 1, 'data': 0}, {'weight': 3, 'data': 6}, {'weight': 1, 'data': 12}]}, + ] + for provider, legacy, seed, fail, reject in itertools.product(providers, [False, True], range(8), [-1, 0, 1, 7, 29], [0, 1, 3]): + yield case(blob(radius=provider), legacy=legacy, seed=seed, fail=fail, reject=reject, repeats=2) + for y, depth in itertools.product([-2147483648, -65, -64, -63, -62, -61, 0, 319, 320, 2147483647], range(6)): + start = min(319, max(-63, y)) + initial = [[0, start-d, 0, get('air')] for d in range(depth)] + yield case(origin=[0, y, 0], states=initial) + yield case(origin=[0, y, 0], fallback=get('air')) + for target in [{'id': 'oak_log', 'properties': {'axis': 'x'}}, {'id': 'oak_log'}, {'id': 'air'}]: + yield case(blob(target=target), fallback=get('oak_log')) + for origin, legacy in itertools.product([[2147483647, 64, -2147483648], [-2147483648, 64, 2147483647]], [False, True]): + yield case(blob(radius=12), origin=origin, legacy=legacy) + for key, values in [ + ('target', [None, False, {}, [], 'missing', {'id': 'missing'}]), + ('state', [None, False, {}, [], 'missing', {'id': 'oak_log', 'properties': {'axis': 'invalid'}}]), + ('radius', [None, False, -1, 13, -0.0, 0.9, 12.9, '2', {}, [], {'type': 'uniform', 'min_inclusive': -1, 'max_inclusive': 2}, {'type': 'constant', 'value': 13}])]: + for value in values: + definition = blob(); definition[key] = value + yield case(definition) + definition = blob(); del definition[key] + yield case(definition) + for legacy, fail, reject in itertools.product([False, True], [-1, 0, 9, 101], [0, 3]): + placed = {'feature': blob(), 'placement': [{'type': 'count', 'count': 2}]} + yield case(placed, mode='placed', legacy=legacy, fail=fail, reject=reject, repeats=2) + yield case({'type': 'overlay', 'features': [placed, {'feature': 'horizon:moss', 'placement': []}]}, legacy=legacy, fail=fail, reject=reject) + + +if __name__ == '__main__': + harness.run(corpus, 'rust-replace-blobs-parity', __file__, + 'Native ReplaceBlobsFeature under its netherrack_replace_blobs registry key: target block identity, required replacement state and radius provider bounded 0..12, build-height clamp, descending target search, three radius draws, clipped Manhattan shells in native depth/X/Y/positive-Z/mirrored-Z order, flags 3 and success after rejected writes. Every configured target and output state has a radius-zero run; all candidate states have failure-terminated prefixes. Full radius/provider runs cover both RNGs, boundaries, wrapped X/Z, repeated mutations, query failures and composition. Pathological descent is bounded to 2^20 visits. World updates and full generation remain pending.') diff --git a/tools/test_replace_block_parity.py b/tools/test_replace_block_parity.py new file mode 100644 index 000000000..8ca916b07 --- /dev/null +++ b/tools/test_replace_block_parity.py @@ -0,0 +1,93 @@ +#!/usr/bin/env python3 +"""Compare ordered block replacements and rule-driven mutations with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base,test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(facts): + yes={'predicate_type':'always_true'} + no={'predicate_type':'not','rule':yes} + rules=[yes,no,{'predicate_type':'tag_match','tag':'leaves'}, {'predicate_type':'tag_match','tag':'horizon:missing'}, {'predicate_type':'height_match','min_inclusive':-64,'max_inclusive':63}] + for name in ['air','cave_air','void_air','stone','water','oak_leaves','dirt']: + for kind,field in [('block_match','block'),('blockstate_match','block_state')]: + rules.append({'predicate_type':kind,field:name}) + rules += [{'predicate_type':'random_block_match','block':name,'probability':p} for p in [0,0.5,1,2]] + rules += [{'predicate_type':'any_of','rules':rules[5:12]}, {'predicate_type':'all_of','rules':[no,yes]}] + definitions=[{'type':'replace_single_block','targets':[]}] + for rule in rules: + targets=[{'target':rule,'state':{'id':'oak_log','properties':{'axis':'x'}}}] + definitions += [{'type':'replace_single_block','targets':targets}, {'type':'replace_single_block','targets':[{'target':no,'state':'air'},*targets,{'target':yes,'state':'water'}]}] + for value in [None,False,'stone',{},[{}],[{'target':yes,'state':'missing'}],[{'target':yes,'state':'stone'},{'target':{'predicate_type':'missing'},'state':'air'}]]: + definitions.append({'type':'replace_single_block','targets':value}) + for legacy in [False,True]: + for definition in definitions: + for x in range(7): + for fail in [-1,0,1,2,4]: + for reject in [0,2]: + yield {'definition':json.dumps(definition,separators=(',',':')),'origin':[x,-64+x*32,0],'world_min':-64,'legacy':legacy,'seed':-1 if legacy else 0,'reject':reject,'fail':fail,'repeats':3} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-replace-block-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaReplaceBlockOracle.java" + helper=oracle.with_name("VanillaBlockStateCodecOracle.java") + tag_helper=oracle.with_name("VanillaHeightmapOracle.java") + tags=worldgen.tag_resources(jars['server']) + if not tags or tags!=worldgen.tag_resources(jars['client']):raise ValueError('client/server tags differ') + (build/'tags.json').write_text(json.dumps(tags,separators=(',',':')),encoding='utf-8') + sources=[oracle,helper,tag_helper,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/replace_block_fixture.rs"] + tested_sources=base.source_hashes(sources) + fixture_paths=[build/"tags.json"];classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper,tag_helper],"compile-java") + for side,jar in jars.items(): + path=build/f"facts-{side}.json" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaReplaceBlockOracle","export",path],side+"-export") + fixture_paths.append(path) + if json.loads((build/"facts-client.json").read_text())!=json.loads((build/"facts-server.json").read_text()):raise ValueError("reference feature block states differ") + facts=json.loads((build/"facts-server.json").read_text()) + if len(facts['states'])!=35723:raise ValueError('incomplete pinned registry') + fixtures=list(corpus(facts));inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + fixture_paths.append(inputs) + tested_fixtures=base.source_hashes(fixture_paths) + run(["cargo","build","--release","-p","horizon-world","--example","replace_block_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("replace_block_fixture.exe" if os.name=="nt" else "replace_block_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaReplaceBlockOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} replace-block output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"block_states":len(facts["states"]),"integer_properties":len(facts["integers"]),"requested_placements":sum(f["repeats"] for f in fixtures), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual replace_single_block feature codecs and native ReplaceBlockFeature.place. Ordered target rules re-read the origin state, short-circuit on the first match, preserve random draw order and write flags, ignore rejected writes, retain partial mutations and stop on injected read/write failures. Bound block/tag/state/height/random/logical targets and malformed unselected entries are compared across both random modes and repeated calls. Full region side effects, structure processors, ore clusters and complete gameplay remain pending."} + + + lab.write_json(report_path,report);print(f"Scoped replace-block parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_restitution_parity.py b/tools/test_restitution_parity.py new file mode 100644 index 000000000..78fd9b939 --- /dev/null +++ b/tools/test_restitution_parity.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 +"""Compare post-collision restitution, bounce callbacks and partial failure state with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>d',float(v)).hex() + def single(v):return struct.pack('>f',float(v)).hex() + def row(flags=31,entity=0,block=1,vy=-2,gravity=(0.08,0.08),suppress=(False,False),tag=False,drag=0.98,fail=-1,mutate=False,dx=0.3,dz=-0.2,resolved=-0.1): + return dict(x=bool(flags&1),z=bool(flags&2),vertical=bool(flags&4),below=bool(flags&8),living=bool(flags&16),sync=bool(flags&32), + entity=bits(entity),block=single(block),velocity=list(map(bits,[dx,vy,dz])),resolved=list(map(bits,[0,resolved,0])), + gravity=list(map(bits,gravity)),suppress=list(suppress),tag=tag,drag=single(drag),fail=fail,mutate=mutate,fall=bits(3.25)) + for flags in range(64): + for entity in [0,-0.0,0.5,1,-1,float('nan'),float('inf')]: + for block in [0,0.1,0.8,1,float('nan')]: + for suppress in [(False,False),(True,),(False,True)]: + for tag in [False,True]:yield row(flags,entity,block,vy=[-2,-0.08,0][flags%3],suppress=suppress,tag=tag) + for vy in [-float('inf'),-2,-math.nextafter(0.08,1),-0.08,-math.nextafter(0.08,0),-0.0,0,0.08,2,float('nan'),float('inf')]: + for gravity in [(0,0),(.08,.08),(.08,.3),(float('nan'),.08)]: + for flags in [4,12,15,31]: + for entity in [0,.5]: + for resolved in [0,-0.1,vy]:yield row(flags,entity,vy=vy,gravity=gravity,resolved=resolved) + for flags in [0,1,3,4,12,15,31,63]: + for fail in range(-1,17): + for mutate in [False,True]:yield row(flags,entity=.5,fail=fail,mutate=mutate) + rng=random.Random(0x5245535449545554) + for index in range(5000): + values=[-2,-.08,-0.0,0,.08,.5,1,2,float('nan'),float('inf'),-float('inf')] + yield row(rng.randrange(64),rng.choice(values),rng.choice(values),rng.choice(values),gravity=(rng.choice(values),rng.choice(values)), + suppress=(bool(rng.randrange(2)),bool(rng.randrange(2))),tag=bool(index%3==0),drag=rng.choice(values), + fail=rng.choice([-1,-1,-1,0,2,5,8,12]),mutate=bool(index%2),dx=rng.choice(values),dz=rng.choice(values),resolved=rng.choice(values)) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-restitution-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRestitutionOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/restitution_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaRestitutionOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','restitution_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('restitution_fixture.exe' if os.name=='nt' else 'restitution_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} restitution output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Entity.restituteMovementAfterCollisions over living/nonliving snapshots and controlled block restitution/tag behavior. Compares horizontal/vertical bounce, effective-gravity threshold, nonliving float scaling, air-drag interpolation, signed zero/nonfinite values and ordered lazy queries. Bounce callbacks can change velocity and fail; final velocity and syncPosition are checked after every injected failure boundary. This does not establish registered block restitution/tag provisioning, actual bounce sound/game-event effects, Entity.move guard conditions, fall damage, grounding or full gameplay.'} + lab.write_json(report_path,report);print(f'Scoped restitution parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_retrogen_chunk_parity.py b/tools/test_retrogen_chunk_parity.py new file mode 100644 index 000000000..2fe4be7ef --- /dev/null +++ b/tools/test_retrogen_chunk_parity.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +"""Compare below-zero upgrade lifecycle, bedrock replacement and hole clearing.""" +import argparse +from collections import Counter +import json +import os +from pathlib import Path +import platform +import random +import subprocess + +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(facts): + defaults=facts['defaults'] + stages=['empty','structure_starts','structure_references','biomes','terrain','features'] + targets=stages[1:]+['initialize_light','light','spawn','full'] + states=[defaults['minecraft:'+name] for name in ['bedrock','deepslate','stone','air','water','cave_air','void_air','oak_leaves','oak_slab','snow','powder_snow','lava']] + masks=[[],[1],[1,-9223372036854775808,0,9223372036854775807],[-1]*4,[0,0,0,0,1]] + index=0 + for minimum,height in [(-64,80),(0,16),(-16,32),(64,16)]: + for stage in ['empty','terrain']: + for upgrading in [False,True]: + for words in masks: + ops=[['stage',stage]] + if index%2==0:ops.append(['prime',63]) + ops += [['fill',states,index%len(states)],['dump'],['upgrade','features' if upgrading else None,[1]],['upgrade_info'],['replace_bedrock'],['replace_bedrock'],['dump'],['mask',words],['mask',words],['dump'],['stage','features'],['upgrade_info'],['mask',words],['dump']] + yield {'chunk':[0,0] if index%2 else [-3,7],'min':minimum,'height':height,'ops':ops} + index+=1 + yield {'chunk':[-3,7],'min':minimum,'height':height,'ops':[['fill',[defaults['minecraft:air']],0],['upgrade','terrain',[-1]*4],['replace_bedrock'],['mask',[-1]*4],['dump'],['upgrade_info']]} + for initial in stages: + for target in targets: + ops=[['stage',initial],['upgrade',target,[1]],['upgrade_info'],['stage',initial],['upgrade_info'],['upgrade',target,[1]],['upgrade_info']] + for stage in stages+list(reversed(stages)):ops += [['stage',stage],['upgrade_info']] + ops += [['upgrade',target,[1]],['upgrade_info'],['upgrade',None,[]],['upgrade_info']] + yield {'chunk':[2147483647,-2147483648],'min':0,'height':16,'ops':ops} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__) + parser.add_argument("--prepare",action="store_true") + args=parser.parse_args() + build=lab.LOCAL/"rust-retrogen-chunk-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + tags=worldgen.tag_resources(jars["server"]) + if not tags or tags!=worldgen.tag_resources(jars["client"]):raise ValueError("client/server block tags differ or are empty") + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkStageOracle.java" + helper=oracle.with_name("VanillaHeightmapOracle.java") + sources=[oracle,helper,Path(__file__),lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock", + lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/chunk_stage_fixture.rs"] + tested_sources=base.source_hashes(sources) + classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper],"compile-java") + def java(side,mode,path): + run(["java","-Xmx1G","-cp",os.pathsep.join([str(classes),str(jars[side]),dependency_path]),"dev.horizonlab.parity.VanillaChunkStageOracle",mode,path],side+"-"+mode) + for side in jars:java(side,"export",build/f"facts-{side}.json") + facts=json.loads((build/"facts-server.json").read_text()) + if facts!=json.loads((build/"facts-client.json").read_text()):raise ValueError("client/server state facts differ") + if len(facts["states"])!=35723:raise ValueError("incomplete pinned state table") + fixtures=list(corpus(facts));inputs=build/"inputs.txt" + inputs.write_text("".join(json.dumps(value,separators=(",",":"))+"\n" for value in fixtures),encoding="utf-8") + (build/"tags.json").write_text(json.dumps(tags,separators=(",",":")),encoding="utf-8") + fixture_paths=[inputs,build/"tags.json",build/"facts-client.json",build/"facts-server.json"] + tested_fixtures=base.source_hashes(fixture_paths) + run(["cargo","build","--release","-p","horizon-world","--example","chunk_stage_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("chunk_stage_fixture.exe" if os.name=="nt" else "chunk_stage_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + java(side,side,build) + reference=build/f"{side}.txt";matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} retrogen-chunk output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "block_states":len(facts["states"]),"block_tag_files":len(tags),"fixtures":len(fixtures),"operation_counts":dict(Counter(op[0] for fixture in fixtures for op in fixture["ops"])), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Native ProtoChunk below-zero metadata installation/removal, pre-light persisted-stage assignments and target completion cleanup, normal/upgrading generation heights, highest-generated status from retained targets versus current persisted stages, actual BelowZeroRetrogen.replaceOldBedrock and applyBedrockMask. Mixed resident states, legacy five-layer bedrock bands, signed/chunk-relative coordinates, partial vertical overlap, masks with empty/single/sparse/all/out-of-footprint bits, repeated operations, preprimed/stale/missing heightmaps, and clearing under changed generation bounds are compared. Complete raw sections and selected packed heightmaps are checked after each mutation phase. All nine nonempty targets are paired with all six pre-light stages, including installation after an already-advanced status, repeated assignments, backward transitions and explicit removal. Data codecs have a separate comparison. Save-dirty notifications, post-light stages, structure restrictions, biome retention, automatic generation scheduling and complete world/gameplay parity remain outside this comparison."} + + lab.write_json(report_path,report);print(f"Scoped retrogen-chunk parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_retrogen_data_parity.py b/tools/test_retrogen_data_parity.py new file mode 100644 index 000000000..b79e2046e --- /dev/null +++ b/tools/test_retrogen_data_parity.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python3 +"""Compare native below-zero retrogen NBT, bedrock-hole masks and queries.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab, test_rust_parity as base + + +def corpus(): + targets=[['string',name] for name in ['structure_starts',':structure_references','minecraft:biomes','terrain','features','initialize_light','light','spawn','full','empty','unknown','horizon:full']]+[None,['int',9],['compound',{}]] + masks=[None,['long_array',[]],['long_array',[0]*8],['long_array',[-1]*4],['long_array',[1,0,0,0,0,1,0]],['byte_array',[-128,-1,0,1,127]],['int_array',[-2147483648,-1,0,1,2147483647]],['list',[]],['list',[['byte',-128],['short',-32768],['int',-2147483648],['long',-9223372036854775808]]],['list',[['double','bff8000000000000'],['float','3fc00000'],['double','7ff8000000000000'],['float','ff800000']]],['list',[['long',1],['string','invalid']]],['string','invalid'],['int',1],['compound',{}]] + for bit in [*range(256),256,511,512,1023]: + words=[0]*(bit//64+1);word=1<<(bit%64);words[-1]=word if word<2**63 else word-2**64;masks.append(['long_array',words]) + for target in targets: + for mask in masks: + fields={} + if target is not None:fields['target_status']=target + if mask is not None:fields['missing_bedrock']=mask + yield ['compound',fields] + rng=random.Random(0x524554524f47454e) + for _ in range(1000): + words=[rng.randrange(-2**63,2**63) for _ in range(rng.randrange(17))]+[0]*rng.randrange(4) + yield ['compound',{'target_status':['string','full'],'missing_bedrock':['long_array',words],'extra':['string','ignored']}] + for kind,value in [('end',None),('byte',1),('string','full'),('list',[])]:yield [kind,value] + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-retrogen-data-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRetrogenDataOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/retrogen_data_fixture.rs'] + tested_sources=base.source_hashes(sources) + commands=list(corpus());inputs=build/'inputs.txt';inputs.write_text('\n'.join(json.dumps(command) for command in commands)+'\n') + tested_fixtures=base.source_hashes([inputs]);classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + dependencies=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependencies,'-d',classes,oracle],'compile-java') + run(['cargo','build','--release','-p','horizon-world','--example','retrogen_data_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('retrogen_data_fixture.exe' if os.name=='nt' else 'retrogen_data_fixture') + run([binary,inputs,build/'rust.txt'],'rust') + references=[] + for side,jar in jars.items(): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jar),dependencies]),'dev.horizonlab.parity.VanillaRetrogenDataOracle',inputs,build/(side+'.txt')],side) + matched=base.compare(build/(side+'.txt'),build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(build/(side+'.txt'),'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} retrogen-data lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged([inputs],tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(), + 'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(), + 'codec_cases':len(commands),'hole_queries_per_decoded_input':1229,'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references, + 'scope':'Native BelowZeroRetrogen codec, non-empty target-status validation, lenient optional bedrock mask decoding, NumericTag/array/list numeric streams, canonical trailing-zero removal, omitted empty masks, hasBedrockHoles and wrapped local X/Z hole queries. All 256 column bits and extra bits beyond the chunk footprint, malformed target/mask fields, mixed numeric lists and random bitsets are covered. Codec error text is normalized rather than compared. Generation scheduling, status transition cleanup, bedrock replacement/masking, biome retention and chunk lifecycle integration remain outside this data comparison.'} + lab.write_json(report_path,report);print(f'Scoped retrogen-data parity passed: {report_path}') + +if __name__=='__main__':main() diff --git a/tools/test_rule_test_parity.py b/tools/test_rule_test_parity.py new file mode 100644 index 000000000..0937e10b1 --- /dev/null +++ b/tools/test_rule_test_parity.py @@ -0,0 +1,89 @@ +#!/usr/bin/env python3 +"""Compare all pinned replacement-rule codecs and ordered evaluation.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(facts, tags): + defaults=list(facts['defaults'].values()) + all_states=list(range(len(facts['states']))) + heights=[-2147483648,-2032,-65,-64,-1,0,1,63,64,319,2031,2147483647] + def cases(definition, states=defaults, repeats=1): + for legacy in [False,True]: + yield {'definition':json.dumps(definition,separators=(',',':')),'states':states,'heights':heights,'legacy':legacy,'seed':-1 if legacy else 0x123456789abcdef,'repeats':repeats} + yes={'predicate_type':'always_true'} + no={'predicate_type':'not','rule':yes} + for value in [yes,no,{'predicate_type':'all_of','rules':[]},{'predicate_type':'any_of','rules':[]}]:yield from cases(value,all_states) + for name in sorted(tags):yield from cases({'predicate_type':'tag_match','tag':name}) + for name in ['minecraft:logs','minecraft:leaves','minecraft:stone_ore_replaceables','horizon:missing']: + yield from cases({'predicate_type':'tag_match','tag':name},all_states) + for name, state in facts['defaults'].items(): + yield from cases({'predicate_type':'block_match','block':name},[0,state,(state+1)%len(all_states),all_states[-1]]) + for i,state in enumerate(facts['states']): + yield from cases({'predicate_type':'blockstate_match','block_state':state},[i,(i+1)%len(all_states)]) + for low,high in [(-2147483648,2147483647),(-64,319),(64,63),(0,0),(4294967297,-4294967295),(0.9,1.9)]: + yield from cases({'predicate_type':'height_match','min_inclusive':low,'max_inclusive':high},defaults[:24],2) + for kind,field in [('random_block_match','block'),('random_blockstate_match','block_state')]: + for block in ['air','water','oak_log',{'id':'water','properties':{'level':'+01'}}]: + for probability in [-1,-0.0,0,1e-50,0.25,0.5,1,2,1e100,None,False,'0.5']: + rule={'predicate_type':kind,field:block,'probability':probability} + yield from cases(rule,all_states[0:160],2) + for wrapper in [{'predicate_type':'all_of','rules':[rule,yes,rule]}, {'predicate_type':'any_of','rules':[rule,no,rule]}, {'predicate_type':'all_of','rules':[no,rule]}, {'predicate_type':'any_of','rules':[yes,rule]}, {'predicate_type':'not','rule':rule}]: + yield from cases(wrapper,all_states[0:160],2) + invalid=[None,False,0,[],{}, {'predicate_type':'unknown'}, {'predicate_type':False}] + for kind,field in [('block_match','block'),('blockstate_match','block_state'),('tag_match','tag'),('not','rule'),('all_of','rules'),('any_of','rules')]: + invalid += [{'predicate_type':kind,field:value} for value in [None,False,0,[],{},'missing','Minecraft:stone',':']] + invalid.append({'predicate_type':kind}) + for value in invalid:yield from cases(value,defaults[:4]) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-rule-test-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRuleTestOracle.java' + helpers=[oracle.with_name('VanillaBlockStateCodecOracle.java'),oracle.with_name('VanillaHeightmapOracle.java')] + tags=worldgen.tag_resources(jars['server']) + if not tags or tags!=worldgen.tag_resources(jars['client']):raise ValueError('client/server tags differ') + (build/'tags.json').write_text(json.dumps(tags,separators=(',',':')),encoding='utf-8') + sources=[oracle,*helpers,lab.ROOT/'tools/test_worldgen_parity.py',Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/rule_test_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,*helpers],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaRuleTestOracle',mode,path],side+'-'+mode) + for side in jars:java(side,'export',build/f'facts-{side}.json') + facts=json.loads((build/'facts-server.json').read_text()) + if facts!=json.loads((build/'facts-client.json').read_text()):raise ValueError('client/server registry metadata differs') + if len(facts['states'])!=35723:raise ValueError('incomplete pinned state registry') + fixtures=list(corpus(facts,tags));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'tags.json',build/'facts-client.json',build/'facts-server.json'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','rule_test_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('rule_test_fixture.exe' if os.name=='nt' else 'rule_test_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} replacement-rule output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'block_states':len(facts['states']),'blocks':len(facts['defaults']),'integer_properties':len(facts['integers']),'codec_inputs':len(fixtures),'rule_types':10,'block_tag_files':len(tags),'requested_tests':sum(len(f['states'])*f['repeats'] for f in fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual RuleTest.CODEC and all ten registered replacement-rule types. Every block and block-state identity, all bundled block tags, absent tags, inclusive and reversed height ranges, unrestricted random probabilities, logical short-circuit evaluation, malformed inputs, both random modes and subsequent draws are compared. Registry metadata and tag resources independently agree across authenticated JARs. Bound tags are immutable snapshots. Replacement feature mutations, structure processors, reload ownership and complete gameplay remain outside this standalone comparison.'} + lab.write_json(report_path,report);print(f'Scoped replacement-rule parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_rust_parity.py b/tools/test_rust_parity.py new file mode 100644 index 000000000..beffc2baa --- /dev/null +++ b/tools/test_rust_parity.py @@ -0,0 +1,198 @@ +#!/usr/bin/env python3 +"""Compare Horizon core operations with both checksum-pinned vanilla game JARs.""" + +import argparse +from collections import Counter +import itertools +import json +import os +from pathlib import Path +import platform +import random +import subprocess +import zipfile + +try: + from . import lab +except ImportError: + import lab + + +def corpus(): + """Stable inputs; Java supplies expected results instead of a second port.""" + rng = random.Random(0x484F52495A4F4E) + edges = [-2147483648, -33554433, -33554432, -2097152, -2049, -2048, + -1025, -1024, -513, -512, -33, -32, -17, -16, -1, 0, 1, + 15, 16, 31, 32, 511, 512, 2047, 2048, 2097151, 33554431, 33554432, 2147483647] + for axis in range(3): + for edge in edges: + p = [0, 0, 0] + p[axis] = edge + yield f"position {' '.join(map(str, p))} 1 -1 2147483647" + for x, y, z in itertools.product(range(16), repeat=3): + yield f"position {x - 16} {y - 16} {z - 16} 0 0 0" + for _ in range(8192): + values = [rng.randrange(-2147483648, 2147483648) for _ in range(6)] + yield "position " + " ".join(map(str, values)) + seeds = [-9223372036854775808, -281474976710656, -1, 0, 1, 281474976710656, + 9223372036854775807, *[rng.randrange(-2**63, 2**63) for _ in range(16)]] + for kind in ["legacy", "xoroshiro"]: + for seed in seeds: + yield f"{kind} {seed} 2200" + for lo, hi in [(0, 0), (0, 1), (1, 0), (-1, -1), (-9223372036854775808, 9223372036854775807)]: + yield f"xoroshiro_state {lo} {hi} 2200" + for bits in range(1, 33): + per_word = 64 // bits + for length in sorted({0, 1, per_word - 1, per_word, per_word + 1, 63, 64, 65, 4096}): + yield f"storage {bits} {length} {rng.randrange(-2**63, 2**63)}" + names = [[], [0], [0xffff], [0xd800], [0xdc00], [0xd800, 0x61, 0xdc00], [0xd83d, 0xde00], [0xdbff, 0xdfff], + *[[ord(c) for c in text] for text in ["minecraft:temperature", "octave_-3", "Aa", "BB", "Horizon", "àé中"]], + *[[0x61] * n for n in [55, 56, 63, 64, 65, 119, 120, 127, 128, 129, 1024]]] + for scenario in range(2200): + name = names[scenario % len(names)] if scenario % 3 else [rng.randrange(65536) for _ in range(rng.randrange(160))] + encoded = "".join(f"{unit:04x}" for unit in name) or "-" + lo = seeds[scenario % len(seeds)] if scenario % 3 else rng.randrange(-2**63, 2**63) + hi = lo if scenario % 11 == 0 else rng.randrange(-2**63, 2**63) + position = [rng.choice(edges) if scenario % 4 else rng.randrange(-2**31, 2**31) for _ in range(3)] + seed = lo if scenario % 7 == 0 else rng.randrange(-2**63, 2**63) + for kind in ["legacy", "xoroshiro"]: + yield f"factory {kind} {scenario % 2} {lo} {hi} {' '.join(map(str, position))} {seed} {encoded} 24" + double_edges = [0, 1, 0x8000000000000000, 0x3ff0000000000000, 0xbff0000000000000, + 0x7fefffffffffffff, 0x7ff0000000000000, 0xfff0000000000000, 0x7ff8000000000000] + float_edges = [0, 1, 0x80000000, 0x3f800000, 0xbf800000, 0x7f7fffff, 0x7f800000, 0xff800000, 0x7fc00000] + interval_edges = [-(2**31), -(2**31)+1, -1, 0, 1, 2, 16, 2**30+1, 2**31-2, 2**31-1] + intervals = [*itertools.product(interval_edges, repeat=2), + *[(rng.randrange(-2**31,2**31),rng.randrange(-2**31,2**31)) for _ in range(2400)]] + for scenario, (minimum, maximum) in enumerate(intervals): + d = [rng.choice(double_edges) if scenario % 3 else rng.getrandbits(64) for _ in range(2)] + f = [rng.choice(float_edges) if scenario % 3 else rng.getrandbits(32) for _ in range(2)] + for kind in ["legacy", "xoroshiro"]: + yield f"helpers {kind} {seeds[scenario % len(seeds)]} {minimum} {maximum} {d[0]:016x} {d[1]:016x} {f[0]:08x} {f[1]:08x}" + + +def verify_artifacts(): + """Authenticate against the lock and the bundled checksums, not generated reports.""" + lock, directory = lab.config() + manifest_path = directory / "manifest.json" + if lab.digest(manifest_path, "sha1") != lock["minecraft"]["manifest_sha1"]: + raise ValueError("Manifest checksum changed; run tools/lab.py prepare") + manifest = json.loads(manifest_path.read_text()) + if manifest["id"] != lock["minecraft"]["version"]: + raise ValueError("Manifest version differs from the lock") + jars = {} + for side in ["client", "server"]: + jar = directory / "jars" / f"{side}.jar" + if lab.digest(jar, "sha1") != manifest["downloads"][side]["sha1"]: + raise ValueError(f"{side} artifact checksum changed; run tools/lab.py prepare") + jars[side] = jar + libraries = [] + with zipfile.ZipFile(jars["server"]) as archive: + versions = list(lab.bundle_entries(archive, "META-INF/versions.list")) + if len(versions) != 1 or versions[0][1] != manifest["id"]: + raise ValueError("Unexpected server bundle") + checksum, _, _ = versions[0] + jars["server"] = directory / "jars/server-game.jar" + if lab.digest(jars["server"], "sha256") != checksum: + raise ValueError("Inner server artifact checksum changed") + for checksum, _, relative in lab.bundle_entries(archive, "META-INF/libraries.list"): + library = directory / "libraries/server" / relative + if lab.digest(library, "sha256") != checksum: + raise ValueError(f"Dependency checksum changed: {relative}") + libraries.append(library) + return lock, jars, libraries + + +def compare(reference, candidate): + # Text mode retains cross-platform universal-newline behavior. Equal chunks + # avoid a Python loop for every line in multi-gigabyte differential traces. + count = 0 + last = '' + with reference.open(encoding='utf-8') as expected, candidate.open(encoding='utf-8') as actual: + while True: + left, right = expected.read(1024 * 1024), actual.read(1024 * 1024) + if left != right: + break + if not left: + if not last: + raise AssertionError('Empty output cannot establish parity') + return count + (last != '\n') + count += left.count('\n') + last = left[-1] + # Preserve the existing exact first-line mismatch diagnostic. Mismatches are + # exceptional; successful runs use only the bounded chunk buffers above. + with reference.open(encoding='utf-8') as expected, candidate.open(encoding='utf-8') as actual: + for line, (left, right) in enumerate(itertools.zip_longest(expected, actual), 1): + if left != right: + raise AssertionError(f'Parity mismatch at output line {line}: vanilla={left!r}, Rust={right!r}') + raise AssertionError('Parity outputs changed during comparison') + +def run(command, **kwargs): + subprocess.run(command, cwd=lab.ROOT, check=True, timeout=300, **kwargs) + + +def source_hashes(sources): + return {str(Path(path).resolve().relative_to(lab.ROOT)): lab.digest(Path(path), "sha256") for path in sources} + + +def ensure_sources_unchanged(sources, expected): + actual = source_hashes(sources) + changed = sorted(key for key in expected.keys() | actual.keys() if expected.get(key) != actual.get(key)) + if changed: + raise RuntimeError("Sources changed during validation: " + ", ".join(changed)) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--prepare", action="store_true", help="Download and verify the pinned reference artifacts first") + args = parser.parse_args() + build = lab.LOCAL / "rust-parity" + build.mkdir(parents=True, exist_ok=True) + # Remove a previous success marker before any build or comparison can fail. + report_path = build / "report.json" + report_path.unlink(missing_ok=True) + if args.prepare: + lab.prepare() + lock, jars, libraries = verify_artifacts() + commands = list(corpus()) + inputs = build / "inputs.txt" + inputs.write_text("\n".join(commands) + "\n", encoding="utf-8") + source = lab.ROOT / "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCoreOracle.java" + sources = [source, Path(__file__), *sorted((lab.ROOT / "crates/horizon-core").rglob("*.rs")), + lab.ROOT / "crates/horizon-core/Cargo.toml", lab.ROOT / "Cargo.toml", lab.ROOT / "Cargo.lock"] + tested_sources = source_hashes(sources) + classes = build / "classes" + classes.mkdir(exist_ok=True) + dependency_path = os.pathsep.join(map(str, libraries)) + run(["javac", "--release", str(lock["minecraft"]["java_major"]), "-proc:none", + "-cp", os.pathsep.join([str(jars["server"]), dependency_path]), "-d", str(classes), str(source)]) + run(["cargo", "build", "--release", "--bin", "horizon-parity"]) + # Ask Cargo for its artifact path so custom target directories work too. + metadata = json.loads(subprocess.check_output(["cargo", "metadata", "--no-deps", "--format-version", "1"], cwd=lab.ROOT, text=True)) + binary = Path(metadata["target_directory"]) / "release" / ("horizon-parity.exe" if os.name == "nt" else "horizon-parity") + candidate = build / "rust.txt" + with inputs.open("rb") as stdin, candidate.open("wb") as stdout: + run([str(binary)], stdin=stdin, stdout=stdout) + references = [] + for side, jar in jars.items(): + reference = build / f"vanilla-{side}.txt" + run(["java", "-Xmx512M", "-cp", os.pathsep.join([str(classes), str(jar), dependency_path]), + "dev.horizonlab.parity.VanillaCoreOracle", str(inputs), str(reference)]) + matched = compare(reference, candidate) + references.append({"side": side, "jar_sha256": lab.digest(jar, "sha256"), + "output_sha256": lab.digest(reference, "sha256"), "matched_output_lines": matched}) + print(f"{side}: {matched:,} output lines match the Rust implementation", flush=True) + ensure_sources_unchanged(sources, tested_sources) + report = {"schema": 1, "minecraft": lock["minecraft"]["version"], "platform": platform.platform(), + "java": subprocess.check_output(["java", "--version"], text=True).splitlines()[0], + "rustc": subprocess.check_output(["rustc", "--version"], text=True).strip(), + "manifest_sha1": lock["minecraft"]["manifest_sha1"], "commands": dict(Counter(line.split()[0] for line in commands)), + "inputs_sha256": lab.digest(inputs, "sha256"), "rust_output_sha256": lab.digest(candidate, "sha256"), + "sources_sha256": tested_sources, + "references": references, + "scope": "Selected integer positions, seeded RNG operations including inclusive/exclusive integer intervals and float/double triangular draws, positional factories, UTF-16 Java string hashing, MD5-derived seeds and packed-storage operations. Floating-point helper NaNs canonicalized; finite results and signed zeros compared by bits. No gameplay, rendering or performance claim."} + lab.write_json(report_path, report) + print(f"Scoped parity checks passed: {report_path}") + + +if __name__ == "__main__": + main() diff --git a/tools/test_scaffolding_collision_parity.py b/tools/test_scaffolding_collision_parity.py new file mode 100644 index 000000000..0d956437e --- /dev/null +++ b/tools/test_scaffolding_collision_parity.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 +"""Compare contextual scaffolding collision selection with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + import math + def bits(value):return struct.pack('>d',value).hex() + epsilon=struct.unpack('>f',struct.pack('>f',1e-5))[0] + positions=[-2147483648,-64,-1,0,1,320,2147483647] + modes=['empty','position','player','marker','placement','placement_null','with_player','with_marker','with_null'] + for block_y in positions: + heights=[-math.inf,math.inf,math.nan,block_y-0.5,block_y+0.5,block_y+1.5] + for top in [0.0,1.0]: + threshold=(block_y+top)-epsilon + heights += [math.nextafter(threshold,-math.inf),threshold,math.nextafter(threshold,math.inf),block_y+top] + for mode in modes: + for i,y in enumerate(heights): + for descending in [False,True]: + for distance in range(8): + for bottom in [False,True]: + for water in [False,True]: + yield {'mode':mode,'y':bits(y),'other':bits(y),'descending':descending,'always':bool(i%2),'item':2,'count':1,'stand':False,'fail':False,'scaffolding':[distance,bottom,water,block_y]} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-scaffolding-collision-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaCollisionContextOracle.java' + helpers=[oracle.with_name('VanillaFaceSupportOracle.java')] + runner=lab.ROOT/'tools/test_collision_context_parity.py' + sources=[oracle,*helpers,runner,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/collision_context_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,*helpers],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaCollisionContextOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','collision_context_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('collision_context_fixture.exe' if os.name=='nt' else 'collision_context_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} scaffolding-collision output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'block_states':32,'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual CollisionContext.getCollisionShape dispatch and native scaffolding behavior for all 32 scaffolding states, nine context variants, descending flags, integer Y extremes, nonfinite positions and adjacent double values around the top/bottom float-epsilon thresholds. Full shape coordinates, extrema, box ordering and cube metadata match. A rejecting world proxy verifies selection performs no world reads. Scaffolding placement/update/falling behavior and live movement remain pending.'} + lab.write_json(report_path,report);print(f'Scoped scaffolding collision parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_scattered_ore_parity.py b/tools/test_scattered_ore_parity.py new file mode 100644 index 000000000..b6bbd5aa7 --- /dev/null +++ b/tools/test_scattered_ore_parity.py @@ -0,0 +1,94 @@ +#!/usr/bin/env python3 +"""Compare scattered-ore attempts, air exposure and rule-driven mutations.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base,test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(facts): + yes={'predicate_type':'always_true'} + no={'predicate_type':'not','rule':yes} + targets=[[],[{'target':yes,'state':'gold_ore'}],[{'target':no,'state':'air'},{'target':{'predicate_type':'random_block_match','block':'stone','probability':0.5},'state':'iron_ore'},{'target':yes,'state':'copper_ore'}]] + def fixture(definition,legacy=False,seed=0,mode=0,fail=-1,reject=0,origin=None): + return {'definition':json.dumps(definition,separators=(',',':')),'origin':origin or [15,-64,15],'world_min':-64,'legacy':legacy,'seed':seed,'mode':mode,'reject':reject,'fail':fail,'repeats':2} + for size in [0,1,7,8,64]: + for chance in [0,0.25,0.5,1]: + for values in targets: + definition={'type':'scattered_ore','targets':values,'size':size,'discard_chance_on_air_exposure':chance} + for legacy in [False,True]: + for seed in [0,-1,9223372036854775807]: + for mode in range(8): + for fail,reject in [(-1,0),(-1,3),(0,0),(7,0)]: + yield fixture(definition,legacy,seed,mode,fail,reject) + for field,values in [('size',[-1,65,4294967297,None,False,'1',0.9]),('discard_chance_on_air_exposure',[-0.0,-1e-100,-0.1,1.01,1e100,None,False,'0.5']),('targets',[None,False,{},'stone',[{}]])]: + for value in values: + definition={'type':'scattered_ore','targets':targets[1],'size':8,'discard_chance_on_air_exposure':0.5};definition[field]=value + yield fixture(definition) + for p in [[2147483647,2147483647,2147483647],[-2147483648,-2147483648,-2147483648]]: + for legacy in [False,True]: + yield fixture({'type':'scattered_ore','targets':targets[1],'size':64,'discard_chance_on_air_exposure':1},legacy=legacy,origin=p) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-scattered-ore-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaScatteredOreOracle.java" + helper=oracle.with_name("VanillaBlockStateCodecOracle.java") + tag_helper=oracle.with_name("VanillaHeightmapOracle.java") + tags=worldgen.tag_resources(jars['server']) + if not tags or tags!=worldgen.tag_resources(jars['client']):raise ValueError('client/server tags differ') + (build/'tags.json').write_text(json.dumps(tags,separators=(',',':')),encoding='utf-8') + sources=[oracle,helper,tag_helper,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/scattered_ore_fixture.rs"] + tested_sources=base.source_hashes(sources) + fixture_paths=[build/"tags.json"];classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,helper,tag_helper],"compile-java") + for side,jar in jars.items(): + path=build/f"facts-{side}.json" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaScatteredOreOracle","export",path],side+"-export") + fixture_paths.append(path) + if json.loads((build/"facts-client.json").read_text())!=json.loads((build/"facts-server.json").read_text()):raise ValueError("reference feature block states differ") + facts=json.loads((build/"facts-server.json").read_text()) + if len(facts['states'])!=35723:raise ValueError('incomplete pinned registry') + fixtures=list(corpus(facts));inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + fixture_paths.append(inputs) + tested_fixtures=base.source_hashes(fixture_paths) + run(["cargo","build","--release","-p","horizon-world","--example","scattered_ore_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("scattered_ore_fixture.exe" if os.name=="nt" else "scattered_ore_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaScatteredOreOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} scattered-ore output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"block_states":len(facts["states"]),"integer_properties":len(facts["integers"]),"requested_placements":sum(f["repeats"] for f in fixtures), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual scattered_ore feature codec and native ScatteredOreFeature.place. Attempt counts, six float draws per offset, Java rounding, wrapped coordinates, state capture per attempt, ordered target predicates, conditional air-exposure draws, directional neighbor reads, early air detection and mutation flags/results/errors are compared. Both random modes, size/discard boundaries, empty targets, repeated calls, solid/mixed/directional-air worlds and partial failures are included. Complete ore veins, region side effects, chunk decoration and gameplay remain pending."} + + + lab.write_json(report_path,report);print(f"Scoped scattered-ore parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_server_graphics.py b/tools/test_server_graphics.py index 9e894a229..ac30c0680 100644 --- a/tools/test_server_graphics.py +++ b/tools/test_server_graphics.py @@ -25,7 +25,7 @@ def main(): fixture = build_mod.build_integration_fixture('server-graphics', 'dev.horizonlab.metrics.ServerGraphicsIntegration', fixture_dependencies={}) version = build_pack.read_lock()['pack_version'] - mod = root / 'dist' / f'horizon-lab-{version}.jar' + mod = root / 'dist' / f'horizon-{version}.jar' digest = hashlib.sha256(mod.read_bytes()).hexdigest() instance = root / '.local/runtime' / ('server-graphics-' + (args.backend or 'default')) if instance.exists(): diff --git a/tools/test_server_player_combat_parity.py b/tools/test_server_player_combat_parity.py new file mode 100644 index 000000000..ec55510b9 --- /dev/null +++ b/tools/test_server_player_combat_parity.py @@ -0,0 +1,95 @@ +#!/usr/bin/env python3 +"""Compare composed server-player damage, cooldown, health and hunger with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base, test_player_hurt_parity as hurt +except ImportError: + import lab + import test_rust_parity as base + import test_player_hurt_parity as hurt + + +def storage_corpus(catalog): + import copy + def bits(v):return struct.pack('>f',v).hex() + def double(v):return struct.pack('>d',v).hex() + rng=random.Random(0x434f4d424154) + values=[-float('inf'),-1e30,-1,-0.,0.,1e-40,.1,1,5,10,20,1e30,float('inf'),float('nan')] + def extend(f,randomize=False): + f=copy.deepcopy(f);f.update(health=bits(20),absorption=bits(4),exhaustion=bits(0),dead=False,attributes=[dict(base=double(v),amount=double(0),operation=0) for v in [15,8,20,20]]) + if randomize: + for k in ['health','absorption','exhaustion']:f[k]=bits(rng.choice(values)) + f['dead']=rng.randrange(8)==0 + for a in f['attributes']:a.update(base=double(rng.choice(values)),amount=double(rng.choice(values)),operation=rng.randrange(3)) + for o in f['ops']: + o.update(weapon=False,resistance=False,amplifier=0,break_armor=False,armor_after=double(0),food_exhaustion=bits(.1),pack=False,pack_callback=False,client=False,bypass_armor=False,bypass_effects=False,bypass_resistance=False,bypass_enchantments=False) + if randomize: + for k in ['weapon','resistance','break_armor','pack','pack_callback','client','bypass_armor','bypass_effects','bypass_resistance','bypass_enchantments']:o[k]=bool(rng.randrange(2)) + o.update(amplifier=rng.choice([-2147483648,-2,-1,0,1,4,5,2147483647]),armor_after=double(rng.choice(values)),food_exhaustion=bits(rng.choice(values)),fail=rng.choice([-1,-1,-1,*range(65)])) + return f + for i,f in enumerate(hurt.corpus()):yield extend(f,i%2==0) + template=extend(next(hurt.corpus())) + clean=copy.deepcopy(template['ops'][0]);clean.update(damage=bits(8),blocked=bits(0),ability_invulnerable=False,scales=False,attacker=0,owner=0,can_harm=True,difficulties=[2,2,2],fail=-1,reset_cooldown=True) + for health in values: + for absorption in values: + f=copy.deepcopy(template);f.update(health=bits(health),absorption=bits(absorption),cooldown=0,last_hurt=bits(0));f['ops']=[dict(clean,damage=bits(v),pack=i%2==0) for i,v in enumerate([1,2,4,8,16,32,64])];yield f + for fail in range(-1,66): + for absorption in [0,4,40]: + f=copy.deepcopy(template);f.update(absorption=bits(absorption),cooldown=0,last_hurt=bits(0));f['ops']=[dict(clean,fail=fail,pack_callback=True,break_armor=True,resistance=True,amplifier=0),dict(clean,damage=bits(25),pack=True)];yield f + + +def corpus(catalog): + rng=random.Random(0x494d4d554e45434f) + for i,f in enumerate(storage_corpus(catalog)): + for o in f['ops']: + o.update(removed=False,permanent=o['invulnerable'],temporary=False,creative=False,fire_immune=False,fall_immune=False,fall=False,drowning=False,rule_drowning=True,rule_fall=True,rule_fire=True,rule_freeze=True,changing=False,pearl=False,loaded=True) + if i%3==0: + for k in ['removed','temporary','creative','fire_immune','fall_immune','fall','drowning','changing','pearl']:o[k]=rng.randrange(8)==0 + for k in ['rule_drowning','rule_fall','rule_fire','rule_freeze','loaded']:o[k]=rng.randrange(4)!=0 + yield f + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-server-player-combat-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaServerPlayerCombatOracle.java' + helper=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaEntityAttributeOracle.java' + health_helper=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaPlayerHealthOracle.java' + sources=[oracle,helper,health_helper,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/test_player_hurt_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/server_player_combat_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,helper,health_helper],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaServerPlayerCombatOracle',mode,path],side+'-'+mode) + java('server','export',build);states=json.loads((build/'catalog.json').read_text());fixtures=list(corpus(states));inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs,build/'catalog.json',build/'ids.json',build/'slots.json',build/'head.json'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','server_player_combat_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('server_player_combat_fixture.exe' if os.name=='nt' else 'server_player_combat_fixture') + run([binary,build],'rust') + run([binary,build,'--live'],'rust-live') + base.compare(build/'rust.txt',build/'rust-live.txt');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} server player combat output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'live_rust_output_sha256':lab.digest(build/'rust-live.txt','sha256'),'references':references,'scope':'Both EntityAttributes and LiveAttributes storage bindings produce the same native traces. Actual ServerPlayer outer hurt through Player/LivingEntity gates and actual Player inner damage, native armor/resistance reduction, registered modified attributes, synchronized health/absorption and FoodData exhaustion. Repeated hits, cooldown/state writes, death rejection, callbacks and numeric edges. Actual inherited invulnerability predicates include virtual flags, empty-equipment enchantment immunity, damage gamerules and client-loading/dimension guards; blocking amount, durability, effects, PvP permission, attribution, knockback, death services and criterion listeners remain controlled; enchanted items, registered sources and complete entity/game lifecycle remain pending.'} + lab.write_json(report_path,report);print(f'Scoped server player combat parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_server_player_damage_parity.py b/tools/test_server_player_damage_parity.py new file mode 100644 index 000000000..240c68323 --- /dev/null +++ b/tools/test_server_player_damage_parity.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 +"""Compare registered server player damage and synchronized absorption with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(catalog): + def bits(v):return struct.pack('>f',v).hex() + def double(v):return struct.pack('>d',v).hex() + def op(damage=8,**kw): + o=dict(damage=bits(damage),fail=-1,invulnerable=False,ability_invulnerable=False,client=False,weapon=False,resistance=False,amplifier=0,break_armor=False,armor_after=double(0),food_exhaustion=bits(.1),pack=False,pack_callback=False,**{'bypass_'+k:False for k in ['armor','effects','resistance','enchantments']});o.update(kw);return o + def row(ops,health=20,absorption=4,armor=15,toughness=8,maximum=20,max_absorption=20,exhaustion=0,amounts=None,operations=None): + return dict(health=bits(health),absorption=bits(absorption),exhaustion=bits(exhaustion),attributes=[dict(base=double(v),amount=double((amounts or [0]*4)[i]),operation=(operations or [0]*4)[i]) for i,v in enumerate([armor,toughness,maximum,max_absorption])],ops=ops) + values=[-float('inf'),-1e30,-1,-0.,0.,1e-40,.1,1,5,10,20,1e30,float('inf'),float('nan')] + for damage in values: + for absorption in values: + for armor in [-1,0,1,15,30,100,float('nan')]: + yield row([op(damage),op(damage,weapon=True,pack=True),op(damage,resistance=True)],absorption=absorption,armor=armor) + for mask in range(16): + for amp in [-2147483648,-2,-1,0,1,4,5,2147483647]: + for fail in range(-1,28): + yield row([op(19,amplifier=amp,resistance=True,fail=fail,break_armor=True,pack_callback=True,**{'bypass_'+k:bool(mask&(1<-2147483648 else y, sea=sea, repeats=2) + for origin in [[-17, -2147483648, -33], [2147483647, 2147483647, -2147483648], [-2147483648, 0, 2147483647]]: + yield case(origin=origin, repeats=2) + yield case(definition='{"type":"freeze_top_layer","ignored":null}') + for fail, reject in itertools.product([-1, 0, 9, 101], [0, 3]): + placed = {'feature': {'type': 'freeze_top_layer'}, 'placement': [{'type': 'count', 'count': 2}]} + yield case(definition=json.dumps(placed), mode='placed', fail=fail, reject=reject) + yield case(definition=json.dumps({'type': 'overlay', 'features': [placed, {'feature': 'horizon:moss', 'placement': []}]}), fail=fail, reject=reject) + + +if __name__ == '__main__': + harness.run(corpus, 'rust-snow-freeze-parity', __file__, + 'Native SnowAndFreezeFeature unit codec, 16x16 X-then-Z traversal, MOTION_BLOCKING heights, one biome lookup per column retained across freeze/snow checks, actual biome temperature/freezing/snow predicates, ice-before-snow mutation, snowy ground state changes after attempted snow writes, flags 2 and unconditional normal success. Every ground, snow candidate and fluid-state carrier is compared through failure-terminated prefixes. Full runs cover climate thresholds/NaN, both modifiers, precipitation, light gates, both unchanged RNGs, repeated mutations/cache use, rejected writes, partial failures, extreme heights/sea levels, wrapped X/Z and composition. Fixture heights and a single biome are controlled; actual lighting, dynamic biome selection, world update execution and full generation remain pending. Native temperature caches are released after each independent fixture.') diff --git a/tools/test_speleothem_parity.py b/tools/test_speleothem_parity.py new file mode 100644 index 000000000..36561c0a9 --- /dev/null +++ b/tools/test_speleothem_parity.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python3 +"""Compare small speleothem direction, base patches and waterlogged points.""" +import itertools +import json +try: + from . import test_simple_block_parity as harness +except ImportError: + import test_simple_block_parity as harness + +FIELDS=['chance_of_taller_generation','chance_of_directional_spread','chance_of_spread_radius2','chance_of_spread_radius3'] +def corpus(facts,placement): + get=lambda name:facts['defaults']['minecraft:'+name] + def definition(**extra): + value={'type':'speleothem','base_block':'dripstone_block','pointed_block':'pointed_dripstone','replaceable_blocks':['stone','dirt']} + value.update(extra);return value + def case(value=None,**extra): + f={'definition':json.dumps(definition() if value is None else value),'mode':'feature','origin':[0,64,0], + 'legacy':False,'seed':0,'world_seed':1,'fail':-1,'reject':0,'brightness':15,'fallback':get('air'), + 'states':[[0,63,0,get('stone')]],'repeats':1} + f.update(extra);return f + zero=definition(**dict.fromkeys(FIELDS,0)) + for state in range(len(facts['states'])): + yield case(states=[[0,65,0,state]],fail=2) + yield case(states=[[0,63,0,state]],fail=2) + yield case(zero,fluid=state) + yield case(definition(chance_of_taller_generation=1),states=[[0,63,0,get('stone')],[0,65,0,state]],fail=12) + for legacy,seed,mask,reject in itertools.product([False,True],range(64),range(4),[0,1,3]): + states=[[0,65,0,get('stone') if mask&1 else get('air')],[0,63,0,get('dirt') if mask&2 else get('air')]] + yield case(legacy=legacy,seed=seed,states=states,reject=reject,repeats=2) + for legacy,fail,reject,chance in itertools.product([False,True],[-1,*range(48)],[0,1,3],[0,0.5,1]): + yield case(definition(**dict.fromkeys(FIELDS,chance)),legacy=legacy,fail=fail,reject=reject,fallback=get('stone'),repeats=2) + for base,point in itertools.product(['stone',{'id':'oak_log','properties':{'axis':'x'}},'water'],['pointed_dripstone',{'id':'pointed_dripstone','properties':{'vertical_direction':'down','thickness':'base','waterlogged':'true'}},'stone','torch']): + for legacy in [False,True]:yield case(definition(base_block=base,pointed_block=point,**dict.fromkeys(FIELDS,1)),legacy=legacy,fallback=get('stone'),repeats=2) + for field in FIELDS: + for value in [None,-0.0,-1,0,1,1.0000000001,1.1,0.2,'0.5',True,False,[],{}]: + yield case(definition(**{field:value})) + for field in ['base_block','pointed_block','replaceable_blocks']: + value=definition();del value[field];yield case(value) + for raw in [None,[],{},False,'missing']: + yield case(definition(**{field:raw})) + for value in ['#minecraft:dripstone_replaceable_blocks',[],['air','water','stone'],'air','#horizon:missing']: + yield case(definition(replaceable_blocks=value),repeats=2) + for origin in [[0,-64,0],[-17,319,-33],[2147483647,2147483647,-2147483648],[-2147483648,-2147483648,2147483647]]: + below=[origin[0],((origin[1]-1+2**31)%2**32)-2**31,origin[2],get('stone')] + yield case(definition(**dict.fromkeys(FIELDS,1)),origin=origin,states=[below],repeats=2) + for legacy,fail,reject in itertools.product([False,True],[-1,0,2,5,19],[0,1,3]): + placed={'feature':definition(),'placement':[{'type':'count','count':2}]} + yield case(placed,mode='placed',legacy=legacy,fail=fail,reject=reject) + yield case({'type':'overlay','features':[placed,{'feature':definition(chance_of_taller_generation=1),'placement':[]}]},legacy=legacy,fail=fail,reject=reject) + +if __name__=='__main__': + harness.run(corpus,'rust-speleothem-parity',__file__, + 'Native SpeleothemFeature codecs and optional float defaults, ceiling/floor base tests, conditional random direction, four horizontal base-patch branches with radius-two/three direction draws, taller-tip chance, post-patch base recheck and waterlogged tip/frustum writes. Base/pointed configured states select block identities and their defaults; invalid pointed properties fail at native placement time. All states cover support/taller/contained-fluid roles, both RNGs, probability boundaries, rejected writes, partial failures, repeated mutation, wrapped coordinates and composition. Base patch updates and point placement are traced in order; neighbor updates, falling behavior, fluids, larger clusters and full cave generation remain pending.') diff --git a/tools/test_spike_parity.py b/tools/test_spike_parity.py new file mode 100644 index 000000000..75c2fc996 --- /dev/null +++ b/tools/test_spike_parity.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python3 +"""Compare tapered spikes, rare tall forms and discontinuous roots.""" +import itertools +import json +try: + from . import test_simple_block_parity as harness +except ImportError: + import test_simple_block_parity as harness + + +def corpus(facts, placement): + states = facts['states'] + get = lambda name: facts['defaults']['minecraft:' + name] + + def spike(**extra): + value = {'type': 'spike', 'state': {'id': 'packed_ice'}, + 'can_place_on': {'type': 'matching_blocks', 'blocks': 'snow_block'}, + 'can_replace': {'type': 'matching_blocks', 'blocks': ['snow_block', 'ice']}} + value.update(extra) + return value + + def case(definition=None, **extra): + origin = extra.pop('origin', [0, 70, 0]) + value = {'definition': json.dumps(definition if definition is not None else spike(), separators=(',', ':')), + 'mode': 'feature', 'origin': origin, 'legacy': False, 'seed': 0, 'world_seed': 1, + 'fail': -1, 'reject': 0, 'brightness': 15, 'fallback': get('air'), + 'states': [[*origin, get('snow_block')]], 'repeats': 1} + value.update(extra) + return value + + for state in states: + yield case(spike(state=state), fail=20) + for state in range(len(states)): + yield case(origin=[0, -62, 0], states=[[0, -62, 0, state]], fail=20) + yield case(fallback=state, fail=30) + # Full runs include the rare elevated branch and both random algorithms. + for legacy, seed in itertools.product([False, True], range(1024)): + yield case(legacy=legacy, seed=seed) + predicates = [ + {'type': 'true'}, {'type': 'not', 'predicate': {'type': 'true'}}, + {'type': 'matching_blocks', 'blocks': '#minecraft:logs'}, + {'type': 'has_sturdy_face', 'direction': 'up'}, + {'type': 'would_survive', 'state': 'short_grass'}, {'type': 'solid'}, + ] + for predicate, legacy, seed, fail, reject in itertools.product( + predicates, [False, True], range(8), [-1, 0, 1, 9, 31, 200], [0, 1, 3]): + yield case(spike(can_replace=predicate), legacy=legacy, seed=seed, fail=fail, reject=reject, + fallback=get('oak_log'), repeats=2) + yield case(spike(can_place_on=predicate), legacy=legacy, seed=seed, fail=fail, reject=reject, + fallback=get('stone'), repeats=2) + for name, legacy, seed in itertools.product( + ['air', 'cave_air', 'void_air', 'snow_block', 'ice', 'packed_ice', 'blue_ice', 'stone', 'water'], + [False, True], range(16)): + yield case(fallback=get(name), legacy=legacy, seed=seed, repeats=2) + # Distinguish block identity from exact state identity in the root exception. + for state, legacy in itertools.product( + [{'id': 'oak_log', 'properties': {'axis': 'x'}}, {'id': 'oak_log'}, {'id': 'air'}], [False, True]): + yield case(spike(state=state, can_replace={'type': 'not', 'predicate': {'type': 'true'}}), + fallback=get('oak_log'), legacy=legacy) + for y, depth, legacy in itertools.product([-64, -62, -61, 49, 50, 51, 52, 64, 150, 319], range(5), [False, True]): + initial = [[0, y - d, 0, get('air')] for d in range(depth)] + initial.append([0, y - depth, 0, get('snow_block')]) + yield case(origin=[0, y, 0], states=initial, legacy=legacy) + for origin, legacy in itertools.product( + [[2147483647, 70, 2147483647], [-2147483648, 70, -2147483648], + [0, -2147483648, 0], [0, 2147483647, 0]], [False, True]): + yield case(origin=origin, legacy=legacy, fail=200) + for key, values in [ + ('state', [None, False, {}, [], 'missing', {'id': 'missing'}, {'id': 'oak_log', 'properties': {'axis': 'invalid'}}]), + ('can_place_on', [None, False, {}, [], {'type': 'missing'}]), + ('can_replace', [None, False, {}, [], {'type': 'missing'}])]: + for value in values: + definition = spike(); definition[key] = value + yield case(definition) + definition = spike(); del definition[key] + yield case(definition) + for legacy, fail, reject in itertools.product([False, True], [-1, 0, 9, 101], [0, 3]): + placed = {'feature': spike(), 'placement': [{'type': 'count', 'count': 2}]} + yield case(placed, mode='placed', legacy=legacy, fail=fail, reject=reject, repeats=2) + yield case({'type': 'overlay', 'features': [placed, {'feature': 'horizon:moss', 'placement': []}]}, + legacy=legacy, fail=fail, reject=reject) + + +if __name__ == '__main__': + harness.run(corpus, 'rust-spike-parity', __file__, + 'Native SpikeFeature required state/predicate codecs, air descent, support gating, height/radius draws, rare tall spikes, float taper and edge draws, independently tested mirrored layers, and discontinuous roots with a fixed Y=50 floor. Every configured output, origin and candidate state is compared through failure-terminated prefixes. Full runs cover 1024 seeds per RNG, replacement/support predicates, exact-state root exceptions, rejected writes, repeated mutations, query failures, wrapped positions and placement/overlay composition. Rust limits pathological descent/root work to 2^20 visits. World update execution and complete generation remain pending.') diff --git a/tools/test_spring_parity.py b/tools/test_spring_parity.py new file mode 100644 index 000000000..9e7d4f3e0 --- /dev/null +++ b/tools/test_spring_parity.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python3 +"""Compare spring cavity checks, fluid placement and scheduled fluid ticks.""" +import itertools +import json +try: + from . import test_simple_block_parity as harness +except ImportError: + import test_simple_block_parity as harness + + +def corpus(facts, placement): + states=facts['states'];get=lambda name:facts['defaults']['minecraft:'+name] + directions=[(-1,0,0),(1,0,0),(0,0,-1),(0,0,1),(0,-1,0)] + def spring(state=None, **extra): + value={'type':'spring_feature','state':state if state is not None else {'id':'water','properties':{'falling':'false'}},'valid_blocks':'stone'} + value.update(extra);return value + def case(definition=None, **extra): + origin=extra.pop('origin',[0,64,0]);wrap=lambda n:(n+2**31)%2**32-2**31 + position=lambda d:[wrap(origin[i]+d[i]) for i in range(3)] + initial=[[*position((0,0,0)),get('air')],[*position((-1,0,0)),get('air')]] + value={'definition':json.dumps(definition if definition is not None else spring(),separators=(',',':')), + 'mode':'feature','origin':origin,'legacy':False,'seed':0,'world_seed':1,'fail':-1,'reject':0, + 'brightness':15,'fallback':get('stone'),'states':initial,'repeats':1} + value.update(extra);return value + for state in range(len(states)): + for position in [[0,65,0],[0,63,0],[0,64,0],[1,64,0]]: + initial={(0,64,0):get('air'),(-1,64,0):get('air')};initial[tuple(position)]=state + yield case(states=[[*p,s] for p,s in initial.items()]) + palette=[get('air'),get('stone'),get('water')] + for choices in itertools.product(range(3),repeat=5): + initial=[[x,64+y,z,palette[choices[i]]] for i,(x,y,z) in enumerate(directions)]+[[0,64,0,get('air')]] + for required,rocks,holes in itertools.product([False,True],range(6),range(6)): + yield case(spring(requires_block_below=required,rock_count=rocks,hole_count=holes),states=initial) + # Air can belong to valid_blocks; rock and hole counts are independent. + yield case(spring(valid_blocks=['stone','air'],requires_block_below=False, + rock_count=sum(v in [0,1] for v in choices),hole_count=choices.count(0)),states=initial) + fluids=[{'id':'empty'}] + for name in ['water','lava','flowing_water','flowing_lava']: + for falling in ['false','true']: + for level in (range(1,9) if name.startswith('flowing') else [8]): + fluids.append({'id':name,'properties':{'falling':falling,'level':str(level)}}) + for fluid,legacy,fail,reject,origin in itertools.product(fluids,[False,True],[-1,*range(16)],[0,1,3], + [[0,64,0],[2147483647,2147483647,2147483647],[-2147483648,-2147483648,-2147483648]]): + yield case(spring(fluid),legacy=legacy,seed=-1,fail=fail,reject=reject,origin=origin,repeats=2) + for valid in [[],['air','stone'],'#minecraft:logs','#minecraft:leaves',['stone','water','oak_log'],'air']: + for fallback in ['stone','air','oak_log','oak_leaves']: + yield case(spring(valid_blocks=valid,requires_block_below=False),fallback=get(fallback)) + for key,values in [('state',[None,False,'water',{}, {'id':'missing'}, {'id':'water','properties':{'falling':False}}]), + ('requires_block_below',[None,False,True,0,1,'true']), + ('rock_count',[None,-1,0,4,5,6,2147483647,-2147483648,0.5,False,'4',4294967300]), + ('hole_count',[None,-1,0,1,5,6,2147483647,False,'1']), + ('valid_blocks',[None,False,{},[],['missing'],'#missing'])]: + for value in values: + definition=spring();definition[key]=value;yield case(definition) + definition=spring();definition.pop(key,None);yield case(definition) + for legacy,seed,fail,reject in itertools.product([False,True],[0,-1,0x123456789abcdef],[-1,0,5,12,14],[0,3]): + placed={'feature':spring(),'placement':[{'type':'count','count':2}]} + yield case(placed,mode='placed',legacy=legacy,seed=seed,fail=fail,reject=reject,repeats=2) + yield case({'type':'overlay','features':[placed,{'feature':'horizon:moss','placement':[]}]},legacy=legacy,seed=seed,fail=fail,reject=reject) + + +if __name__=='__main__': + harness.run(corpus,'rust-spring-parity',__file__, + 'Native SpringFeature codec and ordered cavity checks. Every block state is exercised above, below, at the origin and as a horizontal neighbor; all air/rock/other five-neighbor combinations and requested count pairs, overlapping air/valid-block membership, defaults, malformed fields, tags, wrapped coordinates and all 37 fluid states are included. Separate ordered rock and hole reads, flags 2, rejected writes, immediate fluid tick requests even after rejected writes, partial failures and untouched random streams are compared. Scheduled requests, named providers and overlay/modifier composition are traced; execution of fluid ticks, spreading and full gameplay remain pending.') diff --git a/tools/test_sprint_input_parity.py b/tools/test_sprint_input_parity.py new file mode 100644 index 000000000..69c42f161 --- /dev/null +++ b/tools/test_sprint_input_parity.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python3 +"""Compare native LocalPlayer sprint decisions over evolving keyboard input.""" +import itertools +import json +import os +from pathlib import Path +import platform +import random +import struct +import subprocess +try: + from . import lab, test_rust_parity as base, test_model_baking_parity as baking +except ImportError: + import lab, test_rust_parity as base, test_model_baking_parity as baking + +def corpus(): + def step(keys,flags=0,food=20,window=7):return dict(keys=keys,flags=flags,food=food,window=window) + def row(steps,initial_keys=0,sprint=False,trigger=0):return dict(steps=steps,initial_keys=initial_keys,sprint=sprint,trigger=trigger) + # Complete combinations of the 17 environmental/ability/equipment queries. + for flags in range(1<<17): + yield row([step(65,flags),step(1,flags),step(0,flags)]) + for keys in range(128): + for initial in [0,1,3,5,33,65]: + for sprint in [False,True]: + for trigger in [-2147483648,-1,0,1,2,7,8,2147483647]: + yield row([step(keys),step(keys),step(0)],initial,sprint,trigger) + for window in range(11): + for gap in range(13): + for food in [-2147483648,-1,0,5,6,7,20,2147483647]: + for sprint_key in [False,True]: + seq=[1,0]+[0]*gap+[65 if sprint_key else 1,1,0,1,1,0] + yield row([step(k,food=food,window=window) for k in seq]) + rng=random.Random(0x535052494e54) + for _ in range(1000): + yield row([step(rng.randrange(128),rng.randrange(1<<17),rng.choice([0,6,7,20]),rng.randrange(11)) for _ in range(40)], + rng.randrange(128),bool(rng.randrange(2)),rng.randrange(-1,12)) + +def main(): + lock,jars,_=base.verify_artifacts();libraries=baking.client_libraries() + build=lab.LOCAL/'rust-sprint-input';build.mkdir(exist_ok=True) + report=build/'report.json';report.unlink(missing_ok=True) + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSprintInputOracle.java' + sources=[Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/test_model_baking_parity.py',lab.ROOT/'tools/lab.py',oracle,lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-client/Cargo.toml',lab.ROOT/'crates/horizon-client/src/input.rs',lab.ROOT/'crates/horizon-client/src/sprint.rs',lab.ROOT/'crates/horizon-client/src/lib.rs',lab.ROOT/'crates/horizon-client/examples/sprint_probe.rs'] + tested=base.source_hashes(sources) + def run(command,name): + with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=600,stdout=log,stderr=subprocess.STDOUT) + fixtures=list(corpus());operations=sum(len(f['steps']) for f in fixtures);inputs=build/'inputs.jsonl' + inputs.write_text(''.join(json.dumps(f,separators=(',',':'))+'\n' for f in fixtures));input_hash=lab.digest(inputs,'sha256') + classes=build/'classes';classes.mkdir(exist_ok=True) + dependencies=os.pathsep.join(map(str,[jars['client'],*libraries])) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',dependencies,'-d',classes,oracle],'compile-java') + run(['cargo','build','--locked','-p','horizon-client','--example','sprint_probe'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT)) + binary=Path(metadata['target_directory'])/'debug/examples'/('sprint_probe.exe' if os.name=='nt' else 'sprint_probe') + run([binary,inputs,build/'rust.txt'],'rust') + run(['java','-Xmx768M','-cp',str(classes)+os.pathsep+dependencies,'dev.horizonlab.parity.VanillaSprintInputOracle',inputs,build/'client.txt'],'client') + matched=base.compare(build/'client.txt',build/'rust.txt') + if matched!=operations+len(fixtures):raise AssertionError('Incomplete input output') + base.ensure_sources_unchanged(sources,tested) + if input_hash!=lab.digest(inputs,'sha256'):raise AssertionError('Input fixtures changed') + lab.write_json(report,dict(schema=1,minecraft=lock['minecraft']['version'],manifest_sha1=lock['minecraft']['manifest_sha1'],platform=platform.platform(),rustc=subprocess.check_output(['rustc','--version'],text=True).strip(),java=subprocess.check_output(['java','--version'],text=True).splitlines()[0],fixtures=len(fixtures),operations=operations,sources_sha256=tested,input_sha256=input_hash,client_jar_sha256=lab.digest(jars['client'],'sha256'),matched_output_lines=matched,output_sha256=lab.digest(build/'rust.txt','sha256'),scope='Actual KeyboardInput.tick and LocalPlayer.aiStep prefix through sprint start/stop requests and sprintTriggerTime. A sentinel in jumpableVehicle stops before riding and parent/world movement. Native private canStartSprinting, isSprintingPossible and shouldStopRun/SwimSprinting execute, with controlled environmental/effect/vehicle/UI queries, actual FoodData/Abilities and actual ItemStack USE_EFFECTS. Compares evolving sprint state, timer, keyboard vector/shift and every ordered setSprinting request, including duplicate requests. All 17 query-flag combinations, all keyboard combinations with previous states, signed timer boundaries, food thresholds, configurable windows0..10, double taps and random sequences. Setter records requests; the separate scene gate covers actual attribute changes and movement. Parent movement, complete LocalPlayer ticks, GUI options persistence, networking and full gameplay parity remain unfinished.')) + print(f'{matched:,} sprint phase output lines match the pinned client: {report}',flush=True) + +if __name__=='__main__':main() diff --git a/tools/test_sprite_animation_parity.py b/tools/test_sprite_animation_parity.py new file mode 100644 index 000000000..06ca25c96 --- /dev/null +++ b/tools/test_sprite_animation_parity.py @@ -0,0 +1,93 @@ +#!/usr/bin/env python3 +"""Compare animation metadata, frame selection and tick state with the pinned client.""" +import json +import os +from pathlib import Path +import platform +import random +import struct +import subprocess +import zipfile +try: + from . import lab, test_rust_parity as base, test_model_baking_parity as baking, test_cuboid_model_parity as decoding +except ImportError: + import lab, test_rust_parity as base, test_model_baking_parity as baking, test_cuboid_model_parity as decoding + + +def corpus(): + def row(name, metadata, width=16, height=64, ticks=128): + return dict(name=name,json=json.dumps(metadata),width=width,height=height,ticks=ticks) + yield row('default', {}) + for key in ['width','height','frametime','interpolate','frames']: + for i,value in enumerate([None,True,False,0,1,-1,1.9,-0.9,4294967297,2147483648,1e100,'1','true',{},[],[0,1], [None], [{'index':1,'time':2}]]): + yield row(f'field-{key}-{i}',{key:value}) + for key in ['index','time']: + for i,value in enumerate([None,True,False,0,1,-1,1.9,-0.9,4294967297,2147483648,1e100,'1',{},[],[1]]): + yield row(f'frame-{key}-{i}',{'frames':[0,dict(index=1,**{key:value})]}) if key=='time' else row(f'frame-{key}-{i}',{'frames':[0,{'index':value}]}) + for i,frames in enumerate([[],[3],[99],[1,99],[2,2],[0,1,0],[3,2,1,0],[3,99,1,2],[{},0],[{'index':2,'time':None},0],[0,{'index':1,'time':2147483647}]]): + for interpolate in [False,True]: yield row(f'sequence-{i}-{interpolate}',{'frames':frames,'interpolate':interpolate}) + for width,height in [(16,16),(16,48),(48,16),(32,48),(15,32),(1,4),(64,64)]: + for w,h in [(None,None),(8,None),(None,8),(8,8),(16,32),(32,16),(1,1),(65,65)]: + yield row(f'dim-{width}-{height}-{w}-{h}',{'width':w,'height':h},width,height,16) + rng=random.Random(0x535052495445) + for i in range(512): + frames=[{'index':rng.randrange(7),'time':rng.choice([1,2,3,7,19,31,2147483647])} for _ in range(rng.randrange(12))] + yield row(f'random-{i}',{'frames':frames,'frametime':rng.randrange(1,20),'interpolate':bool(rng.randrange(2))},ticks=512) + for i,raw in enumerate(['null','[]','true','1','"x"','{"width":1e9999}','{"frametime":1e-9999}','{"width":4294967312.9}','{"frames":[0.9,1.9,2.9]}']): + item=row(f'raw-{i}',{}); item['json']=raw;yield item + + numbers=['-0.0','4294967296','4294967297','4294967295','9223372036854775809', + '-9223372036854775809','1e9999','1e10000','1e-9999','1e-10000', + '1e2147483647','1e2147483648','1.0e10000','1.0e10001', + '1'*1023,'1'*1024,'1'*10000,'1'*10001, + *('1'+'0'*(n-2)+'1' for n in [20,64,65,66,100,1023,1024,10000,10001]), + '1844674407370955161601','-1844674407370955161601', + '18446744073709551616.1','18446744073709551616e-18'] + for i,number in enumerate(numbers): + for key in ['width','frametime','interpolate']: + item=row(f'number-{key}-{i}',{});item['json']='{"'+key+'":'+number+'}';yield item + item=row(f'number-index-{i}',{});item['json']='{"frames":[0,'+number+']}';yield item + + +def main(): + lock,jars,_=base.verify_artifacts() + build=lab.LOCAL/'rust-sprite-animation-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSpriteAnimationOracle.java' + helper=oracle.with_name('VanillaCuboidModelOracle.java');crate=lab.ROOT/'crates/horizon-assets' + sources=[oracle,helper,Path(__file__),lab.ROOT/'tools/test_model_baking_parity.py',lab.ROOT/'tools/test_cuboid_model_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',crate/'Cargo.toml',*sorted(crate.rglob('*.rs'))] + tested=base.source_hashes(sources) + rows=[] + with zipfile.ZipFile(jars['client']) as archive: + for name in sorted(archive.namelist()): + if not name.startswith('assets/minecraft/textures/') or not name.endswith('.png.mcmeta'):continue + metadata=json.loads(archive.read(name)) + if 'animation' not in metadata:continue + width,height=struct.unpack('>II',archive.read(name.removesuffix('.mcmeta'))[16:24]) + rows.append(dict(name=name,json=json.dumps(metadata['animation']),width=width,height=height,ticks=512)) + resources=len(rows);rows.extend(corpus()) + inputs=build/'inputs.jsonl';inputs.write_text(''.join(json.dumps(row)+'\n' for row in rows));fixtures=base.source_hashes([inputs]) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=3600,stdout=log,stderr=subprocess.STDOUT) + dependencies=os.pathsep.join(map(str,[jars['client'],*baking.client_libraries()])) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',dependencies,'-d',classes,oracle,helper],'compile-java') + run(['cargo','build','--locked','-p','horizon-assets','--example','sprite_animation_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--locked','--no-deps','--format-version','1'],cwd=lab.ROOT)) + binary=Path(metadata['target_directory'])/'debug/examples'/('sprite_animation_fixture.exe' if os.name=='nt' else 'sprite_animation_fixture') + run([binary,inputs,build/'rust.jsonl'],'rust') + run(['java','-Xmx512M','-cp',str(classes)+os.pathsep+dependencies,'dev.horizonlab.parity.VanillaSpriteAnimationOracle',inputs,build/'client.jsonl'],'client') + rejected=decoding.canonicalize(build/'client.jsonl');decoding.canonicalize(build/'rust.jsonl') + native=[json.loads(line) for line in (build/'client.jsonl').read_text().splitlines()] + rust=[json.loads(line) for line in (build/'rust.jsonl').read_text().splitlines()] + for left,right in zip(native,rust,strict=True): + if left!=right: raise AssertionError('Sprite animation mismatch: '+left['name']) + matched=base.compare(build/'client.jsonl',build/'rust.jsonl') + assert all('error' not in row for row in native[:resources]), 'Bundled resource was rejected' + states=sum(len(row['value']['animation']['samples'])+len(row['value']['animation']['edges']) for row in native if row.get('value',{}).get('animation')) + base.ensure_sources_unchanged(sources,tested);base.ensure_sources_unchanged([inputs],fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'resource_animations':resources,'native_tick_states':states,'fixtures':len(rows),'rejected':rejected,'sources_sha256':tested,'fixtures_sha256':fixtures,'rust_output_sha256':lab.digest(build/'rust.jsonl','sha256'),'references':[{'side':'client','jar_sha256':lab.digest(jars['client'],'sha256'),'output_sha256':lab.digest(build/'client.jsonl','sha256'),'matched_output_lines':matched}],'scope':'Actual AnimationMetadataSection JsonOps codec, frame-size calculation, SpriteContents sequence construction and AnimationState ticks. All bundled animated texture metadata plus synthetic numeric, null, invalid, repeated and out-of-image frame cases. Valid image grids only for SpriteContents construction. No resource-loader fallback, image decoding, GPU interpolation pixels, atlas packing or gameplay parity claim.'} + lab.write_json(report_path,report);print(f'Native sprite animation: {matched:,} fixtures match ({rejected:,} rejected); {report_path}',flush=True) + + +if __name__=='__main__':main() diff --git a/tools/test_state_provider_parity.py b/tools/test_state_provider_parity.py new file mode 100644 index 000000000..693fa3fd5 --- /dev/null +++ b/tools/test_state_provider_parity.py @@ -0,0 +1,400 @@ +#!/usr/bin/env python3 +"""Compare initial state-provider codecs, choices and optional sampling.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import zipfile +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen, test_biome_temperature_parity as temperature, test_material_condition_parity as material, test_block_survival_parity as survival +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + import test_biome_temperature_parity as temperature + import test_material_condition_parity as material, test_block_survival_parity as survival + + +def corpus(facts,tags,provider_resources=None,catalog_resources=None,fluid_tags=None,biomes=None,biome_tags=None,support_states=None,survival_rules=None): + def cases(definition,states=None,repeats=1,wide=False): + if states is None:states=list(facts['defaults'].values())[:6] + for typed in [False,True]: + for legacy,worldgen in ([(False,False),(True,False),(False,True),(True,True)] if wide else [(False,False)]): + yield {'definition':json.dumps(definition,separators=(',',':')),'typed':typed,'legacy':legacy,'worldgen':worldgen,'seed':-1 if legacy else 0x123456789abcdef,'states':states,'repeats':repeats,'fail':-1} + for index,state in enumerate(facts['states']): + yield from cases(state,[index]) + yield from cases({'type':'simple','state':state},[index]) + for name in facts['defaults']: + for value in [name,{'type':'simple','state':name},{'type':'random_block','blocks':name},{'type':'random_block','blocks':[name]}]: + yield from cases(value,[0],wide=False) + for name in sorted(tags): + yield from cases({'type':'random_block','blocks':'#'+name},wide=True) + for blocks in [[],['water','stone','water'],['air'],['oak_log','redstone_wire','water'],['#minecraft:logs'],'#horizon:missing',['missing'],False,{},None]: + for f in cases({'type':'random_block','blocks':blocks},repeats=3,wide=True): + yield f + yield dict(f,fail=0) + yield dict(f,fail=2) + entries=lambda weights:[{'data':state,'weight':weight} for state,weight in zip(['stone','water','oak_log'],weights)] + for weights in [[],[0],[1],[100],[0,0,0],[0,1,0],[1,0,2],[2147483647],[2147483647,1],[-1],[1.9],[4294967297],[True],[None]]: + yield from cases({'type':'weighted','entries':entries(weights)},repeats=5,wide=True) + for state in ['missing','stone',{'id':'water','properties':{'level':'+01'}},{'id':'oak_log','properties':{'axis':'z'}},None,False,1,[],{}]: + yield from cases({'type':'simple','state':state},wide=True) + for typed in [{'type':'simple','state':'water'},{'type':'weighted','entries':entries([1,2,3])},{'type':'random_block','blocks':['water']},{'type':'missing'}]: + for name in ['stone','missing']: + yield from cases(dict(typed,id=name),wide=True) + all_states=list(range(len(facts['states']))) + for direction in ['down','up','north','south','west','east']: + yield from cases({'type':'rotated','state':{'type':'random_block','blocks':[]},'direction':direction},all_states) + yield from cases({'type':'rotated','state':{'type':'random_block','blocks':[]}},all_states,wide=True) + sources=[{'id':'oak_log'},{'type':'weighted','entries':[{'data':'oak_log','weight':2},{'data':'piston','weight':3},{'data':'hopper','weight':1}]},{'type':'random_block','blocks':['furnace','stone','oak_stairs']},{'type':'random_block','blocks':[]},{'type':'random_block','blocks':'#horizon:empty'},'oak_log',None] + for source in sources: + for direction in [None,'up','west','UP','missing',False,1]: + for f in cases({'type':'rotated','state':source,'direction':direction},repeats=4,wide=True): + yield f + yield dict(f,fail=0) + for depth in [1,2,8,64]: + source={'type':'weighted','entries':[{'data':'oak_log','weight':1},{'data':'piston','weight':1}]} + for _ in range(depth):source={'type':'rotated','state':source} + yield from cases(source,repeats=2,wide=True) + # One representative per property-family value covers every compatible + # property update for each target state without a quadratic all-state matrix. + integers={tuple(v) for v in facts.get('integers',[])} + domains={} + for state in facts['states']: + for name,value in state.get('properties',{}).items():domains.setdefault((state['id'],name),set()).add(value) + signatures={key:(key[1],key in integers,tuple(sorted(values))) for key,values in domains.items()} + representatives={} + for index,state in enumerate(facts['states']): + for name,value in state.get('properties',{}).items():representatives.setdefault(signatures[(state['id'],name)],{}).setdefault(value,index) + for index,state in enumerate(facts['states']): + targets={0,index} + for name in state.get('properties',{}):targets.update(representatives[signatures[(state['id'],name)]].values()) + f=next(cases({'type':'copy_properties','source':state},sorted(targets))) + yield f + for source in sources: + for f in cases({'type':'copy_properties','source':source},repeats=3,wide=True): + yield f + yield dict(f,fail=0) + yield dict(f,fail=1) + for block,property_name in sorted(integers): + values=sorted(map(int,domains[(block,property_name)])) + for value in [values[0],values[-1],values[0]-1,values[-1]+1,{'type':'uniform','min_inclusive':values[0]-1,'max_inclusive':values[-1]+1}]: + source={'type':'weighted','entries':[{'data':{'id':block},'weight':1},{'data':'stone','weight':1},{'data':'water','weight':1}]} + yield from cases({'type':'randomized_int','source':source,'property':property_name,'values':value},repeats=3,wide=True) + for name in ['missing','axis','level','age','power','distance','',None,False]: + for value in [0,1,-1,{'type':'uniform','min_inclusive':0,'max_inclusive':31}]: + for f in cases({'type':'randomized_int','source':{'type':'random_block','blocks':[]},'property':name,'values':value},list(facts['defaults'].values()),wide=True): + yield f + yield dict(f,fail=0) + for depth in [1,2,8,32]: + source={'type':'random_block','blocks':[]} + for i in range(depth):source={'type':'copy_properties','source':{'type':'randomized_int','source':source,'property':'level','values':{'type':'uniform','min_inclusive':0,'max_inclusive':15}}} + yield from cases(source,wide=True) + positions=[[0,0,0],[1,1,1],[-1,-64,-1],[17,-63,-33],[30000000,319,-30000000],[2147483647,-2147483648,2147483647],[16777217,65,-16777217]] + rng=random.Random(7581) + positions += [[rng.randrange(-30000000,30000000),rng.randrange(-2032,2032),rng.randrange(-30000000,30000000)] for _ in range(9)] + def noise_cases(definition,wide=True): + for f in cases(definition,[0]*len(positions),wide=wide): + yield dict(f,positions=positions) + parameters=[{'base_octave':-3,'octave_count':3},{'base_octave':-32},{'base_octave':32},{'base_octave':0,'base_amplitude':1000,'normalize':False},{'base_octave':-1,'octave_count':2,'amplitude_modifiers':[0,0]}] + for kind in ['noise','noise_threshold','dual_noise']: + for noise in parameters: + for scale in [0.01,0.5,1.0,1e-45,3.4028234663852886e38]: + for seed in [0,-1,9223372036854775807]: + f={'type':kind,'seed':seed,'noise':noise,'scale':scale} + if kind=='noise_threshold':f.update(threshold=0.0,high_chance=0.5,default_state='stone',low_states=['water','dirt'],high_states=['oak_log','poppy','piston']) + else:f['states']=['stone','water','dirt','oak_log','poppy','piston','furnace'] + if kind=='dual_noise':f.update(variety=[1,5],slow_noise={'base_octave':-4,'octave_count':2},slow_scale=scale) + yield from noise_cases(f) + template={'type':'noise','seed':0,'noise':{'base_octave':0},'scale':0.1,'states':['stone','water','oak_log']} + for seed in [18446744073709551617,-18446744073709551617,1e100,-1e100,1.9,-1.9,0.9,-0.9,True,None,'1']: + yield from noise_cases(dict(template,seed=seed)) + for scale in [0,-0.0,-1,1e-50,1e100,None,True,'0.1']: + yield from noise_cases(dict(template,scale=scale),False) + for noise in [{'base_octave':33},{'base_octave':-33},{'base_octave':0,'normalize':'legacy'},{'base_octave':0,'octave_count':0},None,False]: + yield from noise_cases(dict(template,noise=noise),False) + for states in [[],['missing'],None,False,'stone',[{'id':'water','properties':{'level':'1'}}]]: + yield from noise_cases(dict(template,states=states),False) + for variety in [1,64,[1,1],[64,64],[1,64],{'min_inclusive':2,'max_inclusive':7},[0,2],[2,1],[1,65],[],[1],False,None]: + yield from noise_cases(dict(template,type='dual_noise',variety=variety,slow_noise={'base_octave':0,'normalize':False,'base_amplitude':1000},slow_scale=0.25),False) + for threshold in [-1,-0.0,0,1,-1.1,1.1,None]: + for chance in [-0.0,0,0.5,1,2,None]: + yield from noise_cases(dict(template,type='noise_threshold',threshold=threshold,high_chance=chance,default_state='stone',low_states=['water'],high_states=['poppy']),False) + for definition in (provider_resources or {}).values():yield from noise_cases(definition) + true={'type':'true'} + false={'type':'not','predicate':true} + inside={'type':'inside_world_bounds'} + predicates=[true,false,inside,{'type':'all_of','predicates':[]},{'type':'any_of','predicates':[]}, + {'type':'all_of','predicates':[false,inside]}, {'type':'all_of','predicates':[inside,false]}, + {'type':'any_of','predicates':[true,inside]}, {'type':'any_of','predicates':[inside,true]}] + predicates += [{'type':'inside_world_bounds','offset':[0,y,0]} for y in [-2147483648,-16,-1,1,16,17]] + empty={'type':'random_block','blocks':[]} + choices=[empty,{'id':'water'}, {'type':'weighted','entries':entries([1,2,3])}, + {'type':'copy_properties','source':empty}, template, + {'type':'randomized_int','source':{'id':'water'},'property':'level','values':{'type':'uniform','min_inclusive':0,'max_inclusive':16}}] + positions=[[17,y,-33] for y in [-2147483648,-65,-64,-63,0,318,319,320,2147483647]] + for predicate in predicates: + for choice in choices: + for fallback in [None,empty,{'id':'oak_log'}]: + definition={'type':'rule_based','fallback':fallback,'rules':[ + {'if_true':predicate,'then':choice}, {'if_true':inside,'then':empty}, + {'if_true':false,'then':{'type':'copy_properties','source':empty}}]} + for f in cases(definition,[0]*len(positions),wide=True): + f=dict(f,positions=positions) + yield f + yield dict(f,query_fail=0) + yield dict(f,query_fail=2) + yield dict(f,fail=0) + for rules in [[],None,False,[{}],[{'if_true':true}],[{'then':empty}], + [{'if_true':false,'then':{'type':'missing'}}], [{'if_true':{'type':'missing'},'then':empty}]]: + for fallback in [None,empty,{'id':'stone'},'stone',{'type':'missing'}]: + yield from cases({'type':'rule_based','rules':rules,'fallback':fallback},wide=True) + for depth in [1,2,8,32]: + source=empty + for _ in range(depth):source={'type':'rule_based','fallback':source,'rules':[{'if_true':true,'then':empty}]} + yield from cases(source,wide=True) + def predicate_cases(predicate, states=None, wide=True): + if states is None:states=[0]*len(positions) + definition={'type':'rule_based','rules':[{'if_true':predicate,'then':{'id':'stone'}}],'fallback':empty} + for f in cases(definition,states,wide=wide): + f=dict(f,positions=positions) + yield f + yield dict(f,query_fail=1,fail=1) + anchors=[{kind:v} for kind in ['absolute','above_bottom','below_top','relative_to_sea_level'] for v in [-2032,-64,0,63,2031]] + for minimum in anchors: + for maximum in anchors: + yield from predicate_cases({'type':'height_range','min_inclusive':minimum,'max_inclusive':maximum},wide=False) + for invalid in [None,1,{}, {'absolute':2032}, {'below_top':-2033}, {'absolute':0,'above_bottom':0}]: + yield from predicate_cases({'type':'height_range','min_inclusive':invalid,'max_inclusive':{'absolute':0}},wide=False) + for tag in [*sorted(tags),'missing',':','#minecraft:logs','UPPERCASE',None,False]: + yield from predicate_cases({'type':'matching_block_tag','tag':tag},list(facts['defaults'].values()),wide=False) + for name in facts['defaults']: + matching=[i for i,state in enumerate(facts['states']) if state['id']==name] + states=sorted(set(matching+[0,len(facts['states'])-1])) + for blocks in [name,[name]]: + yield from predicate_cases({'type':'matching_blocks','blocks':blocks},states,wide=False) + for blocks in [*['#'+name for name in sorted(tags)], [], ['stone','water','stone'], '#missing', ['#minecraft:logs'], ['missing'], ['stone',None], None, False, {}]: + yield from predicate_cases({'type':'matching_blocks','blocks':blocks},list(facts['defaults'].values()),wide=False) + for fluids in ['empty','flowing_water','water','flowing_lava','lava',*['#'+name for name in sorted(fluid_tags or {})],[],['water','water','flowing_lava'],'missing','#missing',['#minecraft:water'],False,None]: + yield from predicate_cases({'type':'matching_fluids','fluids':fluids},all_states,wide=False) + biome_indices=list(range(len(biomes or {'minecraft:plains':{}}))) + for selected in [*sorted(biomes or {}),*['#'+name for name in sorted(biome_tags or {})],[],['plains','desert','plains'],'plains','missing','#missing',['#minecraft:is_badlands'],False,None]: + predicate={'type':'matching_biomes','biomes':selected} + for condition in [predicate,{'type':'not','predicate':predicate}, {'type':'volume_match','min':[0,0,0],'max':[1,0,1],'match':predicate}]: + for f in predicate_cases(condition,[0]*len(biome_indices),wide=False):yield dict(f,biomes=biome_indices) + for selected in ['plains','#horizon:ordered',[]]: + for f in predicate_cases({'type':'any_of','predicates':[{'type':'matching_biomes','biomes':selected},inside]},[0]*len(biome_indices)): + yield dict(f,biomes=biome_indices) + for offset in [None,[0,0,0],[1,-1,16],[17,18,-19],[2147483647,-2147483648,2147483647],[4294967297,0,0],[1.9,-1.9,0],[],[1],[1,2,3,4],False,{}]: + predicate={'type':'unobstructed','offset':offset} + for condition in [predicate,{'type':'not','predicate':predicate},{'type':'volume_match','min':[-1,0,-1],'max':[1,0,1],'match':predicate}]: + for f in predicate_cases(condition): + yield dict(f,unobstructed=True) + yield dict(f,unobstructed=False) + for offset in [[0,0,0],[16,-16,1],[-2147483648,0,-2147483648],[17,0,0],[],None]: + yield from predicate_cases({'type':'matching_block_tag','tag':'minecraft:logs','offset':offset}) + for minimum,maximum in [([0,0,0],[0,0,0]),([-1,-1,-1],[1,1,1]),([-16,0,0],[16,1,1]),([1,0,0],[0,0,0]),([-17,0,0],[0,0,0]),([-2147483648,0,0],[-2147483648,0,0])]: + for child in [true,false,inside,{'type':'height_range','min_inclusive':{'above_bottom':0},'max_inclusive':{'below_top':0}}, {'type':'matching_block_tag','tag':'minecraft:logs'}, {'type':'not','predicate':{'type':'matching_block_tag','tag':'minecraft:logs'}}]: + yield from predicate_cases({'type':'volume_match','min':minimum,'max':maximum,'match':child}) + for depth in [1,2,3]: + child={'type':'not','predicate':{'type':'matching_block_tag','tag':'minecraft:logs'}} + for _ in range(depth):child={'type':'volume_match','min':[0,0,0],'max':[1,1,1],'match':child} + yield from predicate_cases(child) + for definition in (provider_resources or {}).values(): + if definition.get('type') == 'minecraft:rule_based': + yield from cases(definition,all_states,wide=True) + for bounds in [[0,1,0],[2147483647,2,0],[-2147483648,384,63]]: + for f in cases({'type':'rule_based','rules':[{'if_true':inside,'then':{'id':'stone'}}]},[0]*len(positions),wide=True): + yield dict(f,bounds=bounds,positions=positions) + for kind in ['solid','replaceable']: + for offset in [None,[0,0,0],[16,-16,1],[-2147483648,0,0],[17,0,0],[],[0,0],False,[1.9,0,0]]: + predicate={'type':kind,'offset':offset} + definition={'type':'rule_based','fallback':{'id':'water'},'rules':[{'if_true':predicate,'then':{'id':'stone'}}]} + for f in cases(definition,all_states,wide=True):yield dict(f,positions=positions) + for f in cases(definition,[0,1],wide=True): + yield dict(f,fail=0,positions=positions) + yield dict(f,fail=1,positions=positions) + for condition in [{'type':'all_of','predicates':[false,{'type':kind}]},{'type':'any_of','predicates':[true,{'type':kind}]},{'type':'not','predicate':{'type':kind}},{'type':'volume_match','min':[-1,0,-1],'max':[1,0,1],'match':{'type':kind}}]: + definition={'type':'rule_based','fallback':empty,'rules':[{'if_true':condition,'then':empty},{'if_true':{'type':kind},'then':{'id':'stone'}}]} + for f in cases(definition,list(facts['defaults'].values()),wide=True): + yield f + yield dict(f,fail=0) + yield dict(f,fail=2) + if survival_rules: + representatives={} + neighbors=[facts['defaults'][name] for name in ['minecraft:air','minecraft:stone','minecraft:pale_moss_carpet','minecraft:shulker_box','minecraft:moving_piston'] if name in facts['defaults']] + def survival_provider(condition): + return {'type':'rule_based','fallback':{'id':'water'},'rules':[{'if_true':condition,'then':{'id':'stone'}}]} + for state in facts['states']: + rule=survival_rules.get(state['id']) + if rule is None:continue + key=survival.behavior_key(rule,state) + representatives.setdefault(key,state) + yield from cases(survival_provider({'type':'would_survive','state':state}),neighbors) + for state in representatives.values(): + yield from cases(survival_provider({'type':'would_survive','state':state}),all_states) + if survival_rules[state['id']] in ['Crop','PitcherCrop','Mushroom']: + for brightness in [-2147483648,-1,0,7,8,9,12,13,14,15,2147483647]: + for f in cases(survival_provider({'type':'would_survive','state':state}),all_states[::7],wide=True): + yield dict(f,brightness=brightness) + yield dict(f,brightness=brightness,query_fail=0) + yield dict(f,brightness=brightness,fail=0) + for offset in [[-16,0,16],[16,-16,0],[17,0,0],[-17,0,0],[0,0],None,'bad']: + condition={'type':'would_survive','state':state,'offset':offset} + for f in cases(survival_provider(condition),neighbors,wide=True): + yield dict(f,positions=positions) + yield dict(f,positions=positions,fail=0) + yield dict(f,positions=positions,query_fail=0) + condition={'type':'would_survive','state':state} + for combined in [{'type':'all_of','predicates':[false,condition]},{'type':'any_of','predicates':[true,condition]},{'type':'not','predicate':condition},{'type':'volume_match','min':[-1,0,-1],'max':[1,0,1],'match':condition}]: + definition={'type':'rule_based','rules':[{'if_true':combined,'then':empty},{'if_true':condition,'then':{'id':'stone'}}]} + for f in cases(definition,neighbors,wide=True): + yield f + yield dict(f,fail=1) + for state in ['stone','minecraft:water',{'id':'ladder','properties':{'facing':'east'}},{'id':'water','properties':{'level':'+01'}},'missing',{},None,False,[],{'id':'pale_moss_carpet','properties':{'bottom':'bad'}}]: + yield from cases(survival_provider({'type':'would_survive','state':state}),neighbors,wide=True) + yield from cases(survival_provider({'type':'would_survive'}),neighbors) + support_states = all_states if support_states is None else support_states + support_ids=set(support_states) + dynamic_support_states=[state for state in all_states if state not in support_ids] + for direction in ['down','up','north','south','west','east','UP','missing',None,False,1]: + for offset in [None,[0,0,0],[16,-16,1],[-2147483648,0,0],[17,0,0],[],[1.9,0,0]]: + condition={'type':'has_sturdy_face','direction':direction,'offset':offset} + definition={'type':'rule_based','fallback':{'id':'water'},'rules':[{'if_true':condition,'then':{'id':'stone'}}]} + valid=direction in ['down','up','north','south','west','east'] and offset not in [[17,0,0],[]] + for f in cases(definition,all_states if valid else [0],wide=False):yield dict(f,positions=positions) + for f in cases(definition,[0,1],wide=True):yield dict(f,positions=positions,fail=0) + for direction in ['down','up','north','south','west','east']: + definition={'type':'rule_based','fallback':{'id':'water'},'rules':[{'if_true':{'type':'has_sturdy_face','direction':direction},'then':{'id':'stone'}}]} + if dynamic_support_states: + for f in cases(definition,dynamic_support_states,wide=True): + for failure in [0,1,2]:yield dict(f,query_fail=failure,positions=positions) + for condition in [{'type':'all_of','predicates':[false,{'type':'has_sturdy_face','direction':direction}]},{'type':'any_of','predicates':[true,{'type':'has_sturdy_face','direction':direction}]},{'type':'not','predicate':{'type':'has_sturdy_face','direction':direction}}]: + definition={'type':'rule_based','rules':[{'if_true':condition,'then':empty},{'if_true':{'type':'has_sturdy_face','direction':direction},'then':{'id':'stone'}}]} + for f in cases(definition,support_states[::17],wide=True): + yield f + yield dict(f,fail=1) + for name in [*(catalog_resources or {}),'horizon:unknown','minecraft:stone','STONE',':']: + for f in cases(name,repeats=2,wide=True): + yield f + yield dict(f,holder=True) + for wrapper in [{'type':'copy_properties','source':name},{'type':'rotated','state':name}, + {'type':'randomized_int','source':name,'property':'age','values':1}, + {'type':'rule_based','fallback':name,'rules':[]}, + {'type':'rule_based','rules':[{'if_true':true,'then':name}]}]: + for f in cases(wrapper,repeats=2,wide=True): + yield f + yield dict(f,holder=True,fail=0) + for f in cases({'id':'stone','type':'copy_properties','source':name},wide=True): + yield f + yield dict(f,holder=True) + for definition in (provider_resources or {}).values(): + for f in cases(definition,list(facts['defaults'].values()),wide=True):yield dict(f,holder=True) + for value in [None,False,1,[],{}, {'type':'unknown'}, {'id':'missing'}, {'type':False}, {'type':'simple'}, {'type':'random_block'}, {'type':'weighted'}]: + yield from cases(value) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__) + parser.add_argument('--prepare',action='store_true') + parser.add_argument('--resume',action='store_true',help='Reuse stages only after verifying input, executable and output hashes') + args=parser.parse_args() + build=lab.LOCAL/'rust-state-provider-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + checkpoint_path=build/'run-state.json' + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStateProviderOracle.java' + helpers=[oracle.with_name(name+'.java') for name in ['VanillaBlockStateCodecOracle','VanillaHeightmapOracle','VanillaMaterialConditionOracle','VanillaBiomeTemperatureOracle','VanillaAnchorOracle','VanillaBlockPropertiesOracle','VanillaBlockSupportOracle','VanillaBlockSurvivalOracle','VanillaCollisionOracle']] + sources=[oracle,*helpers,lab.ROOT/'tools/test_block_survival_parity.py',lab.ROOT/'tools/test_biome_temperature_parity.py',lab.ROOT/'tools/test_material_condition_parity.py',lab.ROOT/'tools/test_worldgen_parity.py',Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/state_provider_fixture.rs'] + tested_sources=base.source_hashes(sources) + environment={'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'dependencies':{str(path):lab.digest(path,'sha256') for path in [*jars.values(),*libraries]}} + checkpoint=survival.load_checkpoint(checkpoint_path,tested_sources,environment) if args.resume else None + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,stdout=log,stderr=subprocess.STDOUT,timeout=3600) + dependency_path=os.pathsep.join(map(str,libraries)) + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaStateProviderOracle',mode,path],side+'-'+mode) + if checkpoint is None: + checkpoint_path.unlink(missing_ok=True) + tags=worldgen.tag_resources(jars['server']) + if not tags or tags!=worldgen.tag_resources(jars['client']):raise ValueError('client/server tags differ') + tags.update({'horizon:empty':json.dumps({'values':[]}), 'horizon:ordered':json.dumps({'values':['minecraft:water','minecraft:stone','minecraft:water']})}) + (build/'tags.json').write_text(json.dumps(tags,separators=(',',':')),encoding='utf-8') + def fluid_tag_resources(jar): + with zipfile.ZipFile(jar) as archive: + prefix='data/minecraft/tags/fluid/' + return {'minecraft:'+name[len(prefix):-5]:archive.read(name).decode('utf-8') for name in sorted(archive.namelist()) if name.startswith(prefix) and name.endswith('.json')} + fluid_tags=fluid_tag_resources(jars['server']) + if fluid_tags!=fluid_tag_resources(jars['client']):raise ValueError('client/server fluid tags differ') + fluid_tags['horizon:empty']='{"values":[]}' + (build/'fluid-tags.json').write_text(json.dumps(fluid_tags,separators=(',',':')),encoding='utf-8') + biomes=temperature.biome_resources(jars['server']);biome_tags=material.biome_tag_resources(jars['server']) + if biomes!=temperature.biome_resources(jars['client']) or biome_tags!=material.biome_tag_resources(jars['client']):raise ValueError('client/server biome resources differ') + biome_tags['horizon:empty']='{"values":[]}' + biome_tags['horizon:ordered']='{"values":["minecraft:plains","minecraft:desert","minecraft:plains"]}' + for name,data in [('biomes',biomes),('biome_tags',biome_tags)]: + (build/(name+'.json')).write_text(json.dumps(data,separators=(',',':')),encoding='utf-8') + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,*helpers],'compile-java') + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars['server']),dependency_path]),'dev.horizonlab.parity.VanillaBlockPropertiesOracle','export',build],'properties-export') + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars['server']),dependency_path]),'dev.horizonlab.parity.VanillaBlockSupportOracle','export',build],'support-export') + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars['server']),dependency_path]),'dev.horizonlab.parity.VanillaBlockSurvivalOracle','definitions',build],'survival-export') + survival_classes=json.loads((build/'survival-classes.json').read_text()) + survival_rules=survival.bind_definitions(survival_classes,json.loads((build/'survival-placement-classes.json').read_text()),json.loads((build/'survival-support-tags.json').read_text())) + (build/'survival-rules.json').write_text(json.dumps(survival_rules,separators=(',',':'))) + support_states=json.loads((build/'support-cached-states.json').read_text()) + if len(support_states)!=35524:raise ValueError('incomplete support state cache') + for side in jars:java(side,'export',build/f'facts-{side}.json') + facts=json.loads((build/'facts-server.json').read_text()) + if facts!=json.loads((build/'facts-client.json').read_text()):raise ValueError('client/server registry metadata differs') + if len(facts['states'])!=35723:raise ValueError('incomplete pinned state registry') + def resources(jar): + with zipfile.ZipFile(jar) as archive: + return {name:json.loads(archive.read(name)) for name in sorted(archive.namelist()) if name.startswith('data/minecraft/worldgen/block_state_provider/') and name.endswith('.json')} + provider_resources=resources(jars['server']) + if provider_resources!=resources(jars['client']):raise ValueError('bundled noise provider resources differ') + (build/'providers.json').write_text(json.dumps(provider_resources,separators=(',',':')),encoding='utf-8') + catalog_resources={name.removeprefix('data/minecraft/worldgen/block_state_provider/').removesuffix('.json'):json.dumps(value,separators=(',',':')) for name,value in provider_resources.items()} + catalog_resources={'minecraft:'+name:value for name,value in catalog_resources.items()} + catalog_resources['horizon:empty']=json.dumps({'type':'random_block','blocks':[]}) + catalog_resources['horizon:tagged']=json.dumps({'type':'rule_based','rules':[{'if_true':{'type':'matching_block_tag','tag':'minecraft:logs'},'then':'minecraft:cave_vines_head'}],'fallback':'horizon:empty'}) + for depth in range(12): + catalog_resources['horizon:chain_'+str(depth)]=json.dumps({'type':'copy_properties','source':'horizon:chain_'+str(depth-1) if depth else 'horizon:tagged'}) + (build/'catalog.json').write_text(json.dumps(catalog_resources,separators=(',',':')),encoding='utf-8') + inputs=build/'inputs.txt';fixture_count=0;requested_samples=0 + with inputs.open('w',encoding='utf-8') as output: + for fixture in corpus(facts,tags,provider_resources,catalog_resources,fluid_tags,biomes,biome_tags,support_states,survival_rules): + output.write(json.dumps(fixture,separators=(',',':'))+'\n') + fixture_count+=1;requested_samples+=len(fixture['states'])*fixture['repeats']*2 + fixture_paths=[inputs,build/'survival-extra-definitions.json',build/'survival-placement-classes.json',build/'survival-support-tags.json',build/'survival-classes.json',build/'survival-rules.json',build/'cached-support.nbt',build/'support-cached-states.json',build/'block-properties.nbt',build/'cached-collision.nbt',build/'biomes.json',build/'biome_tags.json',build/'fluid-tags.json',build/'catalog.json',build/'providers.json',build/'tags.json',build/'facts-client.json',build/'facts-server.json'];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','state_provider_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('state_provider_fixture.exe' if os.name=='nt' else 'state_provider_fixture') + counts={'block_states':len(facts['states']),'blocks':len(facts['defaults']),'integer_properties':len(facts['integers']),'codec_inputs':fixture_count,'provider_types':10,'named_providers':len(catalog_resources),'rule_predicate_types':16,'survival_supported_blocks':len(survival_rules),'survival_supported_states':sum(s['id'] in survival_rules for s in facts['states']),'support_cached_states':len(support_states),'support_dynamic_states':len(facts['states'])-len(support_states),'biomes':len(biomes),'biome_tag_files':len(biome_tags),'fluid_tag_files':len(fluid_tags),'bundled_provider_definitions':len(provider_resources),'block_tag_files':len(tags),'requested_samples':requested_samples} + base.ensure_sources_unchanged(sources,tested_sources) + checkpoint={'schema':1,'environment':environment,'sources_sha256':tested_sources,'fixtures_sha256':{str(lab.ROOT/name):digest for name,digest in tested_fixtures.items()},'artifacts_sha256':{str(path):lab.digest(path,'sha256') for path in [binary,*sorted(classes.rglob('*.class'))]},'binary':str(binary),'counts':counts,'outputs':{}} + survival.save_checkpoint(checkpoint_path,checkpoint) + print('Verified inputs and compiled executables checkpointed',flush=True) + def stage(name,action): + output=build/(name+'.txt');previous=checkpoint['outputs'].get(name) + if previous is None or not output.exists() or lab.digest(output,'sha256')!=previous: + action() + checkpoint['outputs'][name]=lab.digest(output,'sha256') + survival.save_checkpoint(checkpoint_path,checkpoint) + print(f'{name}: completed output checkpointed',flush=True) + stage('rust',lambda:run([checkpoint['binary'],build],'rust'));references=[] + for side,jar in jars.items(): + stage(side,lambda:java(side,side,build));reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} state-provider output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources) + survival.load_checkpoint(checkpoint_path,tested_sources,environment) + report={'schema':1,**{key:value for key,value in environment.items() if key!='dependencies'},**checkpoint['counts'],'sources_sha256':tested_sources,'fixtures_sha256':{str(Path(name).relative_to(lab.ROOT)):digest for name,digest in checkpoint['fixtures_sha256'].items()},'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual BlockStateProvider DIRECT_CODEC/TYPED_CODEC and simple, weighted, random_block, rotated, copy_properties, randomized_int three noise-based providers and rule_based over the pinned state registry. All states and block defaults, full-state versus typed exclusive decoding, ordered holder sets/tags, duplicates, empty optional results versus world-state fallback, zero/overflow weights, query failures, every state across six fixed rotations, nested random rotations, property copying for every target state against representatives of every compatible property value, integer-property ranges/missing properties, composed transforms and subsequent random consumption. Native property equality families are checked for ambiguity; Rust validates Cartesian state tables and uses compact property strides. Both legacy/xoroshiro streams execute directly and through WorldgenRandom. Noise comparisons include every bundled provider definition, independent legacy seeding, float/double scaling, dual-noise variety selection, threshold draw order and coordinate/codec boundaries. Rule-based comparisons cover true/not/all_of/any_of/inside_world_bounds/height_range/volume_match/matching_block_tag/matching_blocks/matching_fluids/matching_biomes/unobstructed/solid/replaceable/has_sturdy_face/would_survive predicates, ordered optional results, fallbacks, nested rules and world-query failures. Every pinned block-state fluid identity, amount, falling/source flag and own-height bits are derived from descriptors and compared. Fluid-holder sets and all bundled fluid tags are tested against every state. Biome-holder membership and all bundled biome tags are compared across every pinned biome identity, including empty sets, missing names, ordered world queries and short-circuit composition. Unobstructed predicates compare null excluded entities, exact translated unit-shape bounds, ignored-but-validated offsets, true/false world results and failures. Named holder versus direct/typed decoding, nested named providers, missing names, inline ambiguity, ordered resource registration and all bundled named definitions are compared. Solidity and replacement predicates cover every block state, offset wrapping/validation, empty-child fallthrough, composed predicates and query failures using privately imported definition flags and Rust-calculated collision solidity. Has-sturdy-face predicates cover all 35,723 states through unified cached/dynamic support dispatch across six directions, native offset rules, failed state reads, block-entity query failures and ordered optional-child/boolean composition. Block entities are absent in this integration corpus; shulker animation-state shape selection is separately tested and active moving-piston shape generation is tested separately. Would-survive decodes candidate states and bounded offsets, evaluates all supported candidate states and each rule against every neighbor state, and preserves world read/entity failures and short-circuit/optional-child behavior. All pinned survival families are bound through the recorded definition inputs. Complete registry loading/reloading, full block placement behavior and full feature generation remain pending.'} + lab.write_json(report_path,report);print(f'Scoped state-provider parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_status_effect_parity.py b/tools/test_status_effect_parity.py new file mode 100644 index 000000000..4e611bf24 --- /dev/null +++ b/tools/test_status_effect_parity.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +"""Compare shared status-effect storage with native instances.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + durations=[-2147483648,-2,-1,0,1,2,20,32147,2147483647] + amplifiers=[-2147483648,-1,0,1,2,255,256,2147483647] + floats=[0,0x80000000,1,0x3f000000,0x3f800000,0xbf800000,0x40000000,0x7f800000,0xff800000,0x7fc00000,0x7f7fffff] + def instance(**kw): + v=dict(effect=0,duration=20,amplifier=1,ambient=False,visible=True,icon=True,hidden=-1);v.update(kw);return v + def op(name,a=0,b=1,**kw): + v=dict(op=name,a=a,b=b,value=2,factor=0x3f000000,previous=0,duration=10,amplifier=1,ambient=False,visible=True,icon=True,mutate=False,fail=False);v.update(kw);return v + for a in durations: + for b in durations: + for amp in amplifiers: + yield dict(instances=[instance(duration=a),instance(duration=b,amplifier=amp),instance(hidden=0)],ops=[op('update'),op('copy',a=0,b=1),op('eq'),op('same')]) + for duration in durations: + for factor in floats: + yield dict(instances=[instance(duration=duration),instance(hidden=0)],ops=[op('scale',factor=factor),op('eq'),op('ends',value=duration),op('infinite')]) + for flags in range(32): + values=[instance(ambient=bool(flags&1),visible=bool(flags&2),icon=bool(flags&4)),instance(ambient=bool(flags&8),visible=bool(flags&16),icon=False),instance()] + yield dict(instances=values,ops=[op('update'),op('copy',a=0,b=2),op('alias',a=2,b=1),op('update',a=1,b=2),op('set',amplifier=-99,factor=0x7fc00000),op('copy'),op('eq'),op('copy-blend',a=1,b=0),op('eq')]) + rng=random.Random(0x535441545553) + for _ in range(1600): + values=[instance(effect=rng.randrange(3),duration=rng.choice(durations),amplifier=rng.choice(amplifiers),ambient=bool(rng.randrange(2)),visible=bool(rng.randrange(2)),icon=bool(rng.randrange(2)),hidden=rng.randrange(-1,i)) for i in range(6)] + ops=[op(rng.choice(['update','update','copy','alias','scale','ends','infinite','eq','same','set','map','copy-blend']),a=rng.randrange(6),b=rng.randrange(6),value=rng.choice(durations),factor=rng.choice(floats),previous=rng.choice(floats),duration=rng.choice(durations),amplifier=rng.choice(amplifiers),ambient=bool(rng.randrange(2)),visible=bool(rng.randrange(2)),icon=bool(rng.randrange(2)),mutate=bool(rng.randrange(2)),fail=bool(rng.randrange(2))) for _ in range(28)] + yield dict(instances=values,ops=ops) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-status-effect-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStatusEffectOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/status_effect_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaStatusEffectOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','status_effect_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('status_effect_fixture.exe' if os.name=='nt' else 'status_effect_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} status_effect output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual MobEffectInstance constructors, copy, update, duration mapping/scaling, equality and blend copying. Compares shared hidden-chain topology, aliases, raw and constructor-clamped amplifiers, infinite and overflow durations, copied scalar fields, reset blend state, and duration mapper mutations/failures. Mismatched-holder diagnostic logs are outside the comparison. Server/client ticking, effect behavior, registries and entity integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped status_effect parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_status_tick_parity.py b/tools/test_status_tick_parity.py new file mode 100644 index 000000000..3e9d7e36e --- /dev/null +++ b/tools/test_status_tick_parity.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +"""Compare native status-effect ticking, hidden restoration and blending.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + durations=[-2147483648,-2,-1,0,1,2,3,20,2147483647] + floats=[0,0x80000000,1,0x3f000000,0x3f800000,0xbf800000,0x40000000,0x7f800000,0xff800000,0x7fc00000] + def instance(**kw): + v=dict(effect=0,duration=20,amplifier=1,ambient=False,visible=True,icon=True,hidden=-1,factor=0x3f000000,previous=0);v.update(kw);return v + def config(**kw): + v=dict(instances=[instance(duration=8),instance(duration=1,hidden=0),instance(duration=-1,hidden=1)],tick=99,should=True,apply=True,advance=2,blend_in=4,blend_out=8);v.update(kw);return v + def op(name,a=1,b=0,**kw): + v=dict(op=name,a=a,b=b,level=0,partial=0x3f000000,removed=False);v.update(kw);return v + def row(**kw): + v=dict(initial=config(),after=config(instances=[instance(duration=-1,amplifier=999),instance(duration=1,amplifier=-9),instance(duration=0)],tick=2147483647,should=False,apply=False,advance=0,blend_in=0,blend_out=-2),fail=-1,mutate=-1,ops=[op('server'),op('client'),op('factor')]);v.update(kw);return v + for mode in ['server','client','skip']: + for fail in range(-1,5): + for mutate in range(-1,5):yield row(fail=fail,mutate=mutate,ops=[op(mode),op('factor')]) + for duration in durations: + for hidden_duration in durations: + for should in [False,True]: + for apply in [False,True]:yield row(initial=config(instances=[instance(duration=hidden_duration),instance(duration=duration,hidden=0),instance(duration=3,hidden=1)],should=should,apply=apply),ops=[op('server'),op('server'),op('client'),op('client'),op('factor')]) + for value in floats: + for blend_ticks in [-2147483648,-2,-1,0,1,2,20,2147483647]: + for duration in [-1,0,1,20]:yield row(initial=config(instances=[instance(factor=value),instance(duration=duration,factor=value),instance(factor=value)],blend_in=blend_ticks,blend_out=blend_ticks),ops=[op('client'),op('factor',partial=value),op('factor',removed=True),op('skip'),op('factor',partial=value)]) + rng=random.Random(0x4546465449434b) + def random_config():return config(instances=[instance(effect=rng.randrange(3),duration=rng.choice(durations),amplifier=rng.choice([-2147483648,-1,0,1,255,256,2147483647]),ambient=bool(rng.randrange(2)),visible=bool(rng.randrange(2)),icon=bool(rng.randrange(2)),hidden=rng.randrange(-1,i),factor=rng.choice(floats),previous=rng.choice(floats)) for i in range(3)],tick=rng.choice(durations),should=bool(rng.randrange(2)),apply=bool(rng.randrange(2)),advance=rng.choice(durations),blend_in=rng.choice(durations),blend_out=rng.choice(durations)) + for _ in range(1800):yield row(initial=random_config(),after=random_config(),fail=rng.randrange(-1,20),mutate=rng.randrange(-1,20),ops=[op(rng.choice(['server','client','skip','factor','update','copy','alias']),a=rng.randrange(3),b=rng.randrange(3),level=rng.randrange(2),partial=rng.choice(floats),removed=bool(rng.randrange(2))) for _ in range(16)]) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-status-tick-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStatusTickOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/status_tick_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaStatusTickOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','status_tick_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('status_tick_fixture.exe' if os.name=='nt' else 'status_tick_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} status_tick output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual MobEffectInstance server/client ticks, skipBlending and getBlendFactor with shared instance/hidden-chain storage. Controlled MobEffect scheduling/application/blend-duration callbacks compare duration countdown, infinite actor clocks, hidden restoration and notification, live-state rereads, float interpolation, removed actors and callback mutation/failure prefixes. Concrete registered effect behaviors, entity effect maps, UI rendering and full gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped status_tick parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_stored_consume_parity.py b/tools/test_stored_consume_parity.py new file mode 100644 index 000000000..c597ab3af --- /dev/null +++ b/tools/test_stored_consume_parity.py @@ -0,0 +1,87 @@ +#!/usr/bin/env python3 +"""Compare concrete consume effects composed with inherited entity status storage.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng=random.Random(0x53544f524544) + durations=[-2147483648,-2,-1,0,1,20,200,2147483647] + amps=[-1,0,1,2,255,256,2147483647] + floats=[0,0x80000000,0x3f000000,0x3f800000,0xbf800000,0x7f800000,0xff800000,0x7fc00000] + def state(**kw): + v=dict(key=0,duration=20,amplifier=1,ambient=False,visible=True,icon=True,hidden=-1,factor=0x3f000000,previous=0);v.update(kw);return v + def config(**kw): + v=dict(states=[state(),state(duration=200,amplifier=0),state(key=1,hidden=0)],allow=True,level=0,client=False,removed=False,random=0,reseed=False,seeds=[9,-13],position=[1,2,3],category=0);v.update(kw);return v + def op(name,a=0,b=0,**kw): + v=dict(op=name,a=a,b=b,source=-1,partial=0x3f000000,list=[0,1,2,0],probability=0x3f800000,sound=0,level=0);v.update(kw);return v + def row(**kw): + v=dict(xor=False,seeds=[1,-3],hashes=[0,1,2],initial=config(),after=config(states=[state(duration=1,amplifier=9),state(duration=-1,amplifier=2),state(duration=0,amplifier=0)],allow=True,level=1,client=True,removed=True,random=1,reseed=True,position=[-4,5,-6],category=4),setup=[],ops=[op('apply-status'),op('remove-status'),op('clear-status')],fail=-1,mutate=-1,mutations=[op('put',0,2)]);v.update(kw);return v + for xor in [False,True]: + for name in ['apply-status','remove-status','clear-status','sound']: + for setup in [[],[op('put',0,0)],[op('put',0,1),op('put',1,2)]]: + for fail in range(-1,9): + for mutate in range(-1,9): + yield row(xor=xor,setup=setup,ops=[op(name),op('get'),op('has')],fail=fail,mutate=mutate) + for probability in floats+[0x3eaaaaab,0x3f7fffff,1,0xffffffff]: + for ids in [[],[0],[0,0],[0,1,2],[2,0,1,2,0]]: + for allow in [False,True]: + yield row(xor=xor,initial=config(allow=allow),ops=[op('apply-status',list=ids,probability=probability),op('apply-status',list=ids,probability=probability),op('remove-status',list=list(reversed(ids))),op('clear-status')]) + for count in [1,2,3,7,8,9,11,13,24,25,48,49,64]: + for collision in [False,True]: + states=[state(key=i,duration=200,amplifier=i%3) for i in range(count)] + yield row(xor=xor,hashes=[0 if collision else i*31 for i in range(count)],initial=config(states=states),after=config(states=states),setup=[],ops=[op('apply-status',list=list(reversed(range(count)))),op('remove-status',list=list(range(0,count,3))),op('clear-status')],mutations=[]) + for _ in range(600): + count=rng.choice([3,5,8,16]);hashes=[rng.choice([0,0,64,i*31]) for i in range(count)] + def states():return [state(key=rng.randrange(count),duration=rng.choice(durations),amplifier=rng.choice(amps),ambient=bool(rng.randrange(2)),visible=bool(rng.randrange(2)),icon=bool(rng.randrange(2)),hidden=rng.randrange(-1,i),factor=rng.choice(floats),previous=rng.choice(floats)) for i in range(count)] + def cfg():return config(states=states(),allow=bool(rng.randrange(2)),level=rng.randrange(2),client=bool(rng.randrange(2)),removed=bool(rng.randrange(2)),random=rng.randrange(2),reseed=bool(rng.randrange(2)),seeds=[rng.randrange(-2**63,2**63) for _ in range(2)],position=[rng.randrange(-2**31,2**31) for _ in range(3)],category=rng.randrange(8)) + yield row(xor=bool(rng.randrange(2)),seeds=[rng.randrange(-2**63,2**63) for _ in range(2)],hashes=hashes,initial=cfg(),after=cfg(),setup=[op('put',rng.randrange(count),rng.randrange(count)) for _ in range(count)],ops=[op(rng.choice(['apply-status','apply-status','remove-status','clear-status','sound','add','force','remove','remove-raw','all','has','get','blend','put','drop','copy','alias']),rng.randrange(count),rng.randrange(count),source=rng.randrange(-1,2),partial=rng.choice(floats),list=[rng.randrange(count) for _ in range(rng.randrange(7))],probability=rng.choice(floats),level=rng.randrange(2),sound=rng.randrange(2)) for _ in range(20)],fail=rng.randrange(-1,30),mutate=rng.randrange(-1,30),mutations=[op(rng.choice(['put','drop','clear','copy','alias']),rng.randrange(count),rng.randrange(count)) for _ in range(3)]) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-stored-consume-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredConsumeOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/stored_consume_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaStoredConsumeOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','stored_consume_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('stored_consume_fixture.exe' if os.name=='nt' else 'stored_consume_fixture') + references=[] + for side,jar in jars.items(): + java(side,side,build) + enriched=build/f'inputs-{side}.txt';enriched_hash=base.source_hashes([enriched]) + run([binary,build,side],'rust-'+side) + reference=build/f'{side}.txt';rust_output=build/f'rust-{side}.txt';matched=base.compare(reference,rust_output) + base.ensure_sources_unchanged([enriched],enriched_hash) + tested_fixtures.update(enriched_hash);fixture_paths.append(enriched) + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'rust_output_sha256':lab.digest(rust_output,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} stored consume output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'references':references,'scope':'Concrete apply/remove/clear/sound consume effects composed with inherited LivingEntity effect storage, actual status instances and JDK maps. Both RNG kinds, probability edges, ordinary instance copies, hidden updates, duplicate effects, source identity, map iteration/copy order, callback mutation and failure prefixes are compared. Native holder hashes and identity hashes are captured per reference run. Eligibility, registered effect bodies, attribute/packet notifications and sound delivery remain controlled. Full consumable/player lifecycle and gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped stored consume parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_stored_effect_attributes_parity.py b/tools/test_stored_effect_attributes_parity.py new file mode 100644 index 000000000..89a80f9a6 --- /dev/null +++ b/tools/test_stored_effect_attributes_parity.py @@ -0,0 +1,113 @@ +#!/usr/bin/env python3 +"""Compare actual attribute map/supplier allocation, effect modifiers and live dirty queues.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng = random.Random(0x53544f5241545452) + def bits(v): return struct.pack('>d', float(v)).hex() + values = [-float('inf'), -1e30, -1, -0., 0., .1, 1, 2, 20, 1e16, float('inf'), float('nan')] + def op(kind, **kw): + r = dict(op=kind, key=0, instance=0, template=0, target=0, amplifier=0, flag=False, value=bits(0), fail=-1, mutate=-1, mutations=[]) + r.update(kw); return r + def hashes(mode, n): + def unmix(x): + h = ((x ^ (x >> 16)) * pow(0x9e3779b9, -1, 2**32)) & 0xffffffff + return h if h < 0x80000000 else h - 2**32 + if mode == 0: return [0] * n + if mode == 1: return [unmix(31)] * n + if mode == 2: return [unmix(127 + i % 4) for i in range(n)] + if mode == 3: return list(range(n)) + return [rng.randrange(-2**31, 2**31) for _ in range(n)] + def fixture(n, mode, ops, null=False): + templates = [dict(id='horizon:m'+str(i), amount=bits(values[i % len(values)]), operation=i % 3) for i in range(n)] + definitions = [op('define', key=i, template=i) for i in range(n)] + if null: definitions.append(op('define', key=-1)) + return dict(hashes=hashes(mode,n), defaults=[bits(values[(i+6) % len(values)]) for i in range(n)], + bases=[None if i % 5 == 4 else bits(values[(i+8) % len(values)]) for i in range(n)], + syncable=[i % 2 == 0 for i in range(n)], templates=templates, definitions=definitions, + ops=[op('get')] + ops) + for mode in range(5): + for n in [1, 2, 7, 24, 25, 49, 97]: + for null in [False, True]: + ops = [op('get',key=i) for i in range(n)] + [op('get',key=i) for i in range(n)] + ops += [op('add'),op('value'),op('queue-clear'),op('queue-clear',target=1),op('add',amplifier=2),op('value'),op('remove'),op('remove')] + ops += [op('clear'),op('get',key=0),op('modified',instance=0),op('put',key=-1,instance=0),op('get',key=-1),op('add',amplifier=-1)] + yield fixture(n,mode,ops,null) + actions = [[op('put',instance=0)], [op('put',key=-1,instance=0)], [op('put',instance=-1)], + [op('clear')], [op('queue-clear')], [op('queue-clear',target=1)], + [op('queue-add',instance=-1)], [op('queue-add',target=1,instance=-1)], + [op('queue-drop',instance=0)], [op('syncable',flag=False)], [op('syncable',flag=True)], + [op('default',value=bits(float('nan')))], [op('default',value=bits(-0.))]] + for n in [1,7,25]: + for mode in [0,1,4]: + for mutations in actions + [[op('put',key=i,instance=0) for i in range(n)]]: + for at in [0,1,2,3]: + yield fixture(n,mode,[op('drop'),op('get',mutate=at,mutations=mutations),op('lookup'),op('get'),op('add'),op('remove')]) + for fail in range(8): + for kind in ['get','add','remove','modified']: + for sync in [False,True]: + yield fixture(7,1,[op('syncable',flag=sync),op('drop'),op(kind,fail=fail),op('lookup'),op('get'),op('value'),op('add'),op('remove')]) + yield fixture(1,0,[op('modified',instance=-1),op('queue-clear'),op('put',instance=-1),op('lookup'),op('get'),op('get',key=-1)]) + for _ in range(200): + n=rng.choice([1,7,24,25,49]) + def raw(): + return op(rng.choice(['put','drop','clear','queue-add','queue-drop','queue-clear','syncable','default']), + key=rng.randrange(n),instance=rng.choice([-1,0]),target=rng.randrange(2),flag=bool(rng.randrange(2)),value=bits(rng.choice(values))) + ops=[] + for __ in range(35): + if rng.randrange(4)==0:ops.append(raw());continue + ops.append(op(rng.choice(['get','get','add','remove','lookup','modified','value']),key=rng.randrange(-1,n), + amplifier=rng.choice([-2**31,-1,0,1,255,2**31-1]),instance=0, + fail=rng.choice([-1,-1,-1,0,1,2]),mutate=rng.choice([-1,-1,0,1,2,3]), + mutations=[raw() for ___ in range(rng.randrange(4))])) + yield fixture(n,rng.randrange(5),ops,bool(rng.randrange(2))) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-stored-effect-attributes-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredEffectAttributesOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/stored_effect_attributes_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaStoredEffectAttributesOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','stored_effect_attributes_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('stored_effect_attributes_fixture.exe' if os.name=='nt' else 'stored_effect_attributes_fixture') + references=[] + for side,jar in jars.items(): + java(side,side,build) + enriched=build/f'inputs-{side}.txt';fixture_paths.append(enriched);tested_fixtures.update(base.source_hashes([enriched])) + run([binary,build,side],'rust-'+side) + reference=build/f'{side}.txt';candidate=build/f'rust-{side}.txt';matched=base.compare(reference,candidate) + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched,'rust_output_sha256':lab.digest(candidate,'sha256')}) + print(f'{side}: {matched:,} stored effect attribute output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'fastutil_sha256':{str(p.relative_to(lab.ROOT)):lab.digest(p,'sha256') for p in libraries if 'fastutil' in str(p)},'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'references':references,'scope':'Actual MobEffect modifier application bound to actual AttributeMap.getInstance, AttributeSupplier.createInstance and AttributeInstance replacement/modifier storage. Compares lazy creation, failed creation retained in update queues before map insertion, null cached entries, map key aliasing, native identity-hash update/sync set order, captured instance ownership after map clearing, dirty callback mutation/failure and value/cache/permanent state. Native instance identity hashes are exported per JVM for Rust replay. Supplier prototypes use real basic attributes and base values; isClientSyncable/getDefaultValue are controlled callbacks. Registered definitions, entity notification binding, bulk map methods and full gameplay/platform builds remain pending.'} + lab.write_json(report_path,report);print(f'Scoped stored effect attribute parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_stored_effect_notifications_parity.py b/tools/test_stored_effect_notifications_parity.py new file mode 100644 index 000000000..69678b394 --- /dev/null +++ b/tools/test_stored_effect_notifications_parity.py @@ -0,0 +1,92 @@ +#!/usr/bin/env python3 +"""Compare entity effect notifications with real stored attributes and native pending refresh.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +try: + from . import lab, test_rust_parity as base, test_stored_effect_attributes_parity as stored_base +except ImportError: + import lab + import test_rust_parity as base + import test_stored_effect_attributes_parity as stored_base + + +def corpus(): + rows=list(stored_base.corpus()) + yield from rows + def op(kind, **kw): + r=dict(op=kind,key=0,instance=0,template=0,target=0,amplifier=0,flag=False,value='0000000000000000', + fail=-1,mutate=-1,mutations=[],client=False,reapply=True,count=1) + r.update(kw);return r + selected=[rows[i] for i in [0,4,8,12,18,22,36,50]] + for row in selected: + for client in [False,True]: + for reapply in [False,True]: + for count in [0,1,3]: + yield dict(row,ops=[op('get'),op('dirty'),op('notify-add',client=client),op('value'), + op('notify-update',amplifier=4,reapply=reapply,client=client),op('value'), + op('notify-remove',count=count,client=client),op('refresh'),op('value')]) + actions=[[op('queue-clear')],[op('queue-add',instance=-1)],[op('queue-drop',instance=0)], + [op('queue-add',target=1,instance=-1)],[op('clear')],[op('put',instance=0)], + [op('drop')],[op('syncable',flag=False)],[op('syncable',flag=True)]] + for row in selected[:5]: + for kind in ['notify-add','notify-update','notify-remove','refresh']: + for fail in range(12): + yield dict(row,ops=[op('get'),op('notify-add'),op('dirty'),op(kind,fail=fail),op('value'),op('refresh'),op('notify-remove')]) + for mutations in actions: + for at in [0,1,2,3,5]: + yield dict(row,ops=[op('get'),op('notify-add'),op('dirty'),op(kind,mutate=at,mutations=mutations),op('value'),op('refresh'),op('notify-remove')]) + rng=random.Random(0x53544f524e4f54) + for _ in range(150): + row=rng.choice(selected) + ops=[op('get')] + for __ in range(20): + kind=rng.choice(['notify-add','notify-update','notify-remove','refresh','dirty','value','queue-clear']) + ops.append(op(kind,client=rng.randrange(7)==0,reapply=bool(rng.randrange(2)),count=rng.randrange(4), + amplifier=rng.choice([-2**31,-1,0,1,255,256,2**31-1]),flag=bool(rng.randrange(2)), + fail=rng.choice([-1,-1,-1,0,1,3,5]),mutate=rng.choice([-1,-1,0,1,2,3,5]),mutations=rng.choice(actions))) + yield dict(row,ops=ops) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-stored-effect-notifications-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredEffectNotificationsOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/stored_effect_notifications_fixture.rs'] + helper=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStoredEffectAttributesOracle.java' + sources.extend([helper,lab.ROOT/'crates/horizon-world/examples/stored_effect_attributes_fixture.rs',lab.ROOT/'tools/test_stored_effect_attributes_parity.py']) + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,helper],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaStoredEffectNotificationsOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','stored_effect_notifications_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('stored_effect_notifications_fixture.exe' if os.name=='nt' else 'stored_effect_notifications_fixture') + references=[] + for side,jar in jars.items(): + java(side,side,build) + enriched=build/f'inputs-{side}.txt';fixture_paths.append(enriched);tested_fixtures.update(base.source_hashes([enriched])) + run([binary,build,side],'rust-'+side) + reference=build/f'{side}.txt';candidate=build/f'rust-{side}.txt';matched=base.compare(reference,candidate) + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched,'rust_output_sha256':lab.digest(candidate,'sha256')}) + print(f'{side}: {matched:,} stored effect notification output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'fastutil_sha256':{str(p.relative_to(lab.ROOT)):lab.digest(p,'sha256') for p in libraries if 'fastutil' in str(p)},'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'references':references,'scope':'Inherited LivingEntity onEffectAdded/onEffectUpdated/onEffectsRemoved and private refreshDirtyAttributes, with actual MobEffect modifier bodies, AttributeMap.getInstance, AttributeSupplier.createInstance, AttributeInstance storage and native pending update/sync sets. Includes complete stored-attribute corpus plus client guards, effect dirty state, reapply/empty removal, refresh failure prefixes and callback map/queue mutation. Actual JVM identity hashes replayed separately in Rust. Virtual onAttributeUpdated consequence, basic attribute default/syncability methods and level client flag are controlled; passenger lists are empty (packet paths have separate gates). Registered definitions, combined health/dimension consequences, full entity lifecycle/gameplay and platform builds remain pending.'} + lab.write_json(report_path,report);print(f'Scoped stored effect notification parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_structure_density_parity.py b/tools/test_structure_density_parity.py new file mode 100644 index 000000000..75094c3e6 --- /dev/null +++ b/tools/test_structure_density_parity.py @@ -0,0 +1,91 @@ +#!/usr/bin/env python3 +"""Compare structure terrain-adaptation samplers with pinned vanilla bytecode.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng=random.Random(0x484f52495a4f4e4245415244) + kinds=["NONE","BURY","BEARD_THIN","BEARD_BOX","ENCAPSULATE"] + volumes=[[29,29,29,-14,-14,-14,1,1,1,3],[8,9,7,-17,-20,-19,4,5,6,7], + [3,2,4,100,200,300,1,1,1,5],[1,1,1,0,0,0,1,1,1,1]] + points=[[0,0,0],[-12,-12,-12],[11,11,11],[12,12,12],[-13,-13,-13],[-2**31,0,2**31-1],[2**31-1,-2**31,0]] + def fixture(pieces,junctions,affected,pts=None,vol=None): + return {"pieces":pieces,"junctions":junctions,"affected":affected,"points":points if pts is None else pts,"volumes":volumes if vol is None else vol} + # The full junction neighborhood spans every position in the 24-cubed kernel. + yield fixture([],[[0,0,0]],[-100,-100,-100,100,100,100]) + for affected in [None,[-1,-1,-1,1,1,1],[0,0,0,0,0,0]]: + yield fixture([],[],affected) + yield fixture([[[0,0,0,7,8,9],"BURY",0]],[[0,0,0]],affected) + for kind in kinds: + for delta in [-2**31,-33,-12,-1,0,1,12,33,2**31-1]: + yield fixture([[[0,0,0,7,8,9],kind,delta]],[],[-100,-100,-100,100,100,100]) + # Bulk floor clipping intentionally differs from scalar containment. + for affected in [[1,1,1,9,9,9],[-9,-9,-9,-1,-1,-1],[3,5,7,3,5,7]]: + yield fixture([[[0,0,0,7,8,9],"ENCAPSULATE",0]],[[0,0,0]],affected,vol=[[9,9,9,-16,-16,-16,4,4,4,9]]) + for scenario in range(96): + pieces=[];junctions=[] + for i in range(scenario%17): + low=[rng.randrange(-32,33) for _ in range(3)];high=[v+rng.randrange(17) for v in low] + pieces.append([low+high,rng.choice(kinds),rng.randrange(-32,33)]) + for i in range(scenario%11):junctions.append([rng.randrange(-32,33) for _ in range(3)]) + affected=None if scenario%13==0 else [-48,-48,-48,48,48,48] + pts=[[rng.randrange(-60,61) for _ in range(3)] for _ in range(256)] + vol=[[rng.randrange(1,13),rng.randrange(1,15),rng.randrange(1,13),rng.randrange(-60,0),rng.randrange(-60,0),rng.randrange(-60,0),rng.randrange(1,9),rng.randrange(1,9),rng.randrange(1,9),rng.randrange(8)]] + f=fixture(pieces,junctions,affected,pts,vol);yield f + if scenario%8==0:yield fixture(list(reversed(pieces)),list(reversed(junctions)),affected,pts,vol) + # Wrapped relative arithmetic, volume intersections and extreme ground deltas. + for coordinate in [-2**31,-2**31+32,2**31-33,2**31-1]: + low=[coordinate]*3;high=[min(2**31-1,coordinate+8)]*3 + for kind in kinds: + yield fixture([[low+high,kind,2**31-1]],[[coordinate,coordinate,coordinate]],[-2**31]*3+[2**31-1]*3, + [[coordinate]*3,[0,0,0],[-1,-1,-1]],[[3,3,3,coordinate,coordinate,coordinate,16,16,16,2]]) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-structure-density-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaStructureDensityOracle.java" + sources=[oracle,Path(__file__),lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/structure_density_fixture.rs"] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus());inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + tested_fixtures=base.source_hashes([inputs]);classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") + run(["cargo","build","--release","-p","horizon-world","--example","structure_density_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("structure_density_fixture.exe" if os.name=="nt" else "structure_density_fixture") + run([binary,inputs,build/"rust.txt"],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaStructureDensityOracle",inputs,reference],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} structure-density output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged([inputs],tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"scalar_queries":sum(len(f["points"]) for f in fixtures),"volumes":sum(len(f["volumes"]) for f in fixtures), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual vanilla Beardifier constructor and scalar/bulk samplers from supplied ordered rigid pieces, jigsaw junctions and normalized affected bounds. Five terrain-adjustment modes, the full 24-cubed junction kernel neighborhood, ground-level offsets and extreme wrapping arithmetic, ordered accumulation, nullable/empty affected bounds, clipped strided volumes including scalar/bulk floor-clipping differences and oversized output tails. Floating outputs compared as canonical-NaN raw bits. Live structure discovery/filtering, invalid bounding-box repair, structure placement and terrain integration remain pending. Local Math.pow-derived kernel results do not establish cross-platform math parity."} + lab.write_json(report_path,report);print(f"Scoped structure-density parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_suffocation_parity.py b/tools/test_suffocation_parity.py new file mode 100644 index 000000000..bd118ee34 --- /dev/null +++ b/tools/test_suffocation_parity.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +"""Compare registry collision flags and suffocation predicates with pinned vanilla.""" +import collections +import json +import os +from pathlib import Path +import platform +import subprocess +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(facts): + positions = [[0, 0, 0], [17, -64, -33], + [2147483647, -2147483648, -2147483648], + [-2147483648, 2147483647, 2147483647]] + # Keep each tag binding contiguous to avoid testing registry reload costs. + for tags in range(3): + for state, value in enumerate(facts['states']): + for position in positions: + yield dict(state=state, position=position, entity='none', fail=-1, tags=tags) + # Predicate short circuits must suppress failure-producing providers. + yield dict(state=state, position=positions[1], entity='none', fail=0, tags=tags) + if value['id'].endswith('shulker_box'): + for position in positions: + for entity in ['none', 'other', 'closed', 'opening', 'opened', 'closing']: + for fail in [-1, 0, 1]: + yield dict(state=state, position=position, entity=entity, fail=fail, tags=tags) + + +def main(): + lock, jars, libraries = base.verify_artifacts() + build = lab.LOCAL/'rust-suffocation-parity';build.mkdir(exist_ok=True) + report_path = build/'report.json';report_path.unlink(missing_ok=True) + oracle = lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSuffocationOracle.java' + helpers = [oracle.with_name(name+'.java') for name in + ['VanillaHeightmapOracle', 'VanillaCollisionOracle', 'VanillaBlockStateCodecOracle']] + sources = [oracle, *helpers, Path(__file__), lab.ROOT/'tools/test_rust_parity.py', + lab.ROOT/'tools/test_worldgen_parity.py', lab.ROOT/'tools/lab.py', + lab.ROOT/'Cargo.toml', lab.ROOT/'Cargo.lock', + lab.ROOT/'crates/horizon-world/examples/suffocation_fixture.rs'] + for crate in ['horizon-core', 'horizon-world']: + sources += [lab.ROOT/'crates'/crate/'Cargo.toml', + *sorted((lab.ROOT/'crates'/crate/'src').rglob('*.rs'))] + tested = base.source_hashes(sources) + tags = worldgen.tag_resources(jars['server']) + if tags != worldgen.tag_resources(jars['client']):raise AssertionError('Client/server block tags differ') + lab.write_json(build/'tags.json', tags) + classes = build/'classes';classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, libraries)) + def run(command, name): + with (build/(name+'.log')).open('w') as log: + subprocess.run(list(map(str, command)), cwd=lab.ROOT, check=True, timeout=3600, + stdout=log, stderr=subprocess.STDOUT) + run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-cp', + str(jars['server'])+os.pathsep+dependencies, '-d', classes, oracle, *helpers], 'compile-java') + def java(side, mode): + run(['java', '-Xmx768M', '-cp', os.pathsep.join([str(classes), str(jars[side]), dependencies]), + 'dev.horizonlab.parity.VanillaSuffocationOracle', mode, build], side+'-'+mode) + java('server', 'export') + facts = json.loads((build/'facts.json').read_text()) + if len(facts['states']) != 35723:raise AssertionError('Incomplete pinned registry') + definitions = json.loads((build/'definitions.json').read_text()) + count = 0 + with (build/'inputs.txt').open('w') as output: + for fixture in corpus(facts): + output.write(json.dumps(fixture, separators=(',', ':'))+'\n');count += 1 + fixture_paths = [build/name for name in ['inputs.txt', 'facts.json', 'definitions.json', + 'block-registry.nbt', 'cached-collision.nbt', 'tags.json']] + fixtures = base.source_hashes(fixture_paths) + run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'suffocation_fixture'], 'compile-rust') + metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) + binary = Path(metadata['target_directory'])/'release/examples'/('suffocation_fixture.exe' if os.name=='nt' else 'suffocation_fixture') + run([binary, build], 'rust');references = [] + for side, jar in jars.items(): + java(side, side) + matched = base.compare(build/(side+'.txt'), build/'rust.txt') + references.append({'side':side, 'jar_sha256':lab.digest(jar, 'sha256'), + 'output_sha256':lab.digest(build/(side+'.txt'), 'sha256'), 'matched_output_lines':matched}) + print(f'{side}: {matched:,} suffocation and collision-metadata lines match', flush=True) + base.ensure_sources_unchanged(sources, tested);base.ensure_sources_unchanged(fixture_paths, fixtures) + report = {'schema':1, 'minecraft':lock['minecraft']['version'], 'manifest_sha1':lock['minecraft']['manifest_sha1'], + 'platform':platform.platform(), 'java':subprocess.check_output(['java', '--version'], text=True).splitlines()[0], + 'rustc':subprocess.check_output(['rustc', '--version'], text=True).strip(), + 'registry_states':len(facts['states']), 'block_definitions':len(definitions), + 'definition_counts':dict(collections.Counter(definitions.values())), + 'tag_variants':3, 'positions':4, 'fixtures':count, 'sources_sha256':tested, 'fixtures_sha256':fixtures, + 'rust_output_sha256':lab.digest(build/'rust.txt', 'sha256'), 'references':references, + 'scope':'Actual BlockState.isSuffocating, hasLargeCollisionShape and moving-piston identity for every registered state, natural/empty/all-block causes_suffocation tags and four positions including integer extremes. Native predicate identity and constant overrides are independently classified. Rust computes cached fullness, dynamic collision fullness, piston extension and lazy shulker state queries. Every shulker state covers absent/wrong block entities, all animation states and injected query failures; all other states test provider short circuits. This does not establish live chunk/provider integration, entity movement, damage or full gameplay parity.'} + lab.write_json(report_path, report);print(f'Scoped suffocation parity passed: {report_path}', flush=True) + + +if __name__ == '__main__':main() diff --git a/tools/test_swimming_parity.py b/tools/test_swimming_parity.py new file mode 100644 index 000000000..49366c307 --- /dev/null +++ b/tools/test_swimming_parity.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 +"""Compare Entity/Player swimming state transitions and water predicates with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def row(mask=0,**kw): + f={k:bool(mask&(1<f',1.62).hex(),fail=-1,mutate_at=-1);f.update(kw);return f + for player in [False,True]: + for mask in range(64): + for mode in ['update','under','shallow']: + for fluid in range(5): + for tag in [0,6,31]:yield row(mask,player=player,mode=mode,fluid=fluid,water_mask=tag) + for mode in ['update','under','shallow']: + for fail in range(-1,8): + for mutate_at in range(-1,8):yield row(mask,player=player,mode=mode,fail=fail,mutate_at=mutate_at) + for height in [-float('inf'),-1,-0.,0.,.39999998,.4,.40000004,1,float('inf'),float('nan')]:yield row(mode='threshold',eye_height=struct.pack('>f',height).hex()) + rng=random.Random(0x5357494d) + for _ in range(3000):yield row(mode='threshold',eye_height=f'{rng.getrandbits(32):08x}') + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-swimming-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSwimmingOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/swimming_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaSwimmingOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','swimming_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('swimming_fixture.exe' if os.name=='nt' else 'swimming_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} swimming output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Entity and Player updateSwimming, isUnderWater, isInShallowWater and fluid jump threshold. Compares previous-eye/body flags, player direct flying ability guard, sprint/passenger branches, direct block-position capture, native fluid tag membership, callbacks mutating fields and injected failures. Entity data and cell fluids are controlled; full synchronized entity storage, boat interaction boxes and playable gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped swimming parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_synced_bytes_parity.py b/tools/test_synced_bytes_parity.py new file mode 100644 index 000000000..496e694f4 --- /dev/null +++ b/tools/test_synced_bytes_parity.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +"""Compare multiple synchronized byte fields, assignment and reentrant callbacks with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return f'{v&255:02x}' + def value(id=8,v=0):return dict(id=id,value=bits(v)) + def op(mode='set',id=8,v=0,**kw): + o=dict(mode=mode,id=id,value=bits(v),force=False,values=[],hook='none',other=17,other_value=bits(7),other_force=False,fail=-1,mask=1,flag=True);o.update(kw);return o + def row(initial,ops):return dict(initial=initial,ops=ops) + for start in range(256): + for mask in [-2147483648,-1,0,1,2,3,4,128,255,256,2147483647]: + for flag in [False,True]: + yield row([value(17),value(8,start)],[op('flag',mask=mask,flag=flag),op('defaults'),op('pack'),op('flag',mask=mask,flag=flag)]) + for mode in ['set','assign','flag']: + for hook in ['none','pack','set','assign','flag']: + for fail in range(-1,6): + for other in [8,17]: + yield row([value(8),value(17)],[op(v=3),op(mode,v=5,values=[value(8,5),value(17,7),value(8,3)],hook=hook,other=other,mask=129,flag=False,fail=fail),op('pack'),op('defaults')]) + rng=random.Random(0x53594e4342595445) + for _ in range(2000): + ids=[8]+rng.sample([i for i in range(64) if i!=8],rng.randrange(0,10));initial=[value(id,rng.randrange(256)) for id in ids];ops=[] + for __ in range(rng.randrange(5,35)): + ops.append(op(rng.choice(['set','set','get','pack','defaults','assign','flag']),rng.choice(ids+[255]),rng.randrange(256),force=bool(rng.randrange(2)),values=[value(rng.choice(ids+[255]),rng.randrange(256)) for ___ in range(rng.randrange(6))],hook=rng.choice(['none','pack','set','assign','flag']),other=rng.choice(ids),other_value=bits(rng.randrange(256)),other_force=bool(rng.randrange(2)),mask=rng.randrange(-2147483648,2147483648),flag=bool(rng.randrange(2)),fail=rng.choice([-1,-1,-1,0,1,2,3]))) + yield row(initial,ops) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-synced-bytes-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSyncedBytesOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/synced_bytes_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaSyncedBytesOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','synced_bytes_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('synced_bytes_fixture.exe' if os.name=='nt' else 'synced_bytes_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} synchronized byte output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual byte SynchedEntityData values and inherited LivingEntity using-item/offhand queries plus protected flag writes. Covers every initial byte, signed masks, ordered dirty/default output, assignment, reentrant flag/data writes, callback packing and failures before dirty marking. Rust shares a typed scalar implementation with existing synchronized floats. Heterogeneous serializer maps, entity schema/network codecs and full item-use/gameplay integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped synchronized byte parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_synced_floats_parity.py b/tools/test_synced_floats_parity.py new file mode 100644 index 000000000..1161de248 --- /dev/null +++ b/tools/test_synced_floats_parity.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 +"""Compare multiple synchronized float fields, assignment and reentrant callbacks with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>f',v).hex() + def value(id=9,v=0):return dict(id=id,value=bits(v)) + def op(mode='set',id=9,v=0,**kw): + o=dict(mode=mode,id=id,value=bits(v),force=False,values=[],hook='none',other=17,other_value=bits(7),other_force=False,fail=-1);o.update(kw);return o + def row(initial,ops):return dict(initial=initial,ops=ops) + values=[-float('inf'),-1e30,-1,-0.,0.,1e-40,.1,1,7,20,1e30,float('inf'),float('nan')] + for start in values: + for v in values: + for hook in ['none','pack','set','assign']: + for force in [False,True]:yield row([value(17),value(9,start)],[op(v=v,force=force,hook=hook),op('defaults'),op('pack'),op(v=v,hook=hook),op('assign',values=[value(17,v),value(9,start),value(9,start)],hook=hook),op('pack'),op('defaults')]) + for mode in ['set','assign']: + for hook in ['none','pack','set','assign']: + for fail in range(-1,9): + for other in [9,17]:yield row([value(9),value(17)],[op(v=3),op(mode,v=5,values=[value(9,5),value(17,7)],hook=hook,other=other,fail=fail),op('pack'),op('defaults')]) + for initial in [[],[value(0)],[value(1),value(254)],[value(i,i) for i in range(8)]]: + yield row(initial,[op('get',255),op('set',255),op('assign',values=[value(v['id'],2) for v in initial]+[value(255)]),op('assign',values=[]),op('pack'),op('defaults')]) + rng=random.Random(0x53594e43464c4f41) + for _ in range(1500): + ids=rng.sample(range(64),rng.randrange(1,12));initial=[value(id,rng.choice(values)) for id in ids];ops=[] + for __ in range(rng.randrange(5,60)): + ops.append(op(rng.choice(['set','set','get','pack','defaults','assign']),rng.choice(ids+[255]),rng.choice(values),force=bool(rng.randrange(2)),values=[value(rng.choice(ids+[255]),rng.choice(values)) for ___ in range(rng.randrange(6))],hook=rng.choice(['none','pack','set','assign']),other=rng.choice(ids),other_value=bits(rng.choice(values)),other_force=bool(rng.randrange(2)),fail=rng.choice([-1,-1,-1,0,1,2,3]))) + yield row(initial,ops) + for nan in ['7fa12345','7fc00000','ffa12345']: + initial=[value(9),value(17)];initial[0]['value']=nan;yield row(initial,[op(v=float('nan')),op('defaults'),op('pack')]) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-synced-floats-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaSyncedFloatsOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/synced_floats_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaSyncedFloatsOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','synced_floats_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('synced_floats_fixture.exe' if os.name=='nt' else 'synced_floats_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} synchronized float output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual SynchedEntityData Float fields: boxed equality, forced updates, callback-before-dirty flags, ordered dirty/default extraction, received assignment including duplicates, partial unknown-ID/observer failures, batch callbacks and reentrant set/assign/pack. Native table gaps are untouched default dummy Float items; tested keys are explicit configured IDs. Other serializers, type-mismatch errors, wire codecs and player absorption integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped synchronized float parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_teleport_consume_parity.py b/tools/test_teleport_consume_parity.py new file mode 100644 index 000000000..add57d0a8 --- /dev/null +++ b/tools/test_teleport_consume_parity.py @@ -0,0 +1,70 @@ +#!/usr/bin/env python3 +"""Compare random teleport consume behavior against both pinned JARs.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + floats=[0,0x80000000,1,0x3f000000,0x3f800000,0x41800000,0xc1800000,0x7f7fffff,0x7f800000,0xff800000,0x7fc00000] + def config(**kw): + v=dict(position=[1.25,64.5,-2.75],min=-64,height=384,riding=True,success_at=0,move=True,fall=12.5,grace=5,impact=True,random=0,reseed=False,seeds=[99,101]);v.update(kw);return v + def row(**kw): + v=dict(initial=config(),after=config(position=[-3.5,71.25,9.5],min=0,height=128,riding=False,success_at=1,fall=7.25,grace=9,random=1,reseed=True),seeds=[0,1],xor=False,fox=False,directional=True,diameter=0x41800000,level=0,fail=-1,mutate=-1);v.update(kw);return v + for xor in [False,True]: + for fox in [False,True]: + for fail in range(-1,19): + for mutate in range(-1,19):yield row(xor=xor,fox=fox,fail=fail,mutate=mutate) + for success_at in [-1,0,1,5,14,15,16]: + for directional in [False,True]: + for riding in [False,True]: + for move in [False,True]:yield row(initial=config(success_at=success_at,riding=riding,move=move),directional=directional) + for diameter in floats: + for y in [-1e300,-0.0,0.0,1.5,1e300]: + for min_y in [-2147483648,-64,0,2147483647]:yield row(initial=config(position=[y,y,y],min=min_y,height=2147483647),diameter=diameter) + rng=random.Random(0x54454c45504f5254) + def random_config():return config(position=[rng.choice([-1e300,-2147483649.5,-0.0,0.0,1.25,2147483649.5,1e300]) for _ in range(3)],min=rng.choice([-2147483648,-64,-1,0,2147483647]),height=rng.choice([-2147483648,-1,0,1,256,384,2147483647]),riding=bool(rng.randrange(2)),success_at=rng.choice([-1,0,1,3,15,16]),move=bool(rng.randrange(2)),fall=rng.choice([-0.0,1.25,100]),grace=rng.randrange(-1,20),impact=bool(rng.randrange(2)),random=rng.randrange(2),reseed=bool(rng.randrange(2)),seeds=[rng.randrange(-2**63,2**63) for _ in range(2)]) + for _ in range(1800):yield row(initial=random_config(),after=random_config(),seeds=[rng.randrange(-2**63,2**63) for _ in range(2)],xor=bool(rng.randrange(2)),fox=bool(rng.randrange(2)),directional=bool(rng.randrange(2)),diameter=rng.choice(floats),level=rng.randrange(2),fail=rng.choice([-1,-1,rng.randrange(32)]),mutate=rng.choice([-1,-1,rng.randrange(32)])) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-teleport-consume-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTeleportConsumeOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/teleport_consume_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaTeleportConsumeOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','teleport_consume_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('teleport_consume_fixture.exe' if os.name=='nt' else 'teleport_consume_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} teleport_consume output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual TeleportRandomlyConsumeEffect with native Legacy/Xoroshiro random streams, ordinary/fox class branches, real fall/impulse reset bodies and BlockUtil offset packing. Compares captured versus live coordinates, repeated min-height reads, logical-height integer overflow, exact candidate bits and next RNG state, 16-attempt exhaustion, dismount/event/sound/directional-particle ordering and callback mutation/failure prefixes. Destination validation/teleport, passenger linkage, world event delivery and full gameplay integration remain controlled or pending.'} + lab.write_json(report_path,report);print(f'Scoped teleport_consume parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_terrain_parity.py b/tools/test_terrain_parity.py new file mode 100644 index 000000000..3bd4dbcc6 --- /dev/null +++ b/tools/test_terrain_parity.py @@ -0,0 +1,121 @@ +#!/usr/bin/env python3 +"""Compare noise-stage terrain filling with pinned vanilla client/server bytecode.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(facts,bundle): + defaults=facts["defaults"] + rng=random.Random(0x484f52495a4f4e46494c4c) + def fixture(minimum,height,cx,cz,seed,legacy,block,fluid,sea,router,aquifers,repeats=1): + return {"min":minimum,"height":height,"noise_min":minimum,"noise_height":height,"cx":cx,"cz":cz,"seed":seed,"legacy":legacy, + "block":block,"fluid":fluid,"sea":sea,"router":router,"aquifers":aquifers,"initial":[],"repeats":repeats} + for setting,text in bundle["settings"].items(): + s=json.loads(text) + for legacy in [False,True]: + for seed,cx,cz in [(0,0,0),(-1,-2,3),(0x123456789abcdef,1875000,-1875000)]: + f=fixture(s["noise"]["min_y"],s["noise"]["height"],cx,cz,seed,legacy,defaults[s["default_block"]],defaults[s["default_fluid"]],s["sea_level"],s["noise_router"],s.get("aquifers"),2 if seed==0 else 1) + for i in range(16):f["initial"].append([i,f["min"]+(i*17)%f["height"],15-i,defaults["minecraft:glass"]]) + yield f + fields=["temperature","vegetation","continents","erosion","depth","ridges","chunk_surface_level","final_density"] + config={"barrier":0,"fluid_level_floodedness":1,"fluid_level_spread":0,"lava":0,"exclusion":0,"surface_level":64} + wet_slab=next(i for i,state in enumerate(facts["states"]) if state[0]=="minecraft:oak_slab" and state[2]) + states=[defaults["minecraft:"+name] for name in ["air","cave_air","void_air","stone","water","lava","oak_leaves"]]+[wet_slab] + for scenario in range(48): + router=dict.fromkeys(fields,0) + router["final_density"]=[0,1,-1,{"type":"gradient","axis":"y","from_coordinate":-64,"to_coordinate":0,"from_value":1,"to_value":-1}][scenario%4] + f=fixture(-64,64,scenario%5-2,scenario//5-4,rng.randrange(-2**63,2**63),bool(scenario%2),states[(scenario//4)%len(states)],states[scenario%len(states)],[-54,-20,0,64][scenario%4],router,config if scenario%3 else None,2) + # Fill only the middle of an extended chunk; prefilled areas must survive. + if scenario%5==0:f.update(min=-80,height=96) + f["initial"]=[[rng.randrange(16),f["min"]+rng.randrange(f["height"]),rng.randrange(16),rng.choice(states)] for _ in range(48)] + yield f + + + # Real structure-density bindings through both aquifer and final-density roots. + for _,text in bundle["settings"].items(): + setting=json.loads(text) + for legacy in [False,True]: + y=max(setting["noise"]["min_y"]+16,min(setting["sea_level"],setting["noise"]["min_y"]+setting["noise"]["height"]-16)) + f=fixture(setting["noise"]["min_y"],setting["noise"]["height"],0,0,123,legacy,defaults[setting["default_block"]],defaults[setting["default_fluid"]],setting["sea_level"],setting["noise_router"],setting.get("aquifers"),2) + f["initial"]=[[1,y,1,defaults["minecraft:glass"]]] + f["structure"]={"pieces":[[[2,y-4,2,10,y+8,10],"BEARD_BOX",2],[[8,y-2,8,15,y+2,15],"BURY",0]],"junctions":[[3,y,4],[11,y+1,13]],"affected":[-32,y-32,-32,48,y+40,48]} + yield f + for kind in ["NONE","BURY","BEARD_THIN","BEARD_BOX","ENCAPSULATE"]: + for enabled in [False,True]: + router=dict.fromkeys(fields,0);router["final_density"]={"type":"cache","input":{"type":"beardifier"}} + aq=dict(config);aq["barrier"]={"type":"beardifier"};aq["surface_level"]={"type":"add","left":-16,"right":{"type":"beardifier"}} + f=fixture(-64,96,-1,1,17,False,defaults["minecraft:stone"],defaults["minecraft:water"],-16,router,aq if enabled else None,2) + f["initial"]=[[0,0,0,defaults["minecraft:glass"]]] + f["structure"]={"pieces":[[[-14,-24,18,-3,-8,28],kind,3]],"junctions":[[-6,-18,23]],"affected":[-40,-48,-8,16,24,56]} + yield f + + +def main(): + parser=argparse.ArgumentParser(description=__doc__) + parser.add_argument("--prepare",action="store_true") + args=parser.parse_args() + build=lab.LOCAL/"rust-terrain-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + tags=worldgen.tag_resources(jars["server"]) + if not tags or tags!=worldgen.tag_resources(jars["client"]):raise ValueError("client/server block tags differ or are empty") + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTerrainOracle.java" + exporter=oracle.with_name("VanillaHeightmapOracle.java") + sources=[oracle,exporter,Path(__file__),lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock", + lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/terrain_fixture.rs"] + tested_sources=base.source_hashes(sources) + classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle,exporter],"compile-java") + def java(side,mode,path): + run(["java","-Xmx1G","-cp",os.pathsep.join([str(classes),str(jars[side]),dependency_path]),"dev.horizonlab.parity."+("VanillaHeightmapOracle" if mode=="export" else "VanillaTerrainOracle"),mode,path],side+"-"+mode) + for side in jars:java(side,"export",build/f"facts-{side}.json") + facts=json.loads((build/"facts-server.json").read_text()) + if facts!=json.loads((build/"facts-client.json").read_text()):raise ValueError("client/server state facts differ") + if len(facts["states"])!=35723:raise ValueError("incomplete pinned state table") + bundle={"tags":tags} + for field,kind in [("noises","noise"),("densities","density_function"),("settings","noise_settings")]: + resources=worldgen.registry_resources(jars["server"],kind) + if not resources or resources!=worldgen.registry_resources(jars["client"],kind):raise ValueError("client/server "+kind+" resources differ") + prefix="data/minecraft/worldgen/"+kind+"/" + bundle[field]={"minecraft:"+name[len(prefix):-5]:text for name,text in resources.items()} + fixtures=list(corpus(facts,bundle));inputs=build/"inputs.txt" + inputs.write_text("".join(json.dumps(value,separators=(",",":"))+"\n" for value in fixtures),encoding="utf-8") + (build/"registries.json").write_text(json.dumps(bundle,separators=(",",":")),encoding="utf-8") + fixture_paths=[inputs,build/"registries.json",build/"facts-client.json",build/"facts-server.json"] + tested_fixtures=base.source_hashes(fixture_paths) + run(["cargo","build","--release","-p","horizon-world","--example","terrain_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("terrain_fixture.exe" if os.name=="nt" else "terrain_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + java(side,side,build) + reference=build/f"{side}.txt";matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} terrain-fill output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "block_states":len(facts["states"]),"block_tag_files":len(tags),"fixtures":len(fixtures),"fill_calls":sum(f["repeats"] for f in fixtures),"noise_aquifer_fixtures":sum(f["aquifers"] is not None for f in fixtures),"structure_density_fixtures":sum("structure" in f for f in fixtures), + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Noise-stage filling only, using actual vanilla NoiseBasedChunkGenerator.doFill and NoiseChunk with empty blending and empty or supplied rigid-piece/junction structure fields. Independently authenticated client/server registry resources and exported block identities/properties/air/fluid facts must agree. Rust compiles the final density and optional aquifer through a shared compiler/context, writes resident block sections, updates ocean-floor/world-surface worldgen heightmaps and records ordered per-section fluid postprocessing offsets. Comparisons cover every raw section state, heightmap word and postprocessing offset after each fill, all bundled routers/aquifers, both seeded random factories, synthetic roots, prefilled chunks, partial vertical volumes, repeated fills and structure-density bindings in final-density/aquifer graphs. Block behavior facts remain imported; actual biome properties and material rules are not evaluated. Surface/material/carver/feature/structure stages, nonempty blending and live structure discovery, complete generated worlds and gameplay/rendering remain pending."} + lab.write_json(report_path,report);print(f"Scoped terrain-fill parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_terrain_position.py b/tools/test_terrain_position.py index e067f577f..af4c8b642 100644 --- a/tools/test_terrain_position.py +++ b/tools/test_terrain_position.py @@ -29,7 +29,7 @@ def main(): args = parser.parse_args() root = build_pack.ROOT fixture = build_mod.build_integration_fixture("terrain-position", "dev.horizonlab.dispatch.PositionIntegration") - mod = root / "dist" / f"horizon-lab-{build_pack.read_lock()['pack_version']}.jar" + mod = root / "dist" / f"horizon-{build_pack.read_lock()['pack_version']}.jar" original_sha256 = hashlib.sha256(mod.read_bytes()).hexdigest() results = [] for enabled in [False, True]: diff --git a/tools/test_terrain_read.py b/tools/test_terrain_read.py index eaccf2199..b829d572e 100644 --- a/tools/test_terrain_read.py +++ b/tools/test_terrain_read.py @@ -23,7 +23,7 @@ def main(): args = parser.parse_args() root = build_pack.ROOT fixture = build_mod.build_integration_fixture("terrain-read", "dev.horizonlab.dispatch.TerrainReadIntegration") - mod = root / "dist" / f"horizon-lab-{build_pack.read_lock()['pack_version']}.jar" + mod = root / "dist" / f"horizon-{build_pack.read_lock()['pack_version']}.jar" original_sha256 = hashlib.sha256(mod.read_bytes()).hexdigest() results = [] for enabled in [False, True]: diff --git a/tools/test_tick_dedup.py b/tools/test_tick_dedup.py index 94153b614..4a518e062 100644 --- a/tools/test_tick_dedup.py +++ b/tools/test_tick_dedup.py @@ -22,7 +22,7 @@ def main(): args = parser.parse_args() root = build_pack.ROOT fixture = build_mod.build_tick_dedup_fixture() - mod = root / "dist" / f"horizon-lab-{build_pack.read_lock()['pack_version']}.jar" + mod = root / "dist" / f"horizon-{build_pack.read_lock()['pack_version']}.jar" results = [] for enabled in [False, True]: instance = root / ".local/runtime" / ("tick-dedup-fixture-patched" if enabled else "tick-dedup-fixture-upstream") diff --git a/tools/test_tick_parity.py b/tools/test_tick_parity.py new file mode 100644 index 000000000..4efcc93e9 --- /dev/null +++ b/tools/test_tick_parity.py @@ -0,0 +1,194 @@ +#!/usr/bin/env python3 +"""Compare Rust scheduled-tick traces with checksum-pinned vanilla bytecode.""" +import argparse +from collections import Counter +import json +import os +from pathlib import Path +import platform +import random +import subprocess +import tempfile + +try: + from . import lab, test_rust_parity +except ImportError: + import lab + import test_rust_parity + + +def corpus(): + # Priority versus overdue time, first-request deduplication, and callback deferral. + yield "reset" + yield "add 0 0" + yield "add 1 0" + for command in ["schedule 0 0 64 0 1 3 10", "schedule 1 1 64 0 2 -3 11", + "schedule 2 16 64 0 3 0 12", "schedule 0 0 64 0 -100 -3 -99", + "save 0 0 0", "tick 10 1 0 1 1 64 0 100", "chunk 0 0", + "tick 10 20 1 0 0 64 0 100", "query 0 0 64 0", + "tick 10 20 0 0 0 64 0 100"]: + yield command + # Saved-list duplicates, negative load order, integer narrowing and time overflow. + for base in [-9223372036854775808, -2147483648, 0, 2147483647, 9223372036854775807]: + yield "reset" + yield "load -1 -1 4 0 -1 64 -1 -2147483648 -100 0 -1 64 -1 2147483647 100 1 -2 65 -2 -1 0 2 -3 66 -3 0 0" + yield "query 0 -1 64 -1" + yield "schedule 0 -1 64 -1 0 0 1" + yield f"save -1 -1 {base}" + yield f"unpack -1 -1 {base}" + yield "chunk -1 -1" + yield f"save -1 -1 {base}" + yield "tick 9223372036854775807 100 0 0 -1 64 -1 0" + yield "chunk -1 -1" + # Equal-key heads, map growth/shrink, chunk removal and heap tie behavior. + chunks = [(x, z) for x in range(-8, 9) for z in range(-4, 5)] + for reverse in [False, True]: + yield "reset" + for cx, cz in reversed(chunks) if reverse else chunks: + yield f"add {cx} {cz}" + for i in range(3): + yield f"schedule {i} {cx * 16 + i} 64 {cz * 16} {i % 2} 0 0" + for step in range(18): + yield f"tick 10 23 0 0 0 64 0 {step}" + if step % 3 == 0: + for cx, cz in chunks[step:step + 5]: + yield f"remove {cx} {cz}" + if step % 4 == 0: + for cx, cz in chunks[step:step + 8]: + yield f"restore {cx} {cz}" + yield "tick 100 10000 0 0 0 64 0 0" + # Force wraparound probe clusters in the deadline index. + def mix(key): + value = key * 0x9e3779b97f4a7c15 & ((1 << 64) - 1) + value ^= value >> 32 + return value ^ (value >> 16) + collisions = [x for x in range(1, 2000) if mix(x) & 31 == 31][:18] + yield "reset" + for x in collisions: + yield f"add {x} 0" + yield f"schedule 0 {x * 16} 64 0 0 0 0" + for _ in collisions: + yield "tick 0 1 0 0 0 64 0 0" + # Active membership, clear/copy, unload and eligibility changes in callbacks. + for action in range(6): + yield "reset" + for cx in range(-2, 4): + yield f"add {cx} 0" + for i in range(8): + yield f"schedule {i % 3} {cx * 16 + i} 64 0 0 {i % 7 - 3} {i}" + yield f"tick 0 35 {action} 1 1 64 0 9223372036854775806" + yield "query 1 1 64 0" + yield "tick 0 100 0 1 1 64 0 0" + yield "copy -32 0 0 15 100 15 16 0 0" + yield "clear -30 0 0 -1 100 0" + for cx in range(-2, 4): + yield f"chunk {cx} 0" + yield f"save {cx} 0 -1" + rng = random.Random(0x484F52495A4F4E5449434B) + positions = [(x, z) for x in range(-3, 4) for z in range(-3, 4)] + for scenario in range(8): + yield "reset" + for cx, cz in positions: + yield f"add {cx} {cz}" + for step in range(2500): + cx, cz = rng.choice(positions) + x, y, z = cx * 16 + rng.randrange(8), rng.randrange(-2, 3), cz * 16 + rng.randrange(8) + kind = rng.randrange(8) + order = rng.choice([step, -step, 0, -9223372036854775808, 9223372036854775807]) + operation = rng.randrange(100) + if operation < 55: + yield f"schedule {kind} {x} {y} {z} {rng.randrange(-5, 50)} {rng.randrange(-7, 8)} {order}" + if step % 7 == 0: + yield f"schedule {kind} {x} {y} {z} {rng.randrange(-10, 100)} 0 {order}" + elif operation < 65: + yield f"tick {rng.randrange(-5, 55)} {rng.choice([-1, 0, 1, 2, 7, 17, 100])} {rng.randrange(6)} {kind} {x} {y} {z} {order}" + elif operation < 70: + yield f"query {kind} {x} {y} {z}" + elif operation < 75: + yield f"enable {cx} {cz} {rng.randrange(2)}" + elif operation < 80: + yield f"remove {cx} {cz}" + yield f"restore {cx} {cz}" + elif operation < 84: + yield f"add {cx} {cz}" + elif operation < 88: + yield f"reload {cx} {cz} {rng.randrange(-10, 50)} {rng.randrange(-10, 50)}" + elif operation < 92: + yield f"save {cx} {cz} {rng.choice([step, -step, -9223372036854775808, 9223372036854775807])}" + elif operation < 95: + yield f"chunk {cx} {cz}" + elif operation < 98: + yield f"clear {x} -2 {z} {x + rng.randrange(20)} 2 {z + rng.randrange(20)}" + else: + yield f"copy {x} -2 {z} {x + 7} 2 {z + 7} 16 0 0" + for cx, cz in positions: + yield f"enable {cx} {cz} 1" + yield "tick 9223372036854775807 100000 0 0 0 0 0 0" + for cx, cz in positions: + yield f"chunk {cx} {cz}" + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--prepare", action="store_true") + args = parser.parse_args() + directory = lab.LOCAL / "rust-tick-parity" + directory.mkdir(parents=True, exist_ok=True) + report_path = directory / "report.json" + report_path.unlink(missing_ok=True) + if args.prepare: + lab.prepare() + lock, jars, libraries = test_rust_parity.verify_artifacts() + base = Path(tempfile.mkdtemp(prefix="run-", dir=directory)) + commands = list(corpus()) + inputs = base / "inputs.txt" + inputs.write_text("\n".join(commands) + "\n", encoding="utf-8") + oracle = lab.ROOT / "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaTickOracle.java" + data_oracle = oracle.with_name("VanillaTickDataOracle.java") + sources = [oracle, data_oracle, Path(__file__).resolve(), lab.ROOT / "tools/test_rust_parity.py", lab.ROOT / "Cargo.toml", lab.ROOT / "Cargo.lock", lab.ROOT / "crates/horizon-core/Cargo.toml", lab.ROOT / "crates/horizon-world/Cargo.toml", *sorted((lab.ROOT / "crates/horizon-core/src").rglob("*.rs")), *sorted((lab.ROOT / "crates/horizon-world/src").rglob("*.rs")), lab.ROOT / "crates/horizon-world/examples/tick_fixture.rs"] + tested_sources = test_rust_parity.source_hashes(sources) + classes = base / "classes" + classes.mkdir() + dependency_path = os.pathsep.join(map(str, libraries)) + test_rust_parity.run(["javac", "--release", "25", "-proc:none", "-cp", os.pathsep.join([str(jars["server"]), dependency_path]), "-d", str(classes), str(oracle), str(data_oracle)]) + test_rust_parity.run(["cargo", "build", "--release", "--bin", "horizon-tick-parity"]) + metadata = json.loads(subprocess.check_output(["cargo", "metadata", "--no-deps", "--format-version", "1"], cwd=lab.ROOT, text=True)) + binary = Path(metadata["target_directory"]) / "release" / ("horizon-tick-parity.exe" if os.name == "nt" else "horizon-tick-parity") + candidate = base / "rust.txt" + with inputs.open("rb") as stdin, candidate.open("wb") as stdout: + test_rust_parity.run([str(binary)], stdin=stdin, stdout=stdout) + def data_java(side, mode): + completed = subprocess.run(["java", "-Xmx512M", "-cp", os.pathsep.join([str(classes), str(jars[side]), dependency_path]), "dev.horizonlab.parity.VanillaTickDataOracle", mode, str(base)], cwd=lab.ROOT, capture_output=True, text=True, timeout=300) + (base / f"data-{side}-{mode}.log").write_text(completed.stdout + completed.stderr, encoding="utf-8") + completed.check_returncode() + return completed.stdout + data_java("server", "generate") + test_rust_parity.run(["cargo", "build", "--release", "-p", "horizon-world", "--example", "tick_fixture"]) + fixture = Path(metadata["target_directory"]) / "release/examples" / ("tick_fixture.exe" if os.name == "nt" else "tick_fixture") + test_rust_parity.run([str(fixture), str(base)]) + references = [] + for side, jar in jars.items(): + reference = base / f"vanilla-{side}.txt" + with (base / f"vanilla-{side}.log").open("wb") as log: + test_rust_parity.run(["java", "-Xmx512M", "-cp", os.pathsep.join([str(classes), str(jar), dependency_path]), "dev.horizonlab.parity.VanillaTickOracle", str(inputs), str(reference)], stdout=log, stderr=subprocess.STDOUT) + matched = test_rust_parity.compare(reference, candidate) + output = data_java(side, "verify") + marker = "HORIZON_TICK_DATA_RESULT " + counts = [json.loads(line.split(marker, 1)[1]) for line in output.splitlines() if marker in line] + if len(counts) != 1 or counts[0] != {"block_ticks": 251, "fluid_ticks": 251, "region_chunks": 1}: + raise AssertionError(f"Incomplete tick save fixture: {counts}") + references.append({"side": side, "jar_sha256": lab.digest(jar, "sha256"), "output_sha256": lab.digest(reference, "sha256"), "matched_output_lines": matched, **counts[0]}) + print(f"{side}: {matched:,} scheduled-tick output lines match", flush=True) + test_rust_parity.ensure_sources_unchanged(sources, tested_sources) + report = {"schema": 1, "minecraft": lock["minecraft"]["version"], "manifest_sha1": lock["minecraft"]["manifest_sha1"], "platform": platform.platform(), + "java": subprocess.check_output(["java", "--version"], text=True).splitlines()[0], "rustc": subprocess.check_output(["rustc", "--version"], text=True).strip(), + "commands": dict(Counter(command.split()[0] for command in commands)), "inputs_sha256": lab.digest(inputs, "sha256"), "rust_output_sha256": lab.digest(candidate, "sha256"), + "sources_sha256": tested_sources, "references": references, + "scope": "Scheduled tick ordering, deduplication, save packing, chunk eligibility/loading and callback mutations only. Block/fluid behavior is not implemented."} + lab.write_json(report_path, report) + lab.write_json(base / "report.json", report) + print(f"Scheduled-tick comparison passed: {report_path}") + + +if __name__ == "__main__": + main() diff --git a/tools/test_tree_feature_parity.py b/tools/test_tree_feature_parity.py new file mode 100644 index 000000000..bac83af2b --- /dev/null +++ b/tools/test_tree_feature_parity.py @@ -0,0 +1,144 @@ +#!/usr/bin/env python3 +"""Compare vanilla tree, fallen-tree and ore features block-for-block with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import zipfile +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen, test_block_survival_parity as survival +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + import test_block_survival_parity as survival + + +def feature_resources(jar): + """Vanilla configured features and named state providers from the authenticated JAR.""" + result={'features':{},'providers':{},'placed':{}} + with zipfile.ZipFile(jar) as archive: + for kind,key in [('feature','features'),('block_state_provider','providers'),('placed_feature','placed')]: + prefix=f'data/minecraft/worldgen/{kind}/' + for name in sorted(archive.namelist()): + if name.startswith(prefix) and name.endswith('.json'): + result[key]['minecraft:'+name[len(prefix):-5]]=archive.read(name).decode('utf-8') + return result + + +def fixture_hashes(paths): + # Build outputs may live behind a linked private directory outside ROOT. + return {path.name:lab.digest(path,'sha256') for path in paths} + + +def corpus(facts,resources): + get=lambda name:facts['defaults']['minecraft:'+name] + def fixture(feature,**extra): + f={'feature':feature,'seed':0,'legacy':False,'origin':[8,65,8],'height':65,'layers':[[59,get('stone')],[63,get('dirt')],[64,get('grass_block')]], + 'hole_mod':0,'hole_state':get('air'),'obstacle_mod':0,'obstacle_state':get('air'),'obstacle_min':0,'states':[]} + f.update(extra);f.setdefault('world_seed',f['seed']^0x2545F4914F6CDD1D);return f + seeds=[0,1,-1,0x5DEECE66D,0x123456789abcdef,-8070450532247928832] + origins=[[8,65,8],[15,65,0],[0,65,15],[-1,65,-17],[31,65,-16],[100003,65,-4097]] + trees,ores,others=[],[],[] + for name,text in resources['features'].items(): + value=json.loads(text);kind=value['type'].removeprefix('minecraft:') + if kind in ('tree','fallen_tree'): + if 'pale_moss' in text:continue # needs the level's feature registry and server level + trees.append(name) + elif kind in ('ore','scattered_ore'):ores.append(name) + elif kind not in ('freeze_top_layer','template','fossil'):others.append(name) # templates need structure resources + worlds=[ + {}, + {'obstacle_mod':37,'obstacle_state':get('oak_leaves'),'obstacle_min':66}, + {'obstacle_mod':23,'obstacle_state':get('stone'),'obstacle_min':65}, + {'obstacle_mod':19,'obstacle_state':get('vine'),'obstacle_min':65}, + {'layers':[[59,get('stone')],[64,get('mud')],[67,get('water')]],'height':68}, + {'layers':[[300,get('stone')],[310,get('dirt')],[311,get('grass_block')]],'origin_y':312,'height':312}, + {'layers':[[59,get('stone')],[63,get('dirt')],[64,get('podzol')]],'hole_mod':11,'hole_state':get('short_grass')}, + ] + for name in trees: + for w,world in enumerate(worlds): + for s,seed in enumerate(seeds): + extra=dict(world);origin=list(origins[(s+w)%len(origins)]);origin[1]=extra.pop('origin_y',extra.get('height',65)) + yield fixture(name,seed=seed,legacy=s%3==2,origin=origin,**extra) + ore_worlds=[ + {'layers':[[-1,get('deepslate')],[250,get('stone')]],'height':251}, + {'layers':[[-1,get('deepslate')],[250,get('stone')]],'height':251,'hole_mod':5,'hole_state':get('air')}, + {'layers':[[-1,get('deepslate')],[250,get('stone')]],'height':-100}, + {'layers':[[250,get('netherrack')]],'height':251,'hole_mod':9,'hole_state':get('cave_air')}, + {'layers':[[30,get('tuff')],[250,get('granite')]],'height':251,'hole_mod':13,'hole_state':get('water')}, + ] + for name in ores: + for w,world in enumerate(ore_worlds): + for s,seed in enumerate(seeds): + origin=list(origins[(s+w)%len(origins)]);origin[1]=[-60,-3,0,40,316,-64][(s*5+w)%6] + yield fixture(name,seed=seed,legacy=s%3==2,origin=origin,**world) + + air,water,stone=get('air'),get('water'),get('stone') + generic_worlds=[ + ({},[65]), + ({'layers':[[200,stone]],'height':201,'boxes':[[-40,20,-40,56,35,56,air]]},[20,35,27]), + ({'layers':[[200,stone]],'height':201,'boxes':[[-40,23,-40,56,35,56,air],[-40,20,-40,56,22,56,water]]},[21,23]), + ({'layers':[[35,stone],[39,get('sand')],[62,water]],'height':40},[40,63]), + ({'layers':[[31,get('lava')],[100,get('netherrack')]],'height':101,'boxes':[[-40,32,-40,56,60,56,air]]},[32,60]), + ] + for name in others: + for w,(world,ys) in enumerate(generic_worlds): + for y in ys: + for s,seed in enumerate(seeds[:4]): + origin=list(origins[(s+w)%len(origins)]);origin[1]=y + yield fixture(name,seed=seed,legacy=s%3==2,origin=origin,**world) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-tree-feature-parity';build.mkdir(parents=True,exist_ok=True);report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts();parity=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity' + oracle=parity/'VanillaTreeFeatureOracle.java';exporter=parity/'VanillaSimpleBlockOracle.java' + helpers=[parity/(name+'.java') for name in ['VanillaPlacementOracle','VanillaBlockSurvivalOracle','VanillaBlockPropertiesOracle','VanillaBlockSupportOracle','VanillaBlockStateCodecOracle','VanillaCollisionOracle','VanillaHeightmapOracle']] + sources=[oracle,exporter,*helpers,Path(__file__),*[lab.ROOT/'tools'/name for name in ['test_block_survival_parity.py','test_worldgen_parity.py','test_rust_parity.py','lab.py']],lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock', + *sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/tree_feature_fixture.rs'] + tested_sources=base.source_hashes(sources);classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:subprocess.run(list(map(str,command)),cwd=lab.ROOT,check=True,timeout=7200,stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + def java(main_class,side,mode,path):run(['java','-Xmx2G','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.'+main_class,mode,path],side+'-'+mode) + tags=worldgen.tag_resources(jars['server']);fluid_tags=survival.fluid_tag_resources(jars['server']);resources=feature_resources(jars['server']) + if tags!=worldgen.tag_resources(jars['client']) or fluid_tags!=survival.fluid_tag_resources(jars['client']) or resources!=feature_resources(jars['client']):raise ValueError('reference resources differ') + for name,value in [('tags.json',tags),('fluid-tags.json',fluid_tags),('vanilla-features.json',resources)]:(build/name).write_text(json.dumps(value,separators=(',',':'))) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,exporter,*helpers],'compile-java') + for side in jars: + export=build/(side+'-definitions');export.mkdir(exist_ok=True);java('VanillaSimpleBlockOracle',side,'export',export) + for path in (build/'server-definitions').iterdir(): + if path.name=='inputs.txt':continue # survival export's own corpus + if path.read_bytes()!=(build/'client-definitions'/path.name).read_bytes():raise ValueError('reference definitions differ: '+path.name) + (build/path.name).write_bytes(path.read_bytes()) + facts=json.loads((build/'facts.json').read_text()) + rules=survival.bind_definitions(*[json.loads((build/name).read_text()) for name in ['survival-classes.json','survival-placement-classes.json','survival-support-tags.json']]);(build/'survival-rules.json').write_text(json.dumps(rules,separators=(',',':'))) + inputs=build/'inputs.txt';count=0 + with inputs.open('w',encoding='utf-8') as output: + only=os.environ.get('FEATURE_FILTER') # optional regex over feature names for focused reruns + for fixture in corpus(facts,resources): + if only and not __import__('re').search(only,fixture['feature']):continue + output.write(json.dumps(fixture,separators=(',',':'))+'\n');count+=1 + fixtures=[inputs,*sorted(build.glob('*.nbt')),*[p for p in sorted(build.glob('*.json')) if p.name!='report.json']];tested_fixtures=fixture_hashes(fixtures) + print(f'Prepared {count:,} feature fixtures',flush=True) + run(['cargo','build','--release','-p','horizon-world','--example','tree_feature_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('tree_feature_fixture.exe' if os.name=='nt' else 'tree_feature_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java('VanillaTreeFeatureOracle',side,side,build);matched=base.compare(build/(side+'.txt'),build/'rust.txt');print(f'{side}: {matched:,} tree/ore output lines match Rust',flush=True) + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(build/(side+'.txt'),'sha256'),'matched_output_lines':matched}) + base.ensure_sources_unchanged(sources,tested_sources); + if fixture_hashes(fixtures)!=tested_fixtures:raise ValueError('fixtures changed during the run') + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0], + 'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':count,'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references, + 'scope':'Every vanilla 26.3 minecraft:tree (except pale-moss decorated), minecraft:fallen_tree, minecraft:ore and minecraft:scattered_ore configured feature, decoded from the authenticated JAR data, placed with both random kinds over layered synthetic worlds (open ground, leaf/stone/vine obstacles, flooded mud, near the build limit, podzol with grass) backed by native proto-chunk sections. Ordered level writes and flags, beehive occupants, post-processing marks, results, random tails and the final block diff of every touched chunk are compared, including native leaf distances and edge shape updates. Pale-moss ground patches, real WorldGenRegion write policy, heightmaps and decoration scheduling remain covered elsewhere or pending.'} + lab.write_json(report_path,report);print(f'Scoped tree/ore feature parity passed: {report_path}',flush=True) + + +if __name__=='__main__':main() diff --git a/tools/test_underwater_magma_parity.py b/tools/test_underwater_magma_parity.py new file mode 100644 index 000000000..89044f622 --- /dev/null +++ b/tools/test_underwater_magma_parity.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python3 +"""Compare underwater magma scans, face occlusion and randomized placement.""" +import itertools +import json +try: + from . import test_simple_block_parity as harness +except ImportError: + import test_simple_block_parity as harness + + +def corpus(facts, placement): + states=facts['states'];get=lambda name:facts['defaults']['minecraft:'+name] + def magma(**extra): + value={'type':'underwater_magma','floor_search_range':2,'placement_radius_around_floor':0,'placement_probability_per_valid_position':1.0};value.update(extra);return value + def case(definition=None, **extra): + origin=extra.pop('origin',[0,64,0]) + value={'definition':json.dumps(definition if definition is not None else magma(),separators=(',',':')), + 'mode':'feature','origin':origin,'legacy':False,'seed':0,'world_seed':1,'fail':-1,'reject':0, + 'brightness':15,'fallback':get('stone'),'states':[[*origin,get('water')]],'repeats':1} + value.update(extra);return value + for state in range(len(states)): + for position in [[0,64,0],[0,63,0],[0,62,0],[0,63,-1],[1,63,0],[0,63,1],[-1,63,0]]: + initial={(0,64,0):get('water')};initial[tuple(position)]=state + yield case(states=[[*p,s] for p,s in initial.items()]) + for search,above,below,legacy,fail in itertools.product([0,1,2,3,4,8,512],range(4),range(4),[False,True],[-1,0,1,2,3,5,9]): + initial=[[0,64+y,0,get('water')] for y in range(-below,above+1)] + yield case(magma(floor_search_range=search),states=initial,legacy=legacy,fail=fail) + for radius,probability,legacy,seed,fail,reject in itertools.product([0,1,2],[0.0,0.1,0.5,1.0],[False,True], + [0,-1,0x123456789abcdef],[-1,0,2,6,8,12,19],[0,1,3]): + yield case(magma(placement_radius_around_floor=radius,placement_probability_per_valid_position=probability), + legacy=legacy,seed=seed,fail=fail,reject=reject,repeats=2) + for legacy in [False,True]: + yield case(magma(placement_radius_around_floor=64,placement_probability_per_valid_position=0.0),legacy=legacy) + for origin,search in itertools.product([[2147483647,2147483647,2147483647],[-2147483648,-2147483648,-2147483648],[-17,-64,-33]],[0,1,2,3,512]): + yield case(magma(floor_search_range=search),origin=origin) + for key,values in [('floor_search_range',[None,-1,0,1,512,513,False,'2',4294967298]), + ('placement_radius_around_floor',[None,-1,0,64,65,False,'0']), + ('placement_probability_per_valid_position',[None,-1,-0.0,-1e-100,0,1e-100,1,1.0000000001,1.01,False,'1'])]: + for value in values: + definition=magma(placement_probability_per_valid_position=0.0);definition[key]=value;yield case(definition) + definition=magma();del definition[key];yield case(definition) + for legacy,seed,fail,reject in itertools.product([False,True],[0,-1],[-1,0,5,12],[0,3]): + placed={'feature':magma(placement_radius_around_floor=1,placement_probability_per_valid_position=0.5),'placement':[{'type':'count','count':2}]} + yield case(placed,mode='placed',legacy=legacy,seed=seed,fail=fail,reject=reject) + yield case({'type':'overlay','features':[placed,{'feature':'horizon:moss','placement':[]}]},legacy=legacy,seed=seed,fail=fail,reject=reject) + + +if __name__=='__main__': + harness.run(corpus,'rust-underwater-magma-parity',__file__, + 'Native UnderwaterMagmaFeature codecs and Column.scan floor selection. Initial water identity, upward scan before downward scan, repeated boundary reads, all scan endpoints, every state at origin/floor/below and each horizontal neighbor, exact full-face occlusion, cubic traversal, per-position float draws before block tests, flags 2, rejected writes and partial failures are compared. Both random modes include the complete radius-64 cube with probability zero (2146689 draws), wrapped radius-zero columns and nested placement. Rust allows the entire valid codec radius domain and bounds pathological overflow iteration at 2^23 visits. Actual chunk update callbacks, magma gameplay and full world generation remain pending.') diff --git a/tools/test_use_flag_reaction_parity.py b/tools/test_use_flag_reaction_parity.py new file mode 100644 index 000000000..08437e229 --- /dev/null +++ b/tools/test_use_flag_reaction_parity.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python3 +"""Compare native living item-use tick, release, completion and stop lifecycle.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + modes=['tick','update','complete','release','stop','notify','flag','assign'] + ints=[-2147483648,-1,0,1,2,20,2147483647] + def state(**kw): + s=dict(item=0,remaining=1,virtual_remaining=1,kinetic=True,selected=0,counts=[1,1,0],slots=[[0,0],[8,1],[40,1]],level=0,clients=[False,True],releases=[False,True],finishes=[1,0],durations=[32,72000]);s.update(kw);return s + def row(mode='tick',**kw): + f=dict(mode=mode,argument=0,flags=1,shared_type=False,vibrations=[True,True],initial=state(),after=state(item=1,remaining=0,virtual_remaining=-1,counts=[0,2,0],selected=8,slots=[[0,1],[8,0],[40,0]],level=1,durations=[-1,2147483647]),fail=-1,mutate_at=-1,mask=1,value=True,values=[0,1,3,2]);f.update(kw);return f + for mode in modes: + for flags in [0,1,2,3,127,128,254,255]: + for item in range(3): + for held in range(3): + for client in [False,True]: + yield row(mode,flags=flags,initial=state(item=item,slots=[[0,held],[40,held]],clients=[client,client])) + for mutate in range(-1,15): + for fail in range(-1,15):yield row(mode,mutate_at=mutate,fail=fail) + for flags in range(256): + for mask in [-2147483648,-1,0,1,2,3,128,256,2147483647]: + for value in [False,True]:yield row('flag',flags=flags,mask=mask,value=value,initial=state(item=2,clients=[True,True])) + for count in ints: + for remaining in ints: + for value in [0,1,2,3]:yield row('assign',values=[value,value],initial=state(counts=[count,count,count],remaining=remaining,clients=[True,True])) + rng=random.Random(0x555345464c4147) + def random_state():return state(item=rng.randrange(3),remaining=rng.choice(ints),virtual_remaining=rng.choice(ints),kinetic=bool(rng.randrange(2)),selected=rng.randrange(9),counts=[rng.choice(ints) for _ in range(3)],slots=[[i,rng.randrange(3)] for i in rng.sample(range(43),rng.randrange(12))],level=rng.randrange(2),clients=[bool(rng.randrange(2)),bool(rng.randrange(2))],releases=[bool(rng.randrange(2)),bool(rng.randrange(2))],finishes=[rng.randrange(3),rng.randrange(3)],durations=[rng.choice(ints),rng.choice(ints)]) + for _ in range(4500):yield row(rng.choice(modes),argument=rng.randrange(3),flags=rng.randrange(256),shared_type=bool(rng.randrange(2)),vibrations=[bool(rng.randrange(2)),bool(rng.randrange(2))],initial=random_state(),after=random_state(),fail=rng.choice([-1,-1,*range(15)]),mutate_at=rng.randrange(-1,15),mask=rng.randrange(-2147483648,2147483648),value=bool(rng.randrange(2)),values=[rng.randrange(256) for __ in range(rng.randrange(6))]) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-use-flag-reaction-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaUseFlagReactionOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/use_flag_reaction_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaUseFlagReactionOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','use_flag_reaction_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('use_flag_reaction_fixture.exe' if os.name=='nt' else 'use_flag_reaction_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} use flag reaction output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual inherited LivingEntity synchronized-use-flag observer reaction, composed with Inventory/PlayerEquipment, shared stacks and SynchedEntityData writes/assignments. Client reactions initialize a newly active held stack and duration or clear an existing active stack; server reactions leave active use untouched. Includes ordinary use tick/completion/release/stop, same-value received updates, duration callbacks, dirty packing, mutations and failure prefixes. Other synchronized keys, start-use packet flow, full equip/item effects and complete gameplay integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped use flag reaction parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_use_remainder_parity.py b/tools/test_use_remainder_parity.py new file mode 100644 index 000000000..94d89703f --- /dev/null +++ b/tools/test_use_remainder_parity.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python3 +"""Compare native use remainders and strict scalar stack validation.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + edges=[-2147483648,-1,0,1,2,64,99,2147483647] + def op(kind,**kw): + v=dict(kind=kind,a=0,b=1,count=1,item=1,patch=[],prototype=[],template=0,infinite=False,fail=0,extra_count=2,source_count=3,replace=-1);v.update(kw);return v + def row(item=1,count=1,ops=None): + return dict(prototypes=[[],[[0,64]],[[0,1],[1,10],[2,0]]],stacks=[dict(item=item,count=count,patch=[]),dict(item=2,count=1,patch=[]),dict(item=-1,count=0,patch=[])],ops=ops or []) + for count in edges: + for before in edges: + for item in [-1,0,1,2]: + for infinite in [False,True]: + for patch in [[],[[0,1],[1,10]],[[0,0]],[[0,99]]]: + yield row(item,count,[op('new',count=2,patch=patch,b=0),op('convert',count=before,infinite=infinite)]) + for fail in range(3): + for replace in [-1,0,1,2]: + for extra_count in edges: + for source_count in edges: + yield row(1,1,[op('new',b=0),op('convert',count=2,fail=fail,replace=replace,extra_count=extra_count,source_count=source_count),op('convert',count=3)]) + rng=random.Random(0x52454d41494e4445) + for _ in range(2400): + ops=[op('new',b=0,count=rng.choice([n for n in edges if n]),item=rng.choice([1,2]),patch=[[0,rng.choice(edges)]])] + for __ in range(rng.randrange(2,8)): + ops.extend([op('count',a=rng.randrange(3),count=rng.choice(edges)),op('convert',a=rng.randrange(3),b=rng.randrange(3),count=rng.choice(edges),infinite=bool(rng.randrange(2)),fail=rng.randrange(3),replace=rng.randrange(-1,3),source_count=rng.choice(edges),extra_count=rng.choice(edges))]) + yield row(rng.randrange(-1,3),rng.choice(edges),ops) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-use-remainder-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaUseRemainderOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/use_remainder_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaUseRemainderOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','use_remainder_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('use_remainder_fixture.exe' if os.name=='nt' else 'use_remainder_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} use remainder output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual UseRemainder.convertIntoRemainder composed with native ItemStackTemplate creation/validation and shared ItemStack references. Covers finite/infinite materials, visible count comparisons, exhausted and empty-but-distinct inputs, invalid templates returning canonical EMPTY, extra-item callbacks with mutations/failures, and captured-reference identity. Rust uses its item-template factory with scalar validation; contained component validation, concrete actor inventory insertion/drop, item finish side effects and complete gameplay integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped use remainder parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_value_provider_parity.py b/tools/test_value_provider_parity.py new file mode 100644 index 000000000..f276e4f31 --- /dev/null +++ b/tools/test_value_provider_parity.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python3 +"""Compare scalar value-provider decoding and seeded samples with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import random +import subprocess +try: + from . import lab,test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def definitions(): + encode=lambda value:json.dumps(value,separators=(',',':')) + for kind in ['float','int']: + for token in ['null','false','true','[]','{}','"0"','0','-0.0','1','-1','0.123456789','2.9','-2.9','4294967296','-4294967297','1e100','-1e100','1e-100','-1e-100']: + yield kind,token + yield kind,'{"type":"constant","value":'+token+'}' + for value in [{},{'type':'missing'},{'type':None},{'type':'constant'},{'type':'Constant','value':0},{'type':':constant','value':17}]:yield kind,encode(value) + for minimum,maximum in [(0,1),(-1,1),(-0.,0.),(1,1),(2,1),(-1e100,1e100),(1e100,1e100),(-1e-100,1e-100),(-0.7,1.3),(-1e30,1e30)]: + yield 'float',encode({'type':'uniform','min_inclusive':minimum,'max_exclusive':maximum}) + for plateau in [-1,0,0.1,1,3,1e100]:yield 'float',encode({'type':'trapezoid','min':minimum,'max':maximum,'plateau':plateau}) + ranges=[(0,0),(0,1),(-1,1),(1,1),(2,1),(-7,13),(0,14),(0,9),(-2**31,2**31-1),(0,2**31-1),(-2**31,-2**31+100),(2**31-100,2**31-1),(0,4294967297)] + for minimum,maximum in ranges: + for kind in ['uniform','biased_to_bottom','very_biased_to_bottom']: + value={'type':kind,'min_inclusive':minimum,'max_inclusive':maximum};yield 'int',encode(value) + for low,high in [(0,3),(-100,-50),(50,100),(1,0)]:yield 'int',encode({'type':'clamped','source':value,'min_inclusive':low,'max_inclusive':high}) + for plateau in [-2**31,-10,-1,0,1,3,maximum-minimum,2**31-1]:yield 'int',encode({'type':'trapezoid','min':minimum,'max':maximum,'plateau':plateau}) + for kind in ['float','int']: + yield kind,'{"type":"constant","value":0,"value":-0.0}' + for field in ['min_inclusive','max_exclusive' if kind=='float' else 'max_inclusive']: + for token in ['null','false','"1"','{}','[]']: + yield kind,'{"type":"uniform","min_inclusive":0,"'+('max_exclusive' if kind=='float' else 'max_inclusive')+'":1,"'+field+'":'+token+'}' + + + # Zero-weight entries remain part of declared bounds, but are never sampled. + constant = (lambda n: {'absolute': n}) if False else (lambda n: n) + weighted = lambda entries: {'type': 'weighted_list', 'distribution': entries} + entry = lambda value, weight: {'data': value, 'weight': weight} + choices = [constant(-7), constant(19), {'type': 'uniform', 'min_inclusive': constant(0), 'max_inclusive': constant(31)}] + for weights in [(1,), (0,), (0, 1), (1, 0), (1, 1), (1, 62), (1, 63), (1, 64), (0, 3, 7), (2147483647,), (2147483646, 1), (2147483647, 1), (-1, 2), (4294967297, 2), (0.9, 1.9)]: + value = weighted([entry(choices[i % len(choices)], weight) for i, weight in enumerate(weights)]) + yield 'int', encode(value) + nested = weighted([entry(constant(5), 1), entry(constant(-9), 4)]) + yield 'int', encode(weighted([entry(nested, 3), entry(choices[-1], 2)])) + for distribution in [None, {}, [], [entry(constant(0), 0), entry(constant(1), 0)], [entry(None, 0), entry(constant(1), 1)], [{'data': constant(1)}], [{'weight': 1}], [entry(constant(1), '1')], [entry(constant(1), None)]]: + yield 'int', encode(weighted(distribution)) + + +def corpus(): + definitions_list=list(definitions()) + for legacy in [False,True]: + for seed in [0,-1,0x123456789abcdef,-2**63,2**63-1]: + for kind,definition in definitions_list:yield {'kind':kind,'definition':definition,'legacy':legacy,'seed':seed,'samples':64} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument("--prepare",action="store_true");args=parser.parse_args() + build=lab.LOCAL/"rust-value-provider-parity";build.mkdir(parents=True,exist_ok=True) + report_path=build/"report.json";report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaValueProviderOracle.java" + sources=[oracle,Path(__file__),lab.ROOT/"tools/test_worldgen_parity.py",lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock",lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT/"crates/horizon-core/src").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world/src").rglob("*.rs")),lab.ROOT/"crates/horizon-world/examples/value_provider_fixture.rs"] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus());inputs=build/"inputs.txt";inputs.write_text("".join(json.dumps(f,separators=(",",":"))+"\n" for f in fixtures),encoding="utf-8") + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths);classes=build/"classes";classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+".log")).open("w",encoding="utf-8") as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(["javac","--release",lock["minecraft"]["java_major"],"-proc:none","-cp",str(jars["server"])+os.pathsep+dependency_path,"-d",classes,oracle],"compile-java") + run(["cargo","build","--release","-p","horizon-world","--example","value_provider_fixture"],"compile-rust") + metadata=json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary=Path(metadata["target_directory"])/"release/examples"/("value_provider_fixture.exe" if os.name=="nt" else "value_provider_fixture") + run([binary,build],"rust") + references=[] + for side,jar in jars.items(): + reference=build/f"{side}.txt" + run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaValueProviderOracle",side,build],side) + matched=base.compare(reference,build/"rust.txt") + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched}) + print(f"{side}: {matched:,} value-provider output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={"schema":1,"minecraft":lock["minecraft"]["version"],"manifest_sha1":lock["minecraft"]["manifest_sha1"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "fixtures":len(fixtures),"definitions":len(list(definitions())),"samples_per_valid_fixture":64, + "sources_sha256":tested_sources,"fixtures_sha256":tested_fixtures,"rust_output_sha256":lab.digest(build/"rust.txt","sha256"),"references":references, + "scope":"Actual FloatProviders.CODEC and IntProviders.CODEC decoding, declared ranges, seeded samples and interleaved subsequent nextLong values. Covers constant/uniform/trapezoid floats and constant/uniform/biased-to-bottom/very-biased-to-bottom/trapezoid/clamped/weighted-list integers, both random modes, numeric narrowing, signed zeros, overflow, equal/reversed bounds, negative plateaus, missing fields, duplicate keys and sampling failures. Float NaNs are canonicalized. Weighted lists include zero weights, singleton draws, nested providers, 63/64/65 weight totals, maximum/overflow totals and malformed entries; native constructor rejections count as decode errors. Gaussian providers, encoding, height providers and complete generation remain outside this scope."} + + lab.write_json(report_path,report);print(f"Scoped value-provider parity passed: {report_path}") + + +if __name__=="__main__":main() diff --git a/tools/test_view_direction_parity.py b/tools/test_view_direction_parity.py new file mode 100644 index 000000000..c48627380 --- /dev/null +++ b/tools/test_view_direction_parity.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +"""Compare native view vectors and blocking-angle arithmetic.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def single(v):return struct.pack('>f',v).hex() + def double(v):return struct.pack('>d',v).hex() + def vec(v):return [double(x) for x in v] + rng=random.Random(0x41434f53) + for _ in range(100000):yield dict(mode='acos',value=double(rng.uniform(-1,1))) + for _ in range(100000):yield dict(mode='acos',value=f'{rng.getrandbits(64):016x}') + for pivot in [-1,-.5,-0.,0.,.5,1]: + for direction in [-float('inf'),float('inf')]: + v=pivot + for _ in range(256):yield dict(mode='acos',value=double(v));v=math.nextafter(v,direction) + values=[-float('inf'),-1e30,-720,-360,-180,-90,-45,-1,-0.,0.,1e-40,.1,1,45,90,180,360,720,1e30,float('inf'),float('nan')] + for pitch in values: + for yaw in values:yield dict(mode='view',pitch=single(pitch),yaw=single(yaw)) + for _ in range(10000):yield dict(mode='view',pitch=f'{rng.getrandbits(32):08x}',yaw=f'{rng.getrandbits(32):08x}') + for yaw in values: + for x in [-1,-1e-5,-0.,0.,1e-6,1e-5,1,float('inf'),float('nan')]: + for z in [-1,-1e-5,0.,1e-5,1]:yield dict(mode='blocking',source=vec([x,99,z]),position=vec([0,0,0]),yaw=single(yaw)) + for _ in range(12000): + value=lambda:rng.choice(values) if rng.randrange(4)==0 else rng.uniform(-10000,10000) + yield dict(mode='blocking',source=vec([value(),value(),value()]),position=vec([value(),value(),value()]),yaw=single(rng.choice(values) if rng.randrange(4)==0 else rng.uniform(-10000,10000))) + yield dict(mode='fallback') + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-view-direction-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaViewDirectionOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/view_direction_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaViewDirectionOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','view_direction_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('view_direction_fixture.exe' if os.name=='nt' else 'view_direction_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} view direction output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Entity.calculateViewVector and Java Math.acos, plus the blocking-direction composition of native view vector, Vec3 subtraction/normalization/dot and acos. Exact bit comparisons cover random doubles, inverse-cosine boundaries, float-table directions, nonfinite/zero/near-zero horizontal vectors and the float-PI fallback. Uses pinned pure-Rust libm 0.2.16; full item-blocking dispatch and other platform JVMs remain pending.'} + lab.write_json(report_path,report);print(f'Scoped view direction parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_vines_parity.py b/tools/test_vines_parity.py new file mode 100644 index 000000000..1f07c74c6 --- /dev/null +++ b/tools/test_vines_parity.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python3 +"""Compare vine attachment priority, support queries and ordered writes.""" +import itertools +import json +try: + from . import test_simple_block_parity as harness +except ImportError: + import test_simple_block_parity as harness + + +def corpus(facts, placement): + states=facts['states'];get=lambda name:facts['defaults']['minecraft:'+name] + directions=[(0,1,0),(0,0,-1),(0,0,1),(-1,0,0),(1,0,0)] + def case(**extra): + value={'definition':'{"type":"vines"}','mode':'feature','origin':[0,64,0],'legacy':False,'seed':0,'world_seed':1, + 'fail':-1,'reject':0,'brightness':15,'fallback':get('air'),'states':[],'repeats':2} + value.update(extra);return value + for state in range(len(states)): + yield case(states=[[0,64,0,state],[0,65,0,get('stone')]]) + for x,y,z in directions:yield case(states=[[x,64+y,z,state]],repeats=1) + for mask,origin,legacy,seed,fail,reject in itertools.product(range(32), + [[0,64,0],[2147483647,2147483647,2147483647],[-2147483648,-2147483648,-2147483648]], + [False,True],[0,-1],[-1,0,1,2,3,4,5,6,7],[0,1,3]): + wrap=lambda n:(n+2**31)%2**32-2**31 + initial=[[*[wrap(origin[i]+d[i]) for i in range(3)],get('stone') if mask&(1<d',float(v)).hex() + def single(v):return struct.pack('>f',float(v)).hex() + def row(**kw): + f=dict(position=[17.25,64.9,-33.5],width=.6,velocity=[.2,-.3,.1],other_velocity=[.8,-.9,1.2],after_position=[31.5,100.9,-52.25],after_width=.1,after_velocity=[1,2,3],after_other_velocity=[4,5,6],passenger=0,legacy=True,seed=42,fail=-1,mutate_at=-1);f.update(kw) + for k in ['position','velocity','other_velocity','after_position','after_velocity','after_other_velocity']:f[k]=[bits(v) for v in f[k]] + for k in ['width','after_width']:f[k]=single(f[k]) + return f + yield row() + widths=[-float('inf'),-1,-.050000004,-.05,-.049999997,-0.,0.,.0001,.049999997,.05,.050000004,.1,.6,1,2,float('nan')] + vectors=[[0,0,0],[1,0,0],[0,1.2499999,0],[0,1.25,0],[0,1.2500001,0],[0,.2777777777777778,0],[10,20,30],[1,float('nan'),2],[float('inf'),0,0],[-0.,-0.,-0.]] + for passenger in range(3): + for legacy in [False,True]: + for width in widths: + for velocity in vectors:yield row(passenger=passenger,legacy=legacy,width=width,velocity=velocity,other_velocity=velocity) + for legacy in [False,True]: + for passenger in range(3): + for fail in range(-1,45): + for mutate in [-1,0,1,2,3,4,5,6,7,8,9,10,20,30]:yield row(legacy=legacy,passenger=passenger,fail=fail,mutate_at=mutate) + for y in [-float('inf'),-1e30,-2147483649,-.1,-0.,0.,.9,16777215,16777216,2147483648,1e30,float('inf'),float('nan')]:yield row(position=[-0.,y,float('nan')],width=.01) + for width in [100000,float('inf')]:yield row(width=width,fail=7) + rng=random.Random(0x53504c415348) + for _ in range(3000):yield row(seed=rng.randrange(-2**63,2**63),legacy=bool(rng.randrange(2)),passenger=rng.randrange(3),width=rng.choice(widths),velocity=rng.choice(vectors),other_velocity=rng.choice(vectors),after_width=rng.choice(widths),fail=rng.choice([-1,-1,*range(35)]),mutate_at=rng.choice([-1,-1,*range(35)])) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-water-splash-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWaterSplashOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/water_splash_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaWaterSplashOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','water_splash_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('water_splash_fixture.exe' if os.name=='nt' else 'water_splash_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} water-splash output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual Entity.doWaterSplashEffect with native LegacyRandomSource and XoroshiroRandomSource. Compares controlling-passenger identity, captured velocity, sound selection/volume/pitch, ordered bubble/splash particle requests, float-rounded surface height, random draw continuation and final game event. Includes width/position/velocity mutations, nonfinite arithmetic and injected failures. Sound identities and effect sinks are controlled; audio playback, particle simulation/rendering and complete gameplay remain pending.'} + lab.write_json(report_path,report);print(f'Scoped water splash parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_world_border_parity.py b/tools/test_world_border_parity.py new file mode 100644 index 000000000..472404582 --- /dev/null +++ b/tools/test_world_border_parity.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python3 +"""Compare world-border extents, tick interpolation and collision geometry with pinned vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + def bits(v):return struct.pack('>d',float(v)).hex() + partials=[struct.pack('>f',v).hex() for v in [0,-0.0,0.25,0.5,1,-1,2,float('nan'),float('inf')]] + def row(ops,center=0,size=10): + points=[0,-0.0,-1,1,-5,5,-6,6,center,center-size/2,center+size/2,math.nextafter(center+size/2,-float('inf')),float('nan'),float('inf')] + queries=[] + for i,x in enumerate(points): + z=0 if i%2 else x + for margin in [0,1,-0.5]: + width=[0,0.6,1,3][i%4] + queries.append(list(map(bits,[x,z,margin,0,0,0,width,1.8,width]))) + return dict(ops=ops,partials=partials,queries=queries) + for center in [0,-0.0,0.25,-0.25,29999984,-29999984,1.7e308]: + for size in [0,-0.0,1e-8,0.125,1,5.5,59999968,1.7e308]: + for limit in [0,1,8,29999984,2147483647]: + yield row([['center',bits(center),bits(-center)],['size',bits(size)],['limit',limit]],center,size) + for start,target in [(0,10),(10,0),(3.25,17.75),(59999968,0),(0,59999968),(1.7e308,0),(0,1.7e308),(0,-0.0)]: + for duration in [0,1,2,7,20,(1<<53)-1,1<<53,(1<<63)-1]: + for begin in [0,(1<<63)-1,-(1<<63)]: + ops=[['lerp',bits(start),bits(target),duration,begin],['tick',1],['center',bits(0.25),bits(-0.75)],['tick',1],['limit',8],['tick',2],['tick',4],['tick',12]] + yield row(ops,0,start) + rng=random.Random(0x424f52444552) + for index in range(600): + center=rng.uniform(-100,100);size=rng.uniform(0,200) + ops=[['center',bits(center),bits(rng.uniform(-100,100))],['size',bits(size)]] + for _ in range(12): + action=rng.randrange(5) + if action==0:ops.append(['center',bits(rng.uniform(-100,100)),bits(rng.uniform(-100,100))]) + elif action==1:ops.append(['size',bits(rng.uniform(0,200))]) + elif action==2:ops.append(['limit',rng.randrange(0,201)]) + elif action==3:ops.append(['lerp',bits(rng.uniform(0,200)),bits(rng.uniform(0,200)),rng.randrange(0,30),rng.randrange(-(1<<63),(1<<63))]) + else:ops.append(['tick',rng.randrange(0,10)]) + yield row(ops,center,size) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-world-border-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldBorderOracle.java' + helper=oracle.with_name('VanillaFaceSupportOracle.java') + sources=[oracle,helper,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/world_border_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle,helper],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaWorldBorderOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','world_border_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('world_border_fixture.exe' if os.name=='nt' else 'world_border_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} world-border output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual WorldBorder stationary/moving extents, center/absolute-limit updates, tick progression, size/target/time/speed/status, float partial-tick bounds, full collision shape grids and proximity predicates. Covers finite nonnegative sizes, finite centers, nonnegative absolute limits and durations, signed zero, zero and very large durations, wrapping start timestamps, tick completion, retargeting, fractional boundaries and nonfinite predicate/partial-tick inputs. Rust returns typed errors for parameters outside this supported domain. Border saved-data codecs, listeners, dirty-state events, damage, networking and live movement integration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped world-border parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_world_collision_check_parity.py b/tools/test_world_collision_check_parity.py new file mode 100644 index 000000000..d3b53f30d --- /dev/null +++ b/tools/test_world_collision_check_parity.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python3 +"""Compare short-circuit block/entity/border collision-free queries with pinned vanilla.""" +import collections +import json +import os +from pathlib import Path +import platform +import subprocess +import struct +import random +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(facts): + def bits(v):return struct.pack('>d',float(v)).hex() + def row(state,bounds=(-.3,0,.2,.3,1.8,.8),context=0,entities=(),border=None,fail=-1,blocks=None): + return dict(chunks=[[x,z] for x in [-1,0,1] for z in [-1,0,1]],blocks=blocks if blocks is not None else [[0,0,0,state]],context=context,y=bits(0),entities=[0,0],fail=fail,limit=100000,suffocating=False,box=list(map(bits,bounds)),movement=dict(check=True,delta=list(map(bits,[0,0,0])),step=bits(.6),grounded=True,entities=[list(map(bits,b)) for b in entities],border=None if border is None else list(map(bits,border)))) + for state in range(len(facts['states'])): + yield row(state,context=state%4) + yield row(state,bounds=(-.6,0,.2,-.2,1.8,.8),context=state%4,border=[-.5,-1,-1,-.4,3,1]) + defaults=facts['defaults'];names=['air','stone','water','lava','scaffolding','powder_snow','shulker_box','moving_piston','stone_slab','oak_stairs','snow','cobweb','bamboo'] + boxes=[[-.3,0,.2,.3,1.8,.8],[0,0,0,1,1,1],[0,0,0,0,0,0],[1,0,0,1.6,1.8,.6],[-16,-16,-16,-15,0,-15],[15.8,0,15.8,16.4,1.8,16.4]] + entity_lists=[[],[[0,0,0,0,0,0]],[[0,0,0,1,1,1]],[[100,100,100,101,101,101]]] + borders=[None,[-.5,-1,-1,-.4,3,1],[0,0,0,0,0,0],[100,100,100,101,101,101]] + for name in names: + for context in range(4): + for entities in entity_lists: + for border in borders: + for fail in [-1,0,1,3,12,25,50]:yield row(defaults['minecraft:'+name],context=context,entities=entities,border=border,fail=fail) + rng=random.Random(0x434c454152) + for _ in range(3000): + state=rng.randrange(len(facts['states']));f=row(state,bounds=rng.choice(boxes),context=rng.randrange(4),entities=rng.choice(entity_lists),border=rng.choice(borders),fail=rng.choice([-1,-1,0,3,12,50])) + f['entities']=[rng.randrange(3),rng.randrange(3)] + if rng.randrange(3)==0:f['chunks']=[];f['blocks']=[] + yield f + + +def main(): + lock, jars, libraries = base.verify_artifacts() + build = lab.LOCAL/'rust-world-collision-check-parity';build.mkdir(exist_ok=True) + report_path = build/'report.json';report_path.unlink(missing_ok=True) + oracle = lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java' + helpers = [oracle.with_name(name+'.java') for name in + ['VanillaHeightmapOracle', 'VanillaCollisionOracle', 'VanillaBlockStateCodecOracle', 'VanillaSuffocationOracle', 'VanillaFaceSupportOracle']] + sources = [oracle, *helpers, Path(__file__), lab.ROOT/'tools/test_rust_parity.py', + lab.ROOT/'tools/test_worldgen_parity.py', lab.ROOT/'tools/lab.py', + lab.ROOT/'Cargo.toml', lab.ROOT/'Cargo.lock', + lab.ROOT/'crates/horizon-world/examples/registry_collision_scan_fixture.rs'] + for crate in ['horizon-core', 'horizon-world']: + sources += [lab.ROOT/'crates'/crate/'Cargo.toml', + *sorted((lab.ROOT/'crates'/crate/'src').rglob('*.rs'))] + tested = base.source_hashes(sources) + tags = worldgen.tag_resources(jars['server']) + if tags != worldgen.tag_resources(jars['client']):raise AssertionError('Client/server block tags differ') + lab.write_json(build/'tags.json', tags) + classes = build/'classes';classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, libraries)) + def run(command, name): + with (build/(name+'.log')).open('w') as log: + subprocess.run(list(map(str, command)), cwd=lab.ROOT, check=True, timeout=3600, + stdout=log, stderr=subprocess.STDOUT) + run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-cp', + str(jars['server'])+os.pathsep+dependencies, '-d', classes, oracle, *helpers], 'compile-java') + def java(side, mode): + run(['java', '-Xmx768M', '-cp', os.pathsep.join([str(classes), str(jars[side]), dependencies]), + 'dev.horizonlab.parity.VanillaRegistryCollisionScanOracle', mode, build], side+'-'+mode) + java('server', 'export') + facts = json.loads((build/'facts.json').read_text()) + if len(facts['states']) != 35723:raise AssertionError('Incomplete pinned registry') + definitions = json.loads((build/'definitions.json').read_text()) + count = 0 + with (build/'inputs.txt').open('w') as output: + for fixture in corpus(facts): + output.write(json.dumps(fixture, separators=(',', ':'))+'\n');count += 1 + fixture_paths = [build/name for name in ['inputs.txt', 'facts.json', 'definitions.json', + 'block-registry.nbt', 'cached-collision.nbt', 'tags.json']] + fixtures = base.source_hashes(fixture_paths) + run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'registry_collision_scan_fixture'], 'compile-rust') + metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) + binary = Path(metadata['target_directory'])/'release/examples'/('registry_collision_scan_fixture.exe' if os.name=='nt' else 'registry_collision_scan_fixture') + run([binary, build], 'rust');references = [] + for side, jar in jars.items(): + java(side, side) + matched = base.compare(build/(side+'.txt'), build/'rust.txt') + references.append({'side':side, 'jar_sha256':lab.digest(jar, 'sha256'), + 'output_sha256':lab.digest(build/(side+'.txt'), 'sha256'), 'matched_output_lines':matched}) + print(f'{side}: {matched:,} world collision-check lines match', flush=True) + base.ensure_sources_unchanged(sources, tested);base.ensure_sources_unchanged(fixture_paths, fixtures) + report = {'schema':1, 'minecraft':lock['minecraft']['version'], 'manifest_sha1':lock['minecraft']['manifest_sha1'], + 'platform':platform.platform(), 'java':subprocess.check_output(['java', '--version'], text=True).splitlines()[0], + 'rustc':subprocess.check_output(['rustc', '--version'], text=True).strip(), + 'registry_states':len(facts['states']), 'block_definitions':len(definitions), + 'definition_counts':dict(collections.Counter(definitions.values())), + 'native_chunk_storage':'ProtoChunk', 'rust_chunk_storage':'TerrainChunk', 'fixtures':count, 'sources_sha256':tested, 'fixtures_sha256':fixtures, + 'rust_output_sha256':lab.digest(build/'rust.txt', 'sha256'), 'references':references, + 'scope':'Actual native CollisionGetter.noCollision for an entity executes lazy BlockCollisions over registered blocks and resident ProtoChunk sections, then entity list and applicable border shape checks. Rust uses the registry-bound TerrainChunk scan in the same short-circuit order. All registered states, controlled context variants, degenerate entity shapes, empty/disjoint borders, missing chunks, chunk/height boundaries and failures are compared. Entity list contents and border applicability/shapes are controlled; null-entity overloads, live entity indexing, experimental minecarts and player ledge behavior remain separate work.'} + lab.write_json(report_path, report);print(f'Scoped world collision-check parity passed: {report_path}', flush=True) + + +if __name__ == '__main__':main() diff --git a/tools/test_world_edge_backoff_parity.py b/tools/test_world_edge_backoff_parity.py new file mode 100644 index 000000000..eee2b8fb5 --- /dev/null +++ b/tools/test_world_edge_backoff_parity.py @@ -0,0 +1,106 @@ +#!/usr/bin/env python3 +"""Compare player ledge backoff through registered world collision probes with pinned vanilla.""" +import collections +import json +import os +from pathlib import Path +import platform +import subprocess +import struct +import random +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(facts): + def bits(v):return struct.pack('>d',float(v)).hex() + def row(state,delta=(.8,-.08,.8),step=.6,grounded=True,context=0,offset=0,fail=-1,extra=(),entities=(),border=None,fall=0,staying=True,flying=False,mover='SELF'): + blocks=[[offset,-1,0,state],*extra] + return dict(chunks=[[x,z] for x in range((offset>>4)-1,(offset>>4)+2) for z in [-1,0,1]],blocks=blocks,context=context,y=bits(0),entities=[0,0],fail=fail,limit=100000,suffocating=False,box=list(map(bits,[offset+.2,0,.2,offset+.8,1.8,.8])),movement=dict(delta=list(map(bits,delta)),step=bits(step),grounded=grounded,entities=[list(map(bits,b)) for b in entities],border=None if border is None else list(map(bits,border)),edge=dict(staying=staying,flying=flying,mover=mover,fall=bits(fall)))) + states=facts['states'];defaults=facts['defaults'] + for state in range(len(states)):yield row(state,context=state%4) + obstacles=[i for i,s in enumerate(states) if s['id'] in ['minecraft:oak_stairs','minecraft:stone_slab','minecraft:snow','minecraft:scaffolding','minecraft:powder_snow','minecraft:water','minecraft:shulker_box','minecraft:moving_piston','minecraft:piston','minecraft:soul_sand','minecraft:mud','minecraft:farmland','minecraft:bamboo','minecraft:pointed_dripstone']] + for state in obstacles: + for step in [0,.5,.6,1.0]: + for fall in [0,.2,.6,1.0]:yield row(state,step=step,grounded=False,fall=fall,context=state%4) + for mover in ['SELF','PLAYER','PISTON','SHULKER','SHULKER_BOX']: + for flying in [False,True]: + for staying in [False,True]: + for y in [-.08,0,.1]: + for fail in [-1,0,1,3,10,30,100]:yield row(defaults['minecraft:stone'],delta=(.8,y,.8),mover=mover,flying=flying,staying=staying,fail=fail) + rng=random.Random(0x574f524c44454447) + for index in range(2500): + offset=rng.choice([-16,0,15]);state=rng.choice(obstacles);delta=[rng.choice([-1,-.05,-0.0,0,.05,.5,.8,1]),rng.choice([-.5,-.08,0,.1]),rng.choice([-1,-.5,0,.5,.8,1])] + entities=[] if index%3 else [[offset+.2,-1,.2,offset+.8,0,.8]] + border=None if index%4 else [offset+1,-2,-2,offset+1.2,3,3] + extra=[] if index%2 else [[offset+1,-1,1,defaults['minecraft:stone']]] + f=row(state,delta,step=rng.choice([0,.5,.6,1]),grounded=bool(index%2),context=index%4,offset=offset,fail=rng.choice([-1,-1,0,3,15,50]),entities=entities,border=border,extra=extra,fall=rng.choice([0,.2,.6,1]));f['entities']=[rng.randrange(3),rng.randrange(3)];yield f + + +def main(): + lock, jars, libraries = base.verify_artifacts() + build = lab.LOCAL/'rust-world-edge-backoff-parity';build.mkdir(exist_ok=True) + report_path = build/'report.json';report_path.unlink(missing_ok=True) + oracle = lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java' + helpers = [oracle.with_name(name+'.java') for name in + ['VanillaHeightmapOracle', 'VanillaCollisionOracle', 'VanillaBlockStateCodecOracle', 'VanillaSuffocationOracle', 'VanillaFaceSupportOracle']] + sources = [oracle, *helpers, Path(__file__), lab.ROOT/'tools/test_rust_parity.py', + lab.ROOT/'tools/test_worldgen_parity.py', lab.ROOT/'tools/lab.py', + lab.ROOT/'Cargo.toml', lab.ROOT/'Cargo.lock', + lab.ROOT/'crates/horizon-world/examples/registry_collision_scan_fixture.rs'] + for crate in ['horizon-core', 'horizon-world']: + sources += [lab.ROOT/'crates'/crate/'Cargo.toml', + *sorted((lab.ROOT/'crates'/crate/'src').rglob('*.rs'))] + tested = base.source_hashes(sources) + tags = worldgen.tag_resources(jars['server']) + if tags != worldgen.tag_resources(jars['client']):raise AssertionError('Client/server block tags differ') + lab.write_json(build/'tags.json', tags) + classes = build/'classes';classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, libraries)) + def run(command, name): + with (build/(name+'.log')).open('w') as log: + subprocess.run(list(map(str, command)), cwd=lab.ROOT, check=True, timeout=3600, + stdout=log, stderr=subprocess.STDOUT) + run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-cp', + str(jars['server'])+os.pathsep+dependencies, '-d', classes, oracle, *helpers], 'compile-java') + def java(side, mode): + run(['java', '-Xmx768M', '-cp', os.pathsep.join([str(classes), str(jars[side]), dependencies]), + 'dev.horizonlab.parity.VanillaRegistryCollisionScanOracle', mode, build], side+'-'+mode) + java('server', 'export') + facts = json.loads((build/'facts.json').read_text()) + if len(facts['states']) != 35723:raise AssertionError('Incomplete pinned registry') + definitions = json.loads((build/'definitions.json').read_text()) + count = 0 + with (build/'inputs.txt').open('w') as output: + for fixture in corpus(facts): + output.write(json.dumps(fixture, separators=(',', ':'))+'\n');count += 1 + fixture_paths = [build/name for name in ['inputs.txt', 'facts.json', 'definitions.json', + 'block-registry.nbt', 'cached-collision.nbt', 'tags.json']] + fixtures = base.source_hashes(fixture_paths) + run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'registry_collision_scan_fixture'], 'compile-rust') + metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) + binary = Path(metadata['target_directory'])/'release/examples'/('registry_collision_scan_fixture.exe' if os.name=='nt' else 'registry_collision_scan_fixture') + run([binary, build], 'rust');references = [] + for side, jar in jars.items(): + java(side, side) + matched = base.compare(build/(side+'.txt'), build/'rust.txt') + references.append({'side':side, 'jar_sha256':lab.digest(jar, 'sha256'), + 'output_sha256':lab.digest(build/(side+'.txt'), 'sha256'), 'matched_output_lines':matched}) + print(f'{side}: {matched:,} world edge-backoff lines match', flush=True) + base.ensure_sources_unchanged(sources, tested);base.ensure_sources_unchanged(fixture_paths, fixtures) + report = {'schema':1, 'minecraft':lock['minecraft']['version'], 'manifest_sha1':lock['minecraft']['manifest_sha1'], + 'platform':platform.platform(), 'java':subprocess.check_output(['java', '--version'], text=True).splitlines()[0], + 'rustc':subprocess.check_output(['rustc', '--version'], text=True).strip(), + 'registry_states':len(facts['states']), 'block_definitions':len(definitions), + 'definition_counts':dict(collections.Counter(definitions.values())), + 'native_chunk_storage':'ProtoChunk', 'rust_chunk_storage':'TerrainChunk', 'fixtures':count, 'sources_sha256':tested, 'fixtures_sha256':fixtures, + 'rust_output_sha256':lab.digest(build/'rust.txt', 'sha256'), 'references':references, + 'scope':'Actual Player.maybeBackOffFromEdge issues native noCollision queries over registered block states in resident ProtoChunk storage. Rust combines edge-backoff guards/probe geometry with short-circuit entity-bearing no_world_collision and registry-bound TerrainChunk scanning. Every state is used as the supporting block; additional falling, step-height, chunk-edge, diagonal, partial/dynamic block, mover/flight/crouch and failing-provider cases are compared. Entity collider lists, border applicability/shapes and empty/position/placement contexts remain controlled inputs. This is registered-world ledge integration, not a complete Player.move/travel loop or full playable game.'} + lab.write_json(report_path, report);print(f'Scoped world edge backoff parity passed: {report_path}', flush=True) + + +if __name__ == '__main__':main() diff --git a/tools/test_world_movement_parity.py b/tools/test_world_movement_parity.py new file mode 100644 index 000000000..34a3aebeb --- /dev/null +++ b/tools/test_world_movement_parity.py @@ -0,0 +1,121 @@ +#!/usr/bin/env python3 +"""Compare world collision collection and entity step movement with pinned vanilla.""" +import collections +import json +import os +from pathlib import Path +import platform +import subprocess +import struct +import random +try: + from . import lab, test_rust_parity as base, test_worldgen_parity as worldgen +except ImportError: + import lab + import test_rust_parity as base + import test_worldgen_parity as worldgen + + +def corpus(facts): + def bits(v):return struct.pack('>d',float(v)).hex() + def row(state,delta=(1,-0.08,0),step=0.6,grounded=True,context=2,offset=0,fail=-1,extra=(),entities=(),border=None): + blocks=[[x+offset,-1,z,facts['defaults']['minecraft:stone']] for x in range(-2,4) for z in range(-2,3)] + blocks.append([offset,0,0,state]);blocks.extend(extra) + return dict(chunks=[[x,z] for x in range((offset>>4)-1,(offset>>4)+2) for z in range(-1,2)], + blocks=blocks,context=context,y=bits(0),entities=[0,0],fail=fail,limit=100000,suffocating=False, + box=list(map(bits,[-0.6+offset,0,0.2,-0.2+offset,1.8,0.8])), + movement=dict(delta=list(map(bits,delta)),step=bits(step),grounded=grounded, + entities=[list(map(bits,b)) for b in entities],border=None if border is None else list(map(bits,border)))) + states=facts['states'] + for state in range(len(states)): + yield row(state,context=state%4) + defaults=facts['defaults'] + obstacles=[i for i,s in enumerate(states) if s['id'] in ['minecraft:oak_stairs','minecraft:stone_slab', + 'minecraft:snow','minecraft:scaffolding','minecraft:powder_snow','minecraft:water', + 'minecraft:shulker_box','minecraft:moving_piston','minecraft:piston','minecraft:soul_sand', + 'minecraft:mud','minecraft:farmland','minecraft:bamboo','minecraft:pointed_dripstone']] + for state in obstacles: + for step in [0,0.5,0.6,1.0,1.5]: + for dy in [0,-0.08,-0.5,0.25]: + yield row(state,delta=(1,dy,0),step=step) + for delta in [(0,0,0),(-0.0,-0.0,-0.0),(1e-200,0,0),(1e-8,-1e-8,0),(1,0,0),(0,0,1),(1,-0.08,1)]: + for state in [defaults['minecraft:stone_slab'],defaults['minecraft:oak_stairs']]: + for fail in [-1,0,1,2,3,8,50,100,150,250]:yield row(state,delta=delta,fail=fail) + rng=random.Random(0x4d4f56454d454e54) + for index in range(5000): + offset=rng.choice([-16,0,15]);state=rng.choice(obstacles) + delta=[rng.choice([-1.25,-0.5,0,0.5,1.0,1.8]),rng.choice([-0.75,-0.08,0,0.25]),rng.choice([-1.0,-0.2,0,0.2,1.0])] + entities=[] + for _ in range(rng.randrange(4)): + x=offset+rng.uniform(-1,2);z=rng.uniform(-1,2);y=rng.choice([-1,0,0.5,1.0,2.0]);entities.append([x,y,z,x+0.6,y+rng.choice([0.5,1.0,1.8]),z+0.6]) + border=[offset+0.8,-2,-2,offset+1.2,4,3] if index%4==0 else None + extra=[[offset,2,0,defaults['minecraft:stone']]] if index%3==0 else [] + f=row(state,delta,step=rng.choice([0,0.5,0.6,1.0,1.5]),grounded=bool(index%2),context=index%4, + offset=offset,fail=rng.choice([-1,-1,-1,0,1,2,3,8,50,100,150,250]),extra=extra,entities=entities,border=border) + f['entities']=[rng.randrange(3),rng.randrange(3)] + yield f + + +def main(): + lock, jars, libraries = base.verify_artifacts() + build = lab.LOCAL/'rust-world-movement-parity';build.mkdir(exist_ok=True) + report_path = build/'report.json';report_path.unlink(missing_ok=True) + oracle = lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaRegistryCollisionScanOracle.java' + helpers = [oracle.with_name(name+'.java') for name in + ['VanillaHeightmapOracle', 'VanillaCollisionOracle', 'VanillaBlockStateCodecOracle', 'VanillaSuffocationOracle', 'VanillaFaceSupportOracle']] + sources = [oracle, *helpers, Path(__file__), lab.ROOT/'tools/test_rust_parity.py', + lab.ROOT/'tools/test_worldgen_parity.py', lab.ROOT/'tools/lab.py', + lab.ROOT/'Cargo.toml', lab.ROOT/'Cargo.lock', + lab.ROOT/'crates/horizon-world/examples/registry_collision_scan_fixture.rs'] + for crate in ['horizon-core', 'horizon-world']: + sources += [lab.ROOT/'crates'/crate/'Cargo.toml', + *sorted((lab.ROOT/'crates'/crate/'src').rglob('*.rs'))] + tested = base.source_hashes(sources) + tags = worldgen.tag_resources(jars['server']) + if tags != worldgen.tag_resources(jars['client']):raise AssertionError('Client/server block tags differ') + lab.write_json(build/'tags.json', tags) + classes = build/'classes';classes.mkdir(exist_ok=True) + dependencies = os.pathsep.join(map(str, libraries)) + def run(command, name): + with (build/(name+'.log')).open('w') as log: + subprocess.run(list(map(str, command)), cwd=lab.ROOT, check=True, timeout=3600, + stdout=log, stderr=subprocess.STDOUT) + run(['javac', '--release', lock['minecraft']['java_major'], '-proc:none', '-cp', + str(jars['server'])+os.pathsep+dependencies, '-d', classes, oracle, *helpers], 'compile-java') + def java(side, mode): + run(['java', '-Xmx768M', '-cp', os.pathsep.join([str(classes), str(jars[side]), dependencies]), + 'dev.horizonlab.parity.VanillaRegistryCollisionScanOracle', mode, build], side+'-'+mode) + java('server', 'export') + facts = json.loads((build/'facts.json').read_text()) + if len(facts['states']) != 35723:raise AssertionError('Incomplete pinned registry') + definitions = json.loads((build/'definitions.json').read_text()) + count = 0 + with (build/'inputs.txt').open('w') as output: + for fixture in corpus(facts): + output.write(json.dumps(fixture, separators=(',', ':'))+'\n');count += 1 + fixture_paths = [build/name for name in ['inputs.txt', 'facts.json', 'definitions.json', + 'block-registry.nbt', 'cached-collision.nbt', 'tags.json']] + fixtures = base.source_hashes(fixture_paths) + run(['cargo', 'build', '--locked', '--release', '-p', 'horizon-world', '--example', 'registry_collision_scan_fixture'], 'compile-rust') + metadata = json.loads(subprocess.check_output(['cargo', 'metadata', '--locked', '--no-deps', '--format-version', '1'], cwd=lab.ROOT)) + binary = Path(metadata['target_directory'])/'release/examples'/('registry_collision_scan_fixture.exe' if os.name=='nt' else 'registry_collision_scan_fixture') + run([binary, build], 'rust');references = [] + for side, jar in jars.items(): + java(side, side) + matched = base.compare(build/(side+'.txt'), build/'rust.txt') + references.append({'side':side, 'jar_sha256':lab.digest(jar, 'sha256'), + 'output_sha256':lab.digest(build/(side+'.txt'), 'sha256'), 'matched_output_lines':matched}) + print(f'{side}: {matched:,} world movement lines match', flush=True) + base.ensure_sources_unchanged(sources, tested);base.ensure_sources_unchanged(fixture_paths, fixtures) + report = {'schema':1, 'minecraft':lock['minecraft']['version'], 'manifest_sha1':lock['minecraft']['manifest_sha1'], + 'platform':platform.platform(), 'java':subprocess.check_output(['java', '--version'], text=True).splitlines()[0], + 'rustc':subprocess.check_output(['rustc', '--version'], text=True).strip(), + 'registry_states':len(facts['states']), 'block_definitions':len(definitions), + 'definition_counts':dict(collections.Counter(definitions.values())), + 'native_chunk_storage':'ProtoChunk', 'rust_chunk_storage':'TerrainChunk', 'fixtures':count, 'sources_sha256':tested, 'fixtures_sha256':fixtures, + 'rust_output_sha256':lab.digest(build/'rust.txt', 'sha256'), 'references':references, + 'scope':'Actual native Entity.collide executes initial collision and step-up decisions over BlockCollisions, registered block shapes and resident ProtoChunk sections. Rust combines owned/fallible step resolution with registry-bound TerrainChunk scanning. All registered states are used as obstacles, plus step heights, falling/grounded motion, zero and underflow motion, partial blocks, fluids, dynamic blocks, ceilings, chunk boundaries and query failures. Entity collider lists and world-border proximity/shape are controlled inputs; query order and reuse, shape collection and resulting displacement are compared. Contexts are deliberately supplied empty/position/placement snapshots in both worlds. This does not establish entity broad-phase selection, actual world-border proximity, travel/gravity/velocity or grounded side effects, experimental minecarts or a playable game.'} + lab.write_json(report_path, report);print(f'Scoped world movement parity passed: {report_path}', flush=True) + + +if __name__ == '__main__':main() diff --git a/tools/test_world_parity.py b/tools/test_world_parity.py new file mode 100644 index 000000000..9f4bb5d52 --- /dev/null +++ b/tools/test_world_parity.py @@ -0,0 +1,112 @@ +#!/usr/bin/env python3 +"""Exercise Rust NBT, palette, registry and region I/O with pinned vanilla bytecode.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import tempfile + +try: + from . import lab, test_rust_parity +except ImportError: + import lab + import test_rust_parity + + +def run(command, log=None): + result = subprocess.run(list(map(str, command)), cwd=lab.ROOT, capture_output=True, text=True, timeout=300) + if log: + log.write_text(result.stdout + result.stderr, encoding="utf-8") + if result.returncode: + raise RuntimeError(f"Command failed ({result.returncode}): {command[0]}\n{result.stdout[-3000:]}\n{result.stderr[-3000:]}") + return result.stdout + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--prepare", action="store_true") + args = parser.parse_args() + directory = lab.LOCAL / "rust-world-parity" + directory.mkdir(parents=True, exist_ok=True) + report_path = directory / "report.json" + report_path.unlink(missing_ok=True) + if args.prepare: + lab.prepare() + lock, jars, libraries = test_rust_parity.verify_artifacts() + base = Path(tempfile.mkdtemp(prefix="run-", dir=directory)) + classes = base / "classes" + classes.mkdir() + oracle = lab.ROOT / "mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldOracle.java" + sources = [oracle, Path(__file__).resolve(), lab.ROOT / "tools/test_rust_parity.py", lab.ROOT / "Cargo.toml", lab.ROOT / "Cargo.lock", lab.ROOT / "crates/horizon-world/Cargo.toml", + *sorted((lab.ROOT / "crates/horizon-world").rglob("*.rs")), *sorted((lab.ROOT / "crates/horizon-core/src").rglob("*.rs"))] + tested_sources = test_rust_parity.source_hashes(sources) + dependency_path = os.pathsep.join(map(str, libraries)) + run(["javac", "--release", "25", "-proc:none", "-cp", os.pathsep.join([str(jars["server"]), dependency_path]), "-d", classes, oracle], base / "compile-java.log") + + def java(side, mode): + return run(["java", "-Xmx1G", "-cp", os.pathsep.join([str(classes), str(jars[side]), dependency_path]), + "dev.horizonlab.parity.VanillaWorldOracle", mode, base], base / f"{side}-{mode}.log") + + print("Generating vanilla world-data fixtures...", flush=True) + print(java("server", "generate").split("HORIZON_WORLD_GENERATED")[-1].strip(), flush=True) + run(["cargo", "build", "--release", "-p", "horizon-world", "--bin", "horizon-world", "--example", "world_fixture"], base / "compile-rust.log") + metadata = json.loads(run(["cargo", "metadata", "--no-deps", "--format-version", "1"])) + target = Path(metadata["target_directory"]) / "release" + suffix = ".exe" if os.name == "nt" else "" + binary = target / ("horizon-world" + suffix) + run([target / "examples" / ("world_fixture" + suffix), base], base / "rust-fixture.log") + for network in [False, True]: + kind = "network" if network else "nbt" + output = base / "rust" / kind + output.mkdir(parents=True) + for source in range(1, 5): + for destination in range(1, 5): + run([binary, "nbt-network-copy" if network else "nbt-copy", base / kind / f"{source}.bin", + output / f"{source}-{destination}.bin", source, destination]) + for source in range(1, 5): + original = base / "regions" / str(source) / "r.-1.0.mca" + for variant in ["copy", "1", "2", "3", "4"]: + output = base / "rust/regions" / f"{source}-{variant}" / original.name + command = [binary, "copy-region", original, output] + if variant != "copy": + command.append(variant) + run(command) + output = base / "rust/regions" / f"{source}-edited" / original.name + run([binary, "edit-block-data", original, output, -512, -64, 0, "minecraft:stone"]) + actual = run([binary, "get-block", output, -512, -64, 0]).strip() + if actual != "minecraft:stone": + raise AssertionError(f"CLI returned unexpected edited block: {actual}") + # A second export must fail without changing the existing output. + before = lab.digest(output, "sha256") + attempt = subprocess.run([str(binary), "copy-region", str(original), str(output)], capture_output=True, timeout=30) + if attempt.returncode == 0 or lab.digest(output, "sha256") != before: + raise AssertionError("Existing region output was not protected") + references = [] + for side in ["server", "client"]: + print(f"Checking Rust-written world data in vanilla {side}...", flush=True) + output = java(side, "verify") + marker = "HORIZON_WORLD_RESULT " + results = [json.loads(line.split(marker, 1)[1]) for line in output.splitlines() if marker in line] + expected = {"nbt_pairs": 32, "palettes": 44, "palette_values": 123776, + "region_chunks": 48, "registry_states": 35723, "resident_values": 8192} + if len(results) != 1 or any(results[0].get(key) != value for key, value in expected.items()): + raise AssertionError(f"Incomplete world fixture: {results}") + references.append({"side": side, "jar_sha256": lab.digest(jars[side], "sha256"), **results[0]}) + print(json.dumps(references[-1]), flush=True) + test_rust_parity.ensure_sources_unchanged(sources, tested_sources) + report = {"schema": 1, "minecraft": lock["minecraft"]["version"], "data_version": 5023, + "platform": platform.platform(), "java": run(["java", "--version"]).splitlines()[0], + "rustc": run(["rustc", "--version"]).strip(), "references": references, + "sources_sha256": tested_sources, + "notes": ["Synthetic NBT and region fixtures serialized and verified by pinned vanilla classes.", + "Includes all four region codecs, external oversized chunks, UTF-16 edge cases, mixed lists, palette mutation, and the full exported block-state ID registry.", + "Storage-only edits; no world generation, simulation, lighting, live multiplayer, renderer, FPS or whole-game parity claim."]} + lab.write_json(report_path, report) + lab.write_json(base / "report.json", report) + print(f"World-data interoperability passed: {report_path}") + + +if __name__ == "__main__": + main() diff --git a/tools/test_world_ray_parity.py b/tools/test_world_ray_parity.py new file mode 100644 index 000000000..9168b4674 --- /dev/null +++ b/tools/test_world_ray_parity.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python3 +"""Compare world ray clipping, interaction faces and fall-reset selection with vanilla.""" +import argparse +import json +import os +from pathlib import Path +import platform +import subprocess +import random +import struct +import math +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + import itertools + def bits(v):return struct.pack('>d',float(v)).hex() + def shape(boxes):return [[bits(v) for v in b] for b in boxes] + def state(**kw): + f=dict(collider=[],outline=[],visual=[],interaction=[],fluid_shape=[],reset=False,gateway=False,end=False,nether=False,source=False,empty=True,water=False);f.update(kw);return f + full=shape([[0,0,0,1,1,1]]) + def row(s=None,**kw): + f=dict(states=[state(),s or state(collider=full,outline=full,visual=full)],cells={'0 0 0':1},block_mode=0,fluid_mode=0,entity=False,player=False,server=False,delay=80,fail=-1,**{'from':list(map(bits,[-2,.5,.5])),'to':list(map(bits,[2,.5,.5]))});f.update(kw);return f + shapes=[[],full,shape([[0,0,0,1,.5,1]]),shape([[.5,0,0,1,1,1]]),shape([[0,.25,0,1,.75,1]]),shape([[0,0,0,.25,1,1],[.75,0,0,1,1,1]]),shape([[-.5,-.5,-.5,1.5,1.5,1.5]]),shape([[0,0,0,0,0,0]])] + rays=[([-2,.5,.5],[2,.5,.5]),([.5,2,.5],[.5,-2,.5]),([.5,.5,.5],[2,2,2]),([-1,-1,-1],[2,2,2]),([0,0,0],[0,0,0]),([-0.,0,0],[0,0,0]),([1,.5,.5],[0,.5,.5]),([.5,.5,.5],[.5+1e-8,.5,.5]),([.5,.5,.5],[.5+.001,.5,.5]),([2,2,2],[3,3,3])] + for block,fluid,interaction,mode,fluid_mode in itertools.product(shapes,shapes,shapes[:5],range(3),range(4)): + ray=rays[(mode+fluid_mode)%len(rays)] + yield row(state(collider=block,outline=block,visual=block,interaction=interaction,fluid_shape=fluid,source=True,empty=False,water=True),block_mode=mode,fluid_mode=fluid_mode,**{'from':list(map(bits,ray[0])),'to':list(map(bits,ray[1]))}) + for flags,entity,player,server,delay,fluid_mode in itertools.product(range(16),[False,True],[False,True],[False,True],[-1,0,1,80],range(4)): + yield row(state(reset=bool(flags&1),gateway=bool(flags&2),end=bool(flags&4),nether=bool(flags&8),interaction=full,fluid_shape=full,source=True,empty=False,water=True),block_mode=3,fluid_mode=fluid_mode,entity=entity,player=player,server=server,delay=delay) + for ray,mask,mode in itertools.product(rays,range(8),range(4)): + yield row(state(collider=full,outline=shapes[2],visual=shapes[3],interaction=shapes[4],fluid_shape=full,source=bool(mask&1),empty=bool(mask&2),water=bool(mask&4)),fluid_mode=mode,**{'from':list(map(bits,ray[0])),'to':list(map(bits,ray[1]))}) + for mode,fluid_mode,fail in itertools.product(range(4),range(4),range(-1,42)): + yield row(state(collider=full,outline=full,visual=full,interaction=full,fluid_shape=full,nether=True,source=True,empty=False,water=True),block_mode=mode,fluid_mode=fluid_mode,fail=fail,entity=True,player=True,server=True,delay=0) + rng=random.Random(0x524159434c4950) + for _ in range(7000): + sh=[rng.choice(shapes) for _ in range(5)];p=[rng.choice([-2,-1,-0.,0.,.25,.5,1.,2.,3.]) for _ in range(3)];q=[rng.choice([-2,-1,-0.,0.,.25,.5,1.,2.,3.]) for _ in range(3)] + yield row(state(collider=sh[0],outline=sh[1],visual=sh[2],interaction=sh[3],fluid_shape=sh[4],reset=bool(rng.randrange(2)),gateway=bool(rng.randrange(2)),end=bool(rng.randrange(2)),nether=bool(rng.randrange(2)),source=bool(rng.randrange(2)),empty=bool(rng.randrange(2)),water=bool(rng.randrange(2))),block_mode=rng.randrange(4),fluid_mode=rng.randrange(4),entity=bool(rng.randrange(2)),player=bool(rng.randrange(2)),server=bool(rng.randrange(2)),delay=rng.choice([-1,0,1,80]),cells={rng.choice(['0 0 0','-1 -1 -1','1 1 1']):1 for _ in range(3)},fail=rng.randrange(-1,30),**{'from':list(map(bits,p)),'to':list(map(bits,q))}) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-world-ray-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldRayOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/world_ray_fixture.rs'] + tested_sources=base.source_hashes(sources) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + def java(side,mode,path): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jars[side]),dependency_path]),'dev.horizonlab.parity.VanillaWorldRayOracle',mode,path],side+'-'+mode) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(value,separators=(',',':'))+'\n' for value in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + run(['cargo','build','--release','-p','horizon-world','--example','world_ray_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('world_ray_fixture.exe' if os.name=='nt' else 'world_ray_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + java(side,side,build);reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} world-ray output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual BlockGetter.clip, clipWithInteractionOverride and native ClipContext block/fluid selection. Covers collision/outline/visual/fall-reset modes, none/source/any/water fluid modes, nearest-hit ties, face-only interaction overrides, inside hits, misses, zero/signed-zero/tiny rays, ordered block/fluid reads and provider failures. Fall-reset tests include block tag, entity type identity, end gateways/portals and server nether-portal delay with lazy rule queries. Shapes and state predicates are controlled providers; registered outline/visual/interaction shapes, live world binding and gameplay integration remain separate work. Nonfinite rays and exhausted visit budgets return explicit Rust errors rather than fabricated misses.'} + lab.write_json(report_path,report);print(f'Scoped world ray parity passed: {report_path}') + + +if __name__=='__main__':main() diff --git a/tools/test_worldgen_parity.py b/tools/test_worldgen_parity.py new file mode 100644 index 000000000..134a9cec8 --- /dev/null +++ b/tools/test_worldgen_parity.py @@ -0,0 +1,394 @@ +#!/usr/bin/env python3 +"""Compare world-generation JSON decoding with the pinned vanilla codecs.""" +import argparse +import hashlib +import json +import os +from pathlib import Path +from collections import Counter +import platform +import random +import subprocess +import zipfile + +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(resources): + rng = random.Random(0x484f52495a4f4e4a534f4e) + seeds = [0,1,-1,-2**63,2**63-1,0x123456789abcdef] + for text in resources.values(): + compact = " ".join(text.splitlines()) + for seed in seeds: + for legacy,nether in [(0,0),(1,0),(0,1),(1,1)]: + yield f"noise {seed} {legacy} {nether} {compact}" + fields = { + "base_octave": ["-33","-32","0","32","33","4294967295","4294967296","-4294967297.9","1.9999999999999999999","12e1","123e-1","-123e-3","123e99","null","true",'"-7"'], + "octave_count": ["0","1","32","33","-1","null","false","1.9999999999999999999","4294967297"], + "base_amplitude": ["0","0.000009999999747378751","0.000009999999747378752","1","1000000","1000000.0000000001","null","true"], + "normalize": ["true","false",'"legacy"',"0","1","0.5","4294967296","null",'"true"','"LEGACY"',"{}"], + "amplitude_modifiers": ["[]","[0]","[-0]","[-0.0]","[1]","[1000000]","[1000001]","[-1]","[null]","null","[1,2]","{}"], + } + for name,values in fields.items(): + for value in values: + text = '{"base_octave":-7,"'+name+'":'+value+'}' if name != "base_octave" else '{"base_octave":'+value+'}' + yield f"noise 0 0 0 {text}" + for text in ['{}','[]','null','42','true','{"base_octave":-7,"unknown":{}}','{"base_octave":-7,"base_octave":-8}']: + yield f"noise 0 0 0 {text}" + for scenario in range(512): + count = 1 + scenario % 8 + parameters = {"base_octave":rng.randrange(-16,1),"octave_count":count} + if scenario % 3: + parameters["base_amplitude"] = rng.choice([.00001,.125,1.,1e6,rng.uniform(.00001,1e6)]) + if scenario % 4: + parameters["normalize"] = [True,False,"legacy"][scenario % 3] + if scenario % 5: + parameters["amplitude_modifiers"] = [rng.choice([0.,.125,1.,1e6,rng.uniform(0,1e6)]) for _ in range(count)] + yield f"noise {rng.randrange(-2**63,2**63)} {(scenario//2)%2} {scenario%2} "+json.dumps(parameters,separators=(",",":")) + + +def registry_resources(jar, kind): + prefix = f"data/minecraft/worldgen/{kind}/" + with zipfile.ZipFile(jar) as archive: + return {name:archive.read(name).decode("utf-8") for name in sorted(archive.namelist()) if name.startswith(prefix) and name.endswith(".json")} + + +def tag_resources(jar): + prefix="data/minecraft/tags/block/" + with zipfile.ZipFile(jar) as archive: + return {"minecraft:"+name[len(prefix):-5]:archive.read(name).decode("utf-8") for name in sorted(archive.namelist()) if name.startswith(prefix) and name.endswith(".json")} + + +def tag_corpus(resources): + entry_values=['"stone"','"#leaves"','""','"#"','":stone"','"minecraft:"','"Minecraft:stone"','"STONE"','"a:b:c"','"a/b:stone"','"#minecraft:leaves"','"##leaves"','42','true','null','[]','{}','{"id":"stone"}','{"id":"#leaves","required":false}','{"id":"stone","required":null}','{"id":null}','{"required":true}'] + for value in entry_values:yield "tag_entry "+value + for required in ['true','false','null','0','1','0.5','4294967296','"true"','{}','[]']: + yield 'tag_entry {"id":"stone","required":'+required+'}' + for text in resources.values():yield "tag_file "+" ".join(text.splitlines()) + for value in entry_values:yield 'tag_file {"values":['+value+']}' + for value in ['true','false','null','0','1','"false"','{}']: + yield 'tag_file {"values":[],"replace":'+value+'}' + for text in ['{}','[]','null','{"values":null}','{"values":true}','{"values":[],"replace":true,"replace":false}']: + yield 'tag_file '+text + def command(files,elements):return "tags "+json.dumps({"files":files,"elements":elements},separators=(",",":")) + def file(name,values,replace=False):return [name,"fixture",json.dumps({"values":values,"replace":replace},separators=(",",":"))] + elements={"minecraft:a":"a","minecraft:b":"b","minecraft:c":"c","minecraft:alias":"a"} + yield command([file("first",["b","a","b","alias"]),file("second",["#first","c","a"])],elements) + yield command([file("a",["a","b"]),file("a",["c"],True),file("a",["a"]),file("empty",[])],elements) + yield command([["a","broken","{}"],file("a",["a"]),["a","broken","{\"replace\":true,\"values\":[true]}"],["empty","broken","null"]],elements) + yield command([file("a",["missing","a"]),file("b",["#a","b"]),file("c",[{"id":"#a","required":False},"c"])],elements) + for mandatory in [True,False]: + yield command([file("a",[{"id":"#b","required":mandatory},"a"]),file("b",[{"id":"#a","required":mandatory},"b"])],elements) + # Required dependencies are processed globally before optional ones. + yield command([file("a",[{"id":"#b","required":False},"a"]),file("b",["#a","b"])],elements) + # Canonicalize unordered missing-tag output by full string, not Identifier's + # path-first comparator; lookup/dependency iteration remains observable. + yield command([file("z:first",["missing"]),file("a:last",["#z:first"]),file("example:child",[{"id":"#z:first","required":False},"a"])],elements) + rng=random.Random(0x484f52495a4f4e54414753) + for scenario in range(192): + count=1+scenario%48;files=[] + for i in range(count): + values=[] + for j in range(rng.randrange(9)): + if i and j%3==0: + # Later dependency names make arbitrary cycles possible. + child=rng.randrange(count) if scenario%4==0 else rng.randrange(i) + if child==i:child=(child+1)%count + values.append({"id":f"#tag_{child}","required":j%2==0}) + else:values.append({"id":rng.choice(["a","b","c","alias","missing"]),"required":j%3!=0}) + files.append(file(f"tag_{i}",values)) + if i%11==0:files.append(file(f"tag_{i}",["c"],scenario%3==0)) + yield command(files,elements) + + +def noise_resources(jar): + return registry_resources(jar,"noise") + + +def climate_corpus(): + rng = random.Random(0x484f52495a4f4e434c494d) + edges = [0,0x80000000,1,0x80000001,0x007fffff,0x00800000, + 0x3f800000,0xbf800000,0x38d1b717,0xb8d1b717, + 0x58612e12,0xd8612e12,0x7f7fffff,0xff7fffff, + 0x7f800000,0xff800000,0x7f800001,0xff800001,0x7fc00000,0xffc00000] + longs = [0,1,-1,-2**63,2**63-1,-10000,10000,16777217,-16777217] + for scenario in range(len(edges)+4096): + values = [edges[(scenario+i)%len(edges)] for i in range(6)] if scenario < len(edges) else [rng.getrandbits(32) for _ in range(6)] + value = longs[scenario%len(longs)] if scenario < len(edges) else rng.randrange(-2**63,2**63) + yield "quantize "+" ".join(f"{value:08x}" for value in values)+f" {value}" + + +def climate_codec_corpus(): + values = ["-2.0000002","-2","-0.0001","-0","0","0.0001","1","2","2.0000001","2.0000001192092895507812500000000001","2.0000002","1e100","null","true",'"1"',"[]","[0]","[0,0,0]","[-2,2]","[1,-1]","[-0,0]","[0,-0]",'{"min":-2,"max":2}','{"min":0}', '{"min":0,"max":0,"ignored":1}'] + for value in values: + yield "climate_parameter "+value + fields = ["temperature","humidity","continentalness","erosion","depth","weirdness","offset"] + for field in fields: + for value in values: + yield "climate_point {"+",".join('"'+name+'":'+(value if field == name else "0") for name in fields)+"}" + yield "climate_point {"+",".join('"'+name+'":0' for name in fields if field != name)+"}" + yield 'climate_point {"temperature":0,"humidity":0,"continentalness":0,"erosion":0,"depth":0,"weirdness":0,"offset":0,"offset":1}' + + +def settings_corpus(resources): + for text in resources.values(): + # The noise member contains integers in bundled resources. Keep all + # synthetic numeric tokens below raw for Gson integer conversion cases. + yield "noise_settings "+json.dumps(json.loads(text)["noise"],separators=(",",":")) + minima = [-2**31,-2033,-2032,-2031,-65,-64,-16,-1,0,1,16,2031,2032,2**31-1] + heights = [-2**31,-16,-1,0,1,15,16,128,384,4063,4064,4065,2**31-1] + for minimum in minima: + for height in heights: + yield f'noise_settings {{"min_y":{minimum},"height":{height}}}' + yield f"settings_create {minimum} {height}" + for field in ["min_y","height"]: + for value in ["null","true",'"16"',"4294967296","4294967312","-4294967312.999999999999","15.9999999999999999999","16.9999999999999999999","16e0","16e-1","16e99"]: + yield 'noise_settings {"'+field+'":'+value+','+('"height":16' if field == "min_y" else '"min_y":0')+'}' + for text in ['{}','[]','null','{"min_y":0}','{"height":0}','{"min_y":0,"height":16,"height":32,"ignored":0}']: + yield "noise_settings "+text + + +def aquifer_corpus(): + rng = random.Random(0x484f52495a4f4e464c554944) + bits = [0,0x8000000000000000,1,0x8000000000000001,0x3ff0000000000000,0xbff0000000000000,0x7fefffffffffffff,0xffefffffffffffff,0x7ff0000000000000,0xfff0000000000000,0x7ff0000000000001,0xfff8000000000000] + for sea in [-2**31,-64,-54,0,63,2**31-1]: + for fluid in range(5): + for y in [-2**31,-4065,-4064,-65,-64,-55,-54,-53,-1,0,62,63,64,2**31-1]: + for value in bits: + yield f"aquifer {sea} {fluid} 0 {y} 0 {value:016x}" + for _ in range(4096): + sea,x,y,z = [rng.randrange(-2**31,2**31) for _ in range(4)] + yield f"aquifer {sea} {rng.randrange(5)} {x} {y} {z} {rng.getrandbits(64):016x}" + + +def noise_aquifer_corpus(bundle, resources): + """Stateful original transport, with vanilla samplers and fault injection.""" + rng = random.Random(0x484f52495a4f4e41515549) + density_bits = ["0000000000000000","8000000000000000","bff0000000000000","bfb999999999999a","0000000000000001","8000000000000001","7ff0000000000000","fff0000000000000","7ff0000000000001","fff8000000000000"] + def emit(seed, legacy, setting, fixture): + return f"noise_aquifer {seed} {legacy} {bundle} {setting} "+json.dumps(fixture,separators=(",",":")) + def fixture(minimum, sizes=(16,128,16), steps=(1,1,1), count=128): + queries=[] + for i in range(count): + # Exercise strided volume extents, not just density lattice samples. + p=[minimum[a]+rng.randrange(sizes[a]*steps[a]) for a in range(3)] + queries.append([*p,density_bits[i%len(density_bits)]]) + queries += queries[:16] + list(reversed(queries[:16])) + return {"sizes":sizes,"minimum":minimum,"steps":steps,"sea":63,"fluid":0,"queries":queries} + for setting in sorted(resources): + for seed in [0,1,-1,-2**63,2**63-1,0x123456789abcdef]: + for legacy in [0,1]: + f=fixture([-16,-64,32]) + yield emit(seed,legacy,setting,f) + def gradient(axis, low, high, start, end): + return {"type":"gradient","axis":axis,"from_coordinate":low,"to_coordinate":high,"from_value":start,"to_value":end} + base={"barrier":0,"fluid_level_floodedness":gradient("x",-96,96,-1,1),"fluid_level_spread":gradient("y",-4,4,-1,1),"lava":gradient("z",-4,4,-1,1),"exclusion":0,"surface_level":96} + origins=[[0,-64,0],[-16,-80,32],[33554416,-64,-33554432],[2147483600,-64,-2147483600]] + float_bits=["00000000","80000000","00000001","80000001","3f800000","bf800000","3f19999a","3f4ccccd","7f800000","ff800000","7fc00000","7f800001","7f7fffff","ff7fffff"] + for scenario in range(160): + f=fixture(origins[scenario%len(origins)],count=192) + config=dict(base) + if scenario%5==0: config["fluid_level_floodedness"]=[-1,0,.4,.6,.8,1][scenario%6] + if scenario%7==0: config["surface_level"]=[-96,-64,-20,0,64,96,256][scenario%7] + if scenario%9==0: config["exclusion"]=1 + f["config"]=json.dumps(config,separators=(",",":")) + f["sea"]=[-2**31,-64,-54,-10,0,63,2**31-1][scenario%7] + f["fluid"]=scenario%8 + if scenario%3==0: + f["overrides"]=[None]*6 + f["overrides"][(scenario//3)%6]=float_bits[(scenario//3)%len(float_bits)] + if scenario%11==0: + f["steps"]=[4,2,4]; f["sizes"]=[4,64,4] + if scenario%13==0: + # Preserve the scheduling flag after a failed array access. + f["queries"] += [[f["minimum"][0]+512,0,f["minimum"][2],"bff0000000000000"]] + yield emit(rng.randrange(-2**63,2**63),scenario%2,"minecraft:overworld",f) + for field in range(6): + for value in float_bits: + f=fixture([0,-54,0],sizes=(16,64,16),count=128) + config=dict(base);config["fluid_level_floodedness"]=.6 + config["fluid_level_spread"]=gradient("x",-4,4,-1,1) + f["config"]=json.dumps(config,separators=(",",":")) + f["overrides"]=[None]*6;f["overrides"][field]=value + yield emit(0,field%2,"minecraft:overworld",f) + # Fail once at each binding's first/second evaluation, then retry the same + # ordered queries. This also exercises constructor surface-volume failure. + for field in range(6): + for occurrence in [1,2,8]: + f=fixture([0,-54,0],sizes=(16,64,16),count=0) + config=dict(base);config["fluid_level_floodedness"]=.6 + config["fluid_level_spread"]=gradient("x",-4,4,-1,1) + f["config"]=json.dumps(config,separators=(",",":"));f["fail"]=[field,occurrence] + f["queries"]=[[x,y,z,"bfb999999999999a"] for x in range(16) for y in [-40,-30,-20,-10,0] for z in [0,7,15]] + if field==0: + f["sizes"]=[32,96,32] + f["queries"]=[[x,y,z,"bfb999999999999a"] for x in range(32) for y in [-40,-30,-20,-10,0,10,20,30] for z in range(0,32,3)] + f["queries"] += f["queries"][:64] + yield emit(0,field%2,"minecraft:overworld",f) + # Required-field codecs and malformed roots are validated before binding. + configs=["null","[]","{}"] + for field in base: + for value in [None,True,{},"minecraft:missing"]: + config=dict(base);config[field]=value;configs.append(json.dumps(config,separators=(",",":"))) + config=dict(base);del config[field];configs.append(json.dumps(config,separators=(",",":"))) + for config in configs: + f=fixture([0,-64,0],count=0);f["config"]=config + yield emit(0,0,"minecraft:overworld",f) + + +def index_corpus(): + rng = random.Random(0x484f52495a4f4e54524545) + def command(branching, entries, targets): + return f"index {branching} "+json.dumps({"entries":entries,"targets":targets},separators=(",",":")) + def entry(coordinates, offset=0): + return {"coordinates":coordinates,"offset":offset} + # Warm ties deliberately differ from a fresh index and brute list order. + ties = [entry([[x,x]]+[[0,0]]*5) for x in [-10,10]] + yield command(19,ties,[[x]+[0]*5 for x in [10,0,-10,0,10,0]]) + for branching in [2,19,32]: + yield command(branching,[entry([[0,0]]*6) for _ in range(40)],[[0]*6,[1]*6,[0]*6]) + yield command(19,[],[[0]*6]) + for branching in range(2,33): + counts = sorted({1,branching-1,branching,branching+1,branching**2-1,branching**2,branching**2+1}) + for count in counts: + entries = [] + for i in range(count): + coordinates = [] + for _ in range(6): + low = rng.randrange(-20000,20001) + coordinates.append([low,low+rng.randrange(0,4001)]) + if i and i%7 == 0: + entries.append(dict(entries[i-1])) + else: + entries.append(entry(coordinates,rng.randrange(0,10001))) + targets = [[rng.randrange(-30000,30001) for _ in range(6)] for _ in range(32)] + targets += targets[:8] + yield command(branching,entries,targets) + for count in [6858,6859,6860,65536]: + entries = [entry([[0,0]]*6) if count == 65536 else entry([[i%17-8,i%17-8]]*6,i%3) for i in range(count)] + yield command(19,entries,[[x]*6 for x in [-10,0,10,0]]) + extremes = [-2**63,-2**63+1,-2**31,-1,0,1,2**31-1,2**63-2,2**63-1] + for count in [1,2,19,20,362]: + entries = [entry([[rng.choice(extremes),rng.choice(extremes)] for _ in range(6)],rng.choice(extremes)) for _ in range(count)] + yield command(19,entries,[[rng.choice(extremes) for _ in range(6)] for _ in range(128)]) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--prepare",action="store_true") + args = parser.parse_args() + build = lab.LOCAL/"rust-worldgen-parity" + build.mkdir(parents=True,exist_ok=True) + report_path = build/"report.json" + report_path.unlink(missing_ok=True) + if args.prepare: lab.prepare() + lock,jars,libraries = base.verify_artifacts() + resources = noise_resources(jars["server"]) + if not resources: raise ValueError("pinned noise registry is empty") + if resources != noise_resources(jars["client"]): raise ValueError("client/server noise registry resources differ") + densities = registry_resources(jars["server"],"density_function") + if not densities or densities != registry_resources(jars["client"],"density_function"): + raise ValueError("client/server density registry resources differ or are empty") + settings = registry_resources(jars["server"],"noise_settings") + if not settings or settings != registry_resources(jars["client"],"noise_settings"): + raise ValueError("client/server noise settings resources differ or are empty") + tags = tag_resources(jars["server"]) + if not tags or tags != tag_resources(jars["client"]): + raise ValueError("client/server block tag resources differ or are empty") + def named(resources, kind): + prefix = f"data/minecraft/worldgen/{kind}/" + return {"minecraft:"+name[len(prefix):-5]:text for name,text in resources.items()} + bundle = build/"registries.json" + named_settings = named(settings,"noise_settings") + source = lab.ROOT/"mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldgenOracle.java" + exporter = source.with_name("VanillaBiomeExport.java") + tag_exporter = source.with_name("VanillaTagExport.java") + sources = [source,exporter,tag_exporter,Path(__file__),lab.ROOT/"tools/test_rust_parity.py",lab.ROOT/"tools/lab.py", + *sorted((lab.ROOT/"crates/horizon-core").rglob("*.rs")),*sorted((lab.ROOT/"crates/horizon-world").rglob("*.rs")), + lab.ROOT/"crates/horizon-core/Cargo.toml",lab.ROOT/"crates/horizon-world/Cargo.toml",lab.ROOT/"Cargo.toml",lab.ROOT/"Cargo.lock"] + tested_sources = base.source_hashes(sources) + classes = build/"classes" + classes.mkdir(exist_ok=True) + dependency_path = os.pathsep.join(map(str,libraries)) + base.run(["javac","--release",str(lock["minecraft"]["java_major"]),"-proc:none","-cp",os.pathsep.join([str(jars["server"]),dependency_path]),"-d",str(classes),str(source),str(exporter),str(tag_exporter)]) + preset_files = {} + preset_tables = None + for side,jar in jars.items(): + exported = build/f"biome-presets-{side}.json" + base.run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaBiomeExport",str(exported)]) + tables = json.loads(exported.read_text(encoding="utf-8")) + if not tables: raise ValueError("built-in biome parameter tables are empty") + if preset_tables is not None and tables != preset_tables: raise ValueError("client/server built-in biome parameter tables differ") + preset_tables = tables + preset_files[side] = exported + block_elements = None + tag_export_files = {} + for side,jar in jars.items(): + exported = build/f"blocks-{side}.json" + base.run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaTagExport",str(exported)]) + elements = json.loads(exported.read_text(encoding="utf-8")) + if not elements: raise ValueError("block identifiers are empty") + if block_elements is not None and elements != block_elements: raise ValueError("client/server block identifiers differ") + block_elements = elements + tag_export_files[side] = exported + bundle.write_text(json.dumps({"tags":tags,"block_elements":block_elements,"noises":named(resources,"noise"),"densities":named(densities,"density_function"),"settings":named_settings,"presets":preset_tables},separators=(",",":")),encoding="utf-8") + commands = list(corpus(resources)) + commands.extend(climate_corpus()) + commands.extend(index_corpus()) + commands.extend(climate_codec_corpus()) + commands.extend(settings_corpus(settings)) + commands.extend(tag_corpus(tags)) + commands.append(f"tag_registry {bundle}") + commands.extend(aquifer_corpus()) + commands.extend(noise_aquifer_corpus(bundle,named_settings)) + for seed in [0,1,-1,-2**63,2**63-1,0x123456789abcdef]: + for legacy in [0,1]: + for optimized in [0,1]: + commands.append(f"registry {seed} {legacy} {optimized} {bundle}") + for name in named_settings: + commands.append(f"router {seed} {legacy} {optimized} {bundle} {name}") + inputs = build/"inputs.txt" + inputs.write_text("\n".join(commands)+"\n",encoding="utf-8") + fixture_paths = [bundle,inputs,*preset_files.values(),*tag_export_files.values()] + tested_fixtures = base.source_hashes(fixture_paths) + base.run(["cargo","build","--release","--bin","horizon-worldgen-parity"]) + metadata = json.loads(subprocess.check_output(["cargo","metadata","--no-deps","--format-version","1"],cwd=lab.ROOT,text=True)) + binary = Path(metadata["target_directory"])/"release"/("horizon-worldgen-parity.exe" if os.name == "nt" else "horizon-worldgen-parity") + candidate = build/"rust.txt" + with inputs.open("rb") as stdin,candidate.open("wb") as stdout: base.run([str(binary)],stdin=stdin,stdout=stdout) + injected_failures = Counter() + aquifer_outcomes = Counter() + with candidate.open(encoding="utf-8") as stream: + for line in stream: + if line.startswith("sample failure "): injected_failures[line.strip().split()[-1]] += 1 + elif line.startswith("aquifer result "): aquifer_outcomes[line.strip()[len("aquifer result "):]] += 1 + if dict(injected_failures) != {str(field):3 for field in range(6)}: + raise ValueError(f"Aquifer failure corpus did not hit every injected failure: {injected_failures}") + references = [] + for side,jar in jars.items(): + reference = build/f"vanilla-{side}.txt" + base.run(["java","-Xmx512M","-cp",os.pathsep.join([str(classes),str(jar),dependency_path]),"dev.horizonlab.parity.VanillaWorldgenOracle",str(inputs),str(reference)]) + matched = base.compare(reference,candidate) + references.append({"side":side,"jar_sha256":lab.digest(jar,"sha256"),"output_sha256":lab.digest(reference,"sha256"),"matched_output_lines":matched,"biome_export_sha256":lab.digest(preset_files[side],"sha256"),"block_export_sha256":lab.digest(tag_export_files[side],"sha256")}) + print(f"{side}: {matched:,} world-generation codec output lines match Rust",flush=True) + base.ensure_sources_unchanged(sources,tested_sources) + base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report = {"schema":1,"minecraft":lock["minecraft"]["version"],"platform":platform.platform(), + "java":subprocess.check_output(["java","--version"],text=True).splitlines()[0],"rustc":subprocess.check_output(["rustc","--version"],text=True).strip(), + "manifest_sha1":lock["minecraft"]["manifest_sha1"],"commands":len(commands),"command_counts":dict(Counter(line.split()[0] for line in commands)),"noise_aquifer_injected_failures":dict(injected_failures),"noise_aquifer_outcomes":dict(aquifer_outcomes),"block_tag_entries":len(tags),"block_identifier_entries":len(block_elements),"block_tag_resources_sha256":{name:hashlib.sha256(text.encode("utf-8")).hexdigest() for name,text in tags.items()},"noise_registry_entries":len(resources),"density_registry_entries":len(densities),"noise_settings_entries":len(settings),"biome_parameter_entries":{name:len(json.loads(text)) for name,text in preset_tables.items()}, + "biome_tables_sha256":{name:hashlib.sha256(text.encode("utf-8")).hexdigest() for name,text in preset_tables.items()},"fixtures_sha256":tested_fixtures, + "noise_resources_sha256":{name:hashlib.sha256(text.encode("utf-8")).hexdigest() for name,text in resources.items()}, + "density_resources_sha256":{name:hashlib.sha256(text.encode("utf-8")).hexdigest() for name,text in densities.items()}, + "noise_settings_resources_sha256":{name:hashlib.sha256(text.encode("utf-8")).hexdigest() for name,text in settings.items()}, + "inputs_sha256":lab.digest(inputs,"sha256"),"rust_output_sha256":lab.digest(candidate,"sha256"),"sources_sha256":tested_sources,"references":references, + "scope":"Direct normal-noise JSON decoding using the actual pinned vanilla CODEC. Every bundled noise registry resource, explicit/default parameters, empty and full amplitude modifiers, normalization modes, inclusive field bounds with signed-zero comparator ordering, malformed types, null fields, duplicate and ignored keys, decimal/exponent integer truncation and wrapping, signed zero, seeded modern/legacy and Nether construction, octave metadata, range and normalization bits, scalar noise values and parent random state. JSON resource contents stay private. Strict JSON parsing; no claim for Gson's permissive non-JSON syntax. Bundled density registries are also decoded with actual vanilla registry-aware CODECs: named forward references, all bundled function kinds, declared range/axes, raw compilation errors, seeded optimized roots, cache allocation, scalar values, strided bulk values, repeated cache hits and surface-volume errors are compared using RandomState's actual compile context. All seven bundled noise-setting resources contribute their actual eight-field NoiseRouter.CODEC objects to RandomState. Router fields are compiled in declaration order with a shared compiler/context; cache allocation, raw/optimized scalar and repeated strided volume values, successful single-layer surface volumes and invalid surface-volume shapes are compared. Actual RandomState climate sampler binding and quart-to-block coordinate wrapping are checked at ordinary and extreme positions. Float-to-long climate quantization and long-to-float conversion include subnormals, signed zeros, NaNs, infinities, cast saturation and seeded random bit patterns. Actual vanilla Climate.Parameter and ParameterPoint JSON codecs compare scalar, two-element list and min/max object intervals, float endpoint bounds/ordering, required coordinate/offset fields, negative zero, precision-sensitive float parsing, malformed types and duplicate keys. Climate parameter distances, wrapping squared fitness, stable search-tree leaf order and nearest lookup are compared across every supported branching value 2..32, sizes around branch powers, the 65536-entry API bound, duplicates, warm ties, fresh lookups, brute-force lookup and extreme signed-long endpoints/targets. The Rust tree is immutable with per-worker search state instead of hidden thread locals; invalid or degenerate searches return typed errors. Inline arbitrary distance metrics and behavior outside the bounded API are not covered. Built-in Overworld and Nether quantized biome parameter tables are exported independently by each authenticated JAR and required to agree before Rust consumes them. The Rust multi-noise resolver and actual vanilla MultiNoiseBiomeSource compare biome identities through scalar climate queries and prepared bulk quart volumes, including forward/reverse/repeated query order, wrapped extreme origins and shared previous-result state. Biome holder keys in the reference are registration placeholders; no biome property or gameplay behavior is evaluated. The Rust loader reads a Horizon quantized table format, not the vanilla biome codec, and the preset builders themselves have not been ported. Source and private fixture mutations during validation invalidate the report. The two-field 26.3 NoiseSettings codec, create helper and LevelHeightAccessor clamping are also compared across bundled noise members, dimension/alignment bounds, zero/negative runtime heights, disjoint ranges, wrapped integer arithmetic and decimal/exponent integer conversion. Global fluid cutoff selection and the actual disabled Aquifer implementation are compared with original default block-state identities, extreme sea levels/coordinates, signed-zero/subnormal/nonfinite density and counted picker calls; developer fluid-disable behavior is outside the regular-mode corpus. The actual noise-based Aquifer.Config codec and runtime are compared across bundled aquifer settings, modern/legacy world-seeded aquifer factories, synthetic density roots, nondefault water/lava states, cave/void air, nonfinite sampler overrides, strided volume extents, wrapped coordinates, repeated and reversed queries, counted picker calls, sampler call order/values, injected failures and retry state, scheduling flags, populated location/status caches and sorted surface-cache entries. Oversized or wrapped-invalid grid allocations and developer fluid-disable behavior are outside the bounded regular-mode API. Terrain filling is not yet validated. Router, vertical noise and optional aquifer members are decoded from each noise-setting resource; complete NoiseGeneratorSettings, material rules, nonempty world fields, biome registry/codecs and complete chunk biome assignment, generated chunks, gameplay and rendering remain pending. TagEntry and TagFile codecs, ordered resource-stack replacement, first-occurrence member deduplication, required/optional dependency cycle pruning, lookup order and flags, missing-reference partial results and all bundled block tag members are also compared with actual vanilla TagLoader. Block identifier tables are exported independently by authenticated client/server JARs and required to agree. The bounded tag API supports at most 8192 tags, dependency depth 256 and Java hash buckets without tree nodes; hash-tree ordering and pathological self-cycle failures remain pending. No heightmap or complete terrain integration follows from tag resolution. Inline noise holders and general codec behavior beyond the covered fixtures remain pending."} + lab.write_json(report_path,report) + print(f"Scoped world-generation codec parity passed: {report_path}") + + +if __name__ == "__main__": + main() diff --git a/tools/test_worldgen_random_parity.py b/tools/test_worldgen_random_parity.py new file mode 100644 index 000000000..e0ba5942b --- /dev/null +++ b/tools/test_worldgen_random_parity.py @@ -0,0 +1,70 @@ +#!/usr/bin/env python3 +"""Compare the native world-generation random adapter, counters, forks and seeds.""" +import argparse +import itertools +import json +import os +from pathlib import Path +import platform +import random +import subprocess +import zipfile +try: + from . import lab, test_rust_parity as base +except ImportError: + import lab + import test_rust_parity as base + + +def corpus(): + rng=random.Random(78336) + integers=[-2147483648,-10001,-1,0,1,16,214748,214749,2147483647] + longs=[-9223372036854775808,-1,0,1,9223372036854775807]+[rng.randrange(-2**63,2**63) for _ in range(20)] + sample=[['int'],['long'],['bool'],['float'],['double']] + for legacy in [False,True]: + for layers in [1,2,3]: + for warmup in [0,7]: + for seed in longs: + ops=[] + for bits in [-2147483648,-65,-64,-33,-1,0,1,24,26,27,31,32,33,48,63,64,65,2147483647]:ops.append(['bits',bits]) + ops+=sample + for bound in [-2147483648,-1,0,1,2,3,7,16,1073741825,2147483647]:ops += [['bound',bound],*sample] + for x,z in zip(integers,reversed(integers)): + ops += [['decoration',seed,x,z],*sample,['feature',seed,z,x],*sample,['large',seed,x,z],*sample,['salt',seed,x,z,x],*sample,['slime',x,z,seed,seed^0x123456789abcdef]] + for operation in [['fork'],['pos',-2147483648,2147483647,-1],['pos_seed',seed],['pos_hash',[0,65,0xd800,0xdfff,0x20ac]]]: + ops += [['root'],operation,*sample,['fork'],*sample,['seed',seed],['consume',17],*sample] + ops += [['root'],['consume',-1],['consume',0],['consume',129],*sample] + yield {'legacy':legacy,'layers':layers,'warmup':warmup,'seed':seed,'ops':ops} + + +def main(): + parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--prepare',action='store_true');args=parser.parse_args() + build=lab.LOCAL/'rust-worldgen-random-parity';build.mkdir(parents=True,exist_ok=True) + report_path=build/'report.json';report_path.unlink(missing_ok=True) + if args.prepare:lab.prepare() + lock,jars,libraries=base.verify_artifacts() + oracle=lab.ROOT/'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaWorldgenRandomOracle.java' + sources=[oracle,Path(__file__),lab.ROOT/'tools/test_rust_parity.py',lab.ROOT/'tools/lab.py',lab.ROOT/'Cargo.toml',lab.ROOT/'Cargo.lock',lab.ROOT/'crates/horizon-core/Cargo.toml',lab.ROOT/'crates/horizon-world/Cargo.toml',*sorted((lab.ROOT/'crates/horizon-core/src').rglob('*.rs')),*sorted((lab.ROOT/'crates/horizon-world/src').rglob('*.rs')),lab.ROOT/'crates/horizon-world/examples/worldgen_random_fixture.rs'] + tested_sources=base.source_hashes(sources) + fixtures=list(corpus());inputs=build/'inputs.txt';inputs.write_text(''.join(json.dumps(f,separators=(',',':'))+'\n' for f in fixtures),encoding='utf-8') + fixture_paths=[inputs];tested_fixtures=base.source_hashes(fixture_paths) + classes=build/'classes';classes.mkdir(exist_ok=True) + def run(command,name): + with (build/(name+'.log')).open('w',encoding='utf-8') as log:base.run(list(map(str,command)),stdout=log,stderr=subprocess.STDOUT) + dependency_path=os.pathsep.join(map(str,libraries)) + run(['javac','--release',lock['minecraft']['java_major'],'-proc:none','-cp',str(jars['server'])+os.pathsep+dependency_path,'-d',classes,oracle],'compile-java') + run(['cargo','build','--release','-p','horizon-world','--example','worldgen_random_fixture'],'compile-rust') + metadata=json.loads(subprocess.check_output(['cargo','metadata','--no-deps','--format-version','1'],cwd=lab.ROOT,text=True)) + binary=Path(metadata['target_directory'])/'release/examples'/('worldgen_random_fixture.exe' if os.name=='nt' else 'worldgen_random_fixture') + run([binary,build],'rust');references=[] + for side,jar in jars.items(): + run(['java','-Xmx512M','-cp',os.pathsep.join([str(classes),str(jar),dependency_path]),'dev.horizonlab.parity.VanillaWorldgenRandomOracle',side,build],side) + reference=build/f'{side}.txt';matched=base.compare(reference,build/'rust.txt') + references.append({'side':side,'jar_sha256':lab.digest(jar,'sha256'),'output_sha256':lab.digest(reference,'sha256'),'matched_output_lines':matched}) + print(f'{side}: {matched:,} worldgen-random output lines match Rust',flush=True) + base.ensure_sources_unchanged(sources,tested_sources);base.ensure_sources_unchanged(fixture_paths,tested_fixtures) + report={'schema':1,'minecraft':lock['minecraft']['version'],'manifest_sha1':lock['minecraft']['manifest_sha1'],'platform':platform.platform(),'java':subprocess.check_output(['java','--version'],text=True).splitlines()[0],'rustc':subprocess.check_output(['rustc','--version'],text=True).strip(),'fixtures':len(fixtures),'random_modes':2,'wrapper_depths':[1,2,3],'operations':sum(len(f['ops']) for f in fixtures),'sources_sha256':tested_sources,'fixtures_sha256':tested_fixtures,'rust_output_sha256':lab.digest(build/'rust.txt','sha256'),'references':references,'scope':'Actual WorldgenRandom bit sampling over legacy and xoroshiro sources, nested wrappers, signed bit-width shifts, draw counters, valid/invalid bounds, reseeding, fork and positional-factory delegation. Decoration, per-feature, large-feature, salt and slime-chunk seeds exercise signed int/long overflow, extreme coordinates and inherited legacy multi-draw behavior. Gaussian samples, concurrent access and full chunk decoration remain pending.'} + lab.write_json(report_path,report);print(f'Scoped worldgen-random parity passed: {report_path}') + + +if __name__=='__main__':main()